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