diff --git a/angular-workspace/package.json b/angular-workspace/package.json index 4828994aac..8850fcb683 100644 --- a/angular-workspace/package.json +++ b/angular-workspace/package.json @@ -60,6 +60,6 @@ "ng-packagr": "^15.2.2", "playwright": "1.40.0", "rollup": "^4.12.0", - "typescript": "~4.8.2" + "typescript": "~4.9.5" } } diff --git a/angular-workspace/projects/example-client-app/src/app/customapp/customapp.component.html b/angular-workspace/projects/example-client-app/src/app/customapp/customapp.component.html index 5c840835bb..2bd837f9c1 100644 --- a/angular-workspace/projects/example-client-app/src/app/customapp/customapp.component.html +++ b/angular-workspace/projects/example-client-app/src/app/customapp/customapp.component.html @@ -151,16 +151,19 @@
Select
+ Option 1 Option 2 Option 3 + Option 1 Option 2 Option 3 + Option 1 Option 2 Option 3 diff --git a/angular-workspace/projects/example-client-app/src/app/customapp/customapp.component.ts b/angular-workspace/projects/example-client-app/src/app/customapp/customapp.component.ts index ce06158d7d..5704fd8fbc 100644 --- a/angular-workspace/projects/example-client-app/src/app/customapp/customapp.component.ts +++ b/angular-workspace/projects/example-client-app/src/app/customapp/customapp.component.ts @@ -110,14 +110,6 @@ export class CustomAppComponent implements AfterViewInit { public constructor(@Inject(ActivatedRoute) public readonly route: ActivatedRoute) { this.tableData$ = this.tableDataSubject.asObservable(); this.addTableRows(10); - - this.comboboxItems = []; - for (let i = 0; i < 300; i++) { - this.comboboxItems.push({ - first: i.toString(), - last: i.toString() - }); - } } public ngAfterViewInit(): void { diff --git a/angular-workspace/projects/ni/nimble-angular/CHANGELOG.json b/angular-workspace/projects/ni/nimble-angular/CHANGELOG.json index 0a5bf2ef65..cf827b3be0 100644 --- a/angular-workspace/projects/ni/nimble-angular/CHANGELOG.json +++ b/angular-workspace/projects/ni/nimble-angular/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@ni/nimble-angular", "entries": [ + { + "date": "Tue, 12 Mar 2024 21:01:54 GMT", + "version": "20.2.21", + "tag": "@ni/nimble-angular_v20.2.21", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@ni/nimble-angular", + "comment": "Bump @ni/nimble-components to v21.10.1", + "commit": "not available" + } + ] + } + }, { "date": "Thu, 07 Mar 2024 21:20:52 GMT", "version": "20.2.20", diff --git a/angular-workspace/projects/ni/nimble-angular/CHANGELOG.md b/angular-workspace/projects/ni/nimble-angular/CHANGELOG.md index 343cd1ed90..dd7a77bf31 100644 --- a/angular-workspace/projects/ni/nimble-angular/CHANGELOG.md +++ b/angular-workspace/projects/ni/nimble-angular/CHANGELOG.md @@ -1,9 +1,17 @@ # Change Log - @ni/nimble-angular -This log was last generated on Thu, 07 Mar 2024 21:20:52 GMT and should not be manually modified. +This log was last generated on Tue, 12 Mar 2024 21:01:54 GMT and should not be manually modified. +## 20.2.21 + +Tue, 12 Mar 2024 21:01:54 GMT + +### Patches + +- Bump @ni/nimble-components to v21.10.1 + ## 20.2.20 Thu, 07 Mar 2024 21:20:52 GMT diff --git a/angular-workspace/projects/ni/nimble-angular/package.json b/angular-workspace/projects/ni/nimble-angular/package.json index c784c92f79..6ee91ca648 100644 --- a/angular-workspace/projects/ni/nimble-angular/package.json +++ b/angular-workspace/projects/ni/nimble-angular/package.json @@ -1,6 +1,6 @@ { "name": "@ni/nimble-angular", - "version": "20.2.20", + "version": "20.2.21", "description": "Angular components for the NI Nimble Design System", "scripts": { "invoke-publish": "cd ../../../ && npm run build:library && cd dist/ni/nimble-angular && npm publish" @@ -31,7 +31,7 @@ "@angular/forms": "^15.2.10", "@angular/localize": "^15.2.10", "@angular/router": "^15.2.10", - "@ni/nimble-components": "^21.10.0" + "@ni/nimble-components": "^21.10.1" }, "dependencies": { "tslib": "^2.2.0" diff --git a/angular-workspace/projects/ni/nimble-angular/select/testing/ng-package.json b/angular-workspace/projects/ni/nimble-angular/select/testing/ng-package.json new file mode 100644 index 0000000000..e5440110fb --- /dev/null +++ b/angular-workspace/projects/ni/nimble-angular/select/testing/ng-package.json @@ -0,0 +1,6 @@ +{ + "$schema": "../../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public-api.ts" + } +} \ No newline at end of file diff --git a/angular-workspace/projects/ni/nimble-angular/select/testing/public-api.ts b/angular-workspace/projects/ni/nimble-angular/select/testing/public-api.ts new file mode 100644 index 0000000000..5d27bfa639 --- /dev/null +++ b/angular-workspace/projects/ni/nimble-angular/select/testing/public-api.ts @@ -0,0 +1 @@ +export * from './select.pageobject'; \ No newline at end of file diff --git a/angular-workspace/projects/ni/nimble-angular/select/testing/select.pageobject.ts b/angular-workspace/projects/ni/nimble-angular/select/testing/select.pageobject.ts new file mode 100644 index 0000000000..9ed5c93fbe --- /dev/null +++ b/angular-workspace/projects/ni/nimble-angular/select/testing/select.pageobject.ts @@ -0,0 +1,3 @@ +import { SelectPageObject } from '@ni/nimble-components/dist/esm/select/testing/select.pageobject'; + +export { SelectPageObject }; \ No newline at end of file diff --git a/angular-workspace/projects/ni/nimble-angular/src/directives/list-option/nimble-list-option.directive.ts b/angular-workspace/projects/ni/nimble-angular/src/directives/list-option/nimble-list-option.directive.ts index 347d26335d..3dc2eb2c96 100644 --- a/angular-workspace/projects/ni/nimble-angular/src/directives/list-option/nimble-list-option.directive.ts +++ b/angular-workspace/projects/ni/nimble-angular/src/directives/list-option/nimble-list-option.directive.ts @@ -25,6 +25,22 @@ export class NimbleListOptionDirective { this.renderer.setProperty(this.elementRef.nativeElement, 'disabled', toBooleanProperty(value)); } + public get selected(): boolean { + return this.elementRef.nativeElement.selected; + } + + @Input() public set selected(value: BooleanValueOrAttribute) { + this.renderer.setProperty(this.elementRef.nativeElement, 'selected', toBooleanProperty(value)); + } + + public get hidden(): boolean { + return this.elementRef.nativeElement.hidden; + } + + @Input() public set hidden(value: BooleanValueOrAttribute) { + this.renderer.setProperty(this.elementRef.nativeElement, 'hidden', toBooleanProperty(value)); + } + public constructor( private readonly elementRef: ElementRef, private readonly renderer: Renderer2, diff --git a/angular-workspace/projects/ni/nimble-angular/src/directives/list-option/tests/nimble-list-option.directive.spec.ts b/angular-workspace/projects/ni/nimble-angular/src/directives/list-option/tests/nimble-list-option.directive.spec.ts index 73d0119148..fb96382d86 100644 --- a/angular-workspace/projects/ni/nimble-angular/src/directives/list-option/tests/nimble-list-option.directive.spec.ts +++ b/angular-workspace/projects/ni/nimble-angular/src/directives/list-option/tests/nimble-list-option.directive.spec.ts @@ -48,6 +48,16 @@ describe('Nimble listbox option', () => { expect(directive.disabled).toBeUndefined(); expect(nativeElement.disabled).toBeUndefined(); }); + + it('has expected defaults for selected', () => { + expect(directive.selected).toBeFalse(); + expect(nativeElement.selected).toBeFalse(); + }); + + it('has expected defaults for hidden', () => { + expect(directive.hidden).toBeFalse(); + expect(nativeElement.hidden).toBeFalse(); + }); }); describe('with template string values', () => { @@ -55,6 +65,8 @@ describe('Nimble listbox option', () => { template: ` ` }) @@ -82,6 +94,16 @@ describe('Nimble listbox option', () => { expect(directive.disabled).toBeTrue(); expect(nativeElement.disabled).toBeTrue(); }); + + it('will use template string values for selected', () => { + expect(directive.selected).toBeTrue(); + expect(nativeElement.selected).toBeTrue(); + }); + + it('will use template string values for hidden', () => { + expect(directive.hidden).toBeTrue(); + expect(nativeElement.hidden).toBeTrue(); + }); }); describe('with property bound values', () => { @@ -89,6 +111,8 @@ describe('Nimble listbox option', () => { template: ` ` }) @@ -97,6 +121,8 @@ describe('Nimble listbox option', () => { @ViewChild('listOption', { read: ElementRef }) public elementRef: ElementRef; public disabled = false; + public selected = false; + public hidden = false; } let fixture: ComponentFixture; @@ -124,13 +150,37 @@ describe('Nimble listbox option', () => { expect(directive.disabled).toBeTrue(); expect(nativeElement.disabled).toBeTrue(); }); + + it('can be configured with property binding for selected', () => { + expect(directive.selected).toBeFalse(); + expect(nativeElement.selected).toBeFalse(); + + fixture.componentInstance.selected = true; + fixture.detectChanges(); + + expect(directive.selected).toBeTrue(); + expect(nativeElement.selected).toBeTrue(); + }); + + it('can be configured with property binding for hidden', () => { + expect(directive.hidden).toBeFalse(); + expect(nativeElement.hidden).toBeFalse(); + + fixture.componentInstance.hidden = true; + fixture.detectChanges(); + + expect(directive.hidden).toBeTrue(); + expect(nativeElement.hidden).toBeTrue(); + }); }); describe('with property attribute values', () => { @Component({ template: ` + [attr.disabled]="disabled" + [attr.selected]="selected" + [attr.hidden]="hidden"> ` }) @@ -139,6 +189,8 @@ describe('Nimble listbox option', () => { @ViewChild('listOption', { read: ElementRef }) public elementRef: ElementRef; public disabled: BooleanValueOrAttribute = null; + public selected: BooleanValueOrAttribute = null; + public hidden: BooleanValueOrAttribute = null; } let fixture: ComponentFixture; @@ -166,5 +218,27 @@ describe('Nimble listbox option', () => { expect(directive.disabled).toBeTrue(); expect(nativeElement.disabled).toBeTrue(); }); + + it('can be configured with attribute binding for selected', () => { + expect(directive.selected).toBeFalse(); + expect(nativeElement.selected).toBeFalse(); + + fixture.componentInstance.selected = ''; + fixture.detectChanges(); + + expect(directive.selected).toBeTrue(); + expect(nativeElement.selected).toBeTrue(); + }); + + it('can be configured with attribute binding for hidden', () => { + expect(directive.hidden).toBeFalse(); + expect(nativeElement.hidden).toBeFalse(); + + fixture.componentInstance.hidden = ''; + fixture.detectChanges(); + + expect(directive.hidden).toBeTrue(); + expect(nativeElement.hidden).toBeTrue(); + }); }); }); diff --git a/angular-workspace/projects/ni/nimble-angular/src/directives/select/tests/nimble-select-control-value-accessor.directive.spec.ts b/angular-workspace/projects/ni/nimble-angular/src/directives/select/tests/nimble-select-control-value-accessor.directive.spec.ts index 504d50f192..250ec6d45c 100644 --- a/angular-workspace/projects/ni/nimble-angular/src/directives/select/tests/nimble-select-control-value-accessor.directive.spec.ts +++ b/angular-workspace/projects/ni/nimble-angular/src/directives/select/tests/nimble-select-control-value-accessor.directive.spec.ts @@ -1,16 +1,12 @@ -import { Component, ElementRef, ViewChild } from '@angular/core'; +import { Component, ElementRef, Input, OnChanges, OnInit, SimpleChange, SimpleChanges, ViewChild } from '@angular/core'; import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing'; -import { FormsModule } from '@angular/forms'; +import { AbstractControl, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { SelectPageObject } from '@ni/nimble-angular/select/testing'; import { NimbleSelectModule } from '../nimble-select.module'; import { NimbleListOptionModule } from '../../list-option/nimble-list-option.module'; import { processUpdates, waitForUpdatesAsync } from '../../../testing/async-helpers'; import type { Select } from '../nimble-select.directive'; -function setSelectValue(select: Select, index: number): void { - select.dispatchEvent(new Event('click')); - select.options[index].dispatchEvent(new Event('click', { bubbles: true })); -} - describe('Nimble select control value accessor', () => { describe('when using option\'s [ngValue] binding', () => { @Component({ @@ -46,6 +42,7 @@ describe('Nimble select control value accessor', () => { let select: Select; let fixture: ComponentFixture; let testHostComponent: TestHostComponent; + let pageObject: SelectPageObject; beforeEach(() => { TestBed.configureTestingModule({ @@ -58,6 +55,7 @@ describe('Nimble select control value accessor', () => { fixture = TestBed.createComponent(TestHostComponent); testHostComponent = fixture.componentInstance; select = testHostComponent.select.nativeElement; + pageObject = new SelectPageObject(select); fixture.detectChanges(); // wait for select's 'options' property to be updated from slotted content await waitForUpdatesAsync(); @@ -81,7 +79,8 @@ describe('Nimble select control value accessor', () => { })); it('updates bound property when selected value is changed', () => { - setSelectValue(select, 2); + pageObject.clickSelect(); + pageObject.clickOption(2); fixture.detectChanges(); expect(testHostComponent.selectedOption).toBe(testHostComponent.selectOptions[2]); @@ -110,7 +109,8 @@ describe('Nimble select control value accessor', () => { it('fires ngModelChange one time with expected value', () => { const ngModelChangeSpy = spyOn(testHostComponent, 'onModelValueChange'); const indexToSelect = 2; - setSelectValue(select, indexToSelect); + pageObject.clickSelect(); + pageObject.clickOption(indexToSelect); fixture.detectChanges(); expect(ngModelChangeSpy).toHaveBeenCalledOnceWith(testHostComponent.selectOptions[indexToSelect]); }); @@ -142,6 +142,7 @@ describe('Nimble select control value accessor', () => { let select: Select; let fixture: ComponentFixture; let testHostComponent: TestHostComponent; + let pageObject: SelectPageObject; beforeEach(() => { TestBed.configureTestingModule({ @@ -154,6 +155,7 @@ describe('Nimble select control value accessor', () => { fixture = TestBed.createComponent(TestHostComponent); testHostComponent = fixture.componentInstance; select = testHostComponent.select.nativeElement; + pageObject = new SelectPageObject(select); fixture.detectChanges(); // wait for select's 'options' property to be updated from slotted content await waitForUpdatesAsync(); @@ -177,10 +179,161 @@ describe('Nimble select control value accessor', () => { })); it('updates bound property when selected value is changed', () => { - setSelectValue(select, 2); + pageObject.clickSelect(); + pageObject.clickOption(2); fixture.detectChanges(); expect(testHostComponent.selectedOption).toBe(testHostComponent.selectOptions[2].value.toString()); }); }); + + describe('dynamically added options on init', () => { + @Component({ + template: ` +
+ + + {{ option.name }} + + +
+ ` + }) + class TestHostComponent implements OnInit { + @ViewChild('select', { static: true }) public select: ElementRef; + + @Input() public selectValue?: { name: string, value: number }; + + public selectOptions: { name: string, value: number }[] = [ + { name: 'Option 1', value: 1 }, + { name: 'Option 2', value: 2 }, + { name: 'Option 3', value: 3 } + ]; + + public selectedOption = new FormControl<{ name: string, value: number } | null>(null); + + public form: FormGroup = new FormGroup({ + selectValue: this.selectedOption + }); + + public get selectValueField(): AbstractControl { + return this.form.get('selectValue')!; + } + + public ngOnChanges(changes: SimpleChanges): void { + if (changes.selectValue.currentValue !== changes.selectValue.previousValue) { + // intentionally adding option after first option for DOM order + const newValue = changes.selectValue.currentValue as { name: string, value: number }; + this.selectOptions.splice(1, 0, newValue); + this.selectValueField.setValue(newValue); + } + } + } + + let select: Select; + let fixture: ComponentFixture; + let testHostComponent: TestHostComponent; + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [TestHostComponent], + imports: [NimbleSelectModule, NimbleListOptionModule, FormsModule, ReactiveFormsModule] + }); + }); + + beforeEach(async () => { + fixture = TestBed.createComponent(TestHostComponent); + testHostComponent = fixture.componentInstance; + select = testHostComponent.select.nativeElement; + fixture.detectChanges(); + // wait for select's 'options' property to be updated from slotted content + await waitForUpdatesAsync(); + }); + + afterEach(() => { + processUpdates(); + }); + + it('can set value to option that is dynamically added from input', async () => { + const oldSelectValue = testHostComponent.selectValue; + const newValue = { name: 'Option 4', value: 4 }; + testHostComponent.selectValue = newValue; + // this will result in an option added after the first option in DOM order + testHostComponent.ngOnChanges({ selectValue: new SimpleChange(oldSelectValue, testHostComponent.selectValue, false) }); + fixture.detectChanges(); + await fixture.whenStable(); + await waitForUpdatesAsync(); + expect(select.selectedIndex).toBe(1); + }); + }); }); diff --git a/change/@ni-nimble-angular-07596cf2-5025-4bb7-8744-b44330dd560a.json b/change/@ni-nimble-angular-07596cf2-5025-4bb7-8744-b44330dd560a.json new file mode 100644 index 0000000000..da4da81800 --- /dev/null +++ b/change/@ni-nimble-angular-07596cf2-5025-4bb7-8744-b44330dd560a.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Add selected and hidden attributes to NimbleListOptionDirective. Also exporting SelectPageObject.", + "packageName": "@ni/nimble-angular", + "email": "26874831+atmgrifter00@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/@ni-nimble-components-c05b4e64-fa32-40e9-b6a1-d7680dd0dbeb.json b/change/@ni-nimble-components-c05b4e64-fa32-40e9-b6a1-d7680dd0dbeb.json new file mode 100644 index 0000000000..cd3d12647f --- /dev/null +++ b/change/@ni-nimble-components-c05b4e64-fa32-40e9-b6a1-d7680dd0dbeb.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Adding DropdownOwner interface allowing Select to register options during connectedCallback.", + "packageName": "@ni/nimble-components", + "email": "26874831+atmgrifter00@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/package-lock.json b/package-lock.json index d37a6ed19a..1da859fb7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -69,12 +69,12 @@ "ng-packagr": "^15.2.2", "playwright": "1.40.0", "rollup": "^4.12.0", - "typescript": "~4.8.2" + "typescript": "~4.9.5" } }, "angular-workspace/projects/ni/nimble-angular": { "name": "@ni/nimble-angular", - "version": "20.2.20", + "version": "20.2.21", "license": "MIT", "dependencies": { "tslib": "^2.2.0" @@ -85,7 +85,7 @@ "@angular/forms": "^15.2.10", "@angular/localize": "^15.2.10", "@angular/router": "^15.2.10", - "@ni/nimble-components": "^21.10.0" + "@ni/nimble-components": "^21.10.1" } }, "node_modules/@11ty/dependency-tree": { @@ -29982,19 +29982,6 @@ "node": ">=8" } }, - "node_modules/svg-to-ts/node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, "node_modules/svg-to-ts/node_modules/yaml": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", @@ -31066,9 +31053,9 @@ } }, "node_modules/typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -33101,7 +33088,7 @@ }, "packages/jasmine-parameterized": { "name": "@ni/jasmine-parameterized", - "version": "0.2.2", + "version": "0.2.3", "license": "MIT", "devDependencies": { "@ni/eslint-config-javascript": "^4.2.0", @@ -33114,12 +33101,12 @@ "karma-jasmine-html-reporter": "^2.0.0", "karma-spec-reporter": "^0.0.36", "playwright": "1.40.0", - "typescript": "~4.8.2" + "typescript": "~4.9.5" } }, "packages/nimble-blazor": { "name": "@ni/nimble-blazor", - "version": "14.3.18", + "version": "14.3.19", "hasInstallScript": true, "license": "MIT", "devDependencies": { @@ -33155,14 +33142,14 @@ }, "packages/nimble-components": { "name": "@ni/nimble-components", - "version": "21.10.0", + "version": "21.10.1", "license": "MIT", "dependencies": { "@microsoft/fast-colors": "^5.3.1", "@microsoft/fast-element": "^1.12.0", "@microsoft/fast-foundation": "2.49.4", "@microsoft/fast-web-utilities": "^6.0.0", - "@ni/nimble-tokens": "^6.12.0", + "@ni/nimble-tokens": "^6.12.1", "@tanstack/table-core": "^8.10.7", "@tanstack/virtual-core": "^3.0.0-beta.68", "@tiptap/core": "^2.2.2", @@ -33203,7 +33190,7 @@ "@microsoft/fast-react-wrapper": "0.3.22", "@ni/eslint-config-javascript": "^4.2.0", "@ni/eslint-config-typescript": "^4.2.0", - "@ni/jasmine-parameterized": "^0.2.2", + "@ni/jasmine-parameterized": "^0.2.3", "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-node-resolve": "^15.0.1", @@ -33257,7 +33244,7 @@ "storybook": "^8.0.0", "terser-webpack-plugin": "^5.3.10", "ts-loader": "^9.2.5", - "typescript": "~4.8.2", + "typescript": "~4.9.5", "webpack": "^5.75.0", "webpack-cli": "^5.0.1", "webpack-dev-middleware": "^7.0.0" @@ -33268,7 +33255,7 @@ }, "packages/nimble-tokens": { "name": "@ni/nimble-tokens", - "version": "6.12.0", + "version": "6.12.1", "license": "MIT", "devDependencies": { "@microsoft/fast-colors": "^5.3.1", @@ -33281,7 +33268,7 @@ "style-dictionary": "^3.9.2", "svg-to-ts": "^12.0.0", "to-ico": "^1.1.5", - "typescript": "~4.8.2" + "typescript": "~4.9.5" } }, "packages/nimble-tokens/node_modules/rimraf": { @@ -33310,7 +33297,7 @@ }, "devDependencies": { "@lhci/cli": "^0.13.0", - "typescript": "~4.8.2", + "typescript": "~4.9.5", "vite": "^5.1.5" } }, @@ -33322,13 +33309,13 @@ }, "devDependencies": { "@11ty/eleventy": "^2.0.1", - "typescript": "~4.8.2", + "typescript": "~4.9.5", "vite": "^5.1.5" } }, "packages/xliff-to-json-converter": { "name": "@ni/xliff-to-json-converter", - "version": "1.1.4", + "version": "1.1.5", "license": "MIT", "dependencies": { "xliff": "^6.1.0", @@ -33344,7 +33331,7 @@ "@types/yargs": "^17.0.10", "jasmine": "^5.1.0", "jasmine-core": "^5.1.2", - "typescript": "~4.8.2" + "typescript": "~4.9.5" } } } diff --git a/packages/jasmine-parameterized/CHANGELOG.json b/packages/jasmine-parameterized/CHANGELOG.json index 4a201f3b64..62aadb0a18 100644 --- a/packages/jasmine-parameterized/CHANGELOG.json +++ b/packages/jasmine-parameterized/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@ni/jasmine-parameterized", "entries": [ + { + "date": "Tue, 12 Mar 2024 21:01:53 GMT", + "version": "0.2.3", + "tag": "@ni/jasmine-parameterized_v0.2.3", + "comments": { + "patch": [ + { + "author": "7282195+m-akinc@users.noreply.github.com", + "package": "@ni/jasmine-parameterized", + "commit": "bc825e1b057eafd8bc005d11e9a224aa9aee9619", + "comment": "Update typescript to 4.9.5" + } + ] + } + }, { "date": "Wed, 06 Mar 2024 17:56:10 GMT", "version": "0.2.2", diff --git a/packages/jasmine-parameterized/CHANGELOG.md b/packages/jasmine-parameterized/CHANGELOG.md index aed76ed891..27207158d3 100644 --- a/packages/jasmine-parameterized/CHANGELOG.md +++ b/packages/jasmine-parameterized/CHANGELOG.md @@ -1,9 +1,17 @@ # Change Log - @ni/jasmine-parameterized -This log was last generated on Wed, 21 Feb 2024 19:48:20 GMT and should not be manually modified. +This log was last generated on Tue, 12 Mar 2024 21:01:53 GMT and should not be manually modified. +## 0.2.3 + +Tue, 12 Mar 2024 21:01:53 GMT + +### Patches + +- Update typescript to 4.9.5 ([ni/nimble@bc825e1](https://github.com/ni/nimble/commit/bc825e1b057eafd8bc005d11e9a224aa9aee9619)) + ## 0.2.2 Wed, 21 Feb 2024 19:48:20 GMT diff --git a/packages/jasmine-parameterized/package.json b/packages/jasmine-parameterized/package.json index 77b981e9d0..5683dbbc83 100644 --- a/packages/jasmine-parameterized/package.json +++ b/packages/jasmine-parameterized/package.json @@ -1,6 +1,6 @@ { "name": "@ni/jasmine-parameterized", - "version": "0.2.2", + "version": "0.2.3", "description": "A utility to write parameterized jasmine tests", "keywords": [ "jasmine", @@ -52,6 +52,6 @@ "karma-jasmine-html-reporter": "^2.0.0", "karma-spec-reporter": "^0.0.36", "playwright": "1.40.0", - "typescript": "~4.8.2" + "typescript": "~4.9.5" } } diff --git a/packages/nimble-blazor/package.json b/packages/nimble-blazor/package.json index 4668f5b82b..5e850a6162 100644 --- a/packages/nimble-blazor/package.json +++ b/packages/nimble-blazor/package.json @@ -1,6 +1,6 @@ { "name": "@ni/nimble-blazor", - "version": "14.3.18", + "version": "14.3.19", "description": "Blazor components for the NI Nimble Design System", "scripts": { "postinstall": "node build/generate-playwright-version-properties/source/index.js", diff --git a/packages/nimble-components/CHANGELOG.json b/packages/nimble-components/CHANGELOG.json index 77b5b74e4e..8ad012ae84 100644 --- a/packages/nimble-components/CHANGELOG.json +++ b/packages/nimble-components/CHANGELOG.json @@ -1,6 +1,33 @@ { "name": "@ni/nimble-components", "entries": [ + { + "date": "Tue, 12 Mar 2024 21:01:54 GMT", + "version": "21.10.1", + "tag": "@ni/nimble-components_v21.10.1", + "comments": { + "patch": [ + { + "author": "7282195+m-akinc@users.noreply.github.com", + "package": "@ni/nimble-components", + "commit": "bc825e1b057eafd8bc005d11e9a224aa9aee9619", + "comment": "Update typescript to 4.9.5" + }, + { + "author": "beachball", + "package": "@ni/nimble-components", + "comment": "Bump @ni/nimble-tokens to v6.12.1", + "commit": "not available" + }, + { + "author": "beachball", + "package": "@ni/nimble-components", + "comment": "Bump @ni/jasmine-parameterized to v0.2.3", + "commit": "not available" + } + ] + } + }, { "date": "Tue, 12 Mar 2024 20:17:37 GMT", "version": "21.10.0", diff --git a/packages/nimble-components/CHANGELOG.md b/packages/nimble-components/CHANGELOG.md index 7909968930..27915db2fa 100644 --- a/packages/nimble-components/CHANGELOG.md +++ b/packages/nimble-components/CHANGELOG.md @@ -1,9 +1,19 @@ # Change Log - @ni/nimble-components -This log was last generated on Thu, 07 Mar 2024 21:20:52 GMT and should not be manually modified. +This log was last generated on Tue, 12 Mar 2024 21:01:54 GMT and should not be manually modified. +## 21.10.1 + +Tue, 12 Mar 2024 21:01:54 GMT + +### Patches + +- Update typescript to 4.9.5 ([ni/nimble@bc825e1](https://github.com/ni/nimble/commit/bc825e1b057eafd8bc005d11e9a224aa9aee9619)) +- Bump @ni/nimble-tokens to v6.12.1 +- Bump @ni/jasmine-parameterized to v0.2.3 + ## 21.10.0 Thu, 07 Mar 2024 21:20:52 GMT diff --git a/packages/nimble-components/package.json b/packages/nimble-components/package.json index 1df09153b4..cbe5192887 100644 --- a/packages/nimble-components/package.json +++ b/packages/nimble-components/package.json @@ -1,6 +1,6 @@ { "name": "@ni/nimble-components", - "version": "21.10.0", + "version": "21.10.1", "description": "Styled web components for the NI Nimble Design System", "scripts": { "build": "npm run generate-icons && npm run generate-workers && npm run build-components && npm run bundle-components && npm run generate-scss && npm run build-storybook", @@ -68,7 +68,7 @@ "@microsoft/fast-element": "^1.12.0", "@microsoft/fast-foundation": "2.49.4", "@microsoft/fast-web-utilities": "^6.0.0", - "@ni/nimble-tokens": "^6.12.0", + "@ni/nimble-tokens": "^6.12.1", "@tanstack/table-core": "^8.10.7", "@tanstack/virtual-core": "^3.0.0-beta.68", "@tiptap/core": "^2.2.2", @@ -112,7 +112,7 @@ "@microsoft/fast-react-wrapper": "0.3.22", "@ni/eslint-config-javascript": "^4.2.0", "@ni/eslint-config-typescript": "^4.2.0", - "@ni/jasmine-parameterized": "^0.2.2", + "@ni/jasmine-parameterized": "^0.2.3", "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-node-resolve": "^15.0.1", @@ -166,7 +166,7 @@ "storybook": "^8.0.0", "terser-webpack-plugin": "^5.3.10", "ts-loader": "^9.2.5", - "typescript": "~4.8.2", + "typescript": "~4.9.5", "webpack": "^5.75.0", "webpack-cli": "^5.0.1", "webpack-dev-middleware": "^7.0.0" diff --git a/packages/nimble-components/src/combobox/index.ts b/packages/nimble-components/src/combobox/index.ts index e3da226ded..4f607c5439 100644 --- a/packages/nimble-components/src/combobox/index.ts +++ b/packages/nimble-components/src/combobox/index.ts @@ -17,10 +17,14 @@ import { iconExclamationMarkTag } from '../icons/exclamation-mark'; import { styles } from './styles'; import type { ErrorPattern } from '../patterns/error/types'; -import type { DropdownPattern } from '../patterns/dropdown/types'; +import type { + DropdownPattern, + ListOptionOwner +} from '../patterns/dropdown/types'; import { DropdownAppearance } from '../patterns/dropdown/types'; import type { AnchoredRegion } from '../anchored-region'; import { template } from './template'; +import type { ListOption } from '../list-option'; declare global { interface HTMLElementTagNameMap { @@ -33,7 +37,7 @@ declare global { */ export class Combobox extends FoundationCombobox - implements DropdownPattern, ErrorPattern { + implements DropdownPattern, ErrorPattern, ListOptionOwner { @attr public appearance: DropdownAppearance = DropdownAppearance.underline; @@ -207,6 +211,23 @@ export class Combobox return returnValue; } + /** + * @internal + */ + public registerOption(option: ListOption): void { + if (this.options.includes(option)) { + return; + } + + // Adding an option to the end, ultimately, isn't the correct + // thing to do, as this will mean the option's index in the options, + // at least temporarily, does not match the DOM order. However, it + // is expected that a successive run of `slottedOptionsChanged` will + // correct this order issue. See 'https://github.com/ni/nimble/issues/1915' + // for more info. + this.options.push(option); + } + protected override focusAndScrollOptionIntoView(): void { if (this.open) { super.focusAndScrollOptionIntoView(); diff --git a/packages/nimble-components/src/combobox/tests/combobox.spec.ts b/packages/nimble-components/src/combobox/tests/combobox.spec.ts index 242d147c33..7b282bd515 100644 --- a/packages/nimble-components/src/combobox/tests/combobox.spec.ts +++ b/packages/nimble-components/src/combobox/tests/combobox.spec.ts @@ -2,7 +2,6 @@ import { html, repeat } from '@microsoft/fast-element'; import { keyArrowDown, keyEnter } from '@microsoft/fast-web-utilities'; import { fixture, Fixture } from '../../utilities/tests/fixture'; import { Combobox, comboboxTag } from '..'; -import { listOptionTag } from '../../list-option'; import { ComboboxAutocomplete } from '../types'; import { waitForUpdatesAsync } from '../../testing/async-helpers'; import { @@ -10,6 +9,7 @@ import { waitAnimationFrame } from '../../utilities/tests/component'; import { checkFullyInViewport } from '../../utilities/tests/intersection-observer'; +import { ListOption, listOptionTag } from '../../list-option'; async function setup( position?: string, @@ -127,6 +127,33 @@ describe('Combobox', () => { await disconnect(); }); + it('option added directly to DOM synchronously registers with Combobox', async () => { + const { element, connect, disconnect } = await setup(); + await connect(); + element.selectedIndex = 0; + await waitForUpdatesAsync(); + const newOption = new ListOption('foo', 'foo'); + const registerOptionSpy = spyOn( + element, + 'registerOption' + ).and.callThrough(); + registerOptionSpy.calls.reset(); + element.insertBefore(newOption, element.options[0]!); + + expect(registerOptionSpy.calls.count()).toBe(1); + expect(element.options).toContain(newOption); + + // While the option is registered synchronously as shown above, + // properties like selectedIndex will only be correct asynchronously + // See https://github.com/ni/nimble/issues/1915 + expect(element.selectedIndex).toBe(0); + await waitForUpdatesAsync(); + // This assertion shows that after 'slottedOptionsChanged' runs, the + // 'selectedIndex' state has been corrected to expected DOM order. + expect(element.selectedIndex).toBe(1); + await disconnect(); + }); + const ariaTestData: { attrName: string, propSetter: (x: Combobox, value: string) => void diff --git a/packages/nimble-components/src/list-option/index.ts b/packages/nimble-components/src/list-option/index.ts index 724e564514..6f60d343e2 100644 --- a/packages/nimble-components/src/list-option/index.ts +++ b/packages/nimble-components/src/list-option/index.ts @@ -5,6 +5,7 @@ import { import { observable, attr } from '@microsoft/fast-element'; import { styles } from './styles'; import { template } from './template'; +import type { ListOptionOwner } from '../patterns/dropdown/types'; declare global { interface HTMLElementTagNameMap { @@ -51,6 +52,23 @@ export class ListOption extends FoundationListboxOption { .map(node => node.textContent?.trim()) .join(' '); } + + public override connectedCallback(): void { + super.connectedCallback(); + if (this.isListOptionOwner(this.parentElement)) { + this.parentElement.registerOption(this); + } + } + + private isListOptionOwner( + parent: HTMLElement | null + ): parent is ListOptionOwner { + if (!parent) { + return false; + } + + return typeof (parent as ListOptionOwner).registerOption === 'function'; + } } const nimbleListOption = ListOption.compose({ diff --git a/packages/nimble-components/src/patterns/dropdown/types.ts b/packages/nimble-components/src/patterns/dropdown/types.ts index 7cebcb4e7d..3e1178b895 100644 --- a/packages/nimble-components/src/patterns/dropdown/types.ts +++ b/packages/nimble-components/src/patterns/dropdown/types.ts @@ -1,3 +1,4 @@ +import type { ListOption } from '../../list-option'; import type { ErrorPattern } from '../error/types'; /** @@ -22,3 +23,17 @@ export const DropdownAppearance = { } as const; export type DropdownAppearance = (typeof DropdownAppearance)[keyof typeof DropdownAppearance]; + +/** + * @internal + * + * This interface is used to register options with their parent once their + * 'connectedCallback' method is run. This allows for the "owner", like the + * Select, to have its value set to that newly registered option earlier than it + * might otherwise in certain situations. One such scenario is in an Angular + * reactive form, where the form value is set to an option immediately after + * dynamically adding it. + */ +export interface ListOptionOwner extends HTMLElement { + registerOption: (option: ListOption) => void; +} diff --git a/packages/nimble-components/src/select/index.ts b/packages/nimble-components/src/select/index.ts index 5370b1f06f..5cd9a29f4b 100644 --- a/packages/nimble-components/src/select/index.ts +++ b/packages/nimble-components/src/select/index.ts @@ -30,7 +30,10 @@ import { } from '@microsoft/fast-web-utilities'; import { arrowExpanderDown16X16 } from '@ni/nimble-tokens/dist/icons/js'; import { styles } from './styles'; -import { DropdownAppearance } from '../patterns/dropdown/types'; +import { + DropdownAppearance, + ListOptionOwner +} from '../patterns/dropdown/types'; import { errorTextTemplate } from '../patterns/error/template'; import type { ErrorPattern } from '../patterns/error/types'; import { iconExclamationMarkTag } from '../icons/exclamation-mark'; @@ -57,7 +60,9 @@ const isNimbleListOption = (el: Element): el is ListOption => { /** * A nimble-styled HTML select. */ -export class Select extends FormAssociatedSelect implements ErrorPattern { +export class Select + extends FormAssociatedSelect + implements ErrorPattern, ListOptionOwner { @attr public appearance: DropdownAppearance = DropdownAppearance.underline; @@ -668,6 +673,23 @@ export class Select extends FormAssociatedSelect implements ErrorPattern { } } + /** + * @internal + */ + public registerOption(option: ListOption): void { + if (this.options.includes(option)) { + return; + } + + // Adding an option to the end, ultimately, isn't the correct + // thing to do, as this will mean the option's index in the options, + // at least temporarily, does not match the DOM order. However, it + // is expected that a successive run of `slottedOptionsChanged` will + // correct this order issue. See 'https://github.com/ni/nimble/issues/1915' + // for more info. + this.options.push(option); + } + // Prevents parent classes from resetting selectedIndex to a positive // value while filtering, which can result in a disabled option being // selected. diff --git a/packages/nimble-components/src/select/testing/select.pageobject.ts b/packages/nimble-components/src/select/testing/select.pageobject.ts index c8a5d236f0..4ea4cda6db 100644 --- a/packages/nimble-components/src/select/testing/select.pageobject.ts +++ b/packages/nimble-components/src/select/testing/select.pageobject.ts @@ -23,7 +23,7 @@ export class SelectPageObject { 'Can not set filter text with filterMode set to "none".' ); } - await this.clickSelect(); + this.clickSelect(); const filterInput = this.getFilterInput(); if (filterInput) { filterInput.value = filterText; @@ -59,9 +59,8 @@ export class SelectPageObject { /** * Either opens or closes the dropdown depending on its current state */ - public async clickSelect(): Promise { + public clickSelect(): void { this.selectElement.click(); - await waitForUpdatesAsync(); } public clickSelectedItem(): void { @@ -96,11 +95,9 @@ export class SelectPageObject { * Click the option with the text provided by the 'displayText' parameter. * @param value The text of the option to be selected */ - public async clickOptionWithDisplayText( - displayText: string - ): Promise { + public clickOptionWithDisplayText(displayText: string): void { if (!this.selectElement.open) { - await this.clickSelect(); + this.clickSelect(); } const optionIndex = this.selectElement.options.findIndex( o => o.text === displayText diff --git a/packages/nimble-components/src/select/tests/select.spec.ts b/packages/nimble-components/src/select/tests/select.spec.ts index e754dbe5cb..5b58069bf4 100644 --- a/packages/nimble-components/src/select/tests/select.spec.ts +++ b/packages/nimble-components/src/select/tests/select.spec.ts @@ -168,7 +168,7 @@ describe('Select', () => { const { element, connect, disconnect } = await setup(); await connect(); const pageObject = new SelectPageObject(element); - await pageObject.clickSelect(); + await clickAndWaitForOpen(element); expect(pageObject.isDropdownVisible()).toBeTrue(); expect(pageObject.isFilterInputVisible()).toBeFalse(); @@ -179,7 +179,7 @@ describe('Select', () => { const { element, connect, disconnect } = await setup(); await connect(); const pageObject = new SelectPageObject(element); - await pageObject.clickSelect(); + pageObject.clickSelect(); pageObject.pressArrowDownKey(); await waitForUpdatesAsync(); expect(element.selectedIndex).toBe(1); @@ -195,7 +195,7 @@ describe('Select', () => { const { element, connect, disconnect } = await setup(); await connect(); const pageObject = new SelectPageObject(element); - await pageObject.clickSelect(); + pageObject.clickSelect(); pageObject.pressArrowDownKey(); await waitForUpdatesAsync(); @@ -207,7 +207,7 @@ describe('Select', () => { const { element, connect, disconnect } = await setup(); await connect(); const pageObject = new SelectPageObject(element); - await pageObject.clickSelect(); + pageObject.clickSelect(); pageObject.pressArrowDownKey(); await pageObject.pressSpaceKey(); expect(element.value).toBe('two'); @@ -294,6 +294,33 @@ describe('Select', () => { await disconnect(); }); + it('option added directly to DOM synchronously registers with Select', async () => { + const { element, connect, disconnect } = await setup(); + await connect(); + await waitForUpdatesAsync(); + const newOption = new ListOption('foo', 'foo'); + const registerOptionSpy = spyOn( + element, + 'registerOption' + ).and.callThrough(); + registerOptionSpy.calls.reset(); + element.insertBefore(newOption, element.options[0]!); + + expect(registerOptionSpy.calls.count()).toBe(1); + expect(element.options).toContain(newOption); + + // While the option is registered synchronously as shown above, + // properties like selectedIndex will only be correct asynchronously + // See https://github.com/ni/nimble/issues/1915 + expect(element.selectedIndex).toBe(0); + await waitForUpdatesAsync(); + expect(element.value).toBe('one'); + // This assertion shows that after 'slottedOptionsChanged' runs, the + // 'selectedIndex' state has been corrected to expected DOM order. + expect(element.selectedIndex).toBe(1); + await disconnect(); + }); + describe('with 500 options', () => { async function setup500Options(): Promise> { // prettier-ignore @@ -482,25 +509,25 @@ describe('Select', () => { expect(element.open).toBeTrue(); }); - it('after pressing to close dropdown, will re-open dropdown', async () => { + it('after pressing to close dropdown, will re-open dropdown', () => { element.filterMode = testData.filter; - await pageObject.clickSelect(); + pageObject.clickSelect(); pageObject.pressEscapeKey(); expect(element.open).toBeFalse(); pageObject.pressEnterKey(); expect(element.open).toBeTrue(); }); - it('after closing dropdown by pressing , activeElement is Select element', async () => { + it('after closing dropdown by pressing , activeElement is Select element', () => { element.filterMode = testData.filter; - await pageObject.clickSelect(); + pageObject.clickSelect(); pageObject.pressEscapeKey(); expect(document.activeElement).toBe(element); }); - it('after closing dropdown by committing a value with , activeElement is Select element', async () => { + it('after closing dropdown by committing a value with , activeElement is Select element', () => { element.filterMode = testData.filter; - await pageObject.clickSelect(); + pageObject.clickSelect(); pageObject.pressArrowDownKey(); pageObject.pressEnterKey(); expect(document.activeElement).toBe(element); @@ -571,7 +598,7 @@ describe('Select', () => { expect(currentSelection?.text).toBe('Two'); pageObject.pressEscapeKey(); - await pageObject.clickSelect(); + pageObject.clickSelect(); currentSelection = pageObject.getSelectedOption(); expect(currentSelection?.text).toBe('One'); }); @@ -584,7 +611,7 @@ describe('Select', () => { await pageObject.openAndSetFilterText('One'); // Matches 'One' pageObject.pressEnterKey(); - await pageObject.clickSelect(); + pageObject.clickSelect(); currentSelection = pageObject.getSelectedOption(); expect(currentSelection?.selected).toBeTrue(); }); @@ -641,10 +668,8 @@ describe('Select', () => { }); it('pressing after dropdown is open will enter " " as filter text and keep dropdown open', async () => { - await pageObject.clickSelect(); - await waitForUpdatesAsync(); + pageObject.clickSelect(); await pageObject.pressSpaceKey(); - await waitForUpdatesAsync(); expect(element.open).toBeTrue(); expect(pageObject.getFilterInputText()).toBe(' '); }); @@ -652,7 +677,7 @@ describe('Select', () => { it('opening dropdown after applying filter previously starts with empty filter', async () => { await pageObject.openAndSetFilterText('T'); // Matches 'Two' and 'Three' await pageObject.closeDropdown(); - await pageObject.clickSelect(); + pageObject.clickSelect(); expect(pageObject.getFilterInputText()).toBe(''); expect(pageObject.getFilteredOptions().length).toBe(6); @@ -669,7 +694,7 @@ describe('Select', () => { }); it('opening dropdown with no filter does not display "not items found" element', async () => { - await pageObject.clickSelect(); + await clickAndWaitForOpen(element); expect(pageObject.isNoResultsLabelVisible()).toBeFalse(); }); @@ -723,7 +748,7 @@ describe('Select', () => { }); it('clicking in filter input after dropdown is open, does not close dropdown', async () => { - await pageObject.clickSelect(); + await clickAndWaitForOpen(element); await pageObject.clickFilterInput(); expect(element.open).toBeTrue(); }); @@ -736,7 +761,7 @@ describe('Select', () => { }); it('filter input "aria-controls" and "aria-activedescendant" attributes are set to element state', async () => { - await pageObject.clickSelect(); + await clickAndWaitForOpen(element); const filterInput = element.shadowRoot?.querySelector('.filter-input'); expect(filterInput?.getAttribute('aria-controls')).toBe( element.ariaControls @@ -821,10 +846,9 @@ describe('Select', () => { await disconnect(); }); - it('exercise clickOptionWithDisplayText', async () => { - await pageObject.clickSelect(); - await waitForUpdatesAsync(); - await pageObject.clickOptionWithDisplayText('Two'); + it('exercise clickOptionWithDisplayText', () => { + pageObject.clickSelect(); + pageObject.clickOptionWithDisplayText('Two'); expect(element.value).toBe('two'); expect(element.selectedIndex).toBe(1); }); diff --git a/packages/nimble-tokens/CHANGELOG.json b/packages/nimble-tokens/CHANGELOG.json index b9caa9a88d..4b32d99095 100644 --- a/packages/nimble-tokens/CHANGELOG.json +++ b/packages/nimble-tokens/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@ni/nimble-tokens", "entries": [ + { + "date": "Tue, 12 Mar 2024 21:01:54 GMT", + "version": "6.12.1", + "tag": "@ni/nimble-tokens_v6.12.1", + "comments": { + "patch": [ + { + "author": "7282195+m-akinc@users.noreply.github.com", + "package": "@ni/nimble-tokens", + "commit": "bc825e1b057eafd8bc005d11e9a224aa9aee9619", + "comment": "Update typescript to 4.9.5" + } + ] + } + }, { "date": "Wed, 06 Mar 2024 17:56:10 GMT", "version": "6.12.0", diff --git a/packages/nimble-tokens/CHANGELOG.md b/packages/nimble-tokens/CHANGELOG.md index fbb4e1919e..1640ba454b 100644 --- a/packages/nimble-tokens/CHANGELOG.md +++ b/packages/nimble-tokens/CHANGELOG.md @@ -1,9 +1,17 @@ # Change Log - @ni/nimble-tokens -This log was last generated on Wed, 28 Feb 2024 19:35:04 GMT and should not be manually modified. +This log was last generated on Tue, 12 Mar 2024 21:01:54 GMT and should not be manually modified. +## 6.12.1 + +Tue, 12 Mar 2024 21:01:54 GMT + +### Patches + +- Update typescript to 4.9.5 ([ni/nimble@bc825e1](https://github.com/ni/nimble/commit/bc825e1b057eafd8bc005d11e9a224aa9aee9619)) + ## 6.12.0 Wed, 28 Feb 2024 19:35:04 GMT diff --git a/packages/nimble-tokens/package.json b/packages/nimble-tokens/package.json index 7d6d61c119..c44fcb3619 100644 --- a/packages/nimble-tokens/package.json +++ b/packages/nimble-tokens/package.json @@ -1,6 +1,6 @@ { "name": "@ni/nimble-tokens", - "version": "6.12.0", + "version": "6.12.1", "description": "Design tokens for the NI Nimble Design System", "scripts": { "build": "npm run build:svg-to-ts && npm run build:ts && npm run build:svg-to-ico && npm run build:generate-font-scss && npm run build:style-dictionary", @@ -46,7 +46,7 @@ "style-dictionary": "^3.9.2", "svg-to-ts": "^12.0.0", "to-ico": "^1.1.5", - "typescript": "~4.8.2" + "typescript": "~4.9.5" }, "files": [ "dist/styledictionary/css/**", diff --git a/packages/performance/package.json b/packages/performance/package.json index 56c255a00b..b8041f3be2 100644 --- a/packages/performance/package.json +++ b/packages/performance/package.json @@ -15,7 +15,7 @@ }, "devDependencies": { "@lhci/cli": "^0.13.0", - "typescript": "~4.8.2", + "typescript": "~4.9.5", "vite": "^5.1.5" }, "files": [ diff --git a/packages/site/package.json b/packages/site/package.json index 8788e7c94f..9f443eac51 100644 --- a/packages/site/package.json +++ b/packages/site/package.json @@ -17,7 +17,7 @@ }, "devDependencies": { "@11ty/eleventy": "^2.0.1", - "typescript": "~4.8.2", + "typescript": "~4.9.5", "vite": "^5.1.5" }, "files": [ diff --git a/packages/xliff-to-json-converter/CHANGELOG.json b/packages/xliff-to-json-converter/CHANGELOG.json index 7f91727566..005266fb38 100644 --- a/packages/xliff-to-json-converter/CHANGELOG.json +++ b/packages/xliff-to-json-converter/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@ni/xliff-to-json-converter", "entries": [ + { + "date": "Tue, 12 Mar 2024 21:01:54 GMT", + "version": "1.1.5", + "tag": "@ni/xliff-to-json-converter_v1.1.5", + "comments": { + "patch": [ + { + "author": "7282195+m-akinc@users.noreply.github.com", + "package": "@ni/xliff-to-json-converter", + "commit": "bc825e1b057eafd8bc005d11e9a224aa9aee9619", + "comment": "Update typescript to 4.9.5" + } + ] + } + }, { "date": "Wed, 06 Mar 2024 17:56:10 GMT", "version": "1.1.4", diff --git a/packages/xliff-to-json-converter/CHANGELOG.md b/packages/xliff-to-json-converter/CHANGELOG.md index cbf7b1de84..6d24ded3ae 100644 --- a/packages/xliff-to-json-converter/CHANGELOG.md +++ b/packages/xliff-to-json-converter/CHANGELOG.md @@ -1,9 +1,17 @@ # Change Log - @ni/xliff-to-json-converter -This log was last generated on Thu, 22 Feb 2024 13:39:47 GMT and should not be manually modified. +This log was last generated on Tue, 12 Mar 2024 21:01:54 GMT and should not be manually modified. +## 1.1.5 + +Tue, 12 Mar 2024 21:01:54 GMT + +### Patches + +- Update typescript to 4.9.5 ([ni/nimble@bc825e1](https://github.com/ni/nimble/commit/bc825e1b057eafd8bc005d11e9a224aa9aee9619)) + ## 1.1.4 Thu, 22 Feb 2024 13:39:47 GMT diff --git a/packages/xliff-to-json-converter/package.json b/packages/xliff-to-json-converter/package.json index 2213e87371..565897f7a8 100644 --- a/packages/xliff-to-json-converter/package.json +++ b/packages/xliff-to-json-converter/package.json @@ -1,6 +1,6 @@ { "name": "@ni/xliff-to-json-converter", - "version": "1.1.4", + "version": "1.1.5", "description": "A utility to convert translation files from XLIFF to JSON for Angular localization", "main": "dist/commonjs/cli.js", "bin": { @@ -34,7 +34,7 @@ "@types/yargs": "^17.0.10", "jasmine": "^5.1.0", "jasmine-core": "^5.1.2", - "typescript": "~4.8.2" + "typescript": "~4.9.5" }, "dependencies": { "xliff": "^6.1.0",