@wallarm-org/design-system 2.6.0 → 2.7.0
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/dist/components/Table/TableContext/TableProvider.js +309 -306
- package/dist/components/Table/TableContext/types.d.ts +1 -0
- package/dist/components/Table/TableSettingsMenu/TableSettingsMenu.js +18 -3
- package/dist/components/Table/TableSettingsMenu/TableSettingsMenuContentContext.d.ts +13 -0
- package/dist/components/Table/TableSettingsMenu/TableSettingsMenuContentContext.js +5 -1
- package/dist/components/Table/TableSettingsMenu/TableSettingsMenuItem.js +50 -37
- package/dist/components/Table/TableSettingsMenu/TableSettingsMenuReset.js +59 -34
- package/dist/components/Table/types.d.ts +7 -0
- package/dist/metadata/components.json +8 -2
- package/package.json +1 -1
|
@@ -16,8 +16,8 @@ const toTanStackPinning = (p, pinnedLeft)=>({
|
|
|
16
16
|
end: p?.right ?? []
|
|
17
17
|
});
|
|
18
18
|
const TableProvider = (props)=>{
|
|
19
|
-
const $ = compiler_runtime_c(
|
|
20
|
-
const { data, columns, isLoading: t0, isLoadingPrevious: t1, skeletonCount: t2, children, getRowId, sorting: sortingProp, onSortingChange, manualSorting: t3, rowSelection: rowSelectionProp, onRowSelectionChange, enableSelectAllRows: t4, onSelectAllRows, columnSizing: columnSizingProp, onColumnSizingChange, columnPinning: columnPinningProp, onColumnPinningChange, columnOrder: columnOrderProp, onColumnOrderChange, grouping: groupingProp, onGroupingChange, expanded: expandedProp, onExpandedChange, renderGroupRow, groupRowSpan: t5, groupExpandColumn: t6, getSubRows, showEmptyGroups: t7, renderExpandedRow, columnVisibility: columnVisibilityProp, onColumnVisibilityChange, defaultColumnVisibility, defaultColumnOrder, columnGroups, virtualized, stretch: t8, estimateRowHeight, overscan: t9, onEndReached, onEndReachedThreshold, onStartReached, onStartReachedThreshold, initialScrollToRowId, onRowReorder, getRowCanDrag, renderFullWidthRow, onMasterCellClick, activeRowId: activeRowIdProp, onSettingsOpenChange } = props;
|
|
19
|
+
const $ = compiler_runtime_c(169);
|
|
20
|
+
const { data, columns, isLoading: t0, isLoadingPrevious: t1, skeletonCount: t2, children, getRowId, sorting: sortingProp, onSortingChange, manualSorting: t3, rowSelection: rowSelectionProp, onRowSelectionChange, enableSelectAllRows: t4, onSelectAllRows, columnSizing: columnSizingProp, onColumnSizingChange, columnPinning: columnPinningProp, onColumnPinningChange, columnOrder: columnOrderProp, onColumnOrderChange, grouping: groupingProp, onGroupingChange, expanded: expandedProp, onExpandedChange, renderGroupRow, groupRowSpan: t5, groupExpandColumn: t6, getSubRows, showEmptyGroups: t7, renderExpandedRow, columnVisibility: columnVisibilityProp, onColumnVisibilityChange, defaultColumnVisibility, defaultColumnOrder, columnGroups, virtualized, stretch: t8, estimateRowHeight, overscan: t9, onEndReached, onEndReachedThreshold, onStartReached, onStartReachedThreshold, initialScrollToRowId, onRowReorder, getRowCanDrag, renderFullWidthRow, onMasterCellClick, activeRowId: activeRowIdProp, onSettingsOpenChange, deferColumnVisibility: t10 } = props;
|
|
21
21
|
const isLoading = void 0 === t0 ? false : t0;
|
|
22
22
|
const isLoadingPrevious = void 0 === t1 ? false : t1;
|
|
23
23
|
const skeletonCount = void 0 === t2 ? TABLE_SKELETON_ROWS : t2;
|
|
@@ -28,6 +28,7 @@ const TableProvider = (props)=>{
|
|
|
28
28
|
const showEmptyGroups = void 0 === t7 ? false : t7;
|
|
29
29
|
const stretch = void 0 === t8 ? true : t8;
|
|
30
30
|
const overscan = void 0 === t9 ? TABLE_VIRTUALIZATION_OVERSCAN : t9;
|
|
31
|
+
const deferColumnVisibility = void 0 === t10 ? false : t10;
|
|
31
32
|
const masterCellActiveRowId = activeRowIdProp ?? null;
|
|
32
33
|
const sortingEnabled = !!onSortingChange;
|
|
33
34
|
const selectionEnabled = !!onRowSelectionChange;
|
|
@@ -40,7 +41,7 @@ const TableProvider = (props)=>{
|
|
|
40
41
|
const expandingEnabled = !!renderExpandedRow || !!onExpandedChange || subRowGroupingEnabled;
|
|
41
42
|
const visibilityEnabled = !!onColumnVisibilityChange;
|
|
42
43
|
const expandColumnEnabled = expandingEnabled && (!subRowGroupingEnabled || groupExpandColumn);
|
|
43
|
-
let
|
|
44
|
+
let t11;
|
|
44
45
|
if ($[0] !== columns || $[1] !== data[0] || $[2] !== expandColumnEnabled || $[3] !== rowDndEnabled || $[4] !== selectionEnabled || $[5] !== subRowGroupingEnabled) {
|
|
45
46
|
bb0: {
|
|
46
47
|
const cols = columns;
|
|
@@ -48,31 +49,31 @@ const TableProvider = (props)=>{
|
|
|
48
49
|
if ($[7] !== expandColumnEnabled || $[8] !== rowDndEnabled || $[9] !== selectionEnabled || $[10] !== subRowGroupingEnabled) {
|
|
49
50
|
prefix = [];
|
|
50
51
|
if (expandColumnEnabled) {
|
|
51
|
-
let
|
|
52
|
+
let t12;
|
|
52
53
|
if ($[12] !== subRowGroupingEnabled) {
|
|
53
|
-
|
|
54
|
+
t12 = createExpandColumn({
|
|
54
55
|
groupsOnly: subRowGroupingEnabled
|
|
55
56
|
});
|
|
56
57
|
$[12] = subRowGroupingEnabled;
|
|
57
|
-
$[13] =
|
|
58
|
-
} else
|
|
59
|
-
prefix.push(
|
|
58
|
+
$[13] = t12;
|
|
59
|
+
} else t12 = $[13];
|
|
60
|
+
prefix.push(t12);
|
|
60
61
|
}
|
|
61
62
|
if (selectionEnabled) {
|
|
62
|
-
let
|
|
63
|
+
let t12;
|
|
63
64
|
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
64
|
-
|
|
65
|
-
$[14] =
|
|
66
|
-
} else
|
|
67
|
-
prefix.push(
|
|
65
|
+
t12 = createSelectionColumn();
|
|
66
|
+
$[14] = t12;
|
|
67
|
+
} else t12 = $[14];
|
|
68
|
+
prefix.push(t12);
|
|
68
69
|
}
|
|
69
70
|
if (rowDndEnabled) {
|
|
70
|
-
let
|
|
71
|
+
let t12;
|
|
71
72
|
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
72
|
-
|
|
73
|
-
$[15] =
|
|
74
|
-
} else
|
|
75
|
-
prefix.push(
|
|
73
|
+
t12 = createDragHandleColumn();
|
|
74
|
+
$[15] = t12;
|
|
75
|
+
} else t12 = $[15];
|
|
76
|
+
prefix.push(t12);
|
|
76
77
|
}
|
|
77
78
|
$[7] = expandColumnEnabled;
|
|
78
79
|
$[8] = rowDndEnabled;
|
|
@@ -81,9 +82,9 @@ const TableProvider = (props)=>{
|
|
|
81
82
|
$[11] = prefix;
|
|
82
83
|
} else prefix = $[11];
|
|
83
84
|
const firstRow = data[0];
|
|
84
|
-
let
|
|
85
|
+
let t12;
|
|
85
86
|
if ($[16] !== firstRow) {
|
|
86
|
-
|
|
87
|
+
t12 = (col)=>{
|
|
87
88
|
if (!firstRow || !("accessorKey" in col) || col.meta?.sortType) return col;
|
|
88
89
|
const value = firstRow[col.accessorKey];
|
|
89
90
|
if ("number" == typeof value) return {
|
|
@@ -96,16 +97,16 @@ const TableProvider = (props)=>{
|
|
|
96
97
|
return col;
|
|
97
98
|
};
|
|
98
99
|
$[16] = firstRow;
|
|
99
|
-
$[17] =
|
|
100
|
-
} else
|
|
101
|
-
const withAutoMeta = cols.map(
|
|
100
|
+
$[17] = t12;
|
|
101
|
+
} else t12 = $[17];
|
|
102
|
+
const withAutoMeta = cols.map(t12);
|
|
102
103
|
const masterOverrides = {
|
|
103
104
|
enableColumnPinning: false,
|
|
104
105
|
enableHiding: false
|
|
105
106
|
};
|
|
106
107
|
if (0 === prefix.length) {
|
|
107
108
|
if (withAutoMeta.length > 0) {
|
|
108
|
-
|
|
109
|
+
t11 = [
|
|
109
110
|
{
|
|
110
111
|
...withAutoMeta[0],
|
|
111
112
|
...masterOverrides
|
|
@@ -114,14 +115,14 @@ const TableProvider = (props)=>{
|
|
|
114
115
|
];
|
|
115
116
|
break bb0;
|
|
116
117
|
}
|
|
117
|
-
|
|
118
|
+
t11 = withAutoMeta;
|
|
118
119
|
break bb0;
|
|
119
120
|
}
|
|
120
121
|
const userCols = withAutoMeta.length > 0 ? withAutoMeta.map((col_0, index)=>0 === index ? {
|
|
121
122
|
...col_0,
|
|
122
123
|
...masterOverrides
|
|
123
124
|
} : col_0) : withAutoMeta;
|
|
124
|
-
|
|
125
|
+
t11 = [
|
|
125
126
|
...prefix,
|
|
126
127
|
...userCols
|
|
127
128
|
];
|
|
@@ -132,23 +133,23 @@ const TableProvider = (props)=>{
|
|
|
132
133
|
$[3] = rowDndEnabled;
|
|
133
134
|
$[4] = selectionEnabled;
|
|
134
135
|
$[5] = subRowGroupingEnabled;
|
|
135
|
-
$[6] =
|
|
136
|
-
} else
|
|
137
|
-
const mergedColumns =
|
|
138
|
-
let
|
|
136
|
+
$[6] = t11;
|
|
137
|
+
} else t11 = $[6];
|
|
138
|
+
const mergedColumns = t11;
|
|
139
|
+
let t12;
|
|
139
140
|
bb1: {
|
|
140
141
|
if (0 === columns.length) {
|
|
141
|
-
|
|
142
|
+
t12 = null;
|
|
142
143
|
break bb1;
|
|
143
144
|
}
|
|
144
145
|
const firstCol = columns[0];
|
|
145
146
|
if (!firstCol) {
|
|
146
|
-
|
|
147
|
+
t12 = null;
|
|
147
148
|
break bb1;
|
|
148
149
|
}
|
|
149
|
-
|
|
150
|
+
t12 = ("accessorKey" in firstCol ? String(firstCol.accessorKey) : firstCol.id) ?? null;
|
|
150
151
|
}
|
|
151
|
-
const masterColumnId =
|
|
152
|
+
const masterColumnId = t12;
|
|
152
153
|
let ids;
|
|
153
154
|
if ($[18] !== expandColumnEnabled || $[19] !== masterColumnId || $[20] !== rowDndEnabled || $[21] !== selectionEnabled) {
|
|
154
155
|
ids = [];
|
|
@@ -163,68 +164,68 @@ const TableProvider = (props)=>{
|
|
|
163
164
|
$[22] = ids;
|
|
164
165
|
} else ids = $[22];
|
|
165
166
|
const alwaysPinnedLeft = ids;
|
|
166
|
-
let t12;
|
|
167
|
-
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
168
|
-
t12 = [];
|
|
169
|
-
$[23] = t12;
|
|
170
|
-
} else t12 = $[23];
|
|
171
|
-
const [sorting, handleSortingChange] = useTableState(sortingProp, t12, onSortingChange);
|
|
172
167
|
let t13;
|
|
173
|
-
if ($[
|
|
174
|
-
t13 =
|
|
175
|
-
$[
|
|
176
|
-
} else t13 = $[
|
|
177
|
-
const [
|
|
168
|
+
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
169
|
+
t13 = [];
|
|
170
|
+
$[23] = t13;
|
|
171
|
+
} else t13 = $[23];
|
|
172
|
+
const [sorting, handleSortingChange] = useTableState(sortingProp, t13, onSortingChange);
|
|
178
173
|
let t14;
|
|
179
|
-
if ($[
|
|
174
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
180
175
|
t14 = {};
|
|
181
|
-
$[
|
|
182
|
-
} else t14 = $[
|
|
183
|
-
const [
|
|
176
|
+
$[24] = t14;
|
|
177
|
+
} else t14 = $[24];
|
|
178
|
+
const [rowSelection, handleRowSelectionChange] = useTableState(rowSelectionProp, t14, onRowSelectionChange);
|
|
184
179
|
let t15;
|
|
180
|
+
if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
|
|
181
|
+
t15 = {};
|
|
182
|
+
$[25] = t15;
|
|
183
|
+
} else t15 = $[25];
|
|
184
|
+
const [columnSizing, handleColumnSizingChange] = useTableState(columnSizingProp, t15, onColumnSizingChange);
|
|
185
|
+
let t16;
|
|
185
186
|
if ($[26] !== defaultColumnOrder) {
|
|
186
|
-
|
|
187
|
+
t16 = defaultColumnOrder ?? [];
|
|
187
188
|
$[26] = defaultColumnOrder;
|
|
188
|
-
$[27] =
|
|
189
|
-
} else
|
|
190
|
-
const [columnOrder, handleColumnOrderChange] = useTableState(columnOrderProp,
|
|
191
|
-
let t16;
|
|
192
|
-
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
193
|
-
t16 = [];
|
|
194
|
-
$[28] = t16;
|
|
195
|
-
} else t16 = $[28];
|
|
196
|
-
const [grouping, handleGroupingChange] = useTableState(groupingProp, t16, onGroupingChange);
|
|
189
|
+
$[27] = t16;
|
|
190
|
+
} else t16 = $[27];
|
|
191
|
+
const [columnOrder, handleColumnOrderChange] = useTableState(columnOrderProp, t16, onColumnOrderChange);
|
|
197
192
|
let t17;
|
|
198
|
-
if ($[
|
|
199
|
-
t17 =
|
|
200
|
-
$[
|
|
201
|
-
} else t17 = $[
|
|
202
|
-
const [
|
|
193
|
+
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
194
|
+
t17 = [];
|
|
195
|
+
$[28] = t17;
|
|
196
|
+
} else t17 = $[28];
|
|
197
|
+
const [grouping, handleGroupingChange] = useTableState(groupingProp, t17, onGroupingChange);
|
|
203
198
|
let t18;
|
|
199
|
+
if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
|
|
200
|
+
t18 = {};
|
|
201
|
+
$[29] = t18;
|
|
202
|
+
} else t18 = $[29];
|
|
203
|
+
const [expanded, handleExpandedChange] = useTableState(expandedProp, t18, onExpandedChange);
|
|
204
|
+
let t19;
|
|
204
205
|
if ($[30] !== defaultColumnVisibility) {
|
|
205
|
-
|
|
206
|
+
t19 = defaultColumnVisibility ?? {};
|
|
206
207
|
$[30] = defaultColumnVisibility;
|
|
207
|
-
$[31] =
|
|
208
|
-
} else
|
|
209
|
-
const [columnVisibility, handleColumnVisibilityChange] = useTableState(columnVisibilityProp,
|
|
210
|
-
let t19;
|
|
211
|
-
if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
|
|
212
|
-
t19 = {};
|
|
213
|
-
$[32] = t19;
|
|
214
|
-
} else t19 = $[32];
|
|
208
|
+
$[31] = t19;
|
|
209
|
+
} else t19 = $[31];
|
|
210
|
+
const [columnVisibility, handleColumnVisibilityChange] = useTableState(columnVisibilityProp, t19, onColumnVisibilityChange);
|
|
215
211
|
let t20;
|
|
212
|
+
if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
|
|
213
|
+
t20 = {};
|
|
214
|
+
$[32] = t20;
|
|
215
|
+
} else t20 = $[32];
|
|
216
|
+
let t21;
|
|
216
217
|
if ($[33] !== columnPinningProp) {
|
|
217
|
-
|
|
218
|
+
t21 = {
|
|
218
219
|
controlled: columnPinningProp,
|
|
219
|
-
default:
|
|
220
|
+
default: t20
|
|
220
221
|
};
|
|
221
222
|
$[33] = columnPinningProp;
|
|
222
|
-
$[34] =
|
|
223
|
-
} else
|
|
224
|
-
const [columnPinning, setColumnPinningInternal] = useControlled(
|
|
225
|
-
let
|
|
223
|
+
$[34] = t21;
|
|
224
|
+
} else t21 = $[34];
|
|
225
|
+
const [columnPinning, setColumnPinningInternal] = useControlled(t21);
|
|
226
|
+
let t22;
|
|
226
227
|
if ($[35] !== alwaysPinnedLeft || $[36] !== columnPinning || $[37] !== onColumnPinningChange || $[38] !== setColumnPinningInternal) {
|
|
227
|
-
|
|
228
|
+
t22 = (updater)=>{
|
|
228
229
|
const prevTanStackShape = toTanStackPinning(columnPinning, alwaysPinnedLeft);
|
|
229
230
|
const newValue = "function" == typeof updater ? updater(prevTanStackShape) : updater;
|
|
230
231
|
const enforcedStart = [
|
|
@@ -242,12 +243,12 @@ const TableProvider = (props)=>{
|
|
|
242
243
|
$[36] = columnPinning;
|
|
243
244
|
$[37] = onColumnPinningChange;
|
|
244
245
|
$[38] = setColumnPinningInternal;
|
|
245
|
-
$[39] =
|
|
246
|
-
} else
|
|
247
|
-
const handleColumnPinningChange =
|
|
248
|
-
let
|
|
246
|
+
$[39] = t22;
|
|
247
|
+
} else t22 = $[39];
|
|
248
|
+
const handleColumnPinningChange = t22;
|
|
249
|
+
let t23;
|
|
249
250
|
if ($[40] !== alwaysPinnedLeft || $[41] !== handleColumnOrderChange) {
|
|
250
|
-
|
|
251
|
+
t23 = (newOrder)=>{
|
|
251
252
|
const rest = newOrder.filter((id_0)=>!alwaysPinnedLeft.includes(id_0));
|
|
252
253
|
handleColumnOrderChange([
|
|
253
254
|
...alwaysPinnedLeft,
|
|
@@ -256,142 +257,142 @@ const TableProvider = (props)=>{
|
|
|
256
257
|
};
|
|
257
258
|
$[40] = alwaysPinnedLeft;
|
|
258
259
|
$[41] = handleColumnOrderChange;
|
|
259
|
-
$[42] =
|
|
260
|
-
} else
|
|
261
|
-
const setColumnOrder =
|
|
262
|
-
let
|
|
260
|
+
$[42] = t23;
|
|
261
|
+
} else t23 = $[42];
|
|
262
|
+
const setColumnOrder = t23;
|
|
263
|
+
let t24;
|
|
263
264
|
if ($[43] !== sorting) {
|
|
264
|
-
|
|
265
|
+
t24 = sorting ?? [];
|
|
265
266
|
$[43] = sorting;
|
|
266
|
-
$[44] =
|
|
267
|
-
} else
|
|
268
|
-
let
|
|
267
|
+
$[44] = t24;
|
|
268
|
+
} else t24 = $[44];
|
|
269
|
+
let t25;
|
|
269
270
|
if ($[45] !== rowSelection) {
|
|
270
|
-
|
|
271
|
+
t25 = rowSelection ?? {};
|
|
271
272
|
$[45] = rowSelection;
|
|
272
|
-
$[46] =
|
|
273
|
-
} else
|
|
274
|
-
let
|
|
273
|
+
$[46] = t25;
|
|
274
|
+
} else t25 = $[46];
|
|
275
|
+
let t26;
|
|
275
276
|
if ($[47] !== columnSizing) {
|
|
276
|
-
|
|
277
|
+
t26 = columnSizing ?? {};
|
|
277
278
|
$[47] = columnSizing;
|
|
278
|
-
$[48] =
|
|
279
|
-
} else
|
|
280
|
-
let
|
|
279
|
+
$[48] = t26;
|
|
280
|
+
} else t26 = $[48];
|
|
281
|
+
let t27;
|
|
281
282
|
if ($[49] !== alwaysPinnedLeft || $[50] !== columnPinning) {
|
|
282
|
-
|
|
283
|
+
t27 = toTanStackPinning(columnPinning, alwaysPinnedLeft);
|
|
283
284
|
$[49] = alwaysPinnedLeft;
|
|
284
285
|
$[50] = columnPinning;
|
|
285
|
-
$[51] =
|
|
286
|
-
} else
|
|
287
|
-
let
|
|
286
|
+
$[51] = t27;
|
|
287
|
+
} else t27 = $[51];
|
|
288
|
+
let t28;
|
|
288
289
|
if ($[52] !== columnOrder) {
|
|
289
|
-
|
|
290
|
+
t28 = columnOrder ?? [];
|
|
290
291
|
$[52] = columnOrder;
|
|
291
|
-
$[53] =
|
|
292
|
-
} else
|
|
293
|
-
let
|
|
292
|
+
$[53] = t28;
|
|
293
|
+
} else t28 = $[53];
|
|
294
|
+
let t29;
|
|
294
295
|
if ($[54] !== grouping) {
|
|
295
|
-
|
|
296
|
+
t29 = grouping ?? [];
|
|
296
297
|
$[54] = grouping;
|
|
297
|
-
$[55] =
|
|
298
|
-
} else
|
|
299
|
-
let
|
|
298
|
+
$[55] = t29;
|
|
299
|
+
} else t29 = $[55];
|
|
300
|
+
let t30;
|
|
300
301
|
if ($[56] !== expanded) {
|
|
301
|
-
|
|
302
|
+
t30 = expanded ?? {};
|
|
302
303
|
$[56] = expanded;
|
|
303
|
-
$[57] =
|
|
304
|
-
} else
|
|
305
|
-
let
|
|
304
|
+
$[57] = t30;
|
|
305
|
+
} else t30 = $[57];
|
|
306
|
+
let t31;
|
|
306
307
|
if ($[58] !== columnVisibility) {
|
|
307
|
-
|
|
308
|
+
t31 = columnVisibility ?? {};
|
|
308
309
|
$[58] = columnVisibility;
|
|
309
|
-
$[59] =
|
|
310
|
-
} else
|
|
311
|
-
let
|
|
312
|
-
if ($[60] !==
|
|
313
|
-
|
|
314
|
-
sorting:
|
|
315
|
-
rowSelection:
|
|
316
|
-
columnSizing:
|
|
317
|
-
columnPinning:
|
|
318
|
-
columnOrder:
|
|
319
|
-
grouping:
|
|
320
|
-
expanded:
|
|
321
|
-
columnVisibility:
|
|
310
|
+
$[59] = t31;
|
|
311
|
+
} else t31 = $[59];
|
|
312
|
+
let t32;
|
|
313
|
+
if ($[60] !== t24 || $[61] !== t25 || $[62] !== t26 || $[63] !== t27 || $[64] !== t28 || $[65] !== t29 || $[66] !== t30 || $[67] !== t31) {
|
|
314
|
+
t32 = {
|
|
315
|
+
sorting: t24,
|
|
316
|
+
rowSelection: t25,
|
|
317
|
+
columnSizing: t26,
|
|
318
|
+
columnPinning: t27,
|
|
319
|
+
columnOrder: t28,
|
|
320
|
+
grouping: t29,
|
|
321
|
+
expanded: t30,
|
|
322
|
+
columnVisibility: t31
|
|
322
323
|
};
|
|
323
|
-
$[60] =
|
|
324
|
-
$[61] =
|
|
325
|
-
$[62] =
|
|
326
|
-
$[63] =
|
|
327
|
-
$[64] =
|
|
328
|
-
$[65] =
|
|
329
|
-
$[66] =
|
|
330
|
-
$[67] =
|
|
331
|
-
$[68] =
|
|
332
|
-
} else
|
|
333
|
-
const
|
|
334
|
-
const
|
|
335
|
-
const
|
|
336
|
-
const
|
|
337
|
-
const
|
|
338
|
-
const
|
|
339
|
-
const
|
|
340
|
-
const
|
|
341
|
-
let
|
|
324
|
+
$[60] = t24;
|
|
325
|
+
$[61] = t25;
|
|
326
|
+
$[62] = t26;
|
|
327
|
+
$[63] = t27;
|
|
328
|
+
$[64] = t28;
|
|
329
|
+
$[65] = t29;
|
|
330
|
+
$[66] = t30;
|
|
331
|
+
$[67] = t31;
|
|
332
|
+
$[68] = t32;
|
|
333
|
+
} else t32 = $[68];
|
|
334
|
+
const t33 = sortingEnabled ? handleSortingChange : void 0;
|
|
335
|
+
const t34 = selectionEnabled ? handleRowSelectionChange : void 0;
|
|
336
|
+
const t35 = resizingEnabled ? handleColumnSizingChange : void 0;
|
|
337
|
+
const t36 = pinningEnabled ? handleColumnPinningChange : void 0;
|
|
338
|
+
const t37 = columnDndEnabled ? handleColumnOrderChange : void 0;
|
|
339
|
+
const t38 = groupingEnabled ? handleGroupingChange : void 0;
|
|
340
|
+
const t39 = expandingEnabled ? handleExpandedChange : void 0;
|
|
341
|
+
const t40 = visibilityEnabled ? handleColumnVisibilityChange : void 0;
|
|
342
|
+
let t41;
|
|
342
343
|
if ($[69] !== expandingEnabled) {
|
|
343
|
-
|
|
344
|
+
t41 = expandingEnabled ? {
|
|
344
345
|
autoResetExpanded: false
|
|
345
346
|
} : {};
|
|
346
347
|
$[69] = expandingEnabled;
|
|
347
|
-
$[70] =
|
|
348
|
-
} else
|
|
349
|
-
let
|
|
348
|
+
$[70] = t41;
|
|
349
|
+
} else t41 = $[70];
|
|
350
|
+
let t42;
|
|
350
351
|
if ($[71] !== expandingEnabled || $[72] !== renderExpandedRow || $[73] !== subRowGroupingEnabled) {
|
|
351
|
-
|
|
352
|
+
t42 = expandingEnabled && (renderExpandedRow || subRowGroupingEnabled) ? {
|
|
352
353
|
getRowCanExpand: _temp
|
|
353
354
|
} : {};
|
|
354
355
|
$[71] = expandingEnabled;
|
|
355
356
|
$[72] = renderExpandedRow;
|
|
356
357
|
$[73] = subRowGroupingEnabled;
|
|
357
|
-
$[74] =
|
|
358
|
-
} else
|
|
359
|
-
let
|
|
358
|
+
$[74] = t42;
|
|
359
|
+
} else t42 = $[74];
|
|
360
|
+
let t43;
|
|
360
361
|
if ($[75] === Symbol.for("react.memo_cache_sentinel")) {
|
|
361
|
-
|
|
362
|
+
t43 = {
|
|
362
363
|
minSize: TABLE_MIN_COLUMN_WIDTH
|
|
363
364
|
};
|
|
364
|
-
$[75] =
|
|
365
|
-
} else
|
|
366
|
-
let
|
|
367
|
-
if ($[76] !== data || $[77] !== expandingEnabled || $[78] !== getRowId || $[79] !== getSubRows || $[80] !== groupingEnabled || $[81] !== manualSorting || $[82] !== mergedColumns || $[83] !== resizingEnabled || $[84] !== selectionEnabled || $[85] !== sortingEnabled || $[86] !==
|
|
368
|
-
|
|
365
|
+
$[75] = t43;
|
|
366
|
+
} else t43 = $[75];
|
|
367
|
+
let t44;
|
|
368
|
+
if ($[76] !== data || $[77] !== expandingEnabled || $[78] !== getRowId || $[79] !== getSubRows || $[80] !== groupingEnabled || $[81] !== manualSorting || $[82] !== mergedColumns || $[83] !== resizingEnabled || $[84] !== selectionEnabled || $[85] !== sortingEnabled || $[86] !== t32 || $[87] !== t33 || $[88] !== t34 || $[89] !== t35 || $[90] !== t36 || $[91] !== t37 || $[92] !== t38 || $[93] !== t39 || $[94] !== t40 || $[95] !== t41 || $[96] !== t42 || $[97] !== visibilityEnabled) {
|
|
369
|
+
t44 = {
|
|
369
370
|
features: dsTableFeatures,
|
|
370
371
|
data,
|
|
371
372
|
columns: mergedColumns,
|
|
372
373
|
getRowId,
|
|
373
374
|
getSubRows,
|
|
374
375
|
manualSorting,
|
|
375
|
-
state:
|
|
376
|
-
onSortingChange:
|
|
377
|
-
onRowSelectionChange:
|
|
378
|
-
onColumnSizingChange:
|
|
379
|
-
onColumnPinningChange:
|
|
380
|
-
onColumnOrderChange:
|
|
381
|
-
onGroupingChange:
|
|
382
|
-
onExpandedChange:
|
|
383
|
-
onColumnVisibilityChange:
|
|
376
|
+
state: t32,
|
|
377
|
+
onSortingChange: t33,
|
|
378
|
+
onRowSelectionChange: t34,
|
|
379
|
+
onColumnSizingChange: t35,
|
|
380
|
+
onColumnPinningChange: t36,
|
|
381
|
+
onColumnOrderChange: t37,
|
|
382
|
+
onGroupingChange: t38,
|
|
383
|
+
onExpandedChange: t39,
|
|
384
|
+
onColumnVisibilityChange: t40,
|
|
384
385
|
enableSorting: sortingEnabled,
|
|
385
386
|
enableRowSelection: selectionEnabled,
|
|
386
387
|
enableColumnResizing: resizingEnabled,
|
|
387
388
|
enableColumnPinning: true,
|
|
388
389
|
enableGrouping: groupingEnabled,
|
|
389
390
|
enableExpanding: expandingEnabled,
|
|
390
|
-
...t40,
|
|
391
391
|
...t41,
|
|
392
|
+
...t42,
|
|
392
393
|
enableHiding: visibilityEnabled,
|
|
393
394
|
columnResizeMode: "onChange",
|
|
394
|
-
defaultColumn:
|
|
395
|
+
defaultColumn: t43
|
|
395
396
|
};
|
|
396
397
|
$[76] = data;
|
|
397
398
|
$[77] = expandingEnabled;
|
|
@@ -403,41 +404,41 @@ const TableProvider = (props)=>{
|
|
|
403
404
|
$[83] = resizingEnabled;
|
|
404
405
|
$[84] = selectionEnabled;
|
|
405
406
|
$[85] = sortingEnabled;
|
|
406
|
-
$[86] =
|
|
407
|
-
$[87] =
|
|
408
|
-
$[88] =
|
|
409
|
-
$[89] =
|
|
410
|
-
$[90] =
|
|
411
|
-
$[91] =
|
|
412
|
-
$[92] =
|
|
413
|
-
$[93] =
|
|
414
|
-
$[94] =
|
|
415
|
-
$[95] =
|
|
416
|
-
$[96] =
|
|
407
|
+
$[86] = t32;
|
|
408
|
+
$[87] = t33;
|
|
409
|
+
$[88] = t34;
|
|
410
|
+
$[89] = t35;
|
|
411
|
+
$[90] = t36;
|
|
412
|
+
$[91] = t37;
|
|
413
|
+
$[92] = t38;
|
|
414
|
+
$[93] = t39;
|
|
415
|
+
$[94] = t40;
|
|
416
|
+
$[95] = t41;
|
|
417
|
+
$[96] = t42;
|
|
417
418
|
$[97] = visibilityEnabled;
|
|
418
|
-
$[98] =
|
|
419
|
-
} else
|
|
420
|
-
const table = useTable(
|
|
421
|
-
let
|
|
419
|
+
$[98] = t44;
|
|
420
|
+
} else t44 = $[98];
|
|
421
|
+
const table = useTable(t44);
|
|
422
|
+
let t45;
|
|
422
423
|
if ($[99] !== table) {
|
|
423
|
-
|
|
424
|
+
t45 = table.getAllLeafColumns();
|
|
424
425
|
$[99] = table;
|
|
425
|
-
$[100] =
|
|
426
|
-
} else
|
|
427
|
-
const allLeafColumns =
|
|
426
|
+
$[100] = t45;
|
|
427
|
+
} else t45 = $[100];
|
|
428
|
+
const allLeafColumns = t45;
|
|
428
429
|
const lastSelectedRowIndexRef = useRef(null);
|
|
429
430
|
const containerRef = useRef(null);
|
|
430
431
|
const headerScrollRef = useRef(null);
|
|
431
432
|
const tbodyRef = useRef(null);
|
|
432
433
|
const virtualizerRef = useRef(null);
|
|
433
|
-
const
|
|
434
|
-
const
|
|
435
|
-
const
|
|
436
|
-
const
|
|
437
|
-
const
|
|
438
|
-
let
|
|
439
|
-
if ($[101] !== allLeafColumns || $[102] !== alwaysPinnedLeft || $[103] !== columnDndEnabled || $[104] !== columnGroups || $[105] !== defaultColumnOrder || $[106] !== defaultColumnVisibility || $[107] !==
|
|
440
|
-
|
|
434
|
+
const t46 = !!getSubRows;
|
|
435
|
+
const t47 = renderExpandedRow;
|
|
436
|
+
const t48 = getRowCanDrag;
|
|
437
|
+
const t49 = "full" === groupRowSpan ? renderGroupRow : void 0;
|
|
438
|
+
const t50 = renderFullWidthRow;
|
|
439
|
+
let t51;
|
|
440
|
+
if ($[101] !== allLeafColumns || $[102] !== alwaysPinnedLeft || $[103] !== columnDndEnabled || $[104] !== columnGroups || $[105] !== defaultColumnOrder || $[106] !== defaultColumnVisibility || $[107] !== deferColumnVisibility || $[108] !== enableSelectAllRows || $[109] !== estimateRowHeight || $[110] !== expandingEnabled || $[111] !== groupingEnabled || $[112] !== initialScrollToRowId || $[113] !== isLoading || $[114] !== isLoadingPrevious || $[115] !== masterCellActiveRowId || $[116] !== masterColumnId || $[117] !== onEndReached || $[118] !== onEndReachedThreshold || $[119] !== onMasterCellClick || $[120] !== onRowReorder || $[121] !== onSelectAllRows || $[122] !== onSettingsOpenChange || $[123] !== onStartReached || $[124] !== onStartReachedThreshold || $[125] !== overscan || $[126] !== pinningEnabled || $[127] !== resizingEnabled || $[128] !== rowDndEnabled || $[129] !== selectionEnabled || $[130] !== setColumnOrder || $[131] !== showEmptyGroups || $[132] !== skeletonCount || $[133] !== sortingEnabled || $[134] !== stretch || $[135] !== t46 || $[136] !== t47 || $[137] !== t48 || $[138] !== t49 || $[139] !== t50 || $[140] !== table || $[141] !== virtualized || $[142] !== visibilityEnabled) {
|
|
441
|
+
t51 = {
|
|
441
442
|
table,
|
|
442
443
|
isLoading,
|
|
443
444
|
isLoadingPrevious,
|
|
@@ -451,11 +452,11 @@ const TableProvider = (props)=>{
|
|
|
451
452
|
groupingEnabled,
|
|
452
453
|
expandingEnabled,
|
|
453
454
|
visibilityEnabled,
|
|
454
|
-
hasSubRowGrouping:
|
|
455
|
+
hasSubRowGrouping: t46,
|
|
455
456
|
showEmptyGroups,
|
|
456
457
|
virtualized,
|
|
457
458
|
stretch,
|
|
458
|
-
renderExpandedRow:
|
|
459
|
+
renderExpandedRow: t47,
|
|
459
460
|
estimateRowHeight,
|
|
460
461
|
overscan,
|
|
461
462
|
allLeafColumns,
|
|
@@ -478,12 +479,13 @@ const TableProvider = (props)=>{
|
|
|
478
479
|
onStartReachedThreshold,
|
|
479
480
|
initialScrollToRowId,
|
|
480
481
|
onRowReorder,
|
|
481
|
-
getRowCanDrag:
|
|
482
|
-
renderFullWidthGroupRow:
|
|
483
|
-
renderFullWidthRow:
|
|
482
|
+
getRowCanDrag: t48,
|
|
483
|
+
renderFullWidthGroupRow: t49,
|
|
484
|
+
renderFullWidthRow: t50,
|
|
484
485
|
onMasterCellClick,
|
|
485
486
|
activeRowId: masterCellActiveRowId,
|
|
486
|
-
onSettingsOpenChange
|
|
487
|
+
onSettingsOpenChange,
|
|
488
|
+
deferColumnVisibility
|
|
487
489
|
};
|
|
488
490
|
$[101] = allLeafColumns;
|
|
489
491
|
$[102] = alwaysPinnedLeft;
|
|
@@ -491,48 +493,49 @@ const TableProvider = (props)=>{
|
|
|
491
493
|
$[104] = columnGroups;
|
|
492
494
|
$[105] = defaultColumnOrder;
|
|
493
495
|
$[106] = defaultColumnVisibility;
|
|
494
|
-
$[107] =
|
|
495
|
-
$[108] =
|
|
496
|
-
$[109] =
|
|
497
|
-
$[110] =
|
|
498
|
-
$[111] =
|
|
499
|
-
$[112] =
|
|
500
|
-
$[113] =
|
|
501
|
-
$[114] =
|
|
502
|
-
$[115] =
|
|
503
|
-
$[116] =
|
|
504
|
-
$[117] =
|
|
505
|
-
$[118] =
|
|
506
|
-
$[119] =
|
|
507
|
-
$[120] =
|
|
508
|
-
$[121] =
|
|
509
|
-
$[122] =
|
|
510
|
-
$[123] =
|
|
511
|
-
$[124] =
|
|
512
|
-
$[125] =
|
|
513
|
-
$[126] =
|
|
514
|
-
$[127] =
|
|
515
|
-
$[128] =
|
|
516
|
-
$[129] =
|
|
517
|
-
$[130] =
|
|
518
|
-
$[131] =
|
|
519
|
-
$[132] =
|
|
520
|
-
$[133] =
|
|
521
|
-
$[134] =
|
|
496
|
+
$[107] = deferColumnVisibility;
|
|
497
|
+
$[108] = enableSelectAllRows;
|
|
498
|
+
$[109] = estimateRowHeight;
|
|
499
|
+
$[110] = expandingEnabled;
|
|
500
|
+
$[111] = groupingEnabled;
|
|
501
|
+
$[112] = initialScrollToRowId;
|
|
502
|
+
$[113] = isLoading;
|
|
503
|
+
$[114] = isLoadingPrevious;
|
|
504
|
+
$[115] = masterCellActiveRowId;
|
|
505
|
+
$[116] = masterColumnId;
|
|
506
|
+
$[117] = onEndReached;
|
|
507
|
+
$[118] = onEndReachedThreshold;
|
|
508
|
+
$[119] = onMasterCellClick;
|
|
509
|
+
$[120] = onRowReorder;
|
|
510
|
+
$[121] = onSelectAllRows;
|
|
511
|
+
$[122] = onSettingsOpenChange;
|
|
512
|
+
$[123] = onStartReached;
|
|
513
|
+
$[124] = onStartReachedThreshold;
|
|
514
|
+
$[125] = overscan;
|
|
515
|
+
$[126] = pinningEnabled;
|
|
516
|
+
$[127] = resizingEnabled;
|
|
517
|
+
$[128] = rowDndEnabled;
|
|
518
|
+
$[129] = selectionEnabled;
|
|
519
|
+
$[130] = setColumnOrder;
|
|
520
|
+
$[131] = showEmptyGroups;
|
|
521
|
+
$[132] = skeletonCount;
|
|
522
|
+
$[133] = sortingEnabled;
|
|
523
|
+
$[134] = stretch;
|
|
522
524
|
$[135] = t46;
|
|
523
525
|
$[136] = t47;
|
|
524
526
|
$[137] = t48;
|
|
525
527
|
$[138] = t49;
|
|
526
|
-
$[139] =
|
|
527
|
-
$[140] =
|
|
528
|
-
$[141] =
|
|
529
|
-
$[142] =
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
528
|
+
$[139] = t50;
|
|
529
|
+
$[140] = table;
|
|
530
|
+
$[141] = virtualized;
|
|
531
|
+
$[142] = visibilityEnabled;
|
|
532
|
+
$[143] = t51;
|
|
533
|
+
} else t51 = $[143];
|
|
534
|
+
const contextValue = t51;
|
|
533
535
|
let t52;
|
|
534
|
-
|
|
535
|
-
|
|
536
|
+
let t53;
|
|
537
|
+
if ($[144] !== selectionEnabled || $[145] !== table) {
|
|
538
|
+
t52 = ()=>{
|
|
536
539
|
if (!selectionEnabled) return;
|
|
537
540
|
const container = containerRef.current;
|
|
538
541
|
if (!container) return;
|
|
@@ -542,39 +545,39 @@ const TableProvider = (props)=>{
|
|
|
542
545
|
container.addEventListener("keydown", handleKeyDown);
|
|
543
546
|
return ()=>container.removeEventListener("keydown", handleKeyDown);
|
|
544
547
|
};
|
|
545
|
-
|
|
548
|
+
t53 = [
|
|
546
549
|
selectionEnabled,
|
|
547
550
|
table
|
|
548
551
|
];
|
|
549
|
-
$[
|
|
550
|
-
$[
|
|
551
|
-
$[145] = t51;
|
|
552
|
+
$[144] = selectionEnabled;
|
|
553
|
+
$[145] = table;
|
|
552
554
|
$[146] = t52;
|
|
555
|
+
$[147] = t53;
|
|
553
556
|
} else {
|
|
554
|
-
t51 = $[145];
|
|
555
557
|
t52 = $[146];
|
|
558
|
+
t53 = $[147];
|
|
556
559
|
}
|
|
557
|
-
useEffect(
|
|
558
|
-
let t53;
|
|
559
|
-
if ($[147] === Symbol.for("react.memo_cache_sentinel")) {
|
|
560
|
-
t53 = {
|
|
561
|
-
activationConstraint: {
|
|
562
|
-
distance: 5
|
|
563
|
-
}
|
|
564
|
-
};
|
|
565
|
-
$[147] = t53;
|
|
566
|
-
} else t53 = $[147];
|
|
560
|
+
useEffect(t52, t53);
|
|
567
561
|
let t54;
|
|
568
562
|
if ($[148] === Symbol.for("react.memo_cache_sentinel")) {
|
|
569
563
|
t54 = {
|
|
570
|
-
|
|
564
|
+
activationConstraint: {
|
|
565
|
+
distance: 5
|
|
566
|
+
}
|
|
571
567
|
};
|
|
572
568
|
$[148] = t54;
|
|
573
569
|
} else t54 = $[148];
|
|
574
|
-
const sensors = useSensors(useSensor(PointerSensor, t53), useSensor(KeyboardSensor, t54));
|
|
575
570
|
let t55;
|
|
576
|
-
if ($[149]
|
|
577
|
-
t55 =
|
|
571
|
+
if ($[149] === Symbol.for("react.memo_cache_sentinel")) {
|
|
572
|
+
t55 = {
|
|
573
|
+
coordinateGetter: sortableKeyboardCoordinates
|
|
574
|
+
};
|
|
575
|
+
$[149] = t55;
|
|
576
|
+
} else t55 = $[149];
|
|
577
|
+
const sensors = useSensors(useSensor(PointerSensor, t54), useSensor(KeyboardSensor, t55));
|
|
578
|
+
let t56;
|
|
579
|
+
if ($[150] !== allLeafColumns || $[151] !== setColumnOrder || $[152] !== table.atoms) {
|
|
580
|
+
t56 = (event)=>{
|
|
578
581
|
const { active, over } = event;
|
|
579
582
|
if (!over || active.id === over.id) return;
|
|
580
583
|
const columnOrderAtom = table.atoms.columnOrder.get();
|
|
@@ -584,60 +587,60 @@ const TableProvider = (props)=>{
|
|
|
584
587
|
const newOrder_0 = arrayMove(currentOrder, oldIndex, newIndex);
|
|
585
588
|
setColumnOrder(newOrder_0);
|
|
586
589
|
};
|
|
587
|
-
$[
|
|
588
|
-
$[
|
|
589
|
-
$[
|
|
590
|
-
$[
|
|
591
|
-
} else
|
|
592
|
-
const handleDragEnd =
|
|
593
|
-
let
|
|
594
|
-
if ($[
|
|
595
|
-
|
|
596
|
-
$[
|
|
597
|
-
$[
|
|
598
|
-
$[
|
|
599
|
-
$[
|
|
600
|
-
} else
|
|
601
|
-
const columnIds =
|
|
602
|
-
const
|
|
603
|
-
const
|
|
604
|
-
const
|
|
605
|
-
let
|
|
606
|
-
if ($[
|
|
607
|
-
|
|
590
|
+
$[150] = allLeafColumns;
|
|
591
|
+
$[151] = setColumnOrder;
|
|
592
|
+
$[152] = table.atoms;
|
|
593
|
+
$[153] = t56;
|
|
594
|
+
} else t56 = $[153];
|
|
595
|
+
const handleDragEnd = t56;
|
|
596
|
+
let t57;
|
|
597
|
+
if ($[154] !== allLeafColumns || $[155] !== alwaysPinnedLeft || $[156] !== columnDndEnabled) {
|
|
598
|
+
t57 = columnDndEnabled ? allLeafColumns.filter((c_0)=>!alwaysPinnedLeft.includes(c_0.id)).map(_temp3) : [];
|
|
599
|
+
$[154] = allLeafColumns;
|
|
600
|
+
$[155] = alwaysPinnedLeft;
|
|
601
|
+
$[156] = columnDndEnabled;
|
|
602
|
+
$[157] = t57;
|
|
603
|
+
} else t57 = $[157];
|
|
604
|
+
const columnIds = t57;
|
|
605
|
+
const t58 = columnDndEnabled ? sensors : void 0;
|
|
606
|
+
const t59 = columnDndEnabled ? closestCenter : void 0;
|
|
607
|
+
const t60 = columnDndEnabled ? handleDragEnd : void 0;
|
|
608
|
+
let t61;
|
|
609
|
+
if ($[158] !== children || $[159] !== columnIds) {
|
|
610
|
+
t61 = /*#__PURE__*/ jsx(SortableContext, {
|
|
608
611
|
items: columnIds,
|
|
609
612
|
strategy: horizontalListSortingStrategy,
|
|
610
613
|
children: children
|
|
611
614
|
});
|
|
612
|
-
$[
|
|
613
|
-
$[
|
|
614
|
-
$[
|
|
615
|
-
} else
|
|
616
|
-
let
|
|
617
|
-
if ($[
|
|
618
|
-
|
|
619
|
-
sensors:
|
|
620
|
-
collisionDetection:
|
|
621
|
-
onDragEnd:
|
|
622
|
-
children:
|
|
615
|
+
$[158] = children;
|
|
616
|
+
$[159] = columnIds;
|
|
617
|
+
$[160] = t61;
|
|
618
|
+
} else t61 = $[160];
|
|
619
|
+
let t62;
|
|
620
|
+
if ($[161] !== t58 || $[162] !== t59 || $[163] !== t60 || $[164] !== t61) {
|
|
621
|
+
t62 = /*#__PURE__*/ jsx(DndContext, {
|
|
622
|
+
sensors: t58,
|
|
623
|
+
collisionDetection: t59,
|
|
624
|
+
onDragEnd: t60,
|
|
625
|
+
children: t61
|
|
623
626
|
});
|
|
624
|
-
$[160] = t57;
|
|
625
627
|
$[161] = t58;
|
|
626
628
|
$[162] = t59;
|
|
627
629
|
$[163] = t60;
|
|
628
630
|
$[164] = t61;
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
631
|
+
$[165] = t62;
|
|
632
|
+
} else t62 = $[165];
|
|
633
|
+
let t63;
|
|
634
|
+
if ($[166] !== contextValue || $[167] !== t62) {
|
|
635
|
+
t63 = /*#__PURE__*/ jsx(TableContext.Provider, {
|
|
633
636
|
value: contextValue,
|
|
634
|
-
children:
|
|
637
|
+
children: t62
|
|
635
638
|
});
|
|
636
|
-
$[
|
|
637
|
-
$[166] = t61;
|
|
639
|
+
$[166] = contextValue;
|
|
638
640
|
$[167] = t62;
|
|
639
|
-
|
|
640
|
-
|
|
641
|
+
$[168] = t63;
|
|
642
|
+
} else t63 = $[168];
|
|
643
|
+
return t63;
|
|
641
644
|
};
|
|
642
645
|
function _temp() {
|
|
643
646
|
return true;
|
|
@@ -56,6 +56,7 @@ export interface TableContextValue<T extends RowData> {
|
|
|
56
56
|
onMasterCellClick?: (rowId: string) => void;
|
|
57
57
|
activeRowId: string | null;
|
|
58
58
|
onSettingsOpenChange?: (open: boolean) => void;
|
|
59
|
+
deferColumnVisibility: boolean;
|
|
59
60
|
}
|
|
60
61
|
export interface TableProviderProps<T extends RowData> extends Omit<TableProps<T>, 'children' | 'aria-label'> {
|
|
61
62
|
children: ReactNode;
|
|
@@ -13,7 +13,7 @@ import { VStack } from "../../Stack/index.js";
|
|
|
13
13
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../../Tooltip/index.js";
|
|
14
14
|
import { TABLE_DRAG_HANDLE_COLUMN_ID, TABLE_EXPAND_COLUMN_ID, TABLE_SELECT_COLUMN_ID, collectDirectChildren, withTableState } from "../lib/index.js";
|
|
15
15
|
import { useTableContext } from "../TableContext/index.js";
|
|
16
|
-
import { TableSettingsMenuContentProvider } from "./TableSettingsMenuContentContext.js";
|
|
16
|
+
import { EMPTY_VISIBILITY_DRAFT, TableSettingsMenuContentProvider } from "./TableSettingsMenuContentContext.js";
|
|
17
17
|
import { useTableSettingsMenuContext } from "./TableSettingsMenuContext.js";
|
|
18
18
|
import { TableSettingsMenuItem } from "./TableSettingsMenuItem.js";
|
|
19
19
|
import { TableSettingsMenuReset } from "./TableSettingsMenuReset.js";
|
|
@@ -24,18 +24,31 @@ const TableSettingsMenu = ({ 'data-testid': testIdProp, children, ...rest })=>{
|
|
|
24
24
|
const testId = useTestId('settings-menu', testIdProp);
|
|
25
25
|
const { anchorNode } = useTableSettingsMenuContext();
|
|
26
26
|
const ctx = useTableContext();
|
|
27
|
-
const { table, alwaysPinnedLeft, masterColumnId, columnGroups, onSettingsOpenChange } = ctx;
|
|
27
|
+
const { table, alwaysPinnedLeft, masterColumnId, columnGroups, onSettingsOpenChange, deferColumnVisibility, defaultColumnVisibility } = ctx;
|
|
28
28
|
const hasTextDescription = table.getAllLeafColumns().some((col)=>col.columnDef.meta?.description?.type === 'text');
|
|
29
29
|
const [search, setSearch] = useState('');
|
|
30
30
|
const [menuOpen, setMenuOpen] = useState(false);
|
|
31
|
+
const [visibilityDraft, setVisibilityDraft] = useState(EMPTY_VISIBILITY_DRAFT);
|
|
31
32
|
const contentRef = useRef(null);
|
|
32
33
|
const [lockedWidth, setLockedWidth] = useState();
|
|
33
34
|
const handleOpenChange = (open)=>{
|
|
34
35
|
setMenuOpen(open);
|
|
35
36
|
if (open) setSearch('');
|
|
36
37
|
else setLockedWidth(void 0);
|
|
38
|
+
if (!open && deferColumnVisibility) applyVisibilityDraft();
|
|
39
|
+
setVisibilityDraft(EMPTY_VISIBILITY_DRAFT);
|
|
37
40
|
onSettingsOpenChange?.(open);
|
|
38
41
|
};
|
|
42
|
+
const applyVisibilityDraft = ()=>{
|
|
43
|
+
const { fromDefault, toggles } = visibilityDraft;
|
|
44
|
+
const base = fromDefault ? defaultColumnVisibility ?? {} : table.atoms.columnVisibility.get();
|
|
45
|
+
const changed = Object.entries(toggles).filter(([id, visible])=>false !== base[id] !== visible);
|
|
46
|
+
if (!fromDefault && 0 === changed.length) return;
|
|
47
|
+
table.setColumnVisibility({
|
|
48
|
+
...base,
|
|
49
|
+
...Object.fromEntries(changed)
|
|
50
|
+
});
|
|
51
|
+
};
|
|
39
52
|
useLayoutEffect(()=>{
|
|
40
53
|
if (!menuOpen) return;
|
|
41
54
|
let raf = requestAnimationFrame(function measure() {
|
|
@@ -137,7 +150,9 @@ const TableSettingsMenu = ({ 'data-testid': testIdProp, children, ...rest })=>{
|
|
|
137
150
|
const content = /*#__PURE__*/ jsx(TableSettingsMenuContentProvider, {
|
|
138
151
|
value: {
|
|
139
152
|
search,
|
|
140
|
-
setSearch
|
|
153
|
+
setSearch,
|
|
154
|
+
visibilityDraft,
|
|
155
|
+
setVisibilityDraft
|
|
141
156
|
},
|
|
142
157
|
children: /*#__PURE__*/ jsx("div", {
|
|
143
158
|
"data-testid": testId,
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
interface TableSettingsMenuContentContextValue {
|
|
2
2
|
search: string;
|
|
3
3
|
setSearch: (value: string) => void;
|
|
4
|
+
/**
|
|
5
|
+
* Visibility held while the menu is open (`deferColumnVisibility`), applied
|
|
6
|
+
* to the table on close. Untouched when not deferring.
|
|
7
|
+
*/
|
|
8
|
+
visibilityDraft: VisibilityDraft;
|
|
9
|
+
setVisibilityDraft: (draft: VisibilityDraft) => void;
|
|
4
10
|
}
|
|
11
|
+
export interface VisibilityDraft {
|
|
12
|
+
/** "Reset to default" was pressed: the draft starts from the default, not the table. */
|
|
13
|
+
fromDefault: boolean;
|
|
14
|
+
/** Per-column toggles on top of that base. */
|
|
15
|
+
toggles: Record<string, boolean>;
|
|
16
|
+
}
|
|
17
|
+
export declare const EMPTY_VISIBILITY_DRAFT: VisibilityDraft;
|
|
5
18
|
export declare const TableSettingsMenuContentProvider: import("react").Provider<TableSettingsMenuContentContextValue | null>;
|
|
6
19
|
export declare const useTableSettingsMenuContentContext: () => TableSettingsMenuContentContextValue;
|
|
7
20
|
export {};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { createContext, useContext } from "react";
|
|
2
|
+
const EMPTY_VISIBILITY_DRAFT = {
|
|
3
|
+
fromDefault: false,
|
|
4
|
+
toggles: {}
|
|
5
|
+
};
|
|
2
6
|
const TableSettingsMenuContentContext = /*#__PURE__*/ createContext(null);
|
|
3
7
|
const TableSettingsMenuContentProvider = TableSettingsMenuContentContext.Provider;
|
|
4
8
|
const useTableSettingsMenuContentContext = ()=>{
|
|
@@ -6,4 +10,4 @@ const useTableSettingsMenuContentContext = ()=>{
|
|
|
6
10
|
if (!ctx) throw new Error("TableSettingsMenu item components must be rendered inside <TableSettingsMenu>");
|
|
7
11
|
return ctx;
|
|
8
12
|
};
|
|
9
|
-
export { TableSettingsMenuContentProvider, useTableSettingsMenuContentContext };
|
|
13
|
+
export { EMPTY_VISIBILITY_DRAFT, TableSettingsMenuContentProvider, useTableSettingsMenuContentContext };
|
|
@@ -8,8 +8,9 @@ import { useTestId } from "../../../utils/testId.js";
|
|
|
8
8
|
import { Switch, SwitchControl, SwitchLabel } from "../../Switch/index.js";
|
|
9
9
|
import { useTableValue } from "../lib/index.js";
|
|
10
10
|
import { useTableContext } from "../TableContext/index.js";
|
|
11
|
+
import { useTableSettingsMenuContentContext } from "./TableSettingsMenuContentContext.js";
|
|
11
12
|
const TableSettingsMenuItem = (t0)=>{
|
|
12
|
-
const $ = c(
|
|
13
|
+
const $ = c(57);
|
|
13
14
|
let className;
|
|
14
15
|
let columnId;
|
|
15
16
|
let rest;
|
|
@@ -27,7 +28,8 @@ const TableSettingsMenuItem = (t0)=>{
|
|
|
27
28
|
rest = $[3];
|
|
28
29
|
testIdProp = $[4];
|
|
29
30
|
}
|
|
30
|
-
const { masterColumnId, columnDndEnabled, columnGroups, table } = useTableContext();
|
|
31
|
+
const { masterColumnId, columnDndEnabled, columnGroups, table, deferColumnVisibility, defaultColumnVisibility } = useTableContext();
|
|
32
|
+
const { visibilityDraft, setVisibilityDraft } = useTableSettingsMenuContentContext();
|
|
31
33
|
const grouped = !!columnGroups;
|
|
32
34
|
const slotTestId = useTestId("settings-menu-item");
|
|
33
35
|
const switchTestId = useTestId(`settings-menu-item-${columnId}`, testIdProp);
|
|
@@ -45,7 +47,8 @@ const TableSettingsMenuItem = (t0)=>{
|
|
|
45
47
|
$[8] = column;
|
|
46
48
|
$[9] = t2;
|
|
47
49
|
} else t2 = $[9];
|
|
48
|
-
const
|
|
50
|
+
const isTableVisible = useTableValue(t2);
|
|
51
|
+
const isVisible = visibilityDraft.toggles[columnId] ?? (visibilityDraft.fromDefault ? defaultColumnVisibility?.[columnId] !== false : isTableVisible);
|
|
49
52
|
let t3;
|
|
50
53
|
if ($[10] !== column) {
|
|
51
54
|
t3 = ()=>column?.getCanHide() ?? false;
|
|
@@ -121,33 +124,43 @@ const TableSettingsMenuItem = (t0)=>{
|
|
|
121
124
|
$[30] = t13;
|
|
122
125
|
} else t13 = $[30];
|
|
123
126
|
let t14;
|
|
124
|
-
if ($[31] !== column) {
|
|
125
|
-
t14 = (details)=>
|
|
127
|
+
if ($[31] !== column || $[32] !== columnId || $[33] !== deferColumnVisibility || $[34] !== setVisibilityDraft || $[35] !== visibilityDraft) {
|
|
128
|
+
t14 = (details)=>deferColumnVisibility ? setVisibilityDraft({
|
|
129
|
+
...visibilityDraft,
|
|
130
|
+
toggles: {
|
|
131
|
+
...visibilityDraft.toggles,
|
|
132
|
+
[columnId]: details.checked
|
|
133
|
+
}
|
|
134
|
+
}) : column.toggleVisibility(details.checked);
|
|
126
135
|
$[31] = column;
|
|
127
|
-
$[32] =
|
|
128
|
-
|
|
136
|
+
$[32] = columnId;
|
|
137
|
+
$[33] = deferColumnVisibility;
|
|
138
|
+
$[34] = setVisibilityDraft;
|
|
139
|
+
$[35] = visibilityDraft;
|
|
140
|
+
$[36] = t14;
|
|
141
|
+
} else t14 = $[36];
|
|
129
142
|
const t15 = isMasterColumn || !canHide;
|
|
130
143
|
let t16;
|
|
131
|
-
if ($[
|
|
144
|
+
if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
|
|
132
145
|
t16 = cn("flex-1 truncate");
|
|
133
|
-
$[
|
|
134
|
-
} else t16 = $[
|
|
146
|
+
$[37] = t16;
|
|
147
|
+
} else t16 = $[37];
|
|
135
148
|
let t17;
|
|
136
|
-
if ($[
|
|
149
|
+
if ($[38] !== header) {
|
|
137
150
|
t17 = /*#__PURE__*/ jsx(SwitchLabel, {
|
|
138
151
|
className: t16,
|
|
139
152
|
children: header
|
|
140
153
|
});
|
|
141
|
-
$[
|
|
142
|
-
$[
|
|
143
|
-
} else t17 = $[
|
|
154
|
+
$[38] = header;
|
|
155
|
+
$[39] = t17;
|
|
156
|
+
} else t17 = $[39];
|
|
144
157
|
let t18;
|
|
145
|
-
if ($[
|
|
158
|
+
if ($[40] === Symbol.for("react.memo_cache_sentinel")) {
|
|
146
159
|
t18 = /*#__PURE__*/ jsx(SwitchControl, {});
|
|
147
|
-
$[
|
|
148
|
-
} else t18 = $[
|
|
160
|
+
$[40] = t18;
|
|
161
|
+
} else t18 = $[40];
|
|
149
162
|
let t19;
|
|
150
|
-
if ($[
|
|
163
|
+
if ($[41] !== isVisible || $[42] !== rest || $[43] !== switchTestId || $[44] !== t13 || $[45] !== t14 || $[46] !== t15 || $[47] !== t17) {
|
|
151
164
|
t19 = /*#__PURE__*/ jsxs(Switch, {
|
|
152
165
|
...rest,
|
|
153
166
|
"data-testid": switchTestId,
|
|
@@ -160,17 +173,17 @@ const TableSettingsMenuItem = (t0)=>{
|
|
|
160
173
|
t18
|
|
161
174
|
]
|
|
162
175
|
});
|
|
163
|
-
$[
|
|
164
|
-
$[
|
|
165
|
-
$[
|
|
166
|
-
$[
|
|
167
|
-
$[
|
|
168
|
-
$[
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
171
|
-
} else t19 = $[
|
|
176
|
+
$[41] = isVisible;
|
|
177
|
+
$[42] = rest;
|
|
178
|
+
$[43] = switchTestId;
|
|
179
|
+
$[44] = t13;
|
|
180
|
+
$[45] = t14;
|
|
181
|
+
$[46] = t15;
|
|
182
|
+
$[47] = t17;
|
|
183
|
+
$[48] = t19;
|
|
184
|
+
} else t19 = $[48];
|
|
172
185
|
let t20;
|
|
173
|
-
if ($[
|
|
186
|
+
if ($[49] !== setNodeRef || $[50] !== slotTestId || $[51] !== style || $[52] !== t10 || $[53] !== t11 || $[54] !== t12 || $[55] !== t19) {
|
|
174
187
|
t20 = /*#__PURE__*/ jsxs("div", {
|
|
175
188
|
ref: setNodeRef,
|
|
176
189
|
style: style,
|
|
@@ -182,15 +195,15 @@ const TableSettingsMenuItem = (t0)=>{
|
|
|
182
195
|
t19
|
|
183
196
|
]
|
|
184
197
|
});
|
|
185
|
-
$[
|
|
186
|
-
$[
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
189
|
-
$[
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
192
|
-
$[
|
|
193
|
-
} else t20 = $[
|
|
198
|
+
$[49] = setNodeRef;
|
|
199
|
+
$[50] = slotTestId;
|
|
200
|
+
$[51] = style;
|
|
201
|
+
$[52] = t10;
|
|
202
|
+
$[53] = t11;
|
|
203
|
+
$[54] = t12;
|
|
204
|
+
$[55] = t19;
|
|
205
|
+
$[56] = t20;
|
|
206
|
+
} else t20 = $[56];
|
|
194
207
|
return t20;
|
|
195
208
|
};
|
|
196
209
|
TableSettingsMenuItem.displayName = "TableSettingsMenuItem";
|
|
@@ -4,8 +4,9 @@ import { isEqual } from "../../../utils/isEqual.js";
|
|
|
4
4
|
import { useTestId } from "../../../utils/testId.js";
|
|
5
5
|
import { Button } from "../../Button/index.js";
|
|
6
6
|
import { useTableContext } from "../TableContext/index.js";
|
|
7
|
+
import { useTableSettingsMenuContentContext } from "./TableSettingsMenuContentContext.js";
|
|
7
8
|
const TableSettingsMenuReset = (t0)=>{
|
|
8
|
-
const $ = c(
|
|
9
|
+
const $ = c(32);
|
|
9
10
|
let onClick;
|
|
10
11
|
let rest;
|
|
11
12
|
let testIdProp;
|
|
@@ -21,47 +22,71 @@ const TableSettingsMenuReset = (t0)=>{
|
|
|
21
22
|
testIdProp = $[3];
|
|
22
23
|
}
|
|
23
24
|
const testId = useTestId("settings-menu-reset", testIdProp);
|
|
24
|
-
const { table, visibilityEnabled, columnDndEnabled, defaultColumnVisibility, defaultColumnOrder, setColumnOrder } = useTableContext();
|
|
25
|
+
const { table, visibilityEnabled, columnDndEnabled, defaultColumnVisibility, defaultColumnOrder, setColumnOrder, deferColumnVisibility } = useTableContext();
|
|
26
|
+
const { visibilityDraft, setVisibilityDraft } = useTableSettingsMenuContentContext();
|
|
25
27
|
let t1;
|
|
26
|
-
if ($[4] !== columnDndEnabled || $[5] !== defaultColumnOrder || $[6] !== defaultColumnVisibility || $[7] !==
|
|
28
|
+
if ($[4] !== columnDndEnabled || $[5] !== defaultColumnOrder || $[6] !== defaultColumnVisibility || $[7] !== deferColumnVisibility || $[8] !== onClick || $[9] !== setColumnOrder || $[10] !== setVisibilityDraft || $[11] !== table || $[12] !== visibilityEnabled) {
|
|
27
29
|
t1 = (event)=>{
|
|
28
30
|
onClick?.(event);
|
|
29
31
|
if (event.defaultPrevented) return;
|
|
30
|
-
if (defaultColumnVisibility && visibilityEnabled)
|
|
32
|
+
if (defaultColumnVisibility && visibilityEnabled) if (deferColumnVisibility) setVisibilityDraft({
|
|
33
|
+
fromDefault: true,
|
|
34
|
+
toggles: {}
|
|
35
|
+
});
|
|
36
|
+
else table.setColumnVisibility(defaultColumnVisibility);
|
|
31
37
|
if (defaultColumnOrder && columnDndEnabled) setColumnOrder(defaultColumnOrder);
|
|
32
38
|
};
|
|
33
39
|
$[4] = columnDndEnabled;
|
|
34
40
|
$[5] = defaultColumnOrder;
|
|
35
41
|
$[6] = defaultColumnVisibility;
|
|
36
|
-
$[7] =
|
|
37
|
-
$[8] =
|
|
38
|
-
$[9] =
|
|
39
|
-
$[10] =
|
|
40
|
-
$[11] =
|
|
41
|
-
|
|
42
|
+
$[7] = deferColumnVisibility;
|
|
43
|
+
$[8] = onClick;
|
|
44
|
+
$[9] = setColumnOrder;
|
|
45
|
+
$[10] = setVisibilityDraft;
|
|
46
|
+
$[11] = table;
|
|
47
|
+
$[12] = visibilityEnabled;
|
|
48
|
+
$[13] = t1;
|
|
49
|
+
} else t1 = $[13];
|
|
42
50
|
const handleClick = t1;
|
|
43
51
|
const { columnVisibility: currentVisibility, columnOrder: currentOrder } = table.state;
|
|
44
52
|
const effectiveOrder = 0 === currentOrder.length ? defaultColumnOrder : currentOrder;
|
|
53
|
+
const { fromDefault, toggles } = visibilityDraft;
|
|
45
54
|
let t2;
|
|
46
|
-
if ($[
|
|
47
|
-
t2 =
|
|
48
|
-
$[
|
|
49
|
-
$[
|
|
50
|
-
$[
|
|
51
|
-
} else t2 = $[
|
|
52
|
-
const
|
|
55
|
+
if ($[14] !== fromDefault || $[15] !== toggles) {
|
|
56
|
+
t2 = fromDefault || Object.keys(toggles).length > 0;
|
|
57
|
+
$[14] = fromDefault;
|
|
58
|
+
$[15] = toggles;
|
|
59
|
+
$[16] = t2;
|
|
60
|
+
} else t2 = $[16];
|
|
61
|
+
const hasDraft = t2;
|
|
53
62
|
let t3;
|
|
54
|
-
if ($[
|
|
55
|
-
t3 = !
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
63
|
+
if ($[17] !== currentVisibility || $[18] !== defaultColumnVisibility || $[19] !== fromDefault || $[20] !== hasDraft || $[21] !== table || $[22] !== toggles) {
|
|
64
|
+
t3 = !defaultColumnVisibility || (hasDraft ? table.getAllLeafColumns().every((column)=>{
|
|
65
|
+
const base = fromDefault ? defaultColumnVisibility : currentVisibility;
|
|
66
|
+
const shown = toggles[column.id] ?? false !== base[column.id];
|
|
67
|
+
return shown === (false !== defaultColumnVisibility[column.id]);
|
|
68
|
+
}) : isEqual(currentVisibility, defaultColumnVisibility));
|
|
69
|
+
$[17] = currentVisibility;
|
|
70
|
+
$[18] = defaultColumnVisibility;
|
|
71
|
+
$[19] = fromDefault;
|
|
72
|
+
$[20] = hasDraft;
|
|
73
|
+
$[21] = table;
|
|
74
|
+
$[22] = toggles;
|
|
75
|
+
$[23] = t3;
|
|
76
|
+
} else t3 = $[23];
|
|
77
|
+
const visibilityMatch = t3;
|
|
62
78
|
let t4;
|
|
63
|
-
if ($[
|
|
64
|
-
t4 =
|
|
79
|
+
if ($[24] !== defaultColumnOrder || $[25] !== effectiveOrder) {
|
|
80
|
+
t4 = !defaultColumnOrder || isEqual(effectiveOrder, defaultColumnOrder);
|
|
81
|
+
$[24] = defaultColumnOrder;
|
|
82
|
+
$[25] = effectiveOrder;
|
|
83
|
+
$[26] = t4;
|
|
84
|
+
} else t4 = $[26];
|
|
85
|
+
const orderMatch = t4;
|
|
86
|
+
const isDefaultState = visibilityMatch && orderMatch;
|
|
87
|
+
let t5;
|
|
88
|
+
if ($[27] !== handleClick || $[28] !== isDefaultState || $[29] !== rest || $[30] !== testId) {
|
|
89
|
+
t5 = /*#__PURE__*/ jsx(Button, {
|
|
65
90
|
...rest,
|
|
66
91
|
type: "button",
|
|
67
92
|
"data-testid": testId,
|
|
@@ -73,13 +98,13 @@ const TableSettingsMenuReset = (t0)=>{
|
|
|
73
98
|
fullWidth: true,
|
|
74
99
|
children: "Reset to default"
|
|
75
100
|
});
|
|
76
|
-
$[
|
|
77
|
-
$[
|
|
78
|
-
$[
|
|
79
|
-
$[
|
|
80
|
-
$[
|
|
81
|
-
} else
|
|
82
|
-
return
|
|
101
|
+
$[27] = handleClick;
|
|
102
|
+
$[28] = isDefaultState;
|
|
103
|
+
$[29] = rest;
|
|
104
|
+
$[30] = testId;
|
|
105
|
+
$[31] = t5;
|
|
106
|
+
} else t5 = $[31];
|
|
107
|
+
return t5;
|
|
83
108
|
};
|
|
84
109
|
TableSettingsMenuReset.displayName = "TableSettingsMenuReset";
|
|
85
110
|
export { TableSettingsMenuReset };
|
|
@@ -278,6 +278,13 @@ export interface TableProps<T> extends TestableProps {
|
|
|
278
278
|
* the close edge here.
|
|
279
279
|
*/
|
|
280
280
|
onSettingsOpenChange?: (open: boolean) => void;
|
|
281
|
+
/**
|
|
282
|
+
* Hold column-visibility toggles in the built-in settings menu until it
|
|
283
|
+
* closes, then apply them as one `columnVisibility` change. Without it each
|
|
284
|
+
* switch shows or hides its column at once — a column whose data the consumer
|
|
285
|
+
* only fetches on close then sits empty while the menu is open.
|
|
286
|
+
*/
|
|
287
|
+
deferColumnVisibility?: boolean;
|
|
281
288
|
/**
|
|
282
289
|
* Enable row virtualization. `'container'` virtualizes within the table's own scroll container;
|
|
283
290
|
* `'window'` follows the page scroll — the nearest scrollable ancestor, or the browser window.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.
|
|
3
|
-
"generatedAt": "2026-10-
|
|
2
|
+
"version": "2.6.0",
|
|
3
|
+
"generatedAt": "2026-10-13T14:34:30.624Z",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"name": "Accordion",
|
|
@@ -101586,6 +101586,12 @@
|
|
|
101586
101586
|
"required": false,
|
|
101587
101587
|
"description": "Labeled sections for the column-settings menu. When set, the menu renders\nthese groups (flat, non-reorderable — like the FilterInput field menu)\ninstead of the default pinned/unpinned drag-reorder list. See\n{@link TableColumnGroup}."
|
|
101588
101588
|
},
|
|
101589
|
+
{
|
|
101590
|
+
"name": "deferColumnVisibility",
|
|
101591
|
+
"type": "boolean | undefined",
|
|
101592
|
+
"required": false,
|
|
101593
|
+
"description": "Hold column-visibility toggles in the built-in settings menu until it\ncloses, then apply them as one `columnVisibility` change. Without it each\nswitch shows or hides its column at once — a column whose data the consumer\nonly fetches on close then sits empty while the menu is open."
|
|
101594
|
+
},
|
|
101589
101595
|
{
|
|
101590
101596
|
"name": "virtualized",
|
|
101591
101597
|
"type": "TableVirtualized | undefined",
|