bitboss-ui 0.2.48 → 0.2.50
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 +1 -1
- 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 +2 -235
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +4 -2
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +368 -4
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +134 -10
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +5 -2
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +19 -2
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +2 -368
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +2 -2
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +174 -2
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +23 -373
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +373 -5
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +235 -16
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +3 -16
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +35 -19
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +6 -20
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +13 -26
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +16 -8
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +20 -3
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +28 -34
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +8 -6
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +1 -1
- package/dist/index218.js +1 -1
- package/dist/index219.js +10 -134
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +2 -174
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +2 -23
- package/dist/index221.js.map +1 -1
- package/dist/index223.js +2 -2
- package/dist/index224.js +6 -79
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +17 -6
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +79 -17
- package/dist/index226.js.map +1 -1
- package/dist/index229.js +6 -5
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +2 -69
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +294 -159
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +4 -1
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +2 -2
- package/dist/index236.js +431 -291
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +88 -5
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +224 -2
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +258 -2
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +200 -2
- package/dist/index240.js.map +1 -1
- package/dist/index244.js +2 -2
- package/dist/index245.js +2 -224
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +5 -258
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +151 -426
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +1 -91
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +69 -15
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +2 -2
- package/dist/index250.js +15 -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 +68 -68
- 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/index69.js +2 -2
- 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,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as Ne, ref as v, computed as w, onMounted as $e, onBeforeUnmount as De, watch as ee, openBlock as g, createElementBlock as h, normalizeClass as I, renderSlot as b, createElementVNode as V, Fragment as L, renderList as
|
|
1
|
+
import { defineComponent as Ne, ref as v, computed as w, onMounted as $e, onBeforeUnmount as De, watch as ee, openBlock as g, createElementBlock as h, normalizeClass as I, renderSlot as b, createElementVNode as V, Fragment as L, renderList as P, toDisplayString as F, createBlock as ie, withModifiers as B, withCtx as Le, createTextVNode as le, createCommentVNode as se, withDirectives as Fe, vModelDynamic as Me, Teleport as Ae, normalizeStyle as qe, createVNode as Je, mergeProps as Re, nextTick as U } from "vue";
|
|
2
2
|
import ze from "./index115.js";
|
|
3
3
|
import "./index158.js";
|
|
4
4
|
import He from "./index119.js";
|
|
5
5
|
import "./index185.js";
|
|
6
|
-
import { autoUpdate as Pe, computePosition as Ue, flip as je, shift as Qe } from "./
|
|
6
|
+
import { autoUpdate as Pe, computePosition as Ue, flip as je, shift as Qe } from "./index199.js";
|
|
7
7
|
import { deepEqual as re } from "./index123.js";
|
|
8
|
-
import { head as te } from "./
|
|
8
|
+
import { head as te } from "./index221.js";
|
|
9
9
|
import { isNotNil as E } from "./index124.js";
|
|
10
|
-
import { last as We } from "./
|
|
10
|
+
import { last as We } from "./index204.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 J } from "./index122.js";
|
|
14
|
+
import { when as Ze } from "./index198.js";
|
|
15
|
+
import { offset as Ge } from "./index207.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"
|
|
@@ -70,7 +70,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
70
70
|
const e = de, f = ce;
|
|
71
71
|
if (e.multiple && !Array.isArray(e.modelValue))
|
|
72
72
|
throw new Error('Multiple is set to "true" but modelValue is not an array.');
|
|
73
|
-
const S = v(null), N = v(null), d = v(null),
|
|
73
|
+
const S = v(null), N = v(null), d = v(null), T = v(null), u = v(""), fe = w(() => s.value.length ? "" : e.placeholder), c = v(0), ve = e.transitionDuration / 1e3 + "s";
|
|
74
74
|
let ae;
|
|
75
75
|
$e(async () => {
|
|
76
76
|
e.debug && console.log("Calling onMounted"), N.value && d.value && (ae = Pe(
|
|
@@ -87,9 +87,9 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
87
87
|
}), De(() => {
|
|
88
88
|
e.debug && console.log("Calling onBeforeUnMount"), ae();
|
|
89
89
|
});
|
|
90
|
-
const ne = v([]),
|
|
90
|
+
const ne = v([]), p = v([]), C = v([]), { getItemText: pe } = Ke(), { getItemValue: me } = Ye(), ge = w(() => ne.value.map((l, a) => {
|
|
91
91
|
e.debug && console.log("Mapping items in internalOptions", { item: l });
|
|
92
|
-
const t =
|
|
92
|
+
const t = pe(l, e.itemText), n = me(l, e.itemValue);
|
|
93
93
|
if (n === void 0)
|
|
94
94
|
throw new Error(
|
|
95
95
|
'The result of extracting "value" from option was undefined. Affected item is ' + JSON.stringify(l) + " please check itemValue property is correct."
|
|
@@ -112,7 +112,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
112
112
|
const a = C.value.reduce(
|
|
113
113
|
(n, o) => (n[o.id] || (n[o.id] = o), n),
|
|
114
114
|
l
|
|
115
|
-
), t =
|
|
115
|
+
), t = p.value.reduce(
|
|
116
116
|
(n, o) => (n[o.id] || (n[o.id] = o), n),
|
|
117
117
|
a
|
|
118
118
|
);
|
|
@@ -140,8 +140,8 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
140
140
|
else if (e.filterBy.length) {
|
|
141
141
|
const n = [].concat(e.filterBy);
|
|
142
142
|
for (let o = 0; o < n.length; o++) {
|
|
143
|
-
const
|
|
144
|
-
t = t || a.original[
|
|
143
|
+
const x = n[o];
|
|
144
|
+
t = t || a.original[x] && a.original[x].toLowerCase().includes(u.value.toLowerCase());
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
} else
|
|
@@ -151,7 +151,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
151
151
|
...a,
|
|
152
152
|
focused: _.value === t
|
|
153
153
|
}));
|
|
154
|
-
}),
|
|
154
|
+
}), R = w(
|
|
155
155
|
() => y.value.reduce(
|
|
156
156
|
(l, a) => ({
|
|
157
157
|
...l,
|
|
@@ -159,7 +159,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
159
159
|
}),
|
|
160
160
|
{}
|
|
161
161
|
)
|
|
162
|
-
),
|
|
162
|
+
), m = w(() => {
|
|
163
163
|
if (e.debug && console.log("Computing optionsIndexedByValue"), e.matchStrategy === "string") {
|
|
164
164
|
let l = y.value.reduce(
|
|
165
165
|
(a, t) => (a[t.jsonValue] = t, a),
|
|
@@ -200,20 +200,20 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
200
200
|
} else
|
|
201
201
|
throw new Error("No match strategy has been defined");
|
|
202
202
|
}), s = w(() => (e.debug && console.log("Computing selectedOptions"), [].concat(e.modelValue).reduce((l, a) => {
|
|
203
|
-
const t =
|
|
203
|
+
const t = m.value.get(a);
|
|
204
204
|
return t && l.push(t), l;
|
|
205
205
|
}, []))), M = async (l) => {
|
|
206
206
|
e.debug && console.log("Running onOptionSelected", { option: l });
|
|
207
207
|
let a;
|
|
208
|
-
|
|
208
|
+
e.multiple ? (l.selected ? (l.manual && (e.debug && console.log("onOptionSelected: inside multiple > selected > manual"), C.value = C.value.filter(
|
|
209
209
|
(t) => t.id !== l.id
|
|
210
210
|
)), a = e.modelValue.filter(
|
|
211
211
|
(t) => JSON.stringify(t) !== l.jsonValue
|
|
212
|
-
), e.stash && (e.debug && console.log("onOptionSelected: inside multiple > selected > stash"),
|
|
212
|
+
), e.stash && (e.debug && console.log("onOptionSelected: inside multiple > selected > stash"), p.value = p.value.filter((t) => t.id !== l.id))) : (e.debug && console.log("onOptionSelected: inside multiple > not selected"), a = e.modelValue.concat(l.value), e.stash && (e.debug && console.log(
|
|
213
213
|
"onOptionSelected: inside multiple > not selected > stash"
|
|
214
|
-
),
|
|
214
|
+
), p.value = p.value.concat(l))), e.resetQueryOnOptionSelected && (e.debug && console.log("onOptionSelected: resetting query"), u.value = "")) : l.selected ? (l.manual && (e.debug && console.log("onOptionSelected: inside single > selected > manual"), C.value = C.value.filter(
|
|
215
215
|
(t) => t.id !== l.id
|
|
216
|
-
)), a = null, e.stash && (e.debug && console.log("onOptionSelected: inside single > selected > stash"),
|
|
216
|
+
)), a = null, e.stash && (e.debug && console.log("onOptionSelected: inside single > selected > stash"), p.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"), p.value = [l]), u.value = l.text), f("update:modelValue", a);
|
|
217
217
|
}, $ = async ({ prefill: l = !1 }) => {
|
|
218
218
|
e.debug && console.log("running getOptions");
|
|
219
219
|
let a = [];
|
|
@@ -230,7 +230,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
230
230
|
disabled: !1
|
|
231
231
|
};
|
|
232
232
|
C.value = C.value.concat(n), u.value = "";
|
|
233
|
-
},
|
|
233
|
+
}, z = e.prefill === !0 || !e.multiple && E(e.modelValue) || e.multiple && !!e.modelValue.length;
|
|
234
234
|
let j;
|
|
235
235
|
ee(
|
|
236
236
|
() => e.modelValue,
|
|
@@ -241,38 +241,38 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
241
241
|
if (!Array.isArray(e.modelValue))
|
|
242
242
|
throw new Error("props.modelValue is not an array.");
|
|
243
243
|
let t = e.modelValue.every(
|
|
244
|
-
(n) =>
|
|
244
|
+
(n) => m.value.get(n)
|
|
245
245
|
);
|
|
246
246
|
if ((!t || a === void 0) && (await $({ prefill: !0 }), t = e.modelValue.every(
|
|
247
|
-
(n) =>
|
|
247
|
+
(n) => m.value.get(n)
|
|
248
248
|
)), t)
|
|
249
|
-
e.stash && (
|
|
250
|
-
(n) =>
|
|
249
|
+
e.stash && (p.value = e.modelValue.map(
|
|
250
|
+
(n) => m.value.get(n)
|
|
251
251
|
));
|
|
252
252
|
else {
|
|
253
253
|
let n = [];
|
|
254
|
-
const o = l.filter((
|
|
255
|
-
let q =
|
|
254
|
+
const o = l.filter((x) => {
|
|
255
|
+
let q = m.value.get(x);
|
|
256
256
|
return q && n.push(q), q;
|
|
257
257
|
});
|
|
258
|
-
e.stash && (
|
|
258
|
+
e.stash && (p.value = n), e.enforceCoherence && f("update:modelValue", o);
|
|
259
259
|
}
|
|
260
260
|
} else {
|
|
261
261
|
e.debug && console.log("watch.modelValue >> single");
|
|
262
|
-
let t =
|
|
262
|
+
let t = m.value.get(e.modelValue);
|
|
263
263
|
if (!t && E(e.modelValue) || a === void 0) {
|
|
264
264
|
e.debug && console.log("watch.modelValue >> not found line 895");
|
|
265
265
|
const n = u.value;
|
|
266
266
|
u.value = "", await $({ prefill: !0 }), u.value = n;
|
|
267
267
|
}
|
|
268
|
-
t =
|
|
268
|
+
t = m.value.get(e.modelValue), t ? (e.debug && console.log("watch.modelValue >> found"), u.value = t.text, e.debug && console.log("watch.modelValue assigned to query"), e.stash && (p.value = [t], e.debug && console.log("watch.modelValue assigned to stash")), e.debug && console.log("watch.modelValue end of found")) : e.enforceCoherence && E(l) ? (e.debug && console.log("watch.modelValue >> not found line 911"), u.value = "", e.stash && (p.value = []), f("update:modelValue", null)) : u.value = "";
|
|
269
269
|
}
|
|
270
270
|
},
|
|
271
|
-
|
|
271
|
+
z ? 0 : e.modelValueDebounceTime
|
|
272
272
|
);
|
|
273
273
|
},
|
|
274
274
|
// Prefill when asked or when items are static
|
|
275
|
-
{ immediate:
|
|
275
|
+
{ immediate: z, deep: !0 }
|
|
276
276
|
), ee(
|
|
277
277
|
() => e.items,
|
|
278
278
|
async (l, a) => {
|
|
@@ -280,34 +280,34 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
280
280
|
JSON.stringify(l) !== JSON.stringify(a))
|
|
281
281
|
if (e.debug && console.log("watch.items"), await $({ prefill: !1 }), e.multiple) {
|
|
282
282
|
if (!e.modelValue.every(
|
|
283
|
-
(n) =>
|
|
283
|
+
(n) => m.value.get(n)
|
|
284
284
|
) && e.enforceCoherence) {
|
|
285
|
-
const n = e.modelValue.filter((o) =>
|
|
285
|
+
const n = e.modelValue.filter((o) => m.value.get(o));
|
|
286
286
|
f("update:modelValue", n);
|
|
287
287
|
}
|
|
288
288
|
} else
|
|
289
|
-
!
|
|
289
|
+
!m.value.get(e.modelValue) && e.enforceCoherence && E(e.modelValue) && f("update:modelValue", null), r.value = null;
|
|
290
290
|
}
|
|
291
291
|
);
|
|
292
292
|
let Q;
|
|
293
293
|
ee(
|
|
294
294
|
() => e.dependencies,
|
|
295
295
|
(l, a) => {
|
|
296
|
-
!
|
|
296
|
+
!z && e.prefill === "focus" && Z || JSON.stringify(l) !== JSON.stringify(a) && (Q && clearTimeout(Q), Q = setTimeout(async () => {
|
|
297
297
|
if (JSON.stringify(l) !== JSON.stringify(a)) {
|
|
298
|
-
e.enforceCoherence && e.stash && (
|
|
298
|
+
e.enforceCoherence && e.stash && (p.value = []);
|
|
299
299
|
let t = u.value;
|
|
300
300
|
if (u.value = "", await $({ prefill: !0 }), u.value = t, !e.multiple)
|
|
301
|
-
!
|
|
301
|
+
!m.value.get(e.modelValue) && e.enforceCoherence && E(e.modelValue) && (u.value = "", e.stash && (p.value = []), f("update:modelValue", null));
|
|
302
302
|
else if (!e.modelValue.every(
|
|
303
|
-
(o) =>
|
|
303
|
+
(o) => m.value.get(o)
|
|
304
304
|
) && e.enforceCoherence) {
|
|
305
305
|
let o = [];
|
|
306
|
-
const
|
|
307
|
-
let X =
|
|
306
|
+
const x = e.modelValue.filter((q) => {
|
|
307
|
+
let X = m.value.get(q);
|
|
308
308
|
return X && o.push(X), X;
|
|
309
309
|
});
|
|
310
|
-
e.stash && (
|
|
310
|
+
e.stash && (p.value = o), f("update:modelValue", x);
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
}, e.depsDebounceTime));
|
|
@@ -323,31 +323,31 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
323
323
|
d.value && (d.value.style.left = `${l.x}px`, d.value.style.top = `${l.y}px`, d.value.style.width = `${(a = N.value) == null ? void 0 : a.offsetWidth}px`);
|
|
324
324
|
});
|
|
325
325
|
}, k = v(!1), W = v(!1), K = v(!1), Y = v(!0), D = async () => {
|
|
326
|
-
Y.value = !1, W.value = !0, await
|
|
326
|
+
Y.value = !1, W.value = !0, await J(e.transitionDuration), W.value = !1, k.value = !0;
|
|
327
327
|
}, A = async () => {
|
|
328
|
-
k.value = !1, K.value = !0, await
|
|
329
|
-
},
|
|
328
|
+
k.value = !1, K.value = !0, await J(e.transitionDuration), K.value = !1, Y.value = !0;
|
|
329
|
+
}, H = v(!1);
|
|
330
330
|
let Z = !0;
|
|
331
331
|
const we = async (l) => {
|
|
332
|
-
e.debug && console.log("Running onInputFocus"), f("focus", l),
|
|
332
|
+
e.debug && console.log("Running onInputFocus"), f("focus", l), H.value = !0, document.addEventListener("click", ue), document.addEventListener("focusin", oe), T.value instanceof HTMLInputElement && T.value.select(), e.prefill === "focus" && Z && !z && (await $({ prefill: !0 }), Z = !1);
|
|
333
333
|
}, oe = async (l) => {
|
|
334
334
|
if (e.debug && console.log("Running onFocusOutside"), l.target instanceof Node && S.value && d.value && !S.value.contains(l.target) && !d.value.contains(l.target)) {
|
|
335
|
-
A(), f("inactive"), document.removeEventListener("focusin", oe),
|
|
335
|
+
A(), f("inactive"), document.removeEventListener("focusin", oe), H.value = !1, e.multiple && (await J(500), u.value = "");
|
|
336
336
|
return;
|
|
337
337
|
}
|
|
338
338
|
}, Ve = async (l) => {
|
|
339
|
-
if (e.debug && console.log("Running onInputBlur"), f("blur", l), !e.multiple && (e.modelValue, await
|
|
339
|
+
if (e.debug && console.log("Running onInputBlur"), f("blur", l), !e.multiple && (e.modelValue, await U(), await J(300), S.value && d.value)) {
|
|
340
340
|
const a = document.activeElement;
|
|
341
341
|
if (!S.value.contains(a) && !d.value.contains(a)) {
|
|
342
|
-
const t =
|
|
342
|
+
const t = m.value.get(e.modelValue);
|
|
343
343
|
t && (u.value = t.text);
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}, Oe = (l) => f("change", l), Ce = (l) => {
|
|
347
|
-
e.debug && console.log("Running onInputInput"), f("input", l), u.value === "" && (e.multiple || f("update:modelValue", null)), typeof e.items == "function" &&
|
|
347
|
+
e.debug && console.log("Running onInputInput"), f("input", l), u.value === "" && (e.multiple || f("update:modelValue", null)), typeof e.items == "function" && Te();
|
|
348
348
|
}, r = v(null), _ = w(() => Number.isInteger(r.value) && r.value ? r.value % O.value.length : r.value), i = v(null), ke = async () => {
|
|
349
349
|
var l;
|
|
350
|
-
if (r.value !== null ? r.value = r.value % y.value.length : r.value = 0, await
|
|
350
|
+
if (r.value !== null ? r.value = (r.value + 1) % y.value.length : r.value = 0, await U(), _.value !== null) {
|
|
351
351
|
const a = (l = d.value) == null ? void 0 : l.querySelector(
|
|
352
352
|
`#${y.value[_.value].id}`
|
|
353
353
|
);
|
|
@@ -359,7 +359,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
359
359
|
}
|
|
360
360
|
}, _e = async () => {
|
|
361
361
|
var l;
|
|
362
|
-
if (r.value !== null ? r.value = r.value === 0 ? y.value.length - 1 : r.value - 1 : r.value = y.value.length - 1, await
|
|
362
|
+
if (r.value !== null ? r.value = r.value === 0 ? y.value.length - 1 : r.value - 1 : r.value = y.value.length - 1, await U(), _.value !== null) {
|
|
363
363
|
const a = (l = d.value) == null ? void 0 : l.querySelector(
|
|
364
364
|
`#${y.value[_.value].id}`
|
|
365
365
|
);
|
|
@@ -412,7 +412,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
412
412
|
behavior: "smooth",
|
|
413
413
|
block: "nearest",
|
|
414
414
|
inline: "start"
|
|
415
|
-
}), r.value =
|
|
415
|
+
}), r.value = R.value[s.value[i.value].id].index);
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
418
|
break;
|
|
@@ -428,7 +428,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
428
428
|
behavior: "smooth",
|
|
429
429
|
block: "nearest",
|
|
430
430
|
inline: "start"
|
|
431
|
-
}), r.value =
|
|
431
|
+
}), r.value = R.value[s.value[i.value].id].index);
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
break;
|
|
@@ -453,7 +453,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
453
453
|
}
|
|
454
454
|
he();
|
|
455
455
|
const n = We(C.value);
|
|
456
|
-
M(
|
|
456
|
+
M(R.value[n.id]);
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
break;
|
|
@@ -486,7 +486,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
486
486
|
}
|
|
487
487
|
};
|
|
488
488
|
let G;
|
|
489
|
-
const
|
|
489
|
+
const Te = () => {
|
|
490
490
|
G && clearTimeout(G), G = setTimeout(async () => {
|
|
491
491
|
try {
|
|
492
492
|
await $({ prefill: !1 });
|
|
@@ -494,18 +494,18 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
494
494
|
console.error(l);
|
|
495
495
|
}
|
|
496
496
|
}, e.queryDebounceTime);
|
|
497
|
-
},
|
|
498
|
-
f("click", l), !(e.disabled || e.readonly) && (
|
|
497
|
+
}, xe = (l) => {
|
|
498
|
+
f("click", l), !(e.disabled || e.readonly) && (T.value instanceof HTMLElement && T.value.focus(), D());
|
|
499
499
|
}, Ie = async (l) => {
|
|
500
500
|
if (l.currentTarget instanceof HTMLElement && l.currentTarget.classList.contains("bb-base-select-option")) {
|
|
501
|
-
const a =
|
|
501
|
+
const a = R.value[l.currentTarget.id];
|
|
502
502
|
if (a.disabled)
|
|
503
503
|
return;
|
|
504
|
-
await M(a), await
|
|
504
|
+
await M(a), await U(), T.value instanceof HTMLInputElement && T.value.focus(), e.multiple || A();
|
|
505
505
|
}
|
|
506
506
|
}, ue = async (l) => {
|
|
507
507
|
if (l.target instanceof Node && S.value && !S.value.contains(l.target)) {
|
|
508
|
-
A(), f("inactive"), document.removeEventListener("click", ue),
|
|
508
|
+
A(), f("inactive"), document.removeEventListener("click", ue), H.value = !1, e.multiple && (await J(500), u.value = "");
|
|
509
509
|
return;
|
|
510
510
|
}
|
|
511
511
|
}, Be = Ze(
|
|
@@ -525,13 +525,13 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
525
525
|
ref: S,
|
|
526
526
|
class: I({
|
|
527
527
|
"bb-base-select": !0,
|
|
528
|
-
"bb-base-select--active":
|
|
528
|
+
"bb-base-select--active": H.value,
|
|
529
529
|
"bb-base-select--loading": c.value,
|
|
530
530
|
"bb-base-select--disabled": l.disabled,
|
|
531
531
|
"bb-base-select--errors": l.hasErrors,
|
|
532
532
|
"bb-base-select--readonly": l.readonly
|
|
533
533
|
}),
|
|
534
|
-
onClick:
|
|
534
|
+
onClick: xe
|
|
535
535
|
}, [
|
|
536
536
|
b(l.$slots, "prepend-outer"),
|
|
537
537
|
V("span", {
|
|
@@ -542,14 +542,14 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
542
542
|
b(l.$slots, "prepend"),
|
|
543
543
|
V("span", Xe, [
|
|
544
544
|
l.multiple ? (g(), h(L, { key: 0 }, [
|
|
545
|
-
l.comma ? (g(!0), h(L, { key: 0 },
|
|
545
|
+
l.comma ? (g(!0), h(L, { key: 0 }, P(s.value, (t, n) => (g(), h("span", {
|
|
546
546
|
key: t.id,
|
|
547
547
|
class: I({
|
|
548
548
|
"bb-base-select__selected": !0,
|
|
549
549
|
"bb-base-select__selected--comma": !0,
|
|
550
550
|
"bb-base-select__selected--focused": n === i.value
|
|
551
551
|
})
|
|
552
|
-
}, F(t.text) + F(n < s.value.length - 1 ? "," : ""), 3))), 128)) : (g(!0), h(L, { key: 1 },
|
|
552
|
+
}, F(t.text) + F(n < s.value.length - 1 ? "," : ""), 3))), 128)) : (g(!0), h(L, { key: 1 }, P(s.value, (t, n) => (g(), ie(ze, {
|
|
553
553
|
key: t.id,
|
|
554
554
|
class: I({
|
|
555
555
|
"bb-base-select__selected": !0,
|
|
@@ -581,7 +581,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
581
581
|
Fe(V("input", {
|
|
582
582
|
id: l.id,
|
|
583
583
|
ref_key: "input",
|
|
584
|
-
ref:
|
|
584
|
+
ref: T,
|
|
585
585
|
"onUpdate:modelValue": a[0] || (a[0] = (t) => u.value = t),
|
|
586
586
|
autocomplete: l.autocomplete,
|
|
587
587
|
autofocus: l.autofocus,
|
|
@@ -623,7 +623,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
623
623
|
le(F(l.noDataText), 1)
|
|
624
624
|
])
|
|
625
625
|
])),
|
|
626
|
-
(g(!0), h(L, null,
|
|
626
|
+
(g(!0), h(L, null, P(O.value, (t) => (g(), h(L, {
|
|
627
627
|
key: t.id
|
|
628
628
|
}, [
|
|
629
629
|
b(l.$slots, "option:prepend", {
|
|
@@ -689,7 +689,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
689
689
|
], 2)) : b(l.$slots, "append", { key: 0 })
|
|
690
690
|
], 512),
|
|
691
691
|
b(l.$slots, "append-outer"),
|
|
692
|
-
(g(!0), h(L, null,
|
|
692
|
+
(g(!0), h(L, null, P(Ee.value, (t) => (g(), h("input", Re({
|
|
693
693
|
key: t.value
|
|
694
694
|
}, t), null, 16))), 128))
|
|
695
695
|
], 2));
|