@infinite-table/infinite-react 0.4.10 → 0.4.13

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.esm.js CHANGED
@@ -1105,7 +1105,7 @@ function stripVar(cssVariableWithVarString) {
1105
1105
 
1106
1106
  // src/components/InfiniteTable/theme.css.ts
1107
1107
  var InternalVars = { currentColumnWidth: "var(--_1slvgu90)", currentColumnTransformX: "var(--_1slvgu91)", currentColumnTransformY: "var(--_1slvgu92)", activeCellRowOffset: "var(--_1slvgu93)", activeCellRowHeight: "var(--_1slvgu94)", activeCellOffsetX: "var(--_1slvgu95)", activeCellOffsetY: "var(--_1slvgu96)", scrollTopForActiveRow: "var(--_1slvgu97)", activeCellColWidth: "var(--_1slvgu98)", activeCellColOffset: "var(--_1slvgu99)", columnReorderEffectDurationAtIndex: "var(--_1slvgu9a)", columnWidthAtIndex: "var(--_1slvgu9b)", columnOffsetAtIndex: "var(--_1slvgu9c)", columnOffsetAtIndexWhileReordering: "var(--_1slvgu9d)", columnZIndexAtIndex: "var(--_1slvgu9e)", pinnedStartWidth: "var(--_1slvgu9f)", pinnedEndWidth: "var(--_1slvgu9g)", pinnedEndOffset: "var(--_1slvgu9h)", computedVisibleColumnsCount: "var(--_1slvgu9i)", baseZIndexForCells: "var(--_1slvgu9j)", bodyWidth: "var(--_1slvgu9k)", bodyHeight: "var(--_1slvgu9l)", scrollbarWidthHorizontal: "var(--_1slvgu9m)", scrollbarWidthVertical: "var(--_1slvgu9n)", scrollLeft: "var(--_1slvgu9o)", scrollTop: "var(--_1slvgu9p)" };
1108
- var ThemeVars = { color: { accent: "var(--infinite-accent-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)", 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)", 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)", sortIconMargin: "var(--infinite-header-cell-sort-icon-margin)", 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)" }, Cell: { padding: "var(--infinite-cell-padding)", borderWidth: "var(--infinite-cell-border-width)", border: "var(--infinite-cell-border)", 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)", activeBorderColor_R: "var(--infinite-active-cell-border-color--r)", activeBorderColor_G: "var(--infinite-active-cell-border-color--g)", activeBorderColor_B: "var(--infinite-active-cell-border-color--b)", activeBackgroundAlpha: "var(--infinite-active-cell-background-alpha)", activeBackgroundAlphaWhenTableUnfocused: "var(--infinite-active-cell-background-alpha--table-unfocused)", activeBackground: "var(--infinite-active-cell-background)", 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)" }, Row: { background: "var(--infinite-row-background)", oddBackground: "var(--infinite-row-odd-background)", selectedBackground: "var(--infinite-row-selected-background)", 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)", 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)" } } };
1108
+ var ThemeVars = { color: { accent: "var(--infinite-accent-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)", 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)", 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)", sortIconMargin: "var(--infinite-header-cell-sort-icon-margin)", 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)" }, Cell: { padding: "var(--infinite-cell-padding)", borderWidth: "var(--infinite-cell-border-width)", border: "var(--infinite-cell-border)", 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)", activeBorderColor_R: "var(--infinite-active-cell-border-color--r)", activeBorderColor_G: "var(--infinite-active-cell-border-color--g)", activeBorderColor_B: "var(--infinite-active-cell-border-color--b)", activeBackgroundAlpha: "var(--infinite-active-cell-background-alpha)", activeBackgroundAlphaWhenTableUnfocused: "var(--infinite-active-cell-background-alpha--table-unfocused)", activeBackground: "var(--infinite-active-cell-background)", 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)", 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)", itemHoverBackground: "var(--infinite-menu-item-hover-background)", itemHoverOpacity: "var(--infinite-menu-item-hover-opacity)", itemPressedOpacity: "var(--infinite-menu-item-pressed-opacity)", itemPressedBackground: "var(--infinite-menu-item-pressed-background)", itemDisabledOpacity: "var(--infinite-menu-item-disabled-opacity)" }, Row: { background: "var(--infinite-row-background)", oddBackground: "var(--infinite-row-odd-background)", selectedBackground: "var(--infinite-row-selected-background)", 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)", 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)" } } };
1109
1109
  var columnHeaderHeightName = "column-header-height";
1110
1110
 
1111
1111
  // src/utils/selectParent.ts
@@ -3664,11 +3664,11 @@ var useRerender = () => {
3664
3664
  };
3665
3665
 
3666
3666
  // src/components/InfiniteTable/components/ActiveCellIndicator.css.ts
3667
- var ActiveCellIndicatorCls = { visible: "nxbq1c2 nxbq1c1 _16lm1iwg _16lm1iw3 _16lm1iw15 _16lm1iw13", hidden: "nxbq1c3 nxbq1c1 _16lm1iwg _16lm1iw3 _16lm1iw15 _16lm1iw13" };
3668
- var ActiveIndicatorWrapperCls = "_16lm1iwg _16lm1iw3 _16lm1iw15 _16lm1iw13 _16lm1iwz _16lm1iwp";
3667
+ var ActiveCellIndicatorCls = { visible: "nxbq1c2 nxbq1c1 _16lm1iwi _16lm1iw3 _16lm1iw1b _16lm1iw19", hidden: "nxbq1c3 nxbq1c1 _16lm1iwi _16lm1iw3 _16lm1iw1b _16lm1iw19" };
3668
+ var ActiveIndicatorWrapperCls = "_16lm1iwi _16lm1iw3 _16lm1iw1b _16lm1iw19 _16lm1iw15 _16lm1iwr";
3669
3669
 
3670
3670
  // src/components/InfiniteTable/components/ActiveRowIndicator.css.ts
3671
- var ActiveRowIndicatorCls = { visible: "j26lrx1 j26lrx0 _16lm1iwg _16lm1iw3 _16lm1iw12 _16lm1iw13 _16lm1iw15", hidden: "j26lrx2 j26lrx0 _16lm1iwg _16lm1iw3 _16lm1iw12 _16lm1iw13 _16lm1iw15" };
3671
+ var ActiveRowIndicatorCls = { visible: "j26lrx1 j26lrx0 _16lm1iwi _16lm1iw3 _16lm1iw18 _16lm1iw19 _16lm1iw1b", hidden: "j26lrx2 j26lrx0 _16lm1iwi _16lm1iw3 _16lm1iw18 _16lm1iw19 _16lm1iw1b" };
3672
3672
 
3673
3673
  // src/components/InfiniteTable/components/ActiveRowIndicator.tsx
3674
3674
  var { rootClassName: rootClassName3 } = internalProps;
@@ -4215,20 +4215,20 @@ var useInternalProps = () => {
4215
4215
  };
4216
4216
 
4217
4217
  // src/components/InfiniteTable/utilities.css.ts
4218
- var alignItems = { center: "_16lm1iw1h", stretch: "_16lm1iw1i" };
4219
- var cssEllipsisClassName = "_16lm1iw1s _16lm1iw1t _16lm1iw1m";
4220
- var cursor = { pointer: "_16lm1iwe", colResize: "_16lm1iwf" };
4221
- var display = { flex: "_16lm1iwu", none: "_16lm1iwv", block: "_16lm1iww", inlineBlock: "_16lm1iwx" };
4222
- var flex = { "1": "_16lm1iwh", none: "_16lm1iwi" };
4223
- var flexFlow = { column: "_16lm1iw1d", columnReverse: "_16lm1iw1e", row: "_16lm1iw1f", rowReverse: "_16lm1iw1g" };
4224
- var justifyContent = { center: "_16lm1iw1j", start: "_16lm1iw1k", end: "_16lm1iw1l" };
4225
- var left = { "0": "_16lm1iw15", "100%": "_16lm1iw16", auto: "_16lm1iw17" };
4226
- var overflow = { hidden: "_16lm1iw1m", auto: "_16lm1iw1n", visible: "_16lm1iw1o" };
4218
+ var alignItems = { center: "_16lm1iw1n", stretch: "_16lm1iw1o" };
4219
+ var cssEllipsisClassName = "_16lm1iw1y _16lm1iw1z _16lm1iw1s";
4220
+ var cursor = { pointer: "_16lm1iwf", "default": "_16lm1iwg", colResize: "_16lm1iwh" };
4221
+ var display = { flex: "_16lm1iww", contents: "_16lm1iwx", none: "_16lm1iwy", block: "_16lm1iwz", grid: "_16lm1iw10", inlineBlock: "_16lm1iw11", inlineFlex: "_16lm1iw12", inlineGrid: "_16lm1iw13" };
4222
+ var flex = { "1": "_16lm1iwj", none: "_16lm1iwk" };
4223
+ var flexFlow = { column: "_16lm1iw1j", columnReverse: "_16lm1iw1k", row: "_16lm1iw1l", rowReverse: "_16lm1iw1m" };
4224
+ var justifyContent = { center: "_16lm1iw1p", start: "_16lm1iw1q", end: "_16lm1iw1r" };
4225
+ var left = { "0": "_16lm1iw1b", "100%": "_16lm1iw1c", auto: "_16lm1iw1d" };
4226
+ var overflow = { hidden: "_16lm1iw1s", auto: "_16lm1iw1t", visible: "_16lm1iw1u" };
4227
4227
  var position = { relative: "_16lm1iw1", absolute: "_16lm1iw2", sticky: "_16lm1iw3", fixed: "_16lm1iw4" };
4228
- var top = { "0": "_16lm1iw13", "100%": "_16lm1iw14" };
4229
- var transformTranslateZero = "_16lm1iwa";
4230
- var userSelect = { none: "_16lm1iwy" };
4231
- var zIndex = { "1": "_16lm1iwj", "10": "_16lm1iwk", "100": "_16lm1iwl", "1000": "_16lm1iwm", "10000": "_16lm1iwn", "100000": "_16lm1iwo", "1000000": "_16lm1iwp", "10000000": "_16lm1iwq", "1k": "_16lm1iwr", "10k": "_16lm1iws", "100k": "_16lm1iwt" };
4228
+ var top = { "0": "_16lm1iw19", "100%": "_16lm1iw1a" };
4229
+ var transformTranslateZero = "_16lm1iwb";
4230
+ var userSelect = { none: "_16lm1iw14" };
4231
+ var zIndex = { "1": "_16lm1iwl", "10": "_16lm1iwm", "100": "_16lm1iwn", "1000": "_16lm1iwo", "10000": "_16lm1iwp", "100000": "_16lm1iwq", "1000000": "_16lm1iwr", "10000000": "_16lm1iws", "1k": "_16lm1iwt", "10k": "_16lm1iwu", "100k": "_16lm1iwv" };
4232
4232
 
4233
4233
  // src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
4234
4234
  var InfiniteTableBody = forwardRef2(function InfiniteTableBody2(props, ref) {
@@ -4261,7 +4261,7 @@ import {
4261
4261
  createElement as createElement25,
4262
4262
  useMemo as useMemo5
4263
4263
  } from "react";
4264
- import { useCallback as useCallback9, useContext as useContext5, useEffect as useEffect13, useRef as useRef13 } from "react";
4264
+ import { useCallback as useCallback9, useContext as useContext5, useEffect as useEffect13, useRef as useRef14 } from "react";
4265
4265
  import { createPortal } from "react-dom";
4266
4266
 
4267
4267
  // src/components/DataSource/defaultFilterTypes.ts
@@ -4360,6 +4360,10 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
4360
4360
  if (extraFlags.rowSelected) {
4361
4361
  result.push(...baseClasses.map((c) => `${c}--row-selected`));
4362
4362
  }
4363
+ if (extraFlags.groupRow) {
4364
+ result.push(...baseClasses.map((c) => `${c}--group-row`));
4365
+ result.push(...baseClasses.map((c) => `${c}--${extraFlags.rowExpanded ? "group-row-expanded" : "group-row-collapsed"}`));
4366
+ }
4363
4367
  if (column.computedPinned) {
4364
4368
  result.push(...baseClasses.map((c) => `${c}--pinned-${column.computedPinned}`));
4365
4369
  } else {
@@ -4393,14 +4397,14 @@ var useInfiniteTable = () => {
4393
4397
  // src/components/InfiniteTable/InfiniteCls.css.ts
4394
4398
  var import_createRuntimeFn = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
4395
4399
  var FooterCls = "_16lm1iw1";
4396
- var InfiniteCls = "_1yeub2v0 _16lm1iw1 _16lm1iwu _16lm1iw1d _16lm1iw0";
4400
+ var InfiniteCls = "_1yeub2v0 _16lm1iw1 _16lm1iww _16lm1iw1j _16lm1iw0";
4397
4401
  var InfiniteClsHasPinnedEnd = "_1yeub2vo";
4398
4402
  var InfiniteClsHasPinnedStart = "_1yeub2vn";
4399
4403
  var InfiniteClsRecipe = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "", variantClassNames: { focused: { true: "_1yeub2v2", false: "_1yeub2v3" }, focusedWithin: { true: "_1yeub2v4", false: "_1yeub2v5" }, hasPinnedStart: { true: "_1yeub2v6", false: "_1yeub2v7" }, hasPinnedEnd: { true: "_1yeub2v8", false: "_1yeub2v9" }, hasPinnedStartOverflow: { true: "_1yeub2va", false: "_1yeub2vb" }, hasPinnedEndOverflow: { true: "_1yeub2vc", false: "_1yeub2vd" } }, defaultVariants: {}, compoundVariants: [[{ focused: false, focusedWithin: false }, "_1yeub2ve"]] });
4400
4404
  var InfiniteClsShiftingColumns = "_1yeub2vl";
4401
- var PinnedEndIndicatorBorder = "_1yeub2vr _1yeub2vp _16lm1iw2 _16lm1iw13 _16lm1iwf _16lm1iwy _16lm1iw11 _16lm1iw1q _16lm1iwg _16lm1iwq";
4405
+ var PinnedEndIndicatorBorder = "_1yeub2vr _1yeub2vp _16lm1iw2 _16lm1iw19 _16lm1iwh _16lm1iw14 _16lm1iw17 _16lm1iw1w _16lm1iwi _16lm1iws";
4402
4406
  var PinnedRowsContainerClsVariants = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "", variantClassNames: { pinned: { start: "_1yeub2vi", end: "_1yeub2vj", false: "_1yeub2vk" } }, defaultVariants: {}, compoundVariants: [] });
4403
- var PinnedStartIndicatorBorder = "_1yeub2vq _1yeub2vp _16lm1iw2 _16lm1iw13 _16lm1iwf _16lm1iwy _16lm1iw11 _16lm1iw1q _16lm1iwg _16lm1iwq";
4407
+ var PinnedStartIndicatorBorder = "_1yeub2vq _1yeub2vp _16lm1iw2 _16lm1iw19 _16lm1iwh _16lm1iw14 _16lm1iw17 _16lm1iw1w _16lm1iwi _16lm1iws";
4404
4408
 
4405
4409
  // src/components/utils/getScrollbarWidth.ts
4406
4410
  var scrollbarWidth;
@@ -5133,7 +5137,7 @@ var useColumnPointerEvents = ({
5133
5137
  };
5134
5138
  };
5135
5139
 
5136
- // src/components/InfiniteTable/utils/RenderHookComponent.tsx
5140
+ // src/components/InfiniteTable/utils/RenderHookComponentForInfinite.tsx
5137
5141
  import {
5138
5142
  createElement as createElement19
5139
5143
  } from "react";
@@ -5143,7 +5147,8 @@ import {
5143
5147
  Fragment as Fragment2,
5144
5148
  createContext as createContext4,
5145
5149
  createElement as createElement18,
5146
- memo as memo8
5150
+ memo as memo8,
5151
+ useRef as useRef12
5147
5152
  } from "react";
5148
5153
  import { useCallback as useCallback7, useContext as useContext4, useMemo as useMemo4 } from "react";
5149
5154
 
@@ -5169,8 +5174,8 @@ import { useState as useState6 } from "react";
5169
5174
 
5170
5175
  // src/components/InfiniteTable/components/icons/ExpanderIcon.css.ts
5171
5176
  var import_createRuntimeFn2 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
5172
- var ExpanderIconCls = "_16lm1iw6 _16lm1iwi _16lm1iwe";
5173
- var ExpanderIconClsVariants = (0, import_createRuntimeFn2.createRuntimeFn)({ defaultClassName: "", variantClassNames: { expanded: { true: "_16lm1iwc", false: "_198z9782" }, direction: { end: "_198z9783", start: "_198z9784" } }, defaultVariants: {}, compoundVariants: [[{ expanded: false, direction: "end" }, "_16lm1iwd"]] });
5177
+ var ExpanderIconCls = "_16lm1iw6 _16lm1iwk _16lm1iwf";
5178
+ var ExpanderIconClsVariants = (0, import_createRuntimeFn2.createRuntimeFn)({ defaultClassName: "", variantClassNames: { expanded: { true: "_16lm1iwd", false: "_198z9782" }, direction: { end: "_198z9783", start: "_198z9784" } }, defaultVariants: {}, compoundVariants: [[{ expanded: false, direction: "end" }, "_16lm1iwe"]] });
5174
5179
 
5175
5180
  // src/components/InfiniteTable/components/icons/ExpanderIcon.tsx
5176
5181
  function ExpanderIcon(props) {
@@ -5212,7 +5217,7 @@ import {
5212
5217
  } from "react";
5213
5218
 
5214
5219
  // src/components/InfiniteTable/components/icons/LoadingIcon.css.ts
5215
- var LoadingIconCls = "_16lm1iw8 _16lm1iwi _16lm1iwe";
5220
+ var LoadingIconCls = "_16lm1iw9 _16lm1iwk _16lm1iwf";
5216
5221
 
5217
5222
  // src/components/InfiniteTable/components/icons/LoadingIcon.tsx
5218
5223
  var LoadingIcon = (props) => {
@@ -5410,7 +5415,7 @@ function objectValuesExcept(obj, exceptList) {
5410
5415
 
5411
5416
  // src/components/InfiniteTable/components/cell.css.ts
5412
5417
  var import_createRuntimeFn4 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
5413
- var ColumnCellCls = "_1eexc2a6 _1eexc2a5 _16lm1iwu _16lm1iw1f _16lm1iw1h _16lm1iw2 _16lm1iw1r _16lm1iw1s _16lm1iwy";
5418
+ var ColumnCellCls = "_1eexc2a6 _1eexc2a5 _16lm1iww _16lm1iw1l _16lm1iw1n _16lm1iw2 _16lm1iw1x _16lm1iw1y _16lm1iw14";
5414
5419
  var ColumnCellRecipe = (0, import_createRuntimeFn4.createRuntimeFn)({ defaultClassName: "_1eexc2a8", variantClassNames: { dragging: { false: "_1eexc2a9", true: "_1eexc2aa" }, rowActive: { false: "_1eexc2ab", true: "_1eexc2ac" }, zebra: { false: "_1eexc2ad", even: "_1eexc2ae", odd: "_1eexc2af" }, rowSelected: { true: "_1eexc2ag", false: "_1eexc2ah", null: "_1eexc2ai" }, first: { true: "_1eexc2aj", false: "_1eexc2ak" }, last: { true: "_1eexc2al", false: "_1eexc2am" }, groupByField: { true: "_1eexc2an", false: "_1eexc2ao" }, firstInCategory: { true: "_1eexc2ap", false: "_1eexc2aq" }, lastInCategory: { true: "_1eexc2ar", false: "_1eexc2as" }, pinned: { start: "_1eexc2at", end: "_1eexc2au", false: "_1eexc2av" }, filtered: { true: "_1eexc2aw", false: "_1eexc2ax" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "_1eexc2ay"], [{ pinned: "start", firstInCategory: true }, "_1eexc2az"], [{ pinned: "end", firstInCategory: true }, "_1eexc2a10"], [{ pinned: "end", lastInCategory: true }, "_1eexc2a11"]] });
5415
5420
  var SelectionCheckboxCls = "_1eexc2a7";
5416
5421
 
@@ -5421,7 +5426,7 @@ import {
5421
5426
  import { useEffect as useEffect10, useRef as useRef11 } from "react";
5422
5427
 
5423
5428
  // src/components/InfiniteTable/components/CheckBox.css.ts
5424
- var CheckBoxCls = "_16lm1iwe";
5429
+ var CheckBoxCls = "_16lm1iwf";
5425
5430
 
5426
5431
  // src/components/InfiniteTable/components/CheckBox.tsx
5427
5432
  function forwardProps2() {
@@ -5767,6 +5772,7 @@ function InfiniteTableColumnCellFn(props) {
5767
5772
  context: renderingContext
5768
5773
  });
5769
5774
  const renderParam = renderParams;
5775
+ const renderParamRef = useRef12(renderParam);
5770
5776
  const onClick = useCallback7((event) => {
5771
5777
  const colIndex = column.computedVisibleIndex;
5772
5778
  getState().cellClick({
@@ -5850,6 +5856,7 @@ function InfiniteTableColumnCellFn(props) {
5850
5856
  })
5851
5857
  });
5852
5858
  }
5859
+ renderParamRef.current = renderParam;
5853
5860
  if (column.render) {
5854
5861
  return /* @__PURE__ */ createElement18(RenderCellHookComponent, {
5855
5862
  render: column.render,
@@ -5906,10 +5913,20 @@ function InfiniteTableColumnCellFn(props) {
5906
5913
  onClick,
5907
5914
  onMouseDown,
5908
5915
  cssEllipsis: (_a = column.cssEllipsis) != null ? _a : true,
5909
- className: join(useCellClassName(column, [InfiniteTableColumnCellClassName, InfiniteTableCellClassName], ColumnCellRecipe, { dragging: false, zebra, rowActive, rowSelected }), colClassName, rowComputedClassName),
5916
+ className: join(useCellClassName(column, [InfiniteTableColumnCellClassName, InfiniteTableCellClassName], ColumnCellRecipe, {
5917
+ dragging: false,
5918
+ zebra,
5919
+ rowActive,
5920
+ rowSelected,
5921
+ groupRow: rowInfo.isGroupRow,
5922
+ rowExpanded: rowInfo.isGroupRow ? !rowInfo.collapsed : false
5923
+ }), colClassName, rowComputedClassName),
5910
5924
  renderChildren
5911
5925
  };
5912
- return /* @__PURE__ */ createElement18(InfiniteTableCell, __spreadValues({}, cellProps));
5926
+ const ContextProvider = InfiniteTableColumnCellContext.Provider;
5927
+ return /* @__PURE__ */ createElement18(ContextProvider, {
5928
+ value: renderParamRef.current
5929
+ }, /* @__PURE__ */ createElement18(InfiniteTableCell, __spreadValues({}, cellProps)));
5913
5930
  }
5914
5931
  var InfiniteTableColumnCell = memo8(InfiniteTableColumnCellFn);
5915
5932
  function useInfiniteColumnCell() {
@@ -5917,11 +5934,13 @@ function useInfiniteColumnCell() {
5917
5934
  return result;
5918
5935
  }
5919
5936
 
5920
- // src/components/InfiniteTable/utils/RenderHookComponent.tsx
5937
+ // src/components/RenderHookComponent.tsx
5921
5938
  function RenderHookComponent(props) {
5922
5939
  var _a;
5923
5940
  return (_a = props.render(props.renderParam)) != null ? _a : null;
5924
5941
  }
5942
+
5943
+ // src/components/InfiniteTable/utils/RenderHookComponentForInfinite.tsx
5925
5944
  function RenderCellHookComponent(props) {
5926
5945
  const ContextProvider = InfiniteTableColumnCellContext.Provider;
5927
5946
  return /* @__PURE__ */ createElement19(ContextProvider, {
@@ -5987,19 +6006,19 @@ import { useEffect as useEffect11, useState as useState7 } from "react";
5987
6006
 
5988
6007
  // src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
5989
6008
  var import_createRuntimeFn5 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
5990
- var CellCls = "_1eexc2a5 _16lm1iwu _16lm1iw1f _16lm1iw1h _16lm1iw2 _16lm1iw1r _16lm1iw1s _16lm1iwy";
5991
- var HeaderCellContentRecipe = (0, import_createRuntimeFn5.createRuntimeFn)({ defaultClassName: "_12zfob11e _16lm1iw10 _16lm1iw12 _16lm1iwu _16lm1iw1f _16lm1iw1h", variantClassNames: { filtered: { false: "_12zfob11f", true: "_12zfob11g" } }, defaultVariants: {}, compoundVariants: [] });
5992
- var HeaderCellProxy = "_12zfob1k _16lm1iw1s _16lm1iw1t _16lm1iw1m";
5993
- var HeaderCellRecipe = (0, import_createRuntimeFn5.createRuntimeFn)({ defaultClassName: "_12zfob1l _16lm1iww", variantClassNames: { rowActive: { false: "_12zfob1m", true: "_12zfob1n" }, rowSelected: { false: "_12zfob1o", true: "_12zfob1p", null: "_12zfob1q" }, zebra: { false: "_12zfob1r", even: "_12zfob1s", odd: "_12zfob1t" }, dragging: { true: "_12zfob1u", false: "_12zfob1v" }, first: { true: "_12zfob1w", false: "_12zfob1x" }, last: { true: "_12zfob1y", false: "_12zfob1z" }, groupByField: { true: "_12zfob110", false: "_12zfob111" }, firstInCategory: { true: "_12zfob112", false: "_12zfob113" }, lastInCategory: { true: "_12zfob114", false: "_12zfob115" }, pinned: { start: "_12zfob116", end: "_12zfob117", false: "_12zfob118" }, filtered: { true: "_12zfob119", false: "_12zfob11a" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "_12zfob11b"], [{ pinned: "end", firstInCategory: true }, "_12zfob11c"], [{ pinned: false, lastInCategory: true }, "_12zfob11d"]] });
5994
- var HeaderClsRecipe = (0, import_createRuntimeFn5.createRuntimeFn)({ defaultClassName: "_12zfob16 _16lm1iww _16lm1iw2", variantClassNames: { pinned: { start: "_12zfob17", end: "_12zfob18", false: "_12zfob19" }, firstInCategory: { true: "_12zfob1a", false: "_12zfob1b" }, lastInCategory: { true: "_12zfob1c", false: "_12zfob1d" }, overflow: { true: "_12zfob1e", false: "_12zfob1f" } }, defaultVariants: {}, compoundVariants: [[{ overflow: true, pinned: "start" }, "_12zfob1g"], [{ pinned: "start", firstInCategory: true }, "_12zfob1h"], [{ overflow: true, pinned: "end" }, "_12zfob1i"], [{ pinned: "end", lastInCategory: true }, "_12zfob1j"]] });
5995
- var HeaderFilterCls = "_12zfob11j _16lm1iwu _16lm1iw1f _16lm1iw1h _16lm1iw1";
5996
- var HeaderFilterEditorCls = "_16lm1iw12 _16lm1iw10";
5997
- var HeaderGroupCls = "_12zfob11i _16lm1iwu _16lm1iw1f _16lm1iw1h";
6009
+ var CellCls = "_1eexc2a5 _16lm1iww _16lm1iw1l _16lm1iw1n _16lm1iw2 _16lm1iw1x _16lm1iw1y _16lm1iw14";
6010
+ var HeaderCellContentRecipe = (0, import_createRuntimeFn5.createRuntimeFn)({ defaultClassName: "_12zfob11e _16lm1iw16 _16lm1iw18 _16lm1iww _16lm1iw1l _16lm1iw1n", variantClassNames: { filtered: { false: "_12zfob11f", true: "_12zfob11g" } }, defaultVariants: {}, compoundVariants: [] });
6011
+ var HeaderCellProxy = "_12zfob1k _16lm1iw1y _16lm1iw1z _16lm1iw1s";
6012
+ var HeaderCellRecipe = (0, import_createRuntimeFn5.createRuntimeFn)({ defaultClassName: "_12zfob1l _16lm1iwz", variantClassNames: { rowActive: { false: "_12zfob1m", true: "_12zfob1n" }, rowSelected: { false: "_12zfob1o", true: "_12zfob1p", null: "_12zfob1q" }, zebra: { false: "_12zfob1r", even: "_12zfob1s", odd: "_12zfob1t" }, dragging: { true: "_12zfob1u", false: "_12zfob1v" }, first: { true: "_12zfob1w", false: "_12zfob1x" }, last: { true: "_12zfob1y", false: "_12zfob1z" }, groupByField: { true: "_12zfob110", false: "_12zfob111" }, firstInCategory: { true: "_12zfob112", false: "_12zfob113" }, lastInCategory: { true: "_12zfob114", false: "_12zfob115" }, pinned: { start: "_12zfob116", end: "_12zfob117", false: "_12zfob118" }, filtered: { true: "_12zfob119", false: "_12zfob11a" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "_12zfob11b"], [{ pinned: "end", firstInCategory: true }, "_12zfob11c"], [{ pinned: false, lastInCategory: true }, "_12zfob11d"]] });
6013
+ var HeaderClsRecipe = (0, import_createRuntimeFn5.createRuntimeFn)({ defaultClassName: "_12zfob16 _16lm1iwz _16lm1iw2", variantClassNames: { pinned: { start: "_12zfob17", end: "_12zfob18", false: "_12zfob19" }, firstInCategory: { true: "_12zfob1a", false: "_12zfob1b" }, lastInCategory: { true: "_12zfob1c", false: "_12zfob1d" }, overflow: { true: "_12zfob1e", false: "_12zfob1f" } }, defaultVariants: {}, compoundVariants: [[{ overflow: true, pinned: "start" }, "_12zfob1g"], [{ pinned: "start", firstInCategory: true }, "_12zfob1h"], [{ overflow: true, pinned: "end" }, "_12zfob1i"], [{ pinned: "end", lastInCategory: true }, "_12zfob1j"]] });
6014
+ var HeaderFilterCls = "_12zfob11j _16lm1iww _16lm1iw1l _16lm1iw1n _16lm1iw1";
6015
+ var HeaderFilterEditorCls = "_16lm1iw18 _16lm1iw16";
6016
+ var HeaderGroupCls = "_12zfob11i _16lm1iww _16lm1iw1l _16lm1iw1n";
5998
6017
  var HeaderScrollbarPlaceholderCls = "_12zfob15 _16lm1iw2";
5999
6018
  var HeaderSortIconCls = "_16lm1iw1";
6000
6019
  var HeaderSortIconIndexCls = "_12zfob14";
6001
6020
  var HeaderSortIconRecipe = (0, import_createRuntimeFn5.createRuntimeFn)({ defaultClassName: "", variantClassNames: { align: { start: "_12zfob11", center: "_12zfob12", end: "_12zfob13" } }, defaultVariants: {}, compoundVariants: [] });
6002
- var HeaderWrapperCls = "_12zfob11h _16lm1iw1m _16lm1iw1 _16lm1iwu _16lm1iw1f";
6021
+ var HeaderWrapperCls = "_12zfob11h _16lm1iw1s _16lm1iw1 _16lm1iww _16lm1iw1l";
6003
6022
 
6004
6023
  // src/components/InfiniteTable/components/icons/SortIcon.tsx
6005
6024
  var defaultLineStyle = {
@@ -6473,7 +6492,7 @@ var computeGroupResize = (params) => {
6473
6492
  };
6474
6493
 
6475
6494
  // src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/index.tsx
6476
- import { useRef as useRef12, useState as useState9 } from "react";
6495
+ import { useRef as useRef13, useState as useState9 } from "react";
6477
6496
  import {
6478
6497
  createElement as createElement23,
6479
6498
  memo as memo9
@@ -6569,17 +6588,17 @@ function getColumnGroupResizer(colIndexes, config) {
6569
6588
 
6570
6589
  // src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/ResizeHandle.css.ts
6571
6590
  var import_createRuntimeFn6 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
6572
- var ResizeHandleCls = "zneyzh0 _16lm1iw2 _16lm1iw13 _16lm1iw1a _16lm1iw18 _16lm1iwf _16lm1iw1m";
6573
- var ResizeHandleDraggerClsRecipe = (0, import_createRuntimeFn6.createRuntimeFn)({ defaultClassName: "zneyzhb _16lm1iw2 _16lm1iw13 _16lm1iw18", variantClassNames: { constrained: { false: "zneyzhc", true: "zneyzhd" } }, defaultVariants: {}, compoundVariants: [] });
6574
- var ResizeHandleRecipeCls = (0, import_createRuntimeFn6.createRuntimeFn)({ defaultClassName: "", variantClassNames: { computedPinned: { start: "zneyzh1", end: "zneyzh2 _16lm1iw15 _16lm1iw1c", false: "zneyzh3" }, computedFirstInCategory: { true: "zneyzh4", false: "zneyzh5" }, computedLastInCategory: { true: "zneyzh6", false: "zneyzh7" } }, defaultVariants: {}, compoundVariants: [[{ computedPinned: "end", computedLastInCategory: false, computedFirstInCategory: true }, "zneyzh8"], [{ computedPinned: false, computedFirstInCategory: false, computedLastInCategory: true }, "zneyzh9"], [{ computedPinned: "start", computedFirstInCategory: false, computedLastInCategory: true }, "zneyzha"]] });
6591
+ var ResizeHandleCls = "zneyzh0 _16lm1iw2 _16lm1iw19 _16lm1iw1g _16lm1iw1e _16lm1iwh _16lm1iw1s";
6592
+ var ResizeHandleDraggerClsRecipe = (0, import_createRuntimeFn6.createRuntimeFn)({ defaultClassName: "zneyzhb _16lm1iw2 _16lm1iw19 _16lm1iw1e", variantClassNames: { constrained: { false: "zneyzhc", true: "zneyzhd" } }, defaultVariants: {}, compoundVariants: [] });
6593
+ var ResizeHandleRecipeCls = (0, import_createRuntimeFn6.createRuntimeFn)({ defaultClassName: "", variantClassNames: { computedPinned: { start: "zneyzh1", end: "zneyzh2 _16lm1iw1b _16lm1iw1i", false: "zneyzh3" }, computedFirstInCategory: { true: "zneyzh4", false: "zneyzh5" }, computedLastInCategory: { true: "zneyzh6", false: "zneyzh7" } }, defaultVariants: {}, compoundVariants: [[{ computedPinned: "end", computedLastInCategory: false, computedFirstInCategory: true }, "zneyzh8"], [{ computedPinned: false, computedFirstInCategory: false, computedLastInCategory: true }, "zneyzh9"], [{ computedPinned: "start", computedFirstInCategory: false, computedLastInCategory: true }, "zneyzha"]] });
6575
6594
 
6576
6595
  // src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/index.tsx
6577
6596
  var { rootClassName: rootClassName8 } = internalProps;
6578
6597
  var InfiniteTableHeaderCellResizeHandleCls = `${rootClassName8}HeaderCell_ResizeHandle`;
6579
6598
  function ResizeHandleFn(props) {
6580
- const domRef = useRef12(null);
6599
+ const domRef = useRef13(null);
6581
6600
  const [constrained, setConstrained] = useState9(false);
6582
- const constrainedRef = useRef12(constrained);
6601
+ const constrainedRef = useRef13(constrained);
6583
6602
  constrainedRef.current = constrained;
6584
6603
  const col = props.columns[props.columnIndex];
6585
6604
  if (!col) {
@@ -6825,7 +6844,7 @@ function InfiniteTableHeaderCell(props) {
6825
6844
  }
6826
6845
  return /* @__PURE__ */ createElement25(Fragment3, null, align !== "end" ? renderParam.renderBag.selectionCheckBox : null, align === "end" ? renderParam.renderBag.sortIcon : null, renderParam.renderBag.header, align !== "end" ? renderParam.renderBag.sortIcon : null, align === "end" ? renderParam.renderBag.selectionCheckBox : null);
6827
6846
  };
6828
- const domRef = useRef13(null);
6847
+ const domRef = useRef14(null);
6829
6848
  const {
6830
6849
  componentActions: dataSourceActions,
6831
6850
  getState: getDataSourceState,
@@ -6954,7 +6973,9 @@ function InfiniteTableHeaderCell(props) {
6954
6973
  dragging,
6955
6974
  rowSelected: false,
6956
6975
  zebra: false,
6957
- rowActive: false
6976
+ rowActive: false,
6977
+ groupRow: false,
6978
+ rowExpanded: false
6958
6979
  }), CellCls),
6959
6980
  cssEllipsis: (_e = (_d = column.headerCssEllipsis) != null ? _d : column.cssEllipsis) != null ? _e : true,
6960
6981
  afterChildren: /* @__PURE__ */ createElement25(Fragment3, null, showColumnFilters ? column.computedFilterable ? /* @__PURE__ */ createElement25(InfiniteTableColumnHeaderFilter, {
@@ -7086,7 +7107,7 @@ import {
7086
7107
  createElement as createElement29,
7087
7108
  memo as memo11
7088
7109
  } from "react";
7089
- import { useCallback as useCallback11, useEffect as useEffect14, useRef as useRef15 } from "react";
7110
+ import { useCallback as useCallback11, useEffect as useEffect14, useRef as useRef16 } from "react";
7090
7111
 
7091
7112
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
7092
7113
  import {
@@ -7100,7 +7121,7 @@ import {
7100
7121
  import { useCallback as useCallback10 } from "react";
7101
7122
 
7102
7123
  // src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/GroupResizeHandle.tsx
7103
- import { useRef as useRef14, useState as useState10 } from "react";
7124
+ import { useRef as useRef15, useState as useState10 } from "react";
7104
7125
  import {
7105
7126
  createElement as createElement26,
7106
7127
  memo as memo10
@@ -7108,9 +7129,9 @@ import {
7108
7129
  var { rootClassName: rootClassName10 } = internalProps;
7109
7130
  var InfiniteTableHeaderCellResizeHandleCls2 = `${rootClassName10}HeaderCell_ResizeHandle`;
7110
7131
  function GroupResizeHandleFn(props) {
7111
- const domRef = useRef14(null);
7132
+ const domRef = useRef15(null);
7112
7133
  const [constrained, setConstrained] = useState10(false);
7113
- const constrainedRef = useRef14(constrained);
7134
+ const constrainedRef = useRef15(constrained);
7114
7135
  constrainedRef.current = constrained;
7115
7136
  const col = props.groupColumns[0];
7116
7137
  if (!col) {
@@ -7309,7 +7330,7 @@ function InfiniteTableHeaderFn(props) {
7309
7330
  const removeOnScroll = brain.onScroll(onScroll);
7310
7331
  return removeOnScroll;
7311
7332
  }, [brain]);
7312
- const domRef = useRef15(null);
7333
+ const domRef = useRef16(null);
7313
7334
  const headerCls = HeaderClsRecipe({
7314
7335
  overflow: false
7315
7336
  });
@@ -7483,7 +7504,7 @@ import {
7483
7504
  createElement as createElement31,
7484
7505
  forwardRef as forwardRef4,
7485
7506
  useCallback as useCallback13,
7486
- useRef as useRef16
7507
+ useRef as useRef17
7487
7508
  } from "react";
7488
7509
  import { useEffect as useEffect15 } from "react";
7489
7510
 
@@ -7522,7 +7543,7 @@ var enforceStyle = (node, style) => {
7522
7543
  };
7523
7544
  var InfiniteTableLicenseFooter = forwardRef4(function InfiniteTableLicenseFooter2(props, ref) {
7524
7545
  const { rootClassName: rootClassName13 } = useInternalProps();
7525
- const domRef = useRef16(null);
7546
+ const domRef = useRef17(null);
7526
7547
  const domCallback = useCallback13((node) => {
7527
7548
  domRef.current = node;
7528
7549
  if (!ref) {
@@ -7568,8 +7589,8 @@ import {
7568
7589
  } from "react";
7569
7590
 
7570
7591
  // src/components/InfiniteTable/components/LoadMask.css.ts
7571
- var LoadMaskCls = { visible: "qy58ya1 qy58ya0 _16lm1iw2 _16lm1iw13 _16lm1iw15 _16lm1iw1a _16lm1iw18", hidden: "qy58ya2 qy58ya0 _16lm1iw2 _16lm1iw13 _16lm1iw15 _16lm1iw1a _16lm1iw18" };
7572
- var LoadMaskOverlayCls = "qy58ya3 _16lm1iw2 _16lm1iw13 _16lm1iw15 _16lm1iw1a _16lm1iw18";
7592
+ var LoadMaskCls = { visible: "qy58ya1 qy58ya0 _16lm1iw2 _16lm1iw19 _16lm1iw1b _16lm1iw1g _16lm1iw1e", hidden: "qy58ya2 qy58ya0 _16lm1iw2 _16lm1iw19 _16lm1iw1b _16lm1iw1g _16lm1iw1e" };
7593
+ var LoadMaskOverlayCls = "qy58ya3 _16lm1iw2 _16lm1iw19 _16lm1iw1b _16lm1iw1g _16lm1iw1e";
7573
7594
  var LoadMaskTextCls = "qy58ya4";
7574
7595
 
7575
7596
  // src/components/InfiniteTable/components/LoadMask.tsx
@@ -7618,12 +7639,14 @@ function deepClone(source) {
7618
7639
  return target;
7619
7640
  }
7620
7641
 
7621
- // src/utils/groupAndPivot/index.ts
7622
- var LAZY_ROOT_KEY_FOR_GROUPS = "____root____";
7623
- var NOT_LOADED_YET_KEY_PREFIX = "____not_loaded_yet____";
7642
+ // src/utils/groupAndPivot/defaultToKey.ts
7624
7643
  function DEFAULT_TO_KEY(value) {
7625
7644
  return value;
7626
7645
  }
7646
+
7647
+ // src/utils/groupAndPivot/index.ts
7648
+ var LAZY_ROOT_KEY_FOR_GROUPS = "____root____";
7649
+ var NOT_LOADED_YET_KEY_PREFIX = "____not_loaded_yet____";
7627
7650
  function initReducers(reducers) {
7628
7651
  if (!reducers || !Object.keys(reducers).length) {
7629
7652
  return {};
@@ -7696,6 +7719,14 @@ function lazyGroup(groupParams, rootData) {
7696
7719
  if (currentGroupKeys.length == groupBy.length && groupBy.length) {
7697
7720
  if (current) {
7698
7721
  current.items = dataArray;
7722
+ for (let i = 0, len = currentGroupKeys.length; i < len; i++) {
7723
+ const currentKeys = currentGroupKeys.slice(0, i);
7724
+ const deepMapGroupValue = deepMap.get(currentKeys);
7725
+ if (deepMapGroupValue) {
7726
+ deepMapGroupValue.items = deepMapGroupValue.items || [];
7727
+ deepMapGroupValue.items = deepMapGroupValue.items.concat(dataArray);
7728
+ }
7729
+ }
7699
7730
  indexer.indexArray(dataArray, toPrimaryKey);
7700
7731
  }
7701
7732
  return next == null ? void 0 : next();
@@ -7716,7 +7747,7 @@ function lazyGroup(groupParams, rootData) {
7716
7747
  continue;
7717
7748
  }
7718
7749
  const dataObject = dataArray[i].data;
7719
- const dataKeys = dataArray[i].keys;
7750
+ const dataKeys = dataArray[i].keys || [];
7720
7751
  if (dataKeys.length) {
7721
7752
  const key = dataKeys[dataKeys.length - 1];
7722
7753
  currentGroupKeys.push(key);
@@ -7785,14 +7816,6 @@ function processGroup(deepMap, currentGroupKeys, currentPivotKeys, item, itemInd
7785
7816
  currentPivotKeys.length = 0;
7786
7817
  }
7787
7818
  }
7788
- function getGroupKeysForDataItem(data, groupBy) {
7789
- return groupBy.reduce((groupKeys, groupBy2) => {
7790
- const { field: groupByProperty, toKey: groupToKey } = groupBy2;
7791
- const key = (groupToKey || DEFAULT_TO_KEY)(data[groupByProperty], data);
7792
- groupKeys.push(key);
7793
- return groupKeys;
7794
- }, []);
7795
- }
7796
7819
  function group(groupParams, data) {
7797
7820
  const {
7798
7821
  groupBy,
@@ -7894,7 +7917,7 @@ function flatten(groupResult) {
7894
7917
  }
7895
7918
  function getEnhancedGroupData(options, deepMapValue) {
7896
7919
  var _a;
7897
- const { groupBy, groupKeys, collapsed, parents, reducers, lazyLoad } = options;
7920
+ const { groupBy, groupKeys, parents, reducers, lazyLoad } = options;
7898
7921
  const groupNesting = groupKeys.length;
7899
7922
  const {
7900
7923
  items: groupItems,
@@ -7929,7 +7952,7 @@ function getEnhancedGroupData(options, deepMapValue) {
7929
7952
  selectedChildredCount: 0,
7930
7953
  deselectedChildredCount: 0,
7931
7954
  id: `${groupKeys}`,
7932
- collapsed,
7955
+ collapsed: false,
7933
7956
  dataSourceHasGrouping: true,
7934
7957
  selfLoaded,
7935
7958
  error: options.error,
@@ -7988,7 +8011,7 @@ function enhancedFlatten(param) {
7988
8011
  var _a, _b;
7989
8012
  const items = deepMapValue.items;
7990
8013
  const groupNesting = groupKeys.length;
7991
- const collapsed = (_a = groupRowsState == null ? void 0 : groupRowsState.isGroupRowCollapsed(groupKeys)) != null ? _a : false;
8014
+ let collapsed = (_a = groupRowsState == null ? void 0 : groupRowsState.isGroupRowCollapsed(groupKeys)) != null ? _a : false;
7992
8015
  indexInParentGroups.push(indexInGroup);
7993
8016
  const enhancedGroupData = getEnhancedGroupData({
7994
8017
  lazyLoad,
@@ -8001,11 +8024,10 @@ function enhancedFlatten(param) {
8001
8024
  groupKeys,
8002
8025
  error: deepMapValue.error,
8003
8026
  totalChildrenCount: deepMapValue.totalChildrenCount,
8004
- childrenLoading: deepMapValue.childrenLoading,
8027
+ childrenLoading: (deepMapValue.childrenLoading || !collapsed && !deepMapValue.childrenAvailable) && lazyLoad,
8005
8028
  childrenAvailable: deepMapValue.childrenAvailable,
8006
8029
  directChildrenCount: groupKeys.length === groupByStrings.length ? deepMapValue.items.length : deepMap.getDirectChildrenSizeFor(groupKeys),
8007
- directChildrenLoadedCount: 0,
8008
- collapsed
8030
+ directChildrenLoadedCount: 0
8009
8031
  }, deepMapValue);
8010
8032
  if (isRowSelected) {
8011
8033
  enhancedGroupData.rowSelected = isRowSelected(enhancedGroupData);
@@ -8017,6 +8039,10 @@ function enhancedFlatten(param) {
8017
8039
  }
8018
8040
  const parent = parents[parents.length - 1];
8019
8041
  const parentCollapsed = (_b = parent == null ? void 0 : parent.collapsed) != null ? _b : false;
8042
+ if (parentCollapsed) {
8043
+ collapsed = true;
8044
+ }
8045
+ enhancedGroupData.collapsed = collapsed;
8020
8046
  let include = generateGroupRows || collapsed;
8021
8047
  if (parentCollapsed) {
8022
8048
  include = false;
@@ -8024,27 +8050,16 @@ function enhancedFlatten(param) {
8024
8050
  if (include) {
8025
8051
  result.push(enhancedGroupData);
8026
8052
  }
8027
- if (collapsed) {
8028
- enhancedGroupData.collapsedChildrenCount = enhancedGroupData.groupCount;
8029
- parents.forEach((parent2) => {
8030
- if (!parentCollapsed) {
8031
- parent2.deepRowInfoArray.push(enhancedGroupData);
8032
- }
8033
- parent2.collapsedChildrenCount += enhancedGroupData.groupCount;
8034
- parent2.collapsedGroupsCount += 1;
8035
- });
8036
- } else {
8037
- if (!parentCollapsed) {
8038
- parents.forEach((parent2) => {
8039
- parent2.deepRowInfoArray.push(enhancedGroupData);
8040
- });
8041
- }
8042
- }
8053
+ enhancedGroupData.collapsedChildrenCount = 0;
8054
+ parents.forEach((parent2) => {
8055
+ parent2.deepRowInfoArray.push(enhancedGroupData);
8056
+ parent2.collapsedGroupsCount += collapsed ? 1 : 0;
8057
+ });
8043
8058
  if (parent && enhancedGroupData.selfLoaded && lazyLoad) {
8044
8059
  parent.directChildrenLoadedCount += 1;
8045
8060
  }
8046
8061
  parents.push(enhancedGroupData);
8047
- const continueWithChildren = !collapsed || lazyLoad;
8062
+ const continueWithChildren = true;
8048
8063
  if (continueWithChildren) {
8049
8064
  if (!next) {
8050
8065
  if (!pivot) {
@@ -8082,9 +8097,10 @@ function enhancedFlatten(param) {
8082
8097
  if (last && item) {
8083
8098
  parent2.directChildrenLoadedCount += 1;
8084
8099
  }
8085
- if (!parentCollapsed) {
8086
- parent2.deepRowInfoArray.push(rowInfo);
8100
+ if (collapsed) {
8101
+ parent2.collapsedChildrenCount += 1;
8087
8102
  }
8103
+ parent2.deepRowInfoArray.push(rowInfo);
8088
8104
  });
8089
8105
  if (!collapsed) {
8090
8106
  result[startIndex + index] = rowInfo;
@@ -8367,15 +8383,15 @@ var GroupRowsState = class extends BooleanDeepCollectionState {
8367
8383
  };
8368
8384
 
8369
8385
  // src/components/DataSource/privateHooks/useLoadData.ts
8370
- import { useEffect as useEffect17, useMemo as useMemo7, useRef as useRef18, useState as useState11 } from "react";
8386
+ import { useEffect as useEffect17, useMemo as useMemo7, useRef as useRef19, useState as useState11 } from "react";
8371
8387
 
8372
8388
  // src/components/hooks/useEffectWithChanges.ts
8373
- import { useEffect as useEffect16, useRef as useRef17 } from "react";
8389
+ import { useEffect as useEffect16, useRef as useRef18 } from "react";
8374
8390
  function useEffectWithChanges(fn, deps) {
8375
- const prevRef = useRef17({});
8376
- const oldValuesRef = useRef17({});
8391
+ const prevRef = useRef18({});
8392
+ const oldValuesRef = useRef18({});
8377
8393
  const oldValues = oldValuesRef.current;
8378
- const changesRef = useRef17({});
8394
+ const changesRef = useRef18({});
8379
8395
  const changes = changesRef.current;
8380
8396
  const useEffectDeps = [];
8381
8397
  for (const k in deps) {
@@ -8658,7 +8674,7 @@ function useLoadData() {
8658
8674
  vertical: false,
8659
8675
  horizontal: false
8660
8676
  });
8661
- const scrollbarsRef = useRef18(scrollbars);
8677
+ const scrollbarsRef = useRef19(scrollbars);
8662
8678
  useEffect17(() => {
8663
8679
  notifyScrollbarsChange.onChange((scrollbars2) => {
8664
8680
  if (!scrollbars2) {
@@ -8715,7 +8731,7 @@ function useLoadData() {
8715
8731
  filterValue,
8716
8732
  cursorId: livePagination ? stateCursorId : null
8717
8733
  };
8718
- const initialRef = useRef18(true);
8734
+ const initialRef = useRef19(true);
8719
8735
  useLazyLoadRange();
8720
8736
  useEffectWithChanges(() => {
8721
8737
  const componentState2 = getComponentState();
@@ -8753,11 +8769,13 @@ function useLazyLoadRange() {
8753
8769
  const {
8754
8770
  lazyLoadBatchSize,
8755
8771
  lazyLoad,
8772
+ originalLazyGroupDataChangeDetect,
8756
8773
  notifyRenderRangeChange,
8757
8774
  dataArray,
8775
+ groupRowsState,
8758
8776
  scrollStopDelayUpdatedByTable
8759
8777
  } = componentState;
8760
- const latestRenderRangeRef = useRef18(null);
8778
+ const latestRenderRangeRef = useRef19(null);
8761
8779
  const loadRange = (renderRange, cache = getComponentState().lazyLoadCacheOfLoadedBatches) => {
8762
8780
  const componentState2 = getComponentState();
8763
8781
  renderRange = renderRange || latestRenderRangeRef.current;
@@ -8783,20 +8801,27 @@ function useLazyLoadRange() {
8783
8801
  }, cache);
8784
8802
  };
8785
8803
  const debouncedLoadRange = useMemo7(() => debounce(loadRange, { wait: scrollStopDelayUpdatedByTable }), [scrollStopDelayUpdatedByTable]);
8786
- useEffect17(() => {
8804
+ useEffectWithChanges((changes) => {
8787
8805
  if (lazyLoad) {
8806
+ if (changes.originalLazyGroupDataChangeDetect || changes.groupRowsState) {
8807
+ loadRange(notifyRenderRangeChange.get());
8808
+ }
8788
8809
  return notifyRenderRangeChange.onChange((renderRange) => {
8789
8810
  latestRenderRangeRef.current = renderRange;
8790
8811
  loadRange(renderRange);
8791
8812
  });
8792
8813
  }
8793
8814
  return;
8794
- }, [lazyLoadBatchSize, lazyLoad]);
8815
+ }, {
8816
+ lazyLoadBatchSize,
8817
+ lazyLoad,
8818
+ originalLazyGroupDataChangeDetect,
8819
+ groupRowsState
8820
+ });
8795
8821
  useEffect17(() => {
8796
8822
  if (lazyLoadBatchSize && lazyLoadBatchSize > 0) {
8797
8823
  debouncedLoadRange();
8798
8824
  }
8799
- return;
8800
8825
  }, [dataArray]);
8801
8826
  }
8802
8827
  function lazyLoadRange(options, cache) {
@@ -8886,6 +8911,16 @@ function lazyLoadRange(options, cache) {
8886
8911
  }, initialPromise);
8887
8912
  }
8888
8913
 
8914
+ // src/utils/groupAndPivot/getGroupKeysForDataItem.ts
8915
+ function getGroupKeysForDataItem(data, groupBy) {
8916
+ return groupBy.reduce((groupKeys, groupBy2) => {
8917
+ const { field: groupByProperty, toKey: groupToKey } = groupBy2;
8918
+ const key = (groupToKey || DEFAULT_TO_KEY)(data[groupByProperty], data);
8919
+ groupKeys.push(key);
8920
+ return groupKeys;
8921
+ }, []);
8922
+ }
8923
+
8889
8924
  // src/components/DataSource/RowSelectionState.ts
8890
8925
  var RowSelectionState = class {
8891
8926
  constructor(state, getConfig, _forTestingOnly) {
@@ -8962,8 +8997,8 @@ var RowSelectionState = class {
8962
8997
  getGroupByLength() {
8963
8998
  return this.getConfig().groupBy.length;
8964
8999
  }
8965
- static from(rowSeleStateObject, getConfig, _forTestingOnly) {
8966
- return new RowSelectionState(rowSeleStateObject, getConfig, _forTestingOnly);
9000
+ static from(rowSeleStateObject, getConfig, overrides) {
9001
+ return new RowSelectionState(rowSeleStateObject, getConfig, overrides);
8967
9002
  }
8968
9003
  update(stateObject) {
8969
9004
  var _a, _b;
@@ -9331,6 +9366,9 @@ var RowSelectionState = class {
9331
9366
  };
9332
9367
 
9333
9368
  // src/components/InfiniteTable/api/getSelectionApi.ts
9369
+ function cloneRowSelection(rowSelection, stateOrGetDataSourceState) {
9370
+ return new RowSelectionState(rowSelection, rowSelectionStateConfigGetter(stateOrGetDataSourceState));
9371
+ }
9334
9372
  function rowSelectionStateConfigGetter(stateOrStateGetter) {
9335
9373
  return () => {
9336
9374
  const state = typeof stateOrStateGetter === "function" ? stateOrStateGetter() : stateOrStateGetter;
@@ -9673,16 +9711,7 @@ var forwardProps3 = (setupState) => {
9673
9711
  collapseGroupRowsOnDataFunctionChange: (collapseGroupRowsOnDataFunctionChange) => collapseGroupRowsOnDataFunctionChange != null ? collapseGroupRowsOnDataFunctionChange : true,
9674
9712
  loading: (loading) => loading != null ? loading : false,
9675
9713
  sortInfo: (sortInfo) => normalizeSortInfo(sortInfo, setupState.propsCache.get("sortInfo")),
9676
- groupBy: (groupBy) => groupBy != null ? groupBy : [],
9677
- groupRowsState: (groupRowsState) => {
9678
- if (groupRowsState && !(groupRowsState instanceof GroupRowsState)) {
9679
- groupRowsState = new GroupRowsState(groupRowsState);
9680
- }
9681
- return groupRowsState || new GroupRowsState({
9682
- expandedRows: true,
9683
- collapsedRows: []
9684
- });
9685
- }
9714
+ groupBy: (groupBy) => groupBy != null ? groupBy : []
9686
9715
  };
9687
9716
  };
9688
9717
  function getLivePaginationCursorValue(livePaginationCursorProp, state) {
@@ -9741,8 +9770,17 @@ function mapPropsToState(params) {
9741
9770
  }
9742
9771
  const primaryKeyDescriptor = state.primaryKey;
9743
9772
  const toPrimaryKey = typeof primaryKeyDescriptor === "function" ? (data) => primaryKeyDescriptor(data) : (data) => data[primaryKeyDescriptor];
9773
+ let groupRowsState = props.groupRowsState || state.groupRowsState || props.defaultGroupRowsState;
9774
+ if (groupRowsState && !(groupRowsState instanceof GroupRowsState)) {
9775
+ groupRowsState = new GroupRowsState(groupRowsState);
9776
+ }
9777
+ groupRowsState = groupRowsState || new GroupRowsState(state.lazyLoad ? { expandedRows: [], collapsedRows: true } : {
9778
+ expandedRows: true,
9779
+ collapsedRows: []
9780
+ });
9744
9781
  const result = {
9745
9782
  selectionMode,
9783
+ groupRowsState,
9746
9784
  rowSelection: rowSelectionState,
9747
9785
  toPrimaryKey,
9748
9786
  operatorsByFilterType,
@@ -10557,7 +10595,7 @@ function getImperativeApi(param) {
10557
10595
  // src/components/InfiniteTable/hooks/useAutoSizeColumns.ts
10558
10596
  import {
10559
10597
  useEffect as useEffect18,
10560
- useRef as useRef19,
10598
+ useRef as useRef20,
10561
10599
  useState as useState12
10562
10600
  } from "react";
10563
10601
  var OFFSET = 10;
@@ -10628,7 +10666,7 @@ function useAutoSizeColumns() {
10628
10666
  const [refreshId, setRefreshId] = useState12(0);
10629
10667
  const theKey = typeof autoSizeColumnsKey === "object" ? autoSizeColumnsKey.key : autoSizeColumnsKey;
10630
10668
  const getTheKey = useLatest(theKey);
10631
- const lastExecutedIdentifierRef = useRef19(null);
10669
+ const lastExecutedIdentifierRef = useRef20(null);
10632
10670
  useEffect18(() => {
10633
10671
  const key = getTheKey();
10634
10672
  if (key == null) {
@@ -10687,7 +10725,7 @@ function useAutoSizeColumns() {
10687
10725
  }
10688
10726
 
10689
10727
  // src/components/InfiniteTable/hooks/useCellRendering.tsx
10690
- import { useCallback as useCallback14, useEffect as useEffect19, useRef as useRef20 } from "react";
10728
+ import { useCallback as useCallback14, useEffect as useEffect19, useRef as useRef21 } from "react";
10691
10729
  import {
10692
10730
  createElement as createElement34
10693
10731
  } from "react";
@@ -10763,7 +10801,7 @@ function useCellRendering(param) {
10763
10801
  bodySize,
10764
10802
  rowspan
10765
10803
  });
10766
- const scrollTopMaxRef = useRef20(0);
10804
+ const scrollTopMaxRef = useRef21(0);
10767
10805
  useEffect19(() => {
10768
10806
  return brain.onRenderCountChange(() => {
10769
10807
  scrollTopMaxRef.current = brain.scrollTopMax;
@@ -11103,10 +11141,10 @@ function useColumnSizeFn(columns) {
11103
11141
  import { useEffect as useEffect23, useMemo as useMemo9 } from "react";
11104
11142
 
11105
11143
  // src/components/InfiniteTable/hooks/useEffectWithRaf.ts
11106
- import { useEffect as useEffect22, useRef as useRef21 } from "react";
11144
+ import { useEffect as useEffect22, useRef as useRef22 } from "react";
11107
11145
  function useEffectWithRaf(fn, deps) {
11108
- const rafId = useRef21(0);
11109
- const removeFnRaf = useRef21();
11146
+ const rafId = useRef22(0);
11147
+ const removeFnRaf = useRef22();
11110
11148
  useEffect22(() => {
11111
11149
  rafId.current = requestAnimationFrame(() => {
11112
11150
  removeFnRaf.current = fn();
@@ -12491,7 +12529,7 @@ var useLicense = (licenseKey = "") => {
12491
12529
  const valid = useMemo11(() => {
12492
12530
  let valid2 = isValidLicense(licenseKey, {
12493
12531
  publishedAt: 1624970570587,
12494
- version: "0.4.10"
12532
+ version: "0.4.13"
12495
12533
  });
12496
12534
  if (!licenseKey && !valid2 && isInsidePlayground) {
12497
12535
  return true;
@@ -12502,11 +12540,11 @@ var useLicense = (licenseKey = "") => {
12502
12540
  };
12503
12541
 
12504
12542
  // src/components/InfiniteTable/hooks/useScrollToActiveCell.ts
12505
- import { useRef as useRef22, useEffect as useEffect27 } from "react";
12543
+ import { useRef as useRef23, useEffect as useEffect27 } from "react";
12506
12544
  var RETRIES = 10;
12507
12545
  function useScrollToActiveCell(activeCellIndex, dataCount, imperativeApi) {
12508
- const didScrollRef = useRef22(false);
12509
- const rafId = useRef22(null);
12546
+ const didScrollRef = useRef23(false);
12547
+ const rafId = useRef23(null);
12510
12548
  useEffect27(() => {
12511
12549
  if (activeCellIndex != null) {
12512
12550
  didScrollRef.current = false;
@@ -12536,11 +12574,11 @@ function useScrollToActiveCell(activeCellIndex, dataCount, imperativeApi) {
12536
12574
  }
12537
12575
 
12538
12576
  // src/components/InfiniteTable/hooks/useScrollToActiveRow.ts
12539
- import { useRef as useRef23, useEffect as useEffect28 } from "react";
12577
+ import { useRef as useRef24, useEffect as useEffect28 } from "react";
12540
12578
  var RETRIES2 = 10;
12541
12579
  function useScrollToActiveRow(activeRowIndex, dataCount, imperativeApi) {
12542
- const didScrollRef = useRef23(false);
12543
- const rafId = useRef23(null);
12580
+ const didScrollRef = useRef24(false);
12581
+ const rafId = useRef24(null);
12544
12582
  useEffect28(() => {
12545
12583
  if (activeRowIndex != null) {
12546
12584
  didScrollRef.current = false;
@@ -12826,7 +12864,14 @@ function onCellClick(context, event) {
12826
12864
  updateRowSelectionOnCellClick(context, event);
12827
12865
  }
12828
12866
  function updateRowSelectionOnCellClick(context, event) {
12829
- const { rowIndex, getDataSourceState, getComputed, dataSourceActions, api } = context;
12867
+ const {
12868
+ rowIndex,
12869
+ getDataSourceState,
12870
+ getComputed,
12871
+ dataSourceActions,
12872
+ api,
12873
+ cloneRowSelection: cloneRowSelection2
12874
+ } = context;
12830
12875
  const { multiRowSelector, renderSelectionCheckBox } = getComputed();
12831
12876
  const dataSourceState = getDataSourceState();
12832
12877
  const { selectionMode, groupBy, dataArray } = dataSourceState;
@@ -12838,7 +12883,7 @@ function updateRowSelectionOnCellClick(context, event) {
12838
12883
  return false;
12839
12884
  }
12840
12885
  let { rowSelection: rowSelectionState } = dataSourceState;
12841
- rowSelectionState = new RowSelectionState(rowSelectionState, rowSelectionStateConfigGetter(getDataSourceState));
12886
+ rowSelectionState = cloneRowSelection2(rowSelectionState);
12842
12887
  multiRowSelector.rowSelectionState = rowSelectionState;
12843
12888
  if (rowSelectionState && typeof rowSelectionState === "object") {
12844
12889
  if (event.shiftKey) {
@@ -12868,8 +12913,9 @@ function clamp(value, min, max) {
12868
12913
  }
12869
12914
 
12870
12915
  // src/components/InfiniteTable/eventHandlers/keyboardNavigation.ts
12871
- function handleRowNavigation(options) {
12872
- const { key, getState, getDataSourceState, actions, api } = options;
12916
+ function handleRowNavigation(options, event) {
12917
+ const { getState, getDataSourceState, actions, api } = options;
12918
+ const { key } = event;
12873
12919
  const dataArray = getDataSourceState().dataArray;
12874
12920
  const arrLength = dataArray.length;
12875
12921
  const state = getState();
@@ -12934,16 +12980,15 @@ function handleRowNavigation(options) {
12934
12980
  actions.activeRowIndex = activeRowIndex;
12935
12981
  return true;
12936
12982
  }
12937
- function handleCellNavigation(options) {
12983
+ function handleCellNavigation(options, event) {
12938
12984
  const {
12939
12985
  api,
12940
- key,
12941
- shiftKey,
12942
12986
  getState,
12943
12987
  getComputed,
12944
12988
  getDataSourceState,
12945
12989
  actions
12946
12990
  } = options;
12991
+ const { key, shiftKey } = event;
12947
12992
  const dataArray = getDataSourceState().dataArray;
12948
12993
  const state = getState();
12949
12994
  const { activeCellIndex, brain } = state;
@@ -13033,18 +13078,19 @@ var validKeys = {
13033
13078
  Enter: true,
13034
13079
  " ": true
13035
13080
  };
13036
- function handleKeyboardNavigation(options) {
13081
+ function handleKeyboardNavigation(options, event) {
13082
+ const { key } = event;
13037
13083
  const { getState } = options;
13038
13084
  const state = getState();
13039
13085
  const { activeRowIndex, activeCellIndex, keyboardNavigation } = state;
13040
- if (!validKeys[options.key]) {
13086
+ if (!validKeys[key]) {
13041
13087
  return false;
13042
13088
  }
13043
13089
  if (activeRowIndex != null && keyboardNavigation === "row") {
13044
- return handleRowNavigation(options);
13090
+ return handleRowNavigation(options, event);
13045
13091
  }
13046
13092
  if (activeCellIndex != null && keyboardNavigation === "cell") {
13047
- return handleCellNavigation(options);
13093
+ return handleCellNavigation(options, event);
13048
13094
  }
13049
13095
  return false;
13050
13096
  }
@@ -13055,16 +13101,15 @@ var validKeys2 = {
13055
13101
  " ": true,
13056
13102
  a: true
13057
13103
  };
13058
- function handleKeyboardSelection(context) {
13104
+ function handleKeyboardSelection(context, keyboardEvent) {
13059
13105
  const {
13060
13106
  getState,
13061
13107
  getDataSourceState,
13062
13108
  dataSourceActions,
13063
13109
  api: imperativeApi,
13064
- key,
13065
- ctrlKey,
13066
- metaKey
13110
+ cloneRowSelection: cloneRowSelection2
13067
13111
  } = context;
13112
+ const { key, ctrlKey, metaKey } = keyboardEvent;
13068
13113
  if (!validKeys2[key]) {
13069
13114
  return false;
13070
13115
  }
@@ -13093,21 +13138,21 @@ function handleKeyboardSelection(context) {
13093
13138
  return false;
13094
13139
  }
13095
13140
  if (key === "a" && (ctrlKey || metaKey)) {
13096
- const rowSelectionState = new RowSelectionState(rowSelection, rowSelectionStateConfigGetter(getDataSourceState));
13141
+ const rowSelectionState = cloneRowSelection2(rowSelection);
13097
13142
  rowSelectionState.selectAll();
13098
13143
  dataSourceActions.rowSelection = rowSelectionState;
13099
13144
  return true;
13100
13145
  }
13101
13146
  if (key === " ") {
13102
13147
  if (groupBy.length) {
13103
- if (rowInfo.isGroupRow) {
13148
+ if (rowInfo.isGroupRow && rowInfo.groupKeys) {
13104
13149
  imperativeApi.selectionApi.toggleGroupRowSelection(rowInfo.groupKeys);
13105
13150
  } else {
13106
13151
  imperativeApi.selectionApi.toggleRowSelection(rowInfo.id);
13107
13152
  }
13108
13153
  return true;
13109
13154
  } else {
13110
- const event = __spreadValues({}, context);
13155
+ const event = __spreadValues({}, keyboardEvent);
13111
13156
  const { renderSelectionCheckBox } = context.getComputed();
13112
13157
  if (renderSelectionCheckBox) {
13113
13158
  event.metaKey = false;
@@ -13122,15 +13167,14 @@ function handleKeyboardSelection(context) {
13122
13167
  // src/components/InfiniteTable/eventHandlers/onKeyDown.ts
13123
13168
  function onKeyDown(context, event) {
13124
13169
  const keyboardHandlerContext = __spreadProps(__spreadValues({}, context), {
13125
- key: event.key,
13126
- metaKey: event.metaKey,
13127
- ctrlKey: event.ctrlKey,
13128
- shiftKey: event.shiftKey
13170
+ cloneRowSelection: (rowSelection) => {
13171
+ return cloneRowSelection(rowSelection, context.getDataSourceState);
13172
+ }
13129
13173
  });
13130
- if (handleKeyboardSelection(keyboardHandlerContext)) {
13174
+ if (handleKeyboardSelection(keyboardHandlerContext, event)) {
13131
13175
  event.preventDefault();
13132
13176
  }
13133
- if (handleKeyboardNavigation(keyboardHandlerContext)) {
13177
+ if (handleKeyboardNavigation(keyboardHandlerContext, event)) {
13134
13178
  event.preventDefault();
13135
13179
  }
13136
13180
  }
@@ -13151,7 +13195,10 @@ function useEventHandlersContext() {
13151
13195
  getState,
13152
13196
  actions,
13153
13197
  getDataSourceState,
13154
- dataSourceActions
13198
+ dataSourceActions,
13199
+ cloneRowSelection: (rowSelection) => {
13200
+ return cloneRowSelection(rowSelection, getDataSourceState);
13201
+ }
13155
13202
  };
13156
13203
  return context2;
13157
13204
  }, [getState, actions, getDataSourceState, dataSourceActions]);
@@ -13161,13 +13208,7 @@ function handleDOMEvents() {
13161
13208
  const context = useEventHandlersContext();
13162
13209
  useEffect29(() => {
13163
13210
  const removeOnKeyDown = context.getState().keyDown.onChange((event) => {
13164
- onKeyDown(__spreadProps(__spreadValues({}, context), {
13165
- key: event.key,
13166
- metaKey: event.metaKey,
13167
- ctrlKey: event.ctrlKey,
13168
- shiftKey: event.shiftKey,
13169
- preventDefault: () => event.preventDefault()
13170
- }), event);
13211
+ onKeyDown(context, event);
13171
13212
  });
13172
13213
  function cellClickHandler(cellClickParam) {
13173
13214
  if (!cellClickParam) {
@@ -13181,10 +13222,10 @@ function handleDOMEvents() {
13181
13222
  key: "",
13182
13223
  preventDefault: () => event.preventDefault()
13183
13224
  };
13184
- onCellClick(__spreadValues(__spreadProps(__spreadValues({}, context), {
13225
+ onCellClick(__spreadProps(__spreadValues({}, context), {
13185
13226
  rowIndex: cellClickParam.rowIndex,
13186
13227
  colIndex: cellClickParam.colIndex
13187
- }), virtualEvent), virtualEvent);
13228
+ }), virtualEvent);
13188
13229
  }
13189
13230
  const removeOnCellClick = context.getState().cellClick.onChange(cellClickHandler);
13190
13231
  return () => {
@@ -13379,6 +13420,245 @@ InfiniteTable.defaultProps = {
13379
13420
  columnHeaderHeight: toCSSVarName(columnHeaderHeightName)
13380
13421
  };
13381
13422
 
13423
+ // src/components/Menu/index.tsx
13424
+ import {
13425
+ Children,
13426
+ createElement as createElement36,
13427
+ useState as useState16
13428
+ } from "react";
13429
+ import { useState as useState17 } from "react";
13430
+
13431
+ // src/components/Menu/MenuCls.css.ts
13432
+ var import_createRuntimeFn7 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
13433
+ var MenuCls = "db3arf0 _16lm1iw0 _16lm1iw1 _16lm1iw13 _16lm1iw1j _16lm1iw7";
13434
+ var MenuItemCls = (0, import_createRuntimeFn7.createRuntimeFn)({ defaultClassName: "db3arf2 _16lm1iww _16lm1iw1n _16lm1iw14", variantClassNames: { disabled: { true: "db3arf3 _16lm1iwg _16lm1iw14", false: "_16lm1iwf" }, hover: { true: "db3arf5", false: "db3arf6" }, pressed: { false: "db3arf7", true: "db3arf8" }, active: { true: "db3arf9", false: "db3arfa" } }, defaultVariants: {}, compoundVariants: [[{ pressed: true, hover: true }, "db3arfb"]] });
13435
+ var MenuRowCls = "_16lm1iwx";
13436
+ var MenuSeparatorCls = "db3arfc";
13437
+
13438
+ // src/components/Menu/index.tsx
13439
+ var SEPARATOR = "-";
13440
+ function MenuSeparator() {
13441
+ return /* @__PURE__ */ createElement36("hr", {
13442
+ className: MenuSeparatorCls
13443
+ });
13444
+ }
13445
+ var toRuntimeItem = ({ columns, activeItemKey }, item) => {
13446
+ const menuItem = item && (item.key != null || item.label != null) ? item : null;
13447
+ const menuDecoration = menuItem === null ? item === SEPARATOR ? /* @__PURE__ */ createElement36(MenuSeparator, null) : item : null;
13448
+ const runtimeItem = menuItem != null ? {
13449
+ type: "item",
13450
+ disabled: !!menuItem.disabled,
13451
+ active: menuItem.key === activeItemKey,
13452
+ value: menuItem,
13453
+ span: menuItem.span || 1,
13454
+ key: menuItem.key,
13455
+ menu: menuItem.menu || null
13456
+ } : {
13457
+ type: "decoration",
13458
+ value: menuDecoration,
13459
+ span: columns.length,
13460
+ style: {
13461
+ gridColumnStart: 1,
13462
+ gridColumnEnd: columns.length + 10
13463
+ }
13464
+ };
13465
+ return runtimeItem;
13466
+ };
13467
+ function childrenToRuntimeItems(context, children) {
13468
+ return Children.map(children, (child) => {
13469
+ if (child == null ? void 0 : child.props.__is_menu_item) {
13470
+ const itemProps = __spreadValues({}, child.props);
13471
+ if (!itemProps.key) {
13472
+ itemProps.key = child.key;
13473
+ }
13474
+ if (!itemProps.description) {
13475
+ itemProps.description = child.props.children;
13476
+ }
13477
+ if (!itemProps.label) {
13478
+ itemProps.label = itemProps.children;
13479
+ }
13480
+ return toRuntimeItem(context, itemProps);
13481
+ }
13482
+ return toRuntimeItem(context, child);
13483
+ }) || [];
13484
+ }
13485
+ var defaultColumns = [
13486
+ {
13487
+ name: "label"
13488
+ }
13489
+ ];
13490
+ function Menu(props) {
13491
+ const _a = props, {
13492
+ children,
13493
+ items,
13494
+ columns: cols,
13495
+ addSubmenuColumnIfNeeded
13496
+ } = _a, domProps = __objRest(_a, [
13497
+ "children",
13498
+ "items",
13499
+ "columns",
13500
+ "addSubmenuColumnIfNeeded"
13501
+ ]);
13502
+ const [activeItemKey, setActiveItemKey] = useState17(null);
13503
+ const columns = cols || defaultColumns;
13504
+ let runtimeItems = [];
13505
+ let renderedChildren = null;
13506
+ const context = { columns, activeItemKey };
13507
+ if (items) {
13508
+ runtimeItems = items.map(toRuntimeItem.bind(null, context));
13509
+ } else if (!items && typeof children !== "function") {
13510
+ runtimeItems = childrenToRuntimeItems(context, children);
13511
+ }
13512
+ if (addSubmenuColumnIfNeeded) {
13513
+ const hasSubmenus = runtimeItems.filter((item) => item.type === "item" && item.menu != null).length > 0;
13514
+ if (hasSubmenus && !columns.find((col) => col.name == "submenu")) {
13515
+ columns.push({
13516
+ name: "submenu",
13517
+ render: ({ domProps: domProps2, item }) => {
13518
+ return item.menu ? /* @__PURE__ */ createElement36("div", __spreadValues({}, domProps2), /* @__PURE__ */ createElement36(ExpanderIcon, null)) : /* @__PURE__ */ createElement36("div", __spreadValues({}, domProps2));
13519
+ }
13520
+ });
13521
+ }
13522
+ }
13523
+ renderedChildren = runtimeItems.map((runtimeItem, index) => /* @__PURE__ */ createElement36(RuntimeItemRenderer, {
13524
+ columns,
13525
+ item: runtimeItem,
13526
+ index,
13527
+ onClick: (item) => setActiveItemKey(item.key)
13528
+ }));
13529
+ const gridTemplateColumns = columns.map((col) => {
13530
+ return col.width || (typeof col.flex === "number" ? `${col.flex}fr` : col.flex) || "auto";
13531
+ }).join(" ");
13532
+ const style = __spreadProps(__spreadValues({}, domProps.style), {
13533
+ gridTemplateColumns,
13534
+ gridTemplateRows: runtimeItems.map(() => `auto`).join(" ")
13535
+ });
13536
+ function handleKeydown(event) {
13537
+ const selectableRuntimeItems = runtimeItems.filter((item) => item.type === "item" && !item.disabled);
13538
+ let activeIndex = selectableRuntimeItems.findIndex((runtimeItem) => runtimeItem.key === activeItemKey);
13539
+ let newActiveIndex = activeIndex;
13540
+ const validKeys3 = {
13541
+ ArrowUp: () => {
13542
+ newActiveIndex--;
13543
+ },
13544
+ ArrowDown: () => {
13545
+ newActiveIndex++;
13546
+ },
13547
+ PageUp: () => {
13548
+ newActiveIndex = 0;
13549
+ },
13550
+ PageDown: () => {
13551
+ newActiveIndex = selectableRuntimeItems.length - 1;
13552
+ }
13553
+ };
13554
+ const fn = validKeys3[event.key];
13555
+ if (fn) {
13556
+ fn();
13557
+ }
13558
+ newActiveIndex = clamp(newActiveIndex, 0, selectableRuntimeItems.length - 1);
13559
+ if (newActiveIndex != activeIndex) {
13560
+ setActiveItemKey(selectableRuntimeItems[newActiveIndex].key);
13561
+ }
13562
+ }
13563
+ return /* @__PURE__ */ createElement36("div", __spreadProps(__spreadValues({}, domProps), {
13564
+ onKeyDown: (event) => {
13565
+ if (domProps.onKeyDown) {
13566
+ domProps.onKeyDown(event);
13567
+ }
13568
+ handleKeydown(event);
13569
+ },
13570
+ tabIndex: 0,
13571
+ className: join(MenuCls, domProps.className),
13572
+ style
13573
+ }), renderedChildren);
13574
+ }
13575
+ var menuDefaultProps = {
13576
+ addSubmenuColumnIfNeeded: true
13577
+ };
13578
+ Menu.defaultProps = menuDefaultProps;
13579
+ function RuntimeItemRenderer(props) {
13580
+ const [hover, setHover] = useState16(false);
13581
+ const [pressed, setPressed] = useState16(false);
13582
+ const { columns, item, index } = props;
13583
+ const key = item.type === "item" ? item.value.key : index;
13584
+ let content = null;
13585
+ if (item.type === "decoration") {
13586
+ content = /* @__PURE__ */ createElement36("div", {
13587
+ style: item.style
13588
+ }, item.value);
13589
+ } else {
13590
+ let spanIndex = 0;
13591
+ content = columns.map((col, i) => {
13592
+ const target = item.value;
13593
+ const field = col.field || col.name;
13594
+ const start = i + 1;
13595
+ const end = start + item.span;
13596
+ if (start < spanIndex) {
13597
+ return null;
13598
+ }
13599
+ spanIndex = end;
13600
+ const style = __spreadProps(__spreadValues(__spreadValues({}, col.style), item.style), {
13601
+ gridColumnStart: start,
13602
+ gridColumnEnd: end
13603
+ });
13604
+ const domProps = {
13605
+ style,
13606
+ className: MenuItemCls({
13607
+ hover,
13608
+ disabled: !!item.disabled,
13609
+ active: item.active,
13610
+ pressed
13611
+ }),
13612
+ onMouseEnter: () => {
13613
+ if (!item.disabled) {
13614
+ setHover(true);
13615
+ }
13616
+ },
13617
+ onMouseLeave: () => {
13618
+ if (!item.disabled) {
13619
+ setHover(false);
13620
+ }
13621
+ },
13622
+ onMouseDown: () => {
13623
+ if (!item.disabled) {
13624
+ setPressed(true);
13625
+ }
13626
+ },
13627
+ onMouseUp: () => {
13628
+ if (!item.disabled) {
13629
+ setPressed(false);
13630
+ }
13631
+ },
13632
+ onClick: () => {
13633
+ if (!item.disabled) {
13634
+ props.onClick(item);
13635
+ }
13636
+ }
13637
+ };
13638
+ return col.render ? /* @__PURE__ */ createElement36(RenderHookComponent, {
13639
+ render: col.render,
13640
+ renderParam: {
13641
+ item: target,
13642
+ column: col,
13643
+ value: target[field],
13644
+ domProps
13645
+ }
13646
+ }) : /* @__PURE__ */ createElement36("div", __spreadValues({
13647
+ key: `${key}-${field}`
13648
+ }, domProps), target[field]);
13649
+ }).filter(Boolean);
13650
+ }
13651
+ return /* @__PURE__ */ createElement36("div", {
13652
+ className: MenuRowCls
13653
+ }, content);
13654
+ }
13655
+ function MenuItem(_props) {
13656
+ return null;
13657
+ }
13658
+ MenuItem.defaultProps = {
13659
+ __is_menu_item: true
13660
+ };
13661
+
13382
13662
  // src/index.tsx
13383
13663
  var components = {
13384
13664
  CheckBox: InfiniteCheckBox,
@@ -13391,6 +13671,8 @@ export {
13391
13671
  InfiniteTable,
13392
13672
  InfiniteTableClassName,
13393
13673
  InfiniteTableComponent,
13674
+ Menu,
13675
+ MenuItem,
13394
13676
  NumberFilterEditor,
13395
13677
  RowSelectionState,
13396
13678
  StringFilterEditor,
@@ -13410,3 +13692,4 @@ export {
13410
13692
  useInfiniteColumnCell,
13411
13693
  useInfiniteHeaderCell
13412
13694
  };
13695
+ //!collapsed || lazyLoad;