@infinite-table/infinite-react 6.0.9 → 6.0.10
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 +1 -1
- package/index.dev.js +17 -15
- package/index.dev.mjs +17 -15
- package/index.js +17 -15
- package/index.mjs +17 -15
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -2578,7 +2578,7 @@ declare type DataSourcePropIsRowSelected<T> = (rowInfo: InfiniteTableRowInfo<T>,
|
|
|
2578
2578
|
declare type DataSourcePropIsNodeReadOnly<T> = (rowInfo: InfiniteTable_Tree_RowInfoParentNode<T>) => boolean;
|
|
2579
2579
|
declare type DataSourcePropIsNodeSelected<T> = (rowInfo: InfiniteTable_Tree_RowInfoNode<T>, treeSelectionState: TreeSelectionState, selectionMode: 'multi-row') => boolean | null;
|
|
2580
2580
|
declare type DataSourcePropIsNodeSelectable<T> = (rowInfo: InfiniteTable_Tree_RowInfoNode<T>) => boolean;
|
|
2581
|
-
declare type DataSourcePropIsNodeExpanded<T> = (rowInfo: InfiniteTable_Tree_RowInfoParentNode<T
|
|
2581
|
+
declare type DataSourcePropIsNodeExpanded<T> = (rowInfo: InfiniteTable_Tree_RowInfoParentNode<T>, treeExpandState: TreeExpandState) => boolean;
|
|
2582
2582
|
declare type DataSourcePropSortFn<T> = (sortInfo: MultisortInfoAllowMultipleFields<T>[], array: T[], get?: (item: any) => T) => T[];
|
|
2583
2583
|
declare type DataSourceCRUDParam = {
|
|
2584
2584
|
flush?: boolean;
|
package/index.dev.js
CHANGED
|
@@ -8112,10 +8112,12 @@ function ExpandCollapseIcon(props) {
|
|
|
8112
8112
|
setExpanded(props.expanded);
|
|
8113
8113
|
}
|
|
8114
8114
|
}, [props.expanded]);
|
|
8115
|
+
const currentState = expanded ? "expanded" : "collapsed";
|
|
8115
8116
|
return /* @__PURE__ */ React30.createElement(
|
|
8116
8117
|
"svg",
|
|
8117
8118
|
{
|
|
8118
8119
|
"data-name": "expand-collapse-icon",
|
|
8120
|
+
"data-state": currentState,
|
|
8119
8121
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8120
8122
|
height: `${size}px`,
|
|
8121
8123
|
viewBox: "0 0 24 24",
|
|
@@ -8132,7 +8134,7 @@ function ExpandCollapseIcon(props) {
|
|
|
8132
8134
|
}),
|
|
8133
8135
|
`${InfiniteIconClassName}`,
|
|
8134
8136
|
`${THIS_ICON}`,
|
|
8135
|
-
`${THIS_ICON}--${
|
|
8137
|
+
`${THIS_ICON}--${currentState}`,
|
|
8136
8138
|
`${THIS_ICON}--${direction === "end" ? "end" : "start"}`,
|
|
8137
8139
|
disabled ? `${THIS_ICON}--disabled` : ""
|
|
8138
8140
|
)
|
|
@@ -14902,10 +14904,10 @@ var TreeApiImpl = class {
|
|
|
14902
14904
|
return false;
|
|
14903
14905
|
}
|
|
14904
14906
|
if (isNodeCollapsed) {
|
|
14905
|
-
return !isNodeExpanded(rowInfo);
|
|
14907
|
+
return !isNodeExpanded(rowInfo, treeExpandState);
|
|
14906
14908
|
}
|
|
14907
14909
|
if (isNodeExpanded) {
|
|
14908
|
-
return isNodeExpanded(rowInfo);
|
|
14910
|
+
return isNodeExpanded(rowInfo, treeExpandState);
|
|
14909
14911
|
}
|
|
14910
14912
|
}
|
|
14911
14913
|
return treeExpandState.isNodeExpanded(nodePath);
|
|
@@ -15680,18 +15682,18 @@ var DataSourceApiImpl = class {
|
|
|
15680
15682
|
case "delete":
|
|
15681
15683
|
if (operation.primaryKeys) {
|
|
15682
15684
|
operation.primaryKeys.forEach((key) => {
|
|
15683
|
-
const
|
|
15684
|
-
if (
|
|
15685
|
-
cache.delete(key,
|
|
15685
|
+
const originalData = this.getDataByPrimaryKey(key);
|
|
15686
|
+
if (originalData) {
|
|
15687
|
+
cache.delete(key, originalData, operation.metadata);
|
|
15686
15688
|
}
|
|
15687
15689
|
});
|
|
15688
15690
|
} else if (operation.nodePaths) {
|
|
15689
15691
|
operation.nodePaths.forEach((nodePath2) => {
|
|
15690
|
-
const
|
|
15691
|
-
if (
|
|
15692
|
+
const originalData = this.getDataByNodePath(nodePath2);
|
|
15693
|
+
if (originalData) {
|
|
15692
15694
|
cache.deleteNodePath(
|
|
15693
15695
|
nodePath2,
|
|
15694
|
-
|
|
15696
|
+
originalData,
|
|
15695
15697
|
operation.metadata
|
|
15696
15698
|
);
|
|
15697
15699
|
}
|
|
@@ -16213,15 +16215,15 @@ function concludeReducer(params) {
|
|
|
16213
16215
|
state.selectionMode
|
|
16214
16216
|
);
|
|
16215
16217
|
}
|
|
16216
|
-
let isNodeExpanded
|
|
16218
|
+
let isNodeExpanded;
|
|
16219
|
+
if (state.isNodeExpanded) {
|
|
16220
|
+
isNodeExpanded = (rowInfo) => state.isNodeExpanded(rowInfo, treeExpandState);
|
|
16221
|
+
}
|
|
16217
16222
|
if (state.isNodeCollapsed) {
|
|
16218
|
-
isNodeExpanded = (rowInfo) => !state.isNodeExpanded(rowInfo);
|
|
16223
|
+
isNodeExpanded = (rowInfo) => !state.isNodeExpanded(rowInfo, treeExpandState);
|
|
16219
16224
|
}
|
|
16220
16225
|
if (!isNodeExpanded) {
|
|
16221
16226
|
const defaultIsRowExpanded = (rowInfo) => {
|
|
16222
|
-
if (!rowInfo.isTreeNode || !rowInfo.isParentNode) {
|
|
16223
|
-
return false;
|
|
16224
|
-
}
|
|
16225
16227
|
return treeExpandState.isNodeExpanded(rowInfo.nodePath);
|
|
16226
16228
|
};
|
|
16227
16229
|
isNodeExpanded = defaultIsRowExpanded;
|
|
@@ -22197,7 +22199,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
22197
22199
|
}
|
|
22198
22200
|
let valid2 = isValidLicense(licenseKey, {
|
|
22199
22201
|
publishedAt: 1624970570587,
|
|
22200
|
-
version: "6.0.
|
|
22202
|
+
version: "6.0.10"
|
|
22201
22203
|
});
|
|
22202
22204
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
22203
22205
|
return true;
|
package/index.dev.mjs
CHANGED
|
@@ -8061,10 +8061,12 @@ function ExpandCollapseIcon(props) {
|
|
|
8061
8061
|
setExpanded(props.expanded);
|
|
8062
8062
|
}
|
|
8063
8063
|
}, [props.expanded]);
|
|
8064
|
+
const currentState = expanded ? "expanded" : "collapsed";
|
|
8064
8065
|
return /* @__PURE__ */ React30.createElement(
|
|
8065
8066
|
"svg",
|
|
8066
8067
|
{
|
|
8067
8068
|
"data-name": "expand-collapse-icon",
|
|
8069
|
+
"data-state": currentState,
|
|
8068
8070
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8069
8071
|
height: `${size}px`,
|
|
8070
8072
|
viewBox: "0 0 24 24",
|
|
@@ -8081,7 +8083,7 @@ function ExpandCollapseIcon(props) {
|
|
|
8081
8083
|
}),
|
|
8082
8084
|
`${InfiniteIconClassName}`,
|
|
8083
8085
|
`${THIS_ICON}`,
|
|
8084
|
-
`${THIS_ICON}--${
|
|
8086
|
+
`${THIS_ICON}--${currentState}`,
|
|
8085
8087
|
`${THIS_ICON}--${direction === "end" ? "end" : "start"}`,
|
|
8086
8088
|
disabled ? `${THIS_ICON}--disabled` : ""
|
|
8087
8089
|
)
|
|
@@ -14851,10 +14853,10 @@ var TreeApiImpl = class {
|
|
|
14851
14853
|
return false;
|
|
14852
14854
|
}
|
|
14853
14855
|
if (isNodeCollapsed) {
|
|
14854
|
-
return !isNodeExpanded(rowInfo);
|
|
14856
|
+
return !isNodeExpanded(rowInfo, treeExpandState);
|
|
14855
14857
|
}
|
|
14856
14858
|
if (isNodeExpanded) {
|
|
14857
|
-
return isNodeExpanded(rowInfo);
|
|
14859
|
+
return isNodeExpanded(rowInfo, treeExpandState);
|
|
14858
14860
|
}
|
|
14859
14861
|
}
|
|
14860
14862
|
return treeExpandState.isNodeExpanded(nodePath);
|
|
@@ -15629,18 +15631,18 @@ var DataSourceApiImpl = class {
|
|
|
15629
15631
|
case "delete":
|
|
15630
15632
|
if (operation.primaryKeys) {
|
|
15631
15633
|
operation.primaryKeys.forEach((key) => {
|
|
15632
|
-
const
|
|
15633
|
-
if (
|
|
15634
|
-
cache.delete(key,
|
|
15634
|
+
const originalData = this.getDataByPrimaryKey(key);
|
|
15635
|
+
if (originalData) {
|
|
15636
|
+
cache.delete(key, originalData, operation.metadata);
|
|
15635
15637
|
}
|
|
15636
15638
|
});
|
|
15637
15639
|
} else if (operation.nodePaths) {
|
|
15638
15640
|
operation.nodePaths.forEach((nodePath2) => {
|
|
15639
|
-
const
|
|
15640
|
-
if (
|
|
15641
|
+
const originalData = this.getDataByNodePath(nodePath2);
|
|
15642
|
+
if (originalData) {
|
|
15641
15643
|
cache.deleteNodePath(
|
|
15642
15644
|
nodePath2,
|
|
15643
|
-
|
|
15645
|
+
originalData,
|
|
15644
15646
|
operation.metadata
|
|
15645
15647
|
);
|
|
15646
15648
|
}
|
|
@@ -16162,15 +16164,15 @@ function concludeReducer(params) {
|
|
|
16162
16164
|
state.selectionMode
|
|
16163
16165
|
);
|
|
16164
16166
|
}
|
|
16165
|
-
let isNodeExpanded
|
|
16167
|
+
let isNodeExpanded;
|
|
16168
|
+
if (state.isNodeExpanded) {
|
|
16169
|
+
isNodeExpanded = (rowInfo) => state.isNodeExpanded(rowInfo, treeExpandState);
|
|
16170
|
+
}
|
|
16166
16171
|
if (state.isNodeCollapsed) {
|
|
16167
|
-
isNodeExpanded = (rowInfo) => !state.isNodeExpanded(rowInfo);
|
|
16172
|
+
isNodeExpanded = (rowInfo) => !state.isNodeExpanded(rowInfo, treeExpandState);
|
|
16168
16173
|
}
|
|
16169
16174
|
if (!isNodeExpanded) {
|
|
16170
16175
|
const defaultIsRowExpanded = (rowInfo) => {
|
|
16171
|
-
if (!rowInfo.isTreeNode || !rowInfo.isParentNode) {
|
|
16172
|
-
return false;
|
|
16173
|
-
}
|
|
16174
16176
|
return treeExpandState.isNodeExpanded(rowInfo.nodePath);
|
|
16175
16177
|
};
|
|
16176
16178
|
isNodeExpanded = defaultIsRowExpanded;
|
|
@@ -22155,7 +22157,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
22155
22157
|
}
|
|
22156
22158
|
let valid2 = isValidLicense(licenseKey, {
|
|
22157
22159
|
publishedAt: 1624970570587,
|
|
22158
|
-
version: "6.0.
|
|
22160
|
+
version: "6.0.10"
|
|
22159
22161
|
});
|
|
22160
22162
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
22161
22163
|
return true;
|
package/index.js
CHANGED
|
@@ -8112,10 +8112,12 @@ function ExpandCollapseIcon(props) {
|
|
|
8112
8112
|
setExpanded(props.expanded);
|
|
8113
8113
|
}
|
|
8114
8114
|
}, [props.expanded]);
|
|
8115
|
+
const currentState = expanded ? "expanded" : "collapsed";
|
|
8115
8116
|
return /* @__PURE__ */ React30.createElement(
|
|
8116
8117
|
"svg",
|
|
8117
8118
|
{
|
|
8118
8119
|
"data-name": "expand-collapse-icon",
|
|
8120
|
+
"data-state": currentState,
|
|
8119
8121
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8120
8122
|
height: `${size}px`,
|
|
8121
8123
|
viewBox: "0 0 24 24",
|
|
@@ -8132,7 +8134,7 @@ function ExpandCollapseIcon(props) {
|
|
|
8132
8134
|
}),
|
|
8133
8135
|
`${InfiniteIconClassName}`,
|
|
8134
8136
|
`${THIS_ICON}`,
|
|
8135
|
-
`${THIS_ICON}--${
|
|
8137
|
+
`${THIS_ICON}--${currentState}`,
|
|
8136
8138
|
`${THIS_ICON}--${direction === "end" ? "end" : "start"}`,
|
|
8137
8139
|
disabled ? `${THIS_ICON}--disabled` : ""
|
|
8138
8140
|
)
|
|
@@ -14902,10 +14904,10 @@ var TreeApiImpl = class {
|
|
|
14902
14904
|
return false;
|
|
14903
14905
|
}
|
|
14904
14906
|
if (isNodeCollapsed) {
|
|
14905
|
-
return !isNodeExpanded(rowInfo);
|
|
14907
|
+
return !isNodeExpanded(rowInfo, treeExpandState);
|
|
14906
14908
|
}
|
|
14907
14909
|
if (isNodeExpanded) {
|
|
14908
|
-
return isNodeExpanded(rowInfo);
|
|
14910
|
+
return isNodeExpanded(rowInfo, treeExpandState);
|
|
14909
14911
|
}
|
|
14910
14912
|
}
|
|
14911
14913
|
return treeExpandState.isNodeExpanded(nodePath);
|
|
@@ -15680,18 +15682,18 @@ var DataSourceApiImpl = class {
|
|
|
15680
15682
|
case "delete":
|
|
15681
15683
|
if (operation.primaryKeys) {
|
|
15682
15684
|
operation.primaryKeys.forEach((key) => {
|
|
15683
|
-
const
|
|
15684
|
-
if (
|
|
15685
|
-
cache.delete(key,
|
|
15685
|
+
const originalData = this.getDataByPrimaryKey(key);
|
|
15686
|
+
if (originalData) {
|
|
15687
|
+
cache.delete(key, originalData, operation.metadata);
|
|
15686
15688
|
}
|
|
15687
15689
|
});
|
|
15688
15690
|
} else if (operation.nodePaths) {
|
|
15689
15691
|
operation.nodePaths.forEach((nodePath2) => {
|
|
15690
|
-
const
|
|
15691
|
-
if (
|
|
15692
|
+
const originalData = this.getDataByNodePath(nodePath2);
|
|
15693
|
+
if (originalData) {
|
|
15692
15694
|
cache.deleteNodePath(
|
|
15693
15695
|
nodePath2,
|
|
15694
|
-
|
|
15696
|
+
originalData,
|
|
15695
15697
|
operation.metadata
|
|
15696
15698
|
);
|
|
15697
15699
|
}
|
|
@@ -16213,15 +16215,15 @@ function concludeReducer(params) {
|
|
|
16213
16215
|
state.selectionMode
|
|
16214
16216
|
);
|
|
16215
16217
|
}
|
|
16216
|
-
let isNodeExpanded
|
|
16218
|
+
let isNodeExpanded;
|
|
16219
|
+
if (state.isNodeExpanded) {
|
|
16220
|
+
isNodeExpanded = (rowInfo) => state.isNodeExpanded(rowInfo, treeExpandState);
|
|
16221
|
+
}
|
|
16217
16222
|
if (state.isNodeCollapsed) {
|
|
16218
|
-
isNodeExpanded = (rowInfo) => !state.isNodeExpanded(rowInfo);
|
|
16223
|
+
isNodeExpanded = (rowInfo) => !state.isNodeExpanded(rowInfo, treeExpandState);
|
|
16219
16224
|
}
|
|
16220
16225
|
if (!isNodeExpanded) {
|
|
16221
16226
|
const defaultIsRowExpanded = (rowInfo) => {
|
|
16222
|
-
if (!rowInfo.isTreeNode || !rowInfo.isParentNode) {
|
|
16223
|
-
return false;
|
|
16224
|
-
}
|
|
16225
16227
|
return treeExpandState.isNodeExpanded(rowInfo.nodePath);
|
|
16226
16228
|
};
|
|
16227
16229
|
isNodeExpanded = defaultIsRowExpanded;
|
|
@@ -22197,7 +22199,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
22197
22199
|
}
|
|
22198
22200
|
let valid2 = isValidLicense(licenseKey, {
|
|
22199
22201
|
publishedAt: 1624970570587,
|
|
22200
|
-
version: "6.0.
|
|
22202
|
+
version: "6.0.10"
|
|
22201
22203
|
});
|
|
22202
22204
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
22203
22205
|
return true;
|
package/index.mjs
CHANGED
|
@@ -8061,10 +8061,12 @@ function ExpandCollapseIcon(props) {
|
|
|
8061
8061
|
setExpanded(props.expanded);
|
|
8062
8062
|
}
|
|
8063
8063
|
}, [props.expanded]);
|
|
8064
|
+
const currentState = expanded ? "expanded" : "collapsed";
|
|
8064
8065
|
return /* @__PURE__ */ React30.createElement(
|
|
8065
8066
|
"svg",
|
|
8066
8067
|
{
|
|
8067
8068
|
"data-name": "expand-collapse-icon",
|
|
8069
|
+
"data-state": currentState,
|
|
8068
8070
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8069
8071
|
height: `${size}px`,
|
|
8070
8072
|
viewBox: "0 0 24 24",
|
|
@@ -8081,7 +8083,7 @@ function ExpandCollapseIcon(props) {
|
|
|
8081
8083
|
}),
|
|
8082
8084
|
`${InfiniteIconClassName}`,
|
|
8083
8085
|
`${THIS_ICON}`,
|
|
8084
|
-
`${THIS_ICON}--${
|
|
8086
|
+
`${THIS_ICON}--${currentState}`,
|
|
8085
8087
|
`${THIS_ICON}--${direction === "end" ? "end" : "start"}`,
|
|
8086
8088
|
disabled ? `${THIS_ICON}--disabled` : ""
|
|
8087
8089
|
)
|
|
@@ -14851,10 +14853,10 @@ var TreeApiImpl = class {
|
|
|
14851
14853
|
return false;
|
|
14852
14854
|
}
|
|
14853
14855
|
if (isNodeCollapsed) {
|
|
14854
|
-
return !isNodeExpanded(rowInfo);
|
|
14856
|
+
return !isNodeExpanded(rowInfo, treeExpandState);
|
|
14855
14857
|
}
|
|
14856
14858
|
if (isNodeExpanded) {
|
|
14857
|
-
return isNodeExpanded(rowInfo);
|
|
14859
|
+
return isNodeExpanded(rowInfo, treeExpandState);
|
|
14858
14860
|
}
|
|
14859
14861
|
}
|
|
14860
14862
|
return treeExpandState.isNodeExpanded(nodePath);
|
|
@@ -15629,18 +15631,18 @@ var DataSourceApiImpl = class {
|
|
|
15629
15631
|
case "delete":
|
|
15630
15632
|
if (operation.primaryKeys) {
|
|
15631
15633
|
operation.primaryKeys.forEach((key) => {
|
|
15632
|
-
const
|
|
15633
|
-
if (
|
|
15634
|
-
cache.delete(key,
|
|
15634
|
+
const originalData = this.getDataByPrimaryKey(key);
|
|
15635
|
+
if (originalData) {
|
|
15636
|
+
cache.delete(key, originalData, operation.metadata);
|
|
15635
15637
|
}
|
|
15636
15638
|
});
|
|
15637
15639
|
} else if (operation.nodePaths) {
|
|
15638
15640
|
operation.nodePaths.forEach((nodePath2) => {
|
|
15639
|
-
const
|
|
15640
|
-
if (
|
|
15641
|
+
const originalData = this.getDataByNodePath(nodePath2);
|
|
15642
|
+
if (originalData) {
|
|
15641
15643
|
cache.deleteNodePath(
|
|
15642
15644
|
nodePath2,
|
|
15643
|
-
|
|
15645
|
+
originalData,
|
|
15644
15646
|
operation.metadata
|
|
15645
15647
|
);
|
|
15646
15648
|
}
|
|
@@ -16162,15 +16164,15 @@ function concludeReducer(params) {
|
|
|
16162
16164
|
state.selectionMode
|
|
16163
16165
|
);
|
|
16164
16166
|
}
|
|
16165
|
-
let isNodeExpanded
|
|
16167
|
+
let isNodeExpanded;
|
|
16168
|
+
if (state.isNodeExpanded) {
|
|
16169
|
+
isNodeExpanded = (rowInfo) => state.isNodeExpanded(rowInfo, treeExpandState);
|
|
16170
|
+
}
|
|
16166
16171
|
if (state.isNodeCollapsed) {
|
|
16167
|
-
isNodeExpanded = (rowInfo) => !state.isNodeExpanded(rowInfo);
|
|
16172
|
+
isNodeExpanded = (rowInfo) => !state.isNodeExpanded(rowInfo, treeExpandState);
|
|
16168
16173
|
}
|
|
16169
16174
|
if (!isNodeExpanded) {
|
|
16170
16175
|
const defaultIsRowExpanded = (rowInfo) => {
|
|
16171
|
-
if (!rowInfo.isTreeNode || !rowInfo.isParentNode) {
|
|
16172
|
-
return false;
|
|
16173
|
-
}
|
|
16174
16176
|
return treeExpandState.isNodeExpanded(rowInfo.nodePath);
|
|
16175
16177
|
};
|
|
16176
16178
|
isNodeExpanded = defaultIsRowExpanded;
|
|
@@ -22155,7 +22157,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
22155
22157
|
}
|
|
22156
22158
|
let valid2 = isValidLicense(licenseKey, {
|
|
22157
22159
|
publishedAt: 1624970570587,
|
|
22158
|
-
version: "6.0.
|
|
22160
|
+
version: "6.0.10"
|
|
22159
22161
|
});
|
|
22160
22162
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
22161
22163
|
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.
|
|
28
|
+
"version": "6.0.10",
|
|
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": 1730471230037
|
|
38
38
|
}
|