@infinite-table/infinite-react 0.2.1 → 0.2.2

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 +29 -29
  2. package/index.esm.js +252 -286
  3. package/index.js +277 -309
  4. package/package.json +2 -2
package/index.js CHANGED
@@ -640,7 +640,7 @@ __export(exports, {
640
640
  });
641
641
 
642
642
  // src/components/InfiniteTable/index.tsx
643
- var React35 = __toModule(require("react"));
643
+ var React34 = __toModule(require("react"));
644
644
 
645
645
  // src/components/InfiniteTable/internalProps.ts
646
646
  var rootClassName = "Infinite";
@@ -785,7 +785,6 @@ function initSetupState() {
785
785
  draggingColumnId: null,
786
786
  pinnedStartScrollListener: new ScrollListener(),
787
787
  pinnedEndScrollListener: new ScrollListener(),
788
- computedPivotColumns: void 0,
789
788
  columnsWhenInlineGroupRenderStrategy: void 0
790
789
  };
791
790
  }
@@ -816,7 +815,6 @@ var forwardProps = (setupState) => {
816
815
  pinnedStartMaxWidth: 1,
817
816
  pinnedEndMaxWidth: 1,
818
817
  pivotColumn: 1,
819
- pivotRowLabelsColumn: 1,
820
818
  pivotColumnGroups: 1,
821
819
  onScrollbarsChange: 1,
822
820
  scrollStopDelay: (scrollStopDelay) => scrollStopDelay != null ? scrollStopDelay : 100,
@@ -873,7 +871,7 @@ var mapPropsToState = (params) => {
873
871
  groupBy,
874
872
  groupColumn: props.groupColumn
875
873
  });
876
- const computedColumns = state.computedPivotColumns || state.columnsWhenGrouping || state.columnsWhenInlineGroupRenderStrategy || state.columns;
874
+ const computedColumns = state.columnsWhenGrouping || state.columnsWhenInlineGroupRenderStrategy || state.columns;
877
875
  return {
878
876
  groupRenderStrategy,
879
877
  groupBy,
@@ -2044,7 +2042,7 @@ function useColumnGroups() {
2044
2042
  // src/components/InfiniteTable/hooks/useColumnsWhen.ts
2045
2043
  var import_react17 = __toModule(require("react"));
2046
2044
 
2047
- // src/components/InfiniteTable/state/getComputedPivotColumnsFromDataSourcePivotColumns.tsx
2045
+ // src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
2048
2046
  var React6 = __toModule(require("react"));
2049
2047
 
2050
2048
  // src/utils/join.ts
@@ -2115,91 +2113,15 @@ var userSelect = { none: "_16lm1iwm" };
2115
2113
  var willChange = { transform: "_16lm1iw19" };
2116
2114
  var zIndex = { "1": "_16lm1iwe", "10": "_16lm1iwf", "1000": "_16lm1iwg", "10000": "_16lm1iwh", "100000": "_16lm1iwi" };
2117
2115
 
2118
- // src/components/InfiniteTable/state/getComputedPivotColumnsFromDataSourcePivotColumns.tsx
2119
- function getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, params) {
2120
- if (!pivotColumns) {
2121
- return void 0;
2122
- }
2123
- const {
2124
- pivotColumn,
2125
- pivotRowLabelsColumn,
2126
- pivotBy,
2127
- groupBy,
2128
- pivotTotalColumnPosition,
2129
- toggleGroupRow
2130
- } = params;
2131
- const computedPivotColumns = new Map();
2132
- pivotColumns.forEach((col, key) => {
2133
- if (col.pivotTotalColumn && pivotTotalColumnPosition === false) {
2134
- return;
2135
- }
2136
- let column = __spreadValues({}, col);
2137
- const isPivotRowLabelsColumn = !column.pivotColumn && !column.pivotTotalColumn;
2138
- if (!isPivotRowLabelsColumn) {
2139
- if (pivotColumn) {
2140
- if (typeof pivotColumn === "function") {
2141
- column = __spreadValues(__spreadValues({}, column), pivotColumn({
2142
- column,
2143
- pivotBy,
2144
- groupBy
2145
- }));
2146
- } else {
2147
- column = __spreadValues(__spreadValues({}, column), pivotColumn);
2148
- }
2149
- }
2150
- } else {
2151
- if (pivotRowLabelsColumn) {
2152
- if (typeof pivotRowLabelsColumn === "function") {
2153
- column = __spreadValues(__spreadValues({}, column), pivotRowLabelsColumn({
2154
- column,
2155
- pivotBy,
2156
- groupBy
2157
- }));
2158
- } else {
2159
- column = __spreadValues(__spreadValues({}, column), pivotRowLabelsColumn);
2160
- }
2161
- }
2162
- if (!column.render) {
2163
- column.render = (renderOptions) => {
2164
- var _a;
2165
- let { value, rowInfo, column: column2, groupBy: groupBy2 } = renderOptions;
2166
- if (column2.renderValue) {
2167
- value = column2.renderValue(renderOptions);
2168
- }
2169
- const showExpanderIcon = (((_a = rowInfo.groupKeys) == null ? void 0 : _a.length) || 0) < groupBy2.length;
2170
- return /* @__PURE__ */ React6.createElement("div", {
2171
- className: join(display.flex, alignItems.center, GroupRowExpanderCls)
2172
- }, showExpanderIcon ? /* @__PURE__ */ React6.createElement(ExpanderIcon, {
2173
- expanded: !rowInfo.collapsed,
2174
- onChange: () => {
2175
- toggleGroupRow(rowInfo.groupKeys);
2176
- }
2177
- }) : null, /* @__PURE__ */ React6.createElement("div", {
2178
- className: cssEllipsisClassName
2179
- }, value != null ? value : null));
2180
- };
2181
- }
2182
- }
2183
- if (!column.render && column.renderValue) {
2184
- column.render = (renderOptions) => {
2185
- return column.renderValue(renderOptions);
2186
- };
2187
- }
2188
- computedPivotColumns.set(key, column);
2189
- });
2190
- return computedPivotColumns;
2191
- }
2192
-
2193
2116
  // src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
2194
- var React7 = __toModule(require("react"));
2195
2117
  function getGroupColumnRender({
2196
2118
  groupIndexForColumn,
2197
2119
  groupRenderStrategy,
2198
2120
  toggleGroupRow
2199
2121
  }) {
2200
2122
  return (renderOptions) => {
2201
- var _a;
2202
- let { value, rowInfo, column } = renderOptions;
2123
+ var _a, _b, _c;
2124
+ let { value, rowInfo, column, groupBy, pivotBy } = renderOptions;
2203
2125
  if (column.renderValue) {
2204
2126
  value = column.renderValue(renderOptions);
2205
2127
  }
@@ -2224,14 +2146,20 @@ function getGroupColumnRender({
2224
2146
  return null;
2225
2147
  }
2226
2148
  }
2227
- return /* @__PURE__ */ React7.createElement("div", {
2149
+ let icon = null;
2150
+ 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);
2151
+ if (showExpanderIcon) {
2152
+ const defaultIcon = /* @__PURE__ */ React6.createElement(ExpanderIcon, {
2153
+ expanded: !collapsed,
2154
+ onChange: () => {
2155
+ toggleGroupRow(groupKeys);
2156
+ }
2157
+ });
2158
+ icon = column.renderGroupIcon ? column.renderGroupIcon(Object.assign({ collapsed, groupIcon: defaultIcon }, renderOptions)) : defaultIcon;
2159
+ }
2160
+ return /* @__PURE__ */ React6.createElement("div", {
2228
2161
  className: join(display.flex, alignItems.center)
2229
- }, /* @__PURE__ */ React7.createElement(ExpanderIcon, {
2230
- expanded: !collapsed,
2231
- onChange: () => {
2232
- toggleGroupRow(groupKeys);
2233
- }
2234
- }), /* @__PURE__ */ React7.createElement("div", {
2162
+ }, icon, /* @__PURE__ */ React6.createElement("div", {
2235
2163
  className: cssEllipsisClassName
2236
2164
  }, value != null ? value : null));
2237
2165
  };
@@ -2267,21 +2195,29 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
2267
2195
  groupByField: options.groupBy.map((g) => g.field),
2268
2196
  sortable: false,
2269
2197
  render: (renderOptions) => {
2270
- let { value, rowInfo, column } = renderOptions;
2198
+ var _a, _b;
2199
+ let { value, rowInfo, column, groupBy, pivotBy } = renderOptions;
2271
2200
  if (!rowInfo.isGroupRow) {
2272
2201
  return null;
2273
2202
  }
2274
2203
  if (column.renderValue) {
2275
2204
  value = column.renderValue(renderOptions);
2276
2205
  }
2277
- return /* @__PURE__ */ React7.createElement("div", {
2206
+ const collapsed = rowInfo.collapsed;
2207
+ let icon = null;
2208
+ 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);
2209
+ if (showExpanderIcon) {
2210
+ const defaultIcon = /* @__PURE__ */ React6.createElement(ExpanderIcon, {
2211
+ expanded: !collapsed,
2212
+ onChange: () => {
2213
+ toggleGroupRow(rowInfo.groupKeys);
2214
+ }
2215
+ });
2216
+ icon = column.renderGroupIcon ? column.renderGroupIcon(Object.assign({ collapsed, groupIcon: defaultIcon }, renderOptions)) : defaultIcon;
2217
+ }
2218
+ return /* @__PURE__ */ React6.createElement("div", {
2278
2219
  className: join(display.flex, alignItems.center, GroupRowExpanderCls)
2279
- }, /* @__PURE__ */ React7.createElement(ExpanderIcon, {
2280
- expanded: !rowInfo.collapsed,
2281
- onChange: () => {
2282
- toggleGroupRow(rowInfo.groupKeys);
2283
- }
2284
- }), /* @__PURE__ */ React7.createElement("div", {
2220
+ }, icon, /* @__PURE__ */ React6.createElement("div", {
2285
2221
  className: cssEllipsisClassName
2286
2222
  }, value != null ? value : null));
2287
2223
  }
@@ -2300,7 +2236,7 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
2300
2236
  var import_react16 = __toModule(require("react"));
2301
2237
 
2302
2238
  // src/components/DataSource/index.tsx
2303
- var React8 = __toModule(require("react"));
2239
+ var React7 = __toModule(require("react"));
2304
2240
 
2305
2241
  // src/utils/multisort/sortTypes.ts
2306
2242
  var numberComparator = function(first, second) {
@@ -2648,6 +2584,7 @@ var DeepMap = class {
2648
2584
 
2649
2585
  // src/utils/groupAndPivot/index.ts
2650
2586
  var LAZY_ROOT_KEY_FOR_GROUPS = "____root____";
2587
+ var NOT_LOADED_YET_KEY_PREFIX = "____not_loaded_yet____";
2651
2588
  function DEFAULT_TO_KEY(value) {
2652
2589
  return value;
2653
2590
  }
@@ -2717,7 +2654,10 @@ function lazyGroup(groupParams, rootData) {
2717
2654
  items: [],
2718
2655
  reducerResults: {}
2719
2656
  };
2720
- deepMap.set([...currentGroupKeys, `not-loaded-yet-${i}`], deepMapGroupValue2);
2657
+ deepMap.set([
2658
+ ...currentGroupKeys,
2659
+ `${NOT_LOADED_YET_KEY_PREFIX}${i}`
2660
+ ], deepMapGroupValue2);
2721
2661
  continue;
2722
2662
  }
2723
2663
  const dataObject = dataArray[i].data;
@@ -2876,6 +2816,10 @@ function getEnhancedGroupData(options, deepMapValue) {
2876
2816
  }
2877
2817
  }
2878
2818
  }
2819
+ let theValue = groupKeys[groupKeys.length - 1];
2820
+ if (typeof theValue === "string" && theValue.startsWith(NOT_LOADED_YET_KEY_PREFIX)) {
2821
+ theValue = null;
2822
+ }
2879
2823
  const enhancedGroupData = {
2880
2824
  data,
2881
2825
  groupCount: groupItems.length,
@@ -2889,7 +2833,7 @@ function getEnhancedGroupData(options, deepMapValue) {
2889
2833
  indexInParentGroups: options.indexInParentGroups,
2890
2834
  indexInGroup: options.indexInGroup,
2891
2835
  indexInAll: options.indexInAll,
2892
- value: groupKeys[groupKeys.length - 1],
2836
+ value: theValue,
2893
2837
  rootGroupBy: groupBy,
2894
2838
  groupBy: groupNesting === groupBy.length ? groupBy : groupBy.slice(0, groupNesting),
2895
2839
  isGroupRow: true,
@@ -3079,6 +3023,25 @@ function buildDataSourceDataParams(componentState, overrides) {
3079
3023
  }
3080
3024
  function loadData(data, componentState, actions, overrides) {
3081
3025
  const dataParams = buildDataSourceDataParams(componentState, overrides);
3026
+ if (componentState.fullLazyLoad && dataParams.groupKeys) {
3027
+ const lazyGroupData = componentState.originalLazyGroupData;
3028
+ const key = [LAZY_ROOT_KEY_FOR_GROUPS, ...dataParams.groupKeys];
3029
+ const existingGroupRowInfo = lazyGroupData.get(key);
3030
+ if (existingGroupRowInfo && existingGroupRowInfo.cache) {
3031
+ const items = existingGroupRowInfo.items;
3032
+ const len = items.length;
3033
+ let allLoaded = true;
3034
+ for (let i = 0; i < len; i++) {
3035
+ if (items[i] == null) {
3036
+ allLoaded = false;
3037
+ break;
3038
+ }
3039
+ }
3040
+ if (allLoaded) {
3041
+ return Promise.resolve(true);
3042
+ }
3043
+ }
3044
+ }
3082
3045
  if (typeof data === "function") {
3083
3046
  data = data(dataParams);
3084
3047
  }
@@ -3087,7 +3050,7 @@ function loadData(data, componentState, actions, overrides) {
3087
3050
  actions.loading = true;
3088
3051
  }
3089
3052
  return Promise.resolve(data).then((dataParam) => {
3090
- var _a, _b, _c;
3053
+ var _a, _b, _c, _d;
3091
3054
  let dataArray = [];
3092
3055
  let skipAssign = false;
3093
3056
  if (Array.isArray(dataParam.data)) {
@@ -3103,6 +3066,7 @@ function loadData(data, componentState, actions, overrides) {
3103
3066
  const lazyGroupData = componentState.originalLazyGroupData;
3104
3067
  const key = [LAZY_ROOT_KEY_FOR_GROUPS, ...dataParams.groupKeys];
3105
3068
  const newGroupRowInfo = {
3069
+ cache: !!remoteData.cache,
3106
3070
  totalCount: (_a = remoteData.totalCount) != null ? _a : dataArray.length,
3107
3071
  items: dataArray
3108
3072
  };
@@ -3110,11 +3074,15 @@ function loadData(data, componentState, actions, overrides) {
3110
3074
  const existingGroupRowInfo = lazyGroupData.get(key);
3111
3075
  const currentGroupRowInfo = existingGroupRowInfo != null ? existingGroupRowInfo : {
3112
3076
  items: [],
3113
- totalCount: newGroupRowInfo.totalCount
3077
+ totalCount: newGroupRowInfo.totalCount,
3078
+ cache: (_b = newGroupRowInfo.cache) != null ? _b : true
3114
3079
  };
3080
+ if (existingGroupRowInfo) {
3081
+ existingGroupRowInfo.cache = newGroupRowInfo.cache;
3082
+ }
3115
3083
  currentGroupRowInfo.items.length = currentGroupRowInfo.totalCount;
3116
- const start = (_b = dataParams.lazyLoadStartIndex) != null ? _b : 0;
3117
- const end = Math.min((_c = remoteData.totalCount) != null ? _c : start + dataParams.lazyLoadBatchSize);
3084
+ const start = (_c = dataParams.lazyLoadStartIndex) != null ? _c : 0;
3085
+ const end = Math.min((_d = remoteData.totalCount) != null ? _d : start + dataParams.lazyLoadBatchSize);
3118
3086
  for (let i = start; i < end; i++) {
3119
3087
  currentGroupRowInfo.items[i] = newGroupRowInfo.items[i - start];
3120
3088
  }
@@ -3722,23 +3690,7 @@ function getPivotColumnsAndColumnGroups({
3722
3690
  const aggregationReducers = Object.keys(reducers).map((key) => {
3723
3691
  return __spreadProps(__spreadValues({}, reducers[key]), { id: key });
3724
3692
  });
3725
- const columns = new Map([
3726
- [
3727
- "labels",
3728
- {
3729
- header: "Row labels",
3730
- pivotBy,
3731
- valueGetter: (params) => {
3732
- var _a;
3733
- const { rowInfo } = params;
3734
- if (!rowInfo.data) {
3735
- return "Loading ...";
3736
- }
3737
- return rowInfo.groupKeys ? rowInfo.groupKeys[((_a = rowInfo.groupKeys) == null ? void 0 : _a.length) - 1] : null;
3738
- }
3739
- }
3740
- ]
3741
- ]);
3693
+ const columns = new Map([]);
3742
3694
  const columnGroups = new Map();
3743
3695
  const isSingleAggregationColumn = !showSeparatePivotColumnForSingleAggregation && aggregationReducers.length === 1;
3744
3696
  deepMap.visitDepthFirst((_value, keys, _indexInGroup, next) => {
@@ -4001,7 +3953,7 @@ function DataSourceWithContext(props) {
4001
3953
  if (typeof children === "function") {
4002
3954
  children = children(computedValues);
4003
3955
  }
4004
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, children);
3956
+ return /* @__PURE__ */ React7.createElement(React7.Fragment, null, children);
4005
3957
  }
4006
3958
  var DataSourceRoot = getComponentStateRoot({
4007
3959
  initSetupState: initSetupState2,
@@ -4024,14 +3976,14 @@ function DataSourceCmp({ children }) {
4024
3976
  globalThis.getDataSourceState = getState;
4025
3977
  }
4026
3978
  useLoadData();
4027
- return /* @__PURE__ */ React8.createElement(DataSourceContext.Provider, {
3979
+ return /* @__PURE__ */ React7.createElement(DataSourceContext.Provider, {
4028
3980
  value: contextValue
4029
- }, /* @__PURE__ */ React8.createElement(DataSourceWithContext, {
3981
+ }, /* @__PURE__ */ React7.createElement(DataSourceWithContext, {
4030
3982
  children
4031
3983
  }));
4032
3984
  }
4033
3985
  function DataSource(props) {
4034
- return /* @__PURE__ */ React8.createElement(DataSourceRoot, __spreadValues({}, props), /* @__PURE__ */ React8.createElement(DataSourceCmp, {
3986
+ return /* @__PURE__ */ React7.createElement(DataSourceRoot, __spreadValues({}, props), /* @__PURE__ */ React7.createElement(DataSourceCmp, {
4035
3987
  children: props.children
4036
3988
  }));
4037
3989
  }
@@ -4082,9 +4034,9 @@ function useColumnsWhen() {
4082
4034
  dataSourceActions.pivotTotalColumnPosition = pivotTotalColumnPosition;
4083
4035
  }, [pivotTotalColumnPosition]);
4084
4036
  useColumnsWhenInlineGroupRenderStrategy(groupByMap);
4085
- useColumnsWhenPivoting();
4086
- useColumnsWhenGrouping();
4037
+ const { toggleGroupRow } = useColumnsWhenGrouping();
4087
4038
  useHideEmptyGroupColumns(groupByMap);
4039
+ return { toggleGroupRow };
4088
4040
  }
4089
4041
  function useColumnsWhenInlineGroupRenderStrategy(groupByMap) {
4090
4042
  const toggleGroupRow = useToggleGroupRow();
@@ -4094,6 +4046,9 @@ function useColumnsWhenInlineGroupRenderStrategy(groupByMap) {
4094
4046
  } = useComponentState();
4095
4047
  function computeColumnsWhenInlineGroupRenderStrategy(columns2, groupByMap2, groupRenderStrategy2, toggleGroupRow2) {
4096
4048
  const computedColumns = new Map();
4049
+ if (groupRenderStrategy2 !== "inline") {
4050
+ return;
4051
+ }
4097
4052
  columns2.forEach((column, id) => {
4098
4053
  let base = {};
4099
4054
  const groupByForColumn = groupByMap2.get(column.field);
@@ -4153,51 +4108,32 @@ function useColumnsWhenInlineGroupRenderStrategy(groupByMap) {
4153
4108
  });
4154
4109
  }, [columns, groupByMap, groupRenderStrategy, toggleGroupRow]);
4155
4110
  }
4156
- function useColumnsWhenPivoting() {
4111
+ function useColumnsWhenGrouping() {
4157
4112
  const {
4158
4113
  componentState: { groupBy, pivotBy }
4159
4114
  } = useDataSourceContextValue();
4160
4115
  const {
4161
4116
  componentActions,
4162
4117
  componentState: {
4118
+ columns,
4119
+ groupColumn,
4120
+ groupRenderStrategy,
4163
4121
  pivotColumns,
4164
4122
  pivotColumn,
4165
- pivotRowLabelsColumn,
4166
4123
  pivotTotalColumnPosition
4167
4124
  }
4168
4125
  } = useComponentState();
4169
4126
  const toggleGroupRow = useToggleGroupRow();
4170
4127
  (0, import_react17.useEffect)(() => {
4171
- const computedPivotColumns = getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, {
4172
- pivotColumn,
4173
- pivotRowLabelsColumn,
4174
- pivotTotalColumnPosition,
4175
- pivotBy,
4176
- groupBy,
4177
- toggleGroupRow
4178
- });
4179
- componentActions.computedPivotColumns = computedPivotColumns;
4180
- }, [pivotColumns, pivotColumn, pivotRowLabelsColumn]);
4181
- }
4182
- function useColumnsWhenGrouping() {
4183
- const {
4184
- componentState: { groupBy }
4185
- } = useDataSourceContextValue();
4186
- const {
4187
- componentActions,
4188
- componentState: { columns, groupColumn, groupRenderStrategy, pivotColumns }
4189
- } = useComponentState();
4190
- const toggleGroupRow = useToggleGroupRow();
4191
- (0, import_react17.useEffect)(() => {
4192
- if (pivotColumns) {
4193
- return;
4194
- }
4195
4128
  const update = () => {
4196
4129
  const columnsWhenGrouping = getColumnsWhenGrouping({
4197
4130
  columns,
4198
4131
  groupColumn,
4199
- groupRenderStrategy,
4132
+ pivotColumn,
4133
+ pivotTotalColumnPosition,
4134
+ groupRenderStrategy: groupRenderStrategy === "inline" ? "single-column" : groupRenderStrategy,
4200
4135
  groupBy,
4136
+ pivotBy,
4201
4137
  pivotColumns,
4202
4138
  toggleGroupRow
4203
4139
  });
@@ -4209,7 +4145,17 @@ function useColumnsWhenGrouping() {
4209
4145
  delete: update,
4210
4146
  clear: update
4211
4147
  });
4212
- }, [columns, groupBy, groupColumn, groupRenderStrategy, pivotColumns]);
4148
+ }, [
4149
+ columns,
4150
+ groupBy,
4151
+ pivotBy,
4152
+ groupColumn,
4153
+ groupRenderStrategy,
4154
+ pivotColumns,
4155
+ pivotTotalColumnPosition,
4156
+ pivotColumn
4157
+ ]);
4158
+ return { toggleGroupRow };
4213
4159
  }
4214
4160
  function useHideEmptyGroupColumns(groupRowsMap) {
4215
4161
  const {
@@ -4276,14 +4222,14 @@ function getColumnsWhenGrouping(params) {
4276
4222
  const {
4277
4223
  pivotColumns,
4278
4224
  groupBy,
4225
+ pivotBy,
4279
4226
  groupColumn,
4227
+ pivotTotalColumnPosition,
4228
+ pivotColumn,
4280
4229
  groupRenderStrategy,
4281
4230
  toggleGroupRow,
4282
4231
  columns
4283
4232
  } = params;
4284
- if (pivotColumns) {
4285
- return void 0;
4286
- }
4287
4233
  if (groupRenderStrategy === "inline") {
4288
4234
  return void 0;
4289
4235
  }
@@ -4293,6 +4239,7 @@ function getColumnsWhenGrouping(params) {
4293
4239
  const generatedGroupColumn = getColumnForGroupBy({
4294
4240
  groupByForColumn,
4295
4241
  groupBy,
4242
+ pivotBy,
4296
4243
  groupIndexForColumn,
4297
4244
  groupCount: arr.length,
4298
4245
  groupRenderStrategy
@@ -4303,13 +4250,40 @@ function getColumnsWhenGrouping(params) {
4303
4250
  const singleGroupColumn = getSingleGroupColumn({
4304
4251
  groupCount: groupBy.length,
4305
4252
  groupBy,
4253
+ pivotBy,
4306
4254
  groupRenderStrategy
4307
4255
  }, toggleGroupRow, groupColumn);
4308
4256
  computedColumns.set(singleGroupColumn.id || "group-by", singleGroupColumn);
4309
4257
  }
4310
- columns.forEach((col, colId) => {
4311
- computedColumns.set(colId, col);
4312
- });
4258
+ if (pivotColumns) {
4259
+ pivotColumns.forEach((col, key) => {
4260
+ if (col.pivotTotalColumn && pivotTotalColumnPosition === false) {
4261
+ return;
4262
+ }
4263
+ let column = __spreadValues({}, col);
4264
+ if (pivotColumn) {
4265
+ if (typeof pivotColumn === "function") {
4266
+ column = __spreadValues(__spreadValues({}, column), pivotColumn({
4267
+ column,
4268
+ pivotBy,
4269
+ groupBy
4270
+ }));
4271
+ } else {
4272
+ column = __spreadValues(__spreadValues({}, column), pivotColumn);
4273
+ }
4274
+ }
4275
+ if (!column.render && column.renderValue) {
4276
+ column.render = (renderOptions) => {
4277
+ return column.renderValue(renderOptions);
4278
+ };
4279
+ }
4280
+ computedColumns.set(key, column);
4281
+ });
4282
+ } else {
4283
+ columns.forEach((col, colId) => {
4284
+ computedColumns.set(colId, col);
4285
+ });
4286
+ }
4313
4287
  return computedColumns.size ? computedColumns : void 0;
4314
4288
  }
4315
4289
 
@@ -4348,7 +4322,7 @@ function useComputed() {
4348
4322
  }, [showSeparatePivotColumnForSingleAggregation]);
4349
4323
  const { multiSort } = dataSourceState;
4350
4324
  useColumnGroups();
4351
- useColumnsWhen();
4325
+ const { toggleGroupRow } = useColumnsWhen();
4352
4326
  const setSortInfo = (0, import_react18.useCallback)((sortInfo) => {
4353
4327
  var _a2;
4354
4328
  const newSortInfo = multiSort ? sortInfo : (_a2 = sortInfo[0]) != null ? _a2 : null;
@@ -4417,6 +4391,7 @@ function useComputed() {
4417
4391
  const computedPinnedStartOverflow = computedPinnedStartWidth ? computedPinnedStartColumnsWidth > computedPinnedStartWidth : false;
4418
4392
  const computedPinnedEndOverflow = computedPinnedEndWidth ? computedPinnedEndColumnsWidth > computedPinnedEndWidth : false;
4419
4393
  return {
4394
+ toggleGroupRow,
4420
4395
  computedPinnedStartOverflow,
4421
4396
  computedPinnedEndOverflow,
4422
4397
  computedPinnedStartWidth,
@@ -4440,7 +4415,7 @@ function useComputed() {
4440
4415
  }
4441
4416
 
4442
4417
  // src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
4443
- var React9 = __toModule(require("react"));
4418
+ var React8 = __toModule(require("react"));
4444
4419
 
4445
4420
  // src/components/InfiniteTable/hooks/useInternalProps.ts
4446
4421
  var useInternalProps = () => {
@@ -4448,9 +4423,9 @@ var useInternalProps = () => {
4448
4423
  };
4449
4424
 
4450
4425
  // src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
4451
- var InfiniteTableBody = React9.forwardRef(function InfiniteTableBody2(props, ref) {
4426
+ var InfiniteTableBody = React8.forwardRef(function InfiniteTableBody2(props, ref) {
4452
4427
  const { rootClassName: rootClassName12 } = useInternalProps();
4453
- return /* @__PURE__ */ React9.createElement("div", __spreadProps(__spreadValues({
4428
+ return /* @__PURE__ */ React8.createElement("div", __spreadProps(__spreadValues({
4454
4429
  ref
4455
4430
  }, props), {
4456
4431
  className: join(`${rootClassName12}Body`, position.relative, flex["1"], transformTranslateZero, props.className)
@@ -4458,16 +4433,16 @@ var InfiniteTableBody = React9.forwardRef(function InfiniteTableBody2(props, ref
4458
4433
  });
4459
4434
 
4460
4435
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx
4461
- var React21 = __toModule(require("react"));
4436
+ var React20 = __toModule(require("react"));
4462
4437
 
4463
4438
  // src/components/InfiniteTable/components/ScrollbarPlaceholder.tsx
4464
- var React10 = __toModule(require("react"));
4439
+ var React9 = __toModule(require("react"));
4465
4440
  function HorizontalScrollbarPlaceholderFn(props) {
4466
4441
  const scrollbarWidth2 = getScrollbarWidth();
4467
4442
  if (!scrollbarWidth2) {
4468
4443
  return null;
4469
4444
  }
4470
- return /* @__PURE__ */ React10.createElement("div", {
4445
+ return /* @__PURE__ */ React9.createElement("div", {
4471
4446
  "data-name": "horizontal-scrollbar-placeholder",
4472
4447
  style: __spreadValues({
4473
4448
  position: "absolute",
@@ -4477,13 +4452,13 @@ function HorizontalScrollbarPlaceholderFn(props) {
4477
4452
  }, props.style)
4478
4453
  });
4479
4454
  }
4480
- var HorizontalScrollbarPlaceholder = React10.memo(HorizontalScrollbarPlaceholderFn);
4455
+ var HorizontalScrollbarPlaceholder = React9.memo(HorizontalScrollbarPlaceholderFn);
4481
4456
  function VerticalScrollbarPlaceholderFn(props) {
4482
4457
  const scrollbarWidth2 = getScrollbarWidth();
4483
4458
  if (!scrollbarWidth2) {
4484
4459
  return null;
4485
4460
  }
4486
- return /* @__PURE__ */ React10.createElement("div", {
4461
+ return /* @__PURE__ */ React9.createElement("div", {
4487
4462
  "data-name": "vertical-scrollbar-placeholder",
4488
4463
  style: __spreadValues({
4489
4464
  position: "absolute",
@@ -4493,7 +4468,7 @@ function VerticalScrollbarPlaceholderFn(props) {
4493
4468
  }, props.style)
4494
4469
  });
4495
4470
  }
4496
- var VerticalScrollbarPlaceholder = React10.memo(VerticalScrollbarPlaceholderFn);
4471
+ var VerticalScrollbarPlaceholder = React9.memo(VerticalScrollbarPlaceholderFn);
4497
4472
 
4498
4473
  // src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
4499
4474
  var import_createRuntimeFn3 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
@@ -4508,15 +4483,15 @@ var HeaderSortIconCls = "_12zfob11 _16lm1iw1";
4508
4483
  var HeaderWrapperCls = "_12zfob1v _16lm1iw16 _16lm1iw1 _16lm1iwj _16lm1iw10";
4509
4484
 
4510
4485
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
4511
- var React17 = __toModule(require("react"));
4486
+ var React16 = __toModule(require("react"));
4512
4487
  var import_react26 = __toModule(require("react"));
4513
4488
 
4514
4489
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
4515
- var React13 = __toModule(require("react"));
4490
+ var React12 = __toModule(require("react"));
4516
4491
  var import_react22 = __toModule(require("react"));
4517
4492
 
4518
4493
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCell.tsx
4519
- var React11 = __toModule(require("react"));
4494
+ var React10 = __toModule(require("react"));
4520
4495
 
4521
4496
  // src/components/InfiniteTable/hooks/useInfiniteTableState.ts
4522
4497
  var import_react19 = __toModule(require("react"));
@@ -4575,16 +4550,16 @@ function InfiniteTableCellFn(props) {
4575
4550
  style.transform = `translate3d(${shiftLeft}px, 0px, 0px)`;
4576
4551
  }
4577
4552
  }
4578
- return /* @__PURE__ */ React11.createElement("div", __spreadProps(__spreadValues({}, domProps), {
4553
+ return /* @__PURE__ */ React10.createElement("div", __spreadProps(__spreadValues({}, domProps), {
4579
4554
  ref: domRef,
4580
4555
  style,
4581
4556
  "data-name": `Cell`,
4582
4557
  className: join(domProps.className, columnAlignCellStyle[(_b = column.align) != null ? _b : "start"], justifyContent[(_c = column.align) != null ? _c : "start"], InfiniteTableCellClassName, CellCls2, shifting ? `${InfiniteTableCellClassName}--shifting ${CellClsVariants.shifting}` : "")
4583
- }), beforeChildren, cssEllipsis ? /* @__PURE__ */ React11.createElement("div", {
4558
+ }), beforeChildren, cssEllipsis ? /* @__PURE__ */ React10.createElement("div", {
4584
4559
  className: `${rootClassName2}Cell_content ${cssEllipsisClassName}`
4585
4560
  }, children) : children, afterChildren);
4586
4561
  }
4587
- var InfiniteTableCell = React11.memo(InfiniteTableCellFn);
4562
+ var InfiniteTableCell = React10.memo(InfiniteTableCellFn);
4588
4563
 
4589
4564
  // src/components/InfiniteTable/hooks/useColumnPointerEvents.ts
4590
4565
  var import_binary_search = __toModule(require_binary_search());
@@ -4779,7 +4754,7 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
4779
4754
  var import_react_dom = __toModule(require("react-dom"));
4780
4755
 
4781
4756
  // src/components/InfiniteTable/components/icons/SortIcon.tsx
4782
- var React12 = __toModule(require("react"));
4757
+ var React11 = __toModule(require("react"));
4783
4758
  var import_react21 = __toModule(require("react"));
4784
4759
  var defaultLineStyle = {
4785
4760
  marginTop: 2,
@@ -4833,18 +4808,18 @@ function SortIcon(props) {
4833
4808
  if (direction === -1) {
4834
4809
  indexStyle.top = "100%";
4835
4810
  }
4836
- return /* @__PURE__ */ React12.createElement("div", {
4811
+ return /* @__PURE__ */ React11.createElement("div", {
4837
4812
  style: __spreadProps(__spreadValues({}, style), { width: size }),
4838
4813
  className: join(className, "ITableIcon", "ITableIcon-sort")
4839
- }, showIndex ? /* @__PURE__ */ React12.createElement("div", {
4814
+ }, showIndex ? /* @__PURE__ */ React11.createElement("div", {
4840
4815
  "data-name": "index",
4841
4816
  style: indexStyle
4842
- }, index) : null, /* @__PURE__ */ React12.createElement("div", {
4817
+ }, index) : null, /* @__PURE__ */ React11.createElement("div", {
4843
4818
  style: __spreadValues({ width: sizes[0] }, lineStyle),
4844
4819
  onTransitionEnd
4845
- }), /* @__PURE__ */ React12.createElement("div", {
4820
+ }), /* @__PURE__ */ React11.createElement("div", {
4846
4821
  style: __spreadValues({ width: sizes[1] }, lineStyle)
4847
- }), /* @__PURE__ */ React12.createElement("div", {
4822
+ }), /* @__PURE__ */ React11.createElement("div", {
4848
4823
  style: __spreadValues({ width: sizes[2] }, lineStyle)
4849
4824
  }));
4850
4825
  }
@@ -4875,7 +4850,7 @@ function InfiniteTableHeaderCell(props) {
4875
4850
  });
4876
4851
  }
4877
4852
  header = header != null ? header : column.name;
4878
- const sortTool = /* @__PURE__ */ React13.createElement(SortIcon, {
4853
+ const sortTool = /* @__PURE__ */ React12.createElement(SortIcon, {
4879
4854
  index: column.computedMultiSort ? column.computedSortIndex + 1 : void 0,
4880
4855
  className: `${baseCls}__sort-icon ${HeaderSortIconCls}`,
4881
4856
  direction: column.computedSorted ? column.computedSortedAsc ? 1 : -1 : 0
@@ -4913,7 +4888,7 @@ function InfiniteTableHeaderCell(props) {
4913
4888
  let offset = offsetFromProps != null ? offsetFromProps : virtualized ? 0 : column.computedPinningOffset;
4914
4889
  let draggingProxy = null;
4915
4890
  if (dragging) {
4916
- draggingProxy = /* @__PURE__ */ React13.createElement("div", {
4891
+ draggingProxy = /* @__PURE__ */ React12.createElement("div", {
4917
4892
  className: `${baseCls}Proxy ${HeaderCellProxy}`,
4918
4893
  style: {
4919
4894
  position: "absolute",
@@ -4926,7 +4901,7 @@ function InfiniteTableHeaderCell(props) {
4926
4901
  }, header);
4927
4902
  draggingProxy = (0, import_react_dom.createPortal)(draggingProxy, portalDOMRef.current);
4928
4903
  }
4929
- return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(InfiniteTableCell, {
4904
+ return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(InfiniteTableCell, {
4930
4905
  domRef: ref,
4931
4906
  column,
4932
4907
  "data-name": `HeaderCell`,
@@ -4942,11 +4917,11 @@ function InfiniteTableHeaderCell(props) {
4942
4917
  }
4943
4918
 
4944
4919
  // src/components/RawList/index.tsx
4945
- var React16 = __toModule(require("react"));
4920
+ var React15 = __toModule(require("react"));
4946
4921
  var import_react25 = __toModule(require("react"));
4947
4922
 
4948
4923
  // src/components/RawList/AvoidReactDiff.tsx
4949
- var React14 = __toModule(require("react"));
4924
+ var React13 = __toModule(require("react"));
4950
4925
  var import_react23 = __toModule(require("react"));
4951
4926
  function AvoidReactDiffFn(props) {
4952
4927
  const [children, setChildren] = (0, import_react23.useState)(props.updater.get());
@@ -4956,15 +4931,15 @@ function AvoidReactDiffFn(props) {
4956
4931
  });
4957
4932
  return remove;
4958
4933
  }, [props.updater]);
4959
- return /* @__PURE__ */ React14.createElement(React14.Fragment, null, children);
4934
+ return /* @__PURE__ */ React13.createElement(React13.Fragment, null, children);
4960
4935
  }
4961
- var AvoidReactDiff = React14.memo(AvoidReactDiffFn);
4936
+ var AvoidReactDiff = React13.memo(AvoidReactDiffFn);
4962
4937
 
4963
4938
  // src/components/RawList/useVirtualRenderer.ts
4964
4939
  var import_react24 = __toModule(require("react"));
4965
4940
 
4966
4941
  // src/components/RawList/ReactVirtualRenderer.tsx
4967
- var React15 = __toModule(require("react"));
4942
+ var React14 = __toModule(require("react"));
4968
4943
 
4969
4944
  // src/components/RawList/MappedItems.ts
4970
4945
  var MappedItems = class extends Logger {
@@ -5209,7 +5184,7 @@ var ReactVirtualRenderer = class extends Logger {
5209
5184
  };
5210
5185
  this.itemDOMRefs[elementIndex] = domRef;
5211
5186
  this.updaters[elementIndex] = buildSubscriptionCallback();
5212
- const item = /* @__PURE__ */ React15.createElement(AvoidReactDiff, {
5187
+ const item = /* @__PURE__ */ React14.createElement(AvoidReactDiff, {
5213
5188
  key: elementIndex,
5214
5189
  name: `${elementIndex}`,
5215
5190
  updater: this.updaters[elementIndex]
@@ -5306,11 +5281,11 @@ function RawListFn(props) {
5306
5281
  });
5307
5282
  return remove;
5308
5283
  }, [brain, onRenderUpdater]);
5309
- return /* @__PURE__ */ React16.createElement(AvoidReactDiff, {
5284
+ return /* @__PURE__ */ React15.createElement(AvoidReactDiff, {
5310
5285
  updater: onRenderUpdater
5311
5286
  });
5312
5287
  }
5313
- var RawList = React16.memo(RawListFn);
5288
+ var RawList = React15.memo(RawListFn);
5314
5289
 
5315
5290
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
5316
5291
  var debug3 = dbg("Header");
@@ -5331,7 +5306,7 @@ function InfiniteTableHeaderFn(props) {
5331
5306
  }
5332
5307
  return null;
5333
5308
  }
5334
- return /* @__PURE__ */ React17.createElement(InfiniteTableHeaderCell, {
5309
+ return /* @__PURE__ */ React16.createElement(InfiniteTableHeaderCell, {
5335
5310
  domRef: domRef2,
5336
5311
  column,
5337
5312
  headerHeight,
@@ -5356,18 +5331,18 @@ function InfiniteTableHeaderFn(props) {
5356
5331
  className: join(TableHeaderClassName, `${TableHeaderClassName}--virtualized`, className, headerCls),
5357
5332
  style
5358
5333
  };
5359
- return /* @__PURE__ */ React17.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React17.createElement(RawList, {
5334
+ return /* @__PURE__ */ React16.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React16.createElement(RawList, {
5360
5335
  brain,
5361
5336
  renderItem: renderColumn
5362
5337
  }));
5363
5338
  }
5364
- var InfiniteTableHeader = React17.memo(InfiniteTableHeaderFn);
5339
+ var InfiniteTableHeader = React16.memo(InfiniteTableHeaderFn);
5365
5340
 
5366
5341
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderUnvirtualized.tsx
5367
- var React20 = __toModule(require("react"));
5342
+ var React19 = __toModule(require("react"));
5368
5343
 
5369
5344
  // src/components/InfiniteTable/components/InfiniteTableHeader/renderColumnHeaderGroups.tsx
5370
- var React19 = __toModule(require("react"));
5345
+ var React18 = __toModule(require("react"));
5371
5346
 
5372
5347
  // src/components/InfiniteTable/components/InfiniteTableHeader/buildColumnAndGroupTree.ts
5373
5348
  function buildColumnAndGroupTree(columns, columnGroups, columnGroupsDepthsMap) {
@@ -5457,7 +5432,7 @@ function assignGroupOffsetsAndComputedWidths(items, groupOffset = 0) {
5457
5432
  }
5458
5433
 
5459
5434
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
5460
- var React18 = __toModule(require("react"));
5435
+ var React17 = __toModule(require("react"));
5461
5436
  var TableHeaderGroupClassName = `${rootClassName}HeaderGroup`;
5462
5437
  function InfiniteTableHeaderGroup(props) {
5463
5438
  const { columnGroup, height, headerHeight } = props;
@@ -5471,16 +5446,16 @@ function InfiniteTableHeaderGroup(props) {
5471
5446
  width: columnGroup.computedWidth,
5472
5447
  height
5473
5448
  };
5474
- return /* @__PURE__ */ React18.createElement("div", {
5449
+ return /* @__PURE__ */ React17.createElement("div", {
5475
5450
  "data-group-id": columnGroup.id,
5476
5451
  className: join(HeaderGroupCls, TableHeaderGroupClassName, `${TableHeaderGroupClassName}--unvirtualized`),
5477
5452
  style
5478
- }, /* @__PURE__ */ React18.createElement("div", {
5453
+ }, /* @__PURE__ */ React17.createElement("div", {
5479
5454
  className: join(`${TableHeaderGroupClassName}__header`, HeaderGroup_Header),
5480
5455
  style: { height: headerHeight }
5481
- }, /* @__PURE__ */ React18.createElement("div", {
5456
+ }, /* @__PURE__ */ React17.createElement("div", {
5482
5457
  className: join(`${TableHeaderGroupClassName}__header-content`, cssEllipsisClassName)
5483
- }, header)), /* @__PURE__ */ React18.createElement("div", {
5458
+ }, header)), /* @__PURE__ */ React17.createElement("div", {
5484
5459
  className: join(`${TableHeaderGroupClassName}__children`, HeaderGroup_Children)
5485
5460
  }, props.children));
5486
5461
  }
@@ -5503,7 +5478,7 @@ function renderColumnHeaderGroups(config) {
5503
5478
  return items2.map((colGroupItem) => {
5504
5479
  if (colGroupItem.type === "column") {
5505
5480
  const col = colGroupItem.ref;
5506
- return /* @__PURE__ */ React19.createElement(InfiniteTableHeaderCell, {
5481
+ return /* @__PURE__ */ React18.createElement(InfiniteTableHeaderCell, {
5507
5482
  key: col.id,
5508
5483
  headerHeight: (columnGroupsMaxDepth - colGroupItem.depth + 2) * headerHeight,
5509
5484
  column: col,
@@ -5517,7 +5492,7 @@ function renderColumnHeaderGroups(config) {
5517
5492
  colIds.push(col.id);
5518
5493
  return col;
5519
5494
  });
5520
- return /* @__PURE__ */ React19.createElement(InfiniteTableHeaderGroup, {
5495
+ return /* @__PURE__ */ React18.createElement(InfiniteTableHeaderGroup, {
5521
5496
  key: `${colGroupItem.uniqueGroupId.join("/")}`,
5522
5497
  columns: columns2,
5523
5498
  height: (columnGroupsMaxDepth - colGroupItem.depth + 2) * headerHeight,
@@ -5570,9 +5545,9 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
5570
5545
  },
5571
5546
  computed: { computedVisibleColumnsMap: columnsMap }
5572
5547
  } = useInfiniteTable();
5573
- const domRef = React20.useRef(null);
5548
+ const domRef = React19.useRef(null);
5574
5549
  const hasColumnGroups = computedColumnGroups.size > 0;
5575
- const columnHeaderGroups = React20.useMemo(() => {
5550
+ const columnHeaderGroups = React19.useMemo(() => {
5576
5551
  return hasColumnGroups ? renderColumnHeaderGroups({
5577
5552
  columnGroups: computedColumnGroups,
5578
5553
  columnGroupsDepthsMap,
@@ -5591,7 +5566,7 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
5591
5566
  columnGroupsMaxDepth
5592
5567
  ]);
5593
5568
  const children = hasColumnGroups ? columnHeaderGroups : columns.map((c) => {
5594
- return /* @__PURE__ */ React20.createElement(InfiniteTableHeaderCell, {
5569
+ return /* @__PURE__ */ React19.createElement(InfiniteTableHeaderCell, {
5595
5570
  key: c.id,
5596
5571
  headerHeight,
5597
5572
  column: c,
@@ -5614,20 +5589,20 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
5614
5589
  const removeOnScroll = scroller.onScroll(onScroll);
5615
5590
  return removeOnScroll;
5616
5591
  }, [brain, scrollListener]);
5617
- return /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({}, domProps), {
5592
+ return /* @__PURE__ */ React19.createElement("div", __spreadProps(__spreadValues({}, domProps), {
5618
5593
  className: join(TableHeaderClassName2, `${TableHeaderClassName2}--unvirtualized`, pinning ? `${TableHeaderClassName2}--pinned ${TableHeaderClassName2}-${pinning}` : "", scrollable ? `${TableHeaderClassName2}--overflow` : "", domProps.className, HeaderClsRecipe({
5619
5594
  pinned: pinning,
5620
5595
  virtualized: false,
5621
5596
  overflow: scrollable
5622
5597
  })),
5623
5598
  style
5624
- }), /* @__PURE__ */ React20.createElement("div", {
5599
+ }), /* @__PURE__ */ React19.createElement("div", {
5625
5600
  style: { width: totalWidth },
5626
5601
  className: join(flexFlow.row, display.flex),
5627
5602
  ref: domRef
5628
5603
  }, children));
5629
5604
  }
5630
- var InfiniteTableHeaderUnvirtualized = React20.memo(InfiniteTableHeaderUnvirtualizedFn);
5605
+ var InfiniteTableHeaderUnvirtualized = React19.memo(InfiniteTableHeaderUnvirtualizedFn);
5631
5606
 
5632
5607
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx
5633
5608
  function TableHeaderWrapper(props) {
@@ -5660,7 +5635,7 @@ function TableHeaderWrapper(props) {
5660
5635
  const unvirtualizedStyle = !virtualizeHeader && computedPinnedStartColumnsWidth ? {
5661
5636
  left: computedPinnedStartWidth
5662
5637
  } : void 0;
5663
- const header = virtualizeHeader ? /* @__PURE__ */ React21.createElement(InfiniteTableHeader, {
5638
+ const header = virtualizeHeader ? /* @__PURE__ */ React20.createElement(InfiniteTableHeader, {
5664
5639
  columns: computedUnpinnedColumns,
5665
5640
  repaintId: virtualizeHeader ? repaintId : void 0,
5666
5641
  brain,
@@ -5673,7 +5648,7 @@ function TableHeaderWrapper(props) {
5673
5648
  },
5674
5649
  availableWidth: computedUnpinnedColumnsWidth,
5675
5650
  totalWidth: computedUnpinnedColumnsWidth
5676
- }) : /* @__PURE__ */ React21.createElement(InfiniteTableHeaderUnvirtualized, {
5651
+ }) : /* @__PURE__ */ React20.createElement(InfiniteTableHeaderUnvirtualized, {
5677
5652
  style: unvirtualizedStyle,
5678
5653
  brain,
5679
5654
  scrollable: true,
@@ -5682,12 +5657,12 @@ function TableHeaderWrapper(props) {
5682
5657
  availableWidth: computedUnpinnedColumnsWidth,
5683
5658
  totalWidth: computedUnpinnedColumnsWidth
5684
5659
  });
5685
- return /* @__PURE__ */ React21.createElement("div", {
5660
+ return /* @__PURE__ */ React20.createElement("div", {
5686
5661
  className: HeaderWrapperCls,
5687
5662
  style: {
5688
5663
  height: virtualizeHeader ? height : void 0
5689
5664
  }
5690
- }, hasPinnedStart ? /* @__PURE__ */ React21.createElement(InfiniteTableHeaderUnvirtualized, {
5665
+ }, hasPinnedStart ? /* @__PURE__ */ React20.createElement(InfiniteTableHeaderUnvirtualized, {
5691
5666
  style: {
5692
5667
  left: 0,
5693
5668
  position: "absolute",
@@ -5699,7 +5674,7 @@ function TableHeaderWrapper(props) {
5699
5674
  scrollable: computedPinnedStartOverflow,
5700
5675
  pinning: "start",
5701
5676
  scrollListener: computedPinnedStartOverflow ? pinnedStartScrollListener : void 0
5702
- }) : null, header, hasPinnedEnd ? /* @__PURE__ */ React21.createElement(InfiniteTableHeaderUnvirtualized, {
5677
+ }) : null, header, hasPinnedEnd ? /* @__PURE__ */ React20.createElement(InfiniteTableHeaderUnvirtualized, {
5703
5678
  style: {
5704
5679
  right: scrollbars.vertical ? getScrollbarWidth() : 0,
5705
5680
  position: "absolute",
@@ -5711,7 +5686,7 @@ function TableHeaderWrapper(props) {
5711
5686
  scrollable: computedPinnedEndOverflow,
5712
5687
  pinning: "end",
5713
5688
  scrollListener: computedPinnedEndOverflow ? pinnedEndScrollListener : void 0
5714
- }) : null, scrollbars.vertical ? /* @__PURE__ */ React21.createElement(VerticalScrollbarPlaceholder, {
5689
+ }) : null, scrollbars.vertical ? /* @__PURE__ */ React20.createElement(VerticalScrollbarPlaceholder, {
5715
5690
  style: {
5716
5691
  height: "100%",
5717
5692
  right: 0
@@ -5720,7 +5695,7 @@ function TableHeaderWrapper(props) {
5720
5695
  }
5721
5696
 
5722
5697
  // src/components/VirtualScrollContainer/index.tsx
5723
- var React22 = __toModule(require("react"));
5698
+ var React21 = __toModule(require("react"));
5724
5699
  var import_react29 = __toModule(require("react"));
5725
5700
 
5726
5701
  // src/components/hooks/useOnScroll.ts
@@ -5764,7 +5739,7 @@ var getScrollableClassName = (scrollable) => {
5764
5739
 
5765
5740
  // src/components/VirtualScrollContainer/index.tsx
5766
5741
  var rootClassName6 = "InfiniteVirtualScrollContainer";
5767
- var VirtualScrollContainer = React22.forwardRef(function VirtualScrollContainer2(props, ref) {
5742
+ var VirtualScrollContainer = React21.forwardRef(function VirtualScrollContainer2(props, ref) {
5768
5743
  const {
5769
5744
  children,
5770
5745
  scrollable = true,
@@ -5774,7 +5749,7 @@ var VirtualScrollContainer = React22.forwardRef(function VirtualScrollContainer2
5774
5749
  } = props;
5775
5750
  const domRef = ref != null ? ref : (0, import_react29.useRef)(null);
5776
5751
  useOnScroll(domRef, onContainerScroll);
5777
- return /* @__PURE__ */ React22.createElement("div", {
5752
+ return /* @__PURE__ */ React21.createElement("div", {
5778
5753
  ref: domRef,
5779
5754
  style,
5780
5755
  className: join(className, rootClassName6, VirtualScrollContainerCls, getScrollableClassName(scrollable))
@@ -5782,7 +5757,7 @@ var VirtualScrollContainer = React22.forwardRef(function VirtualScrollContainer2
5782
5757
  });
5783
5758
 
5784
5759
  // src/components/VirtualList/SpacePlaceholder.tsx
5785
- var React23 = __toModule(require("react"));
5760
+ var React22 = __toModule(require("react"));
5786
5761
  function SpacePlaceholderFn(props) {
5787
5762
  const { height, width, count } = props;
5788
5763
  const style = {
@@ -5792,7 +5767,7 @@ function SpacePlaceholderFn(props) {
5792
5767
  opacity: 0,
5793
5768
  pointerEvents: "none"
5794
5769
  };
5795
- return /* @__PURE__ */ React23.createElement("div", {
5770
+ return /* @__PURE__ */ React22.createElement("div", {
5796
5771
  "data-count": count,
5797
5772
  "data-placeholder-width": true ? width : void 0,
5798
5773
  "data-placeholder-height": true ? height : void 0,
@@ -5800,20 +5775,20 @@ function SpacePlaceholderFn(props) {
5800
5775
  style
5801
5776
  });
5802
5777
  }
5803
- var SpacePlaceholder = React23.memo(SpacePlaceholderFn);
5778
+ var SpacePlaceholder = React22.memo(SpacePlaceholderFn);
5804
5779
 
5805
5780
  // src/components/InfiniteTable/hooks/useListRendering.tsx
5806
5781
  var import_react41 = __toModule(require("react"));
5807
5782
 
5808
5783
  // src/components/InfiniteTable/hooks/useUnpinnedRendering.tsx
5809
- var React29 = __toModule(require("react"));
5784
+ var React28 = __toModule(require("react"));
5810
5785
  var import_react33 = __toModule(require("react"));
5811
5786
 
5812
5787
  // src/components/VirtualList/VirtualRowList.tsx
5813
- var React25 = __toModule(require("react"));
5788
+ var React24 = __toModule(require("react"));
5814
5789
 
5815
5790
  // src/components/VirtualList/VirtualList.tsx
5816
- var React24 = __toModule(require("react"));
5791
+ var React23 = __toModule(require("react"));
5817
5792
  var import_react30 = __toModule(require("react"));
5818
5793
 
5819
5794
  // src/components/VirtualList/VirtualList.css.ts
@@ -5895,19 +5870,19 @@ var VirtualList = (props) => {
5895
5870
  if (true) {
5896
5871
  domProps["data-cmp-name"] = `VirtualList`;
5897
5872
  }
5898
- return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React24.createElement(VirtualScrollContainer, {
5873
+ return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React23.createElement(VirtualScrollContainer, {
5899
5874
  scrollable,
5900
5875
  onContainerScroll
5901
- }, /* @__PURE__ */ React24.createElement("div", {
5876
+ }, /* @__PURE__ */ React23.createElement("div", {
5902
5877
  ref: domRef,
5903
5878
  className: scrollTransformTargetCls,
5904
5879
  "data-name": "scroll-transform-target"
5905
- }, /* @__PURE__ */ React24.createElement(RawList, {
5880
+ }, /* @__PURE__ */ React23.createElement(RawList, {
5906
5881
  brain: virtualBrain,
5907
5882
  renderItem,
5908
5883
  repaintId,
5909
5884
  debugChannel: "VirtualList-" + mainAxis
5910
- })), children, /* @__PURE__ */ React24.createElement(SpacePlaceholder, {
5885
+ })), children, /* @__PURE__ */ React23.createElement(SpacePlaceholder, {
5911
5886
  count,
5912
5887
  width,
5913
5888
  height
@@ -5917,14 +5892,14 @@ var VirtualList = (props) => {
5917
5892
  // src/components/VirtualList/VirtualRowList.tsx
5918
5893
  var VirtualRowList = (props) => {
5919
5894
  const _a = props, { rowWidth, rowHeight, renderRow } = _a, listProps = __objRest(_a, ["rowWidth", "rowHeight", "renderRow"]);
5920
- const renderItem = React25.useCallback((renderProps) => {
5895
+ const renderItem = React24.useCallback((renderProps) => {
5921
5896
  return renderRow({
5922
5897
  domRef: renderProps.domRef,
5923
5898
  rowHeight: renderProps.itemSize,
5924
5899
  rowIndex: renderProps.itemIndex
5925
5900
  });
5926
5901
  }, [renderRow]);
5927
- return /* @__PURE__ */ React25.createElement(VirtualList, __spreadProps(__spreadValues({}, listProps), {
5902
+ return /* @__PURE__ */ React24.createElement(VirtualList, __spreadProps(__spreadValues({}, listProps), {
5928
5903
  renderItem,
5929
5904
  mainAxis: "vertical",
5930
5905
  itemMainAxisSize: rowHeight,
@@ -5933,11 +5908,11 @@ var VirtualRowList = (props) => {
5933
5908
  };
5934
5909
 
5935
5910
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRow.tsx
5936
- var React27 = __toModule(require("react"));
5911
+ var React26 = __toModule(require("react"));
5937
5912
  var import_react32 = __toModule(require("react"));
5938
5913
 
5939
5914
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx
5940
- var React26 = __toModule(require("react"));
5915
+ var React25 = __toModule(require("react"));
5941
5916
  var { rootClassName: rootClassName8 } = internalProps;
5942
5917
  var InfiniteTableColumnCellClassName = `${rootClassName8}ColumnCell`;
5943
5918
  function isColumnWithField(c) {
@@ -5962,9 +5937,6 @@ function InfiniteTableColumnCellFn(props) {
5962
5937
  }
5963
5938
  const { data, isGroupRow, groupBy } = rowInfo;
5964
5939
  const groupRowInfo = null;
5965
- if (rowInfo.indexInAll === 0 && column.groupByField && column.groupByField === "stack") {
5966
- debugger;
5967
- }
5968
5940
  let value = isGroupRow && groupBy && column.groupByField ? rowInfo.value : isColumnWithField(column) ? data == null ? void 0 : data[column.field] : null;
5969
5941
  if (column.valueGetter) {
5970
5942
  value = column.valueGetter(isGroupRow ? {
@@ -5997,7 +5969,8 @@ function InfiniteTableColumnCellFn(props) {
5997
5969
  rowIndex,
5998
5970
  toggleGroupRow,
5999
5971
  toggleCurrentGroupRow: () => toggleGroupRow(rowInfo.groupKeys),
6000
- groupBy: computedDataSource.groupBy
5972
+ groupBy: computedDataSource.groupBy,
5973
+ pivotBy: computedDataSource.pivotBy
6001
5974
  });
6002
5975
  if (column.render) {
6003
5976
  renderValue = column.render(renderParam);
@@ -6033,7 +6006,7 @@ function InfiniteTableColumnCellFn(props) {
6033
6006
  }
6034
6007
  }
6035
6008
  }
6036
- return /* @__PURE__ */ React26.createElement(InfiniteTableCell, __spreadProps(__spreadValues({
6009
+ return /* @__PURE__ */ React25.createElement(InfiniteTableCell, __spreadProps(__spreadValues({
6037
6010
  domRef,
6038
6011
  offsetProperty
6039
6012
  }, dataset), {
@@ -6044,7 +6017,7 @@ function InfiniteTableColumnCellFn(props) {
6044
6017
  className: join(useCellClassName(column, [InfiniteTableColumnCellClassName, InfiniteTableCellClassName], ColumnCellRecipe, { dragging: false }), colClassName)
6045
6018
  }), hidden ? null : renderValue);
6046
6019
  }
6047
- var InfiniteTableColumnCell = React26.memo(InfiniteTableColumnCellFn);
6020
+ var InfiniteTableColumnCell = React25.memo(InfiniteTableColumnCellFn);
6048
6021
 
6049
6022
  // src/components/InfiniteTable/components/InfiniteTableRow/useRowDOMProps.ts
6050
6023
  var import_react31 = __toModule(require("react"));
@@ -6175,12 +6148,12 @@ function InfiniteTableRowFn(props) {
6175
6148
  height: rowHeight
6176
6149
  }, domProps.style);
6177
6150
  const renderCellRef = (0, import_react32.useRef)(null);
6178
- const renderCell = React27.useCallback(({ domRef, itemIndex }) => {
6151
+ const renderCell = React26.useCallback(({ domRef, itemIndex }) => {
6179
6152
  const column = columns[itemIndex];
6180
6153
  if (!column) {
6181
6154
  }
6182
6155
  const hidden = false;
6183
- return /* @__PURE__ */ React27.createElement(InfiniteTableColumnCell, {
6156
+ return /* @__PURE__ */ React26.createElement(InfiniteTableColumnCell, {
6184
6157
  getData,
6185
6158
  rowInfo,
6186
6159
  groupRenderStrategy,
@@ -6207,18 +6180,18 @@ function InfiniteTableRowFn(props) {
6207
6180
  if (true) {
6208
6181
  domProps["data-cmp-name"] = "ITableRow";
6209
6182
  }
6210
- return /* @__PURE__ */ React27.createElement("div", __spreadProps(__spreadValues({}, domProps), {
6183
+ return /* @__PURE__ */ React26.createElement("div", __spreadProps(__spreadValues({}, domProps), {
6211
6184
  style
6212
- }), /* @__PURE__ */ React27.createElement(RawList, {
6185
+ }), /* @__PURE__ */ React26.createElement(RawList, {
6213
6186
  brain,
6214
6187
  renderItem: renderCell,
6215
6188
  debugChannel: `${rowIndex}`
6216
6189
  }));
6217
6190
  }
6218
- var InfiniteTableRow = React27.memo(InfiniteTableRowFn);
6191
+ var InfiniteTableRow = React26.memo(InfiniteTableRowFn);
6219
6192
 
6220
6193
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowUnvirtualized.tsx
6221
- var React28 = __toModule(require("react"));
6194
+ var React27 = __toModule(require("react"));
6222
6195
  function TableRowUnvirtualizedFn(props) {
6223
6196
  const {
6224
6197
  rowHeight,
@@ -6239,7 +6212,7 @@ function TableRowUnvirtualizedFn(props) {
6239
6212
  }, domProps.style);
6240
6213
  const children = columns.map((col) => {
6241
6214
  const hidden = false;
6242
- return /* @__PURE__ */ React28.createElement(InfiniteTableColumnCell, {
6215
+ return /* @__PURE__ */ React27.createElement(InfiniteTableColumnCell, {
6243
6216
  key: col.id,
6244
6217
  virtualized: false,
6245
6218
  rowHeight,
@@ -6252,11 +6225,11 @@ function TableRowUnvirtualizedFn(props) {
6252
6225
  column: col
6253
6226
  });
6254
6227
  });
6255
- return /* @__PURE__ */ React28.createElement("div", __spreadProps(__spreadValues({}, domProps), {
6228
+ return /* @__PURE__ */ React27.createElement("div", __spreadProps(__spreadValues({}, domProps), {
6256
6229
  style
6257
6230
  }), children);
6258
6231
  }
6259
- var TableRowUnvirtualized = React28.memo(TableRowUnvirtualizedFn);
6232
+ var TableRowUnvirtualized = React27.memo(TableRowUnvirtualizedFn);
6260
6233
 
6261
6234
  // src/components/InfiniteTable/hooks/useUnpinnedRendering.tsx
6262
6235
  function useUnpinnedRendering(params) {
@@ -6299,7 +6272,7 @@ function useUnpinnedRendering(params) {
6299
6272
  rowProps.repaintId = repaintId;
6300
6273
  }
6301
6274
  const TableRowComponent = shouldVirtualizeColumns ? InfiniteTableRow : TableRowUnvirtualized;
6302
- return /* @__PURE__ */ React29.createElement(TableRowComponent, __spreadValues({}, rowProps));
6275
+ return /* @__PURE__ */ React28.createElement(TableRowComponent, __spreadValues({}, rowProps));
6303
6276
  }, [
6304
6277
  repaintId,
6305
6278
  rowHeight,
@@ -6309,7 +6282,7 @@ function useUnpinnedRendering(params) {
6309
6282
  horizontalVirtualBrain,
6310
6283
  verticalVirtualBrain
6311
6284
  ]);
6312
- const fakeScrollbar = getScrollbarWidth() ? /* @__PURE__ */ React29.createElement("div", {
6285
+ const fakeScrollbar = getScrollbarWidth() ? /* @__PURE__ */ React28.createElement("div", {
6313
6286
  "data-name": "horizontal-scrollbar-placeholder--fake",
6314
6287
  style: {
6315
6288
  position: "absolute",
@@ -6320,10 +6293,10 @@ function useUnpinnedRendering(params) {
6320
6293
  overflow: "auto",
6321
6294
  visibility: columnShifts ? "visible" : "hidden"
6322
6295
  }
6323
- }, /* @__PURE__ */ React29.createElement("div", {
6296
+ }, /* @__PURE__ */ React28.createElement("div", {
6324
6297
  style: { height: "100%", width: computedUnpinnedColumnsWidth }
6325
6298
  })) : null;
6326
- return rowHeight != 0 ? /* @__PURE__ */ React29.createElement(VirtualRowList, {
6299
+ return rowHeight != 0 ? /* @__PURE__ */ React28.createElement(VirtualRowList, {
6327
6300
  repaintId: `${repaintId}-unpinned-`,
6328
6301
  brain: verticalVirtualBrain,
6329
6302
  onContainerScroll: applyScrollHorizontal,
@@ -6466,11 +6439,11 @@ var useOnContainerScroll = ({
6466
6439
  };
6467
6440
 
6468
6441
  // src/components/InfiniteTable/hooks/usePinnedRendering.tsx
6469
- var React31 = __toModule(require("react"));
6442
+ var React30 = __toModule(require("react"));
6470
6443
  var import_react37 = __toModule(require("react"));
6471
6444
 
6472
6445
  // src/components/VirtualList/RowListWithExternalScrolling.tsx
6473
- var React30 = __toModule(require("react"));
6446
+ var React29 = __toModule(require("react"));
6474
6447
  var import_react36 = __toModule(require("react"));
6475
6448
 
6476
6449
  // src/components/hooks/useOnMount.ts
@@ -6546,7 +6519,7 @@ var RowListWithExternalScrolling = (props) => {
6546
6519
  if (true) {
6547
6520
  domProps["data-cmp-name"] = "RowListWithExternalScrolling";
6548
6521
  }
6549
- return /* @__PURE__ */ React30.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React30.createElement(RawList, {
6522
+ return /* @__PURE__ */ React29.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React29.createElement(RawList, {
6550
6523
  brain,
6551
6524
  renderItem,
6552
6525
  repaintId
@@ -6569,7 +6542,7 @@ function PinnedRowsContainer(props) {
6569
6542
  brain,
6570
6543
  renderRow
6571
6544
  } = props;
6572
- const style = React31.useMemo(() => {
6545
+ const style = React30.useMemo(() => {
6573
6546
  const result = pinning === "end" ? {
6574
6547
  width: rowWidth,
6575
6548
  height,
@@ -6595,7 +6568,7 @@ function PinnedRowsContainer(props) {
6595
6568
  className: join(`${PinnedRowsContainerClassName}`, PinnedRowsClsVariants[pinning === "start" ? "pinnedStart" : "pinnedEnd"], `${PinnedRowsContainerClassName}--pinned-${pinning}`, `${PinnedRowsContainerClassName}--overflow`, PinnedRowsClsVariants.overflow)
6596
6569
  };
6597
6570
  if (hasOverflow) {
6598
- return /* @__PURE__ */ React31.createElement(VirtualScrollContainer, {
6571
+ return /* @__PURE__ */ React30.createElement(VirtualScrollContainer, {
6599
6572
  scrollable: {
6600
6573
  horizontal: true,
6601
6574
  vertical: false
@@ -6611,18 +6584,18 @@ function PinnedRowsContainer(props) {
6611
6584
  className: join(PinnedRowsContainerClsVariants({
6612
6585
  pinned: pinning
6613
6586
  }), `${PinnedRowsContainerClassName}Container`, `${PinnedRowsContainerClassName}Container--pinned-${pinning}`)
6614
- }, /* @__PURE__ */ React31.createElement(RowListWithExternalScrolling, __spreadProps(__spreadValues({}, rowListProps), {
6587
+ }, /* @__PURE__ */ React30.createElement(RowListWithExternalScrolling, __spreadProps(__spreadValues({}, rowListProps), {
6615
6588
  onMount: (node) => {
6616
6589
  pinnedScrollListener == null ? void 0 : pinnedScrollListener.onScroll((scrollPosition) => {
6617
6590
  updateScroll(node, brain.getScrollPosition(), scrollPosition);
6618
6591
  });
6619
6592
  }
6620
- })), /* @__PURE__ */ React31.createElement(SpacePlaceholder, {
6593
+ })), /* @__PURE__ */ React30.createElement(SpacePlaceholder, {
6621
6594
  width: rowWidth,
6622
6595
  height: 1
6623
6596
  }));
6624
6597
  }
6625
- return /* @__PURE__ */ React31.createElement(RowListWithExternalScrolling, __spreadValues({}, rowListProps));
6598
+ return /* @__PURE__ */ React30.createElement(RowListWithExternalScrolling, __spreadValues({}, rowListProps));
6626
6599
  }
6627
6600
  function useRenderPinnedRow(params) {
6628
6601
  const { getData, getState, columnsWidth, columns, verticalBrain } = params;
@@ -6642,7 +6615,7 @@ function useRenderPinnedRow(params) {
6642
6615
  rowWidth: columnsWidth,
6643
6616
  columns
6644
6617
  }, rowParams);
6645
- return /* @__PURE__ */ React31.createElement(TableRowUnvirtualized, __spreadValues({}, rowProps));
6618
+ return /* @__PURE__ */ React30.createElement(TableRowUnvirtualized, __spreadValues({}, rowProps));
6646
6619
  }, [columnsWidth, columns, verticalBrain]);
6647
6620
  return renderPinnedRow;
6648
6621
  }
@@ -6685,7 +6658,7 @@ function usePinnedRenderingForSide(side, params) {
6685
6658
  columns,
6686
6659
  columnsWidth
6687
6660
  });
6688
- const pinnedList = columns.length && rowHeight !== 0 ? /* @__PURE__ */ React31.createElement(PinnedRowsContainer, {
6661
+ const pinnedList = columns.length && rowHeight !== 0 ? /* @__PURE__ */ React30.createElement(PinnedRowsContainer, {
6689
6662
  pinning: side,
6690
6663
  pinnedScrollListener,
6691
6664
  hasOverflow,
@@ -6698,7 +6671,7 @@ function usePinnedRenderingForSide(side, params) {
6698
6671
  brain: verticalVirtualBrain,
6699
6672
  renderRow: renderRowPinned
6700
6673
  }) : null;
6701
- const pinnedScrollbarPlaceholder = pinnedList && hasHorizontalScrollbar && !hasOverflow ? /* @__PURE__ */ React31.createElement(HorizontalScrollbarPlaceholder, {
6674
+ const pinnedScrollbarPlaceholder = pinnedList && hasHorizontalScrollbar && !hasOverflow ? /* @__PURE__ */ React30.createElement(HorizontalScrollbarPlaceholder, {
6702
6675
  style: side === "end" ? {
6703
6676
  width: columnsWidth,
6704
6677
  right: hasVerticalScrollbar ? getScrollbarWidth() : 0
@@ -7267,7 +7240,8 @@ function useListRendering(param) {
7267
7240
  computedUnpinnedColumnsWidth,
7268
7241
  computedPinnedStartOverflow,
7269
7242
  computedPinnedEndOverflow,
7270
- computedVisibleColumns
7243
+ computedVisibleColumns,
7244
+ toggleGroupRow
7271
7245
  } = computed;
7272
7246
  const { componentState: dataSourceState, getState: getDataSourceState } = useDataSourceContextValue();
7273
7247
  const { dataArray } = dataSourceState;
@@ -7351,12 +7325,6 @@ function useListRendering(param) {
7351
7325
  horizontalVirtualBrain,
7352
7326
  reservedContentHeight
7353
7327
  });
7354
- const { componentActions: dataSourceActions } = useDataSourceContextValue();
7355
- const toggleGroupRow = (0, import_react41.useCallback)((groupKeys) => {
7356
- const newState = new GroupRowsState(getDataSourceState().groupRowsState);
7357
- newState.toggleGroupRow(groupKeys);
7358
- dataSourceActions.groupRowsState = newState;
7359
- }, []);
7360
7328
  const pinnedRenderingParams = {
7361
7329
  bodySize,
7362
7330
  scrollbars,
@@ -7410,7 +7378,7 @@ function useListRendering(param) {
7410
7378
  }
7411
7379
 
7412
7380
  // src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
7413
- var React32 = __toModule(require("react"));
7381
+ var React31 = __toModule(require("react"));
7414
7382
  var import_react42 = __toModule(require("react"));
7415
7383
 
7416
7384
  // src/components/utils/decamelize.ts
@@ -7446,10 +7414,10 @@ var enforceStyle = (node, style) => {
7446
7414
  node.style.setProperty(decamelize(propertyName), propertyValue, "important");
7447
7415
  }
7448
7416
  };
7449
- var InfiniteTableLicenseFooter = React32.forwardRef(function InfiniteTableLicenseFooter2(props, ref) {
7417
+ var InfiniteTableLicenseFooter = React31.forwardRef(function InfiniteTableLicenseFooter2(props, ref) {
7450
7418
  const { rootClassName: rootClassName12 } = useInternalProps();
7451
- const domRef = React32.useRef(null);
7452
- const domCallback = React32.useCallback((node) => {
7419
+ const domRef = React31.useRef(null);
7420
+ const domCallback = React31.useCallback((node) => {
7453
7421
  domRef.current = node;
7454
7422
  if (!ref) {
7455
7423
  return;
@@ -7474,12 +7442,12 @@ var InfiniteTableLicenseFooter = React32.forwardRef(function InfiniteTableLicens
7474
7442
  clearInterval(intervalId);
7475
7443
  };
7476
7444
  }, []);
7477
- return /* @__PURE__ */ React32.createElement("div", __spreadProps(__spreadValues({
7445
+ return /* @__PURE__ */ React31.createElement("div", __spreadProps(__spreadValues({
7478
7446
  ref: domCallback
7479
7447
  }, props), {
7480
7448
  className: join(`${rootClassName12}-Footer`, FooterCls, props.className),
7481
7449
  style: defaultStyle2
7482
- }), "Powered by", " ", /* @__PURE__ */ React32.createElement("a", {
7450
+ }), "Powered by", " ", /* @__PURE__ */ React31.createElement("a", {
7483
7451
  href: "https://infinite-table.com",
7484
7452
  rel: "noopener noreferrer",
7485
7453
  role: "link",
@@ -7641,7 +7609,7 @@ var useLicense = (licenseKey = "") => {
7641
7609
  const valid = (0, import_react43.useMemo)(() => {
7642
7610
  let valid2 = isValidLicense(licenseKey, {
7643
7611
  publishedAt: 1624970570587,
7644
- version: "0.2.1"
7612
+ version: "0.2.2"
7645
7613
  });
7646
7614
  if (!licenseKey && !valid2 && isInsideSandbox) {
7647
7615
  return true;
@@ -7652,7 +7620,7 @@ var useLicense = (licenseKey = "") => {
7652
7620
  };
7653
7621
 
7654
7622
  // src/components/CSSVariableWatch.tsx
7655
- var React33 = __toModule(require("react"));
7623
+ var React32 = __toModule(require("react"));
7656
7624
  var import_react44 = __toModule(require("react"));
7657
7625
  var error = err("CSSVariableWatch");
7658
7626
  var debug5 = dbg("CSSVariableWatch");
@@ -7667,14 +7635,14 @@ var WRAPPER_STYLE = {
7667
7635
  };
7668
7636
  var useCSSVariableWatch = (params) => {
7669
7637
  const lastValueRef = (0, import_react44.useRef)(0);
7670
- const onResize = React33.useCallback(({ height }) => {
7638
+ const onResize = React32.useCallback(({ height }) => {
7671
7639
  if (height && height !== lastValueRef.current) {
7672
7640
  lastValueRef.current = height;
7673
7641
  params.onChange(height);
7674
7642
  }
7675
7643
  }, [params.onChange]);
7676
7644
  useResizeObserver(params.ref, onResize, { earlyAttach: true });
7677
- React33.useLayoutEffect(() => {
7645
+ React32.useLayoutEffect(() => {
7678
7646
  const value = params.ref.current.getBoundingClientRect().height;
7679
7647
  if (value) {
7680
7648
  lastValueRef.current = value;
@@ -7690,11 +7658,11 @@ var CSSVariableWatch = (props) => {
7690
7658
  useCSSVariableWatch(__spreadProps(__spreadValues({}, props), {
7691
7659
  ref: domRef
7692
7660
  }));
7693
- return /* @__PURE__ */ React33.createElement("div", {
7661
+ return /* @__PURE__ */ React32.createElement("div", {
7694
7662
  "data-name": "css-variable-watcher",
7695
7663
  "data-var": props.varName,
7696
7664
  style: WRAPPER_STYLE
7697
- }, /* @__PURE__ */ React33.createElement("div", {
7665
+ }, /* @__PURE__ */ React32.createElement("div", {
7698
7666
  ref: domRef,
7699
7667
  style: {
7700
7668
  height: props.varName.startsWith("var(") ? props.varName : `var(${props.varName})`
@@ -7787,7 +7755,7 @@ function useDOMProps(initialDOMProps) {
7787
7755
  }
7788
7756
 
7789
7757
  // src/components/InfiniteTable/components/LoadMask.tsx
7790
- var React34 = __toModule(require("react"));
7758
+ var React33 = __toModule(require("react"));
7791
7759
 
7792
7760
  // src/components/InfiniteTable/components/LoadMask.css.ts
7793
7761
  var LoadMaskCls = { visible: "qy58ya1 qy58ya0 _16lm1iw2 _16lm1iwr _16lm1iwt _16lm1iwx _16lm1iwv", hidden: "qy58ya2 qy58ya0 _16lm1iw2 _16lm1iwr _16lm1iwt _16lm1iwx _16lm1iwv" };
@@ -7799,15 +7767,15 @@ var { rootClassName: rootClassName11 } = internalProps;
7799
7767
  var baseCls2 = `${rootClassName11}-LoadMask`;
7800
7768
  function LoadMaskFn(props) {
7801
7769
  const { visible, children = "Loading" } = props;
7802
- return /* @__PURE__ */ React34.createElement("div", {
7770
+ return /* @__PURE__ */ React33.createElement("div", {
7803
7771
  className: `${LoadMaskCls[visible ? "visible" : "hidden"]} ${baseCls2}`
7804
- }, /* @__PURE__ */ React34.createElement("div", {
7772
+ }, /* @__PURE__ */ React33.createElement("div", {
7805
7773
  className: `${LoadMaskOverlayCls} ${baseCls2}-Overlay`
7806
- }), /* @__PURE__ */ React34.createElement("div", {
7774
+ }), /* @__PURE__ */ React33.createElement("div", {
7807
7775
  className: `${LoadMaskTextCls} ${baseCls2}-Text`
7808
7776
  }, children));
7809
7777
  }
7810
- var LoadMask = React34.memo(LoadMaskFn);
7778
+ var LoadMask = React33.memo(LoadMaskFn);
7811
7779
 
7812
7780
  // src/components/InfiniteTable/index.tsx
7813
7781
  var InfiniteTableClassName = internalProps.rootClassName;
@@ -7826,7 +7794,7 @@ var InfiniteTableRoot = getComponentStateRoot({
7826
7794
  getParentState: () => useDataSource(),
7827
7795
  debugName: "InfiniteTable"
7828
7796
  });
7829
- var InfiniteTableComponent = React35.memo(function InfiniteTableComponent2() {
7797
+ var InfiniteTableComponent = React34.memo(function InfiniteTableComponent2() {
7830
7798
  var _a;
7831
7799
  const {
7832
7800
  componentState,
@@ -7873,7 +7841,7 @@ var InfiniteTableComponent = React35.memo(function InfiniteTableComponent2() {
7873
7841
  bodySize,
7874
7842
  computed
7875
7843
  });
7876
- React35.useEffect(() => {
7844
+ React34.useEffect(() => {
7877
7845
  const dataSourceState = getDataSourceState();
7878
7846
  const onChange = debounce((renderRange) => {
7879
7847
  dataSourceState.notifyRenderRangeChange(renderRange);
@@ -7883,7 +7851,7 @@ var InfiniteTableComponent = React35.memo(function InfiniteTableComponent2() {
7883
7851
  const licenseValid = useLicense(licenseKey);
7884
7852
  const domProps = useDOMProps(componentState.domProps);
7885
7853
  const LoadMaskCmp = (_a = components == null ? void 0 : components.LoadMask) != null ? _a : LoadMask;
7886
- React35.useLayoutEffect(() => {
7854
+ React34.useLayoutEffect(() => {
7887
7855
  const dataSourceState = getDataSourceState();
7888
7856
  const { onScrollbarsChange } = getInfiniteTableState();
7889
7857
  const { notifyScrollbarsChange } = dataSourceState;
@@ -7892,34 +7860,34 @@ var InfiniteTableComponent = React35.memo(function InfiniteTableComponent2() {
7892
7860
  }
7893
7861
  notifyScrollbarsChange(scrollbars);
7894
7862
  }, [scrollbars]);
7895
- React35.useEffect(() => {
7863
+ React34.useEffect(() => {
7896
7864
  dataSourceActions.scrollStopDelayUpdatedByTable = scrollStopDelay;
7897
7865
  }, [scrollStopDelay]);
7898
- return /* @__PURE__ */ React35.createElement("div", __spreadValues({
7866
+ return /* @__PURE__ */ React34.createElement("div", __spreadValues({
7899
7867
  ref: domRef
7900
- }, domProps), header ? /* @__PURE__ */ React35.createElement(TableHeaderWrapper, {
7868
+ }, domProps), header ? /* @__PURE__ */ React34.createElement(TableHeaderWrapper, {
7901
7869
  brain: horizontalVirtualBrain,
7902
7870
  repaintId,
7903
7871
  scrollbars
7904
- }) : null, /* @__PURE__ */ React35.createElement(InfiniteTableBody, null, /* @__PURE__ */ React35.createElement(VirtualScrollContainer, {
7872
+ }) : null, /* @__PURE__ */ React34.createElement(InfiniteTableBody, null, /* @__PURE__ */ React34.createElement(VirtualScrollContainer, {
7905
7873
  ref: scrollerDOMRef,
7906
7874
  onContainerScroll: applyScrollVertical,
7907
7875
  scrollable: ONLY_VERTICAL_SCROLLBAR
7908
- }, /* @__PURE__ */ React35.createElement("div", {
7876
+ }, /* @__PURE__ */ React34.createElement("div", {
7909
7877
  className: display.flex
7910
- }, pinnedStartList, centerList, pinnedEndList), /* @__PURE__ */ React35.createElement(SpacePlaceholder, {
7878
+ }, pinnedStartList, centerList, pinnedEndList), /* @__PURE__ */ React34.createElement(SpacePlaceholder, {
7911
7879
  count: dataArray.length,
7912
7880
  width: 0,
7913
7881
  height: reservedContentHeight
7914
- })), pinnedStartScrollbarPlaceholder, pinnedEndScrollbarPlaceholder, /* @__PURE__ */ React35.createElement(LoadMaskCmp, {
7882
+ })), pinnedStartScrollbarPlaceholder, pinnedEndScrollbarPlaceholder, /* @__PURE__ */ React34.createElement(LoadMaskCmp, {
7915
7883
  visible: loading
7916
- }, loadingText)), licenseValid ? null : /* @__PURE__ */ React35.createElement(InfiniteTableLicenseFooter, null), /* @__PURE__ */ React35.createElement("div", {
7884
+ }, loadingText)), licenseValid ? null : /* @__PURE__ */ React34.createElement(InfiniteTableLicenseFooter, null), /* @__PURE__ */ React34.createElement("div", {
7917
7885
  ref: portalDOMRef,
7918
7886
  className: join(`${rootClassName}Portal`, zIndex[1e3], position.absolute, top[0], left[0])
7919
- }), rowHeightCSSVar ? /* @__PURE__ */ React35.createElement(CSSVariableWatch, {
7887
+ }), rowHeightCSSVar ? /* @__PURE__ */ React34.createElement(CSSVariableWatch, {
7920
7888
  varName: rowHeightCSSVar,
7921
7889
  onChange: onRowHeightCSSVarChange
7922
- }) : null, headerHeightCSSVar ? /* @__PURE__ */ React35.createElement(CSSVariableWatch, {
7890
+ }) : null, headerHeightCSSVar ? /* @__PURE__ */ React34.createElement(CSSVariableWatch, {
7923
7891
  varName: headerHeightCSSVar,
7924
7892
  onChange: onHeaderHeightCSSVarChange
7925
7893
  }) : null);
@@ -7955,25 +7923,25 @@ function InfiniteTableContextProvider() {
7955
7923
  }
7956
7924
  componentActions.bodySize = bodySize;
7957
7925
  }, { earlyAttach: true });
7958
- React35.useEffect(() => {
7926
+ React34.useEffect(() => {
7959
7927
  return () => {
7960
7928
  componentState.onRowHeightCSSVarChange.destroy();
7961
7929
  componentState.onHeaderHeightCSSVarChange.destroy();
7962
7930
  };
7963
7931
  }, []);
7964
- React35.useEffect(() => {
7932
+ React34.useEffect(() => {
7965
7933
  if (scrollerDOMRef.current) {
7966
7934
  scrollerDOMRef.current.scrollTop = 0;
7967
7935
  }
7968
7936
  }, [scrollTopId, scrollerDOMRef]);
7969
7937
  const TableContext2 = getInfiniteTableContext();
7970
- return /* @__PURE__ */ React35.createElement(TableContext2.Provider, {
7938
+ return /* @__PURE__ */ React34.createElement(TableContext2.Provider, {
7971
7939
  value: contextValue
7972
- }, /* @__PURE__ */ React35.createElement(InfiniteTableComponent, null));
7940
+ }, /* @__PURE__ */ React34.createElement(InfiniteTableComponent, null));
7973
7941
  }
7974
7942
  function InfiniteTable(props) {
7975
- const table = /* @__PURE__ */ React35.createElement(InfiniteTableRoot, __spreadValues({}, props), /* @__PURE__ */ React35.createElement(InfiniteTableContextProvider, null));
7976
- return /* @__PURE__ */ React35.createElement(React35.StrictMode, null, table);
7943
+ const table = /* @__PURE__ */ React34.createElement(InfiniteTableRoot, __spreadValues({}, props), /* @__PURE__ */ React34.createElement(InfiniteTableContextProvider, null));
7944
+ return /* @__PURE__ */ React34.createElement(React34.StrictMode, null, table);
7977
7945
  }
7978
7946
  InfiniteTable.defaultProps = {
7979
7947
  rowHeight: 40,