@quoreadmin/ui 1.10.27 → 1.10.29

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 (197) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index103.js +11 -6
  3. package/dist/index147.js +2 -2
  4. package/dist/index149.js +1 -1
  5. package/dist/index151.js +4 -4
  6. package/dist/index157.js +160 -160
  7. package/dist/index165.js +1 -1
  8. package/dist/index169.js +7 -7
  9. package/dist/index197.js +1228 -36
  10. package/dist/index199.js +5816 -1106
  11. package/dist/index200.js +209 -0
  12. package/dist/index201.js +19 -5922
  13. package/dist/index202.js +10 -199
  14. package/dist/index203.js +76 -33
  15. package/dist/index204.js +249 -14
  16. package/dist/index205.js +13678 -72
  17. package/dist/index206.js +27 -253
  18. package/dist/index207.js +48 -13669
  19. package/dist/index208.js +236 -25
  20. package/dist/index209.js +293 -45
  21. package/dist/index210.js +238 -179
  22. package/dist/index211.js +36 -311
  23. package/dist/index212.js +43 -296
  24. package/dist/index216.js +2 -2
  25. package/dist/index217.js +1 -1
  26. package/dist/index219.js +4 -4
  27. package/dist/index221.js +1 -1
  28. package/dist/index222.js +1 -1
  29. package/dist/index223.js +1 -1
  30. package/dist/index224.js +4 -4
  31. package/dist/index226.js +1 -1
  32. package/dist/index227.js +2 -2
  33. package/dist/index228.js +2 -2
  34. package/dist/index229.js +1 -1
  35. package/dist/index23.js +47 -27
  36. package/dist/index230.js +1 -1
  37. package/dist/index231.js +1 -1
  38. package/dist/index232.js +1 -1
  39. package/dist/index233.js +1 -1
  40. package/dist/index234.js +4 -4
  41. package/dist/index235.js +1 -1
  42. package/dist/index236.js +1 -1
  43. package/dist/index237.js +1 -1
  44. package/dist/index238.js +1 -1
  45. package/dist/index240.js +1 -1
  46. package/dist/index241.js +1 -1
  47. package/dist/index242.js +1 -1
  48. package/dist/index243.js +1 -1
  49. package/dist/index244.js +1 -1
  50. package/dist/index249.js +1 -1
  51. package/dist/index250.js +1 -1
  52. package/dist/index251.js +1 -1
  53. package/dist/index252.js +6 -6
  54. package/dist/index253.js +1 -1
  55. package/dist/index254.js +1 -1
  56. package/dist/index255.js +1 -1
  57. package/dist/index256.js +1 -1
  58. package/dist/index257.js +1 -1
  59. package/dist/index259.js +1 -1
  60. package/dist/index260.js +1 -1
  61. package/dist/index261.js +3 -3
  62. package/dist/index262.js +1 -1
  63. package/dist/index263.js +1 -1
  64. package/dist/index264.js +1 -1
  65. package/dist/index265.js +1 -1
  66. package/dist/index266.js +1 -1
  67. package/dist/index267.js +1 -1
  68. package/dist/index270.js +3673 -217
  69. package/dist/index271.js +59 -7
  70. package/dist/index272.js +78 -133
  71. package/dist/index273.js +51 -82
  72. package/dist/index274.js +213 -52
  73. package/dist/index275.js +10 -79
  74. package/dist/index276.js +57 -26
  75. package/dist/index277.js +61 -22
  76. package/dist/index278.js +54 -22
  77. package/dist/index279.js +79 -14
  78. package/dist/index280.js +727 -16
  79. package/dist/index281.js +45 -21
  80. package/dist/index282.js +64 -3
  81. package/dist/index283.js +11 -27
  82. package/dist/index284.js +637 -3641
  83. package/dist/index285.js +819 -59
  84. package/dist/index286.js +242 -72
  85. package/dist/index287.js +7 -51
  86. package/dist/index288.js +132 -209
  87. package/dist/index289.js +83 -10
  88. package/dist/index290.js +51 -54
  89. package/dist/index291.js +77 -59
  90. package/dist/index292.js +26 -54
  91. package/dist/index293.js +22 -81
  92. package/dist/index294.js +21 -727
  93. package/dist/index295.js +14 -45
  94. package/dist/index296.js +15 -62
  95. package/dist/index297.js +22 -10
  96. package/dist/index298.js +3 -705
  97. package/dist/index299.js +21 -814
  98. package/dist/index301.js +1534 -79
  99. package/dist/index302.js +386 -22
  100. package/dist/index303.js +2698 -902
  101. package/dist/index304.js +85 -21
  102. package/dist/index305.js +3798 -20
  103. package/dist/index306.js +59 -19
  104. package/dist/index307.js +77 -67
  105. package/dist/index308.js +21 -18
  106. package/dist/index309.js +934 -18
  107. package/dist/index310.js +16 -16
  108. package/dist/index311.js +11 -13
  109. package/dist/index312.js +19 -62
  110. package/dist/index313.js +67 -263
  111. package/dist/index314.js +19 -6
  112. package/dist/index315.js +18 -149
  113. package/dist/index316.js +21 -68
  114. package/dist/index317.js +20 -89
  115. package/dist/index318.js +63 -29
  116. package/dist/index319.js +15 -16
  117. package/dist/index320.js +74 -65
  118. package/dist/index321.js +201 -3
  119. package/dist/index322.js +246 -2
  120. package/dist/index323.js +227 -76
  121. package/dist/index324.js +5 -57
  122. package/dist/index325.js +133 -5
  123. package/dist/index326.js +67 -4
  124. package/dist/index327.js +79 -178
  125. package/dist/index328.js +26 -60
  126. package/dist/index329.js +8 -74
  127. package/dist/index330.js +73 -35
  128. package/dist/index331.js +3 -8
  129. package/dist/index332.js +2 -13
  130. package/dist/index333.js +78 -50
  131. package/dist/index334.js +53 -11
  132. package/dist/index335.js +4 -12
  133. package/dist/index336.js +4 -57
  134. package/dist/index337.js +175 -48
  135. package/dist/index338.js +60 -28
  136. package/dist/index339.js +75 -2
  137. package/dist/index340.js +37 -5
  138. package/dist/index341.js +9 -2
  139. package/dist/index342.js +13 -23
  140. package/dist/index343.js +52 -38
  141. package/dist/index344.js +12 -2
  142. package/dist/index345.js +14 -11
  143. package/dist/index346.js +54 -16
  144. package/dist/index347.js +52 -10
  145. package/dist/index348.js +31 -10
  146. package/dist/index349.js +2 -17
  147. package/dist/index350.js +5 -2
  148. package/dist/index351.js +2 -9
  149. package/dist/index352.js +23 -10
  150. package/dist/index353.js +39 -12
  151. package/dist/index354.js +2 -1534
  152. package/dist/index355.js +9 -384
  153. package/dist/index356.js +16 -2727
  154. package/dist/index357.js +10 -86
  155. package/dist/index358.js +9 -3797
  156. package/dist/index359.js +15 -58
  157. package/dist/index360.js +2 -15
  158. package/dist/index361.js +9 -84
  159. package/dist/index362.js +9 -201
  160. package/dist/index363.js +13 -245
  161. package/dist/index364.js +1 -1
  162. package/dist/index365.js +1 -1
  163. package/dist/index367.js +1 -1
  164. package/dist/index368.js +14 -12
  165. package/dist/index369.js +1 -2
  166. package/dist/index370.js +22 -18
  167. package/dist/index371.js +2 -2
  168. package/dist/index372.js +3 -6
  169. package/dist/index373.js +3 -4
  170. package/dist/index374.js +2 -2
  171. package/dist/index375.js +2 -2
  172. package/dist/index376.js +1 -1
  173. package/dist/index378.js +20 -32
  174. package/dist/index379.js +45 -58
  175. package/dist/index380.js +1 -1
  176. package/dist/index381.js +98 -28
  177. package/dist/index382.js +90 -10
  178. package/dist/index383.js +98 -4
  179. package/dist/index384.js +30 -3
  180. package/dist/index385.js +11 -13
  181. package/dist/index386.js +4 -7
  182. package/dist/index387.js +3 -13
  183. package/dist/index388.js +13 -5
  184. package/dist/index389.js +7 -36
  185. package/dist/index390.js +11 -36
  186. package/dist/index391.js +5 -30
  187. package/dist/index392.js +33 -64
  188. package/dist/index393.js +29 -99
  189. package/dist/index394.js +28 -91
  190. package/dist/index395.js +59 -96
  191. package/dist/index396.js +1 -1
  192. package/dist/index402.js +1 -1
  193. package/dist/index50.js +1 -1
  194. package/dist/src/components/event/event.d.ts +12 -0
  195. package/dist/src/components/event/event.stories.d.ts +2 -0
  196. package/package.json +2 -2
  197. package/dist/index198.js +0 -46
package/dist/index197.js CHANGED
@@ -1,38 +1,1230 @@
1
- import o from "./index198.js";
2
- const {
3
- Axios: e,
4
- AxiosError: a,
5
- CanceledError: s,
6
- isCancel: t,
7
- CancelToken: i,
8
- VERSION: l,
9
- all: n,
10
- Cancel: d,
11
- isAxiosError: x,
12
- spread: C,
13
- toFormData: c,
14
- AxiosHeaders: m,
15
- HttpStatusCode: p,
16
- formToJSON: A,
17
- getAdapter: f,
18
- mergeConfig: E
19
- } = o;
1
+ import { openBlock as d, createElementBlock as p, withKeys as f, withModifiers as r, normalizeClass as y, renderSlot as o, createElementVNode as u, withDirectives as v, Fragment as L, renderList as $, toDisplayString as g, vShow as w, createCommentVNode as c, createVNode as B, Transition as k, withCtx as T, normalizeStyle as S, createTextVNode as b, createBlock as E, Teleport as A } from "vue";
2
+ function V(e) {
3
+ return e === 0 ? !1 : Array.isArray(e) && e.length === 0 ? !0 : !e;
4
+ }
5
+ function M(e) {
6
+ return (...t) => !e(...t);
7
+ }
8
+ function P(e, t) {
9
+ return e === void 0 && (e = "undefined"), e === null && (e = "null"), e === !1 && (e = "false"), e.toString().toLowerCase().indexOf(t.trim()) !== -1;
10
+ }
11
+ function C(e) {
12
+ return e.filter((t) => !t.$isLabel);
13
+ }
14
+ function O(e, t) {
15
+ return (i) => i.reduce((l, a) => a[e] && a[e].length ? (l.push({
16
+ $groupLabel: a[t],
17
+ $isLabel: !0
18
+ }), l.concat(a[e])) : l, []);
19
+ }
20
+ const D = (...e) => (t) => e.reduce((i, l) => l(i), t);
21
+ var F = {
22
+ data() {
23
+ return {
24
+ search: "",
25
+ isOpen: !1,
26
+ preferredOpenDirection: "below",
27
+ optimizedHeight: this.maxHeight
28
+ };
29
+ },
30
+ props: {
31
+ /**
32
+ * Decide whether to filter the results based on search query.
33
+ * Useful for async filtering, where we search through more complex data.
34
+ * @type {Boolean}
35
+ */
36
+ internalSearch: {
37
+ type: Boolean,
38
+ default: !0
39
+ },
40
+ /**
41
+ * Array of available options: Objects, Strings or Integers.
42
+ * If array of objects, visible label will default to option.label.
43
+ * If `labal` prop is passed, label will equal option['label']
44
+ * @type {Array}
45
+ */
46
+ options: {
47
+ type: Array,
48
+ required: !0
49
+ },
50
+ /**
51
+ * Equivalent to the `multiple` attribute on a `<select>` input.
52
+ * @default false
53
+ * @type {Boolean}
54
+ */
55
+ multiple: {
56
+ type: Boolean,
57
+ default: !1
58
+ },
59
+ /**
60
+ * Key to compare objects
61
+ * @default 'id'
62
+ * @type {String}
63
+ */
64
+ trackBy: {
65
+ type: String
66
+ },
67
+ /**
68
+ * Label to look for in option Object
69
+ * @default 'label'
70
+ * @type {String}
71
+ */
72
+ label: {
73
+ type: String
74
+ },
75
+ /**
76
+ * Enable/disable search in options
77
+ * @default true
78
+ * @type {Boolean}
79
+ */
80
+ searchable: {
81
+ type: Boolean,
82
+ default: !0
83
+ },
84
+ /**
85
+ * Clear the search input after `)
86
+ * @default true
87
+ * @type {Boolean}
88
+ */
89
+ clearOnSelect: {
90
+ type: Boolean,
91
+ default: !0
92
+ },
93
+ /**
94
+ * Hide already selected options
95
+ * @default false
96
+ * @type {Boolean}
97
+ */
98
+ hideSelected: {
99
+ type: Boolean,
100
+ default: !1
101
+ },
102
+ /**
103
+ * Equivalent to the `placeholder` attribute on a `<select>` input.
104
+ * @default 'Select option'
105
+ * @type {String}
106
+ */
107
+ placeholder: {
108
+ type: String,
109
+ default: "Select option"
110
+ },
111
+ /**
112
+ * Allow to remove all selected values
113
+ * @default true
114
+ * @type {Boolean}
115
+ */
116
+ allowEmpty: {
117
+ type: Boolean,
118
+ default: !0
119
+ },
120
+ /**
121
+ * Reset this.internalValue, this.search after this.internalValue changes.
122
+ * Useful if want to create a stateless dropdown.
123
+ * @default false
124
+ * @type {Boolean}
125
+ */
126
+ resetAfter: {
127
+ type: Boolean,
128
+ default: !1
129
+ },
130
+ /**
131
+ * Enable/disable closing after selecting an option
132
+ * @default true
133
+ * @type {Boolean}
134
+ */
135
+ closeOnSelect: {
136
+ type: Boolean,
137
+ default: !0
138
+ },
139
+ /**
140
+ * Function to interpolate the custom label
141
+ * @default false
142
+ * @type {Function}
143
+ */
144
+ customLabel: {
145
+ type: Function,
146
+ default(e, t) {
147
+ return V(e) ? "" : t ? e[t] : e;
148
+ }
149
+ },
150
+ /**
151
+ * Disable / Enable tagging
152
+ * @default false
153
+ * @type {Boolean}
154
+ */
155
+ taggable: {
156
+ type: Boolean,
157
+ default: !1
158
+ },
159
+ /**
160
+ * String to show when highlighting a potential tag
161
+ * @default 'Press enter to create a tag'
162
+ * @type {String}
163
+ */
164
+ tagPlaceholder: {
165
+ type: String,
166
+ default: "Press enter to create a tag"
167
+ },
168
+ /**
169
+ * By default new tags will appear above the search results.
170
+ * Changing to 'bottom' will revert this behaviour
171
+ * and will proritize the search results
172
+ * @default 'top'
173
+ * @type {String}
174
+ */
175
+ tagPosition: {
176
+ type: String,
177
+ default: "top"
178
+ },
179
+ /**
180
+ * Number of allowed selected options. No limit if 0.
181
+ * @default 0
182
+ * @type {Number}
183
+ */
184
+ max: {
185
+ type: [Number, Boolean],
186
+ default: !1
187
+ },
188
+ /**
189
+ * Will be passed with all events as second param.
190
+ * Useful for identifying events origin.
191
+ * @default null
192
+ * @type {String|Integer}
193
+ */
194
+ id: {
195
+ default: null
196
+ },
197
+ /**
198
+ * Limits the options displayed in the dropdown
199
+ * to the first X options.
200
+ * @default 1000
201
+ * @type {Integer}
202
+ */
203
+ optionsLimit: {
204
+ type: Number,
205
+ default: 1e3
206
+ },
207
+ /**
208
+ * Name of the property containing
209
+ * the group values
210
+ * @default 1000
211
+ * @type {String}
212
+ */
213
+ groupValues: {
214
+ type: String
215
+ },
216
+ /**
217
+ * Name of the property containing
218
+ * the group label
219
+ * @default 1000
220
+ * @type {String}
221
+ */
222
+ groupLabel: {
223
+ type: String
224
+ },
225
+ /**
226
+ * Allow to select all group values
227
+ * by selecting the group label
228
+ * @default false
229
+ * @type {Boolean}
230
+ */
231
+ groupSelect: {
232
+ type: Boolean,
233
+ default: !1
234
+ },
235
+ /**
236
+ * Array of keyboard keys to block
237
+ * when selecting
238
+ * @default 1000
239
+ * @type {String}
240
+ */
241
+ blockKeys: {
242
+ type: Array,
243
+ default() {
244
+ return [];
245
+ }
246
+ },
247
+ /**
248
+ * Prevent from wiping up the search value
249
+ * @default false
250
+ * @type {Boolean}
251
+ */
252
+ preserveSearch: {
253
+ type: Boolean,
254
+ default: !1
255
+ },
256
+ /**
257
+ * Select 1st options if value is empty
258
+ * @default false
259
+ * @type {Boolean}
260
+ */
261
+ preselectFirst: {
262
+ type: Boolean,
263
+ default: !1
264
+ },
265
+ /**
266
+ * Prevent autofocus
267
+ * @default false
268
+ * @type {Boolean}
269
+ */
270
+ preventAutofocus: {
271
+ type: Boolean,
272
+ default: !1
273
+ },
274
+ /**
275
+ * Allows a custom function for sorting search/filtered results.
276
+ * @default null
277
+ * @type {Function}
278
+ */
279
+ filteringSortFunc: {
280
+ type: Function,
281
+ default: null
282
+ }
283
+ },
284
+ mounted() {
285
+ !this.multiple && this.max && console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."), this.preselectFirst && !this.internalValue.length && this.options.length && this.select(this.filteredOptions[0]);
286
+ },
287
+ computed: {
288
+ internalValue() {
289
+ return this.modelValue || this.modelValue === 0 ? Array.isArray(this.modelValue) ? this.modelValue : [this.modelValue] : [];
290
+ },
291
+ filteredOptions() {
292
+ const e = this.search || "", t = e.toLowerCase().trim();
293
+ let i = this.options.concat();
294
+ return this.internalSearch ? i = this.groupValues ? this.filterAndFlat(i, t, this.label) : this.filterOptions(i, t, this.label, this.customLabel) : i = this.groupValues ? O(this.groupValues, this.groupLabel)(i) : i, i = this.hideSelected ? i.filter(M(this.isSelected)) : i, this.taggable && t.length && !this.isExistingOption(t) && (this.tagPosition === "bottom" ? i.push({ isTag: !0, label: e }) : i.unshift({ isTag: !0, label: e })), i.slice(0, this.optionsLimit);
295
+ },
296
+ valueKeys() {
297
+ return this.trackBy ? this.internalValue.map((e) => e[this.trackBy]) : this.internalValue;
298
+ },
299
+ optionKeys() {
300
+ return (this.groupValues ? this.flatAndStrip(this.options) : this.options).map((t) => this.customLabel(t, this.label).toString().toLowerCase());
301
+ },
302
+ currentOptionLabel() {
303
+ return this.multiple ? this.searchable ? "" : this.placeholder : this.internalValue.length ? this.getOptionLabel(this.internalValue[0]) : this.searchable ? "" : this.placeholder;
304
+ }
305
+ },
306
+ watch: {
307
+ internalValue: {
308
+ handler() {
309
+ this.resetAfter && this.internalValue.length && (this.search = "", this.$emit("update:modelValue", this.multiple ? [] : null));
310
+ },
311
+ deep: !0
312
+ },
313
+ search() {
314
+ this.$emit("search-change", this.search);
315
+ }
316
+ },
317
+ emits: ["open", "search-change", "close", "select", "update:modelValue", "remove", "tag"],
318
+ methods: {
319
+ /**
320
+ * Returns the internalValue in a way it can be emited to the parent
321
+ * @returns {Object||Array||String||Integer}
322
+ */
323
+ getValue() {
324
+ return this.multiple ? this.internalValue : this.internalValue.length === 0 ? null : this.internalValue[0];
325
+ },
326
+ /**
327
+ * Filters and then flattens the options list
328
+ * @param {Array}
329
+ * @return {Array} returns a filtered and flat options list
330
+ */
331
+ filterAndFlat(e, t, i) {
332
+ return D(
333
+ this.filterGroups(t, i, this.groupValues, this.groupLabel, this.customLabel),
334
+ O(this.groupValues, this.groupLabel)
335
+ )(e);
336
+ },
337
+ /**
338
+ * Flattens and then strips the group labels from the options list
339
+ * @param {Array}
340
+ * @return {Array} returns a flat options list without group labels
341
+ */
342
+ flatAndStrip(e) {
343
+ return D(
344
+ O(this.groupValues, this.groupLabel),
345
+ C
346
+ )(e);
347
+ },
348
+ /**
349
+ * Updates the search value
350
+ * @param {String}
351
+ */
352
+ updateSearch(e) {
353
+ this.search = e;
354
+ },
355
+ /**
356
+ * Finds out if the given query is already present
357
+ * in the available options
358
+ * @param {String}
359
+ * @return {Boolean} returns true if element is available
360
+ */
361
+ isExistingOption(e) {
362
+ return this.options ? this.optionKeys.indexOf(e) > -1 : !1;
363
+ },
364
+ /**
365
+ * Finds out if the given element is already present
366
+ * in the result value
367
+ * @param {Object||String||Integer} option passed element to check
368
+ * @returns {Boolean} returns true if element is selected
369
+ */
370
+ isSelected(e) {
371
+ const t = this.trackBy ? e[this.trackBy] : e;
372
+ return this.valueKeys.indexOf(t) > -1;
373
+ },
374
+ /**
375
+ * Finds out if the given option is disabled
376
+ * @param {Object||String||Integer} option passed element to check
377
+ * @returns {Boolean} returns true if element is disabled
378
+ */
379
+ isOptionDisabled(e) {
380
+ return !!e.$isDisabled;
381
+ },
382
+ /**
383
+ * Returns empty string when options is null/undefined
384
+ * Returns tag query if option is tag.
385
+ * Returns the customLabel() results and casts it to string.
386
+ *
387
+ * @param {Object||String||Integer} Passed option
388
+ * @returns {Object||String}
389
+ */
390
+ getOptionLabel(e) {
391
+ if (V(e)) return "";
392
+ if (e.isTag) return e.label;
393
+ if (e.$isLabel) return e.$groupLabel;
394
+ const t = this.customLabel(e, this.label);
395
+ return V(t) ? "" : t;
396
+ },
397
+ /**
398
+ * Add the given option to the list of selected options
399
+ * or sets the option as the selected option.
400
+ * If option is already selected -> remove it from the results.
401
+ *
402
+ * @param {Object||String||Integer} option to select/deselect
403
+ * @param {Boolean} block removing
404
+ */
405
+ select(e, t) {
406
+ if (e.$isLabel && this.groupSelect) {
407
+ this.selectGroup(e);
408
+ return;
409
+ }
410
+ if (!(this.blockKeys.indexOf(t) !== -1 || this.disabled || e.$isDisabled || e.$isLabel) && !(this.max && this.multiple && this.internalValue.length === this.max) && !(t === "Tab" && !this.pointerDirty)) {
411
+ if (e.isTag)
412
+ this.$emit("tag", e.label, this.id), this.search = "", this.closeOnSelect && !this.multiple && this.deactivate();
413
+ else {
414
+ if (this.isSelected(e)) {
415
+ t !== "Tab" && this.removeElement(e);
416
+ return;
417
+ }
418
+ this.multiple ? this.$emit("update:modelValue", this.internalValue.concat([e])) : this.$emit("update:modelValue", e), this.$emit("select", e, this.id), this.clearOnSelect && (this.search = "");
419
+ }
420
+ this.closeOnSelect && this.deactivate();
421
+ }
422
+ },
423
+ /**
424
+ * Add the given group options to the list of selected options
425
+ * If all group optiona are already selected -> remove it from the results.
426
+ *
427
+ * @param {Object||String||Integer} group to select/deselect
428
+ */
429
+ selectGroup(e) {
430
+ const t = this.options.find((i) => i[this.groupLabel] === e.$groupLabel);
431
+ if (t) {
432
+ if (this.wholeGroupSelected(t)) {
433
+ this.$emit("remove", t[this.groupValues], this.id);
434
+ const i = this.trackBy ? t[this.groupValues].map((a) => a[this.trackBy]) : t[this.groupValues], l = this.internalValue.filter(
435
+ (a) => i.indexOf(this.trackBy ? a[this.trackBy] : a) === -1
436
+ );
437
+ this.$emit("update:modelValue", l);
438
+ } else {
439
+ const i = t[this.groupValues].filter(
440
+ (l) => !(this.isOptionDisabled(l) || this.isSelected(l))
441
+ );
442
+ this.max && i.splice(this.max - this.internalValue.length), this.$emit("select", i, this.id), this.$emit(
443
+ "update:modelValue",
444
+ this.internalValue.concat(i)
445
+ );
446
+ }
447
+ this.closeOnSelect && this.deactivate();
448
+ }
449
+ },
450
+ /**
451
+ * Helper to identify if all values in a group are selected
452
+ *
453
+ * @param {Object} group to validated selected values against
454
+ */
455
+ wholeGroupSelected(e) {
456
+ return e[this.groupValues].every(
457
+ (t) => this.isSelected(t) || this.isOptionDisabled(t)
458
+ );
459
+ },
460
+ /**
461
+ * Helper to identify if all values in a group are disabled
462
+ *
463
+ * @param {Object} group to check for disabled values
464
+ */
465
+ wholeGroupDisabled(e) {
466
+ return e[this.groupValues].every(this.isOptionDisabled);
467
+ },
468
+ /**
469
+ * Removes the given option from the selected options.
470
+ * Additionally checks this.allowEmpty prop if option can be removed when
471
+ * it is the last selected option.
472
+ *
473
+ * @param {type} option description
474
+ * @return {type} description
475
+ */
476
+ removeElement(e, t = !0) {
477
+ if (this.disabled || e.$isDisabled) return;
478
+ if (!this.allowEmpty && this.internalValue.length <= 1) {
479
+ this.deactivate();
480
+ return;
481
+ }
482
+ const i = typeof e == "object" ? this.valueKeys.indexOf(e[this.trackBy]) : this.valueKeys.indexOf(e);
483
+ if (this.multiple) {
484
+ const l = this.internalValue.slice(0, i).concat(this.internalValue.slice(i + 1));
485
+ this.$emit("update:modelValue", l);
486
+ } else
487
+ this.$emit("update:modelValue", null);
488
+ this.$emit("remove", e, this.id), this.closeOnSelect && t && this.deactivate();
489
+ },
490
+ /**
491
+ * Calls this.removeElement() with the last element
492
+ * from this.internalValue (selected element Array)
493
+ *
494
+ * @fires this#removeElement
495
+ */
496
+ removeLastElement() {
497
+ this.blockKeys.indexOf("Delete") === -1 && this.search.length === 0 && Array.isArray(this.internalValue) && this.internalValue.length && this.removeElement(this.internalValue[this.internalValue.length - 1], !1);
498
+ },
499
+ /**
500
+ * Opens the multiselect’s dropdown.
501
+ * Sets this.isOpen to TRUE
502
+ */
503
+ activate() {
504
+ this.isOpen || this.disabled || (this.adjustPosition(), this.groupValues && this.pointer === 0 && this.filteredOptions.length && (this.pointer = 1), this.isOpen = !0, this.searchable ? (this.preserveSearch || (this.search = ""), this.preventAutofocus || this.$nextTick(() => this.$refs.search && this.$refs.search.focus())) : this.preventAutofocus || typeof this.$el < "u" && this.$el.focus(), this.$emit("open", this.id));
505
+ },
506
+ /**
507
+ * Closes the multiselect’s dropdown.
508
+ * Sets this.isOpen to FALSE
509
+ */
510
+ deactivate() {
511
+ this.isOpen && (this.isOpen = !1, this.searchable ? this.$refs.search !== null && typeof this.$refs.search < "u" && this.$refs.search.blur() : typeof this.$el < "u" && this.$el.blur(), this.preserveSearch || (this.search = ""), this.$emit("close", this.getValue(), this.id));
512
+ },
513
+ /**
514
+ * Call this.activate() or this.deactivate()
515
+ * depending on this.isOpen value.
516
+ *
517
+ * @fires this#activate || this#deactivate
518
+ * @property {Boolean} isOpen indicates if dropdown is open
519
+ */
520
+ toggle() {
521
+ this.isOpen ? this.deactivate() : this.activate();
522
+ },
523
+ /**
524
+ * Updates the hasEnoughSpace variable used for
525
+ * detecting where to expand the dropdown
526
+ */
527
+ adjustPosition() {
528
+ if (typeof window > "u") return;
529
+ const e = this.$el.getBoundingClientRect().top, t = window.innerHeight - this.$el.getBoundingClientRect().bottom;
530
+ t > this.maxHeight || t > e || this.openDirection === "below" || this.openDirection === "bottom" ? (this.preferredOpenDirection = "below", this.optimizedHeight = Math.min(t - 40, this.maxHeight)) : (this.preferredOpenDirection = "above", this.optimizedHeight = Math.min(e - 40, this.maxHeight));
531
+ },
532
+ /**
533
+ * Filters and sorts the options ready for selection
534
+ * @param {Array} options
535
+ * @param {String} search
536
+ * @param {String} label
537
+ * @param {Function} customLabel
538
+ * @returns {Array}
539
+ */
540
+ filterOptions(e, t, i, l) {
541
+ return t ? e.filter((a) => P(l(a, i), t)).sort((a, n) => typeof this.filteringSortFunc == "function" ? this.filteringSortFunc(a, n) : l(a, i).length - l(n, i).length) : e;
542
+ },
543
+ /**
544
+ *
545
+ * @param {String} search
546
+ * @param {String} label
547
+ * @param {String} values
548
+ * @param {String} groupLabel
549
+ * @param {function} customLabel
550
+ * @returns {function(*): *}
551
+ */
552
+ filterGroups(e, t, i, l, a) {
553
+ return (n) => n.map((s) => {
554
+ if (!s[i])
555
+ return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."), [];
556
+ const h = this.filterOptions(s[i], e, t, a);
557
+ return h.length ? {
558
+ [l]: s[l],
559
+ [i]: h
560
+ } : [];
561
+ });
562
+ }
563
+ }
564
+ }, G = {
565
+ data() {
566
+ return {
567
+ pointer: 0,
568
+ pointerDirty: !1
569
+ };
570
+ },
571
+ props: {
572
+ /**
573
+ * Enable/disable highlighting of the pointed value.
574
+ * @type {Boolean}
575
+ * @default true
576
+ */
577
+ showPointer: {
578
+ type: Boolean,
579
+ default: !0
580
+ },
581
+ optionHeight: {
582
+ type: Number,
583
+ default: 40
584
+ }
585
+ },
586
+ computed: {
587
+ pointerPosition() {
588
+ return this.pointer * this.optionHeight;
589
+ },
590
+ visibleElements() {
591
+ return this.optimizedHeight / this.optionHeight;
592
+ }
593
+ },
594
+ watch: {
595
+ filteredOptions() {
596
+ this.pointerAdjust();
597
+ },
598
+ isOpen() {
599
+ this.pointerDirty = !1;
600
+ },
601
+ pointer() {
602
+ this.$refs.search && this.$refs.search.setAttribute("aria-activedescendant", this.id + "-" + this.pointer.toString());
603
+ }
604
+ },
605
+ methods: {
606
+ optionHighlight(e, t) {
607
+ return {
608
+ "multiselect__option--highlight": e === this.pointer && this.showPointer,
609
+ "multiselect__option--selected": this.isSelected(t)
610
+ };
611
+ },
612
+ groupHighlight(e, t) {
613
+ if (!this.groupSelect)
614
+ return [
615
+ "multiselect__option--disabled",
616
+ { "multiselect__option--group": t.$isLabel }
617
+ ];
618
+ const i = this.options.find((l) => l[this.groupLabel] === t.$groupLabel);
619
+ return i && !this.wholeGroupDisabled(i) ? [
620
+ "multiselect__option--group",
621
+ { "multiselect__option--highlight": e === this.pointer && this.showPointer },
622
+ { "multiselect__option--group-selected": this.wholeGroupSelected(i) }
623
+ ] : "multiselect__option--disabled";
624
+ },
625
+ addPointerElement({ key: e } = "Enter") {
626
+ this.filteredOptions.length > 0 && this.select(this.filteredOptions[this.pointer], e), this.pointerReset();
627
+ },
628
+ pointerForward() {
629
+ this.pointer < this.filteredOptions.length - 1 && (this.pointer++, this.$refs.list?.scrollTop <= this.pointerPosition - (this.visibleElements - 1) * this.optionHeight && (this.$refs.list.scrollTop = this.pointerPosition - (this.visibleElements - 1) * this.optionHeight), this.filteredOptions[this.pointer] && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect && this.pointerForward()), this.pointerDirty = !0;
630
+ },
631
+ pointerBackward() {
632
+ this.pointer > 0 ? (this.pointer--, this.$refs.list?.scrollTop >= this.pointerPosition && (this.$refs.list.scrollTop = this.pointerPosition), this.filteredOptions[this.pointer] && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect && this.pointerBackward()) : this.filteredOptions[this.pointer] && this.filteredOptions[0].$isLabel && !this.groupSelect && this.pointerForward(), this.pointerDirty = !0;
633
+ },
634
+ pointerReset() {
635
+ this.closeOnSelect && (this.pointer = 0, this.$refs.list && (this.$refs.list.scrollTop = 0));
636
+ },
637
+ pointerAdjust() {
638
+ this.pointer >= this.filteredOptions.length - 1 && (this.pointer = this.filteredOptions.length ? this.filteredOptions.length - 1 : 0), this.filteredOptions.length > 0 && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect && this.pointerForward();
639
+ },
640
+ pointerSet(e) {
641
+ this.pointer = e, this.pointerDirty = !0;
642
+ }
643
+ }
644
+ }, H = {
645
+ name: "vue-multiselect",
646
+ mixins: [F, G],
647
+ compatConfig: {
648
+ MODE: 3,
649
+ ATTR_ENUMERATED_COERCION: !1
650
+ },
651
+ props: {
652
+ /**
653
+ * name attribute to match optional label element
654
+ * @default ''
655
+ * @type {String}
656
+ */
657
+ name: {
658
+ type: String,
659
+ default: ""
660
+ },
661
+ /**
662
+ * Presets the selected options value.
663
+ * @type {Object||Array||String||Integer}
664
+ */
665
+ modelValue: {
666
+ type: null,
667
+ default() {
668
+ return [];
669
+ }
670
+ },
671
+ /**
672
+ * String to show when pointing to an option
673
+ * @default 'Press enter to select'
674
+ * @type {String}
675
+ */
676
+ selectLabel: {
677
+ type: String,
678
+ default: "Press enter to select"
679
+ },
680
+ /**
681
+ * String to show when pointing to an option
682
+ * @default 'Press enter to select'
683
+ * @type {String}
684
+ */
685
+ selectGroupLabel: {
686
+ type: String,
687
+ default: "Press enter to select group"
688
+ },
689
+ /**
690
+ * String to show next to selected option
691
+ * @default 'Selected'
692
+ * @type {String}
693
+ */
694
+ selectedLabel: {
695
+ type: String,
696
+ default: "Selected"
697
+ },
698
+ /**
699
+ * String to show when pointing to an already selected option
700
+ * @default 'Press enter to remove'
701
+ * @type {String}
702
+ */
703
+ deselectLabel: {
704
+ type: String,
705
+ default: "Press enter to remove"
706
+ },
707
+ /**
708
+ * String to show when pointing to an already selected option
709
+ * @default 'Press enter to remove'
710
+ * @type {String}
711
+ */
712
+ deselectGroupLabel: {
713
+ type: String,
714
+ default: "Press enter to deselect group"
715
+ },
716
+ /**
717
+ * Decide whether to show pointer labels
718
+ * @default true
719
+ * @type {Boolean}
720
+ */
721
+ showLabels: {
722
+ type: Boolean,
723
+ default: !0
724
+ },
725
+ /**
726
+ * Limit the display of selected options. The rest will be hidden within the limitText string.
727
+ * @default 99999
728
+ * @type {Integer}
729
+ */
730
+ limit: {
731
+ type: Number,
732
+ default: 99999
733
+ },
734
+ /**
735
+ * Sets maxHeight style value of the dropdown
736
+ * @default 300
737
+ * @type {Integer}
738
+ */
739
+ maxHeight: {
740
+ type: Number,
741
+ default: 300
742
+ },
743
+ /**
744
+ * Function that process the message shown when selected
745
+ * elements pass the defined limit.
746
+ * @default 'and * more'
747
+ * @param {Int} count Number of elements more than limit
748
+ * @type {Function}
749
+ */
750
+ limitText: {
751
+ type: Function,
752
+ default: (e) => `and ${e} more`
753
+ },
754
+ /**
755
+ * Set true to trigger the loading spinner.
756
+ * @default False
757
+ * @type {Boolean}
758
+ */
759
+ loading: {
760
+ type: Boolean,
761
+ default: !1
762
+ },
763
+ /**
764
+ * Disables the multiselect if true.
765
+ * @default false
766
+ * @type {Boolean}
767
+ */
768
+ disabled: {
769
+ type: Boolean,
770
+ default: !1
771
+ },
772
+ /**
773
+ * Enables search input's spellcheck if true.
774
+ * @default false
775
+ * @type {Boolean}
776
+ */
777
+ spellcheck: {
778
+ type: Boolean,
779
+ default: !1
780
+ },
781
+ /**
782
+ * Fixed opening direction
783
+ * @default ''
784
+ * @type {String}
785
+ */
786
+ openDirection: {
787
+ type: String,
788
+ default: ""
789
+ },
790
+ /**
791
+ * Shows slot with message about empty options
792
+ * @default true
793
+ * @type {Boolean}
794
+ */
795
+ showNoOptions: {
796
+ type: Boolean,
797
+ default: !0
798
+ },
799
+ showNoResults: {
800
+ type: Boolean,
801
+ default: !0
802
+ },
803
+ tabindex: {
804
+ type: Number,
805
+ default: 0
806
+ },
807
+ /**
808
+ * Adds Required attribute to the input element when there is no value selected
809
+ * @default false
810
+ * @type {Boolean}
811
+ */
812
+ required: {
813
+ type: Boolean,
814
+ default: !1
815
+ },
816
+ /**
817
+ * Uses Vue Teleport's feature. Teleports the open dropdown to the bottom of the body element
818
+ * @default false
819
+ * @type {Boolean}
820
+ */
821
+ useTeleport: {
822
+ type: Boolean,
823
+ default: !1
824
+ },
825
+ /**
826
+ * Classes to apply to the `multiselect__content-wrapper` element. This element is a teleport element (when enabled), so can be used to specifically target
827
+ * the teleported element
828
+ */
829
+ contentWrapperClass: {
830
+ type: [String, Array, Object],
831
+ default: ""
832
+ }
833
+ },
834
+ data() {
835
+ return {
836
+ dropdownStyles: {},
837
+ ready: !1
838
+ };
839
+ },
840
+ computed: {
841
+ hasOptionGroup() {
842
+ return this.groupValues && this.groupLabel && this.groupSelect;
843
+ },
844
+ isSingleLabelVisible() {
845
+ return (this.singleValue || this.singleValue === 0) && (!this.isOpen || !this.searchable) && !this.visibleValues.length;
846
+ },
847
+ isPlaceholderVisible() {
848
+ return !this.internalValue.length && (!this.searchable || !this.isOpen);
849
+ },
850
+ visibleValues() {
851
+ return this.multiple ? this.internalValue.slice(0, this.limit) : [];
852
+ },
853
+ singleValue() {
854
+ return this.internalValue[0];
855
+ },
856
+ deselectLabelText() {
857
+ return this.showLabels ? this.deselectLabel : "";
858
+ },
859
+ deselectGroupLabelText() {
860
+ return this.showLabels ? this.deselectGroupLabel : "";
861
+ },
862
+ selectLabelText() {
863
+ return this.showLabels ? this.selectLabel : "";
864
+ },
865
+ selectGroupLabelText() {
866
+ return this.showLabels ? this.selectGroupLabel : "";
867
+ },
868
+ selectedLabelText() {
869
+ return this.showLabels ? this.selectedLabel : "";
870
+ },
871
+ inputStyle() {
872
+ return this.searchable || this.multiple && this.modelValue && this.modelValue.length ? this.isOpen ? { width: "100%" } : { width: "0", position: "absolute", padding: "0" } : "";
873
+ },
874
+ contentStyle() {
875
+ return this.options.length ? { display: "inline-block" } : { display: "block" };
876
+ },
877
+ isAbove() {
878
+ return this.openDirection === "above" || this.openDirection === "top" ? !0 : this.openDirection === "below" || this.openDirection === "bottom" ? !1 : this.preferredOpenDirection === "above";
879
+ },
880
+ showSearchInput() {
881
+ return this.searchable && (this.hasSingleSelectedSlot && (this.visibleSingleValue || this.visibleSingleValue === 0) ? this.isOpen : !0);
882
+ },
883
+ isRequired() {
884
+ return this.required === !1 ? !1 : this.internalValue.length <= 0;
885
+ }
886
+ },
887
+ watch: {
888
+ isOpen(e) {
889
+ e && (this.useTeleport ? (this.ready = !1, this.$nextTick(() => {
890
+ const t = this.$el.getBoundingClientRect();
891
+ this.dropdownStyles = {
892
+ position: "absolute",
893
+ top: `${t.bottom + window.scrollY}px`,
894
+ left: `${t.left + window.scrollX}px`,
895
+ width: `${t.width}px`,
896
+ zIndex: 9999
897
+ }, this.ready = !0;
898
+ })) : this.ready = !0);
899
+ }
900
+ }
901
+ };
902
+ const N = ["tabindex", "aria-expanded", "aria-owns", "aria-activedescendant"], K = {
903
+ ref: "tags",
904
+ class: "multiselect__tags"
905
+ }, R = { class: "multiselect__tags-wrap" }, q = ["textContent"], z = ["onKeydown", "onMousedown"], j = ["textContent"], I = { class: "multiselect__spinner" }, W = ["name", "id", "spellcheck", "placeholder", "required", "value", "disabled", "tabindex", "aria-label", "aria-controls"], U = ["id", "aria-multiselectable"], X = { key: 0 }, Y = { class: "multiselect__option" }, J = ["aria-selected", "id", "role"], Q = ["onClick", "onMouseenter", "data-select", "data-selected", "data-deselect"], Z = ["data-select", "data-deselect", "onMouseenter", "onMousedown"], x = { class: "multiselect__option" }, _ = { class: "multiselect__option" };
906
+ function ee(e, t, i, l, a, n) {
907
+ return d(), p("div", {
908
+ tabindex: e.searchable ? -1 : i.tabindex,
909
+ class: y([{ "multiselect--active": e.isOpen, "multiselect--disabled": i.disabled, "multiselect--above": n.isAbove, "multiselect--has-options-group": n.hasOptionGroup }, "multiselect"]),
910
+ onFocus: t[14] || (t[14] = (s) => e.activate()),
911
+ onBlur: t[15] || (t[15] = (s) => e.searchable ? !1 : e.deactivate()),
912
+ onKeydown: [
913
+ t[16] || (t[16] = f(r((s) => e.pointerForward(), ["self", "prevent"]), ["down"])),
914
+ t[17] || (t[17] = f(r((s) => e.pointerBackward(), ["self", "prevent"]), ["up"])),
915
+ t[18] || (t[18] = f(r((s) => e.addPointerElement(s), ["stop", "self"]), ["enter", "tab"]))
916
+ ],
917
+ onKeyup: t[19] || (t[19] = f((s) => e.deactivate(), ["esc"])),
918
+ role: "combobox",
919
+ "aria-expanded": e.isOpen,
920
+ "aria-owns": "listbox-" + e.id,
921
+ "aria-activedescendant": e.isOpen && e.pointer !== null ? e.id + "-" + e.pointer : null
922
+ }, [
923
+ o(e.$slots, "caret", { toggle: e.toggle }, () => [
924
+ u(
925
+ "div",
926
+ {
927
+ onMousedown: t[0] || (t[0] = r((s) => e.toggle(), ["prevent", "stop"])),
928
+ class: "multiselect__select"
929
+ },
930
+ null,
931
+ 32
932
+ /* NEED_HYDRATION */
933
+ )
934
+ ]),
935
+ o(e.$slots, "clear", { search: e.search }),
936
+ u(
937
+ "div",
938
+ K,
939
+ [
940
+ o(e.$slots, "selection", {
941
+ search: e.search,
942
+ remove: e.removeElement,
943
+ values: n.visibleValues,
944
+ isOpen: e.isOpen
945
+ }, () => [
946
+ v(u(
947
+ "div",
948
+ R,
949
+ [
950
+ (d(!0), p(
951
+ L,
952
+ null,
953
+ $(n.visibleValues, (s, h) => o(e.$slots, "tag", {
954
+ option: s,
955
+ search: e.search,
956
+ remove: e.removeElement
957
+ }, () => [
958
+ (d(), p(
959
+ "span",
960
+ {
961
+ class: "multiselect__tag",
962
+ key: h,
963
+ onMousedown: t[1] || (t[1] = r(() => {
964
+ }, ["prevent"]))
965
+ },
966
+ [
967
+ u("span", {
968
+ textContent: g(e.getOptionLabel(s))
969
+ }, null, 8, q),
970
+ u("i", {
971
+ tabindex: "1",
972
+ onKeydown: f(r((m) => e.removeElement(s), ["prevent"]), ["enter"]),
973
+ onMousedown: r((m) => e.removeElement(s), ["prevent"]),
974
+ class: "multiselect__tag-icon"
975
+ }, null, 40, z)
976
+ ],
977
+ 32
978
+ /* NEED_HYDRATION */
979
+ ))
980
+ ])),
981
+ 256
982
+ /* UNKEYED_FRAGMENT */
983
+ ))
984
+ ],
985
+ 512
986
+ /* NEED_PATCH */
987
+ ), [
988
+ [w, n.visibleValues.length > 0]
989
+ ]),
990
+ e.internalValue && e.internalValue.length > i.limit ? o(e.$slots, "limit", { key: 0 }, () => [
991
+ u("strong", {
992
+ class: "multiselect__strong",
993
+ textContent: g(i.limitText(e.internalValue.length - i.limit))
994
+ }, null, 8, j)
995
+ ]) : c("v-if", !0)
996
+ ]),
997
+ B(k, { name: "multiselect__loading" }, {
998
+ default: T(() => [
999
+ o(e.$slots, "loading", {}, () => [
1000
+ v(u(
1001
+ "div",
1002
+ I,
1003
+ null,
1004
+ 512
1005
+ /* NEED_PATCH */
1006
+ ), [
1007
+ [w, i.loading]
1008
+ ])
1009
+ ])
1010
+ ]),
1011
+ _: 3
1012
+ /* FORWARDED */
1013
+ }),
1014
+ e.searchable ? (d(), p("input", {
1015
+ key: 0,
1016
+ ref: "search",
1017
+ name: i.name,
1018
+ id: e.id,
1019
+ type: "text",
1020
+ autocomplete: "off",
1021
+ spellcheck: i.spellcheck,
1022
+ placeholder: e.placeholder,
1023
+ required: n.isRequired,
1024
+ style: S(n.inputStyle),
1025
+ value: e.search,
1026
+ disabled: i.disabled,
1027
+ tabindex: i.tabindex,
1028
+ "aria-label": i.name + "-searchbox",
1029
+ onInput: t[2] || (t[2] = (s) => e.updateSearch(s.target.value)),
1030
+ onFocus: t[3] || (t[3] = r((s) => e.activate(), ["prevent"])),
1031
+ onBlur: t[4] || (t[4] = r((s) => e.deactivate(), ["prevent"])),
1032
+ onKeyup: t[5] || (t[5] = f((s) => e.deactivate(), ["esc"])),
1033
+ onKeydown: [
1034
+ t[6] || (t[6] = f(r((s) => e.pointerForward(), ["prevent"]), ["down"])),
1035
+ t[7] || (t[7] = f(r((s) => e.pointerBackward(), ["prevent"]), ["up"])),
1036
+ t[8] || (t[8] = f(r((s) => e.addPointerElement(s), ["prevent", "stop", "self"]), ["enter"])),
1037
+ t[9] || (t[9] = f(r((s) => e.removeLastElement(), ["stop"]), ["delete"]))
1038
+ ],
1039
+ class: "multiselect__input",
1040
+ "aria-controls": "listbox-" + e.id
1041
+ }, null, 44, W)) : c("v-if", !0),
1042
+ n.isSingleLabelVisible ? (d(), p(
1043
+ "span",
1044
+ {
1045
+ key: 1,
1046
+ class: "multiselect__single",
1047
+ onMousedown: t[10] || (t[10] = r((...s) => e.toggle && e.toggle(...s), ["prevent"]))
1048
+ },
1049
+ [
1050
+ o(e.$slots, "singleLabel", { option: n.singleValue }, () => [
1051
+ b(
1052
+ g(e.currentOptionLabel),
1053
+ 1
1054
+ /* TEXT */
1055
+ )
1056
+ ])
1057
+ ],
1058
+ 32
1059
+ /* NEED_HYDRATION */
1060
+ )) : c("v-if", !0),
1061
+ n.isPlaceholderVisible ? (d(), p(
1062
+ "span",
1063
+ {
1064
+ key: 2,
1065
+ class: "multiselect__placeholder",
1066
+ onMousedown: t[11] || (t[11] = r((...s) => e.toggle && e.toggle(...s), ["prevent"]))
1067
+ },
1068
+ [
1069
+ o(e.$slots, "placeholder", {}, () => [
1070
+ b(
1071
+ g(e.placeholder),
1072
+ 1
1073
+ /* TEXT */
1074
+ )
1075
+ ])
1076
+ ],
1077
+ 32
1078
+ /* NEED_HYDRATION */
1079
+ )) : c("v-if", !0)
1080
+ ],
1081
+ 512
1082
+ /* NEED_PATCH */
1083
+ ),
1084
+ (d(), E(A, {
1085
+ to: "body",
1086
+ disabled: !i.useTeleport
1087
+ }, [
1088
+ B(k, { name: "multiselect" }, {
1089
+ default: T(() => [
1090
+ e.isOpen && a.ready ? (d(), p(
1091
+ "div",
1092
+ {
1093
+ key: 0,
1094
+ class: y(["multiselect__content-wrapper", i.contentWrapperClass]),
1095
+ onFocus: t[12] || (t[12] = (...s) => e.activate && e.activate(...s)),
1096
+ tabindex: "-1",
1097
+ onMousedown: t[13] || (t[13] = r(() => {
1098
+ }, ["prevent"])),
1099
+ style: S([a.dropdownStyles, { maxHeight: e.optimizedHeight + "px" }]),
1100
+ ref: "list"
1101
+ },
1102
+ [
1103
+ u("ul", {
1104
+ class: "multiselect__content",
1105
+ style: S(n.contentStyle),
1106
+ role: "listbox",
1107
+ id: "listbox-" + e.id,
1108
+ "aria-multiselectable": e.multiple
1109
+ }, [
1110
+ o(e.$slots, "beforeList"),
1111
+ e.multiple && e.max === e.internalValue.length ? (d(), p("li", X, [
1112
+ u("span", Y, [
1113
+ o(e.$slots, "maxElements", {}, () => [
1114
+ b(
1115
+ "Maximum of " + g(e.max) + " options selected. First remove a selected option to select another.",
1116
+ 1
1117
+ /* TEXT */
1118
+ )
1119
+ ])
1120
+ ])
1121
+ ])) : c("v-if", !0),
1122
+ !e.max || e.internalValue.length < e.max ? (d(!0), p(
1123
+ L,
1124
+ { key: 1 },
1125
+ $(e.filteredOptions, (s, h) => (d(), p("li", {
1126
+ class: "multiselect__element",
1127
+ key: h,
1128
+ "aria-selected": e.isSelected(s),
1129
+ id: e.id + "-" + h,
1130
+ role: s && (s.$isLabel || s.$isDisabled) ? null : "option"
1131
+ }, [
1132
+ s && (s.$isLabel || s.$isDisabled) ? c("v-if", !0) : (d(), p("span", {
1133
+ key: 0,
1134
+ class: y([e.optionHighlight(h, s), "multiselect__option"]),
1135
+ onClick: r((m) => e.select(s), ["stop"]),
1136
+ onMouseenter: r((m) => e.pointerSet(h), ["self"]),
1137
+ "data-select": s && s.isTag ? e.tagPlaceholder : n.selectLabelText,
1138
+ "data-selected": n.selectedLabelText,
1139
+ "data-deselect": n.deselectLabelText
1140
+ }, [
1141
+ o(e.$slots, "option", {
1142
+ option: s,
1143
+ search: e.search,
1144
+ index: h
1145
+ }, () => [
1146
+ u(
1147
+ "span",
1148
+ null,
1149
+ g(e.getOptionLabel(s)),
1150
+ 1
1151
+ /* TEXT */
1152
+ )
1153
+ ])
1154
+ ], 42, Q)),
1155
+ s && (s.$isLabel || s.$isDisabled) ? (d(), p("span", {
1156
+ key: 1,
1157
+ "data-select": e.groupSelect && n.selectGroupLabelText,
1158
+ "data-deselect": e.groupSelect && n.deselectGroupLabelText,
1159
+ class: y([e.groupHighlight(h, s), "multiselect__option"]),
1160
+ onMouseenter: r((m) => e.groupSelect && e.pointerSet(h), ["self"]),
1161
+ onMousedown: r((m) => e.selectGroup(s), ["prevent"])
1162
+ }, [
1163
+ o(e.$slots, "option", {
1164
+ option: s,
1165
+ search: e.search,
1166
+ index: h
1167
+ }, () => [
1168
+ u(
1169
+ "span",
1170
+ null,
1171
+ g(e.getOptionLabel(s)),
1172
+ 1
1173
+ /* TEXT */
1174
+ )
1175
+ ])
1176
+ ], 42, Z)) : c("v-if", !0)
1177
+ ], 8, J))),
1178
+ 128
1179
+ /* KEYED_FRAGMENT */
1180
+ )) : c("v-if", !0),
1181
+ v(u(
1182
+ "li",
1183
+ null,
1184
+ [
1185
+ u("span", x, [
1186
+ o(e.$slots, "noResult", { search: e.search }, () => [
1187
+ t[20] || (t[20] = b("No elements found. Consider changing the search query."))
1188
+ ])
1189
+ ])
1190
+ ],
1191
+ 512
1192
+ /* NEED_PATCH */
1193
+ ), [
1194
+ [w, i.showNoResults && e.filteredOptions.length === 0 && e.search && !i.loading]
1195
+ ]),
1196
+ v(u(
1197
+ "li",
1198
+ null,
1199
+ [
1200
+ u("span", _, [
1201
+ o(e.$slots, "noOptions", {}, () => [
1202
+ t[21] || (t[21] = b("List is empty."))
1203
+ ])
1204
+ ])
1205
+ ],
1206
+ 512
1207
+ /* NEED_PATCH */
1208
+ ), [
1209
+ [w, i.showNoOptions && (e.options.length === 0 || n.hasOptionGroup === !0 && e.filteredOptions.length === 0) && !e.search && !i.loading]
1210
+ ]),
1211
+ o(e.$slots, "afterList")
1212
+ ], 12, U)
1213
+ ],
1214
+ 38
1215
+ /* CLASS, STYLE, NEED_HYDRATION */
1216
+ )) : c("v-if", !0)
1217
+ ]),
1218
+ _: 3
1219
+ /* FORWARDED */
1220
+ })
1221
+ ], 8, ["disabled"]))
1222
+ ], 42, N);
1223
+ }
1224
+ H.render = ee;
20
1225
  export {
21
- e as Axios,
22
- a as AxiosError,
23
- m as AxiosHeaders,
24
- d as Cancel,
25
- i as CancelToken,
26
- s as CanceledError,
27
- p as HttpStatusCode,
28
- l as VERSION,
29
- n as all,
30
- o as default,
31
- A as formToJSON,
32
- f as getAdapter,
33
- x as isAxiosError,
34
- t as isCancel,
35
- E as mergeConfig,
36
- C as spread,
37
- c as toFormData
1226
+ H as Multiselect,
1227
+ H as default,
1228
+ F as multiselectMixin,
1229
+ G as pointerMixin
38
1230
  };