@ni/nimble-components 18.10.2 → 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 +774 -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/anchor-tab/index.d.ts +9 -0
- package/dist/esm/anchor-tab/index.js +12 -0
- package/dist/esm/anchor-tab/index.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 +19 -9
|
@@ -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}"
|
|
@@ -17978,21 +17978,33 @@
|
|
|
17978
17978
|
* HTML Attribute: disabled
|
|
17979
17979
|
*/
|
|
17980
17980
|
this.disabled = false;
|
|
17981
|
+
/**
|
|
17982
|
+
* Indicates the current "selected" state of various widgets.
|
|
17983
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-selected}
|
|
17984
|
+
*
|
|
17985
|
+
* @public
|
|
17986
|
+
* @remarks
|
|
17987
|
+
* HTML Attribute: aria-selected
|
|
17988
|
+
*/
|
|
17989
|
+
this.ariaSelected = 'false';
|
|
17981
17990
|
}
|
|
17982
17991
|
}
|
|
17983
17992
|
__decorate$1([
|
|
17984
17993
|
attr({ mode: 'boolean' })
|
|
17985
17994
|
], AnchorTab.prototype, "disabled", void 0);
|
|
17995
|
+
__decorate$1([
|
|
17996
|
+
attr({ attribute: 'aria-selected' })
|
|
17997
|
+
], AnchorTab.prototype, "ariaSelected", void 0);
|
|
17986
17998
|
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
17987
17999
|
const nimbleAnchorTab = AnchorTab.compose({
|
|
17988
18000
|
baseName: 'anchor-tab',
|
|
17989
|
-
template: template$
|
|
17990
|
-
styles: styles$
|
|
18001
|
+
template: template$m,
|
|
18002
|
+
styles: styles$I
|
|
17991
18003
|
});
|
|
17992
18004
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTab());
|
|
17993
18005
|
DesignSystem.tagFor(AnchorTab);
|
|
17994
18006
|
|
|
17995
|
-
const styles$
|
|
18007
|
+
const styles$H = css `
|
|
17996
18008
|
${display('grid')}
|
|
17997
18009
|
|
|
17998
18010
|
:host {
|
|
@@ -18010,7 +18022,7 @@
|
|
|
18010
18022
|
}
|
|
18011
18023
|
`;
|
|
18012
18024
|
|
|
18013
|
-
const template$
|
|
18025
|
+
const template$l = (context, definition) => html `
|
|
18014
18026
|
${startSlotTemplate(context, definition)}
|
|
18015
18027
|
<div ${ref('tablist')} class="tablist" part="tablist" role="tablist">
|
|
18016
18028
|
<slot name="anchortab" ${slotted('tabs')}></slot>
|
|
@@ -18207,8 +18219,8 @@
|
|
|
18207
18219
|
applyMixins(AnchorTabs, StartEnd);
|
|
18208
18220
|
const nimbleAnchorTabs = AnchorTabs.compose({
|
|
18209
18221
|
baseName: 'anchor-tabs',
|
|
18210
|
-
template: template$
|
|
18211
|
-
styles: styles$
|
|
18222
|
+
template: template$l,
|
|
18223
|
+
styles: styles$H,
|
|
18212
18224
|
shadowOptions: {
|
|
18213
18225
|
delegatesFocus: false
|
|
18214
18226
|
}
|
|
@@ -18216,7 +18228,7 @@
|
|
|
18216
18228
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTabs());
|
|
18217
18229
|
DesignSystem.tagFor(AnchorTabs);
|
|
18218
18230
|
|
|
18219
|
-
const styles$
|
|
18231
|
+
const styles$G = css `
|
|
18220
18232
|
${display('block')}
|
|
18221
18233
|
|
|
18222
18234
|
:host {
|
|
@@ -18320,7 +18332,7 @@
|
|
|
18320
18332
|
}
|
|
18321
18333
|
`;
|
|
18322
18334
|
|
|
18323
|
-
const template$
|
|
18335
|
+
const template$k = (context, definition) => html `
|
|
18324
18336
|
<template
|
|
18325
18337
|
role="treeitem"
|
|
18326
18338
|
slot="${x => (x.isNestedItem() ? 'item' : null)}"
|
|
@@ -18457,8 +18469,8 @@
|
|
|
18457
18469
|
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
18458
18470
|
const nimbleAnchorTreeItem = AnchorTreeItem.compose({
|
|
18459
18471
|
baseName: 'anchor-tree-item',
|
|
18460
|
-
template: template$
|
|
18461
|
-
styles: styles$
|
|
18472
|
+
template: template$k,
|
|
18473
|
+
styles: styles$G,
|
|
18462
18474
|
shadowOptions: {
|
|
18463
18475
|
delegatesFocus: true
|
|
18464
18476
|
}
|
|
@@ -18468,7 +18480,7 @@
|
|
|
18468
18480
|
.register(nimbleAnchorTreeItem());
|
|
18469
18481
|
DesignSystem.tagFor(AnchorTreeItem);
|
|
18470
18482
|
|
|
18471
|
-
const styles$
|
|
18483
|
+
const styles$F = css `
|
|
18472
18484
|
:host {
|
|
18473
18485
|
contain: layout;
|
|
18474
18486
|
display: block;
|
|
@@ -18492,7 +18504,7 @@
|
|
|
18492
18504
|
baseName: 'anchored-region',
|
|
18493
18505
|
baseClass: AnchoredRegion$1,
|
|
18494
18506
|
template: anchoredRegionTemplate,
|
|
18495
|
-
styles: styles$
|
|
18507
|
+
styles: styles$F
|
|
18496
18508
|
});
|
|
18497
18509
|
DesignSystem.getOrCreate()
|
|
18498
18510
|
.withPrefix('nimble')
|
|
@@ -18572,7 +18584,7 @@
|
|
|
18572
18584
|
*/
|
|
18573
18585
|
const themeBehavior = (theme, styles) => new ThemeStyleSheetBehavior(theme, styles);
|
|
18574
18586
|
|
|
18575
|
-
const styles$
|
|
18587
|
+
const styles$E = css `
|
|
18576
18588
|
${display('flex')}
|
|
18577
18589
|
|
|
18578
18590
|
:host {
|
|
@@ -18730,8 +18742,8 @@
|
|
|
18730
18742
|
}
|
|
18731
18743
|
`));
|
|
18732
18744
|
|
|
18733
|
-
const styles$
|
|
18734
|
-
${styles$
|
|
18745
|
+
const styles$D = css `
|
|
18746
|
+
${styles$M}
|
|
18735
18747
|
${buttonAppearanceVariantStyles}
|
|
18736
18748
|
`;
|
|
18737
18749
|
|
|
@@ -18777,7 +18789,7 @@
|
|
|
18777
18789
|
baseName: 'button',
|
|
18778
18790
|
baseClass: Button$1,
|
|
18779
18791
|
template: buttonTemplate,
|
|
18780
|
-
styles: styles$
|
|
18792
|
+
styles: styles$D,
|
|
18781
18793
|
shadowOptions: {
|
|
18782
18794
|
delegatesFocus: true
|
|
18783
18795
|
}
|
|
@@ -19399,13 +19411,13 @@
|
|
|
19399
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>`
|
|
19400
19412
|
};
|
|
19401
19413
|
|
|
19402
|
-
const template$
|
|
19414
|
+
const template$j = html `
|
|
19403
19415
|
<template>
|
|
19404
19416
|
<div class="icon" :innerHTML=${x => x.icon.data}></div>
|
|
19405
19417
|
</template
|
|
19406
19418
|
`;
|
|
19407
19419
|
|
|
19408
|
-
const styles$
|
|
19420
|
+
const styles$C = css `
|
|
19409
19421
|
${display('inline-flex')}
|
|
19410
19422
|
|
|
19411
19423
|
:host {
|
|
@@ -19458,8 +19470,8 @@
|
|
|
19458
19470
|
const registerIcon = (baseName, iconClass) => {
|
|
19459
19471
|
const composedIcon = iconClass.compose({
|
|
19460
19472
|
baseName,
|
|
19461
|
-
template: template$
|
|
19462
|
-
styles: styles$
|
|
19473
|
+
template: template$j,
|
|
19474
|
+
styles: styles$C,
|
|
19463
19475
|
baseClass: iconClass
|
|
19464
19476
|
});
|
|
19465
19477
|
DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
|
|
@@ -19525,7 +19537,7 @@
|
|
|
19525
19537
|
};
|
|
19526
19538
|
|
|
19527
19539
|
// prettier-ignore
|
|
19528
|
-
const template$
|
|
19540
|
+
const template$i = html `
|
|
19529
19541
|
<div class="container"
|
|
19530
19542
|
role="status"
|
|
19531
19543
|
aria-atomic="${x => x.ariaAtomic}"
|
|
@@ -19644,13 +19656,13 @@
|
|
|
19644
19656
|
applyMixins(Banner, ARIAGlobalStatesAndProperties);
|
|
19645
19657
|
const nimbleBanner = Banner.compose({
|
|
19646
19658
|
baseName: 'banner',
|
|
19647
|
-
template: template$
|
|
19648
|
-
styles: styles$
|
|
19659
|
+
template: template$i,
|
|
19660
|
+
styles: styles$E
|
|
19649
19661
|
});
|
|
19650
19662
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBanner());
|
|
19651
19663
|
DesignSystem.tagFor(Banner);
|
|
19652
19664
|
|
|
19653
|
-
const styles$
|
|
19665
|
+
const styles$B = css `
|
|
19654
19666
|
${display('inline-block')}
|
|
19655
19667
|
|
|
19656
19668
|
:host {
|
|
@@ -19691,12 +19703,12 @@
|
|
|
19691
19703
|
baseName: 'breadcrumb',
|
|
19692
19704
|
baseClass: Breadcrumb$1,
|
|
19693
19705
|
template: breadcrumbTemplate,
|
|
19694
|
-
styles: styles$
|
|
19706
|
+
styles: styles$B
|
|
19695
19707
|
});
|
|
19696
19708
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
|
|
19697
19709
|
DesignSystem.tagFor(Breadcrumb);
|
|
19698
19710
|
|
|
19699
|
-
const styles$
|
|
19711
|
+
const styles$A = css `
|
|
19700
19712
|
${display('inline-flex')}
|
|
19701
19713
|
|
|
19702
19714
|
:host {
|
|
@@ -19772,7 +19784,7 @@
|
|
|
19772
19784
|
baseName: 'breadcrumb-item',
|
|
19773
19785
|
baseClass: BreadcrumbItem$1,
|
|
19774
19786
|
template: breadcrumbItemTemplate,
|
|
19775
|
-
styles: styles$
|
|
19787
|
+
styles: styles$A,
|
|
19776
19788
|
separator: forwardSlash16X16.data
|
|
19777
19789
|
});
|
|
19778
19790
|
DesignSystem.getOrCreate()
|
|
@@ -19780,7 +19792,7 @@
|
|
|
19780
19792
|
.register(nimbleBreadcrumbItem());
|
|
19781
19793
|
DesignSystem.tagFor(BreadcrumbItem);
|
|
19782
19794
|
|
|
19783
|
-
const styles$
|
|
19795
|
+
const styles$z = css `
|
|
19784
19796
|
${display('inline-flex')}
|
|
19785
19797
|
|
|
19786
19798
|
:host {
|
|
@@ -19939,7 +19951,7 @@
|
|
|
19939
19951
|
const nimbleCardButton = CardButton.compose({
|
|
19940
19952
|
baseName: 'card-button',
|
|
19941
19953
|
template: buttonTemplate,
|
|
19942
|
-
styles: styles$
|
|
19954
|
+
styles: styles$z,
|
|
19943
19955
|
shadowOptions: {
|
|
19944
19956
|
delegatesFocus: true
|
|
19945
19957
|
}
|
|
@@ -19947,7 +19959,7 @@
|
|
|
19947
19959
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCardButton());
|
|
19948
19960
|
DesignSystem.tagFor(CardButton);
|
|
19949
19961
|
|
|
19950
|
-
const styles$
|
|
19962
|
+
const styles$y = css `
|
|
19951
19963
|
${display('inline-flex')}
|
|
19952
19964
|
|
|
19953
19965
|
:host {
|
|
@@ -20065,15 +20077,15 @@
|
|
|
20065
20077
|
baseName: 'checkbox',
|
|
20066
20078
|
baseClass: Checkbox$1,
|
|
20067
20079
|
template: checkboxTemplate,
|
|
20068
|
-
styles: styles$
|
|
20080
|
+
styles: styles$y,
|
|
20069
20081
|
checkedIndicator: check16X16.data,
|
|
20070
20082
|
indeterminateIndicator: minus16X16.data
|
|
20071
20083
|
});
|
|
20072
20084
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCheckbox());
|
|
20073
20085
|
DesignSystem.tagFor(Checkbox);
|
|
20074
20086
|
|
|
20075
|
-
const styles$
|
|
20076
|
-
${styles$
|
|
20087
|
+
const styles$x = css `
|
|
20088
|
+
${styles$M}
|
|
20077
20089
|
|
|
20078
20090
|
.control[aria-pressed='true'] {
|
|
20079
20091
|
background-color: ${fillSelectedColor};
|
|
@@ -20099,7 +20111,7 @@
|
|
|
20099
20111
|
}
|
|
20100
20112
|
`;
|
|
20101
20113
|
|
|
20102
|
-
const template$
|
|
20114
|
+
const template$h = (context, definition) => html `
|
|
20103
20115
|
<div
|
|
20104
20116
|
role="button"
|
|
20105
20117
|
part="control"
|
|
@@ -20174,8 +20186,8 @@
|
|
|
20174
20186
|
applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
|
|
20175
20187
|
const nimbleToggleButton = ToggleButton.compose({
|
|
20176
20188
|
baseName: 'toggle-button',
|
|
20177
|
-
template: template$
|
|
20178
|
-
styles: styles$
|
|
20189
|
+
template: template$h,
|
|
20190
|
+
styles: styles$x,
|
|
20179
20191
|
shadowOptions: {
|
|
20180
20192
|
delegatesFocus: true
|
|
20181
20193
|
}
|
|
@@ -20207,7 +20219,7 @@
|
|
|
20207
20219
|
block: 'block'
|
|
20208
20220
|
};
|
|
20209
20221
|
|
|
20210
|
-
const styles$
|
|
20222
|
+
const styles$w = css `
|
|
20211
20223
|
${display('inline-flex')}
|
|
20212
20224
|
|
|
20213
20225
|
:host {
|
|
@@ -20443,7 +20455,7 @@
|
|
|
20443
20455
|
}
|
|
20444
20456
|
`));
|
|
20445
20457
|
|
|
20446
|
-
const styles$
|
|
20458
|
+
const styles$v = css `
|
|
20447
20459
|
.error-icon {
|
|
20448
20460
|
display: none;
|
|
20449
20461
|
}
|
|
@@ -20477,9 +20489,9 @@
|
|
|
20477
20489
|
}
|
|
20478
20490
|
`;
|
|
20479
20491
|
|
|
20480
|
-
const styles$
|
|
20481
|
-
${styles$
|
|
20482
|
-
${styles$
|
|
20492
|
+
const styles$u = css `
|
|
20493
|
+
${styles$w}
|
|
20494
|
+
${styles$v}
|
|
20483
20495
|
|
|
20484
20496
|
:host {
|
|
20485
20497
|
--ni-private-hover-bottom-border-width: 2px;
|
|
@@ -20715,7 +20727,7 @@
|
|
|
20715
20727
|
baseName: 'combobox',
|
|
20716
20728
|
baseClass: Combobox$1,
|
|
20717
20729
|
template: comboboxTemplate,
|
|
20718
|
-
styles: styles$
|
|
20730
|
+
styles: styles$u,
|
|
20719
20731
|
shadowOptions: {
|
|
20720
20732
|
delegatesFocus: true
|
|
20721
20733
|
},
|
|
@@ -20760,7 +20772,7 @@
|
|
|
20760
20772
|
*/
|
|
20761
20773
|
const UserDismissed = Symbol('user dismissed');
|
|
20762
20774
|
|
|
20763
|
-
const styles$
|
|
20775
|
+
const styles$t = css `
|
|
20764
20776
|
${display('grid')}
|
|
20765
20777
|
|
|
20766
20778
|
dialog {
|
|
@@ -20876,7 +20888,7 @@
|
|
|
20876
20888
|
}
|
|
20877
20889
|
`));
|
|
20878
20890
|
|
|
20879
|
-
const template$
|
|
20891
|
+
const template$g = html `
|
|
20880
20892
|
<template>
|
|
20881
20893
|
<dialog
|
|
20882
20894
|
${ref('dialogElement')}
|
|
@@ -21002,14 +21014,14 @@
|
|
|
21002
21014
|
applyMixins(Dialog, ARIAGlobalStatesAndProperties);
|
|
21003
21015
|
const nimbleDialog = Dialog.compose({
|
|
21004
21016
|
baseName: 'dialog',
|
|
21005
|
-
template: template$
|
|
21006
|
-
styles: styles$
|
|
21017
|
+
template: template$g,
|
|
21018
|
+
styles: styles$t,
|
|
21007
21019
|
baseClass: Dialog
|
|
21008
21020
|
});
|
|
21009
21021
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDialog());
|
|
21010
21022
|
DesignSystem.tagFor(Dialog);
|
|
21011
21023
|
|
|
21012
|
-
const styles$
|
|
21024
|
+
const styles$s = css `
|
|
21013
21025
|
${display('block')}
|
|
21014
21026
|
|
|
21015
21027
|
:host {
|
|
@@ -21162,7 +21174,7 @@
|
|
|
21162
21174
|
}
|
|
21163
21175
|
`));
|
|
21164
21176
|
|
|
21165
|
-
const template$
|
|
21177
|
+
const template$f = html `
|
|
21166
21178
|
<dialog
|
|
21167
21179
|
${ref('dialog')}
|
|
21168
21180
|
aria-label="${x => x.ariaLabel}"
|
|
@@ -21276,8 +21288,8 @@
|
|
|
21276
21288
|
applyMixins(Drawer, ARIAGlobalStatesAndProperties);
|
|
21277
21289
|
const nimbleDrawer = Drawer.compose({
|
|
21278
21290
|
baseName: 'drawer',
|
|
21279
|
-
template: template$
|
|
21280
|
-
styles: styles$
|
|
21291
|
+
template: template$f,
|
|
21292
|
+
styles: styles$s
|
|
21281
21293
|
});
|
|
21282
21294
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
|
|
21283
21295
|
DesignSystem.tagFor(Drawer);
|
|
@@ -21340,7 +21352,7 @@
|
|
|
21340
21352
|
}
|
|
21341
21353
|
}
|
|
21342
21354
|
registerIcon('icon-arrow-expander-right', IconArrowExpanderRight);
|
|
21343
|
-
DesignSystem.tagFor(IconArrowExpanderRight);
|
|
21355
|
+
const iconArrowExpanderRightTag = DesignSystem.tagFor(IconArrowExpanderRight);
|
|
21344
21356
|
|
|
21345
21357
|
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
21346
21358
|
/**
|
|
@@ -23058,7 +23070,7 @@
|
|
|
23058
23070
|
registerIcon('icon-xmark-check', IconXmarkCheck);
|
|
23059
23071
|
DesignSystem.tagFor(IconXmarkCheck);
|
|
23060
23072
|
|
|
23061
|
-
const styles$
|
|
23073
|
+
const styles$r = css `
|
|
23062
23074
|
${display('flex')}
|
|
23063
23075
|
|
|
23064
23076
|
:host {
|
|
@@ -23138,12 +23150,12 @@
|
|
|
23138
23150
|
baseName: 'list-option',
|
|
23139
23151
|
baseClass: ListboxOption,
|
|
23140
23152
|
template: listboxOptionTemplate,
|
|
23141
|
-
styles: styles$
|
|
23153
|
+
styles: styles$r
|
|
23142
23154
|
});
|
|
23143
23155
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleListOption());
|
|
23144
23156
|
DesignSystem.tagFor(ListOption);
|
|
23145
23157
|
|
|
23146
|
-
const styles$
|
|
23158
|
+
const styles$q = css `
|
|
23147
23159
|
${display('grid')}
|
|
23148
23160
|
|
|
23149
23161
|
:host {
|
|
@@ -23210,12 +23222,12 @@
|
|
|
23210
23222
|
baseName: 'menu',
|
|
23211
23223
|
baseClass: Menu$1,
|
|
23212
23224
|
template: menuTemplate,
|
|
23213
|
-
styles: styles$
|
|
23225
|
+
styles: styles$q
|
|
23214
23226
|
});
|
|
23215
23227
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenu());
|
|
23216
23228
|
DesignSystem.tagFor(Menu);
|
|
23217
23229
|
|
|
23218
|
-
const styles$
|
|
23230
|
+
const styles$p = css `
|
|
23219
23231
|
${display('inline-block')}
|
|
23220
23232
|
|
|
23221
23233
|
:host {
|
|
@@ -23234,7 +23246,7 @@
|
|
|
23234
23246
|
`;
|
|
23235
23247
|
|
|
23236
23248
|
// prettier-ignore
|
|
23237
|
-
const template$
|
|
23249
|
+
const template$e = html `
|
|
23238
23250
|
<template
|
|
23239
23251
|
?open="${x => x.open}"
|
|
23240
23252
|
@focusout="${(x, c) => x.focusoutHandler(c.event)}"
|
|
@@ -23489,8 +23501,8 @@
|
|
|
23489
23501
|
], MenuButton.prototype, "slottedMenus", void 0);
|
|
23490
23502
|
const nimbleMenuButton = MenuButton.compose({
|
|
23491
23503
|
baseName: 'menu-button',
|
|
23492
|
-
template: template$
|
|
23493
|
-
styles: styles$
|
|
23504
|
+
template: template$e,
|
|
23505
|
+
styles: styles$p,
|
|
23494
23506
|
shadowOptions: {
|
|
23495
23507
|
delegatesFocus: true
|
|
23496
23508
|
}
|
|
@@ -23498,7 +23510,7 @@
|
|
|
23498
23510
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuButton());
|
|
23499
23511
|
const menuButtonTag = DesignSystem.tagFor(MenuButton);
|
|
23500
23512
|
|
|
23501
|
-
const styles$
|
|
23513
|
+
const styles$o = css `
|
|
23502
23514
|
${display('grid')}
|
|
23503
23515
|
|
|
23504
23516
|
:host {
|
|
@@ -23596,7 +23608,7 @@
|
|
|
23596
23608
|
baseName: 'menu-item',
|
|
23597
23609
|
baseClass: MenuItem$1,
|
|
23598
23610
|
template: menuItemTemplate,
|
|
23599
|
-
styles: styles$
|
|
23611
|
+
styles: styles$o,
|
|
23600
23612
|
expandCollapseGlyph: arrowExpanderRight16X16.data
|
|
23601
23613
|
});
|
|
23602
23614
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuItem());
|
|
@@ -23611,9 +23623,9 @@
|
|
|
23611
23623
|
block: 'block'
|
|
23612
23624
|
};
|
|
23613
23625
|
|
|
23614
|
-
const styles$
|
|
23626
|
+
const styles$n = css `
|
|
23615
23627
|
${display('inline-block')}
|
|
23616
|
-
${styles$
|
|
23628
|
+
${styles$v}
|
|
23617
23629
|
|
|
23618
23630
|
:host {
|
|
23619
23631
|
font: ${bodyFont};
|
|
@@ -23827,7 +23839,7 @@
|
|
|
23827
23839
|
baseName: 'number-field',
|
|
23828
23840
|
baseClass: NumberField$1,
|
|
23829
23841
|
template: numberFieldTemplate,
|
|
23830
|
-
styles: styles$
|
|
23842
|
+
styles: styles$n,
|
|
23831
23843
|
shadowOptions: {
|
|
23832
23844
|
delegatesFocus: true
|
|
23833
23845
|
},
|
|
@@ -23869,7 +23881,7 @@
|
|
|
23869
23881
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
|
|
23870
23882
|
DesignSystem.tagFor(NumberField);
|
|
23871
23883
|
|
|
23872
|
-
const styles$
|
|
23884
|
+
const styles$m = css `
|
|
23873
23885
|
${display('inline-flex')}
|
|
23874
23886
|
|
|
23875
23887
|
:host {
|
|
@@ -23970,13 +23982,13 @@
|
|
|
23970
23982
|
baseName: 'radio',
|
|
23971
23983
|
baseClass: Radio$1,
|
|
23972
23984
|
template: radioTemplate,
|
|
23973
|
-
styles: styles$
|
|
23985
|
+
styles: styles$m,
|
|
23974
23986
|
checkedIndicator: circleFilled16X16.data
|
|
23975
23987
|
});
|
|
23976
23988
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadio());
|
|
23977
23989
|
DesignSystem.tagFor(Radio);
|
|
23978
23990
|
|
|
23979
|
-
const styles$
|
|
23991
|
+
const styles$l = css `
|
|
23980
23992
|
${display('inline-block')}
|
|
23981
23993
|
|
|
23982
23994
|
.positioning-region {
|
|
@@ -24011,7 +24023,7 @@
|
|
|
24011
24023
|
baseName: 'radio-group',
|
|
24012
24024
|
baseClass: RadioGroup$1,
|
|
24013
24025
|
template: radioGroupTemplate,
|
|
24014
|
-
styles: styles$
|
|
24026
|
+
styles: styles$l,
|
|
24015
24027
|
shadowOptions: {
|
|
24016
24028
|
delegatesFocus: true
|
|
24017
24029
|
}
|
|
@@ -24019,9 +24031,9 @@
|
|
|
24019
24031
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadioGroup());
|
|
24020
24032
|
DesignSystem.tagFor(RadioGroup);
|
|
24021
24033
|
|
|
24022
|
-
const styles$
|
|
24023
|
-
${styles$
|
|
24024
|
-
${styles$
|
|
24034
|
+
const styles$k = css `
|
|
24035
|
+
${styles$w}
|
|
24036
|
+
${styles$v}
|
|
24025
24037
|
|
|
24026
24038
|
${
|
|
24027
24039
|
/* We are using flex `order` to define the visual ordering of the selected value,
|
|
@@ -24097,7 +24109,7 @@
|
|
|
24097
24109
|
baseName: 'select',
|
|
24098
24110
|
baseClass: Select$1,
|
|
24099
24111
|
template: selectTemplate,
|
|
24100
|
-
styles: styles$
|
|
24112
|
+
styles: styles$k,
|
|
24101
24113
|
indicator: arrowExpanderDown16X16.data,
|
|
24102
24114
|
end: html `
|
|
24103
24115
|
<${iconExclamationMarkTag}
|
|
@@ -24110,7 +24122,7 @@
|
|
|
24110
24122
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSelect());
|
|
24111
24123
|
DesignSystem.tagFor(Select);
|
|
24112
24124
|
|
|
24113
|
-
const styles$
|
|
24125
|
+
const styles$j = css `
|
|
24114
24126
|
${display('inline-flex')}
|
|
24115
24127
|
|
|
24116
24128
|
:host {
|
|
@@ -24254,7 +24266,7 @@
|
|
|
24254
24266
|
}
|
|
24255
24267
|
`));
|
|
24256
24268
|
|
|
24257
|
-
const template$
|
|
24269
|
+
const template$d = html `
|
|
24258
24270
|
<template role="progressbar">
|
|
24259
24271
|
<div class="container">
|
|
24260
24272
|
<div class="bit1"></div>
|
|
@@ -24271,13 +24283,13 @@
|
|
|
24271
24283
|
}
|
|
24272
24284
|
const nimbleSpinner = Spinner.compose({
|
|
24273
24285
|
baseName: 'spinner',
|
|
24274
|
-
template: template$
|
|
24275
|
-
styles: styles$
|
|
24286
|
+
template: template$d,
|
|
24287
|
+
styles: styles$j
|
|
24276
24288
|
});
|
|
24277
24289
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSpinner());
|
|
24278
24290
|
DesignSystem.tagFor(Spinner);
|
|
24279
24291
|
|
|
24280
|
-
const styles$
|
|
24292
|
+
const styles$i = css `
|
|
24281
24293
|
${display('inline-flex')}
|
|
24282
24294
|
|
|
24283
24295
|
:host {
|
|
@@ -24440,7 +24452,7 @@
|
|
|
24440
24452
|
`));
|
|
24441
24453
|
|
|
24442
24454
|
// prettier-ignore
|
|
24443
|
-
const template$
|
|
24455
|
+
const template$c = html `
|
|
24444
24456
|
<template
|
|
24445
24457
|
role="switch"
|
|
24446
24458
|
aria-checked="${x => x.checked}"
|
|
@@ -24484,8 +24496,8 @@
|
|
|
24484
24496
|
const nimbleSwitch = Switch.compose({
|
|
24485
24497
|
baseClass: Switch$1,
|
|
24486
24498
|
baseName: 'switch',
|
|
24487
|
-
template: template$
|
|
24488
|
-
styles: styles$
|
|
24499
|
+
template: template$c,
|
|
24500
|
+
styles: styles$i
|
|
24489
24501
|
});
|
|
24490
24502
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSwitch());
|
|
24491
24503
|
DesignSystem.tagFor(Switch);
|
|
@@ -24499,12 +24511,12 @@
|
|
|
24499
24511
|
baseName: 'tab',
|
|
24500
24512
|
baseClass: Tab$1,
|
|
24501
24513
|
template: tabTemplate,
|
|
24502
|
-
styles: styles$
|
|
24514
|
+
styles: styles$J
|
|
24503
24515
|
});
|
|
24504
24516
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTab());
|
|
24505
24517
|
DesignSystem.tagFor(Tab);
|
|
24506
24518
|
|
|
24507
|
-
const styles$
|
|
24519
|
+
const styles$h = css `
|
|
24508
24520
|
${display('block')}
|
|
24509
24521
|
|
|
24510
24522
|
:host {
|
|
@@ -24524,7 +24536,7 @@
|
|
|
24524
24536
|
baseName: 'tab-panel',
|
|
24525
24537
|
baseClass: TabPanel$1,
|
|
24526
24538
|
template: tabPanelTemplate,
|
|
24527
|
-
styles: styles$
|
|
24539
|
+
styles: styles$h
|
|
24528
24540
|
});
|
|
24529
24541
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabPanel());
|
|
24530
24542
|
DesignSystem.tagFor(TabPanel);
|
|
@@ -27558,9 +27570,195 @@
|
|
|
27558
27570
|
});
|
|
27559
27571
|
}
|
|
27560
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
|
+
|
|
27561
27759
|
// prettier-ignore
|
|
27562
|
-
const template$
|
|
27563
|
-
<template role="cell">
|
|
27760
|
+
const template$b = html `
|
|
27761
|
+
<template role="cell" style="--ni-private-table-cell-nesting-level: ${x => x.nestingLevel}">
|
|
27564
27762
|
${x => x.cellViewTemplate}
|
|
27565
27763
|
${when(x => x.hasActionMenu, html `
|
|
27566
27764
|
<${menuButtonTag} ${ref('actionMenuButton')}
|
|
@@ -27634,6 +27832,11 @@
|
|
|
27634
27832
|
* The minimum size in pixels according to the design doc
|
|
27635
27833
|
*/
|
|
27636
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;
|
|
27637
27840
|
/**
|
|
27638
27841
|
* @internal
|
|
27639
27842
|
*
|
|
@@ -27667,6 +27870,11 @@
|
|
|
27667
27870
|
internalPixelWidthChanged() {
|
|
27668
27871
|
this.currentPixelWidth = this.internalPixelWidth;
|
|
27669
27872
|
}
|
|
27873
|
+
groupHeaderViewTagChanged() {
|
|
27874
|
+
this.internalGroupHeaderViewTemplate = this.groupHeaderViewTag
|
|
27875
|
+
? createGroupHeaderViewTemplate(this.groupHeaderViewTag)
|
|
27876
|
+
: undefined;
|
|
27877
|
+
}
|
|
27670
27878
|
}
|
|
27671
27879
|
__decorate$1([
|
|
27672
27880
|
attr({ attribute: 'column-id' })
|
|
@@ -27701,6 +27909,18 @@
|
|
|
27701
27909
|
__decorate$1([
|
|
27702
27910
|
observable
|
|
27703
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);
|
|
27704
27924
|
__decorate$1([
|
|
27705
27925
|
observable
|
|
27706
27926
|
], TableColumn.prototype, "cellViewTag", void 0);
|
|
@@ -27732,6 +27952,7 @@
|
|
|
27732
27952
|
this.duplicateColumnId = false;
|
|
27733
27953
|
this.missingColumnId = false;
|
|
27734
27954
|
this.duplicateSortIndex = false;
|
|
27955
|
+
this.duplicateGroupIndex = false;
|
|
27735
27956
|
}
|
|
27736
27957
|
getValidity() {
|
|
27737
27958
|
return {
|
|
@@ -27740,7 +27961,8 @@
|
|
|
27740
27961
|
invalidRecordId: this.invalidRecordId,
|
|
27741
27962
|
duplicateColumnId: this.duplicateColumnId,
|
|
27742
27963
|
missingColumnId: this.missingColumnId,
|
|
27743
|
-
duplicateSortIndex: this.duplicateSortIndex
|
|
27964
|
+
duplicateSortIndex: this.duplicateSortIndex,
|
|
27965
|
+
duplicateGroupIndex: this.duplicateGroupIndex
|
|
27744
27966
|
};
|
|
27745
27967
|
}
|
|
27746
27968
|
isValid() {
|
|
@@ -27795,19 +28017,20 @@
|
|
|
27795
28017
|
return !this.missingColumnId && !this.duplicateColumnId;
|
|
27796
28018
|
}
|
|
27797
28019
|
validateColumnSortIndices(sortIndices) {
|
|
27798
|
-
this.duplicateSortIndex =
|
|
27799
|
-
const sortIndexSet = new Set();
|
|
27800
|
-
for (const sortIndex of sortIndices) {
|
|
27801
|
-
if (sortIndexSet.has(sortIndex)) {
|
|
27802
|
-
this.duplicateSortIndex = true;
|
|
27803
|
-
}
|
|
27804
|
-
sortIndexSet.add(sortIndex);
|
|
27805
|
-
}
|
|
28020
|
+
this.duplicateSortIndex = !this.validateIndicesAreUnique(sortIndices);
|
|
27806
28021
|
return !this.duplicateSortIndex;
|
|
27807
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
|
+
}
|
|
27808
28031
|
}
|
|
27809
28032
|
|
|
27810
|
-
const styles$
|
|
28033
|
+
const styles$g = css `
|
|
27811
28034
|
${display('flex')}
|
|
27812
28035
|
|
|
27813
28036
|
:host {
|
|
@@ -27903,7 +28126,7 @@
|
|
|
27903
28126
|
}
|
|
27904
28127
|
`));
|
|
27905
28128
|
|
|
27906
|
-
const styles$
|
|
28129
|
+
const styles$f = css `
|
|
27907
28130
|
${display('flex')}
|
|
27908
28131
|
|
|
27909
28132
|
:host {
|
|
@@ -27922,7 +28145,7 @@
|
|
|
27922
28145
|
`;
|
|
27923
28146
|
|
|
27924
28147
|
// prettier-ignore
|
|
27925
|
-
const template$
|
|
28148
|
+
const template$a = html `
|
|
27926
28149
|
<template role="columnheader" aria-sort="${x => x.ariaSort}">
|
|
27927
28150
|
<slot></slot>
|
|
27928
28151
|
|
|
@@ -27972,13 +28195,13 @@
|
|
|
27972
28195
|
], TableHeader.prototype, "firstSortedColumn", void 0);
|
|
27973
28196
|
const nimbleTableHeader = TableHeader.compose({
|
|
27974
28197
|
baseName: 'table-header',
|
|
27975
|
-
template: template$
|
|
27976
|
-
styles: styles$
|
|
28198
|
+
template: template$a,
|
|
28199
|
+
styles: styles$f
|
|
27977
28200
|
});
|
|
27978
28201
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableHeader());
|
|
27979
28202
|
const tableHeaderTag = DesignSystem.tagFor(TableHeader);
|
|
27980
28203
|
|
|
27981
|
-
const styles$
|
|
28204
|
+
const styles$e = css `
|
|
27982
28205
|
${display('grid')}
|
|
27983
28206
|
|
|
27984
28207
|
:host {
|
|
@@ -28004,11 +28227,19 @@
|
|
|
28004
28227
|
}
|
|
28005
28228
|
`;
|
|
28006
28229
|
|
|
28007
|
-
const styles$
|
|
28230
|
+
const styles$d = css `
|
|
28008
28231
|
${display('grid')}
|
|
28009
28232
|
|
|
28010
28233
|
:host {
|
|
28234
|
+
--ni-private-table-cell-nesting-level: 0;
|
|
28011
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
|
+
);
|
|
28012
28243
|
align-self: center;
|
|
28013
28244
|
height: 100%;
|
|
28014
28245
|
grid-template-columns: 1fr auto;
|
|
@@ -28036,6 +28267,7 @@
|
|
|
28036
28267
|
super(...arguments);
|
|
28037
28268
|
this.hasActionMenu = false;
|
|
28038
28269
|
this.menuOpen = false;
|
|
28270
|
+
this.nestingLevel = 0;
|
|
28039
28271
|
}
|
|
28040
28272
|
onActionMenuBeforeToggle(event) {
|
|
28041
28273
|
this.$emit('cell-action-menu-beforetoggle', event.detail);
|
|
@@ -28060,16 +28292,19 @@
|
|
|
28060
28292
|
__decorate$1([
|
|
28061
28293
|
observable
|
|
28062
28294
|
], TableCell.prototype, "cellViewTemplate", void 0);
|
|
28295
|
+
__decorate$1([
|
|
28296
|
+
observable
|
|
28297
|
+
], TableCell.prototype, "nestingLevel", void 0);
|
|
28063
28298
|
const nimbleTableCell = TableCell.compose({
|
|
28064
28299
|
baseName: 'table-cell',
|
|
28065
|
-
template: template$
|
|
28066
|
-
styles: styles$
|
|
28300
|
+
template: template$b,
|
|
28301
|
+
styles: styles$d
|
|
28067
28302
|
});
|
|
28068
28303
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableCell());
|
|
28069
28304
|
const tableCellTag = DesignSystem.tagFor(TableCell);
|
|
28070
28305
|
|
|
28071
28306
|
// prettier-ignore
|
|
28072
|
-
const template$
|
|
28307
|
+
const template$9 = html `
|
|
28073
28308
|
<template role="row">
|
|
28074
28309
|
${repeat(x => x.columnStates, html `
|
|
28075
28310
|
${when(x => !x.column.columnHidden, html `
|
|
@@ -28081,6 +28316,7 @@
|
|
|
28081
28316
|
action-menu-label="${x => x.column.actionMenuLabel}"
|
|
28082
28317
|
@cell-action-menu-beforetoggle="${(x, c) => c.parent.onCellActionMenuBeforeToggle(c.event, x.column)}"
|
|
28083
28318
|
@cell-action-menu-toggle="${(x, c) => c.parent.onCellActionMenuToggle(c.event, x.column)}"
|
|
28319
|
+
:nestingLevel="${x => x.cellIndentLevel};"
|
|
28084
28320
|
>
|
|
28085
28321
|
|
|
28086
28322
|
${when((x, c) => (c.parent.currentActionMenuColumn === x.column) && x.column.actionMenuSlot, html `
|
|
@@ -28103,17 +28339,18 @@
|
|
|
28103
28339
|
constructor() {
|
|
28104
28340
|
super(...arguments);
|
|
28105
28341
|
this.columns = [];
|
|
28342
|
+
this.nestingLevel = 0;
|
|
28106
28343
|
this.menuOpen = false;
|
|
28107
28344
|
}
|
|
28108
28345
|
get columnStates() {
|
|
28109
|
-
return this.columns.map(column => {
|
|
28346
|
+
return this.columns.map((column, i) => {
|
|
28110
28347
|
const fieldNames = column.dataRecordFieldNames;
|
|
28111
28348
|
let cellState;
|
|
28112
28349
|
if (this.hasValidFieldNames(fieldNames) && this.dataRecord) {
|
|
28113
28350
|
const cellDataValues = fieldNames.map(field => this.dataRecord[field]);
|
|
28114
|
-
const cellRecord = Object.fromEntries(column.cellRecordFieldNames.map((k,
|
|
28351
|
+
const cellRecord = Object.fromEntries(column.cellRecordFieldNames.map((k, j) => [
|
|
28115
28352
|
k,
|
|
28116
|
-
cellDataValues[
|
|
28353
|
+
cellDataValues[j]
|
|
28117
28354
|
]));
|
|
28118
28355
|
const columnConfig = column.columnConfig ?? {};
|
|
28119
28356
|
cellState = {
|
|
@@ -28122,9 +28359,13 @@
|
|
|
28122
28359
|
};
|
|
28123
28360
|
}
|
|
28124
28361
|
else {
|
|
28125
|
-
cellState = {
|
|
28362
|
+
cellState = {
|
|
28363
|
+
cellRecord: {},
|
|
28364
|
+
columnConfig: {}
|
|
28365
|
+
};
|
|
28126
28366
|
}
|
|
28127
|
-
|
|
28367
|
+
const cellIndentLevel = i === 0 ? this.nestingLevel : 0;
|
|
28368
|
+
return { column, cellState, cellIndentLevel };
|
|
28128
28369
|
});
|
|
28129
28370
|
}
|
|
28130
28371
|
onCellActionMenuBeforeToggle(event, column) {
|
|
@@ -28168,6 +28409,9 @@
|
|
|
28168
28409
|
__decorate$1([
|
|
28169
28410
|
observable
|
|
28170
28411
|
], TableRow.prototype, "currentActionMenuColumn", void 0);
|
|
28412
|
+
__decorate$1([
|
|
28413
|
+
observable
|
|
28414
|
+
], TableRow.prototype, "nestingLevel", void 0);
|
|
28171
28415
|
__decorate$1([
|
|
28172
28416
|
attr({ attribute: 'menu-open', mode: 'boolean' })
|
|
28173
28417
|
], TableRow.prototype, "menuOpen", void 0);
|
|
@@ -28176,14 +28420,150 @@
|
|
|
28176
28420
|
], TableRow.prototype, "columnStates", null);
|
|
28177
28421
|
const nimbleTableRow = TableRow.compose({
|
|
28178
28422
|
baseName: 'table-row',
|
|
28179
|
-
template: template$
|
|
28180
|
-
styles: styles$
|
|
28423
|
+
template: template$9,
|
|
28424
|
+
styles: styles$e
|
|
28181
28425
|
});
|
|
28182
28426
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableRow());
|
|
28183
28427
|
const tableRowTag = DesignSystem.tagFor(TableRow);
|
|
28184
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 */
|
|
28185
28491
|
// prettier-ignore
|
|
28186
|
-
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 `
|
|
28187
28567
|
<template role="table" ${children$1({ property: 'childItems', filter: elements() })}>
|
|
28188
28568
|
<div class="table-container" style="
|
|
28189
28569
|
--ni-private-table-scroll-x: -${x => x.scrollX}px;
|
|
@@ -28214,23 +28594,38 @@
|
|
|
28214
28594
|
role="rowgroup">
|
|
28215
28595
|
${when(x => x.columns.length > 0 && x.canRenderRows, html `
|
|
28216
28596
|
${repeat(x => x.virtualizer.visibleItems, html `
|
|
28217
|
-
|
|
28218
|
-
|
|
28219
|
-
|
|
28220
|
-
|
|
28221
|
-
|
|
28222
|
-
|
|
28223
|
-
|
|
28224
|
-
|
|
28225
|
-
|
|
28226
|
-
|
|
28227
|
-
|
|
28228
|
-
|
|
28229
|
-
|
|
28230
|
-
|
|
28231
|
-
|
|
28232
|
-
|
|
28233
|
-
|
|
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
|
+
`)}
|
|
28234
28629
|
`)}
|
|
28235
28630
|
`)}
|
|
28236
28631
|
</div>
|
|
@@ -28889,12 +29284,13 @@
|
|
|
28889
29284
|
* @internal
|
|
28890
29285
|
*/
|
|
28891
29286
|
class Virtualizer {
|
|
28892
|
-
constructor(table) {
|
|
29287
|
+
constructor(table, tanStackTable) {
|
|
28893
29288
|
this.visibleItems = [];
|
|
28894
29289
|
this.allRowsHeight = 0;
|
|
28895
29290
|
this.headerContainerMarginRight = 0;
|
|
28896
29291
|
this.rowContainerYOffset = 0;
|
|
28897
29292
|
this.table = table;
|
|
29293
|
+
this.tanStackTable = tanStackTable;
|
|
28898
29294
|
this.viewportResizeObserver = new ResizeObserver(entries => {
|
|
28899
29295
|
const borderBoxSize = entries[0]?.borderBoxSize[0];
|
|
28900
29296
|
if (borderBoxSize) {
|
|
@@ -28932,7 +29328,7 @@
|
|
|
28932
29328
|
const rowHeight = parseFloat(controlHeight.getValueFor(this.table))
|
|
28933
29329
|
+ 2 * parseFloat(borderWidth.getValueFor(this.table));
|
|
28934
29330
|
return {
|
|
28935
|
-
count: this.
|
|
29331
|
+
count: this.tanStackTable.getRowModel().rows.length,
|
|
28936
29332
|
getScrollElement: () => {
|
|
28937
29333
|
return this.table.viewport;
|
|
28938
29334
|
},
|
|
@@ -29045,6 +29441,7 @@
|
|
|
29045
29441
|
constructor(table) {
|
|
29046
29442
|
this.requiredUpdates = {
|
|
29047
29443
|
rowIds: false,
|
|
29444
|
+
groupRows: false,
|
|
29048
29445
|
columnIds: false,
|
|
29049
29446
|
columnSort: false,
|
|
29050
29447
|
columnWidths: false,
|
|
@@ -29057,6 +29454,9 @@
|
|
|
29057
29454
|
get updateRowIds() {
|
|
29058
29455
|
return this.requiredUpdates.rowIds;
|
|
29059
29456
|
}
|
|
29457
|
+
get updateGroupRows() {
|
|
29458
|
+
return this.requiredUpdates.groupRows;
|
|
29459
|
+
}
|
|
29060
29460
|
get updateColumnIds() {
|
|
29061
29461
|
return this.requiredUpdates.columnIds;
|
|
29062
29462
|
}
|
|
@@ -29075,7 +29475,8 @@
|
|
|
29075
29475
|
get requiresTanStackUpdate() {
|
|
29076
29476
|
return (this.requiredUpdates.rowIds
|
|
29077
29477
|
|| this.requiredUpdates.columnSort
|
|
29078
|
-
|| this.requiredUpdates.columnDefinition
|
|
29478
|
+
|| this.requiredUpdates.columnDefinition
|
|
29479
|
+
|| this.requiredUpdates.groupRows);
|
|
29079
29480
|
}
|
|
29080
29481
|
get requiresTanStackDataReset() {
|
|
29081
29482
|
return (this.requiredUpdates.rowIds || this.requiredUpdates.columnDefinition);
|
|
@@ -29100,6 +29501,9 @@
|
|
|
29100
29501
|
else if (isColumnProperty(changedColumnProperty, 'actionMenuSlot')) {
|
|
29101
29502
|
this.requiredUpdates.actionMenuSlots = true;
|
|
29102
29503
|
}
|
|
29504
|
+
else if (isColumnProperty(changedColumnProperty, 'internalGroupIndex', 'internalGroupingDisabled')) {
|
|
29505
|
+
this.requiredUpdates.groupRows = true;
|
|
29506
|
+
}
|
|
29103
29507
|
this.queueUpdate();
|
|
29104
29508
|
}
|
|
29105
29509
|
trackColumnInstancesChanged() {
|
|
@@ -29108,6 +29512,7 @@
|
|
|
29108
29512
|
this.requiredUpdates.columnSort = true;
|
|
29109
29513
|
this.requiredUpdates.columnWidths = true;
|
|
29110
29514
|
this.requiredUpdates.actionMenuSlots = true;
|
|
29515
|
+
this.requiredUpdates.groupRows = true;
|
|
29111
29516
|
this.queueUpdate();
|
|
29112
29517
|
}
|
|
29113
29518
|
trackIdFieldNameChanged() {
|
|
@@ -29195,22 +29600,54 @@
|
|
|
29195
29600
|
this.tableValidator = new TableValidator();
|
|
29196
29601
|
this.updateTracker = new UpdateTracker(this);
|
|
29197
29602
|
this.columnNotifiers = [];
|
|
29603
|
+
this.collapsedRows = new Set();
|
|
29198
29604
|
this.onViewPortScroll = (event) => {
|
|
29199
29605
|
this.scrollX = event.target.scrollLeft;
|
|
29200
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
|
+
};
|
|
29201
29630
|
this.options = {
|
|
29202
29631
|
data: [],
|
|
29203
29632
|
onStateChange: (_) => { },
|
|
29633
|
+
onExpandedChange: this.handleExpandedChange,
|
|
29204
29634
|
getCoreRowModel: getCoreRowModel(),
|
|
29205
29635
|
getSortedRowModel: getSortedRowModel(),
|
|
29636
|
+
getGroupedRowModel: getGroupedRowModel(),
|
|
29637
|
+
getExpandedRowModel: getExpandedRowModel(),
|
|
29638
|
+
getIsRowExpanded: this.getIsRowExpanded,
|
|
29206
29639
|
columns: [],
|
|
29207
|
-
state: {
|
|
29640
|
+
state: {
|
|
29641
|
+
grouping: [],
|
|
29642
|
+
expanded: true // Workaround until we can apply a fix to TanStack regarding leveraging our getIsRowExpanded implementation
|
|
29643
|
+
},
|
|
29208
29644
|
enableSorting: true,
|
|
29645
|
+
enableGrouping: true,
|
|
29209
29646
|
renderFallbackValue: null,
|
|
29210
29647
|
autoResetAll: false
|
|
29211
29648
|
};
|
|
29212
29649
|
this.table = createTable(this.options);
|
|
29213
|
-
this.virtualizer = new Virtualizer(this);
|
|
29650
|
+
this.virtualizer = new Virtualizer(this, this.table);
|
|
29214
29651
|
}
|
|
29215
29652
|
get validity() {
|
|
29216
29653
|
return this.tableValidator.getValidity();
|
|
@@ -29258,6 +29695,10 @@
|
|
|
29258
29695
|
this.openActionMenuRecordId = undefined;
|
|
29259
29696
|
}
|
|
29260
29697
|
}
|
|
29698
|
+
handleGroupRowExpanded(rowIndex, event) {
|
|
29699
|
+
this.toggleGroupExpanded(rowIndex);
|
|
29700
|
+
event.stopPropagation();
|
|
29701
|
+
}
|
|
29261
29702
|
/**
|
|
29262
29703
|
* @internal
|
|
29263
29704
|
*/
|
|
@@ -29304,6 +29745,10 @@
|
|
|
29304
29745
|
return this.columns.filter(x => x.sortDirection !== TableColumnSortDirection.none
|
|
29305
29746
|
&& typeof x.sortIndex === 'number');
|
|
29306
29747
|
}
|
|
29748
|
+
getColumnsParticipatingInGrouping() {
|
|
29749
|
+
return this.columns.filter(x => !x.internalGroupingDisabled
|
|
29750
|
+
&& typeof x.internalGroupIndex === 'number');
|
|
29751
|
+
}
|
|
29307
29752
|
childItemsChanged() {
|
|
29308
29753
|
void this.updateColumnsFromChildItems();
|
|
29309
29754
|
}
|
|
@@ -29331,6 +29776,11 @@
|
|
|
29331
29776
|
// Perform a shallow copy of the data to trigger tanstack to regenerate the row models and columns.
|
|
29332
29777
|
updatedOptions.data = [...this.table.options.data];
|
|
29333
29778
|
}
|
|
29779
|
+
if (this.updateTracker.updateGroupRows) {
|
|
29780
|
+
updatedOptions.state.grouping = this.calculateTanStackGroupingState();
|
|
29781
|
+
updatedOptions.state.expanded = true;
|
|
29782
|
+
this.collapsedRows.clear();
|
|
29783
|
+
}
|
|
29334
29784
|
this.updateTableOptions(updatedOptions);
|
|
29335
29785
|
}
|
|
29336
29786
|
updateActionMenuSlots() {
|
|
@@ -29348,6 +29798,7 @@
|
|
|
29348
29798
|
validate() {
|
|
29349
29799
|
this.tableValidator.validateColumnIds(this.columns.map(x => x.columnId));
|
|
29350
29800
|
this.tableValidator.validateColumnSortIndices(this.getColumnsParticipatingInSorting().map(x => x.sortIndex));
|
|
29801
|
+
this.tableValidator.validateColumnGroupIndices(this.getColumnsParticipatingInGrouping().map(x => x.internalGroupIndex));
|
|
29351
29802
|
this.validateWithData(this.table.options.data);
|
|
29352
29803
|
}
|
|
29353
29804
|
validateWithData(data) {
|
|
@@ -29368,12 +29819,30 @@
|
|
|
29368
29819
|
this.tableData = rows.map(row => {
|
|
29369
29820
|
const rowState = {
|
|
29370
29821
|
record: row.original,
|
|
29371
|
-
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)
|
|
29372
29834
|
};
|
|
29373
29835
|
return rowState;
|
|
29374
29836
|
});
|
|
29375
29837
|
this.virtualizer.dataChanged();
|
|
29376
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
|
+
}
|
|
29377
29846
|
updateTableOptions(updatedOptions) {
|
|
29378
29847
|
this.options = {
|
|
29379
29848
|
...this.options,
|
|
@@ -29383,6 +29852,18 @@
|
|
|
29383
29852
|
this.table.setOptions(this.options);
|
|
29384
29853
|
this.refreshRows();
|
|
29385
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
|
+
}
|
|
29386
29867
|
calculateTanStackSortState() {
|
|
29387
29868
|
const sortedColumns = this.getColumnsParticipatingInSorting().sort((x, y) => x.sortIndex - y.sortIndex);
|
|
29388
29869
|
this.firstSortedColumn = sortedColumns.length
|
|
@@ -29395,6 +29876,10 @@
|
|
|
29395
29876
|
};
|
|
29396
29877
|
});
|
|
29397
29878
|
}
|
|
29879
|
+
calculateTanStackGroupingState() {
|
|
29880
|
+
const groupedColumns = this.getColumnsParticipatingInGrouping().sort((x, y) => x.internalGroupIndex - y.internalGroupIndex);
|
|
29881
|
+
return groupedColumns.map(column => column.internalUniqueId);
|
|
29882
|
+
}
|
|
29398
29883
|
calculateTanStackRowIdFunction() {
|
|
29399
29884
|
return this.idFieldName === null || this.idFieldName === undefined
|
|
29400
29885
|
? undefined
|
|
@@ -29451,13 +29936,13 @@
|
|
|
29451
29936
|
], Table.prototype, "firstSortedColumn", void 0);
|
|
29452
29937
|
const nimbleTable = Table.compose({
|
|
29453
29938
|
baseName: 'table',
|
|
29454
|
-
template: template$
|
|
29455
|
-
styles: styles$
|
|
29939
|
+
template: template$7,
|
|
29940
|
+
styles: styles$g
|
|
29456
29941
|
});
|
|
29457
29942
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTable());
|
|
29458
29943
|
DesignSystem.tagFor(Table);
|
|
29459
29944
|
|
|
29460
|
-
const styles$
|
|
29945
|
+
const styles$b = css `
|
|
29461
29946
|
:host {
|
|
29462
29947
|
display: contents;
|
|
29463
29948
|
}
|
|
@@ -29469,7 +29954,7 @@
|
|
|
29469
29954
|
}
|
|
29470
29955
|
`;
|
|
29471
29956
|
|
|
29472
|
-
const template$
|
|
29957
|
+
const template$6 = html `
|
|
29473
29958
|
<template>
|
|
29474
29959
|
<span class="header-content">
|
|
29475
29960
|
<slot></slot>
|
|
@@ -29516,6 +30001,123 @@
|
|
|
29516
30001
|
return FractionalWidthColumn;
|
|
29517
30002
|
}
|
|
29518
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
|
+
|
|
29519
30121
|
const styles$9 = css `
|
|
29520
30122
|
span {
|
|
29521
30123
|
font: ${bodyFont};
|
|
@@ -29602,12 +30204,16 @@
|
|
|
29602
30204
|
/**
|
|
29603
30205
|
* The table column for displaying strings.
|
|
29604
30206
|
*/
|
|
29605
|
-
class TableColumnText extends mixinFractionalWidthColumnAPI(TableColumnTextBase) {
|
|
30207
|
+
class TableColumnText extends mixinGroupableColumnAPI(mixinFractionalWidthColumnAPI(TableColumnTextBase)) {
|
|
30208
|
+
constructor() {
|
|
30209
|
+
super(...arguments);
|
|
30210
|
+
this.groupHeaderViewTag = tableColumnTextGroupHeaderTag;
|
|
30211
|
+
}
|
|
29606
30212
|
}
|
|
29607
30213
|
const nimbleTableColumnText = TableColumnText.compose({
|
|
29608
30214
|
baseName: 'table-column-text',
|
|
29609
|
-
template: template$
|
|
29610
|
-
styles: styles$
|
|
30215
|
+
template: template$6,
|
|
30216
|
+
styles: styles$b
|
|
29611
30217
|
});
|
|
29612
30218
|
DesignSystem.getOrCreate()
|
|
29613
30219
|
.withPrefix('nimble')
|
|
@@ -29705,7 +30311,7 @@
|
|
|
29705
30311
|
|
|
29706
30312
|
const styles$6 = css `
|
|
29707
30313
|
${display('inline-flex')}
|
|
29708
|
-
${styles$
|
|
30314
|
+
${styles$v}
|
|
29709
30315
|
|
|
29710
30316
|
:host {
|
|
29711
30317
|
font: ${bodyFont};
|
|
@@ -30051,7 +30657,7 @@
|
|
|
30051
30657
|
|
|
30052
30658
|
const styles$5 = css `
|
|
30053
30659
|
${display('inline-block')}
|
|
30054
|
-
${styles$
|
|
30660
|
+
${styles$v}
|
|
30055
30661
|
|
|
30056
30662
|
:host {
|
|
30057
30663
|
font: ${bodyFont};
|
|
@@ -30707,7 +31313,7 @@
|
|
|
30707
31313
|
.expand-collapse-button svg {
|
|
30708
31314
|
width: ${iconSize};
|
|
30709
31315
|
height: ${iconSize};
|
|
30710
|
-
transition: transform
|
|
31316
|
+
transition: transform ${mediumDelay} ease-in;
|
|
30711
31317
|
pointer-events: none;
|
|
30712
31318
|
fill: currentcolor;
|
|
30713
31319
|
}
|