@ni/nimble-components 20.1.11 → 20.1.13
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 +914 -270
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +2107 -2003
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/all-components.d.ts +4 -0
- package/dist/esm/all-components.js +4 -0
- package/dist/esm/all-components.js.map +1 -1
- package/dist/esm/mapping/icon/index.d.ts +25 -0
- package/dist/esm/mapping/icon/index.js +67 -0
- package/dist/esm/mapping/icon/index.js.map +1 -0
- package/dist/esm/mapping/spinner/index.d.ts +14 -0
- package/dist/esm/mapping/spinner/index.js +17 -0
- package/dist/esm/mapping/spinner/index.js.map +1 -0
- package/dist/esm/spinner/styles.js +4 -2
- package/dist/esm/spinner/styles.js.map +1 -1
- package/dist/esm/src/all-components.d.ts +4 -0
- package/dist/esm/src/mapping/icon/index.d.ts +25 -0
- package/dist/esm/src/mapping/spinner/index.d.ts +14 -0
- package/dist/esm/src/table/testing/table.pageobject.d.ts +3 -0
- package/dist/esm/src/table-column/enum-base/index.d.ts +0 -1
- package/dist/esm/src/table-column/enum-base/models/mapping-config.d.ts +2 -2
- package/dist/esm/src/table-column/enum-base/models/mapping-icon-config.d.ts +15 -0
- package/dist/esm/src/table-column/enum-base/models/mapping-spinner-config.d.ts +7 -0
- package/dist/esm/src/table-column/enum-text/models/table-column-enum-text-validator.d.ts +1 -2
- package/dist/esm/src/table-column/icon/cell-view/index.d.ts +23 -0
- package/dist/esm/src/table-column/icon/cell-view/template.d.ts +2 -0
- package/dist/esm/src/table-column/icon/group-header-view/index.d.ts +23 -0
- package/dist/esm/src/table-column/icon/group-header-view/styles.d.ts +1 -0
- package/dist/esm/src/table-column/icon/group-header-view/template.d.ts +2 -0
- package/dist/esm/src/table-column/icon/index.d.ts +43 -0
- package/dist/esm/src/table-column/icon/models/table-column-icon-validator.d.ts +14 -0
- package/dist/esm/table/testing/table.pageobject.d.ts +3 -0
- package/dist/esm/table/testing/table.pageobject.js +17 -0
- package/dist/esm/table/testing/table.pageobject.js.map +1 -1
- package/dist/esm/table-column/enum-base/index.d.ts +0 -1
- package/dist/esm/table-column/enum-base/index.js +0 -1
- package/dist/esm/table-column/enum-base/index.js.map +1 -1
- package/dist/esm/table-column/enum-base/models/mapping-config.d.ts +2 -2
- package/dist/esm/table-column/enum-base/models/mapping-config.js.map +1 -1
- package/dist/esm/table-column/enum-base/models/mapping-icon-config.d.ts +15 -0
- package/dist/esm/table-column/enum-base/models/mapping-icon-config.js +21 -0
- package/dist/esm/table-column/enum-base/models/mapping-icon-config.js.map +1 -0
- package/dist/esm/table-column/enum-base/models/mapping-spinner-config.d.ts +7 -0
- package/dist/esm/table-column/enum-base/models/mapping-spinner-config.js +10 -0
- package/dist/esm/table-column/enum-base/models/mapping-spinner-config.js.map +1 -0
- package/dist/esm/table-column/enum-text/cell-view/index.js +3 -1
- package/dist/esm/table-column/enum-text/cell-view/index.js.map +1 -1
- package/dist/esm/table-column/enum-text/group-header-view/index.js +3 -1
- package/dist/esm/table-column/enum-text/group-header-view/index.js.map +1 -1
- package/dist/esm/table-column/enum-text/index.js +1 -3
- package/dist/esm/table-column/enum-text/index.js.map +1 -1
- package/dist/esm/table-column/enum-text/models/table-column-enum-text-validator.d.ts +1 -2
- package/dist/esm/table-column/enum-text/models/table-column-enum-text-validator.js +3 -2
- package/dist/esm/table-column/enum-text/models/table-column-enum-text-validator.js.map +1 -1
- package/dist/esm/table-column/icon/cell-view/index.d.ts +23 -0
- package/dist/esm/table-column/icon/cell-view/index.js +58 -0
- package/dist/esm/table-column/icon/cell-view/index.js.map +1 -0
- package/dist/esm/table-column/icon/cell-view/template.d.ts +2 -0
- package/dist/esm/table-column/icon/cell-view/template.js +13 -0
- package/dist/esm/table-column/icon/cell-view/template.js.map +1 -0
- package/dist/esm/table-column/icon/group-header-view/index.d.ts +23 -0
- package/dist/esm/table-column/icon/group-header-view/index.js +57 -0
- package/dist/esm/table-column/icon/group-header-view/index.js.map +1 -0
- package/dist/esm/table-column/icon/group-header-view/styles.d.ts +1 -0
- package/dist/esm/table-column/icon/group-header-view/styles.js +25 -0
- package/dist/esm/table-column/icon/group-header-view/styles.js.map +1 -0
- package/dist/esm/table-column/icon/group-header-view/template.d.ts +2 -0
- package/dist/esm/table-column/icon/group-header-view/template.js +24 -0
- package/dist/esm/table-column/icon/group-header-view/template.js.map +1 -0
- package/dist/esm/table-column/icon/index.d.ts +43 -0
- package/dist/esm/table-column/icon/index.js +63 -0
- package/dist/esm/table-column/icon/index.js.map +1 -0
- package/dist/esm/table-column/icon/models/table-column-icon-validator.d.ts +14 -0
- package/dist/esm/table-column/icon/models/table-column-icon-validator.js +30 -0
- package/dist/esm/table-column/icon/models/table-column-icon-validator.js.map +1 -0
- package/package.json +1 -1
|
@@ -16288,7 +16288,7 @@
|
|
|
16288
16288
|
|
|
16289
16289
|
/**
|
|
16290
16290
|
* Do not edit directly
|
|
16291
|
-
* Generated on
|
|
16291
|
+
* Generated on Mon, 21 Aug 2023 23:07:43 GMT
|
|
16292
16292
|
*/
|
|
16293
16293
|
|
|
16294
16294
|
const Information100DarkUi = "#a46eff";
|
|
@@ -16671,9 +16671,9 @@
|
|
|
16671
16671
|
return `${prefix}${uniqueIdCounter++}`;
|
|
16672
16672
|
}
|
|
16673
16673
|
|
|
16674
|
-
const template$
|
|
16674
|
+
const template$A = html `<slot></slot>`;
|
|
16675
16675
|
|
|
16676
|
-
const styles$
|
|
16676
|
+
const styles$T = css `
|
|
16677
16677
|
:host {
|
|
16678
16678
|
display: contents;
|
|
16679
16679
|
}
|
|
@@ -16729,8 +16729,8 @@
|
|
|
16729
16729
|
], ThemeProvider.prototype, "theme", void 0);
|
|
16730
16730
|
const nimbleDesignSystemProvider = ThemeProvider.compose({
|
|
16731
16731
|
baseName: 'theme-provider',
|
|
16732
|
-
styles: styles$
|
|
16733
|
-
template: template$
|
|
16732
|
+
styles: styles$T,
|
|
16733
|
+
template: template$A
|
|
16734
16734
|
});
|
|
16735
16735
|
DesignSystem.getOrCreate()
|
|
16736
16736
|
.withPrefix('nimble')
|
|
@@ -16923,7 +16923,7 @@
|
|
|
16923
16923
|
}
|
|
16924
16924
|
}
|
|
16925
16925
|
|
|
16926
|
-
const styles$
|
|
16926
|
+
const styles$S = css `
|
|
16927
16927
|
${display('inline')}
|
|
16928
16928
|
|
|
16929
16929
|
:host {
|
|
@@ -17006,7 +17006,7 @@
|
|
|
17006
17006
|
`;
|
|
17007
17007
|
|
|
17008
17008
|
// prettier-ignore
|
|
17009
|
-
const template$
|
|
17009
|
+
const template$z = (context, definition) => html `
|
|
17010
17010
|
<a
|
|
17011
17011
|
class="control"
|
|
17012
17012
|
part="control"
|
|
@@ -17080,8 +17080,8 @@
|
|
|
17080
17080
|
const nimbleAnchor = Anchor.compose({
|
|
17081
17081
|
baseName: 'anchor',
|
|
17082
17082
|
baseClass: Anchor$1,
|
|
17083
|
-
template: template$
|
|
17084
|
-
styles: styles$
|
|
17083
|
+
template: template$z,
|
|
17084
|
+
styles: styles$S,
|
|
17085
17085
|
shadowOptions: {
|
|
17086
17086
|
delegatesFocus: true
|
|
17087
17087
|
}
|
|
@@ -17167,7 +17167,7 @@
|
|
|
17167
17167
|
return new MultivaluePropertyStyleSheetBehavior('appearance', value, styles);
|
|
17168
17168
|
}
|
|
17169
17169
|
|
|
17170
|
-
const styles$
|
|
17170
|
+
const styles$R = css `
|
|
17171
17171
|
@layer base, hover, focusVisible, active, disabled, top;
|
|
17172
17172
|
|
|
17173
17173
|
@layer base {
|
|
@@ -17459,8 +17459,8 @@
|
|
|
17459
17459
|
}
|
|
17460
17460
|
`));
|
|
17461
17461
|
|
|
17462
|
-
const styles$
|
|
17463
|
-
${styles$
|
|
17462
|
+
const styles$Q = css `
|
|
17463
|
+
${styles$R}
|
|
17464
17464
|
${buttonAppearanceVariantStyles}
|
|
17465
17465
|
|
|
17466
17466
|
.control {
|
|
@@ -17468,7 +17468,7 @@
|
|
|
17468
17468
|
}
|
|
17469
17469
|
`;
|
|
17470
17470
|
|
|
17471
|
-
const template$
|
|
17471
|
+
const template$y = (context, definition) => html `
|
|
17472
17472
|
<a
|
|
17473
17473
|
class="control"
|
|
17474
17474
|
part="control"
|
|
@@ -17550,8 +17550,8 @@
|
|
|
17550
17550
|
], AnchorButton.prototype, "disabled", void 0);
|
|
17551
17551
|
const nimbleAnchorButton = AnchorButton.compose({
|
|
17552
17552
|
baseName: 'anchor-button',
|
|
17553
|
-
template: template$
|
|
17554
|
-
styles: styles$
|
|
17553
|
+
template: template$y,
|
|
17554
|
+
styles: styles$Q,
|
|
17555
17555
|
shadowOptions: {
|
|
17556
17556
|
delegatesFocus: true
|
|
17557
17557
|
}
|
|
@@ -17559,7 +17559,7 @@
|
|
|
17559
17559
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorButton());
|
|
17560
17560
|
DesignSystem.tagFor(AnchorButton);
|
|
17561
17561
|
|
|
17562
|
-
const styles$
|
|
17562
|
+
const styles$P = css `
|
|
17563
17563
|
${display('grid')}
|
|
17564
17564
|
|
|
17565
17565
|
:host {
|
|
@@ -17636,7 +17636,7 @@
|
|
|
17636
17636
|
}
|
|
17637
17637
|
`;
|
|
17638
17638
|
|
|
17639
|
-
const template$
|
|
17639
|
+
const template$x = (context, definition) => html `
|
|
17640
17640
|
<template
|
|
17641
17641
|
role="menuitem"
|
|
17642
17642
|
class="${x => (typeof x.startColumnCount === 'number'
|
|
@@ -17742,8 +17742,8 @@
|
|
|
17742
17742
|
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
17743
17743
|
const nimbleAnchorMenuItem = AnchorMenuItem.compose({
|
|
17744
17744
|
baseName: 'anchor-menu-item',
|
|
17745
|
-
template: template$
|
|
17746
|
-
styles: styles$
|
|
17745
|
+
template: template$x,
|
|
17746
|
+
styles: styles$P,
|
|
17747
17747
|
shadowOptions: {
|
|
17748
17748
|
delegatesFocus: true
|
|
17749
17749
|
}
|
|
@@ -17767,7 +17767,7 @@
|
|
|
17767
17767
|
}
|
|
17768
17768
|
});
|
|
17769
17769
|
|
|
17770
|
-
const styles$
|
|
17770
|
+
const styles$O = css `
|
|
17771
17771
|
${display('inline-flex')}
|
|
17772
17772
|
|
|
17773
17773
|
:host {
|
|
@@ -17883,7 +17883,7 @@
|
|
|
17883
17883
|
}
|
|
17884
17884
|
`;
|
|
17885
17885
|
|
|
17886
|
-
const template$
|
|
17886
|
+
const template$w = (context, definition) => html `
|
|
17887
17887
|
<template slot="anchortab" role="tab" aria-disabled="${x => x.disabled}">
|
|
17888
17888
|
<a
|
|
17889
17889
|
download="${x => x.download}"
|
|
@@ -17935,8 +17935,8 @@
|
|
|
17935
17935
|
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
17936
17936
|
const nimbleAnchorTab = AnchorTab.compose({
|
|
17937
17937
|
baseName: 'anchor-tab',
|
|
17938
|
-
template: template$
|
|
17939
|
-
styles: styles$
|
|
17938
|
+
template: template$w,
|
|
17939
|
+
styles: styles$O,
|
|
17940
17940
|
shadowOptions: {
|
|
17941
17941
|
delegatesFocus: true
|
|
17942
17942
|
}
|
|
@@ -17944,7 +17944,7 @@
|
|
|
17944
17944
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTab());
|
|
17945
17945
|
DesignSystem.tagFor(AnchorTab);
|
|
17946
17946
|
|
|
17947
|
-
const styles$
|
|
17947
|
+
const styles$N = css `
|
|
17948
17948
|
${display('grid')}
|
|
17949
17949
|
|
|
17950
17950
|
:host {
|
|
@@ -17966,7 +17966,7 @@
|
|
|
17966
17966
|
}
|
|
17967
17967
|
`;
|
|
17968
17968
|
|
|
17969
|
-
const template$
|
|
17969
|
+
const template$v = (context, definition) => html `
|
|
17970
17970
|
${startSlotTemplate(context, definition)}
|
|
17971
17971
|
<div ${ref('tablist')} class="tablist" part="tablist" role="tablist">
|
|
17972
17972
|
<slot name="anchortab" ${slotted('tabs')}></slot>
|
|
@@ -18172,8 +18172,8 @@
|
|
|
18172
18172
|
applyMixins(AnchorTabs, StartEnd);
|
|
18173
18173
|
const nimbleAnchorTabs = AnchorTabs.compose({
|
|
18174
18174
|
baseName: 'anchor-tabs',
|
|
18175
|
-
template: template$
|
|
18176
|
-
styles: styles$
|
|
18175
|
+
template: template$v,
|
|
18176
|
+
styles: styles$N,
|
|
18177
18177
|
shadowOptions: {
|
|
18178
18178
|
delegatesFocus: false
|
|
18179
18179
|
}
|
|
@@ -18190,7 +18190,7 @@
|
|
|
18190
18190
|
-webkit-user-select: none;
|
|
18191
18191
|
`;
|
|
18192
18192
|
|
|
18193
|
-
const styles$
|
|
18193
|
+
const styles$M = css `
|
|
18194
18194
|
${display('block')}
|
|
18195
18195
|
|
|
18196
18196
|
:host {
|
|
@@ -18291,7 +18291,7 @@
|
|
|
18291
18291
|
}
|
|
18292
18292
|
`;
|
|
18293
18293
|
|
|
18294
|
-
const template$
|
|
18294
|
+
const template$u = (context, definition) => html `
|
|
18295
18295
|
<template
|
|
18296
18296
|
role="treeitem"
|
|
18297
18297
|
slot="${x => (x.isNestedItem() ? 'item' : null)}"
|
|
@@ -18428,8 +18428,8 @@
|
|
|
18428
18428
|
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
18429
18429
|
const nimbleAnchorTreeItem = AnchorTreeItem.compose({
|
|
18430
18430
|
baseName: 'anchor-tree-item',
|
|
18431
|
-
template: template$
|
|
18432
|
-
styles: styles$
|
|
18431
|
+
template: template$u,
|
|
18432
|
+
styles: styles$M,
|
|
18433
18433
|
shadowOptions: {
|
|
18434
18434
|
delegatesFocus: true
|
|
18435
18435
|
}
|
|
@@ -18439,7 +18439,7 @@
|
|
|
18439
18439
|
.register(nimbleAnchorTreeItem());
|
|
18440
18440
|
DesignSystem.tagFor(AnchorTreeItem);
|
|
18441
18441
|
|
|
18442
|
-
const styles$
|
|
18442
|
+
const styles$L = css `
|
|
18443
18443
|
:host {
|
|
18444
18444
|
contain: layout;
|
|
18445
18445
|
display: block;
|
|
@@ -18463,7 +18463,7 @@
|
|
|
18463
18463
|
baseName: 'anchored-region',
|
|
18464
18464
|
baseClass: AnchoredRegion$1,
|
|
18465
18465
|
template: anchoredRegionTemplate,
|
|
18466
|
-
styles: styles$
|
|
18466
|
+
styles: styles$L
|
|
18467
18467
|
});
|
|
18468
18468
|
DesignSystem.getOrCreate()
|
|
18469
18469
|
.withPrefix('nimble')
|
|
@@ -18543,7 +18543,7 @@
|
|
|
18543
18543
|
*/
|
|
18544
18544
|
const themeBehavior = (theme, styles) => new ThemeStyleSheetBehavior(theme, styles);
|
|
18545
18545
|
|
|
18546
|
-
const styles$
|
|
18546
|
+
const styles$K = css `
|
|
18547
18547
|
${display('flex')}
|
|
18548
18548
|
|
|
18549
18549
|
:host {
|
|
@@ -18701,8 +18701,8 @@
|
|
|
18701
18701
|
}
|
|
18702
18702
|
`));
|
|
18703
18703
|
|
|
18704
|
-
const styles$
|
|
18705
|
-
${styles$
|
|
18704
|
+
const styles$J = css `
|
|
18705
|
+
${styles$R}
|
|
18706
18706
|
${buttonAppearanceVariantStyles}
|
|
18707
18707
|
`;
|
|
18708
18708
|
|
|
@@ -18748,7 +18748,7 @@
|
|
|
18748
18748
|
baseName: 'button',
|
|
18749
18749
|
baseClass: Button$1,
|
|
18750
18750
|
template: buttonTemplate,
|
|
18751
|
-
styles: styles$
|
|
18751
|
+
styles: styles$J,
|
|
18752
18752
|
shadowOptions: {
|
|
18753
18753
|
delegatesFocus: true
|
|
18754
18754
|
}
|
|
@@ -19406,13 +19406,13 @@
|
|
|
19406
19406
|
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>`
|
|
19407
19407
|
};
|
|
19408
19408
|
|
|
19409
|
-
const template$
|
|
19409
|
+
const template$t = html `
|
|
19410
19410
|
<template>
|
|
19411
19411
|
<div class="icon" :innerHTML=${x => x.icon.data}></div>
|
|
19412
19412
|
</template
|
|
19413
19413
|
`;
|
|
19414
19414
|
|
|
19415
|
-
const styles$
|
|
19415
|
+
const styles$I = css `
|
|
19416
19416
|
${display('inline-flex')}
|
|
19417
19417
|
|
|
19418
19418
|
:host {
|
|
@@ -19485,8 +19485,8 @@
|
|
|
19485
19485
|
const registerIcon = (baseName, iconClass) => {
|
|
19486
19486
|
const composedIcon = iconClass.compose({
|
|
19487
19487
|
baseName,
|
|
19488
|
-
template: template$
|
|
19489
|
-
styles: styles$
|
|
19488
|
+
template: template$t,
|
|
19489
|
+
styles: styles$I,
|
|
19490
19490
|
baseClass: iconClass
|
|
19491
19491
|
});
|
|
19492
19492
|
DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
|
|
@@ -19575,7 +19575,7 @@
|
|
|
19575
19575
|
}).withDefault(coreLabelDefaults.numericIncrementLabel);
|
|
19576
19576
|
|
|
19577
19577
|
// prettier-ignore
|
|
19578
|
-
const template$
|
|
19578
|
+
const template$s = html `
|
|
19579
19579
|
<div class="container"
|
|
19580
19580
|
role="status"
|
|
19581
19581
|
aria-atomic="${x => x.ariaAtomic}"
|
|
@@ -19691,13 +19691,13 @@
|
|
|
19691
19691
|
applyMixins(Banner, ARIAGlobalStatesAndProperties);
|
|
19692
19692
|
const nimbleBanner = Banner.compose({
|
|
19693
19693
|
baseName: 'banner',
|
|
19694
|
-
template: template$
|
|
19695
|
-
styles: styles$
|
|
19694
|
+
template: template$s,
|
|
19695
|
+
styles: styles$K
|
|
19696
19696
|
});
|
|
19697
19697
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBanner());
|
|
19698
19698
|
DesignSystem.tagFor(Banner);
|
|
19699
19699
|
|
|
19700
|
-
const styles$
|
|
19700
|
+
const styles$H = css `
|
|
19701
19701
|
${display('inline-block')}
|
|
19702
19702
|
|
|
19703
19703
|
:host {
|
|
@@ -19738,12 +19738,12 @@
|
|
|
19738
19738
|
baseName: 'breadcrumb',
|
|
19739
19739
|
baseClass: Breadcrumb$1,
|
|
19740
19740
|
template: breadcrumbTemplate,
|
|
19741
|
-
styles: styles$
|
|
19741
|
+
styles: styles$H
|
|
19742
19742
|
});
|
|
19743
19743
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
|
|
19744
19744
|
DesignSystem.tagFor(Breadcrumb);
|
|
19745
19745
|
|
|
19746
|
-
const styles$
|
|
19746
|
+
const styles$G = css `
|
|
19747
19747
|
${display('inline-flex')}
|
|
19748
19748
|
|
|
19749
19749
|
:host {
|
|
@@ -19817,7 +19817,7 @@
|
|
|
19817
19817
|
baseName: 'breadcrumb-item',
|
|
19818
19818
|
baseClass: BreadcrumbItem$1,
|
|
19819
19819
|
template: breadcrumbItemTemplate,
|
|
19820
|
-
styles: styles$
|
|
19820
|
+
styles: styles$G,
|
|
19821
19821
|
separator: forwardSlash16X16.data
|
|
19822
19822
|
});
|
|
19823
19823
|
DesignSystem.getOrCreate()
|
|
@@ -19825,7 +19825,7 @@
|
|
|
19825
19825
|
.register(nimbleBreadcrumbItem());
|
|
19826
19826
|
DesignSystem.tagFor(BreadcrumbItem);
|
|
19827
19827
|
|
|
19828
|
-
const styles$
|
|
19828
|
+
const styles$F = css `
|
|
19829
19829
|
${display('inline-flex')}
|
|
19830
19830
|
|
|
19831
19831
|
:host {
|
|
@@ -19984,7 +19984,7 @@
|
|
|
19984
19984
|
const nimbleCardButton = CardButton.compose({
|
|
19985
19985
|
baseName: 'card-button',
|
|
19986
19986
|
template: buttonTemplate,
|
|
19987
|
-
styles: styles$
|
|
19987
|
+
styles: styles$F,
|
|
19988
19988
|
shadowOptions: {
|
|
19989
19989
|
delegatesFocus: true
|
|
19990
19990
|
}
|
|
@@ -19992,7 +19992,7 @@
|
|
|
19992
19992
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCardButton());
|
|
19993
19993
|
DesignSystem.tagFor(CardButton);
|
|
19994
19994
|
|
|
19995
|
-
const styles$
|
|
19995
|
+
const styles$E = css `
|
|
19996
19996
|
${display('inline-flex')}
|
|
19997
19997
|
|
|
19998
19998
|
:host {
|
|
@@ -20110,15 +20110,15 @@
|
|
|
20110
20110
|
baseName: 'checkbox',
|
|
20111
20111
|
baseClass: Checkbox$1,
|
|
20112
20112
|
template: checkboxTemplate,
|
|
20113
|
-
styles: styles$
|
|
20113
|
+
styles: styles$E,
|
|
20114
20114
|
checkedIndicator: check16X16.data,
|
|
20115
20115
|
indeterminateIndicator: minus16X16.data
|
|
20116
20116
|
});
|
|
20117
20117
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCheckbox());
|
|
20118
20118
|
const checkboxTag = DesignSystem.tagFor(Checkbox);
|
|
20119
20119
|
|
|
20120
|
-
const styles$
|
|
20121
|
-
${styles$
|
|
20120
|
+
const styles$D = css `
|
|
20121
|
+
${styles$R}
|
|
20122
20122
|
|
|
20123
20123
|
@layer base {
|
|
20124
20124
|
.control[aria-pressed='true'] {
|
|
@@ -20197,7 +20197,7 @@
|
|
|
20197
20197
|
}
|
|
20198
20198
|
`;
|
|
20199
20199
|
|
|
20200
|
-
const template$
|
|
20200
|
+
const template$r = (context, definition) => html `
|
|
20201
20201
|
<div
|
|
20202
20202
|
role="button"
|
|
20203
20203
|
part="control"
|
|
@@ -20272,8 +20272,8 @@
|
|
|
20272
20272
|
applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
|
|
20273
20273
|
const nimbleToggleButton = ToggleButton.compose({
|
|
20274
20274
|
baseName: 'toggle-button',
|
|
20275
|
-
template: template$
|
|
20276
|
-
styles: styles$
|
|
20275
|
+
template: template$r,
|
|
20276
|
+
styles: styles$D,
|
|
20277
20277
|
shadowOptions: {
|
|
20278
20278
|
delegatesFocus: true
|
|
20279
20279
|
}
|
|
@@ -20310,7 +20310,7 @@
|
|
|
20310
20310
|
block: 'block'
|
|
20311
20311
|
};
|
|
20312
20312
|
|
|
20313
|
-
const styles$
|
|
20313
|
+
const styles$C = css `
|
|
20314
20314
|
${display('inline-flex')}
|
|
20315
20315
|
|
|
20316
20316
|
:host {
|
|
@@ -20536,7 +20536,7 @@
|
|
|
20536
20536
|
}
|
|
20537
20537
|
`));
|
|
20538
20538
|
|
|
20539
|
-
const styles$
|
|
20539
|
+
const styles$B = css `
|
|
20540
20540
|
.error-icon {
|
|
20541
20541
|
display: none;
|
|
20542
20542
|
}
|
|
@@ -20570,9 +20570,9 @@
|
|
|
20570
20570
|
}
|
|
20571
20571
|
`;
|
|
20572
20572
|
|
|
20573
|
-
const styles$
|
|
20573
|
+
const styles$A = css `
|
|
20574
|
+
${styles$C}
|
|
20574
20575
|
${styles$B}
|
|
20575
|
-
${styles$A}
|
|
20576
20576
|
|
|
20577
20577
|
:host {
|
|
20578
20578
|
--ni-private-hover-bottom-border-width: 2px;
|
|
@@ -20653,7 +20653,7 @@
|
|
|
20653
20653
|
`));
|
|
20654
20654
|
|
|
20655
20655
|
// prettier-ignore
|
|
20656
|
-
const template$
|
|
20656
|
+
const template$q = (context, definition) => html `
|
|
20657
20657
|
<template
|
|
20658
20658
|
aria-disabled="${x => x.ariaDisabled}"
|
|
20659
20659
|
autocomplete="${x => x.autocomplete}"
|
|
@@ -20924,8 +20924,8 @@
|
|
|
20924
20924
|
const nimbleCombobox = Combobox.compose({
|
|
20925
20925
|
baseName: 'combobox',
|
|
20926
20926
|
baseClass: Combobox$1,
|
|
20927
|
-
template: template$
|
|
20928
|
-
styles: styles$
|
|
20927
|
+
template: template$q,
|
|
20928
|
+
styles: styles$A,
|
|
20929
20929
|
shadowOptions: {
|
|
20930
20930
|
delegatesFocus: true
|
|
20931
20931
|
},
|
|
@@ -20970,7 +20970,7 @@
|
|
|
20970
20970
|
*/
|
|
20971
20971
|
const UserDismissed = Symbol('user dismissed');
|
|
20972
20972
|
|
|
20973
|
-
const styles$
|
|
20973
|
+
const styles$z = css `
|
|
20974
20974
|
${display('grid')}
|
|
20975
20975
|
|
|
20976
20976
|
dialog {
|
|
@@ -21086,7 +21086,7 @@
|
|
|
21086
21086
|
}
|
|
21087
21087
|
`));
|
|
21088
21088
|
|
|
21089
|
-
const template$
|
|
21089
|
+
const template$p = html `
|
|
21090
21090
|
<template>
|
|
21091
21091
|
<dialog
|
|
21092
21092
|
${ref('dialogElement')}
|
|
@@ -21212,14 +21212,14 @@
|
|
|
21212
21212
|
applyMixins(Dialog, ARIAGlobalStatesAndProperties);
|
|
21213
21213
|
const nimbleDialog = Dialog.compose({
|
|
21214
21214
|
baseName: 'dialog',
|
|
21215
|
-
template: template$
|
|
21216
|
-
styles: styles$
|
|
21215
|
+
template: template$p,
|
|
21216
|
+
styles: styles$z,
|
|
21217
21217
|
baseClass: Dialog
|
|
21218
21218
|
});
|
|
21219
21219
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDialog());
|
|
21220
21220
|
DesignSystem.tagFor(Dialog);
|
|
21221
21221
|
|
|
21222
|
-
const styles$
|
|
21222
|
+
const styles$y = css `
|
|
21223
21223
|
${display('block')}
|
|
21224
21224
|
|
|
21225
21225
|
:host {
|
|
@@ -21372,7 +21372,7 @@
|
|
|
21372
21372
|
}
|
|
21373
21373
|
`));
|
|
21374
21374
|
|
|
21375
|
-
const template$
|
|
21375
|
+
const template$o = html `
|
|
21376
21376
|
<dialog
|
|
21377
21377
|
${ref('dialog')}
|
|
21378
21378
|
aria-label="${x => x.ariaLabel}"
|
|
@@ -21486,8 +21486,8 @@
|
|
|
21486
21486
|
applyMixins(Drawer, ARIAGlobalStatesAndProperties);
|
|
21487
21487
|
const nimbleDrawer = Drawer.compose({
|
|
21488
21488
|
baseName: 'drawer',
|
|
21489
|
-
template: template$
|
|
21490
|
-
styles: styles$
|
|
21489
|
+
template: template$o,
|
|
21490
|
+
styles: styles$y
|
|
21491
21491
|
});
|
|
21492
21492
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
|
|
21493
21493
|
DesignSystem.tagFor(Drawer);
|
|
@@ -23684,7 +23684,7 @@
|
|
|
23684
23684
|
.register(nimbleLabelProviderTable());
|
|
23685
23685
|
DesignSystem.tagFor(LabelProviderTable);
|
|
23686
23686
|
|
|
23687
|
-
const styles$
|
|
23687
|
+
const styles$x = css `
|
|
23688
23688
|
${display('flex')}
|
|
23689
23689
|
|
|
23690
23690
|
:host {
|
|
@@ -23772,7 +23772,7 @@
|
|
|
23772
23772
|
baseName: 'list-option',
|
|
23773
23773
|
baseClass: ListboxOption,
|
|
23774
23774
|
template: listboxOptionTemplate,
|
|
23775
|
-
styles: styles$
|
|
23775
|
+
styles: styles$x
|
|
23776
23776
|
});
|
|
23777
23777
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleListOption());
|
|
23778
23778
|
DesignSystem.tagFor(ListOption);
|
|
@@ -23789,7 +23789,7 @@
|
|
|
23789
23789
|
attr()
|
|
23790
23790
|
], Mapping$1.prototype, "text", void 0);
|
|
23791
23791
|
|
|
23792
|
-
const template$
|
|
23792
|
+
const template$n = html `<template slot="mapping"></template>`;
|
|
23793
23793
|
|
|
23794
23794
|
/**
|
|
23795
23795
|
* Defines a mapping from one data value ('key' property) to display text ('text' property).
|
|
@@ -23800,12 +23800,87 @@
|
|
|
23800
23800
|
}
|
|
23801
23801
|
const textMapping = MappingText.compose({
|
|
23802
23802
|
baseName: 'mapping-text',
|
|
23803
|
-
template: template$
|
|
23803
|
+
template: template$n
|
|
23804
23804
|
});
|
|
23805
23805
|
DesignSystem.getOrCreate().withPrefix('nimble').register(textMapping());
|
|
23806
23806
|
DesignSystem.tagFor(MappingText);
|
|
23807
23807
|
|
|
23808
|
-
|
|
23808
|
+
function isIconClass(elementClass) {
|
|
23809
|
+
return elementClass.prototype instanceof Icon;
|
|
23810
|
+
}
|
|
23811
|
+
/**
|
|
23812
|
+
* Maps a data value to an icon.
|
|
23813
|
+
* One or more may be added as children of a nimble-table-column-icon element to define
|
|
23814
|
+
* how specific data values should be displayed as icons in that column's cells.
|
|
23815
|
+
*/
|
|
23816
|
+
class MappingIcon extends Mapping$1 {
|
|
23817
|
+
// Allow icons to be defined asynchronously from when the property is configured
|
|
23818
|
+
async resolveIconAsync(icon) {
|
|
23819
|
+
try {
|
|
23820
|
+
// Clear the current resolution while waiting for async resolution
|
|
23821
|
+
this.resolvedIcon = undefined;
|
|
23822
|
+
await customElements.whenDefined(icon);
|
|
23823
|
+
}
|
|
23824
|
+
catch (ex) {
|
|
23825
|
+
// If any error (i.e. invalid custom element name) don't continue
|
|
23826
|
+
// Don't update the resolvedIcon as it was already set to undefined before async resolution
|
|
23827
|
+
// (in case other async resolutions were started)
|
|
23828
|
+
return;
|
|
23829
|
+
}
|
|
23830
|
+
if (icon !== this.icon) {
|
|
23831
|
+
// Possible the icon has changed while waiting for async resolution
|
|
23832
|
+
// Don't update the resolvedIcon as it was already set to undefined before async resolution
|
|
23833
|
+
// (in case other async resolutions were started)
|
|
23834
|
+
return;
|
|
23835
|
+
}
|
|
23836
|
+
const elementClass = customElements.get(icon);
|
|
23837
|
+
this.resolvedIcon = isIconClass(elementClass) ? icon : undefined;
|
|
23838
|
+
}
|
|
23839
|
+
iconChanged() {
|
|
23840
|
+
const icon = this.icon;
|
|
23841
|
+
if (!icon) {
|
|
23842
|
+
this.resolvedIcon = undefined;
|
|
23843
|
+
return;
|
|
23844
|
+
}
|
|
23845
|
+
const elementClass = customElements.get(icon);
|
|
23846
|
+
if (elementClass) {
|
|
23847
|
+
this.resolvedIcon = isIconClass(elementClass) ? icon : undefined;
|
|
23848
|
+
return;
|
|
23849
|
+
}
|
|
23850
|
+
void this.resolveIconAsync(icon);
|
|
23851
|
+
}
|
|
23852
|
+
}
|
|
23853
|
+
__decorate$1([
|
|
23854
|
+
attr()
|
|
23855
|
+
], MappingIcon.prototype, "icon", void 0);
|
|
23856
|
+
__decorate$1([
|
|
23857
|
+
attr()
|
|
23858
|
+
], MappingIcon.prototype, "severity", void 0);
|
|
23859
|
+
__decorate$1([
|
|
23860
|
+
observable
|
|
23861
|
+
], MappingIcon.prototype, "resolvedIcon", void 0);
|
|
23862
|
+
const iconMapping = MappingIcon.compose({
|
|
23863
|
+
baseName: 'mapping-icon',
|
|
23864
|
+
template: template$n
|
|
23865
|
+
});
|
|
23866
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(iconMapping());
|
|
23867
|
+
DesignSystem.tagFor(MappingIcon);
|
|
23868
|
+
|
|
23869
|
+
/**
|
|
23870
|
+
* Maps data values to a spinner.
|
|
23871
|
+
* One or more may be added as children of a nimble-table-column-icon element to define
|
|
23872
|
+
* which specific data values should be displayed as spinners in that column's cells.
|
|
23873
|
+
*/
|
|
23874
|
+
class MappingSpinner extends Mapping$1 {
|
|
23875
|
+
}
|
|
23876
|
+
const spinnerMapping = MappingSpinner.compose({
|
|
23877
|
+
baseName: 'mapping-spinner',
|
|
23878
|
+
template: template$n
|
|
23879
|
+
});
|
|
23880
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(spinnerMapping());
|
|
23881
|
+
DesignSystem.tagFor(MappingSpinner);
|
|
23882
|
+
|
|
23883
|
+
const styles$w = css `
|
|
23809
23884
|
${display('grid')}
|
|
23810
23885
|
|
|
23811
23886
|
:host {
|
|
@@ -23872,12 +23947,12 @@
|
|
|
23872
23947
|
baseName: 'menu',
|
|
23873
23948
|
baseClass: Menu$1,
|
|
23874
23949
|
template: menuTemplate,
|
|
23875
|
-
styles: styles$
|
|
23950
|
+
styles: styles$w
|
|
23876
23951
|
});
|
|
23877
23952
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenu());
|
|
23878
23953
|
DesignSystem.tagFor(Menu);
|
|
23879
23954
|
|
|
23880
|
-
const styles$
|
|
23955
|
+
const styles$v = css `
|
|
23881
23956
|
${display('inline-block')}
|
|
23882
23957
|
|
|
23883
23958
|
:host {
|
|
@@ -23896,7 +23971,7 @@
|
|
|
23896
23971
|
`;
|
|
23897
23972
|
|
|
23898
23973
|
// prettier-ignore
|
|
23899
|
-
const template$
|
|
23974
|
+
const template$m = html `
|
|
23900
23975
|
<template
|
|
23901
23976
|
?open="${x => x.open}"
|
|
23902
23977
|
@focusout="${(x, c) => x.focusoutHandler(c.event)}"
|
|
@@ -24151,8 +24226,8 @@
|
|
|
24151
24226
|
], MenuButton.prototype, "slottedMenus", void 0);
|
|
24152
24227
|
const nimbleMenuButton = MenuButton.compose({
|
|
24153
24228
|
baseName: 'menu-button',
|
|
24154
|
-
template: template$
|
|
24155
|
-
styles: styles$
|
|
24229
|
+
template: template$m,
|
|
24230
|
+
styles: styles$v,
|
|
24156
24231
|
shadowOptions: {
|
|
24157
24232
|
delegatesFocus: true
|
|
24158
24233
|
}
|
|
@@ -24160,7 +24235,7 @@
|
|
|
24160
24235
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuButton());
|
|
24161
24236
|
const menuButtonTag = DesignSystem.tagFor(MenuButton);
|
|
24162
24237
|
|
|
24163
|
-
const styles$
|
|
24238
|
+
const styles$u = css `
|
|
24164
24239
|
${display('grid')}
|
|
24165
24240
|
|
|
24166
24241
|
:host {
|
|
@@ -24258,7 +24333,7 @@
|
|
|
24258
24333
|
baseName: 'menu-item',
|
|
24259
24334
|
baseClass: MenuItem$1,
|
|
24260
24335
|
template: menuItemTemplate,
|
|
24261
|
-
styles: styles$
|
|
24336
|
+
styles: styles$u,
|
|
24262
24337
|
expandCollapseGlyph: arrowExpanderRight16X16.data
|
|
24263
24338
|
});
|
|
24264
24339
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuItem());
|
|
@@ -24273,9 +24348,9 @@
|
|
|
24273
24348
|
block: 'block'
|
|
24274
24349
|
};
|
|
24275
24350
|
|
|
24276
|
-
const styles$
|
|
24351
|
+
const styles$t = css `
|
|
24277
24352
|
${display('inline-block')}
|
|
24278
|
-
${styles$
|
|
24353
|
+
${styles$B}
|
|
24279
24354
|
|
|
24280
24355
|
:host {
|
|
24281
24356
|
font: ${bodyFont};
|
|
@@ -24489,7 +24564,7 @@
|
|
|
24489
24564
|
baseName: 'number-field',
|
|
24490
24565
|
baseClass: NumberField$1,
|
|
24491
24566
|
template: numberFieldTemplate,
|
|
24492
|
-
styles: styles$
|
|
24567
|
+
styles: styles$t,
|
|
24493
24568
|
shadowOptions: {
|
|
24494
24569
|
delegatesFocus: true
|
|
24495
24570
|
},
|
|
@@ -24531,7 +24606,7 @@
|
|
|
24531
24606
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
|
|
24532
24607
|
DesignSystem.tagFor(NumberField);
|
|
24533
24608
|
|
|
24534
|
-
const styles$
|
|
24609
|
+
const styles$s = css `
|
|
24535
24610
|
${display('inline-flex')}
|
|
24536
24611
|
|
|
24537
24612
|
:host {
|
|
@@ -24632,13 +24707,13 @@
|
|
|
24632
24707
|
baseName: 'radio',
|
|
24633
24708
|
baseClass: Radio$1,
|
|
24634
24709
|
template: radioTemplate,
|
|
24635
|
-
styles: styles$
|
|
24710
|
+
styles: styles$s,
|
|
24636
24711
|
checkedIndicator: circleFilled16X16.data
|
|
24637
24712
|
});
|
|
24638
24713
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadio());
|
|
24639
24714
|
DesignSystem.tagFor(Radio);
|
|
24640
24715
|
|
|
24641
|
-
const styles$
|
|
24716
|
+
const styles$r = css `
|
|
24642
24717
|
${display('inline-block')}
|
|
24643
24718
|
|
|
24644
24719
|
.positioning-region {
|
|
@@ -24673,7 +24748,7 @@
|
|
|
24673
24748
|
baseName: 'radio-group',
|
|
24674
24749
|
baseClass: RadioGroup$1,
|
|
24675
24750
|
template: radioGroupTemplate,
|
|
24676
|
-
styles: styles$
|
|
24751
|
+
styles: styles$r,
|
|
24677
24752
|
shadowOptions: {
|
|
24678
24753
|
delegatesFocus: true
|
|
24679
24754
|
}
|
|
@@ -42473,7 +42548,7 @@ img.ProseMirror-separator {
|
|
|
42473
42548
|
group: 'inline',
|
|
42474
42549
|
});
|
|
42475
42550
|
|
|
42476
|
-
const styles$
|
|
42551
|
+
const styles$q = css `
|
|
42477
42552
|
.positioning-region {
|
|
42478
42553
|
display: flex;
|
|
42479
42554
|
padding: ${smallPadding} ${standardPadding};
|
|
@@ -42508,7 +42583,7 @@ img.ProseMirror-separator {
|
|
|
42508
42583
|
baseName: 'toolbar',
|
|
42509
42584
|
baseClass: Toolbar$1,
|
|
42510
42585
|
template: toolbarTemplate,
|
|
42511
|
-
styles: styles$
|
|
42586
|
+
styles: styles$q,
|
|
42512
42587
|
shadowOptions: {
|
|
42513
42588
|
delegatesFocus: true
|
|
42514
42589
|
}
|
|
@@ -42517,7 +42592,7 @@ img.ProseMirror-separator {
|
|
|
42517
42592
|
const toolbarTag = DesignSystem.tagFor(Toolbar);
|
|
42518
42593
|
|
|
42519
42594
|
// prettier-ignore
|
|
42520
|
-
const template$
|
|
42595
|
+
const template$l = html `
|
|
42521
42596
|
<template>
|
|
42522
42597
|
<div class="container">
|
|
42523
42598
|
<section
|
|
@@ -42589,7 +42664,7 @@ img.ProseMirror-separator {
|
|
|
42589
42664
|
</template>
|
|
42590
42665
|
`;
|
|
42591
42666
|
|
|
42592
|
-
const styles$
|
|
42667
|
+
const styles$p = css `
|
|
42593
42668
|
${display('inline-flex')}
|
|
42594
42669
|
|
|
42595
42670
|
:host {
|
|
@@ -42902,8 +42977,8 @@ img.ProseMirror-separator {
|
|
|
42902
42977
|
], RichTextEditor.prototype, "numberedListButton", void 0);
|
|
42903
42978
|
const nimbleRichTextEditor = RichTextEditor.compose({
|
|
42904
42979
|
baseName: 'rich-text-editor',
|
|
42905
|
-
template: template$
|
|
42906
|
-
styles: styles$
|
|
42980
|
+
template: template$l,
|
|
42981
|
+
styles: styles$p
|
|
42907
42982
|
});
|
|
42908
42983
|
DesignSystem.getOrCreate()
|
|
42909
42984
|
.withPrefix('nimble')
|
|
@@ -55630,11 +55705,11 @@ img.ProseMirror-separator {
|
|
|
55630
55705
|
code_inline: { mark: "code", noCloseToken: true }
|
|
55631
55706
|
});
|
|
55632
55707
|
|
|
55633
|
-
const template$
|
|
55708
|
+
const template$k = html `
|
|
55634
55709
|
<div ${ref('viewer')} class="viewer"></div>
|
|
55635
55710
|
`;
|
|
55636
55711
|
|
|
55637
|
-
const styles$
|
|
55712
|
+
const styles$o = css `
|
|
55638
55713
|
${display('flex')}
|
|
55639
55714
|
|
|
55640
55715
|
:host {
|
|
@@ -55757,17 +55832,17 @@ img.ProseMirror-separator {
|
|
|
55757
55832
|
], RichTextViewer.prototype, "markdown", void 0);
|
|
55758
55833
|
const nimbleRichTextViewer = RichTextViewer.compose({
|
|
55759
55834
|
baseName: 'rich-text-viewer',
|
|
55760
|
-
template: template$
|
|
55761
|
-
styles: styles$
|
|
55835
|
+
template: template$k,
|
|
55836
|
+
styles: styles$o
|
|
55762
55837
|
});
|
|
55763
55838
|
DesignSystem.getOrCreate()
|
|
55764
55839
|
.withPrefix('nimble')
|
|
55765
55840
|
.register(nimbleRichTextViewer());
|
|
55766
55841
|
DesignSystem.tagFor(RichTextViewer);
|
|
55767
55842
|
|
|
55768
|
-
const styles$
|
|
55843
|
+
const styles$n = css `
|
|
55844
|
+
${styles$C}
|
|
55769
55845
|
${styles$B}
|
|
55770
|
-
${styles$A}
|
|
55771
55846
|
|
|
55772
55847
|
${
|
|
55773
55848
|
/* We are using flex `order` to define the visual ordering of the selected value,
|
|
@@ -55795,7 +55870,7 @@ img.ProseMirror-separator {
|
|
|
55795
55870
|
`));
|
|
55796
55871
|
|
|
55797
55872
|
// prettier-ignore
|
|
55798
|
-
const template$
|
|
55873
|
+
const template$j = (context, definition) => html `
|
|
55799
55874
|
<template
|
|
55800
55875
|
class="${x => [
|
|
55801
55876
|
x.collapsible && 'collapsible',
|
|
@@ -55933,8 +56008,8 @@ img.ProseMirror-separator {
|
|
|
55933
56008
|
const nimbleSelect = Select.compose({
|
|
55934
56009
|
baseName: 'select',
|
|
55935
56010
|
baseClass: Select$1,
|
|
55936
|
-
template: template$
|
|
55937
|
-
styles: styles$
|
|
56011
|
+
template: template$j,
|
|
56012
|
+
styles: styles$n,
|
|
55938
56013
|
indicator: arrowExpanderDown16X16.data,
|
|
55939
56014
|
end: html `
|
|
55940
56015
|
<${iconExclamationMarkTag}
|
|
@@ -55947,13 +56022,12 @@ img.ProseMirror-separator {
|
|
|
55947
56022
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSelect());
|
|
55948
56023
|
DesignSystem.tagFor(Select);
|
|
55949
56024
|
|
|
55950
|
-
const styles$
|
|
56025
|
+
const styles$m = css `
|
|
55951
56026
|
${display('inline-flex')}
|
|
55952
56027
|
|
|
55953
56028
|
:host {
|
|
55954
56029
|
height: ${spinnerSmallHeight};
|
|
55955
56030
|
aspect-ratio: 1 / 1;
|
|
55956
|
-
--ni-private-spinner-animation-play-state: running;
|
|
55957
56031
|
}
|
|
55958
56032
|
|
|
55959
56033
|
div.container {
|
|
@@ -55983,7 +56057,10 @@ img.ProseMirror-separator {
|
|
|
55983
56057
|
margin: auto;
|
|
55984
56058
|
animation-duration: 1600ms;
|
|
55985
56059
|
animation-iteration-count: infinite;
|
|
55986
|
-
animation-play-state: var(
|
|
56060
|
+
animation-play-state: var(
|
|
56061
|
+
--ni-private-spinner-animation-play-state,
|
|
56062
|
+
running
|
|
56063
|
+
);
|
|
55987
56064
|
animation-timing-function: cubic-bezier(0.65, 0, 0.35, 0);
|
|
55988
56065
|
}
|
|
55989
56066
|
|
|
@@ -56107,7 +56184,7 @@ img.ProseMirror-separator {
|
|
|
56107
56184
|
}
|
|
56108
56185
|
`));
|
|
56109
56186
|
|
|
56110
|
-
const template$
|
|
56187
|
+
const template$i = html `
|
|
56111
56188
|
<template role="progressbar">
|
|
56112
56189
|
<div class="container">
|
|
56113
56190
|
<div class="bit1"></div>
|
|
@@ -56145,13 +56222,13 @@ img.ProseMirror-separator {
|
|
|
56145
56222
|
], Spinner.prototype, "appearance", void 0);
|
|
56146
56223
|
const nimbleSpinner = Spinner.compose({
|
|
56147
56224
|
baseName: 'spinner',
|
|
56148
|
-
template: template$
|
|
56149
|
-
styles: styles$
|
|
56225
|
+
template: template$i,
|
|
56226
|
+
styles: styles$m
|
|
56150
56227
|
});
|
|
56151
56228
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSpinner());
|
|
56152
|
-
DesignSystem.tagFor(Spinner);
|
|
56229
|
+
const spinnerTag = DesignSystem.tagFor(Spinner);
|
|
56153
56230
|
|
|
56154
|
-
const styles$
|
|
56231
|
+
const styles$l = css `
|
|
56155
56232
|
${display('inline-flex')}
|
|
56156
56233
|
|
|
56157
56234
|
:host {
|
|
@@ -56314,7 +56391,7 @@ img.ProseMirror-separator {
|
|
|
56314
56391
|
`));
|
|
56315
56392
|
|
|
56316
56393
|
// prettier-ignore
|
|
56317
|
-
const template$
|
|
56394
|
+
const template$h = html `
|
|
56318
56395
|
<template
|
|
56319
56396
|
role="switch"
|
|
56320
56397
|
aria-checked="${x => x.checked}"
|
|
@@ -56358,13 +56435,13 @@ img.ProseMirror-separator {
|
|
|
56358
56435
|
const nimbleSwitch = Switch.compose({
|
|
56359
56436
|
baseClass: Switch$1,
|
|
56360
56437
|
baseName: 'switch',
|
|
56361
|
-
template: template$
|
|
56362
|
-
styles: styles$
|
|
56438
|
+
template: template$h,
|
|
56439
|
+
styles: styles$l
|
|
56363
56440
|
});
|
|
56364
56441
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSwitch());
|
|
56365
56442
|
DesignSystem.tagFor(Switch);
|
|
56366
56443
|
|
|
56367
|
-
const styles$
|
|
56444
|
+
const styles$k = css `
|
|
56368
56445
|
${display('inline-flex')}
|
|
56369
56446
|
|
|
56370
56447
|
:host {
|
|
@@ -56475,12 +56552,12 @@ img.ProseMirror-separator {
|
|
|
56475
56552
|
baseName: 'tab',
|
|
56476
56553
|
baseClass: Tab$2,
|
|
56477
56554
|
template: tabTemplate,
|
|
56478
|
-
styles: styles$
|
|
56555
|
+
styles: styles$k
|
|
56479
56556
|
});
|
|
56480
56557
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTab());
|
|
56481
56558
|
DesignSystem.tagFor(Tab);
|
|
56482
56559
|
|
|
56483
|
-
const styles$
|
|
56560
|
+
const styles$j = css `
|
|
56484
56561
|
${display('block')}
|
|
56485
56562
|
|
|
56486
56563
|
:host {
|
|
@@ -56500,7 +56577,7 @@ img.ProseMirror-separator {
|
|
|
56500
56577
|
baseName: 'tab-panel',
|
|
56501
56578
|
baseClass: TabPanel$1,
|
|
56502
56579
|
template: tabPanelTemplate,
|
|
56503
|
-
styles: styles$
|
|
56580
|
+
styles: styles$j
|
|
56504
56581
|
});
|
|
56505
56582
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabPanel());
|
|
56506
56583
|
DesignSystem.tagFor(TabPanel);
|
|
@@ -60222,7 +60299,7 @@ img.ProseMirror-separator {
|
|
|
60222
60299
|
}
|
|
60223
60300
|
}
|
|
60224
60301
|
|
|
60225
|
-
const styles$
|
|
60302
|
+
const styles$i = css `
|
|
60226
60303
|
${display('flex')}
|
|
60227
60304
|
|
|
60228
60305
|
:host {
|
|
@@ -60402,7 +60479,7 @@ img.ProseMirror-separator {
|
|
|
60402
60479
|
}
|
|
60403
60480
|
`));
|
|
60404
60481
|
|
|
60405
|
-
const styles$
|
|
60482
|
+
const styles$h = css `
|
|
60406
60483
|
${display('flex')}
|
|
60407
60484
|
|
|
60408
60485
|
:host {
|
|
@@ -60424,7 +60501,7 @@ img.ProseMirror-separator {
|
|
|
60424
60501
|
`;
|
|
60425
60502
|
|
|
60426
60503
|
// prettier-ignore
|
|
60427
|
-
const template$
|
|
60504
|
+
const template$g = html `
|
|
60428
60505
|
<template role="columnheader"
|
|
60429
60506
|
aria-sort="${x => x.ariaSort}"
|
|
60430
60507
|
${'' /* Prevent header double clicks from selecting text */}
|
|
@@ -60485,13 +60562,13 @@ img.ProseMirror-separator {
|
|
|
60485
60562
|
], TableHeader.prototype, "isGrouped", void 0);
|
|
60486
60563
|
const nimbleTableHeader = TableHeader.compose({
|
|
60487
60564
|
baseName: 'table-header',
|
|
60488
|
-
template: template$
|
|
60489
|
-
styles: styles$
|
|
60565
|
+
template: template$g,
|
|
60566
|
+
styles: styles$h
|
|
60490
60567
|
});
|
|
60491
60568
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableHeader());
|
|
60492
60569
|
const tableHeaderTag = DesignSystem.tagFor(TableHeader);
|
|
60493
60570
|
|
|
60494
|
-
const styles$
|
|
60571
|
+
const styles$g = css `
|
|
60495
60572
|
${display('flex')}
|
|
60496
60573
|
|
|
60497
60574
|
:host {
|
|
@@ -60580,7 +60657,7 @@ img.ProseMirror-separator {
|
|
|
60580
60657
|
}
|
|
60581
60658
|
`));
|
|
60582
60659
|
|
|
60583
|
-
const styles$
|
|
60660
|
+
const styles$f = css `
|
|
60584
60661
|
${display('flex')}
|
|
60585
60662
|
|
|
60586
60663
|
:host {
|
|
@@ -60613,7 +60690,7 @@ img.ProseMirror-separator {
|
|
|
60613
60690
|
`;
|
|
60614
60691
|
|
|
60615
60692
|
// prettier-ignore
|
|
60616
|
-
const template$
|
|
60693
|
+
const template$f = html `
|
|
60617
60694
|
<template role="cell" style="--ni-private-table-cell-nesting-level: ${x => x.nestingLevel}">
|
|
60618
60695
|
${x => x.cellViewTemplate}
|
|
60619
60696
|
${when(x => x.hasActionMenu, html `
|
|
@@ -60681,14 +60758,14 @@ img.ProseMirror-separator {
|
|
|
60681
60758
|
], TableCell.prototype, "nestingLevel", void 0);
|
|
60682
60759
|
const nimbleTableCell = TableCell.compose({
|
|
60683
60760
|
baseName: 'table-cell',
|
|
60684
|
-
template: template$
|
|
60685
|
-
styles: styles$
|
|
60761
|
+
template: template$f,
|
|
60762
|
+
styles: styles$f
|
|
60686
60763
|
});
|
|
60687
60764
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableCell());
|
|
60688
60765
|
const tableCellTag = DesignSystem.tagFor(TableCell);
|
|
60689
60766
|
|
|
60690
60767
|
// prettier-ignore
|
|
60691
|
-
const template$
|
|
60768
|
+
const template$e = html `
|
|
60692
60769
|
<template role="row" aria-selected=${x => x.ariaSelected}>
|
|
60693
60770
|
${when(x => x.selectable && !x.hideSelection, html `
|
|
60694
60771
|
<span role="gridcell" class="checkbox-container">
|
|
@@ -60873,13 +60950,13 @@ img.ProseMirror-separator {
|
|
|
60873
60950
|
], TableRow.prototype, "ariaSelected", null);
|
|
60874
60951
|
const nimbleTableRow = TableRow.compose({
|
|
60875
60952
|
baseName: 'table-row',
|
|
60876
|
-
template: template$
|
|
60877
|
-
styles: styles$
|
|
60953
|
+
template: template$e,
|
|
60954
|
+
styles: styles$g
|
|
60878
60955
|
});
|
|
60879
60956
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableRow());
|
|
60880
60957
|
const tableRowTag = DesignSystem.tagFor(TableRow);
|
|
60881
60958
|
|
|
60882
|
-
const styles$
|
|
60959
|
+
const styles$e = css `
|
|
60883
60960
|
${display('grid')}
|
|
60884
60961
|
|
|
60885
60962
|
:host {
|
|
@@ -60988,7 +61065,7 @@ img.ProseMirror-separator {
|
|
|
60988
61065
|
|
|
60989
61066
|
/* eslint-disable @typescript-eslint/indent */
|
|
60990
61067
|
// prettier-ignore
|
|
60991
|
-
const template$
|
|
61068
|
+
const template$d = html `
|
|
60992
61069
|
<template
|
|
60993
61070
|
role="row"
|
|
60994
61071
|
@click=${x => x.onGroupExpandToggle()}
|
|
@@ -61122,14 +61199,14 @@ img.ProseMirror-separator {
|
|
|
61122
61199
|
], TableGroupRow.prototype, "animationClass", void 0);
|
|
61123
61200
|
const nimbleTableGroupRow = TableGroupRow.compose({
|
|
61124
61201
|
baseName: 'table-group-row',
|
|
61125
|
-
template: template$
|
|
61126
|
-
styles: styles$
|
|
61202
|
+
template: template$d,
|
|
61203
|
+
styles: styles$e
|
|
61127
61204
|
});
|
|
61128
61205
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableGroupRow());
|
|
61129
61206
|
const tableGroupRowTag = DesignSystem.tagFor(TableGroupRow);
|
|
61130
61207
|
|
|
61131
61208
|
// prettier-ignore
|
|
61132
|
-
const template$
|
|
61209
|
+
const template$c = html `
|
|
61133
61210
|
<template
|
|
61134
61211
|
role="grid"
|
|
61135
61212
|
aria-multiselectable="${x => x.ariaMultiSelectable}"
|
|
@@ -63480,13 +63557,13 @@ img.ProseMirror-separator {
|
|
|
63480
63557
|
], Table.prototype, "documentShiftKeyDown", void 0);
|
|
63481
63558
|
const nimbleTable = Table.compose({
|
|
63482
63559
|
baseName: 'table',
|
|
63483
|
-
template: template$
|
|
63484
|
-
styles: styles$
|
|
63560
|
+
template: template$c,
|
|
63561
|
+
styles: styles$i
|
|
63485
63562
|
});
|
|
63486
63563
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTable());
|
|
63487
63564
|
DesignSystem.tagFor(Table);
|
|
63488
63565
|
|
|
63489
|
-
const styles$
|
|
63566
|
+
const styles$d = css `
|
|
63490
63567
|
:host {
|
|
63491
63568
|
display: contents;
|
|
63492
63569
|
}
|
|
@@ -63556,7 +63633,7 @@ img.ProseMirror-separator {
|
|
|
63556
63633
|
// Avoiding a wrapping <template> and be careful about starting and ending whitspace
|
|
63557
63634
|
// so the template can be composed into other column header templates
|
|
63558
63635
|
// prettier-ignore
|
|
63559
|
-
const template$
|
|
63636
|
+
const template$b = html `<span
|
|
63560
63637
|
${overflow('hasOverflow')}
|
|
63561
63638
|
class="header-content"
|
|
63562
63639
|
title=${x => (x.hasOverflow && x.headerTextContent ? x.headerTextContent : null)}
|
|
@@ -63632,7 +63709,7 @@ img.ProseMirror-separator {
|
|
|
63632
63709
|
return GroupableColumn;
|
|
63633
63710
|
}
|
|
63634
63711
|
|
|
63635
|
-
const styles$
|
|
63712
|
+
const styles$c = css `
|
|
63636
63713
|
:host {
|
|
63637
63714
|
width: fit-content;
|
|
63638
63715
|
max-width: 100%;
|
|
@@ -63657,7 +63734,7 @@ img.ProseMirror-separator {
|
|
|
63657
63734
|
|
|
63658
63735
|
/* eslint-disable @typescript-eslint/indent */
|
|
63659
63736
|
// prettier-ignore
|
|
63660
|
-
const template$
|
|
63737
|
+
const template$a = html `
|
|
63661
63738
|
<template
|
|
63662
63739
|
@click="${(x, c) => {
|
|
63663
63740
|
if (typeof x.cellRecord?.href === 'string') {
|
|
@@ -63724,8 +63801,8 @@ img.ProseMirror-separator {
|
|
|
63724
63801
|
], TableColumnAnchorCellView.prototype, "text", null);
|
|
63725
63802
|
const anchorCellView = TableColumnAnchorCellView.compose({
|
|
63726
63803
|
baseName: 'table-column-anchor-cell-view',
|
|
63727
|
-
template: template$
|
|
63728
|
-
styles: styles$
|
|
63804
|
+
template: template$a,
|
|
63805
|
+
styles: styles$c
|
|
63729
63806
|
});
|
|
63730
63807
|
DesignSystem.getOrCreate().withPrefix('nimble').register(anchorCellView());
|
|
63731
63808
|
const tableColumnAnchorCellViewTag = DesignSystem.tagFor(TableColumnAnchorCellView);
|
|
@@ -63751,7 +63828,7 @@ img.ProseMirror-separator {
|
|
|
63751
63828
|
observable
|
|
63752
63829
|
], TableColumnTextGroupHeaderViewBase.prototype, "text", void 0);
|
|
63753
63830
|
|
|
63754
|
-
const template$
|
|
63831
|
+
const template$9 = html `
|
|
63755
63832
|
<span
|
|
63756
63833
|
${overflow('hasOverflow')}
|
|
63757
63834
|
title="${x => (x.hasOverflow && x.text ? x.text : null)}"
|
|
@@ -63760,7 +63837,7 @@ img.ProseMirror-separator {
|
|
|
63760
63837
|
</span>
|
|
63761
63838
|
`;
|
|
63762
63839
|
|
|
63763
|
-
const styles$
|
|
63840
|
+
const styles$b = css `
|
|
63764
63841
|
span {
|
|
63765
63842
|
font: ${bodyFont};
|
|
63766
63843
|
color: ${bodyFontColor};
|
|
@@ -63782,8 +63859,8 @@ img.ProseMirror-separator {
|
|
|
63782
63859
|
}
|
|
63783
63860
|
const tableColumnTextGroupHeaderView = TableColumnTextGroupHeaderView.compose({
|
|
63784
63861
|
baseName: 'table-column-text-group-header-view',
|
|
63785
|
-
template: template$
|
|
63786
|
-
styles: styles$
|
|
63862
|
+
template: template$9,
|
|
63863
|
+
styles: styles$b
|
|
63787
63864
|
});
|
|
63788
63865
|
DesignSystem.getOrCreate()
|
|
63789
63866
|
.withPrefix('nimble')
|
|
@@ -63896,14 +63973,424 @@ img.ProseMirror-separator {
|
|
|
63896
63973
|
], TableColumnAnchor.prototype, "download", void 0);
|
|
63897
63974
|
const nimbleTableColumnAnchor = TableColumnAnchor.compose({
|
|
63898
63975
|
baseName: 'table-column-anchor',
|
|
63899
|
-
template: template$
|
|
63900
|
-
styles: styles$
|
|
63976
|
+
template: template$b,
|
|
63977
|
+
styles: styles$d
|
|
63901
63978
|
});
|
|
63902
63979
|
DesignSystem.getOrCreate()
|
|
63903
63980
|
.withPrefix('nimble')
|
|
63904
63981
|
.register(nimbleTableColumnAnchor());
|
|
63905
63982
|
DesignSystem.tagFor(TableColumnAnchor);
|
|
63906
63983
|
|
|
63984
|
+
/**
|
|
63985
|
+
* The base class for table columns that display fields of any type as text.
|
|
63986
|
+
*/
|
|
63987
|
+
class TableColumnTextBase extends mixinGroupableColumnAPI(mixinFractionalWidthColumnAPI(TableColumn)) {
|
|
63988
|
+
fieldNameChanged() {
|
|
63989
|
+
this.columnInternals.dataRecordFieldNames = [this.fieldName];
|
|
63990
|
+
this.columnInternals.operandDataRecordFieldName = this.fieldName;
|
|
63991
|
+
}
|
|
63992
|
+
}
|
|
63993
|
+
__decorate$1([
|
|
63994
|
+
attr({ attribute: 'field-name' })
|
|
63995
|
+
], TableColumnTextBase.prototype, "fieldName", void 0);
|
|
63996
|
+
|
|
63997
|
+
function formatNumericDate(formatter, date) {
|
|
63998
|
+
if (typeof date === 'number') {
|
|
63999
|
+
try {
|
|
64000
|
+
return formatter.format(date);
|
|
64001
|
+
}
|
|
64002
|
+
catch (e) {
|
|
64003
|
+
return '';
|
|
64004
|
+
}
|
|
64005
|
+
}
|
|
64006
|
+
else {
|
|
64007
|
+
return '';
|
|
64008
|
+
}
|
|
64009
|
+
}
|
|
64010
|
+
|
|
64011
|
+
/**
|
|
64012
|
+
* The group header view for displaying date/time fields as text.
|
|
64013
|
+
*/
|
|
64014
|
+
class TableColumnDateTextGroupHeaderView extends TableColumnTextGroupHeaderViewBase {
|
|
64015
|
+
columnConfigChanged() {
|
|
64016
|
+
this.updateText();
|
|
64017
|
+
}
|
|
64018
|
+
groupHeaderValueChanged() {
|
|
64019
|
+
this.updateText();
|
|
64020
|
+
}
|
|
64021
|
+
updateText() {
|
|
64022
|
+
if (this.columnConfig?.formatter) {
|
|
64023
|
+
this.text = formatNumericDate(this.columnConfig.formatter, this.groupHeaderValue);
|
|
64024
|
+
}
|
|
64025
|
+
else {
|
|
64026
|
+
this.text = '';
|
|
64027
|
+
}
|
|
64028
|
+
}
|
|
64029
|
+
}
|
|
64030
|
+
const tableColumnDateTextGroupHeaderView = TableColumnDateTextGroupHeaderView.compose({
|
|
64031
|
+
baseName: 'table-column-date-text-group-header-view',
|
|
64032
|
+
template: template$9,
|
|
64033
|
+
styles: styles$b
|
|
64034
|
+
});
|
|
64035
|
+
DesignSystem.getOrCreate()
|
|
64036
|
+
.withPrefix('nimble')
|
|
64037
|
+
.register(tableColumnDateTextGroupHeaderView());
|
|
64038
|
+
const tableColumnDateTextGroupHeaderViewTag = DesignSystem.tagFor(TableColumnDateTextGroupHeaderView);
|
|
64039
|
+
|
|
64040
|
+
const template$8 = html `
|
|
64041
|
+
<span
|
|
64042
|
+
${overflow('hasOverflow')}
|
|
64043
|
+
title=${x => (x.hasOverflow && x.text ? x.text : null)}
|
|
64044
|
+
>
|
|
64045
|
+
${x => x.text}
|
|
64046
|
+
</span>
|
|
64047
|
+
`;
|
|
64048
|
+
|
|
64049
|
+
const styles$a = css `
|
|
64050
|
+
span {
|
|
64051
|
+
font: ${bodyFont};
|
|
64052
|
+
color: ${bodyFontColor};
|
|
64053
|
+
white-space: nowrap;
|
|
64054
|
+
overflow: hidden;
|
|
64055
|
+
text-overflow: ellipsis;
|
|
64056
|
+
}
|
|
64057
|
+
`;
|
|
64058
|
+
|
|
64059
|
+
/**
|
|
64060
|
+
* The cell view base class for displaying fields of any type as text.
|
|
64061
|
+
*/
|
|
64062
|
+
class TableColumnTextCellViewBase extends TableCellView {
|
|
64063
|
+
constructor() {
|
|
64064
|
+
super(...arguments);
|
|
64065
|
+
/** @internal */
|
|
64066
|
+
this.hasOverflow = false;
|
|
64067
|
+
/**
|
|
64068
|
+
* Text to render in the cell.
|
|
64069
|
+
*/
|
|
64070
|
+
this.text = '';
|
|
64071
|
+
}
|
|
64072
|
+
}
|
|
64073
|
+
__decorate$1([
|
|
64074
|
+
observable
|
|
64075
|
+
], TableColumnTextCellViewBase.prototype, "hasOverflow", void 0);
|
|
64076
|
+
__decorate$1([
|
|
64077
|
+
observable
|
|
64078
|
+
], TableColumnTextCellViewBase.prototype, "text", void 0);
|
|
64079
|
+
|
|
64080
|
+
/**
|
|
64081
|
+
* A cell view for displaying date/time fields as text
|
|
64082
|
+
*/
|
|
64083
|
+
class TableColumnDateTextCellView extends TableColumnTextCellViewBase {
|
|
64084
|
+
columnConfigChanged() {
|
|
64085
|
+
this.updateText();
|
|
64086
|
+
}
|
|
64087
|
+
cellRecordChanged() {
|
|
64088
|
+
this.updateText();
|
|
64089
|
+
}
|
|
64090
|
+
updateText() {
|
|
64091
|
+
if (this.columnConfig?.formatter) {
|
|
64092
|
+
this.text = formatNumericDate(this.columnConfig.formatter, this.cellRecord?.value);
|
|
64093
|
+
}
|
|
64094
|
+
else {
|
|
64095
|
+
this.text = '';
|
|
64096
|
+
}
|
|
64097
|
+
}
|
|
64098
|
+
}
|
|
64099
|
+
const dateTextCellView = TableColumnDateTextCellView.compose({
|
|
64100
|
+
baseName: 'table-column-date-text-cell-view',
|
|
64101
|
+
template: template$8,
|
|
64102
|
+
styles: styles$a
|
|
64103
|
+
});
|
|
64104
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(dateTextCellView());
|
|
64105
|
+
const tableColumnDateTextCellViewTag = DesignSystem.tagFor(TableColumnDateTextCellView);
|
|
64106
|
+
|
|
64107
|
+
/**
|
|
64108
|
+
* Generic Validator Utility extends Tracker Utility for validation purposes
|
|
64109
|
+
*/
|
|
64110
|
+
class Validator extends Tracker {
|
|
64111
|
+
isValid() {
|
|
64112
|
+
return this.noneTracked();
|
|
64113
|
+
}
|
|
64114
|
+
getValidationFlags() {
|
|
64115
|
+
return this.getTrackedItems();
|
|
64116
|
+
}
|
|
64117
|
+
}
|
|
64118
|
+
|
|
64119
|
+
/**
|
|
64120
|
+
* Base column validator
|
|
64121
|
+
*/
|
|
64122
|
+
class ColumnValidator extends Validator {
|
|
64123
|
+
constructor(columnInternals, configValidityKeys) {
|
|
64124
|
+
super(configValidityKeys);
|
|
64125
|
+
this.columnInternals = columnInternals;
|
|
64126
|
+
}
|
|
64127
|
+
/**
|
|
64128
|
+
* @returns whether the entire column configuration is valid
|
|
64129
|
+
*/
|
|
64130
|
+
isValidColumn() {
|
|
64131
|
+
return this.isValid();
|
|
64132
|
+
}
|
|
64133
|
+
/**
|
|
64134
|
+
* @returns an object containing flags for various ways the configuation can be invalid
|
|
64135
|
+
*/
|
|
64136
|
+
getValidity() {
|
|
64137
|
+
return this.getValidationFlags();
|
|
64138
|
+
}
|
|
64139
|
+
/**
|
|
64140
|
+
* Sets a particular validity condition flag's value, e.g. "hasInvalidFooValue" = true
|
|
64141
|
+
*/
|
|
64142
|
+
setConditionValue(name, isInvalid) {
|
|
64143
|
+
if (isInvalid) {
|
|
64144
|
+
this.track(name);
|
|
64145
|
+
}
|
|
64146
|
+
else {
|
|
64147
|
+
this.untrack(name);
|
|
64148
|
+
}
|
|
64149
|
+
this.updateColumnInternalsFlag();
|
|
64150
|
+
}
|
|
64151
|
+
updateColumnInternalsFlag() {
|
|
64152
|
+
this.columnInternals.validConfiguration = this.isValid();
|
|
64153
|
+
}
|
|
64154
|
+
}
|
|
64155
|
+
|
|
64156
|
+
const dateTextValidityFlagNames = ['invalidCustomOptionsCombination'];
|
|
64157
|
+
/**
|
|
64158
|
+
* Validator for TableColumnDateText.
|
|
64159
|
+
*/
|
|
64160
|
+
class TableColumnDateTextValidator extends ColumnValidator {
|
|
64161
|
+
constructor(columnInternals) {
|
|
64162
|
+
super(columnInternals, dateTextValidityFlagNames);
|
|
64163
|
+
}
|
|
64164
|
+
setCustomOptionsValidity(valid) {
|
|
64165
|
+
this.setConditionValue('invalidCustomOptionsCombination', !valid);
|
|
64166
|
+
}
|
|
64167
|
+
}
|
|
64168
|
+
|
|
64169
|
+
// Should be used for attributes that are optional booleans, where true, false, and undefined all
|
|
64170
|
+
// have separate meanings and must have distinct representations.
|
|
64171
|
+
const optionalBooleanConverter = {
|
|
64172
|
+
toView(value) {
|
|
64173
|
+
return typeof value === 'boolean' ? value.toString() : null;
|
|
64174
|
+
},
|
|
64175
|
+
fromView(value) {
|
|
64176
|
+
if (value === 'true' || value === true) {
|
|
64177
|
+
return true;
|
|
64178
|
+
}
|
|
64179
|
+
if (value === 'false' || value === false) {
|
|
64180
|
+
return false;
|
|
64181
|
+
}
|
|
64182
|
+
return undefined;
|
|
64183
|
+
}
|
|
64184
|
+
};
|
|
64185
|
+
|
|
64186
|
+
/**
|
|
64187
|
+
* The table column for displaying dates/times as text.
|
|
64188
|
+
*/
|
|
64189
|
+
class TableColumnDateText extends TableColumnTextBase {
|
|
64190
|
+
constructor() {
|
|
64191
|
+
super(...arguments);
|
|
64192
|
+
/** @internal */
|
|
64193
|
+
this.validator = new TableColumnDateTextValidator(this.columnInternals);
|
|
64194
|
+
}
|
|
64195
|
+
connectedCallback() {
|
|
64196
|
+
super.connectedCallback();
|
|
64197
|
+
this.updateColumnConfig();
|
|
64198
|
+
}
|
|
64199
|
+
get validity() {
|
|
64200
|
+
return this.validator.getValidity();
|
|
64201
|
+
}
|
|
64202
|
+
getColumnInternalsOptions() {
|
|
64203
|
+
return {
|
|
64204
|
+
cellRecordFieldNames: ['value'],
|
|
64205
|
+
cellViewTag: tableColumnDateTextCellViewTag,
|
|
64206
|
+
groupHeaderViewTag: tableColumnDateTextGroupHeaderViewTag,
|
|
64207
|
+
delegatedEvents: [],
|
|
64208
|
+
sortOperation: TableColumnSortOperation.basic
|
|
64209
|
+
};
|
|
64210
|
+
}
|
|
64211
|
+
formatChanged() {
|
|
64212
|
+
this.updateColumnConfig();
|
|
64213
|
+
}
|
|
64214
|
+
customLocaleMatcherChanged() {
|
|
64215
|
+
this.updateColumnConfig();
|
|
64216
|
+
}
|
|
64217
|
+
customWeekdayChanged() {
|
|
64218
|
+
this.updateColumnConfig();
|
|
64219
|
+
}
|
|
64220
|
+
customEraChanged() {
|
|
64221
|
+
this.updateColumnConfig();
|
|
64222
|
+
}
|
|
64223
|
+
customYearChanged() {
|
|
64224
|
+
this.updateColumnConfig();
|
|
64225
|
+
}
|
|
64226
|
+
customMonthChanged() {
|
|
64227
|
+
this.updateColumnConfig();
|
|
64228
|
+
}
|
|
64229
|
+
customDayChanged() {
|
|
64230
|
+
this.updateColumnConfig();
|
|
64231
|
+
}
|
|
64232
|
+
customHourChanged() {
|
|
64233
|
+
this.updateColumnConfig();
|
|
64234
|
+
}
|
|
64235
|
+
customMinuteChanged() {
|
|
64236
|
+
this.updateColumnConfig();
|
|
64237
|
+
}
|
|
64238
|
+
customSecondChanged() {
|
|
64239
|
+
this.updateColumnConfig();
|
|
64240
|
+
}
|
|
64241
|
+
customTimeZoneNameChanged() {
|
|
64242
|
+
this.updateColumnConfig();
|
|
64243
|
+
}
|
|
64244
|
+
customFormatMatcherChanged() {
|
|
64245
|
+
this.updateColumnConfig();
|
|
64246
|
+
}
|
|
64247
|
+
customHour12Changed() {
|
|
64248
|
+
this.updateColumnConfig();
|
|
64249
|
+
}
|
|
64250
|
+
customTimeZoneChanged() {
|
|
64251
|
+
this.updateColumnConfig();
|
|
64252
|
+
}
|
|
64253
|
+
customCalendarChanged() {
|
|
64254
|
+
this.updateColumnConfig();
|
|
64255
|
+
}
|
|
64256
|
+
customDayPeriodChanged() {
|
|
64257
|
+
this.updateColumnConfig();
|
|
64258
|
+
}
|
|
64259
|
+
customNumberingSystemChanged() {
|
|
64260
|
+
this.updateColumnConfig();
|
|
64261
|
+
}
|
|
64262
|
+
customDateStyleChanged() {
|
|
64263
|
+
this.updateColumnConfig();
|
|
64264
|
+
}
|
|
64265
|
+
customTimeStyleChanged() {
|
|
64266
|
+
this.updateColumnConfig();
|
|
64267
|
+
}
|
|
64268
|
+
customHourCycleChanged() {
|
|
64269
|
+
this.updateColumnConfig();
|
|
64270
|
+
}
|
|
64271
|
+
updateColumnConfig() {
|
|
64272
|
+
const columnConfig = {
|
|
64273
|
+
formatter: this.createFormatter()
|
|
64274
|
+
};
|
|
64275
|
+
this.columnInternals.columnConfig = columnConfig;
|
|
64276
|
+
this.validator.setCustomOptionsValidity(columnConfig.formatter !== undefined);
|
|
64277
|
+
}
|
|
64278
|
+
createFormatter() {
|
|
64279
|
+
let options;
|
|
64280
|
+
if (!this.format) {
|
|
64281
|
+
options = {
|
|
64282
|
+
dateStyle: 'medium',
|
|
64283
|
+
timeStyle: 'medium'
|
|
64284
|
+
};
|
|
64285
|
+
}
|
|
64286
|
+
else {
|
|
64287
|
+
options = this.getCustomFormattingOptions();
|
|
64288
|
+
}
|
|
64289
|
+
try {
|
|
64290
|
+
return new Intl.DateTimeFormat(undefined, options);
|
|
64291
|
+
}
|
|
64292
|
+
catch (e) {
|
|
64293
|
+
return undefined;
|
|
64294
|
+
}
|
|
64295
|
+
}
|
|
64296
|
+
getCustomFormattingOptions() {
|
|
64297
|
+
// There's a FAST bug (https://github.com/microsoft/fast/issues/6630) where removing
|
|
64298
|
+
// attributes sets their values to null instead of undefined. To work around this,
|
|
64299
|
+
// translate null values to undefined.
|
|
64300
|
+
const options = {
|
|
64301
|
+
localeMatcher: this.customLocaleMatcher ?? undefined,
|
|
64302
|
+
weekday: this.customWeekday ?? undefined,
|
|
64303
|
+
era: this.customEra ?? undefined,
|
|
64304
|
+
year: this.customYear ?? undefined,
|
|
64305
|
+
month: this.customMonth ?? undefined,
|
|
64306
|
+
day: this.customDay ?? undefined,
|
|
64307
|
+
hour: this.customHour ?? undefined,
|
|
64308
|
+
minute: this.customMinute ?? undefined,
|
|
64309
|
+
second: this.customSecond ?? undefined,
|
|
64310
|
+
timeZoneName: this.customTimeZoneName ?? undefined,
|
|
64311
|
+
formatMatcher: this.customFormatMatcher ?? undefined,
|
|
64312
|
+
hour12: this.customHour12 ?? undefined,
|
|
64313
|
+
timeZone: this.customTimeZone ?? undefined,
|
|
64314
|
+
calendar: this.customCalendar ?? undefined,
|
|
64315
|
+
dayPeriod: this.customDayPeriod ?? undefined,
|
|
64316
|
+
numberingSystem: this.customNumberingSystem ?? undefined,
|
|
64317
|
+
dateStyle: this.customDateStyle ?? undefined,
|
|
64318
|
+
timeStyle: this.customTimeStyle ?? undefined,
|
|
64319
|
+
hourCycle: this.customHourCycle ?? undefined
|
|
64320
|
+
};
|
|
64321
|
+
return options;
|
|
64322
|
+
}
|
|
64323
|
+
}
|
|
64324
|
+
__decorate$1([
|
|
64325
|
+
attr
|
|
64326
|
+
], TableColumnDateText.prototype, "format", void 0);
|
|
64327
|
+
__decorate$1([
|
|
64328
|
+
attr({ attribute: 'custom-locale-matcher' })
|
|
64329
|
+
], TableColumnDateText.prototype, "customLocaleMatcher", void 0);
|
|
64330
|
+
__decorate$1([
|
|
64331
|
+
attr({ attribute: 'custom-weekday' })
|
|
64332
|
+
], TableColumnDateText.prototype, "customWeekday", void 0);
|
|
64333
|
+
__decorate$1([
|
|
64334
|
+
attr({ attribute: 'custom-era' })
|
|
64335
|
+
], TableColumnDateText.prototype, "customEra", void 0);
|
|
64336
|
+
__decorate$1([
|
|
64337
|
+
attr({ attribute: 'custom-year' })
|
|
64338
|
+
], TableColumnDateText.prototype, "customYear", void 0);
|
|
64339
|
+
__decorate$1([
|
|
64340
|
+
attr({ attribute: 'custom-month' })
|
|
64341
|
+
], TableColumnDateText.prototype, "customMonth", void 0);
|
|
64342
|
+
__decorate$1([
|
|
64343
|
+
attr({ attribute: 'custom-day' })
|
|
64344
|
+
], TableColumnDateText.prototype, "customDay", void 0);
|
|
64345
|
+
__decorate$1([
|
|
64346
|
+
attr({ attribute: 'custom-hour' })
|
|
64347
|
+
], TableColumnDateText.prototype, "customHour", void 0);
|
|
64348
|
+
__decorate$1([
|
|
64349
|
+
attr({ attribute: 'custom-minute' })
|
|
64350
|
+
], TableColumnDateText.prototype, "customMinute", void 0);
|
|
64351
|
+
__decorate$1([
|
|
64352
|
+
attr({ attribute: 'custom-second' })
|
|
64353
|
+
], TableColumnDateText.prototype, "customSecond", void 0);
|
|
64354
|
+
__decorate$1([
|
|
64355
|
+
attr({ attribute: 'custom-time-zone-name' })
|
|
64356
|
+
], TableColumnDateText.prototype, "customTimeZoneName", void 0);
|
|
64357
|
+
__decorate$1([
|
|
64358
|
+
attr({ attribute: 'custom-format-matcher' })
|
|
64359
|
+
], TableColumnDateText.prototype, "customFormatMatcher", void 0);
|
|
64360
|
+
__decorate$1([
|
|
64361
|
+
attr({ attribute: 'custom-hour12', converter: optionalBooleanConverter })
|
|
64362
|
+
], TableColumnDateText.prototype, "customHour12", void 0);
|
|
64363
|
+
__decorate$1([
|
|
64364
|
+
attr({ attribute: 'custom-time-zone' })
|
|
64365
|
+
], TableColumnDateText.prototype, "customTimeZone", void 0);
|
|
64366
|
+
__decorate$1([
|
|
64367
|
+
attr({ attribute: 'custom-calendar' })
|
|
64368
|
+
], TableColumnDateText.prototype, "customCalendar", void 0);
|
|
64369
|
+
__decorate$1([
|
|
64370
|
+
attr({ attribute: 'custom-day-period' })
|
|
64371
|
+
], TableColumnDateText.prototype, "customDayPeriod", void 0);
|
|
64372
|
+
__decorate$1([
|
|
64373
|
+
attr({ attribute: 'custom-numbering-system' })
|
|
64374
|
+
], TableColumnDateText.prototype, "customNumberingSystem", void 0);
|
|
64375
|
+
__decorate$1([
|
|
64376
|
+
attr({ attribute: 'custom-date-style' })
|
|
64377
|
+
], TableColumnDateText.prototype, "customDateStyle", void 0);
|
|
64378
|
+
__decorate$1([
|
|
64379
|
+
attr({ attribute: 'custom-time-style' })
|
|
64380
|
+
], TableColumnDateText.prototype, "customTimeStyle", void 0);
|
|
64381
|
+
__decorate$1([
|
|
64382
|
+
attr({ attribute: 'custom-hour-cycle' })
|
|
64383
|
+
], TableColumnDateText.prototype, "customHourCycle", void 0);
|
|
64384
|
+
const nimbleTableColumnDateText = TableColumnDateText.compose({
|
|
64385
|
+
baseName: 'table-column-date-text',
|
|
64386
|
+
template: template$b,
|
|
64387
|
+
styles: styles$d
|
|
64388
|
+
});
|
|
64389
|
+
DesignSystem.getOrCreate()
|
|
64390
|
+
.withPrefix('nimble')
|
|
64391
|
+
.register(nimbleTableColumnDateText());
|
|
64392
|
+
DesignSystem.tagFor(TableColumnDateText);
|
|
64393
|
+
|
|
63907
64394
|
/**
|
|
63908
64395
|
* Converts a Mapping key (which is a string when configured in HTML) to the
|
|
63909
64396
|
* given keyType. The converted value can then be used to compare against
|
|
@@ -63955,7 +64442,6 @@ img.ProseMirror-separator {
|
|
|
63955
64442
|
}
|
|
63956
64443
|
/**
|
|
63957
64444
|
* Called when any Mapping related state has changed.
|
|
63958
|
-
* Implementations should run validation before updating the column config.
|
|
63959
64445
|
*/
|
|
63960
64446
|
updateColumnConfig() {
|
|
63961
64447
|
this.validator.validate(this.mappings, this.keyType);
|
|
@@ -64012,63 +64498,14 @@ img.ProseMirror-separator {
|
|
|
64012
64498
|
], TableColumnEnumBase.prototype, "keyType", void 0);
|
|
64013
64499
|
|
|
64014
64500
|
const styles$9 = css `
|
|
64015
|
-
${styles$
|
|
64501
|
+
${styles$d}
|
|
64016
64502
|
|
|
64017
64503
|
slot[name='mapping'] {
|
|
64018
64504
|
display: none;
|
|
64019
64505
|
}
|
|
64020
64506
|
`;
|
|
64021
64507
|
|
|
64022
|
-
const template$
|
|
64023
|
-
|
|
64024
|
-
/**
|
|
64025
|
-
* Generic Validator Utility extends Tracker Utility for validation purposes
|
|
64026
|
-
*/
|
|
64027
|
-
class Validator extends Tracker {
|
|
64028
|
-
isValid() {
|
|
64029
|
-
return this.noneTracked();
|
|
64030
|
-
}
|
|
64031
|
-
getValidationFlags() {
|
|
64032
|
-
return this.getTrackedItems();
|
|
64033
|
-
}
|
|
64034
|
-
}
|
|
64035
|
-
|
|
64036
|
-
/**
|
|
64037
|
-
* Base column validator
|
|
64038
|
-
*/
|
|
64039
|
-
class ColumnValidator extends Validator {
|
|
64040
|
-
constructor(columnInternals, configValidityKeys) {
|
|
64041
|
-
super(configValidityKeys);
|
|
64042
|
-
this.columnInternals = columnInternals;
|
|
64043
|
-
}
|
|
64044
|
-
/**
|
|
64045
|
-
* @returns whether the entire column configuration is valid
|
|
64046
|
-
*/
|
|
64047
|
-
isValidColumn() {
|
|
64048
|
-
return this.isValid();
|
|
64049
|
-
}
|
|
64050
|
-
/**
|
|
64051
|
-
* @returns an object containing flags for various ways the configuation can be invalid
|
|
64052
|
-
*/
|
|
64053
|
-
getValidity() {
|
|
64054
|
-
return this.getValidationFlags();
|
|
64055
|
-
}
|
|
64056
|
-
/**
|
|
64057
|
-
* Sets a particular validity condition flag's value, e.g. "hasInvalidFooValue" = true
|
|
64058
|
-
*/
|
|
64059
|
-
setConditionValue(name, isInvalid) {
|
|
64060
|
-
if (isInvalid) {
|
|
64061
|
-
this.track(name);
|
|
64062
|
-
}
|
|
64063
|
-
else {
|
|
64064
|
-
this.untrack(name);
|
|
64065
|
-
}
|
|
64066
|
-
this.updateColumnInternalsFlag();
|
|
64067
|
-
}
|
|
64068
|
-
updateColumnInternalsFlag() {
|
|
64069
|
-
this.columnInternals.validConfiguration = this.isValid();
|
|
64070
|
-
}
|
|
64071
|
-
}
|
|
64508
|
+
const template$7 = html `${template$b}<slot ${slotted('mappings')} name="mapping"></slot>`;
|
|
64072
64509
|
|
|
64073
64510
|
const enumBaseValidityFlagNames = [
|
|
64074
64511
|
'invalidMappingKeyValueForType',
|
|
@@ -64126,51 +64563,11 @@ img.ProseMirror-separator {
|
|
|
64126
64563
|
* Validator for TableColumnEnumText
|
|
64127
64564
|
*/
|
|
64128
64565
|
class TableColumnEnumTextValidator extends TableColumnEnumBaseValidator {
|
|
64129
|
-
constructor(columnInternals
|
|
64130
|
-
super(columnInternals, enumTextValidityFlagNames,
|
|
64566
|
+
constructor(columnInternals) {
|
|
64567
|
+
super(columnInternals, enumTextValidityFlagNames, [MappingText]);
|
|
64131
64568
|
}
|
|
64132
64569
|
}
|
|
64133
64570
|
|
|
64134
|
-
const styles$8 = css `
|
|
64135
|
-
span {
|
|
64136
|
-
font: ${bodyFont};
|
|
64137
|
-
color: ${bodyFontColor};
|
|
64138
|
-
white-space: nowrap;
|
|
64139
|
-
overflow: hidden;
|
|
64140
|
-
text-overflow: ellipsis;
|
|
64141
|
-
}
|
|
64142
|
-
`;
|
|
64143
|
-
|
|
64144
|
-
const template$5 = html `
|
|
64145
|
-
<span
|
|
64146
|
-
${overflow('hasOverflow')}
|
|
64147
|
-
title=${x => (x.hasOverflow && x.text ? x.text : null)}
|
|
64148
|
-
>
|
|
64149
|
-
${x => x.text}
|
|
64150
|
-
</span>
|
|
64151
|
-
`;
|
|
64152
|
-
|
|
64153
|
-
/**
|
|
64154
|
-
* The cell view base class for displaying fields of any type as text.
|
|
64155
|
-
*/
|
|
64156
|
-
class TableColumnTextCellViewBase extends TableCellView {
|
|
64157
|
-
constructor() {
|
|
64158
|
-
super(...arguments);
|
|
64159
|
-
/** @internal */
|
|
64160
|
-
this.hasOverflow = false;
|
|
64161
|
-
/**
|
|
64162
|
-
* Text to render in the cell.
|
|
64163
|
-
*/
|
|
64164
|
-
this.text = '';
|
|
64165
|
-
}
|
|
64166
|
-
}
|
|
64167
|
-
__decorate$1([
|
|
64168
|
-
observable
|
|
64169
|
-
], TableColumnTextCellViewBase.prototype, "hasOverflow", void 0);
|
|
64170
|
-
__decorate$1([
|
|
64171
|
-
observable
|
|
64172
|
-
], TableColumnTextCellViewBase.prototype, "text", void 0);
|
|
64173
|
-
|
|
64174
64571
|
/**
|
|
64175
64572
|
* Common state shared across Mapping Config
|
|
64176
64573
|
*/
|
|
@@ -64203,13 +64600,15 @@ img.ProseMirror-separator {
|
|
|
64203
64600
|
return;
|
|
64204
64601
|
}
|
|
64205
64602
|
const config = this.columnConfig?.mappingConfigs.get(value);
|
|
64206
|
-
this.text = config instanceof MappingTextConfig
|
|
64603
|
+
this.text = config instanceof MappingTextConfig && config.text
|
|
64604
|
+
? config.text
|
|
64605
|
+
: '';
|
|
64207
64606
|
}
|
|
64208
64607
|
}
|
|
64209
64608
|
const enumTextCellView = TableColumnEnumTextCellView.compose({
|
|
64210
64609
|
baseName: 'table-column-enum-text-cell-view',
|
|
64211
|
-
template: template$
|
|
64212
|
-
styles: styles$
|
|
64610
|
+
template: template$8,
|
|
64611
|
+
styles: styles$a
|
|
64213
64612
|
});
|
|
64214
64613
|
DesignSystem.getOrCreate().withPrefix('nimble').register(enumTextCellView());
|
|
64215
64614
|
const tableColumnEnumTextCellViewTag = DesignSystem.tagFor(TableColumnEnumTextCellView);
|
|
@@ -64231,13 +64630,15 @@ img.ProseMirror-separator {
|
|
|
64231
64630
|
return;
|
|
64232
64631
|
}
|
|
64233
64632
|
const config = this.columnConfig?.mappingConfigs.get(value);
|
|
64234
|
-
this.text = config instanceof MappingTextConfig
|
|
64633
|
+
this.text = config instanceof MappingTextConfig && config.text
|
|
64634
|
+
? config.text
|
|
64635
|
+
: '';
|
|
64235
64636
|
}
|
|
64236
64637
|
}
|
|
64237
64638
|
const enumTextGroupHeaderView = TableColumnEnumTextGroupHeaderView.compose({
|
|
64238
64639
|
baseName: 'table-column-enum-text-group-header-view',
|
|
64239
|
-
template: template$
|
|
64240
|
-
styles: styles$
|
|
64640
|
+
template: template$9,
|
|
64641
|
+
styles: styles$b
|
|
64241
64642
|
});
|
|
64242
64643
|
DesignSystem.getOrCreate()
|
|
64243
64644
|
.withPrefix('nimble')
|
|
@@ -64249,9 +64650,7 @@ img.ProseMirror-separator {
|
|
|
64249
64650
|
*/
|
|
64250
64651
|
class TableColumnEnumText extends mixinGroupableColumnAPI(mixinFractionalWidthColumnAPI((TableColumnEnumBase))) {
|
|
64251
64652
|
createValidator() {
|
|
64252
|
-
return new TableColumnEnumTextValidator(this.columnInternals
|
|
64253
|
-
MappingText
|
|
64254
|
-
]);
|
|
64653
|
+
return new TableColumnEnumTextValidator(this.columnInternals);
|
|
64255
64654
|
}
|
|
64256
64655
|
get validity() {
|
|
64257
64656
|
return this.validator.getValidity();
|
|
@@ -64281,7 +64680,7 @@ img.ProseMirror-separator {
|
|
|
64281
64680
|
}
|
|
64282
64681
|
const nimbleTableColumnEnumText = TableColumnEnumText.compose({
|
|
64283
64682
|
baseName: 'table-column-enum-text',
|
|
64284
|
-
template: template$
|
|
64683
|
+
template: template$7,
|
|
64285
64684
|
styles: styles$9
|
|
64286
64685
|
});
|
|
64287
64686
|
DesignSystem.getOrCreate()
|
|
@@ -64289,18 +64688,263 @@ img.ProseMirror-separator {
|
|
|
64289
64688
|
.register(nimbleTableColumnEnumText());
|
|
64290
64689
|
DesignSystem.tagFor(TableColumnEnumText);
|
|
64291
64690
|
|
|
64691
|
+
const iconValidityFlagNames = [
|
|
64692
|
+
...enumBaseValidityFlagNames,
|
|
64693
|
+
'invalidIconName'
|
|
64694
|
+
];
|
|
64695
|
+
/**
|
|
64696
|
+
* Validator for TableColumnIcon
|
|
64697
|
+
*/
|
|
64698
|
+
class TableColumnIconValidator extends TableColumnEnumBaseValidator {
|
|
64699
|
+
constructor(columnInternals) {
|
|
64700
|
+
super(columnInternals, iconValidityFlagNames, [
|
|
64701
|
+
MappingIcon,
|
|
64702
|
+
MappingSpinner
|
|
64703
|
+
]);
|
|
64704
|
+
}
|
|
64705
|
+
validate(mappings, keyType) {
|
|
64706
|
+
super.validate(mappings, keyType);
|
|
64707
|
+
this.validateIconNames(mappings);
|
|
64708
|
+
}
|
|
64709
|
+
validateIconNames(mappings) {
|
|
64710
|
+
const isMappingIcon = (mapping) => mapping instanceof MappingIcon;
|
|
64711
|
+
const invalid = mappings
|
|
64712
|
+
.filter(isMappingIcon)
|
|
64713
|
+
.some(mappingIcon => mappingIcon.resolvedIcon === undefined);
|
|
64714
|
+
this.setConditionValue('invalidIconName', invalid);
|
|
64715
|
+
}
|
|
64716
|
+
}
|
|
64717
|
+
|
|
64718
|
+
const styles$8 = css `
|
|
64719
|
+
${display('inline-flex')}
|
|
64720
|
+
|
|
64721
|
+
:host {
|
|
64722
|
+
gap: ${smallPadding};
|
|
64723
|
+
align-items: center;
|
|
64724
|
+
}
|
|
64725
|
+
|
|
64726
|
+
.no-shrink {
|
|
64727
|
+
flex-shrink: 0;
|
|
64728
|
+
}
|
|
64729
|
+
|
|
64730
|
+
span {
|
|
64731
|
+
flex-shrink: 1;
|
|
64732
|
+
font: ${bodyFont};
|
|
64733
|
+
color: ${bodyFontColor};
|
|
64734
|
+
white-space: nowrap;
|
|
64735
|
+
overflow: hidden;
|
|
64736
|
+
text-overflow: ellipsis;
|
|
64737
|
+
}
|
|
64738
|
+
`;
|
|
64739
|
+
|
|
64740
|
+
// prettier-ignore
|
|
64741
|
+
const template$6 = html `
|
|
64742
|
+
${when(x => x.visual === 'icon', html `
|
|
64743
|
+
${x => x.iconTemplate}
|
|
64744
|
+
<span
|
|
64745
|
+
${overflow('hasOverflow')}
|
|
64746
|
+
title="${x => (x.hasOverflow && x.text ? x.text : null)}"
|
|
64747
|
+
>${x => x.text}</span>`)}
|
|
64748
|
+
${when(x => x.visual === 'spinner', html `
|
|
64749
|
+
<${spinnerTag}
|
|
64750
|
+
title="${x => x.text}"
|
|
64751
|
+
aria-label="${x => x.text}"
|
|
64752
|
+
class="no-shrink">
|
|
64753
|
+
</${spinnerTag}>
|
|
64754
|
+
<span
|
|
64755
|
+
${overflow('hasOverflow')}
|
|
64756
|
+
title="${x => (x.hasOverflow && x.text ? x.text : null)}"
|
|
64757
|
+
>${x => x.text}</span>
|
|
64758
|
+
`)}
|
|
64759
|
+
`;
|
|
64760
|
+
|
|
64761
|
+
const createIconTemplate = (icon) => html `
|
|
64762
|
+
<${icon}
|
|
64763
|
+
title="${x => x.text}"
|
|
64764
|
+
aria-label="${x => x.text}"
|
|
64765
|
+
severity="${x => x.severity}"
|
|
64766
|
+
class="no-shrink"
|
|
64767
|
+
>
|
|
64768
|
+
</${icon}>`;
|
|
64292
64769
|
/**
|
|
64293
|
-
*
|
|
64770
|
+
* Mapping configuration corresponding to a icon mapping
|
|
64294
64771
|
*/
|
|
64295
|
-
class
|
|
64296
|
-
|
|
64297
|
-
|
|
64298
|
-
this.
|
|
64772
|
+
class MappingIconConfig extends MappingConfig {
|
|
64773
|
+
constructor(resolvedIcon, severity, text) {
|
|
64774
|
+
super(text);
|
|
64775
|
+
this.severity = severity;
|
|
64776
|
+
this.iconTemplate = createIconTemplate(resolvedIcon);
|
|
64777
|
+
}
|
|
64778
|
+
}
|
|
64779
|
+
|
|
64780
|
+
/**
|
|
64781
|
+
* Mapping configuration corresponding to a spinner mapping
|
|
64782
|
+
*/
|
|
64783
|
+
class MappingSpinnerConfig extends MappingConfig {
|
|
64784
|
+
constructor(text) {
|
|
64785
|
+
super(text);
|
|
64786
|
+
}
|
|
64787
|
+
}
|
|
64788
|
+
|
|
64789
|
+
/**
|
|
64790
|
+
* The group header view for the icon column
|
|
64791
|
+
*/
|
|
64792
|
+
class TableColumnIconGroupHeaderView extends TableColumnTextGroupHeaderViewBase {
|
|
64793
|
+
columnConfigChanged() {
|
|
64794
|
+
this.updateState();
|
|
64795
|
+
}
|
|
64796
|
+
groupHeaderValueChanged() {
|
|
64797
|
+
this.updateState();
|
|
64798
|
+
}
|
|
64799
|
+
updateState() {
|
|
64800
|
+
this.visual = undefined;
|
|
64801
|
+
if (!this.columnConfig) {
|
|
64802
|
+
return;
|
|
64803
|
+
}
|
|
64804
|
+
const value = this.groupHeaderValue;
|
|
64805
|
+
if (value === undefined || value === null) {
|
|
64806
|
+
return;
|
|
64807
|
+
}
|
|
64808
|
+
const mappingConfig = this.columnConfig.mappingConfigs.get(value);
|
|
64809
|
+
if (mappingConfig instanceof MappingIconConfig) {
|
|
64810
|
+
this.visual = 'icon';
|
|
64811
|
+
this.severity = mappingConfig.severity;
|
|
64812
|
+
this.text = mappingConfig.text ?? '';
|
|
64813
|
+
this.iconTemplate = mappingConfig.iconTemplate;
|
|
64814
|
+
}
|
|
64815
|
+
else if (mappingConfig instanceof MappingSpinnerConfig) {
|
|
64816
|
+
this.visual = 'spinner';
|
|
64817
|
+
this.text = mappingConfig.text ?? '';
|
|
64818
|
+
}
|
|
64299
64819
|
}
|
|
64300
64820
|
}
|
|
64301
64821
|
__decorate$1([
|
|
64302
|
-
|
|
64303
|
-
],
|
|
64822
|
+
observable
|
|
64823
|
+
], TableColumnIconGroupHeaderView.prototype, "severity", void 0);
|
|
64824
|
+
__decorate$1([
|
|
64825
|
+
observable
|
|
64826
|
+
], TableColumnIconGroupHeaderView.prototype, "iconTemplate", void 0);
|
|
64827
|
+
__decorate$1([
|
|
64828
|
+
observable
|
|
64829
|
+
], TableColumnIconGroupHeaderView.prototype, "visual", void 0);
|
|
64830
|
+
const iconGroupHeaderView = TableColumnIconGroupHeaderView.compose({
|
|
64831
|
+
baseName: 'table-column-icon-group-header-view',
|
|
64832
|
+
template: template$6,
|
|
64833
|
+
styles: styles$8
|
|
64834
|
+
});
|
|
64835
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(iconGroupHeaderView());
|
|
64836
|
+
const tableColumnIconGroupHeaderViewTag = DesignSystem.tagFor(TableColumnIconGroupHeaderView);
|
|
64837
|
+
|
|
64838
|
+
const template$5 = html `
|
|
64839
|
+
${when(x => x.visual === 'icon', x => x.iconTemplate)}
|
|
64840
|
+
${when(x => x.visual === 'spinner', html `
|
|
64841
|
+
<${spinnerTag}
|
|
64842
|
+
title="${x => x.text}"
|
|
64843
|
+
aria-label="${x => x.text}"
|
|
64844
|
+
class="no-shrink">
|
|
64845
|
+
</${spinnerTag}>
|
|
64846
|
+
`)}
|
|
64847
|
+
`;
|
|
64848
|
+
|
|
64849
|
+
/**
|
|
64850
|
+
* The cell view for the icon column
|
|
64851
|
+
*/
|
|
64852
|
+
class TableColumnIconCellView extends TableCellView {
|
|
64853
|
+
columnConfigChanged() {
|
|
64854
|
+
this.updateState();
|
|
64855
|
+
}
|
|
64856
|
+
cellRecordChanged() {
|
|
64857
|
+
this.updateState();
|
|
64858
|
+
}
|
|
64859
|
+
updateState() {
|
|
64860
|
+
this.visual = undefined;
|
|
64861
|
+
if (!this.columnConfig || !this.cellRecord) {
|
|
64862
|
+
return;
|
|
64863
|
+
}
|
|
64864
|
+
const value = this.cellRecord.value;
|
|
64865
|
+
if (value === undefined || value === null) {
|
|
64866
|
+
return;
|
|
64867
|
+
}
|
|
64868
|
+
const mappingConfig = this.columnConfig.mappingConfigs.get(value);
|
|
64869
|
+
if (mappingConfig instanceof MappingIconConfig) {
|
|
64870
|
+
this.visual = 'icon';
|
|
64871
|
+
this.severity = mappingConfig.severity;
|
|
64872
|
+
this.text = mappingConfig.text;
|
|
64873
|
+
this.iconTemplate = mappingConfig.iconTemplate;
|
|
64874
|
+
}
|
|
64875
|
+
else if (mappingConfig instanceof MappingSpinnerConfig) {
|
|
64876
|
+
this.visual = 'spinner';
|
|
64877
|
+
this.text = mappingConfig.text;
|
|
64878
|
+
}
|
|
64879
|
+
}
|
|
64880
|
+
}
|
|
64881
|
+
__decorate$1([
|
|
64882
|
+
observable
|
|
64883
|
+
], TableColumnIconCellView.prototype, "severity", void 0);
|
|
64884
|
+
__decorate$1([
|
|
64885
|
+
observable
|
|
64886
|
+
], TableColumnIconCellView.prototype, "text", void 0);
|
|
64887
|
+
__decorate$1([
|
|
64888
|
+
observable
|
|
64889
|
+
], TableColumnIconCellView.prototype, "iconTemplate", void 0);
|
|
64890
|
+
__decorate$1([
|
|
64891
|
+
observable
|
|
64892
|
+
], TableColumnIconCellView.prototype, "visual", void 0);
|
|
64893
|
+
const iconCellView = TableColumnIconCellView.compose({
|
|
64894
|
+
baseName: 'table-column-icon-cell-view',
|
|
64895
|
+
template: template$5
|
|
64896
|
+
});
|
|
64897
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(iconCellView());
|
|
64898
|
+
const tableColumnIconCellViewTag = DesignSystem.tagFor(TableColumnIconCellView);
|
|
64899
|
+
|
|
64900
|
+
/**
|
|
64901
|
+
* Table column that maps values to icons / spinners
|
|
64902
|
+
*/
|
|
64903
|
+
class TableColumnIcon extends mixinGroupableColumnAPI(mixinFractionalWidthColumnAPI((TableColumnEnumBase))) {
|
|
64904
|
+
createValidator() {
|
|
64905
|
+
return new TableColumnIconValidator(this.columnInternals);
|
|
64906
|
+
}
|
|
64907
|
+
get validity() {
|
|
64908
|
+
return this.validator.getValidity();
|
|
64909
|
+
}
|
|
64910
|
+
getColumnInternalsOptions() {
|
|
64911
|
+
return {
|
|
64912
|
+
cellRecordFieldNames: ['value'],
|
|
64913
|
+
cellViewTag: tableColumnIconCellViewTag,
|
|
64914
|
+
groupHeaderViewTag: tableColumnIconGroupHeaderViewTag,
|
|
64915
|
+
delegatedEvents: [],
|
|
64916
|
+
sortOperation: TableColumnSortOperation.basic
|
|
64917
|
+
};
|
|
64918
|
+
}
|
|
64919
|
+
createColumnConfig(mappingConfigs) {
|
|
64920
|
+
return {
|
|
64921
|
+
mappingConfigs
|
|
64922
|
+
};
|
|
64923
|
+
}
|
|
64924
|
+
createMappingConfig(mapping) {
|
|
64925
|
+
if (mapping instanceof MappingIcon) {
|
|
64926
|
+
if (!mapping.resolvedIcon) {
|
|
64927
|
+
throw Error('Unresolved icon');
|
|
64928
|
+
}
|
|
64929
|
+
return new MappingIconConfig(mapping.resolvedIcon, mapping.severity, mapping.text);
|
|
64930
|
+
}
|
|
64931
|
+
if (mapping instanceof MappingSpinner) {
|
|
64932
|
+
return new MappingSpinnerConfig(mapping.text);
|
|
64933
|
+
}
|
|
64934
|
+
// Getting here would indicate a programming error, b/c validation will prevent
|
|
64935
|
+
// this function from running when there is an unsupported mapping.
|
|
64936
|
+
throw new Error('Unsupported mapping');
|
|
64937
|
+
}
|
|
64938
|
+
}
|
|
64939
|
+
const nimbleTableColumnIcon = TableColumnIcon.compose({
|
|
64940
|
+
baseName: 'table-column-icon',
|
|
64941
|
+
template: template$7,
|
|
64942
|
+
styles: styles$9
|
|
64943
|
+
});
|
|
64944
|
+
DesignSystem.getOrCreate()
|
|
64945
|
+
.withPrefix('nimble')
|
|
64946
|
+
.register(nimbleTableColumnIcon());
|
|
64947
|
+
DesignSystem.tagFor(TableColumnIcon);
|
|
64304
64948
|
|
|
64305
64949
|
/**
|
|
64306
64950
|
* A cell view for displaying string fields as text
|
|
@@ -64314,8 +64958,8 @@ img.ProseMirror-separator {
|
|
|
64314
64958
|
}
|
|
64315
64959
|
const textCellView = TableColumnTextCellView.compose({
|
|
64316
64960
|
baseName: 'table-column-text-cell-view',
|
|
64317
|
-
template: template$
|
|
64318
|
-
styles: styles$
|
|
64961
|
+
template: template$8,
|
|
64962
|
+
styles: styles$a
|
|
64319
64963
|
});
|
|
64320
64964
|
DesignSystem.getOrCreate().withPrefix('nimble').register(textCellView());
|
|
64321
64965
|
const tableColumnTextCellViewTag = DesignSystem.tagFor(TableColumnTextCellView);
|
|
@@ -64336,8 +64980,8 @@ img.ProseMirror-separator {
|
|
|
64336
64980
|
}
|
|
64337
64981
|
const nimbleTableColumnText = TableColumnText.compose({
|
|
64338
64982
|
baseName: 'table-column-text',
|
|
64339
|
-
template: template$
|
|
64340
|
-
styles: styles$
|
|
64983
|
+
template: template$b,
|
|
64984
|
+
styles: styles$d
|
|
64341
64985
|
});
|
|
64342
64986
|
DesignSystem.getOrCreate()
|
|
64343
64987
|
.withPrefix('nimble')
|
|
@@ -64439,7 +65083,7 @@ img.ProseMirror-separator {
|
|
|
64439
65083
|
|
|
64440
65084
|
const styles$5 = css `
|
|
64441
65085
|
${display('inline-flex')}
|
|
64442
|
-
${styles$
|
|
65086
|
+
${styles$B}
|
|
64443
65087
|
|
|
64444
65088
|
:host {
|
|
64445
65089
|
font: ${bodyFont};
|
|
@@ -64785,7 +65429,7 @@ img.ProseMirror-separator {
|
|
|
64785
65429
|
|
|
64786
65430
|
const styles$4 = css `
|
|
64787
65431
|
${display('inline-block')}
|
|
64788
|
-
${styles$
|
|
65432
|
+
${styles$B}
|
|
64789
65433
|
|
|
64790
65434
|
:host {
|
|
64791
65435
|
font: ${bodyFont};
|