@infinite-table/infinite-react 6.0.20 → 6.1.0-canary.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.
Files changed (7) hide show
  1. package/index.css +3 -1
  2. package/index.d.ts +143 -97
  3. package/index.dev.js +1302 -886
  4. package/index.dev.mjs +1307 -891
  5. package/index.js +1302 -886
  6. package/index.mjs +1307 -891
  7. package/package.json +2 -2
package/index.mjs CHANGED
@@ -73,7 +73,7 @@ function debounce(fn, { wait }) {
73
73
  }
74
74
 
75
75
  // src/components/InfiniteTable/index.tsx
76
- import * as React69 from "react";
76
+ import * as React70 from "react";
77
77
 
78
78
  // src/utils/join.ts
79
79
  var join = (...args) => args.filter((x) => !!`${x}`).join(" ");
@@ -109,12 +109,15 @@ var DeepMap = class {
109
109
  this.revision = 0;
110
110
  this.emptyKey = Symbol("emptyKey");
111
111
  this.visit = (fn) => {
112
- this.map.forEach((_, k) => this.visitKey(k, this.map, [], fn));
112
+ this.map.forEach((_, k) => this.visitKey(k, this.map, [], fn, false));
113
+ };
114
+ this.visitSome = (fn) => {
115
+ this.visitWithNext([], fn, true);
113
116
  };
114
117
  this.visitDepthFirst = (fn) => {
115
- this.visitWithNext([], fn);
118
+ this.visitWithNext([], fn, false);
116
119
  };
117
- this.visitWithNext = (parentKeys, fn, currentMap = this.map, depthLimit, skipSelfValue) => {
120
+ this.visitWithNext = (parentKeys, fn, earlyReturn, currentMap = this.map, depthLimit, skipSelfValue) => {
118
121
  if (!currentMap) {
119
122
  return;
120
123
  }
@@ -141,22 +144,33 @@ var DeepMap = class {
141
144
  let next = map2 ? () => this.visitWithNext(
142
145
  keys,
143
146
  fn,
147
+ earlyReturn,
144
148
  map2,
145
149
  depthLimit !== void 0 ? depthLimit - 1 : void 0
146
150
  ) : void 0;
147
151
  if (pair.hasOwnProperty("value")) {
148
- fn(pair.value, keys, i, next, pair);
152
+ const res = fn(pair.value, keys, i, next, pair);
153
+ if (earlyReturn && res === true) {
154
+ return true;
155
+ }
149
156
  i++;
150
157
  } else {
151
158
  next?.();
152
159
  }
160
+ return;
153
161
  };
154
162
  if (hasEmptyKey) {
155
163
  iterator(void 0, this.emptyKey);
156
164
  allowEmptyKey = false;
157
165
  i = 0;
158
166
  }
159
- currentMap.forEach(iterator);
167
+ for (const [key, pair] of currentMap) {
168
+ const res = iterator(pair, key);
169
+ if (earlyReturn && res === true) {
170
+ return res;
171
+ }
172
+ }
173
+ return;
160
174
  };
161
175
  this.fill(initial);
162
176
  }
@@ -244,6 +258,7 @@ var DeepMap = class {
244
258
  (_value, keys2, _i, _next, pair2) => {
245
259
  fn({ ...pair2, keys: keys2 });
246
260
  },
261
+ false,
247
262
  currentMap,
248
263
  depthLimit,
249
264
  excludeSelf
@@ -296,6 +311,7 @@ var DeepMap = class {
296
311
  fn(keys2, value);
297
312
  next?.();
298
313
  },
314
+ false,
299
315
  currentMap,
300
316
  depthLimit,
301
317
  excludeSelf
@@ -497,7 +513,7 @@ var DeepMap = class {
497
513
  }
498
514
  return false;
499
515
  }
500
- visitKey(key, currentMap, parentKeys, fn) {
516
+ visitKey(key, currentMap, parentKeys, fn, earlyReturn) {
501
517
  const pair = currentMap.get(key);
502
518
  if (!pair) {
503
519
  return;
@@ -506,15 +522,23 @@ var DeepMap = class {
506
522
  const keys = key === this.emptyKey ? [] : [...parentKeys, key];
507
523
  const next = once(() => {
508
524
  if (map2) {
509
- map2.forEach((_, k) => {
510
- this.visitKey(k, map2, keys, fn);
511
- });
525
+ for (const [k] of map2) {
526
+ const res = this.visitKey(k, map2, keys, fn, earlyReturn);
527
+ if (earlyReturn && res === true) {
528
+ return true;
529
+ }
530
+ }
512
531
  }
532
+ return false;
513
533
  });
514
534
  if (pair.hasOwnProperty("value")) {
515
- fn(pair, keys, next);
535
+ const res = fn(pair, keys, next);
536
+ if (earlyReturn && res === true) {
537
+ return true;
538
+ }
516
539
  }
517
540
  next();
541
+ return;
518
542
  }
519
543
  getArray(fn) {
520
544
  const result = [];
@@ -528,6 +552,13 @@ var DeepMap = class {
528
552
  });
529
553
  return result;
530
554
  }
555
+ rawKeysAt(keys) {
556
+ const map2 = this.getMapAt(keys);
557
+ if (!map2) {
558
+ return [];
559
+ }
560
+ return [...map2.keys()];
561
+ }
531
562
  valuesAt(keys) {
532
563
  const map2 = this.getMapAt(keys);
533
564
  if (!map2) {
@@ -1121,7 +1152,7 @@ function useMasterDetailContext() {
1121
1152
  }
1122
1153
 
1123
1154
  // src/components/HeadlessTable/index.tsx
1124
- import * as React13 from "react";
1155
+ import * as React14 from "react";
1125
1156
  import {
1126
1157
  useCallback as useCallback4,
1127
1158
  useEffect as useEffect7,
@@ -1239,7 +1270,7 @@ var VirtualScrollContainer = React7.forwardRef(
1239
1270
  );
1240
1271
 
1241
1272
  // src/components/HeadlessTable/RawTable.tsx
1242
- import * as React10 from "react";
1273
+ import * as React11 from "react";
1243
1274
  import { useEffect as useEffect4, useLayoutEffect as useLayoutEffect3, useMemo as useMemo2 } from "react";
1244
1275
 
1245
1276
  // src/components/RawList/AvoidReactDiff.tsx
@@ -1488,29 +1519,6 @@ function setInfiniteScrollPosition(scrollPosition, node) {
1488
1519
  );
1489
1520
  }
1490
1521
 
1491
- // src/components/HeadlessTable/ReactHeadlessTableRenderer.tsx
1492
- import * as React9 from "react";
1493
-
1494
- // src/utils/mathIntersection.ts
1495
- function arrayIntersection(...arrays) {
1496
- if (!arrays.length) {
1497
- return [];
1498
- }
1499
- const map2 = /* @__PURE__ */ new Map();
1500
- arrays.forEach((arr) => {
1501
- for (let i = 0, len2 = arr.length; i < len2; i++) {
1502
- const item = arr[i];
1503
- const count = map2.get(item) ?? 0;
1504
- map2.set(item, count + 1);
1505
- }
1506
- return map2;
1507
- });
1508
- const len = arrays.length;
1509
- return arrays[0].filter((x) => {
1510
- return map2.get(x) === len;
1511
- });
1512
- }
1513
-
1514
1522
  // src/utils/raf.ts
1515
1523
  var raf = getGlobal().requestAnimationFrame || ((fn) => {
1516
1524
  return setTimeout(fn, 16);
@@ -2778,300 +2786,861 @@ var MatrixBrain = class extends Logger {
2778
2786
  }
2779
2787
  };
2780
2788
 
2781
- // src/components/HeadlessTable/MappedCells.ts
2782
- var MappedCells = class extends Logger {
2783
- constructor(opts) {
2784
- super(`MappedCells`);
2785
- this.withCellAdditionalInfo = false;
2786
- this.getElementFromListForColumn = (elementsOutsideItemRange, colIndex) => {
2787
- const { elementIndexToCell } = this;
2788
- const last = elementsOutsideItemRange.length - 1;
2789
- for (let i = last; i >= 0; i--) {
2790
- const elementIndex = elementsOutsideItemRange[i];
2791
- const cell = elementIndexToCell[elementIndex];
2792
- if (cell && cell[1] === colIndex) {
2793
- if (i === last) {
2794
- return elementsOutsideItemRange.pop();
2795
- }
2796
- elementsOutsideItemRange.splice(i, 1);
2797
- return elementIndex;
2798
- }
2789
+ // src/components/HeadlessTable/GridCellManager.ts
2790
+ var import_binary_search2 = __toESM(require_binary_search());
2791
+
2792
+ // src/utils/setUtils.ts
2793
+ function setIntersection(...sets) {
2794
+ if (!sets.length) {
2795
+ return /* @__PURE__ */ new Set();
2796
+ }
2797
+ const [first, ...rest] = sets;
2798
+ return new Set([...first].filter((x) => rest.every((set) => set.has(x))));
2799
+ }
2800
+ function setFilter(set, filter) {
2801
+ const result = /* @__PURE__ */ new Set();
2802
+ for (const x of set) {
2803
+ if (filter(x)) {
2804
+ result.add(x);
2805
+ }
2806
+ }
2807
+ return result;
2808
+ }
2809
+ function setFind(set, find) {
2810
+ for (const x of set) {
2811
+ if (find(x)) {
2812
+ return x;
2813
+ }
2814
+ }
2815
+ return void 0;
2816
+ }
2817
+
2818
+ // src/components/HeadlessTable/GridCellPoolForReact.tsx
2819
+ import * as React9 from "react";
2820
+ var CELL_COUNT_BY_DEBUG_ID = /* @__PURE__ */ new Map();
2821
+ var emptyFn = () => {
2822
+ };
2823
+ var GridCellForReact = class {
2824
+ constructor(debugId, cellInfo) {
2825
+ this.element = null;
2826
+ this.mountSubscription = buildSubscriptionCallback();
2827
+ const count = CELL_COUNT_BY_DEBUG_ID.get(debugId) ?? 0;
2828
+ const key = `${debugId}:GridCellReact:${count}`;
2829
+ CELL_COUNT_BY_DEBUG_ID.set(debugId, count + 1);
2830
+ this.debugId = key;
2831
+ this.cellInfo = cellInfo;
2832
+ this.updater = buildSubscriptionCallback();
2833
+ this.node = /* @__PURE__ */ React9.createElement(AvoidReactDiff, { key, name: key, updater: this.updater });
2834
+ this.ref = (htmlElement) => {
2835
+ this.element = htmlElement;
2836
+ if (htmlElement) {
2837
+ this.mountSubscription(this);
2838
+ }
2839
+ };
2840
+ }
2841
+ onMount(callback) {
2842
+ const off = this.mountSubscription.onChange((cell) => {
2843
+ if (cell != null) {
2844
+ callback(cell);
2799
2845
  }
2800
- return elementsOutsideItemRange.pop();
2801
- };
2802
- this.getElementFromListForRow = (elementsOutsideItemRange, _rowIndex) => {
2803
- return elementsOutsideItemRange.pop();
2804
- };
2805
- /**
2806
- * Retrieves the elements that contain rendered cells that are outside
2807
- * of the specified range
2808
- *
2809
- * @param start in [rowIndex, colIndex] format - represents the topmost-leftmost cell visible of the render range
2810
- * @param end in [rowIndex, colIndex] format - represents the bottom-right corner of the visible range. The end is not inclusive,
2811
- * so the last visible cell will be [rowIndex-1, colIndex-1]
2812
- *
2813
- * @returns an array of element indexes that are outside the specified range
2814
- */
2815
- this.getElementsOutsideRenderRange = (range) => {
2846
+ });
2847
+ return off;
2848
+ }
2849
+ destroy() {
2850
+ this.mountSubscription.destroy();
2851
+ this.updater.destroy();
2852
+ this.ref = emptyFn;
2853
+ this.element = null;
2854
+ this.node = null;
2855
+ }
2856
+ getNode() {
2857
+ return this.node;
2858
+ }
2859
+ update(content, additionalInfo) {
2860
+ this.updater(content);
2861
+ this.cellInfo = additionalInfo;
2862
+ }
2863
+ getAdditionalInfo() {
2864
+ return this.cellInfo;
2865
+ }
2866
+ getElement() {
2867
+ return this.element;
2868
+ }
2869
+ };
2870
+ var _GridCellPoolForReact = class extends Logger {
2871
+ constructor(debugId) {
2872
+ super(`${debugId}:GridCellPoolForReact`);
2873
+ this.debugId = debugId;
2874
+ this.cellRemoveSubscription = buildSubscriptionCallback();
2875
+ this.attachedCells = /* @__PURE__ */ new Set();
2876
+ this.detachedCells = /* @__PURE__ */ new Set();
2877
+ this.allCellsOrdered = /* @__PURE__ */ new Set();
2878
+ }
2879
+ destroy() {
2880
+ this.reset();
2881
+ }
2882
+ onRemoveCell(callback) {
2883
+ const off = this.cellRemoveSubscription.onChange((cell) => {
2884
+ if (cell != null) {
2885
+ callback(cell);
2886
+ }
2887
+ });
2888
+ return off;
2889
+ }
2890
+ reset() {
2891
+ this.attachedCells.clear();
2892
+ this.detachedCells.clear();
2893
+ this.allCellsOrdered.clear();
2894
+ this.cellRemoveSubscription.destroy();
2895
+ }
2896
+ getAttachedCells() {
2897
+ return this.attachedCells;
2898
+ }
2899
+ getDetachedCells() {
2900
+ return this.detachedCells;
2901
+ }
2902
+ getAllCells() {
2903
+ return this.allCellsOrdered;
2904
+ }
2905
+ /**
2906
+ * This should be the only place where we create a new cell.
2907
+ */
2908
+ createCell() {
2909
+ const cell = new GridCellForReact(this.debugId);
2910
+ this.detachedCells.add(cell);
2911
+ this.allCellsOrdered.add(cell);
2912
+ return cell;
2913
+ }
2914
+ /**
2915
+ * This really removes the cell, not only makes it detached,
2916
+ * but removes it from the render tree and from the pool.
2917
+ */
2918
+ removeCell(cell) {
2919
+ if (false) {
2920
+ if (!this.detachedCells.has(cell)) {
2921
+ this.error(
2922
+ `You want to remove the cell, but it's not in the detached cells set!`
2923
+ );
2924
+ }
2925
+ }
2926
+ this.detachedCells.delete(cell);
2927
+ this.attachedCells.delete(cell);
2928
+ this.allCellsOrdered.delete(cell);
2929
+ cell.destroy();
2930
+ this.cellRemoveSubscription(cell);
2931
+ }
2932
+ /**
2933
+ * This attaches a cell to the table.
2934
+ * If no cell is provided, it will get a detached one from the pool
2935
+ * and move that cell to the attached set.
2936
+ * If a cell is provided, it's moved to the attached set as well.
2937
+ */
2938
+ attachCell(cell) {
2939
+ if (!cell) {
2940
+ cell = this.getDetachedCell();
2941
+ }
2942
+ this.detachedCells.delete(cell);
2943
+ this.attachedCells.add(cell);
2944
+ return cell;
2945
+ }
2946
+ detachCell(cell) {
2947
+ this.attachedCells.delete(cell);
2948
+ this.detachedCells.add(cell);
2949
+ }
2950
+ /**
2951
+ * This gets a detached cell from the pool.
2952
+ * If no detached cell is available, it will create a new one and return that.
2953
+ */
2954
+ getDetachedCell() {
2955
+ const { detachedCells } = this;
2956
+ let cell = detachedCells.values().next().value;
2957
+ if (!cell) {
2958
+ this.poolSize += _GridCellPoolForReact.POOL_SIZE_INCREMENT;
2959
+ }
2960
+ cell = detachedCells.values().next().value;
2961
+ if (!cell) {
2962
+ this.error("No cells available in the pool!");
2963
+ }
2964
+ return cell;
2965
+ }
2966
+ get attachedSize() {
2967
+ return this.attachedCells.size;
2968
+ }
2969
+ get detachedSize() {
2970
+ return this.detachedCells.size;
2971
+ }
2972
+ get poolSize() {
2973
+ return this.allCellsOrdered.size;
2974
+ }
2975
+ set poolSize(value) {
2976
+ value = Math.ceil(value / _GridCellPoolForReact.POOL_SIZE_INCREMENT) * _GridCellPoolForReact.POOL_SIZE_INCREMENT;
2977
+ const currentSize = this.poolSize;
2978
+ if (value === currentSize) {
2979
+ return;
2980
+ }
2981
+ const { detachedCells } = this;
2982
+ let diff = currentSize - value;
2983
+ if (diff > 0) {
2984
+ if (diff > detachedCells.size) {
2985
+ diff = detachedCells.size;
2986
+ this.debug("Trying to destroy more cells than are currently detached!");
2987
+ }
2988
+ const iterator = detachedCells.values();
2989
+ while (diff > 0) {
2990
+ const cell = iterator.next().value;
2991
+ this.removeCell(cell);
2992
+ diff--;
2993
+ }
2994
+ } else {
2995
+ diff = -diff;
2996
+ while (diff > 0) {
2997
+ this.createCell();
2998
+ diff--;
2999
+ }
3000
+ }
3001
+ }
3002
+ };
3003
+ var GridCellPoolForReact = _GridCellPoolForReact;
3004
+ // we'll grow the pool by this amount at a time
3005
+ GridCellPoolForReact.POOL_SIZE_INCREMENT = 5;
3006
+
3007
+ // src/components/HeadlessTable/GridCellManager.ts
3008
+ var GridCellManager = class extends Logger {
3009
+ constructor(debugId) {
3010
+ super(`${debugId}:GridCellManager`);
3011
+ this.matrix = new DeepMap();
3012
+ this.matrixWithHistory = new DeepMap();
3013
+ this.cellToMatrixPosition = /* @__PURE__ */ new WeakMap();
3014
+ this.getCellsOutsideRenderRange = (range) => {
2816
3015
  const { start, end } = range;
2817
3016
  const [startRow, startCol] = start;
2818
3017
  const [endRow, endCol] = end;
2819
- const result = [];
2820
- for (let elementIndex = 0, len = this.elementIndexToCell.length; elementIndex < len; elementIndex++) {
2821
- const entry = this.elementIndexToCell[elementIndex];
2822
- if (!entry) {
2823
- continue;
3018
+ const cells = /* @__PURE__ */ new Set();
3019
+ this.matrix.visit(({ value: cell }, cellPos) => {
3020
+ if (!cell) {
3021
+ return;
2824
3022
  }
2825
- const [rowIndex, colIndex] = entry;
3023
+ const [rowIndex, colIndex] = cellPos;
2826
3024
  const rowBefore = rowIndex < startRow;
2827
3025
  const rowAfter = rowIndex >= endRow;
2828
3026
  const colBefore = colIndex < startCol;
2829
3027
  const colAfter = colIndex >= endCol;
2830
3028
  const outsideRenderRange = rowBefore || rowAfter || colBefore || colAfter;
2831
3029
  if (outsideRenderRange) {
2832
- result.push(elementIndex);
3030
+ cells.add(cell);
2833
3031
  }
2834
- }
2835
- return result;
2836
- };
2837
- this.isCellRendered = (rowIndex, columnIndex) => {
2838
- return this.cellToElementIndex.has([rowIndex, columnIndex]);
2839
- };
2840
- this.getCellAdditionalInfo = (rowIndex, columnIndex) => {
2841
- return this.cellAdditionalInfo.get([rowIndex, columnIndex]);
2842
- };
2843
- this.isElementRendered = (elementIndex) => {
2844
- return !!this.elementIndexToCell[elementIndex];
2845
- };
2846
- this.getElementsForRowIndex = (rowIndex) => {
2847
- return this.cellToElementIndex.getValuesStartingWith([rowIndex]);
2848
- };
2849
- this.getAdditionalInfoForRowIndex = (rowIndex) => {
2850
- return this.cellAdditionalInfo.getValuesStartingWith([rowIndex]);
2851
- };
2852
- this.getRenderedNodeAtElement = (elementIndex) => {
2853
- return this.renderedElements[elementIndex] || null;
2854
- };
2855
- this.getRenderedCellAtElement = (elementIndex) => {
2856
- const cell = this.elementIndexToCell[elementIndex];
2857
- return cell || null;
2858
- };
2859
- this.getRenderedNodeForCell = (rowIndex, columnIndex) => {
2860
- const elementIndex = this.cellToElementIndex.get([rowIndex, columnIndex]);
2861
- return elementIndex != null ? this.renderedElements[elementIndex] || null : null;
2862
- };
2863
- this.getElementIndexForCell = (rowIndex, columnIndex) => {
2864
- const elementIndex = this.cellToElementIndex.get([rowIndex, columnIndex]);
2865
- return elementIndex ?? null;
3032
+ });
3033
+ return cells;
2866
3034
  };
2867
- this.renderCellAtElement = (rowIndex, colIndex, elementIndex, renderNode, cellAdditionalInfo) => {
2868
- if (false) {
2869
- this.debug(
2870
- `Render cell ${rowIndex},${colIndex} at element ${elementIndex}`
2871
- );
2872
- }
2873
- const key = [rowIndex, colIndex];
2874
- const currentCell = this.elementIndexToCell[elementIndex];
2875
- if (currentCell) {
2876
- const currentCellKey = [currentCell[0], currentCell[1]];
2877
- this.cellToElementIndex.delete(currentCellKey);
2878
- if (this.withCellAdditionalInfo) {
2879
- this.cellAdditionalInfo.delete(currentCellKey);
2880
- }
2881
- }
2882
- if (renderNode) {
2883
- this.renderedElements[elementIndex] = renderNode;
3035
+ this.debugId = debugId;
3036
+ this.pool = new GridCellPoolForReact(debugId);
3037
+ this.offRemoveCell = this.pool.onRemoveCell(
3038
+ (cell) => this.onRemoveCell(cell)
3039
+ );
3040
+ }
3041
+ onRemoveCell(cell) {
3042
+ const cellPos = this.cellToMatrixPosition.get(cell);
3043
+ this.cellToMatrixPosition.delete(cell);
3044
+ if (!cellPos) {
3045
+ return;
3046
+ }
3047
+ this.matrix.delete(cellPos);
3048
+ let cellsAtPos = this.matrixWithHistory.get(cellPos);
3049
+ if (cellsAtPos) {
3050
+ cellsAtPos.delete(cell);
3051
+ }
3052
+ }
3053
+ set poolSize(cellCount) {
3054
+ this.pool.poolSize = cellCount;
3055
+ }
3056
+ get poolSize() {
3057
+ return this.pool.poolSize;
3058
+ }
3059
+ getDetachedCell() {
3060
+ console.warn("getting detached cell");
3061
+ return this.pool.getDetachedCell();
3062
+ }
3063
+ setCellPositionInMatrix(cell, cellPos) {
3064
+ if (cellPos == null) {
3065
+ const currentCellPos = this.cellToMatrixPosition.get(cell);
3066
+ if (currentCellPos) {
3067
+ this.matrix.delete(currentCellPos);
2884
3068
  }
2885
- this.elementIndexToCell[elementIndex] = [rowIndex, colIndex];
2886
- this.cellToElementIndex.set(key, elementIndex);
2887
- if (this.withCellAdditionalInfo && cellAdditionalInfo !== void 0) {
2888
- this.cellAdditionalInfo.set(key, cellAdditionalInfo);
3069
+ } else {
3070
+ let prevCellPos = this.cellToMatrixPosition.get(cell);
3071
+ const samePos = prevCellPos && prevCellPos[0] === cellPos[0] && prevCellPos[1] === cellPos[1];
3072
+ this.matrix.set(cellPos, cell);
3073
+ this.cellToMatrixPosition.set(cell, cellPos);
3074
+ let cellsAtPos = this.matrixWithHistory.get(cellPos);
3075
+ if (!cellsAtPos) {
3076
+ cellsAtPos = /* @__PURE__ */ new Set();
3077
+ cellsAtPos.add(cell);
3078
+ this.matrixWithHistory.set(cellPos, cellsAtPos);
3079
+ } else {
3080
+ cellsAtPos.add(cell);
2889
3081
  }
2890
- };
2891
- this.discardCell = (rowIndex, colIndex) => {
2892
- const key = [rowIndex, colIndex];
2893
- const elementIndex = this.cellToElementIndex.get(key);
2894
- if (elementIndex != null) {
2895
- this.renderedElements[elementIndex] = null;
2896
- this.elementIndexToCell[elementIndex] = null;
2897
- this.cellToElementIndex.delete(key);
2898
- if (this.withCellAdditionalInfo) {
2899
- this.cellAdditionalInfo.delete(key);
3082
+ if (prevCellPos && !samePos) {
3083
+ this.matrix.delete(prevCellPos);
3084
+ let cellsAtPrevPos = this.matrixWithHistory.get(prevCellPos);
3085
+ if (cellsAtPrevPos) {
3086
+ cellsAtPrevPos.delete(cell);
2900
3087
  }
2901
3088
  }
2902
- };
2903
- this.discardElement = (elementIndex) => {
2904
- const cell = this.elementIndexToCell[elementIndex];
2905
- if (cell) {
2906
- const key = [cell[0], cell[1]];
2907
- this.renderedElements[elementIndex] = null;
2908
- this.elementIndexToCell[elementIndex] = null;
2909
- this.cellToElementIndex.delete(key);
2910
- if (this.withCellAdditionalInfo) {
2911
- this.cellAdditionalInfo.delete(key);
2912
- }
2913
- return cell;
3089
+ }
3090
+ }
3091
+ renderNodeAtCell(node, cell, cellPos, additionalInfo) {
3092
+ const currentCellAtPos = this.getCellAt(cellPos);
3093
+ if (currentCellAtPos) {
3094
+ if (currentCellAtPos !== cell) {
3095
+ this.detachCellAt(cellPos);
3096
+ this.detachCell(cell);
3097
+ } else {
2914
3098
  }
3099
+ } else {
3100
+ this.detachCell(cell);
3101
+ }
3102
+ this.pool.attachCell(cell);
3103
+ this.setCellPositionInMatrix(cell, cellPos);
3104
+ cell.update(node, additionalInfo);
3105
+ return cell;
3106
+ }
3107
+ getCellPosition(cell) {
3108
+ const cellPos = this.cellToMatrixPosition.get(cell);
3109
+ if (!cellPos) {
2915
3110
  return null;
2916
- };
2917
- this.discardElementsStartingWith = (elIndex, callback) => {
2918
- let discardedCell = null;
2919
- let oneDiscarded = false;
2920
- if (elIndex < this.elementIndexToCell.length) {
2921
- for (let elementIndex = elIndex, len = this.elementIndexToCell.length; elementIndex < len; elementIndex++) {
2922
- discardedCell = this.discardElement(elementIndex);
2923
- if (discardedCell) {
2924
- oneDiscarded = true;
3111
+ }
3112
+ const cellAtPos = this.getCellAt(cellPos);
3113
+ if (cellAtPos != cell) {
3114
+ return null;
3115
+ }
3116
+ return cellPos;
3117
+ }
3118
+ getCellAt(cellPos) {
3119
+ return this.matrix.get(cellPos);
3120
+ }
3121
+ /**
3122
+ * This gets a cell for a given position.
3123
+ * If there's already a cell currently attached at that position, it will be returned.
3124
+ *
3125
+ * Otherwise, we try to return the most optimal cell to use for that position.
3126
+ * If the optimise parameter is set to 'row', we will try to return a detached cell
3127
+ * that was last rendered in that row.
3128
+ *
3129
+ * If the optimise parameter is set to 'column', we will try to return a detached cell
3130
+ * that was last rendered in that column.
3131
+ *
3132
+ * @param cellPos [rowIndex, colIndex]
3133
+ * @param optimise 'row' | 'column'
3134
+ */
3135
+ getCellFor(cellPos, optimise) {
3136
+ let cell = this.getCellAt(cellPos);
3137
+ if (cell) {
3138
+ return cell;
3139
+ }
3140
+ const [rowIndex, colIndex] = cellPos;
3141
+ if (optimise === "row") {
3142
+ this.matrixWithHistory.visitSome((cellsForPos, [row], __, next) => {
3143
+ if (cell) {
3144
+ return true;
3145
+ }
3146
+ if (row === rowIndex) {
3147
+ cell = setFind(cellsForPos, (c) => !this.isCellAttached(c));
3148
+ if (cell) {
3149
+ return true;
2925
3150
  }
2926
- if (callback) {
2927
- callback(elementIndex, discardedCell);
3151
+ }
3152
+ next?.();
3153
+ return false;
3154
+ });
3155
+ }
3156
+ if (optimise === "column") {
3157
+ this.matrixWithHistory.visitSome((cellsForPos, [_row, col], __, next) => {
3158
+ if (cell) {
3159
+ return true;
3160
+ }
3161
+ if (col === colIndex) {
3162
+ cell = setFind(cellsForPos, (c) => !this.isCellAttached(c));
3163
+ if (cell) {
3164
+ return true;
2928
3165
  }
2929
3166
  }
2930
- this.elementIndexToCell.length = elIndex;
2931
- this.renderedElements.length = elIndex;
3167
+ next?.();
3168
+ return false;
3169
+ });
3170
+ }
3171
+ return cell ?? this.getDetachedCell();
3172
+ }
3173
+ isCellAttached(cell) {
3174
+ return this.getCellPosition(cell) !== null;
3175
+ }
3176
+ isCellAttachedAt(cellPos) {
3177
+ const cell = this.getCellAt(cellPos);
3178
+ if (!cell) {
3179
+ return false;
3180
+ }
3181
+ return this.isCellAttached(cell);
3182
+ }
3183
+ getMatrix() {
3184
+ const lastRow = this.getRowsWithCells().pop() ?? -1;
3185
+ const lastColumn = this.getColumnsWithCells().pop() ?? -1;
3186
+ const matrix = Array.from({ length: lastRow + 1 }, (_, rowIndex) => {
3187
+ const row = Array.from({ length: lastColumn + 1 }, (_2, colIndex) => {
3188
+ const cellPos = [rowIndex, colIndex];
3189
+ const cell = this.getCellAt(cellPos);
3190
+ return cell ? cell.getNode() : null;
3191
+ });
3192
+ return row;
3193
+ });
3194
+ return matrix;
3195
+ }
3196
+ getAllCells() {
3197
+ return [...this.pool.getAllCells()];
3198
+ }
3199
+ getCellsForRow(rowIndex) {
3200
+ return this.matrix.getKeysStartingWith([rowIndex]).map((cellPos) => {
3201
+ return this.getCellAt(cellPos);
3202
+ }).filter(Boolean);
3203
+ }
3204
+ getOneAttachedCell() {
3205
+ const cells = this.pool.getAttachedCells();
3206
+ const cell = cells.values().next().value;
3207
+ return cell;
3208
+ }
3209
+ getRowsWithCells() {
3210
+ return this.matrix.rawKeysAt([]).sort();
3211
+ }
3212
+ getColumnsWithCells() {
3213
+ const positions = this.matrix.getUnnestedKeysStartingWith([], true);
3214
+ const columns = new Set(positions.map((pos) => pos[1]));
3215
+ return [...columns.values()].sort();
3216
+ }
3217
+ isRowAttached(rowIndex) {
3218
+ return this.getRowsWithCells().includes(rowIndex);
3219
+ }
3220
+ isColumnAttached(colIndex) {
3221
+ return this.getColumnsWithCells().includes(colIndex);
3222
+ }
3223
+ detachRow(rowIndex) {
3224
+ const cellPositions = this.matrix.getKeysStartingWith([
3225
+ rowIndex
3226
+ ]);
3227
+ cellPositions.forEach((cellPos) => this.detachCellAt(cellPos));
3228
+ }
3229
+ detachCol(colIndex) {
3230
+ this.matrix.visit((_, cellPos) => {
3231
+ if (cellPos[1] === colIndex) {
3232
+ this.detachCellAt(cellPos);
2932
3233
  }
2933
- return oneDiscarded;
2934
- };
2935
- this.init();
2936
- if (opts?.withCellAdditionalInfo) {
2937
- this.withCellAdditionalInfo = opts.withCellAdditionalInfo;
3234
+ });
3235
+ }
3236
+ detachCell(cell) {
3237
+ const cellPos = this.getCellPosition(cell);
3238
+ if (cellPos) {
3239
+ this.detachCellAt(cellPos);
2938
3240
  }
2939
3241
  }
2940
- init() {
2941
- this.elementIndexToCell = [];
2942
- this.cellToElementIndex = new DeepMap();
2943
- this.cellAdditionalInfo = new DeepMap();
2944
- this.renderedElements = [];
3242
+ detachCells(cells) {
3243
+ cells.forEach((cell) => this.detachCell(cell));
2945
3244
  }
2946
- reset() {
2947
- this.init();
3245
+ detachRowsStartingWith(rowIndex) {
3246
+ const rows = this.getRowsWithCells().sort();
3247
+ let idx = (0, import_binary_search2.default)(rows, rowIndex, (a, b) => a - b);
3248
+ if (idx < 0) {
3249
+ idx = ~idx;
3250
+ }
3251
+ const rowsToDiscard = rows.slice(idx);
3252
+ rowsToDiscard.forEach((row) => this.detachRow(row));
3253
+ }
3254
+ detachColsStartingWith(colIndex) {
3255
+ const cols = this.getColumnsWithCells().sort();
3256
+ let idx = (0, import_binary_search2.default)(cols, colIndex, (a, b) => a - b);
3257
+ if (idx < 0) {
3258
+ idx = ~idx;
3259
+ }
3260
+ const colsToDiscard = cols.slice(idx);
3261
+ colsToDiscard.forEach((col) => this.detachCol(col));
3262
+ }
3263
+ detachCellsStartingAt(cellPos) {
3264
+ const [rowIndex, colIndex] = cellPos;
3265
+ this.matrix.visit((_, cellPos2) => {
3266
+ const [row, col] = cellPos2;
3267
+ if (row >= rowIndex || col >= colIndex) {
3268
+ this.detachCellAt(cellPos2);
3269
+ }
3270
+ });
3271
+ }
3272
+ detachCellAt(cellPos) {
3273
+ const cell = this.getCellAt(cellPos);
3274
+ if (cell) {
3275
+ this.setCellPositionInMatrix(cell, null);
3276
+ this.pool.detachCell(cell);
3277
+ }
3278
+ }
3279
+ getCellFromListForRow(cells, rowIndex) {
3280
+ return setFind(cells, (cell) => {
3281
+ return this.getCellPosition(cell)?.[0] === rowIndex;
3282
+ });
3283
+ }
3284
+ getCellFromListForColumn(cells, colIndex) {
3285
+ return setFind(cells, (cell) => {
3286
+ return this.getCellPosition(cell)?.[1] === colIndex;
3287
+ });
3288
+ }
3289
+ getCellCountInMatrix() {
3290
+ return this.matrix.size;
2948
3291
  }
2949
3292
  destroy() {
2950
- this.elementIndexToCell = [];
2951
- this.cellToElementIndex.clear();
2952
- this.cellAdditionalInfo.clear();
2953
- this.renderedElements = [];
3293
+ this.reset();
3294
+ }
3295
+ reset() {
3296
+ this.pool.reset();
3297
+ this.matrix.clear();
3298
+ this.matrixWithHistory.clear();
3299
+ this.offRemoveCell();
3300
+ this.offRemoveCell = () => {
3301
+ };
3302
+ }
3303
+ makeDetachedCellsEmpty() {
3304
+ this.pool.getDetachedCells().forEach((cell) => {
3305
+ cell.update(null);
3306
+ });
2954
3307
  }
2955
3308
  };
2956
3309
 
2957
- // src/components/HeadlessTable/MappedVirtualRows.ts
2958
- var MappedVirtualRows = class extends Logger {
2959
- constructor() {
2960
- super(`MappedVirtualRows`);
2961
- /**
2962
- * Retrieves the elements that contain rendered rows that are outside
2963
- * of the specified range
2964
- *
2965
- * @param start in [rowIndex, colIndex] format - represents the topmost-leftmost cell visible of the render range
2966
- * @param end in [rowIndex, colIndex] format - represents the bottom-right corner of the visible range. The end is not inclusive,
2967
- * so the last visible cell will be [rowIndex-1, colIndex-1]
2968
- *
2969
- * @returns an array of element indexes that are outside the specified range
2970
- */
2971
- this.getElementsOutsideRenderRange = (range) => {
2972
- const { start, end } = range;
2973
- const [startRow] = start;
2974
- const [endRow] = end;
2975
- const result = [];
2976
- for (let elementIndex = 0, len = this.elementIndexToRowIndex.length; elementIndex < len; elementIndex++) {
2977
- const currentRowIndex = this.elementIndexToRowIndex[elementIndex];
2978
- if (currentRowIndex == null) {
2979
- continue;
2980
- }
2981
- const rowBefore = currentRowIndex < startRow;
2982
- const rowAfter = currentRowIndex >= endRow;
2983
- const outsideRenderRange = rowBefore || rowAfter;
2984
- if (outsideRenderRange) {
2985
- result.push(elementIndex);
2986
- }
3310
+ // src/components/HeadlessTable/ListRowManager.ts
3311
+ var import_binary_search3 = __toESM(require_binary_search());
3312
+
3313
+ // src/components/HeadlessTable/ListRowPoolForReact.tsx
3314
+ import * as React10 from "react";
3315
+ var ROW_COUNT_BY_DEBUG_ID = /* @__PURE__ */ new Map();
3316
+ var emptyFn2 = () => {
3317
+ };
3318
+ var ListRowForReact = class {
3319
+ constructor(debugId) {
3320
+ this.element = null;
3321
+ this.mountSubscription = buildSubscriptionCallback();
3322
+ const count = ROW_COUNT_BY_DEBUG_ID.get(debugId) ?? 0;
3323
+ const key = `${debugId}:ListRowReact:${count}`;
3324
+ ROW_COUNT_BY_DEBUG_ID.set(debugId, count + 1);
3325
+ this.debugId = key;
3326
+ this.updater = buildSubscriptionCallback();
3327
+ this.node = /* @__PURE__ */ React10.createElement(
3328
+ AvoidReactDiff,
3329
+ {
3330
+ key: `detail-row-${key}`,
3331
+ name: `detail-row-${key}`,
3332
+ updater: this.updater
3333
+ }
3334
+ );
3335
+ this.ref = (htmlElement) => {
3336
+ this.element = htmlElement;
3337
+ if (htmlElement) {
3338
+ this.mountSubscription(this);
2987
3339
  }
2988
- return result;
2989
- };
2990
- this.isRowRendered = (rowIndex) => {
2991
- return this.rowToElementIndex[rowIndex] != null;
2992
- };
2993
- this.isElementRendered = (elementIndex) => {
2994
- return this.elementIndexToRowIndex[elementIndex] != null;
2995
- };
2996
- this.getRenderedNodeAtElement = (elementIndex) => {
2997
- return this.renderedElements[elementIndex] || null;
2998
- };
2999
- this.getRenderedRowAtElement = (elementIndex) => {
3000
- const row = this.elementIndexToRowIndex[elementIndex];
3001
- return row ?? null;
3002
- };
3003
- this.getRenderedNodeForRow = (rowIndex) => {
3004
- const elementIndex = this.rowToElementIndex[rowIndex];
3005
- return elementIndex != null ? this.renderedElements[elementIndex] ?? null : null;
3006
- };
3007
- this.getElementIndexForRow = (rowIndex) => {
3008
- const elementIndex = this.rowToElementIndex[rowIndex];
3009
- return elementIndex ?? null;
3010
3340
  };
3011
- this.renderRowAtElement = (rowIndex, elementIndex, renderNode) => {
3012
- if (false) {
3013
- this.debug(`Render row ${rowIndex} at element ${elementIndex}`);
3341
+ }
3342
+ onMount(callback) {
3343
+ const off = this.mountSubscription.onChange((row) => {
3344
+ if (row != null) {
3345
+ callback(row);
3014
3346
  }
3015
- const currentRow = this.elementIndexToRowIndex[elementIndex];
3016
- if (currentRow != null) {
3017
- this.rowToElementIndex[currentRow] = null;
3347
+ });
3348
+ return off;
3349
+ }
3350
+ destroy() {
3351
+ this.mountSubscription.destroy();
3352
+ this.updater.destroy();
3353
+ this.ref = emptyFn2;
3354
+ this.element = null;
3355
+ this.node = null;
3356
+ }
3357
+ getNode() {
3358
+ return this.node;
3359
+ }
3360
+ update(content) {
3361
+ this.updater(content);
3362
+ }
3363
+ getElement() {
3364
+ return this.element;
3365
+ }
3366
+ };
3367
+ var _ListRowPoolForReact = class extends Logger {
3368
+ constructor(debugId) {
3369
+ super(`${debugId}:ListRowPoolForReact`);
3370
+ this.debugId = debugId;
3371
+ this.rowRemoveSubscription = buildSubscriptionCallback();
3372
+ this.attachedRows = /* @__PURE__ */ new Set();
3373
+ this.detachedRows = /* @__PURE__ */ new Set();
3374
+ this.allRowsOrdered = /* @__PURE__ */ new Set();
3375
+ }
3376
+ destroy() {
3377
+ this.reset();
3378
+ }
3379
+ onRemoveRow(callback) {
3380
+ const off = this.rowRemoveSubscription.onChange((row) => {
3381
+ if (row != null) {
3382
+ callback(row);
3018
3383
  }
3019
- if (renderNode !== void 0) {
3020
- this.renderedElements[elementIndex] = renderNode;
3384
+ });
3385
+ return off;
3386
+ }
3387
+ reset() {
3388
+ this.attachedRows.clear();
3389
+ this.detachedRows.clear();
3390
+ this.allRowsOrdered.clear();
3391
+ this.rowRemoveSubscription.destroy();
3392
+ }
3393
+ getAttachedRows() {
3394
+ return this.attachedRows;
3395
+ }
3396
+ getDetachedRows() {
3397
+ return this.detachedRows;
3398
+ }
3399
+ getAllRows() {
3400
+ return this.allRowsOrdered;
3401
+ }
3402
+ /**
3403
+ * This should be the only place where we create a new cell.
3404
+ */
3405
+ createRow() {
3406
+ const row = new ListRowForReact(this.debugId);
3407
+ this.detachedRows.add(row);
3408
+ this.allRowsOrdered.add(row);
3409
+ return row;
3410
+ }
3411
+ /**
3412
+ * This really removes the cell, not only makes it detached,
3413
+ * but removes it from the render tree and from the pool.
3414
+ */
3415
+ removeRow(row) {
3416
+ if (false) {
3417
+ if (!this.detachedRows.has(row)) {
3418
+ this.error(
3419
+ `You want to remove the row, but it's not in the detached rows set!`
3420
+ );
3021
3421
  }
3022
- this.elementIndexToRowIndex[elementIndex] = rowIndex;
3023
- this.rowToElementIndex[rowIndex] = elementIndex;
3024
- };
3025
- this.discardRow = (rowIndex) => {
3026
- const elementIndex = this.rowToElementIndex[rowIndex];
3027
- if (elementIndex != null) {
3028
- this.renderedElements[elementIndex] = null;
3029
- this.elementIndexToRowIndex[elementIndex] = null;
3030
- this.rowToElementIndex[rowIndex] = null;
3422
+ }
3423
+ this.detachedRows.delete(row);
3424
+ this.attachedRows.delete(row);
3425
+ this.allRowsOrdered.delete(row);
3426
+ row.destroy();
3427
+ this.rowRemoveSubscription(row);
3428
+ }
3429
+ /**
3430
+ * This attaches a row to the list.
3431
+ * If no row is provided, it will get a detached one from the pool
3432
+ * and move that row to the attached set.
3433
+ * If a row is provided, it's moved to the attached set as well.
3434
+ */
3435
+ attachRow(row) {
3436
+ if (!row) {
3437
+ row = this.getDetachedRow();
3438
+ }
3439
+ this.detachedRows.delete(row);
3440
+ this.attachedRows.add(row);
3441
+ return row;
3442
+ }
3443
+ detachRow(row) {
3444
+ this.attachedRows.delete(row);
3445
+ this.detachedRows.add(row);
3446
+ }
3447
+ /**
3448
+ * This gets a detached row from the pool.
3449
+ * If no detached row is available, it will create a new one and return that.
3450
+ */
3451
+ getDetachedRow() {
3452
+ const { detachedRows } = this;
3453
+ let row = detachedRows.values().next().value;
3454
+ if (!row) {
3455
+ this.poolSize += _ListRowPoolForReact.POOL_SIZE_INCREMENT;
3456
+ }
3457
+ row = detachedRows.values().next().value;
3458
+ if (!row) {
3459
+ this.error("No rows available in the pool!");
3460
+ }
3461
+ return row;
3462
+ }
3463
+ get attachedSize() {
3464
+ return this.attachedRows.size;
3465
+ }
3466
+ get detachedSize() {
3467
+ return this.detachedRows.size;
3468
+ }
3469
+ get poolSize() {
3470
+ return this.allRowsOrdered.size;
3471
+ }
3472
+ set poolSize(value) {
3473
+ value = Math.ceil(value / _ListRowPoolForReact.POOL_SIZE_INCREMENT) * _ListRowPoolForReact.POOL_SIZE_INCREMENT;
3474
+ const currentSize = this.poolSize;
3475
+ if (value === currentSize) {
3476
+ return;
3477
+ }
3478
+ const { detachedRows } = this;
3479
+ let diff = currentSize - value;
3480
+ if (diff > 0) {
3481
+ if (diff > detachedRows.size) {
3482
+ diff = detachedRows.size;
3483
+ this.debug("Trying to destroy more rows than are currently detached!");
3031
3484
  }
3032
- };
3033
- this.discardElement = (elementIndex) => {
3034
- const rowIndex = this.elementIndexToRowIndex[elementIndex];
3035
- if (rowIndex != null) {
3036
- this.renderedElements[elementIndex] = null;
3037
- this.elementIndexToRowIndex[elementIndex] = null;
3038
- this.rowToElementIndex[rowIndex] = null;
3039
- return rowIndex;
3485
+ const iterator = detachedRows.values();
3486
+ while (diff > 0) {
3487
+ const row = iterator.next().value;
3488
+ this.removeRow(row);
3489
+ diff--;
3040
3490
  }
3041
- return null;
3042
- };
3043
- this.discardElementsStartingWith = (elIndex, callback) => {
3044
- let discardedRow = null;
3045
- let oneDiscarded = false;
3046
- if (elIndex < this.elementIndexToRowIndex.length) {
3047
- for (let elementIndex = elIndex, len = this.elementIndexToRowIndex.length; elementIndex < len; elementIndex++) {
3048
- discardedRow = this.discardElement(elementIndex);
3049
- if (discardedRow) {
3050
- oneDiscarded = true;
3051
- }
3052
- if (callback) {
3053
- callback(elementIndex, discardedRow);
3054
- }
3055
- }
3056
- this.elementIndexToRowIndex.length = elIndex;
3057
- this.renderedElements.length = elIndex;
3491
+ } else {
3492
+ diff = -diff;
3493
+ while (diff > 0) {
3494
+ this.createRow();
3495
+ diff--;
3058
3496
  }
3059
- return oneDiscarded;
3060
- };
3061
- this.init();
3497
+ }
3498
+ }
3499
+ };
3500
+ var ListRowPoolForReact = _ListRowPoolForReact;
3501
+ // we'll grow the pool by this amount at a time
3502
+ ListRowPoolForReact.POOL_SIZE_INCREMENT = 5;
3503
+
3504
+ // src/components/HeadlessTable/ListRowManager.ts
3505
+ var ListRowManager = class extends Logger {
3506
+ constructor(debugId) {
3507
+ super(`${debugId}:ListRowManager`);
3508
+ this.indexToRow = /* @__PURE__ */ new Map();
3509
+ this.rowToIndex = /* @__PURE__ */ new WeakMap();
3510
+ this.debugId = debugId;
3511
+ this.pool = new ListRowPoolForReact(debugId);
3512
+ this.offRemoveRow = this.pool.onRemoveRow((row) => this.onRemoveRow(row));
3513
+ }
3514
+ onRemoveRow(row) {
3515
+ const rowIndex = this.rowToIndex.get(row);
3516
+ if (rowIndex == null) {
3517
+ return;
3518
+ }
3519
+ this.rowToIndex.delete(row);
3520
+ this.indexToRow.delete(rowIndex);
3521
+ }
3522
+ set poolSize(rowCount) {
3523
+ this.pool.poolSize = rowCount;
3524
+ }
3525
+ get poolSize() {
3526
+ return this.pool.poolSize;
3527
+ }
3528
+ getDetachedRow() {
3529
+ return this.pool.getDetachedRow();
3530
+ }
3531
+ /**
3532
+ * This gets a row for a given position.
3533
+ * If there's already a row currently attached at that position, it will be returned.
3534
+ *
3535
+ * Otherwise, we return another row.
3536
+ * @param rowIndex
3537
+ */
3538
+ getRowFor(rowIndex) {
3539
+ return this.getRowAt(rowIndex) ?? this.getDetachedRow();
3540
+ }
3541
+ setRowIndexInList(row, rowIndex) {
3542
+ const currentIndex = this.rowToIndex.get(row);
3543
+ if (currentIndex != null) {
3544
+ this.indexToRow.delete(currentIndex);
3545
+ }
3546
+ if (rowIndex == null) {
3547
+ this.rowToIndex.delete(row);
3548
+ } else {
3549
+ this.rowToIndex.set(row, rowIndex);
3550
+ this.indexToRow.set(rowIndex, row);
3551
+ }
3552
+ }
3553
+ detachStartingWith(rowIndex) {
3554
+ const rows = this.getAttachedIndexes();
3555
+ let idx = (0, import_binary_search3.default)(rows, rowIndex, (a, b) => a - b);
3556
+ if (idx < 0) {
3557
+ idx = ~idx;
3558
+ }
3559
+ const rowsToDiscard = rows.slice(idx);
3560
+ rowsToDiscard.forEach((rowIndex2) => this.detachRowAt(rowIndex2));
3561
+ }
3562
+ getRowAt(rowPos) {
3563
+ return this.indexToRow.get(rowPos);
3564
+ }
3565
+ getRowIndex(row) {
3566
+ return this.rowToIndex.get(row);
3567
+ }
3568
+ isRowAttached(row) {
3569
+ const rowIndex = this.getRowIndex(row);
3570
+ return rowIndex != null;
3571
+ }
3572
+ isRowAttachedAt(rowIndex) {
3573
+ const row = this.getRowAt(rowIndex);
3574
+ return !!row;
3575
+ }
3576
+ getList() {
3577
+ const max = Math.max(...this.indexToRow.keys());
3578
+ const list = Array.from({ length: max + 1 }, (_, index) => {
3579
+ const row = this.indexToRow.get(index);
3580
+ if (!row) {
3581
+ return null;
3582
+ }
3583
+ return row.getNode();
3584
+ });
3585
+ return list;
3586
+ }
3587
+ getAttachedCount() {
3588
+ return this.indexToRow.size;
3589
+ }
3590
+ forEachAttachedRow(fn) {
3591
+ this.indexToRow.forEach(fn);
3592
+ }
3593
+ getAttachedIndexes() {
3594
+ return Array.from(this.indexToRow.keys()).sort();
3595
+ }
3596
+ getAllRows() {
3597
+ return [...this.pool.getAllRows()];
3598
+ }
3599
+ detachRowAt(rowIndex) {
3600
+ const row = this.getRowAt(rowIndex);
3601
+ if (!row) {
3602
+ return;
3603
+ }
3604
+ this.setRowIndexInList(row, null);
3605
+ this.pool.detachRow(row);
3606
+ }
3607
+ detachRow(row) {
3608
+ const rowIndex = this.getRowIndex(row);
3609
+ if (rowIndex == null) {
3610
+ return;
3611
+ }
3612
+ this.detachRowAt(rowIndex);
3062
3613
  }
3063
- init() {
3064
- this.elementIndexToRowIndex = [];
3065
- this.rowToElementIndex = [];
3066
- this.renderedElements = [];
3614
+ renderNodeAtRow(node, row, rowIndex) {
3615
+ const currentRowAtPos = this.getRowAt(rowIndex);
3616
+ if (currentRowAtPos) {
3617
+ if (currentRowAtPos !== row) {
3618
+ this.detachRowAt(rowIndex);
3619
+ this.detachRow(row);
3620
+ } else {
3621
+ }
3622
+ } else {
3623
+ this.detachRow(row);
3624
+ }
3625
+ this.pool.attachRow(row);
3626
+ this.setRowIndexInList(row, rowIndex);
3627
+ row.update(node);
3628
+ return row;
3067
3629
  }
3068
- reset() {
3069
- this.init();
3630
+ makeDetachedRowsEmpty() {
3631
+ this.pool.getDetachedRows().forEach((row) => {
3632
+ row.update(null);
3633
+ });
3070
3634
  }
3071
3635
  destroy() {
3072
- this.elementIndexToRowIndex = [];
3073
- this.rowToElementIndex = [];
3074
- this.renderedElements = [];
3636
+ this.reset();
3637
+ }
3638
+ reset() {
3639
+ this.pool.reset();
3640
+ this.indexToRow.clear();
3641
+ this.offRemoveRow();
3642
+ this.offRemoveRow = () => {
3643
+ };
3075
3644
  }
3076
3645
  };
3077
3646
 
@@ -3083,7 +3652,7 @@ var columnOffsetAtIndex2 = stripVar(InternalVars.columnOffsetAtIndex);
3083
3652
  var columnOffsetAtIndexWhileReordering2 = stripVar(
3084
3653
  InternalVars.columnOffsetAtIndexWhileReordering
3085
3654
  );
3086
- var ReactHeadlessTableRenderer = class extends Logger {
3655
+ var GridRenderer = class extends Logger {
3087
3656
  constructor(brain, debugId) {
3088
3657
  debugId = debugId || "ReactHeadlessTableRenderer";
3089
3658
  super(debugId);
@@ -3091,14 +3660,6 @@ var ReactHeadlessTableRenderer = class extends Logger {
3091
3660
  this.destroyed = false;
3092
3661
  this.scrolling = false;
3093
3662
  this.cellHoverClassNames = [];
3094
- this.itemDOMElements = [];
3095
- this.itemDOMRefs = [];
3096
- this.updaters = [];
3097
- this.detailRowDOMElements = [];
3098
- this.detailRowDOMRefs = [];
3099
- this.detailRowUpdaters = [];
3100
- this.items = [];
3101
- this.detailItems = [];
3102
3663
  this.lastEnteredRow = -1;
3103
3664
  this.lastExitedRow = -1;
3104
3665
  this.hoverRowUpdatesInProgress = /* @__PURE__ */ new Map();
@@ -3324,12 +3885,13 @@ var ReactHeadlessTableRenderer = class extends Logger {
3324
3885
  };
3325
3886
  this.isRowRendered = (rowIndex) => {
3326
3887
  if (!this.brain.isHorizontalLayoutBrain) {
3327
- const elements = this.mappedCells.getElementsForRowIndex(rowIndex);
3328
- return elements.length > 0;
3888
+ return this.cellManager.isRowAttached(rowIndex);
3329
3889
  }
3330
3890
  const initialRowIndex = rowIndex;
3331
3891
  rowIndex = this.brain.rowsPerPage ? rowIndex % this.brain.rowsPerPage : rowIndex;
3332
- return this.mappedCells.getAdditionalInfoForRowIndex(rowIndex).filter((info) => info.renderRowIndex === initialRowIndex).length > 0;
3892
+ return this.cellManager.getCellsForRow(rowIndex).filter(
3893
+ (cell) => cell.getAdditionalInfo()?.renderRowIndex === initialRowIndex
3894
+ ).length > 0;
3333
3895
  };
3334
3896
  this.isCellVisible = (rowIndex, colIndex) => {
3335
3897
  return this.isRowVisible(rowIndex) && this.isColumnVisible(colIndex);
@@ -3395,8 +3957,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
3395
3957
  const colsCount = this.brain.getInitialCols();
3396
3958
  colIndex = colsCount * opts.horizontalLayoutPageIndex + colIndex;
3397
3959
  }
3398
- const nodeRendered = this.mappedCells.getRenderedNodeForCell(startRow, colIndex) !== null;
3399
- return nodeRendered;
3960
+ return this.cellManager.isCellAttachedAt([startRow, colIndex]);
3400
3961
  };
3401
3962
  this.getExtraSpanCellsForRange = (range) => {
3402
3963
  const { start, end } = range;
@@ -3539,11 +4100,11 @@ var ReactHeadlessTableRenderer = class extends Logger {
3539
4100
  }
3540
4101
  };
3541
4102
  this.addHoverClass = (rowIndex) => {
3542
- this.mappedCells.getElementsForRowIndex(rowIndex).forEach((elIndex) => {
3543
- const node = this.itemDOMElements[elIndex];
3544
- if (node) {
4103
+ this.cellManager.getCellsForRow(rowIndex).forEach((cell) => {
4104
+ const element = cell.getElement();
4105
+ if (element) {
3545
4106
  this.cellHoverClassNames.forEach((cls) => {
3546
- node.classList.add(cls);
4107
+ element.classList.add(cls);
3547
4108
  });
3548
4109
  }
3549
4110
  });
@@ -3559,11 +4120,11 @@ var ReactHeadlessTableRenderer = class extends Logger {
3559
4120
  }
3560
4121
  };
3561
4122
  this.removeHoverClass = (rowIndex) => {
3562
- this.mappedCells.getElementsForRowIndex(rowIndex).forEach((elIndex) => {
3563
- const node = this.itemDOMElements[elIndex];
3564
- if (node) {
4123
+ this.cellManager.getCellsForRow(rowIndex).forEach((cell) => {
4124
+ const element = cell.getElement();
4125
+ if (element) {
3565
4126
  this.cellHoverClassNames.forEach((cls) => {
3566
- node.classList.remove(cls);
4127
+ element.classList.remove(cls);
3567
4128
  });
3568
4129
  }
3569
4130
  });
@@ -3596,19 +4157,16 @@ var ReactHeadlessTableRenderer = class extends Logger {
3596
4157
  this.hoverRowUpdatesInProgress.delete(rowIndex);
3597
4158
  });
3598
4159
  };
3599
- this.updateElementPosition = (elementIndex, options) => {
4160
+ this.updateElementPosition = (cell, options) => {
3600
4161
  if (this.destroyed) {
3601
4162
  return;
3602
4163
  }
3603
- const itemElement = this.itemDOMElements[elementIndex];
3604
- const cell = this.mappedCells.getRenderedCellAtElement(elementIndex);
3605
- if (cell == null) {
3606
- if (false) {
3607
- this.error(`Cannot find item for element ${elementIndex}`);
3608
- }
4164
+ const itemElement = cell.getElement();
4165
+ const cellPos = this.cellManager.getCellPosition(cell);
4166
+ if (!cellPos) {
3609
4167
  return;
3610
4168
  }
3611
- const [rowIndex, colIndex] = cell;
4169
+ const [rowIndex, colIndex] = cellPos;
3612
4170
  const itemPosition = this.brain.getCellOffset(rowIndex, colIndex);
3613
4171
  if (itemPosition == null) {
3614
4172
  return;
@@ -3640,15 +4198,15 @@ var ReactHeadlessTableRenderer = class extends Logger {
3640
4198
  }
3641
4199
  }
3642
4200
  };
3643
- this.updateDetailElementPosition = (elementIndex) => {
4201
+ this.updateDetailElementPosition = (row) => {
3644
4202
  if (this.destroyed) {
3645
4203
  return;
3646
4204
  }
3647
- const itemElement = this.detailRowDOMElements[elementIndex];
3648
- const rowIndex = this.mappedDetailRows.getRenderedRowAtElement(elementIndex);
4205
+ const itemElement = row.getElement();
4206
+ const rowIndex = this.rowManager.getRowIndex(row);
3649
4207
  if (rowIndex == null) {
3650
4208
  if (false) {
3651
- this.error(`Cannot find row for detail element ${elementIndex}`);
4209
+ this.error(`Cannot find row for detail element ${rowIndex}`);
3652
4210
  }
3653
4211
  return;
3654
4212
  }
@@ -3688,21 +4246,22 @@ var ReactHeadlessTableRenderer = class extends Logger {
3688
4246
  }
3689
4247
  };
3690
4248
  this.adjustFixedElementsOnScroll = (scrollPosition = this.brain.getScrollPosition()) => {
3691
- const { mappedCells, brain, itemDOMElements, detailRowDOMElements } = this;
4249
+ const { brain, cellManager, rowManager } = this;
3692
4250
  const cols = this.brain.getColCount();
3693
4251
  const rows = this.brain.getRowCount();
3694
4252
  const { fixedColsStart, fixedColsEnd, fixedRowsStart, fixedRowsEnd } = this.brain.getFixedCellInfo();
3695
- if (detailRowDOMElements.length) {
3696
- this.detailRowDOMElements.forEach((node, index) => {
3697
- if (!node) {
3698
- return;
3699
- }
3700
- const rowIndex = this.mappedDetailRows.getRenderedRowAtElement(index);
4253
+ if (rowManager.getAttachedCount()) {
4254
+ rowManager.forEachAttachedRow((row) => {
4255
+ const rowIndex = rowManager.getRowIndex(row);
3701
4256
  if (rowIndex != null) {
3702
4257
  const y = this.brain.getItemOffsetFor(rowIndex, "vertical");
3703
4258
  if (y == null) {
3704
4259
  return;
3705
4260
  }
4261
+ const node = row.getElement();
4262
+ if (!node) {
4263
+ return;
4264
+ }
3706
4265
  this.setDetailTransform(node, rowIndex, {
3707
4266
  y,
3708
4267
  scrollLeft: scrollPosition.scrollLeft
@@ -3713,10 +4272,11 @@ var ReactHeadlessTableRenderer = class extends Logger {
3713
4272
  if (!fixedColsStart && !fixedColsEnd && !fixedRowsStart && !fixedRowsEnd) {
3714
4273
  return;
3715
4274
  }
3716
- if (itemDOMElements[0]) {
4275
+ const attachedCell = this.cellManager.getOneAttachedCell();
4276
+ if (attachedCell) {
3717
4277
  setInfiniteScrollPosition(
3718
4278
  scrollPosition,
3719
- this.getInfiniteNode(itemDOMElements[0])
4279
+ this.getInfiniteNode(attachedCell.getElement())
3720
4280
  );
3721
4281
  }
3722
4282
  const fixedEndColsOffsets = this.brain.getFixedEndColsOffsets({
@@ -3729,16 +4289,13 @@ var ReactHeadlessTableRenderer = class extends Logger {
3729
4289
  const [startRow, startCol] = start;
3730
4290
  const [endRow, endCol] = end;
3731
4291
  function adjustElementPosition(rowIndex, colIndex, fn) {
3732
- const elementIndex = mappedCells.getElementIndexForCell(
3733
- rowIndex,
3734
- colIndex
3735
- );
3736
- if (elementIndex === null) {
4292
+ const cell = cellManager.getCellAt([rowIndex, colIndex]);
4293
+ if (cell == null) {
3737
4294
  return;
3738
4295
  }
3739
4296
  const itemPosition = brain.getCellOffset(rowIndex, colIndex);
3740
- const node = itemDOMElements[elementIndex];
3741
- if (elementIndex != null && node && itemPosition) {
4297
+ const node = cell.getElement();
4298
+ if (node && itemPosition) {
3742
4299
  fn(rowIndex, colIndex, node, itemPosition);
3743
4300
  }
3744
4301
  }
@@ -3899,15 +4456,11 @@ var ReactHeadlessTableRenderer = class extends Logger {
3899
4456
  this.hoverRowUpdatesInProgress.clear();
3900
4457
  this.hoverRowUpdatesInProgress = null;
3901
4458
  this.brain = null;
3902
- this.mappedCells = null;
3903
- this.mappedDetailRows = null;
3904
4459
  };
3905
4460
  this.brain = brain;
3906
4461
  this.debugId = debugId;
3907
- this.mappedCells = new MappedCells({
3908
- withCellAdditionalInfo: brain.isHorizontalLayoutBrain
3909
- });
3910
- this.mappedDetailRows = new MappedVirtualRows();
4462
+ this.cellManager = new GridCellManager(debugId);
4463
+ this.rowManager = new ListRowManager(debugId);
3911
4464
  this.renderRange = this.renderRange.bind(this);
3912
4465
  const removeOnScroll = brain.onScroll(this.adjustFixedElementsOnScroll);
3913
4466
  const removeOnSizeChange = brain.onAvailableSizeChange(() => {
@@ -3935,7 +4488,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
3935
4488
  return this.infiniteNode;
3936
4489
  }
3937
4490
  isCellRenderedAndMappedCorrectly(row, col) {
3938
- const rendered = this.mappedCells.isCellRendered(row, col);
4491
+ const rendered = !!this.cellManager.getCellAt([row, col]);
3939
4492
  return {
3940
4493
  rendered,
3941
4494
  mapped: rendered
@@ -3950,7 +4503,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
3950
4503
  if (false) {
3951
4504
  this.debug(`Render range ${start}-${end}. Force ${force}`);
3952
4505
  }
3953
- const { mappedCells, mappedDetailRows } = this;
4506
+ const { rowManager, cellManager } = this;
3954
4507
  const fixedRanges = this.getFixedRanges(range);
3955
4508
  const ranges = [range, ...fixedRanges];
3956
4509
  const alwaysRenderedColumns = this.brain.getAlwaysRenderedColumns();
@@ -3979,86 +4532,33 @@ var ReactHeadlessTableRenderer = class extends Logger {
3979
4532
  0
3980
4533
  );
3981
4534
  const renderRowCount = renderDetailRow ? ranges.reduce((sum2, range2) => sum2 + getRenderRangeRowCount(range2), 0) : 0;
3982
- if (this.itemDOMElements.length >= renderCount) {
3983
- mappedCells.discardElementsStartingWith(renderCount, (elementIndex) => {
3984
- if (this.updaters[elementIndex]) {
3985
- this.updaters[elementIndex].destroy();
3986
- }
3987
- if (false) {
3988
- this.debug(`Discard element ${elementIndex}`);
3989
- }
3990
- });
3991
- this.itemDOMElements.length = Math.min(
3992
- this.itemDOMElements.length,
3993
- renderCount
3994
- );
3995
- this.itemDOMRefs.length = Math.min(this.itemDOMRefs.length, renderCount);
3996
- this.updaters.length = Math.min(this.updaters.length, renderCount);
3997
- this.items.length = Math.min(this.items.length, renderCount);
3998
- }
3999
- if (renderDetailRow && this.detailRowDOMElements.length && this.detailRowDOMElements.length >= renderRowCount) {
4000
- mappedDetailRows.discardElementsStartingWith(
4001
- renderRowCount,
4002
- (elementIndex) => {
4003
- if (this.detailRowUpdaters[elementIndex]) {
4004
- this.detailRowUpdaters[elementIndex].destroy();
4005
- }
4006
- if (false) {
4007
- this.debug(`Discard detail row element ${elementIndex}`);
4008
- }
4009
- }
4010
- );
4011
- this.detailRowDOMElements.length = Math.min(
4012
- this.detailRowDOMElements.length,
4013
- renderRowCount
4014
- );
4015
- this.detailRowDOMRefs.length = Math.min(
4016
- this.detailRowDOMRefs.length,
4017
- renderRowCount
4018
- );
4019
- this.detailRowUpdaters.length = Math.min(
4020
- this.detailRowUpdaters.length,
4021
- renderRowCount
4022
- );
4023
- this.detailItems.length = Math.min(
4024
- this.detailItems.length,
4025
- renderRowCount
4026
- );
4027
- }
4028
- const elementsOutsideRanges = arrayIntersection(
4029
- ...ranges.map(mappedCells.getElementsOutsideRenderRange)
4030
- );
4031
- const detailElementsOutsideRanges = renderDetailRow ? arrayIntersection(
4032
- ...ranges.map(mappedDetailRows.getElementsOutsideRenderRange)
4033
- ) : [];
4034
- const elementsOutsideItemRange = elementsOutsideRanges.filter(
4035
- (elementIndex) => {
4036
- const cell = this.mappedCells.getRenderedCellAtElement(elementIndex);
4037
- if (cell && extraCellsMap.has(`${cell[0]}:${cell[1]}`)) {
4038
- return false;
4039
- }
4040
- return true;
4041
- }
4042
- );
4043
- if (this.items.length > renderCount) {
4044
- this.items.length = renderCount;
4045
- }
4046
- if (renderDetailRow && this.detailItems.length > renderRowCount) {
4047
- this.detailItems.length = renderRowCount;
4048
- }
4049
- for (let i = this.items.length; i < renderCount; i++) {
4050
- this.renderElement(i);
4051
- elementsOutsideItemRange.splice(0, 0, i);
4535
+ cellManager.detachCellsStartingAt([
4536
+ this.brain.getRowCount(),
4537
+ this.brain.getColCount()
4538
+ ]);
4539
+ if (cellManager.poolSize > renderCount) {
4540
+ cellManager.poolSize = renderCount;
4052
4541
  }
4053
4542
  if (renderDetailRow) {
4054
- for (let i = this.detailItems.length; i < renderRowCount; i++) {
4055
- this.renderDetailElement(i);
4056
- detailElementsOutsideRanges.splice(0, 0, i);
4543
+ rowManager.detachStartingWith(this.brain.getRowCount());
4544
+ if (rowManager.poolSize > renderRowCount) {
4545
+ rowManager.poolSize = renderRowCount;
4057
4546
  }
4058
4547
  }
4548
+ let cellsOutsideRanges = setIntersection(
4549
+ ...ranges.map((range2) => cellManager.getCellsOutsideRenderRange(range2))
4550
+ );
4551
+ cellsOutsideRanges = setFilter(cellsOutsideRanges, (cell) => {
4552
+ const cellPos = cellManager.getCellPosition(cell);
4553
+ if (cellPos && extraCellsMap.has(`${cellPos[0]}:${cellPos[1]}`)) {
4554
+ return false;
4555
+ }
4556
+ return true;
4557
+ });
4558
+ cellManager.detachCells(cellsOutsideRanges);
4559
+ cellManager.poolSize = renderCount;
4059
4560
  const visitedCells = /* @__PURE__ */ new Map();
4060
4561
  const visitedRows = /* @__PURE__ */ new Map();
4061
- const elementsRenderedOnTheFly = /* @__PURE__ */ new Set();
4062
4562
  ranges.forEach((range2) => {
4063
4563
  const { start: start2, end: end2 } = range2;
4064
4564
  const [startRow, startCol] = start2;
@@ -4072,14 +4572,11 @@ var ReactHeadlessTableRenderer = class extends Logger {
4072
4572
  visitedCells.set(key, true);
4073
4573
  const { rendered: cellRendered, mapped: cellMappedCorrectly } = this.isCellRenderedAndMappedCorrectly(row, col);
4074
4574
  if (row === startRow || col === startCol) {
4075
- const parentCell = this.isCellCovered(row, col);
4076
- if (parentCell && extraCellsMap.has(`${parentCell[0]}:${parentCell[1]}`)) {
4077
- const elIndexForCoveredCell = mappedCells.getElementIndexForCell(
4078
- row,
4079
- col
4080
- );
4081
- if (elIndexForCoveredCell != null) {
4082
- elementsOutsideItemRange.push(elIndexForCoveredCell);
4575
+ const parentCellPos = this.isCellCovered(row, col);
4576
+ if (parentCellPos && extraCellsMap.has(`${parentCellPos[0]}:${parentCellPos[1]}`)) {
4577
+ const coveredCell = cellManager.getCellAt([row, col]);
4578
+ if (coveredCell != null) {
4579
+ cellManager.detachCell(coveredCell);
4083
4580
  }
4084
4581
  continue;
4085
4582
  }
@@ -4087,37 +4584,19 @@ var ReactHeadlessTableRenderer = class extends Logger {
4087
4584
  if (cellRendered && !force && cellMappedCorrectly) {
4088
4585
  continue;
4089
4586
  }
4090
- let elementIndex = cellRendered ? mappedCells.getElementIndexForCell(row, col) : (
4091
- // TODO when horizontal layout, just do elementsOutsideItemRange.pop()
4092
- horizontalLayout ? mappedCells.getElementFromListForRow(
4093
- elementsOutsideItemRange,
4094
- row
4095
- ) : mappedCells.getElementFromListForColumn(
4096
- elementsOutsideItemRange,
4097
- col
4098
- )
4099
- );
4100
- if (elementIndex == null) {
4101
- for (let i = this.itemDOMElements.length; i <= this.itemDOMRefs.length; i++) {
4102
- if (!this.itemDOMElements[i] && this.itemDOMRefs[i] && !elementsRenderedOnTheFly.has(i)) {
4103
- elementIndex = i;
4104
- elementsRenderedOnTheFly.add(i);
4105
- if (false) {
4106
- this.debug(
4107
- `Last-moment recovery of element ${elementIndex} to render cell ${row}:${col}`
4108
- );
4109
- }
4110
- break;
4111
- }
4112
- }
4587
+ let theCell;
4588
+ if (cellRendered) {
4589
+ theCell = cellManager.getCellAt([row, col]);
4590
+ } else {
4591
+ theCell = cellManager.getCellFor(
4592
+ [row, col],
4593
+ horizontalLayout ? "row" : "column"
4594
+ );
4113
4595
  }
4114
- if (elementIndex == null) {
4115
- if (false) {
4116
- this.error(`Cannot find element to render cell ${row}:${col}`);
4117
- }
4118
- continue;
4596
+ if (theCell == null) {
4597
+ theCell = cellManager.getDetachedCell();
4119
4598
  }
4120
- this.renderCellAtElement(row, col, elementIndex, renderCell);
4599
+ this.renderCellAt(row, col, theCell, renderCell);
4121
4600
  }
4122
4601
  if (!renderDetailRow) {
4123
4602
  continue;
@@ -4126,20 +4605,15 @@ var ReactHeadlessTableRenderer = class extends Logger {
4126
4605
  continue;
4127
4606
  }
4128
4607
  visitedRows.set(row, true);
4129
- const rowRendered = mappedDetailRows.isRowRendered(row);
4608
+ const rowRendered = rowManager.isRowAttachedAt(row);
4130
4609
  if (rowRendered && !force) {
4131
4610
  continue;
4132
4611
  }
4133
- const detailElementIndex = rowRendered ? mappedDetailRows.getElementIndexForRow(row) : detailElementsOutsideRanges.pop();
4134
- if (detailElementIndex == null) {
4135
- if (false) {
4136
- this.error(
4137
- `Cannot find detail element to render detail row ${row}`
4138
- );
4139
- }
4140
- continue;
4141
- }
4142
- this.renderDetailRowAtElement(row, detailElementIndex, renderDetailRow);
4612
+ this.renderDetailRowAtElement(
4613
+ row,
4614
+ this.rowManager.getRowFor(row),
4615
+ renderDetailRow
4616
+ );
4143
4617
  }
4144
4618
  });
4145
4619
  extraCells.forEach(([rowIndex, colIndex]) => {
@@ -4149,84 +4623,41 @@ var ReactHeadlessTableRenderer = class extends Logger {
4149
4623
  );
4150
4624
  if (rendered) {
4151
4625
  if (force || !mapped) {
4152
- const elementIndex2 = mappedCells.getElementIndexForCell(
4153
- rowIndex,
4154
- colIndex
4155
- );
4156
- this.renderCellAtElement(
4157
- rowIndex,
4158
- colIndex,
4159
- elementIndex2,
4160
- renderCell
4161
- );
4626
+ const cellPos = [rowIndex, colIndex];
4627
+ const cell2 = cellManager.getCellAt(cellPos);
4628
+ this.renderCellAt(rowIndex, colIndex, cell2, renderCell);
4162
4629
  }
4163
4630
  return;
4164
4631
  }
4165
- const elementIndex = elementsOutsideItemRange.pop();
4166
- if (elementIndex == null) {
4632
+ const cell = cellManager.getCellFor(
4633
+ [rowIndex, colIndex],
4634
+ horizontalLayout ? "row" : "column"
4635
+ );
4636
+ if (cell == null) {
4167
4637
  if (false) {
4168
- this.error(
4169
- `Cannot find element to render cell ${rowIndex}-${colIndex}`
4170
- );
4638
+ this.error(`Cannot find cell to render ${rowIndex}-${colIndex}`);
4171
4639
  }
4172
4640
  return;
4173
4641
  }
4174
- this.renderCellAtElement(rowIndex, colIndex, elementIndex, renderCell);
4642
+ this.renderCellAt(rowIndex, colIndex, cell, renderCell);
4175
4643
  });
4176
- let result = this.items;
4177
- result = [...this.items, ...this.detailItems];
4644
+ cellManager.makeDetachedCellsEmpty();
4645
+ if (renderDetailRow) {
4646
+ rowManager.makeDetachedRowsEmpty();
4647
+ }
4648
+ let result = cellManager.getAllCells().map((cell) => cell.getNode());
4649
+ if (renderDetailRow) {
4650
+ rowManager.getAllRows().forEach((row) => {
4651
+ result.push(row.getNode());
4652
+ });
4653
+ }
4178
4654
  this.adjustFixedElementsOnScroll();
4179
4655
  if (onRender) {
4180
4656
  onRender(result);
4181
4657
  }
4182
4658
  return result;
4183
4659
  }
4184
- renderElement(elementIndex) {
4185
- const domRef = (node) => {
4186
- if (node) {
4187
- this.itemDOMElements[elementIndex] = node;
4188
- node.style.position = "absolute";
4189
- node.style.left = "0px";
4190
- node.style.top = "0px";
4191
- this.updateElementPosition(elementIndex);
4192
- }
4193
- };
4194
- this.itemDOMRefs[elementIndex] = domRef;
4195
- this.updaters[elementIndex] = buildSubscriptionCallback();
4196
- const item = /* @__PURE__ */ React9.createElement(
4197
- AvoidReactDiff,
4198
- {
4199
- key: elementIndex,
4200
- name: `${elementIndex}`,
4201
- updater: this.updaters[elementIndex]
4202
- }
4203
- );
4204
- this.items[elementIndex] = item;
4205
- return item;
4206
- }
4207
- renderDetailElement(elementIndex) {
4208
- const domRef = (node) => {
4209
- if (node) {
4210
- this.detailRowDOMElements[elementIndex] = node;
4211
- node.style.position = "absolute";
4212
- node.style.left = "0px";
4213
- this.updateDetailElementPosition(elementIndex);
4214
- }
4215
- };
4216
- this.detailRowDOMRefs[elementIndex] = domRef;
4217
- this.detailRowUpdaters[elementIndex] = buildSubscriptionCallback();
4218
- const detailItem = /* @__PURE__ */ React9.createElement(
4219
- AvoidReactDiff,
4220
- {
4221
- key: `detail-${elementIndex}`,
4222
- name: `detail-${elementIndex}`,
4223
- updater: this.detailRowUpdaters[elementIndex]
4224
- }
4225
- );
4226
- this.detailItems[elementIndex] = detailItem;
4227
- return detailItem;
4228
- }
4229
- renderDetailRowAtElement(rowIndex, detailElementIndex, renderDetailRow) {
4660
+ renderDetailRowAtElement(rowIndex, row, renderDetailRow) {
4230
4661
  if (this.destroyed) {
4231
4662
  return;
4232
4663
  }
@@ -4243,27 +4674,18 @@ var ReactHeadlessTableRenderer = class extends Logger {
4243
4674
  },
4244
4675
  onMouseLeave: () => {
4245
4676
  },
4246
- domRef: this.detailRowDOMRefs[detailElementIndex]
4677
+ domRef: row.ref
4247
4678
  });
4248
- const itemUpdater = this.detailRowUpdaters[detailElementIndex];
4249
- if (!itemUpdater) {
4250
- this.error(
4251
- `Cannot find detail item updater for item ${rowIndex} at this time... sorry.`
4252
- );
4253
- return;
4254
- }
4255
- this.mappedDetailRows.renderRowAtElement(
4256
- rowIndex,
4257
- detailElementIndex,
4258
- renderedDetailNode
4259
- );
4260
- if (false) {
4261
- this.debug(
4262
- `Render detail row ${rowIndex} at element ${detailElementIndex}`
4263
- );
4264
- }
4265
- itemUpdater(renderedDetailNode);
4266
- this.updateDetailElementPosition(detailElementIndex);
4679
+ row.onMount((row2) => {
4680
+ const element = row2.getElement();
4681
+ if (element) {
4682
+ element.style.position = "absolute";
4683
+ element.style.left = "0px";
4684
+ }
4685
+ this.updateDetailElementPosition(row2);
4686
+ });
4687
+ this.rowManager.renderNodeAtRow(renderedDetailNode, row, rowIndex);
4688
+ this.updateDetailElementPosition(row);
4267
4689
  return;
4268
4690
  }
4269
4691
  getCellRealCoordinates(rowIndex, colIndex) {
@@ -4272,7 +4694,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
4272
4694
  colIndex
4273
4695
  };
4274
4696
  }
4275
- renderCellAtElement(rowIndex, colIndex, elementIndex, renderCell) {
4697
+ renderCellAt(rowIndex, colIndex, cell, renderCell) {
4276
4698
  if (this.destroyed) {
4277
4699
  return;
4278
4700
  }
@@ -4303,42 +4725,38 @@ var ReactHeadlessTableRenderer = class extends Logger {
4303
4725
  widthWithColspan,
4304
4726
  onMouseEnter: this.onMouseEnter.bind(null, rowIndex),
4305
4727
  onMouseLeave: this.onMouseLeave.bind(null, rowIndex),
4306
- domRef: this.itemDOMRefs[elementIndex]
4728
+ domRef: cell.ref
4729
+ });
4730
+ cell.onMount((cell2) => {
4731
+ const element = cell2.getElement();
4732
+ if (element) {
4733
+ element.style.position = "absolute";
4734
+ element.style.left = "0px";
4735
+ element.style.top = "0px";
4736
+ }
4737
+ this.updateElementPosition(cell2);
4307
4738
  });
4308
- const itemUpdater = this.updaters[elementIndex];
4309
- if (!itemUpdater) {
4310
- this.error(
4311
- `Cannot find item updater for item ${rowIndex},${colIndex} at this time... sorry.`
4312
- );
4313
- return;
4314
- }
4315
4739
  const cellAdditionalInfo = this.brain.isHorizontalLayoutBrain ? {
4316
4740
  renderRowIndex,
4317
4741
  renderColIndex
4318
4742
  } : void 0;
4319
- this.mappedCells.renderCellAtElement(
4320
- rowIndex,
4321
- colIndex,
4322
- elementIndex,
4743
+ this.cellManager.renderNodeAtCell(
4323
4744
  renderedNode,
4745
+ cell,
4746
+ [rowIndex, colIndex],
4324
4747
  cellAdditionalInfo
4325
4748
  );
4326
- itemUpdater(renderedNode);
4327
- this.updateElementPosition(elementIndex, { hidden, rowspan, colspan });
4749
+ this.updateElementPosition(cell, { hidden, rowspan, colspan });
4328
4750
  return;
4329
4751
  }
4330
4752
  reset() {
4331
- this.itemDOMElements = [];
4332
- this.itemDOMRefs = [];
4333
- this.updaters = [];
4334
- this.items = [];
4335
- this.mappedCells.reset();
4336
- this.mappedDetailRows.reset();
4753
+ this.cellManager.reset();
4754
+ this.rowManager.reset();
4337
4755
  }
4338
4756
  };
4339
4757
 
4340
4758
  // src/components/HeadlessTable/HorizontalLayoutTableRenderer.tsx
4341
- var HorizontalLayoutTableRenderer = class extends ReactHeadlessTableRenderer {
4759
+ var HorizontalLayoutTableRenderer = class extends GridRenderer {
4342
4760
  constructor(brain, debugId) {
4343
4761
  super(brain, debugId);
4344
4762
  this.setTransform = (element, rowIndex, colIndex, options, _zIndex) => {
@@ -4378,14 +4796,15 @@ var HorizontalLayoutTableRenderer = class extends ReactHeadlessTableRenderer {
4378
4796
  });
4379
4797
  }
4380
4798
  isCellRenderedAndMappedCorrectly(row, col) {
4381
- const rendered = this.mappedCells.isCellRendered(row, col);
4799
+ const cell = this.cellManager.getCellAt([row, col]);
4800
+ const rendered = !!cell;
4382
4801
  if (!rendered) {
4383
4802
  return {
4384
4803
  rendered,
4385
4804
  mapped: false
4386
4805
  };
4387
4806
  }
4388
- const cellAdditionalInfo = this.mappedCells.getCellAdditionalInfo(row, col);
4807
+ const cellAdditionalInfo = cell.getAdditionalInfo();
4389
4808
  if (!cellAdditionalInfo) {
4390
4809
  return {
4391
4810
  rendered,
@@ -4403,10 +4822,7 @@ var HorizontalLayoutTableRenderer = class extends ReactHeadlessTableRenderer {
4403
4822
 
4404
4823
  // src/components/HeadlessTable/createRenderer.ts
4405
4824
  function createRenderer(brain) {
4406
- const renderer = !brain.isHorizontalLayoutBrain ? new ReactHeadlessTableRenderer(
4407
- brain,
4408
- `ReactHeadlessTableRenderer:${brain.name}`
4409
- ) : new HorizontalLayoutTableRenderer(
4825
+ const renderer = !brain.isHorizontalLayoutBrain ? new GridRenderer(brain, `ReactHeadlessTableRenderer:${brain.name}`) : new HorizontalLayoutTableRenderer(
4410
4826
  brain,
4411
4827
  `HorizontalLayoutTableRenderer:${brain.name}`
4412
4828
  );
@@ -4470,12 +4886,12 @@ function RawTableFn(props) {
4470
4886
  });
4471
4887
  return remove;
4472
4888
  }, [renderCell, renderDetailRow, brain, onRenderUpdater]);
4473
- return /* @__PURE__ */ React10.createElement(AvoidReactDiff, { updater: onRenderUpdater });
4889
+ return /* @__PURE__ */ React11.createElement(AvoidReactDiff, { updater: onRenderUpdater });
4474
4890
  }
4475
- var RawTable = React10.memo(RawTableFn);
4891
+ var RawTable = React11.memo(RawTableFn);
4476
4892
 
4477
4893
  // src/components/InfiniteTable/components/ActiveRowIndicator.tsx
4478
- import * as React11 from "react";
4894
+ import * as React12 from "react";
4479
4895
  import { useEffect as useEffect5, useLayoutEffect as useLayoutEffect4, useRef as useRef5 } from "react";
4480
4896
 
4481
4897
  // src/components/hooks/useRerender.ts
@@ -4665,7 +5081,7 @@ var ActiveRowIndicatorFn = (props) => {
4665
5081
  }, [brain]);
4666
5082
  return (
4667
5083
  // #correct-scroll-size this wrapper is here in order to make the indicator not take up space in the scroll container - to reproduce: remove this and click on a row, you will see that if you scroll at the bottom, there is extra space
4668
- /* @__PURE__ */ React11.createElement("div", { className: ActiveIndicatorWrapperCls, "data-name": "active-row" }, /* @__PURE__ */ React11.createElement(
5084
+ /* @__PURE__ */ React12.createElement("div", { className: ActiveIndicatorWrapperCls, "data-name": "active-row" }, /* @__PURE__ */ React12.createElement(
4669
5085
  "div",
4670
5086
  {
4671
5087
  ref: domRef,
@@ -4678,12 +5094,12 @@ var ActiveRowIndicatorFn = (props) => {
4678
5094
  ))
4679
5095
  );
4680
5096
  };
4681
- var ActiveRowIndicator = React11.memo(
5097
+ var ActiveRowIndicator = React12.memo(
4682
5098
  ActiveRowIndicatorFn
4683
5099
  );
4684
5100
 
4685
5101
  // src/components/InfiniteTable/components/ActiveCellIndicator.tsx
4686
- import * as React12 from "react";
5102
+ import * as React13 from "react";
4687
5103
  import { useEffect as useEffect6, useLayoutEffect as useLayoutEffect5, useRef as useRef6 } from "react";
4688
5104
  var { rootClassName: rootClassName4 } = internalProps;
4689
5105
  var baseCls2 = `${rootClassName4}-ActiveCellIndicator`;
@@ -4725,7 +5141,7 @@ var ActiveCellIndicatorFn = (props) => {
4725
5141
  }, [brain]);
4726
5142
  return (
4727
5143
  // #correct-scroll-size this wrapper is here in order to make the indicator not take up space in the scroll container - to reproduce: remove this and click on a row, you will see that if you scroll at the bottom, there is extra space
4728
- /* @__PURE__ */ React12.createElement(
5144
+ /* @__PURE__ */ React13.createElement(
4729
5145
  "div",
4730
5146
  {
4731
5147
  className: ActiveIndicatorWrapperCls,
@@ -4735,7 +5151,7 @@ var ActiveCellIndicatorFn = (props) => {
4735
5151
  zIndex: `var(${columnZIndexAtIndex2}-${props.activeCellIndex[1]})`
4736
5152
  } : void 0
4737
5153
  },
4738
- /* @__PURE__ */ React12.createElement(
5154
+ /* @__PURE__ */ React13.createElement(
4739
5155
  "div",
4740
5156
  {
4741
5157
  "data-name": "active-cell-indicator",
@@ -4747,7 +5163,7 @@ var ActiveCellIndicatorFn = (props) => {
4747
5163
  )
4748
5164
  );
4749
5165
  };
4750
- var ActiveCellIndicator = React12.memo(
5166
+ var ActiveCellIndicator = React13.memo(
4751
5167
  ActiveCellIndicatorFn
4752
5168
  );
4753
5169
 
@@ -4841,21 +5257,21 @@ function HeadlessTable(props) {
4841
5257
  );
4842
5258
  return removeOnRenderCount;
4843
5259
  }, [brain]);
4844
- return /* @__PURE__ */ React13.createElement(
5260
+ return /* @__PURE__ */ React14.createElement(
4845
5261
  VirtualScrollContainer,
4846
5262
  {
4847
5263
  onContainerScroll,
4848
5264
  ...domProps,
4849
5265
  ref: scrollerDOMRef
4850
5266
  },
4851
- /* @__PURE__ */ React13.createElement(
5267
+ /* @__PURE__ */ React14.createElement(
4852
5268
  "div",
4853
5269
  {
4854
5270
  ref: domRef,
4855
5271
  className: CHILD_TO_SCROLL_CLS,
4856
5272
  "data-name": "scroll-transform-target"
4857
5273
  },
4858
- /* @__PURE__ */ React13.createElement(
5274
+ /* @__PURE__ */ React14.createElement(
4859
5275
  RawTable,
4860
5276
  {
4861
5277
  forceRerenderTimestamp,
@@ -4867,7 +5283,7 @@ function HeadlessTable(props) {
4867
5283
  cellHoverClassNames
4868
5284
  }
4869
5285
  ),
4870
- activeCellIndex != null ? /* @__PURE__ */ React13.createElement(
5286
+ activeCellIndex != null ? /* @__PURE__ */ React14.createElement(
4871
5287
  ActiveCellIndicator,
4872
5288
  {
4873
5289
  brain,
@@ -4876,8 +5292,8 @@ function HeadlessTable(props) {
4876
5292
  }
4877
5293
  ) : null
4878
5294
  ),
4879
- activeRowIndex != null ? /* @__PURE__ */ React13.createElement(ActiveRowIndicator, { brain, activeRowIndex }) : null,
4880
- /* @__PURE__ */ React13.createElement(
5295
+ activeRowIndex != null ? /* @__PURE__ */ React14.createElement(ActiveRowIndicator, { brain, activeRowIndex }) : null,
5296
+ /* @__PURE__ */ React14.createElement(
4881
5297
  SpacePlaceholder,
4882
5298
  {
4883
5299
  width: scrollSize.width,
@@ -4888,7 +5304,7 @@ function HeadlessTable(props) {
4888
5304
  }
4889
5305
 
4890
5306
  // src/components/hooks/useComponentState/index.tsx
4891
- import * as React14 from "react";
5307
+ import * as React15 from "react";
4892
5308
  import {
4893
5309
  useReducer,
4894
5310
  createContext as createContext3,
@@ -5295,9 +5711,9 @@ function buildManagedComponent(config) {
5295
5711
  });
5296
5712
  return { contextValue, ContextComponent: Context };
5297
5713
  }
5298
- const ManagedComponentContextProvider = React14.memo(function CSR(props) {
5714
+ const ManagedComponentContextProvider = React15.memo(function CSR(props) {
5299
5715
  const { contextValue, ContextComponent } = useManagedComponent(props);
5300
- return /* @__PURE__ */ React14.createElement(ContextComponent.Provider, { value: contextValue }, props.children);
5716
+ return /* @__PURE__ */ React15.createElement(ContextComponent.Provider, { value: contextValue }, props.children);
5301
5717
  });
5302
5718
  return {
5303
5719
  ManagedComponentContextProvider,
@@ -5306,11 +5722,11 @@ function buildManagedComponent(config) {
5306
5722
  }
5307
5723
  function useManagedComponentState() {
5308
5724
  const Context = getComponentStateContext();
5309
- return React14.useContext(Context);
5725
+ return React15.useContext(Context);
5310
5726
  }
5311
5727
 
5312
5728
  // src/components/InfiniteTable/components/InfiniteTableFooter/InfiniteTableFooter.tsx
5313
- import * as React15 from "react";
5729
+ import * as React16 from "react";
5314
5730
 
5315
5731
  // src/components/InfiniteTable/hooks/useInternalProps.ts
5316
5732
  var useInternalProps = () => {
@@ -5340,7 +5756,7 @@ var zIndex = { "1": "utilities_zIndex_1__16lm1iwo", "10": "utilities_zIndex_10__
5340
5756
  // src/components/InfiniteTable/components/InfiniteTableFooter/InfiniteTableFooter.tsx
5341
5757
  function InfiniteTableFooter(props) {
5342
5758
  const { rootClassName: rootClassName12 } = useInternalProps();
5343
- return /* @__PURE__ */ React15.createElement(
5759
+ return /* @__PURE__ */ React16.createElement(
5344
5760
  "div",
5345
5761
  {
5346
5762
  ...props,
@@ -5356,7 +5772,7 @@ function InfiniteTableFooter(props) {
5356
5772
  }
5357
5773
 
5358
5774
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
5359
- import * as React42 from "react";
5775
+ import * as React43 from "react";
5360
5776
  import { useCallback as useCallback14, useContext as useContext7, useEffect as useEffect15, useRef as useRef16 } from "react";
5361
5777
  import { createPortal } from "react-dom";
5362
5778
 
@@ -5370,7 +5786,7 @@ function keyMirror(obj) {
5370
5786
  }
5371
5787
 
5372
5788
  // src/components/InfiniteTable/components/icons/Icon.tsx
5373
- import * as React16 from "react";
5789
+ import * as React17 from "react";
5374
5790
  var Icon = (props) => {
5375
5791
  const size = props.size ?? `var(--infinite-icon-size)`;
5376
5792
  const style2 = {
@@ -5382,69 +5798,69 @@ var Icon = (props) => {
5382
5798
  };
5383
5799
  return (
5384
5800
  //@ts-ignore
5385
- /* @__PURE__ */ React16.createElement("svg", { viewBox: "0 0 24 24", ...props, style: style2 }, props.children)
5801
+ /* @__PURE__ */ React17.createElement("svg", { viewBox: "0 0 24 24", ...props, style: style2 }, props.children)
5386
5802
  );
5387
5803
  };
5388
5804
 
5389
5805
  // src/components/InfiniteTable/components/icons/IncludesOperatorIcon.tsx
5390
- import * as React17 from "react";
5806
+ import * as React18 from "react";
5391
5807
  var IncludesOperatorIcon = (props) => {
5392
- return /* @__PURE__ */ React17.createElement(Icon, { ...props }, /* @__PURE__ */ React17.createElement("path", { d: "M11.14 4L6.43 16H8.36L9.32 13.43H14.67L15.64 16H17.57L12.86 4H11.14M12 6.29L14.03 11.71H9.96L12 6.29" }), /* @__PURE__ */ React17.createElement("path", { d: "M4 18V15H2V20H22V18Z" }), /* @__PURE__ */ React17.createElement("path", { d: "M20 14V18H2V20H22V14Z" }));
5808
+ return /* @__PURE__ */ React18.createElement(Icon, { ...props }, /* @__PURE__ */ React18.createElement("path", { d: "M11.14 4L6.43 16H8.36L9.32 13.43H14.67L15.64 16H17.57L12.86 4H11.14M12 6.29L14.03 11.71H9.96L12 6.29" }), /* @__PURE__ */ React18.createElement("path", { d: "M4 18V15H2V20H22V18Z" }), /* @__PURE__ */ React18.createElement("path", { d: "M20 14V18H2V20H22V14Z" }));
5393
5809
  };
5394
5810
 
5395
5811
  // src/components/InfiniteTable/components/icons/EndsWithOperatorIcon.tsx
5396
- import * as React18 from "react";
5812
+ import * as React19 from "react";
5397
5813
  var EndsWithOperatorIcon = (props) => {
5398
- return /* @__PURE__ */ React18.createElement(Icon, { ...props }, /* @__PURE__ */ React18.createElement("path", { d: "M11.14 4L6.43 16H8.36L9.32 13.43H14.67L15.64 16H17.57L12.86 4M12 6.29L14.03 11.71H9.96M20 14V18H2V20H22V14Z" }));
5814
+ return /* @__PURE__ */ React19.createElement(Icon, { ...props }, /* @__PURE__ */ React19.createElement("path", { d: "M11.14 4L6.43 16H8.36L9.32 13.43H14.67L15.64 16H17.57L12.86 4M12 6.29L14.03 11.71H9.96M20 14V18H2V20H22V14Z" }));
5399
5815
  };
5400
5816
 
5401
5817
  // src/components/InfiniteTable/components/icons/EqualOperatorIcon.tsx
5402
- import * as React19 from "react";
5818
+ import * as React20 from "react";
5403
5819
  var EqualOperatorIcon = (props) => {
5404
- return /* @__PURE__ */ React19.createElement(Icon, { ...props }, /* @__PURE__ */ React19.createElement("path", { d: "M19,10H5V8H19V10M19,16H5V14H19V16Z" }));
5820
+ return /* @__PURE__ */ React20.createElement(Icon, { ...props }, /* @__PURE__ */ React20.createElement("path", { d: "M19,10H5V8H19V10M19,16H5V14H19V16Z" }));
5405
5821
  };
5406
5822
 
5407
5823
  // src/components/InfiniteTable/components/icons/GTEOperatorIcon.tsx
5408
- import * as React20 from "react";
5824
+ import * as React21 from "react";
5409
5825
  var GTEOperatorIcon = (props) => {
5410
- return /* @__PURE__ */ React20.createElement(Icon, { ...props }, /* @__PURE__ */ React20.createElement("path", { d: "M6.5,2.27L20,10.14L6.5,18L5.5,16.27L16.03,10.14L5.5,4L6.5,2.27M20,20V22H5V20H20Z" }));
5826
+ return /* @__PURE__ */ React21.createElement(Icon, { ...props }, /* @__PURE__ */ React21.createElement("path", { d: "M6.5,2.27L20,10.14L6.5,18L5.5,16.27L16.03,10.14L5.5,4L6.5,2.27M20,20V22H5V20H20Z" }));
5411
5827
  };
5412
5828
 
5413
5829
  // src/components/InfiniteTable/components/icons/GTOperatorIcon.tsx
5414
- import * as React21 from "react";
5830
+ import * as React22 from "react";
5415
5831
  var GTOperatorIcon = (props) => {
5416
- return /* @__PURE__ */ React21.createElement(Icon, { ...props }, /* @__PURE__ */ React21.createElement("path", { d: "M5.5,4.14L4.5,5.86L15,12L4.5,18.14L5.5,19.86L19,12L5.5,4.14Z" }));
5832
+ return /* @__PURE__ */ React22.createElement(Icon, { ...props }, /* @__PURE__ */ React22.createElement("path", { d: "M5.5,4.14L4.5,5.86L15,12L4.5,18.14L5.5,19.86L19,12L5.5,4.14Z" }));
5417
5833
  };
5418
5834
 
5419
5835
  // src/components/InfiniteTable/components/icons/LTEOperatorIcon.tsx
5420
- import * as React22 from "react";
5836
+ import * as React23 from "react";
5421
5837
  var LTEOperatorIcon = (props) => {
5422
- return /* @__PURE__ */ React22.createElement(Icon, { ...props }, /* @__PURE__ */ React22.createElement("path", { d: "M18.5,2.27L5,10.14L18.5,18L19.5,16.27L8.97,10.14L19.5,4L18.5,2.27M5,20V22H20V20H5Z" }));
5838
+ return /* @__PURE__ */ React23.createElement(Icon, { ...props }, /* @__PURE__ */ React23.createElement("path", { d: "M18.5,2.27L5,10.14L18.5,18L19.5,16.27L8.97,10.14L19.5,4L18.5,2.27M5,20V22H20V20H5Z" }));
5423
5839
  };
5424
5840
 
5425
5841
  // src/components/InfiniteTable/components/icons/LTOperatorIcon.tsx
5426
- import * as React23 from "react";
5842
+ import * as React24 from "react";
5427
5843
  var LTOperatorIcon = (props) => {
5428
- return /* @__PURE__ */ React23.createElement(Icon, { ...props }, /* @__PURE__ */ React23.createElement("path", { d: "M18.5,4.14L19.5,5.86L8.97,12L19.5,18.14L18.5,19.86L5,12L18.5,4.14Z" }));
5844
+ return /* @__PURE__ */ React24.createElement(Icon, { ...props }, /* @__PURE__ */ React24.createElement("path", { d: "M18.5,4.14L19.5,5.86L8.97,12L19.5,18.14L18.5,19.86L5,12L18.5,4.14Z" }));
5429
5845
  };
5430
5846
 
5431
5847
  // src/components/InfiniteTable/components/icons/NotEqualOperatorIcon.tsx
5432
- import * as React24 from "react";
5848
+ import * as React25 from "react";
5433
5849
  var NotEqualOperatorIcon = (props) => {
5434
- return /* @__PURE__ */ React24.createElement(Icon, { ...props }, /* @__PURE__ */ React24.createElement("path", { d: "M21,10H9V8H21V10M21,16H9V14H21V16M4,5H6V16H4V5M6,18V20H4V18H6Z" }));
5850
+ return /* @__PURE__ */ React25.createElement(Icon, { ...props }, /* @__PURE__ */ React25.createElement("path", { d: "M21,10H9V8H21V10M21,16H9V14H21V16M4,5H6V16H4V5M6,18V20H4V18H6Z" }));
5435
5851
  };
5436
5852
 
5437
5853
  // src/components/InfiniteTable/components/icons/StartsWithOperatorIcon.tsx
5438
- import * as React25 from "react";
5854
+ import * as React26 from "react";
5439
5855
  var StartsWithOperatorIcon = (props) => {
5440
- return /* @__PURE__ */ React25.createElement(Icon, { ...props }, /* @__PURE__ */ React25.createElement("path", { d: "M11.14 4L6.43 16H8.36L9.32 13.43H14.67L15.64 16H17.57L12.86 4M12 6.29L14.03 11.71H9.96M4 18V15H2V20H22V18Z" }));
5856
+ return /* @__PURE__ */ React26.createElement(Icon, { ...props }, /* @__PURE__ */ React26.createElement("path", { d: "M11.14 4L6.43 16H8.36L9.32 13.43H14.67L15.64 16H17.57L12.86 4M12 6.29L14.03 11.71H9.96M4 18V15H2V20H22V18Z" }));
5441
5857
  };
5442
5858
 
5443
5859
  // src/components/InfiniteTable/components/FilterEditors.tsx
5444
- import * as React29 from "react";
5860
+ import * as React30 from "react";
5445
5861
 
5446
5862
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableColumnHeaderFilter.tsx
5447
- import * as React28 from "react";
5863
+ import * as React29 from "react";
5448
5864
  import { useEffect as useEffect11, useState as useState6 } from "react";
5449
5865
 
5450
5866
  // src/components/InfiniteTable/hooks/useInfiniteTable.ts
@@ -5477,7 +5893,7 @@ var useInfiniteTableState = () => {
5477
5893
  };
5478
5894
 
5479
5895
  // src/components/InfiniteTable/components/icons/FilterIcon.tsx
5480
- import * as React26 from "react";
5896
+ import * as React27 from "react";
5481
5897
  import { useEffect as useEffect10, useLayoutEffect as useLayoutEffect8, useState as useState5 } from "react";
5482
5898
 
5483
5899
  // src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
@@ -5543,7 +5959,7 @@ function FilterIcon(props) {
5543
5959
  return null;
5544
5960
  }
5545
5961
  const indexStyle = {};
5546
- return /* @__PURE__ */ React26.createElement(
5962
+ return /* @__PURE__ */ React27.createElement(
5547
5963
  "div",
5548
5964
  {
5549
5965
  "data-name": "filter-icon",
@@ -5555,7 +5971,7 @@ function FilterIcon(props) {
5555
5971
  `${InfiniteIconClassName}-filter`
5556
5972
  )
5557
5973
  },
5558
- showIndex ? /* @__PURE__ */ React26.createElement(
5974
+ showIndex ? /* @__PURE__ */ React27.createElement(
5559
5975
  "div",
5560
5976
  {
5561
5977
  "data-name": "index",
@@ -5564,9 +5980,9 @@ function FilterIcon(props) {
5564
5980
  },
5565
5981
  index
5566
5982
  ) : null,
5567
- /* @__PURE__ */ React26.createElement("div", { style: { width: sizes[0], ...lineStyle } }),
5568
- /* @__PURE__ */ React26.createElement("div", { style: { width: sizes[1], ...lineStyle } }),
5569
- /* @__PURE__ */ React26.createElement("div", { style: { width: sizes[2], ...lineStyle } })
5983
+ /* @__PURE__ */ React27.createElement("div", { style: { width: sizes[0], ...lineStyle } }),
5984
+ /* @__PURE__ */ React27.createElement("div", { style: { width: sizes[1], ...lineStyle } }),
5985
+ /* @__PURE__ */ React27.createElement("div", { style: { width: sizes[2], ...lineStyle } })
5570
5986
  );
5571
5987
  }
5572
5988
 
@@ -6613,10 +7029,10 @@ function getColumnLabel(colIdOrCol, context) {
6613
7029
  }
6614
7030
 
6615
7031
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableColumnHeaderFilterContext.ts
6616
- import React27 from "react";
7032
+ import React28 from "react";
6617
7033
  var InfiniteTableColumnHeaderFilterClassName = `${rootClassName2}HeaderCell__filter`;
6618
7034
  var InfiniteTableColumnHeaderFilterOperatorClassName = `${rootClassName2}HeaderCell__filterOperator`;
6619
- var InfiniteTableColumnHeaderFilterContext = React27.createContext(null);
7035
+ var InfiniteTableColumnHeaderFilterContext = React28.createContext(null);
6620
7036
 
6621
7037
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableColumnHeaderFilter.tsx
6622
7038
  var InfiniteTableColumnHeaderFilterInputClassName = `${InfiniteTableColumnHeaderFilterClassName}__input`;
@@ -6627,14 +7043,14 @@ function InfiniteTableColumnHeaderFilter(props) {
6627
7043
  const FilterEditor = props.filterEditor;
6628
7044
  const FilterOperatorSwitch = props.filterOperatorSwitch;
6629
7045
  const [focused, setFocused] = useState6(false);
6630
- const onFocus = React28.useCallback(() => {
7046
+ const onFocus = React29.useCallback(() => {
6631
7047
  setFocused(true);
6632
7048
  }, []);
6633
- const onBlur = React28.useCallback(() => {
7049
+ const onBlur = React29.useCallback(() => {
6634
7050
  setFocused(false);
6635
7051
  }, []);
6636
7052
  const active = filterOperatorMenuVisibleForColumnId === column.id || focused;
6637
- return /* @__PURE__ */ React28.createElement(
7053
+ return /* @__PURE__ */ React29.createElement(
6638
7054
  "div",
6639
7055
  {
6640
7056
  onPointerUp: stopPropagation,
@@ -6648,13 +7064,13 @@ function InfiniteTableColumnHeaderFilter(props) {
6648
7064
  )}`,
6649
7065
  style: { height: props.columnHeaderHeight }
6650
7066
  },
6651
- /* @__PURE__ */ React28.createElement(InfiniteTableColumnHeaderFilterContext.Provider, { value: props }, /* @__PURE__ */ React28.createElement(FilterOperatorSwitch, null), /* @__PURE__ */ React28.createElement(FilterEditor, null))
7067
+ /* @__PURE__ */ React29.createElement(InfiniteTableColumnHeaderFilterContext.Provider, { value: props }, /* @__PURE__ */ React29.createElement(FilterOperatorSwitch, null), /* @__PURE__ */ React29.createElement(FilterEditor, null))
6652
7068
  );
6653
7069
  }
6654
7070
  function InfiniteTableFilterOperatorSwitch() {
6655
7071
  const { columnApi, disabled, operator } = useInfiniteColumnFilterEditor();
6656
7072
  const Icon2 = operator?.components?.Icon ?? FilterIcon;
6657
- return /* @__PURE__ */ React28.createElement(
7073
+ return /* @__PURE__ */ React29.createElement(
6658
7074
  "div",
6659
7075
  {
6660
7076
  "data-name": "filter-operator",
@@ -6672,7 +7088,7 @@ function InfiniteTableFilterOperatorSwitch() {
6672
7088
  disabled ? `${InfiniteTableColumnHeaderFilterOperatorClassName}--disabled` : ""
6673
7089
  )
6674
7090
  },
6675
- /* @__PURE__ */ React28.createElement(
7091
+ /* @__PURE__ */ React29.createElement(
6676
7092
  Icon2,
6677
7093
  {
6678
7094
  size: 20,
@@ -6684,7 +7100,7 @@ function InfiniteTableFilterOperatorSwitch() {
6684
7100
  );
6685
7101
  }
6686
7102
  function InfiniteTableColumnHeaderFilterEmpty() {
6687
- return /* @__PURE__ */ React28.createElement(
7103
+ return /* @__PURE__ */ React29.createElement(
6688
7104
  "div",
6689
7105
  {
6690
7106
  onPointerUp: stopPropagation,
@@ -6699,7 +7115,7 @@ function useInfiniteColumnFilterEditor() {
6699
7115
  const context = useInfiniteTable();
6700
7116
  const { column, columnApi } = useInfiniteHeaderCell();
6701
7117
  const columnLabel = getColumnLabel(column, context);
6702
- const filterContextValue = React28.useContext(
7118
+ const filterContextValue = React29.useContext(
6703
7119
  InfiniteTableColumnHeaderFilterContext
6704
7120
  );
6705
7121
  const { columnFilterType, filterTypes, columnFilterValue } = filterContextValue;
@@ -6707,17 +7123,17 @@ function useInfiniteColumnFilterEditor() {
6707
7123
  const [theValue, setTheValue] = useState6(
6708
7124
  columnFilterValue?.filter.value ?? ""
6709
7125
  );
6710
- const onInputChange = React28.useCallback(
7126
+ const onInputChange = React29.useCallback(
6711
7127
  (filterValue) => {
6712
7128
  setTheValue(filterValue);
6713
7129
  filterContextValue.onChange(filterValue);
6714
7130
  },
6715
7131
  [filterContextValue.onChange]
6716
7132
  );
6717
- const clearValue = React28.useCallback(() => {
7133
+ const clearValue = React29.useCallback(() => {
6718
7134
  context.api.clearColumnFilter(column.id);
6719
7135
  }, [column.id]);
6720
- const removeColumnFilter = React28.useCallback(() => {
7136
+ const removeColumnFilter = React29.useCallback(() => {
6721
7137
  context.api.removeColumnFilter(column.id);
6722
7138
  }, [column.id]);
6723
7139
  useEffect11(() => {
@@ -6760,7 +7176,7 @@ function useInfiniteColumnFilterEditor() {
6760
7176
  // src/components/InfiniteTable/components/FilterEditors.tsx
6761
7177
  function StringFilterEditor() {
6762
7178
  const { ariaLabel, value, setValue, className, disabled } = useInfiniteColumnFilterEditor();
6763
- return /* @__PURE__ */ React29.createElement(
7179
+ return /* @__PURE__ */ React30.createElement(
6764
7180
  "input",
6765
7181
  {
6766
7182
  "data-xxx": true,
@@ -6777,7 +7193,7 @@ function StringFilterEditor() {
6777
7193
  }
6778
7194
  function NumberFilterEditor() {
6779
7195
  const { ariaLabel, value, setValue, className, disabled } = useInfiniteColumnFilterEditor();
6780
- return /* @__PURE__ */ React29.createElement(
7196
+ return /* @__PURE__ */ React30.createElement(
6781
7197
  "input",
6782
7198
  {
6783
7199
  "aria-label": ariaLabel,
@@ -7260,7 +7676,7 @@ function useDOMProps(initialDOMProps) {
7260
7676
  }
7261
7677
 
7262
7678
  // src/components/InfiniteTable/hooks/reorderColumnsOnDrag.ts
7263
- var import_binary_search2 = __toESM(require_binary_search());
7679
+ var import_binary_search4 = __toESM(require_binary_search());
7264
7680
 
7265
7681
  // src/components/InfiniteTable/utils/CSSCalc.ts
7266
7682
  function mapToContinuation(args) {
@@ -7694,7 +8110,7 @@ function reorderColumnsOnDrag(params) {
7694
8110
  restrictToParentGroup: draggableColumnsRestrictTo === "group"
7695
8111
  });
7696
8112
  let currentPos = dir === -1 ? dragColumn.computedOffset + diffX : dragColumn.computedOffset + dragColumn.computedWidth + diffX;
7697
- let idx = (0, import_binary_search2.default)(
8113
+ let idx = (0, import_binary_search4.default)(
7698
8114
  breakpoints,
7699
8115
  currentPos,
7700
8116
  ({ offsetX }, value) => {
@@ -8035,14 +8451,14 @@ var useColumnPointerEvents = ({
8035
8451
  };
8036
8452
 
8037
8453
  // src/components/InfiniteTable/utils/RenderHookComponentForInfinite.tsx
8038
- import * as React37 from "react";
8454
+ import * as React38 from "react";
8039
8455
 
8040
8456
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx
8041
- import * as React36 from "react";
8457
+ import * as React37 from "react";
8042
8458
  import { useCallback as useCallback12, useContext as useContext6, useMemo as useMemo4 } from "react";
8043
8459
 
8044
8460
  // src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
8045
- import * as React32 from "react";
8461
+ import * as React33 from "react";
8046
8462
 
8047
8463
  // src/components/DataSource/state/rowInfoStatus.ts
8048
8464
  var showLoadingIcon = (rowInfo) => {
@@ -8053,7 +8469,7 @@ var showLoadingIcon = (rowInfo) => {
8053
8469
  };
8054
8470
 
8055
8471
  // src/components/InfiniteTable/components/icons/ExpandCollapseIcon.tsx
8056
- import * as React30 from "react";
8472
+ import * as React31 from "react";
8057
8473
  import { useState as useState8 } from "react";
8058
8474
 
8059
8475
  // src/components/InfiniteTable/components/icons/ExpandCollapseIcon.css.ts
@@ -8073,13 +8489,13 @@ function ExpandCollapseIcon(props) {
8073
8489
  setExpanded(!expanded);
8074
8490
  }
8075
8491
  };
8076
- React30.useEffect(() => {
8492
+ React31.useEffect(() => {
8077
8493
  if (isControlled("expanded", props)) {
8078
8494
  setExpanded(props.expanded);
8079
8495
  }
8080
8496
  }, [props.expanded]);
8081
8497
  const currentState = expanded ? "expanded" : "collapsed";
8082
- return /* @__PURE__ */ React30.createElement(
8498
+ return /* @__PURE__ */ React31.createElement(
8083
8499
  "svg",
8084
8500
  {
8085
8501
  "data-name": "expand-collapse-icon",
@@ -8106,19 +8522,19 @@ function ExpandCollapseIcon(props) {
8106
8522
  disabled ? `${THIS_ICON}--disabled` : ""
8107
8523
  )
8108
8524
  },
8109
- /* @__PURE__ */ React30.createElement("path", { d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z" })
8525
+ /* @__PURE__ */ React31.createElement("path", { d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z" })
8110
8526
  );
8111
8527
  }
8112
8528
 
8113
8529
  // src/components/InfiniteTable/components/icons/LoadingIcon.tsx
8114
- import * as React31 from "react";
8530
+ import * as React32 from "react";
8115
8531
 
8116
8532
  // src/components/InfiniteTable/components/icons/LoadingIcon.css.ts
8117
8533
  var LoadingIconCls = "utilities_stroke_accentColor__16lm1iwb utilities_flex_none__16lm1iwn utilities_cursor_pointer__16lm1iwi";
8118
8534
 
8119
8535
  // src/components/InfiniteTable/components/icons/LoadingIcon.tsx
8120
8536
  var LoadingIcon = (props) => {
8121
- return /* @__PURE__ */ React31.createElement(
8537
+ return /* @__PURE__ */ React32.createElement(
8122
8538
  "svg",
8123
8539
  {
8124
8540
  xmlns: "http://www.w3.org/2000/svg",
@@ -8138,7 +8554,7 @@ var LoadingIcon = (props) => {
8138
8554
  "InfiniteIcon-loading"
8139
8555
  )
8140
8556
  },
8141
- /* @__PURE__ */ React31.createElement(
8557
+ /* @__PURE__ */ React32.createElement(
8142
8558
  "circle",
8143
8559
  {
8144
8560
  cx: "50",
@@ -8148,7 +8564,7 @@ var LoadingIcon = (props) => {
8148
8564
  r: "35",
8149
8565
  strokeDasharray: "164.93361431346415 56.97787143782138"
8150
8566
  },
8151
- /* @__PURE__ */ React31.createElement(
8567
+ /* @__PURE__ */ React32.createElement(
8152
8568
  "animateTransform",
8153
8569
  {
8154
8570
  attributeName: "transform",
@@ -8193,11 +8609,11 @@ function getGroupColumnRender({
8193
8609
  );
8194
8610
  if (groupRenderStrategy === "multi-column") {
8195
8611
  if (groupIndexForColumn + 1 !== groupRowInfo.groupNesting && groupRowInfo.isGroupRow) {
8196
- return selectionCheckBox ? /* @__PURE__ */ React32.createElement("div", { className }, selectionCheckBox) : null;
8612
+ return selectionCheckBox ? /* @__PURE__ */ React33.createElement("div", { className }, selectionCheckBox) : null;
8197
8613
  }
8198
8614
  } else if (groupRenderStrategy === "single-column" && !groupRowInfo.isGroupRow) {
8199
8615
  }
8200
- return /* @__PURE__ */ React32.createElement("div", { className }, groupIcon, selectionCheckBox, /* @__PURE__ */ React32.createElement("div", { className: cssEllipsisClassName }, valueToRender ?? null));
8616
+ return /* @__PURE__ */ React33.createElement("div", { className }, groupIcon, selectionCheckBox, /* @__PURE__ */ React33.createElement("div", { className: cssEllipsisClassName }, valueToRender ?? null));
8201
8617
  };
8202
8618
  }
8203
8619
  function getGroupColumnRenderGroupIcon({
@@ -8245,9 +8661,9 @@ function getGroupColumnRenderGroupIcon({
8245
8661
  const showExpanderIcon = pivotBy ? (groupRowInfo.groupKeys?.length || 0) < groupBy?.length : (groupRowInfo.groupKeys?.length || 0) <= groupBy?.length;
8246
8662
  const isLoading = showLoadingIcon(groupRowInfo);
8247
8663
  if (isLoading) {
8248
- icon = /* @__PURE__ */ React32.createElement(LoadingIcon, null);
8664
+ icon = /* @__PURE__ */ React33.createElement(LoadingIcon, null);
8249
8665
  } else if (showExpanderIcon) {
8250
- const defaultIcon = /* @__PURE__ */ React32.createElement(
8666
+ const defaultIcon = /* @__PURE__ */ React33.createElement(
8251
8667
  ExpandCollapseIcon,
8252
8668
  {
8253
8669
  expanded: !collapsed,
@@ -8261,7 +8677,7 @@ function getGroupColumnRenderGroupIcon({
8261
8677
  }
8262
8678
  if (initialRenderGroupIcon) {
8263
8679
  renderOptions.renderBag.groupIcon = icon;
8264
- icon = /* @__PURE__ */ React32.createElement(
8680
+ icon = /* @__PURE__ */ React33.createElement(
8265
8681
  RenderCellHookComponent,
8266
8682
  {
8267
8683
  render: initialRenderGroupIcon,
@@ -8349,7 +8765,7 @@ var FlashingColumnCellRecipe = createRuntimeFn({ defaultClassName: "cell_Flashin
8349
8765
  var SelectionCheckboxCls = "cell_SelectionCheckboxCls__1eexc2a7";
8350
8766
 
8351
8767
  // src/components/InfiniteTable/components/CheckBox.tsx
8352
- import * as React33 from "react";
8768
+ import * as React34 from "react";
8353
8769
  import { useEffect as useEffect13, useRef as useRef12 } from "react";
8354
8770
 
8355
8771
  // src/components/InfiniteTable/components/CheckBox.css.ts
@@ -8388,7 +8804,7 @@ function InfiniteCheckBoxComponent() {
8388
8804
  useEffect13(() => {
8389
8805
  inputRef.current.indeterminate = checked == null;
8390
8806
  }, [checked]);
8391
- return /* @__PURE__ */ React33.createElement(
8807
+ return /* @__PURE__ */ React34.createElement(
8392
8808
  "input",
8393
8809
  {
8394
8810
  ...domProps,
@@ -8407,7 +8823,7 @@ function InfiniteCheckBoxComponent() {
8407
8823
  );
8408
8824
  }
8409
8825
  function InfiniteCheckBox(props) {
8410
- return /* @__PURE__ */ React33.createElement(InfiniteCheckBoxRoot, { ...props }, /* @__PURE__ */ React33.createElement(InfiniteCheckBoxComponent, null));
8826
+ return /* @__PURE__ */ React34.createElement(InfiniteCheckBoxRoot, { ...props }, /* @__PURE__ */ React34.createElement(InfiniteCheckBoxComponent, null));
8411
8827
  }
8412
8828
 
8413
8829
  // src/components/InfiniteTable/components/InfiniteTableRow/columnRendering.tsx
@@ -8831,7 +9247,7 @@ function getFormattedValueContextForCell(options) {
8831
9247
  }
8832
9248
 
8833
9249
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCell.tsx
8834
- import * as React34 from "react";
9250
+ import * as React35 from "react";
8835
9251
  var { rootClassName: rootClassName5 } = internalProps;
8836
9252
  var InfiniteTableCellClassName = `${rootClassName5}Cell`;
8837
9253
  var InfiniteTableCellContentClassName = `${rootClassName5}Cell_content`;
@@ -8878,7 +9294,7 @@ function InfiniteTableCellFn(props) {
8878
9294
  // ? `${InfiniteTableCellClassName}--shifting ${CellClsVariants.shifting}`
8879
9295
  // : '',
8880
9296
  ),
8881
- children: /* @__PURE__ */ React34.createElement(React34.Fragment, null, beforeChildren, /* @__PURE__ */ React34.createElement(
9297
+ children: /* @__PURE__ */ React35.createElement(React35.Fragment, null, beforeChildren, /* @__PURE__ */ React35.createElement(
8882
9298
  "div",
8883
9299
  {
8884
9300
  className: join(
@@ -8896,21 +9312,21 @@ function InfiniteTableCellFn(props) {
8896
9312
  }
8897
9313
  const RenderComponent = cellType === "body" ? column.components?.ColumnCell : column.components?.HeaderCell;
8898
9314
  if (RenderComponent) {
8899
- return /* @__PURE__ */ React34.createElement(RenderComponent, { ...finalDOMProps, ref: domRef });
9315
+ return /* @__PURE__ */ React35.createElement(RenderComponent, { ...finalDOMProps, ref: domRef });
8900
9316
  }
8901
- return /* @__PURE__ */ React34.createElement("div", { ...finalDOMProps, ref: domRef });
9317
+ return /* @__PURE__ */ React35.createElement("div", { ...finalDOMProps, ref: domRef });
8902
9318
  }
8903
- var InfiniteTableCell = React34.memo(
9319
+ var InfiniteTableCell = React35.memo(
8904
9320
  InfiniteTableCellFn
8905
9321
  );
8906
9322
 
8907
9323
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnEditor.tsx
8908
- import * as React35 from "react";
9324
+ import * as React36 from "react";
8909
9325
  import { useCallback as useCallback10, useRef as useRef13 } from "react";
8910
9326
  function InfiniteTableColumnEditor() {
8911
9327
  const { initialValue, setValue, confirmEdit, cancelEdit, readOnly } = useInfiniteColumnEditor();
8912
9328
  const domRef = useRef13();
8913
- const refCallback = React35.useCallback((node) => {
9329
+ const refCallback = React36.useCallback((node) => {
8914
9330
  domRef.current = node;
8915
9331
  if (node) {
8916
9332
  node.focus();
@@ -8926,7 +9342,7 @@ function InfiniteTableColumnEditor() {
8926
9342
  event.stopPropagation();
8927
9343
  }
8928
9344
  }, []);
8929
- return /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement(
9345
+ return /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(
8930
9346
  "input",
8931
9347
  {
8932
9348
  readOnly,
@@ -8953,11 +9369,11 @@ function styleForTreeColumn({
8953
9369
  [stripVar(ThemeVars.components.Row.groupNesting)]: rowInfo.isTreeNode ? rowInfo.isParentNode ? rowInfo.treeNesting : rowInfo.treeNesting + 1 : 0
8954
9370
  };
8955
9371
  }
8956
- var InfiniteTableColumnCellContext = React36.createContext(null);
9372
+ var InfiniteTableColumnCellContext = React37.createContext(null);
8957
9373
  var InfiniteTableColumnCellClassName = `${rootClassName6}ColumnCell`;
8958
9374
  var defaultRenderRowDetailIcon = (params) => {
8959
9375
  const { toggleCurrentRowDetails, rowDetailState } = params;
8960
- return /* @__PURE__ */ React36.createElement(
9376
+ return /* @__PURE__ */ React37.createElement(
8961
9377
  ExpandCollapseIcon,
8962
9378
  {
8963
9379
  style: {
@@ -8975,7 +9391,7 @@ var EXPANDER_STYLE = {
8975
9391
  var defaultRenderTreeIcon = (params) => {
8976
9392
  const { rowInfo, toggleCurrentTreeNode, nodeExpanded, api } = params;
8977
9393
  const isNodeReadOnly2 = api.getDataSourceState().isNodeReadOnly;
8978
- return /* @__PURE__ */ React36.createElement(
9394
+ return /* @__PURE__ */ React37.createElement(
8979
9395
  ExpandCollapseIcon,
8980
9396
  {
8981
9397
  disabled: rowInfo.isTreeNode && rowInfo.isParentNode ? isNodeReadOnly2(rowInfo) : false,
@@ -9000,7 +9416,7 @@ var defaultRenderSelectionCheckBox = (params) => {
9000
9416
  const { components: components2 } = api.getState();
9001
9417
  const isNodeSelectable2 = api.getDataSourceState().isNodeSelectable;
9002
9418
  const CheckBoxCmp = components2?.CheckBox || InfiniteCheckBox;
9003
- return /* @__PURE__ */ React36.createElement(
9419
+ return /* @__PURE__ */ React37.createElement(
9004
9420
  CheckBoxCmp,
9005
9421
  {
9006
9422
  domProps: {
@@ -9060,7 +9476,7 @@ function InfiniteTableColumnCellFn(props) {
9060
9476
  hidden,
9061
9477
  showZebraRows
9062
9478
  } = props;
9063
- const htmlElementRef = React36.useRef(null);
9479
+ const htmlElementRef = React37.useRef(null);
9064
9480
  const domRef = useCallback12(
9065
9481
  (node) => {
9066
9482
  htmlElementRef.current = node;
@@ -9071,7 +9487,7 @@ function InfiniteTableColumnCellFn(props) {
9071
9487
  [initialDomRef]
9072
9488
  );
9073
9489
  if (!column) {
9074
- return /* @__PURE__ */ React36.createElement("div", { ref: domRef }, "no column");
9490
+ return /* @__PURE__ */ React37.createElement("div", { ref: domRef }, "no column");
9075
9491
  }
9076
9492
  const { rowSelected } = rowInfo;
9077
9493
  const {
@@ -9121,7 +9537,7 @@ function InfiniteTableColumnCellFn(props) {
9121
9537
  } = colRenderingParams;
9122
9538
  const { align: align2, verticalAlign } = renderParams;
9123
9539
  const renderParam = renderParams;
9124
- const renderParamRef = React36.useRef(renderParam);
9540
+ const renderParamRef = React37.useRef(renderParam);
9125
9541
  const onClick = useCallback12(
9126
9542
  (event) => {
9127
9543
  const colIndex = column.computedVisibleIndex;
@@ -9186,7 +9602,7 @@ function InfiniteTableColumnCellFn(props) {
9186
9602
  [rowInfo]
9187
9603
  );
9188
9604
  const EditorComponent = column.components?.Editor ?? InfiniteTableColumnEditor;
9189
- const editor = inEdit ? /* @__PURE__ */ React36.createElement(CellEditorContextComponent, { contextValue: renderParam }, /* @__PURE__ */ React36.createElement(EditorComponent, null)) : null;
9605
+ const editor = inEdit ? /* @__PURE__ */ React37.createElement(CellEditorContextComponent, { contextValue: renderParam }, /* @__PURE__ */ React37.createElement(EditorComponent, null)) : null;
9190
9606
  const renderChildren = useCallback12(
9191
9607
  once(() => {
9192
9608
  if (hidden) {
@@ -9197,7 +9613,7 @@ function InfiniteTableColumnCellFn(props) {
9197
9613
  }
9198
9614
  renderParamRef.current = renderParam;
9199
9615
  if (renderFunctions.renderGroupIcon) {
9200
- renderParam.renderBag.groupIcon = /* @__PURE__ */ React36.createElement(
9616
+ renderParam.renderBag.groupIcon = /* @__PURE__ */ React37.createElement(
9201
9617
  RenderCellHookComponent,
9202
9618
  {
9203
9619
  render: renderFunctions.renderGroupIcon,
@@ -9209,7 +9625,7 @@ function InfiniteTableColumnCellFn(props) {
9209
9625
  );
9210
9626
  }
9211
9627
  if (renderFunctions.renderSelectionCheckBox && selectionMode == "multi-row") {
9212
- renderParam.renderBag.selectionCheckBox = /* @__PURE__ */ React36.createElement(
9628
+ renderParam.renderBag.selectionCheckBox = /* @__PURE__ */ React37.createElement(
9213
9629
  RenderCellHookComponent,
9214
9630
  {
9215
9631
  render: defaultRenderSelectionCheckBox,
@@ -9217,7 +9633,7 @@ function InfiniteTableColumnCellFn(props) {
9217
9633
  }
9218
9634
  );
9219
9635
  if (renderFunctions.renderSelectionCheckBox !== true) {
9220
- renderParam.renderBag.selectionCheckBox = /* @__PURE__ */ React36.createElement(
9636
+ renderParam.renderBag.selectionCheckBox = /* @__PURE__ */ React37.createElement(
9221
9637
  RenderCellHookComponent,
9222
9638
  {
9223
9639
  render: renderFunctions.renderSelectionCheckBox,
@@ -9238,7 +9654,7 @@ function InfiniteTableColumnCellFn(props) {
9238
9654
  if (fn === true) {
9239
9655
  fn = defaultRenderTreeIcon;
9240
9656
  } else if (fn) {
9241
- renderParam.renderBag.treeIcon = /* @__PURE__ */ React36.createElement(
9657
+ renderParam.renderBag.treeIcon = /* @__PURE__ */ React37.createElement(
9242
9658
  RenderCellHookComponent,
9243
9659
  {
9244
9660
  render: defaultRenderTreeIcon,
@@ -9247,7 +9663,7 @@ function InfiniteTableColumnCellFn(props) {
9247
9663
  );
9248
9664
  }
9249
9665
  if (fn) {
9250
- renderParam.renderBag.treeIcon = /* @__PURE__ */ React36.createElement(
9666
+ renderParam.renderBag.treeIcon = /* @__PURE__ */ React37.createElement(
9251
9667
  RenderCellHookComponent,
9252
9668
  {
9253
9669
  render: fn,
@@ -9260,7 +9676,7 @@ function InfiniteTableColumnCellFn(props) {
9260
9676
  }
9261
9677
  }
9262
9678
  if (renderFunctions.renderRowDetailIcon) {
9263
- renderParam.renderBag.rowDetailsIcon = /* @__PURE__ */ React36.createElement(
9679
+ renderParam.renderBag.rowDetailsIcon = /* @__PURE__ */ React37.createElement(
9264
9680
  RenderCellHookComponent,
9265
9681
  {
9266
9682
  render: defaultRenderRowDetailIcon,
@@ -9273,7 +9689,7 @@ function InfiniteTableColumnCellFn(props) {
9273
9689
  }
9274
9690
  );
9275
9691
  if (typeof renderFunctions.renderRowDetailIcon === "function") {
9276
- renderParam.renderBag.rowDetailsIcon = /* @__PURE__ */ React36.createElement(
9692
+ renderParam.renderBag.rowDetailsIcon = /* @__PURE__ */ React37.createElement(
9277
9693
  RenderCellHookComponent,
9278
9694
  {
9279
9695
  render: renderFunctions.renderRowDetailIcon,
@@ -9286,7 +9702,7 @@ function InfiniteTableColumnCellFn(props) {
9286
9702
  }
9287
9703
  }
9288
9704
  if (renderFunctions.renderValue) {
9289
- renderParam.renderBag.value = /* @__PURE__ */ React36.createElement(
9705
+ renderParam.renderBag.value = /* @__PURE__ */ React37.createElement(
9290
9706
  RenderCellHookComponent,
9291
9707
  {
9292
9708
  render: renderFunctions.renderValue,
@@ -9298,7 +9714,7 @@ function InfiniteTableColumnCellFn(props) {
9298
9714
  );
9299
9715
  }
9300
9716
  if (rowInfo.isGroupRow && renderFunctions.renderGroupValue) {
9301
- renderParam.renderBag.value = /* @__PURE__ */ React36.createElement(
9717
+ renderParam.renderBag.value = /* @__PURE__ */ React37.createElement(
9302
9718
  RenderCellHookComponent,
9303
9719
  {
9304
9720
  render: renderFunctions.renderGroupValue,
@@ -9310,7 +9726,7 @@ function InfiniteTableColumnCellFn(props) {
9310
9726
  );
9311
9727
  }
9312
9728
  if (!rowInfo.isGroupRow && renderFunctions.renderLeafValue) {
9313
- renderParam.renderBag.value = /* @__PURE__ */ React36.createElement(
9729
+ renderParam.renderBag.value = /* @__PURE__ */ React37.createElement(
9314
9730
  RenderCellHookComponent,
9315
9731
  {
9316
9732
  render: renderFunctions.renderLeafValue,
@@ -9326,9 +9742,9 @@ function InfiniteTableColumnCellFn(props) {
9326
9742
  if (valueToRender instanceof Date) {
9327
9743
  valueToRender = valueToRender.toLocaleDateString();
9328
9744
  }
9329
- const all = /* @__PURE__ */ React36.createElement(React36.Fragment, null, align2 !== "end" ? renderParam.renderBag.treeIcon : null, align2 !== "end" ? renderParam.renderBag.groupIcon : null, align2 !== "end" ? renderParam.renderBag.rowDetailsIcon : null, align2 !== "end" ? renderParam.renderBag.selectionCheckBox : null, valueToRender, align2 === "end" ? renderParam.renderBag.selectionCheckBox : null, align2 === "end" ? renderParam.renderBag.rowDetailsIcon : null, align2 === "end" ? renderParam.renderBag.groupIcon : null, align2 === "end" ? renderParam.renderBag.treeIcon : null);
9745
+ const all = /* @__PURE__ */ React37.createElement(React37.Fragment, null, align2 !== "end" ? renderParam.renderBag.treeIcon : null, align2 !== "end" ? renderParam.renderBag.groupIcon : null, align2 !== "end" ? renderParam.renderBag.rowDetailsIcon : null, align2 !== "end" ? renderParam.renderBag.selectionCheckBox : null, valueToRender, align2 === "end" ? renderParam.renderBag.selectionCheckBox : null, align2 === "end" ? renderParam.renderBag.rowDetailsIcon : null, align2 === "end" ? renderParam.renderBag.groupIcon : null, align2 === "end" ? renderParam.renderBag.treeIcon : null);
9330
9746
  if (column.render) {
9331
- return /* @__PURE__ */ React36.createElement(
9747
+ return /* @__PURE__ */ React37.createElement(
9332
9748
  RenderCellHookComponent,
9333
9749
  {
9334
9750
  render: column.render,
@@ -9514,16 +9930,16 @@ function InfiniteTableColumnCellFn(props) {
9514
9930
  return (
9515
9931
  // this context is here for supporting useInfiniteColumnCell to be used
9516
9932
  // with a custom column component, specified via column.components.ColumnCell
9517
- /* @__PURE__ */ React36.createElement(
9933
+ /* @__PURE__ */ React37.createElement(
9518
9934
  ContextProvider,
9519
9935
  {
9520
9936
  value: renderParamRef.current
9521
9937
  },
9522
- /* @__PURE__ */ React36.createElement(InfiniteTableCell, { ...cellProps })
9938
+ /* @__PURE__ */ React37.createElement(InfiniteTableCell, { ...cellProps })
9523
9939
  )
9524
9940
  );
9525
9941
  }
9526
- var InfiniteTableColumnCell = React36.memo(
9942
+ var InfiniteTableColumnCell = React37.memo(
9527
9943
  InfiniteTableColumnCellFn
9528
9944
  );
9529
9945
  function useInfiniteColumnCell() {
@@ -9538,14 +9954,14 @@ function useInfiniteColumnEditor() {
9538
9954
  state: { editingValueRef, editingCell }
9539
9955
  } = useInfiniteTable();
9540
9956
  const { column, rowInfo } = useInfiniteColumnCell();
9541
- const [initialValue] = React36.useState(() => editingCell?.value);
9542
- const [currentValue, setCurrentValue] = React36.useState(initialValue);
9957
+ const [initialValue] = React37.useState(() => editingCell?.value);
9958
+ const [currentValue, setCurrentValue] = React37.useState(initialValue);
9543
9959
  const readOnly = editingCell ? !editingCell.active && !!editingCell.waiting : false;
9544
- const setValue = React36.useCallback((value) => {
9960
+ const setValue = React37.useCallback((value) => {
9545
9961
  editingValueRef.current = value;
9546
9962
  setCurrentValue(value);
9547
9963
  }, []);
9548
- React36.useLayoutEffect(() => {
9964
+ React37.useLayoutEffect(() => {
9549
9965
  editingValueRef.current = initialValue;
9550
9966
  }, []);
9551
9967
  const confirmEdit = api.confirmEdit;
@@ -9573,7 +9989,7 @@ function RenderHookComponent(props) {
9573
9989
  // src/components/InfiniteTable/utils/RenderHookComponentForInfinite.tsx
9574
9990
  function RenderCellHookComponent(props) {
9575
9991
  const ContextProvider = InfiniteTableColumnCellContext.Provider;
9576
- return /* @__PURE__ */ React37.createElement(ContextProvider, { value: props.renderParam }, /* @__PURE__ */ React37.createElement(
9992
+ return /* @__PURE__ */ React38.createElement(ContextProvider, { value: props.renderParam }, /* @__PURE__ */ React38.createElement(
9577
9993
  RenderHookComponent,
9578
9994
  {
9579
9995
  render: props.render,
@@ -9583,11 +9999,11 @@ function RenderCellHookComponent(props) {
9583
9999
  }
9584
10000
  function CellEditorContextComponent(props) {
9585
10001
  const ContextProvider = InfiniteTableColumnCellContext.Provider;
9586
- return /* @__PURE__ */ React37.createElement(ContextProvider, { value: props.contextValue }, props.children);
10002
+ return /* @__PURE__ */ React38.createElement(ContextProvider, { value: props.contextValue }, props.children);
9587
10003
  }
9588
10004
  function RenderHeaderCellHookComponent(props) {
9589
10005
  const ContextProvider = InfiniteTableHeaderCellContext.Provider;
9590
- return /* @__PURE__ */ React37.createElement(ContextProvider, { value: props.renderParam }, /* @__PURE__ */ React37.createElement(
10006
+ return /* @__PURE__ */ React38.createElement(ContextProvider, { value: props.renderParam }, /* @__PURE__ */ React38.createElement(
9591
10007
  RenderHookComponent,
9592
10008
  {
9593
10009
  render: props.render,
@@ -9597,7 +10013,7 @@ function RenderHeaderCellHookComponent(props) {
9597
10013
  }
9598
10014
 
9599
10015
  // src/components/InfiniteTable/components/icons/MenuIcon.tsx
9600
- import * as React38 from "react";
10016
+ import * as React39 from "react";
9601
10017
  var defaultLineStyle2 = {
9602
10018
  width: "100%",
9603
10019
  pointerEvents: "none"
@@ -9623,7 +10039,7 @@ function MenuIcon(props) {
9623
10039
  borderTop: `${ThemeVars.components.HeaderCell.menuIconLineWidth} solid currentColor`,
9624
10040
  ...props.lineStyle
9625
10041
  };
9626
- return /* @__PURE__ */ React38.createElement(
10042
+ return /* @__PURE__ */ React39.createElement(
9627
10043
  "div",
9628
10044
  {
9629
10045
  ...domProps,
@@ -9640,12 +10056,12 @@ function MenuIcon(props) {
9640
10056
  `${InfiniteIconClassName}-menu`
9641
10057
  )
9642
10058
  },
9643
- children ?? /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement("div", { className: lineClassName, style: lineStyle }), /* @__PURE__ */ React38.createElement("div", { className: lineClassName, style: lineStyle }), /* @__PURE__ */ React38.createElement("div", { className: lineClassName, style: lineStyle }))
10059
+ children ?? /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement("div", { className: lineClassName, style: lineStyle }), /* @__PURE__ */ React39.createElement("div", { className: lineClassName, style: lineStyle }), /* @__PURE__ */ React39.createElement("div", { className: lineClassName, style: lineStyle }))
9644
10060
  );
9645
10061
  }
9646
10062
 
9647
10063
  // src/components/InfiniteTable/components/icons/SortIcon.tsx
9648
- import * as React39 from "react";
10064
+ import * as React40 from "react";
9649
10065
  import { useEffect as useEffect14, useState as useState10 } from "react";
9650
10066
 
9651
10067
  // src/components/InfiniteTable/components/icons/SortIcon.css.ts
@@ -9704,7 +10120,7 @@ function SortIcon(props) {
9704
10120
  if (direction === -1) {
9705
10121
  indexStyle.top = "100%";
9706
10122
  }
9707
- return /* @__PURE__ */ React39.createElement(
10123
+ return /* @__PURE__ */ React40.createElement(
9708
10124
  "div",
9709
10125
  {
9710
10126
  "data-name": "sort-icon",
@@ -9716,7 +10132,7 @@ function SortIcon(props) {
9716
10132
  `${InfiniteIconClassName}-sort`
9717
10133
  )
9718
10134
  },
9719
- showIndex ? /* @__PURE__ */ React39.createElement(
10135
+ showIndex ? /* @__PURE__ */ React40.createElement(
9720
10136
  "div",
9721
10137
  {
9722
10138
  "data-name": "index",
@@ -9725,25 +10141,25 @@ function SortIcon(props) {
9725
10141
  },
9726
10142
  index
9727
10143
  ) : null,
9728
- /* @__PURE__ */ React39.createElement(
10144
+ /* @__PURE__ */ React40.createElement(
9729
10145
  "div",
9730
10146
  {
9731
10147
  style: { width: sizes[0], ...lineStyle },
9732
10148
  onTransitionEnd
9733
10149
  }
9734
10150
  ),
9735
- /* @__PURE__ */ React39.createElement("div", { style: { width: sizes[1], ...lineStyle } }),
9736
- /* @__PURE__ */ React39.createElement("div", { style: { width: sizes[2], ...lineStyle } })
10151
+ /* @__PURE__ */ React40.createElement("div", { style: { width: sizes[1], ...lineStyle } }),
10152
+ /* @__PURE__ */ React40.createElement("div", { style: { width: sizes[2], ...lineStyle } })
9737
10153
  );
9738
10154
  }
9739
10155
 
9740
10156
  // src/components/InfiniteTable/components/InfiniteTableHeader/useColumnResizeHandle.tsx
9741
- import * as React41 from "react";
10157
+ import * as React42 from "react";
9742
10158
  import { useCallback as useCallback13 } from "react";
9743
10159
 
9744
10160
  // src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/index.tsx
9745
10161
  import { useRef as useRef15, useState as useState11 } from "react";
9746
- import * as React40 from "react";
10162
+ import * as React41 from "react";
9747
10163
 
9748
10164
  // src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/columnResizer.ts
9749
10165
  function getColumnResizer(colIndex, {
@@ -9959,7 +10375,7 @@ function ResizeHandleFn(props) {
9959
10375
  right: computedPinned === "start" ? void 0 : 0
9960
10376
  //ThemeVars.components.HeaderCell.resizeHandleWidth,
9961
10377
  } : computedPinned === "end" && computedFirstInCategory ? { right: void 0 } : void 0;
9962
- return /* @__PURE__ */ React40.createElement(
10378
+ return /* @__PURE__ */ React41.createElement(
9963
10379
  "div",
9964
10380
  {
9965
10381
  ref: domRef,
@@ -9972,7 +10388,7 @@ function ResizeHandleFn(props) {
9972
10388
  )}`,
9973
10389
  onPointerDown
9974
10390
  },
9975
- /* @__PURE__ */ React40.createElement(
10391
+ /* @__PURE__ */ React41.createElement(
9976
10392
  "div",
9977
10393
  {
9978
10394
  style: style2,
@@ -9986,7 +10402,7 @@ function ResizeHandleFn(props) {
9986
10402
  )
9987
10403
  );
9988
10404
  }
9989
- var ResizeHandle = React40.memo(ResizeHandleFn);
10405
+ var ResizeHandle = React41.memo(ResizeHandleFn);
9990
10406
 
9991
10407
  // src/components/InfiniteTable/components/InfiniteTableHeader/useColumnResizeHandle.tsx
9992
10408
  function useColumnResizeHandle(column, opts) {
@@ -10056,7 +10472,7 @@ function useColumnResizeHandle(column, opts) {
10056
10472
  },
10057
10473
  [computeResizeForDiff]
10058
10474
  );
10059
- const resizeHandle = column.computedResizable ? /* @__PURE__ */ React41.createElement(
10475
+ const resizeHandle = column.computedResizable ? /* @__PURE__ */ React42.createElement(
10060
10476
  ResizeHandle,
10061
10477
  {
10062
10478
  horizontalLayoutPageIndex: opts.horizontalLayoutPageIndex,
@@ -10079,7 +10495,7 @@ var defaultRenderSelectionCheckBox2 = (params) => {
10079
10495
  const selected = allRowsSelected ? true : someRowsSelected ? null : false;
10080
10496
  const { components: components2, isTree } = api.getState();
10081
10497
  const CheckBoxCmp = components2?.CheckBox || InfiniteCheckBox;
10082
- return /* @__PURE__ */ React42.createElement(
10498
+ return /* @__PURE__ */ React43.createElement(
10083
10499
  CheckBoxCmp,
10084
10500
  {
10085
10501
  domProps: {
@@ -10104,9 +10520,9 @@ var defaultRenderSelectionCheckBox2 = (params) => {
10104
10520
  }
10105
10521
  );
10106
10522
  };
10107
- var InfiniteTableHeaderCellContext = React42.createContext(null);
10523
+ var InfiniteTableHeaderCellContext = React43.createContext(null);
10108
10524
  var columnZIndexAtIndex5 = stripVar(InternalVars.columnZIndexAtIndex);
10109
- var spacer = /* @__PURE__ */ React42.createElement("div", { className: flex["1"] });
10525
+ var spacer = /* @__PURE__ */ React43.createElement("div", { className: flex["1"] });
10110
10526
  var InfiniteHeaderCellDataAttributes = keyMirror({
10111
10527
  "data-name": ``,
10112
10528
  "data-field": ``,
@@ -10168,7 +10584,7 @@ function InfiniteTableHeaderCell(props) {
10168
10584
  getState
10169
10585
  });
10170
10586
  const computedSortable = columnApi.isSortable();
10171
- const sortIcon = computedSortable && (column.computedSorted || alwaysShow) ? /* @__PURE__ */ React42.createElement(
10587
+ const sortIcon = computedSortable && (column.computedSorted || alwaysShow) ? /* @__PURE__ */ React43.createElement(
10172
10588
  SortIcon,
10173
10589
  {
10174
10590
  index: column.computedMultiSort ? column.computedSortIndex + 1 : void 0,
@@ -10185,7 +10601,7 @@ function InfiniteTableHeaderCell(props) {
10185
10601
  }
10186
10602
  ) : null;
10187
10603
  const filtered = column.computedFilterable && column.computedFiltered;
10188
- const filterIcon = filtered ? /* @__PURE__ */ React42.createElement(FilterIcon, null) : null;
10604
+ const filterIcon = filtered ? /* @__PURE__ */ React43.createElement(FilterIcon, null) : null;
10189
10605
  const headerCSSEllipsis = column.headerCssEllipsis ?? column.cssEllipsis ?? true;
10190
10606
  const menuIconProps = {
10191
10607
  reserveSpaceWhenHidden: align2 === "center",
@@ -10205,7 +10621,7 @@ function InfiniteTableHeaderCell(props) {
10205
10621
  }
10206
10622
  };
10207
10623
  const MenuIconCmp = column.components?.MenuIcon || components2?.MenuIcon || MenuIcon;
10208
- const menuIcon = /* @__PURE__ */ React42.createElement(MenuIconCmp, { ...menuIconProps });
10624
+ const menuIcon = /* @__PURE__ */ React43.createElement(MenuIconCmp, { ...menuIconProps });
10209
10625
  const domRef = useRef16(null);
10210
10626
  const initialRenderParam = {
10211
10627
  horizontalLayoutPageIndex,
@@ -10240,7 +10656,7 @@ function InfiniteTableHeaderCell(props) {
10240
10656
  renderBag: { ...initialRenderParam.renderBag }
10241
10657
  };
10242
10658
  if (column.renderSortIcon) {
10243
- renderParam2.renderBag.sortIcon = /* @__PURE__ */ React42.createElement(
10659
+ renderParam2.renderBag.sortIcon = /* @__PURE__ */ React43.createElement(
10244
10660
  RenderHeaderCellHookComponent,
10245
10661
  {
10246
10662
  render: column.renderSortIcon,
@@ -10258,7 +10674,7 @@ function InfiniteTableHeaderCell(props) {
10258
10674
  );
10259
10675
  }
10260
10676
  if (column.renderFilterIcon) {
10261
- renderParam2.renderBag.filterIcon = /* @__PURE__ */ React42.createElement(
10677
+ renderParam2.renderBag.filterIcon = /* @__PURE__ */ React43.createElement(
10262
10678
  RenderHeaderCellHookComponent,
10263
10679
  {
10264
10680
  render: column.renderFilterIcon,
@@ -10270,7 +10686,7 @@ function InfiniteTableHeaderCell(props) {
10270
10686
  );
10271
10687
  }
10272
10688
  if (typeof column.renderMenuIcon === "function") {
10273
- renderParam2.renderBag.menuIcon = /* @__PURE__ */ React42.createElement(
10689
+ renderParam2.renderBag.menuIcon = /* @__PURE__ */ React43.createElement(
10274
10690
  RenderHeaderCellHookComponent,
10275
10691
  {
10276
10692
  render: (param) => {
@@ -10282,7 +10698,7 @@ function InfiniteTableHeaderCell(props) {
10282
10698
  if (result.type === MenuIconCmp || result.type === MenuIcon) {
10283
10699
  return result;
10284
10700
  }
10285
- return /* @__PURE__ */ React42.createElement(MenuIconCmp, { ...menuIconProps }, result);
10701
+ return /* @__PURE__ */ React43.createElement(MenuIconCmp, { ...menuIconProps }, result);
10286
10702
  }
10287
10703
  return null;
10288
10704
  },
@@ -10296,7 +10712,7 @@ function InfiniteTableHeaderCell(props) {
10296
10712
  );
10297
10713
  }
10298
10714
  if (column.renderSelectionCheckBox && selectionMode === "multi-row") {
10299
- renderParam2.renderBag.selectionCheckBox = /* @__PURE__ */ React42.createElement(
10715
+ renderParam2.renderBag.selectionCheckBox = /* @__PURE__ */ React43.createElement(
10300
10716
  RenderHeaderCellHookComponent,
10301
10717
  {
10302
10718
  render: defaultRenderSelectionCheckBox2,
@@ -10310,7 +10726,7 @@ function InfiniteTableHeaderCell(props) {
10310
10726
  );
10311
10727
  const renderHeaderSelectionCheckBox = column.renderHeaderSelectionCheckBox ?? column.renderSelectionCheckBox;
10312
10728
  if (renderHeaderSelectionCheckBox && renderHeaderSelectionCheckBox !== true) {
10313
- renderParam2.renderBag.selectionCheckBox = /* @__PURE__ */ React42.createElement(
10729
+ renderParam2.renderBag.selectionCheckBox = /* @__PURE__ */ React43.createElement(
10314
10730
  RenderHeaderCellHookComponent,
10315
10731
  {
10316
10732
  render: renderHeaderSelectionCheckBox,
@@ -10325,7 +10741,7 @@ function InfiniteTableHeaderCell(props) {
10325
10741
  }
10326
10742
  }
10327
10743
  if (header instanceof Function) {
10328
- renderParam2.renderBag.header = /* @__PURE__ */ React42.createElement(
10744
+ renderParam2.renderBag.header = /* @__PURE__ */ React43.createElement(
10329
10745
  RenderHeaderCellHookComponent,
10330
10746
  {
10331
10747
  render: header,
@@ -10337,10 +10753,10 @@ function InfiniteTableHeaderCell(props) {
10337
10753
  );
10338
10754
  }
10339
10755
  const theMenuIcon = column.renderMenuIcon === false ? null : renderParam2.renderBag.menuIcon;
10340
- const headerContent = headerCSSEllipsis ? /* @__PURE__ */ React42.createElement("div", { className: cssEllipsisClassName }, renderParam2.renderBag.header) : renderParam2.renderBag.header;
10341
- const all = /* @__PURE__ */ React42.createElement(React42.Fragment, null, align2 === "center" ? spacer : null, renderParam2.renderBag.selectionCheckBox, headerContent, renderParam2.renderBag.sortIcon, renderParam2.renderBag.filterIcon, align2 === "center" ? spacer : null, align2 !== "center" ? spacer : null, theMenuIcon);
10756
+ const headerContent = headerCSSEllipsis ? /* @__PURE__ */ React43.createElement("div", { className: cssEllipsisClassName }, renderParam2.renderBag.header) : renderParam2.renderBag.header;
10757
+ const all = /* @__PURE__ */ React43.createElement(React43.Fragment, null, align2 === "center" ? spacer : null, renderParam2.renderBag.selectionCheckBox, headerContent, renderParam2.renderBag.sortIcon, renderParam2.renderBag.filterIcon, align2 === "center" ? spacer : null, align2 !== "center" ? spacer : null, theMenuIcon);
10342
10758
  if (column.renderHeader) {
10343
- return /* @__PURE__ */ React42.createElement(
10759
+ return /* @__PURE__ */ React43.createElement(
10344
10760
  RenderHeaderCellHookComponent,
10345
10761
  {
10346
10762
  render: column.renderHeader,
@@ -10378,7 +10794,7 @@ function InfiniteTableHeaderCell(props) {
10378
10794
  });
10379
10795
  let draggingProxy = null;
10380
10796
  if (dragging && proxyPosition) {
10381
- draggingProxy = /* @__PURE__ */ React42.createElement(
10797
+ draggingProxy = /* @__PURE__ */ React43.createElement(
10382
10798
  "div",
10383
10799
  {
10384
10800
  key: column.id,
@@ -10402,7 +10818,7 @@ function InfiniteTableHeaderCell(props) {
10402
10818
  verticalAlign,
10403
10819
  align: align2
10404
10820
  };
10405
- const debouncedOnFilterValueChange = React42.useMemo(() => {
10821
+ const debouncedOnFilterValueChange = React43.useMemo(() => {
10406
10822
  const fn = (filterValue) => {
10407
10823
  api.setColumnFilter(column.id, filterValue);
10408
10824
  };
@@ -10430,7 +10846,7 @@ function InfiniteTableHeaderCell(props) {
10430
10846
  "data-sort": column.computedSortedAsc ? "asc" : column.computedSortedDesc ? "desc" : "none",
10431
10847
  "data-sort-index": `${column.computedSortIndex ?? -1}`
10432
10848
  };
10433
- const columnFilterEditor = column.computedFilterable ? /* @__PURE__ */ React42.createElement(
10849
+ const columnFilterEditor = column.computedFilterable ? /* @__PURE__ */ React43.createElement(
10434
10850
  InfiniteTableColumnHeaderFilter,
10435
10851
  {
10436
10852
  horizontalLayoutPageIndex,
@@ -10444,9 +10860,9 @@ function InfiniteTableHeaderCell(props) {
10444
10860
  columnFilterValue: column.computedFilterValue,
10445
10861
  columnHeaderHeight
10446
10862
  }
10447
- ) : /* @__PURE__ */ React42.createElement(InfiniteTableColumnHeaderFilterEmpty, null);
10863
+ ) : /* @__PURE__ */ React43.createElement(InfiniteTableColumnHeaderFilterEmpty, null);
10448
10864
  renderParam.renderBag.filterEditor = columnFilterEditor;
10449
- return /* @__PURE__ */ React42.createElement(ContextProvider, { value: renderParam }, /* @__PURE__ */ React42.createElement(
10865
+ return /* @__PURE__ */ React43.createElement(ContextProvider, { value: renderParam }, /* @__PURE__ */ React43.createElement(
10450
10866
  InfiniteTableCell,
10451
10867
  {
10452
10868
  domRef: ref,
@@ -10493,7 +10909,7 @@ function InfiniteTableHeaderCell(props) {
10493
10909
  CellCls
10494
10910
  ),
10495
10911
  cssEllipsis: headerCSSEllipsis,
10496
- afterChildren: /* @__PURE__ */ React42.createElement(React42.Fragment, null, showColumnFilters ? columnFilterEditor : null, resizeHandle),
10912
+ afterChildren: /* @__PURE__ */ React43.createElement(React43.Fragment, null, showColumnFilters ? columnFilterEditor : null, resizeHandle),
10497
10913
  renderChildren
10498
10914
  }
10499
10915
  ), draggingProxy);
@@ -10506,7 +10922,7 @@ function useInfiniteHeaderCell() {
10506
10922
  }
10507
10923
 
10508
10924
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx
10509
- import * as React47 from "react";
10925
+ import * as React48 from "react";
10510
10926
 
10511
10927
  // src/components/InfiniteTable/components/InfiniteTableHeader/buildColumnAndGroupTree.ts
10512
10928
  function buildColumnAndGroupTree(columns, columnGroups, columnGroupsDepthsMap, columnGroupsMaxDepth) {
@@ -10611,19 +11027,19 @@ function assignGroupOffsetsAndComputedWidths(items, groupOffset = 0) {
10611
11027
  }
10612
11028
 
10613
11029
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
10614
- import * as React46 from "react";
11030
+ import * as React47 from "react";
10615
11031
  import { useCallback as useCallback16, useEffect as useEffect16, useRef as useRef18 } from "react";
10616
11032
 
10617
11033
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
10618
- import * as React45 from "react";
11034
+ import * as React46 from "react";
10619
11035
 
10620
11036
  // src/components/InfiniteTable/components/InfiniteTableHeader/useColumnGroupResizeHandle.tsx
10621
- import * as React44 from "react";
11037
+ import * as React45 from "react";
10622
11038
  import { useCallback as useCallback15 } from "react";
10623
11039
 
10624
11040
  // src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/GroupResizeHandle.tsx
10625
11041
  import { useRef as useRef17, useState as useState12 } from "react";
10626
- import * as React43 from "react";
11042
+ import * as React44 from "react";
10627
11043
  var { rootClassName: rootClassName8 } = internalProps;
10628
11044
  var InfiniteTableHeaderCellResizeHandleCls2 = `${rootClassName8}HeaderCell_ResizeHandle`;
10629
11045
  function GroupResizeHandleFn(props) {
@@ -10692,7 +11108,7 @@ function GroupResizeHandleFn(props) {
10692
11108
  const style2 = (computedPinned === false || computedPinned === "start") && computedLastInCategory ? {
10693
11109
  right: computedPinned === "start" ? void 0 : ThemeVars.components.HeaderCell.resizeHandleWidth
10694
11110
  } : computedPinned === "end" && computedFirstInCategory ? { right: void 0 } : void 0;
10695
- return /* @__PURE__ */ React43.createElement(
11111
+ return /* @__PURE__ */ React44.createElement(
10696
11112
  "div",
10697
11113
  {
10698
11114
  ref: domRef,
@@ -10705,7 +11121,7 @@ function GroupResizeHandleFn(props) {
10705
11121
  )}`,
10706
11122
  onPointerDown
10707
11123
  },
10708
- /* @__PURE__ */ React43.createElement(
11124
+ /* @__PURE__ */ React44.createElement(
10709
11125
  "div",
10710
11126
  {
10711
11127
  style: { ...style2, ...props.style },
@@ -10716,7 +11132,7 @@ function GroupResizeHandleFn(props) {
10716
11132
  )
10717
11133
  );
10718
11134
  }
10719
- var GroupResizeHandle = React43.memo(
11135
+ var GroupResizeHandle = React44.memo(
10720
11136
  GroupResizeHandleFn
10721
11137
  );
10722
11138
 
@@ -10781,7 +11197,7 @@ function useColumnGroupResizeHandle(groupColumns, config) {
10781
11197
  [computeResizeForDiff]
10782
11198
  );
10783
11199
  const groupResizable = groupColumns.some((c) => c.computedResizable);
10784
- const resizeHandle = groupResizable ? /* @__PURE__ */ React44.createElement(
11200
+ const resizeHandle = groupResizable ? /* @__PURE__ */ React45.createElement(
10785
11201
  GroupResizeHandle,
10786
11202
  {
10787
11203
  brain: bodyBrain,
@@ -10829,7 +11245,7 @@ function InfiniteTableHeaderGroup(props) {
10829
11245
  style2 = style2 && typeof style2 === "object" ? style2 : {};
10830
11246
  style2.width = width;
10831
11247
  style2.height = height2;
10832
- return /* @__PURE__ */ React45.createElement(
11248
+ return /* @__PURE__ */ React46.createElement(
10833
11249
  "div",
10834
11250
  {
10835
11251
  ref: props.domRef,
@@ -10838,7 +11254,7 @@ function InfiniteTableHeaderGroup(props) {
10838
11254
  style: style2,
10839
11255
  "data-z-index": zIndex2
10840
11256
  },
10841
- /* @__PURE__ */ React45.createElement(
11257
+ /* @__PURE__ */ React46.createElement(
10842
11258
  "div",
10843
11259
  {
10844
11260
  className: join(
@@ -10927,7 +11343,7 @@ function InfiniteTableHeaderFn(props) {
10927
11343
  groupOffset: colGroupItem.groupOffset
10928
11344
  };
10929
11345
  const visible = getState().columnGroupVisibility[colGroupItem.id] !== false;
10930
- return visible ? /* @__PURE__ */ React46.createElement(
11346
+ return visible ? /* @__PURE__ */ React47.createElement(
10931
11347
  InfiniteTableHeaderGroup,
10932
11348
  {
10933
11349
  horizontalLayoutPageIndex,
@@ -10941,7 +11357,7 @@ function InfiniteTableHeaderFn(props) {
10941
11357
  }
10942
11358
  ) : null;
10943
11359
  }
10944
- return /* @__PURE__ */ React46.createElement(
11360
+ return /* @__PURE__ */ React47.createElement(
10945
11361
  InfiniteTableHeaderCell,
10946
11362
  {
10947
11363
  domRef: domRef2,
@@ -10967,7 +11383,7 @@ function InfiniteTableHeaderFn(props) {
10967
11383
  headerBrain
10968
11384
  ]
10969
11385
  );
10970
- return /* @__PURE__ */ React46.createElement("div", { ...domProps }, /* @__PURE__ */ React46.createElement(
11386
+ return /* @__PURE__ */ React47.createElement("div", { ...domProps }, /* @__PURE__ */ React47.createElement(
10971
11387
  RawTable,
10972
11388
  {
10973
11389
  name: "header",
@@ -10977,7 +11393,7 @@ function InfiniteTableHeaderFn(props) {
10977
11393
  }
10978
11394
  ));
10979
11395
  }
10980
- var InfiniteTableHeader = React46.memo(
11396
+ var InfiniteTableHeader = React47.memo(
10981
11397
  InfiniteTableHeaderFn
10982
11398
  );
10983
11399
 
@@ -11002,7 +11418,7 @@ function TableHeaderWrapper(props) {
11002
11418
  } = tableContextValue;
11003
11419
  const rows = !computedColumnGroups || !Object.keys(computedColumnGroups).length ? 1 : columnGroupsMaxDepth + 2;
11004
11420
  const height2 = rows * columnHeaderHeight + (showColumnFilters ? columnHeaderHeight : 0);
11005
- const columnAndGroupTreeInfo = React47.useMemo(() => {
11421
+ const columnAndGroupTreeInfo = React48.useMemo(() => {
11006
11422
  if (!computedColumnGroups || !Object.keys(computedColumnGroups).length) {
11007
11423
  return void 0;
11008
11424
  }
@@ -11013,7 +11429,7 @@ function TableHeaderWrapper(props) {
11013
11429
  columnGroupsMaxDepth
11014
11430
  );
11015
11431
  }, [computedVisibleColumns, computedColumnGroups, columnGroupsDepthsMap]);
11016
- const cellspan = React47.useCallback(
11432
+ const cellspan = React48.useCallback(
11017
11433
  ({ rowIndex, colIndex }) => {
11018
11434
  const column = computedVisibleColumns[colIndex];
11019
11435
  const rowspan2 = 1;
@@ -11051,15 +11467,15 @@ function TableHeaderWrapper(props) {
11051
11467
  columnGroupsDepthsMap
11052
11468
  ]
11053
11469
  );
11054
- const rowspan = React47.useCallback(
11470
+ const rowspan = React48.useCallback(
11055
11471
  ({ rowIndex, colIndex }) => cellspan({ rowIndex, colIndex }).rowspan,
11056
11472
  [cellspan]
11057
11473
  );
11058
- const colspan = React47.useCallback(
11474
+ const colspan = React48.useCallback(
11059
11475
  ({ rowIndex, colIndex }) => cellspan({ rowIndex, colIndex }).colspan,
11060
11476
  [cellspan]
11061
11477
  );
11062
- const rowHeight = React47.useCallback(
11478
+ const rowHeight = React48.useCallback(
11063
11479
  (index) => {
11064
11480
  return showColumnFilters ? index < rows - 1 ? columnHeaderHeight : 2 * columnHeaderHeight : columnHeaderHeight;
11065
11481
  },
@@ -11081,7 +11497,7 @@ function TableHeaderWrapper(props) {
11081
11497
  fixedColsStart: computedPinnedStartColumns.length
11082
11498
  }
11083
11499
  );
11084
- const header = /* @__PURE__ */ React47.createElement(
11500
+ const header = /* @__PURE__ */ React48.createElement(
11085
11501
  InfiniteTableHeader,
11086
11502
  {
11087
11503
  columns: computedVisibleColumns,
@@ -11092,7 +11508,7 @@ function TableHeaderWrapper(props) {
11092
11508
  columnAndGroupTreeInfo
11093
11509
  }
11094
11510
  );
11095
- const verticalScrollbarPlaceholder = scrollbars.vertical && getScrollbarWidth() ? /* @__PURE__ */ React47.createElement(
11511
+ const verticalScrollbarPlaceholder = scrollbars.vertical && getScrollbarWidth() ? /* @__PURE__ */ React48.createElement(
11096
11512
  "div",
11097
11513
  {
11098
11514
  className: HeaderScrollbarPlaceholderCls,
@@ -11102,7 +11518,7 @@ function TableHeaderWrapper(props) {
11102
11518
  }
11103
11519
  }
11104
11520
  ) : null;
11105
- return /* @__PURE__ */ React47.createElement(
11521
+ return /* @__PURE__ */ React48.createElement(
11106
11522
  "div",
11107
11523
  {
11108
11524
  className: `${InfiniteTableHeaderWrapperClassName} ${HeaderWrapperCls}`,
@@ -11116,7 +11532,7 @@ function TableHeaderWrapper(props) {
11116
11532
  }
11117
11533
 
11118
11534
  // src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
11119
- import * as React48 from "react";
11535
+ import * as React49 from "react";
11120
11536
  import { useEffect as useEffect17 } from "react";
11121
11537
 
11122
11538
  // src/components/utils/decamelize.ts
@@ -11159,11 +11575,11 @@ var enforceStyle = (node, style2) => {
11159
11575
  );
11160
11576
  }
11161
11577
  };
11162
- var InfiniteTableLicenseFooter = React48.forwardRef(
11578
+ var InfiniteTableLicenseFooter = React49.forwardRef(
11163
11579
  function InfiniteTableLicenseFooter2(props, ref) {
11164
11580
  const { rootClassName: rootClassName12 } = useInternalProps();
11165
- const domRef = React48.useRef(null);
11166
- const domCallback = React48.useCallback((node) => {
11581
+ const domRef = React49.useRef(null);
11582
+ const domCallback = React49.useCallback((node) => {
11167
11583
  domRef.current = node;
11168
11584
  if (!ref) {
11169
11585
  return;
@@ -11190,7 +11606,7 @@ var InfiniteTableLicenseFooter = React48.forwardRef(
11190
11606
  clearInterval(intervalId);
11191
11607
  };
11192
11608
  }, []);
11193
- return /* @__PURE__ */ React48.createElement(
11609
+ return /* @__PURE__ */ React49.createElement(
11194
11610
  "div",
11195
11611
  {
11196
11612
  ref: domCallback,
@@ -11204,7 +11620,7 @@ var InfiniteTableLicenseFooter = React48.forwardRef(
11204
11620
  },
11205
11621
  "Powered by",
11206
11622
  " ",
11207
- /* @__PURE__ */ React48.createElement(
11623
+ /* @__PURE__ */ React49.createElement(
11208
11624
  "a",
11209
11625
  {
11210
11626
  href: "https://infinite-table.com",
@@ -11219,7 +11635,7 @@ var InfiniteTableLicenseFooter = React48.forwardRef(
11219
11635
  );
11220
11636
 
11221
11637
  // src/components/InfiniteTable/components/LoadMask.tsx
11222
- import * as React49 from "react";
11638
+ import * as React50 from "react";
11223
11639
 
11224
11640
  // src/components/InfiniteTable/components/LoadMask.css.ts
11225
11641
  var LoadMaskCls = { visible: "LoadMask_LoadMaskCls_visible__qy58ya1 LoadMask_LoadMaskBaseCls__qy58ya0 utilities_position_absolute__16lm1iw2 utilities_top_0__16lm1iw1d utilities_left_0__16lm1iw1f utilities_right_0__16lm1iw1k utilities_bottom_0__16lm1iw1i", hidden: "LoadMask_LoadMaskCls_hidden__qy58ya2 LoadMask_LoadMaskBaseCls__qy58ya0 utilities_position_absolute__16lm1iw2 utilities_top_0__16lm1iw1d utilities_left_0__16lm1iw1f utilities_right_0__16lm1iw1k utilities_bottom_0__16lm1iw1i" };
@@ -11231,16 +11647,16 @@ var { rootClassName: rootClassName10 } = internalProps;
11231
11647
  var baseCls3 = `${rootClassName10}-LoadMask`;
11232
11648
  function LoadMaskFn(props) {
11233
11649
  const { visible, children = "Loading" } = props;
11234
- return /* @__PURE__ */ React49.createElement(
11650
+ return /* @__PURE__ */ React50.createElement(
11235
11651
  "div",
11236
11652
  {
11237
11653
  className: `${LoadMaskCls[visible ? "visible" : "hidden"]} ${baseCls3}`
11238
11654
  },
11239
- /* @__PURE__ */ React49.createElement("div", { className: `${LoadMaskOverlayCls} ${baseCls3}-Overlay` }),
11240
- /* @__PURE__ */ React49.createElement("div", { className: `${LoadMaskTextCls} ${baseCls3}-Text` }, children)
11655
+ /* @__PURE__ */ React50.createElement("div", { className: `${LoadMaskOverlayCls} ${baseCls3}-Overlay` }),
11656
+ /* @__PURE__ */ React50.createElement("div", { className: `${LoadMaskTextCls} ${baseCls3}-Text` }, children)
11241
11657
  );
11242
11658
  }
11243
- var LoadMask = React49.memo(LoadMaskFn);
11659
+ var LoadMask = React50.memo(LoadMaskFn);
11244
11660
 
11245
11661
  // src/utils/deepClone.ts
11246
11662
  function cloneArray(arr) {
@@ -12252,10 +12668,10 @@ function enhancedFlatten(param) {
12252
12668
  }
12253
12669
 
12254
12670
  // src/components/DataSource/index.tsx
12255
- import * as React51 from "react";
12671
+ import * as React52 from "react";
12256
12672
 
12257
12673
  // src/utils/groupAndPivot/treeUtils.ts
12258
- var emptyFn = () => {
12674
+ var emptyFn3 = () => {
12259
12675
  };
12260
12676
  function toTreeDataArray(data, options) {
12261
12677
  const treeMap = new DeepMap();
@@ -12309,7 +12725,7 @@ function traverseTreeNode(traverseParams, treeTraverseOptions, parentPath, item)
12309
12725
  });
12310
12726
  if (isLeaf) {
12311
12727
  onLeafNode?.(item);
12312
- onNode?.(item, emptyFn);
12728
+ onNode?.(item, emptyFn3);
12313
12729
  } else {
12314
12730
  onParentNode?.(item, next, getNodeChildren(item));
12315
12731
  onNode?.(item, next);
@@ -18192,7 +18608,7 @@ function getDataSourceStateRestoreForDetails(state) {
18192
18608
  }
18193
18609
 
18194
18610
  // src/components/DataSource/privateHooks/useDataSource.tsx
18195
- import React50, {
18611
+ import React51, {
18196
18612
  useCallback as useCallback19,
18197
18613
  useEffect as useEffect20,
18198
18614
  useLayoutEffect as useLayoutEffect10,
@@ -18226,13 +18642,13 @@ function useDataSourceInternal(props) {
18226
18642
  if (typeof children === "function") {
18227
18643
  children = children(getState());
18228
18644
  }
18229
- return /* @__PURE__ */ React50.createElement(
18645
+ return /* @__PURE__ */ React51.createElement(
18230
18646
  ContextComponent.Provider,
18231
18647
  {
18232
18648
  key,
18233
18649
  value: getLatestManagedContextValue()
18234
18650
  },
18235
- /* @__PURE__ */ React50.createElement(DataSourceContext.Provider, { value: getLatestContextValue() }, children)
18651
+ /* @__PURE__ */ React51.createElement(DataSourceContext.Provider, { value: getLatestContextValue() }, children)
18236
18652
  );
18237
18653
  },
18238
18654
  [ContextComponent, isDetail, key]
@@ -18509,7 +18925,7 @@ var {
18509
18925
  });
18510
18926
  function DataSource(props) {
18511
18927
  const { DataSource: DataSourceComponent } = useDataSourceInternal(props);
18512
- return /* @__PURE__ */ React51.createElement(DataSourceComponent, null, props.children ?? null);
18928
+ return /* @__PURE__ */ React52.createElement(DataSourceComponent, null, props.children ?? null);
18513
18929
  }
18514
18930
  function useRowInfoReducers() {
18515
18931
  const { rowInfoReducerResults } = useDataSourceState();
@@ -19982,7 +20398,7 @@ function useAutoSizeColumns() {
19982
20398
  // src/components/InfiniteTable/hooks/useCellRendering.tsx
19983
20399
  import { useMemo as useMemo9 } from "react";
19984
20400
  import { useCallback as useCallback20, useEffect as useEffect22, useRef as useRef24 } from "react";
19985
- import * as React53 from "react";
20401
+ import * as React54 from "react";
19986
20402
 
19987
20403
  // src/components/InfiniteTable/hooks/useYourBrain.ts
19988
20404
  function useYourBrain(param) {
@@ -20019,7 +20435,7 @@ function useYourBrain(param) {
20019
20435
  }
20020
20436
 
20021
20437
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableDetailRow.tsx
20022
- import * as React52 from "react";
20438
+ import * as React53 from "react";
20023
20439
 
20024
20440
  // src/components/InfiniteTable/components/rowDetail.css.ts
20025
20441
  var RowDetailRecipe = createRuntimeFn({ defaultClassName: "rowDetail_RowDetailRecipe__evqes20", variantClassNames: {}, defaultVariants: {}, compoundVariants: [] });
@@ -20156,7 +20572,7 @@ function InfiniteTableDetailRowFn(props) {
20156
20572
  rowDetailsCache,
20157
20573
  rowInfo
20158
20574
  });
20159
- return /* @__PURE__ */ React52.createElement(DataSourceMasterDetailContext.Provider, { value: masterDetailContextValue }, /* @__PURE__ */ React52.createElement(
20575
+ return /* @__PURE__ */ React53.createElement(DataSourceMasterDetailContext.Provider, { value: masterDetailContextValue }, /* @__PURE__ */ React53.createElement(
20160
20576
  "div",
20161
20577
  {
20162
20578
  ref: domRef,
@@ -20173,7 +20589,7 @@ function InfiniteTableDetailRowFn(props) {
20173
20589
  rowDetailRenderer(rowInfo, currentRowCache)
20174
20590
  ));
20175
20591
  }
20176
- var InfiniteTableDetailRow = React52.memo(
20592
+ var InfiniteTableDetailRow = React53.memo(
20177
20593
  InfiniteTableDetailRowFn
20178
20594
  );
20179
20595
 
@@ -20356,7 +20772,7 @@ function useCellRendering(param) {
20356
20772
  cellStyle,
20357
20773
  cellClassName
20358
20774
  };
20359
- return /* @__PURE__ */ React53.createElement(InfiniteTableColumnCell, { ...cellProps });
20775
+ return /* @__PURE__ */ React54.createElement(InfiniteTableColumnCell, { ...cellProps });
20360
20776
  },
20361
20777
  [
20362
20778
  rowHeight,
@@ -20390,10 +20806,10 @@ function useCellRendering(param) {
20390
20806
  const dataArray2 = getData();
20391
20807
  const rowInfo = dataArray2[rowIndex];
20392
20808
  if (!rowInfo || !isRowDetailsExpanded(rowInfo) || !computedRowSizeCacheForDetails) {
20393
- return /* @__PURE__ */ React53.createElement("div", { ref: domRef, className: visibility.hidden });
20809
+ return /* @__PURE__ */ React54.createElement("div", { ref: domRef, className: visibility.hidden });
20394
20810
  }
20395
20811
  const { rowDetailHeight: rowDetailHeight2, rowHeight: rowHeight2 } = computedRowSizeCacheForDetails.getSize(rowIndex);
20396
- return /* @__PURE__ */ React53.createElement(
20812
+ return /* @__PURE__ */ React54.createElement(
20397
20813
  InfiniteTableDetailRow,
20398
20814
  {
20399
20815
  rowInfo,
@@ -20767,10 +21183,10 @@ function computeColumnGroupsDepths(columnGroups, columnGroupVisibility) {
20767
21183
  }
20768
21184
 
20769
21185
  // src/components/InfiniteTable/state/rowDetailRendererFromComponent.tsx
20770
- import * as React54 from "react";
21186
+ import * as React55 from "react";
20771
21187
  function getRowDetailRendererFromComponent(RowDetail) {
20772
21188
  return (rowInfo, cache) => {
20773
- return /* @__PURE__ */ React54.createElement(RowDetail, { key: rowInfo.id, rowInfo, cache });
21189
+ return /* @__PURE__ */ React55.createElement(RowDetail, { key: rowInfo.id, rowInfo, cache });
20774
21190
  };
20775
21191
  }
20776
21192
 
@@ -22568,7 +22984,7 @@ var useLicense = (licenseKey = "") => {
22568
22984
  }
22569
22985
  let valid2 = isValidLicense(licenseKey, {
22570
22986
  publishedAt: 1624970570587,
22571
- version: "6.0.20"
22987
+ version: "6.1.0-canary.0"
22572
22988
  });
22573
22989
  if (!licenseKey && !valid2 && isInsidePlayground) {
22574
22990
  return true;
@@ -23216,7 +23632,7 @@ var getFirstFocusableChildForNode = (node) => {
23216
23632
  };
23217
23633
 
23218
23634
  // src/components/InfiniteTable/utils/cellFocusUtils.ts
23219
- var import_binary_search3 = __toESM(require_binary_search());
23635
+ var import_binary_search5 = __toESM(require_binary_search());
23220
23636
 
23221
23637
  // src/components/InfiniteTable/utils/waitForFunction.ts
23222
23638
  async function waitForFunction(fn, tickTimeout = 10, maxTimeout = 300) {
@@ -23294,7 +23710,7 @@ function getFollowingFocusableCell(cellPos, direction, context) {
23294
23710
  return nextCellPos;
23295
23711
  }
23296
23712
  function getNextCol(colIndex, direction, validColIndexes) {
23297
- let index = (0, import_binary_search3.default)(validColIndexes, colIndex + direction, SORT_ASC2);
23713
+ let index = (0, import_binary_search5.default)(validColIndexes, colIndex + direction, SORT_ASC2);
23298
23714
  if (index < 0) {
23299
23715
  index = ~index;
23300
23716
  if (direction > 0 && index >= validColIndexes.length) {
@@ -23729,7 +24145,7 @@ function useDOMEventHandlers() {
23729
24145
  import { useEffect as useEffect32 } from "react";
23730
24146
 
23731
24147
  // src/components/hooks/useOverlay/index.tsx
23732
- import * as React55 from "react";
24148
+ import * as React56 from "react";
23733
24149
  import {
23734
24150
  useCallback as useCallback24,
23735
24151
  useEffect as useEffect30,
@@ -24119,10 +24535,10 @@ async function retrieveElement(elementGetter) {
24119
24535
  return queryForElement(await result);
24120
24536
  }
24121
24537
  function DefaultOverlayPortal(props) {
24122
- return /* @__PURE__ */ React55.createElement("div", { style: { position: "fixed", top: 0, left: 0 } }, props.children);
24538
+ return /* @__PURE__ */ React56.createElement("div", { style: { position: "fixed", top: 0, left: 0 } }, props.children);
24123
24539
  }
24124
24540
  function OverlayContent(props) {
24125
- const nodeRef = React55.useRef(null);
24541
+ const nodeRef = React56.useRef(null);
24126
24542
  useEffect30(() => {
24127
24543
  return props.realign.onChange((handle) => {
24128
24544
  if (nodeRef.current && handle) {
@@ -24130,7 +24546,7 @@ function OverlayContent(props) {
24130
24546
  }
24131
24547
  });
24132
24548
  }, [props.realign]);
24133
- return /* @__PURE__ */ React55.createElement(
24549
+ return /* @__PURE__ */ React56.createElement(
24134
24550
  "div",
24135
24551
  {
24136
24552
  style: { position: "absolute", top: 0, left: 0 },
@@ -24198,22 +24614,22 @@ function useOverlayPortal(content, portalContainer) {
24198
24614
  }, [portalContainer]);
24199
24615
  return portalContainer ? container ? createPortal2(content, container) : (
24200
24616
  // we're probably still fetching the container
24201
- /* @__PURE__ */ React55.createElement(React55.Fragment, null)
24202
- ) : portalContainer === null || portalContainer === false ? content : /* @__PURE__ */ React55.createElement(DefaultOverlayPortal, null, content);
24617
+ /* @__PURE__ */ React56.createElement(React56.Fragment, null)
24618
+ ) : portalContainer === null || portalContainer === false ? content : /* @__PURE__ */ React56.createElement(DefaultOverlayPortal, null, content);
24203
24619
  }
24204
24620
  function getIdForReactOnlyChild(children) {
24205
- if (React55.Children.count(children) === 1) {
24206
- const child = React55.Children.only(children);
24207
- if (React55.isValidElement(child)) {
24621
+ if (React56.Children.count(children) === 1) {
24622
+ const child = React56.Children.only(children);
24623
+ if (React56.isValidElement(child)) {
24208
24624
  return child.props.id || child.key;
24209
24625
  }
24210
24626
  }
24211
24627
  return null;
24212
24628
  }
24213
24629
  function injectPortalContainerAndConstrainInMenuChild(children, portalContainer, constrainTo) {
24214
- if (React55.Children.count(children) === 1) {
24215
- const child = React55.Children.only(children);
24216
- if (React55.isValidElement(child) && child.type[propToIdentifyMenu]) {
24630
+ if (React56.Children.count(children) === 1) {
24631
+ const child = React56.Children.only(children);
24632
+ if (React56.isValidElement(child) && child.type[propToIdentifyMenu]) {
24217
24633
  const newProps = {};
24218
24634
  if (child.props.portalContainer === void 0) {
24219
24635
  newProps.portalContainer = portalContainer;
@@ -24221,7 +24637,7 @@ function injectPortalContainerAndConstrainInMenuChild(children, portalContainer,
24221
24637
  if (child.props.constrainTo === void 0) {
24222
24638
  newProps.constrainTo = constrainTo;
24223
24639
  }
24224
- return React55.cloneElement(child, newProps);
24640
+ return React56.cloneElement(child, newProps);
24225
24641
  }
24226
24642
  }
24227
24643
  return children;
@@ -24237,7 +24653,7 @@ function useOverlay(params) {
24237
24653
  const contentForPortal = [];
24238
24654
  for (const [_2, handle] of handles) {
24239
24655
  contentForPortal.push(
24240
- /* @__PURE__ */ React55.createElement(OverlayContent, { ...handle, key: handle.key })
24656
+ /* @__PURE__ */ React56.createElement(OverlayContent, { ...handle, key: handle.key })
24241
24657
  );
24242
24658
  }
24243
24659
  return contentForPortal;
@@ -24296,7 +24712,7 @@ function useOverlay(params) {
24296
24712
  },
24297
24713
  [handles, rootParams.portalContainer, updateContent]
24298
24714
  );
24299
- React55.useEffect(() => {
24715
+ React56.useEffect(() => {
24300
24716
  if (handleToRealign) {
24301
24717
  const handle = handles.get(handleToRealign);
24302
24718
  if (handle) {
@@ -24315,7 +24731,7 @@ function useOverlay(params) {
24315
24731
  handles.clear();
24316
24732
  updateContent();
24317
24733
  };
24318
- React55.useEffect(() => {
24734
+ React56.useEffect(() => {
24319
24735
  }, []);
24320
24736
  return {
24321
24737
  portal,
@@ -24327,16 +24743,16 @@ function useOverlay(params) {
24327
24743
  }
24328
24744
 
24329
24745
  // src/components/InfiniteTable/utils/getMenuForColumn.tsx
24330
- import * as React61 from "react";
24746
+ import * as React62 from "react";
24331
24747
 
24332
24748
  // src/components/Menu/index.tsx
24333
- import * as React59 from "react";
24749
+ import * as React60 from "react";
24334
24750
 
24335
24751
  // src/components/Menu/getMenuState.tsx
24336
- import * as React57 from "react";
24752
+ import * as React58 from "react";
24337
24753
 
24338
24754
  // src/components/Menu/childrenToRuntimeItems.tsx
24339
- import * as React56 from "react";
24755
+ import * as React57 from "react";
24340
24756
 
24341
24757
  // src/components/Menu/MenuItem.tsx
24342
24758
  function MenuItem(_props) {
@@ -24355,7 +24771,7 @@ var MenuSeparatorCls = "MenuCls_MenuSeparatorCls__db3arfd";
24355
24771
  // src/components/Menu/childrenToRuntimeItems.tsx
24356
24772
  var SEPARATOR = "-";
24357
24773
  function MenuSeparator() {
24358
- return /* @__PURE__ */ React56.createElement("hr", { className: MenuSeparatorCls });
24774
+ return /* @__PURE__ */ React57.createElement("hr", { className: MenuSeparatorCls });
24359
24775
  }
24360
24776
  var toRuntimeItem = ({
24361
24777
  columns,
@@ -24364,7 +24780,7 @@ var toRuntimeItem = ({
24364
24780
  menuId
24365
24781
  }, item) => {
24366
24782
  const menuItem = item && (item.key != null || item.label != null) ? item : null;
24367
- const menuDecoration = menuItem === null ? item === SEPARATOR ? /* @__PURE__ */ React56.createElement(MenuSeparator, null) : item : null;
24783
+ const menuDecoration = menuItem === null ? item === SEPARATOR ? /* @__PURE__ */ React57.createElement(MenuSeparator, null) : item : null;
24368
24784
  const runtimeItem = menuItem != null ? {
24369
24785
  type: "item",
24370
24786
  parentMenuId: menuId,
@@ -24392,7 +24808,7 @@ var toRuntimeItem = ({
24392
24808
  return runtimeItem;
24393
24809
  };
24394
24810
  function childrenToRuntimeItems(context, children) {
24395
- return React56.Children.map(children, (child) => {
24811
+ return React57.Children.map(children, (child) => {
24396
24812
  if (child) {
24397
24813
  if (child.props.__is_menu_item || child.type === MenuItem) {
24398
24814
  const itemProps = { ...child.props };
@@ -24415,7 +24831,7 @@ function childrenToRuntimeItems(context, children) {
24415
24831
  // src/components/Menu/getMenuState.tsx
24416
24832
  var SUBMENU_COL_NAME = "submenu";
24417
24833
  function getInitialMenuState() {
24418
- const domRef = React57.createRef();
24834
+ const domRef = React58.createRef();
24419
24835
  return {
24420
24836
  keyboardActiveItemKey: null,
24421
24837
  activeItemKey: null,
@@ -24470,7 +24886,7 @@ var deriveStateFromProps2 = (params) => {
24470
24886
  columns.push({
24471
24887
  name: SUBMENU_COL_NAME,
24472
24888
  render: ({ domProps, item }) => {
24473
- return item.menu ? /* @__PURE__ */ React57.createElement("div", { ...domProps }, /* @__PURE__ */ React57.createElement(ExpandCollapseIcon, { expanded: false })) : /* @__PURE__ */ React57.createElement("div", { ...domProps });
24889
+ return item.menu ? /* @__PURE__ */ React58.createElement("div", { ...domProps }, /* @__PURE__ */ React58.createElement(ExpandCollapseIcon, { expanded: false })) : /* @__PURE__ */ React58.createElement("div", { ...domProps });
24474
24890
  }
24475
24891
  });
24476
24892
  }
@@ -24487,7 +24903,7 @@ var deriveStateFromProps2 = (params) => {
24487
24903
  };
24488
24904
 
24489
24905
  // src/components/Menu/Menu.tsx
24490
- import * as React58 from "react";
24906
+ import * as React59 from "react";
24491
24907
  import {
24492
24908
  useCallback as useCallback26,
24493
24909
  useLayoutEffect as useLayoutEffect14,
@@ -24752,7 +25168,7 @@ function renderSubmenuForItem(item, config) {
24752
25168
  if (typeof itemMenu === "function") {
24753
25169
  itemMenu = itemMenu();
24754
25170
  }
24755
- return /* @__PURE__ */ React58.createElement(
25171
+ return /* @__PURE__ */ React59.createElement(
24756
25172
  Menu,
24757
25173
  {
24758
25174
  key: overlayId,
@@ -24962,7 +25378,7 @@ function MenuComponent(props) {
24962
25378
  setActiveItemKey(key);
24963
25379
  }
24964
25380
  });
24965
- renderedChildren = runtimeItems.map((runtimeItem, index) => /* @__PURE__ */ React58.createElement(
25381
+ renderedChildren = runtimeItems.map((runtimeItem, index) => /* @__PURE__ */ React59.createElement(
24966
25382
  RuntimeItemRenderer,
24967
25383
  {
24968
25384
  key: runtimeItem.type === "item" ? runtimeItem.key : index,
@@ -25144,7 +25560,7 @@ function MenuComponent(props) {
25144
25560
  domRef.current = node;
25145
25561
  }
25146
25562
  }, []);
25147
- const result = /* @__PURE__ */ React58.createElement("div", { className: display.contents }, /* @__PURE__ */ React58.createElement(
25563
+ const result = /* @__PURE__ */ React59.createElement("div", { className: display.contents }, /* @__PURE__ */ React59.createElement(
25148
25564
  "div",
25149
25565
  {
25150
25566
  ...domProps,
@@ -25174,12 +25590,12 @@ function MenuComponent(props) {
25174
25590
  return destroyed ? null : result;
25175
25591
  }
25176
25592
  function RuntimeItemRenderer(props) {
25177
- const [pressed, setPressed] = React58.useState(false);
25593
+ const [pressed, setPressed] = React59.useState(false);
25178
25594
  const { columns, item, index, active, keyboardActive } = props;
25179
25595
  const key = item.type === "item" ? item.value.key : index;
25180
25596
  let content = null;
25181
25597
  if (item.type === "decoration") {
25182
- content = /* @__PURE__ */ React58.createElement("div", { style: item.style }, item.value);
25598
+ content = /* @__PURE__ */ React59.createElement("div", { style: item.style }, item.value);
25183
25599
  } else {
25184
25600
  let spanIndex = 0;
25185
25601
  content = columns.map((col, i) => {
@@ -25240,7 +25656,7 @@ function RuntimeItemRenderer(props) {
25240
25656
  }
25241
25657
  }
25242
25658
  };
25243
- return col.render ? /* @__PURE__ */ React58.createElement(
25659
+ return col.render ? /* @__PURE__ */ React59.createElement(
25244
25660
  RenderHookComponent,
25245
25661
  {
25246
25662
  key: `${key}-${field}`,
@@ -25252,10 +25668,10 @@ function RuntimeItemRenderer(props) {
25252
25668
  domProps
25253
25669
  }
25254
25670
  }
25255
- ) : /* @__PURE__ */ React58.createElement("div", { key: `${key}-${field}`, ...domProps }, target[field]);
25671
+ ) : /* @__PURE__ */ React59.createElement("div", { key: `${key}-${field}`, ...domProps }, target[field]);
25256
25672
  }).filter(Boolean);
25257
25673
  }
25258
- return /* @__PURE__ */ React58.createElement("div", { className: MenuRowCls }, content);
25674
+ return /* @__PURE__ */ React59.createElement("div", { className: MenuRowCls }, content);
25259
25675
  }
25260
25676
 
25261
25677
  // src/components/Menu/index.tsx
@@ -25269,12 +25685,12 @@ var { ManagedComponentContextProvider: MenuRoot } = buildManagedComponent({
25269
25685
  function MenuContextProvider(props) {
25270
25686
  const { componentActions, componentState } = useManagedComponentState();
25271
25687
  const getState = useLatest(componentState);
25272
- return /* @__PURE__ */ React59.createElement(
25688
+ return /* @__PURE__ */ React60.createElement(
25273
25689
  MenuContext.Provider,
25274
25690
  {
25275
25691
  value: { componentActions, componentState, getState }
25276
25692
  },
25277
- /* @__PURE__ */ React59.createElement(MenuComponent, { domProps: props.domProps })
25693
+ /* @__PURE__ */ React60.createElement(MenuComponent, { domProps: props.domProps })
25278
25694
  );
25279
25695
  }
25280
25696
  function Menu(props) {
@@ -25299,7 +25715,7 @@ function Menu(props) {
25299
25715
  __is_infinite_menu_component,
25300
25716
  ...domProps
25301
25717
  } = props;
25302
- const menu = /* @__PURE__ */ React59.createElement(
25718
+ const menu = /* @__PURE__ */ React60.createElement(
25303
25719
  MenuRoot,
25304
25720
  {
25305
25721
  addSubmenuColumnIfNeeded,
@@ -25307,17 +25723,17 @@ function Menu(props) {
25307
25723
  wrapLabels,
25308
25724
  ...props
25309
25725
  },
25310
- /* @__PURE__ */ React59.createElement(MenuContextProvider, { domProps })
25726
+ /* @__PURE__ */ React60.createElement(MenuContextProvider, { domProps })
25311
25727
  );
25312
25728
  if (false) {
25313
- return /* @__PURE__ */ React59.createElement(React59.StrictMode, null, menu);
25729
+ return /* @__PURE__ */ React60.createElement(React60.StrictMode, null, menu);
25314
25730
  }
25315
25731
  return menu;
25316
25732
  }
25317
25733
  Menu[propToIdentifyMenu] = true;
25318
25734
 
25319
25735
  // src/components/InfiniteTable/utils/defaultGetColumnMenuItems.tsx
25320
- import * as React60 from "react";
25736
+ import * as React61 from "react";
25321
25737
  function defaultGetColumnMenuItems(_items, params) {
25322
25738
  const { columnApi, column, getComputed, api } = params;
25323
25739
  const sortable = columnApi.isSortable();
@@ -25404,7 +25820,7 @@ function defaultGetColumnMenuItems(_items, params) {
25404
25820
  colItems.push({
25405
25821
  key: id,
25406
25822
  label,
25407
- check: /* @__PURE__ */ React60.createElement(
25823
+ check: /* @__PURE__ */ React61.createElement(
25408
25824
  InfiniteCheckBox,
25409
25825
  {
25410
25826
  key: col.id,
@@ -25466,7 +25882,7 @@ function getMenuForColumn(columnId, context, onHideIntent) {
25466
25882
  if (!items || !items.length) {
25467
25883
  return null;
25468
25884
  }
25469
- return /* @__PURE__ */ React61.createElement(
25885
+ return /* @__PURE__ */ React62.createElement(
25470
25886
  MenuCmp,
25471
25887
  {
25472
25888
  autoFocus: true,
@@ -25584,7 +26000,7 @@ function useColumnMenu() {
25584
26000
  }
25585
26001
 
25586
26002
  // src/components/InfiniteTable/components/FocusDetect.tsx
25587
- import * as React62 from "react";
26003
+ import * as React63 from "react";
25588
26004
  import { useCallback as useCallback27 } from "react";
25589
26005
  var style = {
25590
26006
  width: 0,
@@ -25618,7 +26034,7 @@ function FocusDetect() {
25618
26034
  };
25619
26035
  focusLastFocusableCell(context);
25620
26036
  }, []);
25621
- return /* @__PURE__ */ React62.createElement(
26037
+ return /* @__PURE__ */ React63.createElement(
25622
26038
  "div",
25623
26039
  {
25624
26040
  onFocus,
@@ -25756,18 +26172,18 @@ function useEditingCallbackProps() {
25756
26172
  import { useEffect as useEffect34 } from "react";
25757
26173
 
25758
26174
  // src/components/InfiniteTable/utils/getFilterOperatorMenuForColumn.tsx
25759
- import * as React65 from "react";
26175
+ import * as React66 from "react";
25760
26176
 
25761
26177
  // src/components/InfiniteTable/components/icons/ClearIcon.tsx
25762
- import * as React63 from "react";
26178
+ import * as React64 from "react";
25763
26179
  var ClearIcon = (props) => {
25764
- return /* @__PURE__ */ React63.createElement(Icon, { ...props }, /* @__PURE__ */ React63.createElement("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }));
26180
+ return /* @__PURE__ */ React64.createElement(Icon, { ...props }, /* @__PURE__ */ React64.createElement("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }));
25765
26181
  };
25766
26182
 
25767
26183
  // src/components/InfiniteTable/components/icons/DoneIcon.tsx
25768
- import * as React64 from "react";
26184
+ import * as React65 from "react";
25769
26185
  var DoneIcon = (props) => {
25770
- return /* @__PURE__ */ React64.createElement(Icon, { ...props }, /* @__PURE__ */ React64.createElement("path", { d: "m9.55 19-6.725-6.725L5.25 9.85l4.3 4.325 9.225-9.225 2.425 2.4Z" }));
26186
+ return /* @__PURE__ */ React65.createElement(Icon, { ...props }, /* @__PURE__ */ React65.createElement("path", { d: "m9.55 19-6.725-6.725L5.25 9.85l4.3 4.325 9.225-9.225 2.425 2.4Z" }));
25771
26187
  };
25772
26188
 
25773
26189
  // src/components/InfiniteTable/utils/getFilterOperatorMenuForColumn.tsx
@@ -25810,12 +26226,12 @@ function getFilterOperatorMenuForColumn(columnId, context, onHideIntent) {
25810
26226
  const IconCmp = operator.components?.Icon ?? FilterIcon;
25811
26227
  return {
25812
26228
  key,
25813
- icon: /* @__PURE__ */ React65.createElement(IconCmp, null),
25814
- label: /* @__PURE__ */ React65.createElement(React65.Fragment, null, operator.label ?? operator.name),
26229
+ icon: /* @__PURE__ */ React66.createElement(IconCmp, null),
26230
+ label: /* @__PURE__ */ React66.createElement(React66.Fragment, null, operator.label ?? operator.name),
25815
26231
  onAction: () => {
25816
26232
  api.setColumnFilterOperator(columnId, key);
25817
26233
  },
25818
- checked: checked ? /* @__PURE__ */ React65.createElement(DoneIcon, { size: 16 }) : null
26234
+ checked: checked ? /* @__PURE__ */ React66.createElement(DoneIcon, { size: 16 }) : null
25819
26235
  };
25820
26236
  });
25821
26237
  const firstItems = [
@@ -25830,7 +26246,7 @@ function getFilterOperatorMenuForColumn(columnId, context, onHideIntent) {
25830
26246
  {
25831
26247
  key: "reset",
25832
26248
  label: "Reset",
25833
- icon: /* @__PURE__ */ React65.createElement(ClearIcon, null),
26249
+ icon: /* @__PURE__ */ React66.createElement(ClearIcon, null),
25834
26250
  disabled: !column.computedFiltered,
25835
26251
  onAction: () => {
25836
26252
  api.clearColumnFilter(columnId);
@@ -25852,7 +26268,7 @@ function getFilterOperatorMenuForColumn(columnId, context, onHideIntent) {
25852
26268
  filterTypes
25853
26269
  };
25854
26270
  const items = getFilterOperatorMenuItems ? getFilterOperatorMenuItems(defaultItems, param) : defaultItems;
25855
- return /* @__PURE__ */ React65.createElement(
26271
+ return /* @__PURE__ */ React66.createElement(
25856
26272
  MenuCmp,
25857
26273
  {
25858
26274
  autoFocus: true,
@@ -25958,7 +26374,7 @@ function useColumnFilterOperatorMenu() {
25958
26374
  import { useEffect as useEffect35 } from "react";
25959
26375
 
25960
26376
  // src/components/InfiniteTable/utils/getCellContextMenu.tsx
25961
- import * as React66 from "react";
26377
+ import * as React67 from "react";
25962
26378
  function getCellContextMenu(cellLocation, context, onHideIntent) {
25963
26379
  const { columnId, rowIndex, event } = cellLocation;
25964
26380
  const { getComputed, getState } = context;
@@ -25998,7 +26414,7 @@ function getCellContextMenu(cellLocation, context, onHideIntent) {
25998
26414
  }
25999
26415
  return {
26000
26416
  preventDefault: true,
26001
- menu: /* @__PURE__ */ React66.createElement(
26417
+ menu: /* @__PURE__ */ React67.createElement(
26002
26418
  MenuCmp,
26003
26419
  {
26004
26420
  columns: menuColumns,
@@ -26054,7 +26470,7 @@ function getTableContextMenu(menuLocation, context, onHideIntent) {
26054
26470
  }
26055
26471
  return {
26056
26472
  preventDefault: true,
26057
- menu: /* @__PURE__ */ React66.createElement(
26473
+ menu: /* @__PURE__ */ React67.createElement(
26058
26474
  MenuCmp,
26059
26475
  {
26060
26476
  columns: menuColumns,
@@ -26264,7 +26680,7 @@ function useTableContextMenu() {
26264
26680
 
26265
26681
  // src/components/InfiniteTable/components/HScrollSyncContent.tsx
26266
26682
  import { useRef as useRef30 } from "react";
26267
- import * as React67 from "react";
26683
+ import * as React68 from "react";
26268
26684
 
26269
26685
  // src/components/InfiniteTable/hooks/useGridScroll.ts
26270
26686
  import { useCallback as useCallback28, useEffect as useEffect36 } from "react";
@@ -26310,7 +26726,7 @@ function HScrollSyncContent(props) {
26310
26726
  } else if (maxWidth === "viewport") {
26311
26727
  style2.maxWidth = ThemeVars.runtime.bodyWidth;
26312
26728
  }
26313
- return /* @__PURE__ */ React67.createElement(
26729
+ return /* @__PURE__ */ React68.createElement(
26314
26730
  "div",
26315
26731
  {
26316
26732
  ref: domRef,
@@ -26411,7 +26827,7 @@ function useHorizontalLayout() {
26411
26827
  }
26412
26828
 
26413
26829
  // src/components/InfiniteTable/hooks/useDebugMode.ts
26414
- import * as React68 from "react";
26830
+ import * as React69 from "react";
26415
26831
  var logWarning = once(() => {
26416
26832
  console.warn(
26417
26833
  `It appears you have not loaded the CSS file for InfiniteTable.
@@ -26425,7 +26841,7 @@ import '@infinite-table/infinite-react/index.css'
26425
26841
  var cssFileLoadedVarName = stripVar(ThemeVars.loaded);
26426
26842
  function useDebugMode() {
26427
26843
  const { getState } = useInfiniteTable();
26428
- React68.useEffect(() => {
26844
+ React69.useEffect(() => {
26429
26845
  runDebugMode(getState);
26430
26846
  }, []);
26431
26847
  }
@@ -26481,7 +26897,7 @@ function InfiniteTableHeader2() {
26481
26897
  const { state: componentState, getComputed } = context;
26482
26898
  const { header, brain, headerBrain, wrapRowsHorizontally } = componentState;
26483
26899
  const { scrollbars } = getComputed();
26484
- return header ? /* @__PURE__ */ React69.createElement(
26900
+ return header ? /* @__PURE__ */ React70.createElement(
26485
26901
  TableHeaderWrapper,
26486
26902
  {
26487
26903
  wrapRowsHorizontally: !!wrapRowsHorizontally,
@@ -26498,7 +26914,7 @@ var InfiniteTableBodyCls = join(
26498
26914
  transformTranslateZero
26499
26915
  );
26500
26916
  function InfiniteTableBodyContainer(props) {
26501
- return /* @__PURE__ */ React69.createElement(
26917
+ return /* @__PURE__ */ React70.createElement(
26502
26918
  "div",
26503
26919
  {
26504
26920
  ...props,
@@ -26535,7 +26951,7 @@ function InfiniteTableBody() {
26535
26951
  const {
26536
26952
  componentState: { loading }
26537
26953
  } = useDataSourceContextValue();
26538
- const onContextMenu = React69.useCallback((event) => {
26954
+ const onContextMenu = React70.useCallback((event) => {
26539
26955
  const state = context.getState();
26540
26956
  const target = event.target;
26541
26957
  if (!masterContext && event._from_row_detail) {
@@ -26581,7 +26997,7 @@ function InfiniteTableBody() {
26581
26997
  });
26582
26998
  const { autoFocus, tabIndex } = domProps ?? {};
26583
26999
  useToggleWrapRowsHorizontally();
26584
- return /* @__PURE__ */ React69.createElement(InfiniteTableBodyContainer, { onContextMenu }, /* @__PURE__ */ React69.createElement(
27000
+ return /* @__PURE__ */ React70.createElement(InfiniteTableBodyContainer, { onContextMenu }, /* @__PURE__ */ React70.createElement(
26585
27001
  HeadlessTable,
26586
27002
  {
26587
27003
  forceRerenderTimestamp: componentState.forceBodyRerenderTimestamp,
@@ -26602,9 +27018,9 @@ function InfiniteTableBody() {
26602
27018
  cellHoverClassNames: showHoverRows ? HOVERED_CLASS_NAMES : void 0,
26603
27019
  scrollerDOMRef
26604
27020
  }
26605
- ), /* @__PURE__ */ React69.createElement(LoadMaskCmp, { visible: loading }, loadingText));
27021
+ ), /* @__PURE__ */ React70.createElement(LoadMaskCmp, { visible: loading }, loadingText));
26606
27022
  }
26607
- var InfiniteTableComponent = React69.memo(
27023
+ var InfiniteTableComponent = React70.memo(
26608
27024
  function InfiniteTableComponent2() {
26609
27025
  const context = useInfiniteTable();
26610
27026
  const masterContext = useMasterDetailContext();
@@ -26636,7 +27052,7 @@ var InfiniteTableComponent = React69.memo(
26636
27052
  useScrollToActiveRow(activeRowIndex, dataArray.length, api);
26637
27053
  useScrollToActiveCell(activeCellIndex, dataArray.length, api);
26638
27054
  const { onKeyDown: onKeyDown2 } = useDOMEventHandlers();
26639
- React69.useEffect(() => {
27055
+ React70.useEffect(() => {
26640
27056
  const dataSourceState = getDataSourceState();
26641
27057
  const onChange = debounce(
26642
27058
  (renderRange) => {
@@ -26659,7 +27075,7 @@ var InfiniteTableComponent = React69.memo(
26659
27075
  ...initialDOMProps
26660
27076
  } = componentState.domProps ?? {};
26661
27077
  const domProps = useDOMProps(initialDOMProps);
26662
- React69.useEffect(() => {
27078
+ React70.useEffect(() => {
26663
27079
  brain.setScrollStopDelay(scrollStopDelay);
26664
27080
  dataSourceActions.scrollStopDelayUpdatedByTable = scrollStopDelay;
26665
27081
  }, [scrollStopDelay]);
@@ -26670,7 +27086,7 @@ var InfiniteTableComponent = React69.memo(
26670
27086
  const { menuPortal: cellContextMenuPortal } = useCellContextMenu();
26671
27087
  const { menuPortal: tableContextMenuPortal } = useTableContextMenu();
26672
27088
  const { menuPortal: filterOperatorMenuPortal } = useColumnFilterOperatorMenu();
26673
- React69.useEffect(() => {
27089
+ React70.useEffect(() => {
26674
27090
  if (typeof globalThis.__DO_NOT_USE_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_IS_READY === "function") {
26675
27091
  globalThis.__DO_NOT_USE_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_IS_READY(
26676
27092
  componentState.id,
@@ -26684,13 +27100,13 @@ var InfiniteTableComponent = React69.memo(
26684
27100
  }
26685
27101
  }, [componentState.ready]);
26686
27102
  useDebugMode();
26687
- React69.useEffect(() => {
27103
+ React70.useEffect(() => {
26688
27104
  if (masterContext) {
26689
27105
  portalDOMRef.current = masterContext.getMasterState().portalDOMRef.current;
26690
27106
  }
26691
27107
  }, []);
26692
- const children = initialChildren ?? /* @__PURE__ */ React69.createElement(React69.Fragment, null, /* @__PURE__ */ React69.createElement(InfiniteTableHeader2, null), /* @__PURE__ */ React69.createElement(InfiniteTableBody, null));
26693
- return /* @__PURE__ */ React69.createElement("div", { onKeyDown: onKeyDown2, ref: domRef, ...domProps }, children, /* @__PURE__ */ React69.createElement(
27108
+ const children = initialChildren ?? /* @__PURE__ */ React70.createElement(React70.Fragment, null, /* @__PURE__ */ React70.createElement(InfiniteTableHeader2, null), /* @__PURE__ */ React70.createElement(InfiniteTableBody, null));
27109
+ return /* @__PURE__ */ React70.createElement("div", { onKeyDown: onKeyDown2, ref: domRef, ...domProps }, children, /* @__PURE__ */ React70.createElement(
26694
27110
  "div",
26695
27111
  {
26696
27112
  ref: portalDOMRef,
@@ -26706,14 +27122,14 @@ var InfiniteTableComponent = React69.memo(
26706
27122
  cellContextMenuPortal,
26707
27123
  tableContextMenuPortal,
26708
27124
  filterOperatorMenuPortal
26709
- ), rowHeightCSSVar ? /* @__PURE__ */ React69.createElement(
27125
+ ), rowHeightCSSVar ? /* @__PURE__ */ React70.createElement(
26710
27126
  CSSNumericVariableWatch,
26711
27127
  {
26712
27128
  key: "row-height",
26713
27129
  varName: rowHeightCSSVar,
26714
27130
  onChange: onRowHeightCSSVarChange
26715
27131
  }
26716
- ) : null, /* @__PURE__ */ React69.createElement(
27132
+ ) : null, /* @__PURE__ */ React70.createElement(
26717
27133
  CSSNumericVariableWatch,
26718
27134
  {
26719
27135
  key: "flashing-duration",
@@ -26721,21 +27137,21 @@ var InfiniteTableComponent = React69.memo(
26721
27137
  varName: ThemeVars.components.Cell.flashingDuration,
26722
27138
  onChange: onFlashingDurationCSSVarChange
26723
27139
  }
26724
- ), rowDetailHeightCSSVar ? /* @__PURE__ */ React69.createElement(
27140
+ ), rowDetailHeightCSSVar ? /* @__PURE__ */ React70.createElement(
26725
27141
  CSSNumericVariableWatch,
26726
27142
  {
26727
27143
  key: "row-detail-height",
26728
27144
  varName: rowDetailHeightCSSVar,
26729
27145
  onChange: onRowDetailHeightCSSVarChange
26730
27146
  }
26731
- ) : null, columnHeaderHeightCSSVar ? /* @__PURE__ */ React69.createElement(
27147
+ ) : null, columnHeaderHeightCSSVar ? /* @__PURE__ */ React70.createElement(
26732
27148
  CSSNumericVariableWatch,
26733
27149
  {
26734
27150
  key: "column-header-height",
26735
27151
  varName: columnHeaderHeightCSSVar,
26736
27152
  onChange: onColumnHeaderHeightCSSVarChange
26737
27153
  }
26738
- ) : null, licenseValid ? null : /* @__PURE__ */ React69.createElement(InfiniteTableLicenseFooter, null), /* @__PURE__ */ React69.createElement(FocusDetect, null));
27154
+ ) : null, licenseValid ? null : /* @__PURE__ */ React70.createElement(InfiniteTableLicenseFooter, null), /* @__PURE__ */ React70.createElement(FocusDetect, null));
26739
27155
  }
26740
27156
  );
26741
27157
  function InfiniteTableContextProvider({
@@ -26759,7 +27175,7 @@ function InfiniteTableContextProvider({
26759
27175
  getDataSourceMasterContext,
26760
27176
  api: dataSourceApi
26761
27177
  } = useDataSourceContextValue();
26762
- const [imperativeApi] = React69.useState(() => {
27178
+ const [imperativeApi] = React70.useState(() => {
26763
27179
  return getImperativeApi({
26764
27180
  getComputed,
26765
27181
  getState,
@@ -26795,20 +27211,20 @@ function InfiniteTableContextProvider({
26795
27211
  },
26796
27212
  { earlyAttach: true, debounce: 50 }
26797
27213
  );
26798
- React69.useEffect(() => {
27214
+ React70.useEffect(() => {
26799
27215
  if (scrollerDOMRef.current) {
26800
27216
  scrollerDOMRef.current.scrollTop = 0;
26801
27217
  }
26802
27218
  }, [scrollTopKey, scrollerDOMRef]);
26803
27219
  const TableContext2 = getInfiniteTableContext();
26804
- return /* @__PURE__ */ React69.createElement(TableContext2.Provider, { value: contextValue }, /* @__PURE__ */ React69.createElement(InfiniteTableComponent, null));
27220
+ return /* @__PURE__ */ React70.createElement(TableContext2.Provider, { value: contextValue }, /* @__PURE__ */ React70.createElement(InfiniteTableComponent, null));
26805
27221
  }
26806
27222
  var DEFAULT_ROW_HEIGHT = 40;
26807
27223
  var DEFAULT_COLUMN_HEADER_HEIGHT = toCSSVarName(columnHeaderHeightName);
26808
27224
  var InfiniteTable = function(props) {
26809
27225
  const table = (
26810
27226
  //@ts-ignore
26811
- /* @__PURE__ */ React69.createElement(
27227
+ /* @__PURE__ */ React70.createElement(
26812
27228
  InfiniteTableRoot,
26813
27229
  {
26814
27230
  repeatWrappedGroupRows: !!props.wrapRowsHorizontally,
@@ -26816,30 +27232,30 @@ var InfiniteTable = function(props) {
26816
27232
  columnHeaderHeight: DEFAULT_COLUMN_HEADER_HEIGHT,
26817
27233
  ...props
26818
27234
  },
26819
- /* @__PURE__ */ React69.createElement(InfiniteTableContextProvider, { children: props.children })
27235
+ /* @__PURE__ */ React70.createElement(InfiniteTableContextProvider, { children: props.children })
26820
27236
  )
26821
27237
  );
26822
27238
  if (false) {
26823
- return /* @__PURE__ */ React69.createElement(React69.StrictMode, null, table);
27239
+ return /* @__PURE__ */ React70.createElement(React70.StrictMode, null, table);
26824
27240
  }
26825
27241
  return table;
26826
27242
  };
26827
27243
  InfiniteTable.Header = InfiniteTableHeader2;
26828
27244
  InfiniteTable.Body = InfiniteTableBody;
26829
27245
  InfiniteTable.HScrollSyncContent = HScrollSyncContent;
26830
- InfiniteTable.Footer = () => /* @__PURE__ */ React69.createElement(InfiniteTableFooter, null);
27246
+ InfiniteTable.Footer = () => /* @__PURE__ */ React70.createElement(InfiniteTableFooter, null);
26831
27247
 
26832
27248
  // src/components/TreeGrid/TreeDataSource.tsx
26833
- import * as React70 from "react";
27249
+ import * as React71 from "react";
26834
27250
  function TreeDataSource(props) {
26835
27251
  const { DataSource: DataSourceComponent } = useDataSourceInternal({ nodesKey: "children", ...props });
26836
- return /* @__PURE__ */ React70.createElement(DataSourceComponent, null, props.children ?? null);
27252
+ return /* @__PURE__ */ React71.createElement(DataSourceComponent, null, props.children ?? null);
26837
27253
  }
26838
27254
 
26839
27255
  // src/components/TreeGrid/TreeGrid.tsx
26840
- import * as React71 from "react";
27256
+ import * as React72 from "react";
26841
27257
  function TreeGrid(props) {
26842
- return /* @__PURE__ */ React71.createElement(InfiniteTable, { ...props });
27258
+ return /* @__PURE__ */ React72.createElement(InfiniteTable, { ...props });
26843
27259
  }
26844
27260
 
26845
27261
  // src/components/DataSource/DataLoader/DataQuery.ts
@@ -27306,12 +27722,12 @@ var useEffectWhen = (callback, options) => {
27306
27722
  };
27307
27723
 
27308
27724
  // src/components/InfiniteTable/components/InfiniteTableRow/FlashingColumnCell.tsx
27309
- import * as React72 from "react";
27725
+ import * as React73 from "react";
27310
27726
  var currentFlashingDurationVar = stripVar(
27311
27727
  InternalVars.currentFlashingDuration
27312
27728
  );
27313
27729
  var defaultRender = ({ children }) => {
27314
- return /* @__PURE__ */ React72.createElement(React72.Fragment, null, children);
27730
+ return /* @__PURE__ */ React73.createElement(React73.Fragment, null, children);
27315
27731
  };
27316
27732
  var DEFAULT_FLASH_DURATION = 1e3;
27317
27733
  var INTERNAL_FLASH_CLS_FOR_DIRECTION = {
@@ -27333,7 +27749,7 @@ var createFlashingColumnCellComponent = (options = {}) => {
27333
27749
  // fadeClassName,
27334
27750
  render = defaultRender
27335
27751
  } = options;
27336
- const FlashingColumnCell2 = React72.forwardRef(
27752
+ const FlashingColumnCell2 = React73.forwardRef(
27337
27753
  (props, _ref) => {
27338
27754
  const cellContext = useInfiniteColumnCell();
27339
27755
  const {
@@ -27343,13 +27759,13 @@ var createFlashingColumnCellComponent = (options = {}) => {
27343
27759
  const { domRef, value, column, rowInfo, htmlElementRef } = cellContext;
27344
27760
  const rowId = rowInfo.id;
27345
27761
  const columnId = column.id;
27346
- const initialRef = React72.useRef(true);
27347
- const oldValueRef = React72.useRef(value);
27762
+ const initialRef = React73.useRef(true);
27763
+ const oldValueRef = React73.useRef(value);
27348
27764
  const oldValue = initialRef.current ? null : oldValueRef.current;
27349
27765
  initialRef.current = false;
27350
- const flashTimeoutIdRef = React72.useRef();
27351
- const flashDirectionRef = React72.useRef();
27352
- const fadeTimeoutIdRef = React72.useRef();
27766
+ const flashTimeoutIdRef = React73.useRef();
27767
+ const flashDirectionRef = React73.useRef();
27768
+ const fadeTimeoutIdRef = React73.useRef();
27353
27769
  useEffectWhen(
27354
27770
  () => {
27355
27771
  if (value === oldValueRef.current) {
@@ -27396,7 +27812,7 @@ var createFlashingColumnCellComponent = (options = {}) => {
27396
27812
  different: [value]
27397
27813
  }
27398
27814
  );
27399
- return /* @__PURE__ */ React72.createElement("div", { ref: domRef, ...props, className: join(props.className) }, render({ children: props.children, oldValue }));
27815
+ return /* @__PURE__ */ React73.createElement("div", { ref: domRef, ...props, className: join(props.className) }, render({ children: props.children, oldValue }));
27400
27816
  }
27401
27817
  );
27402
27818
  return FlashingColumnCell2;