@infinite-table/infinite-react 7.2.2 → 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 +3 -2
- package/index.dev.js +23 -13
- package/index.dev.mjs +23 -13
- package/index.js +2 -2
- package/index.mjs +2 -2
- package/package.json +2 -2
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,
|
|
269
|
-
getDeselectedLeafNodePaths(rootNodePath?: 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
|
@@ -1140,14 +1140,14 @@ if (false) {
|
|
|
1140
1140
|
// src/utils/debugLoggers.ts
|
|
1141
1141
|
var dbg = (channelName) => {
|
|
1142
1142
|
const result = debug(
|
|
1143
|
-
channelName ?
|
|
1143
|
+
channelName ? `IT:${channelName}:TYPE=debug` : "IT:TYPE=debug"
|
|
1144
1144
|
);
|
|
1145
1145
|
result.logFn = console.log.bind(console);
|
|
1146
1146
|
return result;
|
|
1147
1147
|
};
|
|
1148
1148
|
var err = (channelName) => {
|
|
1149
1149
|
const result = debug(
|
|
1150
|
-
channelName ?
|
|
1150
|
+
channelName ? `IT:${channelName}:TYPE=error` : "IT:TYPE=error"
|
|
1151
1151
|
);
|
|
1152
1152
|
result.logFn = console.error.bind(console);
|
|
1153
1153
|
return result;
|
|
@@ -15912,7 +15912,7 @@ var CellSelectionState = class {
|
|
|
15912
15912
|
};
|
|
15913
15913
|
|
|
15914
15914
|
// src/utils/logger.ts
|
|
15915
|
-
var log = debug("InfiniteTable");
|
|
15915
|
+
var log = debug("IT:InfiniteTable");
|
|
15916
15916
|
var COLOR_ERROR_VALUE = `#dc3545`;
|
|
15917
15917
|
var COLOR_WARN_VALUE = `#eb9316`;
|
|
15918
15918
|
var warnChannel = "Warn";
|
|
@@ -17074,20 +17074,20 @@ var TreeSelectionState = class _TreeSelectionState {
|
|
|
17074
17074
|
getTreeDeepMap() {
|
|
17075
17075
|
return this.getConfig().treeDeepMap;
|
|
17076
17076
|
}
|
|
17077
|
-
getSelectedLeafNodePaths(rootNodePath = [],
|
|
17078
|
-
|
|
17077
|
+
getSelectedLeafNodePaths(rootNodePath = [], treePaths) {
|
|
17078
|
+
treePaths = treePaths || this.getConfig().treePaths;
|
|
17079
17079
|
const selectedLeafPaths = [];
|
|
17080
|
-
|
|
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 = [],
|
|
17088
|
-
|
|
17087
|
+
getDeselectedLeafNodePaths(rootNodePath = [], treePaths) {
|
|
17088
|
+
treePaths = treePaths || this.getConfig().treePaths;
|
|
17089
17089
|
const deselectedLeafPaths = [];
|
|
17090
|
-
|
|
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.
|
|
25723
|
+
version: "7.2.4"
|
|
25723
25724
|
});
|
|
25724
25725
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
25725
25726
|
return true;
|
|
@@ -29223,7 +29224,7 @@ var setupHook = once(() => {
|
|
|
29223
29224
|
}
|
|
29224
29225
|
};
|
|
29225
29226
|
window.__INFINITE_TABLE_DEVTOOLS_HOOK__ = hookFn;
|
|
29226
|
-
debug.onLogIntent("
|
|
29227
|
+
debug.onLogIntent("IT:*", (options) => {
|
|
29227
29228
|
postMessage({
|
|
29228
29229
|
...messageBase,
|
|
29229
29230
|
url: getPageUrlOfWindow(),
|
|
@@ -29234,7 +29235,16 @@ var setupHook = once(() => {
|
|
|
29234
29235
|
color: options.color,
|
|
29235
29236
|
args: options.args.map((arg) => {
|
|
29236
29237
|
if (typeof arg === "object" && arg !== null) {
|
|
29237
|
-
|
|
29238
|
+
let str = "";
|
|
29239
|
+
try {
|
|
29240
|
+
str = JSON.stringify(arg);
|
|
29241
|
+
} catch (e) {
|
|
29242
|
+
console.error(
|
|
29243
|
+
`Cannot stringify arg in global log interceptor`,
|
|
29244
|
+
arg
|
|
29245
|
+
);
|
|
29246
|
+
}
|
|
29247
|
+
return str;
|
|
29238
29248
|
}
|
|
29239
29249
|
return String(arg);
|
|
29240
29250
|
}),
|
|
@@ -30235,7 +30245,7 @@ var DataQuery = class {
|
|
|
30235
30245
|
this.isDone = () => this.state === "success" || this.state === "error";
|
|
30236
30246
|
this.isSuccess = () => this.state === "success";
|
|
30237
30247
|
this.debugName = debugName || "";
|
|
30238
|
-
this.logger = debug(
|
|
30248
|
+
this.logger = debug(`IT:${debugName}:DataQuery`);
|
|
30239
30249
|
}
|
|
30240
30250
|
};
|
|
30241
30251
|
|
package/index.dev.mjs
CHANGED
|
@@ -1068,14 +1068,14 @@ if (false) {
|
|
|
1068
1068
|
// src/utils/debugLoggers.ts
|
|
1069
1069
|
var dbg = (channelName) => {
|
|
1070
1070
|
const result = debug(
|
|
1071
|
-
channelName ?
|
|
1071
|
+
channelName ? `IT:${channelName}:TYPE=debug` : "IT:TYPE=debug"
|
|
1072
1072
|
);
|
|
1073
1073
|
result.logFn = console.log.bind(console);
|
|
1074
1074
|
return result;
|
|
1075
1075
|
};
|
|
1076
1076
|
var err = (channelName) => {
|
|
1077
1077
|
const result = debug(
|
|
1078
|
-
channelName ?
|
|
1078
|
+
channelName ? `IT:${channelName}:TYPE=error` : "IT:TYPE=error"
|
|
1079
1079
|
);
|
|
1080
1080
|
result.logFn = console.error.bind(console);
|
|
1081
1081
|
return result;
|
|
@@ -15854,7 +15854,7 @@ var CellSelectionState = class {
|
|
|
15854
15854
|
};
|
|
15855
15855
|
|
|
15856
15856
|
// src/utils/logger.ts
|
|
15857
|
-
var log = debug("InfiniteTable");
|
|
15857
|
+
var log = debug("IT:InfiniteTable");
|
|
15858
15858
|
var COLOR_ERROR_VALUE = `#dc3545`;
|
|
15859
15859
|
var COLOR_WARN_VALUE = `#eb9316`;
|
|
15860
15860
|
var warnChannel = "Warn";
|
|
@@ -17016,20 +17016,20 @@ var TreeSelectionState = class _TreeSelectionState {
|
|
|
17016
17016
|
getTreeDeepMap() {
|
|
17017
17017
|
return this.getConfig().treeDeepMap;
|
|
17018
17018
|
}
|
|
17019
|
-
getSelectedLeafNodePaths(rootNodePath = [],
|
|
17020
|
-
|
|
17019
|
+
getSelectedLeafNodePaths(rootNodePath = [], treePaths) {
|
|
17020
|
+
treePaths = treePaths || this.getConfig().treePaths;
|
|
17021
17021
|
const selectedLeafPaths = [];
|
|
17022
|
-
|
|
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 = [],
|
|
17030
|
-
|
|
17029
|
+
getDeselectedLeafNodePaths(rootNodePath = [], treePaths) {
|
|
17030
|
+
treePaths = treePaths || this.getConfig().treePaths;
|
|
17031
17031
|
const deselectedLeafPaths = [];
|
|
17032
|
-
|
|
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.
|
|
25674
|
+
version: "7.2.4"
|
|
25674
25675
|
});
|
|
25675
25676
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
25676
25677
|
return true;
|
|
@@ -29184,7 +29185,7 @@ var setupHook = once(() => {
|
|
|
29184
29185
|
}
|
|
29185
29186
|
};
|
|
29186
29187
|
window.__INFINITE_TABLE_DEVTOOLS_HOOK__ = hookFn;
|
|
29187
|
-
debug.onLogIntent("
|
|
29188
|
+
debug.onLogIntent("IT:*", (options) => {
|
|
29188
29189
|
postMessage({
|
|
29189
29190
|
...messageBase,
|
|
29190
29191
|
url: getPageUrlOfWindow(),
|
|
@@ -29195,7 +29196,16 @@ var setupHook = once(() => {
|
|
|
29195
29196
|
color: options.color,
|
|
29196
29197
|
args: options.args.map((arg) => {
|
|
29197
29198
|
if (typeof arg === "object" && arg !== null) {
|
|
29198
|
-
|
|
29199
|
+
let str = "";
|
|
29200
|
+
try {
|
|
29201
|
+
str = JSON.stringify(arg);
|
|
29202
|
+
} catch (e) {
|
|
29203
|
+
console.error(
|
|
29204
|
+
`Cannot stringify arg in global log interceptor`,
|
|
29205
|
+
arg
|
|
29206
|
+
);
|
|
29207
|
+
}
|
|
29208
|
+
return str;
|
|
29199
29209
|
}
|
|
29200
29210
|
return String(arg);
|
|
29201
29211
|
}),
|
|
@@ -30196,7 +30206,7 @@ var DataQuery = class {
|
|
|
30196
30206
|
this.isDone = () => this.state === "success" || this.state === "error";
|
|
30197
30207
|
this.isSuccess = () => this.state === "success";
|
|
30198
30208
|
this.debugName = debugName || "";
|
|
30199
|
-
this.logger = debug(
|
|
30209
|
+
this.logger = debug(`IT:${debugName}:DataQuery`);
|
|
30200
30210
|
}
|
|
30201
30211
|
};
|
|
30202
30212
|
|