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