@ni/nimble-components 20.4.1 → 20.4.3
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 +255 -82
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +2365 -2324
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/label-provider/table/index.d.ts +21 -3
- package/dist/esm/label-provider/table/index.js +28 -4
- package/dist/esm/label-provider/table/index.js.map +1 -1
- package/dist/esm/label-provider/table/label-token-defaults.js +7 -1
- package/dist/esm/label-provider/table/label-token-defaults.js.map +1 -1
- package/dist/esm/label-provider/table/label-tokens.d.ts +7 -1
- package/dist/esm/label-provider/table/label-tokens.js +27 -3
- package/dist/esm/label-provider/table/label-tokens.js.map +1 -1
- package/dist/esm/src/label-provider/table/index.d.ts +21 -3
- package/dist/esm/src/label-provider/table/label-tokens.d.ts +7 -1
- package/dist/esm/src/table/components/row/index.d.ts +30 -6
- package/dist/esm/src/table/index.d.ts +4 -0
- package/dist/esm/src/table-column/base/models/column-internals.d.ts +1 -0
- package/dist/esm/table/components/cell/template.js +1 -0
- package/dist/esm/table/components/cell/template.js.map +1 -1
- package/dist/esm/table/components/group-row/template.js +4 -1
- package/dist/esm/table/components/group-row/template.js.map +1 -1
- package/dist/esm/table/components/header/template.js +17 -5
- package/dist/esm/table/components/header/template.js.map +1 -1
- package/dist/esm/table/components/row/index.d.ts +30 -6
- package/dist/esm/table/components/row/index.js +92 -24
- package/dist/esm/table/components/row/index.js.map +1 -1
- package/dist/esm/table/components/row/styles.js +1 -1
- package/dist/esm/table/components/row/template.js +28 -23
- package/dist/esm/table/components/row/template.js.map +1 -1
- package/dist/esm/table/index.d.ts +4 -0
- package/dist/esm/table/index.js +8 -1
- package/dist/esm/table/index.js.map +1 -1
- package/dist/esm/table/models/table-update-tracker.js +1 -8
- package/dist/esm/table/models/table-update-tracker.js.map +1 -1
- package/dist/esm/table/styles.js +19 -0
- package/dist/esm/table/styles.js.map +1 -1
- package/dist/esm/table/template.js +21 -15
- package/dist/esm/table/template.js.map +1 -1
- package/dist/esm/table-column/base/models/column-internals.d.ts +1 -0
- package/dist/esm/table-column/base/models/column-internals.js +8 -0
- package/dist/esm/table-column/base/models/column-internals.js.map +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,13 @@ declare const supportedLabels: {
|
|
|
9
9
|
readonly groupExpand: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
10
10
|
readonly groupsCollapseAll: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
11
11
|
readonly cellActionMenu: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
12
|
-
readonly
|
|
12
|
+
readonly columnHeaderGrouped: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
13
|
+
readonly columnHeaderSortedAscending: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
14
|
+
readonly columnHeaderSortedDescending: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
15
|
+
readonly selectAll: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
16
|
+
readonly groupSelectAll: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
17
|
+
readonly rowSelect: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
18
|
+
readonly rowOperationColumn: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
13
19
|
};
|
|
14
20
|
/**
|
|
15
21
|
* Label provider for the Nimble table (and its sub-components and columns)
|
|
@@ -19,13 +25,25 @@ export declare class LabelProviderTable extends LabelProviderBase<typeof support
|
|
|
19
25
|
groupExpand: string | undefined;
|
|
20
26
|
groupsCollapseAll: string | undefined;
|
|
21
27
|
cellActionMenu: string | undefined;
|
|
22
|
-
|
|
28
|
+
columnHeaderGrouped: string | undefined;
|
|
29
|
+
columnHeaderSortedAscending: string | undefined;
|
|
30
|
+
columnHeaderSortedDescending: string | undefined;
|
|
31
|
+
selectAll: string | undefined;
|
|
32
|
+
groupSelectAll: string | undefined;
|
|
33
|
+
rowSelect: string | undefined;
|
|
34
|
+
rowOperationColumn: string | undefined;
|
|
23
35
|
protected readonly supportedLabels: {
|
|
24
36
|
readonly groupCollapse: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
25
37
|
readonly groupExpand: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
26
38
|
readonly groupsCollapseAll: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
27
39
|
readonly cellActionMenu: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
28
|
-
readonly
|
|
40
|
+
readonly columnHeaderGrouped: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
41
|
+
readonly columnHeaderSortedAscending: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
42
|
+
readonly columnHeaderSortedDescending: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
43
|
+
readonly selectAll: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
44
|
+
readonly groupSelectAll: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
45
|
+
readonly rowSelect: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
46
|
+
readonly rowOperationColumn: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
29
47
|
};
|
|
30
48
|
}
|
|
31
49
|
export declare const labelProviderTableTag: string;
|
|
@@ -2,13 +2,19 @@ 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,
|
|
5
|
+
import { tableCellActionMenuLabel, tableColumnHeaderGroupedLabel, tableColumnHeaderSortedAscendingLabel, tableColumnHeaderSortedDescendingLabel, tableGroupCollapseLabel, tableGroupExpandLabel, tableGroupSelectAllLabel, tableGroupsCollapseAllLabel, tableRowOperationColumnLabel, tableRowSelectLabel, tableSelectAllLabel } from './label-tokens';
|
|
6
6
|
const supportedLabels = {
|
|
7
7
|
groupCollapse: tableGroupCollapseLabel,
|
|
8
8
|
groupExpand: tableGroupExpandLabel,
|
|
9
9
|
groupsCollapseAll: tableGroupsCollapseAllLabel,
|
|
10
10
|
cellActionMenu: tableCellActionMenuLabel,
|
|
11
|
-
|
|
11
|
+
columnHeaderGrouped: tableColumnHeaderGroupedLabel,
|
|
12
|
+
columnHeaderSortedAscending: tableColumnHeaderSortedAscendingLabel,
|
|
13
|
+
columnHeaderSortedDescending: tableColumnHeaderSortedDescendingLabel,
|
|
14
|
+
selectAll: tableSelectAllLabel,
|
|
15
|
+
groupSelectAll: tableGroupSelectAllLabel,
|
|
16
|
+
rowSelect: tableRowSelectLabel,
|
|
17
|
+
rowOperationColumn: tableRowOperationColumnLabel
|
|
12
18
|
};
|
|
13
19
|
/**
|
|
14
20
|
* Label provider for the Nimble table (and its sub-components and columns)
|
|
@@ -32,8 +38,26 @@ __decorate([
|
|
|
32
38
|
attr({ attribute: 'cell-action-menu' })
|
|
33
39
|
], LabelProviderTable.prototype, "cellActionMenu", void 0);
|
|
34
40
|
__decorate([
|
|
35
|
-
attr({ attribute: 'column-header-grouped
|
|
36
|
-
], LabelProviderTable.prototype, "
|
|
41
|
+
attr({ attribute: 'column-header-grouped' })
|
|
42
|
+
], LabelProviderTable.prototype, "columnHeaderGrouped", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
attr({ attribute: 'column-header-sorted-ascending' })
|
|
45
|
+
], LabelProviderTable.prototype, "columnHeaderSortedAscending", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
attr({ attribute: 'column-header-sorted-descending' })
|
|
48
|
+
], LabelProviderTable.prototype, "columnHeaderSortedDescending", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
attr({ attribute: 'select-all' })
|
|
51
|
+
], LabelProviderTable.prototype, "selectAll", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
attr({ attribute: 'group-select-all' })
|
|
54
|
+
], LabelProviderTable.prototype, "groupSelectAll", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
attr({ attribute: 'row-select' })
|
|
57
|
+
], LabelProviderTable.prototype, "rowSelect", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
attr({ attribute: 'row-operation-column' })
|
|
60
|
+
], LabelProviderTable.prototype, "rowOperationColumn", void 0);
|
|
37
61
|
const nimbleLabelProviderTable = LabelProviderTable.compose({
|
|
38
62
|
baseName: 'label-provider-table'
|
|
39
63
|
});
|
|
@@ -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,sCAAsC,EACtC,uBAAuB,EACvB,qBAAqB,EACrB,2BAA2B,
|
|
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,2BAA2B,EAC3B,4BAA4B,EAC5B,mBAAmB,EACnB,mBAAmB,EACtB,MAAM,gBAAgB,CAAC;AAQxB,MAAM,eAAe,GAAG;IACpB,aAAa,EAAE,uBAAuB;IACtC,WAAW,EAAE,qBAAqB;IAClC,iBAAiB,EAAE,2BAA2B;IAC9C,cAAc,EAAE,wBAAwB;IACxC,mBAAmB,EAAE,6BAA6B;IAClD,2BAA2B,EAAE,qCAAqC;IACl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,MAAM,qBAAqB,GAAG,YAAY,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC"}
|
|
@@ -3,6 +3,12 @@ export const tableLabelDefaults = {
|
|
|
3
3
|
tableGroupExpandLabel: 'Expand group',
|
|
4
4
|
tableGroupsCollapseAllLabel: 'Collapse all groups',
|
|
5
5
|
tableCellActionMenuLabel: 'Options',
|
|
6
|
-
|
|
6
|
+
tableColumnHeaderGroupedLabel: 'Grouped',
|
|
7
|
+
tableColumnHeaderSortedAscendingLabel: 'Sorted ascending',
|
|
8
|
+
tableColumnHeaderSortedDescendingLabel: 'Sorted descending',
|
|
9
|
+
tableSelectAllLabel: 'Select all rows',
|
|
10
|
+
tableGroupSelectAllLabel: 'Select all rows in group',
|
|
11
|
+
tableRowSelectLabel: 'Select row',
|
|
12
|
+
tableRowOperationColumnLabel: 'Row operations'
|
|
7
13
|
};
|
|
8
14
|
//# 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,2BAA2B,EAAE,qBAAqB;IAClD,wBAAwB,EAAE,SAAS;IACnC,
|
|
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,2BAA2B,EAAE,qBAAqB;IAClD,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;CACjD,CAAC"}
|
|
@@ -3,4 +3,10 @@ export declare const tableGroupCollapseLabel: DesignToken<string>;
|
|
|
3
3
|
export declare const tableGroupExpandLabel: DesignToken<string>;
|
|
4
4
|
export declare const tableGroupsCollapseAllLabel: DesignToken<string>;
|
|
5
5
|
export declare const tableCellActionMenuLabel: DesignToken<string>;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const tableColumnHeaderGroupedLabel: DesignToken<string>;
|
|
7
|
+
export declare const tableColumnHeaderSortedAscendingLabel: DesignToken<string>;
|
|
8
|
+
export declare const tableColumnHeaderSortedDescendingLabel: DesignToken<string>;
|
|
9
|
+
export declare const tableSelectAllLabel: DesignToken<string>;
|
|
10
|
+
export declare const tableGroupSelectAllLabel: DesignToken<string>;
|
|
11
|
+
export declare const tableRowSelectLabel: DesignToken<string>;
|
|
12
|
+
export declare const tableRowOperationColumnLabel: DesignToken<string>;
|
|
@@ -16,8 +16,32 @@ export const tableCellActionMenuLabel = DesignToken.create({
|
|
|
16
16
|
name: 'table-cell-action-menu-label',
|
|
17
17
|
cssCustomPropertyName: null
|
|
18
18
|
}).withDefault(tableLabelDefaults.tableCellActionMenuLabel);
|
|
19
|
-
export const
|
|
20
|
-
name: 'table-column-header-grouped-
|
|
19
|
+
export const tableColumnHeaderGroupedLabel = DesignToken.create({
|
|
20
|
+
name: 'table-column-header-grouped-label',
|
|
21
21
|
cssCustomPropertyName: null
|
|
22
|
-
}).withDefault(tableLabelDefaults.
|
|
22
|
+
}).withDefault(tableLabelDefaults.tableColumnHeaderGroupedLabel);
|
|
23
|
+
export const tableColumnHeaderSortedAscendingLabel = DesignToken.create({
|
|
24
|
+
name: 'table-column-header-sorted-ascending-label',
|
|
25
|
+
cssCustomPropertyName: null
|
|
26
|
+
}).withDefault(tableLabelDefaults.tableColumnHeaderSortedAscendingLabel);
|
|
27
|
+
export const tableColumnHeaderSortedDescendingLabel = DesignToken.create({
|
|
28
|
+
name: 'table-column-header-sorted-descending-label',
|
|
29
|
+
cssCustomPropertyName: null
|
|
30
|
+
}).withDefault(tableLabelDefaults.tableColumnHeaderSortedDescendingLabel);
|
|
31
|
+
export const tableSelectAllLabel = DesignToken.create({
|
|
32
|
+
name: 'table-select-all-label',
|
|
33
|
+
cssCustomPropertyName: null
|
|
34
|
+
}).withDefault(tableLabelDefaults.tableSelectAllLabel);
|
|
35
|
+
export const tableGroupSelectAllLabel = DesignToken.create({
|
|
36
|
+
name: 'table-group-select-all-label',
|
|
37
|
+
cssCustomPropertyName: null
|
|
38
|
+
}).withDefault(tableLabelDefaults.tableGroupSelectAllLabel);
|
|
39
|
+
export const tableRowSelectLabel = DesignToken.create({
|
|
40
|
+
name: 'table-row-select-label',
|
|
41
|
+
cssCustomPropertyName: null
|
|
42
|
+
}).withDefault(tableLabelDefaults.tableRowSelectLabel);
|
|
43
|
+
export const tableRowOperationColumnLabel = DesignToken.create({
|
|
44
|
+
name: 'table-row-operation-column-label',
|
|
45
|
+
cssCustomPropertyName: null
|
|
46
|
+
}).withDefault(tableLabelDefaults.tableRowOperationColumnLabel);
|
|
23
47
|
//# sourceMappingURL=label-tokens.js.map
|
|
@@ -1 +1 @@
|
|
|
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;IAC5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AC,WAAW,CAAC,kBAAkB,CAAC,wBAAwB,CAAC,CAAC;AAE5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAC,MAAM,CAAS;IAC1D,IAAI,EAAE,wBAAwB;IAC9B,qBAAqB,EAAE,IAAI;CAC9B,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;AAEvD,MAAM,CAAC,MAAM,4BAA4B,GAAG,WAAW,CAAC,MAAM,CAAS;IACnE,IAAI,EAAE,kCAAkC;IACxC,qBAAqB,EAAE,IAAI;CAC9B,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,4BAA4B,CAAC,CAAC"}
|
|
@@ -9,7 +9,13 @@ declare const supportedLabels: {
|
|
|
9
9
|
readonly groupExpand: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
10
10
|
readonly groupsCollapseAll: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
11
11
|
readonly cellActionMenu: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
12
|
-
readonly
|
|
12
|
+
readonly columnHeaderGrouped: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
13
|
+
readonly columnHeaderSortedAscending: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
14
|
+
readonly columnHeaderSortedDescending: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
15
|
+
readonly selectAll: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
16
|
+
readonly groupSelectAll: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
17
|
+
readonly rowSelect: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
18
|
+
readonly rowOperationColumn: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
13
19
|
};
|
|
14
20
|
/**
|
|
15
21
|
* Label provider for the Nimble table (and its sub-components and columns)
|
|
@@ -19,13 +25,25 @@ export declare class LabelProviderTable extends LabelProviderBase<typeof support
|
|
|
19
25
|
groupExpand: string | undefined;
|
|
20
26
|
groupsCollapseAll: string | undefined;
|
|
21
27
|
cellActionMenu: string | undefined;
|
|
22
|
-
|
|
28
|
+
columnHeaderGrouped: string | undefined;
|
|
29
|
+
columnHeaderSortedAscending: string | undefined;
|
|
30
|
+
columnHeaderSortedDescending: string | undefined;
|
|
31
|
+
selectAll: string | undefined;
|
|
32
|
+
groupSelectAll: string | undefined;
|
|
33
|
+
rowSelect: string | undefined;
|
|
34
|
+
rowOperationColumn: string | undefined;
|
|
23
35
|
protected readonly supportedLabels: {
|
|
24
36
|
readonly groupCollapse: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
25
37
|
readonly groupExpand: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
26
38
|
readonly groupsCollapseAll: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
27
39
|
readonly cellActionMenu: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
28
|
-
readonly
|
|
40
|
+
readonly columnHeaderGrouped: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
41
|
+
readonly columnHeaderSortedAscending: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
42
|
+
readonly columnHeaderSortedDescending: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
43
|
+
readonly selectAll: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
44
|
+
readonly groupSelectAll: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
45
|
+
readonly rowSelect: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
46
|
+
readonly rowOperationColumn: import("@microsoft/fast-foundation").DesignToken<string>;
|
|
29
47
|
};
|
|
30
48
|
}
|
|
31
49
|
export declare const labelProviderTableTag: string;
|
|
@@ -3,4 +3,10 @@ export declare const tableGroupCollapseLabel: DesignToken<string>;
|
|
|
3
3
|
export declare const tableGroupExpandLabel: DesignToken<string>;
|
|
4
4
|
export declare const tableGroupsCollapseAllLabel: DesignToken<string>;
|
|
5
5
|
export declare const tableCellActionMenuLabel: DesignToken<string>;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const tableColumnHeaderGroupedLabel: DesignToken<string>;
|
|
7
|
+
export declare const tableColumnHeaderSortedAscendingLabel: DesignToken<string>;
|
|
8
|
+
export declare const tableColumnHeaderSortedDescendingLabel: DesignToken<string>;
|
|
9
|
+
export declare const tableSelectAllLabel: DesignToken<string>;
|
|
10
|
+
export declare const tableGroupSelectAllLabel: DesignToken<string>;
|
|
11
|
+
export declare const tableRowSelectLabel: DesignToken<string>;
|
|
12
|
+
export declare const tableRowOperationColumnLabel: DesignToken<string>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Notifier } from '@microsoft/fast-element';
|
|
1
2
|
import { Checkbox, FoundationElement } from '@microsoft/fast-foundation';
|
|
2
3
|
import type { TableCellState } from '../../../table-column/base/types';
|
|
3
4
|
import type { TableRecord } from '../../types';
|
|
@@ -8,11 +9,6 @@ declare global {
|
|
|
8
9
|
'nimble-table-row': TableRow;
|
|
9
10
|
}
|
|
10
11
|
}
|
|
11
|
-
export interface ColumnState {
|
|
12
|
-
column: TableColumn;
|
|
13
|
-
cellState?: TableCellState;
|
|
14
|
-
cellIndentLevel: number;
|
|
15
|
-
}
|
|
16
12
|
/** Represents a single row (element) in the Table's data */
|
|
17
13
|
export interface TableDataRecord extends TableRecord {
|
|
18
14
|
}
|
|
@@ -26,22 +22,50 @@ export declare class TableRow<TDataRecord extends TableDataRecord = TableDataRec
|
|
|
26
22
|
selected: boolean;
|
|
27
23
|
hideSelection: boolean;
|
|
28
24
|
dataRecord?: TDataRecord;
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
* */
|
|
28
|
+
columnNotifiers: Notifier[];
|
|
29
29
|
columns: TableColumn[];
|
|
30
30
|
currentActionMenuColumn?: TableColumn;
|
|
31
31
|
nestingLevel: number;
|
|
32
32
|
menuOpen: boolean;
|
|
33
|
+
rowOperationGridCellHidden: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* @internal
|
|
36
|
+
* An array that parallels the `columns` array and contains the indent
|
|
37
|
+
* level of each column's cell.
|
|
38
|
+
* */
|
|
39
|
+
cellIndentLevels: number[];
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
* An array that parallels the `columns` array and contains the cell state
|
|
43
|
+
* of each column's cell.
|
|
44
|
+
* */
|
|
45
|
+
cellStates: (TableCellState | undefined)[];
|
|
33
46
|
/** @internal */
|
|
34
47
|
readonly selectionCheckbox?: Checkbox;
|
|
35
48
|
/** @internal */
|
|
36
49
|
readonly cellContainer: HTMLSpanElement;
|
|
37
50
|
private ignoreSelectionChangeEvents;
|
|
38
|
-
get columnStates(): ColumnState[];
|
|
39
51
|
get ariaSelected(): 'true' | 'false' | null;
|
|
52
|
+
/** @internal */
|
|
40
53
|
onSelectionChange(event: CustomEvent): void;
|
|
54
|
+
/** @internal */
|
|
41
55
|
onCellActionMenuBeforeToggle(event: CustomEvent<MenuButtonToggleEventDetail>, column: TableColumn): void;
|
|
56
|
+
/** @internal */
|
|
42
57
|
onCellActionMenuToggle(event: CustomEvent<MenuButtonToggleEventDetail>, column: TableColumn): void;
|
|
43
58
|
closeOpenActionMenus(): void;
|
|
59
|
+
/** @internal */
|
|
60
|
+
handleChange(source: unknown, args: unknown): void;
|
|
44
61
|
private emitActionMenuToggleEvent;
|
|
62
|
+
private columnsChanged;
|
|
63
|
+
private dataRecordChanged;
|
|
64
|
+
private nestingLevelChanged;
|
|
65
|
+
private updateCellIndentLevels;
|
|
66
|
+
private removeColumnObservers;
|
|
67
|
+
private observeColumns;
|
|
68
|
+
private updateCellStates;
|
|
45
69
|
private hasValidFieldNames;
|
|
46
70
|
private selectedChanged;
|
|
47
71
|
private selectionCheckboxChanged;
|
|
@@ -56,6 +56,10 @@ export declare class Table<TData extends TableRecord = TableRecord> extends Foun
|
|
|
56
56
|
*/
|
|
57
57
|
selectionState: TableRowSelectionState;
|
|
58
58
|
get validity(): TableValidity;
|
|
59
|
+
/**
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
get showRowOperationColumn(): boolean;
|
|
59
63
|
/**
|
|
60
64
|
* @internal
|
|
61
65
|
*/
|
|
@@ -121,3 +121,4 @@ export declare class ColumnInternals<TColumnConfig> {
|
|
|
121
121
|
protected fractionalWidthChanged(): void;
|
|
122
122
|
protected pixelWidthChanged(): void;
|
|
123
123
|
}
|
|
124
|
+
export declare function isColumnInternalsProperty(changedProperty: string, ...args: (keyof ColumnInternals<unknown>)[]): boolean;
|
|
@@ -15,6 +15,7 @@ export const template = html `
|
|
|
15
15
|
@toggle="${(x, c) => x.onActionMenuToggle(c.event)}"
|
|
16
16
|
@click="${(_, c) => c.event.stopPropagation()}"
|
|
17
17
|
class="action-menu"
|
|
18
|
+
title="${x => x.actionMenuLabel ?? tableCellActionMenuLabel.getValueFor(x)}"
|
|
18
19
|
>
|
|
19
20
|
<${iconThreeDotsLineTag} slot="start"></${iconThreeDotsLineTag}>
|
|
20
21
|
${x => x.actionMenuLabel ?? tableCellActionMenuLabel.getValueFor(x)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../src/table/components/cell/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACH,gBAAgB,EAEnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAEtF,kBAAkB;AAClB,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAW;0EACmC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY;UACnF,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,gBAAgB;UACvB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,EAAE,IAAI,CAAW;eACrC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,KAAiD,CAAC;0BACpF,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe,EAAE;;yBAEpC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,IAAI,wBAAwB,CAAC,WAAW,CAAC,CAAC,CAAC;;mBAEvE,oBAAoB,mBAAmB,oBAAoB;kBAC5D,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,IAAI,wBAAwB,CAAC,WAAW,CAAC,CAAC,CAAC;;gBAEnE,aAAa;SACpB,CAAC;;CAET,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { buttonTag } from '../../../button';
|
|
|
4
4
|
import { ButtonAppearance } from '../../../button/types';
|
|
5
5
|
import { iconArrowExpanderRightTag } from '../../../icons/arrow-expander-right';
|
|
6
6
|
import { checkboxTag } from '../../../checkbox';
|
|
7
|
-
import { tableGroupCollapseLabel, tableGroupExpandLabel } from '../../../label-provider/table/label-tokens';
|
|
7
|
+
import { tableGroupCollapseLabel, tableGroupExpandLabel, tableGroupSelectAllLabel } from '../../../label-provider/table/label-tokens';
|
|
8
8
|
// prettier-ignore
|
|
9
9
|
export const template = html `
|
|
10
10
|
<template
|
|
@@ -19,6 +19,8 @@ export const template = html `
|
|
|
19
19
|
class="selection-checkbox"
|
|
20
20
|
@change="${(x, c) => x.onSelectionChange(c.event)}"
|
|
21
21
|
@click="${(_, c) => c.event.stopPropagation()}"
|
|
22
|
+
title="${x => tableGroupSelectAllLabel.getValueFor(x)}"
|
|
23
|
+
aria-label="${x => tableGroupSelectAllLabel.getValueFor(x)}"
|
|
22
24
|
>
|
|
23
25
|
</${checkboxTag}>
|
|
24
26
|
</span>
|
|
@@ -30,6 +32,7 @@ export const template = html `
|
|
|
30
32
|
content-hidden
|
|
31
33
|
class="expand-collapse-button"
|
|
32
34
|
tabindex="-1"
|
|
35
|
+
title="${x => (x.expanded ? tableGroupCollapseLabel.getValueFor(x) : tableGroupExpandLabel.getValueFor(x))}"
|
|
33
36
|
>
|
|
34
37
|
<${iconArrowExpanderRightTag} ${ref('expandIcon')} slot="start" class="expander-icon ${x => x.animationClass}"></${iconArrowExpanderRightTag}>
|
|
35
38
|
${x => (x.expanded ? tableGroupCollapseLabel.getValueFor(x) : tableGroupExpandLabel.getValueFor(x))}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../src/table/components/group-row/template.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACH,uBAAuB,EACvB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../src/table/components/group-row/template.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACH,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EAC3B,MAAM,4CAA4C,CAAC;AAEpD,kBAAkB;AAClB,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAe;;;iBAG1B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAmB,EAAE;4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owDownTag } from '../../../icons/arrow-down';
|
|
|
3
3
|
import { iconArrowUpTag } from '../../../icons/arrow-up';
|
|
4
4
|
import { iconTwoSquaresInBracketsTag } from '../../../icons/two-squares-in-brackets';
|
|
5
5
|
import { TableColumnSortDirection } from '../../types';
|
|
6
|
-
import {
|
|
6
|
+
import { tableColumnHeaderGroupedLabel, tableColumnHeaderSortedAscendingLabel, tableColumnHeaderSortedDescendingLabel } from '../../../label-provider/table/label-tokens';
|
|
7
7
|
// prettier-ignore
|
|
8
8
|
export const template = html `
|
|
9
9
|
<template role="columnheader"
|
|
@@ -12,15 +12,27 @@ export const template = html `
|
|
|
12
12
|
@mousedown="${(_x, c) => !(c.event.detail > 1)}"
|
|
13
13
|
>
|
|
14
14
|
<slot></slot>
|
|
15
|
-
${'' /*
|
|
15
|
+
${'' /* Set aria-hidden="true" on sort indicators because aria-sort is set on the 1st sorted column */}
|
|
16
16
|
${when(x => x.sortDirection === TableColumnSortDirection.ascending, html `
|
|
17
|
-
<${iconArrowUpTag}
|
|
17
|
+
<${iconArrowUpTag}
|
|
18
|
+
class="sort-indicator"
|
|
19
|
+
title="${x => tableColumnHeaderSortedAscendingLabel.getValueFor(x)}"
|
|
20
|
+
aria-hidden="true"
|
|
21
|
+
></${iconArrowUpTag}>
|
|
18
22
|
`)}
|
|
19
23
|
${when(x => x.sortDirection === TableColumnSortDirection.descending, html `
|
|
20
|
-
<${iconArrowDownTag}
|
|
24
|
+
<${iconArrowDownTag}
|
|
25
|
+
class="sort-indicator"
|
|
26
|
+
title="${x => tableColumnHeaderSortedDescendingLabel.getValueFor(x)}"
|
|
27
|
+
aria-hidden="true"
|
|
28
|
+
></${iconArrowDownTag}>
|
|
21
29
|
`)}
|
|
22
30
|
${when(x => x.isGrouped, html `
|
|
23
|
-
<${iconTwoSquaresInBracketsTag}
|
|
31
|
+
<${iconTwoSquaresInBracketsTag}
|
|
32
|
+
class="grouped-indicator"
|
|
33
|
+
title="${x => tableColumnHeaderGroupedLabel.getValueFor(x)}"
|
|
34
|
+
aria-label="${x => tableColumnHeaderGroupedLabel.getValueFor(x)}"
|
|
35
|
+
></${iconTwoSquaresInBracketsTag}>
|
|
24
36
|
`)}
|
|
25
37
|
</template>
|
|
26
38
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../src/table/components/header/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../src/table/components/header/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EACH,6BAA6B,EAC7B,qCAAqC,EACrC,sCAAsC,EACzC,MAAM,4CAA4C,CAAC;AAEpD,kBAAkB;AAClB,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAa;;qBAEpB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;UAC1B,EAAE,CAAC,sDAAsD;sBAC7C,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAE,CAAC,CAAC,KAAoB,CAAC,MAAM,GAAG,CAAC,CAAC;;;UAG5D,EAAE,CAAC,iGAAiG;UACpG,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,KAAK,wBAAwB,CAAC,SAAS,EAAE,IAAI,CAAa;eAC9E,cAAc;;yBAEJ,CAAC,CAAC,EAAE,CAAC,qCAAqC,CAAC,WAAW,CAAC,CAAC,CAAC;;iBAEjE,cAAc;SACtB,CAAC;UACA,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,KAAK,wBAAwB,CAAC,UAAU,EAAE,IAAI,CAAa;eAC/E,gBAAgB;;yBAEN,CAAC,CAAC,EAAE,CAAC,sCAAsC,CAAC,WAAW,CAAC,CAAC,CAAC;;iBAElE,gBAAgB;SACxB,CAAC;UACA,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,IAAI,CAAa;eACnC,2BAA2B;;yBAEjB,CAAC,CAAC,EAAE,CAAC,6BAA6B,CAAC,WAAW,CAAC,CAAC,CAAC;8BAC5C,CAAC,CAAC,EAAE,CAAC,6BAA6B,CAAC,WAAW,CAAC,CAAC,CAAC;iBAC9D,2BAA2B;SACnC,CAAC;;CAET,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Notifier } from '@microsoft/fast-element';
|
|
1
2
|
import { Checkbox, FoundationElement } from '@microsoft/fast-foundation';
|
|
2
3
|
import type { TableCellState } from '../../../table-column/base/types';
|
|
3
4
|
import type { TableRecord } from '../../types';
|
|
@@ -8,11 +9,6 @@ declare global {
|
|
|
8
9
|
'nimble-table-row': TableRow;
|
|
9
10
|
}
|
|
10
11
|
}
|
|
11
|
-
export interface ColumnState {
|
|
12
|
-
column: TableColumn;
|
|
13
|
-
cellState?: TableCellState;
|
|
14
|
-
cellIndentLevel: number;
|
|
15
|
-
}
|
|
16
12
|
/** Represents a single row (element) in the Table's data */
|
|
17
13
|
export interface TableDataRecord extends TableRecord {
|
|
18
14
|
}
|
|
@@ -26,22 +22,50 @@ export declare class TableRow<TDataRecord extends TableDataRecord = TableDataRec
|
|
|
26
22
|
selected: boolean;
|
|
27
23
|
hideSelection: boolean;
|
|
28
24
|
dataRecord?: TDataRecord;
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
* */
|
|
28
|
+
columnNotifiers: Notifier[];
|
|
29
29
|
columns: TableColumn[];
|
|
30
30
|
currentActionMenuColumn?: TableColumn;
|
|
31
31
|
nestingLevel: number;
|
|
32
32
|
menuOpen: boolean;
|
|
33
|
+
rowOperationGridCellHidden: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* @internal
|
|
36
|
+
* An array that parallels the `columns` array and contains the indent
|
|
37
|
+
* level of each column's cell.
|
|
38
|
+
* */
|
|
39
|
+
cellIndentLevels: number[];
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
* An array that parallels the `columns` array and contains the cell state
|
|
43
|
+
* of each column's cell.
|
|
44
|
+
* */
|
|
45
|
+
cellStates: (TableCellState | undefined)[];
|
|
33
46
|
/** @internal */
|
|
34
47
|
readonly selectionCheckbox?: Checkbox;
|
|
35
48
|
/** @internal */
|
|
36
49
|
readonly cellContainer: HTMLSpanElement;
|
|
37
50
|
private ignoreSelectionChangeEvents;
|
|
38
|
-
get columnStates(): ColumnState[];
|
|
39
51
|
get ariaSelected(): 'true' | 'false' | null;
|
|
52
|
+
/** @internal */
|
|
40
53
|
onSelectionChange(event: CustomEvent): void;
|
|
54
|
+
/** @internal */
|
|
41
55
|
onCellActionMenuBeforeToggle(event: CustomEvent<MenuButtonToggleEventDetail>, column: TableColumn): void;
|
|
56
|
+
/** @internal */
|
|
42
57
|
onCellActionMenuToggle(event: CustomEvent<MenuButtonToggleEventDetail>, column: TableColumn): void;
|
|
43
58
|
closeOpenActionMenus(): void;
|
|
59
|
+
/** @internal */
|
|
60
|
+
handleChange(source: unknown, args: unknown): void;
|
|
44
61
|
private emitActionMenuToggleEvent;
|
|
62
|
+
private columnsChanged;
|
|
63
|
+
private dataRecordChanged;
|
|
64
|
+
private nestingLevelChanged;
|
|
65
|
+
private updateCellIndentLevels;
|
|
66
|
+
private removeColumnObservers;
|
|
67
|
+
private observeColumns;
|
|
68
|
+
private updateCellStates;
|
|
45
69
|
private hasValidFieldNames;
|
|
46
70
|
private selectedChanged;
|
|
47
71
|
private selectionCheckboxChanged;
|