@reportportal/ui-kit 0.0.1-alpha.164 → 0.0.1-alpha.165
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/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{table-5fc80c4b.js → table-03bd209d.js} +285 -285
- package/dist/table.js +1 -1
- package/package.json +1 -1
|
@@ -8,129 +8,129 @@ import { C as ae } from "./checkbox-493fdc63.js";
|
|
|
8
8
|
import { Tooltip as Pt } from "./tooltip.js";
|
|
9
9
|
import { createPortal as Bt } from "react-dom";
|
|
10
10
|
import { i as St } from "./isEmpty-ccacb5ff.js";
|
|
11
|
-
const tt = (t) => typeof t == "string", Gt = "
|
|
11
|
+
const tt = (t) => typeof t == "string", Gt = "_table_1se0v_1", Ft = "_resizable_1se0v_67", qt = "_selectable_1se0v_84", Ut = "_expanded_1se0v_80", Dt = "_label_1se0v_353", jt = {
|
|
12
12
|
table: Gt,
|
|
13
|
-
"fixed-header": "_fixed-
|
|
14
|
-
"external-scroll-container": "_external-scroll-
|
|
15
|
-
"horizontally-scrollable-container": "_horizontally-scrollable-
|
|
16
|
-
"table-header": "_table-
|
|
17
|
-
"sticky-header": "_sticky-
|
|
18
|
-
"pinned-header": "_pinned-
|
|
19
|
-
"horizontally-scrollable": "_horizontally-
|
|
13
|
+
"fixed-header": "_fixed-header_1se0v_10",
|
|
14
|
+
"external-scroll-container": "_external-scroll-container_1se0v_14",
|
|
15
|
+
"horizontally-scrollable-container": "_horizontally-scrollable-container_1se0v_21",
|
|
16
|
+
"table-header": "_table-header_1se0v_26",
|
|
17
|
+
"sticky-header": "_sticky-header_1se0v_34",
|
|
18
|
+
"pinned-header": "_pinned-header_1se0v_44",
|
|
19
|
+
"horizontally-scrollable": "_horizontally-scrollable_1se0v_21",
|
|
20
20
|
resizable: Ft,
|
|
21
|
-
"resizable-column": "_resizable-
|
|
22
|
-
"table-row": "_table-
|
|
23
|
-
"expanded-cell": "_expanded-
|
|
21
|
+
"resizable-column": "_resizable-column_1se0v_67",
|
|
22
|
+
"table-row": "_table-row_1se0v_75",
|
|
23
|
+
"expanded-cell": "_expanded-cell_1se0v_80",
|
|
24
24
|
selectable: qt,
|
|
25
|
-
"row-content-wrapper": "_row-content-
|
|
26
|
-
"pinned-column": "_pinned-
|
|
27
|
-
"has-scroll": "_has-
|
|
28
|
-
"table-row-content": "_table-row-
|
|
29
|
-
"expand-cell": "_expand-
|
|
30
|
-
"left-border-accent": "_left-border-
|
|
31
|
-
"size-small": "_size-
|
|
32
|
-
"size-large": "_size-
|
|
33
|
-
"table-body": "_table-
|
|
34
|
-
"scrollable-body": "_scrollable-
|
|
35
|
-
"table-header-cell": "_table-header-
|
|
36
|
-
"table-cell": "_table-
|
|
37
|
-
"action-menu-cell": "_action-menu-
|
|
38
|
-
"checkbox-cell": "_checkbox-
|
|
39
|
-
"expand-all-tooltip-wrapper": "_expand-all-tooltip-
|
|
40
|
-
"expand-all-tooltip-content": "_expand-all-tooltip-
|
|
41
|
-
"expand-icon": "_expand-
|
|
25
|
+
"row-content-wrapper": "_row-content-wrapper_1se0v_88",
|
|
26
|
+
"pinned-column": "_pinned-column_1se0v_96",
|
|
27
|
+
"has-scroll": "_has-scroll_1se0v_96",
|
|
28
|
+
"table-row-content": "_table-row-content_1se0v_99",
|
|
29
|
+
"expand-cell": "_expand-cell_1se0v_116",
|
|
30
|
+
"left-border-accent": "_left-border-accent_1se0v_119",
|
|
31
|
+
"size-small": "_size-small_1se0v_129",
|
|
32
|
+
"size-large": "_size-large_1se0v_140",
|
|
33
|
+
"table-body": "_table-body_1se0v_152",
|
|
34
|
+
"scrollable-body": "_scrollable-body_1se0v_158",
|
|
35
|
+
"table-header-cell": "_table-header-cell_1se0v_222",
|
|
36
|
+
"table-cell": "_table-cell_1se0v_223",
|
|
37
|
+
"action-menu-cell": "_action-menu-cell_1se0v_229",
|
|
38
|
+
"checkbox-cell": "_checkbox-cell_1se0v_257",
|
|
39
|
+
"expand-all-tooltip-wrapper": "_expand-all-tooltip-wrapper_1se0v_302",
|
|
40
|
+
"expand-all-tooltip-content": "_expand-all-tooltip-content_1se0v_311",
|
|
41
|
+
"expand-icon": "_expand-icon_1se0v_320",
|
|
42
42
|
expanded: Ut,
|
|
43
|
-
"primary-cell": "_primary-
|
|
43
|
+
"primary-cell": "_primary-cell_1se0v_329",
|
|
44
44
|
label: Dt,
|
|
45
|
-
"sortable-cell": "_sortable-
|
|
46
|
-
"align-right": "_align-
|
|
47
|
-
"align-center": "_align-
|
|
48
|
-
"table-wrapper": "_table-
|
|
49
|
-
"checkbox-column": "_checkbox-
|
|
50
|
-
"checkbox-header": "_checkbox-
|
|
51
|
-
"checkbox-body": "_checkbox-
|
|
52
|
-
"checkbox-row": "_checkbox-
|
|
53
|
-
}, nt = "asc", Z = 32,
|
|
45
|
+
"sortable-cell": "_sortable-cell_1se0v_367",
|
|
46
|
+
"align-right": "_align-right_1se0v_370",
|
|
47
|
+
"align-center": "_align-center_1se0v_376",
|
|
48
|
+
"table-wrapper": "_table-wrapper_1se0v_430",
|
|
49
|
+
"checkbox-column": "_checkbox-column_1se0v_442",
|
|
50
|
+
"checkbox-header": "_checkbox-header_1se0v_454",
|
|
51
|
+
"checkbox-body": "_checkbox-body_1se0v_478",
|
|
52
|
+
"checkbox-row": "_checkbox-row_1se0v_485"
|
|
53
|
+
}, nt = "asc", Z = 32, st = 100, Rt = 48, we = 48, Xt = (t) => t.toLowerCase() === nt, It = (t) => t.map((c) => c.key), C = (t) => "primary" in t && t.primary === !0, Qe = (t) => {
|
|
54
54
|
var o;
|
|
55
55
|
return `size-${((o = t.rowConfigs) == null ? void 0 : o.size) ?? "default"}`;
|
|
56
|
-
}, ye = (t) => tt(t) ? t : `${t}px`, Vt = (t, c, o,
|
|
56
|
+
}, ye = (t) => tt(t) ? t : `${t}px`, Vt = (t, c, o, i, p, u = !1) => {
|
|
57
57
|
let d = 0;
|
|
58
|
-
|
|
59
|
-
for (let
|
|
60
|
-
const
|
|
61
|
-
if (C(
|
|
62
|
-
const
|
|
63
|
-
d +=
|
|
58
|
+
i && (d += Z), p && !u && (d += Z);
|
|
59
|
+
for (let v = 0; v < t; v++) {
|
|
60
|
+
const l = c[v];
|
|
61
|
+
if (C(l)) {
|
|
62
|
+
const r = o.current.get(l.key) || st;
|
|
63
|
+
d += r;
|
|
64
64
|
} else {
|
|
65
|
-
const
|
|
65
|
+
const r = l, a = tt(r.width) ? parseInt(r.width, 10) || 0 : r.width;
|
|
66
66
|
d += a;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
return d;
|
|
70
|
-
}, de = (t, c, o,
|
|
71
|
-
const
|
|
70
|
+
}, de = (t, c, o, i, p, u, d, v = !1) => {
|
|
71
|
+
const l = {};
|
|
72
72
|
if (!C(t)) {
|
|
73
|
-
const
|
|
74
|
-
|
|
73
|
+
const r = t;
|
|
74
|
+
l.textAlign = r.align;
|
|
75
75
|
}
|
|
76
76
|
if (c && o !== void 0) {
|
|
77
|
-
const
|
|
77
|
+
const r = Vt(
|
|
78
78
|
o,
|
|
79
|
-
|
|
79
|
+
i,
|
|
80
80
|
p,
|
|
81
81
|
u,
|
|
82
82
|
d,
|
|
83
|
-
|
|
83
|
+
v
|
|
84
84
|
);
|
|
85
|
-
|
|
85
|
+
l.left = `${r}px`;
|
|
86
86
|
}
|
|
87
|
-
return
|
|
88
|
-
}, Ze = (t, c, o,
|
|
89
|
-
const
|
|
90
|
-
o &&
|
|
87
|
+
return l;
|
|
88
|
+
}, Ze = (t, c, o, i, p, u = !1, d, v = !1, l = !1) => {
|
|
89
|
+
const r = [];
|
|
90
|
+
o && r.push(`${Z}px`), u && i && !l && r.push(`${Z}px`);
|
|
91
91
|
const a = (b) => {
|
|
92
92
|
if ((d == null ? void 0 : d[b.key]) !== void 0) {
|
|
93
|
-
|
|
93
|
+
r.push(`${d[b.key]}px`);
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
96
|
if (C(b)) {
|
|
97
97
|
const y = b;
|
|
98
|
-
if (
|
|
99
|
-
|
|
98
|
+
if (v && y.width) {
|
|
99
|
+
r.push(ye(y.width));
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
|
-
const L = y.width ? ye(y.width) : `${
|
|
103
|
-
|
|
102
|
+
const L = y.width ? ye(y.width) : `${st}px`;
|
|
103
|
+
r.push(`minmax(${L}, 1fr)`);
|
|
104
104
|
} else {
|
|
105
105
|
const L = ye(b.width);
|
|
106
|
-
|
|
106
|
+
r.push(L);
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
|
-
return t.forEach(a), c.forEach(a), p &&
|
|
109
|
+
return t.forEach(a), c.forEach(a), p && r.push(`${Rt}px`), r.join(" ");
|
|
110
110
|
}, Ct = ({
|
|
111
111
|
primaryColumns: t,
|
|
112
112
|
fixedColumns: c,
|
|
113
113
|
pinnedColumnKeys: o
|
|
114
114
|
}) => Q(() => {
|
|
115
|
-
const
|
|
115
|
+
const i = [], p = [];
|
|
116
116
|
return t.forEach((u) => {
|
|
117
117
|
const d = { ...u, primary: !0 };
|
|
118
|
-
o.includes(u.key) ?
|
|
118
|
+
o.includes(u.key) ? i.push(d) : p.push(d);
|
|
119
119
|
}), c.forEach((u) => {
|
|
120
|
-
o.includes(u.key) ?
|
|
120
|
+
o.includes(u.key) ? i.push(u) : p.push(u);
|
|
121
121
|
}), {
|
|
122
|
-
pinnedColumns:
|
|
122
|
+
pinnedColumns: i,
|
|
123
123
|
scrollableColumns: p
|
|
124
124
|
};
|
|
125
125
|
}, [t, c, o]), Yt = () => {
|
|
126
|
-
const [t, c] = q(null), [o,
|
|
127
|
-
c(
|
|
126
|
+
const [t, c] = q(null), [o, i] = q(null), p = $((l) => {
|
|
127
|
+
c(l);
|
|
128
128
|
}, []), u = $(() => {
|
|
129
129
|
c(null);
|
|
130
|
-
}, []), d = $((
|
|
131
|
-
l
|
|
132
|
-
}, []),
|
|
133
|
-
|
|
130
|
+
}, []), d = $((l) => {
|
|
131
|
+
i(l);
|
|
132
|
+
}, []), v = $(() => {
|
|
133
|
+
i(null);
|
|
134
134
|
}, []);
|
|
135
135
|
return {
|
|
136
136
|
hoveredColumn: t,
|
|
@@ -138,53 +138,53 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
138
138
|
handleColumnMouseEnter: p,
|
|
139
139
|
handleColumnMouseLeave: u,
|
|
140
140
|
handleRowMouseEnter: d,
|
|
141
|
-
handleRowMouseLeave:
|
|
141
|
+
handleRowMouseLeave: v
|
|
142
142
|
};
|
|
143
143
|
}, Jt = ({
|
|
144
144
|
primaryColumns: t,
|
|
145
145
|
fixedColumns: c,
|
|
146
146
|
expandedRowIds: o,
|
|
147
|
-
onToggleRowExpansion:
|
|
147
|
+
onToggleRowExpansion: i
|
|
148
148
|
}) => {
|
|
149
149
|
const [p, u] = q(/* @__PURE__ */ new Set());
|
|
150
150
|
B(() => {
|
|
151
|
-
const
|
|
151
|
+
const l = [
|
|
152
152
|
...t.map((a) => a.key),
|
|
153
153
|
...c.map((a) => a.key)
|
|
154
|
-
],
|
|
154
|
+
], r = /* @__PURE__ */ new Set();
|
|
155
155
|
o.forEach((a) => {
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
l.forEach((b) => {
|
|
157
|
+
r.add(`${a}-${b}`);
|
|
158
158
|
});
|
|
159
159
|
}), u((a) => {
|
|
160
|
-
if (a.size ===
|
|
160
|
+
if (a.size === r.size) {
|
|
161
161
|
let b = !0;
|
|
162
162
|
if (a.forEach((y) => {
|
|
163
|
-
|
|
163
|
+
r.has(y) || (b = !1);
|
|
164
164
|
}), b)
|
|
165
165
|
return a;
|
|
166
166
|
}
|
|
167
|
-
return
|
|
167
|
+
return r;
|
|
168
168
|
});
|
|
169
169
|
}, [o, t, c]);
|
|
170
170
|
const d = $(
|
|
171
|
-
(
|
|
172
|
-
const
|
|
171
|
+
(l) => {
|
|
172
|
+
const r = new Set(p), a = o.includes(l), b = [
|
|
173
173
|
...t.map((y) => y.key),
|
|
174
174
|
...c.map((y) => y.key)
|
|
175
175
|
];
|
|
176
176
|
a ? b.forEach((y) => {
|
|
177
|
-
const L = `${
|
|
178
|
-
|
|
177
|
+
const L = `${l}-${y}`;
|
|
178
|
+
r.delete(L);
|
|
179
179
|
}) : b.forEach((y) => {
|
|
180
|
-
const L = `${
|
|
181
|
-
|
|
182
|
-
}), u(
|
|
180
|
+
const L = `${l}-${y}`;
|
|
181
|
+
r.add(L);
|
|
182
|
+
}), u(r), i(l);
|
|
183
183
|
},
|
|
184
|
-
[p, o, t, c,
|
|
185
|
-
),
|
|
186
|
-
(
|
|
187
|
-
const a = `${
|
|
184
|
+
[p, o, t, c, i]
|
|
185
|
+
), v = $(
|
|
186
|
+
(l, r) => {
|
|
187
|
+
const a = `${l}-${r}`;
|
|
188
188
|
return p.has(a);
|
|
189
189
|
},
|
|
190
190
|
[p]
|
|
@@ -192,14 +192,14 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
192
192
|
return {
|
|
193
193
|
expandedCells: p,
|
|
194
194
|
handleToggleRowExpansion: d,
|
|
195
|
-
isCellExpanded:
|
|
195
|
+
isCellExpanded: v
|
|
196
196
|
};
|
|
197
197
|
}, Qt = () => {
|
|
198
198
|
const t = P(/* @__PURE__ */ new Map()), c = $(
|
|
199
|
-
(o) => (
|
|
200
|
-
if (!
|
|
199
|
+
(o) => (i) => {
|
|
200
|
+
if (!i)
|
|
201
201
|
return;
|
|
202
|
-
const p =
|
|
202
|
+
const p = i.getBoundingClientRect().width;
|
|
203
203
|
p > 0 && t.current.set(o, p);
|
|
204
204
|
},
|
|
205
205
|
[]
|
|
@@ -212,62 +212,62 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
212
212
|
enabled: t = !1,
|
|
213
213
|
minWidth: c = 50,
|
|
214
214
|
maxWidth: o = 500,
|
|
215
|
-
columns:
|
|
215
|
+
columns: i = [],
|
|
216
216
|
columnWidthsRef: p,
|
|
217
217
|
onColumnResize: u,
|
|
218
218
|
initialColumnWidths: d
|
|
219
219
|
}) => {
|
|
220
|
-
const [
|
|
220
|
+
const [v, l] = q({}), r = P(i), a = P(void 0);
|
|
221
221
|
B(() => {
|
|
222
|
-
|
|
223
|
-
}, [
|
|
222
|
+
r.current = i;
|
|
223
|
+
}, [i]);
|
|
224
224
|
const b = $(
|
|
225
|
-
(
|
|
226
|
-
const T =
|
|
225
|
+
(_) => {
|
|
226
|
+
const T = i.find((k) => k.key === _);
|
|
227
227
|
return {
|
|
228
228
|
minWidth: (T == null ? void 0 : T.minWidth) ?? c,
|
|
229
229
|
maxWidth: (T == null ? void 0 : T.maxWidth) ?? o
|
|
230
230
|
};
|
|
231
231
|
},
|
|
232
|
-
[
|
|
232
|
+
[i, c, o]
|
|
233
233
|
);
|
|
234
234
|
B(() => {
|
|
235
235
|
if (d && a.current !== d) {
|
|
236
236
|
const T = {};
|
|
237
237
|
Object.entries(d).forEach(([k, M]) => {
|
|
238
|
-
const z =
|
|
238
|
+
const z = r.current.find((X) => X.key === k), S = (z == null ? void 0 : z.minWidth) ?? c, A = (z == null ? void 0 : z.maxWidth) ?? o;
|
|
239
239
|
T[k] = Math.min(A, Math.max(S, M));
|
|
240
|
-
}),
|
|
240
|
+
}), l(T), a.current = d;
|
|
241
241
|
}
|
|
242
242
|
}, [d, c, o]);
|
|
243
243
|
const y = $(() => {
|
|
244
|
-
if (!t || Object.keys(
|
|
244
|
+
if (!t || Object.keys(v).length > 0 || !p)
|
|
245
245
|
return;
|
|
246
|
-
const
|
|
246
|
+
const _ = {};
|
|
247
247
|
p.current.forEach((T, k) => {
|
|
248
|
-
|
|
249
|
-
}),
|
|
250
|
-
}, [t,
|
|
251
|
-
(
|
|
248
|
+
_[k] = T;
|
|
249
|
+
}), l(_);
|
|
250
|
+
}, [t, v, p]), L = $(
|
|
251
|
+
(_) => (T, { size: k }) => {
|
|
252
252
|
if (!t)
|
|
253
253
|
return;
|
|
254
|
-
const { minWidth: M, maxWidth: z } = b(
|
|
255
|
-
|
|
254
|
+
const { minWidth: M, maxWidth: z } = b(_), S = Math.min(z, Math.max(M, k.width));
|
|
255
|
+
l((A) => ({ ...A, [_]: S }));
|
|
256
256
|
},
|
|
257
257
|
[t, b]
|
|
258
258
|
), W = $(
|
|
259
|
-
(
|
|
260
|
-
!t || !_
|
|
259
|
+
(_) => () => {
|
|
260
|
+
!t || !v[_] || u == null || u(_, v[_]);
|
|
261
261
|
},
|
|
262
|
-
[t,
|
|
262
|
+
[t, v, u]
|
|
263
263
|
);
|
|
264
264
|
return {
|
|
265
|
-
columnWidths:
|
|
265
|
+
columnWidths: v,
|
|
266
266
|
handleResize: L,
|
|
267
267
|
handleResizeStop: W,
|
|
268
268
|
handleResizeStart: y
|
|
269
269
|
};
|
|
270
|
-
}, Ot = (t, c, o,
|
|
270
|
+
}, Ot = (t, c, o, i, p, u, d, v) => Q(() => {
|
|
271
271
|
if (!t)
|
|
272
272
|
return {
|
|
273
273
|
visible: !1,
|
|
@@ -280,13 +280,13 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
280
280
|
position: { top: 0, left: 0 },
|
|
281
281
|
size: { width: 0, height: 0 }
|
|
282
282
|
};
|
|
283
|
-
const
|
|
284
|
-
|
|
283
|
+
const r = t.getBoundingClientRect(), a = (c == null ? void 0 : c.offsetHeight) || 0, b = o == null ? void 0 : o.getBoundingClientRect(), y = Math.min(
|
|
284
|
+
r.bottom,
|
|
285
285
|
(b == null ? void 0 : b.bottom) || Number.MAX_SAFE_INTEGER
|
|
286
286
|
);
|
|
287
287
|
let L;
|
|
288
|
-
|
|
289
|
-
const W =
|
|
288
|
+
i && o && b ? L = b.top - r.top + a : L = a;
|
|
289
|
+
const W = r.top + L, T = t.scrollWidth > t.clientWidth ? t.offsetHeight - t.clientHeight : 0, k = y - W - T, z = t.scrollHeight > t.clientHeight ? t.offsetWidth - t.clientWidth : 0, S = r.right - we - z;
|
|
290
290
|
return {
|
|
291
291
|
visible: !0,
|
|
292
292
|
position: {
|
|
@@ -302,12 +302,12 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
302
302
|
t,
|
|
303
303
|
c,
|
|
304
304
|
o,
|
|
305
|
-
|
|
305
|
+
i,
|
|
306
306
|
p,
|
|
307
307
|
u,
|
|
308
308
|
d,
|
|
309
|
-
|
|
310
|
-
]), Kt = (t, c, o,
|
|
309
|
+
v
|
|
310
|
+
]), Kt = (t, c, o, i, p, u, d, v) => Q(() => {
|
|
311
311
|
if (!t)
|
|
312
312
|
return {
|
|
313
313
|
visible: !1,
|
|
@@ -320,14 +320,14 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
320
320
|
position: { top: 0, left: 0 },
|
|
321
321
|
size: { width: 0, height: 0 }
|
|
322
322
|
};
|
|
323
|
-
const
|
|
324
|
-
if (!
|
|
323
|
+
const r = t.querySelector('[data-row-index="0"]');
|
|
324
|
+
if (!r)
|
|
325
325
|
return {
|
|
326
326
|
visible: !1,
|
|
327
327
|
position: { top: 0, left: 0 },
|
|
328
328
|
size: { width: 0, height: 0 }
|
|
329
329
|
};
|
|
330
|
-
const a = Array.from(
|
|
330
|
+
const a = Array.from(r.querySelectorAll("[data-pinned-index]"));
|
|
331
331
|
if (a.length === 0)
|
|
332
332
|
return {
|
|
333
333
|
visible: !1,
|
|
@@ -354,12 +354,12 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
354
354
|
position: { top: 0, left: 0 },
|
|
355
355
|
size: { width: 0, height: 0 }
|
|
356
356
|
};
|
|
357
|
-
const L = y.getBoundingClientRect(), W = t.getBoundingClientRect(),
|
|
357
|
+
const L = y.getBoundingClientRect(), W = t.getBoundingClientRect(), _ = (o == null ? void 0 : o.offsetHeight) || 0, T = i == null ? void 0 : i.getBoundingClientRect(), k = L.right, M = Math.min(
|
|
358
358
|
W.bottom,
|
|
359
359
|
(T == null ? void 0 : T.bottom) || Number.MAX_SAFE_INTEGER
|
|
360
360
|
);
|
|
361
361
|
let z;
|
|
362
|
-
p &&
|
|
362
|
+
p && i && T ? z = T.top - W.top + _ : z = _;
|
|
363
363
|
const S = W.top + z, X = t.scrollWidth > t.clientWidth ? t.offsetHeight - t.clientHeight : 0, ne = M - S - X;
|
|
364
364
|
return {
|
|
365
365
|
visible: !0,
|
|
@@ -376,107 +376,107 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
376
376
|
t,
|
|
377
377
|
c,
|
|
378
378
|
o,
|
|
379
|
-
|
|
379
|
+
i,
|
|
380
380
|
p,
|
|
381
381
|
u,
|
|
382
382
|
d,
|
|
383
|
-
|
|
383
|
+
v
|
|
384
384
|
]), en = ({ enabled: t, rowCount: c }) => {
|
|
385
|
-
const o = P(/* @__PURE__ */ new Map()),
|
|
386
|
-
(
|
|
387
|
-
|
|
385
|
+
const o = P(/* @__PURE__ */ new Map()), i = P(/* @__PURE__ */ new Map()), p = $(
|
|
386
|
+
(l) => (r) => {
|
|
387
|
+
r ? o.current.set(l, r) : o.current.delete(l);
|
|
388
388
|
},
|
|
389
389
|
[]
|
|
390
390
|
), u = $(
|
|
391
|
-
(
|
|
392
|
-
|
|
391
|
+
(l) => (r) => {
|
|
392
|
+
r ? i.current.set(l, r) : i.current.delete(l);
|
|
393
393
|
},
|
|
394
394
|
[]
|
|
395
|
-
), d = $((
|
|
396
|
-
const a = `${
|
|
397
|
-
|
|
398
|
-
}, []),
|
|
399
|
-
o.current.forEach((
|
|
400
|
-
const a =
|
|
401
|
-
a && d(
|
|
395
|
+
), d = $((l, r) => {
|
|
396
|
+
const a = `${l.offsetHeight}px`;
|
|
397
|
+
r.style.height !== a && (r.style.height = a);
|
|
398
|
+
}, []), v = $(() => {
|
|
399
|
+
o.current.forEach((l, r) => {
|
|
400
|
+
const a = i.current.get(r);
|
|
401
|
+
a && d(l, a);
|
|
402
402
|
});
|
|
403
403
|
}, [d]);
|
|
404
404
|
return B(() => {
|
|
405
405
|
if (!t)
|
|
406
406
|
return;
|
|
407
|
-
const
|
|
407
|
+
const l = new ResizeObserver((r) => {
|
|
408
408
|
requestAnimationFrame(() => {
|
|
409
|
-
|
|
410
|
-
const b = a.target, y = parseInt(b.dataset.rowIndex || "-1", 10), L =
|
|
409
|
+
r.forEach((a) => {
|
|
410
|
+
const b = a.target, y = parseInt(b.dataset.rowIndex || "-1", 10), L = i.current.get(y);
|
|
411
411
|
L && y >= 0 && d(b, L);
|
|
412
412
|
});
|
|
413
413
|
});
|
|
414
414
|
});
|
|
415
|
-
return o.current.forEach((
|
|
415
|
+
return o.current.forEach((r) => l.observe(r)), () => l.disconnect();
|
|
416
416
|
}, [t, c, d]), et(() => {
|
|
417
|
-
t &&
|
|
418
|
-
}, [t, c,
|
|
417
|
+
t && v();
|
|
418
|
+
}, [t, c, v]), { setTableRowRef: p, setCheckboxRowRef: u, syncAllHeights: v };
|
|
419
419
|
}, tn = {
|
|
420
420
|
"resize-handle": "_resize-handle_15uk3_1"
|
|
421
|
-
}, nn = me.bind(tn),
|
|
421
|
+
}, nn = me.bind(tn), sn = Mt(
|
|
422
422
|
(t, c) => /* @__PURE__ */ h("div", { ref: c, className: nn("resize-handle"), ...t, children: /* @__PURE__ */ h(Wt, {}) })
|
|
423
|
-
),
|
|
423
|
+
), rn = {
|
|
424
424
|
"gradient-overlay": "_gradient-overlay_hx7m8_1",
|
|
425
425
|
"direction-right": "_direction-right_hx7m8_5",
|
|
426
426
|
"direction-left": "_direction-left_hx7m8_13"
|
|
427
|
-
}, on = me.bind(
|
|
427
|
+
}, on = me.bind(rn), Oe = ({
|
|
428
428
|
portalContainer: t,
|
|
429
429
|
visible: c,
|
|
430
430
|
position: o,
|
|
431
|
-
size:
|
|
431
|
+
size: i,
|
|
432
432
|
direction: p,
|
|
433
433
|
className: u,
|
|
434
434
|
dataTestId: d
|
|
435
435
|
}) => {
|
|
436
436
|
if (!c || !t)
|
|
437
437
|
return null;
|
|
438
|
-
const
|
|
438
|
+
const v = {
|
|
439
439
|
position: "fixed",
|
|
440
440
|
top: `${o.top}px`,
|
|
441
|
-
width: `${
|
|
442
|
-
height: `${
|
|
441
|
+
width: `${i.width}px`,
|
|
442
|
+
height: `${i.height}px`
|
|
443
443
|
};
|
|
444
|
-
return o.left !== void 0 && (
|
|
444
|
+
return o.left !== void 0 && (v.left = `${o.left}px`), o.right !== void 0 && (v.right = `${o.right}px`), Bt(
|
|
445
445
|
/* @__PURE__ */ h(
|
|
446
446
|
"div",
|
|
447
447
|
{
|
|
448
448
|
className: on("gradient-overlay", `direction-${p}`, u),
|
|
449
|
-
style:
|
|
449
|
+
style: v,
|
|
450
450
|
"data-gradient-type": d
|
|
451
451
|
}
|
|
452
452
|
),
|
|
453
453
|
t
|
|
454
454
|
);
|
|
455
455
|
}, f = me.bind(jt), Ke = ({ column: t }) => {
|
|
456
|
-
const c = P(null), [o,
|
|
456
|
+
const c = P(null), [o, i] = q(!1);
|
|
457
457
|
return B(() => {
|
|
458
458
|
if (c.current) {
|
|
459
459
|
const p = c.current.offsetWidth, u = c.current.scrollWidth;
|
|
460
|
-
|
|
460
|
+
i(u > p);
|
|
461
461
|
}
|
|
462
462
|
}, [t.header]), /* @__PURE__ */ h("span", { ref: c, title: o ? t.header : void 0, children: t.header });
|
|
463
463
|
}, bn = ({
|
|
464
464
|
data: t,
|
|
465
465
|
primaryColumn: c,
|
|
466
466
|
fixedColumns: o,
|
|
467
|
-
renderRowActions:
|
|
467
|
+
renderRowActions: i,
|
|
468
468
|
className: p = "",
|
|
469
469
|
wrapperClassName: u = "",
|
|
470
470
|
rowClassName: d = "",
|
|
471
|
-
headerClassName:
|
|
472
|
-
bodyClassName:
|
|
473
|
-
selectable:
|
|
471
|
+
headerClassName: v = "",
|
|
472
|
+
bodyClassName: l = "",
|
|
473
|
+
selectable: r = !1,
|
|
474
474
|
selectedRowIds: a = [],
|
|
475
475
|
sortingDirection: b = nt,
|
|
476
476
|
sortingColumn: y,
|
|
477
477
|
sortableColumns: L,
|
|
478
478
|
isHeaderFixed: W = !1,
|
|
479
|
-
isHorizontallyScrollable:
|
|
479
|
+
isHorizontallyScrollable: _ = !1,
|
|
480
480
|
pinnedColumnKeys: T = [],
|
|
481
481
|
isRowsExpandable: k = !1,
|
|
482
482
|
expandedRowIds: M = [],
|
|
@@ -487,15 +487,15 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
487
487
|
maxColumnWidth: ne = 500,
|
|
488
488
|
isSelectAllCheckboxAlwaysVisible: O = !1,
|
|
489
489
|
isCheckboxOutside: N = !1,
|
|
490
|
-
onChangeSorting:
|
|
490
|
+
onChangeSorting: rt = () => {
|
|
491
491
|
},
|
|
492
492
|
onToggleRowSelection: ot = () => {
|
|
493
493
|
},
|
|
494
494
|
onToggleAllRowsSelection: ct = () => {
|
|
495
495
|
},
|
|
496
|
-
onToggleRowExpansion:
|
|
496
|
+
onToggleRowExpansion: it = () => {
|
|
497
497
|
},
|
|
498
|
-
onToggleAllRowsExpansion:
|
|
498
|
+
onToggleAllRowsExpansion: lt = () => {
|
|
499
499
|
},
|
|
500
500
|
onColumnResize: at = () => {
|
|
501
501
|
},
|
|
@@ -507,7 +507,7 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
507
507
|
const Y = Q(
|
|
508
508
|
() => Array.isArray(c) ? c : [c],
|
|
509
509
|
[c]
|
|
510
|
-
), U = y ?? Y[0],
|
|
510
|
+
), U = y ?? Y[0], se = L ?? It([...Y, ...o]), { pinnedColumns: F, scrollableColumns: J } = Ct({
|
|
511
511
|
primaryColumns: Y,
|
|
512
512
|
fixedColumns: o,
|
|
513
513
|
pinnedColumnKeys: T
|
|
@@ -529,11 +529,11 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
529
529
|
primaryColumns: Y,
|
|
530
530
|
fixedColumns: o,
|
|
531
531
|
expandedRowIds: M,
|
|
532
|
-
onToggleRowExpansion:
|
|
532
|
+
onToggleRowExpansion: it
|
|
533
533
|
}), ut = Q(
|
|
534
534
|
() => [...F, ...J],
|
|
535
535
|
[F, J]
|
|
536
|
-
), { columnWidths:
|
|
536
|
+
), { columnWidths: re, handleResize: vt, handleResizeStop: _t, handleResizeStart: gt } = Zt({
|
|
537
537
|
enabled: A,
|
|
538
538
|
minWidth: X,
|
|
539
539
|
maxWidth: ne,
|
|
@@ -542,22 +542,22 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
542
542
|
onColumnResize: at,
|
|
543
543
|
initialColumnWidths: pt
|
|
544
544
|
}), { setTableRowRef: bt, setCheckboxRowRef: yt } = en({
|
|
545
|
-
enabled:
|
|
545
|
+
enabled: r && N,
|
|
546
546
|
rowCount: t.length
|
|
547
547
|
}), $e = (e, n) => {
|
|
548
|
-
const
|
|
548
|
+
const s = e.minWidth ?? X, g = e.maxWidth ?? ne;
|
|
549
549
|
return /* @__PURE__ */ h(
|
|
550
550
|
$t,
|
|
551
551
|
{
|
|
552
|
-
width:
|
|
552
|
+
width: re[e.key] ?? (typeof e.width == "number" ? e.width : X),
|
|
553
553
|
height: 0,
|
|
554
554
|
axis: "x",
|
|
555
|
-
handle: /* @__PURE__ */ h(
|
|
556
|
-
onResizeStart:
|
|
557
|
-
onResize:
|
|
558
|
-
onResizeStop:
|
|
559
|
-
minConstraints: [
|
|
560
|
-
maxConstraints: [
|
|
555
|
+
handle: /* @__PURE__ */ h(sn, {}),
|
|
556
|
+
onResizeStart: gt,
|
|
557
|
+
onResize: vt(e.key),
|
|
558
|
+
onResizeStop: _t(e.key),
|
|
559
|
+
minConstraints: [s, 0],
|
|
560
|
+
maxConstraints: [g, 0],
|
|
561
561
|
className: f("resizable-column"),
|
|
562
562
|
children: n
|
|
563
563
|
},
|
|
@@ -567,12 +567,12 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
567
567
|
const n = j.current;
|
|
568
568
|
if (n && n.contains(e))
|
|
569
569
|
return;
|
|
570
|
-
const
|
|
571
|
-
if (!
|
|
570
|
+
const s = e.parentElement;
|
|
571
|
+
if (!s)
|
|
572
572
|
return;
|
|
573
|
-
const
|
|
573
|
+
const g = window.getComputedStyle(s), m = parseFloat(g.paddingTop) || 0, E = parseFloat(g.paddingBottom) || 0, G = e.offsetHeight + m + E;
|
|
574
574
|
e.style.setProperty("--expand-cell-top", `${m}px`), e.style.setProperty("--expand-cell-height", `${G}px`);
|
|
575
|
-
}, []), [We, pe] = q(0), [He, fe] = q(0), [Pe, ue] = q(0), [Be, Se] = q(0), ce = P(!1),
|
|
575
|
+
}, []), [We, pe] = q(0), [He, fe] = q(0), [Pe, ue] = q(0), [Be, Se] = q(0), ce = P(!1), ve = P(/* @__PURE__ */ new Set()), te = P(null), _e = Ot(
|
|
576
576
|
x.current,
|
|
577
577
|
j.current,
|
|
578
578
|
(w == null ? void 0 : w.current) instanceof HTMLElement ? w.current : null,
|
|
@@ -581,7 +581,7 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
581
581
|
He,
|
|
582
582
|
Pe,
|
|
583
583
|
Be
|
|
584
|
-
),
|
|
584
|
+
), ge = Kt(
|
|
585
585
|
x.current,
|
|
586
586
|
We,
|
|
587
587
|
j.current,
|
|
@@ -591,46 +591,46 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
591
591
|
Pe,
|
|
592
592
|
Be
|
|
593
593
|
), Ge = (e) => {
|
|
594
|
-
|
|
594
|
+
se.includes(e) && rt({ key: e, direction: b });
|
|
595
595
|
}, Fe = (e) => {
|
|
596
596
|
ot(e);
|
|
597
597
|
}, qe = () => {
|
|
598
598
|
ct();
|
|
599
599
|
}, kt = () => {
|
|
600
|
-
|
|
601
|
-
}, Ue = (e) =>
|
|
600
|
+
lt();
|
|
601
|
+
}, Ue = (e) => se.includes(e) ? (U == null ? void 0 : U.key) === e ? Xt(b) ? /* @__PURE__ */ h(Ye, {}) : /* @__PURE__ */ h(Ht, {}) : /* @__PURE__ */ h(Ye, {}) : null, De = t.every((e) => a.includes(e.id)), je = t.some((e) => a.includes(e.id)), be = (a == null ? void 0 : a.length) > 0, Et = !St(t), Re = O && Et || be, Tt = t.every((e) => M.includes(e.id)), Lt = z !== void 0 ? z : Tt, xt = Ze(
|
|
602
602
|
F,
|
|
603
603
|
J,
|
|
604
604
|
k,
|
|
605
|
-
|
|
606
|
-
!!
|
|
605
|
+
r,
|
|
606
|
+
!!i,
|
|
607
607
|
!1,
|
|
608
|
-
A ?
|
|
608
|
+
A ? re : void 0,
|
|
609
609
|
A,
|
|
610
610
|
N
|
|
611
611
|
), Nt = Ze(
|
|
612
612
|
F,
|
|
613
613
|
J,
|
|
614
614
|
k,
|
|
615
|
-
|
|
616
|
-
!!
|
|
615
|
+
r,
|
|
616
|
+
!!i,
|
|
617
617
|
!0,
|
|
618
|
-
A ?
|
|
618
|
+
A ? re : void 0,
|
|
619
619
|
A,
|
|
620
620
|
N
|
|
621
621
|
), Xe = /* @__PURE__ */ h("button", { onClick: kt, "aria-label": "Toggle all rows expansion", children: /* @__PURE__ */ h("span", { className: f("expand-icon", { expanded: Lt }), children: /* @__PURE__ */ h(Je, {}) }) });
|
|
622
622
|
B(() => {
|
|
623
623
|
if (!(w != null && w.current) || !x.current || !j.current)
|
|
624
624
|
return;
|
|
625
|
-
const e = w.current, n = x.current,
|
|
626
|
-
const H = n.getBoundingClientRect(), G = e.getBoundingClientRect(), V =
|
|
625
|
+
const e = w.current, n = x.current, s = j.current, g = he.current, m = () => {
|
|
626
|
+
const H = n.getBoundingClientRect(), G = e.getBoundingClientRect(), V = s.offsetHeight, R = H.top - G.top, ie = H.bottom - G.top, Ve = e.scrollTop > 0 && R <= 0 && ie > V;
|
|
627
627
|
if (mt(Ve), Ve) {
|
|
628
|
-
const
|
|
629
|
-
|
|
628
|
+
const le = H.left, Ce = G.top;
|
|
629
|
+
s.classList.add(f("pinned-header")), _ && (s.style.overflow = "hidden", s.style.overflowX = "hidden"), s.style.left = `${le}px`, s.style.top = `${Ce}px`, s.style.width = `${H.width}px`, g && N && (g.style.top = `${Ce}px`);
|
|
630
630
|
} else {
|
|
631
|
-
const
|
|
632
|
-
ce.current = !0,
|
|
633
|
-
n.scrollLeft =
|
|
631
|
+
const le = n.scrollLeft;
|
|
632
|
+
ce.current = !0, s.classList.remove(f("pinned-header")), _ && (s.scrollLeft = 0), s.style.left = "", s.style.top = "", s.style.width = "", _ && (s.style.overflow = "", s.style.overflowX = ""), g && N && (g.style.top = "", g.classList.remove(f("pinned-header"))), _ && le > 0 ? requestAnimationFrame(() => {
|
|
633
|
+
n.scrollLeft = le, setTimeout(() => {
|
|
634
634
|
ce.current = !1;
|
|
635
635
|
}, 0);
|
|
636
636
|
}) : ce.current = !1;
|
|
@@ -641,36 +641,36 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
641
641
|
return e.addEventListener("scroll", m), window.addEventListener("resize", m), () => {
|
|
642
642
|
cancelAnimationFrame(E), e.removeEventListener("scroll", m), window.removeEventListener("resize", m);
|
|
643
643
|
};
|
|
644
|
-
}, [w,
|
|
644
|
+
}, [w, _, N]), B(() => {
|
|
645
645
|
if (!(w != null && w.current) || !x.current || !j.current || !I)
|
|
646
646
|
return;
|
|
647
|
-
const e = w.current, n = x.current,
|
|
648
|
-
const R = n.getBoundingClientRect(),
|
|
649
|
-
|
|
647
|
+
const e = w.current, n = x.current, s = j.current, g = he.current, m = () => {
|
|
648
|
+
const R = n.getBoundingClientRect(), ie = e.getBoundingClientRect();
|
|
649
|
+
s.style.left = `${R.left}px`, s.style.top = `${ie.top}px`, s.style.width = `${R.width}px`, g && N && (g.style.top = `${ie.top}px`);
|
|
650
650
|
}, E = (R) => {
|
|
651
|
-
ce.current || (R ===
|
|
651
|
+
ce.current || (R === s ? n.scrollLeft = s.scrollLeft : s.scrollLeft = n.scrollLeft, te.current && te.current());
|
|
652
652
|
}, H = () => {
|
|
653
653
|
E(n), m();
|
|
654
654
|
}, G = () => {
|
|
655
|
-
E(
|
|
655
|
+
E(s);
|
|
656
656
|
}, V = () => {
|
|
657
657
|
m();
|
|
658
658
|
};
|
|
659
|
-
return n.addEventListener("scroll", H),
|
|
660
|
-
n.removeEventListener("scroll", H),
|
|
659
|
+
return n.addEventListener("scroll", H), _ && s.addEventListener("scroll", G), e.addEventListener("scroll", V), window.addEventListener("resize", m), E(n), m(), () => {
|
|
660
|
+
n.removeEventListener("scroll", H), _ && s.removeEventListener("scroll", G), e.removeEventListener("scroll", V), window.removeEventListener("resize", m);
|
|
661
661
|
};
|
|
662
|
-
}, [I, w,
|
|
663
|
-
if (!x.current || !
|
|
662
|
+
}, [I, w, _, N]), B(() => {
|
|
663
|
+
if (!x.current || !_)
|
|
664
664
|
return;
|
|
665
665
|
const e = x.current, n = w == null ? void 0 : w.current;
|
|
666
666
|
pe(e.scrollLeft), fe((n == null ? void 0 : n.scrollTop) || e.scrollTop || 0), ue(e.scrollWidth);
|
|
667
|
-
const
|
|
667
|
+
const s = () => {
|
|
668
668
|
e && (pe(e.scrollLeft), fe((n == null ? void 0 : n.scrollTop) || e.scrollTop || 0), ue(e.scrollWidth));
|
|
669
669
|
};
|
|
670
|
-
let
|
|
670
|
+
let g = null;
|
|
671
671
|
const m = () => {
|
|
672
|
-
|
|
673
|
-
|
|
672
|
+
g === null && (g = requestAnimationFrame(() => {
|
|
673
|
+
s(), g = null;
|
|
674
674
|
}));
|
|
675
675
|
}, E = () => {
|
|
676
676
|
m();
|
|
@@ -681,23 +681,23 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
681
681
|
passive: !0
|
|
682
682
|
});
|
|
683
683
|
const G = () => {
|
|
684
|
-
|
|
684
|
+
s(), Se((R) => R + 1);
|
|
685
685
|
};
|
|
686
|
-
window.addEventListener("resize", G), te.current =
|
|
686
|
+
window.addEventListener("resize", G), te.current = s, s();
|
|
687
687
|
const V = new ResizeObserver(() => {
|
|
688
|
-
|
|
688
|
+
s();
|
|
689
689
|
});
|
|
690
690
|
return e && V.observe(e), () => {
|
|
691
|
-
e.removeEventListener("scroll", E), n && n.removeEventListener("scroll", H), window.removeEventListener("resize", G), V.disconnect(),
|
|
691
|
+
e.removeEventListener("scroll", E), n && n.removeEventListener("scroll", H), window.removeEventListener("resize", G), V.disconnect(), g !== null && (cancelAnimationFrame(g), g = null);
|
|
692
692
|
};
|
|
693
|
-
}, [
|
|
694
|
-
if (!x.current || !
|
|
693
|
+
}, [_, w, I, M]), B(() => {
|
|
694
|
+
if (!x.current || !_)
|
|
695
695
|
return;
|
|
696
696
|
const e = x.current, n = w == null ? void 0 : w.current;
|
|
697
697
|
requestAnimationFrame(() => {
|
|
698
698
|
e && (pe(e.scrollLeft), fe((n == null ? void 0 : n.scrollTop) || e.scrollTop || 0), ue(e.scrollWidth), te.current && te.current());
|
|
699
699
|
});
|
|
700
|
-
}, [
|
|
700
|
+
}, [re, _, w]), B(() => {
|
|
701
701
|
if (!x.current)
|
|
702
702
|
return;
|
|
703
703
|
const e = x.current, n = () => {
|
|
@@ -709,47 +709,47 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
709
709
|
}, [k, t, oe]), B(() => {
|
|
710
710
|
if (!x.current)
|
|
711
711
|
return;
|
|
712
|
-
const e = x.current, n = new Set(M),
|
|
712
|
+
const e = x.current, n = new Set(M), s = ve.current, g = /* @__PURE__ */ new Set();
|
|
713
713
|
if (M.forEach((E) => {
|
|
714
|
-
|
|
715
|
-
}),
|
|
716
|
-
n.has(E) ||
|
|
717
|
-
}),
|
|
718
|
-
|
|
714
|
+
s.has(E) || g.add(E);
|
|
715
|
+
}), s.forEach((E) => {
|
|
716
|
+
n.has(E) || g.add(E);
|
|
717
|
+
}), g.size === 0) {
|
|
718
|
+
ve.current = n;
|
|
719
719
|
return;
|
|
720
720
|
}
|
|
721
721
|
const m = setTimeout(() => {
|
|
722
|
-
|
|
722
|
+
g.forEach((E) => {
|
|
723
723
|
const H = e.querySelector(
|
|
724
724
|
`[data-base-left="0"][data-row-id="${E}"]`
|
|
725
725
|
);
|
|
726
726
|
H && oe(H);
|
|
727
727
|
}), Se((E) => E + 1);
|
|
728
728
|
}, 0);
|
|
729
|
-
return
|
|
729
|
+
return ve.current = n, () => clearTimeout(m);
|
|
730
730
|
}, [k, M, oe]), B(() => {
|
|
731
731
|
if (!ee.current || !x.current || !N)
|
|
732
732
|
return;
|
|
733
|
-
const e = ee.current, n = x.current,
|
|
733
|
+
const e = ee.current, n = x.current, s = () => {
|
|
734
734
|
requestAnimationFrame(() => {
|
|
735
735
|
e.scrollTop = n.scrollTop;
|
|
736
736
|
});
|
|
737
737
|
};
|
|
738
|
-
return n.addEventListener("scroll",
|
|
739
|
-
n.removeEventListener("scroll",
|
|
738
|
+
return n.addEventListener("scroll", s), () => {
|
|
739
|
+
n.removeEventListener("scroll", s);
|
|
740
740
|
};
|
|
741
741
|
}, [t, N]), et(() => {
|
|
742
742
|
if (!x.current || !ee.current)
|
|
743
743
|
return;
|
|
744
|
-
const e = x.current, n = ee.current,
|
|
744
|
+
const e = x.current, n = ee.current, s = () => {
|
|
745
745
|
const m = `${e.clientHeight}px`;
|
|
746
746
|
n.style.height !== m && (n.style.height = m);
|
|
747
747
|
};
|
|
748
|
-
|
|
749
|
-
const
|
|
750
|
-
requestAnimationFrame(
|
|
748
|
+
s();
|
|
749
|
+
const g = new ResizeObserver(() => {
|
|
750
|
+
requestAnimationFrame(s);
|
|
751
751
|
});
|
|
752
|
-
return
|
|
752
|
+
return g.observe(e), () => g.disconnect();
|
|
753
753
|
}, []);
|
|
754
754
|
const zt = () => /* @__PURE__ */ D("div", { className: f("checkbox-column"), ref: ee, children: [
|
|
755
755
|
/* @__PURE__ */ h(
|
|
@@ -760,7 +760,7 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
760
760
|
"table-header",
|
|
761
761
|
"checkbox-header",
|
|
762
762
|
{ "pinned-header": I },
|
|
763
|
-
|
|
763
|
+
v
|
|
764
764
|
),
|
|
765
765
|
children: Re && /* @__PURE__ */ h(
|
|
766
766
|
ae,
|
|
@@ -773,7 +773,7 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
773
773
|
)
|
|
774
774
|
}
|
|
775
775
|
),
|
|
776
|
-
/* @__PURE__ */ h("div", { className: f("checkbox-body",
|
|
776
|
+
/* @__PURE__ */ h("div", { className: f("checkbox-body", l), children: t.map((e, n) => /* @__PURE__ */ h(
|
|
777
777
|
"div",
|
|
778
778
|
{
|
|
779
779
|
ref: yt(n),
|
|
@@ -799,7 +799,7 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
799
799
|
"table",
|
|
800
800
|
{
|
|
801
801
|
"fixed-header": W,
|
|
802
|
-
"horizontally-scrollable-container": W && (
|
|
802
|
+
"horizontally-scrollable-container": W && (_ || A),
|
|
803
803
|
"external-scroll-container": W && !!w
|
|
804
804
|
},
|
|
805
805
|
p
|
|
@@ -813,14 +813,14 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
813
813
|
"table-header",
|
|
814
814
|
{
|
|
815
815
|
"sticky-header": W && !I,
|
|
816
|
-
"horizontally-scrollable":
|
|
816
|
+
"horizontally-scrollable": _,
|
|
817
817
|
resizable: A
|
|
818
818
|
},
|
|
819
|
-
|
|
819
|
+
v
|
|
820
820
|
),
|
|
821
821
|
style: { gridTemplateColumns: Nt },
|
|
822
822
|
children: [
|
|
823
|
-
|
|
823
|
+
r && !N && /* @__PURE__ */ h(
|
|
824
824
|
"div",
|
|
825
825
|
{
|
|
826
826
|
className: f("table-header-cell", "checkbox-cell"),
|
|
@@ -854,7 +854,7 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
854
854
|
}
|
|
855
855
|
),
|
|
856
856
|
F.map((e, n) => {
|
|
857
|
-
const
|
|
857
|
+
const s = /* @__PURE__ */ h(
|
|
858
858
|
"button",
|
|
859
859
|
{
|
|
860
860
|
"data-column-key": e.key,
|
|
@@ -862,7 +862,7 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
862
862
|
className: f("table-header-cell", "pinned-column", {
|
|
863
863
|
[`align-${e.align}`]: "align" in e,
|
|
864
864
|
"primary-cell": C(e),
|
|
865
|
-
"sortable-cell":
|
|
865
|
+
"sortable-cell": se.includes(e.key),
|
|
866
866
|
resizable: A
|
|
867
867
|
}),
|
|
868
868
|
style: de(
|
|
@@ -872,7 +872,7 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
872
872
|
F,
|
|
873
873
|
K,
|
|
874
874
|
k,
|
|
875
|
-
|
|
875
|
+
r,
|
|
876
876
|
N
|
|
877
877
|
),
|
|
878
878
|
children: /* @__PURE__ */ D(
|
|
@@ -891,7 +891,7 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
891
891
|
},
|
|
892
892
|
e.key
|
|
893
893
|
);
|
|
894
|
-
return A ? $e(e,
|
|
894
|
+
return A ? $e(e, s) : s;
|
|
895
895
|
}),
|
|
896
896
|
J.map((e) => {
|
|
897
897
|
const n = /* @__PURE__ */ h(
|
|
@@ -900,7 +900,7 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
900
900
|
className: f("table-header-cell", {
|
|
901
901
|
[`align-${e.align}`]: "align" in e,
|
|
902
902
|
"primary-cell": C(e),
|
|
903
|
-
"sortable-cell":
|
|
903
|
+
"sortable-cell": se.includes(e.key),
|
|
904
904
|
resizable: A
|
|
905
905
|
}),
|
|
906
906
|
style: de(
|
|
@@ -910,7 +910,7 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
910
910
|
F,
|
|
911
911
|
K,
|
|
912
912
|
k,
|
|
913
|
-
|
|
913
|
+
r,
|
|
914
914
|
N
|
|
915
915
|
),
|
|
916
916
|
children: /* @__PURE__ */ D(
|
|
@@ -931,7 +931,7 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
931
931
|
);
|
|
932
932
|
return A ? $e(e, n) : n;
|
|
933
933
|
}),
|
|
934
|
-
|
|
934
|
+
i && /* @__PURE__ */ h("div", { className: f("table-header-cell", "action-menu-cell") })
|
|
935
935
|
]
|
|
936
936
|
}
|
|
937
937
|
),
|
|
@@ -943,10 +943,10 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
943
943
|
"table-body",
|
|
944
944
|
{
|
|
945
945
|
"scrollable-body": W,
|
|
946
|
-
"horizontally-scrollable":
|
|
946
|
+
"horizontally-scrollable": _,
|
|
947
947
|
resizable: A
|
|
948
948
|
},
|
|
949
|
-
|
|
949
|
+
l
|
|
950
950
|
),
|
|
951
951
|
children: t.map((e, n) => /* @__PURE__ */ D(
|
|
952
952
|
"div",
|
|
@@ -954,12 +954,12 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
954
954
|
"data-row-index": n,
|
|
955
955
|
ref: bt(n),
|
|
956
956
|
className: f("table-row", Qe(e), d, {
|
|
957
|
-
selectable:
|
|
957
|
+
selectable: r && !N
|
|
958
958
|
}),
|
|
959
959
|
onMouseEnter: () => Ne(n),
|
|
960
960
|
onMouseLeave: ze,
|
|
961
961
|
children: [
|
|
962
|
-
|
|
962
|
+
r && !N && /* @__PURE__ */ h(
|
|
963
963
|
"div",
|
|
964
964
|
{
|
|
965
965
|
className: f("table-cell", "checkbox-cell"),
|
|
@@ -1000,59 +1000,59 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
1000
1000
|
)
|
|
1001
1001
|
}
|
|
1002
1002
|
),
|
|
1003
|
-
F.map((
|
|
1004
|
-
const m = Me(e.id,
|
|
1003
|
+
F.map((s, g) => {
|
|
1004
|
+
const m = Me(e.id, s.key), E = C(s);
|
|
1005
1005
|
return /* @__PURE__ */ h(
|
|
1006
1006
|
"div",
|
|
1007
1007
|
{
|
|
1008
|
-
"data-column-key":
|
|
1009
|
-
"data-pinned-index":
|
|
1010
|
-
ref: E ? Ae(
|
|
1008
|
+
"data-column-key": s.key,
|
|
1009
|
+
"data-pinned-index": g,
|
|
1010
|
+
ref: E ? Ae(s.key) : void 0,
|
|
1011
1011
|
className: f("table-cell", "pinned-column", {
|
|
1012
1012
|
"primary-cell": E,
|
|
1013
1013
|
"expanded-cell": m
|
|
1014
1014
|
}),
|
|
1015
1015
|
style: de(
|
|
1016
|
-
|
|
1016
|
+
s,
|
|
1017
1017
|
!0,
|
|
1018
|
-
|
|
1018
|
+
g,
|
|
1019
1019
|
F,
|
|
1020
1020
|
K,
|
|
1021
1021
|
k,
|
|
1022
|
-
|
|
1022
|
+
r,
|
|
1023
1023
|
N
|
|
1024
1024
|
),
|
|
1025
|
-
children: e[
|
|
1025
|
+
children: e[s.key].component || e[s.key].content || e[s.key]
|
|
1026
1026
|
},
|
|
1027
|
-
|
|
1027
|
+
s.key
|
|
1028
1028
|
);
|
|
1029
1029
|
}),
|
|
1030
|
-
J.map((
|
|
1031
|
-
const
|
|
1030
|
+
J.map((s) => {
|
|
1031
|
+
const g = Me(e.id, s.key), m = C(s);
|
|
1032
1032
|
return /* @__PURE__ */ h(
|
|
1033
1033
|
"div",
|
|
1034
1034
|
{
|
|
1035
|
-
ref: m ? Ae(
|
|
1035
|
+
ref: m ? Ae(s.key) : void 0,
|
|
1036
1036
|
className: f("table-cell", {
|
|
1037
1037
|
"primary-cell": m,
|
|
1038
|
-
"expanded-cell":
|
|
1038
|
+
"expanded-cell": g
|
|
1039
1039
|
}),
|
|
1040
1040
|
style: de(
|
|
1041
|
-
|
|
1041
|
+
s,
|
|
1042
1042
|
!1,
|
|
1043
1043
|
void 0,
|
|
1044
1044
|
F,
|
|
1045
1045
|
K,
|
|
1046
1046
|
k,
|
|
1047
|
-
|
|
1047
|
+
r,
|
|
1048
1048
|
N
|
|
1049
1049
|
),
|
|
1050
|
-
children: e[
|
|
1050
|
+
children: e[s.key].component || e[s.key].content || e[s.key]
|
|
1051
1051
|
},
|
|
1052
|
-
|
|
1052
|
+
s.key
|
|
1053
1053
|
);
|
|
1054
1054
|
}),
|
|
1055
|
-
|
|
1055
|
+
i && /* @__PURE__ */ h("div", { className: f("table-cell", "action-menu-cell"), children: i(e.metaData) })
|
|
1056
1056
|
] }) })
|
|
1057
1057
|
]
|
|
1058
1058
|
},
|
|
@@ -1060,14 +1060,14 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
1060
1060
|
))
|
|
1061
1061
|
}
|
|
1062
1062
|
),
|
|
1063
|
-
|
|
1063
|
+
_ && /* @__PURE__ */ D(At, { children: [
|
|
1064
1064
|
/* @__PURE__ */ h(
|
|
1065
1065
|
Oe,
|
|
1066
1066
|
{
|
|
1067
1067
|
portalContainer: ke,
|
|
1068
|
-
visible:
|
|
1069
|
-
position:
|
|
1070
|
-
size:
|
|
1068
|
+
visible: _e.visible,
|
|
1069
|
+
position: _e.position,
|
|
1070
|
+
size: _e.size,
|
|
1071
1071
|
direction: "right",
|
|
1072
1072
|
className: dt,
|
|
1073
1073
|
dataTestId: "right-gradient"
|
|
@@ -1077,9 +1077,9 @@ const tt = (t) => typeof t == "string", Gt = "_table_1rtld_1", Ft = "_resizable_
|
|
|
1077
1077
|
Oe,
|
|
1078
1078
|
{
|
|
1079
1079
|
portalContainer: ke,
|
|
1080
|
-
visible:
|
|
1081
|
-
position:
|
|
1082
|
-
size:
|
|
1080
|
+
visible: ge.visible,
|
|
1081
|
+
position: ge.position,
|
|
1082
|
+
size: ge.size,
|
|
1083
1083
|
direction: "left",
|
|
1084
1084
|
className: ht,
|
|
1085
1085
|
dataTestId: "pinned-gradient"
|