@infinite-table/infinite-react 9.0.2 → 9.1.0

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.dev.mjs CHANGED
@@ -2136,7 +2136,7 @@ function InfiniteTableFooter(props) {
2136
2136
 
2137
2137
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
2138
2138
  import * as React49 from "react";
2139
- import { useCallback as useCallback22, useContext as useContext10, useEffect as useEffect16, useRef as useRef21 } from "react";
2139
+ import { useCallback as useCallback22, useContext as useContext10, useEffect as useEffect17, useRef as useRef21 } from "react";
2140
2140
  import { createPortal } from "react-dom";
2141
2141
 
2142
2142
  // src/utils/keyMirror.ts
@@ -6290,7 +6290,47 @@ import * as React26 from "react";
6290
6290
 
6291
6291
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx
6292
6292
  import * as React25 from "react";
6293
- import { useCallback as useCallback14, useContext as useContext6, useMemo as useMemo5, useSyncExternalStore as useSyncExternalStore2 } from "react";
6293
+ import {
6294
+ useCallback as useCallback14,
6295
+ useContext as useContext6,
6296
+ useEffect as useEffect9,
6297
+ useMemo as useMemo5,
6298
+ useReducer as useReducer2,
6299
+ useSyncExternalStore as useSyncExternalStore2
6300
+ } from "react";
6301
+
6302
+ // src/components/InfiniteTable/components/InfiniteTableRow/repaintCellsKey.ts
6303
+ var REPAINT_CELLS_KEY_NO_ROW = Symbol("REPAINT_CELLS_KEY_NO_ROW");
6304
+ function isRepaintCellsKeyFn(repaintCellsKey) {
6305
+ return typeof repaintCellsKey === "function";
6306
+ }
6307
+ function computeRepaintCellsKey(fn, params) {
6308
+ const { column, rowIndex, rowInfoStore, getDataSourceState } = params;
6309
+ const rowInfo = rowInfoStore.getRowInfoAtIndex(rowIndex);
6310
+ if (!rowInfo) {
6311
+ return REPAINT_CELLS_KEY_NO_ROW;
6312
+ }
6313
+ const states = rowInfoStore.getDataSourceStates();
6314
+ return fn({
6315
+ rowInfo,
6316
+ column,
6317
+ dataSourceState: states.dataSourceState ?? getDataSourceState(),
6318
+ previousDataSourceState: states.previousDataSourceState
6319
+ });
6320
+ }
6321
+ function subscribeToRepaintCellsKey(fn, params, onKeyChange) {
6322
+ let lastKey = computeRepaintCellsKey(fn, params);
6323
+ return params.rowInfoStore.subscribeToDataArrayChange(() => {
6324
+ const nextKey = computeRepaintCellsKey(fn, params);
6325
+ if (nextKey === REPAINT_CELLS_KEY_NO_ROW) {
6326
+ return;
6327
+ }
6328
+ if (!Object.is(nextKey, lastKey)) {
6329
+ lastKey = nextKey;
6330
+ onKeyChange();
6331
+ }
6332
+ });
6333
+ }
6294
6334
 
6295
6335
  // src/components/InfiniteTable/components/cell.css.ts
6296
6336
  var ColumnCellCls = "_1eexc2a7 _1eexc2a6";
@@ -6768,6 +6808,22 @@ function getColumnRenderParam(options) {
6768
6808
  });
6769
6809
  return renderParam;
6770
6810
  }
6811
+ function getUniqueFieldValueFromGroupItems(rowInfo, field) {
6812
+ if (!rowInfo.isGroupRow) {
6813
+ return void 0;
6814
+ }
6815
+ const items = rowInfo.groupData;
6816
+ if (!items.length) {
6817
+ return void 0;
6818
+ }
6819
+ const first = items[0][field];
6820
+ for (let i = 1, len = items.length; i < len; i++) {
6821
+ if (items[i][field] !== first) {
6822
+ return void 0;
6823
+ }
6824
+ }
6825
+ return first;
6826
+ }
6771
6827
  function getRawValueForCell(column, rowInfo) {
6772
6828
  const { data, isGroupRow, dataSourceHasGrouping } = rowInfo;
6773
6829
  const groupBy = dataSourceHasGrouping ? rowInfo.groupBy : void 0;
@@ -6780,6 +6836,9 @@ function getRawValueForCell(column, rowInfo) {
6780
6836
  if (column.field && rowInfo.isGroupRow && rowInfo.reducerData && rowInfo.reducerData[column.field] != null) {
6781
6837
  value = rowInfo.reducerData[column.field];
6782
6838
  }
6839
+ if (value === void 0 && rowInfo.isGroupRow && column.groupByForColumn && isColumnWithField(column)) {
6840
+ value = getUniqueFieldValueFromGroupItems(rowInfo, column.field);
6841
+ }
6783
6842
  if (column.valueGetter) {
6784
6843
  if (!rowInfo.isGroupRow && rowInfo.data) {
6785
6844
  value = column.valueGetter({ data: rowInfo.data, field: column.field });
@@ -6881,10 +6940,24 @@ var InfiniteTableColumnCellClassName = `${rootClassName3}ColumnCell`;
6881
6940
  var columnZIndexAtIndex3 = stripVar(InternalVars.columnZIndexAtIndex);
6882
6941
  var columnVisibilityAtIndex2 = stripVar(InternalVars.columnVisibilityAtIndex);
6883
6942
  function styleForGroupColumn({
6884
- rowInfo
6943
+ rowInfo,
6944
+ column
6885
6945
  }) {
6946
+ let nesting = 0;
6947
+ if (rowInfo.dataSourceHasGrouping) {
6948
+ if (rowInfo.isGroupRow) {
6949
+ const colGroupBy = column?.groupByForColumn;
6950
+ const rowGroupBy = rowInfo.groupBy[rowInfo.groupBy.length - 1];
6951
+ const isPivot = !!rowInfo.pivotValuesMap;
6952
+ const isNestedBoundFieldInPivot = isPivot && !!column?.field && !!colGroupBy && !Array.isArray(colGroupBy) && (colGroupBy.field ?? colGroupBy.groupField) !== (rowGroupBy?.field ?? rowGroupBy?.groupField);
6953
+ const isPivotLeafGroupInSingleColumn = isPivot && Array.isArray(colGroupBy) && rowInfo.groupNesting === rowInfo.rootGroupBy.length;
6954
+ nesting = isNestedBoundFieldInPivot || isPivotLeafGroupInSingleColumn ? rowInfo.groupNesting : rowInfo.groupNesting - 1;
6955
+ } else {
6956
+ nesting = rowInfo.groupNesting;
6957
+ }
6958
+ }
6886
6959
  return {
6887
- [stripVar(ThemeVars.components.Row.groupNesting)]: rowInfo.dataSourceHasGrouping ? rowInfo.isGroupRow ? rowInfo.groupNesting - 1 : rowInfo.groupNesting : 0
6960
+ [stripVar(ThemeVars.components.Row.groupNesting)]: nesting
6888
6961
  };
6889
6962
  }
6890
6963
  function styleForTreeColumn({
@@ -6976,7 +7049,7 @@ function getColumnCellStyling(options) {
6976
7049
  }
6977
7050
  let style2;
6978
7051
  if (rowInfo.dataSourceHasGrouping && column.groupByForColumn) {
6979
- style2 = styleForGroupColumn({ rowInfo });
7052
+ style2 = styleForGroupColumn({ rowInfo, column });
6980
7053
  }
6981
7054
  if (columnIsTree) {
6982
7055
  style2 = styleForTreeColumn({
@@ -7270,6 +7343,21 @@ var defaultRenderSelectionCheckBox = (params) => {
7270
7343
  }
7271
7344
  );
7272
7345
  };
7346
+ function useRepaintCellsKey(params) {
7347
+ const { repaintCellsKey, column, rowIndex, rowInfoStore, getDataSourceState } = params;
7348
+ const [, forceRepaint] = useReducer2((x) => x + 1, 0);
7349
+ const repaintCellsKeyFn = isRepaintCellsKeyFn(repaintCellsKey) ? repaintCellsKey : void 0;
7350
+ useEffect9(() => {
7351
+ if (!repaintCellsKeyFn) {
7352
+ return;
7353
+ }
7354
+ return subscribeToRepaintCellsKey(
7355
+ repaintCellsKeyFn,
7356
+ { column, rowIndex, rowInfoStore, getDataSourceState },
7357
+ forceRepaint
7358
+ );
7359
+ }, [repaintCellsKeyFn, column, rowIndex, rowInfoStore, getDataSourceState]);
7360
+ }
7273
7361
  function InfiniteTableColumnCellFn(props) {
7274
7362
  const {
7275
7363
  dataSourceStatePartialForCell,
@@ -7283,6 +7371,7 @@ function InfiniteTableColumnCellFn(props) {
7283
7371
  computedColumnOrder,
7284
7372
  cellStyle,
7285
7373
  cellClassName,
7374
+ repaintCellsKey,
7286
7375
  rowDetailState,
7287
7376
  width,
7288
7377
  column,
@@ -7319,6 +7408,13 @@ function InfiniteTableColumnCellFn(props) {
7319
7408
  [rowInfoStore, rowIndex]
7320
7409
  )
7321
7410
  );
7411
+ useRepaintCellsKey({
7412
+ repaintCellsKey,
7413
+ column,
7414
+ rowIndex,
7415
+ rowInfoStore,
7416
+ getDataSourceState
7417
+ });
7322
7418
  const isEmptyRowInfo = !rowInfoFromStore;
7323
7419
  const isEmptyColumn = !column;
7324
7420
  const htmlElementRef = React25.useRef(null);
@@ -7843,7 +7939,7 @@ function MenuIcon(props) {
7843
7939
 
7844
7940
  // src/components/InfiniteTable/components/icons/SortIcon/index.tsx
7845
7941
  import * as React28 from "react";
7846
- import { useEffect as useEffect9, useState as useState9 } from "react";
7942
+ import { useEffect as useEffect10, useState as useState9 } from "react";
7847
7943
 
7848
7944
  // src/components/InfiniteTable/components/icons/SortIcon/SortIcon.css.ts
7849
7945
  var SortIconCls = "_1b8djff0 _16lm1iw1p _16lm1iw2f _16lm1iw1 _16lm1iw32";
@@ -7881,7 +7977,7 @@ function SortIcon(props) {
7881
7977
  ...props.lineStyle,
7882
7978
  opacity
7883
7979
  };
7884
- useEffect9(() => {
7980
+ useEffect10(() => {
7885
7981
  const newOpacity = direction != 0 ? 1 : 0;
7886
7982
  if (!rendered && newOpacity) {
7887
7983
  setRendered(true);
@@ -8295,7 +8391,7 @@ function useColumnResizeHandle(column, opts) {
8295
8391
 
8296
8392
  // src/components/InfiniteTable/components/draggable/DragList.tsx
8297
8393
  import * as React31 from "react";
8298
- import { useCallback as useCallback17, useEffect as useEffect10, useState as useState12 } from "react";
8394
+ import { useCallback as useCallback17, useEffect as useEffect11, useState as useState12 } from "react";
8299
8395
 
8300
8396
  // src/components/InfiniteTable/components/draggable/DragList.css.ts
8301
8397
  var DragListRecipe = createRuntimeFn({ defaultClassName: "_16lm1iw3a _16lm1iw1", variantClassNames: { dragging: { true: "_16lm1iwn _16lm1iw1x" } }, defaultVariants: {}, compoundVariants: [] });
@@ -8738,7 +8834,7 @@ function useInteractionTarget(domRef, props) {
8738
8834
  []
8739
8835
  );
8740
8836
  const getInteractionTarget = useLatest(interactionTarget);
8741
- useEffect10(() => {
8837
+ useEffect11(() => {
8742
8838
  return DragManager.on("register", (interactionTarget2) => {
8743
8839
  const { dragListId, acceptDropsFrom, orientation, shouldAcceptDrop } = getProps();
8744
8840
  const interactionTargetData = interactionTarget2.getData();
@@ -8825,7 +8921,7 @@ var DragList = (props) => {
8825
8921
  domRef,
8826
8922
  props
8827
8923
  );
8828
- useEffect10(() => {
8924
+ useEffect11(() => {
8829
8925
  const dragList = document.querySelector(
8830
8926
  `[${DRAG_LIST_ATTRIBUTE}="${props.dragListId}"]`
8831
8927
  );
@@ -8837,7 +8933,7 @@ var DragList = (props) => {
8837
8933
  );
8838
8934
  }
8839
8935
  }, [props.dragListId]);
8840
- useEffect10(() => {
8936
+ useEffect11(() => {
8841
8937
  if (interactionTarget) {
8842
8938
  const dragListId = props.dragListId;
8843
8939
  const removeOnDragStart = interactionTarget.on(
@@ -9335,7 +9431,7 @@ import * as React47 from "react";
9335
9431
 
9336
9432
  // src/components/HeadlessTable/index.tsx
9337
9433
  import * as React41 from "react";
9338
- import { useCallback as useCallback18, useEffect as useEffect14, useRef as useRef18, useState as useState14 } from "react";
9434
+ import { useCallback as useCallback18, useEffect as useEffect15, useRef as useRef18, useState as useState14 } from "react";
9339
9435
 
9340
9436
  // src/components/VirtualList/SpacePlaceholder.tsx
9341
9437
  import * as React33 from "react";
@@ -9370,9 +9466,9 @@ import * as React34 from "react";
9370
9466
  import { useRef as useRef14 } from "react";
9371
9467
 
9372
9468
  // src/components/hooks/useOnScroll.ts
9373
- import { useEffect as useEffect11 } from "react";
9469
+ import { useEffect as useEffect12 } from "react";
9374
9470
  var useOnScroll = (domRef, onScroll) => {
9375
- useEffect11(() => {
9471
+ useEffect12(() => {
9376
9472
  const domNode = domRef?.current;
9377
9473
  const scrollFn = (event) => {
9378
9474
  const node = event.target;
@@ -13125,7 +13221,7 @@ var RawTable = React38.memo(RawTableFn);
13125
13221
 
13126
13222
  // src/components/InfiniteTable/components/ActiveRowIndicator.tsx
13127
13223
  import * as React39 from "react";
13128
- import { useEffect as useEffect12, useLayoutEffect as useLayoutEffect9, useRef as useRef16 } from "react";
13224
+ import { useEffect as useEffect13, useLayoutEffect as useLayoutEffect9, useRef as useRef16 } from "react";
13129
13225
 
13130
13226
  // src/components/InfiniteTable/components/ActiveCellIndicator.css.ts
13131
13227
  var ActiveCellIndicatorRecipe = createRuntimeFn({ defaultClassName: "nxbq1c1 _16lm1iwz _16lm1iw2", variantClassNames: { visible: { true: "nxbq1c3", false: "nxbq1c4" } }, defaultVariants: {}, compoundVariants: [] });
@@ -13174,7 +13270,7 @@ var ActiveRowIndicatorFn = (props) => {
13174
13270
  };
13175
13271
  setInfiniteVarsOnNode(vars, node);
13176
13272
  }, [props.activeRowIndex, brain]);
13177
- useEffect12(() => {
13273
+ useEffect13(() => {
13178
13274
  const updateVars = (scrollPosition) => {
13179
13275
  setInfiniteVarsOnNode(
13180
13276
  {
@@ -13213,7 +13309,7 @@ var ActiveRowIndicator = React39.memo(
13213
13309
 
13214
13310
  // src/components/InfiniteTable/components/ActiveCellIndicator.tsx
13215
13311
  import * as React40 from "react";
13216
- import { useEffect as useEffect13, useLayoutEffect as useLayoutEffect10, useRef as useRef17 } from "react";
13312
+ import { useEffect as useEffect14, useLayoutEffect as useLayoutEffect10, useRef as useRef17 } from "react";
13217
13313
  var { rootClassName: rootClassName7 } = internalProps;
13218
13314
  var baseCls2 = `${rootClassName7}-ActiveCellIndicator`;
13219
13315
  var columnZIndexAtIndex4 = stripVar(InternalVars.columnZIndexAtIndex);
@@ -13244,7 +13340,7 @@ var ActiveCellIndicatorFn = (props) => {
13244
13340
  useLayoutEffect10(() => {
13245
13341
  reposition(brain, props.activeCellIndex, props.rowHeight, domRef);
13246
13342
  }, [props.activeCellIndex, props.rowHeight, brain]);
13247
- useEffect13(() => {
13343
+ useEffect14(() => {
13248
13344
  const removeOnRenderCountChange = brain.onRenderCountChange(() => {
13249
13345
  rerender();
13250
13346
  });
@@ -13335,12 +13431,12 @@ function HeadlessTable(props) {
13335
13431
  width: 0,
13336
13432
  height: 0
13337
13433
  });
13338
- useEffect14(() => {
13434
+ useEffect15(() => {
13339
13435
  if (scrollStopDelay != null) {
13340
13436
  brain.setScrollStopDelay(scrollStopDelay);
13341
13437
  }
13342
13438
  }, [scrollStopDelay, brain]);
13343
- useEffect14(() => {
13439
+ useEffect15(() => {
13344
13440
  const node = domRef.current?.parentNode;
13345
13441
  if (!node) {
13346
13442
  return;
@@ -13376,7 +13472,7 @@ function HeadlessTable(props) {
13376
13472
  },
13377
13473
  [brain, updateDOMTransform]
13378
13474
  );
13379
- useEffect14(() => {
13475
+ useEffect15(() => {
13380
13476
  const removeOnRenderCount = brain.onRenderCountChange(() => {
13381
13477
  setTotalScrollSize(brain.getVirtualizedContentSize());
13382
13478
  });
@@ -13537,7 +13633,7 @@ function assignGroupOffsetsAndComputedWidths(items, groupOffset = 0) {
13537
13633
 
13538
13634
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
13539
13635
  import * as React46 from "react";
13540
- import { useCallback as useCallback20, useEffect as useEffect15, useMemo as useMemo8, useRef as useRef20 } from "react";
13636
+ import { useCallback as useCallback20, useEffect as useEffect16, useMemo as useMemo8, useRef as useRef20 } from "react";
13541
13637
 
13542
13638
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
13543
13639
  import * as React44 from "react";
@@ -13870,7 +13966,7 @@ function InfiniteTableInternalHeaderFn(props) {
13870
13966
  domRef.current.style.transform = `translate3d(-${scrollPosition.scrollLeft}px, 0px, 0px)`;
13871
13967
  }
13872
13968
  }, []);
13873
- useEffect15(() => {
13969
+ useEffect16(() => {
13874
13970
  const removeOnScroll = headerBrain.onScroll(updateDOMTransform);
13875
13971
  updateDOMTransform(
13876
13972
  headerBrain.getScrollPosition() || { scrollLeft: 0, scrollTop: 0 }
@@ -14508,7 +14604,7 @@ function InfiniteTableHeaderCellFn(props) {
14508
14604
  }
14509
14605
  return all;
14510
14606
  };
14511
- useEffect16(() => {
14607
+ useEffect17(() => {
14512
14608
  let clearOnResize = null;
14513
14609
  const node = domRef.current;
14514
14610
  if (onResize && node) {
@@ -14684,7 +14780,7 @@ function useInfiniteHeaderCell() {
14684
14780
 
14685
14781
  // src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
14686
14782
  import * as React50 from "react";
14687
- import { useEffect as useEffect17 } from "react";
14783
+ import { useEffect as useEffect18 } from "react";
14688
14784
 
14689
14785
  // src/components/utils/decamelize.ts
14690
14786
  function decamelize(str, options) {
@@ -14741,7 +14837,7 @@ var InfiniteTableLicenseFooter = React50.forwardRef(
14741
14837
  ref.current = node;
14742
14838
  }
14743
14839
  }, []);
14744
- useEffect17(() => {
14840
+ useEffect18(() => {
14745
14841
  const forceStyle = () => {
14746
14842
  setTimeout(() => {
14747
14843
  enforceStyle(domRef.current, defaultStyle);
@@ -20125,9 +20221,22 @@ function deepEqualRowInfo(oldRowInfo, newRowInfo) {
20125
20221
  function createRowInfoStore() {
20126
20222
  let dataArray = [];
20127
20223
  const subscribers = /* @__PURE__ */ new Map();
20224
+ const dataArrayChangeSubscribers = /* @__PURE__ */ new Set();
20225
+ let dataSourceStates = {
20226
+ dataSourceState: void 0,
20227
+ previousDataSourceState: void 0
20228
+ };
20128
20229
  const notifyDataArray = (newDataArray, params) => {
20129
20230
  const oldDataArray = dataArray;
20130
20231
  const marker = params?.marker;
20232
+ const dataArrayChanged = newDataArray !== oldDataArray;
20233
+ const notifyDataArrayChange = dataArrayChanged && dataArrayChangeSubscribers.size > 0;
20234
+ if (notifyDataArrayChange) {
20235
+ dataSourceStates = {
20236
+ dataSourceState: params?.dataSourceState,
20237
+ previousDataSourceState: params?.previousDataSourceState
20238
+ };
20239
+ }
20131
20240
  if (marker) {
20132
20241
  marker.start({
20133
20242
  details: [
@@ -20153,7 +20262,7 @@ function createRowInfoStore() {
20153
20262
  }
20154
20263
  }
20155
20264
  dataArray = newDataArray;
20156
- if (changedIndices.length > 0) {
20265
+ if (changedIndices.length > 0 || notifyDataArrayChange) {
20157
20266
  queueMicrotask(() => {
20158
20267
  for (let i = 0, len = changedIndices.length; i < len; i++) {
20159
20268
  const index = changedIndices[i];
@@ -20164,6 +20273,11 @@ function createRowInfoStore() {
20164
20273
  }
20165
20274
  }
20166
20275
  }
20276
+ if (notifyDataArrayChange) {
20277
+ for (const callback of Array.from(dataArrayChangeSubscribers)) {
20278
+ callback();
20279
+ }
20280
+ }
20167
20281
  });
20168
20282
  }
20169
20283
  if (marker) {
@@ -20198,14 +20312,36 @@ function createRowInfoStore() {
20198
20312
  const getDataArray = () => {
20199
20313
  return dataArray;
20200
20314
  };
20315
+ const subscribeToDataArrayChange = (callback) => {
20316
+ dataArrayChangeSubscribers.add(callback);
20317
+ return () => {
20318
+ dataArrayChangeSubscribers.delete(callback);
20319
+ if (dataArrayChangeSubscribers.size === 0) {
20320
+ dataSourceStates = {
20321
+ dataSourceState: void 0,
20322
+ previousDataSourceState: void 0
20323
+ };
20324
+ }
20325
+ };
20326
+ };
20327
+ const getDataSourceStates = () => {
20328
+ return dataSourceStates;
20329
+ };
20201
20330
  const clear = () => {
20202
20331
  dataArray = [];
20203
20332
  subscribers.clear();
20333
+ dataArrayChangeSubscribers.clear();
20334
+ dataSourceStates = {
20335
+ dataSourceState: void 0,
20336
+ previousDataSourceState: void 0
20337
+ };
20204
20338
  };
20205
20339
  return {
20206
20340
  notifyDataArray,
20207
20341
  getRowInfoAtIndex,
20208
20342
  subscribeToRowIndex,
20343
+ subscribeToDataArrayChange,
20344
+ getDataSourceStates,
20209
20345
  getDataArray,
20210
20346
  clear
20211
20347
  };
@@ -21889,7 +22025,9 @@ function concludeReducer(params) {
21889
22025
  };
21890
22026
  }
21891
22027
  state.rowInfoStore.notifyDataArray(rowInfoDataArray, {
21892
- marker: debugId ? getMarker(debugId).track.DataSource.label.DiffRowInfoInStore : void 0
22028
+ marker: debugId ? getMarker(debugId).track.DataSource.label.DiffRowInfoInStore : void 0,
22029
+ dataSourceState: state,
22030
+ previousDataSourceState: previousState
21893
22031
  });
21894
22032
  if (rootMarker) {
21895
22033
  rootMarker?.track.DataSource.label.PrepareData.end({
@@ -24070,7 +24208,7 @@ function getImperativeApi(context) {
24070
24208
  }
24071
24209
 
24072
24210
  // src/components/InfiniteTable/hooks/useAutoSizeColumns.ts
24073
- import { useEffect as useEffect18, useRef as useRef23, useState as useState16 } from "react";
24211
+ import { useEffect as useEffect19, useRef as useRef23, useState as useState16 } from "react";
24074
24212
 
24075
24213
  // src/components/InfiniteTable/utils/getColumnContentMaxWidths.ts
24076
24214
  var OFFSET = 10;
@@ -24149,7 +24287,7 @@ function useAutoSizeColumns() {
24149
24287
  const theKey = typeof autoSizeColumnsKey === "object" ? autoSizeColumnsKey.key : autoSizeColumnsKey;
24150
24288
  const getTheKey = useLatest(theKey);
24151
24289
  const lastExecutedIdentifierRef = useRef23(null);
24152
- useEffect18(() => {
24290
+ useEffect19(() => {
24153
24291
  const key = getTheKey();
24154
24292
  if (key == null) {
24155
24293
  return;
@@ -24162,7 +24300,7 @@ function useAutoSizeColumns() {
24162
24300
  };
24163
24301
  return brain.onRenderRangeChange(onChange);
24164
24302
  }, [brain]);
24165
- useEffect18(() => {
24303
+ useEffect19(() => {
24166
24304
  if (theKey == null) {
24167
24305
  return;
24168
24306
  }
@@ -24207,7 +24345,7 @@ function useAutoSizeColumns() {
24207
24345
  }
24208
24346
 
24209
24347
  // src/components/InfiniteTable/hooks/useComputed.ts
24210
- import { useEffect as useEffect24, useMemo as useMemo16, useState as useState20 } from "react";
24348
+ import { useEffect as useEffect25, useMemo as useMemo16, useState as useState20 } from "react";
24211
24349
 
24212
24350
  // src/components/InfiniteTable/utils/MultiCellSelector.ts
24213
24351
  var MultiCellSelector = class {
@@ -24448,7 +24586,7 @@ function useDataSourceState(selector2) {
24448
24586
  // src/components/DataSource/privateHooks/useDataSource.tsx
24449
24587
  import React52, {
24450
24588
  useCallback as useCallback24,
24451
- useEffect as useEffect21,
24589
+ useEffect as useEffect22,
24452
24590
  useLayoutEffect as useLayoutEffect12,
24453
24591
  useState as useState18
24454
24592
  } from "react";
@@ -24459,10 +24597,10 @@ function createDataSourceStore() {
24459
24597
  }
24460
24598
 
24461
24599
  // src/components/DataSource/privateHooks/useLoadData.ts
24462
- import { useEffect as useEffect20, useMemo as useMemo11, useRef as useRef25, useState as useState17 } from "react";
24600
+ import { useEffect as useEffect21, useMemo as useMemo11, useRef as useRef25, useState as useState17 } from "react";
24463
24601
 
24464
24602
  // src/components/hooks/useEffectWithChanges.ts
24465
- import { useEffect as useEffect19, useLayoutEffect as useLayoutEffect11, useRef as useRef24 } from "react";
24603
+ import { useEffect as useEffect20, useLayoutEffect as useLayoutEffect11, useRef as useRef24 } from "react";
24466
24604
  function useEffectWithChanges(fn, deps) {
24467
24605
  const prevRef = useRef24({});
24468
24606
  const oldValuesRef = useRef24({});
@@ -24480,7 +24618,7 @@ function useEffectWithChanges(fn, deps) {
24480
24618
  }
24481
24619
  }
24482
24620
  prevRef.current = deps;
24483
- useEffect19(() => {
24621
+ useEffect20(() => {
24484
24622
  const changes2 = changesRef.current;
24485
24623
  let result = void 0;
24486
24624
  if (Object.keys(changes2).length !== 0) {
@@ -24526,7 +24664,7 @@ function useEffectWithObject(fn, deps) {
24526
24664
  useEffectDeps.push(deps[k]);
24527
24665
  }
24528
24666
  }
24529
- useEffect19(fn, useEffectDeps);
24667
+ useEffect20(fn, useEffectDeps);
24530
24668
  }
24531
24669
 
24532
24670
  // src/components/InfiniteTable/errorCodes.ts
@@ -24697,7 +24835,7 @@ function useLoadData(options) {
24697
24835
  horizontal: false
24698
24836
  });
24699
24837
  const scrollbarsRef = useRef25(scrollbars);
24700
- useEffect20(() => {
24838
+ useEffect21(() => {
24701
24839
  notifyScrollbarsChange.onChange((scrollbars2) => {
24702
24840
  if (!scrollbars2) {
24703
24841
  return;
@@ -24707,7 +24845,7 @@ function useLoadData(options) {
24707
24845
  });
24708
24846
  return () => notifyScrollbarsChange.destroy();
24709
24847
  }, [notifyScrollbarsChange]);
24710
- useEffect20(() => {
24848
+ useEffect21(() => {
24711
24849
  if (!livePagination) {
24712
24850
  return;
24713
24851
  }
@@ -24720,7 +24858,7 @@ function useLoadData(options) {
24720
24858
  });
24721
24859
  return () => cancelAnimationFrame(frameId);
24722
24860
  }, [livePaginationCursor]);
24723
- useEffect20(() => {
24861
+ useEffect21(() => {
24724
24862
  if (!livePagination || livePaginationCursor !== void 0) {
24725
24863
  return;
24726
24864
  }
@@ -24733,7 +24871,7 @@ function useLoadData(options) {
24733
24871
  });
24734
24872
  return () => cancelAnimationFrame(frameId);
24735
24873
  }, [dataArray.length, livePaginationCursor]);
24736
- useEffect20(() => {
24874
+ useEffect21(() => {
24737
24875
  const state = getDataSourceState();
24738
24876
  const { livePaginationCursor: livePaginationCursor2, livePagination: livePagination2, dataArray: dataArray2 } = state;
24739
24877
  if (!scrollbars.vertical && livePagination2) {
@@ -24867,7 +25005,7 @@ function useLoadData(options) {
24867
25005
  }
24868
25006
  function useLazyLoadRange(options, dependencies) {
24869
25007
  const { getDataSourceState, dataSourceActions, dataSourceState } = options;
24870
- useEffect20(() => {
25008
+ useEffect21(() => {
24871
25009
  dataSourceActions.lazyLoadCacheOfLoadedBatches = new DeepMap();
24872
25010
  }, [dataSourceState.data, dataSourceState.dataParams]);
24873
25011
  const {
@@ -24948,7 +25086,7 @@ function useLazyLoadRange(options, dependencies) {
24948
25086
  groupRowsState
24949
25087
  }
24950
25088
  );
24951
- useEffect20(() => {
25089
+ useEffect21(() => {
24952
25090
  if (lazyLoadBatchSize && lazyLoadBatchSize > 0) {
24953
25091
  debouncedLoadRange();
24954
25092
  }
@@ -25039,7 +25177,7 @@ function useDataSourceInternal(props) {
25039
25177
  dataSourceActions,
25040
25178
  getDataSourceState
25041
25179
  });
25042
- useEffect21(() => {
25180
+ useEffect22(() => {
25043
25181
  dataSourceState.onDataArrayChange?.(
25044
25182
  dataSourceState.originalDataArray,
25045
25183
  dataSourceState.originalDataArrayChangedInfo
@@ -25061,7 +25199,7 @@ function useDataSourceInternal(props) {
25061
25199
  });
25062
25200
  }
25063
25201
  }, [dataSourceState.originalDataArrayChangedInfo]);
25064
- useEffect21(() => {
25202
+ useEffect22(() => {
25065
25203
  dataSourceState.onReady?.(dataSourceApi);
25066
25204
  }, []);
25067
25205
  return {
@@ -25299,7 +25437,7 @@ function useColumnSizeFn(columns) {
25299
25437
  }
25300
25438
 
25301
25439
  // src/components/InfiniteTable/hooks/useColumnsWhen.ts
25302
- import { useEffect as useEffect22, useLayoutEffect as useLayoutEffect13, useMemo as useMemo13 } from "react";
25440
+ import { useEffect as useEffect23, useLayoutEffect as useLayoutEffect13, useMemo as useMemo13 } from "react";
25303
25441
 
25304
25442
  // src/components/VirtualBrain/ScrollListener.ts
25305
25443
  var initialScrollPosition = {
@@ -25813,6 +25951,7 @@ var forwardProps4 = (_setupState) => {
25813
25951
  keyboardShortcuts: 1,
25814
25952
  rowStyle: 1,
25815
25953
  cellStyle: 1,
25954
+ repaintCellsKey: 1,
25816
25955
  rowProps: 1,
25817
25956
  rowClassName: 1,
25818
25957
  rowHoverClassName: 1,
@@ -26550,13 +26689,13 @@ function useColumnsWhen(state, actions) {
26550
26689
  pivotTotalColumnPosition,
26551
26690
  pivotGrandTotalColumnPosition
26552
26691
  } = state;
26553
- useEffect22(() => {
26692
+ useEffect23(() => {
26554
26693
  dataSourceActions.generateGroupRows = groupRenderStrategy !== "inline";
26555
26694
  }, [groupRenderStrategy]);
26556
- useEffect22(() => {
26695
+ useEffect23(() => {
26557
26696
  dataSourceActions.pivotTotalColumnPosition = pivotTotalColumnPosition;
26558
26697
  }, [pivotTotalColumnPosition]);
26559
- useEffect22(() => {
26698
+ useEffect23(() => {
26560
26699
  if (pivotGrandTotalColumnPosition != void 0) {
26561
26700
  dataSourceActions.pivotGrandTotalColumnPosition = pivotGrandTotalColumnPosition;
26562
26701
  }
@@ -26637,7 +26776,7 @@ function useColumnsWhenInlineGroupRenderStrategy(groupByMap, state, actions) {
26637
26776
  });
26638
26777
  return Object.keys(computedColumns).length === 0 ? void 0 : computedColumns;
26639
26778
  }
26640
- useEffect22(() => {
26779
+ useEffect23(() => {
26641
26780
  const update = () => {
26642
26781
  componentActions.columnsWhenInlineGroupRenderStrategy = isTree ? void 0 : computeColumnsWhenInlineGroupRenderStrategy(
26643
26782
  columns,
@@ -26672,7 +26811,7 @@ function useColumnsWhenGrouping() {
26672
26811
  getComponentState
26673
26812
  } = useManagedComponentState();
26674
26813
  const toggleGroupRow = useToggleGroupRow();
26675
- useEffect22(() => {
26814
+ useEffect23(() => {
26676
26815
  const update = () => {
26677
26816
  const { columns: columnsWhenGrouping, groupColumnIds } = getColumnsWhenGrouping({
26678
26817
  columns,
@@ -26781,7 +26920,7 @@ function useHideColumns(groupByMap, state, actions) {
26781
26920
  hideEmptyGroupColumns ? groupRowsIndexesInDataArray : null,
26782
26921
  hideEmptyGroupColumns
26783
26922
  ]);
26784
- useEffect22(() => {
26923
+ useEffect23(() => {
26785
26924
  const isGrouped = groupBy.length > 0;
26786
26925
  const currentState = getComponentState();
26787
26926
  const {
@@ -27096,7 +27235,7 @@ function useComputedRowHeight(param) {
27096
27235
  }
27097
27236
 
27098
27237
  // src/components/InfiniteTable/hooks/useScrollbars.ts
27099
- import { useState as useState19, useEffect as useEffect23, useLayoutEffect as useLayoutEffect14 } from "react";
27238
+ import { useState as useState19, useEffect as useEffect24, useLayoutEffect as useLayoutEffect14 } from "react";
27100
27239
  var INITIAL_SCROLLBARS = {
27101
27240
  vertical: false,
27102
27241
  horizontal: false
@@ -27105,7 +27244,7 @@ function useScrollbars(getState) {
27105
27244
  const brain = getState().brain;
27106
27245
  const { getDataSourceState } = useDataSourceStableContext();
27107
27246
  const [scrollbars, setScrollbars] = useState19(INITIAL_SCROLLBARS);
27108
- useEffect23(() => {
27247
+ useEffect24(() => {
27109
27248
  return brain.onRenderCountChange(() => {
27110
27249
  const { scrollTopMax, scrollLeftMax } = brain;
27111
27250
  const vertical = scrollTopMax > 0;
@@ -27216,7 +27355,7 @@ function useComputed(options) {
27216
27355
  }
27217
27356
  });
27218
27357
  });
27219
- useEffect24(() => {
27358
+ useEffect25(() => {
27220
27359
  dataSourceActions.showSeparatePivotColumnForSingleAggregation = showSeparatePivotColumnForSingleAggregation;
27221
27360
  }, [showSeparatePivotColumnForSingleAggregation]);
27222
27361
  const { toggleGroupRow } = useColumnsWhen(state, actions);
@@ -27558,7 +27697,7 @@ var useLicense = (licenseKey = "") => {
27558
27697
  }
27559
27698
  let valid2 = isValidLicense(licenseKey, {
27560
27699
  publishedAt: 1624970570587,
27561
- version: "9.0.2"
27700
+ version: "9.1.0"
27562
27701
  });
27563
27702
  if (!licenseKey && !valid2 && isInsidePlayground) {
27564
27703
  return true;
@@ -27569,18 +27708,18 @@ var useLicense = (licenseKey = "") => {
27569
27708
  };
27570
27709
 
27571
27710
  // src/components/InfiniteTable/hooks/useScrollToActiveCell.ts
27572
- import { useRef as useRef26, useEffect as useEffect25 } from "react";
27711
+ import { useRef as useRef26, useEffect as useEffect26 } from "react";
27573
27712
  var RETRIES = 10;
27574
27713
  function useScrollToActiveCell(activeCellIndex, dataCount, imperativeApi) {
27575
27714
  const didScrollRef = useRef26(false);
27576
27715
  const rafId = useRef26(null);
27577
- useEffect25(() => {
27716
+ useEffect26(() => {
27578
27717
  if (activeCellIndex != null) {
27579
27718
  didScrollRef.current = false;
27580
27719
  cancelRaf(rafId.current);
27581
27720
  }
27582
27721
  }, [activeCellIndex]);
27583
- useEffect25(() => {
27722
+ useEffect26(() => {
27584
27723
  if (activeCellIndex != null && !didScrollRef.current) {
27585
27724
  let tryScroll2 = function(times = 0) {
27586
27725
  times++;
@@ -27608,18 +27747,18 @@ function useScrollToActiveCell(activeCellIndex, dataCount, imperativeApi) {
27608
27747
  }
27609
27748
 
27610
27749
  // src/components/InfiniteTable/hooks/useScrollToActiveRow.ts
27611
- import { useRef as useRef27, useEffect as useEffect26 } from "react";
27750
+ import { useRef as useRef27, useEffect as useEffect27 } from "react";
27612
27751
  var RETRIES2 = 10;
27613
27752
  function useScrollToActiveRow(activeRowIndex, dataCount, imperativeApi) {
27614
27753
  const didScrollRef = useRef27(false);
27615
27754
  const rafId = useRef27(null);
27616
- useEffect26(() => {
27755
+ useEffect27(() => {
27617
27756
  if (activeRowIndex != null) {
27618
27757
  didScrollRef.current = false;
27619
27758
  cancelAnimationFrame(rafId.current);
27620
27759
  }
27621
27760
  }, [activeRowIndex]);
27622
- useEffect26(() => {
27761
+ useEffect27(() => {
27623
27762
  if (activeRowIndex != null && !didScrollRef.current) {
27624
27763
  let tryScroll2 = function(times = 0) {
27625
27764
  times++;
@@ -27650,7 +27789,7 @@ function createInfiniteTableStore() {
27650
27789
  }
27651
27790
 
27652
27791
  // src/components/InfiniteTable/eventHandlers/index.ts
27653
- import { useCallback as useCallback27, useMemo as useMemo18, useEffect as useEffect27 } from "react";
27792
+ import { useCallback as useCallback27, useMemo as useMemo18, useEffect as useEffect28 } from "react";
27654
27793
 
27655
27794
  // src/components/InfiniteTable/eventHandlers/onCellClick.ts
27656
27795
  function onCellClick(context, event) {
@@ -28361,7 +28500,7 @@ function useEventHandlersContext() {
28361
28500
  }
28362
28501
  function handleDOMEvents() {
28363
28502
  const context = useEventHandlersContext();
28364
- useEffect27(() => {
28503
+ useEffect28(() => {
28365
28504
  const removeOnKeyDown = context.getState().keyDown.onChange((event) => {
28366
28505
  onKeyDown(context, event);
28367
28506
  });
@@ -28421,13 +28560,13 @@ function useDOMEventHandlers() {
28421
28560
  }
28422
28561
 
28423
28562
  // src/components/InfiniteTable/hooks/useColumnMenu.ts
28424
- import { useEffect as useEffect31 } from "react";
28563
+ import { useEffect as useEffect32 } from "react";
28425
28564
 
28426
28565
  // src/components/hooks/useOverlay/index.tsx
28427
28566
  import * as React57 from "react";
28428
28567
  import {
28429
28568
  useCallback as useCallback28,
28430
- useEffect as useEffect29,
28569
+ useEffect as useEffect30,
28431
28570
  useLayoutEffect as useLayoutEffect15,
28432
28571
  useState as useState21
28433
28572
  } from "react";
@@ -28650,7 +28789,7 @@ function DefaultOverlayPortal(props) {
28650
28789
  }
28651
28790
  function OverlayContent(props) {
28652
28791
  const nodeRef = React57.useRef(null);
28653
- useEffect29(() => {
28792
+ useEffect30(() => {
28654
28793
  return props.realign.onChange((handle) => {
28655
28794
  if (nodeRef.current && handle) {
28656
28795
  alignNode(nodeRef.current, handle);
@@ -29277,10 +29416,10 @@ function useMenuContext() {
29277
29416
  }
29278
29417
 
29279
29418
  // src/components/hooks/useMounted.ts
29280
- import { useCallback as useCallback29, useEffect as useEffect30, useRef as useRef29 } from "react";
29419
+ import { useCallback as useCallback29, useEffect as useEffect31, useRef as useRef29 } from "react";
29281
29420
  function useMounted() {
29282
29421
  let mountedRef = useRef29(true);
29283
- useEffect30(() => {
29422
+ useEffect31(() => {
29284
29423
  mountedRef.current = true;
29285
29424
  return () => {
29286
29425
  mountedRef.current = false;
@@ -30108,7 +30247,7 @@ function useColumnMenu() {
30108
30247
  } = useOverlay({
30109
30248
  portalContainer: portalDOMRef?.current ?? false
30110
30249
  });
30111
- useEffect31(() => {
30250
+ useEffect32(() => {
30112
30251
  const state = getState();
30113
30252
  return state.onColumnMenuClick.onChange((info) => {
30114
30253
  if (!info) {
@@ -30121,7 +30260,7 @@ function useColumnMenu() {
30121
30260
  actions.columnMenuVisibleForColumnId = info.column.id;
30122
30261
  });
30123
30262
  }, []);
30124
- useEffect31(() => {
30263
+ useEffect32(() => {
30125
30264
  const { columnMenuVisibleForColumnId: columnMenuVisibleForColumnId2, columnMenuTargetRef } = getState();
30126
30265
  if (columnMenuVisibleForColumnId2) {
30127
30266
  let handleMouseDown2 = function(event) {
@@ -30201,7 +30340,7 @@ function FocusDetect() {
30201
30340
  }
30202
30341
 
30203
30342
  // src/components/InfiniteTable/hooks/useEditingCallbackProps.ts
30204
- import { useEffect as useEffect32 } from "react";
30343
+ import { useEffect as useEffect33 } from "react";
30205
30344
  function useOnEditCancelled() {
30206
30345
  const context = useInfiniteTableStableContext();
30207
30346
  const { getState, editingCell } = useInfiniteTableSelector((ctx) => {
@@ -30211,7 +30350,7 @@ function useOnEditCancelled() {
30211
30350
  };
30212
30351
  });
30213
30352
  const cancelled = editingCell && !editingCell.active ? editingCell.cancelled : void 0;
30214
- useEffect32(() => {
30353
+ useEffect33(() => {
30215
30354
  if (cancelled) {
30216
30355
  const { rowIndex, columnId, initialValue } = getState().editingCell;
30217
30356
  const { onEditCancelled } = getState();
@@ -30235,7 +30374,7 @@ function useOnEditRejected() {
30235
30374
  };
30236
30375
  });
30237
30376
  const rejected = editingCell && !editingCell.active && editingCell.accepted instanceof Error ? editingCell.accepted : void 0;
30238
- useEffect32(() => {
30377
+ useEffect33(() => {
30239
30378
  if (rejected) {
30240
30379
  const { rowIndex, columnId, value, initialValue } = getState().editingCell;
30241
30380
  const { onEditRejected } = getState();
@@ -30261,7 +30400,7 @@ function useFocusOnEditStop() {
30261
30400
  });
30262
30401
  const active = editingCell?.active;
30263
30402
  const prevActive = usePrevious(active);
30264
- useEffect32(() => {
30403
+ useEffect33(() => {
30265
30404
  if (!active && prevActive) {
30266
30405
  context.api.focus();
30267
30406
  }
@@ -30276,7 +30415,7 @@ function useOnEditAccepted() {
30276
30415
  };
30277
30416
  });
30278
30417
  const accepted = editingCell && !editingCell.active && !editingCell.cancelled && editingCell.accepted === true;
30279
- useEffect32(() => {
30418
+ useEffect33(() => {
30280
30419
  if (accepted) {
30281
30420
  const { editingCell: editingCell2 } = getState();
30282
30421
  const { value, rowIndex, columnId, initialValue } = editingCell2;
@@ -30303,7 +30442,7 @@ function useOnEditPersisted() {
30303
30442
  };
30304
30443
  });
30305
30444
  const persisted = editingCell ? editingCell.persisted : void 0;
30306
- useEffect32(() => {
30445
+ useEffect33(() => {
30307
30446
  if (persisted) {
30308
30447
  const { editingCell: editingCell2, onEditPersistError, onEditPersistSuccess } = getState();
30309
30448
  if (!editingCell2) {
@@ -30336,7 +30475,7 @@ function useEditingCallbackProps() {
30336
30475
  }
30337
30476
 
30338
30477
  // src/components/InfiniteTable/hooks/useColumnFilterOperatorMenu.ts
30339
- import { useEffect as useEffect33 } from "react";
30478
+ import { useEffect as useEffect34 } from "react";
30340
30479
 
30341
30480
  // src/components/InfiniteTable/utils/getFilterOperatorMenuForColumn.tsx
30342
30481
  import * as React68 from "react";
@@ -30479,7 +30618,7 @@ function useColumnFilterOperatorMenu() {
30479
30618
  } = useOverlay({
30480
30619
  portalContainer: portalDOMRef?.current ?? false
30481
30620
  });
30482
- useEffect33(() => {
30621
+ useEffect34(() => {
30483
30622
  const state = getState();
30484
30623
  return state.onFilterOperatorMenuClick.onChange((info) => {
30485
30624
  if (!info) {
@@ -30518,7 +30657,7 @@ function useColumnFilterOperatorMenu() {
30518
30657
  actions.filterOperatorMenuVisibleForColumnId = column.id;
30519
30658
  });
30520
30659
  }, []);
30521
- useEffect33(() => {
30660
+ useEffect34(() => {
30522
30661
  const { filterOperatorMenuVisibleForColumnId } = getState();
30523
30662
  if (filterOperatorMenuVisibleForColumnId) {
30524
30663
  let handleMouseDown2 = function(event) {
@@ -30545,7 +30684,7 @@ function useColumnFilterOperatorMenu() {
30545
30684
  }
30546
30685
 
30547
30686
  // src/components/InfiniteTable/hooks/useContextMenu.ts
30548
- import { useEffect as useEffect34 } from "react";
30687
+ import { useEffect as useEffect35 } from "react";
30549
30688
 
30550
30689
  // src/components/InfiniteTable/utils/getCellContextMenu.tsx
30551
30690
  import * as React70 from "react";
@@ -30720,7 +30859,7 @@ function useCellContextMenu() {
30720
30859
  } = useOverlay({
30721
30860
  portalContainer: portalDOMRef?.current ?? false
30722
30861
  });
30723
- useEffect34(() => {
30862
+ useEffect35(() => {
30724
30863
  const { actions: actions2, getState: getState2, getDataSourceState } = context;
30725
30864
  const state = getState2();
30726
30865
  return state.cellContextMenu.onChange((info) => {
@@ -30771,7 +30910,7 @@ function useCellContextMenu() {
30771
30910
  }
30772
30911
  });
30773
30912
  }, []);
30774
- useEffect34(() => {
30913
+ useEffect35(() => {
30775
30914
  const { cellContextMenuVisibleFor } = getState();
30776
30915
  if (cellContextMenuVisibleFor) {
30777
30916
  let handleMouseDown2 = function(event) {
@@ -30811,7 +30950,7 @@ function useTableContextMenu() {
30811
30950
  } = useOverlay({
30812
30951
  portalContainer: portalDOMRef?.current ?? false
30813
30952
  });
30814
- useEffect34(() => {
30953
+ useEffect35(() => {
30815
30954
  const { actions: actions2, getState: getState2 } = context;
30816
30955
  const state = getState2();
30817
30956
  return state.contextMenu.onChange((info) => {
@@ -30860,7 +30999,7 @@ function useTableContextMenu() {
30860
30999
  }
30861
31000
  });
30862
31001
  }, []);
30863
- useEffect34(() => {
31002
+ useEffect35(() => {
30864
31003
  const { contextMenuVisibleFor } = getState();
30865
31004
  if (contextMenuVisibleFor) {
30866
31005
  let handleMouseDown2 = function(event) {
@@ -30891,7 +31030,7 @@ import { useRef as useRef31 } from "react";
30891
31030
  import * as React71 from "react";
30892
31031
 
30893
31032
  // src/components/InfiniteTable/hooks/useGridScroll.ts
30894
- import { useCallback as useCallback32, useEffect as useEffect35 } from "react";
31033
+ import { useCallback as useCallback32, useEffect as useEffect36 } from "react";
30895
31034
  function useGridScroll(onScroll, deps) {
30896
31035
  const { brain } = useInfiniteTableSelector((ctx) => {
30897
31036
  return {
@@ -30899,7 +31038,7 @@ function useGridScroll(onScroll, deps) {
30899
31038
  };
30900
31039
  });
30901
31040
  const memoizedOnScroll = useCallback32(onScroll, deps);
30902
- useEffect35(() => {
31041
+ useEffect36(() => {
30903
31042
  const removeOnScroll = brain.onScroll(memoizedOnScroll);
30904
31043
  return removeOnScroll;
30905
31044
  }, [brain, memoizedOnScroll]);
@@ -30973,7 +31112,7 @@ function useVisibleColumnSizes() {
30973
31112
  var DEBUG_NAME = "InfiniteTable";
30974
31113
 
30975
31114
  // src/components/InfiniteTable/hooks/useHorizontalLayout.ts
30976
- import { useEffect as useEffect36 } from "react";
31115
+ import { useEffect as useEffect37 } from "react";
30977
31116
  function useHorizontalLayout() {
30978
31117
  const { getState, actions, dataSourceActions, getDataSourceState } = useInfiniteTableSelector((ctx) => {
30979
31118
  return {
@@ -30990,7 +31129,7 @@ function useHorizontalLayout() {
30990
31129
  if (!wrapRowsHorizontally) {
30991
31130
  repeatWrappedGroupRows = false;
30992
31131
  }
30993
- useEffect36(() => {
31132
+ useEffect37(() => {
30994
31133
  if (!wrapRowsHorizontally) {
30995
31134
  if (getDataSourceState().repeatWrappedGroupRows) {
30996
31135
  dataSourceActions.repeatWrappedGroupRows = false;
@@ -31034,7 +31173,7 @@ function useHorizontalLayout() {
31034
31173
  }
31035
31174
 
31036
31175
  // src/components/InfiniteTable/hooks/useDebugMode.ts
31037
- import { useEffect as useEffect37, useRef as useRef32 } from "react";
31176
+ import { useEffect as useEffect38, useRef as useRef32 } from "react";
31038
31177
 
31039
31178
  // src/utils/themeVarsUtils.ts
31040
31179
  function collectThemeVarNames() {
@@ -31236,7 +31375,7 @@ function useDebugMode() {
31236
31375
  }
31237
31376
  }
31238
31377
  }
31239
- useEffect37(() => {
31378
+ useEffect38(() => {
31240
31379
  const dataSourceState = getDataSourceState();
31241
31380
  if (dataSourceState.debugId !== debugId) {
31242
31381
  dataSourceActions.debugId = debugId;
@@ -31490,7 +31629,7 @@ function useDevTools() {
31490
31629
  const debugId = state.debugId;
31491
31630
  const debugIdRef = useRef32(debugId);
31492
31631
  debugIdRef.current = debugId;
31493
- useEffect37(() => {
31632
+ useEffect38(() => {
31494
31633
  const debugId2 = debugIdRef.current;
31495
31634
  if (!debugId2) {
31496
31635
  return;
@@ -31518,7 +31657,7 @@ function useDevTools() {
31518
31657
  withHookFn(hookFn2);
31519
31658
  });
31520
31659
  }, []);
31521
- useEffect37(() => {
31660
+ useEffect38(() => {
31522
31661
  const debugId2 = debugIdRef.current;
31523
31662
  if (!debugId2) {
31524
31663
  return;
@@ -31536,7 +31675,7 @@ function useDevTools() {
31536
31675
  });
31537
31676
  }
31538
31677
  });
31539
- useEffect37(() => {
31678
+ useEffect38(() => {
31540
31679
  if (!debugId) {
31541
31680
  return;
31542
31681
  }
@@ -31815,7 +31954,7 @@ import * as React78 from "react";
31815
31954
 
31816
31955
  // src/components/InfiniteTable/hooks/useCellRendering.tsx
31817
31956
  import { useMemo as useMemo20 } from "react";
31818
- import { useCallback as useCallback34, useEffect as useEffect38, useRef as useRef33 } from "react";
31957
+ import { useCallback as useCallback34, useEffect as useEffect39, useRef as useRef33 } from "react";
31819
31958
  import * as React75 from "react";
31820
31959
 
31821
31960
  // src/components/InfiniteTable/hooks/useYourBrain.ts
@@ -32078,6 +32217,7 @@ function useCellRendering(param) {
32078
32217
  isRowDetailsEnabled,
32079
32218
  cellClassName,
32080
32219
  cellStyle,
32220
+ repaintCellsKey,
32081
32221
  rowStyle,
32082
32222
  rowDetailCache,
32083
32223
  rowClassName,
@@ -32107,6 +32247,7 @@ function useCellRendering(param) {
32107
32247
  isRowDetailsEnabled: ctx.state.isRowDetailEnabled,
32108
32248
  cellClassName: ctx.state.cellClassName,
32109
32249
  cellStyle: ctx.state.cellStyle,
32250
+ repaintCellsKey: ctx.state.repaintCellsKey,
32110
32251
  rowStyle: ctx.state.rowStyle,
32111
32252
  rowDetailCache: ctx.state.rowDetailCache,
32112
32253
  rowClassName: ctx.state.rowClassName,
@@ -32171,17 +32312,17 @@ function useCellRendering(param) {
32171
32312
  rowspan
32172
32313
  });
32173
32314
  const scrollTopMaxRef = useRef33(0);
32174
- useEffect38(() => {
32315
+ useEffect39(() => {
32175
32316
  return brain.onRenderCountChange(() => {
32176
32317
  scrollTopMaxRef.current = brain.scrollTopMax;
32177
32318
  });
32178
32319
  }, [brain]);
32179
- useEffect38(() => {
32320
+ useEffect39(() => {
32180
32321
  return brain.onRenderRangeChange((range) => {
32181
32322
  getState().onRenderRangeChange?.(range);
32182
32323
  });
32183
32324
  }, [brain]);
32184
- useEffect38(() => {
32325
+ useEffect39(() => {
32185
32326
  return brain.onScrollStop((scrollPosition) => {
32186
32327
  const { scrollTop: scrollTop2, scrollLeft: scrollLeft2 } = scrollPosition;
32187
32328
  if (scrollTop2 === 0) {
@@ -32221,13 +32362,13 @@ function useCellRendering(param) {
32221
32362
  }
32222
32363
  });
32223
32364
  }, [brain, onScrollToTop, onScrollToBottom, onScrollStop]);
32224
- useEffect38(() => {
32365
+ useEffect39(() => {
32225
32366
  if (!bodySize.height) {
32226
32367
  return;
32227
32368
  }
32228
32369
  actions.ready = true;
32229
32370
  }, [!!bodySize.height]);
32230
- useEffect38(() => {
32371
+ useEffect39(() => {
32231
32372
  if (!ready) {
32232
32373
  }
32233
32374
  const { onReady } = getState();
@@ -32302,6 +32443,8 @@ function useCellRendering(param) {
32302
32443
  rowClassName,
32303
32444
  cellStyle,
32304
32445
  cellClassName,
32446
+ // the column-level key wins over the table-level one
32447
+ repaintCellsKey: column.repaintCellsKey !== void 0 ? column.repaintCellsKey : repaintCellsKey,
32305
32448
  visibleColumnIds,
32306
32449
  computedColumnOrder,
32307
32450
  // Whether this specific cell is in edit mode
@@ -32343,6 +32486,7 @@ function useCellRendering(param) {
32343
32486
  rowClassName,
32344
32487
  cellClassName,
32345
32488
  cellStyle,
32489
+ repaintCellsKey,
32346
32490
  getDataSourceState,
32347
32491
  dataSourceApi,
32348
32492
  dataSourceActions,
@@ -32398,7 +32542,7 @@ function useCellRendering(param) {
32398
32542
  }
32399
32543
 
32400
32544
  // src/components/InfiniteTable/hooks/useToggleWrapRowsHorizontally.ts
32401
- import { useEffect as useEffect39 } from "react";
32545
+ import { useEffect as useEffect40 } from "react";
32402
32546
  function useToggleWrapRowsHorizontally() {
32403
32547
  const { state, getState, actions } = useInfiniteTableSelector((ctx) => {
32404
32548
  return {
@@ -32409,7 +32553,7 @@ function useToggleWrapRowsHorizontally() {
32409
32553
  });
32410
32554
  const { wrapRowsHorizontally } = state;
32411
32555
  const oldWrapRowsHorizontally = usePrevious(wrapRowsHorizontally);
32412
- useEffect39(() => {
32556
+ useEffect40(() => {
32413
32557
  if (oldWrapRowsHorizontally !== wrapRowsHorizontally) {
32414
32558
  const { brain, headerBrain, renderer, onRenderUpdater } = getState();
32415
32559
  brain.destroy();
@@ -33246,7 +33390,7 @@ var keyboardShortcuts = {
33246
33390
  };
33247
33391
 
33248
33392
  // src/components/hooks/useInterceptedMap.ts
33249
- import { useEffect as useEffect41 } from "react";
33393
+ import { useEffect as useEffect42 } from "react";
33250
33394
  function interceptMap(map2, fns) {
33251
33395
  const { set, delete: deleteKey, clear } = map2;
33252
33396
  if (fns.set) {
@@ -33408,7 +33552,7 @@ _WeakFixedSizeSet.DEFAULT_SIZE = 10;
33408
33552
  var WeakFixedSizeSet = _WeakFixedSizeSet;
33409
33553
 
33410
33554
  // src/components/hooks/useEffectWhenSameDeps.ts
33411
- import { useEffect as useEffect42, useRef as useRef34 } from "react";
33555
+ import { useEffect as useEffect43, useRef as useRef34 } from "react";
33412
33556
  var isSameDeps = (deps, prevDeps) => {
33413
33557
  return deps.every((dep, index) => dep === prevDeps[index]);
33414
33558
  };
@@ -33422,7 +33566,7 @@ var useEffectWhenSameDeps = (callback, deps) => {
33422
33566
  effectDepsRef.current = effectDeps;
33423
33567
  const callbackRef = useRef34(callback);
33424
33568
  callbackRef.current = callback;
33425
- useEffect42(() => {
33569
+ useEffect43(() => {
33426
33570
  if (isInitialRef.current) {
33427
33571
  isInitialRef.current = false;
33428
33572
  return;
@@ -33432,7 +33576,7 @@ var useEffectWhenSameDeps = (callback, deps) => {
33432
33576
  };
33433
33577
 
33434
33578
  // src/components/hooks/useEffectWhen.ts
33435
- import { useEffect as useEffect43, useRef as useRef35 } from "react";
33579
+ import { useEffect as useEffect44, useRef as useRef35 } from "react";
33436
33580
  var isSameDeps2 = (deps, prevDeps, compare) => {
33437
33581
  return deps.every((dep, index) => {
33438
33582
  if (compare) {
@@ -33462,7 +33606,7 @@ var useEffectWhen = (callback, options) => {
33462
33606
  if (sameRespected && differentRespected) {
33463
33607
  isInitialRef.current = false;
33464
33608
  }
33465
- useEffect43(() => {
33609
+ useEffect44(() => {
33466
33610
  if (isInitialRef.current) {
33467
33611
  return;
33468
33612
  }
@@ -33576,11 +33720,11 @@ var FlashingColumnCell = createFlashingColumnCellComponent();
33576
33720
 
33577
33721
  // src/components/HeadlessTable/MatrixDebugger.tsx
33578
33722
  import * as React83 from "react";
33579
- import { useEffect as useEffect44, useRef as useRef37 } from "react";
33723
+ import { useEffect as useEffect45, useRef as useRef37 } from "react";
33580
33724
  import { createPortal as createPortal3 } from "react-dom";
33581
33725
  function INTERNAL_MatrixDebugger(props) {
33582
33726
  const [getState, setGetState] = React83.useState(null);
33583
- useEffect44(() => {
33727
+ useEffect45(() => {
33584
33728
  const { debugTarget } = props;
33585
33729
  const intervalId = setInterval(() => {
33586
33730
  if (globalThis.INFINITE && globalThis.INFINITE[debugTarget]) {
@@ -33603,7 +33747,7 @@ function MatrixDebuggerUI() {
33603
33747
  const { getState } = contextValue;
33604
33748
  const [, rerender] = useRerender();
33605
33749
  const cellManager = getState().renderer.cellManager;
33606
- useEffect44(() => {
33750
+ useEffect45(() => {
33607
33751
  const delayedRerender = debounce(
33608
33752
  () => {
33609
33753
  console.log("rerender");