@infinite-table/infinite-react 0.1.3 → 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 +141 -130
  2. package/index.esm.js +440 -340
  3. package/index.js +445 -343
  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,
@@ -1256,7 +1254,6 @@ var getComputedVisibleColumns = ({
1256
1254
  return false;
1257
1255
  }
1258
1256
  const result2 = isColumnVisible(columnVisibility, columnVisibilityAssumeVisible, colId);
1259
- console.log(columnVisibility, colId, result2);
1260
1257
  return result2;
1261
1258
  });
1262
1259
  const columnsArray = visibleColumnOrder.map((columnId) => columns.get(columnId)).filter(Boolean);
@@ -2045,7 +2042,7 @@ function useColumnGroups() {
2045
2042
  // src/components/InfiniteTable/hooks/useColumnsWhen.ts
2046
2043
  var import_react17 = __toModule(require("react"));
2047
2044
 
2048
- // src/components/InfiniteTable/state/getComputedPivotColumnsFromDataSourcePivotColumns.tsx
2045
+ // src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
2049
2046
  var React6 = __toModule(require("react"));
2050
2047
 
2051
2048
  // src/utils/join.ts
@@ -2116,91 +2113,15 @@ var userSelect = { none: "_16lm1iwm" };
2116
2113
  var willChange = { transform: "_16lm1iw19" };
2117
2114
  var zIndex = { "1": "_16lm1iwe", "10": "_16lm1iwf", "1000": "_16lm1iwg", "10000": "_16lm1iwh", "100000": "_16lm1iwi" };
2118
2115
 
2119
- // src/components/InfiniteTable/state/getComputedPivotColumnsFromDataSourcePivotColumns.tsx
2120
- function getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, params) {
2121
- if (!pivotColumns) {
2122
- return void 0;
2123
- }
2124
- const {
2125
- pivotColumn,
2126
- pivotRowLabelsColumn,
2127
- pivotBy,
2128
- groupBy,
2129
- pivotTotalColumnPosition,
2130
- toggleGroupRow
2131
- } = params;
2132
- const computedPivotColumns = new Map();
2133
- pivotColumns.forEach((col, key) => {
2134
- if (col.pivotTotalColumn && pivotTotalColumnPosition === false) {
2135
- return;
2136
- }
2137
- let column = __spreadValues({}, col);
2138
- const isPivotRowLabelsColumn = !column.pivotColumn && !column.pivotTotalColumn;
2139
- if (!isPivotRowLabelsColumn) {
2140
- if (pivotColumn) {
2141
- if (typeof pivotColumn === "function") {
2142
- column = __spreadValues(__spreadValues({}, column), pivotColumn({
2143
- column,
2144
- pivotBy,
2145
- groupBy
2146
- }));
2147
- } else {
2148
- column = __spreadValues(__spreadValues({}, column), pivotColumn);
2149
- }
2150
- }
2151
- } else {
2152
- if (pivotRowLabelsColumn) {
2153
- if (typeof pivotRowLabelsColumn === "function") {
2154
- column = __spreadValues(__spreadValues({}, column), pivotRowLabelsColumn({
2155
- column,
2156
- pivotBy,
2157
- groupBy
2158
- }));
2159
- } else {
2160
- column = __spreadValues(__spreadValues({}, column), pivotRowLabelsColumn);
2161
- }
2162
- }
2163
- if (!column.render) {
2164
- column.render = (renderOptions) => {
2165
- var _a;
2166
- let { value, rowInfo, column: column2, groupBy: groupBy2 } = renderOptions;
2167
- if (column2.renderValue) {
2168
- value = column2.renderValue(renderOptions);
2169
- }
2170
- const showExpanderIcon = (((_a = rowInfo.groupKeys) == null ? void 0 : _a.length) || 0) < groupBy2.length;
2171
- return /* @__PURE__ */ React6.createElement("div", {
2172
- className: join(display.flex, alignItems.center, GroupRowExpanderCls)
2173
- }, showExpanderIcon ? /* @__PURE__ */ React6.createElement(ExpanderIcon, {
2174
- expanded: !rowInfo.collapsed,
2175
- onChange: () => {
2176
- toggleGroupRow(rowInfo.groupKeys);
2177
- }
2178
- }) : null, /* @__PURE__ */ React6.createElement("div", {
2179
- className: cssEllipsisClassName
2180
- }, value != null ? value : null));
2181
- };
2182
- }
2183
- }
2184
- if (!column.render && column.renderValue) {
2185
- column.render = (renderOptions) => {
2186
- return column.renderValue(renderOptions);
2187
- };
2188
- }
2189
- computedPivotColumns.set(key, column);
2190
- });
2191
- return computedPivotColumns;
2192
- }
2193
-
2194
2116
  // src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
2195
- var React7 = __toModule(require("react"));
2196
2117
  function getGroupColumnRender({
2197
2118
  groupIndexForColumn,
2198
2119
  groupRenderStrategy,
2199
2120
  toggleGroupRow
2200
2121
  }) {
2201
2122
  return (renderOptions) => {
2202
- var _a;
2203
- let { value, rowInfo, column } = renderOptions;
2123
+ var _a, _b, _c;
2124
+ let { value, rowInfo, column, groupBy, pivotBy } = renderOptions;
2204
2125
  if (column.renderValue) {
2205
2126
  value = column.renderValue(renderOptions);
2206
2127
  }
@@ -2225,14 +2146,20 @@ function getGroupColumnRender({
2225
2146
  return null;
2226
2147
  }
2227
2148
  }
2228
- 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", {
2229
2161
  className: join(display.flex, alignItems.center)
2230
- }, /* @__PURE__ */ React7.createElement(ExpanderIcon, {
2231
- expanded: !collapsed,
2232
- onChange: () => {
2233
- toggleGroupRow(groupKeys);
2234
- }
2235
- }), /* @__PURE__ */ React7.createElement("div", {
2162
+ }, icon, /* @__PURE__ */ React6.createElement("div", {
2236
2163
  className: cssEllipsisClassName
2237
2164
  }, value != null ? value : null));
2238
2165
  };
@@ -2268,21 +2195,29 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
2268
2195
  groupByField: options.groupBy.map((g) => g.field),
2269
2196
  sortable: false,
2270
2197
  render: (renderOptions) => {
2271
- let { value, rowInfo, column } = renderOptions;
2198
+ var _a, _b;
2199
+ let { value, rowInfo, column, groupBy, pivotBy } = renderOptions;
2272
2200
  if (!rowInfo.isGroupRow) {
2273
2201
  return null;
2274
2202
  }
2275
2203
  if (column.renderValue) {
2276
2204
  value = column.renderValue(renderOptions);
2277
2205
  }
2278
- 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", {
2279
2219
  className: join(display.flex, alignItems.center, GroupRowExpanderCls)
2280
- }, /* @__PURE__ */ React7.createElement(ExpanderIcon, {
2281
- expanded: !rowInfo.collapsed,
2282
- onChange: () => {
2283
- toggleGroupRow(rowInfo.groupKeys);
2284
- }
2285
- }), /* @__PURE__ */ React7.createElement("div", {
2220
+ }, icon, /* @__PURE__ */ React6.createElement("div", {
2286
2221
  className: cssEllipsisClassName
2287
2222
  }, value != null ? value : null));
2288
2223
  }
@@ -2301,7 +2236,7 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
2301
2236
  var import_react16 = __toModule(require("react"));
2302
2237
 
2303
2238
  // src/components/DataSource/index.tsx
2304
- var React8 = __toModule(require("react"));
2239
+ var React7 = __toModule(require("react"));
2305
2240
 
2306
2241
  // src/utils/multisort/sortTypes.ts
2307
2242
  var numberComparator = function(first, second) {
@@ -2649,6 +2584,7 @@ var DeepMap = class {
2649
2584
 
2650
2585
  // src/utils/groupAndPivot/index.ts
2651
2586
  var LAZY_ROOT_KEY_FOR_GROUPS = "____root____";
2587
+ var NOT_LOADED_YET_KEY_PREFIX = "____not_loaded_yet____";
2652
2588
  function DEFAULT_TO_KEY(value) {
2653
2589
  return value;
2654
2590
  }
@@ -2718,7 +2654,10 @@ function lazyGroup(groupParams, rootData) {
2718
2654
  items: [],
2719
2655
  reducerResults: {}
2720
2656
  };
2721
- deepMap.set([...currentGroupKeys, `not-loaded-yet-${i}`], deepMapGroupValue2);
2657
+ deepMap.set([
2658
+ ...currentGroupKeys,
2659
+ `${NOT_LOADED_YET_KEY_PREFIX}${i}`
2660
+ ], deepMapGroupValue2);
2722
2661
  continue;
2723
2662
  }
2724
2663
  const dataObject = dataArray[i].data;
@@ -2877,6 +2816,10 @@ function getEnhancedGroupData(options, deepMapValue) {
2877
2816
  }
2878
2817
  }
2879
2818
  }
2819
+ let theValue = groupKeys[groupKeys.length - 1];
2820
+ if (typeof theValue === "string" && theValue.startsWith(NOT_LOADED_YET_KEY_PREFIX)) {
2821
+ theValue = null;
2822
+ }
2880
2823
  const enhancedGroupData = {
2881
2824
  data,
2882
2825
  groupCount: groupItems.length,
@@ -2890,8 +2833,9 @@ function getEnhancedGroupData(options, deepMapValue) {
2890
2833
  indexInParentGroups: options.indexInParentGroups,
2891
2834
  indexInGroup: options.indexInGroup,
2892
2835
  indexInAll: options.indexInAll,
2893
- value: groupKeys[groupKeys.length - 1],
2894
- groupBy: groupBy.slice(0, groupNesting),
2836
+ value: theValue,
2837
+ rootGroupBy: groupBy,
2838
+ groupBy: groupNesting === groupBy.length ? groupBy : groupBy.slice(0, groupNesting),
2895
2839
  isGroupRow: true,
2896
2840
  pivotValuesMap: pivotDeepMap,
2897
2841
  groupNesting,
@@ -3013,11 +2957,33 @@ function useEffectWithChanges(fn, deps) {
3013
2957
  }, useEffectDeps);
3014
2958
  }
3015
2959
 
2960
+ // src/components/utils/debounce.ts
2961
+ function debounce(fn, { wait }) {
2962
+ let timeout = null;
2963
+ return function(...args) {
2964
+ const context = this;
2965
+ if (timeout !== null) {
2966
+ clearTimeout(timeout);
2967
+ }
2968
+ timeout = setTimeout(() => {
2969
+ fn.apply(context, args);
2970
+ }, wait);
2971
+ };
2972
+ }
2973
+
3016
2974
  // src/components/DataSource/privateHooks/useLoadData.ts
2975
+ var getRafPromise = () => new Promise((resolve) => {
2976
+ requestAnimationFrame(resolve);
2977
+ });
3017
2978
  var SKIP_DATA_CHANGES_KEYS = {
3018
2979
  originalDataArray: true,
3019
2980
  changes: true
3020
2981
  };
2982
+ function getChangeDetect() {
2983
+ var _a;
2984
+ const perfNow = (_a = getGlobal().performance) == null ? void 0 : _a.now();
2985
+ return `${Date.now()}:${perfNow}`;
2986
+ }
3021
2987
  function buildDataSourceDataParams(componentState, overrides) {
3022
2988
  var _a, _b;
3023
2989
  const sortInfo = componentState.multiSort ? componentState.sortInfo : (_b = (_a = componentState.sortInfo) == null ? void 0 : _a[0]) != null ? _b : null;
@@ -3057,15 +3023,34 @@ function buildDataSourceDataParams(componentState, overrides) {
3057
3023
  }
3058
3024
  function loadData(data, componentState, actions, overrides) {
3059
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
+ }
3060
3045
  if (typeof data === "function") {
3061
3046
  data = data(dataParams);
3062
3047
  }
3063
3048
  const dataIsPromise = typeof data === "object" && typeof data.then === "function";
3064
- if (dataIsPromise) {
3049
+ if (dataIsPromise && !componentState.fullLazyLoad) {
3065
3050
  actions.loading = true;
3066
3051
  }
3067
- Promise.resolve(data).then((dataParam) => {
3068
- var _a, _b, _c;
3052
+ return Promise.resolve(data).then((dataParam) => {
3053
+ var _a, _b, _c, _d;
3069
3054
  let dataArray = [];
3070
3055
  let skipAssign = false;
3071
3056
  if (Array.isArray(dataParam.data)) {
@@ -3078,9 +3063,10 @@ function loadData(data, componentState, actions, overrides) {
3078
3063
  actions.pivotMappings = remoteData.mappings;
3079
3064
  }
3080
3065
  if (componentState.fullLazyLoad && dataParams.groupKeys) {
3081
- const lazyGroupData = DeepMap.clone(componentState.originalLazyGroupData);
3066
+ const lazyGroupData = componentState.originalLazyGroupData;
3082
3067
  const key = [LAZY_ROOT_KEY_FOR_GROUPS, ...dataParams.groupKeys];
3083
3068
  const newGroupRowInfo = {
3069
+ cache: !!remoteData.cache,
3084
3070
  totalCount: (_a = remoteData.totalCount) != null ? _a : dataArray.length,
3085
3071
  items: dataArray
3086
3072
  };
@@ -3088,11 +3074,15 @@ function loadData(data, componentState, actions, overrides) {
3088
3074
  const existingGroupRowInfo = lazyGroupData.get(key);
3089
3075
  const currentGroupRowInfo = existingGroupRowInfo != null ? existingGroupRowInfo : {
3090
3076
  items: [],
3091
- totalCount: newGroupRowInfo.totalCount
3077
+ totalCount: newGroupRowInfo.totalCount,
3078
+ cache: (_b = newGroupRowInfo.cache) != null ? _b : true
3092
3079
  };
3080
+ if (existingGroupRowInfo) {
3081
+ existingGroupRowInfo.cache = newGroupRowInfo.cache;
3082
+ }
3093
3083
  currentGroupRowInfo.items.length = currentGroupRowInfo.totalCount;
3094
- const start = (_b = dataParams.lazyLoadStartIndex) != null ? _b : 0;
3095
- const end = start + ((_c = dataParams.lazyLoadBatchSize) != null ? _c : dataArray.length);
3084
+ const start = (_c = dataParams.lazyLoadStartIndex) != null ? _c : 0;
3085
+ const end = Math.min((_d = remoteData.totalCount) != null ? _d : start + dataParams.lazyLoadBatchSize);
3096
3086
  for (let i = start; i < end; i++) {
3097
3087
  currentGroupRowInfo.items[i] = newGroupRowInfo.items[i - start];
3098
3088
  }
@@ -3103,7 +3093,7 @@ function loadData(data, componentState, actions, overrides) {
3103
3093
  lazyGroupData.set(key, newGroupRowInfo);
3104
3094
  }
3105
3095
  skipAssign = true;
3106
- actions.originalLazyGroupData = lazyGroupData;
3096
+ actions.originalLazyGroupDataChangeDetect = getChangeDetect();
3107
3097
  }
3108
3098
  } else {
3109
3099
  dataArray = dataParam;
@@ -3111,7 +3101,7 @@ function loadData(data, componentState, actions, overrides) {
3111
3101
  if (!skipAssign) {
3112
3102
  actions.originalDataArray = dataArray;
3113
3103
  }
3114
- if (dataIsPromise) {
3104
+ if (dataIsPromise && !componentState.fullLazyLoad) {
3115
3105
  actions.loading = false;
3116
3106
  }
3117
3107
  });
@@ -3130,9 +3120,7 @@ function useLoadData() {
3130
3120
  pivotBy,
3131
3121
  livePagination,
3132
3122
  livePaginationCursor,
3133
- cursorId: stateCursorId,
3134
- lazyLoadBatchSize,
3135
- notifyScrollStop
3123
+ cursorId: stateCursorId
3136
3124
  } = componentState;
3137
3125
  const [scrollbars, setScrollbars] = (0, import_react15.useState)({
3138
3126
  vertical: false,
@@ -3173,33 +3161,7 @@ function useLoadData() {
3173
3161
  cursorId: livePagination ? stateCursorId : null
3174
3162
  };
3175
3163
  const initialRef = (0, import_react15.useRef)(true);
3176
- (0, import_react15.useEffect)(() => {
3177
- if (lazyLoadBatchSize && lazyLoadBatchSize > 0) {
3178
- return notifyScrollStop.onChange((param) => {
3179
- console.log("scroll stop", param);
3180
- if (!param) {
3181
- return;
3182
- }
3183
- const componentState2 = getComponentState();
3184
- const {
3185
- firstVisibleRowIndex: startIndex,
3186
- lastVisibleRowIndex: endIndex
3187
- } = param;
3188
- const firstBatchStart = Math.floor(startIndex / lazyLoadBatchSize) * lazyLoadBatchSize;
3189
- const lastBatchStart = Math.floor(endIndex / lazyLoadBatchSize) * lazyLoadBatchSize;
3190
- const isRowLoaded = (index) => componentState2.dataArray[index].data != null;
3191
- for (let batchStartIndex = firstBatchStart; batchStartIndex <= lastBatchStart; batchStartIndex = batchStartIndex + lazyLoadBatchSize) {
3192
- if (!isRowLoaded(batchStartIndex)) {
3193
- loadData(componentState2.data, componentState2, actions, {
3194
- lazyLoadBatchSize,
3195
- lazyLoadStartIndex: batchStartIndex
3196
- });
3197
- }
3198
- }
3199
- });
3200
- }
3201
- return;
3202
- }, [lazyLoadBatchSize]);
3164
+ useLazyLoadRange();
3203
3165
  useEffectWithChanges(() => {
3204
3166
  const componentState2 = getComponentState();
3205
3167
  if (typeof componentState2.data !== "function") {
@@ -3220,6 +3182,126 @@ function useLoadData() {
3220
3182
  }
3221
3183
  }, depsObject);
3222
3184
  }
3185
+ function useLazyLoadRange() {
3186
+ const {
3187
+ getComponentState,
3188
+ componentActions: actions,
3189
+ componentState
3190
+ } = useComponentState();
3191
+ const loadingCache = (0, import_react15.useMemo)(() => {
3192
+ return new Map();
3193
+ }, [componentState.data]);
3194
+ globalThis.loadingCache = loadingCache;
3195
+ const {
3196
+ lazyLoadBatchSize,
3197
+ notifyRenderRangeChange,
3198
+ dataArray,
3199
+ scrollStopDelayUpdatedByTable
3200
+ } = componentState;
3201
+ const latestRenderRangeRef = (0, import_react15.useRef)(null);
3202
+ const loadRange = (param, cache = loadingCache) => {
3203
+ const componentState2 = getComponentState();
3204
+ param = param || latestRenderRangeRef.current;
3205
+ if (!param) {
3206
+ return;
3207
+ }
3208
+ const { renderStartIndex: startIndex, renderEndIndex: endIndex } = param;
3209
+ if (!lazyLoadBatchSize || lazyLoadBatchSize <= 0) {
3210
+ return;
3211
+ }
3212
+ lazyLoadRange({
3213
+ startIndex,
3214
+ endIndex,
3215
+ lazyLoadBatchSize,
3216
+ componentState: componentState2,
3217
+ componentActions: actions
3218
+ }, cache);
3219
+ };
3220
+ const debouncedLoadRange = (0, import_react15.useMemo)(() => debounce(loadRange, { wait: scrollStopDelayUpdatedByTable }), [scrollStopDelayUpdatedByTable]);
3221
+ (0, import_react15.useEffect)(() => {
3222
+ if (lazyLoadBatchSize && lazyLoadBatchSize > 0) {
3223
+ return notifyRenderRangeChange.onChange((param) => {
3224
+ latestRenderRangeRef.current = param;
3225
+ loadRange(param, loadingCache);
3226
+ });
3227
+ }
3228
+ return;
3229
+ }, [lazyLoadBatchSize, loadingCache]);
3230
+ (0, import_react15.useEffect)(() => {
3231
+ if (lazyLoadBatchSize && lazyLoadBatchSize > 0) {
3232
+ debouncedLoadRange();
3233
+ }
3234
+ return;
3235
+ }, [dataArray]);
3236
+ }
3237
+ function lazyLoadRange(options, cache) {
3238
+ const {
3239
+ startIndex,
3240
+ endIndex,
3241
+ lazyLoadBatchSize,
3242
+ componentState,
3243
+ componentActions
3244
+ } = options;
3245
+ const { dataArray } = componentState;
3246
+ const isRowLoaded = (index) => dataArray[index].data != null;
3247
+ const perGroupFnCalls = new DeepMap();
3248
+ const rootGroupKeys = ["_______xxx______"];
3249
+ for (let i = startIndex; i <= endIndex; i++) {
3250
+ const rowInfo = dataArray[i];
3251
+ if (!rowInfo) {
3252
+ continue;
3253
+ }
3254
+ const rowLoaded = rowInfo.data != null;
3255
+ const parentGroupKeys = rowInfo.groupKeys ? [...rowInfo.groupKeys] : [];
3256
+ if (rowInfo.groupKeys) {
3257
+ parentGroupKeys.pop();
3258
+ }
3259
+ const cacheKeys = parentGroupKeys.length ? parentGroupKeys : rootGroupKeys;
3260
+ const indexInGroup = rowInfo.indexInGroup;
3261
+ if (!rowLoaded) {
3262
+ let fnCalls = perGroupFnCalls.get(cacheKeys);
3263
+ const batchStartIndexInGroup = Math.floor(indexInGroup / lazyLoadBatchSize) * lazyLoadBatchSize;
3264
+ const offset = rowInfo.indexInGroup - batchStartIndexInGroup;
3265
+ const absoluteIndexOfBatchStart = dataArray[rowInfo.indexInAll - offset].indexInAll;
3266
+ const batchStartRowLoaded = isRowLoaded(absoluteIndexOfBatchStart);
3267
+ const batchStartRowId = dataArray[absoluteIndexOfBatchStart].id;
3268
+ if (batchStartRowLoaded || (fnCalls == null ? void 0 : fnCalls[batchStartRowId])) {
3269
+ continue;
3270
+ }
3271
+ const shouldSetFnCalls = !fnCalls;
3272
+ fnCalls = fnCalls || {};
3273
+ const currentFnCall = {
3274
+ lazyLoadStartIndex: batchStartIndexInGroup,
3275
+ lazyLoadBatchSize,
3276
+ groupKeys: parentGroupKeys
3277
+ };
3278
+ if (!fnCalls[batchStartRowId]) {
3279
+ fnCalls[batchStartRowId] = currentFnCall;
3280
+ }
3281
+ if (shouldSetFnCalls) {
3282
+ perGroupFnCalls.set(cacheKeys, fnCalls);
3283
+ }
3284
+ }
3285
+ }
3286
+ let initialPromise = Promise.resolve(true);
3287
+ const allFnCalls = [];
3288
+ perGroupFnCalls.topDownValues().forEach((record) => {
3289
+ allFnCalls.push(...Object.values(record));
3290
+ });
3291
+ allFnCalls.reduce((promise, fnCall) => {
3292
+ const cacheKey = `${fnCall.groupKeys.join("-")}:${fnCall.lazyLoadStartIndex}`;
3293
+ if (cache && cache.has(cacheKey)) {
3294
+ return promise;
3295
+ }
3296
+ cache == null ? void 0 : cache.set(cacheKey, true);
3297
+ const args = [componentState.data, componentState, componentActions, fnCall];
3298
+ return promise.then(() => getRafPromise()).then(() => loadData(...args)).then(() => {
3299
+ requestAnimationFrame(() => {
3300
+ cache == null ? void 0 : cache.delete(cacheKey);
3301
+ });
3302
+ });
3303
+ }, initialPromise);
3304
+ }
3223
3305
 
3224
3306
  // src/components/DataSource/state/normalizeSortInfo.ts
3225
3307
  var EMPTY_ARRAY = Object.freeze([]);
@@ -3419,8 +3501,11 @@ function initSetupState2() {
3419
3501
  dataParams: void 0,
3420
3502
  notifyScrollbarsChange: buildSubscriptionCallback(),
3421
3503
  notifyScrollStop: buildSubscriptionCallback(),
3504
+ notifyRenderRangeChange: buildSubscriptionCallback(),
3422
3505
  pivotTotalColumnPosition: "end",
3506
+ scrollStopDelayUpdatedByTable: 100,
3423
3507
  originalLazyGroupData,
3508
+ originalLazyGroupDataChangeDetect: 0,
3424
3509
  originalDataArray,
3425
3510
  cursorId: defaultCursorId,
3426
3511
  showSeparatePivotColumnForSingleAggregation: false,
@@ -3605,23 +3690,7 @@ function getPivotColumnsAndColumnGroups({
3605
3690
  const aggregationReducers = Object.keys(reducers).map((key) => {
3606
3691
  return __spreadProps(__spreadValues({}, reducers[key]), { id: key });
3607
3692
  });
3608
- const columns = new Map([
3609
- [
3610
- "labels",
3611
- {
3612
- header: "Row labels",
3613
- pivotBy,
3614
- valueGetter: (params) => {
3615
- var _a;
3616
- const { rowInfo } = params;
3617
- if (!rowInfo.data) {
3618
- return "Loading ... TODO replace this with a loading indicator";
3619
- }
3620
- return rowInfo.groupKeys ? rowInfo.groupKeys[((_a = rowInfo.groupKeys) == null ? void 0 : _a.length) - 1] : null;
3621
- }
3622
- }
3623
- ]
3624
- ]);
3693
+ const columns = new Map([]);
3625
3694
  const columnGroups = new Map();
3626
3695
  const isSingleAggregationColumn = !showSeparatePivotColumnForSingleAggregation && aggregationReducers.length === 1;
3627
3696
  deepMap.visitDepthFirst((_value, keys, _indexInGroup, next) => {
@@ -3793,6 +3862,7 @@ function concludeReducer(params) {
3793
3862
  "generateGroupRows",
3794
3863
  "originalDataArray",
3795
3864
  "originalLazyGroupData",
3865
+ "originalLazyGroupDataChangeDetect",
3796
3866
  "groupBy",
3797
3867
  "groupRowsState",
3798
3868
  "pivotBy",
@@ -3883,7 +3953,7 @@ function DataSourceWithContext(props) {
3883
3953
  if (typeof children === "function") {
3884
3954
  children = children(computedValues);
3885
3955
  }
3886
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, children);
3956
+ return /* @__PURE__ */ React7.createElement(React7.Fragment, null, children);
3887
3957
  }
3888
3958
  var DataSourceRoot = getComponentStateRoot({
3889
3959
  initSetupState: initSetupState2,
@@ -3906,14 +3976,14 @@ function DataSourceCmp({ children }) {
3906
3976
  globalThis.getDataSourceState = getState;
3907
3977
  }
3908
3978
  useLoadData();
3909
- return /* @__PURE__ */ React8.createElement(DataSourceContext.Provider, {
3979
+ return /* @__PURE__ */ React7.createElement(DataSourceContext.Provider, {
3910
3980
  value: contextValue
3911
- }, /* @__PURE__ */ React8.createElement(DataSourceWithContext, {
3981
+ }, /* @__PURE__ */ React7.createElement(DataSourceWithContext, {
3912
3982
  children
3913
3983
  }));
3914
3984
  }
3915
3985
  function DataSource(props) {
3916
- return /* @__PURE__ */ React8.createElement(DataSourceRoot, __spreadValues({}, props), /* @__PURE__ */ React8.createElement(DataSourceCmp, {
3986
+ return /* @__PURE__ */ React7.createElement(DataSourceRoot, __spreadValues({}, props), /* @__PURE__ */ React7.createElement(DataSourceCmp, {
3917
3987
  children: props.children
3918
3988
  }));
3919
3989
  }
@@ -3964,9 +4034,9 @@ function useColumnsWhen() {
3964
4034
  dataSourceActions.pivotTotalColumnPosition = pivotTotalColumnPosition;
3965
4035
  }, [pivotTotalColumnPosition]);
3966
4036
  useColumnsWhenInlineGroupRenderStrategy(groupByMap);
3967
- useColumnsWhenPivoting();
3968
- useColumnsWhenGrouping();
4037
+ const { toggleGroupRow } = useColumnsWhenGrouping();
3969
4038
  useHideEmptyGroupColumns(groupByMap);
4039
+ return { toggleGroupRow };
3970
4040
  }
3971
4041
  function useColumnsWhenInlineGroupRenderStrategy(groupByMap) {
3972
4042
  const toggleGroupRow = useToggleGroupRow();
@@ -3976,6 +4046,9 @@ function useColumnsWhenInlineGroupRenderStrategy(groupByMap) {
3976
4046
  } = useComponentState();
3977
4047
  function computeColumnsWhenInlineGroupRenderStrategy(columns2, groupByMap2, groupRenderStrategy2, toggleGroupRow2) {
3978
4048
  const computedColumns = new Map();
4049
+ if (groupRenderStrategy2 !== "inline") {
4050
+ return;
4051
+ }
3979
4052
  columns2.forEach((column, id) => {
3980
4053
  let base = {};
3981
4054
  const groupByForColumn = groupByMap2.get(column.field);
@@ -4035,51 +4108,32 @@ function useColumnsWhenInlineGroupRenderStrategy(groupByMap) {
4035
4108
  });
4036
4109
  }, [columns, groupByMap, groupRenderStrategy, toggleGroupRow]);
4037
4110
  }
4038
- function useColumnsWhenPivoting() {
4111
+ function useColumnsWhenGrouping() {
4039
4112
  const {
4040
4113
  componentState: { groupBy, pivotBy }
4041
4114
  } = useDataSourceContextValue();
4042
4115
  const {
4043
4116
  componentActions,
4044
4117
  componentState: {
4118
+ columns,
4119
+ groupColumn,
4120
+ groupRenderStrategy,
4045
4121
  pivotColumns,
4046
4122
  pivotColumn,
4047
- pivotRowLabelsColumn,
4048
4123
  pivotTotalColumnPosition
4049
4124
  }
4050
4125
  } = useComponentState();
4051
4126
  const toggleGroupRow = useToggleGroupRow();
4052
4127
  (0, import_react17.useEffect)(() => {
4053
- const computedPivotColumns = getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, {
4054
- pivotColumn,
4055
- pivotRowLabelsColumn,
4056
- pivotTotalColumnPosition,
4057
- pivotBy,
4058
- groupBy,
4059
- toggleGroupRow
4060
- });
4061
- componentActions.computedPivotColumns = computedPivotColumns;
4062
- }, [pivotColumns, pivotColumn, pivotRowLabelsColumn]);
4063
- }
4064
- function useColumnsWhenGrouping() {
4065
- const {
4066
- componentState: { groupBy }
4067
- } = useDataSourceContextValue();
4068
- const {
4069
- componentActions,
4070
- componentState: { columns, groupColumn, groupRenderStrategy, pivotColumns }
4071
- } = useComponentState();
4072
- const toggleGroupRow = useToggleGroupRow();
4073
- (0, import_react17.useEffect)(() => {
4074
- if (pivotColumns) {
4075
- return;
4076
- }
4077
4128
  const update = () => {
4078
4129
  const columnsWhenGrouping = getColumnsWhenGrouping({
4079
4130
  columns,
4080
4131
  groupColumn,
4081
- groupRenderStrategy,
4132
+ pivotColumn,
4133
+ pivotTotalColumnPosition,
4134
+ groupRenderStrategy: groupRenderStrategy === "inline" ? "single-column" : groupRenderStrategy,
4082
4135
  groupBy,
4136
+ pivotBy,
4083
4137
  pivotColumns,
4084
4138
  toggleGroupRow
4085
4139
  });
@@ -4091,7 +4145,17 @@ function useColumnsWhenGrouping() {
4091
4145
  delete: update,
4092
4146
  clear: update
4093
4147
  });
4094
- }, [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 };
4095
4159
  }
4096
4160
  function useHideEmptyGroupColumns(groupRowsMap) {
4097
4161
  const {
@@ -4158,14 +4222,14 @@ function getColumnsWhenGrouping(params) {
4158
4222
  const {
4159
4223
  pivotColumns,
4160
4224
  groupBy,
4225
+ pivotBy,
4161
4226
  groupColumn,
4227
+ pivotTotalColumnPosition,
4228
+ pivotColumn,
4162
4229
  groupRenderStrategy,
4163
4230
  toggleGroupRow,
4164
4231
  columns
4165
4232
  } = params;
4166
- if (pivotColumns) {
4167
- return void 0;
4168
- }
4169
4233
  if (groupRenderStrategy === "inline") {
4170
4234
  return void 0;
4171
4235
  }
@@ -4175,6 +4239,7 @@ function getColumnsWhenGrouping(params) {
4175
4239
  const generatedGroupColumn = getColumnForGroupBy({
4176
4240
  groupByForColumn,
4177
4241
  groupBy,
4242
+ pivotBy,
4178
4243
  groupIndexForColumn,
4179
4244
  groupCount: arr.length,
4180
4245
  groupRenderStrategy
@@ -4185,13 +4250,40 @@ function getColumnsWhenGrouping(params) {
4185
4250
  const singleGroupColumn = getSingleGroupColumn({
4186
4251
  groupCount: groupBy.length,
4187
4252
  groupBy,
4253
+ pivotBy,
4188
4254
  groupRenderStrategy
4189
4255
  }, toggleGroupRow, groupColumn);
4190
4256
  computedColumns.set(singleGroupColumn.id || "group-by", singleGroupColumn);
4191
4257
  }
4192
- columns.forEach((col, colId) => {
4193
- computedColumns.set(colId, col);
4194
- });
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
+ }
4195
4287
  return computedColumns.size ? computedColumns : void 0;
4196
4288
  }
4197
4289
 
@@ -4230,7 +4322,7 @@ function useComputed() {
4230
4322
  }, [showSeparatePivotColumnForSingleAggregation]);
4231
4323
  const { multiSort } = dataSourceState;
4232
4324
  useColumnGroups();
4233
- useColumnsWhen();
4325
+ const { toggleGroupRow } = useColumnsWhen();
4234
4326
  const setSortInfo = (0, import_react18.useCallback)((sortInfo) => {
4235
4327
  var _a2;
4236
4328
  const newSortInfo = multiSort ? sortInfo : (_a2 = sortInfo[0]) != null ? _a2 : null;
@@ -4299,6 +4391,7 @@ function useComputed() {
4299
4391
  const computedPinnedStartOverflow = computedPinnedStartWidth ? computedPinnedStartColumnsWidth > computedPinnedStartWidth : false;
4300
4392
  const computedPinnedEndOverflow = computedPinnedEndWidth ? computedPinnedEndColumnsWidth > computedPinnedEndWidth : false;
4301
4393
  return {
4394
+ toggleGroupRow,
4302
4395
  computedPinnedStartOverflow,
4303
4396
  computedPinnedEndOverflow,
4304
4397
  computedPinnedStartWidth,
@@ -4322,7 +4415,7 @@ function useComputed() {
4322
4415
  }
4323
4416
 
4324
4417
  // src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
4325
- var React9 = __toModule(require("react"));
4418
+ var React8 = __toModule(require("react"));
4326
4419
 
4327
4420
  // src/components/InfiniteTable/hooks/useInternalProps.ts
4328
4421
  var useInternalProps = () => {
@@ -4330,9 +4423,9 @@ var useInternalProps = () => {
4330
4423
  };
4331
4424
 
4332
4425
  // src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
4333
- var InfiniteTableBody = React9.forwardRef(function InfiniteTableBody2(props, ref) {
4426
+ var InfiniteTableBody = React8.forwardRef(function InfiniteTableBody2(props, ref) {
4334
4427
  const { rootClassName: rootClassName12 } = useInternalProps();
4335
- return /* @__PURE__ */ React9.createElement("div", __spreadProps(__spreadValues({
4428
+ return /* @__PURE__ */ React8.createElement("div", __spreadProps(__spreadValues({
4336
4429
  ref
4337
4430
  }, props), {
4338
4431
  className: join(`${rootClassName12}Body`, position.relative, flex["1"], transformTranslateZero, props.className)
@@ -4340,16 +4433,16 @@ var InfiniteTableBody = React9.forwardRef(function InfiniteTableBody2(props, ref
4340
4433
  });
4341
4434
 
4342
4435
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx
4343
- var React21 = __toModule(require("react"));
4436
+ var React20 = __toModule(require("react"));
4344
4437
 
4345
4438
  // src/components/InfiniteTable/components/ScrollbarPlaceholder.tsx
4346
- var React10 = __toModule(require("react"));
4439
+ var React9 = __toModule(require("react"));
4347
4440
  function HorizontalScrollbarPlaceholderFn(props) {
4348
4441
  const scrollbarWidth2 = getScrollbarWidth();
4349
4442
  if (!scrollbarWidth2) {
4350
4443
  return null;
4351
4444
  }
4352
- return /* @__PURE__ */ React10.createElement("div", {
4445
+ return /* @__PURE__ */ React9.createElement("div", {
4353
4446
  "data-name": "horizontal-scrollbar-placeholder",
4354
4447
  style: __spreadValues({
4355
4448
  position: "absolute",
@@ -4359,13 +4452,13 @@ function HorizontalScrollbarPlaceholderFn(props) {
4359
4452
  }, props.style)
4360
4453
  });
4361
4454
  }
4362
- var HorizontalScrollbarPlaceholder = React10.memo(HorizontalScrollbarPlaceholderFn);
4455
+ var HorizontalScrollbarPlaceholder = React9.memo(HorizontalScrollbarPlaceholderFn);
4363
4456
  function VerticalScrollbarPlaceholderFn(props) {
4364
4457
  const scrollbarWidth2 = getScrollbarWidth();
4365
4458
  if (!scrollbarWidth2) {
4366
4459
  return null;
4367
4460
  }
4368
- return /* @__PURE__ */ React10.createElement("div", {
4461
+ return /* @__PURE__ */ React9.createElement("div", {
4369
4462
  "data-name": "vertical-scrollbar-placeholder",
4370
4463
  style: __spreadValues({
4371
4464
  position: "absolute",
@@ -4375,7 +4468,7 @@ function VerticalScrollbarPlaceholderFn(props) {
4375
4468
  }, props.style)
4376
4469
  });
4377
4470
  }
4378
- var VerticalScrollbarPlaceholder = React10.memo(VerticalScrollbarPlaceholderFn);
4471
+ var VerticalScrollbarPlaceholder = React9.memo(VerticalScrollbarPlaceholderFn);
4379
4472
 
4380
4473
  // src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
4381
4474
  var import_createRuntimeFn3 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
@@ -4390,15 +4483,15 @@ var HeaderSortIconCls = "_12zfob11 _16lm1iw1";
4390
4483
  var HeaderWrapperCls = "_12zfob1v _16lm1iw16 _16lm1iw1 _16lm1iwj _16lm1iw10";
4391
4484
 
4392
4485
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
4393
- var React17 = __toModule(require("react"));
4486
+ var React16 = __toModule(require("react"));
4394
4487
  var import_react26 = __toModule(require("react"));
4395
4488
 
4396
4489
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
4397
- var React13 = __toModule(require("react"));
4490
+ var React12 = __toModule(require("react"));
4398
4491
  var import_react22 = __toModule(require("react"));
4399
4492
 
4400
4493
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCell.tsx
4401
- var React11 = __toModule(require("react"));
4494
+ var React10 = __toModule(require("react"));
4402
4495
 
4403
4496
  // src/components/InfiniteTable/hooks/useInfiniteTableState.ts
4404
4497
  var import_react19 = __toModule(require("react"));
@@ -4457,16 +4550,16 @@ function InfiniteTableCellFn(props) {
4457
4550
  style.transform = `translate3d(${shiftLeft}px, 0px, 0px)`;
4458
4551
  }
4459
4552
  }
4460
- return /* @__PURE__ */ React11.createElement("div", __spreadProps(__spreadValues({}, domProps), {
4553
+ return /* @__PURE__ */ React10.createElement("div", __spreadProps(__spreadValues({}, domProps), {
4461
4554
  ref: domRef,
4462
4555
  style,
4463
4556
  "data-name": `Cell`,
4464
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}` : "")
4465
- }), beforeChildren, cssEllipsis ? /* @__PURE__ */ React11.createElement("div", {
4558
+ }), beforeChildren, cssEllipsis ? /* @__PURE__ */ React10.createElement("div", {
4466
4559
  className: `${rootClassName2}Cell_content ${cssEllipsisClassName}`
4467
4560
  }, children) : children, afterChildren);
4468
4561
  }
4469
- var InfiniteTableCell = React11.memo(InfiniteTableCellFn);
4562
+ var InfiniteTableCell = React10.memo(InfiniteTableCellFn);
4470
4563
 
4471
4564
  // src/components/InfiniteTable/hooks/useColumnPointerEvents.ts
4472
4565
  var import_binary_search = __toModule(require_binary_search());
@@ -4661,7 +4754,7 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
4661
4754
  var import_react_dom = __toModule(require("react-dom"));
4662
4755
 
4663
4756
  // src/components/InfiniteTable/components/icons/SortIcon.tsx
4664
- var React12 = __toModule(require("react"));
4757
+ var React11 = __toModule(require("react"));
4665
4758
  var import_react21 = __toModule(require("react"));
4666
4759
  var defaultLineStyle = {
4667
4760
  marginTop: 2,
@@ -4715,18 +4808,18 @@ function SortIcon(props) {
4715
4808
  if (direction === -1) {
4716
4809
  indexStyle.top = "100%";
4717
4810
  }
4718
- return /* @__PURE__ */ React12.createElement("div", {
4811
+ return /* @__PURE__ */ React11.createElement("div", {
4719
4812
  style: __spreadProps(__spreadValues({}, style), { width: size }),
4720
4813
  className: join(className, "ITableIcon", "ITableIcon-sort")
4721
- }, showIndex ? /* @__PURE__ */ React12.createElement("div", {
4814
+ }, showIndex ? /* @__PURE__ */ React11.createElement("div", {
4722
4815
  "data-name": "index",
4723
4816
  style: indexStyle
4724
- }, index) : null, /* @__PURE__ */ React12.createElement("div", {
4817
+ }, index) : null, /* @__PURE__ */ React11.createElement("div", {
4725
4818
  style: __spreadValues({ width: sizes[0] }, lineStyle),
4726
4819
  onTransitionEnd
4727
- }), /* @__PURE__ */ React12.createElement("div", {
4820
+ }), /* @__PURE__ */ React11.createElement("div", {
4728
4821
  style: __spreadValues({ width: sizes[1] }, lineStyle)
4729
- }), /* @__PURE__ */ React12.createElement("div", {
4822
+ }), /* @__PURE__ */ React11.createElement("div", {
4730
4823
  style: __spreadValues({ width: sizes[2] }, lineStyle)
4731
4824
  }));
4732
4825
  }
@@ -4757,7 +4850,7 @@ function InfiniteTableHeaderCell(props) {
4757
4850
  });
4758
4851
  }
4759
4852
  header = header != null ? header : column.name;
4760
- const sortTool = /* @__PURE__ */ React13.createElement(SortIcon, {
4853
+ const sortTool = /* @__PURE__ */ React12.createElement(SortIcon, {
4761
4854
  index: column.computedMultiSort ? column.computedSortIndex + 1 : void 0,
4762
4855
  className: `${baseCls}__sort-icon ${HeaderSortIconCls}`,
4763
4856
  direction: column.computedSorted ? column.computedSortedAsc ? 1 : -1 : 0
@@ -4795,7 +4888,7 @@ function InfiniteTableHeaderCell(props) {
4795
4888
  let offset = offsetFromProps != null ? offsetFromProps : virtualized ? 0 : column.computedPinningOffset;
4796
4889
  let draggingProxy = null;
4797
4890
  if (dragging) {
4798
- draggingProxy = /* @__PURE__ */ React13.createElement("div", {
4891
+ draggingProxy = /* @__PURE__ */ React12.createElement("div", {
4799
4892
  className: `${baseCls}Proxy ${HeaderCellProxy}`,
4800
4893
  style: {
4801
4894
  position: "absolute",
@@ -4808,7 +4901,7 @@ function InfiniteTableHeaderCell(props) {
4808
4901
  }, header);
4809
4902
  draggingProxy = (0, import_react_dom.createPortal)(draggingProxy, portalDOMRef.current);
4810
4903
  }
4811
- return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(InfiniteTableCell, {
4904
+ return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(InfiniteTableCell, {
4812
4905
  domRef: ref,
4813
4906
  column,
4814
4907
  "data-name": `HeaderCell`,
@@ -4824,11 +4917,11 @@ function InfiniteTableHeaderCell(props) {
4824
4917
  }
4825
4918
 
4826
4919
  // src/components/RawList/index.tsx
4827
- var React16 = __toModule(require("react"));
4920
+ var React15 = __toModule(require("react"));
4828
4921
  var import_react25 = __toModule(require("react"));
4829
4922
 
4830
4923
  // src/components/RawList/AvoidReactDiff.tsx
4831
- var React14 = __toModule(require("react"));
4924
+ var React13 = __toModule(require("react"));
4832
4925
  var import_react23 = __toModule(require("react"));
4833
4926
  function AvoidReactDiffFn(props) {
4834
4927
  const [children, setChildren] = (0, import_react23.useState)(props.updater.get());
@@ -4838,15 +4931,15 @@ function AvoidReactDiffFn(props) {
4838
4931
  });
4839
4932
  return remove;
4840
4933
  }, [props.updater]);
4841
- return /* @__PURE__ */ React14.createElement(React14.Fragment, null, children);
4934
+ return /* @__PURE__ */ React13.createElement(React13.Fragment, null, children);
4842
4935
  }
4843
- var AvoidReactDiff = React14.memo(AvoidReactDiffFn);
4936
+ var AvoidReactDiff = React13.memo(AvoidReactDiffFn);
4844
4937
 
4845
4938
  // src/components/RawList/useVirtualRenderer.ts
4846
4939
  var import_react24 = __toModule(require("react"));
4847
4940
 
4848
4941
  // src/components/RawList/ReactVirtualRenderer.tsx
4849
- var React15 = __toModule(require("react"));
4942
+ var React14 = __toModule(require("react"));
4850
4943
 
4851
4944
  // src/components/RawList/MappedItems.ts
4852
4945
  var MappedItems = class extends Logger {
@@ -5091,7 +5184,7 @@ var ReactVirtualRenderer = class extends Logger {
5091
5184
  };
5092
5185
  this.itemDOMRefs[elementIndex] = domRef;
5093
5186
  this.updaters[elementIndex] = buildSubscriptionCallback();
5094
- const item = /* @__PURE__ */ React15.createElement(AvoidReactDiff, {
5187
+ const item = /* @__PURE__ */ React14.createElement(AvoidReactDiff, {
5095
5188
  key: elementIndex,
5096
5189
  name: `${elementIndex}`,
5097
5190
  updater: this.updaters[elementIndex]
@@ -5188,11 +5281,11 @@ function RawListFn(props) {
5188
5281
  });
5189
5282
  return remove;
5190
5283
  }, [brain, onRenderUpdater]);
5191
- return /* @__PURE__ */ React16.createElement(AvoidReactDiff, {
5284
+ return /* @__PURE__ */ React15.createElement(AvoidReactDiff, {
5192
5285
  updater: onRenderUpdater
5193
5286
  });
5194
5287
  }
5195
- var RawList = React16.memo(RawListFn);
5288
+ var RawList = React15.memo(RawListFn);
5196
5289
 
5197
5290
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
5198
5291
  var debug3 = dbg("Header");
@@ -5213,7 +5306,7 @@ function InfiniteTableHeaderFn(props) {
5213
5306
  }
5214
5307
  return null;
5215
5308
  }
5216
- return /* @__PURE__ */ React17.createElement(InfiniteTableHeaderCell, {
5309
+ return /* @__PURE__ */ React16.createElement(InfiniteTableHeaderCell, {
5217
5310
  domRef: domRef2,
5218
5311
  column,
5219
5312
  headerHeight,
@@ -5238,18 +5331,18 @@ function InfiniteTableHeaderFn(props) {
5238
5331
  className: join(TableHeaderClassName, `${TableHeaderClassName}--virtualized`, className, headerCls),
5239
5332
  style
5240
5333
  };
5241
- return /* @__PURE__ */ React17.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React17.createElement(RawList, {
5334
+ return /* @__PURE__ */ React16.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React16.createElement(RawList, {
5242
5335
  brain,
5243
5336
  renderItem: renderColumn
5244
5337
  }));
5245
5338
  }
5246
- var InfiniteTableHeader = React17.memo(InfiniteTableHeaderFn);
5339
+ var InfiniteTableHeader = React16.memo(InfiniteTableHeaderFn);
5247
5340
 
5248
5341
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderUnvirtualized.tsx
5249
- var React20 = __toModule(require("react"));
5342
+ var React19 = __toModule(require("react"));
5250
5343
 
5251
5344
  // src/components/InfiniteTable/components/InfiniteTableHeader/renderColumnHeaderGroups.tsx
5252
- var React19 = __toModule(require("react"));
5345
+ var React18 = __toModule(require("react"));
5253
5346
 
5254
5347
  // src/components/InfiniteTable/components/InfiniteTableHeader/buildColumnAndGroupTree.ts
5255
5348
  function buildColumnAndGroupTree(columns, columnGroups, columnGroupsDepthsMap) {
@@ -5339,7 +5432,7 @@ function assignGroupOffsetsAndComputedWidths(items, groupOffset = 0) {
5339
5432
  }
5340
5433
 
5341
5434
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
5342
- var React18 = __toModule(require("react"));
5435
+ var React17 = __toModule(require("react"));
5343
5436
  var TableHeaderGroupClassName = `${rootClassName}HeaderGroup`;
5344
5437
  function InfiniteTableHeaderGroup(props) {
5345
5438
  const { columnGroup, height, headerHeight } = props;
@@ -5353,16 +5446,16 @@ function InfiniteTableHeaderGroup(props) {
5353
5446
  width: columnGroup.computedWidth,
5354
5447
  height
5355
5448
  };
5356
- return /* @__PURE__ */ React18.createElement("div", {
5449
+ return /* @__PURE__ */ React17.createElement("div", {
5357
5450
  "data-group-id": columnGroup.id,
5358
5451
  className: join(HeaderGroupCls, TableHeaderGroupClassName, `${TableHeaderGroupClassName}--unvirtualized`),
5359
5452
  style
5360
- }, /* @__PURE__ */ React18.createElement("div", {
5453
+ }, /* @__PURE__ */ React17.createElement("div", {
5361
5454
  className: join(`${TableHeaderGroupClassName}__header`, HeaderGroup_Header),
5362
5455
  style: { height: headerHeight }
5363
- }, /* @__PURE__ */ React18.createElement("div", {
5456
+ }, /* @__PURE__ */ React17.createElement("div", {
5364
5457
  className: join(`${TableHeaderGroupClassName}__header-content`, cssEllipsisClassName)
5365
- }, header)), /* @__PURE__ */ React18.createElement("div", {
5458
+ }, header)), /* @__PURE__ */ React17.createElement("div", {
5366
5459
  className: join(`${TableHeaderGroupClassName}__children`, HeaderGroup_Children)
5367
5460
  }, props.children));
5368
5461
  }
@@ -5385,7 +5478,7 @@ function renderColumnHeaderGroups(config) {
5385
5478
  return items2.map((colGroupItem) => {
5386
5479
  if (colGroupItem.type === "column") {
5387
5480
  const col = colGroupItem.ref;
5388
- return /* @__PURE__ */ React19.createElement(InfiniteTableHeaderCell, {
5481
+ return /* @__PURE__ */ React18.createElement(InfiniteTableHeaderCell, {
5389
5482
  key: col.id,
5390
5483
  headerHeight: (columnGroupsMaxDepth - colGroupItem.depth + 2) * headerHeight,
5391
5484
  column: col,
@@ -5399,7 +5492,7 @@ function renderColumnHeaderGroups(config) {
5399
5492
  colIds.push(col.id);
5400
5493
  return col;
5401
5494
  });
5402
- return /* @__PURE__ */ React19.createElement(InfiniteTableHeaderGroup, {
5495
+ return /* @__PURE__ */ React18.createElement(InfiniteTableHeaderGroup, {
5403
5496
  key: `${colGroupItem.uniqueGroupId.join("/")}`,
5404
5497
  columns: columns2,
5405
5498
  height: (columnGroupsMaxDepth - colGroupItem.depth + 2) * headerHeight,
@@ -5452,9 +5545,9 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
5452
5545
  },
5453
5546
  computed: { computedVisibleColumnsMap: columnsMap }
5454
5547
  } = useInfiniteTable();
5455
- const domRef = React20.useRef(null);
5548
+ const domRef = React19.useRef(null);
5456
5549
  const hasColumnGroups = computedColumnGroups.size > 0;
5457
- const columnHeaderGroups = React20.useMemo(() => {
5550
+ const columnHeaderGroups = React19.useMemo(() => {
5458
5551
  return hasColumnGroups ? renderColumnHeaderGroups({
5459
5552
  columnGroups: computedColumnGroups,
5460
5553
  columnGroupsDepthsMap,
@@ -5473,7 +5566,7 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
5473
5566
  columnGroupsMaxDepth
5474
5567
  ]);
5475
5568
  const children = hasColumnGroups ? columnHeaderGroups : columns.map((c) => {
5476
- return /* @__PURE__ */ React20.createElement(InfiniteTableHeaderCell, {
5569
+ return /* @__PURE__ */ React19.createElement(InfiniteTableHeaderCell, {
5477
5570
  key: c.id,
5478
5571
  headerHeight,
5479
5572
  column: c,
@@ -5496,20 +5589,20 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
5496
5589
  const removeOnScroll = scroller.onScroll(onScroll);
5497
5590
  return removeOnScroll;
5498
5591
  }, [brain, scrollListener]);
5499
- return /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({}, domProps), {
5592
+ return /* @__PURE__ */ React19.createElement("div", __spreadProps(__spreadValues({}, domProps), {
5500
5593
  className: join(TableHeaderClassName2, `${TableHeaderClassName2}--unvirtualized`, pinning ? `${TableHeaderClassName2}--pinned ${TableHeaderClassName2}-${pinning}` : "", scrollable ? `${TableHeaderClassName2}--overflow` : "", domProps.className, HeaderClsRecipe({
5501
5594
  pinned: pinning,
5502
5595
  virtualized: false,
5503
5596
  overflow: scrollable
5504
5597
  })),
5505
5598
  style
5506
- }), /* @__PURE__ */ React20.createElement("div", {
5599
+ }), /* @__PURE__ */ React19.createElement("div", {
5507
5600
  style: { width: totalWidth },
5508
5601
  className: join(flexFlow.row, display.flex),
5509
5602
  ref: domRef
5510
5603
  }, children));
5511
5604
  }
5512
- var InfiniteTableHeaderUnvirtualized = React20.memo(InfiniteTableHeaderUnvirtualizedFn);
5605
+ var InfiniteTableHeaderUnvirtualized = React19.memo(InfiniteTableHeaderUnvirtualizedFn);
5513
5606
 
5514
5607
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx
5515
5608
  function TableHeaderWrapper(props) {
@@ -5542,7 +5635,7 @@ function TableHeaderWrapper(props) {
5542
5635
  const unvirtualizedStyle = !virtualizeHeader && computedPinnedStartColumnsWidth ? {
5543
5636
  left: computedPinnedStartWidth
5544
5637
  } : void 0;
5545
- const header = virtualizeHeader ? /* @__PURE__ */ React21.createElement(InfiniteTableHeader, {
5638
+ const header = virtualizeHeader ? /* @__PURE__ */ React20.createElement(InfiniteTableHeader, {
5546
5639
  columns: computedUnpinnedColumns,
5547
5640
  repaintId: virtualizeHeader ? repaintId : void 0,
5548
5641
  brain,
@@ -5555,7 +5648,7 @@ function TableHeaderWrapper(props) {
5555
5648
  },
5556
5649
  availableWidth: computedUnpinnedColumnsWidth,
5557
5650
  totalWidth: computedUnpinnedColumnsWidth
5558
- }) : /* @__PURE__ */ React21.createElement(InfiniteTableHeaderUnvirtualized, {
5651
+ }) : /* @__PURE__ */ React20.createElement(InfiniteTableHeaderUnvirtualized, {
5559
5652
  style: unvirtualizedStyle,
5560
5653
  brain,
5561
5654
  scrollable: true,
@@ -5564,12 +5657,12 @@ function TableHeaderWrapper(props) {
5564
5657
  availableWidth: computedUnpinnedColumnsWidth,
5565
5658
  totalWidth: computedUnpinnedColumnsWidth
5566
5659
  });
5567
- return /* @__PURE__ */ React21.createElement("div", {
5660
+ return /* @__PURE__ */ React20.createElement("div", {
5568
5661
  className: HeaderWrapperCls,
5569
5662
  style: {
5570
5663
  height: virtualizeHeader ? height : void 0
5571
5664
  }
5572
- }, hasPinnedStart ? /* @__PURE__ */ React21.createElement(InfiniteTableHeaderUnvirtualized, {
5665
+ }, hasPinnedStart ? /* @__PURE__ */ React20.createElement(InfiniteTableHeaderUnvirtualized, {
5573
5666
  style: {
5574
5667
  left: 0,
5575
5668
  position: "absolute",
@@ -5581,7 +5674,7 @@ function TableHeaderWrapper(props) {
5581
5674
  scrollable: computedPinnedStartOverflow,
5582
5675
  pinning: "start",
5583
5676
  scrollListener: computedPinnedStartOverflow ? pinnedStartScrollListener : void 0
5584
- }) : null, header, hasPinnedEnd ? /* @__PURE__ */ React21.createElement(InfiniteTableHeaderUnvirtualized, {
5677
+ }) : null, header, hasPinnedEnd ? /* @__PURE__ */ React20.createElement(InfiniteTableHeaderUnvirtualized, {
5585
5678
  style: {
5586
5679
  right: scrollbars.vertical ? getScrollbarWidth() : 0,
5587
5680
  position: "absolute",
@@ -5593,7 +5686,7 @@ function TableHeaderWrapper(props) {
5593
5686
  scrollable: computedPinnedEndOverflow,
5594
5687
  pinning: "end",
5595
5688
  scrollListener: computedPinnedEndOverflow ? pinnedEndScrollListener : void 0
5596
- }) : null, scrollbars.vertical ? /* @__PURE__ */ React21.createElement(VerticalScrollbarPlaceholder, {
5689
+ }) : null, scrollbars.vertical ? /* @__PURE__ */ React20.createElement(VerticalScrollbarPlaceholder, {
5597
5690
  style: {
5598
5691
  height: "100%",
5599
5692
  right: 0
@@ -5602,7 +5695,7 @@ function TableHeaderWrapper(props) {
5602
5695
  }
5603
5696
 
5604
5697
  // src/components/VirtualScrollContainer/index.tsx
5605
- var React22 = __toModule(require("react"));
5698
+ var React21 = __toModule(require("react"));
5606
5699
  var import_react29 = __toModule(require("react"));
5607
5700
 
5608
5701
  // src/components/hooks/useOnScroll.ts
@@ -5646,7 +5739,7 @@ var getScrollableClassName = (scrollable) => {
5646
5739
 
5647
5740
  // src/components/VirtualScrollContainer/index.tsx
5648
5741
  var rootClassName6 = "InfiniteVirtualScrollContainer";
5649
- var VirtualScrollContainer = React22.forwardRef(function VirtualScrollContainer2(props, ref) {
5742
+ var VirtualScrollContainer = React21.forwardRef(function VirtualScrollContainer2(props, ref) {
5650
5743
  const {
5651
5744
  children,
5652
5745
  scrollable = true,
@@ -5656,7 +5749,7 @@ var VirtualScrollContainer = React22.forwardRef(function VirtualScrollContainer2
5656
5749
  } = props;
5657
5750
  const domRef = ref != null ? ref : (0, import_react29.useRef)(null);
5658
5751
  useOnScroll(domRef, onContainerScroll);
5659
- return /* @__PURE__ */ React22.createElement("div", {
5752
+ return /* @__PURE__ */ React21.createElement("div", {
5660
5753
  ref: domRef,
5661
5754
  style,
5662
5755
  className: join(className, rootClassName6, VirtualScrollContainerCls, getScrollableClassName(scrollable))
@@ -5664,7 +5757,7 @@ var VirtualScrollContainer = React22.forwardRef(function VirtualScrollContainer2
5664
5757
  });
5665
5758
 
5666
5759
  // src/components/VirtualList/SpacePlaceholder.tsx
5667
- var React23 = __toModule(require("react"));
5760
+ var React22 = __toModule(require("react"));
5668
5761
  function SpacePlaceholderFn(props) {
5669
5762
  const { height, width, count } = props;
5670
5763
  const style = {
@@ -5674,7 +5767,7 @@ function SpacePlaceholderFn(props) {
5674
5767
  opacity: 0,
5675
5768
  pointerEvents: "none"
5676
5769
  };
5677
- return /* @__PURE__ */ React23.createElement("div", {
5770
+ return /* @__PURE__ */ React22.createElement("div", {
5678
5771
  "data-count": count,
5679
5772
  "data-placeholder-width": true ? width : void 0,
5680
5773
  "data-placeholder-height": true ? height : void 0,
@@ -5682,20 +5775,20 @@ function SpacePlaceholderFn(props) {
5682
5775
  style
5683
5776
  });
5684
5777
  }
5685
- var SpacePlaceholder = React23.memo(SpacePlaceholderFn);
5778
+ var SpacePlaceholder = React22.memo(SpacePlaceholderFn);
5686
5779
 
5687
5780
  // src/components/InfiniteTable/hooks/useListRendering.tsx
5688
5781
  var import_react41 = __toModule(require("react"));
5689
5782
 
5690
5783
  // src/components/InfiniteTable/hooks/useUnpinnedRendering.tsx
5691
- var React29 = __toModule(require("react"));
5784
+ var React28 = __toModule(require("react"));
5692
5785
  var import_react33 = __toModule(require("react"));
5693
5786
 
5694
5787
  // src/components/VirtualList/VirtualRowList.tsx
5695
- var React25 = __toModule(require("react"));
5788
+ var React24 = __toModule(require("react"));
5696
5789
 
5697
5790
  // src/components/VirtualList/VirtualList.tsx
5698
- var React24 = __toModule(require("react"));
5791
+ var React23 = __toModule(require("react"));
5699
5792
  var import_react30 = __toModule(require("react"));
5700
5793
 
5701
5794
  // src/components/VirtualList/VirtualList.css.ts
@@ -5777,19 +5870,19 @@ var VirtualList = (props) => {
5777
5870
  if (true) {
5778
5871
  domProps["data-cmp-name"] = `VirtualList`;
5779
5872
  }
5780
- 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, {
5781
5874
  scrollable,
5782
5875
  onContainerScroll
5783
- }, /* @__PURE__ */ React24.createElement("div", {
5876
+ }, /* @__PURE__ */ React23.createElement("div", {
5784
5877
  ref: domRef,
5785
5878
  className: scrollTransformTargetCls,
5786
5879
  "data-name": "scroll-transform-target"
5787
- }, /* @__PURE__ */ React24.createElement(RawList, {
5880
+ }, /* @__PURE__ */ React23.createElement(RawList, {
5788
5881
  brain: virtualBrain,
5789
5882
  renderItem,
5790
5883
  repaintId,
5791
5884
  debugChannel: "VirtualList-" + mainAxis
5792
- })), children, /* @__PURE__ */ React24.createElement(SpacePlaceholder, {
5885
+ })), children, /* @__PURE__ */ React23.createElement(SpacePlaceholder, {
5793
5886
  count,
5794
5887
  width,
5795
5888
  height
@@ -5799,14 +5892,14 @@ var VirtualList = (props) => {
5799
5892
  // src/components/VirtualList/VirtualRowList.tsx
5800
5893
  var VirtualRowList = (props) => {
5801
5894
  const _a = props, { rowWidth, rowHeight, renderRow } = _a, listProps = __objRest(_a, ["rowWidth", "rowHeight", "renderRow"]);
5802
- const renderItem = React25.useCallback((renderProps) => {
5895
+ const renderItem = React24.useCallback((renderProps) => {
5803
5896
  return renderRow({
5804
5897
  domRef: renderProps.domRef,
5805
5898
  rowHeight: renderProps.itemSize,
5806
5899
  rowIndex: renderProps.itemIndex
5807
5900
  });
5808
5901
  }, [renderRow]);
5809
- return /* @__PURE__ */ React25.createElement(VirtualList, __spreadProps(__spreadValues({}, listProps), {
5902
+ return /* @__PURE__ */ React24.createElement(VirtualList, __spreadProps(__spreadValues({}, listProps), {
5810
5903
  renderItem,
5811
5904
  mainAxis: "vertical",
5812
5905
  itemMainAxisSize: rowHeight,
@@ -5815,11 +5908,11 @@ var VirtualRowList = (props) => {
5815
5908
  };
5816
5909
 
5817
5910
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRow.tsx
5818
- var React27 = __toModule(require("react"));
5911
+ var React26 = __toModule(require("react"));
5819
5912
  var import_react32 = __toModule(require("react"));
5820
5913
 
5821
5914
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx
5822
- var React26 = __toModule(require("react"));
5915
+ var React25 = __toModule(require("react"));
5823
5916
  var { rootClassName: rootClassName8 } = internalProps;
5824
5917
  var InfiniteTableColumnCellClassName = `${rootClassName8}ColumnCell`;
5825
5918
  function isColumnWithField(c) {
@@ -5876,7 +5969,8 @@ function InfiniteTableColumnCellFn(props) {
5876
5969
  rowIndex,
5877
5970
  toggleGroupRow,
5878
5971
  toggleCurrentGroupRow: () => toggleGroupRow(rowInfo.groupKeys),
5879
- groupBy: computedDataSource.groupBy
5972
+ groupBy: computedDataSource.groupBy,
5973
+ pivotBy: computedDataSource.pivotBy
5880
5974
  });
5881
5975
  if (column.render) {
5882
5976
  renderValue = column.render(renderParam);
@@ -5912,7 +6006,7 @@ function InfiniteTableColumnCellFn(props) {
5912
6006
  }
5913
6007
  }
5914
6008
  }
5915
- return /* @__PURE__ */ React26.createElement(InfiniteTableCell, __spreadProps(__spreadValues({
6009
+ return /* @__PURE__ */ React25.createElement(InfiniteTableCell, __spreadProps(__spreadValues({
5916
6010
  domRef,
5917
6011
  offsetProperty
5918
6012
  }, dataset), {
@@ -5923,7 +6017,7 @@ function InfiniteTableColumnCellFn(props) {
5923
6017
  className: join(useCellClassName(column, [InfiniteTableColumnCellClassName, InfiniteTableCellClassName], ColumnCellRecipe, { dragging: false }), colClassName)
5924
6018
  }), hidden ? null : renderValue);
5925
6019
  }
5926
- var InfiniteTableColumnCell = React26.memo(InfiniteTableColumnCellFn);
6020
+ var InfiniteTableColumnCell = React25.memo(InfiniteTableColumnCellFn);
5927
6021
 
5928
6022
  // src/components/InfiniteTable/components/InfiniteTableRow/useRowDOMProps.ts
5929
6023
  var import_react31 = __toModule(require("react"));
@@ -6054,12 +6148,12 @@ function InfiniteTableRowFn(props) {
6054
6148
  height: rowHeight
6055
6149
  }, domProps.style);
6056
6150
  const renderCellRef = (0, import_react32.useRef)(null);
6057
- const renderCell = React27.useCallback(({ domRef, itemIndex }) => {
6151
+ const renderCell = React26.useCallback(({ domRef, itemIndex }) => {
6058
6152
  const column = columns[itemIndex];
6059
6153
  if (!column) {
6060
6154
  }
6061
6155
  const hidden = false;
6062
- return /* @__PURE__ */ React27.createElement(InfiniteTableColumnCell, {
6156
+ return /* @__PURE__ */ React26.createElement(InfiniteTableColumnCell, {
6063
6157
  getData,
6064
6158
  rowInfo,
6065
6159
  groupRenderStrategy,
@@ -6086,18 +6180,18 @@ function InfiniteTableRowFn(props) {
6086
6180
  if (true) {
6087
6181
  domProps["data-cmp-name"] = "ITableRow";
6088
6182
  }
6089
- return /* @__PURE__ */ React27.createElement("div", __spreadProps(__spreadValues({}, domProps), {
6183
+ return /* @__PURE__ */ React26.createElement("div", __spreadProps(__spreadValues({}, domProps), {
6090
6184
  style
6091
- }), /* @__PURE__ */ React27.createElement(RawList, {
6185
+ }), /* @__PURE__ */ React26.createElement(RawList, {
6092
6186
  brain,
6093
6187
  renderItem: renderCell,
6094
6188
  debugChannel: `${rowIndex}`
6095
6189
  }));
6096
6190
  }
6097
- var InfiniteTableRow = React27.memo(InfiniteTableRowFn);
6191
+ var InfiniteTableRow = React26.memo(InfiniteTableRowFn);
6098
6192
 
6099
6193
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowUnvirtualized.tsx
6100
- var React28 = __toModule(require("react"));
6194
+ var React27 = __toModule(require("react"));
6101
6195
  function TableRowUnvirtualizedFn(props) {
6102
6196
  const {
6103
6197
  rowHeight,
@@ -6118,7 +6212,7 @@ function TableRowUnvirtualizedFn(props) {
6118
6212
  }, domProps.style);
6119
6213
  const children = columns.map((col) => {
6120
6214
  const hidden = false;
6121
- return /* @__PURE__ */ React28.createElement(InfiniteTableColumnCell, {
6215
+ return /* @__PURE__ */ React27.createElement(InfiniteTableColumnCell, {
6122
6216
  key: col.id,
6123
6217
  virtualized: false,
6124
6218
  rowHeight,
@@ -6131,11 +6225,11 @@ function TableRowUnvirtualizedFn(props) {
6131
6225
  column: col
6132
6226
  });
6133
6227
  });
6134
- return /* @__PURE__ */ React28.createElement("div", __spreadProps(__spreadValues({}, domProps), {
6228
+ return /* @__PURE__ */ React27.createElement("div", __spreadProps(__spreadValues({}, domProps), {
6135
6229
  style
6136
6230
  }), children);
6137
6231
  }
6138
- var TableRowUnvirtualized = React28.memo(TableRowUnvirtualizedFn);
6232
+ var TableRowUnvirtualized = React27.memo(TableRowUnvirtualizedFn);
6139
6233
 
6140
6234
  // src/components/InfiniteTable/hooks/useUnpinnedRendering.tsx
6141
6235
  function useUnpinnedRendering(params) {
@@ -6178,7 +6272,7 @@ function useUnpinnedRendering(params) {
6178
6272
  rowProps.repaintId = repaintId;
6179
6273
  }
6180
6274
  const TableRowComponent = shouldVirtualizeColumns ? InfiniteTableRow : TableRowUnvirtualized;
6181
- return /* @__PURE__ */ React29.createElement(TableRowComponent, __spreadValues({}, rowProps));
6275
+ return /* @__PURE__ */ React28.createElement(TableRowComponent, __spreadValues({}, rowProps));
6182
6276
  }, [
6183
6277
  repaintId,
6184
6278
  rowHeight,
@@ -6188,7 +6282,7 @@ function useUnpinnedRendering(params) {
6188
6282
  horizontalVirtualBrain,
6189
6283
  verticalVirtualBrain
6190
6284
  ]);
6191
- const fakeScrollbar = getScrollbarWidth() ? /* @__PURE__ */ React29.createElement("div", {
6285
+ const fakeScrollbar = getScrollbarWidth() ? /* @__PURE__ */ React28.createElement("div", {
6192
6286
  "data-name": "horizontal-scrollbar-placeholder--fake",
6193
6287
  style: {
6194
6288
  position: "absolute",
@@ -6199,10 +6293,10 @@ function useUnpinnedRendering(params) {
6199
6293
  overflow: "auto",
6200
6294
  visibility: columnShifts ? "visible" : "hidden"
6201
6295
  }
6202
- }, /* @__PURE__ */ React29.createElement("div", {
6296
+ }, /* @__PURE__ */ React28.createElement("div", {
6203
6297
  style: { height: "100%", width: computedUnpinnedColumnsWidth }
6204
6298
  })) : null;
6205
- return rowHeight != 0 ? /* @__PURE__ */ React29.createElement(VirtualRowList, {
6299
+ return rowHeight != 0 ? /* @__PURE__ */ React28.createElement(VirtualRowList, {
6206
6300
  repaintId: `${repaintId}-unpinned-`,
6207
6301
  brain: verticalVirtualBrain,
6208
6302
  onContainerScroll: applyScrollHorizontal,
@@ -6345,11 +6439,11 @@ var useOnContainerScroll = ({
6345
6439
  };
6346
6440
 
6347
6441
  // src/components/InfiniteTable/hooks/usePinnedRendering.tsx
6348
- var React31 = __toModule(require("react"));
6442
+ var React30 = __toModule(require("react"));
6349
6443
  var import_react37 = __toModule(require("react"));
6350
6444
 
6351
6445
  // src/components/VirtualList/RowListWithExternalScrolling.tsx
6352
- var React30 = __toModule(require("react"));
6446
+ var React29 = __toModule(require("react"));
6353
6447
  var import_react36 = __toModule(require("react"));
6354
6448
 
6355
6449
  // src/components/hooks/useOnMount.ts
@@ -6425,7 +6519,7 @@ var RowListWithExternalScrolling = (props) => {
6425
6519
  if (true) {
6426
6520
  domProps["data-cmp-name"] = "RowListWithExternalScrolling";
6427
6521
  }
6428
- return /* @__PURE__ */ React30.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React30.createElement(RawList, {
6522
+ return /* @__PURE__ */ React29.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React29.createElement(RawList, {
6429
6523
  brain,
6430
6524
  renderItem,
6431
6525
  repaintId
@@ -6448,7 +6542,7 @@ function PinnedRowsContainer(props) {
6448
6542
  brain,
6449
6543
  renderRow
6450
6544
  } = props;
6451
- const style = React31.useMemo(() => {
6545
+ const style = React30.useMemo(() => {
6452
6546
  const result = pinning === "end" ? {
6453
6547
  width: rowWidth,
6454
6548
  height,
@@ -6474,7 +6568,7 @@ function PinnedRowsContainer(props) {
6474
6568
  className: join(`${PinnedRowsContainerClassName}`, PinnedRowsClsVariants[pinning === "start" ? "pinnedStart" : "pinnedEnd"], `${PinnedRowsContainerClassName}--pinned-${pinning}`, `${PinnedRowsContainerClassName}--overflow`, PinnedRowsClsVariants.overflow)
6475
6569
  };
6476
6570
  if (hasOverflow) {
6477
- return /* @__PURE__ */ React31.createElement(VirtualScrollContainer, {
6571
+ return /* @__PURE__ */ React30.createElement(VirtualScrollContainer, {
6478
6572
  scrollable: {
6479
6573
  horizontal: true,
6480
6574
  vertical: false
@@ -6490,18 +6584,18 @@ function PinnedRowsContainer(props) {
6490
6584
  className: join(PinnedRowsContainerClsVariants({
6491
6585
  pinned: pinning
6492
6586
  }), `${PinnedRowsContainerClassName}Container`, `${PinnedRowsContainerClassName}Container--pinned-${pinning}`)
6493
- }, /* @__PURE__ */ React31.createElement(RowListWithExternalScrolling, __spreadProps(__spreadValues({}, rowListProps), {
6587
+ }, /* @__PURE__ */ React30.createElement(RowListWithExternalScrolling, __spreadProps(__spreadValues({}, rowListProps), {
6494
6588
  onMount: (node) => {
6495
6589
  pinnedScrollListener == null ? void 0 : pinnedScrollListener.onScroll((scrollPosition) => {
6496
6590
  updateScroll(node, brain.getScrollPosition(), scrollPosition);
6497
6591
  });
6498
6592
  }
6499
- })), /* @__PURE__ */ React31.createElement(SpacePlaceholder, {
6593
+ })), /* @__PURE__ */ React30.createElement(SpacePlaceholder, {
6500
6594
  width: rowWidth,
6501
6595
  height: 1
6502
6596
  }));
6503
6597
  }
6504
- return /* @__PURE__ */ React31.createElement(RowListWithExternalScrolling, __spreadValues({}, rowListProps));
6598
+ return /* @__PURE__ */ React30.createElement(RowListWithExternalScrolling, __spreadValues({}, rowListProps));
6505
6599
  }
6506
6600
  function useRenderPinnedRow(params) {
6507
6601
  const { getData, getState, columnsWidth, columns, verticalBrain } = params;
@@ -6521,7 +6615,7 @@ function useRenderPinnedRow(params) {
6521
6615
  rowWidth: columnsWidth,
6522
6616
  columns
6523
6617
  }, rowParams);
6524
- return /* @__PURE__ */ React31.createElement(TableRowUnvirtualized, __spreadValues({}, rowProps));
6618
+ return /* @__PURE__ */ React30.createElement(TableRowUnvirtualized, __spreadValues({}, rowProps));
6525
6619
  }, [columnsWidth, columns, verticalBrain]);
6526
6620
  return renderPinnedRow;
6527
6621
  }
@@ -6564,7 +6658,7 @@ function usePinnedRenderingForSide(side, params) {
6564
6658
  columns,
6565
6659
  columnsWidth
6566
6660
  });
6567
- const pinnedList = columns.length && rowHeight !== 0 ? /* @__PURE__ */ React31.createElement(PinnedRowsContainer, {
6661
+ const pinnedList = columns.length && rowHeight !== 0 ? /* @__PURE__ */ React30.createElement(PinnedRowsContainer, {
6568
6662
  pinning: side,
6569
6663
  pinnedScrollListener,
6570
6664
  hasOverflow,
@@ -6577,7 +6671,7 @@ function usePinnedRenderingForSide(side, params) {
6577
6671
  brain: verticalVirtualBrain,
6578
6672
  renderRow: renderRowPinned
6579
6673
  }) : null;
6580
- const pinnedScrollbarPlaceholder = pinnedList && hasHorizontalScrollbar && !hasOverflow ? /* @__PURE__ */ React31.createElement(HorizontalScrollbarPlaceholder, {
6674
+ const pinnedScrollbarPlaceholder = pinnedList && hasHorizontalScrollbar && !hasOverflow ? /* @__PURE__ */ React30.createElement(HorizontalScrollbarPlaceholder, {
6581
6675
  style: side === "end" ? {
6582
6676
  width: columnsWidth,
6583
6677
  right: hasVerticalScrollbar ? getScrollbarWidth() : 0
@@ -7146,7 +7240,8 @@ function useListRendering(param) {
7146
7240
  computedUnpinnedColumnsWidth,
7147
7241
  computedPinnedStartOverflow,
7148
7242
  computedPinnedEndOverflow,
7149
- computedVisibleColumns
7243
+ computedVisibleColumns,
7244
+ toggleGroupRow
7150
7245
  } = computed;
7151
7246
  const { componentState: dataSourceState, getState: getDataSourceState } = useDataSourceContextValue();
7152
7247
  const { dataArray } = dataSourceState;
@@ -7230,12 +7325,6 @@ function useListRendering(param) {
7230
7325
  horizontalVirtualBrain,
7231
7326
  reservedContentHeight
7232
7327
  });
7233
- const { componentActions: dataSourceActions } = useDataSourceContextValue();
7234
- const toggleGroupRow = (0, import_react41.useCallback)((groupKeys) => {
7235
- const newState = new GroupRowsState(getDataSourceState().groupRowsState);
7236
- newState.toggleGroupRow(groupKeys);
7237
- dataSourceActions.groupRowsState = newState;
7238
- }, []);
7239
7328
  const pinnedRenderingParams = {
7240
7329
  bodySize,
7241
7330
  scrollbars,
@@ -7289,7 +7378,7 @@ function useListRendering(param) {
7289
7378
  }
7290
7379
 
7291
7380
  // src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
7292
- var React32 = __toModule(require("react"));
7381
+ var React31 = __toModule(require("react"));
7293
7382
  var import_react42 = __toModule(require("react"));
7294
7383
 
7295
7384
  // src/components/utils/decamelize.ts
@@ -7325,10 +7414,10 @@ var enforceStyle = (node, style) => {
7325
7414
  node.style.setProperty(decamelize(propertyName), propertyValue, "important");
7326
7415
  }
7327
7416
  };
7328
- var InfiniteTableLicenseFooter = React32.forwardRef(function InfiniteTableLicenseFooter2(props, ref) {
7417
+ var InfiniteTableLicenseFooter = React31.forwardRef(function InfiniteTableLicenseFooter2(props, ref) {
7329
7418
  const { rootClassName: rootClassName12 } = useInternalProps();
7330
- const domRef = React32.useRef(null);
7331
- const domCallback = React32.useCallback((node) => {
7419
+ const domRef = React31.useRef(null);
7420
+ const domCallback = React31.useCallback((node) => {
7332
7421
  domRef.current = node;
7333
7422
  if (!ref) {
7334
7423
  return;
@@ -7353,12 +7442,12 @@ var InfiniteTableLicenseFooter = React32.forwardRef(function InfiniteTableLicens
7353
7442
  clearInterval(intervalId);
7354
7443
  };
7355
7444
  }, []);
7356
- return /* @__PURE__ */ React32.createElement("div", __spreadProps(__spreadValues({
7445
+ return /* @__PURE__ */ React31.createElement("div", __spreadProps(__spreadValues({
7357
7446
  ref: domCallback
7358
7447
  }, props), {
7359
7448
  className: join(`${rootClassName12}-Footer`, FooterCls, props.className),
7360
7449
  style: defaultStyle2
7361
- }), "Powered by", " ", /* @__PURE__ */ React32.createElement("a", {
7450
+ }), "Powered by", " ", /* @__PURE__ */ React31.createElement("a", {
7362
7451
  href: "https://infinite-table.com",
7363
7452
  rel: "noopener noreferrer",
7364
7453
  role: "link",
@@ -7520,7 +7609,7 @@ var useLicense = (licenseKey = "") => {
7520
7609
  const valid = (0, import_react43.useMemo)(() => {
7521
7610
  let valid2 = isValidLicense(licenseKey, {
7522
7611
  publishedAt: 1624970570587,
7523
- version: "0.1.3"
7612
+ version: "0.2.2"
7524
7613
  });
7525
7614
  if (!licenseKey && !valid2 && isInsideSandbox) {
7526
7615
  return true;
@@ -7531,7 +7620,7 @@ var useLicense = (licenseKey = "") => {
7531
7620
  };
7532
7621
 
7533
7622
  // src/components/CSSVariableWatch.tsx
7534
- var React33 = __toModule(require("react"));
7623
+ var React32 = __toModule(require("react"));
7535
7624
  var import_react44 = __toModule(require("react"));
7536
7625
  var error = err("CSSVariableWatch");
7537
7626
  var debug5 = dbg("CSSVariableWatch");
@@ -7546,14 +7635,14 @@ var WRAPPER_STYLE = {
7546
7635
  };
7547
7636
  var useCSSVariableWatch = (params) => {
7548
7637
  const lastValueRef = (0, import_react44.useRef)(0);
7549
- const onResize = React33.useCallback(({ height }) => {
7638
+ const onResize = React32.useCallback(({ height }) => {
7550
7639
  if (height && height !== lastValueRef.current) {
7551
7640
  lastValueRef.current = height;
7552
7641
  params.onChange(height);
7553
7642
  }
7554
7643
  }, [params.onChange]);
7555
7644
  useResizeObserver(params.ref, onResize, { earlyAttach: true });
7556
- React33.useLayoutEffect(() => {
7645
+ React32.useLayoutEffect(() => {
7557
7646
  const value = params.ref.current.getBoundingClientRect().height;
7558
7647
  if (value) {
7559
7648
  lastValueRef.current = value;
@@ -7569,11 +7658,11 @@ var CSSVariableWatch = (props) => {
7569
7658
  useCSSVariableWatch(__spreadProps(__spreadValues({}, props), {
7570
7659
  ref: domRef
7571
7660
  }));
7572
- return /* @__PURE__ */ React33.createElement("div", {
7661
+ return /* @__PURE__ */ React32.createElement("div", {
7573
7662
  "data-name": "css-variable-watcher",
7574
7663
  "data-var": props.varName,
7575
7664
  style: WRAPPER_STYLE
7576
- }, /* @__PURE__ */ React33.createElement("div", {
7665
+ }, /* @__PURE__ */ React32.createElement("div", {
7577
7666
  ref: domRef,
7578
7667
  style: {
7579
7668
  height: props.varName.startsWith("var(") ? props.varName : `var(${props.varName})`
@@ -7666,7 +7755,7 @@ function useDOMProps(initialDOMProps) {
7666
7755
  }
7667
7756
 
7668
7757
  // src/components/InfiniteTable/components/LoadMask.tsx
7669
- var React34 = __toModule(require("react"));
7758
+ var React33 = __toModule(require("react"));
7670
7759
 
7671
7760
  // src/components/InfiniteTable/components/LoadMask.css.ts
7672
7761
  var LoadMaskCls = { visible: "qy58ya1 qy58ya0 _16lm1iw2 _16lm1iwr _16lm1iwt _16lm1iwx _16lm1iwv", hidden: "qy58ya2 qy58ya0 _16lm1iw2 _16lm1iwr _16lm1iwt _16lm1iwx _16lm1iwv" };
@@ -7678,15 +7767,15 @@ var { rootClassName: rootClassName11 } = internalProps;
7678
7767
  var baseCls2 = `${rootClassName11}-LoadMask`;
7679
7768
  function LoadMaskFn(props) {
7680
7769
  const { visible, children = "Loading" } = props;
7681
- return /* @__PURE__ */ React34.createElement("div", {
7770
+ return /* @__PURE__ */ React33.createElement("div", {
7682
7771
  className: `${LoadMaskCls[visible ? "visible" : "hidden"]} ${baseCls2}`
7683
- }, /* @__PURE__ */ React34.createElement("div", {
7772
+ }, /* @__PURE__ */ React33.createElement("div", {
7684
7773
  className: `${LoadMaskOverlayCls} ${baseCls2}-Overlay`
7685
- }), /* @__PURE__ */ React34.createElement("div", {
7774
+ }), /* @__PURE__ */ React33.createElement("div", {
7686
7775
  className: `${LoadMaskTextCls} ${baseCls2}-Text`
7687
7776
  }, children));
7688
7777
  }
7689
- var LoadMask = React34.memo(LoadMaskFn);
7778
+ var LoadMask = React33.memo(LoadMaskFn);
7690
7779
 
7691
7780
  // src/components/InfiniteTable/index.tsx
7692
7781
  var InfiniteTableClassName = internalProps.rootClassName;
@@ -7705,7 +7794,7 @@ var InfiniteTableRoot = getComponentStateRoot({
7705
7794
  getParentState: () => useDataSource(),
7706
7795
  debugName: "InfiniteTable"
7707
7796
  });
7708
- var InfiniteTableComponent = React35.memo(function InfiniteTableComponent2() {
7797
+ var InfiniteTableComponent = React34.memo(function InfiniteTableComponent2() {
7709
7798
  var _a;
7710
7799
  const {
7711
7800
  componentState,
@@ -7715,7 +7804,8 @@ var InfiniteTableComponent = React35.memo(function InfiniteTableComponent2() {
7715
7804
  } = useInfiniteTable();
7716
7805
  const {
7717
7806
  componentState: { dataArray, loading },
7718
- getState: getDataSourceState
7807
+ getState: getDataSourceState,
7808
+ componentActions: dataSourceActions
7719
7809
  } = useDataSourceContextValue();
7720
7810
  const {
7721
7811
  domRef,
@@ -7728,7 +7818,8 @@ var InfiniteTableComponent = React35.memo(function InfiniteTableComponent2() {
7728
7818
  onHeaderHeightCSSVarChange,
7729
7819
  rowHeightCSSVar,
7730
7820
  headerHeightCSSVar,
7731
- components
7821
+ components,
7822
+ scrollStopDelay
7732
7823
  } = componentState;
7733
7824
  const { columnShifts, bodySize } = componentState;
7734
7825
  const {
@@ -7741,6 +7832,7 @@ var InfiniteTableComponent = React35.memo(function InfiniteTableComponent2() {
7741
7832
  scrollbars,
7742
7833
  applyScrollVertical,
7743
7834
  horizontalVirtualBrain,
7835
+ verticalVirtualBrain,
7744
7836
  reservedContentHeight
7745
7837
  } = useListRendering({
7746
7838
  getComputed,
@@ -7749,10 +7841,17 @@ var InfiniteTableComponent = React35.memo(function InfiniteTableComponent2() {
7749
7841
  bodySize,
7750
7842
  computed
7751
7843
  });
7844
+ React34.useEffect(() => {
7845
+ const dataSourceState = getDataSourceState();
7846
+ const onChange = debounce((renderRange) => {
7847
+ dataSourceState.notifyRenderRangeChange(renderRange);
7848
+ }, { wait: scrollStopDelay });
7849
+ return verticalVirtualBrain.onRenderRangeChange(onChange);
7850
+ }, [verticalVirtualBrain, scrollStopDelay]);
7752
7851
  const licenseValid = useLicense(licenseKey);
7753
7852
  const domProps = useDOMProps(componentState.domProps);
7754
7853
  const LoadMaskCmp = (_a = components == null ? void 0 : components.LoadMask) != null ? _a : LoadMask;
7755
- React35.useLayoutEffect(() => {
7854
+ React34.useLayoutEffect(() => {
7756
7855
  const dataSourceState = getDataSourceState();
7757
7856
  const { onScrollbarsChange } = getInfiniteTableState();
7758
7857
  const { notifyScrollbarsChange } = dataSourceState;
@@ -7761,31 +7860,34 @@ var InfiniteTableComponent = React35.memo(function InfiniteTableComponent2() {
7761
7860
  }
7762
7861
  notifyScrollbarsChange(scrollbars);
7763
7862
  }, [scrollbars]);
7764
- return /* @__PURE__ */ React35.createElement("div", __spreadValues({
7863
+ React34.useEffect(() => {
7864
+ dataSourceActions.scrollStopDelayUpdatedByTable = scrollStopDelay;
7865
+ }, [scrollStopDelay]);
7866
+ return /* @__PURE__ */ React34.createElement("div", __spreadValues({
7765
7867
  ref: domRef
7766
- }, domProps), header ? /* @__PURE__ */ React35.createElement(TableHeaderWrapper, {
7868
+ }, domProps), header ? /* @__PURE__ */ React34.createElement(TableHeaderWrapper, {
7767
7869
  brain: horizontalVirtualBrain,
7768
7870
  repaintId,
7769
7871
  scrollbars
7770
- }) : null, /* @__PURE__ */ React35.createElement(InfiniteTableBody, null, /* @__PURE__ */ React35.createElement(VirtualScrollContainer, {
7872
+ }) : null, /* @__PURE__ */ React34.createElement(InfiniteTableBody, null, /* @__PURE__ */ React34.createElement(VirtualScrollContainer, {
7771
7873
  ref: scrollerDOMRef,
7772
7874
  onContainerScroll: applyScrollVertical,
7773
7875
  scrollable: ONLY_VERTICAL_SCROLLBAR
7774
- }, /* @__PURE__ */ React35.createElement("div", {
7876
+ }, /* @__PURE__ */ React34.createElement("div", {
7775
7877
  className: display.flex
7776
- }, pinnedStartList, centerList, pinnedEndList), /* @__PURE__ */ React35.createElement(SpacePlaceholder, {
7878
+ }, pinnedStartList, centerList, pinnedEndList), /* @__PURE__ */ React34.createElement(SpacePlaceholder, {
7777
7879
  count: dataArray.length,
7778
7880
  width: 0,
7779
7881
  height: reservedContentHeight
7780
- })), pinnedStartScrollbarPlaceholder, pinnedEndScrollbarPlaceholder, /* @__PURE__ */ React35.createElement(LoadMaskCmp, {
7882
+ })), pinnedStartScrollbarPlaceholder, pinnedEndScrollbarPlaceholder, /* @__PURE__ */ React34.createElement(LoadMaskCmp, {
7781
7883
  visible: loading
7782
- }, 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", {
7783
7885
  ref: portalDOMRef,
7784
7886
  className: join(`${rootClassName}Portal`, zIndex[1e3], position.absolute, top[0], left[0])
7785
- }), rowHeightCSSVar ? /* @__PURE__ */ React35.createElement(CSSVariableWatch, {
7887
+ }), rowHeightCSSVar ? /* @__PURE__ */ React34.createElement(CSSVariableWatch, {
7786
7888
  varName: rowHeightCSSVar,
7787
7889
  onChange: onRowHeightCSSVarChange
7788
- }) : null, headerHeightCSSVar ? /* @__PURE__ */ React35.createElement(CSSVariableWatch, {
7890
+ }) : null, headerHeightCSSVar ? /* @__PURE__ */ React34.createElement(CSSVariableWatch, {
7789
7891
  varName: headerHeightCSSVar,
7790
7892
  onChange: onHeaderHeightCSSVarChange
7791
7893
  }) : null);
@@ -7821,25 +7923,25 @@ function InfiniteTableContextProvider() {
7821
7923
  }
7822
7924
  componentActions.bodySize = bodySize;
7823
7925
  }, { earlyAttach: true });
7824
- React35.useEffect(() => {
7926
+ React34.useEffect(() => {
7825
7927
  return () => {
7826
7928
  componentState.onRowHeightCSSVarChange.destroy();
7827
7929
  componentState.onHeaderHeightCSSVarChange.destroy();
7828
7930
  };
7829
7931
  }, []);
7830
- React35.useEffect(() => {
7932
+ React34.useEffect(() => {
7831
7933
  if (scrollerDOMRef.current) {
7832
7934
  scrollerDOMRef.current.scrollTop = 0;
7833
7935
  }
7834
7936
  }, [scrollTopId, scrollerDOMRef]);
7835
7937
  const TableContext2 = getInfiniteTableContext();
7836
- return /* @__PURE__ */ React35.createElement(TableContext2.Provider, {
7938
+ return /* @__PURE__ */ React34.createElement(TableContext2.Provider, {
7837
7939
  value: contextValue
7838
- }, /* @__PURE__ */ React35.createElement(InfiniteTableComponent, null));
7940
+ }, /* @__PURE__ */ React34.createElement(InfiniteTableComponent, null));
7839
7941
  }
7840
7942
  function InfiniteTable(props) {
7841
- const table = /* @__PURE__ */ React35.createElement(InfiniteTableRoot, __spreadValues({}, props), /* @__PURE__ */ React35.createElement(InfiniteTableContextProvider, null));
7842
- 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);
7843
7945
  }
7844
7946
  InfiniteTable.defaultProps = {
7845
7947
  rowHeight: 40,