@reportportal/ui-kit 0.0.1-alpha.228 → 0.0.1-alpha.229
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 +511 -519
- 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 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
|
+
import { c as Q } from "./bind-06a7ff84.js";
|
|
4
|
+
import { Scrollbars as We } from "rc-scrollbars";
|
|
5
|
+
import { B as Ye } from "./bubblesLoader-f3ffa240.js";
|
|
6
|
+
import { B as Ke } from "./button-7ab874f3.js";
|
|
7
|
+
import { S as Xe } from "./plus-199fb2a8.js";
|
|
8
|
+
import { i as ze } from "./isEmpty-ccacb5ff.js";
|
|
9
|
+
import { createPortal as Ge } from "react-dom";
|
|
10
|
+
import pe from "downshift";
|
|
11
|
+
import { useFloating as Be, autoUpdate as De, flip as Je, size as Qe } from "@floating-ui/react";
|
|
12
|
+
import { F as Ze } from "./fieldText-1749da7a.js";
|
|
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";
|
|
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 tt = "_disabled_1rpph_43", ot = "_input_1rpph_107", st = {
|
|
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: tt,
|
|
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: ot
|
|
32
|
+
}, me = Q.bind(st), nt = (t) => t.scrollWidth > t.clientWidth, rt = ({
|
|
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: h,
|
|
40
40
|
editable: u = !1,
|
|
41
|
-
getAdditionalCreationCondition:
|
|
42
|
-
storedOption:
|
|
43
|
-
highlightUnStoredItem:
|
|
44
|
-
variant:
|
|
45
|
-
getItemName:
|
|
46
|
-
singleLine:
|
|
47
|
-
className:
|
|
48
|
-
textClassName:
|
|
41
|
+
getAdditionalCreationCondition: v = () => !0,
|
|
42
|
+
storedOption: g = !0,
|
|
43
|
+
highlightUnStoredItem: p = !1,
|
|
44
|
+
variant: z = "light",
|
|
45
|
+
getItemName: k,
|
|
46
|
+
singleLine: m = !1,
|
|
47
|
+
className: L,
|
|
48
|
+
textClassName: P
|
|
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 [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)) || "";
|
|
62
|
+
we(() => {
|
|
63
|
+
if (a.current && m) {
|
|
64
|
+
const B = () => {
|
|
65
|
+
a.current && i(nt(a.current));
|
|
66
66
|
};
|
|
67
|
-
if (
|
|
68
|
-
const
|
|
69
|
-
return
|
|
67
|
+
if (B(), typeof ResizeObserver < "u") {
|
|
68
|
+
const j = new ResizeObserver(B);
|
|
69
|
+
return j.observe(a.current), () => j.disconnect();
|
|
70
70
|
}
|
|
71
71
|
} else
|
|
72
|
-
|
|
73
|
-
}, [
|
|
74
|
-
const
|
|
72
|
+
i(!1);
|
|
73
|
+
}, [R, m]);
|
|
74
|
+
const ee = me(
|
|
75
75
|
"selected-item-text",
|
|
76
76
|
{
|
|
77
|
-
"single-line":
|
|
77
|
+
"single-line": m
|
|
78
78
|
},
|
|
79
|
-
|
|
80
|
-
),
|
|
79
|
+
P
|
|
80
|
+
), $ = me(
|
|
81
81
|
"selected-item",
|
|
82
|
-
|
|
82
|
+
z,
|
|
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": p && !g
|
|
88
88
|
},
|
|
89
|
-
|
|
89
|
+
L
|
|
90
90
|
);
|
|
91
|
-
return
|
|
91
|
+
return b ? /* @__PURE__ */ r(
|
|
92
92
|
"input",
|
|
93
93
|
{
|
|
94
94
|
autoFocus: !0,
|
|
95
|
-
value:
|
|
96
|
-
onChange:
|
|
97
|
-
onKeyDown:
|
|
98
|
-
onBlur:
|
|
99
|
-
className:
|
|
95
|
+
value: A,
|
|
96
|
+
onChange: y,
|
|
97
|
+
onKeyDown: C,
|
|
98
|
+
onBlur: _,
|
|
99
|
+
className: me("input")
|
|
100
100
|
}
|
|
101
|
-
) : /* @__PURE__ */
|
|
101
|
+
) : /* @__PURE__ */ D("div", { className: $, onClick: d, children: [
|
|
102
102
|
/* @__PURE__ */ r(
|
|
103
103
|
"span",
|
|
104
104
|
{
|
|
105
|
-
ref:
|
|
106
|
-
className:
|
|
107
|
-
title:
|
|
108
|
-
children:
|
|
105
|
+
ref: a,
|
|
106
|
+
className: ee,
|
|
107
|
+
title: m && c ? R : void 0,
|
|
108
|
+
children: R
|
|
109
109
|
}
|
|
110
110
|
),
|
|
111
111
|
!n && /* @__PURE__ */ r(
|
|
112
112
|
"button",
|
|
113
113
|
{
|
|
114
114
|
type: "button",
|
|
115
|
-
className:
|
|
115
|
+
className: me("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: N,
|
|
121
|
+
children: /* @__PURE__ */ r(Ve, {})
|
|
122
122
|
}
|
|
123
123
|
)
|
|
124
124
|
] });
|
|
125
|
-
},
|
|
125
|
+
}, lt = ({
|
|
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: h,
|
|
133
133
|
selectedItemClassName: u,
|
|
134
|
-
selectedItemTextClassName:
|
|
135
|
-
...
|
|
136
|
-
}) => t.map((
|
|
137
|
-
|
|
134
|
+
selectedItemTextClassName: v,
|
|
135
|
+
...g
|
|
136
|
+
}) => t.map((p) => l ? l(p) : /* @__PURE__ */ r(
|
|
137
|
+
rt,
|
|
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(p)) || "",
|
|
141
|
+
item: p,
|
|
142
|
+
storedOption: !!o[e(p)],
|
|
143
143
|
highlightUnStoredItem: s,
|
|
144
|
-
singleLine:
|
|
144
|
+
singleLine: h,
|
|
145
145
|
className: u,
|
|
146
|
-
textClassName:
|
|
147
|
-
...
|
|
146
|
+
textClassName: v,
|
|
147
|
+
...g
|
|
148
148
|
},
|
|
149
|
-
e == null ? void 0 : e(
|
|
150
|
-
)),
|
|
151
|
-
prompt:
|
|
152
|
-
},
|
|
153
|
-
item:
|
|
154
|
-
divider:
|
|
149
|
+
e == null ? void 0 : e(p)
|
|
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,
|
|
155
155
|
"new-item": "_new-item_zw4ux_31",
|
|
156
|
-
active:
|
|
157
|
-
value:
|
|
156
|
+
active: ft,
|
|
157
|
+
value: pt,
|
|
158
158
|
"key-variant": "_key-variant_zw4ux_66",
|
|
159
|
-
tag:
|
|
159
|
+
tag: _t,
|
|
160
160
|
"button-active": "_button-active_zw4ux_80",
|
|
161
|
-
disabled:
|
|
161
|
+
disabled: ht,
|
|
162
162
|
"value-variant": "_value-variant_zw4ux_100"
|
|
163
|
-
},
|
|
163
|
+
}, V = Q.bind(wt), Re = ({
|
|
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: h = "",
|
|
171
171
|
...u
|
|
172
172
|
}) => {
|
|
173
|
-
const
|
|
174
|
-
return n ? /* @__PURE__ */
|
|
175
|
-
/* @__PURE__ */ r("div", { className:
|
|
176
|
-
/* @__PURE__ */
|
|
173
|
+
const v = () => h || (l === "key-variant" ? "New key" : "New value");
|
|
174
|
+
return n ? /* @__PURE__ */ D(he, { children: [
|
|
175
|
+
/* @__PURE__ */ r("div", { className: V("divider") }),
|
|
176
|
+
/* @__PURE__ */ D(
|
|
177
177
|
"li",
|
|
178
178
|
{
|
|
179
|
-
className:
|
|
179
|
+
className: V("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: V("value"), children: o }),
|
|
187
187
|
/* @__PURE__ */ r(
|
|
188
|
-
|
|
188
|
+
Ke,
|
|
189
189
|
{
|
|
190
190
|
...!s && u,
|
|
191
|
-
className:
|
|
192
|
-
icon: /* @__PURE__ */ r(
|
|
191
|
+
className: V({ "button-active": t }),
|
|
192
|
+
icon: /* @__PURE__ */ r(Xe, {}),
|
|
193
193
|
variant: "text",
|
|
194
|
-
children:
|
|
194
|
+
children: v()
|
|
195
195
|
}
|
|
196
196
|
)
|
|
197
197
|
]
|
|
@@ -200,94 +200,94 @@ const ot = "_disabled_1rpph_43", st = "_input_1rpph_107", nt = {
|
|
|
200
200
|
] }) : /* @__PURE__ */ r(
|
|
201
201
|
"li",
|
|
202
202
|
{
|
|
203
|
-
className:
|
|
203
|
+
className: V("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: V("label", "tag"), children: o })
|
|
210
210
|
}
|
|
211
211
|
);
|
|
212
|
-
},
|
|
213
|
-
container:
|
|
212
|
+
}, vt = "_container_12uzd_16", bt = {
|
|
213
|
+
container: vt,
|
|
214
214
|
"empty-list-message": "_empty-list-message_12uzd_20",
|
|
215
215
|
"limitation-item": "_limitation-item_12uzd_28"
|
|
216
|
-
},
|
|
216
|
+
}, fe = Q.bind(bt), yt = (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: h,
|
|
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: v,
|
|
226
|
+
newItemButtonText: g,
|
|
227
|
+
renderOption: p,
|
|
228
|
+
getUniqKey: z,
|
|
229
|
+
getItemProps: k,
|
|
230
|
+
parseValueToString: m,
|
|
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,
|
|
237
237
|
{
|
|
238
|
-
optionVariant:
|
|
239
|
-
...
|
|
240
|
-
isNew:
|
|
241
|
-
newItemButtonText:
|
|
242
|
-
children:
|
|
238
|
+
optionVariant: v,
|
|
239
|
+
...k({ item: _, index: N }),
|
|
240
|
+
isNew: R,
|
|
241
|
+
newItemButtonText: g,
|
|
242
|
+
children: m(_)
|
|
243
243
|
},
|
|
244
|
-
(
|
|
244
|
+
(z == null ? void 0 : z(_)) || m(_)
|
|
245
245
|
),
|
|
246
|
-
[
|
|
247
|
-
),
|
|
248
|
-
(
|
|
249
|
-
[
|
|
250
|
-
),
|
|
251
|
-
(
|
|
252
|
-
const
|
|
253
|
-
return /* @__PURE__ */ r("div", { className:
|
|
254
|
-
|
|
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,
|
|
255
255
|
{
|
|
256
|
-
optionVariant:
|
|
256
|
+
optionVariant: v,
|
|
257
257
|
isNew: !0,
|
|
258
|
-
newItemButtonText:
|
|
259
|
-
...
|
|
260
|
-
children:
|
|
258
|
+
newItemButtonText: g,
|
|
259
|
+
...k({ item: o, index: N }),
|
|
260
|
+
children: m(o)
|
|
261
261
|
},
|
|
262
|
-
|
|
262
|
+
m(o)
|
|
263
263
|
) });
|
|
264
264
|
},
|
|
265
|
-
[
|
|
266
|
-
),
|
|
267
|
-
(
|
|
268
|
-
/* @__PURE__ */ r(
|
|
269
|
-
!l &&
|
|
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(_)
|
|
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, c]
|
|
272
|
+
), a = Y(() => {
|
|
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
|
|
283
283
|
] }),
|
|
284
|
-
!l &&
|
|
284
|
+
!l && c(d)
|
|
285
285
|
] });
|
|
286
|
-
},
|
|
287
|
-
menu:
|
|
288
|
-
opened:
|
|
289
|
-
dark:
|
|
290
|
-
},
|
|
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(
|
|
291
291
|
({
|
|
292
292
|
isOpen: t = !1,
|
|
293
293
|
style: e = {},
|
|
@@ -295,115 +295,115 @@ const ot = "_disabled_1rpph_43", st = "_input_1rpph_107", nt = {
|
|
|
295
295
|
isDropdownMode: o,
|
|
296
296
|
inputValue: s = "",
|
|
297
297
|
className: l = "",
|
|
298
|
-
portalMenuAttribute:
|
|
298
|
+
portalMenuAttribute: h = null,
|
|
299
299
|
...u
|
|
300
|
-
},
|
|
300
|
+
}, v) => /* @__PURE__ */ r(
|
|
301
301
|
"ul",
|
|
302
302
|
{
|
|
303
|
-
ref:
|
|
304
|
-
className:
|
|
303
|
+
ref: v,
|
|
304
|
+
className: St(
|
|
305
305
|
"menu",
|
|
306
|
-
{ opened: t && (o ||
|
|
306
|
+
{ opened: t && (o || It(n, s)) },
|
|
307
307
|
l
|
|
308
308
|
),
|
|
309
309
|
style: e,
|
|
310
|
-
...
|
|
311
|
-
children: /* @__PURE__ */ r(
|
|
310
|
+
...h ? { [h]: "" } : {},
|
|
311
|
+
children: /* @__PURE__ */ r(yt, { inputValue: s, ...u })
|
|
312
312
|
}
|
|
313
313
|
)
|
|
314
|
-
),
|
|
314
|
+
), Le = (t, e) => typeof t == "string" ? t : e ? String(t[e(t)]) : "", _e = (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]) => _e(l, e[s]))));
|
|
317
|
+
}, kt = (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, Ct = ({
|
|
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: h = (p) => p,
|
|
328
328
|
getOptionUniqKey: u,
|
|
329
|
-
getOptionUniqKeyValue:
|
|
330
|
-
...
|
|
329
|
+
getOptionUniqKeyValue: v,
|
|
330
|
+
...g
|
|
331
331
|
}) => {
|
|
332
|
-
const [
|
|
333
|
-
const
|
|
334
|
-
...
|
|
332
|
+
const [p, z] = oe(s), k = (c, i) => {
|
|
333
|
+
const a = {
|
|
334
|
+
...p
|
|
335
335
|
};
|
|
336
|
-
|
|
337
|
-
if (t.find((
|
|
338
|
-
const
|
|
339
|
-
|
|
336
|
+
c.forEach((d) => {
|
|
337
|
+
if (t.find((y) => kt(y, d, u))) {
|
|
338
|
+
const y = Le(d, u);
|
|
339
|
+
a[y] = !0;
|
|
340
340
|
}
|
|
341
|
-
}),
|
|
342
|
-
},
|
|
343
|
-
const
|
|
344
|
-
if (
|
|
345
|
-
const
|
|
346
|
-
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);
|
|
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
|
+
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,
|
|
363
363
|
handleChange: e,
|
|
364
|
-
getOptionUniqKeyValue:
|
|
365
|
-
storedItemsMap:
|
|
366
|
-
...
|
|
364
|
+
getOptionUniqKeyValue: v,
|
|
365
|
+
storedItemsMap: p,
|
|
366
|
+
...c
|
|
367
367
|
});
|
|
368
368
|
return /* @__PURE__ */ r(
|
|
369
|
-
|
|
369
|
+
pe,
|
|
370
370
|
{
|
|
371
|
-
...
|
|
372
|
-
stateReducer: (
|
|
373
|
-
switch (
|
|
374
|
-
case
|
|
375
|
-
case
|
|
371
|
+
...g,
|
|
372
|
+
stateReducer: (c, i) => {
|
|
373
|
+
switch (i.type) {
|
|
374
|
+
case pe.stateChangeTypes.keyDownEnter:
|
|
375
|
+
case pe.stateChangeTypes.clickItem:
|
|
376
376
|
return {
|
|
377
|
-
...
|
|
378
|
-
highlightedIndex:
|
|
377
|
+
...i,
|
|
378
|
+
highlightedIndex: c.highlightedIndex,
|
|
379
379
|
inputValue: ""
|
|
380
380
|
};
|
|
381
381
|
default:
|
|
382
|
-
return
|
|
382
|
+
return i;
|
|
383
383
|
}
|
|
384
384
|
},
|
|
385
|
-
onChange:
|
|
385
|
+
onChange: x,
|
|
386
386
|
selectedItem: null,
|
|
387
|
-
children: (
|
|
387
|
+
children: (c) => l == null ? void 0 : l(A(c))
|
|
388
388
|
}
|
|
389
389
|
);
|
|
390
|
-
},
|
|
391
|
-
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,
|
|
392
392
|
"autocomplete-wrapper": "_autocomplete-wrapper_1so4a_28",
|
|
393
|
-
disabled:
|
|
394
|
-
error:
|
|
395
|
-
touched:
|
|
393
|
+
disabled: zt,
|
|
394
|
+
error: At,
|
|
395
|
+
touched: Rt,
|
|
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: Lt,
|
|
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
|
+
}, J = Q.bind(Pt), ao = (t) => {
|
|
407
407
|
const {
|
|
408
408
|
options: e = [],
|
|
409
409
|
loading: n = !1,
|
|
@@ -411,141 +411,143 @@ const ot = "_disabled_1rpph_43", st = "_input_1rpph_107", nt = {
|
|
|
411
411
|
},
|
|
412
412
|
value: s = [],
|
|
413
413
|
placeholder: l = "",
|
|
414
|
-
error:
|
|
414
|
+
error: h = "",
|
|
415
415
|
touched: u = !1,
|
|
416
|
-
creatable:
|
|
417
|
-
editable:
|
|
418
|
-
onChange:
|
|
416
|
+
creatable: v = !1,
|
|
417
|
+
editable: g = !1,
|
|
418
|
+
onChange: p = () => {
|
|
419
419
|
},
|
|
420
|
-
onFocus:
|
|
420
|
+
onFocus: z = () => {
|
|
421
421
|
},
|
|
422
|
-
onBlur:
|
|
422
|
+
onBlur: k = () => {
|
|
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: m = !1,
|
|
425
|
+
isDropdownMode: L = !1,
|
|
426
|
+
mobileDisabled: P = !1,
|
|
427
|
+
inputProps: b = {},
|
|
428
|
+
parseValueToString: x = (f) => f == null ? "" : String(f),
|
|
429
|
+
maxLength: A = null,
|
|
430
|
+
async: F = !1,
|
|
431
|
+
customClass: c = "",
|
|
432
|
+
createWithoutConfirmation: i = !1,
|
|
433
|
+
getItemValidationErrorType: a = null,
|
|
434
|
+
clearItemsError: d = () => {
|
|
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: y = () => !0,
|
|
437
|
+
highlightUnStoredItem: C = !1,
|
|
438
|
+
parseInputValueFn: _ = null,
|
|
439
|
+
handleUnStoredItemCb: N = null,
|
|
440
|
+
dataAutomationId: R = "",
|
|
441
|
+
existingItemsMap: ee = {},
|
|
442
|
+
customizeNewSelectedValue: $ = (f) => f,
|
|
443
|
+
renderCustomSelectedItem: B,
|
|
444
|
+
useFixedPositioning: j,
|
|
445
|
+
newItemButtonText: ve = "",
|
|
446
|
+
menuClassName: K = "",
|
|
447
447
|
selectedItemSingleLine: se,
|
|
448
448
|
selectedItemClassName: ne,
|
|
449
449
|
selectedItemTextClassName: re,
|
|
450
|
-
...
|
|
451
|
-
} = t, { refs: le, floatingStyles:
|
|
450
|
+
...be
|
|
451
|
+
} = t, { refs: le, floatingStyles: Z } = Be({
|
|
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: j ? "fixed" : "absolute",
|
|
454
|
+
whileElementsMounted: De
|
|
455
|
+
}), ye = s.length === 0 && !m ? l : "", te = Me(null);
|
|
456
|
+
we(() => {
|
|
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,
|
|
463
|
+
index: G,
|
|
464
|
+
isSelected: I.some((W) => _e(W, S)),
|
|
465
|
+
...H,
|
|
466
|
+
isActive: E === G
|
|
467
|
+
}), w = ({
|
|
468
|
+
event: f,
|
|
469
|
+
removeItem: E,
|
|
470
|
+
inputValue: I
|
|
471
471
|
}) => {
|
|
472
|
-
|
|
473
|
-
},
|
|
474
|
-
inputValue:
|
|
475
|
-
selectItem:
|
|
476
|
-
clearSelection:
|
|
472
|
+
f.key === "Backspace" && !I && s.length && E(s[s.length - 1], null);
|
|
473
|
+
}, T = ({
|
|
474
|
+
inputValue: f,
|
|
475
|
+
selectItem: E,
|
|
476
|
+
clearSelection: I
|
|
477
477
|
}) => {
|
|
478
|
-
if (
|
|
479
|
-
const
|
|
480
|
-
(
|
|
478
|
+
if (_) {
|
|
479
|
+
const S = _(f);
|
|
480
|
+
(S.length ? S : [f]).forEach((H) => E(H)), I();
|
|
481
481
|
} else
|
|
482
|
-
|
|
483
|
-
},
|
|
484
|
-
|
|
485
|
-
},
|
|
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)));
|
|
486
486
|
return /* @__PURE__ */ r(
|
|
487
|
-
|
|
487
|
+
Ct,
|
|
488
488
|
{
|
|
489
|
-
onChange:
|
|
490
|
-
itemToString:
|
|
489
|
+
onChange: ge,
|
|
490
|
+
itemToString: x,
|
|
491
491
|
selectedItems: s,
|
|
492
492
|
onStateChange: o,
|
|
493
493
|
options: e,
|
|
494
|
-
existingItemsMap:
|
|
495
|
-
handleUnStoredItemCb:
|
|
496
|
-
customizeNewSelectedValue:
|
|
494
|
+
existingItemsMap: ee,
|
|
495
|
+
handleUnStoredItemCb: N,
|
|
496
|
+
customizeNewSelectedValue: $,
|
|
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: f,
|
|
499
|
+
getItemProps: E,
|
|
500
|
+
isOpen: I,
|
|
501
|
+
inputValue: S = "",
|
|
502
|
+
highlightedIndex: G,
|
|
503
|
+
removeItem: H,
|
|
504
|
+
editItem: W,
|
|
505
|
+
openMenu: ce,
|
|
506
|
+
selectItem: ie,
|
|
507
|
+
clearSelection: ae,
|
|
508
|
+
toggleMenu: U,
|
|
509
|
+
storedItemsMap: Ne,
|
|
510
|
+
getRootProps: Ee
|
|
511
511
|
}) => {
|
|
512
|
-
const
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
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(
|
|
516
519
|
"div",
|
|
517
520
|
{
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
error: w,
|
|
521
|
+
className: J("autocomplete", c, {
|
|
522
|
+
"mobile-disabled": P,
|
|
523
|
+
error: h,
|
|
522
524
|
touched: u,
|
|
523
|
-
disabled:
|
|
525
|
+
disabled: m
|
|
524
526
|
}),
|
|
525
527
|
children: [
|
|
526
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ D(
|
|
527
529
|
"div",
|
|
528
530
|
{
|
|
529
|
-
className:
|
|
530
|
-
"mobile-disabled":
|
|
531
|
+
className: J("autocomplete-input", {
|
|
532
|
+
"mobile-disabled": P,
|
|
531
533
|
"single-line-mode": se
|
|
532
534
|
}),
|
|
533
535
|
children: [
|
|
534
536
|
/* @__PURE__ */ r(
|
|
535
|
-
|
|
537
|
+
lt,
|
|
536
538
|
{
|
|
537
539
|
items: s,
|
|
538
|
-
onRemoveItem:
|
|
539
|
-
disabled:
|
|
540
|
-
mobileDisabled:
|
|
541
|
-
parseValueToString:
|
|
542
|
-
getItemValidationErrorType:
|
|
543
|
-
renderCustomSelectedItem:
|
|
544
|
-
editItem:
|
|
545
|
-
editable:
|
|
546
|
-
getAdditionalCreationCondition:
|
|
547
|
-
storedItemsMap:
|
|
548
|
-
highlightUnStoredItem:
|
|
540
|
+
onRemoveItem: q(H),
|
|
541
|
+
disabled: m,
|
|
542
|
+
mobileDisabled: P,
|
|
543
|
+
parseValueToString: x,
|
|
544
|
+
getItemValidationErrorType: a,
|
|
545
|
+
renderCustomSelectedItem: B,
|
|
546
|
+
editItem: W,
|
|
547
|
+
editable: g,
|
|
548
|
+
getAdditionalCreationCondition: y,
|
|
549
|
+
storedItemsMap: Ne,
|
|
550
|
+
highlightUnStoredItem: C,
|
|
549
551
|
selectedItemSingleLine: se,
|
|
550
552
|
selectedItemClassName: ne,
|
|
551
553
|
selectedItemTextClassName: re
|
|
@@ -554,91 +556,91 @@ const ot = "_disabled_1rpph_43", st = "_input_1rpph_107", nt = {
|
|
|
554
556
|
/* @__PURE__ */ r(
|
|
555
557
|
"input",
|
|
556
558
|
{
|
|
557
|
-
...
|
|
558
|
-
ref:
|
|
559
|
-
placeholder:
|
|
560
|
-
maxLength:
|
|
559
|
+
...f({
|
|
560
|
+
ref: te,
|
|
561
|
+
placeholder: ye,
|
|
562
|
+
maxLength: A,
|
|
561
563
|
onFocus: () => {
|
|
562
|
-
|
|
564
|
+
L && ce(), z();
|
|
563
565
|
},
|
|
564
|
-
onKeyDown: (
|
|
565
|
-
|
|
566
|
-
inputValue:
|
|
567
|
-
selectItem:
|
|
568
|
-
clearSelection:
|
|
569
|
-
}),
|
|
566
|
+
onKeyDown: (M) => {
|
|
567
|
+
M.key === Oe && S && v && y(S) && T({
|
|
568
|
+
inputValue: S,
|
|
569
|
+
selectItem: ie,
|
|
570
|
+
clearSelection: ae
|
|
571
|
+
}), w({ event: M, removeItem: H, inputValue: S });
|
|
570
572
|
},
|
|
571
573
|
onBlur: () => {
|
|
572
|
-
|
|
573
|
-
inputValue:
|
|
574
|
-
selectItem:
|
|
575
|
-
clearSelection:
|
|
574
|
+
k(), S && v && y(S) && T({
|
|
575
|
+
inputValue: S,
|
|
576
|
+
selectItem: ie,
|
|
577
|
+
clearSelection: ae
|
|
576
578
|
});
|
|
577
579
|
},
|
|
578
|
-
disabled:
|
|
579
|
-
...
|
|
580
|
+
disabled: m,
|
|
581
|
+
...b
|
|
580
582
|
}),
|
|
581
|
-
className:
|
|
582
|
-
"data-automation-id":
|
|
583
|
+
className: J("input", { disabled: m }, b.className),
|
|
584
|
+
"data-automation-id": R
|
|
583
585
|
}
|
|
584
586
|
)
|
|
585
587
|
]
|
|
586
588
|
}
|
|
587
589
|
),
|
|
588
|
-
(
|
|
590
|
+
(b == null ? void 0 : b.clearable) && !ze(s) && /* @__PURE__ */ r(
|
|
589
591
|
"button",
|
|
590
592
|
{
|
|
591
593
|
type: "button",
|
|
592
|
-
className:
|
|
594
|
+
className: J("clear-icon", { "clear-icon--disabled": m }),
|
|
593
595
|
onClick: () => {
|
|
594
|
-
var
|
|
595
|
-
return !
|
|
596
|
+
var M;
|
|
597
|
+
return !m && ((M = b == null ? void 0 : b.onClear) == null ? void 0 : M.call(b));
|
|
596
598
|
},
|
|
597
|
-
onMouseDown: (
|
|
598
|
-
children: /* @__PURE__ */ r(
|
|
599
|
+
onMouseDown: (M) => M.preventDefault(),
|
|
600
|
+
children: /* @__PURE__ */ r(et, {})
|
|
599
601
|
}
|
|
600
602
|
),
|
|
601
|
-
|
|
603
|
+
L && /* @__PURE__ */ r(
|
|
602
604
|
"button",
|
|
603
605
|
{
|
|
604
606
|
type: "button",
|
|
605
|
-
className:
|
|
606
|
-
onClick: () =>
|
|
607
|
+
className: J("dropdown-button", { "icon-reversed": I }),
|
|
608
|
+
onClick: () => U(),
|
|
607
609
|
"aria-label": "Toggle dropdown",
|
|
608
|
-
"aria-expanded":
|
|
609
|
-
children: /* @__PURE__ */ r(
|
|
610
|
+
"aria-expanded": I,
|
|
611
|
+
children: /* @__PURE__ */ r(Fe, {})
|
|
610
612
|
}
|
|
611
613
|
)
|
|
612
614
|
]
|
|
613
615
|
}
|
|
614
616
|
),
|
|
615
|
-
|
|
617
|
+
h && u && /* @__PURE__ */ r("span", { className: J("error-text"), children: h })
|
|
616
618
|
] }),
|
|
617
619
|
/* @__PURE__ */ r(
|
|
618
|
-
|
|
620
|
+
$e,
|
|
619
621
|
{
|
|
620
|
-
isOpen:
|
|
622
|
+
isOpen: I,
|
|
621
623
|
loading: n,
|
|
622
|
-
async:
|
|
624
|
+
async: F,
|
|
623
625
|
ref: le.setFloating,
|
|
624
|
-
newItemButtonText:
|
|
625
|
-
isDropdownMode:
|
|
626
|
-
style:
|
|
627
|
-
inputValue:
|
|
628
|
-
getItemProps:
|
|
629
|
-
parseValueToString:
|
|
630
|
-
createWithoutConfirmation:
|
|
631
|
-
options:
|
|
632
|
-
className:
|
|
633
|
-
...
|
|
626
|
+
newItemButtonText: ve,
|
|
627
|
+
isDropdownMode: L,
|
|
628
|
+
style: Z,
|
|
629
|
+
inputValue: Ie.trim(),
|
|
630
|
+
getItemProps: xe(E, G, s),
|
|
631
|
+
parseValueToString: x,
|
|
632
|
+
createWithoutConfirmation: i,
|
|
633
|
+
options: X,
|
|
634
|
+
className: K,
|
|
635
|
+
...be
|
|
634
636
|
}
|
|
635
637
|
)
|
|
636
638
|
] });
|
|
637
639
|
}
|
|
638
640
|
}
|
|
639
641
|
);
|
|
640
|
-
},
|
|
641
|
-
|
|
642
|
+
}, Bt = ({ skip: t }) => {
|
|
643
|
+
je(() => {
|
|
642
644
|
if (t)
|
|
643
645
|
return;
|
|
644
646
|
let e = window.scrollY, n = !0;
|
|
@@ -652,15 +654,15 @@ const ot = "_disabled_1rpph_43", st = "_input_1rpph_107", nt = {
|
|
|
652
654
|
e = window.scrollY, window.addEventListener("scroll", l, { passive: !1, capture: !0 }), requestAnimationFrame(() => {
|
|
653
655
|
e = window.scrollY, s();
|
|
654
656
|
});
|
|
655
|
-
const
|
|
657
|
+
const h = setTimeout(() => {
|
|
656
658
|
n = !1;
|
|
657
659
|
}, o);
|
|
658
660
|
return () => {
|
|
659
|
-
clearTimeout(
|
|
661
|
+
clearTimeout(h), window.removeEventListener("scroll", l, { capture: !0 });
|
|
660
662
|
};
|
|
661
663
|
}, [t]);
|
|
662
|
-
},
|
|
663
|
-
|
|
664
|
+
}, Dt = ({ skip: t, reference: e }) => {
|
|
665
|
+
we(() => {
|
|
664
666
|
if (t)
|
|
665
667
|
return;
|
|
666
668
|
const n = () => {
|
|
@@ -671,8 +673,8 @@ const ot = "_disabled_1rpph_43", st = "_input_1rpph_107", nt = {
|
|
|
671
673
|
window.removeEventListener("resize", n);
|
|
672
674
|
};
|
|
673
675
|
}, [t, e]);
|
|
674
|
-
},
|
|
675
|
-
|
|
676
|
+
}, Ft = ({ skip: t, onClose: e, menuRef: n }) => {
|
|
677
|
+
we(() => {
|
|
676
678
|
if (t)
|
|
677
679
|
return;
|
|
678
680
|
const o = (s) => {
|
|
@@ -683,21 +685,21 @@ const ot = "_disabled_1rpph_43", st = "_input_1rpph_107", nt = {
|
|
|
683
685
|
window.removeEventListener("scroll", o, !0);
|
|
684
686
|
};
|
|
685
687
|
}, [t, e, n]);
|
|
686
|
-
},
|
|
688
|
+
}, Ot = {
|
|
687
689
|
"input-wrapper": "_input-wrapper_d9vma_1",
|
|
688
690
|
"dropdown-button": "_dropdown-button_d9vma_6",
|
|
689
691
|
"icon-reversed": "_icon-reversed_d9vma_14"
|
|
690
|
-
},
|
|
692
|
+
}, Pe = Q.bind(Ot), $t = 0, Tt = Je({
|
|
691
693
|
fallbackPlacements: ["bottom-start", "top-start", "bottom", "top"],
|
|
692
694
|
boundary: document == null ? void 0 : document.documentElement,
|
|
693
695
|
rootBoundary: "viewport"
|
|
694
|
-
}),
|
|
696
|
+
}), jt = Qe({
|
|
695
697
|
apply({ rects: t, elements: e }) {
|
|
696
698
|
Object.assign(e.floating.style, {
|
|
697
699
|
width: `${t.reference.width}px`
|
|
698
700
|
});
|
|
699
701
|
}
|
|
700
|
-
}),
|
|
702
|
+
}), uo = (t) => {
|
|
701
703
|
const {
|
|
702
704
|
options: e = [],
|
|
703
705
|
value: n,
|
|
@@ -706,184 +708,174 @@ const ot = "_disabled_1rpph_43", st = "_input_1rpph_107", nt = {
|
|
|
706
708
|
},
|
|
707
709
|
onFocus: l = () => {
|
|
708
710
|
},
|
|
709
|
-
onBlur:
|
|
711
|
+
onBlur: h = () => {
|
|
710
712
|
},
|
|
711
713
|
disabled: u = !1,
|
|
712
|
-
inputProps:
|
|
713
|
-
parseValueToString:
|
|
714
|
-
minLength:
|
|
715
|
-
skipOptionCreation:
|
|
716
|
-
maxLength:
|
|
717
|
-
optionVariant:
|
|
718
|
-
isRequired:
|
|
719
|
-
error:
|
|
720
|
-
touched:
|
|
721
|
-
setTouch:
|
|
714
|
+
inputProps: v = {},
|
|
715
|
+
parseValueToString: g = (w) => w === null ? "" : String(w),
|
|
716
|
+
minLength: p = 1,
|
|
717
|
+
skipOptionCreation: z = !1,
|
|
718
|
+
maxLength: k = null,
|
|
719
|
+
optionVariant: m = "",
|
|
720
|
+
isRequired: L = !1,
|
|
721
|
+
error: P = "",
|
|
722
|
+
touched: b = !1,
|
|
723
|
+
setTouch: x = () => {
|
|
722
724
|
},
|
|
723
|
-
createWithoutConfirmation:
|
|
724
|
-
menuClassName:
|
|
725
|
-
icon:
|
|
726
|
-
isDropdownMode:
|
|
727
|
-
isOptionUnique:
|
|
728
|
-
refFunction:
|
|
729
|
-
stateReducer:
|
|
730
|
-
onStateChange:
|
|
731
|
-
useFixedPositioning:
|
|
732
|
-
dropdownMatchInputWidth:
|
|
733
|
-
withMenuFlip:
|
|
734
|
-
newItemButtonText:
|
|
735
|
-
menuPortalRoot:
|
|
736
|
-
...
|
|
737
|
-
} = t, [
|
|
738
|
-
var
|
|
739
|
-
return (
|
|
740
|
-
}, []), ne =
|
|
725
|
+
createWithoutConfirmation: A = !1,
|
|
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,
|
|
736
|
+
newItemButtonText: ee = "",
|
|
737
|
+
menuPortalRoot: $,
|
|
738
|
+
...B
|
|
739
|
+
} = t, [j, ve] = oe(!1), K = Me(null), se = Y(() => {
|
|
740
|
+
var w;
|
|
741
|
+
return (w = K.current) == null ? void 0 : w.call(K);
|
|
742
|
+
}, []), ne = !j || !$, re = $ || _ ? "fixed" : "absolute", be = !j || re === "absolute", le = He(
|
|
741
743
|
() => [
|
|
742
|
-
...
|
|
743
|
-
...
|
|
744
|
+
...R ? [Tt] : [],
|
|
745
|
+
...N ? [jt] : []
|
|
744
746
|
],
|
|
745
|
-
[
|
|
746
|
-
), { refs:
|
|
747
|
+
[R, N]
|
|
748
|
+
), { refs: Z, floatingStyles: ye } = Be({
|
|
747
749
|
placement: "bottom-start",
|
|
748
|
-
whileElementsMounted:
|
|
750
|
+
whileElementsMounted: De,
|
|
749
751
|
strategy: re,
|
|
750
752
|
middleware: le
|
|
751
|
-
})
|
|
752
|
-
|
|
753
|
-
|
|
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,
|
|
753
|
+
});
|
|
754
|
+
Bt({ skip: ne }), Dt({ skip: ne, reference: Z.reference }), Ft({
|
|
755
|
+
skip: be,
|
|
765
756
|
onClose: se,
|
|
766
|
-
menuRef:
|
|
757
|
+
menuRef: Z.floating
|
|
767
758
|
});
|
|
768
|
-
const
|
|
769
|
-
item:
|
|
770
|
-
index:
|
|
771
|
-
isSelected:
|
|
772
|
-
...
|
|
773
|
-
isActive: T ===
|
|
774
|
-
}),
|
|
775
|
-
|
|
776
|
-
},
|
|
777
|
-
(
|
|
778
|
-
(
|
|
759
|
+
const te = (w, T, q) => ({ item: X, index: f, ...E }) => w({
|
|
760
|
+
item: X,
|
|
761
|
+
index: f,
|
|
762
|
+
isSelected: q !== null && q === X,
|
|
763
|
+
...E,
|
|
764
|
+
isActive: T === f
|
|
765
|
+
}), ge = (w, T) => {
|
|
766
|
+
w.key === Ue && (w.preventDefault(), T(e.length));
|
|
767
|
+
}, xe = Y(
|
|
768
|
+
(w, ...T) => {
|
|
769
|
+
(w == null ? void 0 : w.isOpen) !== void 0 && ve(w.isOpen), C == null || C(w, ...T);
|
|
779
770
|
},
|
|
780
|
-
[
|
|
771
|
+
[C]
|
|
781
772
|
);
|
|
782
773
|
return /* @__PURE__ */ r(
|
|
783
|
-
|
|
774
|
+
pe,
|
|
784
775
|
{
|
|
785
776
|
onChange: s,
|
|
786
|
-
itemToString:
|
|
777
|
+
itemToString: g,
|
|
787
778
|
selectedItem: n,
|
|
788
|
-
onStateChange:
|
|
789
|
-
defaultHighlightedIndex:
|
|
790
|
-
stateReducer:
|
|
779
|
+
onStateChange: xe,
|
|
780
|
+
defaultHighlightedIndex: $t,
|
|
781
|
+
stateReducer: y,
|
|
791
782
|
children: ({
|
|
792
|
-
getInputProps:
|
|
783
|
+
getInputProps: w,
|
|
793
784
|
getItemProps: T,
|
|
794
|
-
setHighlightedIndex:
|
|
795
|
-
toggleMenu:
|
|
796
|
-
openMenu:
|
|
797
|
-
closeMenu:
|
|
798
|
-
isOpen:
|
|
799
|
-
inputValue:
|
|
800
|
-
highlightedIndex:
|
|
801
|
-
getRootProps:
|
|
802
|
-
selectItem:
|
|
785
|
+
setHighlightedIndex: q,
|
|
786
|
+
toggleMenu: X,
|
|
787
|
+
openMenu: f,
|
|
788
|
+
closeMenu: E,
|
|
789
|
+
isOpen: I,
|
|
790
|
+
inputValue: S,
|
|
791
|
+
highlightedIndex: G,
|
|
792
|
+
getRootProps: H,
|
|
793
|
+
selectItem: W
|
|
803
794
|
}) => {
|
|
804
|
-
const ce = {
|
|
805
|
-
...
|
|
795
|
+
const ce = H(void 0, { suppressRefError: !0 }), ie = {
|
|
796
|
+
...ce,
|
|
797
|
+
ref: (O) => (Z.setReference(O), ce.ref(O))
|
|
806
798
|
};
|
|
807
|
-
|
|
808
|
-
const
|
|
809
|
-
|
|
810
|
-
},
|
|
811
|
-
|
|
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(
|
|
803
|
+
$e,
|
|
812
804
|
{
|
|
813
|
-
isOpen:
|
|
814
|
-
isDropdownMode:
|
|
815
|
-
style:
|
|
816
|
-
ref:
|
|
817
|
-
portalMenuAttribute:
|
|
818
|
-
minLength:
|
|
819
|
-
inputValue: (
|
|
820
|
-
getItemProps:
|
|
821
|
-
parseValueToString:
|
|
822
|
-
optionVariant:
|
|
823
|
-
createWithoutConfirmation:
|
|
824
|
-
className:
|
|
805
|
+
isOpen: I,
|
|
806
|
+
isDropdownMode: i,
|
|
807
|
+
style: ye,
|
|
808
|
+
ref: Z.setFloating,
|
|
809
|
+
portalMenuAttribute: $ ? qe : null,
|
|
810
|
+
minLength: p,
|
|
811
|
+
inputValue: (S || "").trim(),
|
|
812
|
+
getItemProps: te(T, G, n),
|
|
813
|
+
parseValueToString: g,
|
|
814
|
+
optionVariant: m,
|
|
815
|
+
createWithoutConfirmation: A,
|
|
816
|
+
className: F,
|
|
825
817
|
options: e,
|
|
826
|
-
newItemButtonText:
|
|
827
|
-
...
|
|
818
|
+
newItemButtonText: ee,
|
|
819
|
+
...B
|
|
828
820
|
}
|
|
829
821
|
);
|
|
830
|
-
return /* @__PURE__ */
|
|
831
|
-
/* @__PURE__ */
|
|
822
|
+
return /* @__PURE__ */ D(he, { children: [
|
|
823
|
+
/* @__PURE__ */ D("div", { className: Pe("input-wrapper"), ...ie, children: [
|
|
832
824
|
/* @__PURE__ */ r(
|
|
833
|
-
|
|
825
|
+
Ze,
|
|
834
826
|
{
|
|
835
|
-
...
|
|
827
|
+
...w({
|
|
836
828
|
placeholder: u ? "" : o,
|
|
837
|
-
maxLength:
|
|
829
|
+
maxLength: k || void 0,
|
|
838
830
|
onFocus: () => {
|
|
839
|
-
|
|
831
|
+
i && !I && (f(), x == null || x(!0)), l();
|
|
840
832
|
},
|
|
841
|
-
ref:
|
|
842
|
-
onKeyDown: (
|
|
843
|
-
|
|
833
|
+
ref: d,
|
|
834
|
+
onKeyDown: (O) => {
|
|
835
|
+
O.key === Oe && O.preventDefault(), S && I && ge(O, q);
|
|
844
836
|
},
|
|
845
|
-
onBlur: (
|
|
846
|
-
const
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
),
|
|
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);
|
|
850
842
|
},
|
|
851
843
|
disabled: u,
|
|
852
844
|
defaultWidth: !1,
|
|
853
|
-
isRequired:
|
|
854
|
-
touched:
|
|
855
|
-
error:
|
|
845
|
+
isRequired: L,
|
|
846
|
+
touched: b,
|
|
847
|
+
error: P,
|
|
856
848
|
...Ee,
|
|
857
|
-
clearable:
|
|
858
|
-
onClear:
|
|
859
|
-
endIcon:
|
|
849
|
+
clearable: de,
|
|
850
|
+
onClear: de ? Ie : U,
|
|
851
|
+
endIcon: i && !c ? /* @__PURE__ */ r(
|
|
860
852
|
"button",
|
|
861
853
|
{
|
|
862
854
|
type: "button",
|
|
863
|
-
className:
|
|
864
|
-
onClick: () =>
|
|
855
|
+
className: Pe("dropdown-button", { "icon-reversed": I }),
|
|
856
|
+
onClick: () => X(),
|
|
865
857
|
"aria-label": "Toggle dropdown",
|
|
866
|
-
"aria-expanded":
|
|
867
|
-
children: /* @__PURE__ */ r(
|
|
858
|
+
"aria-expanded": I,
|
|
859
|
+
children: /* @__PURE__ */ r(Fe, {})
|
|
868
860
|
}
|
|
869
|
-
) :
|
|
870
|
-
minLength:
|
|
861
|
+
) : c,
|
|
862
|
+
minLength: i ? 0 : p
|
|
871
863
|
})
|
|
872
864
|
}
|
|
873
865
|
),
|
|
874
|
-
|
|
866
|
+
!$ && M
|
|
875
867
|
] }),
|
|
876
|
-
|
|
868
|
+
$ && Ge(M, $)
|
|
877
869
|
] });
|
|
878
870
|
}
|
|
879
871
|
}
|
|
880
872
|
);
|
|
881
873
|
};
|
|
882
874
|
export {
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
875
|
+
$e as AutocompleteMenu,
|
|
876
|
+
Re as AutocompleteOption,
|
|
877
|
+
yt as AutocompleteOptions,
|
|
878
|
+
dt as AutocompletePrompt,
|
|
879
|
+
ao as MultipleAutocomplete,
|
|
880
|
+
uo as SingleAutocomplete
|
|
889
881
|
};
|