energy-components 1.6.0-beta.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion.es.js +13 -13
- package/dist/components/button.es.js +11 -11
- package/dist/components/checkbox.es.js +7 -7
- package/dist/components/dropdown.es.js +278 -148
- package/dist/components/filterChip.es.js +4 -4
- package/dist/components/{icon-svg-pUb3-FXk.js → icon-svg-DGp2yHJn.js} +1 -1
- package/dist/components/iconList.es.js +5 -5
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +62 -59
- package/dist/components/infoBox.es.js +17 -17
- package/dist/components/link.es.js +15 -15
- package/dist/components/modal.es.js +69 -39
- package/dist/components/multiselect.es.js +230 -184
- package/dist/components/multiselectcontentwrapper.es.js +140 -0
- package/dist/components/pagination.es.js +118 -86
- package/dist/components/persistentToast.es.js +9 -9
- package/dist/components/quantitySelector.es.js +9 -9
- package/dist/components/radioButton.es.js +16 -16
- package/dist/components/selectionChip.es.js +5 -5
- package/dist/components/sidedrawer.es.js +36 -28
- package/dist/components/style/datepicker.css +1 -1
- package/dist/components/style/dropdown.css +1 -1
- package/dist/components/style/modal.css +1 -1
- package/dist/components/style/multiselect.css +1 -1
- package/dist/components/style/multiselectcontentwrapper.css +1 -0
- package/dist/components/style/pagination.css +1 -1
- package/dist/components/style/sidedrawer.css +1 -1
- package/dist/components/style/tablepaginatedcomponent.css +1 -1
- package/dist/components/style/tableslotedcomponent.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/switch.es.js +10 -10
- package/dist/components/tabBar.es.js +12 -12
- package/dist/components/tablepaginatedcomponent.es.js +55 -53
- package/dist/components/tableslotedcomponent.es.js +155 -148
- package/dist/components/tag.es.js +5 -5
- package/dist/components/textArea.es.js +22 -22
- package/dist/components/textField.es.js +93 -84
- package/dist/components/tooltip.es.js +61 -61
- package/dist/energy-components.es.js +6576 -6073
- package/dist/energy-components.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/input/dropdown/Multiselect/MultiselectContentWrapper.vue.d.ts +86 -0
- package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +582 -0
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +10 -3
- package/dist/types/src/components/layout/sidedrawer/sidedrawer.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +63 -31
- package/dist/types/src/components/overlay/modal/modal.vue.d.ts +27 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import k from "./multiselectcontentwrapper.es.js";
|
|
2
|
+
import { resolveComponent as E, openBlock as c, createElementBlock as g, normalizeClass as P, withKeys as a, withModifiers as o, renderSlot as u, createElementVNode as p, withDirectives as S, Fragment as A, renderList as v, toDisplayString as O, vShow as L, createCommentVNode as m, createVNode as b, Transition as T, withCtx as y, normalizeStyle as N, createTextVNode as C, createSlots as B, normalizeProps as $, guardReactiveProps as G, createBlock as F, Teleport as x } from "vue";
|
|
3
|
+
import { _ as K } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/multiselect.css';function w(e) {
|
|
4
5
|
return e === 0 ? !1 : Array.isArray(e) && e.length === 0 ? !0 : !e;
|
|
5
6
|
}
|
|
6
7
|
function M(e) {
|
|
7
8
|
return (...t) => !e(...t);
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
+
function R(e, t) {
|
|
10
11
|
return e === void 0 && (e = "undefined"), e === null && (e = "null"), e === !1 && (e = "false"), e.toString().toLowerCase().indexOf(t.trim()) !== -1;
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
-
return t ? e.filter((
|
|
13
|
+
function H(e, t, i, n) {
|
|
14
|
+
return t ? e.filter((r) => R(n(r, i), t)).sort((r, l) => n(r, i).length - n(l, i).length) : e;
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
+
function z(e) {
|
|
16
17
|
return e.filter((t) => !t.$isLabel);
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
-
return (i) => i.reduce((
|
|
20
|
-
$groupLabel:
|
|
19
|
+
function V(e, t) {
|
|
20
|
+
return (i) => i.reduce((n, r) => r[e] && r[e].length ? (n.push({
|
|
21
|
+
$groupLabel: r[t],
|
|
21
22
|
$isLabel: !0
|
|
22
|
-
}),
|
|
23
|
+
}), n.concat(r[e])) : n, []);
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
-
return (
|
|
26
|
-
if (!
|
|
25
|
+
function j(e, t, i, n, r) {
|
|
26
|
+
return (l) => l.map((d) => {
|
|
27
|
+
if (!d[i])
|
|
27
28
|
return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."), [];
|
|
28
|
-
const
|
|
29
|
-
return
|
|
30
|
-
[
|
|
31
|
-
[i]:
|
|
29
|
+
const s = H(d[i], e, t, r);
|
|
30
|
+
return s.length ? {
|
|
31
|
+
[n]: d[n],
|
|
32
|
+
[i]: s
|
|
32
33
|
} : [];
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
|
-
const
|
|
36
|
+
const D = (...e) => (t) => e.reduce((i, n) => n(i), t), q = {
|
|
36
37
|
data() {
|
|
37
38
|
return {
|
|
38
39
|
search: "",
|
|
@@ -158,7 +159,7 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
|
|
|
158
159
|
customLabel: {
|
|
159
160
|
type: Function,
|
|
160
161
|
default(e, t) {
|
|
161
|
-
return
|
|
162
|
+
return w(e) ? "" : t ? e[t] : e;
|
|
162
163
|
}
|
|
163
164
|
},
|
|
164
165
|
/**
|
|
@@ -296,7 +297,7 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
|
|
|
296
297
|
filteredOptions() {
|
|
297
298
|
const e = this.search || "", t = e.toLowerCase().trim();
|
|
298
299
|
let i = this.options.concat();
|
|
299
|
-
return this.internalSearch ? i = this.groupValues ? this.filterAndFlat(i, t, this.label) :
|
|
300
|
+
return this.internalSearch ? i = this.groupValues ? this.filterAndFlat(i, t, this.label) : H(i, t, this.label, this.customLabel) : i = this.groupValues ? V(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);
|
|
300
301
|
},
|
|
301
302
|
valueKeys() {
|
|
302
303
|
return this.trackBy ? this.internalValue.map((e) => e[this.trackBy]) : this.internalValue;
|
|
@@ -334,9 +335,9 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
|
|
|
334
335
|
* @return {Array} returns a filtered and flat options list
|
|
335
336
|
*/
|
|
336
337
|
filterAndFlat(e, t, i) {
|
|
337
|
-
return
|
|
338
|
-
|
|
339
|
-
|
|
338
|
+
return D(
|
|
339
|
+
j(t, i, this.groupValues, this.groupLabel, this.customLabel),
|
|
340
|
+
V(this.groupValues, this.groupLabel)
|
|
340
341
|
)(e);
|
|
341
342
|
},
|
|
342
343
|
/**
|
|
@@ -345,9 +346,9 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
|
|
|
345
346
|
* @return {Array} returns a flat options list without group labels
|
|
346
347
|
*/
|
|
347
348
|
flatAndStrip(e) {
|
|
348
|
-
return
|
|
349
|
-
|
|
350
|
-
|
|
349
|
+
return D(
|
|
350
|
+
V(this.groupValues, this.groupLabel),
|
|
351
|
+
z
|
|
351
352
|
)(e);
|
|
352
353
|
},
|
|
353
354
|
/**
|
|
@@ -393,11 +394,11 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
|
|
|
393
394
|
* @returns {Object||String}
|
|
394
395
|
*/
|
|
395
396
|
getOptionLabel(e) {
|
|
396
|
-
if (
|
|
397
|
+
if (w(e)) return "";
|
|
397
398
|
if (e.isTag) return e.label;
|
|
398
399
|
if (e.$isLabel) return e.$groupLabel;
|
|
399
400
|
const t = this.customLabel(e, this.label);
|
|
400
|
-
return
|
|
401
|
+
return w(t) ? "" : t;
|
|
401
402
|
},
|
|
402
403
|
/**
|
|
403
404
|
* Add the given option to the list of selected options
|
|
@@ -436,13 +437,13 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
|
|
|
436
437
|
if (t) {
|
|
437
438
|
if (this.wholeGroupSelected(t)) {
|
|
438
439
|
this.$emit("remove", t[this.groupValues], this.id);
|
|
439
|
-
const i = this.trackBy ? t[this.groupValues].map((
|
|
440
|
-
(
|
|
440
|
+
const i = this.trackBy ? t[this.groupValues].map((r) => r[this.trackBy]) : t[this.groupValues], n = this.internalValue.filter(
|
|
441
|
+
(r) => i.indexOf(this.trackBy ? r[this.trackBy] : r) === -1
|
|
441
442
|
);
|
|
442
|
-
this.$emit("update:modelValue",
|
|
443
|
+
this.$emit("update:modelValue", n);
|
|
443
444
|
} else {
|
|
444
445
|
let i = t[this.groupValues].filter(
|
|
445
|
-
(
|
|
446
|
+
(n) => !(this.isOptionDisabled(n) || this.isSelected(n))
|
|
446
447
|
);
|
|
447
448
|
this.max && i.splice(this.max - this.internalValue.length), this.$emit("select", i, this.id), this.$emit(
|
|
448
449
|
"update:modelValue",
|
|
@@ -486,8 +487,8 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
|
|
|
486
487
|
}
|
|
487
488
|
const i = typeof e == "object" ? this.valueKeys.indexOf(e[this.trackBy]) : this.valueKeys.indexOf(e);
|
|
488
489
|
if (this.multiple) {
|
|
489
|
-
const
|
|
490
|
-
this.$emit("update:modelValue",
|
|
490
|
+
const n = this.internalValue.slice(0, i).concat(this.internalValue.slice(i + 1));
|
|
491
|
+
this.$emit("update:modelValue", n);
|
|
491
492
|
} else
|
|
492
493
|
this.$emit("update:modelValue", null);
|
|
493
494
|
this.$emit("remove", e, this.id), this.closeOnSelect && t && this.deactivate();
|
|
@@ -535,7 +536,7 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
|
|
|
535
536
|
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));
|
|
536
537
|
}
|
|
537
538
|
}
|
|
538
|
-
},
|
|
539
|
+
}, W = {
|
|
539
540
|
data() {
|
|
540
541
|
return {
|
|
541
542
|
pointer: 0,
|
|
@@ -589,7 +590,7 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
|
|
|
589
590
|
"multiselect__option--disabled",
|
|
590
591
|
{ "multiselect__option--group": t.$isLabel }
|
|
591
592
|
];
|
|
592
|
-
const i = this.options.find((
|
|
593
|
+
const i = this.options.find((n) => n[this.groupLabel] === t.$groupLabel);
|
|
593
594
|
return i && !this.wholeGroupDisabled(i) ? [
|
|
594
595
|
"multiselect__option--group",
|
|
595
596
|
{ "multiselect__option--highlight": e === this.pointer && this.showPointer },
|
|
@@ -606,7 +607,11 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
|
|
|
606
607
|
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;
|
|
607
608
|
},
|
|
608
609
|
pointerReset() {
|
|
609
|
-
|
|
610
|
+
var e;
|
|
611
|
+
if (this.closeOnSelect && (this.pointer = 0, this.$refs.list)) {
|
|
612
|
+
const t = ((e = this.$refs.list.$refs) == null ? void 0 : e.wrapper) || this.$refs.list;
|
|
613
|
+
t.scrollTop && (t.scrollTop = 0);
|
|
614
|
+
}
|
|
610
615
|
},
|
|
611
616
|
pointerAdjust() {
|
|
612
617
|
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();
|
|
@@ -615,13 +620,30 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
|
|
|
615
620
|
this.pointer = e, this.pointerDirty = !0;
|
|
616
621
|
}
|
|
617
622
|
}
|
|
618
|
-
},
|
|
623
|
+
}, I = {
|
|
619
624
|
name: "vue-multiselect",
|
|
620
|
-
|
|
625
|
+
components: {
|
|
626
|
+
MultiselectContentWrapper: k
|
|
627
|
+
},
|
|
628
|
+
mixins: [q, W],
|
|
621
629
|
compatConfig: {
|
|
622
630
|
MODE: 3,
|
|
623
631
|
ATTR_ENUMERATED_COERCION: !1
|
|
624
632
|
},
|
|
633
|
+
inject: {
|
|
634
|
+
isFocusWithinDropdown: {
|
|
635
|
+
default: null
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
methods: {
|
|
639
|
+
onBlur(e) {
|
|
640
|
+
if (this.isFocusWithinDropdown && e.relatedTarget && this.isFocusWithinDropdown(e.relatedTarget)) {
|
|
641
|
+
e.preventDefault();
|
|
642
|
+
return;
|
|
643
|
+
}
|
|
644
|
+
this.deactivate();
|
|
645
|
+
}
|
|
646
|
+
},
|
|
625
647
|
props: {
|
|
626
648
|
/**
|
|
627
649
|
* name attribute to match optional label element
|
|
@@ -632,6 +654,10 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
|
|
|
632
654
|
type: String,
|
|
633
655
|
default: ""
|
|
634
656
|
},
|
|
657
|
+
appendToBody: {
|
|
658
|
+
type: Boolean,
|
|
659
|
+
default: !1
|
|
660
|
+
},
|
|
635
661
|
/**
|
|
636
662
|
* Presets the selected options value.
|
|
637
663
|
* @type Object || Array || String || Integer
|
|
@@ -826,88 +852,108 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
|
|
|
826
852
|
contentStyle() {
|
|
827
853
|
return this.options.length ? { display: "inline-block" } : { display: "block" };
|
|
828
854
|
},
|
|
855
|
+
dropdownStyle() {
|
|
856
|
+
return {
|
|
857
|
+
...this.contentStyle,
|
|
858
|
+
maxHeight: `${this.maxHeight}px`,
|
|
859
|
+
overflow: "auto"
|
|
860
|
+
};
|
|
861
|
+
},
|
|
829
862
|
isAbove() {
|
|
830
863
|
return this.openDirection === "above" || this.openDirection === "top" ? !0 : this.openDirection === "below" || this.openDirection === "bottom" ? !1 : this.preferredOpenDirection === "above";
|
|
831
864
|
},
|
|
832
865
|
showSearchInput() {
|
|
833
866
|
return this.searchable && (this.hasSingleSelectedSlot && (this.visibleSingleValue || this.visibleSingleValue === 0) ? this.isOpen : !0);
|
|
867
|
+
},
|
|
868
|
+
teleportedContentStyle() {
|
|
869
|
+
if (!this.$el) return {};
|
|
870
|
+
const e = this.$el.getBoundingClientRect(), t = {
|
|
871
|
+
position: "fixed",
|
|
872
|
+
width: `${e.width}px`,
|
|
873
|
+
zIndex: 9999,
|
|
874
|
+
maxHeight: `${this.maxHeight}px`,
|
|
875
|
+
overflow: "auto",
|
|
876
|
+
"-webkit-overflow-scrolling": "touch"
|
|
877
|
+
};
|
|
878
|
+
return this.isAbove ? (t.bottom = `${window.innerHeight - e.top}px`, t.left = `${e.left}px`) : (t.top = `${e.bottom}px`, t.left = `${e.left}px`), t;
|
|
834
879
|
}
|
|
835
880
|
}
|
|
836
|
-
},
|
|
881
|
+
}, U = ["tabindex", "aria-owns"], J = {
|
|
837
882
|
ref: "tags",
|
|
838
883
|
class: "multiselect__tags"
|
|
839
|
-
},
|
|
840
|
-
function te(e, t, i,
|
|
841
|
-
|
|
884
|
+
}, Q = { class: "multiselect__tags-wrap" }, X = ["textContent"], Y = ["onKeypress", "onMousedown"], Z = ["textContent"], _ = { class: "multiselect__spinner" }, ee = ["name", "id", "spellcheck", "placeholder", "required", "value", "disabled", "tabindex", "aria-controls"];
|
|
885
|
+
function te(e, t, i, n, r, l) {
|
|
886
|
+
const d = E("MultiselectContentWrapper");
|
|
887
|
+
return c(), g("div", {
|
|
842
888
|
tabindex: e.searchable ? -1 : i.tabindex,
|
|
843
|
-
class:
|
|
844
|
-
onFocus: t[
|
|
845
|
-
onBlur: t[
|
|
889
|
+
class: P([{ "multiselect--active": e.isOpen, "multiselect--disabled": i.disabled, "multiselect--above": l.isAbove, "multiselect--has-options-group": l.hasOptionGroup }, "multiselect"]),
|
|
890
|
+
onFocus: t[12] || (t[12] = (s) => e.activate()),
|
|
891
|
+
onBlur: t[13] || (t[13] = (...s) => l.onBlur && l.onBlur(...s)),
|
|
846
892
|
onKeydown: [
|
|
847
|
-
t[
|
|
848
|
-
t[
|
|
893
|
+
t[14] || (t[14] = a(o((s) => e.pointerForward(), ["self", "prevent"]), ["down"])),
|
|
894
|
+
t[15] || (t[15] = a(o((s) => e.pointerBackward(), ["self", "prevent"]), ["up"]))
|
|
849
895
|
],
|
|
850
|
-
onKeypress: t[
|
|
851
|
-
onKeyup: t[
|
|
896
|
+
onKeypress: t[16] || (t[16] = a(o((s) => e.addPointerElement(s), ["stop", "self"]), ["enter", "tab"])),
|
|
897
|
+
onKeyup: t[17] || (t[17] = a((s) => e.deactivate(), ["esc"])),
|
|
852
898
|
role: "combobox",
|
|
853
899
|
"aria-owns": "listbox-" + e.id
|
|
854
900
|
}, [
|
|
855
901
|
u(e.$slots, "caret", { toggle: e.toggle }, () => [
|
|
856
|
-
|
|
857
|
-
onMousedown: t[0] || (t[0] =
|
|
902
|
+
p("div", {
|
|
903
|
+
onMousedown: t[0] || (t[0] = o((s) => e.toggle(), ["prevent", "stop"])),
|
|
858
904
|
class: "multiselect__select"
|
|
859
905
|
}, null, 32)
|
|
860
906
|
], !0),
|
|
861
907
|
u(e.$slots, "clear", { search: e.search }, void 0, !0),
|
|
862
|
-
|
|
908
|
+
p("div", J, [
|
|
863
909
|
u(e.$slots, "selection", {
|
|
864
910
|
search: e.search,
|
|
865
911
|
remove: e.removeElement,
|
|
866
|
-
values:
|
|
912
|
+
values: l.visibleValues,
|
|
867
913
|
isOpen: e.isOpen
|
|
868
914
|
}, () => [
|
|
869
|
-
|
|
870
|
-
(
|
|
915
|
+
S(p("div", Q, [
|
|
916
|
+
(c(!0), g(A, null, v(l.visibleValues, (s, h) => u(e.$slots, "tag", {
|
|
871
917
|
option: s,
|
|
872
918
|
search: e.search,
|
|
873
919
|
remove: e.removeElement
|
|
874
920
|
}, () => [
|
|
875
|
-
(
|
|
921
|
+
(c(), g("span", {
|
|
876
922
|
class: "multiselect__tag",
|
|
877
923
|
key: h
|
|
878
924
|
}, [
|
|
879
|
-
|
|
880
|
-
textContent:
|
|
881
|
-
}, null, 8,
|
|
882
|
-
|
|
925
|
+
p("span", {
|
|
926
|
+
textContent: O(e.getOptionLabel(s))
|
|
927
|
+
}, null, 8, X),
|
|
928
|
+
p("i", {
|
|
883
929
|
tabindex: "1",
|
|
884
|
-
onKeypress:
|
|
885
|
-
onMousedown:
|
|
930
|
+
onKeypress: a(o((f) => e.removeElement(s), ["prevent"]), ["enter"]),
|
|
931
|
+
onMousedown: o((f) => e.removeElement(s), ["prevent"]),
|
|
886
932
|
class: "multiselect__tag-icon"
|
|
887
|
-
}, null, 40,
|
|
933
|
+
}, null, 40, Y)
|
|
888
934
|
]))
|
|
889
935
|
], !0)), 256))
|
|
890
936
|
], 512), [
|
|
891
|
-
[
|
|
937
|
+
[L, l.visibleValues.length > 0]
|
|
892
938
|
]),
|
|
893
939
|
e.internalValue && e.internalValue.length > i.limit ? u(e.$slots, "limit", { key: 0 }, () => [
|
|
894
|
-
|
|
940
|
+
p("strong", {
|
|
895
941
|
class: "multiselect__strong",
|
|
896
|
-
textContent:
|
|
897
|
-
}, null, 8,
|
|
898
|
-
], !0) :
|
|
942
|
+
textContent: O(i.limitText(e.internalValue.length - i.limit))
|
|
943
|
+
}, null, 8, Z)
|
|
944
|
+
], !0) : m("", !0)
|
|
899
945
|
], !0),
|
|
900
|
-
|
|
901
|
-
default:
|
|
946
|
+
b(T, { name: "multiselect__loading" }, {
|
|
947
|
+
default: y(() => [
|
|
902
948
|
u(e.$slots, "loading", {}, () => [
|
|
903
|
-
|
|
904
|
-
[
|
|
949
|
+
S(p("div", _, null, 512), [
|
|
950
|
+
[L, i.loading]
|
|
905
951
|
])
|
|
906
952
|
], !0)
|
|
907
953
|
]),
|
|
908
954
|
_: 3
|
|
909
955
|
}),
|
|
910
|
-
e.searchable ? (
|
|
956
|
+
e.searchable ? (c(), g("input", {
|
|
911
957
|
key: 0,
|
|
912
958
|
ref: "search",
|
|
913
959
|
name: i.name,
|
|
@@ -917,132 +963,132 @@ function te(e, t, i, l, a, n) {
|
|
|
917
963
|
spellcheck: i.spellcheck,
|
|
918
964
|
placeholder: e.placeholder,
|
|
919
965
|
required: i.required,
|
|
920
|
-
style:
|
|
921
|
-
...
|
|
966
|
+
style: N({
|
|
967
|
+
...l.inputStyle
|
|
922
968
|
}),
|
|
923
969
|
value: e.search,
|
|
924
970
|
disabled: i.disabled,
|
|
925
971
|
tabindex: i.tabindex,
|
|
926
972
|
onInput: t[1] || (t[1] = (s) => e.updateSearch(s.target.value)),
|
|
927
|
-
onFocus: t[2] || (t[2] =
|
|
928
|
-
onBlur: t[3] || (t[3] =
|
|
929
|
-
onKeyup: t[4] || (t[4] =
|
|
973
|
+
onFocus: t[2] || (t[2] = o((s) => e.activate(), ["prevent"])),
|
|
974
|
+
onBlur: t[3] || (t[3] = o((s) => e.deactivate(), ["prevent"])),
|
|
975
|
+
onKeyup: t[4] || (t[4] = a((s) => e.deactivate(), ["esc"])),
|
|
930
976
|
onKeydown: [
|
|
931
|
-
t[5] || (t[5] =
|
|
932
|
-
t[6] || (t[6] =
|
|
933
|
-
t[8] || (t[8] =
|
|
977
|
+
t[5] || (t[5] = a(o((s) => e.pointerForward(), ["prevent"]), ["down"])),
|
|
978
|
+
t[6] || (t[6] = a(o((s) => e.pointerBackward(), ["prevent"]), ["up"])),
|
|
979
|
+
t[8] || (t[8] = a(o((s) => e.removeLastElement(), ["stop"]), ["delete"]))
|
|
934
980
|
],
|
|
935
|
-
onKeypress: t[7] || (t[7] =
|
|
981
|
+
onKeypress: t[7] || (t[7] = a(o((s) => e.addPointerElement(s), ["prevent", "stop", "self"]), ["enter"])),
|
|
936
982
|
class: "multiselect__input",
|
|
937
983
|
"aria-controls": "listbox-" + e.id
|
|
938
|
-
}, null, 44,
|
|
939
|
-
|
|
984
|
+
}, null, 44, ee)) : m("", !0),
|
|
985
|
+
l.isSingleLabelVisible ? (c(), g("span", {
|
|
940
986
|
key: 1,
|
|
941
987
|
class: "multiselect__single",
|
|
942
|
-
onMousedown: t[9] || (t[9] =
|
|
988
|
+
onMousedown: t[9] || (t[9] = o((...s) => e.toggle && e.toggle(...s), ["prevent"]))
|
|
943
989
|
}, [
|
|
944
|
-
u(e.$slots, "singleLabel", { option:
|
|
945
|
-
|
|
990
|
+
u(e.$slots, "singleLabel", { option: l.singleValue }, () => [
|
|
991
|
+
C(O(e.currentOptionLabel), 1)
|
|
946
992
|
], !0)
|
|
947
|
-
], 32)) :
|
|
948
|
-
|
|
993
|
+
], 32)) : m("", !0),
|
|
994
|
+
m("", !0)
|
|
949
995
|
], 512),
|
|
950
|
-
|
|
951
|
-
default:
|
|
952
|
-
b(
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
option: s,
|
|
994
|
-
search: e.search,
|
|
995
|
-
index: h
|
|
996
|
-
}, () => [
|
|
997
|
-
o("span", null, m(e.getOptionLabel(s)), 1)
|
|
998
|
-
], !0)
|
|
999
|
-
], 42, Z)),
|
|
1000
|
-
s && (s.$isLabel || s.$isDisabled) ? (d(), p("span", {
|
|
1001
|
-
key: 1,
|
|
1002
|
-
"data-select": e.groupSelect && n.selectGroupLabelText,
|
|
1003
|
-
"data-deselect": e.groupSelect && n.deselectGroupLabelText,
|
|
1004
|
-
class: v([e.groupHighlight(h, s), "multiselect__option"]),
|
|
1005
|
-
onMouseenter: r((g) => e.groupSelect && e.pointerSet(h), ["self"]),
|
|
1006
|
-
onMousedown: r((g) => e.selectGroup(s), ["prevent"])
|
|
1007
|
-
}, [
|
|
1008
|
-
u(e.$slots, "option", {
|
|
1009
|
-
option: s,
|
|
1010
|
-
search: e.search,
|
|
1011
|
-
index: h
|
|
1012
|
-
}, () => [
|
|
1013
|
-
o("span", null, m(e.getOptionLabel(s)), 1)
|
|
1014
|
-
], !0)
|
|
1015
|
-
], 42, x)) : c("", !0)
|
|
1016
|
-
], 8, Y))), 128)) : c("", !0),
|
|
1017
|
-
b(o("li", null, [
|
|
1018
|
-
o("span", _, [
|
|
1019
|
-
u(e.$slots, "noResult", { search: e.search }, () => [
|
|
1020
|
-
t[19] || (t[19] = V("No elements found. Consider changing the search query."))
|
|
1021
|
-
], !0)
|
|
1022
|
-
])
|
|
1023
|
-
], 512), [
|
|
1024
|
-
[y, i.showNoResults && e.filteredOptions.length === 0 && e.search && !i.loading]
|
|
1025
|
-
]),
|
|
1026
|
-
b(o("li", null, [
|
|
1027
|
-
o("span", ee, [
|
|
1028
|
-
u(e.$slots, "noOptions", {}, () => [
|
|
1029
|
-
t[20] || (t[20] = V("List is empty."))
|
|
1030
|
-
], !0)
|
|
1031
|
-
])
|
|
1032
|
-
], 512), [
|
|
1033
|
-
[y, i.showNoOptions && (e.options.length === 0 || n.hasOptionGroup === !0 && e.filteredOptions.length === 0) && !e.search && !i.loading]
|
|
1034
|
-
]),
|
|
1035
|
-
u(e.$slots, "afterList", {}, void 0, !0)
|
|
1036
|
-
], 12, Q)
|
|
1037
|
-
], 38), [
|
|
1038
|
-
[y, e.isOpen]
|
|
996
|
+
b(T, { name: "multiselect" }, {
|
|
997
|
+
default: y(() => [
|
|
998
|
+
S(b(d, {
|
|
999
|
+
teleported: !1,
|
|
1000
|
+
id: e.id,
|
|
1001
|
+
multiple: e.multiple,
|
|
1002
|
+
max: e.max,
|
|
1003
|
+
internalValue: e.internalValue,
|
|
1004
|
+
filteredOptions: e.filteredOptions,
|
|
1005
|
+
isSelected: e.isSelected,
|
|
1006
|
+
optionHighlight: e.optionHighlight,
|
|
1007
|
+
select: e.select,
|
|
1008
|
+
pointerSet: e.pointerSet,
|
|
1009
|
+
selectLabelText: l.selectLabelText,
|
|
1010
|
+
selectedLabelText: l.selectedLabelText,
|
|
1011
|
+
deselectLabelText: l.deselectLabelText,
|
|
1012
|
+
tagPlaceholder: e.tagPlaceholder,
|
|
1013
|
+
groupSelect: e.groupSelect,
|
|
1014
|
+
selectGroupLabelText: l.selectGroupLabelText,
|
|
1015
|
+
deselectGroupLabelText: l.deselectGroupLabelText,
|
|
1016
|
+
getOptionLabel: e.getOptionLabel,
|
|
1017
|
+
groupHighlight: e.groupHighlight,
|
|
1018
|
+
selectGroup: e.selectGroup,
|
|
1019
|
+
options: e.options,
|
|
1020
|
+
hasOptionGroup: l.hasOptionGroup,
|
|
1021
|
+
search: e.search,
|
|
1022
|
+
loading: i.loading,
|
|
1023
|
+
showNoResults: i.showNoResults,
|
|
1024
|
+
showNoOptions: i.showNoOptions,
|
|
1025
|
+
small: i.small,
|
|
1026
|
+
contentStyle: l.contentStyle,
|
|
1027
|
+
customStyle: l.dropdownStyle,
|
|
1028
|
+
ref: "list",
|
|
1029
|
+
onFocus: e.activate
|
|
1030
|
+
}, B({ _: 2 }, [
|
|
1031
|
+
v(e.$slots, (s, h) => ({
|
|
1032
|
+
name: h,
|
|
1033
|
+
fn: y((f) => [
|
|
1034
|
+
u(e.$slots, h, $(G(f)), void 0, !0)
|
|
1035
|
+
])
|
|
1036
|
+
}))
|
|
1037
|
+
]), 1032, ["id", "multiple", "max", "internalValue", "filteredOptions", "isSelected", "optionHighlight", "select", "pointerSet", "selectLabelText", "selectedLabelText", "deselectLabelText", "tagPlaceholder", "groupSelect", "selectGroupLabelText", "deselectGroupLabelText", "getOptionLabel", "groupHighlight", "selectGroup", "options", "hasOptionGroup", "search", "loading", "showNoResults", "showNoOptions", "small", "contentStyle", "customStyle", "onFocus"]), [
|
|
1038
|
+
[L, e.isOpen]
|
|
1039
1039
|
])
|
|
1040
1040
|
]),
|
|
1041
1041
|
_: 3
|
|
1042
|
-
})
|
|
1043
|
-
|
|
1042
|
+
}),
|
|
1043
|
+
i.appendToBody && e.isOpen ? (c(), F(x, {
|
|
1044
|
+
key: 0,
|
|
1045
|
+
to: "body"
|
|
1046
|
+
}, [
|
|
1047
|
+
b(d, {
|
|
1048
|
+
teleported: !0,
|
|
1049
|
+
id: e.id,
|
|
1050
|
+
multiple: e.multiple,
|
|
1051
|
+
max: e.max,
|
|
1052
|
+
internalValue: e.internalValue,
|
|
1053
|
+
filteredOptions: e.filteredOptions,
|
|
1054
|
+
isSelected: e.isSelected,
|
|
1055
|
+
optionHighlight: e.optionHighlight,
|
|
1056
|
+
select: e.select,
|
|
1057
|
+
pointerSet: e.pointerSet,
|
|
1058
|
+
selectLabelText: l.selectLabelText,
|
|
1059
|
+
selectedLabelText: l.selectedLabelText,
|
|
1060
|
+
deselectLabelText: l.deselectLabelText,
|
|
1061
|
+
tagPlaceholder: e.tagPlaceholder,
|
|
1062
|
+
groupSelect: e.groupSelect,
|
|
1063
|
+
selectGroupLabelText: l.selectGroupLabelText,
|
|
1064
|
+
deselectGroupLabelText: l.deselectGroupLabelText,
|
|
1065
|
+
getOptionLabel: e.getOptionLabel,
|
|
1066
|
+
groupHighlight: e.groupHighlight,
|
|
1067
|
+
selectGroup: e.selectGroup,
|
|
1068
|
+
options: e.options,
|
|
1069
|
+
hasOptionGroup: l.hasOptionGroup,
|
|
1070
|
+
search: e.search,
|
|
1071
|
+
loading: i.loading,
|
|
1072
|
+
showNoResults: i.showNoResults,
|
|
1073
|
+
showNoOptions: i.showNoOptions,
|
|
1074
|
+
small: i.small,
|
|
1075
|
+
contentStyle: l.contentStyle,
|
|
1076
|
+
customStyle: l.teleportedContentStyle,
|
|
1077
|
+
onFocus: e.activate,
|
|
1078
|
+
onClick: t[11] || (t[11] = o(() => {
|
|
1079
|
+
}, ["stop"]))
|
|
1080
|
+
}, B({ _: 2 }, [
|
|
1081
|
+
v(e.$slots, (s, h) => ({
|
|
1082
|
+
name: h,
|
|
1083
|
+
fn: y((f) => [
|
|
1084
|
+
u(e.$slots, h, $(G(f)), void 0, !0)
|
|
1085
|
+
])
|
|
1086
|
+
}))
|
|
1087
|
+
]), 1032, ["id", "multiple", "max", "internalValue", "filteredOptions", "isSelected", "optionHighlight", "select", "pointerSet", "selectLabelText", "selectedLabelText", "deselectLabelText", "tagPlaceholder", "groupSelect", "selectGroupLabelText", "deselectGroupLabelText", "getOptionLabel", "groupHighlight", "selectGroup", "options", "hasOptionGroup", "search", "loading", "showNoResults", "showNoOptions", "small", "contentStyle", "customStyle", "onFocus"])
|
|
1088
|
+
])) : m("", !0)
|
|
1089
|
+
], 42, U);
|
|
1044
1090
|
}
|
|
1045
|
-
const
|
|
1091
|
+
const ne = /* @__PURE__ */ K(I, [["render", te], ["__scopeId", "data-v-c725aeeb"]]);
|
|
1046
1092
|
export {
|
|
1047
|
-
|
|
1093
|
+
ne as default
|
|
1048
1094
|
};
|