Skip to content

Commit

Permalink
Merge branch 'main' into users-fvisser-dependency-review-action
Browse files Browse the repository at this point in the history
  • Loading branch information
fredvisser authored Mar 20, 2024
2 parents 2ca6b1d + 8bb2c33 commit 06d630b
Show file tree
Hide file tree
Showing 49 changed files with 1,235 additions and 357 deletions.
21 changes: 21 additions & 0 deletions angular-workspace/projects/ni/nimble-angular/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
{
"name": "@ni/nimble-angular",
"entries": [
{
"date": "Mon, 18 Mar 2024 17:12:34 GMT",
"version": "20.5.0",
"tag": "@ni/nimble-angular_v20.5.0",
"comments": {
"minor": [
{
"author": "20542556+mollykreis@users.noreply.github.com",
"package": "@ni/nimble-angular",
"commit": "3bbf8d7cd86d0129e9ad6bb0eed245ea2bfc0fda",
"comment": "Add new properties to the table label provider"
},
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v22.1.0",
"commit": "not available"
}
]
}
},
{
"date": "Thu, 14 Mar 2024 14:48:16 GMT",
"version": "20.4.1",
Expand Down
11 changes: 10 additions & 1 deletion angular-workspace/projects/ni/nimble-angular/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# Change Log - @ni/nimble-angular

This log was last generated on Thu, 14 Mar 2024 14:48:16 GMT and should not be manually modified.
This log was last generated on Mon, 18 Mar 2024 17:12:34 GMT and should not be manually modified.

<!-- Start content -->

## 20.5.0

Mon, 18 Mar 2024 17:12:34 GMT

### Minor changes

- Add new properties to the table label provider ([ni/nimble@3bbf8d7](https://github.com/ni/nimble/commit/3bbf8d7cd86d0129e9ad6bb0eed245ea2bfc0fda))
- Bump @ni/nimble-components to v22.1.0

## 20.4.1

Thu, 14 Mar 2024 14:48:16 GMT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ export class NimbleLabelProviderTableWithDefaultsDirective {
this.elementRef.nativeElement.rowSelect = $localize`:Nimble table - select row|:Select row`;
this.elementRef.nativeElement.rowOperationColumn = $localize`:Nimble table - row operation column|:Row operations`;
this.elementRef.nativeElement.rowLoading = $localize`:Nimble table - row loading|:Loading`;
this.elementRef.nativeElement.groupRowPlaceholderNoValue = $localize`:Nimble table - group row placeholder no value|:No value`;
this.elementRef.nativeElement.groupRowPlaceholderEmpty = $localize`:Nimble table - group row placeholder empty|:Empty`;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,20 @@ export class NimbleLabelProviderTableDirective {
@Input('row-loading') public set rowLoading(value: string | undefined) {
this.renderer.setProperty(this.elementRef.nativeElement, 'rowLoading', value);
}

public get groupRowPlaceholderNoValue(): string | undefined {
return this.elementRef.nativeElement.groupRowPlaceholderNoValue;
}

@Input('group-row-placeholder-no-value') public set groupRowPlaceholderNoValue(value: string | undefined) {
this.renderer.setProperty(this.elementRef.nativeElement, 'groupRowPlaceholderNoValue', value);
}

public get groupRowPlaceholderEmpty(): string | undefined {
return this.elementRef.nativeElement.groupRowPlaceholderEmpty;
}

@Input('group-row-placeholder-empty') public set groupRowPlaceholderEmpty(value: string | undefined) {
this.renderer.setProperty(this.elementRef.nativeElement, 'groupRowPlaceholderEmpty', value);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ describe('Nimble LabelProviderTable withDefaults directive', () => {
[computeMsgId('Select row', 'Nimble table - select row')]: 'Translated select row',
[computeMsgId('Row operations', 'Nimble table - row operation column')]: 'Translated row operations',
[computeMsgId('Loading', 'Nimble table - row loading')]: 'Translated loading',
[computeMsgId('No value', 'Nimble table - group row placeholder no value')]: 'Translated no value',
[computeMsgId('Empty', 'Nimble table - group row placeholder empty')]: 'Translated empty',
});
const fixture = TestBed.createComponent(TestHostComponent);
const testHostComponent = fixture.componentInstance;
Expand All @@ -64,5 +66,7 @@ describe('Nimble LabelProviderTable withDefaults directive', () => {
expect(labelProvider.rowSelect).toBe('Translated select row');
expect(labelProvider.rowOperationColumn).toBe('Translated row operations');
expect(labelProvider.rowLoading).toBe('Translated loading');
expect(labelProvider.groupRowPlaceholderNoValue).toBe('Translated no value');
expect(labelProvider.groupRowPlaceholderEmpty).toBe('Translated empty');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ describe('Nimble Label Provider Table', () => {
const label12 = 'String 12';
const label13 = 'String 13';
const label14 = 'String 14';
const label15 = 'String 15';
const label16 = 'String 16';

beforeEach(() => {
TestBed.configureTestingModule({
Expand Down Expand Up @@ -124,6 +126,16 @@ describe('Nimble Label Provider Table', () => {
expect(directive.rowLoading).toBeUndefined();
expect(nativeElement.rowLoading).toBeUndefined();
});

it('has expected defaults for groupRowPlaceholderNoValue', () => {
expect(directive.groupRowPlaceholderNoValue).toBeUndefined();
expect(nativeElement.groupRowPlaceholderNoValue).toBeUndefined();
});

it('has expected defaults for groupRowPlaceholderEmpty', () => {
expect(directive.groupRowPlaceholderEmpty).toBeUndefined();
expect(nativeElement.groupRowPlaceholderEmpty).toBeUndefined();
});
});

describe('with template string values', () => {
Expand All @@ -144,6 +156,8 @@ describe('Nimble Label Provider Table', () => {
row-select="${label12}"
row-operation-column="${label13}"
row-loading="${label14}"
group-row-placeholder-no-value="${label15}"
group-row-placeholder-empty="${label16}"
>
</nimble-label-provider-table>
`
Expand Down Expand Up @@ -237,6 +251,16 @@ describe('Nimble Label Provider Table', () => {
expect(directive.rowLoading).toBe(label14);
expect(nativeElement.rowLoading).toBe(label14);
});

it('will use template string values for groupRowPlaceholderNoValue', () => {
expect(directive.groupRowPlaceholderNoValue).toBe(label15);
expect(nativeElement.groupRowPlaceholderNoValue).toBe(label15);
});

it('will use template string values for groupRowPlaceholderEmpty', () => {
expect(directive.groupRowPlaceholderEmpty).toBe(label16);
expect(nativeElement.groupRowPlaceholderEmpty).toBe(label16);
});
});

describe('with property bound values', () => {
Expand All @@ -257,6 +281,8 @@ describe('Nimble Label Provider Table', () => {
[rowSelect]="rowSelect"
[rowOperationColumn]="rowOperationColumn"
[rowLoading]="rowLoading"
[groupRowPlaceholderNoValue]="groupRowPlaceholderNoValue"
[groupRowPlaceholderEmpty]="groupRowPlaceholderEmpty"
>
</nimble-label-provider-table>
`
Expand All @@ -278,6 +304,8 @@ describe('Nimble Label Provider Table', () => {
public rowSelect = label1;
public rowOperationColumn = label1;
public rowLoading = label1;
public groupRowPlaceholderNoValue = label1;
public groupRowPlaceholderEmpty = label1;
}

let fixture: ComponentFixture<TestHostComponent>;
Expand Down Expand Up @@ -448,6 +476,28 @@ describe('Nimble Label Provider Table', () => {
expect(directive.rowLoading).toBe(label2);
expect(nativeElement.rowLoading).toBe(label2);
});

it('can be configured with property binding for groupRowPlaceholderNoValue', () => {
expect(directive.groupRowPlaceholderNoValue).toBe(label1);
expect(nativeElement.groupRowPlaceholderNoValue).toBe(label1);

fixture.componentInstance.groupRowPlaceholderNoValue = label2;
fixture.detectChanges();

expect(directive.groupRowPlaceholderNoValue).toBe(label2);
expect(nativeElement.groupRowPlaceholderNoValue).toBe(label2);
});

it('can be configured with property binding for groupRowPlaceholderEmpty', () => {
expect(directive.groupRowPlaceholderEmpty).toBe(label1);
expect(nativeElement.groupRowPlaceholderEmpty).toBe(label1);

fixture.componentInstance.groupRowPlaceholderEmpty = label2;
fixture.detectChanges();

expect(directive.groupRowPlaceholderEmpty).toBe(label2);
expect(nativeElement.groupRowPlaceholderEmpty).toBe(label2);
});
});

describe('with attribute bound values', () => {
Expand All @@ -468,6 +518,8 @@ describe('Nimble Label Provider Table', () => {
[attr.row-select]="rowSelect"
[attr.row-operation-column]="rowOperationColumn"
[attr.row-loading]="rowLoading"
[attr.group-row-placeholder-no-value]="groupRowPlaceholderNoValue"
[attr.group-row-placeholder-empty]="groupRowPlaceholderEmpty"
>
</nimble-label-provider-table>
`
Expand All @@ -489,6 +541,8 @@ describe('Nimble Label Provider Table', () => {
public rowSelect = label1;
public rowOperationColumn = label1;
public rowLoading = label1;
public groupRowPlaceholderNoValue = label1;
public groupRowPlaceholderEmpty = label1;
}

let fixture: ComponentFixture<TestHostComponent>;
Expand Down Expand Up @@ -659,5 +713,27 @@ describe('Nimble Label Provider Table', () => {
expect(directive.rowLoading).toBe(label2);
expect(nativeElement.rowLoading).toBe(label2);
});

it('can be configured with attribute binding for groupRowPlaceholderNoValue', () => {
expect(directive.groupRowPlaceholderNoValue).toBe(label1);
expect(nativeElement.groupRowPlaceholderNoValue).toBe(label1);

fixture.componentInstance.groupRowPlaceholderNoValue = label2;
fixture.detectChanges();

expect(directive.groupRowPlaceholderNoValue).toBe(label2);
expect(nativeElement.groupRowPlaceholderNoValue).toBe(label2);
});

it('can be configured with attribute binding for groupRowPlaceholderEmpty', () => {
expect(directive.groupRowPlaceholderEmpty).toBe(label1);
expect(nativeElement.groupRowPlaceholderEmpty).toBe(label1);

fixture.componentInstance.groupRowPlaceholderEmpty = label2;
fixture.detectChanges();

expect(directive.groupRowPlaceholderEmpty).toBe(label2);
expect(nativeElement.groupRowPlaceholderEmpty).toBe(label2);
});
});
});
4 changes: 2 additions & 2 deletions angular-workspace/projects/ni/nimble-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ni/nimble-angular",
"version": "20.4.1",
"version": "20.5.0",
"description": "Angular components for the NI Nimble Design System",
"scripts": {
"invoke-publish": "cd ../../../ && npm run build:library && cd dist/ni/nimble-angular && npm publish"
Expand Down Expand Up @@ -31,7 +31,7 @@
"@angular/forms": "^15.2.10",
"@angular/localize": "^15.2.10",
"@angular/router": "^15.2.10",
"@ni/nimble-components": "^22.0.1"
"@ni/nimble-components": "^22.1.0"
},
"dependencies": {
"tslib": "^2.2.0"
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions packages/nimble-blazor/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"name": "@ni/nimble-blazor",
"entries": [
{
"date": "Mon, 18 Mar 2024 17:12:34 GMT",
"version": "14.5.0",
"tag": "@ni/nimble-blazor_v14.5.0",
"comments": {
"minor": [
{
"author": "20542556+mollykreis@users.noreply.github.com",
"package": "@ni/nimble-blazor",
"commit": "3bbf8d7cd86d0129e9ad6bb0eed245ea2bfc0fda",
"comment": "Add new properties to the table label provider"
}
]
}
},
{
"date": "Wed, 13 Mar 2024 23:07:24 GMT",
"version": "14.4.0",
Expand Down
10 changes: 9 additions & 1 deletion packages/nimble-blazor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# Change Log - @ni/nimble-blazor

This log was last generated on Wed, 13 Mar 2024 23:07:24 GMT and should not be manually modified.
This log was last generated on Mon, 18 Mar 2024 17:12:34 GMT and should not be manually modified.

<!-- Start content -->

## 14.5.0

Mon, 18 Mar 2024 17:12:34 GMT

### Minor changes

- Add new properties to the table label provider ([ni/nimble@3bbf8d7](https://github.com/ni/nimble/commit/3bbf8d7cd86d0129e9ad6bb0eed245ea2bfc0fda))

## 14.4.0

Wed, 13 Mar 2024 23:07:24 GMT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@
row-select="@RowSelect"
row-operation-column="@RowOperationColumn"
row-loading="@RowLoading"
group-row-placeholder-no-value="@GroupRowPlaceholderNoValue"
group-row-placeholder-empty="@GroupRowPlaceholderEmpty"
@attributes="AdditionalAttributes">
</nimble-label-provider-table>
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ public partial class NimbleLabelProviderTable : ComponentBase
[Parameter]
public string? RowLoading { get; set; }

[Parameter]
public string? GroupRowPlaceholderNoValue { get; set; }

[Parameter]
public string? GroupRowPlaceholderEmpty { get; set; }
/// <summary>
/// Gets or sets a collection of additional attributes that will be applied to the created element.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public void NimbleLabelProviderTable_SupportsAdditionalAttributes()
[InlineData(nameof(NimbleLabelProviderTable.RowSelect))]
[InlineData(nameof(NimbleLabelProviderTable.RowOperationColumn))]
[InlineData(nameof(NimbleLabelProviderTable.RowLoading))]
[InlineData(nameof(NimbleLabelProviderTable.GroupRowPlaceholderNoValue))]
[InlineData(nameof(NimbleLabelProviderTable.GroupRowPlaceholderEmpty))]
public void NimbleLabelProviderTable_LabelIsSet(string propertyName)
{
var labelValue = propertyName + "UpdatedValue";
Expand Down
2 changes: 1 addition & 1 deletion packages/nimble-blazor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ni/nimble-blazor",
"version": "14.4.1",
"version": "14.5.0",
"description": "Blazor components for the NI Nimble Design System",
"scripts": {
"postinstall": "node build/generate-playwright-version-properties/source/index.js",
Expand Down
Loading

0 comments on commit 06d630b

Please sign in to comment.