@ni/nimble-components 34.10.0 → 34.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/all-components-bundle.js +136 -47
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +6689 -6675
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/checkbox/index.d.ts +2 -2
  6. package/dist/esm/combobox/index.d.ts +3 -3
  7. package/dist/esm/label-provider/base/index.js.map +1 -1
  8. package/dist/esm/number-field/index.d.ts +3 -3
  9. package/dist/esm/patterns/error/types.d.ts +2 -2
  10. package/dist/esm/patterns/required-visible/types.d.ts +1 -1
  11. package/dist/esm/radio-group/index.d.ts +3 -3
  12. package/dist/esm/rich-text/editor/index.d.ts +2 -2
  13. package/dist/esm/select/index.d.ts +3 -3
  14. package/dist/esm/select/index.js.map +1 -1
  15. package/dist/esm/table-column/anchor/index.d.ts +9 -9
  16. package/dist/esm/table-column/date-text/index.d.ts +7 -7
  17. package/dist/esm/table-column/duration-text/index.d.ts +7 -7
  18. package/dist/esm/table-column/mapping/index.d.ts +6 -6
  19. package/dist/esm/table-column/menu-button/cell-view/index.js +1 -1
  20. package/dist/esm/table-column/menu-button/cell-view/index.js.map +1 -1
  21. package/dist/esm/table-column/menu-button/cell-view/{templates.js → template.js} +1 -1
  22. package/dist/esm/table-column/menu-button/cell-view/template.js.map +1 -0
  23. package/dist/esm/table-column/menu-button/index.d.ts +4 -4
  24. package/dist/esm/table-column/mixins/custom-sort-order.d.ts +2 -2
  25. package/dist/esm/table-column/mixins/fractional-width-column.d.ts +2 -2
  26. package/dist/esm/table-column/mixins/groupable-column.d.ts +1 -1
  27. package/dist/esm/table-column/mixins/placeholder.d.ts +1 -1
  28. package/dist/esm/table-column/mixins/sortable-column.d.ts +1 -1
  29. package/dist/esm/table-column/number-text/index.d.ts +7 -7
  30. package/dist/esm/table-column/text/index.d.ts +9 -9
  31. package/dist/esm/table-column/text-base/index.d.ts +5 -5
  32. package/dist/esm/text-area/index.d.ts +3 -3
  33. package/dist/esm/text-field/index.d.ts +3 -3
  34. package/dist/esm/wafer-map/workers/matrix-renderer.d.ts +5 -5
  35. package/dist/esm/wafer-map/workers/matrix-renderer.js.map +1 -1
  36. package/package.json +9 -28
  37. package/dist/esm/table-column/menu-button/cell-view/templates.js.map +0 -1
  38. /package/dist/esm/table-column/menu-button/cell-view/{templates.d.ts → template.d.ts} +0 -0
@@ -16,34 +16,34 @@ declare global {
16
16
  }
17
17
  declare const TableColumnDateText_base: (abstract new (...args: any[]) => {
18
18
  groupingDisabled: boolean;
19
- groupIndex?: number | null | undefined;
19
+ groupIndex?: number | null;
20
20
  groupingDisabledChanged(): void;
21
21
  groupIndexChanged(): void;
22
22
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, import("../base/models/column-validator").ColumnValidator<[]>>;
23
23
  }) & (abstract new (...args: any[]) => {
24
- fractionalWidth?: number | null | undefined;
25
- minPixelWidth?: number | null | undefined;
24
+ fractionalWidth?: number | null;
25
+ minPixelWidth?: number | null;
26
26
  fractionalWidthChanged(): void;
27
27
  minPixelWidthChanged(): void;
28
28
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, import("../base/models/column-validator").ColumnValidator<[]>>;
29
29
  }) & (abstract new (...args: any[]) => {
30
- placeholder?: string | undefined;
30
+ placeholder?: string;
31
31
  placeholderChanged(): void;
32
32
  }) & (abstract new (...args: any[]) => {
33
33
  sortingDisabled: boolean;
34
- sortIndex?: number | null | undefined;
34
+ sortIndex?: number | null;
35
35
  sortDirection: import("../../table/types").TableColumnSortDirection;
36
36
  sortingDisabledChanged(): void;
37
37
  sortDirectionChanged(): void;
38
38
  sortIndexChanged(): void;
39
39
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, import("../base/models/column-validator").ColumnValidator<[]>>;
40
40
  }) & ((abstract new () => TableColumnTextBase<TableColumnDateTextColumnConfig, TableColumnDateTextValidator>) & {
41
- compose<T extends import("@ni/fast-foundation").FoundationElementDefinition = import("@ni/fast-foundation").FoundationElementDefinition, K extends import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement> = import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement>>(this: K, elementDefinition: T): (overrideDefinition?: import("@ni/fast-foundation").OverrideFoundationElementDefinition<T> | undefined) => import("@ni/fast-foundation").FoundationElementRegistry<T, K>;
41
+ compose<T extends import("@ni/fast-foundation").FoundationElementDefinition = import("@ni/fast-foundation").FoundationElementDefinition, K extends import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement> = import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement>>(this: K, elementDefinition: T): (overrideDefinition?: import("@ni/fast-foundation").OverrideFoundationElementDefinition<T>) => import("@ni/fast-foundation").FoundationElementRegistry<T, K>;
42
42
  from<TBase extends {
43
43
  new (): HTMLElement;
44
44
  prototype: HTMLElement;
45
45
  }>(BaseType: TBase): new () => InstanceType<TBase> & import("@ni/fast-element").FASTElement;
46
- define<TType extends Function>(type: TType, nameOrDef?: string | import("@ni/fast-element").PartialFASTElementDefinition | undefined): TType;
46
+ define<TType extends Function>(type: TType, nameOrDef?: string | import("@ni/fast-element").PartialFASTElementDefinition): TType;
47
47
  });
48
48
  /**
49
49
  * The table column for displaying dates/times as text.
@@ -15,34 +15,34 @@ declare global {
15
15
  }
16
16
  declare const TableColumnDurationText_base: (abstract new (...args: any[]) => {
17
17
  groupingDisabled: boolean;
18
- groupIndex?: number | null | undefined;
18
+ groupIndex?: number | null;
19
19
  groupingDisabledChanged(): void;
20
20
  groupIndexChanged(): void;
21
21
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, ColumnValidator<[]>>;
22
22
  }) & (abstract new (...args: any[]) => {
23
- fractionalWidth?: number | null | undefined;
24
- minPixelWidth?: number | null | undefined;
23
+ fractionalWidth?: number | null;
24
+ minPixelWidth?: number | null;
25
25
  fractionalWidthChanged(): void;
26
26
  minPixelWidthChanged(): void;
27
27
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, ColumnValidator<[]>>;
28
28
  }) & (abstract new (...args: any[]) => {
29
- placeholder?: string | undefined;
29
+ placeholder?: string;
30
30
  placeholderChanged(): void;
31
31
  }) & (abstract new (...args: any[]) => {
32
32
  sortingDisabled: boolean;
33
- sortIndex?: number | null | undefined;
33
+ sortIndex?: number | null;
34
34
  sortDirection: import("../../table/types").TableColumnSortDirection;
35
35
  sortingDisabledChanged(): void;
36
36
  sortDirectionChanged(): void;
37
37
  sortIndexChanged(): void;
38
38
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, ColumnValidator<[]>>;
39
39
  }) & ((abstract new () => TableColumnTextBase<TableColumnDurationTextColumnConfig, ColumnValidator<[]>>) & {
40
- compose<T extends import("@ni/fast-foundation").FoundationElementDefinition = import("@ni/fast-foundation").FoundationElementDefinition, K extends import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement> = import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement>>(this: K, elementDefinition: T): (overrideDefinition?: import("@ni/fast-foundation").OverrideFoundationElementDefinition<T> | undefined) => import("@ni/fast-foundation").FoundationElementRegistry<T, K>;
40
+ compose<T extends import("@ni/fast-foundation").FoundationElementDefinition = import("@ni/fast-foundation").FoundationElementDefinition, K extends import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement> = import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement>>(this: K, elementDefinition: T): (overrideDefinition?: import("@ni/fast-foundation").OverrideFoundationElementDefinition<T>) => import("@ni/fast-foundation").FoundationElementRegistry<T, K>;
41
41
  from<TBase extends {
42
42
  new (): HTMLElement;
43
43
  prototype: HTMLElement;
44
44
  }>(BaseType: TBase): new () => InstanceType<TBase> & import("@ni/fast-element").FASTElement;
45
- define<TType extends Function>(type: TType, nameOrDef?: string | import("@ni/fast-element").PartialFASTElementDefinition | undefined): TType;
45
+ define<TType extends Function>(type: TType, nameOrDef?: string | import("@ni/fast-element").PartialFASTElementDefinition): TType;
46
46
  });
47
47
  /**
48
48
  * The table column for displaying a duration value as text.
@@ -11,31 +11,31 @@ declare global {
11
11
  }
12
12
  declare const TableColumnMapping_base: (abstract new (...args: any[]) => {
13
13
  groupingDisabled: boolean;
14
- groupIndex?: number | null | undefined;
14
+ groupIndex?: number | null;
15
15
  groupingDisabledChanged(): void;
16
16
  groupIndexChanged(): void;
17
17
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, import("../base/models/column-validator").ColumnValidator<[]>>;
18
18
  }) & (abstract new (...args: any[]) => {
19
- fractionalWidth?: number | null | undefined;
20
- minPixelWidth?: number | null | undefined;
19
+ fractionalWidth?: number | null;
20
+ minPixelWidth?: number | null;
21
21
  fractionalWidthChanged(): void;
22
22
  minPixelWidthChanged(): void;
23
23
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, import("../base/models/column-validator").ColumnValidator<[]>>;
24
24
  }) & (abstract new (...args: any[]) => {
25
25
  sortingDisabled: boolean;
26
- sortIndex?: number | null | undefined;
26
+ sortIndex?: number | null;
27
27
  sortDirection: import("../../table/types").TableColumnSortDirection;
28
28
  sortingDisabledChanged(): void;
29
29
  sortDirectionChanged(): void;
30
30
  sortIndexChanged(): void;
31
31
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, import("../base/models/column-validator").ColumnValidator<[]>>;
32
32
  }) & ((abstract new () => TableColumnEnumBase<TableColumnEnumColumnConfig, TableColumnMappingValidator>) & {
33
- compose<T extends import("@ni/fast-foundation").FoundationElementDefinition = import("@ni/fast-foundation").FoundationElementDefinition, K extends import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement> = import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement>>(this: K, elementDefinition: T): (overrideDefinition?: import("@ni/fast-foundation").OverrideFoundationElementDefinition<T> | undefined) => import("@ni/fast-foundation").FoundationElementRegistry<T, K>;
33
+ compose<T extends import("@ni/fast-foundation").FoundationElementDefinition = import("@ni/fast-foundation").FoundationElementDefinition, K extends import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement> = import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement>>(this: K, elementDefinition: T): (overrideDefinition?: import("@ni/fast-foundation").OverrideFoundationElementDefinition<T>) => import("@ni/fast-foundation").FoundationElementRegistry<T, K>;
34
34
  from<TBase extends {
35
35
  new (): HTMLElement;
36
36
  prototype: HTMLElement;
37
37
  }>(BaseType: TBase): new () => InstanceType<TBase> & import("@ni/fast-element").FASTElement;
38
- define<TType extends Function>(type: TType, nameOrDef?: string | import("@ni/fast-element").PartialFASTElementDefinition | undefined): TType;
38
+ define<TType extends Function>(type: TType, nameOrDef?: string | import("@ni/fast-element").PartialFASTElementDefinition): TType;
39
39
  });
40
40
  /**
41
41
  * Table column that maps number, boolean, or string values to an icon, a spinner,
@@ -2,7 +2,7 @@ import { __decorate } from "tslib";
2
2
  import { DesignSystem } from '@ni/fast-foundation';
3
3
  import { observable, volatile } from '@ni/fast-element';
4
4
  import { TableCellView } from '../../base/cell-view';
5
- import { template } from './templates';
5
+ import { template } from './template';
6
6
  import { styles } from './styles';
7
7
  import { cellViewMenuSlotName } from '../types';
8
8
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/menu-button/cell-view/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAKrD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAQhD;;GAEG;AACH,MAAM,OAAO,6BAA8B,SAAQ,aAGlD;IAHD;;QAUI,gBAAgB;QAET,gBAAW,GAAG,KAAK,CAAC;IAiD/B,CAAC;IA/CG,gBAAgB;IAEhB,IAAW,cAAc;QACrB,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC;IACpC,CAAC;IAED,IAAoB,gBAAgB;QAChC,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACtB,OAAO,CAAC,IAAI,CAAC,UAAW,CAAC,CAAC;QAC9B,CAAC;QACD,OAAO,EAAE,CAAC;IACd,CAAC;IAED,gBAAgB;IACT,wBAAwB,CAC3B,KAA+C;QAE/C,MAAM,kBAAkB,GAAG,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC;QACvD,IAAI,kBAAkB,IAAI,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;YAC9C,MAAM,WAAW,GAAmC;gBAChD,KAAK,EAAE;oBACH,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,oBAAoB,EAAE;iBAC3D;aACJ,CAAC;YACF,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAAE,WAAW,CAAC,CAAC;QACvD,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,gBAAgB;IACT,qBAAqB;QACxB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACjB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;QAC/E,CAAC;IACL,CAAC;IAED,gBAAgB;IACT,oBAAoB;QACvB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED,gBAAgB;IACT,iBAAiB,CAAC,CAAQ;QAC7B,0EAA0E;QAC1E,gCAAgC;QAChC,CAAC,CAAC,eAAe,EAAE,CAAC;IACxB,CAAC;CACJ;AAjDU;IADN,UAAU;kEACgB;AAI3B;IADC,QAAQ;mEAGR;AA6CL,MAAM,kBAAkB,GAAG,6BAA6B,CAAC,OAAO,CAAC;IAC7D,QAAQ,EAAE,oCAAoC;IAC9C,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAC,CAAC;AAC/E,MAAM,CAAC,MAAM,gCAAgC,GAAG,2CAA2C,CAAC","sourcesContent":["import { DesignSystem } from '@ni/fast-foundation';\nimport { observable, volatile } from '@ni/fast-element';\nimport { TableCellView } from '../../base/cell-view';\nimport type {\n TableColumnMenuButtonCellRecord,\n TableColumnMenuButtonColumnConfig\n} from '..';\nimport { template } from './templates';\nimport { styles } from './styles';\nimport type { MenuButton } from '../../../menu-button';\nimport type { MenuButtonToggleEventDetail } from '../../../menu-button/types';\nimport type { CellViewSlotRequestEventDetail } from '../../../table/types';\nimport { cellViewMenuSlotName } from '../types';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-table-column-menu-button-cell-view': TableColumnMenuButtonCellView;\n }\n}\n\n/**\n * The cell view base class for displaying a string field as a menu button.\n */\nexport class TableColumnMenuButtonCellView extends TableCellView<\n TableColumnMenuButtonCellRecord,\n TableColumnMenuButtonColumnConfig\n> {\n /** @internal */\n public menuButton?: MenuButton;\n\n /** @internal */\n public valueSpan?: HTMLSpanElement;\n\n /** @internal */\n @observable\n public hasOverflow = false;\n\n /** @internal */\n @volatile\n public get showMenuButton(): boolean {\n return !!this.cellRecord?.value;\n }\n\n public override get tabbableChildren(): HTMLElement[] {\n if (this.showMenuButton) {\n return [this.menuButton!];\n }\n return [];\n }\n\n /** @internal */\n public onMenuButtonBeforeToggle(\n event: CustomEvent<MenuButtonToggleEventDetail>\n ): boolean {\n const configuredSlotName = this.columnConfig?.menuSlot;\n if (configuredSlotName && event.detail.newState) {\n const eventDetail: CellViewSlotRequestEventDetail = {\n slots: [\n { name: configuredSlotName, slot: cellViewMenuSlotName }\n ]\n };\n this.$emit('cell-view-slots-request', eventDetail);\n }\n return true;\n }\n\n /** @internal */\n public onMenuButtonMouseOver(): void {\n if (this.valueSpan) {\n this.hasOverflow = this.valueSpan.offsetWidth < this.valueSpan.scrollWidth;\n }\n }\n\n /** @internal */\n public onMenuButtonMouseOut(): void {\n this.hasOverflow = false;\n }\n\n /** @internal */\n public onMenuButtonClick(e: Event): void {\n // Stop propagation of the click event to prevent clicking the menu button\n // from affecting row selection.\n e.stopPropagation();\n }\n}\n\nconst menuButtonCellView = TableColumnMenuButtonCellView.compose({\n baseName: 'table-column-menu-button-cell-view',\n template,\n styles\n});\nDesignSystem.getOrCreate().withPrefix('nimble').register(menuButtonCellView());\nexport const tableColumnMenuButtonCellViewTag = 'nimble-table-column-menu-button-cell-view';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/menu-button/cell-view/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAKrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAQhD;;GAEG;AACH,MAAM,OAAO,6BAA8B,SAAQ,aAGlD;IAHD;;QAUI,gBAAgB;QAET,gBAAW,GAAG,KAAK,CAAC;IAiD/B,CAAC;IA/CG,gBAAgB;IAEhB,IAAW,cAAc;QACrB,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC;IACpC,CAAC;IAED,IAAoB,gBAAgB;QAChC,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACtB,OAAO,CAAC,IAAI,CAAC,UAAW,CAAC,CAAC;QAC9B,CAAC;QACD,OAAO,EAAE,CAAC;IACd,CAAC;IAED,gBAAgB;IACT,wBAAwB,CAC3B,KAA+C;QAE/C,MAAM,kBAAkB,GAAG,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC;QACvD,IAAI,kBAAkB,IAAI,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;YAC9C,MAAM,WAAW,GAAmC;gBAChD,KAAK,EAAE;oBACH,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,oBAAoB,EAAE;iBAC3D;aACJ,CAAC;YACF,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAAE,WAAW,CAAC,CAAC;QACvD,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,gBAAgB;IACT,qBAAqB;QACxB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACjB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;QAC/E,CAAC;IACL,CAAC;IAED,gBAAgB;IACT,oBAAoB;QACvB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED,gBAAgB;IACT,iBAAiB,CAAC,CAAQ;QAC7B,0EAA0E;QAC1E,gCAAgC;QAChC,CAAC,CAAC,eAAe,EAAE,CAAC;IACxB,CAAC;CACJ;AAjDU;IADN,UAAU;kEACgB;AAI3B;IADC,QAAQ;mEAGR;AA6CL,MAAM,kBAAkB,GAAG,6BAA6B,CAAC,OAAO,CAAC;IAC7D,QAAQ,EAAE,oCAAoC;IAC9C,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAC,CAAC;AAC/E,MAAM,CAAC,MAAM,gCAAgC,GAAG,2CAA2C,CAAC","sourcesContent":["import { DesignSystem } from '@ni/fast-foundation';\nimport { observable, volatile } from '@ni/fast-element';\nimport { TableCellView } from '../../base/cell-view';\nimport type {\n TableColumnMenuButtonCellRecord,\n TableColumnMenuButtonColumnConfig\n} from '..';\nimport { template } from './template';\nimport { styles } from './styles';\nimport type { MenuButton } from '../../../menu-button';\nimport type { MenuButtonToggleEventDetail } from '../../../menu-button/types';\nimport type { CellViewSlotRequestEventDetail } from '../../../table/types';\nimport { cellViewMenuSlotName } from '../types';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-table-column-menu-button-cell-view': TableColumnMenuButtonCellView;\n }\n}\n\n/**\n * The cell view base class for displaying a string field as a menu button.\n */\nexport class TableColumnMenuButtonCellView extends TableCellView<\n TableColumnMenuButtonCellRecord,\n TableColumnMenuButtonColumnConfig\n> {\n /** @internal */\n public menuButton?: MenuButton;\n\n /** @internal */\n public valueSpan?: HTMLSpanElement;\n\n /** @internal */\n @observable\n public hasOverflow = false;\n\n /** @internal */\n @volatile\n public get showMenuButton(): boolean {\n return !!this.cellRecord?.value;\n }\n\n public override get tabbableChildren(): HTMLElement[] {\n if (this.showMenuButton) {\n return [this.menuButton!];\n }\n return [];\n }\n\n /** @internal */\n public onMenuButtonBeforeToggle(\n event: CustomEvent<MenuButtonToggleEventDetail>\n ): boolean {\n const configuredSlotName = this.columnConfig?.menuSlot;\n if (configuredSlotName && event.detail.newState) {\n const eventDetail: CellViewSlotRequestEventDetail = {\n slots: [\n { name: configuredSlotName, slot: cellViewMenuSlotName }\n ]\n };\n this.$emit('cell-view-slots-request', eventDetail);\n }\n return true;\n }\n\n /** @internal */\n public onMenuButtonMouseOver(): void {\n if (this.valueSpan) {\n this.hasOverflow = this.valueSpan.offsetWidth < this.valueSpan.scrollWidth;\n }\n }\n\n /** @internal */\n public onMenuButtonMouseOut(): void {\n this.hasOverflow = false;\n }\n\n /** @internal */\n public onMenuButtonClick(e: Event): void {\n // Stop propagation of the click event to prevent clicking the menu button\n // from affecting row selection.\n e.stopPropagation();\n }\n}\n\nconst menuButtonCellView = TableColumnMenuButtonCellView.compose({\n baseName: 'table-column-menu-button-cell-view',\n template,\n styles\n});\nDesignSystem.getOrCreate().withPrefix('nimble').register(menuButtonCellView());\nexport const tableColumnMenuButtonCellViewTag = 'nimble-table-column-menu-button-cell-view';\n"]}
@@ -21,4 +21,4 @@ export const template = html `
21
21
  </${menuButtonTag}>
22
22
  `)}
23
23
  `;
24
- //# sourceMappingURL=templates.js.map
24
+ //# sourceMappingURL=template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../src/table-column/menu-button/cell-view/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACH,gBAAgB,EAEnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAA+B;MACrD,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,EAAE,IAAI,CAA+B;WAC1D,aAAa;cACV,GAAG,CAAC,YAAY,CAAC;0BACL,gBAAgB,CAAC,KAAK;6BACnB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,KAAiD,CAAC;0BAC5F,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,qBAAqB,EAAE;yBAC/B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,oBAAoB,EAAE;sBAChC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC;oBACxC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,UAAW,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;;oBAEjD,GAAG,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAW,CAAC,KAAK;eACrE,wBAAwB,iBAAiB,wBAAwB;;0BAEtD,oBAAoB;YAClC,aAAa;KACpB,CAAC;CACL,CAAC","sourcesContent":["import { html, ref, when } from '@ni/fast-element';\nimport type { TableColumnMenuButtonCellView } from '.';\nimport { menuButtonTag } from '../../../menu-button';\nimport {\n ButtonAppearance,\n type MenuButtonToggleEventDetail\n} from '../../../menu-button/types';\nimport { iconArrowExpanderDownTag } from '../../../icons/arrow-expander-down';\nimport { cellViewMenuSlotName } from '../types';\n\nexport const template = html<TableColumnMenuButtonCellView>`\n ${when(x => x.showMenuButton, html<TableColumnMenuButtonCellView>`\n <${menuButtonTag}\n ${ref('menuButton')}\n appearance=\"${ButtonAppearance.ghost}\"\n @beforetoggle=\"${(x, c) => x.onMenuButtonBeforeToggle(c.event as CustomEvent<MenuButtonToggleEventDetail>)}\"\n @mouseover=\"${x => x.onMenuButtonMouseOver()}\"\n @mouseout=\"${x => x.onMenuButtonMouseOut()}\"\n @click=\"${(x, c) => x.onMenuButtonClick(c.event)}\"\n title=${x => (x.hasOverflow ? x.cellRecord!.value : null)}\n >\n <span ${ref('valueSpan')} class=\"value-label\">${x => x.cellRecord!.value}</span>\n <${iconArrowExpanderDownTag} slot=\"end\"></${iconArrowExpanderDownTag}>\n\n <slot name=\"${cellViewMenuSlotName}\" slot=\"menu\"></slot>\n </${menuButtonTag}>\n `)}\n`;\n"]}
@@ -12,18 +12,18 @@ declare global {
12
12
  }
13
13
  }
14
14
  declare const TableColumnMenuButton_base: (abstract new (...args: any[]) => {
15
- fractionalWidth?: number | null | undefined;
16
- minPixelWidth?: number | null | undefined;
15
+ fractionalWidth?: number | null;
16
+ minPixelWidth?: number | null;
17
17
  fractionalWidthChanged(): void;
18
18
  minPixelWidthChanged(): void;
19
19
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, ColumnValidator<[]>>;
20
20
  }) & ((abstract new () => TableColumn<TableColumnMenuButtonColumnConfig, ColumnValidator<[]>>) & {
21
- compose<T extends import("@ni/fast-foundation").FoundationElementDefinition = import("@ni/fast-foundation").FoundationElementDefinition, K extends import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement> = import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement>>(this: K, elementDefinition: T): (overrideDefinition?: import("@ni/fast-foundation").OverrideFoundationElementDefinition<T> | undefined) => import("@ni/fast-foundation").FoundationElementRegistry<T, K>;
21
+ compose<T extends import("@ni/fast-foundation").FoundationElementDefinition = import("@ni/fast-foundation").FoundationElementDefinition, K extends import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement> = import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement>>(this: K, elementDefinition: T): (overrideDefinition?: import("@ni/fast-foundation").OverrideFoundationElementDefinition<T>) => import("@ni/fast-foundation").FoundationElementRegistry<T, K>;
22
22
  from<TBase extends {
23
23
  new (): HTMLElement;
24
24
  prototype: HTMLElement;
25
25
  }>(BaseType: TBase): new () => InstanceType<TBase> & import("@ni/fast-element").FASTElement;
26
- define<TType extends Function>(type: TType, nameOrDef?: string | import("@ni/fast-element").PartialFASTElementDefinition | undefined): TType;
26
+ define<TType extends Function>(type: TType, nameOrDef?: string | import("@ni/fast-element").PartialFASTElementDefinition): TType;
27
27
  });
28
28
  /**
29
29
  * The table column for displaying string fields as the content within a menu button.
@@ -5,9 +5,9 @@ import type { ColumnValidator } from '../base/models/column-validator';
5
5
  type CustomSortOrderTableColumn<TColumnValidator extends ColumnValidator<['invalidCustomSortWithGrouping']>> = Pick<TableColumn<unknown, TColumnValidator>, 'columnInternals'>;
6
6
  type CustomSortOrderTableColumnConstructor<TColumnValidator extends ColumnValidator<['invalidCustomSortWithGrouping']>> = abstract new (...args: any[]) => CustomSortOrderTableColumn<TColumnValidator>;
7
7
  export declare function mixinCustomSortOrderColumnAPI<TBase extends CustomSortOrderTableColumnConstructor<TColumnValidator>, TColumnValidator extends ColumnValidator<['invalidCustomSortWithGrouping']>>(base: TBase): (abstract new (...args: any[]) => {
8
- sortByFieldName?: string | undefined;
8
+ sortByFieldName?: string;
9
9
  /** @internal */
10
- customSortOrderColumnNotifier?: Notifier | undefined;
10
+ customSortOrderColumnNotifier?: Notifier;
11
11
  /** @internal */
12
12
  customSortOrderColumnChangeHandler: {
13
13
  handleChange: (_source: unknown, args: unknown) => void;
@@ -2,8 +2,8 @@ import type { TableColumn } from '../base';
2
2
  type SizedTableColumn = Pick<TableColumn, 'columnInternals'>;
3
3
  type SizedTableColumnConstructor = abstract new (...args: any[]) => SizedTableColumn;
4
4
  export declare function mixinFractionalWidthColumnAPI<TBase extends SizedTableColumnConstructor>(base: TBase): (abstract new (...args: any[]) => {
5
- fractionalWidth?: number | null | undefined;
6
- minPixelWidth?: number | null | undefined;
5
+ fractionalWidth?: number | null;
6
+ minPixelWidth?: number | null;
7
7
  fractionalWidthChanged(): void;
8
8
  minPixelWidthChanged(): void;
9
9
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, import("../base/models/column-validator").ColumnValidator<[]>>;
@@ -3,7 +3,7 @@ type GroupableTableColumn = Pick<TableColumn, 'columnInternals'>;
3
3
  type GroupableTableColumnConstructor = abstract new (...args: any[]) => GroupableTableColumn;
4
4
  export declare function mixinGroupableColumnAPI<TBase extends GroupableTableColumnConstructor>(base: TBase): (abstract new (...args: any[]) => {
5
5
  groupingDisabled: boolean;
6
- groupIndex?: number | null | undefined;
6
+ groupIndex?: number | null;
7
7
  groupingDisabledChanged(): void;
8
8
  groupIndexChanged(): void;
9
9
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, import("../base/models/column-validator").ColumnValidator<[]>>;
@@ -2,7 +2,7 @@ import type { TableColumn } from '../base';
2
2
  type TableColumnWithPlaceholder = Pick<TableColumn, never>;
3
3
  type TableColumnWithPlaceholderConstructor = abstract new (...args: any[]) => TableColumnWithPlaceholder;
4
4
  export declare function mixinColumnWithPlaceholderAPI<TBase extends TableColumnWithPlaceholderConstructor>(base: TBase): (abstract new (...args: any[]) => {
5
- placeholder?: string | undefined;
5
+ placeholder?: string;
6
6
  /** @internal */
7
7
  placeholderChanged(): void;
8
8
  }) & TBase;
@@ -4,7 +4,7 @@ type SortableTableColumn = Pick<TableColumn, 'columnInternals'>;
4
4
  type SortableTableColumnConstructor = abstract new (...args: any[]) => SortableTableColumn;
5
5
  export declare function mixinSortableColumnAPI<TBase extends SortableTableColumnConstructor>(base: TBase): (abstract new (...args: any[]) => {
6
6
  sortingDisabled: boolean;
7
- sortIndex?: number | null | undefined;
7
+ sortIndex?: number | null;
8
8
  sortDirection: TableColumnSortDirection;
9
9
  /** @internal */
10
10
  sortingDisabledChanged(): void;
@@ -17,34 +17,34 @@ declare global {
17
17
  }
18
18
  declare const TableColumnNumberText_base: (abstract new (...args: any[]) => {
19
19
  groupingDisabled: boolean;
20
- groupIndex?: number | null | undefined;
20
+ groupIndex?: number | null;
21
21
  groupingDisabledChanged(): void;
22
22
  groupIndexChanged(): void;
23
23
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, import("../base/models/column-validator").ColumnValidator<[]>>;
24
24
  }) & (abstract new (...args: any[]) => {
25
- fractionalWidth?: number | null | undefined;
26
- minPixelWidth?: number | null | undefined;
25
+ fractionalWidth?: number | null;
26
+ minPixelWidth?: number | null;
27
27
  fractionalWidthChanged(): void;
28
28
  minPixelWidthChanged(): void;
29
29
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, import("../base/models/column-validator").ColumnValidator<[]>>;
30
30
  }) & (abstract new (...args: any[]) => {
31
- placeholder?: string | undefined;
31
+ placeholder?: string;
32
32
  placeholderChanged(): void;
33
33
  }) & (abstract new (...args: any[]) => {
34
34
  sortingDisabled: boolean;
35
- sortIndex?: number | null | undefined;
35
+ sortIndex?: number | null;
36
36
  sortDirection: import("../../table/types").TableColumnSortDirection;
37
37
  sortingDisabledChanged(): void;
38
38
  sortDirectionChanged(): void;
39
39
  sortIndexChanged(): void;
40
40
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, import("../base/models/column-validator").ColumnValidator<[]>>;
41
41
  }) & ((abstract new () => TableColumnTextBase<TableColumnNumberTextColumnConfig, TableColumnNumberTextValidator>) & {
42
- compose<T extends import("@ni/fast-foundation").FoundationElementDefinition = import("@ni/fast-foundation").FoundationElementDefinition, K extends import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement> = import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement>>(this: K, elementDefinition: T): (overrideDefinition?: import("@ni/fast-foundation").OverrideFoundationElementDefinition<T> | undefined) => import("@ni/fast-foundation").FoundationElementRegistry<T, K>;
42
+ compose<T extends import("@ni/fast-foundation").FoundationElementDefinition = import("@ni/fast-foundation").FoundationElementDefinition, K extends import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement> = import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement>>(this: K, elementDefinition: T): (overrideDefinition?: import("@ni/fast-foundation").OverrideFoundationElementDefinition<T>) => import("@ni/fast-foundation").FoundationElementRegistry<T, K>;
43
43
  from<TBase extends {
44
44
  new (): HTMLElement;
45
45
  prototype: HTMLElement;
46
46
  }>(BaseType: TBase): new () => InstanceType<TBase> & import("@ni/fast-element").FASTElement;
47
- define<TType extends Function>(type: TType, nameOrDef?: string | import("@ni/fast-element").PartialFASTElementDefinition | undefined): TType;
47
+ define<TType extends Function>(type: TType, nameOrDef?: string | import("@ni/fast-element").PartialFASTElementDefinition): TType;
48
48
  });
49
49
  /**
50
50
  * The table column for displaying numbers as text.
@@ -13,8 +13,8 @@ declare global {
13
13
  }
14
14
  }
15
15
  declare const TableColumnText_base: (abstract new (...args: any[]) => {
16
- sortByFieldName?: string | undefined;
17
- customSortOrderColumnNotifier?: import("@ni/fast-element").Notifier | undefined;
16
+ sortByFieldName?: string;
17
+ customSortOrderColumnNotifier?: import("@ni/fast-element").Notifier;
18
18
  customSortOrderColumnChangeHandler: {
19
19
  handleChange: (_source: unknown, args: unknown) => void;
20
20
  };
@@ -27,34 +27,34 @@ declare const TableColumnText_base: (abstract new (...args: any[]) => {
27
27
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, import("../base/models/column-validator").ColumnValidator<["invalidCustomSortWithGrouping"]>>;
28
28
  }) & (abstract new (...args: any[]) => {
29
29
  groupingDisabled: boolean;
30
- groupIndex?: number | null | undefined;
30
+ groupIndex?: number | null;
31
31
  groupingDisabledChanged(): void;
32
32
  groupIndexChanged(): void;
33
33
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, import("../base/models/column-validator").ColumnValidator<[]>>;
34
34
  }) & (abstract new (...args: any[]) => {
35
- fractionalWidth?: number | null | undefined;
36
- minPixelWidth?: number | null | undefined;
35
+ fractionalWidth?: number | null;
36
+ minPixelWidth?: number | null;
37
37
  fractionalWidthChanged(): void;
38
38
  minPixelWidthChanged(): void;
39
39
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, import("../base/models/column-validator").ColumnValidator<[]>>;
40
40
  }) & (abstract new (...args: any[]) => {
41
- placeholder?: string | undefined;
41
+ placeholder?: string;
42
42
  placeholderChanged(): void;
43
43
  }) & (abstract new (...args: any[]) => {
44
44
  sortingDisabled: boolean;
45
- sortIndex?: number | null | undefined;
45
+ sortIndex?: number | null;
46
46
  sortDirection: import("../../table/types").TableColumnSortDirection;
47
47
  sortingDisabledChanged(): void;
48
48
  sortDirectionChanged(): void;
49
49
  sortIndexChanged(): void;
50
50
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, import("../base/models/column-validator").ColumnValidator<[]>>;
51
51
  }) & ((abstract new () => TableColumnTextBase<TableColumnTextColumnConfig, TableColumnTextValidator>) & {
52
- compose<T extends import("@ni/fast-foundation").FoundationElementDefinition = import("@ni/fast-foundation").FoundationElementDefinition, K extends import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement> = import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement>>(this: K, elementDefinition: T): (overrideDefinition?: import("@ni/fast-foundation").OverrideFoundationElementDefinition<T> | undefined) => import("@ni/fast-foundation").FoundationElementRegistry<T, K>;
52
+ compose<T extends import("@ni/fast-foundation").FoundationElementDefinition = import("@ni/fast-foundation").FoundationElementDefinition, K extends import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement> = import("@ni/fast-element").Constructable<import("@ni/fast-foundation").FoundationElement>>(this: K, elementDefinition: T): (overrideDefinition?: import("@ni/fast-foundation").OverrideFoundationElementDefinition<T>) => import("@ni/fast-foundation").FoundationElementRegistry<T, K>;
53
53
  from<TBase extends {
54
54
  new (): HTMLElement;
55
55
  prototype: HTMLElement;
56
56
  }>(BaseType: TBase): new () => InstanceType<TBase> & import("@ni/fast-element").FASTElement;
57
- define<TType extends Function>(type: TType, nameOrDef?: string | import("@ni/fast-element").PartialFASTElementDefinition | undefined): TType;
57
+ define<TType extends Function>(type: TType, nameOrDef?: string | import("@ni/fast-element").PartialFASTElementDefinition): TType;
58
58
  });
59
59
  /**
60
60
  * The table column for displaying string fields as text.
@@ -10,22 +10,22 @@ export declare abstract class TableColumnTextBase<TColumnConfig, TColumnValidato
10
10
  type TableColumnBaseConstructor<TColumnConfig, TColumnValidator extends ColumnValidator<[]>> = abstract new (...args: any[]) => TableColumnTextBase<TColumnConfig, TColumnValidator>;
11
11
  export declare function mixinTextBase<TBase extends TableColumnBaseConstructor<TColumnConfig, TColumnValidator>, TColumnConfig, TColumnValidator extends ColumnValidator<[]> = ColumnValidator<[]>>(base: TBase): (abstract new (...args: any[]) => {
12
12
  groupingDisabled: boolean;
13
- groupIndex?: number | null | undefined;
13
+ groupIndex?: number | null;
14
14
  groupingDisabledChanged(): void;
15
15
  groupIndexChanged(): void;
16
16
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, ColumnValidator<[]>>;
17
17
  }) & (abstract new (...args: any[]) => {
18
- fractionalWidth?: number | null | undefined;
19
- minPixelWidth?: number | null | undefined;
18
+ fractionalWidth?: number | null;
19
+ minPixelWidth?: number | null;
20
20
  fractionalWidthChanged(): void;
21
21
  minPixelWidthChanged(): void;
22
22
  readonly columnInternals: import("../base/models/column-internals").ColumnInternals<unknown, ColumnValidator<[]>>;
23
23
  }) & (abstract new (...args: any[]) => {
24
- placeholder?: string | undefined;
24
+ placeholder?: string;
25
25
  placeholderChanged(): void;
26
26
  }) & (abstract new (...args: any[]) => {
27
27
  sortingDisabled: boolean;
28
- sortIndex?: number | null | undefined;
28
+ sortIndex?: number | null;
29
29
  sortDirection: import("../../table/types").TableColumnSortDirection;
30
30
  sortingDisabledChanged(): void;
31
31
  sortDirectionChanged(): void;
@@ -6,18 +6,18 @@ declare global {
6
6
  }
7
7
  }
8
8
  declare const TextArea_base: (abstract new (...args: any[]) => {
9
- errorText?: string | undefined;
9
+ errorText?: string;
10
10
  errorVisible: boolean;
11
11
  errorHasOverflow: boolean;
12
12
  readonly $fastController: import("@ni/fast-element").Controller;
13
- $emit(type: string, detail?: any, options?: Omit<CustomEventInit<any>, "detail"> | undefined): boolean | void;
13
+ $emit(type: string, detail?: any, options?: Omit<CustomEventInit, "detail">): boolean | void;
14
14
  connectedCallback(): void;
15
15
  disconnectedCallback(): void;
16
16
  attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
17
17
  }) & (abstract new (...args: any[]) => {
18
18
  requiredVisible: boolean;
19
19
  readonly $fastController: import("@ni/fast-element").Controller;
20
- $emit(type: string, detail?: any, options?: Omit<CustomEventInit<any>, "detail"> | undefined): boolean | void;
20
+ $emit(type: string, detail?: any, options?: Omit<CustomEventInit, "detail">): boolean | void;
21
21
  connectedCallback(): void;
22
22
  disconnectedCallback(): void;
23
23
  attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
@@ -6,18 +6,18 @@ declare global {
6
6
  }
7
7
  }
8
8
  declare const TextField_base: (abstract new (...args: any[]) => {
9
- errorText?: string | undefined;
9
+ errorText?: string;
10
10
  errorVisible: boolean;
11
11
  errorHasOverflow: boolean;
12
12
  readonly $fastController: import("@ni/fast-element").Controller;
13
- $emit(type: string, detail?: any, options?: Omit<CustomEventInit<any>, "detail"> | undefined): boolean | void;
13
+ $emit(type: string, detail?: any, options?: Omit<CustomEventInit, "detail">): boolean | void;
14
14
  connectedCallback(): void;
15
15
  disconnectedCallback(): void;
16
16
  attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
17
17
  }) & (abstract new (...args: any[]) => {
18
18
  requiredVisible: boolean;
19
19
  readonly $fastController: import("@ni/fast-element").Controller;
20
- $emit(type: string, detail?: any, options?: Omit<CustomEventInit<any>, "detail"> | undefined): boolean | void;
20
+ $emit(type: string, detail?: any, options?: Omit<CustomEventInit, "detail">): boolean | void;
21
21
  connectedCallback(): void;
22
22
  disconnectedCallback(): void;
23
23
  attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
@@ -7,11 +7,11 @@ import type { Dimensions, RenderConfig, TransformConfig } from './types';
7
7
  * This setup is used in the wafer-map component to perform heavy computational duties
8
8
  */
9
9
  export declare class MatrixRenderer {
10
- values: Float64Array;
11
- scaledColumnIndices: Float64Array;
12
- scaledRowIndices: Float64Array;
13
- columnIndicesPositions: Int32Array;
14
- colorIndices: Int32Array;
10
+ values: Float64Array<ArrayBuffer>;
11
+ scaledColumnIndices: Float64Array<ArrayBuffer>;
12
+ scaledRowIndices: Float64Array<ArrayBuffer>;
13
+ columnIndicesPositions: Int32Array<ArrayBuffer>;
14
+ colorIndices: Int32Array<ArrayBuffer>;
15
15
  canvas: OffscreenCanvas;
16
16
  context: OffscreenCanvasRenderingContext2D;
17
17
  private colors;
@@ -1 +1 @@
1
- {"version":3,"file":"matrix-renderer.js","sourceRoot":"","sources":["../../../../src/wafer-map/workers/matrix-renderer.ts"],"names":[],"mappings":"","sourcesContent":["import type { Dimensions, RenderConfig, TransformConfig } from './types';\n/**\n * MatrixRenderer class is meant to be used within a Web Worker context,\n * using Comlink to facilitate communication between the main thread and the worker.\n * The MatrixRenderer class manages a matrix of dies, once an instance of MatrixRenderer is created,\n * it is exposed to the main thread using Comlink's `expose` method.\n * This setup is used in the wafer-map component to perform heavy computational duties\n */\nexport declare class MatrixRenderer {\n values: Float64Array;\n scaledColumnIndices: Float64Array;\n scaledRowIndices: Float64Array;\n columnIndicesPositions: Int32Array;\n colorIndices: Int32Array;\n canvas: OffscreenCanvas;\n context: OffscreenCanvasRenderingContext2D;\n private colors;\n private colorValues;\n private readonly outsideRangeDieColor;\n private readonly fontSizeFactor;\n private renderConfig;\n private transformConfig;\n setMatrixData(columnIndices: Int32Array, rowIndices: Int32Array, valuesBuffer: Float64Array): void;\n setRenderConfig(renderConfig: RenderConfig): void;\n setTransformConfig(transformData: TransformConfig): void;\n setCanvas(canvas: OffscreenCanvas): void;\n scaleCanvas(): void;\n setCanvasDimensions(data: Dimensions): void;\n getCanvasDimensions(): Dimensions;\n clearCanvas(): void;\n drawWafer(): void;\n drawText(): void;\n private isDieInGrid;\n private calculateHorizontalScaledIndices;\n private calculateVerticalScaledIndices;\n private findColorIndex;\n}\n"]}
1
+ {"version":3,"file":"matrix-renderer.js","sourceRoot":"","sources":["../../../../src/wafer-map/workers/matrix-renderer.ts"],"names":[],"mappings":"","sourcesContent":["import type { Dimensions, RenderConfig, TransformConfig } from './types';\n/**\n * MatrixRenderer class is meant to be used within a Web Worker context,\n * using Comlink to facilitate communication between the main thread and the worker.\n * The MatrixRenderer class manages a matrix of dies, once an instance of MatrixRenderer is created,\n * it is exposed to the main thread using Comlink's `expose` method.\n * This setup is used in the wafer-map component to perform heavy computational duties\n */\nexport declare class MatrixRenderer {\n values: Float64Array<ArrayBuffer>;\n scaledColumnIndices: Float64Array<ArrayBuffer>;\n scaledRowIndices: Float64Array<ArrayBuffer>;\n columnIndicesPositions: Int32Array<ArrayBuffer>;\n colorIndices: Int32Array<ArrayBuffer>;\n canvas: OffscreenCanvas;\n context: OffscreenCanvasRenderingContext2D;\n private colors;\n private colorValues;\n private readonly outsideRangeDieColor;\n private readonly fontSizeFactor;\n private renderConfig;\n private transformConfig;\n setMatrixData(columnIndices: Int32Array, rowIndices: Int32Array, valuesBuffer: Float64Array): void;\n setRenderConfig(renderConfig: RenderConfig): void;\n setTransformConfig(transformData: TransformConfig): void;\n setCanvas(canvas: OffscreenCanvas): void;\n scaleCanvas(): void;\n setCanvasDimensions(data: Dimensions): void;\n getCanvasDimensions(): Dimensions;\n clearCanvas(): void;\n drawWafer(): void;\n drawText(): void;\n private isDieInGrid;\n private calculateHorizontalScaledIndices;\n private calculateVerticalScaledIndices;\n private findColorIndex;\n}\n"]}
package/package.json CHANGED
@@ -1,18 +1,15 @@
1
1
  {
2
2
  "name": "@ni/nimble-components",
3
- "version": "34.10.0",
3
+ "version": "34.10.2",
4
4
  "description": "Styled web components for the NI Nimble Design System",
5
5
  "scripts": {
6
6
  "build": "npm run generate-icons && npm run generate-workers && npm run build-components && npm run generate-scss",
7
- "build-bundle": "npm run bundle-components",
7
+ "build-bundle": "rollup --bundleConfigAsCjs --config",
8
8
  "lint": "eslint .",
9
9
  "format": "eslint . --fix",
10
10
  "pack": "npm pack",
11
11
  "invoke-publish": "npm publish",
12
- "storybook-open-webkit": "playwright wk http://localhost:6006",
13
12
  "build-components": "tsc -p ./tsconfig.json",
14
- "build-components:watch": "tsc -p ./tsconfig.json -w",
15
- "bundle-components": "rollup --bundleConfigAsCjs --config",
16
13
  "generate-icons": "npm run generate-icons:bundle && npm run generate-icons:run",
17
14
  "generate-icons:bundle": "rollup --bundleConfigAsCjs --config build/generate-icons/rollup.config.js",
18
15
  "generate-icons:run": "node build/generate-icons/dist/index.js",
@@ -23,20 +20,11 @@
23
20
  "generate-workers:build": "tsc -p build/generate-workers/tsconfig.json",
24
21
  "generate-workers:bundle": "rollup --bundleConfigAsCjs --config build/generate-workers/rollup.config.js",
25
22
  "generate-workers:run": "node build/generate-workers/index.js",
26
- "tdd": "npm run build-components && npm run test-chrome",
27
- "tdd:watch": "npm run build-components:watch & npm run test-chrome:watch",
28
- "tdd-firefox": "npm run build-components && npm run test-firefox",
29
- "tdd-firefox:watch": "npm run build-components:watch & npm run test-firefox:watch",
30
- "tdd-webkit": "npm run build-components && npm run test-webkit",
31
- "tdd-webkit:watch": "npm run build-components:watch & npm run test-webkit:watch",
32
- "test-chrome:debugger": "karma start karma.conf.js --browsers=ChromeDebugging --skip-tags SkipChrome",
33
- "test-chrome:watch": "karma start karma.conf.headless.js --browsers=ChromeHeadlessOpt --skip-tags SkipChrome --watch-extensions js",
23
+ "test-chrome-debugger": "karma start karma.conf.js --browsers=ChromeDebugging --skip-tags SkipChrome",
34
24
  "test-chrome": "karma start karma.conf.headless.js --browsers=ChromeHeadlessOpt --single-run --skip-tags SkipChrome",
35
- "test-firefox:debugger": "karma start karma.conf.js --browsers=FirefoxDebugging --skip-tags SkipFirefox",
36
- "test-firefox:watch": "karma start karma.conf.headless.js --browsers=FirefoxHeadless --skip-tags SkipFirefox --watch-extensions js",
25
+ "test-firefox-debugger": "karma start karma.conf.js --browsers=FirefoxDebugging --skip-tags SkipFirefox",
37
26
  "test-firefox": "karma start karma.conf.headless.js --browsers=FirefoxHeadless --single-run --skip-tags SkipFirefox",
38
- "test-webkit:debugger": "karma start karma.conf.js --browsers=WebkitDebugging --skip-tags SkipWebkit",
39
- "test-webkit:watch": "karma start karma.conf.headless.js --browsers=WebkitHeadless --skip-tags SkipWebkit --watch-extensions js",
27
+ "test-webkit-debugger": "karma start karma.conf.js --browsers=WebkitDebugging --skip-tags SkipWebkit",
40
28
  "test-webkit": "karma start karma.conf.headless.js --browsers=WebkitHeadless --single-run --skip-tags SkipWebkit",
41
29
  "test": "concurrently --pad-prefix --timings --group \"npm:test-chrome\" \"npm:test-webkit\""
42
30
  },
@@ -60,7 +48,7 @@
60
48
  "@ni/fast-element": "^10.0.0",
61
49
  "@ni/fast-foundation": "^10.1.2",
62
50
  "@ni/fast-web-utilities": "^10.0.0",
63
- "@ni/nimble-tokens": "^8.13.5",
51
+ "@ni/nimble-tokens": "^8.13.6",
64
52
  "@tanstack/table-core": "^8.19.3",
65
53
  "@tanstack/virtual-core": "^3.10.6",
66
54
  "@tiptap/core": "^3.10.1",
@@ -99,14 +87,13 @@
99
87
  "devDependencies": {
100
88
  "@ni-private/eslint-config-nimble": "*",
101
89
  "@ni-private/jasmine-extensions": "^0.0.1",
102
- "@ni/jasmine-parameterized": "^1.0.6",
90
+ "@ni/jasmine-parameterized": "^1.0.7",
103
91
  "@rollup/plugin-commonjs": "^29.0.0",
104
92
  "@rollup/plugin-node-resolve": "^16.0.0",
105
93
  "@rollup/plugin-replace": "^6.0.0",
106
94
  "@rollup/plugin-terser": "^0.4.0",
107
95
  "@types/jasmine": "^5.1.4",
108
96
  "@types/offscreencanvas": "^2019.7.3",
109
- "@types/webpack-env": "^1.15.2",
110
97
  "concurrently": "^9.0.0",
111
98
  "jasmine-core": "^5.1.2",
112
99
  "karma": "^6.3.0",
@@ -115,18 +102,12 @@
115
102
  "karma-jasmine": "^5.1.0",
116
103
  "karma-jasmine-html-reporter": "^2.0.0",
117
104
  "karma-jasmine-spec-tags": "^2.0.0",
118
- "karma-source-map-support": "^1.4.0",
119
- "karma-sourcemap-loader": "^0.4.0",
120
105
  "karma-spec-reporter": "^0.0.36",
106
+ "karma-vite": "^1.0.5",
121
107
  "karma-webkit-launcher": "^2.6.0",
122
- "karma-webpack": "^5.0.0",
123
108
  "playwright": "1.54.1",
124
109
  "rollup": "^4.12.0",
125
110
  "rollup-plugin-sourcemaps2": "^0.5.0",
126
- "source-map-loader": "^5.0.0",
127
- "terser-webpack-plugin": "^5.3.10",
128
- "typescript": "~5.4.5",
129
- "webpack": "^5.75.0",
130
- "webpack-dev-middleware": "^7.0.0"
111
+ "typescript": "~5.8.3"
131
112
  }
132
113
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../../../src/table-column/menu-button/cell-view/templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACH,gBAAgB,EAEnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAA+B;MACrD,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,EAAE,IAAI,CAA+B;WAC1D,aAAa;cACV,GAAG,CAAC,YAAY,CAAC;0BACL,gBAAgB,CAAC,KAAK;6BACnB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,KAAiD,CAAC;0BAC5F,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,qBAAqB,EAAE;yBAC/B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,oBAAoB,EAAE;sBAChC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC;oBACxC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,UAAW,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;;oBAEjD,GAAG,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAW,CAAC,KAAK;eACrE,wBAAwB,iBAAiB,wBAAwB;;0BAEtD,oBAAoB;YAClC,aAAa;KACpB,CAAC;CACL,CAAC","sourcesContent":["import { html, ref, when } from '@ni/fast-element';\nimport type { TableColumnMenuButtonCellView } from '.';\nimport { menuButtonTag } from '../../../menu-button';\nimport {\n ButtonAppearance,\n type MenuButtonToggleEventDetail\n} from '../../../menu-button/types';\nimport { iconArrowExpanderDownTag } from '../../../icons/arrow-expander-down';\nimport { cellViewMenuSlotName } from '../types';\n\nexport const template = html<TableColumnMenuButtonCellView>`\n ${when(x => x.showMenuButton, html<TableColumnMenuButtonCellView>`\n <${menuButtonTag}\n ${ref('menuButton')}\n appearance=\"${ButtonAppearance.ghost}\"\n @beforetoggle=\"${(x, c) => x.onMenuButtonBeforeToggle(c.event as CustomEvent<MenuButtonToggleEventDetail>)}\"\n @mouseover=\"${x => x.onMenuButtonMouseOver()}\"\n @mouseout=\"${x => x.onMenuButtonMouseOut()}\"\n @click=\"${(x, c) => x.onMenuButtonClick(c.event)}\"\n title=${x => (x.hasOverflow ? x.cellRecord!.value : null)}\n >\n <span ${ref('valueSpan')} class=\"value-label\">${x => x.cellRecord!.value}</span>\n <${iconArrowExpanderDownTag} slot=\"end\"></${iconArrowExpanderDownTag}>\n\n <slot name=\"${cellViewMenuSlotName}\" slot=\"menu\"></slot>\n </${menuButtonTag}>\n `)}\n`;\n"]}