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