@infinite-table/infinite-react 0.2.12 → 0.2.15
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 +263 -228
- package/index.esm.js +367 -239
- package/index.js +438 -315
- 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,
|
|
@@ -2144,7 +2144,7 @@ var sortAscending = (a, b) => a - b;
|
|
|
2144
2144
|
// src/components/InfiniteTable/hooks/useComputed.ts
|
|
2145
2145
|
import { useCallback as useCallback5, useEffect as useEffect10, useMemo as useMemo6, useState as useState5 } from "react";
|
|
2146
2146
|
|
|
2147
|
-
// src/components/hooks/useComponentState.tsx
|
|
2147
|
+
// src/components/hooks/useComponentState/index.tsx
|
|
2148
2148
|
import {
|
|
2149
2149
|
createElement as createElement2,
|
|
2150
2150
|
memo,
|
|
@@ -2217,7 +2217,7 @@ var usePrevious = (value, initialValue) => {
|
|
|
2217
2217
|
return ref.current;
|
|
2218
2218
|
};
|
|
2219
2219
|
|
|
2220
|
-
// src/components/hooks/useComponentState.tsx
|
|
2220
|
+
// src/components/hooks/useComponentState/index.tsx
|
|
2221
2221
|
var notifyChange = (props, propName, newValue) => {
|
|
2222
2222
|
const upperPropName = toUpperFirst(propName);
|
|
2223
2223
|
const callbackPropName = `on${upperPropName}Change`;
|
|
@@ -2545,7 +2545,7 @@ import { useEffect as useEffect9, useMemo as useMemo5 } from "react";
|
|
|
2545
2545
|
|
|
2546
2546
|
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
2547
2547
|
import {
|
|
2548
|
-
createElement as
|
|
2548
|
+
createElement as createElement5
|
|
2549
2549
|
} from "react";
|
|
2550
2550
|
|
|
2551
2551
|
// src/utils/join.ts
|
|
@@ -2620,6 +2620,15 @@ var userSelect = { none: "_16lm1iwm" };
|
|
|
2620
2620
|
var willChange = { transform: "_16lm1iw19" };
|
|
2621
2621
|
var zIndex = { "1": "_16lm1iwe", "10": "_16lm1iwf", "1000": "_16lm1iwg", "10000": "_16lm1iwh", "100000": "_16lm1iwi" };
|
|
2622
2622
|
|
|
2623
|
+
// src/components/InfiniteTable/utils/RenderHookComponent.tsx
|
|
2624
|
+
import {
|
|
2625
|
+
Fragment,
|
|
2626
|
+
createElement as createElement4
|
|
2627
|
+
} from "react";
|
|
2628
|
+
function RenderHookComponent(props) {
|
|
2629
|
+
return /* @__PURE__ */ createElement4(Fragment, null, props.render(props.renderParam));
|
|
2630
|
+
}
|
|
2631
|
+
|
|
2623
2632
|
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
2624
2633
|
function getGroupColumnRender({
|
|
2625
2634
|
groupIndexForColumn,
|
|
@@ -2630,7 +2639,10 @@ function getGroupColumnRender({
|
|
|
2630
2639
|
var _a, _b, _c;
|
|
2631
2640
|
let { value, rowInfo, column, groupBy, pivotBy } = renderOptions;
|
|
2632
2641
|
if (column.renderValue) {
|
|
2633
|
-
value =
|
|
2642
|
+
value = /* @__PURE__ */ createElement5(RenderHookComponent, {
|
|
2643
|
+
render: column.renderValue,
|
|
2644
|
+
renderParam: renderOptions
|
|
2645
|
+
});
|
|
2634
2646
|
}
|
|
2635
2647
|
let groupRowInfo = groupRenderStrategy !== "inline" ? rowInfo : ((_a = rowInfo.parents) == null ? void 0 : _a[groupIndexForColumn]) || rowInfo;
|
|
2636
2648
|
if (!groupRowInfo) {
|
|
@@ -2656,17 +2668,20 @@ function getGroupColumnRender({
|
|
|
2656
2668
|
let icon = null;
|
|
2657
2669
|
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
2670
|
if (showExpanderIcon) {
|
|
2659
|
-
const defaultIcon = /* @__PURE__ */
|
|
2671
|
+
const defaultIcon = /* @__PURE__ */ createElement5(ExpanderIcon, {
|
|
2660
2672
|
expanded: !collapsed,
|
|
2661
2673
|
onChange: () => {
|
|
2662
2674
|
toggleGroupRow(groupKeys);
|
|
2663
2675
|
}
|
|
2664
2676
|
});
|
|
2665
|
-
icon = column.renderGroupIcon ?
|
|
2677
|
+
icon = column.renderGroupIcon ? /* @__PURE__ */ createElement5(RenderHookComponent, {
|
|
2678
|
+
render: column.renderGroupIcon,
|
|
2679
|
+
renderParam: Object.assign({ collapsed, groupIcon: defaultIcon }, renderOptions)
|
|
2680
|
+
}) : defaultIcon;
|
|
2666
2681
|
}
|
|
2667
|
-
return /* @__PURE__ */
|
|
2682
|
+
return /* @__PURE__ */ createElement5("div", {
|
|
2668
2683
|
className: join(display.flex, alignItems.center)
|
|
2669
|
-
}, icon, /* @__PURE__ */
|
|
2684
|
+
}, icon, /* @__PURE__ */ createElement5("div", {
|
|
2670
2685
|
className: cssEllipsisClassName
|
|
2671
2686
|
}, value != null ? value : null));
|
|
2672
2687
|
};
|
|
@@ -2714,7 +2729,7 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
|
|
|
2714
2729
|
let icon = null;
|
|
2715
2730
|
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
2731
|
if (showExpanderIcon) {
|
|
2717
|
-
const defaultIcon = /* @__PURE__ */
|
|
2732
|
+
const defaultIcon = /* @__PURE__ */ createElement5(ExpanderIcon, {
|
|
2718
2733
|
expanded: !collapsed,
|
|
2719
2734
|
onChange: () => {
|
|
2720
2735
|
toggleGroupRow(rowInfo.groupKeys);
|
|
@@ -2722,9 +2737,9 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
|
|
|
2722
2737
|
});
|
|
2723
2738
|
icon = column.renderGroupIcon ? column.renderGroupIcon(Object.assign({ collapsed, groupIcon: defaultIcon }, renderOptions)) : defaultIcon;
|
|
2724
2739
|
}
|
|
2725
|
-
return /* @__PURE__ */
|
|
2740
|
+
return /* @__PURE__ */ createElement5("div", {
|
|
2726
2741
|
className: join(display.flex, alignItems.center, GroupRowExpanderCls)
|
|
2727
|
-
}, icon, /* @__PURE__ */
|
|
2742
|
+
}, icon, /* @__PURE__ */ createElement5("div", {
|
|
2728
2743
|
className: cssEllipsisClassName
|
|
2729
2744
|
}, value != null ? value : null));
|
|
2730
2745
|
}
|
|
@@ -2744,8 +2759,8 @@ import { useCallback as useCallback4 } from "react";
|
|
|
2744
2759
|
|
|
2745
2760
|
// src/components/DataSource/index.tsx
|
|
2746
2761
|
import {
|
|
2747
|
-
Fragment,
|
|
2748
|
-
createElement as
|
|
2762
|
+
Fragment as Fragment2,
|
|
2763
|
+
createElement as createElement6
|
|
2749
2764
|
} from "react";
|
|
2750
2765
|
|
|
2751
2766
|
// src/utils/multisort/sortTypes.ts
|
|
@@ -2847,6 +2862,7 @@ var DeepMap = class {
|
|
|
2847
2862
|
this.map = new Map();
|
|
2848
2863
|
this.length = 0;
|
|
2849
2864
|
this.revision = 0;
|
|
2865
|
+
this.emptyKey = Symbol("emptyKey");
|
|
2850
2866
|
this.visit = (fn) => {
|
|
2851
2867
|
this.map.forEach((_, k) => this.visitKey(k, this.map, [], fn));
|
|
2852
2868
|
};
|
|
@@ -2858,13 +2874,19 @@ var DeepMap = class {
|
|
|
2858
2874
|
return;
|
|
2859
2875
|
}
|
|
2860
2876
|
let i = 0;
|
|
2861
|
-
currentMap.
|
|
2877
|
+
const hasEmptyKey = currentMap.has(this.emptyKey);
|
|
2878
|
+
let allowEmptyKey = true;
|
|
2879
|
+
const iterator = (_, key) => {
|
|
2862
2880
|
const pair = currentMap.get(key);
|
|
2863
2881
|
if (!pair) {
|
|
2864
2882
|
return;
|
|
2865
2883
|
}
|
|
2866
2884
|
const { map: map2 } = pair;
|
|
2867
|
-
const
|
|
2885
|
+
const isEmptyKey = key === this.emptyKey;
|
|
2886
|
+
if (isEmptyKey && !allowEmptyKey) {
|
|
2887
|
+
return;
|
|
2888
|
+
}
|
|
2889
|
+
const keys = isEmptyKey ? [] : [...parentKeys, key];
|
|
2868
2890
|
const next = map2 ? () => this.visitWithNext(keys, fn, map2) : void 0;
|
|
2869
2891
|
if (pair.hasOwnProperty("value")) {
|
|
2870
2892
|
fn(pair.value, keys, i, next);
|
|
@@ -2872,7 +2894,13 @@ var DeepMap = class {
|
|
|
2872
2894
|
} else {
|
|
2873
2895
|
next == null ? void 0 : next();
|
|
2874
2896
|
}
|
|
2875
|
-
}
|
|
2897
|
+
};
|
|
2898
|
+
if (hasEmptyKey) {
|
|
2899
|
+
iterator(void 0, this.emptyKey);
|
|
2900
|
+
allowEmptyKey = false;
|
|
2901
|
+
i = 0;
|
|
2902
|
+
}
|
|
2903
|
+
currentMap.forEach(iterator);
|
|
2876
2904
|
};
|
|
2877
2905
|
if (initial) {
|
|
2878
2906
|
initial.forEach((entry) => {
|
|
@@ -2891,7 +2919,7 @@ var DeepMap = class {
|
|
|
2891
2919
|
set(keys, value) {
|
|
2892
2920
|
let currentMap = this.map;
|
|
2893
2921
|
if (!keys.length) {
|
|
2894
|
-
|
|
2922
|
+
keys = [this.emptyKey];
|
|
2895
2923
|
}
|
|
2896
2924
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
2897
2925
|
const key = keys[i];
|
|
@@ -2917,7 +2945,7 @@ var DeepMap = class {
|
|
|
2917
2945
|
var _a;
|
|
2918
2946
|
let currentMap = this.map;
|
|
2919
2947
|
if (!keys.length) {
|
|
2920
|
-
|
|
2948
|
+
keys = [this.emptyKey];
|
|
2921
2949
|
}
|
|
2922
2950
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
2923
2951
|
const key = keys[i];
|
|
@@ -2952,10 +2980,11 @@ var DeepMap = class {
|
|
|
2952
2980
|
this.revision = 0;
|
|
2953
2981
|
}
|
|
2954
2982
|
delete(keys) {
|
|
2955
|
-
keys = [...keys];
|
|
2956
2983
|
let currentMap = this.map;
|
|
2957
2984
|
if (!keys.length) {
|
|
2958
|
-
|
|
2985
|
+
keys = [this.emptyKey];
|
|
2986
|
+
} else {
|
|
2987
|
+
keys = [...keys];
|
|
2959
2988
|
}
|
|
2960
2989
|
let maps = [currentMap];
|
|
2961
2990
|
let result = false;
|
|
@@ -3008,7 +3037,7 @@ var DeepMap = class {
|
|
|
3008
3037
|
has(keys) {
|
|
3009
3038
|
let currentMap = this.map;
|
|
3010
3039
|
if (!keys.length) {
|
|
3011
|
-
|
|
3040
|
+
keys = [this.emptyKey];
|
|
3012
3041
|
}
|
|
3013
3042
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
3014
3043
|
const key = keys[i];
|
|
@@ -3032,7 +3061,7 @@ var DeepMap = class {
|
|
|
3032
3061
|
return;
|
|
3033
3062
|
}
|
|
3034
3063
|
const { map: map2 } = pair;
|
|
3035
|
-
const keys = [...parentKeys, key];
|
|
3064
|
+
const keys = key === this.emptyKey ? [] : [...parentKeys, key];
|
|
3036
3065
|
const next = once(() => {
|
|
3037
3066
|
if (map2) {
|
|
3038
3067
|
map2.forEach((_, k) => {
|
|
@@ -3048,7 +3077,12 @@ var DeepMap = class {
|
|
|
3048
3077
|
getArray(fn) {
|
|
3049
3078
|
const result = [];
|
|
3050
3079
|
this.visit((pair, keys) => {
|
|
3051
|
-
|
|
3080
|
+
const res = fn(__spreadProps(__spreadValues({}, pair), { keys }));
|
|
3081
|
+
if (keys.length === 0) {
|
|
3082
|
+
result.splice(0, 0, res);
|
|
3083
|
+
} else {
|
|
3084
|
+
result.push(res);
|
|
3085
|
+
}
|
|
3052
3086
|
});
|
|
3053
3087
|
return result;
|
|
3054
3088
|
}
|
|
@@ -3134,7 +3168,7 @@ function lazyGroup(groupParams, rootData) {
|
|
|
3134
3168
|
} = groupParams;
|
|
3135
3169
|
const deepMap = new DeepMap();
|
|
3136
3170
|
function traverseValues(pivotDeepMap, container, pivot2, pivotIndex = 0, currentPivotKeys2 = []) {
|
|
3137
|
-
const last = pivotIndex === pivot2.length - 1;
|
|
3171
|
+
const last = !pivot2.length || pivotIndex === pivot2.length - 1;
|
|
3138
3172
|
const values = container[(mappings == null ? void 0 : mappings.values) || "values"] || {};
|
|
3139
3173
|
for (var k in values)
|
|
3140
3174
|
if (values.hasOwnProperty(k)) {
|
|
@@ -3158,7 +3192,7 @@ function lazyGroup(groupParams, rootData) {
|
|
|
3158
3192
|
rootData.visitDepthFirst((lazyGroupRowInfo, keys, _index, next) => {
|
|
3159
3193
|
const [_rootKey, ...currentGroupKeys] = keys;
|
|
3160
3194
|
const dataArray = lazyGroupRowInfo.items;
|
|
3161
|
-
if (currentGroupKeys.length == groupBy.length) {
|
|
3195
|
+
if (currentGroupKeys.length == groupBy.length && groupBy.length) {
|
|
3162
3196
|
const deepMapGroupValue = deepMap.get(currentGroupKeys);
|
|
3163
3197
|
if (deepMapGroupValue) {
|
|
3164
3198
|
deepMapGroupValue.items = dataArray;
|
|
@@ -3180,9 +3214,11 @@ function lazyGroup(groupParams, rootData) {
|
|
|
3180
3214
|
const dataObject = dataArray[i].data;
|
|
3181
3215
|
const dataKeys = dataArray[i].keys;
|
|
3182
3216
|
let item = dataObject;
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3217
|
+
if (dataKeys.length) {
|
|
3218
|
+
const { field: groupByProperty } = groupBy[dataKeys.length - 1];
|
|
3219
|
+
const key = item[groupByProperty];
|
|
3220
|
+
currentGroupKeys.push(key);
|
|
3221
|
+
}
|
|
3186
3222
|
const deepMapGroupValue = {
|
|
3187
3223
|
items: [],
|
|
3188
3224
|
commonData: dataObject,
|
|
@@ -3194,7 +3230,9 @@ function lazyGroup(groupParams, rootData) {
|
|
|
3194
3230
|
const pivotContainer = dataArray[i].pivot;
|
|
3195
3231
|
traverseValues(pivotDeepMap, pivotContainer, pivot, 0, currentPivotKeys);
|
|
3196
3232
|
}
|
|
3197
|
-
|
|
3233
|
+
if (dataKeys.length) {
|
|
3234
|
+
currentGroupKeys.pop();
|
|
3235
|
+
}
|
|
3198
3236
|
}
|
|
3199
3237
|
next == null ? void 0 : next();
|
|
3200
3238
|
});
|
|
@@ -3210,6 +3248,37 @@ function lazyGroup(groupParams, rootData) {
|
|
|
3210
3248
|
}
|
|
3211
3249
|
return result;
|
|
3212
3250
|
}
|
|
3251
|
+
function processGroup(deepMap, currentGroupKeys, currentPivotKeys, item, pivot, reducers, topLevelPivotColumns, initialReducerValue, defaultToKey = DEFAULT_TO_KEY) {
|
|
3252
|
+
const {
|
|
3253
|
+
items: currentGroupItems,
|
|
3254
|
+
reducerResults,
|
|
3255
|
+
pivotDeepMap
|
|
3256
|
+
} = deepMap.get(currentGroupKeys);
|
|
3257
|
+
currentGroupItems.push(item);
|
|
3258
|
+
if (reducers) {
|
|
3259
|
+
computeReducersFor(item, reducers, reducerResults);
|
|
3260
|
+
}
|
|
3261
|
+
if (pivot) {
|
|
3262
|
+
for (let pivotIndex = 0, pivotLength = pivot.length; pivotIndex < pivotLength; pivotIndex++) {
|
|
3263
|
+
const { field: pivotField, toKey: pivotToKey } = pivot[pivotIndex];
|
|
3264
|
+
const pivotKey = (pivotToKey || defaultToKey)(item[pivotField], item);
|
|
3265
|
+
currentPivotKeys.push(pivotKey);
|
|
3266
|
+
if (!pivotDeepMap.has(currentPivotKeys)) {
|
|
3267
|
+
topLevelPivotColumns.set(currentPivotKeys, true);
|
|
3268
|
+
pivotDeepMap == null ? void 0 : pivotDeepMap.set(currentPivotKeys, {
|
|
3269
|
+
reducerResults: __spreadValues({}, initialReducerValue),
|
|
3270
|
+
items: []
|
|
3271
|
+
});
|
|
3272
|
+
}
|
|
3273
|
+
const { reducerResults: pivotReducerResults, items: pivotGroupItems } = pivotDeepMap.get(currentPivotKeys);
|
|
3274
|
+
pivotGroupItems.push(item);
|
|
3275
|
+
if (reducers) {
|
|
3276
|
+
computeReducersFor(item, reducers, pivotReducerResults);
|
|
3277
|
+
}
|
|
3278
|
+
}
|
|
3279
|
+
currentPivotKeys.length = 0;
|
|
3280
|
+
}
|
|
3281
|
+
}
|
|
3213
3282
|
function group(groupParams, data) {
|
|
3214
3283
|
const {
|
|
3215
3284
|
groupBy,
|
|
@@ -3224,6 +3293,16 @@ function group(groupParams, data) {
|
|
|
3224
3293
|
let currentPivotKeys = [];
|
|
3225
3294
|
const initialReducerValue = initReducers(reducers);
|
|
3226
3295
|
const globalReducerResults = __spreadValues({}, initialReducerValue);
|
|
3296
|
+
if (!groupByLength) {
|
|
3297
|
+
const deepMapGroupValue = {
|
|
3298
|
+
items: [],
|
|
3299
|
+
reducerResults: __spreadValues({}, initialReducerValue)
|
|
3300
|
+
};
|
|
3301
|
+
if (pivot) {
|
|
3302
|
+
deepMapGroupValue.pivotDeepMap = new DeepMap();
|
|
3303
|
+
}
|
|
3304
|
+
deepMap.set(currentGroupKeys, deepMapGroupValue);
|
|
3305
|
+
}
|
|
3227
3306
|
for (let i = 0, len = data.length; i < len; i++) {
|
|
3228
3307
|
let item = data[i];
|
|
3229
3308
|
for (let groupByIndex = 0; groupByIndex < groupByLength; groupByIndex++) {
|
|
@@ -3240,38 +3319,10 @@ function group(groupParams, data) {
|
|
|
3240
3319
|
}
|
|
3241
3320
|
deepMap.set(currentGroupKeys, deepMapGroupValue);
|
|
3242
3321
|
}
|
|
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
|
-
}
|
|
3322
|
+
processGroup(deepMap, currentGroupKeys, currentPivotKeys, item, pivot, reducers, topLevelPivotColumns, initialReducerValue, defaultToKey);
|
|
3323
|
+
}
|
|
3324
|
+
if (!groupByLength) {
|
|
3325
|
+
processGroup(deepMap, currentGroupKeys, currentPivotKeys, item, pivot, reducers, topLevelPivotColumns, initialReducerValue, defaultToKey);
|
|
3275
3326
|
}
|
|
3276
3327
|
if (reducers) {
|
|
3277
3328
|
computeReducersFor(item, reducers, globalReducerResults);
|
|
@@ -3515,7 +3566,7 @@ function buildDataSourceDataParams(componentState, overrides) {
|
|
|
3515
3566
|
};
|
|
3516
3567
|
if (componentState.livePagination !== void 0) {
|
|
3517
3568
|
dataSourceParams.livePaginationCursor = componentState.livePaginationCursor;
|
|
3518
|
-
dataSourceParams.
|
|
3569
|
+
dataSourceParams.__cursorId = componentState.cursorId;
|
|
3519
3570
|
}
|
|
3520
3571
|
if (componentState.lazyLoad) {
|
|
3521
3572
|
if (componentState.lazyLoadBatchSize != null && componentState.lazyLoadBatchSize > 0) {
|
|
@@ -3546,7 +3597,7 @@ function loadData(data, componentState, actions, overrides) {
|
|
|
3546
3597
|
const lazyGroupData = componentState.originalLazyGroupData;
|
|
3547
3598
|
const key = [LAZY_ROOT_KEY_FOR_GROUPS, ...dataParams.groupKeys || []];
|
|
3548
3599
|
const existingGroupRowInfo = lazyGroupData.get(key);
|
|
3549
|
-
if (existingGroupRowInfo && existingGroupRowInfo.cache) {
|
|
3600
|
+
if (existingGroupRowInfo && existingGroupRowInfo.cache && key.length > 1) {
|
|
3550
3601
|
const items = existingGroupRowInfo.items;
|
|
3551
3602
|
const len = items.length;
|
|
3552
3603
|
let allLoaded = true;
|
|
@@ -3612,10 +3663,14 @@ function loadData(data, componentState, actions, overrides) {
|
|
|
3612
3663
|
lazyGroupData.set(key, newGroupRowInfo);
|
|
3613
3664
|
}
|
|
3614
3665
|
skipAssign = true;
|
|
3615
|
-
|
|
3666
|
+
let skipTriggerChangeAsAlreadyOriginalArrayWasUpdated = false;
|
|
3616
3667
|
if (!dataParams.groupKeys || !dataParams.groupKeys.length) {
|
|
3617
3668
|
const topLevelItems = lazyGroupData.get([LAZY_ROOT_KEY_FOR_GROUPS]);
|
|
3618
3669
|
actions.originalDataArray = [...topLevelItems.items];
|
|
3670
|
+
skipTriggerChangeAsAlreadyOriginalArrayWasUpdated = true;
|
|
3671
|
+
}
|
|
3672
|
+
if (!skipTriggerChangeAsAlreadyOriginalArrayWasUpdated) {
|
|
3673
|
+
actions.originalLazyGroupDataChangeDetect = getChangeDetect();
|
|
3619
3674
|
}
|
|
3620
3675
|
}
|
|
3621
3676
|
} else {
|
|
@@ -3701,7 +3756,8 @@ function useLoadData() {
|
|
|
3701
3756
|
const componentState2 = getComponentState();
|
|
3702
3757
|
if (initialRef.current) {
|
|
3703
3758
|
initialRef.current = false;
|
|
3704
|
-
|
|
3759
|
+
const dataParams = buildDataSourceDataParams(componentState2);
|
|
3760
|
+
actions.dataParams = dataParams;
|
|
3705
3761
|
}
|
|
3706
3762
|
}, depsObject);
|
|
3707
3763
|
}
|
|
@@ -3714,7 +3770,6 @@ function useLazyLoadRange() {
|
|
|
3714
3770
|
const loadingCache = useMemo4(() => {
|
|
3715
3771
|
return new Map();
|
|
3716
3772
|
}, [componentState.data]);
|
|
3717
|
-
globalThis.loadingCache = loadingCache;
|
|
3718
3773
|
const {
|
|
3719
3774
|
lazyLoadBatchSize,
|
|
3720
3775
|
notifyRenderRangeChange,
|
|
@@ -3722,13 +3777,13 @@ function useLazyLoadRange() {
|
|
|
3722
3777
|
scrollStopDelayUpdatedByTable
|
|
3723
3778
|
} = componentState;
|
|
3724
3779
|
const latestRenderRangeRef = useRef6(null);
|
|
3725
|
-
const loadRange = (
|
|
3780
|
+
const loadRange = (renderRange, cache = loadingCache) => {
|
|
3726
3781
|
const componentState2 = getComponentState();
|
|
3727
|
-
|
|
3728
|
-
if (!
|
|
3782
|
+
renderRange = renderRange || latestRenderRangeRef.current;
|
|
3783
|
+
if (!renderRange) {
|
|
3729
3784
|
return;
|
|
3730
3785
|
}
|
|
3731
|
-
const { renderStartIndex: startIndex, renderEndIndex: endIndex } =
|
|
3786
|
+
const { renderStartIndex: startIndex, renderEndIndex: endIndex } = renderRange;
|
|
3732
3787
|
if (!lazyLoadBatchSize || lazyLoadBatchSize <= 0) {
|
|
3733
3788
|
return;
|
|
3734
3789
|
}
|
|
@@ -3743,9 +3798,9 @@ function useLazyLoadRange() {
|
|
|
3743
3798
|
const debouncedLoadRange = useMemo4(() => debounce(loadRange, { wait: scrollStopDelayUpdatedByTable }), [scrollStopDelayUpdatedByTable]);
|
|
3744
3799
|
useEffect8(() => {
|
|
3745
3800
|
if (lazyLoadBatchSize && lazyLoadBatchSize > 0) {
|
|
3746
|
-
return notifyRenderRangeChange.onChange((
|
|
3747
|
-
latestRenderRangeRef.current =
|
|
3748
|
-
loadRange(
|
|
3801
|
+
return notifyRenderRangeChange.onChange((renderRange) => {
|
|
3802
|
+
latestRenderRangeRef.current = renderRange;
|
|
3803
|
+
loadRange(renderRange, loadingCache);
|
|
3749
3804
|
});
|
|
3750
3805
|
}
|
|
3751
3806
|
return;
|
|
@@ -4156,7 +4211,7 @@ function getInterceptActions() {
|
|
|
4156
4211
|
},
|
|
4157
4212
|
cursorId: (cursorId, { actions, state }) => {
|
|
4158
4213
|
const dataParams = buildDataSourceDataParams(state, {
|
|
4159
|
-
cursorId
|
|
4214
|
+
__cursorId: cursorId
|
|
4160
4215
|
});
|
|
4161
4216
|
actions.dataParams = dataParams;
|
|
4162
4217
|
},
|
|
@@ -4181,7 +4236,7 @@ function getInterceptActions() {
|
|
|
4181
4236
|
|
|
4182
4237
|
// src/utils/groupAndPivot/getPivotColumnsAndColumnGroups.ts
|
|
4183
4238
|
function prepareColumn(column) {
|
|
4184
|
-
const { pivotByAtIndex: pivotByForColumn } = column;
|
|
4239
|
+
const { pivotByAtIndex: pivotByForColumn, pivotAggregator } = column;
|
|
4185
4240
|
if (pivotByForColumn == null ? void 0 : pivotByForColumn.column) {
|
|
4186
4241
|
if (typeof pivotByForColumn.column === "function") {
|
|
4187
4242
|
Object.assign(column, pivotByForColumn.column({ column }));
|
|
@@ -4189,6 +4244,13 @@ function prepareColumn(column) {
|
|
|
4189
4244
|
Object.assign(column, pivotByForColumn.column);
|
|
4190
4245
|
}
|
|
4191
4246
|
}
|
|
4247
|
+
if (pivotAggregator == null ? void 0 : pivotAggregator.pivotColumn) {
|
|
4248
|
+
if (typeof pivotAggregator.pivotColumn === "function") {
|
|
4249
|
+
Object.assign(column, pivotAggregator.pivotColumn({ column }));
|
|
4250
|
+
} else {
|
|
4251
|
+
Object.assign(column, pivotAggregator.pivotColumn);
|
|
4252
|
+
}
|
|
4253
|
+
}
|
|
4192
4254
|
return column;
|
|
4193
4255
|
}
|
|
4194
4256
|
function prepareColumnGroup(columnGroup) {
|
|
@@ -4319,7 +4381,7 @@ function getPivotColumnsAndColumnGroups({
|
|
|
4319
4381
|
next == null ? void 0 : next();
|
|
4320
4382
|
}
|
|
4321
4383
|
});
|
|
4322
|
-
if (
|
|
4384
|
+
if (!pivotLength) {
|
|
4323
4385
|
aggregationReducers.forEach((reducer, index) => {
|
|
4324
4386
|
columns.set(`total:${reducer.id}`, prepareColumn({
|
|
4325
4387
|
header: `${reducer.name || reducer.id} total`,
|
|
@@ -4492,7 +4554,7 @@ function DataSourceWithContext(props) {
|
|
|
4492
4554
|
if (typeof children === "function") {
|
|
4493
4555
|
children = children(computedValues);
|
|
4494
4556
|
}
|
|
4495
|
-
return /* @__PURE__ */
|
|
4557
|
+
return /* @__PURE__ */ createElement6(Fragment2, null, children);
|
|
4496
4558
|
}
|
|
4497
4559
|
var DataSourceRoot = getComponentStateRoot({
|
|
4498
4560
|
initSetupState: initSetupState2,
|
|
@@ -4515,14 +4577,14 @@ function DataSourceCmp({ children }) {
|
|
|
4515
4577
|
globalThis.getDataSourceState = getState;
|
|
4516
4578
|
}
|
|
4517
4579
|
useLoadData();
|
|
4518
|
-
return /* @__PURE__ */
|
|
4580
|
+
return /* @__PURE__ */ createElement6(DataSourceContext.Provider, {
|
|
4519
4581
|
value: contextValue
|
|
4520
|
-
}, /* @__PURE__ */
|
|
4582
|
+
}, /* @__PURE__ */ createElement6(DataSourceWithContext, {
|
|
4521
4583
|
children
|
|
4522
4584
|
}));
|
|
4523
4585
|
}
|
|
4524
4586
|
function DataSource(props) {
|
|
4525
|
-
return /* @__PURE__ */
|
|
4587
|
+
return /* @__PURE__ */ createElement6(DataSourceRoot, __spreadValues({}, props), /* @__PURE__ */ createElement6(DataSourceCmp, {
|
|
4526
4588
|
children: props.children
|
|
4527
4589
|
}));
|
|
4528
4590
|
}
|
|
@@ -4851,7 +4913,7 @@ function getColumnsWhenGrouping(params) {
|
|
|
4851
4913
|
}, toggleGroupRow, groupColumn);
|
|
4852
4914
|
computedColumns.set(generatedGroupColumn.id || `group-by-${groupByForColumn.field}`, generatedGroupColumn);
|
|
4853
4915
|
});
|
|
4854
|
-
} else if (groupRenderStrategy === "single-column") {
|
|
4916
|
+
} else if (groupRenderStrategy === "single-column" && groupBy.length) {
|
|
4855
4917
|
const singleGroupColumn = getSingleGroupColumn({
|
|
4856
4918
|
groupCount: groupBy.length,
|
|
4857
4919
|
groupBy,
|
|
@@ -4861,7 +4923,14 @@ function getColumnsWhenGrouping(params) {
|
|
|
4861
4923
|
computedColumns.set(singleGroupColumn.id || "group-by", singleGroupColumn);
|
|
4862
4924
|
}
|
|
4863
4925
|
if (pivotColumns) {
|
|
4926
|
+
const columnsByField = {};
|
|
4927
|
+
columns.forEach((col) => {
|
|
4928
|
+
if (col.field) {
|
|
4929
|
+
columnsByField[col.field] = col;
|
|
4930
|
+
}
|
|
4931
|
+
});
|
|
4864
4932
|
pivotColumns.forEach((col, key) => {
|
|
4933
|
+
var _a, _b;
|
|
4865
4934
|
if (col.pivotTotalColumn && pivotTotalColumnPosition === false) {
|
|
4866
4935
|
return;
|
|
4867
4936
|
}
|
|
@@ -4877,6 +4946,10 @@ function getColumnsWhenGrouping(params) {
|
|
|
4877
4946
|
column = __spreadValues(__spreadValues({}, column), pivotColumn);
|
|
4878
4947
|
}
|
|
4879
4948
|
}
|
|
4949
|
+
if (column.inheritFromColumn !== false) {
|
|
4950
|
+
const colToInheritFrom = typeof column.inheritFromColumn === "string" ? columns.get(column.inheritFromColumn) : ((_a = column.pivotAggregator) == null ? void 0 : _a.field) ? columnsByField[(_b = column.pivotAggregator) == null ? void 0 : _b.field] : void 0;
|
|
4951
|
+
column = __spreadValues(__spreadValues({}, colToInheritFrom), column);
|
|
4952
|
+
}
|
|
4880
4953
|
if (!column.render && column.renderValue) {
|
|
4881
4954
|
column.render = (renderOptions) => {
|
|
4882
4955
|
return column.renderValue(renderOptions);
|
|
@@ -5049,7 +5122,7 @@ function useComputed() {
|
|
|
5049
5122
|
|
|
5050
5123
|
// src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
|
|
5051
5124
|
import {
|
|
5052
|
-
createElement as
|
|
5125
|
+
createElement as createElement7,
|
|
5053
5126
|
forwardRef
|
|
5054
5127
|
} from "react";
|
|
5055
5128
|
|
|
@@ -5061,7 +5134,7 @@ var useInternalProps = () => {
|
|
|
5061
5134
|
// src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
|
|
5062
5135
|
var InfiniteTableBody = forwardRef(function InfiniteTableBody2(props, ref) {
|
|
5063
5136
|
const { rootClassName: rootClassName12 } = useInternalProps();
|
|
5064
|
-
return /* @__PURE__ */
|
|
5137
|
+
return /* @__PURE__ */ createElement7("div", __spreadProps(__spreadValues({
|
|
5065
5138
|
ref
|
|
5066
5139
|
}, props), {
|
|
5067
5140
|
className: join(`${rootClassName12}Body`, position.relative, flex["1"], transformTranslateZero, props.className)
|
|
@@ -5070,12 +5143,12 @@ var InfiniteTableBody = forwardRef(function InfiniteTableBody2(props, ref) {
|
|
|
5070
5143
|
|
|
5071
5144
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx
|
|
5072
5145
|
import {
|
|
5073
|
-
createElement as
|
|
5146
|
+
createElement as createElement19
|
|
5074
5147
|
} from "react";
|
|
5075
5148
|
|
|
5076
5149
|
// src/components/InfiniteTable/components/ScrollbarPlaceholder.tsx
|
|
5077
5150
|
import {
|
|
5078
|
-
createElement as
|
|
5151
|
+
createElement as createElement8,
|
|
5079
5152
|
memo as memo2
|
|
5080
5153
|
} from "react";
|
|
5081
5154
|
function HorizontalScrollbarPlaceholderFn(props) {
|
|
@@ -5083,7 +5156,7 @@ function HorizontalScrollbarPlaceholderFn(props) {
|
|
|
5083
5156
|
if (!scrollbarWidth2) {
|
|
5084
5157
|
return null;
|
|
5085
5158
|
}
|
|
5086
|
-
return /* @__PURE__ */
|
|
5159
|
+
return /* @__PURE__ */ createElement8("div", {
|
|
5087
5160
|
"data-name": "horizontal-scrollbar-placeholder",
|
|
5088
5161
|
style: __spreadValues({
|
|
5089
5162
|
position: "absolute",
|
|
@@ -5099,7 +5172,7 @@ function VerticalScrollbarPlaceholderFn(props) {
|
|
|
5099
5172
|
if (!scrollbarWidth2) {
|
|
5100
5173
|
return null;
|
|
5101
5174
|
}
|
|
5102
|
-
return /* @__PURE__ */
|
|
5175
|
+
return /* @__PURE__ */ createElement8("div", {
|
|
5103
5176
|
"data-name": "vertical-scrollbar-placeholder",
|
|
5104
5177
|
style: __spreadValues({
|
|
5105
5178
|
position: "absolute",
|
|
@@ -5125,21 +5198,22 @@ var HeaderWrapperCls = "_12zfob1v _16lm1iw16 _16lm1iw1 _16lm1iwj _16lm1iw10";
|
|
|
5125
5198
|
|
|
5126
5199
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
|
|
5127
5200
|
import {
|
|
5128
|
-
createElement as
|
|
5201
|
+
createElement as createElement15,
|
|
5129
5202
|
memo as memo6
|
|
5130
5203
|
} from "react";
|
|
5131
5204
|
import { useCallback as useCallback8, useEffect as useEffect14, useRef as useRef9 } from "react";
|
|
5132
5205
|
|
|
5133
5206
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
|
|
5134
5207
|
import {
|
|
5135
|
-
|
|
5136
|
-
createElement as
|
|
5208
|
+
createContext as createContext4,
|
|
5209
|
+
createElement as createElement11
|
|
5137
5210
|
} from "react";
|
|
5138
|
-
import { useCallback as useCallback7, useEffect as useEffect12, useRef as useRef8 } from "react";
|
|
5211
|
+
import { useCallback as useCallback7, useContext as useContext5, useEffect as useEffect12, useRef as useRef8 } from "react";
|
|
5139
5212
|
|
|
5140
5213
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCell.tsx
|
|
5141
5214
|
import {
|
|
5142
|
-
|
|
5215
|
+
Fragment as Fragment3,
|
|
5216
|
+
createElement as createElement9,
|
|
5143
5217
|
memo as memo3
|
|
5144
5218
|
} from "react";
|
|
5145
5219
|
|
|
@@ -5163,7 +5237,7 @@ var { rootClassName: rootClassName2 } = internalProps;
|
|
|
5163
5237
|
var InfiniteTableCellClassName = `${rootClassName2}Cell`;
|
|
5164
5238
|
var InfiniteTableCellContentClassName = `${rootClassName2}Cell_content`;
|
|
5165
5239
|
function InfiniteTableCellFn(props) {
|
|
5166
|
-
var _b, _c;
|
|
5240
|
+
var _b, _c, _d, _e;
|
|
5167
5241
|
const _a = props, {
|
|
5168
5242
|
cssEllipsis = true,
|
|
5169
5243
|
virtualized = true,
|
|
@@ -5171,10 +5245,12 @@ function InfiniteTableCellFn(props) {
|
|
|
5171
5245
|
offsetProperty = "left",
|
|
5172
5246
|
column,
|
|
5173
5247
|
domRef,
|
|
5174
|
-
children,
|
|
5175
5248
|
afterChildren,
|
|
5176
5249
|
beforeChildren,
|
|
5177
|
-
offset
|
|
5250
|
+
offset,
|
|
5251
|
+
cellType,
|
|
5252
|
+
cssPosition: _cssPosition,
|
|
5253
|
+
renderChildren
|
|
5178
5254
|
} = _a, domProps = __objRest(_a, [
|
|
5179
5255
|
"cssEllipsis",
|
|
5180
5256
|
"virtualized",
|
|
@@ -5182,11 +5258,14 @@ function InfiniteTableCellFn(props) {
|
|
|
5182
5258
|
"offsetProperty",
|
|
5183
5259
|
"column",
|
|
5184
5260
|
"domRef",
|
|
5185
|
-
"children",
|
|
5186
5261
|
"afterChildren",
|
|
5187
5262
|
"beforeChildren",
|
|
5188
|
-
"offset"
|
|
5263
|
+
"offset",
|
|
5264
|
+
"cellType",
|
|
5265
|
+
"cssPosition",
|
|
5266
|
+
"renderChildren"
|
|
5189
5267
|
]);
|
|
5268
|
+
const children = renderChildren();
|
|
5190
5269
|
const { columnShifts } = useInfiniteTableState();
|
|
5191
5270
|
const shifting = !!columnShifts;
|
|
5192
5271
|
const style = __spreadValues({
|
|
@@ -5201,14 +5280,21 @@ function InfiniteTableCellFn(props) {
|
|
|
5201
5280
|
style.transform = `translate3d(${shiftLeft}px, 0px, 0px)`;
|
|
5202
5281
|
}
|
|
5203
5282
|
}
|
|
5204
|
-
|
|
5205
|
-
ref: domRef,
|
|
5283
|
+
const finalDOMProps = __spreadProps(__spreadValues({}, domProps), {
|
|
5206
5284
|
style,
|
|
5207
|
-
"data-name":
|
|
5208
|
-
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}` : "")
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5285
|
+
"data-name": "Cell",
|
|
5286
|
+
className: join(domProps.className, columnAlignCellStyle[(_b = column.align) != null ? _b : "start"], justifyContent[(_c = column.align) != null ? _c : "start"], InfiniteTableCellClassName, ColumnCellCls, shifting ? `${InfiniteTableCellClassName}--shifting ${CellClsVariants.shifting}` : ""),
|
|
5287
|
+
children: /* @__PURE__ */ createElement9(Fragment3, null, beforeChildren, /* @__PURE__ */ createElement9("div", {
|
|
5288
|
+
className: `${InfiniteTableCellContentClassName} ${cssEllipsis ? cssEllipsisClassName : overflow.hidden}`
|
|
5289
|
+
}, children), afterChildren)
|
|
5290
|
+
});
|
|
5291
|
+
const RenderComponent = cellType === "body" ? (_d = column.components) == null ? void 0 : _d.ColumnCell : (_e = column.components) == null ? void 0 : _e.HeaderCell;
|
|
5292
|
+
if (RenderComponent) {
|
|
5293
|
+
return /* @__PURE__ */ createElement9(RenderComponent, __spreadValues({}, finalDOMProps));
|
|
5294
|
+
}
|
|
5295
|
+
return /* @__PURE__ */ createElement9("div", __spreadProps(__spreadValues({}, finalDOMProps), {
|
|
5296
|
+
ref: domRef
|
|
5297
|
+
}));
|
|
5212
5298
|
}
|
|
5213
5299
|
var InfiniteTableCell = memo3(InfiniteTableCellFn);
|
|
5214
5300
|
|
|
@@ -5411,7 +5497,7 @@ import { createPortal } from "react-dom";
|
|
|
5411
5497
|
|
|
5412
5498
|
// src/components/InfiniteTable/components/icons/SortIcon.tsx
|
|
5413
5499
|
import {
|
|
5414
|
-
createElement as
|
|
5500
|
+
createElement as createElement10
|
|
5415
5501
|
} from "react";
|
|
5416
5502
|
import { useEffect as useEffect11, useState as useState7 } from "react";
|
|
5417
5503
|
var defaultLineStyle = {
|
|
@@ -5467,23 +5553,24 @@ function SortIcon(props) {
|
|
|
5467
5553
|
if (direction === -1) {
|
|
5468
5554
|
indexStyle.top = "100%";
|
|
5469
5555
|
}
|
|
5470
|
-
return /* @__PURE__ */
|
|
5556
|
+
return /* @__PURE__ */ createElement10("div", {
|
|
5471
5557
|
style: __spreadProps(__spreadValues({}, style), { width: size }),
|
|
5472
5558
|
className: join(className, InfiniteTableIconClassName, `${InfiniteTableIconClassName}-sort`)
|
|
5473
|
-
}, showIndex ? /* @__PURE__ */
|
|
5559
|
+
}, showIndex ? /* @__PURE__ */ createElement10("div", {
|
|
5474
5560
|
"data-name": "index",
|
|
5475
5561
|
style: indexStyle
|
|
5476
|
-
}, index) : null, /* @__PURE__ */
|
|
5562
|
+
}, index) : null, /* @__PURE__ */ createElement10("div", {
|
|
5477
5563
|
style: __spreadValues({ width: sizes[0] }, lineStyle),
|
|
5478
5564
|
onTransitionEnd
|
|
5479
|
-
}), /* @__PURE__ */
|
|
5565
|
+
}), /* @__PURE__ */ createElement10("div", {
|
|
5480
5566
|
style: __spreadValues({ width: sizes[1] }, lineStyle)
|
|
5481
|
-
}), /* @__PURE__ */
|
|
5567
|
+
}), /* @__PURE__ */ createElement10("div", {
|
|
5482
5568
|
style: __spreadValues({ width: sizes[2] }, lineStyle)
|
|
5483
5569
|
}));
|
|
5484
5570
|
}
|
|
5485
5571
|
|
|
5486
5572
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
|
|
5573
|
+
var InfiniteTableHeaderCellContext = createContext4(null);
|
|
5487
5574
|
var defaultStyle = {
|
|
5488
5575
|
position: "absolute",
|
|
5489
5576
|
top: 0
|
|
@@ -5502,24 +5589,33 @@ function InfiniteTableHeaderCell(props) {
|
|
|
5502
5589
|
}
|
|
5503
5590
|
const sortInfo = column.computedSortInfo;
|
|
5504
5591
|
let header = column.header;
|
|
5505
|
-
if (header instanceof Function) {
|
|
5506
|
-
header = header({
|
|
5507
|
-
column,
|
|
5508
|
-
columnSortInfo: sortInfo
|
|
5509
|
-
});
|
|
5510
|
-
}
|
|
5511
|
-
header = header != null ? header : column.name;
|
|
5512
|
-
const sortTool = /* @__PURE__ */ createElement10(SortIcon, {
|
|
5513
|
-
index: column.computedMultiSort ? column.computedSortIndex + 1 : void 0,
|
|
5514
|
-
className: `${InfiniteTableHeaderCellClassName}__sort-icon ${HeaderSortIconCls}`,
|
|
5515
|
-
direction: column.computedSorted ? column.computedSortedAsc ? 1 : -1 : 0
|
|
5516
|
-
});
|
|
5517
|
-
const domRef = useRef8(null);
|
|
5518
5592
|
const ref = useCallback7((node) => {
|
|
5519
5593
|
var _a2;
|
|
5520
5594
|
domRef.current = node;
|
|
5521
5595
|
(_a2 = props.domRef) == null ? void 0 : _a2.call(props, node);
|
|
5522
5596
|
}, [props.domRef]);
|
|
5597
|
+
const sortTool = /* @__PURE__ */ createElement11(SortIcon, {
|
|
5598
|
+
index: column.computedMultiSort ? column.computedSortIndex + 1 : void 0,
|
|
5599
|
+
className: `${InfiniteTableHeaderCellClassName}__sort-icon ${HeaderSortIconCls}`,
|
|
5600
|
+
direction: column.computedSorted ? column.computedSortedAsc ? 1 : -1 : 0
|
|
5601
|
+
});
|
|
5602
|
+
const renderParam = {
|
|
5603
|
+
domRef: ref,
|
|
5604
|
+
column,
|
|
5605
|
+
columnSortInfo: sortInfo,
|
|
5606
|
+
sortTool
|
|
5607
|
+
};
|
|
5608
|
+
const renderChildren = () => {
|
|
5609
|
+
if (header instanceof Function) {
|
|
5610
|
+
header = /* @__PURE__ */ createElement11(RenderHookComponent, {
|
|
5611
|
+
render: header,
|
|
5612
|
+
renderParam
|
|
5613
|
+
});
|
|
5614
|
+
}
|
|
5615
|
+
header = header != null ? header : column.name;
|
|
5616
|
+
return header;
|
|
5617
|
+
};
|
|
5618
|
+
const domRef = useRef8(null);
|
|
5523
5619
|
const {
|
|
5524
5620
|
computed: { computedRemainingSpace },
|
|
5525
5621
|
componentState: { portalDOMRef }
|
|
@@ -5547,7 +5643,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
5547
5643
|
let offset = offsetFromProps != null ? offsetFromProps : virtualized ? 0 : column.computedPinningOffset;
|
|
5548
5644
|
let draggingProxy = null;
|
|
5549
5645
|
if (dragging) {
|
|
5550
|
-
draggingProxy = /* @__PURE__ */
|
|
5646
|
+
draggingProxy = /* @__PURE__ */ createElement11("div", {
|
|
5551
5647
|
className: `${InfiniteTableHeaderCellClassName}Proxy ${HeaderCellProxy}`,
|
|
5552
5648
|
style: {
|
|
5553
5649
|
position: "absolute",
|
|
@@ -5560,8 +5656,12 @@ function InfiniteTableHeaderCell(props) {
|
|
|
5560
5656
|
}, header);
|
|
5561
5657
|
draggingProxy = createPortal(draggingProxy, portalDOMRef.current);
|
|
5562
5658
|
}
|
|
5563
|
-
|
|
5659
|
+
const ContextProvider = InfiniteTableHeaderCellContext.Provider;
|
|
5660
|
+
return /* @__PURE__ */ createElement11(ContextProvider, {
|
|
5661
|
+
value: renderParam
|
|
5662
|
+
}, /* @__PURE__ */ createElement11(InfiniteTableCell, {
|
|
5564
5663
|
domRef: ref,
|
|
5664
|
+
cellType: "header",
|
|
5565
5665
|
column,
|
|
5566
5666
|
"data-name": `HeaderCell`,
|
|
5567
5667
|
"data-column-id": column.id,
|
|
@@ -5571,21 +5671,26 @@ function InfiniteTableHeaderCell(props) {
|
|
|
5571
5671
|
onPointerUp,
|
|
5572
5672
|
className: join(InfiniteTableHeaderCellClassName, userSelect.none, column.computedSortable ? cursor.pointer : "", useCellClassName(column, [InfiniteTableHeaderCellClassName, InfiniteTableCellClassName], HeaderCellRecipe, { dragging }), CellCls),
|
|
5573
5673
|
cssEllipsis: (_d = (_c = column.headerCssEllipsis) != null ? _c : column.cssEllipsis) != null ? _d : true,
|
|
5574
|
-
afterChildren: sortTool
|
|
5575
|
-
|
|
5674
|
+
afterChildren: sortTool,
|
|
5675
|
+
renderChildren
|
|
5676
|
+
}), draggingProxy);
|
|
5677
|
+
}
|
|
5678
|
+
function useInfiniteHeaderCell() {
|
|
5679
|
+
const result = useContext5(InfiniteTableHeaderCellContext);
|
|
5680
|
+
return result;
|
|
5576
5681
|
}
|
|
5577
5682
|
|
|
5578
5683
|
// src/components/RawList/index.tsx
|
|
5579
5684
|
import {
|
|
5580
|
-
createElement as
|
|
5685
|
+
createElement as createElement14,
|
|
5581
5686
|
memo as memo5
|
|
5582
5687
|
} from "react";
|
|
5583
5688
|
import { useEffect as useEffect13 } from "react";
|
|
5584
5689
|
|
|
5585
5690
|
// src/components/RawList/AvoidReactDiff.tsx
|
|
5586
5691
|
import {
|
|
5587
|
-
Fragment as
|
|
5588
|
-
createElement as
|
|
5692
|
+
Fragment as Fragment4,
|
|
5693
|
+
createElement as createElement12,
|
|
5589
5694
|
memo as memo4
|
|
5590
5695
|
} from "react";
|
|
5591
5696
|
import { useLayoutEffect as useLayoutEffect3, useState as useState8 } from "react";
|
|
@@ -5597,7 +5702,7 @@ function AvoidReactDiffFn(props) {
|
|
|
5597
5702
|
});
|
|
5598
5703
|
return remove;
|
|
5599
5704
|
}, [props.updater]);
|
|
5600
|
-
return /* @__PURE__ */
|
|
5705
|
+
return /* @__PURE__ */ createElement12(Fragment4, null, children);
|
|
5601
5706
|
}
|
|
5602
5707
|
var AvoidReactDiff = memo4(AvoidReactDiffFn);
|
|
5603
5708
|
|
|
@@ -5606,7 +5711,7 @@ import { useMemo as useMemo8 } from "react";
|
|
|
5606
5711
|
|
|
5607
5712
|
// src/components/RawList/ReactVirtualRenderer.tsx
|
|
5608
5713
|
import {
|
|
5609
|
-
createElement as
|
|
5714
|
+
createElement as createElement13
|
|
5610
5715
|
} from "react";
|
|
5611
5716
|
|
|
5612
5717
|
// src/components/RawList/MappedItems.ts
|
|
@@ -5852,7 +5957,7 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
5852
5957
|
};
|
|
5853
5958
|
this.itemDOMRefs[elementIndex] = domRef;
|
|
5854
5959
|
this.updaters[elementIndex] = buildSubscriptionCallback();
|
|
5855
|
-
const item = /* @__PURE__ */
|
|
5960
|
+
const item = /* @__PURE__ */ createElement13(AvoidReactDiff, {
|
|
5856
5961
|
key: elementIndex,
|
|
5857
5962
|
name: `${elementIndex}`,
|
|
5858
5963
|
updater: this.updaters[elementIndex]
|
|
@@ -5949,7 +6054,7 @@ function RawListFn(props) {
|
|
|
5949
6054
|
});
|
|
5950
6055
|
return remove;
|
|
5951
6056
|
}, [brain, onRenderUpdater]);
|
|
5952
|
-
return /* @__PURE__ */
|
|
6057
|
+
return /* @__PURE__ */ createElement14(AvoidReactDiff, {
|
|
5953
6058
|
updater: onRenderUpdater
|
|
5954
6059
|
});
|
|
5955
6060
|
}
|
|
@@ -5974,7 +6079,7 @@ function InfiniteTableHeaderFn(props) {
|
|
|
5974
6079
|
}
|
|
5975
6080
|
return null;
|
|
5976
6081
|
}
|
|
5977
|
-
return /* @__PURE__ */
|
|
6082
|
+
return /* @__PURE__ */ createElement15(InfiniteTableHeaderCell, {
|
|
5978
6083
|
domRef: domRef2,
|
|
5979
6084
|
column,
|
|
5980
6085
|
headerHeight,
|
|
@@ -6001,7 +6106,7 @@ function InfiniteTableHeaderFn(props) {
|
|
|
6001
6106
|
className: join(TableHeaderClassName, `${TableHeaderClassName}--virtualized`, className, headerCls),
|
|
6002
6107
|
style
|
|
6003
6108
|
};
|
|
6004
|
-
return /* @__PURE__ */
|
|
6109
|
+
return /* @__PURE__ */ createElement15("div", __spreadValues({}, domProps), /* @__PURE__ */ createElement15(RawList, {
|
|
6005
6110
|
brain,
|
|
6006
6111
|
renderItem: renderColumn
|
|
6007
6112
|
}));
|
|
@@ -6010,7 +6115,7 @@ var InfiniteTableHeader = memo6(InfiniteTableHeaderFn);
|
|
|
6010
6115
|
|
|
6011
6116
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderUnvirtualized.tsx
|
|
6012
6117
|
import {
|
|
6013
|
-
createElement as
|
|
6118
|
+
createElement as createElement18,
|
|
6014
6119
|
memo as memo7,
|
|
6015
6120
|
useMemo as useMemo9,
|
|
6016
6121
|
useRef as useRef10
|
|
@@ -6018,7 +6123,7 @@ import {
|
|
|
6018
6123
|
|
|
6019
6124
|
// src/components/InfiniteTable/components/InfiniteTableHeader/renderColumnHeaderGroups.tsx
|
|
6020
6125
|
import {
|
|
6021
|
-
createElement as
|
|
6126
|
+
createElement as createElement17
|
|
6022
6127
|
} from "react";
|
|
6023
6128
|
|
|
6024
6129
|
// src/components/InfiniteTable/components/InfiniteTableHeader/buildColumnAndGroupTree.ts
|
|
@@ -6110,7 +6215,7 @@ function assignGroupOffsetsAndComputedWidths(items, groupOffset = 0) {
|
|
|
6110
6215
|
|
|
6111
6216
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
|
|
6112
6217
|
import {
|
|
6113
|
-
createElement as
|
|
6218
|
+
createElement as createElement16
|
|
6114
6219
|
} from "react";
|
|
6115
6220
|
var TableHeaderGroupClassName = `${rootClassName}HeaderGroup`;
|
|
6116
6221
|
function InfiniteTableHeaderGroup(props) {
|
|
@@ -6125,16 +6230,16 @@ function InfiniteTableHeaderGroup(props) {
|
|
|
6125
6230
|
width: columnGroup.computedWidth,
|
|
6126
6231
|
height
|
|
6127
6232
|
};
|
|
6128
|
-
return /* @__PURE__ */
|
|
6233
|
+
return /* @__PURE__ */ createElement16("div", {
|
|
6129
6234
|
"data-group-id": columnGroup.id,
|
|
6130
6235
|
className: join(HeaderGroupCls, TableHeaderGroupClassName, `${TableHeaderGroupClassName}--unvirtualized`),
|
|
6131
6236
|
style
|
|
6132
|
-
}, /* @__PURE__ */
|
|
6237
|
+
}, /* @__PURE__ */ createElement16("div", {
|
|
6133
6238
|
className: join(`${TableHeaderGroupClassName}__header`, HeaderGroup_Header),
|
|
6134
6239
|
style: { height: headerHeight }
|
|
6135
|
-
}, /* @__PURE__ */
|
|
6240
|
+
}, /* @__PURE__ */ createElement16("div", {
|
|
6136
6241
|
className: join(`${TableHeaderGroupClassName}__header-content`, cssEllipsisClassName)
|
|
6137
|
-
}, header)), /* @__PURE__ */
|
|
6242
|
+
}, header)), /* @__PURE__ */ createElement16("div", {
|
|
6138
6243
|
className: join(`${TableHeaderGroupClassName}__children`, HeaderGroup_Children)
|
|
6139
6244
|
}, props.children));
|
|
6140
6245
|
}
|
|
@@ -6157,7 +6262,7 @@ function renderColumnHeaderGroups(config) {
|
|
|
6157
6262
|
return items2.map((colGroupItem) => {
|
|
6158
6263
|
if (colGroupItem.type === "column") {
|
|
6159
6264
|
const col = colGroupItem.ref;
|
|
6160
|
-
return /* @__PURE__ */
|
|
6265
|
+
return /* @__PURE__ */ createElement17(InfiniteTableHeaderCell, {
|
|
6161
6266
|
key: col.id,
|
|
6162
6267
|
headerHeight: (columnGroupsMaxDepth - colGroupItem.depth + 2) * headerHeight,
|
|
6163
6268
|
column: col,
|
|
@@ -6171,7 +6276,7 @@ function renderColumnHeaderGroups(config) {
|
|
|
6171
6276
|
colIds.push(col.id);
|
|
6172
6277
|
return col;
|
|
6173
6278
|
});
|
|
6174
|
-
return /* @__PURE__ */
|
|
6279
|
+
return /* @__PURE__ */ createElement17(InfiniteTableHeaderGroup, {
|
|
6175
6280
|
key: `${colGroupItem.uniqueGroupId.join("/")}`,
|
|
6176
6281
|
columns: columns2,
|
|
6177
6282
|
height: (columnGroupsMaxDepth - colGroupItem.depth + 2) * headerHeight,
|
|
@@ -6245,7 +6350,7 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
|
|
|
6245
6350
|
columnGroupsMaxDepth
|
|
6246
6351
|
]);
|
|
6247
6352
|
const children = hasColumnGroups ? columnHeaderGroups : columns.map((c) => {
|
|
6248
|
-
return /* @__PURE__ */
|
|
6353
|
+
return /* @__PURE__ */ createElement18(InfiniteTableHeaderCell, {
|
|
6249
6354
|
key: c.id,
|
|
6250
6355
|
headerHeight,
|
|
6251
6356
|
column: c,
|
|
@@ -6270,14 +6375,14 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
|
|
|
6270
6375
|
const removeOnScroll = scroller.onScroll(onScroll);
|
|
6271
6376
|
return removeOnScroll;
|
|
6272
6377
|
}, [brain, scrollListener]);
|
|
6273
|
-
return /* @__PURE__ */
|
|
6378
|
+
return /* @__PURE__ */ createElement18("div", __spreadProps(__spreadValues({}, domProps), {
|
|
6274
6379
|
className: join(TableHeaderClassName2, `${TableHeaderClassName2}--unvirtualized`, pinning ? `${TableHeaderClassName2}--pinned ${TableHeaderClassName2}-${pinning}` : "", scrollable ? `${TableHeaderClassName2}--overflow` : "", domProps.className, HeaderClsRecipe({
|
|
6275
6380
|
pinned: pinning,
|
|
6276
6381
|
virtualized: false,
|
|
6277
6382
|
overflow: scrollable
|
|
6278
6383
|
})),
|
|
6279
6384
|
style
|
|
6280
|
-
}), /* @__PURE__ */
|
|
6385
|
+
}), /* @__PURE__ */ createElement18("div", {
|
|
6281
6386
|
style: { width: totalWidth },
|
|
6282
6387
|
className: join(flexFlow.row, display.flex),
|
|
6283
6388
|
ref: domRef
|
|
@@ -6316,7 +6421,7 @@ function TableHeaderWrapper(props) {
|
|
|
6316
6421
|
const unvirtualizedStyle = !virtualizeHeader && computedPinnedStartColumnsWidth ? {
|
|
6317
6422
|
left: computedPinnedStartWidth
|
|
6318
6423
|
} : void 0;
|
|
6319
|
-
const header = virtualizeHeader ? /* @__PURE__ */
|
|
6424
|
+
const header = virtualizeHeader ? /* @__PURE__ */ createElement19(InfiniteTableHeader, {
|
|
6320
6425
|
columns: computedUnpinnedColumns,
|
|
6321
6426
|
repaintId: virtualizeHeader ? repaintId : void 0,
|
|
6322
6427
|
brain,
|
|
@@ -6329,7 +6434,7 @@ function TableHeaderWrapper(props) {
|
|
|
6329
6434
|
},
|
|
6330
6435
|
availableWidth: computedUnpinnedColumnsWidth,
|
|
6331
6436
|
totalWidth: computedUnpinnedColumnsWidth
|
|
6332
|
-
}) : /* @__PURE__ */
|
|
6437
|
+
}) : /* @__PURE__ */ createElement19(InfiniteTableHeaderUnvirtualized, {
|
|
6333
6438
|
style: unvirtualizedStyle,
|
|
6334
6439
|
brain,
|
|
6335
6440
|
scrollable: true,
|
|
@@ -6338,12 +6443,12 @@ function TableHeaderWrapper(props) {
|
|
|
6338
6443
|
availableWidth: computedUnpinnedColumnsWidth,
|
|
6339
6444
|
totalWidth: computedUnpinnedColumnsWidth
|
|
6340
6445
|
});
|
|
6341
|
-
return /* @__PURE__ */
|
|
6446
|
+
return /* @__PURE__ */ createElement19("div", {
|
|
6342
6447
|
className: HeaderWrapperCls,
|
|
6343
6448
|
style: {
|
|
6344
6449
|
height: virtualizeHeader ? height : void 0
|
|
6345
6450
|
}
|
|
6346
|
-
}, hasPinnedStart ? /* @__PURE__ */
|
|
6451
|
+
}, hasPinnedStart ? /* @__PURE__ */ createElement19(InfiniteTableHeaderUnvirtualized, {
|
|
6347
6452
|
style: {
|
|
6348
6453
|
left: 0,
|
|
6349
6454
|
position: "absolute",
|
|
@@ -6355,7 +6460,7 @@ function TableHeaderWrapper(props) {
|
|
|
6355
6460
|
scrollable: computedPinnedStartOverflow,
|
|
6356
6461
|
pinning: "start",
|
|
6357
6462
|
scrollListener: computedPinnedStartOverflow ? pinnedStartScrollListener : void 0
|
|
6358
|
-
}) : null, header, hasPinnedEnd ? /* @__PURE__ */
|
|
6463
|
+
}) : null, header, hasPinnedEnd ? /* @__PURE__ */ createElement19(InfiniteTableHeaderUnvirtualized, {
|
|
6359
6464
|
style: {
|
|
6360
6465
|
right: scrollbars.vertical ? getScrollbarWidth() : 0,
|
|
6361
6466
|
position: "absolute",
|
|
@@ -6367,7 +6472,7 @@ function TableHeaderWrapper(props) {
|
|
|
6367
6472
|
scrollable: computedPinnedEndOverflow,
|
|
6368
6473
|
pinning: "end",
|
|
6369
6474
|
scrollListener: computedPinnedEndOverflow ? pinnedEndScrollListener : void 0
|
|
6370
|
-
}) : null, scrollbars.vertical ? /* @__PURE__ */
|
|
6475
|
+
}) : null, scrollbars.vertical ? /* @__PURE__ */ createElement19(VerticalScrollbarPlaceholder, {
|
|
6371
6476
|
style: {
|
|
6372
6477
|
height: "100%",
|
|
6373
6478
|
right: 0
|
|
@@ -6377,7 +6482,7 @@ function TableHeaderWrapper(props) {
|
|
|
6377
6482
|
|
|
6378
6483
|
// src/components/VirtualScrollContainer/index.tsx
|
|
6379
6484
|
import {
|
|
6380
|
-
createElement as
|
|
6485
|
+
createElement as createElement20,
|
|
6381
6486
|
forwardRef as forwardRef2
|
|
6382
6487
|
} from "react";
|
|
6383
6488
|
import { useRef as useRef11 } from "react";
|
|
@@ -6433,7 +6538,7 @@ var VirtualScrollContainer = forwardRef2(function VirtualScrollContainer2(props,
|
|
|
6433
6538
|
} = props;
|
|
6434
6539
|
const domRef = ref != null ? ref : useRef11(null);
|
|
6435
6540
|
useOnScroll(domRef, onContainerScroll);
|
|
6436
|
-
return /* @__PURE__ */
|
|
6541
|
+
return /* @__PURE__ */ createElement20("div", {
|
|
6437
6542
|
ref: domRef,
|
|
6438
6543
|
style,
|
|
6439
6544
|
className: join(className, rootClassName6, VirtualScrollContainerCls, getScrollableClassName(scrollable))
|
|
@@ -6442,7 +6547,7 @@ var VirtualScrollContainer = forwardRef2(function VirtualScrollContainer2(props,
|
|
|
6442
6547
|
|
|
6443
6548
|
// src/components/VirtualList/SpacePlaceholder.tsx
|
|
6444
6549
|
import {
|
|
6445
|
-
createElement as
|
|
6550
|
+
createElement as createElement21,
|
|
6446
6551
|
memo as memo8
|
|
6447
6552
|
} from "react";
|
|
6448
6553
|
function SpacePlaceholderFn(props) {
|
|
@@ -6454,7 +6559,7 @@ function SpacePlaceholderFn(props) {
|
|
|
6454
6559
|
opacity: 0,
|
|
6455
6560
|
pointerEvents: "none"
|
|
6456
6561
|
};
|
|
6457
|
-
return /* @__PURE__ */
|
|
6562
|
+
return /* @__PURE__ */ createElement21("div", {
|
|
6458
6563
|
"data-count": count,
|
|
6459
6564
|
"data-placeholder-width": true ? width : void 0,
|
|
6460
6565
|
"data-placeholder-height": true ? height : void 0,
|
|
@@ -6469,20 +6574,20 @@ import { useEffect as useEffect22, useMemo as useMemo11, useRef as useRef17 } fr
|
|
|
6469
6574
|
|
|
6470
6575
|
// src/components/InfiniteTable/hooks/useUnpinnedRendering.tsx
|
|
6471
6576
|
import {
|
|
6472
|
-
createElement as
|
|
6577
|
+
createElement as createElement27
|
|
6473
6578
|
} from "react";
|
|
6474
6579
|
import { useCallback as useCallback12 } from "react";
|
|
6475
6580
|
|
|
6476
6581
|
// src/components/VirtualList/VirtualRowList.tsx
|
|
6477
6582
|
import {
|
|
6478
|
-
createElement as
|
|
6583
|
+
createElement as createElement23,
|
|
6479
6584
|
useCallback as useCallback9
|
|
6480
6585
|
} from "react";
|
|
6481
6586
|
|
|
6482
6587
|
// src/components/VirtualList/VirtualList.tsx
|
|
6483
6588
|
import {
|
|
6484
|
-
Fragment as
|
|
6485
|
-
createElement as
|
|
6589
|
+
Fragment as Fragment5,
|
|
6590
|
+
createElement as createElement22
|
|
6486
6591
|
} from "react";
|
|
6487
6592
|
import { useRef as useRef12, useEffect as useEffect17, useState as useState9 } from "react";
|
|
6488
6593
|
|
|
@@ -6565,19 +6670,19 @@ var VirtualList = (props) => {
|
|
|
6565
6670
|
if (true) {
|
|
6566
6671
|
domProps["data-cmp-name"] = `VirtualList`;
|
|
6567
6672
|
}
|
|
6568
|
-
return /* @__PURE__ */
|
|
6673
|
+
return /* @__PURE__ */ createElement22(Fragment5, null, /* @__PURE__ */ createElement22("div", __spreadValues({}, domProps), /* @__PURE__ */ createElement22(VirtualScrollContainer, {
|
|
6569
6674
|
scrollable,
|
|
6570
6675
|
onContainerScroll
|
|
6571
|
-
}, /* @__PURE__ */
|
|
6676
|
+
}, /* @__PURE__ */ createElement22("div", {
|
|
6572
6677
|
ref: domRef,
|
|
6573
6678
|
className: scrollTransformTargetCls,
|
|
6574
6679
|
"data-name": "scroll-transform-target"
|
|
6575
|
-
}, /* @__PURE__ */
|
|
6680
|
+
}, /* @__PURE__ */ createElement22(RawList, {
|
|
6576
6681
|
brain: virtualBrain,
|
|
6577
6682
|
renderItem,
|
|
6578
6683
|
repaintId,
|
|
6579
6684
|
debugChannel: "VirtualList-" + mainAxis
|
|
6580
|
-
})), children, /* @__PURE__ */
|
|
6685
|
+
})), children, /* @__PURE__ */ createElement22(SpacePlaceholder, {
|
|
6581
6686
|
count,
|
|
6582
6687
|
width,
|
|
6583
6688
|
height
|
|
@@ -6594,7 +6699,7 @@ var VirtualRowList = (props) => {
|
|
|
6594
6699
|
rowIndex: renderProps.itemIndex
|
|
6595
6700
|
});
|
|
6596
6701
|
}, [renderRow]);
|
|
6597
|
-
return /* @__PURE__ */
|
|
6702
|
+
return /* @__PURE__ */ createElement23(VirtualList, __spreadProps(__spreadValues({}, listProps), {
|
|
6598
6703
|
renderItem,
|
|
6599
6704
|
mainAxis: "vertical",
|
|
6600
6705
|
itemMainAxisSize: rowHeight,
|
|
@@ -6604,7 +6709,7 @@ var VirtualRowList = (props) => {
|
|
|
6604
6709
|
|
|
6605
6710
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRow.tsx
|
|
6606
6711
|
import {
|
|
6607
|
-
createElement as
|
|
6712
|
+
createElement as createElement25,
|
|
6608
6713
|
memo as memo10,
|
|
6609
6714
|
useCallback as useCallback11
|
|
6610
6715
|
} from "react";
|
|
@@ -6612,10 +6717,13 @@ import { useRef as useRef14 } from "react";
|
|
|
6612
6717
|
|
|
6613
6718
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx
|
|
6614
6719
|
import {
|
|
6615
|
-
|
|
6720
|
+
createContext as createContext5,
|
|
6721
|
+
createElement as createElement24,
|
|
6616
6722
|
memo as memo9
|
|
6617
6723
|
} from "react";
|
|
6724
|
+
import { useContext as useContext6 } from "react";
|
|
6618
6725
|
var { rootClassName: rootClassName8 } = internalProps;
|
|
6726
|
+
var InfiniteTableColumnCellContext = createContext5(null);
|
|
6619
6727
|
var InfiniteTableColumnCellClassName = `${rootClassName8}ColumnCell`;
|
|
6620
6728
|
function isColumnWithField(c) {
|
|
6621
6729
|
return typeof c.field === "string";
|
|
@@ -6662,24 +6770,31 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
6662
6770
|
column
|
|
6663
6771
|
}, rest);
|
|
6664
6772
|
let renderValue = value;
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
renderValue = column.renderValue(renderParam);
|
|
6773
|
+
const renderParam = __spreadProps(__spreadValues({
|
|
6774
|
+
value,
|
|
6775
|
+
column,
|
|
6776
|
+
domRef,
|
|
6777
|
+
groupRowInfo
|
|
6778
|
+
}, rest), {
|
|
6779
|
+
rowIndex,
|
|
6780
|
+
toggleGroupRow,
|
|
6781
|
+
toggleCurrentGroupRow: () => toggleGroupRow(rowInfo.groupKeys),
|
|
6782
|
+
groupBy: computedDataSource.groupBy,
|
|
6783
|
+
pivotBy: computedDataSource.pivotBy
|
|
6784
|
+
});
|
|
6785
|
+
const renderChildren = () => {
|
|
6786
|
+
if (hidden) {
|
|
6787
|
+
return null;
|
|
6681
6788
|
}
|
|
6682
|
-
|
|
6789
|
+
const renderFn = column.render || column.renderValue;
|
|
6790
|
+
if (renderFn) {
|
|
6791
|
+
return /* @__PURE__ */ createElement24(RenderHookComponent, {
|
|
6792
|
+
render: renderFn,
|
|
6793
|
+
renderParam
|
|
6794
|
+
});
|
|
6795
|
+
}
|
|
6796
|
+
return renderValue;
|
|
6797
|
+
};
|
|
6683
6798
|
const colClassName = column.className ? typeof column.className === "function" ? column.className(stylingRenderParam) : column.className : void 0;
|
|
6684
6799
|
const colStyle = column.style ? typeof column.style === "function" ? column.style(stylingRenderParam) : column.style : void 0;
|
|
6685
6800
|
const style = colStyle ? __spreadProps(__spreadValues({}, colStyle), {
|
|
@@ -6707,18 +6822,28 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
6707
6822
|
}
|
|
6708
6823
|
}
|
|
6709
6824
|
}
|
|
6710
|
-
|
|
6825
|
+
const cellProps = __spreadProps(__spreadValues({
|
|
6711
6826
|
domRef,
|
|
6712
6827
|
offsetProperty
|
|
6713
6828
|
}, dataset), {
|
|
6829
|
+
cellType: "body",
|
|
6714
6830
|
column,
|
|
6715
6831
|
offset: virtualized ? 0 : column.computedPinningOffset,
|
|
6716
6832
|
style,
|
|
6717
6833
|
cssEllipsis: (_a = column.cssEllipsis) != null ? _a : true,
|
|
6718
|
-
className: join(useCellClassName(column, [InfiniteTableColumnCellClassName, InfiniteTableCellClassName], ColumnCellRecipe, { dragging: false }), colClassName)
|
|
6719
|
-
|
|
6834
|
+
className: join(useCellClassName(column, [InfiniteTableColumnCellClassName, InfiniteTableCellClassName], ColumnCellRecipe, { dragging: false }), colClassName),
|
|
6835
|
+
renderChildren
|
|
6836
|
+
});
|
|
6837
|
+
const ContextProvider = InfiniteTableColumnCellContext.Provider;
|
|
6838
|
+
return /* @__PURE__ */ createElement24(ContextProvider, {
|
|
6839
|
+
value: renderParam
|
|
6840
|
+
}, /* @__PURE__ */ createElement24(InfiniteTableCell, __spreadValues({}, cellProps)));
|
|
6720
6841
|
}
|
|
6721
6842
|
var InfiniteTableColumnCell = memo9(InfiniteTableColumnCellFn);
|
|
6843
|
+
function useInfiniteColumnCell() {
|
|
6844
|
+
const result = useContext6(InfiniteTableColumnCellContext);
|
|
6845
|
+
return result;
|
|
6846
|
+
}
|
|
6722
6847
|
|
|
6723
6848
|
// src/components/InfiniteTable/components/InfiniteTableRow/useRowDOMProps.ts
|
|
6724
6849
|
import {
|
|
@@ -6858,7 +6983,7 @@ function InfiniteTableRowFn(props) {
|
|
|
6858
6983
|
if (!column) {
|
|
6859
6984
|
}
|
|
6860
6985
|
const hidden = false;
|
|
6861
|
-
return /* @__PURE__ */
|
|
6986
|
+
return /* @__PURE__ */ createElement25(InfiniteTableColumnCell, {
|
|
6862
6987
|
getData,
|
|
6863
6988
|
rowInfo,
|
|
6864
6989
|
groupRenderStrategy,
|
|
@@ -6885,9 +7010,9 @@ function InfiniteTableRowFn(props) {
|
|
|
6885
7010
|
if (true) {
|
|
6886
7011
|
domProps["data-cmp-name"] = "ITableRow";
|
|
6887
7012
|
}
|
|
6888
|
-
return /* @__PURE__ */
|
|
7013
|
+
return /* @__PURE__ */ createElement25("div", __spreadProps(__spreadValues({}, domProps), {
|
|
6889
7014
|
style
|
|
6890
|
-
}), /* @__PURE__ */
|
|
7015
|
+
}), /* @__PURE__ */ createElement25(RawList, {
|
|
6891
7016
|
brain,
|
|
6892
7017
|
renderItem: renderCell,
|
|
6893
7018
|
debugChannel: `${rowIndex}`
|
|
@@ -6897,7 +7022,7 @@ var InfiniteTableRow = memo10(InfiniteTableRowFn);
|
|
|
6897
7022
|
|
|
6898
7023
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowUnvirtualized.tsx
|
|
6899
7024
|
import {
|
|
6900
|
-
createElement as
|
|
7025
|
+
createElement as createElement26,
|
|
6901
7026
|
memo as memo11
|
|
6902
7027
|
} from "react";
|
|
6903
7028
|
function TableRowUnvirtualizedFn(props) {
|
|
@@ -6920,7 +7045,7 @@ function TableRowUnvirtualizedFn(props) {
|
|
|
6920
7045
|
}, domProps.style);
|
|
6921
7046
|
const children = columns.map((col) => {
|
|
6922
7047
|
const hidden = false;
|
|
6923
|
-
return /* @__PURE__ */
|
|
7048
|
+
return /* @__PURE__ */ createElement26(InfiniteTableColumnCell, {
|
|
6924
7049
|
key: col.id,
|
|
6925
7050
|
virtualized: false,
|
|
6926
7051
|
rowHeight,
|
|
@@ -6933,7 +7058,7 @@ function TableRowUnvirtualizedFn(props) {
|
|
|
6933
7058
|
column: col
|
|
6934
7059
|
});
|
|
6935
7060
|
});
|
|
6936
|
-
return /* @__PURE__ */
|
|
7061
|
+
return /* @__PURE__ */ createElement26("div", __spreadProps(__spreadValues({}, domProps), {
|
|
6937
7062
|
style
|
|
6938
7063
|
}), children);
|
|
6939
7064
|
}
|
|
@@ -6982,7 +7107,7 @@ function useUnpinnedRendering(params) {
|
|
|
6982
7107
|
rowProps.repaintId = repaintId;
|
|
6983
7108
|
}
|
|
6984
7109
|
const TableRowComponent = shouldVirtualizeColumns ? InfiniteTableRow : TableRowUnvirtualized;
|
|
6985
|
-
return /* @__PURE__ */
|
|
7110
|
+
return /* @__PURE__ */ createElement27(TableRowComponent, __spreadValues({}, rowProps));
|
|
6986
7111
|
}, [
|
|
6987
7112
|
repaintId,
|
|
6988
7113
|
rowHeight,
|
|
@@ -6993,7 +7118,7 @@ function useUnpinnedRendering(params) {
|
|
|
6993
7118
|
horizontalVirtualBrain,
|
|
6994
7119
|
verticalVirtualBrain
|
|
6995
7120
|
]);
|
|
6996
|
-
const fakeScrollbar = getScrollbarWidth() ? /* @__PURE__ */
|
|
7121
|
+
const fakeScrollbar = getScrollbarWidth() ? /* @__PURE__ */ createElement27("div", {
|
|
6997
7122
|
"data-name": "horizontal-scrollbar-placeholder--fake",
|
|
6998
7123
|
style: {
|
|
6999
7124
|
position: "absolute",
|
|
@@ -7004,10 +7129,10 @@ function useUnpinnedRendering(params) {
|
|
|
7004
7129
|
overflow: "auto",
|
|
7005
7130
|
visibility: columnShifts ? "visible" : "hidden"
|
|
7006
7131
|
}
|
|
7007
|
-
}, /* @__PURE__ */
|
|
7132
|
+
}, /* @__PURE__ */ createElement27("div", {
|
|
7008
7133
|
style: { height: "100%", width: computedUnpinnedColumnsWidth }
|
|
7009
7134
|
})) : null;
|
|
7010
|
-
return rowHeight != 0 ? /* @__PURE__ */
|
|
7135
|
+
return rowHeight != 0 ? /* @__PURE__ */ createElement27(VirtualRowList, {
|
|
7011
7136
|
repaintId: `${repaintId}-unpinned-`,
|
|
7012
7137
|
brain: verticalVirtualBrain,
|
|
7013
7138
|
onContainerScroll: applyScrollHorizontal,
|
|
@@ -7151,14 +7276,14 @@ var useOnContainerScroll = ({
|
|
|
7151
7276
|
|
|
7152
7277
|
// src/components/InfiniteTable/hooks/usePinnedRendering.tsx
|
|
7153
7278
|
import {
|
|
7154
|
-
createElement as
|
|
7279
|
+
createElement as createElement29,
|
|
7155
7280
|
useMemo as useMemo10
|
|
7156
7281
|
} from "react";
|
|
7157
7282
|
import { useCallback as useCallback15 } from "react";
|
|
7158
7283
|
|
|
7159
7284
|
// src/components/VirtualList/RowListWithExternalScrolling.tsx
|
|
7160
7285
|
import {
|
|
7161
|
-
createElement as
|
|
7286
|
+
createElement as createElement28
|
|
7162
7287
|
} from "react";
|
|
7163
7288
|
import { useEffect as useEffect20, useCallback as useCallback14, useRef as useRef16 } from "react";
|
|
7164
7289
|
|
|
@@ -7235,7 +7360,7 @@ var RowListWithExternalScrolling = (props) => {
|
|
|
7235
7360
|
if (true) {
|
|
7236
7361
|
domProps["data-cmp-name"] = "RowListWithExternalScrolling";
|
|
7237
7362
|
}
|
|
7238
|
-
return /* @__PURE__ */
|
|
7363
|
+
return /* @__PURE__ */ createElement28("div", __spreadValues({}, domProps), /* @__PURE__ */ createElement28(RawList, {
|
|
7239
7364
|
brain,
|
|
7240
7365
|
renderItem,
|
|
7241
7366
|
repaintId
|
|
@@ -7284,7 +7409,7 @@ function PinnedRowsContainer(props) {
|
|
|
7284
7409
|
className: join(`${PinnedRowsContainerClassName}`, PinnedRowsClsVariants[pinning === "start" ? "pinnedStart" : "pinnedEnd"], `${PinnedRowsContainerClassName}--pinned-${pinning}`, `${PinnedRowsContainerClassName}--overflow`, PinnedRowsClsVariants.overflow)
|
|
7285
7410
|
};
|
|
7286
7411
|
if (hasOverflow) {
|
|
7287
|
-
return /* @__PURE__ */
|
|
7412
|
+
return /* @__PURE__ */ createElement29(VirtualScrollContainer, {
|
|
7288
7413
|
scrollable: {
|
|
7289
7414
|
horizontal: true,
|
|
7290
7415
|
vertical: false
|
|
@@ -7300,23 +7425,23 @@ function PinnedRowsContainer(props) {
|
|
|
7300
7425
|
className: join(PinnedRowsContainerClsVariants({
|
|
7301
7426
|
pinned: pinning
|
|
7302
7427
|
}), `${PinnedRowsContainerClassName}Container`, `${PinnedRowsContainerClassName}Container--pinned-${pinning}`)
|
|
7303
|
-
}, /* @__PURE__ */
|
|
7428
|
+
}, /* @__PURE__ */ createElement29(RowListWithExternalScrolling, __spreadProps(__spreadValues({}, rowListProps), {
|
|
7304
7429
|
onMount: (node) => {
|
|
7305
7430
|
pinnedScrollListener == null ? void 0 : pinnedScrollListener.onScroll((scrollPosition) => {
|
|
7306
7431
|
updateScroll(node, brain.getScrollPosition(), scrollPosition);
|
|
7307
7432
|
});
|
|
7308
7433
|
}
|
|
7309
|
-
})), /* @__PURE__ */
|
|
7434
|
+
})), /* @__PURE__ */ createElement29(SpacePlaceholder, {
|
|
7310
7435
|
width: rowWidth,
|
|
7311
7436
|
height: 1
|
|
7312
7437
|
}));
|
|
7313
7438
|
}
|
|
7314
|
-
return /* @__PURE__ */
|
|
7439
|
+
return /* @__PURE__ */ createElement29(RowListWithExternalScrolling, __spreadValues({}, rowListProps));
|
|
7315
7440
|
}
|
|
7316
7441
|
function useRenderPinnedRow(params) {
|
|
7317
7442
|
const { getData, getState, columnsWidth, columns, rowSpan, verticalBrain } = params;
|
|
7443
|
+
const dataArray = getData();
|
|
7318
7444
|
const renderPinnedRow = useCallback15((rowParams) => {
|
|
7319
|
-
const dataArray = getData();
|
|
7320
7445
|
const rowInfo = dataArray[rowParams.rowIndex];
|
|
7321
7446
|
const { showZebraRows, showHoverRows } = getState();
|
|
7322
7447
|
const rowProps = __spreadValues({
|
|
@@ -7332,8 +7457,8 @@ function useRenderPinnedRow(params) {
|
|
|
7332
7457
|
rowWidth: columnsWidth,
|
|
7333
7458
|
columns
|
|
7334
7459
|
}, rowParams);
|
|
7335
|
-
return /* @__PURE__ */
|
|
7336
|
-
}, [columnsWidth, columns, verticalBrain]);
|
|
7460
|
+
return /* @__PURE__ */ createElement29(TableRowUnvirtualized, __spreadValues({}, rowProps));
|
|
7461
|
+
}, [columnsWidth, columns, verticalBrain, dataArray]);
|
|
7337
7462
|
return renderPinnedRow;
|
|
7338
7463
|
}
|
|
7339
7464
|
function usePinnedRenderingForSide(side, params) {
|
|
@@ -7371,13 +7496,14 @@ function usePinnedRenderingForSide(side, params) {
|
|
|
7371
7496
|
const renderRowPinned = useRenderPinnedRow({
|
|
7372
7497
|
getData,
|
|
7373
7498
|
getState,
|
|
7499
|
+
repaintId,
|
|
7374
7500
|
toggleGroupRow,
|
|
7375
7501
|
rowSpan,
|
|
7376
7502
|
verticalBrain: verticalVirtualBrain,
|
|
7377
7503
|
columns,
|
|
7378
7504
|
columnsWidth
|
|
7379
7505
|
});
|
|
7380
|
-
const pinnedList = columns.length && rowHeight !== 0 ? /* @__PURE__ */
|
|
7506
|
+
const pinnedList = columns.length && rowHeight !== 0 ? /* @__PURE__ */ createElement29(PinnedRowsContainer, {
|
|
7381
7507
|
pinning: side,
|
|
7382
7508
|
pinnedScrollListener,
|
|
7383
7509
|
hasOverflow,
|
|
@@ -7390,7 +7516,7 @@ function usePinnedRenderingForSide(side, params) {
|
|
|
7390
7516
|
brain: verticalVirtualBrain,
|
|
7391
7517
|
renderRow: renderRowPinned
|
|
7392
7518
|
}) : null;
|
|
7393
|
-
const pinnedScrollbarPlaceholder = pinnedList && hasHorizontalScrollbar && !hasOverflow ? /* @__PURE__ */
|
|
7519
|
+
const pinnedScrollbarPlaceholder = pinnedList && hasHorizontalScrollbar && !hasOverflow ? /* @__PURE__ */ createElement29(HorizontalScrollbarPlaceholder, {
|
|
7394
7520
|
style: side === "end" ? {
|
|
7395
7521
|
width: columnsWidth,
|
|
7396
7522
|
right: hasVerticalScrollbar ? getScrollbarWidth() : 0
|
|
@@ -7516,7 +7642,7 @@ function useListRendering(param) {
|
|
|
7516
7642
|
} = componentState;
|
|
7517
7643
|
const prevDataSourceTimestamp = usePrevious(dataSourceState.updatedAt);
|
|
7518
7644
|
const repaintIdRef = useRef17(0);
|
|
7519
|
-
if (!shallowEqualObjects(prevComputed, computed)
|
|
7645
|
+
if (prevDataSourceTimestamp !== dataSourceState.updatedAt || !shallowEqualObjects(prevComputed, computed)) {
|
|
7520
7646
|
repaintIdRef.current++;
|
|
7521
7647
|
}
|
|
7522
7648
|
const repaintId = repaintIdRef.current;
|
|
@@ -7618,7 +7744,7 @@ function useListRendering(param) {
|
|
|
7618
7744
|
|
|
7619
7745
|
// src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
|
|
7620
7746
|
import {
|
|
7621
|
-
createElement as
|
|
7747
|
+
createElement as createElement30,
|
|
7622
7748
|
forwardRef as forwardRef3,
|
|
7623
7749
|
useCallback as useCallback17,
|
|
7624
7750
|
useRef as useRef18
|
|
@@ -7686,12 +7812,12 @@ var InfiniteTableLicenseFooter = forwardRef3(function InfiniteTableLicenseFooter
|
|
|
7686
7812
|
clearInterval(intervalId);
|
|
7687
7813
|
};
|
|
7688
7814
|
}, []);
|
|
7689
|
-
return /* @__PURE__ */
|
|
7815
|
+
return /* @__PURE__ */ createElement30("div", __spreadProps(__spreadValues({
|
|
7690
7816
|
ref: domCallback
|
|
7691
7817
|
}, props), {
|
|
7692
7818
|
className: join(`${rootClassName12}-Footer`, FooterCls, props.className),
|
|
7693
7819
|
style: defaultStyle2
|
|
7694
|
-
}), "Powered by", " ", /* @__PURE__ */
|
|
7820
|
+
}), "Powered by", " ", /* @__PURE__ */ createElement30("a", {
|
|
7695
7821
|
href: "https://infinite-table.com",
|
|
7696
7822
|
rel: "noopener noreferrer",
|
|
7697
7823
|
role: "link",
|
|
@@ -7861,7 +7987,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
7861
7987
|
const valid = useMemo12(() => {
|
|
7862
7988
|
let valid2 = isValidLicense(licenseKey, {
|
|
7863
7989
|
publishedAt: 1624970570587,
|
|
7864
|
-
version: "0.2.
|
|
7990
|
+
version: "0.2.15"
|
|
7865
7991
|
});
|
|
7866
7992
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
7867
7993
|
return true;
|
|
@@ -7873,7 +7999,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
7873
7999
|
|
|
7874
8000
|
// src/components/CSSVariableWatch.tsx
|
|
7875
8001
|
import {
|
|
7876
|
-
createElement as
|
|
8002
|
+
createElement as createElement31,
|
|
7877
8003
|
useCallback as useCallback18,
|
|
7878
8004
|
useLayoutEffect as useLayoutEffect4
|
|
7879
8005
|
} from "react";
|
|
@@ -7914,11 +8040,11 @@ var CSSVariableWatch = (props) => {
|
|
|
7914
8040
|
useCSSVariableWatch(__spreadProps(__spreadValues({}, props), {
|
|
7915
8041
|
ref: domRef
|
|
7916
8042
|
}));
|
|
7917
|
-
return /* @__PURE__ */
|
|
8043
|
+
return /* @__PURE__ */ createElement31("div", {
|
|
7918
8044
|
"data-name": "css-variable-watcher",
|
|
7919
8045
|
"data-var": props.varName,
|
|
7920
8046
|
style: WRAPPER_STYLE
|
|
7921
|
-
}, /* @__PURE__ */
|
|
8047
|
+
}, /* @__PURE__ */ createElement31("div", {
|
|
7922
8048
|
ref: domRef,
|
|
7923
8049
|
style: {
|
|
7924
8050
|
height: props.varName.startsWith("var(") ? props.varName : `var(${props.varName})`
|
|
@@ -8012,7 +8138,7 @@ function useDOMProps(initialDOMProps) {
|
|
|
8012
8138
|
|
|
8013
8139
|
// src/components/InfiniteTable/components/LoadMask.tsx
|
|
8014
8140
|
import {
|
|
8015
|
-
createElement as
|
|
8141
|
+
createElement as createElement32,
|
|
8016
8142
|
memo as memo12
|
|
8017
8143
|
} from "react";
|
|
8018
8144
|
|
|
@@ -8026,11 +8152,11 @@ var { rootClassName: rootClassName11 } = internalProps;
|
|
|
8026
8152
|
var baseCls = `${rootClassName11}-LoadMask`;
|
|
8027
8153
|
function LoadMaskFn(props) {
|
|
8028
8154
|
const { visible, children = "Loading" } = props;
|
|
8029
|
-
return /* @__PURE__ */
|
|
8155
|
+
return /* @__PURE__ */ createElement32("div", {
|
|
8030
8156
|
className: `${LoadMaskCls[visible ? "visible" : "hidden"]} ${baseCls}`
|
|
8031
|
-
}, /* @__PURE__ */
|
|
8157
|
+
}, /* @__PURE__ */ createElement32("div", {
|
|
8032
8158
|
className: `${LoadMaskOverlayCls} ${baseCls}-Overlay`
|
|
8033
|
-
}), /* @__PURE__ */
|
|
8159
|
+
}), /* @__PURE__ */ createElement32("div", {
|
|
8034
8160
|
className: `${LoadMaskTextCls} ${baseCls}-Text`
|
|
8035
8161
|
}, children));
|
|
8036
8162
|
}
|
|
@@ -8259,31 +8385,31 @@ var InfiniteTableComponent = memo13(function InfiniteTableComponent2() {
|
|
|
8259
8385
|
dataSourceActions.scrollStopDelayUpdatedByTable = scrollStopDelay;
|
|
8260
8386
|
}, [scrollStopDelay]);
|
|
8261
8387
|
useAutoSizeColumns();
|
|
8262
|
-
return /* @__PURE__ */
|
|
8388
|
+
return /* @__PURE__ */ createElement33("div", __spreadValues({
|
|
8263
8389
|
ref: domRef
|
|
8264
|
-
}, domProps), header ? /* @__PURE__ */
|
|
8390
|
+
}, domProps), header ? /* @__PURE__ */ createElement33(TableHeaderWrapper, {
|
|
8265
8391
|
brain: horizontalVirtualBrain,
|
|
8266
8392
|
repaintId,
|
|
8267
8393
|
scrollbars
|
|
8268
|
-
}) : null, /* @__PURE__ */
|
|
8394
|
+
}) : null, /* @__PURE__ */ createElement33(InfiniteTableBody, null, /* @__PURE__ */ createElement33(VirtualScrollContainer, {
|
|
8269
8395
|
ref: scrollerDOMRef,
|
|
8270
8396
|
onContainerScroll: applyScrollVertical,
|
|
8271
8397
|
scrollable: ONLY_VERTICAL_SCROLLBAR
|
|
8272
|
-
}, /* @__PURE__ */
|
|
8398
|
+
}, /* @__PURE__ */ createElement33("div", {
|
|
8273
8399
|
className: display.flex
|
|
8274
|
-
}, pinnedStartList, centerList, pinnedEndList), /* @__PURE__ */
|
|
8400
|
+
}, pinnedStartList, centerList, pinnedEndList), /* @__PURE__ */ createElement33(SpacePlaceholder, {
|
|
8275
8401
|
count: dataArray.length,
|
|
8276
8402
|
width: 0,
|
|
8277
8403
|
height: reservedContentHeight
|
|
8278
|
-
})), pinnedStartScrollbarPlaceholder, pinnedEndScrollbarPlaceholder, /* @__PURE__ */
|
|
8404
|
+
})), pinnedStartScrollbarPlaceholder, pinnedEndScrollbarPlaceholder, /* @__PURE__ */ createElement33(LoadMaskCmp, {
|
|
8279
8405
|
visible: loading
|
|
8280
|
-
}, loadingText)), licenseValid ? null : /* @__PURE__ */
|
|
8406
|
+
}, loadingText)), licenseValid ? null : /* @__PURE__ */ createElement33(InfiniteTableLicenseFooter, null), /* @__PURE__ */ createElement33("div", {
|
|
8281
8407
|
ref: portalDOMRef,
|
|
8282
8408
|
className: join(`${rootClassName}Portal`, zIndex[1e3], position.absolute, top[0], left[0])
|
|
8283
|
-
}), rowHeightCSSVar ? /* @__PURE__ */
|
|
8409
|
+
}), rowHeightCSSVar ? /* @__PURE__ */ createElement33(CSSVariableWatch, {
|
|
8284
8410
|
varName: rowHeightCSSVar,
|
|
8285
8411
|
onChange: onRowHeightCSSVarChange
|
|
8286
|
-
}) : null, headerHeightCSSVar ? /* @__PURE__ */
|
|
8412
|
+
}) : null, headerHeightCSSVar ? /* @__PURE__ */ createElement33(CSSVariableWatch, {
|
|
8287
8413
|
varName: headerHeightCSSVar,
|
|
8288
8414
|
onChange: onHeaderHeightCSSVarChange
|
|
8289
8415
|
}) : null);
|
|
@@ -8331,13 +8457,13 @@ function InfiniteTableContextProvider() {
|
|
|
8331
8457
|
}
|
|
8332
8458
|
}, [scrollTopKey, scrollerDOMRef]);
|
|
8333
8459
|
const TableContext2 = getInfiniteTableContext();
|
|
8334
|
-
return /* @__PURE__ */
|
|
8460
|
+
return /* @__PURE__ */ createElement33(TableContext2.Provider, {
|
|
8335
8461
|
value: contextValue
|
|
8336
|
-
}, /* @__PURE__ */
|
|
8462
|
+
}, /* @__PURE__ */ createElement33(InfiniteTableComponent, null));
|
|
8337
8463
|
}
|
|
8338
8464
|
function InfiniteTable(props) {
|
|
8339
|
-
const table = /* @__PURE__ */
|
|
8340
|
-
return /* @__PURE__ */
|
|
8465
|
+
const table = /* @__PURE__ */ createElement33(InfiniteTableRoot, __spreadValues({}, props), /* @__PURE__ */ createElement33(InfiniteTableContextProvider, null));
|
|
8466
|
+
return /* @__PURE__ */ createElement33(StrictMode, null, table);
|
|
8341
8467
|
}
|
|
8342
8468
|
InfiniteTable.defaultProps = {
|
|
8343
8469
|
rowHeight: 40,
|
|
@@ -8358,5 +8484,7 @@ export {
|
|
|
8358
8484
|
multisort,
|
|
8359
8485
|
useComponentState,
|
|
8360
8486
|
useDataSource,
|
|
8361
|
-
useEffectWithChanges
|
|
8487
|
+
useEffectWithChanges,
|
|
8488
|
+
useInfiniteColumnCell,
|
|
8489
|
+
useInfiniteHeaderCell
|
|
8362
8490
|
};
|