bitboss-ui 0.2.41 → 0.2.43

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 (136) hide show
  1. package/dist/index.d.ts +125 -125
  2. package/dist/index101.js +3 -3
  3. package/dist/index103.js +2 -2
  4. package/dist/index109.js +1 -1
  5. package/dist/index11.js +2 -2
  6. package/dist/index111.js +3 -3
  7. package/dist/index113.js +1 -1
  8. package/dist/index116.js +1 -1
  9. package/dist/index117.js +1 -1
  10. package/dist/index118.js +1 -1
  11. package/dist/index119.js +1 -1
  12. package/dist/index121.js +1 -1
  13. package/dist/index125.js +1 -1
  14. package/dist/index126.js +1 -1
  15. package/dist/index127.js +1 -1
  16. package/dist/index131.js +2 -2
  17. package/dist/index15.js +8 -8
  18. package/dist/index17.js +9 -9
  19. package/dist/index19.js +3 -3
  20. package/dist/index196.js +2 -10
  21. package/dist/index196.js.map +1 -1
  22. package/dist/index197.js +2 -3
  23. package/dist/index197.js.map +1 -1
  24. package/dist/index198.js +4 -35
  25. package/dist/index198.js.map +1 -1
  26. package/dist/index199.js +368 -6
  27. package/dist/index199.js.map +1 -1
  28. package/dist/index200.js +2 -235
  29. package/dist/index200.js.map +1 -1
  30. package/dist/index201.js +2 -2
  31. package/dist/index201.js.map +1 -1
  32. package/dist/index202.js +373 -4
  33. package/dist/index202.js.map +1 -1
  34. package/dist/index203.js +1 -1
  35. package/dist/index204.js +1 -1
  36. package/dist/index205.js +134 -5
  37. package/dist/index205.js.map +1 -1
  38. package/dist/index206.js +5 -16
  39. package/dist/index206.js.map +1 -1
  40. package/dist/index207.js +18 -15
  41. package/dist/index207.js.map +1 -1
  42. package/dist/index208.js +2 -19
  43. package/dist/index208.js.map +1 -1
  44. package/dist/index209.js +172 -18
  45. package/dist/index209.js.map +1 -1
  46. package/dist/index210.js +23 -29
  47. package/dist/index210.js.map +1 -1
  48. package/dist/index211.js +2 -8
  49. package/dist/index211.js.map +1 -1
  50. package/dist/index212.js +3 -2
  51. package/dist/index212.js.map +1 -1
  52. package/dist/index213.js +35 -2
  53. package/dist/index213.js.map +1 -1
  54. package/dist/index214.js +6 -368
  55. package/dist/index214.js.map +1 -1
  56. package/dist/index215.js +13 -131
  57. package/dist/index215.js.map +1 -1
  58. package/dist/index216.js +16 -2
  59. package/dist/index216.js.map +1 -1
  60. package/dist/index217.js +18 -172
  61. package/dist/index217.js.map +1 -1
  62. package/dist/index218.js +29 -23
  63. package/dist/index218.js.map +1 -1
  64. package/dist/index219.js +8 -373
  65. package/dist/index219.js.map +1 -1
  66. package/dist/index220.js +10 -2
  67. package/dist/index220.js.map +1 -1
  68. package/dist/index221.js +235 -2
  69. package/dist/index221.js.map +1 -1
  70. package/dist/index223.js +4 -4
  71. package/dist/index226.js +3 -78
  72. package/dist/index226.js.map +1 -1
  73. package/dist/index227.js +224 -2
  74. package/dist/index227.js.map +1 -1
  75. package/dist/index228.js +257 -159
  76. package/dist/index228.js.map +1 -1
  77. package/dist/index229.js +8 -1
  78. package/dist/index229.js.map +1 -1
  79. package/dist/index23.js +1 -1
  80. package/dist/index230.js +2 -69
  81. package/dist/index230.js.map +1 -1
  82. package/dist/index231.js +295 -5
  83. package/dist/index231.js.map +1 -1
  84. package/dist/index232.js +2 -15
  85. package/dist/index232.js.map +1 -1
  86. package/dist/index233.js +2 -435
  87. package/dist/index233.js.map +1 -1
  88. package/dist/index234.js +115 -87
  89. package/dist/index234.js.map +1 -1
  90. package/dist/index235.js +106 -4
  91. package/dist/index235.js.map +1 -1
  92. package/dist/index236.js +424 -189
  93. package/dist/index236.js.map +1 -1
  94. package/dist/index237.js +83 -218
  95. package/dist/index237.js.map +1 -1
  96. package/dist/index238.js +200 -258
  97. package/dist/index238.js.map +1 -1
  98. package/dist/index239.js +78 -294
  99. package/dist/index239.js.map +1 -1
  100. package/dist/index240.js +2 -6
  101. package/dist/index240.js.map +1 -1
  102. package/dist/index241.js +2 -2
  103. package/dist/index244.js +69 -2
  104. package/dist/index244.js.map +1 -1
  105. package/dist/index245.js +160 -2
  106. package/dist/index245.js.map +1 -1
  107. package/dist/index246.js +1 -4
  108. package/dist/index246.js.map +1 -1
  109. package/dist/index247.js +2 -2
  110. package/dist/index247.js.map +1 -1
  111. package/dist/index248.js +5 -2
  112. package/dist/index248.js.map +1 -1
  113. package/dist/index249.js +11 -113
  114. package/dist/index249.js.map +1 -1
  115. package/dist/index25.js +2 -2
  116. package/dist/index250.js +2 -106
  117. package/dist/index250.js.map +1 -1
  118. package/dist/index254.js +2 -3
  119. package/dist/index254.js.map +1 -1
  120. package/dist/index255.js +3 -2
  121. package/dist/index255.js.map +1 -1
  122. package/dist/index29.js +3 -3
  123. package/dist/index31.js +167 -182
  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/index72.js +1 -1
  131. package/dist/index75.js +1 -1
  132. package/dist/index77.js +1 -1
  133. package/dist/index79.js +3 -3
  134. package/dist/index81.js +1 -1
  135. package/dist/style.css +1 -1
  136. package/package.json +1 -1
package/dist/index31.js CHANGED
@@ -1,26 +1,25 @@
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";
1
+ import { defineComponent as Ne, ref as v, computed as y, onMounted as $e, onBeforeUnmount as De, watch as X, openBlock as g, createElementBlock as h, normalizeClass as I, renderSlot as b, createElementVNode as w, 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";
2
2
  import ze from "./index115.js";
3
3
  import "./index158.js";
4
- import Pe from "./index119.js";
4
+ import He from "./index119.js";
5
5
  import "./index185.js";
6
- import { autoUpdate as He, computePosition as Ue, flip as je, shift as Qe } from "./index214.js";
6
+ import { autoUpdate as Pe, computePosition as Ue, flip as je, shift as Qe } from "./index199.js";
7
7
  import { deepEqual as re } from "./index123.js";
8
- import { head as le } from "./index221.js";
9
- import { isNotNil as B } from "./index124.js";
10
- import { last as We } from "./index212.js";
8
+ import { head as te } from "./index200.js";
9
+ import { isNotNil as E } from "./index124.js";
10
+ import { last as We } from "./index201.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 "./index199.js";
15
- import { when as Ge } from "./index202.js";
16
- import { offset as Xe } from "./index219.js";
17
- const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomplete", "autofocus", "disabled", "placeholder", "readonly"], tl = {
14
+ import { when as Ze } from "./index198.js";
15
+ import { offset as Ge } from "./index202.js";
16
+ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomplete", "autofocus", "disabled", "placeholder", "readonly"], ll = {
18
17
  key: 0,
19
18
  class: "bb-base-select__loading-container"
20
- }, al = {
19
+ }, tl = {
21
20
  key: 1,
22
21
  class: "bb-base-select__no-data-container"
23
- }, nl = ["id", "aria-selected"], ol = { class: "bb-base-select-option__content" }, ul = { class: "bb-base-select-option__text" }, il = { class: "bb-base-select__chevron" }, sl = /* @__PURE__ */ w("svg", {
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__ */ w("svg", {
24
23
  fill: "none",
25
24
  viewBox: "0 0 16 8",
26
25
  xmlns: "http://www.w3.org/2000/svg"
@@ -31,7 +30,7 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
31
30
  fill: "currentColor",
32
31
  "fill-rule": "evenodd"
33
32
  })
34
- ], -1), _l = /* @__PURE__ */ Ne({
33
+ ], -1), Cl = /* @__PURE__ */ Ne({
35
34
  __name: "BaseSelect",
36
35
  props: {
37
36
  allowWriting: { type: Boolean, default: !0 },
@@ -68,15 +67,15 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
68
67
  },
69
68
  emits: ["blur", "change", "click", "focus", "inactive", "input", "update:modelValue"],
70
69
  setup(de, { emit: ce }) {
71
- const e = de, c = ce;
70
+ const e = de, f = ce;
72
71
  if (e.multiple && !Array.isArray(e.modelValue))
73
72
  throw new Error('Multiple is set to "true" but modelValue is not an array.');
74
- const F = f(null), E = f(null), v = f(null), S = f(null), u = f(""), fe = y(() => s.value.length ? "" : e.placeholder), d = f(0), ve = e.transitionDuration / 1e3 + "s";
75
- let te;
73
+ const S = v(null), N = v(null), d = v(null), T = v(null), u = v(""), fe = y(() => s.value.length ? "" : e.placeholder), c = v(0), ve = e.transitionDuration / 1e3 + "s";
74
+ let ae;
76
75
  $e(async () => {
77
- e.debug && console.log("Calling onMounted"), E.value && v.value && (te = He(
78
- E.value,
79
- v.value,
76
+ e.debug && console.log("Calling onMounted"), N.value && d.value && (ae = Pe(
77
+ N.value,
78
+ d.value,
80
79
  ye,
81
80
  {
82
81
  ancestorResize: !0,
@@ -86,11 +85,11 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
86
85
  }
87
86
  ));
88
87
  }), De(() => {
89
- e.debug && console.log("Calling onBeforeUnMount"), te();
88
+ e.debug && console.log("Calling onBeforeUnMount"), ae();
90
89
  });
91
- const ae = f([]), p = f([]), V = f([]), { getItemText: pe } = Ke(), { getItemValue: me } = Ye(), ge = y(() => ae.value.map((l, a) => {
90
+ const ne = v([]), m = v([]), V = v([]), { getItemText: me } = Ke(), { getItemValue: pe } = Ye(), ge = y(() => ne.value.map((l, a) => {
92
91
  e.debug && console.log("Mapping items in internalOptions", { item: l });
93
- const t = pe(l, e.itemText), n = me(l, e.itemValue);
92
+ const t = me(l, e.itemText), n = pe(l, e.itemValue);
94
93
  if (n === void 0)
95
94
  throw new Error(
96
95
  'The result of extracting "value" from option was undefined. Affected item is ' + JSON.stringify(l) + " please check itemValue property is correct."
@@ -113,7 +112,7 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
113
112
  const a = V.value.reduce(
114
113
  (n, o) => (n[o.id] || (n[o.id] = o), n),
115
114
  l
116
- ), t = p.value.reduce(
115
+ ), t = m.value.reduce(
117
116
  (n, o) => (n[o.id] || (n[o.id] = o), n),
118
117
  a
119
118
  );
@@ -124,7 +123,7 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
124
123
  }), Object.values(t).map(
125
124
  (n, o) => ({
126
125
  ...n,
127
- selected: B(be.value.get(n.value)),
126
+ selected: E(be.value.get(n.value)),
128
127
  index: o
129
128
  })
130
129
  );
@@ -141,8 +140,8 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
141
140
  else if (e.filterBy.length) {
142
141
  const n = [].concat(e.filterBy);
143
142
  for (let o = 0; o < n.length; o++) {
144
- const T = n[o];
145
- t = t || a.original[T] && a.original[T].toLowerCase().includes(u.value.toLowerCase());
143
+ const x = n[o];
144
+ t = t || a.original[x] && a.original[x].toLowerCase().includes(u.value.toLowerCase());
146
145
  }
147
146
  }
148
147
  } else
@@ -160,7 +159,7 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
160
159
  }),
161
160
  {}
162
161
  )
163
- ), m = y(() => {
162
+ ), p = y(() => {
164
163
  if (e.debug && console.log("Computing optionsIndexedByValue"), e.matchStrategy === "string") {
165
164
  let l = O.value.reduce(
166
165
  (a, t) => (a[t.jsonValue] = t, a),
@@ -191,7 +190,7 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
191
190
  get: (a) => l[JSON.stringify(a)]
192
191
  };
193
192
  } else if (e.matchStrategy === "equality") {
194
- const l = [].concat(e.modelValue).filter(B).map((a, t) => [a, t]);
193
+ const l = [].concat(e.modelValue).filter(E).map((a, t) => [a, t]);
195
194
  return {
196
195
  get: (a) => {
197
196
  var t;
@@ -201,7 +200,7 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
201
200
  } else
202
201
  throw new Error("No match strategy has been defined");
203
202
  }), s = y(() => (e.debug && console.log("Computing selectedOptions"), [].concat(e.modelValue).reduce((l, a) => {
204
- const t = m.value.get(a);
203
+ const t = p.value.get(a);
205
204
  return t && l.push(t), l;
206
205
  }, []))), M = (l) => {
207
206
  e.debug && console.log("Running onOptionSelected", { option: l });
@@ -210,15 +209,15 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
210
209
  (t) => t.id !== l.id
211
210
  )), a = e.modelValue.filter(
212
211
  (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(
212
+ ), 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
213
  "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(
214
+ ), 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
215
  (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);
218
- }, N = async ({ prefill: l = !1 }) => {
216
+ )), 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), f("update:modelValue", a);
217
+ }, $ = async ({ prefill: l = !1 }) => {
219
218
  e.debug && console.log("running getOptions");
220
219
  let a = [];
221
- Array.isArray(e.items) ? a = e.items : typeof e.items == "function" && (d.value++, a = await e.items(u.value, l, e.modelValue), d.value--), ae.value = a;
220
+ Array.isArray(e.items) ? a = e.items : typeof e.items == "function" && (c.value++, a = await e.items(u.value, l, e.modelValue), c.value--), ne.value = a;
222
221
  }, he = () => {
223
222
  e.debug && console.log("running addOption");
224
223
  const l = u.value, a = u.value, t = JSON.stringify(a), n = {
@@ -231,7 +230,7 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
231
230
  disabled: !1
232
231
  };
233
232
  V.value = V.value.concat(n), u.value = "";
234
- }, z = e.prefill === !0 || !e.multiple && B(e.modelValue) || e.multiple && !!e.modelValue.length;
233
+ }, z = e.prefill === !0 || !e.multiple && E(e.modelValue) || e.multiple && !!e.modelValue.length;
235
234
  let U;
236
235
  X(
237
236
  () => e.modelValue,
@@ -242,31 +241,31 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
242
241
  if (!Array.isArray(e.modelValue))
243
242
  throw new Error("props.modelValue is not an array.");
244
243
  let t = e.modelValue.every(
245
- (n) => m.value.get(n)
244
+ (n) => p.value.get(n)
246
245
  );
247
- if ((!t || a === void 0) && (await N({ prefill: !0 }), t = e.modelValue.every(
248
- (n) => m.value.get(n)
246
+ if ((!t || a === void 0) && (await $({ prefill: !0 }), t = e.modelValue.every(
247
+ (n) => p.value.get(n)
249
248
  )), t)
250
- e.stash && (p.value = e.modelValue.map(
251
- (n) => m.value.get(n)
249
+ e.stash && (m.value = e.modelValue.map(
250
+ (n) => p.value.get(n)
252
251
  ));
253
252
  else {
254
253
  let n = [];
255
- const o = l.filter((T) => {
256
- let q = m.value.get(T);
254
+ const o = l.filter((x) => {
255
+ let q = p.value.get(x);
257
256
  return q && n.push(q), q;
258
257
  });
259
- e.stash && (p.value = n), e.enforceCoherence && c("update:modelValue", o);
258
+ e.stash && (m.value = n), e.enforceCoherence && f("update:modelValue", o);
260
259
  }
261
260
  } else {
262
261
  e.debug && console.log("watch.modelValue >> single");
263
- let t = m.value.get(e.modelValue);
264
- if (!t && B(e.modelValue) || a === void 0) {
262
+ let t = p.value.get(e.modelValue);
263
+ if (!t && E(e.modelValue) || a === void 0) {
265
264
  e.debug && console.log("watch.modelValue >> not found line 895");
266
265
  const n = u.value;
267
- u.value = "", await N({ prefill: !0 }), u.value = n;
266
+ u.value = "", await $({ prefill: !0 }), u.value = n;
268
267
  }
269
- t = m.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 && (p.value = [t], e.debug && console.log("watch.modelValue assigned to stash"))) : 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 = "";
268
+ 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 && E(l) ? (e.debug && console.log("watch.modelValue >> not found line 911"), u.value = "", e.stash && (m.value = []), f("update:modelValue", null)) : u.value = "";
270
269
  }
271
270
  },
272
271
  z ? 0 : e.modelValueDebounceTime
@@ -279,15 +278,15 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
279
278
  async (l, a) => {
280
279
  if (typeof l == "function" || // Circumvent arrays defined in the template by the parent
281
280
  JSON.stringify(l) !== JSON.stringify(a))
282
- if (e.debug && console.log("watch.items"), await N({ prefill: !1 }), e.multiple) {
281
+ if (e.debug && console.log("watch.items"), await $({ prefill: !1 }), e.multiple) {
283
282
  if (!e.modelValue.every(
284
- (n) => m.value.get(n)
283
+ (n) => p.value.get(n)
285
284
  ) && e.enforceCoherence) {
286
- const n = e.modelValue.filter((o) => m.value.get(o));
287
- c("update:modelValue", n);
285
+ const n = e.modelValue.filter((o) => p.value.get(o));
286
+ f("update:modelValue", n);
288
287
  }
289
288
  } else
290
- !m.value.get(e.modelValue) && e.enforceCoherence && B(e.modelValue) && c("update:modelValue", null), r.value = null;
289
+ !p.value.get(e.modelValue) && e.enforceCoherence && E(e.modelValue) && f("update:modelValue", null), r.value = null;
291
290
  }
292
291
  );
293
292
  let j;
@@ -296,19 +295,19 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
296
295
  (l, a) => {
297
296
  !z && e.prefill === "focus" && Y || JSON.stringify(l) !== JSON.stringify(a) && (j && clearTimeout(j), j = setTimeout(async () => {
298
297
  if (JSON.stringify(l) !== JSON.stringify(a)) {
299
- e.enforceCoherence && e.stash && (p.value = []);
298
+ e.enforceCoherence && e.stash && (m.value = []);
300
299
  let t = u.value;
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));
300
+ if (u.value = "", await $({ prefill: !0 }), u.value = t, !e.multiple)
301
+ !p.value.get(e.modelValue) && e.enforceCoherence && E(e.modelValue) && (u.value = "", e.stash && (m.value = []), f("update:modelValue", null));
303
302
  else if (!e.modelValue.every(
304
- (o) => m.value.get(o)
303
+ (o) => p.value.get(o)
305
304
  ) && e.enforceCoherence) {
306
305
  let o = [];
307
- const T = e.modelValue.filter((q) => {
308
- let G = m.value.get(q);
306
+ const x = e.modelValue.filter((q) => {
307
+ let G = p.value.get(q);
309
308
  return G && o.push(G), G;
310
309
  });
311
- e.stash && (p.value = o), c("update:modelValue", T);
310
+ e.stash && (m.value = o), f("update:modelValue", x);
312
311
  }
313
312
  }
314
313
  }, e.depsDebounceTime));
@@ -316,72 +315,60 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
316
315
  { deep: !0 }
317
316
  );
318
317
  const ye = () => {
319
- e.debug && console.log("Running display options"), E.value && v.value && Ue(E.value, v.value, {
318
+ e.debug && console.log("Running display options"), N.value && d.value && Ue(N.value, d.value, {
320
319
  placement: "bottom",
321
- middleware: [Xe(6), je(), Qe()]
320
+ middleware: [Ge(6), je(), Qe()]
322
321
  }).then((l) => {
323
322
  var a;
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`);
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`);
325
324
  });
326
- }, k = f(!1), Q = f(!1), W = f(!1), K = f(!0), $ = async () => {
325
+ }, k = v(!1), Q = v(!1), W = v(!1), K = v(!0), D = async () => {
327
326
  K.value = !1, Q.value = !0, await J(e.transitionDuration), Q.value = !1, k.value = !0;
328
327
  }, A = async () => {
329
328
  k.value = !1, W.value = !0, await J(e.transitionDuration), W.value = !1, K.value = !0;
330
- }, P = f(!1);
329
+ }, H = v(!1);
331
330
  let Y = !0;
332
331
  const we = async (l) => {
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) => {
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).then(() => {
337
- u.value = "";
338
- });
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);
333
+ }, oe = async (l) => {
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
+ A(), f("inactive"), document.removeEventListener("focusin", oe), H.value = !1, e.multiple && (await J(500), u.value = "");
339
336
  return;
340
337
  }
341
338
  }, Ve = async (l) => {
342
- if (e.debug && console.log("Running onInputBlur"), c("blur", l), !e.multiple) {
343
- let a = !1;
344
- const t = e.modelValue;
345
- if (await Promise.race([
346
- J(250),
347
- Ze(() => t !== e.modelValue).then(() => {
348
- a = !0;
349
- })
350
- ]), !a) {
351
- const n = m.value.get(e.modelValue);
352
- n && (u.value = n.text);
339
+ if (e.debug && console.log("Running onInputBlur"), f("blur", l), !e.multiple && (e.modelValue, await le(), await J(300), S.value && d.value)) {
340
+ const a = document.activeElement;
341
+ if (!S.value.contains(a) && !d.value.contains(a)) {
342
+ const t = p.value.get(e.modelValue);
343
+ t && (u.value = t.text);
353
344
  }
354
345
  }
355
- }, Oe = (l) => c("change", l), Ce = (l) => {
356
- 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
- });
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();
348
+ }, r = v(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 = v(null), ke = async () => {
349
+ var l;
350
+ if (r.value !== null ? r.value++ : r.value = 0, await le(), _.value !== null) {
351
+ const a = (l = d.value) == null ? void 0 : l.querySelector(
352
+ `#${O.value[_.value].id}`
353
+ );
354
+ a instanceof HTMLElement && a.scrollIntoView({
355
+ behavior: "smooth",
356
+ block: "nearest",
357
+ inline: "start"
358
+ });
359
+ }
360
+ }, _e = async () => {
361
+ var l;
362
+ if (r.value !== null ? r.value-- : r.value = O.value.length - 1, await le(), _.value !== null) {
363
+ const a = (l = d.value) == null ? void 0 : l.querySelector(
364
+ `#${O.value[_.value].id}`
365
+ );
366
+ a instanceof HTMLElement && a.scrollIntoView({
367
+ behavior: "smooth",
368
+ block: "nearest",
369
+ inline: "start"
370
+ });
371
+ }
385
372
  }, Se = async (l) => {
386
373
  var a, t;
387
374
  if (e.readonly || e.disabled) {
@@ -391,24 +378,24 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
391
378
  switch (l.key) {
392
379
  case "ArrowUp":
393
380
  {
394
- if (l.preventDefault(), d.value)
381
+ if (l.preventDefault(), c.value)
395
382
  return;
396
- i.value = null, k.value ? _e() : (s.value.length && (r.value = le(s.value).index), await $());
383
+ i.value = null, k.value ? _e() : (s.value.length && (r.value = te(s.value).index), await D());
397
384
  }
398
385
  break;
399
386
  case "ArrowDown":
400
387
  {
401
- if (l.preventDefault(), d.value)
388
+ if (l.preventDefault(), c.value)
402
389
  return;
403
- i.value = null, k.value ? ke() : (s.value.length && (r.value = le(s.value).index), await $());
390
+ i.value = null, k.value ? ke() : (s.value.length && (r.value = te(s.value).index), await D());
404
391
  }
405
392
  break;
406
393
  case "ArrowLeft":
407
394
  {
408
- if (d.value)
395
+ if (c.value)
409
396
  return;
410
397
  if (!u.value && s.value.length && (i.value === null ? i.value = s.value.length - 1 : i.value > 0 ? i.value-- : i.value = null, i.value !== null)) {
411
- let n = s.value[i.value], o = (a = v.value) == null ? void 0 : a.querySelector(
398
+ let n = s.value[i.value], o = (a = d.value) == null ? void 0 : a.querySelector(
412
399
  `#${n.id}`
413
400
  );
414
401
  o && (o.scrollIntoView({
@@ -421,10 +408,10 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
421
408
  break;
422
409
  case "ArrowRight":
423
410
  {
424
- if (d.value)
411
+ if (c.value)
425
412
  return;
426
413
  if (!u.value && s.value.length && (i.value === null ? i.value = 0 : i.value < s.value.length - 1 ? i.value++ : i.value = null, i.value !== null)) {
427
- let n = s.value[i.value], o = (t = v.value) == null ? void 0 : t.querySelector(
414
+ let n = s.value[i.value], o = (t = d.value) == null ? void 0 : t.querySelector(
428
415
  `#${n.id}`
429
416
  );
430
417
  o && (o.scrollIntoView({
@@ -437,10 +424,10 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
437
424
  break;
438
425
  case "Enter":
439
426
  {
440
- if (l.preventDefault(), d.value)
427
+ if (l.preventDefault(), c.value)
441
428
  return;
442
429
  if (!k.value)
443
- C.value.length && s.value.length && (r.value = le(s.value).index), await $();
430
+ C.value.length && s.value.length && (r.value = te(s.value).index), await D();
444
431
  else if (_.value !== null) {
445
432
  if (C.value[_.value].disabled)
446
433
  return;
@@ -462,15 +449,15 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
462
449
  break;
463
450
  case "Tab":
464
451
  case "Escape":
465
- k.value && await A(), c("inactive"), i.value = null, r.value = null;
452
+ k.value && await A(), f("inactive"), i.value = null, r.value = null;
466
453
  break;
467
454
  case "Shift":
468
- if (d.value)
455
+ if (c.value)
469
456
  return;
470
457
  break;
471
458
  case "Backspace":
472
459
  {
473
- if (d.value)
460
+ if (c.value)
474
461
  return;
475
462
  u.value || s.value.length && (i.value === null ? i.value = s.value.length - 1 : (M(
476
463
  s.value[i.value]
@@ -480,11 +467,11 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
480
467
  s.value.length - 2
481
468
  ),
482
469
  0
483
- ) : i.value = null)), await $();
470
+ ) : i.value = null)), await D();
484
471
  }
485
472
  break;
486
473
  default:
487
- i.value = null, r.value = null, await $();
474
+ i.value = null, r.value = null, await D();
488
475
  break;
489
476
  }
490
477
  };
@@ -492,28 +479,26 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
492
479
  const Te = () => {
493
480
  Z && clearTimeout(Z), Z = setTimeout(async () => {
494
481
  try {
495
- await N({ prefill: !1 });
482
+ await $({ prefill: !1 });
496
483
  } catch (l) {
497
484
  console.error(l);
498
485
  }
499
486
  }, e.queryDebounceTime);
500
487
  }, xe = (l) => {
501
- c("click", l), !(e.disabled || e.readonly) && (S.value instanceof HTMLElement && S.value.focus(), $());
488
+ f("click", l), !(e.disabled || e.readonly) && (T.value instanceof HTMLElement && T.value.focus(), D());
502
489
  }, Ie = (l) => {
503
490
  if (l.currentTarget instanceof HTMLElement && l.currentTarget.classList.contains("bb-base-select-option")) {
504
491
  const a = R.value[l.currentTarget.id];
505
492
  if (a.disabled)
506
493
  return;
507
- M(a), S.value instanceof HTMLInputElement && S.value.focus(), e.multiple || A();
494
+ M(a), T.value instanceof HTMLInputElement && T.value.focus(), e.multiple || A();
508
495
  }
509
- }, oe = (l) => {
510
- 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).then(() => {
512
- u.value = "";
513
- });
496
+ }, ue = async (l) => {
497
+ if (l.target instanceof Node && S.value && !S.value.contains(l.target)) {
498
+ A(), f("inactive"), document.removeEventListener("click", ue), H.value = !1, e.multiple && (await J(500), u.value = "");
514
499
  return;
515
500
  }
516
- }, Be = Ge(
501
+ }, Be = Ze(
517
502
  (l) => typeof l != "string",
518
503
  JSON.stringify
519
504
  ), Ee = y(() => [].concat(e.modelValue).map((l) => {
@@ -527,11 +512,11 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
527
512
  }));
528
513
  return (l, a) => (g(), h("span", {
529
514
  ref_key: "outerContainer",
530
- ref: F,
531
- class: x({
515
+ ref: S,
516
+ class: I({
532
517
  "bb-base-select": !0,
533
- "bb-base-select--active": P.value,
534
- "bb-base-select--loading": d.value,
518
+ "bb-base-select--active": H.value,
519
+ "bb-base-select--loading": c.value,
535
520
  "bb-base-select--disabled": l.disabled,
536
521
  "bb-base-select--errors": l.hasErrors,
537
522
  "bb-base-select--readonly": l.readonly
@@ -541,29 +526,29 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
541
526
  b(l.$slots, "prepend-outer"),
542
527
  w("span", {
543
528
  ref_key: "innerContainer",
544
- ref: E,
529
+ ref: N,
545
530
  class: "bb-base-select__inner-container"
546
531
  }, [
547
532
  b(l.$slots, "prepend"),
548
- w("span", el, [
549
- l.multiple ? (g(), h(D, { key: 0 }, [
550
- l.comma ? (g(!0), h(D, { key: 0 }, H(s.value, (t, n) => (g(), h("span", {
533
+ w("span", Xe, [
534
+ l.multiple ? (g(), h(L, { key: 0 }, [
535
+ l.comma ? (g(!0), h(L, { key: 0 }, P(s.value, (t, n) => (g(), h("span", {
551
536
  key: t.id,
552
- class: x({
537
+ class: I({
553
538
  "bb-base-select__selected": !0,
554
539
  "bb-base-select__selected--comma": !0,
555
540
  "bb-base-select__selected--focused": n === i.value
556
541
  })
557
- }, L(t.text) + L(n < s.value.length - 1 ? "," : ""), 3))), 128)) : (g(!0), h(D, { key: 1 }, H(s.value, (t, n) => (g(), ue(ze, {
542
+ }, F(t.text) + F(n < s.value.length - 1 ? "," : ""), 3))), 128)) : (g(!0), h(L, { key: 1 }, P(s.value, (t, n) => (g(), ie(ze, {
558
543
  key: t.id,
559
- class: x({
544
+ class: I({
560
545
  "bb-base-select__selected": !0,
561
546
  "bb-base-select__selected--chip": !0,
562
547
  "bb-base-select__selected--focused": n === i.value
563
548
  }),
564
549
  clearable: !0,
565
550
  text: t.text,
566
- "onClick:clear": I((o) => M(t), ["stop"])
551
+ "onClick:clear": B((o) => M(t), ["stop"])
567
552
  }, {
568
553
  default: Le(() => [
569
554
  b(l.$slots, "chip", {
@@ -571,43 +556,43 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
571
556
  hasErrors: l.hasErrors,
572
557
  index: t.index,
573
558
  item: t.original,
574
- loading: !!d.value,
559
+ loading: !!c.value,
575
560
  manual: t.manual,
576
561
  selected: t.selected,
577
562
  text: t.text,
578
563
  value: t.value
579
564
  }, () => [
580
- ee(L(t.text), 1)
565
+ ee(F(t.text), 1)
581
566
  ])
582
567
  ]),
583
568
  _: 2
584
569
  }, 1032, ["class", "text", "onClick:clear"]))), 128))
585
- ], 64)) : ie("", !0),
570
+ ], 64)) : se("", !0),
586
571
  Fe(w("input", {
587
572
  id: l.id,
588
573
  ref_key: "input",
589
- ref: S,
574
+ ref: T,
590
575
  "onUpdate:modelValue": a[0] || (a[0] = (t) => u.value = t),
591
576
  autocomplete: l.autocomplete,
592
577
  autofocus: l.autofocus,
593
- class: x("bb-base-select__text-input"),
578
+ class: I("bb-base-select__text-input"),
594
579
  disabled: l.disabled,
595
580
  placeholder: fe.value,
596
581
  readonly: l.readonly || !l.allowWriting,
597
582
  type: "text",
598
- onBlur: I(Ve, ["stop"]),
599
- onChange: I(Oe, ["stop"]),
600
- onFocus: I(we, ["stop"]),
601
- onInput: I(Ce, ["stop"]),
602
- onKeydown: I(Se, ["stop"])
603
- }, null, 40, ll), [
583
+ onBlur: B(Ve, ["stop"]),
584
+ onChange: B(Oe, ["stop"]),
585
+ onFocus: B(we, ["stop"]),
586
+ onInput: B(Ce, ["stop"]),
587
+ onKeydown: B(Se, ["stop"])
588
+ }, null, 40, el), [
604
589
  [Me, u.value]
605
590
  ]),
606
- (g(), ue(Ae, { to: "body" }, [
591
+ (g(), ie(Ae, { to: "body" }, [
607
592
  w("span", {
608
593
  ref_key: "optionsContainer",
609
- ref: v,
610
- class: x({
594
+ ref: d,
595
+ class: I({
611
596
  "bb-base-select__options-container": !0,
612
597
  "bb-base-select__options-container--shown": k.value,
613
598
  "bb-base-select__options-container--showing": Q.value,
@@ -619,16 +604,16 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
619
604
  tabindex: -1
620
605
  }, [
621
606
  b(l.$slots, "options:prepend"),
622
- !C.value.length && d.value ? (g(), h("span", tl, [
607
+ !C.value.length && c.value ? (g(), h("span", ll, [
623
608
  b(l.$slots, "loading", { query: u.value }, () => [
624
- ee(L(l.loadingText), 1)
609
+ ee(F(l.loadingText), 1)
625
610
  ])
626
- ])) : C.value.length ? ie("", !0) : (g(), h("span", al, [
611
+ ])) : C.value.length ? se("", !0) : (g(), h("span", tl, [
627
612
  b(l.$slots, "no-data", { query: u.value }, () => [
628
- ee(L(l.noDataText), 1)
613
+ ee(F(l.noDataText), 1)
629
614
  ])
630
615
  ])),
631
- (g(!0), h(D, null, H(C.value, (t) => (g(), h(D, {
616
+ (g(!0), h(L, null, P(C.value, (t) => (g(), h(L, {
632
617
  key: t.id
633
618
  }, [
634
619
  b(l.$slots, "option:prepend", {
@@ -637,14 +622,14 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
637
622
  w("span", {
638
623
  id: t.id,
639
624
  "aria-selected": t.selected,
640
- class: x({
625
+ class: I({
641
626
  "bb-base-select-option": !0,
642
627
  "bb-base-select-option--selected": t.selected,
643
628
  "bb-base-select-option--focused": t.focused,
644
629
  "bb-base-select-option--disabled": t.disabled
645
630
  }),
646
631
  role: "option",
647
- onClick: I(Ie, ["stop"])
632
+ onClick: B(Ie, ["stop"])
648
633
  }, [
649
634
  b(l.$slots, "option", {
650
635
  disabled: t.disabled,
@@ -652,17 +637,17 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
652
637
  hasErrors: l.hasErrors,
653
638
  index: t.index,
654
639
  item: t.original,
655
- loading: !!d.value,
640
+ loading: !!c.value,
656
641
  manual: t.manual,
657
642
  selected: t.selected,
658
643
  text: t.text,
659
644
  value: t.value
660
645
  }, () => [
661
- w("span", ol, [
662
- w("span", ul, L(t.text), 1)
646
+ w("span", nl, [
647
+ w("span", ol, F(t.text), 1)
663
648
  ])
664
649
  ])
665
- ], 10, nl),
650
+ ], 10, al),
666
651
  b(l.$slots, "option:append", {
667
652
  item: t.original
668
653
  })
@@ -671,36 +656,36 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
671
656
  ], 6)
672
657
  ]))
673
658
  ]),
674
- w("span", il, [
659
+ w("span", ul, [
675
660
  b(l.$slots, "chevron", {
676
- loading: !!d.value,
661
+ loading: !!c.value,
677
662
  shown: k.value
678
663
  }, () => [
679
- sl
664
+ il
680
665
  ])
681
666
  ]),
682
- d.value ? (g(), h("span", {
667
+ c.value ? (g(), h("span", {
683
668
  key: 1,
684
- class: x({
669
+ class: I({
685
670
  "bb-base-select__spinner": !0,
686
- "bb-base-select__spinner--loading": d.value
671
+ "bb-base-select__spinner--loading": c.value
687
672
  })
688
673
  }, [
689
674
  b(l.$slots, "spinner", {
690
- loading: !!d.value
675
+ loading: !!c.value
691
676
  }, () => [
692
- Je(Pe, { size: "sm" })
677
+ Je(He, { size: "sm" })
693
678
  ])
694
679
  ], 2)) : b(l.$slots, "append", { key: 0 })
695
680
  ], 512),
696
681
  b(l.$slots, "append-outer"),
697
- (g(!0), h(D, null, H(Ee.value, (t) => (g(), h("input", Re({
682
+ (g(!0), h(L, null, P(Ee.value, (t) => (g(), h("input", Re({
698
683
  key: t.value
699
684
  }, t), null, 16))), 128))
700
685
  ], 2));
701
686
  }
702
687
  });
703
688
  export {
704
- _l as default
689
+ Cl as default
705
690
  };
706
691
  //# sourceMappingURL=index31.js.map