@infinite-table/infinite-react 6.0.1 → 6.0.2

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
@@ -2231,21 +2231,17 @@ declare type TreeExpandStateApi<T> = {
2231
2231
  getNodeDataByPath(nodePath: any[]): T | null;
2232
2232
  getRowInfoByPath(nodePath: any[]): InfiniteTableRowInfo<T> | null;
2233
2233
  };
2234
- declare type TreeSelectionApi<T> = {
2234
+ declare type TreeSelectionApi<_T = any> = {
2235
2235
  get allRowsSelected(): boolean;
2236
2236
  isNodeSelected(nodePath: NodePath$1): boolean | null;
2237
2237
  selectNode(nodePath: NodePath$1): void;
2238
2238
  setNodeSelection(nodePath: NodePath$1, selected: boolean): void;
2239
2239
  deselectNode(nodePath: NodePath$1): void;
2240
2240
  toggleNodeSelection(nodePath: NodePath$1): void;
2241
- getRowInfoByNodePath(nodePath: NodePath$1): InfiniteTableRowInfo<T> | null;
2242
- getIndexByNodePath(nodePath: NodePath$1): number;
2243
- getDataByNodePath(nodePath: NodePath$1): T | null;
2244
2241
  selectAll(): void;
2245
2242
  expandAll(): void;
2246
2243
  collapseAll(): void;
2247
2244
  deselectAll(): void;
2248
- updateDataByNodePath(data: Partial<T>, nodePath: NodePath$1, options?: DataSourceCRUDParam): void;
2249
2245
  };
2250
2246
  declare type TreeApi<T> = TreeExpandStateApi<T> & TreeSelectionApi<T>;
2251
2247
 
@@ -2597,6 +2593,7 @@ interface DataSourceApi<T> {
2597
2593
  getRowInfoArray: () => InfiniteTableRowInfo<T>[];
2598
2594
  getDataByPrimaryKey(id: any): T | null;
2599
2595
  getDataByNodePath(nodePath: NodePath$1): T | null;
2596
+ getDataByIndex(index: number): T | null;
2600
2597
  getRowInfoByIndex(index: number): InfiniteTableRowInfo<T> | null;
2601
2598
  getRowInfoByPrimaryKey(id: any): InfiniteTableRowInfo<T> | null;
2602
2599
  getRowInfoByNodePath(nodePath: NodePath$1): InfiniteTableRowInfo<T> | null;
package/index.dev.js CHANGED
@@ -14964,18 +14964,6 @@ function getTreeApi(param) {
14964
14964
  } else {
14965
14965
  this.selectNode(nodePath);
14966
14966
  }
14967
- },
14968
- getDataByNodePath(nodePath) {
14969
- return dataSourceApi.getDataByNodePath(nodePath);
14970
- },
14971
- updateDataByNodePath(data, nodePath, options) {
14972
- return dataSourceApi.updateDataByNodePath(data, nodePath, options);
14973
- },
14974
- getRowInfoByNodePath(nodePath) {
14975
- return dataSourceApi.getRowInfoByNodePath(nodePath);
14976
- },
14977
- getIndexByNodePath(nodePath) {
14978
- return dataSourceApi.getIndexByNodePath(nodePath);
14979
14967
  }
14980
14968
  };
14981
14969
  return api;
@@ -15223,6 +15211,13 @@ var DataSourceApiImpl = class {
15223
15211
  this.getOriginalDataArray = () => {
15224
15212
  return this.getState().originalDataArray;
15225
15213
  };
15214
+ this.getDataByIndex = (index) => {
15215
+ const rowInfo = this.getRowInfoByIndex(index);
15216
+ if (!rowInfo) {
15217
+ return null;
15218
+ }
15219
+ return rowInfo.data;
15220
+ };
15226
15221
  this.getDataByPrimaryKey = (id) => {
15227
15222
  const { indexer } = this.getState();
15228
15223
  return indexer.getDataForPrimaryKey(id) ?? null;
@@ -22067,7 +22062,7 @@ var useLicense = (licenseKey = "") => {
22067
22062
  }
22068
22063
  let valid2 = isValidLicense(licenseKey, {
22069
22064
  publishedAt: 1624970570587,
22070
- version: "6.0.1"
22065
+ version: "6.0.2"
22071
22066
  });
22072
22067
  if (!licenseKey && !valid2 && isInsidePlayground) {
22073
22068
  return true;
package/index.dev.mjs CHANGED
@@ -14913,18 +14913,6 @@ function getTreeApi(param) {
14913
14913
  } else {
14914
14914
  this.selectNode(nodePath);
14915
14915
  }
14916
- },
14917
- getDataByNodePath(nodePath) {
14918
- return dataSourceApi.getDataByNodePath(nodePath);
14919
- },
14920
- updateDataByNodePath(data, nodePath, options) {
14921
- return dataSourceApi.updateDataByNodePath(data, nodePath, options);
14922
- },
14923
- getRowInfoByNodePath(nodePath) {
14924
- return dataSourceApi.getRowInfoByNodePath(nodePath);
14925
- },
14926
- getIndexByNodePath(nodePath) {
14927
- return dataSourceApi.getIndexByNodePath(nodePath);
14928
14916
  }
14929
14917
  };
14930
14918
  return api;
@@ -15172,6 +15160,13 @@ var DataSourceApiImpl = class {
15172
15160
  this.getOriginalDataArray = () => {
15173
15161
  return this.getState().originalDataArray;
15174
15162
  };
15163
+ this.getDataByIndex = (index) => {
15164
+ const rowInfo = this.getRowInfoByIndex(index);
15165
+ if (!rowInfo) {
15166
+ return null;
15167
+ }
15168
+ return rowInfo.data;
15169
+ };
15175
15170
  this.getDataByPrimaryKey = (id) => {
15176
15171
  const { indexer } = this.getState();
15177
15172
  return indexer.getDataForPrimaryKey(id) ?? null;
@@ -22025,7 +22020,7 @@ var useLicense = (licenseKey = "") => {
22025
22020
  }
22026
22021
  let valid2 = isValidLicense(licenseKey, {
22027
22022
  publishedAt: 1624970570587,
22028
- version: "6.0.1"
22023
+ version: "6.0.2"
22029
22024
  });
22030
22025
  if (!licenseKey && !valid2 && isInsidePlayground) {
22031
22026
  return true;
package/index.js CHANGED
@@ -14964,18 +14964,6 @@ function getTreeApi(param) {
14964
14964
  } else {
14965
14965
  this.selectNode(nodePath);
14966
14966
  }
14967
- },
14968
- getDataByNodePath(nodePath) {
14969
- return dataSourceApi.getDataByNodePath(nodePath);
14970
- },
14971
- updateDataByNodePath(data, nodePath, options) {
14972
- return dataSourceApi.updateDataByNodePath(data, nodePath, options);
14973
- },
14974
- getRowInfoByNodePath(nodePath) {
14975
- return dataSourceApi.getRowInfoByNodePath(nodePath);
14976
- },
14977
- getIndexByNodePath(nodePath) {
14978
- return dataSourceApi.getIndexByNodePath(nodePath);
14979
14967
  }
14980
14968
  };
14981
14969
  return api;
@@ -15223,6 +15211,13 @@ var DataSourceApiImpl = class {
15223
15211
  this.getOriginalDataArray = () => {
15224
15212
  return this.getState().originalDataArray;
15225
15213
  };
15214
+ this.getDataByIndex = (index) => {
15215
+ const rowInfo = this.getRowInfoByIndex(index);
15216
+ if (!rowInfo) {
15217
+ return null;
15218
+ }
15219
+ return rowInfo.data;
15220
+ };
15226
15221
  this.getDataByPrimaryKey = (id) => {
15227
15222
  const { indexer } = this.getState();
15228
15223
  return indexer.getDataForPrimaryKey(id) ?? null;
@@ -22067,7 +22062,7 @@ var useLicense = (licenseKey = "") => {
22067
22062
  }
22068
22063
  let valid2 = isValidLicense(licenseKey, {
22069
22064
  publishedAt: 1624970570587,
22070
- version: "6.0.1"
22065
+ version: "6.0.2"
22071
22066
  });
22072
22067
  if (!licenseKey && !valid2 && isInsidePlayground) {
22073
22068
  return true;
package/index.mjs CHANGED
@@ -14913,18 +14913,6 @@ function getTreeApi(param) {
14913
14913
  } else {
14914
14914
  this.selectNode(nodePath);
14915
14915
  }
14916
- },
14917
- getDataByNodePath(nodePath) {
14918
- return dataSourceApi.getDataByNodePath(nodePath);
14919
- },
14920
- updateDataByNodePath(data, nodePath, options) {
14921
- return dataSourceApi.updateDataByNodePath(data, nodePath, options);
14922
- },
14923
- getRowInfoByNodePath(nodePath) {
14924
- return dataSourceApi.getRowInfoByNodePath(nodePath);
14925
- },
14926
- getIndexByNodePath(nodePath) {
14927
- return dataSourceApi.getIndexByNodePath(nodePath);
14928
14916
  }
14929
14917
  };
14930
14918
  return api;
@@ -15172,6 +15160,13 @@ var DataSourceApiImpl = class {
15172
15160
  this.getOriginalDataArray = () => {
15173
15161
  return this.getState().originalDataArray;
15174
15162
  };
15163
+ this.getDataByIndex = (index) => {
15164
+ const rowInfo = this.getRowInfoByIndex(index);
15165
+ if (!rowInfo) {
15166
+ return null;
15167
+ }
15168
+ return rowInfo.data;
15169
+ };
15175
15170
  this.getDataByPrimaryKey = (id) => {
15176
15171
  const { indexer } = this.getState();
15177
15172
  return indexer.getDataForPrimaryKey(id) ?? null;
@@ -22025,7 +22020,7 @@ var useLicense = (licenseKey = "") => {
22025
22020
  }
22026
22021
  let valid2 = isValidLicense(licenseKey, {
22027
22022
  publishedAt: 1624970570587,
22028
- version: "6.0.1"
22023
+ version: "6.0.2"
22029
22024
  });
22030
22025
  if (!licenseKey && !valid2 && isInsidePlayground) {
22031
22026
  return true;
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.1",
28
+ "version": "6.0.2",
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": 1730116744150
37
+ "publishedAt": 1730121214427
38
38
  }