bitboss-ui 0.2.40 → 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.
Files changed (102) hide show
  1. package/dist/index101.js +1 -1
  2. package/dist/index111.js +3 -3
  3. package/dist/index116.js +1 -1
  4. package/dist/index118.js +1 -1
  5. package/dist/index121.js +1 -1
  6. package/dist/index125.js +1 -1
  7. package/dist/index126.js +1 -1
  8. package/dist/index127.js +1 -1
  9. package/dist/index131.js +2 -2
  10. package/dist/index15.js +8 -8
  11. package/dist/index17.js +3 -3
  12. package/dist/index19.js +3 -3
  13. package/dist/index196.js +10 -2
  14. package/dist/index196.js.map +1 -1
  15. package/dist/index197.js +233 -8
  16. package/dist/index197.js.map +1 -1
  17. package/dist/index198.js +2 -5
  18. package/dist/index198.js.map +1 -1
  19. package/dist/index199.js +3 -16
  20. package/dist/index199.js.map +1 -1
  21. package/dist/index200.js +35 -16
  22. package/dist/index200.js.map +1 -1
  23. package/dist/index201.js +6 -19
  24. package/dist/index201.js.map +1 -1
  25. package/dist/index202.js +5 -20
  26. package/dist/index202.js.map +1 -1
  27. package/dist/index203.js +13 -26
  28. package/dist/index203.js.map +1 -1
  29. package/dist/index204.js +16 -8
  30. package/dist/index204.js.map +1 -1
  31. package/dist/index205.js +19 -2
  32. package/dist/index205.js.map +1 -1
  33. package/dist/index206.js +20 -235
  34. package/dist/index206.js.map +1 -1
  35. package/dist/index207.js +29 -3
  36. package/dist/index207.js.map +1 -1
  37. package/dist/index208.js +8 -35
  38. package/dist/index208.js.map +1 -1
  39. package/dist/index209.js +2 -6
  40. package/dist/index209.js.map +1 -1
  41. package/dist/index21.js +2 -2
  42. package/dist/index211.js +1 -1
  43. package/dist/index213.js +1 -1
  44. package/dist/index218.js +3 -2
  45. package/dist/index218.js.map +1 -1
  46. package/dist/index219.js +3 -3
  47. package/dist/index219.js.map +1 -1
  48. package/dist/index220.js +9 -3
  49. package/dist/index220.js.map +1 -1
  50. package/dist/index221.js +121 -2
  51. package/dist/index221.js.map +1 -1
  52. package/dist/index222.js +2 -9
  53. package/dist/index222.js.map +1 -1
  54. package/dist/index223.js +2 -121
  55. package/dist/index223.js.map +1 -1
  56. package/dist/index226.js +1 -1
  57. package/dist/index228.js +1 -1
  58. package/dist/index23.js +1 -1
  59. package/dist/index232.js +14 -294
  60. package/dist/index232.js.map +1 -1
  61. package/dist/index233.js +434 -5
  62. package/dist/index233.js.map +1 -1
  63. package/dist/index234.js +89 -2
  64. package/dist/index234.js.map +1 -1
  65. package/dist/index235.js +200 -2
  66. package/dist/index235.js.map +1 -1
  67. package/dist/index236.js +295 -2
  68. package/dist/index236.js.map +1 -1
  69. package/dist/index237.js +6 -2
  70. package/dist/index237.js.map +1 -1
  71. package/dist/index238.js +2 -2
  72. package/dist/index240.js +2 -4
  73. package/dist/index240.js.map +1 -1
  74. package/dist/index241.js +2 -15
  75. package/dist/index241.js.map +1 -1
  76. package/dist/index242.js +2 -435
  77. package/dist/index242.js.map +1 -1
  78. package/dist/index243.js +2 -89
  79. package/dist/index243.js.map +1 -1
  80. package/dist/index244.js +3 -199
  81. package/dist/index244.js.map +1 -1
  82. package/dist/index248.js +2 -224
  83. package/dist/index248.js.map +1 -1
  84. package/dist/index249.js +19 -53
  85. package/dist/index249.js.map +1 -1
  86. package/dist/index250.js +258 -2
  87. package/dist/index250.js.map +1 -1
  88. package/dist/index254.js +2 -3
  89. package/dist/index254.js.map +1 -1
  90. package/dist/index255.js +3 -2
  91. package/dist/index255.js.map +1 -1
  92. package/dist/index29.js +1 -1
  93. package/dist/index31.js +65 -73
  94. package/dist/index31.js.map +1 -1
  95. package/dist/index33.js +1 -1
  96. package/dist/index65.js +2 -2
  97. package/dist/index72.js +1 -1
  98. package/dist/index75.js +1 -1
  99. package/dist/index79.js +2 -2
  100. package/dist/index81.js +1 -1
  101. package/dist/style.css +1 -1
  102. package/package.json +1 -1
package/dist/index31.js CHANGED
@@ -1,17 +1,17 @@
1
- import { defineComponent as Ne, ref as f, computed as y, onMounted as $e, onBeforeUnmount as De, watch as X, openBlock as g, createElementBlock as h, normalizeClass as x, renderSlot as b, createElementVNode as w, Fragment as D, renderList as H, toDisplayString as L, createBlock as ue, withModifiers as I, withCtx as Le, createTextVNode as ee, createCommentVNode as ie, withDirectives as Fe, vModelDynamic as Me, Teleport as Ae, normalizeStyle as Je, createVNode as qe, mergeProps as Re, nextTick as se } from "vue";
1
+ import { defineComponent as Ne, ref as f, computed as y, onMounted as $e, onBeforeUnmount as De, watch as X, openBlock as g, createElementBlock as h, normalizeClass as x, renderSlot as b, createElementVNode as w, Fragment as D, renderList as H, toDisplayString as L, createBlock as ue, withModifiers as I, withCtx as Le, createTextVNode as ee, createCommentVNode as ie, withDirectives as Fe, vModelDynamic as Me, Teleport as Ae, normalizeStyle as qe, createVNode as Je, mergeProps as Re, nextTick as se } from "vue";
2
2
  import ze from "./index115.js";
3
3
  import "./index158.js";
4
4
  import Pe from "./index119.js";
5
5
  import "./index185.js";
6
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 "./index218.js";
8
+ import { head as le } from "./index223.js";
9
9
  import { isNotNil as B } from "./index124.js";
10
- import { last as We } from "./index205.js";
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
- import { wait as q } from "./index122.js";
14
- import { waitFor as Ze } from "./index209.js";
13
+ import { wait as J } from "./index122.js";
14
+ import { waitFor as Ze } from "./index201.js";
15
15
  import { when as Ge } from "./index211.js";
16
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 = {
@@ -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([]), p = f([]), V = f([]), { getItemText: pe } = Ke(), { getItemValue: me } = Ye(), ge = y(() => ae.value.map((l, a) => {
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 = pe(l, e.itemText), n = me(l, e.itemValue);
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 = p.value.reduce(
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
- ), m = y(() => {
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 = m.value.get(a);
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"), 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
+ ), 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
- ), 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"), V.value = V.value.filter(
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"), 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), c("update:modelValue", a);
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) => m.value.get(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) => m.value.get(n)
248
+ (n) => p.value.get(n)
249
249
  )), t)
250
- e.stash && (p.value = e.modelValue.map(
251
- (n) => m.value.get(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 J = m.value.get(T);
257
- return J && n.push(J), J;
256
+ let q = p.value.get(T);
257
+ return q && n.push(q), q;
258
258
  });
259
- e.stash && (p.value = n), e.enforceCoherence && c("update:modelValue", o);
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 = m.value.get(e.modelValue);
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 = m.value.get(e.modelValue), t ? (e.debug && console.log("watch.modelValue >> found"), u.value = t.text, e.stash && (p.value = [t])) : e.enforceCoherence && B(l) ? (e.debug && console.log("watch.modelValue >> not found line 911"), u.value = "", e.stash && (p.value = []), c("update:modelValue", null)) : u.value = "";
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) => m.value.get(n)
284
+ (n) => p.value.get(n)
285
285
  ) && e.enforceCoherence) {
286
- const n = e.modelValue.filter((o) => m.value.get(o));
286
+ const n = e.modelValue.filter((o) => p.value.get(o));
287
287
  c("update:modelValue", n);
288
288
  }
289
289
  } else
290
- !m.value.get(e.modelValue) && e.enforceCoherence && B(e.modelValue) && c("update:modelValue", null), r.value = null;
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 && (p.value = []);
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
- !m.value.get(e.modelValue) && e.enforceCoherence && B(e.modelValue) && (u.value = "", e.stash && (p.value = []), c("update:modelValue", null));
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) => m.value.get(o)
304
+ (o) => p.value.get(o)
305
305
  ) && e.enforceCoherence) {
306
306
  let o = [];
307
- const T = e.modelValue.filter((J) => {
308
- let G = m.value.get(J);
307
+ const T = e.modelValue.filter((q) => {
308
+ let G = p.value.get(q);
309
309
  return G && o.push(G), G;
310
310
  });
311
- e.stash && (p.value = o), c("update:modelValue", T);
311
+ e.stash && (m.value = o), c("update:modelValue", T);
312
312
  }
313
313
  }
314
314
  }, e.depsDebounceTime));
@@ -324,18 +324,16 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
324
324
  v.value && (v.value.style.left = `${l.x}px`, v.value.style.top = `${l.y}px`, v.value.style.width = `${(a = E.value) == null ? void 0 : a.offsetWidth}px`);
325
325
  });
326
326
  }, k = f(!1), Q = f(!1), W = f(!1), K = f(!0), $ = async () => {
327
- K.value = !1, Q.value = !0, await q(e.transitionDuration), Q.value = !1, k.value = !0;
327
+ K.value = !1, Q.value = !0, await J(e.transitionDuration), Q.value = !1, k.value = !0;
328
328
  }, A = async () => {
329
- k.value = !1, W.value = !0, await q(e.transitionDuration), W.value = !1, K.value = !0;
329
+ k.value = !1, W.value = !0, await J(e.transitionDuration), W.value = !1, K.value = !0;
330
330
  }, P = f(!1);
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 && q(500).then(() => {
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) => {
@@ -343,45 +341,41 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
343
341
  let a = !1;
344
342
  const t = e.modelValue;
345
343
  if (await Promise.race([
346
- q(250),
344
+ J(250),
347
345
  Ze(() => t !== e.modelValue).then(() => {
348
346
  a = !0;
349
347
  })
350
348
  ]), !a) {
351
- const n = m.value.get(e.modelValue);
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
- r.value !== null ? r.value++ : r.value = 0, se().then(() => {
359
- var l;
360
- if (_.value !== null) {
361
- const a = (l = v.value) == null ? void 0 : l.querySelector(
362
- `#${O.value[_.value].id}`
363
- );
364
- a instanceof HTMLElement && a.scrollIntoView({
365
- behavior: "smooth",
366
- block: "nearest",
367
- inline: "start"
368
- });
369
- }
370
- });
371
- }, _e = () => {
372
- r.value !== null ? r.value-- : r.value = O.value.length - 1, se().then(() => {
373
- var l;
374
- if (_.value !== null) {
375
- const a = (l = v.value) == null ? void 0 : l.querySelector(
376
- `#${O.value[_.value].id}`
377
- );
378
- a instanceof HTMLElement && a.scrollIntoView({
379
- behavior: "smooth",
380
- block: "nearest",
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 && q(500).then(() => {
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(
@@ -615,7 +607,7 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
615
607
  "bb-base-select__options-container--hidden": K.value
616
608
  }),
617
609
  role: "listbox",
618
- style: Je({ transitionDuration: ve }),
610
+ style: qe({ transitionDuration: ve }),
619
611
  tabindex: -1
620
612
  }, [
621
613
  b(l.$slots, "options:prepend"),
@@ -689,7 +681,7 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
689
681
  b(l.$slots, "spinner", {
690
682
  loading: !!d.value
691
683
  }, () => [
692
- qe(Pe, { size: "sm" })
684
+ Je(Pe, { size: "sm" })
693
685
  ])
694
686
  ], 2)) : b(l.$slots, "append", { key: 0 })
695
687
  ], 512),