@infinite-table/infinite-react 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -665,7 +665,8 @@ function debounce(fn, { wait }) {
665
665
  }
666
666
 
667
667
  // src/components/InfiniteTable/index.tsx
668
- var React30 = __toModule(require("react"));
668
+ var React32 = __toModule(require("react"));
669
+ var import_react45 = __toModule(require("react"));
669
670
 
670
671
  // src/utils/join.ts
671
672
  var join = (...args) => args.filter((x) => !!`${x}`).join(" ");
@@ -874,8 +875,8 @@ function useDataSourceContextValue() {
874
875
  }
875
876
 
876
877
  // src/components/HeadlessTable/index.tsx
877
- var React10 = __toModule(require("react"));
878
- var import_react8 = __toModule(require("react"));
878
+ var React12 = __toModule(require("react"));
879
+ var import_react11 = __toModule(require("react"));
879
880
 
880
881
  // src/components/VirtualList/SpacePlaceholder.tsx
881
882
  var React5 = __toModule(require("react"));
@@ -2512,6 +2513,171 @@ var ReactHeadlessTableRenderer = class extends Logger {
2512
2513
  this.items = [];
2513
2514
  this.currentHoveredRow = -1;
2514
2515
  this.hoverRowUpdatesInProgress = new Map();
2516
+ this.getFullyVisibleRowsRange = () => {
2517
+ let {
2518
+ start: [startRow],
2519
+ end: [endRow]
2520
+ } = this.brain.getRenderRange();
2521
+ while (!this.isRowFullyVisible(startRow)) {
2522
+ startRow++;
2523
+ if (startRow === endRow) {
2524
+ return null;
2525
+ }
2526
+ }
2527
+ while (!this.isRowFullyVisible(endRow)) {
2528
+ endRow--;
2529
+ if (endRow === startRow) {
2530
+ return null;
2531
+ }
2532
+ }
2533
+ return { start: startRow, end: endRow };
2534
+ };
2535
+ this.getScrollPositionForScrollRowIntoView = (rowIndex, config = { offset: 0 }) => {
2536
+ const { brain } = this;
2537
+ const scrollPosition = brain.getScrollPosition();
2538
+ let { scrollAdjustPosition, offset = 0 } = config;
2539
+ if (this.isRowFullyVisible(rowIndex) && !scrollAdjustPosition) {
2540
+ return scrollPosition;
2541
+ }
2542
+ const rowOffset = brain.getItemOffsetFor(rowIndex, "vertical");
2543
+ const rowHeight = brain.getItemSize(rowIndex, "vertical");
2544
+ const top2 = scrollPosition.scrollTop;
2545
+ const availableSize = brain.getAvailableSize();
2546
+ const bottom = top2 + availableSize.height;
2547
+ if (!scrollAdjustPosition) {
2548
+ scrollAdjustPosition = rowOffset > bottom ? "end" : rowOffset < top2 ? "start" : "end";
2549
+ }
2550
+ let scrollTop = scrollPosition.scrollTop;
2551
+ if (scrollAdjustPosition === "center") {
2552
+ scrollTop = rowOffset - Math.floor(brain.getAvailableSize().height / 2);
2553
+ } else if (scrollAdjustPosition === "start") {
2554
+ offset = -offset;
2555
+ scrollTop += rowOffset - top2 + offset;
2556
+ } else {
2557
+ offset += rowHeight;
2558
+ scrollTop += rowOffset - bottom + offset;
2559
+ }
2560
+ return __spreadProps(__spreadValues({}, scrollPosition), {
2561
+ scrollTop
2562
+ });
2563
+ };
2564
+ this.getScrollPositionForScrollColumnIntoView = (colIndex, config = { offset: 0 }) => {
2565
+ const { brain } = this;
2566
+ const scrollPosition = brain.getScrollPosition();
2567
+ let { scrollAdjustPosition, offset = 0 } = config;
2568
+ if (this.isColumnFullyVisible(colIndex) && !scrollAdjustPosition) {
2569
+ return scrollPosition;
2570
+ }
2571
+ const rowOffset = brain.getItemOffsetFor(colIndex, "horizontal");
2572
+ const colWidth = brain.getItemSize(colIndex, "horizontal");
2573
+ const left2 = scrollPosition.scrollLeft;
2574
+ const availableSize = brain.getAvailableSize();
2575
+ const right = left2 + availableSize.width;
2576
+ if (!scrollAdjustPosition) {
2577
+ scrollAdjustPosition = rowOffset > right ? "end" : rowOffset < left2 ? "start" : "end";
2578
+ }
2579
+ let scrollLeft = scrollPosition.scrollLeft;
2580
+ if (scrollAdjustPosition === "center") {
2581
+ scrollLeft = rowOffset - Math.floor(brain.getAvailableSize().width / 2);
2582
+ } else if (scrollAdjustPosition === "start") {
2583
+ offset = -offset;
2584
+ scrollLeft += rowOffset - left2 + offset;
2585
+ } else {
2586
+ offset += colWidth;
2587
+ scrollLeft += rowOffset - right + offset;
2588
+ }
2589
+ return __spreadProps(__spreadValues({}, scrollPosition), {
2590
+ scrollLeft
2591
+ });
2592
+ };
2593
+ this.getScrollPositionForScrollCellIntoView = (rowIndex, colIndex, config = { offsetLeft: 0, offsetTop: 0 }) => {
2594
+ const { scrollLeft } = this.getScrollPositionForScrollColumnIntoView(colIndex, {
2595
+ scrollAdjustPosition: config.colScrollAdjustPosition || config.scrollAdjustPosition,
2596
+ offset: config.offsetLeft
2597
+ });
2598
+ const { scrollTop } = this.getScrollPositionForScrollRowIntoView(rowIndex, {
2599
+ scrollAdjustPosition: config.rowScrollAdjustPosition || config.scrollAdjustPosition,
2600
+ offset: config.offsetTop
2601
+ });
2602
+ return { scrollLeft, scrollTop };
2603
+ };
2604
+ this.isRowFullyVisible = (rowIndex, offsetMargin = 2) => {
2605
+ return this.isRowVisible(rowIndex, this.brain.getRowHeight(rowIndex) - offsetMargin);
2606
+ };
2607
+ this.isRowVisible = (rowIndex, offsetMargin = 10) => {
2608
+ if (!this.isRowRendered(rowIndex)) {
2609
+ return false;
2610
+ }
2611
+ const { brain } = this;
2612
+ const {
2613
+ start: [startRow],
2614
+ end: [endRow]
2615
+ } = this.brain.getRenderRange();
2616
+ const midRow = Math.floor((startRow + endRow) / 2);
2617
+ if (rowIndex < startRow) {
2618
+ return false;
2619
+ }
2620
+ if (rowIndex >= endRow) {
2621
+ return false;
2622
+ }
2623
+ if (rowIndex >= midRow) {
2624
+ const lastVisibleRow = brain.getItemAt(brain.getAvailableSize().height + brain.getScrollPosition().scrollTop - offsetMargin, "vertical");
2625
+ return rowIndex <= lastVisibleRow;
2626
+ }
2627
+ if (rowIndex < midRow) {
2628
+ const firstVisibleRow = brain.getItemAt(brain.getScrollPosition().scrollTop + offsetMargin, "vertical");
2629
+ return rowIndex >= firstVisibleRow;
2630
+ }
2631
+ return true;
2632
+ };
2633
+ this.isRowRendered = (rowIndex) => {
2634
+ const elements = this.mappedCells.getElementsForRowIndex(rowIndex);
2635
+ return elements.length > 0;
2636
+ };
2637
+ this.isCellVisible = (rowIndex, colIndex) => {
2638
+ return this.isRowVisible(rowIndex) && this.isColumnVisible(colIndex);
2639
+ };
2640
+ this.isCellFullyVisible = (rowIndex, colIndex) => {
2641
+ return this.isRowFullyVisible(rowIndex) && this.isColumnVisible(colIndex);
2642
+ };
2643
+ this.isColumnFullyVisible = (colIndex, offsetMargin = 2) => {
2644
+ return this.isColumnVisible(colIndex, this.brain.getColWidth(colIndex) - offsetMargin);
2645
+ };
2646
+ this.isColumnVisible = (colIndex, offsetMargin = 10) => {
2647
+ if (!this.isColumnRendered(colIndex)) {
2648
+ return false;
2649
+ }
2650
+ const { brain } = this;
2651
+ const {
2652
+ start: [_, startCol],
2653
+ end: [__, endCol]
2654
+ } = brain.getRenderRange();
2655
+ const midCol = Math.floor((startCol + endCol) / 2);
2656
+ if (colIndex < startCol) {
2657
+ return false;
2658
+ }
2659
+ if (colIndex >= endCol) {
2660
+ return false;
2661
+ }
2662
+ if (colIndex >= midCol) {
2663
+ const lastVisibleCol = brain.getItemAt(brain.getAvailableSize().width + brain.getScrollPosition().scrollLeft - offsetMargin, "horizontal");
2664
+ return colIndex <= lastVisibleCol;
2665
+ }
2666
+ if (colIndex < midCol) {
2667
+ const firstVisibleCol = brain.getItemAt(brain.getScrollPosition().scrollLeft + offsetMargin, "horizontal");
2668
+ return colIndex >= firstVisibleCol;
2669
+ }
2670
+ return true;
2671
+ };
2672
+ this.isCellRendered = (rowIndex, colIndex) => {
2673
+ return this.isRowRendered(rowIndex) && this.isColumnRendered(colIndex);
2674
+ };
2675
+ this.isColumnRendered = (colIndex) => {
2676
+ const {
2677
+ start: [startRow]
2678
+ } = this.brain.getRenderRange();
2679
+ return this.mappedCells.getRenderedNodeForCell(startRow, colIndex) !== null;
2680
+ };
2515
2681
  this.getExtraSpanCellsForRange = (range) => {
2516
2682
  const { start, end } = range;
2517
2683
  const [startRow, startCol] = start;
@@ -3088,8 +3254,11 @@ function createRenderer(brain) {
3088
3254
  function RawTableFn(props) {
3089
3255
  const { brain, renderCell } = props;
3090
3256
  const { renderer, onRenderUpdater } = (0, import_react7.useMemo)(() => {
3091
- return createRenderer(brain);
3092
- }, [brain]);
3257
+ return props.onRenderUpdater && props.renderer ? {
3258
+ renderer: props.renderer,
3259
+ onRenderUpdater: props.onRenderUpdater
3260
+ } : createRenderer(brain);
3261
+ }, [brain, props.onRenderUpdater, props.renderer]);
3093
3262
  (0, import_react7.useEffect)(() => {
3094
3263
  renderer.cellHoverClassNames = props.cellHoverClassNames || [];
3095
3264
  }, [renderer, props.cellHoverClassNames]);
@@ -3123,6 +3292,144 @@ function RawTableFn(props) {
3123
3292
  }
3124
3293
  var RawTable = React9.memo(RawTableFn);
3125
3294
 
3295
+ // src/components/InfiniteTable/components/ActiveRowIndicator.tsx
3296
+ var React10 = __toModule(require("react"));
3297
+ var import_react9 = __toModule(require("react"));
3298
+
3299
+ // src/components/hooks/useRerender.ts
3300
+ var import_react8 = __toModule(require("react"));
3301
+ var useRerender = () => {
3302
+ const [state, setState] = (0, import_react8.useState)(0);
3303
+ return [
3304
+ state,
3305
+ (0, import_react8.useCallback)(() => {
3306
+ setState((state2) => state2 + 1);
3307
+ }, [setState])
3308
+ ];
3309
+ };
3310
+
3311
+ // src/components/InfiniteTable/internalProps.ts
3312
+ var rootClassName2 = "Infinite";
3313
+ var internalProps = {
3314
+ rootClassName: rootClassName2
3315
+ };
3316
+
3317
+ // src/components/InfiniteTable/components/ActiveRowIndicator.css.ts
3318
+ var ActiveRowIndicatorCls = { visible: "j26lrx1 j26lrx0 _16lm1iwe _16lm1iw3 _16lm1iwt _16lm1iwu _16lm1iww", hidden: "j26lrx2 j26lrx0 _16lm1iwe _16lm1iw3 _16lm1iwt _16lm1iwu _16lm1iww" };
3319
+
3320
+ // src/components/InfiniteTable/components/ActiveRowIndicator.tsx
3321
+ var { rootClassName: rootClassName3 } = internalProps;
3322
+ var baseCls = `${rootClassName3}-ActiveRowIndicator`;
3323
+ var ActiveRowIndicatorFn = (props) => {
3324
+ const { brain } = props;
3325
+ const [state, setState] = (0, import_react9.useState)({
3326
+ top: 0,
3327
+ rowHeight: 0
3328
+ });
3329
+ const domRef = (0, import_react9.useRef)(null);
3330
+ const stateRef = (0, import_react9.useRef)(state);
3331
+ const active = props.activeRowIndex != null && brain.getRowCount() > props.activeRowIndex;
3332
+ const [rerenderId, rerender] = useRerender();
3333
+ (0, import_react9.useLayoutEffect)(() => {
3334
+ if (props.activeRowIndex == null) {
3335
+ return;
3336
+ }
3337
+ setState(stateRef.current = {
3338
+ top: brain.getItemOffsetFor(props.activeRowIndex, "vertical"),
3339
+ rowHeight: brain.getRowHeight(props.activeRowIndex)
3340
+ });
3341
+ }, [props.activeRowIndex, rerenderId]);
3342
+ (0, import_react9.useEffect)(() => {
3343
+ const removeOnScroll = brain.onScroll((scrollPos) => {
3344
+ const node = domRef.current;
3345
+ const topOffset = stateRef.current.top;
3346
+ node.style.transform = `translate3d(0px, ${-scrollPos.scrollTop + topOffset}px, 0px)`;
3347
+ });
3348
+ const removeOnRenderCountChange = brain.onRenderCountChange(rerender);
3349
+ return () => {
3350
+ removeOnRenderCountChange();
3351
+ removeOnScroll();
3352
+ };
3353
+ }, [brain]);
3354
+ return /* @__PURE__ */ React10.createElement("div", {
3355
+ ref: domRef,
3356
+ "data-name": "active-row-indicator",
3357
+ className: `${baseCls} ${active ? ActiveRowIndicatorCls.visible : ActiveRowIndicatorCls.hidden}`,
3358
+ style: active ? {
3359
+ transform: `translate3d(0px, ${-brain.getScrollPosition().scrollTop + state.top}px,0)`,
3360
+ height: state.rowHeight
3361
+ } : void 0
3362
+ });
3363
+ };
3364
+ var ActiveRowIndicator = React10.memo(ActiveRowIndicatorFn);
3365
+
3366
+ // src/components/InfiniteTable/components/ActiveCellIndicator.tsx
3367
+ var React11 = __toModule(require("react"));
3368
+ var import_react10 = __toModule(require("react"));
3369
+
3370
+ // src/components/InfiniteTable/components/ActiveCellIndicator.css.ts
3371
+ var ActiveCellIndicatorCls = { visible: "nxbq1c1 nxbq1c0 _16lm1iwe _16lm1iw3 _16lm1iww _16lm1iwu", hidden: "nxbq1c2 nxbq1c0 _16lm1iwe _16lm1iw3 _16lm1iww _16lm1iwu" };
3372
+
3373
+ // src/components/InfiniteTable/components/ActiveCellIndicator.tsx
3374
+ var { rootClassName: rootClassName4 } = internalProps;
3375
+ var baseCls2 = `${rootClassName4}-ActiveCellIndicator`;
3376
+ var ActiveCellIndicatorFn = (props) => {
3377
+ const { brain } = props;
3378
+ const [rerenderId, rerender] = useRerender();
3379
+ const [state, setState] = (0, import_react10.useState)({
3380
+ top: 0,
3381
+ rowHeight: 0,
3382
+ colWidth: 0,
3383
+ left: 0
3384
+ });
3385
+ const domRef = (0, import_react10.useRef)(null);
3386
+ const stateRef = (0, import_react10.useRef)(state);
3387
+ const active = props.activeCellIndex != null && brain.getRowCount() > props.activeCellIndex[0];
3388
+ (0, import_react10.useLayoutEffect)(() => {
3389
+ if (props.activeCellIndex == null) {
3390
+ return;
3391
+ }
3392
+ const rowIndex = props.activeCellIndex[0];
3393
+ setState(stateRef.current = {
3394
+ top: brain.getItemOffsetFor(rowIndex, "vertical"),
3395
+ rowHeight: brain.getRowHeight(rowIndex),
3396
+ left: brain.getItemOffsetFor(props.activeCellIndex[1], "horizontal"),
3397
+ colWidth: brain.getColWidth(props.activeCellIndex[1])
3398
+ });
3399
+ }, [props.activeCellIndex, rerenderId]);
3400
+ (0, import_react10.useEffect)(() => {
3401
+ const removeOnSCroll = brain.onScroll((scrollPos) => {
3402
+ const node = domRef.current;
3403
+ const topOffset = stateRef.current.top;
3404
+ const leftOffset = stateRef.current.left;
3405
+ node.style.transform = `translate3d(${-scrollPos.scrollLeft + leftOffset}px, ${-scrollPos.scrollTop + topOffset}px, 0px)`;
3406
+ });
3407
+ const removeOnRenderCountChange = brain.onRenderCountChange(() => {
3408
+ rerender();
3409
+ });
3410
+ const removeOnAvailableSizeChange = brain.onAvailableSizeChange(() => {
3411
+ rerender();
3412
+ });
3413
+ return () => {
3414
+ removeOnAvailableSizeChange();
3415
+ removeOnRenderCountChange();
3416
+ removeOnSCroll();
3417
+ };
3418
+ }, [brain]);
3419
+ const scrollPosition = brain.getScrollPosition();
3420
+ return /* @__PURE__ */ React11.createElement("div", {
3421
+ ref: domRef,
3422
+ "data-name": "active-cell-indicator",
3423
+ className: `${baseCls2} ${active ? ActiveCellIndicatorCls.visible : ActiveCellIndicatorCls.hidden}`,
3424
+ style: active ? {
3425
+ transform: `translate3d(${-scrollPosition.scrollLeft + state.left}px, ${-scrollPosition.scrollTop + state.top}px,0)`,
3426
+ width: state.colWidth,
3427
+ height: state.rowHeight
3428
+ } : void 0
3429
+ });
3430
+ };
3431
+ var ActiveCellIndicator = React11.memo(ActiveCellIndicatorFn);
3432
+
3126
3433
  // src/components/HeadlessTable/index.tsx
3127
3434
  function useMatrixBrain(brain, brainOptions, fixedCellsInfo) {
3128
3435
  if (fixedCellsInfo && (fixedCellsInfo.fixedColsStart || fixedCellsInfo.fixedColsEnd || fixedCellsInfo.fixedRowsStart || fixedCellsInfo.fixedRowsEnd)) {
@@ -3150,25 +3457,33 @@ function HeadlessTable(props) {
3150
3457
  scrollerDOMRef,
3151
3458
  scrollStopDelay,
3152
3459
  renderCell,
3153
- cellHoverClassNames
3460
+ cellHoverClassNames,
3461
+ renderer,
3462
+ activeRowIndex,
3463
+ activeCellIndex,
3464
+ onRenderUpdater
3154
3465
  } = _a, domProps = __objRest(_a, [
3155
3466
  "brain",
3156
3467
  "scrollerDOMRef",
3157
3468
  "scrollStopDelay",
3158
3469
  "renderCell",
3159
- "cellHoverClassNames"
3470
+ "cellHoverClassNames",
3471
+ "renderer",
3472
+ "activeRowIndex",
3473
+ "activeCellIndex",
3474
+ "onRenderUpdater"
3160
3475
  ]);
3161
- const domRef = (0, import_react8.useRef)(null);
3162
- const [scrollSize, setTotalScrollSize] = (0, import_react8.useState)({
3476
+ const domRef = (0, import_react11.useRef)(null);
3477
+ const [scrollSize, setTotalScrollSize] = (0, import_react11.useState)({
3163
3478
  width: 0,
3164
3479
  height: 0
3165
3480
  });
3166
- (0, import_react8.useEffect)(() => {
3481
+ (0, import_react11.useEffect)(() => {
3167
3482
  if (scrollStopDelay != null) {
3168
3483
  brain.setScrollStopDelay(scrollStopDelay);
3169
3484
  }
3170
3485
  }, [scrollStopDelay, brain]);
3171
- (0, import_react8.useEffect)(() => {
3486
+ (0, import_react11.useEffect)(() => {
3172
3487
  var _a2;
3173
3488
  const node = (_a2 = domRef.current) == null ? void 0 : _a2.parentNode;
3174
3489
  if (!node) {
@@ -3184,39 +3499,47 @@ function HeadlessTable(props) {
3184
3499
  const remove = setupResizeObserver(node, onResize);
3185
3500
  return remove;
3186
3501
  }, []);
3187
- const onContainerScroll = (0, import_react8.useCallback)((scrollPos) => {
3502
+ const onContainerScroll = (0, import_react11.useCallback)((scrollPos) => {
3188
3503
  brain.setScrollPosition(scrollPos, (scrollPos2) => {
3189
3504
  domRef.current.style.transform = `translate3d(${-scrollPos2.scrollLeft}px, ${-scrollPos2.scrollTop}px, 0px)`;
3190
3505
  });
3191
3506
  }, [brain]);
3192
- (0, import_react8.useEffect)(() => {
3507
+ (0, import_react11.useEffect)(() => {
3193
3508
  const removeOnRenderCount = brain.onRenderCountChange(() => {
3194
3509
  setTotalScrollSize(brain.getTotalSize());
3195
3510
  });
3196
3511
  setTotalScrollSize(brain.getTotalSize());
3197
3512
  return removeOnRenderCount;
3198
3513
  }, [brain]);
3199
- return /* @__PURE__ */ React10.createElement(VirtualScrollContainer, __spreadProps(__spreadValues({
3514
+ return /* @__PURE__ */ React12.createElement(VirtualScrollContainer, __spreadProps(__spreadValues({
3200
3515
  onContainerScroll
3201
3516
  }, domProps), {
3202
3517
  ref: scrollerDOMRef
3203
- }), /* @__PURE__ */ React10.createElement("div", {
3518
+ }), /* @__PURE__ */ React12.createElement("div", {
3204
3519
  ref: domRef,
3205
3520
  className: scrollTransformTargetCls,
3206
3521
  "data-name": "scroll-transform-target"
3207
- }, /* @__PURE__ */ React10.createElement(RawTable, {
3522
+ }, /* @__PURE__ */ React12.createElement(RawTable, {
3523
+ renderer,
3524
+ onRenderUpdater,
3208
3525
  renderCell,
3209
3526
  brain,
3210
3527
  cellHoverClassNames
3211
- })), /* @__PURE__ */ React10.createElement(SpacePlaceholder, {
3528
+ })), /* @__PURE__ */ React12.createElement(ActiveRowIndicator, {
3529
+ brain,
3530
+ activeRowIndex
3531
+ }), /* @__PURE__ */ React12.createElement(ActiveCellIndicator, {
3532
+ brain,
3533
+ activeCellIndex
3534
+ }), /* @__PURE__ */ React12.createElement(SpacePlaceholder, {
3212
3535
  width: scrollSize.width,
3213
3536
  height: scrollSize.height
3214
3537
  }));
3215
3538
  }
3216
3539
 
3217
3540
  // src/components/hooks/useComponentState/index.tsx
3218
- var React11 = __toModule(require("react"));
3219
- var import_react11 = __toModule(require("react"));
3541
+ var React13 = __toModule(require("react"));
3542
+ var import_react14 = __toModule(require("react"));
3220
3543
 
3221
3544
  // src/utils/proxyFnCall.ts
3222
3545
  function proxyFn(fn, config) {
@@ -3259,18 +3582,18 @@ function isControlled(propName, props) {
3259
3582
  }
3260
3583
 
3261
3584
  // src/components/hooks/useLatest.tsx
3262
- var import_react9 = __toModule(require("react"));
3585
+ var import_react12 = __toModule(require("react"));
3263
3586
  function useLatest(value) {
3264
- const ref = (0, import_react9.useRef)(value);
3587
+ const ref = (0, import_react12.useRef)(value);
3265
3588
  ref.current = value;
3266
- return (0, import_react9.useCallback)(() => ref.current, []);
3589
+ return (0, import_react12.useCallback)(() => ref.current, []);
3267
3590
  }
3268
3591
 
3269
3592
  // src/components/hooks/usePrevious.ts
3270
- var import_react10 = __toModule(require("react"));
3593
+ var import_react13 = __toModule(require("react"));
3271
3594
  var usePrevious = (value, initialValue) => {
3272
- const ref = (0, import_react10.useRef)(initialValue === void 0 ? value : initialValue);
3273
- (0, import_react10.useLayoutEffect)(() => {
3595
+ const ref = (0, import_react13.useRef)(initialValue === void 0 ? value : initialValue);
3596
+ (0, import_react13.useLayoutEffect)(() => {
3274
3597
  ref.current = value;
3275
3598
  });
3276
3599
  return ref.current;
@@ -3291,7 +3614,7 @@ function getComponentStateContext() {
3291
3614
  if (ComponentContext) {
3292
3615
  return ComponentContext;
3293
3616
  }
3294
- return ComponentContext = (0, import_react11.createContext)(null);
3617
+ return ComponentContext = (0, import_react14.createContext)(null);
3295
3618
  }
3296
3619
  function getReducerGeneratedActions(dispatch, getState, getProps, propsToForward, allowedControlledPropOverrides, interceptedActions) {
3297
3620
  const state = getState();
@@ -3350,16 +3673,16 @@ function forwardProps(propsToForward, props) {
3350
3673
  return mappedState;
3351
3674
  }
3352
3675
  function getComponentStateRoot(config) {
3353
- return React11.memo(function ComponentStateRoot(props) {
3676
+ return React13.memo(function ComponentStateRoot(props) {
3354
3677
  var _a, _b;
3355
- const [initialSetupState] = (0, import_react11.useState)(() => {
3678
+ const [initialSetupState] = (0, import_react14.useState)(() => {
3356
3679
  return config.initSetupState ? config.initSetupState() : {};
3357
3680
  });
3358
- const propsToStateSetRef = (0, import_react11.useRef)(new Set());
3359
- const propsToForward = (0, import_react11.useMemo)(() => config.forwardProps ? config.forwardProps(initialSetupState) : {}, [initialSetupState]);
3681
+ const propsToStateSetRef = (0, import_react14.useRef)(new Set());
3682
+ const propsToForward = (0, import_react14.useMemo)(() => config.forwardProps ? config.forwardProps(initialSetupState) : {}, [initialSetupState]);
3360
3683
  const parentState = (_b = (_a = config.getParentState) == null ? void 0 : _a.call(config)) != null ? _b : null;
3361
3684
  const getParentState = useLatest(parentState);
3362
- const [wholeState] = (0, import_react11.useState)(() => {
3685
+ const [wholeState] = (0, import_react14.useState)(() => {
3363
3686
  let mappedState = {};
3364
3687
  if (propsToForward) {
3365
3688
  mappedState = forwardProps(propsToForward, props);
@@ -3426,10 +3749,10 @@ function getComponentStateRoot(config) {
3426
3749
  }) : newState;
3427
3750
  return result;
3428
3751
  };
3429
- const [state, dispatch] = (0, import_react11.useReducer)(theReducer, wholeState);
3752
+ const [state, dispatch] = (0, import_react14.useReducer)(theReducer, wholeState);
3430
3753
  const getComponentState = useLatest(state);
3431
3754
  const { allowedControlledPropOverrides } = config;
3432
- const actions = (0, import_react11.useMemo)(() => {
3755
+ const actions = (0, import_react14.useMemo)(() => {
3433
3756
  const generatedActions = getReducerGeneratedActions(dispatch, getComponentState, getProps, propsToForward, allowedControlledPropOverrides, config.interceptActions);
3434
3757
  return generatedActions;
3435
3758
  }, [
@@ -3438,13 +3761,13 @@ function getComponentStateRoot(config) {
3438
3761
  allowedControlledPropOverrides
3439
3762
  ]);
3440
3763
  const Context = getComponentStateContext();
3441
- const contextValue = (0, import_react11.useMemo)(() => ({
3764
+ const contextValue = (0, import_react14.useMemo)(() => ({
3442
3765
  componentState: state,
3443
3766
  componentActions: actions,
3444
3767
  getComponentState
3445
3768
  }), [state, actions, getComponentState]);
3446
3769
  const prevProps = usePrevious(props);
3447
- (0, import_react11.useEffect)(() => {
3770
+ (0, import_react14.useEffect)(() => {
3448
3771
  const currentProps = props;
3449
3772
  const newMappedState = {};
3450
3773
  let newMappedStateCount = 0;
@@ -3500,24 +3823,18 @@ function getComponentStateRoot(config) {
3500
3823
  }
3501
3824
  }
3502
3825
  });
3503
- return /* @__PURE__ */ React11.createElement(Context.Provider, {
3826
+ return /* @__PURE__ */ React13.createElement(Context.Provider, {
3504
3827
  value: contextValue
3505
3828
  }, props.children);
3506
3829
  });
3507
3830
  }
3508
3831
  function useComponentState() {
3509
3832
  const Context = getComponentStateContext();
3510
- return React11.useContext(Context);
3833
+ return React13.useContext(Context);
3511
3834
  }
3512
3835
 
3513
3836
  // src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
3514
- var React12 = __toModule(require("react"));
3515
-
3516
- // src/components/InfiniteTable/internalProps.ts
3517
- var rootClassName2 = "Infinite";
3518
- var internalProps = {
3519
- rootClassName: rootClassName2
3520
- };
3837
+ var React14 = __toModule(require("react"));
3521
3838
 
3522
3839
  // src/components/InfiniteTable/hooks/useInternalProps.ts
3523
3840
  var useInternalProps = () => {
@@ -3525,45 +3842,45 @@ var useInternalProps = () => {
3525
3842
  };
3526
3843
 
3527
3844
  // src/components/InfiniteTable/utilities.css.ts
3528
- var alignItems = { center: "_16lm1iw13", stretch: "_16lm1iw14" };
3529
- var cssEllipsisClassName = "_16lm1iw1c _16lm1iw1d _16lm1iw18";
3845
+ var alignItems = { center: "_16lm1iw14", stretch: "_16lm1iw15" };
3846
+ var cssEllipsisClassName = "_16lm1iw1d _16lm1iw1e _16lm1iw19";
3530
3847
  var cursor = { pointer: "_16lm1iwd" };
3531
- var display = { flex: "_16lm1iwl", block: "_16lm1iwm", inlineBlock: "_16lm1iwn" };
3532
- var flex = { "1": "_16lm1iwe", none: "_16lm1iwf" };
3533
- var flexFlow = { column: "_16lm1iw11", row: "_16lm1iw12" };
3534
- var justifyContent = { center: "_16lm1iw15", start: "_16lm1iw16", end: "_16lm1iw17" };
3535
- var left = { "0": "_16lm1iwv", "100%": "_16lm1iww" };
3536
- var overflow = { hidden: "_16lm1iw18", auto: "_16lm1iw19", visible: "_16lm1iw1a" };
3848
+ var display = { flex: "_16lm1iwm", block: "_16lm1iwn", inlineBlock: "_16lm1iwo" };
3849
+ var flex = { "1": "_16lm1iwf", none: "_16lm1iwg" };
3850
+ var flexFlow = { column: "_16lm1iw12", row: "_16lm1iw13" };
3851
+ var justifyContent = { center: "_16lm1iw16", start: "_16lm1iw17", end: "_16lm1iw18" };
3852
+ var left = { "0": "_16lm1iww", "100%": "_16lm1iwx" };
3853
+ var overflow = { hidden: "_16lm1iw19", auto: "_16lm1iw1a", visible: "_16lm1iw1b" };
3537
3854
  var position = { relative: "_16lm1iw1", absolute: "_16lm1iw2", sticky: "_16lm1iw3", fixed: "_16lm1iw4" };
3538
- var top = { "0": "_16lm1iwt", "100%": "_16lm1iwu" };
3855
+ var top = { "0": "_16lm1iwu", "100%": "_16lm1iwv" };
3539
3856
  var transformTranslateZero = "_16lm1iwa";
3540
- var userSelect = { none: "_16lm1iwo" };
3541
- var zIndex = { "1": "_16lm1iwg", "10": "_16lm1iwh", "1000": "_16lm1iwi", "10000": "_16lm1iwj", "100000": "_16lm1iwk" };
3857
+ var userSelect = { none: "_16lm1iwp" };
3858
+ var zIndex = { "1": "_16lm1iwh", "10": "_16lm1iwi", "1000": "_16lm1iwj", "10000": "_16lm1iwk", "100000": "_16lm1iwl" };
3542
3859
 
3543
3860
  // src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
3544
- var InfiniteTableBody = React12.forwardRef(function InfiniteTableBody2(props, ref) {
3545
- const { rootClassName: rootClassName9 } = useInternalProps();
3546
- return /* @__PURE__ */ React12.createElement("div", __spreadProps(__spreadValues({
3861
+ var InfiniteTableBody = React14.forwardRef(function InfiniteTableBody2(props, ref) {
3862
+ const { rootClassName: rootClassName11 } = useInternalProps();
3863
+ return /* @__PURE__ */ React14.createElement("div", __spreadProps(__spreadValues({
3547
3864
  ref
3548
3865
  }, props), {
3549
- className: join(`${rootClassName9}Body`, position.relative, flex["1"], transformTranslateZero, props.className)
3866
+ className: join(`${rootClassName11}Body`, position.relative, flex["1"], transformTranslateZero, props.className)
3550
3867
  }));
3551
3868
  });
3552
3869
 
3553
3870
  // src/components/InfiniteTable/components/InfiniteTableFooter/InfiniteTableFooter.tsx
3554
- var React13 = __toModule(require("react"));
3555
- var InfiniteTableFooter = React13.forwardRef(function InfiniteTableFooter2(props, ref) {
3556
- const { rootClassName: rootClassName9 } = useInternalProps();
3557
- return /* @__PURE__ */ React13.createElement("div", __spreadProps(__spreadValues({
3871
+ var React15 = __toModule(require("react"));
3872
+ var InfiniteTableFooter = React15.forwardRef(function InfiniteTableFooter2(props, ref) {
3873
+ const { rootClassName: rootClassName11 } = useInternalProps();
3874
+ return /* @__PURE__ */ React15.createElement("div", __spreadProps(__spreadValues({
3558
3875
  ref
3559
3876
  }, props), {
3560
- className: join(`${rootClassName9}Footer`, position.relative, display.flex, flexFlow.row, props.className)
3877
+ className: join(`${rootClassName11}Footer`, position.relative, display.flex, flexFlow.row, props.className)
3561
3878
  }));
3562
3879
  });
3563
3880
 
3564
3881
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
3565
- var React18 = __toModule(require("react"));
3566
- var import_react19 = __toModule(require("react"));
3882
+ var React20 = __toModule(require("react"));
3883
+ var import_react22 = __toModule(require("react"));
3567
3884
  var import_react_dom = __toModule(require("react-dom"));
3568
3885
 
3569
3886
  // src/components/DataSource/defaultFilterTypes.ts
@@ -3636,6 +3953,7 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
3636
3953
  firstInCategory: column.computedFirstInCategory,
3637
3954
  lastInCategory: column.computedLastInCategory,
3638
3955
  pinned: column.computedPinned || false,
3956
+ rowActive: extraFlags.rowActive,
3639
3957
  dragging: extraFlags.dragging,
3640
3958
  zebra: extraFlags.zebra
3641
3959
  };
@@ -3666,25 +3984,25 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
3666
3984
 
3667
3985
  // src/components/InfiniteTable/hooks/useColumnPointerEvents.ts
3668
3986
  var import_binary_search2 = __toModule(require_binary_search());
3669
- var import_react14 = __toModule(require("react"));
3987
+ var import_react17 = __toModule(require("react"));
3670
3988
 
3671
3989
  // src/components/InfiniteTable/hooks/useInfiniteTable.ts
3672
- var import_react13 = __toModule(require("react"));
3990
+ var import_react16 = __toModule(require("react"));
3673
3991
 
3674
3992
  // src/components/InfiniteTable/InfiniteTableContext.ts
3675
- var import_react12 = __toModule(require("react"));
3993
+ var import_react15 = __toModule(require("react"));
3676
3994
  var TableContext;
3677
3995
  function getInfiniteTableContext() {
3678
3996
  if (TableContext) {
3679
3997
  return TableContext;
3680
3998
  }
3681
- return TableContext = (0, import_react12.createContext)(null);
3999
+ return TableContext = (0, import_react15.createContext)(null);
3682
4000
  }
3683
4001
 
3684
4002
  // src/components/InfiniteTable/hooks/useInfiniteTable.ts
3685
4003
  var useInfiniteTable = () => {
3686
4004
  const TableContext2 = getInfiniteTableContext();
3687
- return (0, import_react13.useContext)(TableContext2);
4005
+ return (0, import_react16.useContext)(TableContext2);
3688
4006
  };
3689
4007
 
3690
4008
  // src/components/InfiniteTable/utils/moveXatY.ts
@@ -3719,18 +4037,18 @@ var useColumnPointerEvents = ({
3719
4037
  columns,
3720
4038
  computedRemainingSpace
3721
4039
  }) => {
3722
- const [draggingDiff, setDraggingDiff] = (0, import_react14.useState)(null);
3723
- const [proxyOffset, setProxyOffset] = (0, import_react14.useState)(null);
3724
- const breakpointsRef = (0, import_react14.useRef)([]);
3725
- const pointerMoveRef = (0, import_react14.useRef)(null);
3726
- const didDragRef = (0, import_react14.useRef)(false);
3727
- const initialClientPos = (0, import_react14.useRef)(null);
3728
- const currentDropIndexRef = (0, import_react14.useRef)(null);
4040
+ const [draggingDiff, setDraggingDiff] = (0, import_react17.useState)(null);
4041
+ const [proxyOffset, setProxyOffset] = (0, import_react17.useState)(null);
4042
+ const breakpointsRef = (0, import_react17.useRef)([]);
4043
+ const pointerMoveRef = (0, import_react17.useRef)(null);
4044
+ const didDragRef = (0, import_react17.useRef)(false);
4045
+ const initialClientPos = (0, import_react17.useRef)(null);
4046
+ const currentDropIndexRef = (0, import_react17.useRef)(null);
3729
4047
  const dragging = draggingDiff != null;
3730
4048
  const { componentActions, computed } = useInfiniteTable();
3731
4049
  const { computedColumnOrder } = computed;
3732
- const column = (0, import_react14.useMemo)(() => columns.get(columnId), [columnId, columns]);
3733
- const { columnIndex, columnWidth, columnsArray } = (0, import_react14.useMemo)(() => {
4050
+ const column = (0, import_react17.useMemo)(() => columns.get(columnId), [columnId, columns]);
4051
+ const { columnIndex, columnWidth, columnsArray } = (0, import_react17.useMemo)(() => {
3734
4052
  const columnsArray2 = Array.from(columns.values());
3735
4053
  return {
3736
4054
  columnsArray: columnsArray2,
@@ -3738,8 +4056,8 @@ var useColumnPointerEvents = ({
3738
4056
  columnWidth: column.computedWidth
3739
4057
  };
3740
4058
  }, [columns, columnId, column]);
3741
- let cursorRef = (0, import_react14.useRef)("auto");
3742
- const onPointerDown = (0, import_react14.useCallback)((e) => {
4059
+ let cursorRef = (0, import_react17.useRef)("auto");
4060
+ const onPointerDown = (0, import_react17.useCallback)((e) => {
3743
4061
  const target = domRef.current;
3744
4062
  cursorRef.current = target.style.cursor;
3745
4063
  didDragRef.current = false;
@@ -3802,7 +4120,7 @@ var useColumnPointerEvents = ({
3802
4120
  target.addEventListener("pointermove", onPointerMove);
3803
4121
  target.setPointerCapture(e.pointerId);
3804
4122
  }, [columns, column, columnIndex, columnsArray, computedRemainingSpace]);
3805
- const onPointerUp = (0, import_react14.useCallback)((e) => {
4123
+ const onPointerUp = (0, import_react17.useCallback)((e) => {
3806
4124
  const target = domRef.current;
3807
4125
  target.style.cursor = cursorRef.current;
3808
4126
  target.releasePointerCapture(e.pointerId);
@@ -3842,7 +4160,7 @@ function RenderHookComponent(props) {
3842
4160
  }
3843
4161
 
3844
4162
  // src/components/InfiniteTable/components/FilterEditors.tsx
3845
- var import_react15 = __toModule(require("react"));
4163
+ var import_react18 = __toModule(require("react"));
3846
4164
  function getFilterEditors() {
3847
4165
  return {
3848
4166
  string: StringFilterEditor,
@@ -3851,7 +4169,7 @@ function getFilterEditors() {
3851
4169
  }
3852
4170
  var defaultFilterEditors = getFilterEditors();
3853
4171
  function StringFilterEditor(props) {
3854
- return /* @__PURE__ */ import_react15.default.createElement("input", {
4172
+ return /* @__PURE__ */ import_react18.default.createElement("input", {
3855
4173
  "aria-label": `Filter for ${props.ariaLabel}`,
3856
4174
  type: "text",
3857
4175
  value: props.filterValue,
@@ -3862,7 +4180,7 @@ function StringFilterEditor(props) {
3862
4180
  });
3863
4181
  }
3864
4182
  function NumberFilterEditor(props) {
3865
- return /* @__PURE__ */ import_react15.default.createElement("input", {
4183
+ return /* @__PURE__ */ import_react18.default.createElement("input", {
3866
4184
  "aria-label": `Filter for ${props.ariaLabel}`,
3867
4185
  type: "number",
3868
4186
  value: props.filterValue,
@@ -3878,24 +4196,24 @@ function NumberFilterEditor(props) {
3878
4196
  }
3879
4197
 
3880
4198
  // src/components/InfiniteTable/components/icons/SortIcon.tsx
3881
- var React15 = __toModule(require("react"));
3882
- var import_react16 = __toModule(require("react"));
4199
+ var React17 = __toModule(require("react"));
4200
+ var import_react19 = __toModule(require("react"));
3883
4201
 
3884
4202
  // src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
3885
4203
  var import_createRuntimeFn = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
3886
- var CellCls = "_1eexc2a5 _16lm1iwl _16lm1iw12 _16lm1iw13 _16lm1iw2 _16lm1iw1b _16lm1iw1c";
3887
- var HeaderCellContentRecipe = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_12zfob115 _16lm1iwq _16lm1iws _16lm1iwl _16lm1iw12 _16lm1iw13", variantClassNames: { filtered: { false: "_12zfob116", true: "_12zfob117" } }, defaultVariants: {}, compoundVariants: [] });
4204
+ var CellCls = "_1eexc2a5 _16lm1iwm _16lm1iw13 _16lm1iw14 _16lm1iw2 _16lm1iw1c _16lm1iw1d";
4205
+ var HeaderCellContentRecipe = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_12zfob117 _16lm1iwr _16lm1iwt _16lm1iwm _16lm1iw13 _16lm1iw14", variantClassNames: { filtered: { false: "_12zfob118", true: "_12zfob119" } }, defaultVariants: {}, compoundVariants: [] });
3888
4206
  var HeaderCellProxy = "_12zfob10";
3889
- var HeaderCellRecipe = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_12zfob1h _16lm1iwm", variantClassNames: { zebra: { false: "_12zfob1i", even: "_12zfob1j", odd: "_12zfob1k" }, dragging: { true: "_12zfob1l", false: "_12zfob1m" }, first: { true: "_12zfob1n", false: "_12zfob1o" }, last: { true: "_12zfob1p", false: "_12zfob1q" }, groupByField: { true: "_12zfob1r", false: "_12zfob1s" }, firstInCategory: { true: "_12zfob1t", false: "_12zfob1u" }, lastInCategory: { true: "_12zfob1v", false: "_12zfob1w" }, pinned: { start: "_12zfob1x", end: "_12zfob1y", false: "_12zfob1z" }, filtered: { true: "_12zfob110", false: "_12zfob111" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "_12zfob112"], [{ pinned: "end", firstInCategory: true }, "_12zfob113"], [{ pinned: false, lastInCategory: true }, "_12zfob114"]] });
3890
- var HeaderClsRecipe = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_12zfob17 _16lm1iwm _16lm1iw2", variantClassNames: { pinned: { start: "_12zfob18", end: "_12zfob19", false: "_12zfob1a" }, virtualized: { true: "_12zfob1b", false: "_12zfob1c" }, overflow: { true: "_12zfob1d", false: "_12zfob1e" } }, defaultVariants: {}, compoundVariants: [[{ overflow: true, pinned: "start" }, "_12zfob1f"], [{ overflow: true, pinned: "end" }, "_12zfob1g"]] });
3891
- var HeaderFilterCls = "_12zfob11a _16lm1iwl _16lm1iw12 _16lm1iw13 _16lm1iw1";
3892
- var HeaderFilterEditorCls = "_16lm1iws _16lm1iwq";
3893
- var HeaderGroupCls = "_12zfob119 _16lm1iwl _16lm1iw12 _16lm1iw13";
4207
+ var HeaderCellRecipe = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_12zfob1h _16lm1iwn", variantClassNames: { rowActive: { false: "_12zfob1i", true: "_12zfob1j" }, zebra: { false: "_12zfob1k", even: "_12zfob1l", odd: "_12zfob1m" }, dragging: { true: "_12zfob1n", false: "_12zfob1o" }, first: { true: "_12zfob1p", false: "_12zfob1q" }, last: { true: "_12zfob1r", false: "_12zfob1s" }, groupByField: { true: "_12zfob1t", false: "_12zfob1u" }, firstInCategory: { true: "_12zfob1v", false: "_12zfob1w" }, lastInCategory: { true: "_12zfob1x", false: "_12zfob1y" }, pinned: { start: "_12zfob1z", end: "_12zfob110", false: "_12zfob111" }, filtered: { true: "_12zfob112", false: "_12zfob113" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "_12zfob114"], [{ pinned: "end", firstInCategory: true }, "_12zfob115"], [{ pinned: false, lastInCategory: true }, "_12zfob116"]] });
4208
+ var HeaderClsRecipe = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_12zfob17 _16lm1iwn _16lm1iw2", variantClassNames: { pinned: { start: "_12zfob18", end: "_12zfob19", false: "_12zfob1a" }, virtualized: { true: "_12zfob1b", false: "_12zfob1c" }, overflow: { true: "_12zfob1d", false: "_12zfob1e" } }, defaultVariants: {}, compoundVariants: [[{ overflow: true, pinned: "start" }, "_12zfob1f"], [{ overflow: true, pinned: "end" }, "_12zfob1g"]] });
4209
+ var HeaderFilterCls = "_12zfob11c _16lm1iwm _16lm1iw13 _16lm1iw14 _16lm1iw1";
4210
+ var HeaderFilterEditorCls = "_16lm1iwt _16lm1iwr";
4211
+ var HeaderGroupCls = "_12zfob11b _16lm1iwm _16lm1iw13 _16lm1iw14";
3894
4212
  var HeaderScrollbarPlaceholderCls = "_12zfob16 _16lm1iw2";
3895
4213
  var HeaderSortIconCls = "_16lm1iw1";
3896
4214
  var HeaderSortIconIndexCls = "_12zfob15";
3897
4215
  var HeaderSortIconRecipe = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "", variantClassNames: { align: { start: "_12zfob12", center: "_12zfob13", end: "_12zfob14" } }, defaultVariants: {}, compoundVariants: [] });
3898
- var HeaderWrapperCls = "_12zfob118 _16lm1iw18 _16lm1iw1 _16lm1iwl _16lm1iw12";
4216
+ var HeaderWrapperCls = "_12zfob11a _16lm1iw19 _16lm1iw1 _16lm1iwm _16lm1iw13";
3899
4217
 
3900
4218
  // src/components/InfiniteTable/components/icons/SortIcon.tsx
3901
4219
  var defaultLineStyle = {
@@ -3906,8 +4224,8 @@ var defaultLineStyle = {
3906
4224
  var InfiniteTableIconClassName = "InfiniteTableIcon";
3907
4225
  function SortIcon(props) {
3908
4226
  var _a;
3909
- const [rendered, setRendered] = (0, import_react16.useState)(true);
3910
- const [opacity, setOpacity] = (0, import_react16.useState)(0);
4227
+ const [rendered, setRendered] = (0, import_react19.useState)(true);
4228
+ const [opacity, setOpacity] = (0, import_react19.useState)(0);
3911
4229
  const { direction, lineWidth = 1, style, className, index } = props;
3912
4230
  const showIndex = index != null && index > 0;
3913
4231
  const size = (_a = props.size) != null ? _a : 16;
@@ -3921,16 +4239,21 @@ function SortIcon(props) {
3921
4239
  }), props.lineStyle), {
3922
4240
  opacity
3923
4241
  });
3924
- (0, import_react16.useEffect)(() => {
4242
+ (0, import_react19.useEffect)(() => {
3925
4243
  const newOpacity = direction != 0 ? 1 : 0;
3926
4244
  if (!rendered && newOpacity) {
3927
4245
  setRendered(true);
3928
4246
  }
3929
4247
  if (newOpacity !== opacity) {
3930
- requestAnimationFrame(() => {
4248
+ const rafId = requestAnimationFrame(() => {
3931
4249
  setOpacity(newOpacity);
3932
4250
  });
4251
+ return () => {
4252
+ cancelAnimationFrame(rafId);
4253
+ };
3933
4254
  }
4255
+ return () => {
4256
+ };
3934
4257
  }, [direction, rendered]);
3935
4258
  const onTransitionEnd = () => {
3936
4259
  const hidden = opacity === 0 && direction === 0;
@@ -3946,44 +4269,44 @@ function SortIcon(props) {
3946
4269
  if (direction === -1) {
3947
4270
  indexStyle.top = "100%";
3948
4271
  }
3949
- return /* @__PURE__ */ React15.createElement("div", {
4272
+ return /* @__PURE__ */ React17.createElement("div", {
3950
4273
  style: __spreadProps(__spreadValues({}, style), { width: size }),
3951
4274
  className: join(className, InfiniteTableIconClassName, `${InfiniteTableIconClassName}-sort`)
3952
- }, showIndex ? /* @__PURE__ */ React15.createElement("div", {
4275
+ }, showIndex ? /* @__PURE__ */ React17.createElement("div", {
3953
4276
  "data-name": "index",
3954
4277
  style: indexStyle,
3955
4278
  className: HeaderSortIconIndexCls
3956
- }, index) : null, /* @__PURE__ */ React15.createElement("div", {
4279
+ }, index) : null, /* @__PURE__ */ React17.createElement("div", {
3957
4280
  style: __spreadValues({ width: sizes[0] }, lineStyle),
3958
4281
  onTransitionEnd
3959
- }), /* @__PURE__ */ React15.createElement("div", {
4282
+ }), /* @__PURE__ */ React17.createElement("div", {
3960
4283
  style: __spreadValues({ width: sizes[1] }, lineStyle)
3961
- }), /* @__PURE__ */ React15.createElement("div", {
4284
+ }), /* @__PURE__ */ React17.createElement("div", {
3962
4285
  style: __spreadValues({ width: sizes[2] }, lineStyle)
3963
4286
  }));
3964
4287
  }
3965
4288
 
3966
4289
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCell.tsx
3967
- var React16 = __toModule(require("react"));
4290
+ var React18 = __toModule(require("react"));
3968
4291
 
3969
4292
  // src/components/InfiniteTable/hooks/useInfiniteTableState.ts
3970
- var import_react17 = __toModule(require("react"));
4293
+ var import_react20 = __toModule(require("react"));
3971
4294
  var useInfiniteTableState = () => {
3972
4295
  const TableContext2 = getInfiniteTableContext();
3973
- const { componentState } = (0, import_react17.useContext)(TableContext2);
4296
+ const { componentState } = (0, import_react20.useContext)(TableContext2);
3974
4297
  return componentState;
3975
4298
  };
3976
4299
 
3977
4300
  // src/components/InfiniteTable/components/cell.css.ts
3978
4301
  var import_createRuntimeFn2 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
3979
4302
  var CellClsVariants = { shifting: "_1eexc2a3", dragging: "_1eexc2a4" };
3980
- var ColumnCellCls = "_1eexc2a5 _16lm1iwl _16lm1iw12 _16lm1iw13 _16lm1iw2 _16lm1iw1b _16lm1iw1c";
3981
- var ColumnCellRecipe = (0, import_createRuntimeFn2.createRuntimeFn)({ defaultClassName: "_1eexc2a7", variantClassNames: { dragging: { false: "_1eexc2a8", true: "_1eexc2a9" }, zebra: { false: "_1eexc2aa", even: "_1eexc2ab", odd: "_1eexc2ac" }, first: { true: "_1eexc2ad", false: "_1eexc2ae" }, last: { true: "_1eexc2af", false: "_1eexc2ag" }, groupByField: { true: "_1eexc2ah", false: "_1eexc2ai" }, firstInCategory: { true: "_1eexc2aj", false: "_1eexc2ak" }, lastInCategory: { true: "_1eexc2al", false: "_1eexc2am" }, pinned: { start: "_1eexc2an", end: "_1eexc2ao", false: "_1eexc2ap" }, filtered: { true: "_1eexc2aq", false: "_1eexc2ar" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "_1eexc2as"], [{ pinned: "end", firstInCategory: true }, "_1eexc2at"]] });
4303
+ var ColumnCellCls = "_1eexc2a5 _16lm1iwm _16lm1iw13 _16lm1iw14 _16lm1iw2 _16lm1iw1c _16lm1iw1d";
4304
+ var ColumnCellRecipe = (0, import_createRuntimeFn2.createRuntimeFn)({ defaultClassName: "_1eexc2a7", variantClassNames: { dragging: { false: "_1eexc2a8", true: "_1eexc2a9" }, rowActive: { false: "_1eexc2aa", true: "_1eexc2ab" }, zebra: { false: "_1eexc2ac", even: "_1eexc2ad", odd: "_1eexc2ae" }, first: { true: "_1eexc2af", false: "_1eexc2ag" }, last: { true: "_1eexc2ah", false: "_1eexc2ai" }, groupByField: { true: "_1eexc2aj", false: "_1eexc2ak" }, firstInCategory: { true: "_1eexc2al", false: "_1eexc2am" }, lastInCategory: { true: "_1eexc2an", false: "_1eexc2ao" }, pinned: { start: "_1eexc2ap", end: "_1eexc2aq", false: "_1eexc2ar" }, filtered: { true: "_1eexc2as", false: "_1eexc2at" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "_1eexc2au"], [{ pinned: "end", firstInCategory: true }, "_1eexc2av"]] });
3982
4305
 
3983
4306
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCell.tsx
3984
- var { rootClassName: rootClassName3 } = internalProps;
3985
- var InfiniteTableCellClassName = `${rootClassName3}Cell`;
3986
- var InfiniteTableCellContentClassName = `${rootClassName3}Cell_content`;
4307
+ var { rootClassName: rootClassName5 } = internalProps;
4308
+ var InfiniteTableCellClassName = `${rootClassName5}Cell`;
4309
+ var InfiniteTableCellContentClassName = `${rootClassName5}Cell_content`;
3987
4310
  function InfiniteTableCellFn(props) {
3988
4311
  var _b, _c, _d;
3989
4312
  const _a = props, {
@@ -4037,35 +4360,35 @@ function InfiniteTableCellFn(props) {
4037
4360
  style,
4038
4361
  "data-column-id": column.id,
4039
4362
  className: join(domProps.className, justifyContent[(_b = column.align) != null ? _b : "start"], InfiniteTableCellClassName, ColumnCellCls, shifting ? `${InfiniteTableCellClassName}--shifting ${CellClsVariants.shifting}` : ""),
4040
- children: /* @__PURE__ */ React16.createElement(React16.Fragment, null, beforeChildren, /* @__PURE__ */ React16.createElement("div", {
4363
+ children: /* @__PURE__ */ React18.createElement(React18.Fragment, null, beforeChildren, /* @__PURE__ */ React18.createElement("div", {
4041
4364
  className: join(InfiniteTableCellContentClassName, cssEllipsis ? cssEllipsisClassName : overflow.hidden, contentClassName),
4042
4365
  style: contentStyle
4043
4366
  }, children), afterChildren)
4044
4367
  });
4045
4368
  const RenderComponent = cellType === "body" ? (_c = column.components) == null ? void 0 : _c.ColumnCell : (_d = column.components) == null ? void 0 : _d.HeaderCell;
4046
4369
  if (RenderComponent) {
4047
- return /* @__PURE__ */ React16.createElement(RenderComponent, __spreadValues({}, finalDOMProps));
4370
+ return /* @__PURE__ */ React18.createElement(RenderComponent, __spreadValues({}, finalDOMProps));
4048
4371
  }
4049
- return /* @__PURE__ */ React16.createElement("div", __spreadProps(__spreadValues({}, finalDOMProps), {
4372
+ return /* @__PURE__ */ React18.createElement("div", __spreadProps(__spreadValues({}, finalDOMProps), {
4050
4373
  ref: domRef
4051
4374
  }));
4052
4375
  }
4053
- var InfiniteTableCell = React16.memo(InfiniteTableCellFn);
4376
+ var InfiniteTableCell = React18.memo(InfiniteTableCellFn);
4054
4377
 
4055
4378
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableColumnHeaderFilter.tsx
4056
- var React17 = __toModule(require("react"));
4057
- var import_react18 = __toModule(require("react"));
4058
- var { rootClassName: rootClassName4 } = internalProps;
4059
- var InfiniteTableColumnHeaderFilterClassName = `${rootClassName4}HeaderCell__filter`;
4379
+ var React19 = __toModule(require("react"));
4380
+ var import_react21 = __toModule(require("react"));
4381
+ var { rootClassName: rootClassName6 } = internalProps;
4382
+ var InfiniteTableColumnHeaderFilterClassName = `${rootClassName6}HeaderCell__filter`;
4060
4383
  var stopPropagation = (e) => e.stopPropagation();
4061
4384
  function InfiniteTableColumnHeaderFilter(props) {
4062
4385
  var _a, _b, _c, _d;
4063
- const [theValue, setTheValue] = (0, import_react18.useState)((_b = (_a = props.columnFilterValue) == null ? void 0 : _a.filterValue) != null ? _b : "");
4386
+ const [theValue, setTheValue] = (0, import_react21.useState)((_b = (_a = props.columnFilterValue) == null ? void 0 : _a.filterValue) != null ? _b : "");
4064
4387
  const onInputChange = (filterValue) => {
4065
4388
  setTheValue(filterValue);
4066
4389
  props.onChange(filterValue);
4067
4390
  };
4068
- (0, import_react18.useEffect)(() => {
4391
+ (0, import_react21.useEffect)(() => {
4069
4392
  var _a2;
4070
4393
  if (props.columnFilterValue) {
4071
4394
  if (theValue !== props.columnFilterValue.filterValue) {
@@ -4092,15 +4415,15 @@ function InfiniteTableColumnHeaderFilter(props) {
4092
4415
  onChange: onInputChange
4093
4416
  };
4094
4417
  const FilterEditor = props.filterEditor;
4095
- return /* @__PURE__ */ React17.createElement("div", {
4418
+ return /* @__PURE__ */ React19.createElement("div", {
4096
4419
  onPointerUp: stopPropagation,
4097
4420
  onPointerDown: stopPropagation,
4098
4421
  className: `${InfiniteTableColumnHeaderFilterClassName} ${HeaderFilterCls}`,
4099
4422
  style: { height: props.columnHeaderHeight }
4100
- }, FilterEditor ? /* @__PURE__ */ React17.createElement(FilterEditor, __spreadValues({}, filterEditorProps)) : null);
4423
+ }, FilterEditor ? /* @__PURE__ */ React19.createElement(FilterEditor, __spreadValues({}, filterEditorProps)) : null);
4101
4424
  }
4102
4425
  function InfiniteTableColumnHeaderFilterEmpty() {
4103
- return /* @__PURE__ */ React17.createElement("div", {
4426
+ return /* @__PURE__ */ React19.createElement("div", {
4104
4427
  onPointerUp: stopPropagation,
4105
4428
  onPointerDown: stopPropagation,
4106
4429
  className: `${InfiniteTableColumnHeaderFilterClassName} ${HeaderFilterCls}`,
@@ -4109,9 +4432,9 @@ function InfiniteTableColumnHeaderFilterEmpty() {
4109
4432
  }
4110
4433
 
4111
4434
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
4112
- var InfiniteTableHeaderCellContext = React18.createContext(null);
4113
- var { rootClassName: rootClassName5 } = internalProps;
4114
- var InfiniteTableHeaderCellClassName = `${rootClassName5}HeaderCell`;
4435
+ var InfiniteTableHeaderCellContext = React20.createContext(null);
4436
+ var { rootClassName: rootClassName7 } = internalProps;
4437
+ var InfiniteTableHeaderCellClassName = `${rootClassName7}HeaderCell`;
4115
4438
  function InfiniteTableHeaderCell(props) {
4116
4439
  var _a, _b, _c, _d, _e;
4117
4440
  const column = props.column;
@@ -4119,13 +4442,13 @@ function InfiniteTableHeaderCell(props) {
4119
4442
  const { onResize, height, width, headerOptions } = props;
4120
4443
  const sortInfo = column.computedSortInfo;
4121
4444
  let header = column.header;
4122
- const ref = (0, import_react19.useCallback)((node) => {
4445
+ const ref = (0, import_react22.useCallback)((node) => {
4123
4446
  var _a2;
4124
4447
  domRef.current = node;
4125
4448
  (_a2 = props.domRef) == null ? void 0 : _a2.call(props, node);
4126
4449
  }, [props.domRef]);
4127
4450
  const alwaysShow = headerOptions.alwaysReserveSpaceForSortIcon;
4128
- const sortTool = column.computedSorted || alwaysShow ? /* @__PURE__ */ React18.createElement(SortIcon, {
4451
+ const sortTool = column.computedSorted || alwaysShow ? /* @__PURE__ */ React20.createElement(SortIcon, {
4129
4452
  index: column.computedMultiSort ? column.computedSortIndex + 1 : void 0,
4130
4453
  className: `${InfiniteTableHeaderCellClassName}__sort-icon ${HeaderSortIconCls} ${HeaderSortIconRecipe({
4131
4454
  align: column.align || "start"
@@ -4142,15 +4465,15 @@ function InfiniteTableHeaderCell(props) {
4142
4465
  const align = column.align || "start";
4143
4466
  const renderChildren = () => {
4144
4467
  if (header instanceof Function) {
4145
- header = /* @__PURE__ */ React18.createElement(RenderHookComponent, {
4468
+ header = /* @__PURE__ */ React20.createElement(RenderHookComponent, {
4146
4469
  render: header,
4147
4470
  renderParam
4148
4471
  });
4149
4472
  }
4150
4473
  header = header != null ? header : column.name;
4151
- return /* @__PURE__ */ React18.createElement(React18.Fragment, null, align === "end" ? sortTool : null, header, align !== "end" ? sortTool : null);
4474
+ return /* @__PURE__ */ React20.createElement(React20.Fragment, null, align === "end" ? sortTool : null, header, align !== "end" ? sortTool : null);
4152
4475
  };
4153
- const domRef = (0, import_react19.useRef)(null);
4476
+ const domRef = (0, import_react22.useRef)(null);
4154
4477
  const {
4155
4478
  computed: { computedRemainingSpace, showColumnFilters },
4156
4479
  componentState: { portalDOMRef, columnHeaderHeight, filterEditors }
@@ -4160,7 +4483,7 @@ function InfiniteTableHeaderCell(props) {
4160
4483
  getState: getDataSourceState,
4161
4484
  componentState: { filterDelay, filterTypes }
4162
4485
  } = useDataSourceContextValue();
4163
- (0, import_react19.useEffect)(() => {
4486
+ (0, import_react22.useEffect)(() => {
4164
4487
  let clearOnResize = null;
4165
4488
  const node = domRef.current;
4166
4489
  if (onResize && node) {
@@ -4181,7 +4504,7 @@ function InfiniteTableHeaderCell(props) {
4181
4504
  });
4182
4505
  let draggingProxy = null;
4183
4506
  if (dragging) {
4184
- draggingProxy = /* @__PURE__ */ React18.createElement("div", {
4507
+ draggingProxy = /* @__PURE__ */ React20.createElement("div", {
4185
4508
  className: `${InfiniteTableHeaderCellClassName}Proxy ${HeaderCellProxy}`,
4186
4509
  style: {
4187
4510
  position: "absolute",
@@ -4198,7 +4521,7 @@ function InfiniteTableHeaderCell(props) {
4198
4521
  const contentRecipeVariants = {
4199
4522
  filtered: column.computedFiltered
4200
4523
  };
4201
- const setFilterValue = (0, import_react19.useCallback)((filterValue) => {
4524
+ const setFilterValue = (0, import_react22.useCallback)((filterValue) => {
4202
4525
  var _a2;
4203
4526
  const state = getDataSourceState();
4204
4527
  let newFilterValue = (_a2 = state.filterValue) != null ? _a2 : [];
@@ -4222,7 +4545,7 @@ function InfiniteTableHeaderCell(props) {
4222
4545
  });
4223
4546
  dataSourceActions.filterValue = newFilterValue;
4224
4547
  }, [column, filterTypes]);
4225
- const debouncedOnFilterValueChange = React18.useMemo(() => {
4548
+ const debouncedOnFilterValueChange = React20.useMemo(() => {
4226
4549
  const fn = (filterValue) => {
4227
4550
  let newFilterValueForColumn;
4228
4551
  if (column.computedFilterValue) {
@@ -4259,9 +4582,9 @@ function InfiniteTableHeaderCell(props) {
4259
4582
  ]);
4260
4583
  const filterType = column.computedFilterType;
4261
4584
  const FilterEditor = filterEditors[filterType] || defaultFilterEditors[filterType] || StringFilterEditor;
4262
- return /* @__PURE__ */ React18.createElement(ContextProvider, {
4585
+ return /* @__PURE__ */ React20.createElement(ContextProvider, {
4263
4586
  value: renderParam
4264
- }, /* @__PURE__ */ React18.createElement(InfiniteTableCell, {
4587
+ }, /* @__PURE__ */ React20.createElement(InfiniteTableCell, {
4265
4588
  domRef: ref,
4266
4589
  cellType: "header",
4267
4590
  column,
@@ -4273,9 +4596,9 @@ function InfiniteTableHeaderCell(props) {
4273
4596
  onPointerUp,
4274
4597
  contentClassName: join(HeaderCellContentRecipe(contentRecipeVariants), justifyContent[(_c = column.align) != null ? _c : "start"]),
4275
4598
  contentStyle: showColumnFilters ? { height: height / 2 } : void 0,
4276
- className: join(InfiniteTableHeaderCellClassName, userSelect.none, column.computedSortable ? cursor.pointer : "", useCellClassName(column, [InfiniteTableHeaderCellClassName, InfiniteTableCellClassName], HeaderCellRecipe, { dragging, zebra: false }), CellCls),
4599
+ className: join(InfiniteTableHeaderCellClassName, userSelect.none, column.computedSortable ? cursor.pointer : "", useCellClassName(column, [InfiniteTableHeaderCellClassName, InfiniteTableCellClassName], HeaderCellRecipe, { dragging, zebra: false, rowActive: false }), CellCls),
4277
4600
  cssEllipsis: (_e = (_d = column.headerCssEllipsis) != null ? _d : column.cssEllipsis) != null ? _e : true,
4278
- afterChildren: showColumnFilters ? column.computedFilterable ? /* @__PURE__ */ React18.createElement(InfiniteTableColumnHeaderFilter, {
4601
+ afterChildren: showColumnFilters ? column.computedFilterable ? /* @__PURE__ */ React20.createElement(InfiniteTableColumnHeaderFilter, {
4279
4602
  filterEditor: FilterEditor,
4280
4603
  filterTypes,
4281
4604
  onChange: debouncedOnFilterValueChange,
@@ -4283,17 +4606,17 @@ function InfiniteTableHeaderCell(props) {
4283
4606
  columnLabel: column.field || column.name || column.id,
4284
4607
  columnFilterValue: column.computedFilterValue,
4285
4608
  columnHeaderHeight
4286
- }) : /* @__PURE__ */ React18.createElement(InfiniteTableColumnHeaderFilterEmpty, null) : null,
4609
+ }) : /* @__PURE__ */ React20.createElement(InfiniteTableColumnHeaderFilterEmpty, null) : null,
4287
4610
  renderChildren
4288
4611
  }), draggingProxy);
4289
4612
  }
4290
4613
  function useInfiniteHeaderCell() {
4291
- const result = (0, import_react19.useContext)(InfiniteTableHeaderCellContext);
4614
+ const result = (0, import_react22.useContext)(InfiniteTableHeaderCellContext);
4292
4615
  return result;
4293
4616
  }
4294
4617
 
4295
4618
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx
4296
- var React21 = __toModule(require("react"));
4619
+ var React23 = __toModule(require("react"));
4297
4620
 
4298
4621
  // src/components/utils/getScrollbarWidth.ts
4299
4622
  var scrollbarWidth;
@@ -4415,11 +4738,11 @@ function assignGroupOffsetsAndComputedWidths(items, groupOffset = 0) {
4415
4738
  }
4416
4739
 
4417
4740
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
4418
- var React20 = __toModule(require("react"));
4419
- var import_react20 = __toModule(require("react"));
4741
+ var React22 = __toModule(require("react"));
4742
+ var import_react23 = __toModule(require("react"));
4420
4743
 
4421
4744
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
4422
- var React19 = __toModule(require("react"));
4745
+ var React21 = __toModule(require("react"));
4423
4746
  var TableHeaderGroupClassName = `${rootClassName2}HeaderGroup`;
4424
4747
  function InfiniteTableHeaderGroup(props) {
4425
4748
  const { columnGroup, height, width } = props;
@@ -4429,19 +4752,19 @@ function InfiniteTableHeaderGroup(props) {
4429
4752
  columnGroup
4430
4753
  });
4431
4754
  }
4432
- return /* @__PURE__ */ React19.createElement("div", {
4755
+ return /* @__PURE__ */ React21.createElement("div", {
4433
4756
  ref: props.domRef,
4434
4757
  "data-group-id": columnGroup.uniqueGroupId,
4435
4758
  className: join(HeaderGroupCls, TableHeaderGroupClassName),
4436
4759
  style: { width, height }
4437
- }, /* @__PURE__ */ React19.createElement("div", {
4760
+ }, /* @__PURE__ */ React21.createElement("div", {
4438
4761
  className: join(`${TableHeaderGroupClassName}__header-content`, cssEllipsisClassName)
4439
4762
  }, header));
4440
4763
  }
4441
4764
 
4442
4765
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
4443
- var { rootClassName: rootClassName6 } = internalProps;
4444
- var TableHeaderClassName = `${rootClassName6}Header`;
4766
+ var { rootClassName: rootClassName8 } = internalProps;
4767
+ var TableHeaderClassName = `${rootClassName8}Header`;
4445
4768
  function InfiniteTableHeaderFn(props) {
4446
4769
  const {
4447
4770
  brain,
@@ -4457,7 +4780,7 @@ function InfiniteTableHeaderFn(props) {
4457
4780
  componentState: { headerBrain, headerOptions }
4458
4781
  } = useInfiniteTable();
4459
4782
  const { computedVisibleColumnsMap, showColumnFilters } = computed;
4460
- (0, import_react20.useEffect)(() => {
4783
+ (0, import_react23.useEffect)(() => {
4461
4784
  const onScroll = (scrollPosition) => {
4462
4785
  if (domRef.current) {
4463
4786
  domRef.current.style.transform = `translate3d(-${scrollPosition.scrollLeft}px, 0px, 0px)`;
@@ -4466,7 +4789,7 @@ function InfiniteTableHeaderFn(props) {
4466
4789
  const removeOnScroll = brain.onScroll(onScroll);
4467
4790
  return removeOnScroll;
4468
4791
  }, [brain]);
4469
- const domRef = (0, import_react20.useRef)(null);
4792
+ const domRef = (0, import_react23.useRef)(null);
4470
4793
  const headerCls = HeaderClsRecipe({
4471
4794
  overflow: false,
4472
4795
  virtualized: true
@@ -4476,7 +4799,7 @@ function InfiniteTableHeaderFn(props) {
4476
4799
  className: join(TableHeaderClassName, `${TableHeaderClassName}--virtualized`, className, headerCls),
4477
4800
  style: __spreadProps(__spreadValues({}, style), { height: columnHeaderHeight })
4478
4801
  };
4479
- const renderCell = (0, import_react20.useCallback)((params) => {
4802
+ const renderCell = (0, import_react23.useCallback)((params) => {
4480
4803
  const {
4481
4804
  rowIndex,
4482
4805
  colIndex,
@@ -4501,7 +4824,7 @@ function InfiniteTableHeaderFn(props) {
4501
4824
  computedWidth: colGroupItem.computedWidth,
4502
4825
  groupOffset: colGroupItem.groupOffset
4503
4826
  });
4504
- return /* @__PURE__ */ React20.createElement(InfiniteTableHeaderGroup, {
4827
+ return /* @__PURE__ */ React22.createElement(InfiniteTableHeaderGroup, {
4505
4828
  domRef: domRef2,
4506
4829
  columns: columns2,
4507
4830
  width: widthWithColspan,
@@ -4509,7 +4832,7 @@ function InfiniteTableHeaderFn(props) {
4509
4832
  columnGroup: computedColumnGroup
4510
4833
  });
4511
4834
  }
4512
- return /* @__PURE__ */ React20.createElement(InfiniteTableHeaderCell, {
4835
+ return /* @__PURE__ */ React22.createElement(InfiniteTableHeaderCell, {
4513
4836
  domRef: domRef2,
4514
4837
  column,
4515
4838
  headerOptions,
@@ -4525,13 +4848,13 @@ function InfiniteTableHeaderFn(props) {
4525
4848
  columnGroupsMaxDepth,
4526
4849
  showColumnFilters
4527
4850
  ]);
4528
- return /* @__PURE__ */ React20.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React20.createElement(RawTable, {
4851
+ return /* @__PURE__ */ React22.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React22.createElement(RawTable, {
4529
4852
  renderCell,
4530
4853
  brain: headerBrain,
4531
4854
  cellHoverClassNames: []
4532
4855
  }));
4533
4856
  }
4534
- var InfiniteTableHeader = React20.memo(InfiniteTableHeaderFn);
4857
+ var InfiniteTableHeader = React22.memo(InfiniteTableHeaderFn);
4535
4858
 
4536
4859
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx
4537
4860
  function TableHeaderWrapper(props) {
@@ -4554,13 +4877,13 @@ function TableHeaderWrapper(props) {
4554
4877
  } = tableContextValue;
4555
4878
  const rows = !computedColumnGroups || !computedColumnGroups.size ? 1 : columnGroupsMaxDepth + 2;
4556
4879
  const height = rows * columnHeaderHeight + (showColumnFilters ? columnHeaderHeight : 0);
4557
- const columnAndGroupTreeInfo = React21.useMemo(() => {
4880
+ const columnAndGroupTreeInfo = React23.useMemo(() => {
4558
4881
  if (!computedColumnGroups || !computedColumnGroups.size) {
4559
4882
  return void 0;
4560
4883
  }
4561
4884
  return buildColumnAndGroupTree(computedVisibleColumns, computedColumnGroups, columnGroupsDepthsMap, columnGroupsMaxDepth);
4562
4885
  }, [computedVisibleColumns, computedColumnGroups, columnGroupsDepthsMap]);
4563
- const cellspan = React21.useCallback(({ rowIndex, colIndex }) => {
4886
+ const cellspan = React23.useCallback(({ rowIndex, colIndex }) => {
4564
4887
  const column = computedVisibleColumns[colIndex];
4565
4888
  const rowspan2 = 1;
4566
4889
  const colspan2 = 1;
@@ -4593,9 +4916,9 @@ function TableHeaderWrapper(props) {
4593
4916
  rows,
4594
4917
  columnGroupsDepthsMap
4595
4918
  ]);
4596
- const rowspan = React21.useCallback(({ rowIndex, colIndex }) => cellspan({ rowIndex, colIndex }).rowspan, [cellspan]);
4597
- const colspan = React21.useCallback(({ rowIndex, colIndex }) => cellspan({ rowIndex, colIndex }).colspan, [cellspan]);
4598
- const rowHeight = React21.useCallback((index) => {
4919
+ const rowspan = React23.useCallback(({ rowIndex, colIndex }) => cellspan({ rowIndex, colIndex }).rowspan, [cellspan]);
4920
+ const colspan = React23.useCallback(({ rowIndex, colIndex }) => cellspan({ rowIndex, colIndex }).colspan, [cellspan]);
4921
+ const rowHeight = React23.useCallback((index) => {
4599
4922
  return showColumnFilters ? index < rows - 1 ? columnHeaderHeight : 2 * columnHeaderHeight : columnHeaderHeight;
4600
4923
  }, [rows, showColumnFilters, columnHeaderHeight]);
4601
4924
  useMatrixBrain(brain, {
@@ -4610,21 +4933,21 @@ function TableHeaderWrapper(props) {
4610
4933
  fixedColsEnd: computedPinnedEndColumns.length,
4611
4934
  fixedColsStart: computedPinnedStartColumns.length
4612
4935
  });
4613
- const header = /* @__PURE__ */ React21.createElement(InfiniteTableHeader, {
4936
+ const header = /* @__PURE__ */ React23.createElement(InfiniteTableHeader, {
4614
4937
  columns: computedVisibleColumns,
4615
4938
  brain,
4616
4939
  columnHeaderHeight: height,
4617
4940
  columnGroupsMaxDepth,
4618
4941
  columnAndGroupTreeInfo
4619
4942
  });
4620
- const verticalScrollbarPlaceholder = scrollbars.vertical && getScrollbarWidth() ? /* @__PURE__ */ React21.createElement("div", {
4943
+ const verticalScrollbarPlaceholder = scrollbars.vertical && getScrollbarWidth() ? /* @__PURE__ */ React23.createElement("div", {
4621
4944
  className: HeaderScrollbarPlaceholderCls,
4622
4945
  style: {
4623
4946
  zIndex: 1e3,
4624
4947
  width: getScrollbarWidth()
4625
4948
  }
4626
4949
  }) : null;
4627
- return /* @__PURE__ */ React21.createElement("div", {
4950
+ return /* @__PURE__ */ React23.createElement("div", {
4628
4951
  className: HeaderWrapperCls,
4629
4952
  style: {
4630
4953
  height
@@ -4633,8 +4956,8 @@ function TableHeaderWrapper(props) {
4633
4956
  }
4634
4957
 
4635
4958
  // src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
4636
- var React22 = __toModule(require("react"));
4637
- var import_react21 = __toModule(require("react"));
4959
+ var React24 = __toModule(require("react"));
4960
+ var import_react24 = __toModule(require("react"));
4638
4961
 
4639
4962
  // src/components/utils/decamelize.ts
4640
4963
  function decamelize(str, options) {
@@ -4643,14 +4966,14 @@ function decamelize(str, options) {
4643
4966
  }
4644
4967
 
4645
4968
  // src/components/InfiniteTable/theme.css.ts
4646
- var ThemeVars = { color: { accent: "var(--infinite-accent-color)", color: "var(--infinite-color)" }, spacing: { "0": "var(--infinite-space-0)", "1": "var(--infinite-space-1)", "2": "var(--infinite-space-2)", "3": "var(--infinite-space-3)", "4": "var(--infinite-space-4)", "5": "var(--infinite-space-5)", "6": "var(--infinite-space-6)", "7": "var(--infinite-space-7)", "8": "var(--infinite-space-8)", "9": "var(--infinite-space-9)", "10": "var(--infinite-space-10)" }, fontSize: { "0": "var(--infinite-font-size-0)", "1": "var(--infinite-font-size-1)", "2": "var(--infinite-font-size-2)", "3": "var(--infinite-font-size-3)", "4": "var(--infinite-font-size-4)", "5": "var(--infinite-font-size-5)", "6": "var(--infinite-font-size-6)", "7": "var(--infinite-font-size-7)" }, fontFamily: "var(--infinite-font-family)", minHeight: "var(--infinite-min-height)", borderRadius: "var(--infinite-border-radius)", background: "var(--infinite-background)", components: { LoadMask: { padding: "var(--infinite-load-mask-padding)", color: "var(--infinite-load-mask-color)", textBackground: "var(--infinite-load-mask-text-background)", overlayBackground: "var(--infinite-load-mask-overlay-background)", overlayOpacity: "var(--infinite-load-mask-overlay-opacity)", borderRadius: "var(--infinite-load-mask-border-radius)" }, Header: { background: "var(--infinite-header-background)", color: "var(--infinite-header-color)", columnHeaderHeight: "var(--infinite-column-header-height)" }, HeaderCell: { draggingBackground: "var(--infinite-header-cell-dragging-background)", background: "var(--infinite-header-cell-background)", padding: "var(--infinite-header-cell-padding)", paddingX: "var(--infinite-header-cell-padding-x)", paddingY: "var(--infinite-header-cell-padding-y)", iconSize: "var(--infinite-header-cell-icon-size)", sortIconMargin: "var(--infinite-header-cell-sort-icon-margin)" }, Cell: { padding: "var(--infinite-cell-padding)", borderWidth: "var(--infinite-cell-border-width)", border: "var(--infinite-cell-border)", borderInvisible: "var(--infinite-cell-border-invisible)", borderRadius: "var(--infinite-cell-border-radius)", color: "var(--infinite-cell-color)" }, Row: { background: "var(--infinite-row-background)", oddBackground: "var(--infinite-row-odd-background)", hoverBackground: "var(--infinite-row-hover-background)", groupRowBackground: "var(--infinite-group-row-background)", groupRowColumnNesting: "var(--infinite-group-row-column-nesting)", groupNesting: "var(--infinite-dont-override-group-row-nesting-length)", pointerEventsWhileScrolling: "var(--infinite-row-pointer-events-while-scrolling)" }, ColumnCell: { background: "var(--infinite-column-cell-bg-dont-override)" } } };
4969
+ var ThemeVars = { color: { accent: "var(--infinite-accent-color)", color: "var(--infinite-color)" }, spacing: { "0": "var(--infinite-space-0)", "1": "var(--infinite-space-1)", "2": "var(--infinite-space-2)", "3": "var(--infinite-space-3)", "4": "var(--infinite-space-4)", "5": "var(--infinite-space-5)", "6": "var(--infinite-space-6)", "7": "var(--infinite-space-7)", "8": "var(--infinite-space-8)", "9": "var(--infinite-space-9)", "10": "var(--infinite-space-10)" }, fontSize: { "0": "var(--infinite-font-size-0)", "1": "var(--infinite-font-size-1)", "2": "var(--infinite-font-size-2)", "3": "var(--infinite-font-size-3)", "4": "var(--infinite-font-size-4)", "5": "var(--infinite-font-size-5)", "6": "var(--infinite-font-size-6)", "7": "var(--infinite-font-size-7)" }, fontFamily: "var(--infinite-font-family)", minHeight: "var(--infinite-min-height)", borderRadius: "var(--infinite-border-radius)", background: "var(--infinite-background)", components: { LoadMask: { padding: "var(--infinite-load-mask-padding)", color: "var(--infinite-load-mask-color)", textBackground: "var(--infinite-load-mask-text-background)", overlayBackground: "var(--infinite-load-mask-overlay-background)", overlayOpacity: "var(--infinite-load-mask-overlay-opacity)", borderRadius: "var(--infinite-load-mask-border-radius)" }, Header: { background: "var(--infinite-header-background)", color: "var(--infinite-header-color)", columnHeaderHeight: "var(--infinite-column-header-height)" }, HeaderCell: { draggingBackground: "var(--infinite-header-cell-dragging-background)", background: "var(--infinite-header-cell-background)", padding: "var(--infinite-header-cell-padding)", paddingX: "var(--infinite-header-cell-padding-x)", paddingY: "var(--infinite-header-cell-padding-y)", iconSize: "var(--infinite-header-cell-icon-size)", sortIconMargin: "var(--infinite-header-cell-sort-icon-margin)" }, Cell: { padding: "var(--infinite-cell-padding)", borderWidth: "var(--infinite-cell-border-width)", border: "var(--infinite-cell-border)", borderInvisible: "var(--infinite-cell-border-invisible)", borderRadius: "var(--infinite-cell-border-radius)", color: "var(--infinite-cell-color)", activeBorderColor_R: "var(--infinite-active-cell-border-color--r)", activeBorderColor_G: "var(--infinite-active-cell-border-color--g)", activeBorderColor_B: "var(--infinite-active-cell-border-color--b)", activeBackgroundAlpha: "var(--infinite-active-cell-background-alpha)", activeBackgroundAlphaWhenTableUnfocused: "var(--infinite-active-cell-background-alpha--table-unfocused)", activeBorderColor: "var(--infinite-active-cell-border-color)", activeBackgroundFromBorder: "var(--infinite-active-cell-background-from-border)", activeBackground: "var(--infinite-active-cell-background)", activeBorderWidth: "var(--infinite-active-cell-border-width)", activeBorderStyle: "var(--infinite-active-cell-border-style)", activeBorder: "var(--infinite-active-cell-border)" }, Row: { background: "var(--infinite-row-background)", oddBackground: "var(--infinite-row-odd-background)", activeBorderColor: "var(--infinite-active-row-border-color)", activeBackground: "var(--infinite-active-row-background)", activeBackgroundFromBorder: "var(--infinite-active-row-background-from-border)", activeBorderWidth: "var(--infinite-active-row-border-width)", activeBorderStyle: "var(--infinite-active-row-border-style)", activeBorder: "var(--infinite-active-row-border)", hoverBackground: "var(--infinite-row-hover-background)", groupRowBackground: "var(--infinite-group-row-background)", groupRowColumnNesting: "var(--infinite-group-row-column-nesting)", groupNesting: "var(--infinite-dont-override-group-row-nesting-length)", pointerEventsWhileScrolling: "var(--infinite-row-pointer-events-while-scrolling)" }, ColumnCell: { background: "var(--infinite-column-cell-bg-dont-override)" } } };
4647
4970
 
4648
4971
  // src/components/InfiniteTable/InfiniteCls.css.ts
4649
4972
  var import_createRuntimeFn3 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
4650
4973
  var FooterCls = "_16lm1iw1";
4651
- var InfiniteCls = "_1yeub2v0 _16lm1iw1 _16lm1iwl _16lm1iw11 _16lm1iw0";
4974
+ var InfiniteCls = "_1yeub2v0 _16lm1iw1 _16lm1iwm _16lm1iw12 _16lm1iw0";
4652
4975
  var InfiniteClsRecipe = (0, import_createRuntimeFn3.createRuntimeFn)({ defaultClassName: "", variantClassNames: { focused: { true: "_1yeub2v2", false: "_1yeub2v3" }, focusedWithin: { true: "_1yeub2v4", false: "_1yeub2v5" }, hasPinnedStart: { true: "_1yeub2v6", false: "_1yeub2v7" }, hasPinnedEnd: { true: "_1yeub2v8", false: "_1yeub2v9" }, hasPinnedStartOverflow: { true: "_1yeub2va", false: "_1yeub2vb" }, hasPinnedEndOverflow: { true: "_1yeub2vc", false: "_1yeub2vd" } }, defaultVariants: {}, compoundVariants: [] });
4653
- var InfiniteClsShiftingColumns = "_16lm1iwo";
4976
+ var InfiniteClsShiftingColumns = "_16lm1iwp";
4654
4977
  var PinnedRowsContainerClsVariants = (0, import_createRuntimeFn3.createRuntimeFn)({ defaultClassName: "", variantClassNames: { pinned: { start: "_1yeub2vh", end: "_1yeub2vi", false: "_1yeub2vj" } }, defaultVariants: {}, compoundVariants: [] });
4655
4978
 
4656
4979
  // src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
@@ -4680,10 +5003,10 @@ var enforceStyle = (node, style) => {
4680
5003
  node.style.setProperty(decamelize(propertyName), propertyValue, "important");
4681
5004
  }
4682
5005
  };
4683
- var InfiniteTableLicenseFooter = React22.forwardRef(function InfiniteTableLicenseFooter2(props, ref) {
4684
- const { rootClassName: rootClassName9 } = useInternalProps();
4685
- const domRef = React22.useRef(null);
4686
- const domCallback = React22.useCallback((node) => {
5006
+ var InfiniteTableLicenseFooter = React24.forwardRef(function InfiniteTableLicenseFooter2(props, ref) {
5007
+ const { rootClassName: rootClassName11 } = useInternalProps();
5008
+ const domRef = React24.useRef(null);
5009
+ const domCallback = React24.useCallback((node) => {
4687
5010
  domRef.current = node;
4688
5011
  if (!ref) {
4689
5012
  return;
@@ -4694,7 +5017,7 @@ var InfiniteTableLicenseFooter = React22.forwardRef(function InfiniteTableLicens
4694
5017
  ref.current = node;
4695
5018
  }
4696
5019
  }, []);
4697
- (0, import_react21.useEffect)(() => {
5020
+ (0, import_react24.useEffect)(() => {
4698
5021
  const forceStyle = () => {
4699
5022
  requestAnimationFrame(() => {
4700
5023
  var _a;
@@ -4708,12 +5031,12 @@ var InfiniteTableLicenseFooter = React22.forwardRef(function InfiniteTableLicens
4708
5031
  clearInterval(intervalId);
4709
5032
  };
4710
5033
  }, []);
4711
- return /* @__PURE__ */ React22.createElement("div", __spreadProps(__spreadValues({
5034
+ return /* @__PURE__ */ React24.createElement("div", __spreadProps(__spreadValues({
4712
5035
  ref: domCallback
4713
5036
  }, props), {
4714
- className: join(`${rootClassName9}-Footer`, FooterCls, props.className),
5037
+ className: join(`${rootClassName11}-Footer`, FooterCls, props.className),
4715
5038
  style: defaultStyle
4716
- }), "Powered by", " ", /* @__PURE__ */ React22.createElement("a", {
5039
+ }), "Powered by", " ", /* @__PURE__ */ React24.createElement("a", {
4717
5040
  href: "https://infinite-table.com",
4718
5041
  rel: "noopener noreferrer",
4719
5042
  role: "link",
@@ -4722,11 +5045,11 @@ var InfiniteTableLicenseFooter = React22.forwardRef(function InfiniteTableLicens
4722
5045
  });
4723
5046
 
4724
5047
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx
4725
- var React23 = __toModule(require("react"));
4726
- var import_react22 = __toModule(require("react"));
4727
- var { rootClassName: rootClassName7 } = internalProps;
4728
- var InfiniteTableColumnCellContext = React23.createContext(null);
4729
- var InfiniteTableColumnCellClassName = `${rootClassName7}ColumnCell`;
5048
+ var React25 = __toModule(require("react"));
5049
+ var import_react25 = __toModule(require("react"));
5050
+ var { rootClassName: rootClassName9 } = internalProps;
5051
+ var InfiniteTableColumnCellContext = React25.createContext(null);
5052
+ var InfiniteTableColumnCellClassName = `${rootClassName9}ColumnCell`;
4730
5053
  function isColumnWithField(c) {
4731
5054
  return typeof c.field === "string";
4732
5055
  }
@@ -4750,7 +5073,7 @@ function InfiniteTableColumnCellFn(props) {
4750
5073
  showZebraRows
4751
5074
  } = props;
4752
5075
  if (!column) {
4753
- return /* @__PURE__ */ React23.createElement("div", {
5076
+ return /* @__PURE__ */ React25.createElement("div", {
4754
5077
  ref: domRef
4755
5078
  }, "no column");
4756
5079
  }
@@ -4778,17 +5101,35 @@ function InfiniteTableColumnCellFn(props) {
4778
5101
  value
4779
5102
  });
4780
5103
  }
5104
+ const { getState, componentActions } = useInfiniteTable();
5105
+ const { activeRowIndex } = getState();
5106
+ const rowActive = rowIndex === activeRowIndex;
5107
+ const onClick = (0, import_react25.useCallback)(() => {
5108
+ const { activeRowIndex: activeRowIndex2, activeCellIndex } = getState();
5109
+ if (activeRowIndex2 != null) {
5110
+ componentActions.activeRowIndex = rowIndex;
5111
+ return;
5112
+ }
5113
+ if (activeCellIndex != null) {
5114
+ componentActions.activeCellIndex = [
5115
+ rowIndex,
5116
+ column.computedVisibleIndex
5117
+ ];
5118
+ }
5119
+ }, [rowIndex, column.computedVisibleIndex]);
4781
5120
  const { componentState: computedDataSource } = useDataSourceContextValue();
4782
5121
  const rest = rowInfo.isGroupRow ? {
4783
5122
  rowInfo,
4784
5123
  isGroupRow: rowInfo.isGroupRow,
4785
5124
  data: rowInfo.data,
5125
+ rowActive,
4786
5126
  value,
4787
5127
  field: column.field
4788
5128
  } : {
4789
5129
  rowInfo,
4790
5130
  isGroupRow: rowInfo.isGroupRow,
4791
5131
  data: rowInfo.data,
5132
+ rowActive,
4792
5133
  value,
4793
5134
  field: column.field
4794
5135
  };
@@ -4804,28 +5145,28 @@ function InfiniteTableColumnCellFn(props) {
4804
5145
  isGroupRow,
4805
5146
  rowIndex,
4806
5147
  toggleGroupRow,
4807
- toggleCurrentGroupRow: () => {
5148
+ toggleCurrentGroupRow: (0, import_react25.useCallback)(() => {
4808
5149
  if (!rowInfo.isGroupRow) {
4809
5150
  return;
4810
5151
  }
4811
5152
  toggleGroupRow(rowInfo.groupKeys);
4812
- },
5153
+ }, []),
4813
5154
  groupBy: computedDataSource.groupBy,
4814
5155
  pivotBy: computedDataSource.pivotBy
4815
5156
  });
4816
- const renderChildren = () => {
5157
+ const renderChildren = (0, import_react25.useCallback)(() => {
4817
5158
  if (hidden) {
4818
5159
  return null;
4819
5160
  }
4820
5161
  const renderFn = column.render || column.renderValue;
4821
5162
  if (renderFn) {
4822
- return /* @__PURE__ */ React23.createElement(RenderHookComponent, {
5163
+ return /* @__PURE__ */ React25.createElement(RenderHookComponent, {
4823
5164
  render: renderFn,
4824
5165
  renderParam
4825
5166
  });
4826
5167
  }
4827
5168
  return renderValue;
4828
- };
5169
+ }, [column, hidden, ...Object.values(renderParam)]);
4829
5170
  const rowPropsAndStyleArgs = __spreadProps(__spreadValues({}, rest), {
4830
5171
  rowIndex
4831
5172
  });
@@ -4838,6 +5179,7 @@ function InfiniteTableColumnCellFn(props) {
4838
5179
  style = column.style ? typeof column.style === "function" ? __spreadValues(__spreadValues({}, style), column.style(stylingRenderParam) || {}) : __spreadValues(__spreadValues({}, style), column.style) : style || {};
4839
5180
  style.width = width;
4840
5181
  style.height = rowHeight;
5182
+ const memoizedStyle = (0, import_react25.useMemo)(() => style, [!style ? null : JSON.stringify(style)]);
4841
5183
  const odd = (rowInfo.indexInAll != null ? rowInfo.indexInAll : rowIndex) % 2 === 1;
4842
5184
  const zebra = showZebraRows ? odd ? "odd" : "even" : false;
4843
5185
  const cellProps = {
@@ -4847,21 +5189,22 @@ function InfiniteTableColumnCellFn(props) {
4847
5189
  column,
4848
5190
  width,
4849
5191
  offset: virtualized ? 0 : column.computedPinningOffset,
4850
- style,
5192
+ style: memoizedStyle,
4851
5193
  onMouseLeave,
4852
5194
  onMouseEnter,
5195
+ onClick,
4853
5196
  cssEllipsis: (_a = column.cssEllipsis) != null ? _a : true,
4854
- className: join(useCellClassName(column, [InfiniteTableColumnCellClassName, InfiniteTableCellClassName], ColumnCellRecipe, { dragging: false, zebra }), colClassName, rowComputedClassName),
5197
+ className: join(useCellClassName(column, [InfiniteTableColumnCellClassName, InfiniteTableCellClassName], ColumnCellRecipe, { dragging: false, zebra, rowActive }), colClassName, rowComputedClassName),
4855
5198
  renderChildren
4856
5199
  };
4857
5200
  const ContextProvider = InfiniteTableColumnCellContext.Provider;
4858
- return /* @__PURE__ */ React23.createElement(ContextProvider, {
5201
+ return /* @__PURE__ */ React25.createElement(ContextProvider, {
4859
5202
  value: renderParam
4860
- }, /* @__PURE__ */ React23.createElement(InfiniteTableCell, __spreadValues({}, cellProps)));
5203
+ }, /* @__PURE__ */ React25.createElement(InfiniteTableCell, __spreadValues({}, cellProps)));
4861
5204
  }
4862
- var InfiniteTableColumnCell = React23.memo(InfiniteTableColumnCellFn);
5205
+ var InfiniteTableColumnCell = React25.memo(InfiniteTableColumnCellFn);
4863
5206
  function useInfiniteColumnCell() {
4864
- const result = (0, import_react22.useContext)(InfiniteTableColumnCellContext);
5207
+ const result = (0, import_react25.useContext)(InfiniteTableColumnCellContext);
4865
5208
  return result;
4866
5209
  }
4867
5210
 
@@ -4872,30 +5215,92 @@ var RowClsRecipe = (0, import_createRuntimeFn4.createRuntimeFn)({ defaultClassNa
4872
5215
  var RowHoverCls = "_7pupv01";
4873
5216
 
4874
5217
  // src/components/InfiniteTable/components/LoadMask.tsx
4875
- var React24 = __toModule(require("react"));
5218
+ var React26 = __toModule(require("react"));
4876
5219
 
4877
5220
  // src/components/InfiniteTable/components/LoadMask.css.ts
4878
- var LoadMaskCls = { visible: "qy58ya1 qy58ya0 _16lm1iw2 _16lm1iwt _16lm1iwv _16lm1iwz _16lm1iwx", hidden: "qy58ya2 qy58ya0 _16lm1iw2 _16lm1iwt _16lm1iwv _16lm1iwz _16lm1iwx" };
4879
- var LoadMaskOverlayCls = "qy58ya3 _16lm1iw2 _16lm1iwt _16lm1iwv _16lm1iwz _16lm1iwx";
5221
+ var LoadMaskCls = { visible: "qy58ya1 qy58ya0 _16lm1iw2 _16lm1iwu _16lm1iww _16lm1iw10 _16lm1iwy", hidden: "qy58ya2 qy58ya0 _16lm1iw2 _16lm1iwu _16lm1iww _16lm1iw10 _16lm1iwy" };
5222
+ var LoadMaskOverlayCls = "qy58ya3 _16lm1iw2 _16lm1iwu _16lm1iww _16lm1iw10 _16lm1iwy";
4880
5223
  var LoadMaskTextCls = "qy58ya4";
4881
5224
 
4882
5225
  // src/components/InfiniteTable/components/LoadMask.tsx
4883
- var { rootClassName: rootClassName8 } = internalProps;
4884
- var baseCls = `${rootClassName8}-LoadMask`;
5226
+ var { rootClassName: rootClassName10 } = internalProps;
5227
+ var baseCls3 = `${rootClassName10}-LoadMask`;
4885
5228
  function LoadMaskFn(props) {
4886
5229
  const { visible, children = "Loading" } = props;
4887
- return /* @__PURE__ */ React24.createElement("div", {
4888
- className: `${LoadMaskCls[visible ? "visible" : "hidden"]} ${baseCls}`
4889
- }, /* @__PURE__ */ React24.createElement("div", {
4890
- className: `${LoadMaskOverlayCls} ${baseCls}-Overlay`
4891
- }), /* @__PURE__ */ React24.createElement("div", {
4892
- className: `${LoadMaskTextCls} ${baseCls}-Text`
5230
+ return /* @__PURE__ */ React26.createElement("div", {
5231
+ className: `${LoadMaskCls[visible ? "visible" : "hidden"]} ${baseCls3}`
5232
+ }, /* @__PURE__ */ React26.createElement("div", {
5233
+ className: `${LoadMaskOverlayCls} ${baseCls3}-Overlay`
5234
+ }), /* @__PURE__ */ React26.createElement("div", {
5235
+ className: `${LoadMaskTextCls} ${baseCls3}-Text`
4893
5236
  }, children));
4894
5237
  }
4895
- var LoadMask = React24.memo(LoadMaskFn);
5238
+ var LoadMask = React26.memo(LoadMaskFn);
5239
+
5240
+ // src/components/InfiniteTable/getImperativeApi.ts
5241
+ function getImperativeApi(getState, getComputed, getDataSourceState, componentActions) {
5242
+ const imperativeApi = {
5243
+ setColumnOrder: (columnOrder) => {
5244
+ componentActions.columnOrder = columnOrder;
5245
+ },
5246
+ setColumnVisibility: (columnVisibility) => {
5247
+ componentActions.columnVisibility = columnVisibility;
5248
+ },
5249
+ getState,
5250
+ getDataSourceState,
5251
+ scrollRowIntoView(rowIndex, config = { offset: 0 }) {
5252
+ const state = getState();
5253
+ const scrollPosition = state.renderer.getScrollPositionForScrollRowIntoView(rowIndex, config);
5254
+ const currentScrollPosition = state.brain.getScrollPosition();
5255
+ if (scrollPosition.scrollTop !== currentScrollPosition.scrollTop) {
5256
+ state.scrollerDOMRef.current.scrollTop = scrollPosition.scrollTop;
5257
+ }
5258
+ },
5259
+ scrollColumnIntoView(colId, config = { offset: 0 }) {
5260
+ const state = getState();
5261
+ const computed = getComputed();
5262
+ const computedColumn = computed.computedVisibleColumnsMap.get(colId);
5263
+ if (!computedColumn) {
5264
+ return;
5265
+ }
5266
+ const colIndex = computedColumn.computedVisibleIndex;
5267
+ const scrollPosition = state.renderer.getScrollPositionForScrollColumnIntoView(colIndex, config);
5268
+ const currentScrollPosition = state.brain.getScrollPosition();
5269
+ if (scrollPosition.scrollLeft !== currentScrollPosition.scrollLeft) {
5270
+ state.scrollerDOMRef.current.scrollLeft = scrollPosition.scrollLeft;
5271
+ }
5272
+ },
5273
+ scrollCellIntoView(rowIndex, colIdOrIndex, config = { offset: 0 }) {
5274
+ const state = getState();
5275
+ const computed = getComputed();
5276
+ let colIndex = colIdOrIndex;
5277
+ if (typeof colIdOrIndex === "string") {
5278
+ const computedColumn = computed.computedVisibleColumnsMap.get(colIdOrIndex);
5279
+ if (!computedColumn) {
5280
+ return;
5281
+ }
5282
+ colIndex = computedColumn.computedVisibleIndex;
5283
+ }
5284
+ const scrollPositionForCol = state.renderer.getScrollPositionForScrollColumnIntoView(colIndex, config);
5285
+ const scrollPositionForRow = state.renderer.getScrollPositionForScrollRowIntoView(rowIndex, config);
5286
+ const newScrollPosition = {
5287
+ scrollLeft: scrollPositionForCol.scrollLeft,
5288
+ scrollTop: scrollPositionForRow.scrollTop
5289
+ };
5290
+ const currentScrollPosition = state.brain.getScrollPosition();
5291
+ if (newScrollPosition.scrollLeft !== currentScrollPosition.scrollLeft) {
5292
+ state.scrollerDOMRef.current.scrollLeft = newScrollPosition.scrollLeft;
5293
+ }
5294
+ if (newScrollPosition.scrollTop !== currentScrollPosition.scrollTop) {
5295
+ state.scrollerDOMRef.current.scrollTop = newScrollPosition.scrollTop;
5296
+ }
5297
+ }
5298
+ };
5299
+ return imperativeApi;
5300
+ }
4896
5301
 
4897
5302
  // src/components/InfiniteTable/hooks/useAutoSizeColumns.ts
4898
- var import_react23 = __toModule(require("react"));
5303
+ var import_react26 = __toModule(require("react"));
4899
5304
  var OFFSET = 10;
4900
5305
  function getColumnContentMaxWidths(domRef, options) {
4901
5306
  var _a;
@@ -4955,11 +5360,11 @@ function useAutoSizeColumns() {
4955
5360
  componentActions,
4956
5361
  componentState: { domRef, ready, autoSizeColumnsKey, brain }
4957
5362
  } = useComponentState();
4958
- const [refreshId, setRefreshId] = (0, import_react23.useState)(0);
5363
+ const [refreshId, setRefreshId] = (0, import_react26.useState)(0);
4959
5364
  const theKey = typeof autoSizeColumnsKey === "object" ? autoSizeColumnsKey.key : autoSizeColumnsKey;
4960
5365
  const getTheKey = useLatest(theKey);
4961
- const lastExecutedIdentifierRef = (0, import_react23.useRef)(null);
4962
- (0, import_react23.useEffect)(() => {
5366
+ const lastExecutedIdentifierRef = (0, import_react26.useRef)(null);
5367
+ (0, import_react26.useEffect)(() => {
4963
5368
  const key = getTheKey();
4964
5369
  if (key == null) {
4965
5370
  return;
@@ -4972,7 +5377,7 @@ function useAutoSizeColumns() {
4972
5377
  };
4973
5378
  return brain.onRenderRangeChange(onChange);
4974
5379
  }, [brain]);
4975
- (0, import_react23.useEffect)(() => {
5380
+ (0, import_react26.useEffect)(() => {
4976
5381
  var _a;
4977
5382
  if (theKey == null) {
4978
5383
  return;
@@ -5017,20 +5422,8 @@ function useAutoSizeColumns() {
5017
5422
  }
5018
5423
 
5019
5424
  // src/components/InfiniteTable/hooks/useCellRendering.tsx
5020
- var import_react25 = __toModule(require("react"));
5021
- var import_react26 = __toModule(require("react"));
5022
-
5023
- // src/components/hooks/useRerender.ts
5024
- var import_react24 = __toModule(require("react"));
5025
- var useRerender = () => {
5026
- const [state, setState] = (0, import_react24.useState)(0);
5027
- return [
5028
- state,
5029
- (0, import_react24.useCallback)(() => {
5030
- setState((state2) => state2 + 1);
5031
- }, [setState])
5032
- ];
5033
- };
5425
+ var import_react27 = __toModule(require("react"));
5426
+ var import_react28 = __toModule(require("react"));
5034
5427
 
5035
5428
  // src/components/InfiniteTable/hooks/useYourBrain.ts
5036
5429
  function useYourBrain(param) {
@@ -5060,7 +5453,7 @@ function useYourBrain(param) {
5060
5453
  // src/components/InfiniteTable/hooks/useCellRendering.tsx
5061
5454
  var SCROLL_BOTTOM_OFFSET = 1;
5062
5455
  function useCellRendering(param) {
5063
- const { computed, bodySize } = param;
5456
+ const { computed, bodySize, imperativeApi } = param;
5064
5457
  const { componentActions, componentState, getState } = useInfiniteTable();
5065
5458
  const {
5066
5459
  computedPinnedStartColumns,
@@ -5100,13 +5493,13 @@ function useCellRendering(param) {
5100
5493
  bodySize,
5101
5494
  rowspan
5102
5495
  });
5103
- const scrollTopMaxRef = (0, import_react25.useRef)(0);
5104
- (0, import_react25.useEffect)(() => {
5496
+ const scrollTopMaxRef = (0, import_react27.useRef)(0);
5497
+ (0, import_react27.useEffect)(() => {
5105
5498
  return brain.onRenderCountChange(() => {
5106
5499
  scrollTopMaxRef.current = brain.scrollTopMax;
5107
5500
  });
5108
5501
  }, [brain]);
5109
- (0, import_react25.useEffect)(() => {
5502
+ (0, import_react27.useEffect)(() => {
5110
5503
  return brain.onScrollStop((scrollPosition) => {
5111
5504
  const { scrollTop } = scrollPosition;
5112
5505
  if (scrollTop === 0) {
@@ -5123,31 +5516,21 @@ function useCellRendering(param) {
5123
5516
  }
5124
5517
  });
5125
5518
  }, [brain, onScrollToTop, onScrollToBottom]);
5126
- (0, import_react25.useEffect)(() => {
5519
+ (0, import_react27.useEffect)(() => {
5127
5520
  if (!bodySize.height) {
5128
5521
  return;
5129
5522
  }
5130
5523
  const { onReady } = getState();
5131
5524
  componentActions.ready = true;
5132
5525
  if (onReady) {
5133
- const imperativeApi = {
5134
- setColumnOrder: (columnOrder) => {
5135
- componentActions.columnOrder = columnOrder;
5136
- },
5137
- setColumnVisibility: (columnVisibility) => {
5138
- componentActions.columnVisibility = columnVisibility;
5139
- },
5140
- getState,
5141
- getDataSourceState
5142
- };
5143
5526
  onReady(imperativeApi);
5144
5527
  }
5145
5528
  }, [!!bodySize.height]);
5146
5529
  const [, rerender] = useRerender();
5147
- (0, import_react25.useEffect)(() => {
5530
+ (0, import_react27.useEffect)(() => {
5148
5531
  rerender();
5149
5532
  }, [dataSourceState]);
5150
- const renderCell = (0, import_react25.useCallback)((params) => {
5533
+ const renderCell = (0, import_react27.useCallback)((params) => {
5151
5534
  const {
5152
5535
  rowIndex,
5153
5536
  colIndex,
@@ -5182,7 +5565,7 @@ function useCellRendering(param) {
5182
5565
  rowStyle,
5183
5566
  rowClassName
5184
5567
  };
5185
- return /* @__PURE__ */ import_react26.default.createElement(InfiniteTableColumnCell, __spreadValues({}, cellProps));
5568
+ return /* @__PURE__ */ import_react28.default.createElement(InfiniteTableColumnCell, __spreadValues({}, cellProps));
5186
5569
  }, [
5187
5570
  rowHeight,
5188
5571
  getData,
@@ -5200,13 +5583,13 @@ function useCellRendering(param) {
5200
5583
  }
5201
5584
 
5202
5585
  // src/components/InfiniteTable/hooks/useComputed.ts
5203
- var import_react40 = __toModule(require("react"));
5586
+ var import_react42 = __toModule(require("react"));
5204
5587
 
5205
5588
  // src/components/InfiniteTable/hooks/useColumnGroups.ts
5206
- var import_react28 = __toModule(require("react"));
5589
+ var import_react30 = __toModule(require("react"));
5207
5590
 
5208
5591
  // src/components/hooks/useInterceptedMap.ts
5209
- var import_react27 = __toModule(require("react"));
5592
+ var import_react29 = __toModule(require("react"));
5210
5593
  function interceptMap(map2, fns) {
5211
5594
  const { set, delete: deleteKey, clear } = map2;
5212
5595
  if (fns.set) {
@@ -5294,7 +5677,7 @@ function useColumnGroups() {
5294
5677
  componentActions,
5295
5678
  getComponentState
5296
5679
  } = useComponentState();
5297
- (0, import_react28.useEffect)(() => {
5680
+ (0, import_react30.useEffect)(() => {
5298
5681
  const recompute = () => {
5299
5682
  componentActions.columnGroupsDepthsMap = computeColumnGroupsDepths(computedColumnGroups);
5300
5683
  };
@@ -5305,7 +5688,7 @@ function useColumnGroups() {
5305
5688
  set: update
5306
5689
  });
5307
5690
  }, [computedColumnGroups]);
5308
- (0, import_react28.useEffect)(() => {
5691
+ (0, import_react30.useEffect)(() => {
5309
5692
  return interceptMap(collapsedColumnGroups, {
5310
5693
  set: (key, visibleCol) => {
5311
5694
  const colIds = key.slice(1);
@@ -5340,10 +5723,10 @@ function useColumnGroups() {
5340
5723
  }
5341
5724
 
5342
5725
  // src/components/InfiniteTable/hooks/useColumnRowspan.ts
5343
- var import_react29 = __toModule(require("react"));
5726
+ var import_react31 = __toModule(require("react"));
5344
5727
  function useColumnRowspan(computedVisibleColumns) {
5345
5728
  const { getState: getDataSourceState } = useDataSourceContextValue();
5346
- const rowspan = (0, import_react29.useMemo)(() => {
5729
+ const rowspan = (0, import_react31.useMemo)(() => {
5347
5730
  const colsWithRowspan = computedVisibleColumns.filter((col) => typeof col.rowspan === "function");
5348
5731
  return colsWithRowspan.length ? ({ rowIndex, colIndex }) => {
5349
5732
  const dataArray = getDataSourceState().dataArray;
@@ -5369,10 +5752,10 @@ function useColumnRowspan(computedVisibleColumns) {
5369
5752
  }
5370
5753
 
5371
5754
  // src/components/InfiniteTable/hooks/useColumnSizeFn.ts
5372
- var import_react30 = __toModule(require("react"));
5755
+ var import_react32 = __toModule(require("react"));
5373
5756
  var debug4 = dbg("useColumnSizeFn");
5374
5757
  function useColumnSizeFn(columns) {
5375
- const columnSize = (0, import_react30.useCallback)((index) => {
5758
+ const columnSize = (0, import_react32.useCallback)((index) => {
5376
5759
  const column = columns[index];
5377
5760
  if (!column) {
5378
5761
  debug4("cannot find column at index", index, columns);
@@ -5383,10 +5766,10 @@ function useColumnSizeFn(columns) {
5383
5766
  }
5384
5767
 
5385
5768
  // src/components/InfiniteTable/hooks/useColumnsWhen.ts
5386
- var import_react36 = __toModule(require("react"));
5769
+ var import_react38 = __toModule(require("react"));
5387
5770
 
5388
5771
  // src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
5389
- var React28 = __toModule(require("react"));
5772
+ var React30 = __toModule(require("react"));
5390
5773
 
5391
5774
  // src/utils/stripVar.ts
5392
5775
  function stripVar(cssVariableWithVarString) {
@@ -5402,19 +5785,19 @@ var showLoadingIcon = (rowInfo) => {
5402
5785
  };
5403
5786
 
5404
5787
  // src/components/InfiniteTable/components/icons/ExpanderIcon.tsx
5405
- var React26 = __toModule(require("react"));
5406
- var import_react31 = __toModule(require("react"));
5788
+ var React28 = __toModule(require("react"));
5789
+ var import_react33 = __toModule(require("react"));
5407
5790
 
5408
5791
  // src/components/InfiniteTable/components/icons/ExpanderIcon.css.ts
5409
5792
  var import_createRuntimeFn5 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
5410
- var ExpanderIconCls = "_16lm1iw6 _16lm1iwf _16lm1iwd";
5793
+ var ExpanderIconCls = "_16lm1iw6 _16lm1iwg _16lm1iwd";
5411
5794
  var ExpanderIconClsVariants = (0, import_createRuntimeFn5.createRuntimeFn)({ defaultClassName: "", variantClassNames: { expanded: { true: "_16lm1iwc", false: "_198z9782" } }, defaultVariants: {}, compoundVariants: [] });
5412
5795
 
5413
5796
  // src/components/InfiniteTable/components/icons/ExpanderIcon.tsx
5414
5797
  function ExpanderIcon(props) {
5415
5798
  var _a;
5416
5799
  const { size = 24 } = props;
5417
- const [expanded, setExpanded] = (0, import_react31.useState)((_a = props.expanded) != null ? _a : props.defaultExpanded);
5800
+ const [expanded, setExpanded] = (0, import_react33.useState)((_a = props.expanded) != null ? _a : props.defaultExpanded);
5418
5801
  const onClick = () => {
5419
5802
  var _a2;
5420
5803
  (_a2 = props.onChange) == null ? void 0 : _a2.call(props, !expanded);
@@ -5422,12 +5805,12 @@ function ExpanderIcon(props) {
5422
5805
  setExpanded(!expanded);
5423
5806
  }
5424
5807
  };
5425
- React26.useEffect(() => {
5808
+ React28.useEffect(() => {
5426
5809
  if (isControlled("expanded", props)) {
5427
5810
  setExpanded(props.expanded);
5428
5811
  }
5429
5812
  }, [props.expanded]);
5430
- return /* @__PURE__ */ React26.createElement("svg", {
5813
+ return /* @__PURE__ */ React28.createElement("svg", {
5431
5814
  "data-name": "expander-icon",
5432
5815
  xmlns: "http://www.w3.org/2000/svg",
5433
5816
  height: `${size}px`,
@@ -5438,20 +5821,20 @@ function ExpanderIcon(props) {
5438
5821
  className: join(props.className, ExpanderIconCls, ExpanderIconClsVariants({
5439
5822
  expanded
5440
5823
  }), "InfiniteIcon", "InfiniteIcon-expander", `InfiniteIcon-expander--${expanded ? "expanded" : "collapsed"}`)
5441
- }, /* @__PURE__ */ React26.createElement("path", {
5824
+ }, /* @__PURE__ */ React28.createElement("path", {
5442
5825
  d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"
5443
5826
  }));
5444
5827
  }
5445
5828
 
5446
5829
  // src/components/InfiniteTable/components/icons/LoadingIcon.tsx
5447
- var React27 = __toModule(require("react"));
5830
+ var React29 = __toModule(require("react"));
5448
5831
 
5449
5832
  // src/components/InfiniteTable/components/icons/LoadingIcon.css.ts
5450
- var LoadingIconCls = "_16lm1iw8 _16lm1iwf _16lm1iwd";
5833
+ var LoadingIconCls = "_16lm1iw8 _16lm1iwg _16lm1iwd";
5451
5834
 
5452
5835
  // src/components/InfiniteTable/components/icons/LoadingIcon.tsx
5453
5836
  var LoadingIcon = (props) => {
5454
- return /* @__PURE__ */ React27.createElement("svg", {
5837
+ return /* @__PURE__ */ React29.createElement("svg", {
5455
5838
  xmlns: "http://www.w3.org/2000/svg",
5456
5839
  style: {
5457
5840
  margin: "auto",
@@ -5463,14 +5846,14 @@ var LoadingIcon = (props) => {
5463
5846
  viewBox: "0 0 100 100",
5464
5847
  preserveAspectRatio: "xMidYMid",
5465
5848
  className: join(props.className, LoadingIconCls, "InfiniteIcon", "InfiniteIcon-loading")
5466
- }, /* @__PURE__ */ React27.createElement("circle", {
5849
+ }, /* @__PURE__ */ React29.createElement("circle", {
5467
5850
  cx: "50",
5468
5851
  cy: "50",
5469
5852
  fill: "none",
5470
5853
  strokeWidth: "10",
5471
5854
  r: "35",
5472
5855
  strokeDasharray: "164.93361431346415 56.97787143782138"
5473
- }, /* @__PURE__ */ React27.createElement("animateTransform", {
5856
+ }, /* @__PURE__ */ React29.createElement("animateTransform", {
5474
5857
  attributeName: "transform",
5475
5858
  type: "rotate",
5476
5859
  repeatCount: "indefinite",
@@ -5490,7 +5873,7 @@ function getGroupColumnRender({
5490
5873
  var _a, _b, _c;
5491
5874
  let { value, rowInfo, column, groupBy, pivotBy } = renderOptions;
5492
5875
  if (column.renderValue) {
5493
- value = /* @__PURE__ */ React28.createElement(RenderHookComponent, {
5876
+ value = /* @__PURE__ */ React30.createElement(RenderHookComponent, {
5494
5877
  render: column.renderValue,
5495
5878
  renderParam: renderOptions
5496
5879
  });
@@ -5520,22 +5903,22 @@ function getGroupColumnRender({
5520
5903
  const showExpanderIcon = pivotBy ? (((_b = groupRowInfo.groupKeys) == null ? void 0 : _b.length) || 0) < (groupBy == null ? void 0 : groupBy.length) : (((_c = groupRowInfo.groupKeys) == null ? void 0 : _c.length) || 0) <= (groupBy == null ? void 0 : groupBy.length);
5521
5904
  const isLoading = showLoadingIcon(groupRowInfo);
5522
5905
  if (isLoading) {
5523
- icon = /* @__PURE__ */ React28.createElement(LoadingIcon, null);
5906
+ icon = /* @__PURE__ */ React30.createElement(LoadingIcon, null);
5524
5907
  } else if (showExpanderIcon) {
5525
- const defaultIcon = /* @__PURE__ */ React28.createElement(ExpanderIcon, {
5908
+ const defaultIcon = /* @__PURE__ */ React30.createElement(ExpanderIcon, {
5526
5909
  expanded: !collapsed,
5527
5910
  onChange: () => {
5528
5911
  toggleGroupRow(groupKeys);
5529
5912
  }
5530
5913
  });
5531
- icon = column.renderGroupIcon ? /* @__PURE__ */ React28.createElement(RenderHookComponent, {
5914
+ icon = column.renderGroupIcon ? /* @__PURE__ */ React30.createElement(RenderHookComponent, {
5532
5915
  render: column.renderGroupIcon,
5533
5916
  renderParam: Object.assign({ collapsed, groupIcon: defaultIcon }, renderOptions)
5534
5917
  }) : defaultIcon;
5535
5918
  }
5536
- return /* @__PURE__ */ React28.createElement("div", {
5919
+ return /* @__PURE__ */ React30.createElement("div", {
5537
5920
  className: join(display.flex, alignItems.center)
5538
- }, icon, /* @__PURE__ */ React28.createElement("div", {
5921
+ }, icon, /* @__PURE__ */ React30.createElement("div", {
5539
5922
  className: cssEllipsisClassName
5540
5923
  }, value != null ? value : null));
5541
5924
  };
@@ -5580,9 +5963,9 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
5580
5963
  const showExpanderIcon = rowInfo.isGroupRow ? pivotBy ? (((_a = rowInfo.groupKeys) == null ? void 0 : _a.length) || 0) < (groupBy == null ? void 0 : groupBy.length) : (((_b = rowInfo.groupKeys) == null ? void 0 : _b.length) || 0) <= (groupBy == null ? void 0 : groupBy.length) : false;
5581
5964
  const isLoading = showLoadingIcon(rowInfo);
5582
5965
  if (isLoading) {
5583
- icon = /* @__PURE__ */ React28.createElement(LoadingIcon, null);
5966
+ icon = /* @__PURE__ */ React30.createElement(LoadingIcon, null);
5584
5967
  } else if (showExpanderIcon) {
5585
- const defaultIcon = /* @__PURE__ */ React28.createElement(ExpanderIcon, {
5968
+ const defaultIcon = /* @__PURE__ */ React30.createElement(ExpanderIcon, {
5586
5969
  expanded: !collapsed,
5587
5970
  onChange: () => {
5588
5971
  if (!rowInfo.isGroupRow) {
@@ -5597,9 +5980,9 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
5597
5980
  icon = column.renderGroupIcon(renderParam);
5598
5981
  }
5599
5982
  }
5600
- return /* @__PURE__ */ React28.createElement("div", {
5983
+ return /* @__PURE__ */ React30.createElement("div", {
5601
5984
  className: join(display.flex, alignItems.center, GroupRowExpanderCls)
5602
- }, icon, /* @__PURE__ */ React28.createElement("div", {
5985
+ }, icon, /* @__PURE__ */ React30.createElement("div", {
5603
5986
  className: cssEllipsisClassName
5604
5987
  }, value != null ? value : null));
5605
5988
  }
@@ -5615,11 +5998,11 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
5615
5998
  }
5616
5999
 
5617
6000
  // src/components/InfiniteTable/hooks/useEffectWithRaf.ts
5618
- var import_react32 = __toModule(require("react"));
6001
+ var import_react34 = __toModule(require("react"));
5619
6002
  function useEffectWithRaf(fn, deps) {
5620
- const rafId = (0, import_react32.useRef)(0);
5621
- const removeFnRaf = (0, import_react32.useRef)();
5622
- (0, import_react32.useEffect)(() => {
6003
+ const rafId = (0, import_react34.useRef)(0);
6004
+ const removeFnRaf = (0, import_react34.useRef)();
6005
+ (0, import_react34.useEffect)(() => {
5623
6006
  rafId.current = requestAnimationFrame(() => {
5624
6007
  removeFnRaf.current = fn();
5625
6008
  });
@@ -5636,7 +6019,7 @@ function useEffectWithRaf(fn, deps) {
5636
6019
  }
5637
6020
 
5638
6021
  // src/components/InfiniteTable/hooks/useToggleGroupRow.ts
5639
- var import_react35 = __toModule(require("react"));
6022
+ var import_react37 = __toModule(require("react"));
5640
6023
 
5641
6024
  // src/utils/groupAndPivot/index.ts
5642
6025
  var LAZY_ROOT_KEY_FOR_GROUPS = "____root____";
@@ -6089,7 +6472,7 @@ function enhancedFlatten(param) {
6089
6472
  }
6090
6473
 
6091
6474
  // src/components/DataSource/index.tsx
6092
- var React29 = __toModule(require("react"));
6475
+ var React31 = __toModule(require("react"));
6093
6476
 
6094
6477
  // src/utils/multisort/sortTypes.ts
6095
6478
  var numberComparator = function(first, second) {
@@ -6277,15 +6660,15 @@ var GroupRowsState = class {
6277
6660
  };
6278
6661
 
6279
6662
  // src/components/DataSource/privateHooks/useLoadData.ts
6280
- var import_react34 = __toModule(require("react"));
6663
+ var import_react36 = __toModule(require("react"));
6281
6664
 
6282
6665
  // src/components/hooks/useEffectWithChanges.ts
6283
- var import_react33 = __toModule(require("react"));
6666
+ var import_react35 = __toModule(require("react"));
6284
6667
  function useEffectWithChanges(fn, deps) {
6285
- const prevRef = (0, import_react33.useRef)({});
6286
- const oldValuesRef = (0, import_react33.useRef)({});
6668
+ const prevRef = (0, import_react35.useRef)({});
6669
+ const oldValuesRef = (0, import_react35.useRef)({});
6287
6670
  const oldValues = oldValuesRef.current;
6288
- const changesRef = (0, import_react33.useRef)({});
6671
+ const changesRef = (0, import_react35.useRef)({});
6289
6672
  const changes = changesRef.current;
6290
6673
  const useEffectDeps = [];
6291
6674
  for (const k in deps) {
@@ -6298,7 +6681,7 @@ function useEffectWithChanges(fn, deps) {
6298
6681
  }
6299
6682
  }
6300
6683
  prevRef.current = deps;
6301
- (0, import_react33.useEffect)(() => {
6684
+ (0, import_react35.useEffect)(() => {
6302
6685
  const changes2 = changesRef.current;
6303
6686
  const result = fn(changes2, oldValues);
6304
6687
  changesRef.current = {};
@@ -6566,12 +6949,12 @@ function useLoadData() {
6566
6949
  livePaginationCursor,
6567
6950
  cursorId: stateCursorId
6568
6951
  } = componentState;
6569
- const [scrollbars, setScrollbars] = (0, import_react34.useState)({
6952
+ const [scrollbars, setScrollbars] = (0, import_react36.useState)({
6570
6953
  vertical: false,
6571
6954
  horizontal: false
6572
6955
  });
6573
- const scrollbarsRef = (0, import_react34.useRef)(scrollbars);
6574
- (0, import_react34.useEffect)(() => {
6956
+ const scrollbarsRef = (0, import_react36.useRef)(scrollbars);
6957
+ (0, import_react36.useEffect)(() => {
6575
6958
  notifyScrollbarsChange.onChange((scrollbars2) => {
6576
6959
  if (!scrollbars2) {
6577
6960
  return;
@@ -6581,7 +6964,7 @@ function useLoadData() {
6581
6964
  });
6582
6965
  return () => notifyScrollbarsChange.destroy();
6583
6966
  }, [notifyScrollbarsChange]);
6584
- (0, import_react34.useEffect)(() => {
6967
+ (0, import_react36.useEffect)(() => {
6585
6968
  if (!livePagination) {
6586
6969
  return;
6587
6970
  }
@@ -6595,7 +6978,7 @@ function useLoadData() {
6595
6978
  });
6596
6979
  return () => cancelAnimationFrame(frameId);
6597
6980
  }, [livePaginationCursor]);
6598
- (0, import_react34.useEffect)(() => {
6981
+ (0, import_react36.useEffect)(() => {
6599
6982
  if (!livePagination || livePaginationCursor !== void 0) {
6600
6983
  return;
6601
6984
  }
@@ -6609,7 +6992,7 @@ function useLoadData() {
6609
6992
  });
6610
6993
  return () => cancelAnimationFrame(frameId);
6611
6994
  }, [dataArray.length, livePaginationCursor]);
6612
- (0, import_react34.useEffect)(() => {
6995
+ (0, import_react36.useEffect)(() => {
6613
6996
  const state = getComponentState();
6614
6997
  const { livePaginationCursor: livePaginationCursor2, livePagination: livePagination2, dataArray: dataArray2 } = state;
6615
6998
  if (!scrollbars.vertical && livePagination2) {
@@ -6627,7 +7010,7 @@ function useLoadData() {
6627
7010
  filterValue,
6628
7011
  cursorId: livePagination ? stateCursorId : null
6629
7012
  };
6630
- const initialRef = (0, import_react34.useRef)(true);
7013
+ const initialRef = (0, import_react36.useRef)(true);
6631
7014
  useLazyLoadRange();
6632
7015
  useEffectWithChanges(() => {
6633
7016
  const componentState2 = getComponentState();
@@ -6659,7 +7042,7 @@ function useLazyLoadRange() {
6659
7042
  componentActions: actions,
6660
7043
  componentState
6661
7044
  } = useComponentState();
6662
- (0, import_react34.useEffect)(() => {
7045
+ (0, import_react36.useEffect)(() => {
6663
7046
  actions.lazyLoadCacheOfLoadedBatches = new DeepMap();
6664
7047
  }, [componentState.data, componentState.dataParams]);
6665
7048
  const {
@@ -6668,7 +7051,7 @@ function useLazyLoadRange() {
6668
7051
  dataArray,
6669
7052
  scrollStopDelayUpdatedByTable
6670
7053
  } = componentState;
6671
- const latestRenderRangeRef = (0, import_react34.useRef)(null);
7054
+ const latestRenderRangeRef = (0, import_react36.useRef)(null);
6672
7055
  const loadRange = (renderRange, cache = getComponentState().lazyLoadCacheOfLoadedBatches) => {
6673
7056
  const componentState2 = getComponentState();
6674
7057
  renderRange = renderRange || latestRenderRangeRef.current;
@@ -6687,8 +7070,8 @@ function useLazyLoadRange() {
6687
7070
  componentActions: actions
6688
7071
  }, cache);
6689
7072
  };
6690
- const debouncedLoadRange = (0, import_react34.useMemo)(() => debounce(loadRange, { wait: scrollStopDelayUpdatedByTable }), [scrollStopDelayUpdatedByTable]);
6691
- (0, import_react34.useEffect)(() => {
7073
+ const debouncedLoadRange = (0, import_react36.useMemo)(() => debounce(loadRange, { wait: scrollStopDelayUpdatedByTable }), [scrollStopDelayUpdatedByTable]);
7074
+ (0, import_react36.useEffect)(() => {
6692
7075
  if (lazyLoadBatchSize && lazyLoadBatchSize > 0) {
6693
7076
  return notifyRenderRangeChange.onChange((renderRange) => {
6694
7077
  latestRenderRangeRef.current = renderRange;
@@ -6697,7 +7080,7 @@ function useLazyLoadRange() {
6697
7080
  }
6698
7081
  return;
6699
7082
  }, [lazyLoadBatchSize]);
6700
- (0, import_react34.useEffect)(() => {
7083
+ (0, import_react36.useEffect)(() => {
6701
7084
  if (lazyLoadBatchSize && lazyLoadBatchSize > 0) {
6702
7085
  debouncedLoadRange();
6703
7086
  }
@@ -6933,6 +7316,7 @@ var forwardProps2 = (setupState) => {
6933
7316
  sortTypes: (sortTypes) => {
6934
7317
  return __spreadValues(__spreadValues({}, sortTypes_default), sortTypes);
6935
7318
  },
7319
+ sortMode: (sortMode) => sortMode != null ? sortMode : "local",
6936
7320
  aggregationReducers: 1,
6937
7321
  collapseGroupRowsOnDataFunctionChange: (collapseGroupRowsOnDataFunctionChange) => collapseGroupRowsOnDataFunctionChange != null ? collapseGroupRowsOnDataFunctionChange : true,
6938
7322
  loading: (loading) => loading != null ? loading : false,
@@ -6976,7 +7360,7 @@ function mapPropsToState(params) {
6976
7360
  operatorsByFilterType,
6977
7361
  controlledSort,
6978
7362
  controlledFilter,
6979
- filterMode: ((_a = props.filterMode) != null ? _a : props.filterFunction != null) ? "client" : typeof props.data === "function" ? "server" : "client",
7363
+ filterMode: ((_a = props.filterMode) != null ? _a : props.filterFunction != null) ? "local" : typeof props.data === "function" ? "remote" : "local",
6980
7364
  multiSort: Array.isArray(controlledSort ? props.sortInfo : props.defaultSortInfo),
6981
7365
  lazyLoadBatchSize: typeof props.lazyLoad === "object" ? props.lazyLoad.batchSize : void 0
6982
7366
  };
@@ -7367,7 +7751,7 @@ function concludeReducer(params) {
7367
7751
  }
7368
7752
  const { filterFunction, filterValue, filterTypes, operatorsByFilterType } = state;
7369
7753
  const shouldFilter = !!filterFunction || Array.isArray(filterValue) && filterValue.length;
7370
- const shouldFilterClientSide = shouldFilter && state.filterMode === "client";
7754
+ const shouldFilterClientSide = shouldFilter && state.filterMode === "local";
7371
7755
  const filterDepsChanged = haveDepsChanged(previousState, state, [
7372
7756
  "filterFunction",
7373
7757
  "filterValue",
@@ -7376,7 +7760,7 @@ function concludeReducer(params) {
7376
7760
  const filterChanged = originalDataArrayChanged || filterDepsChanged;
7377
7761
  const sortInfoChanged = haveDepsChanged(previousState, state, ["sortInfo"]);
7378
7762
  const sortDepsChanged = originalDataArrayChanged || filterDepsChanged || sortInfoChanged;
7379
- const shouldFilterAgain = state.filterMode === "client" && (filterChanged || !state.lastFilterDataArray);
7763
+ const shouldFilterAgain = state.filterMode === "local" && (filterChanged || !state.lastFilterDataArray);
7380
7764
  const shouldSortAgain = shouldSort && (sortDepsChanged || !state.lastSortDataArray);
7381
7765
  const groupBy = state.groupBy;
7382
7766
  const pivotBy = state.pivotBy;
@@ -7418,7 +7802,8 @@ function concludeReducer(params) {
7418
7802
  }
7419
7803
  state.filteredCount = dataArray.length;
7420
7804
  state.postFilterDataArray = dataArray;
7421
- if (shouldSort) {
7805
+ const shouldSortClientSide = shouldSort && state.sortMode === "local";
7806
+ if (shouldSortClientSide) {
7422
7807
  const prevKnownTypes = multisort.knownTypes;
7423
7808
  multisort.knownTypes = state.sortTypes;
7424
7809
  dataArray = shouldSortAgain ? multisort(sortInfo, [...dataArray]) : state.lastSortDataArray;
@@ -7498,7 +7883,7 @@ function DataSourceWithContext(props) {
7498
7883
  if (typeof children === "function") {
7499
7884
  children = children(computedValues);
7500
7885
  }
7501
- return /* @__PURE__ */ React29.createElement(React29.Fragment, null, children);
7886
+ return /* @__PURE__ */ React31.createElement(React31.Fragment, null, children);
7502
7887
  }
7503
7888
  var DataSourceRoot = getComponentStateRoot({
7504
7889
  initSetupState,
@@ -7521,14 +7906,14 @@ function DataSourceCmp({ children }) {
7521
7906
  globalThis.getDataSourceState = getState;
7522
7907
  }
7523
7908
  useLoadData();
7524
- return /* @__PURE__ */ React29.createElement(DataSourceContext.Provider, {
7909
+ return /* @__PURE__ */ React31.createElement(DataSourceContext.Provider, {
7525
7910
  value: contextValue
7526
- }, /* @__PURE__ */ React29.createElement(DataSourceWithContext, {
7911
+ }, /* @__PURE__ */ React31.createElement(DataSourceWithContext, {
7527
7912
  children
7528
7913
  }));
7529
7914
  }
7530
7915
  function DataSource(props) {
7531
- return /* @__PURE__ */ React29.createElement(DataSourceRoot, __spreadValues({}, props), /* @__PURE__ */ React29.createElement(DataSourceCmp, {
7916
+ return /* @__PURE__ */ React31.createElement(DataSourceRoot, __spreadValues({}, props), /* @__PURE__ */ React31.createElement(DataSourceCmp, {
7532
7917
  children: props.children
7533
7918
  }));
7534
7919
  }
@@ -7536,7 +7921,7 @@ function DataSource(props) {
7536
7921
  // src/components/InfiniteTable/hooks/useToggleGroupRow.ts
7537
7922
  function useToggleGroupRow() {
7538
7923
  const { getState: getDataSourceState, componentActions: dataSourceActions } = useDataSourceContextValue();
7539
- const toggleGroupRow = (0, import_react35.useCallback)((groupKeys) => {
7924
+ const toggleGroupRow = (0, import_react37.useCallback)((groupKeys) => {
7540
7925
  const state = getDataSourceState();
7541
7926
  const newState = new GroupRowsState(state.groupRowsState);
7542
7927
  newState.toggleGroupRow(groupKeys);
@@ -7568,7 +7953,7 @@ function useToggleGroupRow() {
7568
7953
 
7569
7954
  // src/components/InfiniteTable/hooks/useColumnsWhen.ts
7570
7955
  function useGroupByMap(groupBy) {
7571
- const groupByMap = (0, import_react36.useMemo)(() => {
7956
+ const groupByMap = (0, import_react38.useMemo)(() => {
7572
7957
  return groupBy.reduce((acc, groupBy2, index) => {
7573
7958
  acc.set(groupBy2.field, {
7574
7959
  groupBy: groupBy2,
@@ -7592,13 +7977,13 @@ function useColumnsWhen() {
7592
7977
  }
7593
7978
  } = useComponentState();
7594
7979
  const groupByMap = useGroupByMap(groupBy);
7595
- (0, import_react36.useEffect)(() => {
7980
+ (0, import_react38.useEffect)(() => {
7596
7981
  dataSourceActions.generateGroupRows = groupRenderStrategy !== "inline";
7597
7982
  }, [groupRenderStrategy]);
7598
- (0, import_react36.useEffect)(() => {
7983
+ (0, import_react38.useEffect)(() => {
7599
7984
  dataSourceActions.pivotTotalColumnPosition = pivotTotalColumnPosition;
7600
7985
  }, [pivotTotalColumnPosition]);
7601
- (0, import_react36.useEffect)(() => {
7986
+ (0, import_react38.useEffect)(() => {
7602
7987
  if (pivotGrandTotalColumnPosition != void 0) {
7603
7988
  dataSourceActions.pivotGrandTotalColumnPosition = pivotGrandTotalColumnPosition;
7604
7989
  }
@@ -7672,7 +8057,7 @@ function useColumnsWhenInlineGroupRenderStrategy(groupByMap) {
7672
8057
  });
7673
8058
  return computedColumns.size === 0 ? void 0 : computedColumns;
7674
8059
  }
7675
- (0, import_react36.useEffect)(() => {
8060
+ (0, import_react38.useEffect)(() => {
7676
8061
  const update = () => {
7677
8062
  componentActions.columnsWhenInlineGroupRenderStrategy = computeColumnsWhenInlineGroupRenderStrategy(columns, groupByMap, groupRenderStrategy, toggleGroupRow);
7678
8063
  };
@@ -7701,7 +8086,7 @@ function useColumnsWhenGrouping() {
7701
8086
  }
7702
8087
  } = useComponentState();
7703
8088
  const toggleGroupRow = useToggleGroupRow();
7704
- (0, import_react36.useEffect)(() => {
8089
+ (0, import_react38.useEffect)(() => {
7705
8090
  const update = () => {
7706
8091
  const columnsWhenGrouping = getColumnsWhenGrouping({
7707
8092
  columns,
@@ -7837,7 +8222,7 @@ function useHideColumns(groupByMap) {
7837
8222
  hideEmptyGroupColumns ? groupRowsState : null,
7838
8223
  hideEmptyGroupColumns
7839
8224
  ]);
7840
- (0, import_react36.useEffect)(() => {
8225
+ (0, import_react38.useEffect)(() => {
7841
8226
  const isGrouped = groupBy.length > 0;
7842
8227
  const currentState = getComponentState();
7843
8228
  const { controlledColumnVisibility, columnVisibility } = currentState;
@@ -7952,7 +8337,7 @@ function getColumnsWhenGrouping(params) {
7952
8337
  }
7953
8338
 
7954
8339
  // src/components/InfiniteTable/hooks/useComputedVisibleColumns.ts
7955
- var import_react38 = __toModule(require("react"));
8340
+ var import_react40 = __toModule(require("react"));
7956
8341
 
7957
8342
  // src/components/flexbox/index.ts
7958
8343
  var computeFlex = (params) => {
@@ -8265,7 +8650,7 @@ var getComputedVisibleColumns = ({
8265
8650
  });
8266
8651
  const firstPinnedEndAbsoluteOffset = bodySize.width - totalPinnedEndWidth;
8267
8652
  columnsArray.forEach((c, i) => {
8268
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
8653
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
8269
8654
  const id = visibleColumnOrder[i];
8270
8655
  const nextColumnId = visibleColumnOrder[i + 1];
8271
8656
  const colType = getColumnComputedType(c, columnTypes);
@@ -8290,16 +8675,26 @@ var getComputedVisibleColumns = ({
8290
8675
  const computedDataType = c.dataType || colType.dataType || (Array.isArray(c.type) ? c.type[0] : c.type) || "string";
8291
8676
  const computedSortType = c.sortType || colType.sortType || computedDataType;
8292
8677
  const computedFilterType = c.filterType || colType.filterType || computedDataType;
8678
+ const field = (_m = c.field) != null ? _m : colType.field;
8679
+ const valueGetter = (_n = c.valueGetter) != null ? _n : colType.valueGetter;
8680
+ let sortableColumnOrType = (_o = c.sortable) != null ? _o : colType.sortable;
8681
+ if (sortableColumnOrType == null) {
8682
+ if (field == null && valueGetter == null) {
8683
+ sortableColumnOrType = false;
8684
+ }
8685
+ }
8686
+ let computedSortable = (_p = sortableColumnOrType != null ? sortableColumnOrType : sortable) != null ? _p : true;
8293
8687
  const result2 = __spreadProps(__spreadValues({
8294
8688
  align: colType.align,
8295
8689
  verticalAlign: colType.verticalAlign,
8296
8690
  defaultHiddenWhenGroupedBy: colType.defaultHiddenWhenGroupedBy,
8297
- valueGetter: colType.valueGetter,
8691
+ valueGetter,
8298
8692
  valueFormatter: colType.valueFormatter,
8299
8693
  renderValue: colType.renderValue,
8300
8694
  render: colType.render,
8301
8695
  style: colType.style,
8302
- components: colType.components
8696
+ components: colType.components,
8697
+ field
8303
8698
  }, c), {
8304
8699
  computedDataType,
8305
8700
  computedSortType,
@@ -8313,7 +8708,7 @@ var getComputedVisibleColumns = ({
8313
8708
  computedAbsoluteOffset,
8314
8709
  computedPinningOffset,
8315
8710
  computedOffset,
8316
- computedSortable: (_o = (_n = (_m = c.sortable) != null ? _m : colType.sortable) != null ? _n : sortable) != null ? _o : true,
8711
+ computedSortable,
8317
8712
  computedSortInfo,
8318
8713
  computedSortIndex,
8319
8714
  computedMultiSort: multiSort,
@@ -8322,7 +8717,7 @@ var getComputedVisibleColumns = ({
8322
8717
  computedSortedDesc,
8323
8718
  computedVisibleIndex: i,
8324
8719
  computedPinned,
8325
- computedDraggable: (_q = (_p = c.draggable) != null ? _p : draggableColumns) != null ? _q : true,
8720
+ computedDraggable: (_r = (_q = c.draggable) != null ? _q : draggableColumns) != null ? _r : true,
8326
8721
  computedFirstInCategory,
8327
8722
  computedLastInCategory,
8328
8723
  computedFirst: i === 0,
@@ -8372,7 +8767,7 @@ var getComputedVisibleColumns = ({
8372
8767
  setSortInfo(finalSortInfo);
8373
8768
  },
8374
8769
  id,
8375
- header: (_t = (_s = (_r = c.header) != null ? _r : colType.header) != null ? _s : c.name) != null ? _t : c.field
8770
+ header: (_u = (_t = (_s = c.header) != null ? _s : colType.header) != null ? _t : c.name) != null ? _u : c.field
8376
8771
  });
8377
8772
  computedOffset += computedWidth;
8378
8773
  computedVisibleColumnsMap.set(result2.id, result2);
@@ -8413,10 +8808,10 @@ var getComputedVisibleColumns = ({
8413
8808
  };
8414
8809
 
8415
8810
  // src/components/InfiniteTable/hooks/useRerenderOnKeyChange.ts
8416
- var import_react37 = __toModule(require("react"));
8811
+ var import_react39 = __toModule(require("react"));
8417
8812
  var useRerenderOnKeyChange = (map2) => {
8418
8813
  const [renderId, rerender] = useRerender();
8419
- (0, import_react37.useEffect)(() => {
8814
+ (0, import_react39.useEffect)(() => {
8420
8815
  const update = rafFn(rerender);
8421
8816
  return interceptMap(map2, {
8422
8817
  set: update,
@@ -8469,7 +8864,7 @@ var useComputedVisibleColumns = ({
8469
8864
  computedPinnedEndOffset,
8470
8865
  computedPinnedEndWidth,
8471
8866
  computedPinnedStartWidth
8472
- } = (0, import_react38.useMemo)(() => {
8867
+ } = (0, import_react40.useMemo)(() => {
8473
8868
  return getComputedVisibleColumns({
8474
8869
  columns,
8475
8870
  bodySize,
@@ -8537,7 +8932,7 @@ var useComputedVisibleColumns = ({
8537
8932
  };
8538
8933
 
8539
8934
  // src/components/InfiniteTable/hooks/useScrollbars.ts
8540
- var import_react39 = __toModule(require("react"));
8935
+ var import_react41 = __toModule(require("react"));
8541
8936
  var INITIAL_SCROLLBARS = {
8542
8937
  vertical: false,
8543
8938
  horizontal: false
@@ -8545,8 +8940,8 @@ var INITIAL_SCROLLBARS = {
8545
8940
  function useScrollbars(brain) {
8546
8941
  const { getComponentState: getInfiniteTableState } = useComponentState();
8547
8942
  const { getState: getDataSourceState } = useDataSourceContextValue();
8548
- const [scrollbars, setScrollbars] = (0, import_react39.useState)(INITIAL_SCROLLBARS);
8549
- (0, import_react39.useEffect)(() => {
8943
+ const [scrollbars, setScrollbars] = (0, import_react41.useState)(INITIAL_SCROLLBARS);
8944
+ (0, import_react41.useEffect)(() => {
8550
8945
  return brain.onRenderCountChange(() => {
8551
8946
  const { scrollTopMax, scrollLeftMax } = brain;
8552
8947
  setScrollbars({
@@ -8555,7 +8950,7 @@ function useScrollbars(brain) {
8555
8950
  });
8556
8951
  });
8557
8952
  }, [brain]);
8558
- (0, import_react39.useLayoutEffect)(() => {
8953
+ (0, import_react41.useLayoutEffect)(() => {
8559
8954
  const dataSourceState = getDataSourceState();
8560
8955
  const { onScrollbarsChange } = getInfiniteTableState();
8561
8956
  const { notifyScrollbarsChange } = dataSourceState;
@@ -8586,7 +8981,7 @@ function useComputed() {
8586
8981
  bodySize,
8587
8982
  showSeparatePivotColumnForSingleAggregation
8588
8983
  } = componentState;
8589
- (0, import_react40.useState)(() => {
8984
+ (0, import_react42.useState)(() => {
8590
8985
  componentState.onRowHeightCSSVarChange.onChange((rowHeight) => {
8591
8986
  if (rowHeight) {
8592
8987
  componentActions.rowHeight = rowHeight;
@@ -8598,13 +8993,13 @@ function useComputed() {
8598
8993
  }
8599
8994
  });
8600
8995
  });
8601
- (0, import_react40.useEffect)(() => {
8996
+ (0, import_react42.useEffect)(() => {
8602
8997
  dataSourceActions.showSeparatePivotColumnForSingleAggregation = showSeparatePivotColumnForSingleAggregation;
8603
8998
  }, [showSeparatePivotColumnForSingleAggregation]);
8604
8999
  const { multiSort, filterValue } = dataSourceState;
8605
9000
  useColumnGroups();
8606
9001
  const { toggleGroupRow } = useColumnsWhen();
8607
- const setSortInfo = (0, import_react40.useCallback)((sortInfo) => {
9002
+ const setSortInfo = (0, import_react42.useCallback)((sortInfo) => {
8608
9003
  var _a2;
8609
9004
  const newSortInfo = getDataSourceState().multiSort ? sortInfo : (_a2 = sortInfo[0]) != null ? _a2 : null;
8610
9005
  dataSourceActions.sortInfo = newSortInfo;
@@ -8763,7 +9158,7 @@ function useDOMProps(initialDOMProps) {
8763
9158
  }
8764
9159
 
8765
9160
  // src/components/InfiniteTable/hooks/useLicense/useLicense.ts
8766
- var import_react41 = __toModule(require("react"));
9161
+ var import_react43 = __toModule(require("react"));
8767
9162
 
8768
9163
  // src/components/InfiniteTable/hooks/useLicense/crc32.ts
8769
9164
  var DEFAULT_ReversedPolynomial = 3988292384;
@@ -8921,10 +9316,10 @@ var isInsideSandbox = () => {
8921
9316
  };
8922
9317
  var isInsidePlayground = isInsideSandbox() || isInsideSandpack();
8923
9318
  var useLicense = (licenseKey = "") => {
8924
- const valid = (0, import_react41.useMemo)(() => {
9319
+ const valid = (0, import_react43.useMemo)(() => {
8925
9320
  let valid2 = isValidLicense(licenseKey, {
8926
9321
  publishedAt: 1624970570587,
8927
- version: "0.3.3"
9322
+ version: "0.3.4"
8928
9323
  });
8929
9324
  if (!licenseKey && !valid2 && isInsidePlayground) {
8930
9325
  return true;
@@ -8934,8 +9329,142 @@ var useLicense = (licenseKey = "") => {
8934
9329
  return valid;
8935
9330
  };
8936
9331
 
9332
+ // src/components/utils/clamp.ts
9333
+ function clamp(value, min, max) {
9334
+ return Math.min(Math.max(value, min), max);
9335
+ }
9336
+
9337
+ // src/components/InfiniteTable/keyboardNavigationAndSelection.ts
9338
+ function handleRowNavigation(options) {
9339
+ const { key, getState, getDataSourceState, actions } = options;
9340
+ const arrLength = getDataSourceState().dataArray.length;
9341
+ const state = getState();
9342
+ const { brain } = state;
9343
+ let { activeRowIndex } = state;
9344
+ if (activeRowIndex == null) {
9345
+ return false;
9346
+ }
9347
+ const {
9348
+ start: [startRow],
9349
+ end: [endRow]
9350
+ } = brain.getRenderRange();
9351
+ const renderRowCount = endRow - startRow - 1;
9352
+ const min = 0;
9353
+ const max = arrLength - 1;
9354
+ const KeyToFunction = {
9355
+ ArrowDown: () => {
9356
+ activeRowIndex = clamp(activeRowIndex + 1, min, max);
9357
+ },
9358
+ ArrowUp: () => {
9359
+ activeRowIndex = clamp(activeRowIndex - 1, min, max);
9360
+ },
9361
+ PageDown: () => {
9362
+ activeRowIndex = Math.min(activeRowIndex + renderRowCount, arrLength - 1);
9363
+ },
9364
+ PageUp: () => {
9365
+ activeRowIndex = Math.max(activeRowIndex - renderRowCount, min);
9366
+ },
9367
+ End: () => {
9368
+ activeRowIndex = max;
9369
+ },
9370
+ Home: () => {
9371
+ activeRowIndex = min;
9372
+ }
9373
+ };
9374
+ const Fn = KeyToFunction[key];
9375
+ if (!Fn) {
9376
+ return false;
9377
+ }
9378
+ Fn();
9379
+ actions.activeRowIndex = activeRowIndex;
9380
+ return true;
9381
+ }
9382
+ function handleCellNavigation(options) {
9383
+ const { key, shiftKey, getState, getComputed, getDataSourceState, actions } = options;
9384
+ const state = getState();
9385
+ const { activeCellIndex, brain } = state;
9386
+ if (!activeCellIndex) {
9387
+ return false;
9388
+ }
9389
+ let [rowIndex, colIndex] = activeCellIndex;
9390
+ const {
9391
+ start: [startRow, startCol],
9392
+ end: [endRow, endCol]
9393
+ } = brain.getRenderRange();
9394
+ const renderRowCount = endRow - startRow - 1;
9395
+ const renderColCount = endCol - startCol - 1;
9396
+ const maxRow = getDataSourceState().dataArray.length - 1;
9397
+ const maxCol = getComputed().computedVisibleColumns.length - 1;
9398
+ const minRow = 0;
9399
+ const minCol = 0;
9400
+ rowIndex = clamp(rowIndex, 0, maxRow);
9401
+ colIndex = clamp(colIndex, 0, maxCol);
9402
+ actions.activeCellIndex = [rowIndex, colIndex];
9403
+ const KeyToFunction = {
9404
+ ArrowDown: () => {
9405
+ rowIndex = clamp(rowIndex + 1, minRow, maxRow);
9406
+ },
9407
+ ArrowUp: () => {
9408
+ rowIndex = clamp(rowIndex - 1, minRow, maxRow);
9409
+ },
9410
+ ArrowLeft: () => {
9411
+ colIndex = clamp(colIndex - 1, minCol, maxCol);
9412
+ },
9413
+ ArrowRight: () => {
9414
+ colIndex = clamp(colIndex + 1, minCol, maxCol);
9415
+ },
9416
+ PageDown: () => {
9417
+ if (!shiftKey) {
9418
+ rowIndex = Math.min(rowIndex + renderRowCount, maxRow);
9419
+ } else {
9420
+ colIndex = Math.min(colIndex + renderColCount, maxCol);
9421
+ }
9422
+ },
9423
+ PageUp: () => {
9424
+ if (!shiftKey) {
9425
+ rowIndex = Math.max(rowIndex - renderRowCount, minRow);
9426
+ } else {
9427
+ colIndex = Math.max(colIndex - renderColCount, minCol);
9428
+ }
9429
+ },
9430
+ End: () => {
9431
+ if (!shiftKey) {
9432
+ rowIndex = maxRow;
9433
+ } else {
9434
+ colIndex = maxCol;
9435
+ }
9436
+ },
9437
+ Home: () => {
9438
+ if (!shiftKey) {
9439
+ rowIndex = minRow;
9440
+ } else {
9441
+ colIndex = minCol;
9442
+ }
9443
+ }
9444
+ };
9445
+ const Fn = KeyToFunction[key];
9446
+ if (!Fn) {
9447
+ return false;
9448
+ }
9449
+ Fn();
9450
+ actions.activeCellIndex = [rowIndex, colIndex];
9451
+ return true;
9452
+ }
9453
+ function handleKeyboardNavigation(options) {
9454
+ const { getState } = options;
9455
+ const state = getState();
9456
+ const { activeRowIndex, activeCellIndex } = state;
9457
+ if (activeRowIndex != null) {
9458
+ return handleRowNavigation(options);
9459
+ }
9460
+ if (activeCellIndex != null) {
9461
+ return handleCellNavigation(options);
9462
+ }
9463
+ return false;
9464
+ }
9465
+
8937
9466
  // src/components/InfiniteTable/state/getInitialState.ts
8938
- var import_react42 = __toModule(require("react"));
9467
+ var import_react44 = __toModule(require("react"));
8939
9468
 
8940
9469
  // src/components/VirtualBrain/ScrollListener.ts
8941
9470
  var initialScrollPosition = {
@@ -8991,6 +9520,18 @@ function toMap(mapOrObject, weakMapCache) {
8991
9520
  }
8992
9521
 
8993
9522
  // src/components/InfiniteTable/state/getInitialState.ts
9523
+ function createRenderer2(brain) {
9524
+ const renderer = new ReactHeadlessTableRenderer(brain);
9525
+ const onRenderUpdater = buildSubscriptionCallback();
9526
+ brain.onDestroy(() => {
9527
+ renderer.destroy();
9528
+ onRenderUpdater.destroy();
9529
+ });
9530
+ return {
9531
+ renderer,
9532
+ onRenderUpdater
9533
+ };
9534
+ }
8994
9535
  function initSetupState2() {
8995
9536
  const columnsGeneratedForGrouping = new Map();
8996
9537
  const brain = new MatrixBrain();
@@ -9004,17 +9545,23 @@ function initSetupState2() {
9004
9545
  if (true) {
9005
9546
  globalThis.brain = brain;
9006
9547
  }
9548
+ const { renderer, onRenderUpdater } = createRenderer2(brain);
9007
9549
  brain.onAvailableSizeChange((size) => {
9008
9550
  headerBrain.setAvailableSize({ width: size.width });
9009
9551
  });
9552
+ if (true) {
9553
+ globalThis.renderer = renderer;
9554
+ }
9010
9555
  return {
9556
+ renderer,
9557
+ onRenderUpdater,
9011
9558
  propsCache: new Map([]),
9012
9559
  brain,
9013
9560
  headerBrain,
9014
9561
  columnShifts: null,
9015
- domRef: (0, import_react42.createRef)(),
9016
- scrollerDOMRef: (0, import_react42.createRef)(),
9017
- portalDOMRef: (0, import_react42.createRef)(),
9562
+ domRef: (0, import_react44.createRef)(),
9563
+ scrollerDOMRef: (0, import_react44.createRef)(),
9564
+ portalDOMRef: (0, import_react44.createRef)(),
9018
9565
  onRowHeightCSSVarChange: buildSubscriptionCallback(),
9019
9566
  onColumnHeaderHeightCSSVarChange: buildSubscriptionCallback(),
9020
9567
  bodySize: {
@@ -9068,7 +9615,6 @@ var forwardProps3 = (setupState) => {
9068
9615
  scrollStopDelay: (scrollStopDelay) => scrollStopDelay != null ? scrollStopDelay : 250,
9069
9616
  filterEditors: (filterEditors) => __spreadValues(__spreadValues({}, defaultFilterEditors), filterEditors),
9070
9617
  viewportReservedWidth: (viewportReservedWidth) => viewportReservedWidth != null ? viewportReservedWidth : 0,
9071
- activeIndex: (activeIndex) => activeIndex != null ? activeIndex : 0,
9072
9618
  columnMinWidth: (columnMinWidth) => columnMinWidth != null ? columnMinWidth : 30,
9073
9619
  columnMaxWidth: (columnMaxWidth) => columnMaxWidth != null ? columnMaxWidth : 2e3,
9074
9620
  columnDefaultWidth: (columnDefaultWidth) => columnDefaultWidth != null ? columnDefaultWidth : 200,
@@ -9083,6 +9629,8 @@ var forwardProps3 = (setupState) => {
9083
9629
  pivotTotalColumnPosition: (pivotTotalColumnPosition) => pivotTotalColumnPosition != null ? pivotTotalColumnPosition : "end",
9084
9630
  pivotGrandTotalColumnPosition: 1,
9085
9631
  licenseKey: (licenseKey) => licenseKey || "",
9632
+ activeRowIndex: (activeRowIndex) => activeRowIndex != null ? activeRowIndex : null,
9633
+ activeCellIndex: (activeCellIndex) => activeCellIndex != null ? activeCellIndex : null,
9086
9634
  columnOrder: (columnOrder) => columnOrder != null ? columnOrder : true,
9087
9635
  header: (header) => header != null ? header : true,
9088
9636
  showZebraRows: (showZebraRows) => showZebraRows != null ? showZebraRows : true,
@@ -9130,6 +9678,7 @@ var mapPropsToState2 = (params) => {
9130
9678
  groupRenderStrategy,
9131
9679
  groupBy,
9132
9680
  computedColumns,
9681
+ enableKeyboardNavigation: state.activeRowIndex != null,
9133
9682
  columnHeaderCssEllipsis: (_b = (_a = props.columnHeaderCssEllipsis) != null ? _a : props.columnCssEllipsis) != null ? _b : true,
9134
9683
  columnGroupsDepthsMap,
9135
9684
  columnGroupsMaxDepth: columnGroupsDepthsMap != state.columnGroupsDepthsMap ? Math.max(...columnGroupsDepthsMap.values(), 0) : state.columnGroupsMaxDepth,
@@ -9153,14 +9702,23 @@ var InfiniteTableRoot = getComponentStateRoot({
9153
9702
  getParentState: () => useDataSource(),
9154
9703
  debugName: "InfiniteTable"
9155
9704
  });
9156
- var InfiniteTableComponent = React30.memo(function InfiniteTableComponent2() {
9705
+ var InfiniteTableComponent = React32.memo(function InfiniteTableComponent2() {
9157
9706
  var _a;
9158
- const { componentState, getComputed, computed } = useInfiniteTable();
9707
+ const {
9708
+ componentState,
9709
+ getComputed,
9710
+ computed,
9711
+ componentActions: actions,
9712
+ getState
9713
+ } = useInfiniteTable();
9159
9714
  const {
9160
9715
  componentState: { loading },
9161
9716
  getState: getDataSourceState,
9162
9717
  componentActions: dataSourceActions
9163
9718
  } = useDataSourceContextValue();
9719
+ const [imperativeApi] = (0, import_react45.useState)(() => {
9720
+ return getImperativeApi(getState, getComputed, getDataSourceState, actions);
9721
+ });
9164
9722
  const {
9165
9723
  domRef,
9166
9724
  scrollerDOMRef,
@@ -9175,18 +9733,37 @@ var InfiniteTableComponent = React30.memo(function InfiniteTableComponent2() {
9175
9733
  components,
9176
9734
  scrollStopDelay,
9177
9735
  brain,
9178
- headerBrain
9736
+ headerBrain,
9737
+ renderer,
9738
+ activeRowIndex,
9739
+ activeCellIndex,
9740
+ onRenderUpdater
9179
9741
  } = componentState;
9742
+ (0, import_react45.useEffect)(() => {
9743
+ if (activeRowIndex != null) {
9744
+ imperativeApi.scrollRowIntoView(activeRowIndex, {
9745
+ offset: 30
9746
+ });
9747
+ }
9748
+ }, [activeRowIndex]);
9749
+ (0, import_react45.useEffect)(() => {
9750
+ if (activeCellIndex != null) {
9751
+ imperativeApi.scrollCellIntoView(activeCellIndex[0], activeCellIndex[1], {
9752
+ offset: 30
9753
+ });
9754
+ }
9755
+ }, [activeCellIndex]);
9180
9756
  const { columnShifts, bodySize } = componentState;
9181
9757
  const { scrollbars } = computed;
9182
9758
  const { renderCell } = useCellRendering({
9759
+ imperativeApi,
9183
9760
  getComputed,
9184
9761
  domRef: componentState.domRef,
9185
9762
  columnShifts,
9186
9763
  bodySize,
9187
9764
  computed
9188
9765
  });
9189
- React30.useEffect(() => {
9766
+ React32.useEffect(() => {
9190
9767
  const dataSourceState = getDataSourceState();
9191
9768
  const onChange = debounce((renderRange) => {
9192
9769
  dataSourceState.notifyRenderRangeChange({
@@ -9199,35 +9776,52 @@ var InfiniteTableComponent = React30.memo(function InfiniteTableComponent2() {
9199
9776
  const licenseValid = useLicense(licenseKey);
9200
9777
  const domProps = useDOMProps(componentState.domProps);
9201
9778
  const LoadMaskCmp = (_a = components == null ? void 0 : components.LoadMask) != null ? _a : LoadMask;
9202
- React30.useEffect(() => {
9779
+ React32.useEffect(() => {
9203
9780
  brain.setScrollStopDelay(scrollStopDelay);
9204
9781
  dataSourceActions.scrollStopDelayUpdatedByTable = scrollStopDelay;
9205
9782
  }, [scrollStopDelay]);
9206
9783
  useAutoSizeColumns();
9207
- return /* @__PURE__ */ React30.createElement("div", __spreadValues({
9784
+ const onKeyDown = (0, import_react45.useCallback)((event) => {
9785
+ if (handleKeyboardNavigation({
9786
+ getState,
9787
+ actions,
9788
+ getDataSourceState,
9789
+ getComputed,
9790
+ key: event.key,
9791
+ shiftKey: !!event.shiftKey
9792
+ })) {
9793
+ event.preventDefault();
9794
+ }
9795
+ }, []);
9796
+ return /* @__PURE__ */ React32.createElement("div", __spreadValues({
9797
+ onKeyDown,
9208
9798
  ref: domRef
9209
- }, domProps), header ? /* @__PURE__ */ React30.createElement(TableHeaderWrapper, {
9799
+ }, domProps), header ? /* @__PURE__ */ React32.createElement(TableHeaderWrapper, {
9210
9800
  brain: headerBrain,
9211
9801
  scrollbars
9212
- }) : null, /* @__PURE__ */ React30.createElement(InfiniteTableBody, null, /* @__PURE__ */ React30.createElement(HeadlessTable, {
9802
+ }) : null, /* @__PURE__ */ React32.createElement(InfiniteTableBody, null, /* @__PURE__ */ React32.createElement(HeadlessTable, {
9213
9803
  tabIndex: 0,
9804
+ activeRowIndex: componentState.ready ? activeRowIndex : null,
9805
+ activeCellIndex: componentState.ready ? activeCellIndex : null,
9214
9806
  scrollStopDelay,
9807
+ renderer,
9808
+ onRenderUpdater,
9215
9809
  brain,
9216
9810
  renderCell,
9217
9811
  cellHoverClassNames: HOVERED_CLASS_NAMES,
9218
9812
  scrollerDOMRef
9219
- }), /* @__PURE__ */ React30.createElement(LoadMaskCmp, {
9813
+ }), /* @__PURE__ */ React32.createElement(LoadMaskCmp, {
9220
9814
  visible: loading
9221
- }, loadingText)), /* @__PURE__ */ React30.createElement("div", {
9815
+ }, loadingText)), /* @__PURE__ */ React32.createElement("div", {
9222
9816
  ref: portalDOMRef,
9223
9817
  className: join(`${rootClassName2}Portal`, zIndex[1e3], position.absolute, top[0], left[0])
9224
- }), rowHeightCSSVar ? /* @__PURE__ */ React30.createElement(CSSVariableWatch, {
9818
+ }), rowHeightCSSVar ? /* @__PURE__ */ React32.createElement(CSSVariableWatch, {
9225
9819
  varName: rowHeightCSSVar,
9226
9820
  onChange: onRowHeightCSSVarChange
9227
- }) : null, columnHeaderHeightCSSVar ? /* @__PURE__ */ React30.createElement(CSSVariableWatch, {
9821
+ }) : null, columnHeaderHeightCSSVar ? /* @__PURE__ */ React32.createElement(CSSVariableWatch, {
9228
9822
  varName: columnHeaderHeightCSSVar,
9229
9823
  onChange: onColumnHeaderHeightCSSVarChange
9230
- }) : null, /* @__PURE__ */ React30.createElement(InfiniteTableFooter, null), licenseValid ? null : /* @__PURE__ */ React30.createElement(InfiniteTableLicenseFooter, null));
9824
+ }) : null, /* @__PURE__ */ React32.createElement(InfiniteTableFooter, null), licenseValid ? null : /* @__PURE__ */ React32.createElement(InfiniteTableLicenseFooter, null));
9231
9825
  });
9232
9826
  function InfiniteTableContextProvider() {
9233
9827
  const { componentActions, componentState } = useComponentState();
@@ -9255,25 +9849,25 @@ function InfiniteTableContextProvider() {
9255
9849
  bodySize.width = (_b = (_a = scrollerDOMRef.current) == null ? void 0 : _a.scrollWidth) != null ? _b : bodySize.width;
9256
9850
  componentActions.bodySize = bodySize;
9257
9851
  }, { earlyAttach: true });
9258
- React30.useEffect(() => {
9852
+ React32.useEffect(() => {
9259
9853
  return () => {
9260
9854
  componentState.onRowHeightCSSVarChange.destroy();
9261
9855
  componentState.onColumnHeaderHeightCSSVarChange.destroy();
9262
9856
  };
9263
9857
  }, []);
9264
- React30.useEffect(() => {
9858
+ React32.useEffect(() => {
9265
9859
  if (scrollerDOMRef.current) {
9266
9860
  scrollerDOMRef.current.scrollTop = 0;
9267
9861
  }
9268
9862
  }, [scrollTopKey, scrollerDOMRef]);
9269
9863
  const TableContext2 = getInfiniteTableContext();
9270
- return /* @__PURE__ */ React30.createElement(TableContext2.Provider, {
9864
+ return /* @__PURE__ */ React32.createElement(TableContext2.Provider, {
9271
9865
  value: contextValue
9272
- }, /* @__PURE__ */ React30.createElement(InfiniteTableComponent, null));
9866
+ }, /* @__PURE__ */ React32.createElement(InfiniteTableComponent, null));
9273
9867
  }
9274
9868
  function InfiniteTable(props) {
9275
- const table = /* @__PURE__ */ React30.createElement(InfiniteTableRoot, __spreadValues({}, props), /* @__PURE__ */ React30.createElement(InfiniteTableContextProvider, null));
9276
- return /* @__PURE__ */ React30.createElement(React30.StrictMode, null, table);
9869
+ const table = /* @__PURE__ */ React32.createElement(InfiniteTableRoot, __spreadValues({}, props), /* @__PURE__ */ React32.createElement(InfiniteTableContextProvider, null));
9870
+ return /* @__PURE__ */ React32.createElement(React32.StrictMode, null, table);
9277
9871
  }
9278
9872
  InfiniteTable.defaultProps = {
9279
9873
  rowHeight: 40,