@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.mjs
CHANGED
|
@@ -1253,49 +1253,6 @@ function buildSubscriptionCallback(withRaf = false) {
|
|
|
1253
1253
|
return updater;
|
|
1254
1254
|
}
|
|
1255
1255
|
|
|
1256
|
-
// src/components/InfiniteTable/vars.css.ts
|
|
1257
|
-
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)" } } };
|
|
1258
|
-
var columnHeaderHeightName = "column-header-height";
|
|
1259
|
-
|
|
1260
|
-
// src/components/HeadlessTable/ReactHeadlessTableRenderer.tsx
|
|
1261
|
-
import * as React9 from "react";
|
|
1262
|
-
|
|
1263
|
-
// src/utils/mathIntersection.ts
|
|
1264
|
-
function arrayIntersection(...arrays) {
|
|
1265
|
-
if (!arrays.length) {
|
|
1266
|
-
return [];
|
|
1267
|
-
}
|
|
1268
|
-
const map2 = /* @__PURE__ */ new Map();
|
|
1269
|
-
arrays.forEach((arr) => {
|
|
1270
|
-
for (let i = 0, len2 = arr.length; i < len2; i++) {
|
|
1271
|
-
const item = arr[i];
|
|
1272
|
-
const count = map2.get(item) ?? 0;
|
|
1273
|
-
map2.set(item, count + 1);
|
|
1274
|
-
}
|
|
1275
|
-
return map2;
|
|
1276
|
-
});
|
|
1277
|
-
const len = arrays.length;
|
|
1278
|
-
return arrays[0].filter((x) => {
|
|
1279
|
-
return map2.get(x) === len;
|
|
1280
|
-
});
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
|
-
// src/utils/raf.ts
|
|
1284
|
-
var raf = getGlobal().requestAnimationFrame || ((fn) => {
|
|
1285
|
-
return setTimeout(fn, 16);
|
|
1286
|
-
});
|
|
1287
|
-
var cancelRaf = getGlobal().cancelAnimationFrame || ((timeoutId) => {
|
|
1288
|
-
return clearTimeout(timeoutId);
|
|
1289
|
-
});
|
|
1290
|
-
|
|
1291
|
-
// src/utils/stripVar.ts
|
|
1292
|
-
function stripVar(cssVariableWithVarString) {
|
|
1293
|
-
return cssVariableWithVarString.slice(4, -1);
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
// src/components/InfiniteTable/internalVars.css.ts
|
|
1297
|
-
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)" };
|
|
1298
|
-
|
|
1299
1256
|
// src/utils/selectParent.ts
|
|
1300
1257
|
function selectParent(el, selector2) {
|
|
1301
1258
|
let node = el;
|
|
@@ -1331,12 +1288,24 @@ function selectParentUntil(el, selector2, root) {
|
|
|
1331
1288
|
return null;
|
|
1332
1289
|
}
|
|
1333
1290
|
|
|
1291
|
+
// src/utils/stripVar.ts
|
|
1292
|
+
function stripVar(cssVariableWithVarString) {
|
|
1293
|
+
return cssVariableWithVarString.slice(4, -1);
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1334
1296
|
// src/components/InfiniteTable/internalProps.ts
|
|
1335
1297
|
var rootClassName2 = "Infinite";
|
|
1336
1298
|
var internalProps = {
|
|
1337
1299
|
rootClassName: rootClassName2
|
|
1338
1300
|
};
|
|
1339
1301
|
|
|
1302
|
+
// src/components/InfiniteTable/internalVars.css.ts
|
|
1303
|
+
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)" };
|
|
1304
|
+
|
|
1305
|
+
// src/components/InfiniteTable/vars.css.ts
|
|
1306
|
+
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)" } } };
|
|
1307
|
+
var columnHeaderHeightName = "column-header-height";
|
|
1308
|
+
|
|
1340
1309
|
// src/components/InfiniteTable/utils/infiniteDOMUtils.ts
|
|
1341
1310
|
var InfiniteSelector = `.${internalProps.rootClassName}`;
|
|
1342
1311
|
function getParentInfiniteNode(node) {
|
|
@@ -1359,34 +1328,20 @@ function setInfiniteVarOnRoot(varName, varValue, node) {
|
|
|
1359
1328
|
}
|
|
1360
1329
|
function setInfiniteVarOnNode(varName, varValue, node) {
|
|
1361
1330
|
if (node) {
|
|
1362
|
-
const
|
|
1331
|
+
const name = varName;
|
|
1332
|
+
const prop = InternalVars[name] ? stripVar(InternalVars[name]) : varName;
|
|
1363
1333
|
node.style.setProperty(prop, `${varValue}`);
|
|
1364
1334
|
}
|
|
1365
1335
|
}
|
|
1366
1336
|
function setInfiniteVarsOnNode(vars, node) {
|
|
1367
1337
|
if (node) {
|
|
1368
1338
|
for (var varName in vars) {
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
);
|
|
1339
|
+
const propName = InternalVars[varName] ? stripVar(InternalVars[varName]) : varName;
|
|
1340
|
+
const propValue = `${vars[varName]}`;
|
|
1341
|
+
node.style.setProperty(propName, propValue);
|
|
1373
1342
|
}
|
|
1374
1343
|
}
|
|
1375
1344
|
}
|
|
1376
|
-
function setInfiniteColumnWidth(colIndex, colWidth, node) {
|
|
1377
|
-
setInfiniteVarOnRoot(
|
|
1378
|
-
`${columnWidthAtIndex}-${colIndex}`,
|
|
1379
|
-
typeof colWidth === "number" ? colWidth + "px" : colWidth,
|
|
1380
|
-
node
|
|
1381
|
-
);
|
|
1382
|
-
}
|
|
1383
|
-
function setInfiniteColumnOffset(colIndex, colOffset, node) {
|
|
1384
|
-
setInfiniteVarOnRoot(
|
|
1385
|
-
`${columnOffsetAtIndex}-${colIndex}`,
|
|
1386
|
-
typeof colOffset === "number" ? colOffset + "px" : colOffset,
|
|
1387
|
-
node
|
|
1388
|
-
);
|
|
1389
|
-
}
|
|
1390
1345
|
function addToInfiniteColumnOffset(column, amountToAdd, node) {
|
|
1391
1346
|
setInfiniteVarOnRoot(
|
|
1392
1347
|
`${columnOffsetAtIndex}-${column.computedVisibleIndex}`,
|
|
@@ -1423,12 +1378,42 @@ function restoreInfiniteColumnReorderDuration(colIndex, node) {
|
|
|
1423
1378
|
node
|
|
1424
1379
|
);
|
|
1425
1380
|
}
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1381
|
+
var InternalVarUtils = {
|
|
1382
|
+
columnWidths: {
|
|
1383
|
+
get(index) {
|
|
1384
|
+
return `var(${this.getVarName(index)})`;
|
|
1385
|
+
},
|
|
1386
|
+
getVarName(index) {
|
|
1387
|
+
return this.varName.get(index);
|
|
1388
|
+
},
|
|
1389
|
+
varName: {
|
|
1390
|
+
get(index) {
|
|
1391
|
+
return `${columnWidthAtIndex}-${index}`;
|
|
1392
|
+
}
|
|
1393
|
+
},
|
|
1394
|
+
set(index, value, node) {
|
|
1395
|
+
value = typeof value === "number" ? value + "px" : value;
|
|
1396
|
+
setInfiniteVarOnRoot(this.varName.get(index), value, node);
|
|
1397
|
+
}
|
|
1398
|
+
},
|
|
1399
|
+
columnOffsets: {
|
|
1400
|
+
get(index) {
|
|
1401
|
+
return `var(${this.getVarName(index)})`;
|
|
1402
|
+
},
|
|
1403
|
+
getVarName(index) {
|
|
1404
|
+
return this.varName.get(index);
|
|
1405
|
+
},
|
|
1406
|
+
varName: {
|
|
1407
|
+
get(index) {
|
|
1408
|
+
return `${columnOffsetAtIndex}-${index}`;
|
|
1409
|
+
}
|
|
1410
|
+
},
|
|
1411
|
+
set(index, value, node) {
|
|
1412
|
+
value = typeof value === "number" ? value + "px" : value;
|
|
1413
|
+
setInfiniteVarOnRoot(this.varName.get(index), value, node);
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
};
|
|
1432
1417
|
function setInfiniteScrollPosition(scrollPosition, node) {
|
|
1433
1418
|
setInfiniteVarsOnNode(
|
|
1434
1419
|
{
|
|
@@ -1439,6 +1424,37 @@ function setInfiniteScrollPosition(scrollPosition, node) {
|
|
|
1439
1424
|
);
|
|
1440
1425
|
}
|
|
1441
1426
|
|
|
1427
|
+
// src/components/HeadlessTable/ReactHeadlessTableRenderer.tsx
|
|
1428
|
+
import * as React9 from "react";
|
|
1429
|
+
|
|
1430
|
+
// src/utils/mathIntersection.ts
|
|
1431
|
+
function arrayIntersection(...arrays) {
|
|
1432
|
+
if (!arrays.length) {
|
|
1433
|
+
return [];
|
|
1434
|
+
}
|
|
1435
|
+
const map2 = /* @__PURE__ */ new Map();
|
|
1436
|
+
arrays.forEach((arr) => {
|
|
1437
|
+
for (let i = 0, len2 = arr.length; i < len2; i++) {
|
|
1438
|
+
const item = arr[i];
|
|
1439
|
+
const count = map2.get(item) ?? 0;
|
|
1440
|
+
map2.set(item, count + 1);
|
|
1441
|
+
}
|
|
1442
|
+
return map2;
|
|
1443
|
+
});
|
|
1444
|
+
const len = arrays.length;
|
|
1445
|
+
return arrays[0].filter((x) => {
|
|
1446
|
+
return map2.get(x) === len;
|
|
1447
|
+
});
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
// src/utils/raf.ts
|
|
1451
|
+
var raf = getGlobal().requestAnimationFrame || ((fn) => {
|
|
1452
|
+
return setTimeout(fn, 16);
|
|
1453
|
+
});
|
|
1454
|
+
var cancelRaf = getGlobal().cancelAnimationFrame || ((timeoutId) => {
|
|
1455
|
+
return clearTimeout(timeoutId);
|
|
1456
|
+
});
|
|
1457
|
+
|
|
1442
1458
|
// src/components/VirtualBrain/MatrixBrain.ts
|
|
1443
1459
|
var import_binary_search = __toESM(require_binary_search());
|
|
1444
1460
|
|
|
@@ -1482,6 +1498,7 @@ var MatrixBrain = class extends Logger {
|
|
|
1482
1498
|
this.availableRenderHeight = 0;
|
|
1483
1499
|
this.cols = 0;
|
|
1484
1500
|
this.rows = 0;
|
|
1501
|
+
this.alwaysRenderedColumns = /* @__PURE__ */ new Set();
|
|
1485
1502
|
this._rowsPerPage = 0;
|
|
1486
1503
|
this.rowHeight = 0;
|
|
1487
1504
|
this.colWidth = 0;
|
|
@@ -1489,6 +1506,14 @@ var MatrixBrain = class extends Logger {
|
|
|
1489
1506
|
this.horizontalTotalSize = 0;
|
|
1490
1507
|
this.horizontalRenderCount = void 0;
|
|
1491
1508
|
this.verticalRenderCount = void 0;
|
|
1509
|
+
this.horizontalExtendRangeBy = {
|
|
1510
|
+
start: 0,
|
|
1511
|
+
end: 0
|
|
1512
|
+
};
|
|
1513
|
+
this.verticalExtendRangeBy = {
|
|
1514
|
+
start: 0,
|
|
1515
|
+
end: 0
|
|
1516
|
+
};
|
|
1492
1517
|
this.horizontalRenderRange = {
|
|
1493
1518
|
startIndex: 0,
|
|
1494
1519
|
endIndex: 0
|
|
@@ -1628,34 +1653,6 @@ var MatrixBrain = class extends Logger {
|
|
|
1628
1653
|
});
|
|
1629
1654
|
});
|
|
1630
1655
|
};
|
|
1631
|
-
this.computeDirectionalRenderCount = (direction, itemSize, count, theRenderSize) => {
|
|
1632
|
-
let renderCount = 0;
|
|
1633
|
-
let size = direction === "horizontal" ? theRenderSize.width : theRenderSize.height;
|
|
1634
|
-
size -= this.getFixedSize(direction);
|
|
1635
|
-
if (size <= 0) {
|
|
1636
|
-
return 0;
|
|
1637
|
-
}
|
|
1638
|
-
if (typeof itemSize === "function") {
|
|
1639
|
-
const sizes = [];
|
|
1640
|
-
for (let i = 0; i < count; i++) {
|
|
1641
|
-
sizes.push(this.getItemSize(i, direction));
|
|
1642
|
-
}
|
|
1643
|
-
sizes.sort(SORT_ASC);
|
|
1644
|
-
let sum2 = 0;
|
|
1645
|
-
for (let i = 0; i < count; i++) {
|
|
1646
|
-
sum2 += sizes[i];
|
|
1647
|
-
renderCount++;
|
|
1648
|
-
if (sum2 > size) {
|
|
1649
|
-
break;
|
|
1650
|
-
}
|
|
1651
|
-
}
|
|
1652
|
-
renderCount += 1;
|
|
1653
|
-
} else {
|
|
1654
|
-
renderCount = (itemSize ? Math.ceil(size / itemSize) : 0) + 1;
|
|
1655
|
-
}
|
|
1656
|
-
renderCount = Math.min(count, renderCount);
|
|
1657
|
-
return renderCount;
|
|
1658
|
-
};
|
|
1659
1656
|
this.isColFixedEnd = (colIndex) => {
|
|
1660
1657
|
if (!this.fixedColsEnd) {
|
|
1661
1658
|
return false;
|
|
@@ -1922,7 +1919,7 @@ var MatrixBrain = class extends Logger {
|
|
|
1922
1919
|
};
|
|
1923
1920
|
};
|
|
1924
1921
|
this.computeDirectionalRenderRange = (direction) => {
|
|
1925
|
-
|
|
1922
|
+
let renderCount = direction === "horizontal" ? this.horizontalRenderCount : this.verticalRenderCount;
|
|
1926
1923
|
const count = direction === "horizontal" ? this.cols : this.rows;
|
|
1927
1924
|
if (!renderCount) {
|
|
1928
1925
|
return {
|
|
@@ -1933,7 +1930,15 @@ var MatrixBrain = class extends Logger {
|
|
|
1933
1930
|
const fixedStartIndex = (direction === "horizontal" ? this.fixedColsStart : this.fixedRowsStart) || 0;
|
|
1934
1931
|
let scrollPositionForDirection = direction === "horizontal" ? this.scrollPosition.scrollLeft : this.scrollPosition.scrollTop;
|
|
1935
1932
|
scrollPositionForDirection += this.getFixedStartSize(direction);
|
|
1933
|
+
const extendBy = direction === "horizontal" ? this.horizontalExtendRangeBy : this.verticalExtendRangeBy;
|
|
1936
1934
|
let startIndex = this.getItemAt(scrollPositionForDirection, direction);
|
|
1935
|
+
if (extendBy.start) {
|
|
1936
|
+
startIndex = Math.max(0, startIndex - extendBy.start);
|
|
1937
|
+
renderCount += extendBy.start;
|
|
1938
|
+
}
|
|
1939
|
+
if (extendBy.end) {
|
|
1940
|
+
renderCount += extendBy.end;
|
|
1941
|
+
}
|
|
1937
1942
|
let endIndex = startIndex + renderCount;
|
|
1938
1943
|
const theEnd = Math.max(
|
|
1939
1944
|
fixedStartIndex,
|
|
@@ -1977,7 +1982,6 @@ var MatrixBrain = class extends Logger {
|
|
|
1977
1982
|
return searchResult;
|
|
1978
1983
|
}
|
|
1979
1984
|
return ~searchResult - 1;
|
|
1980
|
-
return 0;
|
|
1981
1985
|
};
|
|
1982
1986
|
this.computeCacheFor = (itemIndex, direction) => {
|
|
1983
1987
|
const itemSizeValueOrFn = direction === "horizontal" ? this.colWidth : this.rowHeight;
|
|
@@ -2142,6 +2146,15 @@ var MatrixBrain = class extends Logger {
|
|
|
2142
2146
|
}
|
|
2143
2147
|
return cachedSize;
|
|
2144
2148
|
};
|
|
2149
|
+
this.keepColumnRendered = (colIndex) => {
|
|
2150
|
+
this.alwaysRenderedColumns.add(colIndex);
|
|
2151
|
+
return () => {
|
|
2152
|
+
this.alwaysRenderedColumns.delete(colIndex);
|
|
2153
|
+
};
|
|
2154
|
+
};
|
|
2155
|
+
this.getAlwaysRenderedColumns = () => {
|
|
2156
|
+
return Array.from(this.alwaysRenderedColumns);
|
|
2157
|
+
};
|
|
2145
2158
|
this.setRenderRange = ({
|
|
2146
2159
|
horizontal,
|
|
2147
2160
|
vertical,
|
|
@@ -2411,28 +2424,30 @@ var MatrixBrain = class extends Logger {
|
|
|
2411
2424
|
* @param options.right - if true, extends the right side with the amount of current visible columns, otherwise with the specified number
|
|
2412
2425
|
*/
|
|
2413
2426
|
extendRenderRange(options) {
|
|
2414
|
-
const
|
|
2415
|
-
const
|
|
2416
|
-
const
|
|
2427
|
+
const { direction } = options;
|
|
2428
|
+
const horizontal = direction === "horizontal";
|
|
2429
|
+
const extendValueWhenTrue = horizontal ? this.horizontalRenderCount || this.getInitialCols() : this.verticalRenderCount || this.getInitialRows();
|
|
2430
|
+
const startAmount = typeof options.start === "number" ? options.start : options.start === true ? extendValueWhenTrue : 0;
|
|
2431
|
+
const endAmount = typeof options.end === "number" ? options.end : options.end === true ? extendValueWhenTrue : 0;
|
|
2432
|
+
if (horizontal) {
|
|
2433
|
+
this.horizontalExtendRangeBy = {
|
|
2434
|
+
start: startAmount,
|
|
2435
|
+
end: endAmount
|
|
2436
|
+
};
|
|
2437
|
+
} else {
|
|
2438
|
+
this.verticalExtendRangeBy = {
|
|
2439
|
+
start: startAmount,
|
|
2440
|
+
end: endAmount
|
|
2441
|
+
};
|
|
2442
|
+
}
|
|
2443
|
+
this.updateRenderRange({ horizontal, vertical: !horizontal });
|
|
2417
2444
|
const restore = () => {
|
|
2418
|
-
this.
|
|
2419
|
-
|
|
2420
|
-
|
|
2445
|
+
this.extendRenderRange({
|
|
2446
|
+
start: 0,
|
|
2447
|
+
end: 0,
|
|
2448
|
+
direction
|
|
2421
2449
|
});
|
|
2422
2450
|
};
|
|
2423
|
-
const { start, end } = this.getRenderRange();
|
|
2424
|
-
const [startRow, startCol] = start;
|
|
2425
|
-
const [endRow, endCol] = end;
|
|
2426
|
-
this.setRenderRange({
|
|
2427
|
-
horizontal: {
|
|
2428
|
-
startIndex: Math.max(0, startCol - leftAmount),
|
|
2429
|
-
endIndex: Math.min(this.cols, endCol + rightAmount)
|
|
2430
|
-
},
|
|
2431
|
-
vertical: {
|
|
2432
|
-
startIndex: startRow,
|
|
2433
|
-
endIndex: endRow
|
|
2434
|
-
}
|
|
2435
|
-
});
|
|
2436
2451
|
return restore;
|
|
2437
2452
|
}
|
|
2438
2453
|
updateRenderCount(which = ALL_DIRECTIONS) {
|
|
@@ -2504,6 +2519,34 @@ var MatrixBrain = class extends Logger {
|
|
|
2504
2519
|
fns[i](scrollPosition);
|
|
2505
2520
|
}
|
|
2506
2521
|
}
|
|
2522
|
+
computeDirectionalRenderCount(direction, itemSize, count, theRenderSize) {
|
|
2523
|
+
let renderCount = 0;
|
|
2524
|
+
let size = direction === "horizontal" ? theRenderSize.width : theRenderSize.height;
|
|
2525
|
+
size -= this.getFixedSize(direction);
|
|
2526
|
+
if (size <= 0) {
|
|
2527
|
+
return 0;
|
|
2528
|
+
}
|
|
2529
|
+
if (typeof itemSize === "function") {
|
|
2530
|
+
const sizes = [];
|
|
2531
|
+
for (let i = 0; i < count; i++) {
|
|
2532
|
+
sizes.push(this.getItemSize(i, direction));
|
|
2533
|
+
}
|
|
2534
|
+
sizes.sort(SORT_ASC);
|
|
2535
|
+
let sum2 = 0;
|
|
2536
|
+
for (let i = 0; i < count; i++) {
|
|
2537
|
+
sum2 += sizes[i];
|
|
2538
|
+
renderCount++;
|
|
2539
|
+
if (sum2 > size) {
|
|
2540
|
+
break;
|
|
2541
|
+
}
|
|
2542
|
+
}
|
|
2543
|
+
renderCount += 1;
|
|
2544
|
+
} else {
|
|
2545
|
+
renderCount = (itemSize ? Math.ceil(size / itemSize) : 0) + 1;
|
|
2546
|
+
}
|
|
2547
|
+
renderCount = Math.min(count, renderCount);
|
|
2548
|
+
return renderCount;
|
|
2549
|
+
}
|
|
2507
2550
|
getFixedSize(direction) {
|
|
2508
2551
|
return direction === "horizontal" ? this.getFixedStartColsWidth() + this.getFixedEndColsWidth() : this.getFixedStartRowsHeight() + this.getFixedEndRowsHeight();
|
|
2509
2552
|
}
|
|
@@ -2617,6 +2660,9 @@ var MatrixBrain = class extends Logger {
|
|
|
2617
2660
|
this.reset();
|
|
2618
2661
|
this.rowspanParent.clear();
|
|
2619
2662
|
this.colspanParent.clear();
|
|
2663
|
+
this.alwaysRenderedColumns.clear();
|
|
2664
|
+
this.horizontalExtendRangeBy = { start: 0, end: 0 };
|
|
2665
|
+
this.verticalExtendRangeBy = { start: 0, end: 0 };
|
|
2620
2666
|
this.destroyed = true;
|
|
2621
2667
|
this.onDestroyFns = [];
|
|
2622
2668
|
this.onScrollFns = [];
|
|
@@ -2650,6 +2696,9 @@ var MappedCells = class extends Logger {
|
|
|
2650
2696
|
}
|
|
2651
2697
|
return elementsOutsideItemRange.pop();
|
|
2652
2698
|
};
|
|
2699
|
+
this.getElementFromListForRow = (elementsOutsideItemRange, _rowIndex) => {
|
|
2700
|
+
return elementsOutsideItemRange.pop();
|
|
2701
|
+
};
|
|
2653
2702
|
/**
|
|
2654
2703
|
* Retrieves the elements that contain rendered cells that are outside
|
|
2655
2704
|
* of the specified range
|
|
@@ -2947,7 +2996,8 @@ var ReactHeadlessTableRenderer = class extends Logger {
|
|
|
2947
2996
|
this.detailRowUpdaters = [];
|
|
2948
2997
|
this.items = [];
|
|
2949
2998
|
this.detailItems = [];
|
|
2950
|
-
this.
|
|
2999
|
+
this.lastEnteredRow = -1;
|
|
3000
|
+
this.lastExitedRow = -1;
|
|
2951
3001
|
this.hoverRowUpdatesInProgress = /* @__PURE__ */ new Map();
|
|
2952
3002
|
this.infiniteNode = null;
|
|
2953
3003
|
this.setDetailTransform = (element, _rowIndex, {
|
|
@@ -2969,14 +3019,14 @@ var ReactHeadlessTableRenderer = class extends Logger {
|
|
|
2969
3019
|
scrollLeft: scrollLeft2,
|
|
2970
3020
|
scrollTop: scrollTop2
|
|
2971
3021
|
}, zIndex2) => {
|
|
2972
|
-
const columnOffsetX =
|
|
3022
|
+
const columnOffsetX = InternalVarUtils.columnOffsets.get(colIndex);
|
|
2973
3023
|
const columnOffsetXWhileReordering = `${columnOffsetAtIndexWhileReordering2}-${colIndex}`;
|
|
2974
3024
|
const currentTransformYValue = scrollTop2 ? `calc( ${y}px + var(${scrollTopCSSVar}) )` : `${y}px`;
|
|
2975
3025
|
if (element.__currentTransformY !== currentTransformYValue) {
|
|
2976
3026
|
element.__currentTransformY = currentTransformYValue;
|
|
2977
3027
|
element.style.setProperty(currentTransformY, currentTransformYValue);
|
|
2978
3028
|
}
|
|
2979
|
-
const transformValue = `translate3d(var(${columnOffsetXWhileReordering},
|
|
3029
|
+
const transformValue = `translate3d(var(${columnOffsetXWhileReordering}, ${columnOffsetX}), var(${currentTransformY}), 0)`;
|
|
2980
3030
|
if (element.__transformValue !== transformValue) {
|
|
2981
3031
|
element.__transformValue = transformValue;
|
|
2982
3032
|
element.style.transform = transformValue;
|
|
@@ -3376,11 +3426,14 @@ var ReactHeadlessTableRenderer = class extends Logger {
|
|
|
3376
3426
|
return covered ? [rowspanParent, colspanParent] : false;
|
|
3377
3427
|
};
|
|
3378
3428
|
this.onMouseEnter = (rowIndex) => {
|
|
3379
|
-
this.
|
|
3429
|
+
this.lastEnteredRow = rowIndex;
|
|
3430
|
+
this.lastExitedRow = -1;
|
|
3380
3431
|
if (this.scrolling) {
|
|
3381
3432
|
return;
|
|
3382
3433
|
}
|
|
3383
|
-
|
|
3434
|
+
if (rowIndex != -1) {
|
|
3435
|
+
this.addHoverClass(rowIndex);
|
|
3436
|
+
}
|
|
3384
3437
|
};
|
|
3385
3438
|
this.addHoverClass = (rowIndex) => {
|
|
3386
3439
|
this.mappedCells.getElementsForRowIndex(rowIndex).forEach((elIndex) => {
|
|
@@ -3393,14 +3446,14 @@ var ReactHeadlessTableRenderer = class extends Logger {
|
|
|
3393
3446
|
});
|
|
3394
3447
|
};
|
|
3395
3448
|
this.onMouseLeave = (rowIndex) => {
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
}
|
|
3399
|
-
this.currentHoveredRow = -1;
|
|
3449
|
+
this.lastExitedRow = rowIndex;
|
|
3450
|
+
this.lastEnteredRow = -1;
|
|
3400
3451
|
if (this.scrolling) {
|
|
3401
3452
|
return;
|
|
3402
3453
|
}
|
|
3403
|
-
|
|
3454
|
+
if (rowIndex != -1) {
|
|
3455
|
+
this.removeHoverClass(rowIndex);
|
|
3456
|
+
}
|
|
3404
3457
|
};
|
|
3405
3458
|
this.removeHoverClass = (rowIndex) => {
|
|
3406
3459
|
this.mappedCells.getElementsForRowIndex(rowIndex).forEach((elIndex) => {
|
|
@@ -3424,8 +3477,8 @@ var ReactHeadlessTableRenderer = class extends Logger {
|
|
|
3424
3477
|
}
|
|
3425
3478
|
this.hoverRowUpdatesInProgress.set(rowIndex, true);
|
|
3426
3479
|
const checkHoverClass = () => {
|
|
3427
|
-
if (this.
|
|
3428
|
-
if (this.
|
|
3480
|
+
if (!this.scrolling && this.lastEnteredRow != -1) {
|
|
3481
|
+
if (this.lastEnteredRow === rowIndex) {
|
|
3429
3482
|
this.addHoverClass(rowIndex);
|
|
3430
3483
|
} else {
|
|
3431
3484
|
this.removeHoverClass(rowIndex);
|
|
@@ -3518,11 +3571,17 @@ var ReactHeadlessTableRenderer = class extends Logger {
|
|
|
3518
3571
|
};
|
|
3519
3572
|
this.onScrollStart = () => {
|
|
3520
3573
|
this.scrolling = true;
|
|
3574
|
+
if (this.lastEnteredRow != -1) {
|
|
3575
|
+
this.removeHoverClass(this.lastEnteredRow);
|
|
3576
|
+
}
|
|
3521
3577
|
};
|
|
3522
3578
|
this.onScrollStop = () => {
|
|
3523
3579
|
this.scrolling = false;
|
|
3524
|
-
if (this.
|
|
3525
|
-
this.addHoverClass(this.
|
|
3580
|
+
if (this.lastEnteredRow != -1) {
|
|
3581
|
+
this.addHoverClass(this.lastEnteredRow);
|
|
3582
|
+
}
|
|
3583
|
+
if (this.lastExitedRow != -1) {
|
|
3584
|
+
this.removeHoverClass(this.lastExitedRow);
|
|
3526
3585
|
}
|
|
3527
3586
|
};
|
|
3528
3587
|
this.adjustFixedElementsOnScroll = (scrollPosition = this.brain.getScrollPosition()) => {
|
|
@@ -3789,12 +3848,27 @@ var ReactHeadlessTableRenderer = class extends Logger {
|
|
|
3789
3848
|
return [];
|
|
3790
3849
|
}
|
|
3791
3850
|
const { start, end } = range;
|
|
3851
|
+
const horizontalLayout = this.brain.isHorizontalLayoutBrain;
|
|
3792
3852
|
if (false) {
|
|
3793
3853
|
this.debug(`Render range ${start}-${end}. Force ${force}`);
|
|
3794
3854
|
}
|
|
3795
3855
|
const { mappedCells, mappedDetailRows } = this;
|
|
3796
3856
|
const fixedRanges = this.getFixedRanges(range);
|
|
3797
3857
|
const ranges = [range, ...fixedRanges];
|
|
3858
|
+
const alwaysRenderedColumns = this.brain.getAlwaysRenderedColumns();
|
|
3859
|
+
if (alwaysRenderedColumns.length > 0) {
|
|
3860
|
+
const startCol = range.start[1];
|
|
3861
|
+
const endCol = range.end[1];
|
|
3862
|
+
alwaysRenderedColumns.forEach((colIndex) => {
|
|
3863
|
+
const colInRange = startCol <= colIndex && colIndex < endCol;
|
|
3864
|
+
if (!colInRange) {
|
|
3865
|
+
ranges.push({
|
|
3866
|
+
start: [range.start[0], colIndex],
|
|
3867
|
+
end: [range.end[0], colIndex + 1]
|
|
3868
|
+
});
|
|
3869
|
+
}
|
|
3870
|
+
});
|
|
3871
|
+
}
|
|
3798
3872
|
const extraCellsMap = /* @__PURE__ */ new Map();
|
|
3799
3873
|
const extraCells = ranges.map(this.getExtraSpanCellsForRange).flat();
|
|
3800
3874
|
if (extraCells) {
|
|
@@ -3914,9 +3988,15 @@ var ReactHeadlessTableRenderer = class extends Logger {
|
|
|
3914
3988
|
if (cellRendered && !force && cellMappedCorrectly) {
|
|
3915
3989
|
continue;
|
|
3916
3990
|
}
|
|
3917
|
-
const elementIndex = cellRendered ? mappedCells.getElementIndexForCell(row, col) :
|
|
3918
|
-
elementsOutsideItemRange
|
|
3919
|
-
|
|
3991
|
+
const elementIndex = cellRendered ? mappedCells.getElementIndexForCell(row, col) : (
|
|
3992
|
+
// TODO when horizontal layout, just do elementsOutsideItemRange.pop()
|
|
3993
|
+
horizontalLayout ? mappedCells.getElementFromListForRow(
|
|
3994
|
+
elementsOutsideItemRange,
|
|
3995
|
+
row
|
|
3996
|
+
) : mappedCells.getElementFromListForColumn(
|
|
3997
|
+
elementsOutsideItemRange,
|
|
3998
|
+
col
|
|
3999
|
+
)
|
|
3920
4000
|
);
|
|
3921
4001
|
if (elementIndex == null) {
|
|
3922
4002
|
if (false) {
|
|
@@ -4159,17 +4239,18 @@ var HorizontalLayoutTableRenderer = class extends ReactHeadlessTableRenderer {
|
|
|
4159
4239
|
);
|
|
4160
4240
|
const pageWidth = ThemeVars.runtime.totalVisibleColumnsWidthVar;
|
|
4161
4241
|
const pageOffset = pageIndex ? `calc(${pageWidth} * ${pageIndex})` : "0px";
|
|
4162
|
-
const columnOffsetX =
|
|
4242
|
+
const columnOffsetX = InternalVarUtils.columnOffsets.get(
|
|
4243
|
+
horizontalLayoutCoords.colIndex
|
|
4244
|
+
);
|
|
4163
4245
|
const columnOffsetXWhileReordering = `${columnOffsetAtIndexWhileReordering2}-${horizontalLayoutCoords.colIndex}`;
|
|
4164
4246
|
const currentTransformYValue = `${y}px`;
|
|
4165
4247
|
if (element.__currentTransformY !== currentTransformYValue) {
|
|
4166
4248
|
element.__currentTransformY = currentTransformYValue;
|
|
4167
4249
|
element.style.setProperty(currentTransformY, currentTransformYValue);
|
|
4168
4250
|
}
|
|
4169
|
-
const xOffset = `calc(var(${columnOffsetX}) + ${pageOffset})`;
|
|
4170
|
-
const transformX2 = `var(${columnOffsetXWhileReordering}, ${xOffset})`;
|
|
4251
|
+
const xOffset = `calc(var(${columnOffsetXWhileReordering}, ${columnOffsetX}) + ${pageOffset})`;
|
|
4171
4252
|
const transformY = `var(${currentTransformY})`;
|
|
4172
|
-
const transformValue = `translate3d(${
|
|
4253
|
+
const transformValue = `translate3d(${xOffset}, ${transformY}, 0px)`;
|
|
4173
4254
|
if (element.__transformValue !== transformValue) {
|
|
4174
4255
|
element.__transformValue = transformValue;
|
|
4175
4256
|
element.style.transform = transformValue;
|
|
@@ -5278,22 +5359,22 @@ import { useEffect as useEffect10, useLayoutEffect as useLayoutEffect8, useState
|
|
|
5278
5359
|
|
|
5279
5360
|
// src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
|
|
5280
5361
|
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";
|
|
5281
|
-
var HeaderCellContentRecipe = createRuntimeFn({ defaultClassName: "
|
|
5362
|
+
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: [] });
|
|
5282
5363
|
var HeaderCellProxy = "header_HeaderCellProxy__12zfob1n utilities_whiteSpace_nowrap__16lm1iw23 utilities_textOverflow_ellipsis__16lm1iw24 utilities_overflow_hidden__16lm1iw1x";
|
|
5283
|
-
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: "
|
|
5364
|
+
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"]] });
|
|
5284
5365
|
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"]] });
|
|
5285
|
-
var HeaderFilterEditorCls = "
|
|
5366
|
+
var HeaderFilterEditorCls = "header_HeaderFilterEditorCls__12zfob12o utilities_width_100%__16lm1iw1b utilities_height_100%__16lm1iw19";
|
|
5286
5367
|
var HeaderFilterIconIndexCls = "header_HeaderFilterIconIndexCls__12zfob17";
|
|
5287
|
-
var HeaderFilterOperatorCls = "
|
|
5288
|
-
var HeaderFilterOperatorIconRecipe = createRuntimeFn({ defaultClassName: "
|
|
5289
|
-
var HeaderFilterRecipe = createRuntimeFn({ defaultClassName: "
|
|
5290
|
-
var HeaderGroupCls = "
|
|
5291
|
-
var HeaderMenuIconCls = createRuntimeFn({ defaultClassName: "
|
|
5368
|
+
var HeaderFilterOperatorCls = "header_HeaderFilterOperatorCls__12zfob12k utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q utilities_position_relative__16lm1iw1";
|
|
5369
|
+
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: [] });
|
|
5370
|
+
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: [] });
|
|
5371
|
+
var HeaderGroupCls = "header_HeaderGroupCls__12zfob12g utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q";
|
|
5372
|
+
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"]] });
|
|
5292
5373
|
var HeaderScrollbarPlaceholderCls = "header_HeaderScrollbarPlaceholderCls__12zfob18 utilities_position_absolute__16lm1iw2";
|
|
5293
5374
|
var HeaderSortIconCls = "utilities_position_relative__16lm1iw1";
|
|
5294
5375
|
var HeaderSortIconIndexCls = "header_HeaderSortIconIndexCls__12zfob16";
|
|
5295
5376
|
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: [] });
|
|
5296
|
-
var HeaderWrapperCls = "
|
|
5377
|
+
var HeaderWrapperCls = "header_HeaderWrapperCls__12zfob12f utilities_overflow_hidden__16lm1iw1x utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o";
|
|
5297
5378
|
|
|
5298
5379
|
// src/components/InfiniteTable/components/icons/InfiniteTableIconClassName.ts
|
|
5299
5380
|
var InfiniteTableIconClassName = "InfiniteTableIcon";
|
|
@@ -6735,6 +6816,7 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
|
|
|
6735
6816
|
rowSelected: extraFlags.rowSelected ?? "null",
|
|
6736
6817
|
rowActive: extraFlags.rowActive,
|
|
6737
6818
|
dragging: extraFlags.dragging,
|
|
6819
|
+
insideDisabledDraggingPage: extraFlags.insideDisabledDraggingPage,
|
|
6738
6820
|
firstRow: extraFlags.firstRow ?? false,
|
|
6739
6821
|
firstRowInHorizontalLayoutPage: extraFlags.firstRowInHorizontalLayoutPage ?? false,
|
|
6740
6822
|
rowDisabled: extraFlags.rowDisabled,
|
|
@@ -6802,11 +6884,11 @@ import { useCallback as useCallback8, useState as useState7 } from "react";
|
|
|
6802
6884
|
// src/components/InfiniteTable/InfiniteCls.css.ts
|
|
6803
6885
|
var FooterCls = "utilities_position_relative__16lm1iw1";
|
|
6804
6886
|
var InfiniteCls = "InfiniteCls_InfiniteCls__1yeub2v0 utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwz utilities_flexFlow_column__16lm1iw1m utilities_boxSizingBorderBox__16lm1iw0";
|
|
6805
|
-
var InfiniteClsHasPinnedEnd = "
|
|
6806
|
-
var InfiniteClsHasPinnedStart = "
|
|
6807
|
-
var InfiniteClsRecipe = createRuntimeFn({ defaultClassName: "InfiniteCls__1yeub2v2", variantClassNames: { focused: { true: "
|
|
6808
|
-
var InfiniteClsShiftingColumns = "
|
|
6809
|
-
var PinnedRowsContainerClsVariants = createRuntimeFn({ defaultClassName: "
|
|
6887
|
+
var InfiniteClsHasPinnedEnd = "InfiniteCls_InfiniteClsHasPinnedEnd__1yeub2vs";
|
|
6888
|
+
var InfiniteClsHasPinnedStart = "InfiniteCls_InfiniteClsHasPinnedStart__1yeub2vr";
|
|
6889
|
+
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"]] });
|
|
6890
|
+
var InfiniteClsShiftingColumns = "InfiniteCls_shiftingcols__1yeub2vp";
|
|
6891
|
+
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: [] });
|
|
6810
6892
|
|
|
6811
6893
|
// src/components/InfiniteTable/utils/rafFn.ts
|
|
6812
6894
|
var rafFn = (fn) => {
|
|
@@ -6847,7 +6929,6 @@ var scrollbarWidthHorizontal = stripVar(
|
|
|
6847
6929
|
);
|
|
6848
6930
|
var scrollbarWidthVertical = stripVar(InternalVars.scrollbarWidthVertical);
|
|
6849
6931
|
var columnWidthAtIndex2 = stripVar(InternalVars.columnWidthAtIndex);
|
|
6850
|
-
var columnOffsetAtIndex3 = stripVar(InternalVars.columnOffsetAtIndex);
|
|
6851
6932
|
var columnZIndexAtIndex3 = stripVar(InternalVars.columnZIndexAtIndex);
|
|
6852
6933
|
var scrollLeftCSSVar = stripVar(InternalVars.scrollLeft);
|
|
6853
6934
|
var activeCellColWidth = stripVar(InternalVars.activeCellColWidth);
|
|
@@ -6889,7 +6970,8 @@ function useDOMProps(initialDOMProps) {
|
|
|
6889
6970
|
onSelfFocus,
|
|
6890
6971
|
onSelfBlur,
|
|
6891
6972
|
bodySize,
|
|
6892
|
-
activeCellIndex
|
|
6973
|
+
activeCellIndex,
|
|
6974
|
+
wrapRowsHorizontally
|
|
6893
6975
|
} = state;
|
|
6894
6976
|
const {
|
|
6895
6977
|
computedPinnedStartColumnsWidth,
|
|
@@ -6904,11 +6986,11 @@ function useDOMProps(initialDOMProps) {
|
|
|
6904
6986
|
const cssVars = computedVisibleColumns.reduce(
|
|
6905
6987
|
(vars, col) => {
|
|
6906
6988
|
const index = col.computedVisibleIndex;
|
|
6907
|
-
vars[
|
|
6908
|
-
vars[
|
|
6989
|
+
vars[InternalVarUtils.columnWidths.varName.get(index)] = col.computedWidth + "px";
|
|
6990
|
+
vars[InternalVarUtils.columnOffsets.varName.get(index)] = col.computedPinned === "start" ? `calc( ${col.computedOffset}px + var(${scrollLeftCSSVar}) )` : col.computedPinned === "end" ? (
|
|
6909
6991
|
// see #startcoloffsets-pinnedend
|
|
6910
6992
|
`calc( var(${pinnedEndOffsetCSSVar}) ${prevPinnedEndCols.length ? "+" : ""} ${prevPinnedEndCols.map(
|
|
6911
|
-
(c) =>
|
|
6993
|
+
(c) => InternalVarUtils.columnWidths.get(c.computedVisibleIndex)
|
|
6912
6994
|
).join(" + ")} + var(${scrollLeftCSSVar}) )`
|
|
6913
6995
|
) : `${col.computedOffset}px`;
|
|
6914
6996
|
const zIndexValue = getColumnZIndex(col, {
|
|
@@ -6933,12 +7015,12 @@ function useDOMProps(initialDOMProps) {
|
|
|
6933
7015
|
}).join(" + ")})`;
|
|
6934
7016
|
cssVars[publicRuntimeVars.visibleColumnsCount.name] = computedVisibleColumns.length;
|
|
6935
7017
|
if (activeCellIndex != null) {
|
|
6936
|
-
cssVars[activeCellColWidth] =
|
|
7018
|
+
cssVars[activeCellColWidth] = InternalVarUtils.columnWidths.get(
|
|
6937
7019
|
activeCellIndex[1]
|
|
6938
|
-
)
|
|
6939
|
-
const defaultActiveCellColOffset =
|
|
7020
|
+
);
|
|
7021
|
+
const defaultActiveCellColOffset = InternalVarUtils.columnOffsets.get(
|
|
6940
7022
|
activeCellIndex[1]
|
|
6941
|
-
)
|
|
7023
|
+
);
|
|
6942
7024
|
if (state.brain.isHorizontalLayoutBrain) {
|
|
6943
7025
|
const pageIndex = state.brain.getPageIndexForRow(activeCellIndex[0]);
|
|
6944
7026
|
cssVars[activeCellColOffset] = pageIndex ? `calc( ${ThemeVars.runtime.totalVisibleColumnsWidthVar} * ${pageIndex} + ${defaultActiveCellColOffset})` : defaultActiveCellColOffset;
|
|
@@ -6949,8 +7031,8 @@ function useDOMProps(initialDOMProps) {
|
|
|
6949
7031
|
cssVars[computedVisibleColumnsCountCSSVar] = computedVisibleColumns.length;
|
|
6950
7032
|
cssVars[scrollbarWidthHorizontal] = scrollbars.horizontal ? `${scrollbarWidth2}px` : "0px";
|
|
6951
7033
|
cssVars[scrollbarWidthVertical] = scrollbars.vertical ? `${scrollbarWidth2}px` : "0px";
|
|
6952
|
-
cssVars[pinnedStartWidthCSSVar] = `calc( ` + computedPinnedStartColumns.map((c) =>
|
|
6953
|
-
cssVars[pinnedEndWidthCSSVar] = `calc( ` + computedPinnedEndColumns.map((c) =>
|
|
7034
|
+
cssVars[pinnedStartWidthCSSVar] = `calc( ` + computedPinnedStartColumns.map((c) => InternalVarUtils.columnWidths.get(c.computedVisibleIndex)).join(" + ") + ")";
|
|
7035
|
+
cssVars[pinnedEndWidthCSSVar] = `calc( ` + computedPinnedEndColumns.map((c) => InternalVarUtils.columnWidths.get(c.computedVisibleIndex)).join(" + ") + ")";
|
|
6954
7036
|
cssVars[baseZIndexForCells] = computedVisibleColumns.length * 10;
|
|
6955
7037
|
cssVars[pinnedEndOffsetCSSVar] = `calc( var(${bodyWidthCSSVar}) - var(${pinnedEndWidthCSSVar}) - var(${scrollbarWidthVertical}) )`;
|
|
6956
7038
|
cssVars[bodyWidthCSSVar] = `${bodySize.width}px`;
|
|
@@ -7008,6 +7090,7 @@ function useDOMProps(initialDOMProps) {
|
|
|
7008
7090
|
const className = join(
|
|
7009
7091
|
InfiniteTableClassName,
|
|
7010
7092
|
InfiniteCls,
|
|
7093
|
+
wrapRowsHorizontally ? `${InfiniteTableClassName}--horizontal-layout` : null,
|
|
7011
7094
|
domProps?.className,
|
|
7012
7095
|
computedPinnedStartColumnsWidth ? `${InfiniteTableClassName}--has-pinned-start ${InfiniteClsHasPinnedStart}` : null,
|
|
7013
7096
|
computedPinnedEndColumnsWidth ? `${InfiniteTableClassName}--has-pinned-end ${InfiniteClsHasPinnedEnd}` : null,
|
|
@@ -7018,6 +7101,7 @@ function useDOMProps(initialDOMProps) {
|
|
|
7018
7101
|
computed.computedPinnedStartOverflow ? `${InfiniteTableClassName}--has-pinned-start-overflow` : null,
|
|
7019
7102
|
computed.computedPinnedEndOverflow ? `${InfiniteTableClassName}--has-pinned-end-overflow` : null,
|
|
7020
7103
|
InfiniteClsRecipe({
|
|
7104
|
+
horizontalLayout: !!wrapRowsHorizontally,
|
|
7021
7105
|
hasPinnedStart: !!computedPinnedStartColumnsWidth,
|
|
7022
7106
|
hasPinnedEnd: !!computedPinnedEndColumnsWidth,
|
|
7023
7107
|
// hasPinnedStartOverflow: !!computed.computedPinnedStartOverflow,
|
|
@@ -7047,6 +7131,68 @@ function useDOMProps(initialDOMProps) {
|
|
|
7047
7131
|
// src/components/InfiniteTable/hooks/reorderColumnsOnDrag.ts
|
|
7048
7132
|
var import_binary_search2 = __toESM(require_binary_search());
|
|
7049
7133
|
|
|
7134
|
+
// src/components/InfiniteTable/utils/CSSCalc.ts
|
|
7135
|
+
function mapToContinuation(args) {
|
|
7136
|
+
return args.map(
|
|
7137
|
+
(arg) => arg instanceof CssContinuation ? arg : new CssContinuation(null, [arg])
|
|
7138
|
+
);
|
|
7139
|
+
}
|
|
7140
|
+
var CssContinuation = class {
|
|
7141
|
+
constructor(operation, operands = []) {
|
|
7142
|
+
this.__operands = [];
|
|
7143
|
+
this.__operation = null;
|
|
7144
|
+
this.__operands = operands;
|
|
7145
|
+
this.__operation = operation;
|
|
7146
|
+
}
|
|
7147
|
+
add(...args) {
|
|
7148
|
+
return new CssContinuation("+", [this, ...args]);
|
|
7149
|
+
}
|
|
7150
|
+
subtract(...args) {
|
|
7151
|
+
return new CssContinuation("-", [this, ...args]);
|
|
7152
|
+
}
|
|
7153
|
+
minus(...args) {
|
|
7154
|
+
return this.subtract(...args);
|
|
7155
|
+
}
|
|
7156
|
+
multiply(...args) {
|
|
7157
|
+
return new CssContinuation("*", [this, ...args]);
|
|
7158
|
+
}
|
|
7159
|
+
divide(...args) {
|
|
7160
|
+
return new CssContinuation("/", [this, ...args]);
|
|
7161
|
+
}
|
|
7162
|
+
__get(parent) {
|
|
7163
|
+
const { __operation, __operands } = this;
|
|
7164
|
+
const result = __operands.map((operand) => operandToString(operand, this)).join(` ${__operation} `);
|
|
7165
|
+
const skipParens = __operands.length <= 1 ? true : parent?.__operation === "+" || parent?.__operation === "-";
|
|
7166
|
+
return skipParens ? result : `(${result})`;
|
|
7167
|
+
}
|
|
7168
|
+
done() {
|
|
7169
|
+
const str = this.__get();
|
|
7170
|
+
const hasParens = str.startsWith("(") && str.endsWith(")");
|
|
7171
|
+
const value = hasParens ? str : `(${str})`;
|
|
7172
|
+
return `calc${value}`;
|
|
7173
|
+
}
|
|
7174
|
+
};
|
|
7175
|
+
function operandToString(operand, parent) {
|
|
7176
|
+
if (typeof operand === "string" || typeof operand === "number") {
|
|
7177
|
+
return `${operand}`;
|
|
7178
|
+
}
|
|
7179
|
+
if (!parent) {
|
|
7180
|
+
return operand.done();
|
|
7181
|
+
}
|
|
7182
|
+
return operand.__get(parent);
|
|
7183
|
+
}
|
|
7184
|
+
var add = (...args) => new CssContinuation("+", mapToContinuation(args));
|
|
7185
|
+
var subtract = (...args) => new CssContinuation("-", mapToContinuation(args));
|
|
7186
|
+
var multiply = (...args) => new CssContinuation("*", mapToContinuation(args));
|
|
7187
|
+
var divide = (...args) => new CssContinuation("/", mapToContinuation(args));
|
|
7188
|
+
var CSSCalc = {
|
|
7189
|
+
add,
|
|
7190
|
+
subtract,
|
|
7191
|
+
minus: subtract,
|
|
7192
|
+
multiply,
|
|
7193
|
+
divide
|
|
7194
|
+
};
|
|
7195
|
+
|
|
7050
7196
|
// src/components/InfiniteTable/utils/moveXatY.ts
|
|
7051
7197
|
var moveXatY = (arr, dragIndex, dropIndex) => {
|
|
7052
7198
|
arr = [...arr];
|
|
@@ -7147,8 +7293,6 @@ var PROXY_OFFSET = 10;
|
|
|
7147
7293
|
var pinnedStartWidthCSSVar2 = stripVar(InternalVars.pinnedStartWidth);
|
|
7148
7294
|
function reorderColumnsOnDrag(params) {
|
|
7149
7295
|
const {
|
|
7150
|
-
columnOffsetAtIndexCSSVar,
|
|
7151
|
-
columnWidthAtIndexCSSVar,
|
|
7152
7296
|
computedVisibleColumns,
|
|
7153
7297
|
computedVisibleColumnsMap,
|
|
7154
7298
|
computedPinnedEndColumns,
|
|
@@ -7160,7 +7304,9 @@ function reorderColumnsOnDrag(params) {
|
|
|
7160
7304
|
draggableColumnsRestrictTo,
|
|
7161
7305
|
tableRect,
|
|
7162
7306
|
setProxyPosition,
|
|
7163
|
-
api: imperativeApi
|
|
7307
|
+
api: imperativeApi,
|
|
7308
|
+
horizontalLayoutPageIndex,
|
|
7309
|
+
pageWidth
|
|
7164
7310
|
} = params;
|
|
7165
7311
|
function getCurrentPinnedWidth(pinned) {
|
|
7166
7312
|
let currentWidth = pinned === "start" ? pinnedStartInitialWidth : pinnedEndInitialWidth;
|
|
@@ -7176,27 +7322,32 @@ function reorderColumnsOnDrag(params) {
|
|
|
7176
7322
|
return currentWidth;
|
|
7177
7323
|
}
|
|
7178
7324
|
function isColumnVisible2(b) {
|
|
7179
|
-
if (b.
|
|
7325
|
+
if (b.columnIndex === dragColumnIndex) {
|
|
7326
|
+
return true;
|
|
7327
|
+
}
|
|
7328
|
+
if (horizontalLayoutPageIndex != null) {
|
|
7180
7329
|
return true;
|
|
7181
7330
|
}
|
|
7182
|
-
const col = computedVisibleColumns[b.
|
|
7331
|
+
const col = computedVisibleColumns[b.columnIndex];
|
|
7183
7332
|
if (col.computedPinned) {
|
|
7184
7333
|
return true;
|
|
7185
7334
|
}
|
|
7186
7335
|
const scrollLeft2 = brain.getScrollPosition().scrollLeft;
|
|
7187
|
-
|
|
7336
|
+
const colOffset = col.computedOffset + (horizontalLayoutPageIndex != null && pageWidth != null ? pageWidth * horizontalLayoutPageIndex : 0);
|
|
7337
|
+
const visible = colOffset >= scrollLeft2 + getCurrentPinnedWidth("start") && colOffset + col.computedWidth <= scrollLeft2 + tableRect.width - getCurrentPinnedWidth("end");
|
|
7338
|
+
return visible;
|
|
7188
7339
|
}
|
|
7189
7340
|
const getBreakPoints = (columns, options) => {
|
|
7190
7341
|
const { restrictToParentGroup, dragColumn: dragColumn2 } = options;
|
|
7191
7342
|
let breakpoints = [];
|
|
7192
7343
|
columns.forEach((c) => {
|
|
7344
|
+
if (c.computedVisibleIndex === dragColumnIndex) {
|
|
7345
|
+
return;
|
|
7346
|
+
}
|
|
7193
7347
|
const b = {
|
|
7194
7348
|
columnId: c.id,
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
// tableRect.left +
|
|
7198
|
-
c.computedOffset + Math.round(c.computedWidth / 2)
|
|
7199
|
-
)
|
|
7349
|
+
columnIndex: c.computedVisibleIndex,
|
|
7350
|
+
offsetX: c.computedOffset + Math.round(c.computedWidth / 2)
|
|
7200
7351
|
};
|
|
7201
7352
|
if (isColumnVisible2(b)) {
|
|
7202
7353
|
breakpoints.push(b);
|
|
@@ -7308,7 +7459,7 @@ function reorderColumnsOnDrag(params) {
|
|
|
7308
7459
|
}
|
|
7309
7460
|
}
|
|
7310
7461
|
function updateDropIndex(newDropIndex) {
|
|
7311
|
-
if (newDropIndex === currentDropIndex) {
|
|
7462
|
+
if (newDropIndex == null || newDropIndex === currentDropIndex) {
|
|
7312
7463
|
return;
|
|
7313
7464
|
}
|
|
7314
7465
|
currentDropIndex = newDropIndex;
|
|
@@ -7350,23 +7501,32 @@ function reorderColumnsOnDrag(params) {
|
|
|
7350
7501
|
newPosition = isDragColumn ? (
|
|
7351
7502
|
// this is the column we're dragging to the left
|
|
7352
7503
|
// so we place it exactly at the offset of the currentDropIndex
|
|
7353
|
-
|
|
7504
|
+
InternalVarUtils.columnOffsets.get(currentDropIndex)
|
|
7354
7505
|
) : isOutsideCol ? (
|
|
7355
7506
|
// this col should have the initial pos, so we're good
|
|
7356
|
-
|
|
7507
|
+
InternalVarUtils.columnOffsets.get(colIndex)
|
|
7357
7508
|
) : (
|
|
7358
7509
|
// place it at the default offset + the width of the drag column
|
|
7359
7510
|
// as these are columns situated between the dragindex and the dropindex
|
|
7360
|
-
|
|
7511
|
+
CSSCalc.add(
|
|
7512
|
+
InternalVarUtils.columnOffsets.get(colIndex),
|
|
7513
|
+
InternalVarUtils.columnWidths.get(dragColumnIndex)
|
|
7514
|
+
).done()
|
|
7361
7515
|
);
|
|
7362
7516
|
} else {
|
|
7363
7517
|
newPosition = isOutsideCol ? (
|
|
7364
7518
|
// this is the default value for a column
|
|
7365
|
-
|
|
7519
|
+
InternalVarUtils.columnOffsets.get(colIndex)
|
|
7366
7520
|
) : isDragColumn ? (
|
|
7367
7521
|
// this is the column we're dragging to the right
|
|
7368
|
-
|
|
7369
|
-
|
|
7522
|
+
CSSCalc.add(
|
|
7523
|
+
InternalVarUtils.columnOffsets.get(currentDropIndex - 1),
|
|
7524
|
+
InternalVarUtils.columnWidths.get(currentDropIndex - 1)
|
|
7525
|
+
).minus(InternalVarUtils.columnWidths.get(dragColumnIndex)).done()
|
|
7526
|
+
) : CSSCalc.minus(
|
|
7527
|
+
InternalVarUtils.columnOffsets.get(colIndex),
|
|
7528
|
+
InternalVarUtils.columnWidths.get(dragColumnIndex)
|
|
7529
|
+
).done();
|
|
7370
7530
|
}
|
|
7371
7531
|
setInfiniteColumnOffsetWhileReordering(
|
|
7372
7532
|
colIndex,
|
|
@@ -7406,20 +7566,25 @@ function reorderColumnsOnDrag(params) {
|
|
|
7406
7566
|
let idx = (0, import_binary_search2.default)(
|
|
7407
7567
|
breakpoints,
|
|
7408
7568
|
currentPos,
|
|
7409
|
-
({
|
|
7410
|
-
return
|
|
7569
|
+
({ offsetX }, value) => {
|
|
7570
|
+
return offsetX < value ? -1 : offsetX > value ? 1 : 0;
|
|
7411
7571
|
}
|
|
7412
7572
|
);
|
|
7413
7573
|
if (idx < 0) {
|
|
7414
7574
|
idx = ~idx;
|
|
7415
7575
|
}
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
idx = dragColumnIndex;
|
|
7576
|
+
if (!breakpoints.length) {
|
|
7577
|
+
if (computedVisibleColumns.length > 1) {
|
|
7578
|
+
console.error("No breakpoints available, something is wrong!");
|
|
7420
7579
|
}
|
|
7421
|
-
|
|
7580
|
+
idx = 0;
|
|
7581
|
+
} else {
|
|
7582
|
+
idx = breakpoints[idx] ? breakpoints[idx].columnIndex : breakpoints[breakpoints.length - 1].columnIndex + 1;
|
|
7422
7583
|
}
|
|
7584
|
+
if (idx === dragColumnIndex + 1) {
|
|
7585
|
+
idx = dragColumnIndex;
|
|
7586
|
+
}
|
|
7587
|
+
updateDropIndex(idx);
|
|
7423
7588
|
const columnPinning = {};
|
|
7424
7589
|
computedPinnedEndColumns.forEach((col) => {
|
|
7425
7590
|
columnPinning[col.id] = "end";
|
|
@@ -7516,8 +7681,6 @@ function adjustColumnOrderForAllColumns(options) {
|
|
|
7516
7681
|
}
|
|
7517
7682
|
|
|
7518
7683
|
// src/components/InfiniteTable/hooks/useColumnPointerEvents.ts
|
|
7519
|
-
var columnOffsetAtIndex4 = stripVar(InternalVars.columnOffsetAtIndex);
|
|
7520
|
-
var columnWidthAtIndex3 = stripVar(InternalVars.columnWidthAtIndex);
|
|
7521
7684
|
var baseZIndexForCells2 = stripVar(InternalVars.baseZIndexForCells);
|
|
7522
7685
|
var equalPinning = (pinning1, pinning2) => {
|
|
7523
7686
|
const empty1 = !pinning1 || Object.keys(pinning1).length === 0;
|
|
@@ -7532,7 +7695,8 @@ var equalPinning = (pinning1, pinning2) => {
|
|
|
7532
7695
|
};
|
|
7533
7696
|
var useColumnPointerEvents = ({
|
|
7534
7697
|
columnId,
|
|
7535
|
-
domRef
|
|
7698
|
+
domRef,
|
|
7699
|
+
horizontalLayoutPageIndex
|
|
7536
7700
|
}) => {
|
|
7537
7701
|
const [proxyPosition, setProxyPosition] = useState7(null);
|
|
7538
7702
|
const {
|
|
@@ -7576,13 +7740,20 @@ var useColumnPointerEvents = ({
|
|
|
7576
7740
|
const tableRect = rootRef.current.getBoundingClientRect();
|
|
7577
7741
|
const initialAvailableSize = brain.getAvailableSize();
|
|
7578
7742
|
const dragColumnIndex = dragColumn.computedVisibleIndex;
|
|
7743
|
+
const dragColumnIndexInHorizontalLayout = brain.getVirtualColIndex(
|
|
7744
|
+
dragColumn.computedVisibleIndex,
|
|
7745
|
+
{
|
|
7746
|
+
pageIndex: horizontalLayoutPageIndex || 0
|
|
7747
|
+
}
|
|
7748
|
+
);
|
|
7749
|
+
const pageWidth = brain.isHorizontalLayoutBrain ? brain.getPageWidth() : null;
|
|
7579
7750
|
let initialCursor = target.style.cursor ?? "auto";
|
|
7580
7751
|
let didDragAtLeastOnce = false;
|
|
7581
7752
|
const dragger = reorderColumnsOnDrag({
|
|
7582
7753
|
brain,
|
|
7754
|
+
horizontalLayoutPageIndex,
|
|
7755
|
+
pageWidth,
|
|
7583
7756
|
draggableColumnsRestrictTo,
|
|
7584
|
-
columnOffsetAtIndexCSSVar: columnOffsetAtIndex4,
|
|
7585
|
-
columnWidthAtIndexCSSVar: columnWidthAtIndex3,
|
|
7586
7757
|
computedPinnedEndColumns,
|
|
7587
7758
|
computedPinnedStartColumns,
|
|
7588
7759
|
computedUnpinnedColumns,
|
|
@@ -7600,6 +7771,8 @@ var useColumnPointerEvents = ({
|
|
|
7600
7771
|
}
|
|
7601
7772
|
});
|
|
7602
7773
|
let reorderDragResult = null;
|
|
7774
|
+
let discardAlwaysRenderedColumn;
|
|
7775
|
+
let restoreRenderRange;
|
|
7603
7776
|
function persistColumnOrder(reorderDragResult2) {
|
|
7604
7777
|
const { columnPinning, columnOrder } = reorderDragResult2;
|
|
7605
7778
|
if (!equalPinning(getState().columnPinning, columnPinning)) {
|
|
@@ -7628,15 +7801,37 @@ var useColumnPointerEvents = ({
|
|
|
7628
7801
|
const { headerBrain, brain: brain2 } = getState();
|
|
7629
7802
|
if (!didDragAtLeastOnce) {
|
|
7630
7803
|
didDragAtLeastOnce = true;
|
|
7631
|
-
brain2.
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7804
|
+
const discardForBody = brain2.keepColumnRendered(
|
|
7805
|
+
dragColumnIndexInHorizontalLayout
|
|
7806
|
+
);
|
|
7807
|
+
const discardForHeader = headerBrain.keepColumnRendered(
|
|
7808
|
+
dragColumnIndexInHorizontalLayout
|
|
7809
|
+
);
|
|
7810
|
+
if (brain2.isHorizontalLayoutBrain) {
|
|
7811
|
+
const extendBy = true;
|
|
7812
|
+
const restoreBodyRange = brain2.extendRenderRange({
|
|
7813
|
+
start: extendBy,
|
|
7814
|
+
end: extendBy,
|
|
7815
|
+
direction: "horizontal"
|
|
7816
|
+
});
|
|
7817
|
+
const restoreHeaderRange = headerBrain.extendRenderRange({
|
|
7818
|
+
start: extendBy,
|
|
7819
|
+
end: extendBy,
|
|
7820
|
+
direction: "horizontal"
|
|
7821
|
+
});
|
|
7822
|
+
restoreRenderRange = () => {
|
|
7823
|
+
restoreBodyRange();
|
|
7824
|
+
restoreHeaderRange();
|
|
7825
|
+
};
|
|
7826
|
+
}
|
|
7827
|
+
discardAlwaysRenderedColumn = () => {
|
|
7828
|
+
discardForBody();
|
|
7829
|
+
discardForHeader();
|
|
7830
|
+
};
|
|
7639
7831
|
actions.columnReorderDragColumnId = dragColumn.id;
|
|
7832
|
+
if (horizontalLayoutPageIndex != null) {
|
|
7833
|
+
actions.columnReorderInPageIndex = horizontalLayoutPageIndex;
|
|
7834
|
+
}
|
|
7640
7835
|
setInfiniteColumnZIndex(
|
|
7641
7836
|
dragColumnIndex,
|
|
7642
7837
|
`calc( var(${baseZIndexForCells2}) + 10000 )`,
|
|
@@ -7655,6 +7850,8 @@ var useColumnPointerEvents = ({
|
|
|
7655
7850
|
brain.update({
|
|
7656
7851
|
...initialAvailableSize
|
|
7657
7852
|
});
|
|
7853
|
+
discardAlwaysRenderedColumn?.();
|
|
7854
|
+
restoreRenderRange?.();
|
|
7658
7855
|
computedVisibleColumns.forEach((col) => {
|
|
7659
7856
|
clearInfiniteColumnReorderDuration(
|
|
7660
7857
|
col.computedVisibleIndex,
|
|
@@ -7689,12 +7886,15 @@ var useColumnPointerEvents = ({
|
|
|
7689
7886
|
persistColumnOrder(reorderDragResult);
|
|
7690
7887
|
}
|
|
7691
7888
|
actions.columnReorderDragColumnId = false;
|
|
7889
|
+
if (horizontalLayoutPageIndex != null) {
|
|
7890
|
+
actions.columnReorderInPageIndex = null;
|
|
7891
|
+
}
|
|
7692
7892
|
};
|
|
7693
7893
|
target.addEventListener("pointermove", onPointerMove);
|
|
7694
7894
|
target.addEventListener("pointerup", onPointerUp);
|
|
7695
7895
|
target.setPointerCapture(e.pointerId);
|
|
7696
7896
|
},
|
|
7697
|
-
[columnId]
|
|
7897
|
+
[columnId, horizontalLayoutPageIndex]
|
|
7698
7898
|
);
|
|
7699
7899
|
return {
|
|
7700
7900
|
onPointerDown: computed.computedVisibleColumnsMap.get(columnId)?.computedDraggable ? onPointerDown : defaultPointerDown,
|
|
@@ -8004,7 +8204,7 @@ function objectValuesExcept(obj, exceptList) {
|
|
|
8004
8204
|
|
|
8005
8205
|
// src/components/InfiniteTable/components/cell.css.ts
|
|
8006
8206
|
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";
|
|
8007
|
-
var ColumnCellRecipe = createRuntimeFn({ defaultClassName: "cell_ColumnCellRecipe__1eexc2am", variantClassNames: { dragging: { false: "cell_ColumnCellRecipe_dragging_false__1eexc2an", true: "cell_ColumnCellRecipe_dragging_true__1eexc2ao" }, cellSelected: { false: "
|
|
8207
|
+
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"]] });
|
|
8008
8208
|
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: [] });
|
|
8009
8209
|
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: [] });
|
|
8010
8210
|
var SelectionCheckboxCls = "cell_SelectionCheckboxCls__1eexc2a7";
|
|
@@ -8397,7 +8597,7 @@ import * as React34 from "react";
|
|
|
8397
8597
|
var { rootClassName: rootClassName5 } = internalProps;
|
|
8398
8598
|
var InfiniteTableCellClassName = `${rootClassName5}Cell`;
|
|
8399
8599
|
var InfiniteTableCellContentClassName = `${rootClassName5}Cell_content`;
|
|
8400
|
-
var
|
|
8600
|
+
var columnWidthAtIndex3 = stripVar(InternalVars.columnWidthAtIndex);
|
|
8401
8601
|
var columnReorderEffectDurationAtIndex2 = stripVar(
|
|
8402
8602
|
InternalVars.columnReorderEffectDurationAtIndex
|
|
8403
8603
|
);
|
|
@@ -8422,7 +8622,7 @@ function InfiniteTableCellFn(props) {
|
|
|
8422
8622
|
} = props;
|
|
8423
8623
|
const children = renderChildren();
|
|
8424
8624
|
const style2 = {
|
|
8425
|
-
width: `var(${
|
|
8625
|
+
width: `var(${columnWidthAtIndex3}-${column.computedVisibleIndex})`,
|
|
8426
8626
|
transition: `transform var(${columnReorderEffectDurationAtIndex2}-${column.computedVisibleIndex}, 0s)`,
|
|
8427
8627
|
...domProps.style
|
|
8428
8628
|
};
|
|
@@ -8612,7 +8812,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8612
8812
|
api: dataSourceApi,
|
|
8613
8813
|
componentActions: dataSourceActions
|
|
8614
8814
|
} = useDataSourceContextValue();
|
|
8615
|
-
const { activeRowIndex, keyboardNavigation } = getState();
|
|
8815
|
+
const { activeRowIndex, keyboardNavigation, columnReorderInPageIndex } = getState();
|
|
8616
8816
|
const rowActive = rowIndex === activeRowIndex && keyboardNavigation === "row";
|
|
8617
8817
|
const renderingContext = {
|
|
8618
8818
|
getState,
|
|
@@ -8936,6 +9136,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8936
9136
|
right: rightSelectionBorder,
|
|
8937
9137
|
bottom: bottomSelectionBorder
|
|
8938
9138
|
} : null;
|
|
9139
|
+
const insideDisabledDraggingPage = columnReorderInPageIndex != null ? horizontalLayoutPageIndex !== columnReorderInPageIndex : false;
|
|
8939
9140
|
const afterChildren = editor;
|
|
8940
9141
|
const theChildren = renderChildren();
|
|
8941
9142
|
const cellProps = {
|
|
@@ -8960,6 +9161,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8960
9161
|
ColumnCellRecipe,
|
|
8961
9162
|
{
|
|
8962
9163
|
dragging: false,
|
|
9164
|
+
insideDisabledDraggingPage,
|
|
8963
9165
|
zebra,
|
|
8964
9166
|
align: align2,
|
|
8965
9167
|
verticalAlign,
|
|
@@ -9223,7 +9425,7 @@ function getColumnResizer(colIndex, {
|
|
|
9223
9425
|
const column = columns[colIndex];
|
|
9224
9426
|
return {
|
|
9225
9427
|
resize(diff) {
|
|
9226
|
-
|
|
9428
|
+
InternalVarUtils.columnWidths.set(
|
|
9227
9429
|
colIndex,
|
|
9228
9430
|
column.computedWidth + diff,
|
|
9229
9431
|
domRef.current
|
|
@@ -9234,7 +9436,7 @@ function getColumnResizer(colIndex, {
|
|
|
9234
9436
|
if (!nextColumn) {
|
|
9235
9437
|
return;
|
|
9236
9438
|
}
|
|
9237
|
-
|
|
9439
|
+
InternalVarUtils.columnWidths.set(
|
|
9238
9440
|
nextColIndex,
|
|
9239
9441
|
nextColumn.computedWidth - diff,
|
|
9240
9442
|
domRef.current
|
|
@@ -9242,7 +9444,7 @@ function getColumnResizer(colIndex, {
|
|
|
9242
9444
|
if (nextColumn.computedPinned === "start") {
|
|
9243
9445
|
addToInfiniteColumnOffset(nextColumn, diff, domRef.current);
|
|
9244
9446
|
} else {
|
|
9245
|
-
|
|
9447
|
+
InternalVarUtils.columnOffsets.set(
|
|
9246
9448
|
nextColIndex,
|
|
9247
9449
|
nextColumn.computedOffset + diff,
|
|
9248
9450
|
domRef.current
|
|
@@ -9263,7 +9465,11 @@ function getColumnResizer(colIndex, {
|
|
|
9263
9465
|
if (col.computedPinned === "end") {
|
|
9264
9466
|
continue;
|
|
9265
9467
|
}
|
|
9266
|
-
|
|
9468
|
+
InternalVarUtils.columnOffsets.set(
|
|
9469
|
+
i,
|
|
9470
|
+
col.computedOffset + diff,
|
|
9471
|
+
domRef.current
|
|
9472
|
+
);
|
|
9267
9473
|
}
|
|
9268
9474
|
return;
|
|
9269
9475
|
}
|
|
@@ -9272,7 +9478,11 @@ function getColumnResizer(colIndex, {
|
|
|
9272
9478
|
if (col.computedPinned) {
|
|
9273
9479
|
continue;
|
|
9274
9480
|
}
|
|
9275
|
-
|
|
9481
|
+
InternalVarUtils.columnOffsets.set(
|
|
9482
|
+
i,
|
|
9483
|
+
col.computedOffset + diff,
|
|
9484
|
+
domRef.current
|
|
9485
|
+
);
|
|
9276
9486
|
}
|
|
9277
9487
|
}
|
|
9278
9488
|
};
|
|
@@ -9300,12 +9510,12 @@ function getColumnGroupResizer(colIndexes, config) {
|
|
|
9300
9510
|
const colIndex = colIndexes[i];
|
|
9301
9511
|
const column = columns[colIndex];
|
|
9302
9512
|
const newWidth = column.computedWidth + diff;
|
|
9303
|
-
|
|
9513
|
+
InternalVarUtils.columnWidths.set(colIndex, newWidth, node);
|
|
9304
9514
|
if (column.computedPinned === "end") {
|
|
9305
9515
|
return;
|
|
9306
9516
|
}
|
|
9307
9517
|
if (offset) {
|
|
9308
|
-
|
|
9518
|
+
InternalVarUtils.columnOffsets.set(colIndex, offset, node);
|
|
9309
9519
|
}
|
|
9310
9520
|
offset += newWidth;
|
|
9311
9521
|
});
|
|
@@ -9317,7 +9527,11 @@ function getColumnGroupResizer(colIndexes, config) {
|
|
|
9317
9527
|
if (col.computedPinned === "end") {
|
|
9318
9528
|
continue;
|
|
9319
9529
|
}
|
|
9320
|
-
|
|
9530
|
+
InternalVarUtils.columnOffsets.set(
|
|
9531
|
+
i,
|
|
9532
|
+
col.computedOffset + diffSum,
|
|
9533
|
+
node
|
|
9534
|
+
);
|
|
9321
9535
|
}
|
|
9322
9536
|
}
|
|
9323
9537
|
};
|
|
@@ -9357,12 +9571,14 @@ function ResizeHandleFn(props) {
|
|
|
9357
9571
|
const target = e.target;
|
|
9358
9572
|
if (brain.isHorizontalLayoutBrain) {
|
|
9359
9573
|
const restoreBodyRange = brain.extendRenderRange({
|
|
9360
|
-
|
|
9361
|
-
|
|
9574
|
+
start: true,
|
|
9575
|
+
end: true,
|
|
9576
|
+
direction: "horizontal"
|
|
9362
9577
|
});
|
|
9363
9578
|
const restoreHeaderRange = headerBrain.extendRenderRange({
|
|
9364
|
-
|
|
9365
|
-
|
|
9579
|
+
start: true,
|
|
9580
|
+
end: true,
|
|
9581
|
+
direction: "horizontal"
|
|
9366
9582
|
});
|
|
9367
9583
|
restoreRenderRange = () => {
|
|
9368
9584
|
restoreBodyRange();
|
|
@@ -9572,7 +9788,8 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9572
9788
|
portalDOMRef,
|
|
9573
9789
|
columnHeaderHeight,
|
|
9574
9790
|
columnReorderDragColumnId,
|
|
9575
|
-
columnMenuVisibleForColumnId
|
|
9791
|
+
columnMenuVisibleForColumnId,
|
|
9792
|
+
columnReorderInPageIndex
|
|
9576
9793
|
},
|
|
9577
9794
|
getDataSourceMasterContext
|
|
9578
9795
|
} = useInfiniteTable();
|
|
@@ -9583,7 +9800,9 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9583
9800
|
componentState: { filterDelay, filterTypes }
|
|
9584
9801
|
} = useDataSourceContextValue();
|
|
9585
9802
|
const { allRowsSelected, someRowsSelected, selectionMode } = useDataSourceState();
|
|
9803
|
+
const horizontalLayoutPageIndex = props.horizontalLayoutPageIndex;
|
|
9586
9804
|
const dragging = columnReorderDragColumnId === column.id;
|
|
9805
|
+
const insideDisabledDraggingPage = columnReorderInPageIndex != null ? horizontalLayoutPageIndex !== columnReorderInPageIndex : false;
|
|
9587
9806
|
const { onResize, height, width, headerOptions, columnsMap } = props;
|
|
9588
9807
|
const sortInfo = column.computedSortInfo;
|
|
9589
9808
|
const header = column.header;
|
|
@@ -9648,7 +9867,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9648
9867
|
const MenuIconCmp = column.components?.MenuIcon || components2?.MenuIcon || MenuIcon;
|
|
9649
9868
|
const menuIcon = /* @__PURE__ */ React42.createElement(MenuIconCmp, { ...menuIconProps });
|
|
9650
9869
|
const initialRenderParam = {
|
|
9651
|
-
horizontalLayoutPageIndex
|
|
9870
|
+
horizontalLayoutPageIndex,
|
|
9652
9871
|
dragging,
|
|
9653
9872
|
domRef: ref,
|
|
9654
9873
|
insideColumnMenu: false,
|
|
@@ -9812,7 +10031,8 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9812
10031
|
const headerClassName = typeof column.headerClassName === "function" ? column.headerClassName(renderParam) : column.headerClassName;
|
|
9813
10032
|
const { onPointerDown, proxyPosition } = useColumnPointerEvents({
|
|
9814
10033
|
columnId: column.id,
|
|
9815
|
-
domRef
|
|
10034
|
+
domRef,
|
|
10035
|
+
horizontalLayoutPageIndex
|
|
9816
10036
|
});
|
|
9817
10037
|
let draggingProxy = null;
|
|
9818
10038
|
if (dragging && proxyPosition) {
|
|
@@ -9856,7 +10076,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9856
10076
|
const FilterEditor = operator?.components?.FilterEditor || filterType?.components?.FilterEditor || column.components?.FilterEditor || StringFilterEditor;
|
|
9857
10077
|
const FilterOperatorSwitch = filterType?.components?.FilterOperatorSwitch || column.components?.FilterOperatorSwitch;
|
|
9858
10078
|
const resizeHandle = useColumnResizeHandle(column, {
|
|
9859
|
-
horizontalLayoutPageIndex
|
|
10079
|
+
horizontalLayoutPageIndex
|
|
9860
10080
|
});
|
|
9861
10081
|
const zIndex2 = `var(${columnZIndexAtIndex5}-${column.computedVisibleIndex})`;
|
|
9862
10082
|
style2.zIndex = zIndex2;
|
|
@@ -9896,6 +10116,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9896
10116
|
HeaderCellRecipe,
|
|
9897
10117
|
{
|
|
9898
10118
|
dragging,
|
|
10119
|
+
insideDisabledDraggingPage,
|
|
9899
10120
|
align: align2,
|
|
9900
10121
|
verticalAlign,
|
|
9901
10122
|
rowSelected: false,
|
|
@@ -9916,7 +10137,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9916
10137
|
afterChildren: /* @__PURE__ */ React42.createElement(React42.Fragment, null, showColumnFilters ? column.computedFilterable ? /* @__PURE__ */ React42.createElement(
|
|
9917
10138
|
InfiniteTableColumnHeaderFilter,
|
|
9918
10139
|
{
|
|
9919
|
-
horizontalLayoutPageIndex
|
|
10140
|
+
horizontalLayoutPageIndex,
|
|
9920
10141
|
filterEditor: FilterEditor,
|
|
9921
10142
|
filterOperatorSwitch: FilterOperatorSwitch ?? InfiniteTableFilterOperatorSwitch,
|
|
9922
10143
|
operator,
|
|
@@ -10234,7 +10455,7 @@ function useColumnGroupResizeHandle(groupColumns, config) {
|
|
|
10234
10455
|
|
|
10235
10456
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
|
|
10236
10457
|
var TableHeaderGroupClassName = `${rootClassName2}HeaderGroup`;
|
|
10237
|
-
var
|
|
10458
|
+
var columnWidthAtIndex4 = stripVar(InternalVars.columnWidthAtIndex);
|
|
10238
10459
|
var columnZIndexAtIndex6 = stripVar(InternalVars.columnZIndexAtIndex);
|
|
10239
10460
|
function InfiniteTableHeaderGroup(props) {
|
|
10240
10461
|
const { columnGroup, height, columns, bodyBrain, columnGroupsMaxDepth } = props;
|
|
@@ -10253,8 +10474,8 @@ function InfiniteTableHeaderGroup(props) {
|
|
|
10253
10474
|
});
|
|
10254
10475
|
const firstColumn = columns[0];
|
|
10255
10476
|
const width = columns.length > 1 ? `calc( ` + columns.map(
|
|
10256
|
-
(col) => `var(${
|
|
10257
|
-
).join(" + ") + " )" : `var(${
|
|
10477
|
+
(col) => `var(${columnWidthAtIndex4}-${col.computedVisibleIndex})`
|
|
10478
|
+
).join(" + ") + " )" : `var(${columnWidthAtIndex4}-${firstColumn.computedVisibleIndex})`;
|
|
10258
10479
|
const zIndex2 = `calc(var(${columnZIndexAtIndex6}-${firstColumn.computedVisibleIndex}) + ${columnGroupsMaxDepth - columnGroup.depth})`;
|
|
10259
10480
|
let style2 = typeof userStyle === "function" ? userStyle({
|
|
10260
10481
|
columnGroup,
|
|
@@ -17005,6 +17226,17 @@ var InfiniteTableApiImpl = class {
|
|
|
17005
17226
|
setColumnVisibility(columnVisibility) {
|
|
17006
17227
|
this.actions.columnVisibility = columnVisibility;
|
|
17007
17228
|
}
|
|
17229
|
+
get scrollContainer() {
|
|
17230
|
+
return this.getState().scrollerDOMRef.current;
|
|
17231
|
+
}
|
|
17232
|
+
get scrollLeftMax() {
|
|
17233
|
+
const scrollLeftMax = this.getState().brain.scrollLeftMax;
|
|
17234
|
+
return scrollLeftMax;
|
|
17235
|
+
}
|
|
17236
|
+
get scrollTopMax() {
|
|
17237
|
+
const scrollTopMax = this.getState().brain.scrollTopMax;
|
|
17238
|
+
return scrollTopMax;
|
|
17239
|
+
}
|
|
17008
17240
|
get scrollLeft() {
|
|
17009
17241
|
const state = this.getState();
|
|
17010
17242
|
return state.brain.getScrollPosition().scrollLeft;
|
|
@@ -18020,6 +18252,46 @@ var HorizontalLayoutMatrixBrain = class extends MatrixBrain {
|
|
|
18020
18252
|
});
|
|
18021
18253
|
}
|
|
18022
18254
|
}
|
|
18255
|
+
computeDirectionalRenderCount(direction, itemSize, count, theRenderSize) {
|
|
18256
|
+
if (direction === "vertical") {
|
|
18257
|
+
return super.computeDirectionalRenderCount(
|
|
18258
|
+
direction,
|
|
18259
|
+
itemSize,
|
|
18260
|
+
count,
|
|
18261
|
+
theRenderSize
|
|
18262
|
+
);
|
|
18263
|
+
}
|
|
18264
|
+
let renderCount = 0;
|
|
18265
|
+
let size = theRenderSize.width;
|
|
18266
|
+
size -= this.getFixedSize("horizontal");
|
|
18267
|
+
if (size <= 0) {
|
|
18268
|
+
return 0;
|
|
18269
|
+
}
|
|
18270
|
+
if (typeof itemSize === "number") {
|
|
18271
|
+
renderCount = (itemSize ? Math.ceil(size / itemSize) : 0) + 1;
|
|
18272
|
+
renderCount = Math.min(count, renderCount);
|
|
18273
|
+
return renderCount;
|
|
18274
|
+
}
|
|
18275
|
+
const pagesInView = Math.floor(size / this.pageWidth);
|
|
18276
|
+
renderCount += pagesInView * this.initialCols;
|
|
18277
|
+
const remainingSize = size - pagesInView * this.pageWidth;
|
|
18278
|
+
const sizes = [];
|
|
18279
|
+
for (let i = 0; i < this.initialCols; i++) {
|
|
18280
|
+
sizes.push(this.getItemSize(i, direction));
|
|
18281
|
+
}
|
|
18282
|
+
sizes.sort(SORT_ASC);
|
|
18283
|
+
let sum2 = 0;
|
|
18284
|
+
for (let i = 0; i < this.initialCols; i++) {
|
|
18285
|
+
sum2 += sizes[i];
|
|
18286
|
+
renderCount++;
|
|
18287
|
+
if (sum2 > remainingSize) {
|
|
18288
|
+
break;
|
|
18289
|
+
}
|
|
18290
|
+
}
|
|
18291
|
+
renderCount += 1;
|
|
18292
|
+
renderCount = Math.min(count, renderCount);
|
|
18293
|
+
return renderCount;
|
|
18294
|
+
}
|
|
18023
18295
|
getRowIndexInPage(rowIndex) {
|
|
18024
18296
|
return this.rowsPerPage ? rowIndex % this.rowsPerPage : rowIndex;
|
|
18025
18297
|
}
|
|
@@ -18166,6 +18438,9 @@ var HorizontalLayoutMatrixBrain = class extends MatrixBrain {
|
|
|
18166
18438
|
}
|
|
18167
18439
|
this._totalPageCount = value;
|
|
18168
18440
|
}
|
|
18441
|
+
getPageWidth() {
|
|
18442
|
+
return this.pageWidth;
|
|
18443
|
+
}
|
|
18169
18444
|
doUpdateRenderCount(which = ALL_DIRECTIONS) {
|
|
18170
18445
|
const rowHeight = this.getInitialRowHeight();
|
|
18171
18446
|
let pageWidth = 0;
|
|
@@ -18318,6 +18593,7 @@ function initSetupState2({
|
|
|
18318
18593
|
scrollLeft: 0
|
|
18319
18594
|
},
|
|
18320
18595
|
columnReorderDragColumnId: false,
|
|
18596
|
+
columnReorderInPageIndex: null,
|
|
18321
18597
|
ready: false,
|
|
18322
18598
|
focused: false,
|
|
18323
18599
|
focusedWithin: false,
|
|
@@ -19742,7 +20018,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
19742
20018
|
}
|
|
19743
20019
|
let valid2 = isValidLicense(licenseKey, {
|
|
19744
20020
|
publishedAt: 1624970570587,
|
|
19745
|
-
version: "5.
|
|
20021
|
+
version: "5.1.0-canary.1"
|
|
19746
20022
|
});
|
|
19747
20023
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
19748
20024
|
return true;
|
|
@@ -23404,17 +23680,17 @@ function HScrollSyncContent(props) {
|
|
|
23404
23680
|
}
|
|
23405
23681
|
|
|
23406
23682
|
// src/components/InfiniteTable/hooks/useVisibleColumnSizes.ts
|
|
23407
|
-
var
|
|
23408
|
-
var
|
|
23683
|
+
var columnWidthAtIndex5 = stripVar(InternalVars.columnWidthAtIndex);
|
|
23684
|
+
var columnOffsetAtIndex3 = stripVar(InternalVars.columnOffsetAtIndex);
|
|
23409
23685
|
function useVisibleColumnSizes() {
|
|
23410
23686
|
const context = useInfiniteTable();
|
|
23411
23687
|
return context.computed.computedVisibleColumns.map((column) => {
|
|
23412
23688
|
return {
|
|
23413
23689
|
id: column.id,
|
|
23414
23690
|
width: column.computedWidth,
|
|
23415
|
-
cssVarForWidth: `var(${
|
|
23691
|
+
cssVarForWidth: `var(${columnWidthAtIndex5}-${column.computedVisibleIndex})`,
|
|
23416
23692
|
offset: column.computedOffset,
|
|
23417
|
-
cssVarForOffset: `var(${
|
|
23693
|
+
cssVarForOffset: `var(${columnOffsetAtIndex3}-${column.computedVisibleIndex})`,
|
|
23418
23694
|
pinned: column.computedPinned
|
|
23419
23695
|
};
|
|
23420
23696
|
});
|