bitboss-ui 0.2.49 → 0.2.51
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/index101.js +2 -2
- package/dist/index103.js +2 -2
- package/dist/index109.js +1 -1
- package/dist/index11.js +2 -2
- package/dist/index111.js +3 -3
- package/dist/index113.js +1 -1
- package/dist/index116.js +1 -1
- package/dist/index117.js +1 -1
- package/dist/index118.js +1 -1
- package/dist/index119.js +1 -1
- package/dist/index125.js +1 -1
- package/dist/index126.js +1 -1
- package/dist/index127.js +1 -1
- package/dist/index131.js +2 -2
- package/dist/index15.js +8 -8
- package/dist/index17.js +9 -9
- package/dist/index19.js +3 -3
- package/dist/index197.js +366 -8
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +2 -5
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +2 -16
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +4 -16
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +372 -18
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +131 -17
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +5 -29
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +19 -8
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +2 -2
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +159 -353
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +23 -134
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +2 -2
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +3 -174
- package/dist/index209.js.map +1 -1
- package/dist/index21.js +2 -2
- package/dist/index210.js +3 -23
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +8 -371
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +3 -2
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +35 -4
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +5 -234
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +2 -2
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +16 -3
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +16 -35
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +20 -6
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +29 -2
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +8 -3
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +235 -3
- package/dist/index221.js.map +1 -1
- package/dist/index223.js +4 -4
- package/dist/index226.js +115 -77
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +106 -2
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +4 -69
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +6 -5
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +2 -160
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +297 -1
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +2 -15
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +2 -295
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +78 -5
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +2 -2
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +224 -2
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +258 -2
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +435 -2
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +89 -2
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +160 -2
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +1 -4
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +199 -116
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +2 -106
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +2 -4
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +2 -2
- package/dist/index246.js +2 -435
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +68 -88
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +5 -224
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +12 -255
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +2 -2
- package/dist/index250.js +2 -200
- package/dist/index250.js.map +1 -1
- package/dist/index254.js +3 -2
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +2 -3
- package/dist/index255.js.map +1 -1
- package/dist/index29.js +3 -3
- package/dist/index31.js +304 -317
- package/dist/index31.js.map +1 -1
- package/dist/index33.js +1 -1
- package/dist/index35.js +2 -2
- package/dist/index47.js +1 -1
- package/dist/index49.js +1 -1
- package/dist/index65.js +3 -3
- package/dist/index72.js +1 -1
- package/dist/index75.js +1 -1
- package/dist/index77.js +1 -1
- package/dist/index79.js +3 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index31.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineComponent as Ne, ref as v, computed as w, onMounted as $e, onBeforeUnmount as De, watch as ee, openBlock as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as Ne, ref as v, computed as w, onMounted as $e, onBeforeUnmount as De, watch as ee, openBlock as b, createElementBlock as y, normalizeClass as B, renderSlot as h, createElementVNode as V, Fragment as L, renderList as j, toDisplayString as F, createBlock as ie, withModifiers as E, withCtx as Le, createTextVNode as le, createCommentVNode as oe, withDirectives as Fe, vModelDynamic as Ae, Teleport as Je, normalizeStyle as Me, createVNode as qe, mergeProps as ze, nextTick as Q } from "vue";
|
|
2
|
+
import He from "./index115.js";
|
|
3
3
|
import "./index158.js";
|
|
4
|
-
import
|
|
4
|
+
import Pe from "./index119.js";
|
|
5
5
|
import "./index185.js";
|
|
6
|
-
import { autoUpdate as
|
|
6
|
+
import { autoUpdate as je, computePosition as Qe, flip as Ue, shift as We } from "./index197.js";
|
|
7
7
|
import { deepEqual as re } from "./index123.js";
|
|
8
|
-
import { head as te } from "./
|
|
9
|
-
import { isNotNil as
|
|
10
|
-
import { last as
|
|
8
|
+
import { head as te } from "./index198.js";
|
|
9
|
+
import { isNotNil as I } from "./index124.js";
|
|
10
|
+
import { last as Re } from "./index199.js";
|
|
11
11
|
import { useItemText as Ke } from "./index125.js";
|
|
12
12
|
import { useItemValue as Ye } from "./index126.js";
|
|
13
|
-
import { wait as
|
|
14
|
-
import { when as Ze } from "./
|
|
15
|
-
import { offset as Ge } from "./
|
|
13
|
+
import { wait as q } from "./index122.js";
|
|
14
|
+
import { when as Ze } from "./index200.js";
|
|
15
|
+
import { offset as Ge } from "./index201.js";
|
|
16
16
|
const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomplete", "autofocus", "disabled", "placeholder", "readonly"], ll = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "bb-base-select__loading-container"
|
|
19
19
|
}, tl = {
|
|
20
20
|
key: 1,
|
|
21
21
|
class: "bb-base-select__no-data-container"
|
|
22
|
-
}, al = ["id", "aria-selected"], nl = { class: "bb-base-select-option__content" },
|
|
22
|
+
}, al = ["id", "aria-selected"], nl = { class: "bb-base-select-option__content" }, ul = { class: "bb-base-select-option__text" }, sl = { class: "bb-base-select__chevron" }, il = /* @__PURE__ */ V("svg", {
|
|
23
23
|
fill: "none",
|
|
24
24
|
viewBox: "0 0 16 8",
|
|
25
25
|
xmlns: "http://www.w3.org/2000/svg"
|
|
@@ -30,7 +30,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
30
30
|
fill: "currentColor",
|
|
31
31
|
"fill-rule": "evenodd"
|
|
32
32
|
})
|
|
33
|
-
], -1),
|
|
33
|
+
], -1), kl = /* @__PURE__ */ Ne({
|
|
34
34
|
__name: "BaseSelect",
|
|
35
35
|
props: {
|
|
36
36
|
allowWriting: { type: Boolean, default: !0 },
|
|
@@ -66,162 +66,151 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
66
66
|
updateOnAnimationFrame: { type: Boolean, default: !1 }
|
|
67
67
|
},
|
|
68
68
|
emits: ["blur", "change", "click", "focus", "inactive", "input", "update:modelValue"],
|
|
69
|
-
setup(
|
|
70
|
-
const
|
|
71
|
-
if (
|
|
69
|
+
setup(ce, { emit: de }) {
|
|
70
|
+
const l = ce, f = de;
|
|
71
|
+
if (l.multiple && !Array.isArray(l.modelValue))
|
|
72
72
|
throw new Error('Multiple is set to "true" but modelValue is not an array.');
|
|
73
|
-
const
|
|
73
|
+
const T = v(null), N = v(null), c = v(null), S = v(null), s = v(""), fe = w(() => o.value.length ? "" : l.placeholder), d = v(0), ve = l.transitionDuration / 1e3 + "s";
|
|
74
74
|
let ae;
|
|
75
75
|
$e(async () => {
|
|
76
|
-
|
|
76
|
+
N.value && c.value && (ae = je(
|
|
77
77
|
N.value,
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
c.value,
|
|
79
|
+
ge,
|
|
80
80
|
{
|
|
81
81
|
ancestorResize: !0,
|
|
82
82
|
ancestorScroll: !0,
|
|
83
|
-
animationFrame:
|
|
83
|
+
animationFrame: l.updateOnAnimationFrame,
|
|
84
84
|
elementResize: !0
|
|
85
85
|
}
|
|
86
86
|
));
|
|
87
87
|
}), De(() => {
|
|
88
|
-
|
|
88
|
+
ae();
|
|
89
89
|
});
|
|
90
|
-
const ne = v([]), m = v([]),
|
|
91
|
-
|
|
92
|
-
const t = me(l, e.itemText), n = pe(l, e.itemValue);
|
|
90
|
+
const ne = v([]), m = v([]), k = v([]), { getItemText: me } = Ke(), { getItemValue: pe } = Ye(), be = w(() => ne.value.map((e, a) => {
|
|
91
|
+
const t = me(e, l.itemText), n = pe(e, l.itemValue);
|
|
93
92
|
if (n === void 0)
|
|
94
93
|
throw new Error(
|
|
95
|
-
'The result of extracting "value" from option was undefined. Affected item is ' + JSON.stringify(
|
|
94
|
+
'The result of extracting "value" from option was undefined. Affected item is ' + JSON.stringify(e) + " please check itemValue property is correct."
|
|
96
95
|
);
|
|
97
|
-
const
|
|
96
|
+
const u = JSON.stringify(n);
|
|
98
97
|
return {
|
|
99
|
-
disabled: !!
|
|
100
|
-
id: "option_" +
|
|
101
|
-
jsonValue:
|
|
98
|
+
disabled: !!e.disabled,
|
|
99
|
+
id: "option_" + u.replace(/\W/g, "_"),
|
|
100
|
+
jsonValue: u,
|
|
102
101
|
manual: !1,
|
|
103
|
-
original:
|
|
102
|
+
original: e,
|
|
104
103
|
text: t,
|
|
105
104
|
value: n
|
|
106
105
|
};
|
|
107
|
-
})),
|
|
108
|
-
let
|
|
109
|
-
(n,
|
|
106
|
+
})), g = w(() => {
|
|
107
|
+
let e = be.value.reduce(
|
|
108
|
+
(n, u) => (n[u.id] = u, n),
|
|
110
109
|
{}
|
|
111
110
|
);
|
|
112
|
-
const a =
|
|
113
|
-
(n,
|
|
114
|
-
|
|
111
|
+
const a = k.value.reduce(
|
|
112
|
+
(n, u) => (n[u.id] || (n[u.id] = u), n),
|
|
113
|
+
e
|
|
115
114
|
), t = m.value.reduce(
|
|
116
|
-
(n,
|
|
115
|
+
(n, u) => (n[u.id] || (n[u.id] = u), n),
|
|
117
116
|
a
|
|
118
117
|
);
|
|
119
|
-
return
|
|
120
|
-
|
|
121
|
-
withManual: a,
|
|
122
|
-
withStash: t
|
|
123
|
-
}), Object.values(t).map(
|
|
124
|
-
(n, o) => ({
|
|
118
|
+
return Object.values(t).map(
|
|
119
|
+
(n, u) => ({
|
|
125
120
|
...n,
|
|
126
|
-
selected:
|
|
127
|
-
index:
|
|
121
|
+
selected: I(he.value.get(n.value)),
|
|
122
|
+
index: u
|
|
128
123
|
})
|
|
129
124
|
);
|
|
130
|
-
}),
|
|
131
|
-
e
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
) ? l = y.value.filter((a) => {
|
|
125
|
+
}), C = w(() => {
|
|
126
|
+
let e = [];
|
|
127
|
+
return s.value && !o.value.some(
|
|
128
|
+
(a) => a.text === s.value
|
|
129
|
+
) ? e = g.value.filter((a) => {
|
|
136
130
|
let t = !1;
|
|
137
|
-
if (
|
|
138
|
-
if (typeof
|
|
139
|
-
t =
|
|
140
|
-
else if (
|
|
141
|
-
const n = [].concat(
|
|
142
|
-
for (let
|
|
143
|
-
const x = n[
|
|
144
|
-
t = t || a.original[x] && a.original[x].toLowerCase().includes(
|
|
131
|
+
if (l.filterBy) {
|
|
132
|
+
if (typeof l.filterBy == "function")
|
|
133
|
+
t = l.filterBy(a.value, a.original);
|
|
134
|
+
else if (l.filterBy.length) {
|
|
135
|
+
const n = [].concat(l.filterBy);
|
|
136
|
+
for (let u = 0; u < n.length; u++) {
|
|
137
|
+
const x = n[u];
|
|
138
|
+
t = t || a.original[x] && a.original[x].toLowerCase().includes(s.value.toLowerCase());
|
|
145
139
|
}
|
|
146
140
|
}
|
|
147
141
|
} else
|
|
148
142
|
return !0;
|
|
149
|
-
return t || a.text.toLowerCase().includes(
|
|
150
|
-
}) :
|
|
143
|
+
return t || a.text.toLowerCase().includes(s.value.toLowerCase());
|
|
144
|
+
}) : e = g.value, e.map((a, t) => ({
|
|
151
145
|
...a,
|
|
152
|
-
focused:
|
|
146
|
+
focused: O.value === t
|
|
153
147
|
}));
|
|
154
|
-
}),
|
|
155
|
-
() =>
|
|
156
|
-
(
|
|
157
|
-
...
|
|
148
|
+
}), z = w(
|
|
149
|
+
() => g.value.reduce(
|
|
150
|
+
(e, a) => ({
|
|
151
|
+
...e,
|
|
158
152
|
[a.id]: a
|
|
159
153
|
}),
|
|
160
154
|
{}
|
|
161
155
|
)
|
|
162
156
|
), p = w(() => {
|
|
163
|
-
if (
|
|
164
|
-
let
|
|
157
|
+
if (l.matchStrategy === "string") {
|
|
158
|
+
let e = g.value.reduce(
|
|
165
159
|
(a, t) => (a[t.jsonValue] = t, a),
|
|
166
160
|
{}
|
|
167
161
|
);
|
|
168
162
|
return {
|
|
169
|
-
get: (a) =>
|
|
163
|
+
get: (a) => e[JSON.stringify(a)]
|
|
170
164
|
};
|
|
171
|
-
} else if (
|
|
172
|
-
let
|
|
165
|
+
} else if (l.matchStrategy === "equality") {
|
|
166
|
+
let e = g.value.map((a) => [
|
|
173
167
|
a.value,
|
|
174
168
|
a
|
|
175
169
|
]);
|
|
176
170
|
return {
|
|
177
171
|
get: (a) => {
|
|
178
172
|
var t;
|
|
179
|
-
return (t =
|
|
173
|
+
return (t = e.find((n) => re(n[0], a))) == null ? void 0 : t[1];
|
|
180
174
|
}
|
|
181
175
|
};
|
|
182
176
|
} else
|
|
183
177
|
throw new Error("No match strategy has been defined");
|
|
184
|
-
}),
|
|
185
|
-
if (
|
|
186
|
-
let
|
|
187
|
-
return [].concat(
|
|
188
|
-
|
|
178
|
+
}), he = w(() => {
|
|
179
|
+
if (l.matchStrategy === "string") {
|
|
180
|
+
let e = {};
|
|
181
|
+
return [].concat(l.modelValue).forEach((a, t) => {
|
|
182
|
+
e[JSON.stringify(a)] = t;
|
|
189
183
|
}), {
|
|
190
|
-
get: (a) =>
|
|
184
|
+
get: (a) => e[JSON.stringify(a)]
|
|
191
185
|
};
|
|
192
|
-
} else if (
|
|
193
|
-
const
|
|
186
|
+
} else if (l.matchStrategy === "equality") {
|
|
187
|
+
const e = [].concat(l.modelValue).filter(I).map((a, t) => [a, t]);
|
|
194
188
|
return {
|
|
195
189
|
get: (a) => {
|
|
196
190
|
var t;
|
|
197
|
-
return (t =
|
|
191
|
+
return (t = e.find((n) => re(n[0], a))) == null ? void 0 : t[1];
|
|
198
192
|
}
|
|
199
193
|
};
|
|
200
194
|
} else
|
|
201
195
|
throw new Error("No match strategy has been defined");
|
|
202
|
-
}),
|
|
196
|
+
}), o = w(() => [].concat(l.modelValue).reduce((e, a) => {
|
|
203
197
|
const t = p.value.get(a);
|
|
204
|
-
return t &&
|
|
205
|
-
}, []))
|
|
206
|
-
e.debug && console.log("Running onOptionSelected", { option: l });
|
|
198
|
+
return t && e.push(t), e;
|
|
199
|
+
}, [])), A = async (e) => {
|
|
207
200
|
let a;
|
|
208
|
-
|
|
209
|
-
(t) => t.id !==
|
|
210
|
-
)), a =
|
|
211
|
-
(t) => JSON.stringify(t) !==
|
|
212
|
-
),
|
|
213
|
-
|
|
214
|
-
),
|
|
215
|
-
|
|
216
|
-
)), a = null, e.stash && (e.debug && console.log("onOptionSelected: inside single > selected > stash"), m.value = []), u.value = "") : (e.debug && console.log("onOptionSelected: inside single > not selected"), a = l.value, e.stash && (e.debug && console.log("onOptionSelected: inside single > not selected > stash"), m.value = [l]), u.value = l.text), f("update:modelValue", a);
|
|
217
|
-
}, $ = async ({ prefill: l = !1 }) => {
|
|
218
|
-
e.debug && console.log("running getOptions");
|
|
201
|
+
l.multiple ? (e.selected ? (e.manual && (k.value = k.value.filter(
|
|
202
|
+
(t) => t.id !== e.id
|
|
203
|
+
)), a = l.modelValue.filter(
|
|
204
|
+
(t) => JSON.stringify(t) !== e.jsonValue
|
|
205
|
+
), l.stash && (m.value = m.value.filter((t) => t.id !== e.id))) : (a = l.modelValue.concat(e.value), l.stash && (m.value = m.value.concat(e))), l.resetQueryOnOptionSelected && (s.value = "")) : e.selected ? (e.manual && (k.value = k.value.filter(
|
|
206
|
+
(t) => t.id !== e.id
|
|
207
|
+
)), a = null, l.stash && (m.value = []), s.value = "") : (a = e.value, l.stash && (m.value = [e]), s.value = e.text), f("update:modelValue", a);
|
|
208
|
+
}, $ = async ({ prefill: e = !1 }) => {
|
|
219
209
|
let a = [];
|
|
220
|
-
Array.isArray(
|
|
221
|
-
},
|
|
222
|
-
e.
|
|
223
|
-
|
|
224
|
-
text: l,
|
|
210
|
+
Array.isArray(l.items) ? a = l.items : typeof l.items == "function" && (d.value++, a = await l.items(s.value, e, l.modelValue), d.value--), ne.value = a;
|
|
211
|
+
}, ye = () => {
|
|
212
|
+
const e = s.value, a = s.value, t = JSON.stringify(a), n = {
|
|
213
|
+
text: e,
|
|
225
214
|
value: a,
|
|
226
215
|
jsonValue: t,
|
|
227
216
|
id: "option_" + t.replace(/\W/g, "_"),
|
|
@@ -229,127 +218,125 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
229
218
|
manual: !0,
|
|
230
219
|
disabled: !1
|
|
231
220
|
};
|
|
232
|
-
|
|
233
|
-
},
|
|
234
|
-
let
|
|
221
|
+
k.value = k.value.concat(n), s.value = "";
|
|
222
|
+
}, H = l.prefill === !0 || !l.multiple && I(l.modelValue) || l.multiple && !!l.modelValue.length;
|
|
223
|
+
let U;
|
|
235
224
|
ee(
|
|
236
|
-
() =>
|
|
237
|
-
(
|
|
238
|
-
|
|
225
|
+
() => l.modelValue,
|
|
226
|
+
(e, a) => {
|
|
227
|
+
U && clearTimeout(U), U = setTimeout(
|
|
239
228
|
async () => {
|
|
240
|
-
if (
|
|
241
|
-
if (!Array.isArray(
|
|
229
|
+
if (l.multiple) {
|
|
230
|
+
if (!Array.isArray(l.modelValue))
|
|
242
231
|
throw new Error("props.modelValue is not an array.");
|
|
243
|
-
let t =
|
|
232
|
+
let t = l.modelValue.every(
|
|
244
233
|
(n) => p.value.get(n)
|
|
245
234
|
);
|
|
246
|
-
if ((!t || a === void 0) && (await $({ prefill: !0 }), t =
|
|
235
|
+
if ((!t || a === void 0) && (await $({ prefill: !0 }), t = l.modelValue.every(
|
|
247
236
|
(n) => p.value.get(n)
|
|
248
237
|
)), t)
|
|
249
|
-
|
|
238
|
+
l.stash && (m.value = l.modelValue.map(
|
|
250
239
|
(n) => p.value.get(n)
|
|
251
240
|
));
|
|
252
241
|
else {
|
|
253
242
|
let n = [];
|
|
254
|
-
const
|
|
255
|
-
let
|
|
256
|
-
return
|
|
243
|
+
const u = e.filter((x) => {
|
|
244
|
+
let M = p.value.get(x);
|
|
245
|
+
return M && n.push(M), M;
|
|
257
246
|
});
|
|
258
|
-
|
|
247
|
+
l.stash && (m.value = n), l.enforceCoherence && f("update:modelValue", u);
|
|
259
248
|
}
|
|
260
249
|
} else {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
const n = u.value;
|
|
266
|
-
u.value = "", await $({ prefill: !0 }), u.value = n;
|
|
250
|
+
let t = p.value.get(l.modelValue);
|
|
251
|
+
if (!t && I(l.modelValue) || a === void 0) {
|
|
252
|
+
const n = s.value;
|
|
253
|
+
s.value = "", await $({ prefill: !0 }), s.value = n;
|
|
267
254
|
}
|
|
268
|
-
t = p.value.get(
|
|
255
|
+
t = p.value.get(l.modelValue), t ? (s.value = t.text, l.stash && (m.value = [t])) : l.enforceCoherence && I(e) ? (s.value = "", l.stash && (m.value = []), f("update:modelValue", null)) : s.value = "";
|
|
269
256
|
}
|
|
270
257
|
},
|
|
271
|
-
|
|
258
|
+
H ? 0 : l.modelValueDebounceTime
|
|
272
259
|
);
|
|
273
260
|
},
|
|
274
261
|
// Prefill when asked or when items are static
|
|
275
|
-
{ immediate:
|
|
262
|
+
{ immediate: H, deep: !0 }
|
|
276
263
|
), ee(
|
|
277
|
-
() =>
|
|
278
|
-
async (
|
|
279
|
-
if (typeof
|
|
280
|
-
JSON.stringify(
|
|
281
|
-
if (
|
|
282
|
-
if (!
|
|
264
|
+
() => l.items,
|
|
265
|
+
async (e, a) => {
|
|
266
|
+
if (typeof e == "function" || // Circumvent arrays defined in the template by the parent
|
|
267
|
+
JSON.stringify(e) !== JSON.stringify(a))
|
|
268
|
+
if (await $({ prefill: !1 }), l.multiple) {
|
|
269
|
+
if (!l.modelValue.every(
|
|
283
270
|
(n) => p.value.get(n)
|
|
284
|
-
) &&
|
|
285
|
-
const n =
|
|
271
|
+
) && l.enforceCoherence) {
|
|
272
|
+
const n = l.modelValue.filter((u) => p.value.get(u));
|
|
286
273
|
f("update:modelValue", n);
|
|
287
274
|
}
|
|
288
275
|
} else
|
|
289
|
-
!p.value.get(
|
|
276
|
+
!p.value.get(l.modelValue) && l.enforceCoherence && I(l.modelValue) && f("update:modelValue", null), r.value = null;
|
|
290
277
|
}
|
|
291
278
|
);
|
|
292
|
-
let
|
|
279
|
+
let W;
|
|
293
280
|
ee(
|
|
294
|
-
() =>
|
|
295
|
-
(
|
|
296
|
-
!
|
|
297
|
-
if (JSON.stringify(
|
|
298
|
-
|
|
299
|
-
let t =
|
|
300
|
-
if (
|
|
301
|
-
!p.value.get(
|
|
302
|
-
else if (!
|
|
303
|
-
(
|
|
304
|
-
) &&
|
|
305
|
-
let
|
|
306
|
-
const x =
|
|
307
|
-
let X = p.value.get(
|
|
308
|
-
return X &&
|
|
281
|
+
() => l.dependencies,
|
|
282
|
+
(e, a) => {
|
|
283
|
+
!H && l.prefill === "focus" && Z || JSON.stringify(e) !== JSON.stringify(a) && (W && clearTimeout(W), W = setTimeout(async () => {
|
|
284
|
+
if (JSON.stringify(e) !== JSON.stringify(a)) {
|
|
285
|
+
l.enforceCoherence && l.stash && (m.value = []);
|
|
286
|
+
let t = s.value;
|
|
287
|
+
if (s.value = "", await $({ prefill: !0 }), s.value = t, !l.multiple)
|
|
288
|
+
!p.value.get(l.modelValue) && l.enforceCoherence && I(l.modelValue) && (s.value = "", l.stash && (m.value = []), f("update:modelValue", null));
|
|
289
|
+
else if (!l.modelValue.every(
|
|
290
|
+
(u) => p.value.get(u)
|
|
291
|
+
) && l.enforceCoherence) {
|
|
292
|
+
let u = [];
|
|
293
|
+
const x = l.modelValue.filter((M) => {
|
|
294
|
+
let X = p.value.get(M);
|
|
295
|
+
return X && u.push(X), X;
|
|
309
296
|
});
|
|
310
|
-
|
|
297
|
+
l.stash && (m.value = u), f("update:modelValue", x);
|
|
311
298
|
}
|
|
312
299
|
}
|
|
313
|
-
},
|
|
300
|
+
}, l.depsDebounceTime));
|
|
314
301
|
},
|
|
315
302
|
{ deep: !0 }
|
|
316
303
|
);
|
|
317
|
-
const
|
|
318
|
-
|
|
304
|
+
const ge = () => {
|
|
305
|
+
N.value && c.value && Qe(N.value, c.value, {
|
|
319
306
|
placement: "bottom",
|
|
320
|
-
middleware: [Ge(6),
|
|
321
|
-
}).then((
|
|
307
|
+
middleware: [Ge(6), Ue(), We()]
|
|
308
|
+
}).then((e) => {
|
|
322
309
|
var a;
|
|
323
|
-
|
|
310
|
+
c.value && (c.value.style.left = `${e.x}px`, c.value.style.top = `${e.y}px`, c.value.style.width = `${(a = N.value) == null ? void 0 : a.offsetWidth}px`);
|
|
324
311
|
});
|
|
325
|
-
},
|
|
326
|
-
Y.value = !1,
|
|
327
|
-
},
|
|
328
|
-
|
|
329
|
-
},
|
|
312
|
+
}, _ = v(!1), R = v(!1), K = v(!1), Y = v(!0), D = async () => {
|
|
313
|
+
Y.value = !1, R.value = !0, await q(l.transitionDuration), R.value = !1, _.value = !0;
|
|
314
|
+
}, J = async () => {
|
|
315
|
+
_.value = !1, K.value = !0, await q(l.transitionDuration), K.value = !1, Y.value = !0;
|
|
316
|
+
}, P = v(!1);
|
|
330
317
|
let Z = !0;
|
|
331
|
-
const we = async (
|
|
332
|
-
|
|
333
|
-
},
|
|
334
|
-
if (e.
|
|
335
|
-
|
|
318
|
+
const we = async (e) => {
|
|
319
|
+
f("focus", e), P.value = !0, document.addEventListener("click", se), document.addEventListener("focusin", ue), S.value instanceof HTMLInputElement && S.value.select(), l.prefill === "focus" && Z && !H && (await $({ prefill: !0 }), Z = !1);
|
|
320
|
+
}, ue = async (e) => {
|
|
321
|
+
if (e.target instanceof Node && T.value && c.value && !T.value.contains(e.target) && !c.value.contains(e.target)) {
|
|
322
|
+
J(), f("inactive"), document.removeEventListener("focusin", ue), P.value = !1, l.multiple && (await q(500), s.value = "");
|
|
336
323
|
return;
|
|
337
324
|
}
|
|
338
|
-
}, Ve = async (
|
|
339
|
-
if (
|
|
325
|
+
}, Ve = async (e) => {
|
|
326
|
+
if (f("blur", e), !l.multiple && (l.modelValue, await Q(), await q(300), T.value && c.value)) {
|
|
340
327
|
const a = document.activeElement;
|
|
341
|
-
if (!
|
|
342
|
-
const t = p.value.get(
|
|
343
|
-
t && (
|
|
328
|
+
if (!T.value.contains(a) && !c.value.contains(a)) {
|
|
329
|
+
const t = p.value.get(l.modelValue);
|
|
330
|
+
t && (s.value = t.text);
|
|
344
331
|
}
|
|
345
332
|
}
|
|
346
|
-
},
|
|
347
|
-
|
|
348
|
-
}, r = v(null),
|
|
349
|
-
var
|
|
350
|
-
if (r.value !== null ? r.value = (r.value + 1) %
|
|
351
|
-
const a = (
|
|
352
|
-
`#${
|
|
333
|
+
}, Ce = (e) => f("change", e), ke = (e) => {
|
|
334
|
+
f("input", e), s.value === "" && (l.multiple || f("update:modelValue", null)), typeof l.items == "function" && Se();
|
|
335
|
+
}, r = v(null), O = w(() => Number.isInteger(r.value) && r.value ? r.value % C.value.length : r.value), i = v(null), _e = async () => {
|
|
336
|
+
var e;
|
|
337
|
+
if (r.value !== null ? r.value = (r.value + 1) % g.value.length : r.value = 0, await Q(), O.value !== null) {
|
|
338
|
+
const a = (e = c.value) == null ? void 0 : e.querySelector(
|
|
339
|
+
`#${g.value[O.value].id}`
|
|
353
340
|
);
|
|
354
341
|
a instanceof HTMLElement && a.scrollIntoView({
|
|
355
342
|
behavior: "smooth",
|
|
@@ -357,11 +344,11 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
357
344
|
inline: "start"
|
|
358
345
|
});
|
|
359
346
|
}
|
|
360
|
-
},
|
|
361
|
-
var
|
|
362
|
-
if (r.value !== null ? r.value = r.value === 0 ?
|
|
363
|
-
const a = (
|
|
364
|
-
`#${
|
|
347
|
+
}, Oe = async () => {
|
|
348
|
+
var e;
|
|
349
|
+
if (r.value !== null ? r.value = r.value === 0 ? g.value.length - 1 : r.value - 1 : r.value = g.value.length - 1, await Q(), O.value !== null) {
|
|
350
|
+
const a = (e = c.value) == null ? void 0 : e.querySelector(
|
|
351
|
+
`#${g.value[O.value].id}`
|
|
365
352
|
);
|
|
366
353
|
a instanceof HTMLElement && a.scrollIntoView({
|
|
367
354
|
behavior: "smooth",
|
|
@@ -369,112 +356,112 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
369
356
|
inline: "start"
|
|
370
357
|
});
|
|
371
358
|
}
|
|
372
|
-
},
|
|
359
|
+
}, Te = async (e) => {
|
|
373
360
|
var a, t;
|
|
374
|
-
if (
|
|
375
|
-
|
|
361
|
+
if (l.readonly || l.disabled) {
|
|
362
|
+
e.preventDefault();
|
|
376
363
|
return;
|
|
377
364
|
}
|
|
378
|
-
switch (
|
|
365
|
+
switch (e.key) {
|
|
379
366
|
case "ArrowUp":
|
|
380
367
|
{
|
|
381
|
-
if (
|
|
368
|
+
if (e.preventDefault(), d.value)
|
|
382
369
|
return;
|
|
383
|
-
if (i.value = null,
|
|
384
|
-
if (!
|
|
370
|
+
if (i.value = null, _.value) {
|
|
371
|
+
if (!C.value.length)
|
|
385
372
|
return;
|
|
386
|
-
|
|
373
|
+
Oe();
|
|
387
374
|
} else
|
|
388
|
-
|
|
375
|
+
o.value.length && (r.value = te(o.value).index), await D();
|
|
389
376
|
}
|
|
390
377
|
break;
|
|
391
378
|
case "ArrowDown":
|
|
392
379
|
{
|
|
393
|
-
if (
|
|
380
|
+
if (e.preventDefault(), d.value)
|
|
394
381
|
return;
|
|
395
|
-
if (i.value = null,
|
|
396
|
-
if (!
|
|
382
|
+
if (i.value = null, _.value) {
|
|
383
|
+
if (!C.value.length)
|
|
397
384
|
return;
|
|
398
|
-
|
|
385
|
+
_e();
|
|
399
386
|
} else
|
|
400
|
-
|
|
387
|
+
o.value.length && (r.value = te(o.value).index), await D();
|
|
401
388
|
}
|
|
402
389
|
break;
|
|
403
390
|
case "ArrowLeft":
|
|
404
391
|
{
|
|
405
|
-
if (
|
|
392
|
+
if (d.value)
|
|
406
393
|
return;
|
|
407
|
-
if (!
|
|
408
|
-
let n =
|
|
394
|
+
if (!s.value && o.value.length && (i.value === null ? i.value = o.value.length - 1 : i.value > 0 ? i.value-- : i.value = null, i.value !== null)) {
|
|
395
|
+
let n = o.value[i.value], u = (a = c.value) == null ? void 0 : a.querySelector(
|
|
409
396
|
`#${n.id}`
|
|
410
397
|
);
|
|
411
|
-
|
|
398
|
+
u && (u.scrollIntoView({
|
|
412
399
|
behavior: "smooth",
|
|
413
400
|
block: "nearest",
|
|
414
401
|
inline: "start"
|
|
415
|
-
}), r.value =
|
|
402
|
+
}), r.value = z.value[o.value[i.value].id].index);
|
|
416
403
|
}
|
|
417
404
|
}
|
|
418
405
|
break;
|
|
419
406
|
case "ArrowRight":
|
|
420
407
|
{
|
|
421
|
-
if (
|
|
408
|
+
if (d.value)
|
|
422
409
|
return;
|
|
423
|
-
if (!
|
|
424
|
-
let n =
|
|
410
|
+
if (!s.value && o.value.length && (i.value === null ? i.value = 0 : i.value < o.value.length - 1 ? i.value++ : i.value = null, i.value !== null)) {
|
|
411
|
+
let n = o.value[i.value], u = (t = c.value) == null ? void 0 : t.querySelector(
|
|
425
412
|
`#${n.id}`
|
|
426
413
|
);
|
|
427
|
-
|
|
414
|
+
u && (u.scrollIntoView({
|
|
428
415
|
behavior: "smooth",
|
|
429
416
|
block: "nearest",
|
|
430
417
|
inline: "start"
|
|
431
|
-
}), r.value =
|
|
418
|
+
}), r.value = z.value[o.value[i.value].id].index);
|
|
432
419
|
}
|
|
433
420
|
}
|
|
434
421
|
break;
|
|
435
422
|
case "Enter":
|
|
436
423
|
{
|
|
437
|
-
if (
|
|
424
|
+
if (e.preventDefault(), d.value)
|
|
438
425
|
return;
|
|
439
|
-
if (!
|
|
440
|
-
|
|
441
|
-
else if (
|
|
442
|
-
if (
|
|
426
|
+
if (!_.value)
|
|
427
|
+
C.value.length && o.value.length && (r.value = te(o.value).index), await D();
|
|
428
|
+
else if (O.value !== null) {
|
|
429
|
+
if (C.value[O.value].disabled)
|
|
443
430
|
return;
|
|
444
|
-
|
|
445
|
-
|
|
431
|
+
l.multiple || await J(), A(
|
|
432
|
+
C.value[O.value]
|
|
446
433
|
);
|
|
447
|
-
} else if (
|
|
448
|
-
if (
|
|
434
|
+
} else if (l.addOptions) {
|
|
435
|
+
if (l.itemText || l.itemValue) {
|
|
449
436
|
console.error(
|
|
450
437
|
`Adding an option for mapped items is not supported. You can't create an option while passing "item-text" or "item-value".`
|
|
451
438
|
);
|
|
452
439
|
return;
|
|
453
440
|
}
|
|
454
|
-
|
|
455
|
-
const n =
|
|
456
|
-
|
|
441
|
+
ye();
|
|
442
|
+
const n = Re(k.value);
|
|
443
|
+
A(z.value[n.id]);
|
|
457
444
|
}
|
|
458
445
|
}
|
|
459
446
|
break;
|
|
460
447
|
case "Tab":
|
|
461
448
|
case "Escape":
|
|
462
|
-
|
|
449
|
+
_.value && await J(), f("inactive"), i.value = null, r.value = null;
|
|
463
450
|
break;
|
|
464
451
|
case "Shift":
|
|
465
|
-
if (
|
|
452
|
+
if (d.value)
|
|
466
453
|
return;
|
|
467
454
|
break;
|
|
468
455
|
case "Backspace":
|
|
469
456
|
{
|
|
470
|
-
if (
|
|
457
|
+
if (d.value)
|
|
471
458
|
return;
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
),
|
|
459
|
+
s.value || o.value.length && (i.value === null ? i.value = o.value.length - 1 : (A(
|
|
460
|
+
o.value[i.value]
|
|
461
|
+
), o.value.length ? i.value = Math.max(
|
|
475
462
|
Math.min(
|
|
476
463
|
i.value,
|
|
477
|
-
|
|
464
|
+
o.value.length - 2
|
|
478
465
|
),
|
|
479
466
|
0
|
|
480
467
|
) : i.value = null)), await D();
|
|
@@ -486,87 +473,87 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
486
473
|
}
|
|
487
474
|
};
|
|
488
475
|
let G;
|
|
489
|
-
const
|
|
476
|
+
const Se = () => {
|
|
490
477
|
G && clearTimeout(G), G = setTimeout(async () => {
|
|
491
478
|
try {
|
|
492
479
|
await $({ prefill: !1 });
|
|
493
|
-
} catch (
|
|
494
|
-
console.error(
|
|
480
|
+
} catch (e) {
|
|
481
|
+
console.error(e);
|
|
495
482
|
}
|
|
496
|
-
},
|
|
497
|
-
}, xe = (
|
|
498
|
-
f("click",
|
|
499
|
-
},
|
|
500
|
-
if (
|
|
501
|
-
const a =
|
|
483
|
+
}, l.queryDebounceTime);
|
|
484
|
+
}, xe = (e) => {
|
|
485
|
+
f("click", e), !(l.disabled || l.readonly) && (S.value instanceof HTMLElement && S.value.focus(), D());
|
|
486
|
+
}, Be = async (e) => {
|
|
487
|
+
if (e.currentTarget instanceof HTMLElement && e.currentTarget.classList.contains("bb-base-select-option")) {
|
|
488
|
+
const a = z.value[e.currentTarget.id];
|
|
502
489
|
if (a.disabled)
|
|
503
490
|
return;
|
|
504
|
-
await
|
|
491
|
+
await A(a), await Q(), S.value instanceof HTMLInputElement && S.value.focus(), l.multiple || J();
|
|
505
492
|
}
|
|
506
|
-
},
|
|
507
|
-
if (
|
|
508
|
-
|
|
493
|
+
}, se = async (e) => {
|
|
494
|
+
if (e.target instanceof Node && T.value && !T.value.contains(e.target)) {
|
|
495
|
+
J(), f("inactive"), document.removeEventListener("click", se), P.value = !1, l.multiple && (await q(500), s.value = "");
|
|
509
496
|
return;
|
|
510
497
|
}
|
|
511
|
-
},
|
|
512
|
-
(
|
|
498
|
+
}, Ee = Ze(
|
|
499
|
+
(e) => typeof e != "string",
|
|
513
500
|
JSON.stringify
|
|
514
|
-
),
|
|
515
|
-
const a =
|
|
501
|
+
), Ie = w(() => [].concat(l.modelValue).map((e) => {
|
|
502
|
+
const a = Ee(e);
|
|
516
503
|
return {
|
|
517
|
-
disabled:
|
|
518
|
-
name:
|
|
504
|
+
disabled: l.disabled,
|
|
505
|
+
name: l.name,
|
|
519
506
|
type: "hidden",
|
|
520
507
|
value: a
|
|
521
508
|
};
|
|
522
509
|
}));
|
|
523
|
-
return (
|
|
510
|
+
return (e, a) => (b(), y("span", {
|
|
524
511
|
ref_key: "outerContainer",
|
|
525
|
-
ref:
|
|
526
|
-
class:
|
|
512
|
+
ref: T,
|
|
513
|
+
class: B({
|
|
527
514
|
"bb-base-select": !0,
|
|
528
|
-
"bb-base-select--active":
|
|
529
|
-
"bb-base-select--loading":
|
|
530
|
-
"bb-base-select--disabled":
|
|
531
|
-
"bb-base-select--errors":
|
|
532
|
-
"bb-base-select--readonly":
|
|
515
|
+
"bb-base-select--active": P.value,
|
|
516
|
+
"bb-base-select--loading": d.value,
|
|
517
|
+
"bb-base-select--disabled": e.disabled,
|
|
518
|
+
"bb-base-select--errors": e.hasErrors,
|
|
519
|
+
"bb-base-select--readonly": e.readonly
|
|
533
520
|
}),
|
|
534
521
|
onClick: xe
|
|
535
522
|
}, [
|
|
536
|
-
|
|
523
|
+
h(e.$slots, "prepend-outer"),
|
|
537
524
|
V("span", {
|
|
538
525
|
ref_key: "innerContainer",
|
|
539
526
|
ref: N,
|
|
540
527
|
class: "bb-base-select__inner-container"
|
|
541
528
|
}, [
|
|
542
|
-
|
|
529
|
+
h(e.$slots, "prepend"),
|
|
543
530
|
V("span", Xe, [
|
|
544
|
-
|
|
545
|
-
|
|
531
|
+
e.multiple ? (b(), y(L, { key: 0 }, [
|
|
532
|
+
e.comma ? (b(!0), y(L, { key: 0 }, j(o.value, (t, n) => (b(), y("span", {
|
|
546
533
|
key: t.id,
|
|
547
|
-
class:
|
|
534
|
+
class: B({
|
|
548
535
|
"bb-base-select__selected": !0,
|
|
549
536
|
"bb-base-select__selected--comma": !0,
|
|
550
537
|
"bb-base-select__selected--focused": n === i.value
|
|
551
538
|
})
|
|
552
|
-
}, F(t.text) + F(n <
|
|
539
|
+
}, F(t.text) + F(n < o.value.length - 1 ? "," : ""), 3))), 128)) : (b(!0), y(L, { key: 1 }, j(o.value, (t, n) => (b(), ie(He, {
|
|
553
540
|
key: t.id,
|
|
554
|
-
class:
|
|
541
|
+
class: B({
|
|
555
542
|
"bb-base-select__selected": !0,
|
|
556
543
|
"bb-base-select__selected--chip": !0,
|
|
557
544
|
"bb-base-select__selected--focused": n === i.value
|
|
558
545
|
}),
|
|
559
546
|
clearable: !0,
|
|
560
547
|
text: t.text,
|
|
561
|
-
"onClick:clear":
|
|
548
|
+
"onClick:clear": E((u) => A(t), ["stop"])
|
|
562
549
|
}, {
|
|
563
550
|
default: Le(() => [
|
|
564
|
-
|
|
551
|
+
h(e.$slots, "chip", {
|
|
565
552
|
disabled: t.disabled,
|
|
566
|
-
hasErrors:
|
|
553
|
+
hasErrors: e.hasErrors,
|
|
567
554
|
index: t.index,
|
|
568
555
|
item: t.original,
|
|
569
|
-
loading: !!
|
|
556
|
+
loading: !!d.value,
|
|
570
557
|
manual: t.manual,
|
|
571
558
|
selected: t.selected,
|
|
572
559
|
text: t.text,
|
|
@@ -577,125 +564,125 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
577
564
|
]),
|
|
578
565
|
_: 2
|
|
579
566
|
}, 1032, ["class", "text", "onClick:clear"]))), 128))
|
|
580
|
-
], 64)) :
|
|
567
|
+
], 64)) : oe("", !0),
|
|
581
568
|
Fe(V("input", {
|
|
582
|
-
id:
|
|
569
|
+
id: e.id,
|
|
583
570
|
ref_key: "input",
|
|
584
|
-
ref:
|
|
585
|
-
"onUpdate:modelValue": a[0] || (a[0] = (t) =>
|
|
586
|
-
autocomplete:
|
|
587
|
-
autofocus:
|
|
588
|
-
class:
|
|
589
|
-
disabled:
|
|
571
|
+
ref: S,
|
|
572
|
+
"onUpdate:modelValue": a[0] || (a[0] = (t) => s.value = t),
|
|
573
|
+
autocomplete: e.autocomplete,
|
|
574
|
+
autofocus: e.autofocus,
|
|
575
|
+
class: B("bb-base-select__text-input"),
|
|
576
|
+
disabled: e.disabled,
|
|
590
577
|
placeholder: fe.value,
|
|
591
|
-
readonly:
|
|
578
|
+
readonly: e.readonly || !e.allowWriting,
|
|
592
579
|
type: "text",
|
|
593
|
-
onBlur:
|
|
594
|
-
onChange:
|
|
595
|
-
onFocus:
|
|
596
|
-
onInput:
|
|
597
|
-
onKeydown:
|
|
580
|
+
onBlur: E(Ve, ["stop"]),
|
|
581
|
+
onChange: E(Ce, ["stop"]),
|
|
582
|
+
onFocus: E(we, ["stop"]),
|
|
583
|
+
onInput: E(ke, ["stop"]),
|
|
584
|
+
onKeydown: E(Te, ["stop"])
|
|
598
585
|
}, null, 40, el), [
|
|
599
|
-
[
|
|
586
|
+
[Ae, s.value]
|
|
600
587
|
]),
|
|
601
|
-
(
|
|
588
|
+
(b(), ie(Je, { to: "body" }, [
|
|
602
589
|
V("span", {
|
|
603
590
|
ref_key: "optionsContainer",
|
|
604
|
-
ref:
|
|
605
|
-
class:
|
|
591
|
+
ref: c,
|
|
592
|
+
class: B({
|
|
606
593
|
"bb-base-select__options-container": !0,
|
|
607
|
-
"bb-base-select__options-container--shown":
|
|
608
|
-
"bb-base-select__options-container--showing":
|
|
594
|
+
"bb-base-select__options-container--shown": _.value,
|
|
595
|
+
"bb-base-select__options-container--showing": R.value,
|
|
609
596
|
"bb-base-select__options-container--hiding": K.value,
|
|
610
597
|
"bb-base-select__options-container--hidden": Y.value
|
|
611
598
|
}),
|
|
612
599
|
role: "listbox",
|
|
613
|
-
style:
|
|
600
|
+
style: Me({ transitionDuration: ve }),
|
|
614
601
|
tabindex: -1
|
|
615
602
|
}, [
|
|
616
|
-
|
|
617
|
-
!
|
|
618
|
-
|
|
619
|
-
le(F(
|
|
603
|
+
h(e.$slots, "options:prepend"),
|
|
604
|
+
!C.value.length && d.value ? (b(), y("span", ll, [
|
|
605
|
+
h(e.$slots, "loading", { query: s.value }, () => [
|
|
606
|
+
le(F(e.loadingText), 1)
|
|
620
607
|
])
|
|
621
|
-
])) :
|
|
622
|
-
|
|
623
|
-
le(F(
|
|
608
|
+
])) : C.value.length ? oe("", !0) : (b(), y("span", tl, [
|
|
609
|
+
h(e.$slots, "no-data", { query: s.value }, () => [
|
|
610
|
+
le(F(e.noDataText), 1)
|
|
624
611
|
])
|
|
625
612
|
])),
|
|
626
|
-
(
|
|
613
|
+
(b(!0), y(L, null, j(C.value, (t) => (b(), y(L, {
|
|
627
614
|
key: t.id
|
|
628
615
|
}, [
|
|
629
|
-
|
|
616
|
+
h(e.$slots, "option:prepend", {
|
|
630
617
|
item: t.original
|
|
631
618
|
}),
|
|
632
619
|
V("span", {
|
|
633
620
|
id: t.id,
|
|
634
621
|
"aria-selected": t.selected,
|
|
635
|
-
class:
|
|
622
|
+
class: B({
|
|
636
623
|
"bb-base-select-option": !0,
|
|
637
624
|
"bb-base-select-option--selected": t.selected,
|
|
638
625
|
"bb-base-select-option--focused": t.focused,
|
|
639
626
|
"bb-base-select-option--disabled": t.disabled
|
|
640
627
|
}),
|
|
641
628
|
role: "option",
|
|
642
|
-
onClick:
|
|
629
|
+
onClick: E(Be, ["stop"])
|
|
643
630
|
}, [
|
|
644
|
-
|
|
631
|
+
h(e.$slots, "option", {
|
|
645
632
|
disabled: t.disabled,
|
|
646
633
|
focused: t.focused,
|
|
647
|
-
hasErrors:
|
|
634
|
+
hasErrors: e.hasErrors,
|
|
648
635
|
index: t.index,
|
|
649
636
|
item: t.original,
|
|
650
|
-
loading: !!
|
|
637
|
+
loading: !!d.value,
|
|
651
638
|
manual: t.manual,
|
|
652
639
|
selected: t.selected,
|
|
653
640
|
text: t.text,
|
|
654
641
|
value: t.value
|
|
655
642
|
}, () => [
|
|
656
643
|
V("span", nl, [
|
|
657
|
-
V("span",
|
|
644
|
+
V("span", ul, F(t.text), 1)
|
|
658
645
|
])
|
|
659
646
|
])
|
|
660
647
|
], 10, al),
|
|
661
|
-
|
|
648
|
+
h(e.$slots, "option:append", {
|
|
662
649
|
item: t.original
|
|
663
650
|
})
|
|
664
651
|
], 64))), 128)),
|
|
665
|
-
|
|
652
|
+
h(e.$slots, "options:append")
|
|
666
653
|
], 6)
|
|
667
654
|
]))
|
|
668
655
|
]),
|
|
669
|
-
V("span",
|
|
670
|
-
|
|
671
|
-
loading: !!
|
|
672
|
-
shown:
|
|
656
|
+
V("span", sl, [
|
|
657
|
+
h(e.$slots, "chevron", {
|
|
658
|
+
loading: !!d.value,
|
|
659
|
+
shown: _.value
|
|
673
660
|
}, () => [
|
|
674
661
|
il
|
|
675
662
|
])
|
|
676
663
|
]),
|
|
677
|
-
|
|
664
|
+
d.value ? (b(), y("span", {
|
|
678
665
|
key: 1,
|
|
679
|
-
class:
|
|
666
|
+
class: B({
|
|
680
667
|
"bb-base-select__spinner": !0,
|
|
681
|
-
"bb-base-select__spinner--loading":
|
|
668
|
+
"bb-base-select__spinner--loading": d.value
|
|
682
669
|
})
|
|
683
670
|
}, [
|
|
684
|
-
|
|
685
|
-
loading: !!
|
|
671
|
+
h(e.$slots, "spinner", {
|
|
672
|
+
loading: !!d.value
|
|
686
673
|
}, () => [
|
|
687
|
-
|
|
674
|
+
qe(Pe, { size: "sm" })
|
|
688
675
|
])
|
|
689
|
-
], 2)) :
|
|
676
|
+
], 2)) : h(e.$slots, "append", { key: 0 })
|
|
690
677
|
], 512),
|
|
691
|
-
|
|
692
|
-
(
|
|
678
|
+
h(e.$slots, "append-outer"),
|
|
679
|
+
(b(!0), y(L, null, j(Ie.value, (t) => (b(), y("input", ze({
|
|
693
680
|
key: t.value
|
|
694
681
|
}, t), null, 16))), 128))
|
|
695
682
|
], 2));
|
|
696
683
|
}
|
|
697
684
|
});
|
|
698
685
|
export {
|
|
699
|
-
|
|
686
|
+
kl as default
|
|
700
687
|
};
|
|
701
688
|
//# sourceMappingURL=index31.js.map
|