@infinite-table/infinite-react 6.2.9 → 6.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.css +1 -1
- package/index.d.ts +433 -433
- package/index.dev.js +32 -22
- package/index.dev.mjs +109 -99
- package/index.js +6 -6
- package/index.mjs +6 -6
- package/package.json +2 -2
package/index.dev.mjs
CHANGED
|
@@ -1394,7 +1394,7 @@ var internalProps = {
|
|
|
1394
1394
|
};
|
|
1395
1395
|
|
|
1396
1396
|
// src/components/InfiniteTable/internalVars.css.ts
|
|
1397
|
-
var InternalVars = { currentColumnTransformX: "var(--_16hkbkc0)", y: "var(--_16hkbkc1)", currentFlashingBackground: "var(--_16hkbkc2)", currentFlashingDuration: "var(--_16hkbkc3)", activeCellRowOffset: "var(--_16hkbkc4)", activeCellRowOffsetX: "var(--_16hkbkc5)", activeCellRowHeight: "var(--_16hkbkc6)", activeCellOffsetX: "var(--_16hkbkc7)", activeCellOffsetY: "var(--_16hkbkc8)", scrollTopForActiveRow: "var(--_16hkbkc9)", scrollLeftForActiveRowWhenHorizontalLayout: "var(--_16hkbkca)", activeCellColWidth: "var(--_16hkbkcb)", activeCellColOffset: "var(--_16hkbkcc)", columnReorderEffectDurationAtIndex: "var(--_16hkbkcd)", columnWidthAtIndex: "var(--_16hkbkce)", columnOffsetAtIndex: "var(--_16hkbkcf)", columnOffsetAtIndexWhileReordering: "var(--_16hkbkcg)", columnZIndexAtIndex: "var(--_16hkbkch)", pinnedStartWidth: "var(--_16hkbkci)", pinnedEndWidth: "var(--_16hkbkcj)", pinnedEndOffset: "var(--_16hkbkck)", computedVisibleColumnsCount: "var(--_16hkbkcl)", baseZIndexForCells: "var(--_16hkbkcm)", bodyWidth: "var(--_16hkbkcn)", bodyHeight: "var(--_16hkbkco)", scrollbarWidthHorizontal: "var(--_16hkbkcp)", scrollbarWidthVertical: "var(--_16hkbkcq)", scrollLeft: "var(--_16hkbkcr)", scrollTop: "var(--_16hkbkcs)"
|
|
1397
|
+
var InternalVars = { currentColumnTransformX: "var(--_16hkbkc0)", y: "var(--_16hkbkc1)", currentFlashingBackground: "var(--_16hkbkc2)", currentFlashingDuration: "var(--_16hkbkc3)", activeCellRowOffset: "var(--_16hkbkc4)", activeCellRowOffsetX: "var(--_16hkbkc5)", activeCellRowHeight: "var(--_16hkbkc6)", activeCellOffsetX: "var(--_16hkbkc7)", activeCellOffsetY: "var(--_16hkbkc8)", scrollTopForActiveRow: "var(--_16hkbkc9)", scrollLeftForActiveRowWhenHorizontalLayout: "var(--_16hkbkca)", activeCellColWidth: "var(--_16hkbkcb)", activeCellColOffset: "var(--_16hkbkcc)", columnReorderEffectDurationAtIndex: "var(--_16hkbkcd)", columnWidthAtIndex: "var(--_16hkbkce)", columnOffsetAtIndex: "var(--_16hkbkcf)", columnOffsetAtIndexWhileReordering: "var(--_16hkbkcg)", columnZIndexAtIndex: "var(--_16hkbkch)", pinnedStartWidth: "var(--_16hkbkci)", pinnedEndWidth: "var(--_16hkbkcj)", pinnedEndOffset: "var(--_16hkbkck)", computedVisibleColumnsCount: "var(--_16hkbkcl)", baseZIndexForCells: "var(--_16hkbkcm)", bodyWidth: "var(--_16hkbkcn)", bodyHeight: "var(--_16hkbkco)", scrollbarWidthHorizontal: "var(--_16hkbkcp)", scrollbarWidthVertical: "var(--_16hkbkcq)", scrollLeft: "var(--_16hkbkcr)", scrollTop: "var(--_16hkbkcs)" };
|
|
1398
1398
|
|
|
1399
1399
|
// src/components/InfiniteTable/vars.css.ts
|
|
1400
1400
|
var CSS_LOADED_VALUE = "true";
|
|
@@ -5348,8 +5348,6 @@ var CELL_DETACHED_CLASSNAMES = [
|
|
|
5348
5348
|
];
|
|
5349
5349
|
|
|
5350
5350
|
// src/components/HeadlessTable/index.tsx
|
|
5351
|
-
var virtualScrollLeftOffset = stripVar(InternalVars.virtualScrollLeftOffset);
|
|
5352
|
-
var virtualScrollTopOffset = stripVar(InternalVars.virtualScrollTopOffset);
|
|
5353
5351
|
function useMatrixBrain(brain, brainOptions, fixedCellsInfo) {
|
|
5354
5352
|
if (fixedCellsInfo && (fixedCellsInfo.fixedColsStart || fixedCellsInfo.fixedColsEnd || fixedCellsInfo.fixedRowsStart || fixedCellsInfo.fixedRowsEnd)) {
|
|
5355
5353
|
brain.updateFixedCells({
|
|
@@ -5423,25 +5421,14 @@ function HeadlessTable(props) {
|
|
|
5423
5421
|
}, [wrapRowsHorizontally, brain]);
|
|
5424
5422
|
const updateDOMTransform = useCallback4((scrollPos) => {
|
|
5425
5423
|
requestAnimationFrame(() => {
|
|
5426
|
-
|
|
5427
|
-
if (!scrollVarHost) {
|
|
5428
|
-
if (!domRef.current) {
|
|
5429
|
-
return;
|
|
5430
|
-
}
|
|
5431
|
-
domRef.current.style.setProperty(
|
|
5432
|
-
"transform",
|
|
5433
|
-
`translate3d(${-scrollPos.scrollLeft}px, ${-scrollPos.scrollTop}px, 0px)`
|
|
5434
|
-
);
|
|
5424
|
+
if (!domRef.current) {
|
|
5435
5425
|
return;
|
|
5436
5426
|
}
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
);
|
|
5441
|
-
scrollVarHost.style.setProperty(
|
|
5442
|
-
virtualScrollTopOffset,
|
|
5443
|
-
`-${scrollPos.scrollTop}px`
|
|
5427
|
+
domRef.current.style.setProperty(
|
|
5428
|
+
"transform",
|
|
5429
|
+
`translate3d(${-scrollPos.scrollLeft}px, ${-scrollPos.scrollTop}px, 0px)`
|
|
5444
5430
|
);
|
|
5431
|
+
return;
|
|
5445
5432
|
});
|
|
5446
5433
|
}, []);
|
|
5447
5434
|
const onContainerScroll = useCallback4(
|
|
@@ -9358,7 +9345,10 @@ function getRawValueForCell(column, rowInfo) {
|
|
|
9358
9345
|
const groupBy = dataSourceHasGrouping ? rowInfo.groupBy : void 0;
|
|
9359
9346
|
let value = isGroupRow && groupBy && column.groupByForColumn && // if this is a multi-group column we're good
|
|
9360
9347
|
(Array.isArray(column.groupByForColumn) || // or it has to be a group column for the current group row
|
|
9361
|
-
column.groupByForColumn === groupBy[groupBy.length - 1]) ? rowInfo.value : isColumnWithField(column) ?
|
|
9348
|
+
column.groupByForColumn === groupBy[groupBy.length - 1]) ? rowInfo.value : isColumnWithField(column) ? (
|
|
9349
|
+
// @ts-ignore
|
|
9350
|
+
data?.[column.field]
|
|
9351
|
+
) : null;
|
|
9362
9352
|
if (column.field && rowInfo.isGroupRow && rowInfo.reducerData && rowInfo.reducerData[column.field] != null) {
|
|
9363
9353
|
value = rowInfo.reducerData[column.field];
|
|
9364
9354
|
}
|
|
@@ -11225,7 +11215,7 @@ function assignGroupOffsetsAndComputedWidths(items, groupOffset = 0) {
|
|
|
11225
11215
|
|
|
11226
11216
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
|
|
11227
11217
|
import * as React47 from "react";
|
|
11228
|
-
import { useCallback as useCallback16, useRef as useRef18 } from "react";
|
|
11218
|
+
import { useCallback as useCallback16, useEffect as useEffect16, useRef as useRef18 } from "react";
|
|
11229
11219
|
|
|
11230
11220
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
|
|
11231
11221
|
import * as React46 from "react";
|
|
@@ -11489,6 +11479,18 @@ function InfiniteTableHeaderFn(props) {
|
|
|
11489
11479
|
} = useInfiniteTable();
|
|
11490
11480
|
const { computedColumnsMap } = computed;
|
|
11491
11481
|
const domRef = useRef18(null);
|
|
11482
|
+
const updateDOMTransform = useCallback16((scrollPosition) => {
|
|
11483
|
+
if (domRef.current) {
|
|
11484
|
+
domRef.current.style.transform = `translate3d(-${scrollPosition.scrollLeft}px, 0px, 0px)`;
|
|
11485
|
+
}
|
|
11486
|
+
}, []);
|
|
11487
|
+
useEffect16(() => {
|
|
11488
|
+
const removeOnScroll = headerBrain.onScroll(updateDOMTransform);
|
|
11489
|
+
updateDOMTransform(
|
|
11490
|
+
headerBrain.getScrollPosition() || { scrollLeft: 0, scrollTop: 0 }
|
|
11491
|
+
);
|
|
11492
|
+
return removeOnScroll;
|
|
11493
|
+
}, [headerBrain]);
|
|
11492
11494
|
const domProps = {
|
|
11493
11495
|
ref: domRef,
|
|
11494
11496
|
className: join(
|
|
@@ -11719,7 +11721,7 @@ function TableHeaderWrapper(props) {
|
|
|
11719
11721
|
|
|
11720
11722
|
// src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
|
|
11721
11723
|
import * as React49 from "react";
|
|
11722
|
-
import { useEffect as
|
|
11724
|
+
import { useEffect as useEffect17 } from "react";
|
|
11723
11725
|
|
|
11724
11726
|
// src/components/utils/decamelize.ts
|
|
11725
11727
|
function decamelize(str, options) {
|
|
@@ -11776,7 +11778,7 @@ var InfiniteTableLicenseFooter = React49.forwardRef(
|
|
|
11776
11778
|
ref.current = node;
|
|
11777
11779
|
}
|
|
11778
11780
|
}, []);
|
|
11779
|
-
|
|
11781
|
+
useEffect17(() => {
|
|
11780
11782
|
const forceStyle = () => {
|
|
11781
11783
|
setTimeout(() => {
|
|
11782
11784
|
enforceStyle(domRef.current, defaultStyle);
|
|
@@ -14607,10 +14609,10 @@ var Indexer = class {
|
|
|
14607
14609
|
};
|
|
14608
14610
|
|
|
14609
14611
|
// src/components/DataSource/privateHooks/useLoadData.ts
|
|
14610
|
-
import { useEffect as
|
|
14612
|
+
import { useEffect as useEffect19, useMemo as useMemo7, useRef as useRef21, useState as useState13 } from "react";
|
|
14611
14613
|
|
|
14612
14614
|
// src/components/hooks/useEffectWithChanges.ts
|
|
14613
|
-
import { useEffect as
|
|
14615
|
+
import { useEffect as useEffect18, useRef as useRef20 } from "react";
|
|
14614
14616
|
function useEffectWithChanges(fn, deps) {
|
|
14615
14617
|
const prevRef = useRef20({});
|
|
14616
14618
|
const oldValuesRef = useRef20({});
|
|
@@ -14628,7 +14630,7 @@ function useEffectWithChanges(fn, deps) {
|
|
|
14628
14630
|
}
|
|
14629
14631
|
}
|
|
14630
14632
|
prevRef.current = deps;
|
|
14631
|
-
|
|
14633
|
+
useEffect18(() => {
|
|
14632
14634
|
const changes2 = changesRef.current;
|
|
14633
14635
|
let result = void 0;
|
|
14634
14636
|
if (Object.keys(changes2).length !== 0) {
|
|
@@ -14646,7 +14648,7 @@ function useEffectWithObject(fn, deps) {
|
|
|
14646
14648
|
useEffectDeps.push(deps[k]);
|
|
14647
14649
|
}
|
|
14648
14650
|
}
|
|
14649
|
-
|
|
14651
|
+
useEffect18(fn, useEffectDeps);
|
|
14650
14652
|
}
|
|
14651
14653
|
|
|
14652
14654
|
// src/utils/composeFunctions.ts
|
|
@@ -17745,7 +17747,7 @@ function useLoadData(options) {
|
|
|
17745
17747
|
horizontal: false
|
|
17746
17748
|
});
|
|
17747
17749
|
const scrollbarsRef = useRef21(scrollbars);
|
|
17748
|
-
|
|
17750
|
+
useEffect19(() => {
|
|
17749
17751
|
notifyScrollbarsChange.onChange((scrollbars2) => {
|
|
17750
17752
|
if (!scrollbars2) {
|
|
17751
17753
|
return;
|
|
@@ -17755,7 +17757,7 @@ function useLoadData(options) {
|
|
|
17755
17757
|
});
|
|
17756
17758
|
return () => notifyScrollbarsChange.destroy();
|
|
17757
17759
|
}, [notifyScrollbarsChange]);
|
|
17758
|
-
|
|
17760
|
+
useEffect19(() => {
|
|
17759
17761
|
if (!livePagination) {
|
|
17760
17762
|
return;
|
|
17761
17763
|
}
|
|
@@ -17768,7 +17770,7 @@ function useLoadData(options) {
|
|
|
17768
17770
|
});
|
|
17769
17771
|
return () => cancelAnimationFrame(frameId);
|
|
17770
17772
|
}, [livePaginationCursor]);
|
|
17771
|
-
|
|
17773
|
+
useEffect19(() => {
|
|
17772
17774
|
if (!livePagination || livePaginationCursor !== void 0) {
|
|
17773
17775
|
return;
|
|
17774
17776
|
}
|
|
@@ -17781,7 +17783,7 @@ function useLoadData(options) {
|
|
|
17781
17783
|
});
|
|
17782
17784
|
return () => cancelAnimationFrame(frameId);
|
|
17783
17785
|
}, [dataArray.length, livePaginationCursor]);
|
|
17784
|
-
|
|
17786
|
+
useEffect19(() => {
|
|
17785
17787
|
const state = getComponentState();
|
|
17786
17788
|
const { livePaginationCursor: livePaginationCursor2, livePagination: livePagination2, dataArray: dataArray2 } = state;
|
|
17787
17789
|
if (!scrollbars.vertical && livePagination2) {
|
|
@@ -17912,7 +17914,7 @@ function useLazyLoadRange(options, dependencies) {
|
|
|
17912
17914
|
componentActions: actions,
|
|
17913
17915
|
componentState
|
|
17914
17916
|
} = options;
|
|
17915
|
-
|
|
17917
|
+
useEffect19(() => {
|
|
17916
17918
|
actions.lazyLoadCacheOfLoadedBatches = new DeepMap();
|
|
17917
17919
|
}, [componentState.data, componentState.dataParams]);
|
|
17918
17920
|
const {
|
|
@@ -17993,7 +17995,7 @@ function useLazyLoadRange(options, dependencies) {
|
|
|
17993
17995
|
groupRowsState
|
|
17994
17996
|
}
|
|
17995
17997
|
);
|
|
17996
|
-
|
|
17998
|
+
useEffect19(() => {
|
|
17997
17999
|
if (lazyLoadBatchSize && lazyLoadBatchSize > 0) {
|
|
17998
18000
|
debouncedLoadRange();
|
|
17999
18001
|
}
|
|
@@ -18800,7 +18802,7 @@ function getDataSourceStateRestoreForDetails(state) {
|
|
|
18800
18802
|
// src/components/DataSource/privateHooks/useDataSource.tsx
|
|
18801
18803
|
import React51, {
|
|
18802
18804
|
useCallback as useCallback19,
|
|
18803
|
-
useEffect as
|
|
18805
|
+
useEffect as useEffect20,
|
|
18804
18806
|
useLayoutEffect as useLayoutEffect10,
|
|
18805
18807
|
useState as useState14
|
|
18806
18808
|
} from "react";
|
|
@@ -18872,7 +18874,7 @@ function useDataSourceInternal(props) {
|
|
|
18872
18874
|
componentActions,
|
|
18873
18875
|
getComponentState: getState
|
|
18874
18876
|
});
|
|
18875
|
-
|
|
18877
|
+
useEffect20(() => {
|
|
18876
18878
|
componentState.onDataArrayChange?.(
|
|
18877
18879
|
componentState.originalDataArray,
|
|
18878
18880
|
componentState.originalDataArrayChangedInfo
|
|
@@ -18894,7 +18896,7 @@ function useDataSourceInternal(props) {
|
|
|
18894
18896
|
});
|
|
18895
18897
|
}
|
|
18896
18898
|
}, [componentState.originalDataArrayChangedInfo]);
|
|
18897
|
-
|
|
18899
|
+
useEffect20(() => {
|
|
18898
18900
|
componentState.onReady?.(api);
|
|
18899
18901
|
}, []);
|
|
18900
18902
|
return {
|
|
@@ -20829,7 +20831,7 @@ function getImperativeApi(context) {
|
|
|
20829
20831
|
|
|
20830
20832
|
// src/components/InfiniteTable/hooks/useAutoSizeColumns.ts
|
|
20831
20833
|
import {
|
|
20832
|
-
useEffect as
|
|
20834
|
+
useEffect as useEffect21,
|
|
20833
20835
|
useRef as useRef22,
|
|
20834
20836
|
useState as useState15
|
|
20835
20837
|
} from "react";
|
|
@@ -20907,7 +20909,7 @@ function useAutoSizeColumns() {
|
|
|
20907
20909
|
const theKey = typeof autoSizeColumnsKey === "object" ? autoSizeColumnsKey.key : autoSizeColumnsKey;
|
|
20908
20910
|
const getTheKey = useLatest(theKey);
|
|
20909
20911
|
const lastExecutedIdentifierRef = useRef22(null);
|
|
20910
|
-
|
|
20912
|
+
useEffect21(() => {
|
|
20911
20913
|
const key = getTheKey();
|
|
20912
20914
|
if (key == null) {
|
|
20913
20915
|
return;
|
|
@@ -20920,7 +20922,7 @@ function useAutoSizeColumns() {
|
|
|
20920
20922
|
};
|
|
20921
20923
|
return brain.onRenderRangeChange(onChange);
|
|
20922
20924
|
}, [brain]);
|
|
20923
|
-
|
|
20925
|
+
useEffect21(() => {
|
|
20924
20926
|
if (theKey == null) {
|
|
20925
20927
|
return;
|
|
20926
20928
|
}
|
|
@@ -20966,7 +20968,7 @@ function useAutoSizeColumns() {
|
|
|
20966
20968
|
|
|
20967
20969
|
// src/components/InfiniteTable/hooks/useCellRendering.tsx
|
|
20968
20970
|
import { useMemo as useMemo9 } from "react";
|
|
20969
|
-
import { useCallback as useCallback20, useEffect as
|
|
20971
|
+
import { useCallback as useCallback20, useEffect as useEffect22, useRef as useRef24 } from "react";
|
|
20970
20972
|
import * as React54 from "react";
|
|
20971
20973
|
|
|
20972
20974
|
// src/components/InfiniteTable/hooks/useYourBrain.ts
|
|
@@ -21221,17 +21223,17 @@ function useCellRendering(param) {
|
|
|
21221
21223
|
rowspan
|
|
21222
21224
|
});
|
|
21223
21225
|
const scrollTopMaxRef = useRef24(0);
|
|
21224
|
-
|
|
21226
|
+
useEffect22(() => {
|
|
21225
21227
|
return brain.onRenderCountChange(() => {
|
|
21226
21228
|
scrollTopMaxRef.current = brain.scrollTopMax;
|
|
21227
21229
|
});
|
|
21228
21230
|
}, [brain]);
|
|
21229
|
-
|
|
21231
|
+
useEffect22(() => {
|
|
21230
21232
|
return brain.onRenderRangeChange((range) => {
|
|
21231
21233
|
getState().onRenderRangeChange?.(range);
|
|
21232
21234
|
});
|
|
21233
21235
|
}, [brain]);
|
|
21234
|
-
|
|
21236
|
+
useEffect22(() => {
|
|
21235
21237
|
return brain.onScrollStop((scrollPosition) => {
|
|
21236
21238
|
const { scrollTop: scrollTop2, scrollLeft: scrollLeft2 } = scrollPosition;
|
|
21237
21239
|
if (scrollTop2 === 0) {
|
|
@@ -21271,13 +21273,13 @@ function useCellRendering(param) {
|
|
|
21271
21273
|
}
|
|
21272
21274
|
});
|
|
21273
21275
|
}, [brain, onScrollToTop, onScrollToBottom, onScrollStop]);
|
|
21274
|
-
|
|
21276
|
+
useEffect22(() => {
|
|
21275
21277
|
if (!bodySize.height) {
|
|
21276
21278
|
return;
|
|
21277
21279
|
}
|
|
21278
21280
|
actions.ready = true;
|
|
21279
21281
|
}, [!!bodySize.height]);
|
|
21280
|
-
|
|
21282
|
+
useEffect22(() => {
|
|
21281
21283
|
if (!ready) {
|
|
21282
21284
|
}
|
|
21283
21285
|
const { onReady } = getState();
|
|
@@ -21286,7 +21288,7 @@ function useCellRendering(param) {
|
|
|
21286
21288
|
}
|
|
21287
21289
|
}, [ready]);
|
|
21288
21290
|
const [, rerender] = useRerender();
|
|
21289
|
-
|
|
21291
|
+
useEffect22(() => {
|
|
21290
21292
|
rerender();
|
|
21291
21293
|
}, [dataSourceState]);
|
|
21292
21294
|
const renderCell = useCallback20(
|
|
@@ -21407,7 +21409,7 @@ function useCellRendering(param) {
|
|
|
21407
21409
|
}
|
|
21408
21410
|
|
|
21409
21411
|
// src/components/InfiniteTable/hooks/useComputed.ts
|
|
21410
|
-
import { useEffect as
|
|
21412
|
+
import { useEffect as useEffect25, useState as useState17 } from "react";
|
|
21411
21413
|
|
|
21412
21414
|
// src/components/InfiniteTable/utils/MultiCellSelector.ts
|
|
21413
21415
|
var MultiCellSelector = class {
|
|
@@ -21680,7 +21682,7 @@ function useColumnSizeFn(columns) {
|
|
|
21680
21682
|
}
|
|
21681
21683
|
|
|
21682
21684
|
// src/components/InfiniteTable/hooks/useColumnsWhen.ts
|
|
21683
|
-
import { useEffect as
|
|
21685
|
+
import { useEffect as useEffect23, useLayoutEffect as useLayoutEffect11, useMemo as useMemo11 } from "react";
|
|
21684
21686
|
|
|
21685
21687
|
// src/components/InfiniteTable/state/getInitialState.ts
|
|
21686
21688
|
import { createRef } from "react";
|
|
@@ -22531,13 +22533,13 @@ function useColumnsWhen() {
|
|
|
22531
22533
|
pivotGrandTotalColumnPosition
|
|
22532
22534
|
}
|
|
22533
22535
|
} = useManagedComponentState();
|
|
22534
|
-
|
|
22536
|
+
useEffect23(() => {
|
|
22535
22537
|
dataSourceActions.generateGroupRows = groupRenderStrategy !== "inline";
|
|
22536
22538
|
}, [groupRenderStrategy]);
|
|
22537
|
-
|
|
22539
|
+
useEffect23(() => {
|
|
22538
22540
|
dataSourceActions.pivotTotalColumnPosition = pivotTotalColumnPosition;
|
|
22539
22541
|
}, [pivotTotalColumnPosition]);
|
|
22540
|
-
|
|
22542
|
+
useEffect23(() => {
|
|
22541
22543
|
if (pivotGrandTotalColumnPosition != void 0) {
|
|
22542
22544
|
dataSourceActions.pivotGrandTotalColumnPosition = pivotGrandTotalColumnPosition;
|
|
22543
22545
|
}
|
|
@@ -22620,7 +22622,7 @@ function useColumnsWhenInlineGroupRenderStrategy(groupByMap) {
|
|
|
22620
22622
|
});
|
|
22621
22623
|
return Object.keys(computedColumns).length === 0 ? void 0 : computedColumns;
|
|
22622
22624
|
}
|
|
22623
|
-
|
|
22625
|
+
useEffect23(() => {
|
|
22624
22626
|
const update = () => {
|
|
22625
22627
|
componentActions.columnsWhenInlineGroupRenderStrategy = isTree ? void 0 : computeColumnsWhenInlineGroupRenderStrategy(
|
|
22626
22628
|
columns,
|
|
@@ -22651,7 +22653,7 @@ function useColumnsWhenGrouping() {
|
|
|
22651
22653
|
getComponentState
|
|
22652
22654
|
} = useManagedComponentState();
|
|
22653
22655
|
const toggleGroupRow = useToggleGroupRow();
|
|
22654
|
-
|
|
22656
|
+
useEffect23(() => {
|
|
22655
22657
|
const update = () => {
|
|
22656
22658
|
const { columns: columnsWhenGrouping, groupColumnIds } = getColumnsWhenGrouping({
|
|
22657
22659
|
columns,
|
|
@@ -22755,7 +22757,7 @@ function useHideColumns(groupByMap) {
|
|
|
22755
22757
|
hideEmptyGroupColumns ? groupRowsIndexesInDataArray : null,
|
|
22756
22758
|
hideEmptyGroupColumns
|
|
22757
22759
|
]);
|
|
22758
|
-
|
|
22760
|
+
useEffect23(() => {
|
|
22759
22761
|
const isGrouped = groupBy.length > 0;
|
|
22760
22762
|
const currentState = getComponentState();
|
|
22761
22763
|
const {
|
|
@@ -23166,7 +23168,7 @@ function useComputedRowHeight(param) {
|
|
|
23166
23168
|
}
|
|
23167
23169
|
|
|
23168
23170
|
// src/components/InfiniteTable/hooks/useScrollbars.ts
|
|
23169
|
-
import { useState as useState16, useEffect as
|
|
23171
|
+
import { useState as useState16, useEffect as useEffect24, useLayoutEffect as useLayoutEffect12 } from "react";
|
|
23170
23172
|
var INITIAL_SCROLLBARS = {
|
|
23171
23173
|
vertical: false,
|
|
23172
23174
|
horizontal: false
|
|
@@ -23175,7 +23177,7 @@ function useScrollbars(brain) {
|
|
|
23175
23177
|
const { getComponentState: getInfiniteTableState } = useManagedComponentState();
|
|
23176
23178
|
const { getState: getDataSourceState } = useDataSourceContextValue();
|
|
23177
23179
|
const [scrollbars, setScrollbars] = useState16(INITIAL_SCROLLBARS);
|
|
23178
|
-
|
|
23180
|
+
useEffect24(() => {
|
|
23179
23181
|
return brain.onRenderCountChange(() => {
|
|
23180
23182
|
const { scrollTopMax, scrollLeftMax } = brain;
|
|
23181
23183
|
setScrollbars({
|
|
@@ -23250,7 +23252,7 @@ function useComputed() {
|
|
|
23250
23252
|
}
|
|
23251
23253
|
);
|
|
23252
23254
|
});
|
|
23253
|
-
|
|
23255
|
+
useEffect25(() => {
|
|
23254
23256
|
dataSourceActions.showSeparatePivotColumnForSingleAggregation = showSeparatePivotColumnForSingleAggregation;
|
|
23255
23257
|
}, [showSeparatePivotColumnForSingleAggregation]);
|
|
23256
23258
|
const { multiSort, filterValue, filterTypes } = dataSourceState;
|
|
@@ -23558,7 +23560,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
23558
23560
|
}
|
|
23559
23561
|
let valid2 = isValidLicense(licenseKey, {
|
|
23560
23562
|
publishedAt: 1624970570587,
|
|
23561
|
-
version: "6.2.
|
|
23563
|
+
version: "6.2.11"
|
|
23562
23564
|
});
|
|
23563
23565
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
23564
23566
|
return true;
|
|
@@ -23569,18 +23571,18 @@ var useLicense = (licenseKey = "") => {
|
|
|
23569
23571
|
};
|
|
23570
23572
|
|
|
23571
23573
|
// src/components/InfiniteTable/hooks/useScrollToActiveCell.ts
|
|
23572
|
-
import { useRef as useRef25, useEffect as
|
|
23574
|
+
import { useRef as useRef25, useEffect as useEffect26 } from "react";
|
|
23573
23575
|
var RETRIES = 10;
|
|
23574
23576
|
function useScrollToActiveCell(activeCellIndex, dataCount, imperativeApi) {
|
|
23575
23577
|
const didScrollRef = useRef25(false);
|
|
23576
23578
|
const rafId = useRef25(null);
|
|
23577
|
-
|
|
23579
|
+
useEffect26(() => {
|
|
23578
23580
|
if (activeCellIndex != null) {
|
|
23579
23581
|
didScrollRef.current = false;
|
|
23580
23582
|
cancelRaf(rafId.current);
|
|
23581
23583
|
}
|
|
23582
23584
|
}, [activeCellIndex]);
|
|
23583
|
-
|
|
23585
|
+
useEffect26(() => {
|
|
23584
23586
|
if (activeCellIndex != null && !didScrollRef.current) {
|
|
23585
23587
|
let tryScroll2 = function(times = 0) {
|
|
23586
23588
|
times++;
|
|
@@ -23608,18 +23610,18 @@ function useScrollToActiveCell(activeCellIndex, dataCount, imperativeApi) {
|
|
|
23608
23610
|
}
|
|
23609
23611
|
|
|
23610
23612
|
// src/components/InfiniteTable/hooks/useScrollToActiveRow.ts
|
|
23611
|
-
import { useRef as useRef26, useEffect as
|
|
23613
|
+
import { useRef as useRef26, useEffect as useEffect27 } from "react";
|
|
23612
23614
|
var RETRIES2 = 10;
|
|
23613
23615
|
function useScrollToActiveRow(activeRowIndex, dataCount, imperativeApi) {
|
|
23614
23616
|
const didScrollRef = useRef26(false);
|
|
23615
23617
|
const rafId = useRef26(null);
|
|
23616
|
-
|
|
23618
|
+
useEffect27(() => {
|
|
23617
23619
|
if (activeRowIndex != null) {
|
|
23618
23620
|
didScrollRef.current = false;
|
|
23619
23621
|
cancelAnimationFrame(rafId.current);
|
|
23620
23622
|
}
|
|
23621
23623
|
}, [activeRowIndex]);
|
|
23622
|
-
|
|
23624
|
+
useEffect27(() => {
|
|
23623
23625
|
if (activeRowIndex != null && !didScrollRef.current) {
|
|
23624
23626
|
let tryScroll2 = function(times = 0) {
|
|
23625
23627
|
times++;
|
|
@@ -23648,7 +23650,7 @@ function useScrollToActiveRow(activeRowIndex, dataCount, imperativeApi) {
|
|
|
23648
23650
|
var toCSSVarName = (value) => `--infinite-${value}`;
|
|
23649
23651
|
|
|
23650
23652
|
// src/components/InfiniteTable/eventHandlers/index.ts
|
|
23651
|
-
import { useCallback as useCallback23, useMemo as useMemo15, useEffect as
|
|
23653
|
+
import { useCallback as useCallback23, useMemo as useMemo15, useEffect as useEffect28 } from "react";
|
|
23652
23654
|
|
|
23653
23655
|
// src/components/InfiniteTable/eventHandlers/onCellClick.ts
|
|
23654
23656
|
function onCellClick(context, event) {
|
|
@@ -24359,7 +24361,7 @@ function useEventHandlersContext() {
|
|
|
24359
24361
|
}
|
|
24360
24362
|
function handleDOMEvents() {
|
|
24361
24363
|
const context = useEventHandlersContext();
|
|
24362
|
-
|
|
24364
|
+
useEffect28(() => {
|
|
24363
24365
|
const removeOnKeyDown = context.getState().keyDown.onChange((event) => {
|
|
24364
24366
|
onKeyDown(context, event);
|
|
24365
24367
|
});
|
|
@@ -24415,13 +24417,13 @@ function useDOMEventHandlers() {
|
|
|
24415
24417
|
}
|
|
24416
24418
|
|
|
24417
24419
|
// src/components/InfiniteTable/hooks/useColumnMenu.ts
|
|
24418
|
-
import { useEffect as
|
|
24420
|
+
import { useEffect as useEffect32 } from "react";
|
|
24419
24421
|
|
|
24420
24422
|
// src/components/hooks/useOverlay/index.tsx
|
|
24421
24423
|
import * as React56 from "react";
|
|
24422
24424
|
import {
|
|
24423
24425
|
useCallback as useCallback24,
|
|
24424
|
-
useEffect as
|
|
24426
|
+
useEffect as useEffect30,
|
|
24425
24427
|
useLayoutEffect as useLayoutEffect13,
|
|
24426
24428
|
useState as useState18
|
|
24427
24429
|
} from "react";
|
|
@@ -24812,7 +24814,7 @@ function DefaultOverlayPortal(props) {
|
|
|
24812
24814
|
}
|
|
24813
24815
|
function OverlayContent(props) {
|
|
24814
24816
|
const nodeRef = React56.useRef(null);
|
|
24815
|
-
|
|
24817
|
+
useEffect30(() => {
|
|
24816
24818
|
return props.realign.onChange((handle) => {
|
|
24817
24819
|
if (nodeRef.current && handle) {
|
|
24818
24820
|
alignNode(nodeRef.current, handle);
|
|
@@ -25409,10 +25411,10 @@ function useMenuContext() {
|
|
|
25409
25411
|
}
|
|
25410
25412
|
|
|
25411
25413
|
// src/components/hooks/useMounted.ts
|
|
25412
|
-
import { useCallback as useCallback25, useEffect as
|
|
25414
|
+
import { useCallback as useCallback25, useEffect as useEffect31, useRef as useRef28 } from "react";
|
|
25413
25415
|
function useMounted() {
|
|
25414
25416
|
let mountedRef = useRef28(true);
|
|
25415
|
-
|
|
25417
|
+
useEffect31(() => {
|
|
25416
25418
|
mountedRef.current = true;
|
|
25417
25419
|
return () => {
|
|
25418
25420
|
mountedRef.current = false;
|
|
@@ -26224,7 +26226,7 @@ function useColumnMenu() {
|
|
|
26224
26226
|
} = useOverlay({
|
|
26225
26227
|
portalContainer: masterContext ? masterContext.getMasterState().portalDOMRef.current : false
|
|
26226
26228
|
});
|
|
26227
|
-
|
|
26229
|
+
useEffect32(() => {
|
|
26228
26230
|
const { actions: actions2, getState: getState2 } = context;
|
|
26229
26231
|
const state = getState2();
|
|
26230
26232
|
return state.onColumnMenuClick.onChange((info) => {
|
|
@@ -26239,7 +26241,7 @@ function useColumnMenu() {
|
|
|
26239
26241
|
});
|
|
26240
26242
|
}, []);
|
|
26241
26243
|
const { columnMenuVisibleForColumnId, columnMenuVisibleKey } = getState();
|
|
26242
|
-
|
|
26244
|
+
useEffect32(() => {
|
|
26243
26245
|
const { columnMenuVisibleForColumnId: columnMenuVisibleForColumnId2, columnMenuTargetRef } = getState();
|
|
26244
26246
|
if (columnMenuVisibleForColumnId2) {
|
|
26245
26247
|
let handleMouseDown2 = function(event) {
|
|
@@ -26319,13 +26321,13 @@ function FocusDetect() {
|
|
|
26319
26321
|
}
|
|
26320
26322
|
|
|
26321
26323
|
// src/components/InfiniteTable/hooks/useEditingCallbackProps.ts
|
|
26322
|
-
import { useEffect as
|
|
26324
|
+
import { useEffect as useEffect33 } from "react";
|
|
26323
26325
|
function useOnEditCancelled() {
|
|
26324
26326
|
const context = useInfiniteTable();
|
|
26325
26327
|
const { getState } = context;
|
|
26326
26328
|
const { editingCell } = getState();
|
|
26327
26329
|
const cancelled = editingCell && !editingCell.active ? editingCell.cancelled : void 0;
|
|
26328
|
-
|
|
26330
|
+
useEffect33(() => {
|
|
26329
26331
|
if (cancelled) {
|
|
26330
26332
|
const { rowIndex, columnId, initialValue } = getState().editingCell;
|
|
26331
26333
|
const { onEditCancelled } = getState();
|
|
@@ -26347,7 +26349,7 @@ function useOnEditRejected() {
|
|
|
26347
26349
|
state: { editingCell }
|
|
26348
26350
|
} = context;
|
|
26349
26351
|
const rejected = editingCell && !editingCell.active && editingCell.accepted instanceof Error ? editingCell.accepted : void 0;
|
|
26350
|
-
|
|
26352
|
+
useEffect33(() => {
|
|
26351
26353
|
if (rejected) {
|
|
26352
26354
|
const { rowIndex, columnId, value, initialValue } = getState().editingCell;
|
|
26353
26355
|
const { onEditRejected } = getState();
|
|
@@ -26371,7 +26373,7 @@ function useFocusOnEditStop() {
|
|
|
26371
26373
|
} = context;
|
|
26372
26374
|
const active = editingCell?.active;
|
|
26373
26375
|
const prevActive = usePrevious(active);
|
|
26374
|
-
|
|
26376
|
+
useEffect33(() => {
|
|
26375
26377
|
if (!active && prevActive) {
|
|
26376
26378
|
context.api.focus();
|
|
26377
26379
|
}
|
|
@@ -26384,7 +26386,7 @@ function useOnEditAccepted() {
|
|
|
26384
26386
|
getState
|
|
26385
26387
|
} = context;
|
|
26386
26388
|
const accepted = editingCell && !editingCell.active && !editingCell.cancelled && editingCell.accepted === true;
|
|
26387
|
-
|
|
26389
|
+
useEffect33(() => {
|
|
26388
26390
|
if (accepted) {
|
|
26389
26391
|
const { editingCell: editingCell2 } = getState();
|
|
26390
26392
|
const { value, rowIndex, columnId, initialValue } = editingCell2;
|
|
@@ -26409,7 +26411,7 @@ function useOnEditPersisted() {
|
|
|
26409
26411
|
getState
|
|
26410
26412
|
} = context;
|
|
26411
26413
|
const persisted = editingCell ? editingCell.persisted : void 0;
|
|
26412
|
-
|
|
26414
|
+
useEffect33(() => {
|
|
26413
26415
|
if (persisted) {
|
|
26414
26416
|
const { editingCell: editingCell2, onEditPersistError, onEditPersistSuccess } = getState();
|
|
26415
26417
|
if (!editingCell2) {
|
|
@@ -26442,7 +26444,7 @@ function useEditingCallbackProps() {
|
|
|
26442
26444
|
}
|
|
26443
26445
|
|
|
26444
26446
|
// src/components/InfiniteTable/hooks/useColumnFilterOperatorMenu.ts
|
|
26445
|
-
import { useEffect as
|
|
26447
|
+
import { useEffect as useEffect34 } from "react";
|
|
26446
26448
|
|
|
26447
26449
|
// src/components/InfiniteTable/utils/getFilterOperatorMenuForColumn.tsx
|
|
26448
26450
|
import * as React66 from "react";
|
|
@@ -26581,7 +26583,7 @@ function useColumnFilterOperatorMenu() {
|
|
|
26581
26583
|
} = useOverlay({
|
|
26582
26584
|
portalContainer: masterContext ? masterContext.getMasterState().portalDOMRef.current : false
|
|
26583
26585
|
});
|
|
26584
|
-
|
|
26586
|
+
useEffect34(() => {
|
|
26585
26587
|
const { actions: actions2, getState: getState2 } = context;
|
|
26586
26588
|
const state = getState2();
|
|
26587
26589
|
return state.onFilterOperatorMenuClick.onChange((info) => {
|
|
@@ -26617,7 +26619,7 @@ function useColumnFilterOperatorMenu() {
|
|
|
26617
26619
|
actions2.filterOperatorMenuVisibleForColumnId = column.id;
|
|
26618
26620
|
});
|
|
26619
26621
|
}, []);
|
|
26620
|
-
|
|
26622
|
+
useEffect34(() => {
|
|
26621
26623
|
const { filterOperatorMenuVisibleForColumnId } = getState();
|
|
26622
26624
|
if (filterOperatorMenuVisibleForColumnId) {
|
|
26623
26625
|
let handleMouseDown2 = function(event) {
|
|
@@ -26644,7 +26646,7 @@ function useColumnFilterOperatorMenu() {
|
|
|
26644
26646
|
}
|
|
26645
26647
|
|
|
26646
26648
|
// src/components/InfiniteTable/hooks/useContextMenu.ts
|
|
26647
|
-
import { useEffect as
|
|
26649
|
+
import { useEffect as useEffect35 } from "react";
|
|
26648
26650
|
|
|
26649
26651
|
// src/components/InfiniteTable/utils/getCellContextMenu.tsx
|
|
26650
26652
|
import * as React68 from "react";
|
|
@@ -26811,7 +26813,7 @@ function useCellContextMenu() {
|
|
|
26811
26813
|
} = useOverlay({
|
|
26812
26814
|
portalContainer: masterContext ? masterContext.getMasterState().portalDOMRef.current : false
|
|
26813
26815
|
});
|
|
26814
|
-
|
|
26816
|
+
useEffect35(() => {
|
|
26815
26817
|
const { actions: actions2, getState: getState2, getDataSourceState } = context;
|
|
26816
26818
|
const state = getState2();
|
|
26817
26819
|
return state.cellContextMenu.onChange((info) => {
|
|
@@ -26862,7 +26864,7 @@ function useCellContextMenu() {
|
|
|
26862
26864
|
}
|
|
26863
26865
|
});
|
|
26864
26866
|
}, []);
|
|
26865
|
-
|
|
26867
|
+
useEffect35(() => {
|
|
26866
26868
|
const { cellContextMenuVisibleFor } = getState();
|
|
26867
26869
|
if (cellContextMenuVisibleFor) {
|
|
26868
26870
|
let handleMouseDown2 = function(event) {
|
|
@@ -26898,7 +26900,7 @@ function useTableContextMenu() {
|
|
|
26898
26900
|
} = useOverlay({
|
|
26899
26901
|
portalContainer: masterContext ? masterContext.getMasterState().portalDOMRef.current : false
|
|
26900
26902
|
});
|
|
26901
|
-
|
|
26903
|
+
useEffect35(() => {
|
|
26902
26904
|
const { actions: actions2, getState: getState2 } = context;
|
|
26903
26905
|
const state = getState2();
|
|
26904
26906
|
return state.contextMenu.onChange((info) => {
|
|
@@ -26947,7 +26949,7 @@ function useTableContextMenu() {
|
|
|
26947
26949
|
}
|
|
26948
26950
|
});
|
|
26949
26951
|
}, []);
|
|
26950
|
-
|
|
26952
|
+
useEffect35(() => {
|
|
26951
26953
|
const { contextMenuVisibleFor } = getState();
|
|
26952
26954
|
if (contextMenuVisibleFor) {
|
|
26953
26955
|
let handleMouseDown2 = function(event) {
|
|
@@ -26978,13 +26980,13 @@ import { useRef as useRef30 } from "react";
|
|
|
26978
26980
|
import * as React69 from "react";
|
|
26979
26981
|
|
|
26980
26982
|
// src/components/InfiniteTable/hooks/useGridScroll.ts
|
|
26981
|
-
import { useCallback as useCallback28, useEffect as
|
|
26983
|
+
import { useCallback as useCallback28, useEffect as useEffect36 } from "react";
|
|
26982
26984
|
function useGridScroll(onScroll, deps) {
|
|
26983
26985
|
const {
|
|
26984
26986
|
state: { brain }
|
|
26985
26987
|
} = useInfiniteTable();
|
|
26986
26988
|
const memoizedOnScroll = useCallback28(onScroll, deps);
|
|
26987
|
-
|
|
26989
|
+
useEffect36(() => {
|
|
26988
26990
|
const removeOnScroll = brain.onScroll(memoizedOnScroll);
|
|
26989
26991
|
return removeOnScroll;
|
|
26990
26992
|
}, [brain, memoizedOnScroll]);
|
|
@@ -27054,12 +27056,12 @@ function useVisibleColumnSizes() {
|
|
|
27054
27056
|
var DEBUG_NAME = "InfiniteTable";
|
|
27055
27057
|
|
|
27056
27058
|
// src/components/InfiniteTable/hooks/useToggleWrapRowsHorizontally.ts
|
|
27057
|
-
import { useEffect as
|
|
27059
|
+
import { useEffect as useEffect37 } from "react";
|
|
27058
27060
|
function useToggleWrapRowsHorizontally() {
|
|
27059
27061
|
const { state, getState, actions } = useInfiniteTable();
|
|
27060
27062
|
const { wrapRowsHorizontally } = state;
|
|
27061
27063
|
const oldWrapRowsHorizontally = usePrevious(wrapRowsHorizontally);
|
|
27062
|
-
|
|
27064
|
+
useEffect37(() => {
|
|
27063
27065
|
if (oldWrapRowsHorizontally !== wrapRowsHorizontally) {
|
|
27064
27066
|
const { brain, headerBrain, renderer, onRenderUpdater } = getState();
|
|
27065
27067
|
brain.destroy();
|
|
@@ -27076,13 +27078,21 @@ function useToggleWrapRowsHorizontally() {
|
|
|
27076
27078
|
}
|
|
27077
27079
|
|
|
27078
27080
|
// src/components/InfiniteTable/hooks/useHorizontalLayout.ts
|
|
27079
|
-
import { useEffect as
|
|
27081
|
+
import { useEffect as useEffect38 } from "react";
|
|
27080
27082
|
function useHorizontalLayout() {
|
|
27081
27083
|
const { getState, actions, dataSourceActions, getDataSourceState } = useInfiniteTable();
|
|
27082
27084
|
const { groupBy, isTree } = getDataSourceState();
|
|
27083
|
-
const
|
|
27084
|
-
|
|
27085
|
+
const state = getState();
|
|
27086
|
+
const { brain, wrapRowsHorizontally } = state;
|
|
27087
|
+
let repeatWrappedGroupRows = state.repeatWrappedGroupRows;
|
|
27088
|
+
if (!wrapRowsHorizontally) {
|
|
27089
|
+
repeatWrappedGroupRows = false;
|
|
27090
|
+
}
|
|
27091
|
+
useEffect38(() => {
|
|
27085
27092
|
if (!wrapRowsHorizontally) {
|
|
27093
|
+
if (getDataSourceState().repeatWrappedGroupRows) {
|
|
27094
|
+
dataSourceActions.repeatWrappedGroupRows = false;
|
|
27095
|
+
}
|
|
27086
27096
|
return;
|
|
27087
27097
|
}
|
|
27088
27098
|
const onVerticalRenderRangeChange = () => {
|
|
@@ -27794,7 +27804,7 @@ var keyboardShortcuts = {
|
|
|
27794
27804
|
};
|
|
27795
27805
|
|
|
27796
27806
|
// src/components/hooks/useInterceptedMap.ts
|
|
27797
|
-
import { useEffect as
|
|
27807
|
+
import { useEffect as useEffect41 } from "react";
|
|
27798
27808
|
function interceptMap(map2, fns) {
|
|
27799
27809
|
const { set, delete: deleteKey, clear } = map2;
|
|
27800
27810
|
if (fns.set) {
|
|
@@ -27956,7 +27966,7 @@ var WeakFixedSizeSet = _WeakFixedSizeSet;
|
|
|
27956
27966
|
WeakFixedSizeSet.DEFAULT_SIZE = 10;
|
|
27957
27967
|
|
|
27958
27968
|
// src/components/hooks/useEffectWhenSameDeps.ts
|
|
27959
|
-
import { useEffect as
|
|
27969
|
+
import { useEffect as useEffect42, useRef as useRef31 } from "react";
|
|
27960
27970
|
var isSameDeps = (deps, prevDeps) => {
|
|
27961
27971
|
return deps.every((dep, index) => dep === prevDeps[index]);
|
|
27962
27972
|
};
|
|
@@ -27970,7 +27980,7 @@ var useEffectWhenSameDeps = (callback, deps) => {
|
|
|
27970
27980
|
effectDepsRef.current = effectDeps;
|
|
27971
27981
|
const callbackRef = useRef31(callback);
|
|
27972
27982
|
callbackRef.current = callback;
|
|
27973
|
-
|
|
27983
|
+
useEffect42(() => {
|
|
27974
27984
|
if (isInitialRef.current) {
|
|
27975
27985
|
isInitialRef.current = false;
|
|
27976
27986
|
return;
|
|
@@ -27980,7 +27990,7 @@ var useEffectWhenSameDeps = (callback, deps) => {
|
|
|
27980
27990
|
};
|
|
27981
27991
|
|
|
27982
27992
|
// src/components/hooks/useEffectWhen.ts
|
|
27983
|
-
import { useEffect as
|
|
27993
|
+
import { useEffect as useEffect43, useRef as useRef32 } from "react";
|
|
27984
27994
|
var isSameDeps2 = (deps, prevDeps, compare) => {
|
|
27985
27995
|
return deps.every((dep, index) => {
|
|
27986
27996
|
if (compare) {
|
|
@@ -28010,7 +28020,7 @@ var useEffectWhen = (callback, options) => {
|
|
|
28010
28020
|
if (sameRespected && differentRespected) {
|
|
28011
28021
|
isInitialRef.current = false;
|
|
28012
28022
|
}
|
|
28013
|
-
|
|
28023
|
+
useEffect43(() => {
|
|
28014
28024
|
if (isInitialRef.current) {
|
|
28015
28025
|
return;
|
|
28016
28026
|
}
|