@infinite-table/infinite-react 6.0.0 → 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 +2 -5
- package/index.dev.js +9 -14
- package/index.dev.mjs +9 -14
- package/index.js +9 -14
- package/index.mjs +9 -14
- package/package.json +2 -2
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<
|
|
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.
|
|
22065
|
+
version: "6.0.2"
|
|
22071
22066
|
});
|
|
22072
22067
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
22073
22068
|
return true;
|
|
@@ -26296,7 +26291,7 @@ InfiniteTable.Footer = () => /* @__PURE__ */ React69.createElement(InfiniteTable
|
|
|
26296
26291
|
var React70 = __toESM(require("react"));
|
|
26297
26292
|
function TreeDataSource(props) {
|
|
26298
26293
|
const { DataSource: DataSourceComponent } = useDataSourceInternal(props);
|
|
26299
|
-
return /* @__PURE__ */ React70.createElement(DataSourceComponent, { nodesKey: props.nodesKey || "
|
|
26294
|
+
return /* @__PURE__ */ React70.createElement(DataSourceComponent, { nodesKey: props.nodesKey || "children" }, props.children ?? null);
|
|
26300
26295
|
}
|
|
26301
26296
|
|
|
26302
26297
|
// src/components/TreeGrid/TreeGrid.tsx
|
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.
|
|
22023
|
+
version: "6.0.2"
|
|
22029
22024
|
});
|
|
22030
22025
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
22031
22026
|
return true;
|
|
@@ -26264,7 +26259,7 @@ InfiniteTable.Footer = () => /* @__PURE__ */ React69.createElement(InfiniteTable
|
|
|
26264
26259
|
import * as React70 from "react";
|
|
26265
26260
|
function TreeDataSource(props) {
|
|
26266
26261
|
const { DataSource: DataSourceComponent } = useDataSourceInternal(props);
|
|
26267
|
-
return /* @__PURE__ */ React70.createElement(DataSourceComponent, { nodesKey: props.nodesKey || "
|
|
26262
|
+
return /* @__PURE__ */ React70.createElement(DataSourceComponent, { nodesKey: props.nodesKey || "children" }, props.children ?? null);
|
|
26268
26263
|
}
|
|
26269
26264
|
|
|
26270
26265
|
// src/components/TreeGrid/TreeGrid.tsx
|
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.
|
|
22065
|
+
version: "6.0.2"
|
|
22071
22066
|
});
|
|
22072
22067
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
22073
22068
|
return true;
|
|
@@ -26296,7 +26291,7 @@ InfiniteTable.Footer = () => /* @__PURE__ */ React69.createElement(InfiniteTable
|
|
|
26296
26291
|
var React70 = __toESM(require("react"));
|
|
26297
26292
|
function TreeDataSource(props) {
|
|
26298
26293
|
const { DataSource: DataSourceComponent } = useDataSourceInternal(props);
|
|
26299
|
-
return /* @__PURE__ */ React70.createElement(DataSourceComponent, { nodesKey: props.nodesKey || "
|
|
26294
|
+
return /* @__PURE__ */ React70.createElement(DataSourceComponent, { nodesKey: props.nodesKey || "children" }, props.children ?? null);
|
|
26300
26295
|
}
|
|
26301
26296
|
|
|
26302
26297
|
// src/components/TreeGrid/TreeGrid.tsx
|
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.
|
|
22023
|
+
version: "6.0.2"
|
|
22029
22024
|
});
|
|
22030
22025
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
22031
22026
|
return true;
|
|
@@ -26264,7 +26259,7 @@ InfiniteTable.Footer = () => /* @__PURE__ */ React69.createElement(InfiniteTable
|
|
|
26264
26259
|
import * as React70 from "react";
|
|
26265
26260
|
function TreeDataSource(props) {
|
|
26266
26261
|
const { DataSource: DataSourceComponent } = useDataSourceInternal(props);
|
|
26267
|
-
return /* @__PURE__ */ React70.createElement(DataSourceComponent, { nodesKey: props.nodesKey || "
|
|
26262
|
+
return /* @__PURE__ */ React70.createElement(DataSourceComponent, { nodesKey: props.nodesKey || "children" }, props.children ?? null);
|
|
26268
26263
|
}
|
|
26269
26264
|
|
|
26270
26265
|
// src/components/TreeGrid/TreeGrid.tsx
|
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.
|
|
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":
|
|
37
|
+
"publishedAt": 1730121214427
|
|
38
38
|
}
|