@infinite-table/infinite-react 6.0.9 → 6.0.11
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 +22 -17
- package/index.dev.mjs +22 -17
- package/index.js +22 -17
- package/index.mjs +22 -17
- 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,13 @@ 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,
|
|
8121
|
+
"data-disabled": disabled,
|
|
8119
8122
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8120
8123
|
height: `${size}px`,
|
|
8121
8124
|
viewBox: "0 0 24 24",
|
|
@@ -8132,7 +8135,7 @@ function ExpandCollapseIcon(props) {
|
|
|
8132
8135
|
}),
|
|
8133
8136
|
`${InfiniteIconClassName}`,
|
|
8134
8137
|
`${THIS_ICON}`,
|
|
8135
|
-
`${THIS_ICON}--${
|
|
8138
|
+
`${THIS_ICON}--${currentState}`,
|
|
8136
8139
|
`${THIS_ICON}--${direction === "end" ? "end" : "start"}`,
|
|
8137
8140
|
disabled ? `${THIS_ICON}--disabled` : ""
|
|
8138
8141
|
)
|
|
@@ -9184,7 +9187,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9184
9187
|
},
|
|
9185
9188
|
[rowIndex, rowDisabled, column.computedVisibleIndex, keyboardNavigation]
|
|
9186
9189
|
);
|
|
9187
|
-
const { selectionMode, cellSelection } = dataSourceState;
|
|
9190
|
+
const { selectionMode, cellSelection, isNodeReadOnly: isNodeReadOnly2 } = dataSourceState;
|
|
9188
9191
|
const cellSelected = renderParam.cellSelected;
|
|
9189
9192
|
renderParam.domRef = domRef;
|
|
9190
9193
|
renderParam.htmlElementRef = htmlElementRef;
|
|
@@ -9377,6 +9380,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9377
9380
|
hidden,
|
|
9378
9381
|
inEdit,
|
|
9379
9382
|
rowDetailState,
|
|
9383
|
+
column.renderTreeIcon || column.renderTreeIconForParentNode ? isNodeReadOnly2 : false,
|
|
9380
9384
|
...objectValuesExcept(renderParam, {
|
|
9381
9385
|
renderBag: true,
|
|
9382
9386
|
selectCell: true,
|
|
@@ -14902,10 +14906,10 @@ var TreeApiImpl = class {
|
|
|
14902
14906
|
return false;
|
|
14903
14907
|
}
|
|
14904
14908
|
if (isNodeCollapsed) {
|
|
14905
|
-
return !isNodeExpanded(rowInfo);
|
|
14909
|
+
return !isNodeExpanded(rowInfo, treeExpandState);
|
|
14906
14910
|
}
|
|
14907
14911
|
if (isNodeExpanded) {
|
|
14908
|
-
return isNodeExpanded(rowInfo);
|
|
14912
|
+
return isNodeExpanded(rowInfo, treeExpandState);
|
|
14909
14913
|
}
|
|
14910
14914
|
}
|
|
14911
14915
|
return treeExpandState.isNodeExpanded(nodePath);
|
|
@@ -15680,18 +15684,18 @@ var DataSourceApiImpl = class {
|
|
|
15680
15684
|
case "delete":
|
|
15681
15685
|
if (operation.primaryKeys) {
|
|
15682
15686
|
operation.primaryKeys.forEach((key) => {
|
|
15683
|
-
const
|
|
15684
|
-
if (
|
|
15685
|
-
cache.delete(key,
|
|
15687
|
+
const originalData = this.getDataByPrimaryKey(key);
|
|
15688
|
+
if (originalData) {
|
|
15689
|
+
cache.delete(key, originalData, operation.metadata);
|
|
15686
15690
|
}
|
|
15687
15691
|
});
|
|
15688
15692
|
} else if (operation.nodePaths) {
|
|
15689
15693
|
operation.nodePaths.forEach((nodePath2) => {
|
|
15690
|
-
const
|
|
15691
|
-
if (
|
|
15694
|
+
const originalData = this.getDataByNodePath(nodePath2);
|
|
15695
|
+
if (originalData) {
|
|
15692
15696
|
cache.deleteNodePath(
|
|
15693
15697
|
nodePath2,
|
|
15694
|
-
|
|
15698
|
+
originalData,
|
|
15695
15699
|
operation.metadata
|
|
15696
15700
|
);
|
|
15697
15701
|
}
|
|
@@ -16213,15 +16217,15 @@ function concludeReducer(params) {
|
|
|
16213
16217
|
state.selectionMode
|
|
16214
16218
|
);
|
|
16215
16219
|
}
|
|
16216
|
-
let isNodeExpanded
|
|
16220
|
+
let isNodeExpanded;
|
|
16221
|
+
if (state.isNodeExpanded) {
|
|
16222
|
+
isNodeExpanded = (rowInfo) => state.isNodeExpanded(rowInfo, treeExpandState);
|
|
16223
|
+
}
|
|
16217
16224
|
if (state.isNodeCollapsed) {
|
|
16218
|
-
isNodeExpanded = (rowInfo) => !state.isNodeExpanded(rowInfo);
|
|
16225
|
+
isNodeExpanded = (rowInfo) => !state.isNodeExpanded(rowInfo, treeExpandState);
|
|
16219
16226
|
}
|
|
16220
16227
|
if (!isNodeExpanded) {
|
|
16221
16228
|
const defaultIsRowExpanded = (rowInfo) => {
|
|
16222
|
-
if (!rowInfo.isTreeNode || !rowInfo.isParentNode) {
|
|
16223
|
-
return false;
|
|
16224
|
-
}
|
|
16225
16229
|
return treeExpandState.isNodeExpanded(rowInfo.nodePath);
|
|
16226
16230
|
};
|
|
16227
16231
|
isNodeExpanded = defaultIsRowExpanded;
|
|
@@ -19831,7 +19835,7 @@ function useCellRendering(param) {
|
|
|
19831
19835
|
componentActions: dataSourceActions,
|
|
19832
19836
|
api: dataSourceApi
|
|
19833
19837
|
} = useDataSourceContextValue();
|
|
19834
|
-
const { dataArray } = dataSourceState;
|
|
19838
|
+
const { dataArray, isNodeReadOnly: isNodeReadOnly2 } = dataSourceState;
|
|
19835
19839
|
const getData = useLatest(dataArray);
|
|
19836
19840
|
const {
|
|
19837
19841
|
rowHeight,
|
|
@@ -20005,6 +20009,7 @@ function useCellRendering(param) {
|
|
|
20005
20009
|
showZebraRows,
|
|
20006
20010
|
brain,
|
|
20007
20011
|
repaintId,
|
|
20012
|
+
isNodeReadOnly2,
|
|
20008
20013
|
rowStyle,
|
|
20009
20014
|
rowClassName,
|
|
20010
20015
|
cellClassName,
|
|
@@ -22197,7 +22202,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
22197
22202
|
}
|
|
22198
22203
|
let valid2 = isValidLicense(licenseKey, {
|
|
22199
22204
|
publishedAt: 1624970570587,
|
|
22200
|
-
version: "6.0.
|
|
22205
|
+
version: "6.0.11"
|
|
22201
22206
|
});
|
|
22202
22207
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
22203
22208
|
return true;
|
package/index.dev.mjs
CHANGED
|
@@ -8061,10 +8061,13 @@ 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,
|
|
8070
|
+
"data-disabled": disabled,
|
|
8068
8071
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8069
8072
|
height: `${size}px`,
|
|
8070
8073
|
viewBox: "0 0 24 24",
|
|
@@ -8081,7 +8084,7 @@ function ExpandCollapseIcon(props) {
|
|
|
8081
8084
|
}),
|
|
8082
8085
|
`${InfiniteIconClassName}`,
|
|
8083
8086
|
`${THIS_ICON}`,
|
|
8084
|
-
`${THIS_ICON}--${
|
|
8087
|
+
`${THIS_ICON}--${currentState}`,
|
|
8085
8088
|
`${THIS_ICON}--${direction === "end" ? "end" : "start"}`,
|
|
8086
8089
|
disabled ? `${THIS_ICON}--disabled` : ""
|
|
8087
8090
|
)
|
|
@@ -9133,7 +9136,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9133
9136
|
},
|
|
9134
9137
|
[rowIndex, rowDisabled, column.computedVisibleIndex, keyboardNavigation]
|
|
9135
9138
|
);
|
|
9136
|
-
const { selectionMode, cellSelection } = dataSourceState;
|
|
9139
|
+
const { selectionMode, cellSelection, isNodeReadOnly: isNodeReadOnly2 } = dataSourceState;
|
|
9137
9140
|
const cellSelected = renderParam.cellSelected;
|
|
9138
9141
|
renderParam.domRef = domRef;
|
|
9139
9142
|
renderParam.htmlElementRef = htmlElementRef;
|
|
@@ -9326,6 +9329,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9326
9329
|
hidden,
|
|
9327
9330
|
inEdit,
|
|
9328
9331
|
rowDetailState,
|
|
9332
|
+
column.renderTreeIcon || column.renderTreeIconForParentNode ? isNodeReadOnly2 : false,
|
|
9329
9333
|
...objectValuesExcept(renderParam, {
|
|
9330
9334
|
renderBag: true,
|
|
9331
9335
|
selectCell: true,
|
|
@@ -14851,10 +14855,10 @@ var TreeApiImpl = class {
|
|
|
14851
14855
|
return false;
|
|
14852
14856
|
}
|
|
14853
14857
|
if (isNodeCollapsed) {
|
|
14854
|
-
return !isNodeExpanded(rowInfo);
|
|
14858
|
+
return !isNodeExpanded(rowInfo, treeExpandState);
|
|
14855
14859
|
}
|
|
14856
14860
|
if (isNodeExpanded) {
|
|
14857
|
-
return isNodeExpanded(rowInfo);
|
|
14861
|
+
return isNodeExpanded(rowInfo, treeExpandState);
|
|
14858
14862
|
}
|
|
14859
14863
|
}
|
|
14860
14864
|
return treeExpandState.isNodeExpanded(nodePath);
|
|
@@ -15629,18 +15633,18 @@ var DataSourceApiImpl = class {
|
|
|
15629
15633
|
case "delete":
|
|
15630
15634
|
if (operation.primaryKeys) {
|
|
15631
15635
|
operation.primaryKeys.forEach((key) => {
|
|
15632
|
-
const
|
|
15633
|
-
if (
|
|
15634
|
-
cache.delete(key,
|
|
15636
|
+
const originalData = this.getDataByPrimaryKey(key);
|
|
15637
|
+
if (originalData) {
|
|
15638
|
+
cache.delete(key, originalData, operation.metadata);
|
|
15635
15639
|
}
|
|
15636
15640
|
});
|
|
15637
15641
|
} else if (operation.nodePaths) {
|
|
15638
15642
|
operation.nodePaths.forEach((nodePath2) => {
|
|
15639
|
-
const
|
|
15640
|
-
if (
|
|
15643
|
+
const originalData = this.getDataByNodePath(nodePath2);
|
|
15644
|
+
if (originalData) {
|
|
15641
15645
|
cache.deleteNodePath(
|
|
15642
15646
|
nodePath2,
|
|
15643
|
-
|
|
15647
|
+
originalData,
|
|
15644
15648
|
operation.metadata
|
|
15645
15649
|
);
|
|
15646
15650
|
}
|
|
@@ -16162,15 +16166,15 @@ function concludeReducer(params) {
|
|
|
16162
16166
|
state.selectionMode
|
|
16163
16167
|
);
|
|
16164
16168
|
}
|
|
16165
|
-
let isNodeExpanded
|
|
16169
|
+
let isNodeExpanded;
|
|
16170
|
+
if (state.isNodeExpanded) {
|
|
16171
|
+
isNodeExpanded = (rowInfo) => state.isNodeExpanded(rowInfo, treeExpandState);
|
|
16172
|
+
}
|
|
16166
16173
|
if (state.isNodeCollapsed) {
|
|
16167
|
-
isNodeExpanded = (rowInfo) => !state.isNodeExpanded(rowInfo);
|
|
16174
|
+
isNodeExpanded = (rowInfo) => !state.isNodeExpanded(rowInfo, treeExpandState);
|
|
16168
16175
|
}
|
|
16169
16176
|
if (!isNodeExpanded) {
|
|
16170
16177
|
const defaultIsRowExpanded = (rowInfo) => {
|
|
16171
|
-
if (!rowInfo.isTreeNode || !rowInfo.isParentNode) {
|
|
16172
|
-
return false;
|
|
16173
|
-
}
|
|
16174
16178
|
return treeExpandState.isNodeExpanded(rowInfo.nodePath);
|
|
16175
16179
|
};
|
|
16176
16180
|
isNodeExpanded = defaultIsRowExpanded;
|
|
@@ -19789,7 +19793,7 @@ function useCellRendering(param) {
|
|
|
19789
19793
|
componentActions: dataSourceActions,
|
|
19790
19794
|
api: dataSourceApi
|
|
19791
19795
|
} = useDataSourceContextValue();
|
|
19792
|
-
const { dataArray } = dataSourceState;
|
|
19796
|
+
const { dataArray, isNodeReadOnly: isNodeReadOnly2 } = dataSourceState;
|
|
19793
19797
|
const getData = useLatest(dataArray);
|
|
19794
19798
|
const {
|
|
19795
19799
|
rowHeight,
|
|
@@ -19963,6 +19967,7 @@ function useCellRendering(param) {
|
|
|
19963
19967
|
showZebraRows,
|
|
19964
19968
|
brain,
|
|
19965
19969
|
repaintId,
|
|
19970
|
+
isNodeReadOnly2,
|
|
19966
19971
|
rowStyle,
|
|
19967
19972
|
rowClassName,
|
|
19968
19973
|
cellClassName,
|
|
@@ -22155,7 +22160,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
22155
22160
|
}
|
|
22156
22161
|
let valid2 = isValidLicense(licenseKey, {
|
|
22157
22162
|
publishedAt: 1624970570587,
|
|
22158
|
-
version: "6.0.
|
|
22163
|
+
version: "6.0.11"
|
|
22159
22164
|
});
|
|
22160
22165
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
22161
22166
|
return true;
|
package/index.js
CHANGED
|
@@ -8112,10 +8112,13 @@ 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,
|
|
8121
|
+
"data-disabled": disabled,
|
|
8119
8122
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8120
8123
|
height: `${size}px`,
|
|
8121
8124
|
viewBox: "0 0 24 24",
|
|
@@ -8132,7 +8135,7 @@ function ExpandCollapseIcon(props) {
|
|
|
8132
8135
|
}),
|
|
8133
8136
|
`${InfiniteIconClassName}`,
|
|
8134
8137
|
`${THIS_ICON}`,
|
|
8135
|
-
`${THIS_ICON}--${
|
|
8138
|
+
`${THIS_ICON}--${currentState}`,
|
|
8136
8139
|
`${THIS_ICON}--${direction === "end" ? "end" : "start"}`,
|
|
8137
8140
|
disabled ? `${THIS_ICON}--disabled` : ""
|
|
8138
8141
|
)
|
|
@@ -9184,7 +9187,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9184
9187
|
},
|
|
9185
9188
|
[rowIndex, rowDisabled, column.computedVisibleIndex, keyboardNavigation]
|
|
9186
9189
|
);
|
|
9187
|
-
const { selectionMode, cellSelection } = dataSourceState;
|
|
9190
|
+
const { selectionMode, cellSelection, isNodeReadOnly: isNodeReadOnly2 } = dataSourceState;
|
|
9188
9191
|
const cellSelected = renderParam.cellSelected;
|
|
9189
9192
|
renderParam.domRef = domRef;
|
|
9190
9193
|
renderParam.htmlElementRef = htmlElementRef;
|
|
@@ -9377,6 +9380,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9377
9380
|
hidden,
|
|
9378
9381
|
inEdit,
|
|
9379
9382
|
rowDetailState,
|
|
9383
|
+
column.renderTreeIcon || column.renderTreeIconForParentNode ? isNodeReadOnly2 : false,
|
|
9380
9384
|
...objectValuesExcept(renderParam, {
|
|
9381
9385
|
renderBag: true,
|
|
9382
9386
|
selectCell: true,
|
|
@@ -14902,10 +14906,10 @@ var TreeApiImpl = class {
|
|
|
14902
14906
|
return false;
|
|
14903
14907
|
}
|
|
14904
14908
|
if (isNodeCollapsed) {
|
|
14905
|
-
return !isNodeExpanded(rowInfo);
|
|
14909
|
+
return !isNodeExpanded(rowInfo, treeExpandState);
|
|
14906
14910
|
}
|
|
14907
14911
|
if (isNodeExpanded) {
|
|
14908
|
-
return isNodeExpanded(rowInfo);
|
|
14912
|
+
return isNodeExpanded(rowInfo, treeExpandState);
|
|
14909
14913
|
}
|
|
14910
14914
|
}
|
|
14911
14915
|
return treeExpandState.isNodeExpanded(nodePath);
|
|
@@ -15680,18 +15684,18 @@ var DataSourceApiImpl = class {
|
|
|
15680
15684
|
case "delete":
|
|
15681
15685
|
if (operation.primaryKeys) {
|
|
15682
15686
|
operation.primaryKeys.forEach((key) => {
|
|
15683
|
-
const
|
|
15684
|
-
if (
|
|
15685
|
-
cache.delete(key,
|
|
15687
|
+
const originalData = this.getDataByPrimaryKey(key);
|
|
15688
|
+
if (originalData) {
|
|
15689
|
+
cache.delete(key, originalData, operation.metadata);
|
|
15686
15690
|
}
|
|
15687
15691
|
});
|
|
15688
15692
|
} else if (operation.nodePaths) {
|
|
15689
15693
|
operation.nodePaths.forEach((nodePath2) => {
|
|
15690
|
-
const
|
|
15691
|
-
if (
|
|
15694
|
+
const originalData = this.getDataByNodePath(nodePath2);
|
|
15695
|
+
if (originalData) {
|
|
15692
15696
|
cache.deleteNodePath(
|
|
15693
15697
|
nodePath2,
|
|
15694
|
-
|
|
15698
|
+
originalData,
|
|
15695
15699
|
operation.metadata
|
|
15696
15700
|
);
|
|
15697
15701
|
}
|
|
@@ -16213,15 +16217,15 @@ function concludeReducer(params) {
|
|
|
16213
16217
|
state.selectionMode
|
|
16214
16218
|
);
|
|
16215
16219
|
}
|
|
16216
|
-
let isNodeExpanded
|
|
16220
|
+
let isNodeExpanded;
|
|
16221
|
+
if (state.isNodeExpanded) {
|
|
16222
|
+
isNodeExpanded = (rowInfo) => state.isNodeExpanded(rowInfo, treeExpandState);
|
|
16223
|
+
}
|
|
16217
16224
|
if (state.isNodeCollapsed) {
|
|
16218
|
-
isNodeExpanded = (rowInfo) => !state.isNodeExpanded(rowInfo);
|
|
16225
|
+
isNodeExpanded = (rowInfo) => !state.isNodeExpanded(rowInfo, treeExpandState);
|
|
16219
16226
|
}
|
|
16220
16227
|
if (!isNodeExpanded) {
|
|
16221
16228
|
const defaultIsRowExpanded = (rowInfo) => {
|
|
16222
|
-
if (!rowInfo.isTreeNode || !rowInfo.isParentNode) {
|
|
16223
|
-
return false;
|
|
16224
|
-
}
|
|
16225
16229
|
return treeExpandState.isNodeExpanded(rowInfo.nodePath);
|
|
16226
16230
|
};
|
|
16227
16231
|
isNodeExpanded = defaultIsRowExpanded;
|
|
@@ -19831,7 +19835,7 @@ function useCellRendering(param) {
|
|
|
19831
19835
|
componentActions: dataSourceActions,
|
|
19832
19836
|
api: dataSourceApi
|
|
19833
19837
|
} = useDataSourceContextValue();
|
|
19834
|
-
const { dataArray } = dataSourceState;
|
|
19838
|
+
const { dataArray, isNodeReadOnly: isNodeReadOnly2 } = dataSourceState;
|
|
19835
19839
|
const getData = useLatest(dataArray);
|
|
19836
19840
|
const {
|
|
19837
19841
|
rowHeight,
|
|
@@ -20005,6 +20009,7 @@ function useCellRendering(param) {
|
|
|
20005
20009
|
showZebraRows,
|
|
20006
20010
|
brain,
|
|
20007
20011
|
repaintId,
|
|
20012
|
+
isNodeReadOnly2,
|
|
20008
20013
|
rowStyle,
|
|
20009
20014
|
rowClassName,
|
|
20010
20015
|
cellClassName,
|
|
@@ -22197,7 +22202,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
22197
22202
|
}
|
|
22198
22203
|
let valid2 = isValidLicense(licenseKey, {
|
|
22199
22204
|
publishedAt: 1624970570587,
|
|
22200
|
-
version: "6.0.
|
|
22205
|
+
version: "6.0.11"
|
|
22201
22206
|
});
|
|
22202
22207
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
22203
22208
|
return true;
|
package/index.mjs
CHANGED
|
@@ -8061,10 +8061,13 @@ 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,
|
|
8070
|
+
"data-disabled": disabled,
|
|
8068
8071
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8069
8072
|
height: `${size}px`,
|
|
8070
8073
|
viewBox: "0 0 24 24",
|
|
@@ -8081,7 +8084,7 @@ function ExpandCollapseIcon(props) {
|
|
|
8081
8084
|
}),
|
|
8082
8085
|
`${InfiniteIconClassName}`,
|
|
8083
8086
|
`${THIS_ICON}`,
|
|
8084
|
-
`${THIS_ICON}--${
|
|
8087
|
+
`${THIS_ICON}--${currentState}`,
|
|
8085
8088
|
`${THIS_ICON}--${direction === "end" ? "end" : "start"}`,
|
|
8086
8089
|
disabled ? `${THIS_ICON}--disabled` : ""
|
|
8087
8090
|
)
|
|
@@ -9133,7 +9136,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9133
9136
|
},
|
|
9134
9137
|
[rowIndex, rowDisabled, column.computedVisibleIndex, keyboardNavigation]
|
|
9135
9138
|
);
|
|
9136
|
-
const { selectionMode, cellSelection } = dataSourceState;
|
|
9139
|
+
const { selectionMode, cellSelection, isNodeReadOnly: isNodeReadOnly2 } = dataSourceState;
|
|
9137
9140
|
const cellSelected = renderParam.cellSelected;
|
|
9138
9141
|
renderParam.domRef = domRef;
|
|
9139
9142
|
renderParam.htmlElementRef = htmlElementRef;
|
|
@@ -9326,6 +9329,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9326
9329
|
hidden,
|
|
9327
9330
|
inEdit,
|
|
9328
9331
|
rowDetailState,
|
|
9332
|
+
column.renderTreeIcon || column.renderTreeIconForParentNode ? isNodeReadOnly2 : false,
|
|
9329
9333
|
...objectValuesExcept(renderParam, {
|
|
9330
9334
|
renderBag: true,
|
|
9331
9335
|
selectCell: true,
|
|
@@ -14851,10 +14855,10 @@ var TreeApiImpl = class {
|
|
|
14851
14855
|
return false;
|
|
14852
14856
|
}
|
|
14853
14857
|
if (isNodeCollapsed) {
|
|
14854
|
-
return !isNodeExpanded(rowInfo);
|
|
14858
|
+
return !isNodeExpanded(rowInfo, treeExpandState);
|
|
14855
14859
|
}
|
|
14856
14860
|
if (isNodeExpanded) {
|
|
14857
|
-
return isNodeExpanded(rowInfo);
|
|
14861
|
+
return isNodeExpanded(rowInfo, treeExpandState);
|
|
14858
14862
|
}
|
|
14859
14863
|
}
|
|
14860
14864
|
return treeExpandState.isNodeExpanded(nodePath);
|
|
@@ -15629,18 +15633,18 @@ var DataSourceApiImpl = class {
|
|
|
15629
15633
|
case "delete":
|
|
15630
15634
|
if (operation.primaryKeys) {
|
|
15631
15635
|
operation.primaryKeys.forEach((key) => {
|
|
15632
|
-
const
|
|
15633
|
-
if (
|
|
15634
|
-
cache.delete(key,
|
|
15636
|
+
const originalData = this.getDataByPrimaryKey(key);
|
|
15637
|
+
if (originalData) {
|
|
15638
|
+
cache.delete(key, originalData, operation.metadata);
|
|
15635
15639
|
}
|
|
15636
15640
|
});
|
|
15637
15641
|
} else if (operation.nodePaths) {
|
|
15638
15642
|
operation.nodePaths.forEach((nodePath2) => {
|
|
15639
|
-
const
|
|
15640
|
-
if (
|
|
15643
|
+
const originalData = this.getDataByNodePath(nodePath2);
|
|
15644
|
+
if (originalData) {
|
|
15641
15645
|
cache.deleteNodePath(
|
|
15642
15646
|
nodePath2,
|
|
15643
|
-
|
|
15647
|
+
originalData,
|
|
15644
15648
|
operation.metadata
|
|
15645
15649
|
);
|
|
15646
15650
|
}
|
|
@@ -16162,15 +16166,15 @@ function concludeReducer(params) {
|
|
|
16162
16166
|
state.selectionMode
|
|
16163
16167
|
);
|
|
16164
16168
|
}
|
|
16165
|
-
let isNodeExpanded
|
|
16169
|
+
let isNodeExpanded;
|
|
16170
|
+
if (state.isNodeExpanded) {
|
|
16171
|
+
isNodeExpanded = (rowInfo) => state.isNodeExpanded(rowInfo, treeExpandState);
|
|
16172
|
+
}
|
|
16166
16173
|
if (state.isNodeCollapsed) {
|
|
16167
|
-
isNodeExpanded = (rowInfo) => !state.isNodeExpanded(rowInfo);
|
|
16174
|
+
isNodeExpanded = (rowInfo) => !state.isNodeExpanded(rowInfo, treeExpandState);
|
|
16168
16175
|
}
|
|
16169
16176
|
if (!isNodeExpanded) {
|
|
16170
16177
|
const defaultIsRowExpanded = (rowInfo) => {
|
|
16171
|
-
if (!rowInfo.isTreeNode || !rowInfo.isParentNode) {
|
|
16172
|
-
return false;
|
|
16173
|
-
}
|
|
16174
16178
|
return treeExpandState.isNodeExpanded(rowInfo.nodePath);
|
|
16175
16179
|
};
|
|
16176
16180
|
isNodeExpanded = defaultIsRowExpanded;
|
|
@@ -19789,7 +19793,7 @@ function useCellRendering(param) {
|
|
|
19789
19793
|
componentActions: dataSourceActions,
|
|
19790
19794
|
api: dataSourceApi
|
|
19791
19795
|
} = useDataSourceContextValue();
|
|
19792
|
-
const { dataArray } = dataSourceState;
|
|
19796
|
+
const { dataArray, isNodeReadOnly: isNodeReadOnly2 } = dataSourceState;
|
|
19793
19797
|
const getData = useLatest(dataArray);
|
|
19794
19798
|
const {
|
|
19795
19799
|
rowHeight,
|
|
@@ -19963,6 +19967,7 @@ function useCellRendering(param) {
|
|
|
19963
19967
|
showZebraRows,
|
|
19964
19968
|
brain,
|
|
19965
19969
|
repaintId,
|
|
19970
|
+
isNodeReadOnly2,
|
|
19966
19971
|
rowStyle,
|
|
19967
19972
|
rowClassName,
|
|
19968
19973
|
cellClassName,
|
|
@@ -22155,7 +22160,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
22155
22160
|
}
|
|
22156
22161
|
let valid2 = isValidLicense(licenseKey, {
|
|
22157
22162
|
publishedAt: 1624970570587,
|
|
22158
|
-
version: "6.0.
|
|
22163
|
+
version: "6.0.11"
|
|
22159
22164
|
});
|
|
22160
22165
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
22161
22166
|
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.11",
|
|
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": 1730473416383
|
|
38
38
|
}
|