@reportportal/ui-kit 0.0.1-alpha.222 → 0.0.1-alpha.223
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/{datePicker-7325f41a.js → datePicker-ab9411c0.js} +1 -1
- package/dist/datePicker.js +3 -3
- package/dist/{dropdown-b1592a49.js → dropdown-110ce4a5.js} +159 -159
- 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/package.json +1 -1
|
@@ -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-110ce4a5.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-ab9411c0.js";
|
|
2
|
+
import { r as E } from "./datePicker-ab9411c0.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-110ce4a5.js";
|
|
15
15
|
import "react-dom";
|
|
16
16
|
import "@floating-ui/react-dom";
|
|
17
17
|
import "downshift";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as R, jsx as u, Fragment as
|
|
2
|
-
import { forwardRef as Er, useState as
|
|
1
|
+
import { jsxs as R, jsx as u, Fragment as Se } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Er, useState as we, useRef as k, useMemo as w, useCallback as v, useLayoutEffect as He, useEffect as B } from "react";
|
|
3
3
|
import { createPortal as yr } from "react-dom";
|
|
4
|
-
import { c as
|
|
4
|
+
import { c as We } from "./bind-06a7ff84.js";
|
|
5
5
|
import { useFloating as Cr, offset as Ar, flip as Or, size as Dr, autoUpdate as br } from "@floating-ui/react-dom";
|
|
6
|
-
import { useSelect as
|
|
6
|
+
import { useSelect as Ee } from "downshift";
|
|
7
7
|
import { Scrollbars as Nr } from "rc-scrollbars";
|
|
8
8
|
import { K as p } from "./keyCodes-f63c0e11.js";
|
|
9
9
|
import { B as vr } from "./baseIconButton-251479f7.js";
|
|
@@ -15,7 +15,7 @@ import "react-dnd";
|
|
|
15
15
|
import "react-dnd-html5-backend";
|
|
16
16
|
import { u as xr } from "./useEllipsisTitle-462fa254.js";
|
|
17
17
|
import { C as kr } from "./checkbox-76aa8f97.js";
|
|
18
|
-
import { i as
|
|
18
|
+
import { i as ne } from "./isEmpty-ccacb5ff.js";
|
|
19
19
|
const Rr = (n) => {
|
|
20
20
|
const r = {}, c = {};
|
|
21
21
|
return Object.entries(n).forEach(([o, f]) => {
|
|
@@ -35,45 +35,44 @@ const Rr = (n) => {
|
|
|
35
35
|
selected: Sr,
|
|
36
36
|
"single-option": "_single-option_100r3_47",
|
|
37
37
|
"sub-option": "_sub-option_100r3_54"
|
|
38
|
-
},
|
|
38
|
+
}, $e = We.bind(Hr), Me = Er(
|
|
39
39
|
(n, r) => {
|
|
40
40
|
const {
|
|
41
|
-
option: { value: c, disabled: o, hidden: f, label: m, title:
|
|
41
|
+
option: { value: c, disabled: o, hidden: f, label: m, title: E, groupRef: A },
|
|
42
42
|
selected: F,
|
|
43
43
|
onChange: S,
|
|
44
44
|
render: U,
|
|
45
45
|
highlightHovered: j,
|
|
46
|
-
onMouseEnter:
|
|
46
|
+
onMouseEnter: se,
|
|
47
47
|
multiSelect: O,
|
|
48
48
|
isPartiallyChecked: q = !1,
|
|
49
49
|
depth: Z = 0,
|
|
50
|
-
hasChildren:
|
|
51
|
-
} = n,
|
|
52
|
-
const H =
|
|
53
|
-
H.closest("label") && !(H instanceof HTMLInputElement || H instanceof HTMLDivElement) || S == null || S(c);
|
|
54
|
-
}
|
|
55
|
-
return /* @__PURE__ */ R(
|
|
50
|
+
hasChildren: oe = !1
|
|
51
|
+
} = n, ae = (ie) => {
|
|
52
|
+
const H = ie.target;
|
|
53
|
+
o || H.closest("label") && !(H instanceof HTMLInputElement || H instanceof HTMLDivElement) || S == null || S(c);
|
|
54
|
+
}, G = /* @__PURE__ */ R(
|
|
56
55
|
"div",
|
|
57
56
|
{
|
|
58
|
-
className:
|
|
57
|
+
className: $e("dropdown-option", {
|
|
59
58
|
selected: F,
|
|
60
59
|
disabled: o,
|
|
61
60
|
hidden: f,
|
|
62
61
|
hover: j,
|
|
63
62
|
"multi-select": O,
|
|
64
|
-
"has-children":
|
|
63
|
+
"has-children": oe,
|
|
65
64
|
[`depth-${Z}`]: Z > 0
|
|
66
65
|
}),
|
|
67
|
-
title:
|
|
68
|
-
onClick:
|
|
66
|
+
title: o ? void 0 : E,
|
|
67
|
+
onClick: ae,
|
|
69
68
|
ref: r,
|
|
70
|
-
onMouseEnter:
|
|
69
|
+
onMouseEnter: se,
|
|
71
70
|
children: [
|
|
72
71
|
O && /* @__PURE__ */ u(kr, { value: !!F, partiallyChecked: q }),
|
|
73
72
|
/* @__PURE__ */ u(
|
|
74
73
|
"div",
|
|
75
74
|
{
|
|
76
|
-
className:
|
|
75
|
+
className: $e("single-option", {
|
|
77
76
|
"sub-option": !!A
|
|
78
77
|
}),
|
|
79
78
|
children: U ? U(n) : m
|
|
@@ -82,6 +81,7 @@ const Rr = (n) => {
|
|
|
82
81
|
]
|
|
83
82
|
}
|
|
84
83
|
);
|
|
84
|
+
return o && E ? /* @__PURE__ */ u("div", { title: E, children: G }) : G;
|
|
85
85
|
}
|
|
86
86
|
), $r = [
|
|
87
87
|
p.ENTER_KEY_CODE,
|
|
@@ -92,27 +92,27 @@ var V = /* @__PURE__ */ ((n) => (n.ON_KEY_DOWN = "onKeyDown", n.ON_CLICK = "onCl
|
|
|
92
92
|
const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
93
93
|
const c = Array.isArray(r) ? r : [r];
|
|
94
94
|
return n.findIndex(({ value: o }) => c.includes(o));
|
|
95
|
-
}, Ur = (n, r) => (n % r + r) % r,
|
|
95
|
+
}, Ur = (n, r) => (n % r + r) % r, ye = (n, r = 0, c = 1) => {
|
|
96
96
|
var f;
|
|
97
97
|
if (n.length === 0)
|
|
98
98
|
return 0;
|
|
99
99
|
if (!((f = n[r]) != null && f.disabled))
|
|
100
100
|
return r;
|
|
101
101
|
const o = n.length;
|
|
102
|
-
return
|
|
102
|
+
return ye(
|
|
103
103
|
n,
|
|
104
104
|
Ur(r + c, o),
|
|
105
105
|
c
|
|
106
106
|
);
|
|
107
|
-
}, jr = (n, r) =>
|
|
107
|
+
}, jr = (n, r) => ye(n, r), qr = (n, r) => ye(n, r, -1), ze = (n, r = 0, c) => !n || n.length === 0 ? [] : n.reduce((o, f) => {
|
|
108
108
|
var m;
|
|
109
|
-
return f && (o.push({ option: f, depth: r, parent: c }), (m = f.children) != null && m.length && o.push(...
|
|
110
|
-
}, []),
|
|
109
|
+
return f && (o.push({ option: f, depth: r, parent: c }), (m = f.children) != null && m.length && o.push(...ze(f.children, r + 1, f))), o;
|
|
110
|
+
}, []), Be = (n) => !n || n.length === 0 ? [] : n.reduce((r, c) => {
|
|
111
111
|
var o;
|
|
112
|
-
return c && ((o = c.children) != null && o.length ? r.push(...
|
|
113
|
-
}, []),
|
|
112
|
+
return c && ((o = c.children) != null && o.length ? r.push(...Be(c.children)) : r.push(c)), r;
|
|
113
|
+
}, []), Fe = (n) => {
|
|
114
114
|
var r;
|
|
115
|
-
return n ? (r = n.children) != null && r.length ? n.children.reduce((c, o) => (o && c.push(...
|
|
115
|
+
return n ? (r = n.children) != null && r.length ? n.children.reduce((c, o) => (o && c.push(...Fe(o)), c), []) : [n.value] : [];
|
|
116
116
|
}, Zr = "_container_sth8o_1", Gr = "_icon_sth8o_7", Xr = "_arrow_sth8o_15", Jr = "_dropdown_sth8o_33", Qr = "_disabled_sth8o_53", et = "_value_sth8o_60", rt = "_error_sth8o_63", tt = "_touched_sth8o_63", nt = "_opened_sth8o_67", st = "_placeholder_sth8o_101", ot = "_ghost_sth8o_184", at = "_divider_sth8o_202", it = {
|
|
117
117
|
container: Zr,
|
|
118
118
|
icon: Gr,
|
|
@@ -138,46 +138,46 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
138
138
|
"empty-list-message": "_empty-list-message_sth8o_172",
|
|
139
139
|
ghost: ot,
|
|
140
140
|
divider: at
|
|
141
|
-
}, _ =
|
|
141
|
+
}, _ = We.bind(it), vt = ({
|
|
142
142
|
multiSelect: n = !1,
|
|
143
143
|
value: r = n ? [] : "",
|
|
144
144
|
options: c = [],
|
|
145
145
|
disabled: o = !1,
|
|
146
146
|
error: f,
|
|
147
147
|
onChange: m,
|
|
148
|
-
onFocus:
|
|
148
|
+
onFocus: E,
|
|
149
149
|
onBlur: A,
|
|
150
150
|
mobileDisabled: F,
|
|
151
151
|
title: S,
|
|
152
152
|
touched: U = !1,
|
|
153
153
|
icon: j,
|
|
154
|
-
variant:
|
|
154
|
+
variant: se,
|
|
155
155
|
placeholder: O = "",
|
|
156
156
|
label: q = "",
|
|
157
157
|
renderOption: Z,
|
|
158
|
-
transparentBackground:
|
|
159
|
-
className:
|
|
160
|
-
toggleButtonClassName:
|
|
161
|
-
selectListClassName:
|
|
162
|
-
isListWidthLimited:
|
|
163
|
-
optionAll:
|
|
164
|
-
isOptionAllVisible:
|
|
158
|
+
transparentBackground: oe = !1,
|
|
159
|
+
className: ae,
|
|
160
|
+
toggleButtonClassName: G,
|
|
161
|
+
selectListClassName: ie,
|
|
162
|
+
isListWidthLimited: H = !1,
|
|
163
|
+
optionAll: le = { value: "all", label: "All" },
|
|
164
|
+
isOptionAllVisible: Ce = !1,
|
|
165
165
|
onSelectAll: Ue = () => {
|
|
166
166
|
},
|
|
167
|
-
formatDisplayedValue:
|
|
167
|
+
formatDisplayedValue: ce,
|
|
168
168
|
notScrollable: $ = !1,
|
|
169
|
-
footer:
|
|
170
|
-
includeGroupValue:
|
|
169
|
+
footer: X,
|
|
170
|
+
includeGroupValue: Ae = !1,
|
|
171
171
|
clearable: je = !1,
|
|
172
|
-
onClear:
|
|
172
|
+
onClear: Oe = () => {
|
|
173
173
|
},
|
|
174
174
|
clearButtonAriaLabel: qe = "Clear selection",
|
|
175
|
-
menuPortalRoot:
|
|
175
|
+
menuPortalRoot: y,
|
|
176
176
|
isMultiSelectWithTags: D = !1,
|
|
177
177
|
noMatchesMessage: Ze = "No matches found",
|
|
178
178
|
...Ge
|
|
179
179
|
}) => {
|
|
180
|
-
const { transformed: Xe, remaining: Je } = Rr(Ge), [l,
|
|
180
|
+
const { transformed: Xe, remaining: Je } = Rr(Ge), [l, J] = we(!1), [I, De] = we(""), be = k(null), Ne = k(null), M = k(null), de = k(0), ue = k(null), he = k(""), [Qe, Q] = we(null), K = k(null), W = w(() => ze(c), [c]), L = w(() => {
|
|
181
181
|
if (!D || !I.trim())
|
|
182
182
|
return W;
|
|
183
183
|
const e = I.toLowerCase();
|
|
@@ -187,44 +187,44 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
187
187
|
}, [W, I, D]), g = w(
|
|
188
188
|
() => L.map(({ option: e }) => e),
|
|
189
189
|
[L]
|
|
190
|
-
),
|
|
190
|
+
), ve = w(
|
|
191
191
|
() => W.map(({ option: e }) => e),
|
|
192
192
|
[W]
|
|
193
|
-
),
|
|
193
|
+
), ee = w(() => L.filter(({ option: e }) => {
|
|
194
194
|
var t;
|
|
195
195
|
return (t = e.children) == null ? void 0 : t.length;
|
|
196
|
-
}).map(({ option: e }) => e), [L]),
|
|
197
|
-
() =>
|
|
198
|
-
[
|
|
199
|
-
),
|
|
196
|
+
}).map(({ option: e }) => e), [L]), Ie = w(() => Be(c), [c]), b = w(
|
|
197
|
+
() => Ie.map(({ value: e }) => e),
|
|
198
|
+
[Ie]
|
|
199
|
+
), re = w(() => {
|
|
200
200
|
const e = /* @__PURE__ */ new Map();
|
|
201
|
-
return
|
|
202
|
-
e.set(t.value,
|
|
201
|
+
return ee.forEach((t) => {
|
|
202
|
+
e.set(t.value, Fe(t));
|
|
203
203
|
}), e;
|
|
204
|
-
}, [
|
|
205
|
-
(e) => (
|
|
206
|
-
const s =
|
|
207
|
-
|
|
204
|
+
}, [ee]), z = v(
|
|
205
|
+
(e) => (ee.forEach((t) => {
|
|
206
|
+
const s = re.get(t.value) ?? [], i = s.length > 0 && s.every((d) => e.has(d));
|
|
207
|
+
Ae && i ? e.add(t.value) : e.delete(t.value);
|
|
208
208
|
}), e),
|
|
209
|
-
[
|
|
210
|
-
), T = w(() => !n || !Array.isArray(r) ? /* @__PURE__ */ new Set() : z(new Set(r)), [n, r, z]),
|
|
211
|
-
|
|
209
|
+
[ee, Ae, re]
|
|
210
|
+
), T = w(() => !n || !Array.isArray(r) ? /* @__PURE__ */ new Set() : z(new Set(r)), [n, r, z]), fe = w(() => n ? Array.isArray(r) && r.length > 0 : g.some((e) => e.value === r) || r === !1 || r === 0 || !!r, [n, r, g]), er = je && fe && !o, rr = v((e) => {
|
|
211
|
+
de.current = e.scrollTop;
|
|
212
212
|
}, []);
|
|
213
|
-
|
|
214
|
-
l && !$ && M.current && !(n && K.current !== null) && M.current.scrollTop(
|
|
213
|
+
He(() => {
|
|
214
|
+
l && !$ && M.current && !(n && K.current !== null) && M.current.scrollTop(de.current);
|
|
215
215
|
}, [l, $, r, n]);
|
|
216
|
-
const { refs: P, floatingStyles:
|
|
216
|
+
const { refs: P, floatingStyles: Ke } = Cr({
|
|
217
217
|
placement: "bottom-start",
|
|
218
218
|
middleware: [
|
|
219
219
|
Ar(5),
|
|
220
220
|
Or({
|
|
221
221
|
fallbackPlacements: ["bottom-start", "top-start", "bottom", "top"],
|
|
222
|
-
...
|
|
222
|
+
...y && {
|
|
223
223
|
boundary: document.documentElement,
|
|
224
224
|
rootBoundary: "viewport"
|
|
225
225
|
}
|
|
226
226
|
}),
|
|
227
|
-
|
|
227
|
+
y ? Dr({
|
|
228
228
|
apply({ rects: e, elements: t }) {
|
|
229
229
|
const s = e.reference.width;
|
|
230
230
|
Object.assign(t.floating.style, {
|
|
@@ -239,7 +239,7 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
239
239
|
animationFrame: !0
|
|
240
240
|
}) : void 0
|
|
241
241
|
}), tr = () => {
|
|
242
|
-
if (!
|
|
242
|
+
if (!Ce)
|
|
243
243
|
return;
|
|
244
244
|
const e = Array.isArray(r) ? r : [], t = new Set(e), s = b.some((d) => !t.has(d));
|
|
245
245
|
b.forEach((d) => {
|
|
@@ -247,23 +247,23 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
247
247
|
});
|
|
248
248
|
const i = z(t);
|
|
249
249
|
m(Array.from(i)), Ue();
|
|
250
|
-
},
|
|
251
|
-
l || (
|
|
252
|
-
}, [l,
|
|
253
|
-
|
|
254
|
-
}, [A]),
|
|
250
|
+
}, te = v(() => {
|
|
251
|
+
l || (J(!0), E == null || E());
|
|
252
|
+
}, [l, E]), C = v(() => {
|
|
253
|
+
J(!1), De(""), he.current = "", A == null || A();
|
|
254
|
+
}, [A]), _e = v(() => {
|
|
255
255
|
if (o)
|
|
256
256
|
return;
|
|
257
|
-
m(n ? [] : ""),
|
|
257
|
+
m(n ? [] : ""), Oe(), C(), requestAnimationFrame(() => {
|
|
258
258
|
const t = P.reference.current;
|
|
259
259
|
t && t instanceof HTMLElement && t.focus();
|
|
260
260
|
});
|
|
261
|
-
}, [o, n, m,
|
|
261
|
+
}, [o, n, m, Oe, C, P]), nr = v(
|
|
262
262
|
(e) => {
|
|
263
|
-
e.preventDefault(), e.stopPropagation(),
|
|
263
|
+
e.preventDefault(), e.stopPropagation(), _e();
|
|
264
264
|
},
|
|
265
|
-
[
|
|
266
|
-
),
|
|
265
|
+
[_e]
|
|
266
|
+
), Le = v(
|
|
267
267
|
(e) => {
|
|
268
268
|
var d, a;
|
|
269
269
|
if (!l)
|
|
@@ -271,28 +271,28 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
271
271
|
const t = e == null ? void 0 : e.target;
|
|
272
272
|
if (!t)
|
|
273
273
|
return;
|
|
274
|
-
const s = (d =
|
|
275
|
-
!s && !i &&
|
|
274
|
+
const s = (d = be.current) == null ? void 0 : d.contains(t), i = (a = Ne.current) == null ? void 0 : a.contains(t);
|
|
275
|
+
!s && !i && C();
|
|
276
276
|
},
|
|
277
|
-
[l,
|
|
277
|
+
[l, C]
|
|
278
278
|
);
|
|
279
279
|
B(() => {
|
|
280
280
|
if (!l)
|
|
281
281
|
return;
|
|
282
282
|
const e = (t) => {
|
|
283
|
-
|
|
283
|
+
Le(t);
|
|
284
284
|
};
|
|
285
285
|
return document.addEventListener("pointerdown", e), () => {
|
|
286
286
|
document.removeEventListener("pointerdown", e);
|
|
287
287
|
};
|
|
288
|
-
}, [l,
|
|
289
|
-
const
|
|
288
|
+
}, [l, Le]);
|
|
289
|
+
const Te = (e) => {
|
|
290
290
|
var t;
|
|
291
291
|
if (!e.disabled) {
|
|
292
292
|
if (n) {
|
|
293
293
|
const s = Array.isArray(r) ? r : [], i = new Set(s);
|
|
294
294
|
if ((t = e.children) != null && t.length) {
|
|
295
|
-
const a =
|
|
295
|
+
const a = re.get(e.value) ?? [], h = a.some((N) => !i.has(N));
|
|
296
296
|
a.forEach((N) => {
|
|
297
297
|
h ? i.add(N) : i.delete(N);
|
|
298
298
|
});
|
|
@@ -302,62 +302,62 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
302
302
|
m(Array.from(d));
|
|
303
303
|
} else
|
|
304
304
|
m(e.value);
|
|
305
|
-
|
|
305
|
+
J((s) => n || !s);
|
|
306
306
|
}
|
|
307
|
-
}, sr = () => g.find(({ value: e }) => e === r),
|
|
307
|
+
}, sr = () => g.find(({ value: e }) => e === r), xe = Fr(g, r), {
|
|
308
308
|
getToggleButtonProps: or,
|
|
309
309
|
getLabelProps: ar,
|
|
310
|
-
getMenuProps:
|
|
310
|
+
getMenuProps: ke,
|
|
311
311
|
getItemProps: ir,
|
|
312
312
|
setHighlightedIndex: x,
|
|
313
|
-
highlightedIndex:
|
|
314
|
-
} =
|
|
313
|
+
highlightedIndex: pe
|
|
314
|
+
} = Ee({
|
|
315
315
|
items: g,
|
|
316
316
|
itemToString: (e) => (e != null && e.label ? String(e.label) : O) || "",
|
|
317
317
|
selectedItem: sr(),
|
|
318
318
|
isOpen: l,
|
|
319
319
|
circularNavigation: !0,
|
|
320
|
-
defaultHighlightedIndex:
|
|
320
|
+
defaultHighlightedIndex: xe,
|
|
321
321
|
onHighlightedIndexChange: (e) => {
|
|
322
322
|
switch (e.type) {
|
|
323
|
-
case
|
|
324
|
-
return
|
|
325
|
-
case
|
|
326
|
-
return
|
|
323
|
+
case Ee.stateChangeTypes.MenuKeyDownArrowUp:
|
|
324
|
+
return Q(V.ON_KEY_DOWN), x(qr(g, e.highlightedIndex)), e;
|
|
325
|
+
case Ee.stateChangeTypes.MenuKeyDownArrowDown:
|
|
326
|
+
return Q(V.ON_KEY_DOWN), x(jr(g, e.highlightedIndex)), e;
|
|
327
327
|
default:
|
|
328
328
|
return e;
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
|
-
}),
|
|
331
|
+
}), Re = v(
|
|
332
332
|
(e) => {
|
|
333
|
-
|
|
333
|
+
Ne.current = e, P.setFloating(e);
|
|
334
334
|
},
|
|
335
335
|
[P]
|
|
336
336
|
), lr = v(
|
|
337
337
|
(e = {}) => {
|
|
338
|
-
const t =
|
|
338
|
+
const t = ke(e), s = t.ref;
|
|
339
339
|
return {
|
|
340
340
|
...t,
|
|
341
341
|
ref: (i) => {
|
|
342
|
-
|
|
342
|
+
Re(i), typeof s == "function" ? s(i) : s && (s.current = i);
|
|
343
343
|
}
|
|
344
344
|
};
|
|
345
345
|
},
|
|
346
|
-
[
|
|
346
|
+
[ke, Re]
|
|
347
347
|
);
|
|
348
348
|
B(() => {
|
|
349
349
|
n && l && K.current !== null && K.current >= 0 && K.current < g.length && (x(K.current), K.current = null, requestAnimationFrame(() => {
|
|
350
|
-
M.current && !$ && M.current.scrollTop(
|
|
350
|
+
M.current && !$ && M.current.scrollTop(de.current);
|
|
351
351
|
}));
|
|
352
352
|
}, [n, l, r, g.length, x, $]), B(() => {
|
|
353
353
|
l && D && requestAnimationFrame(() => {
|
|
354
354
|
var e;
|
|
355
|
-
(e =
|
|
355
|
+
(e = ue.current) == null || e.focus();
|
|
356
356
|
});
|
|
357
357
|
}, [l, D]), B(() => {
|
|
358
|
-
D && l && I !==
|
|
359
|
-
}, [I, D, l]),
|
|
360
|
-
if (!l || !
|
|
358
|
+
D && l && I !== he.current && (he.current = I, I && x(0));
|
|
359
|
+
}, [I, D, l]), He(() => {
|
|
360
|
+
if (!l || !y)
|
|
361
361
|
return;
|
|
362
362
|
let e = window.scrollY, t = !0;
|
|
363
363
|
const s = 300, i = () => {
|
|
@@ -376,21 +376,21 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
376
376
|
return () => {
|
|
377
377
|
clearTimeout(a), window.removeEventListener("scroll", d, { capture: !0 });
|
|
378
378
|
};
|
|
379
|
-
}, [l,
|
|
380
|
-
if (!l || !
|
|
379
|
+
}, [l, y]), B(() => {
|
|
380
|
+
if (!l || !y)
|
|
381
381
|
return;
|
|
382
382
|
const e = () => {
|
|
383
|
-
|
|
383
|
+
C();
|
|
384
384
|
};
|
|
385
385
|
return window.addEventListener("resize", e), () => {
|
|
386
386
|
window.removeEventListener("resize", e);
|
|
387
387
|
};
|
|
388
|
-
}, [l,
|
|
389
|
-
const
|
|
390
|
-
o || (
|
|
391
|
-
},
|
|
388
|
+
}, [l, y, C]);
|
|
389
|
+
const Pe = () => {
|
|
390
|
+
o || (J((e) => !e), l ? A == null || A() : E == null || E(), Q(V.ON_CLICK));
|
|
391
|
+
}, me = w(() => {
|
|
392
392
|
if (n && Array.isArray(r) && b.length > 0 && b.every((t) => T.has(t)))
|
|
393
|
-
return
|
|
393
|
+
return le.label;
|
|
394
394
|
const e = g.reduce((t, s) => ((Array.isArray(r) && r.includes(s.value) || s.value === r) && t.push(s.label), t), []);
|
|
395
395
|
return e.length > 0 ? e.join(", ") : !r && r !== !1 && r !== 0 || Array.isArray(r) && !r.length ? O : typeof r == "string" && r.length > 0 && !O ? r : O || void 0;
|
|
396
396
|
}, [
|
|
@@ -398,28 +398,28 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
398
398
|
r,
|
|
399
399
|
b,
|
|
400
400
|
T,
|
|
401
|
-
|
|
401
|
+
le.label,
|
|
402
402
|
g,
|
|
403
403
|
O
|
|
404
|
-
]),
|
|
404
|
+
]), ge = w(() => ce ? ce(me) : me, [ce, me]), cr = fe && ge ? ge : void 0, { ref: dr, title: ur } = xr(cr), hr = (e) => {
|
|
405
405
|
const { keyCode: t } = e;
|
|
406
|
-
$r.includes(t) && e.target === e.currentTarget && (e.preventDefault(), e.stopPropagation(), !l && (x(
|
|
406
|
+
$r.includes(t) && e.target === e.currentTarget && (e.preventDefault(), e.stopPropagation(), !l && (x(xe), te(), Q(V.ON_KEY_DOWN)));
|
|
407
407
|
}, fr = (e) => {
|
|
408
408
|
const { keyCode: t } = e;
|
|
409
409
|
if (t === p.ENTER_KEY_CODE || t === p.SPACE_KEY_CODE) {
|
|
410
|
-
const s = g[
|
|
411
|
-
if (!s)
|
|
410
|
+
const s = g[pe];
|
|
411
|
+
if (!s || s.disabled)
|
|
412
412
|
return;
|
|
413
|
-
n && (K.current =
|
|
413
|
+
n && (K.current = pe), Te(s), n || C();
|
|
414
414
|
return;
|
|
415
415
|
}
|
|
416
|
-
Mr.includes(t) && (e.stopPropagation(),
|
|
417
|
-
},
|
|
418
|
-
n &&
|
|
416
|
+
Mr.includes(t) && (e.stopPropagation(), C());
|
|
417
|
+
}, Ye = () => /* @__PURE__ */ R("div", { className: _("options-container"), children: [
|
|
418
|
+
n && Ce && !ne(L) && /* @__PURE__ */ R(Se, { children: [
|
|
419
419
|
/* @__PURE__ */ u(
|
|
420
|
-
|
|
420
|
+
Me,
|
|
421
421
|
{
|
|
422
|
-
option:
|
|
422
|
+
option: le,
|
|
423
423
|
selected: Array.isArray(r) && b.length > 0 && b.every((e) => T.has(e)),
|
|
424
424
|
onChange: tr,
|
|
425
425
|
multiSelect: n,
|
|
@@ -429,11 +429,11 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
429
429
|
/* @__PURE__ */ u("div", { className: _("divider") }),
|
|
430
430
|
" "
|
|
431
431
|
] }),
|
|
432
|
-
|
|
432
|
+
ne(L) ? /* @__PURE__ */ u("div", { className: _("empty-list-message"), children: Ze }) : L.map(({ option: e, depth: t }, s) => {
|
|
433
433
|
var h, N;
|
|
434
|
-
const i =
|
|
434
|
+
const i = re.get(e.value) ?? [e.value], d = n && i.every((Y) => T.has(Y)), a = n && ((h = e.children) == null ? void 0 : h.length) && i.some((Y) => T.has(Y)) && !d;
|
|
435
435
|
return /* @__PURE__ */ u(
|
|
436
|
-
|
|
436
|
+
Me,
|
|
437
437
|
{
|
|
438
438
|
...ir({
|
|
439
439
|
item: e,
|
|
@@ -442,9 +442,9 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
442
442
|
multiSelect: n,
|
|
443
443
|
selected: n ? d : e.value === r,
|
|
444
444
|
option: { title: e.label, ...e },
|
|
445
|
-
highlightHovered:
|
|
445
|
+
highlightHovered: pe === s && Qe !== V.ON_CLICK,
|
|
446
446
|
render: Z,
|
|
447
|
-
onChange: e.disabled ? null : () =>
|
|
447
|
+
onChange: e.disabled ? null : () => Te(e),
|
|
448
448
|
onMouseEnter: () => x(s),
|
|
449
449
|
depth: t,
|
|
450
450
|
hasChildren: !!((N = e.children) != null && N.length),
|
|
@@ -453,13 +453,13 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
453
453
|
e.value
|
|
454
454
|
);
|
|
455
455
|
}),
|
|
456
|
-
|
|
456
|
+
X && /* @__PURE__ */ R(Se, { children: [
|
|
457
457
|
/* @__PURE__ */ u("div", { className: _("divider") }),
|
|
458
|
-
typeof
|
|
458
|
+
typeof X == "function" ? X(C) : X
|
|
459
459
|
] })
|
|
460
460
|
] }), _r = () => {
|
|
461
|
-
const e =
|
|
462
|
-
const h =
|
|
461
|
+
const e = ve.reduce((a, h) => (Array.isArray(r) && r.includes(h.value) && a.push(h.label), a), []), t = (a) => {
|
|
462
|
+
const h = ve.find(
|
|
463
463
|
({ label: wr }) => wr === a
|
|
464
464
|
);
|
|
465
465
|
if (!h)
|
|
@@ -470,32 +470,32 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
470
470
|
m(Array.from(gr));
|
|
471
471
|
}, s = (a) => {
|
|
472
472
|
const h = a.target;
|
|
473
|
-
|
|
473
|
+
De(h.value), l || (te(), requestAnimationFrame(() => {
|
|
474
474
|
h.focus();
|
|
475
475
|
}));
|
|
476
476
|
}, i = (a) => {
|
|
477
477
|
if (a.keyCode === p.ESCAPE_KEY_CODE) {
|
|
478
|
-
a.stopPropagation(),
|
|
478
|
+
a.stopPropagation(), C();
|
|
479
479
|
return;
|
|
480
480
|
}
|
|
481
|
-
a.keyCode === p.ENTER_KEY_CODE || a.keyCode === p.SPACE_KEY_CODE || (a.keyCode === p.ARROW_DOWN_KEY_CODE || a.keyCode === p.ARROW_UP_KEY_CODE) && (a.preventDefault(),
|
|
481
|
+
a.keyCode === p.ENTER_KEY_CODE || a.keyCode === p.SPACE_KEY_CODE || (a.keyCode === p.ARROW_DOWN_KEY_CODE || a.keyCode === p.ARROW_UP_KEY_CODE) && (a.preventDefault(), te());
|
|
482
482
|
}, d = /* @__PURE__ */ u(
|
|
483
483
|
"input",
|
|
484
484
|
{
|
|
485
|
-
ref:
|
|
485
|
+
ref: ue,
|
|
486
486
|
type: "text",
|
|
487
487
|
className: _("search-input"),
|
|
488
488
|
value: I,
|
|
489
489
|
onChange: s,
|
|
490
490
|
onKeyDown: i,
|
|
491
491
|
onClick: (a) => {
|
|
492
|
-
a.stopPropagation(),
|
|
492
|
+
a.stopPropagation(), te();
|
|
493
493
|
},
|
|
494
|
-
placeholder:
|
|
494
|
+
placeholder: ne(e) ? O : "",
|
|
495
495
|
autoComplete: "off"
|
|
496
496
|
}
|
|
497
497
|
);
|
|
498
|
-
return
|
|
498
|
+
return ne(e) ? /* @__PURE__ */ u("div", { className: _("tags-wrapper", "with-search"), children: d }) : /* @__PURE__ */ R("div", { className: _("tags-wrapper", "with-search"), children: [
|
|
499
499
|
/* @__PURE__ */ u(
|
|
500
500
|
Tr,
|
|
501
501
|
{
|
|
@@ -512,14 +512,14 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
512
512
|
{
|
|
513
513
|
ref: dr,
|
|
514
514
|
className: _("value", {
|
|
515
|
-
placeholder: !
|
|
515
|
+
placeholder: !fe
|
|
516
516
|
}),
|
|
517
517
|
title: ur,
|
|
518
|
-
children:
|
|
518
|
+
children: ge
|
|
519
519
|
}
|
|
520
520
|
), mr = or({
|
|
521
|
-
className: _("dropdown",
|
|
522
|
-
"transparent-background":
|
|
521
|
+
className: _("dropdown", se, G, {
|
|
522
|
+
"transparent-background": oe,
|
|
523
523
|
opened: l,
|
|
524
524
|
disabled: o,
|
|
525
525
|
error: f,
|
|
@@ -527,15 +527,15 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
527
527
|
"mobile-disabled": F,
|
|
528
528
|
"multi-select-with-tags": D
|
|
529
529
|
}),
|
|
530
|
-
onClick:
|
|
530
|
+
onClick: Pe,
|
|
531
531
|
onKeyDown: hr,
|
|
532
532
|
ref: P.setReference
|
|
533
|
-
}), { type: lt, ...
|
|
533
|
+
}), { type: lt, ...Ve } = mr;
|
|
534
534
|
return /* @__PURE__ */ R(
|
|
535
535
|
"div",
|
|
536
536
|
{
|
|
537
|
-
ref:
|
|
538
|
-
className: _("container",
|
|
537
|
+
ref: be,
|
|
538
|
+
className: _("container", ae),
|
|
539
539
|
title: S,
|
|
540
540
|
...Je,
|
|
541
541
|
...Xe,
|
|
@@ -544,7 +544,7 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
544
544
|
Lr,
|
|
545
545
|
{
|
|
546
546
|
...ar(),
|
|
547
|
-
onClick: () => !o &&
|
|
547
|
+
onClick: () => !o && Pe(),
|
|
548
548
|
style: { cursor: o ? "default" : "pointer" },
|
|
549
549
|
children: q
|
|
550
550
|
}
|
|
@@ -552,10 +552,10 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
552
552
|
/* @__PURE__ */ R(
|
|
553
553
|
"div",
|
|
554
554
|
{
|
|
555
|
-
...
|
|
555
|
+
...Ve,
|
|
556
556
|
role: "button",
|
|
557
557
|
"aria-disabled": o,
|
|
558
|
-
tabIndex: o ? -1 :
|
|
558
|
+
tabIndex: o ? -1 : Ve.tabIndex ?? 0,
|
|
559
559
|
children: [
|
|
560
560
|
j && /* @__PURE__ */ u("span", { className: _("icon"), children: j }),
|
|
561
561
|
/* @__PURE__ */ u("div", { className: _("value-wrapper"), children: pr() }),
|
|
@@ -566,7 +566,7 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
566
566
|
onClick: nr,
|
|
567
567
|
onKeyDown: (e) => {
|
|
568
568
|
const { keyCode: t } = e;
|
|
569
|
-
(t === p.ENTER_KEY_CODE || t === p.SPACE_KEY_CODE) && (e.preventDefault(), e.stopPropagation(),
|
|
569
|
+
(t === p.ENTER_KEY_CODE || t === p.SPACE_KEY_CODE) && (e.preventDefault(), e.stopPropagation(), _e());
|
|
570
570
|
},
|
|
571
571
|
"aria-label": qe,
|
|
572
572
|
children: /* @__PURE__ */ u(Ir, {})
|
|
@@ -578,12 +578,12 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
578
578
|
),
|
|
579
579
|
l && (() => {
|
|
580
580
|
var i;
|
|
581
|
-
const e = (i = P.reference.current) == null ? void 0 : i.getBoundingClientRect().width, t =
|
|
582
|
-
...
|
|
581
|
+
const e = (i = P.reference.current) == null ? void 0 : i.getBoundingClientRect().width, t = y && e ? {
|
|
582
|
+
...Ke,
|
|
583
583
|
width: `${e}px`,
|
|
584
584
|
minWidth: `${e}px`,
|
|
585
585
|
maxWidth: `${e}px`
|
|
586
|
-
} :
|
|
586
|
+
} : Ke, s = /* @__PURE__ */ u(
|
|
587
587
|
"div",
|
|
588
588
|
{
|
|
589
589
|
style: t,
|
|
@@ -591,22 +591,22 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
591
591
|
"select-list",
|
|
592
592
|
{
|
|
593
593
|
opened: l,
|
|
594
|
-
"limited-width":
|
|
594
|
+
"limited-width": H
|
|
595
595
|
},
|
|
596
|
-
|
|
596
|
+
ie
|
|
597
597
|
),
|
|
598
|
-
...
|
|
598
|
+
...y && { [zr]: "" },
|
|
599
599
|
...lr({
|
|
600
600
|
onKeyDown: fr,
|
|
601
601
|
...D && {
|
|
602
602
|
tabIndex: -1,
|
|
603
603
|
onFocus: (d) => {
|
|
604
604
|
var a;
|
|
605
|
-
d.preventDefault(), (a =
|
|
605
|
+
d.preventDefault(), (a = ue.current) == null || a.focus();
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
608
|
}),
|
|
609
|
-
children: $ ?
|
|
609
|
+
children: $ ? Ye() : /* @__PURE__ */ u(
|
|
610
610
|
Nr,
|
|
611
611
|
{
|
|
612
612
|
autoHeight: !0,
|
|
@@ -616,12 +616,12 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
|
|
|
616
616
|
M.current = d;
|
|
617
617
|
},
|
|
618
618
|
onScrollFrame: rr,
|
|
619
|
-
children:
|
|
619
|
+
children: Ye()
|
|
620
620
|
}
|
|
621
621
|
)
|
|
622
622
|
}
|
|
623
623
|
);
|
|
624
|
-
return
|
|
624
|
+
return y ? yr(s, y) : s;
|
|
625
625
|
})()
|
|
626
626
|
]
|
|
627
627
|
}
|
package/dist/dropdown.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as r } from "./dropdown-
|
|
2
|
-
import { a as E } from "./dropdown-
|
|
1
|
+
import { D as r } from "./dropdown-110ce4a5.js";
|
|
2
|
+
import { a as E } from "./dropdown-110ce4a5.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react-dom";
|
package/dist/index.js
CHANGED
|
@@ -9,9 +9,9 @@ import { BulkPanel as J } from "./bulkPanel.js";
|
|
|
9
9
|
import { B as _ } from "./button-7ab874f3.js";
|
|
10
10
|
import { C as X } from "./checkbox-76aa8f97.js";
|
|
11
11
|
import { Chip as q } from "./chip.js";
|
|
12
|
-
import { D as Q } from "./datePicker-
|
|
12
|
+
import { D as Q } from "./datePicker-ab9411c0.js";
|
|
13
13
|
import "react-datepicker";
|
|
14
|
-
import { D as Z } from "./dropdown-
|
|
14
|
+
import { D as Z } from "./dropdown-110ce4a5.js";
|
|
15
15
|
import { FieldLabel as oo } from "./fieldLabel.js";
|
|
16
16
|
import { F as eo } from "./fieldNumber-b4aa4d7e.js";
|
|
17
17
|
import { F as ao } from "./fieldText-1749da7a.js";
|
package/dist/modal.js
CHANGED
|
@@ -8,7 +8,7 @@ import "react-dnd";
|
|
|
8
8
|
import "react-dnd-html5-backend";
|
|
9
9
|
import { u as J } from "./useWindowResize-a7e1ac92.js";
|
|
10
10
|
import { A as Q } from "./constants-85822a6b.js";
|
|
11
|
-
import { a as V } from "./dropdown-
|
|
11
|
+
import { a as V } from "./dropdown-110ce4a5.js";
|
|
12
12
|
import { K as Z } from "./keyCodes-f63c0e11.js";
|
|
13
13
|
import { B as C } from "./button-7ab874f3.js";
|
|
14
14
|
import { Tooltip as ee } from "./tooltip.js";
|
package/dist/sidePanel.js
CHANGED
|
@@ -5,7 +5,7 @@ import { K as B } from "./keyCodes-f63c0e11.js";
|
|
|
5
5
|
import { u as L } from "./useOnClickOutside-8f7d68a1.js";
|
|
6
6
|
import "react-dnd";
|
|
7
7
|
import "react-dnd-html5-backend";
|
|
8
|
-
import { a as O } from "./dropdown-
|
|
8
|
+
import { a as O } from "./dropdown-110ce4a5.js";
|
|
9
9
|
import { S as T } from "./close-4d480ef7.js";
|
|
10
10
|
import { B as j } from "./baseIconButton-251479f7.js";
|
|
11
11
|
import "react-dom";
|