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