@infinite-table/infinite-react 3.3.3 → 4.0.0

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.js CHANGED
@@ -5711,11 +5711,11 @@ var getComputedColumns = ({
5711
5711
  {}
5712
5712
  );
5713
5713
  const normalizedColumnOrder = adjustColumnOrderForPinning(
5714
- columnOrder === true ? [...columns.keys()] : columnOrder,
5714
+ columnOrder === true ? Object.keys(columns) : columnOrder,
5715
5715
  columnPinning
5716
5716
  );
5717
5717
  const visibleColumnOrder = normalizedColumnOrder.filter((colId) => {
5718
- const col = columns.get(colId);
5718
+ const col = columns[colId];
5719
5719
  if (!col) {
5720
5720
  logError(
5721
5721
  `Column with id "${colId}" specified in columnOrder array cannot be found in the columns map.`
@@ -5732,7 +5732,7 @@ var getComputedColumns = ({
5732
5732
  const columnIdsToVisibleIndex = /* @__PURE__ */ new Map();
5733
5733
  const visibleColumnsArray = visibleColumnOrder.map(
5734
5734
  (columnId, index) => {
5735
- const col = columns.get(columnId);
5735
+ const col = columns[columnId];
5736
5736
  columnIdsToVisibleIndex.set(columnId, index);
5737
5737
  return col;
5738
5738
  }
@@ -5753,7 +5753,7 @@ var getComputedColumns = ({
5753
5753
  );
5754
5754
  function getColSize(colId) {
5755
5755
  var _a, _b, _c, _d, _e, _f;
5756
- const column = columns.get(colId);
5756
+ const column = columns[colId];
5757
5757
  const colType = getColumnComputedType(column, columnTypes);
5758
5758
  const colTypeSizing = {
5759
5759
  minWidth: colType == null ? void 0 : colType.minWidth,
@@ -5844,7 +5844,8 @@ var getComputedColumns = ({
5844
5844
  orderedColumns.set(id, c);
5845
5845
  });
5846
5846
  const columnIdsInitialColumnOrder = [];
5847
- columns.forEach((c, key) => {
5847
+ Object.keys(columns).forEach((key) => {
5848
+ const c = columns[key];
5848
5849
  columnIdsInitialColumnOrder.push(key);
5849
5850
  if (!orderedColumns.has(key)) {
5850
5851
  orderedColumns.set(key, c);
@@ -9623,7 +9624,7 @@ function buildColumnAndGroupTree(columns, columnGroups, columnGroupsDepthsMap, c
9623
9624
  let colGroupItem;
9624
9625
  let prevGroupItem = colItem;
9625
9626
  while (groupId) {
9626
- const colGroup = columnGroups.get(groupId);
9627
+ const colGroup = columnGroups[groupId];
9627
9628
  if (colGroup) {
9628
9629
  parentGroups.add(groupId);
9629
9630
  const groupAbsoluteId = [colId, ...parentGroups];
@@ -10065,10 +10066,10 @@ function TableHeaderWrapper(props) {
10065
10066
  showColumnFilters
10066
10067
  }
10067
10068
  } = tableContextValue;
10068
- const rows = !computedColumnGroups || !computedColumnGroups.size ? 1 : columnGroupsMaxDepth + 2;
10069
+ const rows = !computedColumnGroups || !Object.keys(computedColumnGroups).length ? 1 : columnGroupsMaxDepth + 2;
10069
10070
  const height = rows * columnHeaderHeight + (showColumnFilters ? columnHeaderHeight : 0);
10070
10071
  const columnAndGroupTreeInfo = React48.useMemo(() => {
10071
- if (!computedColumnGroups || !computedColumnGroups.size) {
10072
+ if (!computedColumnGroups || !Object.keys(computedColumnGroups).length) {
10072
10073
  return void 0;
10073
10074
  }
10074
10075
  return buildColumnAndGroupTree(
@@ -11801,46 +11802,25 @@ function getPivotColumnsAndColumnGroups({
11801
11802
  reducer: () => null
11802
11803
  });
11803
11804
  }
11804
- const columns = /* @__PURE__ */ new Map([
11805
- // [
11806
- // 'labels',
11807
- // {
11808
- // header: 'Row labels',
11809
- // pivotBy,
11810
- // valueGetter: (params) => {
11811
- // const { rowInfo } = params;
11812
- // if (!rowInfo.data) {
11813
- // // TODO replace with loading spinner
11814
- // return 'Loading ...';
11815
- // }
11816
- // return rowInfo.groupKeys
11817
- // ? rowInfo.groupKeys[rowInfo.groupKeys?.length - 1]
11818
- // : null;
11819
- // },
11820
- // },
11821
- // ],
11822
- ]);
11823
- const columnGroups = /* @__PURE__ */ new Map();
11805
+ const columns = {};
11806
+ const columnGroups = {};
11824
11807
  const addGrandTotalColumns = once(function() {
11825
11808
  aggregationReducers.forEach((reducer, index) => {
11826
- columns.set(
11827
- `total:${reducer.id}`,
11828
- prepareColumn({
11829
- header: `${reducer.name || reducer.id} total`,
11830
- pivotBy,
11831
- pivotColumn: true,
11832
- pivotTotalColumn: true,
11833
- pivotAggregator: reducer,
11834
- pivotAggregatorIndex: index,
11835
- pivotGroupKeys: [],
11836
- pivotGroupKey: "",
11837
- pivotIndex: -1,
11838
- valueFormatter: ({ rowInfo }) => {
11839
- var _a;
11840
- return rowInfo.isGroupRow ? (_a = rowInfo.reducerResults) == null ? void 0 : _a[reducer.id] : null;
11841
- }
11842
- })
11843
- );
11809
+ columns[`total:${reducer.id}`] = prepareColumn({
11810
+ header: `${reducer.name || reducer.id} total`,
11811
+ pivotBy,
11812
+ pivotColumn: true,
11813
+ pivotTotalColumn: true,
11814
+ pivotAggregator: reducer,
11815
+ pivotAggregatorIndex: index,
11816
+ pivotGroupKeys: [],
11817
+ pivotGroupKey: "",
11818
+ pivotIndex: -1,
11819
+ valueFormatter: ({ rowInfo }) => {
11820
+ var _a;
11821
+ return rowInfo.isGroupRow ? (_a = rowInfo.reducerResults) == null ? void 0 : _a[reducer.id] : null;
11822
+ }
11823
+ });
11844
11824
  });
11845
11825
  });
11846
11826
  if (!pivotLength && pivotTotalColumnPosition === "start" || pivotGrandTotalColumnPosition === "start") {
@@ -11860,18 +11840,15 @@ function getPivotColumnsAndColumnGroups({
11860
11840
  const columnGroupId = parentColumnGroupId;
11861
11841
  parentColumnGroupId = keys.join("/");
11862
11842
  const pivotGroupKey = keys[keys.length - 1];
11863
- columnGroups.set(
11864
- parentColumnGroupId,
11865
- prepareColumnGroup({
11866
- header: `${pivotGroupKey}`,
11867
- columnGroup: columnGroupId,
11868
- pivotBy,
11869
- pivotGroupKeys: keys,
11870
- pivotByAtIndex: pivotByForColumn,
11871
- pivotIndex: keys.length - 1,
11872
- pivotGroupKey
11873
- })
11874
- );
11843
+ columnGroups[parentColumnGroupId] = prepareColumnGroup({
11844
+ header: `${pivotGroupKey}`,
11845
+ columnGroup: columnGroupId,
11846
+ pivotBy,
11847
+ pivotGroupKeys: keys,
11848
+ pivotByAtIndex: pivotByForColumn,
11849
+ pivotIndex: keys.length - 1,
11850
+ pivotGroupKey
11851
+ });
11875
11852
  }
11876
11853
  aggregationReducers.forEach((reducer, index) => {
11877
11854
  const header = isSingleAggregationColumn ? `${keys[keys.length - 1]}` : reducer.name || reducer.id;
@@ -11897,42 +11874,36 @@ function getPivotColumnsAndColumnGroups({
11897
11874
  }
11898
11875
  });
11899
11876
  const columnId = `${reducer.id}:${keys.join("/")}`;
11900
- columns.set(columnId, computedPivotColumn);
11877
+ columns[columnId] = computedPivotColumn;
11901
11878
  });
11902
11879
  } else {
11903
11880
  const colGroupId = keys.join("/");
11904
11881
  const parentKeys = keys.slice(0, -1);
11905
- columnGroups.set(
11906
- colGroupId,
11907
- prepareColumnGroup({
11908
- columnGroup: parentKeys.length ? parentKeys.join("/") : void 0,
11909
- header: `${keys[keys.length - 1]}`,
11910
- pivotBy,
11911
- pivotGroupKeys: keys,
11912
- pivotIndex: keys.length - 1,
11913
- pivotByAtIndex: pivotBy[keys.length - 1],
11914
- pivotGroupKey: keys[keys.length - 1]
11915
- })
11916
- );
11882
+ columnGroups[colGroupId] = prepareColumnGroup({
11883
+ columnGroup: parentKeys.length ? parentKeys.join("/") : void 0,
11884
+ header: `${keys[keys.length - 1]}`,
11885
+ pivotBy,
11886
+ pivotGroupKeys: keys,
11887
+ pivotIndex: keys.length - 1,
11888
+ pivotByAtIndex: pivotBy[keys.length - 1],
11889
+ pivotGroupKey: keys[keys.length - 1]
11890
+ });
11917
11891
  if (pivotTotalColumnPosition !== false) {
11918
11892
  const pivotByForColumn = pivotBy[keys.length - 1];
11919
11893
  let columnGroupId = parentKeys.length ? parentKeys.join("/") : void 0;
11920
11894
  if (!isSingleAggregationColumn) {
11921
11895
  const parentGroupForTotalsGroup = columnGroupId;
11922
11896
  columnGroupId = `total:${keys.join("/")}`;
11923
- columnGroups.set(
11924
- columnGroupId,
11925
- prepareColumnGroup({
11926
- header: `${keys[keys.length - 1]} total`,
11927
- columnGroup: parentGroupForTotalsGroup,
11928
- pivotBy,
11929
- pivotTotalColumnGroup: true,
11930
- pivotGroupKeys: keys,
11931
- pivotIndex: keys.length - 1,
11932
- pivotByAtIndex: pivotByForColumn,
11933
- pivotGroupKey: keys[keys.length - 1]
11934
- })
11935
- );
11897
+ columnGroups[columnGroupId] = prepareColumnGroup({
11898
+ header: `${keys[keys.length - 1]} total`,
11899
+ columnGroup: parentGroupForTotalsGroup,
11900
+ pivotBy,
11901
+ pivotTotalColumnGroup: true,
11902
+ pivotGroupKeys: keys,
11903
+ pivotIndex: keys.length - 1,
11904
+ pivotByAtIndex: pivotByForColumn,
11905
+ pivotGroupKey: keys[keys.length - 1]
11906
+ });
11936
11907
  }
11937
11908
  aggregationReducers.forEach((reducer, index) => {
11938
11909
  const header = isSingleAggregationColumn ? `${keys[keys.length - 1]} total ` : `${reducer.name || reducer.id} total`;
@@ -11957,10 +11928,7 @@ function getPivotColumnsAndColumnGroups({
11957
11928
  return (_b = (_a = rowInfo.pivotValuesMap) == null ? void 0 : _a.get(keys)) == null ? void 0 : _b.reducerResults[reducer.id];
11958
11929
  }
11959
11930
  });
11960
- columns.set(
11961
- `total:${reducer.id}:${keys.join("/")}`,
11962
- computedPivotColumn
11963
- );
11931
+ columns[`total:${reducer.id}:${keys.join("/")}`] = computedPivotColumn;
11964
11932
  });
11965
11933
  }
11966
11934
  }
@@ -16879,7 +16847,7 @@ function useCellRendering(param) {
16879
16847
  }
16880
16848
 
16881
16849
  // src/components/InfiniteTable/hooks/useComputed.ts
16882
- var import_react52 = require("react");
16850
+ var import_react49 = require("react");
16883
16851
 
16884
16852
  // src/components/InfiniteTable/utils/MultiCellSelector.ts
16885
16853
  var MultiCellSelector = class {
@@ -17070,134 +17038,11 @@ var MultiRowSelector = class {
17070
17038
  }
17071
17039
  };
17072
17040
 
17073
- // src/components/InfiniteTable/hooks/useColumnGroups.ts
17074
- var import_react42 = require("react");
17075
-
17076
- // src/components/hooks/useInterceptedMap.ts
17077
- var import_react41 = require("react");
17078
- function interceptMap(map2, fns) {
17079
- const { set, delete: deleteKey, clear } = map2;
17080
- if (fns.set) {
17081
- map2.set = (key, value) => {
17082
- set.call(map2, key, value);
17083
- fns.set(key, value);
17084
- return map2;
17085
- };
17086
- }
17087
- if (fns.delete) {
17088
- map2.delete = (key) => {
17089
- const removed = deleteKey.call(map2, key);
17090
- fns.delete(key);
17091
- return removed;
17092
- };
17093
- }
17094
- if (fns.clear || fns.beforeClear) {
17095
- map2.clear = () => {
17096
- if (fns.beforeClear) {
17097
- fns.beforeClear(map2);
17098
- }
17099
- const result = clear.call(map2);
17100
- if (fns.clear) {
17101
- fns.clear();
17102
- }
17103
- return result;
17104
- };
17105
- }
17106
- return () => {
17107
- if (set) {
17108
- map2.set = set;
17109
- }
17110
- if (deleteKey) {
17111
- map2.delete = deleteKey;
17112
- }
17113
- if (clear) {
17114
- map2.clear = clear;
17115
- }
17116
- };
17117
- }
17118
-
17119
- // src/components/InfiniteTable/state/computeColumnGroupsDepths.ts
17120
- function computeColumnGroupsDepths(columnGroups) {
17121
- const map2 = /* @__PURE__ */ new Map();
17122
- columnGroups.forEach((colGroup, colGroupId) => {
17123
- let parentGroupId = colGroup.columnGroup;
17124
- let depth = 0;
17125
- while (parentGroupId) {
17126
- const parent = columnGroups.get(parentGroupId);
17127
- if (!parent) {
17128
- if (false) {
17129
- console.warn(`Cannot find column group ${parentGroupId}`);
17130
- }
17131
- break;
17132
- }
17133
- depth++;
17134
- parentGroupId = parent.columnGroup;
17135
- }
17136
- map2.set(colGroupId, depth);
17137
- });
17138
- return map2;
17139
- }
17140
-
17141
- // src/components/InfiniteTable/hooks/useColumnGroups.ts
17142
- function useColumnGroups() {
17143
- const {
17144
- componentState: {
17145
- computedColumnGroups,
17146
- collapsedColumnGroups
17147
- },
17148
- componentActions,
17149
- getComponentState
17150
- } = useComponentState();
17151
- (0, import_react42.useEffect)(() => {
17152
- const recompute = () => {
17153
- componentActions.columnGroupsDepthsMap = computeColumnGroupsDepths(computedColumnGroups);
17154
- };
17155
- const update = rafFn(recompute);
17156
- return interceptMap(computedColumnGroups, {
17157
- clear: update,
17158
- delete: update,
17159
- set: update
17160
- });
17161
- }, [computedColumnGroups]);
17162
- (0, import_react42.useEffect)(() => {
17163
- return interceptMap(collapsedColumnGroups, {
17164
- set: (key, visibleCol) => {
17165
- const colIds = key.slice(1);
17166
- const columnVisibility = __spreadValues({}, getComponentState().columnVisibility);
17167
- colIds.forEach((colId) => {
17168
- columnVisibility[colId] = false;
17169
- });
17170
- delete columnVisibility[visibleCol];
17171
- componentActions.columnVisibility = columnVisibility;
17172
- },
17173
- beforeClear: (currentCollapsedGroups) => {
17174
- const columnVisibility = __spreadValues({}, getComponentState().columnVisibility);
17175
- const keys = [...currentCollapsedGroups.keys()];
17176
- keys.forEach((key) => {
17177
- const colIds = key.slice(1);
17178
- colIds.forEach((colId) => {
17179
- delete columnVisibility[colId];
17180
- });
17181
- });
17182
- componentActions.columnVisibility = columnVisibility;
17183
- },
17184
- delete: (key) => {
17185
- const columnVisibility = __spreadValues({}, getComponentState().columnVisibility);
17186
- const colIds = key.slice(1);
17187
- colIds.forEach((colId) => {
17188
- delete columnVisibility[colId];
17189
- });
17190
- componentActions.columnVisibility = columnVisibility;
17191
- }
17192
- });
17193
- }, [collapsedColumnGroups]);
17194
- }
17195
-
17196
17041
  // src/components/InfiniteTable/hooks/useColumnRowspan.ts
17197
- var import_react43 = require("react");
17042
+ var import_react41 = require("react");
17198
17043
  function useColumnRowspan(computedVisibleColumns) {
17199
17044
  const { getState: getDataSourceState } = useDataSourceContextValue();
17200
- const rowspan = (0, import_react43.useMemo)(() => {
17045
+ const rowspan = (0, import_react41.useMemo)(() => {
17201
17046
  const colsWithRowspan = computedVisibleColumns.filter(
17202
17047
  (col) => typeof col.rowspan === "function"
17203
17048
  );
@@ -17225,10 +17070,10 @@ function useColumnRowspan(computedVisibleColumns) {
17225
17070
  }
17226
17071
 
17227
17072
  // src/components/InfiniteTable/hooks/useColumnSizeFn.ts
17228
- var import_react44 = require("react");
17073
+ var import_react42 = require("react");
17229
17074
  var debug5 = dbg("useColumnSizeFn");
17230
17075
  function useColumnSizeFn(columns) {
17231
- const columnSize = (0, import_react44.useCallback)(
17076
+ const columnSize = (0, import_react42.useCallback)(
17232
17077
  (index) => {
17233
17078
  const column = columns[index];
17234
17079
  if (false) {
@@ -17242,10 +17087,10 @@ function useColumnSizeFn(columns) {
17242
17087
  }
17243
17088
 
17244
17089
  // src/components/InfiniteTable/hooks/useColumnsWhen.ts
17245
- var import_react47 = require("react");
17090
+ var import_react45 = require("react");
17246
17091
 
17247
17092
  // src/components/InfiniteTable/state/getInitialState.ts
17248
- var import_react45 = require("react");
17093
+ var import_react43 = require("react");
17249
17094
 
17250
17095
  // src/components/VirtualBrain/ScrollListener.ts
17251
17096
  var initialScrollPosition = {
@@ -17282,22 +17127,27 @@ var ScrollListener = class {
17282
17127
  }
17283
17128
  };
17284
17129
 
17285
- // src/components/InfiniteTable/utils/toMap.ts
17286
- function toMap(mapOrObject, weakMapCache) {
17287
- if (!mapOrObject) {
17288
- return /* @__PURE__ */ new Map();
17289
- }
17290
- if (mapOrObject instanceof Map) {
17291
- return mapOrObject;
17292
- }
17293
- if (weakMapCache && weakMapCache.has(mapOrObject)) {
17294
- return weakMapCache.get(mapOrObject);
17295
- }
17296
- const result = new Map(Object.entries(mapOrObject));
17297
- if (weakMapCache) {
17298
- weakMapCache.set(mapOrObject, result);
17299
- }
17300
- return result;
17130
+ // src/components/InfiniteTable/state/computeColumnGroupsDepths.ts
17131
+ function computeColumnGroupsDepths(columnGroups) {
17132
+ const map2 = /* @__PURE__ */ new Map();
17133
+ Object.keys(columnGroups).forEach((colGroupId) => {
17134
+ const colGroup = columnGroups[colGroupId];
17135
+ let parentGroupId = colGroup.columnGroup;
17136
+ let depth = 0;
17137
+ while (parentGroupId) {
17138
+ const parent = columnGroups[parentGroupId];
17139
+ if (!parent) {
17140
+ if (false) {
17141
+ console.warn(`Cannot find column group ${parentGroupId}`);
17142
+ }
17143
+ break;
17144
+ }
17145
+ depth++;
17146
+ parentGroupId = parent.columnGroup;
17147
+ }
17148
+ map2.set(colGroupId, depth);
17149
+ });
17150
+ return map2;
17301
17151
  }
17302
17152
 
17303
17153
  // src/components/InfiniteTable/state/rowDetailRendererFromComponent.tsx
@@ -17328,7 +17178,7 @@ function getCellSelector(cellPosition) {
17328
17178
  function initSetupState2({
17329
17179
  debugId
17330
17180
  }) {
17331
- const columnsGeneratedForGrouping = /* @__PURE__ */ new Map();
17181
+ const columnsGeneratedForGrouping = {};
17332
17182
  const brain = new MatrixBrain(debugId);
17333
17183
  const headerBrain = new MatrixBrain("header");
17334
17184
  brain.onScroll((scrollPosition) => {
@@ -17348,7 +17198,7 @@ function initSetupState2({
17348
17198
  if (false) {
17349
17199
  globalThis.renderer = renderer;
17350
17200
  }
17351
- const domRef = (0, import_react45.createRef)();
17201
+ const domRef = (0, import_react43.createRef)();
17352
17202
  return {
17353
17203
  renderer,
17354
17204
  onRenderUpdater,
@@ -17368,12 +17218,12 @@ function initSetupState2({
17368
17218
  brain,
17369
17219
  headerBrain,
17370
17220
  domRef,
17371
- columnMenuTargetRef: (0, import_react45.createRef)(),
17372
- editingValueRef: (0, import_react45.createRef)(),
17373
- scrollerDOMRef: (0, import_react45.createRef)(),
17374
- portalDOMRef: (0, import_react45.createRef)(),
17375
- focusDetectDOMRef: (0, import_react45.createRef)(),
17376
- activeCellIndicatorDOMRef: (0, import_react45.createRef)(),
17221
+ columnMenuTargetRef: (0, import_react43.createRef)(),
17222
+ editingValueRef: (0, import_react43.createRef)(),
17223
+ scrollerDOMRef: (0, import_react43.createRef)(),
17224
+ portalDOMRef: (0, import_react43.createRef)(),
17225
+ focusDetectDOMRef: (0, import_react43.createRef)(),
17226
+ activeCellIndicatorDOMRef: (0, import_react43.createRef)(),
17377
17227
  onColumnMenuClick: buildSubscriptionCallback(),
17378
17228
  cellContextMenu: buildSubscriptionCallback(),
17379
17229
  contextMenu: buildSubscriptionCallback(),
@@ -17404,7 +17254,7 @@ function initSetupState2({
17404
17254
  editingCell: null
17405
17255
  };
17406
17256
  }
17407
- var forwardProps4 = (setupState) => {
17257
+ var forwardProps4 = (_setupState) => {
17408
17258
  return {
17409
17259
  debugId: 1,
17410
17260
  scrollTopKey: 1,
@@ -17490,7 +17340,7 @@ var forwardProps4 = (setupState) => {
17490
17340
  rowHeight: (rowHeight) => typeof rowHeight === "number" || typeof rowHeight === "function" ? rowHeight : 0,
17491
17341
  rowDetailHeight: (rowDetailHeight) => typeof rowDetailHeight === "number" || typeof rowDetailHeight === "function" ? rowDetailHeight : 300,
17492
17342
  columnHeaderHeight: (columnHeaderHeight) => typeof columnHeaderHeight === "number" ? columnHeaderHeight : 30,
17493
- columns: (columns) => toMap(columns, setupState.propsCache.get("columns")),
17343
+ columns: 1,
17494
17344
  columnVisibility: (columnVisibility) => columnVisibility != null ? columnVisibility : {},
17495
17345
  // TODO check if columnPinning works when the value for a pinned col is `true` instead of `"start"`
17496
17346
  columnSizing: (columnSizing) => columnSizing || {},
@@ -17504,7 +17354,7 @@ var forwardProps4 = (setupState) => {
17504
17354
  onEditPersistSuccess: 1,
17505
17355
  multiSortBehavior: (multiSortBehavior) => multiSortBehavior != null ? multiSortBehavior : "replace",
17506
17356
  collapsedColumnGroups: (collapsedColumnGroups) => collapsedColumnGroups != null ? collapsedColumnGroups : /* @__PURE__ */ new Map(),
17507
- columnGroups: (columnGroups) => toMap(columnGroups, setupState.propsCache.get("columnGroups"))
17357
+ columnGroups: 1
17508
17358
  };
17509
17359
  };
17510
17360
  function getGroupRenderStrategy(options) {
@@ -17621,26 +17471,22 @@ var mapPropsToState = (params) => {
17621
17471
  };
17622
17472
 
17623
17473
  // src/components/InfiniteTable/state/getColumnVisibilityForHideEmptyGroupColumns.ts
17624
- function getGroupColumnsMapForComputedColumns(computedColumns, groupByMap) {
17625
- const computedGroupColumns = /* @__PURE__ */ new Map();
17626
- computedColumns.forEach(
17627
- (column, colId) => {
17628
- const col = column;
17629
- if (!col.groupByForColumn || Array.isArray(col.groupByForColumn)) {
17630
- return;
17631
- }
17632
- const { groupByForColumn } = col;
17633
- const field = groupByForColumn.field || groupByForColumn.groupField;
17634
- const groupInfoForColumn = field ? groupByMap.get(field) : null;
17635
- if (!groupInfoForColumn) {
17636
- return;
17637
- }
17638
- computedGroupColumns.set(
17639
- colId,
17640
- column
17641
- );
17474
+ function getGroupColumnsForComputedColumns(computedColumns, groupByMap) {
17475
+ const computedGroupColumns = {};
17476
+ Object.keys(computedColumns).forEach((colId) => {
17477
+ const column = computedColumns[colId];
17478
+ const col = column;
17479
+ if (!col.groupByForColumn || Array.isArray(col.groupByForColumn)) {
17480
+ return;
17642
17481
  }
17643
- );
17482
+ const { groupByForColumn } = col;
17483
+ const field = groupByForColumn.field || groupByForColumn.groupField;
17484
+ const groupInfoForColumn = field ? groupByMap.get(field) : null;
17485
+ if (!groupInfoForColumn) {
17486
+ return;
17487
+ }
17488
+ computedGroupColumns[colId] = column;
17489
+ });
17644
17490
  return computedGroupColumns;
17645
17491
  }
17646
17492
  function getColumnVisibilityForHideEmptyGroupColumns(params) {
@@ -17654,13 +17500,11 @@ function getColumnVisibilityForHideEmptyGroupColumns(params) {
17654
17500
  } = params;
17655
17501
  const columnVisibility = __spreadValues({}, params.columnVisibility);
17656
17502
  if (!hideEmptyGroupColumns) {
17657
- computedGroupColumns.forEach(
17658
- (_column, colId) => {
17659
- if (columnVisibility[colId] === false) {
17660
- delete columnVisibility[colId];
17661
- }
17503
+ Object.keys(computedGroupColumns).forEach((colId) => {
17504
+ if (columnVisibility[colId] === false) {
17505
+ delete columnVisibility[colId];
17662
17506
  }
17663
- );
17507
+ });
17664
17508
  return columnVisibility;
17665
17509
  }
17666
17510
  if (!groupRowsIndexesInDataArray || !groupRowsIndexesInDataArray.length) {
@@ -17683,42 +17527,41 @@ function getColumnVisibilityForHideEmptyGroupColumns(params) {
17683
17527
  break;
17684
17528
  }
17685
17529
  }
17686
- computedGroupColumns.forEach(
17687
- (column, colId) => {
17688
- const { groupByForColumn } = column;
17689
- if (Array.isArray(groupByForColumn)) {
17690
- return;
17691
- }
17692
- const field = groupByForColumn.field || groupByForColumn.groupField;
17693
- if (!field) {
17694
- return;
17530
+ Object.keys(computedGroupColumns).forEach((colId) => {
17531
+ const column = computedGroupColumns[colId];
17532
+ const { groupByForColumn } = column;
17533
+ if (Array.isArray(groupByForColumn)) {
17534
+ return;
17535
+ }
17536
+ const field = groupByForColumn.field || groupByForColumn.groupField;
17537
+ if (!field) {
17538
+ return;
17539
+ }
17540
+ const groupInfoForColumn = groupByMap.get(field);
17541
+ const index = groupInfoForColumn.groupIndex;
17542
+ const shouldBeHidden = index > expandedGroupsLevel && hideEmptyGroupColumns;
17543
+ if (shouldBeHidden) {
17544
+ if (columnVisibility[colId] !== false) {
17545
+ columnVisibility[colId] = false;
17695
17546
  }
17696
- const groupInfoForColumn = groupByMap.get(field);
17697
- const index = groupInfoForColumn.groupIndex;
17698
- const shouldBeHidden = index > expandedGroupsLevel && hideEmptyGroupColumns;
17699
- if (shouldBeHidden) {
17700
- if (columnVisibility[colId] !== false) {
17701
- columnVisibility[colId] = false;
17702
- }
17703
- } else {
17704
- if (columnVisibility.hasOwnProperty(colId)) {
17705
- delete columnVisibility[colId];
17706
- }
17547
+ } else {
17548
+ if (columnVisibility.hasOwnProperty(colId)) {
17549
+ delete columnVisibility[colId];
17707
17550
  }
17708
17551
  }
17709
- );
17552
+ });
17710
17553
  return columnVisibility;
17711
17554
  }
17712
17555
 
17713
17556
  // src/components/InfiniteTable/hooks/useToggleGroupRow.ts
17714
- var import_react46 = require("react");
17557
+ var import_react44 = require("react");
17715
17558
  function useToggleGroupRow() {
17716
17559
  const {
17717
17560
  getState: getDataSourceState,
17718
17561
  componentActions: dataSourceActions,
17719
17562
  getDataSourceMasterContext
17720
17563
  } = useDataSourceContextValue();
17721
- const toggleGroupRow = (0, import_react46.useCallback)((groupKeys) => {
17564
+ const toggleGroupRow = (0, import_react44.useCallback)((groupKeys) => {
17722
17565
  const state = getDataSourceState();
17723
17566
  const newState = new GroupRowsState(state.groupRowsState);
17724
17567
  newState.toggleGroupRow(groupKeys);
@@ -17758,7 +17601,7 @@ function useToggleGroupRow() {
17758
17601
 
17759
17602
  // src/components/InfiniteTable/hooks/useColumnsWhen.ts
17760
17603
  function useGroupByMap(groupBy) {
17761
- return (0, import_react47.useMemo)(() => getGroupByMap(groupBy), [groupBy]);
17604
+ return (0, import_react45.useMemo)(() => getGroupByMap(groupBy), [groupBy]);
17762
17605
  }
17763
17606
  function useColumnsWhen() {
17764
17607
  const {
@@ -17772,13 +17615,13 @@ function useColumnsWhen() {
17772
17615
  pivotGrandTotalColumnPosition
17773
17616
  }
17774
17617
  } = useComponentState();
17775
- (0, import_react47.useEffect)(() => {
17618
+ (0, import_react45.useEffect)(() => {
17776
17619
  dataSourceActions.generateGroupRows = groupRenderStrategy !== "inline";
17777
17620
  }, [groupRenderStrategy]);
17778
- (0, import_react47.useEffect)(() => {
17621
+ (0, import_react45.useEffect)(() => {
17779
17622
  dataSourceActions.pivotTotalColumnPosition = pivotTotalColumnPosition;
17780
17623
  }, [pivotTotalColumnPosition]);
17781
- (0, import_react47.useEffect)(() => {
17624
+ (0, import_react45.useEffect)(() => {
17782
17625
  if (pivotGrandTotalColumnPosition != void 0) {
17783
17626
  dataSourceActions.pivotGrandTotalColumnPosition = pivotGrandTotalColumnPosition;
17784
17627
  }
@@ -17796,12 +17639,13 @@ function useColumnsWhenInlineGroupRenderStrategy(groupByMap) {
17796
17639
  componentState: { columns, groupRenderStrategy }
17797
17640
  } = useComponentState();
17798
17641
  function computeColumnsWhenInlineGroupRenderStrategy(columns2, groupByMap2, groupRenderStrategy2, toggleGroupRow2) {
17799
- const computedColumns = /* @__PURE__ */ new Map();
17642
+ const computedColumns = {};
17800
17643
  if (groupRenderStrategy2 !== "inline") {
17801
17644
  return;
17802
17645
  }
17803
- columns2.forEach((column, id) => {
17646
+ Object.keys(columns2).forEach((id) => {
17804
17647
  var _a, _b;
17648
+ const column = columns2[id];
17805
17649
  let base = {};
17806
17650
  const groupByForColumn = groupByMap2.get(column.field);
17807
17651
  if (groupByForColumn && groupRenderStrategy2 === "inline") {
@@ -17855,11 +17699,11 @@ function useColumnsWhenInlineGroupRenderStrategy(groupByMap) {
17855
17699
  };
17856
17700
  }
17857
17701
  const clone = __spreadValues(__spreadValues({}, base), column);
17858
- computedColumns.set(id, clone);
17702
+ computedColumns[id] = clone;
17859
17703
  });
17860
- return computedColumns.size === 0 ? void 0 : computedColumns;
17704
+ return Object.keys(computedColumns).length === 0 ? void 0 : computedColumns;
17861
17705
  }
17862
- (0, import_react47.useEffect)(() => {
17706
+ (0, import_react45.useEffect)(() => {
17863
17707
  const update = () => {
17864
17708
  componentActions.columnsWhenInlineGroupRenderStrategy = computeColumnsWhenInlineGroupRenderStrategy(
17865
17709
  columns,
@@ -17869,11 +17713,6 @@ function useColumnsWhenInlineGroupRenderStrategy(groupByMap) {
17869
17713
  );
17870
17714
  };
17871
17715
  update();
17872
- return interceptMap(columns, {
17873
- set: update,
17874
- delete: update,
17875
- clear: update
17876
- });
17877
17716
  }, [columns, groupByMap, groupRenderStrategy, toggleGroupRow]);
17878
17717
  }
17879
17718
  function useColumnsWhenGrouping() {
@@ -17895,7 +17734,7 @@ function useColumnsWhenGrouping() {
17895
17734
  getComponentState
17896
17735
  } = useComponentState();
17897
17736
  const toggleGroupRow = useToggleGroupRow();
17898
- (0, import_react47.useEffect)(() => {
17737
+ (0, import_react45.useEffect)(() => {
17899
17738
  const update = () => {
17900
17739
  const { columns: columnsWhenGrouping, groupColumnIds } = getColumnsWhenGrouping({
17901
17740
  columns,
@@ -17930,11 +17769,6 @@ function useColumnsWhenGrouping() {
17930
17769
  }
17931
17770
  };
17932
17771
  update();
17933
- return interceptMap(columns, {
17934
- set: update,
17935
- delete: update,
17936
- clear: update
17937
- });
17938
17772
  }, [
17939
17773
  columns,
17940
17774
  groupBy,
@@ -17971,12 +17805,12 @@ function useHideColumns(groupByMap) {
17971
17805
  groupRenderStrategy
17972
17806
  }
17973
17807
  } = useComponentState();
17974
- (0, import_react47.useLayoutEffect)(() => {
17808
+ (0, import_react45.useLayoutEffect)(() => {
17975
17809
  if (groupRenderStrategy !== "multi-column") {
17976
17810
  return;
17977
17811
  }
17978
17812
  const currentState = getComponentState();
17979
- const computedGroupColumns = getGroupColumnsMapForComputedColumns(
17813
+ const computedGroupColumns = getGroupColumnsForComputedColumns(
17980
17814
  computedColumns,
17981
17815
  groupByMap
17982
17816
  );
@@ -18004,7 +17838,7 @@ function useHideColumns(groupByMap) {
18004
17838
  hideEmptyGroupColumns ? groupRowsIndexesInDataArray : null,
18005
17839
  hideEmptyGroupColumns
18006
17840
  ]);
18007
- (0, import_react47.useEffect)(() => {
17841
+ (0, import_react45.useEffect)(() => {
18008
17842
  const isGrouped = groupBy.length > 0;
18009
17843
  const currentState = getComponentState();
18010
17844
  const {
@@ -18017,7 +17851,8 @@ function useHideColumns(groupByMap) {
18017
17851
  let updatedVisibilityWhenGrouping = false;
18018
17852
  let newlyHiddenColumns = /* @__PURE__ */ new Set();
18019
17853
  let newlyDisplayedColumns = /* @__PURE__ */ new Set();
18020
- computedColumns.forEach((col, id) => {
17854
+ Object.keys(computedColumns).forEach((id) => {
17855
+ const col = computedColumns[id];
18021
17856
  if (col.defaultHiddenWhenGroupedBy || hideColumnWhenGrouped2 != null) {
18022
17857
  const hideWhenGrouped = col.defaultHiddenWhenGroupedBy === "*" && isGrouped || (col.defaultHiddenWhenGroupedBy === true || hideColumnWhenGrouped2) && col.field && groupByMap.get(col.field) || typeof col.defaultHiddenWhenGroupedBy === "string" && groupByMap.get(col.defaultHiddenWhenGroupedBy) || typeof col.defaultHiddenWhenGroupedBy === "object" && Object.keys(col.defaultHiddenWhenGroupedBy).reduce(
18023
17858
  (acc, field) => acc || groupByMap.has(field),
@@ -18076,7 +17911,7 @@ function getColumnsWhenGrouping(params) {
18076
17911
  if (groupRenderStrategy === "inline") {
18077
17912
  return { columns: void 0, groupColumnIds: [] };
18078
17913
  }
18079
- const computedColumns = /* @__PURE__ */ new Map();
17914
+ const computedColumns = {};
18080
17915
  const groupColumnIds = [];
18081
17916
  if (groupRenderStrategy === "multi-column") {
18082
17917
  groupBy.forEach((groupByForColumn, groupIndexForColumn, arr) => {
@@ -18095,7 +17930,7 @@ function getColumnsWhenGrouping(params) {
18095
17930
  );
18096
17931
  const groupColumnId = generatedGroupColumn.id || `group-by-${groupByForColumn.field || groupByForColumn.groupField}`;
18097
17932
  groupColumnIds.push(groupColumnId);
18098
- computedColumns.set(groupColumnId, generatedGroupColumn);
17933
+ computedColumns[groupColumnId] = generatedGroupColumn;
18099
17934
  });
18100
17935
  } else if (groupRenderStrategy === "single-column" && groupBy.length) {
18101
17936
  const singleGroupColumn = getSingleGroupColumn(
@@ -18111,17 +17946,19 @@ function getColumnsWhenGrouping(params) {
18111
17946
  );
18112
17947
  const groupColumnId = singleGroupColumn.id || "group-by";
18113
17948
  groupColumnIds.push(groupColumnId);
18114
- computedColumns.set(groupColumnId, singleGroupColumn);
17949
+ computedColumns[groupColumnId] = singleGroupColumn;
18115
17950
  }
18116
17951
  if (pivotColumns) {
18117
17952
  const columnsByField = {};
18118
- columns.forEach((col) => {
17953
+ Object.keys(columns).forEach((colId) => {
17954
+ const col = columns[colId];
18119
17955
  if (col.field) {
18120
17956
  columnsByField[col.field] = col;
18121
17957
  }
18122
17958
  });
18123
- pivotColumns.forEach((col, key) => {
17959
+ Object.keys(pivotColumns).forEach((key) => {
18124
17960
  var _a, _b;
17961
+ const col = pivotColumns[key];
18125
17962
  const isSimpleTotalColumn = col.pivotTotalColumn && col.columnGroup;
18126
17963
  const isGrandTotalColumn = col.pivotTotalColumn && !col.columnGroup;
18127
17964
  if (isSimpleTotalColumn && pivotTotalColumnPosition === false) {
@@ -18143,7 +17980,7 @@ function getColumnsWhenGrouping(params) {
18143
17980
  }
18144
17981
  }
18145
17982
  if (column.inheritFromColumn !== false) {
18146
- const colToInheritFrom = typeof column.inheritFromColumn === "string" ? columns.get(column.inheritFromColumn) : ((_a = column.pivotAggregator) == null ? void 0 : _a.field) ? columnsByField[(_b = column.pivotAggregator) == null ? void 0 : _b.field] : void 0;
17983
+ const colToInheritFrom = typeof column.inheritFromColumn === "string" ? columns[column.inheritFromColumn] : ((_a = column.pivotAggregator) == null ? void 0 : _a.field) ? columnsByField[(_b = column.pivotAggregator) == null ? void 0 : _b.field] : void 0;
18147
17984
  column = __spreadValues(__spreadValues({}, colToInheritFrom), column);
18148
17985
  }
18149
17986
  if (!column.render && column.renderValue) {
@@ -18151,38 +17988,22 @@ function getColumnsWhenGrouping(params) {
18151
17988
  return column.renderValue(renderOptions);
18152
17989
  };
18153
17990
  }
18154
- computedColumns.set(key, column);
17991
+ computedColumns[key] = column;
18155
17992
  });
18156
17993
  } else {
18157
- columns.forEach((col, colId) => {
18158
- computedColumns.set(colId, col);
17994
+ Object.keys(columns).forEach((colId) => {
17995
+ const col = columns[colId];
17996
+ computedColumns[colId] = col;
18159
17997
  });
18160
17998
  }
18161
17999
  return {
18162
- columns: computedColumns.size ? computedColumns : void 0,
18000
+ columns: Object.keys(computedColumns).length ? computedColumns : void 0,
18163
18001
  groupColumnIds
18164
18002
  };
18165
18003
  }
18166
18004
 
18167
18005
  // src/components/InfiniteTable/hooks/useComputedColumns.ts
18168
- var import_react49 = require("react");
18169
-
18170
- // src/components/InfiniteTable/hooks/useRerenderOnKeyChange.ts
18171
- var import_react48 = require("react");
18172
- var useRerenderOnKeyChange = (map2) => {
18173
- const [renderId, rerender] = useRerender();
18174
- (0, import_react48.useEffect)(() => {
18175
- const update = rafFn(rerender);
18176
- return interceptMap(map2, {
18177
- set: update,
18178
- clear: update,
18179
- delete: update
18180
- });
18181
- }, [map2]);
18182
- return renderId;
18183
- };
18184
-
18185
- // src/components/InfiniteTable/hooks/useComputedColumns.ts
18006
+ var import_react46 = require("react");
18186
18007
  var useComputedColumns = ({
18187
18008
  columns,
18188
18009
  bodySize,
@@ -18214,7 +18035,7 @@ var useComputedColumns = ({
18214
18035
  columnVisibilityAssumeVisible,
18215
18036
  columnSizing
18216
18037
  }) => {
18217
- const columnsRenderId = useRerenderOnKeyChange(columns);
18038
+ const columnsRenderId = 1;
18218
18039
  const {
18219
18040
  computedRemainingSpace,
18220
18041
  computedColumnOrder,
@@ -18234,7 +18055,7 @@ var useComputedColumns = ({
18234
18055
  computedColumnsMap,
18235
18056
  computedColumnsMapInInitialOrder,
18236
18057
  fieldsToColumn
18237
- } = (0, import_react49.useMemo)(() => {
18058
+ } = (0, import_react46.useMemo)(() => {
18238
18059
  return getComputedColumns({
18239
18060
  columns,
18240
18061
  scrollbarWidth: scrollbarWidth2,
@@ -18318,7 +18139,7 @@ var useComputedColumns = ({
18318
18139
  };
18319
18140
 
18320
18141
  // src/components/InfiniteTable/hooks/useComputedRowHeight.ts
18321
- var import_react50 = require("react");
18142
+ var import_react47 = require("react");
18322
18143
  var RowSizeCache = class {
18323
18144
  constructor() {
18324
18145
  this.rowHeight = /* @__PURE__ */ new Map();
@@ -18404,7 +18225,7 @@ function getComputedRowHeight(param, cache) {
18404
18225
  return result;
18405
18226
  }
18406
18227
  function useComputedRowHeight(param) {
18407
- return (0, import_react50.useMemo)(() => {
18228
+ return (0, import_react47.useMemo)(() => {
18408
18229
  const computedRowSizeCache = new RowSizeCache();
18409
18230
  const computedRowHeight = getComputedRowHeight(param, computedRowSizeCache);
18410
18231
  return {
@@ -18421,7 +18242,7 @@ function useComputedRowHeight(param) {
18421
18242
  }
18422
18243
 
18423
18244
  // src/components/InfiniteTable/hooks/useScrollbars.ts
18424
- var import_react51 = require("react");
18245
+ var import_react48 = require("react");
18425
18246
  var INITIAL_SCROLLBARS = {
18426
18247
  vertical: false,
18427
18248
  horizontal: false
@@ -18429,8 +18250,8 @@ var INITIAL_SCROLLBARS = {
18429
18250
  function useScrollbars(brain) {
18430
18251
  const { getComponentState: getInfiniteTableState } = useComponentState();
18431
18252
  const { getState: getDataSourceState } = useDataSourceContextValue();
18432
- const [scrollbars, setScrollbars] = (0, import_react51.useState)(INITIAL_SCROLLBARS);
18433
- (0, import_react51.useEffect)(() => {
18253
+ const [scrollbars, setScrollbars] = (0, import_react48.useState)(INITIAL_SCROLLBARS);
18254
+ (0, import_react48.useEffect)(() => {
18434
18255
  return brain.onRenderCountChange(() => {
18435
18256
  const { scrollTopMax, scrollLeftMax } = brain;
18436
18257
  setScrollbars({
@@ -18439,7 +18260,7 @@ function useScrollbars(brain) {
18439
18260
  });
18440
18261
  });
18441
18262
  }, [brain]);
18442
- (0, import_react51.useLayoutEffect)(() => {
18263
+ (0, import_react48.useLayoutEffect)(() => {
18443
18264
  const dataSourceState = getDataSourceState();
18444
18265
  const { onScrollbarsChange } = getInfiniteTableState();
18445
18266
  const { notifyScrollbarsChange } = dataSourceState;
@@ -18479,7 +18300,7 @@ function useComputed() {
18479
18300
  bodySize,
18480
18301
  showSeparatePivotColumnForSingleAggregation
18481
18302
  } = componentState;
18482
- (0, import_react52.useState)(() => {
18303
+ (0, import_react49.useState)(() => {
18483
18304
  componentState.onRowHeightCSSVarChange.onChange((rowHeight2) => {
18484
18305
  if (rowHeight2) {
18485
18306
  componentActions.rowHeight = rowHeight2;
@@ -18498,11 +18319,10 @@ function useComputed() {
18498
18319
  }
18499
18320
  );
18500
18321
  });
18501
- (0, import_react52.useEffect)(() => {
18322
+ (0, import_react49.useEffect)(() => {
18502
18323
  dataSourceActions.showSeparatePivotColumnForSingleAggregation = showSeparatePivotColumnForSingleAggregation;
18503
18324
  }, [showSeparatePivotColumnForSingleAggregation]);
18504
18325
  const { multiSort, filterValue, filterTypes } = dataSourceState;
18505
- useColumnGroups();
18506
18326
  const { toggleGroupRow } = useColumnsWhen();
18507
18327
  const columns = componentState.computedColumns;
18508
18328
  const {
@@ -18566,14 +18386,14 @@ function useComputed() {
18566
18386
  const scrollbars = useScrollbars(brain);
18567
18387
  const computedPinnedStartOverflow = computedPinnedStartWidth ? computedPinnedStartColumnsWidth > computedPinnedStartWidth : false;
18568
18388
  const computedPinnedEndOverflow = computedPinnedEndWidth ? computedPinnedEndColumnsWidth > computedPinnedEndWidth : false;
18569
- const [multiRowSelector] = (0, import_react52.useState)(() => {
18389
+ const [multiRowSelector] = (0, import_react49.useState)(() => {
18570
18390
  const multiRowSelector2 = new MultiRowSelector({
18571
18391
  getIdForIndex: (index) => getDataSourceState().dataArray[index].id
18572
18392
  });
18573
18393
  return multiRowSelector2;
18574
18394
  });
18575
18395
  const getComputedVisibleColumns = useLatest(computedVisibleColumns);
18576
- const [multiCellSelector] = (0, import_react52.useState)(() => {
18396
+ const [multiCellSelector] = (0, import_react49.useState)(() => {
18577
18397
  return new MultiCellSelector({
18578
18398
  getPrimaryKeyByIndex: dataSourceApi.getPrimaryKeyByIndex,
18579
18399
  getColumnIdByIndex: (colIndex) => {
@@ -18623,7 +18443,7 @@ function useComputed() {
18623
18443
  }
18624
18444
 
18625
18445
  // src/components/InfiniteTable/hooks/useLicense/useLicense.ts
18626
- var import_react53 = require("react");
18446
+ var import_react50 = require("react");
18627
18447
 
18628
18448
  // src/components/InfiniteTable/hooks/useLicense/crc32.ts
18629
18449
  var DEFAULT_ReversedPolynomial = 3988292384;
@@ -18794,13 +18614,13 @@ var isInsidePlayground = isInsideSandbox() || isInsideSandpack();
18794
18614
  var useLicense = (licenseKey = "") => {
18795
18615
  const masterContext = useMasterDetailContext();
18796
18616
  const isDetail = !!masterContext;
18797
- const valid = (0, import_react53.useMemo)(() => {
18617
+ const valid = (0, import_react50.useMemo)(() => {
18798
18618
  if (isDetail) {
18799
18619
  return true;
18800
18620
  }
18801
18621
  let valid2 = isValidLicense(licenseKey, {
18802
18622
  publishedAt: 1624970570587,
18803
- version: "3.3.3"
18623
+ version: "4.0.0"
18804
18624
  });
18805
18625
  if (!licenseKey && !valid2 && isInsidePlayground) {
18806
18626
  return true;
@@ -18811,18 +18631,18 @@ var useLicense = (licenseKey = "") => {
18811
18631
  };
18812
18632
 
18813
18633
  // src/components/InfiniteTable/hooks/useScrollToActiveCell.ts
18814
- var import_react54 = require("react");
18634
+ var import_react51 = require("react");
18815
18635
  var RETRIES = 10;
18816
18636
  function useScrollToActiveCell(activeCellIndex, dataCount, imperativeApi) {
18817
- const didScrollRef = (0, import_react54.useRef)(false);
18818
- const rafId = (0, import_react54.useRef)(null);
18819
- (0, import_react54.useEffect)(() => {
18637
+ const didScrollRef = (0, import_react51.useRef)(false);
18638
+ const rafId = (0, import_react51.useRef)(null);
18639
+ (0, import_react51.useEffect)(() => {
18820
18640
  if (activeCellIndex != null) {
18821
18641
  didScrollRef.current = false;
18822
18642
  cancelRaf(rafId.current);
18823
18643
  }
18824
18644
  }, [activeCellIndex]);
18825
- (0, import_react54.useEffect)(() => {
18645
+ (0, import_react51.useEffect)(() => {
18826
18646
  if (activeCellIndex != null && !didScrollRef.current) {
18827
18647
  let tryScroll2 = function(times = 0) {
18828
18648
  times++;
@@ -18850,18 +18670,18 @@ function useScrollToActiveCell(activeCellIndex, dataCount, imperativeApi) {
18850
18670
  }
18851
18671
 
18852
18672
  // src/components/InfiniteTable/hooks/useScrollToActiveRow.ts
18853
- var import_react55 = require("react");
18673
+ var import_react52 = require("react");
18854
18674
  var RETRIES2 = 10;
18855
18675
  function useScrollToActiveRow(activeRowIndex, dataCount, imperativeApi) {
18856
- const didScrollRef = (0, import_react55.useRef)(false);
18857
- const rafId = (0, import_react55.useRef)(null);
18858
- (0, import_react55.useEffect)(() => {
18676
+ const didScrollRef = (0, import_react52.useRef)(false);
18677
+ const rafId = (0, import_react52.useRef)(null);
18678
+ (0, import_react52.useEffect)(() => {
18859
18679
  if (activeRowIndex != null) {
18860
18680
  didScrollRef.current = false;
18861
18681
  cancelAnimationFrame(rafId.current);
18862
18682
  }
18863
18683
  }, [activeRowIndex]);
18864
- (0, import_react55.useEffect)(() => {
18684
+ (0, import_react52.useEffect)(() => {
18865
18685
  if (activeRowIndex != null && !didScrollRef.current) {
18866
18686
  let tryScroll2 = function(times = 0) {
18867
18687
  times++;
@@ -18890,7 +18710,7 @@ function useScrollToActiveRow(activeRowIndex, dataCount, imperativeApi) {
18890
18710
  var toCSSVarName = (value) => `--infinite-${value}`;
18891
18711
 
18892
18712
  // src/components/InfiniteTable/eventHandlers/index.ts
18893
- var import_react56 = require("react");
18713
+ var import_react53 = require("react");
18894
18714
 
18895
18715
  // src/components/InfiniteTable/eventHandlers/onCellClick.ts
18896
18716
  function onCellClick(context, event) {
@@ -19753,7 +19573,7 @@ function useEventHandlersContext() {
19753
19573
  componentActions: dataSourceActions,
19754
19574
  api: dataSourceApi
19755
19575
  } = useDataSourceContextValue();
19756
- const context = (0, import_react56.useMemo)(() => {
19576
+ const context = (0, import_react53.useMemo)(() => {
19757
19577
  const context2 = {
19758
19578
  getComputed,
19759
19579
  getDataSourceMasterContext,
@@ -19781,7 +19601,7 @@ function useEventHandlersContext() {
19781
19601
  }
19782
19602
  function handleDOMEvents() {
19783
19603
  const context = useEventHandlersContext();
19784
- (0, import_react56.useEffect)(() => {
19604
+ (0, import_react53.useEffect)(() => {
19785
19605
  const removeOnKeyDown = context.getState().keyDown.onChange((event) => {
19786
19606
  onKeyDown(context, event);
19787
19607
  });
@@ -19825,7 +19645,7 @@ function handleDOMEvents() {
19825
19645
  }
19826
19646
  function subscribeToDOMEvents() {
19827
19647
  const { getState } = useInfiniteTable();
19828
- const onKeyDown2 = (0, import_react56.useCallback)((event) => {
19648
+ const onKeyDown2 = (0, import_react53.useCallback)((event) => {
19829
19649
  getState().keyDown(event);
19830
19650
  }, []);
19831
19651
  return { onKeyDown: onKeyDown2 };
@@ -19836,11 +19656,11 @@ function useDOMEventHandlers() {
19836
19656
  }
19837
19657
 
19838
19658
  // src/components/InfiniteTable/hooks/useColumnMenu.ts
19839
- var import_react61 = require("react");
19659
+ var import_react58 = require("react");
19840
19660
 
19841
19661
  // src/components/hooks/useOverlay/index.tsx
19842
19662
  var React55 = __toESM(require("react"));
19843
- var import_react57 = require("react");
19663
+ var import_react54 = require("react");
19844
19664
  var import_react_dom2 = require("react-dom");
19845
19665
 
19846
19666
  // src/utils/pageGeometry/Point.ts
@@ -20229,7 +20049,7 @@ function DefaultOverlayPortal(props) {
20229
20049
  }
20230
20050
  function OverlayContent(props) {
20231
20051
  const nodeRef = React55.useRef(null);
20232
- (0, import_react57.useEffect)(() => {
20052
+ (0, import_react54.useEffect)(() => {
20233
20053
  return props.realign.onChange((handle) => {
20234
20054
  if (nodeRef.current && handle) {
20235
20055
  alignOverlayNode(nodeRef.current, handle);
@@ -20240,7 +20060,7 @@ function OverlayContent(props) {
20240
20060
  "div",
20241
20061
  {
20242
20062
  style: { position: "absolute", top: 0, left: 0 },
20243
- ref: (0, import_react57.useCallback)((node) => {
20063
+ ref: (0, import_react54.useCallback)((node) => {
20244
20064
  if (node) {
20245
20065
  alignOverlayNode(node, props);
20246
20066
  }
@@ -20290,8 +20110,8 @@ function alignOverlayNode(node, params) {
20290
20110
  });
20291
20111
  }
20292
20112
  function useOverlayPortal(content, portalContainer) {
20293
- const [container, setContainer] = (0, import_react57.useState)(null);
20294
- (0, import_react57.useLayoutEffect)(() => {
20113
+ const [container, setContainer] = (0, import_react54.useState)(null);
20114
+ (0, import_react54.useLayoutEffect)(() => {
20295
20115
  function getContainer() {
20296
20116
  return __async(this, null, function* () {
20297
20117
  const container2 = portalContainer ? yield retrieveElement(portalContainer) : null;
@@ -20339,10 +20159,10 @@ globalThis.allhandles = {};
20339
20159
  globalThis.thehandles = {};
20340
20160
  function useOverlay(params) {
20341
20161
  const rootParams = params;
20342
- const [handles] = (0, import_react57.useState)(() => /* @__PURE__ */ new Map());
20343
- const [handleToRealign, setHandleToRealign] = (0, import_react57.useState)(null);
20344
- const [realignTimestamp, setRealignTimestamp] = (0, import_react57.useState)(0);
20345
- const getContentForPortal = (0, import_react57.useCallback)(() => {
20162
+ const [handles] = (0, import_react54.useState)(() => /* @__PURE__ */ new Map());
20163
+ const [handleToRealign, setHandleToRealign] = (0, import_react54.useState)(null);
20164
+ const [realignTimestamp, setRealignTimestamp] = (0, import_react54.useState)(0);
20165
+ const getContentForPortal = (0, import_react54.useCallback)(() => {
20346
20166
  const contentForPortal = [];
20347
20167
  for (const [_2, handle] of handles) {
20348
20168
  contentForPortal.push(
@@ -20356,7 +20176,7 @@ function useOverlay(params) {
20356
20176
  getContentForPortal(),
20357
20177
  params.portalContainer
20358
20178
  );
20359
- const showOverlay = (0, import_react57.useCallback)(
20179
+ const showOverlay = (0, import_react54.useCallback)(
20360
20180
  (content, params2) => {
20361
20181
  const id = params2.id || getIdForReactOnlyChild(content) || getChangeDetect();
20362
20182
  const key = `${id}`;
@@ -20583,7 +20403,7 @@ var deriveStateFromProps2 = (params) => {
20583
20403
 
20584
20404
  // src/components/Menu/Menu.tsx
20585
20405
  var React58 = __toESM(require("react"));
20586
- var import_react60 = require("react");
20406
+ var import_react57 = require("react");
20587
20407
 
20588
20408
  // src/utils/pageGeometry/Triangle.ts
20589
20409
  var Triangle = class extends ConvexPoly {
@@ -20802,24 +20622,24 @@ var MenuTriangleContext = class {
20802
20622
  };
20803
20623
 
20804
20624
  // src/components/Menu/MenuContext.ts
20805
- var import_react58 = require("react");
20806
- var MenuContext = (0, import_react58.createContext)(null);
20625
+ var import_react55 = require("react");
20626
+ var MenuContext = (0, import_react55.createContext)(null);
20807
20627
  function useMenuContext() {
20808
- const contextValue = (0, import_react58.useContext)(MenuContext);
20628
+ const contextValue = (0, import_react55.useContext)(MenuContext);
20809
20629
  return contextValue;
20810
20630
  }
20811
20631
 
20812
20632
  // src/components/hooks/useMounted.ts
20813
- var import_react59 = require("react");
20633
+ var import_react56 = require("react");
20814
20634
  function useMounted() {
20815
- let mountedRef = (0, import_react59.useRef)(true);
20816
- (0, import_react59.useEffect)(() => {
20635
+ let mountedRef = (0, import_react56.useRef)(true);
20636
+ (0, import_react56.useEffect)(() => {
20817
20637
  mountedRef.current = true;
20818
20638
  return () => {
20819
20639
  mountedRef.current = false;
20820
20640
  };
20821
20641
  }, []);
20822
- const isMounted = (0, import_react59.useCallback)(() => mountedRef.current, []);
20642
+ const isMounted = (0, import_react56.useCallback)(() => mountedRef.current, []);
20823
20643
  return isMounted;
20824
20644
  }
20825
20645
 
@@ -20915,7 +20735,7 @@ function useSubmenus({
20915
20735
  onItemActivate
20916
20736
  }) {
20917
20737
  const { getState } = useMenuContext();
20918
- const [{ onItemEnter, onItemLeave }] = (0, import_react60.useState)(() => {
20738
+ const [{ onItemEnter, onItemLeave }] = (0, import_react57.useState)(() => {
20919
20739
  return new MenuTriangleContext({
20920
20740
  parentMenuId: getState().parentMenuId,
20921
20741
  onItemActivate: (itemKey) => {
@@ -20946,8 +20766,8 @@ function useSubmenus({
20946
20766
  }).getHandlers();
20947
20767
  });
20948
20768
  return {
20949
- onItemEnter: (0, import_react60.useCallback)(onItemEnter, []),
20950
- onItemLeave: (0, import_react60.useCallback)(onItemLeave, [])
20769
+ onItemEnter: (0, import_react57.useCallback)(onItemEnter, []),
20770
+ onItemLeave: (0, import_react57.useCallback)(onItemLeave, [])
20951
20771
  };
20952
20772
  }
20953
20773
  function MenuComponent(props) {
@@ -20972,16 +20792,16 @@ function MenuComponent(props) {
20972
20792
  componentActions,
20973
20793
  getState
20974
20794
  } = useMenuContext();
20975
- const setKeyboardActiveItemKey = (0, import_react60.useCallback)((key) => {
20795
+ const setKeyboardActiveItemKey = (0, import_react57.useCallback)((key) => {
20976
20796
  componentActions.keyboardActiveItemKey = key;
20977
20797
  }, []);
20978
- const setActiveItemKey = (0, import_react60.useCallback)((key) => {
20798
+ const setActiveItemKey = (0, import_react57.useCallback)((key) => {
20979
20799
  componentActions.activeItemKey = key;
20980
20800
  }, []);
20981
20801
  const isMounted = useMounted();
20982
- const [submenuApi, setSubmenuApi] = (0, import_react60.useState)(null);
20802
+ const [submenuApi, setSubmenuApi] = (0, import_react57.useState)(null);
20983
20803
  let renderedChildren = null;
20984
- (0, import_react60.useLayoutEffect)(() => {
20804
+ (0, import_react57.useLayoutEffect)(() => {
20985
20805
  const { runtimeItems: runtimeItems2 } = getState();
20986
20806
  const activeItem = runtimeItems2.filter(
20987
20807
  (item) => item.type === "item" && activeItemKey === item.key
@@ -21192,7 +21012,7 @@ function MenuComponent(props) {
21192
21012
  function onMenuBlur() {
21193
21013
  componentActions.focused = false;
21194
21014
  }
21195
- const onMenuFocus = (0, import_react60.useCallback)(function() {
21015
+ const onMenuFocus = (0, import_react57.useCallback)(function() {
21196
21016
  componentActions.focused = true;
21197
21017
  setTimeout(() => {
21198
21018
  var _a, _b;
@@ -21203,13 +21023,13 @@ function MenuComponent(props) {
21203
21023
  }
21204
21024
  });
21205
21025
  }, []);
21206
- const shouldSelectFirstItemOnFocus = (0, import_react60.useRef)(true);
21207
- const hideAll = (0, import_react60.useCallback)(() => {
21026
+ const shouldSelectFirstItemOnFocus = (0, import_react57.useRef)(true);
21027
+ const hideAll = (0, import_react57.useCallback)(() => {
21208
21028
  var _a;
21209
21029
  const state = getState();
21210
21030
  (_a = state.onHideIntent) == null ? void 0 : _a.call(state, state);
21211
21031
  }, [getState]);
21212
- const [api] = (0, import_react60.useState)(() => {
21032
+ const [api] = (0, import_react57.useState)(() => {
21213
21033
  const result2 = {
21214
21034
  hideMenu: hideAll,
21215
21035
  focus: () => {
@@ -21228,7 +21048,7 @@ function MenuComponent(props) {
21228
21048
  };
21229
21049
  return result2;
21230
21050
  });
21231
- const refCallback = (0, import_react60.useCallback)((node) => {
21051
+ const refCallback = (0, import_react57.useCallback)((node) => {
21232
21052
  if (node) {
21233
21053
  domRef.current = node;
21234
21054
  onShow == null ? void 0 : onShow(getState(), api);
@@ -21652,7 +21472,7 @@ function useColumnMenu() {
21652
21472
  } = useOverlay({
21653
21473
  portalContainer: masterContext ? masterContext.getMasterState().portalDOMRef.current : false
21654
21474
  });
21655
- (0, import_react61.useEffect)(() => {
21475
+ (0, import_react58.useEffect)(() => {
21656
21476
  const { actions: actions2, getState: getState2 } = context;
21657
21477
  const state = getState2();
21658
21478
  return state.onColumnMenuClick.onChange((info) => {
@@ -21667,7 +21487,7 @@ function useColumnMenu() {
21667
21487
  });
21668
21488
  }, []);
21669
21489
  const { columnMenuVisibleForColumnId, columnMenuVisibleKey } = getState();
21670
- (0, import_react61.useEffect)(() => {
21490
+ (0, import_react58.useEffect)(() => {
21671
21491
  const { columnMenuVisibleForColumnId: columnMenuVisibleForColumnId2, columnMenuTargetRef } = getState();
21672
21492
  if (columnMenuVisibleForColumnId2) {
21673
21493
  let handleMouseDown2 = function(event) {
@@ -21702,7 +21522,7 @@ function useColumnMenu() {
21702
21522
 
21703
21523
  // src/components/InfiniteTable/components/FocusDetect.tsx
21704
21524
  var React62 = __toESM(require("react"));
21705
- var import_react62 = require("react");
21525
+ var import_react59 = require("react");
21706
21526
  var style = {
21707
21527
  width: 0,
21708
21528
  height: 0,
@@ -21722,7 +21542,7 @@ function FocusDetect() {
21722
21542
  } = useInfiniteTable();
21723
21543
  const { getState: getDataSourceState, getDataSourceMasterContext } = useDataSourceContextValue();
21724
21544
  const { focusDetectDOMRef } = getState();
21725
- const onFocus = (0, import_react62.useCallback)(() => __async(this, null, function* () {
21545
+ const onFocus = (0, import_react59.useCallback)(() => __async(this, null, function* () {
21726
21546
  const context = {
21727
21547
  getDataSourceState,
21728
21548
  getDataSourceMasterContext,
@@ -21747,13 +21567,13 @@ function FocusDetect() {
21747
21567
  }
21748
21568
 
21749
21569
  // src/components/InfiniteTable/hooks/useEditingCallbackProps.ts
21750
- var import_react63 = require("react");
21570
+ var import_react60 = require("react");
21751
21571
  function useOnEditCancelled() {
21752
21572
  const context = useInfiniteTable();
21753
21573
  const { getState } = context;
21754
21574
  const { editingCell } = getState();
21755
21575
  const cancelled = editingCell && !editingCell.active ? editingCell.cancelled : void 0;
21756
- (0, import_react63.useEffect)(() => {
21576
+ (0, import_react60.useEffect)(() => {
21757
21577
  if (cancelled) {
21758
21578
  const { rowIndex, columnId, initialValue } = getState().editingCell;
21759
21579
  const { onEditCancelled } = getState();
@@ -21773,7 +21593,7 @@ function useOnEditRejected() {
21773
21593
  state: { editingCell }
21774
21594
  } = context;
21775
21595
  const rejected = editingCell && !editingCell.active && editingCell.accepted instanceof Error ? editingCell.accepted : void 0;
21776
- (0, import_react63.useEffect)(() => {
21596
+ (0, import_react60.useEffect)(() => {
21777
21597
  if (rejected) {
21778
21598
  const { rowIndex, columnId, value, initialValue } = getState().editingCell;
21779
21599
  const { onEditRejected } = getState();
@@ -21795,7 +21615,7 @@ function useFocusOnEditStop() {
21795
21615
  } = context;
21796
21616
  const active = editingCell == null ? void 0 : editingCell.active;
21797
21617
  const prevActive = usePrevious(active);
21798
- (0, import_react63.useEffect)(() => {
21618
+ (0, import_react60.useEffect)(() => {
21799
21619
  if (!active && prevActive) {
21800
21620
  context.api.focus();
21801
21621
  }
@@ -21808,7 +21628,7 @@ function useOnEditAccepted() {
21808
21628
  getState
21809
21629
  } = context;
21810
21630
  const accepted = editingCell && !editingCell.active && !editingCell.cancelled && editingCell.accepted === true;
21811
- (0, import_react63.useEffect)(() => {
21631
+ (0, import_react60.useEffect)(() => {
21812
21632
  var _a, _b;
21813
21633
  if (accepted) {
21814
21634
  const { editingCell: editingCell2 } = getState();
@@ -21832,7 +21652,7 @@ function useOnEditPersisted() {
21832
21652
  getState
21833
21653
  } = context;
21834
21654
  const persisted = editingCell ? editingCell.persisted : void 0;
21835
- (0, import_react63.useEffect)(() => {
21655
+ (0, import_react60.useEffect)(() => {
21836
21656
  if (persisted) {
21837
21657
  const { editingCell: editingCell2, onEditPersistError, onEditPersistSuccess } = getState();
21838
21658
  if (!editingCell2) {
@@ -21863,7 +21683,7 @@ function useEditingCallbackProps() {
21863
21683
  }
21864
21684
 
21865
21685
  // src/components/InfiniteTable/hooks/useColumnFilterOperatorMenu.ts
21866
- var import_react64 = require("react");
21686
+ var import_react61 = require("react");
21867
21687
 
21868
21688
  // src/components/InfiniteTable/utils/getFilterOperatorMenuForColumn.tsx
21869
21689
  var React65 = __toESM(require("react"));
@@ -22006,7 +21826,7 @@ function useColumnFilterOperatorMenu() {
22006
21826
  } = useOverlay({
22007
21827
  portalContainer: masterContext ? masterContext.getMasterState().portalDOMRef.current : false
22008
21828
  });
22009
- (0, import_react64.useEffect)(() => {
21829
+ (0, import_react61.useEffect)(() => {
22010
21830
  const { actions: actions2, getState: getState2 } = context;
22011
21831
  const state = getState2();
22012
21832
  return state.onFilterOperatorMenuClick.onChange((info) => {
@@ -22042,7 +21862,7 @@ function useColumnFilterOperatorMenu() {
22042
21862
  actions2.filterOperatorMenuVisibleForColumnId = column.id;
22043
21863
  });
22044
21864
  }, []);
22045
- (0, import_react64.useEffect)(() => {
21865
+ (0, import_react61.useEffect)(() => {
22046
21866
  const { filterOperatorMenuVisibleForColumnId } = getState();
22047
21867
  if (filterOperatorMenuVisibleForColumnId) {
22048
21868
  let handleMouseDown2 = function(event) {
@@ -22069,7 +21889,7 @@ function useColumnFilterOperatorMenu() {
22069
21889
  }
22070
21890
 
22071
21891
  // src/components/InfiniteTable/hooks/useContextMenu.ts
22072
- var import_react65 = require("react");
21892
+ var import_react62 = require("react");
22073
21893
 
22074
21894
  // src/components/InfiniteTable/utils/getCellContextMenu.tsx
22075
21895
  var React66 = __toESM(require("react"));
@@ -22214,7 +22034,7 @@ function useCellContextMenu() {
22214
22034
  } = useOverlay({
22215
22035
  portalContainer: masterContext ? masterContext.getMasterState().portalDOMRef.current : false
22216
22036
  });
22217
- (0, import_react65.useEffect)(() => {
22037
+ (0, import_react62.useEffect)(() => {
22218
22038
  const { actions: actions2, getState: getState2, getDataSourceState } = context;
22219
22039
  const state = getState2();
22220
22040
  return state.cellContextMenu.onChange((info) => {
@@ -22264,7 +22084,7 @@ function useCellContextMenu() {
22264
22084
  }
22265
22085
  });
22266
22086
  }, []);
22267
- (0, import_react65.useEffect)(() => {
22087
+ (0, import_react62.useEffect)(() => {
22268
22088
  const { cellContextMenuVisibleFor } = getState();
22269
22089
  if (cellContextMenuVisibleFor) {
22270
22090
  let handleMouseDown2 = function(event) {
@@ -22300,7 +22120,7 @@ function useTableContextMenu() {
22300
22120
  } = useOverlay({
22301
22121
  portalContainer: masterContext ? masterContext.getMasterState().portalDOMRef.current : false
22302
22122
  });
22303
- (0, import_react65.useEffect)(() => {
22123
+ (0, import_react62.useEffect)(() => {
22304
22124
  const { actions: actions2, getState: getState2 } = context;
22305
22125
  const state = getState2();
22306
22126
  return state.contextMenu.onChange((info) => {
@@ -22345,7 +22165,7 @@ function useTableContextMenu() {
22345
22165
  }
22346
22166
  });
22347
22167
  }, []);
22348
- (0, import_react65.useEffect)(() => {
22168
+ (0, import_react62.useEffect)(() => {
22349
22169
  const { contextMenuVisibleFor } = getState();
22350
22170
  if (contextMenuVisibleFor) {
22351
22171
  let handleMouseDown2 = function(event) {
@@ -22713,6 +22533,49 @@ var keyboardShortcuts = {
22713
22533
  instantEdit
22714
22534
  };
22715
22535
 
22536
+ // src/components/hooks/useInterceptedMap.ts
22537
+ var import_react63 = require("react");
22538
+ function interceptMap(map2, fns) {
22539
+ const { set, delete: deleteKey, clear } = map2;
22540
+ if (fns.set) {
22541
+ map2.set = (key, value) => {
22542
+ set.call(map2, key, value);
22543
+ fns.set(key, value);
22544
+ return map2;
22545
+ };
22546
+ }
22547
+ if (fns.delete) {
22548
+ map2.delete = (key) => {
22549
+ const removed = deleteKey.call(map2, key);
22550
+ fns.delete(key);
22551
+ return removed;
22552
+ };
22553
+ }
22554
+ if (fns.clear || fns.beforeClear) {
22555
+ map2.clear = () => {
22556
+ if (fns.beforeClear) {
22557
+ fns.beforeClear(map2);
22558
+ }
22559
+ const result = clear.call(map2);
22560
+ if (fns.clear) {
22561
+ fns.clear();
22562
+ }
22563
+ return result;
22564
+ };
22565
+ }
22566
+ return () => {
22567
+ if (set) {
22568
+ map2.set = set;
22569
+ }
22570
+ if (deleteKey) {
22571
+ map2.delete = deleteKey;
22572
+ }
22573
+ if (clear) {
22574
+ map2.clear = clear;
22575
+ }
22576
+ };
22577
+ }
22578
+
22716
22579
  // src/utils/FixedSizeSet.ts
22717
22580
  var _FixedSizeSet = class {
22718
22581
  constructor(clone, size) {