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