@infinite-table/infinite-react 0.0.7 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -53,26 +53,6 @@ var __reExport = (target, module2, desc) => {
53
53
  var __toModule = (module2) => {
54
54
  return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
55
55
  };
56
- var __async = (__this, __arguments, generator) => {
57
- return new Promise((resolve, reject) => {
58
- var fulfilled = (value) => {
59
- try {
60
- step(generator.next(value));
61
- } catch (e) {
62
- reject(e);
63
- }
64
- };
65
- var rejected = (value) => {
66
- try {
67
- step(generator.throw(value));
68
- } catch (e) {
69
- reject(e);
70
- }
71
- };
72
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
73
- step((generator = generator.apply(__this, __arguments)).next());
74
- });
75
- };
76
56
 
77
57
  // node_modules/ms/index.js
78
58
  var require_ms = __commonJS({
@@ -482,14 +462,14 @@ var require_browser = __commonJS({
482
462
  } else {
483
463
  exports.storage.removeItem("debug");
484
464
  }
485
- } catch (error3) {
465
+ } catch (error2) {
486
466
  }
487
467
  }
488
468
  function load() {
489
469
  let r;
490
470
  try {
491
471
  r = exports.storage.getItem("debug");
492
- } catch (error3) {
472
+ } catch (error2) {
493
473
  }
494
474
  if (!r && typeof process !== "undefined" && "env" in process) {
495
475
  r = process.env.DEBUG;
@@ -499,7 +479,7 @@ var require_browser = __commonJS({
499
479
  function localstorage() {
500
480
  try {
501
481
  return localStorage;
502
- } catch (error3) {
482
+ } catch (error2) {
503
483
  }
504
484
  }
505
485
  module2.exports = require_common()(exports);
@@ -507,8 +487,8 @@ var require_browser = __commonJS({
507
487
  formatters.j = function(v) {
508
488
  try {
509
489
  return JSON.stringify(v);
510
- } catch (error3) {
511
- return "[UnexpectedJSONParseError]: " + error3.message;
490
+ } catch (error2) {
491
+ return "[UnexpectedJSONParseError]: " + error2.message;
512
492
  }
513
493
  };
514
494
  }
@@ -641,38 +621,6 @@ var require_binary_search = __commonJS({
641
621
  }
642
622
  });
643
623
 
644
- // node_modules/decamelize/index.js
645
- var require_decamelize = __commonJS({
646
- "node_modules/decamelize/index.js"(exports, module2) {
647
- "use strict";
648
- var handlePreserveConsecutiveUppercase = (decamelized, separator) => {
649
- decamelized = decamelized.replace(/((?<![\p{Uppercase_Letter}\d])[\p{Uppercase_Letter}\d](?![\p{Uppercase_Letter}\d]))/gu, ($0) => {
650
- return $0.toLowerCase();
651
- });
652
- return decamelized.replace(/(\p{Uppercase_Letter}+)(\p{Uppercase_Letter}\p{Lowercase_Letter}+)/gu, (_, $1, $2) => {
653
- return $1 + separator + $2.toLowerCase();
654
- });
655
- };
656
- module2.exports = (text, {
657
- separator = "_",
658
- preserveConsecutiveUppercase = false
659
- } = {}) => {
660
- if (!(typeof text === "string" && typeof separator === "string")) {
661
- throw new TypeError("The `text` and `separator` arguments should be of type `string`");
662
- }
663
- if (text.length < 2) {
664
- return preserveConsecutiveUppercase ? text : text.toLowerCase();
665
- }
666
- const replacement = `$1${separator}$2`;
667
- const decamelized = text.replace(/([\p{Lowercase_Letter}\d])(\p{Uppercase_Letter})/gu, replacement);
668
- if (preserveConsecutiveUppercase) {
669
- return handlePreserveConsecutiveUppercase(decamelized, separator);
670
- }
671
- return decamelized.replace(/(\p{Uppercase_Letter})(\p{Uppercase_Letter}\p{Lowercase_Letter}+)/gu, replacement).toLowerCase();
672
- };
673
- }
674
- });
675
-
676
624
  // src/index.tsx
677
625
  __export(exports, {
678
626
  DataSource: () => DataSource,
@@ -685,12 +633,13 @@ __export(exports, {
685
633
  getComponentStateRoot: () => getComponentStateRoot,
686
634
  group: () => group,
687
635
  interceptMap: () => interceptMap,
636
+ multisort: () => multisort,
688
637
  useComponentState: () => useComponentState,
689
638
  useDataSource: () => useDataSource
690
639
  });
691
640
 
692
641
  // src/components/InfiniteTable/index.tsx
693
- var React36 = __toModule(require("react"));
642
+ var React35 = __toModule(require("react"));
694
643
 
695
644
  // src/components/InfiniteTable/internalProps.ts
696
645
  var rootClassName = "Infinite";
@@ -770,9 +719,20 @@ var ScrollListener = class {
770
719
  }
771
720
  };
772
721
 
722
+ // src/components/InfiniteTable/utils/toMap.ts
723
+ function toMap(mapOrObject) {
724
+ if (!mapOrObject) {
725
+ return new Map();
726
+ }
727
+ if (mapOrObject instanceof Map) {
728
+ return mapOrObject;
729
+ }
730
+ return new Map(Object.entries(mapOrObject));
731
+ }
732
+
773
733
  // src/components/InfiniteTable/state/computeColumnGroupsDepths.ts
774
734
  function computeColumnGroupsDepths(columnGroups) {
775
- const map = new Map();
735
+ const map2 = new Map();
776
736
  columnGroups.forEach((colGroup, colGroupId) => {
777
737
  let parentGroupId = colGroup.columnGroup;
778
738
  let depth = 0;
@@ -787,12 +747,15 @@ function computeColumnGroupsDepths(columnGroups) {
787
747
  depth++;
788
748
  parentGroupId = parent.columnGroup;
789
749
  }
790
- map.set(colGroupId, depth);
750
+ map2.set(colGroupId, depth);
791
751
  });
792
- return map;
752
+ return map2;
793
753
  }
794
754
 
795
755
  // src/components/InfiniteTable/state/getInitialState.ts
756
+ function toColumnTypesMap(mapOrObject) {
757
+ return toMap(mapOrObject);
758
+ }
796
759
  function initSetupState() {
797
760
  const columnsGeneratedForGrouping = new Map();
798
761
  return {
@@ -822,7 +785,11 @@ function initSetupState() {
822
785
  }
823
786
  var forwardProps = () => {
824
787
  return {
825
- columns: 1,
788
+ columns: (columns) => {
789
+ var _a;
790
+ return (_a = toMap(columns)) != null ? _a : new Map();
791
+ },
792
+ scrollTopId: 1,
826
793
  components: 1,
827
794
  loadingText: 1,
828
795
  pivotColumns: 1,
@@ -848,15 +815,18 @@ var forwardProps = () => {
848
815
  pivotColumn: 1,
849
816
  pivotRowLabelsColumn: 1,
850
817
  pivotColumnGroups: 1,
818
+ onScrollbarsChange: 1,
819
+ viewportReservedWidth: (viewportReservedWidth) => viewportReservedWidth != null ? viewportReservedWidth : 0,
851
820
  activeIndex: (activeIndex) => activeIndex != null ? activeIndex : 0,
852
821
  columnMinWidth: (columnMinWidth) => columnMinWidth != null ? columnMinWidth : 30,
853
822
  columnMaxWidth: (columnMaxWidth) => columnMaxWidth != null ? columnMaxWidth : 2e3,
854
- columnDefaultWidth: (columnDefaultWidth) => columnDefaultWidth != null ? columnDefaultWidth : 300,
823
+ columnDefaultWidth: (columnDefaultWidth) => columnDefaultWidth != null ? columnDefaultWidth : 200,
855
824
  draggableColumns: (draggableColumns) => draggableColumns != null ? draggableColumns : true,
825
+ showSeparatePivotColumnForSingleAggregation: (showSeparatePivotColumnForSingleAggregation) => showSeparatePivotColumnForSingleAggregation != null ? showSeparatePivotColumnForSingleAggregation : false,
856
826
  sortable: (sortable) => sortable != null ? sortable : true,
857
827
  hideEmptyGroupColumns: (hideEmptyGroupColumns) => hideEmptyGroupColumns != null ? hideEmptyGroupColumns : false,
858
828
  pivotTotalColumnPosition: (pivotTotalColumnPosition) => pivotTotalColumnPosition != null ? pivotTotalColumnPosition : "end",
859
- licenseKey: (licenseKey) => licenseKey || globalThis.InfiniteTableLicenseKey || "",
829
+ licenseKey: (licenseKey) => licenseKey || "",
860
830
  columnOrder: (columnOrder) => columnOrder != null ? columnOrder : true,
861
831
  header: (header) => header != null ? header : true,
862
832
  showZebraRows: (showZebraRows) => showZebraRows != null ? showZebraRows : true,
@@ -864,23 +834,33 @@ var forwardProps = () => {
864
834
  virtualizeColumns: (virtualizeColumns) => virtualizeColumns != null ? virtualizeColumns : true,
865
835
  rowHeight: (rowHeight) => typeof rowHeight === "number" ? rowHeight : 0,
866
836
  headerHeight: (headerHeight) => typeof headerHeight === "number" ? headerHeight : 0,
867
- columnVisibility: (columnVisibility) => columnVisibility != null ? columnVisibility : new Map(),
837
+ columnVisibility: (columnVisibility) => {
838
+ var _a;
839
+ return (_a = toMap(columnVisibility)) != null ? _a : new Map();
840
+ },
868
841
  columnPinning: (columnPinning) => columnPinning != null ? columnPinning : new Map(),
869
- columnAggregations: (columnAggregations) => columnAggregations != null ? columnAggregations : new Map(),
842
+ columnSizing: (columnSizing) => {
843
+ var _a;
844
+ return (_a = toMap(columnSizing)) != null ? _a : new Map();
845
+ },
846
+ columnTypes: (columnTypes) => {
847
+ var _a;
848
+ return (_a = toColumnTypesMap(columnTypes)) != null ? _a : new Map();
849
+ },
870
850
  collapsedColumnGroups: (collapsedColumnGroups) => collapsedColumnGroups != null ? collapsedColumnGroups : new Map(),
871
851
  columnGroups: (columnGroups) => columnGroups != null ? columnGroups : new Map()
872
852
  };
873
853
  };
874
854
  function getGroupRenderStrategy(options) {
875
- const { groupRowsBy, groupColumn, groupRenderStrategy } = options;
855
+ const { groupBy, groupColumn, groupRenderStrategy } = options;
876
856
  if (groupRenderStrategy) {
877
857
  return groupRenderStrategy;
878
858
  }
879
859
  if (groupColumn != null && typeof groupColumn === "object") {
880
860
  return "single-column";
881
861
  }
882
- const columnsInGroupRowsBy = groupRowsBy.filter((g) => g.column);
883
- if (columnsInGroupRowsBy.length) {
862
+ const columnsInGroupBy = groupBy.filter((g) => g.column);
863
+ if (columnsInGroupBy.length) {
884
864
  return "multi-column";
885
865
  }
886
866
  return "multi-column";
@@ -891,16 +871,17 @@ var mapPropsToState = (params) => {
891
871
  const computedColumnGroups = state.pivotColumnGroups || state.columnGroups;
892
872
  const virtualizeHeader = header && virtualizeColumns && (!computedColumnGroups || (computedColumnGroups == null ? void 0 : computedColumnGroups.size) === 0);
893
873
  const columnGroupsDepthsMap = state.columnGroups && state.columnGroups != (oldState == null ? void 0 : oldState.columnGroups) || state.pivotColumnGroups && state.pivotColumnGroups != (oldState == null ? void 0 : oldState.pivotColumnGroups) ? computeColumnGroupsDepths(computedColumnGroups) : state.columnGroupsDepthsMap;
894
- const groupRowsBy = parentState == null ? void 0 : parentState.groupRowsBy;
874
+ const groupBy = parentState == null ? void 0 : parentState.groupBy;
895
875
  const groupRenderStrategy = getGroupRenderStrategy({
896
876
  groupRenderStrategy: props.groupRenderStrategy,
897
- groupRowsBy,
877
+ groupBy,
898
878
  groupColumn: props.groupColumn
899
879
  });
880
+ const computedColumns = state.computedPivotColumns || state.columnsWhenGrouping || state.columnsWhenInlineGroupRenderStrategy || state.columns;
900
881
  return {
901
882
  groupRenderStrategy,
902
- groupRowsBy,
903
- computedColumns: state.computedPivotColumns || state.columnsWhenGrouping || state.columnsWhenInlineGroupRenderStrategy || props.columns,
883
+ groupBy,
884
+ computedColumns,
904
885
  virtualizeHeader,
905
886
  columnGroupsDepthsMap,
906
887
  columnGroupsMaxDepth: columnGroupsDepthsMap != state.columnGroupsDepthsMap ? Math.max(...columnGroupsDepthsMap.values(), 0) : state.columnGroupsMaxDepth,
@@ -1032,7 +1013,7 @@ var computeFlex = (params) => {
1032
1013
  items.forEach((item, i) => {
1033
1014
  var _a, _b, _c, _d, _e, _f;
1034
1015
  let maxSize = (_b = (_a = item.maxSize) != null ? _a : defaultMaxSize) != null ? _b : void 0;
1035
- let minSize = (_d = (_c = item.maxSize) != null ? _c : defaultMinSize) != null ? _d : void 0;
1016
+ let minSize = (_d = (_c = item.minSize) != null ? _c : defaultMinSize) != null ? _d : void 0;
1036
1017
  if (item.size != null) {
1037
1018
  if (maxSize != null && item.size > maxSize) {
1038
1019
  item.size = maxSize;
@@ -1060,7 +1041,7 @@ var computeFlex = (params) => {
1060
1041
  if (item.flex != null) {
1061
1042
  const approxFlexSize = sizePerFlex * item.flex;
1062
1043
  let maxSize = (_b = (_a = item.maxSize) != null ? _a : defaultMaxSize) != null ? _b : void 0;
1063
- let minSize = (_d = (_c = item.maxSize) != null ? _c : defaultMinSize) != null ? _d : void 0;
1044
+ let minSize = (_d = (_c = item.minSize) != null ? _c : defaultMinSize) != null ? _d : void 0;
1064
1045
  let constrained = false;
1065
1046
  let substractSize = 0;
1066
1047
  if (maxSize != null && approxFlexSize > maxSize) {
@@ -1195,8 +1176,52 @@ var Logger = class {
1195
1176
  }
1196
1177
  };
1197
1178
 
1179
+ // src/utils/getGlobal.ts
1180
+ function getGlobal() {
1181
+ return globalThis;
1182
+ }
1183
+
1184
+ // src/components/utils/getScrollbarWidth.ts
1185
+ var scrollbarWidth;
1186
+ function getScrollbarWidth() {
1187
+ var _a, _b;
1188
+ if (scrollbarWidth != null) {
1189
+ return scrollbarWidth;
1190
+ }
1191
+ const doc = (_a = getGlobal().document) != null ? _a : null;
1192
+ if (!doc) {
1193
+ return 0;
1194
+ }
1195
+ const outer = doc.createElement("div");
1196
+ outer.style.visibility = "hidden";
1197
+ outer.style.overflow = "scroll";
1198
+ doc.body.appendChild(outer);
1199
+ const inner = doc.createElement("div");
1200
+ outer.appendChild(inner);
1201
+ scrollbarWidth = outer.offsetWidth - inner.offsetWidth;
1202
+ (_b = outer.parentNode) == null ? void 0 : _b.removeChild(outer);
1203
+ return scrollbarWidth;
1204
+ }
1205
+
1206
+ // src/components/InfiniteTable/utils/getColumnComputedType.ts
1207
+ var emptyType = Object.freeze({});
1208
+ function getColumnComputedType(column, columnTypes) {
1209
+ const defaultType = columnTypes.get("default") || emptyType;
1210
+ if (column.type === void 0) {
1211
+ return defaultType;
1212
+ }
1213
+ if (column.type === null) {
1214
+ return emptyType;
1215
+ }
1216
+ if (typeof column.type === "string") {
1217
+ const type = columnTypes.get(column.type) || emptyType;
1218
+ return type;
1219
+ }
1220
+ return column.type.reduce((acc, columnType) => Object.assign(acc, columnTypes.get(columnType)), {});
1221
+ }
1222
+
1198
1223
  // src/components/InfiniteTable/utils/getComputedVisibleColumns.ts
1199
- var error = err("getComputedVisibleColumns");
1224
+ var logError = err("getComputedVisibleColumns");
1200
1225
  var isColumnVisible = (columnVisibility, _columnVisibilityAssumeVisible, colId) => {
1201
1226
  return !columnVisibility.has(colId) || columnVisibility.get(colId) !== false;
1202
1227
  };
@@ -1217,22 +1242,26 @@ var getComputedVisibleColumns = ({
1217
1242
  sortInfo,
1218
1243
  setSortInfo,
1219
1244
  multiSort,
1245
+ viewportReservedWidth,
1220
1246
  draggableColumns,
1221
1247
  columnOrder,
1222
1248
  columnPinning,
1249
+ columnSizing,
1250
+ columnTypes,
1223
1251
  columnVisibility,
1224
1252
  columnVisibilityAssumeVisible
1225
1253
  }) => {
1226
1254
  let computedOffset = 0;
1227
1255
  const normalizedColumnOrder = adjustColumnOrderForPinning(columnOrder === true ? [...columns.keys()] : columnOrder, columnPinning);
1228
- const visibleColumnOrder = normalizedColumnOrder.filter(isColumnVisible.bind(null, columnVisibility, columnVisibilityAssumeVisible));
1229
- const columnsArray = visibleColumnOrder.map((columnId) => {
1230
- let col = columns.get(columnId);
1256
+ const visibleColumnOrder = normalizedColumnOrder.filter((colId) => {
1257
+ let col = columns.get(colId);
1231
1258
  if (!col) {
1232
- error(`Column with id "${columnId}" specified in columnOrder array cannot be found in the columns map.`);
1259
+ logError(`Column with id "${colId}" specified in columnOrder array cannot be found in the columns map.`);
1260
+ return false;
1233
1261
  }
1234
- return col;
1235
- }).filter(Boolean);
1262
+ return isColumnVisible(columnVisibility, columnVisibilityAssumeVisible, colId);
1263
+ });
1264
+ const columnsArray = visibleColumnOrder.map((columnId) => columns.get(columnId)).filter(Boolean);
1236
1265
  const sortedMap = (sortInfo != null ? sortInfo : []).reduce((acc, info, index) => {
1237
1266
  if (info.id) {
1238
1267
  acc[info.id] = { sortInfo: info, index };
@@ -1246,20 +1275,39 @@ var getComputedVisibleColumns = ({
1246
1275
  return acc;
1247
1276
  }, {});
1248
1277
  const flexResult = computeFlex({
1249
- availableSize: bodySize.width,
1278
+ availableSize: Math.max(bodySize.width - (viewportReservedWidth != null ? viewportReservedWidth : 0) - getScrollbarWidth(), 0),
1250
1279
  maxSize: columnMaxWidth,
1251
1280
  minSize: columnMinWidth,
1252
- items: columnsArray.map((col) => {
1253
- var _a, _b;
1254
- let size = col.flex != null ? void 0 : (_a = col.width) != null ? _a : columnDefaultWidth;
1255
- if (!size && col.flex == null) {
1256
- size = (_b = col.minWidth) != null ? _b : columnMinWidth;
1281
+ items: visibleColumnOrder.map((colId) => {
1282
+ var _a, _b, _c, _d;
1283
+ const column = columns.get(colId);
1284
+ const colType = getColumnComputedType(column, columnTypes);
1285
+ const colTypeSizing = {
1286
+ minWidth: colType == null ? void 0 : colType.minWidth,
1287
+ maxWidth: colType == null ? void 0 : colType.maxWidth,
1288
+ width: colType == null ? void 0 : colType.width,
1289
+ flex: colType == null ? void 0 : colType.flex
1290
+ };
1291
+ let colSizing = columnSizing.get(colId) || {};
1292
+ if (colSizing.width != null) {
1293
+ delete colTypeSizing.flex;
1294
+ }
1295
+ if (colSizing.flex != null) {
1296
+ delete colTypeSizing.width;
1297
+ }
1298
+ colSizing = Object.assign(colTypeSizing, colSizing);
1299
+ let colFlex = (_a = colSizing.flex) != null ? _a : void 0;
1300
+ const colMinWidth = (_b = colSizing.minWidth) != null ? _b : columnMinWidth;
1301
+ const colMaxWidth = (_c = colSizing.maxWidth) != null ? _c : columnMaxWidth;
1302
+ let size = colFlex != void 0 ? void 0 : (_d = colSizing.width) != null ? _d : columnDefaultWidth;
1303
+ if (!size && colFlex == void 0) {
1304
+ size = colMinWidth;
1257
1305
  }
1258
1306
  return {
1259
1307
  size,
1260
- flex: col.flex,
1261
- minSize: col.minWidth,
1262
- maxSize: col.maxWidth
1308
+ flex: colFlex,
1309
+ minSize: colMinWidth,
1310
+ maxSize: colMaxWidth
1263
1311
  };
1264
1312
  })
1265
1313
  });
@@ -1294,6 +1342,7 @@ var getComputedVisibleColumns = ({
1294
1342
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
1295
1343
  const id = visibleColumnOrder[i];
1296
1344
  const nextColumnId = visibleColumnOrder[i + 1];
1345
+ const colType = getColumnComputedType(c, columnTypes);
1297
1346
  const sortingInfo = sortedMap[id] ? sortedMap[id] : c.field ? (_a = sortedMap[c.field]) != null ? _a : null : null;
1298
1347
  const computedSortInfo = (_b = sortingInfo == null ? void 0 : sortingInfo.sortInfo) != null ? _b : null;
1299
1348
  const computedSorted = !!computedSortInfo;
@@ -1349,8 +1398,10 @@ var getComputedVisibleColumns = ({
1349
1398
  const computedFirstInCategory = computedPinned !== prevPinned;
1350
1399
  const computedLastInCategory = computedLast || computedPinned !== getComputedPinned(nextColumnId, columnPinning);
1351
1400
  const result2 = __spreadProps(__spreadValues({
1352
- align: "start",
1353
- verticalAlign: "center"
1401
+ align: colType.align,
1402
+ verticalAlign: colType.verticalAlign,
1403
+ renderValue: colType.renderValue,
1404
+ render: colType.render
1354
1405
  }, c), {
1355
1406
  computedWidth,
1356
1407
  computedAbsoluteOffset,
@@ -1429,28 +1480,28 @@ var useRerender = () => {
1429
1480
 
1430
1481
  // src/components/hooks/useInterceptedMap.ts
1431
1482
  var import_react6 = __toModule(require("react"));
1432
- function interceptMap(map, fns) {
1433
- const { set, delete: deleteKey, clear } = map;
1483
+ function interceptMap(map2, fns) {
1484
+ const { set, delete: deleteKey, clear } = map2;
1434
1485
  if (fns.set) {
1435
- map.set = (key, value) => {
1436
- set.call(map, key, value);
1486
+ map2.set = (key, value) => {
1487
+ set.call(map2, key, value);
1437
1488
  fns.set(key, value);
1438
- return map;
1489
+ return map2;
1439
1490
  };
1440
1491
  }
1441
1492
  if (fns.delete) {
1442
- map.delete = (key) => {
1443
- const removed = deleteKey.call(map, key);
1493
+ map2.delete = (key) => {
1494
+ const removed = deleteKey.call(map2, key);
1444
1495
  fns.delete(key);
1445
1496
  return removed;
1446
1497
  };
1447
1498
  }
1448
1499
  if (fns.clear || fns.beforeClear) {
1449
- map.clear = () => {
1500
+ map2.clear = () => {
1450
1501
  if (fns.beforeClear) {
1451
- fns.beforeClear(map);
1502
+ fns.beforeClear(map2);
1452
1503
  }
1453
- const result = clear.call(map);
1504
+ const result = clear.call(map2);
1454
1505
  if (fns.clear) {
1455
1506
  fns.clear();
1456
1507
  }
@@ -1459,13 +1510,13 @@ function interceptMap(map, fns) {
1459
1510
  }
1460
1511
  return () => {
1461
1512
  if (set) {
1462
- map.set = set;
1513
+ map2.set = set;
1463
1514
  }
1464
1515
  if (deleteKey) {
1465
- map.delete = deleteKey;
1516
+ map2.delete = deleteKey;
1466
1517
  }
1467
1518
  if (clear) {
1468
- map.clear = clear;
1519
+ map2.clear = clear;
1469
1520
  }
1470
1521
  };
1471
1522
  }
@@ -1485,16 +1536,16 @@ var rafFn = (fn) => {
1485
1536
  };
1486
1537
 
1487
1538
  // src/components/InfiniteTable/hooks/useRerenderOnKeyChange.ts
1488
- var useRerenderOnKeyChange = (map) => {
1539
+ var useRerenderOnKeyChange = (map2) => {
1489
1540
  const [renderId, rerender] = useRerender();
1490
1541
  (0, import_react7.useEffect)(() => {
1491
1542
  const update = rafFn(rerender);
1492
- return interceptMap(map, {
1543
+ return interceptMap(map2, {
1493
1544
  set: update,
1494
1545
  clear: update,
1495
1546
  delete: update
1496
1547
  });
1497
- }, [map]);
1548
+ }, [map2]);
1498
1549
  return renderId;
1499
1550
  };
1500
1551
 
@@ -1512,11 +1563,16 @@ var useComputedVisibleColumns = ({
1512
1563
  setSortInfo,
1513
1564
  columnOrder,
1514
1565
  columnPinning,
1566
+ columnTypes,
1515
1567
  pinnedEndMaxWidth,
1516
1568
  pinnedStartMaxWidth,
1569
+ viewportReservedWidth,
1517
1570
  columnVisibility,
1518
- columnVisibilityAssumeVisible
1571
+ columnVisibilityAssumeVisible,
1572
+ columnSizing
1519
1573
  }) => {
1574
+ const columnsSizingRenderId = useRerenderOnKeyChange(columnSizing);
1575
+ const columnTypesRenderId = useRerenderOnKeyChange(columnTypes);
1520
1576
  const columnsRenderId = useRerenderOnKeyChange(columns);
1521
1577
  const visibilityRenderId = useRerenderOnKeyChange(columnVisibility);
1522
1578
  const pinningRenderId = useRerenderOnKeyChange(columnPinning);
@@ -1542,6 +1598,7 @@ var useComputedVisibleColumns = ({
1542
1598
  columnMinWidth,
1543
1599
  columnMaxWidth,
1544
1600
  columnDefaultWidth,
1601
+ viewportReservedWidth,
1545
1602
  sortable,
1546
1603
  sortInfo,
1547
1604
  setSortInfo,
@@ -1551,6 +1608,8 @@ var useComputedVisibleColumns = ({
1551
1608
  draggableColumns,
1552
1609
  columnOrder,
1553
1610
  columnPinning,
1611
+ columnSizing,
1612
+ columnTypes,
1554
1613
  columnVisibility,
1555
1614
  columnVisibilityAssumeVisible: columnVisibilityAssumeVisible != null ? columnVisibilityAssumeVisible : true
1556
1615
  });
@@ -1572,7 +1631,9 @@ var useComputedVisibleColumns = ({
1572
1631
  columnPinning,
1573
1632
  columnsRenderId,
1574
1633
  visibilityRenderId,
1575
- pinningRenderId
1634
+ columnsSizingRenderId,
1635
+ pinningRenderId,
1636
+ columnTypesRenderId
1576
1637
  ]);
1577
1638
  const result = {
1578
1639
  columns,
@@ -1600,35 +1661,8 @@ var sortAscending = (a, b) => a - b;
1600
1661
  // src/components/InfiniteTable/hooks/useComputed.ts
1601
1662
  var import_react19 = __toModule(require("react"));
1602
1663
 
1603
- // src/components/InfiniteTable/hooks/useColumnAggregations.ts
1604
- var import_react12 = __toModule(require("react"));
1605
-
1606
- // src/components/DataSource/publicHooks/useDataSourceActions.ts
1607
- var React3 = __toModule(require("react"));
1608
-
1609
- // src/components/DataSource/DataSourceContext.ts
1610
- var React2 = __toModule(require("react"));
1611
- var DSContext;
1612
- function getDataSourceContext() {
1613
- if (DSContext) {
1614
- return DSContext;
1615
- }
1616
- return DSContext = React2.createContext({
1617
- getState: () => null,
1618
- componentState: null,
1619
- componentActions: null
1620
- });
1621
- }
1622
-
1623
- // src/components/DataSource/publicHooks/useDataSourceActions.ts
1624
- function useDataSourceActions() {
1625
- const DataSourceContext = getDataSourceContext();
1626
- const contextValue = React3.useContext(DataSourceContext);
1627
- return contextValue.componentActions;
1628
- }
1629
-
1630
1664
  // src/components/hooks/useComponentState.tsx
1631
- var React4 = __toModule(require("react"));
1665
+ var React2 = __toModule(require("react"));
1632
1666
  var import_react11 = __toModule(require("react"));
1633
1667
 
1634
1668
  // src/utils/proxyFnCall.ts
@@ -1706,7 +1740,7 @@ function getComponentStateContext() {
1706
1740
  }
1707
1741
  return ComponentContext = (0, import_react11.createContext)(null);
1708
1742
  }
1709
- function getReducerActions(dispatch, getState, getProps, propsToForward, allowedControlledPropOverrides) {
1743
+ function getReducerGeneratedActions(dispatch, getState, getProps, propsToForward, allowedControlledPropOverrides, interceptedActions) {
1710
1744
  const state = getState();
1711
1745
  return Object.keys(state).reduce((actions, stateKey) => {
1712
1746
  const key = stateKey;
@@ -1718,6 +1752,9 @@ function getReducerActions(dispatch, getState, getProps, propsToForward, allowed
1718
1752
  return;
1719
1753
  }
1720
1754
  notifyChange(props, stateKey, value);
1755
+ if (interceptedActions && typeof interceptedActions[key] === "function") {
1756
+ interceptedActions[key](value, { actions, state: state2 });
1757
+ }
1721
1758
  const forwardFn = propsToForward[key];
1722
1759
  if (typeof forwardFn === "function") {
1723
1760
  value = forwardFn(value);
@@ -1755,7 +1792,7 @@ function forwardProps2(propsToForward, props) {
1755
1792
  return mappedState;
1756
1793
  }
1757
1794
  function getComponentStateRoot(config) {
1758
- return React4.memo(function ComponentStateRoot(props) {
1795
+ return React2.memo(function ComponentStateRoot(props) {
1759
1796
  var _a, _b;
1760
1797
  const propsToStateSetRef = (0, import_react11.useRef)(new Set());
1761
1798
  const propsToForward = (0, import_react11.useMemo)(() => config.forwardProps ? config.forwardProps() : {}, []);
@@ -1830,7 +1867,7 @@ function getComponentStateRoot(config) {
1830
1867
  const getComponentState = useLatest(state);
1831
1868
  const { allowedControlledPropOverrides } = config;
1832
1869
  const actions = (0, import_react11.useMemo)(() => {
1833
- const generatedActions = getReducerActions(dispatch, getComponentState, getProps, propsToForward, allowedControlledPropOverrides);
1870
+ const generatedActions = getReducerGeneratedActions(dispatch, getComponentState, getProps, propsToForward, allowedControlledPropOverrides, config.interceptActions);
1834
1871
  return generatedActions;
1835
1872
  }, [
1836
1873
  dispatch,
@@ -1860,7 +1897,7 @@ function getComponentStateRoot(config) {
1860
1897
  if (oldValue === newValue) {
1861
1898
  continue;
1862
1899
  }
1863
- if (isControlled(key, props)) {
1900
+ if (isControlled(key, props) || isControlled(key, prevProps)) {
1864
1901
  if (propsToForward.hasOwnProperty(k)) {
1865
1902
  let valueToSet = newValue;
1866
1903
  const forwardFn = propsToForward[k];
@@ -1890,61 +1927,47 @@ function getComponentStateRoot(config) {
1890
1927
  });
1891
1928
  }
1892
1929
  });
1893
- return /* @__PURE__ */ React4.createElement(Context.Provider, {
1930
+ return /* @__PURE__ */ React2.createElement(Context.Provider, {
1894
1931
  value: contextValue
1895
1932
  }, props.children);
1896
1933
  });
1897
1934
  }
1898
1935
  function useComponentState() {
1899
1936
  const Context = getComponentStateContext();
1900
- return React4.useContext(Context);
1937
+ return React2.useContext(Context);
1901
1938
  }
1902
1939
 
1903
- // src/components/InfiniteTable/hooks/useColumnAggregations.ts
1904
- function useColumnAggregations() {
1905
- const {
1906
- componentState: { columnAggregations },
1907
- getComponentState
1908
- } = useComponentState();
1909
- const dataSourceActions = useDataSourceActions();
1910
- (0, import_react12.useEffect)(() => {
1911
- function updateDataSourceAggregations() {
1912
- const reducers = [];
1913
- const componentState = getComponentState();
1914
- columnAggregations.forEach((aggregator, key) => {
1915
- var _a;
1916
- const colField = (_a = componentState.computedColumns.get(key)) == null ? void 0 : _a.field;
1917
- const newAggregator = __spreadValues({
1918
- getter: (data) => colField ? data[colField] : data
1919
- }, aggregator);
1920
- reducers.push(newAggregator);
1921
- });
1922
- dataSourceActions.aggregationReducers = reducers;
1923
- }
1924
- updateDataSourceAggregations();
1925
- return interceptMap(columnAggregations, {
1926
- clear: updateDataSourceAggregations,
1927
- delete: updateDataSourceAggregations,
1928
- set: updateDataSourceAggregations
1929
- });
1930
- }, [columnAggregations]);
1940
+ // src/components/DataSource/publicHooks/useDataSource.ts
1941
+ var React4 = __toModule(require("react"));
1942
+
1943
+ // src/components/DataSource/DataSourceContext.ts
1944
+ var React3 = __toModule(require("react"));
1945
+ var DSContext;
1946
+ function getDataSourceContext() {
1947
+ if (DSContext) {
1948
+ return DSContext;
1949
+ }
1950
+ return DSContext = React3.createContext({
1951
+ getState: () => null,
1952
+ componentState: null,
1953
+ componentActions: null
1954
+ });
1931
1955
  }
1932
1956
 
1933
1957
  // src/components/DataSource/publicHooks/useDataSource.ts
1934
- var React5 = __toModule(require("react"));
1935
1958
  function useDataSource() {
1936
1959
  const DataSourceContext = getDataSourceContext();
1937
- const contextValue = React5.useContext(DataSourceContext);
1960
+ const contextValue = React4.useContext(DataSourceContext);
1938
1961
  return contextValue.componentState;
1939
1962
  }
1940
1963
  function useDataSourceContextValue() {
1941
1964
  const DataSourceContext = getDataSourceContext();
1942
- const contextValue = React5.useContext(DataSourceContext);
1965
+ const contextValue = React4.useContext(DataSourceContext);
1943
1966
  return contextValue;
1944
1967
  }
1945
1968
 
1946
1969
  // src/components/InfiniteTable/hooks/useColumnGroups.ts
1947
- var import_react13 = __toModule(require("react"));
1970
+ var import_react12 = __toModule(require("react"));
1948
1971
  function useColumnGroups() {
1949
1972
  const {
1950
1973
  componentState: {
@@ -1954,7 +1977,7 @@ function useColumnGroups() {
1954
1977
  componentActions,
1955
1978
  getComponentState
1956
1979
  } = useComponentState();
1957
- (0, import_react13.useEffect)(() => {
1980
+ (0, import_react12.useEffect)(() => {
1958
1981
  const recompute = () => {
1959
1982
  componentActions.columnGroupsDepthsMap = computeColumnGroupsDepths(computedColumnGroups);
1960
1983
  };
@@ -1965,7 +1988,7 @@ function useColumnGroups() {
1965
1988
  set: update
1966
1989
  });
1967
1990
  }, [computedColumnGroups]);
1968
- (0, import_react13.useEffect)(() => {
1991
+ (0, import_react12.useEffect)(() => {
1969
1992
  return interceptMap(collapsedColumnGroups, {
1970
1993
  set: (key, visibleCol) => {
1971
1994
  const colIds = key.slice(1);
@@ -2000,38 +2023,25 @@ function useColumnGroups() {
2000
2023
  var import_react18 = __toModule(require("react"));
2001
2024
 
2002
2025
  // src/components/InfiniteTable/state/getComputedPivotColumnsFromDataSourcePivotColumns.tsx
2003
- var React7 = __toModule(require("react"));
2026
+ var React6 = __toModule(require("react"));
2004
2027
 
2005
2028
  // src/utils/join.ts
2006
2029
  var join = (...args) => args.filter((x) => !!`${x}`).join(" ");
2007
2030
 
2008
2031
  // src/components/InfiniteTable/components/icons/ExpanderIcon.tsx
2009
- var React6 = __toModule(require("react"));
2010
- var import_react14 = __toModule(require("react"));
2032
+ var React5 = __toModule(require("react"));
2033
+ var import_react13 = __toModule(require("react"));
2011
2034
 
2012
- // src/components/InfiniteTable/utilities.css.ts
2013
- var alignItems = { center: "_16lm1iw11", stretch: "_16lm1iw12" };
2014
- var cssEllipsisClassName = "_16lm1iw1a _16lm1iw1b _16lm1iw16";
2015
- var cursor = { pointer: "_16lm1iwb" };
2016
- var display = { flex: "_16lm1iwj", block: "_16lm1iwk", inlineBlock: "_16lm1iwl" };
2017
- var fill = { currentColor: "_16lm1iw5", accentColor: "_16lm1iw6" };
2018
- var flex = { "1": "_16lm1iwc", none: "_16lm1iwd" };
2019
- var flexFlow = { column: "_16lm1iwz", row: "_16lm1iw10" };
2020
- var justifyContent = { center: "_16lm1iw13", start: "_16lm1iw14", end: "_16lm1iw15" };
2021
- var left = { "0": "_16lm1iwt", "100%": "_16lm1iwu" };
2022
- var position = { relative: "_16lm1iw1", absolute: "_16lm1iw2", sticky: "_16lm1iw3", fixed: "_16lm1iw4" };
2023
- var top = { "0": "_16lm1iwr", "100%": "_16lm1iws" };
2024
- var transform = { translateZero: "_16lm1iw9", rotate90: "_16lm1iwa" };
2025
- var transformTranslateZero = "_16lm1iw8";
2026
- var userSelect = { none: "_16lm1iwm" };
2027
- var willChange = { transform: "_16lm1iw19" };
2028
- var zIndex = { "1": "_16lm1iwe", "10": "_16lm1iwf", "1000": "_16lm1iwg", "10000": "_16lm1iwh", "100000": "_16lm1iwi" };
2035
+ // src/components/InfiniteTable/components/icons/ExpanderIcon.css.ts
2036
+ var import_createRuntimeFn = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
2037
+ var ExpanderIconCls = "_16lm1iw6 _16lm1iwd _16lm1iwb";
2038
+ var ExpanderIconClsVariants = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "", variantClassNames: { expanded: { true: "_16lm1iwa", false: "_198z9782" } }, defaultVariants: {}, compoundVariants: [] });
2029
2039
 
2030
2040
  // src/components/InfiniteTable/components/icons/ExpanderIcon.tsx
2031
2041
  function ExpanderIcon(props) {
2032
2042
  var _a;
2033
2043
  const { size = 24 } = props;
2034
- const [expanded, setExpanded] = (0, import_react14.useState)((_a = props.expanded) != null ? _a : props.defaultExpanded);
2044
+ const [expanded, setExpanded] = (0, import_react13.useState)((_a = props.expanded) != null ? _a : props.defaultExpanded);
2035
2045
  const onClick = () => {
2036
2046
  var _a2;
2037
2047
  (_a2 = props.onChange) == null ? void 0 : _a2.call(props, !expanded);
@@ -2039,12 +2049,12 @@ function ExpanderIcon(props) {
2039
2049
  setExpanded(!expanded);
2040
2050
  }
2041
2051
  };
2042
- React6.useEffect(() => {
2052
+ React5.useEffect(() => {
2043
2053
  if (isControlled("expanded", props)) {
2044
2054
  setExpanded(props.expanded);
2045
2055
  }
2046
2056
  }, [props.expanded]);
2047
- return /* @__PURE__ */ React6.createElement("svg", {
2057
+ return /* @__PURE__ */ React5.createElement("svg", {
2048
2058
  "data-name": "expander-icon",
2049
2059
  xmlns: "http://www.w3.org/2000/svg",
2050
2060
  height: `${size}px`,
@@ -2052,18 +2062,37 @@ function ExpanderIcon(props) {
2052
2062
  width: `${size}px`,
2053
2063
  style: props.style,
2054
2064
  onClick,
2055
- className: join(props.className, fill.accentColor, flex.none, cursor.pointer, expanded ? fill.accentColor : "", expanded ? transform.rotate90 : "", "InfiniteIcon", "InfiniteIcon-expander", `InfiniteIcon-expander--${expanded ? "expanded" : "collapsed"}`)
2056
- }, /* @__PURE__ */ React6.createElement("path", {
2065
+ className: join(props.className, ExpanderIconCls, ExpanderIconClsVariants({
2066
+ expanded
2067
+ }), "InfiniteIcon", "InfiniteIcon-expander", `InfiniteIcon-expander--${expanded ? "expanded" : "collapsed"}`)
2068
+ }, /* @__PURE__ */ React5.createElement("path", {
2057
2069
  d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"
2058
2070
  }));
2059
2071
  }
2060
2072
 
2061
2073
  // src/components/InfiniteTable/components/InfiniteTableRow/row.css.ts
2062
- var import_createRuntimeFn = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
2074
+ var import_createRuntimeFn2 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
2063
2075
  var GroupRowExpanderCls = "_7pupv0b";
2064
- var RowClsRecipe = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_7pupv00", variantClassNames: { zebra: { false: "_7pupv02", even: "_7pupv03", odd: "_7pupv04" }, groupRow: { true: "_7pupv05", false: "_7pupv06" }, inlineGroupRow: { true: "_7pupv07", false: "_7pupv08" }, showHoverRows: { true: "_7pupv09", false: "_7pupv0a" } }, defaultVariants: {}, compoundVariants: [] });
2076
+ var RowClsRecipe = (0, import_createRuntimeFn2.createRuntimeFn)({ defaultClassName: "_7pupv00", variantClassNames: { zebra: { false: "_7pupv02", even: "_7pupv03", odd: "_7pupv04" }, groupRow: { true: "_7pupv05", false: "_7pupv06" }, inlineGroupRow: { true: "_7pupv07", false: "_7pupv08" }, showHoverRows: { true: "_7pupv09", false: "_7pupv0a" } }, defaultVariants: {}, compoundVariants: [] });
2065
2077
  var RowHoverCls = "_7pupv01";
2066
2078
 
2079
+ // src/components/InfiniteTable/utilities.css.ts
2080
+ var alignItems = { center: "_16lm1iw11", stretch: "_16lm1iw12" };
2081
+ var cssEllipsisClassName = "_16lm1iw1a _16lm1iw1b _16lm1iw16";
2082
+ var cursor = { pointer: "_16lm1iwb" };
2083
+ var display = { flex: "_16lm1iwj", block: "_16lm1iwk", inlineBlock: "_16lm1iwl" };
2084
+ var flex = { "1": "_16lm1iwc", none: "_16lm1iwd" };
2085
+ var flexFlow = { column: "_16lm1iwz", row: "_16lm1iw10" };
2086
+ var justifyContent = { center: "_16lm1iw13", start: "_16lm1iw14", end: "_16lm1iw15" };
2087
+ var left = { "0": "_16lm1iwt", "100%": "_16lm1iwu" };
2088
+ var position = { relative: "_16lm1iw1", absolute: "_16lm1iw2", sticky: "_16lm1iw3", fixed: "_16lm1iw4" };
2089
+ var top = { "0": "_16lm1iwr", "100%": "_16lm1iws" };
2090
+ var transform = { translateZero: "_16lm1iw9", rotate90: "_16lm1iwa" };
2091
+ var transformTranslateZero = "_16lm1iw8";
2092
+ var userSelect = { none: "_16lm1iwm" };
2093
+ var willChange = { transform: "_16lm1iw19" };
2094
+ var zIndex = { "1": "_16lm1iwe", "10": "_16lm1iwf", "1000": "_16lm1iwg", "10000": "_16lm1iwh", "100000": "_16lm1iwi" };
2095
+
2067
2096
  // src/components/InfiniteTable/state/getComputedPivotColumnsFromDataSourcePivotColumns.tsx
2068
2097
  function getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, params) {
2069
2098
  if (!pivotColumns) {
@@ -2073,7 +2102,7 @@ function getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, params)
2073
2102
  pivotColumn,
2074
2103
  pivotRowLabelsColumn,
2075
2104
  pivotBy,
2076
- groupRowsBy,
2105
+ groupBy,
2077
2106
  pivotTotalColumnPosition,
2078
2107
  toggleGroupRow
2079
2108
  } = params;
@@ -2090,7 +2119,7 @@ function getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, params)
2090
2119
  column = __spreadValues(__spreadValues({}, column), pivotColumn({
2091
2120
  column,
2092
2121
  pivotBy,
2093
- groupRowsBy
2122
+ groupBy
2094
2123
  }));
2095
2124
  } else {
2096
2125
  column = __spreadValues(__spreadValues({}, column), pivotColumn);
@@ -2102,7 +2131,7 @@ function getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, params)
2102
2131
  column = __spreadValues(__spreadValues({}, column), pivotRowLabelsColumn({
2103
2132
  column,
2104
2133
  pivotBy,
2105
- groupRowsBy
2134
+ groupBy
2106
2135
  }));
2107
2136
  } else {
2108
2137
  column = __spreadValues(__spreadValues({}, column), pivotRowLabelsColumn);
@@ -2111,19 +2140,19 @@ function getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, params)
2111
2140
  if (!column.render) {
2112
2141
  column.render = (renderOptions) => {
2113
2142
  var _a;
2114
- let { value, rowInfo, column: column2, groupRowsBy: groupRowsBy2 } = renderOptions;
2143
+ let { value, rowInfo, column: column2, groupBy: groupBy2 } = renderOptions;
2115
2144
  if (column2.renderValue) {
2116
2145
  value = column2.renderValue(renderOptions);
2117
2146
  }
2118
- const showExpanderIcon = (((_a = rowInfo.groupKeys) == null ? void 0 : _a.length) || 0) < groupRowsBy2.length;
2119
- return /* @__PURE__ */ React7.createElement("div", {
2147
+ const showExpanderIcon = (((_a = rowInfo.groupKeys) == null ? void 0 : _a.length) || 0) < groupBy2.length;
2148
+ return /* @__PURE__ */ React6.createElement("div", {
2120
2149
  className: join(display.flex, alignItems.center, GroupRowExpanderCls)
2121
- }, showExpanderIcon ? /* @__PURE__ */ React7.createElement(ExpanderIcon, {
2150
+ }, showExpanderIcon ? /* @__PURE__ */ React6.createElement(ExpanderIcon, {
2122
2151
  expanded: !rowInfo.collapsed,
2123
2152
  onChange: () => {
2124
2153
  toggleGroupRow(rowInfo.groupKeys);
2125
2154
  }
2126
- }) : null, /* @__PURE__ */ React7.createElement("div", {
2155
+ }) : null, /* @__PURE__ */ React6.createElement("div", {
2127
2156
  className: cssEllipsisClassName
2128
2157
  }, value != null ? value : null));
2129
2158
  };
@@ -2140,7 +2169,7 @@ function getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, params)
2140
2169
  }
2141
2170
 
2142
2171
  // src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
2143
- var React8 = __toModule(require("react"));
2172
+ var React7 = __toModule(require("react"));
2144
2173
  function getGroupColumnRender({
2145
2174
  groupIndexForColumn,
2146
2175
  groupRenderStrategy,
@@ -2173,14 +2202,14 @@ function getGroupColumnRender({
2173
2202
  return null;
2174
2203
  }
2175
2204
  }
2176
- return /* @__PURE__ */ React8.createElement("div", {
2205
+ return /* @__PURE__ */ React7.createElement("div", {
2177
2206
  className: join(display.flex, alignItems.center)
2178
- }, /* @__PURE__ */ React8.createElement(ExpanderIcon, {
2207
+ }, /* @__PURE__ */ React7.createElement(ExpanderIcon, {
2179
2208
  expanded: !collapsed,
2180
2209
  onChange: () => {
2181
2210
  toggleGroupRow(groupKeys);
2182
2211
  }
2183
- }), /* @__PURE__ */ React8.createElement("div", {
2212
+ }), /* @__PURE__ */ React7.createElement("div", {
2184
2213
  className: cssEllipsisClassName
2185
2214
  }, value != null ? value : null));
2186
2215
  };
@@ -2213,7 +2242,7 @@ function getColumnForGroupBy(options, toggleGroupRow, groupColumnFromProps) {
2213
2242
  function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
2214
2243
  let generatedGroupColumn = {
2215
2244
  header: `Group`,
2216
- groupByField: options.groupRowsBy.map((g) => g.field),
2245
+ groupByField: options.groupBy.map((g) => g.field),
2217
2246
  sortable: false,
2218
2247
  render: (renderOptions) => {
2219
2248
  let { value, rowInfo, column } = renderOptions;
@@ -2223,14 +2252,14 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
2223
2252
  if (column.renderValue) {
2224
2253
  value = column.renderValue(renderOptions);
2225
2254
  }
2226
- return /* @__PURE__ */ React8.createElement("div", {
2255
+ return /* @__PURE__ */ React7.createElement("div", {
2227
2256
  className: join(display.flex, alignItems.center, GroupRowExpanderCls)
2228
- }, /* @__PURE__ */ React8.createElement(ExpanderIcon, {
2257
+ }, /* @__PURE__ */ React7.createElement(ExpanderIcon, {
2229
2258
  expanded: !rowInfo.collapsed,
2230
2259
  onChange: () => {
2231
2260
  toggleGroupRow(rowInfo.groupKeys);
2232
2261
  }
2233
- }), /* @__PURE__ */ React8.createElement("div", {
2262
+ }), /* @__PURE__ */ React7.createElement("div", {
2234
2263
  className: cssEllipsisClassName
2235
2264
  }, value != null ? value : null));
2236
2265
  }
@@ -2249,64 +2278,233 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
2249
2278
  var import_react17 = __toModule(require("react"));
2250
2279
 
2251
2280
  // src/components/DataSource/index.tsx
2252
- var React9 = __toModule(require("react"));
2281
+ var React8 = __toModule(require("react"));
2253
2282
 
2254
- // src/components/DataSource/privateHooks/useLoadData.ts
2255
- var import_react15 = __toModule(require("react"));
2283
+ // src/utils/multisort/sortTypes.ts
2284
+ var numberComparator = function(first, second) {
2285
+ return first - second;
2286
+ };
2287
+ var stringComparator = function(first, second) {
2288
+ first = `${first}`;
2289
+ second = `${second}`;
2290
+ return first.localeCompare(second);
2291
+ };
2292
+ var sortTypes = {
2293
+ number: numberComparator,
2294
+ string: stringComparator
2295
+ };
2296
+ var sortTypes_default = sortTypes;
2256
2297
 
2257
- // src/components/DataSource/privateHooks/buildDataSourceDataInfo.ts
2258
- function buildDataSourceDataInfo(dataParam) {
2259
- let dataArray = [];
2260
- if (Array.isArray(dataParam.data)) {
2261
- dataArray = dataParam.data;
2262
- } else {
2263
- dataArray = dataParam;
2298
+ // src/utils/multisort/index.ts
2299
+ var multisort = (sortInfo, array, get) => {
2300
+ array.sort(getMultisortFunction(sortInfo, get));
2301
+ return array;
2302
+ };
2303
+ multisort.knownTypes = sortTypes_default;
2304
+ var getSingleSortFunction = (info) => {
2305
+ if (!info) {
2306
+ return;
2264
2307
  }
2265
- return {
2266
- originalDataArray: dataArray
2308
+ const field = info.field;
2309
+ var dir = info.dir < 0 ? -1 : info.dir > 0 ? 1 : 0;
2310
+ if (!dir) {
2311
+ return;
2312
+ }
2313
+ let fn = info.fn;
2314
+ if (!fn && info.type) {
2315
+ fn = multisort.knownTypes[info.type];
2316
+ if (!fn) {
2317
+ console.warn(`Unknown sort type "${info.type}" - please pass one of ${Object.keys(multisort.knownTypes).join(", ")}`);
2318
+ }
2319
+ }
2320
+ if (!fn) {
2321
+ fn = sortTypes_default.string;
2322
+ }
2323
+ return (first, second) => {
2324
+ const a = field ? first[field] : first;
2325
+ const b = field ? second[field] : second;
2326
+ return dir * fn(a, b);
2267
2327
  };
2268
- }
2269
-
2270
- // src/components/DataSource/privateHooks/loadDataAsync.ts
2271
- function loadDataAsync(data) {
2272
- return __async(this, null, function* () {
2273
- if (typeof data === "function") {
2274
- data = data();
2328
+ };
2329
+ var getSortFunctions = (sortInfo) => {
2330
+ return sortInfo.map(getSingleSortFunction).filter((fn) => fn instanceof Function);
2331
+ };
2332
+ var getMultisortFunction = (sortInfo, get) => {
2333
+ const fns = getSortFunctions(sortInfo);
2334
+ return (first, second) => {
2335
+ if (get) {
2336
+ first = get(first);
2337
+ second = get(second);
2275
2338
  }
2276
- return buildDataSourceDataInfo(yield data);
2277
- });
2339
+ let result = 0;
2340
+ let i = 0;
2341
+ let fn;
2342
+ const len = fns.length;
2343
+ for (; i < len; i++) {
2344
+ fn = fns[i];
2345
+ if (!fn) {
2346
+ continue;
2347
+ }
2348
+ result = fn(first, second);
2349
+ if (result !== 0) {
2350
+ return result;
2351
+ }
2352
+ }
2353
+ return result;
2354
+ };
2355
+ };
2356
+
2357
+ // src/components/DataSource/privateHooks/useLoadData.ts
2358
+ var import_react15 = __toModule(require("react"));
2359
+
2360
+ // src/components/hooks/useEffectWithChanges.ts
2361
+ var import_react14 = __toModule(require("react"));
2362
+ function useEffectWithChanges(fn, deps) {
2363
+ const prevRef = (0, import_react14.useRef)({});
2364
+ const oldValuesRef = (0, import_react14.useRef)({});
2365
+ const oldValues = oldValuesRef.current;
2366
+ const changesRef = (0, import_react14.useRef)({});
2367
+ const changes = changesRef.current;
2368
+ const useEffectDeps = [];
2369
+ for (let k in deps) {
2370
+ if (deps.hasOwnProperty(k)) {
2371
+ if (deps[k] !== prevRef.current[k]) {
2372
+ changes[k] = deps[k];
2373
+ oldValues[k] = prevRef.current[k];
2374
+ }
2375
+ useEffectDeps.push(deps[k]);
2376
+ }
2377
+ }
2378
+ prevRef.current = deps;
2379
+ (0, import_react14.useEffect)(() => {
2380
+ const changes2 = changesRef.current;
2381
+ const result = fn(changes2, oldValues);
2382
+ changesRef.current = {};
2383
+ oldValuesRef.current = {};
2384
+ return result;
2385
+ }, useEffectDeps);
2278
2386
  }
2279
2387
 
2280
2388
  // src/components/DataSource/privateHooks/useLoadData.ts
2281
- function buildDataSourceInfo(data) {
2282
- return { originalDataArray: data };
2389
+ function buildDataSourceDataParams(componentState) {
2390
+ var _a, _b;
2391
+ const sortInfo = componentState.multiSort ? componentState.sortInfo : (_b = (_a = componentState.sortInfo) == null ? void 0 : _a[0]) != null ? _b : null;
2392
+ const dataSourceParams = {
2393
+ originalDataArray: componentState.originalDataArray,
2394
+ sortInfo,
2395
+ groupBy: componentState.groupBy,
2396
+ pivotBy: componentState.pivotBy
2397
+ };
2398
+ if (componentState.livePagination !== void 0) {
2399
+ dataSourceParams.livePaginationCursor = componentState.livePaginationCursor;
2400
+ }
2401
+ return dataSourceParams;
2402
+ }
2403
+ function notifyDataParamsChanged(componentState, actions) {
2404
+ var _a;
2405
+ if (typeof componentState.data === "function") {
2406
+ loadData(componentState.data, componentState, actions);
2407
+ }
2408
+ const dataParams = buildDataSourceDataParams(componentState);
2409
+ (_a = componentState.onDataParamsChange) == null ? void 0 : _a.call(componentState, dataParams);
2410
+ }
2411
+ function loadData(data, componentState, actions) {
2412
+ const dataParams = buildDataSourceDataParams(componentState);
2413
+ if (typeof data === "function") {
2414
+ data = data(dataParams);
2415
+ }
2416
+ const dataIsPromise = typeof data === "object" && typeof data.then === "function";
2417
+ if (dataIsPromise) {
2418
+ actions.loading = true;
2419
+ }
2420
+ Promise.resolve(data).then((dataParam) => {
2421
+ let dataArray = [];
2422
+ if (Array.isArray(dataParam.data)) {
2423
+ const remoteData = dataParam;
2424
+ dataArray = remoteData.data;
2425
+ if (remoteData.livePaginationCursor !== void 0) {
2426
+ actions.livePaginationCursor = remoteData.livePaginationCursor;
2427
+ }
2428
+ } else {
2429
+ dataArray = dataParam;
2430
+ }
2431
+ actions.originalDataArray = dataArray;
2432
+ if (dataIsPromise) {
2433
+ actions.loading = false;
2434
+ }
2435
+ });
2283
2436
  }
2284
2437
  function useLoadData() {
2285
2438
  const {
2439
+ getComponentState,
2286
2440
  componentActions: actions,
2287
2441
  componentState: { data }
2288
2442
  } = useComponentState();
2289
- const loadData = (data2) => {
2290
- let dataSourceInfo = {
2291
- originalDataArray: []
2292
- };
2293
- if (typeof data2 === "function") {
2294
- data2 = data2();
2295
- }
2296
- if (Array.isArray(data2)) {
2297
- dataSourceInfo = buildDataSourceInfo(data2);
2298
- actions.originalDataArray = dataSourceInfo.originalDataArray;
2299
- } else {
2300
- actions.loading = true;
2301
- loadDataAsync(data2).then((dataSourceInfo2) => {
2302
- actions.originalDataArray = dataSourceInfo2.originalDataArray;
2303
- actions.loading = false;
2304
- });
2305
- }
2306
- };
2307
2443
  (0, import_react15.useLayoutEffect)(() => {
2308
- loadData(data);
2444
+ loadData(data, getComponentState(), actions);
2309
2445
  }, [data]);
2446
+ useLivePagination();
2447
+ }
2448
+ function useLivePagination() {
2449
+ const {
2450
+ getComponentState,
2451
+ componentActions: actions,
2452
+ componentState
2453
+ } = useComponentState();
2454
+ const {
2455
+ notifyScrollbarsChange,
2456
+ sortInfo,
2457
+ groupBy,
2458
+ pivotBy,
2459
+ livePaginationCursor,
2460
+ scrollBottomId
2461
+ } = componentState;
2462
+ const [scrollbars, setScrollbars] = (0, import_react15.useState)({
2463
+ vertical: false,
2464
+ horizontal: false
2465
+ });
2466
+ const scrollbarsRef = (0, import_react15.useRef)(scrollbars);
2467
+ (0, import_react15.useEffect)(() => {
2468
+ notifyScrollbarsChange.onChange((scrollbars2) => {
2469
+ if (!scrollbars2) {
2470
+ return;
2471
+ }
2472
+ scrollbarsRef.current = scrollbars2;
2473
+ setScrollbars(scrollbars2);
2474
+ });
2475
+ return () => notifyScrollbarsChange.destroy();
2476
+ }, [notifyScrollbarsChange]);
2477
+ const [cursorId, updateCursorId] = (0, import_react15.useState)(void 0);
2478
+ (0, import_react15.useEffect)(() => {
2479
+ const frameId = requestAnimationFrame(() => {
2480
+ var _a;
2481
+ if (!((_a = scrollbarsRef.current) == null ? void 0 : _a.vertical)) {
2482
+ updateCursorId(livePaginationCursor);
2483
+ }
2484
+ });
2485
+ return () => cancelAnimationFrame(frameId);
2486
+ }, [livePaginationCursor]);
2487
+ (0, import_react15.useEffect)(() => {
2488
+ const { livePaginationCursor: livePaginationCursor2, livePagination } = getComponentState();
2489
+ if (!scrollbars.vertical && livePagination) {
2490
+ updateCursorId(livePaginationCursor2);
2491
+ }
2492
+ }, [scrollbars.vertical]);
2493
+ (0, import_react15.useEffect)(() => {
2494
+ updateCursorId(scrollBottomId);
2495
+ }, [scrollBottomId]);
2496
+ const depsObject = {
2497
+ sortInfo,
2498
+ groupBy,
2499
+ pivotBy,
2500
+ cursorId
2501
+ };
2502
+ useEffectWithChanges(() => {
2503
+ if (cursorId === void 0) {
2504
+ return;
2505
+ }
2506
+ notifyDataParamsChanged(getComponentState(), actions);
2507
+ }, depsObject);
2310
2508
  }
2311
2509
 
2312
2510
  // src/components/DataSource/state/normalizeSortInfo.ts
@@ -2360,9 +2558,9 @@ var DeepMap = class {
2360
2558
  if (!pair) {
2361
2559
  return;
2362
2560
  }
2363
- const { map } = pair;
2561
+ const { map: map2 } = pair;
2364
2562
  const keys = [...parentKeys, key];
2365
- const next = map ? () => this.visitWithNext(keys, fn, map) : void 0;
2563
+ const next = map2 ? () => this.visitWithNext(keys, fn, map2) : void 0;
2366
2564
  if (pair.hasOwnProperty("value")) {
2367
2565
  fn(pair.value, keys, i, next);
2368
2566
  i++;
@@ -2378,6 +2576,13 @@ var DeepMap = class {
2378
2576
  });
2379
2577
  }
2380
2578
  }
2579
+ static clone(map2) {
2580
+ const clone = new DeepMap();
2581
+ map2.visit((pair, keys) => {
2582
+ clone.set(keys, pair.value);
2583
+ });
2584
+ return clone;
2585
+ }
2381
2586
  set(keys, value) {
2382
2587
  let currentMap = this.map;
2383
2588
  if (!keys.length) {
@@ -2428,14 +2633,14 @@ var DeepMap = class {
2428
2633
  return this.length;
2429
2634
  }
2430
2635
  clear() {
2431
- const clearMap = (map) => {
2432
- map.forEach((value, _key) => {
2433
- const { map: map2 } = value;
2434
- if (map2) {
2435
- clearMap(map2);
2636
+ const clearMap = (map2) => {
2637
+ map2.forEach((value, _key) => {
2638
+ const { map: map3 } = value;
2639
+ if (map3) {
2640
+ clearMap(map3);
2436
2641
  }
2437
2642
  });
2438
- map.clear();
2643
+ map2.clear();
2439
2644
  };
2440
2645
  clearMap(this.map);
2441
2646
  this.length = 0;
@@ -2480,9 +2685,9 @@ var DeepMap = class {
2480
2685
  }
2481
2686
  }
2482
2687
  while (maps.length) {
2483
- let map = maps.pop();
2688
+ let map2 = maps.pop();
2484
2689
  let key = keys.pop();
2485
- if (key && (map == null ? void 0 : map.size) === 0) {
2690
+ if (key && (map2 == null ? void 0 : map2.size) === 0) {
2486
2691
  let parentMap = maps[maps.length - 1];
2487
2692
  let pair = parentMap == null ? void 0 : parentMap.get(key);
2488
2693
  if (pair) {
@@ -2521,12 +2726,12 @@ var DeepMap = class {
2521
2726
  if (!pair) {
2522
2727
  return;
2523
2728
  }
2524
- const { map } = pair;
2729
+ const { map: map2 } = pair;
2525
2730
  const keys = [...parentKeys, key];
2526
2731
  const next = once(() => {
2527
- if (map) {
2528
- map.forEach((_, k) => {
2529
- this.visitKey(k, map, keys, fn);
2732
+ if (map2) {
2733
+ map2.forEach((_, k) => {
2734
+ this.visitKey(k, map2, keys, fn);
2530
2735
  });
2531
2736
  }
2532
2737
  });
@@ -2692,14 +2897,69 @@ var GroupRowsState = class {
2692
2897
  }
2693
2898
  };
2694
2899
 
2900
+ // src/utils/shallowEqualObjects.ts
2901
+ function shallowEqualObjects(objA, objB) {
2902
+ if (objA === objB) {
2903
+ return true;
2904
+ }
2905
+ if (!objA || !objB) {
2906
+ return false;
2907
+ }
2908
+ var aKeys = Object.keys(objA);
2909
+ var bKeys = Object.keys(objB);
2910
+ var len = aKeys.length;
2911
+ if (bKeys.length !== len) {
2912
+ return false;
2913
+ }
2914
+ for (var i = 0; i < len; i++) {
2915
+ var key = aKeys[i];
2916
+ if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) {
2917
+ return false;
2918
+ }
2919
+ }
2920
+ return true;
2921
+ }
2922
+
2923
+ // src/components/utils/discardCallsWithEqualArg.ts
2924
+ var map = new WeakMap();
2925
+ var getCompareDefault = (a) => a;
2926
+ function discardCallsWithEqualArg(fn, timeframe = 50, getCompareObject2) {
2927
+ map.set(fn, {
2928
+ lastCallTime: 0,
2929
+ lastCallArg: null
2930
+ });
2931
+ const getCompare = getCompareObject2 != null ? getCompareObject2 : getCompareDefault;
2932
+ return (arg) => {
2933
+ const { lastCallTime, lastCallArg } = map.get(fn) || {
2934
+ lastCallTime: 0,
2935
+ lastCallArg: null
2936
+ };
2937
+ const now = Date.now();
2938
+ const diff = now - lastCallTime;
2939
+ const objectsEqual = shallowEqualObjects(getCompare(lastCallArg), getCompare(arg));
2940
+ if (diff < timeframe && objectsEqual) {
2941
+ return;
2942
+ }
2943
+ map.set(fn, {
2944
+ lastCallTime: now,
2945
+ lastCallArg: arg
2946
+ });
2947
+ fn(arg);
2948
+ };
2949
+ }
2950
+
2695
2951
  // src/components/DataSource/state/getInitialState.ts
2696
2952
  function initSetupState2() {
2697
2953
  const now = Date.now();
2698
2954
  const originalDataArray = [];
2699
2955
  const dataArray = [];
2700
2956
  return {
2957
+ dataParams: void 0,
2958
+ notifyScrollbarsChange: buildSubscriptionCallback(),
2701
2959
  pivotTotalColumnPosition: "end",
2702
2960
  originalDataArray,
2961
+ scrollBottomId: Symbol("scrollBottomId"),
2962
+ showSeparatePivotColumnForSingleAggregation: false,
2703
2963
  pivotColumns: void 0,
2704
2964
  pivotColumnGroups: void 0,
2705
2965
  dataArray,
@@ -2708,7 +2968,6 @@ function initSetupState2() {
2708
2968
  sortedAt: 0,
2709
2969
  reducedAt: now,
2710
2970
  generateGroupRows: true,
2711
- aggregationReducers: void 0,
2712
2971
  groupDeepMap: void 0,
2713
2972
  postSortDataArray: void 0,
2714
2973
  postGroupDataArray: void 0,
@@ -2716,15 +2975,23 @@ function initSetupState2() {
2716
2975
  lastGroupDataArray: void 0
2717
2976
  };
2718
2977
  }
2978
+ function getCompareObject(dataParams) {
2979
+ const obj = __spreadValues({}, dataParams);
2980
+ delete obj.originalDataArray;
2981
+ return obj;
2982
+ }
2719
2983
  var forwardProps3 = () => {
2720
2984
  return {
2721
- remoteCount: 1,
2985
+ onDataParamsChange: (fn) => fn ? discardCallsWithEqualArg(fn, 100, getCompareObject) : void 0,
2722
2986
  data: 1,
2723
2987
  pivotBy: 1,
2724
2988
  primaryKey: 1,
2989
+ livePagination: 1,
2990
+ livePaginationCursor: 1,
2991
+ aggregationReducers: 1,
2725
2992
  loading: (loading) => loading != null ? loading : false,
2726
2993
  sortInfo: (sortInfo) => normalizeSortInfo(sortInfo),
2727
- groupRowsBy: (groupRowsBy) => groupRowsBy != null ? groupRowsBy : [],
2994
+ groupBy: (groupBy) => groupBy != null ? groupBy : [],
2728
2995
  groupRowsState: (groupRowsState) => {
2729
2996
  return groupRowsState || new GroupRowsState({
2730
2997
  expandedRows: true,
@@ -2734,10 +3001,20 @@ var forwardProps3 = () => {
2734
3001
  };
2735
3002
  };
2736
3003
  function mapPropsToState2(params) {
2737
- var _a;
2738
3004
  const { props } = params;
3005
+ const controlledSort = isControlledValue(props.sortInfo);
3006
+ return {
3007
+ controlledSort,
3008
+ multiSort: Array.isArray(controlledSort ? props.sortInfo : props.defaultSortInfo)
3009
+ };
3010
+ }
3011
+ function getInterceptActions() {
2739
3012
  return {
2740
- multiSort: Array.isArray((_a = props.sortInfo) != null ? _a : props.defaultSortInfo)
3013
+ sortInfo: (sortInfo, { actions, state }) => {
3014
+ const dataParams = buildDataSourceDataParams(state);
3015
+ dataParams.sortInfo = sortInfo;
3016
+ actions.dataParams = dataParams;
3017
+ }
2741
3018
  };
2742
3019
  }
2743
3020
 
@@ -2746,19 +3023,28 @@ function DEFAULT_TO_KEY(value) {
2746
3023
  return value;
2747
3024
  }
2748
3025
  function initReducers(reducers) {
2749
- if (!reducers || !reducers.length) {
2750
- return [];
3026
+ if (!reducers || !Object.keys(reducers).length) {
3027
+ return {};
2751
3028
  }
2752
- return reducers.map((reducer) => reducer.initialValue);
3029
+ const result = {};
3030
+ for (let key in reducers)
3031
+ if (reducers.hasOwnProperty(key)) {
3032
+ result[key] = reducers[key].initialValue;
3033
+ }
3034
+ return result;
2753
3035
  }
2754
3036
  function computeReducersFor(data, reducers, reducerResults) {
2755
- if (!reducers || !reducers.length) {
3037
+ var _a, _b;
3038
+ if (!reducers || !Object.keys(reducers).length) {
2756
3039
  return;
2757
3040
  }
2758
- reducers.forEach((reducer, index) => {
2759
- const currentValue = reducerResults[index];
2760
- reducerResults[index] = reducer.reducer(currentValue, reducer.getter(data), data);
2761
- });
3041
+ for (let key in reducers)
3042
+ if (reducers.hasOwnProperty(key)) {
3043
+ const reducer = reducers[key];
3044
+ const currentValue = reducerResults[key];
3045
+ const value = reducer.field ? data[reducer.field] : (_b = (_a = reducer.getter) == null ? void 0 : _a.call(reducer, data)) != null ? _b : null;
3046
+ reducerResults[key] = reducer.reducer(currentValue, value, data);
3047
+ }
2762
3048
  }
2763
3049
  function group(groupParams, data) {
2764
3050
  const {
@@ -2773,7 +3059,7 @@ function group(groupParams, data) {
2773
3059
  let currentGroupKeys = [];
2774
3060
  let currentPivotKeys = [];
2775
3061
  const initialReducerValue = initReducers(reducers);
2776
- const globalReducerResults = [...initialReducerValue];
3062
+ const globalReducerResults = __spreadValues({}, initialReducerValue);
2777
3063
  for (let i = 0, len = data.length; i < len; i++) {
2778
3064
  let item = data[i];
2779
3065
  for (let groupByIndex = 0; groupByIndex < groupByLength; groupByIndex++) {
@@ -2783,7 +3069,7 @@ function group(groupParams, data) {
2783
3069
  if (!deepMap.has(currentGroupKeys)) {
2784
3070
  const deepMapGroupValue = {
2785
3071
  items: [],
2786
- reducerResults: [...initialReducerValue]
3072
+ reducerResults: __spreadValues({}, initialReducerValue)
2787
3073
  };
2788
3074
  if (pivot) {
2789
3075
  deepMapGroupValue.pivotDeepMap = new DeepMap();
@@ -2807,7 +3093,7 @@ function group(groupParams, data) {
2807
3093
  if (!pivotDeepMap.has(currentPivotKeys)) {
2808
3094
  topLevelPivotColumns.set(currentPivotKeys, true);
2809
3095
  pivotDeepMap == null ? void 0 : pivotDeepMap.set(currentPivotKeys, {
2810
- reducerResults: [...initialReducerValue],
3096
+ reducerResults: __spreadValues({}, initialReducerValue),
2811
3097
  items: []
2812
3098
  });
2813
3099
  }
@@ -2869,11 +3155,23 @@ function flatten(groupResult) {
2869
3155
  return result;
2870
3156
  }
2871
3157
  function getEnhancedGroupData(options, deepMapValue) {
2872
- const { groupBy, groupKeys, collapsed, parents } = options;
3158
+ const { groupBy, groupKeys, collapsed, parents, reducers } = options;
2873
3159
  const groupNesting = groupKeys.length;
2874
3160
  const { items: groupItems, reducerResults, pivotDeepMap } = deepMapValue;
3161
+ let data = null;
3162
+ if (Object.keys(reducerResults).length > 0) {
3163
+ data = {};
3164
+ for (let key in reducers)
3165
+ if (reducers.hasOwnProperty(key)) {
3166
+ const reducer = reducers[key];
3167
+ const field = reducer.field;
3168
+ if (field) {
3169
+ data[field] = reducerResults[key];
3170
+ }
3171
+ }
3172
+ }
2875
3173
  const enhancedGroupData = {
2876
- data: null,
3174
+ data,
2877
3175
  groupCount: groupItems.length,
2878
3176
  groupData: groupItems,
2879
3177
  groupKeys,
@@ -2895,17 +3193,25 @@ function getEnhancedGroupData(options, deepMapValue) {
2895
3193
  return enhancedGroupData;
2896
3194
  }
2897
3195
  function completeReducers(reducers, reducerResults, items) {
2898
- if (reducers && reducers.length) {
2899
- reducers == null ? void 0 : reducers.forEach((reducer, index) => {
2900
- if (reducer.done) {
2901
- reducerResults[index] = reducer.done(reducerResults[index], items);
3196
+ if (reducers) {
3197
+ for (let key in reducers)
3198
+ if (reducers.hasOwnProperty(key)) {
3199
+ const reducer = reducers[key];
3200
+ if (reducer.done) {
3201
+ reducerResults[key] = reducer.done(reducerResults[key], items);
3202
+ }
2902
3203
  }
2903
- });
2904
3204
  }
2905
3205
  return reducerResults;
2906
3206
  }
2907
3207
  function enhancedFlatten(param) {
2908
- const { groupResult, toPrimaryKey, groupRowsState, generateGroupRows } = param;
3208
+ const {
3209
+ groupResult,
3210
+ toPrimaryKey,
3211
+ groupRowsState,
3212
+ generateGroupRows,
3213
+ reducers = {}
3214
+ } = param;
2909
3215
  const { groupParams, deepMap, pivot } = groupResult;
2910
3216
  const { groupBy } = groupParams;
2911
3217
  const groupByStrings = groupBy.map((g) => g.field);
@@ -2920,6 +3226,7 @@ function enhancedFlatten(param) {
2920
3226
  const enhancedGroupData = getEnhancedGroupData({
2921
3227
  groupBy: groupByStrings,
2922
3228
  parents: Array.from(parents),
3229
+ reducers,
2923
3230
  indexInGroup,
2924
3231
  indexInParentGroups: Array.from(indexInParentGroups),
2925
3232
  indexInAll: result.length,
@@ -2936,121 +3243,81 @@ function enhancedFlatten(param) {
2936
3243
  parent.collapsedGroupsCount += 1;
2937
3244
  });
2938
3245
  }
2939
- indexInParentGroups.push(indexInGroup);
2940
- parents.push(enhancedGroupData);
2941
- if (!collapsed) {
2942
- if (!next) {
2943
- if (!pivot) {
2944
- const startIndex = result.length;
2945
- result.push(...items.map((item, index) => {
2946
- return {
2947
- id: toPrimaryKey(item),
2948
- data: item,
2949
- isGroupRow: false,
2950
- collapsed: false,
2951
- groupKeys,
2952
- parents: Array.from(parents),
2953
- indexInParentGroups: [...indexInParentGroups, index],
2954
- indexInGroup: index,
2955
- indexInAll: startIndex + index,
2956
- groupBy: groupByStrings,
2957
- groupNesting,
2958
- groupCount: enhancedGroupData.groupCount
2959
- };
2960
- }));
2961
- }
2962
- } else {
2963
- next();
2964
- }
2965
- }
2966
- parents.pop();
2967
- indexInParentGroups.pop();
2968
- });
2969
- return {
2970
- data: result
2971
- };
2972
- }
2973
-
2974
- // src/utils/multisort/sortTypes.ts
2975
- var sortTypes = {
2976
- number: function(first, second) {
2977
- return first - second;
2978
- },
2979
- string: function(first, second) {
2980
- first = `${first}`;
2981
- second = `${second}`;
2982
- return first.localeCompare(second);
2983
- }
2984
- };
2985
- var sortTypes_default = sortTypes;
2986
-
2987
- // src/utils/multisort/index.ts
2988
- var multisort = (sortInfo, array, get) => {
2989
- array.sort(getMultisortFunction(sortInfo, get));
2990
- return array;
2991
- };
2992
- multisort.knownTypes = sortTypes_default;
2993
- var getSingleSortFunction = (info) => {
2994
- if (!info) {
2995
- return;
2996
- }
2997
- const field = info.field;
2998
- var dir = info.dir < 0 ? -1 : info.dir > 0 ? 1 : 0;
2999
- if (!dir) {
3000
- return;
3001
- }
3002
- let fn = info.fn;
3003
- if (!fn && info.type) {
3004
- fn = multisort.knownTypes[info.type];
3005
- if (!fn) {
3006
- console.warn(`Unknown sort type "${info.type}" - please pass one of ${Object.keys(multisort.knownTypes).join(", ")}`);
3007
- }
3008
- }
3009
- if (!fn) {
3010
- fn = sortTypes_default.string;
3011
- }
3012
- return (first, second) => {
3013
- const a = field ? first[field] : first;
3014
- const b = field ? second[field] : second;
3015
- return dir * fn(a, b);
3016
- };
3017
- };
3018
- var getSortFunctions = (sortInfo) => {
3019
- return sortInfo.map(getSingleSortFunction).filter((fn) => fn instanceof Function);
3020
- };
3021
- var getMultisortFunction = (sortInfo, get) => {
3022
- const fns = getSortFunctions(sortInfo);
3023
- return (first, second) => {
3024
- if (get) {
3025
- first = get(first);
3026
- second = get(second);
3027
- }
3028
- let result = 0;
3029
- let i = 0;
3030
- let fn;
3031
- const len = fns.length;
3032
- for (; i < len; i++) {
3033
- fn = fns[i];
3034
- if (!fn) {
3035
- continue;
3036
- }
3037
- result = fn(first, second);
3038
- if (result !== 0) {
3039
- return result;
3246
+ indexInParentGroups.push(indexInGroup);
3247
+ parents.push(enhancedGroupData);
3248
+ if (!collapsed) {
3249
+ if (!next) {
3250
+ if (!pivot) {
3251
+ const startIndex = result.length;
3252
+ result.push(...items.map((item, index) => {
3253
+ return {
3254
+ id: toPrimaryKey(item),
3255
+ data: item,
3256
+ isGroupRow: false,
3257
+ collapsed: false,
3258
+ groupKeys,
3259
+ parents: Array.from(parents),
3260
+ indexInParentGroups: [...indexInParentGroups, index],
3261
+ indexInGroup: index,
3262
+ indexInAll: startIndex + index,
3263
+ groupBy: groupByStrings,
3264
+ groupNesting,
3265
+ groupCount: enhancedGroupData.groupCount
3266
+ };
3267
+ }));
3268
+ }
3269
+ } else {
3270
+ next();
3040
3271
  }
3041
3272
  }
3042
- return result;
3273
+ parents.pop();
3274
+ indexInParentGroups.pop();
3275
+ });
3276
+ return {
3277
+ data: result
3043
3278
  };
3044
- };
3279
+ }
3045
3280
 
3046
3281
  // src/utils/groupAndPivot/getPivotColumnsAndColumnGroups.ts
3047
- function getPivotColumnsAndColumnGroups(deepMap, pivotBy, pivotTotalColumnPosition) {
3282
+ function prepareColumn(column) {
3283
+ const { pivotByAtIndex: pivotByForColumn } = column;
3284
+ if (pivotByForColumn.column) {
3285
+ if (typeof pivotByForColumn.column === "function") {
3286
+ Object.assign(column, pivotByForColumn.column({ column }));
3287
+ } else {
3288
+ Object.assign(column, pivotByForColumn.column);
3289
+ }
3290
+ }
3291
+ return column;
3292
+ }
3293
+ function prepareColumnGroup(columnGroup) {
3294
+ const { pivotByAtIndex: pivotByForColumnGroup } = columnGroup;
3295
+ if (pivotByForColumnGroup.columnGroup) {
3296
+ if (typeof pivotByForColumnGroup.columnGroup === "function") {
3297
+ Object.assign(columnGroup, pivotByForColumnGroup.columnGroup({ columnGroup }));
3298
+ } else {
3299
+ Object.assign(columnGroup, pivotByForColumnGroup.columnGroup);
3300
+ }
3301
+ }
3302
+ return columnGroup;
3303
+ }
3304
+ function getPivotColumnsAndColumnGroups({
3305
+ deepMap,
3306
+ pivotBy,
3307
+ pivotTotalColumnPosition,
3308
+ reducers = {},
3309
+ showSeparatePivotColumnForSingleAggregation = false
3310
+ }) {
3048
3311
  const pivotLength = pivotBy.length;
3312
+ const aggregationReducers = Object.keys(reducers).map((key) => {
3313
+ return __spreadProps(__spreadValues({}, reducers[key]), { id: key });
3314
+ });
3049
3315
  const columns = new Map([
3050
3316
  [
3051
3317
  "labels",
3052
3318
  {
3053
3319
  header: "Row labels",
3320
+ pivotBy,
3054
3321
  valueGetter: (params) => {
3055
3322
  var _a;
3056
3323
  const { rowInfo } = params;
@@ -3060,72 +3327,104 @@ function getPivotColumnsAndColumnGroups(deepMap, pivotBy, pivotTotalColumnPositi
3060
3327
  ]
3061
3328
  ]);
3062
3329
  const columnGroups = new Map();
3330
+ const isSingleAggregationColumn = !showSeparatePivotColumnForSingleAggregation && aggregationReducers.length === 1;
3063
3331
  deepMap.visitDepthFirst((_value, keys, _indexInGroup, next) => {
3064
3332
  keys = [...keys];
3065
3333
  if (pivotTotalColumnPosition === "end") {
3066
3334
  next == null ? void 0 : next();
3067
3335
  }
3068
3336
  if (keys.length === pivotLength) {
3069
- const parentKeys = keys.slice(0, -1);
3070
- let columnGroupId = parentKeys.join("/");
3071
3337
  const pivotByForColumn = pivotBy[keys.length - 1];
3072
- let computedPivotColumn = __spreadValues({
3073
- pivotBy,
3074
- pivotColumn: true,
3075
- pivotGroupKeys: keys,
3076
- pivotGroupKeyForColumn: keys[keys.length - 1],
3077
- pivotIndexForColumn: keys.length - 1,
3078
- pivotByForColumn,
3079
- sortable: false,
3080
- columnGroup: parentKeys.length ? `${columnGroupId}` : void 0,
3081
- header: keys[keys.length - 1],
3082
- valueGetter: ({ rowInfo }) => {
3083
- var _a, _b, _c;
3084
- const value = (_c = (_b = (_a = rowInfo.pivotValuesMap) == null ? void 0 : _a.get(keys)) == null ? void 0 : _b.reducerResults[0]) != null ? _c : null;
3085
- return value;
3086
- }
3087
- }, pivotByForColumn.column);
3088
- if (pivotByForColumn.column) {
3089
- if (typeof pivotByForColumn.column === "function") {
3090
- Object.assign(computedPivotColumn, pivotByForColumn.column({ column: computedPivotColumn }));
3091
- } else {
3092
- Object.assign(computedPivotColumn, pivotByForColumn.column);
3093
- }
3094
- }
3095
- columns.set(`${keys.join("/")}`, computedPivotColumn);
3096
- } else {
3097
- const colGroupId = keys.join("/");
3098
3338
  const parentKeys = keys.slice(0, -1);
3099
- columnGroups.set(colGroupId, {
3100
- columnGroup: parentKeys.length ? parentKeys.join("/") : void 0,
3101
- header: keys.join(" >> ")
3102
- });
3103
- if (pivotTotalColumnPosition !== false) {
3104
- const pivotByForColumn = pivotBy[keys.length - 1];
3105
- let computedPivotColumn = __spreadValues({
3106
- columnGroup: parentKeys.length ? parentKeys.join("/") : void 0,
3107
- header: `${keys.join("/")} total `,
3108
- pivotTotalColumn: true,
3339
+ let parentColumnGroupId = parentKeys.join("/");
3340
+ if (!isSingleAggregationColumn) {
3341
+ const columnGroupId = parentColumnGroupId;
3342
+ parentColumnGroupId = keys.join("/");
3343
+ const pivotGroupKey = keys[keys.length - 1];
3344
+ columnGroups.set(parentColumnGroupId, prepareColumnGroup({
3345
+ header: pivotGroupKey,
3346
+ columnGroup: columnGroupId,
3347
+ pivotBy,
3109
3348
  pivotGroupKeys: keys,
3110
- pivotGroupKeyForColumn: keys[keys.length - 1],
3111
- pivotByForColumn,
3112
- pivotIndexForColumn: keys.length - 1,
3349
+ pivotByAtIndex: pivotByForColumn,
3350
+ pivotIndex: keys.length - 1,
3351
+ pivotGroupKey
3352
+ }));
3353
+ }
3354
+ aggregationReducers.forEach((reducer, index) => {
3355
+ const header = isSingleAggregationColumn ? keys[keys.length - 1] : reducer.id;
3356
+ const computedPivotColumn = prepareColumn({
3113
3357
  pivotBy,
3358
+ pivotColumn: true,
3359
+ pivotTotalColumn: false,
3360
+ pivotAggregator: reducer,
3361
+ pivotAggregatorIndex: index,
3362
+ pivotGroupKeys: keys,
3363
+ pivotGroupKey: keys[keys.length - 1],
3364
+ pivotIndex: keys.length - 1,
3365
+ pivotByAtIndex: pivotByForColumn,
3114
3366
  sortable: false,
3367
+ columnGroup: parentColumnGroupId,
3368
+ header,
3115
3369
  valueGetter: ({ rowInfo }) => {
3116
- var _a, _b, _c;
3117
- const value = (_c = (_b = (_a = rowInfo.pivotValuesMap) == null ? void 0 : _a.get(keys)) == null ? void 0 : _b.reducerResults[0]) != null ? _c : null;
3118
- return value;
3119
- }
3120
- }, pivotByForColumn.column);
3121
- if (pivotByForColumn.column) {
3122
- if (typeof pivotByForColumn.column === "function") {
3123
- Object.assign(computedPivotColumn, pivotByForColumn.column({ column: computedPivotColumn }));
3124
- } else {
3125
- Object.assign(computedPivotColumn, pivotByForColumn.column);
3370
+ var _a, _b;
3371
+ return (_b = (_a = rowInfo.pivotValuesMap) == null ? void 0 : _a.get(keys)) == null ? void 0 : _b.reducerResults[reducer.id];
3126
3372
  }
3373
+ });
3374
+ const columnId = `${keys.join("/")}-${reducer.id}`;
3375
+ columns.set(columnId, computedPivotColumn);
3376
+ });
3377
+ } else {
3378
+ const colGroupId = keys.join("/");
3379
+ const parentKeys = keys.slice(0, -1);
3380
+ columnGroups.set(colGroupId, prepareColumnGroup({
3381
+ columnGroup: parentKeys.length ? parentKeys.join("/") : void 0,
3382
+ header: keys[keys.length - 1],
3383
+ pivotBy,
3384
+ pivotGroupKeys: keys,
3385
+ pivotIndex: keys.length - 1,
3386
+ pivotByAtIndex: pivotBy[keys.length - 1],
3387
+ pivotGroupKey: keys[keys.length - 1]
3388
+ }));
3389
+ if (pivotTotalColumnPosition !== false) {
3390
+ const pivotByForColumn = pivotBy[keys.length - 1];
3391
+ let columnGroupId = parentKeys.length ? parentKeys.join("/") : void 0;
3392
+ if (!isSingleAggregationColumn) {
3393
+ let parentGroupForTotalsGroup = columnGroupId;
3394
+ columnGroupId = `total:${keys.join("/")}`;
3395
+ columnGroups.set(columnGroupId, prepareColumnGroup({
3396
+ header: `${keys[keys.length - 1]} total`,
3397
+ columnGroup: parentGroupForTotalsGroup,
3398
+ pivotBy,
3399
+ pivotTotalColumnGroup: true,
3400
+ pivotGroupKeys: keys,
3401
+ pivotIndex: keys.length - 1,
3402
+ pivotByAtIndex: pivotByForColumn,
3403
+ pivotGroupKey: keys[keys.length - 1]
3404
+ }));
3127
3405
  }
3128
- columns.set(`${keys.join("/")}-total`, computedPivotColumn);
3406
+ aggregationReducers.forEach((reducer, index) => {
3407
+ const header = isSingleAggregationColumn ? `${keys[keys.length - 1]} total ` : `${reducer.id} total`;
3408
+ const computedPivotColumn = prepareColumn({
3409
+ columnGroup: columnGroupId,
3410
+ header,
3411
+ pivotAggregator: reducer,
3412
+ pivotAggregatorIndex: index,
3413
+ pivotColumn: true,
3414
+ pivotTotalColumn: true,
3415
+ pivotGroupKeys: keys,
3416
+ pivotGroupKey: keys[keys.length - 1],
3417
+ pivotByAtIndex: pivotByForColumn,
3418
+ pivotIndex: keys.length - 1,
3419
+ pivotBy,
3420
+ sortable: false,
3421
+ valueGetter: ({ rowInfo }) => {
3422
+ var _a, _b;
3423
+ return (_b = (_a = rowInfo.pivotValuesMap) == null ? void 0 : _a.get(keys)) == null ? void 0 : _b.reducerResults[reducer.id];
3424
+ }
3425
+ });
3426
+ columns.set(`total:${keys.join("/")}-${reducer.id}`, computedPivotColumn);
3427
+ });
3129
3428
  }
3130
3429
  }
3131
3430
  if (pivotTotalColumnPosition === "start" || pivotTotalColumnPosition === false) {
@@ -3135,9 +3434,12 @@ function getPivotColumnsAndColumnGroups(deepMap, pivotBy, pivotTotalColumnPositi
3135
3434
  if (columns.size === 1) {
3136
3435
  columns.set("single", {
3137
3436
  header: "Reduced",
3437
+ pivotBy,
3438
+ pivotColumn: true,
3138
3439
  valueGetter: ({ rowInfo }) => {
3139
3440
  var _a;
3140
- return (_a = rowInfo.reducerResults) == null ? void 0 : _a[0];
3441
+ const key = Object.keys(rowInfo.reducerResults || {})[0];
3442
+ return (_a = rowInfo.reducerResults) == null ? void 0 : _a[key];
3141
3443
  }
3142
3444
  });
3143
3445
  }
@@ -3161,29 +3463,37 @@ var haveDepsChanged = (state1, state2, deps) => {
3161
3463
  return false;
3162
3464
  };
3163
3465
  function toRowInfo(data, id, index) {
3164
- return { data, collapsed: true, id, indexInAll: index, indexInGroup: index };
3466
+ return {
3467
+ data,
3468
+ collapsed: true,
3469
+ id,
3470
+ indexInAll: index,
3471
+ indexInGroup: index,
3472
+ isGroupRow: false
3473
+ };
3165
3474
  }
3166
3475
  function concludeReducer(params) {
3167
3476
  var _a;
3168
3477
  const { state, previousState } = params;
3169
3478
  const sortInfo = state.sortInfo;
3170
- const shouldSort = !!(sortInfo == null ? void 0 : sortInfo.length);
3479
+ const shouldSort = !!(sortInfo == null ? void 0 : sortInfo.length) && !state.controlledSort;
3171
3480
  const sortDepsChanged = haveDepsChanged(previousState, state, [
3172
3481
  "originalDataArray",
3173
3482
  "sortInfo"
3174
3483
  ]);
3175
3484
  const shouldSortAgain = shouldSort && (sortDepsChanged || !state.lastSortDataArray);
3176
- const groupBy = state.groupRowsBy;
3485
+ const groupBy = state.groupBy;
3177
3486
  const pivotBy = state.pivotBy;
3178
3487
  const shouldGroup = groupBy.length || pivotBy;
3179
3488
  const groupsDepsChanged = haveDepsChanged(previousState, state, [
3180
3489
  "generateGroupRows",
3181
3490
  "originalDataArray",
3182
- "groupRowsBy",
3491
+ "groupBy",
3183
3492
  "groupRowsState",
3184
3493
  "pivotBy",
3185
3494
  "aggregationReducers",
3186
3495
  "pivotTotalColumnPosition",
3496
+ "showSeparatePivotColumnForSingleAggregation",
3187
3497
  "sortInfo"
3188
3498
  ]);
3189
3499
  const shouldGroupAgain = shouldGroup && (groupsDepsChanged || !state.lastGroupDataArray);
@@ -3209,13 +3519,20 @@ function concludeReducer(params) {
3209
3519
  }, dataArray);
3210
3520
  const flattenResult = enhancedFlatten({
3211
3521
  groupResult,
3522
+ reducers: state.aggregationReducers,
3212
3523
  toPrimaryKey,
3213
3524
  groupRowsState: state.groupRowsState,
3214
3525
  generateGroupRows: state.generateGroupRows
3215
3526
  });
3216
3527
  rowInfoDataArray = flattenResult.data;
3217
3528
  state.groupDeepMap = groupResult.deepMap;
3218
- const pivotGroupsAndCols = pivotBy ? getPivotColumnsAndColumnGroups(groupResult.topLevelPivotColumns, pivotBy, (_a = state.pivotTotalColumnPosition) != null ? _a : "end") : void 0;
3529
+ const pivotGroupsAndCols = pivotBy ? getPivotColumnsAndColumnGroups({
3530
+ deepMap: groupResult.topLevelPivotColumns,
3531
+ pivotBy,
3532
+ pivotTotalColumnPosition: (_a = state.pivotTotalColumnPosition) != null ? _a : "end",
3533
+ reducers: state.aggregationReducers,
3534
+ showSeparatePivotColumnForSingleAggregation: state.showSeparatePivotColumnForSingleAggregation
3535
+ }) : void 0;
3219
3536
  state.pivotColumns = pivotGroupsAndCols == null ? void 0 : pivotGroupsAndCols.columns;
3220
3537
  state.pivotColumnGroups = pivotGroupsAndCols == null ? void 0 : pivotGroupsAndCols.columnGroups;
3221
3538
  } else {
@@ -3237,7 +3554,9 @@ function concludeReducer(params) {
3237
3554
  }
3238
3555
  state.dataArray = rowInfoDataArray;
3239
3556
  state.reducedAt = now;
3240
- globalThis.state = state;
3557
+ if (true) {
3558
+ globalThis.state = state;
3559
+ }
3241
3560
  return state;
3242
3561
  }
3243
3562
 
@@ -3254,13 +3573,14 @@ function DataSourceWithContext(props) {
3254
3573
  if (typeof children === "function") {
3255
3574
  children = children(computedValues);
3256
3575
  }
3257
- return /* @__PURE__ */ React9.createElement(React9.Fragment, null, children);
3576
+ return /* @__PURE__ */ React8.createElement(React8.Fragment, null, children);
3258
3577
  }
3259
3578
  var DataSourceRoot = getComponentStateRoot({
3260
3579
  initSetupState: initSetupState2,
3261
3580
  forwardProps: forwardProps3,
3262
3581
  concludeReducer,
3263
- mapPropsToState: mapPropsToState2
3582
+ mapPropsToState: mapPropsToState2,
3583
+ interceptActions: getInterceptActions()
3264
3584
  });
3265
3585
  function DataSourceCmp({ children }) {
3266
3586
  const DataSourceContext = getDataSourceContext();
@@ -3275,14 +3595,14 @@ function DataSourceCmp({ children }) {
3275
3595
  globalThis.getDataSourceState = getState;
3276
3596
  }
3277
3597
  useLoadData();
3278
- return /* @__PURE__ */ React9.createElement(DataSourceContext.Provider, {
3598
+ return /* @__PURE__ */ React8.createElement(DataSourceContext.Provider, {
3279
3599
  value: contextValue
3280
- }, /* @__PURE__ */ React9.createElement(DataSourceWithContext, {
3600
+ }, /* @__PURE__ */ React8.createElement(DataSourceWithContext, {
3281
3601
  children
3282
3602
  }));
3283
3603
  }
3284
3604
  function DataSource(props) {
3285
- return /* @__PURE__ */ React9.createElement(DataSourceRoot, __spreadValues({}, props), /* @__PURE__ */ React9.createElement(DataSourceCmp, {
3605
+ return /* @__PURE__ */ React8.createElement(DataSourceRoot, __spreadValues({}, props), /* @__PURE__ */ React8.createElement(DataSourceCmp, {
3286
3606
  children: props.children
3287
3607
  }));
3288
3608
  }
@@ -3299,49 +3619,49 @@ function useToggleGroupRow() {
3299
3619
  }
3300
3620
 
3301
3621
  // src/components/InfiniteTable/hooks/useColumnsWhen.ts
3302
- function useGroupRowsMap(groupRowsBy) {
3303
- const groupRowsMap = (0, import_react18.useMemo)(() => {
3304
- return groupRowsBy.reduce((acc, groupBy, index) => {
3305
- acc.set(groupBy.field, {
3306
- groupBy,
3622
+ function useGroupByMap(groupBy) {
3623
+ const groupByMap = (0, import_react18.useMemo)(() => {
3624
+ return groupBy.reduce((acc, groupBy2, index) => {
3625
+ acc.set(groupBy2.field, {
3626
+ groupBy: groupBy2,
3307
3627
  groupIndex: index
3308
3628
  });
3309
3629
  return acc;
3310
3630
  }, new Map());
3311
- }, [groupRowsBy]);
3312
- return groupRowsMap;
3631
+ }, [groupBy]);
3632
+ return groupByMap;
3313
3633
  }
3314
3634
  function useColumnsWhen() {
3315
3635
  const {
3316
- componentState: { groupRowsBy },
3636
+ componentState: { groupBy },
3317
3637
  componentActions: dataSourceActions
3318
3638
  } = useDataSourceContextValue();
3319
3639
  const {
3320
3640
  componentState: { groupRenderStrategy, pivotTotalColumnPosition }
3321
3641
  } = useComponentState();
3322
- const groupRowsMap = useGroupRowsMap(groupRowsBy);
3642
+ const groupByMap = useGroupByMap(groupBy);
3323
3643
  (0, import_react18.useEffect)(() => {
3324
3644
  dataSourceActions.generateGroupRows = groupRenderStrategy !== "inline";
3325
3645
  }, [groupRenderStrategy]);
3326
3646
  (0, import_react18.useEffect)(() => {
3327
3647
  dataSourceActions.pivotTotalColumnPosition = pivotTotalColumnPosition;
3328
3648
  }, [pivotTotalColumnPosition]);
3329
- useColumnsWhenInlineGroupRenderStrategy(groupRowsMap);
3649
+ useColumnsWhenInlineGroupRenderStrategy(groupByMap);
3330
3650
  useColumnsWhenPivoting();
3331
3651
  useColumnsWhenGrouping();
3332
- useHideEmptyGroupColumns(groupRowsMap);
3652
+ useHideEmptyGroupColumns(groupByMap);
3333
3653
  }
3334
- function useColumnsWhenInlineGroupRenderStrategy(groupRowsMap) {
3654
+ function useColumnsWhenInlineGroupRenderStrategy(groupByMap) {
3335
3655
  const toggleGroupRow = useToggleGroupRow();
3336
3656
  const {
3337
3657
  componentActions,
3338
3658
  componentState: { columns, groupRenderStrategy }
3339
3659
  } = useComponentState();
3340
- function computeColumnsWhenInlineGroupRenderStrategy(columns2, groupRowsMap2, groupRenderStrategy2, toggleGroupRow2) {
3660
+ function computeColumnsWhenInlineGroupRenderStrategy(columns2, groupByMap2, groupRenderStrategy2, toggleGroupRow2) {
3341
3661
  const computedColumns = new Map();
3342
3662
  columns2.forEach((column, id) => {
3343
3663
  let base = {};
3344
- const groupByForColumn = groupRowsMap2.get(column.field);
3664
+ const groupByForColumn = groupByMap2.get(column.field);
3345
3665
  if (groupByForColumn && groupRenderStrategy2 === "inline") {
3346
3666
  const { groupIndex } = groupByForColumn;
3347
3667
  const field = groupByForColumn.groupBy.field;
@@ -3388,7 +3708,7 @@ function useColumnsWhenInlineGroupRenderStrategy(groupRowsMap) {
3388
3708
  }
3389
3709
  (0, import_react18.useEffect)(() => {
3390
3710
  const update = () => {
3391
- componentActions.columnsWhenInlineGroupRenderStrategy = computeColumnsWhenInlineGroupRenderStrategy(columns, groupRowsMap, groupRenderStrategy, toggleGroupRow);
3711
+ componentActions.columnsWhenInlineGroupRenderStrategy = computeColumnsWhenInlineGroupRenderStrategy(columns, groupByMap, groupRenderStrategy, toggleGroupRow);
3392
3712
  };
3393
3713
  update();
3394
3714
  return interceptMap(columns, {
@@ -3396,11 +3716,11 @@ function useColumnsWhenInlineGroupRenderStrategy(groupRowsMap) {
3396
3716
  delete: update,
3397
3717
  clear: update
3398
3718
  });
3399
- }, [columns, groupRowsMap, groupRenderStrategy, toggleGroupRow]);
3719
+ }, [columns, groupByMap, groupRenderStrategy, toggleGroupRow]);
3400
3720
  }
3401
3721
  function useColumnsWhenPivoting() {
3402
3722
  const {
3403
- componentState: { groupRowsBy, pivotBy }
3723
+ componentState: { groupBy, pivotBy }
3404
3724
  } = useDataSourceContextValue();
3405
3725
  const {
3406
3726
  componentActions,
@@ -3418,7 +3738,7 @@ function useColumnsWhenPivoting() {
3418
3738
  pivotRowLabelsColumn,
3419
3739
  pivotTotalColumnPosition,
3420
3740
  pivotBy,
3421
- groupRowsBy,
3741
+ groupBy,
3422
3742
  toggleGroupRow
3423
3743
  });
3424
3744
  componentActions.computedPivotColumns = computedPivotColumns;
@@ -3426,7 +3746,7 @@ function useColumnsWhenPivoting() {
3426
3746
  }
3427
3747
  function useColumnsWhenGrouping() {
3428
3748
  const {
3429
- componentState: { groupRowsBy }
3749
+ componentState: { groupBy }
3430
3750
  } = useDataSourceContextValue();
3431
3751
  const {
3432
3752
  componentActions,
@@ -3442,7 +3762,7 @@ function useColumnsWhenGrouping() {
3442
3762
  columns,
3443
3763
  groupColumn,
3444
3764
  groupRenderStrategy,
3445
- groupRowsBy,
3765
+ groupBy,
3446
3766
  pivotColumns,
3447
3767
  toggleGroupRow
3448
3768
  });
@@ -3454,11 +3774,11 @@ function useColumnsWhenGrouping() {
3454
3774
  delete: update,
3455
3775
  clear: update
3456
3776
  });
3457
- }, [groupRowsBy, groupColumn, groupRenderStrategy, pivotColumns]);
3777
+ }, [columns, groupBy, groupColumn, groupRenderStrategy, pivotColumns]);
3458
3778
  }
3459
3779
  function useHideEmptyGroupColumns(groupRowsMap) {
3460
3780
  const {
3461
- componentState: { groupRowsBy, groupRowsState },
3781
+ componentState: { groupBy, groupRowsState },
3462
3782
  getState: getDataSourceState
3463
3783
  } = useDataSourceContextValue();
3464
3784
  const {
@@ -3471,10 +3791,10 @@ function useHideEmptyGroupColumns(groupRowsMap) {
3471
3791
  }
3472
3792
  } = useComponentState();
3473
3793
  (0, import_react18.useEffect)(() => {
3474
- if (groupRenderStrategy === "single-column") {
3794
+ if (groupRenderStrategy !== "multi-column") {
3475
3795
  return;
3476
3796
  }
3477
- const groupsLength = groupRowsBy.length;
3797
+ const groupsLength = groupBy.length;
3478
3798
  let expandedGroupsLevel = 0;
3479
3799
  const { dataArray } = getDataSourceState();
3480
3800
  const len = dataArray.length;
@@ -3490,15 +3810,15 @@ function useHideEmptyGroupColumns(groupRowsMap) {
3490
3810
  let updated = false;
3491
3811
  const columnVisibility = new Map(currentState.columnVisibility);
3492
3812
  const cols = computedColumns;
3493
- groupRowsBy.forEach(({ field }, index) => {
3494
- const colId = groupRenderStrategy === "multi-column" ? `group-by-${field}` : field;
3495
- const col = cols.get(colId);
3813
+ groupBy.forEach(({ field, column: groupColumn }, index) => {
3814
+ const colId = (groupColumn == null ? void 0 : groupColumn.id) || `group-by-${field}`;
3815
+ let col = cols.get(colId);
3496
3816
  if (!col) {
3497
3817
  return;
3498
3818
  }
3499
- const shouldBeHidden = index > expandedGroupsLevel;
3819
+ const shouldBeHidden = index > expandedGroupsLevel && hideEmptyGroupColumns;
3500
3820
  updated = true;
3501
- if (shouldBeHidden && hideEmptyGroupColumns) {
3821
+ if (shouldBeHidden) {
3502
3822
  columnVisibility.set(colId, false);
3503
3823
  } else {
3504
3824
  columnVisibility.delete(colId);
@@ -3511,7 +3831,7 @@ function useHideEmptyGroupColumns(groupRowsMap) {
3511
3831
  getDataSourceState,
3512
3832
  groupRenderStrategy,
3513
3833
  generatedColumns,
3514
- groupRowsBy,
3834
+ groupBy,
3515
3835
  groupRowsMap,
3516
3836
  hideEmptyGroupColumns ? groupRowsState : null,
3517
3837
  hideEmptyGroupColumns
@@ -3520,7 +3840,7 @@ function useHideEmptyGroupColumns(groupRowsMap) {
3520
3840
  function getColumnsWhenGrouping(params) {
3521
3841
  const {
3522
3842
  pivotColumns,
3523
- groupRowsBy,
3843
+ groupBy,
3524
3844
  groupColumn,
3525
3845
  groupRenderStrategy,
3526
3846
  toggleGroupRow,
@@ -3534,21 +3854,23 @@ function getColumnsWhenGrouping(params) {
3534
3854
  }
3535
3855
  const computedColumns = new Map();
3536
3856
  if (groupRenderStrategy === "multi-column") {
3537
- groupRowsBy.forEach((groupByForColumn, groupIndexForColumn, arr) => {
3538
- computedColumns.set(`group-by-${groupByForColumn.field}`, getColumnForGroupBy({
3857
+ groupBy.forEach((groupByForColumn, groupIndexForColumn, arr) => {
3858
+ const generatedGroupColumn = getColumnForGroupBy({
3539
3859
  groupByForColumn,
3540
- groupRowsBy,
3860
+ groupBy,
3541
3861
  groupIndexForColumn,
3542
3862
  groupCount: arr.length,
3543
3863
  groupRenderStrategy
3544
- }, toggleGroupRow, groupColumn));
3864
+ }, toggleGroupRow, groupColumn);
3865
+ computedColumns.set(generatedGroupColumn.id || `group-by-${groupByForColumn.field}`, generatedGroupColumn);
3545
3866
  });
3546
3867
  } else if (groupRenderStrategy === "single-column") {
3547
- computedColumns.set("group-by", getSingleGroupColumn({
3548
- groupCount: groupRowsBy.length,
3549
- groupRowsBy,
3868
+ const singleGroupColumn = getSingleGroupColumn({
3869
+ groupCount: groupBy.length,
3870
+ groupBy,
3550
3871
  groupRenderStrategy
3551
- }, toggleGroupRow, groupColumn));
3872
+ }, toggleGroupRow, groupColumn);
3873
+ computedColumns.set(singleGroupColumn.id || "group-by", singleGroupColumn);
3552
3874
  }
3553
3875
  columns.forEach((col, colId) => {
3554
3876
  computedColumns.set(colId, col);
@@ -3564,7 +3886,15 @@ function useComputed() {
3564
3886
  componentActions: dataSourceActions,
3565
3887
  componentState: dataSourceState
3566
3888
  } = useDataSourceContextValue();
3567
- const { columnOrder, columnVisibility, columnPinning, bodySize } = componentState;
3889
+ const {
3890
+ columnOrder,
3891
+ columnVisibility,
3892
+ columnPinning,
3893
+ columnSizing,
3894
+ columnTypes,
3895
+ bodySize,
3896
+ showSeparatePivotColumnForSingleAggregation
3897
+ } = componentState;
3568
3898
  (0, import_react19.useState)(() => {
3569
3899
  componentState.onRowHeightCSSVarChange.onChange((rowHeight) => {
3570
3900
  if (rowHeight) {
@@ -3577,13 +3907,16 @@ function useComputed() {
3577
3907
  }
3578
3908
  });
3579
3909
  });
3580
- useColumnAggregations();
3910
+ (0, import_react19.useEffect)(() => {
3911
+ dataSourceActions.showSeparatePivotColumnForSingleAggregation = showSeparatePivotColumnForSingleAggregation;
3912
+ }, [showSeparatePivotColumnForSingleAggregation]);
3581
3913
  const { multiSort } = dataSourceState;
3582
3914
  useColumnGroups();
3583
3915
  useColumnsWhen();
3584
3916
  const setSortInfo = (0, import_react19.useCallback)((sortInfo) => {
3585
3917
  var _a2;
3586
- dataSourceActions.sortInfo = multiSort ? sortInfo : (_a2 = sortInfo[0]) != null ? _a2 : null;
3918
+ const newSortInfo = multiSort ? sortInfo : (_a2 = sortInfo[0]) != null ? _a2 : null;
3919
+ dataSourceActions.sortInfo = newSortInfo;
3587
3920
  }, []);
3588
3921
  const columns = componentState.computedColumns;
3589
3922
  const {
@@ -3609,6 +3942,7 @@ function useComputed() {
3609
3942
  pinnedStartMaxWidth: componentState.pinnedStartMaxWidth,
3610
3943
  pinnedEndMaxWidth: componentState.pinnedEndMaxWidth,
3611
3944
  bodySize,
3945
+ viewportReservedWidth: componentState.viewportReservedWidth,
3612
3946
  sortable: componentState.sortable,
3613
3947
  draggableColumns: componentState.draggableColumns,
3614
3948
  sortInfo: (_a = dataSourceState.sortInfo) != null ? _a : void 0,
@@ -3617,7 +3951,9 @@ function useComputed() {
3617
3951
  columnOrder,
3618
3952
  columnVisibility,
3619
3953
  columnVisibilityAssumeVisible: true,
3620
- columnPinning
3954
+ columnPinning,
3955
+ columnSizing,
3956
+ columnTypes
3621
3957
  });
3622
3958
  const unpinnedColumnWidths = computedUnpinnedColumns.map((c) => c.computedWidth);
3623
3959
  let sortedUnpinnedColumnWidths = [...unpinnedColumnWidths].sort(sortAscending);
@@ -3668,7 +4004,7 @@ function useComputed() {
3668
4004
  }
3669
4005
 
3670
4006
  // src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
3671
- var React10 = __toModule(require("react"));
4007
+ var React9 = __toModule(require("react"));
3672
4008
 
3673
4009
  // src/components/InfiniteTable/hooks/useInternalProps.ts
3674
4010
  var useInternalProps = () => {
@@ -3676,9 +4012,9 @@ var useInternalProps = () => {
3676
4012
  };
3677
4013
 
3678
4014
  // src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
3679
- var InfiniteTableBody = React10.forwardRef(function InfiniteTableBody2(props, ref) {
4015
+ var InfiniteTableBody = React9.forwardRef(function InfiniteTableBody2(props, ref) {
3680
4016
  const { rootClassName: rootClassName12 } = useInternalProps();
3681
- return /* @__PURE__ */ React10.createElement("div", __spreadProps(__spreadValues({
4017
+ return /* @__PURE__ */ React9.createElement("div", __spreadProps(__spreadValues({
3682
4018
  ref
3683
4019
  }, props), {
3684
4020
  className: join(`${rootClassName12}Body`, position.relative, flex["1"], transformTranslateZero, props.className)
@@ -3686,43 +4022,16 @@ var InfiniteTableBody = React10.forwardRef(function InfiniteTableBody2(props, re
3686
4022
  });
3687
4023
 
3688
4024
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx
3689
- var React22 = __toModule(require("react"));
3690
-
3691
- // src/utils/getGlobal.ts
3692
- function getGlobal() {
3693
- return globalThis;
3694
- }
3695
-
3696
- // src/components/utils/getScrollbarWidth.ts
3697
- var scrollbarWidth;
3698
- function getScrollbarWidth() {
3699
- var _a, _b;
3700
- if (scrollbarWidth != null) {
3701
- return scrollbarWidth;
3702
- }
3703
- const doc = (_a = getGlobal().document) != null ? _a : null;
3704
- if (!doc) {
3705
- return 0;
3706
- }
3707
- const outer = doc.createElement("div");
3708
- outer.style.visibility = "hidden";
3709
- outer.style.overflow = "scroll";
3710
- doc.body.appendChild(outer);
3711
- const inner = doc.createElement("div");
3712
- outer.appendChild(inner);
3713
- scrollbarWidth = outer.offsetWidth - inner.offsetWidth;
3714
- (_b = outer.parentNode) == null ? void 0 : _b.removeChild(outer);
3715
- return scrollbarWidth;
3716
- }
4025
+ var React21 = __toModule(require("react"));
3717
4026
 
3718
4027
  // src/components/InfiniteTable/components/ScrollbarPlaceholder.tsx
3719
- var React11 = __toModule(require("react"));
4028
+ var React10 = __toModule(require("react"));
3720
4029
  function HorizontalScrollbarPlaceholderFn(props) {
3721
4030
  const scrollbarWidth2 = getScrollbarWidth();
3722
4031
  if (!scrollbarWidth2) {
3723
4032
  return null;
3724
4033
  }
3725
- return /* @__PURE__ */ React11.createElement("div", {
4034
+ return /* @__PURE__ */ React10.createElement("div", {
3726
4035
  "data-name": "horizontal-scrollbar-placeholder",
3727
4036
  style: __spreadValues({
3728
4037
  position: "absolute",
@@ -3732,13 +4041,13 @@ function HorizontalScrollbarPlaceholderFn(props) {
3732
4041
  }, props.style)
3733
4042
  });
3734
4043
  }
3735
- var HorizontalScrollbarPlaceholder = React11.memo(HorizontalScrollbarPlaceholderFn);
4044
+ var HorizontalScrollbarPlaceholder = React10.memo(HorizontalScrollbarPlaceholderFn);
3736
4045
  function VerticalScrollbarPlaceholderFn(props) {
3737
4046
  const scrollbarWidth2 = getScrollbarWidth();
3738
4047
  if (!scrollbarWidth2) {
3739
4048
  return null;
3740
4049
  }
3741
- return /* @__PURE__ */ React11.createElement("div", {
4050
+ return /* @__PURE__ */ React10.createElement("div", {
3742
4051
  "data-name": "vertical-scrollbar-placeholder",
3743
4052
  style: __spreadValues({
3744
4053
  position: "absolute",
@@ -3748,14 +4057,14 @@ function VerticalScrollbarPlaceholderFn(props) {
3748
4057
  }, props.style)
3749
4058
  });
3750
4059
  }
3751
- var VerticalScrollbarPlaceholder = React11.memo(VerticalScrollbarPlaceholderFn);
4060
+ var VerticalScrollbarPlaceholder = React10.memo(VerticalScrollbarPlaceholderFn);
3752
4061
 
3753
4062
  // src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
3754
- var import_createRuntimeFn2 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
4063
+ var import_createRuntimeFn3 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
3755
4064
  var CellCls = "_1eexc2a5 _16lm1iwj _16lm1iw10 _16lm1iw11 _16lm1iw2 _16lm1iw19 _16lm1iw1a";
3756
4065
  var HeaderCellProxy = "_12zfob10";
3757
- var HeaderCellRecipe = (0, import_createRuntimeFn2.createRuntimeFn)({ defaultClassName: "_12zfob1c", variantClassNames: { dragging: { true: "_12zfob1d", false: "_12zfob1e" }, first: { true: "_12zfob1f", false: "_12zfob1g" }, last: { true: "_12zfob1h", false: "_12zfob1i" }, groupByField: { true: "_12zfob1j", false: "_12zfob1k" }, firstInCategory: { true: "_12zfob1l", false: "_12zfob1m" }, lastInCategory: { true: "_12zfob1n", false: "_12zfob1o" }, pinned: { start: "_12zfob1p", end: "_12zfob1q", false: "_12zfob1r" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "_12zfob1s"], [{ pinned: "end", firstInCategory: true }, "_12zfob1t"], [{ pinned: false, lastInCategory: true }, "_12zfob1u"]] });
3758
- var HeaderClsRecipe = (0, import_createRuntimeFn2.createRuntimeFn)({ defaultClassName: "_12zfob12 _16lm1iw10", variantClassNames: { pinned: { start: "_12zfob13", end: "_12zfob14", false: "_12zfob15" }, virtualized: { true: "_12zfob16", false: "_12zfob17" }, overflow: { true: "_12zfob18", false: "_12zfob19" } }, defaultVariants: {}, compoundVariants: [[{ overflow: true, pinned: "start" }, "_12zfob1a"], [{ overflow: true, pinned: "end" }, "_12zfob1b"]] });
4066
+ var HeaderCellRecipe = (0, import_createRuntimeFn3.createRuntimeFn)({ defaultClassName: "_12zfob1c", variantClassNames: { dragging: { true: "_12zfob1d", false: "_12zfob1e" }, first: { true: "_12zfob1f", false: "_12zfob1g" }, last: { true: "_12zfob1h", false: "_12zfob1i" }, groupByField: { true: "_12zfob1j", false: "_12zfob1k" }, firstInCategory: { true: "_12zfob1l", false: "_12zfob1m" }, lastInCategory: { true: "_12zfob1n", false: "_12zfob1o" }, pinned: { start: "_12zfob1p", end: "_12zfob1q", false: "_12zfob1r" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "_12zfob1s"], [{ pinned: "end", firstInCategory: true }, "_12zfob1t"], [{ pinned: false, lastInCategory: true }, "_12zfob1u"]] });
4067
+ var HeaderClsRecipe = (0, import_createRuntimeFn3.createRuntimeFn)({ defaultClassName: "_12zfob12 _16lm1iw10", variantClassNames: { pinned: { start: "_12zfob13", end: "_12zfob14", false: "_12zfob15" }, virtualized: { true: "_12zfob16", false: "_12zfob17" }, overflow: { true: "_12zfob18", false: "_12zfob19" } }, defaultVariants: {}, compoundVariants: [[{ overflow: true, pinned: "start" }, "_12zfob1a"], [{ overflow: true, pinned: "end" }, "_12zfob1b"]] });
3759
4068
  var HeaderGroupCls = "_16lm1iwz _16lm1iwj";
3760
4069
  var HeaderGroup_Children = "_16lm1iwj _16lm1iw10 _16lm1iw12 _16lm1iwc";
3761
4070
  var HeaderGroup_Header = "_12zfob1x _16lm1iwj _16lm1iw10 _16lm1iw11";
@@ -3763,15 +4072,15 @@ var HeaderSortIconCls = "_12zfob11 _16lm1iw1";
3763
4072
  var HeaderWrapperCls = "_12zfob1v _16lm1iw16 _16lm1iw1 _16lm1iwj _16lm1iw10";
3764
4073
 
3765
4074
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
3766
- var React18 = __toModule(require("react"));
4075
+ var React17 = __toModule(require("react"));
3767
4076
  var import_react27 = __toModule(require("react"));
3768
4077
 
3769
4078
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
3770
- var React14 = __toModule(require("react"));
4079
+ var React13 = __toModule(require("react"));
3771
4080
  var import_react23 = __toModule(require("react"));
3772
4081
 
3773
4082
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCell.tsx
3774
- var React12 = __toModule(require("react"));
4083
+ var React11 = __toModule(require("react"));
3775
4084
 
3776
4085
  // src/components/InfiniteTable/hooks/useInfiniteTableState.ts
3777
4086
  var import_react20 = __toModule(require("react"));
@@ -3782,10 +4091,10 @@ var useInfiniteTableState = () => {
3782
4091
  };
3783
4092
 
3784
4093
  // src/components/InfiniteTable/components/cell.css.ts
3785
- var import_createRuntimeFn3 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
4094
+ var import_createRuntimeFn4 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
3786
4095
  var CellCls2 = "_1eexc2a5 _16lm1iwj _16lm1iw10 _16lm1iw11 _16lm1iw2 _16lm1iw19 _16lm1iw1a";
3787
4096
  var CellClsVariants = { shifting: "_1eexc2a3", dragging: "_1eexc2a4" };
3788
- var ColumnCellRecipe = (0, import_createRuntimeFn3.createRuntimeFn)({ defaultClassName: "_16lm1iw2 _16lm1iwo _16lm1iw7 _16lm1iwr", variantClassNames: { dragging: { false: "_1eexc2a7" }, first: { true: "_1eexc2a8", false: "_1eexc2a9" }, last: { true: "_1eexc2aa", false: "_1eexc2ab" }, groupByField: { true: "_1eexc2ac", false: "_1eexc2ad" }, firstInCategory: { true: "_1eexc2ae", false: "_1eexc2af" }, lastInCategory: { true: "_1eexc2ag", false: "_1eexc2ah" }, pinned: { start: "_1eexc2ai", end: "_1eexc2aj", false: "_1eexc2ak" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "_1eexc2al"], [{ pinned: "end", firstInCategory: true }, "_1eexc2am"]] });
4097
+ var ColumnCellRecipe = (0, import_createRuntimeFn4.createRuntimeFn)({ defaultClassName: "_16lm1iw2 _16lm1iwo _16lm1iw7 _16lm1iwr", variantClassNames: { dragging: { false: "_1eexc2a7" }, first: { true: "_1eexc2a8", false: "_1eexc2a9" }, last: { true: "_1eexc2aa", false: "_1eexc2ab" }, groupByField: { true: "_1eexc2ac", false: "_1eexc2ad" }, firstInCategory: { true: "_1eexc2ae", false: "_1eexc2af" }, lastInCategory: { true: "_1eexc2ag", false: "_1eexc2ah" }, pinned: { start: "_1eexc2ai", end: "_1eexc2aj", false: "_1eexc2ak" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "_1eexc2al"], [{ pinned: "end", firstInCategory: true }, "_1eexc2am"]] });
3789
4098
  var columnAlignCellStyle = { center: "_1eexc2a0", start: "_1eexc2a1", end: "_1eexc2a2" };
3790
4099
 
3791
4100
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCell.tsx
@@ -3830,16 +4139,16 @@ function InfiniteTableCellFn(props) {
3830
4139
  style.transform = `translate3d(${shiftLeft}px, 0px, 0px)`;
3831
4140
  }
3832
4141
  }
3833
- return /* @__PURE__ */ React12.createElement("div", __spreadProps(__spreadValues({}, domProps), {
4142
+ return /* @__PURE__ */ React11.createElement("div", __spreadProps(__spreadValues({}, domProps), {
3834
4143
  ref: domRef,
3835
4144
  style,
3836
4145
  "data-name": `Cell`,
3837
4146
  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}` : "")
3838
- }), beforeChildren, cssEllipsis ? /* @__PURE__ */ React12.createElement("div", {
4147
+ }), beforeChildren, cssEllipsis ? /* @__PURE__ */ React11.createElement("div", {
3839
4148
  className: `${rootClassName2}Cell_content ${cssEllipsisClassName}`
3840
4149
  }, children) : children, afterChildren);
3841
4150
  }
3842
- var InfiniteTableCell = React12.memo(InfiniteTableCellFn);
4151
+ var InfiniteTableCell = React11.memo(InfiniteTableCellFn);
3843
4152
 
3844
4153
  // src/components/InfiniteTable/hooks/useColumnPointerEvents.ts
3845
4154
  var import_binary_search = __toModule(require_binary_search());
@@ -4034,7 +4343,7 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
4034
4343
  var import_react_dom = __toModule(require("react-dom"));
4035
4344
 
4036
4345
  // src/components/InfiniteTable/components/icons/SortIcon.tsx
4037
- var React13 = __toModule(require("react"));
4346
+ var React12 = __toModule(require("react"));
4038
4347
  var import_react22 = __toModule(require("react"));
4039
4348
  var defaultLineStyle = {
4040
4349
  marginTop: 2,
@@ -4088,18 +4397,18 @@ function SortIcon(props) {
4088
4397
  if (direction === -1) {
4089
4398
  indexStyle.top = "100%";
4090
4399
  }
4091
- return /* @__PURE__ */ React13.createElement("div", {
4400
+ return /* @__PURE__ */ React12.createElement("div", {
4092
4401
  style: __spreadProps(__spreadValues({}, style), { width: size }),
4093
4402
  className: join(className, "ITableIcon", "ITableIcon-sort")
4094
- }, showIndex ? /* @__PURE__ */ React13.createElement("div", {
4403
+ }, showIndex ? /* @__PURE__ */ React12.createElement("div", {
4095
4404
  "data-name": "index",
4096
4405
  style: indexStyle
4097
- }, index) : null, /* @__PURE__ */ React13.createElement("div", {
4406
+ }, index) : null, /* @__PURE__ */ React12.createElement("div", {
4098
4407
  style: __spreadValues({ width: sizes[0] }, lineStyle),
4099
4408
  onTransitionEnd
4100
- }), /* @__PURE__ */ React13.createElement("div", {
4409
+ }), /* @__PURE__ */ React12.createElement("div", {
4101
4410
  style: __spreadValues({ width: sizes[1] }, lineStyle)
4102
- }), /* @__PURE__ */ React13.createElement("div", {
4411
+ }), /* @__PURE__ */ React12.createElement("div", {
4103
4412
  style: __spreadValues({ width: sizes[2] }, lineStyle)
4104
4413
  }));
4105
4414
  }
@@ -4130,7 +4439,7 @@ function InfiniteTableHeaderCell(props) {
4130
4439
  });
4131
4440
  }
4132
4441
  header = header != null ? header : column.name;
4133
- const sortTool = /* @__PURE__ */ React14.createElement(SortIcon, {
4442
+ const sortTool = /* @__PURE__ */ React13.createElement(SortIcon, {
4134
4443
  index: column.computedMultiSort ? column.computedSortIndex + 1 : void 0,
4135
4444
  className: `${baseCls}__sort-icon ${HeaderSortIconCls}`,
4136
4445
  direction: column.computedSorted ? column.computedSortedAsc ? 1 : -1 : 0
@@ -4168,7 +4477,7 @@ function InfiniteTableHeaderCell(props) {
4168
4477
  let offset = offsetFromProps != null ? offsetFromProps : virtualized ? 0 : column.computedPinningOffset;
4169
4478
  let draggingProxy = null;
4170
4479
  if (dragging) {
4171
- draggingProxy = /* @__PURE__ */ React14.createElement("div", {
4480
+ draggingProxy = /* @__PURE__ */ React13.createElement("div", {
4172
4481
  className: `${baseCls}Proxy ${HeaderCellProxy}`,
4173
4482
  style: {
4174
4483
  position: "absolute",
@@ -4181,7 +4490,7 @@ function InfiniteTableHeaderCell(props) {
4181
4490
  }, header);
4182
4491
  draggingProxy = (0, import_react_dom.createPortal)(draggingProxy, portalDOMRef.current);
4183
4492
  }
4184
- return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(InfiniteTableCell, {
4493
+ return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(InfiniteTableCell, {
4185
4494
  domRef: ref,
4186
4495
  column,
4187
4496
  "data-name": `HeaderCell`,
@@ -4197,11 +4506,11 @@ function InfiniteTableHeaderCell(props) {
4197
4506
  }
4198
4507
 
4199
4508
  // src/components/RawList/index.tsx
4200
- var React17 = __toModule(require("react"));
4509
+ var React16 = __toModule(require("react"));
4201
4510
  var import_react26 = __toModule(require("react"));
4202
4511
 
4203
4512
  // src/components/RawList/AvoidReactDiff.tsx
4204
- var React15 = __toModule(require("react"));
4513
+ var React14 = __toModule(require("react"));
4205
4514
  var import_react24 = __toModule(require("react"));
4206
4515
  function AvoidReactDiffFn(props) {
4207
4516
  const [children, setChildren] = (0, import_react24.useState)(props.updater.get());
@@ -4211,15 +4520,15 @@ function AvoidReactDiffFn(props) {
4211
4520
  });
4212
4521
  return remove;
4213
4522
  }, [props.updater]);
4214
- return /* @__PURE__ */ React15.createElement(React15.Fragment, null, children);
4523
+ return /* @__PURE__ */ React14.createElement(React14.Fragment, null, children);
4215
4524
  }
4216
- var AvoidReactDiff = React15.memo(AvoidReactDiffFn);
4525
+ var AvoidReactDiff = React14.memo(AvoidReactDiffFn);
4217
4526
 
4218
4527
  // src/components/RawList/useVirtualRenderer.ts
4219
4528
  var import_react25 = __toModule(require("react"));
4220
4529
 
4221
4530
  // src/components/RawList/ReactVirtualRenderer.tsx
4222
- var React16 = __toModule(require("react"));
4531
+ var React15 = __toModule(require("react"));
4223
4532
 
4224
4533
  // src/components/RawList/MappedItems.ts
4225
4534
  var MappedItems = class extends Logger {
@@ -4235,10 +4544,10 @@ var MappedItems = class extends Logger {
4235
4544
  return result;
4236
4545
  };
4237
4546
  this.getElementsOutsideItemRange = (startIndex, endIndex) => {
4238
- const map = this.elementIndexToItemIndex;
4547
+ const map2 = this.elementIndexToItemIndex;
4239
4548
  const result = [];
4240
- for (const elementIndex in map) {
4241
- const itemIndex = map[elementIndex];
4549
+ for (const elementIndex in map2) {
4550
+ const itemIndex = map2[elementIndex];
4242
4551
  if (itemIndex < startIndex || itemIndex > endIndex) {
4243
4552
  result.push(elementIndex >> 0);
4244
4553
  }
@@ -4464,7 +4773,7 @@ var ReactVirtualRenderer = class extends Logger {
4464
4773
  };
4465
4774
  this.itemDOMRefs[elementIndex] = domRef;
4466
4775
  this.updaters[elementIndex] = buildSubscriptionCallback();
4467
- const item = /* @__PURE__ */ React16.createElement(AvoidReactDiff, {
4776
+ const item = /* @__PURE__ */ React15.createElement(AvoidReactDiff, {
4468
4777
  key: elementIndex,
4469
4778
  name: `${elementIndex}`,
4470
4779
  updater: this.updaters[elementIndex]
@@ -4561,11 +4870,11 @@ function RawListFn(props) {
4561
4870
  });
4562
4871
  return remove;
4563
4872
  }, [brain, onRenderUpdater]);
4564
- return /* @__PURE__ */ React17.createElement(AvoidReactDiff, {
4873
+ return /* @__PURE__ */ React16.createElement(AvoidReactDiff, {
4565
4874
  updater: onRenderUpdater
4566
4875
  });
4567
4876
  }
4568
- var RawList = React17.memo(RawListFn);
4877
+ var RawList = React16.memo(RawListFn);
4569
4878
 
4570
4879
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
4571
4880
  var debug3 = dbg("Header");
@@ -4586,7 +4895,7 @@ function InfiniteTableHeaderFn(props) {
4586
4895
  }
4587
4896
  return null;
4588
4897
  }
4589
- return /* @__PURE__ */ React18.createElement(InfiniteTableHeaderCell, {
4898
+ return /* @__PURE__ */ React17.createElement(InfiniteTableHeaderCell, {
4590
4899
  domRef: domRef2,
4591
4900
  column,
4592
4901
  headerHeight,
@@ -4611,22 +4920,22 @@ function InfiniteTableHeaderFn(props) {
4611
4920
  className: join(TableHeaderClassName, `${TableHeaderClassName}--virtualized`, className, headerCls),
4612
4921
  style
4613
4922
  };
4614
- return /* @__PURE__ */ React18.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React18.createElement(RawList, {
4923
+ return /* @__PURE__ */ React17.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React17.createElement(RawList, {
4615
4924
  brain,
4616
4925
  renderItem: renderColumn
4617
4926
  }));
4618
4927
  }
4619
- var InfiniteTableHeader = React18.memo(InfiniteTableHeaderFn);
4928
+ var InfiniteTableHeader = React17.memo(InfiniteTableHeaderFn);
4620
4929
 
4621
4930
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderUnvirtualized.tsx
4622
- var React21 = __toModule(require("react"));
4931
+ var React20 = __toModule(require("react"));
4623
4932
 
4624
4933
  // src/components/InfiniteTable/components/InfiniteTableHeader/renderColumnHeaderGroups.tsx
4625
- var React20 = __toModule(require("react"));
4934
+ var React19 = __toModule(require("react"));
4626
4935
 
4627
4936
  // src/components/InfiniteTable/components/InfiniteTableHeader/buildColumnAndGroupTree.ts
4628
4937
  function buildColumnAndGroupTree(columns, columnGroups, columnGroupsDepthsMap) {
4629
- const map = new Map();
4938
+ const map2 = new Map();
4630
4939
  const temporaryMap = new Map();
4631
4940
  const mapOfAllParentGroupsForColumns = new Map();
4632
4941
  columns.forEach((col, index) => {
@@ -4644,7 +4953,7 @@ function buildColumnAndGroupTree(columns, columnGroups, columnGroupsDepthsMap) {
4644
4953
  computedWidth: col.computedWidth,
4645
4954
  depth: col.columnGroup ? ((_d = columnGroupsDepthsMap.get(col.columnGroup)) != null ? _d : 0) + 1 : 0
4646
4955
  };
4647
- map.set([colId], colItem);
4956
+ map2.set([colId], colItem);
4648
4957
  let groupId = col.columnGroup;
4649
4958
  let colGroupItem;
4650
4959
  let prevGroupItem = colItem;
@@ -4666,7 +4975,7 @@ function buildColumnAndGroupTree(columns, columnGroups, columnGroupsDepthsMap) {
4666
4975
  computedWidth: 0,
4667
4976
  depth: (_e = columnGroupsDepthsMap.get(groupId)) != null ? _e : 0
4668
4977
  };
4669
- map.set(groupAbsoluteId, colGroupItem);
4978
+ map2.set(groupAbsoluteId, colGroupItem);
4670
4979
  temporaryMap.set(groupId, colGroupItem);
4671
4980
  }
4672
4981
  colGroupItem.columnItems.push(colItem);
@@ -4683,7 +4992,7 @@ function buildColumnAndGroupTree(columns, columnGroups, columnGroupsDepthsMap) {
4683
4992
  });
4684
4993
  const result = [];
4685
4994
  let groupOffset = 0;
4686
- map.forEach((item) => {
4995
+ map2.forEach((item) => {
4687
4996
  if (!item.ref.columnGroup) {
4688
4997
  const itemWidth = item.type === "column" ? item.ref.computedWidth : item.columnItems.reduce((sum, col) => sum + col.ref.computedWidth, 0);
4689
4998
  item.groupOffset = groupOffset;
@@ -4695,7 +5004,7 @@ function buildColumnAndGroupTree(columns, columnGroups, columnGroupsDepthsMap) {
4695
5004
  groupOffset += itemWidth;
4696
5005
  }
4697
5006
  });
4698
- map.clear();
5007
+ map2.clear();
4699
5008
  temporaryMap.clear();
4700
5009
  return result;
4701
5010
  }
@@ -4712,7 +5021,7 @@ function assignGroupOffsetsAndComputedWidths(items, groupOffset = 0) {
4712
5021
  }
4713
5022
 
4714
5023
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
4715
- var React19 = __toModule(require("react"));
5024
+ var React18 = __toModule(require("react"));
4716
5025
  var TableHeaderGroupClassName = `${rootClassName}HeaderGroup`;
4717
5026
  function InfiniteTableHeaderGroup(props) {
4718
5027
  const { columnGroup, height, headerHeight } = props;
@@ -4726,16 +5035,16 @@ function InfiniteTableHeaderGroup(props) {
4726
5035
  width: columnGroup.computedWidth,
4727
5036
  height
4728
5037
  };
4729
- return /* @__PURE__ */ React19.createElement("div", {
5038
+ return /* @__PURE__ */ React18.createElement("div", {
4730
5039
  "data-group-id": columnGroup.id,
4731
5040
  className: join(HeaderGroupCls, TableHeaderGroupClassName, `${TableHeaderGroupClassName}--unvirtualized`),
4732
5041
  style
4733
- }, /* @__PURE__ */ React19.createElement("div", {
5042
+ }, /* @__PURE__ */ React18.createElement("div", {
4734
5043
  className: join(`${TableHeaderGroupClassName}__header`, HeaderGroup_Header),
4735
5044
  style: { height: headerHeight }
4736
- }, /* @__PURE__ */ React19.createElement("div", {
5045
+ }, /* @__PURE__ */ React18.createElement("div", {
4737
5046
  className: join(`${TableHeaderGroupClassName}__header-content`, cssEllipsisClassName)
4738
- }, header)), /* @__PURE__ */ React19.createElement("div", {
5047
+ }, header)), /* @__PURE__ */ React18.createElement("div", {
4739
5048
  className: join(`${TableHeaderGroupClassName}__children`, HeaderGroup_Children)
4740
5049
  }, props.children));
4741
5050
  }
@@ -4758,7 +5067,7 @@ function renderColumnHeaderGroups(config) {
4758
5067
  return items2.map((colGroupItem) => {
4759
5068
  if (colGroupItem.type === "column") {
4760
5069
  const col = colGroupItem.ref;
4761
- return /* @__PURE__ */ React20.createElement(InfiniteTableHeaderCell, {
5070
+ return /* @__PURE__ */ React19.createElement(InfiniteTableHeaderCell, {
4762
5071
  key: col.id,
4763
5072
  headerHeight: (columnGroupsMaxDepth - colGroupItem.depth + 2) * headerHeight,
4764
5073
  column: col,
@@ -4772,7 +5081,7 @@ function renderColumnHeaderGroups(config) {
4772
5081
  colIds.push(col.id);
4773
5082
  return col;
4774
5083
  });
4775
- return /* @__PURE__ */ React20.createElement(InfiniteTableHeaderGroup, {
5084
+ return /* @__PURE__ */ React19.createElement(InfiniteTableHeaderGroup, {
4776
5085
  key: `${colGroupItem.uniqueGroupId.join("/")}`,
4777
5086
  columns: columns2,
4778
5087
  height: (columnGroupsMaxDepth - colGroupItem.depth + 2) * headerHeight,
@@ -4825,9 +5134,9 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
4825
5134
  },
4826
5135
  computed: { computedVisibleColumnsMap: columnsMap }
4827
5136
  } = useInfiniteTable();
4828
- const domRef = React21.useRef(null);
5137
+ const domRef = React20.useRef(null);
4829
5138
  const hasColumnGroups = computedColumnGroups.size > 0;
4830
- const columnHeaderGroups = React21.useMemo(() => {
5139
+ const columnHeaderGroups = React20.useMemo(() => {
4831
5140
  return hasColumnGroups ? renderColumnHeaderGroups({
4832
5141
  columnGroups: computedColumnGroups,
4833
5142
  columnGroupsDepthsMap,
@@ -4846,7 +5155,7 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
4846
5155
  columnGroupsMaxDepth
4847
5156
  ]);
4848
5157
  const children = hasColumnGroups ? columnHeaderGroups : columns.map((c) => {
4849
- return /* @__PURE__ */ React21.createElement(InfiniteTableHeaderCell, {
5158
+ return /* @__PURE__ */ React20.createElement(InfiniteTableHeaderCell, {
4850
5159
  key: c.id,
4851
5160
  headerHeight,
4852
5161
  column: c,
@@ -4869,20 +5178,20 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
4869
5178
  const removeOnScroll = scroller.onScroll(onScroll);
4870
5179
  return removeOnScroll;
4871
5180
  }, [brain, scrollListener]);
4872
- return /* @__PURE__ */ React21.createElement("div", __spreadProps(__spreadValues({}, domProps), {
5181
+ return /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({}, domProps), {
4873
5182
  className: join(TableHeaderClassName2, `${TableHeaderClassName2}--unvirtualized`, pinning ? `${TableHeaderClassName2}--pinned ${TableHeaderClassName2}-${pinning}` : "", scrollable ? `${TableHeaderClassName2}--overflow` : "", domProps.className, HeaderClsRecipe({
4874
5183
  pinned: pinning,
4875
5184
  virtualized: false,
4876
5185
  overflow: scrollable
4877
5186
  })),
4878
5187
  style
4879
- }), /* @__PURE__ */ React21.createElement("div", {
5188
+ }), /* @__PURE__ */ React20.createElement("div", {
4880
5189
  style: { width: totalWidth },
4881
5190
  className: join(flexFlow.row, display.flex),
4882
5191
  ref: domRef
4883
5192
  }, children));
4884
5193
  }
4885
- var InfiniteTableHeaderUnvirtualized = React21.memo(InfiniteTableHeaderUnvirtualizedFn);
5194
+ var InfiniteTableHeaderUnvirtualized = React20.memo(InfiniteTableHeaderUnvirtualizedFn);
4886
5195
 
4887
5196
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx
4888
5197
  function TableHeaderWrapper(props) {
@@ -4912,7 +5221,7 @@ function TableHeaderWrapper(props) {
4912
5221
  const hasPinnedStart = computedPinnedStartColumns.length > 0;
4913
5222
  const hasPinnedEnd = computedPinnedEndColumns.length > 0;
4914
5223
  const height = columnGroupsMaxDepth ? columnGroupsMaxDepth * headerHeight : headerHeight;
4915
- const header = virtualizeHeader ? /* @__PURE__ */ React22.createElement(InfiniteTableHeader, {
5224
+ const header = virtualizeHeader ? /* @__PURE__ */ React21.createElement(InfiniteTableHeader, {
4916
5225
  columns: computedUnpinnedColumns,
4917
5226
  repaintId: virtualizeHeader ? repaintId : void 0,
4918
5227
  brain,
@@ -4925,7 +5234,7 @@ function TableHeaderWrapper(props) {
4925
5234
  },
4926
5235
  availableWidth: computedUnpinnedColumnsWidth,
4927
5236
  totalWidth: computedUnpinnedColumnsWidth
4928
- }) : /* @__PURE__ */ React22.createElement(InfiniteTableHeaderUnvirtualized, {
5237
+ }) : /* @__PURE__ */ React21.createElement(InfiniteTableHeaderUnvirtualized, {
4929
5238
  brain,
4930
5239
  scrollable: true,
4931
5240
  pinning: false,
@@ -4933,12 +5242,12 @@ function TableHeaderWrapper(props) {
4933
5242
  availableWidth: computedUnpinnedColumnsWidth,
4934
5243
  totalWidth: computedUnpinnedColumnsWidth
4935
5244
  });
4936
- return /* @__PURE__ */ React22.createElement("div", {
5245
+ return /* @__PURE__ */ React21.createElement("div", {
4937
5246
  className: HeaderWrapperCls,
4938
5247
  style: {
4939
5248
  height: virtualizeHeader ? height : void 0
4940
5249
  }
4941
- }, hasPinnedStart ? /* @__PURE__ */ React22.createElement(InfiniteTableHeaderUnvirtualized, {
5250
+ }, hasPinnedStart ? /* @__PURE__ */ React21.createElement(InfiniteTableHeaderUnvirtualized, {
4942
5251
  style: {
4943
5252
  left: 0,
4944
5253
  position: "absolute",
@@ -4950,7 +5259,7 @@ function TableHeaderWrapper(props) {
4950
5259
  scrollable: computedPinnedStartOverflow,
4951
5260
  pinning: "start",
4952
5261
  scrollListener: computedPinnedStartOverflow ? pinnedStartScrollListener : void 0
4953
- }) : null, header, hasPinnedEnd ? /* @__PURE__ */ React22.createElement(InfiniteTableHeaderUnvirtualized, {
5262
+ }) : null, header, hasPinnedEnd ? /* @__PURE__ */ React21.createElement(InfiniteTableHeaderUnvirtualized, {
4954
5263
  style: {
4955
5264
  right: scrollbars.vertical ? getScrollbarWidth() : 0,
4956
5265
  position: "absolute",
@@ -4962,7 +5271,7 @@ function TableHeaderWrapper(props) {
4962
5271
  scrollable: computedPinnedEndOverflow,
4963
5272
  pinning: "end",
4964
5273
  scrollListener: computedPinnedEndOverflow ? pinnedEndScrollListener : void 0
4965
- }) : null, scrollbars.vertical ? /* @__PURE__ */ React22.createElement(VerticalScrollbarPlaceholder, {
5274
+ }) : null, scrollbars.vertical ? /* @__PURE__ */ React21.createElement(VerticalScrollbarPlaceholder, {
4966
5275
  style: {
4967
5276
  height: "100%",
4968
5277
  right: 0
@@ -4971,7 +5280,7 @@ function TableHeaderWrapper(props) {
4971
5280
  }
4972
5281
 
4973
5282
  // src/components/VirtualScrollContainer/index.tsx
4974
- var React23 = __toModule(require("react"));
5283
+ var React22 = __toModule(require("react"));
4975
5284
  var import_react30 = __toModule(require("react"));
4976
5285
 
4977
5286
  // src/components/hooks/useOnScroll.ts
@@ -5015,7 +5324,7 @@ var getScrollableClassName = (scrollable) => {
5015
5324
 
5016
5325
  // src/components/VirtualScrollContainer/index.tsx
5017
5326
  var rootClassName6 = "InfiniteVirtualScrollContainer";
5018
- var VirtualScrollContainer = React23.forwardRef(function VirtualScrollContainer2(props, ref) {
5327
+ var VirtualScrollContainer = React22.forwardRef(function VirtualScrollContainer2(props, ref) {
5019
5328
  const {
5020
5329
  children,
5021
5330
  scrollable = true,
@@ -5025,7 +5334,7 @@ var VirtualScrollContainer = React23.forwardRef(function VirtualScrollContainer2
5025
5334
  } = props;
5026
5335
  const domRef = ref != null ? ref : (0, import_react30.useRef)(null);
5027
5336
  useOnScroll(domRef, onContainerScroll);
5028
- return /* @__PURE__ */ React23.createElement("div", {
5337
+ return /* @__PURE__ */ React22.createElement("div", {
5029
5338
  ref: domRef,
5030
5339
  style,
5031
5340
  className: join(className, rootClassName6, VirtualScrollContainerCls, getScrollableClassName(scrollable))
@@ -5033,7 +5342,7 @@ var VirtualScrollContainer = React23.forwardRef(function VirtualScrollContainer2
5033
5342
  });
5034
5343
 
5035
5344
  // src/components/VirtualList/SpacePlaceholder.tsx
5036
- var React24 = __toModule(require("react"));
5345
+ var React23 = __toModule(require("react"));
5037
5346
  function SpacePlaceholderFn(props) {
5038
5347
  const { height, width, count } = props;
5039
5348
  const style = {
@@ -5043,7 +5352,7 @@ function SpacePlaceholderFn(props) {
5043
5352
  opacity: 0,
5044
5353
  pointerEvents: "none"
5045
5354
  };
5046
- return /* @__PURE__ */ React24.createElement("div", {
5355
+ return /* @__PURE__ */ React23.createElement("div", {
5047
5356
  "data-count": count,
5048
5357
  "data-placeholder-width": true ? width : void 0,
5049
5358
  "data-placeholder-height": true ? height : void 0,
@@ -5051,24 +5360,24 @@ function SpacePlaceholderFn(props) {
5051
5360
  style
5052
5361
  });
5053
5362
  }
5054
- var SpacePlaceholder = React24.memo(SpacePlaceholderFn);
5363
+ var SpacePlaceholder = React23.memo(SpacePlaceholderFn);
5055
5364
 
5056
5365
  // src/components/InfiniteTable/hooks/useListRendering.tsx
5057
5366
  var import_react41 = __toModule(require("react"));
5058
5367
 
5059
5368
  // src/components/InfiniteTable/hooks/useUnpinnedRendering.tsx
5060
- var React30 = __toModule(require("react"));
5369
+ var React29 = __toModule(require("react"));
5061
5370
  var import_react34 = __toModule(require("react"));
5062
5371
 
5063
5372
  // src/components/VirtualList/VirtualRowList.tsx
5064
- var React26 = __toModule(require("react"));
5373
+ var React25 = __toModule(require("react"));
5065
5374
 
5066
5375
  // src/components/VirtualList/VirtualList.tsx
5067
- var React25 = __toModule(require("react"));
5376
+ var React24 = __toModule(require("react"));
5068
5377
  var import_react31 = __toModule(require("react"));
5069
5378
 
5070
5379
  // src/components/VirtualList/VirtualList.css.ts
5071
- var VirtualListCls = "mlx2t0 _16lm1iw0";
5380
+ var VirtualListCls = "_16lm1iw1 _16lm1iw8 _16lm1iw0";
5072
5381
  var VirtualListClsOrientation = { horizontal: "mlx2t1", vertical: "mlx2t2" };
5073
5382
  var scrollTransformTargetCls = "mlx2t3";
5074
5383
 
@@ -5146,19 +5455,19 @@ var VirtualList = (props) => {
5146
5455
  if (true) {
5147
5456
  domProps["data-cmp-name"] = `VirtualList`;
5148
5457
  }
5149
- return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React25.createElement(VirtualScrollContainer, {
5458
+ return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React24.createElement(VirtualScrollContainer, {
5150
5459
  scrollable,
5151
5460
  onContainerScroll
5152
- }, /* @__PURE__ */ React25.createElement("div", {
5461
+ }, /* @__PURE__ */ React24.createElement("div", {
5153
5462
  ref: domRef,
5154
5463
  className: scrollTransformTargetCls,
5155
5464
  "data-name": "scroll-transform-target"
5156
- }, /* @__PURE__ */ React25.createElement(RawList, {
5465
+ }, /* @__PURE__ */ React24.createElement(RawList, {
5157
5466
  brain: virtualBrain,
5158
5467
  renderItem,
5159
5468
  repaintId,
5160
5469
  debugChannel: "VirtualList-" + mainAxis
5161
- })), children, /* @__PURE__ */ React25.createElement(SpacePlaceholder, {
5470
+ })), children, /* @__PURE__ */ React24.createElement(SpacePlaceholder, {
5162
5471
  count,
5163
5472
  width,
5164
5473
  height
@@ -5168,14 +5477,14 @@ var VirtualList = (props) => {
5168
5477
  // src/components/VirtualList/VirtualRowList.tsx
5169
5478
  var VirtualRowList = (props) => {
5170
5479
  const _a = props, { rowWidth, rowHeight, renderRow } = _a, listProps = __objRest(_a, ["rowWidth", "rowHeight", "renderRow"]);
5171
- const renderItem = React26.useCallback((renderProps) => {
5480
+ const renderItem = React25.useCallback((renderProps) => {
5172
5481
  return renderRow({
5173
5482
  domRef: renderProps.domRef,
5174
5483
  rowHeight: renderProps.itemSize,
5175
5484
  rowIndex: renderProps.itemIndex
5176
5485
  });
5177
5486
  }, [renderRow]);
5178
- return /* @__PURE__ */ React26.createElement(VirtualList, __spreadProps(__spreadValues({}, listProps), {
5487
+ return /* @__PURE__ */ React25.createElement(VirtualList, __spreadProps(__spreadValues({}, listProps), {
5179
5488
  renderItem,
5180
5489
  mainAxis: "vertical",
5181
5490
  itemMainAxisSize: rowHeight,
@@ -5184,11 +5493,11 @@ var VirtualRowList = (props) => {
5184
5493
  };
5185
5494
 
5186
5495
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRow.tsx
5187
- var React28 = __toModule(require("react"));
5496
+ var React27 = __toModule(require("react"));
5188
5497
  var import_react33 = __toModule(require("react"));
5189
5498
 
5190
5499
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx
5191
- var React27 = __toModule(require("react"));
5500
+ var React26 = __toModule(require("react"));
5192
5501
  var { rootClassName: rootClassName8 } = internalProps;
5193
5502
  var InfiniteTableColumnCellClassName = `${rootClassName8}ColumnCell`;
5194
5503
  function isColumnWithField(c) {
@@ -5215,32 +5524,38 @@ function InfiniteTableColumnCellFn(props) {
5215
5524
  const groupRowInfo = null;
5216
5525
  let value = isGroupRow && groupBy && column.groupByField ? rowInfo.value : isColumnWithField(column) ? data == null ? void 0 : data[column.field] : null;
5217
5526
  if (column.valueGetter) {
5218
- value = column.valueGetter({
5219
- data,
5220
- rowInfo,
5221
- groupRowInfo
5527
+ value = column.valueGetter(isGroupRow ? {
5528
+ data: rowInfo.data,
5529
+ rowInfo
5530
+ } : {
5531
+ data: rowInfo.data,
5532
+ rowInfo
5222
5533
  });
5223
5534
  }
5224
5535
  const { componentState: computedDataSource } = useDataSourceContextValue();
5225
- const stylingRenderParam = {
5226
- value,
5227
- column,
5536
+ const rest = rowInfo.isGroupRow ? {
5537
+ rowInfo,
5538
+ data: rowInfo.data
5539
+ } : {
5228
5540
  rowInfo,
5229
- data
5541
+ data: rowInfo.data
5230
5542
  };
5543
+ const stylingRenderParam = __spreadValues({
5544
+ value,
5545
+ column
5546
+ }, rest);
5231
5547
  let renderValue = value;
5232
5548
  if (column.render || column.renderValue) {
5233
- const renderParam = {
5549
+ const renderParam = __spreadProps(__spreadValues({
5234
5550
  value,
5235
5551
  column,
5236
- rowInfo,
5237
- groupRowInfo,
5238
- data,
5552
+ groupRowInfo
5553
+ }, rest), {
5239
5554
  rowIndex,
5240
5555
  toggleGroupRow,
5241
5556
  toggleCurrentGroupRow: () => toggleGroupRow(rowInfo.groupKeys),
5242
- groupRowsBy: computedDataSource.groupRowsBy
5243
- };
5557
+ groupBy: computedDataSource.groupBy
5558
+ });
5244
5559
  if (column.render) {
5245
5560
  renderValue = column.render(renderParam);
5246
5561
  } else if (column.renderValue) {
@@ -5275,7 +5590,7 @@ function InfiniteTableColumnCellFn(props) {
5275
5590
  }
5276
5591
  }
5277
5592
  }
5278
- return /* @__PURE__ */ React27.createElement(InfiniteTableCell, __spreadProps(__spreadValues({
5593
+ return /* @__PURE__ */ React26.createElement(InfiniteTableCell, __spreadProps(__spreadValues({
5279
5594
  domRef,
5280
5595
  offsetProperty
5281
5596
  }, dataset), {
@@ -5286,7 +5601,7 @@ function InfiniteTableColumnCellFn(props) {
5286
5601
  className: join(useCellClassName(column, [InfiniteTableColumnCellClassName, InfiniteTableCellClassName], ColumnCellRecipe, { dragging: false }), colClassName)
5287
5602
  }), hidden ? null : renderValue);
5288
5603
  }
5289
- var InfiniteTableColumnCell = React27.memo(InfiniteTableColumnCellFn);
5604
+ var InfiniteTableColumnCell = React26.memo(InfiniteTableColumnCellFn);
5290
5605
 
5291
5606
  // src/components/InfiniteTable/components/InfiniteTableRow/useRowDOMProps.ts
5292
5607
  var import_react32 = __toModule(require("react"));
@@ -5319,12 +5634,11 @@ function useRowDOMProps(props, rowProps, rowStyle, rowClassName, groupRenderStra
5319
5634
  domRefFromProps(node);
5320
5635
  domRef.current = node;
5321
5636
  }, []);
5322
- const rowPropsAndStyleArgs = {
5323
- data: rowInfo.data,
5324
- rowInfo,
5637
+ const rest = rowInfo.isGroupRow ? { data: rowInfo.data, rowInfo } : { data: rowInfo.data, rowInfo };
5638
+ const rowPropsAndStyleArgs = __spreadProps(__spreadValues({}, rest), {
5325
5639
  rowIndex,
5326
- groupRowsBy: rowInfo.groupBy
5327
- };
5640
+ groupBy: rowInfo.groupBy
5641
+ });
5328
5642
  if (typeof rowProps === "function") {
5329
5643
  rowProps = rowProps(rowPropsAndStyleArgs);
5330
5644
  }
@@ -5418,12 +5732,12 @@ function InfiniteTableRowFn(props) {
5418
5732
  height: rowHeight
5419
5733
  }, domProps.style);
5420
5734
  const renderCellRef = (0, import_react33.useRef)(null);
5421
- const renderCell = React28.useCallback(({ domRef, itemIndex }) => {
5735
+ const renderCell = React27.useCallback(({ domRef, itemIndex }) => {
5422
5736
  const column = columns[itemIndex];
5423
5737
  if (!column) {
5424
5738
  }
5425
5739
  const hidden = false;
5426
- return /* @__PURE__ */ React28.createElement(InfiniteTableColumnCell, {
5740
+ return /* @__PURE__ */ React27.createElement(InfiniteTableColumnCell, {
5427
5741
  getData,
5428
5742
  rowInfo,
5429
5743
  groupRenderStrategy,
@@ -5450,18 +5764,18 @@ function InfiniteTableRowFn(props) {
5450
5764
  if (true) {
5451
5765
  domProps["data-cmp-name"] = "ITableRow";
5452
5766
  }
5453
- return /* @__PURE__ */ React28.createElement("div", __spreadProps(__spreadValues({}, domProps), {
5767
+ return /* @__PURE__ */ React27.createElement("div", __spreadProps(__spreadValues({}, domProps), {
5454
5768
  style
5455
- }), /* @__PURE__ */ React28.createElement(RawList, {
5769
+ }), /* @__PURE__ */ React27.createElement(RawList, {
5456
5770
  brain,
5457
5771
  renderItem: renderCell,
5458
5772
  debugChannel: `${rowIndex}`
5459
5773
  }));
5460
5774
  }
5461
- var InfiniteTableRow = React28.memo(InfiniteTableRowFn);
5775
+ var InfiniteTableRow = React27.memo(InfiniteTableRowFn);
5462
5776
 
5463
5777
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowUnvirtualized.tsx
5464
- var React29 = __toModule(require("react"));
5778
+ var React28 = __toModule(require("react"));
5465
5779
  function TableRowUnvirtualizedFn(props) {
5466
5780
  const {
5467
5781
  rowHeight,
@@ -5482,7 +5796,7 @@ function TableRowUnvirtualizedFn(props) {
5482
5796
  }, domProps.style);
5483
5797
  const children = columns.map((col) => {
5484
5798
  const hidden = false;
5485
- return /* @__PURE__ */ React29.createElement(InfiniteTableColumnCell, {
5799
+ return /* @__PURE__ */ React28.createElement(InfiniteTableColumnCell, {
5486
5800
  key: col.id,
5487
5801
  virtualized: false,
5488
5802
  rowHeight,
@@ -5495,11 +5809,11 @@ function TableRowUnvirtualizedFn(props) {
5495
5809
  column: col
5496
5810
  });
5497
5811
  });
5498
- return /* @__PURE__ */ React29.createElement("div", __spreadProps(__spreadValues({}, domProps), {
5812
+ return /* @__PURE__ */ React28.createElement("div", __spreadProps(__spreadValues({}, domProps), {
5499
5813
  style
5500
5814
  }), children);
5501
5815
  }
5502
- var TableRowUnvirtualized = React29.memo(TableRowUnvirtualizedFn);
5816
+ var TableRowUnvirtualized = React28.memo(TableRowUnvirtualizedFn);
5503
5817
 
5504
5818
  // src/components/InfiniteTable/hooks/useUnpinnedRendering.tsx
5505
5819
  function useUnpinnedRendering(params) {
@@ -5542,7 +5856,7 @@ function useUnpinnedRendering(params) {
5542
5856
  rowProps.repaintId = repaintId;
5543
5857
  }
5544
5858
  const TableRowComponent = shouldVirtualizeColumns ? InfiniteTableRow : TableRowUnvirtualized;
5545
- return /* @__PURE__ */ React30.createElement(TableRowComponent, __spreadValues({}, rowProps));
5859
+ return /* @__PURE__ */ React29.createElement(TableRowComponent, __spreadValues({}, rowProps));
5546
5860
  }, [
5547
5861
  repaintId,
5548
5862
  rowHeight,
@@ -5552,7 +5866,7 @@ function useUnpinnedRendering(params) {
5552
5866
  horizontalVirtualBrain,
5553
5867
  verticalVirtualBrain
5554
5868
  ]);
5555
- const fakeScrollbar = getScrollbarWidth() ? /* @__PURE__ */ React30.createElement("div", {
5869
+ const fakeScrollbar = getScrollbarWidth() ? /* @__PURE__ */ React29.createElement("div", {
5556
5870
  "data-name": "horizontal-scrollbar-placeholder--fake",
5557
5871
  style: {
5558
5872
  position: "absolute",
@@ -5563,10 +5877,10 @@ function useUnpinnedRendering(params) {
5563
5877
  overflow: "auto",
5564
5878
  visibility: columnShifts ? "visible" : "hidden"
5565
5879
  }
5566
- }, /* @__PURE__ */ React30.createElement("div", {
5880
+ }, /* @__PURE__ */ React29.createElement("div", {
5567
5881
  style: { height: "100%", width: computedUnpinnedColumnsWidth }
5568
5882
  })) : null;
5569
- return rowHeight != 0 ? /* @__PURE__ */ React30.createElement(VirtualRowList, {
5883
+ return rowHeight != 0 ? /* @__PURE__ */ React29.createElement(VirtualRowList, {
5570
5884
  repaintId: `${repaintId}-unpinned-`,
5571
5885
  brain: verticalVirtualBrain,
5572
5886
  onContainerScroll: applyScrollHorizontal,
@@ -5590,20 +5904,20 @@ function useUnpinnedRendering(params) {
5590
5904
  var import_react35 = __toModule(require("react"));
5591
5905
 
5592
5906
  // src/components/InfiniteTable/InfiniteCls.css.ts
5593
- var import_createRuntimeFn4 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
5907
+ var import_createRuntimeFn5 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
5594
5908
  var FooterCls = "_16lm1iw1";
5595
5909
  var InfiniteCls = "_1yeub2v0 _16lm1iw1 _16lm1iwj _16lm1iwz _16lm1iw0";
5596
- var InfiniteClsRecipe = (0, import_createRuntimeFn4.createRuntimeFn)({ defaultClassName: "", variantClassNames: { focused: { true: "_1yeub2v2", false: "_1yeub2v3" }, focusedWithin: { true: "_1yeub2v4", false: "_1yeub2v5" }, hasPinnedStart: { true: "_1yeub2v6", false: "_1yeub2v7" }, hasPinnedEnd: { true: "_1yeub2v8", false: "_1yeub2v9" }, hasPinnedStartOverflow: { true: "_1yeub2va", false: "_1yeub2vb" }, hasPinnedEndOverflow: { true: "_1yeub2vc", false: "_1yeub2vd" } }, defaultVariants: {}, compoundVariants: [] });
5910
+ var InfiniteClsRecipe = (0, import_createRuntimeFn5.createRuntimeFn)({ defaultClassName: "", variantClassNames: { focused: { true: "_1yeub2v2", false: "_1yeub2v3" }, focusedWithin: { true: "_1yeub2v4", false: "_1yeub2v5" }, hasPinnedStart: { true: "_1yeub2v6", false: "_1yeub2v7" }, hasPinnedEnd: { true: "_1yeub2v8", false: "_1yeub2v9" }, hasPinnedStartOverflow: { true: "_1yeub2va", false: "_1yeub2vb" }, hasPinnedEndOverflow: { true: "_1yeub2vc", false: "_1yeub2vd" } }, defaultVariants: {}, compoundVariants: [] });
5597
5911
  var InfiniteClsScrolling = "_1yeub2v1";
5598
5912
  var InfiniteClsShiftingColumns = "_16lm1iwm";
5599
5913
  var PinnedRowsClsVariants = { pinnedStart: "_1yeub2ve", pinnedEnd: "_1yeub2vf", overflow: "_1yeub2vg" };
5600
- var PinnedRowsContainerClsVariants = (0, import_createRuntimeFn4.createRuntimeFn)({ defaultClassName: "", variantClassNames: { pinned: { start: "_1yeub2vh", end: "_1yeub2vi", false: "_1yeub2vj" } }, defaultVariants: {}, compoundVariants: [] });
5914
+ var PinnedRowsContainerClsVariants = (0, import_createRuntimeFn5.createRuntimeFn)({ defaultClassName: "", variantClassNames: { pinned: { start: "_1yeub2vh", end: "_1yeub2vi", false: "_1yeub2vj" } }, defaultVariants: {}, compoundVariants: [] });
5601
5915
 
5602
5916
  // src/components/InfiniteTable/hooks/useOnContainerScroll.ts
5603
5917
  var DELAY = 200;
5604
5918
  var TableClassName = internalProps.rootClassName;
5605
5919
  var TableClassName__Scrolling = `${TableClassName}--scrolling`;
5606
- var SCROLL_BOTTOM_OFFSET = 0;
5920
+ var SCROLL_BOTTOM_OFFSET = 1;
5607
5921
  var useOnContainerScroll = ({
5608
5922
  verticalVirtualBrain,
5609
5923
  horizontalVirtualBrain,
@@ -5619,6 +5933,7 @@ var useOnContainerScroll = ({
5619
5933
  bodySize
5620
5934
  }
5621
5935
  } = useInfiniteTable();
5936
+ const { componentActions: dataSourceActions, getState: getDataSourceState } = useDataSourceContextValue();
5622
5937
  const timeoutIdRef = (0, import_react35.useRef)(0);
5623
5938
  const scrollingRef = (0, import_react35.useRef)(false);
5624
5939
  const scrollTopMaxRef = (0, import_react35.useRef)(0);
@@ -5679,6 +5994,9 @@ var useOnContainerScroll = ({
5679
5994
  const isScrollBottom = scrollTop + offset >= scrollTopMaxRef.current;
5680
5995
  if (isScrollBottom) {
5681
5996
  onScrollToBottom == null ? void 0 : onScrollToBottom();
5997
+ if (getDataSourceState().livePagination) {
5998
+ dataSourceActions.scrollBottomId = Date.now();
5999
+ }
5682
6000
  }
5683
6001
  }, [onContainerScroll, scrollToBottomOffset, onScrollToBottom, onScrollToTop]);
5684
6002
  return {
@@ -5688,11 +6006,11 @@ var useOnContainerScroll = ({
5688
6006
  };
5689
6007
 
5690
6008
  // src/components/InfiniteTable/hooks/usePinnedRendering.tsx
5691
- var React32 = __toModule(require("react"));
6009
+ var React31 = __toModule(require("react"));
5692
6010
  var import_react38 = __toModule(require("react"));
5693
6011
 
5694
6012
  // src/components/VirtualList/RowListWithExternalScrolling.tsx
5695
- var React31 = __toModule(require("react"));
6013
+ var React30 = __toModule(require("react"));
5696
6014
  var import_react37 = __toModule(require("react"));
5697
6015
 
5698
6016
  // src/components/hooks/useOnMount.ts
@@ -5768,7 +6086,7 @@ var RowListWithExternalScrolling = (props) => {
5768
6086
  if (true) {
5769
6087
  domProps["data-cmp-name"] = "RowListWithExternalScrolling";
5770
6088
  }
5771
- return /* @__PURE__ */ React31.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React31.createElement(RawList, {
6089
+ return /* @__PURE__ */ React30.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React30.createElement(RawList, {
5772
6090
  brain,
5773
6091
  renderItem,
5774
6092
  repaintId
@@ -5791,7 +6109,7 @@ function PinnedRowsContainer(props) {
5791
6109
  brain,
5792
6110
  renderRow
5793
6111
  } = props;
5794
- const style = React32.useMemo(() => {
6112
+ const style = React31.useMemo(() => {
5795
6113
  const result = pinning === "end" ? {
5796
6114
  width: rowWidth,
5797
6115
  height,
@@ -5817,7 +6135,7 @@ function PinnedRowsContainer(props) {
5817
6135
  className: join(`${PinnedRowsContainerClassName}`, PinnedRowsClsVariants[pinning === "start" ? "pinnedStart" : "pinnedEnd"], `${PinnedRowsContainerClassName}--pinned-${pinning}`, `${PinnedRowsContainerClassName}--overflow`, PinnedRowsClsVariants.overflow)
5818
6136
  };
5819
6137
  if (hasOverflow) {
5820
- return /* @__PURE__ */ React32.createElement(VirtualScrollContainer, {
6138
+ return /* @__PURE__ */ React31.createElement(VirtualScrollContainer, {
5821
6139
  scrollable: {
5822
6140
  horizontal: true,
5823
6141
  vertical: false
@@ -5833,18 +6151,18 @@ function PinnedRowsContainer(props) {
5833
6151
  className: join(PinnedRowsContainerClsVariants({
5834
6152
  pinned: pinning
5835
6153
  }), `${PinnedRowsContainerClassName}Container`, `${PinnedRowsContainerClassName}Container--pinned-${pinning}`)
5836
- }, /* @__PURE__ */ React32.createElement(RowListWithExternalScrolling, __spreadProps(__spreadValues({}, rowListProps), {
6154
+ }, /* @__PURE__ */ React31.createElement(RowListWithExternalScrolling, __spreadProps(__spreadValues({}, rowListProps), {
5837
6155
  onMount: (node) => {
5838
6156
  pinnedScrollListener == null ? void 0 : pinnedScrollListener.onScroll((scrollPosition) => {
5839
6157
  updateScroll(node, brain.getScrollPosition(), scrollPosition);
5840
6158
  });
5841
6159
  }
5842
- })), /* @__PURE__ */ React32.createElement(SpacePlaceholder, {
6160
+ })), /* @__PURE__ */ React31.createElement(SpacePlaceholder, {
5843
6161
  width: rowWidth,
5844
6162
  height: 1
5845
6163
  }));
5846
6164
  }
5847
- return /* @__PURE__ */ React32.createElement(RowListWithExternalScrolling, __spreadValues({}, rowListProps));
6165
+ return /* @__PURE__ */ React31.createElement(RowListWithExternalScrolling, __spreadValues({}, rowListProps));
5848
6166
  }
5849
6167
  function useRenderPinnedRow(params) {
5850
6168
  const { getData, getState, columnsWidth, columns, verticalBrain } = params;
@@ -5864,7 +6182,7 @@ function useRenderPinnedRow(params) {
5864
6182
  rowWidth: columnsWidth,
5865
6183
  columns
5866
6184
  }, rowParams);
5867
- return /* @__PURE__ */ React32.createElement(TableRowUnvirtualized, __spreadValues({}, rowProps));
6185
+ return /* @__PURE__ */ React31.createElement(TableRowUnvirtualized, __spreadValues({}, rowProps));
5868
6186
  }, [columnsWidth, columns, verticalBrain]);
5869
6187
  return renderPinnedRow;
5870
6188
  }
@@ -5907,7 +6225,7 @@ function usePinnedRenderingForSide(side, params) {
5907
6225
  columns,
5908
6226
  columnsWidth
5909
6227
  });
5910
- const pinnedList = columns.length && rowHeight !== 0 ? /* @__PURE__ */ React32.createElement(PinnedRowsContainer, {
6228
+ const pinnedList = columns.length && rowHeight !== 0 ? /* @__PURE__ */ React31.createElement(PinnedRowsContainer, {
5911
6229
  pinning: side,
5912
6230
  pinnedScrollListener,
5913
6231
  hasOverflow,
@@ -5920,7 +6238,7 @@ function usePinnedRenderingForSide(side, params) {
5920
6238
  brain: verticalVirtualBrain,
5921
6239
  renderRow: renderRowPinned
5922
6240
  }) : null;
5923
- const pinnedScrollbarPlaceholder = pinnedList && hasHorizontalScrollbar && !hasOverflow ? /* @__PURE__ */ React32.createElement(HorizontalScrollbarPlaceholder, {
6241
+ const pinnedScrollbarPlaceholder = pinnedList && hasHorizontalScrollbar && !hasOverflow ? /* @__PURE__ */ React31.createElement(HorizontalScrollbarPlaceholder, {
5924
6242
  style: side === "end" ? {
5925
6243
  width: columnsWidth,
5926
6244
  right: hasVerticalScrollbar ? getScrollbarWidth() : 0
@@ -6464,29 +6782,6 @@ function useYourBrain(param) {
6464
6782
  return { horizontalVirtualBrain, verticalVirtualBrain };
6465
6783
  }
6466
6784
 
6467
- // src/utils/shallowEqualObjects.ts
6468
- function shallowEqualObjects(objA, objB) {
6469
- if (objA === objB) {
6470
- return true;
6471
- }
6472
- if (!objA || !objB) {
6473
- return false;
6474
- }
6475
- var aKeys = Object.keys(objA);
6476
- var bKeys = Object.keys(objB);
6477
- var len = aKeys.length;
6478
- if (bKeys.length !== len) {
6479
- return false;
6480
- }
6481
- for (var i = 0; i < len; i++) {
6482
- var key = aKeys[i];
6483
- if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) {
6484
- return false;
6485
- }
6486
- }
6487
- return true;
6488
- }
6489
-
6490
6785
  // src/components/InfiniteTable/hooks/useListRendering.tsx
6491
6786
  function useListRendering(param) {
6492
6787
  const { computed, bodySize, columnShifts } = param;
@@ -6558,7 +6853,7 @@ function useListRendering(param) {
6558
6853
  });
6559
6854
  const hasHorizontalScrollbar = computedUnpinnedColumnsWidth > bodySize.width - computedPinnedStartColumnsWidth - computedPinnedEndColumnsWidth;
6560
6855
  const reservedContentHeight = verticalVirtualBrain.getTotalSize() + (hasHorizontalScrollbar ? getScrollbarWidth() : 0);
6561
- const hasVerticalScrollbar = bodySize.height < reservedContentHeight;
6856
+ const hasVerticalScrollbar = bodySize.height > 0 && bodySize.height < reservedContentHeight;
6562
6857
  const scrollbars = (0, import_react41.useMemo)(() => ({
6563
6858
  vertical: hasVerticalScrollbar,
6564
6859
  horizontal: hasHorizontalScrollbar
@@ -6576,7 +6871,6 @@ function useListRendering(param) {
6576
6871
  setColumnVisibility: (columnVisibility) => {
6577
6872
  componentActions.columnVisibility = columnVisibility;
6578
6873
  },
6579
- setColumnAggregations: (columnAggregations) => componentActions.columnAggregations = columnAggregations,
6580
6874
  getState,
6581
6875
  getDataSourceState
6582
6876
  };
@@ -6647,15 +6941,14 @@ function useListRendering(param) {
6647
6941
  }
6648
6942
 
6649
6943
  // src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
6650
- var React33 = __toModule(require("react"));
6944
+ var React32 = __toModule(require("react"));
6651
6945
  var import_react42 = __toModule(require("react"));
6652
6946
 
6653
6947
  // src/components/utils/decamelize.ts
6654
- var import_decamelize = __toModule(require_decamelize());
6655
- var decamelize = (input, options) => {
6656
- var _a;
6657
- return (0, import_decamelize.default)(input, { separator: (_a = options == null ? void 0 : options.separator) != null ? _a : "-" });
6658
- };
6948
+ function decamelize(str, options) {
6949
+ const { separator } = options != null ? options : { separator: "-" };
6950
+ return str.replace(/([a-z\d])([A-Z])/g, "$1" + separator + "$2").replace(new RegExp("(" + separator + "[A-Z])([A-Z])", "g"), "$1" + separator + "$2").toLowerCase();
6951
+ }
6659
6952
 
6660
6953
  // src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
6661
6954
  var defaultStyle2 = {
@@ -6684,10 +6977,10 @@ var enforceStyle = (node, style) => {
6684
6977
  node.style.setProperty(decamelize(propertyName), propertyValue, "important");
6685
6978
  }
6686
6979
  };
6687
- var InfiniteTableLicenseFooter = React33.forwardRef(function InfiniteTableLicenseFooter2(props, ref) {
6980
+ var InfiniteTableLicenseFooter = React32.forwardRef(function InfiniteTableLicenseFooter2(props, ref) {
6688
6981
  const { rootClassName: rootClassName12 } = useInternalProps();
6689
- const domRef = React33.useRef(null);
6690
- const domCallback = React33.useCallback((node) => {
6982
+ const domRef = React32.useRef(null);
6983
+ const domCallback = React32.useCallback((node) => {
6691
6984
  domRef.current = node;
6692
6985
  if (!ref) {
6693
6986
  return;
@@ -6712,12 +7005,12 @@ var InfiniteTableLicenseFooter = React33.forwardRef(function InfiniteTableLicens
6712
7005
  clearInterval(intervalId);
6713
7006
  };
6714
7007
  }, []);
6715
- return /* @__PURE__ */ React33.createElement("div", __spreadProps(__spreadValues({
7008
+ return /* @__PURE__ */ React32.createElement("div", __spreadProps(__spreadValues({
6716
7009
  ref: domCallback
6717
7010
  }, props), {
6718
7011
  className: join(`${rootClassName12}-Footer`, FooterCls, props.className),
6719
7012
  style: defaultStyle2
6720
- }), "Powered by", " ", /* @__PURE__ */ React33.createElement("a", {
7013
+ }), "Powered by", " ", /* @__PURE__ */ React32.createElement("a", {
6721
7014
  href: "https://infinite-table.com",
6722
7015
  rel: "noopener noreferrer",
6723
7016
  role: "link",
@@ -6875,11 +7168,11 @@ var SANDBOX_REGEX = /(https):\/\/\d+\-\d+\-\d\-(sandpack\.codesandbox\.io)/g;
6875
7168
  var origin = typeof window !== "undefined" ? window.location.origin : "";
6876
7169
  var [_fullUrl, protocol, sandboxUrl] = Array.from(SANDBOX_REGEX.exec(origin) || []);
6877
7170
  var isInsideSandbox = protocol === "https" && sandboxUrl === "sandpack.codesandbox.io";
6878
- var useLicense = (licenseKey) => {
7171
+ var useLicense = (licenseKey = "") => {
6879
7172
  const valid = (0, import_react43.useMemo)(() => {
6880
7173
  let valid2 = isValidLicense(licenseKey, {
6881
7174
  publishedAt: 1624970570587,
6882
- version: "0.0.7"
7175
+ version: "0.1.0"
6883
7176
  });
6884
7177
  if (!licenseKey && !valid2 && isInsideSandbox) {
6885
7178
  return true;
@@ -6890,9 +7183,9 @@ var useLicense = (licenseKey) => {
6890
7183
  };
6891
7184
 
6892
7185
  // src/components/CSSVariableWatch.tsx
6893
- var React34 = __toModule(require("react"));
7186
+ var React33 = __toModule(require("react"));
6894
7187
  var import_react44 = __toModule(require("react"));
6895
- var error2 = err("CSSVariableWatch");
7188
+ var error = err("CSSVariableWatch");
6896
7189
  var debug5 = dbg("CSSVariableWatch");
6897
7190
  var WRAPPER_STYLE = {
6898
7191
  position: "absolute",
@@ -6905,21 +7198,21 @@ var WRAPPER_STYLE = {
6905
7198
  };
6906
7199
  var useCSSVariableWatch = (params) => {
6907
7200
  const lastValueRef = (0, import_react44.useRef)(0);
6908
- const onResize = React34.useCallback(({ height }) => {
7201
+ const onResize = React33.useCallback(({ height }) => {
6909
7202
  if (height && height !== lastValueRef.current) {
6910
7203
  lastValueRef.current = height;
6911
7204
  params.onChange(height);
6912
7205
  }
6913
7206
  }, [params.onChange]);
6914
7207
  useResizeObserver(params.ref, onResize, { earlyAttach: true });
6915
- React34.useLayoutEffect(() => {
7208
+ React33.useLayoutEffect(() => {
6916
7209
  const value = params.ref.current.getBoundingClientRect().height;
6917
7210
  if (value) {
6918
7211
  lastValueRef.current = value;
6919
7212
  debug5(`Variable ${params.varName} found and equals ${value}.`);
6920
7213
  params.onChange(value);
6921
7214
  } else {
6922
- error2(`Specified variable ${params.varName} not found or does not have a numeric value.`);
7215
+ error(`Specified variable ${params.varName} not found or does not have a numeric value.`);
6923
7216
  }
6924
7217
  }, []);
6925
7218
  };
@@ -6928,11 +7221,11 @@ var CSSVariableWatch = (props) => {
6928
7221
  useCSSVariableWatch(__spreadProps(__spreadValues({}, props), {
6929
7222
  ref: domRef
6930
7223
  }));
6931
- return /* @__PURE__ */ React34.createElement("div", {
7224
+ return /* @__PURE__ */ React33.createElement("div", {
6932
7225
  "data-name": "css-variable-watcher",
6933
7226
  "data-var": props.varName,
6934
7227
  style: WRAPPER_STYLE
6935
- }, /* @__PURE__ */ React34.createElement("div", {
7228
+ }, /* @__PURE__ */ React33.createElement("div", {
6936
7229
  ref: domRef,
6937
7230
  style: {
6938
7231
  height: props.varName.startsWith("var(") ? props.varName : `var(${props.varName})`
@@ -7025,7 +7318,7 @@ function useDOMProps(initialDOMProps) {
7025
7318
  }
7026
7319
 
7027
7320
  // src/components/InfiniteTable/components/LoadMask.tsx
7028
- var React35 = __toModule(require("react"));
7321
+ var React34 = __toModule(require("react"));
7029
7322
 
7030
7323
  // src/components/InfiniteTable/components/LoadMask.css.ts
7031
7324
  var LoadMaskCls = { visible: "qy58ya1 qy58ya0 _16lm1iw2 _16lm1iwr _16lm1iwt _16lm1iwx _16lm1iwv", hidden: "qy58ya2 qy58ya0 _16lm1iw2 _16lm1iwr _16lm1iwt _16lm1iwx _16lm1iwv" };
@@ -7037,15 +7330,15 @@ var { rootClassName: rootClassName11 } = internalProps;
7037
7330
  var baseCls2 = `${rootClassName11}-LoadMask`;
7038
7331
  function LoadMaskFn(props) {
7039
7332
  const { visible, children = "Loading" } = props;
7040
- return /* @__PURE__ */ React35.createElement("div", {
7333
+ return /* @__PURE__ */ React34.createElement("div", {
7041
7334
  className: `${LoadMaskCls[visible ? "visible" : "hidden"]} ${baseCls2}`
7042
- }, /* @__PURE__ */ React35.createElement("div", {
7335
+ }, /* @__PURE__ */ React34.createElement("div", {
7043
7336
  className: `${LoadMaskOverlayCls} ${baseCls2}-Overlay`
7044
- }), /* @__PURE__ */ React35.createElement("div", {
7337
+ }), /* @__PURE__ */ React34.createElement("div", {
7045
7338
  className: `${LoadMaskTextCls} ${baseCls2}-Text`
7046
7339
  }, children));
7047
7340
  }
7048
- var LoadMask = React35.memo(LoadMaskFn);
7341
+ var LoadMask = React34.memo(LoadMaskFn);
7049
7342
 
7050
7343
  // src/components/InfiniteTable/index.tsx
7051
7344
  var InfiniteTableClassName = internalProps.rootClassName;
@@ -7064,11 +7357,17 @@ var InfiniteTableRoot = getComponentStateRoot({
7064
7357
  getParentState: () => useDataSource(),
7065
7358
  debugName: "InfiniteTable"
7066
7359
  });
7067
- var InfiniteTableComponent = React36.memo(function InfiniteTableComponent2() {
7360
+ var InfiniteTableComponent = React35.memo(function InfiniteTableComponent2() {
7068
7361
  var _a;
7069
- const { componentState, getComputed, computed } = useInfiniteTable();
7070
7362
  const {
7071
- componentState: { dataArray, loading }
7363
+ componentState,
7364
+ getComputed,
7365
+ computed,
7366
+ getState: getInfiniteTableState
7367
+ } = useInfiniteTable();
7368
+ const {
7369
+ componentState: { dataArray, loading },
7370
+ getState: getDataSourceState
7072
7371
  } = useDataSourceContextValue();
7073
7372
  const {
7074
7373
  domRef,
@@ -7105,38 +7404,47 @@ var InfiniteTableComponent = React36.memo(function InfiniteTableComponent2() {
7105
7404
  const licenseValid = useLicense(licenseKey);
7106
7405
  const domProps = useDOMProps(componentState.domProps);
7107
7406
  const LoadMaskCmp = (_a = components == null ? void 0 : components.LoadMask) != null ? _a : LoadMask;
7108
- return /* @__PURE__ */ React36.createElement("div", __spreadValues({
7407
+ React35.useLayoutEffect(() => {
7408
+ const dataSourceState = getDataSourceState();
7409
+ const { onScrollbarsChange } = getInfiniteTableState();
7410
+ const { notifyScrollbarsChange } = dataSourceState;
7411
+ if (onScrollbarsChange && dataSourceState.updatedAt && dataSourceState.dataArray.length) {
7412
+ onScrollbarsChange(scrollbars);
7413
+ }
7414
+ notifyScrollbarsChange(scrollbars);
7415
+ }, [scrollbars]);
7416
+ return /* @__PURE__ */ React35.createElement("div", __spreadValues({
7109
7417
  ref: domRef
7110
- }, domProps), header ? /* @__PURE__ */ React36.createElement(TableHeaderWrapper, {
7418
+ }, domProps), header ? /* @__PURE__ */ React35.createElement(TableHeaderWrapper, {
7111
7419
  brain: horizontalVirtualBrain,
7112
7420
  repaintId,
7113
7421
  scrollbars
7114
- }) : null, /* @__PURE__ */ React36.createElement(InfiniteTableBody, null, /* @__PURE__ */ React36.createElement(VirtualScrollContainer, {
7422
+ }) : null, /* @__PURE__ */ React35.createElement(InfiniteTableBody, null, /* @__PURE__ */ React35.createElement(VirtualScrollContainer, {
7115
7423
  ref: scrollerDOMRef,
7116
7424
  onContainerScroll: applyScrollVertical,
7117
7425
  scrollable: ONLY_VERTICAL_SCROLLBAR
7118
- }, /* @__PURE__ */ React36.createElement("div", {
7426
+ }, /* @__PURE__ */ React35.createElement("div", {
7119
7427
  className: display.flex
7120
- }, pinnedStartList, centerList, pinnedEndList), /* @__PURE__ */ React36.createElement(SpacePlaceholder, {
7428
+ }, pinnedStartList, centerList, pinnedEndList), /* @__PURE__ */ React35.createElement(SpacePlaceholder, {
7121
7429
  count: dataArray.length,
7122
7430
  width: 0,
7123
7431
  height: reservedContentHeight
7124
- })), pinnedStartScrollbarPlaceholder, pinnedEndScrollbarPlaceholder, /* @__PURE__ */ React36.createElement(LoadMaskCmp, {
7432
+ })), pinnedStartScrollbarPlaceholder, pinnedEndScrollbarPlaceholder, /* @__PURE__ */ React35.createElement(LoadMaskCmp, {
7125
7433
  visible: loading
7126
- }, loadingText)), licenseValid ? null : /* @__PURE__ */ React36.createElement(InfiniteTableLicenseFooter, null), /* @__PURE__ */ React36.createElement("div", {
7434
+ }, loadingText)), licenseValid ? null : /* @__PURE__ */ React35.createElement(InfiniteTableLicenseFooter, null), /* @__PURE__ */ React35.createElement("div", {
7127
7435
  ref: portalDOMRef,
7128
7436
  className: join(`${rootClassName}Portal`, zIndex[1e3], position.absolute, top[0], left[0])
7129
- }), rowHeightCSSVar ? /* @__PURE__ */ React36.createElement(CSSVariableWatch, {
7437
+ }), rowHeightCSSVar ? /* @__PURE__ */ React35.createElement(CSSVariableWatch, {
7130
7438
  varName: rowHeightCSSVar,
7131
7439
  onChange: onRowHeightCSSVarChange
7132
- }) : null, headerHeightCSSVar ? /* @__PURE__ */ React36.createElement(CSSVariableWatch, {
7440
+ }) : null, headerHeightCSSVar ? /* @__PURE__ */ React35.createElement(CSSVariableWatch, {
7133
7441
  varName: headerHeightCSSVar,
7134
7442
  onChange: onHeaderHeightCSSVarChange
7135
7443
  }) : null);
7136
7444
  });
7137
7445
  function InfiniteTableContextProvider() {
7138
7446
  const { componentActions, componentState } = useComponentState();
7139
- const { scrollerDOMRef } = componentState;
7447
+ const { scrollerDOMRef, scrollTopId } = componentState;
7140
7448
  const computed = useComputed();
7141
7449
  const getComputed = useLatest(computed);
7142
7450
  const getState = useLatest(componentState);
@@ -7165,20 +7473,25 @@ function InfiniteTableContextProvider() {
7165
7473
  }
7166
7474
  componentActions.bodySize = bodySize;
7167
7475
  }, { earlyAttach: true });
7168
- React36.useEffect(() => {
7476
+ React35.useEffect(() => {
7169
7477
  return () => {
7170
7478
  componentState.onRowHeightCSSVarChange.destroy();
7171
7479
  componentState.onHeaderHeightCSSVarChange.destroy();
7172
7480
  };
7173
7481
  }, []);
7482
+ React35.useEffect(() => {
7483
+ if (scrollerDOMRef.current) {
7484
+ scrollerDOMRef.current.scrollTop = 0;
7485
+ }
7486
+ }, [scrollTopId, scrollerDOMRef]);
7174
7487
  const TableContext2 = getInfiniteTableContext();
7175
- return /* @__PURE__ */ React36.createElement(TableContext2.Provider, {
7488
+ return /* @__PURE__ */ React35.createElement(TableContext2.Provider, {
7176
7489
  value: contextValue
7177
- }, /* @__PURE__ */ React36.createElement(InfiniteTableComponent, null));
7490
+ }, /* @__PURE__ */ React35.createElement(InfiniteTableComponent, null));
7178
7491
  }
7179
7492
  function InfiniteTable(props) {
7180
- const table = /* @__PURE__ */ React36.createElement(InfiniteTableRoot, __spreadValues({}, props), /* @__PURE__ */ React36.createElement(InfiniteTableContextProvider, null));
7181
- return /* @__PURE__ */ React36.createElement(React36.StrictMode, null, table);
7493
+ const table = /* @__PURE__ */ React35.createElement(InfiniteTableRoot, __spreadValues({}, props), /* @__PURE__ */ React35.createElement(InfiniteTableContextProvider, null));
7494
+ return /* @__PURE__ */ React35.createElement(React35.StrictMode, null, table);
7182
7495
  }
7183
7496
  InfiniteTable.defaultProps = {
7184
7497
  rowHeight: 40,