@infinite-table/infinite-react 6.0.6 → 6.0.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.
package/index.dev.js CHANGED
@@ -12099,9 +12099,9 @@ function getRowInfoArray(getState) {
12099
12099
  }
12100
12100
 
12101
12101
  // src/components/DataSource/TreeApi.ts
12102
- function cloneTreeSelection(treeSelection, stateOrGetState) {
12102
+ function cloneTreeSelection(treeSelection2, stateOrGetState) {
12103
12103
  return new TreeSelectionState(
12104
- treeSelection,
12104
+ treeSelection2,
12105
12105
  treeSelectionStateConfigGetter(stateOrGetState)
12106
12106
  );
12107
12107
  }
@@ -12116,7 +12116,7 @@ function treeSelectionStateConfigGetter(stateOrStateGetter) {
12116
12116
  var TreeApiImpl = class {
12117
12117
  constructor(param) {
12118
12118
  this.setNodeSelection = (nodePath, selected) => {
12119
- const { treeSelectionState: treeSelection, selectionMode } = this.getState();
12119
+ const { treeSelectionState: treeSelection2, selectionMode } = this.getState();
12120
12120
  if (selectionMode === "single-row") {
12121
12121
  this.actions.treeSelection = selected ? nodePath[nodePath.length - 1] : null;
12122
12122
  return;
@@ -12124,11 +12124,11 @@ var TreeApiImpl = class {
12124
12124
  if (selectionMode !== "multi-row") {
12125
12125
  throw "Selection mode is not multi-row or single-row";
12126
12126
  }
12127
- if (!(treeSelection instanceof TreeSelectionState)) {
12127
+ if (!(treeSelection2 instanceof TreeSelectionState)) {
12128
12128
  throw "Invalid tree selection";
12129
12129
  }
12130
12130
  const treeSelectionState = new TreeSelectionState(
12131
- treeSelection,
12131
+ treeSelection2,
12132
12132
  treeSelectionStateConfigGetter(this.getState)
12133
12133
  );
12134
12134
  treeSelectionState.setNodeSelection(nodePath, selected);
@@ -12251,15 +12251,15 @@ var TreeApiImpl = class {
12251
12251
  return null;
12252
12252
  }
12253
12253
  selectAll() {
12254
- const { treeSelectionState: treeSelection, selectionMode } = this.getState();
12254
+ const { treeSelectionState: treeSelection2, selectionMode } = this.getState();
12255
12255
  if (selectionMode !== "multi-row") {
12256
12256
  throw "Selection mode is not multi-row";
12257
12257
  }
12258
- if (!(treeSelection instanceof TreeSelectionState)) {
12258
+ if (!(treeSelection2 instanceof TreeSelectionState)) {
12259
12259
  throw "Invalid node selection";
12260
12260
  }
12261
12261
  const treeSelectionState = new TreeSelectionState(
12262
- treeSelection,
12262
+ treeSelection2,
12263
12263
  treeSelectionStateConfigGetter(this.getState)
12264
12264
  );
12265
12265
  treeSelectionState.selectAll();
@@ -12267,15 +12267,15 @@ var TreeApiImpl = class {
12267
12267
  this.actions.treeSelection = treeSelectionState;
12268
12268
  }
12269
12269
  deselectAll() {
12270
- const { treeSelectionState: treeSelection, selectionMode } = this.getState();
12270
+ const { treeSelectionState: treeSelection2, selectionMode } = this.getState();
12271
12271
  if (selectionMode !== "multi-row") {
12272
12272
  throw "Selection mode is not multi-row";
12273
12273
  }
12274
- if (!(treeSelection instanceof TreeSelectionState)) {
12274
+ if (!(treeSelection2 instanceof TreeSelectionState)) {
12275
12275
  throw "Invalid node selection";
12276
12276
  }
12277
12277
  const treeSelectionState = new TreeSelectionState(
12278
- treeSelection,
12278
+ treeSelection2,
12279
12279
  treeSelectionStateConfigGetter(this.getState)
12280
12280
  );
12281
12281
  treeSelectionState.deselectAll();
@@ -12283,21 +12283,25 @@ var TreeApiImpl = class {
12283
12283
  this.actions.treeSelection = treeSelectionState;
12284
12284
  }
12285
12285
  isNodeSelected(nodePath) {
12286
- const { treeSelection, selectionMode } = this.getState();
12286
+ const {
12287
+ treeSelectionState,
12288
+ treeSelection: singleTreeSelection,
12289
+ selectionMode
12290
+ } = this.getState();
12287
12291
  if (selectionMode === "single-row") {
12288
12292
  const pk = nodePath[nodePath.length - 1];
12289
- if (Array.isArray(treeSelection)) {
12293
+ if (Array.isArray(singleTreeSelection)) {
12290
12294
  return treeSelection.join(",") === nodePath.join(",");
12291
12295
  }
12292
- return treeSelection === pk;
12296
+ return singleTreeSelection === pk;
12293
12297
  }
12294
12298
  if (selectionMode !== "multi-row") {
12295
12299
  throw "Selection mode is not multi-row or single-row";
12296
12300
  }
12297
- if (!(treeSelection instanceof TreeSelectionState)) {
12301
+ if (!(treeSelectionState instanceof TreeSelectionState)) {
12298
12302
  throw "Invalid tree selection";
12299
12303
  }
12300
- return treeSelection.isNodeSelected(nodePath);
12304
+ return treeSelectionState.isNodeSelected(nodePath);
12301
12305
  }
12302
12306
  selectNode(nodePath) {
12303
12307
  this.setNodeSelection(nodePath, true);
@@ -12817,10 +12821,10 @@ function getMappedCallbacks() {
12817
12821
  ]
12818
12822
  };
12819
12823
  },
12820
- treeSelection: (treeSelection, state) => {
12824
+ treeSelection: (treeSelection2, state) => {
12821
12825
  if (state.selectionMode === "single-row") {
12822
12826
  const callbackParams2 = [
12823
- treeSelection,
12827
+ treeSelection2,
12824
12828
  { selectionMode: "single-row" }
12825
12829
  ];
12826
12830
  return {
@@ -12828,7 +12832,7 @@ function getMappedCallbacks() {
12828
12832
  };
12829
12833
  }
12830
12834
  const callbackParams = [
12831
- treeSelection.getState(),
12835
+ treeSelection2.getState(),
12832
12836
  {
12833
12837
  selectionMode: "multi-row",
12834
12838
  lastUpdatedNodePath: state.lastSelectionUpdatedNodePathRef.current,
@@ -22141,7 +22145,7 @@ var useLicense = (licenseKey = "") => {
22141
22145
  }
22142
22146
  let valid2 = isValidLicense(licenseKey, {
22143
22147
  publishedAt: 1624970570587,
22144
- version: "6.0.6"
22148
+ version: "6.0.7"
22145
22149
  });
22146
22150
  if (!licenseKey && !valid2 && isInsidePlayground) {
22147
22151
  return true;
@@ -22693,7 +22697,7 @@ function handleKeyboardSelection(context, keyboardEvent) {
22693
22697
  selectionMode,
22694
22698
  groupBy,
22695
22699
  rowSelection,
22696
- treeSelectionState: treeSelection,
22700
+ treeSelectionState: treeSelection2,
22697
22701
  isTree
22698
22702
  } = dataSourceState;
22699
22703
  if (keyboardSelection === false) {
@@ -22712,9 +22716,9 @@ function handleKeyboardSelection(context, keyboardEvent) {
22712
22716
  return false;
22713
22717
  }
22714
22718
  if (key === "a" && (ctrlKey || metaKey)) {
22715
- if (isTree && treeSelection) {
22719
+ if (isTree && treeSelection2) {
22716
22720
  const treeSelectionState = cloneTreeSelection2(
22717
- treeSelection
22721
+ treeSelection2
22718
22722
  );
22719
22723
  treeSelectionState.selectAll();
22720
22724
  dataSourceActions.treeSelection = treeSelectionState;
@@ -23116,8 +23120,8 @@ async function onKeyDown(context, event) {
23116
23120
  cloneRowSelection: (rowSelection) => {
23117
23121
  return cloneRowSelection(rowSelection, context.getDataSourceState);
23118
23122
  },
23119
- cloneTreeSelection: (treeSelection) => {
23120
- return cloneTreeSelection(treeSelection, context.getDataSourceState);
23123
+ cloneTreeSelection: (treeSelection2) => {
23124
+ return cloneTreeSelection(treeSelection2, context.getDataSourceState);
23121
23125
  }
23122
23126
  };
23123
23127
  if (handleKeyboardSelection(keyboardHandlerContext, event)) {
@@ -23196,8 +23200,8 @@ function useEventHandlersContext() {
23196
23200
  actions,
23197
23201
  getDataSourceState,
23198
23202
  dataSourceActions,
23199
- cloneTreeSelection: (treeSelection) => {
23200
- return cloneTreeSelection(treeSelection, getDataSourceState);
23203
+ cloneTreeSelection: (treeSelection2) => {
23204
+ return cloneTreeSelection(treeSelection2, getDataSourceState);
23201
23205
  },
23202
23206
  cloneRowSelection: (rowSelection) => {
23203
23207
  return cloneRowSelection(rowSelection, getDataSourceState);
package/index.dev.mjs CHANGED
@@ -12048,9 +12048,9 @@ function getRowInfoArray(getState) {
12048
12048
  }
12049
12049
 
12050
12050
  // src/components/DataSource/TreeApi.ts
12051
- function cloneTreeSelection(treeSelection, stateOrGetState) {
12051
+ function cloneTreeSelection(treeSelection2, stateOrGetState) {
12052
12052
  return new TreeSelectionState(
12053
- treeSelection,
12053
+ treeSelection2,
12054
12054
  treeSelectionStateConfigGetter(stateOrGetState)
12055
12055
  );
12056
12056
  }
@@ -12065,7 +12065,7 @@ function treeSelectionStateConfigGetter(stateOrStateGetter) {
12065
12065
  var TreeApiImpl = class {
12066
12066
  constructor(param) {
12067
12067
  this.setNodeSelection = (nodePath, selected) => {
12068
- const { treeSelectionState: treeSelection, selectionMode } = this.getState();
12068
+ const { treeSelectionState: treeSelection2, selectionMode } = this.getState();
12069
12069
  if (selectionMode === "single-row") {
12070
12070
  this.actions.treeSelection = selected ? nodePath[nodePath.length - 1] : null;
12071
12071
  return;
@@ -12073,11 +12073,11 @@ var TreeApiImpl = class {
12073
12073
  if (selectionMode !== "multi-row") {
12074
12074
  throw "Selection mode is not multi-row or single-row";
12075
12075
  }
12076
- if (!(treeSelection instanceof TreeSelectionState)) {
12076
+ if (!(treeSelection2 instanceof TreeSelectionState)) {
12077
12077
  throw "Invalid tree selection";
12078
12078
  }
12079
12079
  const treeSelectionState = new TreeSelectionState(
12080
- treeSelection,
12080
+ treeSelection2,
12081
12081
  treeSelectionStateConfigGetter(this.getState)
12082
12082
  );
12083
12083
  treeSelectionState.setNodeSelection(nodePath, selected);
@@ -12200,15 +12200,15 @@ var TreeApiImpl = class {
12200
12200
  return null;
12201
12201
  }
12202
12202
  selectAll() {
12203
- const { treeSelectionState: treeSelection, selectionMode } = this.getState();
12203
+ const { treeSelectionState: treeSelection2, selectionMode } = this.getState();
12204
12204
  if (selectionMode !== "multi-row") {
12205
12205
  throw "Selection mode is not multi-row";
12206
12206
  }
12207
- if (!(treeSelection instanceof TreeSelectionState)) {
12207
+ if (!(treeSelection2 instanceof TreeSelectionState)) {
12208
12208
  throw "Invalid node selection";
12209
12209
  }
12210
12210
  const treeSelectionState = new TreeSelectionState(
12211
- treeSelection,
12211
+ treeSelection2,
12212
12212
  treeSelectionStateConfigGetter(this.getState)
12213
12213
  );
12214
12214
  treeSelectionState.selectAll();
@@ -12216,15 +12216,15 @@ var TreeApiImpl = class {
12216
12216
  this.actions.treeSelection = treeSelectionState;
12217
12217
  }
12218
12218
  deselectAll() {
12219
- const { treeSelectionState: treeSelection, selectionMode } = this.getState();
12219
+ const { treeSelectionState: treeSelection2, selectionMode } = this.getState();
12220
12220
  if (selectionMode !== "multi-row") {
12221
12221
  throw "Selection mode is not multi-row";
12222
12222
  }
12223
- if (!(treeSelection instanceof TreeSelectionState)) {
12223
+ if (!(treeSelection2 instanceof TreeSelectionState)) {
12224
12224
  throw "Invalid node selection";
12225
12225
  }
12226
12226
  const treeSelectionState = new TreeSelectionState(
12227
- treeSelection,
12227
+ treeSelection2,
12228
12228
  treeSelectionStateConfigGetter(this.getState)
12229
12229
  );
12230
12230
  treeSelectionState.deselectAll();
@@ -12232,21 +12232,25 @@ var TreeApiImpl = class {
12232
12232
  this.actions.treeSelection = treeSelectionState;
12233
12233
  }
12234
12234
  isNodeSelected(nodePath) {
12235
- const { treeSelection, selectionMode } = this.getState();
12235
+ const {
12236
+ treeSelectionState,
12237
+ treeSelection: singleTreeSelection,
12238
+ selectionMode
12239
+ } = this.getState();
12236
12240
  if (selectionMode === "single-row") {
12237
12241
  const pk = nodePath[nodePath.length - 1];
12238
- if (Array.isArray(treeSelection)) {
12242
+ if (Array.isArray(singleTreeSelection)) {
12239
12243
  return treeSelection.join(",") === nodePath.join(",");
12240
12244
  }
12241
- return treeSelection === pk;
12245
+ return singleTreeSelection === pk;
12242
12246
  }
12243
12247
  if (selectionMode !== "multi-row") {
12244
12248
  throw "Selection mode is not multi-row or single-row";
12245
12249
  }
12246
- if (!(treeSelection instanceof TreeSelectionState)) {
12250
+ if (!(treeSelectionState instanceof TreeSelectionState)) {
12247
12251
  throw "Invalid tree selection";
12248
12252
  }
12249
- return treeSelection.isNodeSelected(nodePath);
12253
+ return treeSelectionState.isNodeSelected(nodePath);
12250
12254
  }
12251
12255
  selectNode(nodePath) {
12252
12256
  this.setNodeSelection(nodePath, true);
@@ -12766,10 +12770,10 @@ function getMappedCallbacks() {
12766
12770
  ]
12767
12771
  };
12768
12772
  },
12769
- treeSelection: (treeSelection, state) => {
12773
+ treeSelection: (treeSelection2, state) => {
12770
12774
  if (state.selectionMode === "single-row") {
12771
12775
  const callbackParams2 = [
12772
- treeSelection,
12776
+ treeSelection2,
12773
12777
  { selectionMode: "single-row" }
12774
12778
  ];
12775
12779
  return {
@@ -12777,7 +12781,7 @@ function getMappedCallbacks() {
12777
12781
  };
12778
12782
  }
12779
12783
  const callbackParams = [
12780
- treeSelection.getState(),
12784
+ treeSelection2.getState(),
12781
12785
  {
12782
12786
  selectionMode: "multi-row",
12783
12787
  lastUpdatedNodePath: state.lastSelectionUpdatedNodePathRef.current,
@@ -22099,7 +22103,7 @@ var useLicense = (licenseKey = "") => {
22099
22103
  }
22100
22104
  let valid2 = isValidLicense(licenseKey, {
22101
22105
  publishedAt: 1624970570587,
22102
- version: "6.0.6"
22106
+ version: "6.0.7"
22103
22107
  });
22104
22108
  if (!licenseKey && !valid2 && isInsidePlayground) {
22105
22109
  return true;
@@ -22651,7 +22655,7 @@ function handleKeyboardSelection(context, keyboardEvent) {
22651
22655
  selectionMode,
22652
22656
  groupBy,
22653
22657
  rowSelection,
22654
- treeSelectionState: treeSelection,
22658
+ treeSelectionState: treeSelection2,
22655
22659
  isTree
22656
22660
  } = dataSourceState;
22657
22661
  if (keyboardSelection === false) {
@@ -22670,9 +22674,9 @@ function handleKeyboardSelection(context, keyboardEvent) {
22670
22674
  return false;
22671
22675
  }
22672
22676
  if (key === "a" && (ctrlKey || metaKey)) {
22673
- if (isTree && treeSelection) {
22677
+ if (isTree && treeSelection2) {
22674
22678
  const treeSelectionState = cloneTreeSelection2(
22675
- treeSelection
22679
+ treeSelection2
22676
22680
  );
22677
22681
  treeSelectionState.selectAll();
22678
22682
  dataSourceActions.treeSelection = treeSelectionState;
@@ -23074,8 +23078,8 @@ async function onKeyDown(context, event) {
23074
23078
  cloneRowSelection: (rowSelection) => {
23075
23079
  return cloneRowSelection(rowSelection, context.getDataSourceState);
23076
23080
  },
23077
- cloneTreeSelection: (treeSelection) => {
23078
- return cloneTreeSelection(treeSelection, context.getDataSourceState);
23081
+ cloneTreeSelection: (treeSelection2) => {
23082
+ return cloneTreeSelection(treeSelection2, context.getDataSourceState);
23079
23083
  }
23080
23084
  };
23081
23085
  if (handleKeyboardSelection(keyboardHandlerContext, event)) {
@@ -23154,8 +23158,8 @@ function useEventHandlersContext() {
23154
23158
  actions,
23155
23159
  getDataSourceState,
23156
23160
  dataSourceActions,
23157
- cloneTreeSelection: (treeSelection) => {
23158
- return cloneTreeSelection(treeSelection, getDataSourceState);
23161
+ cloneTreeSelection: (treeSelection2) => {
23162
+ return cloneTreeSelection(treeSelection2, getDataSourceState);
23159
23163
  },
23160
23164
  cloneRowSelection: (rowSelection) => {
23161
23165
  return cloneRowSelection(rowSelection, getDataSourceState);
package/index.js CHANGED
@@ -12099,9 +12099,9 @@ function getRowInfoArray(getState) {
12099
12099
  }
12100
12100
 
12101
12101
  // src/components/DataSource/TreeApi.ts
12102
- function cloneTreeSelection(treeSelection, stateOrGetState) {
12102
+ function cloneTreeSelection(treeSelection2, stateOrGetState) {
12103
12103
  return new TreeSelectionState(
12104
- treeSelection,
12104
+ treeSelection2,
12105
12105
  treeSelectionStateConfigGetter(stateOrGetState)
12106
12106
  );
12107
12107
  }
@@ -12116,7 +12116,7 @@ function treeSelectionStateConfigGetter(stateOrStateGetter) {
12116
12116
  var TreeApiImpl = class {
12117
12117
  constructor(param) {
12118
12118
  this.setNodeSelection = (nodePath, selected) => {
12119
- const { treeSelectionState: treeSelection, selectionMode } = this.getState();
12119
+ const { treeSelectionState: treeSelection2, selectionMode } = this.getState();
12120
12120
  if (selectionMode === "single-row") {
12121
12121
  this.actions.treeSelection = selected ? nodePath[nodePath.length - 1] : null;
12122
12122
  return;
@@ -12124,11 +12124,11 @@ var TreeApiImpl = class {
12124
12124
  if (selectionMode !== "multi-row") {
12125
12125
  throw "Selection mode is not multi-row or single-row";
12126
12126
  }
12127
- if (!(treeSelection instanceof TreeSelectionState)) {
12127
+ if (!(treeSelection2 instanceof TreeSelectionState)) {
12128
12128
  throw "Invalid tree selection";
12129
12129
  }
12130
12130
  const treeSelectionState = new TreeSelectionState(
12131
- treeSelection,
12131
+ treeSelection2,
12132
12132
  treeSelectionStateConfigGetter(this.getState)
12133
12133
  );
12134
12134
  treeSelectionState.setNodeSelection(nodePath, selected);
@@ -12251,15 +12251,15 @@ var TreeApiImpl = class {
12251
12251
  return null;
12252
12252
  }
12253
12253
  selectAll() {
12254
- const { treeSelectionState: treeSelection, selectionMode } = this.getState();
12254
+ const { treeSelectionState: treeSelection2, selectionMode } = this.getState();
12255
12255
  if (selectionMode !== "multi-row") {
12256
12256
  throw "Selection mode is not multi-row";
12257
12257
  }
12258
- if (!(treeSelection instanceof TreeSelectionState)) {
12258
+ if (!(treeSelection2 instanceof TreeSelectionState)) {
12259
12259
  throw "Invalid node selection";
12260
12260
  }
12261
12261
  const treeSelectionState = new TreeSelectionState(
12262
- treeSelection,
12262
+ treeSelection2,
12263
12263
  treeSelectionStateConfigGetter(this.getState)
12264
12264
  );
12265
12265
  treeSelectionState.selectAll();
@@ -12267,15 +12267,15 @@ var TreeApiImpl = class {
12267
12267
  this.actions.treeSelection = treeSelectionState;
12268
12268
  }
12269
12269
  deselectAll() {
12270
- const { treeSelectionState: treeSelection, selectionMode } = this.getState();
12270
+ const { treeSelectionState: treeSelection2, selectionMode } = this.getState();
12271
12271
  if (selectionMode !== "multi-row") {
12272
12272
  throw "Selection mode is not multi-row";
12273
12273
  }
12274
- if (!(treeSelection instanceof TreeSelectionState)) {
12274
+ if (!(treeSelection2 instanceof TreeSelectionState)) {
12275
12275
  throw "Invalid node selection";
12276
12276
  }
12277
12277
  const treeSelectionState = new TreeSelectionState(
12278
- treeSelection,
12278
+ treeSelection2,
12279
12279
  treeSelectionStateConfigGetter(this.getState)
12280
12280
  );
12281
12281
  treeSelectionState.deselectAll();
@@ -12283,21 +12283,25 @@ var TreeApiImpl = class {
12283
12283
  this.actions.treeSelection = treeSelectionState;
12284
12284
  }
12285
12285
  isNodeSelected(nodePath) {
12286
- const { treeSelection, selectionMode } = this.getState();
12286
+ const {
12287
+ treeSelectionState,
12288
+ treeSelection: singleTreeSelection,
12289
+ selectionMode
12290
+ } = this.getState();
12287
12291
  if (selectionMode === "single-row") {
12288
12292
  const pk = nodePath[nodePath.length - 1];
12289
- if (Array.isArray(treeSelection)) {
12293
+ if (Array.isArray(singleTreeSelection)) {
12290
12294
  return treeSelection.join(",") === nodePath.join(",");
12291
12295
  }
12292
- return treeSelection === pk;
12296
+ return singleTreeSelection === pk;
12293
12297
  }
12294
12298
  if (selectionMode !== "multi-row") {
12295
12299
  throw "Selection mode is not multi-row or single-row";
12296
12300
  }
12297
- if (!(treeSelection instanceof TreeSelectionState)) {
12301
+ if (!(treeSelectionState instanceof TreeSelectionState)) {
12298
12302
  throw "Invalid tree selection";
12299
12303
  }
12300
- return treeSelection.isNodeSelected(nodePath);
12304
+ return treeSelectionState.isNodeSelected(nodePath);
12301
12305
  }
12302
12306
  selectNode(nodePath) {
12303
12307
  this.setNodeSelection(nodePath, true);
@@ -12817,10 +12821,10 @@ function getMappedCallbacks() {
12817
12821
  ]
12818
12822
  };
12819
12823
  },
12820
- treeSelection: (treeSelection, state) => {
12824
+ treeSelection: (treeSelection2, state) => {
12821
12825
  if (state.selectionMode === "single-row") {
12822
12826
  const callbackParams2 = [
12823
- treeSelection,
12827
+ treeSelection2,
12824
12828
  { selectionMode: "single-row" }
12825
12829
  ];
12826
12830
  return {
@@ -12828,7 +12832,7 @@ function getMappedCallbacks() {
12828
12832
  };
12829
12833
  }
12830
12834
  const callbackParams = [
12831
- treeSelection.getState(),
12835
+ treeSelection2.getState(),
12832
12836
  {
12833
12837
  selectionMode: "multi-row",
12834
12838
  lastUpdatedNodePath: state.lastSelectionUpdatedNodePathRef.current,
@@ -22141,7 +22145,7 @@ var useLicense = (licenseKey = "") => {
22141
22145
  }
22142
22146
  let valid2 = isValidLicense(licenseKey, {
22143
22147
  publishedAt: 1624970570587,
22144
- version: "6.0.6"
22148
+ version: "6.0.7"
22145
22149
  });
22146
22150
  if (!licenseKey && !valid2 && isInsidePlayground) {
22147
22151
  return true;
@@ -22693,7 +22697,7 @@ function handleKeyboardSelection(context, keyboardEvent) {
22693
22697
  selectionMode,
22694
22698
  groupBy,
22695
22699
  rowSelection,
22696
- treeSelectionState: treeSelection,
22700
+ treeSelectionState: treeSelection2,
22697
22701
  isTree
22698
22702
  } = dataSourceState;
22699
22703
  if (keyboardSelection === false) {
@@ -22712,9 +22716,9 @@ function handleKeyboardSelection(context, keyboardEvent) {
22712
22716
  return false;
22713
22717
  }
22714
22718
  if (key === "a" && (ctrlKey || metaKey)) {
22715
- if (isTree && treeSelection) {
22719
+ if (isTree && treeSelection2) {
22716
22720
  const treeSelectionState = cloneTreeSelection2(
22717
- treeSelection
22721
+ treeSelection2
22718
22722
  );
22719
22723
  treeSelectionState.selectAll();
22720
22724
  dataSourceActions.treeSelection = treeSelectionState;
@@ -23116,8 +23120,8 @@ async function onKeyDown(context, event) {
23116
23120
  cloneRowSelection: (rowSelection) => {
23117
23121
  return cloneRowSelection(rowSelection, context.getDataSourceState);
23118
23122
  },
23119
- cloneTreeSelection: (treeSelection) => {
23120
- return cloneTreeSelection(treeSelection, context.getDataSourceState);
23123
+ cloneTreeSelection: (treeSelection2) => {
23124
+ return cloneTreeSelection(treeSelection2, context.getDataSourceState);
23121
23125
  }
23122
23126
  };
23123
23127
  if (handleKeyboardSelection(keyboardHandlerContext, event)) {
@@ -23196,8 +23200,8 @@ function useEventHandlersContext() {
23196
23200
  actions,
23197
23201
  getDataSourceState,
23198
23202
  dataSourceActions,
23199
- cloneTreeSelection: (treeSelection) => {
23200
- return cloneTreeSelection(treeSelection, getDataSourceState);
23203
+ cloneTreeSelection: (treeSelection2) => {
23204
+ return cloneTreeSelection(treeSelection2, getDataSourceState);
23201
23205
  },
23202
23206
  cloneRowSelection: (rowSelection) => {
23203
23207
  return cloneRowSelection(rowSelection, getDataSourceState);
package/index.mjs CHANGED
@@ -12048,9 +12048,9 @@ function getRowInfoArray(getState) {
12048
12048
  }
12049
12049
 
12050
12050
  // src/components/DataSource/TreeApi.ts
12051
- function cloneTreeSelection(treeSelection, stateOrGetState) {
12051
+ function cloneTreeSelection(treeSelection2, stateOrGetState) {
12052
12052
  return new TreeSelectionState(
12053
- treeSelection,
12053
+ treeSelection2,
12054
12054
  treeSelectionStateConfigGetter(stateOrGetState)
12055
12055
  );
12056
12056
  }
@@ -12065,7 +12065,7 @@ function treeSelectionStateConfigGetter(stateOrStateGetter) {
12065
12065
  var TreeApiImpl = class {
12066
12066
  constructor(param) {
12067
12067
  this.setNodeSelection = (nodePath, selected) => {
12068
- const { treeSelectionState: treeSelection, selectionMode } = this.getState();
12068
+ const { treeSelectionState: treeSelection2, selectionMode } = this.getState();
12069
12069
  if (selectionMode === "single-row") {
12070
12070
  this.actions.treeSelection = selected ? nodePath[nodePath.length - 1] : null;
12071
12071
  return;
@@ -12073,11 +12073,11 @@ var TreeApiImpl = class {
12073
12073
  if (selectionMode !== "multi-row") {
12074
12074
  throw "Selection mode is not multi-row or single-row";
12075
12075
  }
12076
- if (!(treeSelection instanceof TreeSelectionState)) {
12076
+ if (!(treeSelection2 instanceof TreeSelectionState)) {
12077
12077
  throw "Invalid tree selection";
12078
12078
  }
12079
12079
  const treeSelectionState = new TreeSelectionState(
12080
- treeSelection,
12080
+ treeSelection2,
12081
12081
  treeSelectionStateConfigGetter(this.getState)
12082
12082
  );
12083
12083
  treeSelectionState.setNodeSelection(nodePath, selected);
@@ -12200,15 +12200,15 @@ var TreeApiImpl = class {
12200
12200
  return null;
12201
12201
  }
12202
12202
  selectAll() {
12203
- const { treeSelectionState: treeSelection, selectionMode } = this.getState();
12203
+ const { treeSelectionState: treeSelection2, selectionMode } = this.getState();
12204
12204
  if (selectionMode !== "multi-row") {
12205
12205
  throw "Selection mode is not multi-row";
12206
12206
  }
12207
- if (!(treeSelection instanceof TreeSelectionState)) {
12207
+ if (!(treeSelection2 instanceof TreeSelectionState)) {
12208
12208
  throw "Invalid node selection";
12209
12209
  }
12210
12210
  const treeSelectionState = new TreeSelectionState(
12211
- treeSelection,
12211
+ treeSelection2,
12212
12212
  treeSelectionStateConfigGetter(this.getState)
12213
12213
  );
12214
12214
  treeSelectionState.selectAll();
@@ -12216,15 +12216,15 @@ var TreeApiImpl = class {
12216
12216
  this.actions.treeSelection = treeSelectionState;
12217
12217
  }
12218
12218
  deselectAll() {
12219
- const { treeSelectionState: treeSelection, selectionMode } = this.getState();
12219
+ const { treeSelectionState: treeSelection2, selectionMode } = this.getState();
12220
12220
  if (selectionMode !== "multi-row") {
12221
12221
  throw "Selection mode is not multi-row";
12222
12222
  }
12223
- if (!(treeSelection instanceof TreeSelectionState)) {
12223
+ if (!(treeSelection2 instanceof TreeSelectionState)) {
12224
12224
  throw "Invalid node selection";
12225
12225
  }
12226
12226
  const treeSelectionState = new TreeSelectionState(
12227
- treeSelection,
12227
+ treeSelection2,
12228
12228
  treeSelectionStateConfigGetter(this.getState)
12229
12229
  );
12230
12230
  treeSelectionState.deselectAll();
@@ -12232,21 +12232,25 @@ var TreeApiImpl = class {
12232
12232
  this.actions.treeSelection = treeSelectionState;
12233
12233
  }
12234
12234
  isNodeSelected(nodePath) {
12235
- const { treeSelection, selectionMode } = this.getState();
12235
+ const {
12236
+ treeSelectionState,
12237
+ treeSelection: singleTreeSelection,
12238
+ selectionMode
12239
+ } = this.getState();
12236
12240
  if (selectionMode === "single-row") {
12237
12241
  const pk = nodePath[nodePath.length - 1];
12238
- if (Array.isArray(treeSelection)) {
12242
+ if (Array.isArray(singleTreeSelection)) {
12239
12243
  return treeSelection.join(",") === nodePath.join(",");
12240
12244
  }
12241
- return treeSelection === pk;
12245
+ return singleTreeSelection === pk;
12242
12246
  }
12243
12247
  if (selectionMode !== "multi-row") {
12244
12248
  throw "Selection mode is not multi-row or single-row";
12245
12249
  }
12246
- if (!(treeSelection instanceof TreeSelectionState)) {
12250
+ if (!(treeSelectionState instanceof TreeSelectionState)) {
12247
12251
  throw "Invalid tree selection";
12248
12252
  }
12249
- return treeSelection.isNodeSelected(nodePath);
12253
+ return treeSelectionState.isNodeSelected(nodePath);
12250
12254
  }
12251
12255
  selectNode(nodePath) {
12252
12256
  this.setNodeSelection(nodePath, true);
@@ -12766,10 +12770,10 @@ function getMappedCallbacks() {
12766
12770
  ]
12767
12771
  };
12768
12772
  },
12769
- treeSelection: (treeSelection, state) => {
12773
+ treeSelection: (treeSelection2, state) => {
12770
12774
  if (state.selectionMode === "single-row") {
12771
12775
  const callbackParams2 = [
12772
- treeSelection,
12776
+ treeSelection2,
12773
12777
  { selectionMode: "single-row" }
12774
12778
  ];
12775
12779
  return {
@@ -12777,7 +12781,7 @@ function getMappedCallbacks() {
12777
12781
  };
12778
12782
  }
12779
12783
  const callbackParams = [
12780
- treeSelection.getState(),
12784
+ treeSelection2.getState(),
12781
12785
  {
12782
12786
  selectionMode: "multi-row",
12783
12787
  lastUpdatedNodePath: state.lastSelectionUpdatedNodePathRef.current,
@@ -22099,7 +22103,7 @@ var useLicense = (licenseKey = "") => {
22099
22103
  }
22100
22104
  let valid2 = isValidLicense(licenseKey, {
22101
22105
  publishedAt: 1624970570587,
22102
- version: "6.0.6"
22106
+ version: "6.0.7"
22103
22107
  });
22104
22108
  if (!licenseKey && !valid2 && isInsidePlayground) {
22105
22109
  return true;
@@ -22651,7 +22655,7 @@ function handleKeyboardSelection(context, keyboardEvent) {
22651
22655
  selectionMode,
22652
22656
  groupBy,
22653
22657
  rowSelection,
22654
- treeSelectionState: treeSelection,
22658
+ treeSelectionState: treeSelection2,
22655
22659
  isTree
22656
22660
  } = dataSourceState;
22657
22661
  if (keyboardSelection === false) {
@@ -22670,9 +22674,9 @@ function handleKeyboardSelection(context, keyboardEvent) {
22670
22674
  return false;
22671
22675
  }
22672
22676
  if (key === "a" && (ctrlKey || metaKey)) {
22673
- if (isTree && treeSelection) {
22677
+ if (isTree && treeSelection2) {
22674
22678
  const treeSelectionState = cloneTreeSelection2(
22675
- treeSelection
22679
+ treeSelection2
22676
22680
  );
22677
22681
  treeSelectionState.selectAll();
22678
22682
  dataSourceActions.treeSelection = treeSelectionState;
@@ -23074,8 +23078,8 @@ async function onKeyDown(context, event) {
23074
23078
  cloneRowSelection: (rowSelection) => {
23075
23079
  return cloneRowSelection(rowSelection, context.getDataSourceState);
23076
23080
  },
23077
- cloneTreeSelection: (treeSelection) => {
23078
- return cloneTreeSelection(treeSelection, context.getDataSourceState);
23081
+ cloneTreeSelection: (treeSelection2) => {
23082
+ return cloneTreeSelection(treeSelection2, context.getDataSourceState);
23079
23083
  }
23080
23084
  };
23081
23085
  if (handleKeyboardSelection(keyboardHandlerContext, event)) {
@@ -23154,8 +23158,8 @@ function useEventHandlersContext() {
23154
23158
  actions,
23155
23159
  getDataSourceState,
23156
23160
  dataSourceActions,
23157
- cloneTreeSelection: (treeSelection) => {
23158
- return cloneTreeSelection(treeSelection, getDataSourceState);
23161
+ cloneTreeSelection: (treeSelection2) => {
23162
+ return cloneTreeSelection(treeSelection2, getDataSourceState);
23159
23163
  },
23160
23164
  cloneRowSelection: (rowSelection) => {
23161
23165
  return cloneRowSelection(rowSelection, getDataSourceState);
package/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "bugs": {
26
26
  "url": "https://github.com/infinite-table/infinite-react/issues"
27
27
  },
28
- "version": "6.0.6",
28
+ "version": "6.0.7",
29
29
  "main": "index.js",
30
30
  "module": "index.mjs",
31
31
  "typings": "index.d.ts",
@@ -34,5 +34,5 @@
34
34
  },
35
35
  "license": "Commercial & Open Source",
36
36
  "//": "will be updated at build time",
37
- "publishedAt": 1730214481492
37
+ "publishedAt": 1730215290304
38
38
  }