@infinite-table/infinite-react 5.0.0-canary.8 → 5.1.0-canary.1
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.css +64 -54
- package/index.d.ts +16 -4
- package/index.dev.js +507 -231
- package/index.dev.mjs +507 -231
- package/index.js +507 -231
- package/index.mjs +507 -231
- package/package.json +2 -2
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
|
|
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
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
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
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
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
|
|
|
@@ -1533,6 +1549,7 @@ var MatrixBrain = class extends Logger {
|
|
|
1533
1549
|
this.availableRenderHeight = 0;
|
|
1534
1550
|
this.cols = 0;
|
|
1535
1551
|
this.rows = 0;
|
|
1552
|
+
this.alwaysRenderedColumns = /* @__PURE__ */ new Set();
|
|
1536
1553
|
this._rowsPerPage = 0;
|
|
1537
1554
|
this.rowHeight = 0;
|
|
1538
1555
|
this.colWidth = 0;
|
|
@@ -1540,6 +1557,14 @@ var MatrixBrain = class extends Logger {
|
|
|
1540
1557
|
this.horizontalTotalSize = 0;
|
|
1541
1558
|
this.horizontalRenderCount = void 0;
|
|
1542
1559
|
this.verticalRenderCount = void 0;
|
|
1560
|
+
this.horizontalExtendRangeBy = {
|
|
1561
|
+
start: 0,
|
|
1562
|
+
end: 0
|
|
1563
|
+
};
|
|
1564
|
+
this.verticalExtendRangeBy = {
|
|
1565
|
+
start: 0,
|
|
1566
|
+
end: 0
|
|
1567
|
+
};
|
|
1543
1568
|
this.horizontalRenderRange = {
|
|
1544
1569
|
startIndex: 0,
|
|
1545
1570
|
endIndex: 0
|
|
@@ -1679,34 +1704,6 @@ var MatrixBrain = class extends Logger {
|
|
|
1679
1704
|
});
|
|
1680
1705
|
});
|
|
1681
1706
|
};
|
|
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
1707
|
this.isColFixedEnd = (colIndex) => {
|
|
1711
1708
|
if (!this.fixedColsEnd) {
|
|
1712
1709
|
return false;
|
|
@@ -1973,7 +1970,7 @@ var MatrixBrain = class extends Logger {
|
|
|
1973
1970
|
};
|
|
1974
1971
|
};
|
|
1975
1972
|
this.computeDirectionalRenderRange = (direction) => {
|
|
1976
|
-
|
|
1973
|
+
let renderCount = direction === "horizontal" ? this.horizontalRenderCount : this.verticalRenderCount;
|
|
1977
1974
|
const count = direction === "horizontal" ? this.cols : this.rows;
|
|
1978
1975
|
if (!renderCount) {
|
|
1979
1976
|
return {
|
|
@@ -1984,7 +1981,15 @@ var MatrixBrain = class extends Logger {
|
|
|
1984
1981
|
const fixedStartIndex = (direction === "horizontal" ? this.fixedColsStart : this.fixedRowsStart) || 0;
|
|
1985
1982
|
let scrollPositionForDirection = direction === "horizontal" ? this.scrollPosition.scrollLeft : this.scrollPosition.scrollTop;
|
|
1986
1983
|
scrollPositionForDirection += this.getFixedStartSize(direction);
|
|
1984
|
+
const extendBy = direction === "horizontal" ? this.horizontalExtendRangeBy : this.verticalExtendRangeBy;
|
|
1987
1985
|
let startIndex = this.getItemAt(scrollPositionForDirection, direction);
|
|
1986
|
+
if (extendBy.start) {
|
|
1987
|
+
startIndex = Math.max(0, startIndex - extendBy.start);
|
|
1988
|
+
renderCount += extendBy.start;
|
|
1989
|
+
}
|
|
1990
|
+
if (extendBy.end) {
|
|
1991
|
+
renderCount += extendBy.end;
|
|
1992
|
+
}
|
|
1988
1993
|
let endIndex = startIndex + renderCount;
|
|
1989
1994
|
const theEnd = Math.max(
|
|
1990
1995
|
fixedStartIndex,
|
|
@@ -2028,7 +2033,6 @@ var MatrixBrain = class extends Logger {
|
|
|
2028
2033
|
return searchResult;
|
|
2029
2034
|
}
|
|
2030
2035
|
return ~searchResult - 1;
|
|
2031
|
-
return 0;
|
|
2032
2036
|
};
|
|
2033
2037
|
this.computeCacheFor = (itemIndex, direction) => {
|
|
2034
2038
|
const itemSizeValueOrFn = direction === "horizontal" ? this.colWidth : this.rowHeight;
|
|
@@ -2193,6 +2197,15 @@ var MatrixBrain = class extends Logger {
|
|
|
2193
2197
|
}
|
|
2194
2198
|
return cachedSize;
|
|
2195
2199
|
};
|
|
2200
|
+
this.keepColumnRendered = (colIndex) => {
|
|
2201
|
+
this.alwaysRenderedColumns.add(colIndex);
|
|
2202
|
+
return () => {
|
|
2203
|
+
this.alwaysRenderedColumns.delete(colIndex);
|
|
2204
|
+
};
|
|
2205
|
+
};
|
|
2206
|
+
this.getAlwaysRenderedColumns = () => {
|
|
2207
|
+
return Array.from(this.alwaysRenderedColumns);
|
|
2208
|
+
};
|
|
2196
2209
|
this.setRenderRange = ({
|
|
2197
2210
|
horizontal,
|
|
2198
2211
|
vertical,
|
|
@@ -2462,28 +2475,30 @@ var MatrixBrain = class extends Logger {
|
|
|
2462
2475
|
* @param options.right - if true, extends the right side with the amount of current visible columns, otherwise with the specified number
|
|
2463
2476
|
*/
|
|
2464
2477
|
extendRenderRange(options) {
|
|
2465
|
-
const
|
|
2466
|
-
const
|
|
2467
|
-
const
|
|
2478
|
+
const { direction } = options;
|
|
2479
|
+
const horizontal = direction === "horizontal";
|
|
2480
|
+
const extendValueWhenTrue = horizontal ? this.horizontalRenderCount || this.getInitialCols() : this.verticalRenderCount || this.getInitialRows();
|
|
2481
|
+
const startAmount = typeof options.start === "number" ? options.start : options.start === true ? extendValueWhenTrue : 0;
|
|
2482
|
+
const endAmount = typeof options.end === "number" ? options.end : options.end === true ? extendValueWhenTrue : 0;
|
|
2483
|
+
if (horizontal) {
|
|
2484
|
+
this.horizontalExtendRangeBy = {
|
|
2485
|
+
start: startAmount,
|
|
2486
|
+
end: endAmount
|
|
2487
|
+
};
|
|
2488
|
+
} else {
|
|
2489
|
+
this.verticalExtendRangeBy = {
|
|
2490
|
+
start: startAmount,
|
|
2491
|
+
end: endAmount
|
|
2492
|
+
};
|
|
2493
|
+
}
|
|
2494
|
+
this.updateRenderRange({ horizontal, vertical: !horizontal });
|
|
2468
2495
|
const restore = () => {
|
|
2469
|
-
this.
|
|
2470
|
-
|
|
2471
|
-
|
|
2496
|
+
this.extendRenderRange({
|
|
2497
|
+
start: 0,
|
|
2498
|
+
end: 0,
|
|
2499
|
+
direction
|
|
2472
2500
|
});
|
|
2473
2501
|
};
|
|
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
2502
|
return restore;
|
|
2488
2503
|
}
|
|
2489
2504
|
updateRenderCount(which = ALL_DIRECTIONS) {
|
|
@@ -2555,6 +2570,34 @@ var MatrixBrain = class extends Logger {
|
|
|
2555
2570
|
fns[i](scrollPosition);
|
|
2556
2571
|
}
|
|
2557
2572
|
}
|
|
2573
|
+
computeDirectionalRenderCount(direction, itemSize, count, theRenderSize) {
|
|
2574
|
+
let renderCount = 0;
|
|
2575
|
+
let size = direction === "horizontal" ? theRenderSize.width : theRenderSize.height;
|
|
2576
|
+
size -= this.getFixedSize(direction);
|
|
2577
|
+
if (size <= 0) {
|
|
2578
|
+
return 0;
|
|
2579
|
+
}
|
|
2580
|
+
if (typeof itemSize === "function") {
|
|
2581
|
+
const sizes = [];
|
|
2582
|
+
for (let i = 0; i < count; i++) {
|
|
2583
|
+
sizes.push(this.getItemSize(i, direction));
|
|
2584
|
+
}
|
|
2585
|
+
sizes.sort(SORT_ASC);
|
|
2586
|
+
let sum2 = 0;
|
|
2587
|
+
for (let i = 0; i < count; i++) {
|
|
2588
|
+
sum2 += sizes[i];
|
|
2589
|
+
renderCount++;
|
|
2590
|
+
if (sum2 > size) {
|
|
2591
|
+
break;
|
|
2592
|
+
}
|
|
2593
|
+
}
|
|
2594
|
+
renderCount += 1;
|
|
2595
|
+
} else {
|
|
2596
|
+
renderCount = (itemSize ? Math.ceil(size / itemSize) : 0) + 1;
|
|
2597
|
+
}
|
|
2598
|
+
renderCount = Math.min(count, renderCount);
|
|
2599
|
+
return renderCount;
|
|
2600
|
+
}
|
|
2558
2601
|
getFixedSize(direction) {
|
|
2559
2602
|
return direction === "horizontal" ? this.getFixedStartColsWidth() + this.getFixedEndColsWidth() : this.getFixedStartRowsHeight() + this.getFixedEndRowsHeight();
|
|
2560
2603
|
}
|
|
@@ -2668,6 +2711,9 @@ var MatrixBrain = class extends Logger {
|
|
|
2668
2711
|
this.reset();
|
|
2669
2712
|
this.rowspanParent.clear();
|
|
2670
2713
|
this.colspanParent.clear();
|
|
2714
|
+
this.alwaysRenderedColumns.clear();
|
|
2715
|
+
this.horizontalExtendRangeBy = { start: 0, end: 0 };
|
|
2716
|
+
this.verticalExtendRangeBy = { start: 0, end: 0 };
|
|
2671
2717
|
this.destroyed = true;
|
|
2672
2718
|
this.onDestroyFns = [];
|
|
2673
2719
|
this.onScrollFns = [];
|
|
@@ -2701,6 +2747,9 @@ var MappedCells = class extends Logger {
|
|
|
2701
2747
|
}
|
|
2702
2748
|
return elementsOutsideItemRange.pop();
|
|
2703
2749
|
};
|
|
2750
|
+
this.getElementFromListForRow = (elementsOutsideItemRange, _rowIndex) => {
|
|
2751
|
+
return elementsOutsideItemRange.pop();
|
|
2752
|
+
};
|
|
2704
2753
|
/**
|
|
2705
2754
|
* Retrieves the elements that contain rendered cells that are outside
|
|
2706
2755
|
* of the specified range
|
|
@@ -2998,7 +3047,8 @@ var ReactHeadlessTableRenderer = class extends Logger {
|
|
|
2998
3047
|
this.detailRowUpdaters = [];
|
|
2999
3048
|
this.items = [];
|
|
3000
3049
|
this.detailItems = [];
|
|
3001
|
-
this.
|
|
3050
|
+
this.lastEnteredRow = -1;
|
|
3051
|
+
this.lastExitedRow = -1;
|
|
3002
3052
|
this.hoverRowUpdatesInProgress = /* @__PURE__ */ new Map();
|
|
3003
3053
|
this.infiniteNode = null;
|
|
3004
3054
|
this.setDetailTransform = (element, _rowIndex, {
|
|
@@ -3020,14 +3070,14 @@ var ReactHeadlessTableRenderer = class extends Logger {
|
|
|
3020
3070
|
scrollLeft: scrollLeft2,
|
|
3021
3071
|
scrollTop: scrollTop2
|
|
3022
3072
|
}, zIndex2) => {
|
|
3023
|
-
const columnOffsetX =
|
|
3073
|
+
const columnOffsetX = InternalVarUtils.columnOffsets.get(colIndex);
|
|
3024
3074
|
const columnOffsetXWhileReordering = `${columnOffsetAtIndexWhileReordering2}-${colIndex}`;
|
|
3025
3075
|
const currentTransformYValue = scrollTop2 ? `calc( ${y}px + var(${scrollTopCSSVar}) )` : `${y}px`;
|
|
3026
3076
|
if (element.__currentTransformY !== currentTransformYValue) {
|
|
3027
3077
|
element.__currentTransformY = currentTransformYValue;
|
|
3028
3078
|
element.style.setProperty(currentTransformY, currentTransformYValue);
|
|
3029
3079
|
}
|
|
3030
|
-
const transformValue = `translate3d(var(${columnOffsetXWhileReordering},
|
|
3080
|
+
const transformValue = `translate3d(var(${columnOffsetXWhileReordering}, ${columnOffsetX}), var(${currentTransformY}), 0)`;
|
|
3031
3081
|
if (element.__transformValue !== transformValue) {
|
|
3032
3082
|
element.__transformValue = transformValue;
|
|
3033
3083
|
element.style.transform = transformValue;
|
|
@@ -3427,11 +3477,14 @@ var ReactHeadlessTableRenderer = class extends Logger {
|
|
|
3427
3477
|
return covered ? [rowspanParent, colspanParent] : false;
|
|
3428
3478
|
};
|
|
3429
3479
|
this.onMouseEnter = (rowIndex) => {
|
|
3430
|
-
this.
|
|
3480
|
+
this.lastEnteredRow = rowIndex;
|
|
3481
|
+
this.lastExitedRow = -1;
|
|
3431
3482
|
if (this.scrolling) {
|
|
3432
3483
|
return;
|
|
3433
3484
|
}
|
|
3434
|
-
|
|
3485
|
+
if (rowIndex != -1) {
|
|
3486
|
+
this.addHoverClass(rowIndex);
|
|
3487
|
+
}
|
|
3435
3488
|
};
|
|
3436
3489
|
this.addHoverClass = (rowIndex) => {
|
|
3437
3490
|
this.mappedCells.getElementsForRowIndex(rowIndex).forEach((elIndex) => {
|
|
@@ -3444,14 +3497,14 @@ var ReactHeadlessTableRenderer = class extends Logger {
|
|
|
3444
3497
|
});
|
|
3445
3498
|
};
|
|
3446
3499
|
this.onMouseLeave = (rowIndex) => {
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
}
|
|
3450
|
-
this.currentHoveredRow = -1;
|
|
3500
|
+
this.lastExitedRow = rowIndex;
|
|
3501
|
+
this.lastEnteredRow = -1;
|
|
3451
3502
|
if (this.scrolling) {
|
|
3452
3503
|
return;
|
|
3453
3504
|
}
|
|
3454
|
-
|
|
3505
|
+
if (rowIndex != -1) {
|
|
3506
|
+
this.removeHoverClass(rowIndex);
|
|
3507
|
+
}
|
|
3455
3508
|
};
|
|
3456
3509
|
this.removeHoverClass = (rowIndex) => {
|
|
3457
3510
|
this.mappedCells.getElementsForRowIndex(rowIndex).forEach((elIndex) => {
|
|
@@ -3475,8 +3528,8 @@ var ReactHeadlessTableRenderer = class extends Logger {
|
|
|
3475
3528
|
}
|
|
3476
3529
|
this.hoverRowUpdatesInProgress.set(rowIndex, true);
|
|
3477
3530
|
const checkHoverClass = () => {
|
|
3478
|
-
if (this.
|
|
3479
|
-
if (this.
|
|
3531
|
+
if (!this.scrolling && this.lastEnteredRow != -1) {
|
|
3532
|
+
if (this.lastEnteredRow === rowIndex) {
|
|
3480
3533
|
this.addHoverClass(rowIndex);
|
|
3481
3534
|
} else {
|
|
3482
3535
|
this.removeHoverClass(rowIndex);
|
|
@@ -3569,11 +3622,17 @@ var ReactHeadlessTableRenderer = class extends Logger {
|
|
|
3569
3622
|
};
|
|
3570
3623
|
this.onScrollStart = () => {
|
|
3571
3624
|
this.scrolling = true;
|
|
3625
|
+
if (this.lastEnteredRow != -1) {
|
|
3626
|
+
this.removeHoverClass(this.lastEnteredRow);
|
|
3627
|
+
}
|
|
3572
3628
|
};
|
|
3573
3629
|
this.onScrollStop = () => {
|
|
3574
3630
|
this.scrolling = false;
|
|
3575
|
-
if (this.
|
|
3576
|
-
this.addHoverClass(this.
|
|
3631
|
+
if (this.lastEnteredRow != -1) {
|
|
3632
|
+
this.addHoverClass(this.lastEnteredRow);
|
|
3633
|
+
}
|
|
3634
|
+
if (this.lastExitedRow != -1) {
|
|
3635
|
+
this.removeHoverClass(this.lastExitedRow);
|
|
3577
3636
|
}
|
|
3578
3637
|
};
|
|
3579
3638
|
this.adjustFixedElementsOnScroll = (scrollPosition = this.brain.getScrollPosition()) => {
|
|
@@ -3840,12 +3899,27 @@ var ReactHeadlessTableRenderer = class extends Logger {
|
|
|
3840
3899
|
return [];
|
|
3841
3900
|
}
|
|
3842
3901
|
const { start, end } = range;
|
|
3902
|
+
const horizontalLayout = this.brain.isHorizontalLayoutBrain;
|
|
3843
3903
|
if (false) {
|
|
3844
3904
|
this.debug(`Render range ${start}-${end}. Force ${force}`);
|
|
3845
3905
|
}
|
|
3846
3906
|
const { mappedCells, mappedDetailRows } = this;
|
|
3847
3907
|
const fixedRanges = this.getFixedRanges(range);
|
|
3848
3908
|
const ranges = [range, ...fixedRanges];
|
|
3909
|
+
const alwaysRenderedColumns = this.brain.getAlwaysRenderedColumns();
|
|
3910
|
+
if (alwaysRenderedColumns.length > 0) {
|
|
3911
|
+
const startCol = range.start[1];
|
|
3912
|
+
const endCol = range.end[1];
|
|
3913
|
+
alwaysRenderedColumns.forEach((colIndex) => {
|
|
3914
|
+
const colInRange = startCol <= colIndex && colIndex < endCol;
|
|
3915
|
+
if (!colInRange) {
|
|
3916
|
+
ranges.push({
|
|
3917
|
+
start: [range.start[0], colIndex],
|
|
3918
|
+
end: [range.end[0], colIndex + 1]
|
|
3919
|
+
});
|
|
3920
|
+
}
|
|
3921
|
+
});
|
|
3922
|
+
}
|
|
3849
3923
|
const extraCellsMap = /* @__PURE__ */ new Map();
|
|
3850
3924
|
const extraCells = ranges.map(this.getExtraSpanCellsForRange).flat();
|
|
3851
3925
|
if (extraCells) {
|
|
@@ -3965,9 +4039,15 @@ var ReactHeadlessTableRenderer = class extends Logger {
|
|
|
3965
4039
|
if (cellRendered && !force && cellMappedCorrectly) {
|
|
3966
4040
|
continue;
|
|
3967
4041
|
}
|
|
3968
|
-
const elementIndex = cellRendered ? mappedCells.getElementIndexForCell(row, col) :
|
|
3969
|
-
elementsOutsideItemRange
|
|
3970
|
-
|
|
4042
|
+
const elementIndex = cellRendered ? mappedCells.getElementIndexForCell(row, col) : (
|
|
4043
|
+
// TODO when horizontal layout, just do elementsOutsideItemRange.pop()
|
|
4044
|
+
horizontalLayout ? mappedCells.getElementFromListForRow(
|
|
4045
|
+
elementsOutsideItemRange,
|
|
4046
|
+
row
|
|
4047
|
+
) : mappedCells.getElementFromListForColumn(
|
|
4048
|
+
elementsOutsideItemRange,
|
|
4049
|
+
col
|
|
4050
|
+
)
|
|
3971
4051
|
);
|
|
3972
4052
|
if (elementIndex == null) {
|
|
3973
4053
|
if (false) {
|
|
@@ -4210,17 +4290,18 @@ var HorizontalLayoutTableRenderer = class extends ReactHeadlessTableRenderer {
|
|
|
4210
4290
|
);
|
|
4211
4291
|
const pageWidth = ThemeVars.runtime.totalVisibleColumnsWidthVar;
|
|
4212
4292
|
const pageOffset = pageIndex ? `calc(${pageWidth} * ${pageIndex})` : "0px";
|
|
4213
|
-
const columnOffsetX =
|
|
4293
|
+
const columnOffsetX = InternalVarUtils.columnOffsets.get(
|
|
4294
|
+
horizontalLayoutCoords.colIndex
|
|
4295
|
+
);
|
|
4214
4296
|
const columnOffsetXWhileReordering = `${columnOffsetAtIndexWhileReordering2}-${horizontalLayoutCoords.colIndex}`;
|
|
4215
4297
|
const currentTransformYValue = `${y}px`;
|
|
4216
4298
|
if (element.__currentTransformY !== currentTransformYValue) {
|
|
4217
4299
|
element.__currentTransformY = currentTransformYValue;
|
|
4218
4300
|
element.style.setProperty(currentTransformY, currentTransformYValue);
|
|
4219
4301
|
}
|
|
4220
|
-
const xOffset = `calc(var(${columnOffsetX}) + ${pageOffset})`;
|
|
4221
|
-
const transformX2 = `var(${columnOffsetXWhileReordering}, ${xOffset})`;
|
|
4302
|
+
const xOffset = `calc(var(${columnOffsetXWhileReordering}, ${columnOffsetX}) + ${pageOffset})`;
|
|
4222
4303
|
const transformY = `var(${currentTransformY})`;
|
|
4223
|
-
const transformValue = `translate3d(${
|
|
4304
|
+
const transformValue = `translate3d(${xOffset}, ${transformY}, 0px)`;
|
|
4224
4305
|
if (element.__transformValue !== transformValue) {
|
|
4225
4306
|
element.__transformValue = transformValue;
|
|
4226
4307
|
element.style.transform = transformValue;
|
|
@@ -5321,22 +5402,22 @@ var import_react18 = require("react");
|
|
|
5321
5402
|
|
|
5322
5403
|
// src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
|
|
5323
5404
|
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: "
|
|
5405
|
+
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
5406
|
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: "
|
|
5407
|
+
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
5408
|
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 = "
|
|
5409
|
+
var HeaderFilterEditorCls = "header_HeaderFilterEditorCls__12zfob12o utilities_width_100%__16lm1iw1b utilities_height_100%__16lm1iw19";
|
|
5329
5410
|
var HeaderFilterIconIndexCls = "header_HeaderFilterIconIndexCls__12zfob17";
|
|
5330
|
-
var HeaderFilterOperatorCls = "
|
|
5331
|
-
var HeaderFilterOperatorIconRecipe = createRuntimeFn({ defaultClassName: "
|
|
5332
|
-
var HeaderFilterRecipe = createRuntimeFn({ defaultClassName: "
|
|
5333
|
-
var HeaderGroupCls = "
|
|
5334
|
-
var HeaderMenuIconCls = createRuntimeFn({ defaultClassName: "
|
|
5411
|
+
var HeaderFilterOperatorCls = "header_HeaderFilterOperatorCls__12zfob12k utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q utilities_position_relative__16lm1iw1";
|
|
5412
|
+
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: [] });
|
|
5413
|
+
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: [] });
|
|
5414
|
+
var HeaderGroupCls = "header_HeaderGroupCls__12zfob12g utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q";
|
|
5415
|
+
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
5416
|
var HeaderScrollbarPlaceholderCls = "header_HeaderScrollbarPlaceholderCls__12zfob18 utilities_position_absolute__16lm1iw2";
|
|
5336
5417
|
var HeaderSortIconCls = "utilities_position_relative__16lm1iw1";
|
|
5337
5418
|
var HeaderSortIconIndexCls = "header_HeaderSortIconIndexCls__12zfob16";
|
|
5338
5419
|
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 = "
|
|
5420
|
+
var HeaderWrapperCls = "header_HeaderWrapperCls__12zfob12f utilities_overflow_hidden__16lm1iw1x utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o";
|
|
5340
5421
|
|
|
5341
5422
|
// src/components/InfiniteTable/components/icons/InfiniteTableIconClassName.ts
|
|
5342
5423
|
var InfiniteTableIconClassName = "InfiniteTableIcon";
|
|
@@ -6778,6 +6859,7 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
|
|
|
6778
6859
|
rowSelected: extraFlags.rowSelected ?? "null",
|
|
6779
6860
|
rowActive: extraFlags.rowActive,
|
|
6780
6861
|
dragging: extraFlags.dragging,
|
|
6862
|
+
insideDisabledDraggingPage: extraFlags.insideDisabledDraggingPage,
|
|
6781
6863
|
firstRow: extraFlags.firstRow ?? false,
|
|
6782
6864
|
firstRowInHorizontalLayoutPage: extraFlags.firstRowInHorizontalLayoutPage ?? false,
|
|
6783
6865
|
rowDisabled: extraFlags.rowDisabled,
|
|
@@ -6845,11 +6927,11 @@ var import_react21 = require("react");
|
|
|
6845
6927
|
// src/components/InfiniteTable/InfiniteCls.css.ts
|
|
6846
6928
|
var FooterCls = "utilities_position_relative__16lm1iw1";
|
|
6847
6929
|
var InfiniteCls = "InfiniteCls_InfiniteCls__1yeub2v0 utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwz utilities_flexFlow_column__16lm1iw1m utilities_boxSizingBorderBox__16lm1iw0";
|
|
6848
|
-
var InfiniteClsHasPinnedEnd = "
|
|
6849
|
-
var InfiniteClsHasPinnedStart = "
|
|
6850
|
-
var InfiniteClsRecipe = createRuntimeFn({ defaultClassName: "InfiniteCls__1yeub2v2", variantClassNames: { focused: { true: "
|
|
6851
|
-
var InfiniteClsShiftingColumns = "
|
|
6852
|
-
var PinnedRowsContainerClsVariants = createRuntimeFn({ defaultClassName: "
|
|
6930
|
+
var InfiniteClsHasPinnedEnd = "InfiniteCls_InfiniteClsHasPinnedEnd__1yeub2vs";
|
|
6931
|
+
var InfiniteClsHasPinnedStart = "InfiniteCls_InfiniteClsHasPinnedStart__1yeub2vr";
|
|
6932
|
+
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"]] });
|
|
6933
|
+
var InfiniteClsShiftingColumns = "InfiniteCls_shiftingcols__1yeub2vp";
|
|
6934
|
+
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
6935
|
|
|
6854
6936
|
// src/components/InfiniteTable/utils/rafFn.ts
|
|
6855
6937
|
var rafFn = (fn) => {
|
|
@@ -6890,7 +6972,6 @@ var scrollbarWidthHorizontal = stripVar(
|
|
|
6890
6972
|
);
|
|
6891
6973
|
var scrollbarWidthVertical = stripVar(InternalVars.scrollbarWidthVertical);
|
|
6892
6974
|
var columnWidthAtIndex2 = stripVar(InternalVars.columnWidthAtIndex);
|
|
6893
|
-
var columnOffsetAtIndex3 = stripVar(InternalVars.columnOffsetAtIndex);
|
|
6894
6975
|
var columnZIndexAtIndex3 = stripVar(InternalVars.columnZIndexAtIndex);
|
|
6895
6976
|
var scrollLeftCSSVar = stripVar(InternalVars.scrollLeft);
|
|
6896
6977
|
var activeCellColWidth = stripVar(InternalVars.activeCellColWidth);
|
|
@@ -6932,7 +7013,8 @@ function useDOMProps(initialDOMProps) {
|
|
|
6932
7013
|
onSelfFocus,
|
|
6933
7014
|
onSelfBlur,
|
|
6934
7015
|
bodySize,
|
|
6935
|
-
activeCellIndex
|
|
7016
|
+
activeCellIndex,
|
|
7017
|
+
wrapRowsHorizontally
|
|
6936
7018
|
} = state;
|
|
6937
7019
|
const {
|
|
6938
7020
|
computedPinnedStartColumnsWidth,
|
|
@@ -6947,11 +7029,11 @@ function useDOMProps(initialDOMProps) {
|
|
|
6947
7029
|
const cssVars = computedVisibleColumns.reduce(
|
|
6948
7030
|
(vars, col) => {
|
|
6949
7031
|
const index = col.computedVisibleIndex;
|
|
6950
|
-
vars[
|
|
6951
|
-
vars[
|
|
7032
|
+
vars[InternalVarUtils.columnWidths.varName.get(index)] = col.computedWidth + "px";
|
|
7033
|
+
vars[InternalVarUtils.columnOffsets.varName.get(index)] = col.computedPinned === "start" ? `calc( ${col.computedOffset}px + var(${scrollLeftCSSVar}) )` : col.computedPinned === "end" ? (
|
|
6952
7034
|
// see #startcoloffsets-pinnedend
|
|
6953
7035
|
`calc( var(${pinnedEndOffsetCSSVar}) ${prevPinnedEndCols.length ? "+" : ""} ${prevPinnedEndCols.map(
|
|
6954
|
-
(c) =>
|
|
7036
|
+
(c) => InternalVarUtils.columnWidths.get(c.computedVisibleIndex)
|
|
6955
7037
|
).join(" + ")} + var(${scrollLeftCSSVar}) )`
|
|
6956
7038
|
) : `${col.computedOffset}px`;
|
|
6957
7039
|
const zIndexValue = getColumnZIndex(col, {
|
|
@@ -6976,12 +7058,12 @@ function useDOMProps(initialDOMProps) {
|
|
|
6976
7058
|
}).join(" + ")})`;
|
|
6977
7059
|
cssVars[publicRuntimeVars.visibleColumnsCount.name] = computedVisibleColumns.length;
|
|
6978
7060
|
if (activeCellIndex != null) {
|
|
6979
|
-
cssVars[activeCellColWidth] =
|
|
7061
|
+
cssVars[activeCellColWidth] = InternalVarUtils.columnWidths.get(
|
|
6980
7062
|
activeCellIndex[1]
|
|
6981
|
-
)
|
|
6982
|
-
const defaultActiveCellColOffset =
|
|
7063
|
+
);
|
|
7064
|
+
const defaultActiveCellColOffset = InternalVarUtils.columnOffsets.get(
|
|
6983
7065
|
activeCellIndex[1]
|
|
6984
|
-
)
|
|
7066
|
+
);
|
|
6985
7067
|
if (state.brain.isHorizontalLayoutBrain) {
|
|
6986
7068
|
const pageIndex = state.brain.getPageIndexForRow(activeCellIndex[0]);
|
|
6987
7069
|
cssVars[activeCellColOffset] = pageIndex ? `calc( ${ThemeVars.runtime.totalVisibleColumnsWidthVar} * ${pageIndex} + ${defaultActiveCellColOffset})` : defaultActiveCellColOffset;
|
|
@@ -6992,8 +7074,8 @@ function useDOMProps(initialDOMProps) {
|
|
|
6992
7074
|
cssVars[computedVisibleColumnsCountCSSVar] = computedVisibleColumns.length;
|
|
6993
7075
|
cssVars[scrollbarWidthHorizontal] = scrollbars.horizontal ? `${scrollbarWidth2}px` : "0px";
|
|
6994
7076
|
cssVars[scrollbarWidthVertical] = scrollbars.vertical ? `${scrollbarWidth2}px` : "0px";
|
|
6995
|
-
cssVars[pinnedStartWidthCSSVar] = `calc( ` + computedPinnedStartColumns.map((c) =>
|
|
6996
|
-
cssVars[pinnedEndWidthCSSVar] = `calc( ` + computedPinnedEndColumns.map((c) =>
|
|
7077
|
+
cssVars[pinnedStartWidthCSSVar] = `calc( ` + computedPinnedStartColumns.map((c) => InternalVarUtils.columnWidths.get(c.computedVisibleIndex)).join(" + ") + ")";
|
|
7078
|
+
cssVars[pinnedEndWidthCSSVar] = `calc( ` + computedPinnedEndColumns.map((c) => InternalVarUtils.columnWidths.get(c.computedVisibleIndex)).join(" + ") + ")";
|
|
6997
7079
|
cssVars[baseZIndexForCells] = computedVisibleColumns.length * 10;
|
|
6998
7080
|
cssVars[pinnedEndOffsetCSSVar] = `calc( var(${bodyWidthCSSVar}) - var(${pinnedEndWidthCSSVar}) - var(${scrollbarWidthVertical}) )`;
|
|
6999
7081
|
cssVars[bodyWidthCSSVar] = `${bodySize.width}px`;
|
|
@@ -7051,6 +7133,7 @@ function useDOMProps(initialDOMProps) {
|
|
|
7051
7133
|
const className = join(
|
|
7052
7134
|
InfiniteTableClassName,
|
|
7053
7135
|
InfiniteCls,
|
|
7136
|
+
wrapRowsHorizontally ? `${InfiniteTableClassName}--horizontal-layout` : null,
|
|
7054
7137
|
domProps?.className,
|
|
7055
7138
|
computedPinnedStartColumnsWidth ? `${InfiniteTableClassName}--has-pinned-start ${InfiniteClsHasPinnedStart}` : null,
|
|
7056
7139
|
computedPinnedEndColumnsWidth ? `${InfiniteTableClassName}--has-pinned-end ${InfiniteClsHasPinnedEnd}` : null,
|
|
@@ -7061,6 +7144,7 @@ function useDOMProps(initialDOMProps) {
|
|
|
7061
7144
|
computed.computedPinnedStartOverflow ? `${InfiniteTableClassName}--has-pinned-start-overflow` : null,
|
|
7062
7145
|
computed.computedPinnedEndOverflow ? `${InfiniteTableClassName}--has-pinned-end-overflow` : null,
|
|
7063
7146
|
InfiniteClsRecipe({
|
|
7147
|
+
horizontalLayout: !!wrapRowsHorizontally,
|
|
7064
7148
|
hasPinnedStart: !!computedPinnedStartColumnsWidth,
|
|
7065
7149
|
hasPinnedEnd: !!computedPinnedEndColumnsWidth,
|
|
7066
7150
|
// hasPinnedStartOverflow: !!computed.computedPinnedStartOverflow,
|
|
@@ -7090,6 +7174,68 @@ function useDOMProps(initialDOMProps) {
|
|
|
7090
7174
|
// src/components/InfiniteTable/hooks/reorderColumnsOnDrag.ts
|
|
7091
7175
|
var import_binary_search2 = __toESM(require_binary_search());
|
|
7092
7176
|
|
|
7177
|
+
// src/components/InfiniteTable/utils/CSSCalc.ts
|
|
7178
|
+
function mapToContinuation(args) {
|
|
7179
|
+
return args.map(
|
|
7180
|
+
(arg) => arg instanceof CssContinuation ? arg : new CssContinuation(null, [arg])
|
|
7181
|
+
);
|
|
7182
|
+
}
|
|
7183
|
+
var CssContinuation = class {
|
|
7184
|
+
constructor(operation, operands = []) {
|
|
7185
|
+
this.__operands = [];
|
|
7186
|
+
this.__operation = null;
|
|
7187
|
+
this.__operands = operands;
|
|
7188
|
+
this.__operation = operation;
|
|
7189
|
+
}
|
|
7190
|
+
add(...args) {
|
|
7191
|
+
return new CssContinuation("+", [this, ...args]);
|
|
7192
|
+
}
|
|
7193
|
+
subtract(...args) {
|
|
7194
|
+
return new CssContinuation("-", [this, ...args]);
|
|
7195
|
+
}
|
|
7196
|
+
minus(...args) {
|
|
7197
|
+
return this.subtract(...args);
|
|
7198
|
+
}
|
|
7199
|
+
multiply(...args) {
|
|
7200
|
+
return new CssContinuation("*", [this, ...args]);
|
|
7201
|
+
}
|
|
7202
|
+
divide(...args) {
|
|
7203
|
+
return new CssContinuation("/", [this, ...args]);
|
|
7204
|
+
}
|
|
7205
|
+
__get(parent) {
|
|
7206
|
+
const { __operation, __operands } = this;
|
|
7207
|
+
const result = __operands.map((operand) => operandToString(operand, this)).join(` ${__operation} `);
|
|
7208
|
+
const skipParens = __operands.length <= 1 ? true : parent?.__operation === "+" || parent?.__operation === "-";
|
|
7209
|
+
return skipParens ? result : `(${result})`;
|
|
7210
|
+
}
|
|
7211
|
+
done() {
|
|
7212
|
+
const str = this.__get();
|
|
7213
|
+
const hasParens = str.startsWith("(") && str.endsWith(")");
|
|
7214
|
+
const value = hasParens ? str : `(${str})`;
|
|
7215
|
+
return `calc${value}`;
|
|
7216
|
+
}
|
|
7217
|
+
};
|
|
7218
|
+
function operandToString(operand, parent) {
|
|
7219
|
+
if (typeof operand === "string" || typeof operand === "number") {
|
|
7220
|
+
return `${operand}`;
|
|
7221
|
+
}
|
|
7222
|
+
if (!parent) {
|
|
7223
|
+
return operand.done();
|
|
7224
|
+
}
|
|
7225
|
+
return operand.__get(parent);
|
|
7226
|
+
}
|
|
7227
|
+
var add = (...args) => new CssContinuation("+", mapToContinuation(args));
|
|
7228
|
+
var subtract = (...args) => new CssContinuation("-", mapToContinuation(args));
|
|
7229
|
+
var multiply = (...args) => new CssContinuation("*", mapToContinuation(args));
|
|
7230
|
+
var divide = (...args) => new CssContinuation("/", mapToContinuation(args));
|
|
7231
|
+
var CSSCalc = {
|
|
7232
|
+
add,
|
|
7233
|
+
subtract,
|
|
7234
|
+
minus: subtract,
|
|
7235
|
+
multiply,
|
|
7236
|
+
divide
|
|
7237
|
+
};
|
|
7238
|
+
|
|
7093
7239
|
// src/components/InfiniteTable/utils/moveXatY.ts
|
|
7094
7240
|
var moveXatY = (arr, dragIndex, dropIndex) => {
|
|
7095
7241
|
arr = [...arr];
|
|
@@ -7190,8 +7336,6 @@ var PROXY_OFFSET = 10;
|
|
|
7190
7336
|
var pinnedStartWidthCSSVar2 = stripVar(InternalVars.pinnedStartWidth);
|
|
7191
7337
|
function reorderColumnsOnDrag(params) {
|
|
7192
7338
|
const {
|
|
7193
|
-
columnOffsetAtIndexCSSVar,
|
|
7194
|
-
columnWidthAtIndexCSSVar,
|
|
7195
7339
|
computedVisibleColumns,
|
|
7196
7340
|
computedVisibleColumnsMap,
|
|
7197
7341
|
computedPinnedEndColumns,
|
|
@@ -7203,7 +7347,9 @@ function reorderColumnsOnDrag(params) {
|
|
|
7203
7347
|
draggableColumnsRestrictTo,
|
|
7204
7348
|
tableRect,
|
|
7205
7349
|
setProxyPosition,
|
|
7206
|
-
api: imperativeApi
|
|
7350
|
+
api: imperativeApi,
|
|
7351
|
+
horizontalLayoutPageIndex,
|
|
7352
|
+
pageWidth
|
|
7207
7353
|
} = params;
|
|
7208
7354
|
function getCurrentPinnedWidth(pinned) {
|
|
7209
7355
|
let currentWidth = pinned === "start" ? pinnedStartInitialWidth : pinnedEndInitialWidth;
|
|
@@ -7219,27 +7365,32 @@ function reorderColumnsOnDrag(params) {
|
|
|
7219
7365
|
return currentWidth;
|
|
7220
7366
|
}
|
|
7221
7367
|
function isColumnVisible2(b) {
|
|
7222
|
-
if (b.
|
|
7368
|
+
if (b.columnIndex === dragColumnIndex) {
|
|
7369
|
+
return true;
|
|
7370
|
+
}
|
|
7371
|
+
if (horizontalLayoutPageIndex != null) {
|
|
7223
7372
|
return true;
|
|
7224
7373
|
}
|
|
7225
|
-
const col = computedVisibleColumns[b.
|
|
7374
|
+
const col = computedVisibleColumns[b.columnIndex];
|
|
7226
7375
|
if (col.computedPinned) {
|
|
7227
7376
|
return true;
|
|
7228
7377
|
}
|
|
7229
7378
|
const scrollLeft2 = brain.getScrollPosition().scrollLeft;
|
|
7230
|
-
|
|
7379
|
+
const colOffset = col.computedOffset + (horizontalLayoutPageIndex != null && pageWidth != null ? pageWidth * horizontalLayoutPageIndex : 0);
|
|
7380
|
+
const visible = colOffset >= scrollLeft2 + getCurrentPinnedWidth("start") && colOffset + col.computedWidth <= scrollLeft2 + tableRect.width - getCurrentPinnedWidth("end");
|
|
7381
|
+
return visible;
|
|
7231
7382
|
}
|
|
7232
7383
|
const getBreakPoints = (columns, options) => {
|
|
7233
7384
|
const { restrictToParentGroup, dragColumn: dragColumn2 } = options;
|
|
7234
7385
|
let breakpoints = [];
|
|
7235
7386
|
columns.forEach((c) => {
|
|
7387
|
+
if (c.computedVisibleIndex === dragColumnIndex) {
|
|
7388
|
+
return;
|
|
7389
|
+
}
|
|
7236
7390
|
const b = {
|
|
7237
7391
|
columnId: c.id,
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
// tableRect.left +
|
|
7241
|
-
c.computedOffset + Math.round(c.computedWidth / 2)
|
|
7242
|
-
)
|
|
7392
|
+
columnIndex: c.computedVisibleIndex,
|
|
7393
|
+
offsetX: c.computedOffset + Math.round(c.computedWidth / 2)
|
|
7243
7394
|
};
|
|
7244
7395
|
if (isColumnVisible2(b)) {
|
|
7245
7396
|
breakpoints.push(b);
|
|
@@ -7351,7 +7502,7 @@ function reorderColumnsOnDrag(params) {
|
|
|
7351
7502
|
}
|
|
7352
7503
|
}
|
|
7353
7504
|
function updateDropIndex(newDropIndex) {
|
|
7354
|
-
if (newDropIndex === currentDropIndex) {
|
|
7505
|
+
if (newDropIndex == null || newDropIndex === currentDropIndex) {
|
|
7355
7506
|
return;
|
|
7356
7507
|
}
|
|
7357
7508
|
currentDropIndex = newDropIndex;
|
|
@@ -7393,23 +7544,32 @@ function reorderColumnsOnDrag(params) {
|
|
|
7393
7544
|
newPosition = isDragColumn ? (
|
|
7394
7545
|
// this is the column we're dragging to the left
|
|
7395
7546
|
// so we place it exactly at the offset of the currentDropIndex
|
|
7396
|
-
|
|
7547
|
+
InternalVarUtils.columnOffsets.get(currentDropIndex)
|
|
7397
7548
|
) : isOutsideCol ? (
|
|
7398
7549
|
// this col should have the initial pos, so we're good
|
|
7399
|
-
|
|
7550
|
+
InternalVarUtils.columnOffsets.get(colIndex)
|
|
7400
7551
|
) : (
|
|
7401
7552
|
// place it at the default offset + the width of the drag column
|
|
7402
7553
|
// as these are columns situated between the dragindex and the dropindex
|
|
7403
|
-
|
|
7554
|
+
CSSCalc.add(
|
|
7555
|
+
InternalVarUtils.columnOffsets.get(colIndex),
|
|
7556
|
+
InternalVarUtils.columnWidths.get(dragColumnIndex)
|
|
7557
|
+
).done()
|
|
7404
7558
|
);
|
|
7405
7559
|
} else {
|
|
7406
7560
|
newPosition = isOutsideCol ? (
|
|
7407
7561
|
// this is the default value for a column
|
|
7408
|
-
|
|
7562
|
+
InternalVarUtils.columnOffsets.get(colIndex)
|
|
7409
7563
|
) : isDragColumn ? (
|
|
7410
7564
|
// this is the column we're dragging to the right
|
|
7411
|
-
|
|
7412
|
-
|
|
7565
|
+
CSSCalc.add(
|
|
7566
|
+
InternalVarUtils.columnOffsets.get(currentDropIndex - 1),
|
|
7567
|
+
InternalVarUtils.columnWidths.get(currentDropIndex - 1)
|
|
7568
|
+
).minus(InternalVarUtils.columnWidths.get(dragColumnIndex)).done()
|
|
7569
|
+
) : CSSCalc.minus(
|
|
7570
|
+
InternalVarUtils.columnOffsets.get(colIndex),
|
|
7571
|
+
InternalVarUtils.columnWidths.get(dragColumnIndex)
|
|
7572
|
+
).done();
|
|
7413
7573
|
}
|
|
7414
7574
|
setInfiniteColumnOffsetWhileReordering(
|
|
7415
7575
|
colIndex,
|
|
@@ -7449,20 +7609,25 @@ function reorderColumnsOnDrag(params) {
|
|
|
7449
7609
|
let idx = (0, import_binary_search2.default)(
|
|
7450
7610
|
breakpoints,
|
|
7451
7611
|
currentPos,
|
|
7452
|
-
({
|
|
7453
|
-
return
|
|
7612
|
+
({ offsetX }, value) => {
|
|
7613
|
+
return offsetX < value ? -1 : offsetX > value ? 1 : 0;
|
|
7454
7614
|
}
|
|
7455
7615
|
);
|
|
7456
7616
|
if (idx < 0) {
|
|
7457
7617
|
idx = ~idx;
|
|
7458
7618
|
}
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
idx = dragColumnIndex;
|
|
7619
|
+
if (!breakpoints.length) {
|
|
7620
|
+
if (computedVisibleColumns.length > 1) {
|
|
7621
|
+
console.error("No breakpoints available, something is wrong!");
|
|
7463
7622
|
}
|
|
7464
|
-
|
|
7623
|
+
idx = 0;
|
|
7624
|
+
} else {
|
|
7625
|
+
idx = breakpoints[idx] ? breakpoints[idx].columnIndex : breakpoints[breakpoints.length - 1].columnIndex + 1;
|
|
7465
7626
|
}
|
|
7627
|
+
if (idx === dragColumnIndex + 1) {
|
|
7628
|
+
idx = dragColumnIndex;
|
|
7629
|
+
}
|
|
7630
|
+
updateDropIndex(idx);
|
|
7466
7631
|
const columnPinning = {};
|
|
7467
7632
|
computedPinnedEndColumns.forEach((col) => {
|
|
7468
7633
|
columnPinning[col.id] = "end";
|
|
@@ -7559,8 +7724,6 @@ function adjustColumnOrderForAllColumns(options) {
|
|
|
7559
7724
|
}
|
|
7560
7725
|
|
|
7561
7726
|
// src/components/InfiniteTable/hooks/useColumnPointerEvents.ts
|
|
7562
|
-
var columnOffsetAtIndex4 = stripVar(InternalVars.columnOffsetAtIndex);
|
|
7563
|
-
var columnWidthAtIndex3 = stripVar(InternalVars.columnWidthAtIndex);
|
|
7564
7727
|
var baseZIndexForCells2 = stripVar(InternalVars.baseZIndexForCells);
|
|
7565
7728
|
var equalPinning = (pinning1, pinning2) => {
|
|
7566
7729
|
const empty1 = !pinning1 || Object.keys(pinning1).length === 0;
|
|
@@ -7575,7 +7738,8 @@ var equalPinning = (pinning1, pinning2) => {
|
|
|
7575
7738
|
};
|
|
7576
7739
|
var useColumnPointerEvents = ({
|
|
7577
7740
|
columnId,
|
|
7578
|
-
domRef
|
|
7741
|
+
domRef,
|
|
7742
|
+
horizontalLayoutPageIndex
|
|
7579
7743
|
}) => {
|
|
7580
7744
|
const [proxyPosition, setProxyPosition] = (0, import_react21.useState)(null);
|
|
7581
7745
|
const {
|
|
@@ -7619,13 +7783,20 @@ var useColumnPointerEvents = ({
|
|
|
7619
7783
|
const tableRect = rootRef.current.getBoundingClientRect();
|
|
7620
7784
|
const initialAvailableSize = brain.getAvailableSize();
|
|
7621
7785
|
const dragColumnIndex = dragColumn.computedVisibleIndex;
|
|
7786
|
+
const dragColumnIndexInHorizontalLayout = brain.getVirtualColIndex(
|
|
7787
|
+
dragColumn.computedVisibleIndex,
|
|
7788
|
+
{
|
|
7789
|
+
pageIndex: horizontalLayoutPageIndex || 0
|
|
7790
|
+
}
|
|
7791
|
+
);
|
|
7792
|
+
const pageWidth = brain.isHorizontalLayoutBrain ? brain.getPageWidth() : null;
|
|
7622
7793
|
let initialCursor = target.style.cursor ?? "auto";
|
|
7623
7794
|
let didDragAtLeastOnce = false;
|
|
7624
7795
|
const dragger = reorderColumnsOnDrag({
|
|
7625
7796
|
brain,
|
|
7797
|
+
horizontalLayoutPageIndex,
|
|
7798
|
+
pageWidth,
|
|
7626
7799
|
draggableColumnsRestrictTo,
|
|
7627
|
-
columnOffsetAtIndexCSSVar: columnOffsetAtIndex4,
|
|
7628
|
-
columnWidthAtIndexCSSVar: columnWidthAtIndex3,
|
|
7629
7800
|
computedPinnedEndColumns,
|
|
7630
7801
|
computedPinnedStartColumns,
|
|
7631
7802
|
computedUnpinnedColumns,
|
|
@@ -7643,6 +7814,8 @@ var useColumnPointerEvents = ({
|
|
|
7643
7814
|
}
|
|
7644
7815
|
});
|
|
7645
7816
|
let reorderDragResult = null;
|
|
7817
|
+
let discardAlwaysRenderedColumn;
|
|
7818
|
+
let restoreRenderRange;
|
|
7646
7819
|
function persistColumnOrder(reorderDragResult2) {
|
|
7647
7820
|
const { columnPinning, columnOrder } = reorderDragResult2;
|
|
7648
7821
|
if (!equalPinning(getState().columnPinning, columnPinning)) {
|
|
@@ -7671,15 +7844,37 @@ var useColumnPointerEvents = ({
|
|
|
7671
7844
|
const { headerBrain, brain: brain2 } = getState();
|
|
7672
7845
|
if (!didDragAtLeastOnce) {
|
|
7673
7846
|
didDragAtLeastOnce = true;
|
|
7674
|
-
brain2.
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
|
|
7679
|
-
|
|
7680
|
-
|
|
7681
|
-
|
|
7847
|
+
const discardForBody = brain2.keepColumnRendered(
|
|
7848
|
+
dragColumnIndexInHorizontalLayout
|
|
7849
|
+
);
|
|
7850
|
+
const discardForHeader = headerBrain.keepColumnRendered(
|
|
7851
|
+
dragColumnIndexInHorizontalLayout
|
|
7852
|
+
);
|
|
7853
|
+
if (brain2.isHorizontalLayoutBrain) {
|
|
7854
|
+
const extendBy = true;
|
|
7855
|
+
const restoreBodyRange = brain2.extendRenderRange({
|
|
7856
|
+
start: extendBy,
|
|
7857
|
+
end: extendBy,
|
|
7858
|
+
direction: "horizontal"
|
|
7859
|
+
});
|
|
7860
|
+
const restoreHeaderRange = headerBrain.extendRenderRange({
|
|
7861
|
+
start: extendBy,
|
|
7862
|
+
end: extendBy,
|
|
7863
|
+
direction: "horizontal"
|
|
7864
|
+
});
|
|
7865
|
+
restoreRenderRange = () => {
|
|
7866
|
+
restoreBodyRange();
|
|
7867
|
+
restoreHeaderRange();
|
|
7868
|
+
};
|
|
7869
|
+
}
|
|
7870
|
+
discardAlwaysRenderedColumn = () => {
|
|
7871
|
+
discardForBody();
|
|
7872
|
+
discardForHeader();
|
|
7873
|
+
};
|
|
7682
7874
|
actions.columnReorderDragColumnId = dragColumn.id;
|
|
7875
|
+
if (horizontalLayoutPageIndex != null) {
|
|
7876
|
+
actions.columnReorderInPageIndex = horizontalLayoutPageIndex;
|
|
7877
|
+
}
|
|
7683
7878
|
setInfiniteColumnZIndex(
|
|
7684
7879
|
dragColumnIndex,
|
|
7685
7880
|
`calc( var(${baseZIndexForCells2}) + 10000 )`,
|
|
@@ -7698,6 +7893,8 @@ var useColumnPointerEvents = ({
|
|
|
7698
7893
|
brain.update({
|
|
7699
7894
|
...initialAvailableSize
|
|
7700
7895
|
});
|
|
7896
|
+
discardAlwaysRenderedColumn?.();
|
|
7897
|
+
restoreRenderRange?.();
|
|
7701
7898
|
computedVisibleColumns.forEach((col) => {
|
|
7702
7899
|
clearInfiniteColumnReorderDuration(
|
|
7703
7900
|
col.computedVisibleIndex,
|
|
@@ -7732,12 +7929,15 @@ var useColumnPointerEvents = ({
|
|
|
7732
7929
|
persistColumnOrder(reorderDragResult);
|
|
7733
7930
|
}
|
|
7734
7931
|
actions.columnReorderDragColumnId = false;
|
|
7932
|
+
if (horizontalLayoutPageIndex != null) {
|
|
7933
|
+
actions.columnReorderInPageIndex = null;
|
|
7934
|
+
}
|
|
7735
7935
|
};
|
|
7736
7936
|
target.addEventListener("pointermove", onPointerMove);
|
|
7737
7937
|
target.addEventListener("pointerup", onPointerUp);
|
|
7738
7938
|
target.setPointerCapture(e.pointerId);
|
|
7739
7939
|
},
|
|
7740
|
-
[columnId]
|
|
7940
|
+
[columnId, horizontalLayoutPageIndex]
|
|
7741
7941
|
);
|
|
7742
7942
|
return {
|
|
7743
7943
|
onPointerDown: computed.computedVisibleColumnsMap.get(columnId)?.computedDraggable ? onPointerDown : defaultPointerDown,
|
|
@@ -8047,7 +8247,7 @@ function objectValuesExcept(obj, exceptList) {
|
|
|
8047
8247
|
|
|
8048
8248
|
// src/components/InfiniteTable/components/cell.css.ts
|
|
8049
8249
|
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: "
|
|
8250
|
+
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
8251
|
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
8252
|
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
8253
|
var SelectionCheckboxCls = "cell_SelectionCheckboxCls__1eexc2a7";
|
|
@@ -8440,7 +8640,7 @@ var React34 = __toESM(require("react"));
|
|
|
8440
8640
|
var { rootClassName: rootClassName5 } = internalProps;
|
|
8441
8641
|
var InfiniteTableCellClassName = `${rootClassName5}Cell`;
|
|
8442
8642
|
var InfiniteTableCellContentClassName = `${rootClassName5}Cell_content`;
|
|
8443
|
-
var
|
|
8643
|
+
var columnWidthAtIndex3 = stripVar(InternalVars.columnWidthAtIndex);
|
|
8444
8644
|
var columnReorderEffectDurationAtIndex2 = stripVar(
|
|
8445
8645
|
InternalVars.columnReorderEffectDurationAtIndex
|
|
8446
8646
|
);
|
|
@@ -8465,7 +8665,7 @@ function InfiniteTableCellFn(props) {
|
|
|
8465
8665
|
} = props;
|
|
8466
8666
|
const children = renderChildren();
|
|
8467
8667
|
const style2 = {
|
|
8468
|
-
width: `var(${
|
|
8668
|
+
width: `var(${columnWidthAtIndex3}-${column.computedVisibleIndex})`,
|
|
8469
8669
|
transition: `transform var(${columnReorderEffectDurationAtIndex2}-${column.computedVisibleIndex}, 0s)`,
|
|
8470
8670
|
...domProps.style
|
|
8471
8671
|
};
|
|
@@ -8655,7 +8855,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8655
8855
|
api: dataSourceApi,
|
|
8656
8856
|
componentActions: dataSourceActions
|
|
8657
8857
|
} = useDataSourceContextValue();
|
|
8658
|
-
const { activeRowIndex, keyboardNavigation } = getState();
|
|
8858
|
+
const { activeRowIndex, keyboardNavigation, columnReorderInPageIndex } = getState();
|
|
8659
8859
|
const rowActive = rowIndex === activeRowIndex && keyboardNavigation === "row";
|
|
8660
8860
|
const renderingContext = {
|
|
8661
8861
|
getState,
|
|
@@ -8979,6 +9179,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8979
9179
|
right: rightSelectionBorder,
|
|
8980
9180
|
bottom: bottomSelectionBorder
|
|
8981
9181
|
} : null;
|
|
9182
|
+
const insideDisabledDraggingPage = columnReorderInPageIndex != null ? horizontalLayoutPageIndex !== columnReorderInPageIndex : false;
|
|
8982
9183
|
const afterChildren = editor;
|
|
8983
9184
|
const theChildren = renderChildren();
|
|
8984
9185
|
const cellProps = {
|
|
@@ -9003,6 +9204,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9003
9204
|
ColumnCellRecipe,
|
|
9004
9205
|
{
|
|
9005
9206
|
dragging: false,
|
|
9207
|
+
insideDisabledDraggingPage,
|
|
9006
9208
|
zebra,
|
|
9007
9209
|
align: align2,
|
|
9008
9210
|
verticalAlign,
|
|
@@ -9266,7 +9468,7 @@ function getColumnResizer(colIndex, {
|
|
|
9266
9468
|
const column = columns[colIndex];
|
|
9267
9469
|
return {
|
|
9268
9470
|
resize(diff) {
|
|
9269
|
-
|
|
9471
|
+
InternalVarUtils.columnWidths.set(
|
|
9270
9472
|
colIndex,
|
|
9271
9473
|
column.computedWidth + diff,
|
|
9272
9474
|
domRef.current
|
|
@@ -9277,7 +9479,7 @@ function getColumnResizer(colIndex, {
|
|
|
9277
9479
|
if (!nextColumn) {
|
|
9278
9480
|
return;
|
|
9279
9481
|
}
|
|
9280
|
-
|
|
9482
|
+
InternalVarUtils.columnWidths.set(
|
|
9281
9483
|
nextColIndex,
|
|
9282
9484
|
nextColumn.computedWidth - diff,
|
|
9283
9485
|
domRef.current
|
|
@@ -9285,7 +9487,7 @@ function getColumnResizer(colIndex, {
|
|
|
9285
9487
|
if (nextColumn.computedPinned === "start") {
|
|
9286
9488
|
addToInfiniteColumnOffset(nextColumn, diff, domRef.current);
|
|
9287
9489
|
} else {
|
|
9288
|
-
|
|
9490
|
+
InternalVarUtils.columnOffsets.set(
|
|
9289
9491
|
nextColIndex,
|
|
9290
9492
|
nextColumn.computedOffset + diff,
|
|
9291
9493
|
domRef.current
|
|
@@ -9306,7 +9508,11 @@ function getColumnResizer(colIndex, {
|
|
|
9306
9508
|
if (col.computedPinned === "end") {
|
|
9307
9509
|
continue;
|
|
9308
9510
|
}
|
|
9309
|
-
|
|
9511
|
+
InternalVarUtils.columnOffsets.set(
|
|
9512
|
+
i,
|
|
9513
|
+
col.computedOffset + diff,
|
|
9514
|
+
domRef.current
|
|
9515
|
+
);
|
|
9310
9516
|
}
|
|
9311
9517
|
return;
|
|
9312
9518
|
}
|
|
@@ -9315,7 +9521,11 @@ function getColumnResizer(colIndex, {
|
|
|
9315
9521
|
if (col.computedPinned) {
|
|
9316
9522
|
continue;
|
|
9317
9523
|
}
|
|
9318
|
-
|
|
9524
|
+
InternalVarUtils.columnOffsets.set(
|
|
9525
|
+
i,
|
|
9526
|
+
col.computedOffset + diff,
|
|
9527
|
+
domRef.current
|
|
9528
|
+
);
|
|
9319
9529
|
}
|
|
9320
9530
|
}
|
|
9321
9531
|
};
|
|
@@ -9343,12 +9553,12 @@ function getColumnGroupResizer(colIndexes, config) {
|
|
|
9343
9553
|
const colIndex = colIndexes[i];
|
|
9344
9554
|
const column = columns[colIndex];
|
|
9345
9555
|
const newWidth = column.computedWidth + diff;
|
|
9346
|
-
|
|
9556
|
+
InternalVarUtils.columnWidths.set(colIndex, newWidth, node);
|
|
9347
9557
|
if (column.computedPinned === "end") {
|
|
9348
9558
|
return;
|
|
9349
9559
|
}
|
|
9350
9560
|
if (offset) {
|
|
9351
|
-
|
|
9561
|
+
InternalVarUtils.columnOffsets.set(colIndex, offset, node);
|
|
9352
9562
|
}
|
|
9353
9563
|
offset += newWidth;
|
|
9354
9564
|
});
|
|
@@ -9360,7 +9570,11 @@ function getColumnGroupResizer(colIndexes, config) {
|
|
|
9360
9570
|
if (col.computedPinned === "end") {
|
|
9361
9571
|
continue;
|
|
9362
9572
|
}
|
|
9363
|
-
|
|
9573
|
+
InternalVarUtils.columnOffsets.set(
|
|
9574
|
+
i,
|
|
9575
|
+
col.computedOffset + diffSum,
|
|
9576
|
+
node
|
|
9577
|
+
);
|
|
9364
9578
|
}
|
|
9365
9579
|
}
|
|
9366
9580
|
};
|
|
@@ -9400,12 +9614,14 @@ function ResizeHandleFn(props) {
|
|
|
9400
9614
|
const target = e.target;
|
|
9401
9615
|
if (brain.isHorizontalLayoutBrain) {
|
|
9402
9616
|
const restoreBodyRange = brain.extendRenderRange({
|
|
9403
|
-
|
|
9404
|
-
|
|
9617
|
+
start: true,
|
|
9618
|
+
end: true,
|
|
9619
|
+
direction: "horizontal"
|
|
9405
9620
|
});
|
|
9406
9621
|
const restoreHeaderRange = headerBrain.extendRenderRange({
|
|
9407
|
-
|
|
9408
|
-
|
|
9622
|
+
start: true,
|
|
9623
|
+
end: true,
|
|
9624
|
+
direction: "horizontal"
|
|
9409
9625
|
});
|
|
9410
9626
|
restoreRenderRange = () => {
|
|
9411
9627
|
restoreBodyRange();
|
|
@@ -9615,7 +9831,8 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9615
9831
|
portalDOMRef,
|
|
9616
9832
|
columnHeaderHeight,
|
|
9617
9833
|
columnReorderDragColumnId,
|
|
9618
|
-
columnMenuVisibleForColumnId
|
|
9834
|
+
columnMenuVisibleForColumnId,
|
|
9835
|
+
columnReorderInPageIndex
|
|
9619
9836
|
},
|
|
9620
9837
|
getDataSourceMasterContext
|
|
9621
9838
|
} = useInfiniteTable();
|
|
@@ -9626,7 +9843,9 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9626
9843
|
componentState: { filterDelay, filterTypes }
|
|
9627
9844
|
} = useDataSourceContextValue();
|
|
9628
9845
|
const { allRowsSelected, someRowsSelected, selectionMode } = useDataSourceState();
|
|
9846
|
+
const horizontalLayoutPageIndex = props.horizontalLayoutPageIndex;
|
|
9629
9847
|
const dragging = columnReorderDragColumnId === column.id;
|
|
9848
|
+
const insideDisabledDraggingPage = columnReorderInPageIndex != null ? horizontalLayoutPageIndex !== columnReorderInPageIndex : false;
|
|
9630
9849
|
const { onResize, height, width, headerOptions, columnsMap } = props;
|
|
9631
9850
|
const sortInfo = column.computedSortInfo;
|
|
9632
9851
|
const header = column.header;
|
|
@@ -9691,7 +9910,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9691
9910
|
const MenuIconCmp = column.components?.MenuIcon || components2?.MenuIcon || MenuIcon;
|
|
9692
9911
|
const menuIcon = /* @__PURE__ */ React42.createElement(MenuIconCmp, { ...menuIconProps });
|
|
9693
9912
|
const initialRenderParam = {
|
|
9694
|
-
horizontalLayoutPageIndex
|
|
9913
|
+
horizontalLayoutPageIndex,
|
|
9695
9914
|
dragging,
|
|
9696
9915
|
domRef: ref,
|
|
9697
9916
|
insideColumnMenu: false,
|
|
@@ -9855,7 +10074,8 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9855
10074
|
const headerClassName = typeof column.headerClassName === "function" ? column.headerClassName(renderParam) : column.headerClassName;
|
|
9856
10075
|
const { onPointerDown, proxyPosition } = useColumnPointerEvents({
|
|
9857
10076
|
columnId: column.id,
|
|
9858
|
-
domRef
|
|
10077
|
+
domRef,
|
|
10078
|
+
horizontalLayoutPageIndex
|
|
9859
10079
|
});
|
|
9860
10080
|
let draggingProxy = null;
|
|
9861
10081
|
if (dragging && proxyPosition) {
|
|
@@ -9899,7 +10119,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9899
10119
|
const FilterEditor = operator?.components?.FilterEditor || filterType?.components?.FilterEditor || column.components?.FilterEditor || StringFilterEditor;
|
|
9900
10120
|
const FilterOperatorSwitch = filterType?.components?.FilterOperatorSwitch || column.components?.FilterOperatorSwitch;
|
|
9901
10121
|
const resizeHandle = useColumnResizeHandle(column, {
|
|
9902
|
-
horizontalLayoutPageIndex
|
|
10122
|
+
horizontalLayoutPageIndex
|
|
9903
10123
|
});
|
|
9904
10124
|
const zIndex2 = `var(${columnZIndexAtIndex5}-${column.computedVisibleIndex})`;
|
|
9905
10125
|
style2.zIndex = zIndex2;
|
|
@@ -9939,6 +10159,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9939
10159
|
HeaderCellRecipe,
|
|
9940
10160
|
{
|
|
9941
10161
|
dragging,
|
|
10162
|
+
insideDisabledDraggingPage,
|
|
9942
10163
|
align: align2,
|
|
9943
10164
|
verticalAlign,
|
|
9944
10165
|
rowSelected: false,
|
|
@@ -9959,7 +10180,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9959
10180
|
afterChildren: /* @__PURE__ */ React42.createElement(React42.Fragment, null, showColumnFilters ? column.computedFilterable ? /* @__PURE__ */ React42.createElement(
|
|
9960
10181
|
InfiniteTableColumnHeaderFilter,
|
|
9961
10182
|
{
|
|
9962
|
-
horizontalLayoutPageIndex
|
|
10183
|
+
horizontalLayoutPageIndex,
|
|
9963
10184
|
filterEditor: FilterEditor,
|
|
9964
10185
|
filterOperatorSwitch: FilterOperatorSwitch ?? InfiniteTableFilterOperatorSwitch,
|
|
9965
10186
|
operator,
|
|
@@ -10277,7 +10498,7 @@ function useColumnGroupResizeHandle(groupColumns, config) {
|
|
|
10277
10498
|
|
|
10278
10499
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
|
|
10279
10500
|
var TableHeaderGroupClassName = `${rootClassName2}HeaderGroup`;
|
|
10280
|
-
var
|
|
10501
|
+
var columnWidthAtIndex4 = stripVar(InternalVars.columnWidthAtIndex);
|
|
10281
10502
|
var columnZIndexAtIndex6 = stripVar(InternalVars.columnZIndexAtIndex);
|
|
10282
10503
|
function InfiniteTableHeaderGroup(props) {
|
|
10283
10504
|
const { columnGroup, height, columns, bodyBrain, columnGroupsMaxDepth } = props;
|
|
@@ -10296,8 +10517,8 @@ function InfiniteTableHeaderGroup(props) {
|
|
|
10296
10517
|
});
|
|
10297
10518
|
const firstColumn = columns[0];
|
|
10298
10519
|
const width = columns.length > 1 ? `calc( ` + columns.map(
|
|
10299
|
-
(col) => `var(${
|
|
10300
|
-
).join(" + ") + " )" : `var(${
|
|
10520
|
+
(col) => `var(${columnWidthAtIndex4}-${col.computedVisibleIndex})`
|
|
10521
|
+
).join(" + ") + " )" : `var(${columnWidthAtIndex4}-${firstColumn.computedVisibleIndex})`;
|
|
10301
10522
|
const zIndex2 = `calc(var(${columnZIndexAtIndex6}-${firstColumn.computedVisibleIndex}) + ${columnGroupsMaxDepth - columnGroup.depth})`;
|
|
10302
10523
|
let style2 = typeof userStyle === "function" ? userStyle({
|
|
10303
10524
|
columnGroup,
|
|
@@ -17043,6 +17264,17 @@ var InfiniteTableApiImpl = class {
|
|
|
17043
17264
|
setColumnVisibility(columnVisibility) {
|
|
17044
17265
|
this.actions.columnVisibility = columnVisibility;
|
|
17045
17266
|
}
|
|
17267
|
+
get scrollContainer() {
|
|
17268
|
+
return this.getState().scrollerDOMRef.current;
|
|
17269
|
+
}
|
|
17270
|
+
get scrollLeftMax() {
|
|
17271
|
+
const scrollLeftMax = this.getState().brain.scrollLeftMax;
|
|
17272
|
+
return scrollLeftMax;
|
|
17273
|
+
}
|
|
17274
|
+
get scrollTopMax() {
|
|
17275
|
+
const scrollTopMax = this.getState().brain.scrollTopMax;
|
|
17276
|
+
return scrollTopMax;
|
|
17277
|
+
}
|
|
17046
17278
|
get scrollLeft() {
|
|
17047
17279
|
const state = this.getState();
|
|
17048
17280
|
return state.brain.getScrollPosition().scrollLeft;
|
|
@@ -18054,6 +18286,46 @@ var HorizontalLayoutMatrixBrain = class extends MatrixBrain {
|
|
|
18054
18286
|
});
|
|
18055
18287
|
}
|
|
18056
18288
|
}
|
|
18289
|
+
computeDirectionalRenderCount(direction, itemSize, count, theRenderSize) {
|
|
18290
|
+
if (direction === "vertical") {
|
|
18291
|
+
return super.computeDirectionalRenderCount(
|
|
18292
|
+
direction,
|
|
18293
|
+
itemSize,
|
|
18294
|
+
count,
|
|
18295
|
+
theRenderSize
|
|
18296
|
+
);
|
|
18297
|
+
}
|
|
18298
|
+
let renderCount = 0;
|
|
18299
|
+
let size = theRenderSize.width;
|
|
18300
|
+
size -= this.getFixedSize("horizontal");
|
|
18301
|
+
if (size <= 0) {
|
|
18302
|
+
return 0;
|
|
18303
|
+
}
|
|
18304
|
+
if (typeof itemSize === "number") {
|
|
18305
|
+
renderCount = (itemSize ? Math.ceil(size / itemSize) : 0) + 1;
|
|
18306
|
+
renderCount = Math.min(count, renderCount);
|
|
18307
|
+
return renderCount;
|
|
18308
|
+
}
|
|
18309
|
+
const pagesInView = Math.floor(size / this.pageWidth);
|
|
18310
|
+
renderCount += pagesInView * this.initialCols;
|
|
18311
|
+
const remainingSize = size - pagesInView * this.pageWidth;
|
|
18312
|
+
const sizes = [];
|
|
18313
|
+
for (let i = 0; i < this.initialCols; i++) {
|
|
18314
|
+
sizes.push(this.getItemSize(i, direction));
|
|
18315
|
+
}
|
|
18316
|
+
sizes.sort(SORT_ASC);
|
|
18317
|
+
let sum2 = 0;
|
|
18318
|
+
for (let i = 0; i < this.initialCols; i++) {
|
|
18319
|
+
sum2 += sizes[i];
|
|
18320
|
+
renderCount++;
|
|
18321
|
+
if (sum2 > remainingSize) {
|
|
18322
|
+
break;
|
|
18323
|
+
}
|
|
18324
|
+
}
|
|
18325
|
+
renderCount += 1;
|
|
18326
|
+
renderCount = Math.min(count, renderCount);
|
|
18327
|
+
return renderCount;
|
|
18328
|
+
}
|
|
18057
18329
|
getRowIndexInPage(rowIndex) {
|
|
18058
18330
|
return this.rowsPerPage ? rowIndex % this.rowsPerPage : rowIndex;
|
|
18059
18331
|
}
|
|
@@ -18200,6 +18472,9 @@ var HorizontalLayoutMatrixBrain = class extends MatrixBrain {
|
|
|
18200
18472
|
}
|
|
18201
18473
|
this._totalPageCount = value;
|
|
18202
18474
|
}
|
|
18475
|
+
getPageWidth() {
|
|
18476
|
+
return this.pageWidth;
|
|
18477
|
+
}
|
|
18203
18478
|
doUpdateRenderCount(which = ALL_DIRECTIONS) {
|
|
18204
18479
|
const rowHeight = this.getInitialRowHeight();
|
|
18205
18480
|
let pageWidth = 0;
|
|
@@ -18352,6 +18627,7 @@ function initSetupState2({
|
|
|
18352
18627
|
scrollLeft: 0
|
|
18353
18628
|
},
|
|
18354
18629
|
columnReorderDragColumnId: false,
|
|
18630
|
+
columnReorderInPageIndex: null,
|
|
18355
18631
|
ready: false,
|
|
18356
18632
|
focused: false,
|
|
18357
18633
|
focusedWithin: false,
|
|
@@ -19776,7 +20052,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
19776
20052
|
}
|
|
19777
20053
|
let valid2 = isValidLicense(licenseKey, {
|
|
19778
20054
|
publishedAt: 1624970570587,
|
|
19779
|
-
version: "5.
|
|
20055
|
+
version: "5.1.0-canary.1"
|
|
19780
20056
|
});
|
|
19781
20057
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
19782
20058
|
return true;
|
|
@@ -23428,17 +23704,17 @@ function HScrollSyncContent(props) {
|
|
|
23428
23704
|
}
|
|
23429
23705
|
|
|
23430
23706
|
// src/components/InfiniteTable/hooks/useVisibleColumnSizes.ts
|
|
23431
|
-
var
|
|
23432
|
-
var
|
|
23707
|
+
var columnWidthAtIndex5 = stripVar(InternalVars.columnWidthAtIndex);
|
|
23708
|
+
var columnOffsetAtIndex3 = stripVar(InternalVars.columnOffsetAtIndex);
|
|
23433
23709
|
function useVisibleColumnSizes() {
|
|
23434
23710
|
const context = useInfiniteTable();
|
|
23435
23711
|
return context.computed.computedVisibleColumns.map((column) => {
|
|
23436
23712
|
return {
|
|
23437
23713
|
id: column.id,
|
|
23438
23714
|
width: column.computedWidth,
|
|
23439
|
-
cssVarForWidth: `var(${
|
|
23715
|
+
cssVarForWidth: `var(${columnWidthAtIndex5}-${column.computedVisibleIndex})`,
|
|
23440
23716
|
offset: column.computedOffset,
|
|
23441
|
-
cssVarForOffset: `var(${
|
|
23717
|
+
cssVarForOffset: `var(${columnOffsetAtIndex3}-${column.computedVisibleIndex})`,
|
|
23442
23718
|
pinned: column.computedPinned
|
|
23443
23719
|
};
|
|
23444
23720
|
});
|