@infinite-table/infinite-react 6.2.10 → 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.dev.js +19 -20
- package/index.dev.mjs +96 -97
- 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(
|
|
@@ -11228,7 +11215,7 @@ function assignGroupOffsetsAndComputedWidths(items, groupOffset = 0) {
|
|
|
11228
11215
|
|
|
11229
11216
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
|
|
11230
11217
|
import * as React47 from "react";
|
|
11231
|
-
import { useCallback as useCallback16, useRef as useRef18 } from "react";
|
|
11218
|
+
import { useCallback as useCallback16, useEffect as useEffect16, useRef as useRef18 } from "react";
|
|
11232
11219
|
|
|
11233
11220
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
|
|
11234
11221
|
import * as React46 from "react";
|
|
@@ -11492,6 +11479,18 @@ function InfiniteTableHeaderFn(props) {
|
|
|
11492
11479
|
} = useInfiniteTable();
|
|
11493
11480
|
const { computedColumnsMap } = computed;
|
|
11494
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]);
|
|
11495
11494
|
const domProps = {
|
|
11496
11495
|
ref: domRef,
|
|
11497
11496
|
className: join(
|
|
@@ -11722,7 +11721,7 @@ function TableHeaderWrapper(props) {
|
|
|
11722
11721
|
|
|
11723
11722
|
// src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
|
|
11724
11723
|
import * as React49 from "react";
|
|
11725
|
-
import { useEffect as
|
|
11724
|
+
import { useEffect as useEffect17 } from "react";
|
|
11726
11725
|
|
|
11727
11726
|
// src/components/utils/decamelize.ts
|
|
11728
11727
|
function decamelize(str, options) {
|
|
@@ -11779,7 +11778,7 @@ var InfiniteTableLicenseFooter = React49.forwardRef(
|
|
|
11779
11778
|
ref.current = node;
|
|
11780
11779
|
}
|
|
11781
11780
|
}, []);
|
|
11782
|
-
|
|
11781
|
+
useEffect17(() => {
|
|
11783
11782
|
const forceStyle = () => {
|
|
11784
11783
|
setTimeout(() => {
|
|
11785
11784
|
enforceStyle(domRef.current, defaultStyle);
|
|
@@ -14610,10 +14609,10 @@ var Indexer = class {
|
|
|
14610
14609
|
};
|
|
14611
14610
|
|
|
14612
14611
|
// src/components/DataSource/privateHooks/useLoadData.ts
|
|
14613
|
-
import { useEffect as
|
|
14612
|
+
import { useEffect as useEffect19, useMemo as useMemo7, useRef as useRef21, useState as useState13 } from "react";
|
|
14614
14613
|
|
|
14615
14614
|
// src/components/hooks/useEffectWithChanges.ts
|
|
14616
|
-
import { useEffect as
|
|
14615
|
+
import { useEffect as useEffect18, useRef as useRef20 } from "react";
|
|
14617
14616
|
function useEffectWithChanges(fn, deps) {
|
|
14618
14617
|
const prevRef = useRef20({});
|
|
14619
14618
|
const oldValuesRef = useRef20({});
|
|
@@ -14631,7 +14630,7 @@ function useEffectWithChanges(fn, deps) {
|
|
|
14631
14630
|
}
|
|
14632
14631
|
}
|
|
14633
14632
|
prevRef.current = deps;
|
|
14634
|
-
|
|
14633
|
+
useEffect18(() => {
|
|
14635
14634
|
const changes2 = changesRef.current;
|
|
14636
14635
|
let result = void 0;
|
|
14637
14636
|
if (Object.keys(changes2).length !== 0) {
|
|
@@ -14649,7 +14648,7 @@ function useEffectWithObject(fn, deps) {
|
|
|
14649
14648
|
useEffectDeps.push(deps[k]);
|
|
14650
14649
|
}
|
|
14651
14650
|
}
|
|
14652
|
-
|
|
14651
|
+
useEffect18(fn, useEffectDeps);
|
|
14653
14652
|
}
|
|
14654
14653
|
|
|
14655
14654
|
// src/utils/composeFunctions.ts
|
|
@@ -17748,7 +17747,7 @@ function useLoadData(options) {
|
|
|
17748
17747
|
horizontal: false
|
|
17749
17748
|
});
|
|
17750
17749
|
const scrollbarsRef = useRef21(scrollbars);
|
|
17751
|
-
|
|
17750
|
+
useEffect19(() => {
|
|
17752
17751
|
notifyScrollbarsChange.onChange((scrollbars2) => {
|
|
17753
17752
|
if (!scrollbars2) {
|
|
17754
17753
|
return;
|
|
@@ -17758,7 +17757,7 @@ function useLoadData(options) {
|
|
|
17758
17757
|
});
|
|
17759
17758
|
return () => notifyScrollbarsChange.destroy();
|
|
17760
17759
|
}, [notifyScrollbarsChange]);
|
|
17761
|
-
|
|
17760
|
+
useEffect19(() => {
|
|
17762
17761
|
if (!livePagination) {
|
|
17763
17762
|
return;
|
|
17764
17763
|
}
|
|
@@ -17771,7 +17770,7 @@ function useLoadData(options) {
|
|
|
17771
17770
|
});
|
|
17772
17771
|
return () => cancelAnimationFrame(frameId);
|
|
17773
17772
|
}, [livePaginationCursor]);
|
|
17774
|
-
|
|
17773
|
+
useEffect19(() => {
|
|
17775
17774
|
if (!livePagination || livePaginationCursor !== void 0) {
|
|
17776
17775
|
return;
|
|
17777
17776
|
}
|
|
@@ -17784,7 +17783,7 @@ function useLoadData(options) {
|
|
|
17784
17783
|
});
|
|
17785
17784
|
return () => cancelAnimationFrame(frameId);
|
|
17786
17785
|
}, [dataArray.length, livePaginationCursor]);
|
|
17787
|
-
|
|
17786
|
+
useEffect19(() => {
|
|
17788
17787
|
const state = getComponentState();
|
|
17789
17788
|
const { livePaginationCursor: livePaginationCursor2, livePagination: livePagination2, dataArray: dataArray2 } = state;
|
|
17790
17789
|
if (!scrollbars.vertical && livePagination2) {
|
|
@@ -17915,7 +17914,7 @@ function useLazyLoadRange(options, dependencies) {
|
|
|
17915
17914
|
componentActions: actions,
|
|
17916
17915
|
componentState
|
|
17917
17916
|
} = options;
|
|
17918
|
-
|
|
17917
|
+
useEffect19(() => {
|
|
17919
17918
|
actions.lazyLoadCacheOfLoadedBatches = new DeepMap();
|
|
17920
17919
|
}, [componentState.data, componentState.dataParams]);
|
|
17921
17920
|
const {
|
|
@@ -17996,7 +17995,7 @@ function useLazyLoadRange(options, dependencies) {
|
|
|
17996
17995
|
groupRowsState
|
|
17997
17996
|
}
|
|
17998
17997
|
);
|
|
17999
|
-
|
|
17998
|
+
useEffect19(() => {
|
|
18000
17999
|
if (lazyLoadBatchSize && lazyLoadBatchSize > 0) {
|
|
18001
18000
|
debouncedLoadRange();
|
|
18002
18001
|
}
|
|
@@ -18803,7 +18802,7 @@ function getDataSourceStateRestoreForDetails(state) {
|
|
|
18803
18802
|
// src/components/DataSource/privateHooks/useDataSource.tsx
|
|
18804
18803
|
import React51, {
|
|
18805
18804
|
useCallback as useCallback19,
|
|
18806
|
-
useEffect as
|
|
18805
|
+
useEffect as useEffect20,
|
|
18807
18806
|
useLayoutEffect as useLayoutEffect10,
|
|
18808
18807
|
useState as useState14
|
|
18809
18808
|
} from "react";
|
|
@@ -18875,7 +18874,7 @@ function useDataSourceInternal(props) {
|
|
|
18875
18874
|
componentActions,
|
|
18876
18875
|
getComponentState: getState
|
|
18877
18876
|
});
|
|
18878
|
-
|
|
18877
|
+
useEffect20(() => {
|
|
18879
18878
|
componentState.onDataArrayChange?.(
|
|
18880
18879
|
componentState.originalDataArray,
|
|
18881
18880
|
componentState.originalDataArrayChangedInfo
|
|
@@ -18897,7 +18896,7 @@ function useDataSourceInternal(props) {
|
|
|
18897
18896
|
});
|
|
18898
18897
|
}
|
|
18899
18898
|
}, [componentState.originalDataArrayChangedInfo]);
|
|
18900
|
-
|
|
18899
|
+
useEffect20(() => {
|
|
18901
18900
|
componentState.onReady?.(api);
|
|
18902
18901
|
}, []);
|
|
18903
18902
|
return {
|
|
@@ -20832,7 +20831,7 @@ function getImperativeApi(context) {
|
|
|
20832
20831
|
|
|
20833
20832
|
// src/components/InfiniteTable/hooks/useAutoSizeColumns.ts
|
|
20834
20833
|
import {
|
|
20835
|
-
useEffect as
|
|
20834
|
+
useEffect as useEffect21,
|
|
20836
20835
|
useRef as useRef22,
|
|
20837
20836
|
useState as useState15
|
|
20838
20837
|
} from "react";
|
|
@@ -20910,7 +20909,7 @@ function useAutoSizeColumns() {
|
|
|
20910
20909
|
const theKey = typeof autoSizeColumnsKey === "object" ? autoSizeColumnsKey.key : autoSizeColumnsKey;
|
|
20911
20910
|
const getTheKey = useLatest(theKey);
|
|
20912
20911
|
const lastExecutedIdentifierRef = useRef22(null);
|
|
20913
|
-
|
|
20912
|
+
useEffect21(() => {
|
|
20914
20913
|
const key = getTheKey();
|
|
20915
20914
|
if (key == null) {
|
|
20916
20915
|
return;
|
|
@@ -20923,7 +20922,7 @@ function useAutoSizeColumns() {
|
|
|
20923
20922
|
};
|
|
20924
20923
|
return brain.onRenderRangeChange(onChange);
|
|
20925
20924
|
}, [brain]);
|
|
20926
|
-
|
|
20925
|
+
useEffect21(() => {
|
|
20927
20926
|
if (theKey == null) {
|
|
20928
20927
|
return;
|
|
20929
20928
|
}
|
|
@@ -20969,7 +20968,7 @@ function useAutoSizeColumns() {
|
|
|
20969
20968
|
|
|
20970
20969
|
// src/components/InfiniteTable/hooks/useCellRendering.tsx
|
|
20971
20970
|
import { useMemo as useMemo9 } from "react";
|
|
20972
|
-
import { useCallback as useCallback20, useEffect as
|
|
20971
|
+
import { useCallback as useCallback20, useEffect as useEffect22, useRef as useRef24 } from "react";
|
|
20973
20972
|
import * as React54 from "react";
|
|
20974
20973
|
|
|
20975
20974
|
// src/components/InfiniteTable/hooks/useYourBrain.ts
|
|
@@ -21224,17 +21223,17 @@ function useCellRendering(param) {
|
|
|
21224
21223
|
rowspan
|
|
21225
21224
|
});
|
|
21226
21225
|
const scrollTopMaxRef = useRef24(0);
|
|
21227
|
-
|
|
21226
|
+
useEffect22(() => {
|
|
21228
21227
|
return brain.onRenderCountChange(() => {
|
|
21229
21228
|
scrollTopMaxRef.current = brain.scrollTopMax;
|
|
21230
21229
|
});
|
|
21231
21230
|
}, [brain]);
|
|
21232
|
-
|
|
21231
|
+
useEffect22(() => {
|
|
21233
21232
|
return brain.onRenderRangeChange((range) => {
|
|
21234
21233
|
getState().onRenderRangeChange?.(range);
|
|
21235
21234
|
});
|
|
21236
21235
|
}, [brain]);
|
|
21237
|
-
|
|
21236
|
+
useEffect22(() => {
|
|
21238
21237
|
return brain.onScrollStop((scrollPosition) => {
|
|
21239
21238
|
const { scrollTop: scrollTop2, scrollLeft: scrollLeft2 } = scrollPosition;
|
|
21240
21239
|
if (scrollTop2 === 0) {
|
|
@@ -21274,13 +21273,13 @@ function useCellRendering(param) {
|
|
|
21274
21273
|
}
|
|
21275
21274
|
});
|
|
21276
21275
|
}, [brain, onScrollToTop, onScrollToBottom, onScrollStop]);
|
|
21277
|
-
|
|
21276
|
+
useEffect22(() => {
|
|
21278
21277
|
if (!bodySize.height) {
|
|
21279
21278
|
return;
|
|
21280
21279
|
}
|
|
21281
21280
|
actions.ready = true;
|
|
21282
21281
|
}, [!!bodySize.height]);
|
|
21283
|
-
|
|
21282
|
+
useEffect22(() => {
|
|
21284
21283
|
if (!ready) {
|
|
21285
21284
|
}
|
|
21286
21285
|
const { onReady } = getState();
|
|
@@ -21289,7 +21288,7 @@ function useCellRendering(param) {
|
|
|
21289
21288
|
}
|
|
21290
21289
|
}, [ready]);
|
|
21291
21290
|
const [, rerender] = useRerender();
|
|
21292
|
-
|
|
21291
|
+
useEffect22(() => {
|
|
21293
21292
|
rerender();
|
|
21294
21293
|
}, [dataSourceState]);
|
|
21295
21294
|
const renderCell = useCallback20(
|
|
@@ -21410,7 +21409,7 @@ function useCellRendering(param) {
|
|
|
21410
21409
|
}
|
|
21411
21410
|
|
|
21412
21411
|
// src/components/InfiniteTable/hooks/useComputed.ts
|
|
21413
|
-
import { useEffect as
|
|
21412
|
+
import { useEffect as useEffect25, useState as useState17 } from "react";
|
|
21414
21413
|
|
|
21415
21414
|
// src/components/InfiniteTable/utils/MultiCellSelector.ts
|
|
21416
21415
|
var MultiCellSelector = class {
|
|
@@ -21683,7 +21682,7 @@ function useColumnSizeFn(columns) {
|
|
|
21683
21682
|
}
|
|
21684
21683
|
|
|
21685
21684
|
// src/components/InfiniteTable/hooks/useColumnsWhen.ts
|
|
21686
|
-
import { useEffect as
|
|
21685
|
+
import { useEffect as useEffect23, useLayoutEffect as useLayoutEffect11, useMemo as useMemo11 } from "react";
|
|
21687
21686
|
|
|
21688
21687
|
// src/components/InfiniteTable/state/getInitialState.ts
|
|
21689
21688
|
import { createRef } from "react";
|
|
@@ -22534,13 +22533,13 @@ function useColumnsWhen() {
|
|
|
22534
22533
|
pivotGrandTotalColumnPosition
|
|
22535
22534
|
}
|
|
22536
22535
|
} = useManagedComponentState();
|
|
22537
|
-
|
|
22536
|
+
useEffect23(() => {
|
|
22538
22537
|
dataSourceActions.generateGroupRows = groupRenderStrategy !== "inline";
|
|
22539
22538
|
}, [groupRenderStrategy]);
|
|
22540
|
-
|
|
22539
|
+
useEffect23(() => {
|
|
22541
22540
|
dataSourceActions.pivotTotalColumnPosition = pivotTotalColumnPosition;
|
|
22542
22541
|
}, [pivotTotalColumnPosition]);
|
|
22543
|
-
|
|
22542
|
+
useEffect23(() => {
|
|
22544
22543
|
if (pivotGrandTotalColumnPosition != void 0) {
|
|
22545
22544
|
dataSourceActions.pivotGrandTotalColumnPosition = pivotGrandTotalColumnPosition;
|
|
22546
22545
|
}
|
|
@@ -22623,7 +22622,7 @@ function useColumnsWhenInlineGroupRenderStrategy(groupByMap) {
|
|
|
22623
22622
|
});
|
|
22624
22623
|
return Object.keys(computedColumns).length === 0 ? void 0 : computedColumns;
|
|
22625
22624
|
}
|
|
22626
|
-
|
|
22625
|
+
useEffect23(() => {
|
|
22627
22626
|
const update = () => {
|
|
22628
22627
|
componentActions.columnsWhenInlineGroupRenderStrategy = isTree ? void 0 : computeColumnsWhenInlineGroupRenderStrategy(
|
|
22629
22628
|
columns,
|
|
@@ -22654,7 +22653,7 @@ function useColumnsWhenGrouping() {
|
|
|
22654
22653
|
getComponentState
|
|
22655
22654
|
} = useManagedComponentState();
|
|
22656
22655
|
const toggleGroupRow = useToggleGroupRow();
|
|
22657
|
-
|
|
22656
|
+
useEffect23(() => {
|
|
22658
22657
|
const update = () => {
|
|
22659
22658
|
const { columns: columnsWhenGrouping, groupColumnIds } = getColumnsWhenGrouping({
|
|
22660
22659
|
columns,
|
|
@@ -22758,7 +22757,7 @@ function useHideColumns(groupByMap) {
|
|
|
22758
22757
|
hideEmptyGroupColumns ? groupRowsIndexesInDataArray : null,
|
|
22759
22758
|
hideEmptyGroupColumns
|
|
22760
22759
|
]);
|
|
22761
|
-
|
|
22760
|
+
useEffect23(() => {
|
|
22762
22761
|
const isGrouped = groupBy.length > 0;
|
|
22763
22762
|
const currentState = getComponentState();
|
|
22764
22763
|
const {
|
|
@@ -23169,7 +23168,7 @@ function useComputedRowHeight(param) {
|
|
|
23169
23168
|
}
|
|
23170
23169
|
|
|
23171
23170
|
// src/components/InfiniteTable/hooks/useScrollbars.ts
|
|
23172
|
-
import { useState as useState16, useEffect as
|
|
23171
|
+
import { useState as useState16, useEffect as useEffect24, useLayoutEffect as useLayoutEffect12 } from "react";
|
|
23173
23172
|
var INITIAL_SCROLLBARS = {
|
|
23174
23173
|
vertical: false,
|
|
23175
23174
|
horizontal: false
|
|
@@ -23178,7 +23177,7 @@ function useScrollbars(brain) {
|
|
|
23178
23177
|
const { getComponentState: getInfiniteTableState } = useManagedComponentState();
|
|
23179
23178
|
const { getState: getDataSourceState } = useDataSourceContextValue();
|
|
23180
23179
|
const [scrollbars, setScrollbars] = useState16(INITIAL_SCROLLBARS);
|
|
23181
|
-
|
|
23180
|
+
useEffect24(() => {
|
|
23182
23181
|
return brain.onRenderCountChange(() => {
|
|
23183
23182
|
const { scrollTopMax, scrollLeftMax } = brain;
|
|
23184
23183
|
setScrollbars({
|
|
@@ -23253,7 +23252,7 @@ function useComputed() {
|
|
|
23253
23252
|
}
|
|
23254
23253
|
);
|
|
23255
23254
|
});
|
|
23256
|
-
|
|
23255
|
+
useEffect25(() => {
|
|
23257
23256
|
dataSourceActions.showSeparatePivotColumnForSingleAggregation = showSeparatePivotColumnForSingleAggregation;
|
|
23258
23257
|
}, [showSeparatePivotColumnForSingleAggregation]);
|
|
23259
23258
|
const { multiSort, filterValue, filterTypes } = dataSourceState;
|
|
@@ -23561,7 +23560,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
23561
23560
|
}
|
|
23562
23561
|
let valid2 = isValidLicense(licenseKey, {
|
|
23563
23562
|
publishedAt: 1624970570587,
|
|
23564
|
-
version: "6.2.
|
|
23563
|
+
version: "6.2.11"
|
|
23565
23564
|
});
|
|
23566
23565
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
23567
23566
|
return true;
|
|
@@ -23572,18 +23571,18 @@ var useLicense = (licenseKey = "") => {
|
|
|
23572
23571
|
};
|
|
23573
23572
|
|
|
23574
23573
|
// src/components/InfiniteTable/hooks/useScrollToActiveCell.ts
|
|
23575
|
-
import { useRef as useRef25, useEffect as
|
|
23574
|
+
import { useRef as useRef25, useEffect as useEffect26 } from "react";
|
|
23576
23575
|
var RETRIES = 10;
|
|
23577
23576
|
function useScrollToActiveCell(activeCellIndex, dataCount, imperativeApi) {
|
|
23578
23577
|
const didScrollRef = useRef25(false);
|
|
23579
23578
|
const rafId = useRef25(null);
|
|
23580
|
-
|
|
23579
|
+
useEffect26(() => {
|
|
23581
23580
|
if (activeCellIndex != null) {
|
|
23582
23581
|
didScrollRef.current = false;
|
|
23583
23582
|
cancelRaf(rafId.current);
|
|
23584
23583
|
}
|
|
23585
23584
|
}, [activeCellIndex]);
|
|
23586
|
-
|
|
23585
|
+
useEffect26(() => {
|
|
23587
23586
|
if (activeCellIndex != null && !didScrollRef.current) {
|
|
23588
23587
|
let tryScroll2 = function(times = 0) {
|
|
23589
23588
|
times++;
|
|
@@ -23611,18 +23610,18 @@ function useScrollToActiveCell(activeCellIndex, dataCount, imperativeApi) {
|
|
|
23611
23610
|
}
|
|
23612
23611
|
|
|
23613
23612
|
// src/components/InfiniteTable/hooks/useScrollToActiveRow.ts
|
|
23614
|
-
import { useRef as useRef26, useEffect as
|
|
23613
|
+
import { useRef as useRef26, useEffect as useEffect27 } from "react";
|
|
23615
23614
|
var RETRIES2 = 10;
|
|
23616
23615
|
function useScrollToActiveRow(activeRowIndex, dataCount, imperativeApi) {
|
|
23617
23616
|
const didScrollRef = useRef26(false);
|
|
23618
23617
|
const rafId = useRef26(null);
|
|
23619
|
-
|
|
23618
|
+
useEffect27(() => {
|
|
23620
23619
|
if (activeRowIndex != null) {
|
|
23621
23620
|
didScrollRef.current = false;
|
|
23622
23621
|
cancelAnimationFrame(rafId.current);
|
|
23623
23622
|
}
|
|
23624
23623
|
}, [activeRowIndex]);
|
|
23625
|
-
|
|
23624
|
+
useEffect27(() => {
|
|
23626
23625
|
if (activeRowIndex != null && !didScrollRef.current) {
|
|
23627
23626
|
let tryScroll2 = function(times = 0) {
|
|
23628
23627
|
times++;
|
|
@@ -23651,7 +23650,7 @@ function useScrollToActiveRow(activeRowIndex, dataCount, imperativeApi) {
|
|
|
23651
23650
|
var toCSSVarName = (value) => `--infinite-${value}`;
|
|
23652
23651
|
|
|
23653
23652
|
// src/components/InfiniteTable/eventHandlers/index.ts
|
|
23654
|
-
import { useCallback as useCallback23, useMemo as useMemo15, useEffect as
|
|
23653
|
+
import { useCallback as useCallback23, useMemo as useMemo15, useEffect as useEffect28 } from "react";
|
|
23655
23654
|
|
|
23656
23655
|
// src/components/InfiniteTable/eventHandlers/onCellClick.ts
|
|
23657
23656
|
function onCellClick(context, event) {
|
|
@@ -24362,7 +24361,7 @@ function useEventHandlersContext() {
|
|
|
24362
24361
|
}
|
|
24363
24362
|
function handleDOMEvents() {
|
|
24364
24363
|
const context = useEventHandlersContext();
|
|
24365
|
-
|
|
24364
|
+
useEffect28(() => {
|
|
24366
24365
|
const removeOnKeyDown = context.getState().keyDown.onChange((event) => {
|
|
24367
24366
|
onKeyDown(context, event);
|
|
24368
24367
|
});
|
|
@@ -24418,13 +24417,13 @@ function useDOMEventHandlers() {
|
|
|
24418
24417
|
}
|
|
24419
24418
|
|
|
24420
24419
|
// src/components/InfiniteTable/hooks/useColumnMenu.ts
|
|
24421
|
-
import { useEffect as
|
|
24420
|
+
import { useEffect as useEffect32 } from "react";
|
|
24422
24421
|
|
|
24423
24422
|
// src/components/hooks/useOverlay/index.tsx
|
|
24424
24423
|
import * as React56 from "react";
|
|
24425
24424
|
import {
|
|
24426
24425
|
useCallback as useCallback24,
|
|
24427
|
-
useEffect as
|
|
24426
|
+
useEffect as useEffect30,
|
|
24428
24427
|
useLayoutEffect as useLayoutEffect13,
|
|
24429
24428
|
useState as useState18
|
|
24430
24429
|
} from "react";
|
|
@@ -24815,7 +24814,7 @@ function DefaultOverlayPortal(props) {
|
|
|
24815
24814
|
}
|
|
24816
24815
|
function OverlayContent(props) {
|
|
24817
24816
|
const nodeRef = React56.useRef(null);
|
|
24818
|
-
|
|
24817
|
+
useEffect30(() => {
|
|
24819
24818
|
return props.realign.onChange((handle) => {
|
|
24820
24819
|
if (nodeRef.current && handle) {
|
|
24821
24820
|
alignNode(nodeRef.current, handle);
|
|
@@ -25412,10 +25411,10 @@ function useMenuContext() {
|
|
|
25412
25411
|
}
|
|
25413
25412
|
|
|
25414
25413
|
// src/components/hooks/useMounted.ts
|
|
25415
|
-
import { useCallback as useCallback25, useEffect as
|
|
25414
|
+
import { useCallback as useCallback25, useEffect as useEffect31, useRef as useRef28 } from "react";
|
|
25416
25415
|
function useMounted() {
|
|
25417
25416
|
let mountedRef = useRef28(true);
|
|
25418
|
-
|
|
25417
|
+
useEffect31(() => {
|
|
25419
25418
|
mountedRef.current = true;
|
|
25420
25419
|
return () => {
|
|
25421
25420
|
mountedRef.current = false;
|
|
@@ -26227,7 +26226,7 @@ function useColumnMenu() {
|
|
|
26227
26226
|
} = useOverlay({
|
|
26228
26227
|
portalContainer: masterContext ? masterContext.getMasterState().portalDOMRef.current : false
|
|
26229
26228
|
});
|
|
26230
|
-
|
|
26229
|
+
useEffect32(() => {
|
|
26231
26230
|
const { actions: actions2, getState: getState2 } = context;
|
|
26232
26231
|
const state = getState2();
|
|
26233
26232
|
return state.onColumnMenuClick.onChange((info) => {
|
|
@@ -26242,7 +26241,7 @@ function useColumnMenu() {
|
|
|
26242
26241
|
});
|
|
26243
26242
|
}, []);
|
|
26244
26243
|
const { columnMenuVisibleForColumnId, columnMenuVisibleKey } = getState();
|
|
26245
|
-
|
|
26244
|
+
useEffect32(() => {
|
|
26246
26245
|
const { columnMenuVisibleForColumnId: columnMenuVisibleForColumnId2, columnMenuTargetRef } = getState();
|
|
26247
26246
|
if (columnMenuVisibleForColumnId2) {
|
|
26248
26247
|
let handleMouseDown2 = function(event) {
|
|
@@ -26322,13 +26321,13 @@ function FocusDetect() {
|
|
|
26322
26321
|
}
|
|
26323
26322
|
|
|
26324
26323
|
// src/components/InfiniteTable/hooks/useEditingCallbackProps.ts
|
|
26325
|
-
import { useEffect as
|
|
26324
|
+
import { useEffect as useEffect33 } from "react";
|
|
26326
26325
|
function useOnEditCancelled() {
|
|
26327
26326
|
const context = useInfiniteTable();
|
|
26328
26327
|
const { getState } = context;
|
|
26329
26328
|
const { editingCell } = getState();
|
|
26330
26329
|
const cancelled = editingCell && !editingCell.active ? editingCell.cancelled : void 0;
|
|
26331
|
-
|
|
26330
|
+
useEffect33(() => {
|
|
26332
26331
|
if (cancelled) {
|
|
26333
26332
|
const { rowIndex, columnId, initialValue } = getState().editingCell;
|
|
26334
26333
|
const { onEditCancelled } = getState();
|
|
@@ -26350,7 +26349,7 @@ function useOnEditRejected() {
|
|
|
26350
26349
|
state: { editingCell }
|
|
26351
26350
|
} = context;
|
|
26352
26351
|
const rejected = editingCell && !editingCell.active && editingCell.accepted instanceof Error ? editingCell.accepted : void 0;
|
|
26353
|
-
|
|
26352
|
+
useEffect33(() => {
|
|
26354
26353
|
if (rejected) {
|
|
26355
26354
|
const { rowIndex, columnId, value, initialValue } = getState().editingCell;
|
|
26356
26355
|
const { onEditRejected } = getState();
|
|
@@ -26374,7 +26373,7 @@ function useFocusOnEditStop() {
|
|
|
26374
26373
|
} = context;
|
|
26375
26374
|
const active = editingCell?.active;
|
|
26376
26375
|
const prevActive = usePrevious(active);
|
|
26377
|
-
|
|
26376
|
+
useEffect33(() => {
|
|
26378
26377
|
if (!active && prevActive) {
|
|
26379
26378
|
context.api.focus();
|
|
26380
26379
|
}
|
|
@@ -26387,7 +26386,7 @@ function useOnEditAccepted() {
|
|
|
26387
26386
|
getState
|
|
26388
26387
|
} = context;
|
|
26389
26388
|
const accepted = editingCell && !editingCell.active && !editingCell.cancelled && editingCell.accepted === true;
|
|
26390
|
-
|
|
26389
|
+
useEffect33(() => {
|
|
26391
26390
|
if (accepted) {
|
|
26392
26391
|
const { editingCell: editingCell2 } = getState();
|
|
26393
26392
|
const { value, rowIndex, columnId, initialValue } = editingCell2;
|
|
@@ -26412,7 +26411,7 @@ function useOnEditPersisted() {
|
|
|
26412
26411
|
getState
|
|
26413
26412
|
} = context;
|
|
26414
26413
|
const persisted = editingCell ? editingCell.persisted : void 0;
|
|
26415
|
-
|
|
26414
|
+
useEffect33(() => {
|
|
26416
26415
|
if (persisted) {
|
|
26417
26416
|
const { editingCell: editingCell2, onEditPersistError, onEditPersistSuccess } = getState();
|
|
26418
26417
|
if (!editingCell2) {
|
|
@@ -26445,7 +26444,7 @@ function useEditingCallbackProps() {
|
|
|
26445
26444
|
}
|
|
26446
26445
|
|
|
26447
26446
|
// src/components/InfiniteTable/hooks/useColumnFilterOperatorMenu.ts
|
|
26448
|
-
import { useEffect as
|
|
26447
|
+
import { useEffect as useEffect34 } from "react";
|
|
26449
26448
|
|
|
26450
26449
|
// src/components/InfiniteTable/utils/getFilterOperatorMenuForColumn.tsx
|
|
26451
26450
|
import * as React66 from "react";
|
|
@@ -26584,7 +26583,7 @@ function useColumnFilterOperatorMenu() {
|
|
|
26584
26583
|
} = useOverlay({
|
|
26585
26584
|
portalContainer: masterContext ? masterContext.getMasterState().portalDOMRef.current : false
|
|
26586
26585
|
});
|
|
26587
|
-
|
|
26586
|
+
useEffect34(() => {
|
|
26588
26587
|
const { actions: actions2, getState: getState2 } = context;
|
|
26589
26588
|
const state = getState2();
|
|
26590
26589
|
return state.onFilterOperatorMenuClick.onChange((info) => {
|
|
@@ -26620,7 +26619,7 @@ function useColumnFilterOperatorMenu() {
|
|
|
26620
26619
|
actions2.filterOperatorMenuVisibleForColumnId = column.id;
|
|
26621
26620
|
});
|
|
26622
26621
|
}, []);
|
|
26623
|
-
|
|
26622
|
+
useEffect34(() => {
|
|
26624
26623
|
const { filterOperatorMenuVisibleForColumnId } = getState();
|
|
26625
26624
|
if (filterOperatorMenuVisibleForColumnId) {
|
|
26626
26625
|
let handleMouseDown2 = function(event) {
|
|
@@ -26647,7 +26646,7 @@ function useColumnFilterOperatorMenu() {
|
|
|
26647
26646
|
}
|
|
26648
26647
|
|
|
26649
26648
|
// src/components/InfiniteTable/hooks/useContextMenu.ts
|
|
26650
|
-
import { useEffect as
|
|
26649
|
+
import { useEffect as useEffect35 } from "react";
|
|
26651
26650
|
|
|
26652
26651
|
// src/components/InfiniteTable/utils/getCellContextMenu.tsx
|
|
26653
26652
|
import * as React68 from "react";
|
|
@@ -26814,7 +26813,7 @@ function useCellContextMenu() {
|
|
|
26814
26813
|
} = useOverlay({
|
|
26815
26814
|
portalContainer: masterContext ? masterContext.getMasterState().portalDOMRef.current : false
|
|
26816
26815
|
});
|
|
26817
|
-
|
|
26816
|
+
useEffect35(() => {
|
|
26818
26817
|
const { actions: actions2, getState: getState2, getDataSourceState } = context;
|
|
26819
26818
|
const state = getState2();
|
|
26820
26819
|
return state.cellContextMenu.onChange((info) => {
|
|
@@ -26865,7 +26864,7 @@ function useCellContextMenu() {
|
|
|
26865
26864
|
}
|
|
26866
26865
|
});
|
|
26867
26866
|
}, []);
|
|
26868
|
-
|
|
26867
|
+
useEffect35(() => {
|
|
26869
26868
|
const { cellContextMenuVisibleFor } = getState();
|
|
26870
26869
|
if (cellContextMenuVisibleFor) {
|
|
26871
26870
|
let handleMouseDown2 = function(event) {
|
|
@@ -26901,7 +26900,7 @@ function useTableContextMenu() {
|
|
|
26901
26900
|
} = useOverlay({
|
|
26902
26901
|
portalContainer: masterContext ? masterContext.getMasterState().portalDOMRef.current : false
|
|
26903
26902
|
});
|
|
26904
|
-
|
|
26903
|
+
useEffect35(() => {
|
|
26905
26904
|
const { actions: actions2, getState: getState2 } = context;
|
|
26906
26905
|
const state = getState2();
|
|
26907
26906
|
return state.contextMenu.onChange((info) => {
|
|
@@ -26950,7 +26949,7 @@ function useTableContextMenu() {
|
|
|
26950
26949
|
}
|
|
26951
26950
|
});
|
|
26952
26951
|
}, []);
|
|
26953
|
-
|
|
26952
|
+
useEffect35(() => {
|
|
26954
26953
|
const { contextMenuVisibleFor } = getState();
|
|
26955
26954
|
if (contextMenuVisibleFor) {
|
|
26956
26955
|
let handleMouseDown2 = function(event) {
|
|
@@ -26981,13 +26980,13 @@ import { useRef as useRef30 } from "react";
|
|
|
26981
26980
|
import * as React69 from "react";
|
|
26982
26981
|
|
|
26983
26982
|
// src/components/InfiniteTable/hooks/useGridScroll.ts
|
|
26984
|
-
import { useCallback as useCallback28, useEffect as
|
|
26983
|
+
import { useCallback as useCallback28, useEffect as useEffect36 } from "react";
|
|
26985
26984
|
function useGridScroll(onScroll, deps) {
|
|
26986
26985
|
const {
|
|
26987
26986
|
state: { brain }
|
|
26988
26987
|
} = useInfiniteTable();
|
|
26989
26988
|
const memoizedOnScroll = useCallback28(onScroll, deps);
|
|
26990
|
-
|
|
26989
|
+
useEffect36(() => {
|
|
26991
26990
|
const removeOnScroll = brain.onScroll(memoizedOnScroll);
|
|
26992
26991
|
return removeOnScroll;
|
|
26993
26992
|
}, [brain, memoizedOnScroll]);
|
|
@@ -27057,12 +27056,12 @@ function useVisibleColumnSizes() {
|
|
|
27057
27056
|
var DEBUG_NAME = "InfiniteTable";
|
|
27058
27057
|
|
|
27059
27058
|
// src/components/InfiniteTable/hooks/useToggleWrapRowsHorizontally.ts
|
|
27060
|
-
import { useEffect as
|
|
27059
|
+
import { useEffect as useEffect37 } from "react";
|
|
27061
27060
|
function useToggleWrapRowsHorizontally() {
|
|
27062
27061
|
const { state, getState, actions } = useInfiniteTable();
|
|
27063
27062
|
const { wrapRowsHorizontally } = state;
|
|
27064
27063
|
const oldWrapRowsHorizontally = usePrevious(wrapRowsHorizontally);
|
|
27065
|
-
|
|
27064
|
+
useEffect37(() => {
|
|
27066
27065
|
if (oldWrapRowsHorizontally !== wrapRowsHorizontally) {
|
|
27067
27066
|
const { brain, headerBrain, renderer, onRenderUpdater } = getState();
|
|
27068
27067
|
brain.destroy();
|
|
@@ -27079,7 +27078,7 @@ function useToggleWrapRowsHorizontally() {
|
|
|
27079
27078
|
}
|
|
27080
27079
|
|
|
27081
27080
|
// src/components/InfiniteTable/hooks/useHorizontalLayout.ts
|
|
27082
|
-
import { useEffect as
|
|
27081
|
+
import { useEffect as useEffect38 } from "react";
|
|
27083
27082
|
function useHorizontalLayout() {
|
|
27084
27083
|
const { getState, actions, dataSourceActions, getDataSourceState } = useInfiniteTable();
|
|
27085
27084
|
const { groupBy, isTree } = getDataSourceState();
|
|
@@ -27089,7 +27088,7 @@ function useHorizontalLayout() {
|
|
|
27089
27088
|
if (!wrapRowsHorizontally) {
|
|
27090
27089
|
repeatWrappedGroupRows = false;
|
|
27091
27090
|
}
|
|
27092
|
-
|
|
27091
|
+
useEffect38(() => {
|
|
27093
27092
|
if (!wrapRowsHorizontally) {
|
|
27094
27093
|
if (getDataSourceState().repeatWrappedGroupRows) {
|
|
27095
27094
|
dataSourceActions.repeatWrappedGroupRows = false;
|
|
@@ -27805,7 +27804,7 @@ var keyboardShortcuts = {
|
|
|
27805
27804
|
};
|
|
27806
27805
|
|
|
27807
27806
|
// src/components/hooks/useInterceptedMap.ts
|
|
27808
|
-
import { useEffect as
|
|
27807
|
+
import { useEffect as useEffect41 } from "react";
|
|
27809
27808
|
function interceptMap(map2, fns) {
|
|
27810
27809
|
const { set, delete: deleteKey, clear } = map2;
|
|
27811
27810
|
if (fns.set) {
|
|
@@ -27967,7 +27966,7 @@ var WeakFixedSizeSet = _WeakFixedSizeSet;
|
|
|
27967
27966
|
WeakFixedSizeSet.DEFAULT_SIZE = 10;
|
|
27968
27967
|
|
|
27969
27968
|
// src/components/hooks/useEffectWhenSameDeps.ts
|
|
27970
|
-
import { useEffect as
|
|
27969
|
+
import { useEffect as useEffect42, useRef as useRef31 } from "react";
|
|
27971
27970
|
var isSameDeps = (deps, prevDeps) => {
|
|
27972
27971
|
return deps.every((dep, index) => dep === prevDeps[index]);
|
|
27973
27972
|
};
|
|
@@ -27981,7 +27980,7 @@ var useEffectWhenSameDeps = (callback, deps) => {
|
|
|
27981
27980
|
effectDepsRef.current = effectDeps;
|
|
27982
27981
|
const callbackRef = useRef31(callback);
|
|
27983
27982
|
callbackRef.current = callback;
|
|
27984
|
-
|
|
27983
|
+
useEffect42(() => {
|
|
27985
27984
|
if (isInitialRef.current) {
|
|
27986
27985
|
isInitialRef.current = false;
|
|
27987
27986
|
return;
|
|
@@ -27991,7 +27990,7 @@ var useEffectWhenSameDeps = (callback, deps) => {
|
|
|
27991
27990
|
};
|
|
27992
27991
|
|
|
27993
27992
|
// src/components/hooks/useEffectWhen.ts
|
|
27994
|
-
import { useEffect as
|
|
27993
|
+
import { useEffect as useEffect43, useRef as useRef32 } from "react";
|
|
27995
27994
|
var isSameDeps2 = (deps, prevDeps, compare) => {
|
|
27996
27995
|
return deps.every((dep, index) => {
|
|
27997
27996
|
if (compare) {
|
|
@@ -28021,7 +28020,7 @@ var useEffectWhen = (callback, options) => {
|
|
|
28021
28020
|
if (sameRespected && differentRespected) {
|
|
28022
28021
|
isInitialRef.current = false;
|
|
28023
28022
|
}
|
|
28024
|
-
|
|
28023
|
+
useEffect43(() => {
|
|
28025
28024
|
if (isInitialRef.current) {
|
|
28026
28025
|
return;
|
|
28027
28026
|
}
|