@ni/spright-components 2.0.3 → 2.0.4

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.
@@ -11386,11 +11386,13 @@ this.tanStackTable.setRowSelection(i)}getAllLeafRowIds(t){const e=this.tanStackT
11386
11386
  return e?.getIsGrouped()?e.getLeafRows().filter((t=>!t.getIsGrouped())).map((t=>t.id)):[]}getAllOrderedRows(){const t=this.tanStackTable.getPreExpandedRowModel().rows
11387
11387
  return this.getOrderedRows(t)}getOrderedRows(t){const e=[]
11388
11388
  for(const n of t)e.push(n),n.subRows?.length&&e.push(...this.getOrderedRows(n.subRows))
11389
- return e}}class _F extends SF{handleRowSelectionToggle(t,e,n){return!1}handleRowClick(t,e,n){return!1}handleActionMenuOpening(t){return!1}}class IF extends SF{handleRowSelectionToggle(t,e,n){return n&&this.tryUpdateRangeSelection(t.id)||(this.shiftSelectStartRowId=t.id,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(t,e)),!0}handleRowClick(t,e,n){return n?(this.shiftSelectStartRowId=t.id,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(t),!0):!(!e||!this.tryUpdateRangeSelection(t.id))||(this.shiftSelectStartRowId=t.id,this.previousShiftSelectRowEndId=void 0,this.selectSingleRow(t))}handleActionMenuOpening(t){return t.selectionState!==cR&&this.selectSingleRow(t)}reset(){this.shiftSelectStartRowId=void 0,this.previousShiftSelectRowEndId=void 0}tryUpdateRangeSelection(t){if(void 0===this.shiftSelectStartRowId)return!1
11390
- const e=this.getAllOrderedRows(),n=this.getRowIndexForId(this.shiftSelectStartRowId,e)
11391
- if(-1===n)return!1
11392
- const i=this.tanStackTable.getState().rowSelection
11393
- return this.removePreviousRangeSelection(i,n,e),this.addNewRangeSelection(i,t,n,e),this.previousShiftSelectRowEndId=t,this.tanStackTable.setRowSelection(i),!0}removePreviousRangeSelection(t,e,n){const i=this.getRowIndexForId(this.previousShiftSelectRowEndId,n)
11389
+ return e}}class _F extends SF{handleRowSelectionToggle(t,e,n){return!1}handleRowClick(t,e,n){return!1}handleActionMenuOpening(t){return!1}}class IF extends SF{handleRowSelectionToggle(t,e,n){return n&&this.tryUpdateRangeSelection(t.id,!0)||(this.shiftSelectStartRowId=e?t.id:void 0,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(t,e)),!0}handleRowClick(t,e,n){if(e){const e=n
11390
+ if(this.tryUpdateRangeSelection(t.id,e))return!0}if(n){const e=t.selectionState!==cR
11391
+ return this.shiftSelectStartRowId=e?t.id:void 0,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(t),!0}return this.shiftSelectStartRowId=t.id,this.previousShiftSelectRowEndId=void 0,this.selectSingleRow(t)}handleActionMenuOpening(t){return t.selectionState!==cR&&this.selectSingleRow(t)}reset(){this.shiftSelectStartRowId=void 0,this.previousShiftSelectRowEndId=void 0}tryUpdateRangeSelection(t,e){if(void 0===this.shiftSelectStartRowId)return!1
11392
+ const n=this.getAllOrderedRows(),i=this.getRowIndexForId(this.shiftSelectStartRowId,n)
11393
+ if(-1===i)return!1
11394
+ let s={}
11395
+ return e&&(s=this.tanStackTable.getState().rowSelection,this.removePreviousRangeSelection(s,i,n)),this.addNewRangeSelection(s,t,i,n),this.previousShiftSelectRowEndId=t,this.tanStackTable.setRowSelection(s),!0}removePreviousRangeSelection(t,e,n){const i=this.getRowIndexForId(this.previousShiftSelectRowEndId,n)
11394
11396
  this.updateSelectionStateForRange(t,e,i,n,!1)}addNewRangeSelection(t,e,n,i){const s=this.getRowIndexForId(e,i)
11395
11397
  this.updateSelectionStateForRange(t,n,s,i,!0)}updateSelectionStateForRange(t,e,n,i,s){if(-1===e||-1===n)return
11396
11398
  const o=Math.min(e,n),r=Math.max(e,n)