@infinite-table/infinite-react 0.2.13 → 0.2.16
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 +43 -14
- package/index.esm.js +332 -226
- package/index.js +403 -302
- package/package.json +2 -2
package/index.esm.js
CHANGED
|
@@ -633,7 +633,7 @@ function debounce(fn, { wait }) {
|
|
|
633
633
|
// src/components/InfiniteTable/index.tsx
|
|
634
634
|
import {
|
|
635
635
|
StrictMode,
|
|
636
|
-
createElement as
|
|
636
|
+
createElement as createElement33,
|
|
637
637
|
memo as memo13,
|
|
638
638
|
useEffect as useEffect25,
|
|
639
639
|
useLayoutEffect as useLayoutEffect5
|
|
@@ -1474,7 +1474,7 @@ var useInfiniteTable = () => {
|
|
|
1474
1474
|
// src/components/InfiniteTable/hooks/useComputedVisibleColumns.ts
|
|
1475
1475
|
import { useMemo as useMemo2 } from "react";
|
|
1476
1476
|
|
|
1477
|
-
// src/components/flexbox/index.
|
|
1477
|
+
// src/components/flexbox/index.ts
|
|
1478
1478
|
var computeFlex = (params) => {
|
|
1479
1479
|
const {
|
|
1480
1480
|
availableSize,
|
|
@@ -1882,7 +1882,8 @@ var getComputedVisibleColumns = ({
|
|
|
1882
1882
|
valueGetter: colType.valueGetter,
|
|
1883
1883
|
renderValue: colType.renderValue,
|
|
1884
1884
|
render: colType.render,
|
|
1885
|
-
style: colType.style
|
|
1885
|
+
style: colType.style,
|
|
1886
|
+
components: colType.components
|
|
1886
1887
|
}, c), {
|
|
1887
1888
|
cssEllipsis,
|
|
1888
1889
|
headerCssEllipsis,
|
|
@@ -2545,7 +2546,7 @@ import { useEffect as useEffect9, useMemo as useMemo5 } from "react";
|
|
|
2545
2546
|
|
|
2546
2547
|
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
2547
2548
|
import {
|
|
2548
|
-
createElement as
|
|
2549
|
+
createElement as createElement5
|
|
2549
2550
|
} from "react";
|
|
2550
2551
|
|
|
2551
2552
|
// src/utils/join.ts
|
|
@@ -2620,6 +2621,15 @@ var userSelect = { none: "_16lm1iwm" };
|
|
|
2620
2621
|
var willChange = { transform: "_16lm1iw19" };
|
|
2621
2622
|
var zIndex = { "1": "_16lm1iwe", "10": "_16lm1iwf", "1000": "_16lm1iwg", "10000": "_16lm1iwh", "100000": "_16lm1iwi" };
|
|
2622
2623
|
|
|
2624
|
+
// src/components/InfiniteTable/utils/RenderHookComponent.tsx
|
|
2625
|
+
import {
|
|
2626
|
+
Fragment,
|
|
2627
|
+
createElement as createElement4
|
|
2628
|
+
} from "react";
|
|
2629
|
+
function RenderHookComponent(props) {
|
|
2630
|
+
return /* @__PURE__ */ createElement4(Fragment, null, props.render(props.renderParam));
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2623
2633
|
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
2624
2634
|
function getGroupColumnRender({
|
|
2625
2635
|
groupIndexForColumn,
|
|
@@ -2630,7 +2640,10 @@ function getGroupColumnRender({
|
|
|
2630
2640
|
var _a, _b, _c;
|
|
2631
2641
|
let { value, rowInfo, column, groupBy, pivotBy } = renderOptions;
|
|
2632
2642
|
if (column.renderValue) {
|
|
2633
|
-
value =
|
|
2643
|
+
value = /* @__PURE__ */ createElement5(RenderHookComponent, {
|
|
2644
|
+
render: column.renderValue,
|
|
2645
|
+
renderParam: renderOptions
|
|
2646
|
+
});
|
|
2634
2647
|
}
|
|
2635
2648
|
let groupRowInfo = groupRenderStrategy !== "inline" ? rowInfo : ((_a = rowInfo.parents) == null ? void 0 : _a[groupIndexForColumn]) || rowInfo;
|
|
2636
2649
|
if (!groupRowInfo) {
|
|
@@ -2656,17 +2669,20 @@ function getGroupColumnRender({
|
|
|
2656
2669
|
let icon = null;
|
|
2657
2670
|
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);
|
|
2658
2671
|
if (showExpanderIcon) {
|
|
2659
|
-
const defaultIcon = /* @__PURE__ */
|
|
2672
|
+
const defaultIcon = /* @__PURE__ */ createElement5(ExpanderIcon, {
|
|
2660
2673
|
expanded: !collapsed,
|
|
2661
2674
|
onChange: () => {
|
|
2662
2675
|
toggleGroupRow(groupKeys);
|
|
2663
2676
|
}
|
|
2664
2677
|
});
|
|
2665
|
-
icon = column.renderGroupIcon ?
|
|
2678
|
+
icon = column.renderGroupIcon ? /* @__PURE__ */ createElement5(RenderHookComponent, {
|
|
2679
|
+
render: column.renderGroupIcon,
|
|
2680
|
+
renderParam: Object.assign({ collapsed, groupIcon: defaultIcon }, renderOptions)
|
|
2681
|
+
}) : defaultIcon;
|
|
2666
2682
|
}
|
|
2667
|
-
return /* @__PURE__ */
|
|
2683
|
+
return /* @__PURE__ */ createElement5("div", {
|
|
2668
2684
|
className: join(display.flex, alignItems.center)
|
|
2669
|
-
}, icon, /* @__PURE__ */
|
|
2685
|
+
}, icon, /* @__PURE__ */ createElement5("div", {
|
|
2670
2686
|
className: cssEllipsisClassName
|
|
2671
2687
|
}, value != null ? value : null));
|
|
2672
2688
|
};
|
|
@@ -2714,7 +2730,7 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
|
|
|
2714
2730
|
let icon = null;
|
|
2715
2731
|
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);
|
|
2716
2732
|
if (showExpanderIcon) {
|
|
2717
|
-
const defaultIcon = /* @__PURE__ */
|
|
2733
|
+
const defaultIcon = /* @__PURE__ */ createElement5(ExpanderIcon, {
|
|
2718
2734
|
expanded: !collapsed,
|
|
2719
2735
|
onChange: () => {
|
|
2720
2736
|
toggleGroupRow(rowInfo.groupKeys);
|
|
@@ -2722,9 +2738,9 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
|
|
|
2722
2738
|
});
|
|
2723
2739
|
icon = column.renderGroupIcon ? column.renderGroupIcon(Object.assign({ collapsed, groupIcon: defaultIcon }, renderOptions)) : defaultIcon;
|
|
2724
2740
|
}
|
|
2725
|
-
return /* @__PURE__ */
|
|
2741
|
+
return /* @__PURE__ */ createElement5("div", {
|
|
2726
2742
|
className: join(display.flex, alignItems.center, GroupRowExpanderCls)
|
|
2727
|
-
}, icon, /* @__PURE__ */
|
|
2743
|
+
}, icon, /* @__PURE__ */ createElement5("div", {
|
|
2728
2744
|
className: cssEllipsisClassName
|
|
2729
2745
|
}, value != null ? value : null));
|
|
2730
2746
|
}
|
|
@@ -2744,8 +2760,8 @@ import { useCallback as useCallback4 } from "react";
|
|
|
2744
2760
|
|
|
2745
2761
|
// src/components/DataSource/index.tsx
|
|
2746
2762
|
import {
|
|
2747
|
-
Fragment,
|
|
2748
|
-
createElement as
|
|
2763
|
+
Fragment as Fragment2,
|
|
2764
|
+
createElement as createElement6
|
|
2749
2765
|
} from "react";
|
|
2750
2766
|
|
|
2751
2767
|
// src/utils/multisort/sortTypes.ts
|
|
@@ -2847,6 +2863,7 @@ var DeepMap = class {
|
|
|
2847
2863
|
this.map = new Map();
|
|
2848
2864
|
this.length = 0;
|
|
2849
2865
|
this.revision = 0;
|
|
2866
|
+
this.emptyKey = Symbol("emptyKey");
|
|
2850
2867
|
this.visit = (fn) => {
|
|
2851
2868
|
this.map.forEach((_, k) => this.visitKey(k, this.map, [], fn));
|
|
2852
2869
|
};
|
|
@@ -2858,13 +2875,19 @@ var DeepMap = class {
|
|
|
2858
2875
|
return;
|
|
2859
2876
|
}
|
|
2860
2877
|
let i = 0;
|
|
2861
|
-
currentMap.
|
|
2878
|
+
const hasEmptyKey = currentMap.has(this.emptyKey);
|
|
2879
|
+
let allowEmptyKey = true;
|
|
2880
|
+
const iterator = (_, key) => {
|
|
2862
2881
|
const pair = currentMap.get(key);
|
|
2863
2882
|
if (!pair) {
|
|
2864
2883
|
return;
|
|
2865
2884
|
}
|
|
2866
2885
|
const { map: map2 } = pair;
|
|
2867
|
-
const
|
|
2886
|
+
const isEmptyKey = key === this.emptyKey;
|
|
2887
|
+
if (isEmptyKey && !allowEmptyKey) {
|
|
2888
|
+
return;
|
|
2889
|
+
}
|
|
2890
|
+
const keys = isEmptyKey ? [] : [...parentKeys, key];
|
|
2868
2891
|
const next = map2 ? () => this.visitWithNext(keys, fn, map2) : void 0;
|
|
2869
2892
|
if (pair.hasOwnProperty("value")) {
|
|
2870
2893
|
fn(pair.value, keys, i, next);
|
|
@@ -2872,7 +2895,13 @@ var DeepMap = class {
|
|
|
2872
2895
|
} else {
|
|
2873
2896
|
next == null ? void 0 : next();
|
|
2874
2897
|
}
|
|
2875
|
-
}
|
|
2898
|
+
};
|
|
2899
|
+
if (hasEmptyKey) {
|
|
2900
|
+
iterator(void 0, this.emptyKey);
|
|
2901
|
+
allowEmptyKey = false;
|
|
2902
|
+
i = 0;
|
|
2903
|
+
}
|
|
2904
|
+
currentMap.forEach(iterator);
|
|
2876
2905
|
};
|
|
2877
2906
|
if (initial) {
|
|
2878
2907
|
initial.forEach((entry) => {
|
|
@@ -2891,7 +2920,7 @@ var DeepMap = class {
|
|
|
2891
2920
|
set(keys, value) {
|
|
2892
2921
|
let currentMap = this.map;
|
|
2893
2922
|
if (!keys.length) {
|
|
2894
|
-
|
|
2923
|
+
keys = [this.emptyKey];
|
|
2895
2924
|
}
|
|
2896
2925
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
2897
2926
|
const key = keys[i];
|
|
@@ -2917,7 +2946,7 @@ var DeepMap = class {
|
|
|
2917
2946
|
var _a;
|
|
2918
2947
|
let currentMap = this.map;
|
|
2919
2948
|
if (!keys.length) {
|
|
2920
|
-
|
|
2949
|
+
keys = [this.emptyKey];
|
|
2921
2950
|
}
|
|
2922
2951
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
2923
2952
|
const key = keys[i];
|
|
@@ -2952,10 +2981,11 @@ var DeepMap = class {
|
|
|
2952
2981
|
this.revision = 0;
|
|
2953
2982
|
}
|
|
2954
2983
|
delete(keys) {
|
|
2955
|
-
keys = [...keys];
|
|
2956
2984
|
let currentMap = this.map;
|
|
2957
2985
|
if (!keys.length) {
|
|
2958
|
-
|
|
2986
|
+
keys = [this.emptyKey];
|
|
2987
|
+
} else {
|
|
2988
|
+
keys = [...keys];
|
|
2959
2989
|
}
|
|
2960
2990
|
let maps = [currentMap];
|
|
2961
2991
|
let result = false;
|
|
@@ -3008,7 +3038,7 @@ var DeepMap = class {
|
|
|
3008
3038
|
has(keys) {
|
|
3009
3039
|
let currentMap = this.map;
|
|
3010
3040
|
if (!keys.length) {
|
|
3011
|
-
|
|
3041
|
+
keys = [this.emptyKey];
|
|
3012
3042
|
}
|
|
3013
3043
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
3014
3044
|
const key = keys[i];
|
|
@@ -3032,7 +3062,7 @@ var DeepMap = class {
|
|
|
3032
3062
|
return;
|
|
3033
3063
|
}
|
|
3034
3064
|
const { map: map2 } = pair;
|
|
3035
|
-
const keys = [...parentKeys, key];
|
|
3065
|
+
const keys = key === this.emptyKey ? [] : [...parentKeys, key];
|
|
3036
3066
|
const next = once(() => {
|
|
3037
3067
|
if (map2) {
|
|
3038
3068
|
map2.forEach((_, k) => {
|
|
@@ -3048,7 +3078,12 @@ var DeepMap = class {
|
|
|
3048
3078
|
getArray(fn) {
|
|
3049
3079
|
const result = [];
|
|
3050
3080
|
this.visit((pair, keys) => {
|
|
3051
|
-
|
|
3081
|
+
const res = fn(__spreadProps(__spreadValues({}, pair), { keys }));
|
|
3082
|
+
if (keys.length === 0) {
|
|
3083
|
+
result.splice(0, 0, res);
|
|
3084
|
+
} else {
|
|
3085
|
+
result.push(res);
|
|
3086
|
+
}
|
|
3052
3087
|
});
|
|
3053
3088
|
return result;
|
|
3054
3089
|
}
|
|
@@ -3134,7 +3169,7 @@ function lazyGroup(groupParams, rootData) {
|
|
|
3134
3169
|
} = groupParams;
|
|
3135
3170
|
const deepMap = new DeepMap();
|
|
3136
3171
|
function traverseValues(pivotDeepMap, container, pivot2, pivotIndex = 0, currentPivotKeys2 = []) {
|
|
3137
|
-
const last = pivotIndex === pivot2.length - 1;
|
|
3172
|
+
const last = !pivot2.length || pivotIndex === pivot2.length - 1;
|
|
3138
3173
|
const values = container[(mappings == null ? void 0 : mappings.values) || "values"] || {};
|
|
3139
3174
|
for (var k in values)
|
|
3140
3175
|
if (values.hasOwnProperty(k)) {
|
|
@@ -3158,7 +3193,7 @@ function lazyGroup(groupParams, rootData) {
|
|
|
3158
3193
|
rootData.visitDepthFirst((lazyGroupRowInfo, keys, _index, next) => {
|
|
3159
3194
|
const [_rootKey, ...currentGroupKeys] = keys;
|
|
3160
3195
|
const dataArray = lazyGroupRowInfo.items;
|
|
3161
|
-
if (currentGroupKeys.length == groupBy.length) {
|
|
3196
|
+
if (currentGroupKeys.length == groupBy.length && groupBy.length) {
|
|
3162
3197
|
const deepMapGroupValue = deepMap.get(currentGroupKeys);
|
|
3163
3198
|
if (deepMapGroupValue) {
|
|
3164
3199
|
deepMapGroupValue.items = dataArray;
|
|
@@ -3180,9 +3215,11 @@ function lazyGroup(groupParams, rootData) {
|
|
|
3180
3215
|
const dataObject = dataArray[i].data;
|
|
3181
3216
|
const dataKeys = dataArray[i].keys;
|
|
3182
3217
|
let item = dataObject;
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3218
|
+
if (dataKeys.length) {
|
|
3219
|
+
const { field: groupByProperty } = groupBy[dataKeys.length - 1];
|
|
3220
|
+
const key = item[groupByProperty];
|
|
3221
|
+
currentGroupKeys.push(key);
|
|
3222
|
+
}
|
|
3186
3223
|
const deepMapGroupValue = {
|
|
3187
3224
|
items: [],
|
|
3188
3225
|
commonData: dataObject,
|
|
@@ -3194,7 +3231,9 @@ function lazyGroup(groupParams, rootData) {
|
|
|
3194
3231
|
const pivotContainer = dataArray[i].pivot;
|
|
3195
3232
|
traverseValues(pivotDeepMap, pivotContainer, pivot, 0, currentPivotKeys);
|
|
3196
3233
|
}
|
|
3197
|
-
|
|
3234
|
+
if (dataKeys.length) {
|
|
3235
|
+
currentGroupKeys.pop();
|
|
3236
|
+
}
|
|
3198
3237
|
}
|
|
3199
3238
|
next == null ? void 0 : next();
|
|
3200
3239
|
});
|
|
@@ -3210,6 +3249,37 @@ function lazyGroup(groupParams, rootData) {
|
|
|
3210
3249
|
}
|
|
3211
3250
|
return result;
|
|
3212
3251
|
}
|
|
3252
|
+
function processGroup(deepMap, currentGroupKeys, currentPivotKeys, item, pivot, reducers, topLevelPivotColumns, initialReducerValue, defaultToKey = DEFAULT_TO_KEY) {
|
|
3253
|
+
const {
|
|
3254
|
+
items: currentGroupItems,
|
|
3255
|
+
reducerResults,
|
|
3256
|
+
pivotDeepMap
|
|
3257
|
+
} = deepMap.get(currentGroupKeys);
|
|
3258
|
+
currentGroupItems.push(item);
|
|
3259
|
+
if (reducers) {
|
|
3260
|
+
computeReducersFor(item, reducers, reducerResults);
|
|
3261
|
+
}
|
|
3262
|
+
if (pivot) {
|
|
3263
|
+
for (let pivotIndex = 0, pivotLength = pivot.length; pivotIndex < pivotLength; pivotIndex++) {
|
|
3264
|
+
const { field: pivotField, toKey: pivotToKey } = pivot[pivotIndex];
|
|
3265
|
+
const pivotKey = (pivotToKey || defaultToKey)(item[pivotField], item);
|
|
3266
|
+
currentPivotKeys.push(pivotKey);
|
|
3267
|
+
if (!pivotDeepMap.has(currentPivotKeys)) {
|
|
3268
|
+
topLevelPivotColumns.set(currentPivotKeys, true);
|
|
3269
|
+
pivotDeepMap == null ? void 0 : pivotDeepMap.set(currentPivotKeys, {
|
|
3270
|
+
reducerResults: __spreadValues({}, initialReducerValue),
|
|
3271
|
+
items: []
|
|
3272
|
+
});
|
|
3273
|
+
}
|
|
3274
|
+
const { reducerResults: pivotReducerResults, items: pivotGroupItems } = pivotDeepMap.get(currentPivotKeys);
|
|
3275
|
+
pivotGroupItems.push(item);
|
|
3276
|
+
if (reducers) {
|
|
3277
|
+
computeReducersFor(item, reducers, pivotReducerResults);
|
|
3278
|
+
}
|
|
3279
|
+
}
|
|
3280
|
+
currentPivotKeys.length = 0;
|
|
3281
|
+
}
|
|
3282
|
+
}
|
|
3213
3283
|
function group(groupParams, data) {
|
|
3214
3284
|
const {
|
|
3215
3285
|
groupBy,
|
|
@@ -3224,6 +3294,16 @@ function group(groupParams, data) {
|
|
|
3224
3294
|
let currentPivotKeys = [];
|
|
3225
3295
|
const initialReducerValue = initReducers(reducers);
|
|
3226
3296
|
const globalReducerResults = __spreadValues({}, initialReducerValue);
|
|
3297
|
+
if (!groupByLength) {
|
|
3298
|
+
const deepMapGroupValue = {
|
|
3299
|
+
items: [],
|
|
3300
|
+
reducerResults: __spreadValues({}, initialReducerValue)
|
|
3301
|
+
};
|
|
3302
|
+
if (pivot) {
|
|
3303
|
+
deepMapGroupValue.pivotDeepMap = new DeepMap();
|
|
3304
|
+
}
|
|
3305
|
+
deepMap.set(currentGroupKeys, deepMapGroupValue);
|
|
3306
|
+
}
|
|
3227
3307
|
for (let i = 0, len = data.length; i < len; i++) {
|
|
3228
3308
|
let item = data[i];
|
|
3229
3309
|
for (let groupByIndex = 0; groupByIndex < groupByLength; groupByIndex++) {
|
|
@@ -3240,38 +3320,10 @@ function group(groupParams, data) {
|
|
|
3240
3320
|
}
|
|
3241
3321
|
deepMap.set(currentGroupKeys, deepMapGroupValue);
|
|
3242
3322
|
}
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
} = deepMap.get(currentGroupKeys);
|
|
3248
|
-
currentGroupItems.push(item);
|
|
3249
|
-
if (reducers) {
|
|
3250
|
-
computeReducersFor(item, reducers, reducerResults);
|
|
3251
|
-
}
|
|
3252
|
-
if (pivot) {
|
|
3253
|
-
for (let pivotIndex = 0, pivotLength = pivot.length; pivotIndex < pivotLength; pivotIndex++) {
|
|
3254
|
-
const { field: pivotField, toKey: pivotToKey } = pivot[pivotIndex];
|
|
3255
|
-
const pivotKey = (pivotToKey || defaultToKey)(item[pivotField], item);
|
|
3256
|
-
currentPivotKeys.push(pivotKey);
|
|
3257
|
-
if (!pivotDeepMap.has(currentPivotKeys)) {
|
|
3258
|
-
topLevelPivotColumns.set(currentPivotKeys, true);
|
|
3259
|
-
pivotDeepMap == null ? void 0 : pivotDeepMap.set(currentPivotKeys, {
|
|
3260
|
-
reducerResults: __spreadValues({}, initialReducerValue),
|
|
3261
|
-
items: []
|
|
3262
|
-
});
|
|
3263
|
-
}
|
|
3264
|
-
const {
|
|
3265
|
-
reducerResults: pivotReducerResults,
|
|
3266
|
-
items: pivotGroupItems
|
|
3267
|
-
} = pivotDeepMap.get(currentPivotKeys);
|
|
3268
|
-
pivotGroupItems.push(item);
|
|
3269
|
-
if (reducers) {
|
|
3270
|
-
computeReducersFor(item, reducers, pivotReducerResults);
|
|
3271
|
-
}
|
|
3272
|
-
}
|
|
3273
|
-
currentPivotKeys.length = 0;
|
|
3274
|
-
}
|
|
3323
|
+
processGroup(deepMap, currentGroupKeys, currentPivotKeys, item, pivot, reducers, topLevelPivotColumns, initialReducerValue, defaultToKey);
|
|
3324
|
+
}
|
|
3325
|
+
if (!groupByLength) {
|
|
3326
|
+
processGroup(deepMap, currentGroupKeys, currentPivotKeys, item, pivot, reducers, topLevelPivotColumns, initialReducerValue, defaultToKey);
|
|
3275
3327
|
}
|
|
3276
3328
|
if (reducers) {
|
|
3277
3329
|
computeReducersFor(item, reducers, globalReducerResults);
|
|
@@ -3515,7 +3567,7 @@ function buildDataSourceDataParams(componentState, overrides) {
|
|
|
3515
3567
|
};
|
|
3516
3568
|
if (componentState.livePagination !== void 0) {
|
|
3517
3569
|
dataSourceParams.livePaginationCursor = componentState.livePaginationCursor;
|
|
3518
|
-
dataSourceParams.
|
|
3570
|
+
dataSourceParams.__cursorId = componentState.cursorId;
|
|
3519
3571
|
}
|
|
3520
3572
|
if (componentState.lazyLoad) {
|
|
3521
3573
|
if (componentState.lazyLoadBatchSize != null && componentState.lazyLoadBatchSize > 0) {
|
|
@@ -3546,7 +3598,7 @@ function loadData(data, componentState, actions, overrides) {
|
|
|
3546
3598
|
const lazyGroupData = componentState.originalLazyGroupData;
|
|
3547
3599
|
const key = [LAZY_ROOT_KEY_FOR_GROUPS, ...dataParams.groupKeys || []];
|
|
3548
3600
|
const existingGroupRowInfo = lazyGroupData.get(key);
|
|
3549
|
-
if (existingGroupRowInfo && existingGroupRowInfo.cache) {
|
|
3601
|
+
if (existingGroupRowInfo && existingGroupRowInfo.cache && key.length > 1) {
|
|
3550
3602
|
const items = existingGroupRowInfo.items;
|
|
3551
3603
|
const len = items.length;
|
|
3552
3604
|
let allLoaded = true;
|
|
@@ -3705,7 +3757,8 @@ function useLoadData() {
|
|
|
3705
3757
|
const componentState2 = getComponentState();
|
|
3706
3758
|
if (initialRef.current) {
|
|
3707
3759
|
initialRef.current = false;
|
|
3708
|
-
|
|
3760
|
+
const dataParams = buildDataSourceDataParams(componentState2);
|
|
3761
|
+
actions.dataParams = dataParams;
|
|
3709
3762
|
}
|
|
3710
3763
|
}, depsObject);
|
|
3711
3764
|
}
|
|
@@ -3718,7 +3771,6 @@ function useLazyLoadRange() {
|
|
|
3718
3771
|
const loadingCache = useMemo4(() => {
|
|
3719
3772
|
return new Map();
|
|
3720
3773
|
}, [componentState.data]);
|
|
3721
|
-
globalThis.loadingCache = loadingCache;
|
|
3722
3774
|
const {
|
|
3723
3775
|
lazyLoadBatchSize,
|
|
3724
3776
|
notifyRenderRangeChange,
|
|
@@ -4160,7 +4212,7 @@ function getInterceptActions() {
|
|
|
4160
4212
|
},
|
|
4161
4213
|
cursorId: (cursorId, { actions, state }) => {
|
|
4162
4214
|
const dataParams = buildDataSourceDataParams(state, {
|
|
4163
|
-
cursorId
|
|
4215
|
+
__cursorId: cursorId
|
|
4164
4216
|
});
|
|
4165
4217
|
actions.dataParams = dataParams;
|
|
4166
4218
|
},
|
|
@@ -4330,7 +4382,7 @@ function getPivotColumnsAndColumnGroups({
|
|
|
4330
4382
|
next == null ? void 0 : next();
|
|
4331
4383
|
}
|
|
4332
4384
|
});
|
|
4333
|
-
if (
|
|
4385
|
+
if (!pivotLength) {
|
|
4334
4386
|
aggregationReducers.forEach((reducer, index) => {
|
|
4335
4387
|
columns.set(`total:${reducer.id}`, prepareColumn({
|
|
4336
4388
|
header: `${reducer.name || reducer.id} total`,
|
|
@@ -4503,7 +4555,7 @@ function DataSourceWithContext(props) {
|
|
|
4503
4555
|
if (typeof children === "function") {
|
|
4504
4556
|
children = children(computedValues);
|
|
4505
4557
|
}
|
|
4506
|
-
return /* @__PURE__ */
|
|
4558
|
+
return /* @__PURE__ */ createElement6(Fragment2, null, children);
|
|
4507
4559
|
}
|
|
4508
4560
|
var DataSourceRoot = getComponentStateRoot({
|
|
4509
4561
|
initSetupState: initSetupState2,
|
|
@@ -4526,14 +4578,14 @@ function DataSourceCmp({ children }) {
|
|
|
4526
4578
|
globalThis.getDataSourceState = getState;
|
|
4527
4579
|
}
|
|
4528
4580
|
useLoadData();
|
|
4529
|
-
return /* @__PURE__ */
|
|
4581
|
+
return /* @__PURE__ */ createElement6(DataSourceContext.Provider, {
|
|
4530
4582
|
value: contextValue
|
|
4531
|
-
}, /* @__PURE__ */
|
|
4583
|
+
}, /* @__PURE__ */ createElement6(DataSourceWithContext, {
|
|
4532
4584
|
children
|
|
4533
4585
|
}));
|
|
4534
4586
|
}
|
|
4535
4587
|
function DataSource(props) {
|
|
4536
|
-
return /* @__PURE__ */
|
|
4588
|
+
return /* @__PURE__ */ createElement6(DataSourceRoot, __spreadValues({}, props), /* @__PURE__ */ createElement6(DataSourceCmp, {
|
|
4537
4589
|
children: props.children
|
|
4538
4590
|
}));
|
|
4539
4591
|
}
|
|
@@ -4862,7 +4914,7 @@ function getColumnsWhenGrouping(params) {
|
|
|
4862
4914
|
}, toggleGroupRow, groupColumn);
|
|
4863
4915
|
computedColumns.set(generatedGroupColumn.id || `group-by-${groupByForColumn.field}`, generatedGroupColumn);
|
|
4864
4916
|
});
|
|
4865
|
-
} else if (groupRenderStrategy === "single-column") {
|
|
4917
|
+
} else if (groupRenderStrategy === "single-column" && groupBy.length) {
|
|
4866
4918
|
const singleGroupColumn = getSingleGroupColumn({
|
|
4867
4919
|
groupCount: groupBy.length,
|
|
4868
4920
|
groupBy,
|
|
@@ -5071,7 +5123,7 @@ function useComputed() {
|
|
|
5071
5123
|
|
|
5072
5124
|
// src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
|
|
5073
5125
|
import {
|
|
5074
|
-
createElement as
|
|
5126
|
+
createElement as createElement7,
|
|
5075
5127
|
forwardRef
|
|
5076
5128
|
} from "react";
|
|
5077
5129
|
|
|
@@ -5083,7 +5135,7 @@ var useInternalProps = () => {
|
|
|
5083
5135
|
// src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
|
|
5084
5136
|
var InfiniteTableBody = forwardRef(function InfiniteTableBody2(props, ref) {
|
|
5085
5137
|
const { rootClassName: rootClassName12 } = useInternalProps();
|
|
5086
|
-
return /* @__PURE__ */
|
|
5138
|
+
return /* @__PURE__ */ createElement7("div", __spreadProps(__spreadValues({
|
|
5087
5139
|
ref
|
|
5088
5140
|
}, props), {
|
|
5089
5141
|
className: join(`${rootClassName12}Body`, position.relative, flex["1"], transformTranslateZero, props.className)
|
|
@@ -5092,12 +5144,12 @@ var InfiniteTableBody = forwardRef(function InfiniteTableBody2(props, ref) {
|
|
|
5092
5144
|
|
|
5093
5145
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx
|
|
5094
5146
|
import {
|
|
5095
|
-
createElement as
|
|
5147
|
+
createElement as createElement19
|
|
5096
5148
|
} from "react";
|
|
5097
5149
|
|
|
5098
5150
|
// src/components/InfiniteTable/components/ScrollbarPlaceholder.tsx
|
|
5099
5151
|
import {
|
|
5100
|
-
createElement as
|
|
5152
|
+
createElement as createElement8,
|
|
5101
5153
|
memo as memo2
|
|
5102
5154
|
} from "react";
|
|
5103
5155
|
function HorizontalScrollbarPlaceholderFn(props) {
|
|
@@ -5105,7 +5157,7 @@ function HorizontalScrollbarPlaceholderFn(props) {
|
|
|
5105
5157
|
if (!scrollbarWidth2) {
|
|
5106
5158
|
return null;
|
|
5107
5159
|
}
|
|
5108
|
-
return /* @__PURE__ */
|
|
5160
|
+
return /* @__PURE__ */ createElement8("div", {
|
|
5109
5161
|
"data-name": "horizontal-scrollbar-placeholder",
|
|
5110
5162
|
style: __spreadValues({
|
|
5111
5163
|
position: "absolute",
|
|
@@ -5121,7 +5173,7 @@ function VerticalScrollbarPlaceholderFn(props) {
|
|
|
5121
5173
|
if (!scrollbarWidth2) {
|
|
5122
5174
|
return null;
|
|
5123
5175
|
}
|
|
5124
|
-
return /* @__PURE__ */
|
|
5176
|
+
return /* @__PURE__ */ createElement8("div", {
|
|
5125
5177
|
"data-name": "vertical-scrollbar-placeholder",
|
|
5126
5178
|
style: __spreadValues({
|
|
5127
5179
|
position: "absolute",
|
|
@@ -5147,21 +5199,22 @@ var HeaderWrapperCls = "_12zfob1v _16lm1iw16 _16lm1iw1 _16lm1iwj _16lm1iw10";
|
|
|
5147
5199
|
|
|
5148
5200
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
|
|
5149
5201
|
import {
|
|
5150
|
-
createElement as
|
|
5202
|
+
createElement as createElement15,
|
|
5151
5203
|
memo as memo6
|
|
5152
5204
|
} from "react";
|
|
5153
5205
|
import { useCallback as useCallback8, useEffect as useEffect14, useRef as useRef9 } from "react";
|
|
5154
5206
|
|
|
5155
5207
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
|
|
5156
5208
|
import {
|
|
5157
|
-
|
|
5158
|
-
createElement as
|
|
5209
|
+
createContext as createContext4,
|
|
5210
|
+
createElement as createElement11
|
|
5159
5211
|
} from "react";
|
|
5160
|
-
import { useCallback as useCallback7, useEffect as useEffect12, useRef as useRef8 } from "react";
|
|
5212
|
+
import { useCallback as useCallback7, useContext as useContext5, useEffect as useEffect12, useRef as useRef8 } from "react";
|
|
5161
5213
|
|
|
5162
5214
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCell.tsx
|
|
5163
5215
|
import {
|
|
5164
|
-
|
|
5216
|
+
Fragment as Fragment3,
|
|
5217
|
+
createElement as createElement9,
|
|
5165
5218
|
memo as memo3
|
|
5166
5219
|
} from "react";
|
|
5167
5220
|
|
|
@@ -5185,7 +5238,7 @@ var { rootClassName: rootClassName2 } = internalProps;
|
|
|
5185
5238
|
var InfiniteTableCellClassName = `${rootClassName2}Cell`;
|
|
5186
5239
|
var InfiniteTableCellContentClassName = `${rootClassName2}Cell_content`;
|
|
5187
5240
|
function InfiniteTableCellFn(props) {
|
|
5188
|
-
var _b, _c;
|
|
5241
|
+
var _b, _c, _d, _e;
|
|
5189
5242
|
const _a = props, {
|
|
5190
5243
|
cssEllipsis = true,
|
|
5191
5244
|
virtualized = true,
|
|
@@ -5193,10 +5246,12 @@ function InfiniteTableCellFn(props) {
|
|
|
5193
5246
|
offsetProperty = "left",
|
|
5194
5247
|
column,
|
|
5195
5248
|
domRef,
|
|
5196
|
-
children,
|
|
5197
5249
|
afterChildren,
|
|
5198
5250
|
beforeChildren,
|
|
5199
|
-
offset
|
|
5251
|
+
offset,
|
|
5252
|
+
cellType,
|
|
5253
|
+
cssPosition: _cssPosition,
|
|
5254
|
+
renderChildren
|
|
5200
5255
|
} = _a, domProps = __objRest(_a, [
|
|
5201
5256
|
"cssEllipsis",
|
|
5202
5257
|
"virtualized",
|
|
@@ -5204,11 +5259,14 @@ function InfiniteTableCellFn(props) {
|
|
|
5204
5259
|
"offsetProperty",
|
|
5205
5260
|
"column",
|
|
5206
5261
|
"domRef",
|
|
5207
|
-
"children",
|
|
5208
5262
|
"afterChildren",
|
|
5209
5263
|
"beforeChildren",
|
|
5210
|
-
"offset"
|
|
5264
|
+
"offset",
|
|
5265
|
+
"cellType",
|
|
5266
|
+
"cssPosition",
|
|
5267
|
+
"renderChildren"
|
|
5211
5268
|
]);
|
|
5269
|
+
const children = renderChildren();
|
|
5212
5270
|
const { columnShifts } = useInfiniteTableState();
|
|
5213
5271
|
const shifting = !!columnShifts;
|
|
5214
5272
|
const style = __spreadValues({
|
|
@@ -5223,14 +5281,21 @@ function InfiniteTableCellFn(props) {
|
|
|
5223
5281
|
style.transform = `translate3d(${shiftLeft}px, 0px, 0px)`;
|
|
5224
5282
|
}
|
|
5225
5283
|
}
|
|
5226
|
-
|
|
5227
|
-
ref: domRef,
|
|
5284
|
+
const finalDOMProps = __spreadProps(__spreadValues({}, domProps), {
|
|
5228
5285
|
style,
|
|
5229
|
-
"data-name":
|
|
5230
|
-
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}` : "")
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5286
|
+
"data-name": "Cell",
|
|
5287
|
+
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__ */ createElement9(Fragment3, null, beforeChildren, /* @__PURE__ */ createElement9("div", {
|
|
5289
|
+
className: `${InfiniteTableCellContentClassName} ${cssEllipsis ? cssEllipsisClassName : overflow.hidden}`
|
|
5290
|
+
}, children), afterChildren)
|
|
5291
|
+
});
|
|
5292
|
+
const RenderComponent = cellType === "body" ? (_d = column.components) == null ? void 0 : _d.ColumnCell : (_e = column.components) == null ? void 0 : _e.HeaderCell;
|
|
5293
|
+
if (RenderComponent) {
|
|
5294
|
+
return /* @__PURE__ */ createElement9(RenderComponent, __spreadValues({}, finalDOMProps));
|
|
5295
|
+
}
|
|
5296
|
+
return /* @__PURE__ */ createElement9("div", __spreadProps(__spreadValues({}, finalDOMProps), {
|
|
5297
|
+
ref: domRef
|
|
5298
|
+
}));
|
|
5234
5299
|
}
|
|
5235
5300
|
var InfiniteTableCell = memo3(InfiniteTableCellFn);
|
|
5236
5301
|
|
|
@@ -5433,7 +5498,7 @@ import { createPortal } from "react-dom";
|
|
|
5433
5498
|
|
|
5434
5499
|
// src/components/InfiniteTable/components/icons/SortIcon.tsx
|
|
5435
5500
|
import {
|
|
5436
|
-
createElement as
|
|
5501
|
+
createElement as createElement10
|
|
5437
5502
|
} from "react";
|
|
5438
5503
|
import { useEffect as useEffect11, useState as useState7 } from "react";
|
|
5439
5504
|
var defaultLineStyle = {
|
|
@@ -5489,23 +5554,24 @@ function SortIcon(props) {
|
|
|
5489
5554
|
if (direction === -1) {
|
|
5490
5555
|
indexStyle.top = "100%";
|
|
5491
5556
|
}
|
|
5492
|
-
return /* @__PURE__ */
|
|
5557
|
+
return /* @__PURE__ */ createElement10("div", {
|
|
5493
5558
|
style: __spreadProps(__spreadValues({}, style), { width: size }),
|
|
5494
5559
|
className: join(className, InfiniteTableIconClassName, `${InfiniteTableIconClassName}-sort`)
|
|
5495
|
-
}, showIndex ? /* @__PURE__ */
|
|
5560
|
+
}, showIndex ? /* @__PURE__ */ createElement10("div", {
|
|
5496
5561
|
"data-name": "index",
|
|
5497
5562
|
style: indexStyle
|
|
5498
|
-
}, index) : null, /* @__PURE__ */
|
|
5563
|
+
}, index) : null, /* @__PURE__ */ createElement10("div", {
|
|
5499
5564
|
style: __spreadValues({ width: sizes[0] }, lineStyle),
|
|
5500
5565
|
onTransitionEnd
|
|
5501
|
-
}), /* @__PURE__ */
|
|
5566
|
+
}), /* @__PURE__ */ createElement10("div", {
|
|
5502
5567
|
style: __spreadValues({ width: sizes[1] }, lineStyle)
|
|
5503
|
-
}), /* @__PURE__ */
|
|
5568
|
+
}), /* @__PURE__ */ createElement10("div", {
|
|
5504
5569
|
style: __spreadValues({ width: sizes[2] }, lineStyle)
|
|
5505
5570
|
}));
|
|
5506
5571
|
}
|
|
5507
5572
|
|
|
5508
5573
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
|
|
5574
|
+
var InfiniteTableHeaderCellContext = createContext4(null);
|
|
5509
5575
|
var defaultStyle = {
|
|
5510
5576
|
position: "absolute",
|
|
5511
5577
|
top: 0
|
|
@@ -5524,24 +5590,33 @@ function InfiniteTableHeaderCell(props) {
|
|
|
5524
5590
|
}
|
|
5525
5591
|
const sortInfo = column.computedSortInfo;
|
|
5526
5592
|
let header = column.header;
|
|
5527
|
-
if (header instanceof Function) {
|
|
5528
|
-
header = header({
|
|
5529
|
-
column,
|
|
5530
|
-
columnSortInfo: sortInfo
|
|
5531
|
-
});
|
|
5532
|
-
}
|
|
5533
|
-
header = header != null ? header : column.name;
|
|
5534
|
-
const sortTool = /* @__PURE__ */ createElement10(SortIcon, {
|
|
5535
|
-
index: column.computedMultiSort ? column.computedSortIndex + 1 : void 0,
|
|
5536
|
-
className: `${InfiniteTableHeaderCellClassName}__sort-icon ${HeaderSortIconCls}`,
|
|
5537
|
-
direction: column.computedSorted ? column.computedSortedAsc ? 1 : -1 : 0
|
|
5538
|
-
});
|
|
5539
|
-
const domRef = useRef8(null);
|
|
5540
5593
|
const ref = useCallback7((node) => {
|
|
5541
5594
|
var _a2;
|
|
5542
5595
|
domRef.current = node;
|
|
5543
5596
|
(_a2 = props.domRef) == null ? void 0 : _a2.call(props, node);
|
|
5544
5597
|
}, [props.domRef]);
|
|
5598
|
+
const sortTool = /* @__PURE__ */ createElement11(SortIcon, {
|
|
5599
|
+
index: column.computedMultiSort ? column.computedSortIndex + 1 : void 0,
|
|
5600
|
+
className: `${InfiniteTableHeaderCellClassName}__sort-icon ${HeaderSortIconCls}`,
|
|
5601
|
+
direction: column.computedSorted ? column.computedSortedAsc ? 1 : -1 : 0
|
|
5602
|
+
});
|
|
5603
|
+
const renderParam = {
|
|
5604
|
+
domRef: ref,
|
|
5605
|
+
column,
|
|
5606
|
+
columnSortInfo: sortInfo,
|
|
5607
|
+
sortTool
|
|
5608
|
+
};
|
|
5609
|
+
const renderChildren = () => {
|
|
5610
|
+
if (header instanceof Function) {
|
|
5611
|
+
header = /* @__PURE__ */ createElement11(RenderHookComponent, {
|
|
5612
|
+
render: header,
|
|
5613
|
+
renderParam
|
|
5614
|
+
});
|
|
5615
|
+
}
|
|
5616
|
+
header = header != null ? header : column.name;
|
|
5617
|
+
return header;
|
|
5618
|
+
};
|
|
5619
|
+
const domRef = useRef8(null);
|
|
5545
5620
|
const {
|
|
5546
5621
|
computed: { computedRemainingSpace },
|
|
5547
5622
|
componentState: { portalDOMRef }
|
|
@@ -5569,7 +5644,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
5569
5644
|
let offset = offsetFromProps != null ? offsetFromProps : virtualized ? 0 : column.computedPinningOffset;
|
|
5570
5645
|
let draggingProxy = null;
|
|
5571
5646
|
if (dragging) {
|
|
5572
|
-
draggingProxy = /* @__PURE__ */
|
|
5647
|
+
draggingProxy = /* @__PURE__ */ createElement11("div", {
|
|
5573
5648
|
className: `${InfiniteTableHeaderCellClassName}Proxy ${HeaderCellProxy}`,
|
|
5574
5649
|
style: {
|
|
5575
5650
|
position: "absolute",
|
|
@@ -5582,8 +5657,12 @@ function InfiniteTableHeaderCell(props) {
|
|
|
5582
5657
|
}, header);
|
|
5583
5658
|
draggingProxy = createPortal(draggingProxy, portalDOMRef.current);
|
|
5584
5659
|
}
|
|
5585
|
-
|
|
5660
|
+
const ContextProvider = InfiniteTableHeaderCellContext.Provider;
|
|
5661
|
+
return /* @__PURE__ */ createElement11(ContextProvider, {
|
|
5662
|
+
value: renderParam
|
|
5663
|
+
}, /* @__PURE__ */ createElement11(InfiniteTableCell, {
|
|
5586
5664
|
domRef: ref,
|
|
5665
|
+
cellType: "header",
|
|
5587
5666
|
column,
|
|
5588
5667
|
"data-name": `HeaderCell`,
|
|
5589
5668
|
"data-column-id": column.id,
|
|
@@ -5593,21 +5672,26 @@ function InfiniteTableHeaderCell(props) {
|
|
|
5593
5672
|
onPointerUp,
|
|
5594
5673
|
className: join(InfiniteTableHeaderCellClassName, userSelect.none, column.computedSortable ? cursor.pointer : "", useCellClassName(column, [InfiniteTableHeaderCellClassName, InfiniteTableCellClassName], HeaderCellRecipe, { dragging }), CellCls),
|
|
5595
5674
|
cssEllipsis: (_d = (_c = column.headerCssEllipsis) != null ? _c : column.cssEllipsis) != null ? _d : true,
|
|
5596
|
-
afterChildren: sortTool
|
|
5597
|
-
|
|
5675
|
+
afterChildren: sortTool,
|
|
5676
|
+
renderChildren
|
|
5677
|
+
}), draggingProxy);
|
|
5678
|
+
}
|
|
5679
|
+
function useInfiniteHeaderCell() {
|
|
5680
|
+
const result = useContext5(InfiniteTableHeaderCellContext);
|
|
5681
|
+
return result;
|
|
5598
5682
|
}
|
|
5599
5683
|
|
|
5600
5684
|
// src/components/RawList/index.tsx
|
|
5601
5685
|
import {
|
|
5602
|
-
createElement as
|
|
5686
|
+
createElement as createElement14,
|
|
5603
5687
|
memo as memo5
|
|
5604
5688
|
} from "react";
|
|
5605
5689
|
import { useEffect as useEffect13 } from "react";
|
|
5606
5690
|
|
|
5607
5691
|
// src/components/RawList/AvoidReactDiff.tsx
|
|
5608
5692
|
import {
|
|
5609
|
-
Fragment as
|
|
5610
|
-
createElement as
|
|
5693
|
+
Fragment as Fragment4,
|
|
5694
|
+
createElement as createElement12,
|
|
5611
5695
|
memo as memo4
|
|
5612
5696
|
} from "react";
|
|
5613
5697
|
import { useLayoutEffect as useLayoutEffect3, useState as useState8 } from "react";
|
|
@@ -5619,7 +5703,7 @@ function AvoidReactDiffFn(props) {
|
|
|
5619
5703
|
});
|
|
5620
5704
|
return remove;
|
|
5621
5705
|
}, [props.updater]);
|
|
5622
|
-
return /* @__PURE__ */
|
|
5706
|
+
return /* @__PURE__ */ createElement12(Fragment4, null, children);
|
|
5623
5707
|
}
|
|
5624
5708
|
var AvoidReactDiff = memo4(AvoidReactDiffFn);
|
|
5625
5709
|
|
|
@@ -5628,7 +5712,7 @@ import { useMemo as useMemo8 } from "react";
|
|
|
5628
5712
|
|
|
5629
5713
|
// src/components/RawList/ReactVirtualRenderer.tsx
|
|
5630
5714
|
import {
|
|
5631
|
-
createElement as
|
|
5715
|
+
createElement as createElement13
|
|
5632
5716
|
} from "react";
|
|
5633
5717
|
|
|
5634
5718
|
// src/components/RawList/MappedItems.ts
|
|
@@ -5874,7 +5958,7 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
5874
5958
|
};
|
|
5875
5959
|
this.itemDOMRefs[elementIndex] = domRef;
|
|
5876
5960
|
this.updaters[elementIndex] = buildSubscriptionCallback();
|
|
5877
|
-
const item = /* @__PURE__ */
|
|
5961
|
+
const item = /* @__PURE__ */ createElement13(AvoidReactDiff, {
|
|
5878
5962
|
key: elementIndex,
|
|
5879
5963
|
name: `${elementIndex}`,
|
|
5880
5964
|
updater: this.updaters[elementIndex]
|
|
@@ -5971,7 +6055,7 @@ function RawListFn(props) {
|
|
|
5971
6055
|
});
|
|
5972
6056
|
return remove;
|
|
5973
6057
|
}, [brain, onRenderUpdater]);
|
|
5974
|
-
return /* @__PURE__ */
|
|
6058
|
+
return /* @__PURE__ */ createElement14(AvoidReactDiff, {
|
|
5975
6059
|
updater: onRenderUpdater
|
|
5976
6060
|
});
|
|
5977
6061
|
}
|
|
@@ -5996,7 +6080,7 @@ function InfiniteTableHeaderFn(props) {
|
|
|
5996
6080
|
}
|
|
5997
6081
|
return null;
|
|
5998
6082
|
}
|
|
5999
|
-
return /* @__PURE__ */
|
|
6083
|
+
return /* @__PURE__ */ createElement15(InfiniteTableHeaderCell, {
|
|
6000
6084
|
domRef: domRef2,
|
|
6001
6085
|
column,
|
|
6002
6086
|
headerHeight,
|
|
@@ -6023,7 +6107,7 @@ function InfiniteTableHeaderFn(props) {
|
|
|
6023
6107
|
className: join(TableHeaderClassName, `${TableHeaderClassName}--virtualized`, className, headerCls),
|
|
6024
6108
|
style
|
|
6025
6109
|
};
|
|
6026
|
-
return /* @__PURE__ */
|
|
6110
|
+
return /* @__PURE__ */ createElement15("div", __spreadValues({}, domProps), /* @__PURE__ */ createElement15(RawList, {
|
|
6027
6111
|
brain,
|
|
6028
6112
|
renderItem: renderColumn
|
|
6029
6113
|
}));
|
|
@@ -6032,7 +6116,7 @@ var InfiniteTableHeader = memo6(InfiniteTableHeaderFn);
|
|
|
6032
6116
|
|
|
6033
6117
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderUnvirtualized.tsx
|
|
6034
6118
|
import {
|
|
6035
|
-
createElement as
|
|
6119
|
+
createElement as createElement18,
|
|
6036
6120
|
memo as memo7,
|
|
6037
6121
|
useMemo as useMemo9,
|
|
6038
6122
|
useRef as useRef10
|
|
@@ -6040,7 +6124,7 @@ import {
|
|
|
6040
6124
|
|
|
6041
6125
|
// src/components/InfiniteTable/components/InfiniteTableHeader/renderColumnHeaderGroups.tsx
|
|
6042
6126
|
import {
|
|
6043
|
-
createElement as
|
|
6127
|
+
createElement as createElement17
|
|
6044
6128
|
} from "react";
|
|
6045
6129
|
|
|
6046
6130
|
// src/components/InfiniteTable/components/InfiniteTableHeader/buildColumnAndGroupTree.ts
|
|
@@ -6132,7 +6216,7 @@ function assignGroupOffsetsAndComputedWidths(items, groupOffset = 0) {
|
|
|
6132
6216
|
|
|
6133
6217
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
|
|
6134
6218
|
import {
|
|
6135
|
-
createElement as
|
|
6219
|
+
createElement as createElement16
|
|
6136
6220
|
} from "react";
|
|
6137
6221
|
var TableHeaderGroupClassName = `${rootClassName}HeaderGroup`;
|
|
6138
6222
|
function InfiniteTableHeaderGroup(props) {
|
|
@@ -6147,16 +6231,16 @@ function InfiniteTableHeaderGroup(props) {
|
|
|
6147
6231
|
width: columnGroup.computedWidth,
|
|
6148
6232
|
height
|
|
6149
6233
|
};
|
|
6150
|
-
return /* @__PURE__ */
|
|
6234
|
+
return /* @__PURE__ */ createElement16("div", {
|
|
6151
6235
|
"data-group-id": columnGroup.id,
|
|
6152
6236
|
className: join(HeaderGroupCls, TableHeaderGroupClassName, `${TableHeaderGroupClassName}--unvirtualized`),
|
|
6153
6237
|
style
|
|
6154
|
-
}, /* @__PURE__ */
|
|
6238
|
+
}, /* @__PURE__ */ createElement16("div", {
|
|
6155
6239
|
className: join(`${TableHeaderGroupClassName}__header`, HeaderGroup_Header),
|
|
6156
6240
|
style: { height: headerHeight }
|
|
6157
|
-
}, /* @__PURE__ */
|
|
6241
|
+
}, /* @__PURE__ */ createElement16("div", {
|
|
6158
6242
|
className: join(`${TableHeaderGroupClassName}__header-content`, cssEllipsisClassName)
|
|
6159
|
-
}, header)), /* @__PURE__ */
|
|
6243
|
+
}, header)), /* @__PURE__ */ createElement16("div", {
|
|
6160
6244
|
className: join(`${TableHeaderGroupClassName}__children`, HeaderGroup_Children)
|
|
6161
6245
|
}, props.children));
|
|
6162
6246
|
}
|
|
@@ -6179,7 +6263,7 @@ function renderColumnHeaderGroups(config) {
|
|
|
6179
6263
|
return items2.map((colGroupItem) => {
|
|
6180
6264
|
if (colGroupItem.type === "column") {
|
|
6181
6265
|
const col = colGroupItem.ref;
|
|
6182
|
-
return /* @__PURE__ */
|
|
6266
|
+
return /* @__PURE__ */ createElement17(InfiniteTableHeaderCell, {
|
|
6183
6267
|
key: col.id,
|
|
6184
6268
|
headerHeight: (columnGroupsMaxDepth - colGroupItem.depth + 2) * headerHeight,
|
|
6185
6269
|
column: col,
|
|
@@ -6193,7 +6277,7 @@ function renderColumnHeaderGroups(config) {
|
|
|
6193
6277
|
colIds.push(col.id);
|
|
6194
6278
|
return col;
|
|
6195
6279
|
});
|
|
6196
|
-
return /* @__PURE__ */
|
|
6280
|
+
return /* @__PURE__ */ createElement17(InfiniteTableHeaderGroup, {
|
|
6197
6281
|
key: `${colGroupItem.uniqueGroupId.join("/")}`,
|
|
6198
6282
|
columns: columns2,
|
|
6199
6283
|
height: (columnGroupsMaxDepth - colGroupItem.depth + 2) * headerHeight,
|
|
@@ -6267,7 +6351,7 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
|
|
|
6267
6351
|
columnGroupsMaxDepth
|
|
6268
6352
|
]);
|
|
6269
6353
|
const children = hasColumnGroups ? columnHeaderGroups : columns.map((c) => {
|
|
6270
|
-
return /* @__PURE__ */
|
|
6354
|
+
return /* @__PURE__ */ createElement18(InfiniteTableHeaderCell, {
|
|
6271
6355
|
key: c.id,
|
|
6272
6356
|
headerHeight,
|
|
6273
6357
|
column: c,
|
|
@@ -6292,14 +6376,14 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
|
|
|
6292
6376
|
const removeOnScroll = scroller.onScroll(onScroll);
|
|
6293
6377
|
return removeOnScroll;
|
|
6294
6378
|
}, [brain, scrollListener]);
|
|
6295
|
-
return /* @__PURE__ */
|
|
6379
|
+
return /* @__PURE__ */ createElement18("div", __spreadProps(__spreadValues({}, domProps), {
|
|
6296
6380
|
className: join(TableHeaderClassName2, `${TableHeaderClassName2}--unvirtualized`, pinning ? `${TableHeaderClassName2}--pinned ${TableHeaderClassName2}-${pinning}` : "", scrollable ? `${TableHeaderClassName2}--overflow` : "", domProps.className, HeaderClsRecipe({
|
|
6297
6381
|
pinned: pinning,
|
|
6298
6382
|
virtualized: false,
|
|
6299
6383
|
overflow: scrollable
|
|
6300
6384
|
})),
|
|
6301
6385
|
style
|
|
6302
|
-
}), /* @__PURE__ */
|
|
6386
|
+
}), /* @__PURE__ */ createElement18("div", {
|
|
6303
6387
|
style: { width: totalWidth },
|
|
6304
6388
|
className: join(flexFlow.row, display.flex),
|
|
6305
6389
|
ref: domRef
|
|
@@ -6338,7 +6422,7 @@ function TableHeaderWrapper(props) {
|
|
|
6338
6422
|
const unvirtualizedStyle = !virtualizeHeader && computedPinnedStartColumnsWidth ? {
|
|
6339
6423
|
left: computedPinnedStartWidth
|
|
6340
6424
|
} : void 0;
|
|
6341
|
-
const header = virtualizeHeader ? /* @__PURE__ */
|
|
6425
|
+
const header = virtualizeHeader ? /* @__PURE__ */ createElement19(InfiniteTableHeader, {
|
|
6342
6426
|
columns: computedUnpinnedColumns,
|
|
6343
6427
|
repaintId: virtualizeHeader ? repaintId : void 0,
|
|
6344
6428
|
brain,
|
|
@@ -6351,7 +6435,7 @@ function TableHeaderWrapper(props) {
|
|
|
6351
6435
|
},
|
|
6352
6436
|
availableWidth: computedUnpinnedColumnsWidth,
|
|
6353
6437
|
totalWidth: computedUnpinnedColumnsWidth
|
|
6354
|
-
}) : /* @__PURE__ */
|
|
6438
|
+
}) : /* @__PURE__ */ createElement19(InfiniteTableHeaderUnvirtualized, {
|
|
6355
6439
|
style: unvirtualizedStyle,
|
|
6356
6440
|
brain,
|
|
6357
6441
|
scrollable: true,
|
|
@@ -6360,12 +6444,12 @@ function TableHeaderWrapper(props) {
|
|
|
6360
6444
|
availableWidth: computedUnpinnedColumnsWidth,
|
|
6361
6445
|
totalWidth: computedUnpinnedColumnsWidth
|
|
6362
6446
|
});
|
|
6363
|
-
return /* @__PURE__ */
|
|
6447
|
+
return /* @__PURE__ */ createElement19("div", {
|
|
6364
6448
|
className: HeaderWrapperCls,
|
|
6365
6449
|
style: {
|
|
6366
6450
|
height: virtualizeHeader ? height : void 0
|
|
6367
6451
|
}
|
|
6368
|
-
}, hasPinnedStart ? /* @__PURE__ */
|
|
6452
|
+
}, hasPinnedStart ? /* @__PURE__ */ createElement19(InfiniteTableHeaderUnvirtualized, {
|
|
6369
6453
|
style: {
|
|
6370
6454
|
left: 0,
|
|
6371
6455
|
position: "absolute",
|
|
@@ -6377,7 +6461,7 @@ function TableHeaderWrapper(props) {
|
|
|
6377
6461
|
scrollable: computedPinnedStartOverflow,
|
|
6378
6462
|
pinning: "start",
|
|
6379
6463
|
scrollListener: computedPinnedStartOverflow ? pinnedStartScrollListener : void 0
|
|
6380
|
-
}) : null, header, hasPinnedEnd ? /* @__PURE__ */
|
|
6464
|
+
}) : null, header, hasPinnedEnd ? /* @__PURE__ */ createElement19(InfiniteTableHeaderUnvirtualized, {
|
|
6381
6465
|
style: {
|
|
6382
6466
|
right: scrollbars.vertical ? getScrollbarWidth() : 0,
|
|
6383
6467
|
position: "absolute",
|
|
@@ -6389,7 +6473,7 @@ function TableHeaderWrapper(props) {
|
|
|
6389
6473
|
scrollable: computedPinnedEndOverflow,
|
|
6390
6474
|
pinning: "end",
|
|
6391
6475
|
scrollListener: computedPinnedEndOverflow ? pinnedEndScrollListener : void 0
|
|
6392
|
-
}) : null, scrollbars.vertical ? /* @__PURE__ */
|
|
6476
|
+
}) : null, scrollbars.vertical ? /* @__PURE__ */ createElement19(VerticalScrollbarPlaceholder, {
|
|
6393
6477
|
style: {
|
|
6394
6478
|
height: "100%",
|
|
6395
6479
|
right: 0
|
|
@@ -6399,7 +6483,7 @@ function TableHeaderWrapper(props) {
|
|
|
6399
6483
|
|
|
6400
6484
|
// src/components/VirtualScrollContainer/index.tsx
|
|
6401
6485
|
import {
|
|
6402
|
-
createElement as
|
|
6486
|
+
createElement as createElement20,
|
|
6403
6487
|
forwardRef as forwardRef2
|
|
6404
6488
|
} from "react";
|
|
6405
6489
|
import { useRef as useRef11 } from "react";
|
|
@@ -6455,7 +6539,7 @@ var VirtualScrollContainer = forwardRef2(function VirtualScrollContainer2(props,
|
|
|
6455
6539
|
} = props;
|
|
6456
6540
|
const domRef = ref != null ? ref : useRef11(null);
|
|
6457
6541
|
useOnScroll(domRef, onContainerScroll);
|
|
6458
|
-
return /* @__PURE__ */
|
|
6542
|
+
return /* @__PURE__ */ createElement20("div", {
|
|
6459
6543
|
ref: domRef,
|
|
6460
6544
|
style,
|
|
6461
6545
|
className: join(className, rootClassName6, VirtualScrollContainerCls, getScrollableClassName(scrollable))
|
|
@@ -6464,7 +6548,7 @@ var VirtualScrollContainer = forwardRef2(function VirtualScrollContainer2(props,
|
|
|
6464
6548
|
|
|
6465
6549
|
// src/components/VirtualList/SpacePlaceholder.tsx
|
|
6466
6550
|
import {
|
|
6467
|
-
createElement as
|
|
6551
|
+
createElement as createElement21,
|
|
6468
6552
|
memo as memo8
|
|
6469
6553
|
} from "react";
|
|
6470
6554
|
function SpacePlaceholderFn(props) {
|
|
@@ -6476,7 +6560,7 @@ function SpacePlaceholderFn(props) {
|
|
|
6476
6560
|
opacity: 0,
|
|
6477
6561
|
pointerEvents: "none"
|
|
6478
6562
|
};
|
|
6479
|
-
return /* @__PURE__ */
|
|
6563
|
+
return /* @__PURE__ */ createElement21("div", {
|
|
6480
6564
|
"data-count": count,
|
|
6481
6565
|
"data-placeholder-width": true ? width : void 0,
|
|
6482
6566
|
"data-placeholder-height": true ? height : void 0,
|
|
@@ -6491,20 +6575,20 @@ import { useEffect as useEffect22, useMemo as useMemo11, useRef as useRef17 } fr
|
|
|
6491
6575
|
|
|
6492
6576
|
// src/components/InfiniteTable/hooks/useUnpinnedRendering.tsx
|
|
6493
6577
|
import {
|
|
6494
|
-
createElement as
|
|
6578
|
+
createElement as createElement27
|
|
6495
6579
|
} from "react";
|
|
6496
6580
|
import { useCallback as useCallback12 } from "react";
|
|
6497
6581
|
|
|
6498
6582
|
// src/components/VirtualList/VirtualRowList.tsx
|
|
6499
6583
|
import {
|
|
6500
|
-
createElement as
|
|
6584
|
+
createElement as createElement23,
|
|
6501
6585
|
useCallback as useCallback9
|
|
6502
6586
|
} from "react";
|
|
6503
6587
|
|
|
6504
6588
|
// src/components/VirtualList/VirtualList.tsx
|
|
6505
6589
|
import {
|
|
6506
|
-
Fragment as
|
|
6507
|
-
createElement as
|
|
6590
|
+
Fragment as Fragment5,
|
|
6591
|
+
createElement as createElement22
|
|
6508
6592
|
} from "react";
|
|
6509
6593
|
import { useRef as useRef12, useEffect as useEffect17, useState as useState9 } from "react";
|
|
6510
6594
|
|
|
@@ -6587,19 +6671,19 @@ var VirtualList = (props) => {
|
|
|
6587
6671
|
if (true) {
|
|
6588
6672
|
domProps["data-cmp-name"] = `VirtualList`;
|
|
6589
6673
|
}
|
|
6590
|
-
return /* @__PURE__ */
|
|
6674
|
+
return /* @__PURE__ */ createElement22(Fragment5, null, /* @__PURE__ */ createElement22("div", __spreadValues({}, domProps), /* @__PURE__ */ createElement22(VirtualScrollContainer, {
|
|
6591
6675
|
scrollable,
|
|
6592
6676
|
onContainerScroll
|
|
6593
|
-
}, /* @__PURE__ */
|
|
6677
|
+
}, /* @__PURE__ */ createElement22("div", {
|
|
6594
6678
|
ref: domRef,
|
|
6595
6679
|
className: scrollTransformTargetCls,
|
|
6596
6680
|
"data-name": "scroll-transform-target"
|
|
6597
|
-
}, /* @__PURE__ */
|
|
6681
|
+
}, /* @__PURE__ */ createElement22(RawList, {
|
|
6598
6682
|
brain: virtualBrain,
|
|
6599
6683
|
renderItem,
|
|
6600
6684
|
repaintId,
|
|
6601
6685
|
debugChannel: "VirtualList-" + mainAxis
|
|
6602
|
-
})), children, /* @__PURE__ */
|
|
6686
|
+
})), children, /* @__PURE__ */ createElement22(SpacePlaceholder, {
|
|
6603
6687
|
count,
|
|
6604
6688
|
width,
|
|
6605
6689
|
height
|
|
@@ -6616,7 +6700,7 @@ var VirtualRowList = (props) => {
|
|
|
6616
6700
|
rowIndex: renderProps.itemIndex
|
|
6617
6701
|
});
|
|
6618
6702
|
}, [renderRow]);
|
|
6619
|
-
return /* @__PURE__ */
|
|
6703
|
+
return /* @__PURE__ */ createElement23(VirtualList, __spreadProps(__spreadValues({}, listProps), {
|
|
6620
6704
|
renderItem,
|
|
6621
6705
|
mainAxis: "vertical",
|
|
6622
6706
|
itemMainAxisSize: rowHeight,
|
|
@@ -6626,7 +6710,7 @@ var VirtualRowList = (props) => {
|
|
|
6626
6710
|
|
|
6627
6711
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRow.tsx
|
|
6628
6712
|
import {
|
|
6629
|
-
createElement as
|
|
6713
|
+
createElement as createElement25,
|
|
6630
6714
|
memo as memo10,
|
|
6631
6715
|
useCallback as useCallback11
|
|
6632
6716
|
} from "react";
|
|
@@ -6634,10 +6718,13 @@ import { useRef as useRef14 } from "react";
|
|
|
6634
6718
|
|
|
6635
6719
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx
|
|
6636
6720
|
import {
|
|
6637
|
-
|
|
6721
|
+
createContext as createContext5,
|
|
6722
|
+
createElement as createElement24,
|
|
6638
6723
|
memo as memo9
|
|
6639
6724
|
} from "react";
|
|
6725
|
+
import { useContext as useContext6 } from "react";
|
|
6640
6726
|
var { rootClassName: rootClassName8 } = internalProps;
|
|
6727
|
+
var InfiniteTableColumnCellContext = createContext5(null);
|
|
6641
6728
|
var InfiniteTableColumnCellClassName = `${rootClassName8}ColumnCell`;
|
|
6642
6729
|
function isColumnWithField(c) {
|
|
6643
6730
|
return typeof c.field === "string";
|
|
@@ -6684,24 +6771,31 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
6684
6771
|
column
|
|
6685
6772
|
}, rest);
|
|
6686
6773
|
let renderValue = value;
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
renderValue = column.renderValue(renderParam);
|
|
6774
|
+
const renderParam = __spreadProps(__spreadValues({
|
|
6775
|
+
value,
|
|
6776
|
+
column,
|
|
6777
|
+
domRef,
|
|
6778
|
+
groupRowInfo
|
|
6779
|
+
}, rest), {
|
|
6780
|
+
rowIndex,
|
|
6781
|
+
toggleGroupRow,
|
|
6782
|
+
toggleCurrentGroupRow: () => toggleGroupRow(rowInfo.groupKeys),
|
|
6783
|
+
groupBy: computedDataSource.groupBy,
|
|
6784
|
+
pivotBy: computedDataSource.pivotBy
|
|
6785
|
+
});
|
|
6786
|
+
const renderChildren = () => {
|
|
6787
|
+
if (hidden) {
|
|
6788
|
+
return null;
|
|
6703
6789
|
}
|
|
6704
|
-
|
|
6790
|
+
const renderFn = column.render || column.renderValue;
|
|
6791
|
+
if (renderFn) {
|
|
6792
|
+
return /* @__PURE__ */ createElement24(RenderHookComponent, {
|
|
6793
|
+
render: renderFn,
|
|
6794
|
+
renderParam
|
|
6795
|
+
});
|
|
6796
|
+
}
|
|
6797
|
+
return renderValue;
|
|
6798
|
+
};
|
|
6705
6799
|
const colClassName = column.className ? typeof column.className === "function" ? column.className(stylingRenderParam) : column.className : void 0;
|
|
6706
6800
|
const colStyle = column.style ? typeof column.style === "function" ? column.style(stylingRenderParam) : column.style : void 0;
|
|
6707
6801
|
const style = colStyle ? __spreadProps(__spreadValues({}, colStyle), {
|
|
@@ -6729,18 +6823,28 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
6729
6823
|
}
|
|
6730
6824
|
}
|
|
6731
6825
|
}
|
|
6732
|
-
|
|
6826
|
+
const cellProps = __spreadProps(__spreadValues({
|
|
6733
6827
|
domRef,
|
|
6734
6828
|
offsetProperty
|
|
6735
6829
|
}, dataset), {
|
|
6830
|
+
cellType: "body",
|
|
6736
6831
|
column,
|
|
6737
6832
|
offset: virtualized ? 0 : column.computedPinningOffset,
|
|
6738
6833
|
style,
|
|
6739
6834
|
cssEllipsis: (_a = column.cssEllipsis) != null ? _a : true,
|
|
6740
|
-
className: join(useCellClassName(column, [InfiniteTableColumnCellClassName, InfiniteTableCellClassName], ColumnCellRecipe, { dragging: false }), colClassName)
|
|
6741
|
-
|
|
6835
|
+
className: join(useCellClassName(column, [InfiniteTableColumnCellClassName, InfiniteTableCellClassName], ColumnCellRecipe, { dragging: false }), colClassName),
|
|
6836
|
+
renderChildren
|
|
6837
|
+
});
|
|
6838
|
+
const ContextProvider = InfiniteTableColumnCellContext.Provider;
|
|
6839
|
+
return /* @__PURE__ */ createElement24(ContextProvider, {
|
|
6840
|
+
value: renderParam
|
|
6841
|
+
}, /* @__PURE__ */ createElement24(InfiniteTableCell, __spreadValues({}, cellProps)));
|
|
6742
6842
|
}
|
|
6743
6843
|
var InfiniteTableColumnCell = memo9(InfiniteTableColumnCellFn);
|
|
6844
|
+
function useInfiniteColumnCell() {
|
|
6845
|
+
const result = useContext6(InfiniteTableColumnCellContext);
|
|
6846
|
+
return result;
|
|
6847
|
+
}
|
|
6744
6848
|
|
|
6745
6849
|
// src/components/InfiniteTable/components/InfiniteTableRow/useRowDOMProps.ts
|
|
6746
6850
|
import {
|
|
@@ -6880,7 +6984,7 @@ function InfiniteTableRowFn(props) {
|
|
|
6880
6984
|
if (!column) {
|
|
6881
6985
|
}
|
|
6882
6986
|
const hidden = false;
|
|
6883
|
-
return /* @__PURE__ */
|
|
6987
|
+
return /* @__PURE__ */ createElement25(InfiniteTableColumnCell, {
|
|
6884
6988
|
getData,
|
|
6885
6989
|
rowInfo,
|
|
6886
6990
|
groupRenderStrategy,
|
|
@@ -6907,9 +7011,9 @@ function InfiniteTableRowFn(props) {
|
|
|
6907
7011
|
if (true) {
|
|
6908
7012
|
domProps["data-cmp-name"] = "ITableRow";
|
|
6909
7013
|
}
|
|
6910
|
-
return /* @__PURE__ */
|
|
7014
|
+
return /* @__PURE__ */ createElement25("div", __spreadProps(__spreadValues({}, domProps), {
|
|
6911
7015
|
style
|
|
6912
|
-
}), /* @__PURE__ */
|
|
7016
|
+
}), /* @__PURE__ */ createElement25(RawList, {
|
|
6913
7017
|
brain,
|
|
6914
7018
|
renderItem: renderCell,
|
|
6915
7019
|
debugChannel: `${rowIndex}`
|
|
@@ -6919,7 +7023,7 @@ var InfiniteTableRow = memo10(InfiniteTableRowFn);
|
|
|
6919
7023
|
|
|
6920
7024
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowUnvirtualized.tsx
|
|
6921
7025
|
import {
|
|
6922
|
-
createElement as
|
|
7026
|
+
createElement as createElement26,
|
|
6923
7027
|
memo as memo11
|
|
6924
7028
|
} from "react";
|
|
6925
7029
|
function TableRowUnvirtualizedFn(props) {
|
|
@@ -6942,7 +7046,7 @@ function TableRowUnvirtualizedFn(props) {
|
|
|
6942
7046
|
}, domProps.style);
|
|
6943
7047
|
const children = columns.map((col) => {
|
|
6944
7048
|
const hidden = false;
|
|
6945
|
-
return /* @__PURE__ */
|
|
7049
|
+
return /* @__PURE__ */ createElement26(InfiniteTableColumnCell, {
|
|
6946
7050
|
key: col.id,
|
|
6947
7051
|
virtualized: false,
|
|
6948
7052
|
rowHeight,
|
|
@@ -6955,7 +7059,7 @@ function TableRowUnvirtualizedFn(props) {
|
|
|
6955
7059
|
column: col
|
|
6956
7060
|
});
|
|
6957
7061
|
});
|
|
6958
|
-
return /* @__PURE__ */
|
|
7062
|
+
return /* @__PURE__ */ createElement26("div", __spreadProps(__spreadValues({}, domProps), {
|
|
6959
7063
|
style
|
|
6960
7064
|
}), children);
|
|
6961
7065
|
}
|
|
@@ -7004,7 +7108,7 @@ function useUnpinnedRendering(params) {
|
|
|
7004
7108
|
rowProps.repaintId = repaintId;
|
|
7005
7109
|
}
|
|
7006
7110
|
const TableRowComponent = shouldVirtualizeColumns ? InfiniteTableRow : TableRowUnvirtualized;
|
|
7007
|
-
return /* @__PURE__ */
|
|
7111
|
+
return /* @__PURE__ */ createElement27(TableRowComponent, __spreadValues({}, rowProps));
|
|
7008
7112
|
}, [
|
|
7009
7113
|
repaintId,
|
|
7010
7114
|
rowHeight,
|
|
@@ -7015,7 +7119,7 @@ function useUnpinnedRendering(params) {
|
|
|
7015
7119
|
horizontalVirtualBrain,
|
|
7016
7120
|
verticalVirtualBrain
|
|
7017
7121
|
]);
|
|
7018
|
-
const fakeScrollbar = getScrollbarWidth() ? /* @__PURE__ */
|
|
7122
|
+
const fakeScrollbar = getScrollbarWidth() ? /* @__PURE__ */ createElement27("div", {
|
|
7019
7123
|
"data-name": "horizontal-scrollbar-placeholder--fake",
|
|
7020
7124
|
style: {
|
|
7021
7125
|
position: "absolute",
|
|
@@ -7026,10 +7130,10 @@ function useUnpinnedRendering(params) {
|
|
|
7026
7130
|
overflow: "auto",
|
|
7027
7131
|
visibility: columnShifts ? "visible" : "hidden"
|
|
7028
7132
|
}
|
|
7029
|
-
}, /* @__PURE__ */
|
|
7133
|
+
}, /* @__PURE__ */ createElement27("div", {
|
|
7030
7134
|
style: { height: "100%", width: computedUnpinnedColumnsWidth }
|
|
7031
7135
|
})) : null;
|
|
7032
|
-
return rowHeight != 0 ? /* @__PURE__ */
|
|
7136
|
+
return rowHeight != 0 ? /* @__PURE__ */ createElement27(VirtualRowList, {
|
|
7033
7137
|
repaintId: `${repaintId}-unpinned-`,
|
|
7034
7138
|
brain: verticalVirtualBrain,
|
|
7035
7139
|
onContainerScroll: applyScrollHorizontal,
|
|
@@ -7173,14 +7277,14 @@ var useOnContainerScroll = ({
|
|
|
7173
7277
|
|
|
7174
7278
|
// src/components/InfiniteTable/hooks/usePinnedRendering.tsx
|
|
7175
7279
|
import {
|
|
7176
|
-
createElement as
|
|
7280
|
+
createElement as createElement29,
|
|
7177
7281
|
useMemo as useMemo10
|
|
7178
7282
|
} from "react";
|
|
7179
7283
|
import { useCallback as useCallback15 } from "react";
|
|
7180
7284
|
|
|
7181
7285
|
// src/components/VirtualList/RowListWithExternalScrolling.tsx
|
|
7182
7286
|
import {
|
|
7183
|
-
createElement as
|
|
7287
|
+
createElement as createElement28
|
|
7184
7288
|
} from "react";
|
|
7185
7289
|
import { useEffect as useEffect20, useCallback as useCallback14, useRef as useRef16 } from "react";
|
|
7186
7290
|
|
|
@@ -7257,7 +7361,7 @@ var RowListWithExternalScrolling = (props) => {
|
|
|
7257
7361
|
if (true) {
|
|
7258
7362
|
domProps["data-cmp-name"] = "RowListWithExternalScrolling";
|
|
7259
7363
|
}
|
|
7260
|
-
return /* @__PURE__ */
|
|
7364
|
+
return /* @__PURE__ */ createElement28("div", __spreadValues({}, domProps), /* @__PURE__ */ createElement28(RawList, {
|
|
7261
7365
|
brain,
|
|
7262
7366
|
renderItem,
|
|
7263
7367
|
repaintId
|
|
@@ -7306,7 +7410,7 @@ function PinnedRowsContainer(props) {
|
|
|
7306
7410
|
className: join(`${PinnedRowsContainerClassName}`, PinnedRowsClsVariants[pinning === "start" ? "pinnedStart" : "pinnedEnd"], `${PinnedRowsContainerClassName}--pinned-${pinning}`, `${PinnedRowsContainerClassName}--overflow`, PinnedRowsClsVariants.overflow)
|
|
7307
7411
|
};
|
|
7308
7412
|
if (hasOverflow) {
|
|
7309
|
-
return /* @__PURE__ */
|
|
7413
|
+
return /* @__PURE__ */ createElement29(VirtualScrollContainer, {
|
|
7310
7414
|
scrollable: {
|
|
7311
7415
|
horizontal: true,
|
|
7312
7416
|
vertical: false
|
|
@@ -7322,18 +7426,18 @@ function PinnedRowsContainer(props) {
|
|
|
7322
7426
|
className: join(PinnedRowsContainerClsVariants({
|
|
7323
7427
|
pinned: pinning
|
|
7324
7428
|
}), `${PinnedRowsContainerClassName}Container`, `${PinnedRowsContainerClassName}Container--pinned-${pinning}`)
|
|
7325
|
-
}, /* @__PURE__ */
|
|
7429
|
+
}, /* @__PURE__ */ createElement29(RowListWithExternalScrolling, __spreadProps(__spreadValues({}, rowListProps), {
|
|
7326
7430
|
onMount: (node) => {
|
|
7327
7431
|
pinnedScrollListener == null ? void 0 : pinnedScrollListener.onScroll((scrollPosition) => {
|
|
7328
7432
|
updateScroll(node, brain.getScrollPosition(), scrollPosition);
|
|
7329
7433
|
});
|
|
7330
7434
|
}
|
|
7331
|
-
})), /* @__PURE__ */
|
|
7435
|
+
})), /* @__PURE__ */ createElement29(SpacePlaceholder, {
|
|
7332
7436
|
width: rowWidth,
|
|
7333
7437
|
height: 1
|
|
7334
7438
|
}));
|
|
7335
7439
|
}
|
|
7336
|
-
return /* @__PURE__ */
|
|
7440
|
+
return /* @__PURE__ */ createElement29(RowListWithExternalScrolling, __spreadValues({}, rowListProps));
|
|
7337
7441
|
}
|
|
7338
7442
|
function useRenderPinnedRow(params) {
|
|
7339
7443
|
const { getData, getState, columnsWidth, columns, rowSpan, verticalBrain } = params;
|
|
@@ -7354,7 +7458,7 @@ function useRenderPinnedRow(params) {
|
|
|
7354
7458
|
rowWidth: columnsWidth,
|
|
7355
7459
|
columns
|
|
7356
7460
|
}, rowParams);
|
|
7357
|
-
return /* @__PURE__ */
|
|
7461
|
+
return /* @__PURE__ */ createElement29(TableRowUnvirtualized, __spreadValues({}, rowProps));
|
|
7358
7462
|
}, [columnsWidth, columns, verticalBrain, dataArray]);
|
|
7359
7463
|
return renderPinnedRow;
|
|
7360
7464
|
}
|
|
@@ -7400,7 +7504,7 @@ function usePinnedRenderingForSide(side, params) {
|
|
|
7400
7504
|
columns,
|
|
7401
7505
|
columnsWidth
|
|
7402
7506
|
});
|
|
7403
|
-
const pinnedList = columns.length && rowHeight !== 0 ? /* @__PURE__ */
|
|
7507
|
+
const pinnedList = columns.length && rowHeight !== 0 ? /* @__PURE__ */ createElement29(PinnedRowsContainer, {
|
|
7404
7508
|
pinning: side,
|
|
7405
7509
|
pinnedScrollListener,
|
|
7406
7510
|
hasOverflow,
|
|
@@ -7413,7 +7517,7 @@ function usePinnedRenderingForSide(side, params) {
|
|
|
7413
7517
|
brain: verticalVirtualBrain,
|
|
7414
7518
|
renderRow: renderRowPinned
|
|
7415
7519
|
}) : null;
|
|
7416
|
-
const pinnedScrollbarPlaceholder = pinnedList && hasHorizontalScrollbar && !hasOverflow ? /* @__PURE__ */
|
|
7520
|
+
const pinnedScrollbarPlaceholder = pinnedList && hasHorizontalScrollbar && !hasOverflow ? /* @__PURE__ */ createElement29(HorizontalScrollbarPlaceholder, {
|
|
7417
7521
|
style: side === "end" ? {
|
|
7418
7522
|
width: columnsWidth,
|
|
7419
7523
|
right: hasVerticalScrollbar ? getScrollbarWidth() : 0
|
|
@@ -7641,7 +7745,7 @@ function useListRendering(param) {
|
|
|
7641
7745
|
|
|
7642
7746
|
// src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
|
|
7643
7747
|
import {
|
|
7644
|
-
createElement as
|
|
7748
|
+
createElement as createElement30,
|
|
7645
7749
|
forwardRef as forwardRef3,
|
|
7646
7750
|
useCallback as useCallback17,
|
|
7647
7751
|
useRef as useRef18
|
|
@@ -7709,12 +7813,12 @@ var InfiniteTableLicenseFooter = forwardRef3(function InfiniteTableLicenseFooter
|
|
|
7709
7813
|
clearInterval(intervalId);
|
|
7710
7814
|
};
|
|
7711
7815
|
}, []);
|
|
7712
|
-
return /* @__PURE__ */
|
|
7816
|
+
return /* @__PURE__ */ createElement30("div", __spreadProps(__spreadValues({
|
|
7713
7817
|
ref: domCallback
|
|
7714
7818
|
}, props), {
|
|
7715
7819
|
className: join(`${rootClassName12}-Footer`, FooterCls, props.className),
|
|
7716
7820
|
style: defaultStyle2
|
|
7717
|
-
}), "Powered by", " ", /* @__PURE__ */
|
|
7821
|
+
}), "Powered by", " ", /* @__PURE__ */ createElement30("a", {
|
|
7718
7822
|
href: "https://infinite-table.com",
|
|
7719
7823
|
rel: "noopener noreferrer",
|
|
7720
7824
|
role: "link",
|
|
@@ -7884,7 +7988,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
7884
7988
|
const valid = useMemo12(() => {
|
|
7885
7989
|
let valid2 = isValidLicense(licenseKey, {
|
|
7886
7990
|
publishedAt: 1624970570587,
|
|
7887
|
-
version: "0.2.
|
|
7991
|
+
version: "0.2.16"
|
|
7888
7992
|
});
|
|
7889
7993
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
7890
7994
|
return true;
|
|
@@ -7896,7 +8000,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
7896
8000
|
|
|
7897
8001
|
// src/components/CSSVariableWatch.tsx
|
|
7898
8002
|
import {
|
|
7899
|
-
createElement as
|
|
8003
|
+
createElement as createElement31,
|
|
7900
8004
|
useCallback as useCallback18,
|
|
7901
8005
|
useLayoutEffect as useLayoutEffect4
|
|
7902
8006
|
} from "react";
|
|
@@ -7937,11 +8041,11 @@ var CSSVariableWatch = (props) => {
|
|
|
7937
8041
|
useCSSVariableWatch(__spreadProps(__spreadValues({}, props), {
|
|
7938
8042
|
ref: domRef
|
|
7939
8043
|
}));
|
|
7940
|
-
return /* @__PURE__ */
|
|
8044
|
+
return /* @__PURE__ */ createElement31("div", {
|
|
7941
8045
|
"data-name": "css-variable-watcher",
|
|
7942
8046
|
"data-var": props.varName,
|
|
7943
8047
|
style: WRAPPER_STYLE
|
|
7944
|
-
}, /* @__PURE__ */
|
|
8048
|
+
}, /* @__PURE__ */ createElement31("div", {
|
|
7945
8049
|
ref: domRef,
|
|
7946
8050
|
style: {
|
|
7947
8051
|
height: props.varName.startsWith("var(") ? props.varName : `var(${props.varName})`
|
|
@@ -8035,7 +8139,7 @@ function useDOMProps(initialDOMProps) {
|
|
|
8035
8139
|
|
|
8036
8140
|
// src/components/InfiniteTable/components/LoadMask.tsx
|
|
8037
8141
|
import {
|
|
8038
|
-
createElement as
|
|
8142
|
+
createElement as createElement32,
|
|
8039
8143
|
memo as memo12
|
|
8040
8144
|
} from "react";
|
|
8041
8145
|
|
|
@@ -8049,11 +8153,11 @@ var { rootClassName: rootClassName11 } = internalProps;
|
|
|
8049
8153
|
var baseCls = `${rootClassName11}-LoadMask`;
|
|
8050
8154
|
function LoadMaskFn(props) {
|
|
8051
8155
|
const { visible, children = "Loading" } = props;
|
|
8052
|
-
return /* @__PURE__ */
|
|
8156
|
+
return /* @__PURE__ */ createElement32("div", {
|
|
8053
8157
|
className: `${LoadMaskCls[visible ? "visible" : "hidden"]} ${baseCls}`
|
|
8054
|
-
}, /* @__PURE__ */
|
|
8158
|
+
}, /* @__PURE__ */ createElement32("div", {
|
|
8055
8159
|
className: `${LoadMaskOverlayCls} ${baseCls}-Overlay`
|
|
8056
|
-
}), /* @__PURE__ */
|
|
8160
|
+
}), /* @__PURE__ */ createElement32("div", {
|
|
8057
8161
|
className: `${LoadMaskTextCls} ${baseCls}-Text`
|
|
8058
8162
|
}, children));
|
|
8059
8163
|
}
|
|
@@ -8282,31 +8386,31 @@ var InfiniteTableComponent = memo13(function InfiniteTableComponent2() {
|
|
|
8282
8386
|
dataSourceActions.scrollStopDelayUpdatedByTable = scrollStopDelay;
|
|
8283
8387
|
}, [scrollStopDelay]);
|
|
8284
8388
|
useAutoSizeColumns();
|
|
8285
|
-
return /* @__PURE__ */
|
|
8389
|
+
return /* @__PURE__ */ createElement33("div", __spreadValues({
|
|
8286
8390
|
ref: domRef
|
|
8287
|
-
}, domProps), header ? /* @__PURE__ */
|
|
8391
|
+
}, domProps), header ? /* @__PURE__ */ createElement33(TableHeaderWrapper, {
|
|
8288
8392
|
brain: horizontalVirtualBrain,
|
|
8289
8393
|
repaintId,
|
|
8290
8394
|
scrollbars
|
|
8291
|
-
}) : null, /* @__PURE__ */
|
|
8395
|
+
}) : null, /* @__PURE__ */ createElement33(InfiniteTableBody, null, /* @__PURE__ */ createElement33(VirtualScrollContainer, {
|
|
8292
8396
|
ref: scrollerDOMRef,
|
|
8293
8397
|
onContainerScroll: applyScrollVertical,
|
|
8294
8398
|
scrollable: ONLY_VERTICAL_SCROLLBAR
|
|
8295
|
-
}, /* @__PURE__ */
|
|
8399
|
+
}, /* @__PURE__ */ createElement33("div", {
|
|
8296
8400
|
className: display.flex
|
|
8297
|
-
}, pinnedStartList, centerList, pinnedEndList), /* @__PURE__ */
|
|
8401
|
+
}, pinnedStartList, centerList, pinnedEndList), /* @__PURE__ */ createElement33(SpacePlaceholder, {
|
|
8298
8402
|
count: dataArray.length,
|
|
8299
8403
|
width: 0,
|
|
8300
8404
|
height: reservedContentHeight
|
|
8301
|
-
})), pinnedStartScrollbarPlaceholder, pinnedEndScrollbarPlaceholder, /* @__PURE__ */
|
|
8405
|
+
})), pinnedStartScrollbarPlaceholder, pinnedEndScrollbarPlaceholder, /* @__PURE__ */ createElement33(LoadMaskCmp, {
|
|
8302
8406
|
visible: loading
|
|
8303
|
-
}, loadingText)), licenseValid ? null : /* @__PURE__ */
|
|
8407
|
+
}, loadingText)), licenseValid ? null : /* @__PURE__ */ createElement33(InfiniteTableLicenseFooter, null), /* @__PURE__ */ createElement33("div", {
|
|
8304
8408
|
ref: portalDOMRef,
|
|
8305
8409
|
className: join(`${rootClassName}Portal`, zIndex[1e3], position.absolute, top[0], left[0])
|
|
8306
|
-
}), rowHeightCSSVar ? /* @__PURE__ */
|
|
8410
|
+
}), rowHeightCSSVar ? /* @__PURE__ */ createElement33(CSSVariableWatch, {
|
|
8307
8411
|
varName: rowHeightCSSVar,
|
|
8308
8412
|
onChange: onRowHeightCSSVarChange
|
|
8309
|
-
}) : null, headerHeightCSSVar ? /* @__PURE__ */
|
|
8413
|
+
}) : null, headerHeightCSSVar ? /* @__PURE__ */ createElement33(CSSVariableWatch, {
|
|
8310
8414
|
varName: headerHeightCSSVar,
|
|
8311
8415
|
onChange: onHeaderHeightCSSVarChange
|
|
8312
8416
|
}) : null);
|
|
@@ -8354,13 +8458,13 @@ function InfiniteTableContextProvider() {
|
|
|
8354
8458
|
}
|
|
8355
8459
|
}, [scrollTopKey, scrollerDOMRef]);
|
|
8356
8460
|
const TableContext2 = getInfiniteTableContext();
|
|
8357
|
-
return /* @__PURE__ */
|
|
8461
|
+
return /* @__PURE__ */ createElement33(TableContext2.Provider, {
|
|
8358
8462
|
value: contextValue
|
|
8359
|
-
}, /* @__PURE__ */
|
|
8463
|
+
}, /* @__PURE__ */ createElement33(InfiniteTableComponent, null));
|
|
8360
8464
|
}
|
|
8361
8465
|
function InfiniteTable(props) {
|
|
8362
|
-
const table = /* @__PURE__ */
|
|
8363
|
-
return /* @__PURE__ */
|
|
8466
|
+
const table = /* @__PURE__ */ createElement33(InfiniteTableRoot, __spreadValues({}, props), /* @__PURE__ */ createElement33(InfiniteTableContextProvider, null));
|
|
8467
|
+
return /* @__PURE__ */ createElement33(StrictMode, null, table);
|
|
8364
8468
|
}
|
|
8365
8469
|
InfiniteTable.defaultProps = {
|
|
8366
8470
|
rowHeight: 40,
|
|
@@ -8381,5 +8485,7 @@ export {
|
|
|
8381
8485
|
multisort,
|
|
8382
8486
|
useComponentState,
|
|
8383
8487
|
useDataSource,
|
|
8384
|
-
useEffectWithChanges
|
|
8488
|
+
useEffectWithChanges,
|
|
8489
|
+
useInfiniteColumnCell,
|
|
8490
|
+
useInfiniteHeaderCell
|
|
8385
8491
|
};
|