@reportportal/ui-kit 0.0.1-alpha.221 → 0.0.1-alpha.222
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/autocompletes.js +284 -280
- package/dist/components/autocompletes/common/autocompleteMenu/autocompleteMenu.d.ts +1 -0
- package/dist/components/autocompletes/constants.d.ts +1 -0
- package/dist/constants-85822a6b.js +6 -0
- package/dist/index.js +180 -179
- package/dist/modal.js +49 -48
- package/package.json +1 -1
package/dist/autocompletes.js
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { useState as oe, useRef as
|
|
1
|
+
import { jsx as r, jsxs as D, Fragment as he } from "react/jsx-runtime";
|
|
2
|
+
import { useState as oe, useRef as Me, useEffect as we, useCallback as Y, forwardRef as Te, useLayoutEffect as je, useMemo as He } from "react";
|
|
3
3
|
import { c as Q } from "./bind-06a7ff84.js";
|
|
4
4
|
import { Scrollbars as We } from "rc-scrollbars";
|
|
5
5
|
import { B as Ye } from "./bubblesLoader-f3ffa240.js";
|
|
6
6
|
import { B as Ke } from "./button-7ab874f3.js";
|
|
7
7
|
import { S as Xe } from "./plus-199fb2a8.js";
|
|
8
|
-
import { i as
|
|
8
|
+
import { i as ze } from "./isEmpty-ccacb5ff.js";
|
|
9
9
|
import { createPortal as Ge } from "react-dom";
|
|
10
10
|
import pe from "downshift";
|
|
11
|
-
import { useFloating as Be, autoUpdate as
|
|
11
|
+
import { useFloating as Be, autoUpdate as De, flip as Je, size as Qe } from "@floating-ui/react";
|
|
12
12
|
import { F as Ze } from "./fieldText-1749da7a.js";
|
|
13
|
-
import { S as
|
|
14
|
-
import {
|
|
15
|
-
import { S as
|
|
13
|
+
import { S as Fe } from "./dropdown-0260bb66.js";
|
|
14
|
+
import { E as Oe, A as qe, T as Ue } from "./constants-85822a6b.js";
|
|
15
|
+
import { S as Ve } from "./close-4d480ef7.js";
|
|
16
|
+
import { S as et } from "./clear-53660571.js";
|
|
16
17
|
import "./openEye-950159cb.js";
|
|
17
18
|
import "./baseIconButton-251479f7.js";
|
|
18
19
|
import "./spinLoader-c4a53718.js";
|
|
19
20
|
import "./maxValueDisplay-9be01a75.js";
|
|
20
21
|
import "./fieldLabel.js";
|
|
21
|
-
const
|
|
22
|
+
const tt = "_disabled_1rpph_43", ot = "_input_1rpph_107", st = {
|
|
22
23
|
"selected-item": "_selected-item_1rpph_16",
|
|
23
24
|
"validation-error": "_validation-error_1rpph_35",
|
|
24
25
|
"highlight-un-stored-item": "_highlight-un-stored-item_1rpph_40",
|
|
25
|
-
disabled:
|
|
26
|
+
disabled: tt,
|
|
26
27
|
"mobile-disabled": "_mobile-disabled_1rpph_48",
|
|
27
28
|
"selected-item-text": "_selected-item-text_1rpph_54",
|
|
28
29
|
"single-line": "_single-line_1rpph_58",
|
|
29
30
|
"cross-icon": "_cross-icon_1rpph_64",
|
|
30
|
-
input:
|
|
31
|
-
}, me = Q.bind(
|
|
31
|
+
input: ot
|
|
32
|
+
}, me = Q.bind(st), nt = (t) => t.scrollWidth > t.clientWidth, rt = ({
|
|
32
33
|
item: t,
|
|
33
34
|
onRemoveItem: e,
|
|
34
35
|
disabled: n = !1,
|
|
@@ -37,31 +38,31 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
37
38
|
error: l = !1,
|
|
38
39
|
editItem: h,
|
|
39
40
|
editable: u = !1,
|
|
40
|
-
getAdditionalCreationCondition:
|
|
41
|
-
storedOption:
|
|
41
|
+
getAdditionalCreationCondition: v = () => !0,
|
|
42
|
+
storedOption: g = !0,
|
|
42
43
|
highlightUnStoredItem: p = !1,
|
|
43
|
-
variant:
|
|
44
|
+
variant: z = "light",
|
|
44
45
|
getItemName: k,
|
|
45
46
|
singleLine: m = !1,
|
|
46
|
-
className:
|
|
47
|
-
textClassName:
|
|
47
|
+
className: L,
|
|
48
|
+
textClassName: P
|
|
48
49
|
}) => {
|
|
49
|
-
const [
|
|
50
|
-
!n && u && !
|
|
51
|
-
},
|
|
52
|
-
|
|
50
|
+
const [b, x] = oe(!1), [A, F] = oe(""), [c, i] = oe(!1), a = Me(null), d = () => {
|
|
51
|
+
!n && u && !g && (F((k == null ? void 0 : k(t)) || (s == null ? void 0 : s(t)) || ""), x(!0));
|
|
52
|
+
}, y = (B) => {
|
|
53
|
+
F(B.target.value);
|
|
53
54
|
}, C = (B) => {
|
|
54
|
-
const j =
|
|
55
|
-
B.key === "Enter" && j && (h(t,
|
|
55
|
+
const j = v(A);
|
|
56
|
+
B.key === "Enter" && j && (h(t, A), x(!1), F(""));
|
|
56
57
|
}, _ = () => {
|
|
57
|
-
|
|
58
|
-
},
|
|
58
|
+
x(!1), F("");
|
|
59
|
+
}, N = (B) => {
|
|
59
60
|
B.stopPropagation(), e(t);
|
|
60
|
-
},
|
|
61
|
+
}, R = (s == null ? void 0 : s(t)) || "";
|
|
61
62
|
we(() => {
|
|
62
63
|
if (a.current && m) {
|
|
63
64
|
const B = () => {
|
|
64
|
-
a.current && i(
|
|
65
|
+
a.current && i(nt(a.current));
|
|
65
66
|
};
|
|
66
67
|
if (B(), typeof ResizeObserver < "u") {
|
|
67
68
|
const j = new ResizeObserver(B);
|
|
@@ -69,42 +70,42 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
69
70
|
}
|
|
70
71
|
} else
|
|
71
72
|
i(!1);
|
|
72
|
-
}, [
|
|
73
|
+
}, [R, m]);
|
|
73
74
|
const ee = me(
|
|
74
75
|
"selected-item-text",
|
|
75
76
|
{
|
|
76
77
|
"single-line": m
|
|
77
78
|
},
|
|
78
|
-
|
|
79
|
-
),
|
|
79
|
+
P
|
|
80
|
+
), $ = me(
|
|
80
81
|
"selected-item",
|
|
81
|
-
|
|
82
|
+
z,
|
|
82
83
|
{
|
|
83
84
|
[`validation-${l}`]: l,
|
|
84
85
|
disabled: n,
|
|
85
86
|
"mobile-disabled": o,
|
|
86
|
-
"highlight-un-stored-item": p && !
|
|
87
|
+
"highlight-un-stored-item": p && !g
|
|
87
88
|
},
|
|
88
|
-
|
|
89
|
+
L
|
|
89
90
|
);
|
|
90
|
-
return
|
|
91
|
+
return b ? /* @__PURE__ */ r(
|
|
91
92
|
"input",
|
|
92
93
|
{
|
|
93
94
|
autoFocus: !0,
|
|
94
|
-
value:
|
|
95
|
-
onChange:
|
|
95
|
+
value: A,
|
|
96
|
+
onChange: y,
|
|
96
97
|
onKeyDown: C,
|
|
97
98
|
onBlur: _,
|
|
98
99
|
className: me("input")
|
|
99
100
|
}
|
|
100
|
-
) : /* @__PURE__ */
|
|
101
|
+
) : /* @__PURE__ */ D("div", { className: $, onClick: d, children: [
|
|
101
102
|
/* @__PURE__ */ r(
|
|
102
103
|
"span",
|
|
103
104
|
{
|
|
104
105
|
ref: a,
|
|
105
106
|
className: ee,
|
|
106
|
-
title: m && c ?
|
|
107
|
-
children:
|
|
107
|
+
title: m && c ? R : void 0,
|
|
108
|
+
children: R
|
|
108
109
|
}
|
|
109
110
|
),
|
|
110
111
|
!n && /* @__PURE__ */ r(
|
|
@@ -116,12 +117,12 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
116
117
|
"mobile-disabled": o,
|
|
117
118
|
disabled: n
|
|
118
119
|
}),
|
|
119
|
-
onClick:
|
|
120
|
-
children: /* @__PURE__ */ r(
|
|
120
|
+
onClick: N,
|
|
121
|
+
children: /* @__PURE__ */ r(Ve, {})
|
|
121
122
|
}
|
|
122
123
|
)
|
|
123
124
|
] });
|
|
124
|
-
},
|
|
125
|
+
}, lt = ({
|
|
125
126
|
items: t = [],
|
|
126
127
|
parseValueToString: e,
|
|
127
128
|
getItemValidationErrorType: n,
|
|
@@ -130,10 +131,10 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
130
131
|
renderCustomSelectedItem: l,
|
|
131
132
|
selectedItemSingleLine: h,
|
|
132
133
|
selectedItemClassName: u,
|
|
133
|
-
selectedItemTextClassName:
|
|
134
|
-
...
|
|
134
|
+
selectedItemTextClassName: v,
|
|
135
|
+
...g
|
|
135
136
|
}) => t.map((p) => l ? l(p) : /* @__PURE__ */ r(
|
|
136
|
-
|
|
137
|
+
rt,
|
|
137
138
|
{
|
|
138
139
|
parseValueToString: e,
|
|
139
140
|
error: (n == null ? void 0 : n(p)) || "",
|
|
@@ -142,24 +143,24 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
142
143
|
highlightUnStoredItem: s,
|
|
143
144
|
singleLine: h,
|
|
144
145
|
className: u,
|
|
145
|
-
textClassName:
|
|
146
|
-
...
|
|
146
|
+
textClassName: v,
|
|
147
|
+
...g
|
|
147
148
|
},
|
|
148
149
|
e == null ? void 0 : e(p)
|
|
149
|
-
)),
|
|
150
|
-
prompt:
|
|
151
|
-
},
|
|
152
|
-
item:
|
|
153
|
-
divider:
|
|
150
|
+
)), ct = "_prompt_1xfmd_16", it = {
|
|
151
|
+
prompt: ct
|
|
152
|
+
}, at = Q.bind(it), dt = ({ children: t = null }) => /* @__PURE__ */ r("div", { className: at("prompt"), children: t }), ut = "_item_zw4ux_16", mt = "_divider_zw4ux_24", ft = "_active_zw4ux_49", pt = "_value_zw4ux_55", _t = "_tag_zw4ux_69", ht = "_disabled_zw4ux_80", wt = {
|
|
153
|
+
item: ut,
|
|
154
|
+
divider: mt,
|
|
154
155
|
"new-item": "_new-item_zw4ux_31",
|
|
155
|
-
active:
|
|
156
|
-
value:
|
|
156
|
+
active: ft,
|
|
157
|
+
value: pt,
|
|
157
158
|
"key-variant": "_key-variant_zw4ux_66",
|
|
158
|
-
tag:
|
|
159
|
+
tag: _t,
|
|
159
160
|
"button-active": "_button-active_zw4ux_80",
|
|
160
|
-
disabled:
|
|
161
|
+
disabled: ht,
|
|
161
162
|
"value-variant": "_value-variant_zw4ux_100"
|
|
162
|
-
}, V = Q.bind(
|
|
163
|
+
}, V = Q.bind(wt), Re = ({
|
|
163
164
|
isActive: t = !1,
|
|
164
165
|
isSelected: e = !1,
|
|
165
166
|
isNew: n = !1,
|
|
@@ -169,10 +170,10 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
169
170
|
newItemButtonText: h = "",
|
|
170
171
|
...u
|
|
171
172
|
}) => {
|
|
172
|
-
const
|
|
173
|
-
return n ? /* @__PURE__ */
|
|
173
|
+
const v = () => h || (l === "key-variant" ? "New key" : "New value");
|
|
174
|
+
return n ? /* @__PURE__ */ D(he, { children: [
|
|
174
175
|
/* @__PURE__ */ r("div", { className: V("divider") }),
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ D(
|
|
176
177
|
"li",
|
|
177
178
|
{
|
|
178
179
|
className: V("new-item", l, {
|
|
@@ -190,7 +191,7 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
190
191
|
className: V({ "button-active": t }),
|
|
191
192
|
icon: /* @__PURE__ */ r(Xe, {}),
|
|
192
193
|
variant: "text",
|
|
193
|
-
children:
|
|
194
|
+
children: v()
|
|
194
195
|
}
|
|
195
196
|
)
|
|
196
197
|
]
|
|
@@ -208,11 +209,11 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
208
209
|
children: /* @__PURE__ */ r("span", { className: V("label", "tag"), children: o })
|
|
209
210
|
}
|
|
210
211
|
);
|
|
211
|
-
},
|
|
212
|
-
container:
|
|
212
|
+
}, vt = "_container_12uzd_16", bt = {
|
|
213
|
+
container: vt,
|
|
213
214
|
"empty-list-message": "_empty-list-message_12uzd_20",
|
|
214
215
|
"limitation-item": "_limitation-item_12uzd_28"
|
|
215
|
-
}, fe = Q.bind(
|
|
216
|
+
}, fe = Q.bind(bt), yt = (t) => {
|
|
216
217
|
const {
|
|
217
218
|
options: e,
|
|
218
219
|
async: n,
|
|
@@ -221,72 +222,72 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
221
222
|
createWithoutConfirmation: l,
|
|
222
223
|
customEmptyListMessage: h,
|
|
223
224
|
customNoMatchesMessage: u,
|
|
224
|
-
optionVariant:
|
|
225
|
-
newItemButtonText:
|
|
225
|
+
optionVariant: v,
|
|
226
|
+
newItemButtonText: g,
|
|
226
227
|
renderOption: p,
|
|
227
|
-
getUniqKey:
|
|
228
|
+
getUniqKey: z,
|
|
228
229
|
getItemProps: k,
|
|
229
230
|
parseValueToString: m,
|
|
230
|
-
limitationText:
|
|
231
|
-
optionsLimit:
|
|
232
|
-
shouldShowEmptyListMessage:
|
|
233
|
-
} = t,
|
|
234
|
-
(_,
|
|
235
|
-
|
|
231
|
+
limitationText: L = "Too many results. Type to search",
|
|
232
|
+
optionsLimit: P = 0,
|
|
233
|
+
shouldShowEmptyListMessage: b = !0
|
|
234
|
+
} = t, x = Y(() => (e || []).filter((_) => m(_).toUpperCase().indexOf((o.toUpperCase() || "").trim()) > -1), [o, e, m]), A = Y(
|
|
235
|
+
(_, N, R = !1) => p ? p(_, N, R, k) : /* @__PURE__ */ r(
|
|
236
|
+
Re,
|
|
236
237
|
{
|
|
237
|
-
optionVariant:
|
|
238
|
-
...k({ item: _, index:
|
|
239
|
-
isNew:
|
|
240
|
-
newItemButtonText:
|
|
238
|
+
optionVariant: v,
|
|
239
|
+
...k({ item: _, index: N }),
|
|
240
|
+
isNew: R,
|
|
241
|
+
newItemButtonText: g,
|
|
241
242
|
children: m(_)
|
|
242
243
|
},
|
|
243
|
-
(
|
|
244
|
+
(z == null ? void 0 : z(_)) || m(_)
|
|
244
245
|
),
|
|
245
|
-
[k,
|
|
246
|
-
),
|
|
247
|
-
(_) => _.length ? _.map((
|
|
248
|
-
[
|
|
246
|
+
[k, z, g, v, m, p]
|
|
247
|
+
), F = Y(
|
|
248
|
+
(_) => _.length ? _.map((N, R) => A(N, R)) : "",
|
|
249
|
+
[A]
|
|
249
250
|
), c = Y(
|
|
250
251
|
(_) => {
|
|
251
|
-
const
|
|
252
|
-
return /* @__PURE__ */ r("div", { className: fe({ container: !
|
|
253
|
-
|
|
252
|
+
const N = _.length;
|
|
253
|
+
return /* @__PURE__ */ r("div", { className: fe({ container: !N }), children: /* @__PURE__ */ r(
|
|
254
|
+
Re,
|
|
254
255
|
{
|
|
255
|
-
optionVariant:
|
|
256
|
+
optionVariant: v,
|
|
256
257
|
isNew: !0,
|
|
257
|
-
newItemButtonText:
|
|
258
|
-
...k({ item: o, index:
|
|
258
|
+
newItemButtonText: g,
|
|
259
|
+
...k({ item: o, index: N }),
|
|
259
260
|
children: m(o)
|
|
260
261
|
},
|
|
261
262
|
m(o)
|
|
262
263
|
) });
|
|
263
264
|
},
|
|
264
|
-
[k, o,
|
|
265
|
+
[k, o, g, v, m]
|
|
265
266
|
), i = Y(
|
|
266
|
-
(_) => s ? /* @__PURE__ */
|
|
267
|
-
/* @__PURE__ */ r(
|
|
267
|
+
(_) => s ? /* @__PURE__ */ D(he, { children: [
|
|
268
|
+
/* @__PURE__ */ r(dt, { children: /* @__PURE__ */ r(Ye, {}) }),
|
|
268
269
|
!l && c(_)
|
|
269
270
|
] }) : "",
|
|
270
271
|
[l, s, c]
|
|
271
272
|
), a = Y(() => {
|
|
272
273
|
const _ = (e == null ? void 0 : e.length) === 0 ? h || "No available options" : u || "No matches found";
|
|
273
274
|
return /* @__PURE__ */ r("div", { className: fe("empty-list-message"), children: _ });
|
|
274
|
-
}, [h, u, e == null ? void 0 : e.length]), d = n ? e :
|
|
275
|
-
if (
|
|
276
|
-
return
|
|
277
|
-
const C =
|
|
278
|
-
return C && !
|
|
279
|
-
/* @__PURE__ */
|
|
280
|
-
C ?
|
|
281
|
-
(d == null ? void 0 : d.length) >
|
|
275
|
+
}, [h, u, e == null ? void 0 : e.length]), d = n ? e : x(), y = i(e);
|
|
276
|
+
if (y)
|
|
277
|
+
return y;
|
|
278
|
+
const C = ze(d);
|
|
279
|
+
return C && !b && l ? null : /* @__PURE__ */ D("div", { className: fe({ container: e.length }), children: [
|
|
280
|
+
/* @__PURE__ */ D(We, { autoHeight: !0, autoHeightMax: 216, hideTracksWhenNotNeeded: !0, children: [
|
|
281
|
+
C ? b && a() : F(d),
|
|
282
|
+
(d == null ? void 0 : d.length) > P && P > 0 && L ? /* @__PURE__ */ r("li", { className: fe("limitation-item"), "aria-hidden": "true", children: L }) : null
|
|
282
283
|
] }),
|
|
283
284
|
!l && c(d)
|
|
284
285
|
] });
|
|
285
|
-
},
|
|
286
|
-
menu:
|
|
287
|
-
opened:
|
|
288
|
-
dark:
|
|
289
|
-
},
|
|
286
|
+
}, gt = "_menu_f64z5_16", xt = "_opened_f64z5_34", Nt = "_dark_f64z5_37", Et = {
|
|
287
|
+
menu: gt,
|
|
288
|
+
opened: xt,
|
|
289
|
+
dark: Nt
|
|
290
|
+
}, St = Q.bind(Et), It = (t, e) => !t || t <= e.trim().length, $e = Te(
|
|
290
291
|
({
|
|
291
292
|
isOpen: t = !1,
|
|
292
293
|
style: e = {},
|
|
@@ -294,27 +295,29 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
294
295
|
isDropdownMode: o,
|
|
295
296
|
inputValue: s = "",
|
|
296
297
|
className: l = "",
|
|
297
|
-
|
|
298
|
-
|
|
298
|
+
portalMenuAttribute: h = null,
|
|
299
|
+
...u
|
|
300
|
+
}, v) => /* @__PURE__ */ r(
|
|
299
301
|
"ul",
|
|
300
302
|
{
|
|
301
|
-
ref:
|
|
302
|
-
className:
|
|
303
|
+
ref: v,
|
|
304
|
+
className: St(
|
|
303
305
|
"menu",
|
|
304
|
-
{ opened: t && (o ||
|
|
306
|
+
{ opened: t && (o || It(n, s)) },
|
|
305
307
|
l
|
|
306
308
|
),
|
|
307
309
|
style: e,
|
|
308
|
-
|
|
310
|
+
...h ? { [h]: "" } : {},
|
|
311
|
+
children: /* @__PURE__ */ r(yt, { inputValue: s, ...u })
|
|
309
312
|
}
|
|
310
313
|
)
|
|
311
|
-
),
|
|
314
|
+
), Le = (t, e) => typeof t == "string" ? t : e ? String(t[e(t)]) : "", _e = (t, e) => {
|
|
312
315
|
var o;
|
|
313
316
|
return t === e ? !0 : !!(t && e && typeof t == "object" && typeof e == "object" && Object.keys(t).length === Object.keys(e).length && ((o = Object.entries(t)) != null && o.every(([s, l]) => _e(l, e[s]))));
|
|
314
|
-
},
|
|
317
|
+
}, kt = (t, e, n) => typeof t == "string" ? t === e : n ? (() => {
|
|
315
318
|
const o = n(t);
|
|
316
319
|
return t[o] === e[o];
|
|
317
|
-
})() : !1,
|
|
320
|
+
})() : !1, Ct = ({
|
|
318
321
|
options: t = [],
|
|
319
322
|
onChange: e,
|
|
320
323
|
selectedItems: n = [],
|
|
@@ -323,49 +326,49 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
323
326
|
children: l,
|
|
324
327
|
customizeNewSelectedValue: h = (p) => p,
|
|
325
328
|
getOptionUniqKey: u,
|
|
326
|
-
getOptionUniqKeyValue:
|
|
327
|
-
...
|
|
329
|
+
getOptionUniqKeyValue: v,
|
|
330
|
+
...g
|
|
328
331
|
}) => {
|
|
329
|
-
const [p,
|
|
332
|
+
const [p, z] = oe(s), k = (c, i) => {
|
|
330
333
|
const a = {
|
|
331
334
|
...p
|
|
332
335
|
};
|
|
333
336
|
c.forEach((d) => {
|
|
334
|
-
if (t.find((
|
|
335
|
-
const
|
|
336
|
-
a[
|
|
337
|
+
if (t.find((y) => kt(y, d, u))) {
|
|
338
|
+
const y = Le(d, u);
|
|
339
|
+
a[y] = !0;
|
|
337
340
|
}
|
|
338
|
-
}),
|
|
341
|
+
}), z(a), i(a);
|
|
339
342
|
}, m = (c, i) => {
|
|
340
|
-
const a =
|
|
343
|
+
const a = Le(c, u);
|
|
341
344
|
if (a in p) {
|
|
342
345
|
const d = { ...p };
|
|
343
|
-
delete d[a],
|
|
346
|
+
delete d[a], z(d), i(d);
|
|
344
347
|
} else
|
|
345
348
|
i(p);
|
|
346
|
-
},
|
|
347
|
-
const a = h(c), d = Array.isArray(a) ? a : [a], C = [...n.filter((
|
|
348
|
-
e == null || e(C, i), k(d, (
|
|
349
|
-
},
|
|
349
|
+
}, L = (c, i) => {
|
|
350
|
+
const a = h(c), d = Array.isArray(a) ? a : [a], C = [...n.filter((N) => d.indexOf(N) < 0), ...d];
|
|
351
|
+
e == null || e(C, i), k(d, (N) => o == null ? void 0 : o(C, N));
|
|
352
|
+
}, P = (c, i) => {
|
|
350
353
|
const a = n.indexOf(c), d = [...n];
|
|
351
354
|
d.splice(a, 1, i), e == null || e(d, null);
|
|
352
|
-
},
|
|
353
|
-
const a = n.filter((
|
|
354
|
-
e == null || e(a, i), m(c, (
|
|
355
|
-
},
|
|
356
|
-
c &&
|
|
357
|
-
},
|
|
358
|
-
removeItem:
|
|
359
|
-
editItem:
|
|
355
|
+
}, b = (c, i) => {
|
|
356
|
+
const a = n.filter((y) => !_e(y, c));
|
|
357
|
+
e == null || e(a, i), m(c, (y) => o == null ? void 0 : o(a, y));
|
|
358
|
+
}, x = (c, i) => {
|
|
359
|
+
c && L(c, i);
|
|
360
|
+
}, A = (c) => ({
|
|
361
|
+
removeItem: b,
|
|
362
|
+
editItem: P,
|
|
360
363
|
handleChange: e,
|
|
361
|
-
getOptionUniqKeyValue:
|
|
364
|
+
getOptionUniqKeyValue: v,
|
|
362
365
|
storedItemsMap: p,
|
|
363
366
|
...c
|
|
364
367
|
});
|
|
365
368
|
return /* @__PURE__ */ r(
|
|
366
369
|
pe,
|
|
367
370
|
{
|
|
368
|
-
...
|
|
371
|
+
...g,
|
|
369
372
|
stateReducer: (c, i) => {
|
|
370
373
|
switch (i.type) {
|
|
371
374
|
case pe.stateChangeTypes.keyDownEnter:
|
|
@@ -379,28 +382,28 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
379
382
|
return i;
|
|
380
383
|
}
|
|
381
384
|
},
|
|
382
|
-
onChange:
|
|
385
|
+
onChange: x,
|
|
383
386
|
selectedItem: null,
|
|
384
|
-
children: (c) => l == null ? void 0 : l(
|
|
387
|
+
children: (c) => l == null ? void 0 : l(A(c))
|
|
385
388
|
}
|
|
386
389
|
);
|
|
387
|
-
},
|
|
388
|
-
autocomplete:
|
|
390
|
+
}, Mt = "_autocomplete_1so4a_16", zt = "_disabled_1so4a_32", At = "_error_1so4a_35", Rt = "_touched_1so4a_35", Lt = "_input_1so4a_77", Pt = {
|
|
391
|
+
autocomplete: Mt,
|
|
389
392
|
"autocomplete-wrapper": "_autocomplete-wrapper_1so4a_28",
|
|
390
393
|
disabled: zt,
|
|
391
|
-
error:
|
|
394
|
+
error: At,
|
|
392
395
|
touched: Rt,
|
|
393
396
|
"clear-icon": "_clear-icon_1so4a_46",
|
|
394
397
|
"clear-icon--disabled": "_clear-icon--disabled_1so4a_56",
|
|
395
398
|
"autocomplete-input": "_autocomplete-input_1so4a_60",
|
|
396
399
|
"single-line-mode": "_single-line-mode_1so4a_68",
|
|
397
400
|
"mobile-disabled": "_mobile-disabled_1so4a_72",
|
|
398
|
-
input:
|
|
401
|
+
input: Lt,
|
|
399
402
|
"type-number": "_type-number_1so4a_101",
|
|
400
403
|
"error-text": "_error-text_1so4a_112",
|
|
401
404
|
"dropdown-button": "_dropdown-button_1so4a_121",
|
|
402
405
|
"icon-reversed": "_icon-reversed_1so4a_129"
|
|
403
|
-
}, J = Q.bind(
|
|
406
|
+
}, J = Q.bind(Pt), ao = (t) => {
|
|
404
407
|
const {
|
|
405
408
|
options: e = [],
|
|
406
409
|
loading: n = !1,
|
|
@@ -410,33 +413,33 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
410
413
|
placeholder: l = "",
|
|
411
414
|
error: h = "",
|
|
412
415
|
touched: u = !1,
|
|
413
|
-
creatable:
|
|
414
|
-
editable:
|
|
416
|
+
creatable: v = !1,
|
|
417
|
+
editable: g = !1,
|
|
415
418
|
onChange: p = () => {
|
|
416
419
|
},
|
|
417
|
-
onFocus:
|
|
420
|
+
onFocus: z = () => {
|
|
418
421
|
},
|
|
419
422
|
onBlur: k = () => {
|
|
420
423
|
},
|
|
421
424
|
disabled: m = !1,
|
|
422
|
-
isDropdownMode:
|
|
423
|
-
mobileDisabled:
|
|
424
|
-
inputProps:
|
|
425
|
-
parseValueToString:
|
|
426
|
-
maxLength:
|
|
427
|
-
async:
|
|
425
|
+
isDropdownMode: L = !1,
|
|
426
|
+
mobileDisabled: P = !1,
|
|
427
|
+
inputProps: b = {},
|
|
428
|
+
parseValueToString: x = (f) => f == null ? "" : String(f),
|
|
429
|
+
maxLength: A = null,
|
|
430
|
+
async: F = !1,
|
|
428
431
|
customClass: c = "",
|
|
429
432
|
createWithoutConfirmation: i = !1,
|
|
430
433
|
getItemValidationErrorType: a = null,
|
|
431
434
|
clearItemsError: d = () => {
|
|
432
435
|
},
|
|
433
|
-
getAdditionalCreationCondition:
|
|
436
|
+
getAdditionalCreationCondition: y = () => !0,
|
|
434
437
|
highlightUnStoredItem: C = !1,
|
|
435
438
|
parseInputValueFn: _ = null,
|
|
436
|
-
handleUnStoredItemCb:
|
|
437
|
-
dataAutomationId:
|
|
439
|
+
handleUnStoredItemCb: N = null,
|
|
440
|
+
dataAutomationId: R = "",
|
|
438
441
|
existingItemsMap: ee = {},
|
|
439
|
-
customizeNewSelectedValue:
|
|
442
|
+
customizeNewSelectedValue: $ = (f) => f,
|
|
440
443
|
renderCustomSelectedItem: B,
|
|
441
444
|
useFixedPositioning: j,
|
|
442
445
|
newItemButtonText: ve = "",
|
|
@@ -448,52 +451,52 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
448
451
|
} = t, { refs: le, floatingStyles: Z } = Be({
|
|
449
452
|
placement: "bottom-start",
|
|
450
453
|
strategy: j ? "fixed" : "absolute",
|
|
451
|
-
whileElementsMounted:
|
|
452
|
-
}), ye = s.length === 0 && !m ? l : "", te =
|
|
454
|
+
whileElementsMounted: De
|
|
455
|
+
}), ye = s.length === 0 && !m ? l : "", te = Me(null);
|
|
453
456
|
we(() => {
|
|
454
457
|
d();
|
|
455
458
|
}, [d, s]);
|
|
456
|
-
const ge = (f,
|
|
457
|
-
p(f,
|
|
458
|
-
}, xe = (f,
|
|
459
|
+
const ge = (f, E) => {
|
|
460
|
+
p(f, E);
|
|
461
|
+
}, xe = (f, E, I) => ({ item: S, index: G, ...H }) => f({
|
|
459
462
|
item: S,
|
|
460
463
|
index: G,
|
|
461
464
|
isSelected: I.some((W) => _e(W, S)),
|
|
462
465
|
...H,
|
|
463
|
-
isActive:
|
|
466
|
+
isActive: E === G
|
|
464
467
|
}), w = ({
|
|
465
468
|
event: f,
|
|
466
|
-
removeItem:
|
|
469
|
+
removeItem: E,
|
|
467
470
|
inputValue: I
|
|
468
471
|
}) => {
|
|
469
|
-
f.key === "Backspace" && !I && s.length &&
|
|
470
|
-
},
|
|
472
|
+
f.key === "Backspace" && !I && s.length && E(s[s.length - 1], null);
|
|
473
|
+
}, T = ({
|
|
471
474
|
inputValue: f,
|
|
472
|
-
selectItem:
|
|
475
|
+
selectItem: E,
|
|
473
476
|
clearSelection: I
|
|
474
477
|
}) => {
|
|
475
478
|
if (_) {
|
|
476
479
|
const S = _(f);
|
|
477
|
-
(S.length ? S : [f]).forEach((H) =>
|
|
480
|
+
(S.length ? S : [f]).forEach((H) => E(H)), I();
|
|
478
481
|
} else
|
|
479
|
-
|
|
480
|
-
}, q = (f) => (
|
|
481
|
-
f(
|
|
482
|
-
}, X = e.filter((f) => s.every((
|
|
482
|
+
E(f), I();
|
|
483
|
+
}, q = (f) => (E) => {
|
|
484
|
+
f(E, null), te.current && te.current.focus();
|
|
485
|
+
}, X = e.filter((f) => s.every((E) => !_e(E, f)));
|
|
483
486
|
return /* @__PURE__ */ r(
|
|
484
|
-
|
|
487
|
+
Ct,
|
|
485
488
|
{
|
|
486
489
|
onChange: ge,
|
|
487
|
-
itemToString:
|
|
490
|
+
itemToString: x,
|
|
488
491
|
selectedItems: s,
|
|
489
492
|
onStateChange: o,
|
|
490
493
|
options: e,
|
|
491
494
|
existingItemsMap: ee,
|
|
492
|
-
handleUnStoredItemCb:
|
|
493
|
-
customizeNewSelectedValue:
|
|
495
|
+
handleUnStoredItemCb: N,
|
|
496
|
+
customizeNewSelectedValue: $,
|
|
494
497
|
children: ({
|
|
495
498
|
getInputProps: f,
|
|
496
|
-
getItemProps:
|
|
499
|
+
getItemProps: E,
|
|
497
500
|
isOpen: I,
|
|
498
501
|
inputValue: S = "",
|
|
499
502
|
highlightedIndex: G,
|
|
@@ -504,45 +507,45 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
504
507
|
clearSelection: ae,
|
|
505
508
|
toggleMenu: U,
|
|
506
509
|
storedItemsMap: Ne,
|
|
507
|
-
getRootProps:
|
|
510
|
+
getRootProps: Ee
|
|
508
511
|
}) => {
|
|
509
|
-
const
|
|
510
|
-
...
|
|
511
|
-
ref: (
|
|
512
|
+
const Se = Ee(void 0, { suppressRefError: !0 }), de = {
|
|
513
|
+
...Se,
|
|
514
|
+
ref: (M) => (le.setReference(M), Se.ref(M))
|
|
512
515
|
}, Ie = S ?? "";
|
|
513
|
-
return /* @__PURE__ */
|
|
514
|
-
/* @__PURE__ */
|
|
515
|
-
/* @__PURE__ */
|
|
516
|
+
return /* @__PURE__ */ D("div", { ...de, className: J("autocomplete-wrapper"), children: [
|
|
517
|
+
/* @__PURE__ */ D(he, { children: [
|
|
518
|
+
/* @__PURE__ */ D(
|
|
516
519
|
"div",
|
|
517
520
|
{
|
|
518
521
|
className: J("autocomplete", c, {
|
|
519
|
-
"mobile-disabled":
|
|
522
|
+
"mobile-disabled": P,
|
|
520
523
|
error: h,
|
|
521
524
|
touched: u,
|
|
522
525
|
disabled: m
|
|
523
526
|
}),
|
|
524
527
|
children: [
|
|
525
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ D(
|
|
526
529
|
"div",
|
|
527
530
|
{
|
|
528
531
|
className: J("autocomplete-input", {
|
|
529
|
-
"mobile-disabled":
|
|
532
|
+
"mobile-disabled": P,
|
|
530
533
|
"single-line-mode": se
|
|
531
534
|
}),
|
|
532
535
|
children: [
|
|
533
536
|
/* @__PURE__ */ r(
|
|
534
|
-
|
|
537
|
+
lt,
|
|
535
538
|
{
|
|
536
539
|
items: s,
|
|
537
540
|
onRemoveItem: q(H),
|
|
538
541
|
disabled: m,
|
|
539
|
-
mobileDisabled:
|
|
540
|
-
parseValueToString:
|
|
542
|
+
mobileDisabled: P,
|
|
543
|
+
parseValueToString: x,
|
|
541
544
|
getItemValidationErrorType: a,
|
|
542
545
|
renderCustomSelectedItem: B,
|
|
543
546
|
editItem: W,
|
|
544
|
-
editable:
|
|
545
|
-
getAdditionalCreationCondition:
|
|
547
|
+
editable: g,
|
|
548
|
+
getAdditionalCreationCondition: y,
|
|
546
549
|
storedItemsMap: Ne,
|
|
547
550
|
highlightUnStoredItem: C,
|
|
548
551
|
selectedItemSingleLine: se,
|
|
@@ -556,48 +559,48 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
556
559
|
...f({
|
|
557
560
|
ref: te,
|
|
558
561
|
placeholder: ye,
|
|
559
|
-
maxLength:
|
|
562
|
+
maxLength: A,
|
|
560
563
|
onFocus: () => {
|
|
561
|
-
|
|
564
|
+
L && ce(), z();
|
|
562
565
|
},
|
|
563
|
-
onKeyDown: (
|
|
564
|
-
|
|
566
|
+
onKeyDown: (M) => {
|
|
567
|
+
M.key === Oe && S && v && y(S) && T({
|
|
565
568
|
inputValue: S,
|
|
566
569
|
selectItem: ie,
|
|
567
570
|
clearSelection: ae
|
|
568
|
-
}), w({ event:
|
|
571
|
+
}), w({ event: M, removeItem: H, inputValue: S });
|
|
569
572
|
},
|
|
570
573
|
onBlur: () => {
|
|
571
|
-
k(), S &&
|
|
574
|
+
k(), S && v && y(S) && T({
|
|
572
575
|
inputValue: S,
|
|
573
576
|
selectItem: ie,
|
|
574
577
|
clearSelection: ae
|
|
575
578
|
});
|
|
576
579
|
},
|
|
577
580
|
disabled: m,
|
|
578
|
-
...
|
|
581
|
+
...b
|
|
579
582
|
}),
|
|
580
|
-
className: J("input", { disabled: m },
|
|
581
|
-
"data-automation-id":
|
|
583
|
+
className: J("input", { disabled: m }, b.className),
|
|
584
|
+
"data-automation-id": R
|
|
582
585
|
}
|
|
583
586
|
)
|
|
584
587
|
]
|
|
585
588
|
}
|
|
586
589
|
),
|
|
587
|
-
(
|
|
590
|
+
(b == null ? void 0 : b.clearable) && !ze(s) && /* @__PURE__ */ r(
|
|
588
591
|
"button",
|
|
589
592
|
{
|
|
590
593
|
type: "button",
|
|
591
594
|
className: J("clear-icon", { "clear-icon--disabled": m }),
|
|
592
595
|
onClick: () => {
|
|
593
|
-
var
|
|
594
|
-
return !m && ((
|
|
596
|
+
var M;
|
|
597
|
+
return !m && ((M = b == null ? void 0 : b.onClear) == null ? void 0 : M.call(b));
|
|
595
598
|
},
|
|
596
|
-
onMouseDown: (
|
|
597
|
-
children: /* @__PURE__ */ r(
|
|
599
|
+
onMouseDown: (M) => M.preventDefault(),
|
|
600
|
+
children: /* @__PURE__ */ r(et, {})
|
|
598
601
|
}
|
|
599
602
|
),
|
|
600
|
-
|
|
603
|
+
L && /* @__PURE__ */ r(
|
|
601
604
|
"button",
|
|
602
605
|
{
|
|
603
606
|
type: "button",
|
|
@@ -605,7 +608,7 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
605
608
|
onClick: () => U(),
|
|
606
609
|
"aria-label": "Toggle dropdown",
|
|
607
610
|
"aria-expanded": I,
|
|
608
|
-
children: /* @__PURE__ */ r(
|
|
611
|
+
children: /* @__PURE__ */ r(Fe, {})
|
|
609
612
|
}
|
|
610
613
|
)
|
|
611
614
|
]
|
|
@@ -618,14 +621,14 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
618
621
|
{
|
|
619
622
|
isOpen: I,
|
|
620
623
|
loading: n,
|
|
621
|
-
async:
|
|
624
|
+
async: F,
|
|
622
625
|
ref: le.setFloating,
|
|
623
626
|
newItemButtonText: ve,
|
|
624
|
-
isDropdownMode:
|
|
627
|
+
isDropdownMode: L,
|
|
625
628
|
style: Z,
|
|
626
629
|
inputValue: Ie.trim(),
|
|
627
|
-
getItemProps: xe(
|
|
628
|
-
parseValueToString:
|
|
630
|
+
getItemProps: xe(E, G, s),
|
|
631
|
+
parseValueToString: x,
|
|
629
632
|
createWithoutConfirmation: i,
|
|
630
633
|
options: X,
|
|
631
634
|
className: K,
|
|
@@ -636,7 +639,7 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
636
639
|
}
|
|
637
640
|
}
|
|
638
641
|
);
|
|
639
|
-
},
|
|
642
|
+
}, Bt = ({ skip: t }) => {
|
|
640
643
|
je(() => {
|
|
641
644
|
if (t)
|
|
642
645
|
return;
|
|
@@ -658,7 +661,7 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
658
661
|
clearTimeout(h), window.removeEventListener("scroll", l, { capture: !0 });
|
|
659
662
|
};
|
|
660
663
|
}, [t]);
|
|
661
|
-
},
|
|
664
|
+
}, Dt = ({ skip: t, reference: e }) => {
|
|
662
665
|
we(() => {
|
|
663
666
|
if (t)
|
|
664
667
|
return;
|
|
@@ -670,7 +673,7 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
670
673
|
window.removeEventListener("resize", n);
|
|
671
674
|
};
|
|
672
675
|
}, [t, e]);
|
|
673
|
-
},
|
|
676
|
+
}, Ft = ({ skip: t, onClose: e, menuRef: n }) => {
|
|
674
677
|
we(() => {
|
|
675
678
|
if (t)
|
|
676
679
|
return;
|
|
@@ -682,21 +685,21 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
682
685
|
window.removeEventListener("scroll", o, !0);
|
|
683
686
|
};
|
|
684
687
|
}, [t, e, n]);
|
|
685
|
-
},
|
|
688
|
+
}, Ot = {
|
|
686
689
|
"input-wrapper": "_input-wrapper_d9vma_1",
|
|
687
690
|
"dropdown-button": "_dropdown-button_d9vma_6",
|
|
688
691
|
"icon-reversed": "_icon-reversed_d9vma_14"
|
|
689
|
-
},
|
|
692
|
+
}, Pe = Q.bind(Ot), $t = 0, Tt = Je({
|
|
690
693
|
fallbackPlacements: ["bottom-start", "top-start", "bottom", "top"],
|
|
691
694
|
boundary: document == null ? void 0 : document.documentElement,
|
|
692
695
|
rootBoundary: "viewport"
|
|
693
|
-
}),
|
|
696
|
+
}), jt = Qe({
|
|
694
697
|
apply({ rects: t, elements: e }) {
|
|
695
698
|
Object.assign(e.floating.style, {
|
|
696
699
|
width: `${t.reference.width}px`
|
|
697
700
|
});
|
|
698
701
|
}
|
|
699
|
-
}),
|
|
702
|
+
}), uo = (t) => {
|
|
700
703
|
const {
|
|
701
704
|
options: e = [],
|
|
702
705
|
value: n,
|
|
@@ -708,62 +711,62 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
708
711
|
onBlur: h = () => {
|
|
709
712
|
},
|
|
710
713
|
disabled: u = !1,
|
|
711
|
-
inputProps:
|
|
712
|
-
parseValueToString:
|
|
714
|
+
inputProps: v = {},
|
|
715
|
+
parseValueToString: g = (w) => w === null ? "" : String(w),
|
|
713
716
|
minLength: p = 1,
|
|
714
|
-
skipOptionCreation:
|
|
717
|
+
skipOptionCreation: z = !1,
|
|
715
718
|
maxLength: k = null,
|
|
716
719
|
optionVariant: m = "",
|
|
717
|
-
isRequired:
|
|
718
|
-
error:
|
|
719
|
-
touched:
|
|
720
|
-
setTouch:
|
|
720
|
+
isRequired: L = !1,
|
|
721
|
+
error: P = "",
|
|
722
|
+
touched: b = !1,
|
|
723
|
+
setTouch: x = () => {
|
|
721
724
|
},
|
|
722
|
-
createWithoutConfirmation:
|
|
723
|
-
menuClassName:
|
|
725
|
+
createWithoutConfirmation: A = !1,
|
|
726
|
+
menuClassName: F = "",
|
|
724
727
|
icon: c,
|
|
725
728
|
isDropdownMode: i = !1,
|
|
726
729
|
isOptionUnique: a,
|
|
727
730
|
refFunction: d,
|
|
728
|
-
stateReducer:
|
|
731
|
+
stateReducer: y,
|
|
729
732
|
onStateChange: C,
|
|
730
733
|
useFixedPositioning: _,
|
|
731
|
-
dropdownMatchInputWidth:
|
|
732
|
-
withMenuFlip:
|
|
734
|
+
dropdownMatchInputWidth: N = !1,
|
|
735
|
+
withMenuFlip: R = !1,
|
|
733
736
|
newItemButtonText: ee = "",
|
|
734
|
-
menuPortalRoot:
|
|
737
|
+
menuPortalRoot: $,
|
|
735
738
|
...B
|
|
736
|
-
} = t, [j, ve] = oe(!1), K =
|
|
739
|
+
} = t, [j, ve] = oe(!1), K = Me(null), se = Y(() => {
|
|
737
740
|
var w;
|
|
738
741
|
return (w = K.current) == null ? void 0 : w.call(K);
|
|
739
|
-
}, []), ne = !j ||
|
|
742
|
+
}, []), ne = !j || !$, re = $ || _ ? "fixed" : "absolute", be = !j || re === "absolute", le = He(
|
|
740
743
|
() => [
|
|
741
|
-
...
|
|
742
|
-
...
|
|
744
|
+
...R ? [Tt] : [],
|
|
745
|
+
...N ? [jt] : []
|
|
743
746
|
],
|
|
744
|
-
[
|
|
747
|
+
[R, N]
|
|
745
748
|
), { refs: Z, floatingStyles: ye } = Be({
|
|
746
749
|
placement: "bottom-start",
|
|
747
|
-
whileElementsMounted:
|
|
750
|
+
whileElementsMounted: De,
|
|
748
751
|
strategy: re,
|
|
749
752
|
middleware: le
|
|
750
753
|
});
|
|
751
|
-
|
|
754
|
+
Bt({ skip: ne }), Dt({ skip: ne, reference: Z.reference }), Ft({
|
|
752
755
|
skip: be,
|
|
753
756
|
onClose: se,
|
|
754
757
|
menuRef: Z.floating
|
|
755
758
|
});
|
|
756
|
-
const te = (w,
|
|
759
|
+
const te = (w, T, q) => ({ item: X, index: f, ...E }) => w({
|
|
757
760
|
item: X,
|
|
758
761
|
index: f,
|
|
759
762
|
isSelected: q !== null && q === X,
|
|
760
|
-
...
|
|
761
|
-
isActive:
|
|
762
|
-
}), ge = (w,
|
|
763
|
-
w.key ===
|
|
763
|
+
...E,
|
|
764
|
+
isActive: T === f
|
|
765
|
+
}), ge = (w, T) => {
|
|
766
|
+
w.key === Ue && (w.preventDefault(), T(e.length));
|
|
764
767
|
}, xe = Y(
|
|
765
|
-
(w, ...
|
|
766
|
-
(w == null ? void 0 : w.isOpen) !== void 0 && ve(w.isOpen), C == null || C(w, ...
|
|
768
|
+
(w, ...T) => {
|
|
769
|
+
(w == null ? void 0 : w.isOpen) !== void 0 && ve(w.isOpen), C == null || C(w, ...T);
|
|
767
770
|
},
|
|
768
771
|
[C]
|
|
769
772
|
);
|
|
@@ -771,18 +774,18 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
771
774
|
pe,
|
|
772
775
|
{
|
|
773
776
|
onChange: s,
|
|
774
|
-
itemToString:
|
|
777
|
+
itemToString: g,
|
|
775
778
|
selectedItem: n,
|
|
776
779
|
onStateChange: xe,
|
|
777
780
|
defaultHighlightedIndex: $t,
|
|
778
|
-
stateReducer:
|
|
781
|
+
stateReducer: y,
|
|
779
782
|
children: ({
|
|
780
783
|
getInputProps: w,
|
|
781
|
-
getItemProps:
|
|
784
|
+
getItemProps: T,
|
|
782
785
|
setHighlightedIndex: q,
|
|
783
786
|
toggleMenu: X,
|
|
784
787
|
openMenu: f,
|
|
785
|
-
closeMenu:
|
|
788
|
+
closeMenu: E,
|
|
786
789
|
isOpen: I,
|
|
787
790
|
inputValue: S,
|
|
788
791
|
highlightedIndex: G,
|
|
@@ -791,32 +794,33 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
791
794
|
}) => {
|
|
792
795
|
const ce = H(void 0, { suppressRefError: !0 }), ie = {
|
|
793
796
|
...ce,
|
|
794
|
-
ref: (
|
|
797
|
+
ref: (O) => (Z.setReference(O), ce.ref(O))
|
|
795
798
|
};
|
|
796
|
-
K.current || (K.current =
|
|
797
|
-
const ae = S ?? "", { onClear: U, clearable: Ne, ...
|
|
798
|
-
W(null), U == null || U(
|
|
799
|
-
},
|
|
799
|
+
K.current || (K.current = E);
|
|
800
|
+
const ae = S ?? "", { onClear: U, clearable: Ne, ...Ee } = v, de = Ne && n !== null, Ie = (...O) => {
|
|
801
|
+
W(null), U == null || U(...O);
|
|
802
|
+
}, M = /* @__PURE__ */ r(
|
|
800
803
|
$e,
|
|
801
804
|
{
|
|
802
805
|
isOpen: I,
|
|
803
806
|
isDropdownMode: i,
|
|
804
807
|
style: ye,
|
|
805
808
|
ref: Z.setFloating,
|
|
809
|
+
portalMenuAttribute: $ ? qe : null,
|
|
806
810
|
minLength: p,
|
|
807
811
|
inputValue: (S || "").trim(),
|
|
808
|
-
getItemProps: te(
|
|
809
|
-
parseValueToString:
|
|
812
|
+
getItemProps: te(T, G, n),
|
|
813
|
+
parseValueToString: g,
|
|
810
814
|
optionVariant: m,
|
|
811
|
-
createWithoutConfirmation:
|
|
812
|
-
className:
|
|
815
|
+
createWithoutConfirmation: A,
|
|
816
|
+
className: F,
|
|
813
817
|
options: e,
|
|
814
818
|
newItemButtonText: ee,
|
|
815
819
|
...B
|
|
816
820
|
}
|
|
817
821
|
);
|
|
818
|
-
return /* @__PURE__ */
|
|
819
|
-
/* @__PURE__ */
|
|
822
|
+
return /* @__PURE__ */ D(he, { children: [
|
|
823
|
+
/* @__PURE__ */ D("div", { className: Pe("input-wrapper"), ...ie, children: [
|
|
820
824
|
/* @__PURE__ */ r(
|
|
821
825
|
Ze,
|
|
822
826
|
{
|
|
@@ -824,44 +828,44 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
824
828
|
placeholder: u ? "" : o,
|
|
825
829
|
maxLength: k || void 0,
|
|
826
830
|
onFocus: () => {
|
|
827
|
-
i && !I && (f(),
|
|
831
|
+
i && !I && (f(), x == null || x(!0)), l();
|
|
828
832
|
},
|
|
829
833
|
ref: d,
|
|
830
|
-
onKeyDown: (
|
|
831
|
-
|
|
834
|
+
onKeyDown: (O) => {
|
|
835
|
+
O.key === Oe && O.preventDefault(), S && I && ge(O, q);
|
|
832
836
|
},
|
|
833
|
-
onBlur: (
|
|
834
|
-
const ue = ae.trim(), ke = !
|
|
835
|
-
W(
|
|
836
|
-
ke ? !e.some((Ce) =>
|
|
837
|
-
), i && I && X(),
|
|
837
|
+
onBlur: (O) => {
|
|
838
|
+
const ue = ae.trim(), ke = !ze(ue), Ae = ke ? e.find((Ce) => g(Ce) === ue) : void 0;
|
|
839
|
+
W(Ae || (!z && A && ke ? ue : null)), h(O), a == null || a(
|
|
840
|
+
ke ? !e.some((Ce) => g(Ce) === ue) : null
|
|
841
|
+
), i && I && X(), x == null || x(!0);
|
|
838
842
|
},
|
|
839
843
|
disabled: u,
|
|
840
844
|
defaultWidth: !1,
|
|
841
|
-
isRequired:
|
|
842
|
-
touched:
|
|
843
|
-
error:
|
|
844
|
-
...
|
|
845
|
+
isRequired: L,
|
|
846
|
+
touched: b,
|
|
847
|
+
error: P,
|
|
848
|
+
...Ee,
|
|
845
849
|
clearable: de,
|
|
846
850
|
onClear: de ? Ie : U,
|
|
847
851
|
endIcon: i && !c ? /* @__PURE__ */ r(
|
|
848
852
|
"button",
|
|
849
853
|
{
|
|
850
854
|
type: "button",
|
|
851
|
-
className:
|
|
855
|
+
className: Pe("dropdown-button", { "icon-reversed": I }),
|
|
852
856
|
onClick: () => X(),
|
|
853
857
|
"aria-label": "Toggle dropdown",
|
|
854
858
|
"aria-expanded": I,
|
|
855
|
-
children: /* @__PURE__ */ r(
|
|
859
|
+
children: /* @__PURE__ */ r(Fe, {})
|
|
856
860
|
}
|
|
857
861
|
) : c,
|
|
858
862
|
minLength: i ? 0 : p
|
|
859
863
|
})
|
|
860
864
|
}
|
|
861
865
|
),
|
|
862
|
-
|
|
866
|
+
!$ && M
|
|
863
867
|
] }),
|
|
864
|
-
|
|
868
|
+
$ && Ge(M, $)
|
|
865
869
|
] });
|
|
866
870
|
}
|
|
867
871
|
}
|
|
@@ -869,9 +873,9 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
869
873
|
};
|
|
870
874
|
export {
|
|
871
875
|
$e as AutocompleteMenu,
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
876
|
+
Re as AutocompleteOption,
|
|
877
|
+
yt as AutocompleteOptions,
|
|
878
|
+
dt as AutocompletePrompt,
|
|
879
|
+
ao as MultipleAutocomplete,
|
|
880
|
+
uo as SingleAutocomplete
|
|
877
881
|
};
|