@night-owl-elite/vue-select 1.3.32 → 1.3.34
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/vue-select.css +1 -1
- package/dist/vue-select.es.js +352 -318
- package/dist/vue-select.umd.js +1 -1
- package/package.json +1 -1
package/dist/vue-select.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes spin-89f9b7e1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.svg-icon-spin[data-v-89f9b7e1]{animation:spin-89f9b7e1 1s linear infinite}.list-group-item[data-v-b319a2c7]{cursor:pointer;border:0;border-radius:0;padding-top:.5rem;padding-bottom:.5rem}.list-group-item.is-disabled[data-v-b319a2c7]{cursor:not-allowed;opacity:.65}.expander-icon[data-v-b319a2c7]{width:1rem;height:1rem;flex-shrink:0;transition:transform .2s ease-in-out;color:#6c757d}.expander-placeholder[data-v-b319a2c7]{display:inline-block;width:1rem;flex-shrink:0}.rotate-90[data-v-b319a2c7]{transform:rotate(90deg)}.item-content[data-v-b319a2c7]{flex-grow:1}.tree-select-main[data-v-
|
|
1
|
+
@keyframes spin-89f9b7e1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.svg-icon-spin[data-v-89f9b7e1]{animation:spin-89f9b7e1 1s linear infinite}.list-group-item[data-v-b319a2c7]{cursor:pointer;border:0;border-radius:0;padding-top:.5rem;padding-bottom:.5rem}.list-group-item.is-disabled[data-v-b319a2c7]{cursor:not-allowed;opacity:.65}.expander-icon[data-v-b319a2c7]{width:1rem;height:1rem;flex-shrink:0;transition:transform .2s ease-in-out;color:#6c757d}.expander-placeholder[data-v-b319a2c7]{display:inline-block;width:1rem;flex-shrink:0}.rotate-90[data-v-b319a2c7]{transform:rotate(90deg)}.item-content[data-v-b319a2c7]{flex-grow:1}.tree-select-main[data-v-9c230074]{--bs-form-select-bg-img: none;display:block;width:100%;font-weight:400;line-height:1.5;color:var(--bs-body-color);appearance:none;background-color:var(--bs-body-bg);border:var(--bs-border-width) solid var(--bs-border-color);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;text-align:left}.tree-select-display-container[data-v-9c230074]{flex:1;overflow:hidden}.transition-transform[data-v-9c230074]{transition:transform .2s ease-in-out}.rotate-180[data-v-9c230074]{transform:rotate(180deg)}.tree-select-dropdown[data-v-9c230074]{position:absolute;background:#fff;border:1px solid rgba(0,0,0,.15);border-radius:.375rem}.is-loading[data-v-9c230074]{cursor:wait}.loading-icon[data-v-9c230074]{animation:spin-9c230074 1s linear infinite}.clear-icon[data-v-9c230074]{cursor:pointer;opacity:.6;transition:opacity .2s ease}.clear-icon[data-v-9c230074]:hover{opacity:1}.tooltip-trigger-icon[data-v-9c230074]{cursor:pointer;opacity:.6;transition:opacity .2s ease;width:1em;height:1em}.tooltip-trigger-icon[data-v-9c230074]:hover{opacity:1}@keyframes spin-9c230074{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.btn-xl[data-v-9c230074]{padding:.75rem 1.5rem;font-size:1.25rem;border-radius:var(--bs-border-radius-lg)}.form-control-xl[data-v-9c230074]{min-height:calc(1.5em + 1.5rem + (var(--bs-border-width) * 2));padding:.75rem 1.5rem;font-size:1.25rem;border-radius:var(--bs-border-radius-lg)}.tree-select-body[data-v-9c230074]::-webkit-scrollbar{width:6px}.tree-select-body[data-v-9c230074]::-webkit-scrollbar-track{background:#f1f1f1;border-radius:3px}.tree-select-body[data-v-9c230074]::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:3px}.tree-select-body[data-v-9c230074]::-webkit-scrollbar-thumb:hover{background:#a8a8a8}.tree-select-main.disabled .more-button[data-v-9c230074]{pointer-events:auto;cursor:pointer}.tree-select-main.has-chips[data-v-9c230074]{height:auto;min-height:calc(1.5em + .5rem + calc(var(--bs-border-width) * 2))}.tree-select-main.has-chips.btn-lg[data-v-9c230074]{min-height:calc(1.5em + 1rem + calc(var(--bs-border-width) * 2))}.tree-select-main.has-chips.btn-xl[data-v-9c230074]{min-height:calc(1.5em + 1.5rem + calc(var(--bs-border-width) * 2))}.chips-container[data-v-9c230074]{display:flex;flex-wrap:wrap;gap:.25rem;max-height:8rem;overflow-y:auto}.chip[data-v-9c230074]{display:inline-flex;align-items:center;padding:.2em .6em}.chip-remove[data-v-9c230074]{width:.8em;height:.8em;margin-left:.4em;cursor:pointer;opacity:.7;transition:opacity .2s}.chip-remove[data-v-9c230074]:hover{opacity:1}.more-button[data-v-9c230074]{font-size:.75em;line-height:1;padding:.3em .5em}.more-popover[data-v-9c230074]{width:250px;max-width:80vw;max-height:200px;overflow-y:auto;font-size:.9rem}.tree-select-tooltip[data-v-9c230074]{background-color:var(--bs-body-bg);border:var(--bs-border-width) solid var(--bs-border-color);font-size:.875rem;max-width:400px;word-wrap:break-word;pointer-events:none}@media (max-width: 576px){.tree-select-dropdown[data-v-9c230074]{max-width:90vw;left:0!important;right:0!important;margin:0 auto}}
|
package/dist/vue-select.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { createPopper as
|
|
3
|
-
const
|
|
1
|
+
import { computed as k, createElementBlock as i, openBlock as o, normalizeClass as B, createCommentVNode as f, createElementVNode as h, resolveComponent as je, normalizeStyle as Ze, createBlock as z, withModifiers as C, renderSlot as re, Fragment as Y, renderList as _, withCtx as Ne, ref as y, watch as Be, onMounted as We, onUnmounted as Ue, withDirectives as he, withKeys as pe, toDisplayString as S, createTextVNode as X, createVNode as ie, vModelText as Ge, vModelSelect as Je, vShow as Qe, nextTick as R } from "vue";
|
|
2
|
+
import { createPopper as ye } from "@popperjs/core";
|
|
3
|
+
const ge = (t, P) => {
|
|
4
4
|
const l = t.__vccOpts || t;
|
|
5
|
-
for (const [
|
|
6
|
-
l[
|
|
5
|
+
for (const [v, u] of P)
|
|
6
|
+
l[v] = u;
|
|
7
7
|
return l;
|
|
8
|
-
},
|
|
8
|
+
}, Xe = { key: 0 }, Ye = { key: 1 }, _e = { key: 2 }, et = { key: 3 }, tt = { key: 4 }, lt = { key: 5 }, nt = { key: 6 }, st = { key: 7 }, at = {
|
|
9
9
|
__name: "SvgIcon",
|
|
10
10
|
props: {
|
|
11
11
|
name: {
|
|
@@ -14,56 +14,56 @@ const pe = (t, D) => {
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
setup(t) {
|
|
17
|
-
const
|
|
18
|
-
"svg-icon-spin":
|
|
17
|
+
const P = t, l = k(() => ({
|
|
18
|
+
"svg-icon-spin": P.name === "spinner"
|
|
19
19
|
}));
|
|
20
|
-
return (
|
|
20
|
+
return (v, u) => (o(), i("svg", {
|
|
21
21
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22
22
|
viewBox: "0 0 24 24",
|
|
23
23
|
fill: "currentColor",
|
|
24
24
|
width: "1em",
|
|
25
25
|
height: "1em",
|
|
26
|
-
class:
|
|
26
|
+
class: B(l.value)
|
|
27
27
|
}, [
|
|
28
|
-
t.name === "spinner" ? (
|
|
28
|
+
t.name === "spinner" ? (o(), i("g", Xe, u[0] || (u[0] = [
|
|
29
29
|
h("path", { d: "M12,4V2A10,10,0,0,0,2,12H4A8,8,0,0,1,12,4Z" }, null, -1)
|
|
30
|
-
]))) :
|
|
31
|
-
t.name === "times" ? (
|
|
30
|
+
]))) : f("", !0),
|
|
31
|
+
t.name === "times" ? (o(), i("g", Ye, u[1] || (u[1] = [
|
|
32
32
|
h("path", { d: "M13.41,12l4.3-4.29a1,1,0,1,0-1.42-1.42L12,10.59,7.71,6.29A1,1,0,0,0,6.29,7.71L10.59,12l-4.3,4.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L12,13.41l4.29,4.3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42Z" }, null, -1)
|
|
33
|
-
]))) :
|
|
34
|
-
t.name === "chevron-down" ? (
|
|
33
|
+
]))) : f("", !0),
|
|
34
|
+
t.name === "chevron-down" ? (o(), i("g", _e, u[2] || (u[2] = [
|
|
35
35
|
h("path", { d: "M17,9.17a1,1,0,0,0-1.41,0L12,12.71,8.46,9.17a1,1,0,0,0-1.41,0,1,1,0,0,0,0,1.42l4.24,4.24a1,1,0,0,0,1.42,0L17,10.59A1,1,0,0,0,17,9.17Z" }, null, -1)
|
|
36
|
-
]))) :
|
|
37
|
-
t.name === "chevron-right" ? (
|
|
36
|
+
]))) : f("", !0),
|
|
37
|
+
t.name === "chevron-right" ? (o(), i("g", et, u[3] || (u[3] = [
|
|
38
38
|
h("path", { d: "M10.83,12l-4.24,4.24a1,1,0,0,0,1.41,1.41L13.66,12,8,6.34A1,1,0,0,0,6.59,7.76Z" }, null, -1)
|
|
39
|
-
]))) :
|
|
40
|
-
t.name === "search" ? (
|
|
39
|
+
]))) : f("", !0),
|
|
40
|
+
t.name === "search" ? (o(), i("g", tt, u[4] || (u[4] = [
|
|
41
41
|
h("path", { d: "M21.71,20.29,18,16.61A9,9,0,1,0,16.61,18l3.68,3.68a1,1,0,0,0,1.42,0A1,1,0,0,0,21.71,20.29ZM11,18a7,7,0,1,1,7-7A7,7,0,0,1,11,18Z" }, null, -1)
|
|
42
|
-
]))) :
|
|
43
|
-
t.name === "asc" ? (
|
|
42
|
+
]))) : f("", !0),
|
|
43
|
+
t.name === "asc" ? (o(), i("g", lt, u[5] || (u[5] = [
|
|
44
44
|
h("path", {
|
|
45
45
|
fill: "currentColor",
|
|
46
46
|
d: "M4.869 11H2.667L6 3h2l3.333 8H9.131l-.41-1H5.28zm1.23-3h1.803L7 5.8zm12.9 8V3h-2v13h-3l4 5l4-5zm-8-3H3v2h4.855L3 19v2h8v-2H6.146L11 15z"
|
|
47
47
|
}, null, -1)
|
|
48
|
-
]))) :
|
|
49
|
-
t.name === "desc" ? (
|
|
48
|
+
]))) : f("", !0),
|
|
49
|
+
t.name === "desc" ? (o(), i("g", nt, u[6] || (u[6] = [
|
|
50
50
|
h("path", {
|
|
51
51
|
fill: "currentColor",
|
|
52
52
|
d: "M4.869 11H2.667L6 3h2l3.333 8H9.131l-.41-1H5.28zm1.23-3h1.803L7 5.8zm15.9 0l-4-5l-4 5h3v13h2V8zm-11 5H3v2h4.855L3 19v2h8v-2H6.146L11 15z"
|
|
53
53
|
}, null, -1)
|
|
54
|
-
]))) :
|
|
55
|
-
t.name === "info-circle" ? (
|
|
54
|
+
]))) : f("", !0),
|
|
55
|
+
t.name === "info-circle" ? (o(), i("g", st, u[7] || (u[7] = [
|
|
56
56
|
h("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" }, null, -1)
|
|
57
|
-
]))) :
|
|
57
|
+
]))) : f("", !0)
|
|
58
58
|
], 2));
|
|
59
59
|
}
|
|
60
|
-
}, A = /* @__PURE__ */
|
|
60
|
+
}, A = /* @__PURE__ */ ge(at, [["__scopeId", "data-v-89f9b7e1"]]), ot = { class: "tree-select-item-wrapper" }, it = {
|
|
61
61
|
key: 1,
|
|
62
62
|
class: "expander-placeholder"
|
|
63
|
-
},
|
|
63
|
+
}, rt = ["checked", ".indeterminate", "disabled"], dt = { class: "item-content" }, ut = {
|
|
64
64
|
key: 0,
|
|
65
65
|
class: "children-wrapper"
|
|
66
|
-
},
|
|
66
|
+
}, ct = {
|
|
67
67
|
__name: "TreeSelectItem",
|
|
68
68
|
props: {
|
|
69
69
|
item: { type: Object, required: !0 },
|
|
@@ -79,50 +79,50 @@ const pe = (t, D) => {
|
|
|
79
79
|
disableBranchNode: { type: Boolean, default: !1 }
|
|
80
80
|
},
|
|
81
81
|
emits: ["select", "toggle-expand"],
|
|
82
|
-
setup(t, { emit:
|
|
83
|
-
const l = t,
|
|
82
|
+
setup(t, { emit: P }) {
|
|
83
|
+
const l = t, v = (m) => m[l.optionValue] || m.id || m.value, u = (m) => !l.disabledKey || !m ? !1 : m.hasOwnProperty(l.disabledKey) && m[l.disabledKey] !== null, V = k(() => l.item.children && l.item.children.length > 0), N = k(() => l.expandedItems.has(v(l.item))), g = k(() => l.selectedItems.includes(v(l.item))), $ = (m) => {
|
|
84
84
|
let p = [];
|
|
85
|
-
return
|
|
86
|
-
p.push(
|
|
85
|
+
return m.children && m.children.forEach((M) => {
|
|
86
|
+
p.push(v(M)), p.push(...$(M));
|
|
87
87
|
}), p;
|
|
88
|
-
},
|
|
89
|
-
return (
|
|
90
|
-
const M =
|
|
91
|
-
return
|
|
88
|
+
}, K = k(() => !l.multiple || !l.selectAll || !V.value || g.value ? !1 : $(l.item).some((p) => l.selectedItems.includes(p)));
|
|
89
|
+
return (m, p) => {
|
|
90
|
+
const M = je("TreeSelectItem", !0);
|
|
91
|
+
return o(), i("div", ot, [
|
|
92
92
|
h("div", {
|
|
93
|
-
class:
|
|
94
|
-
"bg-primary text-white": g.value && (t.selectMode === "highlight" || !t.multiple) && !
|
|
95
|
-
"is-disabled text-muted bg-light":
|
|
93
|
+
class: B(["list-group-item list-group-item-action d-flex align-items-center gap-2", {
|
|
94
|
+
"bg-primary text-white": g.value && (t.selectMode === "highlight" || !t.multiple) && !u(t.item) && !(t.disableBranchNode && V.value),
|
|
95
|
+
"is-disabled text-muted bg-light": u(t.item)
|
|
96
96
|
}]),
|
|
97
|
-
style:
|
|
98
|
-
onClick: p[2] || (p[2] = (
|
|
97
|
+
style: Ze({ "padding-left": `${t.level * 1.5 + 1}rem` }),
|
|
98
|
+
onClick: p[2] || (p[2] = (x) => u(t.item) ? null : m.$emit("select", t.item))
|
|
99
99
|
}, [
|
|
100
|
-
|
|
100
|
+
V.value ? (o(), z(A, {
|
|
101
101
|
key: 0,
|
|
102
102
|
name: "chevron-right",
|
|
103
|
-
class:
|
|
104
|
-
onClick: p[0] || (p[0] =
|
|
105
|
-
}, null, 8, ["class"])) : (
|
|
106
|
-
t.multiple && t.selectMode === "checkbox" && !(t.disableBranchNode &&
|
|
103
|
+
class: B(["expander-icon", { "rotate-90": N.value }]),
|
|
104
|
+
onClick: p[0] || (p[0] = C((x) => m.$emit("toggle-expand", v(t.item)), ["stop"]))
|
|
105
|
+
}, null, 8, ["class"])) : (o(), i("span", it)),
|
|
106
|
+
t.multiple && t.selectMode === "checkbox" && !(t.disableBranchNode && V.value) ? (o(), i("input", {
|
|
107
107
|
key: 2,
|
|
108
108
|
type: "checkbox",
|
|
109
109
|
class: "form-check-input",
|
|
110
110
|
checked: g.value,
|
|
111
|
-
".indeterminate":
|
|
112
|
-
disabled:
|
|
113
|
-
onClick: p[1] || (p[1] =
|
|
114
|
-
}, null, 40,
|
|
115
|
-
h("div",
|
|
116
|
-
|
|
111
|
+
".indeterminate": K.value,
|
|
112
|
+
disabled: u(t.item),
|
|
113
|
+
onClick: p[1] || (p[1] = C((x) => m.$emit("select", t.item), ["stop"]))
|
|
114
|
+
}, null, 40, rt)) : f("", !0),
|
|
115
|
+
h("div", dt, [
|
|
116
|
+
re(m.$slots, "default", {
|
|
117
117
|
item: t.item,
|
|
118
118
|
level: t.level
|
|
119
119
|
}, void 0, !0)
|
|
120
120
|
])
|
|
121
121
|
], 6),
|
|
122
|
-
|
|
123
|
-
(
|
|
124
|
-
key:
|
|
125
|
-
item:
|
|
122
|
+
V.value && N.value ? (o(), i("div", ut, [
|
|
123
|
+
(o(!0), i(Y, null, _(t.item.children, (x) => (o(), z(M, {
|
|
124
|
+
key: v(x),
|
|
125
|
+
item: x,
|
|
126
126
|
level: t.level + 1,
|
|
127
127
|
"selected-items": t.selectedItems,
|
|
128
128
|
"expanded-items": t.expandedItems,
|
|
@@ -133,50 +133,50 @@ const pe = (t, D) => {
|
|
|
133
133
|
"option-value": t.optionValue,
|
|
134
134
|
"disabled-key": t.disabledKey,
|
|
135
135
|
"disable-branch-node": t.disableBranchNode,
|
|
136
|
-
onSelect: p[3] || (p[3] = (I) =>
|
|
137
|
-
onToggleExpand: p[4] || (p[4] = (I) =>
|
|
136
|
+
onSelect: p[3] || (p[3] = (I) => m.$emit("select", I)),
|
|
137
|
+
onToggleExpand: p[4] || (p[4] = (I) => m.$emit("toggle-expand", I))
|
|
138
138
|
}, {
|
|
139
|
-
default:
|
|
140
|
-
|
|
139
|
+
default: Ne(({ item: I, level: ee }) => [
|
|
140
|
+
re(m.$slots, "default", {
|
|
141
141
|
item: I,
|
|
142
|
-
level:
|
|
142
|
+
level: ee
|
|
143
143
|
}, void 0, !0)
|
|
144
144
|
]),
|
|
145
145
|
_: 2
|
|
146
146
|
}, 1032, ["item", "level", "selected-items", "expanded-items", "multiple", "select-all", "select-mode", "option-label", "option-value", "disabled-key", "disable-branch-node"]))), 128))
|
|
147
|
-
])) :
|
|
147
|
+
])) : f("", !0)
|
|
148
148
|
]);
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
|
-
},
|
|
151
|
+
}, ft = /* @__PURE__ */ ge(ct, [["__scopeId", "data-v-b319a2c7"]]), mt = ["onKeydown"], vt = { class: "tree-select-display-container" }, ht = {
|
|
152
152
|
key: 0,
|
|
153
153
|
class: "d-flex align-items-center justify-content-start w-100"
|
|
154
|
-
},
|
|
154
|
+
}, pt = ["title"], yt = { key: 1 }, gt = {
|
|
155
155
|
key: 0,
|
|
156
156
|
class: "text-muted"
|
|
157
|
-
},
|
|
157
|
+
}, bt = {
|
|
158
158
|
key: 1,
|
|
159
159
|
class: "chips-container"
|
|
160
|
-
},
|
|
160
|
+
}, kt = { class: "d-flex align-items-center gap-2" }, wt = { class: "list-group list-group-flush" }, xt = { class: "text-wrap text-start me-2" }, St = { class: "p-2 border-bottom d-flex flex-column gap-2" }, Ct = ["onKeydown"], Vt = {
|
|
161
161
|
key: 1,
|
|
162
162
|
class: "d-flex align-items-center gap-2"
|
|
163
|
-
},
|
|
163
|
+
}, Lt = ["value"], It = ["disabled"], At = {
|
|
164
164
|
key: 0,
|
|
165
165
|
class: "p-4 text-muted text-center"
|
|
166
|
-
},
|
|
166
|
+
}, $t = {
|
|
167
167
|
key: 1,
|
|
168
168
|
class: "tree-select-body",
|
|
169
169
|
style: { "max-height": "300px", "overflow-y": "auto" }
|
|
170
|
-
},
|
|
170
|
+
}, Mt = {
|
|
171
171
|
key: 0,
|
|
172
172
|
class: "list-group list-group-flush"
|
|
173
|
-
},
|
|
173
|
+
}, Bt = {
|
|
174
174
|
class: "d-flex align-items-center gap-2",
|
|
175
175
|
style: { "white-space": "wrap" }
|
|
176
|
-
},
|
|
176
|
+
}, Nt = {
|
|
177
177
|
key: 1,
|
|
178
178
|
class: "p-3 text-muted text-center"
|
|
179
|
-
},
|
|
179
|
+
}, Tt = { key: 0 }, zt = { key: 0 }, Kt = { key: 1 }, Et = { key: 0 }, Dt = { key: 1 }, Pt = {
|
|
180
180
|
__name: "TreeSelectMain",
|
|
181
181
|
props: {
|
|
182
182
|
modelValue: {
|
|
@@ -300,170 +300,196 @@ const pe = (t, D) => {
|
|
|
300
300
|
addNewLabel: {
|
|
301
301
|
type: String,
|
|
302
302
|
default: "Add new record"
|
|
303
|
+
},
|
|
304
|
+
keyFilters: {
|
|
305
|
+
type: Array,
|
|
306
|
+
default: () => []
|
|
307
|
+
// e.g., ['name', 'details.email']
|
|
303
308
|
}
|
|
304
309
|
},
|
|
305
310
|
emits: ["update:modelValue", "change", "clear", "deselect", "select", "focus", "blur", "add-new"],
|
|
306
|
-
setup(t, { emit:
|
|
307
|
-
const l = t,
|
|
308
|
-
const s =
|
|
311
|
+
setup(t, { emit: P }) {
|
|
312
|
+
const l = t, v = P, u = y(null), V = y(null), N = y(null), g = y(""), $ = y(!1), K = y(/* @__PURE__ */ new Set()), m = y(null), p = y(null), M = y(null), x = y(!1), I = y(null), ee = y(null), F = y(!1), E = y(l.defaultSortKey), q = y(l.defaultSortDirection), H = y(null), te = y(null), j = y(!1), le = y(null), be = k(() => l.size === "sm" ? "btn-sm" : l.size === "lg" ? "btn-lg" : l.size === "xl" ? "btn-xl" : ""), ke = k(() => l.size === "sm" ? "form-control-sm" : l.size === "lg" ? "form-control-lg" : l.size === "xl" ? "form-control-xl" : ""), Te = k(() => se.value === 0 ? [] : ne.value.slice(l.maxVisibleChipsDisplay)), Z = k(() => !l.multiple || !l.excludeFromSelectedListKey ? T.value : T.value.filter((e) => {
|
|
313
|
+
const s = U(e);
|
|
309
314
|
return !s || !s[l.excludeFromSelectedListKey];
|
|
310
|
-
})),
|
|
311
|
-
const e =
|
|
315
|
+
})), we = k(() => {
|
|
316
|
+
const e = Z.value;
|
|
312
317
|
if (e.length === 0) return l.placeholder;
|
|
313
318
|
if (l.multiple) {
|
|
314
319
|
if (e.length === 1) {
|
|
315
|
-
const n =
|
|
320
|
+
const n = G(e[0]);
|
|
316
321
|
return n ? n.join(" → ") : e[0];
|
|
317
322
|
}
|
|
318
323
|
return `${e.length} items selected`;
|
|
319
324
|
}
|
|
320
|
-
const s =
|
|
325
|
+
const s = G(e[0]);
|
|
321
326
|
return s ? s.join(" → ") : e[0];
|
|
322
|
-
}),
|
|
327
|
+
}), xe = async () => {
|
|
328
|
+
await R();
|
|
329
|
+
const e = ee.value;
|
|
330
|
+
if (l.multiple || l.displayMode === "chips" || Z.value.length === 0 || !e) {
|
|
331
|
+
F.value = !1;
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
F.value = e.scrollWidth > e.clientWidth;
|
|
335
|
+
}, O = (e) => e && (e[l.optionLabel] || e.label || e.name) || "", b = (e) => e ? e[l.optionValue] || e.id || e.value : null, de = (e) => !l.disabledKey || !e ? !1 : e.hasOwnProperty(l.disabledKey) && e[l.disabledKey] !== null, L = (e) => e.children && e.children.length > 0, W = (e, s) => {
|
|
323
336
|
if (s)
|
|
324
|
-
return s.split(".").reduce((n,
|
|
325
|
-
},
|
|
337
|
+
return s.split(".").reduce((n, a) => n && n[a], e);
|
|
338
|
+
}, U = (e, s = l.items) => {
|
|
326
339
|
for (const n of s) {
|
|
327
|
-
if (
|
|
328
|
-
if (
|
|
329
|
-
const
|
|
330
|
-
if (
|
|
340
|
+
if (b(n) === e) return n;
|
|
341
|
+
if (L(n)) {
|
|
342
|
+
const a = U(e, n.children);
|
|
343
|
+
if (a) return a;
|
|
331
344
|
}
|
|
332
345
|
}
|
|
333
346
|
return null;
|
|
334
347
|
}, ue = (e) => {
|
|
335
348
|
const s = [];
|
|
336
|
-
return
|
|
337
|
-
de(n) || (s.push(
|
|
349
|
+
return L(e) && e.children.forEach((n) => {
|
|
350
|
+
de(n) || (s.push(b(n)), s.push(...ue(n)));
|
|
338
351
|
}), s;
|
|
339
352
|
}, ce = (e, s = l.items, n = []) => {
|
|
340
|
-
for (const
|
|
341
|
-
if (
|
|
342
|
-
if (
|
|
343
|
-
const r = ce(e,
|
|
353
|
+
for (const a of s) {
|
|
354
|
+
if (b(a) === e) return n;
|
|
355
|
+
if (L(a)) {
|
|
356
|
+
const r = ce(e, a.children, [...n, b(a)]);
|
|
344
357
|
if (r) return r;
|
|
345
358
|
}
|
|
346
359
|
}
|
|
347
360
|
return null;
|
|
348
|
-
}, T =
|
|
361
|
+
}, T = k(() => {
|
|
349
362
|
const e = new Set(Array.isArray(l.modelValue) ? l.modelValue : [l.modelValue].filter(Boolean));
|
|
350
363
|
if (l.multiple && l.selectAll) {
|
|
351
364
|
const s = (n) => {
|
|
352
|
-
n.forEach((
|
|
353
|
-
if (
|
|
354
|
-
const r =
|
|
355
|
-
r.length > 0 && r.every((
|
|
365
|
+
n.forEach((a) => {
|
|
366
|
+
if (L(a)) {
|
|
367
|
+
const r = a.children.filter((c) => !de(c));
|
|
368
|
+
r.length > 0 && r.every((c) => e.has(b(c))) && e.add(b(a)), s(a.children);
|
|
356
369
|
}
|
|
357
370
|
});
|
|
358
371
|
};
|
|
359
372
|
s(l.items);
|
|
360
373
|
}
|
|
361
374
|
return Array.from(e);
|
|
362
|
-
}),
|
|
363
|
-
for (const
|
|
364
|
-
const r = [...n, O(
|
|
365
|
-
if (
|
|
366
|
-
if (
|
|
367
|
-
const
|
|
368
|
-
if (
|
|
375
|
+
}), G = (e, s = l.items, n = []) => {
|
|
376
|
+
for (const a of s) {
|
|
377
|
+
const r = [...n, O(a)];
|
|
378
|
+
if (b(a) === e) return r;
|
|
379
|
+
if (L(a)) {
|
|
380
|
+
const d = G(e, a.children, r);
|
|
381
|
+
if (d) return d;
|
|
369
382
|
}
|
|
370
383
|
}
|
|
371
384
|
return null;
|
|
372
|
-
},
|
|
385
|
+
}, Se = (e) => {
|
|
373
386
|
if (!e || e.length === 0) return "";
|
|
374
387
|
const s = e.join(" → ");
|
|
375
388
|
return s.length <= 40 ? s : e.length > 2 ? `${e[0]} → ... → ${e[e.length - 1]}` : s;
|
|
376
|
-
},
|
|
377
|
-
const e =
|
|
389
|
+
}, fe = k(() => {
|
|
390
|
+
const e = Z.value;
|
|
378
391
|
if (e.length === 0) return l.placeholder;
|
|
379
392
|
if (l.multiple) {
|
|
380
393
|
if (e.length === 1) {
|
|
381
|
-
const n =
|
|
382
|
-
return n ?
|
|
394
|
+
const n = G(e[0]);
|
|
395
|
+
return n ? Se(n) : e[0];
|
|
383
396
|
}
|
|
384
397
|
return `${e.length} items selected`;
|
|
385
398
|
}
|
|
386
|
-
const s =
|
|
387
|
-
return s ?
|
|
388
|
-
}),
|
|
389
|
-
if (!l.multiple ||
|
|
390
|
-
const e =
|
|
391
|
-
if (!l.sortable || !
|
|
399
|
+
const s = G(e[0]);
|
|
400
|
+
return s ? Se(s) : e[0];
|
|
401
|
+
}), ne = k(() => {
|
|
402
|
+
if (!l.multiple || Z.value.length === 0) return [];
|
|
403
|
+
const e = Z.value.map((a) => U(a)).filter(Boolean);
|
|
404
|
+
if (!l.sortable || !E.value)
|
|
392
405
|
return e;
|
|
393
|
-
const s =
|
|
394
|
-
return [...e].sort((
|
|
395
|
-
const
|
|
396
|
-
if (
|
|
397
|
-
if (
|
|
398
|
-
let
|
|
399
|
-
return typeof
|
|
406
|
+
const s = E.value, n = q.value;
|
|
407
|
+
return [...e].sort((a, r) => {
|
|
408
|
+
const d = W(a, s), c = W(r, s);
|
|
409
|
+
if (d == null) return 1;
|
|
410
|
+
if (c == null) return -1;
|
|
411
|
+
let w = 0;
|
|
412
|
+
return typeof d == "string" && typeof c == "string" ? w = d.localeCompare(c) : d > c ? w = 1 : d < c && (w = -1), n === "desc" ? w * -1 : w;
|
|
400
413
|
});
|
|
401
|
-
}),
|
|
402
|
-
const e =
|
|
414
|
+
}), Ce = k(() => ne.value.slice(0, l.maxVisibleChipsDisplay)), se = k(() => {
|
|
415
|
+
const e = ne.value.length - l.maxVisibleChipsDisplay;
|
|
403
416
|
return e > 0 ? e : 0;
|
|
404
|
-
}),
|
|
405
|
-
const
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
417
|
+
}), Ve = (e, s) => {
|
|
418
|
+
const n = s.toLowerCase();
|
|
419
|
+
return e.map((a) => {
|
|
420
|
+
let r = !1;
|
|
421
|
+
if (l.keyFilters && l.keyFilters.length > 0)
|
|
422
|
+
for (const c of l.keyFilters) {
|
|
423
|
+
const w = W(a, c);
|
|
424
|
+
if (w != null && String(w).toLowerCase().includes(n)) {
|
|
425
|
+
r = !0;
|
|
426
|
+
break;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
else
|
|
430
|
+
r = O(a).toLowerCase().includes(n);
|
|
431
|
+
if (!L(a))
|
|
432
|
+
return r ? a : null;
|
|
433
|
+
const d = Ve(a.children, s);
|
|
434
|
+
return r ? { ...a, children: a.children } : d.length > 0 ? { ...a, children: d } : null;
|
|
435
|
+
}).filter(Boolean);
|
|
436
|
+
}, Le = (e, s, n) => !e || !s ? e : [...e].sort((r, d) => {
|
|
437
|
+
const c = W(r, s), w = W(d, s);
|
|
438
|
+
if (c == null) return 1;
|
|
439
|
+
if (w == null) return -1;
|
|
440
|
+
let Q = 0;
|
|
441
|
+
return typeof c == "string" && typeof w == "string" ? Q = c.localeCompare(w) : c > w ? Q = 1 : c < w && (Q = -1), n === "desc" ? Q * -1 : Q;
|
|
442
|
+
}).map((r) => L(r) ? { ...r, children: Le(r.children, s, n) } : r), ae = k(() => {
|
|
443
|
+
const e = g.value.trim(), s = e ? Ve(l.items, e) : l.items;
|
|
444
|
+
return !l.sortable || !E.value ? s : Le(s, E.value, q.value);
|
|
445
|
+
}), ze = (e) => {
|
|
446
|
+
if (l.disableBranchNodes && L(e)) {
|
|
447
|
+
const r = b(e);
|
|
448
|
+
Ie(r);
|
|
423
449
|
return;
|
|
424
450
|
}
|
|
425
451
|
if (de(e)) return;
|
|
426
|
-
const s =
|
|
452
|
+
const s = b(e);
|
|
427
453
|
let n = new Set(T.value);
|
|
428
454
|
if (l.multiple) {
|
|
429
455
|
const r = n.has(s);
|
|
430
|
-
if (l.selectAll &&
|
|
431
|
-
const
|
|
432
|
-
r ? (n.delete(s),
|
|
456
|
+
if (l.selectAll && L(e)) {
|
|
457
|
+
const d = ue(e);
|
|
458
|
+
r ? (n.delete(s), v("deselect", e), l.deselectAll && d.forEach((c) => n.delete(c))) : (n.add(s), d.forEach((c) => n.add(c)), v("select", e));
|
|
433
459
|
} else
|
|
434
|
-
r ? (n.delete(s), l.selectAll && ce(s)?.forEach((
|
|
460
|
+
r ? (n.delete(s), l.selectAll && ce(s)?.forEach((c) => n.delete(c))) : n.add(s);
|
|
435
461
|
} else {
|
|
436
|
-
const r = l.modelValue,
|
|
437
|
-
r ===
|
|
438
|
-
|
|
462
|
+
const r = l.modelValue, d = b(e);
|
|
463
|
+
r === d ? (n.clear(), v("deselect", e)) : (n.clear(), n.add(d), r != null && U(r), v("select", e)), l.closeOnSelect && D(), R(() => {
|
|
464
|
+
N.value?.focus();
|
|
439
465
|
});
|
|
440
466
|
}
|
|
441
|
-
let
|
|
442
|
-
l.multiple && l.excludeFromSelectedListKey && (
|
|
443
|
-
const
|
|
444
|
-
return !
|
|
445
|
-
})),
|
|
446
|
-
},
|
|
467
|
+
let a = Array.from(n);
|
|
468
|
+
l.multiple && l.excludeFromSelectedListKey && (a = a.filter((r) => {
|
|
469
|
+
const d = U(r);
|
|
470
|
+
return !d || !d[l.excludeFromSelectedListKey];
|
|
471
|
+
})), v("update:modelValue", l.multiple ? a : a[0] || null), v("change", l.multiple ? a : a[0] || null);
|
|
472
|
+
}, me = (e) => {
|
|
447
473
|
if (l.disabled || !e) return;
|
|
448
|
-
const s =
|
|
449
|
-
n.delete(s), l.selectAll && (l.deselectAll &&
|
|
450
|
-
const
|
|
451
|
-
|
|
452
|
-
},
|
|
453
|
-
|
|
454
|
-
},
|
|
455
|
-
|
|
456
|
-
},
|
|
474
|
+
const s = b(e), n = new Set(T.value);
|
|
475
|
+
n.delete(s), l.selectAll && (l.deselectAll && L(e) && ue(e).forEach((c) => n.delete(c)), ce(s)?.forEach((d) => n.delete(d)));
|
|
476
|
+
const a = Array.from(n);
|
|
477
|
+
v("update:modelValue", a), v("change", a);
|
|
478
|
+
}, Ie = (e) => {
|
|
479
|
+
K.value.has(e) ? K.value.delete(e) : K.value.add(e);
|
|
480
|
+
}, Ke = () => {
|
|
481
|
+
q.value = q.value === "asc" ? "desc" : "asc";
|
|
482
|
+
}, Ee = () => {
|
|
457
483
|
const e = l.multiple ? [] : null;
|
|
458
|
-
|
|
459
|
-
},
|
|
460
|
-
!l.allowAddNew || !g.value.trim() || (
|
|
461
|
-
},
|
|
462
|
-
l.allowAddNew && l.addNewMode === "enter" && g.value.trim() &&
|
|
463
|
-
},
|
|
464
|
-
|
|
465
|
-
},
|
|
466
|
-
l.disabled || (
|
|
484
|
+
v("clear"), v("update:modelValue", e), v("change", e), J();
|
|
485
|
+
}, Ae = () => {
|
|
486
|
+
!l.allowAddNew || !g.value.trim() || (v("add-new", g.value.trim()), D());
|
|
487
|
+
}, De = () => {
|
|
488
|
+
l.allowAddNew && l.addNewMode === "enter" && g.value.trim() && ae.value.length === 0 && Ae();
|
|
489
|
+
}, Pe = (e) => {
|
|
490
|
+
v("focus", e);
|
|
491
|
+
}, Oe = async () => {
|
|
492
|
+
l.disabled || (J(), $.value = !0, oe(), await R(), V.value && N.value && (m.value = ye(N.value, V.value, {
|
|
467
493
|
placement: "bottom-start",
|
|
468
494
|
strategy: "fixed",
|
|
469
495
|
modifiers: [
|
|
@@ -483,57 +509,62 @@ const pe = (t, D) => {
|
|
|
483
509
|
}
|
|
484
510
|
}
|
|
485
511
|
]
|
|
486
|
-
})), l.searchable && (await
|
|
487
|
-
},
|
|
488
|
-
$.value = !1, g.value = "",
|
|
489
|
-
},
|
|
490
|
-
|
|
512
|
+
})), l.searchable && (await R(), V.value?.querySelector(".tree-search-input")?.focus()));
|
|
513
|
+
}, D = () => {
|
|
514
|
+
$.value = !1, g.value = "", m.value?.destroy(), m.value = null, v("blur", l.modelValue);
|
|
515
|
+
}, ve = () => $.value ? D() : Oe(), Re = async () => {
|
|
516
|
+
D(), oe(), j.value = !0, await R(), te.value && H.value && (le.value = ye(H.value, te.value, {
|
|
491
517
|
placement: "bottom-end",
|
|
492
518
|
strategy: "fixed",
|
|
493
519
|
modifiers: [{ name: "offset", options: { offset: [0, 4] } }]
|
|
494
520
|
}));
|
|
495
|
-
},
|
|
496
|
-
|
|
497
|
-
},
|
|
498
|
-
$.value && !
|
|
499
|
-
},
|
|
500
|
-
|
|
501
|
-
},
|
|
502
|
-
!
|
|
521
|
+
}, J = () => {
|
|
522
|
+
j.value = !1, le.value?.destroy(), le.value = null;
|
|
523
|
+
}, $e = () => j.value ? J() : Re(), Me = (e) => {
|
|
524
|
+
$.value && !N.value?.contains(e.target) && !V.value?.contains(e.target) && D(), j.value && !H.value?.contains(e.target) && !te.value?.contains(e.target) && J(), x.value && !I.value?.$el?.contains(e.target) && !p.value?.contains(e.target) && oe();
|
|
525
|
+
}, Fe = (e) => {
|
|
526
|
+
u.value?.contains(e.relatedTarget) || D();
|
|
527
|
+
}, qe = async () => {
|
|
528
|
+
!F.value || x.value || (D(), J(), x.value = !0, await R(), p.value && I.value && (M.value = ye(I.value.$el, p.value, {
|
|
529
|
+
// ⬅️ 5b. USE $el
|
|
503
530
|
placement: "top",
|
|
504
531
|
strategy: "fixed",
|
|
505
532
|
modifiers: [{ name: "offset", options: { offset: [0, 8] } }]
|
|
506
533
|
})));
|
|
507
|
-
},
|
|
508
|
-
|
|
509
|
-
},
|
|
510
|
-
|
|
534
|
+
}, He = () => {
|
|
535
|
+
x.value ? oe() : qe();
|
|
536
|
+
}, oe = () => {
|
|
537
|
+
x.value = !1, M.value?.destroy(), M.value = null;
|
|
511
538
|
};
|
|
512
|
-
return
|
|
513
|
-
document.removeEventListener("click", Ie), c.value?.destroy(), _.value?.destroy(), M.value?.destroy();
|
|
514
|
-
}), Ze(g, (e) => {
|
|
539
|
+
return Be(g, (e) => {
|
|
515
540
|
if (e.trim()) {
|
|
516
541
|
const s = (n) => {
|
|
517
|
-
n.forEach((
|
|
518
|
-
|
|
542
|
+
n.forEach((a) => {
|
|
543
|
+
L(a) && (K.value.add(b(a)), s(a.children));
|
|
519
544
|
});
|
|
520
545
|
};
|
|
521
|
-
s(
|
|
546
|
+
s(ae.value);
|
|
522
547
|
}
|
|
523
|
-
}), (
|
|
548
|
+
}), Be(fe, () => {
|
|
549
|
+
xe();
|
|
550
|
+
}), We(() => {
|
|
551
|
+
document.addEventListener("click", Me), xe();
|
|
552
|
+
}), Ue(() => {
|
|
553
|
+
document.removeEventListener("click", Me), m.value?.destroy(), le.value?.destroy(), M.value?.destroy();
|
|
554
|
+
}), (e, s) => (o(), i("div", {
|
|
524
555
|
ref_key: "wrapperRef",
|
|
525
|
-
ref:
|
|
556
|
+
ref: u,
|
|
526
557
|
class: "tree-select-wrapper",
|
|
527
|
-
onFocusin:
|
|
528
|
-
onFocusout:
|
|
558
|
+
onFocusin: Pe,
|
|
559
|
+
onFocusout: Fe
|
|
529
560
|
}, [
|
|
530
561
|
h("div", {
|
|
531
562
|
ref_key: "triggerRef",
|
|
532
|
-
ref:
|
|
563
|
+
ref: N,
|
|
533
564
|
role: "button",
|
|
534
565
|
tabindex: "0",
|
|
535
|
-
class:
|
|
536
|
-
|
|
566
|
+
class: B(["btn tree-select-trigger w-100 d-flex justify-content-between align-items-center tree-select-main", [
|
|
567
|
+
be.value,
|
|
537
568
|
{
|
|
538
569
|
"btn-outline-secondary": !t.isInvalid,
|
|
539
570
|
"border-danger": t.isInvalid,
|
|
@@ -542,169 +573,171 @@ const pe = (t, D) => {
|
|
|
542
573
|
"has-chips": t.multiple && t.displayMode === "chips" && T.value.length > 0
|
|
543
574
|
}
|
|
544
575
|
]]),
|
|
545
|
-
onClick:
|
|
576
|
+
onClick: ve,
|
|
546
577
|
onKeydown: [
|
|
547
|
-
|
|
548
|
-
|
|
578
|
+
pe(C(ve, ["prevent"]), ["enter"]),
|
|
579
|
+
pe(C(ve, ["prevent"]), ["space"])
|
|
549
580
|
]
|
|
550
581
|
}, [
|
|
551
|
-
h("div",
|
|
552
|
-
|
|
553
|
-
selectedItems:
|
|
554
|
-
displayText:
|
|
582
|
+
h("div", vt, [
|
|
583
|
+
re(e.$slots, "display", {
|
|
584
|
+
selectedItems: ne.value,
|
|
585
|
+
displayText: fe.value,
|
|
555
586
|
placeholder: t.placeholder,
|
|
556
587
|
isLoading: t.isLoading,
|
|
557
|
-
removeItem:
|
|
588
|
+
removeItem: me,
|
|
558
589
|
getItemLabel: O,
|
|
559
|
-
getItemValue:
|
|
560
|
-
visibleChips:
|
|
561
|
-
hiddenChipsCount:
|
|
562
|
-
toggleMorePopover:
|
|
563
|
-
moreTriggerRef:
|
|
590
|
+
getItemValue: b,
|
|
591
|
+
visibleChips: Ce.value,
|
|
592
|
+
hiddenChipsCount: se.value,
|
|
593
|
+
toggleMorePopover: $e,
|
|
594
|
+
moreTriggerRef: H.value
|
|
564
595
|
}, () => [
|
|
565
|
-
!t.multiple || t.displayMode === "text" ? (
|
|
596
|
+
!t.multiple || t.displayMode === "text" ? (o(), i("div", ht, [
|
|
566
597
|
h("span", {
|
|
598
|
+
ref_key: "textDisplaySpanRef",
|
|
599
|
+
ref: ee,
|
|
567
600
|
class: "text-truncate",
|
|
568
|
-
title:
|
|
569
|
-
},
|
|
570
|
-
|
|
601
|
+
title: F.value ? we.value : ""
|
|
602
|
+
}, S(t.isLoading ? "Loading data..." : fe.value), 9, pt),
|
|
603
|
+
F.value && !t.isLoading ? (o(), z(A, {
|
|
571
604
|
key: 0,
|
|
572
605
|
ref_key: "tooltipTriggerIconRef",
|
|
573
606
|
ref: I,
|
|
574
607
|
name: "info-circle",
|
|
575
608
|
class: "tooltip-trigger-icon ms-2 flex-shrink-0",
|
|
576
|
-
onClick:
|
|
577
|
-
}, null, 512)) :
|
|
578
|
-
])) : t.multiple && t.displayMode === "chips" ? (
|
|
579
|
-
T.value.length === 0 ? (
|
|
580
|
-
(
|
|
581
|
-
key:
|
|
609
|
+
onClick: C(He, ["stop"])
|
|
610
|
+
}, null, 512)) : f("", !0)
|
|
611
|
+
])) : t.multiple && t.displayMode === "chips" ? (o(), i("div", yt, [
|
|
612
|
+
T.value.length === 0 ? (o(), i("span", gt, S(t.placeholder), 1)) : (o(), i("div", bt, [
|
|
613
|
+
(o(!0), i(Y, null, _(Ce.value, (n) => (o(), i("span", {
|
|
614
|
+
key: b(n),
|
|
582
615
|
class: "badge text-bg-primary chip bg-primary"
|
|
583
616
|
}, [
|
|
584
|
-
|
|
585
|
-
|
|
617
|
+
X(S(O(n)) + " ", 1),
|
|
618
|
+
ie(A, {
|
|
586
619
|
name: "times",
|
|
587
620
|
class: "chip-remove",
|
|
588
|
-
onClick:
|
|
621
|
+
onClick: C((a) => me(n), ["stop"])
|
|
589
622
|
}, null, 8, ["onClick"])
|
|
590
623
|
]))), 128)),
|
|
591
|
-
|
|
624
|
+
se.value > 0 ? (o(), i("button", {
|
|
592
625
|
key: 0,
|
|
593
626
|
ref_key: "moreTriggerRef",
|
|
594
|
-
ref:
|
|
627
|
+
ref: H,
|
|
595
628
|
type: "button",
|
|
596
629
|
class: "btn btn-sm btn-light more-button",
|
|
597
|
-
onClick:
|
|
598
|
-
}, " +" +
|
|
630
|
+
onClick: C($e, ["stop"])
|
|
631
|
+
}, " +" + S(se.value), 513)) : f("", !0)
|
|
599
632
|
]))
|
|
600
|
-
])) :
|
|
633
|
+
])) : f("", !0)
|
|
601
634
|
], !0)
|
|
602
635
|
]),
|
|
603
|
-
h("div",
|
|
604
|
-
t.isLoading ? (
|
|
636
|
+
h("div", kt, [
|
|
637
|
+
t.isLoading ? (o(), z(A, {
|
|
605
638
|
key: 0,
|
|
606
639
|
name: "spinner",
|
|
607
640
|
class: "loading-icon"
|
|
608
|
-
})) :
|
|
609
|
-
t.showClearButton && T.value.length > 0 && !t.disabled && !t.isLoading ? (
|
|
641
|
+
})) : f("", !0),
|
|
642
|
+
t.showClearButton && T.value.length > 0 && !t.disabled && !t.isLoading ? (o(), z(A, {
|
|
610
643
|
key: 1,
|
|
611
644
|
name: "times",
|
|
612
|
-
onClick:
|
|
645
|
+
onClick: C(Ee, ["stop"]),
|
|
613
646
|
class: "clear-icon"
|
|
614
|
-
})) :
|
|
615
|
-
t.isLoading ?
|
|
647
|
+
})) : f("", !0),
|
|
648
|
+
t.isLoading ? f("", !0) : (o(), z(A, {
|
|
616
649
|
key: 2,
|
|
617
650
|
name: "chevron-down",
|
|
618
|
-
class:
|
|
651
|
+
class: B(["transition-transform", { "rotate-180": $.value }])
|
|
619
652
|
}, null, 8, ["class"]))
|
|
620
653
|
])
|
|
621
|
-
], 42,
|
|
622
|
-
|
|
654
|
+
], 42, mt),
|
|
655
|
+
j.value ? (o(), i("div", {
|
|
623
656
|
key: 0,
|
|
624
657
|
ref_key: "morePopoverRef",
|
|
625
|
-
ref:
|
|
658
|
+
ref: te,
|
|
626
659
|
class: "card shadow-lg border-0 more-popover",
|
|
627
660
|
style: { "z-index": "1060" }
|
|
628
661
|
}, [
|
|
629
|
-
h("div",
|
|
630
|
-
(
|
|
631
|
-
key:
|
|
662
|
+
h("div", wt, [
|
|
663
|
+
(o(!0), i(Y, null, _(Te.value, (n) => (o(), i("div", {
|
|
664
|
+
key: b(n),
|
|
632
665
|
class: "list-group-item d-flex justify-content-between align-items-center py-1 px-2"
|
|
633
666
|
}, [
|
|
634
|
-
h("small",
|
|
635
|
-
t.disabled ?
|
|
667
|
+
h("small", xt, S(O(n)), 1),
|
|
668
|
+
t.disabled ? f("", !0) : (o(), z(A, {
|
|
636
669
|
key: 0,
|
|
637
670
|
name: "times",
|
|
638
671
|
class: "chip-remove flex-shrink-0",
|
|
639
|
-
onClick:
|
|
672
|
+
onClick: C((a) => me(n), ["stop"])
|
|
640
673
|
}, null, 8, ["onClick"]))
|
|
641
674
|
]))), 128))
|
|
642
675
|
])
|
|
643
|
-
], 512)) :
|
|
644
|
-
$.value ? (
|
|
676
|
+
], 512)) : f("", !0),
|
|
677
|
+
$.value ? (o(), i("div", {
|
|
645
678
|
key: 1,
|
|
646
679
|
ref_key: "dropdownRef",
|
|
647
|
-
ref:
|
|
680
|
+
ref: V,
|
|
648
681
|
class: "tree-select-dropdown card shadow-lg border-0",
|
|
649
|
-
onMousedown: s[2] || (s[2] =
|
|
682
|
+
onMousedown: s[2] || (s[2] = C(() => {
|
|
650
683
|
}, ["prevent"])),
|
|
651
|
-
onClick: s[3] || (s[3] =
|
|
684
|
+
onClick: s[3] || (s[3] = C(() => {
|
|
652
685
|
}, ["stop"])),
|
|
653
686
|
style: { "z-index": "1050" }
|
|
654
687
|
}, [
|
|
655
|
-
h("div",
|
|
656
|
-
t.searchable ?
|
|
688
|
+
h("div", St, [
|
|
689
|
+
t.searchable ? he((o(), i("input", {
|
|
657
690
|
key: 0,
|
|
658
691
|
"onUpdate:modelValue": s[0] || (s[0] = (n) => g.value = n),
|
|
659
692
|
type: "text",
|
|
660
|
-
class:
|
|
693
|
+
class: B(["form-control tree-search-input", ke.value]),
|
|
661
694
|
placeholder: "Search...",
|
|
662
|
-
onKeydown:
|
|
663
|
-
}, null, 42,
|
|
664
|
-
[
|
|
665
|
-
]) :
|
|
666
|
-
t.sortable && t.sortOptions.length > 0 ? (
|
|
667
|
-
|
|
668
|
-
"onUpdate:modelValue": s[1] || (s[1] = (n) =>
|
|
669
|
-
class:
|
|
695
|
+
onKeydown: pe(C(De, ["prevent"]), ["enter"])
|
|
696
|
+
}, null, 42, Ct)), [
|
|
697
|
+
[Ge, g.value]
|
|
698
|
+
]) : f("", !0),
|
|
699
|
+
t.sortable && t.sortOptions.length > 0 ? (o(), i("div", Vt, [
|
|
700
|
+
he(h("select", {
|
|
701
|
+
"onUpdate:modelValue": s[1] || (s[1] = (n) => E.value = n),
|
|
702
|
+
class: B(["form-select flex-grow-1", ke.value])
|
|
670
703
|
}, [
|
|
671
704
|
s[4] || (s[4] = h("option", {
|
|
672
705
|
value: null,
|
|
673
706
|
disabled: ""
|
|
674
707
|
}, "Sort by...", -1)),
|
|
675
|
-
(
|
|
708
|
+
(o(!0), i(Y, null, _(t.sortOptions, (n) => (o(), i("option", {
|
|
676
709
|
key: n.value,
|
|
677
710
|
value: n.value
|
|
678
|
-
},
|
|
711
|
+
}, S(n.label), 9, Lt))), 128))
|
|
679
712
|
], 2), [
|
|
680
|
-
[
|
|
713
|
+
[Je, E.value]
|
|
681
714
|
]),
|
|
682
715
|
h("button", {
|
|
683
716
|
type: "button",
|
|
684
|
-
class:
|
|
685
|
-
disabled: !
|
|
686
|
-
onClick:
|
|
717
|
+
class: B(["btn btn-outline-secondary", be.value]),
|
|
718
|
+
disabled: !E.value,
|
|
719
|
+
onClick: Ke
|
|
687
720
|
}, [
|
|
688
|
-
|
|
689
|
-
name:
|
|
721
|
+
ie(A, {
|
|
722
|
+
name: q.value === "asc" ? "asc" : "desc"
|
|
690
723
|
}, null, 8, ["name"])
|
|
691
|
-
], 10,
|
|
692
|
-
])) :
|
|
724
|
+
], 10, It)
|
|
725
|
+
])) : f("", !0)
|
|
693
726
|
]),
|
|
694
|
-
t.isLoading ? (
|
|
695
|
-
|
|
727
|
+
t.isLoading ? (o(), i("div", At, [
|
|
728
|
+
ie(A, {
|
|
696
729
|
name: "spinner",
|
|
697
730
|
class: "me-2"
|
|
698
731
|
}),
|
|
699
732
|
s[5] || (s[5] = h("span", null, "Loading...", -1))
|
|
700
|
-
])) : (
|
|
701
|
-
|
|
702
|
-
(
|
|
703
|
-
key:
|
|
733
|
+
])) : (o(), i("div", $t, [
|
|
734
|
+
ae.value.length > 0 ? (o(), i("div", Mt, [
|
|
735
|
+
(o(!0), i(Y, null, _(ae.value, (n) => (o(), z(ft, {
|
|
736
|
+
key: b(n),
|
|
704
737
|
item: n,
|
|
705
738
|
level: 0,
|
|
706
739
|
"selected-items": T.value,
|
|
707
|
-
"expanded-items":
|
|
740
|
+
"expanded-items": K.value,
|
|
708
741
|
multiple: t.multiple,
|
|
709
742
|
"select-all": t.selectAll,
|
|
710
743
|
"select-mode": t.selectMode,
|
|
@@ -712,65 +745,66 @@ const pe = (t, D) => {
|
|
|
712
745
|
"option-value": t.optionValue,
|
|
713
746
|
"disabled-key": t.disabledKey,
|
|
714
747
|
"disable-branch-node": t.disableBranchNodes,
|
|
715
|
-
onSelect:
|
|
716
|
-
onToggleExpand:
|
|
748
|
+
onSelect: ze,
|
|
749
|
+
onToggleExpand: Ie
|
|
717
750
|
}, {
|
|
718
|
-
default:
|
|
719
|
-
|
|
720
|
-
item:
|
|
751
|
+
default: Ne(({ item: a, level: r }) => [
|
|
752
|
+
re(e.$slots, "default", {
|
|
753
|
+
item: a,
|
|
721
754
|
level: r
|
|
722
755
|
}, () => [
|
|
723
|
-
h("div",
|
|
724
|
-
|
|
725
|
-
|
|
756
|
+
h("div", Bt, [
|
|
757
|
+
X(S(O(a)) + " ", 1),
|
|
758
|
+
a.icon ? (o(), i("i", {
|
|
726
759
|
key: 0,
|
|
727
|
-
class:
|
|
728
|
-
}, null, 2)) :
|
|
760
|
+
class: B(a.icon)
|
|
761
|
+
}, null, 2)) : f("", !0)
|
|
729
762
|
])
|
|
730
763
|
], !0)
|
|
731
764
|
]),
|
|
732
765
|
_: 2
|
|
733
766
|
}, 1032, ["item", "selected-items", "expanded-items", "multiple", "select-all", "select-mode", "option-label", "option-value", "disabled-key", "disable-branch-node"]))), 128))
|
|
734
|
-
])) : (
|
|
735
|
-
t.allowAddNew ? (
|
|
736
|
-
t.addNewMode === "button" ? (
|
|
767
|
+
])) : (o(), i("div", Nt, [
|
|
768
|
+
t.allowAddNew ? (o(), i("div", Tt, [
|
|
769
|
+
t.addNewMode === "button" ? (o(), i("button", {
|
|
737
770
|
key: 0,
|
|
738
771
|
type: "button",
|
|
739
772
|
class: "btn btn-success btn-sm w-100",
|
|
740
|
-
onClick:
|
|
773
|
+
onClick: Ae
|
|
741
774
|
}, [
|
|
742
|
-
|
|
743
|
-
g.value.trim() ? (
|
|
744
|
-
])) : t.addNewMode === "enter" ? (
|
|
745
|
-
|
|
746
|
-
g.value.trim() ? (
|
|
747
|
-
])) :
|
|
748
|
-
])) : (
|
|
749
|
-
|
|
775
|
+
X(' No items found "Click" to ' + S(t.addNewLabel) + " ", 1),
|
|
776
|
+
g.value.trim() ? (o(), i("span", zt, ' : "' + S(g.value) + '" ', 1)) : f("", !0)
|
|
777
|
+
])) : t.addNewMode === "enter" ? (o(), i("span", Kt, [
|
|
778
|
+
X(' No items found "Press Enter" to ' + S(t.addNewLabel) + " ", 1),
|
|
779
|
+
g.value.trim() ? (o(), i("span", Et, ' : "' + S(g.value) + '" ', 1)) : f("", !0)
|
|
780
|
+
])) : f("", !0)
|
|
781
|
+
])) : (o(), i("div", Dt, [
|
|
782
|
+
ie(A, {
|
|
750
783
|
name: "search",
|
|
751
784
|
class: "me-1"
|
|
752
785
|
}),
|
|
753
|
-
s[6] || (s[6] =
|
|
786
|
+
s[6] || (s[6] = X(" No items found ", -1))
|
|
754
787
|
]))
|
|
755
788
|
]))
|
|
756
789
|
]))
|
|
757
|
-
], 544)) :
|
|
758
|
-
|
|
759
|
-
key: 2,
|
|
790
|
+
], 544)) : f("", !0),
|
|
791
|
+
he(h("div", {
|
|
760
792
|
ref_key: "tooltipRef",
|
|
761
793
|
ref: p,
|
|
762
794
|
class: "tree-select-tooltip card shadow-sm py-1 px-2",
|
|
763
795
|
role: "tooltip",
|
|
764
796
|
style: { "z-index": "1070" }
|
|
765
|
-
},
|
|
797
|
+
}, S(we.value), 513), [
|
|
798
|
+
[Qe, x.value]
|
|
799
|
+
])
|
|
766
800
|
], 544));
|
|
767
801
|
}
|
|
768
|
-
},
|
|
802
|
+
}, Ot = /* @__PURE__ */ ge(Pt, [["__scopeId", "data-v-9c230074"]]), qt = {
|
|
769
803
|
install(t) {
|
|
770
|
-
t.component("VSelect",
|
|
804
|
+
t.component("VSelect", Ot);
|
|
771
805
|
}
|
|
772
806
|
};
|
|
773
807
|
export {
|
|
774
|
-
|
|
775
|
-
|
|
808
|
+
Ot as VSelect,
|
|
809
|
+
qt as default
|
|
776
810
|
};
|
package/dist/vue-select.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(w,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@popperjs/core")):typeof define=="function"&&define.amd?define(["exports","vue","@popperjs/core"],e):(w=typeof globalThis<"u"?globalThis:w||self,e(w.VueSelect={},w.Vue,w.Popper))})(this,(function(w,e,G){"use strict";const J=(l,I)=>{const n=l.__vccOpts||l;for(const[m,i]of I)n[m]=i;return n},pe={key:0},he={key:1},ge={key:2},ye={key:3},ke={key:4},be={key:5},Be={key:6},Ve={key:7},B=J({__name:"SvgIcon",props:{name:{type:String,required:!0}},setup(l){const I=l,n=e.computed(()=>({"svg-icon-spin":I.name==="spinner"}));return(m,i)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em",class:e.normalizeClass(n.value)},[l.name==="spinner"?(e.openBlock(),e.createElementBlock("g",pe,i[0]||(i[0]=[e.createElementVNode("path",{d:"M12,4V2A10,10,0,0,0,2,12H4A8,8,0,0,1,12,4Z"},null,-1)]))):e.createCommentVNode("",!0),l.name==="times"?(e.openBlock(),e.createElementBlock("g",he,i[1]||(i[1]=[e.createElementVNode("path",{d:"M13.41,12l4.3-4.29a1,1,0,1,0-1.42-1.42L12,10.59,7.71,6.29A1,1,0,0,0,6.29,7.71L10.59,12l-4.3,4.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L12,13.41l4.29,4.3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42Z"},null,-1)]))):e.createCommentVNode("",!0),l.name==="chevron-down"?(e.openBlock(),e.createElementBlock("g",ge,i[2]||(i[2]=[e.createElementVNode("path",{d:"M17,9.17a1,1,0,0,0-1.41,0L12,12.71,8.46,9.17a1,1,0,0,0-1.41,0,1,1,0,0,0,0,1.42l4.24,4.24a1,1,0,0,0,1.42,0L17,10.59A1,1,0,0,0,17,9.17Z"},null,-1)]))):e.createCommentVNode("",!0),l.name==="chevron-right"?(e.openBlock(),e.createElementBlock("g",ye,i[3]||(i[3]=[e.createElementVNode("path",{d:"M10.83,12l-4.24,4.24a1,1,0,0,0,1.41,1.41L13.66,12,8,6.34A1,1,0,0,0,6.59,7.76Z"},null,-1)]))):e.createCommentVNode("",!0),l.name==="search"?(e.openBlock(),e.createElementBlock("g",ke,i[4]||(i[4]=[e.createElementVNode("path",{d:"M21.71,20.29,18,16.61A9,9,0,1,0,16.61,18l3.68,3.68a1,1,0,0,0,1.42,0A1,1,0,0,0,21.71,20.29ZM11,18a7,7,0,1,1,7-7A7,7,0,0,1,11,18Z"},null,-1)]))):e.createCommentVNode("",!0),l.name==="asc"?(e.openBlock(),e.createElementBlock("g",be,i[5]||(i[5]=[e.createElementVNode("path",{fill:"currentColor",d:"M4.869 11H2.667L6 3h2l3.333 8H9.131l-.41-1H5.28zm1.23-3h1.803L7 5.8zm12.9 8V3h-2v13h-3l4 5l4-5zm-8-3H3v2h4.855L3 19v2h8v-2H6.146L11 15z"},null,-1)]))):e.createCommentVNode("",!0),l.name==="desc"?(e.openBlock(),e.createElementBlock("g",Be,i[6]||(i[6]=[e.createElementVNode("path",{fill:"currentColor",d:"M4.869 11H2.667L6 3h2l3.333 8H9.131l-.41-1H5.28zm1.23-3h1.803L7 5.8zm15.9 0l-4-5l-4 5h3v13h2V8zm-11 5H3v2h4.855L3 19v2h8v-2H6.146L11 15z"},null,-1)]))):e.createCommentVNode("",!0),l.name==="info-circle"?(e.openBlock(),e.createElementBlock("g",Ve,i[7]||(i[7]=[e.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"},null,-1)]))):e.createCommentVNode("",!0)],2))}},[["__scopeId","data-v-89f9b7e1"]]),we={class:"tree-select-item-wrapper"},xe={key:1,class:"expander-placeholder"},Ce=["checked",".indeterminate","disabled"],Se={class:"item-content"},Ee={key:0,class:"children-wrapper"},Ne=J({__name:"TreeSelectItem",props:{item:{type:Object,required:!0},level:{type:Number,required:!0},selectedItems:{type:Array,required:!0},expandedItems:{type:Set,required:!0},multiple:{type:Boolean,required:!0},selectAll:{type:Boolean,required:!0},selectMode:{type:String,required:!0},optionLabel:{type:String,required:!0},optionValue:{type:String,required:!0},disabledKey:{type:String,default:null},disableBranchNode:{type:Boolean,default:!1}},emits:["select","toggle-expand"],setup(l,{emit:I}){const n=l,m=c=>c[n.optionValue]||c.id||c.value,i=c=>!n.disabledKey||!c?!1:c.hasOwnProperty(n.disabledKey)&&c[n.disabledKey]!==null,y=e.computed(()=>n.item.children&&n.item.children.length>0),E=e.computed(()=>n.expandedItems.has(m(n.item))),p=e.computed(()=>n.selectedItems.includes(m(n.item))),x=c=>{let f=[];return c.children&&c.children.forEach(C=>{f.push(m(C)),f.push(...x(C))}),f},L=e.computed(()=>!n.multiple||!n.selectAll||!y.value||p.value?!1:x(n.item).some(f=>n.selectedItems.includes(f)));return(c,f)=>{const C=e.resolveComponent("TreeSelectItem",!0);return e.openBlock(),e.createElementBlock("div",we,[e.createElementVNode("div",{class:e.normalizeClass(["list-group-item list-group-item-action d-flex align-items-center gap-2",{"bg-primary text-white":p.value&&(l.selectMode==="highlight"||!l.multiple)&&!i(l.item)&&!(l.disableBranchNode&&y.value),"is-disabled text-muted bg-light":i(l.item)}]),style:e.normalizeStyle({"padding-left":`${l.level*1.5+1}rem`}),onClick:f[2]||(f[2]=g=>i(l.item)?null:c.$emit("select",l.item))},[y.value?(e.openBlock(),e.createBlock(B,{key:0,name:"chevron-right",class:e.normalizeClass(["expander-icon",{"rotate-90":E.value}]),onClick:f[0]||(f[0]=e.withModifiers(g=>c.$emit("toggle-expand",m(l.item)),["stop"]))},null,8,["class"])):(e.openBlock(),e.createElementBlock("span",xe)),l.multiple&&l.selectMode==="checkbox"&&!(l.disableBranchNode&&y.value)?(e.openBlock(),e.createElementBlock("input",{key:2,type:"checkbox",class:"form-check-input",checked:p.value,".indeterminate":L.value,disabled:i(l.item),onClick:f[1]||(f[1]=e.withModifiers(g=>c.$emit("select",l.item),["stop"]))},null,40,Ce)):e.createCommentVNode("",!0),e.createElementVNode("div",Se,[e.renderSlot(c.$slots,"default",{item:l.item,level:l.level},void 0,!0)])],6),y.value&&E.value?(e.openBlock(),e.createElementBlock("div",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.item.children,g=>(e.openBlock(),e.createBlock(C,{key:m(g),item:g,level:l.level+1,"selected-items":l.selectedItems,"expanded-items":l.expandedItems,multiple:l.multiple,"select-all":l.selectAll,"select-mode":l.selectMode,"option-label":l.optionLabel,"option-value":l.optionValue,"disabled-key":l.disabledKey,"disable-branch-node":l.disableBranchNode,onSelect:f[3]||(f[3]=V=>c.$emit("select",V)),onToggleExpand:f[4]||(f[4]=V=>c.$emit("toggle-expand",V))},{default:e.withCtx(({item:V,level:S})=>[e.renderSlot(c.$slots,"default",{item:V,level:S},void 0,!0)]),_:2},1032,["item","level","selected-items","expanded-items","multiple","select-all","select-mode","option-label","option-value","disabled-key","disable-branch-node"]))),128))])):e.createCommentVNode("",!0)])}}},[["__scopeId","data-v-b319a2c7"]]),Le=["onKeydown"],Me={class:"tree-select-display-container"},Ie={key:0,class:"d-flex align-items-center justify-content-start w-100"},$e=["title"],Ae={key:1},Te={key:0,class:"text-muted"},ze={key:1,class:"chips-container"},De={class:"d-flex align-items-center gap-2"},Ke={class:"list-group list-group-flush"},Pe={class:"text-wrap text-start me-2"},Oe={class:"p-2 border-bottom d-flex flex-column gap-2"},qe=["onKeydown"],Fe={key:1,class:"d-flex align-items-center gap-2"},Re=["value"],je=["disabled"],He={key:0,class:"p-4 text-muted text-center"},Ze={key:1,class:"tree-select-body",style:{"max-height":"300px","overflow-y":"auto"}},Ue={key:0,class:"list-group list-group-flush"},We={class:"d-flex align-items-center gap-2",style:{"white-space":"wrap"}},Ge={key:1,class:"p-3 text-muted text-center"},Je={key:0},Qe={key:0},Xe={key:1},Ye={key:0},ve={key:1},le=J({__name:"TreeSelectMain",props:{modelValue:{type:[String,Number,Array],default:null},displayMode:{type:String,default:"text",validator:l=>["text","chips"].includes(l)},items:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},selectMode:{type:String,default:"checkbox",validator:l=>["checkbox","highlight"].includes(l)},placeholder:{type:String,default:"Select item..."},isInvalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},isLoading:{type:Boolean,default:!1},showClearButton:{type:Boolean,default:!0},selectAll:{type:Boolean,default:!1},deselectAll:{type:Boolean,default:!0},canDeselect:{type:Boolean,default:!0},optionLabel:{type:String,default:"value"},optionValue:{type:String,default:"code"},disabledKey:{type:String,default:null},excludeFromSelectedListKey:{type:String,default:null},disableBranchNodes:{type:Boolean,default:!1},size:{type:String,default:"sm",validator:l=>["sm","md","lg","xl"].includes(l)},sortable:{type:Boolean,default:!1},sortOptions:{type:Array,default:()=>[]},defaultSortKey:{type:String,default:null},defaultSortDirection:{type:String,default:"asc",validator:l=>["asc","desc"].includes(l)},maxVisibleChipsDisplay:{type:Number,default:3},closeOnSelect:{type:Boolean,default:!0},allowAddNew:{type:Boolean,default:!1},addNewMode:{type:String,default:"button",validator:l=>["button","enter"].includes(l)},addNewLabel:{type:String,default:"Add new record"}},emits:["update:modelValue","change","clear","deselect","select","focus","blur","add-new"],setup(l,{emit:I}){const n=l,m=I,i=e.ref(null),y=e.ref(null),E=e.ref(null),p=e.ref(""),x=e.ref(!1),L=e.ref(new Set),c=e.ref(null),f=e.ref(null),C=e.ref(null),g=e.ref(!1),V=e.ref(null),S=e.ref(n.defaultSortKey),A=e.ref(n.defaultSortDirection),T=e.ref(null),F=e.ref(null),z=e.ref(!1),R=e.ref(null),ne=e.computed(()=>n.size==="sm"?"btn-sm":n.size==="lg"?"btn-lg":n.size==="xl"?"btn-xl":""),oe=e.computed(()=>n.size==="sm"?"form-control-sm":n.size==="lg"?"form-control-lg":n.size==="xl"?"form-control-xl":""),et=e.computed(()=>Z.value===0?[]:H.value.slice(n.maxVisibleChipsDisplay)),D=e.computed(()=>!n.multiple||!n.excludeFromSelectedListKey?N.value:N.value.filter(t=>{const a=K(t);return!a||!a[n.excludeFromSelectedListKey]})),Q=e.computed(()=>{const t=D.value;if(t.length===0)return n.placeholder;if(n.multiple){if(t.length===1){const o=P(t[0]);return o?o.join(" → "):t[0]}return`${t.length} items selected`}const a=P(t[0]);return a?a.join(" → "):t[0]}),X=e.computed(()=>n.multiple||n.displayMode==="chips"||D.value.length===0?!1:Q.value.length>40),$=t=>t&&(t[n.optionLabel]||t.label||t.name)||"",h=t=>t?t[n.optionValue]||t.id||t.value:null,Y=t=>!n.disabledKey||!t?!1:t.hasOwnProperty(n.disabledKey)&&t[n.disabledKey]!==null,k=t=>t.children&&t.children.length>0,j=(t,a)=>{if(a)return a.split(".").reduce((o,r)=>o&&o[r],t)},K=(t,a=n.items)=>{for(const o of a){if(h(o)===t)return o;if(k(o)){const r=K(t,o.children);if(r)return r}}return null},v=t=>{const a=[];return k(t)&&t.children.forEach(o=>{Y(o)||(a.push(h(o)),a.push(...v(o)))}),a},_=(t,a=n.items,o=[])=>{for(const r of a){if(h(r)===t)return o;if(k(r)){const s=_(t,r.children,[...o,h(r)]);if(s)return s}}return null},N=e.computed(()=>{const t=new Set(Array.isArray(n.modelValue)?n.modelValue:[n.modelValue].filter(Boolean));if(n.multiple&&n.selectAll){const a=o=>{o.forEach(r=>{if(k(r)){const s=r.children.filter(u=>!Y(u));s.length>0&&s.every(u=>t.has(h(u)))&&t.add(h(r)),a(r.children)}})};a(n.items)}return Array.from(t)}),P=(t,a=n.items,o=[])=>{for(const r of a){const s=[...o,$(r)];if(h(r)===t)return s;if(k(r)){const d=P(t,r.children,s);if(d)return d}}return null},ae=t=>{if(!t||t.length===0)return"";const a=t.join(" → ");return a.length<=40?a:t.length>2?`${t[0]} → ... → ${t[t.length-1]}`:a},re=e.computed(()=>{const t=D.value;if(t.length===0)return n.placeholder;if(n.multiple){if(t.length===1){const o=P(t[0]);return o?ae(o):t[0]}return`${t.length} items selected`}const a=P(t[0]);return a?ae(a):t[0]}),H=e.computed(()=>{if(!n.multiple||D.value.length===0)return[];const t=D.value.map(r=>K(r)).filter(Boolean);if(!n.sortable||!S.value)return t;const a=S.value,o=A.value;return[...t].sort((r,s)=>{const d=j(r,a),u=j(s,a);if(d==null)return 1;if(u==null)return-1;let b=0;return typeof d=="string"&&typeof u=="string"?b=d.localeCompare(u):d>u?b=1:d<u&&(b=-1),o==="desc"?b*-1:b})}),se=e.computed(()=>H.value.slice(0,n.maxVisibleChipsDisplay)),Z=e.computed(()=>{const t=H.value.length-n.maxVisibleChipsDisplay;return t>0?t:0}),ie=(t,a)=>t.map(o=>{const r=$(o).toLowerCase().includes(a);if(!k(o))return r?o:null;const s=ie(o.children,a);return r?{...o,children:o.children}:s.length>0?{...o,children:s}:null}).filter(Boolean),ce=(t,a,o)=>!t||!a?t:[...t].sort((s,d)=>{const u=j(s,a),b=j(d,a);if(u==null)return 1;if(b==null)return-1;let q=0;return typeof u=="string"&&typeof b=="string"?q=u.localeCompare(b):u>b?q=1:u<b&&(q=-1),o==="desc"?q*-1:q}).map(s=>k(s)?{...s,children:ce(s.children,a,o)}:s),U=e.computed(()=>{const t=p.value.trim()?ie(n.items,p.value.toLowerCase()):n.items;return!n.sortable||!S.value?t:ce(t,S.value,A.value)}),tt=t=>{if(n.disableBranchNodes&&k(t)){const s=h(t);de(s);return}if(Y(t))return;const a=h(t);let o=new Set(N.value);if(n.multiple){const s=o.has(a);if(n.selectAll&&k(t)){const d=v(t);s?(o.delete(a),m("deselect",t),n.deselectAll&&d.forEach(u=>o.delete(u))):(o.add(a),d.forEach(u=>o.add(u)),m("select",t))}else s?(o.delete(a),n.selectAll&&_(a)?.forEach(u=>o.delete(u))):o.add(a)}else{const s=n.modelValue,d=h(t);s===d?(o.clear(),m("deselect",t)):(o.clear(),o.add(d),s!=null&&K(s),m("select",t)),n.closeOnSelect&&M(),e.nextTick(()=>{E.value?.focus()})}let r=Array.from(o);n.multiple&&n.excludeFromSelectedListKey&&(r=r.filter(s=>{const d=K(s);return!d||!d[n.excludeFromSelectedListKey]})),m("update:modelValue",n.multiple?r:r[0]||null),m("change",n.multiple?r:r[0]||null)},ee=t=>{if(n.disabled||!t)return;const a=h(t),o=new Set(N.value);o.delete(a),n.selectAll&&(n.deselectAll&&k(t)&&v(t).forEach(u=>o.delete(u)),_(a)?.forEach(d=>o.delete(d)));const r=Array.from(o);m("update:modelValue",r),m("change",r)},de=t=>{L.value.has(t)?L.value.delete(t):L.value.add(t)},lt=()=>{A.value=A.value==="asc"?"desc":"asc"},nt=()=>{const t=n.multiple?[]:null;m("clear"),m("update:modelValue",t),m("change",t),O()},me=()=>{!n.allowAddNew||!p.value.trim()||(m("add-new",p.value.trim()),M())},ot=()=>{n.allowAddNew&&n.addNewMode==="enter"&&p.value.trim()&&U.value.length===0&&me()},at=t=>{m("focus",t)},rt=async()=>{n.disabled||(O(),x.value=!0,W(),await e.nextTick(),y.value&&E.value&&(c.value=G.createPopper(E.value,y.value,{placement:"bottom-start",strategy:"fixed",modifiers:[{name:"offset",options:{offset:[0,4]}},{name:"preventOverflow",options:{padding:8}},{name:"flip",options:{fallbackPlacements:["top-start"]}},{name:"sameWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:t})=>{t.styles.popper.width=`${t.rects.reference.width}px`},effect:({state:t})=>{t.elements.popper.style.width=`${t.elements.reference.offsetWidth}px`}}]})),n.searchable&&(await e.nextTick(),y.value?.querySelector(".tree-search-input")?.focus()))},M=()=>{x.value=!1,p.value="",c.value?.destroy(),c.value=null,m("blur",n.modelValue)},te=()=>x.value?M():rt(),st=async()=>{M(),W(),z.value=!0,await e.nextTick(),F.value&&T.value&&(R.value=G.createPopper(T.value,F.value,{placement:"bottom-end",strategy:"fixed",modifiers:[{name:"offset",options:{offset:[0,4]}}]}))},O=()=>{z.value=!1,R.value?.destroy(),R.value=null},ue=()=>z.value?O():st(),fe=t=>{x.value&&!E.value?.contains(t.target)&&!y.value?.contains(t.target)&&M(),z.value&&!T.value?.contains(t.target)&&!F.value?.contains(t.target)&&O(),g.value&&!V.value?.$el?.contains(t.target)&&!f.value?.contains(t.target)&&W()},it=t=>{i.value?.contains(t.relatedTarget)||M()},ct=async()=>{!X.value||g.value||(M(),O(),g.value=!0,await e.nextTick(),f.value&&V.value&&(C.value=G.createPopper(V.value,f.value,{placement:"top",strategy:"fixed",modifiers:[{name:"offset",options:{offset:[0,8]}}]})))},dt=()=>{g.value?W():ct()},W=()=>{g.value=!1,C.value?.destroy(),C.value=null};return e.onMounted(()=>document.addEventListener("click",fe)),e.onUnmounted(()=>{document.removeEventListener("click",fe),c.value?.destroy(),R.value?.destroy(),C.value?.destroy()}),e.watch(p,t=>{if(t.trim()){const a=o=>{o.forEach(r=>{k(r)&&(L.value.add(h(r)),a(r.children))})};a(U.value)}}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:i,class:"tree-select-wrapper",onFocusin:at,onFocusout:it},[e.createElementVNode("div",{ref_key:"triggerRef",ref:E,role:"button",tabindex:"0",class:e.normalizeClass(["btn tree-select-trigger w-100 d-flex justify-content-between align-items-center tree-select-main",[ne.value,{"btn-outline-secondary":!l.isInvalid,"border-danger":l.isInvalid,disabled:l.disabled||l.isLoading,"is-loading":l.isLoading,"has-chips":l.multiple&&l.displayMode==="chips"&&N.value.length>0}]]),onClick:te,onKeydown:[e.withKeys(e.withModifiers(te,["prevent"]),["enter"]),e.withKeys(e.withModifiers(te,["prevent"]),["space"])]},[e.createElementVNode("div",Me,[e.renderSlot(t.$slots,"display",{selectedItems:H.value,displayText:re.value,placeholder:l.placeholder,isLoading:l.isLoading,removeItem:ee,getItemLabel:$,getItemValue:h,visibleChips:se.value,hiddenChipsCount:Z.value,toggleMorePopover:ue,moreTriggerRef:T.value},()=>[!l.multiple||l.displayMode==="text"?(e.openBlock(),e.createElementBlock("div",Ie,[e.createElementVNode("span",{class:"text-truncate",title:X.value?Q.value:""},e.toDisplayString(l.isLoading?"Loading data...":re.value),9,$e),X.value&&!l.isLoading?(e.openBlock(),e.createBlock(B,{key:0,ref_key:"tooltipTriggerIconRef",ref:V,name:"info-circle",class:"tooltip-trigger-icon ms-2 flex-shrink-0",onClick:e.withModifiers(dt,["stop"])},null,512)):e.createCommentVNode("",!0)])):l.multiple&&l.displayMode==="chips"?(e.openBlock(),e.createElementBlock("div",Ae,[N.value.length===0?(e.openBlock(),e.createElementBlock("span",Te,e.toDisplayString(l.placeholder),1)):(e.openBlock(),e.createElementBlock("div",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(se.value,o=>(e.openBlock(),e.createElementBlock("span",{key:h(o),class:"badge text-bg-primary chip bg-primary"},[e.createTextVNode(e.toDisplayString($(o))+" ",1),e.createVNode(B,{name:"times",class:"chip-remove",onClick:e.withModifiers(r=>ee(o),["stop"])},null,8,["onClick"])]))),128)),Z.value>0?(e.openBlock(),e.createElementBlock("button",{key:0,ref_key:"moreTriggerRef",ref:T,type:"button",class:"btn btn-sm btn-light more-button",onClick:e.withModifiers(ue,["stop"])}," +"+e.toDisplayString(Z.value),513)):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0)],!0)]),e.createElementVNode("div",De,[l.isLoading?(e.openBlock(),e.createBlock(B,{key:0,name:"spinner",class:"loading-icon"})):e.createCommentVNode("",!0),l.showClearButton&&N.value.length>0&&!l.disabled&&!l.isLoading?(e.openBlock(),e.createBlock(B,{key:1,name:"times",onClick:e.withModifiers(nt,["stop"]),class:"clear-icon"})):e.createCommentVNode("",!0),l.isLoading?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(B,{key:2,name:"chevron-down",class:e.normalizeClass(["transition-transform",{"rotate-180":x.value}])},null,8,["class"]))])],42,Le),z.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"morePopoverRef",ref:F,class:"card shadow-lg border-0 more-popover",style:{"z-index":"1060"}},[e.createElementVNode("div",Ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(et.value,o=>(e.openBlock(),e.createElementBlock("div",{key:h(o),class:"list-group-item d-flex justify-content-between align-items-center py-1 px-2"},[e.createElementVNode("small",Pe,e.toDisplayString($(o)),1),l.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(B,{key:0,name:"times",class:"chip-remove flex-shrink-0",onClick:e.withModifiers(r=>ee(o),["stop"])},null,8,["onClick"]))]))),128))])],512)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"dropdownRef",ref:y,class:"tree-select-dropdown card shadow-lg border-0",onMousedown:a[2]||(a[2]=e.withModifiers(()=>{},["prevent"])),onClick:a[3]||(a[3]=e.withModifiers(()=>{},["stop"])),style:{"z-index":"1050"}},[e.createElementVNode("div",Oe,[l.searchable?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":a[0]||(a[0]=o=>p.value=o),type:"text",class:e.normalizeClass(["form-control tree-search-input",oe.value]),placeholder:"Search...",onKeydown:e.withKeys(e.withModifiers(ot,["prevent"]),["enter"])},null,42,qe)),[[e.vModelText,p.value]]):e.createCommentVNode("",!0),l.sortable&&l.sortOptions.length>0?(e.openBlock(),e.createElementBlock("div",Fe,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":a[1]||(a[1]=o=>S.value=o),class:e.normalizeClass(["form-select flex-grow-1",oe.value])},[a[4]||(a[4]=e.createElementVNode("option",{value:null,disabled:""},"Sort by...",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.sortOptions,o=>(e.openBlock(),e.createElementBlock("option",{key:o.value,value:o.value},e.toDisplayString(o.label),9,Re))),128))],2),[[e.vModelSelect,S.value]]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["btn btn-outline-secondary",ne.value]),disabled:!S.value,onClick:lt},[e.createVNode(B,{name:A.value==="asc"?"asc":"desc"},null,8,["name"])],10,je)])):e.createCommentVNode("",!0)]),l.isLoading?(e.openBlock(),e.createElementBlock("div",He,[e.createVNode(B,{name:"spinner",class:"me-2"}),a[5]||(a[5]=e.createElementVNode("span",null,"Loading...",-1))])):(e.openBlock(),e.createElementBlock("div",Ze,[U.value.length>0?(e.openBlock(),e.createElementBlock("div",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,o=>(e.openBlock(),e.createBlock(Ne,{key:h(o),item:o,level:0,"selected-items":N.value,"expanded-items":L.value,multiple:l.multiple,"select-all":l.selectAll,"select-mode":l.selectMode,"option-label":l.optionLabel,"option-value":l.optionValue,"disabled-key":l.disabledKey,"disable-branch-node":l.disableBranchNodes,onSelect:tt,onToggleExpand:de},{default:e.withCtx(({item:r,level:s})=>[e.renderSlot(t.$slots,"default",{item:r,level:s},()=>[e.createElementVNode("div",We,[e.createTextVNode(e.toDisplayString($(r))+" ",1),r.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(r.icon)},null,2)):e.createCommentVNode("",!0)])],!0)]),_:2},1032,["item","selected-items","expanded-items","multiple","select-all","select-mode","option-label","option-value","disabled-key","disable-branch-node"]))),128))])):(e.openBlock(),e.createElementBlock("div",Ge,[l.allowAddNew?(e.openBlock(),e.createElementBlock("div",Je,[l.addNewMode==="button"?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"btn btn-success btn-sm w-100",onClick:me},[e.createTextVNode(' No items found "Click" to '+e.toDisplayString(l.addNewLabel)+" ",1),p.value.trim()?(e.openBlock(),e.createElementBlock("span",Qe,' : "'+e.toDisplayString(p.value)+'" ',1)):e.createCommentVNode("",!0)])):l.addNewMode==="enter"?(e.openBlock(),e.createElementBlock("span",Xe,[e.createTextVNode(' No items found "Press Enter" to '+e.toDisplayString(l.addNewLabel)+" ",1),p.value.trim()?(e.openBlock(),e.createElementBlock("span",Ye,' : "'+e.toDisplayString(p.value)+'" ',1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",ve,[e.createVNode(B,{name:"search",class:"me-1"}),a[6]||(a[6]=e.createTextVNode(" No items found ",-1))]))]))]))],544)):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"tooltipRef",ref:f,class:"tree-select-tooltip card shadow-sm py-1 px-2",role:"tooltip",style:{"z-index":"1070"}},e.toDisplayString(Q.value),513)):e.createCommentVNode("",!0)],544))}},[["__scopeId","data-v-9ede757e"]]),_e={install(l){l.component("VSelect",le)}};w.VSelect=le,w.default=_e,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
1
|
+
(function(V,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@popperjs/core")):typeof define=="function"&&define.amd?define(["exports","vue","@popperjs/core"],e):(V=typeof globalThis<"u"?globalThis:V||self,e(V.VueSelect={},V.Vue,V.Popper))})(this,(function(V,e,Q){"use strict";const X=(l,I)=>{const n=l.__vccOpts||l;for(const[u,c]of I)n[u]=c;return n},ye={key:0},ge={key:1},ke={key:2},be={key:3},Be={key:4},we={key:5},Ve={key:6},xe={key:7},B=X({__name:"SvgIcon",props:{name:{type:String,required:!0}},setup(l){const I=l,n=e.computed(()=>({"svg-icon-spin":I.name==="spinner"}));return(u,c)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em",class:e.normalizeClass(n.value)},[l.name==="spinner"?(e.openBlock(),e.createElementBlock("g",ye,c[0]||(c[0]=[e.createElementVNode("path",{d:"M12,4V2A10,10,0,0,0,2,12H4A8,8,0,0,1,12,4Z"},null,-1)]))):e.createCommentVNode("",!0),l.name==="times"?(e.openBlock(),e.createElementBlock("g",ge,c[1]||(c[1]=[e.createElementVNode("path",{d:"M13.41,12l4.3-4.29a1,1,0,1,0-1.42-1.42L12,10.59,7.71,6.29A1,1,0,0,0,6.29,7.71L10.59,12l-4.3,4.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L12,13.41l4.29,4.3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42Z"},null,-1)]))):e.createCommentVNode("",!0),l.name==="chevron-down"?(e.openBlock(),e.createElementBlock("g",ke,c[2]||(c[2]=[e.createElementVNode("path",{d:"M17,9.17a1,1,0,0,0-1.41,0L12,12.71,8.46,9.17a1,1,0,0,0-1.41,0,1,1,0,0,0,0,1.42l4.24,4.24a1,1,0,0,0,1.42,0L17,10.59A1,1,0,0,0,17,9.17Z"},null,-1)]))):e.createCommentVNode("",!0),l.name==="chevron-right"?(e.openBlock(),e.createElementBlock("g",be,c[3]||(c[3]=[e.createElementVNode("path",{d:"M10.83,12l-4.24,4.24a1,1,0,0,0,1.41,1.41L13.66,12,8,6.34A1,1,0,0,0,6.59,7.76Z"},null,-1)]))):e.createCommentVNode("",!0),l.name==="search"?(e.openBlock(),e.createElementBlock("g",Be,c[4]||(c[4]=[e.createElementVNode("path",{d:"M21.71,20.29,18,16.61A9,9,0,1,0,16.61,18l3.68,3.68a1,1,0,0,0,1.42,0A1,1,0,0,0,21.71,20.29ZM11,18a7,7,0,1,1,7-7A7,7,0,0,1,11,18Z"},null,-1)]))):e.createCommentVNode("",!0),l.name==="asc"?(e.openBlock(),e.createElementBlock("g",we,c[5]||(c[5]=[e.createElementVNode("path",{fill:"currentColor",d:"M4.869 11H2.667L6 3h2l3.333 8H9.131l-.41-1H5.28zm1.23-3h1.803L7 5.8zm12.9 8V3h-2v13h-3l4 5l4-5zm-8-3H3v2h4.855L3 19v2h8v-2H6.146L11 15z"},null,-1)]))):e.createCommentVNode("",!0),l.name==="desc"?(e.openBlock(),e.createElementBlock("g",Ve,c[6]||(c[6]=[e.createElementVNode("path",{fill:"currentColor",d:"M4.869 11H2.667L6 3h2l3.333 8H9.131l-.41-1H5.28zm1.23-3h1.803L7 5.8zm15.9 0l-4-5l-4 5h3v13h2V8zm-11 5H3v2h4.855L3 19v2h8v-2H6.146L11 15z"},null,-1)]))):e.createCommentVNode("",!0),l.name==="info-circle"?(e.openBlock(),e.createElementBlock("g",xe,c[7]||(c[7]=[e.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"},null,-1)]))):e.createCommentVNode("",!0)],2))}},[["__scopeId","data-v-89f9b7e1"]]),Se={class:"tree-select-item-wrapper"},Ce={key:1,class:"expander-placeholder"},Ee=["checked",".indeterminate","disabled"],Ne={class:"item-content"},Le={key:0,class:"children-wrapper"},Me=X({__name:"TreeSelectItem",props:{item:{type:Object,required:!0},level:{type:Number,required:!0},selectedItems:{type:Array,required:!0},expandedItems:{type:Set,required:!0},multiple:{type:Boolean,required:!0},selectAll:{type:Boolean,required:!0},selectMode:{type:String,required:!0},optionLabel:{type:String,required:!0},optionValue:{type:String,required:!0},disabledKey:{type:String,default:null},disableBranchNode:{type:Boolean,default:!1}},emits:["select","toggle-expand"],setup(l,{emit:I}){const n=l,u=m=>m[n.optionValue]||m.id||m.value,c=m=>!n.disabledKey||!m?!1:m.hasOwnProperty(n.disabledKey)&&m[n.disabledKey]!==null,k=e.computed(()=>n.item.children&&n.item.children.length>0),C=e.computed(()=>n.expandedItems.has(u(n.item))),p=e.computed(()=>n.selectedItems.includes(u(n.item))),x=m=>{let f=[];return m.children&&m.children.forEach(S=>{f.push(u(S)),f.push(...x(S))}),f},N=e.computed(()=>!n.multiple||!n.selectAll||!k.value||p.value?!1:x(n.item).some(f=>n.selectedItems.includes(f)));return(m,f)=>{const S=e.resolveComponent("TreeSelectItem",!0);return e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("div",{class:e.normalizeClass(["list-group-item list-group-item-action d-flex align-items-center gap-2",{"bg-primary text-white":p.value&&(l.selectMode==="highlight"||!l.multiple)&&!c(l.item)&&!(l.disableBranchNode&&k.value),"is-disabled text-muted bg-light":c(l.item)}]),style:e.normalizeStyle({"padding-left":`${l.level*1.5+1}rem`}),onClick:f[2]||(f[2]=g=>c(l.item)?null:m.$emit("select",l.item))},[k.value?(e.openBlock(),e.createBlock(B,{key:0,name:"chevron-right",class:e.normalizeClass(["expander-icon",{"rotate-90":C.value}]),onClick:f[0]||(f[0]=e.withModifiers(g=>m.$emit("toggle-expand",u(l.item)),["stop"]))},null,8,["class"])):(e.openBlock(),e.createElementBlock("span",Ce)),l.multiple&&l.selectMode==="checkbox"&&!(l.disableBranchNode&&k.value)?(e.openBlock(),e.createElementBlock("input",{key:2,type:"checkbox",class:"form-check-input",checked:p.value,".indeterminate":N.value,disabled:c(l.item),onClick:f[1]||(f[1]=e.withModifiers(g=>m.$emit("select",l.item),["stop"]))},null,40,Ee)):e.createCommentVNode("",!0),e.createElementVNode("div",Ne,[e.renderSlot(m.$slots,"default",{item:l.item,level:l.level},void 0,!0)])],6),k.value&&C.value?(e.openBlock(),e.createElementBlock("div",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.item.children,g=>(e.openBlock(),e.createBlock(S,{key:u(g),item:g,level:l.level+1,"selected-items":l.selectedItems,"expanded-items":l.expandedItems,multiple:l.multiple,"select-all":l.selectAll,"select-mode":l.selectMode,"option-label":l.optionLabel,"option-value":l.optionValue,"disabled-key":l.disabledKey,"disable-branch-node":l.disableBranchNode,onSelect:f[3]||(f[3]=w=>m.$emit("select",w)),onToggleExpand:f[4]||(f[4]=w=>m.$emit("toggle-expand",w))},{default:e.withCtx(({item:w,level:j})=>[e.renderSlot(m.$slots,"default",{item:w,level:j},void 0,!0)]),_:2},1032,["item","level","selected-items","expanded-items","multiple","select-all","select-mode","option-label","option-value","disabled-key","disable-branch-node"]))),128))])):e.createCommentVNode("",!0)])}}},[["__scopeId","data-v-b319a2c7"]]),Ie=["onKeydown"],Ae={class:"tree-select-display-container"},Te={key:0,class:"d-flex align-items-center justify-content-start w-100"},$e=["title"],ze={key:1},De={key:0,class:"text-muted"},Ke={key:1,class:"chips-container"},Pe={class:"d-flex align-items-center gap-2"},Fe={class:"list-group list-group-flush"},Oe={class:"text-wrap text-start me-2"},Re={class:"p-2 border-bottom d-flex flex-column gap-2"},qe=["onKeydown"],je={key:1,class:"d-flex align-items-center gap-2"},He=["value"],Ze=["disabled"],We={key:0,class:"p-4 text-muted text-center"},Ue={key:1,class:"tree-select-body",style:{"max-height":"300px","overflow-y":"auto"}},Ge={key:0,class:"list-group list-group-flush"},Je={class:"d-flex align-items-center gap-2",style:{"white-space":"wrap"}},Qe={key:1,class:"p-3 text-muted text-center"},Xe={key:0},Ye={key:0},ve={key:1},_e={key:0},et={key:1},ne=X({__name:"TreeSelectMain",props:{modelValue:{type:[String,Number,Array],default:null},displayMode:{type:String,default:"text",validator:l=>["text","chips"].includes(l)},items:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},selectMode:{type:String,default:"checkbox",validator:l=>["checkbox","highlight"].includes(l)},placeholder:{type:String,default:"Select item..."},isInvalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},isLoading:{type:Boolean,default:!1},showClearButton:{type:Boolean,default:!0},selectAll:{type:Boolean,default:!1},deselectAll:{type:Boolean,default:!0},canDeselect:{type:Boolean,default:!0},optionLabel:{type:String,default:"value"},optionValue:{type:String,default:"code"},disabledKey:{type:String,default:null},excludeFromSelectedListKey:{type:String,default:null},disableBranchNodes:{type:Boolean,default:!1},size:{type:String,default:"sm",validator:l=>["sm","md","lg","xl"].includes(l)},sortable:{type:Boolean,default:!1},sortOptions:{type:Array,default:()=>[]},defaultSortKey:{type:String,default:null},defaultSortDirection:{type:String,default:"asc",validator:l=>["asc","desc"].includes(l)},maxVisibleChipsDisplay:{type:Number,default:3},closeOnSelect:{type:Boolean,default:!0},allowAddNew:{type:Boolean,default:!1},addNewMode:{type:String,default:"button",validator:l=>["button","enter"].includes(l)},addNewLabel:{type:String,default:"Add new record"},keyFilters:{type:Array,default:()=>[]}},emits:["update:modelValue","change","clear","deselect","select","focus","blur","add-new"],setup(l,{emit:I}){const n=l,u=I,c=e.ref(null),k=e.ref(null),C=e.ref(null),p=e.ref(""),x=e.ref(!1),N=e.ref(new Set),m=e.ref(null),f=e.ref(null),S=e.ref(null),g=e.ref(!1),w=e.ref(null),j=e.ref(null),T=e.ref(!1),L=e.ref(n.defaultSortKey),$=e.ref(n.defaultSortDirection),z=e.ref(null),H=e.ref(null),D=e.ref(!1),Z=e.ref(null),oe=e.computed(()=>n.size==="sm"?"btn-sm":n.size==="lg"?"btn-lg":n.size==="xl"?"btn-xl":""),ae=e.computed(()=>n.size==="sm"?"form-control-sm":n.size==="lg"?"form-control-lg":n.size==="xl"?"form-control-xl":""),lt=e.computed(()=>U.value===0?[]:W.value.slice(n.maxVisibleChipsDisplay)),K=e.computed(()=>!n.multiple||!n.excludeFromSelectedListKey?E.value:E.value.filter(t=>{const a=F(t);return!a||!a[n.excludeFromSelectedListKey]})),re=e.computed(()=>{const t=K.value;if(t.length===0)return n.placeholder;if(n.multiple){if(t.length===1){const o=O(t[0]);return o?o.join(" → "):t[0]}return`${t.length} items selected`}const a=O(t[0]);return a?a.join(" → "):t[0]}),se=async()=>{await e.nextTick();const t=j.value;if(n.multiple||n.displayMode==="chips"||K.value.length===0||!t){T.value=!1;return}T.value=t.scrollWidth>t.clientWidth},A=t=>t&&(t[n.optionLabel]||t.label||t.name)||"",h=t=>t?t[n.optionValue]||t.id||t.value:null,Y=t=>!n.disabledKey||!t?!1:t.hasOwnProperty(n.disabledKey)&&t[n.disabledKey]!==null,b=t=>t.children&&t.children.length>0,P=(t,a)=>{if(a)return a.split(".").reduce((o,r)=>o&&o[r],t)},F=(t,a=n.items)=>{for(const o of a){if(h(o)===t)return o;if(b(o)){const r=F(t,o.children);if(r)return r}}return null},v=t=>{const a=[];return b(t)&&t.children.forEach(o=>{Y(o)||(a.push(h(o)),a.push(...v(o)))}),a},_=(t,a=n.items,o=[])=>{for(const r of a){if(h(r)===t)return o;if(b(r)){const s=_(t,r.children,[...o,h(r)]);if(s)return s}}return null},E=e.computed(()=>{const t=new Set(Array.isArray(n.modelValue)?n.modelValue:[n.modelValue].filter(Boolean));if(n.multiple&&n.selectAll){const a=o=>{o.forEach(r=>{if(b(r)){const s=r.children.filter(d=>!Y(d));s.length>0&&s.every(d=>t.has(h(d)))&&t.add(h(r)),a(r.children)}})};a(n.items)}return Array.from(t)}),O=(t,a=n.items,o=[])=>{for(const r of a){const s=[...o,A(r)];if(h(r)===t)return s;if(b(r)){const i=O(t,r.children,s);if(i)return i}}return null},ie=t=>{if(!t||t.length===0)return"";const a=t.join(" → ");return a.length<=40?a:t.length>2?`${t[0]} → ... → ${t[t.length-1]}`:a},ee=e.computed(()=>{const t=K.value;if(t.length===0)return n.placeholder;if(n.multiple){if(t.length===1){const o=O(t[0]);return o?ie(o):t[0]}return`${t.length} items selected`}const a=O(t[0]);return a?ie(a):t[0]}),W=e.computed(()=>{if(!n.multiple||K.value.length===0)return[];const t=K.value.map(r=>F(r)).filter(Boolean);if(!n.sortable||!L.value)return t;const a=L.value,o=$.value;return[...t].sort((r,s)=>{const i=P(r,a),d=P(s,a);if(i==null)return 1;if(d==null)return-1;let y=0;return typeof i=="string"&&typeof d=="string"?y=i.localeCompare(d):i>d?y=1:i<d&&(y=-1),o==="desc"?y*-1:y})}),ce=e.computed(()=>W.value.slice(0,n.maxVisibleChipsDisplay)),U=e.computed(()=>{const t=W.value.length-n.maxVisibleChipsDisplay;return t>0?t:0}),de=(t,a)=>{const o=a.toLowerCase();return t.map(r=>{let s=!1;if(n.keyFilters&&n.keyFilters.length>0)for(const d of n.keyFilters){const y=P(r,d);if(y!=null&&String(y).toLowerCase().includes(o)){s=!0;break}}else s=A(r).toLowerCase().includes(o);if(!b(r))return s?r:null;const i=de(r.children,a);return s?{...r,children:r.children}:i.length>0?{...r,children:i}:null}).filter(Boolean)},me=(t,a,o)=>!t||!a?t:[...t].sort((s,i)=>{const d=P(s,a),y=P(i,a);if(d==null)return 1;if(y==null)return-1;let q=0;return typeof d=="string"&&typeof y=="string"?q=d.localeCompare(y):d>y?q=1:d<y&&(q=-1),o==="desc"?q*-1:q}).map(s=>b(s)?{...s,children:me(s.children,a,o)}:s),G=e.computed(()=>{const t=p.value.trim(),a=t?de(n.items,t):n.items;return!n.sortable||!L.value?a:me(a,L.value,$.value)}),nt=t=>{if(n.disableBranchNodes&&b(t)){const s=h(t);ue(s);return}if(Y(t))return;const a=h(t);let o=new Set(E.value);if(n.multiple){const s=o.has(a);if(n.selectAll&&b(t)){const i=v(t);s?(o.delete(a),u("deselect",t),n.deselectAll&&i.forEach(d=>o.delete(d))):(o.add(a),i.forEach(d=>o.add(d)),u("select",t))}else s?(o.delete(a),n.selectAll&&_(a)?.forEach(d=>o.delete(d))):o.add(a)}else{const s=n.modelValue,i=h(t);s===i?(o.clear(),u("deselect",t)):(o.clear(),o.add(i),s!=null&&F(s),u("select",t)),n.closeOnSelect&&M(),e.nextTick(()=>{C.value?.focus()})}let r=Array.from(o);n.multiple&&n.excludeFromSelectedListKey&&(r=r.filter(s=>{const i=F(s);return!i||!i[n.excludeFromSelectedListKey]})),u("update:modelValue",n.multiple?r:r[0]||null),u("change",n.multiple?r:r[0]||null)},te=t=>{if(n.disabled||!t)return;const a=h(t),o=new Set(E.value);o.delete(a),n.selectAll&&(n.deselectAll&&b(t)&&v(t).forEach(d=>o.delete(d)),_(a)?.forEach(i=>o.delete(i)));const r=Array.from(o);u("update:modelValue",r),u("change",r)},ue=t=>{N.value.has(t)?N.value.delete(t):N.value.add(t)},ot=()=>{$.value=$.value==="asc"?"desc":"asc"},at=()=>{const t=n.multiple?[]:null;u("clear"),u("update:modelValue",t),u("change",t),R()},fe=()=>{!n.allowAddNew||!p.value.trim()||(u("add-new",p.value.trim()),M())},rt=()=>{n.allowAddNew&&n.addNewMode==="enter"&&p.value.trim()&&G.value.length===0&&fe()},st=t=>{u("focus",t)},it=async()=>{n.disabled||(R(),x.value=!0,J(),await e.nextTick(),k.value&&C.value&&(m.value=Q.createPopper(C.value,k.value,{placement:"bottom-start",strategy:"fixed",modifiers:[{name:"offset",options:{offset:[0,4]}},{name:"preventOverflow",options:{padding:8}},{name:"flip",options:{fallbackPlacements:["top-start"]}},{name:"sameWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:t})=>{t.styles.popper.width=`${t.rects.reference.width}px`},effect:({state:t})=>{t.elements.popper.style.width=`${t.elements.reference.offsetWidth}px`}}]})),n.searchable&&(await e.nextTick(),k.value?.querySelector(".tree-search-input")?.focus()))},M=()=>{x.value=!1,p.value="",m.value?.destroy(),m.value=null,u("blur",n.modelValue)},le=()=>x.value?M():it(),ct=async()=>{M(),J(),D.value=!0,await e.nextTick(),H.value&&z.value&&(Z.value=Q.createPopper(z.value,H.value,{placement:"bottom-end",strategy:"fixed",modifiers:[{name:"offset",options:{offset:[0,4]}}]}))},R=()=>{D.value=!1,Z.value?.destroy(),Z.value=null},pe=()=>D.value?R():ct(),he=t=>{x.value&&!C.value?.contains(t.target)&&!k.value?.contains(t.target)&&M(),D.value&&!z.value?.contains(t.target)&&!H.value?.contains(t.target)&&R(),g.value&&!w.value?.$el?.contains(t.target)&&!f.value?.contains(t.target)&&J()},dt=t=>{c.value?.contains(t.relatedTarget)||M()},mt=async()=>{!T.value||g.value||(M(),R(),g.value=!0,await e.nextTick(),f.value&&w.value&&(S.value=Q.createPopper(w.value.$el,f.value,{placement:"top",strategy:"fixed",modifiers:[{name:"offset",options:{offset:[0,8]}}]})))},ut=()=>{g.value?J():mt()},J=()=>{g.value=!1,S.value?.destroy(),S.value=null};return e.watch(p,t=>{if(t.trim()){const a=o=>{o.forEach(r=>{b(r)&&(N.value.add(h(r)),a(r.children))})};a(G.value)}}),e.watch(ee,()=>{se()}),e.onMounted(()=>{document.addEventListener("click",he),se()}),e.onUnmounted(()=>{document.removeEventListener("click",he),m.value?.destroy(),Z.value?.destroy(),S.value?.destroy()}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:c,class:"tree-select-wrapper",onFocusin:st,onFocusout:dt},[e.createElementVNode("div",{ref_key:"triggerRef",ref:C,role:"button",tabindex:"0",class:e.normalizeClass(["btn tree-select-trigger w-100 d-flex justify-content-between align-items-center tree-select-main",[oe.value,{"btn-outline-secondary":!l.isInvalid,"border-danger":l.isInvalid,disabled:l.disabled||l.isLoading,"is-loading":l.isLoading,"has-chips":l.multiple&&l.displayMode==="chips"&&E.value.length>0}]]),onClick:le,onKeydown:[e.withKeys(e.withModifiers(le,["prevent"]),["enter"]),e.withKeys(e.withModifiers(le,["prevent"]),["space"])]},[e.createElementVNode("div",Ae,[e.renderSlot(t.$slots,"display",{selectedItems:W.value,displayText:ee.value,placeholder:l.placeholder,isLoading:l.isLoading,removeItem:te,getItemLabel:A,getItemValue:h,visibleChips:ce.value,hiddenChipsCount:U.value,toggleMorePopover:pe,moreTriggerRef:z.value},()=>[!l.multiple||l.displayMode==="text"?(e.openBlock(),e.createElementBlock("div",Te,[e.createElementVNode("span",{ref_key:"textDisplaySpanRef",ref:j,class:"text-truncate",title:T.value?re.value:""},e.toDisplayString(l.isLoading?"Loading data...":ee.value),9,$e),T.value&&!l.isLoading?(e.openBlock(),e.createBlock(B,{key:0,ref_key:"tooltipTriggerIconRef",ref:w,name:"info-circle",class:"tooltip-trigger-icon ms-2 flex-shrink-0",onClick:e.withModifiers(ut,["stop"])},null,512)):e.createCommentVNode("",!0)])):l.multiple&&l.displayMode==="chips"?(e.openBlock(),e.createElementBlock("div",ze,[E.value.length===0?(e.openBlock(),e.createElementBlock("span",De,e.toDisplayString(l.placeholder),1)):(e.openBlock(),e.createElementBlock("div",Ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ce.value,o=>(e.openBlock(),e.createElementBlock("span",{key:h(o),class:"badge text-bg-primary chip bg-primary"},[e.createTextVNode(e.toDisplayString(A(o))+" ",1),e.createVNode(B,{name:"times",class:"chip-remove",onClick:e.withModifiers(r=>te(o),["stop"])},null,8,["onClick"])]))),128)),U.value>0?(e.openBlock(),e.createElementBlock("button",{key:0,ref_key:"moreTriggerRef",ref:z,type:"button",class:"btn btn-sm btn-light more-button",onClick:e.withModifiers(pe,["stop"])}," +"+e.toDisplayString(U.value),513)):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0)],!0)]),e.createElementVNode("div",Pe,[l.isLoading?(e.openBlock(),e.createBlock(B,{key:0,name:"spinner",class:"loading-icon"})):e.createCommentVNode("",!0),l.showClearButton&&E.value.length>0&&!l.disabled&&!l.isLoading?(e.openBlock(),e.createBlock(B,{key:1,name:"times",onClick:e.withModifiers(at,["stop"]),class:"clear-icon"})):e.createCommentVNode("",!0),l.isLoading?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(B,{key:2,name:"chevron-down",class:e.normalizeClass(["transition-transform",{"rotate-180":x.value}])},null,8,["class"]))])],42,Ie),D.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"morePopoverRef",ref:H,class:"card shadow-lg border-0 more-popover",style:{"z-index":"1060"}},[e.createElementVNode("div",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt.value,o=>(e.openBlock(),e.createElementBlock("div",{key:h(o),class:"list-group-item d-flex justify-content-between align-items-center py-1 px-2"},[e.createElementVNode("small",Oe,e.toDisplayString(A(o)),1),l.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(B,{key:0,name:"times",class:"chip-remove flex-shrink-0",onClick:e.withModifiers(r=>te(o),["stop"])},null,8,["onClick"]))]))),128))])],512)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"dropdownRef",ref:k,class:"tree-select-dropdown card shadow-lg border-0",onMousedown:a[2]||(a[2]=e.withModifiers(()=>{},["prevent"])),onClick:a[3]||(a[3]=e.withModifiers(()=>{},["stop"])),style:{"z-index":"1050"}},[e.createElementVNode("div",Re,[l.searchable?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":a[0]||(a[0]=o=>p.value=o),type:"text",class:e.normalizeClass(["form-control tree-search-input",ae.value]),placeholder:"Search...",onKeydown:e.withKeys(e.withModifiers(rt,["prevent"]),["enter"])},null,42,qe)),[[e.vModelText,p.value]]):e.createCommentVNode("",!0),l.sortable&&l.sortOptions.length>0?(e.openBlock(),e.createElementBlock("div",je,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":a[1]||(a[1]=o=>L.value=o),class:e.normalizeClass(["form-select flex-grow-1",ae.value])},[a[4]||(a[4]=e.createElementVNode("option",{value:null,disabled:""},"Sort by...",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.sortOptions,o=>(e.openBlock(),e.createElementBlock("option",{key:o.value,value:o.value},e.toDisplayString(o.label),9,He))),128))],2),[[e.vModelSelect,L.value]]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["btn btn-outline-secondary",oe.value]),disabled:!L.value,onClick:ot},[e.createVNode(B,{name:$.value==="asc"?"asc":"desc"},null,8,["name"])],10,Ze)])):e.createCommentVNode("",!0)]),l.isLoading?(e.openBlock(),e.createElementBlock("div",We,[e.createVNode(B,{name:"spinner",class:"me-2"}),a[5]||(a[5]=e.createElementVNode("span",null,"Loading...",-1))])):(e.openBlock(),e.createElementBlock("div",Ue,[G.value.length>0?(e.openBlock(),e.createElementBlock("div",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,o=>(e.openBlock(),e.createBlock(Me,{key:h(o),item:o,level:0,"selected-items":E.value,"expanded-items":N.value,multiple:l.multiple,"select-all":l.selectAll,"select-mode":l.selectMode,"option-label":l.optionLabel,"option-value":l.optionValue,"disabled-key":l.disabledKey,"disable-branch-node":l.disableBranchNodes,onSelect:nt,onToggleExpand:ue},{default:e.withCtx(({item:r,level:s})=>[e.renderSlot(t.$slots,"default",{item:r,level:s},()=>[e.createElementVNode("div",Je,[e.createTextVNode(e.toDisplayString(A(r))+" ",1),r.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(r.icon)},null,2)):e.createCommentVNode("",!0)])],!0)]),_:2},1032,["item","selected-items","expanded-items","multiple","select-all","select-mode","option-label","option-value","disabled-key","disable-branch-node"]))),128))])):(e.openBlock(),e.createElementBlock("div",Qe,[l.allowAddNew?(e.openBlock(),e.createElementBlock("div",Xe,[l.addNewMode==="button"?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"btn btn-success btn-sm w-100",onClick:fe},[e.createTextVNode(' No items found "Click" to '+e.toDisplayString(l.addNewLabel)+" ",1),p.value.trim()?(e.openBlock(),e.createElementBlock("span",Ye,' : "'+e.toDisplayString(p.value)+'" ',1)):e.createCommentVNode("",!0)])):l.addNewMode==="enter"?(e.openBlock(),e.createElementBlock("span",ve,[e.createTextVNode(' No items found "Press Enter" to '+e.toDisplayString(l.addNewLabel)+" ",1),p.value.trim()?(e.openBlock(),e.createElementBlock("span",_e,' : "'+e.toDisplayString(p.value)+'" ',1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",et,[e.createVNode(B,{name:"search",class:"me-1"}),a[6]||(a[6]=e.createTextVNode(" No items found ",-1))]))]))]))],544)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",{ref_key:"tooltipRef",ref:f,class:"tree-select-tooltip card shadow-sm py-1 px-2",role:"tooltip",style:{"z-index":"1070"}},e.toDisplayString(re.value),513),[[e.vShow,g.value]])],544))}},[["__scopeId","data-v-9c230074"]]),tt={install(l){l.component("VSelect",ne)}};V.VSelect=ne,V.default=tt,Object.defineProperties(V,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|