@ni/nimble-components 32.1.1 → 32.2.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 (32) hide show
  1. package/dist/all-components-bundle.js +72 -9
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +3466 -3462
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/icons/all-icons.d.ts +2 -0
  6. package/dist/esm/icons/all-icons.js +2 -0
  7. package/dist/esm/icons/all-icons.js.map +1 -1
  8. package/dist/esm/icons/arrow-down-rectangle.d.ts +13 -0
  9. package/dist/esm/icons/arrow-down-rectangle.js +15 -0
  10. package/dist/esm/icons/arrow-down-rectangle.js.map +1 -0
  11. package/dist/esm/icons/arrow-up-rectangle.d.ts +13 -0
  12. package/dist/esm/icons/arrow-up-rectangle.js +15 -0
  13. package/dist/esm/icons/arrow-up-rectangle.js.map +1 -0
  14. package/dist/esm/table/components/group-row/index.d.ts +4 -0
  15. package/dist/esm/table/components/group-row/index.js +7 -0
  16. package/dist/esm/table/components/group-row/index.js.map +1 -1
  17. package/dist/esm/table/components/group-row/styles.js +3 -3
  18. package/dist/esm/table/components/group-row/styles.js.map +1 -1
  19. package/dist/esm/table/components/row/index.d.ts +4 -0
  20. package/dist/esm/table/components/row/index.js +7 -0
  21. package/dist/esm/table/components/row/index.js.map +1 -1
  22. package/dist/esm/table/components/row/styles.js +5 -5
  23. package/dist/esm/table/components/row/styles.js.map +1 -1
  24. package/dist/esm/table/models/virtualizer.d.ts +2 -0
  25. package/dist/esm/table/models/virtualizer.js +16 -1
  26. package/dist/esm/table/models/virtualizer.js.map +1 -1
  27. package/dist/esm/table/template.js +2 -0
  28. package/dist/esm/table/template.js.map +1 -1
  29. package/dist/esm/table/testing/table.pageobject.d.ts +2 -0
  30. package/dist/esm/table/testing/table.pageobject.js +9 -0
  31. package/dist/esm/table/testing/table.pageobject.js.map +1 -1
  32. package/package.json +2 -2
@@ -18745,6 +18745,10 @@
18745
18745
  name: 'arrow_down_left_and_arrow_up_right_16_x_16',
18746
18746
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m2.007 13.171 2.247-2.276-2.284-.447 5.246-1.732-1.753 5.217-.456-2.284-2.26 2.291zM13.194 2l-2.261 2.29-.456-2.283-1.753 5.217 5.246-1.732-2.284-.447 2.247-2.276z" class="cls-1"/></svg>`,
18747
18747
  };
18748
+ const arrowDownRectangle16X16 = {
18749
+ name: 'arrow_down_rectangle_16_x_16',
18750
+ data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M8.018 11 11 5.1 8.996 6.412 9 2H7v4.387L5 5.1zm0 0L11 5.1 8.996 6.412 9 2H7v4.387L5 5.1zM14 9v5H2V9h3.871l.512 1H3v3h10v-3H9.643l.506-1z" class="cls-1"/></svg>`,
18751
+ };
18748
18752
  const arrowDownRightAndArrowUpLeft16X16 = {
18749
18753
  name: 'arrow_down_right_and_arrow_up_left_16_x_16',
18750
18754
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m13.171 13.933-2.276-2.247-.447 2.284-1.732-5.246 5.217 1.753-2.284.456 2.291 2.26ZM2 2.746l2.29 2.261-2.283.456 5.217 1.753L5.492 1.97l-.447 2.284-2.276-2.247Z" class="cls-1"/></svg>`,
@@ -18813,6 +18817,10 @@
18813
18817
  name: 'arrow_up_left_and_arrow_down_right_16_x_16',
18814
18818
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m4.195 4.977-.451 2.296L2 2l5.256 1.762-2.301.458 6.849 6.803.452-2.296L14 14l-5.256-1.762 2.301-.458z" class="cls-1"/></svg>`,
18815
18819
  };
18820
+ const arrowUpRectangle16X16 = {
18821
+ name: 'arrow_up_rectangle_16_x_16',
18822
+ data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M7.982 2 5 7.9l2.004-1.312L7 11h2V6.613L11 7.9zm0 0L5 7.9l2.004-1.312L7 11h2V6.613L11 7.9zM14 9v5H2V9h4v1H3v3h10v-3h-3V9z" class="cls-1"/></svg>`,
18823
+ };
18816
18824
  const arrowUpRightAndArrowDownLeft16X16 = {
18817
18825
  name: 'arrow_up_right_and_arrow_down_left_16_x_16',
18818
18826
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m11.023 4.195-2.296-.45L14 2l-1.762 5.256-.458-2.301-6.803 6.85 2.296.45L2 14l1.762-5.256.458 2.301z" class="cls-1"/></svg>`,
@@ -22344,6 +22352,18 @@ so this becomes the fallback color for the slot */ ''}
22344
22352
  }
22345
22353
  registerIcon('icon-arrow-down-left-and-arrow-up-right', IconArrowDownLeftAndArrowUpRight);
22346
22354
 
22355
+ // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
22356
+ // See generation source in nimble-components/build/generate-icons
22357
+ /**
22358
+ * The icon component for the 'arrowDownRectangle' icon
22359
+ */
22360
+ class IconArrowDownRectangle extends Icon {
22361
+ constructor() {
22362
+ super(arrowDownRectangle16X16);
22363
+ }
22364
+ }
22365
+ registerIcon('icon-arrow-down-rectangle', IconArrowDownRectangle);
22366
+
22347
22367
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
22348
22368
  // See generation source in nimble-components/build/generate-icons
22349
22369
  /**
@@ -22538,6 +22558,18 @@ so this becomes the fallback color for the slot */ ''}
22538
22558
  }
22539
22559
  registerIcon('icon-arrow-up-left-and-arrow-down-right', IconArrowUpLeftAndArrowDownRight);
22540
22560
 
22561
+ // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
22562
+ // See generation source in nimble-components/build/generate-icons
22563
+ /**
22564
+ * The icon component for the 'arrowUpRectangle' icon
22565
+ */
22566
+ class IconArrowUpRectangle extends Icon {
22567
+ constructor() {
22568
+ super(arrowUpRectangle16X16);
22569
+ }
22570
+ }
22571
+ registerIcon('icon-arrow-up-rectangle', IconArrowUpRectangle);
22572
+
22541
22573
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
22542
22574
  // See generation source in nimble-components/build/generate-icons
22543
22575
  /**
@@ -66029,7 +66061,7 @@ focus outline in that case.
66029
66061
  position: absolute;
66030
66062
  }
66031
66063
 
66032
- :host([selectable]:not([selected]):hover)::before {
66064
+ :host([selectable]:not([selected])[allow-hover]:hover)::before {
66033
66065
  background-color: ${fillHoverColor};
66034
66066
  }
66035
66067
 
@@ -66037,7 +66069,7 @@ focus outline in that case.
66037
66069
  background-color: ${fillSelectedColor};
66038
66070
  }
66039
66071
 
66040
- :host([selected]:hover)::before {
66072
+ :host([selected][allow-hover]:hover)::before {
66041
66073
  background-color: ${fillHoverSelectedColor};
66042
66074
  }
66043
66075
 
@@ -66152,7 +66184,7 @@ focus outline in that case.
66152
66184
  height: ${controlHeight};
66153
66185
  }
66154
66186
 
66155
- :host(:hover) nimble-table-cell {
66187
+ :host([allow-hover]:hover) nimble-table-cell {
66156
66188
  --ni-private-table-cell-action-menu-display: block;
66157
66189
  }
66158
66190
 
@@ -66164,7 +66196,7 @@ focus outline in that case.
66164
66196
  --ni-private-table-cell-action-menu-display: block;
66165
66197
  }
66166
66198
  `.withBehaviors(themeBehavior(Theme.color, css `
66167
- :host([selectable]:not([selected]):hover)::before {
66199
+ :host([selectable]:not([selected])[allow-hover]:hover)::before {
66168
66200
  background-color: ${hexToRgbaCssColor(White, 0.05)};
66169
66201
  }
66170
66202
 
@@ -66172,7 +66204,7 @@ focus outline in that case.
66172
66204
  background-color: ${hexToRgbaCssColor(White, 0.25)};
66173
66205
  }
66174
66206
 
66175
- :host([selected]:hover)::before {
66207
+ :host([selected][allow-hover]:hover)::before {
66176
66208
  background-color: ${hexToRgbaCssColor(White, 0.2)};
66177
66209
  }
66178
66210
  `));
@@ -66456,6 +66488,10 @@ focus outline in that case.
66456
66488
  * @internal
66457
66489
  */
66458
66490
  this.animationClass = '';
66491
+ /**
66492
+ * @internal
66493
+ */
66494
+ this.allowHover = false;
66459
66495
  // Programmatically updating the selection state of a checkbox fires the 'change' event.
66460
66496
  // Therefore, selection change events that occur due to programmatically updating
66461
66497
  // the selection checkbox 'checked' value should be ingored.
@@ -66696,6 +66732,9 @@ focus outline in that case.
66696
66732
  __decorate$1([
66697
66733
  observable
66698
66734
  ], TableRow.prototype, "animationClass", void 0);
66735
+ __decorate$1([
66736
+ attr({ attribute: 'allow-hover', mode: 'boolean' })
66737
+ ], TableRow.prototype, "allowHover", void 0);
66699
66738
  __decorate$1([
66700
66739
  volatile
66701
66740
  ], TableRow.prototype, "isTopLevelParentRow", null);
@@ -66751,7 +66790,7 @@ focus outline in that case.
66751
66790
  position: absolute;
66752
66791
  }
66753
66792
 
66754
- :host(:hover)::before {
66793
+ :host([allow-hover]:hover)::before {
66755
66794
  background-color: ${fillHoverColor};
66756
66795
  }
66757
66796
 
@@ -66797,11 +66836,11 @@ focus outline in that case.
66797
66836
  padding-left: 0px;
66798
66837
  }
66799
66838
  `.withBehaviors(themeBehavior(Theme.color, css `
66800
- :host(:hover)::before {
66839
+ :host([allow-hover]:hover)::before {
66801
66840
  background-color: ${hexToRgbaCssColor(White, 0.05)};
66802
66841
  }
66803
66842
  `), themeBehavior(Theme.dark, css `
66804
- :host(:hover)::before {
66843
+ :host([allow-hover]:hover)::before {
66805
66844
  background-color: ${hexToRgbaCssColor(White, 0.1)};
66806
66845
  }
66807
66846
  `));
@@ -66865,6 +66904,10 @@ focus outline in that case.
66865
66904
  * @internal
66866
66905
  */
66867
66906
  this.animationClass = '';
66907
+ /**
66908
+ * @internal
66909
+ */
66910
+ this.allowHover = false;
66868
66911
  // Programmatically updating the selection state of a checkbox fires the 'change' event.
66869
66912
  // Therefore, selection change events that occur due to programmatically updating
66870
66913
  // the selection checkbox 'checked' value should be ingored.
@@ -66957,6 +67000,9 @@ focus outline in that case.
66957
67000
  __decorate$1([
66958
67001
  observable
66959
67002
  ], TableGroupRow.prototype, "animationClass", void 0);
67003
+ __decorate$1([
67004
+ attr({ attribute: 'allow-hover', mode: 'boolean' })
67005
+ ], TableGroupRow.prototype, "allowHover", void 0);
66960
67006
  const nimbleTableGroupRow = TableGroupRow.compose({
66961
67007
  baseName: 'table-group-row',
66962
67008
  template: template$h,
@@ -67089,6 +67135,7 @@ focus outline in that case.
67089
67135
  ?selectable="${(_, c) => c.parent.selectionMode === TableRowSelectionMode.multiple}"
67090
67136
  selection-state="${(x, c) => c.parent.tableData[x.index]?.selectionState}"
67091
67137
  :resolvedRowIndex="${x => x.index}"
67138
+ ?allow-hover="${(_, c) => !c.parent.virtualizer.isScrolling}"
67092
67139
  @focusin="${(_, c) => c.parent.onRowFocusIn(c.event)}"
67093
67140
  @blur="${(_, c) => c.parent.onRowBlur(c.event)}"
67094
67141
  @group-selection-toggle="${(x, c) => c.parent.onRowSelectionToggle(x.index, c.event)}"
@@ -67114,6 +67161,7 @@ focus outline in that case.
67114
67161
  ?row-operation-grid-cell-hidden="${(_, c) => !c.parent.showRowOperationColumn}"
67115
67162
  ?loading="${(x, c) => c.parent.tableData[x.index]?.isLoadingChildren}"
67116
67163
  :resolvedRowIndex="${x => x.index}"
67164
+ ?allow-hover="${(_, c) => !c.parent.virtualizer.isScrolling}"
67117
67165
  @click="${(x, c) => c.parent.onRowClick(x.index, c.event)}"
67118
67166
  @focusin="${(_, c) => c.parent.onRowFocusIn(c.event)}"
67119
67167
  @blur="${(_, c) => c.parent.onRowBlur(c.event)}"
@@ -67872,9 +67920,11 @@ focus outline in that case.
67872
67920
  constructor(table, tanStackTable) {
67873
67921
  this.visibleItems = [];
67874
67922
  this.scrollHeight = 0;
67923
+ this.isScrolling = false;
67875
67924
  this.headerContainerMarginRight = 0;
67876
67925
  this.rowContainerYOffset = 0;
67877
67926
  this._pageSize = 0;
67927
+ this.isScrollingTimer = 0;
67878
67928
  this.table = table;
67879
67929
  this.tanStackTable = tanStackTable;
67880
67930
  this.viewportResizeObserver = new ResizeObserver(entries => {
@@ -67928,7 +67978,7 @@ focus outline in that case.
67928
67978
  estimateSize: (_) => rowHeight,
67929
67979
  enableSmoothScroll: true,
67930
67980
  overscan: 3,
67931
- scrollingDelay: 5,
67981
+ isScrollingResetDelay: 250,
67932
67982
  scrollToFn: elementScroll,
67933
67983
  observeElementOffset,
67934
67984
  observeElementRect,
@@ -67939,6 +67989,16 @@ focus outline in that case.
67939
67989
  const virtualizer = this.virtualizer;
67940
67990
  this.visibleItems = virtualizer.getVirtualItems();
67941
67991
  this.scrollHeight = virtualizer.getTotalSize();
67992
+ this.isScrolling = virtualizer.isScrolling;
67993
+ // There are multiple browser bugs that can result in us getting stuck thinking that we're scrolling.
67994
+ // As a workaround, we assume scrolling stopped if we haven't received an update in 300ms.
67995
+ // Tech debt item to remove this workaround: https://github.com/ni/nimble/issues/2382
67996
+ window.clearTimeout(this.isScrollingTimer);
67997
+ if (this.isScrolling) {
67998
+ this.isScrollingTimer = window.setTimeout(() => {
67999
+ this.isScrolling = false;
68000
+ }, 300);
68001
+ }
67942
68002
  // We're using a separate div ('table-scroll') to represent the full height of all rows, and
67943
68003
  // the row container's height is only big enough to hold the virtualized rows. So we don't
67944
68004
  // use the TanStackVirtual-provided 'start' offset (which is in terms of the full height)
@@ -67960,6 +68020,9 @@ focus outline in that case.
67960
68020
  __decorate$1([
67961
68021
  observable
67962
68022
  ], Virtualizer.prototype, "scrollHeight", void 0);
68023
+ __decorate$1([
68024
+ observable
68025
+ ], Virtualizer.prototype, "isScrolling", void 0);
67963
68026
  __decorate$1([
67964
68027
  observable
67965
68028
  ], Virtualizer.prototype, "headerContainerMarginRight", void 0);