@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
|
@@ -16288,7 +16288,7 @@
|
|
|
16288
16288
|
|
|
16289
16289
|
/**
|
|
16290
16290
|
* Do not edit directly
|
|
16291
|
-
* Generated on Wed, 20 Sep 2023
|
|
16291
|
+
* Generated on Wed, 20 Sep 2023 16:15:01 GMT
|
|
16292
16292
|
*/
|
|
16293
16293
|
|
|
16294
16294
|
const Information100DarkUi = "#a46eff";
|
|
@@ -23702,7 +23702,13 @@
|
|
|
23702
23702
|
tableGroupExpandLabel: 'Expand group',
|
|
23703
23703
|
tableGroupsCollapseAllLabel: 'Collapse all groups',
|
|
23704
23704
|
tableCellActionMenuLabel: 'Options',
|
|
23705
|
-
|
|
23705
|
+
tableColumnHeaderGroupedLabel: 'Grouped',
|
|
23706
|
+
tableColumnHeaderSortedAscendingLabel: 'Sorted ascending',
|
|
23707
|
+
tableColumnHeaderSortedDescendingLabel: 'Sorted descending',
|
|
23708
|
+
tableSelectAllLabel: 'Select all rows',
|
|
23709
|
+
tableGroupSelectAllLabel: 'Select all rows in group',
|
|
23710
|
+
tableRowSelectLabel: 'Select row',
|
|
23711
|
+
tableRowOperationColumnLabel: 'Row operations'
|
|
23706
23712
|
};
|
|
23707
23713
|
|
|
23708
23714
|
const tableGroupCollapseLabel = DesignToken.create({
|
|
@@ -23721,17 +23727,47 @@
|
|
|
23721
23727
|
name: 'table-cell-action-menu-label',
|
|
23722
23728
|
cssCustomPropertyName: null
|
|
23723
23729
|
}).withDefault(tableLabelDefaults.tableCellActionMenuLabel);
|
|
23724
|
-
const
|
|
23725
|
-
name: 'table-column-header-grouped-
|
|
23730
|
+
const tableColumnHeaderGroupedLabel = DesignToken.create({
|
|
23731
|
+
name: 'table-column-header-grouped-label',
|
|
23726
23732
|
cssCustomPropertyName: null
|
|
23727
|
-
}).withDefault(tableLabelDefaults.
|
|
23733
|
+
}).withDefault(tableLabelDefaults.tableColumnHeaderGroupedLabel);
|
|
23734
|
+
const tableColumnHeaderSortedAscendingLabel = DesignToken.create({
|
|
23735
|
+
name: 'table-column-header-sorted-ascending-label',
|
|
23736
|
+
cssCustomPropertyName: null
|
|
23737
|
+
}).withDefault(tableLabelDefaults.tableColumnHeaderSortedAscendingLabel);
|
|
23738
|
+
const tableColumnHeaderSortedDescendingLabel = DesignToken.create({
|
|
23739
|
+
name: 'table-column-header-sorted-descending-label',
|
|
23740
|
+
cssCustomPropertyName: null
|
|
23741
|
+
}).withDefault(tableLabelDefaults.tableColumnHeaderSortedDescendingLabel);
|
|
23742
|
+
const tableSelectAllLabel = DesignToken.create({
|
|
23743
|
+
name: 'table-select-all-label',
|
|
23744
|
+
cssCustomPropertyName: null
|
|
23745
|
+
}).withDefault(tableLabelDefaults.tableSelectAllLabel);
|
|
23746
|
+
const tableGroupSelectAllLabel = DesignToken.create({
|
|
23747
|
+
name: 'table-group-select-all-label',
|
|
23748
|
+
cssCustomPropertyName: null
|
|
23749
|
+
}).withDefault(tableLabelDefaults.tableGroupSelectAllLabel);
|
|
23750
|
+
const tableRowSelectLabel = DesignToken.create({
|
|
23751
|
+
name: 'table-row-select-label',
|
|
23752
|
+
cssCustomPropertyName: null
|
|
23753
|
+
}).withDefault(tableLabelDefaults.tableRowSelectLabel);
|
|
23754
|
+
const tableRowOperationColumnLabel = DesignToken.create({
|
|
23755
|
+
name: 'table-row-operation-column-label',
|
|
23756
|
+
cssCustomPropertyName: null
|
|
23757
|
+
}).withDefault(tableLabelDefaults.tableRowOperationColumnLabel);
|
|
23728
23758
|
|
|
23729
23759
|
const supportedLabels = {
|
|
23730
23760
|
groupCollapse: tableGroupCollapseLabel,
|
|
23731
23761
|
groupExpand: tableGroupExpandLabel,
|
|
23732
23762
|
groupsCollapseAll: tableGroupsCollapseAllLabel,
|
|
23733
23763
|
cellActionMenu: tableCellActionMenuLabel,
|
|
23734
|
-
|
|
23764
|
+
columnHeaderGrouped: tableColumnHeaderGroupedLabel,
|
|
23765
|
+
columnHeaderSortedAscending: tableColumnHeaderSortedAscendingLabel,
|
|
23766
|
+
columnHeaderSortedDescending: tableColumnHeaderSortedDescendingLabel,
|
|
23767
|
+
selectAll: tableSelectAllLabel,
|
|
23768
|
+
groupSelectAll: tableGroupSelectAllLabel,
|
|
23769
|
+
rowSelect: tableRowSelectLabel,
|
|
23770
|
+
rowOperationColumn: tableRowOperationColumnLabel
|
|
23735
23771
|
};
|
|
23736
23772
|
/**
|
|
23737
23773
|
* Label provider for the Nimble table (and its sub-components and columns)
|
|
@@ -23755,8 +23791,26 @@
|
|
|
23755
23791
|
attr({ attribute: 'cell-action-menu' })
|
|
23756
23792
|
], LabelProviderTable.prototype, "cellActionMenu", void 0);
|
|
23757
23793
|
__decorate$1([
|
|
23758
|
-
attr({ attribute: 'column-header-grouped
|
|
23759
|
-
], LabelProviderTable.prototype, "
|
|
23794
|
+
attr({ attribute: 'column-header-grouped' })
|
|
23795
|
+
], LabelProviderTable.prototype, "columnHeaderGrouped", void 0);
|
|
23796
|
+
__decorate$1([
|
|
23797
|
+
attr({ attribute: 'column-header-sorted-ascending' })
|
|
23798
|
+
], LabelProviderTable.prototype, "columnHeaderSortedAscending", void 0);
|
|
23799
|
+
__decorate$1([
|
|
23800
|
+
attr({ attribute: 'column-header-sorted-descending' })
|
|
23801
|
+
], LabelProviderTable.prototype, "columnHeaderSortedDescending", void 0);
|
|
23802
|
+
__decorate$1([
|
|
23803
|
+
attr({ attribute: 'select-all' })
|
|
23804
|
+
], LabelProviderTable.prototype, "selectAll", void 0);
|
|
23805
|
+
__decorate$1([
|
|
23806
|
+
attr({ attribute: 'group-select-all' })
|
|
23807
|
+
], LabelProviderTable.prototype, "groupSelectAll", void 0);
|
|
23808
|
+
__decorate$1([
|
|
23809
|
+
attr({ attribute: 'row-select' })
|
|
23810
|
+
], LabelProviderTable.prototype, "rowSelect", void 0);
|
|
23811
|
+
__decorate$1([
|
|
23812
|
+
attr({ attribute: 'row-operation-column' })
|
|
23813
|
+
], LabelProviderTable.prototype, "rowOperationColumn", void 0);
|
|
23760
23814
|
const nimbleLabelProviderTable = LabelProviderTable.compose({
|
|
23761
23815
|
baseName: 'label-provider-table'
|
|
23762
23816
|
});
|
|
@@ -63461,6 +63515,14 @@ img.ProseMirror-separator {
|
|
|
63461
63515
|
__decorate$1([
|
|
63462
63516
|
observable
|
|
63463
63517
|
], ColumnInternals.prototype, "currentSortDirection", void 0);
|
|
63518
|
+
function isColumnInternalsProperty(changedProperty, ...args) {
|
|
63519
|
+
for (const arg of args) {
|
|
63520
|
+
if (changedProperty === arg) {
|
|
63521
|
+
return true;
|
|
63522
|
+
}
|
|
63523
|
+
}
|
|
63524
|
+
return false;
|
|
63525
|
+
}
|
|
63464
63526
|
|
|
63465
63527
|
/**
|
|
63466
63528
|
* The base class for table columns
|
|
@@ -63831,6 +63893,25 @@ img.ProseMirror-separator {
|
|
|
63831
63893
|
.row {
|
|
63832
63894
|
position: relative;
|
|
63833
63895
|
}
|
|
63896
|
+
|
|
63897
|
+
.accessibly-hidden {
|
|
63898
|
+
${
|
|
63899
|
+
/**
|
|
63900
|
+
* Hide content visually while keeping it screen reader-accessible.
|
|
63901
|
+
* Source: https://webaim.org/techniques/css/invisiblecontent/#techniques
|
|
63902
|
+
* See discussion here: https://github.com/microsoft/fast/issues/5740#issuecomment-1068195035
|
|
63903
|
+
*/
|
|
63904
|
+
''}
|
|
63905
|
+
display: inline-block;
|
|
63906
|
+
height: 1px;
|
|
63907
|
+
width: 1px;
|
|
63908
|
+
position: absolute;
|
|
63909
|
+
margin: -1px;
|
|
63910
|
+
clip: rect(1px, 1px, 1px, 1px);
|
|
63911
|
+
clip-path: inset(50%);
|
|
63912
|
+
overflow: hidden;
|
|
63913
|
+
padding: 0;
|
|
63914
|
+
}
|
|
63834
63915
|
`.withBehaviors(themeBehavior(Theme.color, css `
|
|
63835
63916
|
.table-row-container::before {
|
|
63836
63917
|
content: '';
|
|
@@ -63870,15 +63951,27 @@ img.ProseMirror-separator {
|
|
|
63870
63951
|
@mousedown="${(_x, c) => !(c.event.detail > 1)}"
|
|
63871
63952
|
>
|
|
63872
63953
|
<slot></slot>
|
|
63873
|
-
${'' /*
|
|
63954
|
+
${'' /* Set aria-hidden="true" on sort indicators because aria-sort is set on the 1st sorted column */}
|
|
63874
63955
|
${when(x => x.sortDirection === TableColumnSortDirection.ascending, html `
|
|
63875
|
-
<${iconArrowUpTag}
|
|
63956
|
+
<${iconArrowUpTag}
|
|
63957
|
+
class="sort-indicator"
|
|
63958
|
+
title="${x => tableColumnHeaderSortedAscendingLabel.getValueFor(x)}"
|
|
63959
|
+
aria-hidden="true"
|
|
63960
|
+
></${iconArrowUpTag}>
|
|
63876
63961
|
`)}
|
|
63877
63962
|
${when(x => x.sortDirection === TableColumnSortDirection.descending, html `
|
|
63878
|
-
<${iconArrowDownTag}
|
|
63963
|
+
<${iconArrowDownTag}
|
|
63964
|
+
class="sort-indicator"
|
|
63965
|
+
title="${x => tableColumnHeaderSortedDescendingLabel.getValueFor(x)}"
|
|
63966
|
+
aria-hidden="true"
|
|
63967
|
+
></${iconArrowDownTag}>
|
|
63879
63968
|
`)}
|
|
63880
63969
|
${when(x => x.isGrouped, html `
|
|
63881
|
-
<${iconTwoSquaresInBracketsTag}
|
|
63970
|
+
<${iconTwoSquaresInBracketsTag}
|
|
63971
|
+
class="grouped-indicator"
|
|
63972
|
+
title="${x => tableColumnHeaderGroupedLabel.getValueFor(x)}"
|
|
63973
|
+
aria-label="${x => tableColumnHeaderGroupedLabel.getValueFor(x)}"
|
|
63974
|
+
></${iconTwoSquaresInBracketsTag}>
|
|
63882
63975
|
`)}
|
|
63883
63976
|
</template>
|
|
63884
63977
|
`;
|
|
@@ -63965,7 +64058,7 @@ img.ProseMirror-separator {
|
|
|
63965
64058
|
background-color: ${fillHoverSelectedColor};
|
|
63966
64059
|
}
|
|
63967
64060
|
|
|
63968
|
-
.
|
|
64061
|
+
.row-operations-container {
|
|
63969
64062
|
display: flex;
|
|
63970
64063
|
}
|
|
63971
64064
|
|
|
@@ -64063,6 +64156,7 @@ img.ProseMirror-separator {
|
|
|
64063
64156
|
@toggle="${(x, c) => x.onActionMenuToggle(c.event)}"
|
|
64064
64157
|
@click="${(_, c) => c.event.stopPropagation()}"
|
|
64065
64158
|
class="action-menu"
|
|
64159
|
+
title="${x => x.actionMenuLabel ?? tableCellActionMenuLabel.getValueFor(x)}"
|
|
64066
64160
|
>
|
|
64067
64161
|
<${iconThreeDotsLineTag} slot="start"></${iconThreeDotsLineTag}>
|
|
64068
64162
|
${x => x.actionMenuLabel ?? tableCellActionMenuLabel.getValueFor(x)}
|
|
@@ -64129,15 +64223,19 @@ img.ProseMirror-separator {
|
|
|
64129
64223
|
// prettier-ignore
|
|
64130
64224
|
const template$e = html `
|
|
64131
64225
|
<template role="row" aria-selected=${x => x.ariaSelected}>
|
|
64132
|
-
${when(x =>
|
|
64133
|
-
<span role="gridcell" class="
|
|
64134
|
-
|
|
64135
|
-
|
|
64136
|
-
|
|
64137
|
-
|
|
64138
|
-
|
|
64139
|
-
|
|
64140
|
-
|
|
64226
|
+
${when(x => !x.rowOperationGridCellHidden, html `
|
|
64227
|
+
<span role="gridcell" class="row-operations-container">
|
|
64228
|
+
${when(x => x.selectable && !x.hideSelection, html `
|
|
64229
|
+
<${checkboxTag}
|
|
64230
|
+
${ref('selectionCheckbox')}
|
|
64231
|
+
class="selection-checkbox"
|
|
64232
|
+
@change="${(x, c) => x.onSelectionChange(c.event)}"
|
|
64233
|
+
@click="${(_, c) => c.event.stopPropagation()}"
|
|
64234
|
+
title="${x => tableRowSelectLabel.getValueFor(x)}"
|
|
64235
|
+
aria-label="${x => tableRowSelectLabel.getValueFor(x)}"
|
|
64236
|
+
>
|
|
64237
|
+
</${checkboxTag}>
|
|
64238
|
+
`)}
|
|
64141
64239
|
</span>
|
|
64142
64240
|
`)}
|
|
64143
64241
|
${'' /* This is needed to help align the cell widths exactly with the column headers, due to the space reserved for
|
|
@@ -64145,31 +64243,31 @@ img.ProseMirror-separator {
|
|
|
64145
64243
|
<span class="row-front-spacer"></span>
|
|
64146
64244
|
|
|
64147
64245
|
<span ${ref('cellContainer')} class="cell-container">
|
|
64148
|
-
${repeat(x => x.
|
|
64149
|
-
${when(x => !x.
|
|
64246
|
+
${repeat(x => x.columns, html `
|
|
64247
|
+
${when(x => !x.columnHidden, html `
|
|
64150
64248
|
<${tableCellTag}
|
|
64151
64249
|
class="cell"
|
|
64152
|
-
:cellState="${
|
|
64153
|
-
:cellViewTemplate="${x => x.
|
|
64154
|
-
:column="${x => x
|
|
64155
|
-
column-id="${x => x.
|
|
64250
|
+
:cellState="${(_, c) => c.parent.cellStates[c.index]}"
|
|
64251
|
+
:cellViewTemplate="${x => x.columnInternals.cellViewTemplate}"
|
|
64252
|
+
:column="${x => x}"
|
|
64253
|
+
column-id="${x => x.columnId}"
|
|
64156
64254
|
:recordId="${(_, c) => c.parent.recordId}"
|
|
64157
|
-
?has-action-menu="${x => !!x.
|
|
64158
|
-
action-menu-label="${x => x.
|
|
64159
|
-
@cell-action-menu-beforetoggle="${(x, c) => c.parent.onCellActionMenuBeforeToggle(c.event, x
|
|
64160
|
-
@cell-action-menu-toggle="${(x, c) => c.parent.onCellActionMenuToggle(c.event, x
|
|
64161
|
-
:nestingLevel="${
|
|
64255
|
+
?has-action-menu="${x => !!x.actionMenuSlot}"
|
|
64256
|
+
action-menu-label="${x => x.actionMenuLabel}"
|
|
64257
|
+
@cell-action-menu-beforetoggle="${(x, c) => c.parent.onCellActionMenuBeforeToggle(c.event, x)}"
|
|
64258
|
+
@cell-action-menu-toggle="${(x, c) => c.parent.onCellActionMenuToggle(c.event, x)}"
|
|
64259
|
+
:nestingLevel="${(_, c) => c.parent.cellIndentLevels[c.index]};"
|
|
64162
64260
|
>
|
|
64163
64261
|
|
|
64164
|
-
${when((x, c) => (c.parent.currentActionMenuColumn === x
|
|
64262
|
+
${when((x, c) => (c.parent.currentActionMenuColumn === x) && x.actionMenuSlot, html `
|
|
64165
64263
|
<slot
|
|
64166
|
-
name="${x => `row-action-menu-${x.
|
|
64264
|
+
name="${x => `row-action-menu-${x.actionMenuSlot}`}"
|
|
64167
64265
|
slot="cellActionMenu"
|
|
64168
64266
|
></slot>
|
|
64169
64267
|
`)}
|
|
64170
64268
|
</${tableCellTag}>
|
|
64171
64269
|
`)}
|
|
64172
|
-
|
|
64270
|
+
`, { recycle: false, positioning: true })}
|
|
64173
64271
|
</span>
|
|
64174
64272
|
</template>
|
|
64175
64273
|
`;
|
|
@@ -64184,41 +64282,39 @@ img.ProseMirror-separator {
|
|
|
64184
64282
|
this.selectable = false;
|
|
64185
64283
|
this.selected = false;
|
|
64186
64284
|
this.hideSelection = false;
|
|
64285
|
+
/**
|
|
64286
|
+
* @internal
|
|
64287
|
+
* */
|
|
64288
|
+
this.columnNotifiers = [];
|
|
64187
64289
|
this.columns = [];
|
|
64188
64290
|
this.nestingLevel = 0;
|
|
64189
64291
|
this.menuOpen = false;
|
|
64292
|
+
this.rowOperationGridCellHidden = false;
|
|
64293
|
+
/**
|
|
64294
|
+
* @internal
|
|
64295
|
+
* An array that parallels the `columns` array and contains the indent
|
|
64296
|
+
* level of each column's cell.
|
|
64297
|
+
* */
|
|
64298
|
+
this.cellIndentLevels = [];
|
|
64299
|
+
/**
|
|
64300
|
+
* @internal
|
|
64301
|
+
* An array that parallels the `columns` array and contains the cell state
|
|
64302
|
+
* of each column's cell.
|
|
64303
|
+
* */
|
|
64304
|
+
this.cellStates = [];
|
|
64190
64305
|
// Programmatically updating the selection state of a checkbox fires the 'change' event.
|
|
64191
64306
|
// Therefore, selection change events that occur due to programmatically updating
|
|
64192
64307
|
// the selection checkbox 'checked' value should be ingored.
|
|
64193
64308
|
// https://github.com/microsoft/fast/issues/5750
|
|
64194
64309
|
this.ignoreSelectionChangeEvents = false;
|
|
64195
64310
|
}
|
|
64196
|
-
get columnStates() {
|
|
64197
|
-
return this.columns.map((column, i) => {
|
|
64198
|
-
const fieldNames = column.columnInternals.dataRecordFieldNames;
|
|
64199
|
-
let cellState;
|
|
64200
|
-
if (this.hasValidFieldNames(fieldNames) && this.dataRecord) {
|
|
64201
|
-
const cellDataValues = fieldNames.map(field => this.dataRecord[field]);
|
|
64202
|
-
const cellRecord = Object.fromEntries(column.columnInternals.cellRecordFieldNames.map((k, j) => [
|
|
64203
|
-
k,
|
|
64204
|
-
cellDataValues[j]
|
|
64205
|
-
]));
|
|
64206
|
-
const columnConfig = column.columnInternals.columnConfig;
|
|
64207
|
-
cellState = {
|
|
64208
|
-
cellRecord,
|
|
64209
|
-
columnConfig
|
|
64210
|
-
};
|
|
64211
|
-
}
|
|
64212
|
-
const cellIndentLevel = i === 0 && this.nestingLevel > 0 ? this.nestingLevel - 1 : 0;
|
|
64213
|
-
return { column, cellState, cellIndentLevel };
|
|
64214
|
-
});
|
|
64215
|
-
}
|
|
64216
64311
|
get ariaSelected() {
|
|
64217
64312
|
if (this.selectable) {
|
|
64218
64313
|
return this.selected ? 'true' : 'false';
|
|
64219
64314
|
}
|
|
64220
64315
|
return null;
|
|
64221
64316
|
}
|
|
64317
|
+
/** @internal */
|
|
64222
64318
|
onSelectionChange(event) {
|
|
64223
64319
|
if (this.ignoreSelectionChangeEvents) {
|
|
64224
64320
|
return;
|
|
@@ -64232,10 +64328,12 @@ img.ProseMirror-separator {
|
|
|
64232
64328
|
};
|
|
64233
64329
|
this.$emit('row-selection-toggle', detail);
|
|
64234
64330
|
}
|
|
64331
|
+
/** @internal */
|
|
64235
64332
|
onCellActionMenuBeforeToggle(event, column) {
|
|
64236
64333
|
this.currentActionMenuColumn = column;
|
|
64237
64334
|
this.emitActionMenuToggleEvent('row-action-menu-beforetoggle', event.detail, column);
|
|
64238
64335
|
}
|
|
64336
|
+
/** @internal */
|
|
64239
64337
|
onCellActionMenuToggle(event, column) {
|
|
64240
64338
|
this.menuOpen = event.detail.newState;
|
|
64241
64339
|
this.emitActionMenuToggleEvent('row-action-menu-toggle', event.detail, column);
|
|
@@ -64248,6 +64346,15 @@ img.ProseMirror-separator {
|
|
|
64248
64346
|
}
|
|
64249
64347
|
}
|
|
64250
64348
|
}
|
|
64349
|
+
/** @internal */
|
|
64350
|
+
handleChange(source, args) {
|
|
64351
|
+
if (source instanceof ColumnInternals
|
|
64352
|
+
&& typeof args === 'string'
|
|
64353
|
+
&& (isColumnInternalsProperty(args, 'columnConfig')
|
|
64354
|
+
|| isColumnInternalsProperty(args, 'dataRecordFieldNames'))) {
|
|
64355
|
+
this.updateCellStates();
|
|
64356
|
+
}
|
|
64357
|
+
}
|
|
64251
64358
|
emitActionMenuToggleEvent(eventType, menuButtonEventDetail, column) {
|
|
64252
64359
|
const detail = {
|
|
64253
64360
|
newState: menuButtonEventDetail.newState,
|
|
@@ -64257,6 +64364,58 @@ img.ProseMirror-separator {
|
|
|
64257
64364
|
};
|
|
64258
64365
|
this.$emit(eventType, detail);
|
|
64259
64366
|
}
|
|
64367
|
+
columnsChanged() {
|
|
64368
|
+
this.updateCellIndentLevels();
|
|
64369
|
+
this.updateCellStates();
|
|
64370
|
+
this.observeColumns();
|
|
64371
|
+
}
|
|
64372
|
+
dataRecordChanged() {
|
|
64373
|
+
this.updateCellStates();
|
|
64374
|
+
}
|
|
64375
|
+
nestingLevelChanged() {
|
|
64376
|
+
this.updateCellIndentLevels();
|
|
64377
|
+
}
|
|
64378
|
+
updateCellIndentLevels() {
|
|
64379
|
+
this.cellIndentLevels = this.columns.map((_, i) => {
|
|
64380
|
+
if (i === 0 && this.nestingLevel > 0) {
|
|
64381
|
+
return this.nestingLevel - 1;
|
|
64382
|
+
}
|
|
64383
|
+
return 0;
|
|
64384
|
+
});
|
|
64385
|
+
}
|
|
64386
|
+
removeColumnObservers() {
|
|
64387
|
+
this.columnNotifiers.forEach(notifier => {
|
|
64388
|
+
notifier.unsubscribe(this);
|
|
64389
|
+
});
|
|
64390
|
+
this.columnNotifiers = [];
|
|
64391
|
+
}
|
|
64392
|
+
observeColumns() {
|
|
64393
|
+
this.removeColumnObservers();
|
|
64394
|
+
this.columnNotifiers = this.columns.map(column => {
|
|
64395
|
+
const notifier = Observable.getNotifier(column.columnInternals);
|
|
64396
|
+
notifier.subscribe(this);
|
|
64397
|
+
return notifier;
|
|
64398
|
+
});
|
|
64399
|
+
}
|
|
64400
|
+
updateCellStates() {
|
|
64401
|
+
this.cellStates = this.columns.map(column => {
|
|
64402
|
+
const fieldNames = column.columnInternals.dataRecordFieldNames;
|
|
64403
|
+
let cellState;
|
|
64404
|
+
if (this.hasValidFieldNames(fieldNames) && this.dataRecord) {
|
|
64405
|
+
const cellDataValues = fieldNames.map(field => this.dataRecord[field]);
|
|
64406
|
+
const cellRecord = Object.fromEntries(column.columnInternals.cellRecordFieldNames.map((k, j) => [
|
|
64407
|
+
k,
|
|
64408
|
+
cellDataValues[j]
|
|
64409
|
+
]));
|
|
64410
|
+
const columnConfig = column.columnInternals.columnConfig;
|
|
64411
|
+
cellState = {
|
|
64412
|
+
cellRecord,
|
|
64413
|
+
columnConfig
|
|
64414
|
+
};
|
|
64415
|
+
}
|
|
64416
|
+
return cellState;
|
|
64417
|
+
});
|
|
64418
|
+
}
|
|
64260
64419
|
hasValidFieldNames(keys) {
|
|
64261
64420
|
return keys.every(key => key !== undefined);
|
|
64262
64421
|
}
|
|
@@ -64301,12 +64460,18 @@ img.ProseMirror-separator {
|
|
|
64301
64460
|
__decorate$1([
|
|
64302
64461
|
attr({ attribute: 'menu-open', mode: 'boolean' })
|
|
64303
64462
|
], TableRow.prototype, "menuOpen", void 0);
|
|
64463
|
+
__decorate$1([
|
|
64464
|
+
attr({ attribute: 'row-operation-grid-cell-hidden', mode: 'boolean' })
|
|
64465
|
+
], TableRow.prototype, "rowOperationGridCellHidden", void 0);
|
|
64304
64466
|
__decorate$1([
|
|
64305
64467
|
observable
|
|
64306
|
-
], TableRow.prototype, "
|
|
64468
|
+
], TableRow.prototype, "cellIndentLevels", void 0);
|
|
64307
64469
|
__decorate$1([
|
|
64308
|
-
|
|
64309
|
-
], TableRow.prototype, "
|
|
64470
|
+
observable
|
|
64471
|
+
], TableRow.prototype, "cellStates", void 0);
|
|
64472
|
+
__decorate$1([
|
|
64473
|
+
observable
|
|
64474
|
+
], TableRow.prototype, "selectionCheckbox", void 0);
|
|
64310
64475
|
__decorate$1([
|
|
64311
64476
|
volatile
|
|
64312
64477
|
], TableRow.prototype, "ariaSelected", null);
|
|
@@ -64440,6 +64605,8 @@ img.ProseMirror-separator {
|
|
|
64440
64605
|
class="selection-checkbox"
|
|
64441
64606
|
@change="${(x, c) => x.onSelectionChange(c.event)}"
|
|
64442
64607
|
@click="${(_, c) => c.event.stopPropagation()}"
|
|
64608
|
+
title="${x => tableGroupSelectAllLabel.getValueFor(x)}"
|
|
64609
|
+
aria-label="${x => tableGroupSelectAllLabel.getValueFor(x)}"
|
|
64443
64610
|
>
|
|
64444
64611
|
</${checkboxTag}>
|
|
64445
64612
|
</span>
|
|
@@ -64451,6 +64618,7 @@ img.ProseMirror-separator {
|
|
|
64451
64618
|
content-hidden
|
|
64452
64619
|
class="expand-collapse-button"
|
|
64453
64620
|
tabindex="-1"
|
|
64621
|
+
title="${x => (x.expanded ? tableGroupCollapseLabel.getValueFor(x) : tableGroupExpandLabel.getValueFor(x))}"
|
|
64454
64622
|
>
|
|
64455
64623
|
<${iconArrowExpanderRightTag} ${ref('expandIcon')} slot="start" class="expander-icon ${x => x.animationClass}"></${iconArrowExpanderRightTag}>
|
|
64456
64624
|
${x => (x.expanded ? tableGroupCollapseLabel.getValueFor(x) : tableGroupExpandLabel.getValueFor(x))}
|
|
@@ -64588,29 +64756,34 @@ img.ProseMirror-separator {
|
|
|
64588
64756
|
<div class="glass-overlay">
|
|
64589
64757
|
<div role="rowgroup" class="header-row-container">
|
|
64590
64758
|
<div class="header-row" role="row">
|
|
64591
|
-
<span class="header-row-action-container" ${ref('headerRowActionContainer')}>
|
|
64759
|
+
<span role="${x => (x.showRowOperationColumn ? 'columnheader' : '')}" class="header-row-action-container" ${ref('headerRowActionContainer')}>
|
|
64760
|
+
${when(x => x.showRowOperationColumn, html `
|
|
64761
|
+
<span class="accessibly-hidden">
|
|
64762
|
+
${x => tableRowOperationColumnLabel.getValueFor(x)}
|
|
64763
|
+
</span>
|
|
64764
|
+
`)}
|
|
64592
64765
|
${when(x => x.selectionMode === TableRowSelectionMode.multiple, html `
|
|
64593
|
-
<span
|
|
64766
|
+
<span class="checkbox-container">
|
|
64594
64767
|
<${checkboxTag}
|
|
64595
64768
|
${ref('selectionCheckbox')}
|
|
64596
64769
|
class="${x => `selection-checkbox ${x.selectionMode ?? ''}`}"
|
|
64597
64770
|
@change="${(x, c) => x.onAllRowsSelectionChange(c.event)}"
|
|
64771
|
+
title="${x => tableSelectAllLabel.getValueFor(x)}"
|
|
64772
|
+
aria-label="${x => tableSelectAllLabel.getValueFor(x)}"
|
|
64598
64773
|
>
|
|
64599
64774
|
</${checkboxTag}>
|
|
64600
64775
|
</span>
|
|
64601
64776
|
`)}
|
|
64602
|
-
|
|
64603
|
-
|
|
64604
|
-
|
|
64605
|
-
|
|
64606
|
-
|
|
64607
|
-
|
|
64608
|
-
|
|
64609
|
-
>
|
|
64610
|
-
|
|
64611
|
-
|
|
64612
|
-
</${buttonTag}>
|
|
64613
|
-
</span>
|
|
64777
|
+
<${buttonTag}
|
|
64778
|
+
class="collapse-all-button ${x => `${x.showCollapseAll ? 'visible' : ''}`}"
|
|
64779
|
+
content-hidden
|
|
64780
|
+
appearance="${ButtonAppearance.ghost}"
|
|
64781
|
+
title="${x => tableGroupsCollapseAllLabel.getValueFor(x)}"
|
|
64782
|
+
@click="${x => x.handleCollapseAllGroupRows()}"
|
|
64783
|
+
>
|
|
64784
|
+
<${iconTriangleTwoLinesHorizontalTag} slot="start"></${iconTriangleTwoLinesHorizontalTag}>
|
|
64785
|
+
${x => tableGroupsCollapseAllLabel.getValueFor(x)}
|
|
64786
|
+
</${buttonTag}>
|
|
64614
64787
|
</span>
|
|
64615
64788
|
<span class="column-headers-container" ${ref('columnHeadersContainer')}>
|
|
64616
64789
|
${repeat(x => x.visibleColumns, html `
|
|
@@ -64671,6 +64844,7 @@ img.ProseMirror-separator {
|
|
|
64671
64844
|
:dataRecord="${(x, c) => c.parent.tableData[x.index]?.record}"
|
|
64672
64845
|
:columns="${(_, c) => c.parent.columns}"
|
|
64673
64846
|
:nestingLevel="${(x, c) => c.parent.tableData[x.index]?.nestingLevel}"
|
|
64847
|
+
?row-operation-grid-cell-hidden="${(_, c) => !c.parent.showRowOperationColumn}"
|
|
64674
64848
|
@click="${(x, c) => c.parent.onRowClick(x.index, c.event)}"
|
|
64675
64849
|
@row-selection-toggle="${(x, c) => c.parent.onRowSelectionToggle(x.index, c.event)}"
|
|
64676
64850
|
@row-action-menu-beforetoggle="${(x, c) => c.parent.onRowActionMenuBeforeToggle(x.index, c.event)}"
|
|
@@ -65766,14 +65940,6 @@ img.ProseMirror-separator {
|
|
|
65766
65940
|
}
|
|
65767
65941
|
return false;
|
|
65768
65942
|
};
|
|
65769
|
-
const isColumnInternalsProperty = (changedProperty, ...args) => {
|
|
65770
|
-
for (const arg of args) {
|
|
65771
|
-
if (changedProperty === arg) {
|
|
65772
|
-
return true;
|
|
65773
|
-
}
|
|
65774
|
-
}
|
|
65775
|
-
return false;
|
|
65776
|
-
};
|
|
65777
65943
|
const trackedItems$1 = [
|
|
65778
65944
|
'rowIds',
|
|
65779
65945
|
'groupRows',
|
|
@@ -66293,6 +66459,13 @@ img.ProseMirror-separator {
|
|
|
66293
66459
|
get validity() {
|
|
66294
66460
|
return this.tableValidator.getValidity();
|
|
66295
66461
|
}
|
|
66462
|
+
/**
|
|
66463
|
+
* @internal
|
|
66464
|
+
*/
|
|
66465
|
+
get showRowOperationColumn() {
|
|
66466
|
+
return (this.selectionMode === TableRowSelectionMode.multiple
|
|
66467
|
+
|| this.showCollapseAll);
|
|
66468
|
+
}
|
|
66296
66469
|
async setData(newData) {
|
|
66297
66470
|
await this.processPendingUpdates();
|
|
66298
66471
|
const data = newData.map(record => {
|
|
@@ -66597,7 +66770,7 @@ img.ProseMirror-separator {
|
|
|
66597
66770
|
this.columnNotifiers.push(notifier);
|
|
66598
66771
|
const notifierInternals = Observable.getNotifier(column.columnInternals);
|
|
66599
66772
|
notifierInternals.subscribe(this);
|
|
66600
|
-
this.columnNotifiers.push(
|
|
66773
|
+
this.columnNotifiers.push(notifierInternals);
|
|
66601
66774
|
}
|
|
66602
66775
|
}
|
|
66603
66776
|
getColumnsParticipatingInSorting() {
|