@infinite-table/infinite-react 7.2.3 → 7.2.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/index.d.ts CHANGED
@@ -249,6 +249,7 @@ type TreeSelectionStateObject = {
249
249
  };
250
250
  type TreeSelectionStateConfig<_T = any> = {
251
251
  treeDeepMap: DeepMap<any, DeepMapTreeValueType<any, any>>;
252
+ treePaths: DeepMap<any, true>;
252
253
  };
253
254
  type GetTreeSelectionStateConfig<T> = () => TreeSelectionStateConfig<T>;
254
255
  type NodeSelectionState = {
@@ -265,8 +266,8 @@ declare class TreeSelectionState<T = any> {
265
266
  cache: DeepMap<NodePath, NodeSelectionState>;
266
267
  getConfig: GetTreeSelectionStateConfig<T>;
267
268
  getTreeDeepMap(): DeepMap<any, DeepMapTreeValueType<any, any>>;
268
- getSelectedLeafNodePaths(rootNodePath?: NodePath, treeDeepMap?: DeepMap<any, any>): NodePath[];
269
- getDeselectedLeafNodePaths(rootNodePath?: NodePath, treeDeepMap?: DeepMap<any, any>): NodePath[];
269
+ getSelectedLeafNodePaths(rootNodePath?: NodePath, treePaths?: DeepMap<any, true>): NodePath[];
270
+ getDeselectedLeafNodePaths(rootNodePath?: NodePath, treePaths?: DeepMap<any, true>): NodePath[];
270
271
  isLeafNode(nodePath: NodePath): boolean;
271
272
  getLeafNodesCount(nodePath: NodePath): number;
272
273
  static from<T>(treeSelectionState: TreeSelectionStateObject, getConfig: GetTreeSelectionStateConfig<T>): TreeSelectionState<T>;
package/index.dev.js CHANGED
@@ -17074,20 +17074,20 @@ var TreeSelectionState = class _TreeSelectionState {
17074
17074
  getTreeDeepMap() {
17075
17075
  return this.getConfig().treeDeepMap;
17076
17076
  }
17077
- getSelectedLeafNodePaths(rootNodePath = [], treeDeepMap) {
17078
- treeDeepMap = treeDeepMap || this.getConfig().treeDeepMap;
17077
+ getSelectedLeafNodePaths(rootNodePath = [], treePaths) {
17078
+ treePaths = treePaths || this.getConfig().treePaths;
17079
17079
  const selectedLeafPaths = [];
17080
- treeDeepMap.getLeafNodesStartingWith(rootNodePath, (pair) => {
17080
+ treePaths.getLeafNodesStartingWith(rootNodePath, (pair) => {
17081
17081
  if (this.isNodeSelected(pair.keys)) {
17082
17082
  selectedLeafPaths.push(pair.keys);
17083
17083
  }
17084
17084
  });
17085
17085
  return selectedLeafPaths;
17086
17086
  }
17087
- getDeselectedLeafNodePaths(rootNodePath = [], treeDeepMap) {
17088
- treeDeepMap = treeDeepMap || this.getConfig().treeDeepMap;
17087
+ getDeselectedLeafNodePaths(rootNodePath = [], treePaths) {
17088
+ treePaths = treePaths || this.getConfig().treePaths;
17089
17089
  const deselectedLeafPaths = [];
17090
- treeDeepMap.getLeafNodesStartingWith(rootNodePath, (pair) => {
17090
+ treePaths.getLeafNodesStartingWith(rootNodePath, (pair) => {
17091
17091
  if (!this.isNodeSelected(pair.keys)) {
17092
17092
  deselectedLeafPaths.push(pair.keys);
17093
17093
  }
@@ -17344,6 +17344,7 @@ function treeSelectionStateConfigGetter(stateOrStateGetter) {
17344
17344
  return () => {
17345
17345
  const state = typeof stateOrStateGetter === "function" ? stateOrStateGetter() : stateOrStateGetter;
17346
17346
  return {
17347
+ treePaths: state.treePaths,
17347
17348
  treeDeepMap: state.treeDeepMap
17348
17349
  };
17349
17350
  };
@@ -25719,7 +25720,7 @@ var useLicense = (licenseKey = "") => {
25719
25720
  }
25720
25721
  let valid2 = isValidLicense(licenseKey, {
25721
25722
  publishedAt: 1624970570587,
25722
- version: "7.2.3"
25723
+ version: "7.2.4"
25723
25724
  });
25724
25725
  if (!licenseKey && !valid2 && isInsidePlayground) {
25725
25726
  return true;
package/index.dev.mjs CHANGED
@@ -17016,20 +17016,20 @@ var TreeSelectionState = class _TreeSelectionState {
17016
17016
  getTreeDeepMap() {
17017
17017
  return this.getConfig().treeDeepMap;
17018
17018
  }
17019
- getSelectedLeafNodePaths(rootNodePath = [], treeDeepMap) {
17020
- treeDeepMap = treeDeepMap || this.getConfig().treeDeepMap;
17019
+ getSelectedLeafNodePaths(rootNodePath = [], treePaths) {
17020
+ treePaths = treePaths || this.getConfig().treePaths;
17021
17021
  const selectedLeafPaths = [];
17022
- treeDeepMap.getLeafNodesStartingWith(rootNodePath, (pair) => {
17022
+ treePaths.getLeafNodesStartingWith(rootNodePath, (pair) => {
17023
17023
  if (this.isNodeSelected(pair.keys)) {
17024
17024
  selectedLeafPaths.push(pair.keys);
17025
17025
  }
17026
17026
  });
17027
17027
  return selectedLeafPaths;
17028
17028
  }
17029
- getDeselectedLeafNodePaths(rootNodePath = [], treeDeepMap) {
17030
- treeDeepMap = treeDeepMap || this.getConfig().treeDeepMap;
17029
+ getDeselectedLeafNodePaths(rootNodePath = [], treePaths) {
17030
+ treePaths = treePaths || this.getConfig().treePaths;
17031
17031
  const deselectedLeafPaths = [];
17032
- treeDeepMap.getLeafNodesStartingWith(rootNodePath, (pair) => {
17032
+ treePaths.getLeafNodesStartingWith(rootNodePath, (pair) => {
17033
17033
  if (!this.isNodeSelected(pair.keys)) {
17034
17034
  deselectedLeafPaths.push(pair.keys);
17035
17035
  }
@@ -17286,6 +17286,7 @@ function treeSelectionStateConfigGetter(stateOrStateGetter) {
17286
17286
  return () => {
17287
17287
  const state = typeof stateOrStateGetter === "function" ? stateOrStateGetter() : stateOrStateGetter;
17288
17288
  return {
17289
+ treePaths: state.treePaths,
17289
17290
  treeDeepMap: state.treeDeepMap
17290
17291
  };
17291
17292
  };
@@ -25670,7 +25671,7 @@ var useLicense = (licenseKey = "") => {
25670
25671
  }
25671
25672
  let valid2 = isValidLicense(licenseKey, {
25672
25673
  publishedAt: 1624970570587,
25673
- version: "7.2.3"
25674
+ version: "7.2.4"
25674
25675
  });
25675
25676
  if (!licenseKey && !valid2 && isInsidePlayground) {
25676
25677
  return true;