briicks-selector
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -1,3 +0,3 @@ | ||
import { openBlock as u, createBlock as c, withKeys as b, withModifiers as o, renderSlot as h, createVNode as r, withDirectives as w, Fragment as P, renderList as D, toDisplayString as f, vShow as $, createCommentVNode as v, Transition as T, withCtx as m, createTextVNode as S, createElementBlock as L, createElementVNode as a, resolveComponent as V, mergeProps as E, toHandlers as K, createSlots as N, normalizeStyle as F, normalizeProps as G } from "vue"; | ||
function C(e) { | ||
import { openBlock as h, createBlock as p, withKeys as b, withModifiers as o, renderSlot as u, createVNode as r, withDirectives as S, Fragment as M, renderList as C, toDisplayString as f, vShow as w, createCommentVNode as y, Transition as E, withCtx as g, createTextVNode as L, createElementBlock as O, createElementVNode as a, resolveComponent as $, mergeProps as T, toHandlers as F, createSlots as K, normalizeStyle as N, normalizeProps as G } from "vue"; | ||
function B(e) { | ||
return e === 0 ? !1 : Array.isArray(e) && e.length === 0 ? !0 : !e; | ||
@@ -11,4 +11,4 @@ } | ||
} | ||
function H(e, t, i, l) { | ||
return t ? e.filter((d) => q(l(d, i), t)).sort((d, n) => l(d, i).length - l(n, i).length) : e; | ||
function _(e, t, i, s) { | ||
return t ? e.filter((d) => q(s(d, i), t)).sort((d, n) => s(d, i).length - s(n, i).length) : e; | ||
} | ||
@@ -19,19 +19,19 @@ function z(e) { | ||
function k(e, t) { | ||
return (i) => i.reduce((l, d) => d[e] && d[e].length ? (l.push({ | ||
return (i) => i.reduce((s, d) => d[e] && d[e].length ? (s.push({ | ||
$groupLabel: d[t], | ||
$isLabel: !0 | ||
}), l.concat(d[e])) : l, []); | ||
}), s.concat(d[e])) : s, []); | ||
} | ||
function j(e, t, i, l, d) { | ||
return (n) => n.map((s) => { | ||
if (!s[i]) | ||
function j(e, t, i, s, d) { | ||
return (n) => n.map((l) => { | ||
if (!l[i]) | ||
return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."), []; | ||
const p = H(s[i], e, t, d); | ||
return p.length ? { | ||
[l]: s[l], | ||
[i]: p | ||
const c = _(l[i], e, t, d); | ||
return c.length ? { | ||
[s]: l[s], | ||
[i]: c | ||
} : []; | ||
}); | ||
} | ||
const _ = (...e) => (t) => e.reduce((i, l) => l(i), t); | ||
const A = (...e) => (t) => e.reduce((i, s) => s(i), t); | ||
var I = { | ||
@@ -96,3 +96,3 @@ data() { | ||
default(e, t) { | ||
return C(e) ? "" : t ? e[t] : e; | ||
return B(e) ? "" : t ? e[t] : e; | ||
} | ||
@@ -158,3 +158,3 @@ }, | ||
let i = this.options.concat(); | ||
return this.internalSearch ? i = this.groupValues ? this.filterAndFlat(i, t, this.label) : H(i, t, this.label, this.customLabel) : i = this.groupValues ? k(this.groupValues, this.groupLabel)(i) : i, i = this.hideSelected ? i.filter(R(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); | ||
return this.internalSearch ? i = this.groupValues ? this.filterAndFlat(i, t, this.label) : _(i, t, this.label, this.customLabel) : i = this.groupValues ? k(this.groupValues, this.groupLabel)(i) : i, i = this.hideSelected ? i.filter(R(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); | ||
}, | ||
@@ -185,3 +185,3 @@ valueKeys() { | ||
filterAndFlat(e, t, i) { | ||
return _( | ||
return A( | ||
j(t, i, this.groupValues, this.groupLabel, this.customLabel), | ||
@@ -192,3 +192,3 @@ k(this.groupValues, this.groupLabel) | ||
flatAndStrip(e) { | ||
return _( | ||
return A( | ||
k(this.groupValues, this.groupLabel), | ||
@@ -212,3 +212,3 @@ z | ||
getOptionLabel(e) { | ||
if (C(e)) | ||
if (B(e)) | ||
return ""; | ||
@@ -220,3 +220,3 @@ if (e.isTag) | ||
const t = this.customLabel(e, this.label); | ||
return C(t) ? "" : t; | ||
return B(t) ? "" : t; | ||
}, | ||
@@ -247,3 +247,3 @@ select(e, t) { | ||
const i = this.internalValue.filter( | ||
(l) => t[this.groupValues].indexOf(l) === -1 | ||
(s) => t[this.groupValues].indexOf(s) === -1 | ||
); | ||
@@ -253,3 +253,3 @@ this.$emit("update:modelValue", i); | ||
const i = t[this.groupValues].filter( | ||
(l) => !(this.isOptionDisabled(l) || this.isSelected(l)) | ||
(s) => !(this.isOptionDisabled(s) || this.isSelected(s)) | ||
); | ||
@@ -281,4 +281,4 @@ this.$emit("select", i, this.id), this.$emit( | ||
if (this.$emit("remove", e, this.id), this.multiple) { | ||
const l = this.internalValue.slice(0, i).concat(this.internalValue.slice(i + 1)); | ||
this.$emit("update:modelValue", l); | ||
const s = this.internalValue.slice(0, i).concat(this.internalValue.slice(i + 1)); | ||
this.$emit("update:modelValue", s); | ||
} else | ||
@@ -356,3 +356,3 @@ this.$emit("update:modelValue", null); | ||
]; | ||
const i = this.options.find((l) => l[this.groupLabel] === t.$groupLabel); | ||
const i = this.options.find((s) => s[this.groupLabel] === t.$groupLabel); | ||
return i && !this.wholeGroupDisabled(i) ? [ | ||
@@ -383,3 +383,3 @@ "multiselect__option--group", | ||
} | ||
}, A = { | ||
}, H = { | ||
name: "vue-multiselect", | ||
@@ -504,27 +504,27 @@ mixins: [I, Z], | ||
class: "multiselect__tags" | ||
}, W = { class: "multiselect__tags-wrap" }, J = { class: "multiselect__spinner" }, Q = { key: 0 }, X = { class: "multiselect__option" }, Y = { class: "multiselect__option" }, x = /* @__PURE__ */ S("No elements found. Consider changing the search query."), ee = { class: "multiselect__option" }, te = /* @__PURE__ */ S("List is empty."); | ||
function ie(e, t, i, l, d, n) { | ||
return u(), c("div", { | ||
}, W = { class: "multiselect__tags-wrap" }, J = { class: "multiselect__spinner" }, Q = { key: 0 }, X = { class: "multiselect__option" }, Y = { class: "multiselect__option" }, x = /* @__PURE__ */ L("No elements found. Consider changing the search query."), ee = { class: "multiselect__option" }, te = /* @__PURE__ */ L("List is empty."); | ||
function ie(e, t, i, s, d, n) { | ||
return h(), p("div", { | ||
tabindex: e.searchable ? -1 : i.tabindex, | ||
class: [{ "multiselect--active": e.isOpen, "multiselect--disabled": i.disabled, "multiselect--above": n.isAbove }, "multiselect"], | ||
onFocus: t[14] || (t[14] = (s) => e.activate()), | ||
onBlur: t[15] || (t[15] = (s) => e.searchable ? !1 : e.deactivate()), | ||
onFocus: t[14] || (t[14] = (l) => e.activate()), | ||
onBlur: t[15] || (t[15] = (l) => e.searchable ? !1 : e.deactivate()), | ||
onKeydown: [ | ||
t[16] || (t[16] = b(o((s) => e.pointerForward(), ["self", "prevent"]), ["down"])), | ||
t[17] || (t[17] = b(o((s) => e.pointerBackward(), ["self", "prevent"]), ["up"])) | ||
t[16] || (t[16] = b(o((l) => e.pointerForward(), ["self", "prevent"]), ["down"])), | ||
t[17] || (t[17] = b(o((l) => e.pointerBackward(), ["self", "prevent"]), ["up"])) | ||
], | ||
onKeypress: t[18] || (t[18] = b(o((s) => e.addPointerElement(s), ["stop", "self"]), ["enter", "tab"])), | ||
onKeyup: t[19] || (t[19] = b((s) => e.deactivate(), ["esc"])), | ||
onKeypress: t[18] || (t[18] = b(o((l) => e.addPointerElement(l), ["stop", "self"]), ["enter", "tab"])), | ||
onKeyup: t[19] || (t[19] = b((l) => e.deactivate(), ["esc"])), | ||
role: "combobox", | ||
"aria-owns": "listbox-" + e.id | ||
}, [ | ||
h(e.$slots, "caret", { toggle: e.toggle }, () => [ | ||
u(e.$slots, "caret", { toggle: e.toggle }, () => [ | ||
r("div", { | ||
onMousedown: t[1] || (t[1] = o((s) => e.toggle(), ["prevent", "stop"])), | ||
onMousedown: t[1] || (t[1] = o((l) => e.toggle(), ["prevent", "stop"])), | ||
class: "multiselect__select" | ||
}, null, 32) | ||
]), | ||
h(e.$slots, "clear", { search: e.search }), | ||
u(e.$slots, "clear", { search: e.search }), | ||
r("div", U, [ | ||
h(e.$slots, "selection", { | ||
u(e.$slots, "selection", { | ||
search: e.search, | ||
@@ -535,19 +535,19 @@ remove: e.removeElement, | ||
}, () => [ | ||
w(r("div", W, [ | ||
(u(!0), c(P, null, D(n.visibleValues, (s, p) => h(e.$slots, "tag", { | ||
option: s, | ||
S(r("div", W, [ | ||
(h(!0), p(M, null, C(n.visibleValues, (l, c) => u(e.$slots, "tag", { | ||
option: l, | ||
search: e.search, | ||
remove: e.removeElement | ||
}, () => [ | ||
(u(), c("span", { | ||
(h(), p("span", { | ||
class: "multiselect__tag", | ||
key: p | ||
key: c | ||
}, [ | ||
r("span", { | ||
textContent: f(e.getOptionLabel(s)) | ||
textContent: f(e.getOptionLabel(l)) | ||
}, null, 8, ["textContent"]), | ||
r("i", { | ||
tabindex: "1", | ||
onKeypress: b(o((y) => e.removeElement(s), ["prevent"]), ["enter"]), | ||
onMousedown: o((y) => e.removeElement(s), ["prevent"]), | ||
onKeypress: b(o((v) => e.removeElement(l), ["prevent"]), ["enter"]), | ||
onMousedown: o((v) => e.removeElement(l), ["prevent"]), | ||
class: "multiselect__tag-icon" | ||
@@ -558,5 +558,5 @@ }, null, 40, ["onKeypress", "onMousedown"]) | ||
], 512), [ | ||
[$, n.visibleValues.length > 0] | ||
[w, n.visibleValues.length > 0] | ||
]), | ||
e.internalValue && e.internalValue.length > i.limit ? h(e.$slots, "limit", { key: 0 }, () => [ | ||
e.internalValue && e.internalValue.length > i.limit ? u(e.$slots, "limit", { key: 0 }, () => [ | ||
r("strong", { | ||
@@ -566,9 +566,9 @@ class: "multiselect__strong", | ||
}, null, 8, ["textContent"]) | ||
]) : v("v-if", !0) | ||
]) : y("v-if", !0) | ||
]), | ||
r(T, { name: "multiselect__loading" }, { | ||
default: m(() => [ | ||
h(e.$slots, "loading", {}, () => [ | ||
w(r("div", J, null, 512), [ | ||
[$, i.loading] | ||
r(E, { name: "multiselect__loading" }, { | ||
default: g(() => [ | ||
u(e.$slots, "loading", {}, () => [ | ||
S(r("div", J, null, 512), [ | ||
[w, i.loading] | ||
]) | ||
@@ -579,3 +579,3 @@ ]) | ||
}), | ||
e.searchable ? (u(), c("input", { | ||
e.searchable ? (h(), p("input", { | ||
key: 0, | ||
@@ -593,39 +593,39 @@ ref: "search", | ||
tabindex: i.tabindex, | ||
onInput: t[2] || (t[2] = (s) => e.updateSearch(s.target.value)), | ||
onFocus: t[3] || (t[3] = o((s) => e.activate(), ["prevent"])), | ||
onBlur: t[4] || (t[4] = o((s) => e.deactivate(), ["prevent"])), | ||
onKeyup: t[5] || (t[5] = b((s) => e.deactivate(), ["esc"])), | ||
onInput: t[2] || (t[2] = (l) => e.updateSearch(l.target.value)), | ||
onFocus: t[3] || (t[3] = o((l) => e.activate(), ["prevent"])), | ||
onBlur: t[4] || (t[4] = o((l) => e.deactivate(), ["prevent"])), | ||
onKeyup: t[5] || (t[5] = b((l) => e.deactivate(), ["esc"])), | ||
onKeydown: [ | ||
t[6] || (t[6] = b(o((s) => e.pointerForward(), ["prevent"]), ["down"])), | ||
t[7] || (t[7] = b(o((s) => e.pointerBackward(), ["prevent"]), ["up"])), | ||
t[9] || (t[9] = b(o((s) => e.removeLastElement(), ["stop"]), ["delete"])) | ||
t[6] || (t[6] = b(o((l) => e.pointerForward(), ["prevent"]), ["down"])), | ||
t[7] || (t[7] = b(o((l) => e.pointerBackward(), ["prevent"]), ["up"])), | ||
t[9] || (t[9] = b(o((l) => e.removeLastElement(), ["stop"]), ["delete"])) | ||
], | ||
onKeypress: t[8] || (t[8] = b(o((s) => e.addPointerElement(s), ["prevent", "stop", "self"]), ["enter"])), | ||
onKeypress: t[8] || (t[8] = b(o((l) => e.addPointerElement(l), ["prevent", "stop", "self"]), ["enter"])), | ||
class: "multiselect__input", | ||
"aria-controls": "listbox-" + e.id | ||
}, null, 44, ["name", "id", "placeholder", "value", "disabled", "tabindex", "aria-controls"])) : v("v-if", !0), | ||
n.isSingleLabelVisible ? (u(), c("span", { | ||
}, null, 44, ["name", "id", "placeholder", "value", "disabled", "tabindex", "aria-controls"])) : y("v-if", !0), | ||
n.isSingleLabelVisible ? (h(), p("span", { | ||
key: 1, | ||
class: "multiselect__single", | ||
onMousedown: t[10] || (t[10] = o((...s) => e.toggle && e.toggle(...s), ["prevent"])) | ||
onMousedown: t[10] || (t[10] = o((...l) => e.toggle && e.toggle(...l), ["prevent"])) | ||
}, [ | ||
h(e.$slots, "singleLabel", { option: n.singleValue }, () => [ | ||
S(f(e.currentOptionLabel), 1) | ||
u(e.$slots, "singleLabel", { option: n.singleValue }, () => [ | ||
L(f(e.currentOptionLabel), 1) | ||
]) | ||
], 32)) : v("v-if", !0), | ||
n.isPlaceholderVisible ? (u(), c("span", { | ||
], 32)) : y("v-if", !0), | ||
n.isPlaceholderVisible ? (h(), p("span", { | ||
key: 2, | ||
class: "multiselect__placeholder", | ||
onMousedown: t[11] || (t[11] = o((...s) => e.toggle && e.toggle(...s), ["prevent"])) | ||
onMousedown: t[11] || (t[11] = o((...l) => e.toggle && e.toggle(...l), ["prevent"])) | ||
}, [ | ||
h(e.$slots, "placeholder", {}, () => [ | ||
S(f(e.placeholder), 1) | ||
u(e.$slots, "placeholder", {}, () => [ | ||
L(f(e.placeholder), 1) | ||
]) | ||
], 32)) : v("v-if", !0) | ||
], 32)) : y("v-if", !0) | ||
], 512), | ||
r(T, { name: "multiselect" }, { | ||
default: m(() => [ | ||
w(r("div", { | ||
r(E, { name: "multiselect" }, { | ||
default: g(() => [ | ||
S(r("div", { | ||
class: "multiselect__content-wrapper", | ||
onFocus: t[12] || (t[12] = (...s) => e.activate && e.activate(...s)), | ||
onFocus: t[12] || (t[12] = (...l) => e.activate && e.activate(...l)), | ||
tabindex: "-1", | ||
@@ -643,53 +643,53 @@ onMousedown: t[13] || (t[13] = o(() => { | ||
}, [ | ||
h(e.$slots, "beforeList"), | ||
e.multiple && e.max === e.internalValue.length ? (u(), c("li", Q, [ | ||
u(e.$slots, "beforeList"), | ||
e.multiple && e.max === e.internalValue.length ? (h(), p("li", Q, [ | ||
r("span", X, [ | ||
h(e.$slots, "maxElements", {}, () => [ | ||
S("Maximum of " + f(e.max) + " options selected. First remove a selected option to select another.", 1) | ||
u(e.$slots, "maxElements", {}, () => [ | ||
L("Maximum of " + f(e.max) + " options selected. First remove a selected option to select another.", 1) | ||
]) | ||
]) | ||
])) : v("v-if", !0), | ||
!e.max || e.internalValue.length < e.max ? (u(!0), c(P, { key: 1 }, D(e.filteredOptions, (s, p) => (u(), c("li", { | ||
])) : y("v-if", !0), | ||
!e.max || e.internalValue.length < e.max ? (h(!0), p(M, { key: 1 }, C(e.filteredOptions, (l, c) => (h(), p("li", { | ||
class: "multiselect__element", | ||
key: p, | ||
id: e.id + "-" + p, | ||
role: s && (s.$isLabel || s.$isDisabled) ? null : "option" | ||
key: c, | ||
id: e.id + "-" + c, | ||
role: l && (l.$isLabel || l.$isDisabled) ? null : "option" | ||
}, [ | ||
s && (s.$isLabel || s.$isDisabled) ? v("v-if", !0) : (u(), c("span", { | ||
l && (l.$isLabel || l.$isDisabled) ? y("v-if", !0) : (h(), p("span", { | ||
key: 0, | ||
class: [e.optionHighlight(p, s), "multiselect__option"], | ||
onClick: o((y) => e.select(s), ["stop"]), | ||
onMouseenter: o((y) => e.pointerSet(p), ["self"]), | ||
"data-select": s && s.isTag ? e.tagPlaceholder : n.selectLabelText, | ||
class: [e.optionHighlight(c, l), "multiselect__option"], | ||
onClick: o((v) => e.select(l), ["stop"]), | ||
onMouseenter: o((v) => e.pointerSet(c), ["self"]), | ||
"data-select": l && l.isTag ? e.tagPlaceholder : n.selectLabelText, | ||
"data-selected": n.selectedLabelText, | ||
"data-deselect": n.deselectLabelText | ||
}, [ | ||
h(e.$slots, "option", { | ||
option: s, | ||
u(e.$slots, "option", { | ||
option: l, | ||
search: e.search, | ||
index: p | ||
index: c | ||
}, () => [ | ||
r("span", null, f(e.getOptionLabel(s)), 1) | ||
r("span", null, f(e.getOptionLabel(l)), 1) | ||
]) | ||
], 42, ["onClick", "onMouseenter", "data-select", "data-selected", "data-deselect"])), | ||
s && (s.$isLabel || s.$isDisabled) ? (u(), c("span", { | ||
l && (l.$isLabel || l.$isDisabled) ? (h(), p("span", { | ||
key: 1, | ||
"data-select": e.groupSelect && n.selectGroupLabelText, | ||
"data-deselect": e.groupSelect && n.deselectGroupLabelText, | ||
class: [e.groupHighlight(p, s), "multiselect__option"], | ||
onMouseenter: o((y) => e.groupSelect && e.pointerSet(p), ["self"]), | ||
onMousedown: o((y) => e.selectGroup(s), ["prevent"]) | ||
class: [e.groupHighlight(c, l), "multiselect__option"], | ||
onMouseenter: o((v) => e.groupSelect && e.pointerSet(c), ["self"]), | ||
onMousedown: o((v) => e.selectGroup(l), ["prevent"]) | ||
}, [ | ||
h(e.$slots, "option", { | ||
option: s, | ||
u(e.$slots, "option", { | ||
option: l, | ||
search: e.search, | ||
index: p | ||
index: c | ||
}, () => [ | ||
r("span", null, f(e.getOptionLabel(s)), 1) | ||
r("span", null, f(e.getOptionLabel(l)), 1) | ||
]) | ||
], 42, ["data-select", "data-deselect", "onMouseenter", "onMousedown"])) : v("v-if", !0) | ||
], 8, ["id", "role"]))), 128)) : v("v-if", !0), | ||
w(r("li", null, [ | ||
], 42, ["data-select", "data-deselect", "onMouseenter", "onMousedown"])) : y("v-if", !0) | ||
], 8, ["id", "role"]))), 128)) : y("v-if", !0), | ||
S(r("li", null, [ | ||
r("span", Y, [ | ||
h(e.$slots, "noResult", { search: e.search }, () => [ | ||
u(e.$slots, "noResult", { search: e.search }, () => [ | ||
x | ||
@@ -699,7 +699,7 @@ ]) | ||
], 512), [ | ||
[$, i.showNoResults && e.filteredOptions.length === 0 && e.search && !i.loading] | ||
[w, i.showNoResults && e.filteredOptions.length === 0 && e.search && !i.loading] | ||
]), | ||
w(r("li", null, [ | ||
S(r("li", null, [ | ||
r("span", ee, [ | ||
h(e.$slots, "noOptions", {}, () => [ | ||
u(e.$slots, "noOptions", {}, () => [ | ||
te | ||
@@ -709,8 +709,8 @@ ]) | ||
], 512), [ | ||
[$, i.showNoOptions && e.options.length === 0 && !e.search && !i.loading] | ||
[w, i.showNoOptions && e.options.length === 0 && !e.search && !i.loading] | ||
]), | ||
h(e.$slots, "afterList") | ||
u(e.$slots, "afterList") | ||
], 12, ["id"]) | ||
], 36), [ | ||
[$, e.isOpen] | ||
[w, e.isOpen] | ||
]) | ||
@@ -722,9 +722,9 @@ ]), | ||
} | ||
A.render = ie; | ||
const B = (e, t) => { | ||
H.render = ie; | ||
const D = (e, t) => { | ||
const i = e.__vccOpts || e; | ||
for (const [l, d] of t) | ||
i[l] = d; | ||
for (const [s, d] of t) | ||
i[s] = d; | ||
return i; | ||
}, se = {}, le = { | ||
}, le = {}, se = { | ||
width: "12", | ||
@@ -755,5 +755,5 @@ height: "12", | ||
function ae(e, t) { | ||
return u(), L("svg", le, oe); | ||
return h(), O("svg", se, oe); | ||
} | ||
const he = /* @__PURE__ */ B(se, [["render", ae]]), ue = { | ||
const ue = /* @__PURE__ */ D(le, [["render", ae]]), he = { | ||
props: { | ||
@@ -768,3 +768,3 @@ color: String | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}, pe = /* @__PURE__ */ a("g", { "clip-path": "url(#clip0_2_10015)" }, [ | ||
}, ce = /* @__PURE__ */ a("g", { "clip-path": "url(#clip0_2_10015)" }, [ | ||
/* @__PURE__ */ a("path", { | ||
@@ -775,3 +775,3 @@ "fill-rule": "evenodd", | ||
}) | ||
], -1), ce = /* @__PURE__ */ a("defs", null, [ | ||
], -1), pe = /* @__PURE__ */ a("defs", null, [ | ||
/* @__PURE__ */ a("clipPath", { id: "clip0_2_10015" }, [ | ||
@@ -785,9 +785,9 @@ /* @__PURE__ */ a("rect", { | ||
], -1), fe = [ | ||
pe, | ||
ce | ||
ce, | ||
pe | ||
]; | ||
function me(e, t, i, l, d, n) { | ||
return u(), L("svg", de, fe); | ||
function ge(e, t, i, s, d, n) { | ||
return h(), O("svg", de, fe); | ||
} | ||
const ge = /* @__PURE__ */ B(ue, [["render", me]]); | ||
const me = /* @__PURE__ */ D(he, [["render", ge]]); | ||
const be = { | ||
@@ -812,3 +812,2 @@ inheritAttrs: !1, | ||
}, | ||
placeholder: String, | ||
canClear: Boolean, | ||
@@ -837,9 +836,104 @@ mode: { | ||
}, | ||
caret: Boolean | ||
caret: Boolean, | ||
internalSearch: { | ||
type: Boolean, | ||
default: !0 | ||
}, | ||
options: { | ||
type: Array, | ||
required: !0 | ||
}, | ||
trackBy: { | ||
type: String | ||
}, | ||
label: { | ||
type: String | ||
}, | ||
searchable: { | ||
type: Boolean, | ||
default: !0 | ||
}, | ||
clearOnSelect: { | ||
type: Boolean, | ||
default: !0 | ||
}, | ||
hideSelected: { | ||
type: Boolean, | ||
default: !1 | ||
}, | ||
placeholder: { | ||
type: String, | ||
default: "Select option" | ||
}, | ||
allowEmpty: { | ||
type: Boolean, | ||
default: !0 | ||
}, | ||
resetAfter: { | ||
type: Boolean, | ||
default: !1 | ||
}, | ||
closeOnSelect: { | ||
type: Boolean, | ||
default: !0 | ||
}, | ||
customLabel: { | ||
type: Function, | ||
default(e, t) { | ||
return isEmpty(e) ? "" : t ? e[t] : e; | ||
} | ||
}, | ||
taggable: { | ||
type: Boolean, | ||
default: !1 | ||
}, | ||
tagPlaceholder: { | ||
type: String, | ||
default: "Press enter to create a tag" | ||
}, | ||
tagPosition: { | ||
type: String, | ||
default: "top" | ||
}, | ||
max: { | ||
type: [Number, Boolean], | ||
default: !1 | ||
}, | ||
id: { | ||
default: null | ||
}, | ||
optionsLimit: { | ||
type: Number, | ||
default: 1e3 | ||
}, | ||
groupValues: { | ||
type: String | ||
}, | ||
groupLabel: { | ||
type: String | ||
}, | ||
groupSelect: { | ||
type: Boolean, | ||
default: !1 | ||
}, | ||
blockKeys: { | ||
type: Array, | ||
default() { | ||
return []; | ||
} | ||
}, | ||
preserveSearch: { | ||
type: Boolean, | ||
default: !1 | ||
}, | ||
preselectFirst: { | ||
type: Boolean, | ||
default: !1 | ||
} | ||
}, | ||
emits: ["remove", "select", "input", "search-change", "tag", "open", "close"], | ||
components: { | ||
Multiselect: A, | ||
Close12: he, | ||
Checkmark: ge | ||
Multiselect: H, | ||
Close12: ue, | ||
Checkmark: me | ||
}, | ||
@@ -893,4 +987,4 @@ computed: { | ||
const i = t.$refs.list; | ||
let l = this.preferredOpenDirection; | ||
l === "down" && e.bottom + this.offset < this.$attrs.dropdownMaxHeight && (l = "up"), i.style.width = `${this.$el.clientWidth}px`, i.style.position = "fixed", i.style.left = `${e.left}px`, l === "down" ? (i.style.top = `${e.bottom + this.offset}px`, i.style.bottom = "auto") : (i.style.bottom = `calc(100vh - ${e.bottom}px + ${e.height + this.offset}px)`, i.style.top = "auto"); | ||
let s = this.preferredOpenDirection; | ||
s === "down" && e.bottom + this.offset < this.$attrs.dropdownMaxHeight && (s = "up"), i.style.width = `${this.$el.clientWidth}px`, i.style.position = "fixed", i.style.left = `${e.left}px`, s === "down" ? (i.style.top = `${e.bottom + this.offset}px`, i.style.bottom = "auto") : (i.style.bottom = `calc(100vh - ${e.bottom}px + ${e.height + this.offset}px)`, i.style.top = "auto"); | ||
}); | ||
@@ -924,4 +1018,4 @@ }, | ||
return; | ||
const l = i.closest("body"); | ||
!l || (this.target = l, i.removeChild(t), l.appendChild(t)); | ||
const s = i.closest("body"); | ||
!s || (this.target = s, i.removeChild(t), s.appendChild(t)); | ||
}, | ||
@@ -941,48 +1035,71 @@ beforeUnmount() { | ||
} | ||
}, ve = { class: "multiselect__custom-tag" }, ye = { class: "multiselect-placeholder-el" }, we = { class: "multiselect-single-label" }, $e = { | ||
}, ye = { class: "multiselect__custom-tag" }, ve = { class: "multiselect-placeholder-el" }, Se = { class: "multiselect-single-label" }, we = { | ||
key: 0, | ||
class: "checkbox" | ||
}, Se = { class: "option-label" }, Le = { | ||
}, Le = { class: "option-label" }, Oe = { | ||
key: 1, | ||
class: "selected-icon" | ||
}, Oe = { class: "tag-limit" }, Ve = { class: "multiselect-caret" }, Ce = ["src"], ke = /* @__PURE__ */ a("div", null, null, -1); | ||
function De(e, t, i, l, d, n) { | ||
const s = V("Close12"), p = V("Checkmark"), y = V("multiselect"); | ||
return u(), c(y, E({ | ||
}, Ve = { class: "tag-limit" }, $e = { class: "multiselect-caret" }, Be = ["src"], ke = /* @__PURE__ */ a("div", null, null, -1); | ||
function Ce(e, t, i, s, d, n) { | ||
const l = $("Close12"), c = $("Checkmark"), v = $("multiselect"); | ||
return h(), p(v, T({ | ||
class: ["briicks_selector", i.brand], | ||
ref: "originalMultiselect", | ||
multiple: i.mode === "multi" | ||
}, e.$attrs, K(n.listeners), { | ||
}, F(n.listeners), { | ||
placeholder: i.placeholder, | ||
limit: i.limit | ||
}), N({ | ||
tag: m(({ option: g, remove: M }) => [ | ||
a("div", ve, [ | ||
a("span", null, f(g.label), 1), | ||
r(s, { | ||
onClick: (O) => M(g) | ||
limit: i.limit, | ||
options: i.options, | ||
internalSearch: i.internalSearch, | ||
trackBy: i.trackBy, | ||
label: i.label, | ||
searchable: i.searchable, | ||
clearOnSelect: i.clearOnSelect, | ||
hideSelected: i.hideSelected, | ||
allowEmpty: i.allowEmpty, | ||
resetAfter: i.resetAfter, | ||
closeOnSelect: i.closeOnSelect, | ||
customLabel: i.customLabel, | ||
taggable: i.taggable, | ||
tagPlaceholder: i.tagPlaceholder, | ||
tagPosition: i.tagPosition, | ||
max: i.max, | ||
id: i.id, | ||
optionsLimit: i.optionsLimit, | ||
groupValues: i.groupValues, | ||
groupLabel: i.groupLabel, | ||
groupSelect: i.groupSelect, | ||
blockKeys: i.blockKeys, | ||
preserveSearch: i.preserveSearch, | ||
preselectFirst: i.preselectFirst | ||
}), K({ | ||
tag: g(({ option: m, remove: P }) => [ | ||
a("div", ye, [ | ||
a("span", null, f(m.label), 1), | ||
r(l, { | ||
onClick: (V) => P(m) | ||
}, null, 8, ["onClick"]) | ||
]) | ||
]), | ||
placeholder: m(() => [ | ||
a("div", ye, f(i.placeholder), 1) | ||
placeholder: g(() => [ | ||
a("div", ve, f(i.placeholder), 1) | ||
]), | ||
singleLabel: m(({ option: g }) => [ | ||
a("div", we, f((g ? g.label : "") || ""), 1) | ||
singleLabel: g(({ option: m }) => [ | ||
a("div", Se, f((m ? m.label : "") || ""), 1) | ||
]), | ||
option: m(({ option: g }) => [ | ||
i.mode === "multi" && !i.hideCheckbox ? (u(), L("div", $e)) : v("", !0), | ||
a("span", Se, f(g.label), 1), | ||
i.mode === "single" && !i.hideCheckmark ? (u(), L("span", Le, [ | ||
r(p) | ||
])) : v("", !0) | ||
option: g(({ option: m }) => [ | ||
i.mode === "multi" && !i.hideCheckbox ? (h(), O("div", we)) : y("", !0), | ||
a("span", Le, f(m.label), 1), | ||
i.mode === "single" && !i.hideCheckmark ? (h(), O("span", Oe, [ | ||
r(c) | ||
])) : y("", !0) | ||
]), | ||
limit: m(() => [ | ||
a("div", Oe, "+" + f(n.tagCount - i.limit), 1) | ||
limit: g(() => [ | ||
a("div", Ve, "+" + f(n.tagCount - i.limit), 1) | ||
]), | ||
noOptions: m(() => [ | ||
noOptions: g(() => [ | ||
ke | ||
]), | ||
clear: m(() => [ | ||
h(e.$slots, "prefix") | ||
clear: g(() => [ | ||
u(e.$slots, "prefix") | ||
]), | ||
@@ -993,8 +1110,8 @@ _: 2 | ||
name: "caret", | ||
fn: m(() => [ | ||
a("div", Ve, [ | ||
fn: g(() => [ | ||
a("div", $e, [ | ||
a("img", { | ||
style: F(n.caretStyle), | ||
style: N(n.caretStyle), | ||
src: require("./arrow-down-16.svg") | ||
}, null, 12, Ce) | ||
}, null, 12, Be) | ||
]) | ||
@@ -1004,13 +1121,13 @@ ]), | ||
} : void 0, | ||
D(Object.keys(e.$slots), (g, M) => ({ | ||
name: g, | ||
fn: m((O) => [ | ||
O ? h(e.$slots, g, G(E({ key: 0 }, O))) : h(e.$slots, e.name, { key: 1 }) | ||
C(Object.keys(e.$slots), (m, P) => ({ | ||
name: m, | ||
fn: g((V) => [ | ||
V ? u(e.$slots, m, G(T({ key: 0 }, V))) : u(e.$slots, e.name, { key: 1 }) | ||
]) | ||
})) | ||
]), 1040, ["class", "multiple", "placeholder", "limit"]); | ||
]), 1040, ["class", "multiple", "placeholder", "limit", "options", "internalSearch", "trackBy", "label", "searchable", "clearOnSelect", "hideSelected", "allowEmpty", "resetAfter", "closeOnSelect", "customLabel", "taggable", "tagPlaceholder", "tagPosition", "max", "id", "optionsLimit", "groupValues", "groupLabel", "groupSelect", "blockKeys", "preserveSearch", "preselectFirst"]); | ||
} | ||
const Me = /* @__PURE__ */ B(be, [["render", De]]); | ||
const Pe = /* @__PURE__ */ D(be, [["render", Ce]]); | ||
export { | ||
Me as BriicksSelector | ||
Pe as BriicksSelector | ||
}; |
@@ -1,1 +0,1 @@ | ||
(function(d,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(d=typeof globalThis<"u"?globalThis:d||self,t(d.BriicksSelector={},d.Vue))})(this,function(d,t){"use strict";function p(e){return e===0?!1:Array.isArray(e)&&e.length===0?!0:!e}function V(e){return(...i)=>!e(...i)}function S(e,i){return e===void 0&&(e="undefined"),e===null&&(e="null"),e===!1&&(e="false"),e.toString().toLowerCase().indexOf(i.trim())!==-1}function g(e,i,s,r){return i?e.filter(o=>S(r(o,s),i)).sort((o,n)=>r(o,s).length-r(n,s).length):e}function $(e){return e.filter(i=>!i.$isLabel)}function u(e,i){return s=>s.reduce((r,o)=>o[e]&&o[e].length?(r.push({$groupLabel:o[i],$isLabel:!0}),r.concat(o[e])):r,[])}function L(e,i,s,r,o){return n=>n.map(l=>{if(!l[s])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const a=g(l[s],e,i,o);return a.length?{[r]:l[r],[s]:a}:[]})}const b=(...e)=>i=>e.reduce((s,r)=>r(s),i);var O={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(e,i){return p(e)?"":i?e[i]:e}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1}},mounted(){!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])},computed:{internalValue(){return this.modelValue||this.modelValue===0?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const e=this.search||"",i=e.toLowerCase().trim();let s=this.options.concat();return this.internalSearch?s=this.groupValues?this.filterAndFlat(s,i,this.label):g(s,i,this.label,this.customLabel):s=this.groupValues?u(this.groupValues,this.groupLabel)(s):s,s=this.hideSelected?s.filter(V(this.isSelected)):s,this.taggable&&i.length&&!this.isExistingOption(i)&&(this.tagPosition==="bottom"?s.push({isTag:!0,label:e}):s.unshift({isTag:!0,label:e})),s.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(e=>e[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(i=>this.customLabel(i,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:this.internalValue.length===0?null:this.internalValue[0]},filterAndFlat(e,i,s){return b(L(i,s,this.groupValues,this.groupLabel,this.customLabel),u(this.groupValues,this.groupLabel))(e)},flatAndStrip(e){return b(u(this.groupValues,this.groupLabel),$)(e)},updateSearch(e){this.search=e},isExistingOption(e){return this.options?this.optionKeys.indexOf(e)>-1:!1},isSelected(e){const i=this.trackBy?e[this.trackBy]:e;return this.valueKeys.indexOf(i)>-1},isOptionDisabled(e){return!!e.$isDisabled},getOptionLabel(e){if(p(e))return"";if(e.isTag)return e.label;if(e.$isLabel)return e.$groupLabel;const i=this.customLabel(e,this.label);return p(i)?"":i},select(e,i){if(e.$isLabel&&this.groupSelect){this.selectGroup(e);return}if(!(this.blockKeys.indexOf(i)!==-1||this.disabled||e.$isDisabled||e.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(i==="Tab"&&!this.pointerDirty)){if(e.isTag)this.$emit("tag",e.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(e)){i!=="Tab"&&this.removeElement(e);return}this.$emit("select",e,this.id),this.multiple?this.$emit("update:modelValue",this.internalValue.concat([e])):this.$emit("update:modelValue",e),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(e){const i=this.options.find(s=>s[this.groupLabel]===e.$groupLabel);if(!!i){if(this.wholeGroupSelected(i)){this.$emit("remove",i[this.groupValues],this.id);const s=this.internalValue.filter(r=>i[this.groupValues].indexOf(r)===-1);this.$emit("update:modelValue",s)}else{const s=i[this.groupValues].filter(r=>!(this.isOptionDisabled(r)||this.isSelected(r)));this.$emit("select",s,this.id),this.$emit("update:modelValue",this.internalValue.concat(s))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(e){return e[this.groupValues].every(i=>this.isSelected(i)||this.isOptionDisabled(i))},wholeGroupDisabled(e){return e[this.groupValues].every(this.isOptionDisabled)},removeElement(e,i=!0){if(this.disabled||e.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const s=typeof e=="object"?this.valueKeys.indexOf(e[this.trackBy]):this.valueKeys.indexOf(e);if(this.$emit("remove",e,this.id),this.multiple){const r=this.internalValue.slice(0,s).concat(this.internalValue.slice(s+1));this.$emit("update:modelValue",r)}else this.$emit("update:modelValue",null);this.closeOnSelect&&i&&this.deactivate()},removeLastElement(){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)},activate(){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.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.$el.focus(),this.$emit("open",this.id))},deactivate(){!this.isOpen||(this.isOpen=!1,this.searchable?this.$refs.search&&this.$refs.search.blur():this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if(typeof window>"u")return;const e=this.$el.getBoundingClientRect().top,i=window.innerHeight-this.$el.getBoundingClientRect().bottom;i>this.maxHeight||i>e||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(i-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(e-40,this.maxHeight))}}},k={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(e,i){return{"multiselect__option--highlight":e===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(i)}},groupHighlight(e,i){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":i.$isLabel}];const s=this.options.find(r=>r[this.groupLabel]===i.$groupLabel);return s&&!this.wholeGroupDisabled(s)?["multiselect__option--group",{"multiselect__option--highlight":e===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(s)}]:"multiselect__option--disabled"},addPointerElement({key:e}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward(){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},pointerBackward(){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},pointerReset(){!this.closeOnSelect||(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){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()},pointerSet(e){this.pointer=e,this.pointerDirty=!0}}},y={name:"vue-multiselect",mixins:[O,k],props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:e=>`and ${e} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{isSingleLabelVisible(){return(this.singleValue||this.singleValue===0)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return this.openDirection==="above"||this.openDirection==="top"?!0:this.openDirection==="below"||this.openDirection==="bottom"?!1:this.preferredOpenDirection==="above"},showSearchInput(){return this.searchable&&(this.hasSingleSelectedSlot&&(this.visibleSingleValue||this.visibleSingleValue===0)?this.isOpen:!0)}}};const B={ref:"tags",class:"multiselect__tags"},C={class:"multiselect__tags-wrap"},N={class:"multiselect__spinner"},D={key:0},M={class:"multiselect__option"},E={class:"multiselect__option"},T=t.createTextVNode("No elements found. Consider changing the search query."),_={class:"multiselect__option"},P=t.createTextVNode("List is empty.");function K(e,i,s,r,o,n){return t.openBlock(),t.createBlock("div",{tabindex:e.searchable?-1:s.tabindex,class:[{"multiselect--active":e.isOpen,"multiselect--disabled":s.disabled,"multiselect--above":n.isAbove},"multiselect"],onFocus:i[14]||(i[14]=l=>e.activate()),onBlur:i[15]||(i[15]=l=>e.searchable?!1:e.deactivate()),onKeydown:[i[16]||(i[16]=t.withKeys(t.withModifiers(l=>e.pointerForward(),["self","prevent"]),["down"])),i[17]||(i[17]=t.withKeys(t.withModifiers(l=>e.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:i[18]||(i[18]=t.withKeys(t.withModifiers(l=>e.addPointerElement(l),["stop","self"]),["enter","tab"])),onKeyup:i[19]||(i[19]=t.withKeys(l=>e.deactivate(),["esc"])),role:"combobox","aria-owns":"listbox-"+e.id},[t.renderSlot(e.$slots,"caret",{toggle:e.toggle},()=>[t.createVNode("div",{onMousedown:i[1]||(i[1]=t.withModifiers(l=>e.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),t.renderSlot(e.$slots,"clear",{search:e.search}),t.createVNode("div",B,[t.renderSlot(e.$slots,"selection",{search:e.search,remove:e.removeElement,values:n.visibleValues,isOpen:e.isOpen},()=>[t.withDirectives(t.createVNode("div",C,[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(n.visibleValues,(l,a)=>t.renderSlot(e.$slots,"tag",{option:l,search:e.search,remove:e.removeElement},()=>[(t.openBlock(),t.createBlock("span",{class:"multiselect__tag",key:a},[t.createVNode("span",{textContent:t.toDisplayString(e.getOptionLabel(l))},null,8,["textContent"]),t.createVNode("i",{tabindex:"1",onKeypress:t.withKeys(t.withModifiers(c=>e.removeElement(l),["prevent"]),["enter"]),onMousedown:t.withModifiers(c=>e.removeElement(l),["prevent"]),class:"multiselect__tag-icon"},null,40,["onKeypress","onMousedown"])]))])),256))],512),[[t.vShow,n.visibleValues.length>0]]),e.internalValue&&e.internalValue.length>s.limit?t.renderSlot(e.$slots,"limit",{key:0},()=>[t.createVNode("strong",{class:"multiselect__strong",textContent:t.toDisplayString(s.limitText(e.internalValue.length-s.limit))},null,8,["textContent"])]):t.createCommentVNode("v-if",!0)]),t.createVNode(t.Transition,{name:"multiselect__loading"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"loading",{},()=>[t.withDirectives(t.createVNode("div",N,null,512),[[t.vShow,s.loading]])])]),_:3}),e.searchable?(t.openBlock(),t.createBlock("input",{key:0,ref:"search",name:s.name,id:e.id,type:"text",autocomplete:"off",spellcheck:"false",placeholder:e.placeholder,style:n.inputStyle,value:e.search,disabled:s.disabled,tabindex:s.tabindex,onInput:i[2]||(i[2]=l=>e.updateSearch(l.target.value)),onFocus:i[3]||(i[3]=t.withModifiers(l=>e.activate(),["prevent"])),onBlur:i[4]||(i[4]=t.withModifiers(l=>e.deactivate(),["prevent"])),onKeyup:i[5]||(i[5]=t.withKeys(l=>e.deactivate(),["esc"])),onKeydown:[i[6]||(i[6]=t.withKeys(t.withModifiers(l=>e.pointerForward(),["prevent"]),["down"])),i[7]||(i[7]=t.withKeys(t.withModifiers(l=>e.pointerBackward(),["prevent"]),["up"])),i[9]||(i[9]=t.withKeys(t.withModifiers(l=>e.removeLastElement(),["stop"]),["delete"]))],onKeypress:i[8]||(i[8]=t.withKeys(t.withModifiers(l=>e.addPointerElement(l),["prevent","stop","self"]),["enter"])),class:"multiselect__input","aria-controls":"listbox-"+e.id},null,44,["name","id","placeholder","value","disabled","tabindex","aria-controls"])):t.createCommentVNode("v-if",!0),n.isSingleLabelVisible?(t.openBlock(),t.createBlock("span",{key:1,class:"multiselect__single",onMousedown:i[10]||(i[10]=t.withModifiers((...l)=>e.toggle&&e.toggle(...l),["prevent"]))},[t.renderSlot(e.$slots,"singleLabel",{option:n.singleValue},()=>[t.createTextVNode(t.toDisplayString(e.currentOptionLabel),1)])],32)):t.createCommentVNode("v-if",!0),n.isPlaceholderVisible?(t.openBlock(),t.createBlock("span",{key:2,class:"multiselect__placeholder",onMousedown:i[11]||(i[11]=t.withModifiers((...l)=>e.toggle&&e.toggle(...l),["prevent"]))},[t.renderSlot(e.$slots,"placeholder",{},()=>[t.createTextVNode(t.toDisplayString(e.placeholder),1)])],32)):t.createCommentVNode("v-if",!0)],512),t.createVNode(t.Transition,{name:"multiselect"},{default:t.withCtx(()=>[t.withDirectives(t.createVNode("div",{class:"multiselect__content-wrapper",onFocus:i[12]||(i[12]=(...l)=>e.activate&&e.activate(...l)),tabindex:"-1",onMousedown:i[13]||(i[13]=t.withModifiers(()=>{},["prevent"])),style:{maxHeight:e.optimizedHeight+"px"},ref:"list"},[t.createVNode("ul",{class:"multiselect__content",style:n.contentStyle,role:"listbox",id:"listbox-"+e.id},[t.renderSlot(e.$slots,"beforeList"),e.multiple&&e.max===e.internalValue.length?(t.openBlock(),t.createBlock("li",D,[t.createVNode("span",M,[t.renderSlot(e.$slots,"maxElements",{},()=>[t.createTextVNode("Maximum of "+t.toDisplayString(e.max)+" options selected. First remove a selected option to select another.",1)])])])):t.createCommentVNode("v-if",!0),!e.max||e.internalValue.length<e.max?(t.openBlock(!0),t.createBlock(t.Fragment,{key:1},t.renderList(e.filteredOptions,(l,a)=>(t.openBlock(),t.createBlock("li",{class:"multiselect__element",key:a,id:e.id+"-"+a,role:l&&(l.$isLabel||l.$isDisabled)?null:"option"},[l&&(l.$isLabel||l.$isDisabled)?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createBlock("span",{key:0,class:[e.optionHighlight(a,l),"multiselect__option"],onClick:t.withModifiers(c=>e.select(l),["stop"]),onMouseenter:t.withModifiers(c=>e.pointerSet(a),["self"]),"data-select":l&&l.isTag?e.tagPlaceholder:n.selectLabelText,"data-selected":n.selectedLabelText,"data-deselect":n.deselectLabelText},[t.renderSlot(e.$slots,"option",{option:l,search:e.search,index:a},()=>[t.createVNode("span",null,t.toDisplayString(e.getOptionLabel(l)),1)])],42,["onClick","onMouseenter","data-select","data-selected","data-deselect"])),l&&(l.$isLabel||l.$isDisabled)?(t.openBlock(),t.createBlock("span",{key:1,"data-select":e.groupSelect&&n.selectGroupLabelText,"data-deselect":e.groupSelect&&n.deselectGroupLabelText,class:[e.groupHighlight(a,l),"multiselect__option"],onMouseenter:t.withModifiers(c=>e.groupSelect&&e.pointerSet(a),["self"]),onMousedown:t.withModifiers(c=>e.selectGroup(l),["prevent"])},[t.renderSlot(e.$slots,"option",{option:l,search:e.search,index:a},()=>[t.createVNode("span",null,t.toDisplayString(e.getOptionLabel(l)),1)])],42,["data-select","data-deselect","onMouseenter","onMousedown"])):t.createCommentVNode("v-if",!0)],8,["id","role"]))),128)):t.createCommentVNode("v-if",!0),t.withDirectives(t.createVNode("li",null,[t.createVNode("span",E,[t.renderSlot(e.$slots,"noResult",{search:e.search},()=>[T])])],512),[[t.vShow,s.showNoResults&&e.filteredOptions.length===0&&e.search&&!s.loading]]),t.withDirectives(t.createVNode("li",null,[t.createVNode("span",_,[t.renderSlot(e.$slots,"noOptions",{},()=>[P])])],512),[[t.vShow,s.showNoOptions&&e.options.length===0&&!e.search&&!s.loading]]),t.renderSlot(e.$slots,"afterList")],12,["id"])],36),[[t.vShow,e.isOpen]])]),_:3})],42,["tabindex","aria-owns"])}y.render=K;const f=(e,i)=>{const s=e.__vccOpts||e;for(const[r,o]of i)s[r]=o;return s},H={},A={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F=[t.createElementVNode("g",{"clip-path":"url(#clip0_3229_23142)"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.20711 0.792893C1.81658 0.402369 1.18342 0.402369 0.792893 0.792893C0.402369 1.18342 0.402369 1.81658 0.792893 2.20711L4.58579 6L0.792893 9.79289C0.402369 10.1834 0.402369 10.8166 0.792893 11.2071C1.18342 11.5976 1.81658 11.5976 2.20711 11.2071L6 7.41421L9.79289 11.2071C10.1834 11.5976 10.8166 11.5976 11.2071 11.2071C11.5976 10.8166 11.5976 10.1834 11.2071 9.79289L7.41421 6L11.2071 2.20711C11.5976 1.81658 11.5976 1.18342 11.2071 0.792893C10.8166 0.402369 10.1834 0.402369 9.79289 0.792893L6 4.58579L2.20711 0.792893Z",fill:"#121826"})],-1),t.createElementVNode("defs",null,[t.createElementVNode("clipPath",{id:"clip0_3229_23142"},[t.createElementVNode("rect",{width:"12",height:"12",fill:"white"})])],-1)];function G(e,i){return t.openBlock(),t.createElementBlock("svg",A,F)}const R=f(H,[["render",G]]),q={props:{color:String}},j={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},z=[t.createElementVNode("g",{"clip-path":"url(#clip0_2_10015)"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6051 0.703831C16.0448 1.03801 16.1303 1.66537 15.7962 2.10508L6.29616 14.6051C6.12143 14.835 5.85583 14.9781 5.56771 14.9977C5.27959 15.0173 4.99709 14.9113 4.79289 14.7071L0.292893 10.2071C-0.0976311 9.81658 -0.0976311 9.18341 0.292893 8.79289C0.683417 8.40236 1.31658 8.40236 1.70711 8.79289L5.39703 12.4828L14.2038 0.89491C14.538 0.455202 15.1654 0.369653 15.6051 0.703831Z"})],-1),t.createElementVNode("defs",null,[t.createElementVNode("clipPath",{id:"clip0_2_10015"},[t.createElementVNode("rect",{width:"16",height:"16",fill:"white"})])],-1)];function x(e,i,s,r,o,n){return t.openBlock(),t.createElementBlock("svg",j,z)}const I=f(q,[["render",x]]),he="",Z={inheritAttrs:!1,props:{limit:Number,scrollableContainerSelector:{type:[Boolean,String],default:!1},preferredOpenDirection:{type:String,validate(e){return["up","down"].includes(e)},default:"down"},offset:{type:Number,default:0},placeholder:String,canClear:Boolean,mode:{required:!0,type:String,validate(e){return["single","multi"].includes(e)}},hideCheckmark:{type:Boolean,default:!1},hideCheckbox:{type:Boolean,default:!1},brand:{type:String,validate(e){return["sndq","struqta","nuvoni","immogeste"].includes(e)},default:"sndq"},caret:Boolean},emits:["remove","select","input","search-change","tag","open","close"],components:{Multiselect:y,Close12:R,Checkmark:I},computed:{listeners(){return{...this.$listeners,open:this.onOpen,close:this.onClose,remove:this.onRemove,select:this.onSelect}},caretStyle(){return{width:"16px",height:"16px",transform:this.preferredOpenDirection==="up"?"rotate(180deg)":""}},tagCount(){return!this.$refs.originalMultiselect||!this.$refs.originalMultiselect.internalValue?0:this.$refs.originalMultiselect.internalValue.length}},data(){return{scrollableContainer:null,target:null,isOpen:!1}},methods:{onRemove(e,i){this.$emit("remove",e,i),this.repositionDropDown()},onSelect(e,i){this.$emit("select",e,i),this.repositionDropDown()},onOpen(e){this.isOpen=!0,this.$emit("open",e),this.repositionDropDown()},onClose(e){this.$emit("close",e),this.isOpen=!1},repositionDropDown(){setTimeout(()=>{const e=this.$el.getBoundingClientRect(),i=this.$refs.originalMultiselect;if(!i)return;const s=i.$refs.list;let r=this.preferredOpenDirection;r==="down"&&e.bottom+this.offset<this.$attrs.dropdownMaxHeight&&(r="up"),s.style.width=`${this.$el.clientWidth}px`,s.style.position="fixed",s.style.left=`${e.left}px`,r==="down"?(s.style.top=`${e.bottom+this.offset}px`,s.style.bottom="auto"):(s.style.bottom=`calc(100vh - ${e.bottom}px + ${e.height+this.offset}px)`,s.style.top="auto")})},open(){const e=this.$refs.originalMultiselect;!e||(e.activate(),this.repositionDropDown())},close(){const e=this.$refs.originalMultiselect;!e||e.deactivate()},toggle(){this.isOpen?this.open():this.close()}},mounted(){this.scrollableContainer=this.scrollableContainerSelector&&document.querySelector(this.scrollableContainerSelector)||window,this.scrollableContainer.addEventListener("scroll",this.repositionDropDown,{passive:!0});const e=this.$refs.originalMultiselect;if(!e)return;const i=e.$refs.list;i.classList.add("briicks-select-body",this.brand);const s=i.parentNode;if(!s)return;const r=s.closest("body");!r||(this.target=r,s.removeChild(i),r.appendChild(i))},beforeUnmount(){const e=this.$refs.originalMultiselect;if(!e)return;const i=e.$refs.list;!this.target||this.target.removeChild(i)},unmounted(){!this.scrollableContainer||this.scrollableContainer.removeEventListener("scroll",this.repositionDropDown)}},U={class:"multiselect__custom-tag"},W={class:"multiselect-placeholder-el"},J={class:"multiselect-single-label"},Q={key:0,class:"checkbox"},X={class:"option-label"},Y={key:1,class:"selected-icon"},v={class:"tag-limit"},ee={class:"multiselect-caret"},te=["src"],ie=t.createElementVNode("div",null,null,-1);function se(e,i,s,r,o,n){const l=t.resolveComponent("Close12"),a=t.resolveComponent("Checkmark"),c=t.resolveComponent("multiselect");return t.openBlock(),t.createBlock(c,t.mergeProps({class:["briicks_selector",s.brand],ref:"originalMultiselect",multiple:s.mode==="multi"},e.$attrs,t.toHandlers(n.listeners),{placeholder:s.placeholder,limit:s.limit}),t.createSlots({tag:t.withCtx(({option:h,remove:w})=>[t.createElementVNode("div",U,[t.createElementVNode("span",null,t.toDisplayString(h.label),1),t.createVNode(l,{onClick:m=>w(h)},null,8,["onClick"])])]),placeholder:t.withCtx(()=>[t.createElementVNode("div",W,t.toDisplayString(s.placeholder),1)]),singleLabel:t.withCtx(({option:h})=>[t.createElementVNode("div",J,t.toDisplayString((h?h.label:"")||""),1)]),option:t.withCtx(({option:h})=>[s.mode==="multi"&&!s.hideCheckbox?(t.openBlock(),t.createElementBlock("div",Q)):t.createCommentVNode("",!0),t.createElementVNode("span",X,t.toDisplayString(h.label),1),s.mode==="single"&&!s.hideCheckmark?(t.openBlock(),t.createElementBlock("span",Y,[t.createVNode(a)])):t.createCommentVNode("",!0)]),limit:t.withCtx(()=>[t.createElementVNode("div",v,"+"+t.toDisplayString(n.tagCount-s.limit),1)]),noOptions:t.withCtx(()=>[ie]),clear:t.withCtx(()=>[t.renderSlot(e.$slots,"prefix")]),_:2},[s.caret?{name:"caret",fn:t.withCtx(()=>[t.createElementVNode("div",ee,[t.createElementVNode("img",{style:t.normalizeStyle(n.caretStyle),src:require("./arrow-down-16.svg")},null,12,te)])]),key:"0"}:void 0,t.renderList(Object.keys(e.$slots),(h,w)=>({name:h,fn:t.withCtx(m=>[m?t.renderSlot(e.$slots,h,t.normalizeProps(t.mergeProps({key:0},m))):t.renderSlot(e.$slots,e.name,{key:1})])}))]),1040,["class","multiple","placeholder","limit"])}const le=f(Z,[["render",se]]);d.BriicksSelector=le,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); | ||
(function(d,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(d=typeof globalThis<"u"?globalThis:d||self,t(d.BriicksSelector={},d.Vue))})(this,function(d,t){"use strict";function p(e){return e===0?!1:Array.isArray(e)&&e.length===0?!0:!e}function w(e){return(...i)=>!e(...i)}function V(e,i){return e===void 0&&(e="undefined"),e===null&&(e="null"),e===!1&&(e="false"),e.toString().toLowerCase().indexOf(i.trim())!==-1}function g(e,i,l,r){return i?e.filter(o=>V(r(o,l),i)).sort((o,n)=>r(o,l).length-r(n,l).length):e}function L(e){return e.filter(i=>!i.$isLabel)}function u(e,i){return l=>l.reduce((r,o)=>o[e]&&o[e].length?(r.push({$groupLabel:o[i],$isLabel:!0}),r.concat(o[e])):r,[])}function B(e,i,l,r,o){return n=>n.map(s=>{if(!s[l])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const a=g(s[l],e,i,o);return a.length?{[r]:s[r],[l]:a}:[]})}const b=(...e)=>i=>e.reduce((l,r)=>r(l),i);var O={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(e,i){return p(e)?"":i?e[i]:e}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1}},mounted(){!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])},computed:{internalValue(){return this.modelValue||this.modelValue===0?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const e=this.search||"",i=e.toLowerCase().trim();let l=this.options.concat();return this.internalSearch?l=this.groupValues?this.filterAndFlat(l,i,this.label):g(l,i,this.label,this.customLabel):l=this.groupValues?u(this.groupValues,this.groupLabel)(l):l,l=this.hideSelected?l.filter(w(this.isSelected)):l,this.taggable&&i.length&&!this.isExistingOption(i)&&(this.tagPosition==="bottom"?l.push({isTag:!0,label:e}):l.unshift({isTag:!0,label:e})),l.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(e=>e[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(i=>this.customLabel(i,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:this.internalValue.length===0?null:this.internalValue[0]},filterAndFlat(e,i,l){return b(B(i,l,this.groupValues,this.groupLabel,this.customLabel),u(this.groupValues,this.groupLabel))(e)},flatAndStrip(e){return b(u(this.groupValues,this.groupLabel),L)(e)},updateSearch(e){this.search=e},isExistingOption(e){return this.options?this.optionKeys.indexOf(e)>-1:!1},isSelected(e){const i=this.trackBy?e[this.trackBy]:e;return this.valueKeys.indexOf(i)>-1},isOptionDisabled(e){return!!e.$isDisabled},getOptionLabel(e){if(p(e))return"";if(e.isTag)return e.label;if(e.$isLabel)return e.$groupLabel;const i=this.customLabel(e,this.label);return p(i)?"":i},select(e,i){if(e.$isLabel&&this.groupSelect){this.selectGroup(e);return}if(!(this.blockKeys.indexOf(i)!==-1||this.disabled||e.$isDisabled||e.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(i==="Tab"&&!this.pointerDirty)){if(e.isTag)this.$emit("tag",e.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(e)){i!=="Tab"&&this.removeElement(e);return}this.$emit("select",e,this.id),this.multiple?this.$emit("update:modelValue",this.internalValue.concat([e])):this.$emit("update:modelValue",e),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(e){const i=this.options.find(l=>l[this.groupLabel]===e.$groupLabel);if(!!i){if(this.wholeGroupSelected(i)){this.$emit("remove",i[this.groupValues],this.id);const l=this.internalValue.filter(r=>i[this.groupValues].indexOf(r)===-1);this.$emit("update:modelValue",l)}else{const l=i[this.groupValues].filter(r=>!(this.isOptionDisabled(r)||this.isSelected(r)));this.$emit("select",l,this.id),this.$emit("update:modelValue",this.internalValue.concat(l))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(e){return e[this.groupValues].every(i=>this.isSelected(i)||this.isOptionDisabled(i))},wholeGroupDisabled(e){return e[this.groupValues].every(this.isOptionDisabled)},removeElement(e,i=!0){if(this.disabled||e.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const l=typeof e=="object"?this.valueKeys.indexOf(e[this.trackBy]):this.valueKeys.indexOf(e);if(this.$emit("remove",e,this.id),this.multiple){const r=this.internalValue.slice(0,l).concat(this.internalValue.slice(l+1));this.$emit("update:modelValue",r)}else this.$emit("update:modelValue",null);this.closeOnSelect&&i&&this.deactivate()},removeLastElement(){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)},activate(){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.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.$el.focus(),this.$emit("open",this.id))},deactivate(){!this.isOpen||(this.isOpen=!1,this.searchable?this.$refs.search&&this.$refs.search.blur():this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if(typeof window>"u")return;const e=this.$el.getBoundingClientRect().top,i=window.innerHeight-this.$el.getBoundingClientRect().bottom;i>this.maxHeight||i>e||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(i-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(e-40,this.maxHeight))}}},k={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(e,i){return{"multiselect__option--highlight":e===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(i)}},groupHighlight(e,i){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":i.$isLabel}];const l=this.options.find(r=>r[this.groupLabel]===i.$groupLabel);return l&&!this.wholeGroupDisabled(l)?["multiselect__option--group",{"multiselect__option--highlight":e===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(l)}]:"multiselect__option--disabled"},addPointerElement({key:e}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward(){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},pointerBackward(){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},pointerReset(){!this.closeOnSelect||(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){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()},pointerSet(e){this.pointer=e,this.pointerDirty=!0}}},y={name:"vue-multiselect",mixins:[O,k],props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:e=>`and ${e} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{isSingleLabelVisible(){return(this.singleValue||this.singleValue===0)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return this.openDirection==="above"||this.openDirection==="top"?!0:this.openDirection==="below"||this.openDirection==="bottom"?!1:this.preferredOpenDirection==="above"},showSearchInput(){return this.searchable&&(this.hasSingleSelectedSlot&&(this.visibleSingleValue||this.visibleSingleValue===0)?this.isOpen:!0)}}};const $={ref:"tags",class:"multiselect__tags"},C={class:"multiselect__tags-wrap"},N={class:"multiselect__spinner"},D={key:0},E={class:"multiselect__option"},M={class:"multiselect__option"},P=t.createTextVNode("No elements found. Consider changing the search query."),T={class:"multiselect__option"},_=t.createTextVNode("List is empty.");function K(e,i,l,r,o,n){return t.openBlock(),t.createBlock("div",{tabindex:e.searchable?-1:l.tabindex,class:[{"multiselect--active":e.isOpen,"multiselect--disabled":l.disabled,"multiselect--above":n.isAbove},"multiselect"],onFocus:i[14]||(i[14]=s=>e.activate()),onBlur:i[15]||(i[15]=s=>e.searchable?!1:e.deactivate()),onKeydown:[i[16]||(i[16]=t.withKeys(t.withModifiers(s=>e.pointerForward(),["self","prevent"]),["down"])),i[17]||(i[17]=t.withKeys(t.withModifiers(s=>e.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:i[18]||(i[18]=t.withKeys(t.withModifiers(s=>e.addPointerElement(s),["stop","self"]),["enter","tab"])),onKeyup:i[19]||(i[19]=t.withKeys(s=>e.deactivate(),["esc"])),role:"combobox","aria-owns":"listbox-"+e.id},[t.renderSlot(e.$slots,"caret",{toggle:e.toggle},()=>[t.createVNode("div",{onMousedown:i[1]||(i[1]=t.withModifiers(s=>e.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),t.renderSlot(e.$slots,"clear",{search:e.search}),t.createVNode("div",$,[t.renderSlot(e.$slots,"selection",{search:e.search,remove:e.removeElement,values:n.visibleValues,isOpen:e.isOpen},()=>[t.withDirectives(t.createVNode("div",C,[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(n.visibleValues,(s,a)=>t.renderSlot(e.$slots,"tag",{option:s,search:e.search,remove:e.removeElement},()=>[(t.openBlock(),t.createBlock("span",{class:"multiselect__tag",key:a},[t.createVNode("span",{textContent:t.toDisplayString(e.getOptionLabel(s))},null,8,["textContent"]),t.createVNode("i",{tabindex:"1",onKeypress:t.withKeys(t.withModifiers(c=>e.removeElement(s),["prevent"]),["enter"]),onMousedown:t.withModifiers(c=>e.removeElement(s),["prevent"]),class:"multiselect__tag-icon"},null,40,["onKeypress","onMousedown"])]))])),256))],512),[[t.vShow,n.visibleValues.length>0]]),e.internalValue&&e.internalValue.length>l.limit?t.renderSlot(e.$slots,"limit",{key:0},()=>[t.createVNode("strong",{class:"multiselect__strong",textContent:t.toDisplayString(l.limitText(e.internalValue.length-l.limit))},null,8,["textContent"])]):t.createCommentVNode("v-if",!0)]),t.createVNode(t.Transition,{name:"multiselect__loading"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"loading",{},()=>[t.withDirectives(t.createVNode("div",N,null,512),[[t.vShow,l.loading]])])]),_:3}),e.searchable?(t.openBlock(),t.createBlock("input",{key:0,ref:"search",name:l.name,id:e.id,type:"text",autocomplete:"off",spellcheck:"false",placeholder:e.placeholder,style:n.inputStyle,value:e.search,disabled:l.disabled,tabindex:l.tabindex,onInput:i[2]||(i[2]=s=>e.updateSearch(s.target.value)),onFocus:i[3]||(i[3]=t.withModifiers(s=>e.activate(),["prevent"])),onBlur:i[4]||(i[4]=t.withModifiers(s=>e.deactivate(),["prevent"])),onKeyup:i[5]||(i[5]=t.withKeys(s=>e.deactivate(),["esc"])),onKeydown:[i[6]||(i[6]=t.withKeys(t.withModifiers(s=>e.pointerForward(),["prevent"]),["down"])),i[7]||(i[7]=t.withKeys(t.withModifiers(s=>e.pointerBackward(),["prevent"]),["up"])),i[9]||(i[9]=t.withKeys(t.withModifiers(s=>e.removeLastElement(),["stop"]),["delete"]))],onKeypress:i[8]||(i[8]=t.withKeys(t.withModifiers(s=>e.addPointerElement(s),["prevent","stop","self"]),["enter"])),class:"multiselect__input","aria-controls":"listbox-"+e.id},null,44,["name","id","placeholder","value","disabled","tabindex","aria-controls"])):t.createCommentVNode("v-if",!0),n.isSingleLabelVisible?(t.openBlock(),t.createBlock("span",{key:1,class:"multiselect__single",onMousedown:i[10]||(i[10]=t.withModifiers((...s)=>e.toggle&&e.toggle(...s),["prevent"]))},[t.renderSlot(e.$slots,"singleLabel",{option:n.singleValue},()=>[t.createTextVNode(t.toDisplayString(e.currentOptionLabel),1)])],32)):t.createCommentVNode("v-if",!0),n.isPlaceholderVisible?(t.openBlock(),t.createBlock("span",{key:2,class:"multiselect__placeholder",onMousedown:i[11]||(i[11]=t.withModifiers((...s)=>e.toggle&&e.toggle(...s),["prevent"]))},[t.renderSlot(e.$slots,"placeholder",{},()=>[t.createTextVNode(t.toDisplayString(e.placeholder),1)])],32)):t.createCommentVNode("v-if",!0)],512),t.createVNode(t.Transition,{name:"multiselect"},{default:t.withCtx(()=>[t.withDirectives(t.createVNode("div",{class:"multiselect__content-wrapper",onFocus:i[12]||(i[12]=(...s)=>e.activate&&e.activate(...s)),tabindex:"-1",onMousedown:i[13]||(i[13]=t.withModifiers(()=>{},["prevent"])),style:{maxHeight:e.optimizedHeight+"px"},ref:"list"},[t.createVNode("ul",{class:"multiselect__content",style:n.contentStyle,role:"listbox",id:"listbox-"+e.id},[t.renderSlot(e.$slots,"beforeList"),e.multiple&&e.max===e.internalValue.length?(t.openBlock(),t.createBlock("li",D,[t.createVNode("span",E,[t.renderSlot(e.$slots,"maxElements",{},()=>[t.createTextVNode("Maximum of "+t.toDisplayString(e.max)+" options selected. First remove a selected option to select another.",1)])])])):t.createCommentVNode("v-if",!0),!e.max||e.internalValue.length<e.max?(t.openBlock(!0),t.createBlock(t.Fragment,{key:1},t.renderList(e.filteredOptions,(s,a)=>(t.openBlock(),t.createBlock("li",{class:"multiselect__element",key:a,id:e.id+"-"+a,role:s&&(s.$isLabel||s.$isDisabled)?null:"option"},[s&&(s.$isLabel||s.$isDisabled)?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createBlock("span",{key:0,class:[e.optionHighlight(a,s),"multiselect__option"],onClick:t.withModifiers(c=>e.select(s),["stop"]),onMouseenter:t.withModifiers(c=>e.pointerSet(a),["self"]),"data-select":s&&s.isTag?e.tagPlaceholder:n.selectLabelText,"data-selected":n.selectedLabelText,"data-deselect":n.deselectLabelText},[t.renderSlot(e.$slots,"option",{option:s,search:e.search,index:a},()=>[t.createVNode("span",null,t.toDisplayString(e.getOptionLabel(s)),1)])],42,["onClick","onMouseenter","data-select","data-selected","data-deselect"])),s&&(s.$isLabel||s.$isDisabled)?(t.openBlock(),t.createBlock("span",{key:1,"data-select":e.groupSelect&&n.selectGroupLabelText,"data-deselect":e.groupSelect&&n.deselectGroupLabelText,class:[e.groupHighlight(a,s),"multiselect__option"],onMouseenter:t.withModifiers(c=>e.groupSelect&&e.pointerSet(a),["self"]),onMousedown:t.withModifiers(c=>e.selectGroup(s),["prevent"])},[t.renderSlot(e.$slots,"option",{option:s,search:e.search,index:a},()=>[t.createVNode("span",null,t.toDisplayString(e.getOptionLabel(s)),1)])],42,["data-select","data-deselect","onMouseenter","onMousedown"])):t.createCommentVNode("v-if",!0)],8,["id","role"]))),128)):t.createCommentVNode("v-if",!0),t.withDirectives(t.createVNode("li",null,[t.createVNode("span",M,[t.renderSlot(e.$slots,"noResult",{search:e.search},()=>[P])])],512),[[t.vShow,l.showNoResults&&e.filteredOptions.length===0&&e.search&&!l.loading]]),t.withDirectives(t.createVNode("li",null,[t.createVNode("span",T,[t.renderSlot(e.$slots,"noOptions",{},()=>[_])])],512),[[t.vShow,l.showNoOptions&&e.options.length===0&&!e.search&&!l.loading]]),t.renderSlot(e.$slots,"afterList")],12,["id"])],36),[[t.vShow,e.isOpen]])]),_:3})],42,["tabindex","aria-owns"])}y.render=K;const f=(e,i)=>{const l=e.__vccOpts||e;for(const[r,o]of i)l[r]=o;return l},A={},F={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},H=[t.createElementVNode("g",{"clip-path":"url(#clip0_3229_23142)"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.20711 0.792893C1.81658 0.402369 1.18342 0.402369 0.792893 0.792893C0.402369 1.18342 0.402369 1.81658 0.792893 2.20711L4.58579 6L0.792893 9.79289C0.402369 10.1834 0.402369 10.8166 0.792893 11.2071C1.18342 11.5976 1.81658 11.5976 2.20711 11.2071L6 7.41421L9.79289 11.2071C10.1834 11.5976 10.8166 11.5976 11.2071 11.2071C11.5976 10.8166 11.5976 10.1834 11.2071 9.79289L7.41421 6L11.2071 2.20711C11.5976 1.81658 11.5976 1.18342 11.2071 0.792893C10.8166 0.402369 10.1834 0.402369 9.79289 0.792893L6 4.58579L2.20711 0.792893Z",fill:"#121826"})],-1),t.createElementVNode("defs",null,[t.createElementVNode("clipPath",{id:"clip0_3229_23142"},[t.createElementVNode("rect",{width:"12",height:"12",fill:"white"})])],-1)];function G(e,i){return t.openBlock(),t.createElementBlock("svg",F,H)}const q=f(A,[["render",G]]),x={props:{color:String}},R={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j=[t.createElementVNode("g",{"clip-path":"url(#clip0_2_10015)"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6051 0.703831C16.0448 1.03801 16.1303 1.66537 15.7962 2.10508L6.29616 14.6051C6.12143 14.835 5.85583 14.9781 5.56771 14.9977C5.27959 15.0173 4.99709 14.9113 4.79289 14.7071L0.292893 10.2071C-0.0976311 9.81658 -0.0976311 9.18341 0.292893 8.79289C0.683417 8.40236 1.31658 8.40236 1.70711 8.79289L5.39703 12.4828L14.2038 0.89491C14.538 0.455202 15.1654 0.369653 15.6051 0.703831Z"})],-1),t.createElementVNode("defs",null,[t.createElementVNode("clipPath",{id:"clip0_2_10015"},[t.createElementVNode("rect",{width:"16",height:"16",fill:"white"})])],-1)];function z(e,i,l,r,o,n){return t.openBlock(),t.createElementBlock("svg",R,j)}const I=f(x,[["render",z]]),he="",Z={inheritAttrs:!1,props:{limit:Number,scrollableContainerSelector:{type:[Boolean,String],default:!1},preferredOpenDirection:{type:String,validate(e){return["up","down"].includes(e)},default:"down"},offset:{type:Number,default:0},canClear:Boolean,mode:{required:!0,type:String,validate(e){return["single","multi"].includes(e)}},hideCheckmark:{type:Boolean,default:!1},hideCheckbox:{type:Boolean,default:!1},brand:{type:String,validate(e){return["sndq","struqta","nuvoni","immogeste"].includes(e)},default:"sndq"},caret:Boolean,internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(e,i){return isEmpty(e)?"":i?e[i]:e}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1}},emits:["remove","select","input","search-change","tag","open","close"],components:{Multiselect:y,Close12:q,Checkmark:I},computed:{listeners(){return{...this.$listeners,open:this.onOpen,close:this.onClose,remove:this.onRemove,select:this.onSelect}},caretStyle(){return{width:"16px",height:"16px",transform:this.preferredOpenDirection==="up"?"rotate(180deg)":""}},tagCount(){return!this.$refs.originalMultiselect||!this.$refs.originalMultiselect.internalValue?0:this.$refs.originalMultiselect.internalValue.length}},data(){return{scrollableContainer:null,target:null,isOpen:!1}},methods:{onRemove(e,i){this.$emit("remove",e,i),this.repositionDropDown()},onSelect(e,i){this.$emit("select",e,i),this.repositionDropDown()},onOpen(e){this.isOpen=!0,this.$emit("open",e),this.repositionDropDown()},onClose(e){this.$emit("close",e),this.isOpen=!1},repositionDropDown(){setTimeout(()=>{const e=this.$el.getBoundingClientRect(),i=this.$refs.originalMultiselect;if(!i)return;const l=i.$refs.list;let r=this.preferredOpenDirection;r==="down"&&e.bottom+this.offset<this.$attrs.dropdownMaxHeight&&(r="up"),l.style.width=`${this.$el.clientWidth}px`,l.style.position="fixed",l.style.left=`${e.left}px`,r==="down"?(l.style.top=`${e.bottom+this.offset}px`,l.style.bottom="auto"):(l.style.bottom=`calc(100vh - ${e.bottom}px + ${e.height+this.offset}px)`,l.style.top="auto")})},open(){const e=this.$refs.originalMultiselect;!e||(e.activate(),this.repositionDropDown())},close(){const e=this.$refs.originalMultiselect;!e||e.deactivate()},toggle(){this.isOpen?this.open():this.close()}},mounted(){this.scrollableContainer=this.scrollableContainerSelector&&document.querySelector(this.scrollableContainerSelector)||window,this.scrollableContainer.addEventListener("scroll",this.repositionDropDown,{passive:!0});const e=this.$refs.originalMultiselect;if(!e)return;const i=e.$refs.list;i.classList.add("briicks-select-body",this.brand);const l=i.parentNode;if(!l)return;const r=l.closest("body");!r||(this.target=r,l.removeChild(i),r.appendChild(i))},beforeUnmount(){const e=this.$refs.originalMultiselect;if(!e)return;const i=e.$refs.list;!this.target||this.target.removeChild(i)},unmounted(){!this.scrollableContainer||this.scrollableContainer.removeEventListener("scroll",this.repositionDropDown)}},U={class:"multiselect__custom-tag"},W={class:"multiselect-placeholder-el"},J={class:"multiselect-single-label"},Q={key:0,class:"checkbox"},X={class:"option-label"},Y={key:1,class:"selected-icon"},v={class:"tag-limit"},ee={class:"multiselect-caret"},te=["src"],ie=t.createElementVNode("div",null,null,-1);function le(e,i,l,r,o,n){const s=t.resolveComponent("Close12"),a=t.resolveComponent("Checkmark"),c=t.resolveComponent("multiselect");return t.openBlock(),t.createBlock(c,t.mergeProps({class:["briicks_selector",l.brand],ref:"originalMultiselect",multiple:l.mode==="multi"},t.toHandlers(n.listeners),{placeholder:l.placeholder,limit:l.limit,options:l.options,internalSearch:l.internalSearch,trackBy:l.trackBy,label:l.label,searchable:l.searchable,clearOnSelect:l.clearOnSelect,hideSelected:l.hideSelected,allowEmpty:l.allowEmpty,resetAfter:l.resetAfter,closeOnSelect:l.closeOnSelect,customLabel:l.customLabel,taggable:l.taggable,tagPlaceholder:l.tagPlaceholder,tagPosition:l.tagPosition,max:l.max,id:l.id,optionsLimit:l.optionsLimit,groupValues:l.groupValues,groupLabel:l.groupLabel,groupSelect:l.groupSelect,blockKeys:l.blockKeys,preserveSearch:l.preserveSearch,preselectFirst:l.preselectFirst}),t.createSlots({tag:t.withCtx(({option:h,remove:S})=>[t.createElementVNode("div",U,[t.createElementVNode("span",null,t.toDisplayString(h.label),1),t.createVNode(s,{onClick:m=>S(h)},null,8,["onClick"])])]),placeholder:t.withCtx(()=>[t.createElementVNode("div",W,t.toDisplayString(l.placeholder),1)]),singleLabel:t.withCtx(({option:h})=>[t.createElementVNode("div",J,t.toDisplayString((h?h.label:"")||""),1)]),option:t.withCtx(({option:h})=>[l.mode==="multi"&&!l.hideCheckbox?(t.openBlock(),t.createElementBlock("div",Q)):t.createCommentVNode("",!0),t.createElementVNode("span",X,t.toDisplayString(h.label),1),l.mode==="single"&&!l.hideCheckmark?(t.openBlock(),t.createElementBlock("span",Y,[t.createVNode(a)])):t.createCommentVNode("",!0)]),limit:t.withCtx(()=>[t.createElementVNode("div",v,"+"+t.toDisplayString(n.tagCount-l.limit),1)]),noOptions:t.withCtx(()=>[ie]),clear:t.withCtx(()=>[t.renderSlot(e.$slots,"prefix")]),_:2},[l.caret?{name:"caret",fn:t.withCtx(()=>[t.createElementVNode("div",ee,[t.createElementVNode("img",{style:t.normalizeStyle(n.caretStyle),src:require("./arrow-down-16.svg")},null,12,te)])]),key:"0"}:void 0,t.renderList(Object.keys(e.$slots),(h,S)=>({name:h,fn:t.withCtx(m=>[m?t.renderSlot(e.$slots,h,t.normalizeProps(t.mergeProps({key:0},m))):t.renderSlot(e.$slots,e.name,{key:1})])}))]),1040,["class","multiple","placeholder","limit","options","internalSearch","trackBy","label","searchable","clearOnSelect","hideSelected","allowEmpty","resetAfter","closeOnSelect","customLabel","taggable","tagPlaceholder","tagPosition","max","id","optionsLimit","groupValues","groupLabel","groupSelect","blockKeys","preserveSearch","preselectFirst"])}const se=f(Z,[["render",le]]);d.BriicksSelector=se,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); |
{ | ||
"name": "briicks-selector", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "files": [ |
95143
1318