@ni/nimble-components 18.12.6 → 18.13.0

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.
Files changed (49) hide show
  1. package/dist/all-components-bundle.js +451 -176
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +1117 -1046
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/all-components.d.ts +1 -0
  6. package/dist/esm/all-components.js +1 -0
  7. package/dist/esm/all-components.js.map +1 -1
  8. package/dist/esm/table/components/cell/index.d.ts +2 -0
  9. package/dist/esm/table/components/cell/index.js +3 -0
  10. package/dist/esm/table/components/cell/index.js.map +1 -1
  11. package/dist/esm/table/components/cell/styles.js +4 -2
  12. package/dist/esm/table/components/cell/styles.js.map +1 -1
  13. package/dist/esm/table/components/row/template.js +1 -0
  14. package/dist/esm/table/components/row/template.js.map +1 -1
  15. package/dist/esm/table/index.d.ts +7 -5
  16. package/dist/esm/table/index.js +42 -35
  17. package/dist/esm/table/index.js.map +1 -1
  18. package/dist/esm/table/template.js +8 -8
  19. package/dist/esm/table/template.js.map +1 -1
  20. package/dist/esm/table/testing/table.pageobject.d.ts +68 -0
  21. package/dist/esm/table/testing/table.pageobject.js +312 -0
  22. package/dist/esm/table/testing/table.pageobject.js.map +1 -0
  23. package/dist/esm/table-column/anchor/cell-view/index.d.ts +22 -0
  24. package/dist/esm/table-column/anchor/cell-view/index.js +42 -0
  25. package/dist/esm/table-column/anchor/cell-view/index.js.map +1 -0
  26. package/dist/esm/table-column/anchor/cell-view/styles.d.ts +1 -0
  27. package/dist/esm/table-column/anchor/cell-view/styles.js +29 -0
  28. package/dist/esm/table-column/anchor/cell-view/styles.js.map +1 -0
  29. package/dist/esm/table-column/anchor/cell-view/template.d.ts +2 -0
  30. package/dist/esm/table-column/anchor/cell-view/template.js +53 -0
  31. package/dist/esm/table-column/anchor/cell-view/template.js.map +1 -0
  32. package/dist/esm/table-column/anchor/index.d.ts +74 -0
  33. package/dist/esm/table-column/anchor/index.js +129 -0
  34. package/dist/esm/table-column/anchor/index.js.map +1 -0
  35. package/dist/esm/table-column/base/cell-view/index.d.ts +5 -0
  36. package/dist/esm/table-column/base/cell-view/index.js +27 -0
  37. package/dist/esm/table-column/base/cell-view/index.js.map +1 -1
  38. package/dist/esm/table-column/base/cell-view/template.js +1 -0
  39. package/dist/esm/table-column/base/cell-view/template.js.map +1 -1
  40. package/dist/esm/table-column/base/models/column-internals.d.ts +8 -0
  41. package/dist/esm/table-column/base/models/column-internals.js +1 -0
  42. package/dist/esm/table-column/base/models/column-internals.js.map +1 -1
  43. package/dist/esm/table-column/base/types.d.ts +9 -0
  44. package/dist/esm/table-column/base/types.js.map +1 -1
  45. package/dist/esm/table-column/text/group-header-view/index.d.ts +2 -2
  46. package/dist/esm/table-column/text/index.d.ts +2 -2
  47. package/dist/esm/table-column/text/index.js +2 -1
  48. package/dist/esm/table-column/text/index.js.map +1 -1
  49. package/package.json +1 -1
@@ -16356,7 +16356,7 @@
16356
16356
 
16357
16357
  /**
16358
16358
  * Do not edit directly
16359
- * Generated on Wed, 26 Apr 2023 17:25:12 GMT
16359
+ * Generated on Mon, 01 May 2023 20:20:11 GMT
16360
16360
  */
16361
16361
  const Information100DarkUi = "#a46eff";
16362
16362
  const Information100LightUi = "#804ad9";
@@ -16726,9 +16726,9 @@
16726
16726
  return `${prefix}${uniqueIdCounter++}`;
16727
16727
  }
16728
16728
 
16729
- const template$r = html `<slot></slot>`;
16729
+ const template$s = html `<slot></slot>`;
16730
16730
 
16731
- const styles$O = css `
16731
+ const styles$P = css `
16732
16732
  :host {
16733
16733
  display: contents;
16734
16734
  }
@@ -16784,8 +16784,8 @@
16784
16784
  ], ThemeProvider.prototype, "theme", void 0);
16785
16785
  const nimbleDesignSystemProvider = ThemeProvider.compose({
16786
16786
  baseName: 'theme-provider',
16787
- styles: styles$O,
16788
- template: template$r
16787
+ styles: styles$P,
16788
+ template: template$s
16789
16789
  });
16790
16790
  DesignSystem.getOrCreate()
16791
16791
  .withPrefix('nimble')
@@ -16969,7 +16969,7 @@
16969
16969
  }
16970
16970
  }
16971
16971
 
16972
- const styles$N = css `
16972
+ const styles$O = css `
16973
16973
  ${display('inline')}
16974
16974
 
16975
16975
  :host {
@@ -17052,7 +17052,7 @@
17052
17052
  `;
17053
17053
 
17054
17054
  // prettier-ignore
17055
- const template$q = (context, definition) => html `
17055
+ const template$r = (context, definition) => html `
17056
17056
  <a
17057
17057
  class="control"
17058
17058
  part="control"
@@ -17126,14 +17126,14 @@
17126
17126
  const nimbleAnchor = Anchor.compose({
17127
17127
  baseName: 'anchor',
17128
17128
  baseClass: Anchor$1,
17129
- template: template$q,
17130
- styles: styles$N,
17129
+ template: template$r,
17130
+ styles: styles$O,
17131
17131
  shadowOptions: {
17132
17132
  delegatesFocus: true
17133
17133
  }
17134
17134
  });
17135
17135
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchor());
17136
- DesignSystem.tagFor(Anchor);
17136
+ const anchorTag = DesignSystem.tagFor(Anchor);
17137
17137
 
17138
17138
  /**
17139
17139
  * Types of button appearance.
@@ -17213,7 +17213,7 @@
17213
17213
  return new MultivaluePropertyStyleSheetBehavior('appearance', value, styles);
17214
17214
  }
17215
17215
 
17216
- const styles$M = css `
17216
+ const styles$N = css `
17217
17217
  ${display('inline-flex')}
17218
17218
 
17219
17219
  :host {
@@ -17494,8 +17494,8 @@
17494
17494
  }
17495
17495
  `));
17496
17496
 
17497
- const styles$L = css `
17498
- ${styles$M}
17497
+ const styles$M = css `
17498
+ ${styles$N}
17499
17499
  ${buttonAppearanceVariantStyles}
17500
17500
 
17501
17501
  .control {
@@ -17503,7 +17503,7 @@
17503
17503
  }
17504
17504
  `;
17505
17505
 
17506
- const template$p = (context, definition) => html `
17506
+ const template$q = (context, definition) => html `
17507
17507
  <a
17508
17508
  class="control"
17509
17509
  part="control"
@@ -17585,8 +17585,8 @@
17585
17585
  ], AnchorButton.prototype, "disabled", void 0);
17586
17586
  const nimbleAnchorButton = AnchorButton.compose({
17587
17587
  baseName: 'anchor-button',
17588
- template: template$p,
17589
- styles: styles$L,
17588
+ template: template$q,
17589
+ styles: styles$M,
17590
17590
  shadowOptions: {
17591
17591
  delegatesFocus: true
17592
17592
  }
@@ -17594,7 +17594,7 @@
17594
17594
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorButton());
17595
17595
  DesignSystem.tagFor(AnchorButton);
17596
17596
 
17597
- const styles$K = css `
17597
+ const styles$L = css `
17598
17598
  ${display('grid')}
17599
17599
 
17600
17600
  :host {
@@ -17671,7 +17671,7 @@
17671
17671
  }
17672
17672
  `;
17673
17673
 
17674
- const template$o = (context, definition) => html `
17674
+ const template$p = (context, definition) => html `
17675
17675
  <template
17676
17676
  role="menuitem"
17677
17677
  class="${x => (typeof x.startColumnCount === 'number'
@@ -17777,8 +17777,8 @@
17777
17777
  // FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
17778
17778
  const nimbleAnchorMenuItem = AnchorMenuItem.compose({
17779
17779
  baseName: 'anchor-menu-item',
17780
- template: template$o,
17781
- styles: styles$K,
17780
+ template: template$p,
17781
+ styles: styles$L,
17782
17782
  shadowOptions: {
17783
17783
  delegatesFocus: true
17784
17784
  }
@@ -17802,7 +17802,7 @@
17802
17802
  }
17803
17803
  });
17804
17804
 
17805
- const styles$J = css `
17805
+ const styles$K = css `
17806
17806
  ${display('inline-flex')}
17807
17807
 
17808
17808
  :host {
@@ -17908,8 +17908,8 @@
17908
17908
  }
17909
17909
  `;
17910
17910
 
17911
- const styles$I = css `
17912
- ${styles$J}
17911
+ const styles$J = css `
17912
+ ${styles$K}
17913
17913
 
17914
17914
  a {
17915
17915
  text-decoration: none;
@@ -17927,7 +17927,7 @@
17927
17927
  }
17928
17928
  `;
17929
17929
 
17930
- const template$n = (context, definition) => html `
17930
+ const template$o = (context, definition) => html `
17931
17931
  <template slot="anchortab" role="tab" aria-disabled="${x => x.disabled}">
17932
17932
  <a
17933
17933
  download="${x => x.download}"
@@ -17980,13 +17980,13 @@
17980
17980
  // FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
17981
17981
  const nimbleAnchorTab = AnchorTab.compose({
17982
17982
  baseName: 'anchor-tab',
17983
- template: template$n,
17984
- styles: styles$I
17983
+ template: template$o,
17984
+ styles: styles$J
17985
17985
  });
17986
17986
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTab());
17987
17987
  DesignSystem.tagFor(AnchorTab);
17988
17988
 
17989
- const styles$H = css `
17989
+ const styles$I = css `
17990
17990
  ${display('grid')}
17991
17991
 
17992
17992
  :host {
@@ -18004,7 +18004,7 @@
18004
18004
  }
18005
18005
  `;
18006
18006
 
18007
- const template$m = (context, definition) => html `
18007
+ const template$n = (context, definition) => html `
18008
18008
  ${startSlotTemplate(context, definition)}
18009
18009
  <div ${ref('tablist')} class="tablist" part="tablist" role="tablist">
18010
18010
  <slot name="anchortab" ${slotted('tabs')}></slot>
@@ -18201,8 +18201,8 @@
18201
18201
  applyMixins(AnchorTabs, StartEnd);
18202
18202
  const nimbleAnchorTabs = AnchorTabs.compose({
18203
18203
  baseName: 'anchor-tabs',
18204
- template: template$m,
18205
- styles: styles$H,
18204
+ template: template$n,
18205
+ styles: styles$I,
18206
18206
  shadowOptions: {
18207
18207
  delegatesFocus: false
18208
18208
  }
@@ -18210,7 +18210,7 @@
18210
18210
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTabs());
18211
18211
  DesignSystem.tagFor(AnchorTabs);
18212
18212
 
18213
- const styles$G = css `
18213
+ const styles$H = css `
18214
18214
  ${display('block')}
18215
18215
 
18216
18216
  :host {
@@ -18314,7 +18314,7 @@
18314
18314
  }
18315
18315
  `;
18316
18316
 
18317
- const template$l = (context, definition) => html `
18317
+ const template$m = (context, definition) => html `
18318
18318
  <template
18319
18319
  role="treeitem"
18320
18320
  slot="${x => (x.isNestedItem() ? 'item' : null)}"
@@ -18451,8 +18451,8 @@
18451
18451
  // FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
18452
18452
  const nimbleAnchorTreeItem = AnchorTreeItem.compose({
18453
18453
  baseName: 'anchor-tree-item',
18454
- template: template$l,
18455
- styles: styles$G,
18454
+ template: template$m,
18455
+ styles: styles$H,
18456
18456
  shadowOptions: {
18457
18457
  delegatesFocus: true
18458
18458
  }
@@ -18462,7 +18462,7 @@
18462
18462
  .register(nimbleAnchorTreeItem());
18463
18463
  DesignSystem.tagFor(AnchorTreeItem);
18464
18464
 
18465
- const styles$F = css `
18465
+ const styles$G = css `
18466
18466
  :host {
18467
18467
  contain: layout;
18468
18468
  display: block;
@@ -18486,7 +18486,7 @@
18486
18486
  baseName: 'anchored-region',
18487
18487
  baseClass: AnchoredRegion$1,
18488
18488
  template: anchoredRegionTemplate,
18489
- styles: styles$F
18489
+ styles: styles$G
18490
18490
  });
18491
18491
  DesignSystem.getOrCreate()
18492
18492
  .withPrefix('nimble')
@@ -18566,7 +18566,7 @@
18566
18566
  */
18567
18567
  const themeBehavior = (theme, styles) => new ThemeStyleSheetBehavior(theme, styles);
18568
18568
 
18569
- const styles$E = css `
18569
+ const styles$F = css `
18570
18570
  ${display('flex')}
18571
18571
 
18572
18572
  :host {
@@ -18724,8 +18724,8 @@
18724
18724
  }
18725
18725
  `));
18726
18726
 
18727
- const styles$D = css `
18728
- ${styles$M}
18727
+ const styles$E = css `
18728
+ ${styles$N}
18729
18729
  ${buttonAppearanceVariantStyles}
18730
18730
  `;
18731
18731
 
@@ -18771,7 +18771,7 @@
18771
18771
  baseName: 'button',
18772
18772
  baseClass: Button$1,
18773
18773
  template: buttonTemplate,
18774
- styles: styles$D,
18774
+ styles: styles$E,
18775
18775
  shadowOptions: {
18776
18776
  delegatesFocus: true
18777
18777
  }
@@ -19409,13 +19409,13 @@
19409
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>`
19410
19410
  };
19411
19411
 
19412
- const template$k = html `
19412
+ const template$l = html `
19413
19413
  <template>
19414
19414
  <div class="icon" :innerHTML=${x => x.icon.data}></div>
19415
19415
  </template
19416
19416
  `;
19417
19417
 
19418
- const styles$C = css `
19418
+ const styles$D = css `
19419
19419
  ${display('inline-flex')}
19420
19420
 
19421
19421
  :host {
@@ -19468,8 +19468,8 @@
19468
19468
  const registerIcon = (baseName, iconClass) => {
19469
19469
  const composedIcon = iconClass.compose({
19470
19470
  baseName,
19471
- template: template$k,
19472
- styles: styles$C,
19471
+ template: template$l,
19472
+ styles: styles$D,
19473
19473
  baseClass: iconClass
19474
19474
  });
19475
19475
  DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
@@ -19535,7 +19535,7 @@
19535
19535
  };
19536
19536
 
19537
19537
  // prettier-ignore
19538
- const template$j = html `
19538
+ const template$k = html `
19539
19539
  <div class="container"
19540
19540
  role="status"
19541
19541
  aria-atomic="${x => x.ariaAtomic}"
@@ -19654,13 +19654,13 @@
19654
19654
  applyMixins(Banner, ARIAGlobalStatesAndProperties);
19655
19655
  const nimbleBanner = Banner.compose({
19656
19656
  baseName: 'banner',
19657
- template: template$j,
19658
- styles: styles$E
19657
+ template: template$k,
19658
+ styles: styles$F
19659
19659
  });
19660
19660
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBanner());
19661
19661
  DesignSystem.tagFor(Banner);
19662
19662
 
19663
- const styles$B = css `
19663
+ const styles$C = css `
19664
19664
  ${display('inline-block')}
19665
19665
 
19666
19666
  :host {
@@ -19701,12 +19701,12 @@
19701
19701
  baseName: 'breadcrumb',
19702
19702
  baseClass: Breadcrumb$1,
19703
19703
  template: breadcrumbTemplate,
19704
- styles: styles$B
19704
+ styles: styles$C
19705
19705
  });
19706
19706
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
19707
19707
  DesignSystem.tagFor(Breadcrumb);
19708
19708
 
19709
- const styles$A = css `
19709
+ const styles$B = css `
19710
19710
  ${display('inline-flex')}
19711
19711
 
19712
19712
  :host {
@@ -19782,7 +19782,7 @@
19782
19782
  baseName: 'breadcrumb-item',
19783
19783
  baseClass: BreadcrumbItem$1,
19784
19784
  template: breadcrumbItemTemplate,
19785
- styles: styles$A,
19785
+ styles: styles$B,
19786
19786
  separator: forwardSlash16X16.data
19787
19787
  });
19788
19788
  DesignSystem.getOrCreate()
@@ -19790,7 +19790,7 @@
19790
19790
  .register(nimbleBreadcrumbItem());
19791
19791
  DesignSystem.tagFor(BreadcrumbItem);
19792
19792
 
19793
- const styles$z = css `
19793
+ const styles$A = css `
19794
19794
  ${display('inline-flex')}
19795
19795
 
19796
19796
  :host {
@@ -19949,7 +19949,7 @@
19949
19949
  const nimbleCardButton = CardButton.compose({
19950
19950
  baseName: 'card-button',
19951
19951
  template: buttonTemplate,
19952
- styles: styles$z,
19952
+ styles: styles$A,
19953
19953
  shadowOptions: {
19954
19954
  delegatesFocus: true
19955
19955
  }
@@ -19957,7 +19957,7 @@
19957
19957
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCardButton());
19958
19958
  DesignSystem.tagFor(CardButton);
19959
19959
 
19960
- const styles$y = css `
19960
+ const styles$z = css `
19961
19961
  ${display('inline-flex')}
19962
19962
 
19963
19963
  :host {
@@ -20075,15 +20075,15 @@
20075
20075
  baseName: 'checkbox',
20076
20076
  baseClass: Checkbox$1,
20077
20077
  template: checkboxTemplate,
20078
- styles: styles$y,
20078
+ styles: styles$z,
20079
20079
  checkedIndicator: check16X16.data,
20080
20080
  indeterminateIndicator: minus16X16.data
20081
20081
  });
20082
20082
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCheckbox());
20083
20083
  const checkboxTag = DesignSystem.tagFor(Checkbox);
20084
20084
 
20085
- const styles$x = css `
20086
- ${styles$M}
20085
+ const styles$y = css `
20086
+ ${styles$N}
20087
20087
 
20088
20088
  .control[aria-pressed='true'] {
20089
20089
  background-color: ${fillSelectedColor};
@@ -20109,7 +20109,7 @@
20109
20109
  }
20110
20110
  `;
20111
20111
 
20112
- const template$i = (context, definition) => html `
20112
+ const template$j = (context, definition) => html `
20113
20113
  <div
20114
20114
  role="button"
20115
20115
  part="control"
@@ -20184,8 +20184,8 @@
20184
20184
  applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
20185
20185
  const nimbleToggleButton = ToggleButton.compose({
20186
20186
  baseName: 'toggle-button',
20187
- template: template$i,
20188
- styles: styles$x,
20187
+ template: template$j,
20188
+ styles: styles$y,
20189
20189
  shadowOptions: {
20190
20190
  delegatesFocus: true
20191
20191
  }
@@ -20217,7 +20217,7 @@
20217
20217
  block: 'block'
20218
20218
  };
20219
20219
 
20220
- const styles$w = css `
20220
+ const styles$x = css `
20221
20221
  ${display('inline-flex')}
20222
20222
 
20223
20223
  :host {
@@ -20453,7 +20453,7 @@
20453
20453
  }
20454
20454
  `));
20455
20455
 
20456
- const styles$v = css `
20456
+ const styles$w = css `
20457
20457
  .error-icon {
20458
20458
  display: none;
20459
20459
  }
@@ -20487,9 +20487,9 @@
20487
20487
  }
20488
20488
  `;
20489
20489
 
20490
- const styles$u = css `
20490
+ const styles$v = css `
20491
+ ${styles$x}
20491
20492
  ${styles$w}
20492
- ${styles$v}
20493
20493
 
20494
20494
  :host {
20495
20495
  --ni-private-hover-bottom-border-width: 2px;
@@ -20725,7 +20725,7 @@
20725
20725
  baseName: 'combobox',
20726
20726
  baseClass: Combobox$1,
20727
20727
  template: comboboxTemplate,
20728
- styles: styles$u,
20728
+ styles: styles$v,
20729
20729
  shadowOptions: {
20730
20730
  delegatesFocus: true
20731
20731
  },
@@ -20770,7 +20770,7 @@
20770
20770
  */
20771
20771
  const UserDismissed = Symbol('user dismissed');
20772
20772
 
20773
- const styles$t = css `
20773
+ const styles$u = css `
20774
20774
  ${display('grid')}
20775
20775
 
20776
20776
  dialog {
@@ -20886,7 +20886,7 @@
20886
20886
  }
20887
20887
  `));
20888
20888
 
20889
- const template$h = html `
20889
+ const template$i = html `
20890
20890
  <template>
20891
20891
  <dialog
20892
20892
  ${ref('dialogElement')}
@@ -21012,14 +21012,14 @@
21012
21012
  applyMixins(Dialog, ARIAGlobalStatesAndProperties);
21013
21013
  const nimbleDialog = Dialog.compose({
21014
21014
  baseName: 'dialog',
21015
- template: template$h,
21016
- styles: styles$t,
21015
+ template: template$i,
21016
+ styles: styles$u,
21017
21017
  baseClass: Dialog
21018
21018
  });
21019
21019
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDialog());
21020
21020
  DesignSystem.tagFor(Dialog);
21021
21021
 
21022
- const styles$s = css `
21022
+ const styles$t = css `
21023
21023
  ${display('block')}
21024
21024
 
21025
21025
  :host {
@@ -21172,7 +21172,7 @@
21172
21172
  }
21173
21173
  `));
21174
21174
 
21175
- const template$g = html `
21175
+ const template$h = html `
21176
21176
  <dialog
21177
21177
  ${ref('dialog')}
21178
21178
  aria-label="${x => x.ariaLabel}"
@@ -21286,8 +21286,8 @@
21286
21286
  applyMixins(Drawer, ARIAGlobalStatesAndProperties);
21287
21287
  const nimbleDrawer = Drawer.compose({
21288
21288
  baseName: 'drawer',
21289
- template: template$g,
21290
- styles: styles$s
21289
+ template: template$h,
21290
+ styles: styles$t
21291
21291
  });
21292
21292
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
21293
21293
  DesignSystem.tagFor(Drawer);
@@ -23116,7 +23116,7 @@
23116
23116
  registerIcon('icon-xmark-check', IconXmarkCheck);
23117
23117
  DesignSystem.tagFor(IconXmarkCheck);
23118
23118
 
23119
- const styles$r = css `
23119
+ const styles$s = css `
23120
23120
  ${display('flex')}
23121
23121
 
23122
23122
  :host {
@@ -23196,12 +23196,12 @@
23196
23196
  baseName: 'list-option',
23197
23197
  baseClass: ListboxOption,
23198
23198
  template: listboxOptionTemplate,
23199
- styles: styles$r
23199
+ styles: styles$s
23200
23200
  });
23201
23201
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleListOption());
23202
23202
  DesignSystem.tagFor(ListOption);
23203
23203
 
23204
- const styles$q = css `
23204
+ const styles$r = css `
23205
23205
  ${display('grid')}
23206
23206
 
23207
23207
  :host {
@@ -23268,12 +23268,12 @@
23268
23268
  baseName: 'menu',
23269
23269
  baseClass: Menu$1,
23270
23270
  template: menuTemplate,
23271
- styles: styles$q
23271
+ styles: styles$r
23272
23272
  });
23273
23273
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenu());
23274
23274
  DesignSystem.tagFor(Menu);
23275
23275
 
23276
- const styles$p = css `
23276
+ const styles$q = css `
23277
23277
  ${display('inline-block')}
23278
23278
 
23279
23279
  :host {
@@ -23292,7 +23292,7 @@
23292
23292
  `;
23293
23293
 
23294
23294
  // prettier-ignore
23295
- const template$f = html `
23295
+ const template$g = html `
23296
23296
  <template
23297
23297
  ?open="${x => x.open}"
23298
23298
  @focusout="${(x, c) => x.focusoutHandler(c.event)}"
@@ -23547,8 +23547,8 @@
23547
23547
  ], MenuButton.prototype, "slottedMenus", void 0);
23548
23548
  const nimbleMenuButton = MenuButton.compose({
23549
23549
  baseName: 'menu-button',
23550
- template: template$f,
23551
- styles: styles$p,
23550
+ template: template$g,
23551
+ styles: styles$q,
23552
23552
  shadowOptions: {
23553
23553
  delegatesFocus: true
23554
23554
  }
@@ -23556,7 +23556,7 @@
23556
23556
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuButton());
23557
23557
  const menuButtonTag = DesignSystem.tagFor(MenuButton);
23558
23558
 
23559
- const styles$o = css `
23559
+ const styles$p = css `
23560
23560
  ${display('grid')}
23561
23561
 
23562
23562
  :host {
@@ -23654,7 +23654,7 @@
23654
23654
  baseName: 'menu-item',
23655
23655
  baseClass: MenuItem$1,
23656
23656
  template: menuItemTemplate,
23657
- styles: styles$o,
23657
+ styles: styles$p,
23658
23658
  expandCollapseGlyph: arrowExpanderRight16X16.data
23659
23659
  });
23660
23660
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuItem());
@@ -23669,9 +23669,9 @@
23669
23669
  block: 'block'
23670
23670
  };
23671
23671
 
23672
- const styles$n = css `
23672
+ const styles$o = css `
23673
23673
  ${display('inline-block')}
23674
- ${styles$v}
23674
+ ${styles$w}
23675
23675
 
23676
23676
  :host {
23677
23677
  font: ${bodyFont};
@@ -23885,7 +23885,7 @@
23885
23885
  baseName: 'number-field',
23886
23886
  baseClass: NumberField$1,
23887
23887
  template: numberFieldTemplate,
23888
- styles: styles$n,
23888
+ styles: styles$o,
23889
23889
  shadowOptions: {
23890
23890
  delegatesFocus: true
23891
23891
  },
@@ -23927,7 +23927,7 @@
23927
23927
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
23928
23928
  DesignSystem.tagFor(NumberField);
23929
23929
 
23930
- const styles$m = css `
23930
+ const styles$n = css `
23931
23931
  ${display('inline-flex')}
23932
23932
 
23933
23933
  :host {
@@ -24028,13 +24028,13 @@
24028
24028
  baseName: 'radio',
24029
24029
  baseClass: Radio$1,
24030
24030
  template: radioTemplate,
24031
- styles: styles$m,
24031
+ styles: styles$n,
24032
24032
  checkedIndicator: circleFilled16X16.data
24033
24033
  });
24034
24034
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadio());
24035
24035
  DesignSystem.tagFor(Radio);
24036
24036
 
24037
- const styles$l = css `
24037
+ const styles$m = css `
24038
24038
  ${display('inline-block')}
24039
24039
 
24040
24040
  .positioning-region {
@@ -24069,7 +24069,7 @@
24069
24069
  baseName: 'radio-group',
24070
24070
  baseClass: RadioGroup$1,
24071
24071
  template: radioGroupTemplate,
24072
- styles: styles$l,
24072
+ styles: styles$m,
24073
24073
  shadowOptions: {
24074
24074
  delegatesFocus: true
24075
24075
  }
@@ -24077,9 +24077,9 @@
24077
24077
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadioGroup());
24078
24078
  DesignSystem.tagFor(RadioGroup);
24079
24079
 
24080
- const styles$k = css `
24080
+ const styles$l = css `
24081
+ ${styles$x}
24081
24082
  ${styles$w}
24082
- ${styles$v}
24083
24083
 
24084
24084
  ${
24085
24085
  /* We are using flex `order` to define the visual ordering of the selected value,
@@ -24155,7 +24155,7 @@
24155
24155
  baseName: 'select',
24156
24156
  baseClass: Select$1,
24157
24157
  template: selectTemplate,
24158
- styles: styles$k,
24158
+ styles: styles$l,
24159
24159
  indicator: arrowExpanderDown16X16.data,
24160
24160
  end: html `
24161
24161
  <${iconExclamationMarkTag}
@@ -24168,7 +24168,7 @@
24168
24168
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSelect());
24169
24169
  DesignSystem.tagFor(Select);
24170
24170
 
24171
- const styles$j = css `
24171
+ const styles$k = css `
24172
24172
  ${display('inline-flex')}
24173
24173
 
24174
24174
  :host {
@@ -24314,7 +24314,7 @@
24314
24314
  }
24315
24315
  `));
24316
24316
 
24317
- const template$e = html `
24317
+ const template$f = html `
24318
24318
  <template role="progressbar">
24319
24319
  <div class="container">
24320
24320
  <div class="bit1"></div>
@@ -24331,13 +24331,13 @@
24331
24331
  }
24332
24332
  const nimbleSpinner = Spinner.compose({
24333
24333
  baseName: 'spinner',
24334
- template: template$e,
24335
- styles: styles$j
24334
+ template: template$f,
24335
+ styles: styles$k
24336
24336
  });
24337
24337
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSpinner());
24338
24338
  DesignSystem.tagFor(Spinner);
24339
24339
 
24340
- const styles$i = css `
24340
+ const styles$j = css `
24341
24341
  ${display('inline-flex')}
24342
24342
 
24343
24343
  :host {
@@ -24500,7 +24500,7 @@
24500
24500
  `));
24501
24501
 
24502
24502
  // prettier-ignore
24503
- const template$d = html `
24503
+ const template$e = html `
24504
24504
  <template
24505
24505
  role="switch"
24506
24506
  aria-checked="${x => x.checked}"
@@ -24544,8 +24544,8 @@
24544
24544
  const nimbleSwitch = Switch.compose({
24545
24545
  baseClass: Switch$1,
24546
24546
  baseName: 'switch',
24547
- template: template$d,
24548
- styles: styles$i
24547
+ template: template$e,
24548
+ styles: styles$j
24549
24549
  });
24550
24550
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSwitch());
24551
24551
  DesignSystem.tagFor(Switch);
@@ -24559,12 +24559,12 @@
24559
24559
  baseName: 'tab',
24560
24560
  baseClass: Tab$1,
24561
24561
  template: tabTemplate,
24562
- styles: styles$J
24562
+ styles: styles$K
24563
24563
  });
24564
24564
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTab());
24565
24565
  DesignSystem.tagFor(Tab);
24566
24566
 
24567
- const styles$h = css `
24567
+ const styles$i = css `
24568
24568
  ${display('block')}
24569
24569
 
24570
24570
  :host {
@@ -24584,7 +24584,7 @@
24584
24584
  baseName: 'tab-panel',
24585
24585
  baseClass: TabPanel$1,
24586
24586
  template: tabPanelTemplate,
24587
- styles: styles$h
24587
+ styles: styles$i
24588
24588
  });
24589
24589
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabPanel());
24590
24590
  DesignSystem.tagFor(TabPanel);
@@ -27895,12 +27895,36 @@
27895
27895
  * Each TableColumn type has a corresponding TableCellView type (linked via TableColumn.cellViewTag).
27896
27896
  */
27897
27897
  class TableCellView extends FoundationElement {
27898
+ constructor() {
27899
+ super(...arguments);
27900
+ this.delegatedEvents = [];
27901
+ this.delegatedEventHandler = () => { };
27902
+ }
27898
27903
  /**
27899
27904
  * Called if an element inside this cell view has focus, and this row/cell is being recycled.
27900
27905
  * Expected implementation is to commit changes as needed, and blur the focusable element (or close
27901
27906
  * the menu/popup/etc).
27902
27907
  */
27903
27908
  focusedRecycleCallback() { }
27909
+ columnChanged() {
27910
+ for (const eventName of this.delegatedEvents) {
27911
+ this.removeEventListener(eventName, this.delegatedEventHandler);
27912
+ }
27913
+ this.delegatedEvents = [];
27914
+ this.delegatedEventHandler = () => { };
27915
+ if (!this.column) {
27916
+ return;
27917
+ }
27918
+ this.delegatedEvents = this.column.columnInternals.delegatedEvents;
27919
+ this.delegatedEventHandler = (event) => {
27920
+ this.column?.dispatchEvent(new CustomEvent('delegated-event', {
27921
+ detail: { originalEvent: event }
27922
+ }));
27923
+ };
27924
+ for (const delegatedEvent of this.delegatedEvents) {
27925
+ this.addEventListener(delegatedEvent, this.delegatedEventHandler);
27926
+ }
27927
+ }
27904
27928
  }
27905
27929
  __decorate$1([
27906
27930
  observable
@@ -27908,6 +27932,9 @@
27908
27932
  __decorate$1([
27909
27933
  observable
27910
27934
  ], TableCellView.prototype, "columnConfig", void 0);
27935
+ __decorate$1([
27936
+ observable
27937
+ ], TableCellView.prototype, "column", void 0);
27911
27938
 
27912
27939
  const validateCellViewTemplate = (cellViewTag) => {
27913
27940
  let instance;
@@ -27927,6 +27954,7 @@
27927
27954
  <${cellViewTag}
27928
27955
  :cellRecord="${y => y.cellState?.cellRecord}"
27929
27956
  :columnConfig="${y => y.cellState?.columnConfig}"
27957
+ :column="${y => y.column}"
27930
27958
  class="cell-view"
27931
27959
  >
27932
27960
  </${cellViewTag}>
@@ -27973,6 +28001,7 @@
27973
28001
  this.cellRecordFieldNames = options.cellRecordFieldNames;
27974
28002
  this.cellViewTemplate = createCellViewTemplate(options.cellViewTag);
27975
28003
  this.groupHeaderViewTemplate = createGroupHeaderViewTemplate(options.groupHeaderViewTag);
28004
+ this.delegatedEvents = options.delegatedEvents;
27976
28005
  }
27977
28006
  fractionalWidthChanged() {
27978
28007
  this.currentFractionalWidth = this.fractionalWidth;
@@ -28159,7 +28188,7 @@
28159
28188
  }
28160
28189
  }
28161
28190
 
28162
- const styles$g = css `
28191
+ const styles$h = css `
28163
28192
  ${display('flex')}
28164
28193
 
28165
28194
  :host {
@@ -28266,7 +28295,7 @@
28266
28295
  }
28267
28296
  `));
28268
28297
 
28269
- const styles$f = css `
28298
+ const styles$g = css `
28270
28299
  ${display('flex')}
28271
28300
 
28272
28301
  :host {
@@ -28287,7 +28316,7 @@
28287
28316
  `;
28288
28317
 
28289
28318
  // prettier-ignore
28290
- const template$c = html `
28319
+ const template$d = html `
28291
28320
  <template role="columnheader" aria-sort="${x => x.ariaSort}">
28292
28321
  <slot></slot>
28293
28322
 
@@ -28344,13 +28373,13 @@
28344
28373
  ], TableHeader.prototype, "isGrouped", void 0);
28345
28374
  const nimbleTableHeader = TableHeader.compose({
28346
28375
  baseName: 'table-header',
28347
- template: template$c,
28348
- styles: styles$f
28376
+ template: template$d,
28377
+ styles: styles$g
28349
28378
  });
28350
28379
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableHeader());
28351
28380
  const tableHeaderTag = DesignSystem.tagFor(TableHeader);
28352
28381
 
28353
- const styles$e = css `
28382
+ const styles$f = css `
28354
28383
  ${display('flex')}
28355
28384
 
28356
28385
  :host {
@@ -28439,8 +28468,8 @@
28439
28468
  }
28440
28469
  `));
28441
28470
 
28442
- const styles$d = css `
28443
- ${display('grid')}
28471
+ const styles$e = css `
28472
+ ${display('flex')}
28444
28473
 
28445
28474
  :host {
28446
28475
  --ni-private-table-cell-nesting-level: 0;
@@ -28451,7 +28480,6 @@
28451
28480
  );
28452
28481
  align-self: center;
28453
28482
  height: 100%;
28454
- grid-template-columns: 1fr auto;
28455
28483
  /* A default value that will be overridden by the row */
28456
28484
  --ni-private-table-cell-action-menu-display: block;
28457
28485
  }
@@ -28464,11 +28492,14 @@
28464
28492
 
28465
28493
  .action-menu {
28466
28494
  display: var(--ni-private-table-cell-action-menu-display);
28495
+ margin-left: auto;
28496
+ flex-shrink: 0;
28497
+ flex-grow: 0;
28467
28498
  }
28468
28499
  `;
28469
28500
 
28470
28501
  // prettier-ignore
28471
- const template$b = html `
28502
+ const template$c = html `
28472
28503
  <template role="cell" style="--ni-private-table-cell-nesting-level: ${x => x.nestingLevel}">
28473
28504
  ${x => x.cellViewTemplate}
28474
28505
  ${when(x => x.hasActionMenu, html `
@@ -28510,6 +28541,9 @@
28510
28541
  __decorate$1([
28511
28542
  observable
28512
28543
  ], TableCell.prototype, "cellState", void 0);
28544
+ __decorate$1([
28545
+ observable
28546
+ ], TableCell.prototype, "column", void 0);
28513
28547
  __decorate$1([
28514
28548
  attr({ attribute: 'has-action-menu', mode: 'boolean' })
28515
28549
  ], TableCell.prototype, "hasActionMenu", void 0);
@@ -28527,14 +28561,14 @@
28527
28561
  ], TableCell.prototype, "nestingLevel", void 0);
28528
28562
  const nimbleTableCell = TableCell.compose({
28529
28563
  baseName: 'table-cell',
28530
- template: template$b,
28531
- styles: styles$d
28564
+ template: template$c,
28565
+ styles: styles$e
28532
28566
  });
28533
28567
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableCell());
28534
28568
  const tableCellTag = DesignSystem.tagFor(TableCell);
28535
28569
 
28536
28570
  // prettier-ignore
28537
- const template$a = html `
28571
+ const template$b = html `
28538
28572
  <template role="row" aria-selected=${x => x.ariaSelected}>
28539
28573
  ${when(x => x.selectable && !x.hideSelection, html `
28540
28574
  <span role="gridcell" class="checkbox-container">
@@ -28559,6 +28593,7 @@
28559
28593
  class="cell"
28560
28594
  :cellState="${x => x.cellState}"
28561
28595
  :cellViewTemplate="${x => x.column.columnInternals.cellViewTemplate}"
28596
+ :column="${x => x.column}"
28562
28597
  ?has-action-menu="${x => !!x.column.actionMenuSlot}"
28563
28598
  action-menu-label="${x => x.column.actionMenuLabel}"
28564
28599
  @cell-action-menu-beforetoggle="${(x, c) => c.parent.onCellActionMenuBeforeToggle(c.event, x.column)}"
@@ -28721,13 +28756,13 @@
28721
28756
  ], TableRow.prototype, "ariaSelected", null);
28722
28757
  const nimbleTableRow = TableRow.compose({
28723
28758
  baseName: 'table-row',
28724
- template: template$a,
28725
- styles: styles$e
28759
+ template: template$b,
28760
+ styles: styles$f
28726
28761
  });
28727
28762
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableRow());
28728
28763
  const tableRowTag = DesignSystem.tagFor(TableRow);
28729
28764
 
28730
- const styles$c = css `
28765
+ const styles$d = css `
28731
28766
  ${display('flex')}
28732
28767
 
28733
28768
  :host {
@@ -28820,7 +28855,7 @@
28820
28855
 
28821
28856
  /* eslint-disable @typescript-eslint/indent */
28822
28857
  // prettier-ignore
28823
- const template$9 = html `
28858
+ const template$a = html `
28824
28859
  <template
28825
28860
  role="row"
28826
28861
  @click=${x => x.onGroupExpandToggle()}
@@ -28949,14 +28984,14 @@
28949
28984
  ], TableGroupRow.prototype, "animationClass", void 0);
28950
28985
  const nimbleTableGroupRow = TableGroupRow.compose({
28951
28986
  baseName: 'table-group-row',
28952
- template: template$9,
28953
- styles: styles$c
28987
+ template: template$a,
28988
+ styles: styles$d
28954
28989
  });
28955
28990
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableGroupRow());
28956
28991
  const tableGroupRowTag = DesignSystem.tagFor(TableGroupRow);
28957
28992
 
28958
28993
  // prettier-ignore
28959
- const template$8 = html `
28994
+ const template$9 = html `
28960
28995
  <template
28961
28996
  role="grid"
28962
28997
  aria-multiselectable="${x => x.ariaMultiSelectable}"
@@ -28966,7 +29001,7 @@
28966
29001
  --ni-private-table-scroll-x: -${x => x.scrollX}px;
28967
29002
  --ni-private-table-header-scrollbar-spacer-width: ${x => x.virtualizer.headerContainerMarginRight}px;
28968
29003
  --ni-private-table-scroll-height: ${x => x.virtualizer.allRowsHeight}px;
28969
- --ni-private-table-row-container-top: ${x => x.virtualizer.rowContainerYOffset}px;
29004
+ --ni-private-table-row-container-top: ${x => x.virtualizer.rowContainerYOffset}px;
28970
29005
  --ni-private-table-row-grid-columns: ${x => x.rowGridColumns ?? ''};
28971
29006
  ">
28972
29007
  <div role="rowgroup" class="header-container">
@@ -28976,7 +29011,7 @@
28976
29011
  <${checkboxTag}
28977
29012
  ${ref('selectionCheckbox')}
28978
29013
  class="${x => `selection-checkbox ${x.selectionMode ?? ''}`}"
28979
- @change="${async (x, c) => x.onAllRowsSelectionChange(c.event)}"
29014
+ @change="${(x, c) => x.onAllRowsSelectionChange(c.event)}"
28980
29015
  >
28981
29016
  </${checkboxTag}>
28982
29017
  </span>
@@ -29024,7 +29059,7 @@
29024
29059
  :groupColumn="${(x, c) => c.parent.tableData[x.index]?.groupColumn}"
29025
29060
  ?selectable="${(_, c) => c.parent.selectionMode === TableRowSelectionMode.multiple}"
29026
29061
  selection-state="${(x, c) => c.parent.tableData[x.index]?.selectionState}"
29027
- @group-selection-toggle="${async (x, c) => c.parent.onRowSelectionToggle(x.index, c.event)}"
29062
+ @group-selection-toggle="${(x, c) => c.parent.onRowSelectionToggle(x.index, c.event)}"
29028
29063
  @group-expand-toggle="${(x, c) => c.parent.handleGroupRowExpanded(x.index, c.event)}"
29029
29064
  >
29030
29065
  </${tableGroupRowTag}>
@@ -29039,10 +29074,10 @@
29039
29074
  :dataRecord="${(x, c) => c.parent.tableData[x.index]?.record}"
29040
29075
  :columns="${(_, c) => c.parent.columns}"
29041
29076
  :nestingLevel="${(x, c) => c.parent.tableData[x.index]?.nestingLevel}"
29042
- @click="${async (x, c) => c.parent.onRowClick(x.index)}"
29043
- @row-selection-toggle="${async (x, c) => c.parent.onRowSelectionToggle(x.index, c.event)}"
29044
- @row-action-menu-beforetoggle="${async (x, c) => c.parent.onRowActionMenuBeforeToggle(x.index, c.event)}"
29045
- @row-action-menu-toggle="${async (_, c) => c.parent.onRowActionMenuToggle(c.event)}"
29077
+ @click="${(x, c) => c.parent.onRowClick(x.index)}"
29078
+ @row-selection-toggle="${(x, c) => c.parent.onRowSelectionToggle(x.index, c.event)}"
29079
+ @row-action-menu-beforetoggle="${(x, c) => c.parent.onRowActionMenuBeforeToggle(x.index, c.event)}"
29080
+ @row-action-menu-toggle="${(_, c) => c.parent.onRowActionMenuToggle(c.event)}"
29046
29081
  >
29047
29082
  ${when((x, c) => c.parent.openActionMenuRecordId === c.parent.tableData[x.index]?.id, html `
29048
29083
  ${repeat((_, c) => c.parent.actionMenuSlots, html `
@@ -29051,7 +29086,7 @@
29051
29086
  slot="${x => `row-action-menu-${x}`}">
29052
29087
  </slot>
29053
29088
  `)}
29054
- `)}
29089
+ `)}
29055
29090
  </${tableRowTag}>
29056
29091
  `)}
29057
29092
  `)}
@@ -30183,7 +30218,7 @@
30183
30218
  }
30184
30219
  }
30185
30220
  /** @internal */
30186
- async onRowSelectionToggle(rowIndex, event) {
30221
+ onRowSelectionToggle(rowIndex, event) {
30187
30222
  event.stopImmediatePropagation();
30188
30223
  if (this.selectionMode === TableRowSelectionMode.none) {
30189
30224
  return;
@@ -30200,55 +30235,31 @@
30200
30235
  .getRowModel()
30201
30236
  .rows[rowIndex]?.toggleSelected(event.detail.newState);
30202
30237
  }
30203
- await this.emitSelectionChangeEvent();
30238
+ void this.emitSelectionChangeEvent();
30204
30239
  }
30205
30240
  /** @internal */
30206
- async onRowClick(rowIndex) {
30207
- return this.selectSingleRow(rowIndex);
30241
+ onRowClick(rowIndex) {
30242
+ void this.selectSingleRow(rowIndex);
30243
+ return true;
30208
30244
  }
30209
30245
  /** @internal */
30210
- async onAllRowsSelectionChange(event) {
30246
+ onAllRowsSelectionChange(event) {
30211
30247
  event.stopPropagation();
30212
30248
  if (this.ignoreSelectionChangeEvents) {
30213
30249
  return;
30214
30250
  }
30215
30251
  this.table.toggleAllRowsSelected(this.selectionCheckbox.checked);
30216
- await this.emitSelectionChangeEvent();
30252
+ void this.emitSelectionChangeEvent();
30217
30253
  }
30218
30254
  /** @internal */
30219
- async onRowActionMenuBeforeToggle(rowIndex, event) {
30255
+ onRowActionMenuBeforeToggle(rowIndex, event) {
30220
30256
  event.stopImmediatePropagation();
30221
- let recordIds = event.detail.recordIds;
30222
- if (this.selectionMode !== TableRowSelectionMode.none) {
30223
- const row = this.table.getRowModel().rows[rowIndex];
30224
- if (row && !row.getIsSelected()) {
30225
- await this.selectSingleRow(rowIndex);
30226
- }
30227
- else {
30228
- recordIds = await this.getSelectedRecordIds();
30229
- }
30230
- }
30231
- this.openActionMenuRecordId = event.detail.recordIds[0];
30232
- const detail = {
30233
- ...event.detail,
30234
- recordIds
30235
- };
30236
- this.$emit('action-menu-beforetoggle', detail);
30257
+ void this.handleActionMenuBeforeToggleEvent(rowIndex, event);
30237
30258
  }
30238
30259
  /** @internal */
30239
- async onRowActionMenuToggle(event) {
30260
+ onRowActionMenuToggle(event) {
30240
30261
  event.stopImmediatePropagation();
30241
- const recordIds = this.selectionMode === TableRowSelectionMode.multiple
30242
- ? await this.getSelectedRecordIds()
30243
- : event.detail.recordIds;
30244
- const detail = {
30245
- ...event.detail,
30246
- recordIds
30247
- };
30248
- this.$emit('action-menu-toggle', detail);
30249
- if (!event.detail.newState) {
30250
- this.openActionMenuRecordId = undefined;
30251
- }
30262
+ void this.handleRowActionMenuToggleEvent(event);
30252
30263
  }
30253
30264
  /** @internal */
30254
30265
  handleCollapseAllGroupRows() {
@@ -30311,6 +30322,37 @@
30311
30322
  this.observeColumns();
30312
30323
  this.updateTracker.trackColumnInstancesChanged();
30313
30324
  }
30325
+ async handleActionMenuBeforeToggleEvent(rowIndex, event) {
30326
+ let recordIds = event.detail.recordIds;
30327
+ if (this.selectionMode !== TableRowSelectionMode.none) {
30328
+ const row = this.table.getRowModel().rows[rowIndex];
30329
+ if (row && !row.getIsSelected()) {
30330
+ await this.selectSingleRow(rowIndex);
30331
+ }
30332
+ else {
30333
+ recordIds = await this.getSelectedRecordIds();
30334
+ }
30335
+ }
30336
+ this.openActionMenuRecordId = event.detail.recordIds[0];
30337
+ const detail = {
30338
+ ...event.detail,
30339
+ recordIds
30340
+ };
30341
+ this.$emit('action-menu-beforetoggle', detail);
30342
+ }
30343
+ async handleRowActionMenuToggleEvent(event) {
30344
+ const recordIds = this.selectionMode === TableRowSelectionMode.multiple
30345
+ ? await this.getSelectedRecordIds()
30346
+ : event.detail.recordIds;
30347
+ const detail = {
30348
+ ...event.detail,
30349
+ recordIds
30350
+ };
30351
+ this.$emit('action-menu-toggle', detail);
30352
+ if (!event.detail.newState) {
30353
+ this.openActionMenuRecordId = undefined;
30354
+ }
30355
+ }
30314
30356
  removeColumnObservers() {
30315
30357
  this.columnNotifiers.forEach(notifier => {
30316
30358
  notifier.unsubscribe(this);
@@ -30670,13 +30712,13 @@
30670
30712
  ], Table.prototype, "firstSortedColumn", void 0);
30671
30713
  const nimbleTable = Table.compose({
30672
30714
  baseName: 'table',
30673
- template: template$8,
30674
- styles: styles$g
30715
+ template: template$9,
30716
+ styles: styles$h
30675
30717
  });
30676
30718
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTable());
30677
30719
  DesignSystem.tagFor(Table);
30678
30720
 
30679
- const styles$b = css `
30721
+ const styles$c = css `
30680
30722
  :host {
30681
30723
  display: contents;
30682
30724
  }
@@ -30688,7 +30730,7 @@
30688
30730
  }
30689
30731
  `;
30690
30732
 
30691
- const template$7 = html `
30733
+ const template$8 = html `
30692
30734
  <template slot="${x => x.columnInternals.uniqueId}">
30693
30735
  <span class="header-content">
30694
30736
  <slot></slot>
@@ -30764,6 +30806,120 @@
30764
30806
  return GroupableColumn;
30765
30807
  }
30766
30808
 
30809
+ const styles$b = css `
30810
+ :host {
30811
+ width: fit-content;
30812
+ max-width: 100%;
30813
+ height: fit-content;
30814
+ align-self: center;
30815
+ }
30816
+
30817
+ nimble-anchor {
30818
+ white-space: nowrap;
30819
+ overflow: hidden;
30820
+ text-overflow: ellipsis;
30821
+ }
30822
+
30823
+ span {
30824
+ font: ${bodyFont};
30825
+ color: ${bodyFontColor};
30826
+ white-space: nowrap;
30827
+ overflow: hidden;
30828
+ text-overflow: ellipsis;
30829
+ }
30830
+
30831
+ .placeholder {
30832
+ color: ${controlLabelFontColor};
30833
+ }
30834
+ `;
30835
+
30836
+ /* eslint-disable @typescript-eslint/indent */
30837
+ // prettier-ignore
30838
+ const template$7 = html `
30839
+ <template
30840
+ @click="${(x, c) => {
30841
+ if (typeof x.cellRecord.href === 'string') {
30842
+ c.event.stopPropagation();
30843
+ }
30844
+ return true;
30845
+ }}"
30846
+ >
30847
+ ${when(x => typeof x.cellRecord.href === 'string', html `
30848
+ <${anchorTag}
30849
+ ${ref('anchor')}
30850
+ href="${x => x.cellRecord.href}"
30851
+ hreflang="${x => x.columnConfig.hreflang}"
30852
+ ping="${x => x.columnConfig.ping}"
30853
+ referrerpolicy="${x => x.columnConfig.referrerpolicy}"
30854
+ rel="${x => x.columnConfig.rel}"
30855
+ target="${x => x.columnConfig.target}"
30856
+ type="${x => x.columnConfig.type}"
30857
+ download="${x => x.columnConfig.download}"
30858
+ underline-hidden="${x => x.columnConfig.underlineHidden}"
30859
+ appearance="${x => x.columnConfig.appearance}"
30860
+ title=${x => (x.isValidContentAndHasOverflow ? x.content : null)}
30861
+ @mouseover="${x => {
30862
+ x.isValidContentAndHasOverflow = !!x.content && x.anchor.offsetWidth < x.anchor.scrollWidth;
30863
+ }}"
30864
+ @mouseout="${x => {
30865
+ x.isValidContentAndHasOverflow = false;
30866
+ }}"
30867
+ >
30868
+ ${x => x.content}
30869
+ </${anchorTag}>`)}
30870
+ ${when(x => typeof x.cellRecord.href !== 'string', html `
30871
+ <span
30872
+ ${ref('textSpan')}
30873
+ class="${x => (typeof x.cellRecord.label === 'string' ? '' : 'placeholder')}"
30874
+ title=${x => (x.isValidContentAndHasOverflow ? x.content : null)}
30875
+ @mouseover="${x => {
30876
+ x.isValidContentAndHasOverflow = !!x.content && x.textSpan.offsetWidth < x.textSpan.scrollWidth;
30877
+ }}"
30878
+ @mouseout="${x => {
30879
+ x.isValidContentAndHasOverflow = false;
30880
+ }}"
30881
+ >
30882
+ ${x => x.content}
30883
+ </span>`)}
30884
+ </template>
30885
+ `;
30886
+
30887
+ /**
30888
+ * A cell view for displaying links
30889
+ */
30890
+ class TableColumnAnchorCellView extends TableCellView {
30891
+ constructor() {
30892
+ super(...arguments);
30893
+ /** @internal */
30894
+ this.isValidContentAndHasOverflow = false;
30895
+ }
30896
+ get content() {
30897
+ if (typeof this.cellRecord.label === 'string') {
30898
+ return this.cellRecord.label;
30899
+ }
30900
+ if (typeof this.cellRecord.href === 'string') {
30901
+ return this.cellRecord.href;
30902
+ }
30903
+ return this.columnConfig.placeholder;
30904
+ }
30905
+ focusedRecycleCallback() {
30906
+ this.anchor?.blur();
30907
+ }
30908
+ }
30909
+ __decorate$1([
30910
+ observable
30911
+ ], TableColumnAnchorCellView.prototype, "isValidContentAndHasOverflow", void 0);
30912
+ __decorate$1([
30913
+ volatile
30914
+ ], TableColumnAnchorCellView.prototype, "content", null);
30915
+ const anchorCellView = TableColumnAnchorCellView.compose({
30916
+ baseName: 'table-column-anchor-cell-view',
30917
+ template: template$7,
30918
+ styles: styles$b
30919
+ });
30920
+ DesignSystem.getOrCreate().withPrefix('nimble').register(anchorCellView());
30921
+ const tableColumnAnchorCellViewTag = DesignSystem.tagFor(TableColumnAnchorCellView);
30922
+
30767
30923
  const template$6 = html `
30768
30924
  <span
30769
30925
  ${ref('textSpan')}
@@ -30830,6 +30986,124 @@
30830
30986
  .register(tableColumnTextGroupHeaderView());
30831
30987
  const tableColumnTextGroupHeaderTag = DesignSystem.tagFor(TableColumnTextGroupHeaderView);
30832
30988
 
30989
+ /**
30990
+ * A table column for displaying links.
30991
+ */
30992
+ class TableColumnAnchor extends mixinGroupableColumnAPI(mixinFractionalWidthColumnAPI((TableColumn))) {
30993
+ constructor() {
30994
+ super({
30995
+ cellRecordFieldNames: ['label', 'href'],
30996
+ cellViewTag: tableColumnAnchorCellViewTag,
30997
+ groupHeaderViewTag: tableColumnTextGroupHeaderTag,
30998
+ delegatedEvents: ['click']
30999
+ });
31000
+ this.underlineHidden = false;
31001
+ this.columnInternals.sortOperation = TableColumnSortOperation.localeAwareCaseSensitive;
31002
+ }
31003
+ labelFieldNameChanged() {
31004
+ this.columnInternals.dataRecordFieldNames = [
31005
+ this.labelFieldName,
31006
+ this.hrefFieldName
31007
+ ];
31008
+ this.columnInternals.operandDataRecordFieldName = this.labelFieldName;
31009
+ }
31010
+ hrefFieldNameChanged() {
31011
+ this.columnInternals.dataRecordFieldNames = [
31012
+ this.labelFieldName,
31013
+ this.hrefFieldName
31014
+ ];
31015
+ }
31016
+ placeholderChanged() {
31017
+ this.updateColumnConfig();
31018
+ }
31019
+ appearanceChanged() {
31020
+ this.updateColumnConfig();
31021
+ }
31022
+ underlineHiddenChanged() {
31023
+ this.updateColumnConfig();
31024
+ }
31025
+ hreflangChanged() {
31026
+ this.updateColumnConfig();
31027
+ }
31028
+ pingChanged() {
31029
+ this.updateColumnConfig();
31030
+ }
31031
+ referrerpolicyChanged() {
31032
+ this.updateColumnConfig();
31033
+ }
31034
+ relChanged() {
31035
+ this.updateColumnConfig();
31036
+ }
31037
+ targetChanged() {
31038
+ this.updateColumnConfig();
31039
+ }
31040
+ typeChanged() {
31041
+ this.updateColumnConfig();
31042
+ }
31043
+ downloadChanged() {
31044
+ this.updateColumnConfig();
31045
+ }
31046
+ updateColumnConfig() {
31047
+ this.columnInternals.columnConfig = {
31048
+ placeholder: this.placeholder ?? '',
31049
+ appearance: this.appearance,
31050
+ underlineHidden: this.underlineHidden,
31051
+ hreflang: this.hreflang,
31052
+ ping: this.ping,
31053
+ referrerpolicy: this.referrerpolicy,
31054
+ rel: this.rel,
31055
+ target: this.target,
31056
+ type: this.type,
31057
+ download: this.download
31058
+ };
31059
+ }
31060
+ }
31061
+ __decorate$1([
31062
+ attr({ attribute: 'label-field-name' })
31063
+ ], TableColumnAnchor.prototype, "labelFieldName", void 0);
31064
+ __decorate$1([
31065
+ attr({ attribute: 'href-field-name' })
31066
+ ], TableColumnAnchor.prototype, "hrefFieldName", void 0);
31067
+ __decorate$1([
31068
+ attr
31069
+ ], TableColumnAnchor.prototype, "placeholder", void 0);
31070
+ __decorate$1([
31071
+ attr
31072
+ ], TableColumnAnchor.prototype, "appearance", void 0);
31073
+ __decorate$1([
31074
+ attr({ attribute: 'underline-hidden', mode: 'boolean' })
31075
+ ], TableColumnAnchor.prototype, "underlineHidden", void 0);
31076
+ __decorate$1([
31077
+ attr
31078
+ ], TableColumnAnchor.prototype, "hreflang", void 0);
31079
+ __decorate$1([
31080
+ attr
31081
+ ], TableColumnAnchor.prototype, "ping", void 0);
31082
+ __decorate$1([
31083
+ attr
31084
+ ], TableColumnAnchor.prototype, "referrerpolicy", void 0);
31085
+ __decorate$1([
31086
+ attr
31087
+ ], TableColumnAnchor.prototype, "rel", void 0);
31088
+ __decorate$1([
31089
+ attr
31090
+ ], TableColumnAnchor.prototype, "target", void 0);
31091
+ __decorate$1([
31092
+ attr
31093
+ ], TableColumnAnchor.prototype, "type", void 0);
31094
+ __decorate$1([
31095
+ attr
31096
+ ], TableColumnAnchor.prototype, "download", void 0);
31097
+ const nimbleTableColumnAnchor = TableColumnAnchor.compose({
31098
+ baseName: 'table-column-anchor',
31099
+ template: template$8,
31100
+ styles: styles$c
31101
+ });
31102
+ DesignSystem.getOrCreate()
31103
+ .withPrefix('nimble')
31104
+ .register(nimbleTableColumnAnchor());
31105
+ DesignSystem.tagFor(TableColumnAnchor);
31106
+
30833
31107
  const styles$9 = css `
30834
31108
  span {
30835
31109
  font: ${bodyFont};
@@ -30897,7 +31171,8 @@
30897
31171
  super({
30898
31172
  cellRecordFieldNames: ['value'],
30899
31173
  cellViewTag: tableColumnTextCellViewTag,
30900
- groupHeaderViewTag: tableColumnTextGroupHeaderTag
31174
+ groupHeaderViewTag: tableColumnTextGroupHeaderTag,
31175
+ delegatedEvents: []
30901
31176
  });
30902
31177
  this.columnInternals.sortOperation = TableColumnSortOperation.localeAwareCaseSensitive;
30903
31178
  }
@@ -30919,8 +31194,8 @@
30919
31194
  ], TableColumnText.prototype, "placeholder", void 0);
30920
31195
  const nimbleTableColumnText = TableColumnText.compose({
30921
31196
  baseName: 'table-column-text',
30922
- template: template$7,
30923
- styles: styles$b
31197
+ template: template$8,
31198
+ styles: styles$c
30924
31199
  });
30925
31200
  DesignSystem.getOrCreate()
30926
31201
  .withPrefix('nimble')
@@ -31018,7 +31293,7 @@
31018
31293
 
31019
31294
  const styles$6 = css `
31020
31295
  ${display('inline-flex')}
31021
- ${styles$v}
31296
+ ${styles$w}
31022
31297
 
31023
31298
  :host {
31024
31299
  font: ${bodyFont};
@@ -31364,7 +31639,7 @@
31364
31639
 
31365
31640
  const styles$5 = css `
31366
31641
  ${display('inline-block')}
31367
- ${styles$v}
31642
+ ${styles$w}
31368
31643
 
31369
31644
  :host {
31370
31645
  font: ${bodyFont};