@infinite-table/infinite-react 0.2.15 → 0.2.18
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.d.ts +7 -2
- package/index.esm.js +310 -269
- package/index.js +378 -334
- package/package.json +2 -2
package/index.esm.js
CHANGED
|
@@ -633,9 +633,9 @@ function debounce(fn, { wait }) {
|
|
|
633
633
|
// src/components/InfiniteTable/index.tsx
|
|
634
634
|
import {
|
|
635
635
|
StrictMode,
|
|
636
|
-
createElement as
|
|
636
|
+
createElement as createElement32,
|
|
637
637
|
memo as memo13,
|
|
638
|
-
useEffect as
|
|
638
|
+
useEffect as useEffect26,
|
|
639
639
|
useLayoutEffect as useLayoutEffect5
|
|
640
640
|
} from "react";
|
|
641
641
|
|
|
@@ -1289,7 +1289,7 @@ var forwardProps = (setupState) => {
|
|
|
1289
1289
|
pivotColumnGroups: 1,
|
|
1290
1290
|
onScrollbarsChange: 1,
|
|
1291
1291
|
autoSizeColumnsKey: 1,
|
|
1292
|
-
scrollStopDelay: (scrollStopDelay) => scrollStopDelay != null ? scrollStopDelay :
|
|
1292
|
+
scrollStopDelay: (scrollStopDelay) => scrollStopDelay != null ? scrollStopDelay : 250,
|
|
1293
1293
|
viewportReservedWidth: (viewportReservedWidth) => viewportReservedWidth != null ? viewportReservedWidth : 0,
|
|
1294
1294
|
activeIndex: (activeIndex) => activeIndex != null ? activeIndex : 0,
|
|
1295
1295
|
columnMinWidth: (columnMinWidth) => columnMinWidth != null ? columnMinWidth : 30,
|
|
@@ -1301,6 +1301,7 @@ var forwardProps = (setupState) => {
|
|
|
1301
1301
|
sortable: (sortable) => sortable != null ? sortable : true,
|
|
1302
1302
|
hideEmptyGroupColumns: (hideEmptyGroupColumns) => hideEmptyGroupColumns != null ? hideEmptyGroupColumns : false,
|
|
1303
1303
|
pivotTotalColumnPosition: (pivotTotalColumnPosition) => pivotTotalColumnPosition != null ? pivotTotalColumnPosition : "end",
|
|
1304
|
+
pivotGrandTotalColumnPosition: 1,
|
|
1304
1305
|
licenseKey: (licenseKey) => licenseKey || "",
|
|
1305
1306
|
columnOrder: (columnOrder) => columnOrder != null ? columnOrder : true,
|
|
1306
1307
|
header: (header) => header != null ? header : true,
|
|
@@ -1882,7 +1883,8 @@ var getComputedVisibleColumns = ({
|
|
|
1882
1883
|
valueGetter: colType.valueGetter,
|
|
1883
1884
|
renderValue: colType.renderValue,
|
|
1884
1885
|
render: colType.render,
|
|
1885
|
-
style: colType.style
|
|
1886
|
+
style: colType.style,
|
|
1887
|
+
components: colType.components
|
|
1886
1888
|
}, c), {
|
|
1887
1889
|
cssEllipsis,
|
|
1888
1890
|
headerCssEllipsis,
|
|
@@ -2142,7 +2144,7 @@ var useComputedVisibleColumns = ({
|
|
|
2142
2144
|
var sortAscending = (a, b) => a - b;
|
|
2143
2145
|
|
|
2144
2146
|
// src/components/InfiniteTable/hooks/useComputed.ts
|
|
2145
|
-
import { useCallback as useCallback5, useEffect as
|
|
2147
|
+
import { useCallback as useCallback5, useEffect as useEffect11, useMemo as useMemo6, useState as useState5 } from "react";
|
|
2146
2148
|
|
|
2147
2149
|
// src/components/hooks/useComponentState/index.tsx
|
|
2148
2150
|
import {
|
|
@@ -2541,11 +2543,11 @@ function useColumnGroups() {
|
|
|
2541
2543
|
}
|
|
2542
2544
|
|
|
2543
2545
|
// src/components/InfiniteTable/hooks/useColumnsWhen.ts
|
|
2544
|
-
import { useEffect as
|
|
2546
|
+
import { useEffect as useEffect10, useMemo as useMemo5 } from "react";
|
|
2545
2547
|
|
|
2546
2548
|
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
2547
2549
|
import {
|
|
2548
|
-
createElement as
|
|
2550
|
+
createElement as createElement4
|
|
2549
2551
|
} from "react";
|
|
2550
2552
|
|
|
2551
2553
|
// src/utils/join.ts
|
|
@@ -2621,12 +2623,8 @@ var willChange = { transform: "_16lm1iw19" };
|
|
|
2621
2623
|
var zIndex = { "1": "_16lm1iwe", "10": "_16lm1iwf", "1000": "_16lm1iwg", "10000": "_16lm1iwh", "100000": "_16lm1iwi" };
|
|
2622
2624
|
|
|
2623
2625
|
// src/components/InfiniteTable/utils/RenderHookComponent.tsx
|
|
2624
|
-
import {
|
|
2625
|
-
Fragment,
|
|
2626
|
-
createElement as createElement4
|
|
2627
|
-
} from "react";
|
|
2628
2626
|
function RenderHookComponent(props) {
|
|
2629
|
-
return
|
|
2627
|
+
return props.render(props.renderParam);
|
|
2630
2628
|
}
|
|
2631
2629
|
|
|
2632
2630
|
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
@@ -2639,7 +2637,7 @@ function getGroupColumnRender({
|
|
|
2639
2637
|
var _a, _b, _c;
|
|
2640
2638
|
let { value, rowInfo, column, groupBy, pivotBy } = renderOptions;
|
|
2641
2639
|
if (column.renderValue) {
|
|
2642
|
-
value = /* @__PURE__ */
|
|
2640
|
+
value = /* @__PURE__ */ createElement4(RenderHookComponent, {
|
|
2643
2641
|
render: column.renderValue,
|
|
2644
2642
|
renderParam: renderOptions
|
|
2645
2643
|
});
|
|
@@ -2668,20 +2666,20 @@ function getGroupColumnRender({
|
|
|
2668
2666
|
let icon = null;
|
|
2669
2667
|
const showExpanderIcon = pivotBy ? (((_b = groupRowInfo.groupKeys) == null ? void 0 : _b.length) || 0) < (groupBy == null ? void 0 : groupBy.length) : (((_c = groupRowInfo.groupKeys) == null ? void 0 : _c.length) || 0) <= (groupBy == null ? void 0 : groupBy.length);
|
|
2670
2668
|
if (showExpanderIcon) {
|
|
2671
|
-
const defaultIcon = /* @__PURE__ */
|
|
2669
|
+
const defaultIcon = /* @__PURE__ */ createElement4(ExpanderIcon, {
|
|
2672
2670
|
expanded: !collapsed,
|
|
2673
2671
|
onChange: () => {
|
|
2674
2672
|
toggleGroupRow(groupKeys);
|
|
2675
2673
|
}
|
|
2676
2674
|
});
|
|
2677
|
-
icon = column.renderGroupIcon ? /* @__PURE__ */
|
|
2675
|
+
icon = column.renderGroupIcon ? /* @__PURE__ */ createElement4(RenderHookComponent, {
|
|
2678
2676
|
render: column.renderGroupIcon,
|
|
2679
2677
|
renderParam: Object.assign({ collapsed, groupIcon: defaultIcon }, renderOptions)
|
|
2680
2678
|
}) : defaultIcon;
|
|
2681
2679
|
}
|
|
2682
|
-
return /* @__PURE__ */
|
|
2680
|
+
return /* @__PURE__ */ createElement4("div", {
|
|
2683
2681
|
className: join(display.flex, alignItems.center)
|
|
2684
|
-
}, icon, /* @__PURE__ */
|
|
2682
|
+
}, icon, /* @__PURE__ */ createElement4("div", {
|
|
2685
2683
|
className: cssEllipsisClassName
|
|
2686
2684
|
}, value != null ? value : null));
|
|
2687
2685
|
};
|
|
@@ -2729,7 +2727,7 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
|
|
|
2729
2727
|
let icon = null;
|
|
2730
2728
|
const showExpanderIcon = pivotBy ? (((_a = rowInfo.groupKeys) == null ? void 0 : _a.length) || 0) < (groupBy == null ? void 0 : groupBy.length) : (((_b = rowInfo.groupKeys) == null ? void 0 : _b.length) || 0) <= (groupBy == null ? void 0 : groupBy.length);
|
|
2731
2729
|
if (showExpanderIcon) {
|
|
2732
|
-
const defaultIcon = /* @__PURE__ */
|
|
2730
|
+
const defaultIcon = /* @__PURE__ */ createElement4(ExpanderIcon, {
|
|
2733
2731
|
expanded: !collapsed,
|
|
2734
2732
|
onChange: () => {
|
|
2735
2733
|
toggleGroupRow(rowInfo.groupKeys);
|
|
@@ -2737,9 +2735,9 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
|
|
|
2737
2735
|
});
|
|
2738
2736
|
icon = column.renderGroupIcon ? column.renderGroupIcon(Object.assign({ collapsed, groupIcon: defaultIcon }, renderOptions)) : defaultIcon;
|
|
2739
2737
|
}
|
|
2740
|
-
return /* @__PURE__ */
|
|
2738
|
+
return /* @__PURE__ */ createElement4("div", {
|
|
2741
2739
|
className: join(display.flex, alignItems.center, GroupRowExpanderCls)
|
|
2742
|
-
}, icon, /* @__PURE__ */
|
|
2740
|
+
}, icon, /* @__PURE__ */ createElement4("div", {
|
|
2743
2741
|
className: cssEllipsisClassName
|
|
2744
2742
|
}, value != null ? value : null));
|
|
2745
2743
|
}
|
|
@@ -2754,13 +2752,34 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
|
|
|
2754
2752
|
return generatedGroupColumn;
|
|
2755
2753
|
}
|
|
2756
2754
|
|
|
2755
|
+
// src/components/InfiniteTable/hooks/useEffectWithRaf.ts
|
|
2756
|
+
import { useEffect as useEffect7, useRef as useRef5 } from "react";
|
|
2757
|
+
function useEffectWithRaf(fn, deps) {
|
|
2758
|
+
const rafId = useRef5(0);
|
|
2759
|
+
const removeFnRaf = useRef5();
|
|
2760
|
+
useEffect7(() => {
|
|
2761
|
+
rafId.current = requestAnimationFrame(() => {
|
|
2762
|
+
removeFnRaf.current = fn();
|
|
2763
|
+
});
|
|
2764
|
+
return () => {
|
|
2765
|
+
if (rafId.current) {
|
|
2766
|
+
cancelAnimationFrame(rafId.current);
|
|
2767
|
+
}
|
|
2768
|
+
if (typeof removeFnRaf.current === "function") {
|
|
2769
|
+
removeFnRaf.current();
|
|
2770
|
+
removeFnRaf.current = void 0;
|
|
2771
|
+
}
|
|
2772
|
+
};
|
|
2773
|
+
}, deps);
|
|
2774
|
+
}
|
|
2775
|
+
|
|
2757
2776
|
// src/components/InfiniteTable/hooks/useToggleGroupRow.ts
|
|
2758
2777
|
import { useCallback as useCallback4 } from "react";
|
|
2759
2778
|
|
|
2760
2779
|
// src/components/DataSource/index.tsx
|
|
2761
2780
|
import {
|
|
2762
|
-
Fragment
|
|
2763
|
-
createElement as
|
|
2781
|
+
Fragment,
|
|
2782
|
+
createElement as createElement5
|
|
2764
2783
|
} from "react";
|
|
2765
2784
|
|
|
2766
2785
|
// src/utils/multisort/sortTypes.ts
|
|
@@ -2838,7 +2857,7 @@ var getMultisortFunction = (sortInfo, get) => {
|
|
|
2838
2857
|
};
|
|
2839
2858
|
|
|
2840
2859
|
// src/components/DataSource/privateHooks/useLoadData.ts
|
|
2841
|
-
import { useEffect as
|
|
2860
|
+
import { useEffect as useEffect9, useMemo as useMemo4, useRef as useRef7, useState as useState4 } from "react";
|
|
2842
2861
|
|
|
2843
2862
|
// src/utils/DeepMap/once.ts
|
|
2844
2863
|
function once(fn) {
|
|
@@ -2924,14 +2943,13 @@ var DeepMap = class {
|
|
|
2924
2943
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
2925
2944
|
const key = keys[i];
|
|
2926
2945
|
const last = i === len - 1;
|
|
2946
|
+
const pair = currentMap.get(key) || {};
|
|
2927
2947
|
if (last) {
|
|
2928
|
-
const pair = currentMap.has(key) ? currentMap.get(key) : {};
|
|
2929
2948
|
pair.revision = this.revision++;
|
|
2930
2949
|
pair.value = value;
|
|
2931
2950
|
currentMap.set(key, pair);
|
|
2932
2951
|
this.length++;
|
|
2933
2952
|
} else {
|
|
2934
|
-
const pair = currentMap.has(key) ? currentMap.get(key) : {};
|
|
2935
2953
|
if (!pair.map) {
|
|
2936
2954
|
pair.map = new Map();
|
|
2937
2955
|
currentMap.set(key, pair);
|
|
@@ -2942,7 +2960,6 @@ var DeepMap = class {
|
|
|
2942
2960
|
return this;
|
|
2943
2961
|
}
|
|
2944
2962
|
get(keys) {
|
|
2945
|
-
var _a;
|
|
2946
2963
|
let currentMap = this.map;
|
|
2947
2964
|
if (!keys.length) {
|
|
2948
2965
|
keys = [this.emptyKey];
|
|
@@ -2950,10 +2967,10 @@ var DeepMap = class {
|
|
|
2950
2967
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
2951
2968
|
const key = keys[i];
|
|
2952
2969
|
const last = i === len - 1;
|
|
2970
|
+
const pair = currentMap.get(key);
|
|
2953
2971
|
if (last) {
|
|
2954
|
-
return
|
|
2972
|
+
return pair ? pair.value : void 0;
|
|
2955
2973
|
} else {
|
|
2956
|
-
const pair = currentMap.get(key);
|
|
2957
2974
|
if (!pair || !pair.map) {
|
|
2958
2975
|
return;
|
|
2959
2976
|
}
|
|
@@ -2991,8 +3008,8 @@ var DeepMap = class {
|
|
|
2991
3008
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
2992
3009
|
const key = keys[i];
|
|
2993
3010
|
const last = i === len - 1;
|
|
3011
|
+
const pair = currentMap.get(key);
|
|
2994
3012
|
if (last) {
|
|
2995
|
-
const pair = currentMap.get(key);
|
|
2996
3013
|
if (pair) {
|
|
2997
3014
|
if (pair.hasOwnProperty("value")) {
|
|
2998
3015
|
delete pair.value;
|
|
@@ -3009,7 +3026,6 @@ var DeepMap = class {
|
|
|
3009
3026
|
}
|
|
3010
3027
|
break;
|
|
3011
3028
|
} else {
|
|
3012
|
-
const pair = currentMap.get(key);
|
|
3013
3029
|
if (!pair || !pair.map) {
|
|
3014
3030
|
result = false;
|
|
3015
3031
|
break;
|
|
@@ -3019,11 +3035,11 @@ var DeepMap = class {
|
|
|
3019
3035
|
}
|
|
3020
3036
|
}
|
|
3021
3037
|
while (maps.length) {
|
|
3022
|
-
|
|
3023
|
-
|
|
3038
|
+
const map2 = maps.pop();
|
|
3039
|
+
const key = keys.pop();
|
|
3024
3040
|
if (key && (map2 == null ? void 0 : map2.size) === 0) {
|
|
3025
|
-
|
|
3026
|
-
|
|
3041
|
+
const parentMap = maps[maps.length - 1];
|
|
3042
|
+
const pair = parentMap == null ? void 0 : parentMap.get(key);
|
|
3027
3043
|
if (pair) {
|
|
3028
3044
|
delete pair.map;
|
|
3029
3045
|
if (!pair.hasOwnProperty("value")) {
|
|
@@ -3042,11 +3058,10 @@ var DeepMap = class {
|
|
|
3042
3058
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
3043
3059
|
const key = keys[i];
|
|
3044
3060
|
const last = i === len - 1;
|
|
3061
|
+
const pair = currentMap.get(key);
|
|
3045
3062
|
if (last) {
|
|
3046
|
-
|
|
3047
|
-
return !!pair && pair.hasOwnProperty("value");
|
|
3063
|
+
return pair ? pair.hasOwnProperty("value") : false;
|
|
3048
3064
|
} else {
|
|
3049
|
-
const pair = currentMap.get(key);
|
|
3050
3065
|
if (!pair || !pair.map) {
|
|
3051
3066
|
return false;
|
|
3052
3067
|
}
|
|
@@ -3514,12 +3529,12 @@ function enhancedFlatten(param) {
|
|
|
3514
3529
|
}
|
|
3515
3530
|
|
|
3516
3531
|
// src/components/hooks/useEffectWithChanges.ts
|
|
3517
|
-
import { useEffect as
|
|
3532
|
+
import { useEffect as useEffect8, useRef as useRef6 } from "react";
|
|
3518
3533
|
function useEffectWithChanges(fn, deps) {
|
|
3519
|
-
const prevRef =
|
|
3520
|
-
const oldValuesRef =
|
|
3534
|
+
const prevRef = useRef6({});
|
|
3535
|
+
const oldValuesRef = useRef6({});
|
|
3521
3536
|
const oldValues = oldValuesRef.current;
|
|
3522
|
-
const changesRef =
|
|
3537
|
+
const changesRef = useRef6({});
|
|
3523
3538
|
const changes = changesRef.current;
|
|
3524
3539
|
const useEffectDeps = [];
|
|
3525
3540
|
for (let k in deps) {
|
|
@@ -3532,7 +3547,7 @@ function useEffectWithChanges(fn, deps) {
|
|
|
3532
3547
|
}
|
|
3533
3548
|
}
|
|
3534
3549
|
prevRef.current = deps;
|
|
3535
|
-
|
|
3550
|
+
useEffect8(() => {
|
|
3536
3551
|
const changes2 = changesRef.current;
|
|
3537
3552
|
const result = fn(changes2, oldValues);
|
|
3538
3553
|
changesRef.current = {};
|
|
@@ -3704,8 +3719,8 @@ function useLoadData() {
|
|
|
3704
3719
|
vertical: false,
|
|
3705
3720
|
horizontal: false
|
|
3706
3721
|
});
|
|
3707
|
-
const scrollbarsRef =
|
|
3708
|
-
|
|
3722
|
+
const scrollbarsRef = useRef7(scrollbars);
|
|
3723
|
+
useEffect9(() => {
|
|
3709
3724
|
notifyScrollbarsChange.onChange((scrollbars2) => {
|
|
3710
3725
|
if (!scrollbars2) {
|
|
3711
3726
|
return;
|
|
@@ -3715,7 +3730,7 @@ function useLoadData() {
|
|
|
3715
3730
|
});
|
|
3716
3731
|
return () => notifyScrollbarsChange.destroy();
|
|
3717
3732
|
}, [notifyScrollbarsChange]);
|
|
3718
|
-
|
|
3733
|
+
useEffect9(() => {
|
|
3719
3734
|
const frameId = requestAnimationFrame(() => {
|
|
3720
3735
|
var _a;
|
|
3721
3736
|
if (!((_a = scrollbarsRef.current) == null ? void 0 : _a.vertical) && livePaginationCursor) {
|
|
@@ -3724,7 +3739,7 @@ function useLoadData() {
|
|
|
3724
3739
|
});
|
|
3725
3740
|
return () => cancelAnimationFrame(frameId);
|
|
3726
3741
|
}, [livePaginationCursor]);
|
|
3727
|
-
|
|
3742
|
+
useEffect9(() => {
|
|
3728
3743
|
const { livePaginationCursor: livePaginationCursor2, livePagination: livePagination2 } = getComponentState();
|
|
3729
3744
|
if (!scrollbars.vertical && livePagination2) {
|
|
3730
3745
|
if (livePaginationCursor2) {
|
|
@@ -3738,7 +3753,7 @@ function useLoadData() {
|
|
|
3738
3753
|
pivotBy,
|
|
3739
3754
|
cursorId: livePagination ? stateCursorId : null
|
|
3740
3755
|
};
|
|
3741
|
-
const initialRef =
|
|
3756
|
+
const initialRef = useRef7(true);
|
|
3742
3757
|
useLazyLoadRange();
|
|
3743
3758
|
useEffectWithChanges(() => {
|
|
3744
3759
|
const componentState2 = getComponentState();
|
|
@@ -3776,7 +3791,7 @@ function useLazyLoadRange() {
|
|
|
3776
3791
|
dataArray,
|
|
3777
3792
|
scrollStopDelayUpdatedByTable
|
|
3778
3793
|
} = componentState;
|
|
3779
|
-
const latestRenderRangeRef =
|
|
3794
|
+
const latestRenderRangeRef = useRef7(null);
|
|
3780
3795
|
const loadRange = (renderRange, cache = loadingCache) => {
|
|
3781
3796
|
const componentState2 = getComponentState();
|
|
3782
3797
|
renderRange = renderRange || latestRenderRangeRef.current;
|
|
@@ -3796,7 +3811,7 @@ function useLazyLoadRange() {
|
|
|
3796
3811
|
}, cache);
|
|
3797
3812
|
};
|
|
3798
3813
|
const debouncedLoadRange = useMemo4(() => debounce(loadRange, { wait: scrollStopDelayUpdatedByTable }), [scrollStopDelayUpdatedByTable]);
|
|
3799
|
-
|
|
3814
|
+
useEffect9(() => {
|
|
3800
3815
|
if (lazyLoadBatchSize && lazyLoadBatchSize > 0) {
|
|
3801
3816
|
return notifyRenderRangeChange.onChange((renderRange) => {
|
|
3802
3817
|
latestRenderRangeRef.current = renderRange;
|
|
@@ -3805,7 +3820,7 @@ function useLazyLoadRange() {
|
|
|
3805
3820
|
}
|
|
3806
3821
|
return;
|
|
3807
3822
|
}, [lazyLoadBatchSize, loadingCache]);
|
|
3808
|
-
|
|
3823
|
+
useEffect9(() => {
|
|
3809
3824
|
if (lazyLoadBatchSize && lazyLoadBatchSize > 0) {
|
|
3810
3825
|
debouncedLoadRange();
|
|
3811
3826
|
}
|
|
@@ -4081,6 +4096,7 @@ function initSetupState2() {
|
|
|
4081
4096
|
notifyScrollStop: buildSubscriptionCallback(),
|
|
4082
4097
|
notifyRenderRangeChange: buildSubscriptionCallback(),
|
|
4083
4098
|
pivotTotalColumnPosition: "end",
|
|
4099
|
+
pivotGrandTotalColumnPosition: false,
|
|
4084
4100
|
scrollStopDelayUpdatedByTable: 100,
|
|
4085
4101
|
originalLazyGroupData,
|
|
4086
4102
|
originalLazyGroupDataChangeDetect: 0,
|
|
@@ -4268,6 +4284,7 @@ function getPivotColumnsAndColumnGroups({
|
|
|
4268
4284
|
deepMap,
|
|
4269
4285
|
pivotBy,
|
|
4270
4286
|
pivotTotalColumnPosition,
|
|
4287
|
+
pivotGrandTotalColumnPosition,
|
|
4271
4288
|
reducers = {},
|
|
4272
4289
|
showSeparatePivotColumnForSingleAggregation = false
|
|
4273
4290
|
}) {
|
|
@@ -4277,6 +4294,28 @@ function getPivotColumnsAndColumnGroups({
|
|
|
4277
4294
|
});
|
|
4278
4295
|
const columns = new Map([]);
|
|
4279
4296
|
const columnGroups = new Map();
|
|
4297
|
+
const addGrandTotalColumns = once(function() {
|
|
4298
|
+
aggregationReducers.forEach((reducer, index) => {
|
|
4299
|
+
columns.set(`total:${reducer.id}`, prepareColumn({
|
|
4300
|
+
header: `${reducer.name || reducer.id} total`,
|
|
4301
|
+
pivotBy,
|
|
4302
|
+
pivotColumn: true,
|
|
4303
|
+
pivotTotalColumn: true,
|
|
4304
|
+
pivotAggregator: reducer,
|
|
4305
|
+
pivotAggregatorIndex: index,
|
|
4306
|
+
pivotGroupKeys: [],
|
|
4307
|
+
pivotGroupKey: "",
|
|
4308
|
+
pivotIndex: -1,
|
|
4309
|
+
valueGetter: ({ rowInfo }) => {
|
|
4310
|
+
var _a;
|
|
4311
|
+
return (_a = rowInfo.reducerResults) == null ? void 0 : _a[reducer.id];
|
|
4312
|
+
}
|
|
4313
|
+
}));
|
|
4314
|
+
});
|
|
4315
|
+
});
|
|
4316
|
+
if (!pivotLength && pivotTotalColumnPosition === "start" || pivotGrandTotalColumnPosition === "start") {
|
|
4317
|
+
addGrandTotalColumns();
|
|
4318
|
+
}
|
|
4280
4319
|
const isSingleAggregationColumn = !showSeparatePivotColumnForSingleAggregation && aggregationReducers.length === 1;
|
|
4281
4320
|
deepMap.visitDepthFirst((_value, keys, _indexInGroup, next) => {
|
|
4282
4321
|
keys = [...keys];
|
|
@@ -4381,24 +4420,8 @@ function getPivotColumnsAndColumnGroups({
|
|
|
4381
4420
|
next == null ? void 0 : next();
|
|
4382
4421
|
}
|
|
4383
4422
|
});
|
|
4384
|
-
if (!pivotLength) {
|
|
4385
|
-
|
|
4386
|
-
columns.set(`total:${reducer.id}`, prepareColumn({
|
|
4387
|
-
header: `${reducer.name || reducer.id} total`,
|
|
4388
|
-
pivotBy,
|
|
4389
|
-
pivotColumn: true,
|
|
4390
|
-
pivotTotalColumn: true,
|
|
4391
|
-
pivotAggregator: reducer,
|
|
4392
|
-
pivotAggregatorIndex: index,
|
|
4393
|
-
pivotGroupKeys: [],
|
|
4394
|
-
pivotGroupKey: "",
|
|
4395
|
-
pivotIndex: -1,
|
|
4396
|
-
valueGetter: ({ rowInfo }) => {
|
|
4397
|
-
var _a;
|
|
4398
|
-
return (_a = rowInfo.reducerResults) == null ? void 0 : _a[reducer.id];
|
|
4399
|
-
}
|
|
4400
|
-
}));
|
|
4401
|
-
});
|
|
4423
|
+
if (!pivotLength && pivotTotalColumnPosition === "end" || pivotGrandTotalColumnPosition === "end") {
|
|
4424
|
+
addGrandTotalColumns();
|
|
4402
4425
|
}
|
|
4403
4426
|
const result = {
|
|
4404
4427
|
columns,
|
|
@@ -4430,7 +4453,7 @@ function toRowInfo(data, id, index) {
|
|
|
4430
4453
|
};
|
|
4431
4454
|
}
|
|
4432
4455
|
function concludeReducer(params) {
|
|
4433
|
-
var _a;
|
|
4456
|
+
var _a, _b;
|
|
4434
4457
|
const { state, previousState } = params;
|
|
4435
4458
|
const sortInfo = state.sortInfo;
|
|
4436
4459
|
let shouldSort = !!(sortInfo == null ? void 0 : sortInfo.length) && !state.controlledSort;
|
|
@@ -4465,6 +4488,7 @@ function concludeReducer(params) {
|
|
|
4465
4488
|
"pivotBy",
|
|
4466
4489
|
"aggregationReducers",
|
|
4467
4490
|
"pivotTotalColumnPosition",
|
|
4491
|
+
"pivotGrandTotalColumnPosition",
|
|
4468
4492
|
"showSeparatePivotColumnForSingleAggregation",
|
|
4469
4493
|
"sortInfo"
|
|
4470
4494
|
]);
|
|
@@ -4511,6 +4535,7 @@ function concludeReducer(params) {
|
|
|
4511
4535
|
deepMap: groupResult.topLevelPivotColumns,
|
|
4512
4536
|
pivotBy,
|
|
4513
4537
|
pivotTotalColumnPosition: (_a = state.pivotTotalColumnPosition) != null ? _a : "end",
|
|
4538
|
+
pivotGrandTotalColumnPosition: (_b = state.pivotGrandTotalColumnPosition) != null ? _b : false,
|
|
4514
4539
|
reducers: state.aggregationReducers,
|
|
4515
4540
|
showSeparatePivotColumnForSingleAggregation: state.showSeparatePivotColumnForSingleAggregation
|
|
4516
4541
|
}) : void 0;
|
|
@@ -4554,7 +4579,7 @@ function DataSourceWithContext(props) {
|
|
|
4554
4579
|
if (typeof children === "function") {
|
|
4555
4580
|
children = children(computedValues);
|
|
4556
4581
|
}
|
|
4557
|
-
return /* @__PURE__ */
|
|
4582
|
+
return /* @__PURE__ */ createElement5(Fragment, null, children);
|
|
4558
4583
|
}
|
|
4559
4584
|
var DataSourceRoot = getComponentStateRoot({
|
|
4560
4585
|
initSetupState: initSetupState2,
|
|
@@ -4577,14 +4602,14 @@ function DataSourceCmp({ children }) {
|
|
|
4577
4602
|
globalThis.getDataSourceState = getState;
|
|
4578
4603
|
}
|
|
4579
4604
|
useLoadData();
|
|
4580
|
-
return /* @__PURE__ */
|
|
4605
|
+
return /* @__PURE__ */ createElement5(DataSourceContext.Provider, {
|
|
4581
4606
|
value: contextValue
|
|
4582
|
-
}, /* @__PURE__ */
|
|
4607
|
+
}, /* @__PURE__ */ createElement5(DataSourceWithContext, {
|
|
4583
4608
|
children
|
|
4584
4609
|
}));
|
|
4585
4610
|
}
|
|
4586
4611
|
function DataSource(props) {
|
|
4587
|
-
return /* @__PURE__ */
|
|
4612
|
+
return /* @__PURE__ */ createElement5(DataSourceRoot, __spreadValues({}, props), /* @__PURE__ */ createElement5(DataSourceCmp, {
|
|
4588
4613
|
children: props.children
|
|
4589
4614
|
}));
|
|
4590
4615
|
}
|
|
@@ -4625,15 +4650,24 @@ function useColumnsWhen() {
|
|
|
4625
4650
|
componentActions: dataSourceActions
|
|
4626
4651
|
} = useDataSourceContextValue();
|
|
4627
4652
|
const {
|
|
4628
|
-
componentState: {
|
|
4653
|
+
componentState: {
|
|
4654
|
+
groupRenderStrategy,
|
|
4655
|
+
pivotTotalColumnPosition,
|
|
4656
|
+
pivotGrandTotalColumnPosition
|
|
4657
|
+
}
|
|
4629
4658
|
} = useComponentState();
|
|
4630
4659
|
const groupByMap = useGroupByMap(groupBy);
|
|
4631
|
-
|
|
4660
|
+
useEffect10(() => {
|
|
4632
4661
|
dataSourceActions.generateGroupRows = groupRenderStrategy !== "inline";
|
|
4633
4662
|
}, [groupRenderStrategy]);
|
|
4634
|
-
|
|
4663
|
+
useEffect10(() => {
|
|
4635
4664
|
dataSourceActions.pivotTotalColumnPosition = pivotTotalColumnPosition;
|
|
4636
4665
|
}, [pivotTotalColumnPosition]);
|
|
4666
|
+
useEffect10(() => {
|
|
4667
|
+
if (pivotGrandTotalColumnPosition != void 0) {
|
|
4668
|
+
dataSourceActions.pivotGrandTotalColumnPosition = pivotGrandTotalColumnPosition;
|
|
4669
|
+
}
|
|
4670
|
+
}, [pivotGrandTotalColumnPosition]);
|
|
4637
4671
|
useColumnsWhenInlineGroupRenderStrategy(groupByMap);
|
|
4638
4672
|
const { toggleGroupRow } = useColumnsWhenGrouping();
|
|
4639
4673
|
useHideColumns(groupByMap);
|
|
@@ -4697,7 +4731,7 @@ function useColumnsWhenInlineGroupRenderStrategy(groupByMap) {
|
|
|
4697
4731
|
});
|
|
4698
4732
|
return computedColumns.size === 0 ? void 0 : computedColumns;
|
|
4699
4733
|
}
|
|
4700
|
-
|
|
4734
|
+
useEffect10(() => {
|
|
4701
4735
|
const update = () => {
|
|
4702
4736
|
componentActions.columnsWhenInlineGroupRenderStrategy = computeColumnsWhenInlineGroupRenderStrategy(columns, groupByMap, groupRenderStrategy, toggleGroupRow);
|
|
4703
4737
|
};
|
|
@@ -4721,17 +4755,19 @@ function useColumnsWhenGrouping() {
|
|
|
4721
4755
|
groupRenderStrategy,
|
|
4722
4756
|
pivotColumns,
|
|
4723
4757
|
pivotColumn,
|
|
4724
|
-
pivotTotalColumnPosition
|
|
4758
|
+
pivotTotalColumnPosition,
|
|
4759
|
+
pivotGrandTotalColumnPosition
|
|
4725
4760
|
}
|
|
4726
4761
|
} = useComponentState();
|
|
4727
4762
|
const toggleGroupRow = useToggleGroupRow();
|
|
4728
|
-
|
|
4763
|
+
useEffect10(() => {
|
|
4729
4764
|
const update = () => {
|
|
4730
4765
|
const columnsWhenGrouping = getColumnsWhenGrouping({
|
|
4731
4766
|
columns,
|
|
4732
4767
|
groupColumn,
|
|
4733
4768
|
pivotColumn,
|
|
4734
4769
|
pivotTotalColumnPosition,
|
|
4770
|
+
pivotGrandTotalColumnPosition,
|
|
4735
4771
|
groupRenderStrategy: groupRenderStrategy === "inline" ? "single-column" : groupRenderStrategy,
|
|
4736
4772
|
groupBy,
|
|
4737
4773
|
pivotBy,
|
|
@@ -4779,7 +4815,7 @@ function useHideColumns(groupByMap) {
|
|
|
4779
4815
|
}
|
|
4780
4816
|
} = useComponentState();
|
|
4781
4817
|
const prevHideEmptyGroupColumns = usePrevious(hideEmptyGroupColumns);
|
|
4782
|
-
|
|
4818
|
+
useEffectWithRaf(() => {
|
|
4783
4819
|
if (groupRenderStrategy !== "multi-column") {
|
|
4784
4820
|
return;
|
|
4785
4821
|
}
|
|
@@ -4857,7 +4893,7 @@ function useHideColumns(groupByMap) {
|
|
|
4857
4893
|
hideEmptyGroupColumns ? groupRowsState : null,
|
|
4858
4894
|
hideEmptyGroupColumns
|
|
4859
4895
|
]);
|
|
4860
|
-
|
|
4896
|
+
useEffect10(() => {
|
|
4861
4897
|
const isGrouped = groupBy.length > 0;
|
|
4862
4898
|
const currentState = getComponentState();
|
|
4863
4899
|
const { controlledColumnVisibility, columnVisibility } = currentState;
|
|
@@ -4892,6 +4928,7 @@ function getColumnsWhenGrouping(params) {
|
|
|
4892
4928
|
pivotBy,
|
|
4893
4929
|
groupColumn,
|
|
4894
4930
|
pivotTotalColumnPosition,
|
|
4931
|
+
pivotGrandTotalColumnPosition,
|
|
4895
4932
|
pivotColumn,
|
|
4896
4933
|
groupRenderStrategy,
|
|
4897
4934
|
toggleGroupRow,
|
|
@@ -4931,7 +4968,12 @@ function getColumnsWhenGrouping(params) {
|
|
|
4931
4968
|
});
|
|
4932
4969
|
pivotColumns.forEach((col, key) => {
|
|
4933
4970
|
var _a, _b;
|
|
4934
|
-
|
|
4971
|
+
const isSimpleTotalColumn = col.pivotTotalColumn && col.columnGroup;
|
|
4972
|
+
const isGrandTotalColumn = col.pivotTotalColumn && !col.columnGroup;
|
|
4973
|
+
if (isSimpleTotalColumn && pivotTotalColumnPosition === false) {
|
|
4974
|
+
return;
|
|
4975
|
+
}
|
|
4976
|
+
if (isGrandTotalColumn && pivotGrandTotalColumnPosition === false) {
|
|
4935
4977
|
return;
|
|
4936
4978
|
}
|
|
4937
4979
|
let column = __spreadValues({}, col);
|
|
@@ -4995,7 +5037,7 @@ function useComputed() {
|
|
|
4995
5037
|
}
|
|
4996
5038
|
});
|
|
4997
5039
|
});
|
|
4998
|
-
|
|
5040
|
+
useEffect11(() => {
|
|
4999
5041
|
dataSourceActions.showSeparatePivotColumnForSingleAggregation = showSeparatePivotColumnForSingleAggregation;
|
|
5000
5042
|
}, [showSeparatePivotColumnForSingleAggregation]);
|
|
5001
5043
|
const { multiSort } = dataSourceState;
|
|
@@ -5122,7 +5164,7 @@ function useComputed() {
|
|
|
5122
5164
|
|
|
5123
5165
|
// src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
|
|
5124
5166
|
import {
|
|
5125
|
-
createElement as
|
|
5167
|
+
createElement as createElement6,
|
|
5126
5168
|
forwardRef
|
|
5127
5169
|
} from "react";
|
|
5128
5170
|
|
|
@@ -5134,7 +5176,7 @@ var useInternalProps = () => {
|
|
|
5134
5176
|
// src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
|
|
5135
5177
|
var InfiniteTableBody = forwardRef(function InfiniteTableBody2(props, ref) {
|
|
5136
5178
|
const { rootClassName: rootClassName12 } = useInternalProps();
|
|
5137
|
-
return /* @__PURE__ */
|
|
5179
|
+
return /* @__PURE__ */ createElement6("div", __spreadProps(__spreadValues({
|
|
5138
5180
|
ref
|
|
5139
5181
|
}, props), {
|
|
5140
5182
|
className: join(`${rootClassName12}Body`, position.relative, flex["1"], transformTranslateZero, props.className)
|
|
@@ -5143,12 +5185,12 @@ var InfiniteTableBody = forwardRef(function InfiniteTableBody2(props, ref) {
|
|
|
5143
5185
|
|
|
5144
5186
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx
|
|
5145
5187
|
import {
|
|
5146
|
-
createElement as
|
|
5188
|
+
createElement as createElement18
|
|
5147
5189
|
} from "react";
|
|
5148
5190
|
|
|
5149
5191
|
// src/components/InfiniteTable/components/ScrollbarPlaceholder.tsx
|
|
5150
5192
|
import {
|
|
5151
|
-
createElement as
|
|
5193
|
+
createElement as createElement7,
|
|
5152
5194
|
memo as memo2
|
|
5153
5195
|
} from "react";
|
|
5154
5196
|
function HorizontalScrollbarPlaceholderFn(props) {
|
|
@@ -5156,7 +5198,7 @@ function HorizontalScrollbarPlaceholderFn(props) {
|
|
|
5156
5198
|
if (!scrollbarWidth2) {
|
|
5157
5199
|
return null;
|
|
5158
5200
|
}
|
|
5159
|
-
return /* @__PURE__ */
|
|
5201
|
+
return /* @__PURE__ */ createElement7("div", {
|
|
5160
5202
|
"data-name": "horizontal-scrollbar-placeholder",
|
|
5161
5203
|
style: __spreadValues({
|
|
5162
5204
|
position: "absolute",
|
|
@@ -5172,7 +5214,7 @@ function VerticalScrollbarPlaceholderFn(props) {
|
|
|
5172
5214
|
if (!scrollbarWidth2) {
|
|
5173
5215
|
return null;
|
|
5174
5216
|
}
|
|
5175
|
-
return /* @__PURE__ */
|
|
5217
|
+
return /* @__PURE__ */ createElement7("div", {
|
|
5176
5218
|
"data-name": "vertical-scrollbar-placeholder",
|
|
5177
5219
|
style: __spreadValues({
|
|
5178
5220
|
position: "absolute",
|
|
@@ -5198,22 +5240,22 @@ var HeaderWrapperCls = "_12zfob1v _16lm1iw16 _16lm1iw1 _16lm1iwj _16lm1iw10";
|
|
|
5198
5240
|
|
|
5199
5241
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
|
|
5200
5242
|
import {
|
|
5201
|
-
createElement as
|
|
5243
|
+
createElement as createElement14,
|
|
5202
5244
|
memo as memo6
|
|
5203
5245
|
} from "react";
|
|
5204
|
-
import { useCallback as useCallback8, useEffect as
|
|
5246
|
+
import { useCallback as useCallback8, useEffect as useEffect15, useRef as useRef10 } from "react";
|
|
5205
5247
|
|
|
5206
5248
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
|
|
5207
5249
|
import {
|
|
5208
5250
|
createContext as createContext4,
|
|
5209
|
-
createElement as
|
|
5251
|
+
createElement as createElement10
|
|
5210
5252
|
} from "react";
|
|
5211
|
-
import { useCallback as useCallback7, useContext as useContext5, useEffect as
|
|
5253
|
+
import { useCallback as useCallback7, useContext as useContext5, useEffect as useEffect13, useRef as useRef9 } from "react";
|
|
5212
5254
|
|
|
5213
5255
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCell.tsx
|
|
5214
5256
|
import {
|
|
5215
|
-
Fragment as
|
|
5216
|
-
createElement as
|
|
5257
|
+
Fragment as Fragment2,
|
|
5258
|
+
createElement as createElement8,
|
|
5217
5259
|
memo as memo3
|
|
5218
5260
|
} from "react";
|
|
5219
5261
|
|
|
@@ -5284,15 +5326,15 @@ function InfiniteTableCellFn(props) {
|
|
|
5284
5326
|
style,
|
|
5285
5327
|
"data-name": "Cell",
|
|
5286
5328
|
className: join(domProps.className, columnAlignCellStyle[(_b = column.align) != null ? _b : "start"], justifyContent[(_c = column.align) != null ? _c : "start"], InfiniteTableCellClassName, ColumnCellCls, shifting ? `${InfiniteTableCellClassName}--shifting ${CellClsVariants.shifting}` : ""),
|
|
5287
|
-
children: /* @__PURE__ */
|
|
5329
|
+
children: /* @__PURE__ */ createElement8(Fragment2, null, beforeChildren, /* @__PURE__ */ createElement8("div", {
|
|
5288
5330
|
className: `${InfiniteTableCellContentClassName} ${cssEllipsis ? cssEllipsisClassName : overflow.hidden}`
|
|
5289
5331
|
}, children), afterChildren)
|
|
5290
5332
|
});
|
|
5291
5333
|
const RenderComponent = cellType === "body" ? (_d = column.components) == null ? void 0 : _d.ColumnCell : (_e = column.components) == null ? void 0 : _e.HeaderCell;
|
|
5292
5334
|
if (RenderComponent) {
|
|
5293
|
-
return /* @__PURE__ */
|
|
5335
|
+
return /* @__PURE__ */ createElement8(RenderComponent, __spreadValues({}, finalDOMProps));
|
|
5294
5336
|
}
|
|
5295
|
-
return /* @__PURE__ */
|
|
5337
|
+
return /* @__PURE__ */ createElement8("div", __spreadProps(__spreadValues({}, finalDOMProps), {
|
|
5296
5338
|
ref: domRef
|
|
5297
5339
|
}));
|
|
5298
5340
|
}
|
|
@@ -5303,7 +5345,7 @@ var import_binary_search2 = __toModule(require_binary_search());
|
|
|
5303
5345
|
import {
|
|
5304
5346
|
useCallback as useCallback6,
|
|
5305
5347
|
useMemo as useMemo7,
|
|
5306
|
-
useRef as
|
|
5348
|
+
useRef as useRef8,
|
|
5307
5349
|
useState as useState6
|
|
5308
5350
|
} from "react";
|
|
5309
5351
|
|
|
@@ -5341,11 +5383,11 @@ var useColumnPointerEvents = ({
|
|
|
5341
5383
|
}) => {
|
|
5342
5384
|
const [draggingDiff, setDraggingDiff] = useState6(null);
|
|
5343
5385
|
const [proxyOffset, setProxyOffset] = useState6(null);
|
|
5344
|
-
const breakpointsRef =
|
|
5345
|
-
const pointerMoveRef =
|
|
5346
|
-
const didDragRef =
|
|
5347
|
-
const initialClientPos =
|
|
5348
|
-
const currentDropIndexRef =
|
|
5386
|
+
const breakpointsRef = useRef8([]);
|
|
5387
|
+
const pointerMoveRef = useRef8(null);
|
|
5388
|
+
const didDragRef = useRef8(false);
|
|
5389
|
+
const initialClientPos = useRef8(null);
|
|
5390
|
+
const currentDropIndexRef = useRef8(null);
|
|
5349
5391
|
const dragging = draggingDiff != null;
|
|
5350
5392
|
const { componentActions, computed } = useInfiniteTable();
|
|
5351
5393
|
const { computedColumnOrder } = computed;
|
|
@@ -5358,7 +5400,7 @@ var useColumnPointerEvents = ({
|
|
|
5358
5400
|
columnWidth: column.computedWidth
|
|
5359
5401
|
};
|
|
5360
5402
|
}, [columns, columnId, column]);
|
|
5361
|
-
let cursorRef =
|
|
5403
|
+
let cursorRef = useRef8("auto");
|
|
5362
5404
|
const onPointerDown = useCallback6((e) => {
|
|
5363
5405
|
const target = domRef.current;
|
|
5364
5406
|
cursorRef.current = target.style.cursor;
|
|
@@ -5497,9 +5539,9 @@ import { createPortal } from "react-dom";
|
|
|
5497
5539
|
|
|
5498
5540
|
// src/components/InfiniteTable/components/icons/SortIcon.tsx
|
|
5499
5541
|
import {
|
|
5500
|
-
createElement as
|
|
5542
|
+
createElement as createElement9
|
|
5501
5543
|
} from "react";
|
|
5502
|
-
import { useEffect as
|
|
5544
|
+
import { useEffect as useEffect12, useState as useState7 } from "react";
|
|
5503
5545
|
var defaultLineStyle = {
|
|
5504
5546
|
marginTop: 2,
|
|
5505
5547
|
marginBottom: 2,
|
|
@@ -5523,7 +5565,7 @@ function SortIcon(props) {
|
|
|
5523
5565
|
}), props.lineStyle), {
|
|
5524
5566
|
opacity
|
|
5525
5567
|
});
|
|
5526
|
-
|
|
5568
|
+
useEffect12(() => {
|
|
5527
5569
|
const newOpacity = direction != 0 ? 1 : 0;
|
|
5528
5570
|
if (!rendered && newOpacity) {
|
|
5529
5571
|
setRendered(true);
|
|
@@ -5553,18 +5595,18 @@ function SortIcon(props) {
|
|
|
5553
5595
|
if (direction === -1) {
|
|
5554
5596
|
indexStyle.top = "100%";
|
|
5555
5597
|
}
|
|
5556
|
-
return /* @__PURE__ */
|
|
5598
|
+
return /* @__PURE__ */ createElement9("div", {
|
|
5557
5599
|
style: __spreadProps(__spreadValues({}, style), { width: size }),
|
|
5558
5600
|
className: join(className, InfiniteTableIconClassName, `${InfiniteTableIconClassName}-sort`)
|
|
5559
|
-
}, showIndex ? /* @__PURE__ */
|
|
5601
|
+
}, showIndex ? /* @__PURE__ */ createElement9("div", {
|
|
5560
5602
|
"data-name": "index",
|
|
5561
5603
|
style: indexStyle
|
|
5562
|
-
}, index) : null, /* @__PURE__ */
|
|
5604
|
+
}, index) : null, /* @__PURE__ */ createElement9("div", {
|
|
5563
5605
|
style: __spreadValues({ width: sizes[0] }, lineStyle),
|
|
5564
5606
|
onTransitionEnd
|
|
5565
|
-
}), /* @__PURE__ */
|
|
5607
|
+
}), /* @__PURE__ */ createElement9("div", {
|
|
5566
5608
|
style: __spreadValues({ width: sizes[1] }, lineStyle)
|
|
5567
|
-
}), /* @__PURE__ */
|
|
5609
|
+
}), /* @__PURE__ */ createElement9("div", {
|
|
5568
5610
|
style: __spreadValues({ width: sizes[2] }, lineStyle)
|
|
5569
5611
|
}));
|
|
5570
5612
|
}
|
|
@@ -5594,7 +5636,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
5594
5636
|
domRef.current = node;
|
|
5595
5637
|
(_a2 = props.domRef) == null ? void 0 : _a2.call(props, node);
|
|
5596
5638
|
}, [props.domRef]);
|
|
5597
|
-
const sortTool = /* @__PURE__ */
|
|
5639
|
+
const sortTool = /* @__PURE__ */ createElement10(SortIcon, {
|
|
5598
5640
|
index: column.computedMultiSort ? column.computedSortIndex + 1 : void 0,
|
|
5599
5641
|
className: `${InfiniteTableHeaderCellClassName}__sort-icon ${HeaderSortIconCls}`,
|
|
5600
5642
|
direction: column.computedSorted ? column.computedSortedAsc ? 1 : -1 : 0
|
|
@@ -5607,7 +5649,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
5607
5649
|
};
|
|
5608
5650
|
const renderChildren = () => {
|
|
5609
5651
|
if (header instanceof Function) {
|
|
5610
|
-
header = /* @__PURE__ */
|
|
5652
|
+
header = /* @__PURE__ */ createElement10(RenderHookComponent, {
|
|
5611
5653
|
render: header,
|
|
5612
5654
|
renderParam
|
|
5613
5655
|
});
|
|
@@ -5615,12 +5657,12 @@ function InfiniteTableHeaderCell(props) {
|
|
|
5615
5657
|
header = header != null ? header : column.name;
|
|
5616
5658
|
return header;
|
|
5617
5659
|
};
|
|
5618
|
-
const domRef =
|
|
5660
|
+
const domRef = useRef9(null);
|
|
5619
5661
|
const {
|
|
5620
5662
|
computed: { computedRemainingSpace },
|
|
5621
5663
|
componentState: { portalDOMRef }
|
|
5622
5664
|
} = useInfiniteTable();
|
|
5623
|
-
|
|
5665
|
+
useEffect13(() => {
|
|
5624
5666
|
let clearOnResize = null;
|
|
5625
5667
|
const node = domRef.current;
|
|
5626
5668
|
if (onResize && node) {
|
|
@@ -5643,7 +5685,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
5643
5685
|
let offset = offsetFromProps != null ? offsetFromProps : virtualized ? 0 : column.computedPinningOffset;
|
|
5644
5686
|
let draggingProxy = null;
|
|
5645
5687
|
if (dragging) {
|
|
5646
|
-
draggingProxy = /* @__PURE__ */
|
|
5688
|
+
draggingProxy = /* @__PURE__ */ createElement10("div", {
|
|
5647
5689
|
className: `${InfiniteTableHeaderCellClassName}Proxy ${HeaderCellProxy}`,
|
|
5648
5690
|
style: {
|
|
5649
5691
|
position: "absolute",
|
|
@@ -5657,9 +5699,9 @@ function InfiniteTableHeaderCell(props) {
|
|
|
5657
5699
|
draggingProxy = createPortal(draggingProxy, portalDOMRef.current);
|
|
5658
5700
|
}
|
|
5659
5701
|
const ContextProvider = InfiniteTableHeaderCellContext.Provider;
|
|
5660
|
-
return /* @__PURE__ */
|
|
5702
|
+
return /* @__PURE__ */ createElement10(ContextProvider, {
|
|
5661
5703
|
value: renderParam
|
|
5662
|
-
}, /* @__PURE__ */
|
|
5704
|
+
}, /* @__PURE__ */ createElement10(InfiniteTableCell, {
|
|
5663
5705
|
domRef: ref,
|
|
5664
5706
|
cellType: "header",
|
|
5665
5707
|
column,
|
|
@@ -5682,15 +5724,15 @@ function useInfiniteHeaderCell() {
|
|
|
5682
5724
|
|
|
5683
5725
|
// src/components/RawList/index.tsx
|
|
5684
5726
|
import {
|
|
5685
|
-
createElement as
|
|
5727
|
+
createElement as createElement13,
|
|
5686
5728
|
memo as memo5
|
|
5687
5729
|
} from "react";
|
|
5688
|
-
import { useEffect as
|
|
5730
|
+
import { useEffect as useEffect14 } from "react";
|
|
5689
5731
|
|
|
5690
5732
|
// src/components/RawList/AvoidReactDiff.tsx
|
|
5691
5733
|
import {
|
|
5692
|
-
Fragment as
|
|
5693
|
-
createElement as
|
|
5734
|
+
Fragment as Fragment3,
|
|
5735
|
+
createElement as createElement11,
|
|
5694
5736
|
memo as memo4
|
|
5695
5737
|
} from "react";
|
|
5696
5738
|
import { useLayoutEffect as useLayoutEffect3, useState as useState8 } from "react";
|
|
@@ -5702,7 +5744,7 @@ function AvoidReactDiffFn(props) {
|
|
|
5702
5744
|
});
|
|
5703
5745
|
return remove;
|
|
5704
5746
|
}, [props.updater]);
|
|
5705
|
-
return /* @__PURE__ */
|
|
5747
|
+
return /* @__PURE__ */ createElement11(Fragment3, null, children);
|
|
5706
5748
|
}
|
|
5707
5749
|
var AvoidReactDiff = memo4(AvoidReactDiffFn);
|
|
5708
5750
|
|
|
@@ -5711,7 +5753,7 @@ import { useMemo as useMemo8 } from "react";
|
|
|
5711
5753
|
|
|
5712
5754
|
// src/components/RawList/ReactVirtualRenderer.tsx
|
|
5713
5755
|
import {
|
|
5714
|
-
createElement as
|
|
5756
|
+
createElement as createElement12
|
|
5715
5757
|
} from "react";
|
|
5716
5758
|
|
|
5717
5759
|
// src/components/RawList/MappedItems.ts
|
|
@@ -5957,7 +5999,7 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
5957
5999
|
};
|
|
5958
6000
|
this.itemDOMRefs[elementIndex] = domRef;
|
|
5959
6001
|
this.updaters[elementIndex] = buildSubscriptionCallback();
|
|
5960
|
-
const item = /* @__PURE__ */
|
|
6002
|
+
const item = /* @__PURE__ */ createElement12(AvoidReactDiff, {
|
|
5961
6003
|
key: elementIndex,
|
|
5962
6004
|
name: `${elementIndex}`,
|
|
5963
6005
|
updater: this.updaters[elementIndex]
|
|
@@ -5993,7 +6035,7 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
5993
6035
|
}
|
|
5994
6036
|
this.mappedItems.renderItemAtElement(itemIndex, elementIndex, renderedNode);
|
|
5995
6037
|
if (true) {
|
|
5996
|
-
this.
|
|
6038
|
+
dbg(`ReactVirtualRenderer:${this.brain.getOptions().mainAxis}`)(`Render item ${itemIndex} at element ${elementIndex}`);
|
|
5997
6039
|
}
|
|
5998
6040
|
itemUpdater(renderedNode);
|
|
5999
6041
|
this.updateElementPosition(elementIndex);
|
|
@@ -6036,7 +6078,7 @@ function RawListFn(props) {
|
|
|
6036
6078
|
debugChannel
|
|
6037
6079
|
});
|
|
6038
6080
|
const getRenderItem = useLatest(renderItem);
|
|
6039
|
-
|
|
6081
|
+
useEffect14(() => {
|
|
6040
6082
|
const renderRange = brain.getRenderRange();
|
|
6041
6083
|
renderer.renderRange(renderRange, {
|
|
6042
6084
|
renderItem,
|
|
@@ -6044,7 +6086,7 @@ function RawListFn(props) {
|
|
|
6044
6086
|
onRender: onRenderUpdater
|
|
6045
6087
|
});
|
|
6046
6088
|
}, [brain, renderItem, onRenderUpdater]);
|
|
6047
|
-
|
|
6089
|
+
useEffect14(() => {
|
|
6048
6090
|
const remove = brain.onRenderRangeChange((renderRange) => {
|
|
6049
6091
|
renderer.renderRange(renderRange, {
|
|
6050
6092
|
force: false,
|
|
@@ -6054,7 +6096,7 @@ function RawListFn(props) {
|
|
|
6054
6096
|
});
|
|
6055
6097
|
return remove;
|
|
6056
6098
|
}, [brain, onRenderUpdater]);
|
|
6057
|
-
return /* @__PURE__ */
|
|
6099
|
+
return /* @__PURE__ */ createElement13(AvoidReactDiff, {
|
|
6058
6100
|
updater: onRenderUpdater
|
|
6059
6101
|
});
|
|
6060
6102
|
}
|
|
@@ -6079,14 +6121,14 @@ function InfiniteTableHeaderFn(props) {
|
|
|
6079
6121
|
}
|
|
6080
6122
|
return null;
|
|
6081
6123
|
}
|
|
6082
|
-
return /* @__PURE__ */
|
|
6124
|
+
return /* @__PURE__ */ createElement14(InfiniteTableHeaderCell, {
|
|
6083
6125
|
domRef: domRef2,
|
|
6084
6126
|
column,
|
|
6085
6127
|
headerHeight,
|
|
6086
6128
|
columns: computedVisibleColumnsMap
|
|
6087
6129
|
});
|
|
6088
6130
|
}, [computedVisibleColumnsMap, columns, repaintId, headerHeight]);
|
|
6089
|
-
|
|
6131
|
+
useEffect15(() => {
|
|
6090
6132
|
const onScroll = (scrollPosition) => {
|
|
6091
6133
|
if (domRef.current) {
|
|
6092
6134
|
domRef.current.style.transform = `translate3d(-${scrollPosition.scrollLeft}px, 0px, 0px)`;
|
|
@@ -6095,7 +6137,7 @@ function InfiniteTableHeaderFn(props) {
|
|
|
6095
6137
|
const removeOnScroll = brain.onScroll(onScroll);
|
|
6096
6138
|
return removeOnScroll;
|
|
6097
6139
|
}, [brain]);
|
|
6098
|
-
const domRef =
|
|
6140
|
+
const domRef = useRef10(null);
|
|
6099
6141
|
const headerCls = HeaderClsRecipe({
|
|
6100
6142
|
pinned: pinning,
|
|
6101
6143
|
overflow: false,
|
|
@@ -6106,7 +6148,7 @@ function InfiniteTableHeaderFn(props) {
|
|
|
6106
6148
|
className: join(TableHeaderClassName, `${TableHeaderClassName}--virtualized`, className, headerCls),
|
|
6107
6149
|
style
|
|
6108
6150
|
};
|
|
6109
|
-
return /* @__PURE__ */
|
|
6151
|
+
return /* @__PURE__ */ createElement14("div", __spreadValues({}, domProps), /* @__PURE__ */ createElement14(RawList, {
|
|
6110
6152
|
brain,
|
|
6111
6153
|
renderItem: renderColumn
|
|
6112
6154
|
}));
|
|
@@ -6115,15 +6157,15 @@ var InfiniteTableHeader = memo6(InfiniteTableHeaderFn);
|
|
|
6115
6157
|
|
|
6116
6158
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderUnvirtualized.tsx
|
|
6117
6159
|
import {
|
|
6118
|
-
createElement as
|
|
6160
|
+
createElement as createElement17,
|
|
6119
6161
|
memo as memo7,
|
|
6120
6162
|
useMemo as useMemo9,
|
|
6121
|
-
useRef as
|
|
6163
|
+
useRef as useRef11
|
|
6122
6164
|
} from "react";
|
|
6123
6165
|
|
|
6124
6166
|
// src/components/InfiniteTable/components/InfiniteTableHeader/renderColumnHeaderGroups.tsx
|
|
6125
6167
|
import {
|
|
6126
|
-
createElement as
|
|
6168
|
+
createElement as createElement16
|
|
6127
6169
|
} from "react";
|
|
6128
6170
|
|
|
6129
6171
|
// src/components/InfiniteTable/components/InfiniteTableHeader/buildColumnAndGroupTree.ts
|
|
@@ -6215,7 +6257,7 @@ function assignGroupOffsetsAndComputedWidths(items, groupOffset = 0) {
|
|
|
6215
6257
|
|
|
6216
6258
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
|
|
6217
6259
|
import {
|
|
6218
|
-
createElement as
|
|
6260
|
+
createElement as createElement15
|
|
6219
6261
|
} from "react";
|
|
6220
6262
|
var TableHeaderGroupClassName = `${rootClassName}HeaderGroup`;
|
|
6221
6263
|
function InfiniteTableHeaderGroup(props) {
|
|
@@ -6230,16 +6272,16 @@ function InfiniteTableHeaderGroup(props) {
|
|
|
6230
6272
|
width: columnGroup.computedWidth,
|
|
6231
6273
|
height
|
|
6232
6274
|
};
|
|
6233
|
-
return /* @__PURE__ */
|
|
6275
|
+
return /* @__PURE__ */ createElement15("div", {
|
|
6234
6276
|
"data-group-id": columnGroup.id,
|
|
6235
6277
|
className: join(HeaderGroupCls, TableHeaderGroupClassName, `${TableHeaderGroupClassName}--unvirtualized`),
|
|
6236
6278
|
style
|
|
6237
|
-
}, /* @__PURE__ */
|
|
6279
|
+
}, /* @__PURE__ */ createElement15("div", {
|
|
6238
6280
|
className: join(`${TableHeaderGroupClassName}__header`, HeaderGroup_Header),
|
|
6239
6281
|
style: { height: headerHeight }
|
|
6240
|
-
}, /* @__PURE__ */
|
|
6282
|
+
}, /* @__PURE__ */ createElement15("div", {
|
|
6241
6283
|
className: join(`${TableHeaderGroupClassName}__header-content`, cssEllipsisClassName)
|
|
6242
|
-
}, header)), /* @__PURE__ */
|
|
6284
|
+
}, header)), /* @__PURE__ */ createElement15("div", {
|
|
6243
6285
|
className: join(`${TableHeaderGroupClassName}__children`, HeaderGroup_Children)
|
|
6244
6286
|
}, props.children));
|
|
6245
6287
|
}
|
|
@@ -6262,7 +6304,7 @@ function renderColumnHeaderGroups(config) {
|
|
|
6262
6304
|
return items2.map((colGroupItem) => {
|
|
6263
6305
|
if (colGroupItem.type === "column") {
|
|
6264
6306
|
const col = colGroupItem.ref;
|
|
6265
|
-
return /* @__PURE__ */
|
|
6307
|
+
return /* @__PURE__ */ createElement16(InfiniteTableHeaderCell, {
|
|
6266
6308
|
key: col.id,
|
|
6267
6309
|
headerHeight: (columnGroupsMaxDepth - colGroupItem.depth + 2) * headerHeight,
|
|
6268
6310
|
column: col,
|
|
@@ -6276,7 +6318,7 @@ function renderColumnHeaderGroups(config) {
|
|
|
6276
6318
|
colIds.push(col.id);
|
|
6277
6319
|
return col;
|
|
6278
6320
|
});
|
|
6279
|
-
return /* @__PURE__ */
|
|
6321
|
+
return /* @__PURE__ */ createElement16(InfiniteTableHeaderGroup, {
|
|
6280
6322
|
key: `${colGroupItem.uniqueGroupId.join("/")}`,
|
|
6281
6323
|
columns: columns2,
|
|
6282
6324
|
height: (columnGroupsMaxDepth - colGroupItem.depth + 2) * headerHeight,
|
|
@@ -6296,7 +6338,7 @@ function renderColumnHeaderGroups(config) {
|
|
|
6296
6338
|
}
|
|
6297
6339
|
|
|
6298
6340
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderUnvirtualized.tsx
|
|
6299
|
-
import { useEffect as
|
|
6341
|
+
import { useEffect as useEffect16 } from "react";
|
|
6300
6342
|
var { rootClassName: rootClassName5 } = internalProps;
|
|
6301
6343
|
var TableHeaderClassName2 = `${rootClassName5}Header`;
|
|
6302
6344
|
var UPDATE_SCROLL = (node, scrollPosition) => {
|
|
@@ -6329,7 +6371,7 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
|
|
|
6329
6371
|
},
|
|
6330
6372
|
computed: { computedVisibleColumnsMap: columnsMap }
|
|
6331
6373
|
} = useInfiniteTable();
|
|
6332
|
-
const domRef =
|
|
6374
|
+
const domRef = useRef11(null);
|
|
6333
6375
|
const hasColumnGroups = computedColumnGroups.size > 0;
|
|
6334
6376
|
const columnHeaderGroups = useMemo9(() => {
|
|
6335
6377
|
return hasColumnGroups ? renderColumnHeaderGroups({
|
|
@@ -6350,7 +6392,7 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
|
|
|
6350
6392
|
columnGroupsMaxDepth
|
|
6351
6393
|
]);
|
|
6352
6394
|
const children = hasColumnGroups ? columnHeaderGroups : columns.map((c) => {
|
|
6353
|
-
return /* @__PURE__ */
|
|
6395
|
+
return /* @__PURE__ */ createElement17(InfiniteTableHeaderCell, {
|
|
6354
6396
|
key: c.id,
|
|
6355
6397
|
headerHeight,
|
|
6356
6398
|
column: c,
|
|
@@ -6362,7 +6404,7 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
|
|
|
6362
6404
|
if (totalWidth != null) {
|
|
6363
6405
|
style.width = availableWidth;
|
|
6364
6406
|
}
|
|
6365
|
-
|
|
6407
|
+
useEffect16(() => {
|
|
6366
6408
|
const scroller = brain || scrollListener;
|
|
6367
6409
|
if (!scroller || !scrollable) {
|
|
6368
6410
|
return;
|
|
@@ -6375,14 +6417,14 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
|
|
|
6375
6417
|
const removeOnScroll = scroller.onScroll(onScroll);
|
|
6376
6418
|
return removeOnScroll;
|
|
6377
6419
|
}, [brain, scrollListener]);
|
|
6378
|
-
return /* @__PURE__ */
|
|
6420
|
+
return /* @__PURE__ */ createElement17("div", __spreadProps(__spreadValues({}, domProps), {
|
|
6379
6421
|
className: join(TableHeaderClassName2, `${TableHeaderClassName2}--unvirtualized`, pinning ? `${TableHeaderClassName2}--pinned ${TableHeaderClassName2}-${pinning}` : "", scrollable ? `${TableHeaderClassName2}--overflow` : "", domProps.className, HeaderClsRecipe({
|
|
6380
6422
|
pinned: pinning,
|
|
6381
6423
|
virtualized: false,
|
|
6382
6424
|
overflow: scrollable
|
|
6383
6425
|
})),
|
|
6384
6426
|
style
|
|
6385
|
-
}), /* @__PURE__ */
|
|
6427
|
+
}), /* @__PURE__ */ createElement17("div", {
|
|
6386
6428
|
style: { width: totalWidth },
|
|
6387
6429
|
className: join(flexFlow.row, display.flex),
|
|
6388
6430
|
ref: domRef
|
|
@@ -6421,7 +6463,7 @@ function TableHeaderWrapper(props) {
|
|
|
6421
6463
|
const unvirtualizedStyle = !virtualizeHeader && computedPinnedStartColumnsWidth ? {
|
|
6422
6464
|
left: computedPinnedStartWidth
|
|
6423
6465
|
} : void 0;
|
|
6424
|
-
const header = virtualizeHeader ? /* @__PURE__ */
|
|
6466
|
+
const header = virtualizeHeader ? /* @__PURE__ */ createElement18(InfiniteTableHeader, {
|
|
6425
6467
|
columns: computedUnpinnedColumns,
|
|
6426
6468
|
repaintId: virtualizeHeader ? repaintId : void 0,
|
|
6427
6469
|
brain,
|
|
@@ -6434,7 +6476,7 @@ function TableHeaderWrapper(props) {
|
|
|
6434
6476
|
},
|
|
6435
6477
|
availableWidth: computedUnpinnedColumnsWidth,
|
|
6436
6478
|
totalWidth: computedUnpinnedColumnsWidth
|
|
6437
|
-
}) : /* @__PURE__ */
|
|
6479
|
+
}) : /* @__PURE__ */ createElement18(InfiniteTableHeaderUnvirtualized, {
|
|
6438
6480
|
style: unvirtualizedStyle,
|
|
6439
6481
|
brain,
|
|
6440
6482
|
scrollable: true,
|
|
@@ -6443,12 +6485,12 @@ function TableHeaderWrapper(props) {
|
|
|
6443
6485
|
availableWidth: computedUnpinnedColumnsWidth,
|
|
6444
6486
|
totalWidth: computedUnpinnedColumnsWidth
|
|
6445
6487
|
});
|
|
6446
|
-
return /* @__PURE__ */
|
|
6488
|
+
return /* @__PURE__ */ createElement18("div", {
|
|
6447
6489
|
className: HeaderWrapperCls,
|
|
6448
6490
|
style: {
|
|
6449
6491
|
height: virtualizeHeader ? height : void 0
|
|
6450
6492
|
}
|
|
6451
|
-
}, hasPinnedStart ? /* @__PURE__ */
|
|
6493
|
+
}, hasPinnedStart ? /* @__PURE__ */ createElement18(InfiniteTableHeaderUnvirtualized, {
|
|
6452
6494
|
style: {
|
|
6453
6495
|
left: 0,
|
|
6454
6496
|
position: "absolute",
|
|
@@ -6460,7 +6502,7 @@ function TableHeaderWrapper(props) {
|
|
|
6460
6502
|
scrollable: computedPinnedStartOverflow,
|
|
6461
6503
|
pinning: "start",
|
|
6462
6504
|
scrollListener: computedPinnedStartOverflow ? pinnedStartScrollListener : void 0
|
|
6463
|
-
}) : null, header, hasPinnedEnd ? /* @__PURE__ */
|
|
6505
|
+
}) : null, header, hasPinnedEnd ? /* @__PURE__ */ createElement18(InfiniteTableHeaderUnvirtualized, {
|
|
6464
6506
|
style: {
|
|
6465
6507
|
right: scrollbars.vertical ? getScrollbarWidth() : 0,
|
|
6466
6508
|
position: "absolute",
|
|
@@ -6472,7 +6514,7 @@ function TableHeaderWrapper(props) {
|
|
|
6472
6514
|
scrollable: computedPinnedEndOverflow,
|
|
6473
6515
|
pinning: "end",
|
|
6474
6516
|
scrollListener: computedPinnedEndOverflow ? pinnedEndScrollListener : void 0
|
|
6475
|
-
}) : null, scrollbars.vertical ? /* @__PURE__ */
|
|
6517
|
+
}) : null, scrollbars.vertical ? /* @__PURE__ */ createElement18(VerticalScrollbarPlaceholder, {
|
|
6476
6518
|
style: {
|
|
6477
6519
|
height: "100%",
|
|
6478
6520
|
right: 0
|
|
@@ -6482,15 +6524,15 @@ function TableHeaderWrapper(props) {
|
|
|
6482
6524
|
|
|
6483
6525
|
// src/components/VirtualScrollContainer/index.tsx
|
|
6484
6526
|
import {
|
|
6485
|
-
createElement as
|
|
6527
|
+
createElement as createElement19,
|
|
6486
6528
|
forwardRef as forwardRef2
|
|
6487
6529
|
} from "react";
|
|
6488
|
-
import { useRef as
|
|
6530
|
+
import { useRef as useRef12 } from "react";
|
|
6489
6531
|
|
|
6490
6532
|
// src/components/hooks/useOnScroll.ts
|
|
6491
|
-
import { useEffect as
|
|
6533
|
+
import { useEffect as useEffect17 } from "react";
|
|
6492
6534
|
var useOnScroll = (domRef, onScroll) => {
|
|
6493
|
-
|
|
6535
|
+
useEffect17(() => {
|
|
6494
6536
|
const domNode = domRef == null ? void 0 : domRef.current;
|
|
6495
6537
|
const scrollFn = (event) => {
|
|
6496
6538
|
const node = event.target;
|
|
@@ -6536,9 +6578,9 @@ var VirtualScrollContainer = forwardRef2(function VirtualScrollContainer2(props,
|
|
|
6536
6578
|
className,
|
|
6537
6579
|
style
|
|
6538
6580
|
} = props;
|
|
6539
|
-
const domRef = ref != null ? ref :
|
|
6581
|
+
const domRef = ref != null ? ref : useRef12(null);
|
|
6540
6582
|
useOnScroll(domRef, onContainerScroll);
|
|
6541
|
-
return /* @__PURE__ */
|
|
6583
|
+
return /* @__PURE__ */ createElement19("div", {
|
|
6542
6584
|
ref: domRef,
|
|
6543
6585
|
style,
|
|
6544
6586
|
className: join(className, rootClassName6, VirtualScrollContainerCls, getScrollableClassName(scrollable))
|
|
@@ -6547,7 +6589,7 @@ var VirtualScrollContainer = forwardRef2(function VirtualScrollContainer2(props,
|
|
|
6547
6589
|
|
|
6548
6590
|
// src/components/VirtualList/SpacePlaceholder.tsx
|
|
6549
6591
|
import {
|
|
6550
|
-
createElement as
|
|
6592
|
+
createElement as createElement20,
|
|
6551
6593
|
memo as memo8
|
|
6552
6594
|
} from "react";
|
|
6553
6595
|
function SpacePlaceholderFn(props) {
|
|
@@ -6559,7 +6601,7 @@ function SpacePlaceholderFn(props) {
|
|
|
6559
6601
|
opacity: 0,
|
|
6560
6602
|
pointerEvents: "none"
|
|
6561
6603
|
};
|
|
6562
|
-
return /* @__PURE__ */
|
|
6604
|
+
return /* @__PURE__ */ createElement20("div", {
|
|
6563
6605
|
"data-count": count,
|
|
6564
6606
|
"data-placeholder-width": true ? width : void 0,
|
|
6565
6607
|
"data-placeholder-height": true ? height : void 0,
|
|
@@ -6570,26 +6612,26 @@ function SpacePlaceholderFn(props) {
|
|
|
6570
6612
|
var SpacePlaceholder = memo8(SpacePlaceholderFn);
|
|
6571
6613
|
|
|
6572
6614
|
// src/components/InfiniteTable/hooks/useListRendering.tsx
|
|
6573
|
-
import { useEffect as
|
|
6615
|
+
import { useEffect as useEffect23, useMemo as useMemo11, useRef as useRef18 } from "react";
|
|
6574
6616
|
|
|
6575
6617
|
// src/components/InfiniteTable/hooks/useUnpinnedRendering.tsx
|
|
6576
6618
|
import {
|
|
6577
|
-
createElement as
|
|
6619
|
+
createElement as createElement26
|
|
6578
6620
|
} from "react";
|
|
6579
6621
|
import { useCallback as useCallback12 } from "react";
|
|
6580
6622
|
|
|
6581
6623
|
// src/components/VirtualList/VirtualRowList.tsx
|
|
6582
6624
|
import {
|
|
6583
|
-
createElement as
|
|
6625
|
+
createElement as createElement22,
|
|
6584
6626
|
useCallback as useCallback9
|
|
6585
6627
|
} from "react";
|
|
6586
6628
|
|
|
6587
6629
|
// src/components/VirtualList/VirtualList.tsx
|
|
6588
6630
|
import {
|
|
6589
|
-
Fragment as
|
|
6590
|
-
createElement as
|
|
6631
|
+
Fragment as Fragment4,
|
|
6632
|
+
createElement as createElement21
|
|
6591
6633
|
} from "react";
|
|
6592
|
-
import { useRef as
|
|
6634
|
+
import { useRef as useRef13, useEffect as useEffect18, useState as useState9 } from "react";
|
|
6593
6635
|
|
|
6594
6636
|
// src/components/VirtualList/VirtualList.css.ts
|
|
6595
6637
|
var VirtualListCls = "_16lm1iw1 _16lm1iw8 _16lm1iw0";
|
|
@@ -6632,11 +6674,11 @@ var VirtualList = (props) => {
|
|
|
6632
6674
|
"onContainerScroll",
|
|
6633
6675
|
"children"
|
|
6634
6676
|
]);
|
|
6635
|
-
const domRef =
|
|
6677
|
+
const domRef = useRef13(null);
|
|
6636
6678
|
const [, rerender] = useRerender();
|
|
6637
6679
|
const [totalSize, setTotalSize] = useState9(0);
|
|
6638
|
-
const renderCountRef =
|
|
6639
|
-
|
|
6680
|
+
const renderCountRef = useRef13(0);
|
|
6681
|
+
useEffect18(() => {
|
|
6640
6682
|
const removeOnRenderCount = virtualBrain.onRenderCountChange((renderCount) => {
|
|
6641
6683
|
renderCountRef.current = renderCount;
|
|
6642
6684
|
if (true) {
|
|
@@ -6655,7 +6697,7 @@ var VirtualList = (props) => {
|
|
|
6655
6697
|
removeOnTotalSizeChange();
|
|
6656
6698
|
};
|
|
6657
6699
|
}, [virtualBrain]);
|
|
6658
|
-
|
|
6700
|
+
useEffect18(() => {
|
|
6659
6701
|
const onScroll = (scrollPosition) => {
|
|
6660
6702
|
UPDATE_SCROLL2(domRef.current, scrollPosition);
|
|
6661
6703
|
};
|
|
@@ -6670,19 +6712,19 @@ var VirtualList = (props) => {
|
|
|
6670
6712
|
if (true) {
|
|
6671
6713
|
domProps["data-cmp-name"] = `VirtualList`;
|
|
6672
6714
|
}
|
|
6673
|
-
return /* @__PURE__ */
|
|
6715
|
+
return /* @__PURE__ */ createElement21(Fragment4, null, /* @__PURE__ */ createElement21("div", __spreadValues({}, domProps), /* @__PURE__ */ createElement21(VirtualScrollContainer, {
|
|
6674
6716
|
scrollable,
|
|
6675
6717
|
onContainerScroll
|
|
6676
|
-
}, /* @__PURE__ */
|
|
6718
|
+
}, /* @__PURE__ */ createElement21("div", {
|
|
6677
6719
|
ref: domRef,
|
|
6678
6720
|
className: scrollTransformTargetCls,
|
|
6679
6721
|
"data-name": "scroll-transform-target"
|
|
6680
|
-
}, /* @__PURE__ */
|
|
6722
|
+
}, /* @__PURE__ */ createElement21(RawList, {
|
|
6681
6723
|
brain: virtualBrain,
|
|
6682
6724
|
renderItem,
|
|
6683
6725
|
repaintId,
|
|
6684
6726
|
debugChannel: "VirtualList-" + mainAxis
|
|
6685
|
-
})), children, /* @__PURE__ */
|
|
6727
|
+
})), children, /* @__PURE__ */ createElement21(SpacePlaceholder, {
|
|
6686
6728
|
count,
|
|
6687
6729
|
width,
|
|
6688
6730
|
height
|
|
@@ -6699,7 +6741,7 @@ var VirtualRowList = (props) => {
|
|
|
6699
6741
|
rowIndex: renderProps.itemIndex
|
|
6700
6742
|
});
|
|
6701
6743
|
}, [renderRow]);
|
|
6702
|
-
return /* @__PURE__ */
|
|
6744
|
+
return /* @__PURE__ */ createElement22(VirtualList, __spreadProps(__spreadValues({}, listProps), {
|
|
6703
6745
|
renderItem,
|
|
6704
6746
|
mainAxis: "vertical",
|
|
6705
6747
|
itemMainAxisSize: rowHeight,
|
|
@@ -6709,16 +6751,16 @@ var VirtualRowList = (props) => {
|
|
|
6709
6751
|
|
|
6710
6752
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRow.tsx
|
|
6711
6753
|
import {
|
|
6712
|
-
createElement as
|
|
6754
|
+
createElement as createElement24,
|
|
6713
6755
|
memo as memo10,
|
|
6714
6756
|
useCallback as useCallback11
|
|
6715
6757
|
} from "react";
|
|
6716
|
-
import { useRef as
|
|
6758
|
+
import { useRef as useRef15 } from "react";
|
|
6717
6759
|
|
|
6718
6760
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx
|
|
6719
6761
|
import {
|
|
6720
6762
|
createContext as createContext5,
|
|
6721
|
-
createElement as
|
|
6763
|
+
createElement as createElement23,
|
|
6722
6764
|
memo as memo9
|
|
6723
6765
|
} from "react";
|
|
6724
6766
|
import { useContext as useContext6 } from "react";
|
|
@@ -6788,7 +6830,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
6788
6830
|
}
|
|
6789
6831
|
const renderFn = column.render || column.renderValue;
|
|
6790
6832
|
if (renderFn) {
|
|
6791
|
-
return /* @__PURE__ */
|
|
6833
|
+
return /* @__PURE__ */ createElement23(RenderHookComponent, {
|
|
6792
6834
|
render: renderFn,
|
|
6793
6835
|
renderParam
|
|
6794
6836
|
});
|
|
@@ -6835,9 +6877,9 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
6835
6877
|
renderChildren
|
|
6836
6878
|
});
|
|
6837
6879
|
const ContextProvider = InfiniteTableColumnCellContext.Provider;
|
|
6838
|
-
return /* @__PURE__ */
|
|
6880
|
+
return /* @__PURE__ */ createElement23(ContextProvider, {
|
|
6839
6881
|
value: renderParam
|
|
6840
|
-
}, /* @__PURE__ */
|
|
6882
|
+
}, /* @__PURE__ */ createElement23(InfiniteTableCell, __spreadValues({}, cellProps)));
|
|
6841
6883
|
}
|
|
6842
6884
|
var InfiniteTableColumnCell = memo9(InfiniteTableColumnCellFn);
|
|
6843
6885
|
function useInfiniteColumnCell() {
|
|
@@ -6848,7 +6890,7 @@ function useInfiniteColumnCell() {
|
|
|
6848
6890
|
// src/components/InfiniteTable/components/InfiniteTableRow/useRowDOMProps.ts
|
|
6849
6891
|
import {
|
|
6850
6892
|
useCallback as useCallback10,
|
|
6851
|
-
useRef as
|
|
6893
|
+
useRef as useRef14
|
|
6852
6894
|
} from "react";
|
|
6853
6895
|
|
|
6854
6896
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowClassName.ts
|
|
@@ -6875,7 +6917,7 @@ function useRowDOMProps(props, rowProps, rowStyle, rowClassName, groupRenderStra
|
|
|
6875
6917
|
rowInfo,
|
|
6876
6918
|
rowSpan
|
|
6877
6919
|
} = props;
|
|
6878
|
-
const domRef =
|
|
6920
|
+
const domRef = useRef14(null);
|
|
6879
6921
|
const rowDOMRef = useCallback10((node) => {
|
|
6880
6922
|
domRefFromProps(node);
|
|
6881
6923
|
domRef.current = node;
|
|
@@ -6977,13 +7019,13 @@ function InfiniteTableRowFn(props) {
|
|
|
6977
7019
|
width: rowWidth,
|
|
6978
7020
|
height: rowHeight
|
|
6979
7021
|
}, domProps.style);
|
|
6980
|
-
const renderCellRef =
|
|
7022
|
+
const renderCellRef = useRef15(null);
|
|
6981
7023
|
const renderCell = useCallback11(({ domRef, itemIndex }) => {
|
|
6982
7024
|
const column = columns[itemIndex];
|
|
6983
7025
|
if (!column) {
|
|
6984
7026
|
}
|
|
6985
7027
|
const hidden = false;
|
|
6986
|
-
return /* @__PURE__ */
|
|
7028
|
+
return /* @__PURE__ */ createElement24(InfiniteTableColumnCell, {
|
|
6987
7029
|
getData,
|
|
6988
7030
|
rowInfo,
|
|
6989
7031
|
groupRenderStrategy,
|
|
@@ -7010,9 +7052,9 @@ function InfiniteTableRowFn(props) {
|
|
|
7010
7052
|
if (true) {
|
|
7011
7053
|
domProps["data-cmp-name"] = "ITableRow";
|
|
7012
7054
|
}
|
|
7013
|
-
return /* @__PURE__ */
|
|
7055
|
+
return /* @__PURE__ */ createElement24("div", __spreadProps(__spreadValues({}, domProps), {
|
|
7014
7056
|
style
|
|
7015
|
-
}), /* @__PURE__ */
|
|
7057
|
+
}), /* @__PURE__ */ createElement24(RawList, {
|
|
7016
7058
|
brain,
|
|
7017
7059
|
renderItem: renderCell,
|
|
7018
7060
|
debugChannel: `${rowIndex}`
|
|
@@ -7022,7 +7064,7 @@ var InfiniteTableRow = memo10(InfiniteTableRowFn);
|
|
|
7022
7064
|
|
|
7023
7065
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowUnvirtualized.tsx
|
|
7024
7066
|
import {
|
|
7025
|
-
createElement as
|
|
7067
|
+
createElement as createElement25,
|
|
7026
7068
|
memo as memo11
|
|
7027
7069
|
} from "react";
|
|
7028
7070
|
function TableRowUnvirtualizedFn(props) {
|
|
@@ -7045,7 +7087,7 @@ function TableRowUnvirtualizedFn(props) {
|
|
|
7045
7087
|
}, domProps.style);
|
|
7046
7088
|
const children = columns.map((col) => {
|
|
7047
7089
|
const hidden = false;
|
|
7048
|
-
return /* @__PURE__ */
|
|
7090
|
+
return /* @__PURE__ */ createElement25(InfiniteTableColumnCell, {
|
|
7049
7091
|
key: col.id,
|
|
7050
7092
|
virtualized: false,
|
|
7051
7093
|
rowHeight,
|
|
@@ -7058,7 +7100,7 @@ function TableRowUnvirtualizedFn(props) {
|
|
|
7058
7100
|
column: col
|
|
7059
7101
|
});
|
|
7060
7102
|
});
|
|
7061
|
-
return /* @__PURE__ */
|
|
7103
|
+
return /* @__PURE__ */ createElement25("div", __spreadProps(__spreadValues({}, domProps), {
|
|
7062
7104
|
style
|
|
7063
7105
|
}), children);
|
|
7064
7106
|
}
|
|
@@ -7107,7 +7149,7 @@ function useUnpinnedRendering(params) {
|
|
|
7107
7149
|
rowProps.repaintId = repaintId;
|
|
7108
7150
|
}
|
|
7109
7151
|
const TableRowComponent = shouldVirtualizeColumns ? InfiniteTableRow : TableRowUnvirtualized;
|
|
7110
|
-
return /* @__PURE__ */
|
|
7152
|
+
return /* @__PURE__ */ createElement26(TableRowComponent, __spreadValues({}, rowProps));
|
|
7111
7153
|
}, [
|
|
7112
7154
|
repaintId,
|
|
7113
7155
|
rowHeight,
|
|
@@ -7118,7 +7160,7 @@ function useUnpinnedRendering(params) {
|
|
|
7118
7160
|
horizontalVirtualBrain,
|
|
7119
7161
|
verticalVirtualBrain
|
|
7120
7162
|
]);
|
|
7121
|
-
const fakeScrollbar = getScrollbarWidth() ? /* @__PURE__ */
|
|
7163
|
+
const fakeScrollbar = getScrollbarWidth() ? /* @__PURE__ */ createElement26("div", {
|
|
7122
7164
|
"data-name": "horizontal-scrollbar-placeholder--fake",
|
|
7123
7165
|
style: {
|
|
7124
7166
|
position: "absolute",
|
|
@@ -7129,10 +7171,10 @@ function useUnpinnedRendering(params) {
|
|
|
7129
7171
|
overflow: "auto",
|
|
7130
7172
|
visibility: columnShifts ? "visible" : "hidden"
|
|
7131
7173
|
}
|
|
7132
|
-
}, /* @__PURE__ */
|
|
7174
|
+
}, /* @__PURE__ */ createElement26("div", {
|
|
7133
7175
|
style: { height: "100%", width: computedUnpinnedColumnsWidth }
|
|
7134
7176
|
})) : null;
|
|
7135
|
-
return rowHeight != 0 ? /* @__PURE__ */
|
|
7177
|
+
return rowHeight != 0 ? /* @__PURE__ */ createElement26(VirtualRowList, {
|
|
7136
7178
|
repaintId: `${repaintId}-unpinned-`,
|
|
7137
7179
|
brain: verticalVirtualBrain,
|
|
7138
7180
|
onContainerScroll: applyScrollHorizontal,
|
|
@@ -7153,7 +7195,7 @@ function useUnpinnedRendering(params) {
|
|
|
7153
7195
|
}
|
|
7154
7196
|
|
|
7155
7197
|
// src/components/InfiniteTable/hooks/useOnContainerScroll.ts
|
|
7156
|
-
import { useCallback as useCallback13, useEffect as
|
|
7198
|
+
import { useCallback as useCallback13, useEffect as useEffect19, useRef as useRef16 } from "react";
|
|
7157
7199
|
|
|
7158
7200
|
// src/components/InfiniteTable/InfiniteCls.css.ts
|
|
7159
7201
|
var import_createRuntimeFn5 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
|
|
@@ -7178,7 +7220,6 @@ var useOnContainerScroll = ({
|
|
|
7178
7220
|
componentState: {
|
|
7179
7221
|
scrollStopDelay,
|
|
7180
7222
|
scrollerDOMRef,
|
|
7181
|
-
domRef,
|
|
7182
7223
|
scrollToBottomOffset,
|
|
7183
7224
|
onScrollToBottom,
|
|
7184
7225
|
onScrollToTop,
|
|
@@ -7195,10 +7236,10 @@ var useOnContainerScroll = ({
|
|
|
7195
7236
|
onScrollStopFromProps == null ? void 0 : onScrollStopFromProps(param);
|
|
7196
7237
|
notifyScrollStop(param);
|
|
7197
7238
|
}, [onScrollStopFromProps, notifyScrollStop]);
|
|
7198
|
-
const timeoutIdRef =
|
|
7199
|
-
const scrollingRef =
|
|
7200
|
-
const scrollTopMaxRef =
|
|
7201
|
-
|
|
7239
|
+
const timeoutIdRef = useRef16(0);
|
|
7240
|
+
const scrollingRef = useRef16(false);
|
|
7241
|
+
const scrollTopMaxRef = useRef16(0);
|
|
7242
|
+
useEffect19(() => {
|
|
7202
7243
|
const { current: node } = scrollerDOMRef;
|
|
7203
7244
|
scrollTopMaxRef.current = node.scrollHeight - node.clientHeight;
|
|
7204
7245
|
}, [reservedContentHeight, bodySize.height]);
|
|
@@ -7224,7 +7265,7 @@ var useOnContainerScroll = ({
|
|
|
7224
7265
|
lastVisibleRowIndex: range.renderEndIndex
|
|
7225
7266
|
});
|
|
7226
7267
|
}
|
|
7227
|
-
const classList = (_a =
|
|
7268
|
+
const classList = (_a = scrollerDOMRef.current) == null ? void 0 : _a.classList;
|
|
7228
7269
|
if (!classList) {
|
|
7229
7270
|
return;
|
|
7230
7271
|
}
|
|
@@ -7242,10 +7283,10 @@ var useOnContainerScroll = ({
|
|
|
7242
7283
|
}, [
|
|
7243
7284
|
horizontalVirtualBrain,
|
|
7244
7285
|
verticalVirtualBrain,
|
|
7245
|
-
|
|
7286
|
+
scrollerDOMRef.current,
|
|
7246
7287
|
setScrolling
|
|
7247
7288
|
]);
|
|
7248
|
-
const scrollPositionRef =
|
|
7289
|
+
const scrollPositionRef = useRef16({
|
|
7249
7290
|
scrollLeft: 0,
|
|
7250
7291
|
scrollTop: 0
|
|
7251
7292
|
});
|
|
@@ -7276,21 +7317,21 @@ var useOnContainerScroll = ({
|
|
|
7276
7317
|
|
|
7277
7318
|
// src/components/InfiniteTable/hooks/usePinnedRendering.tsx
|
|
7278
7319
|
import {
|
|
7279
|
-
createElement as
|
|
7320
|
+
createElement as createElement28,
|
|
7280
7321
|
useMemo as useMemo10
|
|
7281
7322
|
} from "react";
|
|
7282
7323
|
import { useCallback as useCallback15 } from "react";
|
|
7283
7324
|
|
|
7284
7325
|
// src/components/VirtualList/RowListWithExternalScrolling.tsx
|
|
7285
7326
|
import {
|
|
7286
|
-
createElement as
|
|
7327
|
+
createElement as createElement27
|
|
7287
7328
|
} from "react";
|
|
7288
|
-
import { useEffect as
|
|
7329
|
+
import { useEffect as useEffect21, useCallback as useCallback14, useRef as useRef17 } from "react";
|
|
7289
7330
|
|
|
7290
7331
|
// src/components/hooks/useOnMount.ts
|
|
7291
|
-
import { useEffect as
|
|
7332
|
+
import { useEffect as useEffect20 } from "react";
|
|
7292
7333
|
function useOnMount(domRef, props) {
|
|
7293
|
-
|
|
7334
|
+
useEffect20(() => {
|
|
7294
7335
|
const { onMount, onUnmount } = props;
|
|
7295
7336
|
const node = domRef == null ? void 0 : domRef.current;
|
|
7296
7337
|
onMount == null ? void 0 : onMount(node);
|
|
@@ -7321,7 +7362,7 @@ var RowListWithExternalScrolling = (props) => {
|
|
|
7321
7362
|
onMount,
|
|
7322
7363
|
onUnmount
|
|
7323
7364
|
} = props;
|
|
7324
|
-
const domRef =
|
|
7365
|
+
const domRef = useRef17(null);
|
|
7325
7366
|
const renderItem = useCallback14((renderProps) => renderRow({
|
|
7326
7367
|
domRef: renderProps.domRef,
|
|
7327
7368
|
rowHeight: renderProps.itemSize,
|
|
@@ -7331,7 +7372,7 @@ var RowListWithExternalScrolling = (props) => {
|
|
|
7331
7372
|
onMount,
|
|
7332
7373
|
onUnmount
|
|
7333
7374
|
});
|
|
7334
|
-
|
|
7375
|
+
useEffect21(() => {
|
|
7335
7376
|
const onScroll = (scrollPosition) => {
|
|
7336
7377
|
const node = domRef.current;
|
|
7337
7378
|
if (node) {
|
|
@@ -7360,7 +7401,7 @@ var RowListWithExternalScrolling = (props) => {
|
|
|
7360
7401
|
if (true) {
|
|
7361
7402
|
domProps["data-cmp-name"] = "RowListWithExternalScrolling";
|
|
7362
7403
|
}
|
|
7363
|
-
return /* @__PURE__ */
|
|
7404
|
+
return /* @__PURE__ */ createElement27("div", __spreadValues({}, domProps), /* @__PURE__ */ createElement27(RawList, {
|
|
7364
7405
|
brain,
|
|
7365
7406
|
renderItem,
|
|
7366
7407
|
repaintId
|
|
@@ -7409,7 +7450,7 @@ function PinnedRowsContainer(props) {
|
|
|
7409
7450
|
className: join(`${PinnedRowsContainerClassName}`, PinnedRowsClsVariants[pinning === "start" ? "pinnedStart" : "pinnedEnd"], `${PinnedRowsContainerClassName}--pinned-${pinning}`, `${PinnedRowsContainerClassName}--overflow`, PinnedRowsClsVariants.overflow)
|
|
7410
7451
|
};
|
|
7411
7452
|
if (hasOverflow) {
|
|
7412
|
-
return /* @__PURE__ */
|
|
7453
|
+
return /* @__PURE__ */ createElement28(VirtualScrollContainer, {
|
|
7413
7454
|
scrollable: {
|
|
7414
7455
|
horizontal: true,
|
|
7415
7456
|
vertical: false
|
|
@@ -7425,18 +7466,18 @@ function PinnedRowsContainer(props) {
|
|
|
7425
7466
|
className: join(PinnedRowsContainerClsVariants({
|
|
7426
7467
|
pinned: pinning
|
|
7427
7468
|
}), `${PinnedRowsContainerClassName}Container`, `${PinnedRowsContainerClassName}Container--pinned-${pinning}`)
|
|
7428
|
-
}, /* @__PURE__ */
|
|
7469
|
+
}, /* @__PURE__ */ createElement28(RowListWithExternalScrolling, __spreadProps(__spreadValues({}, rowListProps), {
|
|
7429
7470
|
onMount: (node) => {
|
|
7430
7471
|
pinnedScrollListener == null ? void 0 : pinnedScrollListener.onScroll((scrollPosition) => {
|
|
7431
7472
|
updateScroll(node, brain.getScrollPosition(), scrollPosition);
|
|
7432
7473
|
});
|
|
7433
7474
|
}
|
|
7434
|
-
})), /* @__PURE__ */
|
|
7475
|
+
})), /* @__PURE__ */ createElement28(SpacePlaceholder, {
|
|
7435
7476
|
width: rowWidth,
|
|
7436
7477
|
height: 1
|
|
7437
7478
|
}));
|
|
7438
7479
|
}
|
|
7439
|
-
return /* @__PURE__ */
|
|
7480
|
+
return /* @__PURE__ */ createElement28(RowListWithExternalScrolling, __spreadValues({}, rowListProps));
|
|
7440
7481
|
}
|
|
7441
7482
|
function useRenderPinnedRow(params) {
|
|
7442
7483
|
const { getData, getState, columnsWidth, columns, rowSpan, verticalBrain } = params;
|
|
@@ -7457,7 +7498,7 @@ function useRenderPinnedRow(params) {
|
|
|
7457
7498
|
rowWidth: columnsWidth,
|
|
7458
7499
|
columns
|
|
7459
7500
|
}, rowParams);
|
|
7460
|
-
return /* @__PURE__ */
|
|
7501
|
+
return /* @__PURE__ */ createElement28(TableRowUnvirtualized, __spreadValues({}, rowProps));
|
|
7461
7502
|
}, [columnsWidth, columns, verticalBrain, dataArray]);
|
|
7462
7503
|
return renderPinnedRow;
|
|
7463
7504
|
}
|
|
@@ -7503,7 +7544,7 @@ function usePinnedRenderingForSide(side, params) {
|
|
|
7503
7544
|
columns,
|
|
7504
7545
|
columnsWidth
|
|
7505
7546
|
});
|
|
7506
|
-
const pinnedList = columns.length && rowHeight !== 0 ? /* @__PURE__ */
|
|
7547
|
+
const pinnedList = columns.length && rowHeight !== 0 ? /* @__PURE__ */ createElement28(PinnedRowsContainer, {
|
|
7507
7548
|
pinning: side,
|
|
7508
7549
|
pinnedScrollListener,
|
|
7509
7550
|
hasOverflow,
|
|
@@ -7516,7 +7557,7 @@ function usePinnedRenderingForSide(side, params) {
|
|
|
7516
7557
|
brain: verticalVirtualBrain,
|
|
7517
7558
|
renderRow: renderRowPinned
|
|
7518
7559
|
}) : null;
|
|
7519
|
-
const pinnedScrollbarPlaceholder = pinnedList && hasHorizontalScrollbar && !hasOverflow ? /* @__PURE__ */
|
|
7560
|
+
const pinnedScrollbarPlaceholder = pinnedList && hasHorizontalScrollbar && !hasOverflow ? /* @__PURE__ */ createElement28(HorizontalScrollbarPlaceholder, {
|
|
7520
7561
|
style: side === "end" ? {
|
|
7521
7562
|
width: columnsWidth,
|
|
7522
7563
|
right: hasVerticalScrollbar ? getScrollbarWidth() : 0
|
|
@@ -7558,7 +7599,7 @@ function usePinnedStartRendering(params) {
|
|
|
7558
7599
|
}
|
|
7559
7600
|
|
|
7560
7601
|
// src/components/InfiniteTable/hooks/useYourBrain.ts
|
|
7561
|
-
import { useEffect as
|
|
7602
|
+
import { useEffect as useEffect22 } from "react";
|
|
7562
7603
|
|
|
7563
7604
|
// src/components/InfiniteTable/hooks/useColumnSizeFn.ts
|
|
7564
7605
|
import { useCallback as useCallback16 } from "react";
|
|
@@ -7594,13 +7635,13 @@ function useYourBrain(param) {
|
|
|
7594
7635
|
globalThis.verticalVirtualBrain = verticalVirtualBrain;
|
|
7595
7636
|
globalThis.horizontalVirtualBrain = horizontalVirtualBrain;
|
|
7596
7637
|
}
|
|
7597
|
-
|
|
7638
|
+
useEffect22(() => {
|
|
7598
7639
|
verticalVirtualBrain.setAvailableSize({
|
|
7599
7640
|
height: bodySize.height,
|
|
7600
7641
|
width: 0
|
|
7601
7642
|
});
|
|
7602
7643
|
}, [bodySize, verticalVirtualBrain]);
|
|
7603
|
-
|
|
7644
|
+
useEffect22(() => {
|
|
7604
7645
|
horizontalVirtualBrain.setAvailableSize({
|
|
7605
7646
|
height: 0,
|
|
7606
7647
|
width: Math.max(bodySize.width - computedPinnedStartWidth - computedPinnedEndWidth, 0)
|
|
@@ -7641,7 +7682,7 @@ function useListRendering(param) {
|
|
|
7641
7682
|
horizontalVirtualBrain
|
|
7642
7683
|
} = componentState;
|
|
7643
7684
|
const prevDataSourceTimestamp = usePrevious(dataSourceState.updatedAt);
|
|
7644
|
-
const repaintIdRef =
|
|
7685
|
+
const repaintIdRef = useRef18(0);
|
|
7645
7686
|
if (prevDataSourceTimestamp !== dataSourceState.updatedAt || !shallowEqualObjects(prevComputed, computed)) {
|
|
7646
7687
|
repaintIdRef.current++;
|
|
7647
7688
|
}
|
|
@@ -7664,7 +7705,7 @@ function useListRendering(param) {
|
|
|
7664
7705
|
vertical: hasVerticalScrollbar,
|
|
7665
7706
|
horizontal: hasHorizontalScrollbar
|
|
7666
7707
|
}), [hasVerticalScrollbar, hasHorizontalScrollbar]);
|
|
7667
|
-
|
|
7708
|
+
useEffect23(() => {
|
|
7668
7709
|
if (!bodySize.height) {
|
|
7669
7710
|
return;
|
|
7670
7711
|
}
|
|
@@ -7720,7 +7761,7 @@ function useListRendering(param) {
|
|
|
7720
7761
|
computedUnpinnedColumns
|
|
7721
7762
|
});
|
|
7722
7763
|
const [, rerender] = useRerender();
|
|
7723
|
-
|
|
7764
|
+
useEffect23(() => {
|
|
7724
7765
|
rerender();
|
|
7725
7766
|
}, [dataSourceState]);
|
|
7726
7767
|
const { pinnedStartList, pinnedStartScrollbarPlaceholder } = usePinnedStartRendering(pinnedRenderingParams);
|
|
@@ -7744,12 +7785,12 @@ function useListRendering(param) {
|
|
|
7744
7785
|
|
|
7745
7786
|
// src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
|
|
7746
7787
|
import {
|
|
7747
|
-
createElement as
|
|
7788
|
+
createElement as createElement29,
|
|
7748
7789
|
forwardRef as forwardRef3,
|
|
7749
7790
|
useCallback as useCallback17,
|
|
7750
|
-
useRef as
|
|
7791
|
+
useRef as useRef19
|
|
7751
7792
|
} from "react";
|
|
7752
|
-
import { useEffect as
|
|
7793
|
+
import { useEffect as useEffect24 } from "react";
|
|
7753
7794
|
|
|
7754
7795
|
// src/components/utils/decamelize.ts
|
|
7755
7796
|
function decamelize(str, options) {
|
|
@@ -7786,7 +7827,7 @@ var enforceStyle = (node, style) => {
|
|
|
7786
7827
|
};
|
|
7787
7828
|
var InfiniteTableLicenseFooter = forwardRef3(function InfiniteTableLicenseFooter2(props, ref) {
|
|
7788
7829
|
const { rootClassName: rootClassName12 } = useInternalProps();
|
|
7789
|
-
const domRef =
|
|
7830
|
+
const domRef = useRef19(null);
|
|
7790
7831
|
const domCallback = useCallback17((node) => {
|
|
7791
7832
|
domRef.current = node;
|
|
7792
7833
|
if (!ref) {
|
|
@@ -7798,7 +7839,7 @@ var InfiniteTableLicenseFooter = forwardRef3(function InfiniteTableLicenseFooter
|
|
|
7798
7839
|
ref.current = node;
|
|
7799
7840
|
}
|
|
7800
7841
|
}, []);
|
|
7801
|
-
|
|
7842
|
+
useEffect24(() => {
|
|
7802
7843
|
const forceStyle = () => {
|
|
7803
7844
|
requestAnimationFrame(() => {
|
|
7804
7845
|
var _a;
|
|
@@ -7812,12 +7853,12 @@ var InfiniteTableLicenseFooter = forwardRef3(function InfiniteTableLicenseFooter
|
|
|
7812
7853
|
clearInterval(intervalId);
|
|
7813
7854
|
};
|
|
7814
7855
|
}, []);
|
|
7815
|
-
return /* @__PURE__ */
|
|
7856
|
+
return /* @__PURE__ */ createElement29("div", __spreadProps(__spreadValues({
|
|
7816
7857
|
ref: domCallback
|
|
7817
7858
|
}, props), {
|
|
7818
7859
|
className: join(`${rootClassName12}-Footer`, FooterCls, props.className),
|
|
7819
7860
|
style: defaultStyle2
|
|
7820
|
-
}), "Powered by", " ", /* @__PURE__ */
|
|
7861
|
+
}), "Powered by", " ", /* @__PURE__ */ createElement29("a", {
|
|
7821
7862
|
href: "https://infinite-table.com",
|
|
7822
7863
|
rel: "noopener noreferrer",
|
|
7823
7864
|
role: "link",
|
|
@@ -7987,7 +8028,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
7987
8028
|
const valid = useMemo12(() => {
|
|
7988
8029
|
let valid2 = isValidLicense(licenseKey, {
|
|
7989
8030
|
publishedAt: 1624970570587,
|
|
7990
|
-
version: "0.2.
|
|
8031
|
+
version: "0.2.18"
|
|
7991
8032
|
});
|
|
7992
8033
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
7993
8034
|
return true;
|
|
@@ -7999,11 +8040,11 @@ var useLicense = (licenseKey = "") => {
|
|
|
7999
8040
|
|
|
8000
8041
|
// src/components/CSSVariableWatch.tsx
|
|
8001
8042
|
import {
|
|
8002
|
-
createElement as
|
|
8043
|
+
createElement as createElement30,
|
|
8003
8044
|
useCallback as useCallback18,
|
|
8004
8045
|
useLayoutEffect as useLayoutEffect4
|
|
8005
8046
|
} from "react";
|
|
8006
|
-
import { useRef as
|
|
8047
|
+
import { useRef as useRef20 } from "react";
|
|
8007
8048
|
var error = err("CSSVariableWatch");
|
|
8008
8049
|
var debug6 = dbg("CSSVariableWatch");
|
|
8009
8050
|
var WRAPPER_STYLE = {
|
|
@@ -8016,7 +8057,7 @@ var WRAPPER_STYLE = {
|
|
|
8016
8057
|
overflow: "hidden"
|
|
8017
8058
|
};
|
|
8018
8059
|
var useCSSVariableWatch = (params) => {
|
|
8019
|
-
const lastValueRef =
|
|
8060
|
+
const lastValueRef = useRef20(0);
|
|
8020
8061
|
const onResize = useCallback18(({ height }) => {
|
|
8021
8062
|
if (height && height !== lastValueRef.current) {
|
|
8022
8063
|
lastValueRef.current = height;
|
|
@@ -8036,15 +8077,15 @@ var useCSSVariableWatch = (params) => {
|
|
|
8036
8077
|
}, []);
|
|
8037
8078
|
};
|
|
8038
8079
|
var CSSVariableWatch = (props) => {
|
|
8039
|
-
const domRef =
|
|
8080
|
+
const domRef = useRef20(null);
|
|
8040
8081
|
useCSSVariableWatch(__spreadProps(__spreadValues({}, props), {
|
|
8041
8082
|
ref: domRef
|
|
8042
8083
|
}));
|
|
8043
|
-
return /* @__PURE__ */
|
|
8084
|
+
return /* @__PURE__ */ createElement30("div", {
|
|
8044
8085
|
"data-name": "css-variable-watcher",
|
|
8045
8086
|
"data-var": props.varName,
|
|
8046
8087
|
style: WRAPPER_STYLE
|
|
8047
|
-
}, /* @__PURE__ */
|
|
8088
|
+
}, /* @__PURE__ */ createElement30("div", {
|
|
8048
8089
|
ref: domRef,
|
|
8049
8090
|
style: {
|
|
8050
8091
|
height: props.varName.startsWith("var(") ? props.varName : `var(${props.varName})`
|
|
@@ -8138,7 +8179,7 @@ function useDOMProps(initialDOMProps) {
|
|
|
8138
8179
|
|
|
8139
8180
|
// src/components/InfiniteTable/components/LoadMask.tsx
|
|
8140
8181
|
import {
|
|
8141
|
-
createElement as
|
|
8182
|
+
createElement as createElement31,
|
|
8142
8183
|
memo as memo12
|
|
8143
8184
|
} from "react";
|
|
8144
8185
|
|
|
@@ -8152,11 +8193,11 @@ var { rootClassName: rootClassName11 } = internalProps;
|
|
|
8152
8193
|
var baseCls = `${rootClassName11}-LoadMask`;
|
|
8153
8194
|
function LoadMaskFn(props) {
|
|
8154
8195
|
const { visible, children = "Loading" } = props;
|
|
8155
|
-
return /* @__PURE__ */
|
|
8196
|
+
return /* @__PURE__ */ createElement31("div", {
|
|
8156
8197
|
className: `${LoadMaskCls[visible ? "visible" : "hidden"]} ${baseCls}`
|
|
8157
|
-
}, /* @__PURE__ */
|
|
8198
|
+
}, /* @__PURE__ */ createElement31("div", {
|
|
8158
8199
|
className: `${LoadMaskOverlayCls} ${baseCls}-Overlay`
|
|
8159
|
-
}), /* @__PURE__ */
|
|
8200
|
+
}), /* @__PURE__ */ createElement31("div", {
|
|
8160
8201
|
className: `${LoadMaskTextCls} ${baseCls}-Text`
|
|
8161
8202
|
}, children));
|
|
8162
8203
|
}
|
|
@@ -8164,8 +8205,8 @@ var LoadMask = memo12(LoadMaskFn);
|
|
|
8164
8205
|
|
|
8165
8206
|
// src/components/InfiniteTable/hooks/useAutoSizeColumns.ts
|
|
8166
8207
|
import {
|
|
8167
|
-
useEffect as
|
|
8168
|
-
useRef as
|
|
8208
|
+
useEffect as useEffect25,
|
|
8209
|
+
useRef as useRef21,
|
|
8169
8210
|
useState as useState10
|
|
8170
8211
|
} from "react";
|
|
8171
8212
|
var OFFSET = 10;
|
|
@@ -8235,8 +8276,8 @@ function useAutoSizeColumns() {
|
|
|
8235
8276
|
const [refreshId, setRefreshId] = useState10(0);
|
|
8236
8277
|
const theKey = typeof autoSizeColumnsKey === "object" ? autoSizeColumnsKey.key : autoSizeColumnsKey;
|
|
8237
8278
|
const getTheKey = useLatest(theKey);
|
|
8238
|
-
const lastExecutedIdentifierRef =
|
|
8239
|
-
|
|
8279
|
+
const lastExecutedIdentifierRef = useRef21(null);
|
|
8280
|
+
useEffect25(() => {
|
|
8240
8281
|
const key = getTheKey();
|
|
8241
8282
|
if (key == null) {
|
|
8242
8283
|
return;
|
|
@@ -8254,7 +8295,7 @@ function useAutoSizeColumns() {
|
|
|
8254
8295
|
removeHorizontal();
|
|
8255
8296
|
};
|
|
8256
8297
|
}, [verticalVirtualBrain, horizontalVirtualBrain]);
|
|
8257
|
-
|
|
8298
|
+
useEffect25(() => {
|
|
8258
8299
|
var _a;
|
|
8259
8300
|
if (theKey == null) {
|
|
8260
8301
|
return;
|
|
@@ -8362,7 +8403,7 @@ var InfiniteTableComponent = memo13(function InfiniteTableComponent2() {
|
|
|
8362
8403
|
bodySize,
|
|
8363
8404
|
computed
|
|
8364
8405
|
});
|
|
8365
|
-
|
|
8406
|
+
useEffect26(() => {
|
|
8366
8407
|
const dataSourceState = getDataSourceState();
|
|
8367
8408
|
const onChange = debounce((renderRange) => {
|
|
8368
8409
|
dataSourceState.notifyRenderRangeChange(renderRange);
|
|
@@ -8381,35 +8422,35 @@ var InfiniteTableComponent = memo13(function InfiniteTableComponent2() {
|
|
|
8381
8422
|
}
|
|
8382
8423
|
notifyScrollbarsChange(scrollbars);
|
|
8383
8424
|
}, [scrollbars]);
|
|
8384
|
-
|
|
8425
|
+
useEffect26(() => {
|
|
8385
8426
|
dataSourceActions.scrollStopDelayUpdatedByTable = scrollStopDelay;
|
|
8386
8427
|
}, [scrollStopDelay]);
|
|
8387
8428
|
useAutoSizeColumns();
|
|
8388
|
-
return /* @__PURE__ */
|
|
8429
|
+
return /* @__PURE__ */ createElement32("div", __spreadValues({
|
|
8389
8430
|
ref: domRef
|
|
8390
|
-
}, domProps), header ? /* @__PURE__ */
|
|
8431
|
+
}, domProps), header ? /* @__PURE__ */ createElement32(TableHeaderWrapper, {
|
|
8391
8432
|
brain: horizontalVirtualBrain,
|
|
8392
8433
|
repaintId,
|
|
8393
8434
|
scrollbars
|
|
8394
|
-
}) : null, /* @__PURE__ */
|
|
8435
|
+
}) : null, /* @__PURE__ */ createElement32(InfiniteTableBody, null, /* @__PURE__ */ createElement32(VirtualScrollContainer, {
|
|
8395
8436
|
ref: scrollerDOMRef,
|
|
8396
8437
|
onContainerScroll: applyScrollVertical,
|
|
8397
8438
|
scrollable: ONLY_VERTICAL_SCROLLBAR
|
|
8398
|
-
}, /* @__PURE__ */
|
|
8439
|
+
}, /* @__PURE__ */ createElement32("div", {
|
|
8399
8440
|
className: display.flex
|
|
8400
|
-
}, pinnedStartList, centerList, pinnedEndList), /* @__PURE__ */
|
|
8441
|
+
}, pinnedStartList, centerList, pinnedEndList), /* @__PURE__ */ createElement32(SpacePlaceholder, {
|
|
8401
8442
|
count: dataArray.length,
|
|
8402
8443
|
width: 0,
|
|
8403
8444
|
height: reservedContentHeight
|
|
8404
|
-
})), pinnedStartScrollbarPlaceholder, pinnedEndScrollbarPlaceholder, /* @__PURE__ */
|
|
8445
|
+
})), pinnedStartScrollbarPlaceholder, pinnedEndScrollbarPlaceholder, /* @__PURE__ */ createElement32(LoadMaskCmp, {
|
|
8405
8446
|
visible: loading
|
|
8406
|
-
}, loadingText)), licenseValid ? null : /* @__PURE__ */
|
|
8447
|
+
}, loadingText)), licenseValid ? null : /* @__PURE__ */ createElement32(InfiniteTableLicenseFooter, null), /* @__PURE__ */ createElement32("div", {
|
|
8407
8448
|
ref: portalDOMRef,
|
|
8408
8449
|
className: join(`${rootClassName}Portal`, zIndex[1e3], position.absolute, top[0], left[0])
|
|
8409
|
-
}), rowHeightCSSVar ? /* @__PURE__ */
|
|
8450
|
+
}), rowHeightCSSVar ? /* @__PURE__ */ createElement32(CSSVariableWatch, {
|
|
8410
8451
|
varName: rowHeightCSSVar,
|
|
8411
8452
|
onChange: onRowHeightCSSVarChange
|
|
8412
|
-
}) : null, headerHeightCSSVar ? /* @__PURE__ */
|
|
8453
|
+
}) : null, headerHeightCSSVar ? /* @__PURE__ */ createElement32(CSSVariableWatch, {
|
|
8413
8454
|
varName: headerHeightCSSVar,
|
|
8414
8455
|
onChange: onHeaderHeightCSSVarChange
|
|
8415
8456
|
}) : null);
|
|
@@ -8445,25 +8486,25 @@ function InfiniteTableContextProvider() {
|
|
|
8445
8486
|
}
|
|
8446
8487
|
componentActions.bodySize = bodySize;
|
|
8447
8488
|
}, { earlyAttach: true });
|
|
8448
|
-
|
|
8489
|
+
useEffect26(() => {
|
|
8449
8490
|
return () => {
|
|
8450
8491
|
componentState.onRowHeightCSSVarChange.destroy();
|
|
8451
8492
|
componentState.onHeaderHeightCSSVarChange.destroy();
|
|
8452
8493
|
};
|
|
8453
8494
|
}, []);
|
|
8454
|
-
|
|
8495
|
+
useEffect26(() => {
|
|
8455
8496
|
if (scrollerDOMRef.current) {
|
|
8456
8497
|
scrollerDOMRef.current.scrollTop = 0;
|
|
8457
8498
|
}
|
|
8458
8499
|
}, [scrollTopKey, scrollerDOMRef]);
|
|
8459
8500
|
const TableContext2 = getInfiniteTableContext();
|
|
8460
|
-
return /* @__PURE__ */
|
|
8501
|
+
return /* @__PURE__ */ createElement32(TableContext2.Provider, {
|
|
8461
8502
|
value: contextValue
|
|
8462
|
-
}, /* @__PURE__ */
|
|
8503
|
+
}, /* @__PURE__ */ createElement32(InfiniteTableComponent, null));
|
|
8463
8504
|
}
|
|
8464
8505
|
function InfiniteTable(props) {
|
|
8465
|
-
const table = /* @__PURE__ */
|
|
8466
|
-
return /* @__PURE__ */
|
|
8506
|
+
const table = /* @__PURE__ */ createElement32(InfiniteTableRoot, __spreadValues({}, props), /* @__PURE__ */ createElement32(InfiniteTableContextProvider, null));
|
|
8507
|
+
return /* @__PURE__ */ createElement32(StrictMode, null, table);
|
|
8467
8508
|
}
|
|
8468
8509
|
InfiniteTable.defaultProps = {
|
|
8469
8510
|
rowHeight: 40,
|