@reportportal/ui-kit 0.0.1-alpha.220 → 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 +388 -380
- package/dist/components/autocompletes/common/autocompleteMenu/autocompleteMenu.d.ts +1 -0
- package/dist/components/autocompletes/common/autocompleteOptions.d.ts +2 -1
- package/dist/components/autocompletes/constants.d.ts +1 -0
- package/dist/components/autocompletes/multipleAutocomplete/multipleAutocomplete.d.ts +1 -0
- package/dist/components/autocompletes/singleAutocomplete/singleAutocomplete.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,110 +1,111 @@
|
|
|
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,
|
|
35
36
|
mobileDisabled: o = !1,
|
|
36
37
|
parseValueToString: s,
|
|
37
|
-
error:
|
|
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
|
-
getItemName:
|
|
44
|
+
variant: z = "light",
|
|
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
|
-
|
|
53
|
-
},
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
},
|
|
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);
|
|
54
|
+
}, C = (B) => {
|
|
55
|
+
const j = v(A);
|
|
56
|
+
B.key === "Enter" && j && (h(t, A), x(!1), F(""));
|
|
57
|
+
}, _ = () => {
|
|
58
|
+
x(!1), F("");
|
|
59
|
+
}, N = (B) => {
|
|
60
|
+
B.stopPropagation(), e(t);
|
|
61
|
+
}, R = (s == null ? void 0 : s(t)) || "";
|
|
61
62
|
we(() => {
|
|
62
|
-
if (
|
|
63
|
-
const
|
|
64
|
-
|
|
63
|
+
if (a.current && m) {
|
|
64
|
+
const B = () => {
|
|
65
|
+
a.current && i(nt(a.current));
|
|
65
66
|
};
|
|
66
|
-
if (
|
|
67
|
-
const
|
|
68
|
-
return
|
|
67
|
+
if (B(), typeof ResizeObserver < "u") {
|
|
68
|
+
const j = new ResizeObserver(B);
|
|
69
|
+
return j.observe(a.current), () => j.disconnect();
|
|
69
70
|
}
|
|
70
71
|
} else
|
|
71
|
-
|
|
72
|
-
}, [
|
|
72
|
+
i(!1);
|
|
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
|
-
[`validation-${
|
|
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
95
|
value: A,
|
|
95
|
-
onChange:
|
|
96
|
-
onKeyDown:
|
|
97
|
-
onBlur:
|
|
96
|
+
onChange: y,
|
|
97
|
+
onKeyDown: C,
|
|
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
|
-
ref:
|
|
105
|
+
ref: a,
|
|
105
106
|
className: ee,
|
|
106
|
-
title: m &&
|
|
107
|
-
children:
|
|
107
|
+
title: m && c ? R : void 0,
|
|
108
|
+
children: R
|
|
108
109
|
}
|
|
109
110
|
),
|
|
110
111
|
!n && /* @__PURE__ */ r(
|
|
@@ -112,28 +113,28 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
112
113
|
{
|
|
113
114
|
type: "button",
|
|
114
115
|
className: me("cross-icon", {
|
|
115
|
-
[`validation-${
|
|
116
|
+
[`validation-${l}`]: l,
|
|
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,
|
|
128
129
|
storedItemsMap: o = {},
|
|
129
130
|
highlightUnStoredItem: s = !1,
|
|
130
|
-
renderCustomSelectedItem:
|
|
131
|
+
renderCustomSelectedItem: l,
|
|
131
132
|
selectedItemSingleLine: h,
|
|
132
133
|
selectedItemClassName: u,
|
|
133
|
-
selectedItemTextClassName:
|
|
134
|
-
...
|
|
135
|
-
}) => t.map((p) =>
|
|
136
|
-
|
|
134
|
+
selectedItemTextClassName: v,
|
|
135
|
+
...g
|
|
136
|
+
}) => t.map((p) => l ? l(p) : /* @__PURE__ */ r(
|
|
137
|
+
rt,
|
|
137
138
|
{
|
|
138
139
|
parseValueToString: e,
|
|
139
140
|
error: (n == null ? void 0 : n(p)) || "",
|
|
@@ -142,40 +143,40 @@ 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,
|
|
166
167
|
children: o = null,
|
|
167
168
|
disabled: s = !1,
|
|
168
|
-
optionVariant:
|
|
169
|
+
optionVariant: l = "",
|
|
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
|
-
className: V("new-item",
|
|
179
|
+
className: V("new-item", l, {
|
|
179
180
|
active: t,
|
|
180
181
|
selected: e,
|
|
181
182
|
disabled: s
|
|
@@ -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
|
]
|
|
@@ -199,7 +200,7 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
199
200
|
] }) : /* @__PURE__ */ r(
|
|
200
201
|
"li",
|
|
201
202
|
{
|
|
202
|
-
className: V("item",
|
|
203
|
+
className: V("item", l, {
|
|
203
204
|
active: t,
|
|
204
205
|
selected: e,
|
|
205
206
|
disabled: s
|
|
@@ -208,233 +209,239 @@ 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,
|
|
219
220
|
inputValue: o,
|
|
220
221
|
loading: s,
|
|
221
|
-
createWithoutConfirmation:
|
|
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
|
-
getItemProps:
|
|
228
|
+
getUniqKey: z,
|
|
229
|
+
getItemProps: k,
|
|
229
230
|
parseValueToString: m,
|
|
230
|
-
limitationText:
|
|
231
|
-
optionsLimit:
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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,
|
|
235
237
|
{
|
|
236
|
-
optionVariant:
|
|
237
|
-
...
|
|
238
|
-
isNew:
|
|
239
|
-
newItemButtonText:
|
|
240
|
-
children: m(
|
|
238
|
+
optionVariant: v,
|
|
239
|
+
...k({ item: _, index: N }),
|
|
240
|
+
isNew: R,
|
|
241
|
+
newItemButtonText: g,
|
|
242
|
+
children: m(_)
|
|
241
243
|
},
|
|
242
|
-
(
|
|
244
|
+
(z == null ? void 0 : z(_)) || m(_)
|
|
243
245
|
),
|
|
244
|
-
[
|
|
245
|
-
),
|
|
246
|
-
(
|
|
247
|
-
[
|
|
248
|
-
),
|
|
249
|
-
(
|
|
250
|
-
const
|
|
251
|
-
return /* @__PURE__ */ r("div", { className: fe({ container: !
|
|
252
|
-
|
|
246
|
+
[k, z, g, v, m, p]
|
|
247
|
+
), F = Y(
|
|
248
|
+
(_) => _.length ? _.map((N, R) => A(N, R)) : "",
|
|
249
|
+
[A]
|
|
250
|
+
), c = Y(
|
|
251
|
+
(_) => {
|
|
252
|
+
const N = _.length;
|
|
253
|
+
return /* @__PURE__ */ r("div", { className: fe({ container: !N }), children: /* @__PURE__ */ r(
|
|
254
|
+
Re,
|
|
253
255
|
{
|
|
254
|
-
optionVariant:
|
|
256
|
+
optionVariant: v,
|
|
255
257
|
isNew: !0,
|
|
256
|
-
newItemButtonText:
|
|
257
|
-
...
|
|
258
|
+
newItemButtonText: g,
|
|
259
|
+
...k({ item: o, index: N }),
|
|
258
260
|
children: m(o)
|
|
259
261
|
},
|
|
260
262
|
m(o)
|
|
261
263
|
) });
|
|
262
264
|
},
|
|
263
|
-
[
|
|
264
|
-
),
|
|
265
|
-
(
|
|
266
|
-
/* @__PURE__ */ r(
|
|
267
|
-
!
|
|
265
|
+
[k, o, g, v, m]
|
|
266
|
+
), i = Y(
|
|
267
|
+
(_) => s ? /* @__PURE__ */ D(he, { children: [
|
|
268
|
+
/* @__PURE__ */ r(dt, { children: /* @__PURE__ */ r(Ye, {}) }),
|
|
269
|
+
!l && c(_)
|
|
268
270
|
] }) : "",
|
|
269
|
-
[
|
|
271
|
+
[l, s, c]
|
|
270
272
|
), a = Y(() => {
|
|
271
|
-
const
|
|
272
|
-
return /* @__PURE__ */ r("div", { className: fe("empty-list-message"), children:
|
|
273
|
-
}, [h, u, e == null ? void 0 : e.length]),
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
273
|
+
const _ = (e == null ? void 0 : e.length) === 0 ? h || "No available options" : u || "No matches found";
|
|
274
|
+
return /* @__PURE__ */ r("div", { className: fe("empty-list-message"), children: _ });
|
|
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
|
|
278
283
|
] }),
|
|
279
|
-
!
|
|
284
|
+
!l && c(d)
|
|
280
285
|
] });
|
|
281
|
-
},
|
|
282
|
-
menu:
|
|
283
|
-
opened:
|
|
284
|
-
dark:
|
|
285
|
-
},
|
|
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(
|
|
286
291
|
({
|
|
287
292
|
isOpen: t = !1,
|
|
288
293
|
style: e = {},
|
|
289
294
|
minLength: n = 1,
|
|
290
295
|
isDropdownMode: o,
|
|
291
296
|
inputValue: s = "",
|
|
292
|
-
className:
|
|
293
|
-
|
|
294
|
-
|
|
297
|
+
className: l = "",
|
|
298
|
+
portalMenuAttribute: h = null,
|
|
299
|
+
...u
|
|
300
|
+
}, v) => /* @__PURE__ */ r(
|
|
295
301
|
"ul",
|
|
296
302
|
{
|
|
297
|
-
ref:
|
|
298
|
-
className:
|
|
303
|
+
ref: v,
|
|
304
|
+
className: St(
|
|
299
305
|
"menu",
|
|
300
|
-
{ opened: t && (o ||
|
|
301
|
-
|
|
306
|
+
{ opened: t && (o || It(n, s)) },
|
|
307
|
+
l
|
|
302
308
|
),
|
|
303
309
|
style: e,
|
|
304
|
-
|
|
310
|
+
...h ? { [h]: "" } : {},
|
|
311
|
+
children: /* @__PURE__ */ r(yt, { inputValue: s, ...u })
|
|
305
312
|
}
|
|
306
313
|
)
|
|
307
|
-
),
|
|
314
|
+
), Le = (t, e) => typeof t == "string" ? t : e ? String(t[e(t)]) : "", _e = (t, e) => {
|
|
308
315
|
var o;
|
|
309
|
-
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,
|
|
310
|
-
},
|
|
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]))));
|
|
317
|
+
}, kt = (t, e, n) => typeof t == "string" ? t === e : n ? (() => {
|
|
311
318
|
const o = n(t);
|
|
312
319
|
return t[o] === e[o];
|
|
313
|
-
})() : !1,
|
|
320
|
+
})() : !1, Ct = ({
|
|
314
321
|
options: t = [],
|
|
315
322
|
onChange: e,
|
|
316
323
|
selectedItems: n = [],
|
|
317
324
|
handleUnStoredItemCb: o = null,
|
|
318
325
|
existingItemsMap: s = {},
|
|
319
|
-
children:
|
|
326
|
+
children: l,
|
|
320
327
|
customizeNewSelectedValue: h = (p) => p,
|
|
321
328
|
getOptionUniqKey: u,
|
|
322
|
-
getOptionUniqKeyValue:
|
|
323
|
-
...
|
|
329
|
+
getOptionUniqKeyValue: v,
|
|
330
|
+
...g
|
|
324
331
|
}) => {
|
|
325
|
-
const [p,
|
|
326
|
-
const
|
|
332
|
+
const [p, z] = oe(s), k = (c, i) => {
|
|
333
|
+
const a = {
|
|
327
334
|
...p
|
|
328
335
|
};
|
|
329
|
-
|
|
330
|
-
if (t.find((
|
|
331
|
-
const
|
|
332
|
-
|
|
336
|
+
c.forEach((d) => {
|
|
337
|
+
if (t.find((y) => kt(y, d, u))) {
|
|
338
|
+
const y = Le(d, u);
|
|
339
|
+
a[y] = !0;
|
|
333
340
|
}
|
|
334
|
-
}),
|
|
335
|
-
}, m = (
|
|
336
|
-
const
|
|
337
|
-
if (
|
|
338
|
-
const
|
|
339
|
-
delete
|
|
341
|
+
}), z(a), i(a);
|
|
342
|
+
}, m = (c, i) => {
|
|
343
|
+
const a = Le(c, u);
|
|
344
|
+
if (a in p) {
|
|
345
|
+
const d = { ...p };
|
|
346
|
+
delete d[a], z(d), i(d);
|
|
340
347
|
} else
|
|
341
|
-
|
|
342
|
-
},
|
|
343
|
-
const
|
|
344
|
-
e == null || e(
|
|
345
|
-
},
|
|
346
|
-
const
|
|
347
|
-
|
|
348
|
-
},
|
|
349
|
-
const
|
|
350
|
-
e == null || e(
|
|
351
|
-
},
|
|
352
|
-
|
|
353
|
-
}, A = (
|
|
354
|
-
removeItem:
|
|
355
|
-
editItem:
|
|
348
|
+
i(p);
|
|
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) => {
|
|
353
|
+
const a = n.indexOf(c), d = [...n];
|
|
354
|
+
d.splice(a, 1, i), e == null || e(d, null);
|
|
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,
|
|
356
363
|
handleChange: e,
|
|
357
|
-
getOptionUniqKeyValue:
|
|
364
|
+
getOptionUniqKeyValue: v,
|
|
358
365
|
storedItemsMap: p,
|
|
359
|
-
...
|
|
366
|
+
...c
|
|
360
367
|
});
|
|
361
368
|
return /* @__PURE__ */ r(
|
|
362
369
|
pe,
|
|
363
370
|
{
|
|
364
|
-
...
|
|
365
|
-
stateReducer: (
|
|
366
|
-
switch (
|
|
371
|
+
...g,
|
|
372
|
+
stateReducer: (c, i) => {
|
|
373
|
+
switch (i.type) {
|
|
367
374
|
case pe.stateChangeTypes.keyDownEnter:
|
|
368
375
|
case pe.stateChangeTypes.clickItem:
|
|
369
376
|
return {
|
|
370
|
-
...
|
|
371
|
-
highlightedIndex:
|
|
377
|
+
...i,
|
|
378
|
+
highlightedIndex: c.highlightedIndex,
|
|
372
379
|
inputValue: ""
|
|
373
380
|
};
|
|
374
381
|
default:
|
|
375
|
-
return
|
|
382
|
+
return i;
|
|
376
383
|
}
|
|
377
384
|
},
|
|
378
|
-
onChange:
|
|
385
|
+
onChange: x,
|
|
379
386
|
selectedItem: null,
|
|
380
|
-
children: (
|
|
387
|
+
children: (c) => l == null ? void 0 : l(A(c))
|
|
381
388
|
}
|
|
382
389
|
);
|
|
383
|
-
},
|
|
384
|
-
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,
|
|
385
392
|
"autocomplete-wrapper": "_autocomplete-wrapper_1so4a_28",
|
|
386
393
|
disabled: zt,
|
|
387
|
-
error:
|
|
394
|
+
error: At,
|
|
388
395
|
touched: Rt,
|
|
389
396
|
"clear-icon": "_clear-icon_1so4a_46",
|
|
390
397
|
"clear-icon--disabled": "_clear-icon--disabled_1so4a_56",
|
|
391
398
|
"autocomplete-input": "_autocomplete-input_1so4a_60",
|
|
392
399
|
"single-line-mode": "_single-line-mode_1so4a_68",
|
|
393
400
|
"mobile-disabled": "_mobile-disabled_1so4a_72",
|
|
394
|
-
input:
|
|
401
|
+
input: Lt,
|
|
395
402
|
"type-number": "_type-number_1so4a_101",
|
|
396
403
|
"error-text": "_error-text_1so4a_112",
|
|
397
404
|
"dropdown-button": "_dropdown-button_1so4a_121",
|
|
398
405
|
"icon-reversed": "_icon-reversed_1so4a_129"
|
|
399
|
-
}, J = Q.bind(
|
|
406
|
+
}, J = Q.bind(Pt), ao = (t) => {
|
|
400
407
|
const {
|
|
401
408
|
options: e = [],
|
|
402
409
|
loading: n = !1,
|
|
403
410
|
onStateChange: o = () => {
|
|
404
411
|
},
|
|
405
412
|
value: s = [],
|
|
406
|
-
placeholder:
|
|
413
|
+
placeholder: l = "",
|
|
407
414
|
error: h = "",
|
|
408
415
|
touched: u = !1,
|
|
409
|
-
creatable:
|
|
410
|
-
editable:
|
|
416
|
+
creatable: v = !1,
|
|
417
|
+
editable: g = !1,
|
|
411
418
|
onChange: p = () => {
|
|
412
419
|
},
|
|
413
|
-
onFocus:
|
|
420
|
+
onFocus: z = () => {
|
|
414
421
|
},
|
|
415
|
-
onBlur:
|
|
422
|
+
onBlur: k = () => {
|
|
416
423
|
},
|
|
417
424
|
disabled: m = !1,
|
|
418
|
-
isDropdownMode:
|
|
419
|
-
mobileDisabled:
|
|
420
|
-
inputProps:
|
|
421
|
-
parseValueToString:
|
|
425
|
+
isDropdownMode: L = !1,
|
|
426
|
+
mobileDisabled: P = !1,
|
|
427
|
+
inputProps: b = {},
|
|
428
|
+
parseValueToString: x = (f) => f == null ? "" : String(f),
|
|
422
429
|
maxLength: A = null,
|
|
423
|
-
async:
|
|
424
|
-
customClass:
|
|
425
|
-
createWithoutConfirmation:
|
|
426
|
-
getItemValidationErrorType:
|
|
427
|
-
clearItemsError:
|
|
430
|
+
async: F = !1,
|
|
431
|
+
customClass: c = "",
|
|
432
|
+
createWithoutConfirmation: i = !1,
|
|
433
|
+
getItemValidationErrorType: a = null,
|
|
434
|
+
clearItemsError: d = () => {
|
|
428
435
|
},
|
|
429
|
-
getAdditionalCreationCondition:
|
|
430
|
-
highlightUnStoredItem:
|
|
431
|
-
parseInputValueFn:
|
|
432
|
-
handleUnStoredItemCb:
|
|
433
|
-
dataAutomationId:
|
|
436
|
+
getAdditionalCreationCondition: y = () => !0,
|
|
437
|
+
highlightUnStoredItem: C = !1,
|
|
438
|
+
parseInputValueFn: _ = null,
|
|
439
|
+
handleUnStoredItemCb: N = null,
|
|
440
|
+
dataAutomationId: R = "",
|
|
434
441
|
existingItemsMap: ee = {},
|
|
435
|
-
customizeNewSelectedValue:
|
|
436
|
-
renderCustomSelectedItem:
|
|
437
|
-
useFixedPositioning:
|
|
442
|
+
customizeNewSelectedValue: $ = (f) => f,
|
|
443
|
+
renderCustomSelectedItem: B,
|
|
444
|
+
useFixedPositioning: j,
|
|
438
445
|
newItemButtonText: ve = "",
|
|
439
446
|
menuClassName: K = "",
|
|
440
447
|
selectedItemSingleLine: se,
|
|
@@ -443,55 +450,55 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
443
450
|
...be
|
|
444
451
|
} = t, { refs: le, floatingStyles: Z } = Be({
|
|
445
452
|
placement: "bottom-start",
|
|
446
|
-
strategy:
|
|
447
|
-
whileElementsMounted:
|
|
448
|
-
}), ye = s.length === 0 && !m ?
|
|
453
|
+
strategy: j ? "fixed" : "absolute",
|
|
454
|
+
whileElementsMounted: De
|
|
455
|
+
}), ye = s.length === 0 && !m ? l : "", te = Me(null);
|
|
449
456
|
we(() => {
|
|
450
|
-
|
|
451
|
-
}, [
|
|
452
|
-
const ge = (f,
|
|
453
|
-
p(f,
|
|
454
|
-
}, xe = (f,
|
|
455
|
-
item:
|
|
457
|
+
d();
|
|
458
|
+
}, [d, s]);
|
|
459
|
+
const ge = (f, E) => {
|
|
460
|
+
p(f, E);
|
|
461
|
+
}, xe = (f, E, I) => ({ item: S, index: G, ...H }) => f({
|
|
462
|
+
item: S,
|
|
456
463
|
index: G,
|
|
457
|
-
isSelected:
|
|
464
|
+
isSelected: I.some((W) => _e(W, S)),
|
|
458
465
|
...H,
|
|
459
|
-
isActive:
|
|
466
|
+
isActive: E === G
|
|
460
467
|
}), w = ({
|
|
461
468
|
event: f,
|
|
462
|
-
removeItem:
|
|
463
|
-
inputValue:
|
|
469
|
+
removeItem: E,
|
|
470
|
+
inputValue: I
|
|
464
471
|
}) => {
|
|
465
|
-
f.key === "Backspace" && !
|
|
466
|
-
},
|
|
472
|
+
f.key === "Backspace" && !I && s.length && E(s[s.length - 1], null);
|
|
473
|
+
}, T = ({
|
|
467
474
|
inputValue: f,
|
|
468
|
-
selectItem:
|
|
469
|
-
clearSelection:
|
|
475
|
+
selectItem: E,
|
|
476
|
+
clearSelection: I
|
|
470
477
|
}) => {
|
|
471
|
-
if (
|
|
472
|
-
const
|
|
473
|
-
(
|
|
478
|
+
if (_) {
|
|
479
|
+
const S = _(f);
|
|
480
|
+
(S.length ? S : [f]).forEach((H) => E(H)), I();
|
|
474
481
|
} else
|
|
475
|
-
|
|
476
|
-
}, q = (f) => (
|
|
477
|
-
f(
|
|
478
|
-
}, 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)));
|
|
479
486
|
return /* @__PURE__ */ r(
|
|
480
|
-
|
|
487
|
+
Ct,
|
|
481
488
|
{
|
|
482
489
|
onChange: ge,
|
|
483
|
-
itemToString:
|
|
490
|
+
itemToString: x,
|
|
484
491
|
selectedItems: s,
|
|
485
492
|
onStateChange: o,
|
|
486
493
|
options: e,
|
|
487
494
|
existingItemsMap: ee,
|
|
488
|
-
handleUnStoredItemCb:
|
|
489
|
-
customizeNewSelectedValue:
|
|
495
|
+
handleUnStoredItemCb: N,
|
|
496
|
+
customizeNewSelectedValue: $,
|
|
490
497
|
children: ({
|
|
491
498
|
getInputProps: f,
|
|
492
|
-
getItemProps:
|
|
493
|
-
isOpen:
|
|
494
|
-
inputValue:
|
|
499
|
+
getItemProps: E,
|
|
500
|
+
isOpen: I,
|
|
501
|
+
inputValue: S = "",
|
|
495
502
|
highlightedIndex: G,
|
|
496
503
|
removeItem: H,
|
|
497
504
|
editItem: W,
|
|
@@ -500,47 +507,47 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
500
507
|
clearSelection: ae,
|
|
501
508
|
toggleMenu: U,
|
|
502
509
|
storedItemsMap: Ne,
|
|
503
|
-
getRootProps:
|
|
510
|
+
getRootProps: Ee
|
|
504
511
|
}) => {
|
|
505
|
-
const
|
|
506
|
-
...
|
|
507
|
-
ref: (
|
|
508
|
-
}, Ie =
|
|
509
|
-
return /* @__PURE__ */
|
|
510
|
-
/* @__PURE__ */
|
|
511
|
-
/* @__PURE__ */
|
|
512
|
+
const Se = Ee(void 0, { suppressRefError: !0 }), de = {
|
|
513
|
+
...Se,
|
|
514
|
+
ref: (M) => (le.setReference(M), Se.ref(M))
|
|
515
|
+
}, Ie = S ?? "";
|
|
516
|
+
return /* @__PURE__ */ D("div", { ...de, className: J("autocomplete-wrapper"), children: [
|
|
517
|
+
/* @__PURE__ */ D(he, { children: [
|
|
518
|
+
/* @__PURE__ */ D(
|
|
512
519
|
"div",
|
|
513
520
|
{
|
|
514
|
-
className: J("autocomplete",
|
|
515
|
-
"mobile-disabled":
|
|
521
|
+
className: J("autocomplete", c, {
|
|
522
|
+
"mobile-disabled": P,
|
|
516
523
|
error: h,
|
|
517
524
|
touched: u,
|
|
518
525
|
disabled: m
|
|
519
526
|
}),
|
|
520
527
|
children: [
|
|
521
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ D(
|
|
522
529
|
"div",
|
|
523
530
|
{
|
|
524
531
|
className: J("autocomplete-input", {
|
|
525
|
-
"mobile-disabled":
|
|
532
|
+
"mobile-disabled": P,
|
|
526
533
|
"single-line-mode": se
|
|
527
534
|
}),
|
|
528
535
|
children: [
|
|
529
536
|
/* @__PURE__ */ r(
|
|
530
|
-
|
|
537
|
+
lt,
|
|
531
538
|
{
|
|
532
539
|
items: s,
|
|
533
540
|
onRemoveItem: q(H),
|
|
534
541
|
disabled: m,
|
|
535
|
-
mobileDisabled:
|
|
536
|
-
parseValueToString:
|
|
537
|
-
getItemValidationErrorType:
|
|
538
|
-
renderCustomSelectedItem:
|
|
542
|
+
mobileDisabled: P,
|
|
543
|
+
parseValueToString: x,
|
|
544
|
+
getItemValidationErrorType: a,
|
|
545
|
+
renderCustomSelectedItem: B,
|
|
539
546
|
editItem: W,
|
|
540
|
-
editable:
|
|
541
|
-
getAdditionalCreationCondition:
|
|
547
|
+
editable: g,
|
|
548
|
+
getAdditionalCreationCondition: y,
|
|
542
549
|
storedItemsMap: Ne,
|
|
543
|
-
highlightUnStoredItem:
|
|
550
|
+
highlightUnStoredItem: C,
|
|
544
551
|
selectedItemSingleLine: se,
|
|
545
552
|
selectedItemClassName: ne,
|
|
546
553
|
selectedItemTextClassName: re
|
|
@@ -554,54 +561,54 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
554
561
|
placeholder: ye,
|
|
555
562
|
maxLength: A,
|
|
556
563
|
onFocus: () => {
|
|
557
|
-
|
|
564
|
+
L && ce(), z();
|
|
558
565
|
},
|
|
559
|
-
onKeyDown: (
|
|
560
|
-
|
|
561
|
-
inputValue:
|
|
566
|
+
onKeyDown: (M) => {
|
|
567
|
+
M.key === Oe && S && v && y(S) && T({
|
|
568
|
+
inputValue: S,
|
|
562
569
|
selectItem: ie,
|
|
563
570
|
clearSelection: ae
|
|
564
|
-
}), w({ event:
|
|
571
|
+
}), w({ event: M, removeItem: H, inputValue: S });
|
|
565
572
|
},
|
|
566
573
|
onBlur: () => {
|
|
567
|
-
|
|
568
|
-
inputValue:
|
|
574
|
+
k(), S && v && y(S) && T({
|
|
575
|
+
inputValue: S,
|
|
569
576
|
selectItem: ie,
|
|
570
577
|
clearSelection: ae
|
|
571
578
|
});
|
|
572
579
|
},
|
|
573
580
|
disabled: m,
|
|
574
|
-
...
|
|
581
|
+
...b
|
|
575
582
|
}),
|
|
576
|
-
className: J("input", { disabled: m },
|
|
577
|
-
"data-automation-id":
|
|
583
|
+
className: J("input", { disabled: m }, b.className),
|
|
584
|
+
"data-automation-id": R
|
|
578
585
|
}
|
|
579
586
|
)
|
|
580
587
|
]
|
|
581
588
|
}
|
|
582
589
|
),
|
|
583
|
-
(
|
|
590
|
+
(b == null ? void 0 : b.clearable) && !ze(s) && /* @__PURE__ */ r(
|
|
584
591
|
"button",
|
|
585
592
|
{
|
|
586
593
|
type: "button",
|
|
587
594
|
className: J("clear-icon", { "clear-icon--disabled": m }),
|
|
588
595
|
onClick: () => {
|
|
589
|
-
var
|
|
590
|
-
return !m && ((
|
|
596
|
+
var M;
|
|
597
|
+
return !m && ((M = b == null ? void 0 : b.onClear) == null ? void 0 : M.call(b));
|
|
591
598
|
},
|
|
592
|
-
onMouseDown: (
|
|
593
|
-
children: /* @__PURE__ */ r(
|
|
599
|
+
onMouseDown: (M) => M.preventDefault(),
|
|
600
|
+
children: /* @__PURE__ */ r(et, {})
|
|
594
601
|
}
|
|
595
602
|
),
|
|
596
|
-
|
|
603
|
+
L && /* @__PURE__ */ r(
|
|
597
604
|
"button",
|
|
598
605
|
{
|
|
599
606
|
type: "button",
|
|
600
|
-
className: J("dropdown-button", { "icon-reversed":
|
|
607
|
+
className: J("dropdown-button", { "icon-reversed": I }),
|
|
601
608
|
onClick: () => U(),
|
|
602
609
|
"aria-label": "Toggle dropdown",
|
|
603
|
-
"aria-expanded":
|
|
604
|
-
children: /* @__PURE__ */ r(
|
|
610
|
+
"aria-expanded": I,
|
|
611
|
+
children: /* @__PURE__ */ r(Fe, {})
|
|
605
612
|
}
|
|
606
613
|
)
|
|
607
614
|
]
|
|
@@ -612,17 +619,17 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
612
619
|
/* @__PURE__ */ r(
|
|
613
620
|
$e,
|
|
614
621
|
{
|
|
615
|
-
isOpen:
|
|
622
|
+
isOpen: I,
|
|
616
623
|
loading: n,
|
|
617
|
-
async:
|
|
624
|
+
async: F,
|
|
618
625
|
ref: le.setFloating,
|
|
619
626
|
newItemButtonText: ve,
|
|
620
|
-
isDropdownMode:
|
|
627
|
+
isDropdownMode: L,
|
|
621
628
|
style: Z,
|
|
622
629
|
inputValue: Ie.trim(),
|
|
623
|
-
getItemProps: xe(
|
|
624
|
-
parseValueToString:
|
|
625
|
-
createWithoutConfirmation:
|
|
630
|
+
getItemProps: xe(E, G, s),
|
|
631
|
+
parseValueToString: x,
|
|
632
|
+
createWithoutConfirmation: i,
|
|
626
633
|
options: X,
|
|
627
634
|
className: K,
|
|
628
635
|
...be
|
|
@@ -632,7 +639,7 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
632
639
|
}
|
|
633
640
|
}
|
|
634
641
|
);
|
|
635
|
-
},
|
|
642
|
+
}, Bt = ({ skip: t }) => {
|
|
636
643
|
je(() => {
|
|
637
644
|
if (t)
|
|
638
645
|
return;
|
|
@@ -641,20 +648,20 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
641
648
|
if (!n)
|
|
642
649
|
return;
|
|
643
650
|
window.scrollY !== e && window.scrollTo(0, e);
|
|
644
|
-
},
|
|
651
|
+
}, l = (u) => {
|
|
645
652
|
n && (u.preventDefault(), u.stopImmediatePropagation(), s());
|
|
646
653
|
};
|
|
647
|
-
e = window.scrollY, window.addEventListener("scroll",
|
|
654
|
+
e = window.scrollY, window.addEventListener("scroll", l, { passive: !1, capture: !0 }), requestAnimationFrame(() => {
|
|
648
655
|
e = window.scrollY, s();
|
|
649
656
|
});
|
|
650
657
|
const h = setTimeout(() => {
|
|
651
658
|
n = !1;
|
|
652
659
|
}, o);
|
|
653
660
|
return () => {
|
|
654
|
-
clearTimeout(h), window.removeEventListener("scroll",
|
|
661
|
+
clearTimeout(h), window.removeEventListener("scroll", l, { capture: !0 });
|
|
655
662
|
};
|
|
656
663
|
}, [t]);
|
|
657
|
-
},
|
|
664
|
+
}, Dt = ({ skip: t, reference: e }) => {
|
|
658
665
|
we(() => {
|
|
659
666
|
if (t)
|
|
660
667
|
return;
|
|
@@ -666,198 +673,199 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
666
673
|
window.removeEventListener("resize", n);
|
|
667
674
|
};
|
|
668
675
|
}, [t, e]);
|
|
669
|
-
},
|
|
676
|
+
}, Ft = ({ skip: t, onClose: e, menuRef: n }) => {
|
|
670
677
|
we(() => {
|
|
671
678
|
if (t)
|
|
672
679
|
return;
|
|
673
680
|
const o = (s) => {
|
|
674
|
-
var
|
|
675
|
-
(
|
|
681
|
+
var l;
|
|
682
|
+
(l = n.current) != null && l.contains(s.target) || e();
|
|
676
683
|
};
|
|
677
684
|
return window.addEventListener("scroll", o, !0), () => {
|
|
678
685
|
window.removeEventListener("scroll", o, !0);
|
|
679
686
|
};
|
|
680
687
|
}, [t, e, n]);
|
|
681
|
-
},
|
|
688
|
+
}, Ot = {
|
|
682
689
|
"input-wrapper": "_input-wrapper_d9vma_1",
|
|
683
690
|
"dropdown-button": "_dropdown-button_d9vma_6",
|
|
684
691
|
"icon-reversed": "_icon-reversed_d9vma_14"
|
|
685
|
-
},
|
|
692
|
+
}, Pe = Q.bind(Ot), $t = 0, Tt = Je({
|
|
686
693
|
fallbackPlacements: ["bottom-start", "top-start", "bottom", "top"],
|
|
687
694
|
boundary: document == null ? void 0 : document.documentElement,
|
|
688
695
|
rootBoundary: "viewport"
|
|
689
|
-
}),
|
|
696
|
+
}), jt = Qe({
|
|
690
697
|
apply({ rects: t, elements: e }) {
|
|
691
698
|
Object.assign(e.floating.style, {
|
|
692
699
|
width: `${t.reference.width}px`
|
|
693
700
|
});
|
|
694
701
|
}
|
|
695
|
-
}),
|
|
702
|
+
}), uo = (t) => {
|
|
696
703
|
const {
|
|
697
704
|
options: e = [],
|
|
698
705
|
value: n,
|
|
699
706
|
placeholder: o = "",
|
|
700
707
|
onChange: s = () => {
|
|
701
708
|
},
|
|
702
|
-
onFocus:
|
|
709
|
+
onFocus: l = () => {
|
|
703
710
|
},
|
|
704
711
|
onBlur: h = () => {
|
|
705
712
|
},
|
|
706
713
|
disabled: u = !1,
|
|
707
|
-
inputProps:
|
|
708
|
-
parseValueToString:
|
|
714
|
+
inputProps: v = {},
|
|
715
|
+
parseValueToString: g = (w) => w === null ? "" : String(w),
|
|
709
716
|
minLength: p = 1,
|
|
710
|
-
skipOptionCreation:
|
|
711
|
-
maxLength:
|
|
717
|
+
skipOptionCreation: z = !1,
|
|
718
|
+
maxLength: k = null,
|
|
712
719
|
optionVariant: m = "",
|
|
713
|
-
isRequired:
|
|
714
|
-
error:
|
|
715
|
-
touched:
|
|
716
|
-
setTouch:
|
|
720
|
+
isRequired: L = !1,
|
|
721
|
+
error: P = "",
|
|
722
|
+
touched: b = !1,
|
|
723
|
+
setTouch: x = () => {
|
|
717
724
|
},
|
|
718
725
|
createWithoutConfirmation: A = !1,
|
|
719
|
-
menuClassName:
|
|
720
|
-
icon:
|
|
721
|
-
isDropdownMode:
|
|
722
|
-
isOptionUnique:
|
|
723
|
-
refFunction:
|
|
724
|
-
stateReducer:
|
|
725
|
-
onStateChange:
|
|
726
|
-
useFixedPositioning:
|
|
727
|
-
dropdownMatchInputWidth:
|
|
728
|
-
withMenuFlip:
|
|
726
|
+
menuClassName: F = "",
|
|
727
|
+
icon: c,
|
|
728
|
+
isDropdownMode: i = !1,
|
|
729
|
+
isOptionUnique: a,
|
|
730
|
+
refFunction: d,
|
|
731
|
+
stateReducer: y,
|
|
732
|
+
onStateChange: C,
|
|
733
|
+
useFixedPositioning: _,
|
|
734
|
+
dropdownMatchInputWidth: N = !1,
|
|
735
|
+
withMenuFlip: R = !1,
|
|
729
736
|
newItemButtonText: ee = "",
|
|
730
|
-
menuPortalRoot:
|
|
731
|
-
...
|
|
732
|
-
} = t, [
|
|
737
|
+
menuPortalRoot: $,
|
|
738
|
+
...B
|
|
739
|
+
} = t, [j, ve] = oe(!1), K = Me(null), se = Y(() => {
|
|
733
740
|
var w;
|
|
734
741
|
return (w = K.current) == null ? void 0 : w.call(K);
|
|
735
|
-
}, []), ne = !
|
|
742
|
+
}, []), ne = !j || !$, re = $ || _ ? "fixed" : "absolute", be = !j || re === "absolute", le = He(
|
|
736
743
|
() => [
|
|
737
|
-
...
|
|
738
|
-
...
|
|
744
|
+
...R ? [Tt] : [],
|
|
745
|
+
...N ? [jt] : []
|
|
739
746
|
],
|
|
740
|
-
[
|
|
747
|
+
[R, N]
|
|
741
748
|
), { refs: Z, floatingStyles: ye } = Be({
|
|
742
749
|
placement: "bottom-start",
|
|
743
|
-
whileElementsMounted:
|
|
750
|
+
whileElementsMounted: De,
|
|
744
751
|
strategy: re,
|
|
745
752
|
middleware: le
|
|
746
753
|
});
|
|
747
|
-
|
|
754
|
+
Bt({ skip: ne }), Dt({ skip: ne, reference: Z.reference }), Ft({
|
|
748
755
|
skip: be,
|
|
749
756
|
onClose: se,
|
|
750
757
|
menuRef: Z.floating
|
|
751
758
|
});
|
|
752
|
-
const te = (w,
|
|
759
|
+
const te = (w, T, q) => ({ item: X, index: f, ...E }) => w({
|
|
753
760
|
item: X,
|
|
754
761
|
index: f,
|
|
755
762
|
isSelected: q !== null && q === X,
|
|
756
|
-
...
|
|
757
|
-
isActive:
|
|
758
|
-
}), ge = (w,
|
|
759
|
-
w.key ===
|
|
763
|
+
...E,
|
|
764
|
+
isActive: T === f
|
|
765
|
+
}), ge = (w, T) => {
|
|
766
|
+
w.key === Ue && (w.preventDefault(), T(e.length));
|
|
760
767
|
}, xe = Y(
|
|
761
|
-
(w,
|
|
762
|
-
(w == null ? void 0 : w.isOpen) !== void 0 && ve(w.isOpen),
|
|
768
|
+
(w, ...T) => {
|
|
769
|
+
(w == null ? void 0 : w.isOpen) !== void 0 && ve(w.isOpen), C == null || C(w, ...T);
|
|
763
770
|
},
|
|
764
|
-
[
|
|
771
|
+
[C]
|
|
765
772
|
);
|
|
766
773
|
return /* @__PURE__ */ r(
|
|
767
774
|
pe,
|
|
768
775
|
{
|
|
769
776
|
onChange: s,
|
|
770
|
-
itemToString:
|
|
777
|
+
itemToString: g,
|
|
771
778
|
selectedItem: n,
|
|
772
779
|
onStateChange: xe,
|
|
773
780
|
defaultHighlightedIndex: $t,
|
|
774
|
-
stateReducer:
|
|
781
|
+
stateReducer: y,
|
|
775
782
|
children: ({
|
|
776
783
|
getInputProps: w,
|
|
777
|
-
getItemProps:
|
|
784
|
+
getItemProps: T,
|
|
778
785
|
setHighlightedIndex: q,
|
|
779
786
|
toggleMenu: X,
|
|
780
787
|
openMenu: f,
|
|
781
|
-
closeMenu:
|
|
782
|
-
isOpen:
|
|
783
|
-
inputValue:
|
|
788
|
+
closeMenu: E,
|
|
789
|
+
isOpen: I,
|
|
790
|
+
inputValue: S,
|
|
784
791
|
highlightedIndex: G,
|
|
785
792
|
getRootProps: H,
|
|
786
793
|
selectItem: W
|
|
787
794
|
}) => {
|
|
788
795
|
const ce = H(void 0, { suppressRefError: !0 }), ie = {
|
|
789
796
|
...ce,
|
|
790
|
-
ref: (
|
|
797
|
+
ref: (O) => (Z.setReference(O), ce.ref(O))
|
|
791
798
|
};
|
|
792
|
-
K.current || (K.current =
|
|
793
|
-
const ae =
|
|
794
|
-
W(null), U == null || U(...
|
|
795
|
-
},
|
|
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(
|
|
796
803
|
$e,
|
|
797
804
|
{
|
|
798
|
-
isOpen:
|
|
799
|
-
isDropdownMode:
|
|
805
|
+
isOpen: I,
|
|
806
|
+
isDropdownMode: i,
|
|
800
807
|
style: ye,
|
|
801
808
|
ref: Z.setFloating,
|
|
809
|
+
portalMenuAttribute: $ ? qe : null,
|
|
802
810
|
minLength: p,
|
|
803
|
-
inputValue: (
|
|
804
|
-
getItemProps: te(
|
|
805
|
-
parseValueToString:
|
|
811
|
+
inputValue: (S || "").trim(),
|
|
812
|
+
getItemProps: te(T, G, n),
|
|
813
|
+
parseValueToString: g,
|
|
806
814
|
optionVariant: m,
|
|
807
815
|
createWithoutConfirmation: A,
|
|
808
|
-
className:
|
|
816
|
+
className: F,
|
|
809
817
|
options: e,
|
|
810
818
|
newItemButtonText: ee,
|
|
811
|
-
...
|
|
819
|
+
...B
|
|
812
820
|
}
|
|
813
821
|
);
|
|
814
|
-
return /* @__PURE__ */
|
|
815
|
-
/* @__PURE__ */
|
|
822
|
+
return /* @__PURE__ */ D(he, { children: [
|
|
823
|
+
/* @__PURE__ */ D("div", { className: Pe("input-wrapper"), ...ie, children: [
|
|
816
824
|
/* @__PURE__ */ r(
|
|
817
825
|
Ze,
|
|
818
826
|
{
|
|
819
827
|
...w({
|
|
820
828
|
placeholder: u ? "" : o,
|
|
821
|
-
maxLength:
|
|
829
|
+
maxLength: k || void 0,
|
|
822
830
|
onFocus: () => {
|
|
823
|
-
|
|
831
|
+
i && !I && (f(), x == null || x(!0)), l();
|
|
824
832
|
},
|
|
825
|
-
ref:
|
|
826
|
-
onKeyDown: (
|
|
827
|
-
|
|
833
|
+
ref: d,
|
|
834
|
+
onKeyDown: (O) => {
|
|
835
|
+
O.key === Oe && O.preventDefault(), S && I && ge(O, q);
|
|
828
836
|
},
|
|
829
|
-
onBlur: (
|
|
830
|
-
const ue = ae.trim(), ke = !
|
|
831
|
-
W(
|
|
832
|
-
ke ? !e.some((Ce) =>
|
|
833
|
-
),
|
|
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);
|
|
834
842
|
},
|
|
835
843
|
disabled: u,
|
|
836
844
|
defaultWidth: !1,
|
|
837
|
-
isRequired:
|
|
838
|
-
touched:
|
|
839
|
-
error:
|
|
840
|
-
...
|
|
845
|
+
isRequired: L,
|
|
846
|
+
touched: b,
|
|
847
|
+
error: P,
|
|
848
|
+
...Ee,
|
|
841
849
|
clearable: de,
|
|
842
850
|
onClear: de ? Ie : U,
|
|
843
|
-
endIcon:
|
|
851
|
+
endIcon: i && !c ? /* @__PURE__ */ r(
|
|
844
852
|
"button",
|
|
845
853
|
{
|
|
846
854
|
type: "button",
|
|
847
|
-
className:
|
|
855
|
+
className: Pe("dropdown-button", { "icon-reversed": I }),
|
|
848
856
|
onClick: () => X(),
|
|
849
857
|
"aria-label": "Toggle dropdown",
|
|
850
|
-
"aria-expanded":
|
|
851
|
-
children: /* @__PURE__ */ r(
|
|
858
|
+
"aria-expanded": I,
|
|
859
|
+
children: /* @__PURE__ */ r(Fe, {})
|
|
852
860
|
}
|
|
853
|
-
) :
|
|
854
|
-
minLength:
|
|
861
|
+
) : c,
|
|
862
|
+
minLength: i ? 0 : p
|
|
855
863
|
})
|
|
856
864
|
}
|
|
857
865
|
),
|
|
858
|
-
|
|
866
|
+
!$ && M
|
|
859
867
|
] }),
|
|
860
|
-
|
|
868
|
+
$ && Ge(M, $)
|
|
861
869
|
] });
|
|
862
870
|
}
|
|
863
871
|
}
|
|
@@ -865,9 +873,9 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
|
|
|
865
873
|
};
|
|
866
874
|
export {
|
|
867
875
|
$e as AutocompleteMenu,
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
876
|
+
Re as AutocompleteOption,
|
|
877
|
+
yt as AutocompleteOptions,
|
|
878
|
+
dt as AutocompletePrompt,
|
|
879
|
+
ao as MultipleAutocomplete,
|
|
880
|
+
uo as SingleAutocomplete
|
|
873
881
|
};
|