@infinite-table/infinite-react 3.2.2 → 3.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.dev.mjs CHANGED
@@ -1367,7 +1367,7 @@ function stripVar(cssVariableWithVarString) {
1367
1367
 
1368
1368
  // src/components/InfiniteTable/theme.css.ts
1369
1369
  var InternalVars = { currentColumnTransformX: "var(--currentColumnTransformX__1slvgu90)", y: "var(--y__1slvgu91)", activeCellRowOffset: "var(--activeCellRowOffset__1slvgu92)", activeCellRowHeight: "var(--activeCellRowHeight__1slvgu93)", activeCellOffsetX: "var(--activeCellOffsetX__1slvgu94)", activeCellOffsetY: "var(--activeCellOffsetY__1slvgu95)", scrollTopForActiveRow: "var(--scrollTopForActiveRow__1slvgu96)", activeCellColWidth: "var(--activeCellColWidth__1slvgu97)", activeCellColOffset: "var(--activeCellColOffset__1slvgu98)", columnReorderEffectDurationAtIndex: "var(--columnReorderEffectDurationAtIndex__1slvgu99)", columnWidthAtIndex: "var(--columnWidthAtIndex__1slvgu9a)", columnOffsetAtIndex: "var(--columnOffsetAtIndex__1slvgu9b)", columnOffsetAtIndexWhileReordering: "var(--columnOffsetAtIndexWhileReordering__1slvgu9c)", columnZIndexAtIndex: "var(--columnZIndexAtIndex__1slvgu9d)", pinnedStartWidth: "var(--pinnedStartWidth__1slvgu9e)", pinnedEndWidth: "var(--pinnedEndWidth__1slvgu9f)", pinnedEndOffset: "var(--pinnedEndOffset__1slvgu9g)", computedVisibleColumnsCount: "var(--computedVisibleColumnsCount__1slvgu9h)", baseZIndexForCells: "var(--baseZIndexForCells__1slvgu9i)", bodyWidth: "var(--bodyWidth__1slvgu9j)", bodyHeight: "var(--bodyHeight__1slvgu9k)", scrollbarWidthHorizontal: "var(--scrollbarWidthHorizontal__1slvgu9l)", scrollbarWidthVertical: "var(--scrollbarWidthVertical__1slvgu9m)", scrollLeft: "var(--scrollLeft__1slvgu9n)", scrollTop: "var(--scrollTop__1slvgu9o)" };
1370
- 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)", iconSize: "var(--infinite-icon-size)", 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)", menuIconLineWidth: "var(--infinite-header-cell-menu-icon-line-width)", 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)", 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)" }, 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)", 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)", 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)" }, RowDetails: { background: "var(--infinite-rowdetails-background)", padding: "var(--infinite-rowdetails-padding)", gridHeight: "var(--infinite-rowdetails-grid-height)" }, 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)" } } };
1370
+ 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)", iconSize: "var(--infinite-icon-size)", 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)", menuIconLineWidth: "var(--infinite-header-cell-menu-icon-line-width)", 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)", 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)" }, 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)", 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)", 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-rowdetails-background)", padding: "var(--infinite-rowdetails-padding)", gridHeight: "var(--infinite-rowdetails-grid-height)" }, 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)" } } };
1371
1371
  var columnHeaderHeightName = "column-header-height";
1372
1372
 
1373
1373
  // src/utils/selectParent.ts
@@ -7838,10 +7838,10 @@ function getCellContext(context) {
7838
7838
  const {
7839
7839
  activeRowIndex,
7840
7840
  keyboardNavigation,
7841
- isRowDetailsEnabled
7841
+ isRowDetailEnabled: isRowDetailsEnabled
7842
7842
  } = getState();
7843
7843
  const rowActive = rowIndex === activeRowIndex && keyboardNavigation === "row";
7844
- const rowDetailState = !isRowDetailsEnabled || typeof isRowDetailsEnabled === "function" && !isRowDetailsEnabled(rowInfo) ? false : api.rowDetailsApi.isRowDetailsExpanded(rowInfo.id) ? "expanded" : "collapsed";
7844
+ const rowDetailState = !isRowDetailsEnabled || typeof isRowDetailsEnabled === "function" && !isRowDetailsEnabled(rowInfo) ? false : api.rowDetailApi.isRowDetailExpanded(rowInfo.id) ? "expanded" : "collapsed";
7845
7845
  const {
7846
7846
  formattedValue: value,
7847
7847
  formattedValueContext: { rawValue }
@@ -7978,10 +7978,10 @@ function getColumnRenderParam(options) {
7978
7978
  groupByColumn,
7979
7979
  selectionMode,
7980
7980
  api: imperativeApi,
7981
- toggleCurrentRowDetails: () => imperativeApi.rowDetailsApi.toggleRowDetails(rowInfo.id),
7982
- toggleRowDetails: imperativeApi.rowDetailsApi.toggleRowDetails,
7983
- expandRowDetails: imperativeApi.rowDetailsApi.expandRowDetails,
7984
- collapseRowDetails: imperativeApi.rowDetailsApi.collapseRowDetails,
7981
+ toggleCurrentRowDetails: () => imperativeApi.rowDetailApi.toggleRowDetail(rowInfo.id),
7982
+ toggleRowDetails: imperativeApi.rowDetailApi.toggleRowDetail,
7983
+ expandRowDetails: imperativeApi.rowDetailApi.expandRowDetail,
7984
+ collapseRowDetails: imperativeApi.rowDetailApi.collapseRowDetail,
7985
7985
  selectRow: imperativeApi.rowSelectionApi.selectRow,
7986
7986
  deselectRow: imperativeApi.rowSelectionApi.deselectRow,
7987
7987
  toggleRowSelection: imperativeApi.rowSelectionApi.toggleRowSelection,
@@ -8298,7 +8298,7 @@ function InfiniteTableColumnCellFn(props) {
8298
8298
  getData,
8299
8299
  cellStyle,
8300
8300
  cellClassName,
8301
- rowDetailState: rowDetailsState,
8301
+ rowDetailState,
8302
8302
  width,
8303
8303
  column,
8304
8304
  onMouseLeave,
@@ -8344,7 +8344,7 @@ function InfiniteTableColumnCellFn(props) {
8344
8344
  const colRenderingParams = getColumnRenderingParams({
8345
8345
  column,
8346
8346
  rowInfo,
8347
- rowDetailState: rowDetailsState,
8347
+ rowDetailState,
8348
8348
  columnsMap,
8349
8349
  visibleColumnsIds,
8350
8350
  fieldsToColumn,
@@ -8532,7 +8532,7 @@ function InfiniteTableColumnCellFn(props) {
8532
8532
  column,
8533
8533
  hidden,
8534
8534
  inEdit,
8535
- rowDetailsState,
8535
+ rowDetailState,
8536
8536
  ...objectValuesExcept(renderParam, {
8537
8537
  renderBag: true,
8538
8538
  selectCell: true,
@@ -14688,8 +14688,8 @@ var _FixedSizeMap = class {
14688
14688
  var FixedSizeMap = _FixedSizeMap;
14689
14689
  FixedSizeMap.DEFAULT_SIZE = 10;
14690
14690
 
14691
- // src/components/DataSource/RowDetailsCache.ts
14692
- var RowDetailsNoCacheStorage = class {
14691
+ // src/components/DataSource/RowDetailCache.ts
14692
+ var RowDetailNoCacheStorage = class {
14693
14693
  add(_key, _value) {
14694
14694
  return;
14695
14695
  }
@@ -14703,7 +14703,7 @@ var RowDetailsNoCacheStorage = class {
14703
14703
  return false;
14704
14704
  }
14705
14705
  };
14706
- var RowDetailsFixedSizeCacheStorage = class {
14706
+ var RowDetailFixedSizeCacheStorage = class {
14707
14707
  constructor(maxSize) {
14708
14708
  this.storage = new FixedSizeMap(maxSize);
14709
14709
  }
@@ -14720,7 +14720,7 @@ var RowDetailsFixedSizeCacheStorage = class {
14720
14720
  return this.storage.has(key);
14721
14721
  }
14722
14722
  };
14723
- var RowDetailsFullCacheStorage = class {
14723
+ var RowDetailFullCacheStorage = class {
14724
14724
  constructor() {
14725
14725
  this.storage = /* @__PURE__ */ new Map();
14726
14726
  }
@@ -14737,10 +14737,10 @@ var RowDetailsFullCacheStorage = class {
14737
14737
  return this.storage.has(key);
14738
14738
  }
14739
14739
  };
14740
- var RowDetailsCache = class {
14740
+ var RowDetailCache = class {
14741
14741
  // public instanceIndex: number = 0;
14742
14742
  constructor(cache) {
14743
- this.cacheStorage = cache === false ? new RowDetailsNoCacheStorage() : cache === true ? new RowDetailsFullCacheStorage() : typeof cache === "number" ? new RowDetailsFixedSizeCacheStorage(cache) : new RowDetailsFixedSizeCacheStorage(5);
14743
+ this.cacheStorage = cache === false ? new RowDetailNoCacheStorage() : cache === true ? new RowDetailFullCacheStorage() : typeof cache === "number" ? new RowDetailFixedSizeCacheStorage(cache) : new RowDetailFixedSizeCacheStorage(5);
14744
14744
  }
14745
14745
  add(key, value) {
14746
14746
  this.cacheStorage.add(key, value);
@@ -14756,6 +14756,203 @@ var RowDetailsCache = class {
14756
14756
  }
14757
14757
  };
14758
14758
 
14759
+ // src/components/DataSource/BooleanCollectionState.ts
14760
+ var BooleanCollectionState = class {
14761
+ constructor(state) {
14762
+ const stateObject = state instanceof Object.getPrototypeOf(this).constructor ? (
14763
+ //@ts-ignore
14764
+ state.getState()
14765
+ ) : state;
14766
+ const positiveItems = this.getPositiveFromState(stateObject);
14767
+ const negativeItems = this.getNegativeFromState(stateObject);
14768
+ this.update({
14769
+ negativeItems,
14770
+ positiveItems
14771
+ });
14772
+ }
14773
+ getInitialState() {
14774
+ return this.initialState;
14775
+ }
14776
+ // protected getState(): BooleanCollectionStateObject<KeyType> {
14777
+ // return {
14778
+ // positiveItems: this.allPositive
14779
+ // ? true
14780
+ // : this.positiveMap?.topDownKeys() ?? [],
14781
+ // negativeItems: this.allNegative
14782
+ // ? true
14783
+ // : this.negativeMap?.topDownKeys() ?? [],
14784
+ // };
14785
+ // }
14786
+ destroy() {
14787
+ var _a, _b;
14788
+ (_a = this.positiveMap) == null ? void 0 : _a.clear();
14789
+ (_b = this.negativeMap) == null ? void 0 : _b.clear();
14790
+ delete this.positiveMap;
14791
+ delete this.negativeMap;
14792
+ }
14793
+ update(state) {
14794
+ const { positiveItems, negativeItems } = state;
14795
+ this.allNegative = negativeItems === true;
14796
+ this.allPositive = positiveItems === true;
14797
+ if (this.allNegative && this.allPositive) {
14798
+ throw `Cannot have both negativeItems and positiveItems be true!`;
14799
+ }
14800
+ if (negativeItems && negativeItems !== true) {
14801
+ if (!this.negativeMap) {
14802
+ this.negativeMap = /* @__PURE__ */ new Map();
14803
+ }
14804
+ this.negativeMap.clear();
14805
+ for (let k of negativeItems) {
14806
+ this.negativeMap.set(k, true);
14807
+ }
14808
+ if (this.positiveMap) {
14809
+ this.positiveMap.clear();
14810
+ }
14811
+ }
14812
+ if (positiveItems && positiveItems !== true) {
14813
+ if (!this.positiveMap) {
14814
+ this.positiveMap = /* @__PURE__ */ new Map();
14815
+ }
14816
+ this.positiveMap.clear();
14817
+ for (let k of positiveItems) {
14818
+ this.positiveMap.set(k, true);
14819
+ }
14820
+ if (this.negativeMap) {
14821
+ this.negativeMap.clear();
14822
+ }
14823
+ }
14824
+ }
14825
+ isDefaultNegativeSelection() {
14826
+ return this.allNegative;
14827
+ }
14828
+ isDefaultPositiveSelection() {
14829
+ return this.allPositive;
14830
+ }
14831
+ areAllNegative() {
14832
+ return this.allNegative && (this.positiveMap ? this.positiveMap.size === 0 : true);
14833
+ }
14834
+ areAllPositive() {
14835
+ return this.allPositive && (this.negativeMap ? this.negativeMap.size === 0 : true);
14836
+ }
14837
+ makeAllNegative() {
14838
+ this.update({
14839
+ negativeItems: true,
14840
+ positiveItems: []
14841
+ });
14842
+ }
14843
+ makeAllPositive() {
14844
+ this.update({
14845
+ positiveItems: true,
14846
+ negativeItems: []
14847
+ });
14848
+ }
14849
+ isItemPositive(key) {
14850
+ var _a, _b;
14851
+ if (this.allPositive === true) {
14852
+ if (this.allNegative === true) {
14853
+ throw 'Cannot have both positiveItems and negativeItems be "true"';
14854
+ }
14855
+ return !((_a = this.negativeMap) == null ? void 0 : _a.has(key));
14856
+ }
14857
+ return !!((_b = this.positiveMap) == null ? void 0 : _b.has(key));
14858
+ }
14859
+ isItemNegative(key) {
14860
+ return !this.isItemPositive(key);
14861
+ }
14862
+ setItemValue(key, shouldMakePositive) {
14863
+ var _a;
14864
+ if (shouldMakePositive === this.isItemPositive(key)) {
14865
+ return;
14866
+ }
14867
+ if (shouldMakePositive) {
14868
+ if (this.allNegative === true) {
14869
+ if (!this.positiveMap) {
14870
+ throw `No positiveMap found when trying to set item ${key} be positive`;
14871
+ }
14872
+ this.positiveMap.set(key, true);
14873
+ } else if (this.allPositive === true) {
14874
+ if (!this.negativeMap) {
14875
+ throw `No negativeMap found when trying to set item ${key} be positive`;
14876
+ }
14877
+ this.negativeMap.delete(key);
14878
+ }
14879
+ } else {
14880
+ if (this.allPositive === true) {
14881
+ if (!this.negativeMap) {
14882
+ throw `No negativeMap found when trying to set item ${key} be negative`;
14883
+ }
14884
+ this.negativeMap.set(key, true);
14885
+ } else if (this.allNegative === true) {
14886
+ if (!this.positiveMap) {
14887
+ throw `No positiveMap found when trying to set item ${key} be negative`;
14888
+ }
14889
+ (_a = this.positiveMap) == null ? void 0 : _a.delete(key);
14890
+ }
14891
+ }
14892
+ }
14893
+ makeItemNegative(key) {
14894
+ this.setItemValue(key, false);
14895
+ }
14896
+ makeItemPositive(key) {
14897
+ this.setItemValue(key, true);
14898
+ }
14899
+ toggleItem(key) {
14900
+ this.setItemValue(key, !this.isItemPositive(key));
14901
+ }
14902
+ };
14903
+
14904
+ // src/components/DataSource/RowDetailState.ts
14905
+ var RowDetailState = class extends BooleanCollectionState {
14906
+ constructor(state) {
14907
+ super(state);
14908
+ this.isRowDetailsExpanded = (key) => {
14909
+ return !!this.isItemPositive(key);
14910
+ };
14911
+ }
14912
+ getState() {
14913
+ var _a, _b, _c, _d;
14914
+ const expandedRows = this.allPositive ? true : [...(_b = (_a = this.positiveMap) == null ? void 0 : _a.keys()) != null ? _b : []];
14915
+ const collapsedRows = this.allNegative ? true : [...(_d = (_c = this.negativeMap) == null ? void 0 : _c.keys()) != null ? _d : []];
14916
+ return {
14917
+ expandedRows,
14918
+ collapsedRows
14919
+ };
14920
+ }
14921
+ getPositiveFromState(state) {
14922
+ return state.expandedRows;
14923
+ }
14924
+ getNegativeFromState(state) {
14925
+ return state.collapsedRows;
14926
+ }
14927
+ areAllCollapsed() {
14928
+ return this.areAllNegative();
14929
+ }
14930
+ areAllExpanded() {
14931
+ return this.areAllPositive();
14932
+ }
14933
+ collapseAll() {
14934
+ this.makeAllNegative();
14935
+ }
14936
+ expandAll() {
14937
+ this.makeAllPositive();
14938
+ }
14939
+ isRowDetailsCollapsed(key) {
14940
+ return !this.isRowDetailsExpanded(key);
14941
+ }
14942
+ setRowDetailsExpanded(key, shouldExpand) {
14943
+ return this.setItemValue(key, shouldExpand);
14944
+ }
14945
+ collapseRowDetails(key) {
14946
+ this.setRowDetailsExpanded(key, false);
14947
+ }
14948
+ expandRowDetails(key) {
14949
+ this.setRowDetailsExpanded(key, true);
14950
+ }
14951
+ toggleRowDetails(key) {
14952
+ this.toggleItem(key);
14953
+ }
14954
+ };
14955
+
14759
14956
  // src/components/DataSource/types.ts
14760
14957
  var DataSourceActionType = /* @__PURE__ */ ((DataSourceActionType2) => {
14761
14958
  DataSourceActionType2["INIT"] = "INIT";
@@ -15124,271 +15321,74 @@ function getCellSelectionApi(param) {
15124
15321
  return cellSelectionApi;
15125
15322
  }
15126
15323
 
15127
- // src/components/DataSource/BooleanCollectionState.ts
15128
- var BooleanCollectionState = class {
15129
- constructor(state) {
15130
- const stateObject = state instanceof Object.getPrototypeOf(this).constructor ? (
15131
- //@ts-ignore
15132
- state.getState()
15133
- ) : state;
15134
- const positiveItems = this.getPositiveFromState(stateObject);
15135
- const negativeItems = this.getNegativeFromState(stateObject);
15136
- this.update({
15137
- negativeItems,
15138
- positiveItems
15139
- });
15140
- }
15141
- getInitialState() {
15142
- return this.initialState;
15143
- }
15144
- // protected getState(): BooleanCollectionStateObject<KeyType> {
15145
- // return {
15146
- // positiveItems: this.allPositive
15147
- // ? true
15148
- // : this.positiveMap?.topDownKeys() ?? [],
15149
- // negativeItems: this.allNegative
15150
- // ? true
15151
- // : this.negativeMap?.topDownKeys() ?? [],
15152
- // };
15153
- // }
15154
- destroy() {
15155
- var _a, _b;
15156
- (_a = this.positiveMap) == null ? void 0 : _a.clear();
15157
- (_b = this.negativeMap) == null ? void 0 : _b.clear();
15158
- delete this.positiveMap;
15159
- delete this.negativeMap;
15160
- }
15161
- update(state) {
15162
- const { positiveItems, negativeItems } = state;
15163
- this.allNegative = negativeItems === true;
15164
- this.allPositive = positiveItems === true;
15165
- if (this.allNegative && this.allPositive) {
15166
- throw `Cannot have both negativeItems and positiveItems be true!`;
15167
- }
15168
- if (negativeItems && negativeItems !== true) {
15169
- if (!this.negativeMap) {
15170
- this.negativeMap = /* @__PURE__ */ new Map();
15171
- }
15172
- this.negativeMap.clear();
15173
- for (let k of negativeItems) {
15174
- this.negativeMap.set(k, true);
15175
- }
15176
- if (this.positiveMap) {
15177
- this.positiveMap.clear();
15178
- }
15179
- }
15180
- if (positiveItems && positiveItems !== true) {
15181
- if (!this.positiveMap) {
15182
- this.positiveMap = /* @__PURE__ */ new Map();
15183
- }
15184
- this.positiveMap.clear();
15185
- for (let k of positiveItems) {
15186
- this.positiveMap.set(k, true);
15187
- }
15188
- if (this.negativeMap) {
15189
- this.negativeMap.clear();
15190
- }
15191
- }
15192
- }
15193
- isDefaultNegativeSelection() {
15194
- return this.allNegative;
15195
- }
15196
- isDefaultPositiveSelection() {
15197
- return this.allPositive;
15198
- }
15199
- areAllNegative() {
15200
- return this.allNegative && (this.positiveMap ? this.positiveMap.size === 0 : true);
15201
- }
15202
- areAllPositive() {
15203
- return this.allPositive && (this.negativeMap ? this.negativeMap.size === 0 : true);
15204
- }
15205
- makeAllNegative() {
15206
- this.update({
15207
- negativeItems: true,
15208
- positiveItems: []
15209
- });
15210
- }
15211
- makeAllPositive() {
15212
- this.update({
15213
- positiveItems: true,
15214
- negativeItems: []
15215
- });
15216
- }
15217
- isItemPositive(key) {
15218
- var _a, _b;
15219
- if (this.allPositive === true) {
15220
- if (this.allNegative === true) {
15221
- throw 'Cannot have both positiveItems and negativeItems be "true"';
15222
- }
15223
- return !((_a = this.negativeMap) == null ? void 0 : _a.has(key));
15224
- }
15225
- return !!((_b = this.positiveMap) == null ? void 0 : _b.has(key));
15226
- }
15227
- isItemNegative(key) {
15228
- return !this.isItemPositive(key);
15229
- }
15230
- setItemValue(key, shouldMakePositive) {
15231
- var _a;
15232
- if (shouldMakePositive === this.isItemPositive(key)) {
15233
- return;
15234
- }
15235
- if (shouldMakePositive) {
15236
- if (this.allNegative === true) {
15237
- if (!this.positiveMap) {
15238
- throw `No positiveMap found when trying to set item ${key} be positive`;
15239
- }
15240
- this.positiveMap.set(key, true);
15241
- } else if (this.allPositive === true) {
15242
- if (!this.negativeMap) {
15243
- throw `No negativeMap found when trying to set item ${key} be positive`;
15244
- }
15245
- this.negativeMap.delete(key);
15246
- }
15247
- } else {
15248
- if (this.allPositive === true) {
15249
- if (!this.negativeMap) {
15250
- throw `No negativeMap found when trying to set item ${key} be negative`;
15251
- }
15252
- this.negativeMap.set(key, true);
15253
- } else if (this.allNegative === true) {
15254
- if (!this.positiveMap) {
15255
- throw `No positiveMap found when trying to set item ${key} be negative`;
15256
- }
15257
- (_a = this.positiveMap) == null ? void 0 : _a.delete(key);
15258
- }
15259
- }
15260
- }
15261
- makeItemNegative(key) {
15262
- this.setItemValue(key, false);
15263
- }
15264
- makeItemPositive(key) {
15265
- this.setItemValue(key, true);
15266
- }
15267
- toggleItem(key) {
15268
- this.setItemValue(key, !this.isItemPositive(key));
15269
- }
15270
- };
15271
-
15272
- // src/components/DataSource/RowDetailsState.ts
15273
- var RowDetailsState = class extends BooleanCollectionState {
15274
- constructor(state) {
15275
- super(state);
15276
- this.isRowDetailsExpanded = (key) => {
15277
- return !!this.isItemPositive(key);
15278
- };
15279
- }
15280
- getState() {
15281
- var _a, _b, _c, _d;
15282
- const expandedRows = this.allPositive ? true : [...(_b = (_a = this.positiveMap) == null ? void 0 : _a.keys()) != null ? _b : []];
15283
- const collapsedRows = this.allNegative ? true : [...(_d = (_c = this.negativeMap) == null ? void 0 : _c.keys()) != null ? _d : []];
15284
- return {
15285
- expandedRows,
15286
- collapsedRows
15287
- };
15288
- }
15289
- getPositiveFromState(state) {
15290
- return state.expandedRows;
15291
- }
15292
- getNegativeFromState(state) {
15293
- return state.collapsedRows;
15294
- }
15295
- areAllCollapsed() {
15296
- return this.areAllNegative();
15297
- }
15298
- areAllExpanded() {
15299
- return this.areAllPositive();
15300
- }
15301
- collapseAll() {
15302
- this.makeAllNegative();
15303
- }
15304
- expandAll() {
15305
- this.makeAllPositive();
15306
- }
15307
- isRowDetailsCollapsed(key) {
15308
- return !this.isRowDetailsExpanded(key);
15309
- }
15310
- setRowDetailsExpanded(key, shouldExpand) {
15311
- return this.setItemValue(key, shouldExpand);
15312
- }
15313
- collapseRowDetails(key) {
15314
- this.setRowDetailsExpanded(key, false);
15315
- }
15316
- expandRowDetails(key) {
15317
- this.setRowDetailsExpanded(key, true);
15318
- }
15319
- toggleRowDetails(key) {
15320
- this.toggleItem(key);
15321
- }
15322
- };
15323
-
15324
- // src/components/InfiniteTable/api/getRowDetailsApi.ts
15325
- function getRowDetailsApi(param) {
15324
+ // src/components/InfiniteTable/api/getRowDetailApi.ts
15325
+ function getRowDetailApi(param) {
15326
15326
  const {
15327
15327
  dataSourceApi,
15328
15328
  getState,
15329
15329
  actions
15330
15330
  } = param;
15331
- const rowDetailsApi = {
15331
+ const rowDetailApi = {
15332
15332
  collapseAllDetails() {
15333
- actions.rowDetailsState = new RowDetailsState({
15333
+ actions.rowDetailState = new RowDetailState({
15334
15334
  collapsedRows: true,
15335
15335
  expandedRows: []
15336
15336
  });
15337
15337
  },
15338
15338
  expandAllDetails() {
15339
- actions.rowDetailsState = new RowDetailsState({
15339
+ actions.rowDetailState = new RowDetailState({
15340
15340
  expandedRows: true,
15341
15341
  collapsedRows: []
15342
15342
  });
15343
15343
  },
15344
- isRowDetailsCollapsed(pk) {
15345
- const isRowDetailsExpanded = getState().isRowDetailsExpanded;
15346
- if (!isRowDetailsExpanded) {
15344
+ isRowDetailCollapsed(pk) {
15345
+ const isRowDetailExpanded = getState().isRowDetailExpanded;
15346
+ if (!isRowDetailExpanded) {
15347
15347
  return true;
15348
15348
  }
15349
15349
  const rowInfo = dataSourceApi.getRowInfoByPrimaryKey(pk);
15350
15350
  if (!rowInfo) {
15351
15351
  return true;
15352
15352
  }
15353
- const expanded = isRowDetailsExpanded(rowInfo);
15353
+ const expanded = isRowDetailExpanded(rowInfo);
15354
15354
  return !expanded;
15355
15355
  },
15356
- isRowDetailsExpanded(pk) {
15357
- return !rowDetailsApi.isRowDetailsCollapsed(pk);
15356
+ isRowDetailExpanded(pk) {
15357
+ return !rowDetailApi.isRowDetailCollapsed(pk);
15358
15358
  },
15359
- collapseRowDetails(pk) {
15360
- const currentState = getState().rowDetailsState;
15359
+ collapseRowDetail(pk) {
15360
+ const currentState = getState().rowDetailState;
15361
15361
  if (!currentState) {
15362
15362
  console.error(
15363
- `Cannot collapse row details via rowDetailsState, as no props.rowDetailsState is provided.`
15363
+ `Cannot collapse row details via rowDetailState, as no props.rowDetailState is provided.`
15364
15364
  );
15365
15365
  return;
15366
15366
  }
15367
- const state = new RowDetailsState(currentState);
15367
+ const state = new RowDetailState(currentState);
15368
15368
  state.collapseRowDetails(pk);
15369
- actions.rowDetailsState = state;
15369
+ actions.rowDetailState = state;
15370
15370
  },
15371
- expandRowDetails(pk) {
15372
- const currentState = getState().rowDetailsState;
15371
+ expandRowDetail(pk) {
15372
+ const currentState = getState().rowDetailState;
15373
15373
  if (!currentState) {
15374
15374
  console.error(
15375
- `Cannot expand row details via rowDetailsState, as no props.rowDetailsState is provided.`
15375
+ `Cannot expand row details via rowDetailState, as no props.rowDetailState is provided.`
15376
15376
  );
15377
15377
  return;
15378
15378
  }
15379
- const state = new RowDetailsState(currentState);
15379
+ const state = new RowDetailState(currentState);
15380
15380
  state.expandRowDetails(pk);
15381
- actions.rowDetailsState = state;
15381
+ actions.rowDetailState = state;
15382
15382
  },
15383
- toggleRowDetails(pk) {
15384
- if (rowDetailsApi.isRowDetailsExpanded(pk)) {
15385
- rowDetailsApi.collapseRowDetails(pk);
15383
+ toggleRowDetail(pk) {
15384
+ if (rowDetailApi.isRowDetailExpanded(pk)) {
15385
+ rowDetailApi.collapseRowDetail(pk);
15386
15386
  } else {
15387
- rowDetailsApi.expandRowDetails(pk);
15387
+ rowDetailApi.expandRowDetail(pk);
15388
15388
  }
15389
15389
  }
15390
15390
  };
15391
- return rowDetailsApi;
15391
+ return rowDetailApi;
15392
15392
  }
15393
15393
 
15394
15394
  // src/components/InfiniteTable/api/getImperativeApi.ts
@@ -15648,14 +15648,14 @@ var InfiniteTableApiImpl = class {
15648
15648
  return null;
15649
15649
  }
15650
15650
  const self = this;
15651
- const { isRowDetailsEnabled } = getState();
15652
- const rowDetailsState = !isRowDetailsEnabled || typeof isRowDetailsEnabled === "function" && !isRowDetailsEnabled(rowInfo) ? false : this.rowDetailsApi.isRowDetailsExpanded(rowInfo.id) ? "expanded" : "collapsed";
15651
+ const { isRowDetailEnabled: isRowDetailsEnabled } = getState();
15652
+ const rowDetailState = !isRowDetailsEnabled || typeof isRowDetailsEnabled === "function" && !isRowDetailsEnabled(rowInfo) ? false : this.rowDetailApi.isRowDetailExpanded(rowInfo.id) ? "expanded" : "collapsed";
15653
15653
  const valueContext = getFormattedValueContextForCell({
15654
15654
  column,
15655
15655
  rowInfo,
15656
15656
  columnsMap: computedColumnsMap,
15657
15657
  context: __spreadProps(__spreadValues({}, this.context), { api: self }),
15658
- rowDetailState: rowDetailsState
15658
+ rowDetailState
15659
15659
  });
15660
15660
  return {
15661
15661
  value: valueContext.formattedValueContext.value,
@@ -15794,7 +15794,7 @@ var InfiniteTableApiImpl = class {
15794
15794
  dataSourceActions: context.dataSourceActions,
15795
15795
  getDataSourceState: context.getDataSourceState
15796
15796
  });
15797
- this.rowDetailsApi = getRowDetailsApi({
15797
+ this.rowDetailApi = getRowDetailApi({
15798
15798
  getState: context.getState,
15799
15799
  actions: context.actions,
15800
15800
  dataSourceApi: context.dataSourceApi
@@ -16440,8 +16440,8 @@ function useYourBrain(param) {
16440
16440
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableDetailRow.tsx
16441
16441
  import * as React52 from "react";
16442
16442
 
16443
- // src/components/InfiniteTable/components/rowDetails.css.ts
16444
- var RowDetailsRecipe = createRuntimeFn({ defaultClassName: "rowDetails_RowDetailsRecipe__1qedcqn0", variantClassNames: {}, defaultVariants: {}, compoundVariants: [] });
16443
+ // src/components/InfiniteTable/components/rowDetail.css.ts
16444
+ var RowDetailRecipe = createRuntimeFn({ defaultClassName: "rowDetail_RowDetailRecipe__evqes20", variantClassNames: {}, defaultVariants: {}, compoundVariants: [] });
16445
16445
 
16446
16446
  // src/components/InfiniteTable/components/InfiniteTableRow/useRegisterDetail.ts
16447
16447
  import { useMemo as useMemo8, useRef as useRef23 } from "react";
@@ -16576,7 +16576,7 @@ function InfiniteTableDetailRowFn(props) {
16576
16576
  "div",
16577
16577
  {
16578
16578
  ref: domRef,
16579
- className: join(InfiniteTableRowDetailsClassName, RowDetailsRecipe({})),
16579
+ className: join(InfiniteTableRowDetailsClassName, RowDetailRecipe({})),
16580
16580
  style: {
16581
16581
  position: "absolute",
16582
16582
  top: `${detailOffset}px`,
@@ -16624,12 +16624,12 @@ function useCellRendering(param) {
16624
16624
  brain,
16625
16625
  showZebraRows,
16626
16626
  rowDetailRenderer,
16627
- isRowDetailsExpanded,
16628
- isRowDetailsEnabled,
16627
+ isRowDetailExpanded: isRowDetailsExpanded,
16628
+ isRowDetailEnabled: isRowDetailsEnabled,
16629
16629
  cellClassName,
16630
16630
  cellStyle,
16631
16631
  rowStyle,
16632
- rowDetailsCache,
16632
+ rowDetailCache: rowDetailsCache,
16633
16633
  rowClassName,
16634
16634
  onScrollToTop,
16635
16635
  onScrollToBottom,
@@ -17380,9 +17380,9 @@ var forwardProps4 = (setupState) => {
17380
17380
  scrollStopDelay: (scrollStopDelay) => scrollStopDelay != null ? scrollStopDelay : 250,
17381
17381
  viewportReservedWidth: (viewportReservedWidth) => viewportReservedWidth != null ? viewportReservedWidth : 0,
17382
17382
  resizableColumns: (resizableColumns) => resizableColumns != null ? resizableColumns : true,
17383
- rowDetailsCache: (rowDetailsCache) => {
17384
- return new RowDetailsCache(
17385
- rowDetailsCache
17383
+ rowDetailCache: (rowDetailCache) => {
17384
+ return new RowDetailCache(
17385
+ rowDetailCache
17386
17386
  );
17387
17387
  },
17388
17388
  hideColumnWhenGrouped: (hideColumnWhenGrouped) => hideColumnWhenGrouped != null ? hideColumnWhenGrouped : false,
@@ -17487,34 +17487,34 @@ var mapPropsToState = (params) => {
17487
17487
  groupBy,
17488
17488
  groupColumn: props.groupColumn
17489
17489
  });
17490
- let rowDetailsState = void 0;
17490
+ let rowDetailState = void 0;
17491
17491
  if (props.rowDetailRenderer) {
17492
- rowDetailsState = props.rowDetailsState || state.rowDetailsState || props.defaultRowDetailsState;
17493
- if (rowDetailsState && !(rowDetailsState instanceof RowDetailsState)) {
17494
- rowDetailsState = new RowDetailsState(rowDetailsState);
17492
+ rowDetailState = props.rowDetailState || state.rowDetailState || props.defaultRowDetailState;
17493
+ if (rowDetailState && !(rowDetailState instanceof RowDetailState)) {
17494
+ rowDetailState = new RowDetailState(rowDetailState);
17495
17495
  }
17496
- rowDetailsState = rowDetailsState || new RowDetailsState({ expandedRows: [], collapsedRows: true });
17496
+ rowDetailState = rowDetailState || new RowDetailState({ expandedRows: [], collapsedRows: true });
17497
17497
  }
17498
17498
  const computedColumns = state.columnsWhenGrouping || state.columnsWhenInlineGroupRenderStrategy || state.columns;
17499
- let isRowDetailsExpanded = rowDetailsState ? props.isRowDetailsExpanded : void 0;
17500
- if (!isRowDetailsExpanded && rowDetailsState) {
17501
- isRowDetailsExpanded = weakMap.get(rowDetailsState);
17502
- if (!isRowDetailsExpanded) {
17503
- isRowDetailsExpanded = (rowInfo) => {
17504
- return rowDetailsState.isRowDetailsExpanded(
17499
+ let isRowDetailExpanded = rowDetailState ? props.isRowDetailExpanded : void 0;
17500
+ if (!isRowDetailExpanded && rowDetailState) {
17501
+ isRowDetailExpanded = weakMap.get(rowDetailState);
17502
+ if (!isRowDetailExpanded) {
17503
+ isRowDetailExpanded = (rowInfo) => {
17504
+ return rowDetailState.isRowDetailsExpanded(
17505
17505
  rowInfo.id
17506
17506
  );
17507
17507
  };
17508
- if (typeof rowDetailsState === "object") {
17509
- weakMap.set(rowDetailsState, isRowDetailsExpanded);
17508
+ if (typeof rowDetailState === "object") {
17509
+ weakMap.set(rowDetailState, isRowDetailExpanded);
17510
17510
  }
17511
17511
  }
17512
17512
  }
17513
- const isRowDetailsEnabled = !props.rowDetailRenderer ? false : props.isRowDetailsEnabled || true;
17513
+ const isRowDetailEnabled = !props.rowDetailRenderer ? false : props.isRowDetailEnabled || true;
17514
17514
  return {
17515
- rowDetailsState,
17516
- isRowDetailsExpanded,
17517
- isRowDetailsEnabled,
17515
+ rowDetailState,
17516
+ isRowDetailExpanded,
17517
+ isRowDetailEnabled,
17518
17518
  showColumnFilters: (_a = props.showColumnFilters) != null ? _a : !!parentState.filterValue,
17519
17519
  controlledColumnVisibility: !!props.columnVisibility,
17520
17520
  groupRenderStrategy,
@@ -18385,8 +18385,8 @@ function useComputed() {
18385
18385
  columnTypes,
18386
18386
  rowHeight,
18387
18387
  rowDetailHeight,
18388
- isRowDetailsExpanded,
18389
- isRowDetailsEnabled,
18388
+ isRowDetailExpanded: isRowDetailsExpanded,
18389
+ isRowDetailEnabled: isRowDetailsEnabled,
18390
18390
  brain,
18391
18391
  bodySize,
18392
18392
  showSeparatePivotColumnForSingleAggregation
@@ -18707,7 +18707,7 @@ var useLicense = (licenseKey = "") => {
18707
18707
  const valid = useMemo14(() => {
18708
18708
  let valid2 = isValidLicense(licenseKey, {
18709
18709
  publishedAt: 1624970570587,
18710
- version: "3.2.2"
18710
+ version: "3.2.3"
18711
18711
  });
18712
18712
  if (!licenseKey && !valid2 && isInsidePlayground) {
18713
18713
  return true;
@@ -19245,7 +19245,7 @@ var RETRIES3 = 10;
19245
19245
  var SORT_ASC2 = (a, b) => a - b;
19246
19246
  function isCellFocusable(cellPos, context) {
19247
19247
  const { getComputed, getDataSourceState, getState, api, dataSourceApi } = context;
19248
- const { editingCell, isRowDetailsEnabled } = getState();
19248
+ const { editingCell, isRowDetailEnabled: isRowDetailsEnabled } = getState();
19249
19249
  const { dataArray } = getDataSourceState();
19250
19250
  const { computedVisibleColumns, computedColumnsMap } = getComputed();
19251
19251
  const column = computedVisibleColumns[cellPos.colIndex];
@@ -19262,7 +19262,7 @@ function isCellFocusable(cellPos, context) {
19262
19262
  return true;
19263
19263
  }
19264
19264
  const rowInfo = dataArray[cellPos.rowIndex];
19265
- const rowDetailState = !isRowDetailsEnabled || typeof isRowDetailsEnabled === "function" && !isRowDetailsEnabled(rowInfo) ? false : api.rowDetailsApi.isRowDetailsExpanded(rowInfo.id) ? "expanded" : "collapsed";
19265
+ const rowDetailState = !isRowDetailsEnabled || typeof isRowDetailsEnabled === "function" && !isRowDetailsEnabled(rowInfo) ? false : api.rowDetailApi.isRowDetailExpanded(rowInfo.id) ? "expanded" : "collapsed";
19266
19266
  const columnApi = getColumnApiForColumn(column.id, context);
19267
19267
  return column.contentFocusable(__spreadProps(__spreadValues({
19268
19268
  column
@@ -22557,7 +22557,8 @@ export {
22557
22557
  InfiniteTableClassName,
22558
22558
  InfiniteTableComponent,
22559
22559
  Menu,
22560
- RowDetailsCache,
22560
+ RowDetailCache,
22561
+ RowDetailState,
22561
22562
  RowSelectionState,
22562
22563
  WeakFixedSizeSet,
22563
22564
  components,