`
>
${when(x => x.severity === BannerSeverity.error, html`
- <${iconExclamationMarkTag} role="img" aria-label="${x => errorIconLabel.getValueFor(x)}">${iconExclamationMarkTag}>
+ <${iconExclamationMarkTag} role="img" aria-label="${x => popupIconErrorLabel.getValueFor(x)}">${iconExclamationMarkTag}>
`)}
${when(x => x.severity === BannerSeverity.warning, html`
- <${iconTriangleFilledTag} role="img" aria-label="${x => warningIconLabel.getValueFor(x)}">${iconTriangleFilledTag}>
+ <${iconTriangleFilledTag} role="img" aria-label="${x => popupIconWarningLabel.getValueFor(x)}">${iconTriangleFilledTag}>
`)}
${when(x => x.severity === BannerSeverity.information, html`
- <${iconInfoTag} role="img" aria-label="${x => informationIconLabel.getValueFor(x)}">${iconInfoTag}>
+ <${iconInfoTag} role="img" aria-label="${x => popupIconInformationLabel.getValueFor(x)}">${iconInfoTag}>
`)}
diff --git a/packages/nimble-components/src/breadcrumb-item/styles.ts b/packages/nimble-components/src/breadcrumb-item/styles.ts
index f65b78859d..091265edf3 100644
--- a/packages/nimble-components/src/breadcrumb-item/styles.ts
+++ b/packages/nimble-components/src/breadcrumb-item/styles.ts
@@ -61,6 +61,10 @@ export const styles = css`
display: none;
}
+ .content {
+ pointer-events: none;
+ }
+
[part='end'] {
display: none;
}
diff --git a/packages/nimble-components/src/card/tests/card.mdx b/packages/nimble-components/src/card/tests/card.mdx
index 4113b8eb7d..a5c8085597 100644
--- a/packages/nimble-components/src/card/tests/card.mdx
+++ b/packages/nimble-components/src/card/tests/card.mdx
@@ -6,8 +6,8 @@ import * as cardStories from './card.stories';
-The is a container that is designed to contain arbitrary content that is specified by a client
-application. The is intended for grouping related content.
+The is a container that is designed to contain arbitrary content that is specified by a client
+application. The is intended for grouping related content.
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.mdx b/packages/nimble-components/src/combobox/tests/combobox.mdx
index 254ea40c8e..0870896932 100644
--- a/packages/nimble-components/src/combobox/tests/combobox.mdx
+++ b/packages/nimble-components/src/combobox/tests/combobox.mdx
@@ -19,11 +19,11 @@ import { listOptionTag } from '../../list-option/';
### Native element and Blazor
-The value of the combobox comes from the text content of the selected autocomplete , or, if no matching autocomplete is found, the value is the user-entered text.
+The value of the combobox comes from the text content of the selected autocomplete , or, if no matching autocomplete is found, the value is the user-entered text.
### Angular
-In Angular, an autocomplete can be created with an `ngValue`. In that case the `ngModel` of the combobox will be the `ngValue` of the matched autocomplete option.
+In Angular, an autocomplete can be created with an `ngValue`. In that case the `ngModel` of the combobox will be the `ngValue` of the matched autocomplete option.
If no matching autocomplete option is found, the `ngModel` of the combobox will be set to `OPTION_NOT_FOUND`, and if the application needs to access the user-entered text, that should be done
through the `value` property on the `NimbleComboboxDirective`.
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/label-provider/core/index.ts b/packages/nimble-components/src/label-provider/core/index.ts
index f7c901dc12..b0a872a5e7 100644
--- a/packages/nimble-components/src/label-provider/core/index.ts
+++ b/packages/nimble-components/src/label-provider/core/index.ts
@@ -5,9 +5,9 @@ import {
popupDismissLabel,
numericDecrementLabel,
numericIncrementLabel,
- errorIconLabel,
- warningIconLabel,
- informationIconLabel,
+ popupIconErrorLabel,
+ popupIconWarningLabel,
+ popupIconInformationLabel,
filterSearchLabel,
filterNoResultsLabel
} from './label-tokens';
@@ -22,9 +22,9 @@ const supportedLabels = {
popupDismiss: popupDismissLabel,
numericDecrement: numericDecrementLabel,
numericIncrement: numericIncrementLabel,
- errorIcon: errorIconLabel,
- warningIcon: warningIconLabel,
- informationIcon: informationIconLabel,
+ popupIconError: popupIconErrorLabel,
+ popupIconWarning: popupIconWarningLabel,
+ popupIconInformation: popupIconInformationLabel,
filterSearch: filterSearchLabel,
filterNoResults: filterNoResultsLabel
} as const;
@@ -44,14 +44,14 @@ export class LabelProviderCore
@attr({ attribute: 'numeric-increment' })
public numericIncrement: string | undefined;
- @attr({ attribute: 'error-icon' })
- public errorIcon: string | undefined;
+ @attr({ attribute: 'popup-icon-error' })
+ public popupIconError: string | undefined;
- @attr({ attribute: 'warning-icon' })
- public warningIcon: string | undefined;
+ @attr({ attribute: 'popup-icon-warning' })
+ public popupIconWarning: string | undefined;
- @attr({ attribute: 'information-icon' })
- public informationIcon: string | undefined;
+ @attr({ attribute: 'popup-icon-information' })
+ public popupIconInformation: string | undefined;
@attr({ attribute: 'filter-search' })
public filterSearch: string | undefined;
diff --git a/packages/nimble-components/src/label-provider/core/label-token-defaults.ts b/packages/nimble-components/src/label-provider/core/label-token-defaults.ts
index 91ed6e5993..b555c28f27 100644
--- a/packages/nimble-components/src/label-provider/core/label-token-defaults.ts
+++ b/packages/nimble-components/src/label-provider/core/label-token-defaults.ts
@@ -6,9 +6,9 @@ export const coreLabelDefaults: { readonly [key in TokenName]: string } = {
popupDismissLabel: 'Close',
numericIncrementLabel: 'Increment',
numericDecrementLabel: 'Decrement',
- errorIconLabel: 'Error',
- warningIconLabel: 'Warning',
- informationIconLabel: 'Information',
+ popupIconErrorLabel: 'Error',
+ popupIconWarningLabel: 'Warning',
+ popupIconInformationLabel: 'Information',
filterSearchLabel: 'Search',
filterNoResultsLabel: 'No items found'
};
diff --git a/packages/nimble-components/src/label-provider/core/label-tokens.ts b/packages/nimble-components/src/label-provider/core/label-tokens.ts
index 2cfe2debce..2f6f518ec5 100644
--- a/packages/nimble-components/src/label-provider/core/label-tokens.ts
+++ b/packages/nimble-components/src/label-provider/core/label-tokens.ts
@@ -16,20 +16,20 @@ export const numericIncrementLabel = DesignToken.create({
cssCustomPropertyName: null
}).withDefault(coreLabelDefaults.numericIncrementLabel);
-export const errorIconLabel = DesignToken.create({
- name: 'error-icon-label',
+export const popupIconErrorLabel = DesignToken.create({
+ name: 'popup-icon-error-label',
cssCustomPropertyName: null
-}).withDefault(coreLabelDefaults.errorIconLabel);
+}).withDefault(coreLabelDefaults.popupIconErrorLabel);
-export const warningIconLabel = DesignToken.create({
- name: 'warning-icon-label',
+export const popupIconWarningLabel = DesignToken.create({
+ name: 'popup-icon-warning-label',
cssCustomPropertyName: null
-}).withDefault(coreLabelDefaults.warningIconLabel);
+}).withDefault(coreLabelDefaults.popupIconWarningLabel);
-export const informationIconLabel = DesignToken.create({
- name: 'information-icon-label',
+export const popupIconInformationLabel = DesignToken.create({
+ name: 'popup-icon-information-label',
cssCustomPropertyName: null
-}).withDefault(coreLabelDefaults.informationIconLabel);
+}).withDefault(coreLabelDefaults.popupIconInformationLabel);
export const filterSearchLabel = DesignToken.create({
name: 'filter-search-label',
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/.eslintrc.js b/packages/performance/.eslintrc.cjs
similarity index 75%
rename from packages/performance/.eslintrc.js
rename to packages/performance/.eslintrc.cjs
index 3e1be2eb59..f7f5374ae5 100644
--- a/packages/performance/.eslintrc.js
+++ b/packages/performance/.eslintrc.cjs
@@ -27,5 +27,11 @@ module.exports = {
// Rules enabled due to strictNullChecks
'@typescript-eslint/no-non-null-assertion': 'off',
}
+ }, {
+ files: ['vite.config.js'],
+ rules: {
+ // Configuration scripts will not be in published package and are allowed to use devDependencies
+ 'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
+ }
}]
};
diff --git a/packages/performance/lighthouserc.js b/packages/performance/lighthouserc.cjs
similarity index 100%
rename from packages/performance/lighthouserc.js
rename to packages/performance/lighthouserc.cjs
diff --git a/packages/performance/package.json b/packages/performance/package.json
index 56c255a00b..a2b5b6af64 100644
--- a/packages/performance/package.json
+++ b/packages/performance/package.json
@@ -2,6 +2,7 @@
"name": "@ni-private/performance",
"version": "1.0.0",
"private": true,
+ "type": "module",
"description": "A package to measure the performance of the Nimble Components",
"scripts": {
"build": "tsc && vite build src",
@@ -15,7 +16,7 @@
},
"devDependencies": {
"@lhci/cli": "^0.13.0",
- "typescript": "~4.8.2",
+ "typescript": "~4.9.5",
"vite": "^5.1.5"
},
"files": [
diff --git a/packages/performance/src/vite.config.js b/packages/performance/src/vite.config.js
index 2a8b74e794..8f5bec56a9 100644
--- a/packages/performance/src/vite.config.js
+++ b/packages/performance/src/vite.config.js
@@ -1,4 +1,3 @@
-// eslint-disable-next-line import/no-extraneous-dependencies
import { defineConfig } from 'vite';
import { resolve } from 'path';
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",