@ni/nimble-components 20.4.2 → 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 +146 -36
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +2256 -2217
- 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 +1 -0
- package/dist/esm/src/table/index.d.ts +4 -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 +1 -0
- package/dist/esm/table/components/row/index.js +4 -0
- 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 +14 -9
- 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 +7 -0
- package/dist/esm/table/index.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/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 15:
|
|
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
|
});
|
|
@@ -63839,6 +63893,25 @@ img.ProseMirror-separator {
|
|
|
63839
63893
|
.row {
|
|
63840
63894
|
position: relative;
|
|
63841
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
|
+
}
|
|
63842
63915
|
`.withBehaviors(themeBehavior(Theme.color, css `
|
|
63843
63916
|
.table-row-container::before {
|
|
63844
63917
|
content: '';
|
|
@@ -63878,15 +63951,27 @@ img.ProseMirror-separator {
|
|
|
63878
63951
|
@mousedown="${(_x, c) => !(c.event.detail > 1)}"
|
|
63879
63952
|
>
|
|
63880
63953
|
<slot></slot>
|
|
63881
|
-
${'' /*
|
|
63954
|
+
${'' /* Set aria-hidden="true" on sort indicators because aria-sort is set on the 1st sorted column */}
|
|
63882
63955
|
${when(x => x.sortDirection === TableColumnSortDirection.ascending, html `
|
|
63883
|
-
<${iconArrowUpTag}
|
|
63956
|
+
<${iconArrowUpTag}
|
|
63957
|
+
class="sort-indicator"
|
|
63958
|
+
title="${x => tableColumnHeaderSortedAscendingLabel.getValueFor(x)}"
|
|
63959
|
+
aria-hidden="true"
|
|
63960
|
+
></${iconArrowUpTag}>
|
|
63884
63961
|
`)}
|
|
63885
63962
|
${when(x => x.sortDirection === TableColumnSortDirection.descending, html `
|
|
63886
|
-
<${iconArrowDownTag}
|
|
63963
|
+
<${iconArrowDownTag}
|
|
63964
|
+
class="sort-indicator"
|
|
63965
|
+
title="${x => tableColumnHeaderSortedDescendingLabel.getValueFor(x)}"
|
|
63966
|
+
aria-hidden="true"
|
|
63967
|
+
></${iconArrowDownTag}>
|
|
63887
63968
|
`)}
|
|
63888
63969
|
${when(x => x.isGrouped, html `
|
|
63889
|
-
<${iconTwoSquaresInBracketsTag}
|
|
63970
|
+
<${iconTwoSquaresInBracketsTag}
|
|
63971
|
+
class="grouped-indicator"
|
|
63972
|
+
title="${x => tableColumnHeaderGroupedLabel.getValueFor(x)}"
|
|
63973
|
+
aria-label="${x => tableColumnHeaderGroupedLabel.getValueFor(x)}"
|
|
63974
|
+
></${iconTwoSquaresInBracketsTag}>
|
|
63890
63975
|
`)}
|
|
63891
63976
|
</template>
|
|
63892
63977
|
`;
|
|
@@ -63973,7 +64058,7 @@ img.ProseMirror-separator {
|
|
|
63973
64058
|
background-color: ${fillHoverSelectedColor};
|
|
63974
64059
|
}
|
|
63975
64060
|
|
|
63976
|
-
.
|
|
64061
|
+
.row-operations-container {
|
|
63977
64062
|
display: flex;
|
|
63978
64063
|
}
|
|
63979
64064
|
|
|
@@ -64071,6 +64156,7 @@ img.ProseMirror-separator {
|
|
|
64071
64156
|
@toggle="${(x, c) => x.onActionMenuToggle(c.event)}"
|
|
64072
64157
|
@click="${(_, c) => c.event.stopPropagation()}"
|
|
64073
64158
|
class="action-menu"
|
|
64159
|
+
title="${x => x.actionMenuLabel ?? tableCellActionMenuLabel.getValueFor(x)}"
|
|
64074
64160
|
>
|
|
64075
64161
|
<${iconThreeDotsLineTag} slot="start"></${iconThreeDotsLineTag}>
|
|
64076
64162
|
${x => x.actionMenuLabel ?? tableCellActionMenuLabel.getValueFor(x)}
|
|
@@ -64137,15 +64223,19 @@ img.ProseMirror-separator {
|
|
|
64137
64223
|
// prettier-ignore
|
|
64138
64224
|
const template$e = html `
|
|
64139
64225
|
<template role="row" aria-selected=${x => x.ariaSelected}>
|
|
64140
|
-
${when(x =>
|
|
64141
|
-
<span role="gridcell" class="
|
|
64142
|
-
|
|
64143
|
-
|
|
64144
|
-
|
|
64145
|
-
|
|
64146
|
-
|
|
64147
|
-
|
|
64148
|
-
|
|
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
|
+
`)}
|
|
64149
64239
|
</span>
|
|
64150
64240
|
`)}
|
|
64151
64241
|
${'' /* This is needed to help align the cell widths exactly with the column headers, due to the space reserved for
|
|
@@ -64199,6 +64289,7 @@ img.ProseMirror-separator {
|
|
|
64199
64289
|
this.columns = [];
|
|
64200
64290
|
this.nestingLevel = 0;
|
|
64201
64291
|
this.menuOpen = false;
|
|
64292
|
+
this.rowOperationGridCellHidden = false;
|
|
64202
64293
|
/**
|
|
64203
64294
|
* @internal
|
|
64204
64295
|
* An array that parallels the `columns` array and contains the indent
|
|
@@ -64369,6 +64460,9 @@ img.ProseMirror-separator {
|
|
|
64369
64460
|
__decorate$1([
|
|
64370
64461
|
attr({ attribute: 'menu-open', mode: 'boolean' })
|
|
64371
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);
|
|
64372
64466
|
__decorate$1([
|
|
64373
64467
|
observable
|
|
64374
64468
|
], TableRow.prototype, "cellIndentLevels", void 0);
|
|
@@ -64511,6 +64605,8 @@ img.ProseMirror-separator {
|
|
|
64511
64605
|
class="selection-checkbox"
|
|
64512
64606
|
@change="${(x, c) => x.onSelectionChange(c.event)}"
|
|
64513
64607
|
@click="${(_, c) => c.event.stopPropagation()}"
|
|
64608
|
+
title="${x => tableGroupSelectAllLabel.getValueFor(x)}"
|
|
64609
|
+
aria-label="${x => tableGroupSelectAllLabel.getValueFor(x)}"
|
|
64514
64610
|
>
|
|
64515
64611
|
</${checkboxTag}>
|
|
64516
64612
|
</span>
|
|
@@ -64522,6 +64618,7 @@ img.ProseMirror-separator {
|
|
|
64522
64618
|
content-hidden
|
|
64523
64619
|
class="expand-collapse-button"
|
|
64524
64620
|
tabindex="-1"
|
|
64621
|
+
title="${x => (x.expanded ? tableGroupCollapseLabel.getValueFor(x) : tableGroupExpandLabel.getValueFor(x))}"
|
|
64525
64622
|
>
|
|
64526
64623
|
<${iconArrowExpanderRightTag} ${ref('expandIcon')} slot="start" class="expander-icon ${x => x.animationClass}"></${iconArrowExpanderRightTag}>
|
|
64527
64624
|
${x => (x.expanded ? tableGroupCollapseLabel.getValueFor(x) : tableGroupExpandLabel.getValueFor(x))}
|
|
@@ -64659,29 +64756,34 @@ img.ProseMirror-separator {
|
|
|
64659
64756
|
<div class="glass-overlay">
|
|
64660
64757
|
<div role="rowgroup" class="header-row-container">
|
|
64661
64758
|
<div class="header-row" role="row">
|
|
64662
|
-
<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
|
+
`)}
|
|
64663
64765
|
${when(x => x.selectionMode === TableRowSelectionMode.multiple, html `
|
|
64664
|
-
<span
|
|
64766
|
+
<span class="checkbox-container">
|
|
64665
64767
|
<${checkboxTag}
|
|
64666
64768
|
${ref('selectionCheckbox')}
|
|
64667
64769
|
class="${x => `selection-checkbox ${x.selectionMode ?? ''}`}"
|
|
64668
64770
|
@change="${(x, c) => x.onAllRowsSelectionChange(c.event)}"
|
|
64771
|
+
title="${x => tableSelectAllLabel.getValueFor(x)}"
|
|
64772
|
+
aria-label="${x => tableSelectAllLabel.getValueFor(x)}"
|
|
64669
64773
|
>
|
|
64670
64774
|
</${checkboxTag}>
|
|
64671
64775
|
</span>
|
|
64672
64776
|
`)}
|
|
64673
|
-
|
|
64674
|
-
|
|
64675
|
-
|
|
64676
|
-
|
|
64677
|
-
|
|
64678
|
-
|
|
64679
|
-
|
|
64680
|
-
>
|
|
64681
|
-
|
|
64682
|
-
|
|
64683
|
-
</${buttonTag}>
|
|
64684
|
-
</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}>
|
|
64685
64787
|
</span>
|
|
64686
64788
|
<span class="column-headers-container" ${ref('columnHeadersContainer')}>
|
|
64687
64789
|
${repeat(x => x.visibleColumns, html `
|
|
@@ -64742,6 +64844,7 @@ img.ProseMirror-separator {
|
|
|
64742
64844
|
:dataRecord="${(x, c) => c.parent.tableData[x.index]?.record}"
|
|
64743
64845
|
:columns="${(_, c) => c.parent.columns}"
|
|
64744
64846
|
:nestingLevel="${(x, c) => c.parent.tableData[x.index]?.nestingLevel}"
|
|
64847
|
+
?row-operation-grid-cell-hidden="${(_, c) => !c.parent.showRowOperationColumn}"
|
|
64745
64848
|
@click="${(x, c) => c.parent.onRowClick(x.index, c.event)}"
|
|
64746
64849
|
@row-selection-toggle="${(x, c) => c.parent.onRowSelectionToggle(x.index, c.event)}"
|
|
64747
64850
|
@row-action-menu-beforetoggle="${(x, c) => c.parent.onRowActionMenuBeforeToggle(x.index, c.event)}"
|
|
@@ -66356,6 +66459,13 @@ img.ProseMirror-separator {
|
|
|
66356
66459
|
get validity() {
|
|
66357
66460
|
return this.tableValidator.getValidity();
|
|
66358
66461
|
}
|
|
66462
|
+
/**
|
|
66463
|
+
* @internal
|
|
66464
|
+
*/
|
|
66465
|
+
get showRowOperationColumn() {
|
|
66466
|
+
return (this.selectionMode === TableRowSelectionMode.multiple
|
|
66467
|
+
|| this.showCollapseAll);
|
|
66468
|
+
}
|
|
66359
66469
|
async setData(newData) {
|
|
66360
66470
|
await this.processPendingUpdates();
|
|
66361
66471
|
const data = newData.map(record => {
|