@infinite-table/infinite-react 0.2.14 → 0.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/index.d.ts +40 -13
  2. package/index.esm.js +238 -169
  3. package/index.js +309 -245
  4. package/package.json +2 -2
package/index.js CHANGED
@@ -637,7 +637,9 @@ __export(exports, {
637
637
  multisort: () => multisort,
638
638
  useComponentState: () => useComponentState,
639
639
  useDataSource: () => useDataSource,
640
- useEffectWithChanges: () => useEffectWithChanges
640
+ useEffectWithChanges: () => useEffectWithChanges,
641
+ useInfiniteColumnCell: () => useInfiniteColumnCell,
642
+ useInfiniteHeaderCell: () => useInfiniteHeaderCell
641
643
  });
642
644
 
643
645
  // src/components/utils/debounce.ts
@@ -655,7 +657,7 @@ function debounce(fn, { wait }) {
655
657
  }
656
658
 
657
659
  // src/components/InfiniteTable/index.tsx
658
- var React34 = __toModule(require("react"));
660
+ var React35 = __toModule(require("react"));
659
661
 
660
662
  // src/components/InfiniteTable/internalProps.ts
661
663
  var rootClassName = "Infinite";
@@ -2539,7 +2541,7 @@ function useColumnGroups() {
2539
2541
  var import_react17 = __toModule(require("react"));
2540
2542
 
2541
2543
  // src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
2542
- var React6 = __toModule(require("react"));
2544
+ var React7 = __toModule(require("react"));
2543
2545
 
2544
2546
  // src/utils/join.ts
2545
2547
  var join = (...args) => args.filter((x) => !!`${x}`).join(" ");
@@ -2610,6 +2612,12 @@ var userSelect = { none: "_16lm1iwm" };
2610
2612
  var willChange = { transform: "_16lm1iw19" };
2611
2613
  var zIndex = { "1": "_16lm1iwe", "10": "_16lm1iwf", "1000": "_16lm1iwg", "10000": "_16lm1iwh", "100000": "_16lm1iwi" };
2612
2614
 
2615
+ // src/components/InfiniteTable/utils/RenderHookComponent.tsx
2616
+ var React6 = __toModule(require("react"));
2617
+ function RenderHookComponent(props) {
2618
+ return /* @__PURE__ */ React6.createElement(React6.Fragment, null, props.render(props.renderParam));
2619
+ }
2620
+
2613
2621
  // src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
2614
2622
  function getGroupColumnRender({
2615
2623
  groupIndexForColumn,
@@ -2620,7 +2628,10 @@ function getGroupColumnRender({
2620
2628
  var _a, _b, _c;
2621
2629
  let { value, rowInfo, column, groupBy, pivotBy } = renderOptions;
2622
2630
  if (column.renderValue) {
2623
- value = column.renderValue(renderOptions);
2631
+ value = /* @__PURE__ */ React7.createElement(RenderHookComponent, {
2632
+ render: column.renderValue,
2633
+ renderParam: renderOptions
2634
+ });
2624
2635
  }
2625
2636
  let groupRowInfo = groupRenderStrategy !== "inline" ? rowInfo : ((_a = rowInfo.parents) == null ? void 0 : _a[groupIndexForColumn]) || rowInfo;
2626
2637
  if (!groupRowInfo) {
@@ -2646,17 +2657,20 @@ function getGroupColumnRender({
2646
2657
  let icon = null;
2647
2658
  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);
2648
2659
  if (showExpanderIcon) {
2649
- const defaultIcon = /* @__PURE__ */ React6.createElement(ExpanderIcon, {
2660
+ const defaultIcon = /* @__PURE__ */ React7.createElement(ExpanderIcon, {
2650
2661
  expanded: !collapsed,
2651
2662
  onChange: () => {
2652
2663
  toggleGroupRow(groupKeys);
2653
2664
  }
2654
2665
  });
2655
- icon = column.renderGroupIcon ? column.renderGroupIcon(Object.assign({ collapsed, groupIcon: defaultIcon }, renderOptions)) : defaultIcon;
2666
+ icon = column.renderGroupIcon ? /* @__PURE__ */ React7.createElement(RenderHookComponent, {
2667
+ render: column.renderGroupIcon,
2668
+ renderParam: Object.assign({ collapsed, groupIcon: defaultIcon }, renderOptions)
2669
+ }) : defaultIcon;
2656
2670
  }
2657
- return /* @__PURE__ */ React6.createElement("div", {
2671
+ return /* @__PURE__ */ React7.createElement("div", {
2658
2672
  className: join(display.flex, alignItems.center)
2659
- }, icon, /* @__PURE__ */ React6.createElement("div", {
2673
+ }, icon, /* @__PURE__ */ React7.createElement("div", {
2660
2674
  className: cssEllipsisClassName
2661
2675
  }, value != null ? value : null));
2662
2676
  };
@@ -2704,7 +2718,7 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
2704
2718
  let icon = null;
2705
2719
  const showExpanderIcon = 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);
2706
2720
  if (showExpanderIcon) {
2707
- const defaultIcon = /* @__PURE__ */ React6.createElement(ExpanderIcon, {
2721
+ const defaultIcon = /* @__PURE__ */ React7.createElement(ExpanderIcon, {
2708
2722
  expanded: !collapsed,
2709
2723
  onChange: () => {
2710
2724
  toggleGroupRow(rowInfo.groupKeys);
@@ -2712,9 +2726,9 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
2712
2726
  });
2713
2727
  icon = column.renderGroupIcon ? column.renderGroupIcon(Object.assign({ collapsed, groupIcon: defaultIcon }, renderOptions)) : defaultIcon;
2714
2728
  }
2715
- return /* @__PURE__ */ React6.createElement("div", {
2729
+ return /* @__PURE__ */ React7.createElement("div", {
2716
2730
  className: join(display.flex, alignItems.center, GroupRowExpanderCls)
2717
- }, icon, /* @__PURE__ */ React6.createElement("div", {
2731
+ }, icon, /* @__PURE__ */ React7.createElement("div", {
2718
2732
  className: cssEllipsisClassName
2719
2733
  }, value != null ? value : null));
2720
2734
  }
@@ -2733,7 +2747,7 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
2733
2747
  var import_react16 = __toModule(require("react"));
2734
2748
 
2735
2749
  // src/components/DataSource/index.tsx
2736
- var React7 = __toModule(require("react"));
2750
+ var React8 = __toModule(require("react"));
2737
2751
 
2738
2752
  // src/utils/multisort/sortTypes.ts
2739
2753
  var numberComparator = function(first, second) {
@@ -4526,7 +4540,7 @@ function DataSourceWithContext(props) {
4526
4540
  if (typeof children === "function") {
4527
4541
  children = children(computedValues);
4528
4542
  }
4529
- return /* @__PURE__ */ React7.createElement(React7.Fragment, null, children);
4543
+ return /* @__PURE__ */ React8.createElement(React8.Fragment, null, children);
4530
4544
  }
4531
4545
  var DataSourceRoot = getComponentStateRoot({
4532
4546
  initSetupState: initSetupState2,
@@ -4549,14 +4563,14 @@ function DataSourceCmp({ children }) {
4549
4563
  globalThis.getDataSourceState = getState;
4550
4564
  }
4551
4565
  useLoadData();
4552
- return /* @__PURE__ */ React7.createElement(DataSourceContext.Provider, {
4566
+ return /* @__PURE__ */ React8.createElement(DataSourceContext.Provider, {
4553
4567
  value: contextValue
4554
- }, /* @__PURE__ */ React7.createElement(DataSourceWithContext, {
4568
+ }, /* @__PURE__ */ React8.createElement(DataSourceWithContext, {
4555
4569
  children
4556
4570
  }));
4557
4571
  }
4558
4572
  function DataSource(props) {
4559
- return /* @__PURE__ */ React7.createElement(DataSourceRoot, __spreadValues({}, props), /* @__PURE__ */ React7.createElement(DataSourceCmp, {
4573
+ return /* @__PURE__ */ React8.createElement(DataSourceRoot, __spreadValues({}, props), /* @__PURE__ */ React8.createElement(DataSourceCmp, {
4560
4574
  children: props.children
4561
4575
  }));
4562
4576
  }
@@ -5093,7 +5107,7 @@ function useComputed() {
5093
5107
  }
5094
5108
 
5095
5109
  // src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
5096
- var React8 = __toModule(require("react"));
5110
+ var React9 = __toModule(require("react"));
5097
5111
 
5098
5112
  // src/components/InfiniteTable/hooks/useInternalProps.ts
5099
5113
  var useInternalProps = () => {
@@ -5101,9 +5115,9 @@ var useInternalProps = () => {
5101
5115
  };
5102
5116
 
5103
5117
  // src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
5104
- var InfiniteTableBody = React8.forwardRef(function InfiniteTableBody2(props, ref) {
5118
+ var InfiniteTableBody = React9.forwardRef(function InfiniteTableBody2(props, ref) {
5105
5119
  const { rootClassName: rootClassName12 } = useInternalProps();
5106
- return /* @__PURE__ */ React8.createElement("div", __spreadProps(__spreadValues({
5120
+ return /* @__PURE__ */ React9.createElement("div", __spreadProps(__spreadValues({
5107
5121
  ref
5108
5122
  }, props), {
5109
5123
  className: join(`${rootClassName12}Body`, position.relative, flex["1"], transformTranslateZero, props.className)
@@ -5111,16 +5125,16 @@ var InfiniteTableBody = React8.forwardRef(function InfiniteTableBody2(props, ref
5111
5125
  });
5112
5126
 
5113
5127
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx
5114
- var React20 = __toModule(require("react"));
5128
+ var React21 = __toModule(require("react"));
5115
5129
 
5116
5130
  // src/components/InfiniteTable/components/ScrollbarPlaceholder.tsx
5117
- var React9 = __toModule(require("react"));
5131
+ var React10 = __toModule(require("react"));
5118
5132
  function HorizontalScrollbarPlaceholderFn(props) {
5119
5133
  const scrollbarWidth2 = getScrollbarWidth();
5120
5134
  if (!scrollbarWidth2) {
5121
5135
  return null;
5122
5136
  }
5123
- return /* @__PURE__ */ React9.createElement("div", {
5137
+ return /* @__PURE__ */ React10.createElement("div", {
5124
5138
  "data-name": "horizontal-scrollbar-placeholder",
5125
5139
  style: __spreadValues({
5126
5140
  position: "absolute",
@@ -5130,13 +5144,13 @@ function HorizontalScrollbarPlaceholderFn(props) {
5130
5144
  }, props.style)
5131
5145
  });
5132
5146
  }
5133
- var HorizontalScrollbarPlaceholder = React9.memo(HorizontalScrollbarPlaceholderFn);
5147
+ var HorizontalScrollbarPlaceholder = React10.memo(HorizontalScrollbarPlaceholderFn);
5134
5148
  function VerticalScrollbarPlaceholderFn(props) {
5135
5149
  const scrollbarWidth2 = getScrollbarWidth();
5136
5150
  if (!scrollbarWidth2) {
5137
5151
  return null;
5138
5152
  }
5139
- return /* @__PURE__ */ React9.createElement("div", {
5153
+ return /* @__PURE__ */ React10.createElement("div", {
5140
5154
  "data-name": "vertical-scrollbar-placeholder",
5141
5155
  style: __spreadValues({
5142
5156
  position: "absolute",
@@ -5146,7 +5160,7 @@ function VerticalScrollbarPlaceholderFn(props) {
5146
5160
  }, props.style)
5147
5161
  });
5148
5162
  }
5149
- var VerticalScrollbarPlaceholder = React9.memo(VerticalScrollbarPlaceholderFn);
5163
+ var VerticalScrollbarPlaceholder = React10.memo(VerticalScrollbarPlaceholderFn);
5150
5164
 
5151
5165
  // src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
5152
5166
  var import_createRuntimeFn3 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
@@ -5161,15 +5175,15 @@ var HeaderSortIconCls = "_12zfob11 _16lm1iw1";
5161
5175
  var HeaderWrapperCls = "_12zfob1v _16lm1iw16 _16lm1iw1 _16lm1iwj _16lm1iw10";
5162
5176
 
5163
5177
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
5164
- var React16 = __toModule(require("react"));
5178
+ var React17 = __toModule(require("react"));
5165
5179
  var import_react26 = __toModule(require("react"));
5166
5180
 
5167
5181
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
5168
- var React12 = __toModule(require("react"));
5182
+ var React13 = __toModule(require("react"));
5169
5183
  var import_react22 = __toModule(require("react"));
5170
5184
 
5171
5185
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCell.tsx
5172
- var React10 = __toModule(require("react"));
5186
+ var React11 = __toModule(require("react"));
5173
5187
 
5174
5188
  // src/components/InfiniteTable/hooks/useInfiniteTableState.ts
5175
5189
  var import_react19 = __toModule(require("react"));
@@ -5191,7 +5205,7 @@ var { rootClassName: rootClassName2 } = internalProps;
5191
5205
  var InfiniteTableCellClassName = `${rootClassName2}Cell`;
5192
5206
  var InfiniteTableCellContentClassName = `${rootClassName2}Cell_content`;
5193
5207
  function InfiniteTableCellFn(props) {
5194
- var _b, _c;
5208
+ var _b, _c, _d, _e;
5195
5209
  const _a = props, {
5196
5210
  cssEllipsis = true,
5197
5211
  virtualized = true,
@@ -5199,10 +5213,12 @@ function InfiniteTableCellFn(props) {
5199
5213
  offsetProperty = "left",
5200
5214
  column,
5201
5215
  domRef,
5202
- children,
5203
5216
  afterChildren,
5204
5217
  beforeChildren,
5205
- offset
5218
+ offset,
5219
+ cellType,
5220
+ cssPosition: _cssPosition,
5221
+ renderChildren
5206
5222
  } = _a, domProps = __objRest(_a, [
5207
5223
  "cssEllipsis",
5208
5224
  "virtualized",
@@ -5210,11 +5226,14 @@ function InfiniteTableCellFn(props) {
5210
5226
  "offsetProperty",
5211
5227
  "column",
5212
5228
  "domRef",
5213
- "children",
5214
5229
  "afterChildren",
5215
5230
  "beforeChildren",
5216
- "offset"
5231
+ "offset",
5232
+ "cellType",
5233
+ "cssPosition",
5234
+ "renderChildren"
5217
5235
  ]);
5236
+ const children = renderChildren();
5218
5237
  const { columnShifts } = useInfiniteTableState();
5219
5238
  const shifting = !!columnShifts;
5220
5239
  const style = __spreadValues({
@@ -5229,16 +5248,23 @@ function InfiniteTableCellFn(props) {
5229
5248
  style.transform = `translate3d(${shiftLeft}px, 0px, 0px)`;
5230
5249
  }
5231
5250
  }
5232
- return /* @__PURE__ */ React10.createElement("div", __spreadProps(__spreadValues({}, domProps), {
5233
- ref: domRef,
5251
+ const finalDOMProps = __spreadProps(__spreadValues({}, domProps), {
5234
5252
  style,
5235
- "data-name": `Cell`,
5236
- className: join(domProps.className, columnAlignCellStyle[(_b = column.align) != null ? _b : "start"], justifyContent[(_c = column.align) != null ? _c : "start"], InfiniteTableCellClassName, ColumnCellCls, shifting ? `${InfiniteTableCellClassName}--shifting ${CellClsVariants.shifting}` : "")
5237
- }), beforeChildren, /* @__PURE__ */ React10.createElement("div", {
5238
- className: `${InfiniteTableCellContentClassName} ${cssEllipsis ? cssEllipsisClassName : overflow.hidden}`
5239
- }, children), afterChildren);
5253
+ "data-name": "Cell",
5254
+ className: join(domProps.className, columnAlignCellStyle[(_b = column.align) != null ? _b : "start"], justifyContent[(_c = column.align) != null ? _c : "start"], InfiniteTableCellClassName, ColumnCellCls, shifting ? `${InfiniteTableCellClassName}--shifting ${CellClsVariants.shifting}` : ""),
5255
+ children: /* @__PURE__ */ React11.createElement(React11.Fragment, null, beforeChildren, /* @__PURE__ */ React11.createElement("div", {
5256
+ className: `${InfiniteTableCellContentClassName} ${cssEllipsis ? cssEllipsisClassName : overflow.hidden}`
5257
+ }, children), afterChildren)
5258
+ });
5259
+ const RenderComponent = cellType === "body" ? (_d = column.components) == null ? void 0 : _d.ColumnCell : (_e = column.components) == null ? void 0 : _e.HeaderCell;
5260
+ if (RenderComponent) {
5261
+ return /* @__PURE__ */ React11.createElement(RenderComponent, __spreadValues({}, finalDOMProps));
5262
+ }
5263
+ return /* @__PURE__ */ React11.createElement("div", __spreadProps(__spreadValues({}, finalDOMProps), {
5264
+ ref: domRef
5265
+ }));
5240
5266
  }
5241
- var InfiniteTableCell = React10.memo(InfiniteTableCellFn);
5267
+ var InfiniteTableCell = React11.memo(InfiniteTableCellFn);
5242
5268
 
5243
5269
  // src/components/InfiniteTable/hooks/useColumnPointerEvents.ts
5244
5270
  var import_binary_search2 = __toModule(require_binary_search());
@@ -5433,7 +5459,7 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
5433
5459
  var import_react_dom = __toModule(require("react-dom"));
5434
5460
 
5435
5461
  // src/components/InfiniteTable/components/icons/SortIcon.tsx
5436
- var React11 = __toModule(require("react"));
5462
+ var React12 = __toModule(require("react"));
5437
5463
  var import_react21 = __toModule(require("react"));
5438
5464
  var defaultLineStyle = {
5439
5465
  marginTop: 2,
@@ -5488,23 +5514,24 @@ function SortIcon(props) {
5488
5514
  if (direction === -1) {
5489
5515
  indexStyle.top = "100%";
5490
5516
  }
5491
- return /* @__PURE__ */ React11.createElement("div", {
5517
+ return /* @__PURE__ */ React12.createElement("div", {
5492
5518
  style: __spreadProps(__spreadValues({}, style), { width: size }),
5493
5519
  className: join(className, InfiniteTableIconClassName, `${InfiniteTableIconClassName}-sort`)
5494
- }, showIndex ? /* @__PURE__ */ React11.createElement("div", {
5520
+ }, showIndex ? /* @__PURE__ */ React12.createElement("div", {
5495
5521
  "data-name": "index",
5496
5522
  style: indexStyle
5497
- }, index) : null, /* @__PURE__ */ React11.createElement("div", {
5523
+ }, index) : null, /* @__PURE__ */ React12.createElement("div", {
5498
5524
  style: __spreadValues({ width: sizes[0] }, lineStyle),
5499
5525
  onTransitionEnd
5500
- }), /* @__PURE__ */ React11.createElement("div", {
5526
+ }), /* @__PURE__ */ React12.createElement("div", {
5501
5527
  style: __spreadValues({ width: sizes[1] }, lineStyle)
5502
- }), /* @__PURE__ */ React11.createElement("div", {
5528
+ }), /* @__PURE__ */ React12.createElement("div", {
5503
5529
  style: __spreadValues({ width: sizes[2] }, lineStyle)
5504
5530
  }));
5505
5531
  }
5506
5532
 
5507
5533
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
5534
+ var InfiniteTableHeaderCellContext = React13.createContext(null);
5508
5535
  var defaultStyle = {
5509
5536
  position: "absolute",
5510
5537
  top: 0
@@ -5523,24 +5550,33 @@ function InfiniteTableHeaderCell(props) {
5523
5550
  }
5524
5551
  const sortInfo = column.computedSortInfo;
5525
5552
  let header = column.header;
5526
- if (header instanceof Function) {
5527
- header = header({
5528
- column,
5529
- columnSortInfo: sortInfo
5530
- });
5531
- }
5532
- header = header != null ? header : column.name;
5533
- const sortTool = /* @__PURE__ */ React12.createElement(SortIcon, {
5534
- index: column.computedMultiSort ? column.computedSortIndex + 1 : void 0,
5535
- className: `${InfiniteTableHeaderCellClassName}__sort-icon ${HeaderSortIconCls}`,
5536
- direction: column.computedSorted ? column.computedSortedAsc ? 1 : -1 : 0
5537
- });
5538
- const domRef = (0, import_react22.useRef)(null);
5539
5553
  const ref = (0, import_react22.useCallback)((node) => {
5540
5554
  var _a2;
5541
5555
  domRef.current = node;
5542
5556
  (_a2 = props.domRef) == null ? void 0 : _a2.call(props, node);
5543
5557
  }, [props.domRef]);
5558
+ const sortTool = /* @__PURE__ */ React13.createElement(SortIcon, {
5559
+ index: column.computedMultiSort ? column.computedSortIndex + 1 : void 0,
5560
+ className: `${InfiniteTableHeaderCellClassName}__sort-icon ${HeaderSortIconCls}`,
5561
+ direction: column.computedSorted ? column.computedSortedAsc ? 1 : -1 : 0
5562
+ });
5563
+ const renderParam = {
5564
+ domRef: ref,
5565
+ column,
5566
+ columnSortInfo: sortInfo,
5567
+ sortTool
5568
+ };
5569
+ const renderChildren = () => {
5570
+ if (header instanceof Function) {
5571
+ header = /* @__PURE__ */ React13.createElement(RenderHookComponent, {
5572
+ render: header,
5573
+ renderParam
5574
+ });
5575
+ }
5576
+ header = header != null ? header : column.name;
5577
+ return header;
5578
+ };
5579
+ const domRef = (0, import_react22.useRef)(null);
5544
5580
  const {
5545
5581
  computed: { computedRemainingSpace },
5546
5582
  componentState: { portalDOMRef }
@@ -5568,7 +5604,7 @@ function InfiniteTableHeaderCell(props) {
5568
5604
  let offset = offsetFromProps != null ? offsetFromProps : virtualized ? 0 : column.computedPinningOffset;
5569
5605
  let draggingProxy = null;
5570
5606
  if (dragging) {
5571
- draggingProxy = /* @__PURE__ */ React12.createElement("div", {
5607
+ draggingProxy = /* @__PURE__ */ React13.createElement("div", {
5572
5608
  className: `${InfiniteTableHeaderCellClassName}Proxy ${HeaderCellProxy}`,
5573
5609
  style: {
5574
5610
  position: "absolute",
@@ -5581,8 +5617,12 @@ function InfiniteTableHeaderCell(props) {
5581
5617
  }, header);
5582
5618
  draggingProxy = (0, import_react_dom.createPortal)(draggingProxy, portalDOMRef.current);
5583
5619
  }
5584
- return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(InfiniteTableCell, {
5620
+ const ContextProvider = InfiniteTableHeaderCellContext.Provider;
5621
+ return /* @__PURE__ */ React13.createElement(ContextProvider, {
5622
+ value: renderParam
5623
+ }, /* @__PURE__ */ React13.createElement(InfiniteTableCell, {
5585
5624
  domRef: ref,
5625
+ cellType: "header",
5586
5626
  column,
5587
5627
  "data-name": `HeaderCell`,
5588
5628
  "data-column-id": column.id,
@@ -5592,16 +5632,21 @@ function InfiniteTableHeaderCell(props) {
5592
5632
  onPointerUp,
5593
5633
  className: join(InfiniteTableHeaderCellClassName, userSelect.none, column.computedSortable ? cursor.pointer : "", useCellClassName(column, [InfiniteTableHeaderCellClassName, InfiniteTableCellClassName], HeaderCellRecipe, { dragging }), CellCls),
5594
5634
  cssEllipsis: (_d = (_c = column.headerCssEllipsis) != null ? _c : column.cssEllipsis) != null ? _d : true,
5595
- afterChildren: sortTool
5596
- }, header), draggingProxy);
5635
+ afterChildren: sortTool,
5636
+ renderChildren
5637
+ }), draggingProxy);
5638
+ }
5639
+ function useInfiniteHeaderCell() {
5640
+ const result = (0, import_react22.useContext)(InfiniteTableHeaderCellContext);
5641
+ return result;
5597
5642
  }
5598
5643
 
5599
5644
  // src/components/RawList/index.tsx
5600
- var React15 = __toModule(require("react"));
5645
+ var React16 = __toModule(require("react"));
5601
5646
  var import_react25 = __toModule(require("react"));
5602
5647
 
5603
5648
  // src/components/RawList/AvoidReactDiff.tsx
5604
- var React13 = __toModule(require("react"));
5649
+ var React14 = __toModule(require("react"));
5605
5650
  var import_react23 = __toModule(require("react"));
5606
5651
  function AvoidReactDiffFn(props) {
5607
5652
  const [children, setChildren] = (0, import_react23.useState)(props.updater.get());
@@ -5611,15 +5656,15 @@ function AvoidReactDiffFn(props) {
5611
5656
  });
5612
5657
  return remove;
5613
5658
  }, [props.updater]);
5614
- return /* @__PURE__ */ React13.createElement(React13.Fragment, null, children);
5659
+ return /* @__PURE__ */ React14.createElement(React14.Fragment, null, children);
5615
5660
  }
5616
- var AvoidReactDiff = React13.memo(AvoidReactDiffFn);
5661
+ var AvoidReactDiff = React14.memo(AvoidReactDiffFn);
5617
5662
 
5618
5663
  // src/components/RawList/useVirtualRenderer.ts
5619
5664
  var import_react24 = __toModule(require("react"));
5620
5665
 
5621
5666
  // src/components/RawList/ReactVirtualRenderer.tsx
5622
- var React14 = __toModule(require("react"));
5667
+ var React15 = __toModule(require("react"));
5623
5668
 
5624
5669
  // src/components/RawList/MappedItems.ts
5625
5670
  var MappedItems = class extends Logger {
@@ -5864,7 +5909,7 @@ var ReactVirtualRenderer = class extends Logger {
5864
5909
  };
5865
5910
  this.itemDOMRefs[elementIndex] = domRef;
5866
5911
  this.updaters[elementIndex] = buildSubscriptionCallback();
5867
- const item = /* @__PURE__ */ React14.createElement(AvoidReactDiff, {
5912
+ const item = /* @__PURE__ */ React15.createElement(AvoidReactDiff, {
5868
5913
  key: elementIndex,
5869
5914
  name: `${elementIndex}`,
5870
5915
  updater: this.updaters[elementIndex]
@@ -5961,11 +6006,11 @@ function RawListFn(props) {
5961
6006
  });
5962
6007
  return remove;
5963
6008
  }, [brain, onRenderUpdater]);
5964
- return /* @__PURE__ */ React15.createElement(AvoidReactDiff, {
6009
+ return /* @__PURE__ */ React16.createElement(AvoidReactDiff, {
5965
6010
  updater: onRenderUpdater
5966
6011
  });
5967
6012
  }
5968
- var RawList = React15.memo(RawListFn);
6013
+ var RawList = React16.memo(RawListFn);
5969
6014
 
5970
6015
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
5971
6016
  var debug3 = dbg("Header");
@@ -5986,7 +6031,7 @@ function InfiniteTableHeaderFn(props) {
5986
6031
  }
5987
6032
  return null;
5988
6033
  }
5989
- return /* @__PURE__ */ React16.createElement(InfiniteTableHeaderCell, {
6034
+ return /* @__PURE__ */ React17.createElement(InfiniteTableHeaderCell, {
5990
6035
  domRef: domRef2,
5991
6036
  column,
5992
6037
  headerHeight,
@@ -6013,18 +6058,18 @@ function InfiniteTableHeaderFn(props) {
6013
6058
  className: join(TableHeaderClassName, `${TableHeaderClassName}--virtualized`, className, headerCls),
6014
6059
  style
6015
6060
  };
6016
- return /* @__PURE__ */ React16.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React16.createElement(RawList, {
6061
+ return /* @__PURE__ */ React17.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React17.createElement(RawList, {
6017
6062
  brain,
6018
6063
  renderItem: renderColumn
6019
6064
  }));
6020
6065
  }
6021
- var InfiniteTableHeader = React16.memo(InfiniteTableHeaderFn);
6066
+ var InfiniteTableHeader = React17.memo(InfiniteTableHeaderFn);
6022
6067
 
6023
6068
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderUnvirtualized.tsx
6024
- var React19 = __toModule(require("react"));
6069
+ var React20 = __toModule(require("react"));
6025
6070
 
6026
6071
  // src/components/InfiniteTable/components/InfiniteTableHeader/renderColumnHeaderGroups.tsx
6027
- var React18 = __toModule(require("react"));
6072
+ var React19 = __toModule(require("react"));
6028
6073
 
6029
6074
  // src/components/InfiniteTable/components/InfiniteTableHeader/buildColumnAndGroupTree.ts
6030
6075
  function buildColumnAndGroupTree(columns, columnGroups, columnGroupsDepthsMap) {
@@ -6114,7 +6159,7 @@ function assignGroupOffsetsAndComputedWidths(items, groupOffset = 0) {
6114
6159
  }
6115
6160
 
6116
6161
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
6117
- var React17 = __toModule(require("react"));
6162
+ var React18 = __toModule(require("react"));
6118
6163
  var TableHeaderGroupClassName = `${rootClassName}HeaderGroup`;
6119
6164
  function InfiniteTableHeaderGroup(props) {
6120
6165
  const { columnGroup, height, headerHeight } = props;
@@ -6128,16 +6173,16 @@ function InfiniteTableHeaderGroup(props) {
6128
6173
  width: columnGroup.computedWidth,
6129
6174
  height
6130
6175
  };
6131
- return /* @__PURE__ */ React17.createElement("div", {
6176
+ return /* @__PURE__ */ React18.createElement("div", {
6132
6177
  "data-group-id": columnGroup.id,
6133
6178
  className: join(HeaderGroupCls, TableHeaderGroupClassName, `${TableHeaderGroupClassName}--unvirtualized`),
6134
6179
  style
6135
- }, /* @__PURE__ */ React17.createElement("div", {
6180
+ }, /* @__PURE__ */ React18.createElement("div", {
6136
6181
  className: join(`${TableHeaderGroupClassName}__header`, HeaderGroup_Header),
6137
6182
  style: { height: headerHeight }
6138
- }, /* @__PURE__ */ React17.createElement("div", {
6183
+ }, /* @__PURE__ */ React18.createElement("div", {
6139
6184
  className: join(`${TableHeaderGroupClassName}__header-content`, cssEllipsisClassName)
6140
- }, header)), /* @__PURE__ */ React17.createElement("div", {
6185
+ }, header)), /* @__PURE__ */ React18.createElement("div", {
6141
6186
  className: join(`${TableHeaderGroupClassName}__children`, HeaderGroup_Children)
6142
6187
  }, props.children));
6143
6188
  }
@@ -6160,7 +6205,7 @@ function renderColumnHeaderGroups(config) {
6160
6205
  return items2.map((colGroupItem) => {
6161
6206
  if (colGroupItem.type === "column") {
6162
6207
  const col = colGroupItem.ref;
6163
- return /* @__PURE__ */ React18.createElement(InfiniteTableHeaderCell, {
6208
+ return /* @__PURE__ */ React19.createElement(InfiniteTableHeaderCell, {
6164
6209
  key: col.id,
6165
6210
  headerHeight: (columnGroupsMaxDepth - colGroupItem.depth + 2) * headerHeight,
6166
6211
  column: col,
@@ -6174,7 +6219,7 @@ function renderColumnHeaderGroups(config) {
6174
6219
  colIds.push(col.id);
6175
6220
  return col;
6176
6221
  });
6177
- return /* @__PURE__ */ React18.createElement(InfiniteTableHeaderGroup, {
6222
+ return /* @__PURE__ */ React19.createElement(InfiniteTableHeaderGroup, {
6178
6223
  key: `${colGroupItem.uniqueGroupId.join("/")}`,
6179
6224
  columns: columns2,
6180
6225
  height: (columnGroupsMaxDepth - colGroupItem.depth + 2) * headerHeight,
@@ -6227,9 +6272,9 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
6227
6272
  },
6228
6273
  computed: { computedVisibleColumnsMap: columnsMap }
6229
6274
  } = useInfiniteTable();
6230
- const domRef = React19.useRef(null);
6275
+ const domRef = React20.useRef(null);
6231
6276
  const hasColumnGroups = computedColumnGroups.size > 0;
6232
- const columnHeaderGroups = React19.useMemo(() => {
6277
+ const columnHeaderGroups = React20.useMemo(() => {
6233
6278
  return hasColumnGroups ? renderColumnHeaderGroups({
6234
6279
  columnGroups: computedColumnGroups,
6235
6280
  columnGroupsDepthsMap,
@@ -6248,7 +6293,7 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
6248
6293
  columnGroupsMaxDepth
6249
6294
  ]);
6250
6295
  const children = hasColumnGroups ? columnHeaderGroups : columns.map((c) => {
6251
- return /* @__PURE__ */ React19.createElement(InfiniteTableHeaderCell, {
6296
+ return /* @__PURE__ */ React20.createElement(InfiniteTableHeaderCell, {
6252
6297
  key: c.id,
6253
6298
  headerHeight,
6254
6299
  column: c,
@@ -6273,20 +6318,20 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
6273
6318
  const removeOnScroll = scroller.onScroll(onScroll);
6274
6319
  return removeOnScroll;
6275
6320
  }, [brain, scrollListener]);
6276
- return /* @__PURE__ */ React19.createElement("div", __spreadProps(__spreadValues({}, domProps), {
6321
+ return /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({}, domProps), {
6277
6322
  className: join(TableHeaderClassName2, `${TableHeaderClassName2}--unvirtualized`, pinning ? `${TableHeaderClassName2}--pinned ${TableHeaderClassName2}-${pinning}` : "", scrollable ? `${TableHeaderClassName2}--overflow` : "", domProps.className, HeaderClsRecipe({
6278
6323
  pinned: pinning,
6279
6324
  virtualized: false,
6280
6325
  overflow: scrollable
6281
6326
  })),
6282
6327
  style
6283
- }), /* @__PURE__ */ React19.createElement("div", {
6328
+ }), /* @__PURE__ */ React20.createElement("div", {
6284
6329
  style: { width: totalWidth },
6285
6330
  className: join(flexFlow.row, display.flex),
6286
6331
  ref: domRef
6287
6332
  }, children));
6288
6333
  }
6289
- var InfiniteTableHeaderUnvirtualized = React19.memo(InfiniteTableHeaderUnvirtualizedFn);
6334
+ var InfiniteTableHeaderUnvirtualized = React20.memo(InfiniteTableHeaderUnvirtualizedFn);
6290
6335
 
6291
6336
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx
6292
6337
  function TableHeaderWrapper(props) {
@@ -6319,7 +6364,7 @@ function TableHeaderWrapper(props) {
6319
6364
  const unvirtualizedStyle = !virtualizeHeader && computedPinnedStartColumnsWidth ? {
6320
6365
  left: computedPinnedStartWidth
6321
6366
  } : void 0;
6322
- const header = virtualizeHeader ? /* @__PURE__ */ React20.createElement(InfiniteTableHeader, {
6367
+ const header = virtualizeHeader ? /* @__PURE__ */ React21.createElement(InfiniteTableHeader, {
6323
6368
  columns: computedUnpinnedColumns,
6324
6369
  repaintId: virtualizeHeader ? repaintId : void 0,
6325
6370
  brain,
@@ -6332,7 +6377,7 @@ function TableHeaderWrapper(props) {
6332
6377
  },
6333
6378
  availableWidth: computedUnpinnedColumnsWidth,
6334
6379
  totalWidth: computedUnpinnedColumnsWidth
6335
- }) : /* @__PURE__ */ React20.createElement(InfiniteTableHeaderUnvirtualized, {
6380
+ }) : /* @__PURE__ */ React21.createElement(InfiniteTableHeaderUnvirtualized, {
6336
6381
  style: unvirtualizedStyle,
6337
6382
  brain,
6338
6383
  scrollable: true,
@@ -6341,12 +6386,12 @@ function TableHeaderWrapper(props) {
6341
6386
  availableWidth: computedUnpinnedColumnsWidth,
6342
6387
  totalWidth: computedUnpinnedColumnsWidth
6343
6388
  });
6344
- return /* @__PURE__ */ React20.createElement("div", {
6389
+ return /* @__PURE__ */ React21.createElement("div", {
6345
6390
  className: HeaderWrapperCls,
6346
6391
  style: {
6347
6392
  height: virtualizeHeader ? height : void 0
6348
6393
  }
6349
- }, hasPinnedStart ? /* @__PURE__ */ React20.createElement(InfiniteTableHeaderUnvirtualized, {
6394
+ }, hasPinnedStart ? /* @__PURE__ */ React21.createElement(InfiniteTableHeaderUnvirtualized, {
6350
6395
  style: {
6351
6396
  left: 0,
6352
6397
  position: "absolute",
@@ -6358,7 +6403,7 @@ function TableHeaderWrapper(props) {
6358
6403
  scrollable: computedPinnedStartOverflow,
6359
6404
  pinning: "start",
6360
6405
  scrollListener: computedPinnedStartOverflow ? pinnedStartScrollListener : void 0
6361
- }) : null, header, hasPinnedEnd ? /* @__PURE__ */ React20.createElement(InfiniteTableHeaderUnvirtualized, {
6406
+ }) : null, header, hasPinnedEnd ? /* @__PURE__ */ React21.createElement(InfiniteTableHeaderUnvirtualized, {
6362
6407
  style: {
6363
6408
  right: scrollbars.vertical ? getScrollbarWidth() : 0,
6364
6409
  position: "absolute",
@@ -6370,7 +6415,7 @@ function TableHeaderWrapper(props) {
6370
6415
  scrollable: computedPinnedEndOverflow,
6371
6416
  pinning: "end",
6372
6417
  scrollListener: computedPinnedEndOverflow ? pinnedEndScrollListener : void 0
6373
- }) : null, scrollbars.vertical ? /* @__PURE__ */ React20.createElement(VerticalScrollbarPlaceholder, {
6418
+ }) : null, scrollbars.vertical ? /* @__PURE__ */ React21.createElement(VerticalScrollbarPlaceholder, {
6374
6419
  style: {
6375
6420
  height: "100%",
6376
6421
  right: 0
@@ -6379,7 +6424,7 @@ function TableHeaderWrapper(props) {
6379
6424
  }
6380
6425
 
6381
6426
  // src/components/VirtualScrollContainer/index.tsx
6382
- var React21 = __toModule(require("react"));
6427
+ var React22 = __toModule(require("react"));
6383
6428
  var import_react29 = __toModule(require("react"));
6384
6429
 
6385
6430
  // src/components/hooks/useOnScroll.ts
@@ -6423,7 +6468,7 @@ var getScrollableClassName = (scrollable) => {
6423
6468
 
6424
6469
  // src/components/VirtualScrollContainer/index.tsx
6425
6470
  var rootClassName6 = "InfiniteVirtualScrollContainer";
6426
- var VirtualScrollContainer = React21.forwardRef(function VirtualScrollContainer2(props, ref) {
6471
+ var VirtualScrollContainer = React22.forwardRef(function VirtualScrollContainer2(props, ref) {
6427
6472
  const {
6428
6473
  children,
6429
6474
  scrollable = true,
@@ -6433,7 +6478,7 @@ var VirtualScrollContainer = React21.forwardRef(function VirtualScrollContainer2
6433
6478
  } = props;
6434
6479
  const domRef = ref != null ? ref : (0, import_react29.useRef)(null);
6435
6480
  useOnScroll(domRef, onContainerScroll);
6436
- return /* @__PURE__ */ React21.createElement("div", {
6481
+ return /* @__PURE__ */ React22.createElement("div", {
6437
6482
  ref: domRef,
6438
6483
  style,
6439
6484
  className: join(className, rootClassName6, VirtualScrollContainerCls, getScrollableClassName(scrollable))
@@ -6441,7 +6486,7 @@ var VirtualScrollContainer = React21.forwardRef(function VirtualScrollContainer2
6441
6486
  });
6442
6487
 
6443
6488
  // src/components/VirtualList/SpacePlaceholder.tsx
6444
- var React22 = __toModule(require("react"));
6489
+ var React23 = __toModule(require("react"));
6445
6490
  function SpacePlaceholderFn(props) {
6446
6491
  const { height, width, count } = props;
6447
6492
  const style = {
@@ -6451,7 +6496,7 @@ function SpacePlaceholderFn(props) {
6451
6496
  opacity: 0,
6452
6497
  pointerEvents: "none"
6453
6498
  };
6454
- return /* @__PURE__ */ React22.createElement("div", {
6499
+ return /* @__PURE__ */ React23.createElement("div", {
6455
6500
  "data-count": count,
6456
6501
  "data-placeholder-width": true ? width : void 0,
6457
6502
  "data-placeholder-height": true ? height : void 0,
@@ -6459,20 +6504,20 @@ function SpacePlaceholderFn(props) {
6459
6504
  style
6460
6505
  });
6461
6506
  }
6462
- var SpacePlaceholder = React22.memo(SpacePlaceholderFn);
6507
+ var SpacePlaceholder = React23.memo(SpacePlaceholderFn);
6463
6508
 
6464
6509
  // src/components/InfiniteTable/hooks/useListRendering.tsx
6465
- var import_react40 = __toModule(require("react"));
6510
+ var import_react41 = __toModule(require("react"));
6466
6511
 
6467
6512
  // src/components/InfiniteTable/hooks/useUnpinnedRendering.tsx
6468
- var React28 = __toModule(require("react"));
6469
- var import_react33 = __toModule(require("react"));
6513
+ var React29 = __toModule(require("react"));
6514
+ var import_react34 = __toModule(require("react"));
6470
6515
 
6471
6516
  // src/components/VirtualList/VirtualRowList.tsx
6472
- var React24 = __toModule(require("react"));
6517
+ var React25 = __toModule(require("react"));
6473
6518
 
6474
6519
  // src/components/VirtualList/VirtualList.tsx
6475
- var React23 = __toModule(require("react"));
6520
+ var React24 = __toModule(require("react"));
6476
6521
  var import_react30 = __toModule(require("react"));
6477
6522
 
6478
6523
  // src/components/VirtualList/VirtualList.css.ts
@@ -6554,19 +6599,19 @@ var VirtualList = (props) => {
6554
6599
  if (true) {
6555
6600
  domProps["data-cmp-name"] = `VirtualList`;
6556
6601
  }
6557
- return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React23.createElement(VirtualScrollContainer, {
6602
+ return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React24.createElement(VirtualScrollContainer, {
6558
6603
  scrollable,
6559
6604
  onContainerScroll
6560
- }, /* @__PURE__ */ React23.createElement("div", {
6605
+ }, /* @__PURE__ */ React24.createElement("div", {
6561
6606
  ref: domRef,
6562
6607
  className: scrollTransformTargetCls,
6563
6608
  "data-name": "scroll-transform-target"
6564
- }, /* @__PURE__ */ React23.createElement(RawList, {
6609
+ }, /* @__PURE__ */ React24.createElement(RawList, {
6565
6610
  brain: virtualBrain,
6566
6611
  renderItem,
6567
6612
  repaintId,
6568
6613
  debugChannel: "VirtualList-" + mainAxis
6569
- })), children, /* @__PURE__ */ React23.createElement(SpacePlaceholder, {
6614
+ })), children, /* @__PURE__ */ React24.createElement(SpacePlaceholder, {
6570
6615
  count,
6571
6616
  width,
6572
6617
  height
@@ -6576,14 +6621,14 @@ var VirtualList = (props) => {
6576
6621
  // src/components/VirtualList/VirtualRowList.tsx
6577
6622
  var VirtualRowList = (props) => {
6578
6623
  const _a = props, { rowWidth, rowHeight, renderRow } = _a, listProps = __objRest(_a, ["rowWidth", "rowHeight", "renderRow"]);
6579
- const renderItem = React24.useCallback((renderProps) => {
6624
+ const renderItem = React25.useCallback((renderProps) => {
6580
6625
  return renderRow({
6581
6626
  domRef: renderProps.domRef,
6582
6627
  rowHeight: renderProps.itemSize,
6583
6628
  rowIndex: renderProps.itemIndex
6584
6629
  });
6585
6630
  }, [renderRow]);
6586
- return /* @__PURE__ */ React24.createElement(VirtualList, __spreadProps(__spreadValues({}, listProps), {
6631
+ return /* @__PURE__ */ React25.createElement(VirtualList, __spreadProps(__spreadValues({}, listProps), {
6587
6632
  renderItem,
6588
6633
  mainAxis: "vertical",
6589
6634
  itemMainAxisSize: rowHeight,
@@ -6592,12 +6637,14 @@ var VirtualRowList = (props) => {
6592
6637
  };
6593
6638
 
6594
6639
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRow.tsx
6595
- var React26 = __toModule(require("react"));
6596
- var import_react32 = __toModule(require("react"));
6640
+ var React27 = __toModule(require("react"));
6641
+ var import_react33 = __toModule(require("react"));
6597
6642
 
6598
6643
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx
6599
- var React25 = __toModule(require("react"));
6644
+ var React26 = __toModule(require("react"));
6645
+ var import_react31 = __toModule(require("react"));
6600
6646
  var { rootClassName: rootClassName8 } = internalProps;
6647
+ var InfiniteTableColumnCellContext = React26.createContext(null);
6601
6648
  var InfiniteTableColumnCellClassName = `${rootClassName8}ColumnCell`;
6602
6649
  function isColumnWithField(c) {
6603
6650
  return typeof c.field === "string";
@@ -6644,24 +6691,31 @@ function InfiniteTableColumnCellFn(props) {
6644
6691
  column
6645
6692
  }, rest);
6646
6693
  let renderValue = value;
6647
- if (column.render || column.renderValue) {
6648
- const renderParam = __spreadProps(__spreadValues({
6649
- value,
6650
- column,
6651
- groupRowInfo
6652
- }, rest), {
6653
- rowIndex,
6654
- toggleGroupRow,
6655
- toggleCurrentGroupRow: () => toggleGroupRow(rowInfo.groupKeys),
6656
- groupBy: computedDataSource.groupBy,
6657
- pivotBy: computedDataSource.pivotBy
6658
- });
6659
- if (column.render) {
6660
- renderValue = column.render(renderParam);
6661
- } else if (column.renderValue) {
6662
- renderValue = column.renderValue(renderParam);
6694
+ const renderParam = __spreadProps(__spreadValues({
6695
+ value,
6696
+ column,
6697
+ domRef,
6698
+ groupRowInfo
6699
+ }, rest), {
6700
+ rowIndex,
6701
+ toggleGroupRow,
6702
+ toggleCurrentGroupRow: () => toggleGroupRow(rowInfo.groupKeys),
6703
+ groupBy: computedDataSource.groupBy,
6704
+ pivotBy: computedDataSource.pivotBy
6705
+ });
6706
+ const renderChildren = () => {
6707
+ if (hidden) {
6708
+ return null;
6663
6709
  }
6664
- }
6710
+ const renderFn = column.render || column.renderValue;
6711
+ if (renderFn) {
6712
+ return /* @__PURE__ */ React26.createElement(RenderHookComponent, {
6713
+ render: renderFn,
6714
+ renderParam
6715
+ });
6716
+ }
6717
+ return renderValue;
6718
+ };
6665
6719
  const colClassName = column.className ? typeof column.className === "function" ? column.className(stylingRenderParam) : column.className : void 0;
6666
6720
  const colStyle = column.style ? typeof column.style === "function" ? column.style(stylingRenderParam) : column.style : void 0;
6667
6721
  const style = colStyle ? __spreadProps(__spreadValues({}, colStyle), {
@@ -6689,21 +6743,31 @@ function InfiniteTableColumnCellFn(props) {
6689
6743
  }
6690
6744
  }
6691
6745
  }
6692
- return /* @__PURE__ */ React25.createElement(InfiniteTableCell, __spreadProps(__spreadValues({
6746
+ const cellProps = __spreadProps(__spreadValues({
6693
6747
  domRef,
6694
6748
  offsetProperty
6695
6749
  }, dataset), {
6750
+ cellType: "body",
6696
6751
  column,
6697
6752
  offset: virtualized ? 0 : column.computedPinningOffset,
6698
6753
  style,
6699
6754
  cssEllipsis: (_a = column.cssEllipsis) != null ? _a : true,
6700
- className: join(useCellClassName(column, [InfiniteTableColumnCellClassName, InfiniteTableCellClassName], ColumnCellRecipe, { dragging: false }), colClassName)
6701
- }), hidden ? null : renderValue);
6755
+ className: join(useCellClassName(column, [InfiniteTableColumnCellClassName, InfiniteTableCellClassName], ColumnCellRecipe, { dragging: false }), colClassName),
6756
+ renderChildren
6757
+ });
6758
+ const ContextProvider = InfiniteTableColumnCellContext.Provider;
6759
+ return /* @__PURE__ */ React26.createElement(ContextProvider, {
6760
+ value: renderParam
6761
+ }, /* @__PURE__ */ React26.createElement(InfiniteTableCell, __spreadValues({}, cellProps)));
6762
+ }
6763
+ var InfiniteTableColumnCell = React26.memo(InfiniteTableColumnCellFn);
6764
+ function useInfiniteColumnCell() {
6765
+ const result = (0, import_react31.useContext)(InfiniteTableColumnCellContext);
6766
+ return result;
6702
6767
  }
6703
- var InfiniteTableColumnCell = React25.memo(InfiniteTableColumnCellFn);
6704
6768
 
6705
6769
  // src/components/InfiniteTable/components/InfiniteTableRow/useRowDOMProps.ts
6706
- var import_react31 = __toModule(require("react"));
6770
+ var import_react32 = __toModule(require("react"));
6707
6771
 
6708
6772
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowClassName.ts
6709
6773
  var { rootClassName: rootClassName9 } = internalProps;
@@ -6729,8 +6793,8 @@ function useRowDOMProps(props, rowProps, rowStyle, rowClassName, groupRenderStra
6729
6793
  rowInfo,
6730
6794
  rowSpan
6731
6795
  } = props;
6732
- const domRef = (0, import_react31.useRef)(null);
6733
- const rowDOMRef = (0, import_react31.useCallback)((node) => {
6796
+ const domRef = (0, import_react32.useRef)(null);
6797
+ const rowDOMRef = (0, import_react32.useCallback)((node) => {
6734
6798
  domRefFromProps(node);
6735
6799
  domRef.current = node;
6736
6800
  }, []);
@@ -6761,7 +6825,7 @@ function useRowDOMProps(props, rowProps, rowStyle, rowClassName, groupRenderStra
6761
6825
  }), `${InfiniteTableRowClassName}--${rowInfo.isGroupRow ? "group" : "normal"}-row`, inlineGroupRoot ? `${InfiniteTableRowClassName}--inline-group-row` : "", showZebraRows ? `${InfiniteTableRowClassName}--${odd ? "odd" : "even"}` : null, showHoverRows ? `${InfiniteTableRowClassName}--show-hover` : null, domProps == null ? void 0 : domProps.className, rowProps == null ? void 0 : rowProps.className, rowComputedClassName);
6762
6826
  const initialMouseEnter = rowProps == null ? void 0 : rowProps.onMouseEnter;
6763
6827
  const initialMouseLeave = rowProps == null ? void 0 : rowProps.onMouseLeave;
6764
- const onMouseEnter = (0, import_react31.useCallback)((event) => {
6828
+ const onMouseEnter = (0, import_react32.useCallback)((event) => {
6765
6829
  var _a;
6766
6830
  initialMouseEnter == null ? void 0 : initialMouseEnter(event);
6767
6831
  const rowIndex2 = ((_a = event.currentTarget) == null ? void 0 : _a.dataset.rowIndex) * 1;
@@ -6775,7 +6839,7 @@ function useRowDOMProps(props, rowProps, rowStyle, rowClassName, groupRenderStra
6775
6839
  const rows = parentNode.querySelectorAll(hoverSelector.join(","));
6776
6840
  rows.forEach((row) => row.classList.add(InfiniteTableRowClassName__hover, RowHoverCls));
6777
6841
  }, [initialMouseEnter, showHoverRows]);
6778
- const onMouseLeave = (0, import_react31.useCallback)((event) => {
6842
+ const onMouseLeave = (0, import_react32.useCallback)((event) => {
6779
6843
  var _a;
6780
6844
  initialMouseLeave == null ? void 0 : initialMouseLeave(event);
6781
6845
  const rowIndex2 = (_a = event.currentTarget) == null ? void 0 : _a.dataset.rowIndex;
@@ -6831,13 +6895,13 @@ function InfiniteTableRowFn(props) {
6831
6895
  width: rowWidth,
6832
6896
  height: rowHeight
6833
6897
  }, domProps.style);
6834
- const renderCellRef = (0, import_react32.useRef)(null);
6835
- const renderCell = React26.useCallback(({ domRef, itemIndex }) => {
6898
+ const renderCellRef = (0, import_react33.useRef)(null);
6899
+ const renderCell = React27.useCallback(({ domRef, itemIndex }) => {
6836
6900
  const column = columns[itemIndex];
6837
6901
  if (!column) {
6838
6902
  }
6839
6903
  const hidden = false;
6840
- return /* @__PURE__ */ React26.createElement(InfiniteTableColumnCell, {
6904
+ return /* @__PURE__ */ React27.createElement(InfiniteTableColumnCell, {
6841
6905
  getData,
6842
6906
  rowInfo,
6843
6907
  groupRenderStrategy,
@@ -6864,18 +6928,18 @@ function InfiniteTableRowFn(props) {
6864
6928
  if (true) {
6865
6929
  domProps["data-cmp-name"] = "ITableRow";
6866
6930
  }
6867
- return /* @__PURE__ */ React26.createElement("div", __spreadProps(__spreadValues({}, domProps), {
6931
+ return /* @__PURE__ */ React27.createElement("div", __spreadProps(__spreadValues({}, domProps), {
6868
6932
  style
6869
- }), /* @__PURE__ */ React26.createElement(RawList, {
6933
+ }), /* @__PURE__ */ React27.createElement(RawList, {
6870
6934
  brain,
6871
6935
  renderItem: renderCell,
6872
6936
  debugChannel: `${rowIndex}`
6873
6937
  }));
6874
6938
  }
6875
- var InfiniteTableRow = React26.memo(InfiniteTableRowFn);
6939
+ var InfiniteTableRow = React27.memo(InfiniteTableRowFn);
6876
6940
 
6877
6941
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowUnvirtualized.tsx
6878
- var React27 = __toModule(require("react"));
6942
+ var React28 = __toModule(require("react"));
6879
6943
  function TableRowUnvirtualizedFn(props) {
6880
6944
  const {
6881
6945
  rowHeight,
@@ -6896,7 +6960,7 @@ function TableRowUnvirtualizedFn(props) {
6896
6960
  }, domProps.style);
6897
6961
  const children = columns.map((col) => {
6898
6962
  const hidden = false;
6899
- return /* @__PURE__ */ React27.createElement(InfiniteTableColumnCell, {
6963
+ return /* @__PURE__ */ React28.createElement(InfiniteTableColumnCell, {
6900
6964
  key: col.id,
6901
6965
  virtualized: false,
6902
6966
  rowHeight,
@@ -6909,11 +6973,11 @@ function TableRowUnvirtualizedFn(props) {
6909
6973
  column: col
6910
6974
  });
6911
6975
  });
6912
- return /* @__PURE__ */ React27.createElement("div", __spreadProps(__spreadValues({}, domProps), {
6976
+ return /* @__PURE__ */ React28.createElement("div", __spreadProps(__spreadValues({}, domProps), {
6913
6977
  style
6914
6978
  }), children);
6915
6979
  }
6916
- var TableRowUnvirtualized = React27.memo(TableRowUnvirtualizedFn);
6980
+ var TableRowUnvirtualized = React28.memo(TableRowUnvirtualizedFn);
6917
6981
 
6918
6982
  // src/components/InfiniteTable/hooks/useUnpinnedRendering.tsx
6919
6983
  function useUnpinnedRendering(params) {
@@ -6936,7 +7000,7 @@ function useUnpinnedRendering(params) {
6936
7000
  } = params;
6937
7001
  const { virtualizeColumns } = getState();
6938
7002
  const shouldVirtualizeColumns = typeof virtualizeColumns === "function" ? virtualizeColumns(computedUnpinnedColumns) : virtualizeColumns != null ? virtualizeColumns : true;
6939
- const renderRowUnpinned = (0, import_react33.useCallback)((rowParams) => {
7003
+ const renderRowUnpinned = (0, import_react34.useCallback)((rowParams) => {
6940
7004
  const dataArray = getData();
6941
7005
  const rowInfo = dataArray[rowParams.rowIndex];
6942
7006
  const { showZebraRows, showHoverRows } = getState();
@@ -6958,7 +7022,7 @@ function useUnpinnedRendering(params) {
6958
7022
  rowProps.repaintId = repaintId;
6959
7023
  }
6960
7024
  const TableRowComponent = shouldVirtualizeColumns ? InfiniteTableRow : TableRowUnvirtualized;
6961
- return /* @__PURE__ */ React28.createElement(TableRowComponent, __spreadValues({}, rowProps));
7025
+ return /* @__PURE__ */ React29.createElement(TableRowComponent, __spreadValues({}, rowProps));
6962
7026
  }, [
6963
7027
  repaintId,
6964
7028
  rowHeight,
@@ -6969,7 +7033,7 @@ function useUnpinnedRendering(params) {
6969
7033
  horizontalVirtualBrain,
6970
7034
  verticalVirtualBrain
6971
7035
  ]);
6972
- const fakeScrollbar = getScrollbarWidth() ? /* @__PURE__ */ React28.createElement("div", {
7036
+ const fakeScrollbar = getScrollbarWidth() ? /* @__PURE__ */ React29.createElement("div", {
6973
7037
  "data-name": "horizontal-scrollbar-placeholder--fake",
6974
7038
  style: {
6975
7039
  position: "absolute",
@@ -6980,10 +7044,10 @@ function useUnpinnedRendering(params) {
6980
7044
  overflow: "auto",
6981
7045
  visibility: columnShifts ? "visible" : "hidden"
6982
7046
  }
6983
- }, /* @__PURE__ */ React28.createElement("div", {
7047
+ }, /* @__PURE__ */ React29.createElement("div", {
6984
7048
  style: { height: "100%", width: computedUnpinnedColumnsWidth }
6985
7049
  })) : null;
6986
- return rowHeight != 0 ? /* @__PURE__ */ React28.createElement(VirtualRowList, {
7050
+ return rowHeight != 0 ? /* @__PURE__ */ React29.createElement(VirtualRowList, {
6987
7051
  repaintId: `${repaintId}-unpinned-`,
6988
7052
  brain: verticalVirtualBrain,
6989
7053
  onContainerScroll: applyScrollHorizontal,
@@ -7004,7 +7068,7 @@ function useUnpinnedRendering(params) {
7004
7068
  }
7005
7069
 
7006
7070
  // src/components/InfiniteTable/hooks/useOnContainerScroll.ts
7007
- var import_react34 = __toModule(require("react"));
7071
+ var import_react35 = __toModule(require("react"));
7008
7072
 
7009
7073
  // src/components/InfiniteTable/InfiniteCls.css.ts
7010
7074
  var import_createRuntimeFn5 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
@@ -7042,18 +7106,18 @@ var useOnContainerScroll = ({
7042
7106
  getState: getDataSourceState,
7043
7107
  componentState: { notifyScrollStop }
7044
7108
  } = useDataSourceContextValue();
7045
- const onScrollStop = (0, import_react34.useCallback)((param) => {
7109
+ const onScrollStop = (0, import_react35.useCallback)((param) => {
7046
7110
  onScrollStopFromProps == null ? void 0 : onScrollStopFromProps(param);
7047
7111
  notifyScrollStop(param);
7048
7112
  }, [onScrollStopFromProps, notifyScrollStop]);
7049
- const timeoutIdRef = (0, import_react34.useRef)(0);
7050
- const scrollingRef = (0, import_react34.useRef)(false);
7051
- const scrollTopMaxRef = (0, import_react34.useRef)(0);
7052
- (0, import_react34.useEffect)(() => {
7113
+ const timeoutIdRef = (0, import_react35.useRef)(0);
7114
+ const scrollingRef = (0, import_react35.useRef)(false);
7115
+ const scrollTopMaxRef = (0, import_react35.useRef)(0);
7116
+ (0, import_react35.useEffect)(() => {
7053
7117
  const { current: node } = scrollerDOMRef;
7054
7118
  scrollTopMaxRef.current = node.scrollHeight - node.clientHeight;
7055
7119
  }, [reservedContentHeight, bodySize.height]);
7056
- const setScrolling = (0, import_react34.useCallback)((scrolling) => {
7120
+ const setScrolling = (0, import_react35.useCallback)((scrolling) => {
7057
7121
  var _a;
7058
7122
  const prevScrolling = scrollingRef.current;
7059
7123
  scrollingRef.current = scrolling;
@@ -7086,7 +7150,7 @@ var useOnContainerScroll = ({
7086
7150
  }
7087
7151
  }
7088
7152
  }, [scrollStopDelay, onScrollStop]);
7089
- const onContainerScroll = (0, import_react34.useCallback)((scrollInfo) => {
7153
+ const onContainerScroll = (0, import_react35.useCallback)((scrollInfo) => {
7090
7154
  verticalVirtualBrain.setScrollPosition(scrollInfo);
7091
7155
  horizontalVirtualBrain.setScrollPosition(scrollInfo);
7092
7156
  setScrolling(true);
@@ -7096,15 +7160,15 @@ var useOnContainerScroll = ({
7096
7160
  domRef.current,
7097
7161
  setScrolling
7098
7162
  ]);
7099
- const scrollPositionRef = (0, import_react34.useRef)({
7163
+ const scrollPositionRef = (0, import_react35.useRef)({
7100
7164
  scrollLeft: 0,
7101
7165
  scrollTop: 0
7102
7166
  });
7103
- const applyScrollHorizontal = (0, import_react34.useCallback)(({ scrollLeft }) => {
7167
+ const applyScrollHorizontal = (0, import_react35.useCallback)(({ scrollLeft }) => {
7104
7168
  scrollPositionRef.current.scrollLeft = scrollLeft;
7105
7169
  onContainerScroll(scrollPositionRef.current);
7106
7170
  }, [onContainerScroll]);
7107
- const applyScrollVertical = (0, import_react34.useCallback)(({ scrollTop }) => {
7171
+ const applyScrollVertical = (0, import_react35.useCallback)(({ scrollTop }) => {
7108
7172
  scrollPositionRef.current.scrollTop = scrollTop;
7109
7173
  onContainerScroll(scrollPositionRef.current);
7110
7174
  if (scrollTop === 0) {
@@ -7126,17 +7190,17 @@ var useOnContainerScroll = ({
7126
7190
  };
7127
7191
 
7128
7192
  // src/components/InfiniteTable/hooks/usePinnedRendering.tsx
7129
- var React30 = __toModule(require("react"));
7130
- var import_react37 = __toModule(require("react"));
7193
+ var React31 = __toModule(require("react"));
7194
+ var import_react38 = __toModule(require("react"));
7131
7195
 
7132
7196
  // src/components/VirtualList/RowListWithExternalScrolling.tsx
7133
- var React29 = __toModule(require("react"));
7134
- var import_react36 = __toModule(require("react"));
7197
+ var React30 = __toModule(require("react"));
7198
+ var import_react37 = __toModule(require("react"));
7135
7199
 
7136
7200
  // src/components/hooks/useOnMount.ts
7137
- var import_react35 = __toModule(require("react"));
7201
+ var import_react36 = __toModule(require("react"));
7138
7202
  function useOnMount(domRef, props) {
7139
- (0, import_react35.useEffect)(() => {
7203
+ (0, import_react36.useEffect)(() => {
7140
7204
  const { onMount, onUnmount } = props;
7141
7205
  const node = domRef == null ? void 0 : domRef.current;
7142
7206
  onMount == null ? void 0 : onMount(node);
@@ -7167,8 +7231,8 @@ var RowListWithExternalScrolling = (props) => {
7167
7231
  onMount,
7168
7232
  onUnmount
7169
7233
  } = props;
7170
- const domRef = (0, import_react36.useRef)(null);
7171
- const renderItem = (0, import_react36.useCallback)((renderProps) => renderRow({
7234
+ const domRef = (0, import_react37.useRef)(null);
7235
+ const renderItem = (0, import_react37.useCallback)((renderProps) => renderRow({
7172
7236
  domRef: renderProps.domRef,
7173
7237
  rowHeight: renderProps.itemSize,
7174
7238
  rowIndex: renderProps.itemIndex
@@ -7177,7 +7241,7 @@ var RowListWithExternalScrolling = (props) => {
7177
7241
  onMount,
7178
7242
  onUnmount
7179
7243
  });
7180
- (0, import_react36.useEffect)(() => {
7244
+ (0, import_react37.useEffect)(() => {
7181
7245
  const onScroll = (scrollPosition) => {
7182
7246
  const node = domRef.current;
7183
7247
  if (node) {
@@ -7206,7 +7270,7 @@ var RowListWithExternalScrolling = (props) => {
7206
7270
  if (true) {
7207
7271
  domProps["data-cmp-name"] = "RowListWithExternalScrolling";
7208
7272
  }
7209
- return /* @__PURE__ */ React29.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React29.createElement(RawList, {
7273
+ return /* @__PURE__ */ React30.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React30.createElement(RawList, {
7210
7274
  brain,
7211
7275
  renderItem,
7212
7276
  repaintId
@@ -7229,7 +7293,7 @@ function PinnedRowsContainer(props) {
7229
7293
  brain,
7230
7294
  renderRow
7231
7295
  } = props;
7232
- const style = React30.useMemo(() => {
7296
+ const style = React31.useMemo(() => {
7233
7297
  const result = pinning === "end" ? {
7234
7298
  width: rowWidth,
7235
7299
  height,
@@ -7244,7 +7308,7 @@ function PinnedRowsContainer(props) {
7244
7308
  }
7245
7309
  return result;
7246
7310
  }, [height, rowWidth, pinning, hasOverflow]);
7247
- const updateScroll = (0, import_react37.useCallback)((node, scrollPosition) => {
7311
+ const updateScroll = (0, import_react38.useCallback)((node, scrollPosition) => {
7248
7312
  UPDATE_SCROLL3(node, scrollPosition, hasOverflow ? pinnedScrollListener.getScrollPosition() : void 0);
7249
7313
  }, [hasOverflow, pinnedScrollListener]);
7250
7314
  const rowListProps = {
@@ -7255,7 +7319,7 @@ function PinnedRowsContainer(props) {
7255
7319
  className: join(`${PinnedRowsContainerClassName}`, PinnedRowsClsVariants[pinning === "start" ? "pinnedStart" : "pinnedEnd"], `${PinnedRowsContainerClassName}--pinned-${pinning}`, `${PinnedRowsContainerClassName}--overflow`, PinnedRowsClsVariants.overflow)
7256
7320
  };
7257
7321
  if (hasOverflow) {
7258
- return /* @__PURE__ */ React30.createElement(VirtualScrollContainer, {
7322
+ return /* @__PURE__ */ React31.createElement(VirtualScrollContainer, {
7259
7323
  scrollable: {
7260
7324
  horizontal: true,
7261
7325
  vertical: false
@@ -7271,23 +7335,23 @@ function PinnedRowsContainer(props) {
7271
7335
  className: join(PinnedRowsContainerClsVariants({
7272
7336
  pinned: pinning
7273
7337
  }), `${PinnedRowsContainerClassName}Container`, `${PinnedRowsContainerClassName}Container--pinned-${pinning}`)
7274
- }, /* @__PURE__ */ React30.createElement(RowListWithExternalScrolling, __spreadProps(__spreadValues({}, rowListProps), {
7338
+ }, /* @__PURE__ */ React31.createElement(RowListWithExternalScrolling, __spreadProps(__spreadValues({}, rowListProps), {
7275
7339
  onMount: (node) => {
7276
7340
  pinnedScrollListener == null ? void 0 : pinnedScrollListener.onScroll((scrollPosition) => {
7277
7341
  updateScroll(node, brain.getScrollPosition(), scrollPosition);
7278
7342
  });
7279
7343
  }
7280
- })), /* @__PURE__ */ React30.createElement(SpacePlaceholder, {
7344
+ })), /* @__PURE__ */ React31.createElement(SpacePlaceholder, {
7281
7345
  width: rowWidth,
7282
7346
  height: 1
7283
7347
  }));
7284
7348
  }
7285
- return /* @__PURE__ */ React30.createElement(RowListWithExternalScrolling, __spreadValues({}, rowListProps));
7349
+ return /* @__PURE__ */ React31.createElement(RowListWithExternalScrolling, __spreadValues({}, rowListProps));
7286
7350
  }
7287
7351
  function useRenderPinnedRow(params) {
7288
7352
  const { getData, getState, columnsWidth, columns, rowSpan, verticalBrain } = params;
7289
7353
  const dataArray = getData();
7290
- const renderPinnedRow = (0, import_react37.useCallback)((rowParams) => {
7354
+ const renderPinnedRow = (0, import_react38.useCallback)((rowParams) => {
7291
7355
  const rowInfo = dataArray[rowParams.rowIndex];
7292
7356
  const { showZebraRows, showHoverRows } = getState();
7293
7357
  const rowProps = __spreadValues({
@@ -7303,7 +7367,7 @@ function useRenderPinnedRow(params) {
7303
7367
  rowWidth: columnsWidth,
7304
7368
  columns
7305
7369
  }, rowParams);
7306
- return /* @__PURE__ */ React30.createElement(TableRowUnvirtualized, __spreadValues({}, rowProps));
7370
+ return /* @__PURE__ */ React31.createElement(TableRowUnvirtualized, __spreadValues({}, rowProps));
7307
7371
  }, [columnsWidth, columns, verticalBrain, dataArray]);
7308
7372
  return renderPinnedRow;
7309
7373
  }
@@ -7349,7 +7413,7 @@ function usePinnedRenderingForSide(side, params) {
7349
7413
  columns,
7350
7414
  columnsWidth
7351
7415
  });
7352
- const pinnedList = columns.length && rowHeight !== 0 ? /* @__PURE__ */ React30.createElement(PinnedRowsContainer, {
7416
+ const pinnedList = columns.length && rowHeight !== 0 ? /* @__PURE__ */ React31.createElement(PinnedRowsContainer, {
7353
7417
  pinning: side,
7354
7418
  pinnedScrollListener,
7355
7419
  hasOverflow,
@@ -7362,7 +7426,7 @@ function usePinnedRenderingForSide(side, params) {
7362
7426
  brain: verticalVirtualBrain,
7363
7427
  renderRow: renderRowPinned
7364
7428
  }) : null;
7365
- const pinnedScrollbarPlaceholder = pinnedList && hasHorizontalScrollbar && !hasOverflow ? /* @__PURE__ */ React30.createElement(HorizontalScrollbarPlaceholder, {
7429
+ const pinnedScrollbarPlaceholder = pinnedList && hasHorizontalScrollbar && !hasOverflow ? /* @__PURE__ */ React31.createElement(HorizontalScrollbarPlaceholder, {
7366
7430
  style: side === "end" ? {
7367
7431
  width: columnsWidth,
7368
7432
  right: hasVerticalScrollbar ? getScrollbarWidth() : 0
@@ -7404,13 +7468,13 @@ function usePinnedStartRendering(params) {
7404
7468
  }
7405
7469
 
7406
7470
  // src/components/InfiniteTable/hooks/useYourBrain.ts
7407
- var import_react39 = __toModule(require("react"));
7471
+ var import_react40 = __toModule(require("react"));
7408
7472
 
7409
7473
  // src/components/InfiniteTable/hooks/useColumnSizeFn.ts
7410
- var import_react38 = __toModule(require("react"));
7474
+ var import_react39 = __toModule(require("react"));
7411
7475
  var debug5 = dbg("useColumnSizeFn");
7412
7476
  function useColumnSizeFn(computedUnpinnedColumns) {
7413
- const columnSize = (0, import_react38.useCallback)((index) => {
7477
+ const columnSize = (0, import_react39.useCallback)((index) => {
7414
7478
  const column = computedUnpinnedColumns[index];
7415
7479
  if (!column) {
7416
7480
  debug5("cannot find column at index", index, computedUnpinnedColumns);
@@ -7440,13 +7504,13 @@ function useYourBrain(param) {
7440
7504
  globalThis.verticalVirtualBrain = verticalVirtualBrain;
7441
7505
  globalThis.horizontalVirtualBrain = horizontalVirtualBrain;
7442
7506
  }
7443
- (0, import_react39.useEffect)(() => {
7507
+ (0, import_react40.useEffect)(() => {
7444
7508
  verticalVirtualBrain.setAvailableSize({
7445
7509
  height: bodySize.height,
7446
7510
  width: 0
7447
7511
  });
7448
7512
  }, [bodySize, verticalVirtualBrain]);
7449
- (0, import_react39.useEffect)(() => {
7513
+ (0, import_react40.useEffect)(() => {
7450
7514
  horizontalVirtualBrain.setAvailableSize({
7451
7515
  height: 0,
7452
7516
  width: Math.max(bodySize.width - computedPinnedStartWidth - computedPinnedEndWidth, 0)
@@ -7487,7 +7551,7 @@ function useListRendering(param) {
7487
7551
  horizontalVirtualBrain
7488
7552
  } = componentState;
7489
7553
  const prevDataSourceTimestamp = usePrevious(dataSourceState.updatedAt);
7490
- const repaintIdRef = (0, import_react40.useRef)(0);
7554
+ const repaintIdRef = (0, import_react41.useRef)(0);
7491
7555
  if (prevDataSourceTimestamp !== dataSourceState.updatedAt || !shallowEqualObjects(prevComputed, computed)) {
7492
7556
  repaintIdRef.current++;
7493
7557
  }
@@ -7506,11 +7570,11 @@ function useListRendering(param) {
7506
7570
  const hasHorizontalScrollbar = computedUnpinnedColumnsWidth > bodySize.width - computedPinnedStartColumnsWidth - computedPinnedEndColumnsWidth;
7507
7571
  const reservedContentHeight = verticalVirtualBrain.getTotalSize() + (hasHorizontalScrollbar ? getScrollbarWidth() : 0);
7508
7572
  const hasVerticalScrollbar = bodySize.height > 0 && bodySize.height < reservedContentHeight;
7509
- const scrollbars = (0, import_react40.useMemo)(() => ({
7573
+ const scrollbars = (0, import_react41.useMemo)(() => ({
7510
7574
  vertical: hasVerticalScrollbar,
7511
7575
  horizontal: hasHorizontalScrollbar
7512
7576
  }), [hasVerticalScrollbar, hasHorizontalScrollbar]);
7513
- (0, import_react40.useEffect)(() => {
7577
+ (0, import_react41.useEffect)(() => {
7514
7578
  if (!bodySize.height) {
7515
7579
  return;
7516
7580
  }
@@ -7566,7 +7630,7 @@ function useListRendering(param) {
7566
7630
  computedUnpinnedColumns
7567
7631
  });
7568
7632
  const [, rerender] = useRerender();
7569
- (0, import_react40.useEffect)(() => {
7633
+ (0, import_react41.useEffect)(() => {
7570
7634
  rerender();
7571
7635
  }, [dataSourceState]);
7572
7636
  const { pinnedStartList, pinnedStartScrollbarPlaceholder } = usePinnedStartRendering(pinnedRenderingParams);
@@ -7589,8 +7653,8 @@ function useListRendering(param) {
7589
7653
  }
7590
7654
 
7591
7655
  // src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
7592
- var React31 = __toModule(require("react"));
7593
- var import_react41 = __toModule(require("react"));
7656
+ var React32 = __toModule(require("react"));
7657
+ var import_react42 = __toModule(require("react"));
7594
7658
 
7595
7659
  // src/components/utils/decamelize.ts
7596
7660
  function decamelize(str, options) {
@@ -7625,10 +7689,10 @@ var enforceStyle = (node, style) => {
7625
7689
  node.style.setProperty(decamelize(propertyName), propertyValue, "important");
7626
7690
  }
7627
7691
  };
7628
- var InfiniteTableLicenseFooter = React31.forwardRef(function InfiniteTableLicenseFooter2(props, ref) {
7692
+ var InfiniteTableLicenseFooter = React32.forwardRef(function InfiniteTableLicenseFooter2(props, ref) {
7629
7693
  const { rootClassName: rootClassName12 } = useInternalProps();
7630
- const domRef = React31.useRef(null);
7631
- const domCallback = React31.useCallback((node) => {
7694
+ const domRef = React32.useRef(null);
7695
+ const domCallback = React32.useCallback((node) => {
7632
7696
  domRef.current = node;
7633
7697
  if (!ref) {
7634
7698
  return;
@@ -7639,7 +7703,7 @@ var InfiniteTableLicenseFooter = React31.forwardRef(function InfiniteTableLicens
7639
7703
  ref.current = node;
7640
7704
  }
7641
7705
  }, []);
7642
- (0, import_react41.useEffect)(() => {
7706
+ (0, import_react42.useEffect)(() => {
7643
7707
  const forceStyle = () => {
7644
7708
  requestAnimationFrame(() => {
7645
7709
  var _a;
@@ -7653,12 +7717,12 @@ var InfiniteTableLicenseFooter = React31.forwardRef(function InfiniteTableLicens
7653
7717
  clearInterval(intervalId);
7654
7718
  };
7655
7719
  }, []);
7656
- return /* @__PURE__ */ React31.createElement("div", __spreadProps(__spreadValues({
7720
+ return /* @__PURE__ */ React32.createElement("div", __spreadProps(__spreadValues({
7657
7721
  ref: domCallback
7658
7722
  }, props), {
7659
7723
  className: join(`${rootClassName12}-Footer`, FooterCls, props.className),
7660
7724
  style: defaultStyle2
7661
- }), "Powered by", " ", /* @__PURE__ */ React31.createElement("a", {
7725
+ }), "Powered by", " ", /* @__PURE__ */ React32.createElement("a", {
7662
7726
  href: "https://infinite-table.com",
7663
7727
  rel: "noopener noreferrer",
7664
7728
  role: "link",
@@ -7667,7 +7731,7 @@ var InfiniteTableLicenseFooter = React31.forwardRef(function InfiniteTableLicens
7667
7731
  });
7668
7732
 
7669
7733
  // src/components/InfiniteTable/hooks/useLicense/useLicense.ts
7670
- var import_react42 = __toModule(require("react"));
7734
+ var import_react43 = __toModule(require("react"));
7671
7735
 
7672
7736
  // src/components/InfiniteTable/hooks/useLicense/crc32.ts
7673
7737
  var DEFAULT_ReversedPolynomial = 3988292384;
@@ -7825,10 +7889,10 @@ var isInsideSandbox = () => {
7825
7889
  };
7826
7890
  var isInsidePlayground = isInsideSandbox() || isInsideSandpack();
7827
7891
  var useLicense = (licenseKey = "") => {
7828
- const valid = (0, import_react42.useMemo)(() => {
7892
+ const valid = (0, import_react43.useMemo)(() => {
7829
7893
  let valid2 = isValidLicense(licenseKey, {
7830
7894
  publishedAt: 1624970570587,
7831
- version: "0.2.14"
7895
+ version: "0.2.15"
7832
7896
  });
7833
7897
  if (!licenseKey && !valid2 && isInsidePlayground) {
7834
7898
  return true;
@@ -7839,8 +7903,8 @@ var useLicense = (licenseKey = "") => {
7839
7903
  };
7840
7904
 
7841
7905
  // src/components/CSSVariableWatch.tsx
7842
- var React32 = __toModule(require("react"));
7843
- var import_react43 = __toModule(require("react"));
7906
+ var React33 = __toModule(require("react"));
7907
+ var import_react44 = __toModule(require("react"));
7844
7908
  var error = err("CSSVariableWatch");
7845
7909
  var debug6 = dbg("CSSVariableWatch");
7846
7910
  var WRAPPER_STYLE = {
@@ -7853,15 +7917,15 @@ var WRAPPER_STYLE = {
7853
7917
  overflow: "hidden"
7854
7918
  };
7855
7919
  var useCSSVariableWatch = (params) => {
7856
- const lastValueRef = (0, import_react43.useRef)(0);
7857
- const onResize = React32.useCallback(({ height }) => {
7920
+ const lastValueRef = (0, import_react44.useRef)(0);
7921
+ const onResize = React33.useCallback(({ height }) => {
7858
7922
  if (height && height !== lastValueRef.current) {
7859
7923
  lastValueRef.current = height;
7860
7924
  params.onChange(height);
7861
7925
  }
7862
7926
  }, [params.onChange]);
7863
7927
  useResizeObserver(params.ref, onResize, { earlyAttach: true });
7864
- React32.useLayoutEffect(() => {
7928
+ React33.useLayoutEffect(() => {
7865
7929
  const value = params.ref.current.getBoundingClientRect().height;
7866
7930
  if (value) {
7867
7931
  lastValueRef.current = value;
@@ -7873,15 +7937,15 @@ var useCSSVariableWatch = (params) => {
7873
7937
  }, []);
7874
7938
  };
7875
7939
  var CSSVariableWatch = (props) => {
7876
- const domRef = (0, import_react43.useRef)(null);
7940
+ const domRef = (0, import_react44.useRef)(null);
7877
7941
  useCSSVariableWatch(__spreadProps(__spreadValues({}, props), {
7878
7942
  ref: domRef
7879
7943
  }));
7880
- return /* @__PURE__ */ React32.createElement("div", {
7944
+ return /* @__PURE__ */ React33.createElement("div", {
7881
7945
  "data-name": "css-variable-watcher",
7882
7946
  "data-var": props.varName,
7883
7947
  style: WRAPPER_STYLE
7884
- }, /* @__PURE__ */ React32.createElement("div", {
7948
+ }, /* @__PURE__ */ React33.createElement("div", {
7885
7949
  ref: domRef,
7886
7950
  style: {
7887
7951
  height: props.varName.startsWith("var(") ? props.varName : `var(${props.varName})`
@@ -7974,7 +8038,7 @@ function useDOMProps(initialDOMProps) {
7974
8038
  }
7975
8039
 
7976
8040
  // src/components/InfiniteTable/components/LoadMask.tsx
7977
- var React33 = __toModule(require("react"));
8041
+ var React34 = __toModule(require("react"));
7978
8042
 
7979
8043
  // src/components/InfiniteTable/components/LoadMask.css.ts
7980
8044
  var LoadMaskCls = { visible: "qy58ya1 qy58ya0 _16lm1iw2 _16lm1iwr _16lm1iwt _16lm1iwx _16lm1iwv", hidden: "qy58ya2 qy58ya0 _16lm1iw2 _16lm1iwr _16lm1iwt _16lm1iwx _16lm1iwv" };
@@ -7986,18 +8050,18 @@ var { rootClassName: rootClassName11 } = internalProps;
7986
8050
  var baseCls = `${rootClassName11}-LoadMask`;
7987
8051
  function LoadMaskFn(props) {
7988
8052
  const { visible, children = "Loading" } = props;
7989
- return /* @__PURE__ */ React33.createElement("div", {
8053
+ return /* @__PURE__ */ React34.createElement("div", {
7990
8054
  className: `${LoadMaskCls[visible ? "visible" : "hidden"]} ${baseCls}`
7991
- }, /* @__PURE__ */ React33.createElement("div", {
8055
+ }, /* @__PURE__ */ React34.createElement("div", {
7992
8056
  className: `${LoadMaskOverlayCls} ${baseCls}-Overlay`
7993
- }), /* @__PURE__ */ React33.createElement("div", {
8057
+ }), /* @__PURE__ */ React34.createElement("div", {
7994
8058
  className: `${LoadMaskTextCls} ${baseCls}-Text`
7995
8059
  }, children));
7996
8060
  }
7997
- var LoadMask = React33.memo(LoadMaskFn);
8061
+ var LoadMask = React34.memo(LoadMaskFn);
7998
8062
 
7999
8063
  // src/components/InfiniteTable/hooks/useAutoSizeColumns.ts
8000
- var import_react44 = __toModule(require("react"));
8064
+ var import_react45 = __toModule(require("react"));
8001
8065
  var OFFSET = 10;
8002
8066
  function getColumnContentMaxWidths(domRef, options) {
8003
8067
  var _a;
@@ -8062,11 +8126,11 @@ function useAutoSizeColumns() {
8062
8126
  horizontalVirtualBrain
8063
8127
  }
8064
8128
  } = useComponentState();
8065
- const [refreshId, setRefreshId] = (0, import_react44.useState)(0);
8129
+ const [refreshId, setRefreshId] = (0, import_react45.useState)(0);
8066
8130
  const theKey = typeof autoSizeColumnsKey === "object" ? autoSizeColumnsKey.key : autoSizeColumnsKey;
8067
8131
  const getTheKey = useLatest(theKey);
8068
- const lastExecutedIdentifierRef = (0, import_react44.useRef)(null);
8069
- (0, import_react44.useEffect)(() => {
8132
+ const lastExecutedIdentifierRef = (0, import_react45.useRef)(null);
8133
+ (0, import_react45.useEffect)(() => {
8070
8134
  const key = getTheKey();
8071
8135
  if (key == null) {
8072
8136
  return;
@@ -8084,7 +8148,7 @@ function useAutoSizeColumns() {
8084
8148
  removeHorizontal();
8085
8149
  };
8086
8150
  }, [verticalVirtualBrain, horizontalVirtualBrain]);
8087
- (0, import_react44.useEffect)(() => {
8151
+ (0, import_react45.useEffect)(() => {
8088
8152
  var _a;
8089
8153
  if (theKey == null) {
8090
8154
  return;
@@ -8145,7 +8209,7 @@ var InfiniteTableRoot = getComponentStateRoot({
8145
8209
  getParentState: () => useDataSource(),
8146
8210
  debugName: "InfiniteTable"
8147
8211
  });
8148
- var InfiniteTableComponent = React34.memo(function InfiniteTableComponent2() {
8212
+ var InfiniteTableComponent = React35.memo(function InfiniteTableComponent2() {
8149
8213
  var _a;
8150
8214
  const {
8151
8215
  componentState,
@@ -8192,7 +8256,7 @@ var InfiniteTableComponent = React34.memo(function InfiniteTableComponent2() {
8192
8256
  bodySize,
8193
8257
  computed
8194
8258
  });
8195
- React34.useEffect(() => {
8259
+ React35.useEffect(() => {
8196
8260
  const dataSourceState = getDataSourceState();
8197
8261
  const onChange = debounce((renderRange) => {
8198
8262
  dataSourceState.notifyRenderRangeChange(renderRange);
@@ -8202,7 +8266,7 @@ var InfiniteTableComponent = React34.memo(function InfiniteTableComponent2() {
8202
8266
  const licenseValid = useLicense(licenseKey);
8203
8267
  const domProps = useDOMProps(componentState.domProps);
8204
8268
  const LoadMaskCmp = (_a = components == null ? void 0 : components.LoadMask) != null ? _a : LoadMask;
8205
- React34.useLayoutEffect(() => {
8269
+ React35.useLayoutEffect(() => {
8206
8270
  const dataSourceState = getDataSourceState();
8207
8271
  const { onScrollbarsChange } = getInfiniteTableState();
8208
8272
  const { notifyScrollbarsChange } = dataSourceState;
@@ -8211,35 +8275,35 @@ var InfiniteTableComponent = React34.memo(function InfiniteTableComponent2() {
8211
8275
  }
8212
8276
  notifyScrollbarsChange(scrollbars);
8213
8277
  }, [scrollbars]);
8214
- React34.useEffect(() => {
8278
+ React35.useEffect(() => {
8215
8279
  dataSourceActions.scrollStopDelayUpdatedByTable = scrollStopDelay;
8216
8280
  }, [scrollStopDelay]);
8217
8281
  useAutoSizeColumns();
8218
- return /* @__PURE__ */ React34.createElement("div", __spreadValues({
8282
+ return /* @__PURE__ */ React35.createElement("div", __spreadValues({
8219
8283
  ref: domRef
8220
- }, domProps), header ? /* @__PURE__ */ React34.createElement(TableHeaderWrapper, {
8284
+ }, domProps), header ? /* @__PURE__ */ React35.createElement(TableHeaderWrapper, {
8221
8285
  brain: horizontalVirtualBrain,
8222
8286
  repaintId,
8223
8287
  scrollbars
8224
- }) : null, /* @__PURE__ */ React34.createElement(InfiniteTableBody, null, /* @__PURE__ */ React34.createElement(VirtualScrollContainer, {
8288
+ }) : null, /* @__PURE__ */ React35.createElement(InfiniteTableBody, null, /* @__PURE__ */ React35.createElement(VirtualScrollContainer, {
8225
8289
  ref: scrollerDOMRef,
8226
8290
  onContainerScroll: applyScrollVertical,
8227
8291
  scrollable: ONLY_VERTICAL_SCROLLBAR
8228
- }, /* @__PURE__ */ React34.createElement("div", {
8292
+ }, /* @__PURE__ */ React35.createElement("div", {
8229
8293
  className: display.flex
8230
- }, pinnedStartList, centerList, pinnedEndList), /* @__PURE__ */ React34.createElement(SpacePlaceholder, {
8294
+ }, pinnedStartList, centerList, pinnedEndList), /* @__PURE__ */ React35.createElement(SpacePlaceholder, {
8231
8295
  count: dataArray.length,
8232
8296
  width: 0,
8233
8297
  height: reservedContentHeight
8234
- })), pinnedStartScrollbarPlaceholder, pinnedEndScrollbarPlaceholder, /* @__PURE__ */ React34.createElement(LoadMaskCmp, {
8298
+ })), pinnedStartScrollbarPlaceholder, pinnedEndScrollbarPlaceholder, /* @__PURE__ */ React35.createElement(LoadMaskCmp, {
8235
8299
  visible: loading
8236
- }, loadingText)), licenseValid ? null : /* @__PURE__ */ React34.createElement(InfiniteTableLicenseFooter, null), /* @__PURE__ */ React34.createElement("div", {
8300
+ }, loadingText)), licenseValid ? null : /* @__PURE__ */ React35.createElement(InfiniteTableLicenseFooter, null), /* @__PURE__ */ React35.createElement("div", {
8237
8301
  ref: portalDOMRef,
8238
8302
  className: join(`${rootClassName}Portal`, zIndex[1e3], position.absolute, top[0], left[0])
8239
- }), rowHeightCSSVar ? /* @__PURE__ */ React34.createElement(CSSVariableWatch, {
8303
+ }), rowHeightCSSVar ? /* @__PURE__ */ React35.createElement(CSSVariableWatch, {
8240
8304
  varName: rowHeightCSSVar,
8241
8305
  onChange: onRowHeightCSSVarChange
8242
- }) : null, headerHeightCSSVar ? /* @__PURE__ */ React34.createElement(CSSVariableWatch, {
8306
+ }) : null, headerHeightCSSVar ? /* @__PURE__ */ React35.createElement(CSSVariableWatch, {
8243
8307
  varName: headerHeightCSSVar,
8244
8308
  onChange: onHeaderHeightCSSVarChange
8245
8309
  }) : null);
@@ -8275,25 +8339,25 @@ function InfiniteTableContextProvider() {
8275
8339
  }
8276
8340
  componentActions.bodySize = bodySize;
8277
8341
  }, { earlyAttach: true });
8278
- React34.useEffect(() => {
8342
+ React35.useEffect(() => {
8279
8343
  return () => {
8280
8344
  componentState.onRowHeightCSSVarChange.destroy();
8281
8345
  componentState.onHeaderHeightCSSVarChange.destroy();
8282
8346
  };
8283
8347
  }, []);
8284
- React34.useEffect(() => {
8348
+ React35.useEffect(() => {
8285
8349
  if (scrollerDOMRef.current) {
8286
8350
  scrollerDOMRef.current.scrollTop = 0;
8287
8351
  }
8288
8352
  }, [scrollTopKey, scrollerDOMRef]);
8289
8353
  const TableContext2 = getInfiniteTableContext();
8290
- return /* @__PURE__ */ React34.createElement(TableContext2.Provider, {
8354
+ return /* @__PURE__ */ React35.createElement(TableContext2.Provider, {
8291
8355
  value: contextValue
8292
- }, /* @__PURE__ */ React34.createElement(InfiniteTableComponent, null));
8356
+ }, /* @__PURE__ */ React35.createElement(InfiniteTableComponent, null));
8293
8357
  }
8294
8358
  function InfiniteTable(props) {
8295
- const table = /* @__PURE__ */ React34.createElement(InfiniteTableRoot, __spreadValues({}, props), /* @__PURE__ */ React34.createElement(InfiniteTableContextProvider, null));
8296
- return /* @__PURE__ */ React34.createElement(React34.StrictMode, null, table);
8359
+ const table = /* @__PURE__ */ React35.createElement(InfiniteTableRoot, __spreadValues({}, props), /* @__PURE__ */ React35.createElement(InfiniteTableContextProvider, null));
8360
+ return /* @__PURE__ */ React35.createElement(React35.StrictMode, null, table);
8297
8361
  }
8298
8362
  InfiniteTable.defaultProps = {
8299
8363
  rowHeight: 40,