@ni/nimble-components 35.3.0 → 35.3.1

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.
@@ -12369,14 +12369,12 @@ const t=this.hierarchyOptions.get(n)?.delayedHierarchyState,o=i.delayedHierarchy
12369
12369
  t!==BL||o!==LL||this.parentRowsWithChildren.has(n)||this.explicitExpansionStates.delete(n)}this.hierarchyOptions=e}isRowExpandable(t){return t.subRows.length>0||this.canLoadDelayedChildren(t.id)}setHierarchyEnabled(t){this.isHierarchyEnabled=t}isLoadingChildren(t){return!!this.isHierarchyEnabled&&this.hierarchyOptions.get(t)?.delayedHierarchyState===BL}canLoadDelayedChildren(t){if(!this.isHierarchyEnabled)return!1
12370
12370
  const e=this.hierarchyOptions.get(t)?.delayedHierarchyState
12371
12371
  return e!==NL}getDefaultExpansionState(t){return 0!==t.subRows.length}}class uP extends fD{isValid(){return this.noneTracked()}getValidationFlags(){return this.getTrackedItems()}}class pP extends uP{constructor(t){super(t),this.isColumnValid=!0}getValidity(){return this.getValidationFlags()}onTrackingChange(){super.onTrackingChange(),this.isColumnValid=this.isValid()}setConditionValue(t,e){e?this.track(t):this.untrack(t)}}t([C],pP.prototype,"isColumnValid",void 0)
12372
- class fP{get inNavigationMode(){return this.focusType!==JL&&this.focusType!==QL}constructor(t,e){this.table=t,this.virtualizer=e,this.focusType=WL,this.headerActionIndex=-1,this.rowIndex=-1,this.cellContentIndex=-1,this.columnIndex=-1,this.focusWithinTable=!1,this.isCurrentlyFocusingElement=!1,this.visibleRowNotifiers=[],this.onTableFocusIn=t=>{this.focusWithinTable=!0,this.updateFocusStateFromActiveElement(!1)
12373
- const e=void 0!==this.table.openActionMenuRecordId
12374
- if((t.target===this.table||this.focusType===WL)&&!e){let t=!0
12375
- this.hasRowOrCellFocusType()&&this.scrollToAndFocusRow(this.rowIndex)&&(t=!1),t&&!this.setFocusOnHeader()&&this.table.blur()}},this.onTableFocusOut=()=>{this.focusWithinTable=!1},this.onCellActionMenuBlur=t=>{t.stopPropagation()
12372
+ class fP{get inNavigationMode(){return this.focusType!==JL&&this.focusType!==QL}constructor(t,e){this.table=t,this.virtualizer=e,this.focusType=WL,this.headerActionIndex=-1,this.rowIndex=-1,this.cellContentIndex=-1,this.columnIndex=-1,this.focusWithinTable=!1,this.isCurrentlyFocusingElement=!1,this.focusedViaPointer=!1,this.visibleRowNotifiers=[],this.onTableFocusIn=t=>{this.focusWithinTable=!0,this.updateFocusStateFromActiveElement()
12373
+ void 0!==this.table.openActionMenuRecordId||(this.focusType===WL?this.focusSomethingOtherThanTheTable():t.target===this.table&&(this.hasRowOrCellFocusType()&&this.rowIndexIsValid(this.rowIndex)?this.scrollToAndFocusRow(this.rowIndex):this.hasHeaderFocusType()?this.focusHeaderElement():this.focusSomethingOtherThanTheTable())),this.focusedViaPointer=!1},this.onTableFocusOut=()=>{this.focusWithinTable=!1},this.onCellActionMenuBlur=t=>{t.stopPropagation()
12376
12374
  const e=t.detail
12377
- e.actionMenuButton&&this.setActionMenuButtonFocused(e.actionMenuButton,!1)},this.onCellViewFocusIn=t=>{t.stopPropagation(),this.updateFocusStateFromActiveElement(!1)},this.onCellFocusIn=t=>{t.stopPropagation()
12378
- const e=t.detail
12379
- this.updateFocusStateFromActiveElement(!0),this.focusType===KL&&this.getActiveElement()===e&&this.focusCurrentRow(!1)},this.onCellBlur=t=>{t.stopPropagation()
12375
+ e.actionMenuButton&&this.setActionMenuButtonFocused(e.actionMenuButton,!1)},this.onCellViewFocusIn=t=>{t.stopPropagation(),this.updateFocusStateFromActiveElement()},this.onCellFocusIn=t=>{t.stopPropagation()
12376
+ const e=t.detail,n=this.updateFocusStateFromActiveElement()
12377
+ n&&this.hasRowOrCellFocusType()&&this.rowIndex!==n.resolvedRowIndex&&this.setRowFocusState(n.resolvedRowIndex),this.focusType===KL&&this.getActiveElement()===e&&this.focusCurrentRow(!1)},this.onCellBlur=t=>{t.stopPropagation()
12380
12378
  const e=t.detail
12381
12379
  this.setElementFocusable(e,!1)},this.onCaptureKeyDown=t=>{let e=!1
12382
12380
  if(t.key===pn)e=this.onTabPressed(t.shiftKey)
@@ -12401,10 +12399,10 @@ break
12401
12399
  case un:e=this.onSpacePressed(t.shiftKey)
12402
12400
  break
12403
12401
  case"F2":e=this.onF2Pressed()}e&&t.preventDefault()},this.onKeyDown=t=>{if(!(this.inNavigationMode||t.defaultPrevented||t.key!==an&&"F2"!==t.key)){const t=this.getCurrentRow()
12404
- t&&this.trySetCellFocus(t.getFocusableElements())}},this.onViewportKeyDown=t=>{let e=!this.inNavigationMode&&(t.key===rn||t.key===en)
12402
+ t&&this.trySetCellFocus(t.getFocusableElements())}},this.onPointerDown=()=>{this.focusedViaPointer=!0},this.onPointerUpOrCancel=()=>{this.focusedViaPointer=!1},this.onViewportKeyDown=t=>{let e=!this.inNavigationMode&&(t.key===rn||t.key===en)
12405
12403
  switch(t.key){case hn:case dn:case ln:case cn:e=!0}e&&(t.preventDefault(),t.stopImmediatePropagation())},this.tableNotifier=x.getNotifier(this.table),this.tableNotifier.subscribe(this,"rowElements"),this.virtualizerNotifier=x.getNotifier(this.virtualizer),this.virtualizerNotifier.subscribe(this,"visibleItems")}resetFocusState(){this.focusType=WL
12406
12404
  const t=this.getActiveElement()
12407
- t&&this.isInTable(t)&&this.setDefaultFocus()}get hasActiveRowOrCellFocus(){return this.focusWithinTable&&this.hasRowOrCellFocusType()}connect(){this.table.addEventListener("keydown",this.onCaptureKeyDown,{capture:!0}),this.table.addEventListener("keydown",this.onKeyDown),this.table.addEventListener("focusin",this.onTableFocusIn),this.table.addEventListener("focusout",this.onTableFocusOut),this.table.viewport.addEventListener("keydown",this.onViewportKeyDown),this.table.viewport.addEventListener("cell-action-menu-blur",this.onCellActionMenuBlur),this.table.viewport.addEventListener("cell-view-focus-in",this.onCellViewFocusIn),this.table.viewport.addEventListener("cell-focus-in",this.onCellFocusIn),this.table.viewport.addEventListener("cell-blur",this.onCellBlur)}disconnect(){this.table.removeEventListener("keydown",this.onCaptureKeyDown,{capture:!0}),this.table.removeEventListener("keydown",this.onKeyDown),this.table.removeEventListener("focusin",this.onTableFocusIn),this.table.removeEventListener("focusout",this.onTableFocusOut),this.table.viewport.removeEventListener("keydown",this.onViewportKeyDown),this.table.viewport.removeEventListener("cell-action-menu-blur",this.onCellActionMenuBlur),this.table.viewport.removeEventListener("cell-view-focus-in",this.onCellViewFocusIn),this.table.viewport.removeEventListener("cell-focus-in",this.onCellFocusIn),this.table.viewport.removeEventListener("cell-blur",this.onCellBlur)}handleChange(t,e){let n=!1
12405
+ t&&this.isInTable(t)&&this.setDefaultFocus()}get hasActiveRowOrCellFocus(){return this.focusWithinTable&&this.hasRowOrCellFocusType()}connect(){this.table.addEventListener("keydown",this.onCaptureKeyDown,{capture:!0}),this.table.addEventListener("keydown",this.onKeyDown),this.table.addEventListener("pointerdown",this.onPointerDown),this.table.addEventListener("pointerup",this.onPointerUpOrCancel),this.table.addEventListener("pointercancel",this.onPointerUpOrCancel),this.table.addEventListener("focusin",this.onTableFocusIn),this.table.addEventListener("focusout",this.onTableFocusOut),this.table.viewport.addEventListener("keydown",this.onViewportKeyDown),this.table.viewport.addEventListener("cell-action-menu-blur",this.onCellActionMenuBlur),this.table.viewport.addEventListener("cell-view-focus-in",this.onCellViewFocusIn),this.table.viewport.addEventListener("cell-focus-in",this.onCellFocusIn),this.table.viewport.addEventListener("cell-blur",this.onCellBlur)}disconnect(){this.table.removeEventListener("keydown",this.onCaptureKeyDown,{capture:!0}),this.table.removeEventListener("keydown",this.onKeyDown),this.table.removeEventListener("pointerdown",this.onPointerDown),this.table.removeEventListener("pointerup",this.onPointerUpOrCancel),this.table.removeEventListener("pointercancel",this.onPointerUpOrCancel),this.table.removeEventListener("focusin",this.onTableFocusIn),this.table.removeEventListener("focusout",this.onTableFocusOut),this.table.viewport.removeEventListener("keydown",this.onViewportKeyDown),this.table.viewport.removeEventListener("cell-action-menu-blur",this.onCellActionMenuBlur),this.table.viewport.removeEventListener("cell-view-focus-in",this.onCellViewFocusIn),this.table.viewport.removeEventListener("cell-focus-in",this.onCellFocusIn),this.table.viewport.removeEventListener("cell-blur",this.onCellBlur)}handleChange(t,e){let n=!1
12408
12406
  if(t===this.virtualizer&&"visibleItems"===e)n=!0
12409
12407
  else if(t===this.table&&"rowElements"===e){for(const t of this.visibleRowNotifiers)t.unsubscribe(this)
12410
12408
  this.visibleRowNotifiers=[]
@@ -12415,7 +12413,7 @@ this.rowIndex=0}this.focusWithinTable&&this.focusCurrentRow(!1)}}onRowFocusIn(t)
12415
12413
  const e=t.target
12416
12414
  this.isResolvedRowType(e)&&this.rowIndex!==e.resolvedRowIndex&&this.setRowFocusState(e.resolvedRowIndex)}onRowBlur(t){const e=t.target
12417
12415
  this.isResolvedRowType(e)&&this.setElementFocusable(e,!1)}onRowActionMenuToggle(t){if(t.detail.newState){const e=t.target,n=this.table.visibleColumns.findIndex((e=>e.columnId===t.detail.columnId))
12418
- this.setCellActionMenuFocusState(e.resolvedRowIndex,n,!1)}}onEnterPressed(t){let e,n
12416
+ this.setCellActionMenuFocusState(e.resolvedRowIndex,n,!1)}}focusSomethingOtherThanTheTable(){this.setDefaultFocus(),this.focusType===WL&&this.table.blur()}onEnterPressed(t){let e,n
12419
12417
  if(this.hasRowOrCellFocusType()&&(e=this.getCurrentRow(),n=e?.getFocusableElements()),this.focusType===KL&&e instanceof TB)return this.toggleRowExpanded(e),!0
12420
12418
  if(this.focusType===XL){if(t){const t=n?.cells[this.columnIndex]
12421
12419
  if(t?.actionMenuButton&&!t.actionMenuButton.open)return t.actionMenuButton.toggleButton.control.click(),!0}return this.focusFirstInteractiveElementInCurrentCell(n)}return!1}onF2Pressed(){if(this.focusType===XL){const t=this.getCurrentRow(),e=t?.getFocusableElements()
@@ -12435,7 +12433,7 @@ return this.trySetRowSelectionCheckboxFocus(e)||this.trySetCellFocus(e,0)}return
12435
12433
  return this.trySetCellFocus(e,this.table.visibleColumns.length-1)}return this.onMoveDown(0,this.table.tableData.length-1)}handleHomeEndWithinRow(t){return(this.focusType===XL||this.focusType===YL)&&!t}onTabPressed(t){const e=this.getActiveElement()
12436
12434
  if(null===e||e===this.table)return!1
12437
12435
  const n=this.hasRowOrCellFocusType()?this.getNextRowTabStop(t):this.getNextHeaderTabStop(t)
12438
- return n?(this.focusType=n.focusType,this.rowIndex=n.rowIndex??this.rowIndex,this.columnIndex=n.columnIndex??this.columnIndex,this.headerActionIndex=n.headerActionIndex??this.headerActionIndex,this.cellContentIndex=n.cellContentIndex??this.cellContentIndex,this.hasRowOrCellFocusType()?this.focusCurrentRow(!1):this.focusHeaderElement(),!0):(this.blurAfterLastTab(e),!1)}getNextRowTabStop(t){const e=this.getCurrentRow()
12436
+ return n?(this.focusType=n.focusType,this.rowIndex=n.rowIndex??this.rowIndex,this.columnIndex=n.columnIndex??this.columnIndex,this.headerActionIndex=n.headerActionIndex??this.headerActionIndex,this.cellContentIndex=n.cellContentIndex??this.cellContentIndex,this.hasRowOrCellFocusType()?this.focusCurrentRow(!this.focusedViaPointer):this.focusHeaderElement(),!0):(this.blurAfterLastTab(e),!1)}getNextRowTabStop(t){const e=this.getCurrentRow()
12439
12437
  if(void 0===e)return
12440
12438
  let n=-1
12441
12439
  const i=[],o=e.getFocusableElements()
@@ -12460,15 +12458,19 @@ switch(this.focusType){case ZL:return this.setRowFocusState(0),this.scrollToAndF
12460
12458
  case GL:return this.setCellFocusState(this.columnIndex,0,!1),this.scrollToAndFocusRow(0)
12461
12459
  case KL:case YL:case XL:{const i={}
12462
12460
  let o=this.rowIndex
12463
- return void 0!==e&&(o=e),o+=t,n&&o>=this.table.tableData.length&&(o=this.table.tableData.length-1),t>1&&(i.align="end"),o>this.rowIndex&&o<this.table.tableData.length&&this.scrollToAndFocusRow(o,i)}}return!1}updateFocusStateFromActiveElement(t){const e=this.getActiveElement()
12464
- if(e){const n=this.getContainingRow(e)
12465
- if(n){if(!(n instanceof TB)){const t=this.getContainingCell(e)
12466
- if(t){const i=this.table.visibleColumns.indexOf(t.column)
12467
- if(t.actionMenuButton===e)return void this.setCellActionMenuFocusState(n.resolvedRowIndex,i,!1)
12468
- const o=t.cellView.tabbableChildren.indexOf(e)
12469
- if(o>-1)return void this.setCellContentFocusState(o,n.resolvedRowIndex,i,!1)}}t&&this.hasRowOrCellFocusType()&&this.rowIndex!==n.resolvedRowIndex&&this.setRowFocusState(n.resolvedRowIndex)}}}focusElement(t,e){const n=this.getActiveElement()
12470
- n!==t&&(this.setElementFocusable(t,!0),this.isCurrentlyFocusingElement=!0,t.focus(e),this.isCurrentlyFocusingElement=!1,n&&this.isInTable(n)&&this.setElementFocusable(n,!1))}setElementFocusable(t,e){t!==this.table&&(t.tabIndex=e?0:-1)}setActionMenuButtonFocused(t,e){e?t.classList.add("cell-action-menu-focused"):t.classList.remove("cell-action-menu-focused")}setFocusOnHeader(){return this.hasHeaderFocusType()?this.focusHeaderElement():(this.setDefaultFocus(),this.focusType!==WL)}setDefaultFocus(){const t=this.getTableHeaderFocusableElements()
12471
- this.trySetHeaderActionFocus(t,0)||this.trySetColumnHeaderFocus(t,0)||this.scrollToAndFocusRow(0)||(this.focusType=WL)}scrollToAndFocusRow(t,e){if(t>=0&&t<this.table.tableData.length){switch(this.focusType){case WL:case ZL:case GL:this.setRowFocusState(t)}return this.rowIndex=t,this.virtualizer.scrollToIndex(t,e),this.focusCurrentRow(!0),!0}return!1}focusCurrentRow(t){const e=this.getCurrentRowVisibleIndex()
12461
+ return void 0!==e&&(o=e),o+=t,n&&o>=this.table.tableData.length&&(o=this.table.tableData.length-1),t>1&&(i.align="end"),o>this.rowIndex&&o<this.table.tableData.length&&this.scrollToAndFocusRow(o,i)}}return!1}updateFocusStateFromActiveElement(){const{activeElement:t,row:e,cell:n}=this.getActiveElementCellAndRow()
12462
+ if(!n)return e
12463
+ const i=this.table.visibleColumns.indexOf(n.column)
12464
+ if(n.actionMenuButton===t)this.setCellActionMenuFocusState(e.resolvedRowIndex,i,!1)
12465
+ else{const o=n.cellView.tabbableChildren.indexOf(t)
12466
+ o>-1&&this.setCellContentFocusState(o,e.resolvedRowIndex,i,!1)}return e}getActiveElementCellAndRow(){const t=this.getActiveElement()
12467
+ if(!t)return{}
12468
+ const e=this.getContainingRow(t)
12469
+ if(!e)return{activeElement:t}
12470
+ if(e instanceof TB)return{activeElement:t,row:e}
12471
+ return{activeElement:t,row:e,cell:this.getContainingCell(t)}}focusElement(t,e){const n=this.getActiveElement()
12472
+ n!==t&&(this.setElementFocusable(t,!0),this.isCurrentlyFocusingElement=!0,t.focus(e),this.isCurrentlyFocusingElement=!1,n&&this.isInTable(n)&&this.setElementFocusable(n,!1))}setElementFocusable(t,e){t!==this.table&&(t.tabIndex=e?0:-1)}setActionMenuButtonFocused(t,e){e?t.classList.add("cell-action-menu-focused"):t.classList.remove("cell-action-menu-focused")}setDefaultFocus(){const t=this.getTableHeaderFocusableElements()
12473
+ this.trySetHeaderActionFocus(t,0)||this.trySetColumnHeaderFocus(t,0)||this.scrollToAndFocusRow(0)||(this.focusType=WL)}scrollToAndFocusRow(t,e){return!!this.rowIndexIsValid(t)&&(this.hasRowOrCellFocusType()||this.setRowFocusState(),this.rowIndex=t,this.virtualizer.scrollToIndex(t,e),this.focusCurrentRow(!this.focusedViaPointer),!0)}rowIndexIsValid(t){return t>=0&&t<this.table.tableData.length}focusCurrentRow(t){const e=this.getCurrentRowVisibleIndex()
12472
12474
  if(e<0)return!1
12473
12475
  const n=this.table.rowElements[e]
12474
12476
  let i=!1
@@ -12487,7 +12489,7 @@ break}case QL:i=n.cells[this.columnIndex]?.cell.cellView.tabbableChildren[this.c
12487
12489
  let e
12488
12490
  switch(this.focusType){case ZL:e=t.headerActions[this.headerActionIndex]
12489
12491
  break
12490
- case GL:e=t.columnHeaders[this.columnIndex]}return!!e&&(this.focusElement(e),!0)}getCurrentRowVisibleIndex(){return this.table.rowElements.findIndex((t=>t.resolvedRowIndex===this.rowIndex))}getTableHeaderFocusableElements(){const t=[]
12492
+ case GL:e=t.columnHeaders[this.columnIndex]}return!!e&&(this.focusElement(e,{preventScroll:this.focusedViaPointer}),!0)}getCurrentRowVisibleIndex(){return this.table.rowElements.findIndex((t=>t.resolvedRowIndex===this.rowIndex))}getTableHeaderFocusableElements(){const t=[]
12491
12493
  this.table.selectionCheckbox?.getRootNode()===this.table.shadowRoot&&t.push(this.table.selectionCheckbox),this.table.showCollapseAll&&this.table.collapseAllButton?.getRootNode()===this.table.shadowRoot&&t.push(this.table.collapseAllButton)
12492
12494
  const e=[]
12493
12495
  return this.canFocusColumnHeaders()&&this.table.columnHeadersContainer.querySelectorAll(vB).forEach((t=>e.push(t))),{headerActions:t,columnHeaders:e}}canFocusColumnHeaders(){return void 0!==this.table.columns.find((t=>!t.columnInternals.sortingDisabled))}getCurrentRow(){return this.table.rowElements[this.getCurrentRowVisibleIndex()]}isRowExpanded(t){if(t instanceof MB&&t.isParentRow||t instanceof TB)return t.expanded}toggleRowExpanded(t){t instanceof TB?t.onGroupExpandToggle():t.onRowExpandToggle(),this.focusRowElement(t)}getContainingRow(t){return this.getContainingElement(t,(t=>this.isResolvedRowType(t)))}getContainingCell(t){return this.getContainingElement(t,(t=>t instanceof CB))}getContainingElement(t,e){let n=t
@@ -12497,12 +12499,12 @@ for(;e&&e!==this.table;)e=e.parentElement??e.parentNode?.host
12497
12499
  return e===this.table}getActiveElement(){let t=document.activeElement
12498
12500
  for(;t?.shadowRoot?.activeElement&&(t=t.shadowRoot.activeElement,!(t instanceof Ve)||this.isResolvedRowType(t)||t instanceof CB||t instanceof oB););return t}focusFirstInteractiveElementInCurrentCell(t){return!!t&&(this.trySetCellContentFocus(t,0)||this.trySetCellActionMenuFocus(t))}hasRowOrCellFocusType(){switch(this.focusType){case XL:case JL:case QL:case KL:case YL:return!0
12499
12501
  default:return!1}}hasHeaderFocusType(){switch(this.focusType){case ZL:case GL:return!0
12500
- default:return!1}}trySetRowSelectionCheckboxFocus(t){return!!t?.selectionCheckbox&&(this.focusType=YL,this.focusCurrentRow(!0),!0)}trySetColumnHeaderFocus(t,e){return e>=0&&e<t.columnHeaders.length&&(this.focusType=GL,this.columnIndex=e,this.focusHeaderElement(),!0)}trySetHeaderActionFocus(t,e){return e>=0&&e<t.headerActions.length&&(this.focusType=ZL,this.headerActionIndex=e,this.focusHeaderElement(),!0)}trySetCellFocus(t,e,n){if(!t)return!1
12502
+ default:return!1}}trySetRowSelectionCheckboxFocus(t){return!!t?.selectionCheckbox&&(this.focusType=YL,this.focusCurrentRow(!this.focusedViaPointer),!0)}trySetColumnHeaderFocus(t,e){return e>=0&&e<t.columnHeaders.length&&(this.focusType=GL,this.columnIndex=e,this.focusHeaderElement(),!0)}trySetHeaderActionFocus(t,e){return e>=0&&e<t.headerActions.length&&(this.focusType=ZL,this.headerActionIndex=e,this.focusHeaderElement(),!0)}trySetCellFocus(t,e,n){if(!t)return!1
12501
12503
  const i=e??this.columnIndex,o=n??this.rowIndex
12502
12504
  return i>=0&&i<t.cells.length&&(this.focusType=XL,this.setRowCellFocusState(i,o,!0),!0)}trySetCellContentFocus(t,e,n,i){if(!t)return!1
12503
12505
  const o=n??this.columnIndex,r=i??this.rowIndex
12504
12506
  return o>=0&&o<t.cells.length&&e>=0&&e<t.cells[o].cell.cellView.tabbableChildren.length&&(this.setCellContentFocusState(e,r,o,!0),!0)}trySetCellActionMenuFocus(t,e,n){const i=e??this.columnIndex,o=n??this.rowIndex
12505
- return!!(i>=0&&i<t.cells.length&&t.cells[i].actionMenuButton)&&(this.setCellActionMenuFocusState(o,i,!0),!0)}setCellActionMenuFocusState(t,e,n){this.focusType=JL,this.setRowCellFocusState(e,t,n)}setCellContentFocusState(t,e,n,i){this.focusType=QL,this.cellContentIndex=t,this.setRowCellFocusState(n,e,i)}setRowFocusState(t){this.focusType=KL,void 0!==t&&(this.rowIndex=t)}setCellFocusState(t,e,n){this.focusType=XL,this.setRowCellFocusState(t,e,n)}setRowCellFocusState(t,e,n){this.rowIndex=e,this.columnIndex=t,n&&this.focusCurrentRow(!0)}isResolvedRowType(t){return t instanceof MB||t instanceof TB}}let mP=class extends Ve{get validity(){return this.tableValidator.getValidity()}get showRowOperationColumn(){return this.selectionMode===zL.multiple||this.showCollapseAll}get collapseButtonVisibility(){return this.canHaveCollapsibleRows?this.showCollapseAll?"visible":"":"hidden-size-reduced"}get rowHeight(){return this._rowHeight}constructor(){super(),this.selectionMode=zL.none,this.actionMenusPreserveSelection=!1,this.tableData=[],this.columns=[],this.childItems=[],this.rowElements=[],this.canRenderRows=!0,this.scrollX=0,this.selectionState=VL,this.showCollapseAll=!1,this.canHaveCollapsibleRows=!1,this.visibleColumns=[],this.tableScrollableMinWidth=0,this.windowShiftKeyDown=!1,this.tableValidator=new hB,this.tableUpdateTracker=new nP(this),this.columnNotifiers=[],this._rowHeight=0,this.isInitialized=!1,this.ignoreSelectionChangeEvents=!1,this.requestedSlots=new Map,this.borderWidthSubscriber={handleChange:()=>{this.updateRowHeight()}},this.controlHeightSubscriber={handleChange:()=>{this.updateRowHeight()}},this.actionMenuSlots=[],this.onViewPortScroll=t=>{this.scrollX=t.target.scrollLeft},this.onKeyDown=t=>{this.windowShiftKeyDown=t.shiftKey},this.onKeyUp=t=>{this.windowShiftKeyDown=t.shiftKey},this.onBlur=()=>{this.windowShiftKeyDown=!1},this.getRowCanExpand=t=>this.expansionManager.isRowExpandable(t),this.getIsRowExpanded=t=>this.expansionManager.isRowExpanded(t),this.handleRowSelectionChange=t=>{const e=t instanceof Function?t(this.table.getState().rowSelection):t
12507
+ return!!(i>=0&&i<t.cells.length&&t.cells[i].actionMenuButton)&&(this.setCellActionMenuFocusState(o,i,!0),!0)}setCellActionMenuFocusState(t,e,n){this.focusType=JL,this.setRowCellFocusState(e,t,n)}setCellContentFocusState(t,e,n,i){this.focusType=QL,this.cellContentIndex=t,this.setRowCellFocusState(n,e,i)}setRowFocusState(t){this.focusType=KL,void 0!==t&&(this.rowIndex=t)}setCellFocusState(t,e,n){this.focusType=XL,this.setRowCellFocusState(t,e,n)}setRowCellFocusState(t,e,n){this.rowIndex=e,this.columnIndex=t,n&&this.focusCurrentRow(!this.focusedViaPointer)}isResolvedRowType(t){return t instanceof MB||t instanceof TB}}let mP=class extends Ve{get validity(){return this.tableValidator.getValidity()}get showRowOperationColumn(){return this.selectionMode===zL.multiple||this.showCollapseAll}get collapseButtonVisibility(){return this.canHaveCollapsibleRows?this.showCollapseAll?"visible":"":"hidden-size-reduced"}get rowHeight(){return this._rowHeight}constructor(){super(),this.selectionMode=zL.none,this.actionMenusPreserveSelection=!1,this.tableData=[],this.columns=[],this.childItems=[],this.rowElements=[],this.canRenderRows=!0,this.scrollX=0,this.selectionState=VL,this.showCollapseAll=!1,this.canHaveCollapsibleRows=!1,this.visibleColumns=[],this.tableScrollableMinWidth=0,this.windowShiftKeyDown=!1,this.tableValidator=new hB,this.tableUpdateTracker=new nP(this),this.columnNotifiers=[],this._rowHeight=0,this.isInitialized=!1,this.ignoreSelectionChangeEvents=!1,this.requestedSlots=new Map,this.borderWidthSubscriber={handleChange:()=>{this.updateRowHeight()}},this.controlHeightSubscriber={handleChange:()=>{this.updateRowHeight()}},this.actionMenuSlots=[],this.onViewPortScroll=t=>{this.scrollX=t.target.scrollLeft},this.onKeyDown=t=>{this.windowShiftKeyDown=t.shiftKey},this.onKeyUp=t=>{this.windowShiftKeyDown=t.shiftKey},this.onBlur=()=>{this.windowShiftKeyDown=!1},this.getRowCanExpand=t=>this.expansionManager.isRowExpandable(t),this.getIsRowExpanded=t=>this.expansionManager.isRowExpanded(t),this.handleRowSelectionChange=t=>{const e=t instanceof Function?t(this.table.getState().rowSelection):t
12506
12508
  this.updateTableOptions({state:{rowSelection:e}})},this.handleExpandedChange=t=>{const e=t instanceof Function?t(this.table.getState().expanded):t
12507
12509
  this.updateTableOptions({state:{expanded:e}})},this.options={data:[],onStateChange:t=>{},onRowSelectionChange:this.handleRowSelectionChange,onExpandedChange:this.handleExpandedChange,getCoreRowModel:t=>zN((()=>[t.options.data]),(e=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(e,o,r){void 0===o&&(o=0)
12508
12510
  const s=[]