@reportportal/ui-kit 0.0.1-alpha.193 → 0.0.1-alpha.195
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/bulkPanel.js +67 -65
- package/dist/components/bulkPanel/bulkPanel.d.ts +1 -1
- package/dist/components/bulkPanel/types.d.ts +1 -0
- package/dist/{datePicker-b9a14640.js → datePicker-954bd00b.js} +1 -1
- package/dist/datePicker.js +3 -3
- package/dist/{dropdown-1c7e1b67.js → dropdown-aec82d1f.js} +73 -73
- package/dist/dropdown.js +2 -2
- package/dist/index.js +2 -2
- package/dist/modal.js +1 -1
- package/dist/sidePanel.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/bulkPanel.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { useState as k, useRef as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { c as
|
|
5
|
-
import { Scrollbars as
|
|
6
|
-
import { u as
|
|
1
|
+
import { jsx as n, jsxs as a, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import { useState as k, useRef as z, useMemo as G, useCallback as _, useEffect as H } from "react";
|
|
3
|
+
import { createPortal as J } from "react-dom";
|
|
4
|
+
import { c as Q } from "./bind-06a7ff84.js";
|
|
5
|
+
import { Scrollbars as X } from "rc-scrollbars";
|
|
6
|
+
import { u as Z } from "./useOnClickOutside-8f7d68a1.js";
|
|
7
7
|
import "react-dnd";
|
|
8
8
|
import "react-dnd-html5-backend";
|
|
9
|
-
import { K as
|
|
10
|
-
import { S as
|
|
11
|
-
import { Chip as
|
|
9
|
+
import { K as ee } from "./keyCodes-f63c0e11.js";
|
|
10
|
+
import { S as ne } from "./selection-da1a3528.js";
|
|
11
|
+
import { Chip as le } from "./chip.js";
|
|
12
12
|
import { B } from "./button-7ab874f3.js";
|
|
13
|
-
import { Tooltip as
|
|
14
|
-
import { S as
|
|
15
|
-
import { S as
|
|
13
|
+
import { Tooltip as te } from "./tooltip.js";
|
|
14
|
+
import { S as ie } from "./chevronDownDropdown-0260bb66.js";
|
|
15
|
+
import { S as se } from "./warning-537ead32.js";
|
|
16
16
|
import "./close-4d480ef7.js";
|
|
17
17
|
import "@floating-ui/react";
|
|
18
18
|
import "./floatingUi-41f8c7b5.js";
|
|
19
|
-
const ae = "_expanded_ue1t9_6",
|
|
19
|
+
const ae = "_expanded_ue1t9_6", oe = "_header_ue1t9_32", ce = "_tabs_ue1t9_119", re = "_tab_ue1t9_119", de = "_active_ue1t9_146", me = "_item_ue1t9_99", pe = {
|
|
20
20
|
"bulk-panel": "_bulk-panel_ue1t9_1",
|
|
21
21
|
expanded: ae,
|
|
22
22
|
"panel-content": "_panel-content_ue1t9_16",
|
|
23
|
-
header:
|
|
23
|
+
header: oe,
|
|
24
24
|
"header-actions": "_header-actions_ue1t9_43",
|
|
25
25
|
"warning-icon": "_warning-icon_ue1t9_49",
|
|
26
26
|
"info-message-container": "_info-message-container_ue1t9_58",
|
|
@@ -29,21 +29,21 @@ const ae = "_expanded_ue1t9_6", se = "_header_ue1t9_32", oe = "_tabs_ue1t9_119",
|
|
|
29
29
|
"expand-icon": "_expand-icon_ue1t9_87",
|
|
30
30
|
"items-section": "_items-section_ue1t9_99",
|
|
31
31
|
"items-header": "_items-header_ue1t9_110",
|
|
32
|
-
tabs:
|
|
33
|
-
tab:
|
|
32
|
+
tabs: ce,
|
|
33
|
+
tab: re,
|
|
34
34
|
"tab-count": "_tab-count_ue1t9_142",
|
|
35
|
-
active:
|
|
35
|
+
active: de,
|
|
36
36
|
"items-scroll": "_items-scroll_ue1t9_162",
|
|
37
37
|
"items-list": "_items-list_ue1t9_167",
|
|
38
|
-
item:
|
|
38
|
+
item: me,
|
|
39
39
|
"tooltip-wrapper": "_tooltip-wrapper_ue1t9_179"
|
|
40
|
-
}, l =
|
|
40
|
+
}, l = Q.bind(pe), ue = {
|
|
41
41
|
selected: "selected",
|
|
42
42
|
clearSelection: "Clear selection",
|
|
43
43
|
selectedItems: "Selected items",
|
|
44
44
|
eligibleTab: "Eligible Items",
|
|
45
45
|
ineligibleTab: "Ineligible Items",
|
|
46
|
-
ineligibleInfoMessage: (t) => /* @__PURE__ */
|
|
46
|
+
ineligibleInfoMessage: (t) => /* @__PURE__ */ a(P, { children: [
|
|
47
47
|
"You have ",
|
|
48
48
|
/* @__PURE__ */ n("b", { children: t }),
|
|
49
49
|
" ineligible item",
|
|
@@ -61,16 +61,17 @@ const ae = "_expanded_ue1t9_6", se = "_header_ue1t9_32", oe = "_tabs_ue1t9_119",
|
|
|
61
61
|
infoMessage: x,
|
|
62
62
|
className: K,
|
|
63
63
|
portalRoot: f,
|
|
64
|
+
zIndex: M = 2,
|
|
64
65
|
onRemoveItem: w,
|
|
65
|
-
onClearSelection:
|
|
66
|
+
onClearSelection: O
|
|
66
67
|
}) => {
|
|
67
|
-
const r = { ...
|
|
68
|
+
const r = { ...ue, ...D }, [o, v] = k(!1), [I, C] = k(u.INELIGIBLE), [i, E] = k(null), S = z(null), d = i !== null, { eligibleItems: b, ineligibleItems: h } = G(() => {
|
|
68
69
|
var g;
|
|
69
70
|
if (!i)
|
|
70
71
|
return { eligibleItems: [], ineligibleItems: [] };
|
|
71
|
-
const e = ((g = i.onValidate) == null ? void 0 : g.call(i, t)) ?? [],
|
|
72
|
-
return { eligibleItems: t.filter((L) => !
|
|
73
|
-
}, [t, i]), m = b.length, p = h.length,
|
|
72
|
+
const e = ((g = i.onValidate) == null ? void 0 : g.call(i, t)) ?? [], s = new Set(e.map((L) => L.id));
|
|
73
|
+
return { eligibleItems: t.filter((L) => !s.has(L.id)), ineligibleItems: e };
|
|
74
|
+
}, [t, i]), m = b.length, p = h.length, F = d && m > 0, T = d && p > 0 ? r.ineligibleInfoMessage(p) : null, V = G(() => d ? p === 0 ? b : m === 0 ? h : I === u.ELIGIBLE ? b : h : t, [
|
|
74
75
|
d,
|
|
75
76
|
t,
|
|
76
77
|
b,
|
|
@@ -82,79 +83,80 @@ const ae = "_expanded_ue1t9_6", se = "_header_ue1t9_32", oe = "_tabs_ue1t9_119",
|
|
|
82
83
|
requestAnimationFrame(() => {
|
|
83
84
|
v(!1);
|
|
84
85
|
});
|
|
85
|
-
}, []),
|
|
86
|
+
}, []), j = _(
|
|
86
87
|
(e) => {
|
|
87
88
|
var N, g;
|
|
88
89
|
(N = e.onClick) == null || N.call(e), (((g = e.onValidate) == null ? void 0 : g.call(e, t)) ?? []).length === 0 ? (e.onProceed(t, !0), c()) : (E(e), C(u.INELIGIBLE), v(!0));
|
|
89
90
|
},
|
|
90
91
|
[t, c]
|
|
91
|
-
),
|
|
92
|
+
), W = _(() => {
|
|
92
93
|
const e = i == null ? void 0 : i.onCancel;
|
|
93
94
|
E(null), c(), e == null || e();
|
|
94
|
-
}, [i, c]),
|
|
95
|
+
}, [i, c]), Y = _(() => {
|
|
95
96
|
i == null || i.onProceed(b), E(null), c();
|
|
96
|
-
}, [i, b, c]),
|
|
97
|
+
}, [i, b, c]), q = _(() => {
|
|
97
98
|
v((e) => !e);
|
|
98
|
-
}, []),
|
|
99
|
+
}, []), A = _(
|
|
99
100
|
(e) => {
|
|
100
101
|
w(e);
|
|
101
102
|
},
|
|
102
103
|
[w]
|
|
103
104
|
);
|
|
104
|
-
if (
|
|
105
|
+
if (H(() => {
|
|
105
106
|
if (!o)
|
|
106
107
|
return;
|
|
107
|
-
const e = (
|
|
108
|
-
|
|
108
|
+
const e = (s) => {
|
|
109
|
+
s.keyCode === ee.ESCAPE_KEY_CODE && c();
|
|
109
110
|
};
|
|
110
111
|
return document.addEventListener("keydown", e, !1), () => document.removeEventListener("keydown", e, !1);
|
|
111
|
-
}, [o, c]),
|
|
112
|
+
}, [o, c]), Z(S, o ? c : void 0), t.length === 0)
|
|
112
113
|
return null;
|
|
113
|
-
const
|
|
114
|
-
const
|
|
115
|
-
|
|
114
|
+
const R = (e) => h.some((s) => s.id === e.id), U = (e) => {
|
|
115
|
+
const s = /* @__PURE__ */ n(
|
|
116
|
+
le,
|
|
116
117
|
{
|
|
117
|
-
onRemove: () =>
|
|
118
|
-
variant:
|
|
118
|
+
onRemove: () => A(e.id),
|
|
119
|
+
variant: R(e) && d ? "error" : "default",
|
|
119
120
|
children: e.label ?? e.name
|
|
120
121
|
},
|
|
121
122
|
e.id
|
|
122
123
|
);
|
|
123
124
|
return /* @__PURE__ */ n("div", { className: l("item"), children: e.tooltipContent ? /* @__PURE__ */ n(
|
|
124
|
-
|
|
125
|
+
te,
|
|
125
126
|
{
|
|
126
127
|
wrapperClassName: l("tooltip-wrapper"),
|
|
127
128
|
content: e.tooltipContent,
|
|
128
129
|
placement: "top",
|
|
129
130
|
width: 270,
|
|
130
131
|
portalRoot: f,
|
|
131
|
-
children:
|
|
132
|
+
children: s
|
|
132
133
|
},
|
|
133
134
|
e.id
|
|
134
|
-
) :
|
|
135
|
-
},
|
|
135
|
+
) : s }, e.id);
|
|
136
|
+
}, y = /* @__PURE__ */ n(
|
|
136
137
|
"div",
|
|
137
138
|
{
|
|
138
139
|
className: l("bulk-panel", { expanded: o }, K),
|
|
139
140
|
role: "region",
|
|
140
141
|
"aria-label": "Bulk actions panel",
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
style: o ? { zIndex: M } : void 0,
|
|
143
|
+
children: /* @__PURE__ */ a("div", { className: l("panel-content", { expanded: o }), ref: S, children: [
|
|
144
|
+
/* @__PURE__ */ a("div", { className: l("header"), children: [
|
|
145
|
+
/* @__PURE__ */ a("div", { className: l("selection-info"), children: [
|
|
144
146
|
/* @__PURE__ */ n(
|
|
145
147
|
"button",
|
|
146
148
|
{
|
|
147
|
-
onClick:
|
|
149
|
+
onClick: q,
|
|
148
150
|
"aria-label": o ? "Collapse panel" : "Expand panel",
|
|
149
151
|
"aria-expanded": o,
|
|
150
|
-
children: /* @__PURE__ */ n("span", { className: l("expand-icon", { expanded: o }), children: /* @__PURE__ */ n(
|
|
152
|
+
children: /* @__PURE__ */ n("span", { className: l("expand-icon", { expanded: o }), children: /* @__PURE__ */ n(ie, {}) })
|
|
151
153
|
}
|
|
152
154
|
),
|
|
153
155
|
/* @__PURE__ */ n(
|
|
154
|
-
|
|
156
|
+
ne,
|
|
155
157
|
{
|
|
156
158
|
selectedCount: t.length,
|
|
157
|
-
onClearSelection:
|
|
159
|
+
onClearSelection: O,
|
|
158
160
|
captions: {
|
|
159
161
|
selected: r.selected,
|
|
160
162
|
buttonCaption: r.clearSelection
|
|
@@ -162,29 +164,29 @@ const ae = "_expanded_ue1t9_6", se = "_header_ue1t9_32", oe = "_tabs_ue1t9_119",
|
|
|
162
164
|
}
|
|
163
165
|
)
|
|
164
166
|
] }),
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
(T || x) && /* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */ n("i", { className: l("warning-icon"), children: /* @__PURE__ */ n(
|
|
167
|
+
/* @__PURE__ */ a("div", { className: l("header-actions"), children: [
|
|
168
|
+
(T || x) && /* @__PURE__ */ a("div", { className: l("info-message-container"), children: [
|
|
169
|
+
/* @__PURE__ */ n("i", { className: l("warning-icon"), children: /* @__PURE__ */ n(se, {}) }),
|
|
168
170
|
/* @__PURE__ */ n("div", { className: l("info-message"), children: T || x })
|
|
169
171
|
] }),
|
|
170
|
-
/* @__PURE__ */ n("div", { className: l("buttons-container"), children: d ? /* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */ n(B, { variant: "ghost", onClick:
|
|
172
|
-
|
|
173
|
-
] }) : $.map((e,
|
|
172
|
+
/* @__PURE__ */ n("div", { className: l("buttons-container"), children: d ? /* @__PURE__ */ a(P, { children: [
|
|
173
|
+
/* @__PURE__ */ n(B, { variant: "ghost", onClick: W, children: r.cancelButton((i == null ? void 0 : i.label) ?? "") }),
|
|
174
|
+
F && /* @__PURE__ */ n(B, { variant: "primary", onClick: Y, children: r.proceedButton(m) })
|
|
175
|
+
] }) : $.map((e, s) => /* @__PURE__ */ n(
|
|
174
176
|
B,
|
|
175
177
|
{
|
|
176
178
|
variant: e.variant,
|
|
177
|
-
onClick: () =>
|
|
179
|
+
onClick: () => j(e),
|
|
178
180
|
disabled: e.disabled,
|
|
179
181
|
children: e.label
|
|
180
182
|
},
|
|
181
|
-
`${e.label}-${
|
|
183
|
+
`${e.label}-${s}`
|
|
182
184
|
)) })
|
|
183
185
|
] })
|
|
184
186
|
] }),
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
/* @__PURE__ */ n("div", { className: l("items-header"), children: d ? /* @__PURE__ */
|
|
187
|
-
p > 0 && /* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ a("div", { className: l("items-section"), children: [
|
|
188
|
+
/* @__PURE__ */ n("div", { className: l("items-header"), children: d ? /* @__PURE__ */ a("div", { className: l("tabs"), children: [
|
|
189
|
+
p > 0 && /* @__PURE__ */ a(
|
|
188
190
|
"button",
|
|
189
191
|
{
|
|
190
192
|
className: l("tab", {
|
|
@@ -197,7 +199,7 @@ const ae = "_expanded_ue1t9_6", se = "_header_ue1t9_32", oe = "_tabs_ue1t9_119",
|
|
|
197
199
|
]
|
|
198
200
|
}
|
|
199
201
|
),
|
|
200
|
-
m > 0 && /* @__PURE__ */
|
|
202
|
+
m > 0 && /* @__PURE__ */ a(
|
|
201
203
|
"button",
|
|
202
204
|
{
|
|
203
205
|
className: l("tab", {
|
|
@@ -211,12 +213,12 @@ const ae = "_expanded_ue1t9_6", se = "_header_ue1t9_32", oe = "_tabs_ue1t9_119",
|
|
|
211
213
|
}
|
|
212
214
|
)
|
|
213
215
|
] }) : r.selectedItems }),
|
|
214
|
-
/* @__PURE__ */ n("div", { className: l("items-scroll"), children: /* @__PURE__ */ n(
|
|
216
|
+
/* @__PURE__ */ n("div", { className: l("items-scroll"), children: /* @__PURE__ */ n(X, { hideTracksWhenNotNeeded: !0, children: /* @__PURE__ */ n("div", { className: l("items-list"), children: V.map((e) => U(e)) }) }) })
|
|
215
217
|
] })
|
|
216
218
|
] })
|
|
217
219
|
}
|
|
218
220
|
);
|
|
219
|
-
return o && f ?
|
|
221
|
+
return o && f ? J(y, f) : y;
|
|
220
222
|
};
|
|
221
223
|
export {
|
|
222
224
|
Ge as BulkPanel
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BulkPanelProps } from './types';
|
|
2
2
|
|
|
3
|
-
export declare const BulkPanel: ({ items, actions, captions: captionsProp, infoMessage, className, portalRoot, onRemoveItem, onClearSelection, }: BulkPanelProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
|
+
export declare const BulkPanel: ({ items, actions, captions: captionsProp, infoMessage, className, portalRoot, zIndex, onRemoveItem, onClearSelection, }: BulkPanelProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -3,7 +3,7 @@ import { useMemo as E, forwardRef as G, useRef as V } from "react";
|
|
|
3
3
|
import v from "react-datepicker/dist/es/index.js";
|
|
4
4
|
import { c as L } from "./bind-06a7ff84.js";
|
|
5
5
|
import { F as W } from "./fieldText-1749da7a.js";
|
|
6
|
-
import { D as x } from "./dropdown-
|
|
6
|
+
import { D as x } from "./dropdown-aec82d1f.js";
|
|
7
7
|
import { S as I } from "./calendarArrow-44c7e60e.js";
|
|
8
8
|
import { registerLocale as q } from "react-datepicker";
|
|
9
9
|
const De = (t, n) => {
|
package/dist/datePicker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as t } from "./datePicker-
|
|
2
|
-
import { r as E } from "./datePicker-
|
|
1
|
+
import { D as t } from "./datePicker-954bd00b.js";
|
|
2
|
+
import { r as E } from "./datePicker-954bd00b.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react-datepicker/dist/es/index.js";
|
|
@@ -11,7 +11,7 @@ import "./baseIconButton-251479f7.js";
|
|
|
11
11
|
import "./spinLoader-c4a53718.js";
|
|
12
12
|
import "./maxValueDisplay-9be01a75.js";
|
|
13
13
|
import "./fieldLabel.js";
|
|
14
|
-
import "./dropdown-
|
|
14
|
+
import "./dropdown-aec82d1f.js";
|
|
15
15
|
import "react-dom";
|
|
16
16
|
import "@floating-ui/react-dom";
|
|
17
17
|
import "downshift";
|