@ni/nimble-components 30.1.5 → 30.1.7

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.
@@ -10658,8 +10658,12 @@ const KR="nimble-table-header",YR=Mt`
10658
10658
  }
10659
10659
 
10660
10660
  :host(${zs}) {
10661
- outline: calc(2 * ${Ml}) solid ${dl};
10662
- outline-offset: calc(-2 * ${Ml});
10661
+ outline: none;
10662
+ box-shadow:
10663
+ inset calc(2 * ${Ml}) calc(2 * ${Ml})
10664
+ ${dl},
10665
+ inset calc(-2 * ${Ml}) calc(-2 * ${Ml})
10666
+ ${dl};
10663
10667
  }
10664
10668
 
10665
10669
  .expand-collapse-button {
@@ -11459,7 +11463,7 @@ Object.prototype.hasOwnProperty.call(s,a)||(s[a]={subRows:[],clientRecord:void 0
11459
11463
  const c=s[a]
11460
11464
  c.originalIndex=e,null==l?i.push(c):(Object.prototype.hasOwnProperty.call(s,l)||(s[l]={subRows:[],clientRecord:void 0,originalIndex:void 0},o&&o.add(l)),s[l].subRows.push(c))}if(o?.size){const t=Array.from(o.values()).join(",")
11461
11465
  throw new Error(`The items array contains orphans that point to the following parentIds: [${t}]. These parentIds do not exist in the items array.`)}if(zF(i)<Object.keys(s).length)throw new Error("The items array contains nodes with a circular parent/child relationship.")
11462
- return i}function zF(t){return t.reduce(((t,e)=>t+1+(e.subRows&&zF(e.subRows))),0)}class VF{constructor(t,e,n){if(this.isDataFlat=!1,"string"==typeof e&&"string"==typeof n)try{this._hierarchicalData=PF(t,{id:e,parentId:n}),this.isDataFlat=!1,this._parentIdConfigurationValid=!0}catch{this.isDataFlat=!0,this._hierarchicalData=t.map(((t,e)=>({clientRecord:{...t},originalIndex:e}))),this._parentIdConfigurationValid=!1}else this.isDataFlat=!0,this._hierarchicalData=t.map(((t,e)=>({clientRecord:{...t},originalIndex:e}))),this._parentIdConfigurationValid=!0}get hierarchicalData(){return this._hierarchicalData}get parentIdConfigurationValid(){return this._parentIdConfigurationValid}getAllRecords(t=!1){const e=[]
11466
+ return i}function zF(t){return t.reduce(((t,e)=>t+1+(e.subRows&&zF(e.subRows))),0)}class VF{constructor(t,e,n){if(this.isDataFlat=!1,"string"==typeof e&&"string"==typeof n)try{this._hierarchicalData=PF(t,{id:e,parentId:n}),this.isDataFlat=!1,this._parentIdConfigurationValid=!0}catch{this.isDataFlat=!0,this._hierarchicalData=t.map(((t,e)=>({clientRecord:t,originalIndex:e}))),this._parentIdConfigurationValid=!1}else this.isDataFlat=!0,this._hierarchicalData=t.map(((t,e)=>({clientRecord:t,originalIndex:e}))),this._parentIdConfigurationValid=!0}get hierarchicalData(){return this._hierarchicalData}get parentIdConfigurationValid(){return this._parentIdConfigurationValid}getAllRecords(t=!1){const e=[]
11463
11467
  return this.getAllNodes(this._hierarchicalData,e),this.isDataFlat||!t?e.map((t=>t.clientRecord)):e.sort(((t,e)=>t.originalIndex-e.originalIndex)).map((t=>t.clientRecord))}getAllNodes(t,e){for(const n of t)e.push(n),n.subRows&&this.getAllNodes(n.subRows,e)}}class HF{constructor(t){this.tanStackTable=t,this.explicitExpansionStates=new Map,this.hierarchyOptions=new Map,this.isHierarchyEnabled=!1,this.parentRowsWithChildren=new Set}isRowExpanded(t){if(!this.isRowExpandable(t))return!1
11464
11468
  return this.explicitExpansionStates.get(t.id)??this.getDefaultExpansionState(t)}toggleRowExpansion(t){if(!this.isRowExpandable(t))return
11465
11469
  const e=this.isRowExpanded(t)
@@ -11632,8 +11636,8 @@ s.push(t),null!=(e=t.subRows)&&e.length&&(t.subRows=a(t.subRows))})),e}
11632
11636
  return{rows:a(n.rows),flatRows:s,rowsById:n.rowsById}}),vO(t.options,"debugTable",0,(()=>t._autoResetPageIndex()))),getGroupedRowModel:hR(),getExpandedRowModel:t=>gO((()=>[t.getState().expanded,t.getPreExpandedRowModel(),t.options.paginateExpandedRows]),((t,e,n)=>!e.rows.length||!0!==t&&!Object.keys(null!=t?t:{}).length?e:n?function(t){const e=[],n=t=>{var i
11633
11637
  e.push(t),null!=(i=t.subRows)&&i.length&&t.getIsExpanded()&&t.subRows.forEach(n)}
11634
11638
  return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}(e):e),vO(t.options,"debugTable")),getRowCanExpand:this.getRowCanExpand,getIsRowExpanded:this.getIsRowExpanded,getSubRows:t=>t.subRows,columns:[],state:{rowSelection:{},grouping:[],expanded:!0},enableRowSelection:t=>!t.getIsGrouped(),enableMultiRowSelection:!1,enableSubRowSelection:!1,enableSorting:!0,enableGrouping:!0,renderFallbackValue:null,autoResetAll:!1},this.table=dR(this.options),this.virtualizer=new IF(this,this.table),this.keyboardNavigationManager=new jF(this,this.virtualizer),this.layoutManager=new DF(this),this.layoutManagerNotifier=x.getNotifier(this.layoutManager),this.layoutManagerNotifier.subscribe(this,"isColumnBeingSized"),this.selectionManager=new BF(this.table,this.selectionMode),this.expansionManager=new HF(this.table)}async setData(t){await this.processPendingUpdates()
11635
- const e=this.calculateTanStackData(t)
11636
- this.updateTableOptions(e)}async getSelectedRecordIds(){return await this.processPendingUpdates(),this.selectionManager.getCurrentSelectedRecordIds()}async setSelectedRecordIds(t){await this.processPendingUpdates(),this.selectionMode!==gR.none&&this.updateTableOptions({state:{rowSelection:this.calculateTanStackSelectionState(t)}})}async setRecordHierarchyOptions(t){await this.processPendingUpdates()
11639
+ const e=t.map((t=>({...t}))),n=this.calculateTanStackData(e)
11640
+ this.updateTableOptions(n)}async getSelectedRecordIds(){return await this.processPendingUpdates(),this.selectionManager.getCurrentSelectedRecordIds()}async setSelectedRecordIds(t){await this.processPendingUpdates(),this.selectionMode!==gR.none&&this.updateTableOptions({state:{rowSelection:this.calculateTanStackSelectionState(t)}})}async setRecordHierarchyOptions(t){await this.processPendingUpdates()
11637
11641
  const e=structuredClone(t),n=this.tableValidator.getOptionsWithPresentIds(e)
11638
11642
  this.expansionManager.setHierarchyOptions(n),this.refreshRows()}connectedCallback(){super.connectedCallback(),this.initialize(),this.virtualizer.connect(),this.viewport.addEventListener("scroll",this.onViewPortScroll,{passive:!0}),this.keyboardNavigationManager.connect(),window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp),window.addEventListener("blur",this.onBlur)}disconnectedCallback(){super.disconnectedCallback(),this.virtualizer.disconnect(),this.keyboardNavigationManager.disconnect(),this.viewport.removeEventListener("scroll",this.onViewPortScroll),window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp),window.removeEventListener("blur",this.onBlur)}checkValidity(){return this.tableValidator.isValid()}handleChange(t,e){(t instanceof HR||t instanceof zR)&&"string"==typeof e?this.tableUpdateTracker.trackColumnPropertyChanged(e):t instanceof qF&&"isColumnValid"===e?this.tableValidator.validateColumnConfigurations(this.columns):t instanceof DF&&"isColumnBeingSized"===e&&!this.layoutManager.isColumnBeingSized&&this.emitColumnConfigurationChangeEvent()}onRowSelectionToggle(t,e){e.stopImmediatePropagation()
11639
11643
  this.selectionManager.handleRowSelectionToggle(this.tableData[t],e.detail.newState,this.windowShiftKeyDown)&&this.emitSelectionChangeEvent()}onRowClick(t,e){return this.selectionManager.handleRowClick(this.tableData[t],e.shiftKey,e.ctrlKey||e.metaKey)&&this.emitSelectionChangeEvent(),!0}onRowFocusIn(t){this.keyboardNavigationManager.onRowFocusIn(t)}onRowBlur(t){this.keyboardNavigationManager.onRowBlur(t)}onAllRowsSelectionChange(t){t.stopPropagation(),this.ignoreSelectionChangeEvents||(this.table.toggleAllRowsSelected(this.selectionCheckbox.checked),this.emitSelectionChangeEvent())}onRowActionMenuBeforeToggle(t,e){e.stopImmediatePropagation(),this.handleActionMenuBeforeToggleEvent(t,e)}onRowActionMenuToggle(t){t.stopImmediatePropagation(),this.handleRowActionMenuToggleEvent(t)}onRowSlotsRequest(t){t.stopImmediatePropagation()
@@ -12040,7 +12044,6 @@ const sL=Q`
12040
12044
  }
12041
12045
 
12042
12046
  nimble-menu-button {
12043
- height: ${Cl};
12044
12047
  width: 100%;
12045
12048
  }
12046
12049