@ni/nimble-components 20.1.0 → 20.1.2
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 +555 -175
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +1533 -1493
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/all-components.d.ts +2 -0
- package/dist/esm/all-components.js +2 -0
- package/dist/esm/all-components.js.map +1 -1
- package/dist/esm/mapping/base/index.d.ts +18 -0
- package/dist/esm/mapping/base/index.js +15 -0
- package/dist/esm/mapping/base/index.js.map +1 -0
- package/dist/esm/mapping/base/template.d.ts +1 -0
- package/dist/esm/mapping/base/template.js +3 -0
- package/dist/esm/mapping/base/template.js.map +1 -0
- package/dist/esm/mapping/base/types.d.ts +1 -0
- package/dist/esm/mapping/base/types.js +2 -0
- package/dist/esm/mapping/base/types.js.map +1 -0
- package/dist/esm/mapping/text/index.d.ts +14 -0
- package/dist/esm/mapping/text/index.js +17 -0
- package/dist/esm/mapping/text/index.js.map +1 -0
- package/dist/esm/src/all-components.d.ts +2 -0
- package/dist/esm/src/mapping/base/index.d.ts +18 -0
- package/dist/esm/src/mapping/base/template.d.ts +1 -0
- package/dist/esm/src/mapping/base/types.d.ts +1 -0
- package/dist/esm/src/mapping/text/index.d.ts +14 -0
- package/dist/esm/src/table/components/cell/index.d.ts +1 -0
- package/dist/esm/src/table/testing/table.pageobject.d.ts +3 -0
- package/dist/esm/src/table/types.d.ts +8 -0
- package/dist/esm/src/table-column/base/index.d.ts +1 -0
- package/dist/esm/src/table-column/date-text/group-header-view/index.d.ts +1 -1
- package/dist/esm/src/table-column/enum-base/index.d.ts +50 -0
- package/dist/esm/src/table-column/enum-base/models/mapping-config.d.ts +7 -0
- package/dist/esm/src/table-column/enum-base/models/mapping-key-resolver.d.ts +8 -0
- package/dist/esm/src/table-column/enum-base/models/mapping-text-config.d.ts +6 -0
- package/dist/esm/src/table-column/enum-base/models/table-column-enum-base-validator.d.ts +18 -0
- package/dist/esm/src/table-column/enum-base/styles.d.ts +1 -0
- package/dist/esm/src/table-column/enum-base/template.d.ts +3 -0
- package/dist/esm/src/table-column/enum-base/types.d.ts +10 -0
- package/dist/esm/src/table-column/enum-text/cell-view/index.d.ts +16 -0
- package/dist/esm/src/table-column/enum-text/group-header-view/index.d.ts +17 -0
- package/dist/esm/src/table-column/enum-text/index.d.ts +43 -0
- package/dist/esm/src/table-column/enum-text/models/table-column-enum-text-validator.d.ts +11 -0
- package/dist/esm/src/table-column/text/group-header-view/index.d.ts +1 -1
- package/dist/esm/table/components/cell/index.d.ts +1 -0
- package/dist/esm/table/components/cell/index.js +3 -0
- package/dist/esm/table/components/cell/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/testing/table.pageobject.d.ts +3 -0
- package/dist/esm/table/testing/table.pageobject.js +23 -0
- package/dist/esm/table/testing/table.pageobject.js.map +1 -1
- package/dist/esm/table/types.d.ts +8 -0
- package/dist/esm/table/types.js.map +1 -1
- package/dist/esm/table-column/anchor/index.js +2 -2
- package/dist/esm/table-column/anchor/index.js.map +1 -1
- package/dist/esm/table-column/base/index.d.ts +1 -0
- package/dist/esm/table-column/base/index.js +5 -0
- package/dist/esm/table-column/base/index.js.map +1 -1
- package/dist/esm/table-column/base/template.js +9 -11
- package/dist/esm/table-column/base/template.js.map +1 -1
- package/dist/esm/table-column/date-text/group-header-view/index.d.ts +1 -1
- package/dist/esm/table-column/date-text/group-header-view/index.js +2 -2
- package/dist/esm/table-column/date-text/group-header-view/index.js.map +1 -1
- package/dist/esm/table-column/date-text/index.js +2 -2
- package/dist/esm/table-column/date-text/index.js.map +1 -1
- package/dist/esm/table-column/enum-base/index.d.ts +50 -0
- package/dist/esm/table-column/enum-base/index.js +90 -0
- package/dist/esm/table-column/enum-base/index.js.map +1 -0
- package/dist/esm/table-column/enum-base/models/mapping-config.d.ts +7 -0
- package/dist/esm/table-column/enum-base/models/mapping-config.js +9 -0
- package/dist/esm/table-column/enum-base/models/mapping-config.js.map +1 -0
- package/dist/esm/table-column/enum-base/models/mapping-key-resolver.d.ts +8 -0
- package/dist/esm/table-column/enum-base/models/mapping-key-resolver.js +23 -0
- package/dist/esm/table-column/enum-base/models/mapping-key-resolver.js.map +1 -0
- package/dist/esm/table-column/enum-base/models/mapping-text-config.d.ts +6 -0
- package/dist/esm/table-column/enum-base/models/mapping-text-config.js +7 -0
- package/dist/esm/table-column/enum-base/models/mapping-text-config.js.map +1 -0
- package/dist/esm/table-column/enum-base/models/table-column-enum-base-validator.d.ts +18 -0
- package/dist/esm/table-column/enum-base/models/table-column-enum-base-validator.js +53 -0
- package/dist/esm/table-column/enum-base/models/table-column-enum-base-validator.js.map +1 -0
- package/dist/esm/table-column/enum-base/styles.d.ts +1 -0
- package/dist/esm/table-column/enum-base/styles.js +10 -0
- package/dist/esm/table-column/enum-base/styles.js.map +1 -0
- package/dist/esm/table-column/enum-base/template.d.ts +3 -0
- package/dist/esm/table-column/enum-base/template.js +4 -0
- package/dist/esm/table-column/enum-base/template.js.map +1 -0
- package/dist/esm/table-column/enum-base/types.d.ts +10 -0
- package/dist/esm/table-column/enum-base/types.js +10 -0
- package/dist/esm/table-column/enum-base/types.js.map +1 -0
- package/dist/esm/table-column/enum-text/cell-view/index.d.ts +16 -0
- package/dist/esm/table-column/enum-text/cell-view/index.js +33 -0
- package/dist/esm/table-column/enum-text/cell-view/index.js.map +1 -0
- package/dist/esm/table-column/enum-text/group-header-view/index.d.ts +17 -0
- package/dist/esm/table-column/enum-text/group-header-view/index.js +35 -0
- package/dist/esm/table-column/enum-text/group-header-view/index.js.map +1 -0
- package/dist/esm/table-column/enum-text/index.d.ts +43 -0
- package/dist/esm/table-column/enum-text/index.js +57 -0
- package/dist/esm/table-column/enum-text/index.js.map +1 -0
- package/dist/esm/table-column/enum-text/models/table-column-enum-text-validator.d.ts +11 -0
- package/dist/esm/table-column/enum-text/models/table-column-enum-text-validator.js +11 -0
- package/dist/esm/table-column/enum-text/models/table-column-enum-text-validator.js.map +1 -0
- package/dist/esm/table-column/text/group-header-view/index.d.ts +1 -1
- package/dist/esm/table-column/text/group-header-view/index.js +2 -2
- package/dist/esm/table-column/text/group-header-view/index.js.map +1 -1
- package/dist/esm/table-column/text/index.js +2 -2
- package/dist/esm/table-column/text/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -16288,7 +16288,7 @@
|
|
|
16288
16288
|
|
|
16289
16289
|
/**
|
|
16290
16290
|
* Do not edit directly
|
|
16291
|
-
* Generated on
|
|
16291
|
+
* Generated on Thu, 03 Aug 2023 22:33:38 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$y = html `<slot></slot>`;
|
|
16675
16675
|
|
|
16676
|
-
const styles$
|
|
16676
|
+
const styles$S = 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$S,
|
|
16733
|
+
template: template$y
|
|
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$R = 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$x = (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$x,
|
|
17084
|
+
styles: styles$R,
|
|
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$Q = 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$P = css `
|
|
17463
|
+
${styles$Q}
|
|
17464
17464
|
${buttonAppearanceVariantStyles}
|
|
17465
17465
|
|
|
17466
17466
|
.control {
|
|
@@ -17468,7 +17468,7 @@
|
|
|
17468
17468
|
}
|
|
17469
17469
|
`;
|
|
17470
17470
|
|
|
17471
|
-
const template$
|
|
17471
|
+
const template$w = (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$w,
|
|
17554
|
+
styles: styles$P,
|
|
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$O = 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$v = (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$v,
|
|
17746
|
+
styles: styles$O,
|
|
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$N = css `
|
|
17771
17771
|
${display('inline-flex')}
|
|
17772
17772
|
|
|
17773
17773
|
:host {
|
|
@@ -17873,8 +17873,8 @@
|
|
|
17873
17873
|
}
|
|
17874
17874
|
`;
|
|
17875
17875
|
|
|
17876
|
-
const styles$
|
|
17877
|
-
${styles$
|
|
17876
|
+
const styles$M = css `
|
|
17877
|
+
${styles$N}
|
|
17878
17878
|
|
|
17879
17879
|
a {
|
|
17880
17880
|
text-decoration: none;
|
|
@@ -17892,7 +17892,7 @@
|
|
|
17892
17892
|
}
|
|
17893
17893
|
`;
|
|
17894
17894
|
|
|
17895
|
-
const template$
|
|
17895
|
+
const template$u = (context, definition) => html `
|
|
17896
17896
|
<template slot="anchortab" role="tab" aria-disabled="${x => x.disabled}">
|
|
17897
17897
|
<a
|
|
17898
17898
|
download="${x => x.download}"
|
|
@@ -17945,13 +17945,13 @@
|
|
|
17945
17945
|
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
17946
17946
|
const nimbleAnchorTab = AnchorTab.compose({
|
|
17947
17947
|
baseName: 'anchor-tab',
|
|
17948
|
-
template: template$
|
|
17949
|
-
styles: styles$
|
|
17948
|
+
template: template$u,
|
|
17949
|
+
styles: styles$M
|
|
17950
17950
|
});
|
|
17951
17951
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTab());
|
|
17952
17952
|
DesignSystem.tagFor(AnchorTab);
|
|
17953
17953
|
|
|
17954
|
-
const styles$
|
|
17954
|
+
const styles$L = css `
|
|
17955
17955
|
${display('grid')}
|
|
17956
17956
|
|
|
17957
17957
|
:host {
|
|
@@ -17973,7 +17973,7 @@
|
|
|
17973
17973
|
}
|
|
17974
17974
|
`;
|
|
17975
17975
|
|
|
17976
|
-
const template$
|
|
17976
|
+
const template$t = (context, definition) => html `
|
|
17977
17977
|
${startSlotTemplate(context, definition)}
|
|
17978
17978
|
<div ${ref('tablist')} class="tablist" part="tablist" role="tablist">
|
|
17979
17979
|
<slot name="anchortab" ${slotted('tabs')}></slot>
|
|
@@ -18173,8 +18173,8 @@
|
|
|
18173
18173
|
applyMixins(AnchorTabs, StartEnd);
|
|
18174
18174
|
const nimbleAnchorTabs = AnchorTabs.compose({
|
|
18175
18175
|
baseName: 'anchor-tabs',
|
|
18176
|
-
template: template$
|
|
18177
|
-
styles: styles$
|
|
18176
|
+
template: template$t,
|
|
18177
|
+
styles: styles$L,
|
|
18178
18178
|
shadowOptions: {
|
|
18179
18179
|
delegatesFocus: false
|
|
18180
18180
|
}
|
|
@@ -18191,7 +18191,7 @@
|
|
|
18191
18191
|
-webkit-user-select: none;
|
|
18192
18192
|
`;
|
|
18193
18193
|
|
|
18194
|
-
const styles$
|
|
18194
|
+
const styles$K = css `
|
|
18195
18195
|
${display('block')}
|
|
18196
18196
|
|
|
18197
18197
|
:host {
|
|
@@ -18292,7 +18292,7 @@
|
|
|
18292
18292
|
}
|
|
18293
18293
|
`;
|
|
18294
18294
|
|
|
18295
|
-
const template$
|
|
18295
|
+
const template$s = (context, definition) => html `
|
|
18296
18296
|
<template
|
|
18297
18297
|
role="treeitem"
|
|
18298
18298
|
slot="${x => (x.isNestedItem() ? 'item' : null)}"
|
|
@@ -18429,8 +18429,8 @@
|
|
|
18429
18429
|
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
18430
18430
|
const nimbleAnchorTreeItem = AnchorTreeItem.compose({
|
|
18431
18431
|
baseName: 'anchor-tree-item',
|
|
18432
|
-
template: template$
|
|
18433
|
-
styles: styles$
|
|
18432
|
+
template: template$s,
|
|
18433
|
+
styles: styles$K,
|
|
18434
18434
|
shadowOptions: {
|
|
18435
18435
|
delegatesFocus: true
|
|
18436
18436
|
}
|
|
@@ -18440,7 +18440,7 @@
|
|
|
18440
18440
|
.register(nimbleAnchorTreeItem());
|
|
18441
18441
|
DesignSystem.tagFor(AnchorTreeItem);
|
|
18442
18442
|
|
|
18443
|
-
const styles$
|
|
18443
|
+
const styles$J = css `
|
|
18444
18444
|
:host {
|
|
18445
18445
|
contain: layout;
|
|
18446
18446
|
display: block;
|
|
@@ -18464,7 +18464,7 @@
|
|
|
18464
18464
|
baseName: 'anchored-region',
|
|
18465
18465
|
baseClass: AnchoredRegion$1,
|
|
18466
18466
|
template: anchoredRegionTemplate,
|
|
18467
|
-
styles: styles$
|
|
18467
|
+
styles: styles$J
|
|
18468
18468
|
});
|
|
18469
18469
|
DesignSystem.getOrCreate()
|
|
18470
18470
|
.withPrefix('nimble')
|
|
@@ -18544,7 +18544,7 @@
|
|
|
18544
18544
|
*/
|
|
18545
18545
|
const themeBehavior = (theme, styles) => new ThemeStyleSheetBehavior(theme, styles);
|
|
18546
18546
|
|
|
18547
|
-
const styles$
|
|
18547
|
+
const styles$I = css `
|
|
18548
18548
|
${display('flex')}
|
|
18549
18549
|
|
|
18550
18550
|
:host {
|
|
@@ -18702,8 +18702,8 @@
|
|
|
18702
18702
|
}
|
|
18703
18703
|
`));
|
|
18704
18704
|
|
|
18705
|
-
const styles$
|
|
18706
|
-
${styles$
|
|
18705
|
+
const styles$H = css `
|
|
18706
|
+
${styles$Q}
|
|
18707
18707
|
${buttonAppearanceVariantStyles}
|
|
18708
18708
|
`;
|
|
18709
18709
|
|
|
@@ -18749,7 +18749,7 @@
|
|
|
18749
18749
|
baseName: 'button',
|
|
18750
18750
|
baseClass: Button$1,
|
|
18751
18751
|
template: buttonTemplate,
|
|
18752
|
-
styles: styles$
|
|
18752
|
+
styles: styles$H,
|
|
18753
18753
|
shadowOptions: {
|
|
18754
18754
|
delegatesFocus: true
|
|
18755
18755
|
}
|
|
@@ -19407,13 +19407,13 @@
|
|
|
19407
19407
|
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>`
|
|
19408
19408
|
};
|
|
19409
19409
|
|
|
19410
|
-
const template$
|
|
19410
|
+
const template$r = html `
|
|
19411
19411
|
<template>
|
|
19412
19412
|
<div class="icon" :innerHTML=${x => x.icon.data}></div>
|
|
19413
19413
|
</template
|
|
19414
19414
|
`;
|
|
19415
19415
|
|
|
19416
|
-
const styles$
|
|
19416
|
+
const styles$G = css `
|
|
19417
19417
|
${display('inline-flex')}
|
|
19418
19418
|
|
|
19419
19419
|
:host {
|
|
@@ -19486,8 +19486,8 @@
|
|
|
19486
19486
|
const registerIcon = (baseName, iconClass) => {
|
|
19487
19487
|
const composedIcon = iconClass.compose({
|
|
19488
19488
|
baseName,
|
|
19489
|
-
template: template$
|
|
19490
|
-
styles: styles$
|
|
19489
|
+
template: template$r,
|
|
19490
|
+
styles: styles$G,
|
|
19491
19491
|
baseClass: iconClass
|
|
19492
19492
|
});
|
|
19493
19493
|
DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
|
|
@@ -19576,7 +19576,7 @@
|
|
|
19576
19576
|
}).withDefault(coreLabelDefaults.numericIncrementLabel);
|
|
19577
19577
|
|
|
19578
19578
|
// prettier-ignore
|
|
19579
|
-
const template$
|
|
19579
|
+
const template$q = html `
|
|
19580
19580
|
<div class="container"
|
|
19581
19581
|
role="status"
|
|
19582
19582
|
aria-atomic="${x => x.ariaAtomic}"
|
|
@@ -19692,13 +19692,13 @@
|
|
|
19692
19692
|
applyMixins(Banner, ARIAGlobalStatesAndProperties);
|
|
19693
19693
|
const nimbleBanner = Banner.compose({
|
|
19694
19694
|
baseName: 'banner',
|
|
19695
|
-
template: template$
|
|
19696
|
-
styles: styles$
|
|
19695
|
+
template: template$q,
|
|
19696
|
+
styles: styles$I
|
|
19697
19697
|
});
|
|
19698
19698
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBanner());
|
|
19699
19699
|
DesignSystem.tagFor(Banner);
|
|
19700
19700
|
|
|
19701
|
-
const styles$
|
|
19701
|
+
const styles$F = css `
|
|
19702
19702
|
${display('inline-block')}
|
|
19703
19703
|
|
|
19704
19704
|
:host {
|
|
@@ -19739,12 +19739,12 @@
|
|
|
19739
19739
|
baseName: 'breadcrumb',
|
|
19740
19740
|
baseClass: Breadcrumb$1,
|
|
19741
19741
|
template: breadcrumbTemplate,
|
|
19742
|
-
styles: styles$
|
|
19742
|
+
styles: styles$F
|
|
19743
19743
|
});
|
|
19744
19744
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
|
|
19745
19745
|
DesignSystem.tagFor(Breadcrumb);
|
|
19746
19746
|
|
|
19747
|
-
const styles$
|
|
19747
|
+
const styles$E = css `
|
|
19748
19748
|
${display('inline-flex')}
|
|
19749
19749
|
|
|
19750
19750
|
:host {
|
|
@@ -19818,7 +19818,7 @@
|
|
|
19818
19818
|
baseName: 'breadcrumb-item',
|
|
19819
19819
|
baseClass: BreadcrumbItem$1,
|
|
19820
19820
|
template: breadcrumbItemTemplate,
|
|
19821
|
-
styles: styles$
|
|
19821
|
+
styles: styles$E,
|
|
19822
19822
|
separator: forwardSlash16X16.data
|
|
19823
19823
|
});
|
|
19824
19824
|
DesignSystem.getOrCreate()
|
|
@@ -19826,7 +19826,7 @@
|
|
|
19826
19826
|
.register(nimbleBreadcrumbItem());
|
|
19827
19827
|
DesignSystem.tagFor(BreadcrumbItem);
|
|
19828
19828
|
|
|
19829
|
-
const styles$
|
|
19829
|
+
const styles$D = css `
|
|
19830
19830
|
${display('inline-flex')}
|
|
19831
19831
|
|
|
19832
19832
|
:host {
|
|
@@ -19985,7 +19985,7 @@
|
|
|
19985
19985
|
const nimbleCardButton = CardButton.compose({
|
|
19986
19986
|
baseName: 'card-button',
|
|
19987
19987
|
template: buttonTemplate,
|
|
19988
|
-
styles: styles$
|
|
19988
|
+
styles: styles$D,
|
|
19989
19989
|
shadowOptions: {
|
|
19990
19990
|
delegatesFocus: true
|
|
19991
19991
|
}
|
|
@@ -19993,7 +19993,7 @@
|
|
|
19993
19993
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCardButton());
|
|
19994
19994
|
DesignSystem.tagFor(CardButton);
|
|
19995
19995
|
|
|
19996
|
-
const styles$
|
|
19996
|
+
const styles$C = css `
|
|
19997
19997
|
${display('inline-flex')}
|
|
19998
19998
|
|
|
19999
19999
|
:host {
|
|
@@ -20111,15 +20111,15 @@
|
|
|
20111
20111
|
baseName: 'checkbox',
|
|
20112
20112
|
baseClass: Checkbox$1,
|
|
20113
20113
|
template: checkboxTemplate,
|
|
20114
|
-
styles: styles$
|
|
20114
|
+
styles: styles$C,
|
|
20115
20115
|
checkedIndicator: check16X16.data,
|
|
20116
20116
|
indeterminateIndicator: minus16X16.data
|
|
20117
20117
|
});
|
|
20118
20118
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCheckbox());
|
|
20119
20119
|
const checkboxTag = DesignSystem.tagFor(Checkbox);
|
|
20120
20120
|
|
|
20121
|
-
const styles$
|
|
20122
|
-
${styles$
|
|
20121
|
+
const styles$B = css `
|
|
20122
|
+
${styles$Q}
|
|
20123
20123
|
|
|
20124
20124
|
@layer base {
|
|
20125
20125
|
.control[aria-pressed='true'] {
|
|
@@ -20198,7 +20198,7 @@
|
|
|
20198
20198
|
}
|
|
20199
20199
|
`;
|
|
20200
20200
|
|
|
20201
|
-
const template$
|
|
20201
|
+
const template$p = (context, definition) => html `
|
|
20202
20202
|
<div
|
|
20203
20203
|
role="button"
|
|
20204
20204
|
part="control"
|
|
@@ -20273,8 +20273,8 @@
|
|
|
20273
20273
|
applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
|
|
20274
20274
|
const nimbleToggleButton = ToggleButton.compose({
|
|
20275
20275
|
baseName: 'toggle-button',
|
|
20276
|
-
template: template$
|
|
20277
|
-
styles: styles$
|
|
20276
|
+
template: template$p,
|
|
20277
|
+
styles: styles$B,
|
|
20278
20278
|
shadowOptions: {
|
|
20279
20279
|
delegatesFocus: true
|
|
20280
20280
|
}
|
|
@@ -20311,7 +20311,7 @@
|
|
|
20311
20311
|
block: 'block'
|
|
20312
20312
|
};
|
|
20313
20313
|
|
|
20314
|
-
const styles$
|
|
20314
|
+
const styles$A = css `
|
|
20315
20315
|
${display('inline-flex')}
|
|
20316
20316
|
|
|
20317
20317
|
:host {
|
|
@@ -20537,7 +20537,7 @@
|
|
|
20537
20537
|
}
|
|
20538
20538
|
`));
|
|
20539
20539
|
|
|
20540
|
-
const styles$
|
|
20540
|
+
const styles$z = css `
|
|
20541
20541
|
.error-icon {
|
|
20542
20542
|
display: none;
|
|
20543
20543
|
}
|
|
@@ -20571,9 +20571,9 @@
|
|
|
20571
20571
|
}
|
|
20572
20572
|
`;
|
|
20573
20573
|
|
|
20574
|
-
const styles$
|
|
20574
|
+
const styles$y = css `
|
|
20575
|
+
${styles$A}
|
|
20575
20576
|
${styles$z}
|
|
20576
|
-
${styles$y}
|
|
20577
20577
|
|
|
20578
20578
|
:host {
|
|
20579
20579
|
--ni-private-hover-bottom-border-width: 2px;
|
|
@@ -20654,7 +20654,7 @@
|
|
|
20654
20654
|
`));
|
|
20655
20655
|
|
|
20656
20656
|
// prettier-ignore
|
|
20657
|
-
const template$
|
|
20657
|
+
const template$o = (context, definition) => html `
|
|
20658
20658
|
<template
|
|
20659
20659
|
aria-disabled="${x => x.ariaDisabled}"
|
|
20660
20660
|
autocomplete="${x => x.autocomplete}"
|
|
@@ -20925,8 +20925,8 @@
|
|
|
20925
20925
|
const nimbleCombobox = Combobox.compose({
|
|
20926
20926
|
baseName: 'combobox',
|
|
20927
20927
|
baseClass: Combobox$1,
|
|
20928
|
-
template: template$
|
|
20929
|
-
styles: styles$
|
|
20928
|
+
template: template$o,
|
|
20929
|
+
styles: styles$y,
|
|
20930
20930
|
shadowOptions: {
|
|
20931
20931
|
delegatesFocus: true
|
|
20932
20932
|
},
|
|
@@ -20971,7 +20971,7 @@
|
|
|
20971
20971
|
*/
|
|
20972
20972
|
const UserDismissed = Symbol('user dismissed');
|
|
20973
20973
|
|
|
20974
|
-
const styles$
|
|
20974
|
+
const styles$x = css `
|
|
20975
20975
|
${display('grid')}
|
|
20976
20976
|
|
|
20977
20977
|
dialog {
|
|
@@ -21087,7 +21087,7 @@
|
|
|
21087
21087
|
}
|
|
21088
21088
|
`));
|
|
21089
21089
|
|
|
21090
|
-
const template$
|
|
21090
|
+
const template$n = html `
|
|
21091
21091
|
<template>
|
|
21092
21092
|
<dialog
|
|
21093
21093
|
${ref('dialogElement')}
|
|
@@ -21213,14 +21213,14 @@
|
|
|
21213
21213
|
applyMixins(Dialog, ARIAGlobalStatesAndProperties);
|
|
21214
21214
|
const nimbleDialog = Dialog.compose({
|
|
21215
21215
|
baseName: 'dialog',
|
|
21216
|
-
template: template$
|
|
21217
|
-
styles: styles$
|
|
21216
|
+
template: template$n,
|
|
21217
|
+
styles: styles$x,
|
|
21218
21218
|
baseClass: Dialog
|
|
21219
21219
|
});
|
|
21220
21220
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDialog());
|
|
21221
21221
|
DesignSystem.tagFor(Dialog);
|
|
21222
21222
|
|
|
21223
|
-
const styles$
|
|
21223
|
+
const styles$w = css `
|
|
21224
21224
|
${display('block')}
|
|
21225
21225
|
|
|
21226
21226
|
:host {
|
|
@@ -21373,7 +21373,7 @@
|
|
|
21373
21373
|
}
|
|
21374
21374
|
`));
|
|
21375
21375
|
|
|
21376
|
-
const template$
|
|
21376
|
+
const template$m = html `
|
|
21377
21377
|
<dialog
|
|
21378
21378
|
${ref('dialog')}
|
|
21379
21379
|
aria-label="${x => x.ariaLabel}"
|
|
@@ -21487,8 +21487,8 @@
|
|
|
21487
21487
|
applyMixins(Drawer, ARIAGlobalStatesAndProperties);
|
|
21488
21488
|
const nimbleDrawer = Drawer.compose({
|
|
21489
21489
|
baseName: 'drawer',
|
|
21490
|
-
template: template$
|
|
21491
|
-
styles: styles$
|
|
21490
|
+
template: template$m,
|
|
21491
|
+
styles: styles$w
|
|
21492
21492
|
});
|
|
21493
21493
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
|
|
21494
21494
|
DesignSystem.tagFor(Drawer);
|
|
@@ -23685,7 +23685,7 @@
|
|
|
23685
23685
|
.register(nimbleLabelProviderTable());
|
|
23686
23686
|
DesignSystem.tagFor(LabelProviderTable);
|
|
23687
23687
|
|
|
23688
|
-
const styles$
|
|
23688
|
+
const styles$v = css `
|
|
23689
23689
|
${display('flex')}
|
|
23690
23690
|
|
|
23691
23691
|
:host {
|
|
@@ -23773,12 +23773,40 @@
|
|
|
23773
23773
|
baseName: 'list-option',
|
|
23774
23774
|
baseClass: ListboxOption,
|
|
23775
23775
|
template: listboxOptionTemplate,
|
|
23776
|
-
styles: styles$
|
|
23776
|
+
styles: styles$v
|
|
23777
23777
|
});
|
|
23778
23778
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleListOption());
|
|
23779
23779
|
DesignSystem.tagFor(ListOption);
|
|
23780
23780
|
|
|
23781
|
-
|
|
23781
|
+
/**
|
|
23782
|
+
* Base class for mapping configuration elements
|
|
23783
|
+
*/
|
|
23784
|
+
class Mapping extends FoundationElement {
|
|
23785
|
+
}
|
|
23786
|
+
__decorate$1([
|
|
23787
|
+
attr()
|
|
23788
|
+
], Mapping.prototype, "key", void 0);
|
|
23789
|
+
__decorate$1([
|
|
23790
|
+
attr()
|
|
23791
|
+
], Mapping.prototype, "text", void 0);
|
|
23792
|
+
|
|
23793
|
+
const template$l = html `<template slot="mapping"></template>`;
|
|
23794
|
+
|
|
23795
|
+
/**
|
|
23796
|
+
* Defines a mapping from one data value ('key' property) to display text ('text' property).
|
|
23797
|
+
* One or more may be added as children of a nimble-table-column-enum-text element to define
|
|
23798
|
+
* how a specific data value should be displayed as text in that column's cells.
|
|
23799
|
+
*/
|
|
23800
|
+
class MappingText extends Mapping {
|
|
23801
|
+
}
|
|
23802
|
+
const textMapping = MappingText.compose({
|
|
23803
|
+
baseName: 'mapping-text',
|
|
23804
|
+
template: template$l
|
|
23805
|
+
});
|
|
23806
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(textMapping());
|
|
23807
|
+
DesignSystem.tagFor(MappingText);
|
|
23808
|
+
|
|
23809
|
+
const styles$u = css `
|
|
23782
23810
|
${display('grid')}
|
|
23783
23811
|
|
|
23784
23812
|
:host {
|
|
@@ -23845,12 +23873,12 @@
|
|
|
23845
23873
|
baseName: 'menu',
|
|
23846
23874
|
baseClass: Menu$1,
|
|
23847
23875
|
template: menuTemplate,
|
|
23848
|
-
styles: styles$
|
|
23876
|
+
styles: styles$u
|
|
23849
23877
|
});
|
|
23850
23878
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenu());
|
|
23851
23879
|
DesignSystem.tagFor(Menu);
|
|
23852
23880
|
|
|
23853
|
-
const styles$
|
|
23881
|
+
const styles$t = css `
|
|
23854
23882
|
${display('inline-block')}
|
|
23855
23883
|
|
|
23856
23884
|
:host {
|
|
@@ -23869,7 +23897,7 @@
|
|
|
23869
23897
|
`;
|
|
23870
23898
|
|
|
23871
23899
|
// prettier-ignore
|
|
23872
|
-
const template$
|
|
23900
|
+
const template$k = html `
|
|
23873
23901
|
<template
|
|
23874
23902
|
?open="${x => x.open}"
|
|
23875
23903
|
@focusout="${(x, c) => x.focusoutHandler(c.event)}"
|
|
@@ -24124,8 +24152,8 @@
|
|
|
24124
24152
|
], MenuButton.prototype, "slottedMenus", void 0);
|
|
24125
24153
|
const nimbleMenuButton = MenuButton.compose({
|
|
24126
24154
|
baseName: 'menu-button',
|
|
24127
|
-
template: template$
|
|
24128
|
-
styles: styles$
|
|
24155
|
+
template: template$k,
|
|
24156
|
+
styles: styles$t,
|
|
24129
24157
|
shadowOptions: {
|
|
24130
24158
|
delegatesFocus: true
|
|
24131
24159
|
}
|
|
@@ -24133,7 +24161,7 @@
|
|
|
24133
24161
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuButton());
|
|
24134
24162
|
const menuButtonTag = DesignSystem.tagFor(MenuButton);
|
|
24135
24163
|
|
|
24136
|
-
const styles$
|
|
24164
|
+
const styles$s = css `
|
|
24137
24165
|
${display('grid')}
|
|
24138
24166
|
|
|
24139
24167
|
:host {
|
|
@@ -24231,7 +24259,7 @@
|
|
|
24231
24259
|
baseName: 'menu-item',
|
|
24232
24260
|
baseClass: MenuItem$1,
|
|
24233
24261
|
template: menuItemTemplate,
|
|
24234
|
-
styles: styles$
|
|
24262
|
+
styles: styles$s,
|
|
24235
24263
|
expandCollapseGlyph: arrowExpanderRight16X16.data
|
|
24236
24264
|
});
|
|
24237
24265
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuItem());
|
|
@@ -24246,9 +24274,9 @@
|
|
|
24246
24274
|
block: 'block'
|
|
24247
24275
|
};
|
|
24248
24276
|
|
|
24249
|
-
const styles$
|
|
24277
|
+
const styles$r = css `
|
|
24250
24278
|
${display('inline-block')}
|
|
24251
|
-
${styles$
|
|
24279
|
+
${styles$z}
|
|
24252
24280
|
|
|
24253
24281
|
:host {
|
|
24254
24282
|
font: ${bodyFont};
|
|
@@ -24462,7 +24490,7 @@
|
|
|
24462
24490
|
baseName: 'number-field',
|
|
24463
24491
|
baseClass: NumberField$1,
|
|
24464
24492
|
template: numberFieldTemplate,
|
|
24465
|
-
styles: styles$
|
|
24493
|
+
styles: styles$r,
|
|
24466
24494
|
shadowOptions: {
|
|
24467
24495
|
delegatesFocus: true
|
|
24468
24496
|
},
|
|
@@ -24504,7 +24532,7 @@
|
|
|
24504
24532
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
|
|
24505
24533
|
DesignSystem.tagFor(NumberField);
|
|
24506
24534
|
|
|
24507
|
-
const styles$
|
|
24535
|
+
const styles$q = css `
|
|
24508
24536
|
${display('inline-flex')}
|
|
24509
24537
|
|
|
24510
24538
|
:host {
|
|
@@ -24605,13 +24633,13 @@
|
|
|
24605
24633
|
baseName: 'radio',
|
|
24606
24634
|
baseClass: Radio$1,
|
|
24607
24635
|
template: radioTemplate,
|
|
24608
|
-
styles: styles$
|
|
24636
|
+
styles: styles$q,
|
|
24609
24637
|
checkedIndicator: circleFilled16X16.data
|
|
24610
24638
|
});
|
|
24611
24639
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadio());
|
|
24612
24640
|
DesignSystem.tagFor(Radio);
|
|
24613
24641
|
|
|
24614
|
-
const styles$
|
|
24642
|
+
const styles$p = css `
|
|
24615
24643
|
${display('inline-block')}
|
|
24616
24644
|
|
|
24617
24645
|
.positioning-region {
|
|
@@ -24646,7 +24674,7 @@
|
|
|
24646
24674
|
baseName: 'radio-group',
|
|
24647
24675
|
baseClass: RadioGroup$1,
|
|
24648
24676
|
template: radioGroupTemplate,
|
|
24649
|
-
styles: styles$
|
|
24677
|
+
styles: styles$p,
|
|
24650
24678
|
shadowOptions: {
|
|
24651
24679
|
delegatesFocus: true
|
|
24652
24680
|
}
|
|
@@ -24654,11 +24682,11 @@
|
|
|
24654
24682
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadioGroup());
|
|
24655
24683
|
DesignSystem.tagFor(RadioGroup);
|
|
24656
24684
|
|
|
24657
|
-
const template$
|
|
24685
|
+
const template$j = html `
|
|
24658
24686
|
<template> Rich Text Editor here. </template>
|
|
24659
24687
|
`;
|
|
24660
24688
|
|
|
24661
|
-
const styles$
|
|
24689
|
+
const styles$o = css `
|
|
24662
24690
|
${display('flex')}
|
|
24663
24691
|
|
|
24664
24692
|
:host {
|
|
@@ -24674,8 +24702,8 @@
|
|
|
24674
24702
|
}
|
|
24675
24703
|
const nimbleRichTextEditor = RichTextEditor.compose({
|
|
24676
24704
|
baseName: 'rich-text-editor',
|
|
24677
|
-
template: template$
|
|
24678
|
-
styles: styles$
|
|
24705
|
+
template: template$j,
|
|
24706
|
+
styles: styles$o
|
|
24679
24707
|
});
|
|
24680
24708
|
DesignSystem.getOrCreate()
|
|
24681
24709
|
.withPrefix('nimble')
|
|
@@ -40196,11 +40224,11 @@
|
|
|
40196
40224
|
code_inline: { mark: "code", noCloseToken: true }
|
|
40197
40225
|
});
|
|
40198
40226
|
|
|
40199
|
-
const template$
|
|
40227
|
+
const template$i = html `
|
|
40200
40228
|
<div ${ref('viewer')} class="viewer"></div>
|
|
40201
40229
|
`;
|
|
40202
40230
|
|
|
40203
|
-
const styles$
|
|
40231
|
+
const styles$n = css `
|
|
40204
40232
|
${display('flex')}
|
|
40205
40233
|
|
|
40206
40234
|
:host {
|
|
@@ -40324,17 +40352,17 @@
|
|
|
40324
40352
|
], RichTextViewer.prototype, "markdown", void 0);
|
|
40325
40353
|
const nimbleRichTextViewer = RichTextViewer.compose({
|
|
40326
40354
|
baseName: 'rich-text-viewer',
|
|
40327
|
-
template: template$
|
|
40328
|
-
styles: styles$
|
|
40355
|
+
template: template$i,
|
|
40356
|
+
styles: styles$n
|
|
40329
40357
|
});
|
|
40330
40358
|
DesignSystem.getOrCreate()
|
|
40331
40359
|
.withPrefix('nimble')
|
|
40332
40360
|
.register(nimbleRichTextViewer());
|
|
40333
40361
|
DesignSystem.tagFor(RichTextViewer);
|
|
40334
40362
|
|
|
40335
|
-
const styles$
|
|
40363
|
+
const styles$m = css `
|
|
40364
|
+
${styles$A}
|
|
40336
40365
|
${styles$z}
|
|
40337
|
-
${styles$y}
|
|
40338
40366
|
|
|
40339
40367
|
${
|
|
40340
40368
|
/* We are using flex `order` to define the visual ordering of the selected value,
|
|
@@ -40362,7 +40390,7 @@
|
|
|
40362
40390
|
`));
|
|
40363
40391
|
|
|
40364
40392
|
// prettier-ignore
|
|
40365
|
-
const template$
|
|
40393
|
+
const template$h = (context, definition) => html `
|
|
40366
40394
|
<template
|
|
40367
40395
|
class="${x => [
|
|
40368
40396
|
x.collapsible && 'collapsible',
|
|
@@ -40500,8 +40528,8 @@
|
|
|
40500
40528
|
const nimbleSelect = Select.compose({
|
|
40501
40529
|
baseName: 'select',
|
|
40502
40530
|
baseClass: Select$1,
|
|
40503
|
-
template: template$
|
|
40504
|
-
styles: styles$
|
|
40531
|
+
template: template$h,
|
|
40532
|
+
styles: styles$m,
|
|
40505
40533
|
indicator: arrowExpanderDown16X16.data,
|
|
40506
40534
|
end: html `
|
|
40507
40535
|
<${iconExclamationMarkTag}
|
|
@@ -40514,7 +40542,7 @@
|
|
|
40514
40542
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSelect());
|
|
40515
40543
|
DesignSystem.tagFor(Select);
|
|
40516
40544
|
|
|
40517
|
-
const styles$
|
|
40545
|
+
const styles$l = css `
|
|
40518
40546
|
${display('inline-flex')}
|
|
40519
40547
|
|
|
40520
40548
|
:host {
|
|
@@ -40674,7 +40702,7 @@
|
|
|
40674
40702
|
}
|
|
40675
40703
|
`));
|
|
40676
40704
|
|
|
40677
|
-
const template$
|
|
40705
|
+
const template$g = html `
|
|
40678
40706
|
<template role="progressbar">
|
|
40679
40707
|
<div class="container">
|
|
40680
40708
|
<div class="bit1"></div>
|
|
@@ -40712,13 +40740,13 @@
|
|
|
40712
40740
|
], Spinner.prototype, "appearance", void 0);
|
|
40713
40741
|
const nimbleSpinner = Spinner.compose({
|
|
40714
40742
|
baseName: 'spinner',
|
|
40715
|
-
template: template$
|
|
40716
|
-
styles: styles$
|
|
40743
|
+
template: template$g,
|
|
40744
|
+
styles: styles$l
|
|
40717
40745
|
});
|
|
40718
40746
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSpinner());
|
|
40719
40747
|
DesignSystem.tagFor(Spinner);
|
|
40720
40748
|
|
|
40721
|
-
const styles$
|
|
40749
|
+
const styles$k = css `
|
|
40722
40750
|
${display('inline-flex')}
|
|
40723
40751
|
|
|
40724
40752
|
:host {
|
|
@@ -40881,7 +40909,7 @@
|
|
|
40881
40909
|
`));
|
|
40882
40910
|
|
|
40883
40911
|
// prettier-ignore
|
|
40884
|
-
const template$
|
|
40912
|
+
const template$f = html `
|
|
40885
40913
|
<template
|
|
40886
40914
|
role="switch"
|
|
40887
40915
|
aria-checked="${x => x.checked}"
|
|
@@ -40925,8 +40953,8 @@
|
|
|
40925
40953
|
const nimbleSwitch = Switch.compose({
|
|
40926
40954
|
baseClass: Switch$1,
|
|
40927
40955
|
baseName: 'switch',
|
|
40928
|
-
template: template$
|
|
40929
|
-
styles: styles$
|
|
40956
|
+
template: template$f,
|
|
40957
|
+
styles: styles$k
|
|
40930
40958
|
});
|
|
40931
40959
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSwitch());
|
|
40932
40960
|
DesignSystem.tagFor(Switch);
|
|
@@ -40940,12 +40968,12 @@
|
|
|
40940
40968
|
baseName: 'tab',
|
|
40941
40969
|
baseClass: Tab$2,
|
|
40942
40970
|
template: tabTemplate,
|
|
40943
|
-
styles: styles$
|
|
40971
|
+
styles: styles$N
|
|
40944
40972
|
});
|
|
40945
40973
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTab());
|
|
40946
40974
|
DesignSystem.tagFor(Tab);
|
|
40947
40975
|
|
|
40948
|
-
const styles$
|
|
40976
|
+
const styles$j = css `
|
|
40949
40977
|
${display('block')}
|
|
40950
40978
|
|
|
40951
40979
|
:host {
|
|
@@ -40965,7 +40993,7 @@
|
|
|
40965
40993
|
baseName: 'tab-panel',
|
|
40966
40994
|
baseClass: TabPanel$1,
|
|
40967
40995
|
template: tabPanelTemplate,
|
|
40968
|
-
styles: styles$
|
|
40996
|
+
styles: styles$j
|
|
40969
40997
|
});
|
|
40970
40998
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabPanel());
|
|
40971
40999
|
DesignSystem.tagFor(TabPanel);
|
|
@@ -44519,6 +44547,11 @@
|
|
|
44519
44547
|
.map(node => node.textContent?.trim())
|
|
44520
44548
|
.join(' ');
|
|
44521
44549
|
}
|
|
44550
|
+
connectedCallback() {
|
|
44551
|
+
super.connectedCallback();
|
|
44552
|
+
// Done here to enforce consistency across headers as they may have custom templates
|
|
44553
|
+
this.setAttribute('slot', this.columnInternals.uniqueId);
|
|
44554
|
+
}
|
|
44522
44555
|
sortDirectionChanged() {
|
|
44523
44556
|
if (!this.sortingDisabled) {
|
|
44524
44557
|
this.columnInternals.currentSortDirection = this.sortDirection;
|
|
@@ -44682,7 +44715,7 @@
|
|
|
44682
44715
|
}
|
|
44683
44716
|
}
|
|
44684
44717
|
|
|
44685
|
-
const styles$
|
|
44718
|
+
const styles$i = css `
|
|
44686
44719
|
${display('flex')}
|
|
44687
44720
|
|
|
44688
44721
|
:host {
|
|
@@ -44862,7 +44895,7 @@
|
|
|
44862
44895
|
}
|
|
44863
44896
|
`));
|
|
44864
44897
|
|
|
44865
|
-
const styles$
|
|
44898
|
+
const styles$h = css `
|
|
44866
44899
|
${display('flex')}
|
|
44867
44900
|
|
|
44868
44901
|
:host {
|
|
@@ -44884,7 +44917,7 @@
|
|
|
44884
44917
|
`;
|
|
44885
44918
|
|
|
44886
44919
|
// prettier-ignore
|
|
44887
|
-
const template$
|
|
44920
|
+
const template$e = html `
|
|
44888
44921
|
<template role="columnheader"
|
|
44889
44922
|
aria-sort="${x => x.ariaSort}"
|
|
44890
44923
|
${'' /* Prevent header double clicks from selecting text */}
|
|
@@ -44945,13 +44978,13 @@
|
|
|
44945
44978
|
], TableHeader.prototype, "isGrouped", void 0);
|
|
44946
44979
|
const nimbleTableHeader = TableHeader.compose({
|
|
44947
44980
|
baseName: 'table-header',
|
|
44948
|
-
template: template$
|
|
44949
|
-
styles: styles$
|
|
44981
|
+
template: template$e,
|
|
44982
|
+
styles: styles$h
|
|
44950
44983
|
});
|
|
44951
44984
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableHeader());
|
|
44952
44985
|
const tableHeaderTag = DesignSystem.tagFor(TableHeader);
|
|
44953
44986
|
|
|
44954
|
-
const styles$
|
|
44987
|
+
const styles$g = css `
|
|
44955
44988
|
${display('flex')}
|
|
44956
44989
|
|
|
44957
44990
|
:host {
|
|
@@ -45040,7 +45073,7 @@
|
|
|
45040
45073
|
}
|
|
45041
45074
|
`));
|
|
45042
45075
|
|
|
45043
|
-
const styles$
|
|
45076
|
+
const styles$f = css `
|
|
45044
45077
|
${display('flex')}
|
|
45045
45078
|
|
|
45046
45079
|
:host {
|
|
@@ -45073,7 +45106,7 @@
|
|
|
45073
45106
|
`;
|
|
45074
45107
|
|
|
45075
45108
|
// prettier-ignore
|
|
45076
|
-
const template$
|
|
45109
|
+
const template$d = html `
|
|
45077
45110
|
<template role="cell" style="--ni-private-table-cell-nesting-level: ${x => x.nestingLevel}">
|
|
45078
45111
|
${x => x.cellViewTemplate}
|
|
45079
45112
|
${when(x => x.hasActionMenu, html `
|
|
@@ -45121,6 +45154,9 @@
|
|
|
45121
45154
|
__decorate$1([
|
|
45122
45155
|
observable
|
|
45123
45156
|
], TableCell.prototype, "recordId", void 0);
|
|
45157
|
+
__decorate$1([
|
|
45158
|
+
attr({ attribute: 'column-id' })
|
|
45159
|
+
], TableCell.prototype, "columnId", void 0);
|
|
45124
45160
|
__decorate$1([
|
|
45125
45161
|
attr({ attribute: 'has-action-menu', mode: 'boolean' })
|
|
45126
45162
|
], TableCell.prototype, "hasActionMenu", void 0);
|
|
@@ -45138,14 +45174,14 @@
|
|
|
45138
45174
|
], TableCell.prototype, "nestingLevel", void 0);
|
|
45139
45175
|
const nimbleTableCell = TableCell.compose({
|
|
45140
45176
|
baseName: 'table-cell',
|
|
45141
|
-
template: template$
|
|
45142
|
-
styles: styles$
|
|
45177
|
+
template: template$d,
|
|
45178
|
+
styles: styles$f
|
|
45143
45179
|
});
|
|
45144
45180
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableCell());
|
|
45145
45181
|
const tableCellTag = DesignSystem.tagFor(TableCell);
|
|
45146
45182
|
|
|
45147
45183
|
// prettier-ignore
|
|
45148
|
-
const template$
|
|
45184
|
+
const template$c = html `
|
|
45149
45185
|
<template role="row" aria-selected=${x => x.ariaSelected}>
|
|
45150
45186
|
${when(x => x.selectable && !x.hideSelection, html `
|
|
45151
45187
|
<span role="gridcell" class="checkbox-container">
|
|
@@ -45170,6 +45206,7 @@
|
|
|
45170
45206
|
:cellState="${x => x.cellState}"
|
|
45171
45207
|
:cellViewTemplate="${x => x.column.columnInternals.cellViewTemplate}"
|
|
45172
45208
|
:column="${x => x.column}"
|
|
45209
|
+
column-id="${x => x.column.columnId}"
|
|
45173
45210
|
:recordId="${(_, c) => c.parent.recordId}"
|
|
45174
45211
|
?has-action-menu="${x => !!x.column.actionMenuSlot}"
|
|
45175
45212
|
action-menu-label="${x => x.column.actionMenuLabel}"
|
|
@@ -45335,13 +45372,13 @@
|
|
|
45335
45372
|
], TableRow.prototype, "ariaSelected", null);
|
|
45336
45373
|
const nimbleTableRow = TableRow.compose({
|
|
45337
45374
|
baseName: 'table-row',
|
|
45338
|
-
template: template$
|
|
45339
|
-
styles: styles$
|
|
45375
|
+
template: template$c,
|
|
45376
|
+
styles: styles$g
|
|
45340
45377
|
});
|
|
45341
45378
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableRow());
|
|
45342
45379
|
const tableRowTag = DesignSystem.tagFor(TableRow);
|
|
45343
45380
|
|
|
45344
|
-
const styles$
|
|
45381
|
+
const styles$e = css `
|
|
45345
45382
|
${display('grid')}
|
|
45346
45383
|
|
|
45347
45384
|
:host {
|
|
@@ -45450,7 +45487,7 @@
|
|
|
45450
45487
|
|
|
45451
45488
|
/* eslint-disable @typescript-eslint/indent */
|
|
45452
45489
|
// prettier-ignore
|
|
45453
|
-
const template$
|
|
45490
|
+
const template$b = html `
|
|
45454
45491
|
<template
|
|
45455
45492
|
role="row"
|
|
45456
45493
|
@click=${x => x.onGroupExpandToggle()}
|
|
@@ -45584,14 +45621,14 @@
|
|
|
45584
45621
|
], TableGroupRow.prototype, "animationClass", void 0);
|
|
45585
45622
|
const nimbleTableGroupRow = TableGroupRow.compose({
|
|
45586
45623
|
baseName: 'table-group-row',
|
|
45587
|
-
template: template$
|
|
45588
|
-
styles: styles$
|
|
45624
|
+
template: template$b,
|
|
45625
|
+
styles: styles$e
|
|
45589
45626
|
});
|
|
45590
45627
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableGroupRow());
|
|
45591
45628
|
const tableGroupRowTag = DesignSystem.tagFor(TableGroupRow);
|
|
45592
45629
|
|
|
45593
45630
|
// prettier-ignore
|
|
45594
|
-
const template$
|
|
45631
|
+
const template$a = html `
|
|
45595
45632
|
<template
|
|
45596
45633
|
role="grid"
|
|
45597
45634
|
aria-multiselectable="${x => x.ariaMultiSelectable}"
|
|
@@ -47942,13 +47979,13 @@
|
|
|
47942
47979
|
], Table.prototype, "documentShiftKeyDown", void 0);
|
|
47943
47980
|
const nimbleTable = Table.compose({
|
|
47944
47981
|
baseName: 'table',
|
|
47945
|
-
template: template$
|
|
47946
|
-
styles: styles$
|
|
47982
|
+
template: template$a,
|
|
47983
|
+
styles: styles$i
|
|
47947
47984
|
});
|
|
47948
47985
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTable());
|
|
47949
47986
|
DesignSystem.tagFor(Table);
|
|
47950
47987
|
|
|
47951
|
-
const styles$
|
|
47988
|
+
const styles$d = css `
|
|
47952
47989
|
:host {
|
|
47953
47990
|
display: contents;
|
|
47954
47991
|
}
|
|
@@ -48015,18 +48052,16 @@
|
|
|
48015
48052
|
return new AttachedBehaviorHTMLDirective('nimble-overflow', OverflowBehavior, propertyName);
|
|
48016
48053
|
}
|
|
48017
48054
|
|
|
48055
|
+
// Avoiding a wrapping <template> and be careful about starting and ending whitspace
|
|
48056
|
+
// so the template can be composed into other column header templates
|
|
48018
48057
|
// prettier-ignore
|
|
48019
|
-
const template$
|
|
48020
|
-
|
|
48021
|
-
|
|
48022
|
-
|
|
48023
|
-
|
|
48024
|
-
|
|
48025
|
-
|
|
48026
|
-
<slot ${ref('contentSlot')}></slot>
|
|
48027
|
-
</span>
|
|
48028
|
-
</template>
|
|
48029
|
-
`;
|
|
48058
|
+
const template$9 = html `<span
|
|
48059
|
+
${overflow('hasOverflow')}
|
|
48060
|
+
class="header-content"
|
|
48061
|
+
title=${x => (x.hasOverflow && x.headerTextContent ? x.headerTextContent : null)}
|
|
48062
|
+
>
|
|
48063
|
+
<slot ${ref('contentSlot')}></slot>
|
|
48064
|
+
</span>`;
|
|
48030
48065
|
|
|
48031
48066
|
// As the returned class is internal to the function, we can't write a signature that uses is directly, so rely on inference
|
|
48032
48067
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type
|
|
@@ -48096,7 +48131,7 @@
|
|
|
48096
48131
|
return GroupableColumn;
|
|
48097
48132
|
}
|
|
48098
48133
|
|
|
48099
|
-
const styles$
|
|
48134
|
+
const styles$c = css `
|
|
48100
48135
|
:host {
|
|
48101
48136
|
width: fit-content;
|
|
48102
48137
|
max-width: 100%;
|
|
@@ -48121,7 +48156,7 @@
|
|
|
48121
48156
|
|
|
48122
48157
|
/* eslint-disable @typescript-eslint/indent */
|
|
48123
48158
|
// prettier-ignore
|
|
48124
|
-
const template$
|
|
48159
|
+
const template$8 = html `
|
|
48125
48160
|
<template
|
|
48126
48161
|
@click="${(x, c) => {
|
|
48127
48162
|
if (typeof x.cellRecord.href === 'string') {
|
|
@@ -48188,8 +48223,8 @@
|
|
|
48188
48223
|
], TableColumnAnchorCellView.prototype, "text", null);
|
|
48189
48224
|
const anchorCellView = TableColumnAnchorCellView.compose({
|
|
48190
48225
|
baseName: 'table-column-anchor-cell-view',
|
|
48191
|
-
template: template$
|
|
48192
|
-
styles: styles$
|
|
48226
|
+
template: template$8,
|
|
48227
|
+
styles: styles$c
|
|
48193
48228
|
});
|
|
48194
48229
|
DesignSystem.getOrCreate().withPrefix('nimble').register(anchorCellView());
|
|
48195
48230
|
const tableColumnAnchorCellViewTag = DesignSystem.tagFor(TableColumnAnchorCellView);
|
|
@@ -48215,7 +48250,7 @@
|
|
|
48215
48250
|
observable
|
|
48216
48251
|
], TableColumnTextGroupHeaderViewBase.prototype, "text", void 0);
|
|
48217
48252
|
|
|
48218
|
-
const template$
|
|
48253
|
+
const template$7 = html `
|
|
48219
48254
|
<span
|
|
48220
48255
|
${overflow('hasOverflow')}
|
|
48221
48256
|
title="${x => (x.hasOverflow && x.text ? x.text : null)}"
|
|
@@ -48224,7 +48259,7 @@
|
|
|
48224
48259
|
</span>
|
|
48225
48260
|
`;
|
|
48226
48261
|
|
|
48227
|
-
const styles$
|
|
48262
|
+
const styles$b = css `
|
|
48228
48263
|
span {
|
|
48229
48264
|
font: ${bodyFont};
|
|
48230
48265
|
color: ${bodyFontColor};
|
|
@@ -48245,14 +48280,14 @@
|
|
|
48245
48280
|
}
|
|
48246
48281
|
}
|
|
48247
48282
|
const tableColumnTextGroupHeaderView = TableColumnTextGroupHeaderView.compose({
|
|
48248
|
-
baseName: 'table-column-text-group-header',
|
|
48249
|
-
template: template$
|
|
48250
|
-
styles: styles$
|
|
48283
|
+
baseName: 'table-column-text-group-header-view',
|
|
48284
|
+
template: template$7,
|
|
48285
|
+
styles: styles$b
|
|
48251
48286
|
});
|
|
48252
48287
|
DesignSystem.getOrCreate()
|
|
48253
48288
|
.withPrefix('nimble')
|
|
48254
48289
|
.register(tableColumnTextGroupHeaderView());
|
|
48255
|
-
const
|
|
48290
|
+
const tableColumnTextGroupHeaderViewTag = DesignSystem.tagFor(TableColumnTextGroupHeaderView);
|
|
48256
48291
|
|
|
48257
48292
|
/**
|
|
48258
48293
|
* A table column for displaying links.
|
|
@@ -48266,7 +48301,7 @@
|
|
|
48266
48301
|
return {
|
|
48267
48302
|
cellRecordFieldNames: ['label', 'href'],
|
|
48268
48303
|
cellViewTag: tableColumnAnchorCellViewTag,
|
|
48269
|
-
groupHeaderViewTag:
|
|
48304
|
+
groupHeaderViewTag: tableColumnTextGroupHeaderViewTag,
|
|
48270
48305
|
delegatedEvents: ['click'],
|
|
48271
48306
|
sortOperation: TableColumnSortOperation.localeAwareCaseSensitive
|
|
48272
48307
|
};
|
|
@@ -48360,8 +48395,8 @@
|
|
|
48360
48395
|
], TableColumnAnchor.prototype, "download", void 0);
|
|
48361
48396
|
const nimbleTableColumnAnchor = TableColumnAnchor.compose({
|
|
48362
48397
|
baseName: 'table-column-anchor',
|
|
48363
|
-
template: template$
|
|
48364
|
-
styles: styles$
|
|
48398
|
+
template: template$9,
|
|
48399
|
+
styles: styles$d
|
|
48365
48400
|
});
|
|
48366
48401
|
DesignSystem.getOrCreate()
|
|
48367
48402
|
.withPrefix('nimble')
|
|
@@ -48369,27 +48404,232 @@
|
|
|
48369
48404
|
DesignSystem.tagFor(TableColumnAnchor);
|
|
48370
48405
|
|
|
48371
48406
|
/**
|
|
48372
|
-
*
|
|
48407
|
+
* Converts a Mapping key (which is a string when configured in HTML) to the
|
|
48408
|
+
* given keyType. The converted value can then be used to compare against
|
|
48409
|
+
* values in the table data.
|
|
48373
48410
|
*/
|
|
48374
|
-
|
|
48411
|
+
const resolveKeyWithType = (key, keyType) => {
|
|
48412
|
+
if (keyType === 'number') {
|
|
48413
|
+
const converted = nullableNumberConverter.fromView(key);
|
|
48414
|
+
return converted === null ? undefined : converted;
|
|
48415
|
+
}
|
|
48416
|
+
if (keyType === 'boolean') {
|
|
48417
|
+
if (key === false || key === 'false') {
|
|
48418
|
+
return false;
|
|
48419
|
+
}
|
|
48420
|
+
if (key === true || key === 'true') {
|
|
48421
|
+
return true;
|
|
48422
|
+
}
|
|
48423
|
+
return undefined;
|
|
48424
|
+
}
|
|
48425
|
+
return key?.toString() ?? undefined;
|
|
48426
|
+
};
|
|
48427
|
+
|
|
48428
|
+
/**
|
|
48429
|
+
* Base class for table columns that map values to content (e.g. nimble-table-column-enum-text and nimble-table-column-icon)
|
|
48430
|
+
*/
|
|
48431
|
+
class TableColumnEnumBase extends TableColumn {
|
|
48432
|
+
constructor() {
|
|
48433
|
+
super(...arguments);
|
|
48434
|
+
// To ensure the validator is available when other properties get initialized
|
|
48435
|
+
// (which can trigger validation), declare the validator first.
|
|
48436
|
+
/** @internal */
|
|
48437
|
+
this.validator = this.createValidator();
|
|
48438
|
+
/** @internal */
|
|
48439
|
+
this.mappingNotifiers = [];
|
|
48440
|
+
/** @internal */
|
|
48441
|
+
this.mappings = [];
|
|
48442
|
+
this.keyType = 'string';
|
|
48443
|
+
}
|
|
48444
|
+
/**
|
|
48445
|
+
* @internal
|
|
48446
|
+
*
|
|
48447
|
+
* Triggers a request to update the columnConfig when any observable property on
|
|
48448
|
+
* a mapping is updated.
|
|
48449
|
+
*/
|
|
48450
|
+
handleChange(source, args) {
|
|
48451
|
+
if (source instanceof Mapping && typeof args === 'string') {
|
|
48452
|
+
this.updateColumnConfig();
|
|
48453
|
+
}
|
|
48454
|
+
}
|
|
48455
|
+
/**
|
|
48456
|
+
* Called when any Mapping related state has changed.
|
|
48457
|
+
* Implementations should run validation before updating the column config.
|
|
48458
|
+
*/
|
|
48459
|
+
updateColumnConfig() {
|
|
48460
|
+
this.validator.validate(this.mappings, this.keyType);
|
|
48461
|
+
this.columnInternals.columnConfig = this.validator.isValid()
|
|
48462
|
+
? this.createColumnConfig(this.getMappingConfigs())
|
|
48463
|
+
: undefined;
|
|
48464
|
+
}
|
|
48465
|
+
getMappingConfigs() {
|
|
48466
|
+
const mappingConfigs = new Map();
|
|
48467
|
+
this.mappings.forEach(mapping => {
|
|
48468
|
+
const key = resolveKeyWithType(mapping.key, this.keyType);
|
|
48469
|
+
if (key === undefined) {
|
|
48470
|
+
throw Error('Key was invalid for type. Validation should have prevented this.');
|
|
48471
|
+
}
|
|
48472
|
+
const mappingConfig = this.createMappingConfig(mapping);
|
|
48473
|
+
mappingConfigs.set(key, mappingConfig);
|
|
48474
|
+
});
|
|
48475
|
+
return mappingConfigs;
|
|
48476
|
+
}
|
|
48375
48477
|
fieldNameChanged() {
|
|
48376
48478
|
this.columnInternals.dataRecordFieldNames = [this.fieldName];
|
|
48377
48479
|
this.columnInternals.operandDataRecordFieldName = this.fieldName;
|
|
48378
48480
|
}
|
|
48481
|
+
mappingsChanged() {
|
|
48482
|
+
this.updateColumnConfig();
|
|
48483
|
+
this.observeMappings();
|
|
48484
|
+
}
|
|
48485
|
+
keyTypeChanged() {
|
|
48486
|
+
this.updateColumnConfig();
|
|
48487
|
+
}
|
|
48488
|
+
removeMappingObservers() {
|
|
48489
|
+
this.mappingNotifiers.forEach(notifier => {
|
|
48490
|
+
notifier.unsubscribe(this);
|
|
48491
|
+
});
|
|
48492
|
+
this.mappingNotifiers = [];
|
|
48493
|
+
}
|
|
48494
|
+
observeMappings() {
|
|
48495
|
+
this.removeMappingObservers();
|
|
48496
|
+
for (const mapping of this.mappings) {
|
|
48497
|
+
const notifier = Observable.getNotifier(mapping);
|
|
48498
|
+
notifier.subscribe(this);
|
|
48499
|
+
this.mappingNotifiers.push(notifier);
|
|
48500
|
+
}
|
|
48501
|
+
}
|
|
48379
48502
|
}
|
|
48503
|
+
__decorate$1([
|
|
48504
|
+
observable
|
|
48505
|
+
], TableColumnEnumBase.prototype, "mappings", void 0);
|
|
48380
48506
|
__decorate$1([
|
|
48381
48507
|
attr({ attribute: 'field-name' })
|
|
48382
|
-
],
|
|
48508
|
+
], TableColumnEnumBase.prototype, "fieldName", void 0);
|
|
48509
|
+
__decorate$1([
|
|
48510
|
+
attr({ attribute: 'key-type' })
|
|
48511
|
+
], TableColumnEnumBase.prototype, "keyType", void 0);
|
|
48383
48512
|
|
|
48384
|
-
const
|
|
48385
|
-
|
|
48386
|
-
|
|
48387
|
-
|
|
48388
|
-
|
|
48389
|
-
|
|
48390
|
-
</span>
|
|
48513
|
+
const styles$a = css `
|
|
48514
|
+
${styles$d}
|
|
48515
|
+
|
|
48516
|
+
slot[name='mapping'] {
|
|
48517
|
+
display: none;
|
|
48518
|
+
}
|
|
48391
48519
|
`;
|
|
48392
48520
|
|
|
48521
|
+
const template$6 = html `${template$9}<slot ${slotted('mappings')} name="mapping"></slot>`;
|
|
48522
|
+
|
|
48523
|
+
/**
|
|
48524
|
+
* Generic Validator Utility extends Tracker Utility for validation purposes
|
|
48525
|
+
*/
|
|
48526
|
+
class Validator extends Tracker {
|
|
48527
|
+
isValid() {
|
|
48528
|
+
return this.noneTracked();
|
|
48529
|
+
}
|
|
48530
|
+
getValidationFlags() {
|
|
48531
|
+
return this.getTrackedItems();
|
|
48532
|
+
}
|
|
48533
|
+
}
|
|
48534
|
+
|
|
48535
|
+
/**
|
|
48536
|
+
* Base column validator
|
|
48537
|
+
*/
|
|
48538
|
+
class ColumnValidator extends Validator {
|
|
48539
|
+
constructor(columnInternals, configValidityKeys) {
|
|
48540
|
+
super(configValidityKeys);
|
|
48541
|
+
this.columnInternals = columnInternals;
|
|
48542
|
+
}
|
|
48543
|
+
/**
|
|
48544
|
+
* @returns whether the entire column configuration is valid
|
|
48545
|
+
*/
|
|
48546
|
+
isValidColumn() {
|
|
48547
|
+
return this.isValid();
|
|
48548
|
+
}
|
|
48549
|
+
/**
|
|
48550
|
+
* @returns an object containing flags for various ways the configuation can be invalid
|
|
48551
|
+
*/
|
|
48552
|
+
getValidity() {
|
|
48553
|
+
return this.getValidationFlags();
|
|
48554
|
+
}
|
|
48555
|
+
/**
|
|
48556
|
+
* Sets a particular validity condition flag's value, e.g. "hasInvalidFooValue" = true
|
|
48557
|
+
*/
|
|
48558
|
+
setConditionValue(name, isInvalid) {
|
|
48559
|
+
if (isInvalid) {
|
|
48560
|
+
this.track(name);
|
|
48561
|
+
}
|
|
48562
|
+
else {
|
|
48563
|
+
this.untrack(name);
|
|
48564
|
+
}
|
|
48565
|
+
this.updateColumnInternalsFlag();
|
|
48566
|
+
}
|
|
48567
|
+
updateColumnInternalsFlag() {
|
|
48568
|
+
this.columnInternals.validConfiguration = this.isValid();
|
|
48569
|
+
}
|
|
48570
|
+
}
|
|
48571
|
+
|
|
48572
|
+
const enumBaseValidityFlagNames = [
|
|
48573
|
+
'invalidMappingKeyValueForType',
|
|
48574
|
+
'unsupportedMappingType',
|
|
48575
|
+
'duplicateMappingKey',
|
|
48576
|
+
'missingKeyValue',
|
|
48577
|
+
'missingTextValue'
|
|
48578
|
+
];
|
|
48579
|
+
/**
|
|
48580
|
+
* Validator for TableColumnEnumText. Implementations MUST include enumBaseValidityFlagNames in validity flag names set.
|
|
48581
|
+
*/
|
|
48582
|
+
class TableColumnEnumBaseValidator extends ColumnValidator {
|
|
48583
|
+
constructor(columnInternals, configValidityKeys, supportedMappingElements) {
|
|
48584
|
+
super(columnInternals, configValidityKeys);
|
|
48585
|
+
this.supportedMappingElements = supportedMappingElements;
|
|
48586
|
+
}
|
|
48587
|
+
validate(mappings, keyType) {
|
|
48588
|
+
this.untrackAll();
|
|
48589
|
+
const keys = mappings.map(mapping => mapping.key);
|
|
48590
|
+
this.validateKeyValuesForType(keys, keyType);
|
|
48591
|
+
this.validateMappingTypes(mappings);
|
|
48592
|
+
this.validateUniqueKeys(keys, keyType);
|
|
48593
|
+
this.validateNoMissingKeys(mappings);
|
|
48594
|
+
this.validateNoMissingText(mappings);
|
|
48595
|
+
}
|
|
48596
|
+
validateKeyValuesForType(keys, keyType) {
|
|
48597
|
+
// Ignore undefined keys, because validateNoMissingKeys covers that case.
|
|
48598
|
+
// We should only set 'invalidMappingKeyValueForType' when there is a key,
|
|
48599
|
+
// but it isn't appropriate for the type.
|
|
48600
|
+
const invalid = keys.some(key => key !== undefined
|
|
48601
|
+
&& resolveKeyWithType(key, keyType) === undefined);
|
|
48602
|
+
this.setConditionValue('invalidMappingKeyValueForType', invalid);
|
|
48603
|
+
}
|
|
48604
|
+
validateMappingTypes(mappings) {
|
|
48605
|
+
const valid = mappings.every(mapping => this.supportedMappingElements.some(mappingClass => mapping instanceof mappingClass));
|
|
48606
|
+
this.setConditionValue('unsupportedMappingType', !valid);
|
|
48607
|
+
}
|
|
48608
|
+
validateUniqueKeys(keys, keyType) {
|
|
48609
|
+
const typedKeys = keys.map(x => resolveKeyWithType(x, keyType));
|
|
48610
|
+
const invalid = new Set(typedKeys).size !== typedKeys.length;
|
|
48611
|
+
this.setConditionValue('duplicateMappingKey', invalid);
|
|
48612
|
+
}
|
|
48613
|
+
validateNoMissingKeys(mappings) {
|
|
48614
|
+
const invalid = mappings.some(mapping => mapping.key === undefined);
|
|
48615
|
+
this.setConditionValue('missingKeyValue', invalid);
|
|
48616
|
+
}
|
|
48617
|
+
validateNoMissingText(mappings) {
|
|
48618
|
+
const invalid = mappings.some(mapping => mapping.text === undefined);
|
|
48619
|
+
this.setConditionValue('missingTextValue', invalid);
|
|
48620
|
+
}
|
|
48621
|
+
}
|
|
48622
|
+
|
|
48623
|
+
const enumTextValidityFlagNames = [...enumBaseValidityFlagNames];
|
|
48624
|
+
/**
|
|
48625
|
+
* Validator for TableColumnEnumText
|
|
48626
|
+
*/
|
|
48627
|
+
class TableColumnEnumTextValidator extends TableColumnEnumBaseValidator {
|
|
48628
|
+
constructor(columnInternals, supportedMappingElements) {
|
|
48629
|
+
super(columnInternals, enumTextValidityFlagNames, supportedMappingElements);
|
|
48630
|
+
}
|
|
48631
|
+
}
|
|
48632
|
+
|
|
48393
48633
|
const styles$9 = css `
|
|
48394
48634
|
span {
|
|
48395
48635
|
font: ${bodyFont};
|
|
@@ -48400,6 +48640,15 @@
|
|
|
48400
48640
|
}
|
|
48401
48641
|
`;
|
|
48402
48642
|
|
|
48643
|
+
const template$5 = html `
|
|
48644
|
+
<span
|
|
48645
|
+
${overflow('hasOverflow')}
|
|
48646
|
+
title=${x => (x.hasOverflow && x.text ? x.text : null)}
|
|
48647
|
+
>
|
|
48648
|
+
${x => x.text}
|
|
48649
|
+
</span>
|
|
48650
|
+
`;
|
|
48651
|
+
|
|
48403
48652
|
/**
|
|
48404
48653
|
* The cell view base class for displaying fields of any type as text.
|
|
48405
48654
|
*/
|
|
@@ -48421,6 +48670,137 @@
|
|
|
48421
48670
|
observable
|
|
48422
48671
|
], TableColumnTextCellViewBase.prototype, "text", void 0);
|
|
48423
48672
|
|
|
48673
|
+
/**
|
|
48674
|
+
* Common state shared across Mapping Config
|
|
48675
|
+
*/
|
|
48676
|
+
class MappingConfig {
|
|
48677
|
+
constructor(text) {
|
|
48678
|
+
this.text = text;
|
|
48679
|
+
}
|
|
48680
|
+
}
|
|
48681
|
+
|
|
48682
|
+
/**
|
|
48683
|
+
* Mapping configuration corresponding to a text mapping
|
|
48684
|
+
*/
|
|
48685
|
+
class MappingTextConfig extends MappingConfig {
|
|
48686
|
+
}
|
|
48687
|
+
|
|
48688
|
+
/**
|
|
48689
|
+
* A cell view for displaying mapped text
|
|
48690
|
+
*/
|
|
48691
|
+
class TableColumnEnumTextCellView extends TableColumnTextCellViewBase {
|
|
48692
|
+
columnConfigChanged() {
|
|
48693
|
+
this.updateText();
|
|
48694
|
+
}
|
|
48695
|
+
cellRecordChanged() {
|
|
48696
|
+
this.updateText();
|
|
48697
|
+
}
|
|
48698
|
+
updateText() {
|
|
48699
|
+
const value = this.cellRecord.value;
|
|
48700
|
+
if (value === undefined || value === null) {
|
|
48701
|
+
this.text = '';
|
|
48702
|
+
return;
|
|
48703
|
+
}
|
|
48704
|
+
const config = this.columnConfig?.mappingConfigs.get(value);
|
|
48705
|
+
this.text = config instanceof MappingTextConfig ? config.text : '';
|
|
48706
|
+
}
|
|
48707
|
+
}
|
|
48708
|
+
const enumTextCellView = TableColumnEnumTextCellView.compose({
|
|
48709
|
+
baseName: 'table-column-enum-text-cell-view',
|
|
48710
|
+
template: template$5,
|
|
48711
|
+
styles: styles$9
|
|
48712
|
+
});
|
|
48713
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(enumTextCellView());
|
|
48714
|
+
const tableColumnEnumTextCellViewTag = DesignSystem.tagFor(TableColumnEnumTextCellView);
|
|
48715
|
+
|
|
48716
|
+
/**
|
|
48717
|
+
* A group header view for enum columns
|
|
48718
|
+
*/
|
|
48719
|
+
class TableColumnEnumTextGroupHeaderView extends TableColumnTextGroupHeaderViewBase {
|
|
48720
|
+
columnConfigChanged() {
|
|
48721
|
+
this.updateText();
|
|
48722
|
+
}
|
|
48723
|
+
groupHeaderValueChanged() {
|
|
48724
|
+
this.updateText();
|
|
48725
|
+
}
|
|
48726
|
+
updateText() {
|
|
48727
|
+
const value = this.groupHeaderValue;
|
|
48728
|
+
if (value === undefined || value === null) {
|
|
48729
|
+
this.text = '';
|
|
48730
|
+
return;
|
|
48731
|
+
}
|
|
48732
|
+
const config = this.columnConfig?.mappingConfigs.get(value);
|
|
48733
|
+
this.text = config instanceof MappingTextConfig ? config.text : '';
|
|
48734
|
+
}
|
|
48735
|
+
}
|
|
48736
|
+
const enumTextGroupHeaderView = TableColumnEnumTextGroupHeaderView.compose({
|
|
48737
|
+
baseName: 'table-column-enum-text-group-header-view',
|
|
48738
|
+
template: template$7,
|
|
48739
|
+
styles: styles$b
|
|
48740
|
+
});
|
|
48741
|
+
DesignSystem.getOrCreate()
|
|
48742
|
+
.withPrefix('nimble')
|
|
48743
|
+
.register(enumTextGroupHeaderView());
|
|
48744
|
+
const tableColumnEnumTextGroupHeaderViewTag = DesignSystem.tagFor(TableColumnEnumTextGroupHeaderView);
|
|
48745
|
+
|
|
48746
|
+
/**
|
|
48747
|
+
* Table column that maps values to strings
|
|
48748
|
+
*/
|
|
48749
|
+
class TableColumnEnumText extends mixinGroupableColumnAPI(mixinFractionalWidthColumnAPI((TableColumnEnumBase))) {
|
|
48750
|
+
createValidator() {
|
|
48751
|
+
return new TableColumnEnumTextValidator(this.columnInternals, [
|
|
48752
|
+
MappingText
|
|
48753
|
+
]);
|
|
48754
|
+
}
|
|
48755
|
+
get validity() {
|
|
48756
|
+
return this.validator.getValidity();
|
|
48757
|
+
}
|
|
48758
|
+
getColumnInternalsOptions() {
|
|
48759
|
+
return {
|
|
48760
|
+
cellRecordFieldNames: ['value'],
|
|
48761
|
+
cellViewTag: tableColumnEnumTextCellViewTag,
|
|
48762
|
+
groupHeaderViewTag: tableColumnEnumTextGroupHeaderViewTag,
|
|
48763
|
+
delegatedEvents: [],
|
|
48764
|
+
sortOperation: TableColumnSortOperation.basic
|
|
48765
|
+
};
|
|
48766
|
+
}
|
|
48767
|
+
createColumnConfig(mappingConfigs) {
|
|
48768
|
+
return {
|
|
48769
|
+
mappingConfigs
|
|
48770
|
+
};
|
|
48771
|
+
}
|
|
48772
|
+
createMappingConfig(mapping) {
|
|
48773
|
+
if (mapping instanceof MappingText) {
|
|
48774
|
+
return new MappingTextConfig(mapping.text);
|
|
48775
|
+
}
|
|
48776
|
+
// Getting here would indicate a programming error, b/c validation will prevent
|
|
48777
|
+
// this function from running when there is an unsupported mapping.
|
|
48778
|
+
throw new Error('Unsupported mapping');
|
|
48779
|
+
}
|
|
48780
|
+
}
|
|
48781
|
+
const nimbleTableColumnEnumText = TableColumnEnumText.compose({
|
|
48782
|
+
baseName: 'table-column-enum-text',
|
|
48783
|
+
template: template$6,
|
|
48784
|
+
styles: styles$a
|
|
48785
|
+
});
|
|
48786
|
+
DesignSystem.getOrCreate()
|
|
48787
|
+
.withPrefix('nimble')
|
|
48788
|
+
.register(nimbleTableColumnEnumText());
|
|
48789
|
+
DesignSystem.tagFor(TableColumnEnumText);
|
|
48790
|
+
|
|
48791
|
+
/**
|
|
48792
|
+
* The base class for table columns that display fields of any type as text.
|
|
48793
|
+
*/
|
|
48794
|
+
class TableColumnTextBase extends mixinGroupableColumnAPI(mixinFractionalWidthColumnAPI(TableColumn)) {
|
|
48795
|
+
fieldNameChanged() {
|
|
48796
|
+
this.columnInternals.dataRecordFieldNames = [this.fieldName];
|
|
48797
|
+
this.columnInternals.operandDataRecordFieldName = this.fieldName;
|
|
48798
|
+
}
|
|
48799
|
+
}
|
|
48800
|
+
__decorate$1([
|
|
48801
|
+
attr({ attribute: 'field-name' })
|
|
48802
|
+
], TableColumnTextBase.prototype, "fieldName", void 0);
|
|
48803
|
+
|
|
48424
48804
|
/**
|
|
48425
48805
|
* A cell view for displaying string fields as text
|
|
48426
48806
|
*/
|
|
@@ -48447,7 +48827,7 @@
|
|
|
48447
48827
|
return {
|
|
48448
48828
|
cellRecordFieldNames: ['value'],
|
|
48449
48829
|
cellViewTag: tableColumnTextCellViewTag,
|
|
48450
|
-
groupHeaderViewTag:
|
|
48830
|
+
groupHeaderViewTag: tableColumnTextGroupHeaderViewTag,
|
|
48451
48831
|
delegatedEvents: [],
|
|
48452
48832
|
sortOperation: TableColumnSortOperation.localeAwareCaseSensitive
|
|
48453
48833
|
};
|
|
@@ -48455,8 +48835,8 @@
|
|
|
48455
48835
|
}
|
|
48456
48836
|
const nimbleTableColumnText = TableColumnText.compose({
|
|
48457
48837
|
baseName: 'table-column-text',
|
|
48458
|
-
template: template$
|
|
48459
|
-
styles: styles$
|
|
48838
|
+
template: template$9,
|
|
48839
|
+
styles: styles$d
|
|
48460
48840
|
});
|
|
48461
48841
|
DesignSystem.getOrCreate()
|
|
48462
48842
|
.withPrefix('nimble')
|
|
@@ -48558,7 +48938,7 @@
|
|
|
48558
48938
|
|
|
48559
48939
|
const styles$6 = css `
|
|
48560
48940
|
${display('inline-flex')}
|
|
48561
|
-
${styles$
|
|
48941
|
+
${styles$z}
|
|
48562
48942
|
|
|
48563
48943
|
:host {
|
|
48564
48944
|
font: ${bodyFont};
|
|
@@ -48904,7 +49284,7 @@
|
|
|
48904
49284
|
|
|
48905
49285
|
const styles$5 = css `
|
|
48906
49286
|
${display('inline-block')}
|
|
48907
|
-
${styles$
|
|
49287
|
+
${styles$z}
|
|
48908
49288
|
|
|
48909
49289
|
:host {
|
|
48910
49290
|
font: ${bodyFont};
|