@ni/nimble-components 18.12.1 → 18.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all-components-bundle.js +99 -116
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +279 -279
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/tree-item/index.d.ts +2 -9
- package/dist/esm/tree-item/index.js +10 -46
- package/dist/esm/tree-item/index.js.map +1 -1
- package/dist/esm/tree-view/index.d.ts +5 -0
- package/dist/esm/tree-view/index.js +26 -2
- package/dist/esm/tree-view/index.js.map +1 -1
- package/dist/esm/tree-view/template.d.ts +2 -0
- package/dist/esm/tree-view/template.js +17 -0
- package/dist/esm/tree-view/template.js.map +1 -0
- package/package.json +2 -2
|
@@ -14949,24 +14949,6 @@
|
|
|
14949
14949
|
], TreeItem$1.prototype, "renderCollapsedChildren", void 0);
|
|
14950
14950
|
applyMixins(TreeItem$1, StartEnd);
|
|
14951
14951
|
|
|
14952
|
-
/**
|
|
14953
|
-
* The template for the {@link @microsoft/fast-foundation#TreeView} component.
|
|
14954
|
-
* @public
|
|
14955
|
-
*/
|
|
14956
|
-
const treeViewTemplate = (context, definition) => html `
|
|
14957
|
-
<template
|
|
14958
|
-
role="tree"
|
|
14959
|
-
${ref("treeView")}
|
|
14960
|
-
@keydown="${(x, c) => x.handleKeyDown(c.event)}"
|
|
14961
|
-
@focusin="${(x, c) => x.handleFocus(c.event)}"
|
|
14962
|
-
@focusout="${(x, c) => x.handleBlur(c.event)}"
|
|
14963
|
-
@click="${(x, c) => x.handleClick(c.event)}"
|
|
14964
|
-
@selected-change="${(x, c) => x.handleSelectedChange(c.event)}"
|
|
14965
|
-
>
|
|
14966
|
-
<slot ${slotted("slottedTreeItems")}></slot>
|
|
14967
|
-
</template>
|
|
14968
|
-
`;
|
|
14969
|
-
|
|
14970
14952
|
/**
|
|
14971
14953
|
* A Tree view Custom HTML Element.
|
|
14972
14954
|
* Implements the {@link https://w3c.github.io/aria-practices/#TreeView | ARIA TreeView }.
|
|
@@ -16374,7 +16356,7 @@
|
|
|
16374
16356
|
|
|
16375
16357
|
/**
|
|
16376
16358
|
* Do not edit directly
|
|
16377
|
-
* Generated on
|
|
16359
|
+
* Generated on Fri, 21 Apr 2023 15:58:04 GMT
|
|
16378
16360
|
*/
|
|
16379
16361
|
const Information100DarkUi = "#a46eff";
|
|
16380
16362
|
const Information100LightUi = "#804ad9";
|
|
@@ -16744,7 +16726,7 @@
|
|
|
16744
16726
|
return `${prefix}${uniqueIdCounter++}`;
|
|
16745
16727
|
}
|
|
16746
16728
|
|
|
16747
|
-
const template$
|
|
16729
|
+
const template$r = html `<slot></slot>`;
|
|
16748
16730
|
|
|
16749
16731
|
const styles$O = css `
|
|
16750
16732
|
:host {
|
|
@@ -16803,7 +16785,7 @@
|
|
|
16803
16785
|
const nimbleDesignSystemProvider = ThemeProvider.compose({
|
|
16804
16786
|
baseName: 'theme-provider',
|
|
16805
16787
|
styles: styles$O,
|
|
16806
|
-
template: template$
|
|
16788
|
+
template: template$r
|
|
16807
16789
|
});
|
|
16808
16790
|
DesignSystem.getOrCreate()
|
|
16809
16791
|
.withPrefix('nimble')
|
|
@@ -17070,7 +17052,7 @@
|
|
|
17070
17052
|
`;
|
|
17071
17053
|
|
|
17072
17054
|
// prettier-ignore
|
|
17073
|
-
const template$
|
|
17055
|
+
const template$q = (context, definition) => html `
|
|
17074
17056
|
<a
|
|
17075
17057
|
class="control"
|
|
17076
17058
|
part="control"
|
|
@@ -17144,7 +17126,7 @@
|
|
|
17144
17126
|
const nimbleAnchor = Anchor.compose({
|
|
17145
17127
|
baseName: 'anchor',
|
|
17146
17128
|
baseClass: Anchor$1,
|
|
17147
|
-
template: template$
|
|
17129
|
+
template: template$q,
|
|
17148
17130
|
styles: styles$N,
|
|
17149
17131
|
shadowOptions: {
|
|
17150
17132
|
delegatesFocus: true
|
|
@@ -17521,7 +17503,7 @@
|
|
|
17521
17503
|
}
|
|
17522
17504
|
`;
|
|
17523
17505
|
|
|
17524
|
-
const template$
|
|
17506
|
+
const template$p = (context, definition) => html `
|
|
17525
17507
|
<a
|
|
17526
17508
|
class="control"
|
|
17527
17509
|
part="control"
|
|
@@ -17603,7 +17585,7 @@
|
|
|
17603
17585
|
], AnchorButton.prototype, "disabled", void 0);
|
|
17604
17586
|
const nimbleAnchorButton = AnchorButton.compose({
|
|
17605
17587
|
baseName: 'anchor-button',
|
|
17606
|
-
template: template$
|
|
17588
|
+
template: template$p,
|
|
17607
17589
|
styles: styles$L,
|
|
17608
17590
|
shadowOptions: {
|
|
17609
17591
|
delegatesFocus: true
|
|
@@ -17689,7 +17671,7 @@
|
|
|
17689
17671
|
}
|
|
17690
17672
|
`;
|
|
17691
17673
|
|
|
17692
|
-
const template$
|
|
17674
|
+
const template$o = (context, definition) => html `
|
|
17693
17675
|
<template
|
|
17694
17676
|
role="menuitem"
|
|
17695
17677
|
class="${x => (typeof x.startColumnCount === 'number'
|
|
@@ -17795,7 +17777,7 @@
|
|
|
17795
17777
|
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
17796
17778
|
const nimbleAnchorMenuItem = AnchorMenuItem.compose({
|
|
17797
17779
|
baseName: 'anchor-menu-item',
|
|
17798
|
-
template: template$
|
|
17780
|
+
template: template$o,
|
|
17799
17781
|
styles: styles$K,
|
|
17800
17782
|
shadowOptions: {
|
|
17801
17783
|
delegatesFocus: true
|
|
@@ -17945,7 +17927,7 @@
|
|
|
17945
17927
|
}
|
|
17946
17928
|
`;
|
|
17947
17929
|
|
|
17948
|
-
const template$
|
|
17930
|
+
const template$n = (context, definition) => html `
|
|
17949
17931
|
<template slot="anchortab" role="tab" aria-disabled="${x => x.disabled}">
|
|
17950
17932
|
<a
|
|
17951
17933
|
download="${x => x.download}"
|
|
@@ -17998,7 +17980,7 @@
|
|
|
17998
17980
|
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
17999
17981
|
const nimbleAnchorTab = AnchorTab.compose({
|
|
18000
17982
|
baseName: 'anchor-tab',
|
|
18001
|
-
template: template$
|
|
17983
|
+
template: template$n,
|
|
18002
17984
|
styles: styles$I
|
|
18003
17985
|
});
|
|
18004
17986
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTab());
|
|
@@ -18022,7 +18004,7 @@
|
|
|
18022
18004
|
}
|
|
18023
18005
|
`;
|
|
18024
18006
|
|
|
18025
|
-
const template$
|
|
18007
|
+
const template$m = (context, definition) => html `
|
|
18026
18008
|
${startSlotTemplate(context, definition)}
|
|
18027
18009
|
<div ${ref('tablist')} class="tablist" part="tablist" role="tablist">
|
|
18028
18010
|
<slot name="anchortab" ${slotted('tabs')}></slot>
|
|
@@ -18219,7 +18201,7 @@
|
|
|
18219
18201
|
applyMixins(AnchorTabs, StartEnd);
|
|
18220
18202
|
const nimbleAnchorTabs = AnchorTabs.compose({
|
|
18221
18203
|
baseName: 'anchor-tabs',
|
|
18222
|
-
template: template$
|
|
18204
|
+
template: template$m,
|
|
18223
18205
|
styles: styles$H,
|
|
18224
18206
|
shadowOptions: {
|
|
18225
18207
|
delegatesFocus: false
|
|
@@ -18332,7 +18314,7 @@
|
|
|
18332
18314
|
}
|
|
18333
18315
|
`;
|
|
18334
18316
|
|
|
18335
|
-
const template$
|
|
18317
|
+
const template$l = (context, definition) => html `
|
|
18336
18318
|
<template
|
|
18337
18319
|
role="treeitem"
|
|
18338
18320
|
slot="${x => (x.isNestedItem() ? 'item' : null)}"
|
|
@@ -18469,7 +18451,7 @@
|
|
|
18469
18451
|
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
18470
18452
|
const nimbleAnchorTreeItem = AnchorTreeItem.compose({
|
|
18471
18453
|
baseName: 'anchor-tree-item',
|
|
18472
|
-
template: template$
|
|
18454
|
+
template: template$l,
|
|
18473
18455
|
styles: styles$G,
|
|
18474
18456
|
shadowOptions: {
|
|
18475
18457
|
delegatesFocus: true
|
|
@@ -19427,7 +19409,7 @@
|
|
|
19427
19409
|
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>`
|
|
19428
19410
|
};
|
|
19429
19411
|
|
|
19430
|
-
const template$
|
|
19412
|
+
const template$k = html `
|
|
19431
19413
|
<template>
|
|
19432
19414
|
<div class="icon" :innerHTML=${x => x.icon.data}></div>
|
|
19433
19415
|
</template
|
|
@@ -19486,7 +19468,7 @@
|
|
|
19486
19468
|
const registerIcon = (baseName, iconClass) => {
|
|
19487
19469
|
const composedIcon = iconClass.compose({
|
|
19488
19470
|
baseName,
|
|
19489
|
-
template: template$
|
|
19471
|
+
template: template$k,
|
|
19490
19472
|
styles: styles$C,
|
|
19491
19473
|
baseClass: iconClass
|
|
19492
19474
|
});
|
|
@@ -19553,7 +19535,7 @@
|
|
|
19553
19535
|
};
|
|
19554
19536
|
|
|
19555
19537
|
// prettier-ignore
|
|
19556
|
-
const template$
|
|
19538
|
+
const template$j = html `
|
|
19557
19539
|
<div class="container"
|
|
19558
19540
|
role="status"
|
|
19559
19541
|
aria-atomic="${x => x.ariaAtomic}"
|
|
@@ -19672,7 +19654,7 @@
|
|
|
19672
19654
|
applyMixins(Banner, ARIAGlobalStatesAndProperties);
|
|
19673
19655
|
const nimbleBanner = Banner.compose({
|
|
19674
19656
|
baseName: 'banner',
|
|
19675
|
-
template: template$
|
|
19657
|
+
template: template$j,
|
|
19676
19658
|
styles: styles$E
|
|
19677
19659
|
});
|
|
19678
19660
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBanner());
|
|
@@ -20127,7 +20109,7 @@
|
|
|
20127
20109
|
}
|
|
20128
20110
|
`;
|
|
20129
20111
|
|
|
20130
|
-
const template$
|
|
20112
|
+
const template$i = (context, definition) => html `
|
|
20131
20113
|
<div
|
|
20132
20114
|
role="button"
|
|
20133
20115
|
part="control"
|
|
@@ -20202,7 +20184,7 @@
|
|
|
20202
20184
|
applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
|
|
20203
20185
|
const nimbleToggleButton = ToggleButton.compose({
|
|
20204
20186
|
baseName: 'toggle-button',
|
|
20205
|
-
template: template$
|
|
20187
|
+
template: template$i,
|
|
20206
20188
|
styles: styles$x,
|
|
20207
20189
|
shadowOptions: {
|
|
20208
20190
|
delegatesFocus: true
|
|
@@ -20904,7 +20886,7 @@
|
|
|
20904
20886
|
}
|
|
20905
20887
|
`));
|
|
20906
20888
|
|
|
20907
|
-
const template$
|
|
20889
|
+
const template$h = html `
|
|
20908
20890
|
<template>
|
|
20909
20891
|
<dialog
|
|
20910
20892
|
${ref('dialogElement')}
|
|
@@ -21030,7 +21012,7 @@
|
|
|
21030
21012
|
applyMixins(Dialog, ARIAGlobalStatesAndProperties);
|
|
21031
21013
|
const nimbleDialog = Dialog.compose({
|
|
21032
21014
|
baseName: 'dialog',
|
|
21033
|
-
template: template$
|
|
21015
|
+
template: template$h,
|
|
21034
21016
|
styles: styles$t,
|
|
21035
21017
|
baseClass: Dialog
|
|
21036
21018
|
});
|
|
@@ -21190,7 +21172,7 @@
|
|
|
21190
21172
|
}
|
|
21191
21173
|
`));
|
|
21192
21174
|
|
|
21193
|
-
const template$
|
|
21175
|
+
const template$g = html `
|
|
21194
21176
|
<dialog
|
|
21195
21177
|
${ref('dialog')}
|
|
21196
21178
|
aria-label="${x => x.ariaLabel}"
|
|
@@ -21304,7 +21286,7 @@
|
|
|
21304
21286
|
applyMixins(Drawer, ARIAGlobalStatesAndProperties);
|
|
21305
21287
|
const nimbleDrawer = Drawer.compose({
|
|
21306
21288
|
baseName: 'drawer',
|
|
21307
|
-
template: template$
|
|
21289
|
+
template: template$g,
|
|
21308
21290
|
styles: styles$s
|
|
21309
21291
|
});
|
|
21310
21292
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
|
|
@@ -23310,7 +23292,7 @@
|
|
|
23310
23292
|
`;
|
|
23311
23293
|
|
|
23312
23294
|
// prettier-ignore
|
|
23313
|
-
const template$
|
|
23295
|
+
const template$f = html `
|
|
23314
23296
|
<template
|
|
23315
23297
|
?open="${x => x.open}"
|
|
23316
23298
|
@focusout="${(x, c) => x.focusoutHandler(c.event)}"
|
|
@@ -23565,7 +23547,7 @@
|
|
|
23565
23547
|
], MenuButton.prototype, "slottedMenus", void 0);
|
|
23566
23548
|
const nimbleMenuButton = MenuButton.compose({
|
|
23567
23549
|
baseName: 'menu-button',
|
|
23568
|
-
template: template$
|
|
23550
|
+
template: template$f,
|
|
23569
23551
|
styles: styles$p,
|
|
23570
23552
|
shadowOptions: {
|
|
23571
23553
|
delegatesFocus: true
|
|
@@ -24330,7 +24312,7 @@
|
|
|
24330
24312
|
}
|
|
24331
24313
|
`));
|
|
24332
24314
|
|
|
24333
|
-
const template$
|
|
24315
|
+
const template$e = html `
|
|
24334
24316
|
<template role="progressbar">
|
|
24335
24317
|
<div class="container">
|
|
24336
24318
|
<div class="bit1"></div>
|
|
@@ -24347,7 +24329,7 @@
|
|
|
24347
24329
|
}
|
|
24348
24330
|
const nimbleSpinner = Spinner.compose({
|
|
24349
24331
|
baseName: 'spinner',
|
|
24350
|
-
template: template$
|
|
24332
|
+
template: template$e,
|
|
24351
24333
|
styles: styles$j
|
|
24352
24334
|
});
|
|
24353
24335
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSpinner());
|
|
@@ -24516,7 +24498,7 @@
|
|
|
24516
24498
|
`));
|
|
24517
24499
|
|
|
24518
24500
|
// prettier-ignore
|
|
24519
|
-
const template$
|
|
24501
|
+
const template$d = html `
|
|
24520
24502
|
<template
|
|
24521
24503
|
role="switch"
|
|
24522
24504
|
aria-checked="${x => x.checked}"
|
|
@@ -24560,7 +24542,7 @@
|
|
|
24560
24542
|
const nimbleSwitch = Switch.compose({
|
|
24561
24543
|
baseClass: Switch$1,
|
|
24562
24544
|
baseName: 'switch',
|
|
24563
|
-
template: template$
|
|
24545
|
+
template: template$d,
|
|
24564
24546
|
styles: styles$i
|
|
24565
24547
|
});
|
|
24566
24548
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSwitch());
|
|
@@ -28316,7 +28298,7 @@
|
|
|
28316
28298
|
`;
|
|
28317
28299
|
|
|
28318
28300
|
// prettier-ignore
|
|
28319
|
-
const template$
|
|
28301
|
+
const template$c = html `
|
|
28320
28302
|
<template role="columnheader" aria-sort="${x => x.ariaSort}">
|
|
28321
28303
|
<slot></slot>
|
|
28322
28304
|
|
|
@@ -28366,7 +28348,7 @@
|
|
|
28366
28348
|
], TableHeader.prototype, "firstSortedColumn", void 0);
|
|
28367
28349
|
const nimbleTableHeader = TableHeader.compose({
|
|
28368
28350
|
baseName: 'table-header',
|
|
28369
|
-
template: template$
|
|
28351
|
+
template: template$c,
|
|
28370
28352
|
styles: styles$f
|
|
28371
28353
|
});
|
|
28372
28354
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableHeader());
|
|
@@ -28451,7 +28433,7 @@
|
|
|
28451
28433
|
`;
|
|
28452
28434
|
|
|
28453
28435
|
// prettier-ignore
|
|
28454
|
-
const template$
|
|
28436
|
+
const template$b = html `
|
|
28455
28437
|
<template role="cell" style="--ni-private-table-cell-nesting-level: ${x => x.nestingLevel}">
|
|
28456
28438
|
${x => x.cellViewTemplate}
|
|
28457
28439
|
${when(x => x.hasActionMenu, html `
|
|
@@ -28510,14 +28492,14 @@
|
|
|
28510
28492
|
], TableCell.prototype, "nestingLevel", void 0);
|
|
28511
28493
|
const nimbleTableCell = TableCell.compose({
|
|
28512
28494
|
baseName: 'table-cell',
|
|
28513
|
-
template: template$
|
|
28495
|
+
template: template$b,
|
|
28514
28496
|
styles: styles$d
|
|
28515
28497
|
});
|
|
28516
28498
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableCell());
|
|
28517
28499
|
const tableCellTag = DesignSystem.tagFor(TableCell);
|
|
28518
28500
|
|
|
28519
28501
|
// prettier-ignore
|
|
28520
|
-
const template$
|
|
28502
|
+
const template$a = html `
|
|
28521
28503
|
<template role="row" aria-selected=${x => x.ariaSelected}>
|
|
28522
28504
|
${when(x => x.selectable && !x.hideSelection, html `
|
|
28523
28505
|
<span role="gridcell" class="checkbox-container">
|
|
@@ -28701,7 +28683,7 @@
|
|
|
28701
28683
|
], TableRow.prototype, "ariaSelected", null);
|
|
28702
28684
|
const nimbleTableRow = TableRow.compose({
|
|
28703
28685
|
baseName: 'table-row',
|
|
28704
|
-
template: template$
|
|
28686
|
+
template: template$a,
|
|
28705
28687
|
styles: styles$e
|
|
28706
28688
|
});
|
|
28707
28689
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableRow());
|
|
@@ -28782,7 +28764,7 @@
|
|
|
28782
28764
|
|
|
28783
28765
|
/* eslint-disable @typescript-eslint/indent */
|
|
28784
28766
|
// prettier-ignore
|
|
28785
|
-
const template$
|
|
28767
|
+
const template$9 = html `
|
|
28786
28768
|
<template
|
|
28787
28769
|
role="row"
|
|
28788
28770
|
@click=${x => x.onGroupExpandToggle()}
|
|
@@ -28911,14 +28893,14 @@
|
|
|
28911
28893
|
], TableGroupRow.prototype, "animationClass", void 0);
|
|
28912
28894
|
const nimbleTableGroupRow = TableGroupRow.compose({
|
|
28913
28895
|
baseName: 'table-group-row',
|
|
28914
|
-
template: template$
|
|
28896
|
+
template: template$9,
|
|
28915
28897
|
styles: styles$c
|
|
28916
28898
|
});
|
|
28917
28899
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableGroupRow());
|
|
28918
28900
|
const tableGroupRowTag = DesignSystem.tagFor(TableGroupRow);
|
|
28919
28901
|
|
|
28920
28902
|
// prettier-ignore
|
|
28921
|
-
const template$
|
|
28903
|
+
const template$8 = html `
|
|
28922
28904
|
<template
|
|
28923
28905
|
role="grid"
|
|
28924
28906
|
aria-multiselectable="${x => x.ariaMultiSelectable}"
|
|
@@ -30603,7 +30585,7 @@
|
|
|
30603
30585
|
], Table.prototype, "firstSortedColumn", void 0);
|
|
30604
30586
|
const nimbleTable = Table.compose({
|
|
30605
30587
|
baseName: 'table',
|
|
30606
|
-
template: template$
|
|
30588
|
+
template: template$8,
|
|
30607
30589
|
styles: styles$g
|
|
30608
30590
|
});
|
|
30609
30591
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTable());
|
|
@@ -30621,7 +30603,7 @@
|
|
|
30621
30603
|
}
|
|
30622
30604
|
`;
|
|
30623
30605
|
|
|
30624
|
-
const template$
|
|
30606
|
+
const template$7 = html `
|
|
30625
30607
|
<template slot="${x => x.columnInternals.uniqueId}">
|
|
30626
30608
|
<span class="header-content">
|
|
30627
30609
|
<slot></slot>
|
|
@@ -30697,7 +30679,7 @@
|
|
|
30697
30679
|
return GroupableColumn;
|
|
30698
30680
|
}
|
|
30699
30681
|
|
|
30700
|
-
const template$
|
|
30682
|
+
const template$6 = html `
|
|
30701
30683
|
<span
|
|
30702
30684
|
${ref('textSpan')}
|
|
30703
30685
|
class="${x => (typeof x.groupHeaderValue === 'string' ? '' : 'placeholder')}"
|
|
@@ -30755,7 +30737,7 @@
|
|
|
30755
30737
|
], TableColumnTextGroupHeaderView.prototype, "content", null);
|
|
30756
30738
|
const tableColumnTextGroupHeaderView = TableColumnTextGroupHeaderView.compose({
|
|
30757
30739
|
baseName: 'table-column-text-group-header',
|
|
30758
|
-
template: template$
|
|
30740
|
+
template: template$6,
|
|
30759
30741
|
styles: styles$a
|
|
30760
30742
|
});
|
|
30761
30743
|
DesignSystem.getOrCreate()
|
|
@@ -30777,7 +30759,7 @@
|
|
|
30777
30759
|
}
|
|
30778
30760
|
`;
|
|
30779
30761
|
|
|
30780
|
-
const template$
|
|
30762
|
+
const template$5 = html `
|
|
30781
30763
|
<span
|
|
30782
30764
|
${ref('textSpan')}
|
|
30783
30765
|
class="${x => (typeof x.cellRecord.value === 'string' ? '' : 'placeholder')}"
|
|
@@ -30816,7 +30798,7 @@
|
|
|
30816
30798
|
], TableColumnTextCellView.prototype, "content", null);
|
|
30817
30799
|
const textCellView = TableColumnTextCellView.compose({
|
|
30818
30800
|
baseName: 'table-column-text-cell-view',
|
|
30819
|
-
template: template$
|
|
30801
|
+
template: template$5,
|
|
30820
30802
|
styles: styles$9
|
|
30821
30803
|
});
|
|
30822
30804
|
DesignSystem.getOrCreate().withPrefix('nimble').register(textCellView());
|
|
@@ -30852,7 +30834,7 @@
|
|
|
30852
30834
|
], TableColumnText.prototype, "placeholder", void 0);
|
|
30853
30835
|
const nimbleTableColumnText = TableColumnText.compose({
|
|
30854
30836
|
baseName: 'table-column-text',
|
|
30855
|
-
template: template$
|
|
30837
|
+
template: template$7,
|
|
30856
30838
|
styles: styles$b
|
|
30857
30839
|
});
|
|
30858
30840
|
DesignSystem.getOrCreate()
|
|
@@ -30924,7 +30906,7 @@
|
|
|
30924
30906
|
}
|
|
30925
30907
|
`;
|
|
30926
30908
|
|
|
30927
|
-
const template$
|
|
30909
|
+
const template$4 = html `
|
|
30928
30910
|
<template slot="end">
|
|
30929
30911
|
<div class="separator"></div>
|
|
30930
30912
|
<slot></slot>
|
|
@@ -30938,7 +30920,7 @@
|
|
|
30938
30920
|
}
|
|
30939
30921
|
const nimbleTabsToolbar = TabsToolbar.compose({
|
|
30940
30922
|
baseName: 'tabs-toolbar',
|
|
30941
|
-
template: template$
|
|
30923
|
+
template: template$4,
|
|
30942
30924
|
styles: styles$7
|
|
30943
30925
|
});
|
|
30944
30926
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabsToolbar());
|
|
@@ -31114,7 +31096,7 @@
|
|
|
31114
31096
|
}
|
|
31115
31097
|
`));
|
|
31116
31098
|
|
|
31117
|
-
const template$
|
|
31099
|
+
const template$3 = () => html `
|
|
31118
31100
|
<label
|
|
31119
31101
|
part="label"
|
|
31120
31102
|
for="control"
|
|
@@ -31276,7 +31258,7 @@
|
|
|
31276
31258
|
const nimbleTextArea = TextArea.compose({
|
|
31277
31259
|
baseName: 'text-area',
|
|
31278
31260
|
baseClass: TextArea$1,
|
|
31279
|
-
template: template$
|
|
31261
|
+
template: template$3,
|
|
31280
31262
|
styles: styles$6,
|
|
31281
31263
|
shadowOptions: {
|
|
31282
31264
|
delegatesFocus: true
|
|
@@ -31710,7 +31692,7 @@
|
|
|
31710
31692
|
`));
|
|
31711
31693
|
|
|
31712
31694
|
// prettier-ignore
|
|
31713
|
-
const template$
|
|
31695
|
+
const template$2 = html `
|
|
31714
31696
|
${when(x => x.tooltipVisible, html `
|
|
31715
31697
|
<${anchoredRegionTag}
|
|
31716
31698
|
class="anchored-region"
|
|
@@ -31762,7 +31744,7 @@
|
|
|
31762
31744
|
const nimbleTooltip = Tooltip.compose({
|
|
31763
31745
|
baseName: 'tooltip',
|
|
31764
31746
|
baseClass: Tooltip$1,
|
|
31765
|
-
template: template$
|
|
31747
|
+
template: template$2,
|
|
31766
31748
|
styles: styles$3
|
|
31767
31749
|
});
|
|
31768
31750
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTooltip());
|
|
@@ -32055,52 +32037,15 @@
|
|
|
32055
32037
|
class TreeItem extends TreeItem$1 {
|
|
32056
32038
|
constructor() {
|
|
32057
32039
|
super(...arguments);
|
|
32058
|
-
|
|
32059
|
-
|
|
32060
|
-
|
|
32061
|
-
this.
|
|
32062
|
-
// only process selection
|
|
32063
|
-
if (event.target === this && this.selected) {
|
|
32064
|
-
this.setGroupSelectionOnRootParentTreeItem(this);
|
|
32065
|
-
}
|
|
32066
|
-
};
|
|
32067
|
-
}
|
|
32068
|
-
connectedCallback() {
|
|
32069
|
-
super.connectedCallback();
|
|
32070
|
-
this.addEventListener('selected-change', this.handleSelectedChange);
|
|
32071
|
-
this.treeView = this.getParentTreeView();
|
|
32072
|
-
if (this.treeView && this.selected) {
|
|
32073
|
-
this.setGroupSelectionOnRootParentTreeItem(this);
|
|
32074
|
-
}
|
|
32075
|
-
}
|
|
32076
|
-
disconnectedCallback() {
|
|
32077
|
-
super.disconnectedCallback();
|
|
32078
|
-
this.removeEventListener('selected-change', this.handleSelectedChange);
|
|
32079
|
-
this.treeView = null;
|
|
32080
|
-
}
|
|
32081
|
-
clearTreeGroupSelection() {
|
|
32082
|
-
const currentGroupSelection = this.treeView?.querySelectorAll(`[${groupSelectedAttribute}]`);
|
|
32083
|
-
currentGroupSelection?.forEach(treeItem => treeItem.removeAttribute(groupSelectedAttribute));
|
|
32084
|
-
}
|
|
32085
|
-
setGroupSelectionOnRootParentTreeItem(treeItem) {
|
|
32086
|
-
this.clearTreeGroupSelection();
|
|
32087
|
-
let currentItem = treeItem;
|
|
32088
|
-
while (currentItem?.parentElement !== this.treeView) {
|
|
32089
|
-
currentItem = currentItem?.parentElement;
|
|
32090
|
-
}
|
|
32091
|
-
if (currentItem) {
|
|
32092
|
-
currentItem.setAttribute(groupSelectedAttribute, 'true');
|
|
32093
|
-
}
|
|
32094
|
-
}
|
|
32095
|
-
/**
|
|
32096
|
-
* This was copied directly from the FAST TreeItem implementation
|
|
32097
|
-
* @returns the root tree view
|
|
32098
|
-
*/
|
|
32099
|
-
getParentTreeView() {
|
|
32100
|
-
const parentNode = this.parentElement.closest("[role='tree']");
|
|
32101
|
-
return parentNode;
|
|
32040
|
+
/**
|
|
32041
|
+
* @internal
|
|
32042
|
+
*/
|
|
32043
|
+
this.groupSelected = false;
|
|
32102
32044
|
}
|
|
32103
32045
|
}
|
|
32046
|
+
__decorate$1([
|
|
32047
|
+
attr({ attribute: 'group-selected', mode: 'boolean' })
|
|
32048
|
+
], TreeItem.prototype, "groupSelected", void 0);
|
|
32104
32049
|
const nimbleTreeItem = TreeItem.compose({
|
|
32105
32050
|
baseName: 'tree-item',
|
|
32106
32051
|
baseClass: TreeItem$1,
|
|
@@ -32125,6 +32070,22 @@
|
|
|
32125
32070
|
}
|
|
32126
32071
|
`;
|
|
32127
32072
|
|
|
32073
|
+
// prettier-ignore
|
|
32074
|
+
const template$1 = html `
|
|
32075
|
+
<template
|
|
32076
|
+
role="tree"
|
|
32077
|
+
${ref('treeView')}
|
|
32078
|
+
${children$1({ property: 'selectedItems', subtree: true, selector: '[role="treeitem"][selected]', attributeFilter: ['role', 'selected'] })}
|
|
32079
|
+
@keydown="${(x, c) => x.handleKeyDown(c.event)}"
|
|
32080
|
+
@focusin="${(x, c) => x.handleFocus(c.event)}"
|
|
32081
|
+
@focusout="${(x, c) => x.handleBlur(c.event)}"
|
|
32082
|
+
@click="${(x, c) => x.handleClick(c.event)}"
|
|
32083
|
+
@selected-change="${(x, c) => x.handleSelectedChange(c.event)}"
|
|
32084
|
+
>
|
|
32085
|
+
<slot ${slotted('slottedTreeItems')}></slot>
|
|
32086
|
+
</template>
|
|
32087
|
+
`;
|
|
32088
|
+
|
|
32128
32089
|
/**
|
|
32129
32090
|
* A function that returns a nimble-tree-view registration for configuring the component with a DesignSystem.
|
|
32130
32091
|
* Implements {@link @microsoft/fast-foundation#treeViewTemplate}
|
|
@@ -32139,6 +32100,10 @@
|
|
|
32139
32100
|
constructor() {
|
|
32140
32101
|
super(...arguments);
|
|
32141
32102
|
this.selectionMode = TreeViewSelectionMode.all;
|
|
32103
|
+
/**
|
|
32104
|
+
* @internal
|
|
32105
|
+
*/
|
|
32106
|
+
this.selectedItems = [];
|
|
32142
32107
|
}
|
|
32143
32108
|
handleClick(e) {
|
|
32144
32109
|
if (e.defaultPrevented) {
|
|
@@ -32177,14 +32142,32 @@
|
|
|
32177
32142
|
const treeItemChild = item.querySelector('[role="treeitem"]');
|
|
32178
32143
|
return treeItemChild !== null;
|
|
32179
32144
|
}
|
|
32145
|
+
selectedItemsChanged() {
|
|
32146
|
+
for (const item of Array.from(this.children)) {
|
|
32147
|
+
if (item instanceof TreeItem) {
|
|
32148
|
+
item.groupSelected = false;
|
|
32149
|
+
}
|
|
32150
|
+
}
|
|
32151
|
+
for (let item of this.selectedItems) {
|
|
32152
|
+
while (item.parentElement !== null && item.parentElement !== this) {
|
|
32153
|
+
item = item.parentElement;
|
|
32154
|
+
}
|
|
32155
|
+
if (item instanceof TreeItem) {
|
|
32156
|
+
item.groupSelected = true;
|
|
32157
|
+
}
|
|
32158
|
+
}
|
|
32159
|
+
}
|
|
32180
32160
|
}
|
|
32181
32161
|
__decorate$1([
|
|
32182
32162
|
attr({ attribute: 'selection-mode' })
|
|
32183
32163
|
], TreeView.prototype, "selectionMode", void 0);
|
|
32164
|
+
__decorate$1([
|
|
32165
|
+
observable
|
|
32166
|
+
], TreeView.prototype, "selectedItems", void 0);
|
|
32184
32167
|
const nimbleTreeView = TreeView.compose({
|
|
32185
32168
|
baseName: 'tree-view',
|
|
32186
32169
|
baseClass: TreeView$1,
|
|
32187
|
-
template:
|
|
32170
|
+
template: template$1,
|
|
32188
32171
|
styles: styles$1
|
|
32189
32172
|
});
|
|
32190
32173
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTreeView());
|