bitboss-ui 0.2.45 → 0.2.46
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 +3 -3
- package/dist/index103.js +2 -2
- package/dist/index109.js +1 -1
- package/dist/index11.js +2 -2
- package/dist/index111.js +1 -1
- package/dist/index113.js +1 -1
- package/dist/index117.js +1 -1
- package/dist/index119.js +1 -1
- package/dist/index121.js +1 -1
- package/dist/index125.js +1 -1
- package/dist/index126.js +1 -1
- package/dist/index127.js +1 -1
- package/dist/index15.js +7 -7
- package/dist/index17.js +8 -8
- package/dist/index196.js +2 -2
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +4 -235
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +5 -368
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +13 -131
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +16 -5
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +3 -3
- package/dist/index202.js +20 -2
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +29 -2
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +8 -174
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +2 -23
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +345 -350
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +134 -2
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +2 -4
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +174 -3
- package/dist/index209.js.map +1 -1
- package/dist/index21.js +2 -2
- package/dist/index210.js +23 -3
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +373 -2
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +2 -16
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +3 -16
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +3 -20
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +235 -29
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +2 -8
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +2 -2
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +1 -1
- package/dist/index219.js +1 -1
- package/dist/index223.js +4 -4
- package/dist/index224.js +3 -3
- package/dist/index226.js +3 -78
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +294 -5
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +6 -2
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +2 -295
- package/dist/index229.js.map +1 -1
- package/dist/index23.js +1 -1
- package/dist/index230.js +2 -2
- package/dist/index232.js +2 -117
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +2 -106
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +2 -2
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +2 -4
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +111 -218
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +94 -246
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +224 -69
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +257 -159
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +81 -1
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +2 -5
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +5 -2
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +160 -2
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +1 -4
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +69 -2
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +435 -2
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +82 -428
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +197 -86
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +2 -200
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +2 -2
- package/dist/index250.js +15 -4
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +4 -4
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +4 -61
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +60 -14
- package/dist/index253.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 +47 -47
- package/dist/index31.js.map +1 -1
- package/dist/index33.js +2 -2
- 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/index77.js +1 -1
- package/dist/index79.js +2 -2
- package/dist/index81.js +1 -1
- 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
|
|
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 "./index206.js";
|
|
7
7
|
import { deepEqual as re } from "./index123.js";
|
|
8
|
-
import { head as te } from "./
|
|
8
|
+
import { head as te } from "./index217.js";
|
|
9
9
|
import { isNotNil as E } from "./index124.js";
|
|
10
|
-
import { last as We } from "./
|
|
10
|
+
import { last as We } from "./index205.js";
|
|
11
11
|
import { useItemText as Ke } from "./index125.js";
|
|
12
12
|
import { useItemValue as Ye } from "./index126.js";
|
|
13
13
|
import { wait as J } from "./index122.js";
|
|
14
|
-
import { when as Ze } from "./
|
|
15
|
-
import { offset as Ge } from "./
|
|
14
|
+
import { when as Ze } from "./index197.js";
|
|
15
|
+
import { offset as Ge } from "./index211.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), x = 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(
|
|
@@ -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 T = n[o];
|
|
144
|
+
t = t || a.original[T] && a.original[T].toLowerCase().includes(u.value.toLowerCase());
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
} else
|
|
@@ -202,10 +202,10 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
202
202
|
}), s = w(() => (e.debug && console.log("Computing selectedOptions"), [].concat(e.modelValue).reduce((l, a) => {
|
|
203
203
|
const t = p.value.get(a);
|
|
204
204
|
return t && l.push(t), l;
|
|
205
|
-
}, []))), M = (l) => {
|
|
205
|
+
}, []))), M = async (l) => {
|
|
206
206
|
e.debug && console.log("Running onOptionSelected", { option: l });
|
|
207
207
|
let a;
|
|
208
|
-
r.value = l.index, e.multiple ? (l.selected ? (l.manual && (e.debug && console.log("onOptionSelected: inside multiple > selected > manual"), C.value = C.value.filter(
|
|
208
|
+
console.log("assigning focus index to value before nexttick", l.index), await U(), console.log("assigning focus index to value after nexttick", l.index), r.value = l.index, 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
|
|
@@ -231,11 +231,11 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
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
|
-
let
|
|
235
|
-
|
|
234
|
+
let j;
|
|
235
|
+
ee(
|
|
236
236
|
() => e.modelValue,
|
|
237
237
|
(l, a) => {
|
|
238
|
-
e.debug && console.log("running watch.modelValue"),
|
|
238
|
+
e.debug && console.log("running watch.modelValue"), j && clearTimeout(j), j = setTimeout(
|
|
239
239
|
async () => {
|
|
240
240
|
if (e.multiple) {
|
|
241
241
|
if (!Array.isArray(e.modelValue))
|
|
@@ -251,8 +251,8 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
251
251
|
));
|
|
252
252
|
else {
|
|
253
253
|
let n = [];
|
|
254
|
-
const o = l.filter((
|
|
255
|
-
let q = p.value.get(
|
|
254
|
+
const o = l.filter((T) => {
|
|
255
|
+
let q = p.value.get(T);
|
|
256
256
|
return q && n.push(q), q;
|
|
257
257
|
});
|
|
258
258
|
e.stash && (m.value = n), e.enforceCoherence && f("update:modelValue", o);
|
|
@@ -273,7 +273,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
273
273
|
},
|
|
274
274
|
// Prefill when asked or when items are static
|
|
275
275
|
{ immediate: z, deep: !0 }
|
|
276
|
-
),
|
|
276
|
+
), ee(
|
|
277
277
|
() => e.items,
|
|
278
278
|
async (l, a) => {
|
|
279
279
|
if (typeof l == "function" || // Circumvent arrays defined in the template by the parent
|
|
@@ -289,11 +289,11 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
289
289
|
!p.value.get(e.modelValue) && e.enforceCoherence && E(e.modelValue) && f("update:modelValue", null), r.value = null;
|
|
290
290
|
}
|
|
291
291
|
);
|
|
292
|
-
let
|
|
293
|
-
|
|
292
|
+
let Q;
|
|
293
|
+
ee(
|
|
294
294
|
() => e.dependencies,
|
|
295
295
|
(l, a) => {
|
|
296
|
-
!z && e.prefill === "focus" &&
|
|
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
298
|
e.enforceCoherence && e.stash && (m.value = []);
|
|
299
299
|
let t = u.value;
|
|
@@ -303,11 +303,11 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
303
303
|
(o) => p.value.get(o)
|
|
304
304
|
) && e.enforceCoherence) {
|
|
305
305
|
let o = [];
|
|
306
|
-
const
|
|
307
|
-
let
|
|
308
|
-
return
|
|
306
|
+
const T = e.modelValue.filter((q) => {
|
|
307
|
+
let X = p.value.get(q);
|
|
308
|
+
return X && o.push(X), X;
|
|
309
309
|
});
|
|
310
|
-
e.stash && (m.value = o), f("update:modelValue",
|
|
310
|
+
e.stash && (m.value = o), f("update:modelValue", T);
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
}, e.depsDebounceTime));
|
|
@@ -322,21 +322,21 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
322
322
|
var a;
|
|
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
|
-
}, k = v(!1),
|
|
326
|
-
|
|
325
|
+
}, k = v(!1), W = v(!1), K = v(!1), Y = v(!0), D = async () => {
|
|
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,
|
|
328
|
+
k.value = !1, K.value = !0, await J(e.transitionDuration), K.value = !1, Y.value = !0;
|
|
329
329
|
}, H = v(!1);
|
|
330
|
-
let
|
|
330
|
+
let Z = !0;
|
|
331
331
|
const we = async (l) => {
|
|
332
|
-
e.debug && console.log("Running onInputFocus"), f("focus", l), H.value = !0, document.addEventListener("click", ue), document.addEventListener("focusin", oe),
|
|
332
|
+
e.debug && console.log("Running onInputFocus"), f("focus", l), H.value = !0, document.addEventListener("click", ue), document.addEventListener("focusin", oe), x.value instanceof HTMLInputElement && x.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
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
342
|
const t = p.value.get(e.modelValue);
|
|
@@ -344,10 +344,10 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
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" && xe();
|
|
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 % 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
|
);
|
|
@@ -485,23 +485,23 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
485
485
|
break;
|
|
486
486
|
}
|
|
487
487
|
};
|
|
488
|
-
let
|
|
489
|
-
const
|
|
490
|
-
|
|
488
|
+
let G;
|
|
489
|
+
const xe = () => {
|
|
490
|
+
G && clearTimeout(G), G = setTimeout(async () => {
|
|
491
491
|
try {
|
|
492
492
|
await $({ prefill: !1 });
|
|
493
493
|
} catch (l) {
|
|
494
494
|
console.error(l);
|
|
495
495
|
}
|
|
496
496
|
}, e.queryDebounceTime);
|
|
497
|
-
},
|
|
498
|
-
f("click", l), !(e.disabled || e.readonly) && (
|
|
497
|
+
}, Te = (l) => {
|
|
498
|
+
f("click", l), !(e.disabled || e.readonly) && (x.value instanceof HTMLElement && x.value.focus(), D());
|
|
499
499
|
}, Ie = (l) => {
|
|
500
500
|
if (l.currentTarget instanceof HTMLElement && l.currentTarget.classList.contains("bb-base-select-option")) {
|
|
501
501
|
const a = R.value[l.currentTarget.id];
|
|
502
502
|
if (a.disabled)
|
|
503
503
|
return;
|
|
504
|
-
M(a),
|
|
504
|
+
M(a), x.value instanceof HTMLInputElement && x.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)) {
|
|
@@ -531,7 +531,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
531
531
|
"bb-base-select--errors": l.hasErrors,
|
|
532
532
|
"bb-base-select--readonly": l.readonly
|
|
533
533
|
}),
|
|
534
|
-
onClick:
|
|
534
|
+
onClick: Te
|
|
535
535
|
}, [
|
|
536
536
|
b(l.$slots, "prepend-outer"),
|
|
537
537
|
V("span", {
|
|
@@ -572,7 +572,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
572
572
|
text: t.text,
|
|
573
573
|
value: t.value
|
|
574
574
|
}, () => [
|
|
575
|
-
|
|
575
|
+
le(F(t.text), 1)
|
|
576
576
|
])
|
|
577
577
|
]),
|
|
578
578
|
_: 2
|
|
@@ -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: x,
|
|
585
585
|
"onUpdate:modelValue": a[0] || (a[0] = (t) => u.value = t),
|
|
586
586
|
autocomplete: l.autocomplete,
|
|
587
587
|
autofocus: l.autofocus,
|
|
@@ -605,9 +605,9 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
605
605
|
class: I({
|
|
606
606
|
"bb-base-select__options-container": !0,
|
|
607
607
|
"bb-base-select__options-container--shown": k.value,
|
|
608
|
-
"bb-base-select__options-container--showing":
|
|
609
|
-
"bb-base-select__options-container--hiding":
|
|
610
|
-
"bb-base-select__options-container--hidden":
|
|
608
|
+
"bb-base-select__options-container--showing": W.value,
|
|
609
|
+
"bb-base-select__options-container--hiding": K.value,
|
|
610
|
+
"bb-base-select__options-container--hidden": Y.value
|
|
611
611
|
}),
|
|
612
612
|
role: "listbox",
|
|
613
613
|
style: qe({ transitionDuration: ve }),
|
|
@@ -616,11 +616,11 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
616
616
|
b(l.$slots, "options:prepend"),
|
|
617
617
|
!O.value.length && c.value ? (g(), h("span", ll, [
|
|
618
618
|
b(l.$slots, "loading", { query: u.value }, () => [
|
|
619
|
-
|
|
619
|
+
le(F(l.loadingText), 1)
|
|
620
620
|
])
|
|
621
621
|
])) : O.value.length ? se("", !0) : (g(), h("span", tl, [
|
|
622
622
|
b(l.$slots, "no-data", { query: u.value }, () => [
|
|
623
|
-
|
|
623
|
+
le(F(l.noDataText), 1)
|
|
624
624
|
])
|
|
625
625
|
])),
|
|
626
626
|
(g(!0), h(L, null, P(O.value, (t) => (g(), h(L, {
|