@infinite-table/infinite-react 5.0.0-canary.8 → 5.0.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.dev.js CHANGED
@@ -1304,49 +1304,6 @@ function buildSubscriptionCallback(withRaf = false) {
1304
1304
  return updater;
1305
1305
  }
1306
1306
 
1307
- // src/components/InfiniteTable/vars.css.ts
1308
- var ThemeVars = { color: { accent: "var(--infinite-accent-color)", success: "var(--infinite-success-color)", error: "var(--infinite-error-color)", color: "var(--infinite-color)" }, spacing: { "0": "var(--infinite-space-0)", "1": "var(--infinite-space-1)", "2": "var(--infinite-space-2)", "3": "var(--infinite-space-3)", "4": "var(--infinite-space-4)", "5": "var(--infinite-space-5)", "6": "var(--infinite-space-6)", "7": "var(--infinite-space-7)", "8": "var(--infinite-space-8)", "9": "var(--infinite-space-9)", "10": "var(--infinite-space-10)" }, fontSize: { "0": "var(--infinite-font-size-0)", "1": "var(--infinite-font-size-1)", "2": "var(--infinite-font-size-2)", "3": "var(--infinite-font-size-3)", "4": "var(--infinite-font-size-4)", "5": "var(--infinite-font-size-5)", "6": "var(--infinite-font-size-6)", "7": "var(--infinite-font-size-7)" }, fontFamily: "var(--infinite-font-family)", minHeight: "var(--infinite-min-height)", borderRadius: "var(--infinite-border-radius)", background: "var(--infinite-background)", iconSize: "var(--infinite-icon-size)", runtime: { bodyWidth: "var(--infinite-runtime-body-content-width)", totalVisibleColumnsWidthValue: "var(--infinite-runtime-total-visible-columns-width)", totalVisibleColumnsWidthVar: "var(--infinite-runtime-total-visible-columns-width-var)", visibleColumnsCount: "var(--infinite-runtime-visible-columns-count)", browserScrollbarWidth: "var(--infinite-runtime-browser-scrollbar-width)" }, components: { LoadMask: { padding: "var(--infinite-load-mask-padding)", color: "var(--infinite-load-mask-color)", textBackground: "var(--infinite-load-mask-text-background)", overlayBackground: "var(--infinite-load-mask-overlay-background)", overlayOpacity: "var(--infinite-load-mask-overlay-opacity)", borderRadius: "var(--infinite-load-mask-border-radius)" }, Header: { background: "var(--infinite-header-background)", color: "var(--infinite-header-color)", columnHeaderHeight: "var(--infinite-column-header-height)" }, HeaderCell: { background: "var(--infinite-header-cell-background)", hoverBackground: "var(--infinite-header-cell-hover-background)", border: "var(--infinite-header-cell-border)", padding: "var(--infinite-header-cell-padding)", paddingX: "var(--infinite-header-cell-padding-x)", paddingY: "var(--infinite-header-cell-padding-y)", iconSize: "var(--infinite-header-cell-icon-size)", menuIconLineWidth: "var(--infinite-header-cell-menu-icon-line-width)", sortIconMargin: "var(--infinite-header-cell-sort-icon-margin)", borderRight: "var(--infinite-header-cell-border-right)", resizeHandleActiveAreaWidth: "var(--infinite-resize-handle-active-area-width)", resizeHandleWidth: "var(--infinite-resize-handle-width)", resizeHandleHoverBackground: "var(--infinite-resize-handle-hover-background)", resizeHandleConstrainedHoverBackground: "var(--infinite-resize-handle-constrained-hover-background)", filterOperatorPaddingX: "var(--infinite-filter-operator-padding-x)", filterEditorPaddingX: "var(--infinite-filter-editor-padding-x)", filterEditorMarginX: "var(--infinite-filter-editor-margin-x)", filterOperatorPaddingY: "var(--infinite-filter-operator-padding-y)", filterEditorPaddingY: "var(--infinite-filter-editor-padding-y)", filterEditorMarginY: "var(--infinite-filter-editor-margin-y)", filterEditorBackground: "var(--infinite-filter-editor-background)", filterEditorBorder: "var(--infinite-filter-editor-border)", filterEditorFocusBorderColor: "var(--infinite-filter-editor-focus-border-color)", filterEditorBorderRadius: "var(--infinite-filter-editor-border-radius)", filterEditorColor: "var(--infinite-filter-editor-color)" }, ActiveCellIndicator: { inset: "var(--infinite-active-cell-indicator-inset)" }, Cell: { flashingDuration: "var(--infinite-flashing-duration)", flashingAnimationName: "var(--infinite-flashing-animation-name)", flashingOverlayZIndex: "var(--infinite-flashing-overlay-z-index)", flashingBackground: "var(--infinite-flashing-background)", flashingUpBackground: "var(--infinite-flashing-up-background)", flashingDownBackground: "var(--infinite-flashing-down-background)", padding: "var(--infinite-cell-padding)", borderWidth: "var(--infinite-cell-border-width)", border: "var(--infinite-cell-border)", borderLeft: "var(--infinite-cell-border-left)", borderRight: "var(--infinite-cell-border-right)", borderTop: "var(--infinite-cell-border-top)", borderInvisible: "var(--infinite-cell-border-invisible)", borderRadius: "var(--infinite-cell-border-radius)", reorderEffectDuration: "var(--infinite-column-reorder-effect-duration)", pinnedBorder: "var(--infinite-pinned-cell-border)", color: "var(--infinite-cell-color)", selectedBackground: "var(--infinite-selected-cell-background)", selectedBackgroundDefault: "var(--infinite-selected-cell-background-default)", selectedBackgroundAlpha: "var(--infinite-selected-cell-background-alpha)", selectedBackgroundAlphaWhenTableUnfocused: "var(--infinite-selected-cell-background-alpha--table-unfocused)", selectedBorderColor: "var(--infinite-selected-cell-border-color)", selectedBorderWidth: "var(--infinite-selected-cell-border-width)", selectedBorderStyle: "var(--infinite-selected-cell-border-style)", selectedBorder: "var(--infinite-selected-cell-border)", activeBackgroundAlpha: "var(--infinite-active-cell-background-alpha)", activeBackgroundAlphaWhenTableUnfocused: "var(--infinite-active-cell-background-alpha--table-unfocused)", activeBackground: "var(--infinite-active-cell-background)", activeBackgroundDefault: "var(--infinite-active-cell-background-default)", activeBorderColor: "var(--infinite-active-cell-border-color)", activeBorderWidth: "var(--infinite-active-cell-border-width)", activeBorderStyle: "var(--infinite-active-cell-border-style)", activeBorder: "var(--infinite-active-cell-border)" }, SelectionCheckBox: { marginInline: "var(--infinite-selection-checkbox-margin-inline)" }, Menu: { background: "var(--infinite-menu-background)", color: "var(--infinite-menu-color)", separatorColor: "var(--infinite-menu-separator-color)", padding: "var(--infinite-menu-padding)", cellPaddingVertical: "var(--infinite-menu-cell-padding-vertical)", cellPaddingHorizontal: "var(--infinite-menu-cell-padding-horizontal)", cellMarginVertical: "var(--infinite-menu-cell-margin-vertical)", itemDisabledBackground: "var(--infinite-menu-item-disabled-background)", itemActiveBackground: "var(--infinite-menu-item-active-background)", itemActiveOpacity: "var(--infinite-menu-item-active-opacity)", itemPressedOpacity: "var(--infinite-menu-item-pressed-opacity)", itemPressedBackground: "var(--infinite-menu-item-pressed-background)", itemDisabledOpacity: "var(--infinite-menu-item-disabled-opacity)", borderRadius: "var(--infinite-menu-border-radius)", shadowColor: "var(--infinite-menu-shadow-color)" }, RowDetail: { background: "var(--infinite-rowdetail-background)", padding: "var(--infinite-rowdetail-padding)", gridHeight: "var(--infinite-rowdetail-grid-height)" }, Row: { background: "var(--infinite-row-background)", oddBackground: "var(--infinite-row-odd-background)", disabledBackground: "var(--infinite-row-disabled-background)", oddDisabledBackground: "var(--infinite-row-odd-disabled-background)", selectedBackground: "var(--infinite-row-selected-background)", disabledOpacity: "var(--infinite-row-disabled-opacity)", activeBackground: "var(--infinite-active-row-background)", activeBorderColor: "var(--infinite-active-row-border-color)", activeBorderWidth: "var(--infinite-active-row-border-width)", activeBorderStyle: "var(--infinite-active-row-border-style)", activeBorder: "var(--infinite-active-row-border)", activeBackgroundAlpha: "var(--infinite-active-row-background-alpha)", activeBackgroundAlphaWhenTableUnfocused: "var(--infinite-active-row-background-alpha--table-unfocused)", hoverBackground: "var(--infinite-row-hover-background)", selectedHoverBackground: "var(--infinite-row-selected-hover-background)", selectedDisabledBackground: "var(--infinite-row-selected-disabled-background)", groupRowBackground: "var(--infinite-group-row-background)", groupRowColumnNesting: "var(--infinite-group-row-column-nesting)", groupNesting: "var(--infinite-dont-override-group-row-nesting-length)", pointerEventsWhileScrolling: "var(--infinite-row-pointer-events-while-scrolling)" }, ColumnCell: { background: "var(--infinite-column-cell-bg-dont-override)" } } };
1309
- var columnHeaderHeightName = "column-header-height";
1310
-
1311
- // src/components/HeadlessTable/ReactHeadlessTableRenderer.tsx
1312
- var React9 = __toESM(require("react"));
1313
-
1314
- // src/utils/mathIntersection.ts
1315
- function arrayIntersection(...arrays) {
1316
- if (!arrays.length) {
1317
- return [];
1318
- }
1319
- const map2 = /* @__PURE__ */ new Map();
1320
- arrays.forEach((arr) => {
1321
- for (let i = 0, len2 = arr.length; i < len2; i++) {
1322
- const item = arr[i];
1323
- const count = map2.get(item) ?? 0;
1324
- map2.set(item, count + 1);
1325
- }
1326
- return map2;
1327
- });
1328
- const len = arrays.length;
1329
- return arrays[0].filter((x) => {
1330
- return map2.get(x) === len;
1331
- });
1332
- }
1333
-
1334
- // src/utils/raf.ts
1335
- var raf = getGlobal().requestAnimationFrame || ((fn) => {
1336
- return setTimeout(fn, 16);
1337
- });
1338
- var cancelRaf = getGlobal().cancelAnimationFrame || ((timeoutId) => {
1339
- return clearTimeout(timeoutId);
1340
- });
1341
-
1342
- // src/utils/stripVar.ts
1343
- function stripVar(cssVariableWithVarString) {
1344
- return cssVariableWithVarString.slice(4, -1);
1345
- }
1346
-
1347
- // src/components/InfiniteTable/internalVars.css.ts
1348
- var InternalVars = { currentColumnTransformX: "var(--currentColumnTransformX__16hkbkc0)", y: "var(--y__16hkbkc1)", currentFlashingBackground: "var(--currentFlashingBackground__16hkbkc2)", currentFlashingDuration: "var(--currentFlashingDuration__16hkbkc3)", activeCellRowOffset: "var(--activeCellRowOffset__16hkbkc4)", activeCellRowOffsetX: "var(--activeCellRowOffsetX__16hkbkc5)", activeCellRowHeight: "var(--activeCellRowHeight__16hkbkc6)", activeCellOffsetX: "var(--activeCellOffsetX__16hkbkc7)", activeCellOffsetY: "var(--activeCellOffsetY__16hkbkc8)", scrollTopForActiveRow: "var(--scrollTopForActiveRow__16hkbkc9)", scrollLeftForActiveRowWhenHorizontalLayout: "var(--scrollLeftForActiveRowWhenHorizontalLayout__16hkbkca)", activeCellColWidth: "var(--activeCellColWidth__16hkbkcb)", activeCellColOffset: "var(--activeCellColOffset__16hkbkcc)", columnReorderEffectDurationAtIndex: "var(--columnReorderEffectDurationAtIndex__16hkbkcd)", columnWidthAtIndex: "var(--columnWidthAtIndex__16hkbkce)", columnOffsetAtIndex: "var(--columnOffsetAtIndex__16hkbkcf)", columnOffsetAtIndexWhileReordering: "var(--columnOffsetAtIndexWhileReordering__16hkbkcg)", columnZIndexAtIndex: "var(--columnZIndexAtIndex__16hkbkch)", pinnedStartWidth: "var(--pinnedStartWidth__16hkbkci)", pinnedEndWidth: "var(--pinnedEndWidth__16hkbkcj)", pinnedEndOffset: "var(--pinnedEndOffset__16hkbkck)", computedVisibleColumnsCount: "var(--computedVisibleColumnsCount__16hkbkcl)", baseZIndexForCells: "var(--baseZIndexForCells__16hkbkcm)", bodyWidth: "var(--bodyWidth__16hkbkcn)", bodyHeight: "var(--bodyHeight__16hkbkco)", scrollbarWidthHorizontal: "var(--scrollbarWidthHorizontal__16hkbkcp)", scrollbarWidthVertical: "var(--scrollbarWidthVertical__16hkbkcq)", scrollLeft: "var(--scrollLeft__16hkbkcr)", scrollTop: "var(--scrollTop__16hkbkcs)" };
1349
-
1350
1307
  // src/utils/selectParent.ts
1351
1308
  function selectParent(el, selector2) {
1352
1309
  let node = el;
@@ -1382,12 +1339,24 @@ function selectParentUntil(el, selector2, root) {
1382
1339
  return null;
1383
1340
  }
1384
1341
 
1342
+ // src/utils/stripVar.ts
1343
+ function stripVar(cssVariableWithVarString) {
1344
+ return cssVariableWithVarString.slice(4, -1);
1345
+ }
1346
+
1385
1347
  // src/components/InfiniteTable/internalProps.ts
1386
1348
  var rootClassName2 = "Infinite";
1387
1349
  var internalProps = {
1388
1350
  rootClassName: rootClassName2
1389
1351
  };
1390
1352
 
1353
+ // src/components/InfiniteTable/internalVars.css.ts
1354
+ var InternalVars = { currentColumnTransformX: "var(--currentColumnTransformX__16hkbkc0)", y: "var(--y__16hkbkc1)", currentFlashingBackground: "var(--currentFlashingBackground__16hkbkc2)", currentFlashingDuration: "var(--currentFlashingDuration__16hkbkc3)", activeCellRowOffset: "var(--activeCellRowOffset__16hkbkc4)", activeCellRowOffsetX: "var(--activeCellRowOffsetX__16hkbkc5)", activeCellRowHeight: "var(--activeCellRowHeight__16hkbkc6)", activeCellOffsetX: "var(--activeCellOffsetX__16hkbkc7)", activeCellOffsetY: "var(--activeCellOffsetY__16hkbkc8)", scrollTopForActiveRow: "var(--scrollTopForActiveRow__16hkbkc9)", scrollLeftForActiveRowWhenHorizontalLayout: "var(--scrollLeftForActiveRowWhenHorizontalLayout__16hkbkca)", activeCellColWidth: "var(--activeCellColWidth__16hkbkcb)", activeCellColOffset: "var(--activeCellColOffset__16hkbkcc)", columnReorderEffectDurationAtIndex: "var(--columnReorderEffectDurationAtIndex__16hkbkcd)", columnWidthAtIndex: "var(--columnWidthAtIndex__16hkbkce)", columnOffsetAtIndex: "var(--columnOffsetAtIndex__16hkbkcf)", columnOffsetAtIndexWhileReordering: "var(--columnOffsetAtIndexWhileReordering__16hkbkcg)", columnZIndexAtIndex: "var(--columnZIndexAtIndex__16hkbkch)", pinnedStartWidth: "var(--pinnedStartWidth__16hkbkci)", pinnedEndWidth: "var(--pinnedEndWidth__16hkbkcj)", pinnedEndOffset: "var(--pinnedEndOffset__16hkbkck)", computedVisibleColumnsCount: "var(--computedVisibleColumnsCount__16hkbkcl)", baseZIndexForCells: "var(--baseZIndexForCells__16hkbkcm)", bodyWidth: "var(--bodyWidth__16hkbkcn)", bodyHeight: "var(--bodyHeight__16hkbkco)", scrollbarWidthHorizontal: "var(--scrollbarWidthHorizontal__16hkbkcp)", scrollbarWidthVertical: "var(--scrollbarWidthVertical__16hkbkcq)", scrollLeft: "var(--scrollLeft__16hkbkcr)", scrollTop: "var(--scrollTop__16hkbkcs)" };
1355
+
1356
+ // src/components/InfiniteTable/vars.css.ts
1357
+ var ThemeVars = { color: { accent: "var(--infinite-accent-color)", success: "var(--infinite-success-color)", error: "var(--infinite-error-color)", color: "var(--infinite-color)" }, spacing: { "0": "var(--infinite-space-0)", "1": "var(--infinite-space-1)", "2": "var(--infinite-space-2)", "3": "var(--infinite-space-3)", "4": "var(--infinite-space-4)", "5": "var(--infinite-space-5)", "6": "var(--infinite-space-6)", "7": "var(--infinite-space-7)", "8": "var(--infinite-space-8)", "9": "var(--infinite-space-9)", "10": "var(--infinite-space-10)" }, fontSize: { "0": "var(--infinite-font-size-0)", "1": "var(--infinite-font-size-1)", "2": "var(--infinite-font-size-2)", "3": "var(--infinite-font-size-3)", "4": "var(--infinite-font-size-4)", "5": "var(--infinite-font-size-5)", "6": "var(--infinite-font-size-6)", "7": "var(--infinite-font-size-7)" }, fontFamily: "var(--infinite-font-family)", minHeight: "var(--infinite-min-height)", borderRadius: "var(--infinite-border-radius)", background: "var(--infinite-background)", iconSize: "var(--infinite-icon-size)", runtime: { bodyWidth: "var(--infinite-runtime-body-content-width)", totalVisibleColumnsWidthValue: "var(--infinite-runtime-total-visible-columns-width)", totalVisibleColumnsWidthVar: "var(--infinite-runtime-total-visible-columns-width-var)", visibleColumnsCount: "var(--infinite-runtime-visible-columns-count)", browserScrollbarWidth: "var(--infinite-runtime-browser-scrollbar-width)" }, components: { LoadMask: { padding: "var(--infinite-load-mask-padding)", color: "var(--infinite-load-mask-color)", textBackground: "var(--infinite-load-mask-text-background)", overlayBackground: "var(--infinite-load-mask-overlay-background)", overlayOpacity: "var(--infinite-load-mask-overlay-opacity)", borderRadius: "var(--infinite-load-mask-border-radius)" }, Header: { background: "var(--infinite-header-background)", color: "var(--infinite-header-color)", columnHeaderHeight: "var(--infinite-column-header-height)" }, HeaderCell: { background: "var(--infinite-header-cell-background)", hoverBackground: "var(--infinite-header-cell-hover-background)", border: "var(--infinite-header-cell-border)", padding: "var(--infinite-header-cell-padding)", paddingX: "var(--infinite-header-cell-padding-x)", paddingY: "var(--infinite-header-cell-padding-y)", iconSize: "var(--infinite-header-cell-icon-size)", menuIconLineWidth: "var(--infinite-header-cell-menu-icon-line-width)", sortIconMargin: "var(--infinite-header-cell-sort-icon-margin)", borderRight: "var(--infinite-header-cell-border-right)", resizeHandleActiveAreaWidth: "var(--infinite-resize-handle-active-area-width)", resizeHandleWidth: "var(--infinite-resize-handle-width)", resizeHandleHoverBackground: "var(--infinite-resize-handle-hover-background)", resizeHandleConstrainedHoverBackground: "var(--infinite-resize-handle-constrained-hover-background)", filterOperatorPaddingX: "var(--infinite-filter-operator-padding-x)", filterEditorPaddingX: "var(--infinite-filter-editor-padding-x)", filterEditorMarginX: "var(--infinite-filter-editor-margin-x)", filterOperatorPaddingY: "var(--infinite-filter-operator-padding-y)", filterEditorPaddingY: "var(--infinite-filter-editor-padding-y)", filterEditorMarginY: "var(--infinite-filter-editor-margin-y)", filterEditorBackground: "var(--infinite-filter-editor-background)", filterEditorBorder: "var(--infinite-filter-editor-border)", filterEditorFocusBorderColor: "var(--infinite-filter-editor-focus-border-color)", filterEditorBorderRadius: "var(--infinite-filter-editor-border-radius)", filterEditorColor: "var(--infinite-filter-editor-color)" }, ActiveCellIndicator: { inset: "var(--infinite-active-cell-indicator-inset)" }, Cell: { flashingDuration: "var(--infinite-flashing-duration)", flashingAnimationName: "var(--infinite-flashing-animation-name)", flashingOverlayZIndex: "var(--infinite-flashing-overlay-z-index)", flashingBackground: "var(--infinite-flashing-background)", flashingUpBackground: "var(--infinite-flashing-up-background)", flashingDownBackground: "var(--infinite-flashing-down-background)", padding: "var(--infinite-cell-padding)", borderWidth: "var(--infinite-cell-border-width)", border: "var(--infinite-cell-border)", borderLeft: "var(--infinite-cell-border-left)", borderRight: "var(--infinite-cell-border-right)", borderTop: "var(--infinite-cell-border-top)", borderInvisible: "var(--infinite-cell-border-invisible)", borderRadius: "var(--infinite-cell-border-radius)", reorderEffectDuration: "var(--infinite-column-reorder-effect-duration)", pinnedBorder: "var(--infinite-pinned-cell-border)", horizontalLayoutColumnReorderDisabledPageOpacity: "var(--infinite-horizontal-layout-column-reorder-disabled-page-opacity)", color: "var(--infinite-cell-color)", selectedBackground: "var(--infinite-selected-cell-background)", selectedBackgroundDefault: "var(--infinite-selected-cell-background-default)", selectedBackgroundAlpha: "var(--infinite-selected-cell-background-alpha)", selectedBackgroundAlphaWhenTableUnfocused: "var(--infinite-selected-cell-background-alpha--table-unfocused)", selectedBorderColor: "var(--infinite-selected-cell-border-color)", selectedBorderWidth: "var(--infinite-selected-cell-border-width)", selectedBorderStyle: "var(--infinite-selected-cell-border-style)", selectedBorder: "var(--infinite-selected-cell-border)", activeBackgroundAlpha: "var(--infinite-active-cell-background-alpha)", activeBackgroundAlphaWhenTableUnfocused: "var(--infinite-active-cell-background-alpha--table-unfocused)", activeBackground: "var(--infinite-active-cell-background)", activeBackgroundDefault: "var(--infinite-active-cell-background-default)", activeBorderColor: "var(--infinite-active-cell-border-color)", activeBorderWidth: "var(--infinite-active-cell-border-width)", activeBorderStyle: "var(--infinite-active-cell-border-style)", activeBorder: "var(--infinite-active-cell-border)" }, SelectionCheckBox: { marginInline: "var(--infinite-selection-checkbox-margin-inline)" }, Menu: { background: "var(--infinite-menu-background)", color: "var(--infinite-menu-color)", separatorColor: "var(--infinite-menu-separator-color)", padding: "var(--infinite-menu-padding)", cellPaddingVertical: "var(--infinite-menu-cell-padding-vertical)", cellPaddingHorizontal: "var(--infinite-menu-cell-padding-horizontal)", cellMarginVertical: "var(--infinite-menu-cell-margin-vertical)", itemDisabledBackground: "var(--infinite-menu-item-disabled-background)", itemActiveBackground: "var(--infinite-menu-item-active-background)", itemActiveOpacity: "var(--infinite-menu-item-active-opacity)", itemPressedOpacity: "var(--infinite-menu-item-pressed-opacity)", itemPressedBackground: "var(--infinite-menu-item-pressed-background)", itemDisabledOpacity: "var(--infinite-menu-item-disabled-opacity)", borderRadius: "var(--infinite-menu-border-radius)", shadowColor: "var(--infinite-menu-shadow-color)" }, RowDetail: { background: "var(--infinite-rowdetail-background)", padding: "var(--infinite-rowdetail-padding)", gridHeight: "var(--infinite-rowdetail-grid-height)" }, Row: { background: "var(--infinite-row-background)", oddBackground: "var(--infinite-row-odd-background)", disabledBackground: "var(--infinite-row-disabled-background)", oddDisabledBackground: "var(--infinite-row-odd-disabled-background)", selectedBackground: "var(--infinite-row-selected-background)", disabledOpacity: "var(--infinite-row-disabled-opacity)", activeBackground: "var(--infinite-active-row-background)", activeBorderColor: "var(--infinite-active-row-border-color)", activeBorderWidth: "var(--infinite-active-row-border-width)", activeBorderStyle: "var(--infinite-active-row-border-style)", activeBorder: "var(--infinite-active-row-border)", activeBackgroundAlpha: "var(--infinite-active-row-background-alpha)", activeBackgroundAlphaWhenTableUnfocused: "var(--infinite-active-row-background-alpha--table-unfocused)", hoverBackground: "var(--infinite-row-hover-background)", selectedHoverBackground: "var(--infinite-row-selected-hover-background)", selectedDisabledBackground: "var(--infinite-row-selected-disabled-background)", groupRowBackground: "var(--infinite-group-row-background)", groupRowColumnNesting: "var(--infinite-group-row-column-nesting)", groupNesting: "var(--infinite-dont-override-group-row-nesting-length)", pointerEventsWhileScrolling: "var(--infinite-row-pointer-events-while-scrolling)" }, ColumnCell: { background: "var(--infinite-column-cell-bg-dont-override)" } } };
1358
+ var columnHeaderHeightName = "column-header-height";
1359
+
1391
1360
  // src/components/InfiniteTable/utils/infiniteDOMUtils.ts
1392
1361
  var InfiniteSelector = `.${internalProps.rootClassName}`;
1393
1362
  function getParentInfiniteNode(node) {
@@ -1410,34 +1379,20 @@ function setInfiniteVarOnRoot(varName, varValue, node) {
1410
1379
  }
1411
1380
  function setInfiniteVarOnNode(varName, varValue, node) {
1412
1381
  if (node) {
1413
- const prop = InternalVars[varName] ? stripVar(InternalVars[varName]) : varName;
1382
+ const name = varName;
1383
+ const prop = InternalVars[name] ? stripVar(InternalVars[name]) : varName;
1414
1384
  node.style.setProperty(prop, `${varValue}`);
1415
1385
  }
1416
1386
  }
1417
1387
  function setInfiniteVarsOnNode(vars, node) {
1418
1388
  if (node) {
1419
1389
  for (var varName in vars) {
1420
- node.style.setProperty(
1421
- InternalVars[varName] ? stripVar(InternalVars[varName]) : varName,
1422
- `${vars[varName]}`
1423
- );
1390
+ const propName = InternalVars[varName] ? stripVar(InternalVars[varName]) : varName;
1391
+ const propValue = `${vars[varName]}`;
1392
+ node.style.setProperty(propName, propValue);
1424
1393
  }
1425
1394
  }
1426
1395
  }
1427
- function setInfiniteColumnWidth(colIndex, colWidth, node) {
1428
- setInfiniteVarOnRoot(
1429
- `${columnWidthAtIndex}-${colIndex}`,
1430
- typeof colWidth === "number" ? colWidth + "px" : colWidth,
1431
- node
1432
- );
1433
- }
1434
- function setInfiniteColumnOffset(colIndex, colOffset, node) {
1435
- setInfiniteVarOnRoot(
1436
- `${columnOffsetAtIndex}-${colIndex}`,
1437
- typeof colOffset === "number" ? colOffset + "px" : colOffset,
1438
- node
1439
- );
1440
- }
1441
1396
  function addToInfiniteColumnOffset(column, amountToAdd, node) {
1442
1397
  setInfiniteVarOnRoot(
1443
1398
  `${columnOffsetAtIndex}-${column.computedVisibleIndex}`,
@@ -1474,12 +1429,42 @@ function restoreInfiniteColumnReorderDuration(colIndex, node) {
1474
1429
  node
1475
1430
  );
1476
1431
  }
1477
- function getCSSVarNameForColWidth(colIndex) {
1478
- return `${columnWidthAtIndex}-${colIndex}`;
1479
- }
1480
- function getCSSVarNameForColOffset(colIndex) {
1481
- return `${columnOffsetAtIndex}-${colIndex}`;
1482
- }
1432
+ var InternalVarUtils = {
1433
+ columnWidths: {
1434
+ get(index) {
1435
+ return `var(${this.getVarName(index)})`;
1436
+ },
1437
+ getVarName(index) {
1438
+ return this.varName.get(index);
1439
+ },
1440
+ varName: {
1441
+ get(index) {
1442
+ return `${columnWidthAtIndex}-${index}`;
1443
+ }
1444
+ },
1445
+ set(index, value, node) {
1446
+ value = typeof value === "number" ? value + "px" : value;
1447
+ setInfiniteVarOnRoot(this.varName.get(index), value, node);
1448
+ }
1449
+ },
1450
+ columnOffsets: {
1451
+ get(index) {
1452
+ return `var(${this.getVarName(index)})`;
1453
+ },
1454
+ getVarName(index) {
1455
+ return this.varName.get(index);
1456
+ },
1457
+ varName: {
1458
+ get(index) {
1459
+ return `${columnOffsetAtIndex}-${index}`;
1460
+ }
1461
+ },
1462
+ set(index, value, node) {
1463
+ value = typeof value === "number" ? value + "px" : value;
1464
+ setInfiniteVarOnRoot(this.varName.get(index), value, node);
1465
+ }
1466
+ }
1467
+ };
1483
1468
  function setInfiniteScrollPosition(scrollPosition, node) {
1484
1469
  setInfiniteVarsOnNode(
1485
1470
  {
@@ -1490,6 +1475,37 @@ function setInfiniteScrollPosition(scrollPosition, node) {
1490
1475
  );
1491
1476
  }
1492
1477
 
1478
+ // src/components/HeadlessTable/ReactHeadlessTableRenderer.tsx
1479
+ var React9 = __toESM(require("react"));
1480
+
1481
+ // src/utils/mathIntersection.ts
1482
+ function arrayIntersection(...arrays) {
1483
+ if (!arrays.length) {
1484
+ return [];
1485
+ }
1486
+ const map2 = /* @__PURE__ */ new Map();
1487
+ arrays.forEach((arr) => {
1488
+ for (let i = 0, len2 = arr.length; i < len2; i++) {
1489
+ const item = arr[i];
1490
+ const count = map2.get(item) ?? 0;
1491
+ map2.set(item, count + 1);
1492
+ }
1493
+ return map2;
1494
+ });
1495
+ const len = arrays.length;
1496
+ return arrays[0].filter((x) => {
1497
+ return map2.get(x) === len;
1498
+ });
1499
+ }
1500
+
1501
+ // src/utils/raf.ts
1502
+ var raf = getGlobal().requestAnimationFrame || ((fn) => {
1503
+ return setTimeout(fn, 16);
1504
+ });
1505
+ var cancelRaf = getGlobal().cancelAnimationFrame || ((timeoutId) => {
1506
+ return clearTimeout(timeoutId);
1507
+ });
1508
+
1493
1509
  // src/components/VirtualBrain/MatrixBrain.ts
1494
1510
  var import_binary_search = __toESM(require_binary_search());
1495
1511
 
@@ -1500,7 +1516,41 @@ var ALL_DIRECTIONS = {
1500
1516
  vertical: true
1501
1517
  };
1502
1518
 
1519
+ // src/components/VirtualBrain/getGreatestCountVisibleInSize.ts
1520
+ function getGreatestCountVisibleInSize(availableSize, itemSizes) {
1521
+ const len = itemSizes.length;
1522
+ if (!len) {
1523
+ return 0;
1524
+ }
1525
+ let maxCount = -1;
1526
+ for (let start = 0; start < len; start++) {
1527
+ let sum2 = 0;
1528
+ let count = 0;
1529
+ if (len - start <= maxCount) {
1530
+ break;
1531
+ }
1532
+ for (let i = start; i < len; i++) {
1533
+ sum2 += itemSizes[i];
1534
+ count++;
1535
+ if (sum2 > availableSize) {
1536
+ if (count > maxCount) {
1537
+ maxCount = count;
1538
+ }
1539
+ break;
1540
+ }
1541
+ }
1542
+ }
1543
+ return maxCount < 0 ? len : Math.min(maxCount, len);
1544
+ }
1545
+
1503
1546
  // src/components/VirtualBrain/MatrixBrain.ts
1547
+ var DEFAULT_EXTEND_BY = {
1548
+ start: 0,
1549
+ end: 0
1550
+ };
1551
+ var immediateCallback = (fn) => {
1552
+ fn();
1553
+ };
1504
1554
  var getRenderRangeCellCount = (range) => {
1505
1555
  const { start, end } = range;
1506
1556
  const [startRow, startCol] = start;
@@ -1525,6 +1575,8 @@ var MatrixBrain = class extends Logger {
1525
1575
  const logName = `MatrixBrain${name ? `:${name}` : ""}`;
1526
1576
  super(logName);
1527
1577
  this.scrolling = false;
1578
+ this.RENDER_COUNT_SAFETY_MARGIN_START = 1;
1579
+ this.RENDER_COUNT_SAFETY_MARGIN_END = 1;
1528
1580
  this.availableWidth = 0;
1529
1581
  this.availableRenderWidth = 0;
1530
1582
  this.isHorizontalLayoutBrain = false;
@@ -1533,6 +1585,7 @@ var MatrixBrain = class extends Logger {
1533
1585
  this.availableRenderHeight = 0;
1534
1586
  this.cols = 0;
1535
1587
  this.rows = 0;
1588
+ this.alwaysRenderedColumns = /* @__PURE__ */ new Set();
1536
1589
  this._rowsPerPage = 0;
1537
1590
  this.rowHeight = 0;
1538
1591
  this.colWidth = 0;
@@ -1540,6 +1593,8 @@ var MatrixBrain = class extends Logger {
1540
1593
  this.horizontalTotalSize = 0;
1541
1594
  this.horizontalRenderCount = void 0;
1542
1595
  this.verticalRenderCount = void 0;
1596
+ this.horizontalExtendRangeBy = DEFAULT_EXTEND_BY;
1597
+ this.verticalExtendRangeBy = DEFAULT_EXTEND_BY;
1543
1598
  this.horizontalRenderRange = {
1544
1599
  startIndex: 0,
1545
1600
  endIndex: 0
@@ -1645,14 +1700,15 @@ var MatrixBrain = class extends Logger {
1645
1700
  });
1646
1701
  });
1647
1702
  };
1648
- this.notifyVerticalRenderRangeChange = () => {
1703
+ this.notifyVerticalRenderRangeChange = (immediate = false) => {
1649
1704
  if (this.destroyed) {
1650
1705
  return;
1651
1706
  }
1652
1707
  const fns = this.onVerticalRenderRangeChangeFns;
1653
1708
  const range = this.verticalRenderRange;
1709
+ const callback = immediate ? immediateCallback : raf2;
1654
1710
  fns.forEach((fn) => {
1655
- raf2(() => {
1711
+ callback(() => {
1656
1712
  if (this.destroyed) {
1657
1713
  return;
1658
1714
  }
@@ -1662,14 +1718,15 @@ var MatrixBrain = class extends Logger {
1662
1718
  });
1663
1719
  });
1664
1720
  };
1665
- this.notifyHorizontalRenderRangeChange = () => {
1721
+ this.notifyHorizontalRenderRangeChange = (immediate = false) => {
1666
1722
  if (this.destroyed) {
1667
1723
  return;
1668
1724
  }
1669
1725
  const fns = this.onHorizontalRenderRangeChangeFns;
1670
1726
  const range = this.horizontalRenderRange;
1727
+ const callback = immediate ? immediateCallback : raf2;
1671
1728
  fns.forEach((fn) => {
1672
- raf2(() => {
1729
+ callback(() => {
1673
1730
  if (this.destroyed) {
1674
1731
  return;
1675
1732
  }
@@ -1679,34 +1736,6 @@ var MatrixBrain = class extends Logger {
1679
1736
  });
1680
1737
  });
1681
1738
  };
1682
- this.computeDirectionalRenderCount = (direction, itemSize, count, theRenderSize) => {
1683
- let renderCount = 0;
1684
- let size = direction === "horizontal" ? theRenderSize.width : theRenderSize.height;
1685
- size -= this.getFixedSize(direction);
1686
- if (size <= 0) {
1687
- return 0;
1688
- }
1689
- if (typeof itemSize === "function") {
1690
- const sizes = [];
1691
- for (let i = 0; i < count; i++) {
1692
- sizes.push(this.getItemSize(i, direction));
1693
- }
1694
- sizes.sort(SORT_ASC);
1695
- let sum2 = 0;
1696
- for (let i = 0; i < count; i++) {
1697
- sum2 += sizes[i];
1698
- renderCount++;
1699
- if (sum2 > size) {
1700
- break;
1701
- }
1702
- }
1703
- renderCount += 1;
1704
- } else {
1705
- renderCount = (itemSize ? Math.ceil(size / itemSize) : 0) + 1;
1706
- }
1707
- renderCount = Math.min(count, renderCount);
1708
- return renderCount;
1709
- };
1710
1739
  this.isColFixedEnd = (colIndex) => {
1711
1740
  if (!this.fixedColsEnd) {
1712
1741
  return false;
@@ -1973,7 +2002,8 @@ var MatrixBrain = class extends Logger {
1973
2002
  };
1974
2003
  };
1975
2004
  this.computeDirectionalRenderRange = (direction) => {
1976
- const renderCount = direction === "horizontal" ? this.horizontalRenderCount : this.verticalRenderCount;
2005
+ const itemSize = direction === "horizontal" ? this.colWidth : this.rowHeight;
2006
+ let renderCount = direction === "horizontal" ? this.horizontalRenderCount : this.verticalRenderCount;
1977
2007
  const count = direction === "horizontal" ? this.cols : this.rows;
1978
2008
  if (!renderCount) {
1979
2009
  return {
@@ -1984,7 +2014,22 @@ var MatrixBrain = class extends Logger {
1984
2014
  const fixedStartIndex = (direction === "horizontal" ? this.fixedColsStart : this.fixedRowsStart) || 0;
1985
2015
  let scrollPositionForDirection = direction === "horizontal" ? this.scrollPosition.scrollLeft : this.scrollPosition.scrollTop;
1986
2016
  scrollPositionForDirection += this.getFixedStartSize(direction);
2017
+ const isItemSizeConstant = typeof itemSize !== "function";
2018
+ const extendBy = direction === "horizontal" ? this.horizontalExtendRangeBy : this.verticalExtendRangeBy;
1987
2019
  let startIndex = this.getItemAt(scrollPositionForDirection, direction);
2020
+ let extendByStart = extendBy.start || 0;
2021
+ let extendByEnd = extendBy.end || 0;
2022
+ if (!isItemSizeConstant) {
2023
+ extendByStart += this.RENDER_COUNT_SAFETY_MARGIN_START;
2024
+ extendByEnd += this.RENDER_COUNT_SAFETY_MARGIN_END;
2025
+ }
2026
+ if (extendByStart) {
2027
+ startIndex = Math.max(0, startIndex - extendByStart);
2028
+ renderCount += extendByStart;
2029
+ }
2030
+ if (extendByEnd) {
2031
+ renderCount += extendByEnd;
2032
+ }
1988
2033
  let endIndex = startIndex + renderCount;
1989
2034
  const theEnd = Math.max(
1990
2035
  fixedStartIndex,
@@ -2028,7 +2073,6 @@ var MatrixBrain = class extends Logger {
2028
2073
  return searchResult;
2029
2074
  }
2030
2075
  return ~searchResult - 1;
2031
- return 0;
2032
2076
  };
2033
2077
  this.computeCacheFor = (itemIndex, direction) => {
2034
2078
  const itemSizeValueOrFn = direction === "horizontal" ? this.colWidth : this.rowHeight;
@@ -2193,6 +2237,15 @@ var MatrixBrain = class extends Logger {
2193
2237
  }
2194
2238
  return cachedSize;
2195
2239
  };
2240
+ this.keepColumnRendered = (colIndex) => {
2241
+ this.alwaysRenderedColumns.add(colIndex);
2242
+ return () => {
2243
+ this.alwaysRenderedColumns.delete(colIndex);
2244
+ };
2245
+ };
2246
+ this.getAlwaysRenderedColumns = () => {
2247
+ return Array.from(this.alwaysRenderedColumns);
2248
+ };
2196
2249
  this.setRenderRange = ({
2197
2250
  horizontal,
2198
2251
  vertical,
@@ -2462,28 +2515,30 @@ var MatrixBrain = class extends Logger {
2462
2515
  * @param options.right - if true, extends the right side with the amount of current visible columns, otherwise with the specified number
2463
2516
  */
2464
2517
  extendRenderRange(options) {
2465
- const leftAmount = typeof options.left === "number" ? options.left : options.left === true ? this.getInitialCols() : 0;
2466
- const rightAmount = typeof options.right === "number" ? options.right : options.right === true ? this.getInitialCols() : 0;
2467
- const currentRenderCount = this.horizontalRenderCount;
2518
+ const { direction } = options;
2519
+ const horizontal = direction === "horizontal";
2520
+ const extendValueWhenTrue = horizontal ? this.horizontalRenderCount || this.getInitialCols() : this.verticalRenderCount || this.getInitialRows();
2521
+ const startAmount = typeof options.start === "number" ? options.start : options.start === true ? extendValueWhenTrue : 0;
2522
+ const endAmount = typeof options.end === "number" ? options.end : options.end === true ? extendValueWhenTrue : 0;
2523
+ if (horizontal) {
2524
+ this.horizontalExtendRangeBy = {
2525
+ start: startAmount,
2526
+ end: endAmount
2527
+ };
2528
+ } else {
2529
+ this.verticalExtendRangeBy = {
2530
+ start: startAmount,
2531
+ end: endAmount
2532
+ };
2533
+ }
2534
+ this.updateRenderRange({ horizontal, vertical: !horizontal });
2468
2535
  const restore = () => {
2469
- this.setRenderCount({
2470
- horizontal: currentRenderCount,
2471
- vertical: void 0
2536
+ this.extendRenderRange({
2537
+ start: 0,
2538
+ end: 0,
2539
+ direction
2472
2540
  });
2473
2541
  };
2474
- const { start, end } = this.getRenderRange();
2475
- const [startRow, startCol] = start;
2476
- const [endRow, endCol] = end;
2477
- this.setRenderRange({
2478
- horizontal: {
2479
- startIndex: Math.max(0, startCol - leftAmount),
2480
- endIndex: Math.min(this.cols, endCol + rightAmount)
2481
- },
2482
- vertical: {
2483
- startIndex: startRow,
2484
- endIndex: endRow
2485
- }
2486
- });
2487
2542
  return restore;
2488
2543
  }
2489
2544
  updateRenderCount(which = ALL_DIRECTIONS) {
@@ -2528,14 +2583,15 @@ var MatrixBrain = class extends Logger {
2528
2583
  this.notifyScrollChange();
2529
2584
  }
2530
2585
  }
2531
- notifyRenderRangeChange() {
2586
+ notifyRenderRangeChange(immediate = false) {
2532
2587
  if (this.destroyed) {
2533
2588
  return;
2534
2589
  }
2535
2590
  const fns = this.onRenderRangeChangeFns;
2536
2591
  const range = this.getRenderRange();
2592
+ const callback = immediate ? immediateCallback : raf2;
2537
2593
  fns.forEach((fn) => {
2538
- raf2(() => {
2594
+ callback(() => {
2539
2595
  if (this.destroyed) {
2540
2596
  return;
2541
2597
  }
@@ -2555,6 +2611,25 @@ var MatrixBrain = class extends Logger {
2555
2611
  fns[i](scrollPosition);
2556
2612
  }
2557
2613
  }
2614
+ computeDirectionalRenderCount(direction, itemSize, count, theRenderSize) {
2615
+ let renderCount = 0;
2616
+ let size = direction === "horizontal" ? theRenderSize.width : theRenderSize.height;
2617
+ size -= this.getFixedSize(direction);
2618
+ if (size <= 0) {
2619
+ return 0;
2620
+ }
2621
+ if (typeof itemSize === "function") {
2622
+ const sizes = [];
2623
+ for (let i = 0; i < count; i++) {
2624
+ sizes.push(this.getItemSize(i, direction));
2625
+ }
2626
+ renderCount = getGreatestCountVisibleInSize(size, sizes);
2627
+ } else {
2628
+ renderCount = (itemSize ? Math.ceil(size / itemSize) : 0) + 1;
2629
+ }
2630
+ renderCount = Math.min(count, renderCount);
2631
+ return renderCount;
2632
+ }
2558
2633
  getFixedSize(direction) {
2559
2634
  return direction === "horizontal" ? this.getFixedStartColsWidth() + this.getFixedEndColsWidth() : this.getFixedStartRowsHeight() + this.getFixedEndRowsHeight();
2560
2635
  }
@@ -2668,6 +2743,9 @@ var MatrixBrain = class extends Logger {
2668
2743
  this.reset();
2669
2744
  this.rowspanParent.clear();
2670
2745
  this.colspanParent.clear();
2746
+ this.alwaysRenderedColumns.clear();
2747
+ this.horizontalExtendRangeBy = DEFAULT_EXTEND_BY;
2748
+ this.verticalExtendRangeBy = DEFAULT_EXTEND_BY;
2671
2749
  this.destroyed = true;
2672
2750
  this.onDestroyFns = [];
2673
2751
  this.onScrollFns = [];
@@ -2701,6 +2779,9 @@ var MappedCells = class extends Logger {
2701
2779
  }
2702
2780
  return elementsOutsideItemRange.pop();
2703
2781
  };
2782
+ this.getElementFromListForRow = (elementsOutsideItemRange, _rowIndex) => {
2783
+ return elementsOutsideItemRange.pop();
2784
+ };
2704
2785
  /**
2705
2786
  * Retrieves the elements that contain rendered cells that are outside
2706
2787
  * of the specified range
@@ -2998,7 +3079,8 @@ var ReactHeadlessTableRenderer = class extends Logger {
2998
3079
  this.detailRowUpdaters = [];
2999
3080
  this.items = [];
3000
3081
  this.detailItems = [];
3001
- this.currentHoveredRow = -1;
3082
+ this.lastEnteredRow = -1;
3083
+ this.lastExitedRow = -1;
3002
3084
  this.hoverRowUpdatesInProgress = /* @__PURE__ */ new Map();
3003
3085
  this.infiniteNode = null;
3004
3086
  this.setDetailTransform = (element, _rowIndex, {
@@ -3020,14 +3102,14 @@ var ReactHeadlessTableRenderer = class extends Logger {
3020
3102
  scrollLeft: scrollLeft2,
3021
3103
  scrollTop: scrollTop2
3022
3104
  }, zIndex2) => {
3023
- const columnOffsetX = `${columnOffsetAtIndex2}-${colIndex}`;
3105
+ const columnOffsetX = InternalVarUtils.columnOffsets.get(colIndex);
3024
3106
  const columnOffsetXWhileReordering = `${columnOffsetAtIndexWhileReordering2}-${colIndex}`;
3025
3107
  const currentTransformYValue = scrollTop2 ? `calc( ${y}px + var(${scrollTopCSSVar}) )` : `${y}px`;
3026
3108
  if (element.__currentTransformY !== currentTransformYValue) {
3027
3109
  element.__currentTransformY = currentTransformYValue;
3028
3110
  element.style.setProperty(currentTransformY, currentTransformYValue);
3029
3111
  }
3030
- const transformValue = `translate3d(var(${columnOffsetXWhileReordering}, var(${columnOffsetX})), var(${currentTransformY}), 0)`;
3112
+ const transformValue = `translate3d(var(${columnOffsetXWhileReordering}, ${columnOffsetX}), var(${currentTransformY}), 0)`;
3031
3113
  if (element.__transformValue !== transformValue) {
3032
3114
  element.__transformValue = transformValue;
3033
3115
  element.style.transform = transformValue;
@@ -3427,11 +3509,14 @@ var ReactHeadlessTableRenderer = class extends Logger {
3427
3509
  return covered ? [rowspanParent, colspanParent] : false;
3428
3510
  };
3429
3511
  this.onMouseEnter = (rowIndex) => {
3430
- this.currentHoveredRow = rowIndex;
3512
+ this.lastEnteredRow = rowIndex;
3513
+ this.lastExitedRow = -1;
3431
3514
  if (this.scrolling) {
3432
3515
  return;
3433
3516
  }
3434
- this.addHoverClass(rowIndex);
3517
+ if (rowIndex != -1) {
3518
+ this.addHoverClass(rowIndex);
3519
+ }
3435
3520
  };
3436
3521
  this.addHoverClass = (rowIndex) => {
3437
3522
  this.mappedCells.getElementsForRowIndex(rowIndex).forEach((elIndex) => {
@@ -3444,14 +3529,14 @@ var ReactHeadlessTableRenderer = class extends Logger {
3444
3529
  });
3445
3530
  };
3446
3531
  this.onMouseLeave = (rowIndex) => {
3447
- if (this.currentHoveredRow != -1 && this.currentHoveredRow === rowIndex) {
3448
- this.removeHoverClass(rowIndex);
3449
- }
3450
- this.currentHoveredRow = -1;
3532
+ this.lastExitedRow = rowIndex;
3533
+ this.lastEnteredRow = -1;
3451
3534
  if (this.scrolling) {
3452
3535
  return;
3453
3536
  }
3454
- this.removeHoverClass(rowIndex);
3537
+ if (rowIndex != -1) {
3538
+ this.removeHoverClass(rowIndex);
3539
+ }
3455
3540
  };
3456
3541
  this.removeHoverClass = (rowIndex) => {
3457
3542
  this.mappedCells.getElementsForRowIndex(rowIndex).forEach((elIndex) => {
@@ -3475,8 +3560,8 @@ var ReactHeadlessTableRenderer = class extends Logger {
3475
3560
  }
3476
3561
  this.hoverRowUpdatesInProgress.set(rowIndex, true);
3477
3562
  const checkHoverClass = () => {
3478
- if (this.currentHoveredRow != -1 && !this.scrolling) {
3479
- if (this.currentHoveredRow === rowIndex) {
3563
+ if (!this.scrolling && this.lastEnteredRow != -1) {
3564
+ if (this.lastEnteredRow === rowIndex) {
3480
3565
  this.addHoverClass(rowIndex);
3481
3566
  } else {
3482
3567
  this.removeHoverClass(rowIndex);
@@ -3569,11 +3654,17 @@ var ReactHeadlessTableRenderer = class extends Logger {
3569
3654
  };
3570
3655
  this.onScrollStart = () => {
3571
3656
  this.scrolling = true;
3657
+ if (this.lastEnteredRow != -1) {
3658
+ this.removeHoverClass(this.lastEnteredRow);
3659
+ }
3572
3660
  };
3573
3661
  this.onScrollStop = () => {
3574
3662
  this.scrolling = false;
3575
- if (this.currentHoveredRow != -1) {
3576
- this.addHoverClass(this.currentHoveredRow);
3663
+ if (this.lastEnteredRow != -1) {
3664
+ this.addHoverClass(this.lastEnteredRow);
3665
+ }
3666
+ if (this.lastExitedRow != -1) {
3667
+ this.removeHoverClass(this.lastExitedRow);
3577
3668
  }
3578
3669
  };
3579
3670
  this.adjustFixedElementsOnScroll = (scrollPosition = this.brain.getScrollPosition()) => {
@@ -3840,12 +3931,27 @@ var ReactHeadlessTableRenderer = class extends Logger {
3840
3931
  return [];
3841
3932
  }
3842
3933
  const { start, end } = range;
3934
+ const horizontalLayout = this.brain.isHorizontalLayoutBrain;
3843
3935
  if (false) {
3844
3936
  this.debug(`Render range ${start}-${end}. Force ${force}`);
3845
3937
  }
3846
3938
  const { mappedCells, mappedDetailRows } = this;
3847
3939
  const fixedRanges = this.getFixedRanges(range);
3848
3940
  const ranges = [range, ...fixedRanges];
3941
+ const alwaysRenderedColumns = this.brain.getAlwaysRenderedColumns();
3942
+ if (alwaysRenderedColumns.length > 0) {
3943
+ const startCol = range.start[1];
3944
+ const endCol = range.end[1];
3945
+ alwaysRenderedColumns.forEach((colIndex) => {
3946
+ const colInRange = startCol <= colIndex && colIndex < endCol;
3947
+ if (!colInRange) {
3948
+ ranges.push({
3949
+ start: [range.start[0], colIndex],
3950
+ end: [range.end[0], colIndex + 1]
3951
+ });
3952
+ }
3953
+ });
3954
+ }
3849
3955
  const extraCellsMap = /* @__PURE__ */ new Map();
3850
3956
  const extraCells = ranges.map(this.getExtraSpanCellsForRange).flat();
3851
3957
  if (extraCells) {
@@ -3965,9 +4071,15 @@ var ReactHeadlessTableRenderer = class extends Logger {
3965
4071
  if (cellRendered && !force && cellMappedCorrectly) {
3966
4072
  continue;
3967
4073
  }
3968
- const elementIndex = cellRendered ? mappedCells.getElementIndexForCell(row, col) : mappedCells.getElementFromListForColumn(
3969
- elementsOutsideItemRange,
3970
- col
4074
+ const elementIndex = cellRendered ? mappedCells.getElementIndexForCell(row, col) : (
4075
+ // TODO when horizontal layout, just do elementsOutsideItemRange.pop()
4076
+ horizontalLayout ? mappedCells.getElementFromListForRow(
4077
+ elementsOutsideItemRange,
4078
+ row
4079
+ ) : mappedCells.getElementFromListForColumn(
4080
+ elementsOutsideItemRange,
4081
+ col
4082
+ )
3971
4083
  );
3972
4084
  if (elementIndex == null) {
3973
4085
  if (false) {
@@ -4210,17 +4322,18 @@ var HorizontalLayoutTableRenderer = class extends ReactHeadlessTableRenderer {
4210
4322
  );
4211
4323
  const pageWidth = ThemeVars.runtime.totalVisibleColumnsWidthVar;
4212
4324
  const pageOffset = pageIndex ? `calc(${pageWidth} * ${pageIndex})` : "0px";
4213
- const columnOffsetX = `${columnOffsetAtIndex2}-${horizontalLayoutCoords.colIndex}`;
4325
+ const columnOffsetX = InternalVarUtils.columnOffsets.get(
4326
+ horizontalLayoutCoords.colIndex
4327
+ );
4214
4328
  const columnOffsetXWhileReordering = `${columnOffsetAtIndexWhileReordering2}-${horizontalLayoutCoords.colIndex}`;
4215
4329
  const currentTransformYValue = `${y}px`;
4216
4330
  if (element.__currentTransformY !== currentTransformYValue) {
4217
4331
  element.__currentTransformY = currentTransformYValue;
4218
4332
  element.style.setProperty(currentTransformY, currentTransformYValue);
4219
4333
  }
4220
- const xOffset = `calc(var(${columnOffsetX}) + ${pageOffset})`;
4221
- const transformX2 = `var(${columnOffsetXWhileReordering}, ${xOffset})`;
4334
+ const xOffset = `calc(var(${columnOffsetXWhileReordering}, ${columnOffsetX}) + ${pageOffset})`;
4222
4335
  const transformY = `var(${currentTransformY})`;
4223
- const transformValue = `translate3d(${transformX2}, ${transformY}, 0px)`;
4336
+ const transformValue = `translate3d(${xOffset}, ${transformY}, 0px)`;
4224
4337
  if (element.__transformValue !== transformValue) {
4225
4338
  element.__transformValue = transformValue;
4226
4339
  element.style.transform = transformValue;
@@ -4283,7 +4396,7 @@ function createRenderer(brain) {
4283
4396
 
4284
4397
  // src/components/HeadlessTable/RawTable.tsx
4285
4398
  function RawTableFn(props) {
4286
- const { brain, renderCell, renderDetailRow } = props;
4399
+ const { brain, renderCell, renderDetailRow, forceRerenderTimestamp } = props;
4287
4400
  const { renderer, onRenderUpdater } = (0, import_react6.useMemo)(() => {
4288
4401
  return props.onRenderUpdater && props.renderer ? {
4289
4402
  renderer: props.renderer,
@@ -4301,7 +4414,14 @@ function RawTableFn(props) {
4301
4414
  renderCell,
4302
4415
  renderDetailRow
4303
4416
  });
4304
- }, [renderer, brain, renderCell, renderDetailRow, onRenderUpdater]);
4417
+ }, [
4418
+ renderer,
4419
+ brain,
4420
+ renderCell,
4421
+ renderDetailRow,
4422
+ onRenderUpdater,
4423
+ forceRerenderTimestamp
4424
+ ]);
4305
4425
  (0, import_react6.useEffect)(() => {
4306
4426
  const remove = brain.onRenderRangeChange((renderRange) => {
4307
4427
  renderer.renderRange(renderRange, {
@@ -4640,6 +4760,7 @@ function HeadlessTable(props) {
4640
4760
  activeCellIndex,
4641
4761
  onRenderUpdater,
4642
4762
  wrapRowsHorizontally,
4763
+ forceRerenderTimestamp,
4643
4764
  ...domProps
4644
4765
  } = props;
4645
4766
  const { autoFocus } = domProps;
@@ -4707,6 +4828,7 @@ function HeadlessTable(props) {
4707
4828
  /* @__PURE__ */ React13.createElement(
4708
4829
  RawTable,
4709
4830
  {
4831
+ forceRerenderTimestamp,
4710
4832
  renderer,
4711
4833
  onRenderUpdater,
4712
4834
  renderCell,
@@ -5321,22 +5443,22 @@ var import_react18 = require("react");
5321
5443
 
5322
5444
  // src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
5323
5445
  var CellCls = "cell_CellCls__1eexc2a5 utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q utilities_position_absolute__16lm1iw2 utilities_willChange_transform__16lm1iw22 utilities_whiteSpace_nowrap__16lm1iw23 utilities_userSelect_none__16lm1iw17";
5324
- var HeaderCellContentRecipe = createRuntimeFn({ defaultClassName: "header_HeaderCellContentRecipe__12zfob124 utilities_height_100%__16lm1iw19 utilities_width_100%__16lm1iw1b utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q utilities_justifyContent_start__16lm1iw1v", variantClassNames: { filtered: { false: "header_HeaderCellContentRecipe_filtered_false__12zfob125", true: "header_HeaderCellContentRecipe_filtered_true__12zfob126" }, verticalAlign: { start: "header_HeaderCellContentRecipe_verticalAlign_start__12zfob127", end: "header_HeaderCellContentRecipe_verticalAlign_end__12zfob128", center: "header_HeaderCellContentRecipe_verticalAlign_center__12zfob129" }, align: { start: "header_HeaderCellContentRecipe_align_start__12zfob12a", end: "header_HeaderCellContentRecipe_align_end__12zfob12b", center: "header_HeaderCellContentRecipe_align_center__12zfob12c" } }, defaultVariants: {}, compoundVariants: [] });
5446
+ var HeaderCellContentRecipe = createRuntimeFn({ defaultClassName: "header_HeaderCellContentRecipe__12zfob126 utilities_height_100%__16lm1iw19 utilities_width_100%__16lm1iw1b utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q utilities_justifyContent_start__16lm1iw1v", variantClassNames: { filtered: { false: "header_HeaderCellContentRecipe_filtered_false__12zfob127", true: "header_HeaderCellContentRecipe_filtered_true__12zfob128" }, verticalAlign: { start: "header_HeaderCellContentRecipe_verticalAlign_start__12zfob129", end: "header_HeaderCellContentRecipe_verticalAlign_end__12zfob12a", center: "header_HeaderCellContentRecipe_verticalAlign_center__12zfob12b" }, align: { start: "header_HeaderCellContentRecipe_align_start__12zfob12c", end: "header_HeaderCellContentRecipe_align_end__12zfob12d", center: "header_HeaderCellContentRecipe_align_center__12zfob12e" } }, defaultVariants: {}, compoundVariants: [] });
5325
5447
  var HeaderCellProxy = "header_HeaderCellProxy__12zfob1n utilities_whiteSpace_nowrap__16lm1iw23 utilities_textOverflow_ellipsis__16lm1iw24 utilities_overflow_hidden__16lm1iw1x";
5326
- var HeaderCellRecipe = createRuntimeFn({ defaultClassName: "header_HeaderCellRecipe__12zfob1o utilities_display_block__16lm1iw12", variantClassNames: { rowActive: { false: "header_HeaderCellRecipe_rowActive_false__12zfob1p", true: "header_HeaderCellRecipe_rowActive_true__12zfob1q" }, cellSelected: { false: "header_HeaderCellRecipe_cellSelected_false__12zfob1r", true: "header_HeaderCellRecipe_cellSelected_true__12zfob1s" }, rowSelected: { false: "header_HeaderCellRecipe_rowSelected_false__12zfob1t", true: "header_HeaderCellRecipe_rowSelected_true__12zfob1u", null: "header_HeaderCellRecipe_rowSelected_null__12zfob1v" }, rowDisabled: { false: "header_HeaderCellRecipe_rowDisabled_false__12zfob1w", true: "header_HeaderCellRecipe_rowDisabled_true__12zfob1x" }, firstRow: { false: "header_HeaderCellRecipe_firstRow_false__12zfob1y", true: "header_HeaderCellRecipe_firstRow_true__12zfob1z" }, firstRowInHorizontalLayoutPage: { false: "header_HeaderCellRecipe_firstRowInHorizontalLayoutPage_false__12zfob110", true: "header_HeaderCellRecipe_firstRowInHorizontalLayoutPage_true__12zfob111" }, groupRow: { false: "header_HeaderCellRecipe_groupRow_false__12zfob112", true: "header_HeaderCellRecipe_groupRow_true__12zfob113" }, groupCell: { false: "header_HeaderCellRecipe_groupCell_false__12zfob114", true: "header_HeaderCellRecipe_groupCell_true__12zfob115" }, align: { start: "header_HeaderCellRecipe_align_start__12zfob116", end: "header_HeaderCellRecipe_align_end__12zfob117", center: "header_HeaderCellRecipe_align_center__12zfob118" }, verticalAlign: { start: "header_HeaderCellRecipe_verticalAlign_start__12zfob119", end: "header_HeaderCellRecipe_verticalAlign_end__12zfob11a", center: "header_HeaderCellRecipe_verticalAlign_center__12zfob11b" }, zebra: { false: "header_HeaderCellRecipe_zebra_false__12zfob11c", even: "header_HeaderCellRecipe_zebra_even__12zfob11d", odd: "header_HeaderCellRecipe_zebra_odd__12zfob11e" }, dragging: { true: "header_HeaderCellRecipe_dragging_true__12zfob11f", false: "header_HeaderCellRecipe_dragging_false__12zfob11g" }, first: { true: "header_HeaderCellRecipe_first_true__12zfob11h", false: "header_HeaderCellRecipe_first_false__12zfob11i" }, last: { true: "header_HeaderCellRecipe_last_true__12zfob11j", false: "header_HeaderCellRecipe_last_false__12zfob11k" }, groupByField: { true: "header_HeaderCellRecipe_groupByField_true__12zfob11l", false: "header_HeaderCellRecipe_groupByField_false__12zfob11m" }, firstInCategory: { true: "header_HeaderCellRecipe_firstInCategory_true__12zfob11n", false: "header_HeaderCellRecipe_firstInCategory_false__12zfob11o" }, lastInCategory: { true: "header_HeaderCellRecipe_lastInCategory_true__12zfob11p", false: "header_HeaderCellRecipe_lastInCategory_false__12zfob11q" }, pinned: { start: "header_HeaderCellRecipe_pinned_start__12zfob11r", end: "header_HeaderCellRecipe_pinned_end__12zfob11s", false: "header_HeaderCellRecipe_pinned_false__12zfob11t" }, filtered: { true: "header_HeaderCellRecipe_filtered_true__12zfob11u", false: "header_HeaderCellRecipe_filtered_false__12zfob11v" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "header_HeaderCellRecipe_compound_0__12zfob11w"], [{ pinned: "end", firstInCategory: true }, "header_HeaderCellRecipe_compound_1__12zfob11x"], [{ pinned: false, lastInCategory: true }, "header_HeaderCellRecipe_compound_2__12zfob11y"]] });
5448
+ var HeaderCellRecipe = createRuntimeFn({ defaultClassName: "header_HeaderCellRecipe__12zfob1o utilities_display_block__16lm1iw12", variantClassNames: { rowActive: { false: "header_HeaderCellRecipe_rowActive_false__12zfob1p", true: "header_HeaderCellRecipe_rowActive_true__12zfob1q" }, cellSelected: { false: "header_HeaderCellRecipe_cellSelected_false__12zfob1r", true: "header_HeaderCellRecipe_cellSelected_true__12zfob1s" }, rowSelected: { false: "header_HeaderCellRecipe_rowSelected_false__12zfob1t", true: "header_HeaderCellRecipe_rowSelected_true__12zfob1u", null: "header_HeaderCellRecipe_rowSelected_null__12zfob1v" }, rowDisabled: { false: "header_HeaderCellRecipe_rowDisabled_false__12zfob1w", true: "header_HeaderCellRecipe_rowDisabled_true__12zfob1x" }, firstRow: { false: "header_HeaderCellRecipe_firstRow_false__12zfob1y", true: "header_HeaderCellRecipe_firstRow_true__12zfob1z" }, firstRowInHorizontalLayoutPage: { false: "header_HeaderCellRecipe_firstRowInHorizontalLayoutPage_false__12zfob110", true: "header_HeaderCellRecipe_firstRowInHorizontalLayoutPage_true__12zfob111" }, groupRow: { false: "header_HeaderCellRecipe_groupRow_false__12zfob112", true: "header_HeaderCellRecipe_groupRow_true__12zfob113" }, groupCell: { false: "header_HeaderCellRecipe_groupCell_false__12zfob114", true: "header_HeaderCellRecipe_groupCell_true__12zfob115" }, align: { start: "header_HeaderCellRecipe_align_start__12zfob116", end: "header_HeaderCellRecipe_align_end__12zfob117", center: "header_HeaderCellRecipe_align_center__12zfob118" }, verticalAlign: { start: "header_HeaderCellRecipe_verticalAlign_start__12zfob119", end: "header_HeaderCellRecipe_verticalAlign_end__12zfob11a", center: "header_HeaderCellRecipe_verticalAlign_center__12zfob11b" }, zebra: { false: "header_HeaderCellRecipe_zebra_false__12zfob11c", even: "header_HeaderCellRecipe_zebra_even__12zfob11d", odd: "header_HeaderCellRecipe_zebra_odd__12zfob11e" }, dragging: { true: "header_HeaderCellRecipe_dragging_true__12zfob11f", false: "header_HeaderCellRecipe_dragging_false__12zfob11g" }, insideDisabledDraggingPage: { true: "header_HeaderCellRecipe_insideDisabledDraggingPage_true__12zfob11h", false: "header_HeaderCellRecipe_insideDisabledDraggingPage_false__12zfob11i" }, first: { true: "header_HeaderCellRecipe_first_true__12zfob11j", false: "header_HeaderCellRecipe_first_false__12zfob11k" }, last: { true: "header_HeaderCellRecipe_last_true__12zfob11l", false: "header_HeaderCellRecipe_last_false__12zfob11m" }, groupByField: { true: "header_HeaderCellRecipe_groupByField_true__12zfob11n", false: "header_HeaderCellRecipe_groupByField_false__12zfob11o" }, firstInCategory: { true: "header_HeaderCellRecipe_firstInCategory_true__12zfob11p", false: "header_HeaderCellRecipe_firstInCategory_false__12zfob11q" }, lastInCategory: { true: "header_HeaderCellRecipe_lastInCategory_true__12zfob11r", false: "header_HeaderCellRecipe_lastInCategory_false__12zfob11s" }, pinned: { start: "header_HeaderCellRecipe_pinned_start__12zfob11t", end: "header_HeaderCellRecipe_pinned_end__12zfob11u", false: "header_HeaderCellRecipe_pinned_false__12zfob11v" }, filtered: { true: "header_HeaderCellRecipe_filtered_true__12zfob11w", false: "header_HeaderCellRecipe_filtered_false__12zfob11x" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "header_HeaderCellRecipe_compound_0__12zfob11y"], [{ pinned: "end", firstInCategory: true }, "header_HeaderCellRecipe_compound_1__12zfob11z"], [{ pinned: false, lastInCategory: true }, "header_HeaderCellRecipe_compound_2__12zfob120"]] });
5327
5449
  var HeaderClsRecipe = createRuntimeFn({ defaultClassName: "header_HeaderClsRecipe__12zfob19 utilities_display_block__16lm1iw12 utilities_position_absolute__16lm1iw2", variantClassNames: { pinned: { start: "header_HeaderClsRecipe_pinned_start__12zfob1a", end: "header_HeaderClsRecipe_pinned_end__12zfob1b", false: "header_HeaderClsRecipe_pinned_false__12zfob1c" }, firstInCategory: { true: "header_HeaderClsRecipe_firstInCategory_true__12zfob1d", false: "header_HeaderClsRecipe_firstInCategory_false__12zfob1e" }, lastInCategory: { true: "header_HeaderClsRecipe_lastInCategory_true__12zfob1f", false: "header_HeaderClsRecipe_lastInCategory_false__12zfob1g" }, overflow: { true: "header_HeaderClsRecipe_overflow_true__12zfob1h", false: "header_HeaderClsRecipe_overflow_false__12zfob1i" } }, defaultVariants: {}, compoundVariants: [[{ overflow: true, pinned: "start" }, "header_HeaderClsRecipe_compound_0__12zfob1j"], [{ pinned: "start", firstInCategory: true }, "header_HeaderClsRecipe_compound_1__12zfob1k"], [{ overflow: true, pinned: "end" }, "header_HeaderClsRecipe_compound_2__12zfob1l"], [{ pinned: "end", lastInCategory: true }, "header_HeaderClsRecipe_compound_3__12zfob1m"]] });
5328
- var HeaderFilterEditorCls = "header_HeaderFilterEditorCls__12zfob12m utilities_width_100%__16lm1iw1b utilities_height_100%__16lm1iw19";
5450
+ var HeaderFilterEditorCls = "header_HeaderFilterEditorCls__12zfob12o utilities_width_100%__16lm1iw1b utilities_height_100%__16lm1iw19";
5329
5451
  var HeaderFilterIconIndexCls = "header_HeaderFilterIconIndexCls__12zfob17";
5330
- var HeaderFilterOperatorCls = "header_HeaderFilterOperatorCls__12zfob12i utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q utilities_position_relative__16lm1iw1";
5331
- var HeaderFilterOperatorIconRecipe = createRuntimeFn({ defaultClassName: "header_HeaderFilterOperatorIconRecipe__12zfob12j utilities_position_relative__16lm1iw1 utilities_top_0__16lm1iw1c", variantClassNames: { disabled: { true: "header_HeaderFilterOperatorIconRecipe_disabled_true__12zfob12k", false: "header_HeaderFilterOperatorIconRecipe_disabled_false__12zfob12l" } }, defaultVariants: {}, compoundVariants: [] });
5332
- var HeaderFilterRecipe = createRuntimeFn({ defaultClassName: "header_HeaderFilterRecipe__12zfob12f utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_stretch__16lm1iw1r utilities_position_relative__16lm1iw1", variantClassNames: { active: { true: "header_HeaderFilterRecipe_active_true__12zfob12g", false: "header_HeaderFilterRecipe_active_false__12zfob12h" } }, defaultVariants: {}, compoundVariants: [] });
5333
- var HeaderGroupCls = "header_HeaderGroupCls__12zfob12e utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q";
5334
- var HeaderMenuIconCls = createRuntimeFn({ defaultClassName: "header_HeaderMenuIconCls__12zfob11z utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwz utilities_flexFlow_column__16lm1iw1m utilities_justifyContent_spaceAround__16lm1iw1u utilities_visibility_hidden__16lm1iw21", variantClassNames: { menuVisible: { true: "header_HeaderMenuIconCls_menuVisible_true__12zfob120" }, reserveSpaceWhenHidden: { true: "header_HeaderMenuIconCls_reserveSpaceWhenHidden_true__12zfob121", false: "header_HeaderMenuIconCls_reserveSpaceWhenHidden_false__12zfob122" } }, defaultVariants: {}, compoundVariants: [[{ menuVisible: true, reserveSpaceWhenHidden: false }, "header_HeaderMenuIconCls_compound_0__12zfob123"]] });
5452
+ var HeaderFilterOperatorCls = "header_HeaderFilterOperatorCls__12zfob12k utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q utilities_position_relative__16lm1iw1";
5453
+ var HeaderFilterOperatorIconRecipe = createRuntimeFn({ defaultClassName: "header_HeaderFilterOperatorIconRecipe__12zfob12l utilities_position_relative__16lm1iw1 utilities_top_0__16lm1iw1c", variantClassNames: { disabled: { true: "header_HeaderFilterOperatorIconRecipe_disabled_true__12zfob12m", false: "header_HeaderFilterOperatorIconRecipe_disabled_false__12zfob12n" } }, defaultVariants: {}, compoundVariants: [] });
5454
+ var HeaderFilterRecipe = createRuntimeFn({ defaultClassName: "header_HeaderFilterRecipe__12zfob12h utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_stretch__16lm1iw1r utilities_position_relative__16lm1iw1", variantClassNames: { active: { true: "header_HeaderFilterRecipe_active_true__12zfob12i", false: "header_HeaderFilterRecipe_active_false__12zfob12j" } }, defaultVariants: {}, compoundVariants: [] });
5455
+ var HeaderGroupCls = "header_HeaderGroupCls__12zfob12g utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q";
5456
+ var HeaderMenuIconCls = createRuntimeFn({ defaultClassName: "header_HeaderMenuIconCls__12zfob121 utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwz utilities_flexFlow_column__16lm1iw1m utilities_justifyContent_spaceAround__16lm1iw1u utilities_visibility_hidden__16lm1iw21", variantClassNames: { menuVisible: { true: "header_HeaderMenuIconCls_menuVisible_true__12zfob122" }, reserveSpaceWhenHidden: { true: "header_HeaderMenuIconCls_reserveSpaceWhenHidden_true__12zfob123", false: "header_HeaderMenuIconCls_reserveSpaceWhenHidden_false__12zfob124" } }, defaultVariants: {}, compoundVariants: [[{ menuVisible: true, reserveSpaceWhenHidden: false }, "header_HeaderMenuIconCls_compound_0__12zfob125"]] });
5335
5457
  var HeaderScrollbarPlaceholderCls = "header_HeaderScrollbarPlaceholderCls__12zfob18 utilities_position_absolute__16lm1iw2";
5336
5458
  var HeaderSortIconCls = "utilities_position_relative__16lm1iw1";
5337
5459
  var HeaderSortIconIndexCls = "header_HeaderSortIconIndexCls__12zfob16";
5338
5460
  var HeaderSortIconRecipe = createRuntimeFn({ defaultClassName: "header__12zfob12", variantClassNames: { align: { start: "header_HeaderSortIconRecipe_align_start__12zfob13", center: "header_HeaderSortIconRecipe_align_center__12zfob14", end: "header_HeaderSortIconRecipe_align_end__12zfob15" } }, defaultVariants: {}, compoundVariants: [] });
5339
- var HeaderWrapperCls = "header_HeaderWrapperCls__12zfob12d utilities_overflow_hidden__16lm1iw1x utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o";
5461
+ var HeaderWrapperCls = "header_HeaderWrapperCls__12zfob12f utilities_overflow_hidden__16lm1iw1x utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o";
5340
5462
 
5341
5463
  // src/components/InfiniteTable/components/icons/InfiniteTableIconClassName.ts
5342
5464
  var InfiniteTableIconClassName = "InfiniteTableIcon";
@@ -6778,6 +6900,7 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
6778
6900
  rowSelected: extraFlags.rowSelected ?? "null",
6779
6901
  rowActive: extraFlags.rowActive,
6780
6902
  dragging: extraFlags.dragging,
6903
+ insideDisabledDraggingPage: extraFlags.insideDisabledDraggingPage,
6781
6904
  firstRow: extraFlags.firstRow ?? false,
6782
6905
  firstRowInHorizontalLayoutPage: extraFlags.firstRowInHorizontalLayoutPage ?? false,
6783
6906
  rowDisabled: extraFlags.rowDisabled,
@@ -6845,11 +6968,11 @@ var import_react21 = require("react");
6845
6968
  // src/components/InfiniteTable/InfiniteCls.css.ts
6846
6969
  var FooterCls = "utilities_position_relative__16lm1iw1";
6847
6970
  var InfiniteCls = "InfiniteCls_InfiniteCls__1yeub2v0 utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwz utilities_flexFlow_column__16lm1iw1m utilities_boxSizingBorderBox__16lm1iw0";
6848
- var InfiniteClsHasPinnedEnd = "InfiniteCls_InfiniteClsHasPinnedEnd__1yeub2vq";
6849
- var InfiniteClsHasPinnedStart = "InfiniteCls_InfiniteClsHasPinnedStart__1yeub2vp";
6850
- var InfiniteClsRecipe = createRuntimeFn({ defaultClassName: "InfiniteCls__1yeub2v2", variantClassNames: { focused: { true: "InfiniteCls_InfiniteClsRecipe_focused_true__1yeub2v3", false: "InfiniteCls_InfiniteClsRecipe_focused_false__1yeub2v4" }, focusedWithin: { true: "InfiniteCls_InfiniteClsRecipe_focusedWithin_true__1yeub2v5", false: "InfiniteCls_InfiniteClsRecipe_focusedWithin_false__1yeub2v6" }, hasPinnedStart: { true: "InfiniteCls_InfiniteClsRecipe_hasPinnedStart_true__1yeub2v7", false: "InfiniteCls_InfiniteClsRecipe_hasPinnedStart_false__1yeub2v8" }, hasPinnedEnd: { true: "InfiniteCls_InfiniteClsRecipe_hasPinnedEnd_true__1yeub2v9", false: "InfiniteCls_InfiniteClsRecipe_hasPinnedEnd_false__1yeub2va" }, hasPinnedStartOverflow: { true: "InfiniteCls_InfiniteClsRecipe_hasPinnedStartOverflow_true__1yeub2vb", false: "InfiniteCls_InfiniteClsRecipe_hasPinnedStartOverflow_false__1yeub2vc" }, hasPinnedEndOverflow: { true: "InfiniteCls_InfiniteClsRecipe_hasPinnedEndOverflow_true__1yeub2vd", false: "InfiniteCls_InfiniteClsRecipe_hasPinnedEndOverflow_false__1yeub2ve" } }, defaultVariants: {}, compoundVariants: [[{ focused: false, focusedWithin: false }, "InfiniteCls_InfiniteClsRecipe_compound_0__1yeub2vf"]] });
6851
- var InfiniteClsShiftingColumns = "InfiniteCls_shiftingcols__1yeub2vn";
6852
- var PinnedRowsContainerClsVariants = createRuntimeFn({ defaultClassName: "InfiniteCls__1yeub2vj", variantClassNames: { pinned: { start: "InfiniteCls_PinnedRowsContainerClsVariants_pinned_start__1yeub2vk", end: "InfiniteCls_PinnedRowsContainerClsVariants_pinned_end__1yeub2vl", false: "InfiniteCls_PinnedRowsContainerClsVariants_pinned_false__1yeub2vm" } }, defaultVariants: {}, compoundVariants: [] });
6971
+ var InfiniteClsHasPinnedEnd = "InfiniteCls_InfiniteClsHasPinnedEnd__1yeub2vs";
6972
+ var InfiniteClsHasPinnedStart = "InfiniteCls_InfiniteClsHasPinnedStart__1yeub2vr";
6973
+ var InfiniteClsRecipe = createRuntimeFn({ defaultClassName: "InfiniteCls__1yeub2v2", variantClassNames: { horizontalLayout: { true: "InfiniteCls_InfiniteClsRecipe_horizontalLayout_true__1yeub2v3", false: "InfiniteCls_InfiniteClsRecipe_horizontalLayout_false__1yeub2v4" }, focused: { true: "InfiniteCls_InfiniteClsRecipe_focused_true__1yeub2v5", false: "InfiniteCls_InfiniteClsRecipe_focused_false__1yeub2v6" }, focusedWithin: { true: "InfiniteCls_InfiniteClsRecipe_focusedWithin_true__1yeub2v7", false: "InfiniteCls_InfiniteClsRecipe_focusedWithin_false__1yeub2v8" }, hasPinnedStart: { true: "InfiniteCls_InfiniteClsRecipe_hasPinnedStart_true__1yeub2v9", false: "InfiniteCls_InfiniteClsRecipe_hasPinnedStart_false__1yeub2va" }, hasPinnedEnd: { true: "InfiniteCls_InfiniteClsRecipe_hasPinnedEnd_true__1yeub2vb", false: "InfiniteCls_InfiniteClsRecipe_hasPinnedEnd_false__1yeub2vc" }, hasPinnedStartOverflow: { true: "InfiniteCls_InfiniteClsRecipe_hasPinnedStartOverflow_true__1yeub2vd", false: "InfiniteCls_InfiniteClsRecipe_hasPinnedStartOverflow_false__1yeub2ve" }, hasPinnedEndOverflow: { true: "InfiniteCls_InfiniteClsRecipe_hasPinnedEndOverflow_true__1yeub2vf", false: "InfiniteCls_InfiniteClsRecipe_hasPinnedEndOverflow_false__1yeub2vg" } }, defaultVariants: {}, compoundVariants: [[{ focused: false, focusedWithin: false }, "InfiniteCls_InfiniteClsRecipe_compound_0__1yeub2vh"]] });
6974
+ var InfiniteClsShiftingColumns = "InfiniteCls_shiftingcols__1yeub2vp";
6975
+ var PinnedRowsContainerClsVariants = createRuntimeFn({ defaultClassName: "InfiniteCls__1yeub2vl", variantClassNames: { pinned: { start: "InfiniteCls_PinnedRowsContainerClsVariants_pinned_start__1yeub2vm", end: "InfiniteCls_PinnedRowsContainerClsVariants_pinned_end__1yeub2vn", false: "InfiniteCls_PinnedRowsContainerClsVariants_pinned_false__1yeub2vo" } }, defaultVariants: {}, compoundVariants: [] });
6853
6976
 
6854
6977
  // src/components/InfiniteTable/utils/rafFn.ts
6855
6978
  var rafFn = (fn) => {
@@ -6890,7 +7013,6 @@ var scrollbarWidthHorizontal = stripVar(
6890
7013
  );
6891
7014
  var scrollbarWidthVertical = stripVar(InternalVars.scrollbarWidthVertical);
6892
7015
  var columnWidthAtIndex2 = stripVar(InternalVars.columnWidthAtIndex);
6893
- var columnOffsetAtIndex3 = stripVar(InternalVars.columnOffsetAtIndex);
6894
7016
  var columnZIndexAtIndex3 = stripVar(InternalVars.columnZIndexAtIndex);
6895
7017
  var scrollLeftCSSVar = stripVar(InternalVars.scrollLeft);
6896
7018
  var activeCellColWidth = stripVar(InternalVars.activeCellColWidth);
@@ -6932,7 +7054,8 @@ function useDOMProps(initialDOMProps) {
6932
7054
  onSelfFocus,
6933
7055
  onSelfBlur,
6934
7056
  bodySize,
6935
- activeCellIndex
7057
+ activeCellIndex,
7058
+ wrapRowsHorizontally
6936
7059
  } = state;
6937
7060
  const {
6938
7061
  computedPinnedStartColumnsWidth,
@@ -6947,11 +7070,11 @@ function useDOMProps(initialDOMProps) {
6947
7070
  const cssVars = computedVisibleColumns.reduce(
6948
7071
  (vars, col) => {
6949
7072
  const index = col.computedVisibleIndex;
6950
- vars[`${columnWidthAtIndex2}-${index}`] = col.computedWidth + "px";
6951
- vars[`${columnOffsetAtIndex3}-${index}`] = col.computedPinned === "start" ? `calc( ${col.computedOffset}px + var(${scrollLeftCSSVar}) )` : col.computedPinned === "end" ? (
7073
+ vars[InternalVarUtils.columnWidths.varName.get(index)] = col.computedWidth + "px";
7074
+ vars[InternalVarUtils.columnOffsets.varName.get(index)] = col.computedPinned === "start" ? `calc( ${col.computedOffset}px + var(${scrollLeftCSSVar}) )` : col.computedPinned === "end" ? (
6952
7075
  // see #startcoloffsets-pinnedend
6953
7076
  `calc( var(${pinnedEndOffsetCSSVar}) ${prevPinnedEndCols.length ? "+" : ""} ${prevPinnedEndCols.map(
6954
- (c) => `var(${columnWidthAtIndex2}-${c.computedVisibleIndex})`
7077
+ (c) => InternalVarUtils.columnWidths.get(c.computedVisibleIndex)
6955
7078
  ).join(" + ")} + var(${scrollLeftCSSVar}) )`
6956
7079
  ) : `${col.computedOffset}px`;
6957
7080
  const zIndexValue = getColumnZIndex(col, {
@@ -6976,12 +7099,12 @@ function useDOMProps(initialDOMProps) {
6976
7099
  }).join(" + ")})`;
6977
7100
  cssVars[publicRuntimeVars.visibleColumnsCount.name] = computedVisibleColumns.length;
6978
7101
  if (activeCellIndex != null) {
6979
- cssVars[activeCellColWidth] = `var(${getCSSVarNameForColWidth(
7102
+ cssVars[activeCellColWidth] = InternalVarUtils.columnWidths.get(
6980
7103
  activeCellIndex[1]
6981
- )})`;
6982
- const defaultActiveCellColOffset = `var(${getCSSVarNameForColOffset(
7104
+ );
7105
+ const defaultActiveCellColOffset = InternalVarUtils.columnOffsets.get(
6983
7106
  activeCellIndex[1]
6984
- )})`;
7107
+ );
6985
7108
  if (state.brain.isHorizontalLayoutBrain) {
6986
7109
  const pageIndex = state.brain.getPageIndexForRow(activeCellIndex[0]);
6987
7110
  cssVars[activeCellColOffset] = pageIndex ? `calc( ${ThemeVars.runtime.totalVisibleColumnsWidthVar} * ${pageIndex} + ${defaultActiveCellColOffset})` : defaultActiveCellColOffset;
@@ -6992,8 +7115,8 @@ function useDOMProps(initialDOMProps) {
6992
7115
  cssVars[computedVisibleColumnsCountCSSVar] = computedVisibleColumns.length;
6993
7116
  cssVars[scrollbarWidthHorizontal] = scrollbars.horizontal ? `${scrollbarWidth2}px` : "0px";
6994
7117
  cssVars[scrollbarWidthVertical] = scrollbars.vertical ? `${scrollbarWidth2}px` : "0px";
6995
- cssVars[pinnedStartWidthCSSVar] = `calc( ` + computedPinnedStartColumns.map((c) => `var(${getCSSVarNameForColWidth(c.computedVisibleIndex)})`).join(" + ") + ")";
6996
- cssVars[pinnedEndWidthCSSVar] = `calc( ` + computedPinnedEndColumns.map((c) => `var(${getCSSVarNameForColWidth(c.computedVisibleIndex)})`).join(" + ") + ")";
7118
+ cssVars[pinnedStartWidthCSSVar] = `calc( ` + computedPinnedStartColumns.map((c) => InternalVarUtils.columnWidths.get(c.computedVisibleIndex)).join(" + ") + ")";
7119
+ cssVars[pinnedEndWidthCSSVar] = `calc( ` + computedPinnedEndColumns.map((c) => InternalVarUtils.columnWidths.get(c.computedVisibleIndex)).join(" + ") + ")";
6997
7120
  cssVars[baseZIndexForCells] = computedVisibleColumns.length * 10;
6998
7121
  cssVars[pinnedEndOffsetCSSVar] = `calc( var(${bodyWidthCSSVar}) - var(${pinnedEndWidthCSSVar}) - var(${scrollbarWidthVertical}) )`;
6999
7122
  cssVars[bodyWidthCSSVar] = `${bodySize.width}px`;
@@ -7051,6 +7174,7 @@ function useDOMProps(initialDOMProps) {
7051
7174
  const className = join(
7052
7175
  InfiniteTableClassName,
7053
7176
  InfiniteCls,
7177
+ wrapRowsHorizontally ? `${InfiniteTableClassName}--horizontal-layout` : null,
7054
7178
  domProps?.className,
7055
7179
  computedPinnedStartColumnsWidth ? `${InfiniteTableClassName}--has-pinned-start ${InfiniteClsHasPinnedStart}` : null,
7056
7180
  computedPinnedEndColumnsWidth ? `${InfiniteTableClassName}--has-pinned-end ${InfiniteClsHasPinnedEnd}` : null,
@@ -7061,6 +7185,7 @@ function useDOMProps(initialDOMProps) {
7061
7185
  computed.computedPinnedStartOverflow ? `${InfiniteTableClassName}--has-pinned-start-overflow` : null,
7062
7186
  computed.computedPinnedEndOverflow ? `${InfiniteTableClassName}--has-pinned-end-overflow` : null,
7063
7187
  InfiniteClsRecipe({
7188
+ horizontalLayout: !!wrapRowsHorizontally,
7064
7189
  hasPinnedStart: !!computedPinnedStartColumnsWidth,
7065
7190
  hasPinnedEnd: !!computedPinnedEndColumnsWidth,
7066
7191
  // hasPinnedStartOverflow: !!computed.computedPinnedStartOverflow,
@@ -7090,6 +7215,68 @@ function useDOMProps(initialDOMProps) {
7090
7215
  // src/components/InfiniteTable/hooks/reorderColumnsOnDrag.ts
7091
7216
  var import_binary_search2 = __toESM(require_binary_search());
7092
7217
 
7218
+ // src/components/InfiniteTable/utils/CSSCalc.ts
7219
+ function mapToContinuation(args) {
7220
+ return args.map(
7221
+ (arg) => arg instanceof CssContinuation ? arg : new CssContinuation(null, [arg])
7222
+ );
7223
+ }
7224
+ var CssContinuation = class {
7225
+ constructor(operation, operands = []) {
7226
+ this.__operands = [];
7227
+ this.__operation = null;
7228
+ this.__operands = operands;
7229
+ this.__operation = operation;
7230
+ }
7231
+ add(...args) {
7232
+ return new CssContinuation("+", [this, ...args]);
7233
+ }
7234
+ subtract(...args) {
7235
+ return new CssContinuation("-", [this, ...args]);
7236
+ }
7237
+ minus(...args) {
7238
+ return this.subtract(...args);
7239
+ }
7240
+ multiply(...args) {
7241
+ return new CssContinuation("*", [this, ...args]);
7242
+ }
7243
+ divide(...args) {
7244
+ return new CssContinuation("/", [this, ...args]);
7245
+ }
7246
+ __get(parent) {
7247
+ const { __operation, __operands } = this;
7248
+ const result = __operands.map((operand) => operandToString(operand, this)).join(` ${__operation} `);
7249
+ const skipParens = __operands.length <= 1 ? true : parent?.__operation === "+" || parent?.__operation === "-";
7250
+ return skipParens ? result : `(${result})`;
7251
+ }
7252
+ done() {
7253
+ const str = this.__get();
7254
+ const hasParens = str.startsWith("(") && str.endsWith(")");
7255
+ const value = hasParens ? str : `(${str})`;
7256
+ return `calc${value}`;
7257
+ }
7258
+ };
7259
+ function operandToString(operand, parent) {
7260
+ if (typeof operand === "string" || typeof operand === "number") {
7261
+ return `${operand}`;
7262
+ }
7263
+ if (!parent) {
7264
+ return operand.done();
7265
+ }
7266
+ return operand.__get(parent);
7267
+ }
7268
+ var add = (...args) => new CssContinuation("+", mapToContinuation(args));
7269
+ var subtract = (...args) => new CssContinuation("-", mapToContinuation(args));
7270
+ var multiply = (...args) => new CssContinuation("*", mapToContinuation(args));
7271
+ var divide = (...args) => new CssContinuation("/", mapToContinuation(args));
7272
+ var CSSCalc = {
7273
+ add,
7274
+ subtract,
7275
+ minus: subtract,
7276
+ multiply,
7277
+ divide
7278
+ };
7279
+
7093
7280
  // src/components/InfiniteTable/utils/moveXatY.ts
7094
7281
  var moveXatY = (arr, dragIndex, dropIndex) => {
7095
7282
  arr = [...arr];
@@ -7190,8 +7377,6 @@ var PROXY_OFFSET = 10;
7190
7377
  var pinnedStartWidthCSSVar2 = stripVar(InternalVars.pinnedStartWidth);
7191
7378
  function reorderColumnsOnDrag(params) {
7192
7379
  const {
7193
- columnOffsetAtIndexCSSVar,
7194
- columnWidthAtIndexCSSVar,
7195
7380
  computedVisibleColumns,
7196
7381
  computedVisibleColumnsMap,
7197
7382
  computedPinnedEndColumns,
@@ -7203,7 +7388,9 @@ function reorderColumnsOnDrag(params) {
7203
7388
  draggableColumnsRestrictTo,
7204
7389
  tableRect,
7205
7390
  setProxyPosition,
7206
- api: imperativeApi
7391
+ api: imperativeApi,
7392
+ horizontalLayoutPageIndex,
7393
+ pageWidth
7207
7394
  } = params;
7208
7395
  function getCurrentPinnedWidth(pinned) {
7209
7396
  let currentWidth = pinned === "start" ? pinnedStartInitialWidth : pinnedEndInitialWidth;
@@ -7219,27 +7406,32 @@ function reorderColumnsOnDrag(params) {
7219
7406
  return currentWidth;
7220
7407
  }
7221
7408
  function isColumnVisible2(b) {
7222
- if (b.index === dragColumnIndex) {
7409
+ if (b.columnIndex === dragColumnIndex) {
7410
+ return true;
7411
+ }
7412
+ if (horizontalLayoutPageIndex != null) {
7223
7413
  return true;
7224
7414
  }
7225
- const col = computedVisibleColumns[b.index];
7415
+ const col = computedVisibleColumns[b.columnIndex];
7226
7416
  if (col.computedPinned) {
7227
7417
  return true;
7228
7418
  }
7229
7419
  const scrollLeft2 = brain.getScrollPosition().scrollLeft;
7230
- return col.computedOffset >= scrollLeft2 + getCurrentPinnedWidth("start") && col.computedOffset + col.computedWidth < scrollLeft2 + tableRect.width - getCurrentPinnedWidth("end");
7420
+ const colOffset = col.computedOffset + (horizontalLayoutPageIndex != null && pageWidth != null ? pageWidth * horizontalLayoutPageIndex : 0);
7421
+ const visible = colOffset >= scrollLeft2 + getCurrentPinnedWidth("start") && colOffset + col.computedWidth <= scrollLeft2 + tableRect.width - getCurrentPinnedWidth("end");
7422
+ return visible;
7231
7423
  }
7232
7424
  const getBreakPoints = (columns, options) => {
7233
7425
  const { restrictToParentGroup, dragColumn: dragColumn2 } = options;
7234
7426
  let breakpoints = [];
7235
7427
  columns.forEach((c) => {
7428
+ if (c.computedVisibleIndex === dragColumnIndex) {
7429
+ return;
7430
+ }
7236
7431
  const b = {
7237
7432
  columnId: c.id,
7238
- index: c.computedVisibleIndex,
7239
- breakpoint: (
7240
- // tableRect.left +
7241
- c.computedOffset + Math.round(c.computedWidth / 2)
7242
- )
7433
+ columnIndex: c.computedVisibleIndex,
7434
+ offsetX: c.computedOffset + Math.round(c.computedWidth / 2)
7243
7435
  };
7244
7436
  if (isColumnVisible2(b)) {
7245
7437
  breakpoints.push(b);
@@ -7351,7 +7543,7 @@ function reorderColumnsOnDrag(params) {
7351
7543
  }
7352
7544
  }
7353
7545
  function updateDropIndex(newDropIndex) {
7354
- if (newDropIndex === currentDropIndex) {
7546
+ if (newDropIndex == null || newDropIndex === currentDropIndex) {
7355
7547
  return;
7356
7548
  }
7357
7549
  currentDropIndex = newDropIndex;
@@ -7393,23 +7585,32 @@ function reorderColumnsOnDrag(params) {
7393
7585
  newPosition = isDragColumn ? (
7394
7586
  // this is the column we're dragging to the left
7395
7587
  // so we place it exactly at the offset of the currentDropIndex
7396
- `var(${columnOffsetAtIndexCSSVar}-${currentDropIndex})`
7588
+ InternalVarUtils.columnOffsets.get(currentDropIndex)
7397
7589
  ) : isOutsideCol ? (
7398
7590
  // this col should have the initial pos, so we're good
7399
- `var(${columnOffsetAtIndexCSSVar}-${colIndex})`
7591
+ InternalVarUtils.columnOffsets.get(colIndex)
7400
7592
  ) : (
7401
7593
  // place it at the default offset + the width of the drag column
7402
7594
  // as these are columns situated between the dragindex and the dropindex
7403
- `calc( var(${columnOffsetAtIndexCSSVar}-${colIndex}) + var(${columnWidthAtIndexCSSVar}-${dragColumnIndex}) )`
7595
+ CSSCalc.add(
7596
+ InternalVarUtils.columnOffsets.get(colIndex),
7597
+ InternalVarUtils.columnWidths.get(dragColumnIndex)
7598
+ ).done()
7404
7599
  );
7405
7600
  } else {
7406
7601
  newPosition = isOutsideCol ? (
7407
7602
  // this is the default value for a column
7408
- `var(${columnOffsetAtIndexCSSVar}-${colIndex})`
7603
+ InternalVarUtils.columnOffsets.get(colIndex)
7409
7604
  ) : isDragColumn ? (
7410
7605
  // this is the column we're dragging to the right
7411
- `calc( var(${columnOffsetAtIndexCSSVar}-${currentDropIndex - 1}) + var(${columnWidthAtIndexCSSVar}-${currentDropIndex - 1}) - var(${columnWidthAtIndexCSSVar}-${dragColumnIndex}) )`
7412
- ) : `calc( var(${columnOffsetAtIndexCSSVar}-${colIndex}) - var(${columnWidthAtIndexCSSVar}-${dragColumnIndex}) )`;
7606
+ CSSCalc.add(
7607
+ InternalVarUtils.columnOffsets.get(currentDropIndex - 1),
7608
+ InternalVarUtils.columnWidths.get(currentDropIndex - 1)
7609
+ ).minus(InternalVarUtils.columnWidths.get(dragColumnIndex)).done()
7610
+ ) : CSSCalc.minus(
7611
+ InternalVarUtils.columnOffsets.get(colIndex),
7612
+ InternalVarUtils.columnWidths.get(dragColumnIndex)
7613
+ ).done();
7413
7614
  }
7414
7615
  setInfiniteColumnOffsetWhileReordering(
7415
7616
  colIndex,
@@ -7449,20 +7650,25 @@ function reorderColumnsOnDrag(params) {
7449
7650
  let idx = (0, import_binary_search2.default)(
7450
7651
  breakpoints,
7451
7652
  currentPos,
7452
- ({ breakpoint }, value) => {
7453
- return breakpoint < value ? -1 : breakpoint > value ? 1 : 0;
7653
+ ({ offsetX }, value) => {
7654
+ return offsetX < value ? -1 : offsetX > value ? 1 : 0;
7454
7655
  }
7455
7656
  );
7456
7657
  if (idx < 0) {
7457
7658
  idx = ~idx;
7458
7659
  }
7459
- idx = breakpoints[idx] ? breakpoints[idx].index : breakpoints[breakpoints.length - 1].index + 1;
7460
- if (idx != null && idx !== currentDropIndex) {
7461
- if (dir === 1 && currentDropIndex === dragColumnIndex + 1) {
7462
- idx = dragColumnIndex;
7660
+ if (!breakpoints.length) {
7661
+ if (computedVisibleColumns.length > 1) {
7662
+ console.error("No breakpoints available, something is wrong!");
7463
7663
  }
7464
- updateDropIndex(idx);
7664
+ idx = 0;
7665
+ } else {
7666
+ idx = breakpoints[idx] ? breakpoints[idx].columnIndex : breakpoints[breakpoints.length - 1].columnIndex + 1;
7465
7667
  }
7668
+ if (idx === dragColumnIndex + 1) {
7669
+ idx = dragColumnIndex;
7670
+ }
7671
+ updateDropIndex(idx);
7466
7672
  const columnPinning = {};
7467
7673
  computedPinnedEndColumns.forEach((col) => {
7468
7674
  columnPinning[col.id] = "end";
@@ -7559,8 +7765,6 @@ function adjustColumnOrderForAllColumns(options) {
7559
7765
  }
7560
7766
 
7561
7767
  // src/components/InfiniteTable/hooks/useColumnPointerEvents.ts
7562
- var columnOffsetAtIndex4 = stripVar(InternalVars.columnOffsetAtIndex);
7563
- var columnWidthAtIndex3 = stripVar(InternalVars.columnWidthAtIndex);
7564
7768
  var baseZIndexForCells2 = stripVar(InternalVars.baseZIndexForCells);
7565
7769
  var equalPinning = (pinning1, pinning2) => {
7566
7770
  const empty1 = !pinning1 || Object.keys(pinning1).length === 0;
@@ -7575,7 +7779,8 @@ var equalPinning = (pinning1, pinning2) => {
7575
7779
  };
7576
7780
  var useColumnPointerEvents = ({
7577
7781
  columnId,
7578
- domRef
7782
+ domRef,
7783
+ horizontalLayoutPageIndex
7579
7784
  }) => {
7580
7785
  const [proxyPosition, setProxyPosition] = (0, import_react21.useState)(null);
7581
7786
  const {
@@ -7619,13 +7824,20 @@ var useColumnPointerEvents = ({
7619
7824
  const tableRect = rootRef.current.getBoundingClientRect();
7620
7825
  const initialAvailableSize = brain.getAvailableSize();
7621
7826
  const dragColumnIndex = dragColumn.computedVisibleIndex;
7827
+ const dragColumnIndexInHorizontalLayout = brain.getVirtualColIndex(
7828
+ dragColumn.computedVisibleIndex,
7829
+ {
7830
+ pageIndex: horizontalLayoutPageIndex || 0
7831
+ }
7832
+ );
7833
+ const pageWidth = brain.isHorizontalLayoutBrain ? brain.getPageWidth() : null;
7622
7834
  let initialCursor = target.style.cursor ?? "auto";
7623
7835
  let didDragAtLeastOnce = false;
7624
7836
  const dragger = reorderColumnsOnDrag({
7625
7837
  brain,
7838
+ horizontalLayoutPageIndex,
7839
+ pageWidth,
7626
7840
  draggableColumnsRestrictTo,
7627
- columnOffsetAtIndexCSSVar: columnOffsetAtIndex4,
7628
- columnWidthAtIndexCSSVar: columnWidthAtIndex3,
7629
7841
  computedPinnedEndColumns,
7630
7842
  computedPinnedStartColumns,
7631
7843
  computedUnpinnedColumns,
@@ -7643,6 +7855,8 @@ var useColumnPointerEvents = ({
7643
7855
  }
7644
7856
  });
7645
7857
  let reorderDragResult = null;
7858
+ let discardAlwaysRenderedColumn;
7859
+ let restoreRenderRange;
7646
7860
  function persistColumnOrder(reorderDragResult2) {
7647
7861
  const { columnPinning, columnOrder } = reorderDragResult2;
7648
7862
  if (!equalPinning(getState().columnPinning, columnPinning)) {
@@ -7671,15 +7885,37 @@ var useColumnPointerEvents = ({
7671
7885
  const { headerBrain, brain: brain2 } = getState();
7672
7886
  if (!didDragAtLeastOnce) {
7673
7887
  didDragAtLeastOnce = true;
7674
- brain2.setRenderCount({
7675
- horizontal: computedVisibleColumns.length,
7676
- vertical: void 0
7677
- });
7678
- headerBrain.setRenderCount({
7679
- horizontal: computedVisibleColumns.length,
7680
- vertical: void 0
7681
- });
7888
+ const discardForBody = brain2.keepColumnRendered(
7889
+ dragColumnIndexInHorizontalLayout
7890
+ );
7891
+ const discardForHeader = headerBrain.keepColumnRendered(
7892
+ dragColumnIndexInHorizontalLayout
7893
+ );
7894
+ if (brain2.isHorizontalLayoutBrain) {
7895
+ const extendBy = true;
7896
+ const restoreBodyRange = brain2.extendRenderRange({
7897
+ start: extendBy,
7898
+ end: extendBy,
7899
+ direction: "horizontal"
7900
+ });
7901
+ const restoreHeaderRange = headerBrain.extendRenderRange({
7902
+ start: extendBy,
7903
+ end: extendBy,
7904
+ direction: "horizontal"
7905
+ });
7906
+ restoreRenderRange = () => {
7907
+ restoreBodyRange();
7908
+ restoreHeaderRange();
7909
+ };
7910
+ }
7911
+ discardAlwaysRenderedColumn = () => {
7912
+ discardForBody();
7913
+ discardForHeader();
7914
+ };
7682
7915
  actions.columnReorderDragColumnId = dragColumn.id;
7916
+ if (horizontalLayoutPageIndex != null) {
7917
+ actions.columnReorderInPageIndex = horizontalLayoutPageIndex;
7918
+ }
7683
7919
  setInfiniteColumnZIndex(
7684
7920
  dragColumnIndex,
7685
7921
  `calc( var(${baseZIndexForCells2}) + 10000 )`,
@@ -7698,6 +7934,8 @@ var useColumnPointerEvents = ({
7698
7934
  brain.update({
7699
7935
  ...initialAvailableSize
7700
7936
  });
7937
+ discardAlwaysRenderedColumn?.();
7938
+ restoreRenderRange?.();
7701
7939
  computedVisibleColumns.forEach((col) => {
7702
7940
  clearInfiniteColumnReorderDuration(
7703
7941
  col.computedVisibleIndex,
@@ -7732,12 +7970,15 @@ var useColumnPointerEvents = ({
7732
7970
  persistColumnOrder(reorderDragResult);
7733
7971
  }
7734
7972
  actions.columnReorderDragColumnId = false;
7973
+ if (horizontalLayoutPageIndex != null) {
7974
+ actions.columnReorderInPageIndex = null;
7975
+ }
7735
7976
  };
7736
7977
  target.addEventListener("pointermove", onPointerMove);
7737
7978
  target.addEventListener("pointerup", onPointerUp);
7738
7979
  target.setPointerCapture(e.pointerId);
7739
7980
  },
7740
- [columnId]
7981
+ [columnId, horizontalLayoutPageIndex]
7741
7982
  );
7742
7983
  return {
7743
7984
  onPointerDown: computed.computedVisibleColumnsMap.get(columnId)?.computedDraggable ? onPointerDown : defaultPointerDown,
@@ -8047,7 +8288,7 @@ function objectValuesExcept(obj, exceptList) {
8047
8288
 
8048
8289
  // src/components/InfiniteTable/components/cell.css.ts
8049
8290
  var ColumnCellCls = "cell_ColumnCellCls__1eexc2a6 cell_CellCls__1eexc2a5 utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q utilities_position_absolute__16lm1iw2 utilities_willChange_transform__16lm1iw22 utilities_whiteSpace_nowrap__16lm1iw23 utilities_userSelect_none__16lm1iw17";
8050
- var ColumnCellRecipe = createRuntimeFn({ defaultClassName: "cell_ColumnCellRecipe__1eexc2am", variantClassNames: { dragging: { false: "cell_ColumnCellRecipe_dragging_false__1eexc2an", true: "cell_ColumnCellRecipe_dragging_true__1eexc2ao" }, cellSelected: { false: "cell_ColumnCellRecipe_cellSelected_false__1eexc2ap", true: "cell_ColumnCellRecipe_cellSelected_true__1eexc2aq" }, align: { start: "cell_ColumnCellRecipe_align_start__1eexc2ar", end: "cell_ColumnCellRecipe_align_end__1eexc2as", center: "cell_ColumnCellRecipe_align_center__1eexc2at" }, verticalAlign: { start: "cell_ColumnCellRecipe_verticalAlign_start__1eexc2au", end: "cell_ColumnCellRecipe_verticalAlign_end__1eexc2av", center: "cell_ColumnCellRecipe_verticalAlign_center__1eexc2aw" }, rowActive: { false: "cell_ColumnCellRecipe_rowActive_false__1eexc2ax", true: "cell_ColumnCellRecipe_rowActive_true__1eexc2ay" }, groupRow: { false: "cell_ColumnCellRecipe_groupRow_false__1eexc2az", true: "cell_ColumnCellRecipe_groupRow_true__1eexc2a10" }, groupCell: { false: "cell_ColumnCellRecipe_groupCell_false__1eexc2a11", true: "cell_ColumnCellRecipe_groupCell_true__1eexc2a12" }, rowDisabled: { false: "cell_ColumnCellRecipe_rowDisabled_false__1eexc2a13", true: "cell_ColumnCellRecipe_rowDisabled_true__1eexc2a14" }, zebra: { false: "cell_ColumnCellRecipe_zebra_false__1eexc2a15", even: "cell_ColumnCellRecipe_zebra_even__1eexc2a16", odd: "cell_ColumnCellRecipe_zebra_odd__1eexc2a17" }, rowSelected: { true: "cell_ColumnCellRecipe_rowSelected_true__1eexc2a18", false: "cell_ColumnCellRecipe_rowSelected_false__1eexc2a19", null: "cell_ColumnCellRecipe_rowSelected_null__1eexc2a1a" }, first: { true: "cell_ColumnCellRecipe_first_true__1eexc2a1b", false: "cell_ColumnCellRecipe_first_false__1eexc2a1c" }, last: { true: "cell_ColumnCellRecipe_last_true__1eexc2a1d", false: "cell_ColumnCellRecipe_last_false__1eexc2a1e" }, groupByField: { true: "cell_ColumnCellRecipe_groupByField_true__1eexc2a1f", false: "cell_ColumnCellRecipe_groupByField_false__1eexc2a1g" }, firstInCategory: { true: "cell_ColumnCellRecipe_firstInCategory_true__1eexc2a1h", false: "cell_ColumnCellRecipe_firstInCategory_false__1eexc2a1i" }, firstRow: { true: "cell_ColumnCellRecipe_firstRow_true__1eexc2a1j", false: "cell_ColumnCellRecipe_firstRow_false__1eexc2a1k" }, firstRowInHorizontalLayoutPage: { true: "cell_ColumnCellRecipe_firstRowInHorizontalLayoutPage_true__1eexc2a1l", false: "cell_ColumnCellRecipe_firstRowInHorizontalLayoutPage_false__1eexc2a1m" }, lastInCategory: { true: "cell_ColumnCellRecipe_lastInCategory_true__1eexc2a1n", false: "cell_ColumnCellRecipe_lastInCategory_false__1eexc2a1o" }, pinned: { start: "cell_ColumnCellRecipe_pinned_start__1eexc2a1p", end: "cell_ColumnCellRecipe_pinned_end__1eexc2a1q", false: "cell_ColumnCellRecipe_pinned_false__1eexc2a1r" }, filtered: { true: "cell_ColumnCellRecipe_filtered_true__1eexc2a1s", false: "cell_ColumnCellRecipe_filtered_false__1eexc2a1t" } }, defaultVariants: {}, compoundVariants: [[{ firstRowInHorizontalLayoutPage: true, firstRow: false }, "cell_ColumnCellRecipe_compound_0__1eexc2a1u"], [{ pinned: "start", lastInCategory: true }, "cell_ColumnCellRecipe_compound_1__1eexc2a1v"], [{ pinned: "start", firstInCategory: true }, "cell_ColumnCellRecipe_compound_2__1eexc2a1w"], [{ pinned: "end", firstInCategory: true }, "cell_ColumnCellRecipe_compound_3__1eexc2a1x"], [{ pinned: "end", lastInCategory: true }, "cell_ColumnCellRecipe_compound_4__1eexc2a1y"], [{ align: "center", groupCell: false }, "cell_ColumnCellRecipe_compound_5__1eexc2a1z"], [{ rowDisabled: true, zebra: "odd" }, "cell_ColumnCellRecipe_compound_6__1eexc2a20"]] });
8291
+ var ColumnCellRecipe = createRuntimeFn({ defaultClassName: "cell_ColumnCellRecipe__1eexc2am", variantClassNames: { dragging: { false: "cell_ColumnCellRecipe_dragging_false__1eexc2an", true: "cell_ColumnCellRecipe_dragging_true__1eexc2ao" }, insideDisabledDraggingPage: { true: "cell_ColumnCellRecipe_insideDisabledDraggingPage_true__1eexc2ap", false: "cell_ColumnCellRecipe_insideDisabledDraggingPage_false__1eexc2aq" }, cellSelected: { false: "cell_ColumnCellRecipe_cellSelected_false__1eexc2ar", true: "cell_ColumnCellRecipe_cellSelected_true__1eexc2as" }, align: { start: "cell_ColumnCellRecipe_align_start__1eexc2at", end: "cell_ColumnCellRecipe_align_end__1eexc2au", center: "cell_ColumnCellRecipe_align_center__1eexc2av" }, verticalAlign: { start: "cell_ColumnCellRecipe_verticalAlign_start__1eexc2aw", end: "cell_ColumnCellRecipe_verticalAlign_end__1eexc2ax", center: "cell_ColumnCellRecipe_verticalAlign_center__1eexc2ay" }, rowActive: { false: "cell_ColumnCellRecipe_rowActive_false__1eexc2az", true: "cell_ColumnCellRecipe_rowActive_true__1eexc2a10" }, groupRow: { false: "cell_ColumnCellRecipe_groupRow_false__1eexc2a11", true: "cell_ColumnCellRecipe_groupRow_true__1eexc2a12" }, groupCell: { false: "cell_ColumnCellRecipe_groupCell_false__1eexc2a13", true: "cell_ColumnCellRecipe_groupCell_true__1eexc2a14" }, rowDisabled: { false: "cell_ColumnCellRecipe_rowDisabled_false__1eexc2a15", true: "cell_ColumnCellRecipe_rowDisabled_true__1eexc2a16" }, zebra: { false: "cell_ColumnCellRecipe_zebra_false__1eexc2a17", even: "cell_ColumnCellRecipe_zebra_even__1eexc2a18", odd: "cell_ColumnCellRecipe_zebra_odd__1eexc2a19" }, rowSelected: { true: "cell_ColumnCellRecipe_rowSelected_true__1eexc2a1a", false: "cell_ColumnCellRecipe_rowSelected_false__1eexc2a1b", null: "cell_ColumnCellRecipe_rowSelected_null__1eexc2a1c" }, first: { true: "cell_ColumnCellRecipe_first_true__1eexc2a1d", false: "cell_ColumnCellRecipe_first_false__1eexc2a1e" }, last: { true: "cell_ColumnCellRecipe_last_true__1eexc2a1f", false: "cell_ColumnCellRecipe_last_false__1eexc2a1g" }, groupByField: { true: "cell_ColumnCellRecipe_groupByField_true__1eexc2a1h", false: "cell_ColumnCellRecipe_groupByField_false__1eexc2a1i" }, firstInCategory: { true: "cell_ColumnCellRecipe_firstInCategory_true__1eexc2a1j", false: "cell_ColumnCellRecipe_firstInCategory_false__1eexc2a1k" }, firstRow: { true: "cell_ColumnCellRecipe_firstRow_true__1eexc2a1l", false: "cell_ColumnCellRecipe_firstRow_false__1eexc2a1m" }, firstRowInHorizontalLayoutPage: { true: "cell_ColumnCellRecipe_firstRowInHorizontalLayoutPage_true__1eexc2a1n", false: "cell_ColumnCellRecipe_firstRowInHorizontalLayoutPage_false__1eexc2a1o" }, lastInCategory: { true: "cell_ColumnCellRecipe_lastInCategory_true__1eexc2a1p", false: "cell_ColumnCellRecipe_lastInCategory_false__1eexc2a1q" }, pinned: { start: "cell_ColumnCellRecipe_pinned_start__1eexc2a1r", end: "cell_ColumnCellRecipe_pinned_end__1eexc2a1s", false: "cell_ColumnCellRecipe_pinned_false__1eexc2a1t" }, filtered: { true: "cell_ColumnCellRecipe_filtered_true__1eexc2a1u", false: "cell_ColumnCellRecipe_filtered_false__1eexc2a1v" } }, defaultVariants: {}, compoundVariants: [[{ firstRowInHorizontalLayoutPage: true, firstRow: false }, "cell_ColumnCellRecipe_compound_0__1eexc2a1w"], [{ pinned: "start", lastInCategory: true }, "cell_ColumnCellRecipe_compound_1__1eexc2a1x"], [{ pinned: "start", firstInCategory: true }, "cell_ColumnCellRecipe_compound_2__1eexc2a1y"], [{ pinned: "end", firstInCategory: true }, "cell_ColumnCellRecipe_compound_3__1eexc2a1z"], [{ pinned: "end", lastInCategory: true }, "cell_ColumnCellRecipe_compound_4__1eexc2a20"], [{ align: "center", groupCell: false }, "cell_ColumnCellRecipe_compound_5__1eexc2a21"], [{ rowDisabled: true, zebra: "odd" }, "cell_ColumnCellRecipe_compound_6__1eexc2a22"]] });
8051
8292
  var ColumnCellSelectionIndicatorRecipe = createRuntimeFn({ defaultClassName: "cell_ColumnCellSelectionIndicatorRecipe__1eexc2ad", variantClassNames: { right: { true: "cell_ColumnCellSelectionIndicatorRecipe_right_true__1eexc2ae", false: "cell_ColumnCellSelectionIndicatorRecipe_right_false__1eexc2af" }, left: { true: "cell_ColumnCellSelectionIndicatorRecipe_left_true__1eexc2ag", false: "cell_ColumnCellSelectionIndicatorRecipe_left_false__1eexc2ah" }, top: { true: "cell_ColumnCellSelectionIndicatorRecipe_top_true__1eexc2ai", false: "cell_ColumnCellSelectionIndicatorRecipe_top_false__1eexc2aj" }, bottom: { true: "cell_ColumnCellSelectionIndicatorRecipe_bottom_true__1eexc2ak", false: "cell_ColumnCellSelectionIndicatorRecipe_bottom_false__1eexc2al" } }, defaultVariants: {}, compoundVariants: [] });
8052
8293
  var FlashingColumnCellRecipe = createRuntimeFn({ defaultClassName: "cell_FlashingColumnCellRecipe__1eexc2a9", variantClassNames: { direction: { up: "cell_FlashingColumnCellRecipe_direction_up__1eexc2aa", down: "cell_FlashingColumnCellRecipe_direction_down__1eexc2ab", neutral: "cell_FlashingColumnCellRecipe_direction_neutral__1eexc2ac" } }, defaultVariants: {}, compoundVariants: [] });
8053
8294
  var SelectionCheckboxCls = "cell_SelectionCheckboxCls__1eexc2a7";
@@ -8440,7 +8681,7 @@ var React34 = __toESM(require("react"));
8440
8681
  var { rootClassName: rootClassName5 } = internalProps;
8441
8682
  var InfiniteTableCellClassName = `${rootClassName5}Cell`;
8442
8683
  var InfiniteTableCellContentClassName = `${rootClassName5}Cell_content`;
8443
- var columnWidthAtIndex4 = stripVar(InternalVars.columnWidthAtIndex);
8684
+ var columnWidthAtIndex3 = stripVar(InternalVars.columnWidthAtIndex);
8444
8685
  var columnReorderEffectDurationAtIndex2 = stripVar(
8445
8686
  InternalVars.columnReorderEffectDurationAtIndex
8446
8687
  );
@@ -8465,7 +8706,7 @@ function InfiniteTableCellFn(props) {
8465
8706
  } = props;
8466
8707
  const children = renderChildren();
8467
8708
  const style2 = {
8468
- width: `var(${columnWidthAtIndex4}-${column.computedVisibleIndex})`,
8709
+ width: `var(${columnWidthAtIndex3}-${column.computedVisibleIndex})`,
8469
8710
  transition: `transform var(${columnReorderEffectDurationAtIndex2}-${column.computedVisibleIndex}, 0s)`,
8470
8711
  ...domProps.style
8471
8712
  };
@@ -8655,7 +8896,7 @@ function InfiniteTableColumnCellFn(props) {
8655
8896
  api: dataSourceApi,
8656
8897
  componentActions: dataSourceActions
8657
8898
  } = useDataSourceContextValue();
8658
- const { activeRowIndex, keyboardNavigation } = getState();
8899
+ const { activeRowIndex, keyboardNavigation, columnReorderInPageIndex } = getState();
8659
8900
  const rowActive = rowIndex === activeRowIndex && keyboardNavigation === "row";
8660
8901
  const renderingContext = {
8661
8902
  getState,
@@ -8979,6 +9220,7 @@ function InfiniteTableColumnCellFn(props) {
8979
9220
  right: rightSelectionBorder,
8980
9221
  bottom: bottomSelectionBorder
8981
9222
  } : null;
9223
+ const insideDisabledDraggingPage = columnReorderInPageIndex != null ? horizontalLayoutPageIndex !== columnReorderInPageIndex : false;
8982
9224
  const afterChildren = editor;
8983
9225
  const theChildren = renderChildren();
8984
9226
  const cellProps = {
@@ -9003,6 +9245,7 @@ function InfiniteTableColumnCellFn(props) {
9003
9245
  ColumnCellRecipe,
9004
9246
  {
9005
9247
  dragging: false,
9248
+ insideDisabledDraggingPage,
9006
9249
  zebra,
9007
9250
  align: align2,
9008
9251
  verticalAlign,
@@ -9266,7 +9509,7 @@ function getColumnResizer(colIndex, {
9266
9509
  const column = columns[colIndex];
9267
9510
  return {
9268
9511
  resize(diff) {
9269
- setInfiniteColumnWidth(
9512
+ InternalVarUtils.columnWidths.set(
9270
9513
  colIndex,
9271
9514
  column.computedWidth + diff,
9272
9515
  domRef.current
@@ -9277,7 +9520,7 @@ function getColumnResizer(colIndex, {
9277
9520
  if (!nextColumn) {
9278
9521
  return;
9279
9522
  }
9280
- setInfiniteColumnWidth(
9523
+ InternalVarUtils.columnWidths.set(
9281
9524
  nextColIndex,
9282
9525
  nextColumn.computedWidth - diff,
9283
9526
  domRef.current
@@ -9285,7 +9528,7 @@ function getColumnResizer(colIndex, {
9285
9528
  if (nextColumn.computedPinned === "start") {
9286
9529
  addToInfiniteColumnOffset(nextColumn, diff, domRef.current);
9287
9530
  } else {
9288
- setInfiniteColumnOffset(
9531
+ InternalVarUtils.columnOffsets.set(
9289
9532
  nextColIndex,
9290
9533
  nextColumn.computedOffset + diff,
9291
9534
  domRef.current
@@ -9306,7 +9549,11 @@ function getColumnResizer(colIndex, {
9306
9549
  if (col.computedPinned === "end") {
9307
9550
  continue;
9308
9551
  }
9309
- setInfiniteColumnOffset(i, col.computedOffset + diff, domRef.current);
9552
+ InternalVarUtils.columnOffsets.set(
9553
+ i,
9554
+ col.computedOffset + diff,
9555
+ domRef.current
9556
+ );
9310
9557
  }
9311
9558
  return;
9312
9559
  }
@@ -9315,7 +9562,11 @@ function getColumnResizer(colIndex, {
9315
9562
  if (col.computedPinned) {
9316
9563
  continue;
9317
9564
  }
9318
- setInfiniteColumnOffset(i, col.computedOffset + diff, domRef.current);
9565
+ InternalVarUtils.columnOffsets.set(
9566
+ i,
9567
+ col.computedOffset + diff,
9568
+ domRef.current
9569
+ );
9319
9570
  }
9320
9571
  }
9321
9572
  };
@@ -9343,12 +9594,12 @@ function getColumnGroupResizer(colIndexes, config) {
9343
9594
  const colIndex = colIndexes[i];
9344
9595
  const column = columns[colIndex];
9345
9596
  const newWidth = column.computedWidth + diff;
9346
- setInfiniteColumnWidth(colIndex, newWidth, node);
9597
+ InternalVarUtils.columnWidths.set(colIndex, newWidth, node);
9347
9598
  if (column.computedPinned === "end") {
9348
9599
  return;
9349
9600
  }
9350
9601
  if (offset) {
9351
- setInfiniteColumnOffset(colIndex, offset, node);
9602
+ InternalVarUtils.columnOffsets.set(colIndex, offset, node);
9352
9603
  }
9353
9604
  offset += newWidth;
9354
9605
  });
@@ -9360,7 +9611,11 @@ function getColumnGroupResizer(colIndexes, config) {
9360
9611
  if (col.computedPinned === "end") {
9361
9612
  continue;
9362
9613
  }
9363
- setInfiniteColumnOffset(i, col.computedOffset + diffSum, node);
9614
+ InternalVarUtils.columnOffsets.set(
9615
+ i,
9616
+ col.computedOffset + diffSum,
9617
+ node
9618
+ );
9364
9619
  }
9365
9620
  }
9366
9621
  };
@@ -9400,12 +9655,14 @@ function ResizeHandleFn(props) {
9400
9655
  const target = e.target;
9401
9656
  if (brain.isHorizontalLayoutBrain) {
9402
9657
  const restoreBodyRange = brain.extendRenderRange({
9403
- left: true,
9404
- right: true
9658
+ start: true,
9659
+ end: true,
9660
+ direction: "horizontal"
9405
9661
  });
9406
9662
  const restoreHeaderRange = headerBrain.extendRenderRange({
9407
- left: true,
9408
- right: true
9663
+ start: true,
9664
+ end: true,
9665
+ direction: "horizontal"
9409
9666
  });
9410
9667
  restoreRenderRange = () => {
9411
9668
  restoreBodyRange();
@@ -9615,7 +9872,8 @@ function InfiniteTableHeaderCell(props) {
9615
9872
  portalDOMRef,
9616
9873
  columnHeaderHeight,
9617
9874
  columnReorderDragColumnId,
9618
- columnMenuVisibleForColumnId
9875
+ columnMenuVisibleForColumnId,
9876
+ columnReorderInPageIndex
9619
9877
  },
9620
9878
  getDataSourceMasterContext
9621
9879
  } = useInfiniteTable();
@@ -9626,7 +9884,9 @@ function InfiniteTableHeaderCell(props) {
9626
9884
  componentState: { filterDelay, filterTypes }
9627
9885
  } = useDataSourceContextValue();
9628
9886
  const { allRowsSelected, someRowsSelected, selectionMode } = useDataSourceState();
9887
+ const horizontalLayoutPageIndex = props.horizontalLayoutPageIndex;
9629
9888
  const dragging = columnReorderDragColumnId === column.id;
9889
+ const insideDisabledDraggingPage = columnReorderInPageIndex != null ? horizontalLayoutPageIndex !== columnReorderInPageIndex : false;
9630
9890
  const { onResize, height, width, headerOptions, columnsMap } = props;
9631
9891
  const sortInfo = column.computedSortInfo;
9632
9892
  const header = column.header;
@@ -9691,7 +9951,7 @@ function InfiniteTableHeaderCell(props) {
9691
9951
  const MenuIconCmp = column.components?.MenuIcon || components2?.MenuIcon || MenuIcon;
9692
9952
  const menuIcon = /* @__PURE__ */ React42.createElement(MenuIconCmp, { ...menuIconProps });
9693
9953
  const initialRenderParam = {
9694
- horizontalLayoutPageIndex: props.horizontalLayoutPageIndex,
9954
+ horizontalLayoutPageIndex,
9695
9955
  dragging,
9696
9956
  domRef: ref,
9697
9957
  insideColumnMenu: false,
@@ -9855,7 +10115,8 @@ function InfiniteTableHeaderCell(props) {
9855
10115
  const headerClassName = typeof column.headerClassName === "function" ? column.headerClassName(renderParam) : column.headerClassName;
9856
10116
  const { onPointerDown, proxyPosition } = useColumnPointerEvents({
9857
10117
  columnId: column.id,
9858
- domRef
10118
+ domRef,
10119
+ horizontalLayoutPageIndex
9859
10120
  });
9860
10121
  let draggingProxy = null;
9861
10122
  if (dragging && proxyPosition) {
@@ -9899,7 +10160,7 @@ function InfiniteTableHeaderCell(props) {
9899
10160
  const FilterEditor = operator?.components?.FilterEditor || filterType?.components?.FilterEditor || column.components?.FilterEditor || StringFilterEditor;
9900
10161
  const FilterOperatorSwitch = filterType?.components?.FilterOperatorSwitch || column.components?.FilterOperatorSwitch;
9901
10162
  const resizeHandle = useColumnResizeHandle(column, {
9902
- horizontalLayoutPageIndex: props.horizontalLayoutPageIndex
10163
+ horizontalLayoutPageIndex
9903
10164
  });
9904
10165
  const zIndex2 = `var(${columnZIndexAtIndex5}-${column.computedVisibleIndex})`;
9905
10166
  style2.zIndex = zIndex2;
@@ -9939,6 +10200,7 @@ function InfiniteTableHeaderCell(props) {
9939
10200
  HeaderCellRecipe,
9940
10201
  {
9941
10202
  dragging,
10203
+ insideDisabledDraggingPage,
9942
10204
  align: align2,
9943
10205
  verticalAlign,
9944
10206
  rowSelected: false,
@@ -9959,7 +10221,7 @@ function InfiniteTableHeaderCell(props) {
9959
10221
  afterChildren: /* @__PURE__ */ React42.createElement(React42.Fragment, null, showColumnFilters ? column.computedFilterable ? /* @__PURE__ */ React42.createElement(
9960
10222
  InfiniteTableColumnHeaderFilter,
9961
10223
  {
9962
- horizontalLayoutPageIndex: props.horizontalLayoutPageIndex,
10224
+ horizontalLayoutPageIndex,
9963
10225
  filterEditor: FilterEditor,
9964
10226
  filterOperatorSwitch: FilterOperatorSwitch ?? InfiniteTableFilterOperatorSwitch,
9965
10227
  operator,
@@ -10277,7 +10539,7 @@ function useColumnGroupResizeHandle(groupColumns, config) {
10277
10539
 
10278
10540
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
10279
10541
  var TableHeaderGroupClassName = `${rootClassName2}HeaderGroup`;
10280
- var columnWidthAtIndex5 = stripVar(InternalVars.columnWidthAtIndex);
10542
+ var columnWidthAtIndex4 = stripVar(InternalVars.columnWidthAtIndex);
10281
10543
  var columnZIndexAtIndex6 = stripVar(InternalVars.columnZIndexAtIndex);
10282
10544
  function InfiniteTableHeaderGroup(props) {
10283
10545
  const { columnGroup, height, columns, bodyBrain, columnGroupsMaxDepth } = props;
@@ -10296,8 +10558,8 @@ function InfiniteTableHeaderGroup(props) {
10296
10558
  });
10297
10559
  const firstColumn = columns[0];
10298
10560
  const width = columns.length > 1 ? `calc( ` + columns.map(
10299
- (col) => `var(${columnWidthAtIndex5}-${col.computedVisibleIndex})`
10300
- ).join(" + ") + " )" : `var(${columnWidthAtIndex5}-${firstColumn.computedVisibleIndex})`;
10561
+ (col) => `var(${columnWidthAtIndex4}-${col.computedVisibleIndex})`
10562
+ ).join(" + ") + " )" : `var(${columnWidthAtIndex4}-${firstColumn.computedVisibleIndex})`;
10301
10563
  const zIndex2 = `calc(var(${columnZIndexAtIndex6}-${firstColumn.computedVisibleIndex}) + ${columnGroupsMaxDepth - columnGroup.depth})`;
10302
10564
  let style2 = typeof userStyle === "function" ? userStyle({
10303
10565
  columnGroup,
@@ -11229,6 +11491,14 @@ function getEnhancedGroupData(options, deepMapValue) {
11229
11491
  };
11230
11492
  return enhancedGroupData;
11231
11493
  }
11494
+ function toDuplicateRow(parent, indexInAll, currentPage) {
11495
+ return {
11496
+ ...parent,
11497
+ id: `duplicate_row_on_page_${currentPage}_for__${parent.id}`,
11498
+ indexInAll,
11499
+ duplicateOf: parent.id
11500
+ };
11501
+ }
11232
11502
  function completeReducers(reducers, reducerResults, items) {
11233
11503
  if (reducers) {
11234
11504
  for (const key in reducers)
@@ -11245,6 +11515,8 @@ function enhancedFlatten(param) {
11245
11515
  const {
11246
11516
  lazyLoad,
11247
11517
  groupResult,
11518
+ rowsPerPage,
11519
+ repeatWrappedGroupRows,
11248
11520
  withRowInfo,
11249
11521
  toPrimaryKey,
11250
11522
  groupRowsState,
@@ -11310,6 +11582,17 @@ function enhancedFlatten(param) {
11310
11582
  include = false;
11311
11583
  }
11312
11584
  if (include) {
11585
+ if (repeatWrappedGroupRows && rowsPerPage != null && rowsPerPage > 0) {
11586
+ const indexInAll = enhancedGroupData.indexInAll;
11587
+ const currentParents = enhancedGroupData.parents;
11588
+ if (currentParents.length > 0 && indexInAll % rowsPerPage === 0) {
11589
+ const currentPage = indexInAll / rowsPerPage;
11590
+ currentParents.forEach((parent2, i) => {
11591
+ result.push(toDuplicateRow(parent2, indexInAll + i, currentPage));
11592
+ });
11593
+ enhancedGroupData.indexInAll += currentParents.length;
11594
+ }
11595
+ }
11313
11596
  result.push(enhancedGroupData);
11314
11597
  groupRowsIndexes.push(result.length - 1);
11315
11598
  }
@@ -11329,13 +11612,26 @@ function enhancedFlatten(param) {
11329
11612
  if (continueWithChildren) {
11330
11613
  if (!next) {
11331
11614
  if (!pivot) {
11332
- const startIndex = result.length;
11615
+ let startIndex = result.length;
11333
11616
  if (!collapsed) {
11334
11617
  result.length += items.length;
11335
11618
  }
11619
+ let extraArtificialGroupRows = 0;
11336
11620
  for (let index = 0, len = items.length; index < len; index++) {
11337
11621
  const item = items[index];
11338
- const indexInAll = startIndex + index;
11622
+ if (!collapsed && repeatWrappedGroupRows && rowsPerPage != null && rowsPerPage > 0) {
11623
+ const currentInsertIndex = startIndex + index + extraArtificialGroupRows;
11624
+ if (currentInsertIndex % rowsPerPage === 0) {
11625
+ const currentPage = currentInsertIndex / rowsPerPage;
11626
+ result.length += parents.length;
11627
+ parents.forEach((parent2) => {
11628
+ const i = startIndex + index + extraArtificialGroupRows;
11629
+ result[i] = toDuplicateRow(parent2, i, currentPage);
11630
+ extraArtificialGroupRows++;
11631
+ });
11632
+ }
11633
+ }
11634
+ const indexInAll = startIndex + index + extraArtificialGroupRows;
11339
11635
  const itemId = item ? toPrimaryKey(item, indexInAll) : `${groupKeys}-${index}`;
11340
11636
  const rowInfo = {
11341
11637
  id: itemId,
@@ -11378,7 +11674,7 @@ function enhancedFlatten(param) {
11378
11674
  parent2.deepRowInfoArray.push(rowInfo);
11379
11675
  });
11380
11676
  if (!collapsed) {
11381
- result[startIndex + index] = rowInfo;
11677
+ result[startIndex + index + extraArtificialGroupRows] = rowInfo;
11382
11678
  }
11383
11679
  }
11384
11680
  }
@@ -14146,7 +14442,9 @@ function concludeReducer(params) {
14146
14442
  "aggregationReducers",
14147
14443
  "pivotTotalColumnPosition",
14148
14444
  "pivotGrandTotalColumnPosition",
14149
- "showSeparatePivotColumnForSingleAggregation"
14445
+ "showSeparatePivotColumnForSingleAggregation",
14446
+ "repeatWrappedGroupRows",
14447
+ "rowsPerPage"
14150
14448
  ]);
14151
14449
  const rowInfoReducersChanged = haveDepsChanged(previousState, state, [
14152
14450
  "rowInfoReducers"
@@ -14265,6 +14563,8 @@ function concludeReducer(params) {
14265
14563
  isRowSelected,
14266
14564
  rowSelectionState,
14267
14565
  withRowInfo,
14566
+ repeatWrappedGroupRows: state.repeatWrappedGroupRows && state.rowsPerPage != null,
14567
+ rowsPerPage: state.rowsPerPage,
14268
14568
  groupRowsState: state.groupRowsState,
14269
14569
  generateGroupRows: state.generateGroupRows
14270
14570
  });
@@ -15053,6 +15353,7 @@ function initSetupState() {
15053
15353
  return {
15054
15354
  // TODO cleanup indexer on unmount
15055
15355
  indexer: new Indexer(),
15356
+ repeatWrappedGroupRows: false,
15056
15357
  destroyedRef: {
15057
15358
  current: false
15058
15359
  },
@@ -15067,6 +15368,7 @@ function initSetupState() {
15067
15368
  timestamp: 0,
15068
15369
  mutations: void 0
15069
15370
  },
15371
+ rowsPerPage: null,
15070
15372
  lazyLoadCacheOfLoadedBatches: new DeepMap(),
15071
15373
  dataParams: void 0,
15072
15374
  onCleanup: buildSubscriptionCallback(),
@@ -17043,6 +17345,17 @@ var InfiniteTableApiImpl = class {
17043
17345
  setColumnVisibility(columnVisibility) {
17044
17346
  this.actions.columnVisibility = columnVisibility;
17045
17347
  }
17348
+ get scrollContainer() {
17349
+ return this.getState().scrollerDOMRef.current;
17350
+ }
17351
+ get scrollLeftMax() {
17352
+ const scrollLeftMax = this.getState().brain.scrollLeftMax;
17353
+ return scrollLeftMax;
17354
+ }
17355
+ get scrollTopMax() {
17356
+ const scrollTopMax = this.getState().brain.scrollTopMax;
17357
+ return scrollTopMax;
17358
+ }
17046
17359
  get scrollLeft() {
17047
17360
  const state = this.getState();
17048
17361
  return state.brain.getScrollPosition().scrollLeft;
@@ -18054,6 +18367,28 @@ var HorizontalLayoutMatrixBrain = class extends MatrixBrain {
18054
18367
  });
18055
18368
  }
18056
18369
  }
18370
+ computeDirectionalRenderCount(direction, itemSize, count, theRenderSize) {
18371
+ if (direction === "vertical" || typeof itemSize === "number") {
18372
+ return super.computeDirectionalRenderCount(
18373
+ direction,
18374
+ itemSize,
18375
+ count,
18376
+ theRenderSize
18377
+ );
18378
+ }
18379
+ let renderCount = 0;
18380
+ let size = theRenderSize.width;
18381
+ const pagesInView = Math.floor(size / this.pageWidth);
18382
+ renderCount += pagesInView * this.initialCols;
18383
+ const remainingSize = size - pagesInView * this.pageWidth;
18384
+ const sizes = [];
18385
+ for (let i = 0; i < this.initialCols; i++) {
18386
+ sizes.push(this.getItemSize(i, direction));
18387
+ }
18388
+ renderCount += getGreatestCountVisibleInSize(remainingSize, sizes);
18389
+ renderCount = Math.min(count, renderCount);
18390
+ return renderCount;
18391
+ }
18057
18392
  getRowIndexInPage(rowIndex) {
18058
18393
  return this.rowsPerPage ? rowIndex % this.rowsPerPage : rowIndex;
18059
18394
  }
@@ -18200,6 +18535,9 @@ var HorizontalLayoutMatrixBrain = class extends MatrixBrain {
18200
18535
  }
18201
18536
  this._totalPageCount = value;
18202
18537
  }
18538
+ getPageWidth() {
18539
+ return this.pageWidth;
18540
+ }
18203
18541
  doUpdateRenderCount(which = ALL_DIRECTIONS) {
18204
18542
  const rowHeight = this.getInitialRowHeight();
18205
18543
  let pageWidth = 0;
@@ -18352,6 +18690,7 @@ function initSetupState2({
18352
18690
  scrollLeft: 0
18353
18691
  },
18354
18692
  columnReorderDragColumnId: false,
18693
+ columnReorderInPageIndex: null,
18355
18694
  ready: false,
18356
18695
  focused: false,
18357
18696
  focusedWithin: false,
@@ -18360,7 +18699,8 @@ function initSetupState2({
18360
18699
  pinnedStartScrollListener: new ScrollListener(),
18361
18700
  pinnedEndScrollListener: new ScrollListener(),
18362
18701
  columnsWhenInlineGroupRenderStrategy: void 0,
18363
- editingCell: null
18702
+ editingCell: null,
18703
+ forceBodyRerenderTimestamp: 0
18364
18704
  };
18365
18705
  }
18366
18706
  var forwardProps4 = (_setupState) => {
@@ -18405,6 +18745,7 @@ var forwardProps4 = (_setupState) => {
18405
18745
  rowProps: 1,
18406
18746
  rowClassName: 1,
18407
18747
  cellClassName: 1,
18748
+ repeatWrappedGroupRows: 1,
18408
18749
  pinnedStartMaxWidth: 1,
18409
18750
  pinnedEndMaxWidth: 1,
18410
18751
  pivotColumn: 1,
@@ -19776,7 +20117,7 @@ var useLicense = (licenseKey = "") => {
19776
20117
  }
19777
20118
  let valid2 = isValidLicense(licenseKey, {
19778
20119
  publishedAt: 1624970570587,
19779
- version: "5.0.0-canary.8"
20120
+ version: "5.0.0"
19780
20121
  });
19781
20122
  if (!licenseKey && !valid2 && isInsidePlayground) {
19782
20123
  return true;
@@ -23428,17 +23769,17 @@ function HScrollSyncContent(props) {
23428
23769
  }
23429
23770
 
23430
23771
  // src/components/InfiniteTable/hooks/useVisibleColumnSizes.ts
23431
- var columnWidthAtIndex6 = stripVar(InternalVars.columnWidthAtIndex);
23432
- var columnOffsetAtIndex5 = stripVar(InternalVars.columnOffsetAtIndex);
23772
+ var columnWidthAtIndex5 = stripVar(InternalVars.columnWidthAtIndex);
23773
+ var columnOffsetAtIndex3 = stripVar(InternalVars.columnOffsetAtIndex);
23433
23774
  function useVisibleColumnSizes() {
23434
23775
  const context = useInfiniteTable();
23435
23776
  return context.computed.computedVisibleColumns.map((column) => {
23436
23777
  return {
23437
23778
  id: column.id,
23438
23779
  width: column.computedWidth,
23439
- cssVarForWidth: `var(${columnWidthAtIndex6}-${column.computedVisibleIndex})`,
23780
+ cssVarForWidth: `var(${columnWidthAtIndex5}-${column.computedVisibleIndex})`,
23440
23781
  offset: column.computedOffset,
23441
- cssVarForOffset: `var(${columnOffsetAtIndex5}-${column.computedVisibleIndex})`,
23782
+ cssVarForOffset: `var(${columnOffsetAtIndex3}-${column.computedVisibleIndex})`,
23442
23783
  pinned: column.computedPinned
23443
23784
  };
23444
23785
  });
@@ -23469,6 +23810,52 @@ function useToggleWrapRowsHorizontally() {
23469
23810
  }, [oldWrapRowsHorizontally, wrapRowsHorizontally]);
23470
23811
  }
23471
23812
 
23813
+ // src/components/InfiniteTable/hooks/useHorizontalLayout.ts
23814
+ var import_react66 = require("react");
23815
+ function useHorizontalLayout() {
23816
+ const { getState, actions, dataSourceActions, getDataSourceState } = useInfiniteTable();
23817
+ const { groupBy } = getDataSourceState();
23818
+ const { brain, wrapRowsHorizontally, repeatWrappedGroupRows } = getState();
23819
+ (0, import_react66.useEffect)(() => {
23820
+ if (!wrapRowsHorizontally) {
23821
+ return;
23822
+ }
23823
+ const onVerticalRenderRangeChange = () => {
23824
+ const {
23825
+ rowsPerPage: currentRowsPerPage,
23826
+ repeatWrappedGroupRows: currentRepeatWrappedGroupRows
23827
+ } = getDataSourceState();
23828
+ let changes = false;
23829
+ const rowsPerPage = brain.rowsPerPage;
23830
+ const newRowsPerPage = groupBy && groupBy.length > 0 ? rowsPerPage : null;
23831
+ if (currentRowsPerPage != newRowsPerPage) {
23832
+ dataSourceActions.rowsPerPage = newRowsPerPage;
23833
+ changes = true;
23834
+ }
23835
+ if (currentRepeatWrappedGroupRows != !!repeatWrappedGroupRows) {
23836
+ dataSourceActions.repeatWrappedGroupRows = !!repeatWrappedGroupRows;
23837
+ changes = true;
23838
+ }
23839
+ return changes;
23840
+ };
23841
+ onVerticalRenderRangeChange();
23842
+ let timeoutId;
23843
+ const off = brain.onVerticalRenderRangeChange(() => {
23844
+ if (onVerticalRenderRangeChange()) {
23845
+ timeoutId = setTimeout(() => {
23846
+ actions.forceBodyRerenderTimestamp = Date.now();
23847
+ });
23848
+ }
23849
+ });
23850
+ return () => {
23851
+ if (timeoutId) {
23852
+ clearTimeout(timeoutId);
23853
+ }
23854
+ off();
23855
+ };
23856
+ }, [brain, wrapRowsHorizontally, groupBy, repeatWrappedGroupRows]);
23857
+ }
23858
+
23472
23859
  // src/components/InfiniteTable/index.tsx
23473
23860
  var InfiniteTableClassName = internalProps.rootClassName;
23474
23861
  var HOVERED_CLASS_NAMES = [RowHoverCls, "InfiniteColumnCell--hovered"];
@@ -23600,6 +23987,7 @@ function InfiniteTableBody() {
23600
23987
  return /* @__PURE__ */ React68.createElement(InfiniteTableBodyContainer, { onContextMenu }, /* @__PURE__ */ React68.createElement(
23601
23988
  HeadlessTable,
23602
23989
  {
23990
+ forceRerenderTimestamp: componentState.forceBodyRerenderTimestamp,
23603
23991
  debugId,
23604
23992
  tabIndex: tabIndex ?? 0,
23605
23993
  autoFocus: autoFocus ?? void 0,
@@ -23679,6 +24067,7 @@ var InfiniteTableComponent = React68.memo(
23679
24067
  dataSourceActions.scrollStopDelayUpdatedByTable = scrollStopDelay;
23680
24068
  }, [scrollStopDelay]);
23681
24069
  useAutoSizeColumns();
24070
+ useHorizontalLayout();
23682
24071
  useEditingCallbackProps();
23683
24072
  const { menuPortal } = useColumnMenu();
23684
24073
  const { menuPortal: cellContextMenuPortal } = useCellContextMenu();
@@ -23824,6 +24213,7 @@ var InfiniteTable = function(props) {
23824
24213
  /* @__PURE__ */ React68.createElement(
23825
24214
  InfiniteTableRoot,
23826
24215
  {
24216
+ repeatWrappedGroupRows: !!props.wrapRowsHorizontally,
23827
24217
  rowHeight: DEFAULT_ROW_HEIGHT,
23828
24218
  columnHeaderHeight: DEFAULT_COLUMN_HEADER_HEIGHT,
23829
24219
  ...props
@@ -24080,7 +24470,7 @@ var keyboardShortcuts = {
24080
24470
  };
24081
24471
 
24082
24472
  // src/components/hooks/useInterceptedMap.ts
24083
- var import_react66 = require("react");
24473
+ var import_react67 = require("react");
24084
24474
  function interceptMap(map2, fns) {
24085
24475
  const { set, delete: deleteKey, clear } = map2;
24086
24476
  if (fns.set) {
@@ -24242,21 +24632,21 @@ var WeakFixedSizeSet = _WeakFixedSizeSet;
24242
24632
  WeakFixedSizeSet.DEFAULT_SIZE = 10;
24243
24633
 
24244
24634
  // src/components/hooks/useEffectWhenSameDeps.ts
24245
- var import_react67 = require("react");
24635
+ var import_react68 = require("react");
24246
24636
  var isSameDeps = (deps, prevDeps) => {
24247
24637
  return deps.every((dep, index) => dep === prevDeps[index]);
24248
24638
  };
24249
24639
  var useEffectWhenSameDeps = (callback, deps) => {
24250
- const depsRef = (0, import_react67.useRef)(deps);
24640
+ const depsRef = (0, import_react68.useRef)(deps);
24251
24641
  const sameDeps = isSameDeps(deps, depsRef.current);
24252
- const isInitialRef = (0, import_react67.useRef)(true);
24642
+ const isInitialRef = (0, import_react68.useRef)(true);
24253
24643
  depsRef.current = deps;
24254
- const effectDepsRef = (0, import_react67.useRef)(["same"]);
24644
+ const effectDepsRef = (0, import_react68.useRef)(["same"]);
24255
24645
  const effectDeps = sameDeps ? [Date.now()] : effectDepsRef.current;
24256
24646
  effectDepsRef.current = effectDeps;
24257
- const callbackRef = (0, import_react67.useRef)(callback);
24647
+ const callbackRef = (0, import_react68.useRef)(callback);
24258
24648
  callbackRef.current = callback;
24259
- (0, import_react67.useEffect)(() => {
24649
+ (0, import_react68.useEffect)(() => {
24260
24650
  if (isInitialRef.current) {
24261
24651
  isInitialRef.current = false;
24262
24652
  return;
@@ -24266,7 +24656,7 @@ var useEffectWhenSameDeps = (callback, deps) => {
24266
24656
  };
24267
24657
 
24268
24658
  // src/components/hooks/useEffectWhen.ts
24269
- var import_react68 = require("react");
24659
+ var import_react69 = require("react");
24270
24660
  var isSameDeps2 = (deps, prevDeps, compare) => {
24271
24661
  return deps.every((dep, index) => {
24272
24662
  if (compare) {
@@ -24277,26 +24667,26 @@ var isSameDeps2 = (deps, prevDeps, compare) => {
24277
24667
  };
24278
24668
  var useEffectWhen = (callback, options) => {
24279
24669
  const { same: depsForSame, different: depsForDifferent, compare } = options;
24280
- const sameDepsRef = (0, import_react68.useRef)(depsForSame);
24281
- const differentDepsRef = (0, import_react68.useRef)(depsForDifferent);
24670
+ const sameDepsRef = (0, import_react69.useRef)(depsForSame);
24671
+ const differentDepsRef = (0, import_react69.useRef)(depsForDifferent);
24282
24672
  const sameRespected = isSameDeps2(depsForSame, sameDepsRef.current, compare);
24283
24673
  const differentRespected = !isSameDeps2(
24284
24674
  depsForDifferent,
24285
24675
  differentDepsRef.current,
24286
24676
  compare
24287
24677
  );
24288
- const isInitialRef = (0, import_react68.useRef)(true);
24678
+ const isInitialRef = (0, import_react69.useRef)(true);
24289
24679
  sameDepsRef.current = depsForSame;
24290
24680
  differentDepsRef.current = depsForDifferent;
24291
- const effectDepsRef = (0, import_react68.useRef)(["same"]);
24681
+ const effectDepsRef = (0, import_react69.useRef)(["same"]);
24292
24682
  const effectDeps = sameRespected && differentRespected ? [Date.now()] : effectDepsRef.current;
24293
24683
  effectDepsRef.current = effectDeps;
24294
- const callbackRef = (0, import_react68.useRef)(callback);
24684
+ const callbackRef = (0, import_react69.useRef)(callback);
24295
24685
  callbackRef.current = callback;
24296
24686
  if (sameRespected && differentRespected) {
24297
24687
  isInitialRef.current = false;
24298
24688
  }
24299
- (0, import_react68.useEffect)(() => {
24689
+ (0, import_react69.useEffect)(() => {
24300
24690
  if (isInitialRef.current) {
24301
24691
  return;
24302
24692
  }