@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.js
CHANGED
|
@@ -637,7 +637,9 @@ __export(exports, {
|
|
|
637
637
|
multisort: () => multisort,
|
|
638
638
|
useComponentState: () => useComponentState,
|
|
639
639
|
useDataSource: () => useDataSource,
|
|
640
|
-
useEffectWithChanges: () => useEffectWithChanges
|
|
640
|
+
useEffectWithChanges: () => useEffectWithChanges,
|
|
641
|
+
useInfiniteColumnCell: () => useInfiniteColumnCell,
|
|
642
|
+
useInfiniteHeaderCell: () => useInfiniteHeaderCell
|
|
641
643
|
});
|
|
642
644
|
|
|
643
645
|
// src/components/utils/debounce.ts
|
|
@@ -655,7 +657,7 @@ function debounce(fn, { wait }) {
|
|
|
655
657
|
}
|
|
656
658
|
|
|
657
659
|
// src/components/InfiniteTable/index.tsx
|
|
658
|
-
var
|
|
660
|
+
var React35 = __toModule(require("react"));
|
|
659
661
|
|
|
660
662
|
// src/components/InfiniteTable/internalProps.ts
|
|
661
663
|
var rootClassName = "Infinite";
|
|
@@ -1484,7 +1486,7 @@ var useInfiniteTable = () => {
|
|
|
1484
1486
|
// src/components/InfiniteTable/hooks/useComputedVisibleColumns.ts
|
|
1485
1487
|
var import_react8 = __toModule(require("react"));
|
|
1486
1488
|
|
|
1487
|
-
// src/components/flexbox/index.
|
|
1489
|
+
// src/components/flexbox/index.ts
|
|
1488
1490
|
var computeFlex = (params) => {
|
|
1489
1491
|
const {
|
|
1490
1492
|
availableSize,
|
|
@@ -1892,7 +1894,8 @@ var getComputedVisibleColumns = ({
|
|
|
1892
1894
|
valueGetter: colType.valueGetter,
|
|
1893
1895
|
renderValue: colType.renderValue,
|
|
1894
1896
|
render: colType.render,
|
|
1895
|
-
style: colType.style
|
|
1897
|
+
style: colType.style,
|
|
1898
|
+
components: colType.components
|
|
1896
1899
|
}, c), {
|
|
1897
1900
|
cssEllipsis,
|
|
1898
1901
|
headerCssEllipsis,
|
|
@@ -2539,7 +2542,7 @@ function useColumnGroups() {
|
|
|
2539
2542
|
var import_react17 = __toModule(require("react"));
|
|
2540
2543
|
|
|
2541
2544
|
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
2542
|
-
var
|
|
2545
|
+
var React7 = __toModule(require("react"));
|
|
2543
2546
|
|
|
2544
2547
|
// src/utils/join.ts
|
|
2545
2548
|
var join = (...args) => args.filter((x) => !!`${x}`).join(" ");
|
|
@@ -2610,6 +2613,12 @@ var userSelect = { none: "_16lm1iwm" };
|
|
|
2610
2613
|
var willChange = { transform: "_16lm1iw19" };
|
|
2611
2614
|
var zIndex = { "1": "_16lm1iwe", "10": "_16lm1iwf", "1000": "_16lm1iwg", "10000": "_16lm1iwh", "100000": "_16lm1iwi" };
|
|
2612
2615
|
|
|
2616
|
+
// src/components/InfiniteTable/utils/RenderHookComponent.tsx
|
|
2617
|
+
var React6 = __toModule(require("react"));
|
|
2618
|
+
function RenderHookComponent(props) {
|
|
2619
|
+
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, props.render(props.renderParam));
|
|
2620
|
+
}
|
|
2621
|
+
|
|
2613
2622
|
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
2614
2623
|
function getGroupColumnRender({
|
|
2615
2624
|
groupIndexForColumn,
|
|
@@ -2620,7 +2629,10 @@ function getGroupColumnRender({
|
|
|
2620
2629
|
var _a, _b, _c;
|
|
2621
2630
|
let { value, rowInfo, column, groupBy, pivotBy } = renderOptions;
|
|
2622
2631
|
if (column.renderValue) {
|
|
2623
|
-
value =
|
|
2632
|
+
value = /* @__PURE__ */ React7.createElement(RenderHookComponent, {
|
|
2633
|
+
render: column.renderValue,
|
|
2634
|
+
renderParam: renderOptions
|
|
2635
|
+
});
|
|
2624
2636
|
}
|
|
2625
2637
|
let groupRowInfo = groupRenderStrategy !== "inline" ? rowInfo : ((_a = rowInfo.parents) == null ? void 0 : _a[groupIndexForColumn]) || rowInfo;
|
|
2626
2638
|
if (!groupRowInfo) {
|
|
@@ -2646,17 +2658,20 @@ function getGroupColumnRender({
|
|
|
2646
2658
|
let icon = null;
|
|
2647
2659
|
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);
|
|
2648
2660
|
if (showExpanderIcon) {
|
|
2649
|
-
const defaultIcon = /* @__PURE__ */
|
|
2661
|
+
const defaultIcon = /* @__PURE__ */ React7.createElement(ExpanderIcon, {
|
|
2650
2662
|
expanded: !collapsed,
|
|
2651
2663
|
onChange: () => {
|
|
2652
2664
|
toggleGroupRow(groupKeys);
|
|
2653
2665
|
}
|
|
2654
2666
|
});
|
|
2655
|
-
icon = column.renderGroupIcon ?
|
|
2667
|
+
icon = column.renderGroupIcon ? /* @__PURE__ */ React7.createElement(RenderHookComponent, {
|
|
2668
|
+
render: column.renderGroupIcon,
|
|
2669
|
+
renderParam: Object.assign({ collapsed, groupIcon: defaultIcon }, renderOptions)
|
|
2670
|
+
}) : defaultIcon;
|
|
2656
2671
|
}
|
|
2657
|
-
return /* @__PURE__ */
|
|
2672
|
+
return /* @__PURE__ */ React7.createElement("div", {
|
|
2658
2673
|
className: join(display.flex, alignItems.center)
|
|
2659
|
-
}, icon, /* @__PURE__ */
|
|
2674
|
+
}, icon, /* @__PURE__ */ React7.createElement("div", {
|
|
2660
2675
|
className: cssEllipsisClassName
|
|
2661
2676
|
}, value != null ? value : null));
|
|
2662
2677
|
};
|
|
@@ -2704,7 +2719,7 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
|
|
|
2704
2719
|
let icon = null;
|
|
2705
2720
|
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);
|
|
2706
2721
|
if (showExpanderIcon) {
|
|
2707
|
-
const defaultIcon = /* @__PURE__ */
|
|
2722
|
+
const defaultIcon = /* @__PURE__ */ React7.createElement(ExpanderIcon, {
|
|
2708
2723
|
expanded: !collapsed,
|
|
2709
2724
|
onChange: () => {
|
|
2710
2725
|
toggleGroupRow(rowInfo.groupKeys);
|
|
@@ -2712,9 +2727,9 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
|
|
|
2712
2727
|
});
|
|
2713
2728
|
icon = column.renderGroupIcon ? column.renderGroupIcon(Object.assign({ collapsed, groupIcon: defaultIcon }, renderOptions)) : defaultIcon;
|
|
2714
2729
|
}
|
|
2715
|
-
return /* @__PURE__ */
|
|
2730
|
+
return /* @__PURE__ */ React7.createElement("div", {
|
|
2716
2731
|
className: join(display.flex, alignItems.center, GroupRowExpanderCls)
|
|
2717
|
-
}, icon, /* @__PURE__ */
|
|
2732
|
+
}, icon, /* @__PURE__ */ React7.createElement("div", {
|
|
2718
2733
|
className: cssEllipsisClassName
|
|
2719
2734
|
}, value != null ? value : null));
|
|
2720
2735
|
}
|
|
@@ -2733,7 +2748,7 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
|
|
|
2733
2748
|
var import_react16 = __toModule(require("react"));
|
|
2734
2749
|
|
|
2735
2750
|
// src/components/DataSource/index.tsx
|
|
2736
|
-
var
|
|
2751
|
+
var React8 = __toModule(require("react"));
|
|
2737
2752
|
|
|
2738
2753
|
// src/utils/multisort/sortTypes.ts
|
|
2739
2754
|
var numberComparator = function(first, second) {
|
|
@@ -2834,6 +2849,7 @@ var DeepMap = class {
|
|
|
2834
2849
|
this.map = new Map();
|
|
2835
2850
|
this.length = 0;
|
|
2836
2851
|
this.revision = 0;
|
|
2852
|
+
this.emptyKey = Symbol("emptyKey");
|
|
2837
2853
|
this.visit = (fn) => {
|
|
2838
2854
|
this.map.forEach((_, k) => this.visitKey(k, this.map, [], fn));
|
|
2839
2855
|
};
|
|
@@ -2845,13 +2861,19 @@ var DeepMap = class {
|
|
|
2845
2861
|
return;
|
|
2846
2862
|
}
|
|
2847
2863
|
let i = 0;
|
|
2848
|
-
currentMap.
|
|
2864
|
+
const hasEmptyKey = currentMap.has(this.emptyKey);
|
|
2865
|
+
let allowEmptyKey = true;
|
|
2866
|
+
const iterator = (_, key) => {
|
|
2849
2867
|
const pair = currentMap.get(key);
|
|
2850
2868
|
if (!pair) {
|
|
2851
2869
|
return;
|
|
2852
2870
|
}
|
|
2853
2871
|
const { map: map2 } = pair;
|
|
2854
|
-
const
|
|
2872
|
+
const isEmptyKey = key === this.emptyKey;
|
|
2873
|
+
if (isEmptyKey && !allowEmptyKey) {
|
|
2874
|
+
return;
|
|
2875
|
+
}
|
|
2876
|
+
const keys = isEmptyKey ? [] : [...parentKeys, key];
|
|
2855
2877
|
const next = map2 ? () => this.visitWithNext(keys, fn, map2) : void 0;
|
|
2856
2878
|
if (pair.hasOwnProperty("value")) {
|
|
2857
2879
|
fn(pair.value, keys, i, next);
|
|
@@ -2859,7 +2881,13 @@ var DeepMap = class {
|
|
|
2859
2881
|
} else {
|
|
2860
2882
|
next == null ? void 0 : next();
|
|
2861
2883
|
}
|
|
2862
|
-
}
|
|
2884
|
+
};
|
|
2885
|
+
if (hasEmptyKey) {
|
|
2886
|
+
iterator(void 0, this.emptyKey);
|
|
2887
|
+
allowEmptyKey = false;
|
|
2888
|
+
i = 0;
|
|
2889
|
+
}
|
|
2890
|
+
currentMap.forEach(iterator);
|
|
2863
2891
|
};
|
|
2864
2892
|
if (initial) {
|
|
2865
2893
|
initial.forEach((entry) => {
|
|
@@ -2878,7 +2906,7 @@ var DeepMap = class {
|
|
|
2878
2906
|
set(keys, value) {
|
|
2879
2907
|
let currentMap = this.map;
|
|
2880
2908
|
if (!keys.length) {
|
|
2881
|
-
|
|
2909
|
+
keys = [this.emptyKey];
|
|
2882
2910
|
}
|
|
2883
2911
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
2884
2912
|
const key = keys[i];
|
|
@@ -2904,7 +2932,7 @@ var DeepMap = class {
|
|
|
2904
2932
|
var _a;
|
|
2905
2933
|
let currentMap = this.map;
|
|
2906
2934
|
if (!keys.length) {
|
|
2907
|
-
|
|
2935
|
+
keys = [this.emptyKey];
|
|
2908
2936
|
}
|
|
2909
2937
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
2910
2938
|
const key = keys[i];
|
|
@@ -2939,10 +2967,11 @@ var DeepMap = class {
|
|
|
2939
2967
|
this.revision = 0;
|
|
2940
2968
|
}
|
|
2941
2969
|
delete(keys) {
|
|
2942
|
-
keys = [...keys];
|
|
2943
2970
|
let currentMap = this.map;
|
|
2944
2971
|
if (!keys.length) {
|
|
2945
|
-
|
|
2972
|
+
keys = [this.emptyKey];
|
|
2973
|
+
} else {
|
|
2974
|
+
keys = [...keys];
|
|
2946
2975
|
}
|
|
2947
2976
|
let maps = [currentMap];
|
|
2948
2977
|
let result = false;
|
|
@@ -2995,7 +3024,7 @@ var DeepMap = class {
|
|
|
2995
3024
|
has(keys) {
|
|
2996
3025
|
let currentMap = this.map;
|
|
2997
3026
|
if (!keys.length) {
|
|
2998
|
-
|
|
3027
|
+
keys = [this.emptyKey];
|
|
2999
3028
|
}
|
|
3000
3029
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
3001
3030
|
const key = keys[i];
|
|
@@ -3019,7 +3048,7 @@ var DeepMap = class {
|
|
|
3019
3048
|
return;
|
|
3020
3049
|
}
|
|
3021
3050
|
const { map: map2 } = pair;
|
|
3022
|
-
const keys = [...parentKeys, key];
|
|
3051
|
+
const keys = key === this.emptyKey ? [] : [...parentKeys, key];
|
|
3023
3052
|
const next = once(() => {
|
|
3024
3053
|
if (map2) {
|
|
3025
3054
|
map2.forEach((_, k) => {
|
|
@@ -3035,7 +3064,12 @@ var DeepMap = class {
|
|
|
3035
3064
|
getArray(fn) {
|
|
3036
3065
|
const result = [];
|
|
3037
3066
|
this.visit((pair, keys) => {
|
|
3038
|
-
|
|
3067
|
+
const res = fn(__spreadProps(__spreadValues({}, pair), { keys }));
|
|
3068
|
+
if (keys.length === 0) {
|
|
3069
|
+
result.splice(0, 0, res);
|
|
3070
|
+
} else {
|
|
3071
|
+
result.push(res);
|
|
3072
|
+
}
|
|
3039
3073
|
});
|
|
3040
3074
|
return result;
|
|
3041
3075
|
}
|
|
@@ -3121,7 +3155,7 @@ function lazyGroup(groupParams, rootData) {
|
|
|
3121
3155
|
} = groupParams;
|
|
3122
3156
|
const deepMap = new DeepMap();
|
|
3123
3157
|
function traverseValues(pivotDeepMap, container, pivot2, pivotIndex = 0, currentPivotKeys2 = []) {
|
|
3124
|
-
const last = pivotIndex === pivot2.length - 1;
|
|
3158
|
+
const last = !pivot2.length || pivotIndex === pivot2.length - 1;
|
|
3125
3159
|
const values = container[(mappings == null ? void 0 : mappings.values) || "values"] || {};
|
|
3126
3160
|
for (var k in values)
|
|
3127
3161
|
if (values.hasOwnProperty(k)) {
|
|
@@ -3145,7 +3179,7 @@ function lazyGroup(groupParams, rootData) {
|
|
|
3145
3179
|
rootData.visitDepthFirst((lazyGroupRowInfo, keys, _index, next) => {
|
|
3146
3180
|
const [_rootKey, ...currentGroupKeys] = keys;
|
|
3147
3181
|
const dataArray = lazyGroupRowInfo.items;
|
|
3148
|
-
if (currentGroupKeys.length == groupBy.length) {
|
|
3182
|
+
if (currentGroupKeys.length == groupBy.length && groupBy.length) {
|
|
3149
3183
|
const deepMapGroupValue = deepMap.get(currentGroupKeys);
|
|
3150
3184
|
if (deepMapGroupValue) {
|
|
3151
3185
|
deepMapGroupValue.items = dataArray;
|
|
@@ -3167,9 +3201,11 @@ function lazyGroup(groupParams, rootData) {
|
|
|
3167
3201
|
const dataObject = dataArray[i].data;
|
|
3168
3202
|
const dataKeys = dataArray[i].keys;
|
|
3169
3203
|
let item = dataObject;
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3204
|
+
if (dataKeys.length) {
|
|
3205
|
+
const { field: groupByProperty } = groupBy[dataKeys.length - 1];
|
|
3206
|
+
const key = item[groupByProperty];
|
|
3207
|
+
currentGroupKeys.push(key);
|
|
3208
|
+
}
|
|
3173
3209
|
const deepMapGroupValue = {
|
|
3174
3210
|
items: [],
|
|
3175
3211
|
commonData: dataObject,
|
|
@@ -3181,7 +3217,9 @@ function lazyGroup(groupParams, rootData) {
|
|
|
3181
3217
|
const pivotContainer = dataArray[i].pivot;
|
|
3182
3218
|
traverseValues(pivotDeepMap, pivotContainer, pivot, 0, currentPivotKeys);
|
|
3183
3219
|
}
|
|
3184
|
-
|
|
3220
|
+
if (dataKeys.length) {
|
|
3221
|
+
currentGroupKeys.pop();
|
|
3222
|
+
}
|
|
3185
3223
|
}
|
|
3186
3224
|
next == null ? void 0 : next();
|
|
3187
3225
|
});
|
|
@@ -3197,6 +3235,37 @@ function lazyGroup(groupParams, rootData) {
|
|
|
3197
3235
|
}
|
|
3198
3236
|
return result;
|
|
3199
3237
|
}
|
|
3238
|
+
function processGroup(deepMap, currentGroupKeys, currentPivotKeys, item, pivot, reducers, topLevelPivotColumns, initialReducerValue, defaultToKey = DEFAULT_TO_KEY) {
|
|
3239
|
+
const {
|
|
3240
|
+
items: currentGroupItems,
|
|
3241
|
+
reducerResults,
|
|
3242
|
+
pivotDeepMap
|
|
3243
|
+
} = deepMap.get(currentGroupKeys);
|
|
3244
|
+
currentGroupItems.push(item);
|
|
3245
|
+
if (reducers) {
|
|
3246
|
+
computeReducersFor(item, reducers, reducerResults);
|
|
3247
|
+
}
|
|
3248
|
+
if (pivot) {
|
|
3249
|
+
for (let pivotIndex = 0, pivotLength = pivot.length; pivotIndex < pivotLength; pivotIndex++) {
|
|
3250
|
+
const { field: pivotField, toKey: pivotToKey } = pivot[pivotIndex];
|
|
3251
|
+
const pivotKey = (pivotToKey || defaultToKey)(item[pivotField], item);
|
|
3252
|
+
currentPivotKeys.push(pivotKey);
|
|
3253
|
+
if (!pivotDeepMap.has(currentPivotKeys)) {
|
|
3254
|
+
topLevelPivotColumns.set(currentPivotKeys, true);
|
|
3255
|
+
pivotDeepMap == null ? void 0 : pivotDeepMap.set(currentPivotKeys, {
|
|
3256
|
+
reducerResults: __spreadValues({}, initialReducerValue),
|
|
3257
|
+
items: []
|
|
3258
|
+
});
|
|
3259
|
+
}
|
|
3260
|
+
const { reducerResults: pivotReducerResults, items: pivotGroupItems } = pivotDeepMap.get(currentPivotKeys);
|
|
3261
|
+
pivotGroupItems.push(item);
|
|
3262
|
+
if (reducers) {
|
|
3263
|
+
computeReducersFor(item, reducers, pivotReducerResults);
|
|
3264
|
+
}
|
|
3265
|
+
}
|
|
3266
|
+
currentPivotKeys.length = 0;
|
|
3267
|
+
}
|
|
3268
|
+
}
|
|
3200
3269
|
function group(groupParams, data) {
|
|
3201
3270
|
const {
|
|
3202
3271
|
groupBy,
|
|
@@ -3211,6 +3280,16 @@ function group(groupParams, data) {
|
|
|
3211
3280
|
let currentPivotKeys = [];
|
|
3212
3281
|
const initialReducerValue = initReducers(reducers);
|
|
3213
3282
|
const globalReducerResults = __spreadValues({}, initialReducerValue);
|
|
3283
|
+
if (!groupByLength) {
|
|
3284
|
+
const deepMapGroupValue = {
|
|
3285
|
+
items: [],
|
|
3286
|
+
reducerResults: __spreadValues({}, initialReducerValue)
|
|
3287
|
+
};
|
|
3288
|
+
if (pivot) {
|
|
3289
|
+
deepMapGroupValue.pivotDeepMap = new DeepMap();
|
|
3290
|
+
}
|
|
3291
|
+
deepMap.set(currentGroupKeys, deepMapGroupValue);
|
|
3292
|
+
}
|
|
3214
3293
|
for (let i = 0, len = data.length; i < len; i++) {
|
|
3215
3294
|
let item = data[i];
|
|
3216
3295
|
for (let groupByIndex = 0; groupByIndex < groupByLength; groupByIndex++) {
|
|
@@ -3227,38 +3306,10 @@ function group(groupParams, data) {
|
|
|
3227
3306
|
}
|
|
3228
3307
|
deepMap.set(currentGroupKeys, deepMapGroupValue);
|
|
3229
3308
|
}
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
} = deepMap.get(currentGroupKeys);
|
|
3235
|
-
currentGroupItems.push(item);
|
|
3236
|
-
if (reducers) {
|
|
3237
|
-
computeReducersFor(item, reducers, reducerResults);
|
|
3238
|
-
}
|
|
3239
|
-
if (pivot) {
|
|
3240
|
-
for (let pivotIndex = 0, pivotLength = pivot.length; pivotIndex < pivotLength; pivotIndex++) {
|
|
3241
|
-
const { field: pivotField, toKey: pivotToKey } = pivot[pivotIndex];
|
|
3242
|
-
const pivotKey = (pivotToKey || defaultToKey)(item[pivotField], item);
|
|
3243
|
-
currentPivotKeys.push(pivotKey);
|
|
3244
|
-
if (!pivotDeepMap.has(currentPivotKeys)) {
|
|
3245
|
-
topLevelPivotColumns.set(currentPivotKeys, true);
|
|
3246
|
-
pivotDeepMap == null ? void 0 : pivotDeepMap.set(currentPivotKeys, {
|
|
3247
|
-
reducerResults: __spreadValues({}, initialReducerValue),
|
|
3248
|
-
items: []
|
|
3249
|
-
});
|
|
3250
|
-
}
|
|
3251
|
-
const {
|
|
3252
|
-
reducerResults: pivotReducerResults,
|
|
3253
|
-
items: pivotGroupItems
|
|
3254
|
-
} = pivotDeepMap.get(currentPivotKeys);
|
|
3255
|
-
pivotGroupItems.push(item);
|
|
3256
|
-
if (reducers) {
|
|
3257
|
-
computeReducersFor(item, reducers, pivotReducerResults);
|
|
3258
|
-
}
|
|
3259
|
-
}
|
|
3260
|
-
currentPivotKeys.length = 0;
|
|
3261
|
-
}
|
|
3309
|
+
processGroup(deepMap, currentGroupKeys, currentPivotKeys, item, pivot, reducers, topLevelPivotColumns, initialReducerValue, defaultToKey);
|
|
3310
|
+
}
|
|
3311
|
+
if (!groupByLength) {
|
|
3312
|
+
processGroup(deepMap, currentGroupKeys, currentPivotKeys, item, pivot, reducers, topLevelPivotColumns, initialReducerValue, defaultToKey);
|
|
3262
3313
|
}
|
|
3263
3314
|
if (reducers) {
|
|
3264
3315
|
computeReducersFor(item, reducers, globalReducerResults);
|
|
@@ -3502,7 +3553,7 @@ function buildDataSourceDataParams(componentState, overrides) {
|
|
|
3502
3553
|
};
|
|
3503
3554
|
if (componentState.livePagination !== void 0) {
|
|
3504
3555
|
dataSourceParams.livePaginationCursor = componentState.livePaginationCursor;
|
|
3505
|
-
dataSourceParams.
|
|
3556
|
+
dataSourceParams.__cursorId = componentState.cursorId;
|
|
3506
3557
|
}
|
|
3507
3558
|
if (componentState.lazyLoad) {
|
|
3508
3559
|
if (componentState.lazyLoadBatchSize != null && componentState.lazyLoadBatchSize > 0) {
|
|
@@ -3533,7 +3584,7 @@ function loadData(data, componentState, actions, overrides) {
|
|
|
3533
3584
|
const lazyGroupData = componentState.originalLazyGroupData;
|
|
3534
3585
|
const key = [LAZY_ROOT_KEY_FOR_GROUPS, ...dataParams.groupKeys || []];
|
|
3535
3586
|
const existingGroupRowInfo = lazyGroupData.get(key);
|
|
3536
|
-
if (existingGroupRowInfo && existingGroupRowInfo.cache) {
|
|
3587
|
+
if (existingGroupRowInfo && existingGroupRowInfo.cache && key.length > 1) {
|
|
3537
3588
|
const items = existingGroupRowInfo.items;
|
|
3538
3589
|
const len = items.length;
|
|
3539
3590
|
let allLoaded = true;
|
|
@@ -3692,7 +3743,8 @@ function useLoadData() {
|
|
|
3692
3743
|
const componentState2 = getComponentState();
|
|
3693
3744
|
if (initialRef.current) {
|
|
3694
3745
|
initialRef.current = false;
|
|
3695
|
-
|
|
3746
|
+
const dataParams = buildDataSourceDataParams(componentState2);
|
|
3747
|
+
actions.dataParams = dataParams;
|
|
3696
3748
|
}
|
|
3697
3749
|
}, depsObject);
|
|
3698
3750
|
}
|
|
@@ -3705,7 +3757,6 @@ function useLazyLoadRange() {
|
|
|
3705
3757
|
const loadingCache = (0, import_react15.useMemo)(() => {
|
|
3706
3758
|
return new Map();
|
|
3707
3759
|
}, [componentState.data]);
|
|
3708
|
-
globalThis.loadingCache = loadingCache;
|
|
3709
3760
|
const {
|
|
3710
3761
|
lazyLoadBatchSize,
|
|
3711
3762
|
notifyRenderRangeChange,
|
|
@@ -4147,7 +4198,7 @@ function getInterceptActions() {
|
|
|
4147
4198
|
},
|
|
4148
4199
|
cursorId: (cursorId, { actions, state }) => {
|
|
4149
4200
|
const dataParams = buildDataSourceDataParams(state, {
|
|
4150
|
-
cursorId
|
|
4201
|
+
__cursorId: cursorId
|
|
4151
4202
|
});
|
|
4152
4203
|
actions.dataParams = dataParams;
|
|
4153
4204
|
},
|
|
@@ -4317,7 +4368,7 @@ function getPivotColumnsAndColumnGroups({
|
|
|
4317
4368
|
next == null ? void 0 : next();
|
|
4318
4369
|
}
|
|
4319
4370
|
});
|
|
4320
|
-
if (
|
|
4371
|
+
if (!pivotLength) {
|
|
4321
4372
|
aggregationReducers.forEach((reducer, index) => {
|
|
4322
4373
|
columns.set(`total:${reducer.id}`, prepareColumn({
|
|
4323
4374
|
header: `${reducer.name || reducer.id} total`,
|
|
@@ -4490,7 +4541,7 @@ function DataSourceWithContext(props) {
|
|
|
4490
4541
|
if (typeof children === "function") {
|
|
4491
4542
|
children = children(computedValues);
|
|
4492
4543
|
}
|
|
4493
|
-
return /* @__PURE__ */
|
|
4544
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, children);
|
|
4494
4545
|
}
|
|
4495
4546
|
var DataSourceRoot = getComponentStateRoot({
|
|
4496
4547
|
initSetupState: initSetupState2,
|
|
@@ -4513,14 +4564,14 @@ function DataSourceCmp({ children }) {
|
|
|
4513
4564
|
globalThis.getDataSourceState = getState;
|
|
4514
4565
|
}
|
|
4515
4566
|
useLoadData();
|
|
4516
|
-
return /* @__PURE__ */
|
|
4567
|
+
return /* @__PURE__ */ React8.createElement(DataSourceContext.Provider, {
|
|
4517
4568
|
value: contextValue
|
|
4518
|
-
}, /* @__PURE__ */
|
|
4569
|
+
}, /* @__PURE__ */ React8.createElement(DataSourceWithContext, {
|
|
4519
4570
|
children
|
|
4520
4571
|
}));
|
|
4521
4572
|
}
|
|
4522
4573
|
function DataSource(props) {
|
|
4523
|
-
return /* @__PURE__ */
|
|
4574
|
+
return /* @__PURE__ */ React8.createElement(DataSourceRoot, __spreadValues({}, props), /* @__PURE__ */ React8.createElement(DataSourceCmp, {
|
|
4524
4575
|
children: props.children
|
|
4525
4576
|
}));
|
|
4526
4577
|
}
|
|
@@ -4849,7 +4900,7 @@ function getColumnsWhenGrouping(params) {
|
|
|
4849
4900
|
}, toggleGroupRow, groupColumn);
|
|
4850
4901
|
computedColumns.set(generatedGroupColumn.id || `group-by-${groupByForColumn.field}`, generatedGroupColumn);
|
|
4851
4902
|
});
|
|
4852
|
-
} else if (groupRenderStrategy === "single-column") {
|
|
4903
|
+
} else if (groupRenderStrategy === "single-column" && groupBy.length) {
|
|
4853
4904
|
const singleGroupColumn = getSingleGroupColumn({
|
|
4854
4905
|
groupCount: groupBy.length,
|
|
4855
4906
|
groupBy,
|
|
@@ -5057,7 +5108,7 @@ function useComputed() {
|
|
|
5057
5108
|
}
|
|
5058
5109
|
|
|
5059
5110
|
// src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
|
|
5060
|
-
var
|
|
5111
|
+
var React9 = __toModule(require("react"));
|
|
5061
5112
|
|
|
5062
5113
|
// src/components/InfiniteTable/hooks/useInternalProps.ts
|
|
5063
5114
|
var useInternalProps = () => {
|
|
@@ -5065,9 +5116,9 @@ var useInternalProps = () => {
|
|
|
5065
5116
|
};
|
|
5066
5117
|
|
|
5067
5118
|
// src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
|
|
5068
|
-
var InfiniteTableBody =
|
|
5119
|
+
var InfiniteTableBody = React9.forwardRef(function InfiniteTableBody2(props, ref) {
|
|
5069
5120
|
const { rootClassName: rootClassName12 } = useInternalProps();
|
|
5070
|
-
return /* @__PURE__ */
|
|
5121
|
+
return /* @__PURE__ */ React9.createElement("div", __spreadProps(__spreadValues({
|
|
5071
5122
|
ref
|
|
5072
5123
|
}, props), {
|
|
5073
5124
|
className: join(`${rootClassName12}Body`, position.relative, flex["1"], transformTranslateZero, props.className)
|
|
@@ -5075,16 +5126,16 @@ var InfiniteTableBody = React8.forwardRef(function InfiniteTableBody2(props, ref
|
|
|
5075
5126
|
});
|
|
5076
5127
|
|
|
5077
5128
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx
|
|
5078
|
-
var
|
|
5129
|
+
var React21 = __toModule(require("react"));
|
|
5079
5130
|
|
|
5080
5131
|
// src/components/InfiniteTable/components/ScrollbarPlaceholder.tsx
|
|
5081
|
-
var
|
|
5132
|
+
var React10 = __toModule(require("react"));
|
|
5082
5133
|
function HorizontalScrollbarPlaceholderFn(props) {
|
|
5083
5134
|
const scrollbarWidth2 = getScrollbarWidth();
|
|
5084
5135
|
if (!scrollbarWidth2) {
|
|
5085
5136
|
return null;
|
|
5086
5137
|
}
|
|
5087
|
-
return /* @__PURE__ */
|
|
5138
|
+
return /* @__PURE__ */ React10.createElement("div", {
|
|
5088
5139
|
"data-name": "horizontal-scrollbar-placeholder",
|
|
5089
5140
|
style: __spreadValues({
|
|
5090
5141
|
position: "absolute",
|
|
@@ -5094,13 +5145,13 @@ function HorizontalScrollbarPlaceholderFn(props) {
|
|
|
5094
5145
|
}, props.style)
|
|
5095
5146
|
});
|
|
5096
5147
|
}
|
|
5097
|
-
var HorizontalScrollbarPlaceholder =
|
|
5148
|
+
var HorizontalScrollbarPlaceholder = React10.memo(HorizontalScrollbarPlaceholderFn);
|
|
5098
5149
|
function VerticalScrollbarPlaceholderFn(props) {
|
|
5099
5150
|
const scrollbarWidth2 = getScrollbarWidth();
|
|
5100
5151
|
if (!scrollbarWidth2) {
|
|
5101
5152
|
return null;
|
|
5102
5153
|
}
|
|
5103
|
-
return /* @__PURE__ */
|
|
5154
|
+
return /* @__PURE__ */ React10.createElement("div", {
|
|
5104
5155
|
"data-name": "vertical-scrollbar-placeholder",
|
|
5105
5156
|
style: __spreadValues({
|
|
5106
5157
|
position: "absolute",
|
|
@@ -5110,7 +5161,7 @@ function VerticalScrollbarPlaceholderFn(props) {
|
|
|
5110
5161
|
}, props.style)
|
|
5111
5162
|
});
|
|
5112
5163
|
}
|
|
5113
|
-
var VerticalScrollbarPlaceholder =
|
|
5164
|
+
var VerticalScrollbarPlaceholder = React10.memo(VerticalScrollbarPlaceholderFn);
|
|
5114
5165
|
|
|
5115
5166
|
// src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
|
|
5116
5167
|
var import_createRuntimeFn3 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
|
|
@@ -5125,15 +5176,15 @@ var HeaderSortIconCls = "_12zfob11 _16lm1iw1";
|
|
|
5125
5176
|
var HeaderWrapperCls = "_12zfob1v _16lm1iw16 _16lm1iw1 _16lm1iwj _16lm1iw10";
|
|
5126
5177
|
|
|
5127
5178
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
|
|
5128
|
-
var
|
|
5179
|
+
var React17 = __toModule(require("react"));
|
|
5129
5180
|
var import_react26 = __toModule(require("react"));
|
|
5130
5181
|
|
|
5131
5182
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
|
|
5132
|
-
var
|
|
5183
|
+
var React13 = __toModule(require("react"));
|
|
5133
5184
|
var import_react22 = __toModule(require("react"));
|
|
5134
5185
|
|
|
5135
5186
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCell.tsx
|
|
5136
|
-
var
|
|
5187
|
+
var React11 = __toModule(require("react"));
|
|
5137
5188
|
|
|
5138
5189
|
// src/components/InfiniteTable/hooks/useInfiniteTableState.ts
|
|
5139
5190
|
var import_react19 = __toModule(require("react"));
|
|
@@ -5155,7 +5206,7 @@ var { rootClassName: rootClassName2 } = internalProps;
|
|
|
5155
5206
|
var InfiniteTableCellClassName = `${rootClassName2}Cell`;
|
|
5156
5207
|
var InfiniteTableCellContentClassName = `${rootClassName2}Cell_content`;
|
|
5157
5208
|
function InfiniteTableCellFn(props) {
|
|
5158
|
-
var _b, _c;
|
|
5209
|
+
var _b, _c, _d, _e;
|
|
5159
5210
|
const _a = props, {
|
|
5160
5211
|
cssEllipsis = true,
|
|
5161
5212
|
virtualized = true,
|
|
@@ -5163,10 +5214,12 @@ function InfiniteTableCellFn(props) {
|
|
|
5163
5214
|
offsetProperty = "left",
|
|
5164
5215
|
column,
|
|
5165
5216
|
domRef,
|
|
5166
|
-
children,
|
|
5167
5217
|
afterChildren,
|
|
5168
5218
|
beforeChildren,
|
|
5169
|
-
offset
|
|
5219
|
+
offset,
|
|
5220
|
+
cellType,
|
|
5221
|
+
cssPosition: _cssPosition,
|
|
5222
|
+
renderChildren
|
|
5170
5223
|
} = _a, domProps = __objRest(_a, [
|
|
5171
5224
|
"cssEllipsis",
|
|
5172
5225
|
"virtualized",
|
|
@@ -5174,11 +5227,14 @@ function InfiniteTableCellFn(props) {
|
|
|
5174
5227
|
"offsetProperty",
|
|
5175
5228
|
"column",
|
|
5176
5229
|
"domRef",
|
|
5177
|
-
"children",
|
|
5178
5230
|
"afterChildren",
|
|
5179
5231
|
"beforeChildren",
|
|
5180
|
-
"offset"
|
|
5232
|
+
"offset",
|
|
5233
|
+
"cellType",
|
|
5234
|
+
"cssPosition",
|
|
5235
|
+
"renderChildren"
|
|
5181
5236
|
]);
|
|
5237
|
+
const children = renderChildren();
|
|
5182
5238
|
const { columnShifts } = useInfiniteTableState();
|
|
5183
5239
|
const shifting = !!columnShifts;
|
|
5184
5240
|
const style = __spreadValues({
|
|
@@ -5193,16 +5249,23 @@ function InfiniteTableCellFn(props) {
|
|
|
5193
5249
|
style.transform = `translate3d(${shiftLeft}px, 0px, 0px)`;
|
|
5194
5250
|
}
|
|
5195
5251
|
}
|
|
5196
|
-
|
|
5197
|
-
ref: domRef,
|
|
5252
|
+
const finalDOMProps = __spreadProps(__spreadValues({}, domProps), {
|
|
5198
5253
|
style,
|
|
5199
|
-
"data-name":
|
|
5200
|
-
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}` : "")
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5254
|
+
"data-name": "Cell",
|
|
5255
|
+
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}` : ""),
|
|
5256
|
+
children: /* @__PURE__ */ React11.createElement(React11.Fragment, null, beforeChildren, /* @__PURE__ */ React11.createElement("div", {
|
|
5257
|
+
className: `${InfiniteTableCellContentClassName} ${cssEllipsis ? cssEllipsisClassName : overflow.hidden}`
|
|
5258
|
+
}, children), afterChildren)
|
|
5259
|
+
});
|
|
5260
|
+
const RenderComponent = cellType === "body" ? (_d = column.components) == null ? void 0 : _d.ColumnCell : (_e = column.components) == null ? void 0 : _e.HeaderCell;
|
|
5261
|
+
if (RenderComponent) {
|
|
5262
|
+
return /* @__PURE__ */ React11.createElement(RenderComponent, __spreadValues({}, finalDOMProps));
|
|
5263
|
+
}
|
|
5264
|
+
return /* @__PURE__ */ React11.createElement("div", __spreadProps(__spreadValues({}, finalDOMProps), {
|
|
5265
|
+
ref: domRef
|
|
5266
|
+
}));
|
|
5204
5267
|
}
|
|
5205
|
-
var InfiniteTableCell =
|
|
5268
|
+
var InfiniteTableCell = React11.memo(InfiniteTableCellFn);
|
|
5206
5269
|
|
|
5207
5270
|
// src/components/InfiniteTable/hooks/useColumnPointerEvents.ts
|
|
5208
5271
|
var import_binary_search2 = __toModule(require_binary_search());
|
|
@@ -5397,7 +5460,7 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
|
|
|
5397
5460
|
var import_react_dom = __toModule(require("react-dom"));
|
|
5398
5461
|
|
|
5399
5462
|
// src/components/InfiniteTable/components/icons/SortIcon.tsx
|
|
5400
|
-
var
|
|
5463
|
+
var React12 = __toModule(require("react"));
|
|
5401
5464
|
var import_react21 = __toModule(require("react"));
|
|
5402
5465
|
var defaultLineStyle = {
|
|
5403
5466
|
marginTop: 2,
|
|
@@ -5452,23 +5515,24 @@ function SortIcon(props) {
|
|
|
5452
5515
|
if (direction === -1) {
|
|
5453
5516
|
indexStyle.top = "100%";
|
|
5454
5517
|
}
|
|
5455
|
-
return /* @__PURE__ */
|
|
5518
|
+
return /* @__PURE__ */ React12.createElement("div", {
|
|
5456
5519
|
style: __spreadProps(__spreadValues({}, style), { width: size }),
|
|
5457
5520
|
className: join(className, InfiniteTableIconClassName, `${InfiniteTableIconClassName}-sort`)
|
|
5458
|
-
}, showIndex ? /* @__PURE__ */
|
|
5521
|
+
}, showIndex ? /* @__PURE__ */ React12.createElement("div", {
|
|
5459
5522
|
"data-name": "index",
|
|
5460
5523
|
style: indexStyle
|
|
5461
|
-
}, index) : null, /* @__PURE__ */
|
|
5524
|
+
}, index) : null, /* @__PURE__ */ React12.createElement("div", {
|
|
5462
5525
|
style: __spreadValues({ width: sizes[0] }, lineStyle),
|
|
5463
5526
|
onTransitionEnd
|
|
5464
|
-
}), /* @__PURE__ */
|
|
5527
|
+
}), /* @__PURE__ */ React12.createElement("div", {
|
|
5465
5528
|
style: __spreadValues({ width: sizes[1] }, lineStyle)
|
|
5466
|
-
}), /* @__PURE__ */
|
|
5529
|
+
}), /* @__PURE__ */ React12.createElement("div", {
|
|
5467
5530
|
style: __spreadValues({ width: sizes[2] }, lineStyle)
|
|
5468
5531
|
}));
|
|
5469
5532
|
}
|
|
5470
5533
|
|
|
5471
5534
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
|
|
5535
|
+
var InfiniteTableHeaderCellContext = React13.createContext(null);
|
|
5472
5536
|
var defaultStyle = {
|
|
5473
5537
|
position: "absolute",
|
|
5474
5538
|
top: 0
|
|
@@ -5487,24 +5551,33 @@ function InfiniteTableHeaderCell(props) {
|
|
|
5487
5551
|
}
|
|
5488
5552
|
const sortInfo = column.computedSortInfo;
|
|
5489
5553
|
let header = column.header;
|
|
5490
|
-
if (header instanceof Function) {
|
|
5491
|
-
header = header({
|
|
5492
|
-
column,
|
|
5493
|
-
columnSortInfo: sortInfo
|
|
5494
|
-
});
|
|
5495
|
-
}
|
|
5496
|
-
header = header != null ? header : column.name;
|
|
5497
|
-
const sortTool = /* @__PURE__ */ React12.createElement(SortIcon, {
|
|
5498
|
-
index: column.computedMultiSort ? column.computedSortIndex + 1 : void 0,
|
|
5499
|
-
className: `${InfiniteTableHeaderCellClassName}__sort-icon ${HeaderSortIconCls}`,
|
|
5500
|
-
direction: column.computedSorted ? column.computedSortedAsc ? 1 : -1 : 0
|
|
5501
|
-
});
|
|
5502
|
-
const domRef = (0, import_react22.useRef)(null);
|
|
5503
5554
|
const ref = (0, import_react22.useCallback)((node) => {
|
|
5504
5555
|
var _a2;
|
|
5505
5556
|
domRef.current = node;
|
|
5506
5557
|
(_a2 = props.domRef) == null ? void 0 : _a2.call(props, node);
|
|
5507
5558
|
}, [props.domRef]);
|
|
5559
|
+
const sortTool = /* @__PURE__ */ React13.createElement(SortIcon, {
|
|
5560
|
+
index: column.computedMultiSort ? column.computedSortIndex + 1 : void 0,
|
|
5561
|
+
className: `${InfiniteTableHeaderCellClassName}__sort-icon ${HeaderSortIconCls}`,
|
|
5562
|
+
direction: column.computedSorted ? column.computedSortedAsc ? 1 : -1 : 0
|
|
5563
|
+
});
|
|
5564
|
+
const renderParam = {
|
|
5565
|
+
domRef: ref,
|
|
5566
|
+
column,
|
|
5567
|
+
columnSortInfo: sortInfo,
|
|
5568
|
+
sortTool
|
|
5569
|
+
};
|
|
5570
|
+
const renderChildren = () => {
|
|
5571
|
+
if (header instanceof Function) {
|
|
5572
|
+
header = /* @__PURE__ */ React13.createElement(RenderHookComponent, {
|
|
5573
|
+
render: header,
|
|
5574
|
+
renderParam
|
|
5575
|
+
});
|
|
5576
|
+
}
|
|
5577
|
+
header = header != null ? header : column.name;
|
|
5578
|
+
return header;
|
|
5579
|
+
};
|
|
5580
|
+
const domRef = (0, import_react22.useRef)(null);
|
|
5508
5581
|
const {
|
|
5509
5582
|
computed: { computedRemainingSpace },
|
|
5510
5583
|
componentState: { portalDOMRef }
|
|
@@ -5532,7 +5605,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
5532
5605
|
let offset = offsetFromProps != null ? offsetFromProps : virtualized ? 0 : column.computedPinningOffset;
|
|
5533
5606
|
let draggingProxy = null;
|
|
5534
5607
|
if (dragging) {
|
|
5535
|
-
draggingProxy = /* @__PURE__ */
|
|
5608
|
+
draggingProxy = /* @__PURE__ */ React13.createElement("div", {
|
|
5536
5609
|
className: `${InfiniteTableHeaderCellClassName}Proxy ${HeaderCellProxy}`,
|
|
5537
5610
|
style: {
|
|
5538
5611
|
position: "absolute",
|
|
@@ -5545,8 +5618,12 @@ function InfiniteTableHeaderCell(props) {
|
|
|
5545
5618
|
}, header);
|
|
5546
5619
|
draggingProxy = (0, import_react_dom.createPortal)(draggingProxy, portalDOMRef.current);
|
|
5547
5620
|
}
|
|
5548
|
-
|
|
5621
|
+
const ContextProvider = InfiniteTableHeaderCellContext.Provider;
|
|
5622
|
+
return /* @__PURE__ */ React13.createElement(ContextProvider, {
|
|
5623
|
+
value: renderParam
|
|
5624
|
+
}, /* @__PURE__ */ React13.createElement(InfiniteTableCell, {
|
|
5549
5625
|
domRef: ref,
|
|
5626
|
+
cellType: "header",
|
|
5550
5627
|
column,
|
|
5551
5628
|
"data-name": `HeaderCell`,
|
|
5552
5629
|
"data-column-id": column.id,
|
|
@@ -5556,16 +5633,21 @@ function InfiniteTableHeaderCell(props) {
|
|
|
5556
5633
|
onPointerUp,
|
|
5557
5634
|
className: join(InfiniteTableHeaderCellClassName, userSelect.none, column.computedSortable ? cursor.pointer : "", useCellClassName(column, [InfiniteTableHeaderCellClassName, InfiniteTableCellClassName], HeaderCellRecipe, { dragging }), CellCls),
|
|
5558
5635
|
cssEllipsis: (_d = (_c = column.headerCssEllipsis) != null ? _c : column.cssEllipsis) != null ? _d : true,
|
|
5559
|
-
afterChildren: sortTool
|
|
5560
|
-
|
|
5636
|
+
afterChildren: sortTool,
|
|
5637
|
+
renderChildren
|
|
5638
|
+
}), draggingProxy);
|
|
5639
|
+
}
|
|
5640
|
+
function useInfiniteHeaderCell() {
|
|
5641
|
+
const result = (0, import_react22.useContext)(InfiniteTableHeaderCellContext);
|
|
5642
|
+
return result;
|
|
5561
5643
|
}
|
|
5562
5644
|
|
|
5563
5645
|
// src/components/RawList/index.tsx
|
|
5564
|
-
var
|
|
5646
|
+
var React16 = __toModule(require("react"));
|
|
5565
5647
|
var import_react25 = __toModule(require("react"));
|
|
5566
5648
|
|
|
5567
5649
|
// src/components/RawList/AvoidReactDiff.tsx
|
|
5568
|
-
var
|
|
5650
|
+
var React14 = __toModule(require("react"));
|
|
5569
5651
|
var import_react23 = __toModule(require("react"));
|
|
5570
5652
|
function AvoidReactDiffFn(props) {
|
|
5571
5653
|
const [children, setChildren] = (0, import_react23.useState)(props.updater.get());
|
|
@@ -5575,15 +5657,15 @@ function AvoidReactDiffFn(props) {
|
|
|
5575
5657
|
});
|
|
5576
5658
|
return remove;
|
|
5577
5659
|
}, [props.updater]);
|
|
5578
|
-
return /* @__PURE__ */
|
|
5660
|
+
return /* @__PURE__ */ React14.createElement(React14.Fragment, null, children);
|
|
5579
5661
|
}
|
|
5580
|
-
var AvoidReactDiff =
|
|
5662
|
+
var AvoidReactDiff = React14.memo(AvoidReactDiffFn);
|
|
5581
5663
|
|
|
5582
5664
|
// src/components/RawList/useVirtualRenderer.ts
|
|
5583
5665
|
var import_react24 = __toModule(require("react"));
|
|
5584
5666
|
|
|
5585
5667
|
// src/components/RawList/ReactVirtualRenderer.tsx
|
|
5586
|
-
var
|
|
5668
|
+
var React15 = __toModule(require("react"));
|
|
5587
5669
|
|
|
5588
5670
|
// src/components/RawList/MappedItems.ts
|
|
5589
5671
|
var MappedItems = class extends Logger {
|
|
@@ -5828,7 +5910,7 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
5828
5910
|
};
|
|
5829
5911
|
this.itemDOMRefs[elementIndex] = domRef;
|
|
5830
5912
|
this.updaters[elementIndex] = buildSubscriptionCallback();
|
|
5831
|
-
const item = /* @__PURE__ */
|
|
5913
|
+
const item = /* @__PURE__ */ React15.createElement(AvoidReactDiff, {
|
|
5832
5914
|
key: elementIndex,
|
|
5833
5915
|
name: `${elementIndex}`,
|
|
5834
5916
|
updater: this.updaters[elementIndex]
|
|
@@ -5925,11 +6007,11 @@ function RawListFn(props) {
|
|
|
5925
6007
|
});
|
|
5926
6008
|
return remove;
|
|
5927
6009
|
}, [brain, onRenderUpdater]);
|
|
5928
|
-
return /* @__PURE__ */
|
|
6010
|
+
return /* @__PURE__ */ React16.createElement(AvoidReactDiff, {
|
|
5929
6011
|
updater: onRenderUpdater
|
|
5930
6012
|
});
|
|
5931
6013
|
}
|
|
5932
|
-
var RawList =
|
|
6014
|
+
var RawList = React16.memo(RawListFn);
|
|
5933
6015
|
|
|
5934
6016
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
|
|
5935
6017
|
var debug3 = dbg("Header");
|
|
@@ -5950,7 +6032,7 @@ function InfiniteTableHeaderFn(props) {
|
|
|
5950
6032
|
}
|
|
5951
6033
|
return null;
|
|
5952
6034
|
}
|
|
5953
|
-
return /* @__PURE__ */
|
|
6035
|
+
return /* @__PURE__ */ React17.createElement(InfiniteTableHeaderCell, {
|
|
5954
6036
|
domRef: domRef2,
|
|
5955
6037
|
column,
|
|
5956
6038
|
headerHeight,
|
|
@@ -5977,18 +6059,18 @@ function InfiniteTableHeaderFn(props) {
|
|
|
5977
6059
|
className: join(TableHeaderClassName, `${TableHeaderClassName}--virtualized`, className, headerCls),
|
|
5978
6060
|
style
|
|
5979
6061
|
};
|
|
5980
|
-
return /* @__PURE__ */
|
|
6062
|
+
return /* @__PURE__ */ React17.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React17.createElement(RawList, {
|
|
5981
6063
|
brain,
|
|
5982
6064
|
renderItem: renderColumn
|
|
5983
6065
|
}));
|
|
5984
6066
|
}
|
|
5985
|
-
var InfiniteTableHeader =
|
|
6067
|
+
var InfiniteTableHeader = React17.memo(InfiniteTableHeaderFn);
|
|
5986
6068
|
|
|
5987
6069
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderUnvirtualized.tsx
|
|
5988
|
-
var
|
|
6070
|
+
var React20 = __toModule(require("react"));
|
|
5989
6071
|
|
|
5990
6072
|
// src/components/InfiniteTable/components/InfiniteTableHeader/renderColumnHeaderGroups.tsx
|
|
5991
|
-
var
|
|
6073
|
+
var React19 = __toModule(require("react"));
|
|
5992
6074
|
|
|
5993
6075
|
// src/components/InfiniteTable/components/InfiniteTableHeader/buildColumnAndGroupTree.ts
|
|
5994
6076
|
function buildColumnAndGroupTree(columns, columnGroups, columnGroupsDepthsMap) {
|
|
@@ -6078,7 +6160,7 @@ function assignGroupOffsetsAndComputedWidths(items, groupOffset = 0) {
|
|
|
6078
6160
|
}
|
|
6079
6161
|
|
|
6080
6162
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
|
|
6081
|
-
var
|
|
6163
|
+
var React18 = __toModule(require("react"));
|
|
6082
6164
|
var TableHeaderGroupClassName = `${rootClassName}HeaderGroup`;
|
|
6083
6165
|
function InfiniteTableHeaderGroup(props) {
|
|
6084
6166
|
const { columnGroup, height, headerHeight } = props;
|
|
@@ -6092,16 +6174,16 @@ function InfiniteTableHeaderGroup(props) {
|
|
|
6092
6174
|
width: columnGroup.computedWidth,
|
|
6093
6175
|
height
|
|
6094
6176
|
};
|
|
6095
|
-
return /* @__PURE__ */
|
|
6177
|
+
return /* @__PURE__ */ React18.createElement("div", {
|
|
6096
6178
|
"data-group-id": columnGroup.id,
|
|
6097
6179
|
className: join(HeaderGroupCls, TableHeaderGroupClassName, `${TableHeaderGroupClassName}--unvirtualized`),
|
|
6098
6180
|
style
|
|
6099
|
-
}, /* @__PURE__ */
|
|
6181
|
+
}, /* @__PURE__ */ React18.createElement("div", {
|
|
6100
6182
|
className: join(`${TableHeaderGroupClassName}__header`, HeaderGroup_Header),
|
|
6101
6183
|
style: { height: headerHeight }
|
|
6102
|
-
}, /* @__PURE__ */
|
|
6184
|
+
}, /* @__PURE__ */ React18.createElement("div", {
|
|
6103
6185
|
className: join(`${TableHeaderGroupClassName}__header-content`, cssEllipsisClassName)
|
|
6104
|
-
}, header)), /* @__PURE__ */
|
|
6186
|
+
}, header)), /* @__PURE__ */ React18.createElement("div", {
|
|
6105
6187
|
className: join(`${TableHeaderGroupClassName}__children`, HeaderGroup_Children)
|
|
6106
6188
|
}, props.children));
|
|
6107
6189
|
}
|
|
@@ -6124,7 +6206,7 @@ function renderColumnHeaderGroups(config) {
|
|
|
6124
6206
|
return items2.map((colGroupItem) => {
|
|
6125
6207
|
if (colGroupItem.type === "column") {
|
|
6126
6208
|
const col = colGroupItem.ref;
|
|
6127
|
-
return /* @__PURE__ */
|
|
6209
|
+
return /* @__PURE__ */ React19.createElement(InfiniteTableHeaderCell, {
|
|
6128
6210
|
key: col.id,
|
|
6129
6211
|
headerHeight: (columnGroupsMaxDepth - colGroupItem.depth + 2) * headerHeight,
|
|
6130
6212
|
column: col,
|
|
@@ -6138,7 +6220,7 @@ function renderColumnHeaderGroups(config) {
|
|
|
6138
6220
|
colIds.push(col.id);
|
|
6139
6221
|
return col;
|
|
6140
6222
|
});
|
|
6141
|
-
return /* @__PURE__ */
|
|
6223
|
+
return /* @__PURE__ */ React19.createElement(InfiniteTableHeaderGroup, {
|
|
6142
6224
|
key: `${colGroupItem.uniqueGroupId.join("/")}`,
|
|
6143
6225
|
columns: columns2,
|
|
6144
6226
|
height: (columnGroupsMaxDepth - colGroupItem.depth + 2) * headerHeight,
|
|
@@ -6191,9 +6273,9 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
|
|
|
6191
6273
|
},
|
|
6192
6274
|
computed: { computedVisibleColumnsMap: columnsMap }
|
|
6193
6275
|
} = useInfiniteTable();
|
|
6194
|
-
const domRef =
|
|
6276
|
+
const domRef = React20.useRef(null);
|
|
6195
6277
|
const hasColumnGroups = computedColumnGroups.size > 0;
|
|
6196
|
-
const columnHeaderGroups =
|
|
6278
|
+
const columnHeaderGroups = React20.useMemo(() => {
|
|
6197
6279
|
return hasColumnGroups ? renderColumnHeaderGroups({
|
|
6198
6280
|
columnGroups: computedColumnGroups,
|
|
6199
6281
|
columnGroupsDepthsMap,
|
|
@@ -6212,7 +6294,7 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
|
|
|
6212
6294
|
columnGroupsMaxDepth
|
|
6213
6295
|
]);
|
|
6214
6296
|
const children = hasColumnGroups ? columnHeaderGroups : columns.map((c) => {
|
|
6215
|
-
return /* @__PURE__ */
|
|
6297
|
+
return /* @__PURE__ */ React20.createElement(InfiniteTableHeaderCell, {
|
|
6216
6298
|
key: c.id,
|
|
6217
6299
|
headerHeight,
|
|
6218
6300
|
column: c,
|
|
@@ -6237,20 +6319,20 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
|
|
|
6237
6319
|
const removeOnScroll = scroller.onScroll(onScroll);
|
|
6238
6320
|
return removeOnScroll;
|
|
6239
6321
|
}, [brain, scrollListener]);
|
|
6240
|
-
return /* @__PURE__ */
|
|
6322
|
+
return /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({}, domProps), {
|
|
6241
6323
|
className: join(TableHeaderClassName2, `${TableHeaderClassName2}--unvirtualized`, pinning ? `${TableHeaderClassName2}--pinned ${TableHeaderClassName2}-${pinning}` : "", scrollable ? `${TableHeaderClassName2}--overflow` : "", domProps.className, HeaderClsRecipe({
|
|
6242
6324
|
pinned: pinning,
|
|
6243
6325
|
virtualized: false,
|
|
6244
6326
|
overflow: scrollable
|
|
6245
6327
|
})),
|
|
6246
6328
|
style
|
|
6247
|
-
}), /* @__PURE__ */
|
|
6329
|
+
}), /* @__PURE__ */ React20.createElement("div", {
|
|
6248
6330
|
style: { width: totalWidth },
|
|
6249
6331
|
className: join(flexFlow.row, display.flex),
|
|
6250
6332
|
ref: domRef
|
|
6251
6333
|
}, children));
|
|
6252
6334
|
}
|
|
6253
|
-
var InfiniteTableHeaderUnvirtualized =
|
|
6335
|
+
var InfiniteTableHeaderUnvirtualized = React20.memo(InfiniteTableHeaderUnvirtualizedFn);
|
|
6254
6336
|
|
|
6255
6337
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx
|
|
6256
6338
|
function TableHeaderWrapper(props) {
|
|
@@ -6283,7 +6365,7 @@ function TableHeaderWrapper(props) {
|
|
|
6283
6365
|
const unvirtualizedStyle = !virtualizeHeader && computedPinnedStartColumnsWidth ? {
|
|
6284
6366
|
left: computedPinnedStartWidth
|
|
6285
6367
|
} : void 0;
|
|
6286
|
-
const header = virtualizeHeader ? /* @__PURE__ */
|
|
6368
|
+
const header = virtualizeHeader ? /* @__PURE__ */ React21.createElement(InfiniteTableHeader, {
|
|
6287
6369
|
columns: computedUnpinnedColumns,
|
|
6288
6370
|
repaintId: virtualizeHeader ? repaintId : void 0,
|
|
6289
6371
|
brain,
|
|
@@ -6296,7 +6378,7 @@ function TableHeaderWrapper(props) {
|
|
|
6296
6378
|
},
|
|
6297
6379
|
availableWidth: computedUnpinnedColumnsWidth,
|
|
6298
6380
|
totalWidth: computedUnpinnedColumnsWidth
|
|
6299
|
-
}) : /* @__PURE__ */
|
|
6381
|
+
}) : /* @__PURE__ */ React21.createElement(InfiniteTableHeaderUnvirtualized, {
|
|
6300
6382
|
style: unvirtualizedStyle,
|
|
6301
6383
|
brain,
|
|
6302
6384
|
scrollable: true,
|
|
@@ -6305,12 +6387,12 @@ function TableHeaderWrapper(props) {
|
|
|
6305
6387
|
availableWidth: computedUnpinnedColumnsWidth,
|
|
6306
6388
|
totalWidth: computedUnpinnedColumnsWidth
|
|
6307
6389
|
});
|
|
6308
|
-
return /* @__PURE__ */
|
|
6390
|
+
return /* @__PURE__ */ React21.createElement("div", {
|
|
6309
6391
|
className: HeaderWrapperCls,
|
|
6310
6392
|
style: {
|
|
6311
6393
|
height: virtualizeHeader ? height : void 0
|
|
6312
6394
|
}
|
|
6313
|
-
}, hasPinnedStart ? /* @__PURE__ */
|
|
6395
|
+
}, hasPinnedStart ? /* @__PURE__ */ React21.createElement(InfiniteTableHeaderUnvirtualized, {
|
|
6314
6396
|
style: {
|
|
6315
6397
|
left: 0,
|
|
6316
6398
|
position: "absolute",
|
|
@@ -6322,7 +6404,7 @@ function TableHeaderWrapper(props) {
|
|
|
6322
6404
|
scrollable: computedPinnedStartOverflow,
|
|
6323
6405
|
pinning: "start",
|
|
6324
6406
|
scrollListener: computedPinnedStartOverflow ? pinnedStartScrollListener : void 0
|
|
6325
|
-
}) : null, header, hasPinnedEnd ? /* @__PURE__ */
|
|
6407
|
+
}) : null, header, hasPinnedEnd ? /* @__PURE__ */ React21.createElement(InfiniteTableHeaderUnvirtualized, {
|
|
6326
6408
|
style: {
|
|
6327
6409
|
right: scrollbars.vertical ? getScrollbarWidth() : 0,
|
|
6328
6410
|
position: "absolute",
|
|
@@ -6334,7 +6416,7 @@ function TableHeaderWrapper(props) {
|
|
|
6334
6416
|
scrollable: computedPinnedEndOverflow,
|
|
6335
6417
|
pinning: "end",
|
|
6336
6418
|
scrollListener: computedPinnedEndOverflow ? pinnedEndScrollListener : void 0
|
|
6337
|
-
}) : null, scrollbars.vertical ? /* @__PURE__ */
|
|
6419
|
+
}) : null, scrollbars.vertical ? /* @__PURE__ */ React21.createElement(VerticalScrollbarPlaceholder, {
|
|
6338
6420
|
style: {
|
|
6339
6421
|
height: "100%",
|
|
6340
6422
|
right: 0
|
|
@@ -6343,7 +6425,7 @@ function TableHeaderWrapper(props) {
|
|
|
6343
6425
|
}
|
|
6344
6426
|
|
|
6345
6427
|
// src/components/VirtualScrollContainer/index.tsx
|
|
6346
|
-
var
|
|
6428
|
+
var React22 = __toModule(require("react"));
|
|
6347
6429
|
var import_react29 = __toModule(require("react"));
|
|
6348
6430
|
|
|
6349
6431
|
// src/components/hooks/useOnScroll.ts
|
|
@@ -6387,7 +6469,7 @@ var getScrollableClassName = (scrollable) => {
|
|
|
6387
6469
|
|
|
6388
6470
|
// src/components/VirtualScrollContainer/index.tsx
|
|
6389
6471
|
var rootClassName6 = "InfiniteVirtualScrollContainer";
|
|
6390
|
-
var VirtualScrollContainer =
|
|
6472
|
+
var VirtualScrollContainer = React22.forwardRef(function VirtualScrollContainer2(props, ref) {
|
|
6391
6473
|
const {
|
|
6392
6474
|
children,
|
|
6393
6475
|
scrollable = true,
|
|
@@ -6397,7 +6479,7 @@ var VirtualScrollContainer = React21.forwardRef(function VirtualScrollContainer2
|
|
|
6397
6479
|
} = props;
|
|
6398
6480
|
const domRef = ref != null ? ref : (0, import_react29.useRef)(null);
|
|
6399
6481
|
useOnScroll(domRef, onContainerScroll);
|
|
6400
|
-
return /* @__PURE__ */
|
|
6482
|
+
return /* @__PURE__ */ React22.createElement("div", {
|
|
6401
6483
|
ref: domRef,
|
|
6402
6484
|
style,
|
|
6403
6485
|
className: join(className, rootClassName6, VirtualScrollContainerCls, getScrollableClassName(scrollable))
|
|
@@ -6405,7 +6487,7 @@ var VirtualScrollContainer = React21.forwardRef(function VirtualScrollContainer2
|
|
|
6405
6487
|
});
|
|
6406
6488
|
|
|
6407
6489
|
// src/components/VirtualList/SpacePlaceholder.tsx
|
|
6408
|
-
var
|
|
6490
|
+
var React23 = __toModule(require("react"));
|
|
6409
6491
|
function SpacePlaceholderFn(props) {
|
|
6410
6492
|
const { height, width, count } = props;
|
|
6411
6493
|
const style = {
|
|
@@ -6415,7 +6497,7 @@ function SpacePlaceholderFn(props) {
|
|
|
6415
6497
|
opacity: 0,
|
|
6416
6498
|
pointerEvents: "none"
|
|
6417
6499
|
};
|
|
6418
|
-
return /* @__PURE__ */
|
|
6500
|
+
return /* @__PURE__ */ React23.createElement("div", {
|
|
6419
6501
|
"data-count": count,
|
|
6420
6502
|
"data-placeholder-width": true ? width : void 0,
|
|
6421
6503
|
"data-placeholder-height": true ? height : void 0,
|
|
@@ -6423,20 +6505,20 @@ function SpacePlaceholderFn(props) {
|
|
|
6423
6505
|
style
|
|
6424
6506
|
});
|
|
6425
6507
|
}
|
|
6426
|
-
var SpacePlaceholder =
|
|
6508
|
+
var SpacePlaceholder = React23.memo(SpacePlaceholderFn);
|
|
6427
6509
|
|
|
6428
6510
|
// src/components/InfiniteTable/hooks/useListRendering.tsx
|
|
6429
|
-
var
|
|
6511
|
+
var import_react41 = __toModule(require("react"));
|
|
6430
6512
|
|
|
6431
6513
|
// src/components/InfiniteTable/hooks/useUnpinnedRendering.tsx
|
|
6432
|
-
var
|
|
6433
|
-
var
|
|
6514
|
+
var React29 = __toModule(require("react"));
|
|
6515
|
+
var import_react34 = __toModule(require("react"));
|
|
6434
6516
|
|
|
6435
6517
|
// src/components/VirtualList/VirtualRowList.tsx
|
|
6436
|
-
var
|
|
6518
|
+
var React25 = __toModule(require("react"));
|
|
6437
6519
|
|
|
6438
6520
|
// src/components/VirtualList/VirtualList.tsx
|
|
6439
|
-
var
|
|
6521
|
+
var React24 = __toModule(require("react"));
|
|
6440
6522
|
var import_react30 = __toModule(require("react"));
|
|
6441
6523
|
|
|
6442
6524
|
// src/components/VirtualList/VirtualList.css.ts
|
|
@@ -6518,19 +6600,19 @@ var VirtualList = (props) => {
|
|
|
6518
6600
|
if (true) {
|
|
6519
6601
|
domProps["data-cmp-name"] = `VirtualList`;
|
|
6520
6602
|
}
|
|
6521
|
-
return /* @__PURE__ */
|
|
6603
|
+
return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React24.createElement(VirtualScrollContainer, {
|
|
6522
6604
|
scrollable,
|
|
6523
6605
|
onContainerScroll
|
|
6524
|
-
}, /* @__PURE__ */
|
|
6606
|
+
}, /* @__PURE__ */ React24.createElement("div", {
|
|
6525
6607
|
ref: domRef,
|
|
6526
6608
|
className: scrollTransformTargetCls,
|
|
6527
6609
|
"data-name": "scroll-transform-target"
|
|
6528
|
-
}, /* @__PURE__ */
|
|
6610
|
+
}, /* @__PURE__ */ React24.createElement(RawList, {
|
|
6529
6611
|
brain: virtualBrain,
|
|
6530
6612
|
renderItem,
|
|
6531
6613
|
repaintId,
|
|
6532
6614
|
debugChannel: "VirtualList-" + mainAxis
|
|
6533
|
-
})), children, /* @__PURE__ */
|
|
6615
|
+
})), children, /* @__PURE__ */ React24.createElement(SpacePlaceholder, {
|
|
6534
6616
|
count,
|
|
6535
6617
|
width,
|
|
6536
6618
|
height
|
|
@@ -6540,14 +6622,14 @@ var VirtualList = (props) => {
|
|
|
6540
6622
|
// src/components/VirtualList/VirtualRowList.tsx
|
|
6541
6623
|
var VirtualRowList = (props) => {
|
|
6542
6624
|
const _a = props, { rowWidth, rowHeight, renderRow } = _a, listProps = __objRest(_a, ["rowWidth", "rowHeight", "renderRow"]);
|
|
6543
|
-
const renderItem =
|
|
6625
|
+
const renderItem = React25.useCallback((renderProps) => {
|
|
6544
6626
|
return renderRow({
|
|
6545
6627
|
domRef: renderProps.domRef,
|
|
6546
6628
|
rowHeight: renderProps.itemSize,
|
|
6547
6629
|
rowIndex: renderProps.itemIndex
|
|
6548
6630
|
});
|
|
6549
6631
|
}, [renderRow]);
|
|
6550
|
-
return /* @__PURE__ */
|
|
6632
|
+
return /* @__PURE__ */ React25.createElement(VirtualList, __spreadProps(__spreadValues({}, listProps), {
|
|
6551
6633
|
renderItem,
|
|
6552
6634
|
mainAxis: "vertical",
|
|
6553
6635
|
itemMainAxisSize: rowHeight,
|
|
@@ -6556,12 +6638,14 @@ var VirtualRowList = (props) => {
|
|
|
6556
6638
|
};
|
|
6557
6639
|
|
|
6558
6640
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRow.tsx
|
|
6559
|
-
var
|
|
6560
|
-
var
|
|
6641
|
+
var React27 = __toModule(require("react"));
|
|
6642
|
+
var import_react33 = __toModule(require("react"));
|
|
6561
6643
|
|
|
6562
6644
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx
|
|
6563
|
-
var
|
|
6645
|
+
var React26 = __toModule(require("react"));
|
|
6646
|
+
var import_react31 = __toModule(require("react"));
|
|
6564
6647
|
var { rootClassName: rootClassName8 } = internalProps;
|
|
6648
|
+
var InfiniteTableColumnCellContext = React26.createContext(null);
|
|
6565
6649
|
var InfiniteTableColumnCellClassName = `${rootClassName8}ColumnCell`;
|
|
6566
6650
|
function isColumnWithField(c) {
|
|
6567
6651
|
return typeof c.field === "string";
|
|
@@ -6608,24 +6692,31 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
6608
6692
|
column
|
|
6609
6693
|
}, rest);
|
|
6610
6694
|
let renderValue = value;
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
|
|
6619
|
-
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
renderValue = column.renderValue(renderParam);
|
|
6695
|
+
const renderParam = __spreadProps(__spreadValues({
|
|
6696
|
+
value,
|
|
6697
|
+
column,
|
|
6698
|
+
domRef,
|
|
6699
|
+
groupRowInfo
|
|
6700
|
+
}, rest), {
|
|
6701
|
+
rowIndex,
|
|
6702
|
+
toggleGroupRow,
|
|
6703
|
+
toggleCurrentGroupRow: () => toggleGroupRow(rowInfo.groupKeys),
|
|
6704
|
+
groupBy: computedDataSource.groupBy,
|
|
6705
|
+
pivotBy: computedDataSource.pivotBy
|
|
6706
|
+
});
|
|
6707
|
+
const renderChildren = () => {
|
|
6708
|
+
if (hidden) {
|
|
6709
|
+
return null;
|
|
6627
6710
|
}
|
|
6628
|
-
|
|
6711
|
+
const renderFn = column.render || column.renderValue;
|
|
6712
|
+
if (renderFn) {
|
|
6713
|
+
return /* @__PURE__ */ React26.createElement(RenderHookComponent, {
|
|
6714
|
+
render: renderFn,
|
|
6715
|
+
renderParam
|
|
6716
|
+
});
|
|
6717
|
+
}
|
|
6718
|
+
return renderValue;
|
|
6719
|
+
};
|
|
6629
6720
|
const colClassName = column.className ? typeof column.className === "function" ? column.className(stylingRenderParam) : column.className : void 0;
|
|
6630
6721
|
const colStyle = column.style ? typeof column.style === "function" ? column.style(stylingRenderParam) : column.style : void 0;
|
|
6631
6722
|
const style = colStyle ? __spreadProps(__spreadValues({}, colStyle), {
|
|
@@ -6653,21 +6744,31 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
6653
6744
|
}
|
|
6654
6745
|
}
|
|
6655
6746
|
}
|
|
6656
|
-
|
|
6747
|
+
const cellProps = __spreadProps(__spreadValues({
|
|
6657
6748
|
domRef,
|
|
6658
6749
|
offsetProperty
|
|
6659
6750
|
}, dataset), {
|
|
6751
|
+
cellType: "body",
|
|
6660
6752
|
column,
|
|
6661
6753
|
offset: virtualized ? 0 : column.computedPinningOffset,
|
|
6662
6754
|
style,
|
|
6663
6755
|
cssEllipsis: (_a = column.cssEllipsis) != null ? _a : true,
|
|
6664
|
-
className: join(useCellClassName(column, [InfiniteTableColumnCellClassName, InfiniteTableCellClassName], ColumnCellRecipe, { dragging: false }), colClassName)
|
|
6665
|
-
|
|
6756
|
+
className: join(useCellClassName(column, [InfiniteTableColumnCellClassName, InfiniteTableCellClassName], ColumnCellRecipe, { dragging: false }), colClassName),
|
|
6757
|
+
renderChildren
|
|
6758
|
+
});
|
|
6759
|
+
const ContextProvider = InfiniteTableColumnCellContext.Provider;
|
|
6760
|
+
return /* @__PURE__ */ React26.createElement(ContextProvider, {
|
|
6761
|
+
value: renderParam
|
|
6762
|
+
}, /* @__PURE__ */ React26.createElement(InfiniteTableCell, __spreadValues({}, cellProps)));
|
|
6763
|
+
}
|
|
6764
|
+
var InfiniteTableColumnCell = React26.memo(InfiniteTableColumnCellFn);
|
|
6765
|
+
function useInfiniteColumnCell() {
|
|
6766
|
+
const result = (0, import_react31.useContext)(InfiniteTableColumnCellContext);
|
|
6767
|
+
return result;
|
|
6666
6768
|
}
|
|
6667
|
-
var InfiniteTableColumnCell = React25.memo(InfiniteTableColumnCellFn);
|
|
6668
6769
|
|
|
6669
6770
|
// src/components/InfiniteTable/components/InfiniteTableRow/useRowDOMProps.ts
|
|
6670
|
-
var
|
|
6771
|
+
var import_react32 = __toModule(require("react"));
|
|
6671
6772
|
|
|
6672
6773
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowClassName.ts
|
|
6673
6774
|
var { rootClassName: rootClassName9 } = internalProps;
|
|
@@ -6693,8 +6794,8 @@ function useRowDOMProps(props, rowProps, rowStyle, rowClassName, groupRenderStra
|
|
|
6693
6794
|
rowInfo,
|
|
6694
6795
|
rowSpan
|
|
6695
6796
|
} = props;
|
|
6696
|
-
const domRef = (0,
|
|
6697
|
-
const rowDOMRef = (0,
|
|
6797
|
+
const domRef = (0, import_react32.useRef)(null);
|
|
6798
|
+
const rowDOMRef = (0, import_react32.useCallback)((node) => {
|
|
6698
6799
|
domRefFromProps(node);
|
|
6699
6800
|
domRef.current = node;
|
|
6700
6801
|
}, []);
|
|
@@ -6725,7 +6826,7 @@ function useRowDOMProps(props, rowProps, rowStyle, rowClassName, groupRenderStra
|
|
|
6725
6826
|
}), `${InfiniteTableRowClassName}--${rowInfo.isGroupRow ? "group" : "normal"}-row`, inlineGroupRoot ? `${InfiniteTableRowClassName}--inline-group-row` : "", showZebraRows ? `${InfiniteTableRowClassName}--${odd ? "odd" : "even"}` : null, showHoverRows ? `${InfiniteTableRowClassName}--show-hover` : null, domProps == null ? void 0 : domProps.className, rowProps == null ? void 0 : rowProps.className, rowComputedClassName);
|
|
6726
6827
|
const initialMouseEnter = rowProps == null ? void 0 : rowProps.onMouseEnter;
|
|
6727
6828
|
const initialMouseLeave = rowProps == null ? void 0 : rowProps.onMouseLeave;
|
|
6728
|
-
const onMouseEnter = (0,
|
|
6829
|
+
const onMouseEnter = (0, import_react32.useCallback)((event) => {
|
|
6729
6830
|
var _a;
|
|
6730
6831
|
initialMouseEnter == null ? void 0 : initialMouseEnter(event);
|
|
6731
6832
|
const rowIndex2 = ((_a = event.currentTarget) == null ? void 0 : _a.dataset.rowIndex) * 1;
|
|
@@ -6739,7 +6840,7 @@ function useRowDOMProps(props, rowProps, rowStyle, rowClassName, groupRenderStra
|
|
|
6739
6840
|
const rows = parentNode.querySelectorAll(hoverSelector.join(","));
|
|
6740
6841
|
rows.forEach((row) => row.classList.add(InfiniteTableRowClassName__hover, RowHoverCls));
|
|
6741
6842
|
}, [initialMouseEnter, showHoverRows]);
|
|
6742
|
-
const onMouseLeave = (0,
|
|
6843
|
+
const onMouseLeave = (0, import_react32.useCallback)((event) => {
|
|
6743
6844
|
var _a;
|
|
6744
6845
|
initialMouseLeave == null ? void 0 : initialMouseLeave(event);
|
|
6745
6846
|
const rowIndex2 = (_a = event.currentTarget) == null ? void 0 : _a.dataset.rowIndex;
|
|
@@ -6795,13 +6896,13 @@ function InfiniteTableRowFn(props) {
|
|
|
6795
6896
|
width: rowWidth,
|
|
6796
6897
|
height: rowHeight
|
|
6797
6898
|
}, domProps.style);
|
|
6798
|
-
const renderCellRef = (0,
|
|
6799
|
-
const renderCell =
|
|
6899
|
+
const renderCellRef = (0, import_react33.useRef)(null);
|
|
6900
|
+
const renderCell = React27.useCallback(({ domRef, itemIndex }) => {
|
|
6800
6901
|
const column = columns[itemIndex];
|
|
6801
6902
|
if (!column) {
|
|
6802
6903
|
}
|
|
6803
6904
|
const hidden = false;
|
|
6804
|
-
return /* @__PURE__ */
|
|
6905
|
+
return /* @__PURE__ */ React27.createElement(InfiniteTableColumnCell, {
|
|
6805
6906
|
getData,
|
|
6806
6907
|
rowInfo,
|
|
6807
6908
|
groupRenderStrategy,
|
|
@@ -6828,18 +6929,18 @@ function InfiniteTableRowFn(props) {
|
|
|
6828
6929
|
if (true) {
|
|
6829
6930
|
domProps["data-cmp-name"] = "ITableRow";
|
|
6830
6931
|
}
|
|
6831
|
-
return /* @__PURE__ */
|
|
6932
|
+
return /* @__PURE__ */ React27.createElement("div", __spreadProps(__spreadValues({}, domProps), {
|
|
6832
6933
|
style
|
|
6833
|
-
}), /* @__PURE__ */
|
|
6934
|
+
}), /* @__PURE__ */ React27.createElement(RawList, {
|
|
6834
6935
|
brain,
|
|
6835
6936
|
renderItem: renderCell,
|
|
6836
6937
|
debugChannel: `${rowIndex}`
|
|
6837
6938
|
}));
|
|
6838
6939
|
}
|
|
6839
|
-
var InfiniteTableRow =
|
|
6940
|
+
var InfiniteTableRow = React27.memo(InfiniteTableRowFn);
|
|
6840
6941
|
|
|
6841
6942
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowUnvirtualized.tsx
|
|
6842
|
-
var
|
|
6943
|
+
var React28 = __toModule(require("react"));
|
|
6843
6944
|
function TableRowUnvirtualizedFn(props) {
|
|
6844
6945
|
const {
|
|
6845
6946
|
rowHeight,
|
|
@@ -6860,7 +6961,7 @@ function TableRowUnvirtualizedFn(props) {
|
|
|
6860
6961
|
}, domProps.style);
|
|
6861
6962
|
const children = columns.map((col) => {
|
|
6862
6963
|
const hidden = false;
|
|
6863
|
-
return /* @__PURE__ */
|
|
6964
|
+
return /* @__PURE__ */ React28.createElement(InfiniteTableColumnCell, {
|
|
6864
6965
|
key: col.id,
|
|
6865
6966
|
virtualized: false,
|
|
6866
6967
|
rowHeight,
|
|
@@ -6873,11 +6974,11 @@ function TableRowUnvirtualizedFn(props) {
|
|
|
6873
6974
|
column: col
|
|
6874
6975
|
});
|
|
6875
6976
|
});
|
|
6876
|
-
return /* @__PURE__ */
|
|
6977
|
+
return /* @__PURE__ */ React28.createElement("div", __spreadProps(__spreadValues({}, domProps), {
|
|
6877
6978
|
style
|
|
6878
6979
|
}), children);
|
|
6879
6980
|
}
|
|
6880
|
-
var TableRowUnvirtualized =
|
|
6981
|
+
var TableRowUnvirtualized = React28.memo(TableRowUnvirtualizedFn);
|
|
6881
6982
|
|
|
6882
6983
|
// src/components/InfiniteTable/hooks/useUnpinnedRendering.tsx
|
|
6883
6984
|
function useUnpinnedRendering(params) {
|
|
@@ -6900,7 +7001,7 @@ function useUnpinnedRendering(params) {
|
|
|
6900
7001
|
} = params;
|
|
6901
7002
|
const { virtualizeColumns } = getState();
|
|
6902
7003
|
const shouldVirtualizeColumns = typeof virtualizeColumns === "function" ? virtualizeColumns(computedUnpinnedColumns) : virtualizeColumns != null ? virtualizeColumns : true;
|
|
6903
|
-
const renderRowUnpinned = (0,
|
|
7004
|
+
const renderRowUnpinned = (0, import_react34.useCallback)((rowParams) => {
|
|
6904
7005
|
const dataArray = getData();
|
|
6905
7006
|
const rowInfo = dataArray[rowParams.rowIndex];
|
|
6906
7007
|
const { showZebraRows, showHoverRows } = getState();
|
|
@@ -6922,7 +7023,7 @@ function useUnpinnedRendering(params) {
|
|
|
6922
7023
|
rowProps.repaintId = repaintId;
|
|
6923
7024
|
}
|
|
6924
7025
|
const TableRowComponent = shouldVirtualizeColumns ? InfiniteTableRow : TableRowUnvirtualized;
|
|
6925
|
-
return /* @__PURE__ */
|
|
7026
|
+
return /* @__PURE__ */ React29.createElement(TableRowComponent, __spreadValues({}, rowProps));
|
|
6926
7027
|
}, [
|
|
6927
7028
|
repaintId,
|
|
6928
7029
|
rowHeight,
|
|
@@ -6933,7 +7034,7 @@ function useUnpinnedRendering(params) {
|
|
|
6933
7034
|
horizontalVirtualBrain,
|
|
6934
7035
|
verticalVirtualBrain
|
|
6935
7036
|
]);
|
|
6936
|
-
const fakeScrollbar = getScrollbarWidth() ? /* @__PURE__ */
|
|
7037
|
+
const fakeScrollbar = getScrollbarWidth() ? /* @__PURE__ */ React29.createElement("div", {
|
|
6937
7038
|
"data-name": "horizontal-scrollbar-placeholder--fake",
|
|
6938
7039
|
style: {
|
|
6939
7040
|
position: "absolute",
|
|
@@ -6944,10 +7045,10 @@ function useUnpinnedRendering(params) {
|
|
|
6944
7045
|
overflow: "auto",
|
|
6945
7046
|
visibility: columnShifts ? "visible" : "hidden"
|
|
6946
7047
|
}
|
|
6947
|
-
}, /* @__PURE__ */
|
|
7048
|
+
}, /* @__PURE__ */ React29.createElement("div", {
|
|
6948
7049
|
style: { height: "100%", width: computedUnpinnedColumnsWidth }
|
|
6949
7050
|
})) : null;
|
|
6950
|
-
return rowHeight != 0 ? /* @__PURE__ */
|
|
7051
|
+
return rowHeight != 0 ? /* @__PURE__ */ React29.createElement(VirtualRowList, {
|
|
6951
7052
|
repaintId: `${repaintId}-unpinned-`,
|
|
6952
7053
|
brain: verticalVirtualBrain,
|
|
6953
7054
|
onContainerScroll: applyScrollHorizontal,
|
|
@@ -6968,7 +7069,7 @@ function useUnpinnedRendering(params) {
|
|
|
6968
7069
|
}
|
|
6969
7070
|
|
|
6970
7071
|
// src/components/InfiniteTable/hooks/useOnContainerScroll.ts
|
|
6971
|
-
var
|
|
7072
|
+
var import_react35 = __toModule(require("react"));
|
|
6972
7073
|
|
|
6973
7074
|
// src/components/InfiniteTable/InfiniteCls.css.ts
|
|
6974
7075
|
var import_createRuntimeFn5 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
|
|
@@ -7006,18 +7107,18 @@ var useOnContainerScroll = ({
|
|
|
7006
7107
|
getState: getDataSourceState,
|
|
7007
7108
|
componentState: { notifyScrollStop }
|
|
7008
7109
|
} = useDataSourceContextValue();
|
|
7009
|
-
const onScrollStop = (0,
|
|
7110
|
+
const onScrollStop = (0, import_react35.useCallback)((param) => {
|
|
7010
7111
|
onScrollStopFromProps == null ? void 0 : onScrollStopFromProps(param);
|
|
7011
7112
|
notifyScrollStop(param);
|
|
7012
7113
|
}, [onScrollStopFromProps, notifyScrollStop]);
|
|
7013
|
-
const timeoutIdRef = (0,
|
|
7014
|
-
const scrollingRef = (0,
|
|
7015
|
-
const scrollTopMaxRef = (0,
|
|
7016
|
-
(0,
|
|
7114
|
+
const timeoutIdRef = (0, import_react35.useRef)(0);
|
|
7115
|
+
const scrollingRef = (0, import_react35.useRef)(false);
|
|
7116
|
+
const scrollTopMaxRef = (0, import_react35.useRef)(0);
|
|
7117
|
+
(0, import_react35.useEffect)(() => {
|
|
7017
7118
|
const { current: node } = scrollerDOMRef;
|
|
7018
7119
|
scrollTopMaxRef.current = node.scrollHeight - node.clientHeight;
|
|
7019
7120
|
}, [reservedContentHeight, bodySize.height]);
|
|
7020
|
-
const setScrolling = (0,
|
|
7121
|
+
const setScrolling = (0, import_react35.useCallback)((scrolling) => {
|
|
7021
7122
|
var _a;
|
|
7022
7123
|
const prevScrolling = scrollingRef.current;
|
|
7023
7124
|
scrollingRef.current = scrolling;
|
|
@@ -7050,7 +7151,7 @@ var useOnContainerScroll = ({
|
|
|
7050
7151
|
}
|
|
7051
7152
|
}
|
|
7052
7153
|
}, [scrollStopDelay, onScrollStop]);
|
|
7053
|
-
const onContainerScroll = (0,
|
|
7154
|
+
const onContainerScroll = (0, import_react35.useCallback)((scrollInfo) => {
|
|
7054
7155
|
verticalVirtualBrain.setScrollPosition(scrollInfo);
|
|
7055
7156
|
horizontalVirtualBrain.setScrollPosition(scrollInfo);
|
|
7056
7157
|
setScrolling(true);
|
|
@@ -7060,15 +7161,15 @@ var useOnContainerScroll = ({
|
|
|
7060
7161
|
domRef.current,
|
|
7061
7162
|
setScrolling
|
|
7062
7163
|
]);
|
|
7063
|
-
const scrollPositionRef = (0,
|
|
7164
|
+
const scrollPositionRef = (0, import_react35.useRef)({
|
|
7064
7165
|
scrollLeft: 0,
|
|
7065
7166
|
scrollTop: 0
|
|
7066
7167
|
});
|
|
7067
|
-
const applyScrollHorizontal = (0,
|
|
7168
|
+
const applyScrollHorizontal = (0, import_react35.useCallback)(({ scrollLeft }) => {
|
|
7068
7169
|
scrollPositionRef.current.scrollLeft = scrollLeft;
|
|
7069
7170
|
onContainerScroll(scrollPositionRef.current);
|
|
7070
7171
|
}, [onContainerScroll]);
|
|
7071
|
-
const applyScrollVertical = (0,
|
|
7172
|
+
const applyScrollVertical = (0, import_react35.useCallback)(({ scrollTop }) => {
|
|
7072
7173
|
scrollPositionRef.current.scrollTop = scrollTop;
|
|
7073
7174
|
onContainerScroll(scrollPositionRef.current);
|
|
7074
7175
|
if (scrollTop === 0) {
|
|
@@ -7090,17 +7191,17 @@ var useOnContainerScroll = ({
|
|
|
7090
7191
|
};
|
|
7091
7192
|
|
|
7092
7193
|
// src/components/InfiniteTable/hooks/usePinnedRendering.tsx
|
|
7093
|
-
var
|
|
7094
|
-
var
|
|
7194
|
+
var React31 = __toModule(require("react"));
|
|
7195
|
+
var import_react38 = __toModule(require("react"));
|
|
7095
7196
|
|
|
7096
7197
|
// src/components/VirtualList/RowListWithExternalScrolling.tsx
|
|
7097
|
-
var
|
|
7098
|
-
var
|
|
7198
|
+
var React30 = __toModule(require("react"));
|
|
7199
|
+
var import_react37 = __toModule(require("react"));
|
|
7099
7200
|
|
|
7100
7201
|
// src/components/hooks/useOnMount.ts
|
|
7101
|
-
var
|
|
7202
|
+
var import_react36 = __toModule(require("react"));
|
|
7102
7203
|
function useOnMount(domRef, props) {
|
|
7103
|
-
(0,
|
|
7204
|
+
(0, import_react36.useEffect)(() => {
|
|
7104
7205
|
const { onMount, onUnmount } = props;
|
|
7105
7206
|
const node = domRef == null ? void 0 : domRef.current;
|
|
7106
7207
|
onMount == null ? void 0 : onMount(node);
|
|
@@ -7131,8 +7232,8 @@ var RowListWithExternalScrolling = (props) => {
|
|
|
7131
7232
|
onMount,
|
|
7132
7233
|
onUnmount
|
|
7133
7234
|
} = props;
|
|
7134
|
-
const domRef = (0,
|
|
7135
|
-
const renderItem = (0,
|
|
7235
|
+
const domRef = (0, import_react37.useRef)(null);
|
|
7236
|
+
const renderItem = (0, import_react37.useCallback)((renderProps) => renderRow({
|
|
7136
7237
|
domRef: renderProps.domRef,
|
|
7137
7238
|
rowHeight: renderProps.itemSize,
|
|
7138
7239
|
rowIndex: renderProps.itemIndex
|
|
@@ -7141,7 +7242,7 @@ var RowListWithExternalScrolling = (props) => {
|
|
|
7141
7242
|
onMount,
|
|
7142
7243
|
onUnmount
|
|
7143
7244
|
});
|
|
7144
|
-
(0,
|
|
7245
|
+
(0, import_react37.useEffect)(() => {
|
|
7145
7246
|
const onScroll = (scrollPosition) => {
|
|
7146
7247
|
const node = domRef.current;
|
|
7147
7248
|
if (node) {
|
|
@@ -7170,7 +7271,7 @@ var RowListWithExternalScrolling = (props) => {
|
|
|
7170
7271
|
if (true) {
|
|
7171
7272
|
domProps["data-cmp-name"] = "RowListWithExternalScrolling";
|
|
7172
7273
|
}
|
|
7173
|
-
return /* @__PURE__ */
|
|
7274
|
+
return /* @__PURE__ */ React30.createElement("div", __spreadValues({}, domProps), /* @__PURE__ */ React30.createElement(RawList, {
|
|
7174
7275
|
brain,
|
|
7175
7276
|
renderItem,
|
|
7176
7277
|
repaintId
|
|
@@ -7193,7 +7294,7 @@ function PinnedRowsContainer(props) {
|
|
|
7193
7294
|
brain,
|
|
7194
7295
|
renderRow
|
|
7195
7296
|
} = props;
|
|
7196
|
-
const style =
|
|
7297
|
+
const style = React31.useMemo(() => {
|
|
7197
7298
|
const result = pinning === "end" ? {
|
|
7198
7299
|
width: rowWidth,
|
|
7199
7300
|
height,
|
|
@@ -7208,7 +7309,7 @@ function PinnedRowsContainer(props) {
|
|
|
7208
7309
|
}
|
|
7209
7310
|
return result;
|
|
7210
7311
|
}, [height, rowWidth, pinning, hasOverflow]);
|
|
7211
|
-
const updateScroll = (0,
|
|
7312
|
+
const updateScroll = (0, import_react38.useCallback)((node, scrollPosition) => {
|
|
7212
7313
|
UPDATE_SCROLL3(node, scrollPosition, hasOverflow ? pinnedScrollListener.getScrollPosition() : void 0);
|
|
7213
7314
|
}, [hasOverflow, pinnedScrollListener]);
|
|
7214
7315
|
const rowListProps = {
|
|
@@ -7219,7 +7320,7 @@ function PinnedRowsContainer(props) {
|
|
|
7219
7320
|
className: join(`${PinnedRowsContainerClassName}`, PinnedRowsClsVariants[pinning === "start" ? "pinnedStart" : "pinnedEnd"], `${PinnedRowsContainerClassName}--pinned-${pinning}`, `${PinnedRowsContainerClassName}--overflow`, PinnedRowsClsVariants.overflow)
|
|
7220
7321
|
};
|
|
7221
7322
|
if (hasOverflow) {
|
|
7222
|
-
return /* @__PURE__ */
|
|
7323
|
+
return /* @__PURE__ */ React31.createElement(VirtualScrollContainer, {
|
|
7223
7324
|
scrollable: {
|
|
7224
7325
|
horizontal: true,
|
|
7225
7326
|
vertical: false
|
|
@@ -7235,23 +7336,23 @@ function PinnedRowsContainer(props) {
|
|
|
7235
7336
|
className: join(PinnedRowsContainerClsVariants({
|
|
7236
7337
|
pinned: pinning
|
|
7237
7338
|
}), `${PinnedRowsContainerClassName}Container`, `${PinnedRowsContainerClassName}Container--pinned-${pinning}`)
|
|
7238
|
-
}, /* @__PURE__ */
|
|
7339
|
+
}, /* @__PURE__ */ React31.createElement(RowListWithExternalScrolling, __spreadProps(__spreadValues({}, rowListProps), {
|
|
7239
7340
|
onMount: (node) => {
|
|
7240
7341
|
pinnedScrollListener == null ? void 0 : pinnedScrollListener.onScroll((scrollPosition) => {
|
|
7241
7342
|
updateScroll(node, brain.getScrollPosition(), scrollPosition);
|
|
7242
7343
|
});
|
|
7243
7344
|
}
|
|
7244
|
-
})), /* @__PURE__ */
|
|
7345
|
+
})), /* @__PURE__ */ React31.createElement(SpacePlaceholder, {
|
|
7245
7346
|
width: rowWidth,
|
|
7246
7347
|
height: 1
|
|
7247
7348
|
}));
|
|
7248
7349
|
}
|
|
7249
|
-
return /* @__PURE__ */
|
|
7350
|
+
return /* @__PURE__ */ React31.createElement(RowListWithExternalScrolling, __spreadValues({}, rowListProps));
|
|
7250
7351
|
}
|
|
7251
7352
|
function useRenderPinnedRow(params) {
|
|
7252
7353
|
const { getData, getState, columnsWidth, columns, rowSpan, verticalBrain } = params;
|
|
7253
7354
|
const dataArray = getData();
|
|
7254
|
-
const renderPinnedRow = (0,
|
|
7355
|
+
const renderPinnedRow = (0, import_react38.useCallback)((rowParams) => {
|
|
7255
7356
|
const rowInfo = dataArray[rowParams.rowIndex];
|
|
7256
7357
|
const { showZebraRows, showHoverRows } = getState();
|
|
7257
7358
|
const rowProps = __spreadValues({
|
|
@@ -7267,7 +7368,7 @@ function useRenderPinnedRow(params) {
|
|
|
7267
7368
|
rowWidth: columnsWidth,
|
|
7268
7369
|
columns
|
|
7269
7370
|
}, rowParams);
|
|
7270
|
-
return /* @__PURE__ */
|
|
7371
|
+
return /* @__PURE__ */ React31.createElement(TableRowUnvirtualized, __spreadValues({}, rowProps));
|
|
7271
7372
|
}, [columnsWidth, columns, verticalBrain, dataArray]);
|
|
7272
7373
|
return renderPinnedRow;
|
|
7273
7374
|
}
|
|
@@ -7313,7 +7414,7 @@ function usePinnedRenderingForSide(side, params) {
|
|
|
7313
7414
|
columns,
|
|
7314
7415
|
columnsWidth
|
|
7315
7416
|
});
|
|
7316
|
-
const pinnedList = columns.length && rowHeight !== 0 ? /* @__PURE__ */
|
|
7417
|
+
const pinnedList = columns.length && rowHeight !== 0 ? /* @__PURE__ */ React31.createElement(PinnedRowsContainer, {
|
|
7317
7418
|
pinning: side,
|
|
7318
7419
|
pinnedScrollListener,
|
|
7319
7420
|
hasOverflow,
|
|
@@ -7326,7 +7427,7 @@ function usePinnedRenderingForSide(side, params) {
|
|
|
7326
7427
|
brain: verticalVirtualBrain,
|
|
7327
7428
|
renderRow: renderRowPinned
|
|
7328
7429
|
}) : null;
|
|
7329
|
-
const pinnedScrollbarPlaceholder = pinnedList && hasHorizontalScrollbar && !hasOverflow ? /* @__PURE__ */
|
|
7430
|
+
const pinnedScrollbarPlaceholder = pinnedList && hasHorizontalScrollbar && !hasOverflow ? /* @__PURE__ */ React31.createElement(HorizontalScrollbarPlaceholder, {
|
|
7330
7431
|
style: side === "end" ? {
|
|
7331
7432
|
width: columnsWidth,
|
|
7332
7433
|
right: hasVerticalScrollbar ? getScrollbarWidth() : 0
|
|
@@ -7368,13 +7469,13 @@ function usePinnedStartRendering(params) {
|
|
|
7368
7469
|
}
|
|
7369
7470
|
|
|
7370
7471
|
// src/components/InfiniteTable/hooks/useYourBrain.ts
|
|
7371
|
-
var
|
|
7472
|
+
var import_react40 = __toModule(require("react"));
|
|
7372
7473
|
|
|
7373
7474
|
// src/components/InfiniteTable/hooks/useColumnSizeFn.ts
|
|
7374
|
-
var
|
|
7475
|
+
var import_react39 = __toModule(require("react"));
|
|
7375
7476
|
var debug5 = dbg("useColumnSizeFn");
|
|
7376
7477
|
function useColumnSizeFn(computedUnpinnedColumns) {
|
|
7377
|
-
const columnSize = (0,
|
|
7478
|
+
const columnSize = (0, import_react39.useCallback)((index) => {
|
|
7378
7479
|
const column = computedUnpinnedColumns[index];
|
|
7379
7480
|
if (!column) {
|
|
7380
7481
|
debug5("cannot find column at index", index, computedUnpinnedColumns);
|
|
@@ -7404,13 +7505,13 @@ function useYourBrain(param) {
|
|
|
7404
7505
|
globalThis.verticalVirtualBrain = verticalVirtualBrain;
|
|
7405
7506
|
globalThis.horizontalVirtualBrain = horizontalVirtualBrain;
|
|
7406
7507
|
}
|
|
7407
|
-
(0,
|
|
7508
|
+
(0, import_react40.useEffect)(() => {
|
|
7408
7509
|
verticalVirtualBrain.setAvailableSize({
|
|
7409
7510
|
height: bodySize.height,
|
|
7410
7511
|
width: 0
|
|
7411
7512
|
});
|
|
7412
7513
|
}, [bodySize, verticalVirtualBrain]);
|
|
7413
|
-
(0,
|
|
7514
|
+
(0, import_react40.useEffect)(() => {
|
|
7414
7515
|
horizontalVirtualBrain.setAvailableSize({
|
|
7415
7516
|
height: 0,
|
|
7416
7517
|
width: Math.max(bodySize.width - computedPinnedStartWidth - computedPinnedEndWidth, 0)
|
|
@@ -7451,7 +7552,7 @@ function useListRendering(param) {
|
|
|
7451
7552
|
horizontalVirtualBrain
|
|
7452
7553
|
} = componentState;
|
|
7453
7554
|
const prevDataSourceTimestamp = usePrevious(dataSourceState.updatedAt);
|
|
7454
|
-
const repaintIdRef = (0,
|
|
7555
|
+
const repaintIdRef = (0, import_react41.useRef)(0);
|
|
7455
7556
|
if (prevDataSourceTimestamp !== dataSourceState.updatedAt || !shallowEqualObjects(prevComputed, computed)) {
|
|
7456
7557
|
repaintIdRef.current++;
|
|
7457
7558
|
}
|
|
@@ -7470,11 +7571,11 @@ function useListRendering(param) {
|
|
|
7470
7571
|
const hasHorizontalScrollbar = computedUnpinnedColumnsWidth > bodySize.width - computedPinnedStartColumnsWidth - computedPinnedEndColumnsWidth;
|
|
7471
7572
|
const reservedContentHeight = verticalVirtualBrain.getTotalSize() + (hasHorizontalScrollbar ? getScrollbarWidth() : 0);
|
|
7472
7573
|
const hasVerticalScrollbar = bodySize.height > 0 && bodySize.height < reservedContentHeight;
|
|
7473
|
-
const scrollbars = (0,
|
|
7574
|
+
const scrollbars = (0, import_react41.useMemo)(() => ({
|
|
7474
7575
|
vertical: hasVerticalScrollbar,
|
|
7475
7576
|
horizontal: hasHorizontalScrollbar
|
|
7476
7577
|
}), [hasVerticalScrollbar, hasHorizontalScrollbar]);
|
|
7477
|
-
(0,
|
|
7578
|
+
(0, import_react41.useEffect)(() => {
|
|
7478
7579
|
if (!bodySize.height) {
|
|
7479
7580
|
return;
|
|
7480
7581
|
}
|
|
@@ -7530,7 +7631,7 @@ function useListRendering(param) {
|
|
|
7530
7631
|
computedUnpinnedColumns
|
|
7531
7632
|
});
|
|
7532
7633
|
const [, rerender] = useRerender();
|
|
7533
|
-
(0,
|
|
7634
|
+
(0, import_react41.useEffect)(() => {
|
|
7534
7635
|
rerender();
|
|
7535
7636
|
}, [dataSourceState]);
|
|
7536
7637
|
const { pinnedStartList, pinnedStartScrollbarPlaceholder } = usePinnedStartRendering(pinnedRenderingParams);
|
|
@@ -7553,8 +7654,8 @@ function useListRendering(param) {
|
|
|
7553
7654
|
}
|
|
7554
7655
|
|
|
7555
7656
|
// src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
|
|
7556
|
-
var
|
|
7557
|
-
var
|
|
7657
|
+
var React32 = __toModule(require("react"));
|
|
7658
|
+
var import_react42 = __toModule(require("react"));
|
|
7558
7659
|
|
|
7559
7660
|
// src/components/utils/decamelize.ts
|
|
7560
7661
|
function decamelize(str, options) {
|
|
@@ -7589,10 +7690,10 @@ var enforceStyle = (node, style) => {
|
|
|
7589
7690
|
node.style.setProperty(decamelize(propertyName), propertyValue, "important");
|
|
7590
7691
|
}
|
|
7591
7692
|
};
|
|
7592
|
-
var InfiniteTableLicenseFooter =
|
|
7693
|
+
var InfiniteTableLicenseFooter = React32.forwardRef(function InfiniteTableLicenseFooter2(props, ref) {
|
|
7593
7694
|
const { rootClassName: rootClassName12 } = useInternalProps();
|
|
7594
|
-
const domRef =
|
|
7595
|
-
const domCallback =
|
|
7695
|
+
const domRef = React32.useRef(null);
|
|
7696
|
+
const domCallback = React32.useCallback((node) => {
|
|
7596
7697
|
domRef.current = node;
|
|
7597
7698
|
if (!ref) {
|
|
7598
7699
|
return;
|
|
@@ -7603,7 +7704,7 @@ var InfiniteTableLicenseFooter = React31.forwardRef(function InfiniteTableLicens
|
|
|
7603
7704
|
ref.current = node;
|
|
7604
7705
|
}
|
|
7605
7706
|
}, []);
|
|
7606
|
-
(0,
|
|
7707
|
+
(0, import_react42.useEffect)(() => {
|
|
7607
7708
|
const forceStyle = () => {
|
|
7608
7709
|
requestAnimationFrame(() => {
|
|
7609
7710
|
var _a;
|
|
@@ -7617,12 +7718,12 @@ var InfiniteTableLicenseFooter = React31.forwardRef(function InfiniteTableLicens
|
|
|
7617
7718
|
clearInterval(intervalId);
|
|
7618
7719
|
};
|
|
7619
7720
|
}, []);
|
|
7620
|
-
return /* @__PURE__ */
|
|
7721
|
+
return /* @__PURE__ */ React32.createElement("div", __spreadProps(__spreadValues({
|
|
7621
7722
|
ref: domCallback
|
|
7622
7723
|
}, props), {
|
|
7623
7724
|
className: join(`${rootClassName12}-Footer`, FooterCls, props.className),
|
|
7624
7725
|
style: defaultStyle2
|
|
7625
|
-
}), "Powered by", " ", /* @__PURE__ */
|
|
7726
|
+
}), "Powered by", " ", /* @__PURE__ */ React32.createElement("a", {
|
|
7626
7727
|
href: "https://infinite-table.com",
|
|
7627
7728
|
rel: "noopener noreferrer",
|
|
7628
7729
|
role: "link",
|
|
@@ -7631,7 +7732,7 @@ var InfiniteTableLicenseFooter = React31.forwardRef(function InfiniteTableLicens
|
|
|
7631
7732
|
});
|
|
7632
7733
|
|
|
7633
7734
|
// src/components/InfiniteTable/hooks/useLicense/useLicense.ts
|
|
7634
|
-
var
|
|
7735
|
+
var import_react43 = __toModule(require("react"));
|
|
7635
7736
|
|
|
7636
7737
|
// src/components/InfiniteTable/hooks/useLicense/crc32.ts
|
|
7637
7738
|
var DEFAULT_ReversedPolynomial = 3988292384;
|
|
@@ -7789,10 +7890,10 @@ var isInsideSandbox = () => {
|
|
|
7789
7890
|
};
|
|
7790
7891
|
var isInsidePlayground = isInsideSandbox() || isInsideSandpack();
|
|
7791
7892
|
var useLicense = (licenseKey = "") => {
|
|
7792
|
-
const valid = (0,
|
|
7893
|
+
const valid = (0, import_react43.useMemo)(() => {
|
|
7793
7894
|
let valid2 = isValidLicense(licenseKey, {
|
|
7794
7895
|
publishedAt: 1624970570587,
|
|
7795
|
-
version: "0.2.
|
|
7896
|
+
version: "0.2.16"
|
|
7796
7897
|
});
|
|
7797
7898
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
7798
7899
|
return true;
|
|
@@ -7803,8 +7904,8 @@ var useLicense = (licenseKey = "") => {
|
|
|
7803
7904
|
};
|
|
7804
7905
|
|
|
7805
7906
|
// src/components/CSSVariableWatch.tsx
|
|
7806
|
-
var
|
|
7807
|
-
var
|
|
7907
|
+
var React33 = __toModule(require("react"));
|
|
7908
|
+
var import_react44 = __toModule(require("react"));
|
|
7808
7909
|
var error = err("CSSVariableWatch");
|
|
7809
7910
|
var debug6 = dbg("CSSVariableWatch");
|
|
7810
7911
|
var WRAPPER_STYLE = {
|
|
@@ -7817,15 +7918,15 @@ var WRAPPER_STYLE = {
|
|
|
7817
7918
|
overflow: "hidden"
|
|
7818
7919
|
};
|
|
7819
7920
|
var useCSSVariableWatch = (params) => {
|
|
7820
|
-
const lastValueRef = (0,
|
|
7821
|
-
const onResize =
|
|
7921
|
+
const lastValueRef = (0, import_react44.useRef)(0);
|
|
7922
|
+
const onResize = React33.useCallback(({ height }) => {
|
|
7822
7923
|
if (height && height !== lastValueRef.current) {
|
|
7823
7924
|
lastValueRef.current = height;
|
|
7824
7925
|
params.onChange(height);
|
|
7825
7926
|
}
|
|
7826
7927
|
}, [params.onChange]);
|
|
7827
7928
|
useResizeObserver(params.ref, onResize, { earlyAttach: true });
|
|
7828
|
-
|
|
7929
|
+
React33.useLayoutEffect(() => {
|
|
7829
7930
|
const value = params.ref.current.getBoundingClientRect().height;
|
|
7830
7931
|
if (value) {
|
|
7831
7932
|
lastValueRef.current = value;
|
|
@@ -7837,15 +7938,15 @@ var useCSSVariableWatch = (params) => {
|
|
|
7837
7938
|
}, []);
|
|
7838
7939
|
};
|
|
7839
7940
|
var CSSVariableWatch = (props) => {
|
|
7840
|
-
const domRef = (0,
|
|
7941
|
+
const domRef = (0, import_react44.useRef)(null);
|
|
7841
7942
|
useCSSVariableWatch(__spreadProps(__spreadValues({}, props), {
|
|
7842
7943
|
ref: domRef
|
|
7843
7944
|
}));
|
|
7844
|
-
return /* @__PURE__ */
|
|
7945
|
+
return /* @__PURE__ */ React33.createElement("div", {
|
|
7845
7946
|
"data-name": "css-variable-watcher",
|
|
7846
7947
|
"data-var": props.varName,
|
|
7847
7948
|
style: WRAPPER_STYLE
|
|
7848
|
-
}, /* @__PURE__ */
|
|
7949
|
+
}, /* @__PURE__ */ React33.createElement("div", {
|
|
7849
7950
|
ref: domRef,
|
|
7850
7951
|
style: {
|
|
7851
7952
|
height: props.varName.startsWith("var(") ? props.varName : `var(${props.varName})`
|
|
@@ -7938,7 +8039,7 @@ function useDOMProps(initialDOMProps) {
|
|
|
7938
8039
|
}
|
|
7939
8040
|
|
|
7940
8041
|
// src/components/InfiniteTable/components/LoadMask.tsx
|
|
7941
|
-
var
|
|
8042
|
+
var React34 = __toModule(require("react"));
|
|
7942
8043
|
|
|
7943
8044
|
// src/components/InfiniteTable/components/LoadMask.css.ts
|
|
7944
8045
|
var LoadMaskCls = { visible: "qy58ya1 qy58ya0 _16lm1iw2 _16lm1iwr _16lm1iwt _16lm1iwx _16lm1iwv", hidden: "qy58ya2 qy58ya0 _16lm1iw2 _16lm1iwr _16lm1iwt _16lm1iwx _16lm1iwv" };
|
|
@@ -7950,18 +8051,18 @@ var { rootClassName: rootClassName11 } = internalProps;
|
|
|
7950
8051
|
var baseCls = `${rootClassName11}-LoadMask`;
|
|
7951
8052
|
function LoadMaskFn(props) {
|
|
7952
8053
|
const { visible, children = "Loading" } = props;
|
|
7953
|
-
return /* @__PURE__ */
|
|
8054
|
+
return /* @__PURE__ */ React34.createElement("div", {
|
|
7954
8055
|
className: `${LoadMaskCls[visible ? "visible" : "hidden"]} ${baseCls}`
|
|
7955
|
-
}, /* @__PURE__ */
|
|
8056
|
+
}, /* @__PURE__ */ React34.createElement("div", {
|
|
7956
8057
|
className: `${LoadMaskOverlayCls} ${baseCls}-Overlay`
|
|
7957
|
-
}), /* @__PURE__ */
|
|
8058
|
+
}), /* @__PURE__ */ React34.createElement("div", {
|
|
7958
8059
|
className: `${LoadMaskTextCls} ${baseCls}-Text`
|
|
7959
8060
|
}, children));
|
|
7960
8061
|
}
|
|
7961
|
-
var LoadMask =
|
|
8062
|
+
var LoadMask = React34.memo(LoadMaskFn);
|
|
7962
8063
|
|
|
7963
8064
|
// src/components/InfiniteTable/hooks/useAutoSizeColumns.ts
|
|
7964
|
-
var
|
|
8065
|
+
var import_react45 = __toModule(require("react"));
|
|
7965
8066
|
var OFFSET = 10;
|
|
7966
8067
|
function getColumnContentMaxWidths(domRef, options) {
|
|
7967
8068
|
var _a;
|
|
@@ -8026,11 +8127,11 @@ function useAutoSizeColumns() {
|
|
|
8026
8127
|
horizontalVirtualBrain
|
|
8027
8128
|
}
|
|
8028
8129
|
} = useComponentState();
|
|
8029
|
-
const [refreshId, setRefreshId] = (0,
|
|
8130
|
+
const [refreshId, setRefreshId] = (0, import_react45.useState)(0);
|
|
8030
8131
|
const theKey = typeof autoSizeColumnsKey === "object" ? autoSizeColumnsKey.key : autoSizeColumnsKey;
|
|
8031
8132
|
const getTheKey = useLatest(theKey);
|
|
8032
|
-
const lastExecutedIdentifierRef = (0,
|
|
8033
|
-
(0,
|
|
8133
|
+
const lastExecutedIdentifierRef = (0, import_react45.useRef)(null);
|
|
8134
|
+
(0, import_react45.useEffect)(() => {
|
|
8034
8135
|
const key = getTheKey();
|
|
8035
8136
|
if (key == null) {
|
|
8036
8137
|
return;
|
|
@@ -8048,7 +8149,7 @@ function useAutoSizeColumns() {
|
|
|
8048
8149
|
removeHorizontal();
|
|
8049
8150
|
};
|
|
8050
8151
|
}, [verticalVirtualBrain, horizontalVirtualBrain]);
|
|
8051
|
-
(0,
|
|
8152
|
+
(0, import_react45.useEffect)(() => {
|
|
8052
8153
|
var _a;
|
|
8053
8154
|
if (theKey == null) {
|
|
8054
8155
|
return;
|
|
@@ -8109,7 +8210,7 @@ var InfiniteTableRoot = getComponentStateRoot({
|
|
|
8109
8210
|
getParentState: () => useDataSource(),
|
|
8110
8211
|
debugName: "InfiniteTable"
|
|
8111
8212
|
});
|
|
8112
|
-
var InfiniteTableComponent =
|
|
8213
|
+
var InfiniteTableComponent = React35.memo(function InfiniteTableComponent2() {
|
|
8113
8214
|
var _a;
|
|
8114
8215
|
const {
|
|
8115
8216
|
componentState,
|
|
@@ -8156,7 +8257,7 @@ var InfiniteTableComponent = React34.memo(function InfiniteTableComponent2() {
|
|
|
8156
8257
|
bodySize,
|
|
8157
8258
|
computed
|
|
8158
8259
|
});
|
|
8159
|
-
|
|
8260
|
+
React35.useEffect(() => {
|
|
8160
8261
|
const dataSourceState = getDataSourceState();
|
|
8161
8262
|
const onChange = debounce((renderRange) => {
|
|
8162
8263
|
dataSourceState.notifyRenderRangeChange(renderRange);
|
|
@@ -8166,7 +8267,7 @@ var InfiniteTableComponent = React34.memo(function InfiniteTableComponent2() {
|
|
|
8166
8267
|
const licenseValid = useLicense(licenseKey);
|
|
8167
8268
|
const domProps = useDOMProps(componentState.domProps);
|
|
8168
8269
|
const LoadMaskCmp = (_a = components == null ? void 0 : components.LoadMask) != null ? _a : LoadMask;
|
|
8169
|
-
|
|
8270
|
+
React35.useLayoutEffect(() => {
|
|
8170
8271
|
const dataSourceState = getDataSourceState();
|
|
8171
8272
|
const { onScrollbarsChange } = getInfiniteTableState();
|
|
8172
8273
|
const { notifyScrollbarsChange } = dataSourceState;
|
|
@@ -8175,35 +8276,35 @@ var InfiniteTableComponent = React34.memo(function InfiniteTableComponent2() {
|
|
|
8175
8276
|
}
|
|
8176
8277
|
notifyScrollbarsChange(scrollbars);
|
|
8177
8278
|
}, [scrollbars]);
|
|
8178
|
-
|
|
8279
|
+
React35.useEffect(() => {
|
|
8179
8280
|
dataSourceActions.scrollStopDelayUpdatedByTable = scrollStopDelay;
|
|
8180
8281
|
}, [scrollStopDelay]);
|
|
8181
8282
|
useAutoSizeColumns();
|
|
8182
|
-
return /* @__PURE__ */
|
|
8283
|
+
return /* @__PURE__ */ React35.createElement("div", __spreadValues({
|
|
8183
8284
|
ref: domRef
|
|
8184
|
-
}, domProps), header ? /* @__PURE__ */
|
|
8285
|
+
}, domProps), header ? /* @__PURE__ */ React35.createElement(TableHeaderWrapper, {
|
|
8185
8286
|
brain: horizontalVirtualBrain,
|
|
8186
8287
|
repaintId,
|
|
8187
8288
|
scrollbars
|
|
8188
|
-
}) : null, /* @__PURE__ */
|
|
8289
|
+
}) : null, /* @__PURE__ */ React35.createElement(InfiniteTableBody, null, /* @__PURE__ */ React35.createElement(VirtualScrollContainer, {
|
|
8189
8290
|
ref: scrollerDOMRef,
|
|
8190
8291
|
onContainerScroll: applyScrollVertical,
|
|
8191
8292
|
scrollable: ONLY_VERTICAL_SCROLLBAR
|
|
8192
|
-
}, /* @__PURE__ */
|
|
8293
|
+
}, /* @__PURE__ */ React35.createElement("div", {
|
|
8193
8294
|
className: display.flex
|
|
8194
|
-
}, pinnedStartList, centerList, pinnedEndList), /* @__PURE__ */
|
|
8295
|
+
}, pinnedStartList, centerList, pinnedEndList), /* @__PURE__ */ React35.createElement(SpacePlaceholder, {
|
|
8195
8296
|
count: dataArray.length,
|
|
8196
8297
|
width: 0,
|
|
8197
8298
|
height: reservedContentHeight
|
|
8198
|
-
})), pinnedStartScrollbarPlaceholder, pinnedEndScrollbarPlaceholder, /* @__PURE__ */
|
|
8299
|
+
})), pinnedStartScrollbarPlaceholder, pinnedEndScrollbarPlaceholder, /* @__PURE__ */ React35.createElement(LoadMaskCmp, {
|
|
8199
8300
|
visible: loading
|
|
8200
|
-
}, loadingText)), licenseValid ? null : /* @__PURE__ */
|
|
8301
|
+
}, loadingText)), licenseValid ? null : /* @__PURE__ */ React35.createElement(InfiniteTableLicenseFooter, null), /* @__PURE__ */ React35.createElement("div", {
|
|
8201
8302
|
ref: portalDOMRef,
|
|
8202
8303
|
className: join(`${rootClassName}Portal`, zIndex[1e3], position.absolute, top[0], left[0])
|
|
8203
|
-
}), rowHeightCSSVar ? /* @__PURE__ */
|
|
8304
|
+
}), rowHeightCSSVar ? /* @__PURE__ */ React35.createElement(CSSVariableWatch, {
|
|
8204
8305
|
varName: rowHeightCSSVar,
|
|
8205
8306
|
onChange: onRowHeightCSSVarChange
|
|
8206
|
-
}) : null, headerHeightCSSVar ? /* @__PURE__ */
|
|
8307
|
+
}) : null, headerHeightCSSVar ? /* @__PURE__ */ React35.createElement(CSSVariableWatch, {
|
|
8207
8308
|
varName: headerHeightCSSVar,
|
|
8208
8309
|
onChange: onHeaderHeightCSSVarChange
|
|
8209
8310
|
}) : null);
|
|
@@ -8239,25 +8340,25 @@ function InfiniteTableContextProvider() {
|
|
|
8239
8340
|
}
|
|
8240
8341
|
componentActions.bodySize = bodySize;
|
|
8241
8342
|
}, { earlyAttach: true });
|
|
8242
|
-
|
|
8343
|
+
React35.useEffect(() => {
|
|
8243
8344
|
return () => {
|
|
8244
8345
|
componentState.onRowHeightCSSVarChange.destroy();
|
|
8245
8346
|
componentState.onHeaderHeightCSSVarChange.destroy();
|
|
8246
8347
|
};
|
|
8247
8348
|
}, []);
|
|
8248
|
-
|
|
8349
|
+
React35.useEffect(() => {
|
|
8249
8350
|
if (scrollerDOMRef.current) {
|
|
8250
8351
|
scrollerDOMRef.current.scrollTop = 0;
|
|
8251
8352
|
}
|
|
8252
8353
|
}, [scrollTopKey, scrollerDOMRef]);
|
|
8253
8354
|
const TableContext2 = getInfiniteTableContext();
|
|
8254
|
-
return /* @__PURE__ */
|
|
8355
|
+
return /* @__PURE__ */ React35.createElement(TableContext2.Provider, {
|
|
8255
8356
|
value: contextValue
|
|
8256
|
-
}, /* @__PURE__ */
|
|
8357
|
+
}, /* @__PURE__ */ React35.createElement(InfiniteTableComponent, null));
|
|
8257
8358
|
}
|
|
8258
8359
|
function InfiniteTable(props) {
|
|
8259
|
-
const table = /* @__PURE__ */
|
|
8260
|
-
return /* @__PURE__ */
|
|
8360
|
+
const table = /* @__PURE__ */ React35.createElement(InfiniteTableRoot, __spreadValues({}, props), /* @__PURE__ */ React35.createElement(InfiniteTableContextProvider, null));
|
|
8361
|
+
return /* @__PURE__ */ React35.createElement(React35.StrictMode, null, table);
|
|
8261
8362
|
}
|
|
8262
8363
|
InfiniteTable.defaultProps = {
|
|
8263
8364
|
rowHeight: 40,
|