@ni/nimble-components 21.9.1 → 21.10.1

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 (79) hide show
  1. package/dist/all-components-bundle.js +737 -38
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +3368 -3323
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/anchor/types.d.ts +1 -1
  6. package/dist/esm/anchor-tab/index.d.ts +1 -1
  7. package/dist/esm/anchor-tabs/index.d.ts +1 -1
  8. package/dist/esm/banner/types.d.ts +1 -1
  9. package/dist/esm/breadcrumb/types.d.ts +1 -1
  10. package/dist/esm/button/types.d.ts +1 -1
  11. package/dist/esm/drawer/types.d.ts +1 -1
  12. package/dist/esm/icon-base/index.d.ts +1 -1
  13. package/dist/esm/icon-base/types.d.ts +1 -1
  14. package/dist/esm/label-provider/base/index.d.ts +1 -1
  15. package/dist/esm/label-provider/core/label-token-defaults.d.ts +1 -1
  16. package/dist/esm/label-provider/rich-text/label-token-defaults.d.ts +1 -1
  17. package/dist/esm/label-provider/table/label-token-defaults.d.ts +1 -1
  18. package/dist/esm/mapping/base/types.d.ts +2 -2
  19. package/dist/esm/menu-button/types.d.ts +1 -1
  20. package/dist/esm/number-field/types.d.ts +1 -1
  21. package/dist/esm/patterns/button/types.d.ts +2 -2
  22. package/dist/esm/patterns/dialog/types.d.ts +1 -1
  23. package/dist/esm/patterns/dropdown/types.d.ts +2 -2
  24. package/dist/esm/rich-text/editor/testing/types.d.ts +4 -4
  25. package/dist/esm/rich-text/editor/types.d.ts +3 -3
  26. package/dist/esm/rich-text-mention/base/models/mention-validator.d.ts +1 -1
  27. package/dist/esm/rich-text-mention/base/types.d.ts +2 -2
  28. package/dist/esm/select/index.d.ts +1 -1
  29. package/dist/esm/select/types.d.ts +1 -1
  30. package/dist/esm/spinner/types.d.ts +1 -1
  31. package/dist/esm/table/index.js +10 -10
  32. package/dist/esm/table/index.js.map +1 -1
  33. package/dist/esm/table/models/array-to-tree.d.ts +1 -1
  34. package/dist/esm/table/types.d.ts +12 -12
  35. package/dist/esm/table-column/anchor/index.d.ts +1 -1
  36. package/dist/esm/table-column/base/types.d.ts +1 -1
  37. package/dist/esm/table-column/date-text/index.d.ts +1 -1
  38. package/dist/esm/table-column/date-text/types.d.ts +16 -16
  39. package/dist/esm/table-column/duration-text/index.d.ts +1 -1
  40. package/dist/esm/table-column/enum-base/index.d.ts +2 -2
  41. package/dist/esm/table-column/enum-base/types.d.ts +1 -1
  42. package/dist/esm/table-column/mixins/fractional-width-column.d.ts +2 -2
  43. package/dist/esm/table-column/mixins/groupable-column.d.ts +2 -2
  44. package/dist/esm/table-column/number-text/index.d.ts +1 -1
  45. package/dist/esm/table-column/number-text/models/number-text-unit-format.d.ts +1 -1
  46. package/dist/esm/table-column/number-text/types.d.ts +2 -2
  47. package/dist/esm/table-column/text/index.d.ts +1 -1
  48. package/dist/esm/table-column/text-base/cell-view/types.d.ts +1 -1
  49. package/dist/esm/text-area/types.d.ts +1 -1
  50. package/dist/esm/text-field/types.d.ts +1 -1
  51. package/dist/esm/theme-provider/design-token-comments.d.ts +1 -1
  52. package/dist/esm/theme-provider/design-token-names.d.ts +2 -2
  53. package/dist/esm/theme-provider/types.d.ts +1 -1
  54. package/dist/esm/tooltip/types.d.ts +1 -1
  55. package/dist/esm/tree-view/types.d.ts +1 -1
  56. package/dist/esm/utilities/models/tracker.d.ts +1 -1
  57. package/dist/esm/utilities/style/types.d.ts +1 -1
  58. package/dist/esm/utilities/unit-format/decimal-unit-format.d.ts +1 -1
  59. package/dist/esm/utilities/unit-format/default-unit-format.d.ts +1 -1
  60. package/dist/esm/utilities/unit-format/scaled-unit/scaled-unit.d.ts +1 -1
  61. package/dist/esm/utilities/unit-format/scaled-unit-format/manually-translated-scaled-unit-format.d.ts +1 -1
  62. package/dist/esm/wafer-map/index.d.ts +11 -1
  63. package/dist/esm/wafer-map/index.js +31 -2
  64. package/dist/esm/wafer-map/index.js.map +1 -1
  65. package/dist/esm/wafer-map/modules/computations.js +5 -5
  66. package/dist/esm/wafer-map/modules/computations.js.map +1 -1
  67. package/dist/esm/wafer-map/modules/data-manager.js +5 -5
  68. package/dist/esm/wafer-map/modules/data-manager.js.map +1 -1
  69. package/dist/esm/wafer-map/modules/prerendering.js +8 -7
  70. package/dist/esm/wafer-map/modules/prerendering.js.map +1 -1
  71. package/dist/esm/wafer-map/modules/wafer-map-validator.d.ts +2 -0
  72. package/dist/esm/wafer-map/modules/wafer-map-validator.js +34 -1
  73. package/dist/esm/wafer-map/modules/wafer-map-validator.js.map +1 -1
  74. package/dist/esm/wafer-map/modules/worker-renderer.d.ts +12 -0
  75. package/dist/esm/wafer-map/modules/worker-renderer.js +46 -0
  76. package/dist/esm/wafer-map/modules/worker-renderer.js.map +1 -0
  77. package/dist/esm/wafer-map/types.d.ts +5 -11
  78. package/dist/esm/wafer-map/types.js.map +1 -1
  79. package/package.json +9 -6
@@ -4,27 +4,27 @@ import type { ValidityObject } from '../utilities/models/validator';
4
4
  * TableFieldName describes the type associated with keys within
5
5
  * a table's records.
6
6
  */
7
- export declare type TableFieldName = string;
7
+ export type TableFieldName = string;
8
8
  /**
9
9
  * TableFieldValue describes the type associated with values within
10
10
  * a table's records.
11
11
  */
12
- export declare type TableFieldValue = string | number | boolean | null | undefined;
12
+ export type TableFieldValue = string | number | boolean | null | undefined;
13
13
  /**
14
14
  * TableStringFieldValue describes the type associated with values within
15
15
  * a table's string records.
16
16
  */
17
- export declare type TableStringFieldValue = string | null | undefined;
17
+ export type TableStringFieldValue = string | null | undefined;
18
18
  /**
19
19
  * TableBooleanFieldValue describes the type associated with values within
20
20
  * a table's boolean records.
21
21
  */
22
- export declare type TableBooleanFieldValue = boolean | null | undefined;
22
+ export type TableBooleanFieldValue = boolean | null | undefined;
23
23
  /**
24
24
  * TableNumberFieldValue describes the type associated with values within
25
25
  * a table's number records.
26
26
  */
27
- export declare type TableNumberFieldValue = number | null | undefined;
27
+ export type TableNumberFieldValue = number | null | undefined;
28
28
  /**
29
29
  * TableRecord describes the data structure that backs a single row in a table.
30
30
  * It is made up of fields, which are key/value pairs that have a key of type
@@ -45,13 +45,13 @@ export interface TableNode<TRecord extends TableRecord = TableRecord> {
45
45
  originalIndex: number;
46
46
  clientRecord: TRecord;
47
47
  }
48
- export declare type TableStringField<FieldName extends TableFieldName> = {
48
+ export type TableStringField<FieldName extends TableFieldName> = {
49
49
  [name in FieldName]: TableStringFieldValue;
50
50
  };
51
- export declare type TableBooleanField<FieldName extends TableFieldName> = {
51
+ export type TableBooleanField<FieldName extends TableFieldName> = {
52
52
  [name in FieldName]: TableBooleanFieldValue;
53
53
  };
54
- export declare type TableNumberField<FieldName extends TableFieldName> = {
54
+ export type TableNumberField<FieldName extends TableFieldName> = {
55
55
  [name in FieldName]: TableNumberFieldValue;
56
56
  };
57
57
  export interface TableValidity extends ValidityObject {
@@ -84,7 +84,7 @@ export declare const TableRecordDelayedHierarchyState: {
84
84
  readonly canLoadChildren: "can-load-children";
85
85
  readonly loadingChildren: "loading-children";
86
86
  };
87
- export declare type TableRecordDelayedHierarchyState = (typeof TableRecordDelayedHierarchyState)[keyof typeof TableRecordDelayedHierarchyState];
87
+ export type TableRecordDelayedHierarchyState = (typeof TableRecordDelayedHierarchyState)[keyof typeof TableRecordDelayedHierarchyState];
88
88
  export interface TableActionMenuToggleEventDetail {
89
89
  newState: boolean;
90
90
  oldState: boolean;
@@ -99,7 +99,7 @@ export declare const TableColumnSortDirection: {
99
99
  readonly ascending: "ascending";
100
100
  readonly descending: "descending";
101
101
  };
102
- export declare type TableColumnSortDirection = (typeof TableColumnSortDirection)[keyof typeof TableColumnSortDirection];
102
+ export type TableColumnSortDirection = (typeof TableColumnSortDirection)[keyof typeof TableColumnSortDirection];
103
103
  /**
104
104
  * The selection modes of rows in the table.
105
105
  */
@@ -108,7 +108,7 @@ export declare const TableRowSelectionMode: {
108
108
  readonly single: "single";
109
109
  readonly multiple: "multiple";
110
110
  };
111
- export declare type TableRowSelectionMode = (typeof TableRowSelectionMode)[keyof typeof TableRowSelectionMode];
111
+ export type TableRowSelectionMode = (typeof TableRowSelectionMode)[keyof typeof TableRowSelectionMode];
112
112
  /**
113
113
  * @internal
114
114
  *
@@ -119,7 +119,7 @@ export declare const TableRowSelectionState: {
119
119
  readonly selected: "selected";
120
120
  readonly partiallySelected: "partially-selected";
121
121
  };
122
- export declare type TableRowSelectionState = (typeof TableRowSelectionState)[keyof typeof TableRowSelectionState];
122
+ export type TableRowSelectionState = (typeof TableRowSelectionState)[keyof typeof TableRowSelectionState];
123
123
  /**
124
124
  * @internal
125
125
  *
@@ -2,7 +2,7 @@ import { TableColumn } from '../base';
2
2
  import type { TableStringField } from '../../table/types';
3
3
  import type { AnchorAppearance } from '../../anchor/types';
4
4
  import type { ColumnInternalsOptions } from '../base/models/column-internals';
5
- export declare type TableColumnAnchorCellRecord = TableStringField<'label' | 'href'>;
5
+ export type TableColumnAnchorCellRecord = TableStringField<'label' | 'href'>;
6
6
  export interface TableColumnAnchorColumnConfig {
7
7
  appearance: AnchorAppearance;
8
8
  underlineHidden?: boolean;
@@ -31,7 +31,7 @@ export declare const TableColumnSortOperation: {
31
31
  */
32
32
  readonly localeAwareCaseSensitive: "localeAwareCaseSensitive";
33
33
  };
34
- export declare type TableColumnSortOperation = (typeof TableColumnSortOperation)[keyof typeof TableColumnSortOperation];
34
+ export type TableColumnSortOperation = (typeof TableColumnSortOperation)[keyof typeof TableColumnSortOperation];
35
35
  export interface TableColumnValidity extends ValidityObject {
36
36
  }
37
37
  export declare const defaultMinPixelWidth: number;
@@ -4,7 +4,7 @@ import { TableColumnValidity } from '../base/types';
4
4
  import type { ColumnInternalsOptions } from '../base/models/column-internals';
5
5
  import { DateTextFormat, LocaleMatcherAlgorithm, EraFormat, YearFormat, DayFormat, HourFormat, MinuteFormat, SecondFormat, TimeZoneNameFormat, FormatMatcherAlgorithm, DayPeriodFormat, DateStyle, TimeStyle, HourCycleFormat, MonthFormat, WeekdayFormat } from './types';
6
6
  import { TableColumnDateTextValidator } from './models/table-column-date-text-validator';
7
- export declare type TableColumnDateTextCellRecord = TableNumberField<'value'>;
7
+ export type TableColumnDateTextCellRecord = TableNumberField<'value'>;
8
8
  export interface TableColumnDateTextColumnConfig {
9
9
  formatter: Intl.DateTimeFormat;
10
10
  }
@@ -5,19 +5,19 @@ export declare const DateTextFormat: {
5
5
  readonly default: undefined;
6
6
  readonly custom: "custom";
7
7
  };
8
- export declare type DateTextFormat = (typeof DateTextFormat)[keyof typeof DateTextFormat];
9
- export declare type LocaleMatcherAlgorithm = Intl.DateTimeFormatOptions['localeMatcher'];
10
- export declare type WeekdayFormat = Intl.DateTimeFormatOptions['weekday'];
11
- export declare type EraFormat = Intl.DateTimeFormatOptions['era'];
12
- export declare type YearFormat = Intl.DateTimeFormatOptions['year'];
13
- export declare type MonthFormat = Intl.DateTimeFormatOptions['month'];
14
- export declare type DayFormat = Intl.DateTimeFormatOptions['day'];
15
- export declare type HourFormat = Intl.DateTimeFormatOptions['hour'];
16
- export declare type MinuteFormat = Intl.DateTimeFormatOptions['minute'];
17
- export declare type SecondFormat = Intl.DateTimeFormatOptions['second'];
18
- export declare type TimeZoneNameFormat = Intl.DateTimeFormatOptions['timeZoneName'];
19
- export declare type FormatMatcherAlgorithm = Intl.DateTimeFormatOptions['formatMatcher'];
20
- export declare type DayPeriodFormat = Intl.DateTimeFormatOptions['dayPeriod'];
21
- export declare type DateStyle = Intl.DateTimeFormatOptions['dateStyle'];
22
- export declare type TimeStyle = Intl.DateTimeFormatOptions['timeStyle'];
23
- export declare type HourCycleFormat = Intl.DateTimeFormatOptions['hourCycle'];
8
+ export type DateTextFormat = (typeof DateTextFormat)[keyof typeof DateTextFormat];
9
+ export type LocaleMatcherAlgorithm = Intl.DateTimeFormatOptions['localeMatcher'];
10
+ export type WeekdayFormat = Intl.DateTimeFormatOptions['weekday'];
11
+ export type EraFormat = Intl.DateTimeFormatOptions['era'];
12
+ export type YearFormat = Intl.DateTimeFormatOptions['year'];
13
+ export type MonthFormat = Intl.DateTimeFormatOptions['month'];
14
+ export type DayFormat = Intl.DateTimeFormatOptions['day'];
15
+ export type HourFormat = Intl.DateTimeFormatOptions['hour'];
16
+ export type MinuteFormat = Intl.DateTimeFormatOptions['minute'];
17
+ export type SecondFormat = Intl.DateTimeFormatOptions['second'];
18
+ export type TimeZoneNameFormat = Intl.DateTimeFormatOptions['timeZoneName'];
19
+ export type FormatMatcherAlgorithm = Intl.DateTimeFormatOptions['formatMatcher'];
20
+ export type DayPeriodFormat = Intl.DateTimeFormatOptions['dayPeriod'];
21
+ export type DateStyle = Intl.DateTimeFormatOptions['dateStyle'];
22
+ export type TimeStyle = Intl.DateTimeFormatOptions['timeStyle'];
23
+ export type HourCycleFormat = Intl.DateTimeFormatOptions['hourCycle'];
@@ -2,7 +2,7 @@ import type { TableNumberField } from '../../table/types';
2
2
  import { TableColumnTextBase } from '../text-base';
3
3
  import type { ColumnInternalsOptions } from '../base/models/column-internals';
4
4
  import { DurationFormatter } from './models/duration-formatter';
5
- export declare type TableColumnDurationTextCellRecord = TableNumberField<'value'>;
5
+ export type TableColumnDurationTextCellRecord = TableNumberField<'value'>;
6
6
  export interface TableColumnDurationTextColumnConfig {
7
7
  formatter: DurationFormatter;
8
8
  }
@@ -6,8 +6,8 @@ import type { MappingKeyType } from './types';
6
6
  import type { MappingConfig } from './models/mapping-config';
7
7
  import type { MappingKey } from '../../mapping/base/types';
8
8
  import type { TableColumnEnumBaseValidator } from './models/table-column-enum-base-validator';
9
- export declare type TableColumnEnumCellRecord = TableStringField<'value'> | TableBooleanField<'value'> | TableNumberField<'value'>;
10
- export declare type MappingConfigs = Map<MappingKey, MappingConfig>;
9
+ export type TableColumnEnumCellRecord = TableStringField<'value'> | TableBooleanField<'value'> | TableNumberField<'value'>;
10
+ export type MappingConfigs = Map<MappingKey, MappingConfig>;
11
11
  export interface TableColumnEnumColumnConfig {
12
12
  mappingConfigs: MappingConfigs;
13
13
  }
@@ -7,4 +7,4 @@ export declare const MappingKeyType: {
7
7
  readonly number: "number";
8
8
  readonly boolean: "boolean";
9
9
  };
10
- export declare type MappingKeyType = (typeof MappingKeyType)[keyof typeof MappingKeyType];
10
+ export type MappingKeyType = (typeof MappingKeyType)[keyof typeof MappingKeyType];
@@ -1,6 +1,6 @@
1
1
  import type { TableColumn } from '../base';
2
- declare type SizedTableColumn = Pick<TableColumn, 'columnInternals'>;
3
- declare type SizedTableColumnConstructor = abstract new (...args: any[]) => SizedTableColumn;
2
+ type SizedTableColumn = Pick<TableColumn, 'columnInternals'>;
3
+ type SizedTableColumnConstructor = abstract new (...args: any[]) => SizedTableColumn;
4
4
  export declare function mixinFractionalWidthColumnAPI<TBase extends SizedTableColumnConstructor>(base: TBase): (abstract new (...args: any[]) => {
5
5
  fractionalWidth?: number | null | undefined;
6
6
  minPixelWidth?: number | null | undefined;
@@ -1,6 +1,6 @@
1
1
  import type { TableColumn } from '../base';
2
- declare type GroupableTableColumn = Pick<TableColumn, 'columnInternals'>;
3
- declare type GroupableTableColumnConstructor = abstract new (...args: any[]) => GroupableTableColumn;
2
+ type GroupableTableColumn = Pick<TableColumn, 'columnInternals'>;
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
6
  groupIndex?: number | null | undefined;
@@ -6,7 +6,7 @@ import { NumberTextAlignment, NumberTextFormat } from './types';
6
6
  import type { UnitFormat } from '../../utilities/unit-format/unit-format';
7
7
  import { TableColumnNumberTextValidator } from './models/table-column-number-text-validator';
8
8
  import { TextCellViewBaseAlignment } from '../text-base/cell-view/types';
9
- export declare type TableColumnNumberTextCellRecord = TableNumberField<'value'>;
9
+ export type TableColumnNumberTextCellRecord = TableNumberField<'value'>;
10
10
  export interface TableColumnNumberTextColumnConfig {
11
11
  formatter: UnitFormat;
12
12
  alignment: TextCellViewBaseAlignment;
@@ -5,7 +5,7 @@ export interface NumberTextUnitFormatOptions extends UnitFormatOptions {
5
5
  decimalDigits?: number;
6
6
  decimalMaximumDigits?: number;
7
7
  }
8
- declare type ResolvedNumberTextUnitFormatOptions = NumberTextUnitFormatOptions & Required<UnitFormatOptions>;
8
+ type ResolvedNumberTextUnitFormatOptions = NumberTextUnitFormatOptions & Required<UnitFormatOptions>;
9
9
  /**
10
10
  * Format for numbers (with optional units) in a number-text table column.
11
11
  */
@@ -5,7 +5,7 @@ export declare const NumberTextFormat: {
5
5
  readonly default: undefined;
6
6
  readonly decimal: "decimal";
7
7
  };
8
- export declare type NumberTextFormat = (typeof NumberTextFormat)[keyof typeof NumberTextFormat];
8
+ export type NumberTextFormat = (typeof NumberTextFormat)[keyof typeof NumberTextFormat];
9
9
  /**
10
10
  * The aligment of the value in the number-text table column.
11
11
  * The `default` alignment is determined by the column's `NumberTextFormat`.
@@ -15,4 +15,4 @@ export declare const NumberTextAlignment: {
15
15
  readonly left: "left";
16
16
  readonly right: "right";
17
17
  };
18
- export declare type NumberTextAlignment = (typeof NumberTextAlignment)[keyof typeof NumberTextAlignment];
18
+ export type NumberTextAlignment = (typeof NumberTextAlignment)[keyof typeof NumberTextAlignment];
@@ -1,7 +1,7 @@
1
1
  import type { TableStringField } from '../../table/types';
2
2
  import { TableColumnTextBase } from '../text-base';
3
3
  import type { ColumnInternalsOptions } from '../base/models/column-internals';
4
- export declare type TableColumnTextCellRecord = TableStringField<'value'>;
4
+ export type TableColumnTextCellRecord = TableStringField<'value'>;
5
5
  export interface TableColumnTextColumnConfig {
6
6
  }
7
7
  declare global {
@@ -5,4 +5,4 @@ export declare const TextCellViewBaseAlignment: {
5
5
  readonly left: "left";
6
6
  readonly right: "right";
7
7
  };
8
- export declare type TextCellViewBaseAlignment = (typeof TextCellViewBaseAlignment)[keyof typeof TextCellViewBaseAlignment];
8
+ export type TextCellViewBaseAlignment = (typeof TextCellViewBaseAlignment)[keyof typeof TextCellViewBaseAlignment];
@@ -4,4 +4,4 @@ export declare const TextAreaAppearance: {
4
4
  readonly outline: "outline";
5
5
  readonly block: "block";
6
6
  };
7
- export declare type TextAreaAppearance = (typeof TextAreaAppearance)[keyof typeof TextAreaAppearance];
7
+ export type TextAreaAppearance = (typeof TextAreaAppearance)[keyof typeof TextAreaAppearance];
@@ -12,4 +12,4 @@ export declare const TextFieldAppearance: {
12
12
  readonly block: "block";
13
13
  readonly frameless: "frameless";
14
14
  };
15
- export declare type TextFieldAppearance = (typeof TextFieldAppearance)[keyof typeof TextFieldAppearance];
15
+ export type TextFieldAppearance = (typeof TextFieldAppearance)[keyof typeof TextFieldAppearance];
@@ -1,5 +1,5 @@
1
1
  import type * as TokensNamespace from './design-tokens';
2
- declare type TokenName = keyof typeof TokensNamespace;
2
+ type TokenName = keyof typeof TokensNamespace;
3
3
  export declare const comments: {
4
4
  readonly [key in TokenName]: string | null;
5
5
  };
@@ -3,7 +3,7 @@
3
3
  * See: https://github.com/ni/nimble/blob/main/packages/nimble-components/CONTRIBUTING.md#token-naming
4
4
  */
5
5
  import type * as TokensNamespace from './design-tokens';
6
- declare type TokenName = keyof typeof TokensNamespace;
6
+ type TokenName = keyof typeof TokensNamespace;
7
7
  export declare const tokenNames: {
8
8
  readonly [key in TokenName]: string;
9
9
  };
@@ -14,6 +14,6 @@ export declare const scssPropertySetterMarkdown: (tokenName: string, cssProperty
14
14
  export declare const scssInternalPropertyFromTokenName: (tokenName: string) => string;
15
15
  export declare const scssInternalPropertySetterMarkdown: (tokenName: string, property: string) => string;
16
16
  declare const tokenSuffixes: readonly ["RgbPartialColor", "FontColor", "FontLineHeight", "FontWeight", "FontSize", "TextTransform", "FontFamily", "BoxShadow", "MaxHeight", "MinWidth", "Font", "Size", "Width", "Height", "Delay", "Padding", "Color"];
17
- export declare type TokenSuffix = (typeof tokenSuffixes)[number];
17
+ export type TokenSuffix = (typeof tokenSuffixes)[number];
18
18
  export declare const suffixFromTokenName: (tokenName: string) => TokenSuffix | undefined;
19
19
  export {};
@@ -3,4 +3,4 @@ export declare const Theme: {
3
3
  readonly dark: "dark";
4
4
  readonly color: "color";
5
5
  };
6
- export declare type Theme = (typeof Theme)[keyof typeof Theme];
6
+ export type Theme = (typeof Theme)[keyof typeof Theme];
@@ -7,4 +7,4 @@ export declare const TooltipSeverity: {
7
7
  readonly error: "error";
8
8
  readonly information: "information";
9
9
  };
10
- export declare type TooltipSeverity = (typeof TooltipSeverity)[keyof typeof TooltipSeverity];
10
+ export type TooltipSeverity = (typeof TooltipSeverity)[keyof typeof TooltipSeverity];
@@ -5,4 +5,4 @@ export declare const TreeViewSelectionMode: {
5
5
  readonly leavesOnly: "leaves-only";
6
6
  readonly none: "none";
7
7
  };
8
- export declare type TreeViewSelectionMode = (typeof TreeViewSelectionMode)[keyof typeof TreeViewSelectionMode];
8
+ export type TreeViewSelectionMode = (typeof TreeViewSelectionMode)[keyof typeof TreeViewSelectionMode];
@@ -1,4 +1,4 @@
1
- declare type ObjectFromList<T extends readonly string[]> = {
1
+ type ObjectFromList<T extends readonly string[]> = {
2
2
  [K in T extends readonly (infer U)[] ? U : never]: boolean;
3
3
  };
4
4
  /**
@@ -2,4 +2,4 @@ export declare const ZIndexLevels: {
2
2
  readonly zIndex1: "1";
3
3
  readonly zIndex1000: "1000";
4
4
  };
5
- export declare type ZIndexLevels = (typeof ZIndexLevels)[keyof typeof ZIndexLevels];
5
+ export type ZIndexLevels = (typeof ZIndexLevels)[keyof typeof ZIndexLevels];
@@ -3,7 +3,7 @@ interface DecimalUnitFormatOptions extends UnitFormatOptions {
3
3
  minimumFractionDigits?: number;
4
4
  maximumFractionDigits?: number;
5
5
  }
6
- declare type ResolvedDecimalUnitFormatOptions = Required<DecimalUnitFormatOptions>;
6
+ type ResolvedDecimalUnitFormatOptions = Required<DecimalUnitFormatOptions>;
7
7
  /**
8
8
  * Format for decimal numbers with units.
9
9
  */
@@ -1,7 +1,7 @@
1
1
  import { UnitFormat, UnitFormatOptions } from './unit-format';
2
2
  interface DefaultUnitFormatOptions extends UnitFormatOptions {
3
3
  }
4
- declare type ResolvedDefaultUnitFormatOptions = Required<DefaultUnitFormatOptions>;
4
+ type ResolvedDefaultUnitFormatOptions = Required<DefaultUnitFormatOptions>;
5
5
  /**
6
6
  * Format for numbers with units to show in a tabular form.
7
7
  * Large and tiny numbers are shown exponentially and the rest as decimal.
@@ -3,7 +3,7 @@ export interface ScaledUnitFormatFactoryOptions {
3
3
  readonly locale: string;
4
4
  readonly intlNumberFormatOptions?: Intl.NumberFormatOptions;
5
5
  }
6
- declare type ScaledUnitFormatFactory = (scaledUnitFormatFactoryOptions: ScaledUnitFormatFactoryOptions) => ScaledUnitFormat;
6
+ type ScaledUnitFormatFactory = (scaledUnitFormatFactoryOptions: ScaledUnitFormatFactoryOptions) => ScaledUnitFormat;
7
7
  /**
8
8
  * A unit that represents a scaled version of a base unit.
9
9
  */
@@ -12,7 +12,7 @@ export declare class UnitTranslation {
12
12
  /**
13
13
  * A map of locales of string format "[lang]" or "[lang]-[region]", for example "en" and / or "en-us", to UnitTranslation objects
14
14
  */
15
- export declare type UnitTranslations = ReadonlyMap<string, UnitTranslation>;
15
+ export type UnitTranslations = ReadonlyMap<string, UnitTranslation>;
16
16
  export interface ManuallyTranslatedScaledUnitFormatOptions {
17
17
  /**
18
18
  * Translations for the unit by locale string.
@@ -1,9 +1,11 @@
1
1
  import { FoundationElement } from '@microsoft/fast-foundation';
2
2
  import { ZoomTransform } from 'd3-zoom';
3
+ import type { Table } from 'apache-arrow';
3
4
  import { DataManager } from './modules/data-manager';
4
5
  import { RenderingModule } from './modules/rendering';
5
6
  import { HoverDieOpacity, WaferMapColorScale, WaferMapColorScaleMode, WaferMapDie, WaferMapOrientation, WaferMapOriginLocation, WaferMapValidity } from './types';
6
7
  import { WaferMapUpdateTracker } from './modules/wafer-map-update-tracker';
8
+ import { WorkerRenderer } from './modules/worker-renderer';
7
9
  declare global {
8
10
  interface HTMLElementTagNameMap {
9
11
  'nimble-wafer-map': WaferMap;
@@ -47,7 +49,12 @@ export declare class WaferMap extends FoundationElement {
47
49
  /**
48
50
  * @internal
49
51
  */
50
- readonly renderer: RenderingModule;
52
+ readonly mainRenderer: RenderingModule;
53
+ /**
54
+ * @internal
55
+ */
56
+ readonly workerRenderer: WorkerRenderer;
57
+ renderer: RenderingModule | WorkerRenderer;
51
58
  /**
52
59
  * @internal
53
60
  */
@@ -86,6 +93,7 @@ export declare class WaferMap extends FoundationElement {
86
93
  hoverDie: WaferMapDie | undefined;
87
94
  highlightedTags: string[];
88
95
  dies: WaferMapDie[];
96
+ diesTable: Table | undefined;
89
97
  colorScale: WaferMapColorScale;
90
98
  private readonly eventCoordinator;
91
99
  private readonly resizeObserver;
@@ -102,6 +110,7 @@ export declare class WaferMap extends FoundationElement {
102
110
  * The hover does not require an event update, but it's also the last update in the sequence.
103
111
  */
104
112
  update(): void;
113
+ private validate;
105
114
  private createResizeObserver;
106
115
  private originLocationChanged;
107
116
  private gridMinXChanged;
@@ -114,6 +123,7 @@ export declare class WaferMap extends FoundationElement {
114
123
  private colorScaleModeChanged;
115
124
  private highlightedTagsChanged;
116
125
  private diesChanged;
126
+ private diesTableChanged;
117
127
  private colorScaleChanged;
118
128
  private transformChanged;
119
129
  private canvasWidthChanged;
@@ -10,6 +10,7 @@ import { EventCoordinator } from './modules/event-coordinator';
10
10
  import { HoverDieOpacity, WaferMapColorScaleMode, WaferMapOrientation, WaferMapOriginLocation } from './types';
11
11
  import { WaferMapUpdateTracker } from './modules/wafer-map-update-tracker';
12
12
  import { WaferMapValidator } from './modules/wafer-map-validator';
13
+ import { WorkerRenderer } from './modules/worker-renderer';
13
14
  /**
14
15
  * A nimble-styled WaferMap
15
16
  */
@@ -38,7 +39,12 @@ export class WaferMap extends FoundationElement {
38
39
  /**
39
40
  * @internal
40
41
  */
41
- this.renderer = new RenderingModule(this);
42
+ this.mainRenderer = new RenderingModule(this);
43
+ /**
44
+ * @internal
45
+ */
46
+ this.workerRenderer = new WorkerRenderer(this);
47
+ this.renderer = this.mainRenderer;
42
48
  /**
43
49
  * @internal
44
50
  */
@@ -97,9 +103,12 @@ export class WaferMap extends FoundationElement {
97
103
  * The hover does not require an event update, but it's also the last update in the sequence.
98
104
  */
99
105
  update() {
106
+ this.validate();
107
+ if (this.validity.invalidDiesTableSchema) {
108
+ return;
109
+ }
100
110
  if (this.waferMapUpdateTracker.requiresEventsUpdate) {
101
111
  this.eventCoordinator.detachEvents();
102
- this.waferMapValidator.validateGridDimensions();
103
112
  if (this.waferMapUpdateTracker.requiresContainerDimensionsUpdate) {
104
113
  this.dataManager.updateContainerDimensions();
105
114
  this.renderer.updateSortedDiesAndDrawWafer();
@@ -125,6 +134,10 @@ export class WaferMap extends FoundationElement {
125
134
  this.renderer.renderHover();
126
135
  }
127
136
  }
137
+ validate() {
138
+ this.waferMapValidator.validateGridDimensions();
139
+ this.waferMapValidator.validateDiesTableSchema();
140
+ }
128
141
  createResizeObserver() {
129
142
  const resizeObserver = new ResizeObserver(entries => {
130
143
  const entry = entries[0];
@@ -183,6 +196,16 @@ export class WaferMap extends FoundationElement {
183
196
  }
184
197
  diesChanged() {
185
198
  this.waferMapUpdateTracker.track('dies');
199
+ this.renderer = this.diesTable === undefined
200
+ ? this.mainRenderer
201
+ : this.workerRenderer;
202
+ this.waferMapUpdateTracker.queueUpdate();
203
+ }
204
+ diesTableChanged() {
205
+ this.waferMapUpdateTracker.track('dies');
206
+ this.renderer = this.diesTable === undefined
207
+ ? this.mainRenderer
208
+ : this.workerRenderer;
186
209
  this.waferMapUpdateTracker.queueUpdate();
187
210
  }
188
211
  colorScaleChanged() {
@@ -237,6 +260,9 @@ __decorate([
237
260
  __decorate([
238
261
  attr({ attribute: 'color-scale-mode' })
239
262
  ], WaferMap.prototype, "colorScaleMode", void 0);
263
+ __decorate([
264
+ observable
265
+ ], WaferMap.prototype, "renderer", void 0);
240
266
  __decorate([
241
267
  observable
242
268
  ], WaferMap.prototype, "canvasWidth", void 0);
@@ -267,6 +293,9 @@ __decorate([
267
293
  __decorate([
268
294
  observable
269
295
  ], WaferMap.prototype, "dies", void 0);
296
+ __decorate([
297
+ observable
298
+ ], WaferMap.prototype, "diesTable", void 0);
270
299
  __decorate([
271
300
  observable
272
301
  ], WaferMap.prototype, "colorScale", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/wafer-map/index.ts"],"names":[],"mappings":";AAAA,OAAO,EACH,IAAI,EACJ,uBAAuB,EACvB,UAAU,EACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAiB,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EACH,eAAe,EAEf,sBAAsB,EAEtB,mBAAmB,EACnB,sBAAsB,EAEzB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAQlE;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,iBAAiB;IAA/C;;QACI;;;WAGG;QACa,0BAAqB,GAAG,IAAI,qBAAqB,CAAC,IAAI,CAAC,CAAC;QAGjE,mBAAc,GAA2B,sBAAsB,CAAC,UAAU,CAAC;QAG3E,aAAQ,GAAY,SAAS,CAAC;QAG9B,aAAQ,GAAY,SAAS,CAAC;QAG9B,aAAQ,GAAY,SAAS,CAAC;QAG9B,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EAAE,CAAC;iDAC3B;AAG/B;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;iDACb;AAG5B;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;gDACsC;AAkClE;IAAX,UAAU;6CAA6B;AAK5B;IAAX,UAAU;8CAA8B;AAK7B;IAAX,UAAU;2CAAgD;AAK/C;IAAX,UAAU;gDAA4B;AAK3B;IAAX,UAAU;8CAA6D;AAK5D;IAAX,UAAU;4CAAuB;AAKtB;IAAX,UAAU;6CAAwB;AAKvB;IAAX,UAAU;0CAA0C;AAEzC;IAAX,UAAU;iDAAuC;AACtC;IAAX,UAAU;sCAAiC;AAChC;IAAX,UAAU;4CAGT;AAgKN,MAAM,cAAc,GAAG,QAAQ,CAAC,OAAO,CAAC;IACpC,QAAQ,EAAE,WAAW;IACrB,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC","sourcesContent":["import {\n attr,\n nullableNumberConverter,\n observable\n} from '@microsoft/fast-element';\nimport { DesignSystem, FoundationElement } from '@microsoft/fast-foundation';\nimport { zoomIdentity, ZoomTransform } from 'd3-zoom';\nimport { template } from './template';\nimport { styles } from './styles';\nimport { DataManager } from './modules/data-manager';\nimport { RenderingModule } from './modules/rendering';\nimport { EventCoordinator } from './modules/event-coordinator';\nimport {\n HoverDieOpacity,\n WaferMapColorScale,\n WaferMapColorScaleMode,\n WaferMapDie,\n WaferMapOrientation,\n WaferMapOriginLocation,\n WaferMapValidity\n} from './types';\nimport { WaferMapUpdateTracker } from './modules/wafer-map-update-tracker';\nimport { WaferMapValidator } from './modules/wafer-map-validator';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-wafer-map': WaferMap;\n }\n}\n\n/**\n * A nimble-styled WaferMap\n */\nexport class WaferMap extends FoundationElement {\n /**\n * @internal\n * needs to be initialized before the properties trigger changes\n */\n public readonly waferMapUpdateTracker = new WaferMapUpdateTracker(this);\n\n @attr({ attribute: 'origin-location' })\n public originLocation: WaferMapOriginLocation = WaferMapOriginLocation.bottomLeft;\n\n @attr({ attribute: 'grid-min-x', converter: nullableNumberConverter })\n public gridMinX?: number = undefined;\n\n @attr({ attribute: 'grid-max-x', converter: nullableNumberConverter })\n public gridMaxX?: number = undefined;\n\n @attr({ attribute: 'grid-min-y', converter: nullableNumberConverter })\n public gridMinY?: number = undefined;\n\n @attr({ attribute: 'grid-max-y', converter: nullableNumberConverter })\n public gridMaxY?: number = undefined;\n\n @attr\n public orientation: WaferMapOrientation = WaferMapOrientation.top;\n\n @attr({ attribute: 'max-characters', converter: nullableNumberConverter })\n public maxCharacters = 4;\n\n @attr({ attribute: 'die-labels-hidden', mode: 'boolean' })\n public dieLabelsHidden = false;\n\n @attr({ attribute: 'die-labels-suffix' })\n public dieLabelsSuffix = '';\n\n @attr({ attribute: 'color-scale-mode' })\n public colorScaleMode: WaferMapColorScaleMode = WaferMapColorScaleMode.linear;\n\n /**\n * @internal\n */\n public readonly canvas!: HTMLCanvasElement;\n\n /**\n * @internal\n */\n public canvasContext!: CanvasRenderingContext2D;\n\n /**\n * @internal\n */\n public readonly zoomContainer!: HTMLElement;\n\n /**\n * @internal\n */\n public readonly dataManager = new DataManager(this);\n /**\n * @internal\n */\n public readonly renderer = new RenderingModule(this);\n\n /**\n * @internal\n */\n public renderQueued = false;\n\n /**\n * @internal\n */\n @observable public canvasWidth!: number;\n\n /**\n * @internal\n */\n @observable public canvasHeight!: number;\n\n /**\n * @internal\n */\n @observable public transform: ZoomTransform = zoomIdentity;\n\n /**\n * @internal\n */\n @observable public hoverTransform = '';\n\n /**\n * @internal\n */\n @observable public hoverOpacity: HoverDieOpacity = HoverDieOpacity.hide;\n\n /**\n * @internal\n */\n @observable public hoverWidth = 0;\n\n /**\n * @internal\n */\n @observable public hoverHeight = 0;\n\n /**\n * @internal\n */\n @observable public hoverDie: WaferMapDie | undefined;\n\n @observable public highlightedTags: string[] = [];\n @observable public dies: WaferMapDie[] = [];\n @observable public colorScale: WaferMapColorScale = {\n colors: [],\n values: []\n };\n\n private readonly eventCoordinator = new EventCoordinator(this);\n private readonly resizeObserver = this.createResizeObserver();\n private readonly waferMapValidator = new WaferMapValidator(this);\n\n public get validity(): WaferMapValidity {\n return this.waferMapValidator.getValidity();\n }\n\n public override connectedCallback(): void {\n super.connectedCallback();\n this.canvasContext = this.canvas.getContext('2d', {\n willReadFrequently: true\n })!;\n this.resizeObserver.observe(this);\n this.waferMapUpdateTracker.trackAll();\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.resizeObserver.unobserve(this);\n }\n\n /**\n * @internal\n * Update function called when an update is queued.\n * It will check which updates are needed based on which properties have changed.\n * Each update represents a different starting point of the same sequential update flow.\n * The updates snowball one after the other, this function only choses the 'altitude'.\n * The hover does not require an event update, but it's also the last update in the sequence.\n */\n public update(): void {\n if (this.waferMapUpdateTracker.requiresEventsUpdate) {\n this.eventCoordinator.detachEvents();\n this.waferMapValidator.validateGridDimensions();\n if (this.waferMapUpdateTracker.requiresContainerDimensionsUpdate) {\n this.dataManager.updateContainerDimensions();\n this.renderer.updateSortedDiesAndDrawWafer();\n } else if (this.waferMapUpdateTracker.requiresScalesUpdate) {\n this.dataManager.updateScales();\n this.renderer.updateSortedDiesAndDrawWafer();\n } else if (\n this.waferMapUpdateTracker.requiresLabelsFontSizeUpdate\n ) {\n this.dataManager.updateLabelsFontSize();\n this.renderer.updateSortedDiesAndDrawWafer();\n } else if (\n this.waferMapUpdateTracker.requiresDiesRenderInfoUpdate\n ) {\n this.dataManager.updateDiesRenderInfo();\n this.renderer.updateSortedDiesAndDrawWafer();\n } else if (this.waferMapUpdateTracker.requiresDrawnWaferUpdate) {\n this.renderer.drawWafer();\n }\n this.eventCoordinator.attachEvents();\n } else if (this.waferMapUpdateTracker.requiresRenderHoverUpdate) {\n this.renderer.renderHover();\n }\n }\n\n private createResizeObserver(): ResizeObserver {\n const resizeObserver = new ResizeObserver(entries => {\n const entry = entries[0];\n if (entry === undefined) {\n return;\n }\n const { height, width } = entry.contentRect;\n // Updating the canvas size clears its contents so update it explicitly instead of\n // via template bindings so we can confirm that it happens before render\n this.canvas.width = width;\n this.canvas.height = height;\n this.canvasWidth = width;\n this.canvasHeight = height;\n });\n return resizeObserver;\n }\n\n private originLocationChanged(): void {\n this.waferMapUpdateTracker.track('originLocation');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private gridMinXChanged(): void {\n this.waferMapUpdateTracker.track('gridMinX');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private gridMaxXChanged(): void {\n this.waferMapUpdateTracker.track('gridMaxX');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private gridMinYChanged(): void {\n this.waferMapUpdateTracker.track('gridMinY');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private gridMaxYChanged(): void {\n this.waferMapUpdateTracker.track('gridMaxY');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private maxCharactersChanged(): void {\n this.waferMapUpdateTracker.track('maxCharacters');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private dieLabelsHiddenChanged(): void {\n this.waferMapUpdateTracker.track('dieLabelsHidden');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private dieLabelsSuffixChanged(): void {\n this.waferMapUpdateTracker.track('dieLabelsSuffix');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private colorScaleModeChanged(): void {\n this.waferMapUpdateTracker.track('colorScaleMode');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private highlightedTagsChanged(): void {\n this.waferMapUpdateTracker.track('highlightedTags');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private diesChanged(): void {\n this.waferMapUpdateTracker.track('dies');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private colorScaleChanged(): void {\n this.waferMapUpdateTracker.track('colorScale');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private transformChanged(): void {\n this.waferMapUpdateTracker.track('transform');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private canvasWidthChanged(): void {\n this.waferMapUpdateTracker.track('canvasWidth');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private canvasHeightChanged(): void {\n this.waferMapUpdateTracker.track('canvasHeight');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private hoverDieChanged(): void {\n this.$emit('die-hover', { currentDie: this.hoverDie });\n this.waferMapUpdateTracker.track('hoverDie');\n this.waferMapUpdateTracker.queueUpdate();\n }\n}\n\nconst nimbleWaferMap = WaferMap.compose({\n baseName: 'wafer-map',\n template,\n styles\n});\n\nDesignSystem.getOrCreate().withPrefix('nimble').register(nimbleWaferMap());\nexport const waferMapTag = 'nimble-wafer-map';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/wafer-map/index.ts"],"names":[],"mappings":";AAAA,OAAO,EACH,IAAI,EACJ,uBAAuB,EACvB,UAAU,EACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAiB,MAAM,SAAS,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EACH,eAAe,EAEf,sBAAsB,EAEtB,mBAAmB,EACnB,sBAAsB,EAEzB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCA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AAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;gDACsC;AA+B9E;IADC,UAAU;0CAC2D;AAU1D;IAAX,UAAU;6CAA6B;AAK5B;IAAX,UAAU;8CAA8B;AAK7B;IAAX,UAAU;2CAAgD;AAK/C;IAAX,UAAU;gDAA4B;AAK3B;IAAX,UAAU;8CAA6D;AAK5D;IAAX,UAAU;4CAAuB;AAKtB;IAAX,UAAU;6CAAwB;AAKvB;IAAX,UAAU;0CAA0C;AAEzC;IAAX,UAAU;iDAAuC;AACtC;IAAX,UAAU;sCAAiC;AAChC;IAAX,UAAU;2CAAqC;AAEpC;IAAX,UAAU;4CAGT;AAmLN,MAAM,cAAc,GAAG,QAAQ,CAAC,OAAO,CAAC;IACpC,QAAQ,EAAE,WAAW;IACrB,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC","sourcesContent":["import {\n attr,\n nullableNumberConverter,\n observable\n} from '@microsoft/fast-element';\nimport { DesignSystem, FoundationElement } from '@microsoft/fast-foundation';\nimport { zoomIdentity, ZoomTransform } from 'd3-zoom';\nimport type { Table } from 'apache-arrow';\nimport { template } from './template';\nimport { styles } from './styles';\nimport { DataManager } from './modules/data-manager';\nimport { RenderingModule } from './modules/rendering';\nimport { EventCoordinator } from './modules/event-coordinator';\nimport {\n HoverDieOpacity,\n WaferMapColorScale,\n WaferMapColorScaleMode,\n WaferMapDie,\n WaferMapOrientation,\n WaferMapOriginLocation,\n WaferMapValidity\n} from './types';\nimport { WaferMapUpdateTracker } from './modules/wafer-map-update-tracker';\nimport { WaferMapValidator } from './modules/wafer-map-validator';\nimport { WorkerRenderer } from './modules/worker-renderer';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-wafer-map': WaferMap;\n }\n}\n\n/**\n * A nimble-styled WaferMap\n */\nexport class WaferMap extends FoundationElement {\n /**\n * @internal\n * needs to be initialized before the properties trigger changes\n */\n public readonly waferMapUpdateTracker = new WaferMapUpdateTracker(this);\n\n @attr({ attribute: 'origin-location' })\n public originLocation: WaferMapOriginLocation = WaferMapOriginLocation.bottomLeft;\n\n @attr({ attribute: 'grid-min-x', converter: nullableNumberConverter })\n public gridMinX?: number = undefined;\n\n @attr({ attribute: 'grid-max-x', converter: nullableNumberConverter })\n public gridMaxX?: number = undefined;\n\n @attr({ attribute: 'grid-min-y', converter: nullableNumberConverter })\n public gridMinY?: number = undefined;\n\n @attr({ attribute: 'grid-max-y', converter: nullableNumberConverter })\n public gridMaxY?: number = undefined;\n\n @attr\n public orientation: WaferMapOrientation = WaferMapOrientation.top;\n\n @attr({ attribute: 'max-characters', converter: nullableNumberConverter })\n public maxCharacters = 4;\n\n @attr({ attribute: 'die-labels-hidden', mode: 'boolean' })\n public dieLabelsHidden = false;\n\n @attr({ attribute: 'die-labels-suffix' })\n public dieLabelsSuffix = '';\n\n @attr({ attribute: 'color-scale-mode' })\n public colorScaleMode: WaferMapColorScaleMode = WaferMapColorScaleMode.linear;\n\n /**\n * @internal\n */\n public readonly canvas!: HTMLCanvasElement;\n\n /**\n * @internal\n */\n public canvasContext!: CanvasRenderingContext2D;\n\n /**\n * @internal\n */\n public readonly zoomContainer!: HTMLElement;\n\n /**\n * @internal\n */\n public readonly dataManager = new DataManager(this);\n /**\n * @internal\n */\n public readonly mainRenderer = new RenderingModule(this);\n /**\n * @internal\n */\n public readonly workerRenderer = new WorkerRenderer(this);\n\n @observable\n public renderer: RenderingModule | WorkerRenderer = this.mainRenderer;\n\n /**\n * @internal\n */\n public renderQueued = false;\n\n /**\n * @internal\n */\n @observable public canvasWidth!: number;\n\n /**\n * @internal\n */\n @observable public canvasHeight!: number;\n\n /**\n * @internal\n */\n @observable public transform: ZoomTransform = zoomIdentity;\n\n /**\n * @internal\n */\n @observable public hoverTransform = '';\n\n /**\n * @internal\n */\n @observable public hoverOpacity: HoverDieOpacity = HoverDieOpacity.hide;\n\n /**\n * @internal\n */\n @observable public hoverWidth = 0;\n\n /**\n * @internal\n */\n @observable public hoverHeight = 0;\n\n /**\n * @internal\n */\n @observable public hoverDie: WaferMapDie | undefined;\n\n @observable public highlightedTags: string[] = [];\n @observable public dies: WaferMapDie[] = [];\n @observable public diesTable: Table | undefined;\n\n @observable public colorScale: WaferMapColorScale = {\n colors: [],\n values: []\n };\n\n private readonly eventCoordinator = new EventCoordinator(this);\n private readonly resizeObserver = this.createResizeObserver();\n private readonly waferMapValidator = new WaferMapValidator(this);\n\n public get validity(): WaferMapValidity {\n return this.waferMapValidator.getValidity();\n }\n\n public override connectedCallback(): void {\n super.connectedCallback();\n this.canvasContext = this.canvas.getContext('2d', {\n willReadFrequently: true\n })!;\n this.resizeObserver.observe(this);\n this.waferMapUpdateTracker.trackAll();\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.resizeObserver.unobserve(this);\n }\n\n /**\n * @internal\n * Update function called when an update is queued.\n * It will check which updates are needed based on which properties have changed.\n * Each update represents a different starting point of the same sequential update flow.\n * The updates snowball one after the other, this function only choses the 'altitude'.\n * The hover does not require an event update, but it's also the last update in the sequence.\n */\n public update(): void {\n this.validate();\n if (this.validity.invalidDiesTableSchema) {\n return;\n }\n if (this.waferMapUpdateTracker.requiresEventsUpdate) {\n this.eventCoordinator.detachEvents();\n if (this.waferMapUpdateTracker.requiresContainerDimensionsUpdate) {\n this.dataManager.updateContainerDimensions();\n this.renderer.updateSortedDiesAndDrawWafer();\n } else if (this.waferMapUpdateTracker.requiresScalesUpdate) {\n this.dataManager.updateScales();\n this.renderer.updateSortedDiesAndDrawWafer();\n } else if (\n this.waferMapUpdateTracker.requiresLabelsFontSizeUpdate\n ) {\n this.dataManager.updateLabelsFontSize();\n this.renderer.updateSortedDiesAndDrawWafer();\n } else if (\n this.waferMapUpdateTracker.requiresDiesRenderInfoUpdate\n ) {\n this.dataManager.updateDiesRenderInfo();\n this.renderer.updateSortedDiesAndDrawWafer();\n } else if (this.waferMapUpdateTracker.requiresDrawnWaferUpdate) {\n this.renderer.drawWafer();\n }\n this.eventCoordinator.attachEvents();\n } else if (this.waferMapUpdateTracker.requiresRenderHoverUpdate) {\n this.renderer.renderHover();\n }\n }\n\n private validate(): void {\n this.waferMapValidator.validateGridDimensions();\n this.waferMapValidator.validateDiesTableSchema();\n }\n\n private createResizeObserver(): ResizeObserver {\n const resizeObserver = new ResizeObserver(entries => {\n const entry = entries[0];\n if (entry === undefined) {\n return;\n }\n const { height, width } = entry.contentRect;\n // Updating the canvas size clears its contents so update it explicitly instead of\n // via template bindings so we can confirm that it happens before render\n this.canvas.width = width;\n this.canvas.height = height;\n this.canvasWidth = width;\n this.canvasHeight = height;\n });\n return resizeObserver;\n }\n\n private originLocationChanged(): void {\n this.waferMapUpdateTracker.track('originLocation');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private gridMinXChanged(): void {\n this.waferMapUpdateTracker.track('gridMinX');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private gridMaxXChanged(): void {\n this.waferMapUpdateTracker.track('gridMaxX');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private gridMinYChanged(): void {\n this.waferMapUpdateTracker.track('gridMinY');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private gridMaxYChanged(): void {\n this.waferMapUpdateTracker.track('gridMaxY');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private maxCharactersChanged(): void {\n this.waferMapUpdateTracker.track('maxCharacters');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private dieLabelsHiddenChanged(): void {\n this.waferMapUpdateTracker.track('dieLabelsHidden');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private dieLabelsSuffixChanged(): void {\n this.waferMapUpdateTracker.track('dieLabelsSuffix');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private colorScaleModeChanged(): void {\n this.waferMapUpdateTracker.track('colorScaleMode');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private highlightedTagsChanged(): void {\n this.waferMapUpdateTracker.track('highlightedTags');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private diesChanged(): void {\n this.waferMapUpdateTracker.track('dies');\n this.renderer = this.diesTable === undefined\n ? this.mainRenderer\n : this.workerRenderer;\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private diesTableChanged(): void {\n this.waferMapUpdateTracker.track('dies');\n this.renderer = this.diesTable === undefined\n ? this.mainRenderer\n : this.workerRenderer;\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private colorScaleChanged(): void {\n this.waferMapUpdateTracker.track('colorScale');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private transformChanged(): void {\n this.waferMapUpdateTracker.track('transform');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private canvasWidthChanged(): void {\n this.waferMapUpdateTracker.track('canvasWidth');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private canvasHeightChanged(): void {\n this.waferMapUpdateTracker.track('canvasHeight');\n this.waferMapUpdateTracker.queueUpdate();\n }\n\n private hoverDieChanged(): void {\n this.$emit('die-hover', { currentDie: this.hoverDie });\n this.waferMapUpdateTracker.track('hoverDie');\n this.waferMapUpdateTracker.queueUpdate();\n }\n}\n\nconst nimbleWaferMap = WaferMap.compose({\n baseName: 'wafer-map',\n template,\n styles\n});\n\nDesignSystem.getOrCreate().withPrefix('nimble').register(nimbleWaferMap());\nexport const waferMapTag = 'nimble-wafer-map';\n"]}
@@ -5,11 +5,6 @@ import { WaferMapOriginLocation } from '../types';
5
5
  * Computations calculates and stores different measures which are used in the Wafermap
6
6
  */
7
7
  export class Computations {
8
- constructor(wafermap) {
9
- this.wafermap = wafermap;
10
- this.defaultPadding = 0;
11
- this.baseMarginPercentage = 0.04;
12
- }
13
8
  get containerDimensions() {
14
9
  return this._containerDimensions;
15
10
  }
@@ -34,6 +29,11 @@ export class Computations {
34
29
  get invertedVerticalScale() {
35
30
  return this._invertedVerticalScale;
36
31
  }
32
+ constructor(wafermap) {
33
+ this.wafermap = wafermap;
34
+ this.defaultPadding = 0;
35
+ this.baseMarginPercentage = 0.04;
36
+ }
37
37
  updateContainerDimensions() {
38
38
  const canvasDimensions = {
39
39
  width: this.wafermap.canvasWidth,