@reportportal/ui-kit 0.0.1-alpha.249 → 0.0.1-alpha.250
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/types.d.ts +6 -1
- package/dist/index.js +1 -1
- package/dist/modal.js +104 -109
- package/dist/style.css +2 -2
- package/dist/table-fc873b61.js +1182 -0
- package/dist/table.js +1 -1
- package/package.json +1 -1
- package/dist/table-8cdbfdfb.js +0 -1157
|
@@ -55,6 +55,7 @@ export interface TableComponentProps {
|
|
|
55
55
|
bodyClassName?: string;
|
|
56
56
|
rowClassName?: string;
|
|
57
57
|
checkboxColumnClassName?: string;
|
|
58
|
+
expandColumnClassName?: string;
|
|
58
59
|
selectedRowIds?: (string | number)[];
|
|
59
60
|
sortingDirection?: SortingDirection;
|
|
60
61
|
sortingColumn?: Column;
|
|
@@ -63,7 +64,11 @@ export interface TableComponentProps {
|
|
|
63
64
|
isHorizontallyScrollable?: boolean;
|
|
64
65
|
pinnedColumnKeys?: string[];
|
|
65
66
|
isRowsExpandable?: boolean;
|
|
67
|
+
isExpandAllVisible?: boolean;
|
|
66
68
|
expandedRowIds?: (string | number)[];
|
|
69
|
+
canExpandRow?: (row: RowData) => boolean;
|
|
70
|
+
rowExpansionMode?: 'cellContent' | 'detail';
|
|
71
|
+
renderExpandedRow?: (row: RowData) => ReactNode;
|
|
67
72
|
isSelectAllCheckboxAlwaysVisible?: boolean;
|
|
68
73
|
disabledRowIds?: (string | number)[];
|
|
69
74
|
setExpandedRowIds?: Dispatch<SetStateAction<Set<string | number>>>;
|
|
@@ -77,7 +82,7 @@ export interface TableComponentProps {
|
|
|
77
82
|
onToggleRowSelection?: (id: string | number) => void;
|
|
78
83
|
onToggleAllRowsSelection?: () => void;
|
|
79
84
|
onToggleRowExpansion?: (id: string | number) => void;
|
|
80
|
-
onToggleAllRowsExpansion?: () => void;
|
|
85
|
+
onToggleAllRowsExpansion?: (expandableRowIds: (string | number)[]) => void;
|
|
81
86
|
onColumnResize?: (columnKey: string, width: number) => void;
|
|
82
87
|
getRowCheckboxTooltip?: (rowId: string | number) => ReactNode;
|
|
83
88
|
externalScrollContainerRef?: RefObject<HTMLElement> | RefObject<Element> | null | undefined;
|
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ import { S as Ro } from "./spinLoader-c4a53718.js";
|
|
|
31
31
|
import { SystemAlert as Oo } from "./systemAlert.js";
|
|
32
32
|
import { S as Uo } from "./systemMessage-924fdaa6.js";
|
|
33
33
|
import { DragLayer as zo, SortableItem as Go, SortableList as Jo, TreeSortableContainer as Vo, TreeSortableItem as _o } from "./sortable.js";
|
|
34
|
-
import { T as Xo } from "./table-
|
|
34
|
+
import { T as Xo } from "./table-fc873b61.js";
|
|
35
35
|
import { T as qo } from "./themeProvider-46c2be7b.js";
|
|
36
36
|
import { T as Qo } from "./toggle-304107fa.js";
|
|
37
37
|
import { Tooltip as Zo } from "./tooltip.js";
|
package/dist/modal.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Scrollbars as
|
|
1
|
+
import { jsx as e, jsxs as d, Fragment as F } from "react/jsx-runtime";
|
|
2
|
+
import { useState as y, useRef as G, useCallback as M, useEffect as x, useMemo as U } from "react";
|
|
3
|
+
import { Scrollbars as X } from "rc-scrollbars";
|
|
4
4
|
import { AnimatePresence as Y, motion as V } from "framer-motion";
|
|
5
5
|
import { c as b } from "./bind-06a7ff84.js";
|
|
6
|
-
import { u as
|
|
6
|
+
import { u as Z } from "./useOnClickOutside-8f7d68a1.js";
|
|
7
7
|
import "react-dnd";
|
|
8
8
|
import "react-dnd-html5-backend";
|
|
9
9
|
import { u as q } from "./useWindowResize-a7e1ac92.js";
|
|
10
10
|
import { A as J } from "./constants-85822a6b.js";
|
|
11
11
|
import { a as Q } from "./dropdown-d2a05471.js";
|
|
12
|
-
import { K as
|
|
13
|
-
import { B as
|
|
14
|
-
import { Tooltip as
|
|
15
|
-
import { B as
|
|
16
|
-
import { S as
|
|
12
|
+
import { K as ee } from "./keyCodes-f63c0e11.js";
|
|
13
|
+
import { B as R } from "./button-7ab874f3.js";
|
|
14
|
+
import { Tooltip as te } from "./tooltip.js";
|
|
15
|
+
import { B as oe } from "./baseIconButton-251479f7.js";
|
|
16
|
+
import { S as ne } from "./close-4d480ef7.js";
|
|
17
17
|
import "react-dom";
|
|
18
18
|
import "@floating-ui/react-dom";
|
|
19
19
|
import "downshift";
|
|
@@ -26,154 +26,149 @@ import "./useEllipsisTitle-462fa254.js";
|
|
|
26
26
|
import "./checkbox-76aa8f97.js";
|
|
27
27
|
import "@floating-ui/react";
|
|
28
28
|
import "./floatingUi-46f5b896.js";
|
|
29
|
-
const
|
|
29
|
+
const ae = {
|
|
30
30
|
"modal-content": "_modal-content_ppzcb_1"
|
|
31
|
-
},
|
|
31
|
+
}, ie = b.bind(ae), C = ({ children: o }) => /* @__PURE__ */ e("div", { className: ie("modal-content"), children: o }), se = {
|
|
32
32
|
"buttons-block": "_buttons-block_1mwne_1",
|
|
33
33
|
"button-container": "_button-container_1mwne_7",
|
|
34
34
|
"modal-footer": "_modal-footer_1mwne_12",
|
|
35
35
|
"with-extra-node": "_with-extra-node_1mwne_19",
|
|
36
36
|
"size-small": "_size-small_1mwne_23"
|
|
37
|
-
},
|
|
38
|
-
footerNode:
|
|
39
|
-
closeHandler:
|
|
40
|
-
okButton:
|
|
41
|
-
cancelButton:
|
|
42
|
-
size:
|
|
37
|
+
}, f = b.bind(se), le = ({
|
|
38
|
+
footerNode: o,
|
|
39
|
+
closeHandler: n,
|
|
40
|
+
okButton: i,
|
|
41
|
+
cancelButton: u,
|
|
42
|
+
size: s
|
|
43
43
|
}) => {
|
|
44
|
-
const { tooltipNode:
|
|
45
|
-
const _ = /* @__PURE__ */
|
|
46
|
-
return
|
|
44
|
+
const { tooltipNode: p, ...m } = i || {}, v = () => {
|
|
45
|
+
const _ = /* @__PURE__ */ e(R, { adjustWidthOn: s === "small" ? "parent" : "min-width", ...m });
|
|
46
|
+
return p ? /* @__PURE__ */ e(te, { content: p, placement: "top", width: 270, children: _ }) : _;
|
|
47
47
|
};
|
|
48
|
-
return /* @__PURE__ */ d("div", { className:
|
|
49
|
-
|
|
50
|
-
/* @__PURE__ */ d("div", { className:
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
return /* @__PURE__ */ d("div", { className: f("modal-footer", { "with-extra-node": o, [`size-${s}`]: s }), children: [
|
|
49
|
+
o && o,
|
|
50
|
+
/* @__PURE__ */ d("div", { className: f("buttons-block"), children: [
|
|
51
|
+
u && /* @__PURE__ */ e("div", { className: f("button-container"), children: /* @__PURE__ */ e(
|
|
52
|
+
R,
|
|
53
53
|
{
|
|
54
54
|
variant: "ghost",
|
|
55
|
-
adjustWidthOn:
|
|
56
|
-
onClick:
|
|
57
|
-
...
|
|
55
|
+
adjustWidthOn: s === "small" ? "parent" : "min-width",
|
|
56
|
+
onClick: n,
|
|
57
|
+
...u
|
|
58
58
|
}
|
|
59
59
|
) }),
|
|
60
|
-
|
|
60
|
+
i && /* @__PURE__ */ e("div", { className: f("button-container"), children: v() })
|
|
61
61
|
] })
|
|
62
62
|
] });
|
|
63
|
-
},
|
|
63
|
+
}, re = {
|
|
64
64
|
"modal-header": "_modal-header_w4aaf_1",
|
|
65
65
|
"width-description": "_width-description_w4aaf_10",
|
|
66
66
|
"modal-header-content": "_modal-header-content_w4aaf_14",
|
|
67
67
|
"modal-title": "_modal-title_w4aaf_20",
|
|
68
68
|
"close-modal-icon": "_close-modal-icon_w4aaf_29"
|
|
69
|
-
}, w = b.bind(
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
] }),
|
|
73
|
-
modal:
|
|
74
|
-
"overlay-default": "_overlay-
|
|
75
|
-
"overlay-light-cyan": "_overlay-light-
|
|
76
|
-
"scrolling-content": "_scrolling-
|
|
77
|
-
"modal-window": "_modal-
|
|
78
|
-
description:
|
|
79
|
-
"scrollable-wrapper": "_scrollable-
|
|
80
|
-
"scrollable-content": "_scrollable-
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"size-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
cancelButton: r,
|
|
92
|
-
className: f,
|
|
69
|
+
}, w = b.bind(re), ce = ({ title: o, onClose: n, withDescription: i = !1 }) => /* @__PURE__ */ d("div", { className: w("modal-header", { "width-description": i }), children: [
|
|
70
|
+
/* @__PURE__ */ e("div", { className: w("modal-header-content"), children: o && /* @__PURE__ */ e("div", { className: w("modal-title"), children: o }) }),
|
|
71
|
+
/* @__PURE__ */ e(oe, { className: w("close-modal-icon"), onClick: n, children: /* @__PURE__ */ e(ne, {}) })
|
|
72
|
+
] }), de = "_modal_35896_1", me = "_description_35896_43", _e = {
|
|
73
|
+
modal: de,
|
|
74
|
+
"overlay-default": "_overlay-default_35896_12",
|
|
75
|
+
"overlay-light-cyan": "_overlay-light-cyan_35896_16",
|
|
76
|
+
"scrolling-content": "_scrolling-content_35896_20",
|
|
77
|
+
"modal-window": "_modal-window_35896_26",
|
|
78
|
+
description: me,
|
|
79
|
+
"scrollable-wrapper": "_scrollable-wrapper_35896_54",
|
|
80
|
+
"scrollable-content": "_scrollable-content_35896_58",
|
|
81
|
+
"size-default": "_size-default_35896_62",
|
|
82
|
+
"size-small": "_size-small_35896_74",
|
|
83
|
+
"size-large": "_size-large_35896_86"
|
|
84
|
+
}, c = b.bind(_e), ue = 0.9, pe = 32 + 24, he = 32 + 8, fe = 36 + 16, we = 32 * 2, be = "auto", k = ({ style: o, ...n }) => /* @__PURE__ */ e("div", { ...n, style: { ...o, zIndex: be } }), Ye = ({
|
|
85
|
+
title: o,
|
|
86
|
+
children: n,
|
|
87
|
+
footerNode: i,
|
|
88
|
+
okButton: u,
|
|
89
|
+
cancelButton: s,
|
|
90
|
+
className: p,
|
|
93
91
|
size: m = "default",
|
|
94
92
|
onClose: v = () => {
|
|
95
93
|
},
|
|
96
94
|
overlay: _ = "default",
|
|
97
|
-
zIndex:
|
|
98
|
-
allowCloseOutside:
|
|
95
|
+
zIndex: D = 2,
|
|
96
|
+
allowCloseOutside: S = !0,
|
|
99
97
|
scrollable: z = !1,
|
|
100
98
|
withoutFooter: N = !1,
|
|
101
|
-
createFooter:
|
|
102
|
-
description:
|
|
99
|
+
createFooter: A = null,
|
|
100
|
+
description: l = null
|
|
103
101
|
}) => {
|
|
104
|
-
const [
|
|
105
|
-
let
|
|
106
|
-
return N || (
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
}, []),
|
|
110
|
-
(
|
|
111
|
-
const { keyCode:
|
|
112
|
-
|
|
102
|
+
const [O, E] = y(!1), [I, L] = y(0), [$, P] = y(!1), a = G(null), H = q().height, B = H * ue, g = (H - I) / 2, W = () => {
|
|
103
|
+
let t = B - we;
|
|
104
|
+
return N || (t = t - fe), l ? t = t - he : t = t - pe, t;
|
|
105
|
+
}, r = M(() => {
|
|
106
|
+
E(!1);
|
|
107
|
+
}, []), T = M(
|
|
108
|
+
(t) => {
|
|
109
|
+
const { keyCode: h } = t;
|
|
110
|
+
h === ee.ESCAPE_KEY_CODE && r();
|
|
113
111
|
},
|
|
114
|
-
[
|
|
115
|
-
),
|
|
116
|
-
var
|
|
117
|
-
|
|
112
|
+
[r]
|
|
113
|
+
), K = () => {
|
|
114
|
+
var t;
|
|
115
|
+
$ || ((t = a.current) == null || t.focus(), P(!0));
|
|
118
116
|
};
|
|
119
|
-
|
|
120
|
-
if (!
|
|
117
|
+
x(() => {
|
|
118
|
+
if (!O || !a.current)
|
|
121
119
|
return;
|
|
122
|
-
const
|
|
123
|
-
|
|
120
|
+
const t = () => {
|
|
121
|
+
a.current && L(a.current.clientHeight);
|
|
124
122
|
};
|
|
125
|
-
if (
|
|
123
|
+
if (t(), typeof ResizeObserver > "u")
|
|
126
124
|
return;
|
|
127
|
-
const
|
|
128
|
-
return
|
|
129
|
-
}, [
|
|
130
|
-
const j =
|
|
125
|
+
const h = new ResizeObserver(t);
|
|
126
|
+
return h.observe(a.current), () => h.disconnect();
|
|
127
|
+
}, [O]), x(() => (E(!0), document.addEventListener("keydown", T, !1), () => document.removeEventListener("keydown", T, !1)), [T]);
|
|
128
|
+
const j = U(
|
|
131
129
|
() => ({
|
|
132
130
|
ignoreSelectors: [`[${Q}]`, `[${J}]`]
|
|
133
131
|
}),
|
|
134
132
|
[]
|
|
135
133
|
);
|
|
136
|
-
return
|
|
134
|
+
return Z(a, S ? r : void 0, j), /* @__PURE__ */ e(Y, { onExitComplete: v, children: O && /* @__PURE__ */ e("div", { className: c("modal", { [`overlay-${_}`]: _ }), style: { zIndex: D }, children: /* @__PURE__ */ d(
|
|
137
135
|
V.div,
|
|
138
136
|
{
|
|
139
|
-
className:
|
|
140
|
-
ref:
|
|
137
|
+
className: c("modal-window", { [`size-${m}`]: m }, p),
|
|
138
|
+
ref: a,
|
|
141
139
|
tabIndex: 0,
|
|
142
|
-
initial: { opacity: 0, marginTop: -
|
|
143
|
-
animate: { opacity: 1, marginTop:
|
|
144
|
-
exit: { opacity: 0, marginTop: -
|
|
140
|
+
initial: { opacity: 0, marginTop: -g },
|
|
141
|
+
animate: { opacity: 1, marginTop: g },
|
|
142
|
+
exit: { opacity: 0, marginTop: -g },
|
|
145
143
|
transition: { duration: 0.3 },
|
|
146
|
-
onAnimationStart:
|
|
144
|
+
onAnimationStart: K,
|
|
147
145
|
children: [
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
z ? /* @__PURE__ */
|
|
150
|
-
|
|
146
|
+
/* @__PURE__ */ e(ce, { title: o, onClose: r, withDescription: !!l }),
|
|
147
|
+
z ? /* @__PURE__ */ e("div", { className: c("scrollable-wrapper"), children: /* @__PURE__ */ e(
|
|
148
|
+
X,
|
|
151
149
|
{
|
|
152
150
|
autoHeight: !0,
|
|
153
151
|
autoHeightMax: W(),
|
|
154
152
|
hideTracksWhenNotNeeded: !0,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
children: /* @__PURE__ */ d("div", { className: n("scrollable-content"), children: [
|
|
161
|
-
i && /* @__PURE__ */ o("span", { className: n("description"), children: i }),
|
|
162
|
-
/* @__PURE__ */ o(C, { children: s })
|
|
153
|
+
renderTrackHorizontal: k,
|
|
154
|
+
renderTrackVertical: k,
|
|
155
|
+
children: /* @__PURE__ */ d("div", { className: c("scrollable-content"), children: [
|
|
156
|
+
l && /* @__PURE__ */ e("span", { className: c("description"), children: l }),
|
|
157
|
+
/* @__PURE__ */ e(C, { children: n })
|
|
163
158
|
] })
|
|
164
159
|
}
|
|
165
160
|
) }) : /* @__PURE__ */ d(F, { children: [
|
|
166
|
-
|
|
167
|
-
/* @__PURE__ */
|
|
161
|
+
l && /* @__PURE__ */ e("span", { className: c("description"), children: l }),
|
|
162
|
+
/* @__PURE__ */ e(C, { children: n })
|
|
168
163
|
] }),
|
|
169
|
-
!N && (
|
|
170
|
-
|
|
164
|
+
!N && (A ? A(r) : /* @__PURE__ */ e(
|
|
165
|
+
le,
|
|
171
166
|
{
|
|
172
167
|
size: m,
|
|
173
|
-
footerNode:
|
|
174
|
-
okButton:
|
|
175
|
-
cancelButton:
|
|
176
|
-
closeHandler:
|
|
168
|
+
footerNode: i,
|
|
169
|
+
okButton: u,
|
|
170
|
+
cancelButton: s,
|
|
171
|
+
closeHandler: r
|
|
177
172
|
}
|
|
178
173
|
))
|
|
179
174
|
]
|
|
@@ -182,8 +177,8 @@ const no = {
|
|
|
182
177
|
) }) });
|
|
183
178
|
};
|
|
184
179
|
export {
|
|
185
|
-
|
|
180
|
+
Ye as Modal,
|
|
186
181
|
C as ModalContent,
|
|
187
|
-
|
|
188
|
-
|
|
182
|
+
le as ModalFooter,
|
|
183
|
+
ce as ModalHeader
|
|
189
184
|
};
|