bitboss-ui 0.2.44 → 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 +4 -4
- 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/index121.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/index196.js +2 -2
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +4 -3
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +5 -35
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +16 -6
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +16 -5
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +18 -15
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +17 -13
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +28 -18
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +8 -20
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +2 -29
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +368 -8
- 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 -2
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +174 -2
- package/dist/index209.js.map +1 -1
- package/dist/index21.js +2 -2
- package/dist/index210.js +23 -2
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +350 -345
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +2 -134
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +3 -174
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +3 -23
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +225 -363
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +2 -235
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +2 -4
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +3 -10
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +35 -2
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +6 -3
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +10 -3
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +9 -6
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +120 -16
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +6 -9
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +16 -120
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +3 -434
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +294 -88
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +6 -200
- 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 -6
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +2 -2
- package/dist/index235.js +2 -2
- package/dist/index236.js +117 -2
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +106 -2
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +218 -111
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +246 -94
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +1 -1
- package/dist/index241.js +2 -69
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +5 -160
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +162 -1
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +1 -7
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +69 -2
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +434 -3
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +83 -218
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +200 -258
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +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 +74 -74
- 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 +5 -5
- package/dist/index69.js +2 -2
- package/dist/index72.js +1 -1
- package/dist/index75.js +1 -1
- package/dist/index79.js +4 -4
- package/dist/index81.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index31.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as Ne, ref as v, computed 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"
|
|
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" }, ol = { class: "bb-base-select-option__text" }, ul = { class: "bb-base-select__chevron" }, il = /* @__PURE__ */
|
|
22
|
+
}, al = ["id", "aria-selected"], nl = { class: "bb-base-select-option__content" }, ol = { class: "bb-base-select-option__text" }, ul = { 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"
|
|
26
26
|
}, [
|
|
27
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ V("path", {
|
|
28
28
|
"clip-rule": "evenodd",
|
|
29
29
|
d: "M0.851779 0.225802C0.90403 0.173418 0.966103 0.131858 1.03444 0.1035C1.10278 0.0751431 1.17604 0.0605469 1.25003 0.0605469C1.32402 0.0605469 1.39728 0.0751431 1.46562 0.1035C1.53396 0.131858 1.59603 0.173418 1.64828 0.225802L8.00003 6.57868L14.3518 0.225802C14.4041 0.173503 14.4662 0.132017 14.5345 0.103713C14.6028 0.0754093 14.6761 0.0608414 14.75 0.0608414C14.824 0.0608414 14.8972 0.0754093 14.9656 0.103713C15.0339 0.132017 15.096 0.173503 15.1483 0.225802C15.2006 0.278101 15.2421 0.340189 15.2704 0.408521C15.2987 0.476852 15.3132 0.55009 15.3132 0.624052C15.3132 0.698014 15.2987 0.771252 15.2704 0.839584C15.2421 0.907916 15.2006 0.970003 15.1483 1.0223L8.39828 7.7723C8.34603 7.82469 8.28395 7.86625 8.21562 7.8946C8.14728 7.92296 8.07402 7.93756 8.00003 7.93756C7.92604 7.93756 7.85278 7.92296 7.78444 7.8946C7.7161 7.86625 7.65403 7.82469 7.60178 7.7723L0.851779 1.0223C0.799395 0.970051 0.757835 0.907978 0.729477 0.83964C0.70112 0.771302 0.686523 0.69804 0.686523 0.624052C0.686523 0.550064 0.70112 0.476803 0.729477 0.408464C0.757835 0.340126 0.799395 0.278053 0.851779 0.225802Z",
|
|
30
30
|
fill: "currentColor",
|
|
@@ -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(
|
|
@@ -87,7 +87,7 @@ 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([]), m = v([]), C = v([]), { getItemText: me } = Ke(), { getItemValue: pe } = Ye(), ge =
|
|
90
|
+
const ne = v([]), m = v([]), C = v([]), { getItemText: me } = Ke(), { getItemValue: pe } = Ye(), ge = w(() => ne.value.map((l, a) => {
|
|
91
91
|
e.debug && console.log("Mapping items in internalOptions", { item: l });
|
|
92
92
|
const t = me(l, e.itemText), n = pe(l, e.itemValue);
|
|
93
93
|
if (n === void 0)
|
|
@@ -104,7 +104,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
104
104
|
text: t,
|
|
105
105
|
value: n
|
|
106
106
|
};
|
|
107
|
-
})), y =
|
|
107
|
+
})), y = w(() => {
|
|
108
108
|
let l = ge.value.reduce(
|
|
109
109
|
(n, o) => (n[o.id] = o, n),
|
|
110
110
|
{}
|
|
@@ -127,7 +127,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
127
127
|
index: o
|
|
128
128
|
})
|
|
129
129
|
);
|
|
130
|
-
}),
|
|
130
|
+
}), O = w(() => {
|
|
131
131
|
e.debug && console.log("Computing filtered options");
|
|
132
132
|
let l = [];
|
|
133
133
|
return u.value && !s.value.some(
|
|
@@ -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
|
|
@@ -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
|
-
}), R =
|
|
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
|
-
), p =
|
|
162
|
+
), p = 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),
|
|
@@ -181,7 +181,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
181
181
|
};
|
|
182
182
|
} else
|
|
183
183
|
throw new Error("No match strategy has been defined");
|
|
184
|
-
}), be =
|
|
184
|
+
}), be = w(() => {
|
|
185
185
|
if (e.debug && console.log("Computing modelValueIndexed"), e.matchStrategy === "string") {
|
|
186
186
|
let l = {};
|
|
187
187
|
return [].concat(e.modelValue).forEach((a, t) => {
|
|
@@ -199,13 +199,13 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
199
199
|
};
|
|
200
200
|
} else
|
|
201
201
|
throw new Error("No match strategy has been defined");
|
|
202
|
-
}), s =
|
|
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" &&
|
|
348
|
-
}, r = v(null), _ =
|
|
347
|
+
e.debug && console.log("Running onInputInput"), f("input", l), u.value === "" && (e.multiple || f("update:modelValue", null)), typeof e.items == "function" && xe();
|
|
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
|
);
|
|
@@ -381,7 +381,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
381
381
|
if (l.preventDefault(), c.value)
|
|
382
382
|
return;
|
|
383
383
|
if (i.value = null, k.value) {
|
|
384
|
-
if (!
|
|
384
|
+
if (!O.value.length)
|
|
385
385
|
return;
|
|
386
386
|
_e();
|
|
387
387
|
} else
|
|
@@ -393,7 +393,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
393
393
|
if (l.preventDefault(), c.value)
|
|
394
394
|
return;
|
|
395
395
|
if (i.value = null, k.value) {
|
|
396
|
-
if (!
|
|
396
|
+
if (!O.value.length)
|
|
397
397
|
return;
|
|
398
398
|
ke();
|
|
399
399
|
} else
|
|
@@ -437,12 +437,12 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
437
437
|
if (l.preventDefault(), c.value)
|
|
438
438
|
return;
|
|
439
439
|
if (!k.value)
|
|
440
|
-
|
|
440
|
+
O.value.length && s.value.length && (r.value = te(s.value).index), await D();
|
|
441
441
|
else if (_.value !== null) {
|
|
442
|
-
if (
|
|
442
|
+
if (O.value[_.value].disabled)
|
|
443
443
|
return;
|
|
444
444
|
e.multiple || await A(), M(
|
|
445
|
-
|
|
445
|
+
O.value[_.value]
|
|
446
446
|
);
|
|
447
447
|
} else if (e.addOptions) {
|
|
448
448
|
if (e.itemText || e.itemValue) {
|
|
@@ -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)) {
|
|
@@ -511,7 +511,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
511
511
|
}, Be = Ze(
|
|
512
512
|
(l) => typeof l != "string",
|
|
513
513
|
JSON.stringify
|
|
514
|
-
), Ee =
|
|
514
|
+
), Ee = w(() => [].concat(e.modelValue).map((l) => {
|
|
515
515
|
const a = Be(l);
|
|
516
516
|
return {
|
|
517
517
|
disabled: e.disabled,
|
|
@@ -531,16 +531,16 @@ 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", {
|
|
538
538
|
ref_key: "innerContainer",
|
|
539
539
|
ref: N,
|
|
540
540
|
class: "bb-base-select__inner-container"
|
|
541
541
|
}, [
|
|
542
542
|
b(l.$slots, "prepend"),
|
|
543
|
-
|
|
543
|
+
V("span", Xe, [
|
|
544
544
|
l.multiple ? (g(), h(L, { key: 0 }, [
|
|
545
545
|
l.comma ? (g(!0), h(L, { key: 0 }, P(s.value, (t, n) => (g(), h("span", {
|
|
546
546
|
key: t.id,
|
|
@@ -572,16 +572,16 @@ 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
|
|
579
579
|
}, 1032, ["class", "text", "onClick:clear"]))), 128))
|
|
580
580
|
], 64)) : se("", !0),
|
|
581
|
-
Fe(
|
|
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,
|
|
@@ -599,37 +599,37 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
599
599
|
[Me, u.value]
|
|
600
600
|
]),
|
|
601
601
|
(g(), ie(Ae, { to: "body" }, [
|
|
602
|
-
|
|
602
|
+
V("span", {
|
|
603
603
|
ref_key: "optionsContainer",
|
|
604
604
|
ref: d,
|
|
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 }),
|
|
614
614
|
tabindex: -1
|
|
615
615
|
}, [
|
|
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
|
-
(g(!0), h(L, null, P(
|
|
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", {
|
|
630
630
|
item: t.original
|
|
631
631
|
}),
|
|
632
|
-
|
|
632
|
+
V("span", {
|
|
633
633
|
id: t.id,
|
|
634
634
|
"aria-selected": t.selected,
|
|
635
635
|
class: I({
|
|
@@ -653,8 +653,8 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
653
653
|
text: t.text,
|
|
654
654
|
value: t.value
|
|
655
655
|
}, () => [
|
|
656
|
-
|
|
657
|
-
|
|
656
|
+
V("span", nl, [
|
|
657
|
+
V("span", ol, F(t.text), 1)
|
|
658
658
|
])
|
|
659
659
|
])
|
|
660
660
|
], 10, al),
|
|
@@ -666,7 +666,7 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
666
666
|
], 6)
|
|
667
667
|
]))
|
|
668
668
|
]),
|
|
669
|
-
|
|
669
|
+
V("span", ul, [
|
|
670
670
|
b(l.$slots, "chevron", {
|
|
671
671
|
loading: !!c.value,
|
|
672
672
|
shown: k.value
|