@tsed/react-formio 3.0.0-alpha.11 → 3.0.0-alpha.13
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/all.d.ts +0 -0
- package/dist/all.js +38 -0
- package/dist/all.js.map +1 -0
- package/dist/atoms/icon/Icon.js.map +1 -1
- package/dist/chunks/_commonjsHelpers.js +30 -3
- package/dist/chunks/_commonjsHelpers.js.map +1 -1
- package/dist/chunks/index.js +33 -30
- package/dist/chunks/index.js.map +1 -1
- package/dist/chunks/index.module.js +16 -16
- package/dist/chunks/index.module.js.map +1 -1
- package/dist/chunks/index2.js +56953 -0
- package/dist/chunks/index2.js.map +1 -0
- package/dist/chunks/react-select-animated.esm.js +1204 -1101
- package/dist/chunks/react-select-animated.esm.js.map +1 -1
- package/dist/contexts/FormioContext.d.ts +20 -0
- package/dist/contexts/FormioContext.js +40 -0
- package/dist/contexts/FormioContext.js.map +1 -0
- package/dist/hooks/keyboard.constants.js.map +1 -1
- package/dist/hooks/useFormioContext.d.ts +10 -0
- package/dist/hooks/useFormioContext.js +12 -0
- package/dist/hooks/useFormioContext.js.map +1 -0
- package/dist/hooks/useI18n.d.ts +4 -0
- package/dist/hooks/useI18n.js +9 -0
- package/dist/hooks/useI18n.js.map +1 -0
- package/dist/hooks/useKeyboardControls.js.map +1 -1
- package/dist/hooks/useTooltip.js.map +1 -1
- package/dist/index.d.ts +1 -6
- package/dist/index.js +18 -13
- package/dist/index.js.map +1 -1
- package/dist/interfaces/ComponentType.d.ts +6 -2
- package/dist/interfaces/FormBuilderOptions.d.ts +7 -0
- package/dist/interfaces/FormBuilderOptions.js +2 -0
- package/dist/interfaces/FormBuilderOptions.js.map +1 -0
- package/dist/interfaces/FormOptions.d.ts +6 -13
- package/dist/interfaces/FormType.d.ts +4 -11
- package/dist/interfaces/SubmissionType.d.ts +5 -10
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/molecules/alert/Alert.js.map +1 -1
- package/dist/molecules/button/Button.js +17 -20
- package/dist/molecules/button/Button.js.map +1 -1
- package/dist/molecules/card/Card.js.map +1 -1
- package/dist/molecules/forms/form-control/FormControl.js.map +1 -1
- package/dist/molecules/forms/input-tags/InputTags.js.map +1 -1
- package/dist/molecules/forms/input-tags/components/ChoicesTags.d.ts +19 -19
- package/dist/molecules/forms/input-tags/components/ChoicesTags.js +32 -32
- package/dist/molecules/forms/input-tags/components/ChoicesTags.js.map +1 -1
- package/dist/molecules/forms/input-tags/components/ReactTags.js +289 -300
- package/dist/molecules/forms/input-tags/components/ReactTags.js.map +1 -1
- package/dist/molecules/forms/input-text/InputText.js +3 -3
- package/dist/molecules/forms/input-text/InputText.js.map +1 -1
- package/dist/molecules/forms/select/Select.js.map +1 -1
- package/dist/molecules/forms/select/components/ChoicesSelect.js +71 -73
- package/dist/molecules/forms/select/components/ChoicesSelect.js.map +1 -1
- package/dist/molecules/forms/select/components/HtmlSelect.js.map +1 -1
- package/dist/molecules/forms/select/components/ReactSelect.js +13 -14
- package/dist/molecules/forms/select/components/ReactSelect.js.map +1 -1
- package/dist/molecules/forms/select/components/choices.template.js +2340 -2257
- package/dist/molecules/forms/select/components/choices.template.js.map +1 -1
- package/dist/molecules/forms/select/hooks/useOptions.js.map +1 -1
- package/dist/molecules/loader/Loader.js.map +1 -1
- package/dist/molecules/modal/Modal.js +23 -24
- package/dist/molecules/modal/Modal.js.map +1 -1
- package/dist/molecules/pagination/Pagination.d.ts +2 -1
- package/dist/molecules/pagination/Pagination.js +29 -29
- package/dist/molecules/pagination/Pagination.js.map +1 -1
- package/dist/molecules/pagination/PaginationButton.js.map +1 -1
- package/dist/molecules/pagination/utils/getPageNumbers.js.map +1 -1
- package/dist/molecules/table/Table.js +35 -41
- package/dist/molecules/table/Table.js.map +1 -1
- package/dist/molecules/table/components/DefaultArrowSort.js.map +1 -1
- package/dist/molecules/table/components/DefaultCell.js.map +1 -1
- package/dist/molecules/table/components/DefaultCellFooter.js.map +1 -1
- package/dist/molecules/table/components/DefaultCellHeader.js.map +1 -1
- package/dist/molecules/table/components/DefaultCellOperations.js +10 -10
- package/dist/molecules/table/components/DefaultCellOperations.js.map +1 -1
- package/dist/molecules/table/components/DefaultFilter.js.map +1 -1
- package/dist/molecules/table/components/DefaultOperationButton.js +1 -1
- package/dist/molecules/table/components/DefaultOperationButton.js.map +1 -1
- package/dist/molecules/table/filters/RangeFilter.js +23 -24
- package/dist/molecules/table/filters/RangeFilter.js.map +1 -1
- package/dist/molecules/table/filters/SelectFilter.js +11 -13
- package/dist/molecules/table/filters/SelectFilter.js.map +1 -1
- package/dist/molecules/table/filters/TextFieldFilter.js.map +1 -1
- package/dist/molecules/table/hooks/useTable.d.ts +3 -3
- package/dist/molecules/table/hooks/useTable.js +17 -16
- package/dist/molecules/table/hooks/useTable.js.map +1 -1
- package/dist/molecules/table/hooks/useUniqValues.js.map +1 -1
- package/dist/molecules/table/utils/mapFormToColumns.js +21 -22
- package/dist/molecules/table/utils/mapFormToColumns.js.map +1 -1
- package/dist/molecules/tabs/Tab.js +36 -37
- package/dist/molecules/tabs/Tab.js.map +1 -1
- package/dist/molecules/tabs/TabList.js +9 -10
- package/dist/molecules/tabs/TabList.js.map +1 -1
- package/dist/molecules/tabs/TabPanel.js.map +1 -1
- package/dist/molecules/tabs/Tabs.js.map +1 -1
- package/dist/molecules/tabs/TabsBody.js.map +1 -1
- package/dist/molecules/tabs/TabsLegacy.d.ts +3 -2
- package/dist/molecules/tabs/TabsLegacy.js +30 -30
- package/dist/molecules/tabs/TabsLegacy.js.map +1 -1
- package/dist/molecules/tabs/context/TabControl.js.map +1 -1
- package/dist/molecules/tabs/hooks/tabControl.js.map +1 -1
- package/dist/organisms/form/Form.js.map +1 -1
- package/dist/organisms/form/access/FormAccess.js +41 -41
- package/dist/organisms/form/access/FormAccess.js.map +1 -1
- package/dist/organisms/form/access/FormAccess.schema.js +1 -0
- package/dist/organisms/form/access/FormAccess.schema.js.map +1 -1
- package/dist/organisms/form/access/FormAccess.utils.js +2 -2
- package/dist/organisms/form/access/FormAccess.utils.js.map +1 -1
- package/dist/organisms/form/actions/FormAction.js +15 -13
- package/dist/organisms/form/actions/FormAction.js.map +1 -1
- package/dist/organisms/form/builder/FormBuilder.js.map +1 -1
- package/dist/organisms/form/builder/FormEdit.d.ts +4 -3
- package/dist/organisms/form/builder/FormEdit.js +36 -36
- package/dist/organisms/form/builder/FormEdit.js.map +1 -1
- package/dist/organisms/form/builder/FormEdit.reducer.js.map +1 -1
- package/dist/organisms/form/builder/FormEditCtas.d.ts +2 -2
- package/dist/organisms/form/builder/FormEditCtas.js +36 -35
- package/dist/organisms/form/builder/FormEditCtas.js.map +1 -1
- package/dist/organisms/form/builder/FormParameters.js.map +1 -1
- package/dist/organisms/form/builder/useFormBuilder.d.ts +4 -4
- package/dist/organisms/form/builder/useFormBuilder.js +36 -33
- package/dist/organisms/form/builder/useFormBuilder.js.map +1 -1
- package/dist/organisms/form/builder/useFormEdit.d.ts +1 -1
- package/dist/organisms/form/builder/useFormEdit.js +17 -17
- package/dist/organisms/form/builder/useFormEdit.js.map +1 -1
- package/dist/organisms/form/exports/FormExport.d.ts +3 -2
- package/dist/organisms/form/exports/FormExport.js +23 -22
- package/dist/organisms/form/exports/FormExport.js.map +1 -1
- package/dist/organisms/form/preview/FormPreview.d.ts +3 -3
- package/dist/organisms/form/preview/FormPreview.js +5 -4
- package/dist/organisms/form/preview/FormPreview.js.map +1 -1
- package/dist/organisms/form/settings/FormSettings.js +28 -28
- package/dist/organisms/form/settings/FormSettings.js.map +1 -1
- package/dist/organisms/form/settings/FormSettings.schema.js.map +1 -1
- package/dist/organisms/form/settings/FormSettings.utils.js.map +1 -1
- package/dist/organisms/form/useForm.d.ts +2 -1
- package/dist/organisms/form/useForm.js +664 -661
- package/dist/organisms/form/useForm.js.map +1 -1
- package/dist/organisms/modal/RemoveModal.js +16 -17
- package/dist/organisms/modal/RemoveModal.js.map +1 -1
- package/dist/organisms/table/actions/ActionsTable.d.ts +2 -1
- package/dist/organisms/table/actions/ActionsTable.js +10 -9
- package/dist/organisms/table/actions/ActionsTable.js.map +1 -1
- package/dist/organisms/table/forms/FormsTable.d.ts +1 -1
- package/dist/organisms/table/forms/FormsTable.js +9 -8
- package/dist/organisms/table/forms/FormsTable.js.map +1 -1
- package/dist/organisms/table/forms/components/FormsCell.js +10 -10
- package/dist/organisms/table/forms/components/FormsCell.js.map +1 -1
- package/dist/organisms/table/submissions/SubmissionsTable.js.map +1 -1
- package/dist/organisms/views/FormViews.d.ts +3 -3
- package/dist/organisms/views/FormViews.js +47 -46
- package/dist/organisms/views/FormViews.js.map +1 -1
- package/dist/registries/components.js.map +1 -1
- package/dist/utils/getEventValue.js.map +1 -1
- package/dist/utils/iconClass.js +4 -5
- package/dist/utils/iconClass.js.map +1 -1
- package/dist/utils/mapPagination.js.map +1 -1
- package/dist/utils/stopPropagationWrapper.js.map +1 -1
- package/package.json +7 -7
- package/src/all.ts +34 -0
- package/src/atoms/icon/Icon.stories.tsx +1 -1
- package/src/contexts/FormioContext.tsx +96 -0
- package/src/hooks/useFormioContext.ts +13 -0
- package/src/hooks/useI18n.ts +9 -0
- package/src/index.ts +17 -13
- package/src/interfaces/ComponentType.ts +2 -2
- package/src/interfaces/FormBuilderOptions.ts +9 -0
- package/src/interfaces/FormOptions.ts +7 -13
- package/src/interfaces/FormType.ts +5 -11
- package/src/interfaces/SubmissionType.ts +9 -8
- package/src/interfaces/index.ts +1 -0
- package/src/molecules/button/Button.stories.tsx +1 -1
- package/src/molecules/forms/form-control/FormControl.spec.tsx +5 -2
- package/src/molecules/forms/form-control/FormControl.stories.tsx +1 -1
- package/src/molecules/forms/input-tags/components/ChoicesTags.stories.tsx +1 -1
- package/src/molecules/forms/input-tags/components/ChoicesTags.tsx +4 -4
- package/src/molecules/forms/input-tags/components/ReactTags.stories.tsx +1 -1
- package/src/molecules/forms/input-text/InputText.stories.tsx +2 -2
- package/src/molecules/forms/select/components/ChoicesSelect.stories.tsx +2 -2
- package/src/molecules/forms/select/components/ChoicesSelect.tsx +2 -2
- package/src/molecules/forms/select/components/HtmlSelect.stories.tsx +2 -2
- package/src/molecules/forms/select/components/ReactSelect.stories.tsx +2 -2
- package/src/molecules/loader/Loader.stories.tsx +1 -1
- package/src/molecules/modal/Modal.stories.tsx +1 -1
- package/src/molecules/pagination/Pagination.stories.tsx +1 -1
- package/src/molecules/pagination/Pagination.tsx +10 -10
- package/src/molecules/table/Table.stories.tsx +8 -8
- package/src/molecules/table/Table.tsx +1 -1
- package/src/molecules/table/filters/SelectFilter.tsx +1 -1
- package/src/molecules/table/hooks/useTable.tsx +7 -6
- package/src/molecules/table/utils/mapFormToColumns.tsx +6 -5
- package/src/molecules/tabs/Tabs.stories.tsx +2 -2
- package/src/molecules/tabs/TabsLegacy.stories.tsx +2 -2
- package/src/molecules/tabs/TabsLegacy.tsx +5 -3
- package/src/organisms/form/Form.stories.tsx +98 -118
- package/src/organisms/form/access/FormAccess.schema.ts +1 -0
- package/src/organisms/form/access/FormAccess.stories.tsx +5 -3
- package/src/organisms/form/actions/FormAction.stories.tsx +6 -2
- package/src/organisms/form/actions/FormAction.tsx +2 -2
- package/src/organisms/form/builder/FormBuilder.stories.tsx +4 -1
- package/src/organisms/form/builder/FormEdit.stories.tsx +11 -7
- package/src/organisms/form/builder/FormEdit.tsx +6 -6
- package/src/organisms/form/builder/FormEditCtas.tsx +10 -10
- package/src/organisms/form/builder/useFormBuilder.ts +12 -7
- package/src/organisms/form/exports/FormExport.stories.tsx +9 -12
- package/src/organisms/form/exports/FormExport.tsx +12 -9
- package/src/organisms/form/preview/FormPreview.stories.tsx +7 -10
- package/src/organisms/form/preview/FormPreview.tsx +7 -5
- package/src/organisms/form/settings/FormSettings.component.spec.tsx +3 -1
- package/src/organisms/form/settings/FormSettings.stories.tsx +1 -1
- package/src/organisms/form/settings/FormSettings.tsx +6 -6
- package/src/organisms/form/useForm.ts +2 -3
- package/src/organisms/modal/RemoveModal.stories.tsx +1 -1
- package/src/organisms/table/actions/ActionsTable.stories.tsx +2 -2
- package/src/organisms/table/actions/ActionsTable.tsx +7 -5
- package/src/organisms/table/forms/FormsTable.tsx +6 -5
- package/src/organisms/table/submissions/SubmissionsTable.stories.tsx +11 -14
- package/src/organisms/views/FormViews.stories.tsx +14 -17
- package/src/organisms/views/FormViews.tsx +18 -16
- package/src/utils/iconClass.ts +1 -3
- package/vite.config.mts +2 -2
- package/dist/typings.d.js +0 -2
- package/dist/typings.d.js.map +0 -1
- package/src/typings.d.ts +0 -3
- package/tsconfig.app.json +0 -11
- package/tsconfig.json +0 -21
- package/tsconfig.node.json +0 -13
- package/tsconfig.spec.json +0 -14
|
@@ -1,29 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { t as
|
|
1
|
+
import { jsx as at } from "react/jsx-runtime";
|
|
2
|
+
import { t as it, _ as ot, a as st, b as rt, c as lt, d as ct, m as Fe, s as Ae, v as ee, e as dt, f as pt, g as ft, p as gt, o as bt, n as vt, h as mt, j as ht, k as It, l as Ct, q as Et, r as Ft, u as At, w as Vt, x as Ot, y as Dt, z as St, A as xt, B as yt, C as Bt, D as Mt, E as Gt, F as Lt, G as Rt, H as G, I as Wt, J as ae, K as Zt, L as Xt, M as wt, N as Ve, O as Oe, P as V, Q as Tt, R as Nt, S as me, T as Pt, U as Z, V as kt, W as Ht, X as se, i as Jt } from "../../../../chunks/react-select-animated.esm.js";
|
|
3
3
|
import * as C from "react";
|
|
4
|
-
import { Component as
|
|
4
|
+
import { Component as Yt, Fragment as be, useMemo as j, useRef as $, useCallback as X, useEffect as Ne, useState as re, forwardRef as zt } from "react";
|
|
5
5
|
import "react-dom";
|
|
6
6
|
import { registerComponent as _t } from "../../../../registries/components.js";
|
|
7
|
-
function
|
|
7
|
+
function Ut(u, n) {
|
|
8
8
|
if (!(u instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function De(u, n) {
|
|
11
11
|
for (var s = 0; s < n.length; s++) {
|
|
12
12
|
var o = n[s];
|
|
13
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(u,
|
|
13
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(u, it(o.key), o);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
return
|
|
16
|
+
function jt(u, n, s) {
|
|
17
|
+
return n && De(u.prototype, n), s && De(u, s), Object.defineProperty(u, "prototype", {
|
|
18
18
|
writable: !1
|
|
19
19
|
}), u;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
return ve = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(s, o) {
|
|
23
|
-
return s.__proto__ = o, s;
|
|
24
|
-
}, ve(u, n);
|
|
25
|
-
}
|
|
26
|
-
function jt(u, n) {
|
|
21
|
+
function Qt(u, n) {
|
|
27
22
|
if (typeof n != "function" && n !== null) throw new TypeError("Super expression must either be null or a function");
|
|
28
23
|
u.prototype = Object.create(n && n.prototype, {
|
|
29
24
|
constructor: {
|
|
@@ -33,34 +28,30 @@ function jt(u, n) {
|
|
|
33
28
|
}
|
|
34
29
|
}), Object.defineProperty(u, "prototype", {
|
|
35
30
|
writable: !1
|
|
36
|
-
}), n &&
|
|
31
|
+
}), n && ot(u, n);
|
|
37
32
|
}
|
|
38
33
|
function ie(u) {
|
|
39
34
|
return ie = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
|
|
40
35
|
return n.__proto__ || Object.getPrototypeOf(n);
|
|
41
36
|
}, ie(u);
|
|
42
37
|
}
|
|
43
|
-
function
|
|
38
|
+
function Pe() {
|
|
44
39
|
try {
|
|
45
40
|
var u = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
46
41
|
}));
|
|
47
42
|
} catch {
|
|
48
43
|
}
|
|
49
|
-
return (
|
|
44
|
+
return (Pe = function() {
|
|
50
45
|
return !!u;
|
|
51
46
|
})();
|
|
52
47
|
}
|
|
53
|
-
function Qt(u) {
|
|
54
|
-
if (u === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
55
|
-
return u;
|
|
56
|
-
}
|
|
57
48
|
function $t(u, n) {
|
|
58
49
|
if (n && (st(n) == "object" || typeof n == "function")) return n;
|
|
59
50
|
if (n !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
60
|
-
return
|
|
51
|
+
return rt(u);
|
|
61
52
|
}
|
|
62
53
|
function Kt(u) {
|
|
63
|
-
var n =
|
|
54
|
+
var n = Pe();
|
|
64
55
|
return function() {
|
|
65
56
|
var s, o = ie(u);
|
|
66
57
|
if (n) {
|
|
@@ -71,7 +62,7 @@ function Kt(u) {
|
|
|
71
62
|
};
|
|
72
63
|
}
|
|
73
64
|
function qt(u) {
|
|
74
|
-
if (Array.isArray(u)) return
|
|
65
|
+
if (Array.isArray(u)) return lt(u);
|
|
75
66
|
}
|
|
76
67
|
function en(u) {
|
|
77
68
|
if (typeof Symbol < "u" && u[Symbol.iterator] != null || u["@@iterator"] != null) return Array.from(u);
|
|
@@ -81,7 +72,7 @@ function tn() {
|
|
|
81
72
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
82
73
|
}
|
|
83
74
|
function K(u) {
|
|
84
|
-
return qt(u) || en(u) ||
|
|
75
|
+
return qt(u) || en(u) || ct(u) || tn();
|
|
85
76
|
}
|
|
86
77
|
function nn() {
|
|
87
78
|
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
@@ -98,14 +89,14 @@ var un = process.env.NODE_ENV === "production" ? {
|
|
|
98
89
|
return Z("span", V({
|
|
99
90
|
css: un
|
|
100
91
|
}, n));
|
|
101
|
-
},
|
|
92
|
+
}, Se = an, on = {
|
|
102
93
|
guidance: function(n) {
|
|
103
|
-
var s = n.isSearchable, o = n.isMulti, e = n.tabSelectsValue, i = n.context,
|
|
94
|
+
var s = n.isSearchable, o = n.isMulti, e = n.tabSelectsValue, i = n.context, c = n.isInitialFocus;
|
|
104
95
|
switch (i) {
|
|
105
96
|
case "menu":
|
|
106
97
|
return "Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(e ? ", press Tab to select the option and exit the menu" : "", ".");
|
|
107
98
|
case "input":
|
|
108
|
-
return
|
|
99
|
+
return c ? "".concat(n["aria-label"] || "Select", " is focused ").concat(s ? ",type to refine list" : "", ", press Down to open the menu, ").concat(o ? " press left to focus selected values" : "") : "";
|
|
109
100
|
case "value":
|
|
110
101
|
return "Use left and right to toggle between focused values, press Backspace to remove the currently focused value";
|
|
111
102
|
default:
|
|
@@ -113,7 +104,7 @@ var un = process.env.NODE_ENV === "production" ? {
|
|
|
113
104
|
}
|
|
114
105
|
},
|
|
115
106
|
onChange: function(n) {
|
|
116
|
-
var s = n.action, o = n.label, e = o === void 0 ? "" : o, i = n.labels,
|
|
107
|
+
var s = n.action, o = n.label, e = o === void 0 ? "" : o, i = n.labels, c = n.isDisabled;
|
|
117
108
|
switch (s) {
|
|
118
109
|
case "deselect-option":
|
|
119
110
|
case "pop-value":
|
|
@@ -124,20 +115,20 @@ var un = process.env.NODE_ENV === "production" ? {
|
|
|
124
115
|
case "initial-input-focus":
|
|
125
116
|
return "option".concat(i.length > 1 ? "s" : "", " ").concat(i.join(","), ", selected.");
|
|
126
117
|
case "select-option":
|
|
127
|
-
return
|
|
118
|
+
return c ? "option ".concat(e, " is disabled. Select another option.") : "option ".concat(e, ", selected.");
|
|
128
119
|
default:
|
|
129
120
|
return "";
|
|
130
121
|
}
|
|
131
122
|
},
|
|
132
123
|
onFocus: function(n) {
|
|
133
|
-
var s = n.context, o = n.focused, e = n.options, i = n.label,
|
|
124
|
+
var s = n.context, o = n.focused, e = n.options, i = n.label, c = i === void 0 ? "" : i, d = n.selectValue, t = n.isDisabled, a = n.isSelected, r = n.isAppleDevice, l = function(b, p) {
|
|
134
125
|
return b && b.length ? "".concat(b.indexOf(p) + 1, " of ").concat(b.length) : "";
|
|
135
126
|
};
|
|
136
127
|
if (s === "value" && d)
|
|
137
|
-
return "value ".concat(
|
|
128
|
+
return "value ".concat(c, " focused, ").concat(l(d, o), ".");
|
|
138
129
|
if (s === "menu" && r) {
|
|
139
130
|
var g = t ? " disabled" : "", f = "".concat(a ? " selected" : "").concat(g);
|
|
140
|
-
return "".concat(
|
|
131
|
+
return "".concat(c).concat(f, ", ").concat(l(e, o), ".");
|
|
141
132
|
}
|
|
142
133
|
return "";
|
|
143
134
|
},
|
|
@@ -146,19 +137,19 @@ var un = process.env.NODE_ENV === "production" ? {
|
|
|
146
137
|
return "".concat(o).concat(s ? " for search term " + s : "", ".");
|
|
147
138
|
}
|
|
148
139
|
}, sn = function(n) {
|
|
149
|
-
var s = n.ariaSelection, o = n.focusedOption, e = n.focusedValue, i = n.focusableOptions,
|
|
150
|
-
return G(G({}, on),
|
|
151
|
-
}, [
|
|
140
|
+
var s = n.ariaSelection, o = n.focusedOption, e = n.focusedValue, i = n.focusableOptions, c = n.isFocused, d = n.selectValue, t = n.selectProps, a = n.id, r = n.isAppleDevice, l = t.ariaLiveMessages, g = t.getOptionLabel, f = t.inputValue, v = t.isMulti, b = t.isOptionDisabled, p = t.isSearchable, m = t.menuIsOpen, E = t.options, F = t.screenReaderStatus, I = t.tabSelectsValue, A = t.isLoading, S = t["aria-label"], O = t["aria-live"], h = j(function() {
|
|
141
|
+
return G(G({}, on), l || {});
|
|
142
|
+
}, [l]), D = j(function() {
|
|
152
143
|
var x = "";
|
|
153
144
|
if (s && h.onChange) {
|
|
154
|
-
var B = s.option, P = s.options, w = s.removedValue, Y = s.removedValues,
|
|
145
|
+
var B = s.option, P = s.options, w = s.removedValue, Y = s.removedValues, z = s.value, te = function(J) {
|
|
155
146
|
return Array.isArray(J) ? null : J;
|
|
156
|
-
}, y = w || B || te(
|
|
147
|
+
}, y = w || B || te(z), W = y ? g(y) : "", H = P || Y || void 0, _ = H ? H.map(g) : [], N = G({
|
|
157
148
|
// multiSelected items are usually items that have already been selected
|
|
158
149
|
// or set by the user as a default value so we assume they are not disabled
|
|
159
150
|
isDisabled: y && b(y, d),
|
|
160
151
|
label: W,
|
|
161
|
-
labels:
|
|
152
|
+
labels: _
|
|
162
153
|
}, s);
|
|
163
154
|
x = h.onChange(N);
|
|
164
155
|
}
|
|
@@ -191,7 +182,7 @@ var un = process.env.NODE_ENV === "production" ? {
|
|
|
191
182
|
});
|
|
192
183
|
}
|
|
193
184
|
return x;
|
|
194
|
-
}, [i, f, m, h, E, F, A]), M =
|
|
185
|
+
}, [i, f, m, h, E, F, A]), M = s?.action === "initial-input-focus", T = j(function() {
|
|
195
186
|
var x = "";
|
|
196
187
|
if (h.guidance) {
|
|
197
188
|
var B = e ? "value" : m ? "menu" : "input";
|
|
@@ -215,15 +206,15 @@ var un = process.env.NODE_ENV === "production" ? {
|
|
|
215
206
|
}, R), Z("span", {
|
|
216
207
|
id: "aria-guidance"
|
|
217
208
|
}, T));
|
|
218
|
-
return Z(be, null, Z(
|
|
209
|
+
return Z(be, null, Z(Se, {
|
|
219
210
|
id: a
|
|
220
|
-
}, M && k), Z(
|
|
211
|
+
}, M && k), Z(Se, {
|
|
221
212
|
"aria-live": O,
|
|
222
213
|
"aria-atomic": "false",
|
|
223
214
|
"aria-relevant": "additions text",
|
|
224
215
|
role: "log"
|
|
225
|
-
},
|
|
226
|
-
}, rn = sn,
|
|
216
|
+
}, c && !M && k));
|
|
217
|
+
}, rn = sn, ve = [{
|
|
227
218
|
base: "A",
|
|
228
219
|
letters: "AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"
|
|
229
220
|
}, {
|
|
@@ -475,17 +466,17 @@ var un = process.env.NODE_ENV === "production" ? {
|
|
|
475
466
|
}, {
|
|
476
467
|
base: "z",
|
|
477
468
|
letters: "zⓩzźẑżžẓẕƶȥɀⱬꝣ"
|
|
478
|
-
}], ln = new RegExp("[" +
|
|
469
|
+
}], ln = new RegExp("[" + ve.map(function(u) {
|
|
479
470
|
return u.letters;
|
|
480
|
-
}).join("") + "]", "g"),
|
|
481
|
-
for (var le = 0; le <
|
|
482
|
-
for (var ce =
|
|
483
|
-
|
|
484
|
-
var
|
|
471
|
+
}).join("") + "]", "g"), ke = {};
|
|
472
|
+
for (var le = 0; le < ve.length; le++)
|
|
473
|
+
for (var ce = ve[le], de = 0; de < ce.letters.length; de++)
|
|
474
|
+
ke[ce.letters[de]] = ce.base;
|
|
475
|
+
var He = function(n) {
|
|
485
476
|
return n.replace(ln, function(s) {
|
|
486
|
-
return
|
|
477
|
+
return ke[s];
|
|
487
478
|
});
|
|
488
|
-
}, cn =
|
|
479
|
+
}, cn = Xt(He), xe = function(n) {
|
|
489
480
|
return n.replace(/^\s+|\s+$/g, "");
|
|
490
481
|
}, dn = function(n) {
|
|
491
482
|
return "".concat(n.label, " ").concat(n.value);
|
|
@@ -498,16 +489,16 @@ var Je = function(n) {
|
|
|
498
489
|
stringify: dn,
|
|
499
490
|
trim: !0,
|
|
500
491
|
matchFrom: "any"
|
|
501
|
-
}, n), i = e.ignoreCase,
|
|
502
|
-
return i && (r = r.toLowerCase(),
|
|
492
|
+
}, n), i = e.ignoreCase, c = e.ignoreAccents, d = e.stringify, t = e.trim, a = e.matchFrom, r = t ? xe(o) : o, l = t ? xe(d(s)) : d(s);
|
|
493
|
+
return i && (r = r.toLowerCase(), l = l.toLowerCase()), c && (r = cn(r), l = He(l)), a === "start" ? l.substr(0, r.length) === r : l.indexOf(r) > -1;
|
|
503
494
|
};
|
|
504
495
|
}, fn = ["innerRef"];
|
|
505
496
|
function gn(u) {
|
|
506
|
-
var n = u.innerRef, s =
|
|
497
|
+
var n = u.innerRef, s = me(u, fn), o = Pt(s, "onExited", "in", "enter", "exit", "appear");
|
|
507
498
|
return Z("input", V({
|
|
508
499
|
ref: n
|
|
509
500
|
}, o, {
|
|
510
|
-
css: /* @__PURE__ */
|
|
501
|
+
css: /* @__PURE__ */ kt({
|
|
511
502
|
label: "dummyInput",
|
|
512
503
|
// get rid of any default styles
|
|
513
504
|
background: 0,
|
|
@@ -534,12 +525,12 @@ var bn = function(n) {
|
|
|
534
525
|
n.cancelable && n.preventDefault(), n.stopPropagation();
|
|
535
526
|
};
|
|
536
527
|
function vn(u) {
|
|
537
|
-
var n = u.isEnabled, s = u.onBottomArrive, o = u.onBottomLeave, e = u.onTopArrive, i = u.onTopLeave,
|
|
528
|
+
var n = u.isEnabled, s = u.onBottomArrive, o = u.onBottomLeave, e = u.onTopArrive, i = u.onTopLeave, c = $(!1), d = $(!1), t = $(0), a = $(null), r = X(function(p, m) {
|
|
538
529
|
if (a.current !== null) {
|
|
539
530
|
var E = a.current, F = E.scrollTop, I = E.scrollHeight, A = E.clientHeight, S = a.current, O = m > 0, h = I - A - F, D = !1;
|
|
540
|
-
h > m &&
|
|
531
|
+
h > m && c.current && (o && o(p), c.current = !1), O && d.current && (i && i(p), d.current = !1), O && m > h ? (s && !c.current && s(p), S.scrollTop = I, D = !0, c.current = !0) : !O && -m > F && (e && !d.current && e(p), S.scrollTop = 0, D = !0, d.current = !0), D && bn(p);
|
|
541
532
|
}
|
|
542
|
-
}, [s, o, e, i]),
|
|
533
|
+
}, [s, o, e, i]), l = X(function(p) {
|
|
543
534
|
r(p, p.deltaY);
|
|
544
535
|
}, [r]), g = X(function(p) {
|
|
545
536
|
t.current = p.changedTouches[0].clientY;
|
|
@@ -548,15 +539,15 @@ function vn(u) {
|
|
|
548
539
|
r(p, m);
|
|
549
540
|
}, [r]), v = X(function(p) {
|
|
550
541
|
if (p) {
|
|
551
|
-
var m =
|
|
542
|
+
var m = Ht ? {
|
|
552
543
|
passive: !1
|
|
553
544
|
} : !1;
|
|
554
|
-
p.addEventListener("wheel",
|
|
545
|
+
p.addEventListener("wheel", l, m), p.addEventListener("touchstart", g, m), p.addEventListener("touchmove", f, m);
|
|
555
546
|
}
|
|
556
|
-
}, [f, g,
|
|
557
|
-
p && (p.removeEventListener("wheel",
|
|
558
|
-
}, [f, g,
|
|
559
|
-
return
|
|
547
|
+
}, [f, g, l]), b = X(function(p) {
|
|
548
|
+
p && (p.removeEventListener("wheel", l, !1), p.removeEventListener("touchstart", g, !1), p.removeEventListener("touchmove", f, !1));
|
|
549
|
+
}, [f, g, l]);
|
|
550
|
+
return Ne(function() {
|
|
560
551
|
if (n) {
|
|
561
552
|
var p = a.current;
|
|
562
553
|
return v(p), function() {
|
|
@@ -567,63 +558,63 @@ function vn(u) {
|
|
|
567
558
|
a.current = p;
|
|
568
559
|
};
|
|
569
560
|
}
|
|
570
|
-
var
|
|
561
|
+
var ye = ["boxSizing", "height", "overflow", "paddingRight", "position"], Be = {
|
|
571
562
|
boxSizing: "border-box",
|
|
572
563
|
// account for possible declaration `width: 100%;` on body
|
|
573
564
|
overflow: "hidden",
|
|
574
565
|
position: "relative",
|
|
575
566
|
height: "100%"
|
|
576
567
|
};
|
|
577
|
-
function
|
|
568
|
+
function Me(u) {
|
|
578
569
|
u.cancelable && u.preventDefault();
|
|
579
570
|
}
|
|
580
|
-
function
|
|
571
|
+
function Ge(u) {
|
|
581
572
|
u.stopPropagation();
|
|
582
573
|
}
|
|
583
|
-
function
|
|
574
|
+
function Le() {
|
|
584
575
|
var u = this.scrollTop, n = this.scrollHeight, s = u + this.offsetHeight;
|
|
585
576
|
u === 0 ? this.scrollTop = 1 : s === n && (this.scrollTop = u - 1);
|
|
586
577
|
}
|
|
587
|
-
function
|
|
578
|
+
function Re() {
|
|
588
579
|
return "ontouchstart" in window || navigator.maxTouchPoints;
|
|
589
580
|
}
|
|
590
|
-
var
|
|
581
|
+
var We = !!(typeof window < "u" && window.document && window.document.createElement), q = 0, Q = {
|
|
591
582
|
capture: !1,
|
|
592
583
|
passive: !1
|
|
593
584
|
};
|
|
594
585
|
function mn(u) {
|
|
595
|
-
var n = u.isEnabled, s = u.accountForScrollbars, o = s === void 0 ? !0 : s, e = $({}), i = $(null),
|
|
596
|
-
if (
|
|
586
|
+
var n = u.isEnabled, s = u.accountForScrollbars, o = s === void 0 ? !0 : s, e = $({}), i = $(null), c = X(function(t) {
|
|
587
|
+
if (We) {
|
|
597
588
|
var a = document.body, r = a && a.style;
|
|
598
|
-
if (o &&
|
|
589
|
+
if (o && ye.forEach(function(v) {
|
|
599
590
|
var b = r && r[v];
|
|
600
591
|
e.current[v] = b;
|
|
601
592
|
}), o && q < 1) {
|
|
602
|
-
var
|
|
603
|
-
Object.keys(
|
|
604
|
-
var b =
|
|
593
|
+
var l = parseInt(e.current.paddingRight, 10) || 0, g = document.body ? document.body.clientWidth : 0, f = window.innerWidth - g + l || 0;
|
|
594
|
+
Object.keys(Be).forEach(function(v) {
|
|
595
|
+
var b = Be[v];
|
|
605
596
|
r && (r[v] = b);
|
|
606
597
|
}), r && (r.paddingRight = "".concat(f, "px"));
|
|
607
598
|
}
|
|
608
|
-
a &&
|
|
599
|
+
a && Re() && (a.addEventListener("touchmove", Me, Q), t && (t.addEventListener("touchstart", Le, Q), t.addEventListener("touchmove", Ge, Q))), q += 1;
|
|
609
600
|
}
|
|
610
601
|
}, [o]), d = X(function(t) {
|
|
611
|
-
if (
|
|
602
|
+
if (We) {
|
|
612
603
|
var a = document.body, r = a && a.style;
|
|
613
|
-
q = Math.max(q - 1, 0), o && q < 1 &&
|
|
614
|
-
var g = e.current[
|
|
615
|
-
r && (r[
|
|
616
|
-
}), a &&
|
|
604
|
+
q = Math.max(q - 1, 0), o && q < 1 && ye.forEach(function(l) {
|
|
605
|
+
var g = e.current[l];
|
|
606
|
+
r && (r[l] = g);
|
|
607
|
+
}), a && Re() && (a.removeEventListener("touchmove", Me, Q), t && (t.removeEventListener("touchstart", Le, Q), t.removeEventListener("touchmove", Ge, Q)));
|
|
617
608
|
}
|
|
618
609
|
}, [o]);
|
|
619
|
-
return
|
|
610
|
+
return Ne(function() {
|
|
620
611
|
if (n) {
|
|
621
612
|
var t = i.current;
|
|
622
|
-
return
|
|
613
|
+
return c(t), function() {
|
|
623
614
|
d(t);
|
|
624
615
|
};
|
|
625
616
|
}
|
|
626
|
-
}, [n,
|
|
617
|
+
}, [n, c, d]), function(t) {
|
|
627
618
|
i.current = t;
|
|
628
619
|
};
|
|
629
620
|
}
|
|
@@ -643,21 +634,21 @@ var In = function(n) {
|
|
|
643
634
|
toString: hn
|
|
644
635
|
};
|
|
645
636
|
function En(u) {
|
|
646
|
-
var n = u.children, s = u.lockEnabled, o = u.captureEnabled, e = o === void 0 ? !0 : o, i = u.onBottomArrive,
|
|
637
|
+
var n = u.children, s = u.lockEnabled, o = u.captureEnabled, e = o === void 0 ? !0 : o, i = u.onBottomArrive, c = u.onBottomLeave, d = u.onTopArrive, t = u.onTopLeave, a = vn({
|
|
647
638
|
isEnabled: e,
|
|
648
639
|
onBottomArrive: i,
|
|
649
|
-
onBottomLeave:
|
|
640
|
+
onBottomLeave: c,
|
|
650
641
|
onTopArrive: d,
|
|
651
642
|
onTopLeave: t
|
|
652
643
|
}), r = mn({
|
|
653
644
|
isEnabled: s
|
|
654
|
-
}),
|
|
645
|
+
}), l = function(f) {
|
|
655
646
|
a(f), r(f);
|
|
656
647
|
};
|
|
657
648
|
return Z(be, null, s && Z("div", {
|
|
658
649
|
onClick: In,
|
|
659
650
|
css: Cn
|
|
660
|
-
}), n(
|
|
651
|
+
}), n(l));
|
|
661
652
|
}
|
|
662
653
|
function Fn() {
|
|
663
654
|
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
@@ -684,57 +675,57 @@ var An = process.env.NODE_ENV === "production" ? {
|
|
|
684
675
|
}
|
|
685
676
|
});
|
|
686
677
|
}, On = Vn;
|
|
687
|
-
function
|
|
678
|
+
function he(u) {
|
|
688
679
|
var n;
|
|
689
680
|
return typeof window < "u" && window.navigator != null ? u.test(((n = window.navigator.userAgentData) === null || n === void 0 ? void 0 : n.platform) || window.navigator.platform) : !1;
|
|
690
681
|
}
|
|
691
682
|
function Dn() {
|
|
692
|
-
return
|
|
683
|
+
return he(/^iPhone/i);
|
|
693
684
|
}
|
|
694
|
-
function
|
|
695
|
-
return
|
|
685
|
+
function Je() {
|
|
686
|
+
return he(/^Mac/i);
|
|
696
687
|
}
|
|
697
688
|
function Sn() {
|
|
698
|
-
return
|
|
699
|
-
|
|
689
|
+
return he(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
690
|
+
Je() && navigator.maxTouchPoints > 1;
|
|
700
691
|
}
|
|
701
692
|
function xn() {
|
|
702
693
|
return Dn() || Sn();
|
|
703
694
|
}
|
|
704
695
|
function yn() {
|
|
705
|
-
return
|
|
696
|
+
return Je() || xn();
|
|
706
697
|
}
|
|
707
698
|
var Bn = function(n) {
|
|
708
699
|
return n.label;
|
|
709
|
-
},
|
|
700
|
+
}, Ye = function(n) {
|
|
710
701
|
return n.label;
|
|
711
702
|
}, ze = function(n) {
|
|
712
703
|
return n.value;
|
|
713
704
|
}, Mn = function(n) {
|
|
714
705
|
return !!n.isDisabled;
|
|
715
706
|
}, Gn = {
|
|
716
|
-
clearIndicator:
|
|
717
|
-
container:
|
|
718
|
-
control:
|
|
719
|
-
dropdownIndicator:
|
|
720
|
-
group:
|
|
721
|
-
groupHeading:
|
|
722
|
-
indicatorsContainer:
|
|
723
|
-
indicatorSeparator:
|
|
724
|
-
input:
|
|
707
|
+
clearIndicator: Lt,
|
|
708
|
+
container: Gt,
|
|
709
|
+
control: Mt,
|
|
710
|
+
dropdownIndicator: Bt,
|
|
711
|
+
group: yt,
|
|
712
|
+
groupHeading: xt,
|
|
713
|
+
indicatorsContainer: St,
|
|
714
|
+
indicatorSeparator: Dt,
|
|
715
|
+
input: Ot,
|
|
725
716
|
loadingIndicator: Vt,
|
|
726
|
-
loadingMessage:
|
|
727
|
-
menu:
|
|
728
|
-
menuList:
|
|
729
|
-
menuPortal:
|
|
730
|
-
multiValue:
|
|
731
|
-
multiValueLabel:
|
|
732
|
-
multiValueRemove:
|
|
733
|
-
noOptionsMessage:
|
|
734
|
-
option:
|
|
735
|
-
placeholder:
|
|
736
|
-
singleValue:
|
|
737
|
-
valueContainer:
|
|
717
|
+
loadingMessage: At,
|
|
718
|
+
menu: Ft,
|
|
719
|
+
menuList: Et,
|
|
720
|
+
menuPortal: Ct,
|
|
721
|
+
multiValue: It,
|
|
722
|
+
multiValueLabel: ht,
|
|
723
|
+
multiValueRemove: mt,
|
|
724
|
+
noOptionsMessage: vt,
|
|
725
|
+
option: bt,
|
|
726
|
+
placeholder: gt,
|
|
727
|
+
singleValue: ft,
|
|
728
|
+
valueContainer: pt
|
|
738
729
|
}, Ln = {
|
|
739
730
|
primary: "#2684FF",
|
|
740
731
|
primary75: "#4C9AFF",
|
|
@@ -753,8 +744,8 @@ var Bn = function(n) {
|
|
|
753
744
|
neutral70: "hsl(0, 0%, 30%)",
|
|
754
745
|
neutral80: "hsl(0, 0%, 20%)",
|
|
755
746
|
neutral90: "hsl(0, 0%, 10%)"
|
|
756
|
-
}, Rn = 4,
|
|
757
|
-
baseUnit:
|
|
747
|
+
}, Rn = 4, _e = 4, Wn = 38, Zn = _e * 2, Xn = {
|
|
748
|
+
baseUnit: _e,
|
|
758
749
|
controlHeight: Wn,
|
|
759
750
|
menuGutter: Zn
|
|
760
751
|
}, pe = {
|
|
@@ -764,8 +755,8 @@ var Bn = function(n) {
|
|
|
764
755
|
}, wn = {
|
|
765
756
|
"aria-live": "polite",
|
|
766
757
|
backspaceRemovesValue: !0,
|
|
767
|
-
blurInputOnSelect:
|
|
768
|
-
captureMenuScroll: !
|
|
758
|
+
blurInputOnSelect: Ve(),
|
|
759
|
+
captureMenuScroll: !Ve(),
|
|
769
760
|
classNames: {},
|
|
770
761
|
closeMenuOnSelect: !0,
|
|
771
762
|
closeMenuOnScroll: !1,
|
|
@@ -774,7 +765,7 @@ var Bn = function(n) {
|
|
|
774
765
|
escapeClearsValue: !1,
|
|
775
766
|
filterOption: pn(),
|
|
776
767
|
formatGroupLabel: Bn,
|
|
777
|
-
getOptionLabel:
|
|
768
|
+
getOptionLabel: Ye,
|
|
778
769
|
getOptionValue: ze,
|
|
779
770
|
isDisabled: !1,
|
|
780
771
|
isLoading: !1,
|
|
@@ -791,7 +782,7 @@ var Bn = function(n) {
|
|
|
791
782
|
menuPlacement: "bottom",
|
|
792
783
|
menuPosition: "absolute",
|
|
793
784
|
menuShouldBlockScroll: !1,
|
|
794
|
-
menuShouldScrollIntoView: !
|
|
785
|
+
menuShouldScrollIntoView: !wt(),
|
|
795
786
|
noOptionsMessage: function() {
|
|
796
787
|
return "No options";
|
|
797
788
|
},
|
|
@@ -809,14 +800,14 @@ var Bn = function(n) {
|
|
|
809
800
|
tabSelectsValue: !0,
|
|
810
801
|
unstyled: !1
|
|
811
802
|
};
|
|
812
|
-
function
|
|
813
|
-
var e =
|
|
803
|
+
function Ze(u, n, s, o) {
|
|
804
|
+
var e = Qe(u, n, s), i = $e(u, n, s), c = je(u, n), d = oe(u, n);
|
|
814
805
|
return {
|
|
815
806
|
type: "option",
|
|
816
807
|
data: n,
|
|
817
808
|
isDisabled: e,
|
|
818
809
|
isSelected: i,
|
|
819
|
-
label:
|
|
810
|
+
label: c,
|
|
820
811
|
value: d,
|
|
821
812
|
index: o
|
|
822
813
|
};
|
|
@@ -824,10 +815,10 @@ function Xe(u, n, s, o) {
|
|
|
824
815
|
function ue(u, n) {
|
|
825
816
|
return u.options.map(function(s, o) {
|
|
826
817
|
if ("options" in s) {
|
|
827
|
-
var e = s.options.map(function(
|
|
828
|
-
return
|
|
829
|
-
}).filter(function(
|
|
830
|
-
return
|
|
818
|
+
var e = s.options.map(function(c, d) {
|
|
819
|
+
return Ze(u, c, n, d);
|
|
820
|
+
}).filter(function(c) {
|
|
821
|
+
return we(u, c);
|
|
831
822
|
});
|
|
832
823
|
return e.length > 0 ? {
|
|
833
824
|
type: "group",
|
|
@@ -836,18 +827,18 @@ function ue(u, n) {
|
|
|
836
827
|
index: o
|
|
837
828
|
} : void 0;
|
|
838
829
|
}
|
|
839
|
-
var i =
|
|
840
|
-
return
|
|
841
|
-
}).filter(
|
|
830
|
+
var i = Ze(u, s, n, o);
|
|
831
|
+
return we(u, i) ? i : void 0;
|
|
832
|
+
}).filter(Zt);
|
|
842
833
|
}
|
|
843
|
-
function
|
|
834
|
+
function Ue(u) {
|
|
844
835
|
return u.reduce(function(n, s) {
|
|
845
836
|
return s.type === "group" ? n.push.apply(n, K(s.options.map(function(o) {
|
|
846
837
|
return o.data;
|
|
847
838
|
}))) : n.push(s.data), n;
|
|
848
839
|
}, []);
|
|
849
840
|
}
|
|
850
|
-
function
|
|
841
|
+
function Xe(u, n) {
|
|
851
842
|
return u.reduce(function(s, o) {
|
|
852
843
|
return o.type === "group" ? s.push.apply(s, K(o.options.map(function(e) {
|
|
853
844
|
return {
|
|
@@ -861,12 +852,12 @@ function we(u, n) {
|
|
|
861
852
|
}, []);
|
|
862
853
|
}
|
|
863
854
|
function Tn(u, n) {
|
|
864
|
-
return
|
|
855
|
+
return Ue(ue(u, n));
|
|
865
856
|
}
|
|
866
|
-
function
|
|
867
|
-
var s = u.inputValue, o = s === void 0 ? "" : s, e = n.data, i = n.isSelected,
|
|
868
|
-
return (!
|
|
869
|
-
label:
|
|
857
|
+
function we(u, n) {
|
|
858
|
+
var s = u.inputValue, o = s === void 0 ? "" : s, e = n.data, i = n.isSelected, c = n.label, d = n.value;
|
|
859
|
+
return (!qe(u) || !i) && Ke(u, {
|
|
860
|
+
label: c,
|
|
870
861
|
value: d,
|
|
871
862
|
data: e
|
|
872
863
|
}, o);
|
|
@@ -891,15 +882,15 @@ var fe = function(n, s) {
|
|
|
891
882
|
return i.data === s;
|
|
892
883
|
})) === null || o === void 0 ? void 0 : o.id;
|
|
893
884
|
return e || null;
|
|
894
|
-
},
|
|
885
|
+
}, je = function(n, s) {
|
|
895
886
|
return n.getOptionLabel(s);
|
|
896
887
|
}, oe = function(n, s) {
|
|
897
888
|
return n.getOptionValue(s);
|
|
898
889
|
};
|
|
899
|
-
function
|
|
890
|
+
function Qe(u, n, s) {
|
|
900
891
|
return typeof u.isOptionDisabled == "function" ? u.isOptionDisabled(n, s) : !1;
|
|
901
892
|
}
|
|
902
|
-
function
|
|
893
|
+
function $e(u, n, s) {
|
|
903
894
|
if (s.indexOf(n) > -1) return !0;
|
|
904
895
|
if (typeof u.isOptionSelected == "function")
|
|
905
896
|
return u.isOptionSelected(n, s);
|
|
@@ -908,18 +899,18 @@ function Ke(u, n, s) {
|
|
|
908
899
|
return oe(u, e) === o;
|
|
909
900
|
});
|
|
910
901
|
}
|
|
911
|
-
function
|
|
902
|
+
function Ke(u, n, s) {
|
|
912
903
|
return u.filterOption ? u.filterOption(n, s) : !0;
|
|
913
904
|
}
|
|
914
|
-
var
|
|
905
|
+
var qe = function(n) {
|
|
915
906
|
var s = n.hideSelectedOptions, o = n.isMulti;
|
|
916
907
|
return s === void 0 ? o : s;
|
|
917
|
-
}, kn = 1,
|
|
918
|
-
|
|
908
|
+
}, kn = 1, et = /* @__PURE__ */ (function(u) {
|
|
909
|
+
Qt(s, u);
|
|
919
910
|
var n = Kt(s);
|
|
920
911
|
function s(o) {
|
|
921
912
|
var e;
|
|
922
|
-
if (
|
|
913
|
+
if (Ut(this, s), e = n.call(this, o), e.state = {
|
|
923
914
|
ariaSelection: null,
|
|
924
915
|
focusedOption: null,
|
|
925
916
|
focusedOptionId: null,
|
|
@@ -942,10 +933,10 @@ var et = function(n) {
|
|
|
942
933
|
}, e.inputRef = null, e.getInputRef = function(t) {
|
|
943
934
|
e.inputRef = t;
|
|
944
935
|
}, e.focus = e.focusInput, e.blur = e.blurInput, e.onChange = function(t, a) {
|
|
945
|
-
var r = e.props,
|
|
946
|
-
a.name = g, e.ariaOnChange(t, a),
|
|
936
|
+
var r = e.props, l = r.onChange, g = r.name;
|
|
937
|
+
a.name = g, e.ariaOnChange(t, a), l(t, a);
|
|
947
938
|
}, e.setValue = function(t, a, r) {
|
|
948
|
-
var
|
|
939
|
+
var l = e.props, g = l.closeMenuOnSelect, f = l.isMulti, v = l.inputValue;
|
|
949
940
|
e.onInputChange("", {
|
|
950
941
|
action: "set-value",
|
|
951
942
|
prevInputValue: v
|
|
@@ -958,16 +949,16 @@ var et = function(n) {
|
|
|
958
949
|
option: r
|
|
959
950
|
});
|
|
960
951
|
}, e.selectOption = function(t) {
|
|
961
|
-
var a = e.props, r = a.blurInputOnSelect,
|
|
952
|
+
var a = e.props, r = a.blurInputOnSelect, l = a.isMulti, g = a.name, f = e.state.selectValue, v = l && e.isOptionSelected(t, f), b = e.isOptionDisabled(t, f);
|
|
962
953
|
if (v) {
|
|
963
954
|
var p = e.getOptionValue(t);
|
|
964
|
-
e.setValue(
|
|
955
|
+
e.setValue(Fe(f.filter(function(m) {
|
|
965
956
|
return e.getOptionValue(m) !== p;
|
|
966
957
|
})), "deselect-option", t);
|
|
967
958
|
} else if (!b)
|
|
968
|
-
|
|
959
|
+
l ? e.setValue(Fe([].concat(K(f), [t])), "select-option", t) : e.setValue(Ae(t), "select-option");
|
|
969
960
|
else {
|
|
970
|
-
e.ariaOnChange(
|
|
961
|
+
e.ariaOnChange(Ae(t), {
|
|
971
962
|
action: "select-option",
|
|
972
963
|
option: t,
|
|
973
964
|
name: g
|
|
@@ -976,8 +967,8 @@ var et = function(n) {
|
|
|
976
967
|
}
|
|
977
968
|
r && e.blurInput();
|
|
978
969
|
}, e.removeValue = function(t) {
|
|
979
|
-
var a = e.props.isMulti, r = e.state.selectValue,
|
|
980
|
-
return e.getOptionValue(v) !==
|
|
970
|
+
var a = e.props.isMulti, r = e.state.selectValue, l = e.getOptionValue(t), g = r.filter(function(v) {
|
|
971
|
+
return e.getOptionValue(v) !== l;
|
|
981
972
|
}), f = ee(a, g, g[0] || null);
|
|
982
973
|
e.onChange(f, {
|
|
983
974
|
action: "remove-value",
|
|
@@ -990,7 +981,7 @@ var et = function(n) {
|
|
|
990
981
|
removedValues: t
|
|
991
982
|
});
|
|
992
983
|
}, e.popValue = function() {
|
|
993
|
-
var t = e.props.isMulti, a = e.state.selectValue, r = a[a.length - 1],
|
|
984
|
+
var t = e.props.isMulti, a = e.state.selectValue, r = a[a.length - 1], l = a.slice(0, a.length - 1), g = ee(t, l, l[0] || null);
|
|
994
985
|
r && e.onChange(g, {
|
|
995
986
|
action: "pop-value",
|
|
996
987
|
removedValue: r
|
|
@@ -998,35 +989,35 @@ var et = function(n) {
|
|
|
998
989
|
}, e.getFocusedOptionId = function(t) {
|
|
999
990
|
return fe(e.state.focusableOptionsWithIds, t);
|
|
1000
991
|
}, e.getFocusableOptionsWithIds = function() {
|
|
1001
|
-
return
|
|
992
|
+
return Xe(ue(e.props, e.state.selectValue), e.getElementId("option"));
|
|
1002
993
|
}, e.getValue = function() {
|
|
1003
994
|
return e.state.selectValue;
|
|
1004
995
|
}, e.cx = function() {
|
|
1005
996
|
for (var t = arguments.length, a = new Array(t), r = 0; r < t; r++)
|
|
1006
997
|
a[r] = arguments[r];
|
|
1007
|
-
return
|
|
998
|
+
return dt.apply(void 0, [e.props.classNamePrefix].concat(a));
|
|
1008
999
|
}, e.getOptionLabel = function(t) {
|
|
1009
|
-
return
|
|
1000
|
+
return je(e.props, t);
|
|
1010
1001
|
}, e.getOptionValue = function(t) {
|
|
1011
1002
|
return oe(e.props, t);
|
|
1012
1003
|
}, e.getStyles = function(t, a) {
|
|
1013
|
-
var r = e.props.unstyled,
|
|
1014
|
-
|
|
1004
|
+
var r = e.props.unstyled, l = Gn[t](a, r);
|
|
1005
|
+
l.boxSizing = "border-box";
|
|
1015
1006
|
var g = e.props.styles[t];
|
|
1016
|
-
return g ? g(
|
|
1007
|
+
return g ? g(l, a) : l;
|
|
1017
1008
|
}, e.getClassNames = function(t, a) {
|
|
1018
|
-
var r,
|
|
1019
|
-
return (r = (
|
|
1009
|
+
var r, l;
|
|
1010
|
+
return (r = (l = e.props.classNames)[t]) === null || r === void 0 ? void 0 : r.call(l, a);
|
|
1020
1011
|
}, e.getElementId = function(t) {
|
|
1021
1012
|
return "".concat(e.state.instancePrefix, "-").concat(t);
|
|
1022
1013
|
}, e.getComponents = function() {
|
|
1023
|
-
return
|
|
1014
|
+
return Rt(e.props);
|
|
1024
1015
|
}, e.buildCategorizedOptions = function() {
|
|
1025
1016
|
return ue(e.props, e.state.selectValue);
|
|
1026
1017
|
}, e.getCategorizedOptions = function() {
|
|
1027
1018
|
return e.props.menuIsOpen ? e.buildCategorizedOptions() : [];
|
|
1028
1019
|
}, e.buildFocusableOptions = function() {
|
|
1029
|
-
return
|
|
1020
|
+
return Ue(e.buildCategorizedOptions());
|
|
1030
1021
|
}, e.getFocusableOptions = function() {
|
|
1031
1022
|
return e.props.menuIsOpen ? e.buildFocusableOptions() : [];
|
|
1032
1023
|
}, e.ariaOnChange = function(t, a) {
|
|
@@ -1046,8 +1037,8 @@ var et = function(n) {
|
|
|
1046
1037
|
}
|
|
1047
1038
|
}, e.onDropdownIndicatorMouseDown = function(t) {
|
|
1048
1039
|
if (!(t && t.type === "mousedown" && t.button !== 0) && !e.props.isDisabled) {
|
|
1049
|
-
var a = e.props, r = a.isMulti,
|
|
1050
|
-
e.focusInput(),
|
|
1040
|
+
var a = e.props, r = a.isMulti, l = a.menuIsOpen;
|
|
1041
|
+
e.focusInput(), l ? (e.setState({
|
|
1051
1042
|
inputIsHiddenAfterUpdate: !r
|
|
1052
1043
|
}), e.onMenuClose()) : e.openMenu("first"), t.preventDefault();
|
|
1053
1044
|
}
|
|
@@ -1056,7 +1047,7 @@ var et = function(n) {
|
|
|
1056
1047
|
return e.focusInput();
|
|
1057
1048
|
}));
|
|
1058
1049
|
}, e.onScroll = function(t) {
|
|
1059
|
-
typeof e.props.closeMenuOnScroll == "boolean" ? t.target instanceof HTMLElement &&
|
|
1050
|
+
typeof e.props.closeMenuOnScroll == "boolean" ? t.target instanceof HTMLElement && Wt(t.target) && e.props.onMenuClose() : typeof e.props.closeMenuOnScroll == "function" && e.props.closeMenuOnScroll(t) && e.props.onMenuClose();
|
|
1060
1051
|
}, e.onCompositionStart = function() {
|
|
1061
1052
|
e.isComposing = !0;
|
|
1062
1053
|
}, e.onCompositionEnd = function() {
|
|
@@ -1067,8 +1058,8 @@ var et = function(n) {
|
|
|
1067
1058
|
}, e.onTouchMove = function(t) {
|
|
1068
1059
|
var a = t.touches, r = a && a.item(0);
|
|
1069
1060
|
if (r) {
|
|
1070
|
-
var
|
|
1071
|
-
e.userIsDragging =
|
|
1061
|
+
var l = Math.abs(r.clientX - e.initialTouchX), g = Math.abs(r.clientY - e.initialTouchY), f = 5;
|
|
1062
|
+
e.userIsDragging = l > f || g > f;
|
|
1072
1063
|
}
|
|
1073
1064
|
}, e.onTouchEnd = function(t) {
|
|
1074
1065
|
e.userIsDragging || (e.controlRef && !e.controlRef.contains(t.target) && e.menuListRef && !e.menuListRef.contains(t.target) && e.blurInput(), e.initialTouchX = 0, e.initialTouchY = 0);
|
|
@@ -1113,11 +1104,11 @@ var et = function(n) {
|
|
|
1113
1104
|
});
|
|
1114
1105
|
}
|
|
1115
1106
|
}, e.shouldHideSelectedOptions = function() {
|
|
1116
|
-
return
|
|
1107
|
+
return qe(e.props);
|
|
1117
1108
|
}, e.onValueInputFocus = function(t) {
|
|
1118
1109
|
t.preventDefault(), t.stopPropagation(), e.focus();
|
|
1119
1110
|
}, e.onKeyDown = function(t) {
|
|
1120
|
-
var a = e.props, r = a.isMulti,
|
|
1111
|
+
var a = e.props, r = a.isMulti, l = a.backspaceRemovesValue, g = a.escapeClearsValue, f = a.inputValue, v = a.isClearable, b = a.isDisabled, p = a.menuIsOpen, m = a.onKeyDown, E = a.tabSelectsValue, F = a.openMenuOnFocus, I = e.state, A = I.focusedOption, S = I.focusedValue, O = I.selectValue;
|
|
1121
1112
|
if (!b && !(typeof m == "function" && (m(t), t.defaultPrevented))) {
|
|
1122
1113
|
switch (e.blockOptionHover = !0, t.key) {
|
|
1123
1114
|
case "ArrowLeft":
|
|
@@ -1134,7 +1125,7 @@ var et = function(n) {
|
|
|
1134
1125
|
if (S)
|
|
1135
1126
|
e.removeValue(S);
|
|
1136
1127
|
else {
|
|
1137
|
-
if (!
|
|
1128
|
+
if (!l) return;
|
|
1138
1129
|
r ? e.popValue() : v && e.clearValue();
|
|
1139
1130
|
}
|
|
1140
1131
|
break;
|
|
@@ -1200,27 +1191,27 @@ var et = function(n) {
|
|
|
1200
1191
|
t.preventDefault();
|
|
1201
1192
|
}
|
|
1202
1193
|
}, e.state.instancePrefix = "react-select-" + (e.props.instanceId || ++kn), e.state.selectValue = ae(o.value), o.menuIsOpen && e.state.selectValue.length) {
|
|
1203
|
-
var i = e.getFocusableOptionsWithIds(),
|
|
1204
|
-
e.state.focusableOptionsWithIds = i, e.state.focusedOption =
|
|
1194
|
+
var i = e.getFocusableOptionsWithIds(), c = e.buildFocusableOptions(), d = c.indexOf(e.state.selectValue[0]);
|
|
1195
|
+
e.state.focusableOptionsWithIds = i, e.state.focusedOption = c[d], e.state.focusedOptionId = fe(i, c[d]);
|
|
1205
1196
|
}
|
|
1206
1197
|
return e;
|
|
1207
1198
|
}
|
|
1208
|
-
return
|
|
1199
|
+
return jt(s, [{
|
|
1209
1200
|
key: "componentDidMount",
|
|
1210
1201
|
value: function() {
|
|
1211
|
-
this.startListeningComposition(), this.startListeningToTouch(), this.props.closeMenuOnScroll && document && document.addEventListener && document.addEventListener("scroll", this.onScroll, !0), this.props.autoFocus && this.focusInput(), this.props.menuIsOpen && this.state.focusedOption && this.menuListRef && this.focusedOptionRef &&
|
|
1202
|
+
this.startListeningComposition(), this.startListeningToTouch(), this.props.closeMenuOnScroll && document && document.addEventListener && document.addEventListener("scroll", this.onScroll, !0), this.props.autoFocus && this.focusInput(), this.props.menuIsOpen && this.state.focusedOption && this.menuListRef && this.focusedOptionRef && Oe(this.menuListRef, this.focusedOptionRef);
|
|
1212
1203
|
}
|
|
1213
1204
|
}, {
|
|
1214
1205
|
key: "componentDidUpdate",
|
|
1215
1206
|
value: function(e) {
|
|
1216
|
-
var i = this.props,
|
|
1207
|
+
var i = this.props, c = i.isDisabled, d = i.menuIsOpen, t = this.state.isFocused;
|
|
1217
1208
|
// ensure focus is restored correctly when the control becomes enabled
|
|
1218
|
-
(t && !
|
|
1219
|
-
t && d && !e.menuIsOpen) && this.focusInput(), t &&
|
|
1209
|
+
(t && !c && e.isDisabled || // ensure focus is on the Input when the menu opens
|
|
1210
|
+
t && d && !e.menuIsOpen) && this.focusInput(), t && c && !e.isDisabled ? this.setState({
|
|
1220
1211
|
isFocused: !1
|
|
1221
|
-
}, this.onMenuClose) : !t && !
|
|
1212
|
+
}, this.onMenuClose) : !t && !c && e.isDisabled && this.inputRef === document.activeElement && this.setState({
|
|
1222
1213
|
isFocused: !0
|
|
1223
|
-
}), this.menuListRef && this.focusedOptionRef && this.scrollToFocusedOptionOnUpdate && (
|
|
1214
|
+
}), this.menuListRef && this.focusedOptionRef && this.scrollToFocusedOptionOnUpdate && (Oe(this.menuListRef, this.focusedOptionRef), this.scrollToFocusedOptionOnUpdate = !1);
|
|
1224
1215
|
}
|
|
1225
1216
|
}, {
|
|
1226
1217
|
key: "componentWillUnmount",
|
|
@@ -1265,10 +1256,10 @@ var et = function(n) {
|
|
|
1265
1256
|
}, {
|
|
1266
1257
|
key: "openMenu",
|
|
1267
1258
|
value: function(e) {
|
|
1268
|
-
var i = this,
|
|
1259
|
+
var i = this, c = this.state, d = c.selectValue, t = c.isFocused, a = this.buildFocusableOptions(), r = e === "first" ? 0 : a.length - 1;
|
|
1269
1260
|
if (!this.props.isMulti) {
|
|
1270
|
-
var
|
|
1271
|
-
|
|
1261
|
+
var l = a.indexOf(d[0]);
|
|
1262
|
+
l > -1 && (r = l);
|
|
1272
1263
|
}
|
|
1273
1264
|
this.scrollToFocusedOptionOnUpdate = !(t && this.menuListRef), this.setState({
|
|
1274
1265
|
inputIsHiddenAfterUpdate: !1,
|
|
@@ -1282,15 +1273,15 @@ var et = function(n) {
|
|
|
1282
1273
|
}, {
|
|
1283
1274
|
key: "focusValue",
|
|
1284
1275
|
value: function(e) {
|
|
1285
|
-
var i = this.state,
|
|
1276
|
+
var i = this.state, c = i.selectValue, d = i.focusedValue;
|
|
1286
1277
|
if (this.props.isMulti) {
|
|
1287
1278
|
this.setState({
|
|
1288
1279
|
focusedOption: null
|
|
1289
1280
|
});
|
|
1290
|
-
var t =
|
|
1281
|
+
var t = c.indexOf(d);
|
|
1291
1282
|
d || (t = -1);
|
|
1292
|
-
var a =
|
|
1293
|
-
if (
|
|
1283
|
+
var a = c.length - 1, r = -1;
|
|
1284
|
+
if (c.length) {
|
|
1294
1285
|
switch (e) {
|
|
1295
1286
|
case "previous":
|
|
1296
1287
|
t === 0 ? r = 0 : t === -1 ? r = a : r = t - 1;
|
|
@@ -1301,7 +1292,7 @@ var et = function(n) {
|
|
|
1301
1292
|
}
|
|
1302
1293
|
this.setState({
|
|
1303
1294
|
inputIsHidden: r !== -1,
|
|
1304
|
-
focusedValue:
|
|
1295
|
+
focusedValue: c[r]
|
|
1305
1296
|
});
|
|
1306
1297
|
}
|
|
1307
1298
|
}
|
|
@@ -1309,10 +1300,10 @@ var et = function(n) {
|
|
|
1309
1300
|
}, {
|
|
1310
1301
|
key: "focusOption",
|
|
1311
1302
|
value: function() {
|
|
1312
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "first", i = this.props.pageSize,
|
|
1303
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "first", i = this.props.pageSize, c = this.state.focusedOption, d = this.getFocusableOptions();
|
|
1313
1304
|
if (d.length) {
|
|
1314
|
-
var t = 0, a = d.indexOf(
|
|
1315
|
-
|
|
1305
|
+
var t = 0, a = d.indexOf(c);
|
|
1306
|
+
c || (a = -1), e === "up" ? t = a > 0 ? a - 1 : d.length - 1 : e === "down" ? t = (a + 1) % d.length : e === "pageup" ? (t = a - i, t < 0 && (t = 0)) : e === "pagedown" ? (t = a + i, t > d.length - 1 && (t = d.length - 1)) : e === "last" && (t = d.length - 1), this.scrollToFocusedOptionOnUpdate = !0, this.setState({
|
|
1316
1307
|
focusedOption: d[t],
|
|
1317
1308
|
focusedValue: null,
|
|
1318
1309
|
focusedOptionId: this.getFocusedOptionId(d[t])
|
|
@@ -1332,11 +1323,11 @@ var et = function(n) {
|
|
|
1332
1323
|
}, {
|
|
1333
1324
|
key: "getCommonProps",
|
|
1334
1325
|
value: function() {
|
|
1335
|
-
var e = this.clearValue, i = this.cx,
|
|
1326
|
+
var e = this.clearValue, i = this.cx, c = this.getStyles, d = this.getClassNames, t = this.getValue, a = this.selectOption, r = this.setValue, l = this.props, g = l.isMulti, f = l.isRtl, v = l.options, b = this.hasValue();
|
|
1336
1327
|
return {
|
|
1337
1328
|
clearValue: e,
|
|
1338
1329
|
cx: i,
|
|
1339
|
-
getStyles:
|
|
1330
|
+
getStyles: c,
|
|
1340
1331
|
getClassNames: d,
|
|
1341
1332
|
getValue: t,
|
|
1342
1333
|
hasValue: b,
|
|
@@ -1344,7 +1335,7 @@ var et = function(n) {
|
|
|
1344
1335
|
isRtl: f,
|
|
1345
1336
|
options: v,
|
|
1346
1337
|
selectOption: a,
|
|
1347
|
-
selectProps:
|
|
1338
|
+
selectProps: l,
|
|
1348
1339
|
setValue: r,
|
|
1349
1340
|
theme: this.getTheme()
|
|
1350
1341
|
};
|
|
@@ -1363,32 +1354,32 @@ var et = function(n) {
|
|
|
1363
1354
|
}, {
|
|
1364
1355
|
key: "isClearable",
|
|
1365
1356
|
value: function() {
|
|
1366
|
-
var e = this.props, i = e.isClearable,
|
|
1367
|
-
return i === void 0 ?
|
|
1357
|
+
var e = this.props, i = e.isClearable, c = e.isMulti;
|
|
1358
|
+
return i === void 0 ? c : i;
|
|
1368
1359
|
}
|
|
1369
1360
|
}, {
|
|
1370
1361
|
key: "isOptionDisabled",
|
|
1371
1362
|
value: function(e, i) {
|
|
1372
|
-
return
|
|
1363
|
+
return Qe(this.props, e, i);
|
|
1373
1364
|
}
|
|
1374
1365
|
}, {
|
|
1375
1366
|
key: "isOptionSelected",
|
|
1376
1367
|
value: function(e, i) {
|
|
1377
|
-
return
|
|
1368
|
+
return $e(this.props, e, i);
|
|
1378
1369
|
}
|
|
1379
1370
|
}, {
|
|
1380
1371
|
key: "filterOption",
|
|
1381
1372
|
value: function(e, i) {
|
|
1382
|
-
return
|
|
1373
|
+
return Ke(this.props, e, i);
|
|
1383
1374
|
}
|
|
1384
1375
|
}, {
|
|
1385
1376
|
key: "formatOptionLabel",
|
|
1386
1377
|
value: function(e, i) {
|
|
1387
1378
|
if (typeof this.props.formatOptionLabel == "function") {
|
|
1388
|
-
var
|
|
1379
|
+
var c = this.props.inputValue, d = this.state.selectValue;
|
|
1389
1380
|
return this.props.formatOptionLabel(e, {
|
|
1390
1381
|
context: i,
|
|
1391
|
-
inputValue:
|
|
1382
|
+
inputValue: c,
|
|
1392
1383
|
selectValue: d
|
|
1393
1384
|
});
|
|
1394
1385
|
} else
|
|
@@ -1439,9 +1430,9 @@ var et = function(n) {
|
|
|
1439
1430
|
// Renderers
|
|
1440
1431
|
// ==============================
|
|
1441
1432
|
function() {
|
|
1442
|
-
var e = this.props, i = e.isDisabled,
|
|
1433
|
+
var e = this.props, i = e.isDisabled, c = e.isSearchable, d = e.inputId, t = e.inputValue, a = e.tabIndex, r = e.form, l = e.menuIsOpen, g = e.required, f = this.getComponents(), v = f.Input, b = this.state, p = b.inputIsHidden, m = b.ariaSelection, E = this.commonProps, F = d || this.getElementId("input"), I = G(G(G({
|
|
1443
1434
|
"aria-autocomplete": "list",
|
|
1444
|
-
"aria-expanded":
|
|
1435
|
+
"aria-expanded": l,
|
|
1445
1436
|
"aria-haspopup": !0,
|
|
1446
1437
|
"aria-errormessage": this.props["aria-errormessage"],
|
|
1447
1438
|
"aria-invalid": this.props["aria-invalid"],
|
|
@@ -1450,16 +1441,16 @@ var et = function(n) {
|
|
|
1450
1441
|
"aria-required": g,
|
|
1451
1442
|
role: "combobox",
|
|
1452
1443
|
"aria-activedescendant": this.isAppleDevice ? void 0 : this.state.focusedOptionId || ""
|
|
1453
|
-
},
|
|
1444
|
+
}, l && {
|
|
1454
1445
|
"aria-controls": this.getElementId("listbox")
|
|
1455
|
-
}), !
|
|
1446
|
+
}), !c && {
|
|
1456
1447
|
"aria-readonly": !0
|
|
1457
|
-
}), this.hasValue() ?
|
|
1448
|
+
}), this.hasValue() ? m?.action === "initial-input-focus" && {
|
|
1458
1449
|
"aria-describedby": this.getElementId("live-region")
|
|
1459
1450
|
} : {
|
|
1460
1451
|
"aria-describedby": this.getElementId("placeholder")
|
|
1461
1452
|
});
|
|
1462
|
-
return
|
|
1453
|
+
return c ? /* @__PURE__ */ C.createElement(v, V({}, E, {
|
|
1463
1454
|
autoCapitalize: "none",
|
|
1464
1455
|
autoComplete: "off",
|
|
1465
1456
|
autoCorrect: "off",
|
|
@@ -1479,7 +1470,7 @@ var et = function(n) {
|
|
|
1479
1470
|
id: F,
|
|
1480
1471
|
innerRef: this.getInputRef,
|
|
1481
1472
|
onBlur: this.onInputBlur,
|
|
1482
|
-
onChange:
|
|
1473
|
+
onChange: Tt,
|
|
1483
1474
|
onFocus: this.onInputFocus,
|
|
1484
1475
|
disabled: i,
|
|
1485
1476
|
tabIndex: a,
|
|
@@ -1492,9 +1483,9 @@ var et = function(n) {
|
|
|
1492
1483
|
}, {
|
|
1493
1484
|
key: "renderPlaceholderOrValue",
|
|
1494
1485
|
value: function() {
|
|
1495
|
-
var e = this, i = this.getComponents(),
|
|
1486
|
+
var e = this, i = this.getComponents(), c = i.MultiValue, d = i.MultiValueContainer, t = i.MultiValueLabel, a = i.MultiValueRemove, r = i.SingleValue, l = i.Placeholder, g = this.commonProps, f = this.props, v = f.controlShouldRenderValue, b = f.isDisabled, p = f.isMulti, m = f.inputValue, E = f.placeholder, F = this.state, I = F.selectValue, A = F.focusedValue, S = F.isFocused;
|
|
1496
1487
|
if (!this.hasValue() || !v)
|
|
1497
|
-
return m ? null : /* @__PURE__ */ C.createElement(
|
|
1488
|
+
return m ? null : /* @__PURE__ */ C.createElement(l, V({}, g, {
|
|
1498
1489
|
key: "placeholder",
|
|
1499
1490
|
isDisabled: b,
|
|
1500
1491
|
isFocused: S,
|
|
@@ -1505,7 +1496,7 @@ var et = function(n) {
|
|
|
1505
1496
|
if (p)
|
|
1506
1497
|
return I.map(function(h, D) {
|
|
1507
1498
|
var L = h === A, R = "".concat(e.getOptionLabel(h), "-").concat(e.getOptionValue(h));
|
|
1508
|
-
return /* @__PURE__ */ C.createElement(
|
|
1499
|
+
return /* @__PURE__ */ C.createElement(c, V({}, g, {
|
|
1509
1500
|
components: {
|
|
1510
1501
|
Container: d,
|
|
1511
1502
|
Label: t,
|
|
@@ -1540,29 +1531,29 @@ var et = function(n) {
|
|
|
1540
1531
|
}, {
|
|
1541
1532
|
key: "renderClearIndicator",
|
|
1542
1533
|
value: function() {
|
|
1543
|
-
var e = this.getComponents(), i = e.ClearIndicator,
|
|
1534
|
+
var e = this.getComponents(), i = e.ClearIndicator, c = this.commonProps, d = this.props, t = d.isDisabled, a = d.isLoading, r = this.state.isFocused;
|
|
1544
1535
|
if (!this.isClearable() || !i || t || !this.hasValue() || a)
|
|
1545
1536
|
return null;
|
|
1546
|
-
var
|
|
1537
|
+
var l = {
|
|
1547
1538
|
onMouseDown: this.onClearIndicatorMouseDown,
|
|
1548
1539
|
onTouchEnd: this.onClearIndicatorTouchEnd,
|
|
1549
1540
|
"aria-hidden": "true"
|
|
1550
1541
|
};
|
|
1551
|
-
return /* @__PURE__ */ C.createElement(i, V({},
|
|
1552
|
-
innerProps:
|
|
1542
|
+
return /* @__PURE__ */ C.createElement(i, V({}, c, {
|
|
1543
|
+
innerProps: l,
|
|
1553
1544
|
isFocused: r
|
|
1554
1545
|
}));
|
|
1555
1546
|
}
|
|
1556
1547
|
}, {
|
|
1557
1548
|
key: "renderLoadingIndicator",
|
|
1558
1549
|
value: function() {
|
|
1559
|
-
var e = this.getComponents(), i = e.LoadingIndicator,
|
|
1550
|
+
var e = this.getComponents(), i = e.LoadingIndicator, c = this.commonProps, d = this.props, t = d.isDisabled, a = d.isLoading, r = this.state.isFocused;
|
|
1560
1551
|
if (!i || !a) return null;
|
|
1561
|
-
var
|
|
1552
|
+
var l = {
|
|
1562
1553
|
"aria-hidden": "true"
|
|
1563
1554
|
};
|
|
1564
|
-
return /* @__PURE__ */ C.createElement(i, V({},
|
|
1565
|
-
innerProps:
|
|
1555
|
+
return /* @__PURE__ */ C.createElement(i, V({}, c, {
|
|
1556
|
+
innerProps: l,
|
|
1566
1557
|
isDisabled: t,
|
|
1567
1558
|
isFocused: r
|
|
1568
1559
|
}));
|
|
@@ -1570,10 +1561,10 @@ var et = function(n) {
|
|
|
1570
1561
|
}, {
|
|
1571
1562
|
key: "renderIndicatorSeparator",
|
|
1572
1563
|
value: function() {
|
|
1573
|
-
var e = this.getComponents(), i = e.DropdownIndicator,
|
|
1574
|
-
if (!i || !
|
|
1564
|
+
var e = this.getComponents(), i = e.DropdownIndicator, c = e.IndicatorSeparator;
|
|
1565
|
+
if (!i || !c) return null;
|
|
1575
1566
|
var d = this.commonProps, t = this.props.isDisabled, a = this.state.isFocused;
|
|
1576
|
-
return /* @__PURE__ */ C.createElement(
|
|
1567
|
+
return /* @__PURE__ */ C.createElement(c, V({}, d, {
|
|
1577
1568
|
isDisabled: t,
|
|
1578
1569
|
isFocused: a
|
|
1579
1570
|
}));
|
|
@@ -1583,12 +1574,12 @@ var et = function(n) {
|
|
|
1583
1574
|
value: function() {
|
|
1584
1575
|
var e = this.getComponents(), i = e.DropdownIndicator;
|
|
1585
1576
|
if (!i) return null;
|
|
1586
|
-
var
|
|
1577
|
+
var c = this.commonProps, d = this.props.isDisabled, t = this.state.isFocused, a = {
|
|
1587
1578
|
onMouseDown: this.onDropdownIndicatorMouseDown,
|
|
1588
1579
|
onTouchEnd: this.onDropdownIndicatorTouchEnd,
|
|
1589
1580
|
"aria-hidden": "true"
|
|
1590
1581
|
};
|
|
1591
|
-
return /* @__PURE__ */ C.createElement(i, V({},
|
|
1582
|
+
return /* @__PURE__ */ C.createElement(i, V({}, c, {
|
|
1592
1583
|
innerProps: a,
|
|
1593
1584
|
isDisabled: d,
|
|
1594
1585
|
isFocused: t
|
|
@@ -1597,41 +1588,41 @@ var et = function(n) {
|
|
|
1597
1588
|
}, {
|
|
1598
1589
|
key: "renderMenu",
|
|
1599
1590
|
value: function() {
|
|
1600
|
-
var e = this, i = this.getComponents(),
|
|
1591
|
+
var e = this, i = this.getComponents(), c = i.Group, d = i.GroupHeading, t = i.Menu, a = i.MenuList, r = i.MenuPortal, l = i.LoadingMessage, g = i.NoOptionsMessage, f = i.Option, v = this.commonProps, b = this.state.focusedOption, p = this.props, m = p.captureMenuScroll, E = p.inputValue, F = p.isLoading, I = p.loadingMessage, A = p.minMenuHeight, S = p.maxMenuHeight, O = p.menuIsOpen, h = p.menuPlacement, D = p.menuPosition, L = p.menuPortalTarget, R = p.menuShouldBlockScroll, M = p.menuShouldScrollIntoView, T = p.noOptionsMessage, k = p.onMenuScrollToTop, x = p.onMenuScrollToBottom;
|
|
1601
1592
|
if (!O) return null;
|
|
1602
1593
|
var B = function(W, H) {
|
|
1603
|
-
var
|
|
1594
|
+
var _ = W.type, N = W.data, U = W.isDisabled, J = W.isSelected, ne = W.label, tt = W.value, Ie = b === N, Ce = U ? void 0 : function() {
|
|
1604
1595
|
return e.onOptionHover(N);
|
|
1605
|
-
},
|
|
1596
|
+
}, nt = U ? void 0 : function() {
|
|
1606
1597
|
return e.selectOption(N);
|
|
1607
|
-
},
|
|
1608
|
-
id:
|
|
1609
|
-
onClick:
|
|
1610
|
-
onMouseMove:
|
|
1611
|
-
onMouseOver:
|
|
1598
|
+
}, Ee = "".concat(e.getElementId("option"), "-").concat(H), ut = {
|
|
1599
|
+
id: Ee,
|
|
1600
|
+
onClick: nt,
|
|
1601
|
+
onMouseMove: Ce,
|
|
1602
|
+
onMouseOver: Ce,
|
|
1612
1603
|
tabIndex: -1,
|
|
1613
1604
|
role: "option",
|
|
1614
1605
|
"aria-selected": e.isAppleDevice ? void 0 : J
|
|
1615
1606
|
// is not supported on Apple devices
|
|
1616
1607
|
};
|
|
1617
1608
|
return /* @__PURE__ */ C.createElement(f, V({}, v, {
|
|
1618
|
-
innerProps:
|
|
1609
|
+
innerProps: ut,
|
|
1619
1610
|
data: N,
|
|
1620
1611
|
isDisabled: U,
|
|
1621
1612
|
isSelected: J,
|
|
1622
|
-
key:
|
|
1613
|
+
key: Ee,
|
|
1623
1614
|
label: ne,
|
|
1624
|
-
type:
|
|
1625
|
-
value:
|
|
1626
|
-
isFocused:
|
|
1627
|
-
innerRef:
|
|
1615
|
+
type: _,
|
|
1616
|
+
value: tt,
|
|
1617
|
+
isFocused: Ie,
|
|
1618
|
+
innerRef: Ie ? e.getFocusedOptionRef : void 0
|
|
1628
1619
|
}), e.formatOptionLabel(W.data, "menu"));
|
|
1629
1620
|
}, P;
|
|
1630
1621
|
if (this.hasOptions())
|
|
1631
1622
|
P = this.getCategorizedOptions().map(function(y) {
|
|
1632
1623
|
if (y.type === "group") {
|
|
1633
|
-
var W = y.data, H = y.options,
|
|
1634
|
-
return /* @__PURE__ */ C.createElement(
|
|
1624
|
+
var W = y.data, H = y.options, _ = y.index, N = "".concat(e.getElementId("group"), "-").concat(_), U = "".concat(N, "-heading");
|
|
1625
|
+
return /* @__PURE__ */ C.createElement(c, V({}, v, {
|
|
1635
1626
|
key: N,
|
|
1636
1627
|
data: W,
|
|
1637
1628
|
options: H,
|
|
@@ -1642,7 +1633,7 @@ var et = function(n) {
|
|
|
1642
1633
|
},
|
|
1643
1634
|
label: e.formatGroupLabel(y.data)
|
|
1644
1635
|
}), y.options.map(function(J) {
|
|
1645
|
-
return B(J, "".concat(
|
|
1636
|
+
return B(J, "".concat(_, "-").concat(J.index));
|
|
1646
1637
|
}));
|
|
1647
1638
|
} else if (y.type === "option")
|
|
1648
1639
|
return B(y, "".concat(y.index));
|
|
@@ -1652,7 +1643,7 @@ var et = function(n) {
|
|
|
1652
1643
|
inputValue: E
|
|
1653
1644
|
});
|
|
1654
1645
|
if (w === null) return null;
|
|
1655
|
-
P = /* @__PURE__ */ C.createElement(
|
|
1646
|
+
P = /* @__PURE__ */ C.createElement(l, v, w);
|
|
1656
1647
|
} else {
|
|
1657
1648
|
var Y = T({
|
|
1658
1649
|
inputValue: E
|
|
@@ -1660,22 +1651,22 @@ var et = function(n) {
|
|
|
1660
1651
|
if (Y === null) return null;
|
|
1661
1652
|
P = /* @__PURE__ */ C.createElement(g, v, Y);
|
|
1662
1653
|
}
|
|
1663
|
-
var
|
|
1654
|
+
var z = {
|
|
1664
1655
|
minMenuHeight: A,
|
|
1665
1656
|
maxMenuHeight: S,
|
|
1666
1657
|
menuPlacement: h,
|
|
1667
1658
|
menuPosition: D,
|
|
1668
1659
|
menuShouldScrollIntoView: M
|
|
1669
|
-
}, te = /* @__PURE__ */ C.createElement(
|
|
1670
|
-
var W = y.ref, H = y.placerProps,
|
|
1671
|
-
return /* @__PURE__ */ C.createElement(t, V({}, v,
|
|
1660
|
+
}, te = /* @__PURE__ */ C.createElement(Nt, V({}, v, z), function(y) {
|
|
1661
|
+
var W = y.ref, H = y.placerProps, _ = H.placement, N = H.maxHeight;
|
|
1662
|
+
return /* @__PURE__ */ C.createElement(t, V({}, v, z, {
|
|
1672
1663
|
innerRef: W,
|
|
1673
1664
|
innerProps: {
|
|
1674
1665
|
onMouseDown: e.onMenuMouseDown,
|
|
1675
1666
|
onMouseMove: e.onMenuMouseMove
|
|
1676
1667
|
},
|
|
1677
1668
|
isLoading: F,
|
|
1678
|
-
placement:
|
|
1669
|
+
placement: _
|
|
1679
1670
|
}), /* @__PURE__ */ C.createElement(En, {
|
|
1680
1671
|
captureEnabled: m,
|
|
1681
1672
|
onTopArrive: k,
|
|
@@ -1707,7 +1698,7 @@ var et = function(n) {
|
|
|
1707
1698
|
}, {
|
|
1708
1699
|
key: "renderFormField",
|
|
1709
1700
|
value: function() {
|
|
1710
|
-
var e = this, i = this.props,
|
|
1701
|
+
var e = this, i = this.props, c = i.delimiter, d = i.isDisabled, t = i.isMulti, a = i.name, r = i.required, l = this.state.selectValue;
|
|
1711
1702
|
if (r && !this.hasValue() && !d)
|
|
1712
1703
|
return /* @__PURE__ */ C.createElement(On, {
|
|
1713
1704
|
name: a,
|
|
@@ -1715,17 +1706,17 @@ var et = function(n) {
|
|
|
1715
1706
|
});
|
|
1716
1707
|
if (!(!a || d))
|
|
1717
1708
|
if (t)
|
|
1718
|
-
if (
|
|
1719
|
-
var g =
|
|
1709
|
+
if (c) {
|
|
1710
|
+
var g = l.map(function(b) {
|
|
1720
1711
|
return e.getOptionValue(b);
|
|
1721
|
-
}).join(
|
|
1712
|
+
}).join(c);
|
|
1722
1713
|
return /* @__PURE__ */ C.createElement("input", {
|
|
1723
1714
|
name: a,
|
|
1724
1715
|
type: "hidden",
|
|
1725
1716
|
value: g
|
|
1726
1717
|
});
|
|
1727
1718
|
} else {
|
|
1728
|
-
var f =
|
|
1719
|
+
var f = l.length > 0 ? l.map(function(b, p) {
|
|
1729
1720
|
return /* @__PURE__ */ C.createElement("input", {
|
|
1730
1721
|
key: "i-".concat(p),
|
|
1731
1722
|
name: a,
|
|
@@ -1740,7 +1731,7 @@ var et = function(n) {
|
|
|
1740
1731
|
return /* @__PURE__ */ C.createElement("div", null, f);
|
|
1741
1732
|
}
|
|
1742
1733
|
else {
|
|
1743
|
-
var v =
|
|
1734
|
+
var v = l[0] ? this.getOptionValue(l[0]) : "";
|
|
1744
1735
|
return /* @__PURE__ */ C.createElement("input", {
|
|
1745
1736
|
name: a,
|
|
1746
1737
|
type: "hidden",
|
|
@@ -1751,26 +1742,26 @@ var et = function(n) {
|
|
|
1751
1742
|
}, {
|
|
1752
1743
|
key: "renderLiveRegion",
|
|
1753
1744
|
value: function() {
|
|
1754
|
-
var e = this.commonProps, i = this.state,
|
|
1745
|
+
var e = this.commonProps, i = this.state, c = i.ariaSelection, d = i.focusedOption, t = i.focusedValue, a = i.isFocused, r = i.selectValue, l = this.getFocusableOptions();
|
|
1755
1746
|
return /* @__PURE__ */ C.createElement(rn, V({}, e, {
|
|
1756
1747
|
id: this.getElementId("live-region"),
|
|
1757
|
-
ariaSelection:
|
|
1748
|
+
ariaSelection: c,
|
|
1758
1749
|
focusedOption: d,
|
|
1759
1750
|
focusedValue: t,
|
|
1760
1751
|
isFocused: a,
|
|
1761
1752
|
selectValue: r,
|
|
1762
|
-
focusableOptions:
|
|
1753
|
+
focusableOptions: l,
|
|
1763
1754
|
isAppleDevice: this.isAppleDevice
|
|
1764
1755
|
}));
|
|
1765
1756
|
}
|
|
1766
1757
|
}, {
|
|
1767
1758
|
key: "render",
|
|
1768
1759
|
value: function() {
|
|
1769
|
-
var e = this.getComponents(), i = e.Control,
|
|
1760
|
+
var e = this.getComponents(), i = e.Control, c = e.IndicatorsContainer, d = e.SelectContainer, t = e.ValueContainer, a = this.props, r = a.className, l = a.id, g = a.isDisabled, f = a.menuIsOpen, v = this.state.isFocused, b = this.commonProps = this.getCommonProps();
|
|
1770
1761
|
return /* @__PURE__ */ C.createElement(d, V({}, b, {
|
|
1771
1762
|
className: r,
|
|
1772
1763
|
innerProps: {
|
|
1773
|
-
id:
|
|
1764
|
+
id: l,
|
|
1774
1765
|
onKeyDown: this.onKeyDown
|
|
1775
1766
|
},
|
|
1776
1767
|
isDisabled: g,
|
|
@@ -1786,16 +1777,16 @@ var et = function(n) {
|
|
|
1786
1777
|
menuIsOpen: f
|
|
1787
1778
|
}), /* @__PURE__ */ C.createElement(t, V({}, b, {
|
|
1788
1779
|
isDisabled: g
|
|
1789
|
-
}), this.renderPlaceholderOrValue(), this.renderInput()), /* @__PURE__ */ C.createElement(
|
|
1780
|
+
}), this.renderPlaceholderOrValue(), this.renderInput()), /* @__PURE__ */ C.createElement(c, V({}, b, {
|
|
1790
1781
|
isDisabled: g
|
|
1791
1782
|
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
|
1792
1783
|
}
|
|
1793
1784
|
}], [{
|
|
1794
1785
|
key: "getDerivedStateFromProps",
|
|
1795
1786
|
value: function(e, i) {
|
|
1796
|
-
var
|
|
1797
|
-
if (
|
|
1798
|
-
var I = b ? Tn(e, E) : [], A = b ?
|
|
1787
|
+
var c = i.prevProps, d = i.clearFocusValueOnUpdate, t = i.inputIsHiddenAfterUpdate, a = i.ariaSelection, r = i.isFocused, l = i.prevWasFocused, g = i.instancePrefix, f = e.options, v = e.value, b = e.menuIsOpen, p = e.inputValue, m = e.isMulti, E = ae(v), F = {};
|
|
1788
|
+
if (c && (v !== c.value || f !== c.options || b !== c.menuIsOpen || p !== c.inputValue)) {
|
|
1789
|
+
var I = b ? Tn(e, E) : [], A = b ? Xe(ue(e, E), "".concat(g, "-option")) : [], S = d ? Nn(i, E) : null, O = Pn(i, I), h = fe(A, O);
|
|
1799
1790
|
F = {
|
|
1800
1791
|
selectValue: E,
|
|
1801
1792
|
focusedOption: O,
|
|
@@ -1805,35 +1796,35 @@ var et = function(n) {
|
|
|
1805
1796
|
clearFocusValueOnUpdate: !1
|
|
1806
1797
|
};
|
|
1807
1798
|
}
|
|
1808
|
-
var D = t != null && e !==
|
|
1799
|
+
var D = t != null && e !== c ? {
|
|
1809
1800
|
inputIsHidden: t,
|
|
1810
1801
|
inputIsHiddenAfterUpdate: void 0
|
|
1811
|
-
} : {}, L = a, R = r &&
|
|
1802
|
+
} : {}, L = a, R = r && l;
|
|
1812
1803
|
return r && !R && (L = {
|
|
1813
1804
|
value: ee(m, E, E[0] || null),
|
|
1814
1805
|
options: E,
|
|
1815
1806
|
action: "initial-input-focus"
|
|
1816
|
-
}, R = !
|
|
1807
|
+
}, R = !l), a?.action === "initial-input-focus" && (L = null), G(G(G({}, F), D), {}, {
|
|
1817
1808
|
prevProps: e,
|
|
1818
1809
|
ariaSelection: L,
|
|
1819
1810
|
prevWasFocused: R
|
|
1820
1811
|
});
|
|
1821
1812
|
}
|
|
1822
1813
|
}]), s;
|
|
1823
|
-
}(
|
|
1824
|
-
|
|
1814
|
+
})(Yt);
|
|
1815
|
+
et.defaultProps = wn;
|
|
1825
1816
|
var Hn = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
1826
1817
|
function Jn(u) {
|
|
1827
|
-
var n = u.defaultInputValue, s = n === void 0 ? "" : n, o = u.defaultMenuIsOpen, e = o === void 0 ? !1 : o, i = u.defaultValue,
|
|
1818
|
+
var n = u.defaultInputValue, s = n === void 0 ? "" : n, o = u.defaultMenuIsOpen, e = o === void 0 ? !1 : o, i = u.defaultValue, c = i === void 0 ? null : i, d = u.inputValue, t = u.menuIsOpen, a = u.onChange, r = u.onInputChange, l = u.onMenuClose, g = u.onMenuOpen, f = u.value, v = me(u, Hn), b = re(d !== void 0 ? d : s), p = se(b, 2), m = p[0], E = p[1], F = re(t !== void 0 ? t : e), I = se(F, 2), A = I[0], S = I[1], O = re(f !== void 0 ? f : c), h = se(O, 2), D = h[0], L = h[1], R = X(function(w, Y) {
|
|
1828
1819
|
typeof a == "function" && a(w, Y), L(w);
|
|
1829
1820
|
}, [a]), M = X(function(w, Y) {
|
|
1830
|
-
var
|
|
1831
|
-
typeof r == "function" && (
|
|
1821
|
+
var z;
|
|
1822
|
+
typeof r == "function" && (z = r(w, Y)), E(z !== void 0 ? z : w);
|
|
1832
1823
|
}, [r]), T = X(function() {
|
|
1833
1824
|
typeof g == "function" && g(), S(!0);
|
|
1834
1825
|
}, [g]), k = X(function() {
|
|
1835
|
-
typeof
|
|
1836
|
-
}, [
|
|
1826
|
+
typeof l == "function" && l(), S(!1);
|
|
1827
|
+
}, [l]), x = d !== void 0 ? d : m, B = t !== void 0 ? t : A, P = f !== void 0 ? f : D;
|
|
1837
1828
|
return G(G({}, v), {}, {
|
|
1838
1829
|
inputValue: x,
|
|
1839
1830
|
menuIsOpen: B,
|
|
@@ -1844,18 +1835,18 @@ function Jn(u) {
|
|
|
1844
1835
|
value: P
|
|
1845
1836
|
});
|
|
1846
1837
|
}
|
|
1847
|
-
var Yn = ["allowCreateWhileLoading", "createOptionPosition", "formatCreateLabel", "isValidNewOption", "getNewOptionData", "onCreateOption", "options", "onChange"],
|
|
1848
|
-
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", s = arguments.length > 1 ? arguments[1] : void 0, o = arguments.length > 2 ? arguments[2] : void 0, e = String(n).toLowerCase(), i = String(o.getOptionValue(s)).toLowerCase(),
|
|
1849
|
-
return i === e ||
|
|
1838
|
+
var Yn = ["allowCreateWhileLoading", "createOptionPosition", "formatCreateLabel", "isValidNewOption", "getNewOptionData", "onCreateOption", "options", "onChange"], Te = function() {
|
|
1839
|
+
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", s = arguments.length > 1 ? arguments[1] : void 0, o = arguments.length > 2 ? arguments[2] : void 0, e = String(n).toLowerCase(), i = String(o.getOptionValue(s)).toLowerCase(), c = String(o.getOptionLabel(s)).toLowerCase();
|
|
1840
|
+
return i === e || c === e;
|
|
1850
1841
|
}, ge = {
|
|
1851
1842
|
formatCreateLabel: function(n) {
|
|
1852
1843
|
return 'Create "'.concat(n, '"');
|
|
1853
1844
|
},
|
|
1854
1845
|
isValidNewOption: function(n, s, o, e) {
|
|
1855
1846
|
return !(!n || s.some(function(i) {
|
|
1856
|
-
return
|
|
1847
|
+
return Te(n, i, e);
|
|
1857
1848
|
}) || o.some(function(i) {
|
|
1858
|
-
return
|
|
1849
|
+
return Te(n, i, e);
|
|
1859
1850
|
}));
|
|
1860
1851
|
},
|
|
1861
1852
|
getNewOptionData: function(n, s) {
|
|
@@ -1866,20 +1857,20 @@ var Yn = ["allowCreateWhileLoading", "createOptionPosition", "formatCreateLabel"
|
|
|
1866
1857
|
};
|
|
1867
1858
|
}
|
|
1868
1859
|
};
|
|
1869
|
-
function
|
|
1870
|
-
var n = u.allowCreateWhileLoading, s = n === void 0 ? !1 : n, o = u.createOptionPosition, e = o === void 0 ? "last" : o, i = u.formatCreateLabel,
|
|
1860
|
+
function zn(u) {
|
|
1861
|
+
var n = u.allowCreateWhileLoading, s = n === void 0 ? !1 : n, o = u.createOptionPosition, e = o === void 0 ? "last" : o, i = u.formatCreateLabel, c = i === void 0 ? ge.formatCreateLabel : i, d = u.isValidNewOption, t = d === void 0 ? ge.isValidNewOption : d, a = u.getNewOptionData, r = a === void 0 ? ge.getNewOptionData : a, l = u.onCreateOption, g = u.options, f = g === void 0 ? [] : g, v = u.onChange, b = me(u, Yn), p = b.getOptionValue, m = p === void 0 ? ze : p, E = b.getOptionLabel, F = E === void 0 ? Ye : E, I = b.inputValue, A = b.isLoading, S = b.isMulti, O = b.value, h = b.name, D = j(function() {
|
|
1871
1862
|
return t(I, ae(O), f, {
|
|
1872
1863
|
getOptionValue: m,
|
|
1873
1864
|
getOptionLabel: F
|
|
1874
|
-
}) ? r(I,
|
|
1875
|
-
}, [
|
|
1865
|
+
}) ? r(I, c(I)) : void 0;
|
|
1866
|
+
}, [c, r, F, m, I, t, f, O]), L = j(function() {
|
|
1876
1867
|
return (s || !A) && D ? e === "first" ? [D].concat(K(f)) : [].concat(K(f), [D]) : f;
|
|
1877
1868
|
}, [s, e, A, D, f]), R = X(function(M, T) {
|
|
1878
1869
|
if (T.action !== "select-option")
|
|
1879
1870
|
return v(M, T);
|
|
1880
1871
|
var k = Array.isArray(M) ? M : [M];
|
|
1881
1872
|
if (k[k.length - 1] === D) {
|
|
1882
|
-
if (
|
|
1873
|
+
if (l) l(I);
|
|
1883
1874
|
else {
|
|
1884
1875
|
var x = r(I, I), B = {
|
|
1885
1876
|
action: "create-option",
|
|
@@ -1891,22 +1882,22 @@ function _n(u) {
|
|
|
1891
1882
|
return;
|
|
1892
1883
|
}
|
|
1893
1884
|
v(M, T);
|
|
1894
|
-
}, [r, I, S, h, D,
|
|
1885
|
+
}, [r, I, S, h, D, l, v, O]);
|
|
1895
1886
|
return G(G({}, b), {}, {
|
|
1896
1887
|
options: L,
|
|
1897
1888
|
onChange: R
|
|
1898
1889
|
});
|
|
1899
1890
|
}
|
|
1900
|
-
var
|
|
1901
|
-
var s = Jn(u), o =
|
|
1902
|
-
return /* @__PURE__ */ C.createElement(
|
|
1891
|
+
var _n = /* @__PURE__ */ zt(function(u, n) {
|
|
1892
|
+
var s = Jn(u), o = zn(s);
|
|
1893
|
+
return /* @__PURE__ */ C.createElement(et, V({
|
|
1903
1894
|
ref: n
|
|
1904
1895
|
}, o));
|
|
1905
|
-
}), Un =
|
|
1906
|
-
const jn =
|
|
1896
|
+
}), Un = _n;
|
|
1897
|
+
const jn = Jt();
|
|
1907
1898
|
function Qn(u) {
|
|
1908
1899
|
const { value: n = [], placeholder: s, customProperties: o = {} } = u;
|
|
1909
|
-
return /* @__PURE__ */
|
|
1900
|
+
return /* @__PURE__ */ at(
|
|
1910
1901
|
Un,
|
|
1911
1902
|
{
|
|
1912
1903
|
...o,
|
|
@@ -1920,11 +1911,9 @@ function Qn(u) {
|
|
|
1920
1911
|
isMulti: !0,
|
|
1921
1912
|
value: n.map((e) => ({ label: e, value: e })),
|
|
1922
1913
|
onChange: (e) => {
|
|
1923
|
-
|
|
1924
|
-
(i = u.onChange) == null || i.call(
|
|
1925
|
-
u,
|
|
1914
|
+
u.onChange?.(
|
|
1926
1915
|
u.name,
|
|
1927
|
-
e.map(({ value:
|
|
1916
|
+
e.map(({ value: i }) => i)
|
|
1928
1917
|
);
|
|
1929
1918
|
}
|
|
1930
1919
|
}
|