bitboss-ui 0.2.41 → 0.2.42
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/index11.js +2 -2
- package/dist/index111.js +4 -4
- 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/index15.js +8 -8
- package/dist/index17.js +9 -9
- package/dist/index19.js +3 -3
- package/dist/index197.js +235 -3
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +2 -35
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +3 -6
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +32 -232
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +6 -2
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +5 -4
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +16 -3
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +16 -3
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +19 -5
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +17 -13
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +26 -13
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +8 -19
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +2 -20
- package/dist/index209.js.map +1 -1
- package/dist/index21.js +2 -2
- package/dist/index210.js +2 -29
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +4 -8
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +368 -2
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +134 -2
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +2 -368
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +170 -130
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +23 -2
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +363 -164
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +3 -23
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +3 -373
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +9 -2
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +121 -2
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +2 -9
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +2 -121
- package/dist/index223.js.map +1 -1
- package/dist/index226.js +1 -1
- package/dist/index228.js +1 -1
- package/dist/index23.js +1 -1
- package/dist/index233.js +1 -1
- package/dist/index234.js +1 -1
- package/dist/index235.js +199 -3
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +293 -198
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +5 -223
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +2 -258
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +2 -295
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +2 -6
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +2 -2
- package/dist/index244.js +4 -2
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +2 -2
- package/dist/index246.js +117 -2
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +106 -2
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +2 -2
- package/dist/index249.js +218 -111
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +2 -2
- package/dist/index250.js +246 -94
- package/dist/index250.js.map +1 -1
- package/dist/index254.js +2 -3
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +3 -2
- package/dist/index255.js.map +1 -1
- package/dist/index29.js +3 -3
- package/dist/index31.js +59 -67
- 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/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
|
@@ -3,17 +3,17 @@ import ze from "./index115.js";
|
|
|
3
3
|
import "./index158.js";
|
|
4
4
|
import Pe from "./index119.js";
|
|
5
5
|
import "./index185.js";
|
|
6
|
-
import { autoUpdate as He, computePosition as Ue, flip as je, shift as Qe } from "./
|
|
6
|
+
import { autoUpdate as He, computePosition as Ue, flip as je, shift as Qe } from "./index212.js";
|
|
7
7
|
import { deepEqual as re } from "./index123.js";
|
|
8
|
-
import { head as le } from "./
|
|
8
|
+
import { head as le } from "./index223.js";
|
|
9
9
|
import { isNotNil as B } from "./index124.js";
|
|
10
|
-
import { last as We } from "./
|
|
10
|
+
import { last as We } from "./index209.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 { waitFor as Ze } from "./
|
|
15
|
-
import { when as Ge } from "./
|
|
16
|
-
import { offset as Xe } from "./
|
|
14
|
+
import { waitFor as Ze } from "./index201.js";
|
|
15
|
+
import { when as Ge } from "./index211.js";
|
|
16
|
+
import { offset as Xe } from "./index217.js";
|
|
17
17
|
const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomplete", "autofocus", "disabled", "placeholder", "readonly"], tl = {
|
|
18
18
|
key: 0,
|
|
19
19
|
class: "bb-base-select__loading-container"
|
|
@@ -88,9 +88,9 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
|
|
|
88
88
|
}), De(() => {
|
|
89
89
|
e.debug && console.log("Calling onBeforeUnMount"), te();
|
|
90
90
|
});
|
|
91
|
-
const ae = f([]),
|
|
91
|
+
const ae = f([]), m = f([]), V = f([]), { getItemText: me } = Ke(), { getItemValue: pe } = Ye(), ge = y(() => ae.value.map((l, a) => {
|
|
92
92
|
e.debug && console.log("Mapping items in internalOptions", { item: l });
|
|
93
|
-
const t =
|
|
93
|
+
const t = me(l, e.itemText), n = pe(l, e.itemValue);
|
|
94
94
|
if (n === void 0)
|
|
95
95
|
throw new Error(
|
|
96
96
|
'The result of extracting "value" from option was undefined. Affected item is ' + JSON.stringify(l) + " please check itemValue property is correct."
|
|
@@ -113,7 +113,7 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
|
|
|
113
113
|
const a = V.value.reduce(
|
|
114
114
|
(n, o) => (n[o.id] || (n[o.id] = o), n),
|
|
115
115
|
l
|
|
116
|
-
), t =
|
|
116
|
+
), t = m.value.reduce(
|
|
117
117
|
(n, o) => (n[o.id] || (n[o.id] = o), n),
|
|
118
118
|
a
|
|
119
119
|
);
|
|
@@ -160,7 +160,7 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
|
|
|
160
160
|
}),
|
|
161
161
|
{}
|
|
162
162
|
)
|
|
163
|
-
),
|
|
163
|
+
), p = y(() => {
|
|
164
164
|
if (e.debug && console.log("Computing optionsIndexedByValue"), e.matchStrategy === "string") {
|
|
165
165
|
let l = O.value.reduce(
|
|
166
166
|
(a, t) => (a[t.jsonValue] = t, a),
|
|
@@ -201,7 +201,7 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
|
|
|
201
201
|
} else
|
|
202
202
|
throw new Error("No match strategy has been defined");
|
|
203
203
|
}), s = y(() => (e.debug && console.log("Computing selectedOptions"), [].concat(e.modelValue).reduce((l, a) => {
|
|
204
|
-
const t =
|
|
204
|
+
const t = p.value.get(a);
|
|
205
205
|
return t && l.push(t), l;
|
|
206
206
|
}, []))), M = (l) => {
|
|
207
207
|
e.debug && console.log("Running onOptionSelected", { option: l });
|
|
@@ -210,11 +210,11 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
|
|
|
210
210
|
(t) => t.id !== l.id
|
|
211
211
|
)), a = e.modelValue.filter(
|
|
212
212
|
(t) => JSON.stringify(t) !== l.jsonValue
|
|
213
|
-
), e.stash && (e.debug && console.log("onOptionSelected: inside multiple > selected > stash"),
|
|
213
|
+
), e.stash && (e.debug && console.log("onOptionSelected: inside multiple > selected > stash"), m.value = m.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(
|
|
214
214
|
"onOptionSelected: inside multiple > not selected > stash"
|
|
215
|
-
),
|
|
215
|
+
), m.value = m.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"), V.value = V.value.filter(
|
|
216
216
|
(t) => t.id !== l.id
|
|
217
|
-
)), a = null, e.stash && (e.debug && console.log("onOptionSelected: inside single > selected > stash"),
|
|
217
|
+
)), 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), c("update:modelValue", a);
|
|
218
218
|
}, N = async ({ prefill: l = !1 }) => {
|
|
219
219
|
e.debug && console.log("running getOptions");
|
|
220
220
|
let a = [];
|
|
@@ -242,31 +242,31 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
|
|
|
242
242
|
if (!Array.isArray(e.modelValue))
|
|
243
243
|
throw new Error("props.modelValue is not an array.");
|
|
244
244
|
let t = e.modelValue.every(
|
|
245
|
-
(n) =>
|
|
245
|
+
(n) => p.value.get(n)
|
|
246
246
|
);
|
|
247
247
|
if ((!t || a === void 0) && (await N({ prefill: !0 }), t = e.modelValue.every(
|
|
248
|
-
(n) =>
|
|
248
|
+
(n) => p.value.get(n)
|
|
249
249
|
)), t)
|
|
250
|
-
e.stash && (
|
|
251
|
-
(n) =>
|
|
250
|
+
e.stash && (m.value = e.modelValue.map(
|
|
251
|
+
(n) => p.value.get(n)
|
|
252
252
|
));
|
|
253
253
|
else {
|
|
254
254
|
let n = [];
|
|
255
255
|
const o = l.filter((T) => {
|
|
256
|
-
let q =
|
|
256
|
+
let q = p.value.get(T);
|
|
257
257
|
return q && n.push(q), q;
|
|
258
258
|
});
|
|
259
|
-
e.stash && (
|
|
259
|
+
e.stash && (m.value = n), e.enforceCoherence && c("update:modelValue", o);
|
|
260
260
|
}
|
|
261
261
|
} else {
|
|
262
262
|
e.debug && console.log("watch.modelValue >> single");
|
|
263
|
-
let t =
|
|
263
|
+
let t = p.value.get(e.modelValue);
|
|
264
264
|
if (!t && B(e.modelValue) || a === void 0) {
|
|
265
265
|
e.debug && console.log("watch.modelValue >> not found line 895");
|
|
266
266
|
const n = u.value;
|
|
267
267
|
u.value = "", await N({ prefill: !0 }), u.value = n;
|
|
268
268
|
}
|
|
269
|
-
t =
|
|
269
|
+
t = p.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 && (m.value = [t], e.debug && console.log("watch.modelValue assigned to stash")), e.debug && console.log("watch.modelValue end of found")) : e.enforceCoherence && B(l) ? (e.debug && console.log("watch.modelValue >> not found line 911"), u.value = "", e.stash && (m.value = []), c("update:modelValue", null)) : u.value = "";
|
|
270
270
|
}
|
|
271
271
|
},
|
|
272
272
|
z ? 0 : e.modelValueDebounceTime
|
|
@@ -281,13 +281,13 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
|
|
|
281
281
|
JSON.stringify(l) !== JSON.stringify(a))
|
|
282
282
|
if (e.debug && console.log("watch.items"), await N({ prefill: !1 }), e.multiple) {
|
|
283
283
|
if (!e.modelValue.every(
|
|
284
|
-
(n) =>
|
|
284
|
+
(n) => p.value.get(n)
|
|
285
285
|
) && e.enforceCoherence) {
|
|
286
|
-
const n = e.modelValue.filter((o) =>
|
|
286
|
+
const n = e.modelValue.filter((o) => p.value.get(o));
|
|
287
287
|
c("update:modelValue", n);
|
|
288
288
|
}
|
|
289
289
|
} else
|
|
290
|
-
!
|
|
290
|
+
!p.value.get(e.modelValue) && e.enforceCoherence && B(e.modelValue) && c("update:modelValue", null), r.value = null;
|
|
291
291
|
}
|
|
292
292
|
);
|
|
293
293
|
let j;
|
|
@@ -296,19 +296,19 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
|
|
|
296
296
|
(l, a) => {
|
|
297
297
|
!z && e.prefill === "focus" && Y || JSON.stringify(l) !== JSON.stringify(a) && (j && clearTimeout(j), j = setTimeout(async () => {
|
|
298
298
|
if (JSON.stringify(l) !== JSON.stringify(a)) {
|
|
299
|
-
e.enforceCoherence && e.stash && (
|
|
299
|
+
e.enforceCoherence && e.stash && (m.value = []);
|
|
300
300
|
let t = u.value;
|
|
301
301
|
if (u.value = "", await N({ prefill: !0 }), u.value = t, !e.multiple)
|
|
302
|
-
!
|
|
302
|
+
!p.value.get(e.modelValue) && e.enforceCoherence && B(e.modelValue) && (u.value = "", e.stash && (m.value = []), c("update:modelValue", null));
|
|
303
303
|
else if (!e.modelValue.every(
|
|
304
|
-
(o) =>
|
|
304
|
+
(o) => p.value.get(o)
|
|
305
305
|
) && e.enforceCoherence) {
|
|
306
306
|
let o = [];
|
|
307
307
|
const T = e.modelValue.filter((q) => {
|
|
308
|
-
let G =
|
|
308
|
+
let G = p.value.get(q);
|
|
309
309
|
return G && o.push(G), G;
|
|
310
310
|
});
|
|
311
|
-
e.stash && (
|
|
311
|
+
e.stash && (m.value = o), c("update:modelValue", T);
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
}, e.depsDebounceTime));
|
|
@@ -331,11 +331,9 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
|
|
|
331
331
|
let Y = !0;
|
|
332
332
|
const we = async (l) => {
|
|
333
333
|
e.debug && console.log("Running onInputFocus"), c("focus", l), P.value = !0, document.addEventListener("click", oe), document.addEventListener("focusin", ne), S.value instanceof HTMLInputElement && S.value.select(), e.prefill === "focus" && Y && !z && (await N({ prefill: !0 }), Y = !1);
|
|
334
|
-
}, ne = (l) => {
|
|
334
|
+
}, ne = async (l) => {
|
|
335
335
|
if (e.debug && console.log("Running onFocusOutside"), l.target instanceof Node && F.value && v.value && !F.value.contains(l.target) && !v.value.contains(l.target)) {
|
|
336
|
-
A(), c("inactive"), document.removeEventListener("focusin", ne), P.value = !1, e.multiple && J(500).
|
|
337
|
-
u.value = "";
|
|
338
|
-
});
|
|
336
|
+
A(), c("inactive"), document.removeEventListener("focusin", ne), P.value = !1, e.multiple && (await J(500), u.value = "");
|
|
339
337
|
return;
|
|
340
338
|
}
|
|
341
339
|
}, Ve = async (l) => {
|
|
@@ -348,40 +346,36 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
|
|
|
348
346
|
a = !0;
|
|
349
347
|
})
|
|
350
348
|
]), !a) {
|
|
351
|
-
const n =
|
|
349
|
+
const n = p.value.get(e.modelValue);
|
|
352
350
|
n && (u.value = n.text);
|
|
353
351
|
}
|
|
354
352
|
}
|
|
355
353
|
}, Oe = (l) => c("change", l), Ce = (l) => {
|
|
356
354
|
e.debug && console.log("Running onInputInput"), c("input", l), u.value === "" && (e.multiple || c("update:modelValue", null)), typeof e.items == "function" && Te();
|
|
357
|
-
}, r = f(null), _ = y(() => Number.isInteger(r.value) && r.value ? (r.value === -1 && (r.value = C.value.length - 1), r.value % C.value.length) : r.value), i = f(null), ke = () => {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
inline: "start"
|
|
382
|
-
});
|
|
383
|
-
}
|
|
384
|
-
});
|
|
355
|
+
}, r = f(null), _ = y(() => Number.isInteger(r.value) && r.value ? (r.value === -1 && (r.value = C.value.length - 1), r.value % C.value.length) : r.value), i = f(null), ke = async () => {
|
|
356
|
+
var l;
|
|
357
|
+
if (r.value !== null ? r.value++ : r.value = 0, await se(), _.value !== null) {
|
|
358
|
+
const a = (l = v.value) == null ? void 0 : l.querySelector(
|
|
359
|
+
`#${O.value[_.value].id}`
|
|
360
|
+
);
|
|
361
|
+
a instanceof HTMLElement && a.scrollIntoView({
|
|
362
|
+
behavior: "smooth",
|
|
363
|
+
block: "nearest",
|
|
364
|
+
inline: "start"
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
}, _e = async () => {
|
|
368
|
+
var l;
|
|
369
|
+
if (r.value !== null ? r.value-- : r.value = O.value.length - 1, await se(), _.value !== null) {
|
|
370
|
+
const a = (l = v.value) == null ? void 0 : l.querySelector(
|
|
371
|
+
`#${O.value[_.value].id}`
|
|
372
|
+
);
|
|
373
|
+
a instanceof HTMLElement && a.scrollIntoView({
|
|
374
|
+
behavior: "smooth",
|
|
375
|
+
block: "nearest",
|
|
376
|
+
inline: "start"
|
|
377
|
+
});
|
|
378
|
+
}
|
|
385
379
|
}, Se = async (l) => {
|
|
386
380
|
var a, t;
|
|
387
381
|
if (e.readonly || e.disabled) {
|
|
@@ -506,11 +500,9 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
|
|
|
506
500
|
return;
|
|
507
501
|
M(a), S.value instanceof HTMLInputElement && S.value.focus(), e.multiple || A();
|
|
508
502
|
}
|
|
509
|
-
}, oe = (l) => {
|
|
503
|
+
}, oe = async (l) => {
|
|
510
504
|
if (l.target instanceof Node && F.value && !F.value.contains(l.target)) {
|
|
511
|
-
A(), c("inactive"), document.removeEventListener("click", oe), P.value = !1, e.multiple && J(500).
|
|
512
|
-
u.value = "";
|
|
513
|
-
});
|
|
505
|
+
A(), c("inactive"), document.removeEventListener("click", oe), P.value = !1, e.multiple && (await J(500), u.value = "");
|
|
514
506
|
return;
|
|
515
507
|
}
|
|
516
508
|
}, Be = Ge(
|