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