@ni/nimble-components 22.0.1 → 22.1.0
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.
- package/dist/all-components-bundle.js +83 -45
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +2293 -2291
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/label-provider/table/index.d.ts +6 -0
- package/dist/esm/label-provider/table/index.js +10 -2
- package/dist/esm/label-provider/table/index.js.map +1 -1
- package/dist/esm/label-provider/table/label-token-defaults.js +3 -1
- package/dist/esm/label-provider/table/label-token-defaults.js.map +1 -1
- package/dist/esm/label-provider/table/label-tokens.d.ts +2 -0
- package/dist/esm/label-provider/table/label-tokens.js +8 -0
- package/dist/esm/label-provider/table/label-tokens.js.map +1 -1
- package/dist/esm/table-column/date-text/group-header-view/index.d.ts +1 -3
- package/dist/esm/table-column/date-text/group-header-view/index.js +0 -6
- package/dist/esm/table-column/date-text/group-header-view/index.js.map +1 -1
- package/dist/esm/table-column/duration-text/group-header-view/index.d.ts +1 -3
- package/dist/esm/table-column/duration-text/group-header-view/index.js +0 -6
- package/dist/esm/table-column/duration-text/group-header-view/index.js.map +1 -1
- package/dist/esm/table-column/enum-text/group-header-view/index.d.ts +1 -3
- package/dist/esm/table-column/enum-text/group-header-view/index.js +1 -12
- package/dist/esm/table-column/enum-text/group-header-view/index.js.map +1 -1
- package/dist/esm/table-column/icon/group-header-view/index.d.ts +1 -3
- package/dist/esm/table-column/icon/group-header-view/index.js +2 -10
- package/dist/esm/table-column/icon/group-header-view/index.js.map +1 -1
- package/dist/esm/table-column/icon/group-header-view/template.js +6 -0
- package/dist/esm/table-column/icon/group-header-view/template.js.map +1 -1
- package/dist/esm/table-column/number-text/group-header-view/index.d.ts +1 -3
- package/dist/esm/table-column/number-text/group-header-view/index.js +0 -6
- package/dist/esm/table-column/number-text/group-header-view/index.js.map +1 -1
- package/dist/esm/table-column/text/group-header-view/index.d.ts +1 -1
- package/dist/esm/table-column/text/group-header-view/index.js +1 -1
- package/dist/esm/table-column/text/group-header-view/index.js.map +1 -1
- package/dist/esm/table-column/text-base/group-header-view/index.d.ts +16 -0
- package/dist/esm/table-column/text-base/group-header-view/index.js +53 -1
- package/dist/esm/table-column/text-base/group-header-view/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -19,6 +19,8 @@ declare const supportedLabels: {
|
|
|
19
19
|
readonly rowSelect: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
20
20
|
readonly rowOperationColumn: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
21
21
|
readonly rowLoading: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
22
|
+
readonly groupRowPlaceholderNoValue: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
23
|
+
readonly groupRowPlaceholderEmpty: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
22
24
|
};
|
|
23
25
|
/**
|
|
24
26
|
* Label provider for the Nimble table (and its sub-components and columns)
|
|
@@ -38,6 +40,8 @@ export declare class LabelProviderTable extends LabelProviderBase<typeof support
|
|
|
38
40
|
rowSelect: string | undefined;
|
|
39
41
|
rowOperationColumn: string | undefined;
|
|
40
42
|
rowLoading: string | undefined;
|
|
43
|
+
groupRowPlaceholderNoValue: string | undefined;
|
|
44
|
+
groupRowPlaceholderEmpty: string | undefined;
|
|
41
45
|
protected readonly supportedLabels: {
|
|
42
46
|
readonly groupCollapse: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
43
47
|
readonly groupExpand: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
@@ -53,6 +57,8 @@ export declare class LabelProviderTable extends LabelProviderBase<typeof support
|
|
|
53
57
|
readonly rowSelect: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
54
58
|
readonly rowOperationColumn: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
55
59
|
readonly rowLoading: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
60
|
+
readonly groupRowPlaceholderNoValue: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
61
|
+
readonly groupRowPlaceholderEmpty: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
56
62
|
};
|
|
57
63
|
}
|
|
58
64
|
export declare const labelProviderTableTag = "nimble-label-provider-table";
|
|
@@ -2,7 +2,7 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { attr } from '@microsoft/fast-element';
|
|
3
3
|
import { DesignSystem } from '@microsoft/fast-foundation';
|
|
4
4
|
import { LabelProviderBase } from '../base';
|
|
5
|
-
import { tableCellActionMenuLabel, tableColumnHeaderGroupedLabel, tableColumnHeaderSortedAscendingLabel, tableColumnHeaderSortedDescendingLabel, tableGroupCollapseLabel, tableGroupExpandLabel, tableGroupSelectAllLabel, tableCollapseAllLabel, tableRowCollapseLabel, tableRowExpandLabel, tableRowOperationColumnLabel, tableRowSelectLabel, tableSelectAllLabel, tableRowLoadingLabel } from './label-tokens';
|
|
5
|
+
import { tableCellActionMenuLabel, tableColumnHeaderGroupedLabel, tableColumnHeaderSortedAscendingLabel, tableColumnHeaderSortedDescendingLabel, tableGroupCollapseLabel, tableGroupExpandLabel, tableGroupSelectAllLabel, tableCollapseAllLabel, tableRowCollapseLabel, tableRowExpandLabel, tableRowOperationColumnLabel, tableRowSelectLabel, tableSelectAllLabel, tableRowLoadingLabel, tableGroupRowPlaceholderEmptyLabel, tableGroupRowPlaceholderNoValueLabel } from './label-tokens';
|
|
6
6
|
const supportedLabels = {
|
|
7
7
|
groupCollapse: tableGroupCollapseLabel,
|
|
8
8
|
groupExpand: tableGroupExpandLabel,
|
|
@@ -17,7 +17,9 @@ const supportedLabels = {
|
|
|
17
17
|
groupSelectAll: tableGroupSelectAllLabel,
|
|
18
18
|
rowSelect: tableRowSelectLabel,
|
|
19
19
|
rowOperationColumn: tableRowOperationColumnLabel,
|
|
20
|
-
rowLoading: tableRowLoadingLabel
|
|
20
|
+
rowLoading: tableRowLoadingLabel,
|
|
21
|
+
groupRowPlaceholderNoValue: tableGroupRowPlaceholderNoValueLabel,
|
|
22
|
+
groupRowPlaceholderEmpty: tableGroupRowPlaceholderEmptyLabel
|
|
21
23
|
};
|
|
22
24
|
/**
|
|
23
25
|
* Label provider for the Nimble table (and its sub-components and columns)
|
|
@@ -70,6 +72,12 @@ __decorate([
|
|
|
70
72
|
__decorate([
|
|
71
73
|
attr({ attribute: 'row-loading' })
|
|
72
74
|
], LabelProviderTable.prototype, "rowLoading", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
attr({ attribute: 'group-row-placeholder-no-value' })
|
|
77
|
+
], LabelProviderTable.prototype, "groupRowPlaceholderNoValue", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
attr({ attribute: 'group-row-placeholder-empty' })
|
|
80
|
+
], LabelProviderTable.prototype, "groupRowPlaceholderEmpty", void 0);
|
|
73
81
|
const nimbleLabelProviderTable = LabelProviderTable.compose({
|
|
74
82
|
baseName: 'label-provider-table'
|
|
75
83
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/label-provider/table/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAmB,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EACH,wBAAwB,EACxB,6BAA6B,EAC7B,qCAAqC,EACrC,sCAAsC,EACtC,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,4BAA4B,EAC5B,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/label-provider/table/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAA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E,SAAS,EAAE,cAAc,EAAE,CAAC;uDACG;AAGvC;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;0DACE;AAG1C;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,uBAAuB,EAAE,CAAC;+DACE;AAG/C;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,gCAAgC,EAAE,CAAC;uEACC;AAGvD;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,iCAAiC,EAAE,CAAC;wEACC;AAGxD;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;qDACG;AAGrC;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;0DACE;AAG1C;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;qDACG;AAGrC;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,sBAAsB,EAAE,CAAC;8DACE;AAG9C;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;sDACG;AAGtC;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,gCAAgC,EAAE,CAAC;sEACA;AAGtD;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,6BAA6B,EAAE,CAAC;oEACC;AAKxD,MAAM,wBAAwB,GAAG,kBAAkB,CAAC,OAAO,CAAC;IACxD,QAAQ,EAAE,sBAAsB;CACnC,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE;KACrB,UAAU,CAAC,QAAQ,CAAC;KACpB,QAAQ,CAAC,wBAAwB,EAAE,CAAC,CAAC;AAC1C,MAAM,CAAC,MAAM,qBAAqB,GAAG,6BAA6B,CAAC","sourcesContent":["import { attr } from '@microsoft/fast-element';\nimport { DesignSystem } from '@microsoft/fast-foundation';\nimport { DesignTokensFor, LabelProviderBase } from '../base';\nimport {\n tableCellActionMenuLabel,\n tableColumnHeaderGroupedLabel,\n tableColumnHeaderSortedAscendingLabel,\n tableColumnHeaderSortedDescendingLabel,\n tableGroupCollapseLabel,\n tableGroupExpandLabel,\n tableGroupSelectAllLabel,\n tableCollapseAllLabel,\n tableRowCollapseLabel,\n tableRowExpandLabel,\n tableRowOperationColumnLabel,\n tableRowSelectLabel,\n tableSelectAllLabel,\n tableRowLoadingLabel,\n tableGroupRowPlaceholderEmptyLabel,\n tableGroupRowPlaceholderNoValueLabel\n} from './label-tokens';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-label-provider-table': LabelProviderTable;\n }\n}\n\nconst supportedLabels = {\n groupCollapse: tableGroupCollapseLabel,\n groupExpand: tableGroupExpandLabel,\n rowCollapse: tableRowCollapseLabel,\n rowExpand: tableRowExpandLabel,\n collapseAll: tableCollapseAllLabel,\n cellActionMenu: tableCellActionMenuLabel,\n columnHeaderGrouped: tableColumnHeaderGroupedLabel,\n columnHeaderSortedAscending: tableColumnHeaderSortedAscendingLabel,\n columnHeaderSortedDescending: tableColumnHeaderSortedDescendingLabel,\n selectAll: tableSelectAllLabel,\n groupSelectAll: tableGroupSelectAllLabel,\n rowSelect: tableRowSelectLabel,\n rowOperationColumn: tableRowOperationColumnLabel,\n rowLoading: tableRowLoadingLabel,\n groupRowPlaceholderNoValue: tableGroupRowPlaceholderNoValueLabel,\n groupRowPlaceholderEmpty: tableGroupRowPlaceholderEmptyLabel\n} as const;\n\n/**\n * Label provider for the Nimble table (and its sub-components and columns)\n */\nexport class LabelProviderTable\n extends LabelProviderBase<typeof supportedLabels>\n implements DesignTokensFor<typeof supportedLabels> {\n @attr({ attribute: 'group-collapse' })\n public groupCollapse: string | undefined;\n\n @attr({ attribute: 'group-expand' })\n public groupExpand: string | undefined;\n\n @attr({ attribute: 'row-collapse' })\n public rowCollapse: string | undefined;\n\n @attr({ attribute: 'row-expand' })\n public rowExpand: string | undefined;\n\n @attr({ attribute: 'collapse-all' })\n public collapseAll: string | undefined;\n\n @attr({ attribute: 'cell-action-menu' })\n public cellActionMenu: string | undefined;\n\n @attr({ attribute: 'column-header-grouped' })\n public columnHeaderGrouped: string | undefined;\n\n @attr({ attribute: 'column-header-sorted-ascending' })\n public columnHeaderSortedAscending: string | undefined;\n\n @attr({ attribute: 'column-header-sorted-descending' })\n public columnHeaderSortedDescending: string | undefined;\n\n @attr({ attribute: 'select-all' })\n public selectAll: string | undefined;\n\n @attr({ attribute: 'group-select-all' })\n public groupSelectAll: string | undefined;\n\n @attr({ attribute: 'row-select' })\n public rowSelect: string | undefined;\n\n @attr({ attribute: 'row-operation-column' })\n public rowOperationColumn: string | undefined;\n\n @attr({ attribute: 'row-loading' })\n public rowLoading: string | undefined;\n\n @attr({ attribute: 'group-row-placeholder-no-value' })\n public groupRowPlaceholderNoValue: string | undefined;\n\n @attr({ attribute: 'group-row-placeholder-empty' })\n public groupRowPlaceholderEmpty: string | undefined;\n\n protected override readonly supportedLabels = supportedLabels;\n}\n\nconst nimbleLabelProviderTable = LabelProviderTable.compose({\n baseName: 'label-provider-table'\n});\n\nDesignSystem.getOrCreate()\n .withPrefix('nimble')\n .register(nimbleLabelProviderTable());\nexport const labelProviderTableTag = 'nimble-label-provider-table';\n"]}
|
|
@@ -12,6 +12,8 @@ export const tableLabelDefaults = {
|
|
|
12
12
|
tableGroupSelectAllLabel: 'Select all rows in group',
|
|
13
13
|
tableRowSelectLabel: 'Select row',
|
|
14
14
|
tableRowOperationColumnLabel: 'Row operations',
|
|
15
|
-
tableRowLoadingLabel: 'Loading'
|
|
15
|
+
tableRowLoadingLabel: 'Loading',
|
|
16
|
+
tableGroupRowPlaceholderNoValueLabel: 'No value',
|
|
17
|
+
tableGroupRowPlaceholderEmptyLabel: 'Empty'
|
|
16
18
|
};
|
|
17
19
|
//# sourceMappingURL=label-token-defaults.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-token-defaults.js","sourceRoot":"","sources":["../../../../src/label-provider/table/label-token-defaults.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,kBAAkB,GAA4C;IACvE,uBAAuB,EAAE,gBAAgB;IACzC,qBAAqB,EAAE,cAAc;IACrC,qBAAqB,EAAE,cAAc;IACrC,mBAAmB,EAAE,YAAY;IACjC,qBAAqB,EAAE,cAAc;IACrC,wBAAwB,EAAE,SAAS;IACnC,6BAA6B,EAAE,SAAS;IACxC,qCAAqC,EAAE,kBAAkB;IACzD,sCAAsC,EAAE,mBAAmB;IAC3D,mBAAmB,EAAE,iBAAiB;IACtC,wBAAwB,EAAE,0BAA0B;IACpD,mBAAmB,EAAE,YAAY;IACjC,4BAA4B,EAAE,gBAAgB;IAC9C,oBAAoB,EAAE,SAAS;
|
|
1
|
+
{"version":3,"file":"label-token-defaults.js","sourceRoot":"","sources":["../../../../src/label-provider/table/label-token-defaults.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,kBAAkB,GAA4C;IACvE,uBAAuB,EAAE,gBAAgB;IACzC,qBAAqB,EAAE,cAAc;IACrC,qBAAqB,EAAE,cAAc;IACrC,mBAAmB,EAAE,YAAY;IACjC,qBAAqB,EAAE,cAAc;IACrC,wBAAwB,EAAE,SAAS;IACnC,6BAA6B,EAAE,SAAS;IACxC,qCAAqC,EAAE,kBAAkB;IACzD,sCAAsC,EAAE,mBAAmB;IAC3D,mBAAmB,EAAE,iBAAiB;IACtC,wBAAwB,EAAE,0BAA0B;IACpD,mBAAmB,EAAE,YAAY;IACjC,4BAA4B,EAAE,gBAAgB;IAC9C,oBAAoB,EAAE,SAAS;IAC/B,oCAAoC,EAAE,UAAU;IAChD,kCAAkC,EAAE,OAAO;CAC9C,CAAC","sourcesContent":["import type * as TokensNamespace from './label-tokens';\n\ntype TokenName = keyof typeof TokensNamespace;\n\nexport const tableLabelDefaults: { readonly [key in TokenName]: string } = {\n tableGroupCollapseLabel: 'Collapse group',\n tableGroupExpandLabel: 'Expand group',\n tableRowCollapseLabel: 'Collapse row',\n tableRowExpandLabel: 'Expand row',\n tableCollapseAllLabel: 'Collapse all',\n tableCellActionMenuLabel: 'Options',\n tableColumnHeaderGroupedLabel: 'Grouped',\n tableColumnHeaderSortedAscendingLabel: 'Sorted ascending',\n tableColumnHeaderSortedDescendingLabel: 'Sorted descending',\n tableSelectAllLabel: 'Select all rows',\n tableGroupSelectAllLabel: 'Select all rows in group',\n tableRowSelectLabel: 'Select row',\n tableRowOperationColumnLabel: 'Row operations',\n tableRowLoadingLabel: 'Loading',\n tableGroupRowPlaceholderNoValueLabel: 'No value',\n tableGroupRowPlaceholderEmptyLabel: 'Empty'\n};\n"]}
|
|
@@ -13,3 +13,5 @@ export declare const tableGroupSelectAllLabel: DesignToken<string>;
|
|
|
13
13
|
export declare const tableRowSelectLabel: DesignToken<string>;
|
|
14
14
|
export declare const tableRowOperationColumnLabel: DesignToken<string>;
|
|
15
15
|
export declare const tableRowLoadingLabel: DesignToken<string>;
|
|
16
|
+
export declare const tableGroupRowPlaceholderNoValueLabel: DesignToken<string>;
|
|
17
|
+
export declare const tableGroupRowPlaceholderEmptyLabel: DesignToken<string>;
|
|
@@ -56,4 +56,12 @@ export const tableRowLoadingLabel = DesignToken.create({
|
|
|
56
56
|
name: 'table-row-loading-label',
|
|
57
57
|
cssCustomPropertyName: null
|
|
58
58
|
}).withDefault(tableLabelDefaults.tableRowLoadingLabel);
|
|
59
|
+
export const tableGroupRowPlaceholderNoValueLabel = DesignToken.create({
|
|
60
|
+
name: 'table-group-row-placeholder-no-value-label',
|
|
61
|
+
cssCustomPropertyName: null
|
|
62
|
+
}).withDefault(tableLabelDefaults.tableGroupRowPlaceholderNoValueLabel);
|
|
63
|
+
export const tableGroupRowPlaceholderEmptyLabel = DesignToken.create({
|
|
64
|
+
name: 'table-group-row-placeholder-empty-label',
|
|
65
|
+
cssCustomPropertyName: null
|
|
66
|
+
}).withDefault(tableLabelDefaults.tableGroupRowPlaceholderEmptyLabel);
|
|
59
67
|
//# sourceMappingURL=label-tokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-tokens.js","sourceRoot":"","sources":["../../../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;CAC9B,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,4BAA4B,CAAC,CAAC;AAEhE,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC,MAAM,CAAS;IAC3D,IAAI,EAAE,yBAAyB;IAC/B,qBAAqB,EAAE,IAAI;CAC9B,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC","sourcesContent":["import { DesignToken } from '@microsoft/fast-foundation';\nimport { tableLabelDefaults } from './label-token-defaults';\n\nexport const tableGroupCollapseLabel = DesignToken.create<string>({\n name: 'table-group-collapse-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableGroupCollapseLabel);\n\nexport const tableGroupExpandLabel = DesignToken.create<string>({\n name: 'table-group-expand-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableGroupExpandLabel);\n\nexport const tableRowCollapseLabel = DesignToken.create<string>({\n name: 'table-row-collapse-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableRowCollapseLabel);\n\nexport const tableRowExpandLabel = DesignToken.create<string>({\n name: 'table-row-expand-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableRowExpandLabel);\n\nexport const tableCollapseAllLabel = DesignToken.create<string>({\n name: 'table-collapse-all-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableCollapseAllLabel);\n\nexport const tableCellActionMenuLabel = DesignToken.create<string>({\n name: 'table-cell-action-menu-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableCellActionMenuLabel);\n\nexport const tableColumnHeaderGroupedLabel = DesignToken.create<string>({\n name: 'table-column-header-grouped-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableColumnHeaderGroupedLabel);\n\nexport const tableColumnHeaderSortedAscendingLabel = DesignToken.create<string>(\n {\n name: 'table-column-header-sorted-ascending-label',\n cssCustomPropertyName: null\n }\n).withDefault(tableLabelDefaults.tableColumnHeaderSortedAscendingLabel);\n\nexport const tableColumnHeaderSortedDescendingLabel = DesignToken.create<string>({\n name: 'table-column-header-sorted-descending-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableColumnHeaderSortedDescendingLabel);\n\nexport const tableSelectAllLabel = DesignToken.create<string>({\n name: 'table-select-all-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableSelectAllLabel);\n\nexport const tableGroupSelectAllLabel = DesignToken.create<string>({\n name: 'table-group-select-all-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableGroupSelectAllLabel);\n\nexport const tableRowSelectLabel = DesignToken.create<string>({\n name: 'table-row-select-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableRowSelectLabel);\n\nexport const tableRowOperationColumnLabel = DesignToken.create<string>({\n name: 'table-row-operation-column-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableRowOperationColumnLabel);\n\nexport const tableRowLoadingLabel = DesignToken.create<string>({\n name: 'table-row-loading-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableRowLoadingLabel);\n"]}
|
|
1
|
+
{"version":3,"file":"label-tokens.js","sourceRoot":"","sources":["../../../../src/label-provider/table/label-tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,CAAC,MAAM,uBAAuB,GAAG,WAAW,CAAC,MAAM,CAAS;IAC9D,IAAI,EAAE,4BAA4B;IAClC,qBAAqB,EAAE,IAAI;CAC9B,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,uBAAuB,CAAC,CAAC;AAE3D,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAAC,MAAM,CAAS;IAC5D,IAAI,EAAE,0BAA0B;IAChC,qBAAqB,EAAE,IAAI;CAC9B,CAAC,CAAC,WAAW,CAAC,kB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AW,CAAC,MAAM,CAAS;IACzE,IAAI,EAAE,yCAAyC;IAC/C,qBAAqB,EAAE,IAAI;CAC9B,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,kCAAkC,CAAC,CAAC","sourcesContent":["import { DesignToken } from '@microsoft/fast-foundation';\nimport { tableLabelDefaults } from './label-token-defaults';\n\nexport const tableGroupCollapseLabel = DesignToken.create<string>({\n name: 'table-group-collapse-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableGroupCollapseLabel);\n\nexport const tableGroupExpandLabel = DesignToken.create<string>({\n name: 'table-group-expand-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableGroupExpandLabel);\n\nexport const tableRowCollapseLabel = DesignToken.create<string>({\n name: 'table-row-collapse-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableRowCollapseLabel);\n\nexport const tableRowExpandLabel = DesignToken.create<string>({\n name: 'table-row-expand-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableRowExpandLabel);\n\nexport const tableCollapseAllLabel = DesignToken.create<string>({\n name: 'table-collapse-all-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableCollapseAllLabel);\n\nexport const tableCellActionMenuLabel = DesignToken.create<string>({\n name: 'table-cell-action-menu-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableCellActionMenuLabel);\n\nexport const tableColumnHeaderGroupedLabel = DesignToken.create<string>({\n name: 'table-column-header-grouped-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableColumnHeaderGroupedLabel);\n\nexport const tableColumnHeaderSortedAscendingLabel = DesignToken.create<string>(\n {\n name: 'table-column-header-sorted-ascending-label',\n cssCustomPropertyName: null\n }\n).withDefault(tableLabelDefaults.tableColumnHeaderSortedAscendingLabel);\n\nexport const tableColumnHeaderSortedDescendingLabel = DesignToken.create<string>({\n name: 'table-column-header-sorted-descending-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableColumnHeaderSortedDescendingLabel);\n\nexport const tableSelectAllLabel = DesignToken.create<string>({\n name: 'table-select-all-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableSelectAllLabel);\n\nexport const tableGroupSelectAllLabel = DesignToken.create<string>({\n name: 'table-group-select-all-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableGroupSelectAllLabel);\n\nexport const tableRowSelectLabel = DesignToken.create<string>({\n name: 'table-row-select-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableRowSelectLabel);\n\nexport const tableRowOperationColumnLabel = DesignToken.create<string>({\n name: 'table-row-operation-column-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableRowOperationColumnLabel);\n\nexport const tableRowLoadingLabel = DesignToken.create<string>({\n name: 'table-row-loading-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableRowLoadingLabel);\n\nexport const tableGroupRowPlaceholderNoValueLabel = DesignToken.create<string>({\n name: 'table-group-row-placeholder-no-value-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableGroupRowPlaceholderNoValueLabel);\n\nexport const tableGroupRowPlaceholderEmptyLabel = DesignToken.create<string>({\n name: 'table-group-row-placeholder-empty-label',\n cssCustomPropertyName: null\n}).withDefault(tableLabelDefaults.tableGroupRowPlaceholderEmptyLabel);\n"]}
|
|
@@ -10,8 +10,6 @@ declare global {
|
|
|
10
10
|
* The group header view for displaying date/time fields as text.
|
|
11
11
|
*/
|
|
12
12
|
export declare class TableColumnDateTextGroupHeaderView extends TableColumnTextGroupHeaderViewBase<TableNumberFieldValue, TableColumnDateTextColumnConfig> {
|
|
13
|
-
|
|
14
|
-
private groupHeaderValueChanged;
|
|
15
|
-
private updateText;
|
|
13
|
+
protected updateText(): void;
|
|
16
14
|
}
|
|
17
15
|
export declare const tableColumnDateTextGroupHeaderViewTag = "nimble-table-column-date-text-group-header-view";
|
|
@@ -7,12 +7,6 @@ import { formatNumericDate } from '../models/format-helper';
|
|
|
7
7
|
* The group header view for displaying date/time fields as text.
|
|
8
8
|
*/
|
|
9
9
|
export class TableColumnDateTextGroupHeaderView extends TableColumnTextGroupHeaderViewBase {
|
|
10
|
-
columnConfigChanged() {
|
|
11
|
-
this.updateText();
|
|
12
|
-
}
|
|
13
|
-
groupHeaderValueChanged() {
|
|
14
|
-
this.updateText();
|
|
15
|
-
}
|
|
16
10
|
updateText() {
|
|
17
11
|
if (this.columnConfig) {
|
|
18
12
|
this.text = formatNumericDate(this.columnConfig.formatter, this.groupHeaderValue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/date-text/group-header-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,kCAAkC,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAO5D;;GAEG;AACH,MAAM,OAAO,kCAAmC,SAAQ,kCAGvD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/date-text/group-header-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,kCAAkC,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAO5D;;GAEG;AACH,MAAM,OAAO,kCAAmC,SAAQ,kCAGvD;IACa,UAAU;QAChB,IAAI,IAAI,CAAC,YAAY,EAAE;YACnB,IAAI,CAAC,IAAI,GAAG,iBAAiB,CACzB,IAAI,CAAC,YAAY,CAAC,SAAS,EAC3B,IAAI,CAAC,gBAAgB,CACxB,CAAC;SACL;aAAM;YACH,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;SAClB;IACL,CAAC;CACJ;AAED,MAAM,kCAAkC,GAAG,kCAAkC,CAAC,OAAO,CAAC;IAClF,QAAQ,EAAE,0CAA0C;IACpD,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,EAAE;KACrB,UAAU,CAAC,QAAQ,CAAC;KACpB,QAAQ,CAAC,kCAAkC,EAAE,CAAC,CAAC;AACpD,MAAM,CAAC,MAAM,qCAAqC,GAAG,iDAAiD,CAAC","sourcesContent":["import { DesignSystem } from '@microsoft/fast-foundation';\nimport type { TableNumberFieldValue } from '../../../table/types';\nimport { TableColumnTextGroupHeaderViewBase } from '../../text-base/group-header-view';\nimport { template } from '../../text-base/group-header-view/template';\nimport { styles } from '../../text-base/group-header-view/styles';\nimport type { TableColumnDateTextColumnConfig } from '..';\nimport { formatNumericDate } from '../models/format-helper';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-table-column-date-text-group-header': TableColumnDateTextGroupHeaderView;\n }\n}\n/**\n * The group header view for displaying date/time fields as text.\n */\nexport class TableColumnDateTextGroupHeaderView extends TableColumnTextGroupHeaderViewBase<\nTableNumberFieldValue,\nTableColumnDateTextColumnConfig\n> {\n protected updateText(): void {\n if (this.columnConfig) {\n this.text = formatNumericDate(\n this.columnConfig.formatter,\n this.groupHeaderValue\n );\n } else {\n this.text = '';\n }\n }\n}\n\nconst tableColumnDateTextGroupHeaderView = TableColumnDateTextGroupHeaderView.compose({\n baseName: 'table-column-date-text-group-header-view',\n template,\n styles\n});\nDesignSystem.getOrCreate()\n .withPrefix('nimble')\n .register(tableColumnDateTextGroupHeaderView());\nexport const tableColumnDateTextGroupHeaderViewTag = 'nimble-table-column-date-text-group-header-view';\n"]}
|
|
@@ -10,8 +10,6 @@ declare global {
|
|
|
10
10
|
* The group header view for displaying duration fields as text.
|
|
11
11
|
*/
|
|
12
12
|
export declare class TableColumnDurationTextGroupHeaderView extends TableColumnTextGroupHeaderViewBase<TableNumberFieldValue, TableColumnDurationTextColumnConfig> {
|
|
13
|
-
|
|
14
|
-
private groupHeaderValueChanged;
|
|
15
|
-
private updateText;
|
|
13
|
+
protected updateText(): void;
|
|
16
14
|
}
|
|
17
15
|
export declare const tableColumnDurationTextGroupHeaderViewTag = "nimble-table-column-duration-text-group-header-view";
|
|
@@ -6,12 +6,6 @@ import { styles } from '../../text-base/group-header-view/styles';
|
|
|
6
6
|
* The group header view for displaying duration fields as text.
|
|
7
7
|
*/
|
|
8
8
|
export class TableColumnDurationTextGroupHeaderView extends TableColumnTextGroupHeaderViewBase {
|
|
9
|
-
columnConfigChanged() {
|
|
10
|
-
this.updateText();
|
|
11
|
-
}
|
|
12
|
-
groupHeaderValueChanged() {
|
|
13
|
-
this.updateText();
|
|
14
|
-
}
|
|
15
9
|
updateText() {
|
|
16
10
|
if (this.columnConfig) {
|
|
17
11
|
this.text = this.columnConfig.formatter.format(this.groupHeaderValue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/duration-text/group-header-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,kCAAkC,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAC;AAQlE;;GAEG;AACH,MAAM,OAAO,sCAAuC,SAAQ,kCAG3D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/duration-text/group-header-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,kCAAkC,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAC;AAQlE;;GAEG;AACH,MAAM,OAAO,sCAAuC,SAAQ,kCAG3D;IACa,UAAU;QAChB,IAAI,IAAI,CAAC,YAAY,EAAE;YACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,MAAM,CAC1C,IAAI,CAAC,gBAAgB,CACxB,CAAC;SACL;aAAM;YACH,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;SAClB;IACL,CAAC;CACJ;AAED,MAAM,sCAAsC,GAAG,sCAAsC,CAAC,OAAO,CAAC;IAC1F,QAAQ,EAAE,8CAA8C;IACxD,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,EAAE;KACrB,UAAU,CAAC,QAAQ,CAAC;KACpB,QAAQ,CAAC,sCAAsC,EAAE,CAAC,CAAC;AACxD,MAAM,CAAC,MAAM,yCAAyC,GAAG,qDAAqD,CAAC","sourcesContent":["import { DesignSystem } from '@microsoft/fast-foundation';\nimport type { TableNumberFieldValue } from '../../../table/types';\nimport { TableColumnTextGroupHeaderViewBase } from '../../text-base/group-header-view';\nimport { template } from '../../text-base/group-header-view/template';\nimport { styles } from '../../text-base/group-header-view/styles';\nimport type { TableColumnDurationTextColumnConfig } from '..';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-table-duration-text-group-header': TableColumnDurationTextGroupHeaderView;\n }\n}\n/**\n * The group header view for displaying duration fields as text.\n */\nexport class TableColumnDurationTextGroupHeaderView extends TableColumnTextGroupHeaderViewBase<\nTableNumberFieldValue,\nTableColumnDurationTextColumnConfig\n> {\n protected updateText(): void {\n if (this.columnConfig) {\n this.text = this.columnConfig.formatter.format(\n this.groupHeaderValue\n );\n } else {\n this.text = '';\n }\n }\n}\n\nconst tableColumnDurationTextGroupHeaderView = TableColumnDurationTextGroupHeaderView.compose({\n baseName: 'table-column-duration-text-group-header-view',\n template,\n styles\n});\nDesignSystem.getOrCreate()\n .withPrefix('nimble')\n .register(tableColumnDurationTextGroupHeaderView());\nexport const tableColumnDurationTextGroupHeaderViewTag = 'nimble-table-column-duration-text-group-header-view';\n"]}
|
|
@@ -10,8 +10,6 @@ declare global {
|
|
|
10
10
|
* A group header view for enum columns
|
|
11
11
|
*/
|
|
12
12
|
export declare class TableColumnEnumTextGroupHeaderView extends TableColumnTextGroupHeaderViewBase<TableFieldValue, TableColumnEnumColumnConfig> {
|
|
13
|
-
|
|
14
|
-
private groupHeaderValueChanged;
|
|
15
|
-
private updateText;
|
|
13
|
+
protected updateText(): void;
|
|
16
14
|
}
|
|
17
15
|
export declare const tableColumnEnumTextGroupHeaderViewTag = "nimble-table-column-enum-text-group-header-view";
|
|
@@ -7,19 +7,8 @@ import { MappingTextConfig } from '../../enum-base/models/mapping-text-config';
|
|
|
7
7
|
* A group header view for enum columns
|
|
8
8
|
*/
|
|
9
9
|
export class TableColumnEnumTextGroupHeaderView extends TableColumnTextGroupHeaderViewBase {
|
|
10
|
-
columnConfigChanged() {
|
|
11
|
-
this.updateText();
|
|
12
|
-
}
|
|
13
|
-
groupHeaderValueChanged() {
|
|
14
|
-
this.updateText();
|
|
15
|
-
}
|
|
16
10
|
updateText() {
|
|
17
|
-
const
|
|
18
|
-
if (value === undefined || value === null) {
|
|
19
|
-
this.text = '';
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
const config = this.columnConfig?.mappingConfigs.get(value);
|
|
11
|
+
const config = this.columnConfig?.mappingConfigs.get(this.groupHeaderValue);
|
|
23
12
|
this.text = config instanceof MappingTextConfig && config.text
|
|
24
13
|
? config.text
|
|
25
14
|
: '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/enum-text/group-header-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AAEtE,OAAO,EAAE,kCAAkC,EAAE,MAAM,mCAAmC,CAAC;AAEvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAQ/E;;GAEG;AACH,MAAM,OAAO,kCAAmC,SAAQ,kCAGvD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/enum-text/group-header-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AAEtE,OAAO,EAAE,kCAAkC,EAAE,MAAM,mCAAmC,CAAC;AAEvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAQ/E;;GAEG;AACH,MAAM,OAAO,kCAAmC,SAAQ,kCAGvD;IACa,UAAU;QAChB,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,GAAG,CAChD,IAAI,CAAC,gBAAiB,CACzB,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,MAAM,YAAY,iBAAiB,IAAI,MAAM,CAAC,IAAI;YAC1D,CAAC,CAAC,MAAM,CAAC,IAAI;YACb,CAAC,CAAC,EAAE,CAAC;IACb,CAAC;CACJ;AAED,MAAM,uBAAuB,GAAG,kCAAkC,CAAC,OAAO,CAAC;IACvE,QAAQ,EAAE,0CAA0C;IACpD,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,EAAE;KACrB,UAAU,CAAC,QAAQ,CAAC;KACpB,QAAQ,CAAC,uBAAuB,EAAE,CAAC,CAAC;AACzC,MAAM,CAAC,MAAM,qCAAqC,GAAG,iDAAiD,CAAC","sourcesContent":["import { DesignSystem } from '@microsoft/fast-foundation';\nimport { styles } from '../../text-base/group-header-view/styles';\nimport { template } from '../../text-base/group-header-view/template';\nimport type { TableColumnEnumColumnConfig } from '../../enum-base';\nimport { TableColumnTextGroupHeaderViewBase } from '../../text-base/group-header-view';\nimport type { TableFieldValue } from '../../../table/types';\nimport { MappingTextConfig } from '../../enum-base/models/mapping-text-config';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-table-column-enum-text-group-header-view': TableColumnEnumTextGroupHeaderView;\n }\n}\n\n/**\n * A group header view for enum columns\n */\nexport class TableColumnEnumTextGroupHeaderView extends TableColumnTextGroupHeaderViewBase<\nTableFieldValue,\nTableColumnEnumColumnConfig\n> {\n protected updateText(): void {\n const config = this.columnConfig?.mappingConfigs.get(\n this.groupHeaderValue!\n );\n this.text = config instanceof MappingTextConfig && config.text\n ? config.text\n : '';\n }\n}\n\nconst enumTextGroupHeaderView = TableColumnEnumTextGroupHeaderView.compose({\n baseName: 'table-column-enum-text-group-header-view',\n template,\n styles\n});\nDesignSystem.getOrCreate()\n .withPrefix('nimble')\n .register(enumTextGroupHeaderView());\nexport const tableColumnEnumTextGroupHeaderViewTag = 'nimble-table-column-enum-text-group-header-view';\n"]}
|
|
@@ -16,8 +16,6 @@ export declare class TableColumnIconGroupHeaderView extends TableColumnTextGroup
|
|
|
16
16
|
severity: IconSeverity;
|
|
17
17
|
iconTemplate?: ViewTemplate<IconView>;
|
|
18
18
|
visual?: 'spinner' | 'icon';
|
|
19
|
-
|
|
20
|
-
private groupHeaderValueChanged;
|
|
21
|
-
private updateState;
|
|
19
|
+
protected updateText(): void;
|
|
22
20
|
}
|
|
23
21
|
export declare const tableColumnIconGroupHeaderViewTag = "nimble-table-column-icon-group-header-view";
|
|
@@ -10,21 +10,13 @@ import { MappingSpinnerConfig } from '../../enum-base/models/mapping-spinner-con
|
|
|
10
10
|
* The group header view for the icon column
|
|
11
11
|
*/
|
|
12
12
|
export class TableColumnIconGroupHeaderView extends TableColumnTextGroupHeaderViewBase {
|
|
13
|
-
|
|
14
|
-
this.updateState();
|
|
15
|
-
}
|
|
16
|
-
groupHeaderValueChanged() {
|
|
17
|
-
this.updateState();
|
|
18
|
-
}
|
|
19
|
-
updateState() {
|
|
13
|
+
updateText() {
|
|
20
14
|
this.visual = undefined;
|
|
21
15
|
if (!this.columnConfig) {
|
|
16
|
+
this.text = '';
|
|
22
17
|
return;
|
|
23
18
|
}
|
|
24
19
|
const value = this.groupHeaderValue;
|
|
25
|
-
if (value === undefined || value === null) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
20
|
const mappingConfig = this.columnConfig.mappingConfigs.get(value);
|
|
29
21
|
if (mappingConfig instanceof MappingIconConfig) {
|
|
30
22
|
this.visual = 'icon';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/icon/group-header-view/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAgB,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,OAAO,EAAE,kCAAkC,EAAE,MAAM,mCAAmC,CAAC;AAEvF,OAAO,EACH,iBAAiB,EAEpB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAQrF;;GAEG;AACH,MAAM,OAAO,8BACT,SAAQ,kCAGP;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/icon/group-header-view/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,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AAC,OAAO,CAAC;IAC/D,QAAQ,EAAE,qCAAqC;IAC/C,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,mBAAmB,EAAE,CAAC,CAAC;AAChF,MAAM,CAAC,MAAM,iCAAiC,GAAG,4CAA4C,CAAC","sourcesContent":["import { DesignSystem } from '@microsoft/fast-foundation';\nimport { ViewTemplate, observable } from '@microsoft/fast-element';\nimport { styles } from './styles';\nimport { template } from './template';\nimport type { TableColumnEnumColumnConfig } from '../../enum-base';\nimport type { TableFieldValue } from '../../../table/types';\nimport { TableColumnTextGroupHeaderViewBase } from '../../text-base/group-header-view';\nimport type { IconSeverity } from '../../../icon-base/types';\nimport {\n MappingIconConfig,\n type IconView\n} from '../../enum-base/models/mapping-icon-config';\nimport { MappingSpinnerConfig } from '../../enum-base/models/mapping-spinner-config';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-table-column-icon-group-header-view': TableColumnIconGroupHeaderView;\n }\n}\n\n/**\n * The group header view for the icon column\n */\nexport class TableColumnIconGroupHeaderView\n extends TableColumnTextGroupHeaderViewBase<\n TableFieldValue,\n TableColumnEnumColumnConfig\n >\n implements IconView {\n @observable\n public severity: IconSeverity;\n\n @observable\n public iconTemplate?: ViewTemplate<IconView>;\n\n @observable\n public visual?: 'spinner' | 'icon';\n\n protected updateText(): void {\n this.visual = undefined;\n if (!this.columnConfig) {\n this.text = '';\n return;\n }\n const value = this.groupHeaderValue;\n const mappingConfig = this.columnConfig.mappingConfigs.get(value!);\n if (mappingConfig instanceof MappingIconConfig) {\n this.visual = 'icon';\n this.severity = mappingConfig.severity;\n this.text = mappingConfig.text ?? '';\n this.iconTemplate = mappingConfig.iconTemplate;\n } else if (mappingConfig instanceof MappingSpinnerConfig) {\n this.visual = 'spinner';\n this.text = mappingConfig.text ?? '';\n }\n }\n}\n\nconst iconGroupHeaderView = TableColumnIconGroupHeaderView.compose({\n baseName: 'table-column-icon-group-header-view',\n template,\n styles\n});\nDesignSystem.getOrCreate().withPrefix('nimble').register(iconGroupHeaderView());\nexport const tableColumnIconGroupHeaderViewTag = 'nimble-table-column-icon-group-header-view';\n"]}
|
|
@@ -20,5 +20,11 @@ export const template = html `
|
|
|
20
20
|
title="${x => (x.hasOverflow && x.text ? x.text : null)}"
|
|
21
21
|
>${x => x.text}</span>
|
|
22
22
|
`)}
|
|
23
|
+
${when(x => x.visual === undefined, html `
|
|
24
|
+
<span
|
|
25
|
+
${overflow('hasOverflow')}
|
|
26
|
+
title="${x => (x.hasOverflow && x.text ? x.text : null)}"
|
|
27
|
+
>${x => x.text}</span>
|
|
28
|
+
`)}
|
|
23
29
|
`;
|
|
24
30
|
//# sourceMappingURL=template.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../src/table-column/icon/group-header-view/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAGrD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AAEjE,kBAAkB;AAClB,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAgC;MACtD,IAAI,CACF,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,EACxB,IAAI,CAAgC;cAC9B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAa;;kBAEhB,QAAQ,CAAC,aAAa,CAAC;yBAChB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;eACxD,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,SAAS,CAC9B;MACC,IAAI,CACF,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,SAAS,EAC3B,IAAI,CAAgC;WACjC,UAAU;qBACA,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;0BACN,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;;YAEzB,UAAU;;cAER,QAAQ,CAAC,aAAa,CAAC;qBAChB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;WACxD,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;KACjB,CACA;CACJ,CAAC","sourcesContent":["import { html, when } from '@microsoft/fast-element';\n\nimport type { TableColumnIconGroupHeaderView } from '.';\nimport { spinnerTag } from '../../../spinner';\nimport { overflow } from '../../../utilities/directive/overflow';\n\n// prettier-ignore\nexport const template = html<TableColumnIconGroupHeaderView>`\n ${when(\n x => x.visual === 'icon',\n html<TableColumnIconGroupHeaderView>`\n ${x => x.iconTemplate!}\n <span \n ${overflow('hasOverflow')}\n title=\"${x => (x.hasOverflow && x.text ? x.text : null)}\"\n >${x => x.text}</span>`\n )}\n ${when(\n x => x.visual === 'spinner',\n html<TableColumnIconGroupHeaderView>`\n <${spinnerTag}\n title=\"${x => x.text}\"\n aria-label=\"${x => x.text}\"\n class=\"no-shrink\">\n </${spinnerTag}>\n <span \n ${overflow('hasOverflow')}\n title=\"${x => (x.hasOverflow && x.text ? x.text : null)}\"\n >${x => x.text}</span>\n `\n )}\n`;\n"]}
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../src/table-column/icon/group-header-view/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAGrD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE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AAC,CAAC,IAAI;KACjB,CACA;CACJ,CAAC","sourcesContent":["import { html, when } from '@microsoft/fast-element';\n\nimport type { TableColumnIconGroupHeaderView } from '.';\nimport { spinnerTag } from '../../../spinner';\nimport { overflow } from '../../../utilities/directive/overflow';\n\n// prettier-ignore\nexport const template = html<TableColumnIconGroupHeaderView>`\n ${when(\n x => x.visual === 'icon',\n html<TableColumnIconGroupHeaderView>`\n ${x => x.iconTemplate!}\n <span \n ${overflow('hasOverflow')}\n title=\"${x => (x.hasOverflow && x.text ? x.text : null)}\"\n >${x => x.text}</span>`\n )}\n ${when(\n x => x.visual === 'spinner',\n html<TableColumnIconGroupHeaderView>`\n <${spinnerTag}\n title=\"${x => x.text}\"\n aria-label=\"${x => x.text}\"\n class=\"no-shrink\">\n </${spinnerTag}>\n <span \n ${overflow('hasOverflow')}\n title=\"${x => (x.hasOverflow && x.text ? x.text : null)}\"\n >${x => x.text}</span>\n `\n )}\n ${when(\n x => x.visual === undefined,\n html<TableColumnIconGroupHeaderView>`\n <span \n ${overflow('hasOverflow')}\n title=\"${x => (x.hasOverflow && x.text ? x.text : null)}\"\n >${x => x.text}</span>\n `\n )}\n`;\n"]}
|
|
@@ -10,8 +10,6 @@ declare global {
|
|
|
10
10
|
* The group header view for displaying number fields as text.
|
|
11
11
|
*/
|
|
12
12
|
export declare class TableColumnNumberTextGroupHeaderView extends TableColumnTextGroupHeaderViewBase<TableNumberFieldValue, TableColumnNumberTextColumnConfig> {
|
|
13
|
-
|
|
14
|
-
private groupHeaderValueChanged;
|
|
15
|
-
private updateText;
|
|
13
|
+
protected updateText(): void;
|
|
16
14
|
}
|
|
17
15
|
export declare const tableColumnNumberTextGroupHeaderTag = "nimble-table-column-number-text-group-header-view";
|
|
@@ -6,12 +6,6 @@ import { styles } from '../../text-base/group-header-view/styles';
|
|
|
6
6
|
* The group header view for displaying number fields as text.
|
|
7
7
|
*/
|
|
8
8
|
export class TableColumnNumberTextGroupHeaderView extends TableColumnTextGroupHeaderViewBase {
|
|
9
|
-
columnConfigChanged() {
|
|
10
|
-
this.updateText();
|
|
11
|
-
}
|
|
12
|
-
groupHeaderValueChanged() {
|
|
13
|
-
this.updateText();
|
|
14
|
-
}
|
|
15
9
|
updateText() {
|
|
16
10
|
this.text = this.columnConfig?.formatter?.format(this.groupHeaderValue) ?? '';
|
|
17
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/number-text/group-header-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,kCAAkC,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAC;AAQlE;;GAEG;AACH,MAAM,OAAO,oCAAqC,SAAQ,kCAGzD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/number-text/group-header-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,kCAAkC,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAC;AAQlE;;GAEG;AACH,MAAM,OAAO,oCAAqC,SAAQ,kCAGzD;IACa,UAAU;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;IAClF,CAAC;CACJ;AAED,MAAM,oCAAoC,GAAG,oCAAoC,CAAC,OAAO,CAAC;IACtF,QAAQ,EAAE,4CAA4C;IACtD,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,EAAE;KACrB,UAAU,CAAC,QAAQ,CAAC;KACpB,QAAQ,CAAC,oCAAoC,EAAE,CAAC,CAAC;AACtD,MAAM,CAAC,MAAM,mCAAmC,GAAG,mDAAmD,CAAC","sourcesContent":["import { DesignSystem } from '@microsoft/fast-foundation';\nimport type { TableNumberFieldValue } from '../../../table/types';\nimport { TableColumnTextGroupHeaderViewBase } from '../../text-base/group-header-view';\nimport { template } from '../../text-base/group-header-view/template';\nimport { styles } from '../../text-base/group-header-view/styles';\nimport type { TableColumnNumberTextColumnConfig } from '..';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-table-column-number-text-group-header': TableColumnNumberTextGroupHeaderView;\n }\n}\n/**\n * The group header view for displaying number fields as text.\n */\nexport class TableColumnNumberTextGroupHeaderView extends TableColumnTextGroupHeaderViewBase<\nTableNumberFieldValue,\nTableColumnNumberTextColumnConfig\n> {\n protected updateText(): void {\n this.text = this.columnConfig?.formatter?.format(this.groupHeaderValue) ?? '';\n }\n}\n\nconst tableColumnNumberTextGroupHeaderView = TableColumnNumberTextGroupHeaderView.compose({\n baseName: 'table-column-number-text-group-header-view',\n template,\n styles\n});\nDesignSystem.getOrCreate()\n .withPrefix('nimble')\n .register(tableColumnNumberTextGroupHeaderView());\nexport const tableColumnNumberTextGroupHeaderTag = 'nimble-table-column-number-text-group-header-view';\n"]}
|
|
@@ -10,6 +10,6 @@ declare global {
|
|
|
10
10
|
* The group header view for displaying string fields as text.
|
|
11
11
|
*/
|
|
12
12
|
export declare class TableColumnTextGroupHeaderView extends TableColumnTextGroupHeaderViewBase<TableStringFieldValue, TableColumnTextColumnConfig> {
|
|
13
|
-
|
|
13
|
+
protected updateText(): void;
|
|
14
14
|
}
|
|
15
15
|
export declare const tableColumnTextGroupHeaderViewTag = "nimble-table-column-text-group-header-view";
|
|
@@ -6,7 +6,7 @@ import { styles } from '../../text-base/group-header-view/styles';
|
|
|
6
6
|
* The group header view for displaying string fields as text.
|
|
7
7
|
*/
|
|
8
8
|
export class TableColumnTextGroupHeaderView extends TableColumnTextGroupHeaderViewBase {
|
|
9
|
-
|
|
9
|
+
updateText() {
|
|
10
10
|
this.text = typeof this.groupHeaderValue === 'string'
|
|
11
11
|
? this.groupHeaderValue
|
|
12
12
|
: '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/text/group-header-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,kCAAkC,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAC;AAQlE;;GAEG;AACH,MAAM,OAAO,8BAA+B,SAAQ,kCAGnD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/text/group-header-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,kCAAkC,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAC;AAQlE;;GAEG;AACH,MAAM,OAAO,8BAA+B,SAAQ,kCAGnD;IACa,UAAU;QAChB,IAAI,CAAC,IAAI,GAAG,OAAO,IAAI,CAAC,gBAAgB,KAAK,QAAQ;YACjD,CAAC,CAAC,IAAI,CAAC,gBAAgB;YACvB,CAAC,CAAC,EAAE,CAAC;IACb,CAAC;CACJ;AAED,MAAM,8BAA8B,GAAG,8BAA8B,CAAC,OAAO,CAAC;IAC1E,QAAQ,EAAE,qCAAqC;IAC/C,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,EAAE;KACrB,UAAU,CAAC,QAAQ,CAAC;KACpB,QAAQ,CAAC,8BAA8B,EAAE,CAAC,CAAC;AAChD,MAAM,CAAC,MAAM,iCAAiC,GAAG,4CAA4C,CAAC","sourcesContent":["import { DesignSystem } from '@microsoft/fast-foundation';\nimport type { TableStringFieldValue } from '../../../table/types';\nimport { TableColumnTextGroupHeaderViewBase } from '../../text-base/group-header-view';\nimport { template } from '../../text-base/group-header-view/template';\nimport { styles } from '../../text-base/group-header-view/styles';\nimport type { TableColumnTextColumnConfig } from '..';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-table-column-text-group-header': TableColumnTextGroupHeaderView;\n }\n}\n/**\n * The group header view for displaying string fields as text.\n */\nexport class TableColumnTextGroupHeaderView extends TableColumnTextGroupHeaderViewBase<\nTableStringFieldValue,\nTableColumnTextColumnConfig\n> {\n protected updateText(): void {\n this.text = typeof this.groupHeaderValue === 'string'\n ? this.groupHeaderValue\n : '';\n }\n}\n\nconst tableColumnTextGroupHeaderView = TableColumnTextGroupHeaderView.compose({\n baseName: 'table-column-text-group-header-view',\n template,\n styles\n});\nDesignSystem.getOrCreate()\n .withPrefix('nimble')\n .register(tableColumnTextGroupHeaderView());\nexport const tableColumnTextGroupHeaderViewTag = 'nimble-table-column-text-group-header-view';\n"]}
|
|
@@ -8,6 +8,22 @@ export declare abstract class TableColumnTextGroupHeaderViewBase<TGroupValue = T
|
|
|
8
8
|
hasOverflow: boolean;
|
|
9
9
|
/**
|
|
10
10
|
* Text to render in the cell.
|
|
11
|
+
*
|
|
12
|
+
* The value is initialized to `tableGroupRowPlaceholderNoValue` because if the group
|
|
13
|
+
* row never has a value defined on it, the change handlers may never get called but
|
|
14
|
+
* the text needs to be correct.
|
|
11
15
|
*/
|
|
12
16
|
text: string;
|
|
17
|
+
private readonly noValuePlaceholderLabelSubscriber;
|
|
18
|
+
private readonly emptyPlaceholderLabelSubscriber;
|
|
19
|
+
connectedCallback(): void;
|
|
20
|
+
disconnectedCallback(): void;
|
|
21
|
+
protected abstract updateText(): void;
|
|
22
|
+
private columnConfigChanged;
|
|
23
|
+
private groupHeaderValueChanged;
|
|
24
|
+
/**
|
|
25
|
+
* Sets `this.text` to the appropriate placeholder if `groupHeaderValue` warrants it.
|
|
26
|
+
* @returns `true` if `this.text` was set to a placeholder, `false` otherwise.
|
|
27
|
+
*/
|
|
28
|
+
private applyPlaceholderTextIfNeeded;
|
|
13
29
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { observable } from '@microsoft/fast-element';
|
|
3
3
|
import { TableGroupHeaderView } from '../../base/group-header-view';
|
|
4
|
+
import { tableGroupRowPlaceholderEmptyLabel, tableGroupRowPlaceholderNoValueLabel } from '../../../label-provider/table/label-tokens';
|
|
4
5
|
/**
|
|
5
6
|
* The group header view base class for displaying fields of any type as text.
|
|
6
7
|
*/
|
|
@@ -11,8 +12,59 @@ export class TableColumnTextGroupHeaderViewBase extends TableGroupHeaderView {
|
|
|
11
12
|
this.hasOverflow = false;
|
|
12
13
|
/**
|
|
13
14
|
* Text to render in the cell.
|
|
15
|
+
*
|
|
16
|
+
* The value is initialized to `tableGroupRowPlaceholderNoValue` because if the group
|
|
17
|
+
* row never has a value defined on it, the change handlers may never get called but
|
|
18
|
+
* the text needs to be correct.
|
|
14
19
|
*/
|
|
15
|
-
this.text =
|
|
20
|
+
this.text = tableGroupRowPlaceholderNoValueLabel.getValueFor(this);
|
|
21
|
+
this.noValuePlaceholderLabelSubscriber = {
|
|
22
|
+
handleChange: () => {
|
|
23
|
+
this.applyPlaceholderTextIfNeeded();
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
this.emptyPlaceholderLabelSubscriber = {
|
|
27
|
+
handleChange: () => {
|
|
28
|
+
this.applyPlaceholderTextIfNeeded();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
super.connectedCallback();
|
|
34
|
+
tableGroupRowPlaceholderNoValueLabel.subscribe(this.noValuePlaceholderLabelSubscriber, this);
|
|
35
|
+
tableGroupRowPlaceholderEmptyLabel.subscribe(this.emptyPlaceholderLabelSubscriber, this);
|
|
36
|
+
this.applyPlaceholderTextIfNeeded();
|
|
37
|
+
}
|
|
38
|
+
disconnectedCallback() {
|
|
39
|
+
super.disconnectedCallback();
|
|
40
|
+
tableGroupRowPlaceholderNoValueLabel.unsubscribe(this.noValuePlaceholderLabelSubscriber);
|
|
41
|
+
tableGroupRowPlaceholderEmptyLabel.unsubscribe(this.emptyPlaceholderLabelSubscriber);
|
|
42
|
+
}
|
|
43
|
+
columnConfigChanged() {
|
|
44
|
+
if (!this.applyPlaceholderTextIfNeeded()) {
|
|
45
|
+
this.updateText();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
groupHeaderValueChanged() {
|
|
49
|
+
if (!this.applyPlaceholderTextIfNeeded()) {
|
|
50
|
+
this.updateText();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Sets `this.text` to the appropriate placeholder if `groupHeaderValue` warrants it.
|
|
55
|
+
* @returns `true` if `this.text` was set to a placeholder, `false` otherwise.
|
|
56
|
+
*/
|
|
57
|
+
applyPlaceholderTextIfNeeded() {
|
|
58
|
+
if (this.groupHeaderValue === null
|
|
59
|
+
|| this.groupHeaderValue === undefined) {
|
|
60
|
+
this.text = tableGroupRowPlaceholderNoValueLabel.getValueFor(this);
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
if (this.groupHeaderValue === '') {
|
|
64
|
+
this.text = tableGroupRowPlaceholderEmptyLabel.getValueFor(this);
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
return false;
|
|
16
68
|
}
|
|
17
69
|
}
|
|
18
70
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/text-base/group-header-view/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/text-base/group-header-view/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,EACH,kCAAkC,EAClC,oCAAoC,EACvC,MAAM,4CAA4C,CAAC;AAEpD;;GAEG;AACH,MAAM,OAAgB,kCAGpB,SAAQ,oBAAgD;IAH1D;;QAII,gBAAgB;QAET,gBAAW,GAAG,KAAK,CAAC;QAE3B;;;;;;WAMG;QAEI,SAAI,GAAG,oCAAoC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAEpD,sCAAiC,GAE9C;YACI,YAAY,EAAE,GAAG,EAAE;gBACf,IAAI,CAAC,4BAA4B,EAAE,CAAC;YACxC,CAAC;SACJ,CAAC;QAEW,oCAA+B,GAE5C;YACI,YAAY,EAAE,GAAG,EAAE;gBACf,IAAI,CAAC,4BAA4B,EAAE,CAAC;YACxC,CAAC;SACJ,CAAC;IAyDV,CAAC;IAvDmB,iBAAiB;QAC7B,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,oCAAoC,CAAC,SAAS,CAC1C,IAAI,CAAC,iCAAiC,EACtC,IAAI,CACP,CAAC;QACF,kCAAkC,CAAC,SAAS,CACxC,IAAI,CAAC,+BAA+B,EACpC,IAAI,CACP,CAAC;QACF,IAAI,CAAC,4BAA4B,EAAE,CAAC;IACxC,CAAC;IAEe,oBAAoB;QAChC,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,oCAAoC,CAAC,WAAW,CAC5C,IAAI,CAAC,iCAAiC,CACzC,CAAC;QACF,kCAAkC,CAAC,WAAW,CAC1C,IAAI,CAAC,+BAA+B,CACvC,CAAC;IACN,CAAC;IAIO,mBAAmB;QACvB,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE;YACtC,IAAI,CAAC,UAAU,EAAE,CAAC;SACrB;IACL,CAAC;IAEO,uBAAuB;QAC3B,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE;YACtC,IAAI,CAAC,UAAU,EAAE,CAAC;SACrB;IACL,CAAC;IAED;;;OAGG;IACK,4BAA4B;QAChC,IACI,IAAI,CAAC,gBAAgB,KAAK,IAAI;eAC3B,IAAI,CAAC,gBAAgB,KAAK,SAAS,EACxC;YACE,IAAI,CAAC,IAAI,GAAG,oCAAoC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACnE,OAAO,IAAI,CAAC;SACf;QACD,IAAI,IAAI,CAAC,gBAAgB,KAAK,EAAE,EAAE;YAC9B,IAAI,CAAC,IAAI,GAAG,kCAAkC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACjE,OAAO,IAAI,CAAC;SACf;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AAnFG;IADC,UAAU;uEACgB;AAU3B;IADC,UAAU;gEAC0D","sourcesContent":["import type { DesignTokenSubscriber } from '@microsoft/fast-foundation';\nimport { observable } from '@microsoft/fast-element';\nimport { TableGroupHeaderView } from '../../base/group-header-view';\nimport type { TableFieldValue } from '../../../table/types';\nimport {\n tableGroupRowPlaceholderEmptyLabel,\n tableGroupRowPlaceholderNoValueLabel\n} from '../../../label-provider/table/label-tokens';\n\n/**\n * The group header view base class for displaying fields of any type as text.\n */\nexport abstract class TableColumnTextGroupHeaderViewBase<\n TGroupValue = TableFieldValue,\n TColumnConfig = unknown\n> extends TableGroupHeaderView<TGroupValue, TColumnConfig> {\n /** @internal */\n @observable\n public hasOverflow = false;\n\n /**\n * Text to render in the cell.\n *\n * The value is initialized to `tableGroupRowPlaceholderNoValue` because if the group\n * row never has a value defined on it, the change handlers may never get called but\n * the text needs to be correct.\n */\n @observable\n public text = tableGroupRowPlaceholderNoValueLabel.getValueFor(this);\n\n private readonly noValuePlaceholderLabelSubscriber: DesignTokenSubscriber<\n typeof tableGroupRowPlaceholderNoValueLabel\n > = {\n handleChange: () => {\n this.applyPlaceholderTextIfNeeded();\n }\n };\n\n private readonly emptyPlaceholderLabelSubscriber: DesignTokenSubscriber<\n typeof tableGroupRowPlaceholderEmptyLabel\n > = {\n handleChange: () => {\n this.applyPlaceholderTextIfNeeded();\n }\n };\n\n public override connectedCallback(): void {\n super.connectedCallback();\n tableGroupRowPlaceholderNoValueLabel.subscribe(\n this.noValuePlaceholderLabelSubscriber,\n this\n );\n tableGroupRowPlaceholderEmptyLabel.subscribe(\n this.emptyPlaceholderLabelSubscriber,\n this\n );\n this.applyPlaceholderTextIfNeeded();\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n tableGroupRowPlaceholderNoValueLabel.unsubscribe(\n this.noValuePlaceholderLabelSubscriber\n );\n tableGroupRowPlaceholderEmptyLabel.unsubscribe(\n this.emptyPlaceholderLabelSubscriber\n );\n }\n\n protected abstract updateText(): void;\n\n private columnConfigChanged(): void {\n if (!this.applyPlaceholderTextIfNeeded()) {\n this.updateText();\n }\n }\n\n private groupHeaderValueChanged(): void {\n if (!this.applyPlaceholderTextIfNeeded()) {\n this.updateText();\n }\n }\n\n /**\n * Sets `this.text` to the appropriate placeholder if `groupHeaderValue` warrants it.\n * @returns `true` if `this.text` was set to a placeholder, `false` otherwise.\n */\n private applyPlaceholderTextIfNeeded(): boolean {\n if (\n this.groupHeaderValue === null\n || this.groupHeaderValue === undefined\n ) {\n this.text = tableGroupRowPlaceholderNoValueLabel.getValueFor(this);\n return true;\n }\n if (this.groupHeaderValue === '') {\n this.text = tableGroupRowPlaceholderEmptyLabel.getValueFor(this);\n return true;\n }\n return false;\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ni/nimble-components",
|
|
3
|
-
"version": "22.0
|
|
3
|
+
"version": "22.1.0",
|
|
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 bundle-components && npm run generate-scss && npm run build-storybook",
|