@ni/nimble-components 29.8.1 → 29.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16333,7 +16333,7 @@
16333
16333
 
16334
16334
  /**
16335
16335
  * Do not edit directly
16336
- * Generated on Thu, 11 Jul 2024 17:27:02 GMT
16336
+ * Generated on Thu, 11 Jul 2024 21:51:38 GMT
16337
16337
  */
16338
16338
 
16339
16339
  const Information100DarkUi = "#a46eff";
@@ -16755,7 +16755,6 @@
16755
16755
  const keyFunction2 = "F2";
16756
16756
  const keyPageDown = "PageDown";
16757
16757
  const keyPageUp = "PageUp";
16758
- const keyShift = "Shift";
16759
16758
  const keySpace = " ";
16760
16759
  const keyTab = "Tab";
16761
16760
 
@@ -66389,7 +66388,7 @@ focus outline in that case.
66389
66388
  aria-multiselectable="${x => x.ariaMultiSelectable}"
66390
66389
  ${children$1({ property: 'childItems', filter: elements() })}
66391
66390
  >
66392
- <div class="table-container ${x => (x.documentShiftKeyDown ? 'disable-select' : '')}"
66391
+ <div class="table-container ${x => (x.windowShiftKeyDown ? 'disable-select' : '')}"
66393
66392
  style="
66394
66393
  --ni-private-table-scroll-x: -${x => x.scrollX}px;
66395
66394
  --ni-private-table-header-container-margin-right: ${x => x.virtualizer.headerContainerMarginRight}px;
@@ -69527,7 +69526,7 @@ focus outline in that case.
69527
69526
  * space through a column resize operation.
69528
69527
  */
69529
69528
  this.tableScrollableMinWidth = 0;
69530
- this.documentShiftKeyDown = false;
69529
+ this.windowShiftKeyDown = false;
69531
69530
  this.tableValidator = new TableValidator();
69532
69531
  this.tableUpdateTracker = new TableUpdateTracker(this);
69533
69532
  this.columnNotifiers = [];
@@ -69544,14 +69543,13 @@ focus outline in that case.
69544
69543
  this.scrollX = event.target.scrollLeft;
69545
69544
  };
69546
69545
  this.onKeyDown = (event) => {
69547
- if (event.key === keyShift) {
69548
- this.documentShiftKeyDown = true;
69549
- }
69546
+ this.windowShiftKeyDown = event.shiftKey;
69550
69547
  };
69551
69548
  this.onKeyUp = (event) => {
69552
- if (event.key === keyShift) {
69553
- this.documentShiftKeyDown = false;
69554
- }
69549
+ this.windowShiftKeyDown = event.shiftKey;
69550
+ };
69551
+ this.onBlur = () => {
69552
+ this.windowShiftKeyDown = false;
69555
69553
  };
69556
69554
  this.getRowCanExpand = (row) => {
69557
69555
  return this.expansionManager.isRowExpandable(row);
@@ -69649,16 +69647,18 @@ focus outline in that case.
69649
69647
  passive: true
69650
69648
  });
69651
69649
  this.keyboardNavigationManager.connect();
69652
- document.addEventListener('keydown', this.onKeyDown);
69653
- document.addEventListener('keyup', this.onKeyUp);
69650
+ window.addEventListener('keydown', this.onKeyDown);
69651
+ window.addEventListener('keyup', this.onKeyUp);
69652
+ window.addEventListener('blur', this.onBlur);
69654
69653
  }
69655
69654
  disconnectedCallback() {
69656
69655
  super.disconnectedCallback();
69657
69656
  this.virtualizer.disconnect();
69658
69657
  this.keyboardNavigationManager.disconnect();
69659
69658
  this.viewport.removeEventListener('scroll', this.onViewPortScroll);
69660
- document.removeEventListener('keydown', this.onKeyDown);
69661
- document.removeEventListener('keyup', this.onKeyUp);
69659
+ window.removeEventListener('keydown', this.onKeyDown);
69660
+ window.removeEventListener('keyup', this.onKeyUp);
69661
+ window.removeEventListener('blur', this.onBlur);
69662
69662
  }
69663
69663
  checkValidity() {
69664
69664
  return this.tableValidator.isValid();
@@ -69691,7 +69691,7 @@ focus outline in that case.
69691
69691
  /** @internal */
69692
69692
  onRowSelectionToggle(rowIndex, event) {
69693
69693
  event.stopImmediatePropagation();
69694
- const selectionChanged = this.selectionManager.handleRowSelectionToggle(this.tableData[rowIndex], event.detail.newState, this.documentShiftKeyDown);
69694
+ const selectionChanged = this.selectionManager.handleRowSelectionToggle(this.tableData[rowIndex], event.detail.newState, this.windowShiftKeyDown);
69695
69695
  if (selectionChanged) {
69696
69696
  void this.emitSelectionChangeEvent();
69697
69697
  }
@@ -70367,7 +70367,7 @@ focus outline in that case.
70367
70367
  ], Table$1.prototype, "tableScrollableMinWidth", void 0);
70368
70368
  __decorate$1([
70369
70369
  observable
70370
- ], Table$1.prototype, "documentShiftKeyDown", void 0);
70370
+ ], Table$1.prototype, "windowShiftKeyDown", void 0);
70371
70371
  const nimbleTable = Table$1.compose({
70372
70372
  baseName: 'table',
70373
70373
  template: template$g,