@reportportal/ui-kit 0.0.1-alpha.148 → 0.0.1-alpha.149
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/common/hooks/useSortable.d.ts +1 -1
- package/dist/common/types/sortableTypes.d.ts +16 -1
- package/dist/common.js +11 -0
- package/dist/components/sortable/helpers.d.ts +7 -0
- package/dist/components/sortable/sortableItem/sortableItem.d.ts +1 -1
- package/dist/components/table/types.d.ts +1 -0
- package/dist/index.js +147 -146
- package/dist/sortable.js +177 -123
- package/dist/style.css +1 -1
- package/dist/{table-f1461100.js → table-82d5455c.js} +96 -94
- package/dist/table.js +2 -1
- package/package.json +4 -3
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { useMemo as se, useState as $, useCallback as x, useEffect as re, useRef as oe, forwardRef as
|
|
3
|
-
import { Resizable as
|
|
1
|
+
import { jsx as o, jsxs as S } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as se, useState as $, useCallback as x, useEffect as re, useRef as oe, forwardRef as Ue } from "react";
|
|
3
|
+
import { Resizable as je } from "react-resizable";
|
|
4
4
|
import { c as ce } from "./bind-06a7ff84.js";
|
|
5
|
-
import { c as
|
|
5
|
+
import { c as He, b as ee, a as le, S as Be } from "./resizeColumn-d4107941.js";
|
|
6
6
|
import { C as te } from "./checkbox-ed6cc375.js";
|
|
7
|
-
import { Tooltip as
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
import { Tooltip as Ge } from "./tooltip.js";
|
|
8
|
+
import { i as Xe } from "./isEmpty-ccacb5ff.js";
|
|
9
|
+
const ie = (l) => typeof l == "string", Ve = "_table_1244e_1", Ye = "_resizable_1244e_46", qe = "_selectable_1244e_63", Je = "_expanded_1244e_59", Qe = "_label_1244e_303", Ze = {
|
|
10
|
+
table: Ve,
|
|
10
11
|
"fixed-header": "_fixed-header_1244e_8",
|
|
11
12
|
"horizontally-scrollable-container": "_horizontally-scrollable-container_1244e_14",
|
|
12
13
|
"table-header": "_table-header_1244e_19",
|
|
13
14
|
"sticky-header": "_sticky-header_1244e_26",
|
|
14
15
|
"horizontally-scrollable": "_horizontally-scrollable_1244e_14",
|
|
15
|
-
resizable:
|
|
16
|
+
resizable: Ye,
|
|
16
17
|
"resizable-column": "_resizable-column_1244e_46",
|
|
17
18
|
"table-row": "_table-row_1244e_54",
|
|
18
19
|
"expanded-cell": "_expanded-cell_1244e_59",
|
|
19
|
-
selectable:
|
|
20
|
+
selectable: qe,
|
|
20
21
|
"row-content-wrapper": "_row-content-wrapper_1244e_67",
|
|
21
22
|
"table-row-content": "_table-row-content_1244e_75",
|
|
22
23
|
"expand-cell": "_expand-cell_1244e_89",
|
|
@@ -31,19 +32,19 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
31
32
|
"expand-all-tooltip-wrapper": "_expand-all-tooltip-wrapper_1244e_255",
|
|
32
33
|
"expand-all-tooltip-content": "_expand-all-tooltip-content_1244e_264",
|
|
33
34
|
"expand-icon": "_expand-icon_1244e_273",
|
|
34
|
-
expanded:
|
|
35
|
+
expanded: Je,
|
|
35
36
|
"primary-cell": "_primary-cell_1244e_282",
|
|
36
|
-
label:
|
|
37
|
+
label: Qe,
|
|
37
38
|
"sortable-cell": "_sortable-cell_1244e_317",
|
|
38
39
|
"align-right": "_align-right_1244e_320",
|
|
39
40
|
"align-center": "_align-center_1244e_326",
|
|
40
41
|
"pinned-column": "_pinned-column_1244e_329"
|
|
41
|
-
}, de = "asc",
|
|
42
|
+
}, de = "asc", m = 32, he = 100, Ke = 48, Fe = (l) => l.toLowerCase() === de, Re = (l) => l.map((n) => n.key), N = (l) => "primary" in l && l.primary === !0, Ie = (l) => {
|
|
42
43
|
var s;
|
|
43
44
|
return `size-${((s = l.rowConfigs) == null ? void 0 : s.size) ?? "default"}`;
|
|
44
|
-
}, j = (l) => ie(l) ? l : `${l}px`,
|
|
45
|
+
}, j = (l) => ie(l) ? l : `${l}px`, el = (l, n, s, c, i) => {
|
|
45
46
|
let a = 0;
|
|
46
|
-
c && (a +=
|
|
47
|
+
c && (a += m), i && (a += m);
|
|
47
48
|
for (let p = 0; p < l; p++) {
|
|
48
49
|
const u = n[p];
|
|
49
50
|
if (N(u)) {
|
|
@@ -62,7 +63,7 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
62
63
|
u.textAlign = t.align;
|
|
63
64
|
}
|
|
64
65
|
if (n && s !== void 0) {
|
|
65
|
-
const t =
|
|
66
|
+
const t = el(
|
|
66
67
|
s,
|
|
67
68
|
c,
|
|
68
69
|
i,
|
|
@@ -74,7 +75,7 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
74
75
|
return u;
|
|
75
76
|
}, ne = (l, n, s, c, i, a = !1, p, u = !1) => {
|
|
76
77
|
const t = [];
|
|
77
|
-
s && t.push(`${
|
|
78
|
+
s && t.push(`${m}px`), a && c && t.push(`${m}px`);
|
|
78
79
|
const h = (r) => {
|
|
79
80
|
if ((p == null ? void 0 : p[r.key]) !== void 0) {
|
|
80
81
|
t.push(`${p[r.key]}px`);
|
|
@@ -93,8 +94,8 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
93
94
|
t.push(y);
|
|
94
95
|
}
|
|
95
96
|
};
|
|
96
|
-
return l.forEach(h), n.forEach(h), i && t.push(`${
|
|
97
|
-
},
|
|
97
|
+
return l.forEach(h), n.forEach(h), i && t.push(`${Ke}px`), t.join(" ");
|
|
98
|
+
}, ll = ({
|
|
98
99
|
primaryColumns: l,
|
|
99
100
|
fixedColumns: n,
|
|
100
101
|
pinnedColumnKeys: s
|
|
@@ -109,7 +110,7 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
109
110
|
pinnedColumns: c,
|
|
110
111
|
scrollableColumns: i
|
|
111
112
|
};
|
|
112
|
-
}, [l, n, s]),
|
|
113
|
+
}, [l, n, s]), tl = () => {
|
|
113
114
|
const [l, n] = $(null), [s, c] = $(null), i = x((t) => {
|
|
114
115
|
n(t);
|
|
115
116
|
}, []), a = x(() => {
|
|
@@ -127,7 +128,7 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
127
128
|
handleRowMouseEnter: p,
|
|
128
129
|
handleRowMouseLeave: u
|
|
129
130
|
};
|
|
130
|
-
},
|
|
131
|
+
}, nl = ({
|
|
131
132
|
primaryColumns: l,
|
|
132
133
|
fixedColumns: n,
|
|
133
134
|
expandedRowIds: s,
|
|
@@ -181,7 +182,7 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
181
182
|
handleToggleRowExpansion: p,
|
|
182
183
|
isCellExpanded: u
|
|
183
184
|
};
|
|
184
|
-
},
|
|
185
|
+
}, al = () => {
|
|
185
186
|
const l = oe(/* @__PURE__ */ new Map()), n = x(
|
|
186
187
|
(s) => (c) => {
|
|
187
188
|
if (!c)
|
|
@@ -195,7 +196,7 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
195
196
|
columnWidthsRef: l,
|
|
196
197
|
setCellRef: n
|
|
197
198
|
};
|
|
198
|
-
},
|
|
199
|
+
}, sl = ({
|
|
199
200
|
enabled: l = !1,
|
|
200
201
|
minWidth: n = 50,
|
|
201
202
|
maxWidth: s = 500,
|
|
@@ -214,7 +215,7 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
214
215
|
if (!l)
|
|
215
216
|
return;
|
|
216
217
|
const k = Math.min(s, Math.max(n, y.width));
|
|
217
|
-
p((
|
|
218
|
+
p((z) => ({ ...z, [r]: k }));
|
|
218
219
|
},
|
|
219
220
|
[l, n, s]
|
|
220
221
|
), h = x(
|
|
@@ -229,11 +230,11 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
229
230
|
handleResizeStop: h,
|
|
230
231
|
handleResizeStart: u
|
|
231
232
|
};
|
|
232
|
-
},
|
|
233
|
+
}, rl = {
|
|
233
234
|
"resize-handle": "_resize-handle_15uk3_1"
|
|
234
|
-
},
|
|
235
|
-
(l, n) => /* @__PURE__ */ o("div", { ref: n, className:
|
|
236
|
-
), d = ce.bind(
|
|
235
|
+
}, ol = ce.bind(rl), cl = Ue(
|
|
236
|
+
(l, n) => /* @__PURE__ */ o("div", { ref: n, className: ol("resize-handle"), ...l, children: /* @__PURE__ */ o(He, {}) })
|
|
237
|
+
), d = ce.bind(Ze), ae = ({ column: l }) => {
|
|
237
238
|
const n = oe(null), [s, c] = $(!1);
|
|
238
239
|
return re(() => {
|
|
239
240
|
if (n.current) {
|
|
@@ -241,7 +242,7 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
241
242
|
c(a > i);
|
|
242
243
|
}
|
|
243
244
|
}, [l.header]), /* @__PURE__ */ o("span", { ref: n, title: s ? l.header : void 0, children: l.header });
|
|
244
|
-
},
|
|
245
|
+
}, bl = ({
|
|
245
246
|
data: l,
|
|
246
247
|
primaryColumn: n,
|
|
247
248
|
fixedColumns: s,
|
|
@@ -256,7 +257,7 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
256
257
|
sortingColumn: f,
|
|
257
258
|
sortableColumns: y,
|
|
258
259
|
isHeaderFixed: k = !1,
|
|
259
|
-
isHorizontallyScrollable:
|
|
260
|
+
isHorizontallyScrollable: z = !1,
|
|
260
261
|
pinnedColumnKeys: pe = [],
|
|
261
262
|
isRowsExpandable: v = !1,
|
|
262
263
|
expandedRowIds: E = [],
|
|
@@ -265,54 +266,55 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
265
266
|
isResizable: b = !1,
|
|
266
267
|
minColumnWidth: D = 50,
|
|
267
268
|
maxColumnWidth: G = 500,
|
|
268
|
-
|
|
269
|
+
isSelectAllCheckboxAlwaysVisible: _e = !1,
|
|
270
|
+
onChangeSorting: ye = () => {
|
|
269
271
|
},
|
|
270
|
-
onToggleRowSelection:
|
|
272
|
+
onToggleRowSelection: fe = () => {
|
|
271
273
|
},
|
|
272
|
-
onToggleAllRowsSelection:
|
|
274
|
+
onToggleAllRowsSelection: ue = () => {
|
|
273
275
|
},
|
|
274
|
-
onToggleRowExpansion:
|
|
276
|
+
onToggleRowExpansion: be = () => {
|
|
275
277
|
},
|
|
276
|
-
onToggleAllRowsExpansion:
|
|
278
|
+
onToggleAllRowsExpansion: ke = () => {
|
|
277
279
|
},
|
|
278
|
-
onColumnResize:
|
|
280
|
+
onColumnResize: ve = () => {
|
|
279
281
|
}
|
|
280
282
|
}) => {
|
|
281
283
|
const T = se(
|
|
282
284
|
() => Array.isArray(n) ? n : [n],
|
|
283
285
|
[n]
|
|
284
|
-
), w = f ?? T[0], A = y ??
|
|
286
|
+
), w = f ?? T[0], A = y ?? Re([...T, ...s]), { pinnedColumns: g, scrollableColumns: L } = ll({
|
|
285
287
|
primaryColumns: T,
|
|
286
288
|
fixedColumns: s,
|
|
287
289
|
pinnedColumnKeys: pe
|
|
288
290
|
}), {
|
|
289
291
|
hoveredColumn: X,
|
|
290
|
-
hoveredRow:
|
|
291
|
-
handleColumnMouseEnter:
|
|
292
|
-
handleColumnMouseLeave:
|
|
293
|
-
handleRowMouseEnter:
|
|
294
|
-
handleRowMouseLeave:
|
|
295
|
-
} =
|
|
292
|
+
hoveredRow: xe,
|
|
293
|
+
handleColumnMouseEnter: V,
|
|
294
|
+
handleColumnMouseLeave: Y,
|
|
295
|
+
handleRowMouseEnter: we,
|
|
296
|
+
handleRowMouseLeave: Ce
|
|
297
|
+
} = tl(), { columnWidthsRef: M, setCellRef: q } = al(), { handleToggleRowExpansion: ge, isCellExpanded: J } = nl({
|
|
296
298
|
primaryColumns: T,
|
|
297
299
|
fixedColumns: s,
|
|
298
300
|
expandedRowIds: E,
|
|
299
|
-
onToggleRowExpansion:
|
|
300
|
-
}), { columnWidths: O, handleResize:
|
|
301
|
+
onToggleRowExpansion: be
|
|
302
|
+
}), { columnWidths: O, handleResize: Ne, handleResizeStop: Se, handleResizeStart: me } = sl({
|
|
301
303
|
enabled: b,
|
|
302
304
|
minWidth: D,
|
|
303
305
|
maxWidth: G,
|
|
304
306
|
columnWidthsRef: M,
|
|
305
|
-
onColumnResize:
|
|
306
|
-
}),
|
|
307
|
-
|
|
307
|
+
onColumnResize: ve
|
|
308
|
+
}), Q = (e, C) => /* @__PURE__ */ o(
|
|
309
|
+
je,
|
|
308
310
|
{
|
|
309
311
|
width: O[e.key] ?? (typeof e.width == "number" ? e.width : D),
|
|
310
312
|
height: 0,
|
|
311
313
|
axis: "x",
|
|
312
|
-
handle: /* @__PURE__ */ o(
|
|
313
|
-
onResizeStart:
|
|
314
|
-
onResize:
|
|
315
|
-
onResizeStop:
|
|
314
|
+
handle: /* @__PURE__ */ o(cl, {}),
|
|
315
|
+
onResizeStart: me,
|
|
316
|
+
onResize: Ne(e.key),
|
|
317
|
+
onResizeStop: Se(e.key),
|
|
316
318
|
minConstraints: [D, 0],
|
|
317
319
|
maxConstraints: [G, 0],
|
|
318
320
|
className: d("resizable-column"),
|
|
@@ -320,14 +322,14 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
320
322
|
},
|
|
321
323
|
e.key
|
|
322
324
|
), Z = (e) => {
|
|
323
|
-
A.includes(e) &&
|
|
324
|
-
},
|
|
325
|
-
|
|
326
|
-
}, me = () => {
|
|
327
|
-
fe();
|
|
325
|
+
A.includes(e) && ye({ key: e, direction: r });
|
|
326
|
+
}, ze = (e) => {
|
|
327
|
+
fe(e);
|
|
328
328
|
}, Ee = () => {
|
|
329
|
-
|
|
330
|
-
},
|
|
329
|
+
ue();
|
|
330
|
+
}, Me = () => {
|
|
331
|
+
ke();
|
|
332
|
+
}, K = (e) => A.includes(e) ? (w == null ? void 0 : w.key) === e ? Fe(r) ? /* @__PURE__ */ o(le, {}) : /* @__PURE__ */ o(Be, {}) : /* @__PURE__ */ o(le, {}) : null, $e = l.every((e) => h.includes(e.id)), Te = l.some((e) => h.includes(e.id)), F = (h == null ? void 0 : h.length) > 0, Ae = !Xe(l), Le = _e && Ae || F, Pe = l.every((e) => E.includes(e.id)), We = H !== void 0 ? H : Pe, De = ne(
|
|
331
333
|
g,
|
|
332
334
|
L,
|
|
333
335
|
v,
|
|
@@ -336,7 +338,7 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
336
338
|
!1,
|
|
337
339
|
b ? O : void 0,
|
|
338
340
|
b
|
|
339
|
-
),
|
|
341
|
+
), Oe = ne(
|
|
340
342
|
g,
|
|
341
343
|
L,
|
|
342
344
|
v,
|
|
@@ -345,51 +347,51 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
345
347
|
!0,
|
|
346
348
|
b ? O : void 0,
|
|
347
349
|
b
|
|
348
|
-
), R = /* @__PURE__ */ o("button", { onClick:
|
|
349
|
-
return /* @__PURE__ */
|
|
350
|
+
), R = /* @__PURE__ */ o("button", { onClick: Me, "aria-label": "Toggle all rows expansion", children: /* @__PURE__ */ o("span", { className: d("expand-icon", { expanded: We }), children: /* @__PURE__ */ o(ee, {}) }) });
|
|
351
|
+
return /* @__PURE__ */ S(
|
|
350
352
|
"div",
|
|
351
353
|
{
|
|
352
354
|
className: d(
|
|
353
355
|
"table",
|
|
354
356
|
{
|
|
355
357
|
"fixed-header": k,
|
|
356
|
-
"horizontally-scrollable-container": k && (
|
|
358
|
+
"horizontally-scrollable-container": k && (z || b)
|
|
357
359
|
},
|
|
358
360
|
i
|
|
359
361
|
),
|
|
360
362
|
children: [
|
|
361
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ S(
|
|
362
364
|
"div",
|
|
363
365
|
{
|
|
364
366
|
className: d(
|
|
365
367
|
"table-header",
|
|
366
368
|
{
|
|
367
369
|
"sticky-header": k,
|
|
368
|
-
"horizontally-scrollable":
|
|
370
|
+
"horizontally-scrollable": z,
|
|
369
371
|
resizable: b
|
|
370
372
|
},
|
|
371
373
|
p
|
|
372
374
|
),
|
|
373
|
-
style: { gridTemplateColumns:
|
|
375
|
+
style: { gridTemplateColumns: Oe },
|
|
374
376
|
children: [
|
|
375
377
|
t && /* @__PURE__ */ o(
|
|
376
378
|
"div",
|
|
377
379
|
{
|
|
378
380
|
className: d("table-header-cell", "checkbox-cell"),
|
|
379
|
-
style: { left: v ? `${
|
|
380
|
-
children:
|
|
381
|
+
style: { left: v ? `${m}px` : "0" },
|
|
382
|
+
children: Le && /* @__PURE__ */ o(
|
|
381
383
|
te,
|
|
382
384
|
{
|
|
383
|
-
value:
|
|
384
|
-
partiallyChecked:
|
|
385
|
-
onChange:
|
|
385
|
+
value: $e,
|
|
386
|
+
partiallyChecked: Te,
|
|
387
|
+
onChange: Ee,
|
|
386
388
|
className: d("checkbox-cell")
|
|
387
389
|
}
|
|
388
390
|
)
|
|
389
391
|
}
|
|
390
392
|
),
|
|
391
393
|
v && /* @__PURE__ */ o("div", { className: d("table-header-cell", "expand-cell"), style: { left: "0" }, children: B ? /* @__PURE__ */ o(
|
|
392
|
-
|
|
394
|
+
Ge,
|
|
393
395
|
{
|
|
394
396
|
content: B,
|
|
395
397
|
placement: "top",
|
|
@@ -417,13 +419,13 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
417
419
|
v,
|
|
418
420
|
t
|
|
419
421
|
),
|
|
420
|
-
children: /* @__PURE__ */
|
|
422
|
+
children: /* @__PURE__ */ S(
|
|
421
423
|
"div",
|
|
422
424
|
{
|
|
423
425
|
className: d("label"),
|
|
424
426
|
onClick: () => Z(e.key),
|
|
425
|
-
onMouseEnter: () =>
|
|
426
|
-
onMouseLeave:
|
|
427
|
+
onMouseEnter: () => V(e.key),
|
|
428
|
+
onMouseLeave: Y,
|
|
427
429
|
children: [
|
|
428
430
|
/* @__PURE__ */ o(ae, { column: e }),
|
|
429
431
|
(X === e.key || (w == null ? void 0 : w.key) === e.key) && K(e.key)
|
|
@@ -433,7 +435,7 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
433
435
|
},
|
|
434
436
|
e.key
|
|
435
437
|
);
|
|
436
|
-
return b ?
|
|
438
|
+
return b ? Q(e, _) : _;
|
|
437
439
|
}),
|
|
438
440
|
L.map((e) => {
|
|
439
441
|
const C = /* @__PURE__ */ o(
|
|
@@ -454,13 +456,13 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
454
456
|
v,
|
|
455
457
|
t
|
|
456
458
|
),
|
|
457
|
-
children: /* @__PURE__ */
|
|
459
|
+
children: /* @__PURE__ */ S(
|
|
458
460
|
"div",
|
|
459
461
|
{
|
|
460
462
|
className: d("label"),
|
|
461
463
|
onClick: () => Z(e.key),
|
|
462
|
-
onMouseEnter: () =>
|
|
463
|
-
onMouseLeave:
|
|
464
|
+
onMouseEnter: () => V(e.key),
|
|
465
|
+
onMouseLeave: Y,
|
|
464
466
|
children: [
|
|
465
467
|
/* @__PURE__ */ o(ae, { column: e }),
|
|
466
468
|
(X === e.key || (w == null ? void 0 : w.key) === e.key) && K(e.key)
|
|
@@ -470,7 +472,7 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
470
472
|
},
|
|
471
473
|
e.key
|
|
472
474
|
);
|
|
473
|
-
return b ?
|
|
475
|
+
return b ? Q(e, C) : C;
|
|
474
476
|
}),
|
|
475
477
|
c && /* @__PURE__ */ o("div", { className: d("table-header-cell", "action-menu-cell") })
|
|
476
478
|
]
|
|
@@ -483,40 +485,40 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
483
485
|
"table-body",
|
|
484
486
|
{
|
|
485
487
|
"scrollable-body": k,
|
|
486
|
-
"horizontally-scrollable":
|
|
488
|
+
"horizontally-scrollable": z,
|
|
487
489
|
resizable: b
|
|
488
490
|
},
|
|
489
491
|
u
|
|
490
492
|
),
|
|
491
|
-
children: l.map((e, C) => /* @__PURE__ */
|
|
493
|
+
children: l.map((e, C) => /* @__PURE__ */ S(
|
|
492
494
|
"div",
|
|
493
495
|
{
|
|
494
|
-
className: d("table-row",
|
|
496
|
+
className: d("table-row", Ie(e), a, {
|
|
495
497
|
selectable: t
|
|
496
498
|
}),
|
|
497
|
-
onMouseEnter: () =>
|
|
498
|
-
onMouseLeave:
|
|
499
|
+
onMouseEnter: () => we(C),
|
|
500
|
+
onMouseLeave: Ce,
|
|
499
501
|
children: [
|
|
500
502
|
t && /* @__PURE__ */ o(
|
|
501
503
|
"div",
|
|
502
504
|
{
|
|
503
505
|
className: d("table-cell", "checkbox-cell"),
|
|
504
|
-
style: { left: v ? `${
|
|
505
|
-
children: (F ||
|
|
506
|
+
style: { left: v ? `${m}px` : "0" },
|
|
507
|
+
children: (F || xe === C) && /* @__PURE__ */ o(
|
|
506
508
|
te,
|
|
507
509
|
{
|
|
508
510
|
value: h.includes(e.id),
|
|
509
|
-
onChange: () =>
|
|
511
|
+
onChange: () => ze(e.id),
|
|
510
512
|
className: d("checkbox-cell")
|
|
511
513
|
}
|
|
512
514
|
)
|
|
513
515
|
}
|
|
514
516
|
),
|
|
515
|
-
/* @__PURE__ */ o("div", { className: d("row-content-wrapper"), children: /* @__PURE__ */
|
|
517
|
+
/* @__PURE__ */ o("div", { className: d("row-content-wrapper"), children: /* @__PURE__ */ S("div", { className: d("table-row-content"), style: { gridTemplateColumns: De }, children: [
|
|
516
518
|
v && /* @__PURE__ */ o("div", { className: d("table-cell", "expand-cell"), style: { left: "0" }, children: /* @__PURE__ */ o(
|
|
517
519
|
"button",
|
|
518
520
|
{
|
|
519
|
-
onClick: () =>
|
|
521
|
+
onClick: () => ge(e.id),
|
|
520
522
|
"aria-label": E.includes(e.id) ? "Collapse row" : "Expand row",
|
|
521
523
|
"aria-expanded": E.includes(e.id),
|
|
522
524
|
children: /* @__PURE__ */ o(
|
|
@@ -531,11 +533,11 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
531
533
|
}
|
|
532
534
|
) }),
|
|
533
535
|
g.map((_, U) => {
|
|
534
|
-
const P =
|
|
536
|
+
const P = J(e.id, _.key), I = N(_);
|
|
535
537
|
return /* @__PURE__ */ o(
|
|
536
538
|
"div",
|
|
537
539
|
{
|
|
538
|
-
ref: I ?
|
|
540
|
+
ref: I ? q(_.key) : void 0,
|
|
539
541
|
className: d("table-cell", "pinned-column", {
|
|
540
542
|
"primary-cell": I,
|
|
541
543
|
"expanded-cell": P
|
|
@@ -555,11 +557,11 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
555
557
|
);
|
|
556
558
|
}),
|
|
557
559
|
L.map((_) => {
|
|
558
|
-
const U =
|
|
560
|
+
const U = J(e.id, _.key), P = N(_);
|
|
559
561
|
return /* @__PURE__ */ o(
|
|
560
562
|
"div",
|
|
561
563
|
{
|
|
562
|
-
ref: P ?
|
|
564
|
+
ref: P ? q(_.key) : void 0,
|
|
563
565
|
className: d("table-cell", {
|
|
564
566
|
"primary-cell": P,
|
|
565
567
|
"expanded-cell": U
|
|
@@ -591,5 +593,5 @@ const ie = (l) => typeof l == "string", He = "_table_1244e_1", Be = "_resizable_
|
|
|
591
593
|
);
|
|
592
594
|
};
|
|
593
595
|
export {
|
|
594
|
-
|
|
596
|
+
bl as T
|
|
595
597
|
};
|
package/dist/table.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as r } from "./table-
|
|
1
|
+
import { T as r } from "./table-82d5455c.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-resizable";
|
|
@@ -10,6 +10,7 @@ import "./tooltip.js";
|
|
|
10
10
|
import "react-dom";
|
|
11
11
|
import "@floating-ui/react";
|
|
12
12
|
import "./floatingUi-41f8c7b5.js";
|
|
13
|
+
import "./isEmpty-ccacb5ff.js";
|
|
13
14
|
export {
|
|
14
15
|
r as Table,
|
|
15
16
|
r as default
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reportportal/ui-kit",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.149",
|
|
4
4
|
"description": "The UI-kit library for ReportPortal Design System.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -29,8 +29,9 @@
|
|
|
29
29
|
},
|
|
30
30
|
"./style.css": "./dist/style.css",
|
|
31
31
|
"./common": {
|
|
32
|
-
"types": "./dist/common/types.d.ts",
|
|
33
|
-
"
|
|
32
|
+
"types": "./dist/common/types/index.d.ts",
|
|
33
|
+
"import": "./dist/common.js",
|
|
34
|
+
"default": "./dist/common.js"
|
|
34
35
|
},
|
|
35
36
|
"./*": {
|
|
36
37
|
"types": "./dist/components/*/index.d.ts",
|