@eightshift/ui-components 5.0.9 → 5.1.0
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/{Collection-uTAXq9Br.js → Collection-BRJOMbOa.js} +12 -7
- package/dist/{Dialog-CmAxaSUv.js → Dialog-D6EdDPeu.js} +8 -8
- package/dist/{useFormValidation-Dy0PXJg5.js → Form-Bnyyv3Im.js} +6 -4
- package/dist/{Group-DDPhPPTQ.js → Group-LBogWgyp.js} +2 -2
- package/dist/{Input-BmDS8Juy.js → Input-DfSBLhDx.js} +1 -1
- package/dist/List-BLeHBkfx.js +590 -0
- package/dist/{ListBox-_nDFq8-H.js → ListBox-BY3gwI8c.js} +3 -3
- package/dist/Select-BebwUgKB.js +764 -0
- package/dist/Separator-CTQWg_HO.js +1111 -0
- package/dist/TextField-o2U-uBWv.js +133 -0
- package/dist/assets/style-admin.css +268 -150
- package/dist/assets/style-editor.css +268 -150
- package/dist/assets/style.css +268 -150
- package/dist/assets/wp-font-enhancements.css +1 -1
- package/dist/assets/wp-ui-enhancements.css +1 -1
- package/dist/components/breakpoint-preview/breakpoint-preview.js +3 -4
- package/dist/components/button/button.js +3 -3
- package/dist/components/checkbox/checkbox.js +1 -2
- package/dist/components/color-pickers/color-picker.js +7 -9
- package/dist/components/color-pickers/color-swatch.js +1 -1
- package/dist/components/color-pickers/gradient-editor.js +19 -25
- package/dist/components/color-pickers/solid-color-picker.js +27 -27
- package/dist/components/component-toggle/component-toggle.js +1 -1
- package/dist/components/draggable/draggable-handle.js +2 -2
- package/dist/components/draggable/draggable.js +5 -5
- package/dist/components/draggable-list/draggable-list-item.js +2 -2
- package/dist/components/draggable-list/draggable-list.js +5 -5
- package/dist/components/expandable/expandable.js +1 -1
- package/dist/components/index.js +5 -5
- package/dist/components/input-field/input-field.js +13 -129
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +1463 -17
- package/dist/components/matrix-align/matrix-align.js +11 -14
- package/dist/components/menu/menu.js +4 -8
- package/dist/components/modal/modal.js +3 -3
- package/dist/components/number-picker/number-picker.js +9 -10
- package/dist/components/option-select/option-select.js +140 -156
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/placeholders/image-placeholder.js +3 -3
- package/dist/components/placeholders/media-placeholder.js +2 -2
- package/dist/components/popover/popover.js +10 -5
- package/dist/components/radio/radio.js +4 -5
- package/dist/components/repeater/repeater-item.js +1 -1
- package/dist/components/repeater/repeater.js +6 -6
- package/dist/components/responsive/mini-responsive.js +45 -47
- package/dist/components/responsive/responsive-legacy.js +51 -55
- package/dist/components/responsive/responsive.js +47 -49
- package/dist/components/responsive-preview/responsive-preview.js +12 -15
- package/dist/components/select/async-multi-select.js +4 -4
- package/dist/components/select/async-single-select.js +1 -1
- package/dist/components/select/multi-select-components.js +1 -1
- package/dist/components/select/multi-select.js +4 -4
- package/dist/components/select/shared.js +2 -2
- package/dist/components/select/single-select.js +1 -1
- package/dist/components/select/styles.js +3 -3
- package/dist/components/select/v2/async-select.js +215 -158
- package/dist/components/select/v2/shared.js +29 -20
- package/dist/components/select/v2/single-select.js +202 -851
- package/dist/components/slider/column-config-slider.js +2 -2
- package/dist/components/slider/slider.js +2 -2
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/tabs/tabs.js +7 -8
- package/dist/components/toggle/switch.js +4 -3
- package/dist/components/toggle-button/toggle-button.js +1 -1
- package/dist/{default-i18n-CT_oS1Fy.js → default-i18n-OFa3zAyB.js} +5 -9
- package/dist/icons/jsx-svg.js +35 -5
- package/dist/index.js +4 -4
- package/dist/{multi-select-components-Sp-JEFEX.js → multi-select-components-BcKzA24f.js} +3 -3
- package/dist/{react-jsx-parser.min-DZCiis5V.js → react-jsx-parser.min-LF707GK8.js} +312 -332
- package/dist/useAsyncList-fLtZMvJO.js +420 -0
- package/dist/useFilter-BR5z1A4Q.js +50 -0
- package/dist/{useListState-9Hq_FiRF.js → useListState-BrZ2XvDS.js} +1 -1
- package/dist/{useNumberField-D0u2bh8g.js → useNumberField-y0dLc_6m.js} +2 -2
- package/dist/{useSingleSelectListState-DqhemUIh.js → useSingleSelectListState-Bh46cRXs.js} +1 -1
- package/dist/utilities/array-helpers.js +4 -7
- package/dist/utilities/es-dash.js +21 -3
- package/dist/utilities/index.js +2 -1
- package/dist/utilities/text-helpers.js +3 -3
- package/package.json +9 -9
- package/dist/ComboBox-BANSEKnb.js +0 -1915
- package/dist/Form-Cq3fu75_.js +0 -5
- package/dist/List-CZMUbkFU.js +0 -593
- package/dist/Separator-BN3mjL6q.js +0 -332
|
@@ -1,1915 +0,0 @@
|
|
|
1
|
-
import React__default, { useRef, useEffect, useCallback, useMemo, useState, useReducer, forwardRef, createContext } from "react";
|
|
2
|
-
import { c as $319e236875307eab$export$a9b970dcc4ae71a9, a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "./Button-DH22t_SM.js";
|
|
3
|
-
import { p as $ff5963eb1fccf552$export$e08e3b67e392101e, d as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, g as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, h as $64fa3d84918910a7$export$ef03459518577ad4, b as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a } from "./utils-CZt7LCbO.js";
|
|
4
|
-
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "./FieldError-DHrSdE_Q.js";
|
|
5
|
-
import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "./Form-Cq3fu75_.js";
|
|
6
|
-
import { a as $a049562f99e7db0e$export$f9c6924e160136d1 } from "./Group-DDPhPPTQ.js";
|
|
7
|
-
import { b as $2d73ec29415bd339$export$712718f7aec83d5, a as $3985021b0ad6602f$export$37fb8590cf2c088c } from "./Input-BmDS8Juy.js";
|
|
8
|
-
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-JS_ob-kh.js";
|
|
9
|
-
import { d as $b1f0cad8af73213b$export$3585ede4d035bf14, e as $b1f0cad8af73213b$export$9145995848b05025, b as $eed445e0843c11d0$export$7ff8f37d2d81a48d, c as $eed445e0843c11d0$export$7c5906fe4f1f2af2 } from "./ListBox-_nDFq8-H.js";
|
|
10
|
-
import { o as $168583247155ddda$export$dc9c12ed27dd1b49, k as $5e3802645cc19319$export$1c3ebcada18427bf, l as $de32f1b87079253c$export$d2f961adcb0afbe, p as $07b14b47974efb58$export$9b9a0cd73afb7ca4 } from "./Dialog-CmAxaSUv.js";
|
|
11
|
-
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-BuJgePCv.js";
|
|
12
|
-
import { i as $ae20dd8cbca75726$export$d6daf82dcd84e87c, n as $c5a24bc478652b5f$export$1005530eda016c13, p as $55f9b1ae81f22853$export$2b35b76d2e30e129, e as $e1995378a142960e$export$bf788dd355e3a401 } from "./Collection-uTAXq9Br.js";
|
|
13
|
-
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
|
|
14
|
-
import { $ as $fc909762b330b746$export$61c6a8c84e605fb6, f as $9daab02d461809db$export$683480f191c0e3ea } from "./OverlayArrow-BUfV-5P3.js";
|
|
15
|
-
import { f as $325a3faab7a68acd$export$a16aca283550c30d, g as $2a25aae57d74318e$export$a05409b8bb224a5a, d as $453cc9f0df89c0a5$export$77d5aafae4e095b2 } from "./Separator-BN3mjL6q.js";
|
|
16
|
-
import { b as $e5be200c675c3b3a$export$a763b9476acd3eb, $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10 } from "./useFormValidation-Dy0PXJg5.js";
|
|
17
|
-
import { $ as $a0d645289fe9b86b$export$e7f05e985daf4b5f } from "./useSingleSelectListState-DqhemUIh.js";
|
|
18
|
-
import { c as $a02d57049d202695$export$d085fb9e920b5ca7 } from "./useListState-9Hq_FiRF.js";
|
|
19
|
-
import { K as $c87311424ea30a05$export$e1865c3bedcd822b, i as $d4ee10de306f2510$export$cd4e5573fbe2b576, d as $431fbd86ca7dc216$export$b204af158042fbac, b as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useHover-C2SkI1Fn.js";
|
|
20
|
-
import { b as $ea8dcbcb9ea1b556$export$9a302a45f65d0572 } from "./usePress-DWBuejBp.js";
|
|
21
|
-
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-B7-lUnAF.js";
|
|
22
|
-
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-C9GO0IDB.js";
|
|
23
|
-
function $4f58c5f72bcf79f7$export$496315a1608d9602(effect, dependencies) {
|
|
24
|
-
const isInitialMount = useRef(true);
|
|
25
|
-
const lastDeps = useRef(null);
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
isInitialMount.current = true;
|
|
28
|
-
return () => {
|
|
29
|
-
isInitialMount.current = false;
|
|
30
|
-
};
|
|
31
|
-
}, []);
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
let prevDeps = lastDeps.current;
|
|
34
|
-
if (isInitialMount.current) isInitialMount.current = false;
|
|
35
|
-
else if (!prevDeps || dependencies.some((dep, i) => !Object.is(dep, prevDeps[i]))) effect();
|
|
36
|
-
lastDeps.current = dependencies;
|
|
37
|
-
}, dependencies);
|
|
38
|
-
}
|
|
39
|
-
function $bb77f239b46e8c72$export$3274cf84b703fff(options) {
|
|
40
|
-
let collator = $325a3faab7a68acd$export$a16aca283550c30d({
|
|
41
|
-
usage: "search",
|
|
42
|
-
...options
|
|
43
|
-
});
|
|
44
|
-
let startsWith = useCallback((string, substring) => {
|
|
45
|
-
if (substring.length === 0) return true;
|
|
46
|
-
string = string.normalize("NFC");
|
|
47
|
-
substring = substring.normalize("NFC");
|
|
48
|
-
return collator.compare(string.slice(0, substring.length), substring) === 0;
|
|
49
|
-
}, [
|
|
50
|
-
collator
|
|
51
|
-
]);
|
|
52
|
-
let endsWith = useCallback((string, substring) => {
|
|
53
|
-
if (substring.length === 0) return true;
|
|
54
|
-
string = string.normalize("NFC");
|
|
55
|
-
substring = substring.normalize("NFC");
|
|
56
|
-
return collator.compare(string.slice(-substring.length), substring) === 0;
|
|
57
|
-
}, [
|
|
58
|
-
collator
|
|
59
|
-
]);
|
|
60
|
-
let contains = useCallback((string, substring) => {
|
|
61
|
-
if (substring.length === 0) return true;
|
|
62
|
-
string = string.normalize("NFC");
|
|
63
|
-
substring = substring.normalize("NFC");
|
|
64
|
-
let scan = 0;
|
|
65
|
-
let sliceLen = substring.length;
|
|
66
|
-
for (; scan + sliceLen <= string.length; scan++) {
|
|
67
|
-
let slice = string.slice(scan, scan + sliceLen);
|
|
68
|
-
if (collator.compare(substring, slice) === 0) return true;
|
|
69
|
-
}
|
|
70
|
-
return false;
|
|
71
|
-
}, [
|
|
72
|
-
collator
|
|
73
|
-
]);
|
|
74
|
-
return useMemo(() => ({
|
|
75
|
-
startsWith,
|
|
76
|
-
endsWith,
|
|
77
|
-
contains
|
|
78
|
-
}), [
|
|
79
|
-
startsWith,
|
|
80
|
-
endsWith,
|
|
81
|
-
contains
|
|
82
|
-
]);
|
|
83
|
-
}
|
|
84
|
-
var $02cb4c75c506befe$exports = {};
|
|
85
|
-
$02cb4c75c506befe$exports = {
|
|
86
|
-
"buttonLabel": `عرض المقترحات`,
|
|
87
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
88
|
-
one: () => `${formatter.number(args.optionCount)} خيار`,
|
|
89
|
-
other: () => `${formatter.number(args.optionCount)} خيارات`
|
|
90
|
-
})} متاحة.`,
|
|
91
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
92
|
-
true: () => `المجموعة المدخلة ${args.groupTitle}, مع ${formatter.plural(args.groupCount, {
|
|
93
|
-
one: () => `${formatter.number(args.groupCount)} خيار`,
|
|
94
|
-
other: () => `${formatter.number(args.groupCount)} خيارات`
|
|
95
|
-
})}. `,
|
|
96
|
-
other: ``
|
|
97
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
98
|
-
true: `, محدد`,
|
|
99
|
-
other: ``
|
|
100
|
-
}, args.isSelected)}`,
|
|
101
|
-
"listboxLabel": `مقترحات`,
|
|
102
|
-
"selectedAnnouncement": (args) => `${args.optionText}، محدد`
|
|
103
|
-
};
|
|
104
|
-
var $568b8163f1e56faf$exports = {};
|
|
105
|
-
$568b8163f1e56faf$exports = {
|
|
106
|
-
"buttonLabel": `Покажи предложения`,
|
|
107
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
108
|
-
one: () => `${formatter.number(args.optionCount)} опция`,
|
|
109
|
-
other: () => `${formatter.number(args.optionCount)} опции`
|
|
110
|
-
})} на разположение.`,
|
|
111
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
112
|
-
true: () => `Въведена група ${args.groupTitle}, с ${formatter.plural(args.groupCount, {
|
|
113
|
-
one: () => `${formatter.number(args.groupCount)} опция`,
|
|
114
|
-
other: () => `${formatter.number(args.groupCount)} опции`
|
|
115
|
-
})}. `,
|
|
116
|
-
other: ``
|
|
117
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
118
|
-
true: `, избрани`,
|
|
119
|
-
other: ``
|
|
120
|
-
}, args.isSelected)}`,
|
|
121
|
-
"listboxLabel": `Предложения`,
|
|
122
|
-
"selectedAnnouncement": (args) => `${args.optionText}, избрани`
|
|
123
|
-
};
|
|
124
|
-
var $87581c0202d106b8$exports = {};
|
|
125
|
-
$87581c0202d106b8$exports = {
|
|
126
|
-
"buttonLabel": `Zobrazit doporučení`,
|
|
127
|
-
"countAnnouncement": (args, formatter) => `K dispozici ${formatter.plural(args.optionCount, {
|
|
128
|
-
one: () => `je ${formatter.number(args.optionCount)} možnost`,
|
|
129
|
-
other: () => `jsou/je ${formatter.number(args.optionCount)} možnosti/-í`
|
|
130
|
-
})}.`,
|
|
131
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
132
|
-
true: () => `Zadaná skupina „${args.groupTitle}“ ${formatter.plural(args.groupCount, {
|
|
133
|
-
one: () => `s ${formatter.number(args.groupCount)} možností`,
|
|
134
|
-
other: () => `se ${formatter.number(args.groupCount)} možnostmi`
|
|
135
|
-
})}. `,
|
|
136
|
-
other: ``
|
|
137
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
138
|
-
true: ` (vybráno)`,
|
|
139
|
-
other: ``
|
|
140
|
-
}, args.isSelected)}`,
|
|
141
|
-
"listboxLabel": `Návrhy`,
|
|
142
|
-
"selectedAnnouncement": (args) => `${args.optionText}, vybráno`
|
|
143
|
-
};
|
|
144
|
-
var $a10a0369f5433ed1$exports = {};
|
|
145
|
-
$a10a0369f5433ed1$exports = {
|
|
146
|
-
"buttonLabel": `Vis forslag`,
|
|
147
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
148
|
-
one: () => `${formatter.number(args.optionCount)} mulighed tilgængelig`,
|
|
149
|
-
other: () => `${formatter.number(args.optionCount)} muligheder tilgængelige`
|
|
150
|
-
})}.`,
|
|
151
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
152
|
-
true: () => `Angivet gruppe ${args.groupTitle}, med ${formatter.plural(args.groupCount, {
|
|
153
|
-
one: () => `${formatter.number(args.groupCount)} mulighed`,
|
|
154
|
-
other: () => `${formatter.number(args.groupCount)} muligheder`
|
|
155
|
-
})}. `,
|
|
156
|
-
other: ``
|
|
157
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
158
|
-
true: `, valgt`,
|
|
159
|
-
other: ``
|
|
160
|
-
}, args.isSelected)}`,
|
|
161
|
-
"listboxLabel": `Forslag`,
|
|
162
|
-
"selectedAnnouncement": (args) => `${args.optionText}, valgt`
|
|
163
|
-
};
|
|
164
|
-
var $bfd288727d5cb166$exports = {};
|
|
165
|
-
$bfd288727d5cb166$exports = {
|
|
166
|
-
"buttonLabel": `Empfehlungen anzeigen`,
|
|
167
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
168
|
-
one: () => `${formatter.number(args.optionCount)} Option`,
|
|
169
|
-
other: () => `${formatter.number(args.optionCount)} Optionen`
|
|
170
|
-
})} verfügbar.`,
|
|
171
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
172
|
-
true: () => `Eingetretene Gruppe ${args.groupTitle}, mit ${formatter.plural(args.groupCount, {
|
|
173
|
-
one: () => `${formatter.number(args.groupCount)} Option`,
|
|
174
|
-
other: () => `${formatter.number(args.groupCount)} Optionen`
|
|
175
|
-
})}. `,
|
|
176
|
-
other: ``
|
|
177
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
178
|
-
true: `, ausgewählt`,
|
|
179
|
-
other: ``
|
|
180
|
-
}, args.isSelected)}`,
|
|
181
|
-
"listboxLabel": `Empfehlungen`,
|
|
182
|
-
"selectedAnnouncement": (args) => `${args.optionText}, ausgewählt`
|
|
183
|
-
};
|
|
184
|
-
var $ca177778f9a74e3c$exports = {};
|
|
185
|
-
$ca177778f9a74e3c$exports = {
|
|
186
|
-
"buttonLabel": `Προβολή προτάσεων`,
|
|
187
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
188
|
-
one: () => `${formatter.number(args.optionCount)} επιλογή`,
|
|
189
|
-
other: () => `${formatter.number(args.optionCount)} επιλογές `
|
|
190
|
-
})} διαθέσιμες.`,
|
|
191
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
192
|
-
true: () => `Εισαγμένη ομάδα ${args.groupTitle}, με ${formatter.plural(args.groupCount, {
|
|
193
|
-
one: () => `${formatter.number(args.groupCount)} επιλογή`,
|
|
194
|
-
other: () => `${formatter.number(args.groupCount)} επιλογές`
|
|
195
|
-
})}. `,
|
|
196
|
-
other: ``
|
|
197
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
198
|
-
true: `, επιλεγμένο`,
|
|
199
|
-
other: ``
|
|
200
|
-
}, args.isSelected)}`,
|
|
201
|
-
"listboxLabel": `Προτάσεις`,
|
|
202
|
-
"selectedAnnouncement": (args) => `${args.optionText}, επιλέχθηκε`
|
|
203
|
-
};
|
|
204
|
-
var $9b5aa79ef84beb6c$exports = {};
|
|
205
|
-
$9b5aa79ef84beb6c$exports = {
|
|
206
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
207
|
-
true: () => `Entered group ${args.groupTitle}, with ${formatter.plural(args.groupCount, {
|
|
208
|
-
one: () => `${formatter.number(args.groupCount)} option`,
|
|
209
|
-
other: () => `${formatter.number(args.groupCount)} options`
|
|
210
|
-
})}. `,
|
|
211
|
-
other: ``
|
|
212
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
213
|
-
true: `, selected`,
|
|
214
|
-
other: ``
|
|
215
|
-
}, args.isSelected)}`,
|
|
216
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
217
|
-
one: () => `${formatter.number(args.optionCount)} option`,
|
|
218
|
-
other: () => `${formatter.number(args.optionCount)} options`
|
|
219
|
-
})} available.`,
|
|
220
|
-
"selectedAnnouncement": (args) => `${args.optionText}, selected`,
|
|
221
|
-
"buttonLabel": `Show suggestions`,
|
|
222
|
-
"listboxLabel": `Suggestions`
|
|
223
|
-
};
|
|
224
|
-
var $57968e8209de2557$exports = {};
|
|
225
|
-
$57968e8209de2557$exports = {
|
|
226
|
-
"buttonLabel": `Mostrar sugerencias`,
|
|
227
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
228
|
-
one: () => `${formatter.number(args.optionCount)} opción`,
|
|
229
|
-
other: () => `${formatter.number(args.optionCount)} opciones`
|
|
230
|
-
})} disponible(s).`,
|
|
231
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
232
|
-
true: () => `Se ha unido al grupo ${args.groupTitle}, con ${formatter.plural(args.groupCount, {
|
|
233
|
-
one: () => `${formatter.number(args.groupCount)} opción`,
|
|
234
|
-
other: () => `${formatter.number(args.groupCount)} opciones`
|
|
235
|
-
})}. `,
|
|
236
|
-
other: ``
|
|
237
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
238
|
-
true: `, seleccionado`,
|
|
239
|
-
other: ``
|
|
240
|
-
}, args.isSelected)}`,
|
|
241
|
-
"listboxLabel": `Sugerencias`,
|
|
242
|
-
"selectedAnnouncement": (args) => `${args.optionText}, seleccionado`
|
|
243
|
-
};
|
|
244
|
-
var $60690790bf4c1c6a$exports = {};
|
|
245
|
-
$60690790bf4c1c6a$exports = {
|
|
246
|
-
"buttonLabel": `Kuva soovitused`,
|
|
247
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
248
|
-
one: () => `${formatter.number(args.optionCount)} valik`,
|
|
249
|
-
other: () => `${formatter.number(args.optionCount)} valikud`
|
|
250
|
-
})} saadaval.`,
|
|
251
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
252
|
-
true: () => `Sisestatud rühm ${args.groupTitle}, valikuga ${formatter.plural(args.groupCount, {
|
|
253
|
-
one: () => `${formatter.number(args.groupCount)} valik`,
|
|
254
|
-
other: () => `${formatter.number(args.groupCount)} valikud`
|
|
255
|
-
})}. `,
|
|
256
|
-
other: ``
|
|
257
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
258
|
-
true: `, valitud`,
|
|
259
|
-
other: ``
|
|
260
|
-
}, args.isSelected)}`,
|
|
261
|
-
"listboxLabel": `Soovitused`,
|
|
262
|
-
"selectedAnnouncement": (args) => `${args.optionText}, valitud`
|
|
263
|
-
};
|
|
264
|
-
var $1101246e8c7d9357$exports = {};
|
|
265
|
-
$1101246e8c7d9357$exports = {
|
|
266
|
-
"buttonLabel": `Näytä ehdotukset`,
|
|
267
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
268
|
-
one: () => `${formatter.number(args.optionCount)} vaihtoehto`,
|
|
269
|
-
other: () => `${formatter.number(args.optionCount)} vaihtoehdot`
|
|
270
|
-
})} saatavilla.`,
|
|
271
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
272
|
-
true: () => `Mentiin ryhmään ${args.groupTitle}, ${formatter.plural(args.groupCount, {
|
|
273
|
-
one: () => `${formatter.number(args.groupCount)} vaihtoehdon`,
|
|
274
|
-
other: () => `${formatter.number(args.groupCount)} vaihtoehdon`
|
|
275
|
-
})} kanssa.`,
|
|
276
|
-
other: ``
|
|
277
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
278
|
-
true: `, valittu`,
|
|
279
|
-
other: ``
|
|
280
|
-
}, args.isSelected)}`,
|
|
281
|
-
"listboxLabel": `Ehdotukset`,
|
|
282
|
-
"selectedAnnouncement": (args) => `${args.optionText}, valittu`
|
|
283
|
-
};
|
|
284
|
-
var $6404b5cb5b241730$exports = {};
|
|
285
|
-
$6404b5cb5b241730$exports = {
|
|
286
|
-
"buttonLabel": `Afficher les suggestions`,
|
|
287
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
288
|
-
one: () => `${formatter.number(args.optionCount)} option`,
|
|
289
|
-
other: () => `${formatter.number(args.optionCount)} options`
|
|
290
|
-
})} disponible(s).`,
|
|
291
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
292
|
-
true: () => `Groupe ${args.groupTitle} rejoint, avec ${formatter.plural(args.groupCount, {
|
|
293
|
-
one: () => `${formatter.number(args.groupCount)} option`,
|
|
294
|
-
other: () => `${formatter.number(args.groupCount)} options`
|
|
295
|
-
})}. `,
|
|
296
|
-
other: ``
|
|
297
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
298
|
-
true: `, sélectionné(s)`,
|
|
299
|
-
other: ``
|
|
300
|
-
}, args.isSelected)}`,
|
|
301
|
-
"listboxLabel": `Suggestions`,
|
|
302
|
-
"selectedAnnouncement": (args) => `${args.optionText}, sélectionné`
|
|
303
|
-
};
|
|
304
|
-
var $dfeafa702e92e31f$exports = {};
|
|
305
|
-
$dfeafa702e92e31f$exports = {
|
|
306
|
-
"buttonLabel": `הצג הצעות`,
|
|
307
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
308
|
-
one: () => `אפשרות ${formatter.number(args.optionCount)}`,
|
|
309
|
-
other: () => `${formatter.number(args.optionCount)} אפשרויות`
|
|
310
|
-
})} במצב זמין.`,
|
|
311
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
312
|
-
true: () => `נכנס לקבוצה ${args.groupTitle}, עם ${formatter.plural(args.groupCount, {
|
|
313
|
-
one: () => `אפשרות ${formatter.number(args.groupCount)}`,
|
|
314
|
-
other: () => `${formatter.number(args.groupCount)} אפשרויות`
|
|
315
|
-
})}. `,
|
|
316
|
-
other: ``
|
|
317
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
318
|
-
true: `, נבחר`,
|
|
319
|
-
other: ``
|
|
320
|
-
}, args.isSelected)}`,
|
|
321
|
-
"listboxLabel": `הצעות`,
|
|
322
|
-
"selectedAnnouncement": (args) => `${args.optionText}, נבחר`
|
|
323
|
-
};
|
|
324
|
-
var $2d125e0b34676352$exports = {};
|
|
325
|
-
$2d125e0b34676352$exports = {
|
|
326
|
-
"buttonLabel": `Prikaži prijedloge`,
|
|
327
|
-
"countAnnouncement": (args, formatter) => `Dostupno još: ${formatter.plural(args.optionCount, {
|
|
328
|
-
one: () => `${formatter.number(args.optionCount)} opcija`,
|
|
329
|
-
other: () => `${formatter.number(args.optionCount)} opcije/a`
|
|
330
|
-
})}.`,
|
|
331
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
332
|
-
true: () => `Unesena skupina ${args.groupTitle}, s ${formatter.plural(args.groupCount, {
|
|
333
|
-
one: () => `${formatter.number(args.groupCount)} opcijom`,
|
|
334
|
-
other: () => `${formatter.number(args.groupCount)} opcije/a`
|
|
335
|
-
})}. `,
|
|
336
|
-
other: ``
|
|
337
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
338
|
-
true: `, odabranih`,
|
|
339
|
-
other: ``
|
|
340
|
-
}, args.isSelected)}`,
|
|
341
|
-
"listboxLabel": `Prijedlozi`,
|
|
342
|
-
"selectedAnnouncement": (args) => `${args.optionText}, odabrano`
|
|
343
|
-
};
|
|
344
|
-
var $ea029611d7634059$exports = {};
|
|
345
|
-
$ea029611d7634059$exports = {
|
|
346
|
-
"buttonLabel": `Javaslatok megjelenítése`,
|
|
347
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
348
|
-
one: () => `${formatter.number(args.optionCount)} lehetőség`,
|
|
349
|
-
other: () => `${formatter.number(args.optionCount)} lehetőség`
|
|
350
|
-
})} áll rendelkezésre.`,
|
|
351
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
352
|
-
true: () => `Belépett a(z) ${args.groupTitle} csoportba, amely ${formatter.plural(args.groupCount, {
|
|
353
|
-
one: () => `${formatter.number(args.groupCount)} lehetőséget`,
|
|
354
|
-
other: () => `${formatter.number(args.groupCount)} lehetőséget`
|
|
355
|
-
})} tartalmaz. `,
|
|
356
|
-
other: ``
|
|
357
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
358
|
-
true: `, kijelölve`,
|
|
359
|
-
other: ``
|
|
360
|
-
}, args.isSelected)}`,
|
|
361
|
-
"listboxLabel": `Javaslatok`,
|
|
362
|
-
"selectedAnnouncement": (args) => `${args.optionText}, kijelölve`
|
|
363
|
-
};
|
|
364
|
-
var $77f075bb86ad7091$exports = {};
|
|
365
|
-
$77f075bb86ad7091$exports = {
|
|
366
|
-
"buttonLabel": `Mostra suggerimenti`,
|
|
367
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
368
|
-
one: () => `${formatter.number(args.optionCount)} opzione disponibile`,
|
|
369
|
-
other: () => `${formatter.number(args.optionCount)} opzioni disponibili`
|
|
370
|
-
})}.`,
|
|
371
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
372
|
-
true: () => `Ingresso nel gruppo ${args.groupTitle}, con ${formatter.plural(args.groupCount, {
|
|
373
|
-
one: () => `${formatter.number(args.groupCount)} opzione`,
|
|
374
|
-
other: () => `${formatter.number(args.groupCount)} opzioni`
|
|
375
|
-
})}. `,
|
|
376
|
-
other: ``
|
|
377
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
378
|
-
true: `, selezionato`,
|
|
379
|
-
other: ``
|
|
380
|
-
}, args.isSelected)}`,
|
|
381
|
-
"listboxLabel": `Suggerimenti`,
|
|
382
|
-
"selectedAnnouncement": (args) => `${args.optionText}, selezionato`
|
|
383
|
-
};
|
|
384
|
-
var $6e87462e84907983$exports = {};
|
|
385
|
-
$6e87462e84907983$exports = {
|
|
386
|
-
"buttonLabel": `候補を表示`,
|
|
387
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
388
|
-
one: () => `${formatter.number(args.optionCount)} 個のオプション`,
|
|
389
|
-
other: () => `${formatter.number(args.optionCount)} 個のオプション`
|
|
390
|
-
})}を利用できます。`,
|
|
391
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
392
|
-
true: () => `入力されたグループ ${args.groupTitle}、${formatter.plural(args.groupCount, {
|
|
393
|
-
one: () => `${formatter.number(args.groupCount)} 個のオプション`,
|
|
394
|
-
other: () => `${formatter.number(args.groupCount)} 個のオプション`
|
|
395
|
-
})}を含む。`,
|
|
396
|
-
other: ``
|
|
397
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
398
|
-
true: `、選択済み`,
|
|
399
|
-
other: ``
|
|
400
|
-
}, args.isSelected)}`,
|
|
401
|
-
"listboxLabel": `候補`,
|
|
402
|
-
"selectedAnnouncement": (args) => `${args.optionText}、選択済み`
|
|
403
|
-
};
|
|
404
|
-
var $9246f2c6edc6b232$exports = {};
|
|
405
|
-
$9246f2c6edc6b232$exports = {
|
|
406
|
-
"buttonLabel": `제안 사항 표시`,
|
|
407
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
408
|
-
one: () => `${formatter.number(args.optionCount)}개 옵션`,
|
|
409
|
-
other: () => `${formatter.number(args.optionCount)}개 옵션`
|
|
410
|
-
})}을 사용할 수 있습니다.`,
|
|
411
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
412
|
-
true: () => `입력한 그룹 ${args.groupTitle}, ${formatter.plural(args.groupCount, {
|
|
413
|
-
one: () => `${formatter.number(args.groupCount)}개 옵션`,
|
|
414
|
-
other: () => `${formatter.number(args.groupCount)}개 옵션`
|
|
415
|
-
})}. `,
|
|
416
|
-
other: ``
|
|
417
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
418
|
-
true: `, 선택됨`,
|
|
419
|
-
other: ``
|
|
420
|
-
}, args.isSelected)}`,
|
|
421
|
-
"listboxLabel": `제안`,
|
|
422
|
-
"selectedAnnouncement": (args) => `${args.optionText}, 선택됨`
|
|
423
|
-
};
|
|
424
|
-
var $e587accc6c0a434c$exports = {};
|
|
425
|
-
$e587accc6c0a434c$exports = {
|
|
426
|
-
"buttonLabel": `Rodyti pasiūlymus`,
|
|
427
|
-
"countAnnouncement": (args, formatter) => `Yra ${formatter.plural(args.optionCount, {
|
|
428
|
-
one: () => `${formatter.number(args.optionCount)} parinktis`,
|
|
429
|
-
other: () => `${formatter.number(args.optionCount)} parinktys (-ių)`
|
|
430
|
-
})}.`,
|
|
431
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
432
|
-
true: () => `Įvesta grupė ${args.groupTitle}, su ${formatter.plural(args.groupCount, {
|
|
433
|
-
one: () => `${formatter.number(args.groupCount)} parinktimi`,
|
|
434
|
-
other: () => `${formatter.number(args.groupCount)} parinktimis (-ių)`
|
|
435
|
-
})}. `,
|
|
436
|
-
other: ``
|
|
437
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
438
|
-
true: `, pasirinkta`,
|
|
439
|
-
other: ``
|
|
440
|
-
}, args.isSelected)}`,
|
|
441
|
-
"listboxLabel": `Pasiūlymai`,
|
|
442
|
-
"selectedAnnouncement": (args) => `${args.optionText}, pasirinkta`
|
|
443
|
-
};
|
|
444
|
-
var $03a1900e7400b5ab$exports = {};
|
|
445
|
-
$03a1900e7400b5ab$exports = {
|
|
446
|
-
"buttonLabel": `Rādīt ieteikumus`,
|
|
447
|
-
"countAnnouncement": (args, formatter) => `Pieejamo opciju skaits: ${formatter.plural(args.optionCount, {
|
|
448
|
-
one: () => `${formatter.number(args.optionCount)} opcija`,
|
|
449
|
-
other: () => `${formatter.number(args.optionCount)} opcijas`
|
|
450
|
-
})}.`,
|
|
451
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
452
|
-
true: () => `Ievadīta grupa ${args.groupTitle}, ar ${formatter.plural(args.groupCount, {
|
|
453
|
-
one: () => `${formatter.number(args.groupCount)} opciju`,
|
|
454
|
-
other: () => `${formatter.number(args.groupCount)} opcijām`
|
|
455
|
-
})}. `,
|
|
456
|
-
other: ``
|
|
457
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
458
|
-
true: `, atlasīta`,
|
|
459
|
-
other: ``
|
|
460
|
-
}, args.isSelected)}`,
|
|
461
|
-
"listboxLabel": `Ieteikumi`,
|
|
462
|
-
"selectedAnnouncement": (args) => `${args.optionText}, atlasīta`
|
|
463
|
-
};
|
|
464
|
-
var $1387676441be6cf6$exports = {};
|
|
465
|
-
$1387676441be6cf6$exports = {
|
|
466
|
-
"buttonLabel": `Vis forslag`,
|
|
467
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
468
|
-
one: () => `${formatter.number(args.optionCount)} alternativ`,
|
|
469
|
-
other: () => `${formatter.number(args.optionCount)} alternativer`
|
|
470
|
-
})} finnes.`,
|
|
471
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
472
|
-
true: () => `Angitt gruppe ${args.groupTitle}, med ${formatter.plural(args.groupCount, {
|
|
473
|
-
one: () => `${formatter.number(args.groupCount)} alternativ`,
|
|
474
|
-
other: () => `${formatter.number(args.groupCount)} alternativer`
|
|
475
|
-
})}. `,
|
|
476
|
-
other: ``
|
|
477
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
478
|
-
true: `, valgt`,
|
|
479
|
-
other: ``
|
|
480
|
-
}, args.isSelected)}`,
|
|
481
|
-
"listboxLabel": `Forslag`,
|
|
482
|
-
"selectedAnnouncement": (args) => `${args.optionText}, valgt`
|
|
483
|
-
};
|
|
484
|
-
var $17e82ebf0f8ab91f$exports = {};
|
|
485
|
-
$17e82ebf0f8ab91f$exports = {
|
|
486
|
-
"buttonLabel": `Suggesties weergeven`,
|
|
487
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
488
|
-
one: () => `${formatter.number(args.optionCount)} optie`,
|
|
489
|
-
other: () => `${formatter.number(args.optionCount)} opties`
|
|
490
|
-
})} beschikbaar.`,
|
|
491
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
492
|
-
true: () => `Groep ${args.groupTitle} ingevoerd met ${formatter.plural(args.groupCount, {
|
|
493
|
-
one: () => `${formatter.number(args.groupCount)} optie`,
|
|
494
|
-
other: () => `${formatter.number(args.groupCount)} opties`
|
|
495
|
-
})}. `,
|
|
496
|
-
other: ``
|
|
497
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
498
|
-
true: `, geselecteerd`,
|
|
499
|
-
other: ``
|
|
500
|
-
}, args.isSelected)}`,
|
|
501
|
-
"listboxLabel": `Suggesties`,
|
|
502
|
-
"selectedAnnouncement": (args) => `${args.optionText}, geselecteerd`
|
|
503
|
-
};
|
|
504
|
-
var $2f5377d3471630e5$exports = {};
|
|
505
|
-
$2f5377d3471630e5$exports = {
|
|
506
|
-
"buttonLabel": `Wyświetlaj sugestie`,
|
|
507
|
-
"countAnnouncement": (args, formatter) => `dostępna/dostępne(-nych) ${formatter.plural(args.optionCount, {
|
|
508
|
-
one: () => `${formatter.number(args.optionCount)} opcja`,
|
|
509
|
-
other: () => `${formatter.number(args.optionCount)} opcje(-i)`
|
|
510
|
-
})}.`,
|
|
511
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
512
|
-
true: () => `Dołączono do grupy ${args.groupTitle}, z ${formatter.plural(args.groupCount, {
|
|
513
|
-
one: () => `${formatter.number(args.groupCount)} opcją`,
|
|
514
|
-
other: () => `${formatter.number(args.groupCount)} opcjami`
|
|
515
|
-
})}. `,
|
|
516
|
-
other: ``
|
|
517
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
518
|
-
true: `, wybrano`,
|
|
519
|
-
other: ``
|
|
520
|
-
}, args.isSelected)}`,
|
|
521
|
-
"listboxLabel": `Sugestie`,
|
|
522
|
-
"selectedAnnouncement": (args) => `${args.optionText}, wybrano`
|
|
523
|
-
};
|
|
524
|
-
var $dee9868b6fa95ffe$exports = {};
|
|
525
|
-
$dee9868b6fa95ffe$exports = {
|
|
526
|
-
"buttonLabel": `Mostrar sugestões`,
|
|
527
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
528
|
-
one: () => `${formatter.number(args.optionCount)} opção`,
|
|
529
|
-
other: () => `${formatter.number(args.optionCount)} opções`
|
|
530
|
-
})} disponível.`,
|
|
531
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
532
|
-
true: () => `Grupo inserido ${args.groupTitle}, com ${formatter.plural(args.groupCount, {
|
|
533
|
-
one: () => `${formatter.number(args.groupCount)} opção`,
|
|
534
|
-
other: () => `${formatter.number(args.groupCount)} opções`
|
|
535
|
-
})}. `,
|
|
536
|
-
other: ``
|
|
537
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
538
|
-
true: `, selecionado`,
|
|
539
|
-
other: ``
|
|
540
|
-
}, args.isSelected)}`,
|
|
541
|
-
"listboxLabel": `Sugestões`,
|
|
542
|
-
"selectedAnnouncement": (args) => `${args.optionText}, selecionado`
|
|
543
|
-
};
|
|
544
|
-
var $f8b2e63637cbb5a6$exports = {};
|
|
545
|
-
$f8b2e63637cbb5a6$exports = {
|
|
546
|
-
"buttonLabel": `Apresentar sugestões`,
|
|
547
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
548
|
-
one: () => `${formatter.number(args.optionCount)} opção`,
|
|
549
|
-
other: () => `${formatter.number(args.optionCount)} opções`
|
|
550
|
-
})} disponível.`,
|
|
551
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
552
|
-
true: () => `Grupo introduzido ${args.groupTitle}, com ${formatter.plural(args.groupCount, {
|
|
553
|
-
one: () => `${formatter.number(args.groupCount)} opção`,
|
|
554
|
-
other: () => `${formatter.number(args.groupCount)} opções`
|
|
555
|
-
})}. `,
|
|
556
|
-
other: ``
|
|
557
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
558
|
-
true: `, selecionado`,
|
|
559
|
-
other: ``
|
|
560
|
-
}, args.isSelected)}`,
|
|
561
|
-
"listboxLabel": `Sugestões`,
|
|
562
|
-
"selectedAnnouncement": (args) => `${args.optionText}, selecionado`
|
|
563
|
-
};
|
|
564
|
-
var $46a885db3b44ea95$exports = {};
|
|
565
|
-
$46a885db3b44ea95$exports = {
|
|
566
|
-
"buttonLabel": `Afișare sugestii`,
|
|
567
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
568
|
-
one: () => `${formatter.number(args.optionCount)} opțiune`,
|
|
569
|
-
other: () => `${formatter.number(args.optionCount)} opțiuni`
|
|
570
|
-
})} disponibile.`,
|
|
571
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
572
|
-
true: () => `Grup ${args.groupTitle} introdus, cu ${formatter.plural(args.groupCount, {
|
|
573
|
-
one: () => `${formatter.number(args.groupCount)} opțiune`,
|
|
574
|
-
other: () => `${formatter.number(args.groupCount)} opțiuni`
|
|
575
|
-
})}. `,
|
|
576
|
-
other: ``
|
|
577
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
578
|
-
true: `, selectat`,
|
|
579
|
-
other: ``
|
|
580
|
-
}, args.isSelected)}`,
|
|
581
|
-
"listboxLabel": `Sugestii`,
|
|
582
|
-
"selectedAnnouncement": (args) => `${args.optionText}, selectat`
|
|
583
|
-
};
|
|
584
|
-
var $50d8a8f0afa9dee5$exports = {};
|
|
585
|
-
$50d8a8f0afa9dee5$exports = {
|
|
586
|
-
"buttonLabel": `Показать предложения`,
|
|
587
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
588
|
-
one: () => `${formatter.number(args.optionCount)} параметр`,
|
|
589
|
-
other: () => `${formatter.number(args.optionCount)} параметров`
|
|
590
|
-
})} доступно.`,
|
|
591
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
592
|
-
true: () => `Введенная группа ${args.groupTitle}, с ${formatter.plural(args.groupCount, {
|
|
593
|
-
one: () => `${formatter.number(args.groupCount)} параметром`,
|
|
594
|
-
other: () => `${formatter.number(args.groupCount)} параметрами`
|
|
595
|
-
})}. `,
|
|
596
|
-
other: ``
|
|
597
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
598
|
-
true: `, выбранными`,
|
|
599
|
-
other: ``
|
|
600
|
-
}, args.isSelected)}`,
|
|
601
|
-
"listboxLabel": `Предложения`,
|
|
602
|
-
"selectedAnnouncement": (args) => `${args.optionText}, выбрано`
|
|
603
|
-
};
|
|
604
|
-
var $2867ee6173245507$exports = {};
|
|
605
|
-
$2867ee6173245507$exports = {
|
|
606
|
-
"buttonLabel": `Zobraziť návrhy`,
|
|
607
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
608
|
-
one: () => `${formatter.number(args.optionCount)} možnosť`,
|
|
609
|
-
other: () => `${formatter.number(args.optionCount)} možnosti/-í`
|
|
610
|
-
})} k dispozícii.`,
|
|
611
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
612
|
-
true: () => `Zadaná skupina ${args.groupTitle}, s ${formatter.plural(args.groupCount, {
|
|
613
|
-
one: () => `${formatter.number(args.groupCount)} možnosťou`,
|
|
614
|
-
other: () => `${formatter.number(args.groupCount)} možnosťami`
|
|
615
|
-
})}. `,
|
|
616
|
-
other: ``
|
|
617
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
618
|
-
true: `, vybraté`,
|
|
619
|
-
other: ``
|
|
620
|
-
}, args.isSelected)}`,
|
|
621
|
-
"listboxLabel": `Návrhy`,
|
|
622
|
-
"selectedAnnouncement": (args) => `${args.optionText}, vybraté`
|
|
623
|
-
};
|
|
624
|
-
var $0631b65beeb09b50$exports = {};
|
|
625
|
-
$0631b65beeb09b50$exports = {
|
|
626
|
-
"buttonLabel": `Prikaži predloge`,
|
|
627
|
-
"countAnnouncement": (args, formatter) => `Na voljo je ${formatter.plural(args.optionCount, {
|
|
628
|
-
one: () => `${formatter.number(args.optionCount)} opcija`,
|
|
629
|
-
other: () => `${formatter.number(args.optionCount)} opcije`
|
|
630
|
-
})}.`,
|
|
631
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
632
|
-
true: () => `Vnesena skupina ${args.groupTitle}, z ${formatter.plural(args.groupCount, {
|
|
633
|
-
one: () => `${formatter.number(args.groupCount)} opcija`,
|
|
634
|
-
other: () => `${formatter.number(args.groupCount)} opcije`
|
|
635
|
-
})}. `,
|
|
636
|
-
other: ``
|
|
637
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
638
|
-
true: `, izbrano`,
|
|
639
|
-
other: ``
|
|
640
|
-
}, args.isSelected)}`,
|
|
641
|
-
"listboxLabel": `Predlogi`,
|
|
642
|
-
"selectedAnnouncement": (args) => `${args.optionText}, izbrano`
|
|
643
|
-
};
|
|
644
|
-
var $65fc749265dcd686$exports = {};
|
|
645
|
-
$65fc749265dcd686$exports = {
|
|
646
|
-
"buttonLabel": `Prikaži predloge`,
|
|
647
|
-
"countAnnouncement": (args, formatter) => `Dostupno još: ${formatter.plural(args.optionCount, {
|
|
648
|
-
one: () => `${formatter.number(args.optionCount)} opcija`,
|
|
649
|
-
other: () => `${formatter.number(args.optionCount)} opcije/a`
|
|
650
|
-
})}.`,
|
|
651
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
652
|
-
true: () => `Unesena grupa ${args.groupTitle}, s ${formatter.plural(args.groupCount, {
|
|
653
|
-
one: () => `${formatter.number(args.groupCount)} opcijom`,
|
|
654
|
-
other: () => `${formatter.number(args.groupCount)} optione/a`
|
|
655
|
-
})}. `,
|
|
656
|
-
other: ``
|
|
657
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
658
|
-
true: `, izabranih`,
|
|
659
|
-
other: ``
|
|
660
|
-
}, args.isSelected)}`,
|
|
661
|
-
"listboxLabel": `Predlozi`,
|
|
662
|
-
"selectedAnnouncement": (args) => `${args.optionText}, izabrano`
|
|
663
|
-
};
|
|
664
|
-
var $69ba655c7853c08e$exports = {};
|
|
665
|
-
$69ba655c7853c08e$exports = {
|
|
666
|
-
"buttonLabel": `Visa förslag`,
|
|
667
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
668
|
-
one: () => `${formatter.number(args.optionCount)} alternativ`,
|
|
669
|
-
other: () => `${formatter.number(args.optionCount)} alternativ`
|
|
670
|
-
})} tillgängliga.`,
|
|
671
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
672
|
-
true: () => `Ingick i gruppen ${args.groupTitle} med ${formatter.plural(args.groupCount, {
|
|
673
|
-
one: () => `${formatter.number(args.groupCount)} alternativ`,
|
|
674
|
-
other: () => `${formatter.number(args.groupCount)} alternativ`
|
|
675
|
-
})}. `,
|
|
676
|
-
other: ``
|
|
677
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
678
|
-
true: `, valda`,
|
|
679
|
-
other: ``
|
|
680
|
-
}, args.isSelected)}`,
|
|
681
|
-
"listboxLabel": `Förslag`,
|
|
682
|
-
"selectedAnnouncement": (args) => `${args.optionText}, valda`
|
|
683
|
-
};
|
|
684
|
-
var $a79794784d61577c$exports = {};
|
|
685
|
-
$a79794784d61577c$exports = {
|
|
686
|
-
"buttonLabel": `Önerileri göster`,
|
|
687
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
688
|
-
one: () => `${formatter.number(args.optionCount)} seçenek`,
|
|
689
|
-
other: () => `${formatter.number(args.optionCount)} seçenekler`
|
|
690
|
-
})} kullanılabilir.`,
|
|
691
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
692
|
-
true: () => `Girilen grup ${args.groupTitle}, ile ${formatter.plural(args.groupCount, {
|
|
693
|
-
one: () => `${formatter.number(args.groupCount)} seçenek`,
|
|
694
|
-
other: () => `${formatter.number(args.groupCount)} seçenekler`
|
|
695
|
-
})}. `,
|
|
696
|
-
other: ``
|
|
697
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
698
|
-
true: `, seçildi`,
|
|
699
|
-
other: ``
|
|
700
|
-
}, args.isSelected)}`,
|
|
701
|
-
"listboxLabel": `Öneriler`,
|
|
702
|
-
"selectedAnnouncement": (args) => `${args.optionText}, seçildi`
|
|
703
|
-
};
|
|
704
|
-
var $c2845791417ebaf4$exports = {};
|
|
705
|
-
$c2845791417ebaf4$exports = {
|
|
706
|
-
"buttonLabel": `Показати пропозиції`,
|
|
707
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
708
|
-
one: () => `${formatter.number(args.optionCount)} параметр`,
|
|
709
|
-
other: () => `${formatter.number(args.optionCount)} параметри(-ів)`
|
|
710
|
-
})} доступно.`,
|
|
711
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
712
|
-
true: () => `Введена група ${args.groupTitle}, з ${formatter.plural(args.groupCount, {
|
|
713
|
-
one: () => `${formatter.number(args.groupCount)} параметр`,
|
|
714
|
-
other: () => `${formatter.number(args.groupCount)} параметри(-ів)`
|
|
715
|
-
})}. `,
|
|
716
|
-
other: ``
|
|
717
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
718
|
-
true: `, вибрано`,
|
|
719
|
-
other: ``
|
|
720
|
-
}, args.isSelected)}`,
|
|
721
|
-
"listboxLabel": `Пропозиції`,
|
|
722
|
-
"selectedAnnouncement": (args) => `${args.optionText}, вибрано`
|
|
723
|
-
};
|
|
724
|
-
var $29b642d0025cc7a4$exports = {};
|
|
725
|
-
$29b642d0025cc7a4$exports = {
|
|
726
|
-
"buttonLabel": `显示建议`,
|
|
727
|
-
"countAnnouncement": (args, formatter) => `有 ${formatter.plural(args.optionCount, {
|
|
728
|
-
one: () => `${formatter.number(args.optionCount)} 个选项`,
|
|
729
|
-
other: () => `${formatter.number(args.optionCount)} 个选项`
|
|
730
|
-
})}可用。`,
|
|
731
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
732
|
-
true: () => `进入了 ${args.groupTitle} 组,其中有 ${formatter.plural(args.groupCount, {
|
|
733
|
-
one: () => `${formatter.number(args.groupCount)} 个选项`,
|
|
734
|
-
other: () => `${formatter.number(args.groupCount)} 个选项`
|
|
735
|
-
})}. `,
|
|
736
|
-
other: ``
|
|
737
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
738
|
-
true: `, 已选择`,
|
|
739
|
-
other: ``
|
|
740
|
-
}, args.isSelected)}`,
|
|
741
|
-
"listboxLabel": `建议`,
|
|
742
|
-
"selectedAnnouncement": (args) => `${args.optionText}, 已选择`
|
|
743
|
-
};
|
|
744
|
-
var $cd36dd33f9d46936$exports = {};
|
|
745
|
-
$cd36dd33f9d46936$exports = {
|
|
746
|
-
"buttonLabel": `顯示建議`,
|
|
747
|
-
"countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
|
|
748
|
-
one: () => `${formatter.number(args.optionCount)} 選項`,
|
|
749
|
-
other: () => `${formatter.number(args.optionCount)} 選項`
|
|
750
|
-
})} 可用。`,
|
|
751
|
-
"focusAnnouncement": (args, formatter) => `${formatter.select({
|
|
752
|
-
true: () => `輸入的群組 ${args.groupTitle}, 有 ${formatter.plural(args.groupCount, {
|
|
753
|
-
one: () => `${formatter.number(args.groupCount)} 選項`,
|
|
754
|
-
other: () => `${formatter.number(args.groupCount)} 選項`
|
|
755
|
-
})}. `,
|
|
756
|
-
other: ``
|
|
757
|
-
}, args.isGroupChange)}${args.optionText}${formatter.select({
|
|
758
|
-
true: `, 已選取`,
|
|
759
|
-
other: ``
|
|
760
|
-
}, args.isSelected)}`,
|
|
761
|
-
"listboxLabel": `建議`,
|
|
762
|
-
"selectedAnnouncement": (args) => `${args.optionText}, 已選取`
|
|
763
|
-
};
|
|
764
|
-
var $de5926a92e8ebc5b$exports = {};
|
|
765
|
-
$de5926a92e8ebc5b$exports = {
|
|
766
|
-
"ar-AE": $02cb4c75c506befe$exports,
|
|
767
|
-
"bg-BG": $568b8163f1e56faf$exports,
|
|
768
|
-
"cs-CZ": $87581c0202d106b8$exports,
|
|
769
|
-
"da-DK": $a10a0369f5433ed1$exports,
|
|
770
|
-
"de-DE": $bfd288727d5cb166$exports,
|
|
771
|
-
"el-GR": $ca177778f9a74e3c$exports,
|
|
772
|
-
"en-US": $9b5aa79ef84beb6c$exports,
|
|
773
|
-
"es-ES": $57968e8209de2557$exports,
|
|
774
|
-
"et-EE": $60690790bf4c1c6a$exports,
|
|
775
|
-
"fi-FI": $1101246e8c7d9357$exports,
|
|
776
|
-
"fr-FR": $6404b5cb5b241730$exports,
|
|
777
|
-
"he-IL": $dfeafa702e92e31f$exports,
|
|
778
|
-
"hr-HR": $2d125e0b34676352$exports,
|
|
779
|
-
"hu-HU": $ea029611d7634059$exports,
|
|
780
|
-
"it-IT": $77f075bb86ad7091$exports,
|
|
781
|
-
"ja-JP": $6e87462e84907983$exports,
|
|
782
|
-
"ko-KR": $9246f2c6edc6b232$exports,
|
|
783
|
-
"lt-LT": $e587accc6c0a434c$exports,
|
|
784
|
-
"lv-LV": $03a1900e7400b5ab$exports,
|
|
785
|
-
"nb-NO": $1387676441be6cf6$exports,
|
|
786
|
-
"nl-NL": $17e82ebf0f8ab91f$exports,
|
|
787
|
-
"pl-PL": $2f5377d3471630e5$exports,
|
|
788
|
-
"pt-BR": $dee9868b6fa95ffe$exports,
|
|
789
|
-
"pt-PT": $f8b2e63637cbb5a6$exports,
|
|
790
|
-
"ro-RO": $46a885db3b44ea95$exports,
|
|
791
|
-
"ru-RU": $50d8a8f0afa9dee5$exports,
|
|
792
|
-
"sk-SK": $2867ee6173245507$exports,
|
|
793
|
-
"sl-SI": $0631b65beeb09b50$exports,
|
|
794
|
-
"sr-SP": $65fc749265dcd686$exports,
|
|
795
|
-
"sv-SE": $69ba655c7853c08e$exports,
|
|
796
|
-
"tr-TR": $a79794784d61577c$exports,
|
|
797
|
-
"uk-UA": $c2845791417ebaf4$exports,
|
|
798
|
-
"zh-CN": $29b642d0025cc7a4$exports,
|
|
799
|
-
"zh-TW": $cd36dd33f9d46936$exports
|
|
800
|
-
};
|
|
801
|
-
function $parcel$interopDefault(a) {
|
|
802
|
-
return a && a.__esModule ? a.default : a;
|
|
803
|
-
}
|
|
804
|
-
function $c350ade66beef0af$export$8c18d1b4f7232bbf(props, state) {
|
|
805
|
-
let { buttonRef, popoverRef, inputRef, listBoxRef, keyboardDelegate, layoutDelegate, shouldFocusWrap, isReadOnly, isDisabled } = props;
|
|
806
|
-
let backupBtnRef = useRef(null);
|
|
807
|
-
buttonRef = buttonRef !== null && buttonRef !== void 0 ? buttonRef : backupBtnRef;
|
|
808
|
-
let stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault($de5926a92e8ebc5b$exports), "@react-aria/combobox");
|
|
809
|
-
let { menuTriggerProps, menuProps } = $168583247155ddda$export$dc9c12ed27dd1b49({
|
|
810
|
-
type: "listbox",
|
|
811
|
-
isDisabled: isDisabled || isReadOnly
|
|
812
|
-
}, state, buttonRef);
|
|
813
|
-
$b1f0cad8af73213b$export$3585ede4d035bf14.set(state, {
|
|
814
|
-
id: menuProps.id
|
|
815
|
-
});
|
|
816
|
-
let { collection } = state;
|
|
817
|
-
let { disabledKeys } = state.selectionManager;
|
|
818
|
-
let delegate = useMemo(() => keyboardDelegate || new $2a25aae57d74318e$export$a05409b8bb224a5a({
|
|
819
|
-
collection,
|
|
820
|
-
disabledKeys,
|
|
821
|
-
ref: listBoxRef,
|
|
822
|
-
layoutDelegate
|
|
823
|
-
}), [
|
|
824
|
-
keyboardDelegate,
|
|
825
|
-
layoutDelegate,
|
|
826
|
-
collection,
|
|
827
|
-
disabledKeys,
|
|
828
|
-
listBoxRef
|
|
829
|
-
]);
|
|
830
|
-
let { collectionProps } = $ae20dd8cbca75726$export$d6daf82dcd84e87c({
|
|
831
|
-
selectionManager: state.selectionManager,
|
|
832
|
-
keyboardDelegate: delegate,
|
|
833
|
-
disallowTypeAhead: true,
|
|
834
|
-
disallowEmptySelection: true,
|
|
835
|
-
shouldFocusWrap,
|
|
836
|
-
ref: inputRef,
|
|
837
|
-
// Prevent item scroll behavior from being applied here, should be handled in the user's Popover + ListBox component
|
|
838
|
-
isVirtualized: true
|
|
839
|
-
});
|
|
840
|
-
let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
|
|
841
|
-
let onKeyDown = (e) => {
|
|
842
|
-
if (e.nativeEvent.isComposing) return;
|
|
843
|
-
switch (e.key) {
|
|
844
|
-
case "Enter":
|
|
845
|
-
case "Tab":
|
|
846
|
-
if (state.isOpen && e.key === "Enter") e.preventDefault();
|
|
847
|
-
if (state.isOpen && listBoxRef.current && state.selectionManager.focusedKey != null && state.selectionManager.isLink(state.selectionManager.focusedKey)) {
|
|
848
|
-
let item = listBoxRef.current.querySelector(`[data-key="${CSS.escape(state.selectionManager.focusedKey.toString())}"]`);
|
|
849
|
-
if (e.key === "Enter" && item instanceof HTMLAnchorElement) {
|
|
850
|
-
let collectionItem = state.collection.getItem(state.selectionManager.focusedKey);
|
|
851
|
-
if (collectionItem) router.open(item, e, collectionItem.props.href, collectionItem.props.routerOptions);
|
|
852
|
-
}
|
|
853
|
-
state.close();
|
|
854
|
-
} else state.commit();
|
|
855
|
-
break;
|
|
856
|
-
case "Escape":
|
|
857
|
-
if (state.selectedKey !== null || state.inputValue === "" || props.allowsCustomValue) e.continuePropagation();
|
|
858
|
-
state.revert();
|
|
859
|
-
break;
|
|
860
|
-
case "ArrowDown":
|
|
861
|
-
state.open("first", "manual");
|
|
862
|
-
break;
|
|
863
|
-
case "ArrowUp":
|
|
864
|
-
state.open("last", "manual");
|
|
865
|
-
break;
|
|
866
|
-
case "ArrowLeft":
|
|
867
|
-
case "ArrowRight":
|
|
868
|
-
state.selectionManager.setFocusedKey(null);
|
|
869
|
-
break;
|
|
870
|
-
}
|
|
871
|
-
};
|
|
872
|
-
let onBlur = (e) => {
|
|
873
|
-
var _popoverRef_current;
|
|
874
|
-
let blurFromButton = (buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) && buttonRef.current === e.relatedTarget;
|
|
875
|
-
let blurIntoPopover = (_popoverRef_current = popoverRef.current) === null || _popoverRef_current === void 0 ? void 0 : _popoverRef_current.contains(e.relatedTarget);
|
|
876
|
-
if (blurFromButton || blurIntoPopover) return;
|
|
877
|
-
if (props.onBlur) props.onBlur(e);
|
|
878
|
-
state.setFocused(false);
|
|
879
|
-
};
|
|
880
|
-
let onFocus = (e) => {
|
|
881
|
-
if (state.isFocused) return;
|
|
882
|
-
if (props.onFocus) props.onFocus(e);
|
|
883
|
-
state.setFocused(true);
|
|
884
|
-
};
|
|
885
|
-
let { isInvalid, validationErrors, validationDetails } = state.displayValidation;
|
|
886
|
-
let { labelProps, inputProps, descriptionProps, errorMessageProps } = $2d73ec29415bd339$export$712718f7aec83d5({
|
|
887
|
-
...props,
|
|
888
|
-
onChange: state.setInputValue,
|
|
889
|
-
onKeyDown: !isReadOnly ? $ff5963eb1fccf552$export$e08e3b67e392101e(state.isOpen && collectionProps.onKeyDown, onKeyDown, props.onKeyDown) : props.onKeyDown,
|
|
890
|
-
onBlur,
|
|
891
|
-
value: state.inputValue,
|
|
892
|
-
onFocus,
|
|
893
|
-
autoComplete: "off",
|
|
894
|
-
validate: void 0,
|
|
895
|
-
[$e5be200c675c3b3a$export$a763b9476acd3eb]: state
|
|
896
|
-
}, inputRef);
|
|
897
|
-
let onPress = (e) => {
|
|
898
|
-
if (e.pointerType === "touch") {
|
|
899
|
-
var _inputRef_current;
|
|
900
|
-
(_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
|
|
901
|
-
state.toggle(null, "manual");
|
|
902
|
-
}
|
|
903
|
-
};
|
|
904
|
-
let onPressStart = (e) => {
|
|
905
|
-
if (e.pointerType !== "touch") {
|
|
906
|
-
var _inputRef_current;
|
|
907
|
-
(_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
|
|
908
|
-
state.toggle(e.pointerType === "keyboard" || e.pointerType === "virtual" ? "first" : null, "manual");
|
|
909
|
-
}
|
|
910
|
-
};
|
|
911
|
-
let triggerLabelProps = $313b98861ee5dd6c$export$d6875122194c7b44({
|
|
912
|
-
id: menuTriggerProps.id,
|
|
913
|
-
"aria-label": stringFormatter.format("buttonLabel"),
|
|
914
|
-
"aria-labelledby": props["aria-labelledby"] || labelProps.id
|
|
915
|
-
});
|
|
916
|
-
let listBoxProps = $313b98861ee5dd6c$export$d6875122194c7b44({
|
|
917
|
-
id: menuProps.id,
|
|
918
|
-
"aria-label": stringFormatter.format("listboxLabel"),
|
|
919
|
-
"aria-labelledby": props["aria-labelledby"] || labelProps.id
|
|
920
|
-
});
|
|
921
|
-
let lastEventTime = useRef(0);
|
|
922
|
-
let onTouchEnd = (e) => {
|
|
923
|
-
if (isDisabled || isReadOnly) return;
|
|
924
|
-
if (e.timeStamp - lastEventTime.current < 500) {
|
|
925
|
-
var _inputRef_current;
|
|
926
|
-
e.preventDefault();
|
|
927
|
-
(_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
|
|
928
|
-
return;
|
|
929
|
-
}
|
|
930
|
-
let rect = e.target.getBoundingClientRect();
|
|
931
|
-
let touch = e.changedTouches[0];
|
|
932
|
-
let centerX = Math.ceil(rect.left + 0.5 * rect.width);
|
|
933
|
-
let centerY = Math.ceil(rect.top + 0.5 * rect.height);
|
|
934
|
-
if (touch.clientX === centerX && touch.clientY === centerY) {
|
|
935
|
-
var _inputRef_current1;
|
|
936
|
-
e.preventDefault();
|
|
937
|
-
(_inputRef_current1 = inputRef.current) === null || _inputRef_current1 === void 0 ? void 0 : _inputRef_current1.focus();
|
|
938
|
-
state.toggle(null, "manual");
|
|
939
|
-
lastEventTime.current = e.timeStamp;
|
|
940
|
-
}
|
|
941
|
-
};
|
|
942
|
-
let focusedItem = state.selectionManager.focusedKey != null && state.isOpen ? state.collection.getItem(state.selectionManager.focusedKey) : void 0;
|
|
943
|
-
var _focusedItem_parentKey;
|
|
944
|
-
let sectionKey = (_focusedItem_parentKey = focusedItem === null || focusedItem === void 0 ? void 0 : focusedItem.parentKey) !== null && _focusedItem_parentKey !== void 0 ? _focusedItem_parentKey : null;
|
|
945
|
-
var _state_selectionManager_focusedKey;
|
|
946
|
-
let itemKey = (_state_selectionManager_focusedKey = state.selectionManager.focusedKey) !== null && _state_selectionManager_focusedKey !== void 0 ? _state_selectionManager_focusedKey : null;
|
|
947
|
-
let lastSection = useRef(sectionKey);
|
|
948
|
-
let lastItem = useRef(itemKey);
|
|
949
|
-
useEffect(() => {
|
|
950
|
-
if ($c87311424ea30a05$export$e1865c3bedcd822b() && focusedItem != null && itemKey != null && itemKey !== lastItem.current) {
|
|
951
|
-
let isSelected = state.selectionManager.isSelected(itemKey);
|
|
952
|
-
let section = sectionKey != null ? state.collection.getItem(sectionKey) : null;
|
|
953
|
-
let sectionTitle = (section === null || section === void 0 ? void 0 : section["aria-label"]) || (typeof (section === null || section === void 0 ? void 0 : section.rendered) === "string" ? section.rendered : "") || "";
|
|
954
|
-
var _ref;
|
|
955
|
-
let announcement = stringFormatter.format("focusAnnouncement", {
|
|
956
|
-
isGroupChange: (_ref = section && sectionKey !== lastSection.current) !== null && _ref !== void 0 ? _ref : false,
|
|
957
|
-
groupTitle: sectionTitle,
|
|
958
|
-
groupCount: section ? [
|
|
959
|
-
...$c5a24bc478652b5f$export$1005530eda016c13(section, state.collection)
|
|
960
|
-
].length : 0,
|
|
961
|
-
optionText: focusedItem["aria-label"] || focusedItem.textValue || "",
|
|
962
|
-
isSelected
|
|
963
|
-
});
|
|
964
|
-
$319e236875307eab$export$a9b970dcc4ae71a9(announcement);
|
|
965
|
-
}
|
|
966
|
-
lastSection.current = sectionKey;
|
|
967
|
-
lastItem.current = itemKey;
|
|
968
|
-
});
|
|
969
|
-
let optionCount = $453cc9f0df89c0a5$export$77d5aafae4e095b2(state.collection);
|
|
970
|
-
let lastSize = useRef(optionCount);
|
|
971
|
-
let lastOpen = useRef(state.isOpen);
|
|
972
|
-
useEffect(() => {
|
|
973
|
-
let didOpenWithoutFocusedItem = state.isOpen !== lastOpen.current && (state.selectionManager.focusedKey == null || $c87311424ea30a05$export$e1865c3bedcd822b());
|
|
974
|
-
if (state.isOpen && (didOpenWithoutFocusedItem || optionCount !== lastSize.current)) {
|
|
975
|
-
let announcement = stringFormatter.format("countAnnouncement", {
|
|
976
|
-
optionCount
|
|
977
|
-
});
|
|
978
|
-
$319e236875307eab$export$a9b970dcc4ae71a9(announcement);
|
|
979
|
-
}
|
|
980
|
-
lastSize.current = optionCount;
|
|
981
|
-
lastOpen.current = state.isOpen;
|
|
982
|
-
});
|
|
983
|
-
let lastSelectedKey = useRef(state.selectedKey);
|
|
984
|
-
useEffect(() => {
|
|
985
|
-
if ($c87311424ea30a05$export$e1865c3bedcd822b() && state.isFocused && state.selectedItem && state.selectedKey !== lastSelectedKey.current) {
|
|
986
|
-
let optionText = state.selectedItem["aria-label"] || state.selectedItem.textValue || "";
|
|
987
|
-
let announcement = stringFormatter.format("selectedAnnouncement", {
|
|
988
|
-
optionText
|
|
989
|
-
});
|
|
990
|
-
$319e236875307eab$export$a9b970dcc4ae71a9(announcement);
|
|
991
|
-
}
|
|
992
|
-
lastSelectedKey.current = state.selectedKey;
|
|
993
|
-
});
|
|
994
|
-
useEffect(() => {
|
|
995
|
-
if (state.isOpen) return $5e3802645cc19319$export$1c3ebcada18427bf([
|
|
996
|
-
inputRef.current,
|
|
997
|
-
popoverRef.current
|
|
998
|
-
].filter((element) => element != null));
|
|
999
|
-
}, [
|
|
1000
|
-
state.isOpen,
|
|
1001
|
-
inputRef,
|
|
1002
|
-
popoverRef
|
|
1003
|
-
]);
|
|
1004
|
-
$4f58c5f72bcf79f7$export$496315a1608d9602(() => {
|
|
1005
|
-
if (!focusedItem && inputRef.current && $d4ee10de306f2510$export$cd4e5573fbe2b576($431fbd86ca7dc216$export$b204af158042fbac(inputRef.current)) === inputRef.current) $55f9b1ae81f22853$export$2b35b76d2e30e129(inputRef.current, null);
|
|
1006
|
-
}, [
|
|
1007
|
-
focusedItem
|
|
1008
|
-
]);
|
|
1009
|
-
return {
|
|
1010
|
-
labelProps,
|
|
1011
|
-
buttonProps: {
|
|
1012
|
-
...menuTriggerProps,
|
|
1013
|
-
...triggerLabelProps,
|
|
1014
|
-
excludeFromTabOrder: true,
|
|
1015
|
-
preventFocusOnPress: true,
|
|
1016
|
-
onPress,
|
|
1017
|
-
onPressStart,
|
|
1018
|
-
isDisabled: isDisabled || isReadOnly
|
|
1019
|
-
},
|
|
1020
|
-
inputProps: $3ef42575df84b30b$export$9d1611c77c2fe928(inputProps, {
|
|
1021
|
-
role: "combobox",
|
|
1022
|
-
"aria-expanded": menuTriggerProps["aria-expanded"],
|
|
1023
|
-
"aria-controls": state.isOpen ? menuProps.id : void 0,
|
|
1024
|
-
// TODO: readd proper logic for completionMode = complete (aria-autocomplete: both)
|
|
1025
|
-
"aria-autocomplete": "list",
|
|
1026
|
-
"aria-activedescendant": focusedItem ? $b1f0cad8af73213b$export$9145995848b05025(state, focusedItem.key) : void 0,
|
|
1027
|
-
onTouchEnd,
|
|
1028
|
-
// This disable's iOS's autocorrect suggestions, since the combo box provides its own suggestions.
|
|
1029
|
-
autoCorrect: "off",
|
|
1030
|
-
// This disable's the macOS Safari spell check auto corrections.
|
|
1031
|
-
spellCheck: "false"
|
|
1032
|
-
}),
|
|
1033
|
-
listBoxProps: $3ef42575df84b30b$export$9d1611c77c2fe928(menuProps, listBoxProps, {
|
|
1034
|
-
autoFocus: state.focusStrategy || true,
|
|
1035
|
-
shouldUseVirtualFocus: true,
|
|
1036
|
-
shouldSelectOnPressUp: true,
|
|
1037
|
-
shouldFocusOnHover: true,
|
|
1038
|
-
linkBehavior: "selection"
|
|
1039
|
-
}),
|
|
1040
|
-
descriptionProps,
|
|
1041
|
-
errorMessageProps,
|
|
1042
|
-
isInvalid,
|
|
1043
|
-
validationErrors,
|
|
1044
|
-
validationDetails
|
|
1045
|
-
};
|
|
1046
|
-
}
|
|
1047
|
-
function $a9e7382a7d111cb5$export$b453a3bfd4a5fa9e(props) {
|
|
1048
|
-
var _collection_getItem;
|
|
1049
|
-
let { defaultFilter, menuTrigger = "input", allowsEmptyCollection = false, allowsCustomValue, shouldCloseOnBlur = true } = props;
|
|
1050
|
-
let [showAllItems, setShowAllItems] = useState(false);
|
|
1051
|
-
let [isFocused, setFocusedState] = useState(false);
|
|
1052
|
-
let [focusStrategy, setFocusStrategy] = useState(null);
|
|
1053
|
-
let onSelectionChange = (key) => {
|
|
1054
|
-
if (props.onSelectionChange) props.onSelectionChange(key);
|
|
1055
|
-
if (key === selectedKey) {
|
|
1056
|
-
resetInputValue();
|
|
1057
|
-
closeMenu();
|
|
1058
|
-
}
|
|
1059
|
-
};
|
|
1060
|
-
var _props_items;
|
|
1061
|
-
let { collection, selectionManager, selectedKey, setSelectedKey, selectedItem, disabledKeys } = $a0d645289fe9b86b$export$e7f05e985daf4b5f({
|
|
1062
|
-
...props,
|
|
1063
|
-
onSelectionChange,
|
|
1064
|
-
items: (_props_items = props.items) !== null && _props_items !== void 0 ? _props_items : props.defaultItems
|
|
1065
|
-
});
|
|
1066
|
-
let defaultInputValue = props.defaultInputValue;
|
|
1067
|
-
if (defaultInputValue == null) {
|
|
1068
|
-
var _collection_getItem1;
|
|
1069
|
-
var _collection_getItem_textValue;
|
|
1070
|
-
if (selectedKey == null) defaultInputValue = "";
|
|
1071
|
-
else defaultInputValue = (_collection_getItem_textValue = (_collection_getItem1 = collection.getItem(selectedKey)) === null || _collection_getItem1 === void 0 ? void 0 : _collection_getItem1.textValue) !== null && _collection_getItem_textValue !== void 0 ? _collection_getItem_textValue : "";
|
|
1072
|
-
}
|
|
1073
|
-
let [inputValue, setInputValue] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(props.inputValue, defaultInputValue, props.onInputChange);
|
|
1074
|
-
let originalCollection = collection;
|
|
1075
|
-
let filteredCollection = useMemo(() => (
|
|
1076
|
-
// No default filter if items are controlled.
|
|
1077
|
-
props.items != null || !defaultFilter ? collection : $a9e7382a7d111cb5$var$filterCollection(collection, inputValue, defaultFilter)
|
|
1078
|
-
), [
|
|
1079
|
-
collection,
|
|
1080
|
-
inputValue,
|
|
1081
|
-
defaultFilter,
|
|
1082
|
-
props.items
|
|
1083
|
-
]);
|
|
1084
|
-
let [lastCollection, setLastCollection] = useState(filteredCollection);
|
|
1085
|
-
let menuOpenTrigger = useRef("focus");
|
|
1086
|
-
let onOpenChange = (open2) => {
|
|
1087
|
-
if (props.onOpenChange) props.onOpenChange(open2, open2 ? menuOpenTrigger.current : void 0);
|
|
1088
|
-
selectionManager.setFocused(open2);
|
|
1089
|
-
if (!open2) selectionManager.setFocusedKey(null);
|
|
1090
|
-
};
|
|
1091
|
-
let triggerState = $fc909762b330b746$export$61c6a8c84e605fb6({
|
|
1092
|
-
...props,
|
|
1093
|
-
onOpenChange,
|
|
1094
|
-
isOpen: void 0,
|
|
1095
|
-
defaultOpen: void 0
|
|
1096
|
-
});
|
|
1097
|
-
let open = (focusStrategy2 = null, trigger) => {
|
|
1098
|
-
let displayAllItems = trigger === "manual" || trigger === "focus" && menuTrigger === "focus";
|
|
1099
|
-
if (allowsEmptyCollection || filteredCollection.size > 0 || displayAllItems && originalCollection.size > 0 || props.items) {
|
|
1100
|
-
if (displayAllItems && !triggerState.isOpen && props.items === void 0)
|
|
1101
|
-
setShowAllItems(true);
|
|
1102
|
-
menuOpenTrigger.current = trigger;
|
|
1103
|
-
setFocusStrategy(focusStrategy2);
|
|
1104
|
-
triggerState.open();
|
|
1105
|
-
}
|
|
1106
|
-
};
|
|
1107
|
-
let toggle = (focusStrategy2 = null, trigger) => {
|
|
1108
|
-
let displayAllItems = trigger === "manual" || trigger === "focus" && menuTrigger === "focus";
|
|
1109
|
-
if (!(allowsEmptyCollection || filteredCollection.size > 0 || displayAllItems && originalCollection.size > 0 || props.items) && !triggerState.isOpen) return;
|
|
1110
|
-
if (displayAllItems && !triggerState.isOpen && props.items === void 0)
|
|
1111
|
-
setShowAllItems(true);
|
|
1112
|
-
if (!triggerState.isOpen) menuOpenTrigger.current = trigger;
|
|
1113
|
-
toggleMenu(focusStrategy2);
|
|
1114
|
-
};
|
|
1115
|
-
let updateLastCollection = useCallback(() => {
|
|
1116
|
-
setLastCollection(showAllItems ? originalCollection : filteredCollection);
|
|
1117
|
-
}, [
|
|
1118
|
-
showAllItems,
|
|
1119
|
-
originalCollection,
|
|
1120
|
-
filteredCollection
|
|
1121
|
-
]);
|
|
1122
|
-
let toggleMenu = useCallback((focusStrategy2 = null) => {
|
|
1123
|
-
if (triggerState.isOpen) updateLastCollection();
|
|
1124
|
-
setFocusStrategy(focusStrategy2);
|
|
1125
|
-
triggerState.toggle();
|
|
1126
|
-
}, [
|
|
1127
|
-
triggerState,
|
|
1128
|
-
updateLastCollection
|
|
1129
|
-
]);
|
|
1130
|
-
let closeMenu = useCallback(() => {
|
|
1131
|
-
if (triggerState.isOpen) {
|
|
1132
|
-
updateLastCollection();
|
|
1133
|
-
triggerState.close();
|
|
1134
|
-
}
|
|
1135
|
-
}, [
|
|
1136
|
-
triggerState,
|
|
1137
|
-
updateLastCollection
|
|
1138
|
-
]);
|
|
1139
|
-
let [lastValue, setLastValue] = useState(inputValue);
|
|
1140
|
-
let resetInputValue = () => {
|
|
1141
|
-
var _collection_getItem2;
|
|
1142
|
-
var _collection_getItem_textValue2;
|
|
1143
|
-
let itemText = selectedKey != null ? (_collection_getItem_textValue2 = (_collection_getItem2 = collection.getItem(selectedKey)) === null || _collection_getItem2 === void 0 ? void 0 : _collection_getItem2.textValue) !== null && _collection_getItem_textValue2 !== void 0 ? _collection_getItem_textValue2 : "" : "";
|
|
1144
|
-
setLastValue(itemText);
|
|
1145
|
-
setInputValue(itemText);
|
|
1146
|
-
};
|
|
1147
|
-
var _props_selectedKey, _ref;
|
|
1148
|
-
let lastSelectedKey = useRef((_ref = (_props_selectedKey = props.selectedKey) !== null && _props_selectedKey !== void 0 ? _props_selectedKey : props.defaultSelectedKey) !== null && _ref !== void 0 ? _ref : null);
|
|
1149
|
-
var _collection_getItem_textValue1;
|
|
1150
|
-
let lastSelectedKeyText = useRef(selectedKey != null ? (_collection_getItem_textValue1 = (_collection_getItem = collection.getItem(selectedKey)) === null || _collection_getItem === void 0 ? void 0 : _collection_getItem.textValue) !== null && _collection_getItem_textValue1 !== void 0 ? _collection_getItem_textValue1 : "" : "");
|
|
1151
|
-
useEffect(() => {
|
|
1152
|
-
var _collection_getItem2;
|
|
1153
|
-
if (isFocused && (filteredCollection.size > 0 || allowsEmptyCollection) && !triggerState.isOpen && inputValue !== lastValue && menuTrigger !== "manual") open(null, "input");
|
|
1154
|
-
if (!showAllItems && !allowsEmptyCollection && triggerState.isOpen && filteredCollection.size === 0) closeMenu();
|
|
1155
|
-
if (selectedKey != null && selectedKey !== lastSelectedKey.current) closeMenu();
|
|
1156
|
-
if (inputValue !== lastValue) {
|
|
1157
|
-
selectionManager.setFocusedKey(null);
|
|
1158
|
-
setShowAllItems(false);
|
|
1159
|
-
if (inputValue === "" && (props.inputValue === void 0 || props.selectedKey === void 0)) setSelectedKey(null);
|
|
1160
|
-
}
|
|
1161
|
-
if (selectedKey !== lastSelectedKey.current && (props.inputValue === void 0 || props.selectedKey === void 0)) resetInputValue();
|
|
1162
|
-
else if (lastValue !== inputValue) setLastValue(inputValue);
|
|
1163
|
-
var _collection_getItem_textValue2;
|
|
1164
|
-
let selectedItemText = selectedKey != null ? (_collection_getItem_textValue2 = (_collection_getItem2 = collection.getItem(selectedKey)) === null || _collection_getItem2 === void 0 ? void 0 : _collection_getItem2.textValue) !== null && _collection_getItem_textValue2 !== void 0 ? _collection_getItem_textValue2 : "" : "";
|
|
1165
|
-
if (!isFocused && selectedKey != null && props.inputValue === void 0 && selectedKey === lastSelectedKey.current) {
|
|
1166
|
-
if (lastSelectedKeyText.current !== selectedItemText) {
|
|
1167
|
-
setLastValue(selectedItemText);
|
|
1168
|
-
setInputValue(selectedItemText);
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
lastSelectedKey.current = selectedKey;
|
|
1172
|
-
lastSelectedKeyText.current = selectedItemText;
|
|
1173
|
-
});
|
|
1174
|
-
let validation = $e5be200c675c3b3a$export$fc1a364ae1f3ff10({
|
|
1175
|
-
...props,
|
|
1176
|
-
value: useMemo(() => ({
|
|
1177
|
-
inputValue,
|
|
1178
|
-
selectedKey
|
|
1179
|
-
}), [
|
|
1180
|
-
inputValue,
|
|
1181
|
-
selectedKey
|
|
1182
|
-
])
|
|
1183
|
-
});
|
|
1184
|
-
let revert = () => {
|
|
1185
|
-
if (allowsCustomValue && selectedKey == null) commitCustomValue();
|
|
1186
|
-
else commitSelection();
|
|
1187
|
-
};
|
|
1188
|
-
let commitCustomValue = () => {
|
|
1189
|
-
lastSelectedKey.current = null;
|
|
1190
|
-
setSelectedKey(null);
|
|
1191
|
-
closeMenu();
|
|
1192
|
-
};
|
|
1193
|
-
let commitSelection = () => {
|
|
1194
|
-
if (props.selectedKey !== void 0 && props.inputValue !== void 0) {
|
|
1195
|
-
var _props_onSelectionChange, _collection_getItem2;
|
|
1196
|
-
(_props_onSelectionChange = props.onSelectionChange) === null || _props_onSelectionChange === void 0 ? void 0 : _props_onSelectionChange.call(props, selectedKey);
|
|
1197
|
-
var _collection_getItem_textValue2;
|
|
1198
|
-
let itemText = selectedKey != null ? (_collection_getItem_textValue2 = (_collection_getItem2 = collection.getItem(selectedKey)) === null || _collection_getItem2 === void 0 ? void 0 : _collection_getItem2.textValue) !== null && _collection_getItem_textValue2 !== void 0 ? _collection_getItem_textValue2 : "" : "";
|
|
1199
|
-
setLastValue(itemText);
|
|
1200
|
-
closeMenu();
|
|
1201
|
-
} else {
|
|
1202
|
-
resetInputValue();
|
|
1203
|
-
closeMenu();
|
|
1204
|
-
}
|
|
1205
|
-
};
|
|
1206
|
-
const commitValue = () => {
|
|
1207
|
-
if (allowsCustomValue) {
|
|
1208
|
-
var _collection_getItem2;
|
|
1209
|
-
var _collection_getItem_textValue2;
|
|
1210
|
-
const itemText = selectedKey != null ? (_collection_getItem_textValue2 = (_collection_getItem2 = collection.getItem(selectedKey)) === null || _collection_getItem2 === void 0 ? void 0 : _collection_getItem2.textValue) !== null && _collection_getItem_textValue2 !== void 0 ? _collection_getItem_textValue2 : "" : "";
|
|
1211
|
-
inputValue === itemText ? commitSelection() : commitCustomValue();
|
|
1212
|
-
} else
|
|
1213
|
-
commitSelection();
|
|
1214
|
-
};
|
|
1215
|
-
let commit = () => {
|
|
1216
|
-
if (triggerState.isOpen && selectionManager.focusedKey != null) {
|
|
1217
|
-
if (selectedKey === selectionManager.focusedKey) commitSelection();
|
|
1218
|
-
else setSelectedKey(selectionManager.focusedKey);
|
|
1219
|
-
} else commitValue();
|
|
1220
|
-
};
|
|
1221
|
-
let valueOnFocus = useRef(inputValue);
|
|
1222
|
-
let setFocused = (isFocused2) => {
|
|
1223
|
-
if (isFocused2) {
|
|
1224
|
-
valueOnFocus.current = inputValue;
|
|
1225
|
-
if (menuTrigger === "focus" && !props.isReadOnly) open(null, "focus");
|
|
1226
|
-
} else {
|
|
1227
|
-
if (shouldCloseOnBlur) commitValue();
|
|
1228
|
-
if (inputValue !== valueOnFocus.current) validation.commitValidation();
|
|
1229
|
-
}
|
|
1230
|
-
setFocusedState(isFocused2);
|
|
1231
|
-
};
|
|
1232
|
-
let displayedCollection = useMemo(() => {
|
|
1233
|
-
if (triggerState.isOpen) {
|
|
1234
|
-
if (showAllItems) return originalCollection;
|
|
1235
|
-
else return filteredCollection;
|
|
1236
|
-
} else return lastCollection;
|
|
1237
|
-
}, [
|
|
1238
|
-
triggerState.isOpen,
|
|
1239
|
-
originalCollection,
|
|
1240
|
-
filteredCollection,
|
|
1241
|
-
showAllItems,
|
|
1242
|
-
lastCollection
|
|
1243
|
-
]);
|
|
1244
|
-
return {
|
|
1245
|
-
...validation,
|
|
1246
|
-
...triggerState,
|
|
1247
|
-
focusStrategy,
|
|
1248
|
-
toggle,
|
|
1249
|
-
open,
|
|
1250
|
-
close: commitValue,
|
|
1251
|
-
selectionManager,
|
|
1252
|
-
selectedKey,
|
|
1253
|
-
setSelectedKey,
|
|
1254
|
-
disabledKeys,
|
|
1255
|
-
isFocused,
|
|
1256
|
-
setFocused,
|
|
1257
|
-
selectedItem,
|
|
1258
|
-
collection: displayedCollection,
|
|
1259
|
-
inputValue,
|
|
1260
|
-
setInputValue,
|
|
1261
|
-
commit,
|
|
1262
|
-
revert
|
|
1263
|
-
};
|
|
1264
|
-
}
|
|
1265
|
-
function $a9e7382a7d111cb5$var$filterCollection(collection, inputValue, filter) {
|
|
1266
|
-
return new $a02d57049d202695$export$d085fb9e920b5ca7($a9e7382a7d111cb5$var$filterNodes(collection, collection, inputValue, filter));
|
|
1267
|
-
}
|
|
1268
|
-
function $a9e7382a7d111cb5$var$filterNodes(collection, nodes, inputValue, filter) {
|
|
1269
|
-
let filteredNode = [];
|
|
1270
|
-
for (let node of nodes) {
|
|
1271
|
-
if (node.type === "section" && node.hasChildNodes) {
|
|
1272
|
-
let filtered = $a9e7382a7d111cb5$var$filterNodes(collection, $c5a24bc478652b5f$export$1005530eda016c13(node, collection), inputValue, filter);
|
|
1273
|
-
if ([
|
|
1274
|
-
...filtered
|
|
1275
|
-
].some((node2) => node2.type === "item")) filteredNode.push({
|
|
1276
|
-
...node,
|
|
1277
|
-
childNodes: filtered
|
|
1278
|
-
});
|
|
1279
|
-
} else if (node.type === "item" && filter(node.textValue, inputValue)) filteredNode.push({
|
|
1280
|
-
...node
|
|
1281
|
-
});
|
|
1282
|
-
else if (node.type !== "item") filteredNode.push({
|
|
1283
|
-
...node
|
|
1284
|
-
});
|
|
1285
|
-
}
|
|
1286
|
-
return filteredNode;
|
|
1287
|
-
}
|
|
1288
|
-
function $0d86e9c8f07f9a7b$export$79c0c687a5963b0a(opts, dispatch) {
|
|
1289
|
-
let { cursor, getKey } = opts;
|
|
1290
|
-
return {
|
|
1291
|
-
setSelectedKeys(selectedKeys) {
|
|
1292
|
-
dispatch((state) => ({
|
|
1293
|
-
...state,
|
|
1294
|
-
selectedKeys
|
|
1295
|
-
}));
|
|
1296
|
-
},
|
|
1297
|
-
setFilterText(filterText) {
|
|
1298
|
-
dispatch((state) => ({
|
|
1299
|
-
...state,
|
|
1300
|
-
filterText
|
|
1301
|
-
}));
|
|
1302
|
-
},
|
|
1303
|
-
insert(index, ...values) {
|
|
1304
|
-
dispatch((state) => $0d86e9c8f07f9a7b$var$insert(state, index, ...values));
|
|
1305
|
-
},
|
|
1306
|
-
insertBefore(key, ...values) {
|
|
1307
|
-
dispatch((state) => {
|
|
1308
|
-
let index = state.items.findIndex((item) => (getKey === null || getKey === void 0 ? void 0 : getKey(item)) === key);
|
|
1309
|
-
if (index === -1) {
|
|
1310
|
-
if (state.items.length === 0) index = 0;
|
|
1311
|
-
else return state;
|
|
1312
|
-
}
|
|
1313
|
-
return $0d86e9c8f07f9a7b$var$insert(state, index, ...values);
|
|
1314
|
-
});
|
|
1315
|
-
},
|
|
1316
|
-
insertAfter(key, ...values) {
|
|
1317
|
-
dispatch((state) => {
|
|
1318
|
-
let index = state.items.findIndex((item) => (getKey === null || getKey === void 0 ? void 0 : getKey(item)) === key);
|
|
1319
|
-
if (index === -1) {
|
|
1320
|
-
if (state.items.length === 0) index = 0;
|
|
1321
|
-
else return state;
|
|
1322
|
-
}
|
|
1323
|
-
return $0d86e9c8f07f9a7b$var$insert(state, index + 1, ...values);
|
|
1324
|
-
});
|
|
1325
|
-
},
|
|
1326
|
-
prepend(...values) {
|
|
1327
|
-
dispatch((state) => $0d86e9c8f07f9a7b$var$insert(state, 0, ...values));
|
|
1328
|
-
},
|
|
1329
|
-
append(...values) {
|
|
1330
|
-
dispatch((state) => $0d86e9c8f07f9a7b$var$insert(state, state.items.length, ...values));
|
|
1331
|
-
},
|
|
1332
|
-
remove(...keys) {
|
|
1333
|
-
dispatch((state) => {
|
|
1334
|
-
let keySet = new Set(keys);
|
|
1335
|
-
let items = state.items.filter((item) => !keySet.has(getKey(item)));
|
|
1336
|
-
let selection = "all";
|
|
1337
|
-
if (state.selectedKeys !== "all") {
|
|
1338
|
-
selection = new Set(state.selectedKeys);
|
|
1339
|
-
for (let key of keys) selection.delete(key);
|
|
1340
|
-
}
|
|
1341
|
-
if (cursor == null && items.length === 0) selection = /* @__PURE__ */ new Set();
|
|
1342
|
-
return {
|
|
1343
|
-
...state,
|
|
1344
|
-
items,
|
|
1345
|
-
selectedKeys: selection
|
|
1346
|
-
};
|
|
1347
|
-
});
|
|
1348
|
-
},
|
|
1349
|
-
removeSelectedItems() {
|
|
1350
|
-
dispatch((state) => {
|
|
1351
|
-
if (state.selectedKeys === "all") return {
|
|
1352
|
-
...state,
|
|
1353
|
-
items: [],
|
|
1354
|
-
selectedKeys: /* @__PURE__ */ new Set()
|
|
1355
|
-
};
|
|
1356
|
-
let selectedKeys = state.selectedKeys;
|
|
1357
|
-
let items = state.items.filter((item) => !selectedKeys.has(getKey(item)));
|
|
1358
|
-
return {
|
|
1359
|
-
...state,
|
|
1360
|
-
items,
|
|
1361
|
-
selectedKeys: /* @__PURE__ */ new Set()
|
|
1362
|
-
};
|
|
1363
|
-
});
|
|
1364
|
-
},
|
|
1365
|
-
move(key, toIndex) {
|
|
1366
|
-
dispatch((state) => {
|
|
1367
|
-
let index = state.items.findIndex((item2) => getKey(item2) === key);
|
|
1368
|
-
if (index === -1) return state;
|
|
1369
|
-
let copy = state.items.slice();
|
|
1370
|
-
let [item] = copy.splice(index, 1);
|
|
1371
|
-
copy.splice(toIndex, 0, item);
|
|
1372
|
-
return {
|
|
1373
|
-
...state,
|
|
1374
|
-
items: copy
|
|
1375
|
-
};
|
|
1376
|
-
});
|
|
1377
|
-
},
|
|
1378
|
-
moveBefore(key, keys) {
|
|
1379
|
-
dispatch((state) => {
|
|
1380
|
-
let toIndex = state.items.findIndex((item) => getKey(item) === key);
|
|
1381
|
-
if (toIndex === -1) return state;
|
|
1382
|
-
let keyArray = Array.isArray(keys) ? keys : [
|
|
1383
|
-
...keys
|
|
1384
|
-
];
|
|
1385
|
-
let indices = keyArray.map((key2) => state.items.findIndex((item) => getKey(item) === key2)).sort((a, b) => a - b);
|
|
1386
|
-
return $0d86e9c8f07f9a7b$var$move(state, indices, toIndex);
|
|
1387
|
-
});
|
|
1388
|
-
},
|
|
1389
|
-
moveAfter(key, keys) {
|
|
1390
|
-
dispatch((state) => {
|
|
1391
|
-
let toIndex = state.items.findIndex((item) => getKey(item) === key);
|
|
1392
|
-
if (toIndex === -1) return state;
|
|
1393
|
-
let keyArray = Array.isArray(keys) ? keys : [
|
|
1394
|
-
...keys
|
|
1395
|
-
];
|
|
1396
|
-
let indices = keyArray.map((key2) => state.items.findIndex((item) => getKey(item) === key2)).sort((a, b) => a - b);
|
|
1397
|
-
return $0d86e9c8f07f9a7b$var$move(state, indices, toIndex + 1);
|
|
1398
|
-
});
|
|
1399
|
-
},
|
|
1400
|
-
update(key, newValue) {
|
|
1401
|
-
dispatch((state) => {
|
|
1402
|
-
let index = state.items.findIndex((item) => getKey(item) === key);
|
|
1403
|
-
if (index === -1) return state;
|
|
1404
|
-
return {
|
|
1405
|
-
...state,
|
|
1406
|
-
items: [
|
|
1407
|
-
...state.items.slice(0, index),
|
|
1408
|
-
newValue,
|
|
1409
|
-
...state.items.slice(index + 1)
|
|
1410
|
-
]
|
|
1411
|
-
};
|
|
1412
|
-
});
|
|
1413
|
-
}
|
|
1414
|
-
};
|
|
1415
|
-
}
|
|
1416
|
-
function $0d86e9c8f07f9a7b$var$insert(state, index, ...values) {
|
|
1417
|
-
return {
|
|
1418
|
-
...state,
|
|
1419
|
-
items: [
|
|
1420
|
-
...state.items.slice(0, index),
|
|
1421
|
-
...values,
|
|
1422
|
-
...state.items.slice(index)
|
|
1423
|
-
]
|
|
1424
|
-
};
|
|
1425
|
-
}
|
|
1426
|
-
function $0d86e9c8f07f9a7b$var$move(state, indices, toIndex) {
|
|
1427
|
-
toIndex -= indices.filter((index) => index < toIndex).length;
|
|
1428
|
-
let moves = indices.map((from) => ({
|
|
1429
|
-
from,
|
|
1430
|
-
to: toIndex++
|
|
1431
|
-
}));
|
|
1432
|
-
for (let i = 0; i < moves.length; i++) {
|
|
1433
|
-
let a = moves[i].from;
|
|
1434
|
-
for (let j = i; j < moves.length; j++) {
|
|
1435
|
-
let b = moves[j].from;
|
|
1436
|
-
if (b > a) moves[j].from--;
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
for (let i = 0; i < moves.length; i++) {
|
|
1440
|
-
let a = moves[i];
|
|
1441
|
-
for (let j = moves.length - 1; j > i; j--) {
|
|
1442
|
-
let b = moves[j];
|
|
1443
|
-
if (b.from < a.to) a.to++;
|
|
1444
|
-
else b.from++;
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
|
-
let copy = state.items.slice();
|
|
1448
|
-
for (let move of moves) {
|
|
1449
|
-
let [item] = copy.splice(move.from, 1);
|
|
1450
|
-
copy.splice(move.to, 0, item);
|
|
1451
|
-
}
|
|
1452
|
-
return {
|
|
1453
|
-
...state,
|
|
1454
|
-
items: copy
|
|
1455
|
-
};
|
|
1456
|
-
}
|
|
1457
|
-
function $f86e6c1ec7da6ebb$var$reducer(data, action) {
|
|
1458
|
-
let selectedKeys;
|
|
1459
|
-
switch (data.state) {
|
|
1460
|
-
case "idle":
|
|
1461
|
-
case "error":
|
|
1462
|
-
switch (action.type) {
|
|
1463
|
-
case "loading":
|
|
1464
|
-
case "loadingMore":
|
|
1465
|
-
case "sorting":
|
|
1466
|
-
case "filtering":
|
|
1467
|
-
var _action_filterText, _action_sortDescriptor;
|
|
1468
|
-
return {
|
|
1469
|
-
...data,
|
|
1470
|
-
filterText: (_action_filterText = action.filterText) !== null && _action_filterText !== void 0 ? _action_filterText : data.filterText,
|
|
1471
|
-
state: action.type,
|
|
1472
|
-
// Reset items to an empty list if loading, but not when sorting.
|
|
1473
|
-
items: action.type === "loading" ? [] : data.items,
|
|
1474
|
-
sortDescriptor: (_action_sortDescriptor = action.sortDescriptor) !== null && _action_sortDescriptor !== void 0 ? _action_sortDescriptor : data.sortDescriptor,
|
|
1475
|
-
abortController: action.abortController
|
|
1476
|
-
};
|
|
1477
|
-
case "update":
|
|
1478
|
-
var _action_updater;
|
|
1479
|
-
return {
|
|
1480
|
-
...data,
|
|
1481
|
-
...(_action_updater = action.updater) === null || _action_updater === void 0 ? void 0 : _action_updater.call(action, data)
|
|
1482
|
-
};
|
|
1483
|
-
case "success":
|
|
1484
|
-
case "error":
|
|
1485
|
-
return data;
|
|
1486
|
-
default:
|
|
1487
|
-
throw new Error(`Invalid action "${action.type}" in state "${data.state}"`);
|
|
1488
|
-
}
|
|
1489
|
-
case "loading":
|
|
1490
|
-
case "sorting":
|
|
1491
|
-
case "filtering":
|
|
1492
|
-
switch (action.type) {
|
|
1493
|
-
case "success":
|
|
1494
|
-
if (action.abortController !== data.abortController) return data;
|
|
1495
|
-
var _action_selectedKeys;
|
|
1496
|
-
selectedKeys = (_action_selectedKeys = action.selectedKeys) !== null && _action_selectedKeys !== void 0 ? _action_selectedKeys : data.selectedKeys;
|
|
1497
|
-
var _action_filterText1, _action_items, _action_sortDescriptor1;
|
|
1498
|
-
return {
|
|
1499
|
-
...data,
|
|
1500
|
-
filterText: (_action_filterText1 = action.filterText) !== null && _action_filterText1 !== void 0 ? _action_filterText1 : data.filterText,
|
|
1501
|
-
state: "idle",
|
|
1502
|
-
items: [
|
|
1503
|
-
...(_action_items = action.items) !== null && _action_items !== void 0 ? _action_items : []
|
|
1504
|
-
],
|
|
1505
|
-
selectedKeys: selectedKeys === "all" ? "all" : new Set(selectedKeys),
|
|
1506
|
-
sortDescriptor: (_action_sortDescriptor1 = action.sortDescriptor) !== null && _action_sortDescriptor1 !== void 0 ? _action_sortDescriptor1 : data.sortDescriptor,
|
|
1507
|
-
abortController: void 0,
|
|
1508
|
-
cursor: action.cursor
|
|
1509
|
-
};
|
|
1510
|
-
case "error":
|
|
1511
|
-
if (action.abortController !== data.abortController) return data;
|
|
1512
|
-
return {
|
|
1513
|
-
...data,
|
|
1514
|
-
state: "error",
|
|
1515
|
-
error: action.error,
|
|
1516
|
-
abortController: void 0
|
|
1517
|
-
};
|
|
1518
|
-
case "loading":
|
|
1519
|
-
case "loadingMore":
|
|
1520
|
-
case "sorting":
|
|
1521
|
-
case "filtering":
|
|
1522
|
-
var _data_abortController;
|
|
1523
|
-
(_data_abortController = data.abortController) === null || _data_abortController === void 0 ? void 0 : _data_abortController.abort();
|
|
1524
|
-
var _action_filterText2;
|
|
1525
|
-
return {
|
|
1526
|
-
...data,
|
|
1527
|
-
filterText: (_action_filterText2 = action.filterText) !== null && _action_filterText2 !== void 0 ? _action_filterText2 : data.filterText,
|
|
1528
|
-
state: action.type,
|
|
1529
|
-
// Reset items to an empty list if loading, but not when sorting.
|
|
1530
|
-
items: action.type === "loading" ? [] : data.items,
|
|
1531
|
-
abortController: action.abortController
|
|
1532
|
-
};
|
|
1533
|
-
case "update":
|
|
1534
|
-
var _action_updater1;
|
|
1535
|
-
return {
|
|
1536
|
-
...data,
|
|
1537
|
-
...(_action_updater1 = action.updater) === null || _action_updater1 === void 0 ? void 0 : _action_updater1.call(action, data)
|
|
1538
|
-
};
|
|
1539
|
-
default:
|
|
1540
|
-
throw new Error(`Invalid action "${action.type}" in state "${data.state}"`);
|
|
1541
|
-
}
|
|
1542
|
-
case "loadingMore":
|
|
1543
|
-
switch (action.type) {
|
|
1544
|
-
case "success":
|
|
1545
|
-
var _action_selectedKeys1;
|
|
1546
|
-
selectedKeys = data.selectedKeys === "all" || action.selectedKeys === "all" ? "all" : /* @__PURE__ */ new Set([
|
|
1547
|
-
...data.selectedKeys,
|
|
1548
|
-
...(_action_selectedKeys1 = action.selectedKeys) !== null && _action_selectedKeys1 !== void 0 ? _action_selectedKeys1 : []
|
|
1549
|
-
]);
|
|
1550
|
-
var _action_items1, _action_sortDescriptor2;
|
|
1551
|
-
return {
|
|
1552
|
-
...data,
|
|
1553
|
-
state: "idle",
|
|
1554
|
-
items: [
|
|
1555
|
-
...data.items,
|
|
1556
|
-
...(_action_items1 = action.items) !== null && _action_items1 !== void 0 ? _action_items1 : []
|
|
1557
|
-
],
|
|
1558
|
-
selectedKeys,
|
|
1559
|
-
sortDescriptor: (_action_sortDescriptor2 = action.sortDescriptor) !== null && _action_sortDescriptor2 !== void 0 ? _action_sortDescriptor2 : data.sortDescriptor,
|
|
1560
|
-
abortController: void 0,
|
|
1561
|
-
cursor: action.cursor
|
|
1562
|
-
};
|
|
1563
|
-
case "error":
|
|
1564
|
-
if (action.abortController !== data.abortController) return data;
|
|
1565
|
-
return {
|
|
1566
|
-
...data,
|
|
1567
|
-
state: "error",
|
|
1568
|
-
error: action.error
|
|
1569
|
-
};
|
|
1570
|
-
case "loading":
|
|
1571
|
-
case "sorting":
|
|
1572
|
-
case "filtering":
|
|
1573
|
-
var _data_abortController1;
|
|
1574
|
-
(_data_abortController1 = data.abortController) === null || _data_abortController1 === void 0 ? void 0 : _data_abortController1.abort();
|
|
1575
|
-
var _action_filterText3;
|
|
1576
|
-
return {
|
|
1577
|
-
...data,
|
|
1578
|
-
filterText: (_action_filterText3 = action.filterText) !== null && _action_filterText3 !== void 0 ? _action_filterText3 : data.filterText,
|
|
1579
|
-
state: action.type,
|
|
1580
|
-
// Reset items to an empty list if loading, but not when sorting.
|
|
1581
|
-
items: action.type === "loading" ? [] : data.items,
|
|
1582
|
-
abortController: action.abortController
|
|
1583
|
-
};
|
|
1584
|
-
case "loadingMore":
|
|
1585
|
-
var _action_abortController;
|
|
1586
|
-
(_action_abortController = action.abortController) === null || _action_abortController === void 0 ? void 0 : _action_abortController.abort();
|
|
1587
|
-
return data;
|
|
1588
|
-
case "update":
|
|
1589
|
-
var _action_updater2;
|
|
1590
|
-
return {
|
|
1591
|
-
...data,
|
|
1592
|
-
...(_action_updater2 = action.updater) === null || _action_updater2 === void 0 ? void 0 : _action_updater2.call(action, data)
|
|
1593
|
-
};
|
|
1594
|
-
default:
|
|
1595
|
-
throw new Error(`Invalid action "${action.type}" in state "${data.state}"`);
|
|
1596
|
-
}
|
|
1597
|
-
default:
|
|
1598
|
-
throw new Error(`Invalid state "${data.state}"`);
|
|
1599
|
-
}
|
|
1600
|
-
}
|
|
1601
|
-
function $f86e6c1ec7da6ebb$export$bc3384a35de93d66(options) {
|
|
1602
|
-
const { load, sort, initialSelectedKeys, initialSortDescriptor, getKey = (item) => item.id || item.key, initialFilterText = "" } = options;
|
|
1603
|
-
let [data, dispatch] = useReducer($f86e6c1ec7da6ebb$var$reducer, {
|
|
1604
|
-
state: "idle",
|
|
1605
|
-
error: void 0,
|
|
1606
|
-
items: [],
|
|
1607
|
-
selectedKeys: initialSelectedKeys === "all" ? "all" : new Set(initialSelectedKeys),
|
|
1608
|
-
sortDescriptor: initialSortDescriptor,
|
|
1609
|
-
filterText: initialFilterText
|
|
1610
|
-
});
|
|
1611
|
-
const dispatchFetch = async (action, fn) => {
|
|
1612
|
-
let abortController = new AbortController();
|
|
1613
|
-
try {
|
|
1614
|
-
dispatch({
|
|
1615
|
-
...action,
|
|
1616
|
-
abortController
|
|
1617
|
-
});
|
|
1618
|
-
var _action_filterText;
|
|
1619
|
-
let previousFilterText = (_action_filterText = action.filterText) !== null && _action_filterText !== void 0 ? _action_filterText : data.filterText;
|
|
1620
|
-
var _action_sortDescriptor;
|
|
1621
|
-
let response = await fn({
|
|
1622
|
-
items: data.items.slice(),
|
|
1623
|
-
selectedKeys: data.selectedKeys,
|
|
1624
|
-
sortDescriptor: (_action_sortDescriptor = action.sortDescriptor) !== null && _action_sortDescriptor !== void 0 ? _action_sortDescriptor : data.sortDescriptor,
|
|
1625
|
-
signal: abortController.signal,
|
|
1626
|
-
cursor: action.type === "loadingMore" ? data.cursor : void 0,
|
|
1627
|
-
filterText: previousFilterText,
|
|
1628
|
-
loadingState: data.state
|
|
1629
|
-
});
|
|
1630
|
-
var _response_filterText;
|
|
1631
|
-
let filterText = (_response_filterText = response.filterText) !== null && _response_filterText !== void 0 ? _response_filterText : previousFilterText;
|
|
1632
|
-
dispatch({
|
|
1633
|
-
type: "success",
|
|
1634
|
-
...response,
|
|
1635
|
-
abortController
|
|
1636
|
-
});
|
|
1637
|
-
if (filterText && filterText !== previousFilterText && !abortController.signal.aborted) dispatchFetch({
|
|
1638
|
-
type: "filtering",
|
|
1639
|
-
filterText
|
|
1640
|
-
}, load);
|
|
1641
|
-
} catch (e) {
|
|
1642
|
-
dispatch({
|
|
1643
|
-
type: "error",
|
|
1644
|
-
error: e,
|
|
1645
|
-
abortController
|
|
1646
|
-
});
|
|
1647
|
-
}
|
|
1648
|
-
};
|
|
1649
|
-
let didDispatchInitialFetch = useRef(false);
|
|
1650
|
-
useEffect(() => {
|
|
1651
|
-
if (!didDispatchInitialFetch.current) {
|
|
1652
|
-
dispatchFetch({
|
|
1653
|
-
type: "loading"
|
|
1654
|
-
}, load);
|
|
1655
|
-
didDispatchInitialFetch.current = true;
|
|
1656
|
-
}
|
|
1657
|
-
}, []);
|
|
1658
|
-
return {
|
|
1659
|
-
items: data.items,
|
|
1660
|
-
selectedKeys: data.selectedKeys,
|
|
1661
|
-
sortDescriptor: data.sortDescriptor,
|
|
1662
|
-
isLoading: data.state === "loading" || data.state === "loadingMore" || data.state === "sorting" || data.state === "filtering",
|
|
1663
|
-
loadingState: data.state,
|
|
1664
|
-
error: data.error,
|
|
1665
|
-
filterText: data.filterText,
|
|
1666
|
-
getItem(key) {
|
|
1667
|
-
return data.items.find((item) => getKey(item) === key);
|
|
1668
|
-
},
|
|
1669
|
-
reload() {
|
|
1670
|
-
dispatchFetch({
|
|
1671
|
-
type: "loading"
|
|
1672
|
-
}, load);
|
|
1673
|
-
},
|
|
1674
|
-
loadMore() {
|
|
1675
|
-
if (data.state === "loadingMore" || data.state === "filtering" || data.cursor == null) return;
|
|
1676
|
-
dispatchFetch({
|
|
1677
|
-
type: "loadingMore"
|
|
1678
|
-
}, load);
|
|
1679
|
-
},
|
|
1680
|
-
sort(sortDescriptor) {
|
|
1681
|
-
dispatchFetch({
|
|
1682
|
-
type: "sorting",
|
|
1683
|
-
sortDescriptor
|
|
1684
|
-
}, sort || load);
|
|
1685
|
-
},
|
|
1686
|
-
...$0d86e9c8f07f9a7b$export$79c0c687a5963b0a({
|
|
1687
|
-
...options,
|
|
1688
|
-
getKey,
|
|
1689
|
-
cursor: data.cursor
|
|
1690
|
-
}, (fn) => {
|
|
1691
|
-
dispatch({
|
|
1692
|
-
type: "update",
|
|
1693
|
-
updater: fn
|
|
1694
|
-
});
|
|
1695
|
-
}),
|
|
1696
|
-
setFilterText(filterText) {
|
|
1697
|
-
dispatchFetch({
|
|
1698
|
-
type: "filtering",
|
|
1699
|
-
filterText
|
|
1700
|
-
}, load);
|
|
1701
|
-
}
|
|
1702
|
-
};
|
|
1703
|
-
}
|
|
1704
|
-
const $d01f2c01039c0eec$export$d414ccceff7063c3 = /* @__PURE__ */ createContext(null);
|
|
1705
|
-
const $d01f2c01039c0eec$export$c02625b26074192c = /* @__PURE__ */ createContext(null);
|
|
1706
|
-
const $d01f2c01039c0eec$export$72b9695b8216309a = /* @__PURE__ */ forwardRef(function ComboBox(props, ref) {
|
|
1707
|
-
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $d01f2c01039c0eec$export$d414ccceff7063c3);
|
|
1708
|
-
let { children, isDisabled = false, isInvalid = false, isRequired = false } = props;
|
|
1709
|
-
let content = useMemo(() => {
|
|
1710
|
-
var _props_items;
|
|
1711
|
-
return /* @__PURE__ */ React__default.createElement($eed445e0843c11d0$export$7ff8f37d2d81a48d.Provider, {
|
|
1712
|
-
value: {
|
|
1713
|
-
items: (_props_items = props.items) !== null && _props_items !== void 0 ? _props_items : props.defaultItems
|
|
1714
|
-
}
|
|
1715
|
-
}, typeof children === "function" ? children({
|
|
1716
|
-
isOpen: false,
|
|
1717
|
-
isDisabled,
|
|
1718
|
-
isInvalid,
|
|
1719
|
-
isRequired,
|
|
1720
|
-
defaultChildren: null
|
|
1721
|
-
}) : children);
|
|
1722
|
-
}, [
|
|
1723
|
-
children,
|
|
1724
|
-
isDisabled,
|
|
1725
|
-
isInvalid,
|
|
1726
|
-
isRequired,
|
|
1727
|
-
props.items,
|
|
1728
|
-
props.defaultItems
|
|
1729
|
-
]);
|
|
1730
|
-
return /* @__PURE__ */ React__default.createElement($e1995378a142960e$export$bf788dd355e3a401, {
|
|
1731
|
-
content
|
|
1732
|
-
}, (collection) => /* @__PURE__ */ React__default.createElement($d01f2c01039c0eec$var$ComboBoxInner, {
|
|
1733
|
-
props,
|
|
1734
|
-
collection,
|
|
1735
|
-
comboBoxRef: ref
|
|
1736
|
-
}));
|
|
1737
|
-
});
|
|
1738
|
-
const $d01f2c01039c0eec$var$CLEAR_CONTEXTS = [
|
|
1739
|
-
$01b77f81d0f07f68$export$75b6ee27786ba447,
|
|
1740
|
-
$d2b4bc8c273e7be6$export$24d547caef80ccd1,
|
|
1741
|
-
$3985021b0ad6602f$export$37fb8590cf2c088c,
|
|
1742
|
-
$a049562f99e7db0e$export$f9c6924e160136d1,
|
|
1743
|
-
$514c0188e459b4c0$export$9afb8bc826b033ea
|
|
1744
|
-
];
|
|
1745
|
-
function $d01f2c01039c0eec$var$ComboBoxInner({ props, collection, comboBoxRef: ref }) {
|
|
1746
|
-
let { name, formValue = "key", allowsCustomValue } = props;
|
|
1747
|
-
if (allowsCustomValue) formValue = "text";
|
|
1748
|
-
let { validationBehavior: formValidationBehavior } = $64fa3d84918910a7$export$fabf2dc03a41866e($d3e0e05bdfcf66bd$export$c24727297075ec6a) || {};
|
|
1749
|
-
var _props_validationBehavior, _ref;
|
|
1750
|
-
let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== void 0 ? _ref : "native";
|
|
1751
|
-
let { contains } = $bb77f239b46e8c72$export$3274cf84b703fff({
|
|
1752
|
-
sensitivity: "base"
|
|
1753
|
-
});
|
|
1754
|
-
let state = $a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({
|
|
1755
|
-
defaultFilter: props.defaultFilter || contains,
|
|
1756
|
-
...props,
|
|
1757
|
-
// If props.items isn't provided, rely on collection filtering (aka listbox.items is provided or defaultItems provided to Combobox)
|
|
1758
|
-
items: props.items,
|
|
1759
|
-
children: void 0,
|
|
1760
|
-
collection,
|
|
1761
|
-
validationBehavior
|
|
1762
|
-
});
|
|
1763
|
-
let buttonRef = useRef(null);
|
|
1764
|
-
let inputRef = useRef(null);
|
|
1765
|
-
let listBoxRef = useRef(null);
|
|
1766
|
-
let popoverRef = useRef(null);
|
|
1767
|
-
let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
|
|
1768
|
-
let { buttonProps, inputProps, listBoxProps, labelProps, descriptionProps, errorMessageProps, ...validation } = $c350ade66beef0af$export$8c18d1b4f7232bbf({
|
|
1769
|
-
...$64fa3d84918910a7$export$ef03459518577ad4(props),
|
|
1770
|
-
label,
|
|
1771
|
-
inputRef,
|
|
1772
|
-
buttonRef,
|
|
1773
|
-
listBoxRef,
|
|
1774
|
-
popoverRef,
|
|
1775
|
-
name: formValue === "text" ? name : void 0,
|
|
1776
|
-
validationBehavior
|
|
1777
|
-
}, state);
|
|
1778
|
-
let [menuWidth, setMenuWidth] = useState(null);
|
|
1779
|
-
let onResize = useCallback(() => {
|
|
1780
|
-
if (inputRef.current) {
|
|
1781
|
-
var _buttonRef_current;
|
|
1782
|
-
let buttonRect = (_buttonRef_current = buttonRef.current) === null || _buttonRef_current === void 0 ? void 0 : _buttonRef_current.getBoundingClientRect();
|
|
1783
|
-
let inputRect = inputRef.current.getBoundingClientRect();
|
|
1784
|
-
let minX = buttonRect ? Math.min(buttonRect.left, inputRect.left) : inputRect.left;
|
|
1785
|
-
let maxX = buttonRect ? Math.max(buttonRect.right, inputRect.right) : inputRect.right;
|
|
1786
|
-
setMenuWidth(maxX - minX + "px");
|
|
1787
|
-
}
|
|
1788
|
-
}, [
|
|
1789
|
-
buttonRef,
|
|
1790
|
-
inputRef,
|
|
1791
|
-
setMenuWidth
|
|
1792
|
-
]);
|
|
1793
|
-
$9daab02d461809db$export$683480f191c0e3ea({
|
|
1794
|
-
ref: inputRef,
|
|
1795
|
-
onResize
|
|
1796
|
-
});
|
|
1797
|
-
let renderPropsState = useMemo(() => ({
|
|
1798
|
-
isOpen: state.isOpen,
|
|
1799
|
-
isDisabled: props.isDisabled || false,
|
|
1800
|
-
isInvalid: validation.isInvalid || false,
|
|
1801
|
-
isRequired: props.isRequired || false
|
|
1802
|
-
}), [
|
|
1803
|
-
state.isOpen,
|
|
1804
|
-
props.isDisabled,
|
|
1805
|
-
validation.isInvalid,
|
|
1806
|
-
props.isRequired
|
|
1807
|
-
]);
|
|
1808
|
-
let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
|
|
1809
|
-
...props,
|
|
1810
|
-
values: renderPropsState,
|
|
1811
|
-
defaultClassName: "react-aria-ComboBox"
|
|
1812
|
-
});
|
|
1813
|
-
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props);
|
|
1814
|
-
delete DOMProps.id;
|
|
1815
|
-
var _state_selectedKey;
|
|
1816
|
-
return /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
|
|
1817
|
-
values: [
|
|
1818
|
-
[
|
|
1819
|
-
$d01f2c01039c0eec$export$c02625b26074192c,
|
|
1820
|
-
state
|
|
1821
|
-
],
|
|
1822
|
-
[
|
|
1823
|
-
$01b77f81d0f07f68$export$75b6ee27786ba447,
|
|
1824
|
-
{
|
|
1825
|
-
...labelProps,
|
|
1826
|
-
ref: labelRef
|
|
1827
|
-
}
|
|
1828
|
-
],
|
|
1829
|
-
[
|
|
1830
|
-
$d2b4bc8c273e7be6$export$24d547caef80ccd1,
|
|
1831
|
-
{
|
|
1832
|
-
...buttonProps,
|
|
1833
|
-
ref: buttonRef,
|
|
1834
|
-
isPressed: state.isOpen
|
|
1835
|
-
}
|
|
1836
|
-
],
|
|
1837
|
-
[
|
|
1838
|
-
$3985021b0ad6602f$export$37fb8590cf2c088c,
|
|
1839
|
-
{
|
|
1840
|
-
...inputProps,
|
|
1841
|
-
ref: inputRef
|
|
1842
|
-
}
|
|
1843
|
-
],
|
|
1844
|
-
[
|
|
1845
|
-
$de32f1b87079253c$export$d2f961adcb0afbe,
|
|
1846
|
-
state
|
|
1847
|
-
],
|
|
1848
|
-
[
|
|
1849
|
-
$07b14b47974efb58$export$9b9a0cd73afb7ca4,
|
|
1850
|
-
{
|
|
1851
|
-
ref: popoverRef,
|
|
1852
|
-
triggerRef: inputRef,
|
|
1853
|
-
scrollRef: listBoxRef,
|
|
1854
|
-
placement: "bottom start",
|
|
1855
|
-
isNonModal: true,
|
|
1856
|
-
trigger: "ComboBox",
|
|
1857
|
-
style: {
|
|
1858
|
-
"--trigger-width": menuWidth
|
|
1859
|
-
},
|
|
1860
|
-
clearContexts: $d01f2c01039c0eec$var$CLEAR_CONTEXTS
|
|
1861
|
-
}
|
|
1862
|
-
],
|
|
1863
|
-
[
|
|
1864
|
-
$eed445e0843c11d0$export$7ff8f37d2d81a48d,
|
|
1865
|
-
{
|
|
1866
|
-
...listBoxProps,
|
|
1867
|
-
ref: listBoxRef
|
|
1868
|
-
}
|
|
1869
|
-
],
|
|
1870
|
-
[
|
|
1871
|
-
$eed445e0843c11d0$export$7c5906fe4f1f2af2,
|
|
1872
|
-
state
|
|
1873
|
-
],
|
|
1874
|
-
[
|
|
1875
|
-
$514c0188e459b4c0$export$9afb8bc826b033ea,
|
|
1876
|
-
{
|
|
1877
|
-
slots: {
|
|
1878
|
-
description: descriptionProps,
|
|
1879
|
-
errorMessage: errorMessageProps
|
|
1880
|
-
}
|
|
1881
|
-
}
|
|
1882
|
-
],
|
|
1883
|
-
[
|
|
1884
|
-
$a049562f99e7db0e$export$f9c6924e160136d1,
|
|
1885
|
-
{
|
|
1886
|
-
isInvalid: validation.isInvalid,
|
|
1887
|
-
isDisabled: props.isDisabled || false
|
|
1888
|
-
}
|
|
1889
|
-
],
|
|
1890
|
-
[
|
|
1891
|
-
$ee014567cb39d3f0$export$ff05c3ac10437e03,
|
|
1892
|
-
validation
|
|
1893
|
-
]
|
|
1894
|
-
]
|
|
1895
|
-
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
1896
|
-
...DOMProps,
|
|
1897
|
-
...renderProps,
|
|
1898
|
-
ref,
|
|
1899
|
-
slot: props.slot || void 0,
|
|
1900
|
-
"data-focused": state.isFocused || void 0,
|
|
1901
|
-
"data-open": state.isOpen || void 0,
|
|
1902
|
-
"data-disabled": props.isDisabled || void 0,
|
|
1903
|
-
"data-invalid": validation.isInvalid || void 0,
|
|
1904
|
-
"data-required": props.isRequired || void 0
|
|
1905
|
-
}), name && formValue === "key" && /* @__PURE__ */ React__default.createElement("input", {
|
|
1906
|
-
type: "hidden",
|
|
1907
|
-
name,
|
|
1908
|
-
value: (_state_selectedKey = state.selectedKey) !== null && _state_selectedKey !== void 0 ? _state_selectedKey : ""
|
|
1909
|
-
}));
|
|
1910
|
-
}
|
|
1911
|
-
export {
|
|
1912
|
-
$f86e6c1ec7da6ebb$export$bc3384a35de93d66 as $,
|
|
1913
|
-
$d01f2c01039c0eec$export$72b9695b8216309a as a,
|
|
1914
|
-
$d01f2c01039c0eec$export$c02625b26074192c as b
|
|
1915
|
-
};
|