@ni/nimble-components 30.0.3 → 30.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.
- package/dist/all-components-bundle.js +21 -13
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +7 -5
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/table/models/selection-managers/multi-selection-manager.js +20 -12
- package/dist/esm/table/models/selection-managers/multi-selection-manager.js.map +1 -1
- package/package.json +1 -1
|
@@ -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 SF extends kF{handleRowSelectionToggle(t,e,n){return!1}handleRowClick(t,e,n){return!1}handleActionMenuOpening(t){return!1}}class _F extends kF{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){
|
|
11390
|
-
|
|
11391
|
-
if(
|
|
11392
|
-
const i=this.
|
|
11393
|
-
|
|
11389
|
+
return e}}class SF extends kF{handleRowSelectionToggle(t,e,n){return!1}handleRowClick(t,e,n){return!1}handleActionMenuOpening(t){return!1}}class _F extends kF{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!==lR
|
|
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!==lR&&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)
|