@ni/nimble-components 18.10.3 → 18.10.4
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 +762 -168
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +3184 -3028
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/table/components/cell/index.d.ts +1 -0
- package/dist/esm/table/components/cell/index.js +4 -0
- package/dist/esm/table/components/cell/index.js.map +1 -1
- package/dist/esm/table/components/cell/styles.js +8 -0
- package/dist/esm/table/components/cell/styles.js.map +1 -1
- package/dist/esm/table/components/cell/template.js +1 -1
- package/dist/esm/table/components/cell/template.js.map +1 -1
- package/dist/esm/table/components/group-row/index.d.ts +29 -0
- package/dist/esm/table/components/group-row/index.js +61 -0
- package/dist/esm/table/components/group-row/index.js.map +1 -0
- package/dist/esm/table/components/group-row/styles.d.ts +1 -0
- package/dist/esm/table/components/group-row/styles.js +64 -0
- package/dist/esm/table/components/group-row/styles.js.map +1 -0
- package/dist/esm/table/components/group-row/template.d.ts +2 -0
- package/dist/esm/table/components/group-row/template.js +23 -0
- package/dist/esm/table/components/group-row/template.js.map +1 -0
- package/dist/esm/table/components/row/index.d.ts +2 -0
- package/dist/esm/table/components/row/index.js +13 -5
- package/dist/esm/table/components/row/index.js.map +1 -1
- package/dist/esm/table/components/row/template.js +1 -0
- package/dist/esm/table/components/row/template.js.map +1 -1
- package/dist/esm/table/index.d.ts +14 -0
- package/dist/esm/table/index.js +84 -4
- package/dist/esm/table/index.js.map +1 -1
- package/dist/esm/table/models/table-validator.d.ts +3 -0
- package/dist/esm/table/models/table-validator.js +12 -9
- package/dist/esm/table/models/table-validator.js.map +1 -1
- package/dist/esm/table/models/update-tracker.d.ts +1 -0
- package/dist/esm/table/models/update-tracker.js +10 -1
- package/dist/esm/table/models/update-tracker.js.map +1 -1
- package/dist/esm/table/models/virtualizer.d.ts +3 -1
- package/dist/esm/table/models/virtualizer.js +3 -2
- package/dist/esm/table/models/virtualizer.js.map +1 -1
- package/dist/esm/table/template.js +33 -17
- package/dist/esm/table/template.js.map +1 -1
- package/dist/esm/table/types.d.ts +1 -0
- package/dist/esm/table/types.js.map +1 -1
- package/dist/esm/table-column/base/group-header-view/index.d.ts +14 -0
- package/dist/esm/table-column/base/group-header-view/index.js +17 -0
- package/dist/esm/table-column/base/group-header-view/index.js.map +1 -0
- package/dist/esm/table-column/base/group-header-view/template.d.ts +3 -0
- package/dist/esm/table-column/base/group-header-view/template.js +10 -0
- package/dist/esm/table-column/base/group-header-view/template.js.map +1 -0
- package/dist/esm/table-column/base/index.d.ts +25 -0
- package/dist/esm/table-column/base/index.js +23 -0
- package/dist/esm/table-column/base/index.js.map +1 -1
- package/dist/esm/table-column/mixins/groupable-column.d.ts +12 -0
- package/dist/esm/table-column/mixins/groupable-column.js +35 -0
- package/dist/esm/table-column/mixins/groupable-column.js.map +1 -0
- package/dist/esm/table-column/text/group-header-view/index.d.ts +22 -0
- package/dist/esm/table-column/text/group-header-view/index.js +47 -0
- package/dist/esm/table-column/text/group-header-view/index.js.map +1 -0
- package/dist/esm/table-column/text/group-header-view/styles.d.ts +1 -0
- package/dist/esm/table-column/text/group-header-view/styles.js +16 -0
- package/dist/esm/table-column/text/group-header-view/styles.js.map +1 -0
- package/dist/esm/table-column/text/group-header-view/template.d.ts +2 -0
- package/dist/esm/table-column/text/group-header-view/template.js +15 -0
- package/dist/esm/table-column/text/group-header-view/template.js.map +1 -0
- package/dist/esm/table-column/text/index.d.ts +9 -1
- package/dist/esm/table-column/text/index.js +7 -1
- package/dist/esm/table-column/text/index.js.map +1 -1
- package/dist/esm/tree-item/styles.js +2 -2
- package/dist/esm/tree-item/styles.js.map +1 -1
- package/package.json +1 -1
|
@@ -16744,9 +16744,9 @@
|
|
|
16744
16744
|
return `${prefix}${uniqueIdCounter++}`;
|
|
16745
16745
|
}
|
|
16746
16746
|
|
|
16747
|
-
const template$
|
|
16747
|
+
const template$q = html `<slot></slot>`;
|
|
16748
16748
|
|
|
16749
|
-
const styles$
|
|
16749
|
+
const styles$O = css `
|
|
16750
16750
|
:host {
|
|
16751
16751
|
display: contents;
|
|
16752
16752
|
}
|
|
@@ -16802,8 +16802,8 @@
|
|
|
16802
16802
|
], ThemeProvider.prototype, "theme", void 0);
|
|
16803
16803
|
const nimbleDesignSystemProvider = ThemeProvider.compose({
|
|
16804
16804
|
baseName: 'theme-provider',
|
|
16805
|
-
styles: styles$
|
|
16806
|
-
template: template$
|
|
16805
|
+
styles: styles$O,
|
|
16806
|
+
template: template$q
|
|
16807
16807
|
});
|
|
16808
16808
|
DesignSystem.getOrCreate()
|
|
16809
16809
|
.withPrefix('nimble')
|
|
@@ -16895,7 +16895,7 @@
|
|
|
16895
16895
|
const groupHeaderTextTransform = DesignToken.create(styleNameFromTokenName(tokenNames.groupHeaderTextTransform)).withDefault('uppercase');
|
|
16896
16896
|
// Animation Tokens
|
|
16897
16897
|
const smallDelay = DesignToken.create(styleNameFromTokenName(tokenNames.smallDelay)).withDefault(SmallDelay);
|
|
16898
|
-
DesignToken.create(styleNameFromTokenName(tokenNames.mediumDelay)).withDefault(MediumDelay);
|
|
16898
|
+
const mediumDelay = DesignToken.create(styleNameFromTokenName(tokenNames.mediumDelay)).withDefault(MediumDelay);
|
|
16899
16899
|
const largeDelay = DesignToken.create(styleNameFromTokenName(tokenNames.largeDelay)).withDefault(LargeDelay);
|
|
16900
16900
|
// Private helpers functions
|
|
16901
16901
|
function hexToRgbPartial(hexValue) {
|
|
@@ -16987,7 +16987,7 @@
|
|
|
16987
16987
|
}
|
|
16988
16988
|
}
|
|
16989
16989
|
|
|
16990
|
-
const styles$
|
|
16990
|
+
const styles$N = css `
|
|
16991
16991
|
${display('inline')}
|
|
16992
16992
|
|
|
16993
16993
|
:host {
|
|
@@ -17070,7 +17070,7 @@
|
|
|
17070
17070
|
`;
|
|
17071
17071
|
|
|
17072
17072
|
// prettier-ignore
|
|
17073
|
-
const template$
|
|
17073
|
+
const template$p = (context, definition) => html `
|
|
17074
17074
|
<a
|
|
17075
17075
|
class="control"
|
|
17076
17076
|
part="control"
|
|
@@ -17144,8 +17144,8 @@
|
|
|
17144
17144
|
const nimbleAnchor = Anchor.compose({
|
|
17145
17145
|
baseName: 'anchor',
|
|
17146
17146
|
baseClass: Anchor$1,
|
|
17147
|
-
template: template$
|
|
17148
|
-
styles: styles$
|
|
17147
|
+
template: template$p,
|
|
17148
|
+
styles: styles$N,
|
|
17149
17149
|
shadowOptions: {
|
|
17150
17150
|
delegatesFocus: true
|
|
17151
17151
|
}
|
|
@@ -17231,7 +17231,7 @@
|
|
|
17231
17231
|
return new MultivaluePropertyStyleSheetBehavior('appearance', value, styles);
|
|
17232
17232
|
}
|
|
17233
17233
|
|
|
17234
|
-
const styles$
|
|
17234
|
+
const styles$M = css `
|
|
17235
17235
|
${display('inline-flex')}
|
|
17236
17236
|
|
|
17237
17237
|
:host {
|
|
@@ -17512,8 +17512,8 @@
|
|
|
17512
17512
|
}
|
|
17513
17513
|
`));
|
|
17514
17514
|
|
|
17515
|
-
const styles$
|
|
17516
|
-
${styles$
|
|
17515
|
+
const styles$L = css `
|
|
17516
|
+
${styles$M}
|
|
17517
17517
|
${buttonAppearanceVariantStyles}
|
|
17518
17518
|
|
|
17519
17519
|
.control {
|
|
@@ -17521,7 +17521,7 @@
|
|
|
17521
17521
|
}
|
|
17522
17522
|
`;
|
|
17523
17523
|
|
|
17524
|
-
const template$
|
|
17524
|
+
const template$o = (context, definition) => html `
|
|
17525
17525
|
<a
|
|
17526
17526
|
class="control"
|
|
17527
17527
|
part="control"
|
|
@@ -17603,8 +17603,8 @@
|
|
|
17603
17603
|
], AnchorButton.prototype, "disabled", void 0);
|
|
17604
17604
|
const nimbleAnchorButton = AnchorButton.compose({
|
|
17605
17605
|
baseName: 'anchor-button',
|
|
17606
|
-
template: template$
|
|
17607
|
-
styles: styles$
|
|
17606
|
+
template: template$o,
|
|
17607
|
+
styles: styles$L,
|
|
17608
17608
|
shadowOptions: {
|
|
17609
17609
|
delegatesFocus: true
|
|
17610
17610
|
}
|
|
@@ -17612,7 +17612,7 @@
|
|
|
17612
17612
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorButton());
|
|
17613
17613
|
DesignSystem.tagFor(AnchorButton);
|
|
17614
17614
|
|
|
17615
|
-
const styles$
|
|
17615
|
+
const styles$K = css `
|
|
17616
17616
|
${display('grid')}
|
|
17617
17617
|
|
|
17618
17618
|
:host {
|
|
@@ -17689,7 +17689,7 @@
|
|
|
17689
17689
|
}
|
|
17690
17690
|
`;
|
|
17691
17691
|
|
|
17692
|
-
const template$
|
|
17692
|
+
const template$n = (context, definition) => html `
|
|
17693
17693
|
<template
|
|
17694
17694
|
role="menuitem"
|
|
17695
17695
|
class="${x => (typeof x.startColumnCount === 'number'
|
|
@@ -17795,8 +17795,8 @@
|
|
|
17795
17795
|
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
17796
17796
|
const nimbleAnchorMenuItem = AnchorMenuItem.compose({
|
|
17797
17797
|
baseName: 'anchor-menu-item',
|
|
17798
|
-
template: template$
|
|
17799
|
-
styles: styles$
|
|
17798
|
+
template: template$n,
|
|
17799
|
+
styles: styles$K,
|
|
17800
17800
|
shadowOptions: {
|
|
17801
17801
|
delegatesFocus: true
|
|
17802
17802
|
}
|
|
@@ -17820,7 +17820,7 @@
|
|
|
17820
17820
|
}
|
|
17821
17821
|
});
|
|
17822
17822
|
|
|
17823
|
-
const styles$
|
|
17823
|
+
const styles$J = css `
|
|
17824
17824
|
${display('inline-flex')}
|
|
17825
17825
|
|
|
17826
17826
|
:host {
|
|
@@ -17926,8 +17926,8 @@
|
|
|
17926
17926
|
}
|
|
17927
17927
|
`;
|
|
17928
17928
|
|
|
17929
|
-
const styles$
|
|
17930
|
-
${styles$
|
|
17929
|
+
const styles$I = css `
|
|
17930
|
+
${styles$J}
|
|
17931
17931
|
|
|
17932
17932
|
a {
|
|
17933
17933
|
text-decoration: none;
|
|
@@ -17945,7 +17945,7 @@
|
|
|
17945
17945
|
}
|
|
17946
17946
|
`;
|
|
17947
17947
|
|
|
17948
|
-
const template$
|
|
17948
|
+
const template$m = (context, definition) => html `
|
|
17949
17949
|
<template slot="anchortab" role="tab" aria-disabled="${x => x.disabled}">
|
|
17950
17950
|
<a
|
|
17951
17951
|
download="${x => x.download}"
|
|
@@ -17998,13 +17998,13 @@
|
|
|
17998
17998
|
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
17999
17999
|
const nimbleAnchorTab = AnchorTab.compose({
|
|
18000
18000
|
baseName: 'anchor-tab',
|
|
18001
|
-
template: template$
|
|
18002
|
-
styles: styles$
|
|
18001
|
+
template: template$m,
|
|
18002
|
+
styles: styles$I
|
|
18003
18003
|
});
|
|
18004
18004
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTab());
|
|
18005
18005
|
DesignSystem.tagFor(AnchorTab);
|
|
18006
18006
|
|
|
18007
|
-
const styles$
|
|
18007
|
+
const styles$H = css `
|
|
18008
18008
|
${display('grid')}
|
|
18009
18009
|
|
|
18010
18010
|
:host {
|
|
@@ -18022,7 +18022,7 @@
|
|
|
18022
18022
|
}
|
|
18023
18023
|
`;
|
|
18024
18024
|
|
|
18025
|
-
const template$
|
|
18025
|
+
const template$l = (context, definition) => html `
|
|
18026
18026
|
${startSlotTemplate(context, definition)}
|
|
18027
18027
|
<div ${ref('tablist')} class="tablist" part="tablist" role="tablist">
|
|
18028
18028
|
<slot name="anchortab" ${slotted('tabs')}></slot>
|
|
@@ -18219,8 +18219,8 @@
|
|
|
18219
18219
|
applyMixins(AnchorTabs, StartEnd);
|
|
18220
18220
|
const nimbleAnchorTabs = AnchorTabs.compose({
|
|
18221
18221
|
baseName: 'anchor-tabs',
|
|
18222
|
-
template: template$
|
|
18223
|
-
styles: styles$
|
|
18222
|
+
template: template$l,
|
|
18223
|
+
styles: styles$H,
|
|
18224
18224
|
shadowOptions: {
|
|
18225
18225
|
delegatesFocus: false
|
|
18226
18226
|
}
|
|
@@ -18228,7 +18228,7 @@
|
|
|
18228
18228
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTabs());
|
|
18229
18229
|
DesignSystem.tagFor(AnchorTabs);
|
|
18230
18230
|
|
|
18231
|
-
const styles$
|
|
18231
|
+
const styles$G = css `
|
|
18232
18232
|
${display('block')}
|
|
18233
18233
|
|
|
18234
18234
|
:host {
|
|
@@ -18332,7 +18332,7 @@
|
|
|
18332
18332
|
}
|
|
18333
18333
|
`;
|
|
18334
18334
|
|
|
18335
|
-
const template$
|
|
18335
|
+
const template$k = (context, definition) => html `
|
|
18336
18336
|
<template
|
|
18337
18337
|
role="treeitem"
|
|
18338
18338
|
slot="${x => (x.isNestedItem() ? 'item' : null)}"
|
|
@@ -18469,8 +18469,8 @@
|
|
|
18469
18469
|
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
18470
18470
|
const nimbleAnchorTreeItem = AnchorTreeItem.compose({
|
|
18471
18471
|
baseName: 'anchor-tree-item',
|
|
18472
|
-
template: template$
|
|
18473
|
-
styles: styles$
|
|
18472
|
+
template: template$k,
|
|
18473
|
+
styles: styles$G,
|
|
18474
18474
|
shadowOptions: {
|
|
18475
18475
|
delegatesFocus: true
|
|
18476
18476
|
}
|
|
@@ -18480,7 +18480,7 @@
|
|
|
18480
18480
|
.register(nimbleAnchorTreeItem());
|
|
18481
18481
|
DesignSystem.tagFor(AnchorTreeItem);
|
|
18482
18482
|
|
|
18483
|
-
const styles$
|
|
18483
|
+
const styles$F = css `
|
|
18484
18484
|
:host {
|
|
18485
18485
|
contain: layout;
|
|
18486
18486
|
display: block;
|
|
@@ -18504,7 +18504,7 @@
|
|
|
18504
18504
|
baseName: 'anchored-region',
|
|
18505
18505
|
baseClass: AnchoredRegion$1,
|
|
18506
18506
|
template: anchoredRegionTemplate,
|
|
18507
|
-
styles: styles$
|
|
18507
|
+
styles: styles$F
|
|
18508
18508
|
});
|
|
18509
18509
|
DesignSystem.getOrCreate()
|
|
18510
18510
|
.withPrefix('nimble')
|
|
@@ -18584,7 +18584,7 @@
|
|
|
18584
18584
|
*/
|
|
18585
18585
|
const themeBehavior = (theme, styles) => new ThemeStyleSheetBehavior(theme, styles);
|
|
18586
18586
|
|
|
18587
|
-
const styles$
|
|
18587
|
+
const styles$E = css `
|
|
18588
18588
|
${display('flex')}
|
|
18589
18589
|
|
|
18590
18590
|
:host {
|
|
@@ -18742,8 +18742,8 @@
|
|
|
18742
18742
|
}
|
|
18743
18743
|
`));
|
|
18744
18744
|
|
|
18745
|
-
const styles$
|
|
18746
|
-
${styles$
|
|
18745
|
+
const styles$D = css `
|
|
18746
|
+
${styles$M}
|
|
18747
18747
|
${buttonAppearanceVariantStyles}
|
|
18748
18748
|
`;
|
|
18749
18749
|
|
|
@@ -18789,7 +18789,7 @@
|
|
|
18789
18789
|
baseName: 'button',
|
|
18790
18790
|
baseClass: Button$1,
|
|
18791
18791
|
template: buttonTemplate,
|
|
18792
|
-
styles: styles$
|
|
18792
|
+
styles: styles$D,
|
|
18793
18793
|
shadowOptions: {
|
|
18794
18794
|
delegatesFocus: true
|
|
18795
18795
|
}
|
|
@@ -19411,13 +19411,13 @@
|
|
|
19411
19411
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M8.033 14.026 4.9 10.866 6.277 9.53l1.744 1.81 4.562-4.507 1.307 1.363Zm1.155-10.68-1.321-1.32-2.312 2.311-2.311-2.311-1.321 1.32 2.311 2.312L1.923 7.97l1.32 1.32 2.312-2.31 2.312 2.31 1.32-1.32-2.31-2.312Z"/></svg>`
|
|
19412
19412
|
};
|
|
19413
19413
|
|
|
19414
|
-
const template$
|
|
19414
|
+
const template$j = html `
|
|
19415
19415
|
<template>
|
|
19416
19416
|
<div class="icon" :innerHTML=${x => x.icon.data}></div>
|
|
19417
19417
|
</template
|
|
19418
19418
|
`;
|
|
19419
19419
|
|
|
19420
|
-
const styles$
|
|
19420
|
+
const styles$C = css `
|
|
19421
19421
|
${display('inline-flex')}
|
|
19422
19422
|
|
|
19423
19423
|
:host {
|
|
@@ -19470,8 +19470,8 @@
|
|
|
19470
19470
|
const registerIcon = (baseName, iconClass) => {
|
|
19471
19471
|
const composedIcon = iconClass.compose({
|
|
19472
19472
|
baseName,
|
|
19473
|
-
template: template$
|
|
19474
|
-
styles: styles$
|
|
19473
|
+
template: template$j,
|
|
19474
|
+
styles: styles$C,
|
|
19475
19475
|
baseClass: iconClass
|
|
19476
19476
|
});
|
|
19477
19477
|
DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
|
|
@@ -19537,7 +19537,7 @@
|
|
|
19537
19537
|
};
|
|
19538
19538
|
|
|
19539
19539
|
// prettier-ignore
|
|
19540
|
-
const template$
|
|
19540
|
+
const template$i = html `
|
|
19541
19541
|
<div class="container"
|
|
19542
19542
|
role="status"
|
|
19543
19543
|
aria-atomic="${x => x.ariaAtomic}"
|
|
@@ -19656,13 +19656,13 @@
|
|
|
19656
19656
|
applyMixins(Banner, ARIAGlobalStatesAndProperties);
|
|
19657
19657
|
const nimbleBanner = Banner.compose({
|
|
19658
19658
|
baseName: 'banner',
|
|
19659
|
-
template: template$
|
|
19660
|
-
styles: styles$
|
|
19659
|
+
template: template$i,
|
|
19660
|
+
styles: styles$E
|
|
19661
19661
|
});
|
|
19662
19662
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBanner());
|
|
19663
19663
|
DesignSystem.tagFor(Banner);
|
|
19664
19664
|
|
|
19665
|
-
const styles$
|
|
19665
|
+
const styles$B = css `
|
|
19666
19666
|
${display('inline-block')}
|
|
19667
19667
|
|
|
19668
19668
|
:host {
|
|
@@ -19703,12 +19703,12 @@
|
|
|
19703
19703
|
baseName: 'breadcrumb',
|
|
19704
19704
|
baseClass: Breadcrumb$1,
|
|
19705
19705
|
template: breadcrumbTemplate,
|
|
19706
|
-
styles: styles$
|
|
19706
|
+
styles: styles$B
|
|
19707
19707
|
});
|
|
19708
19708
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
|
|
19709
19709
|
DesignSystem.tagFor(Breadcrumb);
|
|
19710
19710
|
|
|
19711
|
-
const styles$
|
|
19711
|
+
const styles$A = css `
|
|
19712
19712
|
${display('inline-flex')}
|
|
19713
19713
|
|
|
19714
19714
|
:host {
|
|
@@ -19784,7 +19784,7 @@
|
|
|
19784
19784
|
baseName: 'breadcrumb-item',
|
|
19785
19785
|
baseClass: BreadcrumbItem$1,
|
|
19786
19786
|
template: breadcrumbItemTemplate,
|
|
19787
|
-
styles: styles$
|
|
19787
|
+
styles: styles$A,
|
|
19788
19788
|
separator: forwardSlash16X16.data
|
|
19789
19789
|
});
|
|
19790
19790
|
DesignSystem.getOrCreate()
|
|
@@ -19792,7 +19792,7 @@
|
|
|
19792
19792
|
.register(nimbleBreadcrumbItem());
|
|
19793
19793
|
DesignSystem.tagFor(BreadcrumbItem);
|
|
19794
19794
|
|
|
19795
|
-
const styles$
|
|
19795
|
+
const styles$z = css `
|
|
19796
19796
|
${display('inline-flex')}
|
|
19797
19797
|
|
|
19798
19798
|
:host {
|
|
@@ -19951,7 +19951,7 @@
|
|
|
19951
19951
|
const nimbleCardButton = CardButton.compose({
|
|
19952
19952
|
baseName: 'card-button',
|
|
19953
19953
|
template: buttonTemplate,
|
|
19954
|
-
styles: styles$
|
|
19954
|
+
styles: styles$z,
|
|
19955
19955
|
shadowOptions: {
|
|
19956
19956
|
delegatesFocus: true
|
|
19957
19957
|
}
|
|
@@ -19959,7 +19959,7 @@
|
|
|
19959
19959
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCardButton());
|
|
19960
19960
|
DesignSystem.tagFor(CardButton);
|
|
19961
19961
|
|
|
19962
|
-
const styles$
|
|
19962
|
+
const styles$y = css `
|
|
19963
19963
|
${display('inline-flex')}
|
|
19964
19964
|
|
|
19965
19965
|
:host {
|
|
@@ -20077,15 +20077,15 @@
|
|
|
20077
20077
|
baseName: 'checkbox',
|
|
20078
20078
|
baseClass: Checkbox$1,
|
|
20079
20079
|
template: checkboxTemplate,
|
|
20080
|
-
styles: styles$
|
|
20080
|
+
styles: styles$y,
|
|
20081
20081
|
checkedIndicator: check16X16.data,
|
|
20082
20082
|
indeterminateIndicator: minus16X16.data
|
|
20083
20083
|
});
|
|
20084
20084
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCheckbox());
|
|
20085
20085
|
DesignSystem.tagFor(Checkbox);
|
|
20086
20086
|
|
|
20087
|
-
const styles$
|
|
20088
|
-
${styles$
|
|
20087
|
+
const styles$x = css `
|
|
20088
|
+
${styles$M}
|
|
20089
20089
|
|
|
20090
20090
|
.control[aria-pressed='true'] {
|
|
20091
20091
|
background-color: ${fillSelectedColor};
|
|
@@ -20111,7 +20111,7 @@
|
|
|
20111
20111
|
}
|
|
20112
20112
|
`;
|
|
20113
20113
|
|
|
20114
|
-
const template$
|
|
20114
|
+
const template$h = (context, definition) => html `
|
|
20115
20115
|
<div
|
|
20116
20116
|
role="button"
|
|
20117
20117
|
part="control"
|
|
@@ -20186,8 +20186,8 @@
|
|
|
20186
20186
|
applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
|
|
20187
20187
|
const nimbleToggleButton = ToggleButton.compose({
|
|
20188
20188
|
baseName: 'toggle-button',
|
|
20189
|
-
template: template$
|
|
20190
|
-
styles: styles$
|
|
20189
|
+
template: template$h,
|
|
20190
|
+
styles: styles$x,
|
|
20191
20191
|
shadowOptions: {
|
|
20192
20192
|
delegatesFocus: true
|
|
20193
20193
|
}
|
|
@@ -20219,7 +20219,7 @@
|
|
|
20219
20219
|
block: 'block'
|
|
20220
20220
|
};
|
|
20221
20221
|
|
|
20222
|
-
const styles$
|
|
20222
|
+
const styles$w = css `
|
|
20223
20223
|
${display('inline-flex')}
|
|
20224
20224
|
|
|
20225
20225
|
:host {
|
|
@@ -20455,7 +20455,7 @@
|
|
|
20455
20455
|
}
|
|
20456
20456
|
`));
|
|
20457
20457
|
|
|
20458
|
-
const styles$
|
|
20458
|
+
const styles$v = css `
|
|
20459
20459
|
.error-icon {
|
|
20460
20460
|
display: none;
|
|
20461
20461
|
}
|
|
@@ -20489,9 +20489,9 @@
|
|
|
20489
20489
|
}
|
|
20490
20490
|
`;
|
|
20491
20491
|
|
|
20492
|
-
const styles$
|
|
20493
|
-
${styles$
|
|
20494
|
-
${styles$
|
|
20492
|
+
const styles$u = css `
|
|
20493
|
+
${styles$w}
|
|
20494
|
+
${styles$v}
|
|
20495
20495
|
|
|
20496
20496
|
:host {
|
|
20497
20497
|
--ni-private-hover-bottom-border-width: 2px;
|
|
@@ -20727,7 +20727,7 @@
|
|
|
20727
20727
|
baseName: 'combobox',
|
|
20728
20728
|
baseClass: Combobox$1,
|
|
20729
20729
|
template: comboboxTemplate,
|
|
20730
|
-
styles: styles$
|
|
20730
|
+
styles: styles$u,
|
|
20731
20731
|
shadowOptions: {
|
|
20732
20732
|
delegatesFocus: true
|
|
20733
20733
|
},
|
|
@@ -20772,7 +20772,7 @@
|
|
|
20772
20772
|
*/
|
|
20773
20773
|
const UserDismissed = Symbol('user dismissed');
|
|
20774
20774
|
|
|
20775
|
-
const styles$
|
|
20775
|
+
const styles$t = css `
|
|
20776
20776
|
${display('grid')}
|
|
20777
20777
|
|
|
20778
20778
|
dialog {
|
|
@@ -20888,7 +20888,7 @@
|
|
|
20888
20888
|
}
|
|
20889
20889
|
`));
|
|
20890
20890
|
|
|
20891
|
-
const template$
|
|
20891
|
+
const template$g = html `
|
|
20892
20892
|
<template>
|
|
20893
20893
|
<dialog
|
|
20894
20894
|
${ref('dialogElement')}
|
|
@@ -21014,14 +21014,14 @@
|
|
|
21014
21014
|
applyMixins(Dialog, ARIAGlobalStatesAndProperties);
|
|
21015
21015
|
const nimbleDialog = Dialog.compose({
|
|
21016
21016
|
baseName: 'dialog',
|
|
21017
|
-
template: template$
|
|
21018
|
-
styles: styles$
|
|
21017
|
+
template: template$g,
|
|
21018
|
+
styles: styles$t,
|
|
21019
21019
|
baseClass: Dialog
|
|
21020
21020
|
});
|
|
21021
21021
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDialog());
|
|
21022
21022
|
DesignSystem.tagFor(Dialog);
|
|
21023
21023
|
|
|
21024
|
-
const styles$
|
|
21024
|
+
const styles$s = css `
|
|
21025
21025
|
${display('block')}
|
|
21026
21026
|
|
|
21027
21027
|
:host {
|
|
@@ -21174,7 +21174,7 @@
|
|
|
21174
21174
|
}
|
|
21175
21175
|
`));
|
|
21176
21176
|
|
|
21177
|
-
const template$
|
|
21177
|
+
const template$f = html `
|
|
21178
21178
|
<dialog
|
|
21179
21179
|
${ref('dialog')}
|
|
21180
21180
|
aria-label="${x => x.ariaLabel}"
|
|
@@ -21288,8 +21288,8 @@
|
|
|
21288
21288
|
applyMixins(Drawer, ARIAGlobalStatesAndProperties);
|
|
21289
21289
|
const nimbleDrawer = Drawer.compose({
|
|
21290
21290
|
baseName: 'drawer',
|
|
21291
|
-
template: template$
|
|
21292
|
-
styles: styles$
|
|
21291
|
+
template: template$f,
|
|
21292
|
+
styles: styles$s
|
|
21293
21293
|
});
|
|
21294
21294
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
|
|
21295
21295
|
DesignSystem.tagFor(Drawer);
|
|
@@ -21352,7 +21352,7 @@
|
|
|
21352
21352
|
}
|
|
21353
21353
|
}
|
|
21354
21354
|
registerIcon('icon-arrow-expander-right', IconArrowExpanderRight);
|
|
21355
|
-
DesignSystem.tagFor(IconArrowExpanderRight);
|
|
21355
|
+
const iconArrowExpanderRightTag = DesignSystem.tagFor(IconArrowExpanderRight);
|
|
21356
21356
|
|
|
21357
21357
|
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
21358
21358
|
/**
|
|
@@ -23070,7 +23070,7 @@
|
|
|
23070
23070
|
registerIcon('icon-xmark-check', IconXmarkCheck);
|
|
23071
23071
|
DesignSystem.tagFor(IconXmarkCheck);
|
|
23072
23072
|
|
|
23073
|
-
const styles$
|
|
23073
|
+
const styles$r = css `
|
|
23074
23074
|
${display('flex')}
|
|
23075
23075
|
|
|
23076
23076
|
:host {
|
|
@@ -23150,12 +23150,12 @@
|
|
|
23150
23150
|
baseName: 'list-option',
|
|
23151
23151
|
baseClass: ListboxOption,
|
|
23152
23152
|
template: listboxOptionTemplate,
|
|
23153
|
-
styles: styles$
|
|
23153
|
+
styles: styles$r
|
|
23154
23154
|
});
|
|
23155
23155
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleListOption());
|
|
23156
23156
|
DesignSystem.tagFor(ListOption);
|
|
23157
23157
|
|
|
23158
|
-
const styles$
|
|
23158
|
+
const styles$q = css `
|
|
23159
23159
|
${display('grid')}
|
|
23160
23160
|
|
|
23161
23161
|
:host {
|
|
@@ -23222,12 +23222,12 @@
|
|
|
23222
23222
|
baseName: 'menu',
|
|
23223
23223
|
baseClass: Menu$1,
|
|
23224
23224
|
template: menuTemplate,
|
|
23225
|
-
styles: styles$
|
|
23225
|
+
styles: styles$q
|
|
23226
23226
|
});
|
|
23227
23227
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenu());
|
|
23228
23228
|
DesignSystem.tagFor(Menu);
|
|
23229
23229
|
|
|
23230
|
-
const styles$
|
|
23230
|
+
const styles$p = css `
|
|
23231
23231
|
${display('inline-block')}
|
|
23232
23232
|
|
|
23233
23233
|
:host {
|
|
@@ -23246,7 +23246,7 @@
|
|
|
23246
23246
|
`;
|
|
23247
23247
|
|
|
23248
23248
|
// prettier-ignore
|
|
23249
|
-
const template$
|
|
23249
|
+
const template$e = html `
|
|
23250
23250
|
<template
|
|
23251
23251
|
?open="${x => x.open}"
|
|
23252
23252
|
@focusout="${(x, c) => x.focusoutHandler(c.event)}"
|
|
@@ -23501,8 +23501,8 @@
|
|
|
23501
23501
|
], MenuButton.prototype, "slottedMenus", void 0);
|
|
23502
23502
|
const nimbleMenuButton = MenuButton.compose({
|
|
23503
23503
|
baseName: 'menu-button',
|
|
23504
|
-
template: template$
|
|
23505
|
-
styles: styles$
|
|
23504
|
+
template: template$e,
|
|
23505
|
+
styles: styles$p,
|
|
23506
23506
|
shadowOptions: {
|
|
23507
23507
|
delegatesFocus: true
|
|
23508
23508
|
}
|
|
@@ -23510,7 +23510,7 @@
|
|
|
23510
23510
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuButton());
|
|
23511
23511
|
const menuButtonTag = DesignSystem.tagFor(MenuButton);
|
|
23512
23512
|
|
|
23513
|
-
const styles$
|
|
23513
|
+
const styles$o = css `
|
|
23514
23514
|
${display('grid')}
|
|
23515
23515
|
|
|
23516
23516
|
:host {
|
|
@@ -23608,7 +23608,7 @@
|
|
|
23608
23608
|
baseName: 'menu-item',
|
|
23609
23609
|
baseClass: MenuItem$1,
|
|
23610
23610
|
template: menuItemTemplate,
|
|
23611
|
-
styles: styles$
|
|
23611
|
+
styles: styles$o,
|
|
23612
23612
|
expandCollapseGlyph: arrowExpanderRight16X16.data
|
|
23613
23613
|
});
|
|
23614
23614
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuItem());
|
|
@@ -23623,9 +23623,9 @@
|
|
|
23623
23623
|
block: 'block'
|
|
23624
23624
|
};
|
|
23625
23625
|
|
|
23626
|
-
const styles$
|
|
23626
|
+
const styles$n = css `
|
|
23627
23627
|
${display('inline-block')}
|
|
23628
|
-
${styles$
|
|
23628
|
+
${styles$v}
|
|
23629
23629
|
|
|
23630
23630
|
:host {
|
|
23631
23631
|
font: ${bodyFont};
|
|
@@ -23839,7 +23839,7 @@
|
|
|
23839
23839
|
baseName: 'number-field',
|
|
23840
23840
|
baseClass: NumberField$1,
|
|
23841
23841
|
template: numberFieldTemplate,
|
|
23842
|
-
styles: styles$
|
|
23842
|
+
styles: styles$n,
|
|
23843
23843
|
shadowOptions: {
|
|
23844
23844
|
delegatesFocus: true
|
|
23845
23845
|
},
|
|
@@ -23881,7 +23881,7 @@
|
|
|
23881
23881
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
|
|
23882
23882
|
DesignSystem.tagFor(NumberField);
|
|
23883
23883
|
|
|
23884
|
-
const styles$
|
|
23884
|
+
const styles$m = css `
|
|
23885
23885
|
${display('inline-flex')}
|
|
23886
23886
|
|
|
23887
23887
|
:host {
|
|
@@ -23982,13 +23982,13 @@
|
|
|
23982
23982
|
baseName: 'radio',
|
|
23983
23983
|
baseClass: Radio$1,
|
|
23984
23984
|
template: radioTemplate,
|
|
23985
|
-
styles: styles$
|
|
23985
|
+
styles: styles$m,
|
|
23986
23986
|
checkedIndicator: circleFilled16X16.data
|
|
23987
23987
|
});
|
|
23988
23988
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadio());
|
|
23989
23989
|
DesignSystem.tagFor(Radio);
|
|
23990
23990
|
|
|
23991
|
-
const styles$
|
|
23991
|
+
const styles$l = css `
|
|
23992
23992
|
${display('inline-block')}
|
|
23993
23993
|
|
|
23994
23994
|
.positioning-region {
|
|
@@ -24023,7 +24023,7 @@
|
|
|
24023
24023
|
baseName: 'radio-group',
|
|
24024
24024
|
baseClass: RadioGroup$1,
|
|
24025
24025
|
template: radioGroupTemplate,
|
|
24026
|
-
styles: styles$
|
|
24026
|
+
styles: styles$l,
|
|
24027
24027
|
shadowOptions: {
|
|
24028
24028
|
delegatesFocus: true
|
|
24029
24029
|
}
|
|
@@ -24031,9 +24031,9 @@
|
|
|
24031
24031
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadioGroup());
|
|
24032
24032
|
DesignSystem.tagFor(RadioGroup);
|
|
24033
24033
|
|
|
24034
|
-
const styles$
|
|
24035
|
-
${styles$
|
|
24036
|
-
${styles$
|
|
24034
|
+
const styles$k = css `
|
|
24035
|
+
${styles$w}
|
|
24036
|
+
${styles$v}
|
|
24037
24037
|
|
|
24038
24038
|
${
|
|
24039
24039
|
/* We are using flex `order` to define the visual ordering of the selected value,
|
|
@@ -24109,7 +24109,7 @@
|
|
|
24109
24109
|
baseName: 'select',
|
|
24110
24110
|
baseClass: Select$1,
|
|
24111
24111
|
template: selectTemplate,
|
|
24112
|
-
styles: styles$
|
|
24112
|
+
styles: styles$k,
|
|
24113
24113
|
indicator: arrowExpanderDown16X16.data,
|
|
24114
24114
|
end: html `
|
|
24115
24115
|
<${iconExclamationMarkTag}
|
|
@@ -24122,7 +24122,7 @@
|
|
|
24122
24122
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSelect());
|
|
24123
24123
|
DesignSystem.tagFor(Select);
|
|
24124
24124
|
|
|
24125
|
-
const styles$
|
|
24125
|
+
const styles$j = css `
|
|
24126
24126
|
${display('inline-flex')}
|
|
24127
24127
|
|
|
24128
24128
|
:host {
|
|
@@ -24266,7 +24266,7 @@
|
|
|
24266
24266
|
}
|
|
24267
24267
|
`));
|
|
24268
24268
|
|
|
24269
|
-
const template$
|
|
24269
|
+
const template$d = html `
|
|
24270
24270
|
<template role="progressbar">
|
|
24271
24271
|
<div class="container">
|
|
24272
24272
|
<div class="bit1"></div>
|
|
@@ -24283,13 +24283,13 @@
|
|
|
24283
24283
|
}
|
|
24284
24284
|
const nimbleSpinner = Spinner.compose({
|
|
24285
24285
|
baseName: 'spinner',
|
|
24286
|
-
template: template$
|
|
24287
|
-
styles: styles$
|
|
24286
|
+
template: template$d,
|
|
24287
|
+
styles: styles$j
|
|
24288
24288
|
});
|
|
24289
24289
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSpinner());
|
|
24290
24290
|
DesignSystem.tagFor(Spinner);
|
|
24291
24291
|
|
|
24292
|
-
const styles$
|
|
24292
|
+
const styles$i = css `
|
|
24293
24293
|
${display('inline-flex')}
|
|
24294
24294
|
|
|
24295
24295
|
:host {
|
|
@@ -24452,7 +24452,7 @@
|
|
|
24452
24452
|
`));
|
|
24453
24453
|
|
|
24454
24454
|
// prettier-ignore
|
|
24455
|
-
const template$
|
|
24455
|
+
const template$c = html `
|
|
24456
24456
|
<template
|
|
24457
24457
|
role="switch"
|
|
24458
24458
|
aria-checked="${x => x.checked}"
|
|
@@ -24496,8 +24496,8 @@
|
|
|
24496
24496
|
const nimbleSwitch = Switch.compose({
|
|
24497
24497
|
baseClass: Switch$1,
|
|
24498
24498
|
baseName: 'switch',
|
|
24499
|
-
template: template$
|
|
24500
|
-
styles: styles$
|
|
24499
|
+
template: template$c,
|
|
24500
|
+
styles: styles$i
|
|
24501
24501
|
});
|
|
24502
24502
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSwitch());
|
|
24503
24503
|
DesignSystem.tagFor(Switch);
|
|
@@ -24511,12 +24511,12 @@
|
|
|
24511
24511
|
baseName: 'tab',
|
|
24512
24512
|
baseClass: Tab$1,
|
|
24513
24513
|
template: tabTemplate,
|
|
24514
|
-
styles: styles$
|
|
24514
|
+
styles: styles$J
|
|
24515
24515
|
});
|
|
24516
24516
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTab());
|
|
24517
24517
|
DesignSystem.tagFor(Tab);
|
|
24518
24518
|
|
|
24519
|
-
const styles$
|
|
24519
|
+
const styles$h = css `
|
|
24520
24520
|
${display('block')}
|
|
24521
24521
|
|
|
24522
24522
|
:host {
|
|
@@ -24536,7 +24536,7 @@
|
|
|
24536
24536
|
baseName: 'tab-panel',
|
|
24537
24537
|
baseClass: TabPanel$1,
|
|
24538
24538
|
template: tabPanelTemplate,
|
|
24539
|
-
styles: styles$
|
|
24539
|
+
styles: styles$h
|
|
24540
24540
|
});
|
|
24541
24541
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabPanel());
|
|
24542
24542
|
DesignSystem.tagFor(TabPanel);
|
|
@@ -27570,9 +27570,195 @@
|
|
|
27570
27570
|
});
|
|
27571
27571
|
}
|
|
27572
27572
|
|
|
27573
|
+
function getGroupedRowModel() {
|
|
27574
|
+
return table => memo$1(() => [table.getState().grouping, table.getPreGroupedRowModel()], (grouping, rowModel) => {
|
|
27575
|
+
if (!rowModel.rows.length || !grouping.length) {
|
|
27576
|
+
return rowModel;
|
|
27577
|
+
}
|
|
27578
|
+
|
|
27579
|
+
// Filter the grouping list down to columns that exist
|
|
27580
|
+
const existingGrouping = grouping.filter(columnId => table.getColumn(columnId));
|
|
27581
|
+
const groupedFlatRows = [];
|
|
27582
|
+
const groupedRowsById = {};
|
|
27583
|
+
// const onlyGroupedFlatRows: Row[] = [];
|
|
27584
|
+
// const onlyGroupedRowsById: Record<RowId, Row> = {};
|
|
27585
|
+
// const nonGroupedFlatRows: Row[] = [];
|
|
27586
|
+
// const nonGroupedRowsById: Record<RowId, Row> = {};
|
|
27587
|
+
|
|
27588
|
+
// Recursively group the data
|
|
27589
|
+
const groupUpRecursively = function (rows, depth, parentId) {
|
|
27590
|
+
if (depth === void 0) {
|
|
27591
|
+
depth = 0;
|
|
27592
|
+
}
|
|
27593
|
+
// Grouping depth has been been met
|
|
27594
|
+
// Stop grouping and simply rewrite thd depth and row relationships
|
|
27595
|
+
if (depth >= existingGrouping.length) {
|
|
27596
|
+
return rows.map(row => {
|
|
27597
|
+
row.depth = depth;
|
|
27598
|
+
groupedFlatRows.push(row);
|
|
27599
|
+
groupedRowsById[row.id] = row;
|
|
27600
|
+
if (row.subRows) {
|
|
27601
|
+
row.subRows = groupUpRecursively(row.subRows, depth + 1);
|
|
27602
|
+
}
|
|
27603
|
+
return row;
|
|
27604
|
+
});
|
|
27605
|
+
}
|
|
27606
|
+
const columnId = existingGrouping[depth];
|
|
27607
|
+
|
|
27608
|
+
// Group the rows together for this level
|
|
27609
|
+
const rowGroupsMap = groupBy(rows, columnId);
|
|
27610
|
+
|
|
27611
|
+
// Peform aggregations for each group
|
|
27612
|
+
const aggregatedGroupedRows = Array.from(rowGroupsMap.entries()).map((_ref, index) => {
|
|
27613
|
+
let [groupingValue, groupedRows] = _ref;
|
|
27614
|
+
let id = `${columnId}:${groupingValue}`;
|
|
27615
|
+
id = parentId ? `${parentId}>${id}` : id;
|
|
27616
|
+
|
|
27617
|
+
// First, Recurse to group sub rows before aggregation
|
|
27618
|
+
const subRows = groupUpRecursively(groupedRows, depth + 1, id);
|
|
27619
|
+
|
|
27620
|
+
// Flatten the leaf rows of the rows in this group
|
|
27621
|
+
const leafRows = depth ? flattenBy(groupedRows, row => row.subRows) : groupedRows;
|
|
27622
|
+
const row = createRow(table, id, leafRows[0].original, index, depth);
|
|
27623
|
+
Object.assign(row, {
|
|
27624
|
+
groupingColumnId: columnId,
|
|
27625
|
+
groupingValue,
|
|
27626
|
+
subRows,
|
|
27627
|
+
leafRows,
|
|
27628
|
+
getValue: columnId => {
|
|
27629
|
+
// Don't aggregate columns that are in the grouping
|
|
27630
|
+
if (existingGrouping.includes(columnId)) {
|
|
27631
|
+
if (row._valuesCache.hasOwnProperty(columnId)) {
|
|
27632
|
+
return row._valuesCache[columnId];
|
|
27633
|
+
}
|
|
27634
|
+
if (groupedRows[0]) {
|
|
27635
|
+
var _groupedRows$0$getVal;
|
|
27636
|
+
row._valuesCache[columnId] = (_groupedRows$0$getVal = groupedRows[0].getValue(columnId)) != null ? _groupedRows$0$getVal : undefined;
|
|
27637
|
+
}
|
|
27638
|
+
return row._valuesCache[columnId];
|
|
27639
|
+
}
|
|
27640
|
+
if (row._groupingValuesCache.hasOwnProperty(columnId)) {
|
|
27641
|
+
return row._groupingValuesCache[columnId];
|
|
27642
|
+
}
|
|
27643
|
+
|
|
27644
|
+
// Aggregate the values
|
|
27645
|
+
const column = table.getColumn(columnId);
|
|
27646
|
+
const aggregateFn = column == null ? void 0 : column.getAggregationFn();
|
|
27647
|
+
if (aggregateFn) {
|
|
27648
|
+
row._groupingValuesCache[columnId] = aggregateFn(columnId, leafRows, groupedRows);
|
|
27649
|
+
return row._groupingValuesCache[columnId];
|
|
27650
|
+
}
|
|
27651
|
+
}
|
|
27652
|
+
});
|
|
27653
|
+
subRows.forEach(subRow => {
|
|
27654
|
+
groupedFlatRows.push(subRow);
|
|
27655
|
+
groupedRowsById[subRow.id] = subRow;
|
|
27656
|
+
// if (subRow.getIsGrouped?.()) {
|
|
27657
|
+
// onlyGroupedFlatRows.push(subRow);
|
|
27658
|
+
// onlyGroupedRowsById[subRow.id] = subRow;
|
|
27659
|
+
// } else {
|
|
27660
|
+
// nonGroupedFlatRows.push(subRow);
|
|
27661
|
+
// nonGroupedRowsById[subRow.id] = subRow;
|
|
27662
|
+
// }
|
|
27663
|
+
});
|
|
27664
|
+
|
|
27665
|
+
return row;
|
|
27666
|
+
});
|
|
27667
|
+
return aggregatedGroupedRows;
|
|
27668
|
+
};
|
|
27669
|
+
const groupedRows = groupUpRecursively(rowModel.rows, 0, '');
|
|
27670
|
+
groupedRows.forEach(subRow => {
|
|
27671
|
+
groupedFlatRows.push(subRow);
|
|
27672
|
+
groupedRowsById[subRow.id] = subRow;
|
|
27673
|
+
// if (subRow.getIsGrouped?.()) {
|
|
27674
|
+
// onlyGroupedFlatRows.push(subRow);
|
|
27675
|
+
// onlyGroupedRowsById[subRow.id] = subRow;
|
|
27676
|
+
// } else {
|
|
27677
|
+
// nonGroupedFlatRows.push(subRow);
|
|
27678
|
+
// nonGroupedRowsById[subRow.id] = subRow;
|
|
27679
|
+
// }
|
|
27680
|
+
});
|
|
27681
|
+
|
|
27682
|
+
return {
|
|
27683
|
+
rows: groupedRows,
|
|
27684
|
+
flatRows: groupedFlatRows,
|
|
27685
|
+
rowsById: groupedRowsById
|
|
27686
|
+
};
|
|
27687
|
+
}, {
|
|
27688
|
+
key: 'getGroupedRowModel',
|
|
27689
|
+
debug: () => {
|
|
27690
|
+
var _table$options$debugA;
|
|
27691
|
+
return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
|
|
27692
|
+
},
|
|
27693
|
+
onChange: () => {
|
|
27694
|
+
table._queue(() => {
|
|
27695
|
+
table._autoResetExpanded();
|
|
27696
|
+
table._autoResetPageIndex();
|
|
27697
|
+
});
|
|
27698
|
+
}
|
|
27699
|
+
});
|
|
27700
|
+
}
|
|
27701
|
+
function groupBy(rows, columnId) {
|
|
27702
|
+
const groupMap = new Map();
|
|
27703
|
+
return rows.reduce((map, row) => {
|
|
27704
|
+
const resKey = `${row.getValue(columnId)}`;
|
|
27705
|
+
const previous = map.get(resKey);
|
|
27706
|
+
if (!previous) {
|
|
27707
|
+
map.set(resKey, [row]);
|
|
27708
|
+
} else {
|
|
27709
|
+
previous.push(row);
|
|
27710
|
+
}
|
|
27711
|
+
return map;
|
|
27712
|
+
}, groupMap);
|
|
27713
|
+
}
|
|
27714
|
+
|
|
27715
|
+
function getExpandedRowModel() {
|
|
27716
|
+
return table => memo$1(() => [table.getState().expanded, table.getPreExpandedRowModel(), table.options.paginateExpandedRows], (expanded, rowModel, paginateExpandedRows) => {
|
|
27717
|
+
if (!rowModel.rows.length || expanded !== true && !Object.keys(expanded != null ? expanded : {}).length) {
|
|
27718
|
+
return rowModel;
|
|
27719
|
+
}
|
|
27720
|
+
if (!paginateExpandedRows) {
|
|
27721
|
+
// Only expand rows at this point if they are being paginated
|
|
27722
|
+
return rowModel;
|
|
27723
|
+
}
|
|
27724
|
+
return expandRows(rowModel);
|
|
27725
|
+
}, {
|
|
27726
|
+
key: 'getExpandedRowModel',
|
|
27727
|
+
debug: () => {
|
|
27728
|
+
var _table$options$debugA;
|
|
27729
|
+
return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
|
|
27730
|
+
}
|
|
27731
|
+
});
|
|
27732
|
+
}
|
|
27733
|
+
function expandRows(rowModel) {
|
|
27734
|
+
const expandedRows = [];
|
|
27735
|
+
const handleRow = row => {
|
|
27736
|
+
var _row$subRows;
|
|
27737
|
+
expandedRows.push(row);
|
|
27738
|
+
if ((_row$subRows = row.subRows) != null && _row$subRows.length && row.getIsExpanded()) {
|
|
27739
|
+
row.subRows.forEach(handleRow);
|
|
27740
|
+
}
|
|
27741
|
+
};
|
|
27742
|
+
rowModel.rows.forEach(handleRow);
|
|
27743
|
+
return {
|
|
27744
|
+
rows: expandedRows,
|
|
27745
|
+
flatRows: rowModel.flatRows,
|
|
27746
|
+
rowsById: rowModel.rowsById
|
|
27747
|
+
};
|
|
27748
|
+
}
|
|
27749
|
+
|
|
27750
|
+
const createGroupHeaderViewTemplate = (groupHeaderViewTag) => html `
|
|
27751
|
+
<${groupHeaderViewTag}
|
|
27752
|
+
:groupHeaderValue="${x => x.groupRowValue}"
|
|
27753
|
+
:columnConfig="${x => x.groupColumn?.columnConfig}"
|
|
27754
|
+
class="group-header-value"
|
|
27755
|
+
>
|
|
27756
|
+
</${groupHeaderViewTag}>
|
|
27757
|
+
`;
|
|
27758
|
+
|
|
27573
27759
|
// prettier-ignore
|
|
27574
|
-
const template$
|
|
27575
|
-
<template role="cell">
|
|
27760
|
+
const template$b = html `
|
|
27761
|
+
<template role="cell" style="--ni-private-table-cell-nesting-level: ${x => x.nestingLevel}">
|
|
27576
27762
|
${x => x.cellViewTemplate}
|
|
27577
27763
|
${when(x => x.hasActionMenu, html `
|
|
27578
27764
|
<${menuButtonTag} ${ref('actionMenuButton')}
|
|
@@ -27646,6 +27832,11 @@
|
|
|
27646
27832
|
* The minimum size in pixels according to the design doc
|
|
27647
27833
|
*/
|
|
27648
27834
|
this.internalMinPixelWidth = defaultMinPixelWidth;
|
|
27835
|
+
/**
|
|
27836
|
+
* @internal
|
|
27837
|
+
* Whether or not this column can be used to group rows by
|
|
27838
|
+
*/
|
|
27839
|
+
this.internalGroupingDisabled = false;
|
|
27649
27840
|
/**
|
|
27650
27841
|
* @internal
|
|
27651
27842
|
*
|
|
@@ -27679,6 +27870,11 @@
|
|
|
27679
27870
|
internalPixelWidthChanged() {
|
|
27680
27871
|
this.currentPixelWidth = this.internalPixelWidth;
|
|
27681
27872
|
}
|
|
27873
|
+
groupHeaderViewTagChanged() {
|
|
27874
|
+
this.internalGroupHeaderViewTemplate = this.groupHeaderViewTag
|
|
27875
|
+
? createGroupHeaderViewTemplate(this.groupHeaderViewTag)
|
|
27876
|
+
: undefined;
|
|
27877
|
+
}
|
|
27682
27878
|
}
|
|
27683
27879
|
__decorate$1([
|
|
27684
27880
|
attr({ attribute: 'column-id' })
|
|
@@ -27713,6 +27909,18 @@
|
|
|
27713
27909
|
__decorate$1([
|
|
27714
27910
|
observable
|
|
27715
27911
|
], TableColumn.prototype, "internalMinPixelWidth", void 0);
|
|
27912
|
+
__decorate$1([
|
|
27913
|
+
observable
|
|
27914
|
+
], TableColumn.prototype, "internalGroupingDisabled", void 0);
|
|
27915
|
+
__decorate$1([
|
|
27916
|
+
observable
|
|
27917
|
+
], TableColumn.prototype, "internalGroupIndex", void 0);
|
|
27918
|
+
__decorate$1([
|
|
27919
|
+
observable
|
|
27920
|
+
], TableColumn.prototype, "groupHeaderViewTag", void 0);
|
|
27921
|
+
__decorate$1([
|
|
27922
|
+
observable
|
|
27923
|
+
], TableColumn.prototype, "internalGroupHeaderViewTemplate", void 0);
|
|
27716
27924
|
__decorate$1([
|
|
27717
27925
|
observable
|
|
27718
27926
|
], TableColumn.prototype, "cellViewTag", void 0);
|
|
@@ -27744,6 +27952,7 @@
|
|
|
27744
27952
|
this.duplicateColumnId = false;
|
|
27745
27953
|
this.missingColumnId = false;
|
|
27746
27954
|
this.duplicateSortIndex = false;
|
|
27955
|
+
this.duplicateGroupIndex = false;
|
|
27747
27956
|
}
|
|
27748
27957
|
getValidity() {
|
|
27749
27958
|
return {
|
|
@@ -27752,7 +27961,8 @@
|
|
|
27752
27961
|
invalidRecordId: this.invalidRecordId,
|
|
27753
27962
|
duplicateColumnId: this.duplicateColumnId,
|
|
27754
27963
|
missingColumnId: this.missingColumnId,
|
|
27755
|
-
duplicateSortIndex: this.duplicateSortIndex
|
|
27964
|
+
duplicateSortIndex: this.duplicateSortIndex,
|
|
27965
|
+
duplicateGroupIndex: this.duplicateGroupIndex
|
|
27756
27966
|
};
|
|
27757
27967
|
}
|
|
27758
27968
|
isValid() {
|
|
@@ -27807,19 +28017,20 @@
|
|
|
27807
28017
|
return !this.missingColumnId && !this.duplicateColumnId;
|
|
27808
28018
|
}
|
|
27809
28019
|
validateColumnSortIndices(sortIndices) {
|
|
27810
|
-
this.duplicateSortIndex =
|
|
27811
|
-
const sortIndexSet = new Set();
|
|
27812
|
-
for (const sortIndex of sortIndices) {
|
|
27813
|
-
if (sortIndexSet.has(sortIndex)) {
|
|
27814
|
-
this.duplicateSortIndex = true;
|
|
27815
|
-
}
|
|
27816
|
-
sortIndexSet.add(sortIndex);
|
|
27817
|
-
}
|
|
28020
|
+
this.duplicateSortIndex = !this.validateIndicesAreUnique(sortIndices);
|
|
27818
28021
|
return !this.duplicateSortIndex;
|
|
27819
28022
|
}
|
|
28023
|
+
validateColumnGroupIndices(groupIndices) {
|
|
28024
|
+
this.duplicateGroupIndex = !this.validateIndicesAreUnique(groupIndices);
|
|
28025
|
+
return !this.duplicateGroupIndex;
|
|
28026
|
+
}
|
|
28027
|
+
validateIndicesAreUnique(indices) {
|
|
28028
|
+
const numberSet = new Set(indices);
|
|
28029
|
+
return numberSet.size === indices.length;
|
|
28030
|
+
}
|
|
27820
28031
|
}
|
|
27821
28032
|
|
|
27822
|
-
const styles$
|
|
28033
|
+
const styles$g = css `
|
|
27823
28034
|
${display('flex')}
|
|
27824
28035
|
|
|
27825
28036
|
:host {
|
|
@@ -27915,7 +28126,7 @@
|
|
|
27915
28126
|
}
|
|
27916
28127
|
`));
|
|
27917
28128
|
|
|
27918
|
-
const styles$
|
|
28129
|
+
const styles$f = css `
|
|
27919
28130
|
${display('flex')}
|
|
27920
28131
|
|
|
27921
28132
|
:host {
|
|
@@ -27934,7 +28145,7 @@
|
|
|
27934
28145
|
`;
|
|
27935
28146
|
|
|
27936
28147
|
// prettier-ignore
|
|
27937
|
-
const template$
|
|
28148
|
+
const template$a = html `
|
|
27938
28149
|
<template role="columnheader" aria-sort="${x => x.ariaSort}">
|
|
27939
28150
|
<slot></slot>
|
|
27940
28151
|
|
|
@@ -27984,13 +28195,13 @@
|
|
|
27984
28195
|
], TableHeader.prototype, "firstSortedColumn", void 0);
|
|
27985
28196
|
const nimbleTableHeader = TableHeader.compose({
|
|
27986
28197
|
baseName: 'table-header',
|
|
27987
|
-
template: template$
|
|
27988
|
-
styles: styles$
|
|
28198
|
+
template: template$a,
|
|
28199
|
+
styles: styles$f
|
|
27989
28200
|
});
|
|
27990
28201
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableHeader());
|
|
27991
28202
|
const tableHeaderTag = DesignSystem.tagFor(TableHeader);
|
|
27992
28203
|
|
|
27993
|
-
const styles$
|
|
28204
|
+
const styles$e = css `
|
|
27994
28205
|
${display('grid')}
|
|
27995
28206
|
|
|
27996
28207
|
:host {
|
|
@@ -28016,11 +28227,19 @@
|
|
|
28016
28227
|
}
|
|
28017
28228
|
`;
|
|
28018
28229
|
|
|
28019
|
-
const styles$
|
|
28230
|
+
const styles$d = css `
|
|
28020
28231
|
${display('grid')}
|
|
28021
28232
|
|
|
28022
28233
|
:host {
|
|
28234
|
+
--ni-private-table-cell-nesting-level: 0;
|
|
28023
28235
|
padding: 0px calc(${standardPadding} / 2);
|
|
28236
|
+
padding-left: calc(
|
|
28237
|
+
${standardPadding} / 2 +
|
|
28238
|
+
(
|
|
28239
|
+
var(--ni-private-table-cell-nesting-level) *
|
|
28240
|
+
${standardPadding} * 2
|
|
28241
|
+
)
|
|
28242
|
+
);
|
|
28024
28243
|
align-self: center;
|
|
28025
28244
|
height: 100%;
|
|
28026
28245
|
grid-template-columns: 1fr auto;
|
|
@@ -28048,6 +28267,7 @@
|
|
|
28048
28267
|
super(...arguments);
|
|
28049
28268
|
this.hasActionMenu = false;
|
|
28050
28269
|
this.menuOpen = false;
|
|
28270
|
+
this.nestingLevel = 0;
|
|
28051
28271
|
}
|
|
28052
28272
|
onActionMenuBeforeToggle(event) {
|
|
28053
28273
|
this.$emit('cell-action-menu-beforetoggle', event.detail);
|
|
@@ -28072,16 +28292,19 @@
|
|
|
28072
28292
|
__decorate$1([
|
|
28073
28293
|
observable
|
|
28074
28294
|
], TableCell.prototype, "cellViewTemplate", void 0);
|
|
28295
|
+
__decorate$1([
|
|
28296
|
+
observable
|
|
28297
|
+
], TableCell.prototype, "nestingLevel", void 0);
|
|
28075
28298
|
const nimbleTableCell = TableCell.compose({
|
|
28076
28299
|
baseName: 'table-cell',
|
|
28077
|
-
template: template$
|
|
28078
|
-
styles: styles$
|
|
28300
|
+
template: template$b,
|
|
28301
|
+
styles: styles$d
|
|
28079
28302
|
});
|
|
28080
28303
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableCell());
|
|
28081
28304
|
const tableCellTag = DesignSystem.tagFor(TableCell);
|
|
28082
28305
|
|
|
28083
28306
|
// prettier-ignore
|
|
28084
|
-
const template$
|
|
28307
|
+
const template$9 = html `
|
|
28085
28308
|
<template role="row">
|
|
28086
28309
|
${repeat(x => x.columnStates, html `
|
|
28087
28310
|
${when(x => !x.column.columnHidden, html `
|
|
@@ -28093,6 +28316,7 @@
|
|
|
28093
28316
|
action-menu-label="${x => x.column.actionMenuLabel}"
|
|
28094
28317
|
@cell-action-menu-beforetoggle="${(x, c) => c.parent.onCellActionMenuBeforeToggle(c.event, x.column)}"
|
|
28095
28318
|
@cell-action-menu-toggle="${(x, c) => c.parent.onCellActionMenuToggle(c.event, x.column)}"
|
|
28319
|
+
:nestingLevel="${x => x.cellIndentLevel};"
|
|
28096
28320
|
>
|
|
28097
28321
|
|
|
28098
28322
|
${when((x, c) => (c.parent.currentActionMenuColumn === x.column) && x.column.actionMenuSlot, html `
|
|
@@ -28115,17 +28339,18 @@
|
|
|
28115
28339
|
constructor() {
|
|
28116
28340
|
super(...arguments);
|
|
28117
28341
|
this.columns = [];
|
|
28342
|
+
this.nestingLevel = 0;
|
|
28118
28343
|
this.menuOpen = false;
|
|
28119
28344
|
}
|
|
28120
28345
|
get columnStates() {
|
|
28121
|
-
return this.columns.map(column => {
|
|
28346
|
+
return this.columns.map((column, i) => {
|
|
28122
28347
|
const fieldNames = column.dataRecordFieldNames;
|
|
28123
28348
|
let cellState;
|
|
28124
28349
|
if (this.hasValidFieldNames(fieldNames) && this.dataRecord) {
|
|
28125
28350
|
const cellDataValues = fieldNames.map(field => this.dataRecord[field]);
|
|
28126
|
-
const cellRecord = Object.fromEntries(column.cellRecordFieldNames.map((k,
|
|
28351
|
+
const cellRecord = Object.fromEntries(column.cellRecordFieldNames.map((k, j) => [
|
|
28127
28352
|
k,
|
|
28128
|
-
cellDataValues[
|
|
28353
|
+
cellDataValues[j]
|
|
28129
28354
|
]));
|
|
28130
28355
|
const columnConfig = column.columnConfig ?? {};
|
|
28131
28356
|
cellState = {
|
|
@@ -28134,9 +28359,13 @@
|
|
|
28134
28359
|
};
|
|
28135
28360
|
}
|
|
28136
28361
|
else {
|
|
28137
|
-
cellState = {
|
|
28362
|
+
cellState = {
|
|
28363
|
+
cellRecord: {},
|
|
28364
|
+
columnConfig: {}
|
|
28365
|
+
};
|
|
28138
28366
|
}
|
|
28139
|
-
|
|
28367
|
+
const cellIndentLevel = i === 0 ? this.nestingLevel : 0;
|
|
28368
|
+
return { column, cellState, cellIndentLevel };
|
|
28140
28369
|
});
|
|
28141
28370
|
}
|
|
28142
28371
|
onCellActionMenuBeforeToggle(event, column) {
|
|
@@ -28180,6 +28409,9 @@
|
|
|
28180
28409
|
__decorate$1([
|
|
28181
28410
|
observable
|
|
28182
28411
|
], TableRow.prototype, "currentActionMenuColumn", void 0);
|
|
28412
|
+
__decorate$1([
|
|
28413
|
+
observable
|
|
28414
|
+
], TableRow.prototype, "nestingLevel", void 0);
|
|
28183
28415
|
__decorate$1([
|
|
28184
28416
|
attr({ attribute: 'menu-open', mode: 'boolean' })
|
|
28185
28417
|
], TableRow.prototype, "menuOpen", void 0);
|
|
@@ -28188,14 +28420,150 @@
|
|
|
28188
28420
|
], TableRow.prototype, "columnStates", null);
|
|
28189
28421
|
const nimbleTableRow = TableRow.compose({
|
|
28190
28422
|
baseName: 'table-row',
|
|
28191
|
-
template: template$
|
|
28192
|
-
styles: styles$
|
|
28423
|
+
template: template$9,
|
|
28424
|
+
styles: styles$e
|
|
28193
28425
|
});
|
|
28194
28426
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableRow());
|
|
28195
28427
|
const tableRowTag = DesignSystem.tagFor(TableRow);
|
|
28196
28428
|
|
|
28429
|
+
const styles$c = css `
|
|
28430
|
+
${display('flex')}
|
|
28431
|
+
|
|
28432
|
+
:host {
|
|
28433
|
+
align-items: center;
|
|
28434
|
+
height: calc(${controlHeight} + 2 * ${borderWidth});
|
|
28435
|
+
border-top: calc(2 * ${borderWidth}) solid ${tableRowBorderColor};
|
|
28436
|
+
padding-left: calc(
|
|
28437
|
+
${smallPadding} * 2 + ${standardPadding} * 2 *
|
|
28438
|
+
var(--ni-private-table-group-row-indent-level)
|
|
28439
|
+
);
|
|
28440
|
+
}
|
|
28441
|
+
|
|
28442
|
+
:host(:hover) {
|
|
28443
|
+
background: ${fillHoverColor};
|
|
28444
|
+
}
|
|
28445
|
+
|
|
28446
|
+
:host([expanded]) .animating,
|
|
28447
|
+
:host .animating {
|
|
28448
|
+
transition: ${mediumDelay} ease-in-out;
|
|
28449
|
+
}
|
|
28450
|
+
|
|
28451
|
+
.expand-collapse-button {
|
|
28452
|
+
width: ${controlSlimHeight};
|
|
28453
|
+
height: ${controlSlimHeight};
|
|
28454
|
+
}
|
|
28455
|
+
|
|
28456
|
+
:host([expanded]) .expander-icon {
|
|
28457
|
+
transform: rotate(90deg);
|
|
28458
|
+
}
|
|
28459
|
+
|
|
28460
|
+
.expander-icon {
|
|
28461
|
+
transform: rotate(0deg);
|
|
28462
|
+
}
|
|
28463
|
+
|
|
28464
|
+
.group-row-header-content {
|
|
28465
|
+
display: flex;
|
|
28466
|
+
overflow: hidden;
|
|
28467
|
+
}
|
|
28468
|
+
|
|
28469
|
+
.group-header-value {
|
|
28470
|
+
padding-left: calc(${standardPadding} / 2);
|
|
28471
|
+
user-select: none;
|
|
28472
|
+
overflow: hidden;
|
|
28473
|
+
display: flex;
|
|
28474
|
+
}
|
|
28475
|
+
|
|
28476
|
+
.group-row-child-count {
|
|
28477
|
+
padding-left: 2px;
|
|
28478
|
+
pointer-events: none;
|
|
28479
|
+
user-select: none;
|
|
28480
|
+
}
|
|
28481
|
+
|
|
28482
|
+
@media (prefers-reduced-motion) {
|
|
28483
|
+
:host .animating,
|
|
28484
|
+
:host([expanded]) .animating {
|
|
28485
|
+
transition-duration: 0s;
|
|
28486
|
+
}
|
|
28487
|
+
}
|
|
28488
|
+
`;
|
|
28489
|
+
|
|
28490
|
+
/* eslint-disable @typescript-eslint/indent */
|
|
28197
28491
|
// prettier-ignore
|
|
28198
|
-
const template$
|
|
28492
|
+
const template$8 = html `
|
|
28493
|
+
<template @click=${x => x.onGroupExpandToggle()} style="--ni-private-table-group-row-indent-level: ${x => x.nestingLevel};">
|
|
28494
|
+
<${buttonTag}
|
|
28495
|
+
appearance="${ButtonAppearance.ghost}"
|
|
28496
|
+
content-hidden
|
|
28497
|
+
class="expand-collapse-button"
|
|
28498
|
+
tabindex="-1"
|
|
28499
|
+
>
|
|
28500
|
+
<${iconArrowExpanderRightTag} ${ref('expandIcon')} slot="start" class="expander-icon ${x => x.animationClass}"></${iconArrowExpanderRightTag}>
|
|
28501
|
+
</${buttonTag}>
|
|
28502
|
+
<div class="group-row-header-content">
|
|
28503
|
+
${x => x.groupColumn?.internalGroupHeaderViewTemplate}
|
|
28504
|
+
<div class="group-row-child-count">(${x => x.leafItemCount})</span>
|
|
28505
|
+
</div>
|
|
28506
|
+
</template>
|
|
28507
|
+
`;
|
|
28508
|
+
|
|
28509
|
+
/**
|
|
28510
|
+
* A styled cell that is used within the nimble-table-row.
|
|
28511
|
+
* @internal
|
|
28512
|
+
*/
|
|
28513
|
+
class TableGroupRow extends FoundationElement {
|
|
28514
|
+
constructor() {
|
|
28515
|
+
super(...arguments);
|
|
28516
|
+
this.nestingLevel = 0;
|
|
28517
|
+
this.expanded = false;
|
|
28518
|
+
/**
|
|
28519
|
+
* @internal
|
|
28520
|
+
*/
|
|
28521
|
+
this.animationClass = '';
|
|
28522
|
+
this.removeAnimatingClass = () => {
|
|
28523
|
+
this.animationClass = '';
|
|
28524
|
+
this.expandIcon.removeEventListener('transitionend', this.removeAnimatingClass);
|
|
28525
|
+
};
|
|
28526
|
+
}
|
|
28527
|
+
onGroupExpandToggle() {
|
|
28528
|
+
this.$emit('group-expand-toggle');
|
|
28529
|
+
// To avoid a visual glitch with improper expand/collapse icons performing an
|
|
28530
|
+
// animation, we apply a class to the appropriate group row such that we can have
|
|
28531
|
+
// a more targeted CSS animation. We use the 'transitionend' event to remove the
|
|
28532
|
+
// temporary class and register a function reference as the handler to avoid issues
|
|
28533
|
+
// that may result from the 'transitionend' event not firing, as it will never result
|
|
28534
|
+
// in multiple event listeners being registered.
|
|
28535
|
+
this.animationClass = 'animating';
|
|
28536
|
+
this.expandIcon.addEventListener('transitionend', this.removeAnimatingClass);
|
|
28537
|
+
}
|
|
28538
|
+
}
|
|
28539
|
+
__decorate$1([
|
|
28540
|
+
observable
|
|
28541
|
+
], TableGroupRow.prototype, "groupRowValue", void 0);
|
|
28542
|
+
__decorate$1([
|
|
28543
|
+
observable
|
|
28544
|
+
], TableGroupRow.prototype, "nestingLevel", void 0);
|
|
28545
|
+
__decorate$1([
|
|
28546
|
+
observable
|
|
28547
|
+
], TableGroupRow.prototype, "leafItemCount", void 0);
|
|
28548
|
+
__decorate$1([
|
|
28549
|
+
observable
|
|
28550
|
+
], TableGroupRow.prototype, "groupColumn", void 0);
|
|
28551
|
+
__decorate$1([
|
|
28552
|
+
attr({ mode: 'boolean' })
|
|
28553
|
+
], TableGroupRow.prototype, "expanded", void 0);
|
|
28554
|
+
__decorate$1([
|
|
28555
|
+
observable
|
|
28556
|
+
], TableGroupRow.prototype, "animationClass", void 0);
|
|
28557
|
+
const nimbleTableGroupRow = TableGroupRow.compose({
|
|
28558
|
+
baseName: 'table-group-row',
|
|
28559
|
+
template: template$8,
|
|
28560
|
+
styles: styles$c
|
|
28561
|
+
});
|
|
28562
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableGroupRow());
|
|
28563
|
+
const tableGroupRowTag = DesignSystem.tagFor(TableGroupRow);
|
|
28564
|
+
|
|
28565
|
+
// prettier-ignore
|
|
28566
|
+
const template$7 = html `
|
|
28199
28567
|
<template role="table" ${children$1({ property: 'childItems', filter: elements() })}>
|
|
28200
28568
|
<div class="table-container" style="
|
|
28201
28569
|
--ni-private-table-scroll-x: -${x => x.scrollX}px;
|
|
@@ -28226,23 +28594,38 @@
|
|
|
28226
28594
|
role="rowgroup">
|
|
28227
28595
|
${when(x => x.columns.length > 0 && x.canRenderRows, html `
|
|
28228
28596
|
${repeat(x => x.virtualizer.visibleItems, html `
|
|
28229
|
-
|
|
28230
|
-
|
|
28231
|
-
|
|
28232
|
-
|
|
28233
|
-
|
|
28234
|
-
|
|
28235
|
-
|
|
28236
|
-
|
|
28237
|
-
|
|
28238
|
-
|
|
28239
|
-
|
|
28240
|
-
|
|
28241
|
-
|
|
28242
|
-
|
|
28243
|
-
|
|
28244
|
-
|
|
28245
|
-
|
|
28597
|
+
${when((x, c) => c.parent.tableData[x.index]?.isGrouped, html `
|
|
28598
|
+
<${tableGroupRowTag}
|
|
28599
|
+
class="group-row"
|
|
28600
|
+
:groupRowValue="${(x, c) => c.parent.tableData[x.index]?.groupRowValue}"
|
|
28601
|
+
?expanded="${(x, c) => c.parent.tableData[x.index]?.isExpanded}"
|
|
28602
|
+
:nestingLevel="${(x, c) => c.parent.tableData[x.index]?.nestingLevel}"
|
|
28603
|
+
:leafItemCount="${(x, c) => c.parent.tableData[x.index]?.leafItemCount}"
|
|
28604
|
+
:groupColumn="${(x, c) => c.parent.tableData[x.index]?.groupColumn}"
|
|
28605
|
+
@group-expand-toggle="${(x, c) => c.parent.handleGroupRowExpanded(x.index, c.event)}"
|
|
28606
|
+
>
|
|
28607
|
+
</${tableGroupRowTag}>
|
|
28608
|
+
`)}
|
|
28609
|
+
${when((x, c) => !c.parent.tableData[x.index]?.isGrouped, html `
|
|
28610
|
+
<${tableRowTag}
|
|
28611
|
+
class="row"
|
|
28612
|
+
record-id="${(x, c) => c.parent.tableData[x.index]?.id}"
|
|
28613
|
+
:dataRecord="${(x, c) => c.parent.tableData[x.index]?.record}"
|
|
28614
|
+
:columns="${(_, c) => c.parent.columns}"
|
|
28615
|
+
:nestingLevel="${(x, c) => c.parent.tableData[x.index]?.nestingLevel}"
|
|
28616
|
+
@row-action-menu-beforetoggle="${(_, c) => c.parent.onRowActionMenuBeforeToggle(c.event)}"
|
|
28617
|
+
@row-action-menu-toggle="${(_, c) => c.parent.onRowActionMenuToggle(c.event)}"
|
|
28618
|
+
>
|
|
28619
|
+
${when((x, c) => c.parent.openActionMenuRecordId === c.parent.tableData[x.index]?.id, html `
|
|
28620
|
+
${repeat((_, c) => c.parent.actionMenuSlots, html `
|
|
28621
|
+
<slot
|
|
28622
|
+
name="${x => x}"
|
|
28623
|
+
slot="${x => `row-action-menu-${x}`}">
|
|
28624
|
+
</slot>
|
|
28625
|
+
`)}
|
|
28626
|
+
`)}
|
|
28627
|
+
</${tableRowTag}>
|
|
28628
|
+
`)}
|
|
28246
28629
|
`)}
|
|
28247
28630
|
`)}
|
|
28248
28631
|
</div>
|
|
@@ -28901,12 +29284,13 @@
|
|
|
28901
29284
|
* @internal
|
|
28902
29285
|
*/
|
|
28903
29286
|
class Virtualizer {
|
|
28904
|
-
constructor(table) {
|
|
29287
|
+
constructor(table, tanStackTable) {
|
|
28905
29288
|
this.visibleItems = [];
|
|
28906
29289
|
this.allRowsHeight = 0;
|
|
28907
29290
|
this.headerContainerMarginRight = 0;
|
|
28908
29291
|
this.rowContainerYOffset = 0;
|
|
28909
29292
|
this.table = table;
|
|
29293
|
+
this.tanStackTable = tanStackTable;
|
|
28910
29294
|
this.viewportResizeObserver = new ResizeObserver(entries => {
|
|
28911
29295
|
const borderBoxSize = entries[0]?.borderBoxSize[0];
|
|
28912
29296
|
if (borderBoxSize) {
|
|
@@ -28944,7 +29328,7 @@
|
|
|
28944
29328
|
const rowHeight = parseFloat(controlHeight.getValueFor(this.table))
|
|
28945
29329
|
+ 2 * parseFloat(borderWidth.getValueFor(this.table));
|
|
28946
29330
|
return {
|
|
28947
|
-
count: this.
|
|
29331
|
+
count: this.tanStackTable.getRowModel().rows.length,
|
|
28948
29332
|
getScrollElement: () => {
|
|
28949
29333
|
return this.table.viewport;
|
|
28950
29334
|
},
|
|
@@ -29057,6 +29441,7 @@
|
|
|
29057
29441
|
constructor(table) {
|
|
29058
29442
|
this.requiredUpdates = {
|
|
29059
29443
|
rowIds: false,
|
|
29444
|
+
groupRows: false,
|
|
29060
29445
|
columnIds: false,
|
|
29061
29446
|
columnSort: false,
|
|
29062
29447
|
columnWidths: false,
|
|
@@ -29069,6 +29454,9 @@
|
|
|
29069
29454
|
get updateRowIds() {
|
|
29070
29455
|
return this.requiredUpdates.rowIds;
|
|
29071
29456
|
}
|
|
29457
|
+
get updateGroupRows() {
|
|
29458
|
+
return this.requiredUpdates.groupRows;
|
|
29459
|
+
}
|
|
29072
29460
|
get updateColumnIds() {
|
|
29073
29461
|
return this.requiredUpdates.columnIds;
|
|
29074
29462
|
}
|
|
@@ -29087,7 +29475,8 @@
|
|
|
29087
29475
|
get requiresTanStackUpdate() {
|
|
29088
29476
|
return (this.requiredUpdates.rowIds
|
|
29089
29477
|
|| this.requiredUpdates.columnSort
|
|
29090
|
-
|| this.requiredUpdates.columnDefinition
|
|
29478
|
+
|| this.requiredUpdates.columnDefinition
|
|
29479
|
+
|| this.requiredUpdates.groupRows);
|
|
29091
29480
|
}
|
|
29092
29481
|
get requiresTanStackDataReset() {
|
|
29093
29482
|
return (this.requiredUpdates.rowIds || this.requiredUpdates.columnDefinition);
|
|
@@ -29112,6 +29501,9 @@
|
|
|
29112
29501
|
else if (isColumnProperty(changedColumnProperty, 'actionMenuSlot')) {
|
|
29113
29502
|
this.requiredUpdates.actionMenuSlots = true;
|
|
29114
29503
|
}
|
|
29504
|
+
else if (isColumnProperty(changedColumnProperty, 'internalGroupIndex', 'internalGroupingDisabled')) {
|
|
29505
|
+
this.requiredUpdates.groupRows = true;
|
|
29506
|
+
}
|
|
29115
29507
|
this.queueUpdate();
|
|
29116
29508
|
}
|
|
29117
29509
|
trackColumnInstancesChanged() {
|
|
@@ -29120,6 +29512,7 @@
|
|
|
29120
29512
|
this.requiredUpdates.columnSort = true;
|
|
29121
29513
|
this.requiredUpdates.columnWidths = true;
|
|
29122
29514
|
this.requiredUpdates.actionMenuSlots = true;
|
|
29515
|
+
this.requiredUpdates.groupRows = true;
|
|
29123
29516
|
this.queueUpdate();
|
|
29124
29517
|
}
|
|
29125
29518
|
trackIdFieldNameChanged() {
|
|
@@ -29207,22 +29600,54 @@
|
|
|
29207
29600
|
this.tableValidator = new TableValidator();
|
|
29208
29601
|
this.updateTracker = new UpdateTracker(this);
|
|
29209
29602
|
this.columnNotifiers = [];
|
|
29603
|
+
this.collapsedRows = new Set();
|
|
29210
29604
|
this.onViewPortScroll = (event) => {
|
|
29211
29605
|
this.scrollX = event.target.scrollLeft;
|
|
29212
29606
|
};
|
|
29607
|
+
this.getIsRowExpanded = (row) => {
|
|
29608
|
+
if (!row.getIsGrouped()) {
|
|
29609
|
+
return false;
|
|
29610
|
+
}
|
|
29611
|
+
const expandedState = this.table.options.state.expanded;
|
|
29612
|
+
if (expandedState === true) {
|
|
29613
|
+
return true;
|
|
29614
|
+
}
|
|
29615
|
+
if (Object.keys(expandedState ?? {}).includes(row.id)) {
|
|
29616
|
+
return expandedState[row.id];
|
|
29617
|
+
}
|
|
29618
|
+
return !this.collapsedRows.has(row.id);
|
|
29619
|
+
};
|
|
29620
|
+
this.handleExpandedChange = (updaterOrValue) => {
|
|
29621
|
+
const expandedState = updaterOrValue instanceof Function
|
|
29622
|
+
? updaterOrValue(this.table.getState().expanded)
|
|
29623
|
+
: updaterOrValue;
|
|
29624
|
+
this.updateTableOptions({
|
|
29625
|
+
state: {
|
|
29626
|
+
expanded: expandedState
|
|
29627
|
+
}
|
|
29628
|
+
});
|
|
29629
|
+
};
|
|
29213
29630
|
this.options = {
|
|
29214
29631
|
data: [],
|
|
29215
29632
|
onStateChange: (_) => { },
|
|
29633
|
+
onExpandedChange: this.handleExpandedChange,
|
|
29216
29634
|
getCoreRowModel: getCoreRowModel(),
|
|
29217
29635
|
getSortedRowModel: getSortedRowModel(),
|
|
29636
|
+
getGroupedRowModel: getGroupedRowModel(),
|
|
29637
|
+
getExpandedRowModel: getExpandedRowModel(),
|
|
29638
|
+
getIsRowExpanded: this.getIsRowExpanded,
|
|
29218
29639
|
columns: [],
|
|
29219
|
-
state: {
|
|
29640
|
+
state: {
|
|
29641
|
+
grouping: [],
|
|
29642
|
+
expanded: true // Workaround until we can apply a fix to TanStack regarding leveraging our getIsRowExpanded implementation
|
|
29643
|
+
},
|
|
29220
29644
|
enableSorting: true,
|
|
29645
|
+
enableGrouping: true,
|
|
29221
29646
|
renderFallbackValue: null,
|
|
29222
29647
|
autoResetAll: false
|
|
29223
29648
|
};
|
|
29224
29649
|
this.table = createTable(this.options);
|
|
29225
|
-
this.virtualizer = new Virtualizer(this);
|
|
29650
|
+
this.virtualizer = new Virtualizer(this, this.table);
|
|
29226
29651
|
}
|
|
29227
29652
|
get validity() {
|
|
29228
29653
|
return this.tableValidator.getValidity();
|
|
@@ -29270,6 +29695,10 @@
|
|
|
29270
29695
|
this.openActionMenuRecordId = undefined;
|
|
29271
29696
|
}
|
|
29272
29697
|
}
|
|
29698
|
+
handleGroupRowExpanded(rowIndex, event) {
|
|
29699
|
+
this.toggleGroupExpanded(rowIndex);
|
|
29700
|
+
event.stopPropagation();
|
|
29701
|
+
}
|
|
29273
29702
|
/**
|
|
29274
29703
|
* @internal
|
|
29275
29704
|
*/
|
|
@@ -29316,6 +29745,10 @@
|
|
|
29316
29745
|
return this.columns.filter(x => x.sortDirection !== TableColumnSortDirection.none
|
|
29317
29746
|
&& typeof x.sortIndex === 'number');
|
|
29318
29747
|
}
|
|
29748
|
+
getColumnsParticipatingInGrouping() {
|
|
29749
|
+
return this.columns.filter(x => !x.internalGroupingDisabled
|
|
29750
|
+
&& typeof x.internalGroupIndex === 'number');
|
|
29751
|
+
}
|
|
29319
29752
|
childItemsChanged() {
|
|
29320
29753
|
void this.updateColumnsFromChildItems();
|
|
29321
29754
|
}
|
|
@@ -29343,6 +29776,11 @@
|
|
|
29343
29776
|
// Perform a shallow copy of the data to trigger tanstack to regenerate the row models and columns.
|
|
29344
29777
|
updatedOptions.data = [...this.table.options.data];
|
|
29345
29778
|
}
|
|
29779
|
+
if (this.updateTracker.updateGroupRows) {
|
|
29780
|
+
updatedOptions.state.grouping = this.calculateTanStackGroupingState();
|
|
29781
|
+
updatedOptions.state.expanded = true;
|
|
29782
|
+
this.collapsedRows.clear();
|
|
29783
|
+
}
|
|
29346
29784
|
this.updateTableOptions(updatedOptions);
|
|
29347
29785
|
}
|
|
29348
29786
|
updateActionMenuSlots() {
|
|
@@ -29360,6 +29798,7 @@
|
|
|
29360
29798
|
validate() {
|
|
29361
29799
|
this.tableValidator.validateColumnIds(this.columns.map(x => x.columnId));
|
|
29362
29800
|
this.tableValidator.validateColumnSortIndices(this.getColumnsParticipatingInSorting().map(x => x.sortIndex));
|
|
29801
|
+
this.tableValidator.validateColumnGroupIndices(this.getColumnsParticipatingInGrouping().map(x => x.internalGroupIndex));
|
|
29363
29802
|
this.validateWithData(this.table.options.data);
|
|
29364
29803
|
}
|
|
29365
29804
|
validateWithData(data) {
|
|
@@ -29380,12 +29819,30 @@
|
|
|
29380
29819
|
this.tableData = rows.map(row => {
|
|
29381
29820
|
const rowState = {
|
|
29382
29821
|
record: row.original,
|
|
29383
|
-
id: row.id
|
|
29822
|
+
id: row.id,
|
|
29823
|
+
isGrouped: row.getIsGrouped(),
|
|
29824
|
+
isExpanded: row.getIsExpanded(),
|
|
29825
|
+
groupRowValue: row.getIsGrouped()
|
|
29826
|
+
? row.getValue(row.groupingColumnId)
|
|
29827
|
+
: undefined,
|
|
29828
|
+
nestingLevel: row.depth,
|
|
29829
|
+
leafItemCount: row
|
|
29830
|
+
.getLeafRows()
|
|
29831
|
+
.filter(leafRow => leafRow.getLeafRows().length === 0)
|
|
29832
|
+
.length,
|
|
29833
|
+
groupColumn: this.getGroupRowColumn(row)
|
|
29384
29834
|
};
|
|
29385
29835
|
return rowState;
|
|
29386
29836
|
});
|
|
29387
29837
|
this.virtualizer.dataChanged();
|
|
29388
29838
|
}
|
|
29839
|
+
getGroupRowColumn(row) {
|
|
29840
|
+
const groupedId = row.groupingColumnId;
|
|
29841
|
+
if (groupedId !== undefined) {
|
|
29842
|
+
return this.columns.find(c => c.internalUniqueId === groupedId);
|
|
29843
|
+
}
|
|
29844
|
+
return undefined;
|
|
29845
|
+
}
|
|
29389
29846
|
updateTableOptions(updatedOptions) {
|
|
29390
29847
|
this.options = {
|
|
29391
29848
|
...this.options,
|
|
@@ -29395,6 +29852,18 @@
|
|
|
29395
29852
|
this.table.setOptions(this.options);
|
|
29396
29853
|
this.refreshRows();
|
|
29397
29854
|
}
|
|
29855
|
+
toggleGroupExpanded(rowIndex) {
|
|
29856
|
+
const row = this.table.getRowModel().rows[rowIndex];
|
|
29857
|
+
const wasExpanded = row.getIsExpanded();
|
|
29858
|
+
// must update the collapsedRows before toggling expanded state
|
|
29859
|
+
if (wasExpanded) {
|
|
29860
|
+
this.collapsedRows.add(row.id);
|
|
29861
|
+
}
|
|
29862
|
+
else {
|
|
29863
|
+
this.collapsedRows.delete(row.id);
|
|
29864
|
+
}
|
|
29865
|
+
row.toggleExpanded();
|
|
29866
|
+
}
|
|
29398
29867
|
calculateTanStackSortState() {
|
|
29399
29868
|
const sortedColumns = this.getColumnsParticipatingInSorting().sort((x, y) => x.sortIndex - y.sortIndex);
|
|
29400
29869
|
this.firstSortedColumn = sortedColumns.length
|
|
@@ -29407,6 +29876,10 @@
|
|
|
29407
29876
|
};
|
|
29408
29877
|
});
|
|
29409
29878
|
}
|
|
29879
|
+
calculateTanStackGroupingState() {
|
|
29880
|
+
const groupedColumns = this.getColumnsParticipatingInGrouping().sort((x, y) => x.internalGroupIndex - y.internalGroupIndex);
|
|
29881
|
+
return groupedColumns.map(column => column.internalUniqueId);
|
|
29882
|
+
}
|
|
29410
29883
|
calculateTanStackRowIdFunction() {
|
|
29411
29884
|
return this.idFieldName === null || this.idFieldName === undefined
|
|
29412
29885
|
? undefined
|
|
@@ -29463,13 +29936,13 @@
|
|
|
29463
29936
|
], Table.prototype, "firstSortedColumn", void 0);
|
|
29464
29937
|
const nimbleTable = Table.compose({
|
|
29465
29938
|
baseName: 'table',
|
|
29466
|
-
template: template$
|
|
29467
|
-
styles: styles$
|
|
29939
|
+
template: template$7,
|
|
29940
|
+
styles: styles$g
|
|
29468
29941
|
});
|
|
29469
29942
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTable());
|
|
29470
29943
|
DesignSystem.tagFor(Table);
|
|
29471
29944
|
|
|
29472
|
-
const styles$
|
|
29945
|
+
const styles$b = css `
|
|
29473
29946
|
:host {
|
|
29474
29947
|
display: contents;
|
|
29475
29948
|
}
|
|
@@ -29481,7 +29954,7 @@
|
|
|
29481
29954
|
}
|
|
29482
29955
|
`;
|
|
29483
29956
|
|
|
29484
|
-
const template$
|
|
29957
|
+
const template$6 = html `
|
|
29485
29958
|
<template>
|
|
29486
29959
|
<span class="header-content">
|
|
29487
29960
|
<slot></slot>
|
|
@@ -29528,6 +30001,123 @@
|
|
|
29528
30001
|
return FractionalWidthColumn;
|
|
29529
30002
|
}
|
|
29530
30003
|
|
|
30004
|
+
// As the returned class is internal to the function, we can't write a signature that uses is directly, so rely on inference
|
|
30005
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type
|
|
30006
|
+
function mixinGroupableColumnAPI(base) {
|
|
30007
|
+
/**
|
|
30008
|
+
* The Mixin that provides a concrete column with the API to allow grouping
|
|
30009
|
+
* by the values in that column.
|
|
30010
|
+
*/
|
|
30011
|
+
class GroupableColumn extends base {
|
|
30012
|
+
constructor() {
|
|
30013
|
+
super(...arguments);
|
|
30014
|
+
this.groupingDisabled = false;
|
|
30015
|
+
this.groupIndex = null;
|
|
30016
|
+
}
|
|
30017
|
+
groupingDisabledChanged() {
|
|
30018
|
+
this.internalGroupingDisabled = this.groupingDisabled;
|
|
30019
|
+
}
|
|
30020
|
+
groupIndexChanged() {
|
|
30021
|
+
if (typeof this.groupIndex === 'number') {
|
|
30022
|
+
this.internalGroupIndex = this.groupIndex;
|
|
30023
|
+
}
|
|
30024
|
+
else {
|
|
30025
|
+
this.internalGroupIndex = undefined;
|
|
30026
|
+
}
|
|
30027
|
+
}
|
|
30028
|
+
}
|
|
30029
|
+
attr({ attribute: 'grouping-disabled', mode: 'boolean' })(
|
|
30030
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
30031
|
+
GroupableColumn.prototype, 'groupingDisabled');
|
|
30032
|
+
attr({ attribute: 'group-index', converter: nullableNumberConverter })(
|
|
30033
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
30034
|
+
GroupableColumn.prototype, 'groupIndex');
|
|
30035
|
+
return GroupableColumn;
|
|
30036
|
+
}
|
|
30037
|
+
|
|
30038
|
+
/**
|
|
30039
|
+
* The base class for group header views, which are displayed in a TableGroupRow.
|
|
30040
|
+
* A TableColumn that uses the GroupableColumn mixin must provide a TableGroupHeaderView
|
|
30041
|
+
* type (linked via TableColumn.groupHeaderViewTag).
|
|
30042
|
+
*/
|
|
30043
|
+
class TableGroupHeaderView extends FoundationElement {
|
|
30044
|
+
}
|
|
30045
|
+
__decorate$1([
|
|
30046
|
+
observable
|
|
30047
|
+
], TableGroupHeaderView.prototype, "groupHeaderValue", void 0);
|
|
30048
|
+
__decorate$1([
|
|
30049
|
+
observable
|
|
30050
|
+
], TableGroupHeaderView.prototype, "columnConfig", void 0);
|
|
30051
|
+
|
|
30052
|
+
const template$5 = html `
|
|
30053
|
+
<span
|
|
30054
|
+
${ref('textSpan')}
|
|
30055
|
+
class="${x => (typeof x.groupHeaderValue === 'string' ? '' : 'placeholder')}"
|
|
30056
|
+
@mouseover="${x => x.updateTitleOverflow()}"
|
|
30057
|
+
@mouseout="${x => x.clearTitleOverflow()}"
|
|
30058
|
+
title="${x => (x.isValidContentAndHasOverflow && x.content
|
|
30059
|
+
? x.content
|
|
30060
|
+
: undefined)}"
|
|
30061
|
+
>
|
|
30062
|
+
${x => x.content}
|
|
30063
|
+
</span>
|
|
30064
|
+
`;
|
|
30065
|
+
|
|
30066
|
+
const styles$a = css `
|
|
30067
|
+
span {
|
|
30068
|
+
font: ${bodyFont};
|
|
30069
|
+
color: ${bodyFontColor};
|
|
30070
|
+
white-space: nowrap;
|
|
30071
|
+
overflow: hidden;
|
|
30072
|
+
text-overflow: ellipsis;
|
|
30073
|
+
}
|
|
30074
|
+
|
|
30075
|
+
.placeholder {
|
|
30076
|
+
color: ${controlLabelFontColor};
|
|
30077
|
+
}
|
|
30078
|
+
`;
|
|
30079
|
+
|
|
30080
|
+
/**
|
|
30081
|
+
* The custom element used to render a group row header for a group representing rows
|
|
30082
|
+
* grouped by a TableColumnText column.
|
|
30083
|
+
*/
|
|
30084
|
+
class TableColumnTextGroupHeaderView extends TableGroupHeaderView {
|
|
30085
|
+
constructor() {
|
|
30086
|
+
super(...arguments);
|
|
30087
|
+
/** @internal */
|
|
30088
|
+
this.isValidContentAndHasOverflow = false;
|
|
30089
|
+
}
|
|
30090
|
+
get content() {
|
|
30091
|
+
return typeof this.groupHeaderValue === 'string'
|
|
30092
|
+
? this.groupHeaderValue
|
|
30093
|
+
: this.columnConfig?.placeholder ?? '';
|
|
30094
|
+
}
|
|
30095
|
+
updateTitleOverflow() {
|
|
30096
|
+
this.isValidContentAndHasOverflow = this.textSpan.offsetWidth < this.textSpan.scrollWidth;
|
|
30097
|
+
}
|
|
30098
|
+
clearTitleOverflow() {
|
|
30099
|
+
this.isValidContentAndHasOverflow = false;
|
|
30100
|
+
}
|
|
30101
|
+
}
|
|
30102
|
+
__decorate$1([
|
|
30103
|
+
observable
|
|
30104
|
+
], TableColumnTextGroupHeaderView.prototype, "columnConfig", void 0);
|
|
30105
|
+
__decorate$1([
|
|
30106
|
+
observable
|
|
30107
|
+
], TableColumnTextGroupHeaderView.prototype, "isValidContentAndHasOverflow", void 0);
|
|
30108
|
+
__decorate$1([
|
|
30109
|
+
volatile
|
|
30110
|
+
], TableColumnTextGroupHeaderView.prototype, "content", null);
|
|
30111
|
+
const tableColumnTextGroupHeaderView = TableColumnTextGroupHeaderView.compose({
|
|
30112
|
+
baseName: 'table-column-text-group-header',
|
|
30113
|
+
template: template$5,
|
|
30114
|
+
styles: styles$a
|
|
30115
|
+
});
|
|
30116
|
+
DesignSystem.getOrCreate()
|
|
30117
|
+
.withPrefix('nimble')
|
|
30118
|
+
.register(tableColumnTextGroupHeaderView());
|
|
30119
|
+
const tableColumnTextGroupHeaderTag = DesignSystem.tagFor(TableColumnTextGroupHeaderView);
|
|
30120
|
+
|
|
29531
30121
|
const styles$9 = css `
|
|
29532
30122
|
span {
|
|
29533
30123
|
font: ${bodyFont};
|
|
@@ -29614,12 +30204,16 @@
|
|
|
29614
30204
|
/**
|
|
29615
30205
|
* The table column for displaying strings.
|
|
29616
30206
|
*/
|
|
29617
|
-
class TableColumnText extends mixinFractionalWidthColumnAPI(TableColumnTextBase) {
|
|
30207
|
+
class TableColumnText extends mixinGroupableColumnAPI(mixinFractionalWidthColumnAPI(TableColumnTextBase)) {
|
|
30208
|
+
constructor() {
|
|
30209
|
+
super(...arguments);
|
|
30210
|
+
this.groupHeaderViewTag = tableColumnTextGroupHeaderTag;
|
|
30211
|
+
}
|
|
29618
30212
|
}
|
|
29619
30213
|
const nimbleTableColumnText = TableColumnText.compose({
|
|
29620
30214
|
baseName: 'table-column-text',
|
|
29621
|
-
template: template$
|
|
29622
|
-
styles: styles$
|
|
30215
|
+
template: template$6,
|
|
30216
|
+
styles: styles$b
|
|
29623
30217
|
});
|
|
29624
30218
|
DesignSystem.getOrCreate()
|
|
29625
30219
|
.withPrefix('nimble')
|
|
@@ -29717,7 +30311,7 @@
|
|
|
29717
30311
|
|
|
29718
30312
|
const styles$6 = css `
|
|
29719
30313
|
${display('inline-flex')}
|
|
29720
|
-
${styles$
|
|
30314
|
+
${styles$v}
|
|
29721
30315
|
|
|
29722
30316
|
:host {
|
|
29723
30317
|
font: ${bodyFont};
|
|
@@ -30063,7 +30657,7 @@
|
|
|
30063
30657
|
|
|
30064
30658
|
const styles$5 = css `
|
|
30065
30659
|
${display('inline-block')}
|
|
30066
|
-
${styles$
|
|
30660
|
+
${styles$v}
|
|
30067
30661
|
|
|
30068
30662
|
:host {
|
|
30069
30663
|
font: ${bodyFont};
|
|
@@ -30719,7 +31313,7 @@
|
|
|
30719
31313
|
.expand-collapse-button svg {
|
|
30720
31314
|
width: ${iconSize};
|
|
30721
31315
|
height: ${iconSize};
|
|
30722
|
-
transition: transform
|
|
31316
|
+
transition: transform ${mediumDelay} ease-in;
|
|
30723
31317
|
pointer-events: none;
|
|
30724
31318
|
fill: currentcolor;
|
|
30725
31319
|
}
|