@infinite-table/infinite-react 0.1.4 → 0.2.3
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 +142 -130
- package/index.esm.js +471 -349
- package/index.js +476 -352
- package/package.json +2 -2
package/index.esm.js
CHANGED
|
@@ -619,7 +619,7 @@ var require_binary_search = __commonJS({
|
|
|
619
619
|
// src/components/InfiniteTable/index.tsx
|
|
620
620
|
import {
|
|
621
621
|
StrictMode,
|
|
622
|
-
createElement as
|
|
622
|
+
createElement as createElement32,
|
|
623
623
|
memo as memo13,
|
|
624
624
|
useEffect as useEffect24,
|
|
625
625
|
useLayoutEffect as useLayoutEffect5
|
|
@@ -768,7 +768,6 @@ function initSetupState() {
|
|
|
768
768
|
draggingColumnId: null,
|
|
769
769
|
pinnedStartScrollListener: new ScrollListener(),
|
|
770
770
|
pinnedEndScrollListener: new ScrollListener(),
|
|
771
|
-
computedPivotColumns: void 0,
|
|
772
771
|
columnsWhenInlineGroupRenderStrategy: void 0
|
|
773
772
|
};
|
|
774
773
|
}
|
|
@@ -799,7 +798,6 @@ var forwardProps = (setupState) => {
|
|
|
799
798
|
pinnedStartMaxWidth: 1,
|
|
800
799
|
pinnedEndMaxWidth: 1,
|
|
801
800
|
pivotColumn: 1,
|
|
802
|
-
pivotRowLabelsColumn: 1,
|
|
803
801
|
pivotColumnGroups: 1,
|
|
804
802
|
onScrollbarsChange: 1,
|
|
805
803
|
scrollStopDelay: (scrollStopDelay) => scrollStopDelay != null ? scrollStopDelay : 100,
|
|
@@ -856,7 +854,7 @@ var mapPropsToState = (params) => {
|
|
|
856
854
|
groupBy,
|
|
857
855
|
groupColumn: props.groupColumn
|
|
858
856
|
});
|
|
859
|
-
const computedColumns = state.
|
|
857
|
+
const computedColumns = state.columnsWhenGrouping || state.columnsWhenInlineGroupRenderStrategy || state.columns;
|
|
860
858
|
return {
|
|
861
859
|
groupRenderStrategy,
|
|
862
860
|
groupBy,
|
|
@@ -2048,9 +2046,9 @@ function useColumnGroups() {
|
|
|
2048
2046
|
}
|
|
2049
2047
|
|
|
2050
2048
|
// src/components/InfiniteTable/hooks/useColumnsWhen.ts
|
|
2051
|
-
import { useEffect as useEffect9, useMemo as
|
|
2049
|
+
import { useEffect as useEffect9, useMemo as useMemo5 } from "react";
|
|
2052
2050
|
|
|
2053
|
-
// src/components/InfiniteTable/
|
|
2051
|
+
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
2054
2052
|
import {
|
|
2055
2053
|
createElement as createElement4
|
|
2056
2054
|
} from "react";
|
|
@@ -2126,93 +2124,15 @@ var userSelect = { none: "_16lm1iwm" };
|
|
|
2126
2124
|
var willChange = { transform: "_16lm1iw19" };
|
|
2127
2125
|
var zIndex = { "1": "_16lm1iwe", "10": "_16lm1iwf", "1000": "_16lm1iwg", "10000": "_16lm1iwh", "100000": "_16lm1iwi" };
|
|
2128
2126
|
|
|
2129
|
-
// src/components/InfiniteTable/state/getComputedPivotColumnsFromDataSourcePivotColumns.tsx
|
|
2130
|
-
function getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, params) {
|
|
2131
|
-
if (!pivotColumns) {
|
|
2132
|
-
return void 0;
|
|
2133
|
-
}
|
|
2134
|
-
const {
|
|
2135
|
-
pivotColumn,
|
|
2136
|
-
pivotRowLabelsColumn,
|
|
2137
|
-
pivotBy,
|
|
2138
|
-
groupBy,
|
|
2139
|
-
pivotTotalColumnPosition,
|
|
2140
|
-
toggleGroupRow
|
|
2141
|
-
} = params;
|
|
2142
|
-
const computedPivotColumns = new Map();
|
|
2143
|
-
pivotColumns.forEach((col, key) => {
|
|
2144
|
-
if (col.pivotTotalColumn && pivotTotalColumnPosition === false) {
|
|
2145
|
-
return;
|
|
2146
|
-
}
|
|
2147
|
-
let column = __spreadValues({}, col);
|
|
2148
|
-
const isPivotRowLabelsColumn = !column.pivotColumn && !column.pivotTotalColumn;
|
|
2149
|
-
if (!isPivotRowLabelsColumn) {
|
|
2150
|
-
if (pivotColumn) {
|
|
2151
|
-
if (typeof pivotColumn === "function") {
|
|
2152
|
-
column = __spreadValues(__spreadValues({}, column), pivotColumn({
|
|
2153
|
-
column,
|
|
2154
|
-
pivotBy,
|
|
2155
|
-
groupBy
|
|
2156
|
-
}));
|
|
2157
|
-
} else {
|
|
2158
|
-
column = __spreadValues(__spreadValues({}, column), pivotColumn);
|
|
2159
|
-
}
|
|
2160
|
-
}
|
|
2161
|
-
} else {
|
|
2162
|
-
if (pivotRowLabelsColumn) {
|
|
2163
|
-
if (typeof pivotRowLabelsColumn === "function") {
|
|
2164
|
-
column = __spreadValues(__spreadValues({}, column), pivotRowLabelsColumn({
|
|
2165
|
-
column,
|
|
2166
|
-
pivotBy,
|
|
2167
|
-
groupBy
|
|
2168
|
-
}));
|
|
2169
|
-
} else {
|
|
2170
|
-
column = __spreadValues(__spreadValues({}, column), pivotRowLabelsColumn);
|
|
2171
|
-
}
|
|
2172
|
-
}
|
|
2173
|
-
if (!column.render) {
|
|
2174
|
-
column.render = (renderOptions) => {
|
|
2175
|
-
var _a;
|
|
2176
|
-
let { value, rowInfo, column: column2, groupBy: groupBy2 } = renderOptions;
|
|
2177
|
-
if (column2.renderValue) {
|
|
2178
|
-
value = column2.renderValue(renderOptions);
|
|
2179
|
-
}
|
|
2180
|
-
const showExpanderIcon = (((_a = rowInfo.groupKeys) == null ? void 0 : _a.length) || 0) < groupBy2.length;
|
|
2181
|
-
return /* @__PURE__ */ createElement4("div", {
|
|
2182
|
-
className: join(display.flex, alignItems.center, GroupRowExpanderCls)
|
|
2183
|
-
}, showExpanderIcon ? /* @__PURE__ */ createElement4(ExpanderIcon, {
|
|
2184
|
-
expanded: !rowInfo.collapsed,
|
|
2185
|
-
onChange: () => {
|
|
2186
|
-
toggleGroupRow(rowInfo.groupKeys);
|
|
2187
|
-
}
|
|
2188
|
-
}) : null, /* @__PURE__ */ createElement4("div", {
|
|
2189
|
-
className: cssEllipsisClassName
|
|
2190
|
-
}, value != null ? value : null));
|
|
2191
|
-
};
|
|
2192
|
-
}
|
|
2193
|
-
}
|
|
2194
|
-
if (!column.render && column.renderValue) {
|
|
2195
|
-
column.render = (renderOptions) => {
|
|
2196
|
-
return column.renderValue(renderOptions);
|
|
2197
|
-
};
|
|
2198
|
-
}
|
|
2199
|
-
computedPivotColumns.set(key, column);
|
|
2200
|
-
});
|
|
2201
|
-
return computedPivotColumns;
|
|
2202
|
-
}
|
|
2203
|
-
|
|
2204
2127
|
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
2205
|
-
import {
|
|
2206
|
-
createElement as createElement5
|
|
2207
|
-
} from "react";
|
|
2208
2128
|
function getGroupColumnRender({
|
|
2209
2129
|
groupIndexForColumn,
|
|
2210
2130
|
groupRenderStrategy,
|
|
2211
2131
|
toggleGroupRow
|
|
2212
2132
|
}) {
|
|
2213
2133
|
return (renderOptions) => {
|
|
2214
|
-
var _a;
|
|
2215
|
-
let { value, rowInfo, column } = renderOptions;
|
|
2134
|
+
var _a, _b, _c;
|
|
2135
|
+
let { value, rowInfo, column, groupBy, pivotBy } = renderOptions;
|
|
2216
2136
|
if (column.renderValue) {
|
|
2217
2137
|
value = column.renderValue(renderOptions);
|
|
2218
2138
|
}
|
|
@@ -2237,14 +2157,20 @@ function getGroupColumnRender({
|
|
|
2237
2157
|
return null;
|
|
2238
2158
|
}
|
|
2239
2159
|
}
|
|
2240
|
-
|
|
2160
|
+
let icon = null;
|
|
2161
|
+
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);
|
|
2162
|
+
if (showExpanderIcon) {
|
|
2163
|
+
const defaultIcon = /* @__PURE__ */ createElement4(ExpanderIcon, {
|
|
2164
|
+
expanded: !collapsed,
|
|
2165
|
+
onChange: () => {
|
|
2166
|
+
toggleGroupRow(groupKeys);
|
|
2167
|
+
}
|
|
2168
|
+
});
|
|
2169
|
+
icon = column.renderGroupIcon ? column.renderGroupIcon(Object.assign({ collapsed, groupIcon: defaultIcon }, renderOptions)) : defaultIcon;
|
|
2170
|
+
}
|
|
2171
|
+
return /* @__PURE__ */ createElement4("div", {
|
|
2241
2172
|
className: join(display.flex, alignItems.center)
|
|
2242
|
-
}, /* @__PURE__ */
|
|
2243
|
-
expanded: !collapsed,
|
|
2244
|
-
onChange: () => {
|
|
2245
|
-
toggleGroupRow(groupKeys);
|
|
2246
|
-
}
|
|
2247
|
-
}), /* @__PURE__ */ createElement5("div", {
|
|
2173
|
+
}, icon, /* @__PURE__ */ createElement4("div", {
|
|
2248
2174
|
className: cssEllipsisClassName
|
|
2249
2175
|
}, value != null ? value : null));
|
|
2250
2176
|
};
|
|
@@ -2280,21 +2206,29 @@ function getSingleGroupColumn(options, toggleGroupRow, groupColumnFromProps) {
|
|
|
2280
2206
|
groupByField: options.groupBy.map((g) => g.field),
|
|
2281
2207
|
sortable: false,
|
|
2282
2208
|
render: (renderOptions) => {
|
|
2283
|
-
|
|
2209
|
+
var _a, _b;
|
|
2210
|
+
let { value, rowInfo, column, groupBy, pivotBy } = renderOptions;
|
|
2284
2211
|
if (!rowInfo.isGroupRow) {
|
|
2285
2212
|
return null;
|
|
2286
2213
|
}
|
|
2287
2214
|
if (column.renderValue) {
|
|
2288
2215
|
value = column.renderValue(renderOptions);
|
|
2289
2216
|
}
|
|
2290
|
-
|
|
2217
|
+
const collapsed = rowInfo.collapsed;
|
|
2218
|
+
let icon = null;
|
|
2219
|
+
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);
|
|
2220
|
+
if (showExpanderIcon) {
|
|
2221
|
+
const defaultIcon = /* @__PURE__ */ createElement4(ExpanderIcon, {
|
|
2222
|
+
expanded: !collapsed,
|
|
2223
|
+
onChange: () => {
|
|
2224
|
+
toggleGroupRow(rowInfo.groupKeys);
|
|
2225
|
+
}
|
|
2226
|
+
});
|
|
2227
|
+
icon = column.renderGroupIcon ? column.renderGroupIcon(Object.assign({ collapsed, groupIcon: defaultIcon }, renderOptions)) : defaultIcon;
|
|
2228
|
+
}
|
|
2229
|
+
return /* @__PURE__ */ createElement4("div", {
|
|
2291
2230
|
className: join(display.flex, alignItems.center, GroupRowExpanderCls)
|
|
2292
|
-
}, /* @__PURE__ */
|
|
2293
|
-
expanded: !rowInfo.collapsed,
|
|
2294
|
-
onChange: () => {
|
|
2295
|
-
toggleGroupRow(rowInfo.groupKeys);
|
|
2296
|
-
}
|
|
2297
|
-
}), /* @__PURE__ */ createElement5("div", {
|
|
2231
|
+
}, icon, /* @__PURE__ */ createElement4("div", {
|
|
2298
2232
|
className: cssEllipsisClassName
|
|
2299
2233
|
}, value != null ? value : null));
|
|
2300
2234
|
}
|
|
@@ -2315,7 +2249,7 @@ import { useCallback as useCallback4 } from "react";
|
|
|
2315
2249
|
// src/components/DataSource/index.tsx
|
|
2316
2250
|
import {
|
|
2317
2251
|
Fragment,
|
|
2318
|
-
createElement as
|
|
2252
|
+
createElement as createElement5
|
|
2319
2253
|
} from "react";
|
|
2320
2254
|
|
|
2321
2255
|
// src/utils/multisort/sortTypes.ts
|
|
@@ -2393,7 +2327,7 @@ var getMultisortFunction = (sortInfo, get) => {
|
|
|
2393
2327
|
};
|
|
2394
2328
|
|
|
2395
2329
|
// src/components/DataSource/privateHooks/useLoadData.ts
|
|
2396
|
-
import { useEffect as useEffect8, useRef as useRef6, useState as useState4 } from "react";
|
|
2330
|
+
import { useEffect as useEffect8, useMemo as useMemo4, useRef as useRef6, useState as useState4 } from "react";
|
|
2397
2331
|
|
|
2398
2332
|
// src/utils/DeepMap/once.ts
|
|
2399
2333
|
function once(fn) {
|
|
@@ -2664,6 +2598,7 @@ var DeepMap = class {
|
|
|
2664
2598
|
|
|
2665
2599
|
// src/utils/groupAndPivot/index.ts
|
|
2666
2600
|
var LAZY_ROOT_KEY_FOR_GROUPS = "____root____";
|
|
2601
|
+
var NOT_LOADED_YET_KEY_PREFIX = "____not_loaded_yet____";
|
|
2667
2602
|
function DEFAULT_TO_KEY(value) {
|
|
2668
2603
|
return value;
|
|
2669
2604
|
}
|
|
@@ -2727,13 +2662,23 @@ function lazyGroup(groupParams, rootData) {
|
|
|
2727
2662
|
rootData.visitDepthFirst((lazyGroupRowInfo, keys, _index, next) => {
|
|
2728
2663
|
const [_rootKey, ...currentGroupKeys] = keys;
|
|
2729
2664
|
const dataArray = lazyGroupRowInfo.items;
|
|
2665
|
+
if (currentGroupKeys.length == groupBy.length) {
|
|
2666
|
+
const deepMapGroupValue = deepMap.get(currentGroupKeys);
|
|
2667
|
+
if (deepMapGroupValue) {
|
|
2668
|
+
deepMapGroupValue.items = dataArray;
|
|
2669
|
+
}
|
|
2670
|
+
return next == null ? void 0 : next();
|
|
2671
|
+
}
|
|
2730
2672
|
for (let i = 0, len = dataArray.length; i < len; i++) {
|
|
2731
2673
|
if (!dataArray[i]) {
|
|
2732
2674
|
const deepMapGroupValue2 = {
|
|
2733
2675
|
items: [],
|
|
2734
2676
|
reducerResults: {}
|
|
2735
2677
|
};
|
|
2736
|
-
deepMap.set([
|
|
2678
|
+
deepMap.set([
|
|
2679
|
+
...currentGroupKeys,
|
|
2680
|
+
`${NOT_LOADED_YET_KEY_PREFIX}${i}`
|
|
2681
|
+
], deepMapGroupValue2);
|
|
2737
2682
|
continue;
|
|
2738
2683
|
}
|
|
2739
2684
|
const dataObject = dataArray[i].data;
|
|
@@ -2744,6 +2689,7 @@ function lazyGroup(groupParams, rootData) {
|
|
|
2744
2689
|
currentGroupKeys.push(key);
|
|
2745
2690
|
const deepMapGroupValue = {
|
|
2746
2691
|
items: [],
|
|
2692
|
+
commonData: dataObject,
|
|
2747
2693
|
reducerResults: dataArray[i].aggregations || {}
|
|
2748
2694
|
};
|
|
2749
2695
|
deepMap.set(currentGroupKeys, deepMapGroupValue);
|
|
@@ -2879,10 +2825,15 @@ function flatten(groupResult) {
|
|
|
2879
2825
|
function getEnhancedGroupData(options, deepMapValue) {
|
|
2880
2826
|
const { groupBy, groupKeys, collapsed, parents, reducers } = options;
|
|
2881
2827
|
const groupNesting = groupKeys.length;
|
|
2882
|
-
const {
|
|
2828
|
+
const {
|
|
2829
|
+
items: groupItems,
|
|
2830
|
+
reducerResults,
|
|
2831
|
+
pivotDeepMap,
|
|
2832
|
+
commonData
|
|
2833
|
+
} = deepMapValue;
|
|
2883
2834
|
let data = null;
|
|
2884
2835
|
if (Object.keys(reducerResults).length > 0) {
|
|
2885
|
-
data = {};
|
|
2836
|
+
data = commonData || {};
|
|
2886
2837
|
for (let key in reducers)
|
|
2887
2838
|
if (reducers.hasOwnProperty(key)) {
|
|
2888
2839
|
const reducer = reducers[key];
|
|
@@ -2892,12 +2843,16 @@ function getEnhancedGroupData(options, deepMapValue) {
|
|
|
2892
2843
|
}
|
|
2893
2844
|
}
|
|
2894
2845
|
}
|
|
2846
|
+
let theValue = groupKeys[groupKeys.length - 1];
|
|
2847
|
+
if (typeof theValue === "string" && theValue.startsWith(NOT_LOADED_YET_KEY_PREFIX)) {
|
|
2848
|
+
theValue = null;
|
|
2849
|
+
}
|
|
2895
2850
|
const enhancedGroupData = {
|
|
2896
2851
|
data,
|
|
2897
2852
|
groupCount: groupItems.length,
|
|
2898
2853
|
groupData: groupItems,
|
|
2899
2854
|
groupKeys,
|
|
2900
|
-
id: groupKeys
|
|
2855
|
+
id: `${groupKeys}`,
|
|
2901
2856
|
collapsed,
|
|
2902
2857
|
parents,
|
|
2903
2858
|
collapsedChildrenCount: 0,
|
|
@@ -2905,8 +2860,9 @@ function getEnhancedGroupData(options, deepMapValue) {
|
|
|
2905
2860
|
indexInParentGroups: options.indexInParentGroups,
|
|
2906
2861
|
indexInGroup: options.indexInGroup,
|
|
2907
2862
|
indexInAll: options.indexInAll,
|
|
2908
|
-
value:
|
|
2909
|
-
|
|
2863
|
+
value: theValue,
|
|
2864
|
+
rootGroupBy: groupBy,
|
|
2865
|
+
groupBy: groupNesting === groupBy.length ? groupBy : groupBy.slice(0, groupNesting),
|
|
2910
2866
|
isGroupRow: true,
|
|
2911
2867
|
pivotValuesMap: pivotDeepMap,
|
|
2912
2868
|
groupNesting,
|
|
@@ -2973,7 +2929,7 @@ function enhancedFlatten(param) {
|
|
|
2973
2929
|
const startIndex = result.length;
|
|
2974
2930
|
result.push(...items.map((item, index) => {
|
|
2975
2931
|
return {
|
|
2976
|
-
id: toPrimaryKey(item)
|
|
2932
|
+
id: item ? toPrimaryKey(item) : `${groupKeys}-${index}`,
|
|
2977
2933
|
data: item,
|
|
2978
2934
|
isGroupRow: false,
|
|
2979
2935
|
collapsed: false,
|
|
@@ -3028,11 +2984,33 @@ function useEffectWithChanges(fn, deps) {
|
|
|
3028
2984
|
}, useEffectDeps);
|
|
3029
2985
|
}
|
|
3030
2986
|
|
|
2987
|
+
// src/components/utils/debounce.ts
|
|
2988
|
+
function debounce(fn, { wait }) {
|
|
2989
|
+
let timeout = null;
|
|
2990
|
+
return function(...args) {
|
|
2991
|
+
const context = this;
|
|
2992
|
+
if (timeout !== null) {
|
|
2993
|
+
clearTimeout(timeout);
|
|
2994
|
+
}
|
|
2995
|
+
timeout = setTimeout(() => {
|
|
2996
|
+
fn.apply(context, args);
|
|
2997
|
+
}, wait);
|
|
2998
|
+
};
|
|
2999
|
+
}
|
|
3000
|
+
|
|
3031
3001
|
// src/components/DataSource/privateHooks/useLoadData.ts
|
|
3002
|
+
var getRafPromise = () => new Promise((resolve) => {
|
|
3003
|
+
requestAnimationFrame(resolve);
|
|
3004
|
+
});
|
|
3032
3005
|
var SKIP_DATA_CHANGES_KEYS = {
|
|
3033
3006
|
originalDataArray: true,
|
|
3034
3007
|
changes: true
|
|
3035
3008
|
};
|
|
3009
|
+
function getChangeDetect() {
|
|
3010
|
+
var _a;
|
|
3011
|
+
const perfNow = (_a = getGlobal().performance) == null ? void 0 : _a.now();
|
|
3012
|
+
return `${Date.now()}:${perfNow}`;
|
|
3013
|
+
}
|
|
3036
3014
|
function buildDataSourceDataParams(componentState, overrides) {
|
|
3037
3015
|
var _a, _b;
|
|
3038
3016
|
const sortInfo = componentState.multiSort ? componentState.sortInfo : (_b = (_a = componentState.sortInfo) == null ? void 0 : _a[0]) != null ? _b : null;
|
|
@@ -3072,15 +3050,34 @@ function buildDataSourceDataParams(componentState, overrides) {
|
|
|
3072
3050
|
}
|
|
3073
3051
|
function loadData(data, componentState, actions, overrides) {
|
|
3074
3052
|
const dataParams = buildDataSourceDataParams(componentState, overrides);
|
|
3053
|
+
if (componentState.fullLazyLoad && dataParams.groupKeys) {
|
|
3054
|
+
const lazyGroupData = componentState.originalLazyGroupData;
|
|
3055
|
+
const key = [LAZY_ROOT_KEY_FOR_GROUPS, ...dataParams.groupKeys];
|
|
3056
|
+
const existingGroupRowInfo = lazyGroupData.get(key);
|
|
3057
|
+
if (existingGroupRowInfo && existingGroupRowInfo.cache) {
|
|
3058
|
+
const items = existingGroupRowInfo.items;
|
|
3059
|
+
const len = items.length;
|
|
3060
|
+
let allLoaded = true;
|
|
3061
|
+
for (let i = 0; i < len; i++) {
|
|
3062
|
+
if (items[i] == null) {
|
|
3063
|
+
allLoaded = false;
|
|
3064
|
+
break;
|
|
3065
|
+
}
|
|
3066
|
+
}
|
|
3067
|
+
if (allLoaded) {
|
|
3068
|
+
return Promise.resolve(true);
|
|
3069
|
+
}
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3075
3072
|
if (typeof data === "function") {
|
|
3076
3073
|
data = data(dataParams);
|
|
3077
3074
|
}
|
|
3078
3075
|
const dataIsPromise = typeof data === "object" && typeof data.then === "function";
|
|
3079
|
-
if (dataIsPromise) {
|
|
3076
|
+
if (dataIsPromise && !componentState.fullLazyLoad) {
|
|
3080
3077
|
actions.loading = true;
|
|
3081
3078
|
}
|
|
3082
|
-
Promise.resolve(data).then((dataParam) => {
|
|
3083
|
-
var _a, _b, _c;
|
|
3079
|
+
return Promise.resolve(data).then((dataParam) => {
|
|
3080
|
+
var _a, _b, _c, _d;
|
|
3084
3081
|
let dataArray = [];
|
|
3085
3082
|
let skipAssign = false;
|
|
3086
3083
|
if (Array.isArray(dataParam.data)) {
|
|
@@ -3093,9 +3090,10 @@ function loadData(data, componentState, actions, overrides) {
|
|
|
3093
3090
|
actions.pivotMappings = remoteData.mappings;
|
|
3094
3091
|
}
|
|
3095
3092
|
if (componentState.fullLazyLoad && dataParams.groupKeys) {
|
|
3096
|
-
const lazyGroupData =
|
|
3093
|
+
const lazyGroupData = componentState.originalLazyGroupData;
|
|
3097
3094
|
const key = [LAZY_ROOT_KEY_FOR_GROUPS, ...dataParams.groupKeys];
|
|
3098
3095
|
const newGroupRowInfo = {
|
|
3096
|
+
cache: !!remoteData.cache,
|
|
3099
3097
|
totalCount: (_a = remoteData.totalCount) != null ? _a : dataArray.length,
|
|
3100
3098
|
items: dataArray
|
|
3101
3099
|
};
|
|
@@ -3103,11 +3101,15 @@ function loadData(data, componentState, actions, overrides) {
|
|
|
3103
3101
|
const existingGroupRowInfo = lazyGroupData.get(key);
|
|
3104
3102
|
const currentGroupRowInfo = existingGroupRowInfo != null ? existingGroupRowInfo : {
|
|
3105
3103
|
items: [],
|
|
3106
|
-
totalCount: newGroupRowInfo.totalCount
|
|
3104
|
+
totalCount: newGroupRowInfo.totalCount,
|
|
3105
|
+
cache: (_b = newGroupRowInfo.cache) != null ? _b : true
|
|
3107
3106
|
};
|
|
3107
|
+
if (existingGroupRowInfo) {
|
|
3108
|
+
existingGroupRowInfo.cache = newGroupRowInfo.cache;
|
|
3109
|
+
}
|
|
3108
3110
|
currentGroupRowInfo.items.length = currentGroupRowInfo.totalCount;
|
|
3109
|
-
const start = (
|
|
3110
|
-
const end =
|
|
3111
|
+
const start = (_c = dataParams.lazyLoadStartIndex) != null ? _c : 0;
|
|
3112
|
+
const end = Math.min((_d = remoteData.totalCount) != null ? _d : start + dataParams.lazyLoadBatchSize);
|
|
3111
3113
|
for (let i = start; i < end; i++) {
|
|
3112
3114
|
currentGroupRowInfo.items[i] = newGroupRowInfo.items[i - start];
|
|
3113
3115
|
}
|
|
@@ -3118,7 +3120,7 @@ function loadData(data, componentState, actions, overrides) {
|
|
|
3118
3120
|
lazyGroupData.set(key, newGroupRowInfo);
|
|
3119
3121
|
}
|
|
3120
3122
|
skipAssign = true;
|
|
3121
|
-
actions.
|
|
3123
|
+
actions.originalLazyGroupDataChangeDetect = getChangeDetect();
|
|
3122
3124
|
}
|
|
3123
3125
|
} else {
|
|
3124
3126
|
dataArray = dataParam;
|
|
@@ -3126,7 +3128,7 @@ function loadData(data, componentState, actions, overrides) {
|
|
|
3126
3128
|
if (!skipAssign) {
|
|
3127
3129
|
actions.originalDataArray = dataArray;
|
|
3128
3130
|
}
|
|
3129
|
-
if (dataIsPromise) {
|
|
3131
|
+
if (dataIsPromise && !componentState.fullLazyLoad) {
|
|
3130
3132
|
actions.loading = false;
|
|
3131
3133
|
}
|
|
3132
3134
|
});
|
|
@@ -3145,9 +3147,7 @@ function useLoadData() {
|
|
|
3145
3147
|
pivotBy,
|
|
3146
3148
|
livePagination,
|
|
3147
3149
|
livePaginationCursor,
|
|
3148
|
-
cursorId: stateCursorId
|
|
3149
|
-
lazyLoadBatchSize,
|
|
3150
|
-
notifyScrollStop
|
|
3150
|
+
cursorId: stateCursorId
|
|
3151
3151
|
} = componentState;
|
|
3152
3152
|
const [scrollbars, setScrollbars] = useState4({
|
|
3153
3153
|
vertical: false,
|
|
@@ -3188,33 +3188,7 @@ function useLoadData() {
|
|
|
3188
3188
|
cursorId: livePagination ? stateCursorId : null
|
|
3189
3189
|
};
|
|
3190
3190
|
const initialRef = useRef6(true);
|
|
3191
|
-
|
|
3192
|
-
if (lazyLoadBatchSize && lazyLoadBatchSize > 0) {
|
|
3193
|
-
return notifyScrollStop.onChange((param) => {
|
|
3194
|
-
console.log("scroll stop", param);
|
|
3195
|
-
if (!param) {
|
|
3196
|
-
return;
|
|
3197
|
-
}
|
|
3198
|
-
const componentState2 = getComponentState();
|
|
3199
|
-
const {
|
|
3200
|
-
firstVisibleRowIndex: startIndex,
|
|
3201
|
-
lastVisibleRowIndex: endIndex
|
|
3202
|
-
} = param;
|
|
3203
|
-
const firstBatchStart = Math.floor(startIndex / lazyLoadBatchSize) * lazyLoadBatchSize;
|
|
3204
|
-
const lastBatchStart = Math.floor(endIndex / lazyLoadBatchSize) * lazyLoadBatchSize;
|
|
3205
|
-
const isRowLoaded = (index) => componentState2.dataArray[index].data != null;
|
|
3206
|
-
for (let batchStartIndex = firstBatchStart; batchStartIndex <= lastBatchStart; batchStartIndex = batchStartIndex + lazyLoadBatchSize) {
|
|
3207
|
-
if (!isRowLoaded(batchStartIndex)) {
|
|
3208
|
-
loadData(componentState2.data, componentState2, actions, {
|
|
3209
|
-
lazyLoadBatchSize,
|
|
3210
|
-
lazyLoadStartIndex: batchStartIndex
|
|
3211
|
-
});
|
|
3212
|
-
}
|
|
3213
|
-
}
|
|
3214
|
-
});
|
|
3215
|
-
}
|
|
3216
|
-
return;
|
|
3217
|
-
}, [lazyLoadBatchSize]);
|
|
3191
|
+
useLazyLoadRange();
|
|
3218
3192
|
useEffectWithChanges(() => {
|
|
3219
3193
|
const componentState2 = getComponentState();
|
|
3220
3194
|
if (typeof componentState2.data !== "function") {
|
|
@@ -3235,6 +3209,126 @@ function useLoadData() {
|
|
|
3235
3209
|
}
|
|
3236
3210
|
}, depsObject);
|
|
3237
3211
|
}
|
|
3212
|
+
function useLazyLoadRange() {
|
|
3213
|
+
const {
|
|
3214
|
+
getComponentState,
|
|
3215
|
+
componentActions: actions,
|
|
3216
|
+
componentState
|
|
3217
|
+
} = useComponentState();
|
|
3218
|
+
const loadingCache = useMemo4(() => {
|
|
3219
|
+
return new Map();
|
|
3220
|
+
}, [componentState.data]);
|
|
3221
|
+
globalThis.loadingCache = loadingCache;
|
|
3222
|
+
const {
|
|
3223
|
+
lazyLoadBatchSize,
|
|
3224
|
+
notifyRenderRangeChange,
|
|
3225
|
+
dataArray,
|
|
3226
|
+
scrollStopDelayUpdatedByTable
|
|
3227
|
+
} = componentState;
|
|
3228
|
+
const latestRenderRangeRef = useRef6(null);
|
|
3229
|
+
const loadRange = (param, cache = loadingCache) => {
|
|
3230
|
+
const componentState2 = getComponentState();
|
|
3231
|
+
param = param || latestRenderRangeRef.current;
|
|
3232
|
+
if (!param) {
|
|
3233
|
+
return;
|
|
3234
|
+
}
|
|
3235
|
+
const { renderStartIndex: startIndex, renderEndIndex: endIndex } = param;
|
|
3236
|
+
if (!lazyLoadBatchSize || lazyLoadBatchSize <= 0) {
|
|
3237
|
+
return;
|
|
3238
|
+
}
|
|
3239
|
+
lazyLoadRange({
|
|
3240
|
+
startIndex,
|
|
3241
|
+
endIndex,
|
|
3242
|
+
lazyLoadBatchSize,
|
|
3243
|
+
componentState: componentState2,
|
|
3244
|
+
componentActions: actions
|
|
3245
|
+
}, cache);
|
|
3246
|
+
};
|
|
3247
|
+
const debouncedLoadRange = useMemo4(() => debounce(loadRange, { wait: scrollStopDelayUpdatedByTable }), [scrollStopDelayUpdatedByTable]);
|
|
3248
|
+
useEffect8(() => {
|
|
3249
|
+
if (lazyLoadBatchSize && lazyLoadBatchSize > 0) {
|
|
3250
|
+
return notifyRenderRangeChange.onChange((param) => {
|
|
3251
|
+
latestRenderRangeRef.current = param;
|
|
3252
|
+
loadRange(param, loadingCache);
|
|
3253
|
+
});
|
|
3254
|
+
}
|
|
3255
|
+
return;
|
|
3256
|
+
}, [lazyLoadBatchSize, loadingCache]);
|
|
3257
|
+
useEffect8(() => {
|
|
3258
|
+
if (lazyLoadBatchSize && lazyLoadBatchSize > 0) {
|
|
3259
|
+
debouncedLoadRange();
|
|
3260
|
+
}
|
|
3261
|
+
return;
|
|
3262
|
+
}, [dataArray]);
|
|
3263
|
+
}
|
|
3264
|
+
function lazyLoadRange(options, cache) {
|
|
3265
|
+
const {
|
|
3266
|
+
startIndex,
|
|
3267
|
+
endIndex,
|
|
3268
|
+
lazyLoadBatchSize,
|
|
3269
|
+
componentState,
|
|
3270
|
+
componentActions
|
|
3271
|
+
} = options;
|
|
3272
|
+
const { dataArray } = componentState;
|
|
3273
|
+
const isRowLoaded = (index) => dataArray[index].data != null;
|
|
3274
|
+
const perGroupFnCalls = new DeepMap();
|
|
3275
|
+
const rootGroupKeys = ["_______xxx______"];
|
|
3276
|
+
for (let i = startIndex; i <= endIndex; i++) {
|
|
3277
|
+
const rowInfo = dataArray[i];
|
|
3278
|
+
if (!rowInfo) {
|
|
3279
|
+
continue;
|
|
3280
|
+
}
|
|
3281
|
+
const rowLoaded = rowInfo.data != null;
|
|
3282
|
+
const theGroupKeys = rowInfo.groupKeys ? [...rowInfo.groupKeys] : [];
|
|
3283
|
+
if (rowInfo.groupKeys && rowInfo.isGroupRow) {
|
|
3284
|
+
theGroupKeys.pop();
|
|
3285
|
+
}
|
|
3286
|
+
const cacheKeys = theGroupKeys.length ? theGroupKeys : rootGroupKeys;
|
|
3287
|
+
const indexInGroup = rowInfo.indexInGroup;
|
|
3288
|
+
if (!rowLoaded) {
|
|
3289
|
+
let fnCalls = perGroupFnCalls.get(cacheKeys);
|
|
3290
|
+
const batchStartIndexInGroup = Math.floor(indexInGroup / lazyLoadBatchSize) * lazyLoadBatchSize;
|
|
3291
|
+
const offset = rowInfo.indexInGroup - batchStartIndexInGroup;
|
|
3292
|
+
const absoluteIndexOfBatchStart = dataArray[rowInfo.indexInAll - offset].indexInAll;
|
|
3293
|
+
const batchStartRowLoaded = isRowLoaded(absoluteIndexOfBatchStart);
|
|
3294
|
+
const batchStartRowId = dataArray[absoluteIndexOfBatchStart].id;
|
|
3295
|
+
if (batchStartRowLoaded || (fnCalls == null ? void 0 : fnCalls[batchStartRowId])) {
|
|
3296
|
+
continue;
|
|
3297
|
+
}
|
|
3298
|
+
const shouldSetFnCalls = !fnCalls;
|
|
3299
|
+
fnCalls = fnCalls || {};
|
|
3300
|
+
const currentFnCall = {
|
|
3301
|
+
lazyLoadStartIndex: batchStartIndexInGroup,
|
|
3302
|
+
lazyLoadBatchSize,
|
|
3303
|
+
groupKeys: theGroupKeys
|
|
3304
|
+
};
|
|
3305
|
+
if (!fnCalls[batchStartRowId]) {
|
|
3306
|
+
fnCalls[batchStartRowId] = currentFnCall;
|
|
3307
|
+
}
|
|
3308
|
+
if (shouldSetFnCalls) {
|
|
3309
|
+
perGroupFnCalls.set(cacheKeys, fnCalls);
|
|
3310
|
+
}
|
|
3311
|
+
}
|
|
3312
|
+
}
|
|
3313
|
+
let initialPromise = Promise.resolve(true);
|
|
3314
|
+
const allFnCalls = [];
|
|
3315
|
+
perGroupFnCalls.topDownValues().forEach((record) => {
|
|
3316
|
+
allFnCalls.push(...Object.values(record));
|
|
3317
|
+
});
|
|
3318
|
+
allFnCalls.reduce((promise, fnCall) => {
|
|
3319
|
+
const cacheKey = `${fnCall.groupKeys.join("-")}:${fnCall.lazyLoadStartIndex}`;
|
|
3320
|
+
if (cache && cache.has(cacheKey)) {
|
|
3321
|
+
return promise;
|
|
3322
|
+
}
|
|
3323
|
+
cache == null ? void 0 : cache.set(cacheKey, true);
|
|
3324
|
+
const args = [componentState.data, componentState, componentActions, fnCall];
|
|
3325
|
+
return promise.then(() => getRafPromise()).then(() => loadData(...args)).then(() => {
|
|
3326
|
+
requestAnimationFrame(() => {
|
|
3327
|
+
cache == null ? void 0 : cache.delete(cacheKey);
|
|
3328
|
+
});
|
|
3329
|
+
});
|
|
3330
|
+
}, initialPromise);
|
|
3331
|
+
}
|
|
3238
3332
|
|
|
3239
3333
|
// src/components/DataSource/state/normalizeSortInfo.ts
|
|
3240
3334
|
var EMPTY_ARRAY = Object.freeze([]);
|
|
@@ -3434,8 +3528,11 @@ function initSetupState2() {
|
|
|
3434
3528
|
dataParams: void 0,
|
|
3435
3529
|
notifyScrollbarsChange: buildSubscriptionCallback(),
|
|
3436
3530
|
notifyScrollStop: buildSubscriptionCallback(),
|
|
3531
|
+
notifyRenderRangeChange: buildSubscriptionCallback(),
|
|
3437
3532
|
pivotTotalColumnPosition: "end",
|
|
3533
|
+
scrollStopDelayUpdatedByTable: 100,
|
|
3438
3534
|
originalLazyGroupData,
|
|
3535
|
+
originalLazyGroupDataChangeDetect: 0,
|
|
3439
3536
|
originalDataArray,
|
|
3440
3537
|
cursorId: defaultCursorId,
|
|
3441
3538
|
showSeparatePivotColumnForSingleAggregation: false,
|
|
@@ -3620,23 +3717,7 @@ function getPivotColumnsAndColumnGroups({
|
|
|
3620
3717
|
const aggregationReducers = Object.keys(reducers).map((key) => {
|
|
3621
3718
|
return __spreadProps(__spreadValues({}, reducers[key]), { id: key });
|
|
3622
3719
|
});
|
|
3623
|
-
const columns = new Map([
|
|
3624
|
-
[
|
|
3625
|
-
"labels",
|
|
3626
|
-
{
|
|
3627
|
-
header: "Row labels",
|
|
3628
|
-
pivotBy,
|
|
3629
|
-
valueGetter: (params) => {
|
|
3630
|
-
var _a;
|
|
3631
|
-
const { rowInfo } = params;
|
|
3632
|
-
if (!rowInfo.data) {
|
|
3633
|
-
return "Loading ... TODO replace this with a loading indicator";
|
|
3634
|
-
}
|
|
3635
|
-
return rowInfo.groupKeys ? rowInfo.groupKeys[((_a = rowInfo.groupKeys) == null ? void 0 : _a.length) - 1] : null;
|
|
3636
|
-
}
|
|
3637
|
-
}
|
|
3638
|
-
]
|
|
3639
|
-
]);
|
|
3720
|
+
const columns = new Map([]);
|
|
3640
3721
|
const columnGroups = new Map();
|
|
3641
3722
|
const isSingleAggregationColumn = !showSeparatePivotColumnForSingleAggregation && aggregationReducers.length === 1;
|
|
3642
3723
|
deepMap.visitDepthFirst((_value, keys, _indexInGroup, next) => {
|
|
@@ -3808,6 +3889,7 @@ function concludeReducer(params) {
|
|
|
3808
3889
|
"generateGroupRows",
|
|
3809
3890
|
"originalDataArray",
|
|
3810
3891
|
"originalLazyGroupData",
|
|
3892
|
+
"originalLazyGroupDataChangeDetect",
|
|
3811
3893
|
"groupBy",
|
|
3812
3894
|
"groupRowsState",
|
|
3813
3895
|
"pivotBy",
|
|
@@ -3828,7 +3910,11 @@ function concludeReducer(params) {
|
|
|
3828
3910
|
state.postSortDataArray = dataArray;
|
|
3829
3911
|
state.groupDeepMap = void 0;
|
|
3830
3912
|
const toPrimaryKey = (data) => {
|
|
3831
|
-
|
|
3913
|
+
const pk = data[state.primaryKey];
|
|
3914
|
+
if (Array.isArray(pk)) {
|
|
3915
|
+
debugger;
|
|
3916
|
+
}
|
|
3917
|
+
return pk;
|
|
3832
3918
|
};
|
|
3833
3919
|
if (shouldGroup) {
|
|
3834
3920
|
if (shouldGroupAgain) {
|
|
@@ -3870,7 +3956,7 @@ function concludeReducer(params) {
|
|
|
3870
3956
|
state.pivotColumns = void 0;
|
|
3871
3957
|
const arrayDifferentAfterSortStep = previousState.postSortDataArray != state.postSortDataArray;
|
|
3872
3958
|
if (arrayDifferentAfterSortStep) {
|
|
3873
|
-
rowInfoDataArray = dataArray.map((data, index) => toRowInfo(data, toPrimaryKey(data), index));
|
|
3959
|
+
rowInfoDataArray = dataArray.map((data, index) => toRowInfo(data, data ? toPrimaryKey(data) : index, index));
|
|
3874
3960
|
}
|
|
3875
3961
|
}
|
|
3876
3962
|
state.postGroupDataArray = rowInfoDataArray;
|
|
@@ -3898,7 +3984,7 @@ function DataSourceWithContext(props) {
|
|
|
3898
3984
|
if (typeof children === "function") {
|
|
3899
3985
|
children = children(computedValues);
|
|
3900
3986
|
}
|
|
3901
|
-
return /* @__PURE__ */
|
|
3987
|
+
return /* @__PURE__ */ createElement5(Fragment, null, children);
|
|
3902
3988
|
}
|
|
3903
3989
|
var DataSourceRoot = getComponentStateRoot({
|
|
3904
3990
|
initSetupState: initSetupState2,
|
|
@@ -3921,14 +4007,14 @@ function DataSourceCmp({ children }) {
|
|
|
3921
4007
|
globalThis.getDataSourceState = getState;
|
|
3922
4008
|
}
|
|
3923
4009
|
useLoadData();
|
|
3924
|
-
return /* @__PURE__ */
|
|
4010
|
+
return /* @__PURE__ */ createElement5(DataSourceContext.Provider, {
|
|
3925
4011
|
value: contextValue
|
|
3926
|
-
}, /* @__PURE__ */
|
|
4012
|
+
}, /* @__PURE__ */ createElement5(DataSourceWithContext, {
|
|
3927
4013
|
children
|
|
3928
4014
|
}));
|
|
3929
4015
|
}
|
|
3930
4016
|
function DataSource(props) {
|
|
3931
|
-
return /* @__PURE__ */
|
|
4017
|
+
return /* @__PURE__ */ createElement5(DataSourceRoot, __spreadValues({}, props), /* @__PURE__ */ createElement5(DataSourceCmp, {
|
|
3932
4018
|
children: props.children
|
|
3933
4019
|
}));
|
|
3934
4020
|
}
|
|
@@ -3952,7 +4038,7 @@ function useToggleGroupRow() {
|
|
|
3952
4038
|
|
|
3953
4039
|
// src/components/InfiniteTable/hooks/useColumnsWhen.ts
|
|
3954
4040
|
function useGroupByMap(groupBy) {
|
|
3955
|
-
const groupByMap =
|
|
4041
|
+
const groupByMap = useMemo5(() => {
|
|
3956
4042
|
return groupBy.reduce((acc, groupBy2, index) => {
|
|
3957
4043
|
acc.set(groupBy2.field, {
|
|
3958
4044
|
groupBy: groupBy2,
|
|
@@ -3979,9 +4065,9 @@ function useColumnsWhen() {
|
|
|
3979
4065
|
dataSourceActions.pivotTotalColumnPosition = pivotTotalColumnPosition;
|
|
3980
4066
|
}, [pivotTotalColumnPosition]);
|
|
3981
4067
|
useColumnsWhenInlineGroupRenderStrategy(groupByMap);
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
4068
|
+
const { toggleGroupRow } = useColumnsWhenGrouping();
|
|
4069
|
+
useHideEmptyGroupColumns();
|
|
4070
|
+
return { toggleGroupRow };
|
|
3985
4071
|
}
|
|
3986
4072
|
function useColumnsWhenInlineGroupRenderStrategy(groupByMap) {
|
|
3987
4073
|
const toggleGroupRow = useToggleGroupRow();
|
|
@@ -3991,6 +4077,9 @@ function useColumnsWhenInlineGroupRenderStrategy(groupByMap) {
|
|
|
3991
4077
|
} = useComponentState();
|
|
3992
4078
|
function computeColumnsWhenInlineGroupRenderStrategy(columns2, groupByMap2, groupRenderStrategy2, toggleGroupRow2) {
|
|
3993
4079
|
const computedColumns = new Map();
|
|
4080
|
+
if (groupRenderStrategy2 !== "inline") {
|
|
4081
|
+
return;
|
|
4082
|
+
}
|
|
3994
4083
|
columns2.forEach((column, id) => {
|
|
3995
4084
|
let base = {};
|
|
3996
4085
|
const groupByForColumn = groupByMap2.get(column.field);
|
|
@@ -4050,51 +4139,32 @@ function useColumnsWhenInlineGroupRenderStrategy(groupByMap) {
|
|
|
4050
4139
|
});
|
|
4051
4140
|
}, [columns, groupByMap, groupRenderStrategy, toggleGroupRow]);
|
|
4052
4141
|
}
|
|
4053
|
-
function
|
|
4142
|
+
function useColumnsWhenGrouping() {
|
|
4054
4143
|
const {
|
|
4055
4144
|
componentState: { groupBy, pivotBy }
|
|
4056
4145
|
} = useDataSourceContextValue();
|
|
4057
4146
|
const {
|
|
4058
4147
|
componentActions,
|
|
4059
4148
|
componentState: {
|
|
4149
|
+
columns,
|
|
4150
|
+
groupColumn,
|
|
4151
|
+
groupRenderStrategy,
|
|
4060
4152
|
pivotColumns,
|
|
4061
4153
|
pivotColumn,
|
|
4062
|
-
pivotRowLabelsColumn,
|
|
4063
4154
|
pivotTotalColumnPosition
|
|
4064
4155
|
}
|
|
4065
4156
|
} = useComponentState();
|
|
4066
4157
|
const toggleGroupRow = useToggleGroupRow();
|
|
4067
4158
|
useEffect9(() => {
|
|
4068
|
-
const computedPivotColumns = getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, {
|
|
4069
|
-
pivotColumn,
|
|
4070
|
-
pivotRowLabelsColumn,
|
|
4071
|
-
pivotTotalColumnPosition,
|
|
4072
|
-
pivotBy,
|
|
4073
|
-
groupBy,
|
|
4074
|
-
toggleGroupRow
|
|
4075
|
-
});
|
|
4076
|
-
componentActions.computedPivotColumns = computedPivotColumns;
|
|
4077
|
-
}, [pivotColumns, pivotColumn, pivotRowLabelsColumn]);
|
|
4078
|
-
}
|
|
4079
|
-
function useColumnsWhenGrouping() {
|
|
4080
|
-
const {
|
|
4081
|
-
componentState: { groupBy }
|
|
4082
|
-
} = useDataSourceContextValue();
|
|
4083
|
-
const {
|
|
4084
|
-
componentActions,
|
|
4085
|
-
componentState: { columns, groupColumn, groupRenderStrategy, pivotColumns }
|
|
4086
|
-
} = useComponentState();
|
|
4087
|
-
const toggleGroupRow = useToggleGroupRow();
|
|
4088
|
-
useEffect9(() => {
|
|
4089
|
-
if (pivotColumns) {
|
|
4090
|
-
return;
|
|
4091
|
-
}
|
|
4092
4159
|
const update = () => {
|
|
4093
4160
|
const columnsWhenGrouping = getColumnsWhenGrouping({
|
|
4094
4161
|
columns,
|
|
4095
4162
|
groupColumn,
|
|
4096
|
-
|
|
4163
|
+
pivotColumn,
|
|
4164
|
+
pivotTotalColumnPosition,
|
|
4165
|
+
groupRenderStrategy: groupRenderStrategy === "inline" ? "single-column" : groupRenderStrategy,
|
|
4097
4166
|
groupBy,
|
|
4167
|
+
pivotBy,
|
|
4098
4168
|
pivotColumns,
|
|
4099
4169
|
toggleGroupRow
|
|
4100
4170
|
});
|
|
@@ -4106,11 +4176,25 @@ function useColumnsWhenGrouping() {
|
|
|
4106
4176
|
delete: update,
|
|
4107
4177
|
clear: update
|
|
4108
4178
|
});
|
|
4109
|
-
}, [
|
|
4179
|
+
}, [
|
|
4180
|
+
columns,
|
|
4181
|
+
groupBy,
|
|
4182
|
+
pivotBy,
|
|
4183
|
+
groupColumn,
|
|
4184
|
+
groupRenderStrategy,
|
|
4185
|
+
pivotColumns,
|
|
4186
|
+
pivotTotalColumnPosition,
|
|
4187
|
+
pivotColumn
|
|
4188
|
+
]);
|
|
4189
|
+
return { toggleGroupRow };
|
|
4110
4190
|
}
|
|
4111
|
-
function useHideEmptyGroupColumns(
|
|
4191
|
+
function useHideEmptyGroupColumns() {
|
|
4112
4192
|
const {
|
|
4113
|
-
componentState: {
|
|
4193
|
+
componentState: {
|
|
4194
|
+
groupBy,
|
|
4195
|
+
groupRowsState,
|
|
4196
|
+
originalLazyGroupDataChangeDetect
|
|
4197
|
+
},
|
|
4114
4198
|
getState: getDataSourceState
|
|
4115
4199
|
} = useDataSourceContextValue();
|
|
4116
4200
|
const {
|
|
@@ -4163,8 +4247,8 @@ function useHideEmptyGroupColumns(groupRowsMap) {
|
|
|
4163
4247
|
getDataSourceState,
|
|
4164
4248
|
groupRenderStrategy,
|
|
4165
4249
|
generatedColumns,
|
|
4250
|
+
originalLazyGroupDataChangeDetect,
|
|
4166
4251
|
groupBy,
|
|
4167
|
-
groupRowsMap,
|
|
4168
4252
|
hideEmptyGroupColumns ? groupRowsState : null,
|
|
4169
4253
|
hideEmptyGroupColumns
|
|
4170
4254
|
]);
|
|
@@ -4173,14 +4257,14 @@ function getColumnsWhenGrouping(params) {
|
|
|
4173
4257
|
const {
|
|
4174
4258
|
pivotColumns,
|
|
4175
4259
|
groupBy,
|
|
4260
|
+
pivotBy,
|
|
4176
4261
|
groupColumn,
|
|
4262
|
+
pivotTotalColumnPosition,
|
|
4263
|
+
pivotColumn,
|
|
4177
4264
|
groupRenderStrategy,
|
|
4178
4265
|
toggleGroupRow,
|
|
4179
4266
|
columns
|
|
4180
4267
|
} = params;
|
|
4181
|
-
if (pivotColumns) {
|
|
4182
|
-
return void 0;
|
|
4183
|
-
}
|
|
4184
4268
|
if (groupRenderStrategy === "inline") {
|
|
4185
4269
|
return void 0;
|
|
4186
4270
|
}
|
|
@@ -4190,6 +4274,7 @@ function getColumnsWhenGrouping(params) {
|
|
|
4190
4274
|
const generatedGroupColumn = getColumnForGroupBy({
|
|
4191
4275
|
groupByForColumn,
|
|
4192
4276
|
groupBy,
|
|
4277
|
+
pivotBy,
|
|
4193
4278
|
groupIndexForColumn,
|
|
4194
4279
|
groupCount: arr.length,
|
|
4195
4280
|
groupRenderStrategy
|
|
@@ -4200,13 +4285,40 @@ function getColumnsWhenGrouping(params) {
|
|
|
4200
4285
|
const singleGroupColumn = getSingleGroupColumn({
|
|
4201
4286
|
groupCount: groupBy.length,
|
|
4202
4287
|
groupBy,
|
|
4288
|
+
pivotBy,
|
|
4203
4289
|
groupRenderStrategy
|
|
4204
4290
|
}, toggleGroupRow, groupColumn);
|
|
4205
4291
|
computedColumns.set(singleGroupColumn.id || "group-by", singleGroupColumn);
|
|
4206
4292
|
}
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4293
|
+
if (pivotColumns) {
|
|
4294
|
+
pivotColumns.forEach((col, key) => {
|
|
4295
|
+
if (col.pivotTotalColumn && pivotTotalColumnPosition === false) {
|
|
4296
|
+
return;
|
|
4297
|
+
}
|
|
4298
|
+
let column = __spreadValues({}, col);
|
|
4299
|
+
if (pivotColumn) {
|
|
4300
|
+
if (typeof pivotColumn === "function") {
|
|
4301
|
+
column = __spreadValues(__spreadValues({}, column), pivotColumn({
|
|
4302
|
+
column,
|
|
4303
|
+
pivotBy,
|
|
4304
|
+
groupBy
|
|
4305
|
+
}));
|
|
4306
|
+
} else {
|
|
4307
|
+
column = __spreadValues(__spreadValues({}, column), pivotColumn);
|
|
4308
|
+
}
|
|
4309
|
+
}
|
|
4310
|
+
if (!column.render && column.renderValue) {
|
|
4311
|
+
column.render = (renderOptions) => {
|
|
4312
|
+
return column.renderValue(renderOptions);
|
|
4313
|
+
};
|
|
4314
|
+
}
|
|
4315
|
+
computedColumns.set(key, column);
|
|
4316
|
+
});
|
|
4317
|
+
} else {
|
|
4318
|
+
columns.forEach((col, colId) => {
|
|
4319
|
+
computedColumns.set(colId, col);
|
|
4320
|
+
});
|
|
4321
|
+
}
|
|
4210
4322
|
return computedColumns.size ? computedColumns : void 0;
|
|
4211
4323
|
}
|
|
4212
4324
|
|
|
@@ -4245,7 +4357,7 @@ function useComputed() {
|
|
|
4245
4357
|
}, [showSeparatePivotColumnForSingleAggregation]);
|
|
4246
4358
|
const { multiSort } = dataSourceState;
|
|
4247
4359
|
useColumnGroups();
|
|
4248
|
-
useColumnsWhen();
|
|
4360
|
+
const { toggleGroupRow } = useColumnsWhen();
|
|
4249
4361
|
const setSortInfo = useCallback5((sortInfo) => {
|
|
4250
4362
|
var _a2;
|
|
4251
4363
|
const newSortInfo = multiSort ? sortInfo : (_a2 = sortInfo[0]) != null ? _a2 : null;
|
|
@@ -4314,6 +4426,7 @@ function useComputed() {
|
|
|
4314
4426
|
const computedPinnedStartOverflow = computedPinnedStartWidth ? computedPinnedStartColumnsWidth > computedPinnedStartWidth : false;
|
|
4315
4427
|
const computedPinnedEndOverflow = computedPinnedEndWidth ? computedPinnedEndColumnsWidth > computedPinnedEndWidth : false;
|
|
4316
4428
|
return {
|
|
4429
|
+
toggleGroupRow,
|
|
4317
4430
|
computedPinnedStartOverflow,
|
|
4318
4431
|
computedPinnedEndOverflow,
|
|
4319
4432
|
computedPinnedStartWidth,
|
|
@@ -4338,7 +4451,7 @@ function useComputed() {
|
|
|
4338
4451
|
|
|
4339
4452
|
// src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
|
|
4340
4453
|
import {
|
|
4341
|
-
createElement as
|
|
4454
|
+
createElement as createElement6,
|
|
4342
4455
|
forwardRef
|
|
4343
4456
|
} from "react";
|
|
4344
4457
|
|
|
@@ -4350,7 +4463,7 @@ var useInternalProps = () => {
|
|
|
4350
4463
|
// src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx
|
|
4351
4464
|
var InfiniteTableBody = forwardRef(function InfiniteTableBody2(props, ref) {
|
|
4352
4465
|
const { rootClassName: rootClassName12 } = useInternalProps();
|
|
4353
|
-
return /* @__PURE__ */
|
|
4466
|
+
return /* @__PURE__ */ createElement6("div", __spreadProps(__spreadValues({
|
|
4354
4467
|
ref
|
|
4355
4468
|
}, props), {
|
|
4356
4469
|
className: join(`${rootClassName12}Body`, position.relative, flex["1"], transformTranslateZero, props.className)
|
|
@@ -4359,12 +4472,12 @@ var InfiniteTableBody = forwardRef(function InfiniteTableBody2(props, ref) {
|
|
|
4359
4472
|
|
|
4360
4473
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx
|
|
4361
4474
|
import {
|
|
4362
|
-
createElement as
|
|
4475
|
+
createElement as createElement18
|
|
4363
4476
|
} from "react";
|
|
4364
4477
|
|
|
4365
4478
|
// src/components/InfiniteTable/components/ScrollbarPlaceholder.tsx
|
|
4366
4479
|
import {
|
|
4367
|
-
createElement as
|
|
4480
|
+
createElement as createElement7,
|
|
4368
4481
|
memo as memo2
|
|
4369
4482
|
} from "react";
|
|
4370
4483
|
function HorizontalScrollbarPlaceholderFn(props) {
|
|
@@ -4372,7 +4485,7 @@ function HorizontalScrollbarPlaceholderFn(props) {
|
|
|
4372
4485
|
if (!scrollbarWidth2) {
|
|
4373
4486
|
return null;
|
|
4374
4487
|
}
|
|
4375
|
-
return /* @__PURE__ */
|
|
4488
|
+
return /* @__PURE__ */ createElement7("div", {
|
|
4376
4489
|
"data-name": "horizontal-scrollbar-placeholder",
|
|
4377
4490
|
style: __spreadValues({
|
|
4378
4491
|
position: "absolute",
|
|
@@ -4388,7 +4501,7 @@ function VerticalScrollbarPlaceholderFn(props) {
|
|
|
4388
4501
|
if (!scrollbarWidth2) {
|
|
4389
4502
|
return null;
|
|
4390
4503
|
}
|
|
4391
|
-
return /* @__PURE__ */
|
|
4504
|
+
return /* @__PURE__ */ createElement7("div", {
|
|
4392
4505
|
"data-name": "vertical-scrollbar-placeholder",
|
|
4393
4506
|
style: __spreadValues({
|
|
4394
4507
|
position: "absolute",
|
|
@@ -4414,7 +4527,7 @@ var HeaderWrapperCls = "_12zfob1v _16lm1iw16 _16lm1iw1 _16lm1iwj _16lm1iw10";
|
|
|
4414
4527
|
|
|
4415
4528
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
|
|
4416
4529
|
import {
|
|
4417
|
-
createElement as
|
|
4530
|
+
createElement as createElement14,
|
|
4418
4531
|
memo as memo6
|
|
4419
4532
|
} from "react";
|
|
4420
4533
|
import { useCallback as useCallback8, useEffect as useEffect14, useRef as useRef9 } from "react";
|
|
@@ -4422,13 +4535,13 @@ import { useCallback as useCallback8, useEffect as useEffect14, useRef as useRef
|
|
|
4422
4535
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
|
|
4423
4536
|
import {
|
|
4424
4537
|
Fragment as Fragment2,
|
|
4425
|
-
createElement as
|
|
4538
|
+
createElement as createElement10
|
|
4426
4539
|
} from "react";
|
|
4427
4540
|
import { useCallback as useCallback7, useEffect as useEffect12, useRef as useRef8 } from "react";
|
|
4428
4541
|
|
|
4429
4542
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCell.tsx
|
|
4430
4543
|
import {
|
|
4431
|
-
createElement as
|
|
4544
|
+
createElement as createElement8,
|
|
4432
4545
|
memo as memo3
|
|
4433
4546
|
} from "react";
|
|
4434
4547
|
|
|
@@ -4489,12 +4602,12 @@ function InfiniteTableCellFn(props) {
|
|
|
4489
4602
|
style.transform = `translate3d(${shiftLeft}px, 0px, 0px)`;
|
|
4490
4603
|
}
|
|
4491
4604
|
}
|
|
4492
|
-
return /* @__PURE__ */
|
|
4605
|
+
return /* @__PURE__ */ createElement8("div", __spreadProps(__spreadValues({}, domProps), {
|
|
4493
4606
|
ref: domRef,
|
|
4494
4607
|
style,
|
|
4495
4608
|
"data-name": `Cell`,
|
|
4496
4609
|
className: join(domProps.className, columnAlignCellStyle[(_b = column.align) != null ? _b : "start"], justifyContent[(_c = column.align) != null ? _c : "start"], InfiniteTableCellClassName, CellCls2, shifting ? `${InfiniteTableCellClassName}--shifting ${CellClsVariants.shifting}` : "")
|
|
4497
|
-
}), beforeChildren, cssEllipsis ? /* @__PURE__ */
|
|
4610
|
+
}), beforeChildren, cssEllipsis ? /* @__PURE__ */ createElement8("div", {
|
|
4498
4611
|
className: `${rootClassName2}Cell_content ${cssEllipsisClassName}`
|
|
4499
4612
|
}, children) : children, afterChildren);
|
|
4500
4613
|
}
|
|
@@ -4504,7 +4617,7 @@ var InfiniteTableCell = memo3(InfiniteTableCellFn);
|
|
|
4504
4617
|
var import_binary_search = __toModule(require_binary_search());
|
|
4505
4618
|
import {
|
|
4506
4619
|
useCallback as useCallback6,
|
|
4507
|
-
useMemo as
|
|
4620
|
+
useMemo as useMemo6,
|
|
4508
4621
|
useRef as useRef7,
|
|
4509
4622
|
useState as useState6
|
|
4510
4623
|
} from "react";
|
|
@@ -4551,8 +4664,8 @@ var useColumnPointerEvents = ({
|
|
|
4551
4664
|
const dragging = draggingDiff != null;
|
|
4552
4665
|
const { componentActions, computed } = useInfiniteTable();
|
|
4553
4666
|
const { computedColumnOrder } = computed;
|
|
4554
|
-
const column =
|
|
4555
|
-
const { columnIndex, columnWidth, columnsArray } =
|
|
4667
|
+
const column = useMemo6(() => columns.get(columnId), [columnId, columns]);
|
|
4668
|
+
const { columnIndex, columnWidth, columnsArray } = useMemo6(() => {
|
|
4556
4669
|
const columnsArray2 = Array.from(columns.values());
|
|
4557
4670
|
return {
|
|
4558
4671
|
columnsArray: columnsArray2,
|
|
@@ -4699,7 +4812,7 @@ import { createPortal } from "react-dom";
|
|
|
4699
4812
|
|
|
4700
4813
|
// src/components/InfiniteTable/components/icons/SortIcon.tsx
|
|
4701
4814
|
import {
|
|
4702
|
-
createElement as
|
|
4815
|
+
createElement as createElement9
|
|
4703
4816
|
} from "react";
|
|
4704
4817
|
import { useEffect as useEffect11, useState as useState7 } from "react";
|
|
4705
4818
|
var defaultLineStyle = {
|
|
@@ -4754,18 +4867,18 @@ function SortIcon(props) {
|
|
|
4754
4867
|
if (direction === -1) {
|
|
4755
4868
|
indexStyle.top = "100%";
|
|
4756
4869
|
}
|
|
4757
|
-
return /* @__PURE__ */
|
|
4870
|
+
return /* @__PURE__ */ createElement9("div", {
|
|
4758
4871
|
style: __spreadProps(__spreadValues({}, style), { width: size }),
|
|
4759
4872
|
className: join(className, "ITableIcon", "ITableIcon-sort")
|
|
4760
|
-
}, showIndex ? /* @__PURE__ */
|
|
4873
|
+
}, showIndex ? /* @__PURE__ */ createElement9("div", {
|
|
4761
4874
|
"data-name": "index",
|
|
4762
4875
|
style: indexStyle
|
|
4763
|
-
}, index) : null, /* @__PURE__ */
|
|
4876
|
+
}, index) : null, /* @__PURE__ */ createElement9("div", {
|
|
4764
4877
|
style: __spreadValues({ width: sizes[0] }, lineStyle),
|
|
4765
4878
|
onTransitionEnd
|
|
4766
|
-
}), /* @__PURE__ */
|
|
4879
|
+
}), /* @__PURE__ */ createElement9("div", {
|
|
4767
4880
|
style: __spreadValues({ width: sizes[1] }, lineStyle)
|
|
4768
|
-
}), /* @__PURE__ */
|
|
4881
|
+
}), /* @__PURE__ */ createElement9("div", {
|
|
4769
4882
|
style: __spreadValues({ width: sizes[2] }, lineStyle)
|
|
4770
4883
|
}));
|
|
4771
4884
|
}
|
|
@@ -4796,7 +4909,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
4796
4909
|
});
|
|
4797
4910
|
}
|
|
4798
4911
|
header = header != null ? header : column.name;
|
|
4799
|
-
const sortTool = /* @__PURE__ */
|
|
4912
|
+
const sortTool = /* @__PURE__ */ createElement10(SortIcon, {
|
|
4800
4913
|
index: column.computedMultiSort ? column.computedSortIndex + 1 : void 0,
|
|
4801
4914
|
className: `${baseCls}__sort-icon ${HeaderSortIconCls}`,
|
|
4802
4915
|
direction: column.computedSorted ? column.computedSortedAsc ? 1 : -1 : 0
|
|
@@ -4834,7 +4947,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
4834
4947
|
let offset = offsetFromProps != null ? offsetFromProps : virtualized ? 0 : column.computedPinningOffset;
|
|
4835
4948
|
let draggingProxy = null;
|
|
4836
4949
|
if (dragging) {
|
|
4837
|
-
draggingProxy = /* @__PURE__ */
|
|
4950
|
+
draggingProxy = /* @__PURE__ */ createElement10("div", {
|
|
4838
4951
|
className: `${baseCls}Proxy ${HeaderCellProxy}`,
|
|
4839
4952
|
style: {
|
|
4840
4953
|
position: "absolute",
|
|
@@ -4847,7 +4960,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
4847
4960
|
}, header);
|
|
4848
4961
|
draggingProxy = createPortal(draggingProxy, portalDOMRef.current);
|
|
4849
4962
|
}
|
|
4850
|
-
return /* @__PURE__ */
|
|
4963
|
+
return /* @__PURE__ */ createElement10(Fragment2, null, /* @__PURE__ */ createElement10(InfiniteTableCell, {
|
|
4851
4964
|
domRef: ref,
|
|
4852
4965
|
column,
|
|
4853
4966
|
"data-name": `HeaderCell`,
|
|
@@ -4864,7 +4977,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
4864
4977
|
|
|
4865
4978
|
// src/components/RawList/index.tsx
|
|
4866
4979
|
import {
|
|
4867
|
-
createElement as
|
|
4980
|
+
createElement as createElement13,
|
|
4868
4981
|
memo as memo5
|
|
4869
4982
|
} from "react";
|
|
4870
4983
|
import { useEffect as useEffect13 } from "react";
|
|
@@ -4872,7 +4985,7 @@ import { useEffect as useEffect13 } from "react";
|
|
|
4872
4985
|
// src/components/RawList/AvoidReactDiff.tsx
|
|
4873
4986
|
import {
|
|
4874
4987
|
Fragment as Fragment3,
|
|
4875
|
-
createElement as
|
|
4988
|
+
createElement as createElement11,
|
|
4876
4989
|
memo as memo4
|
|
4877
4990
|
} from "react";
|
|
4878
4991
|
import { useLayoutEffect as useLayoutEffect3, useState as useState8 } from "react";
|
|
@@ -4884,16 +4997,16 @@ function AvoidReactDiffFn(props) {
|
|
|
4884
4997
|
});
|
|
4885
4998
|
return remove;
|
|
4886
4999
|
}, [props.updater]);
|
|
4887
|
-
return /* @__PURE__ */
|
|
5000
|
+
return /* @__PURE__ */ createElement11(Fragment3, null, children);
|
|
4888
5001
|
}
|
|
4889
5002
|
var AvoidReactDiff = memo4(AvoidReactDiffFn);
|
|
4890
5003
|
|
|
4891
5004
|
// src/components/RawList/useVirtualRenderer.ts
|
|
4892
|
-
import { useMemo as
|
|
5005
|
+
import { useMemo as useMemo7 } from "react";
|
|
4893
5006
|
|
|
4894
5007
|
// src/components/RawList/ReactVirtualRenderer.tsx
|
|
4895
5008
|
import {
|
|
4896
|
-
createElement as
|
|
5009
|
+
createElement as createElement12
|
|
4897
5010
|
} from "react";
|
|
4898
5011
|
|
|
4899
5012
|
// src/components/RawList/MappedItems.ts
|
|
@@ -5139,7 +5252,7 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
5139
5252
|
};
|
|
5140
5253
|
this.itemDOMRefs[elementIndex] = domRef;
|
|
5141
5254
|
this.updaters[elementIndex] = buildSubscriptionCallback();
|
|
5142
|
-
const item = /* @__PURE__ */
|
|
5255
|
+
const item = /* @__PURE__ */ createElement12(AvoidReactDiff, {
|
|
5143
5256
|
key: elementIndex,
|
|
5144
5257
|
name: `${elementIndex}`,
|
|
5145
5258
|
updater: this.updaters[elementIndex]
|
|
@@ -5205,7 +5318,7 @@ function createRenderer(brain) {
|
|
|
5205
5318
|
function useVirtualRenderer({
|
|
5206
5319
|
brain
|
|
5207
5320
|
}) {
|
|
5208
|
-
return
|
|
5321
|
+
return useMemo7(() => {
|
|
5209
5322
|
return createRenderer(brain);
|
|
5210
5323
|
}, [brain]);
|
|
5211
5324
|
}
|
|
@@ -5236,7 +5349,7 @@ function RawListFn(props) {
|
|
|
5236
5349
|
});
|
|
5237
5350
|
return remove;
|
|
5238
5351
|
}, [brain, onRenderUpdater]);
|
|
5239
|
-
return /* @__PURE__ */
|
|
5352
|
+
return /* @__PURE__ */ createElement13(AvoidReactDiff, {
|
|
5240
5353
|
updater: onRenderUpdater
|
|
5241
5354
|
});
|
|
5242
5355
|
}
|
|
@@ -5261,7 +5374,7 @@ function InfiniteTableHeaderFn(props) {
|
|
|
5261
5374
|
}
|
|
5262
5375
|
return null;
|
|
5263
5376
|
}
|
|
5264
|
-
return /* @__PURE__ */
|
|
5377
|
+
return /* @__PURE__ */ createElement14(InfiniteTableHeaderCell, {
|
|
5265
5378
|
domRef: domRef2,
|
|
5266
5379
|
column,
|
|
5267
5380
|
headerHeight,
|
|
@@ -5286,7 +5399,7 @@ function InfiniteTableHeaderFn(props) {
|
|
|
5286
5399
|
className: join(TableHeaderClassName, `${TableHeaderClassName}--virtualized`, className, headerCls),
|
|
5287
5400
|
style
|
|
5288
5401
|
};
|
|
5289
|
-
return /* @__PURE__ */
|
|
5402
|
+
return /* @__PURE__ */ createElement14("div", __spreadValues({}, domProps), /* @__PURE__ */ createElement14(RawList, {
|
|
5290
5403
|
brain,
|
|
5291
5404
|
renderItem: renderColumn
|
|
5292
5405
|
}));
|
|
@@ -5295,15 +5408,15 @@ var InfiniteTableHeader = memo6(InfiniteTableHeaderFn);
|
|
|
5295
5408
|
|
|
5296
5409
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderUnvirtualized.tsx
|
|
5297
5410
|
import {
|
|
5298
|
-
createElement as
|
|
5411
|
+
createElement as createElement17,
|
|
5299
5412
|
memo as memo7,
|
|
5300
|
-
useMemo as
|
|
5413
|
+
useMemo as useMemo8,
|
|
5301
5414
|
useRef as useRef10
|
|
5302
5415
|
} from "react";
|
|
5303
5416
|
|
|
5304
5417
|
// src/components/InfiniteTable/components/InfiniteTableHeader/renderColumnHeaderGroups.tsx
|
|
5305
5418
|
import {
|
|
5306
|
-
createElement as
|
|
5419
|
+
createElement as createElement16
|
|
5307
5420
|
} from "react";
|
|
5308
5421
|
|
|
5309
5422
|
// src/components/InfiniteTable/components/InfiniteTableHeader/buildColumnAndGroupTree.ts
|
|
@@ -5395,7 +5508,7 @@ function assignGroupOffsetsAndComputedWidths(items, groupOffset = 0) {
|
|
|
5395
5508
|
|
|
5396
5509
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
|
|
5397
5510
|
import {
|
|
5398
|
-
createElement as
|
|
5511
|
+
createElement as createElement15
|
|
5399
5512
|
} from "react";
|
|
5400
5513
|
var TableHeaderGroupClassName = `${rootClassName}HeaderGroup`;
|
|
5401
5514
|
function InfiniteTableHeaderGroup(props) {
|
|
@@ -5410,16 +5523,16 @@ function InfiniteTableHeaderGroup(props) {
|
|
|
5410
5523
|
width: columnGroup.computedWidth,
|
|
5411
5524
|
height
|
|
5412
5525
|
};
|
|
5413
|
-
return /* @__PURE__ */
|
|
5526
|
+
return /* @__PURE__ */ createElement15("div", {
|
|
5414
5527
|
"data-group-id": columnGroup.id,
|
|
5415
5528
|
className: join(HeaderGroupCls, TableHeaderGroupClassName, `${TableHeaderGroupClassName}--unvirtualized`),
|
|
5416
5529
|
style
|
|
5417
|
-
}, /* @__PURE__ */
|
|
5530
|
+
}, /* @__PURE__ */ createElement15("div", {
|
|
5418
5531
|
className: join(`${TableHeaderGroupClassName}__header`, HeaderGroup_Header),
|
|
5419
5532
|
style: { height: headerHeight }
|
|
5420
|
-
}, /* @__PURE__ */
|
|
5533
|
+
}, /* @__PURE__ */ createElement15("div", {
|
|
5421
5534
|
className: join(`${TableHeaderGroupClassName}__header-content`, cssEllipsisClassName)
|
|
5422
|
-
}, header)), /* @__PURE__ */
|
|
5535
|
+
}, header)), /* @__PURE__ */ createElement15("div", {
|
|
5423
5536
|
className: join(`${TableHeaderGroupClassName}__children`, HeaderGroup_Children)
|
|
5424
5537
|
}, props.children));
|
|
5425
5538
|
}
|
|
@@ -5442,7 +5555,7 @@ function renderColumnHeaderGroups(config) {
|
|
|
5442
5555
|
return items2.map((colGroupItem) => {
|
|
5443
5556
|
if (colGroupItem.type === "column") {
|
|
5444
5557
|
const col = colGroupItem.ref;
|
|
5445
|
-
return /* @__PURE__ */
|
|
5558
|
+
return /* @__PURE__ */ createElement16(InfiniteTableHeaderCell, {
|
|
5446
5559
|
key: col.id,
|
|
5447
5560
|
headerHeight: (columnGroupsMaxDepth - colGroupItem.depth + 2) * headerHeight,
|
|
5448
5561
|
column: col,
|
|
@@ -5456,7 +5569,7 @@ function renderColumnHeaderGroups(config) {
|
|
|
5456
5569
|
colIds.push(col.id);
|
|
5457
5570
|
return col;
|
|
5458
5571
|
});
|
|
5459
|
-
return /* @__PURE__ */
|
|
5572
|
+
return /* @__PURE__ */ createElement16(InfiniteTableHeaderGroup, {
|
|
5460
5573
|
key: `${colGroupItem.uniqueGroupId.join("/")}`,
|
|
5461
5574
|
columns: columns2,
|
|
5462
5575
|
height: (columnGroupsMaxDepth - colGroupItem.depth + 2) * headerHeight,
|
|
@@ -5511,7 +5624,7 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
|
|
|
5511
5624
|
} = useInfiniteTable();
|
|
5512
5625
|
const domRef = useRef10(null);
|
|
5513
5626
|
const hasColumnGroups = computedColumnGroups.size > 0;
|
|
5514
|
-
const columnHeaderGroups =
|
|
5627
|
+
const columnHeaderGroups = useMemo8(() => {
|
|
5515
5628
|
return hasColumnGroups ? renderColumnHeaderGroups({
|
|
5516
5629
|
columnGroups: computedColumnGroups,
|
|
5517
5630
|
columnGroupsDepthsMap,
|
|
@@ -5530,7 +5643,7 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
|
|
|
5530
5643
|
columnGroupsMaxDepth
|
|
5531
5644
|
]);
|
|
5532
5645
|
const children = hasColumnGroups ? columnHeaderGroups : columns.map((c) => {
|
|
5533
|
-
return /* @__PURE__ */
|
|
5646
|
+
return /* @__PURE__ */ createElement17(InfiniteTableHeaderCell, {
|
|
5534
5647
|
key: c.id,
|
|
5535
5648
|
headerHeight,
|
|
5536
5649
|
column: c,
|
|
@@ -5553,14 +5666,14 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
|
|
|
5553
5666
|
const removeOnScroll = scroller.onScroll(onScroll);
|
|
5554
5667
|
return removeOnScroll;
|
|
5555
5668
|
}, [brain, scrollListener]);
|
|
5556
|
-
return /* @__PURE__ */
|
|
5669
|
+
return /* @__PURE__ */ createElement17("div", __spreadProps(__spreadValues({}, domProps), {
|
|
5557
5670
|
className: join(TableHeaderClassName2, `${TableHeaderClassName2}--unvirtualized`, pinning ? `${TableHeaderClassName2}--pinned ${TableHeaderClassName2}-${pinning}` : "", scrollable ? `${TableHeaderClassName2}--overflow` : "", domProps.className, HeaderClsRecipe({
|
|
5558
5671
|
pinned: pinning,
|
|
5559
5672
|
virtualized: false,
|
|
5560
5673
|
overflow: scrollable
|
|
5561
5674
|
})),
|
|
5562
5675
|
style
|
|
5563
|
-
}), /* @__PURE__ */
|
|
5676
|
+
}), /* @__PURE__ */ createElement17("div", {
|
|
5564
5677
|
style: { width: totalWidth },
|
|
5565
5678
|
className: join(flexFlow.row, display.flex),
|
|
5566
5679
|
ref: domRef
|
|
@@ -5599,7 +5712,7 @@ function TableHeaderWrapper(props) {
|
|
|
5599
5712
|
const unvirtualizedStyle = !virtualizeHeader && computedPinnedStartColumnsWidth ? {
|
|
5600
5713
|
left: computedPinnedStartWidth
|
|
5601
5714
|
} : void 0;
|
|
5602
|
-
const header = virtualizeHeader ? /* @__PURE__ */
|
|
5715
|
+
const header = virtualizeHeader ? /* @__PURE__ */ createElement18(InfiniteTableHeader, {
|
|
5603
5716
|
columns: computedUnpinnedColumns,
|
|
5604
5717
|
repaintId: virtualizeHeader ? repaintId : void 0,
|
|
5605
5718
|
brain,
|
|
@@ -5612,7 +5725,7 @@ function TableHeaderWrapper(props) {
|
|
|
5612
5725
|
},
|
|
5613
5726
|
availableWidth: computedUnpinnedColumnsWidth,
|
|
5614
5727
|
totalWidth: computedUnpinnedColumnsWidth
|
|
5615
|
-
}) : /* @__PURE__ */
|
|
5728
|
+
}) : /* @__PURE__ */ createElement18(InfiniteTableHeaderUnvirtualized, {
|
|
5616
5729
|
style: unvirtualizedStyle,
|
|
5617
5730
|
brain,
|
|
5618
5731
|
scrollable: true,
|
|
@@ -5621,12 +5734,12 @@ function TableHeaderWrapper(props) {
|
|
|
5621
5734
|
availableWidth: computedUnpinnedColumnsWidth,
|
|
5622
5735
|
totalWidth: computedUnpinnedColumnsWidth
|
|
5623
5736
|
});
|
|
5624
|
-
return /* @__PURE__ */
|
|
5737
|
+
return /* @__PURE__ */ createElement18("div", {
|
|
5625
5738
|
className: HeaderWrapperCls,
|
|
5626
5739
|
style: {
|
|
5627
5740
|
height: virtualizeHeader ? height : void 0
|
|
5628
5741
|
}
|
|
5629
|
-
}, hasPinnedStart ? /* @__PURE__ */
|
|
5742
|
+
}, hasPinnedStart ? /* @__PURE__ */ createElement18(InfiniteTableHeaderUnvirtualized, {
|
|
5630
5743
|
style: {
|
|
5631
5744
|
left: 0,
|
|
5632
5745
|
position: "absolute",
|
|
@@ -5638,7 +5751,7 @@ function TableHeaderWrapper(props) {
|
|
|
5638
5751
|
scrollable: computedPinnedStartOverflow,
|
|
5639
5752
|
pinning: "start",
|
|
5640
5753
|
scrollListener: computedPinnedStartOverflow ? pinnedStartScrollListener : void 0
|
|
5641
|
-
}) : null, header, hasPinnedEnd ? /* @__PURE__ */
|
|
5754
|
+
}) : null, header, hasPinnedEnd ? /* @__PURE__ */ createElement18(InfiniteTableHeaderUnvirtualized, {
|
|
5642
5755
|
style: {
|
|
5643
5756
|
right: scrollbars.vertical ? getScrollbarWidth() : 0,
|
|
5644
5757
|
position: "absolute",
|
|
@@ -5650,7 +5763,7 @@ function TableHeaderWrapper(props) {
|
|
|
5650
5763
|
scrollable: computedPinnedEndOverflow,
|
|
5651
5764
|
pinning: "end",
|
|
5652
5765
|
scrollListener: computedPinnedEndOverflow ? pinnedEndScrollListener : void 0
|
|
5653
|
-
}) : null, scrollbars.vertical ? /* @__PURE__ */
|
|
5766
|
+
}) : null, scrollbars.vertical ? /* @__PURE__ */ createElement18(VerticalScrollbarPlaceholder, {
|
|
5654
5767
|
style: {
|
|
5655
5768
|
height: "100%",
|
|
5656
5769
|
right: 0
|
|
@@ -5660,7 +5773,7 @@ function TableHeaderWrapper(props) {
|
|
|
5660
5773
|
|
|
5661
5774
|
// src/components/VirtualScrollContainer/index.tsx
|
|
5662
5775
|
import {
|
|
5663
|
-
createElement as
|
|
5776
|
+
createElement as createElement19,
|
|
5664
5777
|
forwardRef as forwardRef2
|
|
5665
5778
|
} from "react";
|
|
5666
5779
|
import { useRef as useRef11 } from "react";
|
|
@@ -5716,7 +5829,7 @@ var VirtualScrollContainer = forwardRef2(function VirtualScrollContainer2(props,
|
|
|
5716
5829
|
} = props;
|
|
5717
5830
|
const domRef = ref != null ? ref : useRef11(null);
|
|
5718
5831
|
useOnScroll(domRef, onContainerScroll);
|
|
5719
|
-
return /* @__PURE__ */
|
|
5832
|
+
return /* @__PURE__ */ createElement19("div", {
|
|
5720
5833
|
ref: domRef,
|
|
5721
5834
|
style,
|
|
5722
5835
|
className: join(className, rootClassName6, VirtualScrollContainerCls, getScrollableClassName(scrollable))
|
|
@@ -5725,7 +5838,7 @@ var VirtualScrollContainer = forwardRef2(function VirtualScrollContainer2(props,
|
|
|
5725
5838
|
|
|
5726
5839
|
// src/components/VirtualList/SpacePlaceholder.tsx
|
|
5727
5840
|
import {
|
|
5728
|
-
createElement as
|
|
5841
|
+
createElement as createElement20,
|
|
5729
5842
|
memo as memo8
|
|
5730
5843
|
} from "react";
|
|
5731
5844
|
function SpacePlaceholderFn(props) {
|
|
@@ -5737,7 +5850,7 @@ function SpacePlaceholderFn(props) {
|
|
|
5737
5850
|
opacity: 0,
|
|
5738
5851
|
pointerEvents: "none"
|
|
5739
5852
|
};
|
|
5740
|
-
return /* @__PURE__ */
|
|
5853
|
+
return /* @__PURE__ */ createElement20("div", {
|
|
5741
5854
|
"data-count": count,
|
|
5742
5855
|
"data-placeholder-width": true ? width : void 0,
|
|
5743
5856
|
"data-placeholder-height": true ? height : void 0,
|
|
@@ -5748,24 +5861,24 @@ function SpacePlaceholderFn(props) {
|
|
|
5748
5861
|
var SpacePlaceholder = memo8(SpacePlaceholderFn);
|
|
5749
5862
|
|
|
5750
5863
|
// src/components/InfiniteTable/hooks/useListRendering.tsx
|
|
5751
|
-
import {
|
|
5864
|
+
import { useEffect as useEffect22, useMemo as useMemo11, useRef as useRef17 } from "react";
|
|
5752
5865
|
|
|
5753
5866
|
// src/components/InfiniteTable/hooks/useUnpinnedRendering.tsx
|
|
5754
5867
|
import {
|
|
5755
|
-
createElement as
|
|
5868
|
+
createElement as createElement26
|
|
5756
5869
|
} from "react";
|
|
5757
5870
|
import { useCallback as useCallback12 } from "react";
|
|
5758
5871
|
|
|
5759
5872
|
// src/components/VirtualList/VirtualRowList.tsx
|
|
5760
5873
|
import {
|
|
5761
|
-
createElement as
|
|
5874
|
+
createElement as createElement22,
|
|
5762
5875
|
useCallback as useCallback9
|
|
5763
5876
|
} from "react";
|
|
5764
5877
|
|
|
5765
5878
|
// src/components/VirtualList/VirtualList.tsx
|
|
5766
5879
|
import {
|
|
5767
5880
|
Fragment as Fragment4,
|
|
5768
|
-
createElement as
|
|
5881
|
+
createElement as createElement21
|
|
5769
5882
|
} from "react";
|
|
5770
5883
|
import { useRef as useRef12, useEffect as useEffect17, useState as useState9 } from "react";
|
|
5771
5884
|
|
|
@@ -5848,19 +5961,19 @@ var VirtualList = (props) => {
|
|
|
5848
5961
|
if (true) {
|
|
5849
5962
|
domProps["data-cmp-name"] = `VirtualList`;
|
|
5850
5963
|
}
|
|
5851
|
-
return /* @__PURE__ */
|
|
5964
|
+
return /* @__PURE__ */ createElement21(Fragment4, null, /* @__PURE__ */ createElement21("div", __spreadValues({}, domProps), /* @__PURE__ */ createElement21(VirtualScrollContainer, {
|
|
5852
5965
|
scrollable,
|
|
5853
5966
|
onContainerScroll
|
|
5854
|
-
}, /* @__PURE__ */
|
|
5967
|
+
}, /* @__PURE__ */ createElement21("div", {
|
|
5855
5968
|
ref: domRef,
|
|
5856
5969
|
className: scrollTransformTargetCls,
|
|
5857
5970
|
"data-name": "scroll-transform-target"
|
|
5858
|
-
}, /* @__PURE__ */
|
|
5971
|
+
}, /* @__PURE__ */ createElement21(RawList, {
|
|
5859
5972
|
brain: virtualBrain,
|
|
5860
5973
|
renderItem,
|
|
5861
5974
|
repaintId,
|
|
5862
5975
|
debugChannel: "VirtualList-" + mainAxis
|
|
5863
|
-
})), children, /* @__PURE__ */
|
|
5976
|
+
})), children, /* @__PURE__ */ createElement21(SpacePlaceholder, {
|
|
5864
5977
|
count,
|
|
5865
5978
|
width,
|
|
5866
5979
|
height
|
|
@@ -5877,7 +5990,7 @@ var VirtualRowList = (props) => {
|
|
|
5877
5990
|
rowIndex: renderProps.itemIndex
|
|
5878
5991
|
});
|
|
5879
5992
|
}, [renderRow]);
|
|
5880
|
-
return /* @__PURE__ */
|
|
5993
|
+
return /* @__PURE__ */ createElement22(VirtualList, __spreadProps(__spreadValues({}, listProps), {
|
|
5881
5994
|
renderItem,
|
|
5882
5995
|
mainAxis: "vertical",
|
|
5883
5996
|
itemMainAxisSize: rowHeight,
|
|
@@ -5887,7 +6000,7 @@ var VirtualRowList = (props) => {
|
|
|
5887
6000
|
|
|
5888
6001
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRow.tsx
|
|
5889
6002
|
import {
|
|
5890
|
-
createElement as
|
|
6003
|
+
createElement as createElement24,
|
|
5891
6004
|
memo as memo10,
|
|
5892
6005
|
useCallback as useCallback11
|
|
5893
6006
|
} from "react";
|
|
@@ -5895,7 +6008,7 @@ import { useRef as useRef14 } from "react";
|
|
|
5895
6008
|
|
|
5896
6009
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx
|
|
5897
6010
|
import {
|
|
5898
|
-
createElement as
|
|
6011
|
+
createElement as createElement23,
|
|
5899
6012
|
memo as memo9
|
|
5900
6013
|
} from "react";
|
|
5901
6014
|
var { rootClassName: rootClassName8 } = internalProps;
|
|
@@ -5954,7 +6067,8 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
5954
6067
|
rowIndex,
|
|
5955
6068
|
toggleGroupRow,
|
|
5956
6069
|
toggleCurrentGroupRow: () => toggleGroupRow(rowInfo.groupKeys),
|
|
5957
|
-
groupBy: computedDataSource.groupBy
|
|
6070
|
+
groupBy: computedDataSource.groupBy,
|
|
6071
|
+
pivotBy: computedDataSource.pivotBy
|
|
5958
6072
|
});
|
|
5959
6073
|
if (column.render) {
|
|
5960
6074
|
renderValue = column.render(renderParam);
|
|
@@ -5990,7 +6104,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
5990
6104
|
}
|
|
5991
6105
|
}
|
|
5992
6106
|
}
|
|
5993
|
-
return /* @__PURE__ */
|
|
6107
|
+
return /* @__PURE__ */ createElement23(InfiniteTableCell, __spreadProps(__spreadValues({
|
|
5994
6108
|
domRef,
|
|
5995
6109
|
offsetProperty
|
|
5996
6110
|
}, dataset), {
|
|
@@ -6140,7 +6254,7 @@ function InfiniteTableRowFn(props) {
|
|
|
6140
6254
|
if (!column) {
|
|
6141
6255
|
}
|
|
6142
6256
|
const hidden = false;
|
|
6143
|
-
return /* @__PURE__ */
|
|
6257
|
+
return /* @__PURE__ */ createElement24(InfiniteTableColumnCell, {
|
|
6144
6258
|
getData,
|
|
6145
6259
|
rowInfo,
|
|
6146
6260
|
groupRenderStrategy,
|
|
@@ -6167,9 +6281,9 @@ function InfiniteTableRowFn(props) {
|
|
|
6167
6281
|
if (true) {
|
|
6168
6282
|
domProps["data-cmp-name"] = "ITableRow";
|
|
6169
6283
|
}
|
|
6170
|
-
return /* @__PURE__ */
|
|
6284
|
+
return /* @__PURE__ */ createElement24("div", __spreadProps(__spreadValues({}, domProps), {
|
|
6171
6285
|
style
|
|
6172
|
-
}), /* @__PURE__ */
|
|
6286
|
+
}), /* @__PURE__ */ createElement24(RawList, {
|
|
6173
6287
|
brain,
|
|
6174
6288
|
renderItem: renderCell,
|
|
6175
6289
|
debugChannel: `${rowIndex}`
|
|
@@ -6179,7 +6293,7 @@ var InfiniteTableRow = memo10(InfiniteTableRowFn);
|
|
|
6179
6293
|
|
|
6180
6294
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowUnvirtualized.tsx
|
|
6181
6295
|
import {
|
|
6182
|
-
createElement as
|
|
6296
|
+
createElement as createElement25,
|
|
6183
6297
|
memo as memo11
|
|
6184
6298
|
} from "react";
|
|
6185
6299
|
function TableRowUnvirtualizedFn(props) {
|
|
@@ -6202,7 +6316,7 @@ function TableRowUnvirtualizedFn(props) {
|
|
|
6202
6316
|
}, domProps.style);
|
|
6203
6317
|
const children = columns.map((col) => {
|
|
6204
6318
|
const hidden = false;
|
|
6205
|
-
return /* @__PURE__ */
|
|
6319
|
+
return /* @__PURE__ */ createElement25(InfiniteTableColumnCell, {
|
|
6206
6320
|
key: col.id,
|
|
6207
6321
|
virtualized: false,
|
|
6208
6322
|
rowHeight,
|
|
@@ -6215,7 +6329,7 @@ function TableRowUnvirtualizedFn(props) {
|
|
|
6215
6329
|
column: col
|
|
6216
6330
|
});
|
|
6217
6331
|
});
|
|
6218
|
-
return /* @__PURE__ */
|
|
6332
|
+
return /* @__PURE__ */ createElement25("div", __spreadProps(__spreadValues({}, domProps), {
|
|
6219
6333
|
style
|
|
6220
6334
|
}), children);
|
|
6221
6335
|
}
|
|
@@ -6262,7 +6376,7 @@ function useUnpinnedRendering(params) {
|
|
|
6262
6376
|
rowProps.repaintId = repaintId;
|
|
6263
6377
|
}
|
|
6264
6378
|
const TableRowComponent = shouldVirtualizeColumns ? InfiniteTableRow : TableRowUnvirtualized;
|
|
6265
|
-
return /* @__PURE__ */
|
|
6379
|
+
return /* @__PURE__ */ createElement26(TableRowComponent, __spreadValues({}, rowProps));
|
|
6266
6380
|
}, [
|
|
6267
6381
|
repaintId,
|
|
6268
6382
|
rowHeight,
|
|
@@ -6272,7 +6386,7 @@ function useUnpinnedRendering(params) {
|
|
|
6272
6386
|
horizontalVirtualBrain,
|
|
6273
6387
|
verticalVirtualBrain
|
|
6274
6388
|
]);
|
|
6275
|
-
const fakeScrollbar = getScrollbarWidth() ? /* @__PURE__ */
|
|
6389
|
+
const fakeScrollbar = getScrollbarWidth() ? /* @__PURE__ */ createElement26("div", {
|
|
6276
6390
|
"data-name": "horizontal-scrollbar-placeholder--fake",
|
|
6277
6391
|
style: {
|
|
6278
6392
|
position: "absolute",
|
|
@@ -6283,10 +6397,10 @@ function useUnpinnedRendering(params) {
|
|
|
6283
6397
|
overflow: "auto",
|
|
6284
6398
|
visibility: columnShifts ? "visible" : "hidden"
|
|
6285
6399
|
}
|
|
6286
|
-
}, /* @__PURE__ */
|
|
6400
|
+
}, /* @__PURE__ */ createElement26("div", {
|
|
6287
6401
|
style: { height: "100%", width: computedUnpinnedColumnsWidth }
|
|
6288
6402
|
})) : null;
|
|
6289
|
-
return rowHeight != 0 ? /* @__PURE__ */
|
|
6403
|
+
return rowHeight != 0 ? /* @__PURE__ */ createElement26(VirtualRowList, {
|
|
6290
6404
|
repaintId: `${repaintId}-unpinned-`,
|
|
6291
6405
|
brain: verticalVirtualBrain,
|
|
6292
6406
|
onContainerScroll: applyScrollHorizontal,
|
|
@@ -6430,14 +6544,14 @@ var useOnContainerScroll = ({
|
|
|
6430
6544
|
|
|
6431
6545
|
// src/components/InfiniteTable/hooks/usePinnedRendering.tsx
|
|
6432
6546
|
import {
|
|
6433
|
-
createElement as
|
|
6434
|
-
useMemo as
|
|
6547
|
+
createElement as createElement28,
|
|
6548
|
+
useMemo as useMemo9
|
|
6435
6549
|
} from "react";
|
|
6436
6550
|
import { useCallback as useCallback15 } from "react";
|
|
6437
6551
|
|
|
6438
6552
|
// src/components/VirtualList/RowListWithExternalScrolling.tsx
|
|
6439
6553
|
import {
|
|
6440
|
-
createElement as
|
|
6554
|
+
createElement as createElement27
|
|
6441
6555
|
} from "react";
|
|
6442
6556
|
import { useEffect as useEffect20, useCallback as useCallback14, useRef as useRef16 } from "react";
|
|
6443
6557
|
|
|
@@ -6514,7 +6628,7 @@ var RowListWithExternalScrolling = (props) => {
|
|
|
6514
6628
|
if (true) {
|
|
6515
6629
|
domProps["data-cmp-name"] = "RowListWithExternalScrolling";
|
|
6516
6630
|
}
|
|
6517
|
-
return /* @__PURE__ */
|
|
6631
|
+
return /* @__PURE__ */ createElement27("div", __spreadValues({}, domProps), /* @__PURE__ */ createElement27(RawList, {
|
|
6518
6632
|
brain,
|
|
6519
6633
|
renderItem,
|
|
6520
6634
|
repaintId
|
|
@@ -6537,7 +6651,7 @@ function PinnedRowsContainer(props) {
|
|
|
6537
6651
|
brain,
|
|
6538
6652
|
renderRow
|
|
6539
6653
|
} = props;
|
|
6540
|
-
const style =
|
|
6654
|
+
const style = useMemo9(() => {
|
|
6541
6655
|
const result = pinning === "end" ? {
|
|
6542
6656
|
width: rowWidth,
|
|
6543
6657
|
height,
|
|
@@ -6563,7 +6677,7 @@ function PinnedRowsContainer(props) {
|
|
|
6563
6677
|
className: join(`${PinnedRowsContainerClassName}`, PinnedRowsClsVariants[pinning === "start" ? "pinnedStart" : "pinnedEnd"], `${PinnedRowsContainerClassName}--pinned-${pinning}`, `${PinnedRowsContainerClassName}--overflow`, PinnedRowsClsVariants.overflow)
|
|
6564
6678
|
};
|
|
6565
6679
|
if (hasOverflow) {
|
|
6566
|
-
return /* @__PURE__ */
|
|
6680
|
+
return /* @__PURE__ */ createElement28(VirtualScrollContainer, {
|
|
6567
6681
|
scrollable: {
|
|
6568
6682
|
horizontal: true,
|
|
6569
6683
|
vertical: false
|
|
@@ -6579,18 +6693,18 @@ function PinnedRowsContainer(props) {
|
|
|
6579
6693
|
className: join(PinnedRowsContainerClsVariants({
|
|
6580
6694
|
pinned: pinning
|
|
6581
6695
|
}), `${PinnedRowsContainerClassName}Container`, `${PinnedRowsContainerClassName}Container--pinned-${pinning}`)
|
|
6582
|
-
}, /* @__PURE__ */
|
|
6696
|
+
}, /* @__PURE__ */ createElement28(RowListWithExternalScrolling, __spreadProps(__spreadValues({}, rowListProps), {
|
|
6583
6697
|
onMount: (node) => {
|
|
6584
6698
|
pinnedScrollListener == null ? void 0 : pinnedScrollListener.onScroll((scrollPosition) => {
|
|
6585
6699
|
updateScroll(node, brain.getScrollPosition(), scrollPosition);
|
|
6586
6700
|
});
|
|
6587
6701
|
}
|
|
6588
|
-
})), /* @__PURE__ */
|
|
6702
|
+
})), /* @__PURE__ */ createElement28(SpacePlaceholder, {
|
|
6589
6703
|
width: rowWidth,
|
|
6590
6704
|
height: 1
|
|
6591
6705
|
}));
|
|
6592
6706
|
}
|
|
6593
|
-
return /* @__PURE__ */
|
|
6707
|
+
return /* @__PURE__ */ createElement28(RowListWithExternalScrolling, __spreadValues({}, rowListProps));
|
|
6594
6708
|
}
|
|
6595
6709
|
function useRenderPinnedRow(params) {
|
|
6596
6710
|
const { getData, getState, columnsWidth, columns, verticalBrain } = params;
|
|
@@ -6610,7 +6724,7 @@ function useRenderPinnedRow(params) {
|
|
|
6610
6724
|
rowWidth: columnsWidth,
|
|
6611
6725
|
columns
|
|
6612
6726
|
}, rowParams);
|
|
6613
|
-
return /* @__PURE__ */
|
|
6727
|
+
return /* @__PURE__ */ createElement28(TableRowUnvirtualized, __spreadValues({}, rowProps));
|
|
6614
6728
|
}, [columnsWidth, columns, verticalBrain]);
|
|
6615
6729
|
return renderPinnedRow;
|
|
6616
6730
|
}
|
|
@@ -6653,7 +6767,7 @@ function usePinnedRenderingForSide(side, params) {
|
|
|
6653
6767
|
columns,
|
|
6654
6768
|
columnsWidth
|
|
6655
6769
|
});
|
|
6656
|
-
const pinnedList = columns.length && rowHeight !== 0 ? /* @__PURE__ */
|
|
6770
|
+
const pinnedList = columns.length && rowHeight !== 0 ? /* @__PURE__ */ createElement28(PinnedRowsContainer, {
|
|
6657
6771
|
pinning: side,
|
|
6658
6772
|
pinnedScrollListener,
|
|
6659
6773
|
hasOverflow,
|
|
@@ -6666,7 +6780,7 @@ function usePinnedRenderingForSide(side, params) {
|
|
|
6666
6780
|
brain: verticalVirtualBrain,
|
|
6667
6781
|
renderRow: renderRowPinned
|
|
6668
6782
|
}) : null;
|
|
6669
|
-
const pinnedScrollbarPlaceholder = pinnedList && hasHorizontalScrollbar && !hasOverflow ? /* @__PURE__ */
|
|
6783
|
+
const pinnedScrollbarPlaceholder = pinnedList && hasHorizontalScrollbar && !hasOverflow ? /* @__PURE__ */ createElement28(HorizontalScrollbarPlaceholder, {
|
|
6670
6784
|
style: side === "end" ? {
|
|
6671
6785
|
width: columnsWidth,
|
|
6672
6786
|
right: hasVerticalScrollbar ? getScrollbarWidth() : 0
|
|
@@ -6711,9 +6825,9 @@ function usePinnedStartRendering(params) {
|
|
|
6711
6825
|
import { useEffect as useEffect21 } from "react";
|
|
6712
6826
|
|
|
6713
6827
|
// src/components/hooks/useOnce.ts
|
|
6714
|
-
import { useMemo as
|
|
6828
|
+
import { useMemo as useMemo10 } from "react";
|
|
6715
6829
|
function useOnce(fn) {
|
|
6716
|
-
const onceFn =
|
|
6830
|
+
const onceFn = useMemo10(() => {
|
|
6717
6831
|
return once(fn);
|
|
6718
6832
|
}, []);
|
|
6719
6833
|
return onceFn();
|
|
@@ -7235,7 +7349,8 @@ function useListRendering(param) {
|
|
|
7235
7349
|
computedUnpinnedColumnsWidth,
|
|
7236
7350
|
computedPinnedStartOverflow,
|
|
7237
7351
|
computedPinnedEndOverflow,
|
|
7238
|
-
computedVisibleColumns
|
|
7352
|
+
computedVisibleColumns,
|
|
7353
|
+
toggleGroupRow
|
|
7239
7354
|
} = computed;
|
|
7240
7355
|
const { componentState: dataSourceState, getState: getDataSourceState } = useDataSourceContextValue();
|
|
7241
7356
|
const { dataArray } = dataSourceState;
|
|
@@ -7253,7 +7368,7 @@ function useListRendering(param) {
|
|
|
7253
7368
|
repaintIdRef.current++;
|
|
7254
7369
|
}
|
|
7255
7370
|
const repaintId = repaintIdRef.current;
|
|
7256
|
-
const rowSpan =
|
|
7371
|
+
const rowSpan = useMemo11(() => {
|
|
7257
7372
|
const colsWithRowspan = computedVisibleColumns.filter((col) => typeof col.rowspan === "function");
|
|
7258
7373
|
return colsWithRowspan.length ? ({ itemIndex }) => {
|
|
7259
7374
|
let maxSpan = 1;
|
|
@@ -7291,7 +7406,7 @@ function useListRendering(param) {
|
|
|
7291
7406
|
const hasHorizontalScrollbar = computedUnpinnedColumnsWidth > bodySize.width - computedPinnedStartColumnsWidth - computedPinnedEndColumnsWidth;
|
|
7292
7407
|
const reservedContentHeight = verticalVirtualBrain.getTotalSize() + (hasHorizontalScrollbar ? getScrollbarWidth() : 0);
|
|
7293
7408
|
const hasVerticalScrollbar = bodySize.height > 0 && bodySize.height < reservedContentHeight;
|
|
7294
|
-
const scrollbars =
|
|
7409
|
+
const scrollbars = useMemo11(() => ({
|
|
7295
7410
|
vertical: hasVerticalScrollbar,
|
|
7296
7411
|
horizontal: hasHorizontalScrollbar
|
|
7297
7412
|
}), [hasVerticalScrollbar, hasHorizontalScrollbar]);
|
|
@@ -7319,12 +7434,6 @@ function useListRendering(param) {
|
|
|
7319
7434
|
horizontalVirtualBrain,
|
|
7320
7435
|
reservedContentHeight
|
|
7321
7436
|
});
|
|
7322
|
-
const { componentActions: dataSourceActions } = useDataSourceContextValue();
|
|
7323
|
-
const toggleGroupRow = useCallback17((groupKeys) => {
|
|
7324
|
-
const newState = new GroupRowsState(getDataSourceState().groupRowsState);
|
|
7325
|
-
newState.toggleGroupRow(groupKeys);
|
|
7326
|
-
dataSourceActions.groupRowsState = newState;
|
|
7327
|
-
}, []);
|
|
7328
7437
|
const pinnedRenderingParams = {
|
|
7329
7438
|
bodySize,
|
|
7330
7439
|
scrollbars,
|
|
@@ -7379,9 +7488,9 @@ function useListRendering(param) {
|
|
|
7379
7488
|
|
|
7380
7489
|
// src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
|
|
7381
7490
|
import {
|
|
7382
|
-
createElement as
|
|
7491
|
+
createElement as createElement29,
|
|
7383
7492
|
forwardRef as forwardRef3,
|
|
7384
|
-
useCallback as
|
|
7493
|
+
useCallback as useCallback17,
|
|
7385
7494
|
useRef as useRef18
|
|
7386
7495
|
} from "react";
|
|
7387
7496
|
import { useEffect as useEffect23 } from "react";
|
|
@@ -7422,7 +7531,7 @@ var enforceStyle = (node, style) => {
|
|
|
7422
7531
|
var InfiniteTableLicenseFooter = forwardRef3(function InfiniteTableLicenseFooter2(props, ref) {
|
|
7423
7532
|
const { rootClassName: rootClassName12 } = useInternalProps();
|
|
7424
7533
|
const domRef = useRef18(null);
|
|
7425
|
-
const domCallback =
|
|
7534
|
+
const domCallback = useCallback17((node) => {
|
|
7426
7535
|
domRef.current = node;
|
|
7427
7536
|
if (!ref) {
|
|
7428
7537
|
return;
|
|
@@ -7447,12 +7556,12 @@ var InfiniteTableLicenseFooter = forwardRef3(function InfiniteTableLicenseFooter
|
|
|
7447
7556
|
clearInterval(intervalId);
|
|
7448
7557
|
};
|
|
7449
7558
|
}, []);
|
|
7450
|
-
return /* @__PURE__ */
|
|
7559
|
+
return /* @__PURE__ */ createElement29("div", __spreadProps(__spreadValues({
|
|
7451
7560
|
ref: domCallback
|
|
7452
7561
|
}, props), {
|
|
7453
7562
|
className: join(`${rootClassName12}-Footer`, FooterCls, props.className),
|
|
7454
7563
|
style: defaultStyle2
|
|
7455
|
-
}), "Powered by", " ", /* @__PURE__ */
|
|
7564
|
+
}), "Powered by", " ", /* @__PURE__ */ createElement29("a", {
|
|
7456
7565
|
href: "https://infinite-table.com",
|
|
7457
7566
|
rel: "noopener noreferrer",
|
|
7458
7567
|
role: "link",
|
|
@@ -7461,7 +7570,7 @@ var InfiniteTableLicenseFooter = forwardRef3(function InfiniteTableLicenseFooter
|
|
|
7461
7570
|
});
|
|
7462
7571
|
|
|
7463
7572
|
// src/components/InfiniteTable/hooks/useLicense/useLicense.ts
|
|
7464
|
-
import { useMemo as
|
|
7573
|
+
import { useMemo as useMemo12 } from "react";
|
|
7465
7574
|
|
|
7466
7575
|
// src/components/InfiniteTable/hooks/useLicense/crc32.ts
|
|
7467
7576
|
var DEFAULT_ReversedPolynomial = 3988292384;
|
|
@@ -7611,10 +7720,10 @@ var origin = typeof window !== "undefined" ? window.location.origin : "";
|
|
|
7611
7720
|
var [_fullUrl, protocol, sandboxUrl] = Array.from(SANDBOX_REGEX.exec(origin) || []);
|
|
7612
7721
|
var isInsideSandbox = protocol === "https" && sandboxUrl === "sandpack.codesandbox.io";
|
|
7613
7722
|
var useLicense = (licenseKey = "") => {
|
|
7614
|
-
const valid =
|
|
7723
|
+
const valid = useMemo12(() => {
|
|
7615
7724
|
let valid2 = isValidLicense(licenseKey, {
|
|
7616
7725
|
publishedAt: 1624970570587,
|
|
7617
|
-
version: "0.
|
|
7726
|
+
version: "0.2.3"
|
|
7618
7727
|
});
|
|
7619
7728
|
if (!licenseKey && !valid2 && isInsideSandbox) {
|
|
7620
7729
|
return true;
|
|
@@ -7626,8 +7735,8 @@ var useLicense = (licenseKey = "") => {
|
|
|
7626
7735
|
|
|
7627
7736
|
// src/components/CSSVariableWatch.tsx
|
|
7628
7737
|
import {
|
|
7629
|
-
createElement as
|
|
7630
|
-
useCallback as
|
|
7738
|
+
createElement as createElement30,
|
|
7739
|
+
useCallback as useCallback18,
|
|
7631
7740
|
useLayoutEffect as useLayoutEffect4
|
|
7632
7741
|
} from "react";
|
|
7633
7742
|
import { useRef as useRef19 } from "react";
|
|
@@ -7644,7 +7753,7 @@ var WRAPPER_STYLE = {
|
|
|
7644
7753
|
};
|
|
7645
7754
|
var useCSSVariableWatch = (params) => {
|
|
7646
7755
|
const lastValueRef = useRef19(0);
|
|
7647
|
-
const onResize =
|
|
7756
|
+
const onResize = useCallback18(({ height }) => {
|
|
7648
7757
|
if (height && height !== lastValueRef.current) {
|
|
7649
7758
|
lastValueRef.current = height;
|
|
7650
7759
|
params.onChange(height);
|
|
@@ -7667,11 +7776,11 @@ var CSSVariableWatch = (props) => {
|
|
|
7667
7776
|
useCSSVariableWatch(__spreadProps(__spreadValues({}, props), {
|
|
7668
7777
|
ref: domRef
|
|
7669
7778
|
}));
|
|
7670
|
-
return /* @__PURE__ */
|
|
7779
|
+
return /* @__PURE__ */ createElement30("div", {
|
|
7671
7780
|
"data-name": "css-variable-watcher",
|
|
7672
7781
|
"data-var": props.varName,
|
|
7673
7782
|
style: WRAPPER_STYLE
|
|
7674
|
-
}, /* @__PURE__ */
|
|
7783
|
+
}, /* @__PURE__ */ createElement30("div", {
|
|
7675
7784
|
ref: domRef,
|
|
7676
7785
|
style: {
|
|
7677
7786
|
height: props.varName.startsWith("var(") ? props.varName : `var(${props.varName})`
|
|
@@ -7765,7 +7874,7 @@ function useDOMProps(initialDOMProps) {
|
|
|
7765
7874
|
|
|
7766
7875
|
// src/components/InfiniteTable/components/LoadMask.tsx
|
|
7767
7876
|
import {
|
|
7768
|
-
createElement as
|
|
7877
|
+
createElement as createElement31,
|
|
7769
7878
|
memo as memo12
|
|
7770
7879
|
} from "react";
|
|
7771
7880
|
|
|
@@ -7779,11 +7888,11 @@ var { rootClassName: rootClassName11 } = internalProps;
|
|
|
7779
7888
|
var baseCls2 = `${rootClassName11}-LoadMask`;
|
|
7780
7889
|
function LoadMaskFn(props) {
|
|
7781
7890
|
const { visible, children = "Loading" } = props;
|
|
7782
|
-
return /* @__PURE__ */
|
|
7891
|
+
return /* @__PURE__ */ createElement31("div", {
|
|
7783
7892
|
className: `${LoadMaskCls[visible ? "visible" : "hidden"]} ${baseCls2}`
|
|
7784
|
-
}, /* @__PURE__ */
|
|
7893
|
+
}, /* @__PURE__ */ createElement31("div", {
|
|
7785
7894
|
className: `${LoadMaskOverlayCls} ${baseCls2}-Overlay`
|
|
7786
|
-
}), /* @__PURE__ */
|
|
7895
|
+
}), /* @__PURE__ */ createElement31("div", {
|
|
7787
7896
|
className: `${LoadMaskTextCls} ${baseCls2}-Text`
|
|
7788
7897
|
}, children));
|
|
7789
7898
|
}
|
|
@@ -7816,7 +7925,8 @@ var InfiniteTableComponent = memo13(function InfiniteTableComponent2() {
|
|
|
7816
7925
|
} = useInfiniteTable();
|
|
7817
7926
|
const {
|
|
7818
7927
|
componentState: { dataArray, loading },
|
|
7819
|
-
getState: getDataSourceState
|
|
7928
|
+
getState: getDataSourceState,
|
|
7929
|
+
componentActions: dataSourceActions
|
|
7820
7930
|
} = useDataSourceContextValue();
|
|
7821
7931
|
const {
|
|
7822
7932
|
domRef,
|
|
@@ -7829,7 +7939,8 @@ var InfiniteTableComponent = memo13(function InfiniteTableComponent2() {
|
|
|
7829
7939
|
onHeaderHeightCSSVarChange,
|
|
7830
7940
|
rowHeightCSSVar,
|
|
7831
7941
|
headerHeightCSSVar,
|
|
7832
|
-
components
|
|
7942
|
+
components,
|
|
7943
|
+
scrollStopDelay
|
|
7833
7944
|
} = componentState;
|
|
7834
7945
|
const { columnShifts, bodySize } = componentState;
|
|
7835
7946
|
const {
|
|
@@ -7842,6 +7953,7 @@ var InfiniteTableComponent = memo13(function InfiniteTableComponent2() {
|
|
|
7842
7953
|
scrollbars,
|
|
7843
7954
|
applyScrollVertical,
|
|
7844
7955
|
horizontalVirtualBrain,
|
|
7956
|
+
verticalVirtualBrain,
|
|
7845
7957
|
reservedContentHeight
|
|
7846
7958
|
} = useListRendering({
|
|
7847
7959
|
getComputed,
|
|
@@ -7850,6 +7962,13 @@ var InfiniteTableComponent = memo13(function InfiniteTableComponent2() {
|
|
|
7850
7962
|
bodySize,
|
|
7851
7963
|
computed
|
|
7852
7964
|
});
|
|
7965
|
+
useEffect24(() => {
|
|
7966
|
+
const dataSourceState = getDataSourceState();
|
|
7967
|
+
const onChange = debounce((renderRange) => {
|
|
7968
|
+
dataSourceState.notifyRenderRangeChange(renderRange);
|
|
7969
|
+
}, { wait: scrollStopDelay });
|
|
7970
|
+
return verticalVirtualBrain.onRenderRangeChange(onChange);
|
|
7971
|
+
}, [verticalVirtualBrain, scrollStopDelay]);
|
|
7853
7972
|
const licenseValid = useLicense(licenseKey);
|
|
7854
7973
|
const domProps = useDOMProps(componentState.domProps);
|
|
7855
7974
|
const LoadMaskCmp = (_a = components == null ? void 0 : components.LoadMask) != null ? _a : LoadMask;
|
|
@@ -7862,31 +7981,34 @@ var InfiniteTableComponent = memo13(function InfiniteTableComponent2() {
|
|
|
7862
7981
|
}
|
|
7863
7982
|
notifyScrollbarsChange(scrollbars);
|
|
7864
7983
|
}, [scrollbars]);
|
|
7865
|
-
|
|
7984
|
+
useEffect24(() => {
|
|
7985
|
+
dataSourceActions.scrollStopDelayUpdatedByTable = scrollStopDelay;
|
|
7986
|
+
}, [scrollStopDelay]);
|
|
7987
|
+
return /* @__PURE__ */ createElement32("div", __spreadValues({
|
|
7866
7988
|
ref: domRef
|
|
7867
|
-
}, domProps), header ? /* @__PURE__ */
|
|
7989
|
+
}, domProps), header ? /* @__PURE__ */ createElement32(TableHeaderWrapper, {
|
|
7868
7990
|
brain: horizontalVirtualBrain,
|
|
7869
7991
|
repaintId,
|
|
7870
7992
|
scrollbars
|
|
7871
|
-
}) : null, /* @__PURE__ */
|
|
7993
|
+
}) : null, /* @__PURE__ */ createElement32(InfiniteTableBody, null, /* @__PURE__ */ createElement32(VirtualScrollContainer, {
|
|
7872
7994
|
ref: scrollerDOMRef,
|
|
7873
7995
|
onContainerScroll: applyScrollVertical,
|
|
7874
7996
|
scrollable: ONLY_VERTICAL_SCROLLBAR
|
|
7875
|
-
}, /* @__PURE__ */
|
|
7997
|
+
}, /* @__PURE__ */ createElement32("div", {
|
|
7876
7998
|
className: display.flex
|
|
7877
|
-
}, pinnedStartList, centerList, pinnedEndList), /* @__PURE__ */
|
|
7999
|
+
}, pinnedStartList, centerList, pinnedEndList), /* @__PURE__ */ createElement32(SpacePlaceholder, {
|
|
7878
8000
|
count: dataArray.length,
|
|
7879
8001
|
width: 0,
|
|
7880
8002
|
height: reservedContentHeight
|
|
7881
|
-
})), pinnedStartScrollbarPlaceholder, pinnedEndScrollbarPlaceholder, /* @__PURE__ */
|
|
8003
|
+
})), pinnedStartScrollbarPlaceholder, pinnedEndScrollbarPlaceholder, /* @__PURE__ */ createElement32(LoadMaskCmp, {
|
|
7882
8004
|
visible: loading
|
|
7883
|
-
}, loadingText)), licenseValid ? null : /* @__PURE__ */
|
|
8005
|
+
}, loadingText)), licenseValid ? null : /* @__PURE__ */ createElement32(InfiniteTableLicenseFooter, null), /* @__PURE__ */ createElement32("div", {
|
|
7884
8006
|
ref: portalDOMRef,
|
|
7885
8007
|
className: join(`${rootClassName}Portal`, zIndex[1e3], position.absolute, top[0], left[0])
|
|
7886
|
-
}), rowHeightCSSVar ? /* @__PURE__ */
|
|
8008
|
+
}), rowHeightCSSVar ? /* @__PURE__ */ createElement32(CSSVariableWatch, {
|
|
7887
8009
|
varName: rowHeightCSSVar,
|
|
7888
8010
|
onChange: onRowHeightCSSVarChange
|
|
7889
|
-
}) : null, headerHeightCSSVar ? /* @__PURE__ */
|
|
8011
|
+
}) : null, headerHeightCSSVar ? /* @__PURE__ */ createElement32(CSSVariableWatch, {
|
|
7890
8012
|
varName: headerHeightCSSVar,
|
|
7891
8013
|
onChange: onHeaderHeightCSSVarChange
|
|
7892
8014
|
}) : null);
|
|
@@ -7934,13 +8056,13 @@ function InfiniteTableContextProvider() {
|
|
|
7934
8056
|
}
|
|
7935
8057
|
}, [scrollTopId, scrollerDOMRef]);
|
|
7936
8058
|
const TableContext2 = getInfiniteTableContext();
|
|
7937
|
-
return /* @__PURE__ */
|
|
8059
|
+
return /* @__PURE__ */ createElement32(TableContext2.Provider, {
|
|
7938
8060
|
value: contextValue
|
|
7939
|
-
}, /* @__PURE__ */
|
|
8061
|
+
}, /* @__PURE__ */ createElement32(InfiniteTableComponent, null));
|
|
7940
8062
|
}
|
|
7941
8063
|
function InfiniteTable(props) {
|
|
7942
|
-
const table = /* @__PURE__ */
|
|
7943
|
-
return /* @__PURE__ */
|
|
8064
|
+
const table = /* @__PURE__ */ createElement32(InfiniteTableRoot, __spreadValues({}, props), /* @__PURE__ */ createElement32(InfiniteTableContextProvider, null));
|
|
8065
|
+
return /* @__PURE__ */ createElement32(StrictMode, null, table);
|
|
7944
8066
|
}
|
|
7945
8067
|
InfiniteTable.defaultProps = {
|
|
7946
8068
|
rowHeight: 40,
|