@infinite-table/infinite-react 6.0.10 → 6.0.12
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 -1
- package/index.dev.js +23 -3
- package/index.dev.mjs +23 -3
- package/index.js +23 -3
- package/index.mjs +23 -3
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -2600,6 +2600,7 @@ declare type DataSourceInsertParam = DataSourceCRUDParam & ({
|
|
|
2600
2600
|
position: 'start' | 'end';
|
|
2601
2601
|
nodePath: NodePath$1;
|
|
2602
2602
|
});
|
|
2603
|
+
declare type UpdateChildrenFn<T> = (dataChildren: T[] | undefined | null, data: T) => T[] | undefined | null;
|
|
2603
2604
|
interface DataSourceApi<T> {
|
|
2604
2605
|
getOriginalDataArray: () => T[];
|
|
2605
2606
|
getRowInfoArray: () => InfiniteTableRowInfo<T>[];
|
|
@@ -2617,6 +2618,7 @@ interface DataSourceApi<T> {
|
|
|
2617
2618
|
get treeApi(): TreeApi<T>;
|
|
2618
2619
|
updateData(data: Partial<T>, options?: DataSourceCRUDParam): Promise<any>;
|
|
2619
2620
|
updateDataByNodePath(data: Partial<T>, nodePath: NodePath$1, options?: DataSourceUpdateParam): Promise<any>;
|
|
2621
|
+
updateChildrenByNodePath(childrenOrFn: T[] | undefined | null | UpdateChildrenFn<T>, nodePath: NodePath$1, options?: DataSourceUpdateParam): Promise<any>;
|
|
2620
2622
|
updateDataArray(data: Partial<T>[], options?: DataSourceCRUDParam): Promise<any>;
|
|
2621
2623
|
updateDataArrayByNodePath(updateInfo: {
|
|
2622
2624
|
data: Partial<T>;
|
|
@@ -6979,4 +6981,4 @@ declare const components: {
|
|
|
6979
6981
|
NumberFilterEditor: typeof NumberFilterEditor;
|
|
6980
6982
|
};
|
|
6981
6983
|
|
|
6982
|
-
export { AdvancedAlignable, CellSelectionState, CellSelectionStateObject, ColumnTypeWithInherit, DataClient, DataSource, DataSourceAction, DataSourceActionType, DataSourceAggregationReducer, DataSourceApi, DataSourceCRUDParam, DataSourceCallback_BaseParam, DataSourceComponentActions, DataSourceContextValue, DataSourceData, DataSourceDataParams, DataSourceDataParamsChanges, DataSourceDerivedState, DataSourceFilterFunctionParam, DataSourceFilterOperator, DataSourceFilterOperatorFunction, DataSourceFilterOperatorFunctionParam, DataSourceFilterType, DataSourceFilterValueItem, DataSourceFilterValueItemValueGetter, DataSourceGroupBy, DataSourceGroupRowsList, DataSourceInsertParam, DataSourceLivePaginationCursorFn, DataSourceLivePaginationCursorParams, DataSourceLivePaginationCursorValue, DataSourceMappedState, DataSourceMappings, DataSourceMasterDetailContextValue, DataSourcePivotBy, DataSourcePropAggregationReducers, DataSourcePropCellSelection, DataSourcePropCellSelection_MultiCell, DataSourcePropCellSelection_SingleCell, DataSourcePropFilterFunction, DataSourcePropFilterTypes, DataSourcePropFilterValue, DataSourcePropGroupBy, DataSourcePropGroupRowsStateObject, DataSourcePropIsNodeExpanded, DataSourcePropIsNodeReadOnly, DataSourcePropIsNodeSelectable, DataSourcePropIsNodeSelected, DataSourcePropIsRowSelected, DataSourcePropLivePaginationCursor, DataSourcePropMultiRowSelectionChangeParamType, DataSourcePropOnCellSelectionChange, DataSourcePropOnCellSelectionChange_MultiCell, DataSourcePropOnCellSelectionChange_SingleCell, DataSourcePropOnRowSelectionChange, DataSourcePropOnRowSelectionChange_MultiRow, DataSourcePropOnRowSelectionChange_SingleRow, DataSourcePropOnTreeSelectionChange, DataSourcePropOnTreeSelectionChange_MultiNode, DataSourcePropOnTreeSelectionChange_SingleNode, DataSourcePropPivotBy, DataSourcePropRowInfoReducers, DataSourcePropRowSelection, DataSourcePropRowSelection_MultiRow, DataSourcePropRowSelection_SingleRow, DataSourcePropSelectionMode, DataSourcePropShouldReloadData, DataSourcePropShouldReloadDataObject, DataSourcePropSortFn, DataSourcePropSortInfo, DataSourcePropSortTypes, DataSourcePropTreeSelection, DataSourcePropTreeSelection_MultiNode, DataSourcePropTreeSelection_SingleNode, DataSourceProps, DataSourcePropsNotAvailableInTreeDataSource, DataSourcePropsWithChildren, DataSourceRawReducer, DataSourceRemoteData, DataSourceRowInfoReducer, DataSourceSetupState, DataSourceSingleSortInfo, DataSourceSortInfo, DataSourceState, DataSourceUpdateParam, DebugLogger, DeepMap, ElementContainerGetter, FixedSizeSet, FlashingColumnCell, GroupRowsState, InfiniteColumnEditorContextType, InfiniteTable, InfiniteTableAction, InfiniteTableActionType, InfiniteTableApi, InfiniteTableClassName, InfiniteTableColumn, InfiniteTableColumnAggregator, InfiniteTableColumnApi, InfiniteTableColumnCellContextType, InfiniteTableColumnComparer, InfiniteTableColumnGroup, InfiniteTableColumnRenderFunctionForGroupRows, InfiniteTableColumnRenderFunctionForNormalRows, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanParam, InfiniteTableColumnSizingOptions, InfiniteTableColumnValueFormatterParams, InfiniteTableColumnValueGetterParams, InfiniteTableComponent, InfiniteTableComputedColumn, InfiniteTableComputedValues, InfiniteTableContextValue, InfiniteTableGroupColumnBase, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTablePivotColumn, InfiniteTablePropAutoSizeColumnsKey, InfiniteTablePropColumnGroupVisibility, InfiniteTablePropColumnGroups, InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnVisibility, InfiniteTablePropColumns, InfiniteTablePropComponents, InfiniteTablePropGetCellContextMenuItems, InfiniteTablePropGetColumnMenuItems, InfiniteTablePropGetContextMenuItems, InfiniteTablePropGroupColumn, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropHeaderOptions, InfiniteTablePropKeyboardNavigation, InfiniteTablePropKeyboardShorcut, InfiniteTablePropMultiSortBehavior, InfiniteTablePropRowClassName, InfiniteTablePropRowStyle, InfiniteTableProps, InfiniteTablePropsNotAvailableInTreeGrid, InfiniteTableRowClassNameFn, InfiniteTableRowInfo, InfiniteTableRowStyleFn, InfiniteTableState, InfiniteTable_HasGrouping_RowInfoGroup, InfiniteTable_HasGrouping_RowInfoNormal, InfiniteTable_Tree_RowInfoLeafNode, InfiniteTable_Tree_RowInfoNode, InfiniteTable_Tree_RowInfoParentNode, LazyGroupDataDeepMap, LazyGroupDataItem, LazyRowInfoGroup, Menu, MenuChildrenFnParam, MenuColumn, MenuColumnRenderParam, MenuDecoration, MenuIconProps, MenuItemActionContext, MenuItemDefinition, MenuItemObject, MenuProps, MenuRenderable, MenuRuntimeItem, MenuRuntimeItemSelectable, MenuSeparator, OverlayShowParams, RowDetailCache, RowDetailState, RowDetailStateObject, RowDisabledState, RowDisabledStateObject, RowSelectionState, ScrollStopInfo, Scrollbars, ShowOverlayFn, TableRenderRange, TreeDataSource, TreeDataSourceProps, TreeExpandState, TreeExpandStateValue, TreeGrid, TreeGridOnlyProps, TreeGridProps, TreeSelectionState, TreeSelectionValue, UpdateOverlayContentFn, WeakFixedSizeSet, alignNode, components, createFlashingColumnCellComponent, debounce, debug, defaultFilterTypes, eventMatchesKeyboardShortcut, defaultFilterTypes as filterTypes, flatten, buildManagedComponent as getComponentStateRoot, group, interceptMap, keyboardShortcuts, multisort, multisortNested, queryKeyToCacheKey, toTreeDataArray, useManagedComponentState as useComponentState, useDataSourceInternal, useDataSourceState, useEffectWhen, useEffectWhenSameDeps, useEffectWithChanges, useEffectWithObject, useGridScroll, useInfiniteColumnCell, useInfiniteColumnEditor, useInfiniteColumnFilterEditor, useInfiniteHeaderCell, useInfinitePortalContainer, useManagedDataSource, useMasterRowInfo, useOverlay, useOverlayPortal, usePrevious, useRowInfoReducers, useVisibleColumnSizes };
|
|
6984
|
+
export { AdvancedAlignable, CellSelectionState, CellSelectionStateObject, ColumnTypeWithInherit, DataClient, DataSource, DataSourceAction, DataSourceActionType, DataSourceAggregationReducer, DataSourceApi, DataSourceCRUDParam, DataSourceCallback_BaseParam, DataSourceComponentActions, DataSourceContextValue, DataSourceData, DataSourceDataParams, DataSourceDataParamsChanges, DataSourceDerivedState, DataSourceFilterFunctionParam, DataSourceFilterOperator, DataSourceFilterOperatorFunction, DataSourceFilterOperatorFunctionParam, DataSourceFilterType, DataSourceFilterValueItem, DataSourceFilterValueItemValueGetter, DataSourceGroupBy, DataSourceGroupRowsList, DataSourceInsertParam, DataSourceLivePaginationCursorFn, DataSourceLivePaginationCursorParams, DataSourceLivePaginationCursorValue, DataSourceMappedState, DataSourceMappings, DataSourceMasterDetailContextValue, DataSourcePivotBy, DataSourcePropAggregationReducers, DataSourcePropCellSelection, DataSourcePropCellSelection_MultiCell, DataSourcePropCellSelection_SingleCell, DataSourcePropFilterFunction, DataSourcePropFilterTypes, DataSourcePropFilterValue, DataSourcePropGroupBy, DataSourcePropGroupRowsStateObject, DataSourcePropIsNodeExpanded, DataSourcePropIsNodeReadOnly, DataSourcePropIsNodeSelectable, DataSourcePropIsNodeSelected, DataSourcePropIsRowSelected, DataSourcePropLivePaginationCursor, DataSourcePropMultiRowSelectionChangeParamType, DataSourcePropOnCellSelectionChange, DataSourcePropOnCellSelectionChange_MultiCell, DataSourcePropOnCellSelectionChange_SingleCell, DataSourcePropOnRowSelectionChange, DataSourcePropOnRowSelectionChange_MultiRow, DataSourcePropOnRowSelectionChange_SingleRow, DataSourcePropOnTreeSelectionChange, DataSourcePropOnTreeSelectionChange_MultiNode, DataSourcePropOnTreeSelectionChange_SingleNode, DataSourcePropPivotBy, DataSourcePropRowInfoReducers, DataSourcePropRowSelection, DataSourcePropRowSelection_MultiRow, DataSourcePropRowSelection_SingleRow, DataSourcePropSelectionMode, DataSourcePropShouldReloadData, DataSourcePropShouldReloadDataObject, DataSourcePropSortFn, DataSourcePropSortInfo, DataSourcePropSortTypes, DataSourcePropTreeSelection, DataSourcePropTreeSelection_MultiNode, DataSourcePropTreeSelection_SingleNode, DataSourceProps, DataSourcePropsNotAvailableInTreeDataSource, DataSourcePropsWithChildren, DataSourceRawReducer, DataSourceRemoteData, DataSourceRowInfoReducer, DataSourceSetupState, DataSourceSingleSortInfo, DataSourceSortInfo, DataSourceState, DataSourceUpdateParam, DebugLogger, DeepMap, ElementContainerGetter, FixedSizeSet, FlashingColumnCell, GroupRowsState, InfiniteColumnEditorContextType, InfiniteTable, InfiniteTableAction, InfiniteTableActionType, InfiniteTableApi, InfiniteTableClassName, InfiniteTableColumn, InfiniteTableColumnAggregator, InfiniteTableColumnApi, InfiniteTableColumnCellContextType, InfiniteTableColumnComparer, InfiniteTableColumnGroup, InfiniteTableColumnRenderFunctionForGroupRows, InfiniteTableColumnRenderFunctionForNormalRows, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanParam, InfiniteTableColumnSizingOptions, InfiniteTableColumnValueFormatterParams, InfiniteTableColumnValueGetterParams, InfiniteTableComponent, InfiniteTableComputedColumn, InfiniteTableComputedValues, InfiniteTableContextValue, InfiniteTableGroupColumnBase, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTablePivotColumn, InfiniteTablePropAutoSizeColumnsKey, InfiniteTablePropColumnGroupVisibility, InfiniteTablePropColumnGroups, InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnVisibility, InfiniteTablePropColumns, InfiniteTablePropComponents, InfiniteTablePropGetCellContextMenuItems, InfiniteTablePropGetColumnMenuItems, InfiniteTablePropGetContextMenuItems, InfiniteTablePropGroupColumn, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropHeaderOptions, InfiniteTablePropKeyboardNavigation, InfiniteTablePropKeyboardShorcut, InfiniteTablePropMultiSortBehavior, InfiniteTablePropRowClassName, InfiniteTablePropRowStyle, InfiniteTableProps, InfiniteTablePropsNotAvailableInTreeGrid, InfiniteTableRowClassNameFn, InfiniteTableRowInfo, InfiniteTableRowStyleFn, InfiniteTableState, InfiniteTable_HasGrouping_RowInfoGroup, InfiniteTable_HasGrouping_RowInfoNormal, InfiniteTable_Tree_RowInfoLeafNode, InfiniteTable_Tree_RowInfoNode, InfiniteTable_Tree_RowInfoParentNode, LazyGroupDataDeepMap, LazyGroupDataItem, LazyRowInfoGroup, Menu, MenuChildrenFnParam, MenuColumn, MenuColumnRenderParam, MenuDecoration, MenuIconProps, MenuItemActionContext, MenuItemDefinition, MenuItemObject, MenuProps, MenuRenderable, MenuRuntimeItem, MenuRuntimeItemSelectable, MenuSeparator, OverlayShowParams, RowDetailCache, RowDetailState, RowDetailStateObject, RowDisabledState, RowDisabledStateObject, RowSelectionState, ScrollStopInfo, Scrollbars, ShowOverlayFn, TableRenderRange, TreeDataSource, TreeDataSourceProps, TreeExpandState, TreeExpandStateValue, TreeGrid, TreeGridOnlyProps, TreeGridProps, TreeSelectionState, TreeSelectionValue, UpdateChildrenFn, UpdateOverlayContentFn, WeakFixedSizeSet, alignNode, components, createFlashingColumnCellComponent, debounce, debug, defaultFilterTypes, eventMatchesKeyboardShortcut, defaultFilterTypes as filterTypes, flatten, buildManagedComponent as getComponentStateRoot, group, interceptMap, keyboardShortcuts, multisort, multisortNested, queryKeyToCacheKey, toTreeDataArray, useManagedComponentState as useComponentState, useDataSourceInternal, useDataSourceState, useEffectWhen, useEffectWhenSameDeps, useEffectWithChanges, useEffectWithObject, useGridScroll, useInfiniteColumnCell, useInfiniteColumnEditor, useInfiniteColumnFilterEditor, useInfiniteHeaderCell, useInfinitePortalContainer, useManagedDataSource, useMasterRowInfo, useOverlay, useOverlayPortal, usePrevious, useRowInfoReducers, useVisibleColumnSizes };
|
package/index.dev.js
CHANGED
|
@@ -8118,6 +8118,7 @@ function ExpandCollapseIcon(props) {
|
|
|
8118
8118
|
{
|
|
8119
8119
|
"data-name": "expand-collapse-icon",
|
|
8120
8120
|
"data-state": currentState,
|
|
8121
|
+
"data-disabled": disabled,
|
|
8121
8122
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8122
8123
|
height: `${size}px`,
|
|
8123
8124
|
viewBox: "0 0 24 24",
|
|
@@ -9186,7 +9187,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9186
9187
|
},
|
|
9187
9188
|
[rowIndex, rowDisabled, column.computedVisibleIndex, keyboardNavigation]
|
|
9188
9189
|
);
|
|
9189
|
-
const { selectionMode, cellSelection } = dataSourceState;
|
|
9190
|
+
const { selectionMode, cellSelection, isNodeReadOnly: isNodeReadOnly2 } = dataSourceState;
|
|
9190
9191
|
const cellSelected = renderParam.cellSelected;
|
|
9191
9192
|
renderParam.domRef = domRef;
|
|
9192
9193
|
renderParam.htmlElementRef = htmlElementRef;
|
|
@@ -9379,6 +9380,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9379
9380
|
hidden,
|
|
9380
9381
|
inEdit,
|
|
9381
9382
|
rowDetailState,
|
|
9383
|
+
column.renderTreeIcon || column.renderTreeIconForParentNode ? isNodeReadOnly2 : false,
|
|
9382
9384
|
...objectValuesExcept(renderParam, {
|
|
9383
9385
|
renderBag: true,
|
|
9384
9386
|
selectCell: true,
|
|
@@ -15381,6 +15383,23 @@ var DataSourceApiImpl = class {
|
|
|
15381
15383
|
}
|
|
15382
15384
|
return result;
|
|
15383
15385
|
};
|
|
15386
|
+
this.updateChildrenByNodePath = (childrenOrFn, nodePath, options) => {
|
|
15387
|
+
const data = this.getDataByNodePath(nodePath);
|
|
15388
|
+
if (data == null) {
|
|
15389
|
+
return Promise.resolve(null);
|
|
15390
|
+
}
|
|
15391
|
+
const nodesKey = this.getState().nodesKey;
|
|
15392
|
+
const dataChildren = data[nodesKey];
|
|
15393
|
+
const children = typeof childrenOrFn === "function" ? childrenOrFn(dataChildren, data) : childrenOrFn;
|
|
15394
|
+
return this.updateDataByNodePath(
|
|
15395
|
+
{
|
|
15396
|
+
...data,
|
|
15397
|
+
[nodesKey]: children
|
|
15398
|
+
},
|
|
15399
|
+
nodePath,
|
|
15400
|
+
options
|
|
15401
|
+
);
|
|
15402
|
+
};
|
|
15384
15403
|
this.updateDataByNodePath = (data, nodePath, options) => {
|
|
15385
15404
|
return this.updateDataArrayByNodePath(
|
|
15386
15405
|
[
|
|
@@ -19833,7 +19852,7 @@ function useCellRendering(param) {
|
|
|
19833
19852
|
componentActions: dataSourceActions,
|
|
19834
19853
|
api: dataSourceApi
|
|
19835
19854
|
} = useDataSourceContextValue();
|
|
19836
|
-
const { dataArray } = dataSourceState;
|
|
19855
|
+
const { dataArray, isNodeReadOnly: isNodeReadOnly2 } = dataSourceState;
|
|
19837
19856
|
const getData = useLatest(dataArray);
|
|
19838
19857
|
const {
|
|
19839
19858
|
rowHeight,
|
|
@@ -20007,6 +20026,7 @@ function useCellRendering(param) {
|
|
|
20007
20026
|
showZebraRows,
|
|
20008
20027
|
brain,
|
|
20009
20028
|
repaintId,
|
|
20029
|
+
isNodeReadOnly2,
|
|
20010
20030
|
rowStyle,
|
|
20011
20031
|
rowClassName,
|
|
20012
20032
|
cellClassName,
|
|
@@ -22199,7 +22219,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
22199
22219
|
}
|
|
22200
22220
|
let valid2 = isValidLicense(licenseKey, {
|
|
22201
22221
|
publishedAt: 1624970570587,
|
|
22202
|
-
version: "6.0.
|
|
22222
|
+
version: "6.0.12"
|
|
22203
22223
|
});
|
|
22204
22224
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
22205
22225
|
return true;
|
package/index.dev.mjs
CHANGED
|
@@ -8067,6 +8067,7 @@ function ExpandCollapseIcon(props) {
|
|
|
8067
8067
|
{
|
|
8068
8068
|
"data-name": "expand-collapse-icon",
|
|
8069
8069
|
"data-state": currentState,
|
|
8070
|
+
"data-disabled": disabled,
|
|
8070
8071
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8071
8072
|
height: `${size}px`,
|
|
8072
8073
|
viewBox: "0 0 24 24",
|
|
@@ -9135,7 +9136,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9135
9136
|
},
|
|
9136
9137
|
[rowIndex, rowDisabled, column.computedVisibleIndex, keyboardNavigation]
|
|
9137
9138
|
);
|
|
9138
|
-
const { selectionMode, cellSelection } = dataSourceState;
|
|
9139
|
+
const { selectionMode, cellSelection, isNodeReadOnly: isNodeReadOnly2 } = dataSourceState;
|
|
9139
9140
|
const cellSelected = renderParam.cellSelected;
|
|
9140
9141
|
renderParam.domRef = domRef;
|
|
9141
9142
|
renderParam.htmlElementRef = htmlElementRef;
|
|
@@ -9328,6 +9329,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9328
9329
|
hidden,
|
|
9329
9330
|
inEdit,
|
|
9330
9331
|
rowDetailState,
|
|
9332
|
+
column.renderTreeIcon || column.renderTreeIconForParentNode ? isNodeReadOnly2 : false,
|
|
9331
9333
|
...objectValuesExcept(renderParam, {
|
|
9332
9334
|
renderBag: true,
|
|
9333
9335
|
selectCell: true,
|
|
@@ -15330,6 +15332,23 @@ var DataSourceApiImpl = class {
|
|
|
15330
15332
|
}
|
|
15331
15333
|
return result;
|
|
15332
15334
|
};
|
|
15335
|
+
this.updateChildrenByNodePath = (childrenOrFn, nodePath, options) => {
|
|
15336
|
+
const data = this.getDataByNodePath(nodePath);
|
|
15337
|
+
if (data == null) {
|
|
15338
|
+
return Promise.resolve(null);
|
|
15339
|
+
}
|
|
15340
|
+
const nodesKey = this.getState().nodesKey;
|
|
15341
|
+
const dataChildren = data[nodesKey];
|
|
15342
|
+
const children = typeof childrenOrFn === "function" ? childrenOrFn(dataChildren, data) : childrenOrFn;
|
|
15343
|
+
return this.updateDataByNodePath(
|
|
15344
|
+
{
|
|
15345
|
+
...data,
|
|
15346
|
+
[nodesKey]: children
|
|
15347
|
+
},
|
|
15348
|
+
nodePath,
|
|
15349
|
+
options
|
|
15350
|
+
);
|
|
15351
|
+
};
|
|
15333
15352
|
this.updateDataByNodePath = (data, nodePath, options) => {
|
|
15334
15353
|
return this.updateDataArrayByNodePath(
|
|
15335
15354
|
[
|
|
@@ -19791,7 +19810,7 @@ function useCellRendering(param) {
|
|
|
19791
19810
|
componentActions: dataSourceActions,
|
|
19792
19811
|
api: dataSourceApi
|
|
19793
19812
|
} = useDataSourceContextValue();
|
|
19794
|
-
const { dataArray } = dataSourceState;
|
|
19813
|
+
const { dataArray, isNodeReadOnly: isNodeReadOnly2 } = dataSourceState;
|
|
19795
19814
|
const getData = useLatest(dataArray);
|
|
19796
19815
|
const {
|
|
19797
19816
|
rowHeight,
|
|
@@ -19965,6 +19984,7 @@ function useCellRendering(param) {
|
|
|
19965
19984
|
showZebraRows,
|
|
19966
19985
|
brain,
|
|
19967
19986
|
repaintId,
|
|
19987
|
+
isNodeReadOnly2,
|
|
19968
19988
|
rowStyle,
|
|
19969
19989
|
rowClassName,
|
|
19970
19990
|
cellClassName,
|
|
@@ -22157,7 +22177,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
22157
22177
|
}
|
|
22158
22178
|
let valid2 = isValidLicense(licenseKey, {
|
|
22159
22179
|
publishedAt: 1624970570587,
|
|
22160
|
-
version: "6.0.
|
|
22180
|
+
version: "6.0.12"
|
|
22161
22181
|
});
|
|
22162
22182
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
22163
22183
|
return true;
|
package/index.js
CHANGED
|
@@ -8118,6 +8118,7 @@ function ExpandCollapseIcon(props) {
|
|
|
8118
8118
|
{
|
|
8119
8119
|
"data-name": "expand-collapse-icon",
|
|
8120
8120
|
"data-state": currentState,
|
|
8121
|
+
"data-disabled": disabled,
|
|
8121
8122
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8122
8123
|
height: `${size}px`,
|
|
8123
8124
|
viewBox: "0 0 24 24",
|
|
@@ -9186,7 +9187,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9186
9187
|
},
|
|
9187
9188
|
[rowIndex, rowDisabled, column.computedVisibleIndex, keyboardNavigation]
|
|
9188
9189
|
);
|
|
9189
|
-
const { selectionMode, cellSelection } = dataSourceState;
|
|
9190
|
+
const { selectionMode, cellSelection, isNodeReadOnly: isNodeReadOnly2 } = dataSourceState;
|
|
9190
9191
|
const cellSelected = renderParam.cellSelected;
|
|
9191
9192
|
renderParam.domRef = domRef;
|
|
9192
9193
|
renderParam.htmlElementRef = htmlElementRef;
|
|
@@ -9379,6 +9380,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9379
9380
|
hidden,
|
|
9380
9381
|
inEdit,
|
|
9381
9382
|
rowDetailState,
|
|
9383
|
+
column.renderTreeIcon || column.renderTreeIconForParentNode ? isNodeReadOnly2 : false,
|
|
9382
9384
|
...objectValuesExcept(renderParam, {
|
|
9383
9385
|
renderBag: true,
|
|
9384
9386
|
selectCell: true,
|
|
@@ -15381,6 +15383,23 @@ var DataSourceApiImpl = class {
|
|
|
15381
15383
|
}
|
|
15382
15384
|
return result;
|
|
15383
15385
|
};
|
|
15386
|
+
this.updateChildrenByNodePath = (childrenOrFn, nodePath, options) => {
|
|
15387
|
+
const data = this.getDataByNodePath(nodePath);
|
|
15388
|
+
if (data == null) {
|
|
15389
|
+
return Promise.resolve(null);
|
|
15390
|
+
}
|
|
15391
|
+
const nodesKey = this.getState().nodesKey;
|
|
15392
|
+
const dataChildren = data[nodesKey];
|
|
15393
|
+
const children = typeof childrenOrFn === "function" ? childrenOrFn(dataChildren, data) : childrenOrFn;
|
|
15394
|
+
return this.updateDataByNodePath(
|
|
15395
|
+
{
|
|
15396
|
+
...data,
|
|
15397
|
+
[nodesKey]: children
|
|
15398
|
+
},
|
|
15399
|
+
nodePath,
|
|
15400
|
+
options
|
|
15401
|
+
);
|
|
15402
|
+
};
|
|
15384
15403
|
this.updateDataByNodePath = (data, nodePath, options) => {
|
|
15385
15404
|
return this.updateDataArrayByNodePath(
|
|
15386
15405
|
[
|
|
@@ -19833,7 +19852,7 @@ function useCellRendering(param) {
|
|
|
19833
19852
|
componentActions: dataSourceActions,
|
|
19834
19853
|
api: dataSourceApi
|
|
19835
19854
|
} = useDataSourceContextValue();
|
|
19836
|
-
const { dataArray } = dataSourceState;
|
|
19855
|
+
const { dataArray, isNodeReadOnly: isNodeReadOnly2 } = dataSourceState;
|
|
19837
19856
|
const getData = useLatest(dataArray);
|
|
19838
19857
|
const {
|
|
19839
19858
|
rowHeight,
|
|
@@ -20007,6 +20026,7 @@ function useCellRendering(param) {
|
|
|
20007
20026
|
showZebraRows,
|
|
20008
20027
|
brain,
|
|
20009
20028
|
repaintId,
|
|
20029
|
+
isNodeReadOnly2,
|
|
20010
20030
|
rowStyle,
|
|
20011
20031
|
rowClassName,
|
|
20012
20032
|
cellClassName,
|
|
@@ -22199,7 +22219,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
22199
22219
|
}
|
|
22200
22220
|
let valid2 = isValidLicense(licenseKey, {
|
|
22201
22221
|
publishedAt: 1624970570587,
|
|
22202
|
-
version: "6.0.
|
|
22222
|
+
version: "6.0.12"
|
|
22203
22223
|
});
|
|
22204
22224
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
22205
22225
|
return true;
|
package/index.mjs
CHANGED
|
@@ -8067,6 +8067,7 @@ function ExpandCollapseIcon(props) {
|
|
|
8067
8067
|
{
|
|
8068
8068
|
"data-name": "expand-collapse-icon",
|
|
8069
8069
|
"data-state": currentState,
|
|
8070
|
+
"data-disabled": disabled,
|
|
8070
8071
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8071
8072
|
height: `${size}px`,
|
|
8072
8073
|
viewBox: "0 0 24 24",
|
|
@@ -9135,7 +9136,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9135
9136
|
},
|
|
9136
9137
|
[rowIndex, rowDisabled, column.computedVisibleIndex, keyboardNavigation]
|
|
9137
9138
|
);
|
|
9138
|
-
const { selectionMode, cellSelection } = dataSourceState;
|
|
9139
|
+
const { selectionMode, cellSelection, isNodeReadOnly: isNodeReadOnly2 } = dataSourceState;
|
|
9139
9140
|
const cellSelected = renderParam.cellSelected;
|
|
9140
9141
|
renderParam.domRef = domRef;
|
|
9141
9142
|
renderParam.htmlElementRef = htmlElementRef;
|
|
@@ -9328,6 +9329,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9328
9329
|
hidden,
|
|
9329
9330
|
inEdit,
|
|
9330
9331
|
rowDetailState,
|
|
9332
|
+
column.renderTreeIcon || column.renderTreeIconForParentNode ? isNodeReadOnly2 : false,
|
|
9331
9333
|
...objectValuesExcept(renderParam, {
|
|
9332
9334
|
renderBag: true,
|
|
9333
9335
|
selectCell: true,
|
|
@@ -15330,6 +15332,23 @@ var DataSourceApiImpl = class {
|
|
|
15330
15332
|
}
|
|
15331
15333
|
return result;
|
|
15332
15334
|
};
|
|
15335
|
+
this.updateChildrenByNodePath = (childrenOrFn, nodePath, options) => {
|
|
15336
|
+
const data = this.getDataByNodePath(nodePath);
|
|
15337
|
+
if (data == null) {
|
|
15338
|
+
return Promise.resolve(null);
|
|
15339
|
+
}
|
|
15340
|
+
const nodesKey = this.getState().nodesKey;
|
|
15341
|
+
const dataChildren = data[nodesKey];
|
|
15342
|
+
const children = typeof childrenOrFn === "function" ? childrenOrFn(dataChildren, data) : childrenOrFn;
|
|
15343
|
+
return this.updateDataByNodePath(
|
|
15344
|
+
{
|
|
15345
|
+
...data,
|
|
15346
|
+
[nodesKey]: children
|
|
15347
|
+
},
|
|
15348
|
+
nodePath,
|
|
15349
|
+
options
|
|
15350
|
+
);
|
|
15351
|
+
};
|
|
15333
15352
|
this.updateDataByNodePath = (data, nodePath, options) => {
|
|
15334
15353
|
return this.updateDataArrayByNodePath(
|
|
15335
15354
|
[
|
|
@@ -19791,7 +19810,7 @@ function useCellRendering(param) {
|
|
|
19791
19810
|
componentActions: dataSourceActions,
|
|
19792
19811
|
api: dataSourceApi
|
|
19793
19812
|
} = useDataSourceContextValue();
|
|
19794
|
-
const { dataArray } = dataSourceState;
|
|
19813
|
+
const { dataArray, isNodeReadOnly: isNodeReadOnly2 } = dataSourceState;
|
|
19795
19814
|
const getData = useLatest(dataArray);
|
|
19796
19815
|
const {
|
|
19797
19816
|
rowHeight,
|
|
@@ -19965,6 +19984,7 @@ function useCellRendering(param) {
|
|
|
19965
19984
|
showZebraRows,
|
|
19966
19985
|
brain,
|
|
19967
19986
|
repaintId,
|
|
19987
|
+
isNodeReadOnly2,
|
|
19968
19988
|
rowStyle,
|
|
19969
19989
|
rowClassName,
|
|
19970
19990
|
cellClassName,
|
|
@@ -22157,7 +22177,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
22157
22177
|
}
|
|
22158
22178
|
let valid2 = isValidLicense(licenseKey, {
|
|
22159
22179
|
publishedAt: 1624970570587,
|
|
22160
|
-
version: "6.0.
|
|
22180
|
+
version: "6.0.12"
|
|
22161
22181
|
});
|
|
22162
22182
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
22163
22183
|
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.12",
|
|
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": 1731321598951
|
|
38
38
|
}
|