@infinite-table/infinite-react 6.0.11 → 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 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
@@ -15383,6 +15383,23 @@ var DataSourceApiImpl = class {
15383
15383
  }
15384
15384
  return result;
15385
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
+ };
15386
15403
  this.updateDataByNodePath = (data, nodePath, options) => {
15387
15404
  return this.updateDataArrayByNodePath(
15388
15405
  [
@@ -22202,7 +22219,7 @@ var useLicense = (licenseKey = "") => {
22202
22219
  }
22203
22220
  let valid2 = isValidLicense(licenseKey, {
22204
22221
  publishedAt: 1624970570587,
22205
- version: "6.0.11"
22222
+ version: "6.0.12"
22206
22223
  });
22207
22224
  if (!licenseKey && !valid2 && isInsidePlayground) {
22208
22225
  return true;
package/index.dev.mjs CHANGED
@@ -15332,6 +15332,23 @@ var DataSourceApiImpl = class {
15332
15332
  }
15333
15333
  return result;
15334
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
+ };
15335
15352
  this.updateDataByNodePath = (data, nodePath, options) => {
15336
15353
  return this.updateDataArrayByNodePath(
15337
15354
  [
@@ -22160,7 +22177,7 @@ var useLicense = (licenseKey = "") => {
22160
22177
  }
22161
22178
  let valid2 = isValidLicense(licenseKey, {
22162
22179
  publishedAt: 1624970570587,
22163
- version: "6.0.11"
22180
+ version: "6.0.12"
22164
22181
  });
22165
22182
  if (!licenseKey && !valid2 && isInsidePlayground) {
22166
22183
  return true;
package/index.js CHANGED
@@ -15383,6 +15383,23 @@ var DataSourceApiImpl = class {
15383
15383
  }
15384
15384
  return result;
15385
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
+ };
15386
15403
  this.updateDataByNodePath = (data, nodePath, options) => {
15387
15404
  return this.updateDataArrayByNodePath(
15388
15405
  [
@@ -22202,7 +22219,7 @@ var useLicense = (licenseKey = "") => {
22202
22219
  }
22203
22220
  let valid2 = isValidLicense(licenseKey, {
22204
22221
  publishedAt: 1624970570587,
22205
- version: "6.0.11"
22222
+ version: "6.0.12"
22206
22223
  });
22207
22224
  if (!licenseKey && !valid2 && isInsidePlayground) {
22208
22225
  return true;
package/index.mjs CHANGED
@@ -15332,6 +15332,23 @@ var DataSourceApiImpl = class {
15332
15332
  }
15333
15333
  return result;
15334
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
+ };
15335
15352
  this.updateDataByNodePath = (data, nodePath, options) => {
15336
15353
  return this.updateDataArrayByNodePath(
15337
15354
  [
@@ -22160,7 +22177,7 @@ var useLicense = (licenseKey = "") => {
22160
22177
  }
22161
22178
  let valid2 = isValidLicense(licenseKey, {
22162
22179
  publishedAt: 1624970570587,
22163
- version: "6.0.11"
22180
+ version: "6.0.12"
22164
22181
  });
22165
22182
  if (!licenseKey && !valid2 && isInsidePlayground) {
22166
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.11",
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": 1730473416383
37
+ "publishedAt": 1731321598951
38
38
  }