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.
Files changed (134) hide show
  1. package/dist/index101.js +3 -3
  2. package/dist/index103.js +2 -2
  3. package/dist/index109.js +1 -1
  4. package/dist/index11.js +2 -2
  5. package/dist/index111.js +1 -1
  6. package/dist/index113.js +1 -1
  7. package/dist/index117.js +1 -1
  8. package/dist/index119.js +1 -1
  9. package/dist/index121.js +1 -1
  10. package/dist/index125.js +1 -1
  11. package/dist/index126.js +1 -1
  12. package/dist/index127.js +1 -1
  13. package/dist/index15.js +7 -7
  14. package/dist/index17.js +8 -8
  15. package/dist/index196.js +2 -2
  16. package/dist/index196.js.map +1 -1
  17. package/dist/index197.js +4 -235
  18. package/dist/index197.js.map +1 -1
  19. package/dist/index198.js +5 -368
  20. package/dist/index198.js.map +1 -1
  21. package/dist/index199.js +13 -131
  22. package/dist/index199.js.map +1 -1
  23. package/dist/index200.js +16 -5
  24. package/dist/index200.js.map +1 -1
  25. package/dist/index201.js +3 -3
  26. package/dist/index202.js +20 -2
  27. package/dist/index202.js.map +1 -1
  28. package/dist/index203.js +29 -2
  29. package/dist/index203.js.map +1 -1
  30. package/dist/index204.js +8 -174
  31. package/dist/index204.js.map +1 -1
  32. package/dist/index205.js +2 -23
  33. package/dist/index205.js.map +1 -1
  34. package/dist/index206.js +345 -350
  35. package/dist/index206.js.map +1 -1
  36. package/dist/index207.js +134 -2
  37. package/dist/index207.js.map +1 -1
  38. package/dist/index208.js +2 -4
  39. package/dist/index208.js.map +1 -1
  40. package/dist/index209.js +174 -3
  41. package/dist/index209.js.map +1 -1
  42. package/dist/index21.js +2 -2
  43. package/dist/index210.js +23 -3
  44. package/dist/index210.js.map +1 -1
  45. package/dist/index211.js +373 -2
  46. package/dist/index211.js.map +1 -1
  47. package/dist/index212.js +2 -16
  48. package/dist/index212.js.map +1 -1
  49. package/dist/index213.js +3 -16
  50. package/dist/index213.js.map +1 -1
  51. package/dist/index214.js +3 -20
  52. package/dist/index214.js.map +1 -1
  53. package/dist/index215.js +235 -29
  54. package/dist/index215.js.map +1 -1
  55. package/dist/index216.js +2 -8
  56. package/dist/index216.js.map +1 -1
  57. package/dist/index217.js +2 -2
  58. package/dist/index217.js.map +1 -1
  59. package/dist/index218.js +1 -1
  60. package/dist/index219.js +1 -1
  61. package/dist/index223.js +4 -4
  62. package/dist/index224.js +3 -3
  63. package/dist/index226.js +3 -78
  64. package/dist/index226.js.map +1 -1
  65. package/dist/index227.js +294 -5
  66. package/dist/index227.js.map +1 -1
  67. package/dist/index228.js +6 -2
  68. package/dist/index228.js.map +1 -1
  69. package/dist/index229.js +2 -295
  70. package/dist/index229.js.map +1 -1
  71. package/dist/index23.js +1 -1
  72. package/dist/index230.js +2 -2
  73. package/dist/index232.js +2 -117
  74. package/dist/index232.js.map +1 -1
  75. package/dist/index233.js +2 -106
  76. package/dist/index233.js.map +1 -1
  77. package/dist/index234.js +2 -2
  78. package/dist/index234.js.map +1 -1
  79. package/dist/index235.js +2 -4
  80. package/dist/index235.js.map +1 -1
  81. package/dist/index236.js +111 -218
  82. package/dist/index236.js.map +1 -1
  83. package/dist/index237.js +94 -246
  84. package/dist/index237.js.map +1 -1
  85. package/dist/index238.js +224 -69
  86. package/dist/index238.js.map +1 -1
  87. package/dist/index239.js +257 -159
  88. package/dist/index239.js.map +1 -1
  89. package/dist/index240.js +81 -1
  90. package/dist/index240.js.map +1 -1
  91. package/dist/index241.js +2 -5
  92. package/dist/index241.js.map +1 -1
  93. package/dist/index242.js +5 -2
  94. package/dist/index242.js.map +1 -1
  95. package/dist/index243.js +160 -2
  96. package/dist/index243.js.map +1 -1
  97. package/dist/index244.js +1 -4
  98. package/dist/index244.js.map +1 -1
  99. package/dist/index245.js +69 -2
  100. package/dist/index245.js.map +1 -1
  101. package/dist/index246.js +435 -2
  102. package/dist/index246.js.map +1 -1
  103. package/dist/index247.js +82 -428
  104. package/dist/index247.js.map +1 -1
  105. package/dist/index248.js +197 -86
  106. package/dist/index248.js.map +1 -1
  107. package/dist/index249.js +2 -200
  108. package/dist/index249.js.map +1 -1
  109. package/dist/index25.js +2 -2
  110. package/dist/index250.js +15 -4
  111. package/dist/index250.js.map +1 -1
  112. package/dist/index251.js +4 -4
  113. package/dist/index251.js.map +1 -1
  114. package/dist/index252.js +4 -61
  115. package/dist/index252.js.map +1 -1
  116. package/dist/index253.js +60 -14
  117. package/dist/index253.js.map +1 -1
  118. package/dist/index254.js +3 -2
  119. package/dist/index254.js.map +1 -1
  120. package/dist/index255.js +2 -3
  121. package/dist/index255.js.map +1 -1
  122. package/dist/index29.js +3 -3
  123. package/dist/index31.js +47 -47
  124. package/dist/index31.js.map +1 -1
  125. package/dist/index33.js +2 -2
  126. package/dist/index35.js +2 -2
  127. package/dist/index47.js +1 -1
  128. package/dist/index49.js +1 -1
  129. package/dist/index65.js +3 -3
  130. package/dist/index77.js +1 -1
  131. package/dist/index79.js +2 -2
  132. package/dist/index81.js +1 -1
  133. package/dist/style.css +1 -1
  134. 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 X, 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 ee, createCommentVNode as se, withDirectives as Fe, vModelDynamic as Me, Teleport as Ae, normalizeStyle as qe, createVNode as Je, mergeProps as Re, nextTick as le } from "vue";
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 "./index198.js";
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 "./index211.js";
8
+ import { head as te } from "./index217.js";
9
9
  import { isNotNil as E } from "./index124.js";
10
- import { last as We } from "./index203.js";
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 "./index208.js";
15
- import { offset as Ge } from "./index206.js";
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), T = v(null), u = v(""), fe = w(() => s.value.length ? "" : e.placeholder), c = v(0), ve = e.transitionDuration / 1e3 + "s";
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 x = n[o];
144
- t = t || a.original[x] && a.original[x].toLowerCase().includes(u.value.toLowerCase());
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 U;
235
- X(
234
+ let j;
235
+ ee(
236
236
  () => e.modelValue,
237
237
  (l, a) => {
238
- e.debug && console.log("running watch.modelValue"), U && clearTimeout(U), U = setTimeout(
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((x) => {
255
- let q = p.value.get(x);
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
- ), X(
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 j;
293
- X(
292
+ let Q;
293
+ ee(
294
294
  () => e.dependencies,
295
295
  (l, a) => {
296
- !z && e.prefill === "focus" && Y || JSON.stringify(l) !== JSON.stringify(a) && (j && clearTimeout(j), j = setTimeout(async () => {
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 x = e.modelValue.filter((q) => {
307
- let G = p.value.get(q);
308
- return G && o.push(G), G;
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", x);
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), Q = v(!1), W = v(!1), K = v(!0), D = async () => {
326
- K.value = !1, Q.value = !0, await J(e.transitionDuration), Q.value = !1, k.value = !0;
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, W.value = !0, await J(e.transitionDuration), W.value = !1, K.value = !0;
328
+ k.value = !1, K.value = !0, await J(e.transitionDuration), K.value = !1, Y.value = !0;
329
329
  }, H = v(!1);
330
- let Y = !0;
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), T.value instanceof HTMLInputElement && T.value.select(), e.prefill === "focus" && Y && !z && (await $({ prefill: !0 }), Y = !1);
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 le(), await J(300), S.value && d.value)) {
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" && Te();
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 le(), _.value !== null) {
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 le(), _.value !== null) {
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 Z;
489
- const Te = () => {
490
- Z && clearTimeout(Z), Z = setTimeout(async () => {
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
- }, xe = (l) => {
498
- f("click", l), !(e.disabled || e.readonly) && (T.value instanceof HTMLElement && T.value.focus(), D());
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), T.value instanceof HTMLInputElement && T.value.focus(), e.multiple || 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: xe
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
- ee(F(t.text), 1)
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: T,
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": Q.value,
609
- "bb-base-select__options-container--hiding": W.value,
610
- "bb-base-select__options-container--hidden": K.value
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
- ee(F(l.loadingText), 1)
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
- ee(F(l.noDataText), 1)
623
+ le(F(l.noDataText), 1)
624
624
  ])
625
625
  ])),
626
626
  (g(!0), h(L, null, P(O.value, (t) => (g(), h(L, {