bitboss-ui 0.2.32 → 0.2.34

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 (259) hide show
  1. package/dist/index103.js +2 -2
  2. package/dist/index109.js +1 -1
  3. package/dist/index111.js +4 -4
  4. package/dist/index116.js +1 -1
  5. package/dist/index118.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 +9 -9
  12. package/dist/index19.js +3 -3
  13. package/dist/index199.js +10 -295
  14. package/dist/index199.js.map +1 -1
  15. package/dist/index200.js +3 -16
  16. package/dist/index200.js.map +1 -1
  17. package/dist/index201.js +3 -16
  18. package/dist/index201.js.map +1 -1
  19. package/dist/index202.js +376 -17
  20. package/dist/index202.js.map +1 -1
  21. package/dist/index203.js +131 -17
  22. package/dist/index203.js.map +1 -1
  23. package/dist/index204.js +5 -29
  24. package/dist/index204.js.map +1 -1
  25. package/dist/index205.js +19 -8
  26. package/dist/index205.js.map +1 -1
  27. package/dist/index206.js +2 -2
  28. package/dist/index206.js.map +1 -1
  29. package/dist/index207.js +2 -235
  30. package/dist/index207.js.map +1 -1
  31. package/dist/index208.js +174 -3
  32. package/dist/index208.js.map +1 -1
  33. package/dist/index209.js +23 -35
  34. package/dist/index209.js.map +1 -1
  35. package/dist/index21.js +2 -2
  36. package/dist/index210.js +373 -6
  37. package/dist/index210.js.map +1 -1
  38. package/dist/index211.js +16 -10
  39. package/dist/index211.js.map +1 -1
  40. package/dist/index212.js +14 -376
  41. package/dist/index212.js.map +1 -1
  42. package/dist/index213.js +17 -131
  43. package/dist/index213.js.map +1 -1
  44. package/dist/index214.js +29 -2
  45. package/dist/index214.js.map +1 -1
  46. package/dist/index215.js +8 -174
  47. package/dist/index215.js.map +1 -1
  48. package/dist/index216.js +3 -23
  49. package/dist/index216.js.map +1 -1
  50. package/dist/index217.js +31 -369
  51. package/dist/index217.js.map +1 -1
  52. package/dist/index218.js +6 -3
  53. package/dist/index218.js.map +1 -1
  54. package/dist/index219.js +235 -3
  55. package/dist/index219.js.map +1 -1
  56. package/dist/index221.js +8 -27
  57. package/dist/index221.js.map +1 -1
  58. package/dist/index222.js +120 -16
  59. package/dist/index222.js.map +1 -1
  60. package/dist/index224.js +27 -8
  61. package/dist/index224.js.map +1 -1
  62. package/dist/index225.js +16 -120
  63. package/dist/index225.js.map +1 -1
  64. package/dist/index226.js +1 -1
  65. package/dist/index229.js +223 -5
  66. package/dist/index229.js.map +1 -1
  67. package/dist/index230.js +258 -2
  68. package/dist/index230.js.map +1 -1
  69. package/dist/index231.js +6 -2
  70. package/dist/index231.js.map +1 -1
  71. package/dist/index232.js +2 -2
  72. package/dist/index233.js +295 -2
  73. package/dist/index233.js.map +1 -1
  74. package/dist/index234.js +2 -2
  75. package/dist/index236.js +110 -428
  76. package/dist/index236.js.map +1 -1
  77. package/dist/index237.js +105 -88
  78. package/dist/index237.js.map +1 -1
  79. package/dist/index238.js +2 -200
  80. package/dist/index238.js.map +1 -1
  81. package/dist/index239.js +2 -224
  82. package/dist/index239.js.map +1 -1
  83. package/dist/index240.js +2 -258
  84. package/dist/index240.js.map +1 -1
  85. package/dist/index241.js +2 -2
  86. package/dist/index242.js +428 -110
  87. package/dist/index242.js.map +1 -1
  88. package/dist/index243.js +88 -105
  89. package/dist/index243.js.map +1 -1
  90. package/dist/index244.js +197 -157
  91. package/dist/index244.js.map +1 -1
  92. package/dist/index245.js +160 -2
  93. package/dist/index245.js.map +1 -1
  94. package/dist/index246.js +2 -69
  95. package/dist/index246.js.map +1 -1
  96. package/dist/index248.js +69 -2
  97. package/dist/index248.js.map +1 -1
  98. package/dist/index249.js +14 -37
  99. package/dist/index249.js.map +1 -1
  100. package/dist/index250.js +38 -2
  101. package/dist/index250.js.map +1 -1
  102. package/dist/index251.js +2 -2
  103. package/dist/index251.js.map +1 -1
  104. package/dist/index252.js +2 -15
  105. package/dist/index252.js.map +1 -1
  106. package/dist/index253.js +2 -3
  107. package/dist/index253.js.map +1 -1
  108. package/dist/index254.js +3 -2
  109. package/dist/index254.js.map +1 -1
  110. package/dist/index255.js +2 -2
  111. package/dist/index255.js.map +1 -1
  112. package/dist/index256.js +5 -0
  113. package/dist/index256.js.map +1 -0
  114. package/dist/index29.js +1 -1
  115. package/dist/index31.js +306 -292
  116. package/dist/index31.js.map +1 -1
  117. package/dist/index65.js +5 -5
  118. package/dist/index69.js +2 -2
  119. package/dist/index72.js +1 -1
  120. package/dist/index75.js +1 -1
  121. package/dist/index79.js +4 -4
  122. package/dist/index91.js +9 -7
  123. package/dist/index91.js.map +1 -1
  124. package/dist/{components → src/components}/BaseSelect/BaseSelect.vue.d.ts +13 -6
  125. package/dist/{components → src/components}/BbSelect/BbSelect.vue.d.ts +13 -6
  126. package/dist/{components → src/components}/BbTab/BbTab.vue.d.ts +5 -5
  127. package/dist/style.css +1 -1
  128. package/package.json +1 -1
  129. package/dist/{components → src/components}/BaseButton/BaseButton.vue.d.ts +0 -0
  130. package/dist/{components → src/components}/BaseCheckbox/BaseCheckbox.vue.d.ts +0 -0
  131. package/dist/{components → src/components}/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +0 -0
  132. package/dist/{components → src/components}/BaseDatePicker/BaseDatePicker.vue.d.ts +1 -1
  133. package/dist/{components → src/components}/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +0 -0
  134. package/dist/{components → src/components}/BaseDialog/BaseDialog.vue.d.ts +3 -3
  135. package/dist/{components → src/components}/BaseInputContainer/BaseInputContainer.vue.d.ts +0 -0
  136. package/dist/{components → src/components}/BaseNumberInput/BaseNumberInput.vue.d.ts +0 -0
  137. package/dist/{components → src/components}/BaseRadio/BaseRadio.vue.d.ts +0 -0
  138. package/dist/{components → src/components}/BaseRadioGroup/BaseRadioGroup.vue.d.ts +0 -0
  139. package/dist/{components → src/components}/BaseRating/BaseRating.vue.d.ts +0 -0
  140. package/dist/{components → src/components}/BaseSlider/BaseSlider.vue.d.ts +2 -2
  141. package/dist/{components → src/components}/BaseSwitch/BaseSwitch.vue.d.ts +0 -0
  142. package/dist/{components → src/components}/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +0 -0
  143. package/dist/{components → src/components}/BaseTag/BaseTag.vue.d.ts +0 -0
  144. package/dist/{components → src/components}/BaseTextInput/BaseTextInput.vue.d.ts +0 -0
  145. package/dist/{components → src/components}/BaseTextarea/BaseTextarea.vue.d.ts +0 -0
  146. package/dist/{components → src/components}/BbAccordion/BbAccordion.vue.d.ts +0 -0
  147. package/dist/{components → src/components}/BbAlert/BbAlert.vue.d.ts +0 -0
  148. package/dist/{components → src/components}/BbAvatar/BbAvatar.vue.d.ts +0 -0
  149. package/dist/{components → src/components}/BbBadge/BbBadge.vue.d.ts +0 -0
  150. package/dist/{components → src/components}/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +0 -0
  151. package/dist/{components → src/components}/BbButton/BbButton.vue.d.ts +0 -0
  152. package/dist/{components → src/components}/BbCheckbox/BbCheckbox.vue.d.ts +0 -0
  153. package/dist/{components → src/components}/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +0 -0
  154. package/dist/{components → src/components}/BbChip/BbChip.vue.d.ts +0 -0
  155. package/dist/{components → src/components}/BbCollapsible/BbCollapsible.vue.d.ts +0 -0
  156. package/dist/{components → src/components}/BbConfirm/BbConfirm.vue.d.ts +0 -0
  157. package/dist/{components → src/components}/BbDatePickerInput/BbDatePickerInput.vue.d.ts +0 -0
  158. package/dist/{components → src/components}/BbDialog/BbDialog.vue.d.ts +2 -2
  159. package/dist/{components → src/components}/BbDropdown/BbDropdown.vue.d.ts +1 -1
  160. package/dist/{components → src/components}/BbDropdownButton/BbDropdownButton.vue.d.ts +0 -0
  161. package/dist/{components → src/components}/BbDropzone/BbDropzone.vue.d.ts +0 -0
  162. package/dist/{components → src/components}/BbHover/BbHover.vue.d.ts +0 -0
  163. package/dist/{components → src/components}/BbIcon/BbIcon.vue.d.ts +0 -0
  164. package/dist/{components → src/components}/BbIntersection/BbIntersection.vue.d.ts +1 -1
  165. package/dist/{components → src/components}/BbNumberInput/BbNumberInput.vue.d.ts +0 -0
  166. package/dist/{components → src/components}/BbOffCanvas/BbOffCanvas.vue.d.ts +4 -4
  167. package/dist/{components → src/components}/BbPagination/BbPagination.vue.d.ts +0 -0
  168. package/dist/{components → src/components}/BbPopover/BbPopover.vue.d.ts +3 -3
  169. package/dist/{components → src/components}/BbProgress/BbProgress.vue.d.ts +0 -0
  170. package/dist/{components → src/components}/BbRadio/BbRadio.vue.d.ts +0 -0
  171. package/dist/{components → src/components}/BbRadioGroup/BbRadioGroup.vue.d.ts +0 -0
  172. package/dist/{components → src/components}/BbRating/BbRating.vue.d.ts +0 -0
  173. package/dist/{components → src/components}/BbRatio/BbRatio.vue.d.ts +0 -0
  174. package/dist/{components → src/components}/BbSlider/BbSlider.vue.d.ts +1 -1
  175. package/dist/{components → src/components}/BbSmoothHeight/BbSmoothHeight.vue.d.ts +2 -2
  176. package/dist/{components → src/components}/BbSpinner/BbSpinner.vue.d.ts +0 -0
  177. package/dist/{components → src/components}/BbSwitch/BbSwitch.vue.d.ts +0 -0
  178. package/dist/{components → src/components}/BbSwitchGroup/BbSwitchGroup.vue.d.ts +0 -0
  179. package/dist/{components → src/components}/BbTable/BbTable.vue.d.ts +0 -0
  180. package/dist/{components → src/components}/BbTable/types.d.ts +0 -0
  181. package/dist/{components → src/components}/BbTag/BbTag.vue.d.ts +0 -0
  182. package/dist/{components → src/components}/BbTextInput/BbTextInput.vue.d.ts +0 -0
  183. package/dist/{components → src/components}/BbTextarea/BbTextarea.vue.d.ts +0 -0
  184. package/dist/{components → src/components}/BbToast/BbToast.vue.d.ts +0 -0
  185. package/dist/{components → src/components}/BbToast/BbToastMessage.vue.d.ts +0 -0
  186. package/dist/{components → src/components}/BbTooltip/BbTooltip.vue.d.ts +2 -2
  187. /package/dist/{components → src/components}/BbTree/BbTree.vue.d.ts +0 -0
  188. /package/dist/{composables → src/composables}/useBroadcastChannelInstance.d.ts +0 -0
  189. /package/dist/{composables → src/composables}/useConfirm.d.ts +0 -0
  190. /package/dist/{composables → src/composables}/useCountdown.d.ts +0 -0
  191. /package/dist/{composables → src/composables}/useId.d.ts +0 -0
  192. /package/dist/{composables → src/composables}/useItemText.d.ts +0 -0
  193. /package/dist/{composables → src/composables}/useItemValue.d.ts +0 -0
  194. /package/dist/{composables → src/composables}/useOptions.d.ts +0 -0
  195. /package/dist/{composables → src/composables}/useRoute.d.ts +0 -0
  196. /package/dist/{composables → src/composables}/useRouter.d.ts +0 -0
  197. /package/dist/{composables → src/composables}/useToast.d.ts +0 -0
  198. /package/dist/{composables → src/composables}/useWizard.d.ts +0 -0
  199. /package/dist/{index.d.ts → src/index.d.ts} +0 -0
  200. /package/dist/{types → src/types}/Classes.d.ts +0 -0
  201. /package/dist/{types → src/types}/CommonProps.d.ts +0 -0
  202. /package/dist/{types → src/types}/ExtractGenericFromComputedRef.d.ts +0 -0
  203. /package/dist/{types → src/types}/ExtractGenericFromRef.d.ts +0 -0
  204. /package/dist/{types → src/types}/NestedKeyOf.d.ts +0 -0
  205. /package/dist/{types → src/types}/Simplify.d.ts +0 -0
  206. /package/dist/{types → src/types}/VoidHtmlElements.d.ts +0 -0
  207. /package/dist/{utilities → src/utilities}/functions/add.d.ts +0 -0
  208. /package/dist/{utilities → src/utilities}/functions/booleanishToBoolean.d.ts +0 -0
  209. /package/dist/{utilities → src/utilities}/functions/capitalize.d.ts +0 -0
  210. /package/dist/{utilities → src/utilities}/functions/clamp.d.ts +0 -0
  211. /package/dist/{utilities → src/utilities}/functions/cloneDeep.d.ts +0 -0
  212. /package/dist/{utilities → src/utilities}/functions/curry.d.ts +0 -0
  213. /package/dist/{utilities → src/utilities}/functions/debounce.d.ts +0 -0
  214. /package/dist/{utilities → src/utilities}/functions/deburr.d.ts +0 -0
  215. /package/dist/{utilities → src/utilities}/functions/drop.d.ts +0 -0
  216. /package/dist/{utilities → src/utilities}/functions/empty.d.ts +0 -0
  217. /package/dist/{utilities → src/utilities}/functions/findInTree.d.ts +0 -0
  218. /package/dist/{utilities → src/utilities}/functions/findRight.d.ts +0 -0
  219. /package/dist/{utilities → src/utilities}/functions/findRightIndex.d.ts +0 -0
  220. /package/dist/{utilities → src/utilities}/functions/flattenTree.d.ts +0 -0
  221. /package/dist/{utilities → src/utilities}/functions/flow.d.ts +0 -0
  222. /package/dist/{utilities → src/utilities}/functions/get.d.ts +0 -0
  223. /package/dist/{utilities → src/utilities}/functions/groupBy.d.ts +0 -0
  224. /package/dist/{utilities → src/utilities}/functions/gt.d.ts +0 -0
  225. /package/dist/{utilities → src/utilities}/functions/head.d.ts +0 -0
  226. /package/dist/{utilities → src/utilities}/functions/identity.d.ts +0 -0
  227. /package/dist/{utilities → src/utilities}/functions/includes.d.ts +0 -0
  228. /package/dist/{utilities → src/utilities}/functions/indexBy.d.ts +0 -0
  229. /package/dist/{utilities → src/utilities}/functions/initial.d.ts +0 -0
  230. /package/dist/{utilities → src/utilities}/functions/isCssColor.d.ts +0 -0
  231. /package/dist/{utilities → src/utilities}/functions/isNil.d.ts +0 -0
  232. /package/dist/{utilities → src/utilities}/functions/isNotNil.d.ts +0 -0
  233. /package/dist/{utilities → src/utilities}/functions/last.d.ts +0 -0
  234. /package/dist/{utilities → src/utilities}/functions/lt.d.ts +0 -0
  235. /package/dist/{utilities → src/utilities}/functions/makeUrl.d.ts +0 -0
  236. /package/dist/{utilities → src/utilities}/functions/mapKeys.d.ts +0 -0
  237. /package/dist/{utilities → src/utilities}/functions/mapValues.d.ts +0 -0
  238. /package/dist/{utilities → src/utilities}/functions/matchesPropertyInsensitive.d.ts +0 -0
  239. /package/dist/{utilities → src/utilities}/functions/mean.d.ts +0 -0
  240. /package/dist/{utilities → src/utilities}/functions/merge.d.ts +0 -0
  241. /package/dist/{utilities → src/utilities}/functions/millisecondsTo.d.ts +0 -0
  242. /package/dist/{utilities → src/utilities}/functions/negate.d.ts +0 -0
  243. /package/dist/{utilities → src/utilities}/functions/noop.d.ts +0 -0
  244. /package/dist/{utilities → src/utilities}/functions/omit.d.ts +0 -0
  245. /package/dist/{utilities → src/utilities}/functions/overEvery.d.ts +0 -0
  246. /package/dist/{utilities → src/utilities}/functions/percentage.d.ts +0 -0
  247. /package/dist/{utilities → src/utilities}/functions/pick.d.ts +0 -0
  248. /package/dist/{utilities → src/utilities}/functions/pickBy.d.ts +0 -0
  249. /package/dist/{utilities → src/utilities}/functions/replace.d.ts +0 -0
  250. /package/dist/{utilities → src/utilities}/functions/replaceInTree.d.ts +0 -0
  251. /package/dist/{utilities → src/utilities}/functions/retry.d.ts +0 -0
  252. /package/dist/{utilities → src/utilities}/functions/roundToTheNearest.d.ts +0 -0
  253. /package/dist/{utilities → src/utilities}/functions/set.d.ts +0 -0
  254. /package/dist/{utilities → src/utilities}/functions/snakeCase.d.ts +0 -0
  255. /package/dist/{utilities → src/utilities}/functions/throttle.d.ts +0 -0
  256. /package/dist/{utilities → src/utilities}/functions/tryTo.d.ts +0 -0
  257. /package/dist/{utilities → src/utilities}/functions/wait.d.ts +0 -0
  258. /package/dist/{utilities → src/utilities}/functions/waitFor.d.ts +0 -0
  259. /package/dist/{utilities → src/utilities}/functions/when.d.ts +0 -0
package/dist/index31.js CHANGED
@@ -1,26 +1,26 @@
1
- import { defineComponent as Ne, ref as f, computed as g, onMounted as $e, onBeforeUnmount as De, watch as X, openBlock as b, createElementBlock as y, normalizeClass as x, renderSlot as h, createElementVNode as w, Fragment as D, renderList as j, toDisplayString as L, createBlock as se, withModifiers as B, withCtx as Le, createTextVNode as ee, createCommentVNode as oe, withDirectives as Fe, vModelDynamic as Ae, Teleport as Me, normalizeStyle as Je, createVNode as qe, mergeProps as ze, nextTick as ie } from "vue";
2
- import Pe from "./index115.js";
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";
2
+ import ze from "./index115.js";
3
3
  import "./index158.js";
4
- import He from "./index119.js";
4
+ import Pe from "./index119.js";
5
5
  import "./index185.js";
6
- import { autoUpdate as je, computePosition as Qe, flip as Ue, shift as We } from "./index212.js";
6
+ import { autoUpdate as He, computePosition as Ue, flip as je, shift as Qe } from "./index202.js";
7
7
  import { deepEqual as re } from "./index123.js";
8
8
  import { head as le } from "./index220.js";
9
- import { isNotNil as I } from "./index124.js";
10
- import { last as Re } from "./index206.js";
9
+ import { isNotNil as B } from "./index124.js";
10
+ import { last as We } from "./index207.js";
11
11
  import { useItemText as Ke } from "./index125.js";
12
12
  import { useItemValue as Ye } from "./index126.js";
13
13
  import { wait as q } from "./index122.js";
14
- import { waitFor as Ze } from "./index210.js";
14
+ import { waitFor as Ze } from "./index218.js";
15
15
  import { when as Ge } from "./index198.js";
16
- import { offset as Xe } from "./index217.js";
16
+ import { offset as Xe } from "./index210.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"
20
20
  }, al = {
21
21
  key: 1,
22
22
  class: "bb-base-select__no-data-container"
23
- }, nl = ["id", "aria-selected"], ul = { class: "bb-base-select-option__content" }, sl = { class: "bb-base-select-option__text" }, ol = { class: "bb-base-select__chevron" }, il = /* @__PURE__ */ w("svg", {
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", {
24
24
  fill: "none",
25
25
  viewBox: "0 0 16 8",
26
26
  xmlns: "http://www.w3.org/2000/svg"
@@ -31,12 +31,13 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
31
31
  fill: "currentColor",
32
32
  "fill-rule": "evenodd"
33
33
  })
34
- ], -1), Ol = /* @__PURE__ */ Ne({
34
+ ], -1), _l = /* @__PURE__ */ Ne({
35
35
  __name: "BaseSelect",
36
36
  props: {
37
37
  allowWriting: { type: Boolean, default: !0 },
38
38
  autocomplete: {},
39
39
  autofocus: {},
40
+ debug: { type: Boolean },
40
41
  dependencies: {},
41
42
  depsDebounceTime: { default: 0 },
42
43
  disabled: { type: Boolean },
@@ -67,150 +68,161 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
67
68
  },
68
69
  emits: ["blur", "change", "click", "focus", "inactive", "input", "update:modelValue"],
69
70
  setup(de, { emit: ce }) {
70
- const l = de, c = ce;
71
- if (l.multiple && !Array.isArray(l.modelValue))
71
+ const e = de, c = ce;
72
+ if (e.multiple && !Array.isArray(e.modelValue))
72
73
  throw new Error('Multiple is set to "true" but modelValue is not an array.');
73
- const F = f(null), E = f(null), v = f(null), T = f(null), s = f(""), fe = g(() => i.value.length ? "" : l.placeholder), d = f(0), ve = l.transitionDuration / 1e3 + "s";
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";
74
75
  let te;
75
76
  $e(async () => {
76
- E.value && v.value && (te = je(
77
+ e.debug && console.log("Calling onMounted"), E.value && v.value && (te = He(
77
78
  E.value,
78
79
  v.value,
79
- ge,
80
+ ye,
80
81
  {
81
82
  ancestorResize: !0,
82
83
  ancestorScroll: !0,
83
- animationFrame: l.updateOnAnimationFrame,
84
+ animationFrame: e.updateOnAnimationFrame,
84
85
  elementResize: !0
85
86
  }
86
87
  ));
87
88
  }), De(() => {
88
- te();
89
+ e.debug && console.log("Calling onBeforeUnMount"), te();
89
90
  });
90
- const ae = f([]), m = f([]), V = f([]), { getItemText: me } = Ke(), { getItemValue: pe } = Ye(), be = g(() => ae.value.map((e, a) => {
91
- const t = me(e, l.itemText), n = pe(e, l.itemValue);
91
+ const ae = f([]), p = f([]), V = f([]), { getItemText: pe } = Ke(), { getItemValue: me } = Ye(), ge = y(() => ae.value.map((l, a) => {
92
+ e.debug && console.log("Mapping items in internalOptions", { item: l });
93
+ const t = pe(l, e.itemText), n = me(l, e.itemValue);
92
94
  if (n === void 0)
93
95
  throw new Error(
94
- 'The result of extracting "value" from option was undefined. Affected item is ' + JSON.stringify(e) + " please check itemValue property is correct."
96
+ 'The result of extracting "value" from option was undefined. Affected item is ' + JSON.stringify(l) + " please check itemValue property is correct."
95
97
  );
96
- const u = JSON.stringify(n);
98
+ const o = JSON.stringify(n);
97
99
  return {
98
- disabled: !!e.disabled,
99
- id: "option_" + u.replace(/\W/g, "_"),
100
- jsonValue: u,
100
+ disabled: !!l.disabled,
101
+ id: "option_" + o.replace(/\W/g, "_"),
102
+ jsonValue: o,
101
103
  manual: !1,
102
- original: e,
104
+ original: l,
103
105
  text: t,
104
106
  value: n
105
107
  };
106
- })), C = g(() => {
107
- let e = be.value.reduce(
108
- (n, u) => (n[u.id] = u, n),
108
+ })), O = y(() => {
109
+ let l = ge.value.reduce(
110
+ (n, o) => (n[o.id] = o, n),
109
111
  {}
110
112
  );
111
113
  const a = V.value.reduce(
112
- (n, u) => (n[u.id] || (n[u.id] = u), n),
113
- e
114
- ), t = m.value.reduce(
115
- (n, u) => (n[u.id] || (n[u.id] = u), n),
114
+ (n, o) => (n[o.id] || (n[o.id] = o), n),
115
+ l
116
+ ), t = p.value.reduce(
117
+ (n, o) => (n[o.id] || (n[o.id] = o), n),
116
118
  a
117
119
  );
118
- return Object.values(t).map(
119
- (n, u) => ({
120
+ return e.debug && console.log("Computing options in options", {
121
+ fromOptions: l,
122
+ withManual: a,
123
+ withStash: t
124
+ }), Object.values(t).map(
125
+ (n, o) => ({
120
126
  ...n,
121
- selected: I(he.value.get(n.value)),
122
- index: u
127
+ selected: B(be.value.get(n.value)),
128
+ index: o
123
129
  })
124
130
  );
125
- }), k = g(() => {
126
- let e = [];
127
- return s.value && !i.value.some(
128
- (a) => a.text === s.value
129
- ) ? e = C.value.filter((a) => {
131
+ }), C = y(() => {
132
+ e.debug && console.log("Computing filtered options");
133
+ let l = [];
134
+ return u.value && !s.value.some(
135
+ (a) => a.text === u.value
136
+ ) ? l = O.value.filter((a) => {
130
137
  let t = !1;
131
- if (l.filterBy) {
132
- if (typeof l.filterBy == "function")
133
- t = l.filterBy(a.value, a.original);
134
- else if (l.filterBy.length) {
135
- const n = [].concat(l.filterBy);
136
- for (let u = 0; u < n.length; u++) {
137
- const S = n[u];
138
- t = t || a.original[S] && a.original[S].toLowerCase().includes(s.value.toLowerCase());
138
+ if (e.filterBy) {
139
+ if (typeof e.filterBy == "function")
140
+ t = e.filterBy(a.value, a.original);
141
+ else if (e.filterBy.length) {
142
+ const n = [].concat(e.filterBy);
143
+ 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());
139
146
  }
140
147
  }
141
148
  } else
142
149
  return !0;
143
- return t || a.text.toLowerCase().includes(s.value.toLowerCase());
144
- }) : e = C.value, e.map((a, t) => ({
150
+ return t || a.text.toLowerCase().includes(u.value.toLowerCase());
151
+ }) : l = O.value, l.map((a, t) => ({
145
152
  ...a,
146
- focused: O.value === t
153
+ focused: _.value === t
147
154
  }));
148
- }), z = g(
149
- () => C.value.reduce(
150
- (e, a) => ({
151
- ...e,
155
+ }), R = y(
156
+ () => O.value.reduce(
157
+ (l, a) => ({
158
+ ...l,
152
159
  [a.id]: a
153
160
  }),
154
161
  {}
155
162
  )
156
- ), p = g(() => {
157
- if (l.matchStrategy === "string") {
158
- let e = C.value.reduce(
163
+ ), m = y(() => {
164
+ if (e.debug && console.log("Computing optionsIndexedByValue"), e.matchStrategy === "string") {
165
+ let l = O.value.reduce(
159
166
  (a, t) => (a[t.jsonValue] = t, a),
160
167
  {}
161
168
  );
162
169
  return {
163
- get: (a) => e[JSON.stringify(a)]
170
+ get: (a) => l[JSON.stringify(a)]
164
171
  };
165
- } else if (l.matchStrategy === "equality") {
166
- let e = C.value.map((a) => [
172
+ } else if (e.matchStrategy === "equality") {
173
+ let l = O.value.map((a) => [
167
174
  a.value,
168
175
  a
169
176
  ]);
170
177
  return {
171
178
  get: (a) => {
172
179
  var t;
173
- return (t = e.find((n) => re(n[0], a))) == null ? void 0 : t[1];
180
+ return (t = l.find((n) => re(n[0], a))) == null ? void 0 : t[1];
174
181
  }
175
182
  };
176
183
  } else
177
184
  throw new Error("No match strategy has been defined");
178
- }), he = g(() => {
179
- if (l.matchStrategy === "string") {
180
- let e = {};
181
- return [].concat(l.modelValue).forEach((a, t) => {
182
- e[JSON.stringify(a)] = t;
185
+ }), be = y(() => {
186
+ if (e.debug && console.log("Computing modelValueIndexed"), e.matchStrategy === "string") {
187
+ let l = {};
188
+ return [].concat(e.modelValue).forEach((a, t) => {
189
+ l[JSON.stringify(a)] = t;
183
190
  }), {
184
- get: (a) => e[JSON.stringify(a)]
191
+ get: (a) => l[JSON.stringify(a)]
185
192
  };
186
- } else if (l.matchStrategy === "equality") {
187
- const e = [].concat(l.modelValue).filter(I).map((a, t) => [a, t]);
193
+ } else if (e.matchStrategy === "equality") {
194
+ const l = [].concat(e.modelValue).filter(B).map((a, t) => [a, t]);
188
195
  return {
189
196
  get: (a) => {
190
197
  var t;
191
- return (t = e.find((n) => re(n[0], a))) == null ? void 0 : t[1];
198
+ return (t = l.find((n) => re(n[0], a))) == null ? void 0 : t[1];
192
199
  }
193
200
  };
194
201
  } else
195
202
  throw new Error("No match strategy has been defined");
196
- }), i = g(() => [].concat(l.modelValue).reduce((e, a) => {
197
- const t = p.value.get(a);
198
- return t && e.push(t), e;
199
- }, [])), A = (e) => {
203
+ }), s = y(() => (e.debug && console.log("Computing selectedOptions"), [].concat(e.modelValue).reduce((l, a) => {
204
+ const t = m.value.get(a);
205
+ return t && l.push(t), l;
206
+ }, []))), M = (l) => {
207
+ e.debug && console.log("Running onOptionSelected", { option: l });
200
208
  let a;
201
- r.value = e.index, l.multiple ? (e.selected ? (e.manual && (V.value = V.value.filter(
202
- (t) => t.id !== e.id
203
- )), a = l.modelValue.filter(
204
- (t) => JSON.stringify(t) !== e.jsonValue
205
- ), l.stash && (m.value = m.value.filter((t) => t.id !== e.id))) : (a = l.modelValue.concat(e.value), l.stash && (m.value = m.value.concat(e))), l.resetQueryOnOptionSelected && (s.value = "")) : e.selected ? (e.manual && (V.value = V.value.filter(
206
- (t) => t.id !== e.id
207
- )), a = null, l.stash && (m.value = []), s.value = "") : (a = e.value, l.stash && (m.value = [e]), s.value = e.text), c("update:modelValue", a);
208
- }, N = async ({ prefill: e = !1 }) => {
209
+ r.value = l.index, e.multiple ? (l.selected ? (l.manual && (e.debug && console.log("onOptionSelected: inside multiple > selected > manual"), V.value = V.value.filter(
210
+ (t) => t.id !== l.id
211
+ )), a = e.modelValue.filter(
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(
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(
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);
218
+ }, N = async ({ prefill: l = !1 }) => {
219
+ e.debug && console.log("running getOptions");
209
220
  let a = [];
210
- Array.isArray(l.items) ? a = l.items : typeof l.items == "function" && (d.value++, a = await l.items(s.value, e, l.modelValue), d.value--), ae.value = a;
211
- }, ye = () => {
212
- const e = s.value, a = s.value, t = JSON.stringify(a), n = {
213
- text: e,
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;
222
+ }, he = () => {
223
+ e.debug && console.log("running addOption");
224
+ const l = u.value, a = u.value, t = JSON.stringify(a), n = {
225
+ text: l,
214
226
  value: a,
215
227
  jsonValue: t,
216
228
  id: "option_" + t.replace(/\W/g, "_"),
@@ -218,134 +230,136 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
218
230
  manual: !0,
219
231
  disabled: !1
220
232
  };
221
- V.value = V.value.concat(n), s.value = "";
222
- }, P = l.prefill === !0 || !l.multiple && I(l.modelValue) || l.multiple && !!l.modelValue.length;
223
- let Q;
233
+ V.value = V.value.concat(n), u.value = "";
234
+ }, z = e.prefill === !0 || !e.multiple && B(e.modelValue) || e.multiple && !!e.modelValue.length;
235
+ let U;
224
236
  X(
225
- () => l.modelValue,
226
- (e, a) => {
227
- Q && clearTimeout(Q), Q = setTimeout(
237
+ () => e.modelValue,
238
+ (l, a) => {
239
+ e.debug && console.log("running watch.modelValue"), U && clearTimeout(U), U = setTimeout(
228
240
  async () => {
229
- if (l.multiple) {
230
- if (!Array.isArray(l.modelValue))
241
+ if (e.multiple) {
242
+ if (!Array.isArray(e.modelValue))
231
243
  throw new Error("props.modelValue is not an array.");
232
- let t = l.modelValue.every(
233
- (n) => p.value.get(n)
244
+ let t = e.modelValue.every(
245
+ (n) => m.value.get(n)
234
246
  );
235
- if ((!t || a === void 0) && (await N({ prefill: !0 }), t = l.modelValue.every(
236
- (n) => p.value.get(n)
247
+ if ((!t || a === void 0) && (await N({ prefill: !0 }), t = e.modelValue.every(
248
+ (n) => m.value.get(n)
237
249
  )), t)
238
- l.stash && (m.value = l.modelValue.map(
239
- (n) => p.value.get(n)
250
+ e.stash && (p.value = e.modelValue.map(
251
+ (n) => m.value.get(n)
240
252
  ));
241
253
  else {
242
254
  let n = [];
243
- const u = e.filter((S) => {
244
- let J = p.value.get(S);
255
+ const o = l.filter((T) => {
256
+ let J = m.value.get(T);
245
257
  return J && n.push(J), J;
246
258
  });
247
- l.stash && (m.value = n), l.enforceCoherence && c("update:modelValue", u);
259
+ e.stash && (p.value = n), e.enforceCoherence && c("update:modelValue", o);
248
260
  }
249
261
  } else {
250
- let t = p.value.get(l.modelValue);
251
- if (!t && I(l.modelValue) || a === void 0) {
252
- const n = s.value;
253
- s.value = "", await N({ prefill: !0 }), s.value = n;
262
+ e.debug && console.log("watch.modelValue >> single");
263
+ let t = m.value.get(e.modelValue);
264
+ if (!t && B(e.modelValue) || a === void 0) {
265
+ e.debug && console.log("watch.modelValue >> not found line 895");
266
+ const n = u.value;
267
+ u.value = "", await N({ prefill: !0 }), u.value = n;
254
268
  }
255
- t = p.value.get(l.modelValue), t ? (s.value = t.text, l.stash && (m.value = [t])) : l.enforceCoherence && I(e) ? (s.value = "", l.stash && (m.value = []), c("update:modelValue", null)) : s.value = "";
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 = "";
256
270
  }
257
271
  },
258
- P ? 0 : l.modelValueDebounceTime
272
+ z ? 0 : e.modelValueDebounceTime
259
273
  );
260
274
  },
261
275
  // Prefill when asked or when items are static
262
- { immediate: P, deep: !0 }
276
+ { immediate: z, deep: !0 }
263
277
  ), X(
264
- () => l.items,
265
- async (e, a) => {
266
- if (typeof e == "function" || // Circumvent arrays defined in the template by the parent
267
- JSON.stringify(e) !== JSON.stringify(a))
268
- if (await N({ prefill: !1 }), l.multiple) {
269
- if (!l.modelValue.every(
270
- (n) => p.value.get(n)
271
- ) && l.enforceCoherence) {
272
- const n = l.modelValue.filter((u) => p.value.get(u));
278
+ () => e.items,
279
+ async (l, a) => {
280
+ if (typeof l == "function" || // Circumvent arrays defined in the template by the parent
281
+ JSON.stringify(l) !== JSON.stringify(a))
282
+ if (e.debug && console.log("watch.items"), await N({ prefill: !1 }), e.multiple) {
283
+ if (!e.modelValue.every(
284
+ (n) => m.value.get(n)
285
+ ) && e.enforceCoherence) {
286
+ const n = e.modelValue.filter((o) => m.value.get(o));
273
287
  c("update:modelValue", n);
274
288
  }
275
289
  } else
276
- !p.value.get(l.modelValue) && l.enforceCoherence && I(l.modelValue) && c("update:modelValue", null), r.value = null;
290
+ !m.value.get(e.modelValue) && e.enforceCoherence && B(e.modelValue) && c("update:modelValue", null), r.value = null;
277
291
  }
278
292
  );
279
- let U;
293
+ let j;
280
294
  X(
281
- () => l.dependencies,
282
- (e, a) => {
283
- !P && l.prefill === "focus" && Y || JSON.stringify(e) !== JSON.stringify(a) && (U && clearTimeout(U), U = setTimeout(async () => {
284
- if (JSON.stringify(e) !== JSON.stringify(a)) {
285
- l.enforceCoherence && l.stash && (m.value = []);
286
- let t = s.value;
287
- if (s.value = "", await N({ prefill: !0 }), s.value = t, !l.multiple)
288
- !p.value.get(l.modelValue) && l.enforceCoherence && I(l.modelValue) && (s.value = "", l.stash && (m.value = []), c("update:modelValue", null));
289
- else if (!l.modelValue.every(
290
- (u) => p.value.get(u)
291
- ) && l.enforceCoherence) {
292
- let u = [];
293
- const S = l.modelValue.filter((J) => {
294
- let G = p.value.get(J);
295
- return G && u.push(G), G;
295
+ () => e.dependencies,
296
+ (l, a) => {
297
+ !z && e.prefill === "focus" && Y || JSON.stringify(l) !== JSON.stringify(a) && (j && clearTimeout(j), j = setTimeout(async () => {
298
+ if (JSON.stringify(l) !== JSON.stringify(a)) {
299
+ e.enforceCoherence && e.stash && (p.value = []);
300
+ 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));
303
+ else if (!e.modelValue.every(
304
+ (o) => m.value.get(o)
305
+ ) && e.enforceCoherence) {
306
+ let o = [];
307
+ const T = e.modelValue.filter((J) => {
308
+ let G = m.value.get(J);
309
+ return G && o.push(G), G;
296
310
  });
297
- l.stash && (m.value = u), c("update:modelValue", S);
311
+ e.stash && (p.value = o), c("update:modelValue", T);
298
312
  }
299
313
  }
300
- }, l.depsDebounceTime));
314
+ }, e.depsDebounceTime));
301
315
  },
302
316
  { deep: !0 }
303
317
  );
304
- const ge = () => {
305
- E.value && v.value && Qe(E.value, v.value, {
318
+ const ye = () => {
319
+ e.debug && console.log("Running display options"), E.value && v.value && Ue(E.value, v.value, {
306
320
  placement: "bottom",
307
- middleware: [Xe(6), Ue(), We()]
308
- }).then((e) => {
321
+ middleware: [Xe(6), je(), Qe()]
322
+ }).then((l) => {
309
323
  var a;
310
- v.value && (v.value.style.left = `${e.x}px`, v.value.style.top = `${e.y}px`, v.value.style.width = `${(a = E.value) == null ? void 0 : a.offsetWidth}px`);
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`);
311
325
  });
312
- }, _ = f(!1), W = f(!1), R = f(!1), K = f(!0), $ = async () => {
313
- K.value = !1, W.value = !0, await q(l.transitionDuration), W.value = !1, _.value = !0;
314
- }, M = async () => {
315
- _.value = !1, R.value = !0, await q(l.transitionDuration), R.value = !1, K.value = !0;
316
- }, H = f(!1);
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;
328
+ }, A = async () => {
329
+ k.value = !1, W.value = !0, await q(e.transitionDuration), W.value = !1, K.value = !0;
330
+ }, P = f(!1);
317
331
  let Y = !0;
318
- const we = async (e) => {
319
- c("focus", e), H.value = !0, document.addEventListener("click", ue), document.addEventListener("focusin", ne), T.value instanceof HTMLInputElement && T.value.select(), l.prefill === "focus" && Y && !P && (await N({ prefill: !0 }), Y = !1);
320
- }, ne = (e) => {
321
- if (e.target instanceof Node && F.value && v.value && !F.value.contains(e.target) && !v.value.contains(e.target)) {
322
- M(), c("inactive"), document.removeEventListener("focusin", ne), H.value = !1, l.multiple && q(500).then(() => {
323
- s.value = "";
332
+ 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 && q(500).then(() => {
337
+ u.value = "";
324
338
  });
325
339
  return;
326
340
  }
327
- }, Ve = async (e) => {
328
- if (c("blur", e), !l.multiple) {
341
+ }, Ve = async (l) => {
342
+ if (e.debug && console.log("Running onInputBlur"), c("blur", l), !e.multiple) {
329
343
  let a = !1;
330
- const t = l.modelValue;
344
+ const t = e.modelValue;
331
345
  if (await Promise.race([
332
346
  q(250),
333
- Ze(() => t !== l.modelValue).then(() => {
347
+ Ze(() => t !== e.modelValue).then(() => {
334
348
  a = !0;
335
349
  })
336
350
  ]), !a) {
337
- const n = p.value.get(l.modelValue);
338
- n && (s.value = n.text);
351
+ const n = m.value.get(e.modelValue);
352
+ n && (u.value = n.text);
339
353
  }
340
354
  }
341
- }, Ce = (e) => c("change", e), ke = (e) => {
342
- c("input", e), s.value === "" && (l.multiple || c("update:modelValue", null)), typeof l.items == "function" && Se();
343
- }, r = f(null), O = g(() => Number.isInteger(r.value) && r.value ? (r.value === -1 && (r.value = k.value.length - 1), r.value % k.value.length) : r.value), o = f(null), _e = () => {
344
- r.value !== null ? r.value++ : r.value = 0, ie().then(() => {
345
- var e;
346
- if (O.value !== null) {
347
- const a = (e = v.value) == null ? void 0 : e.querySelector(
348
- `#${C.value[O.value].id}`
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}`
349
363
  );
350
364
  a instanceof HTMLElement && a.scrollIntoView({
351
365
  behavior: "smooth",
@@ -354,12 +368,12 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
354
368
  });
355
369
  }
356
370
  });
357
- }, Oe = () => {
358
- r.value !== null ? r.value-- : r.value = C.value.length - 1, ie().then(() => {
359
- var e;
360
- if (O.value !== null) {
361
- const a = (e = v.value) == null ? void 0 : e.querySelector(
362
- `#${C.value[O.value].id}`
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}`
363
377
  );
364
378
  a instanceof HTMLElement && a.scrollIntoView({
365
379
  behavior: "smooth",
@@ -368,40 +382,40 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
368
382
  });
369
383
  }
370
384
  });
371
- }, Te = async (e) => {
385
+ }, Se = async (l) => {
372
386
  var a, t;
373
- if (l.readonly || l.disabled) {
374
- e.preventDefault();
387
+ if (e.readonly || e.disabled) {
388
+ l.preventDefault();
375
389
  return;
376
390
  }
377
- switch (e.key) {
391
+ switch (l.key) {
378
392
  case "ArrowUp":
379
393
  {
380
- if (e.preventDefault(), d.value)
394
+ if (l.preventDefault(), d.value)
381
395
  return;
382
- o.value = null, _.value ? Oe() : (i.value.length && (r.value = le(i.value).index), await $());
396
+ i.value = null, k.value ? _e() : (s.value.length && (r.value = le(s.value).index), await $());
383
397
  }
384
398
  break;
385
399
  case "ArrowDown":
386
400
  {
387
- if (e.preventDefault(), d.value)
401
+ if (l.preventDefault(), d.value)
388
402
  return;
389
- o.value = null, _.value ? _e() : (i.value.length && (r.value = le(i.value).index), await $());
403
+ i.value = null, k.value ? ke() : (s.value.length && (r.value = le(s.value).index), await $());
390
404
  }
391
405
  break;
392
406
  case "ArrowLeft":
393
407
  {
394
408
  if (d.value)
395
409
  return;
396
- if (!s.value && i.value.length && (o.value === null ? o.value = i.value.length - 1 : o.value > 0 ? o.value-- : o.value = null, o.value !== null)) {
397
- let n = i.value[o.value], u = (a = v.value) == null ? void 0 : a.querySelector(
410
+ 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
412
  `#${n.id}`
399
413
  );
400
- u && (u.scrollIntoView({
414
+ o && (o.scrollIntoView({
401
415
  behavior: "smooth",
402
416
  block: "nearest",
403
417
  inline: "start"
404
- }), r.value = z.value[i.value[o.value].id].index);
418
+ }), r.value = R.value[s.value[i.value].id].index);
405
419
  }
406
420
  }
407
421
  break;
@@ -409,46 +423,46 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
409
423
  {
410
424
  if (d.value)
411
425
  return;
412
- if (!s.value && i.value.length && (o.value === null ? o.value = 0 : o.value < i.value.length - 1 ? o.value++ : o.value = null, o.value !== null)) {
413
- let n = i.value[o.value], u = (t = v.value) == null ? void 0 : t.querySelector(
426
+ 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
428
  `#${n.id}`
415
429
  );
416
- u && (u.scrollIntoView({
430
+ o && (o.scrollIntoView({
417
431
  behavior: "smooth",
418
432
  block: "nearest",
419
433
  inline: "start"
420
- }), r.value = z.value[i.value[o.value].id].index);
434
+ }), r.value = R.value[s.value[i.value].id].index);
421
435
  }
422
436
  }
423
437
  break;
424
438
  case "Enter":
425
439
  {
426
- if (e.preventDefault(), d.value)
440
+ if (l.preventDefault(), d.value)
427
441
  return;
428
- if (!_.value)
429
- k.value.length && i.value.length && (r.value = le(i.value).index), await $();
430
- else if (O.value !== null) {
431
- if (k.value[O.value].disabled)
442
+ if (!k.value)
443
+ C.value.length && s.value.length && (r.value = le(s.value).index), await $();
444
+ else if (_.value !== null) {
445
+ if (C.value[_.value].disabled)
432
446
  return;
433
- l.multiple || await M(), A(
434
- k.value[O.value]
447
+ e.multiple || await A(), M(
448
+ C.value[_.value]
435
449
  );
436
- } else if (l.addOptions) {
437
- if (l.itemText || l.itemValue) {
450
+ } else if (e.addOptions) {
451
+ if (e.itemText || e.itemValue) {
438
452
  console.error(
439
453
  `Adding an option for mapped items is not supported. You can't create an option while passing "item-text" or "item-value".`
440
454
  );
441
455
  return;
442
456
  }
443
- ye();
444
- const n = Re(V.value);
445
- A(z.value[n.id]);
457
+ he();
458
+ const n = We(V.value);
459
+ M(R.value[n.id]);
446
460
  }
447
461
  }
448
462
  break;
449
463
  case "Tab":
450
464
  case "Escape":
451
- _.value && await M(), c("inactive"), o.value = null, r.value = null;
465
+ k.value && await A(), c("inactive"), i.value = null, r.value = null;
452
466
  break;
453
467
  case "Shift":
454
468
  if (d.value)
@@ -458,103 +472,103 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
458
472
  {
459
473
  if (d.value)
460
474
  return;
461
- s.value || i.value.length && (o.value === null ? o.value = i.value.length - 1 : (A(
462
- i.value[o.value]
463
- ), i.value.length ? o.value = Math.max(
475
+ u.value || s.value.length && (i.value === null ? i.value = s.value.length - 1 : (M(
476
+ s.value[i.value]
477
+ ), s.value.length ? i.value = Math.max(
464
478
  Math.min(
465
- o.value,
466
- i.value.length - 2
479
+ i.value,
480
+ s.value.length - 2
467
481
  ),
468
482
  0
469
- ) : o.value = null)), await $();
483
+ ) : i.value = null)), await $();
470
484
  }
471
485
  break;
472
486
  default:
473
- o.value = null, r.value = null, await $();
487
+ i.value = null, r.value = null, await $();
474
488
  break;
475
489
  }
476
490
  };
477
491
  let Z;
478
- const Se = () => {
492
+ const Te = () => {
479
493
  Z && clearTimeout(Z), Z = setTimeout(async () => {
480
494
  try {
481
495
  await N({ prefill: !1 });
482
- } catch (e) {
483
- console.error(e);
496
+ } catch (l) {
497
+ console.error(l);
484
498
  }
485
- }, l.queryDebounceTime);
486
- }, xe = (e) => {
487
- c("click", e), !(l.disabled || l.readonly) && (T.value instanceof HTMLElement && T.value.focus(), $());
488
- }, Be = (e) => {
489
- if (e.currentTarget instanceof HTMLElement && e.currentTarget.classList.contains("bb-base-select-option")) {
490
- const a = z.value[e.currentTarget.id];
499
+ }, e.queryDebounceTime);
500
+ }, xe = (l) => {
501
+ c("click", l), !(e.disabled || e.readonly) && (S.value instanceof HTMLElement && S.value.focus(), $());
502
+ }, Ie = (l) => {
503
+ if (l.currentTarget instanceof HTMLElement && l.currentTarget.classList.contains("bb-base-select-option")) {
504
+ const a = R.value[l.currentTarget.id];
491
505
  if (a.disabled)
492
506
  return;
493
- A(a), T.value instanceof HTMLInputElement && T.value.focus(), l.multiple || M();
507
+ M(a), S.value instanceof HTMLInputElement && S.value.focus(), e.multiple || A();
494
508
  }
495
- }, ue = (e) => {
496
- if (e.target instanceof Node && F.value && !F.value.contains(e.target)) {
497
- M(), c("inactive"), document.removeEventListener("click", ue), H.value = !1, l.multiple && q(500).then(() => {
498
- s.value = "";
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 && q(500).then(() => {
512
+ u.value = "";
499
513
  });
500
514
  return;
501
515
  }
502
- }, Ie = Ge(
503
- (e) => typeof e != "string",
516
+ }, Be = Ge(
517
+ (l) => typeof l != "string",
504
518
  JSON.stringify
505
- ), Ee = g(() => [].concat(l.modelValue).map((e) => {
506
- const a = Ie(e);
519
+ ), Ee = y(() => [].concat(e.modelValue).map((l) => {
520
+ const a = Be(l);
507
521
  return {
508
- disabled: l.disabled,
509
- name: l.name,
522
+ disabled: e.disabled,
523
+ name: e.name,
510
524
  type: "hidden",
511
525
  value: a
512
526
  };
513
527
  }));
514
- return (e, a) => (b(), y("span", {
528
+ return (l, a) => (g(), h("span", {
515
529
  ref_key: "outerContainer",
516
530
  ref: F,
517
531
  class: x({
518
532
  "bb-base-select": !0,
519
- "bb-base-select--active": H.value,
533
+ "bb-base-select--active": P.value,
520
534
  "bb-base-select--loading": d.value,
521
- "bb-base-select--disabled": e.disabled,
522
- "bb-base-select--errors": e.hasErrors,
523
- "bb-base-select--readonly": e.readonly
535
+ "bb-base-select--disabled": l.disabled,
536
+ "bb-base-select--errors": l.hasErrors,
537
+ "bb-base-select--readonly": l.readonly
524
538
  }),
525
539
  onClick: xe
526
540
  }, [
527
- h(e.$slots, "prepend-outer"),
541
+ b(l.$slots, "prepend-outer"),
528
542
  w("span", {
529
543
  ref_key: "innerContainer",
530
544
  ref: E,
531
545
  class: "bb-base-select__inner-container"
532
546
  }, [
533
- h(e.$slots, "prepend"),
547
+ b(l.$slots, "prepend"),
534
548
  w("span", el, [
535
- e.multiple ? (b(), y(D, { key: 0 }, [
536
- e.comma ? (b(!0), y(D, { key: 0 }, j(i.value, (t, n) => (b(), y("span", {
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", {
537
551
  key: t.id,
538
552
  class: x({
539
553
  "bb-base-select__selected": !0,
540
554
  "bb-base-select__selected--comma": !0,
541
- "bb-base-select__selected--focused": n === o.value
555
+ "bb-base-select__selected--focused": n === i.value
542
556
  })
543
- }, L(t.text) + L(n < i.value.length - 1 ? "," : ""), 3))), 128)) : (b(!0), y(D, { key: 1 }, j(i.value, (t, n) => (b(), se(Pe, {
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, {
544
558
  key: t.id,
545
559
  class: x({
546
560
  "bb-base-select__selected": !0,
547
561
  "bb-base-select__selected--chip": !0,
548
- "bb-base-select__selected--focused": n === o.value
562
+ "bb-base-select__selected--focused": n === i.value
549
563
  }),
550
564
  clearable: !0,
551
565
  text: t.text,
552
- "onClick:clear": B((u) => A(t), ["stop"])
566
+ "onClick:clear": I((o) => M(t), ["stop"])
553
567
  }, {
554
568
  default: Le(() => [
555
- h(e.$slots, "chip", {
569
+ b(l.$slots, "chip", {
556
570
  disabled: t.disabled,
557
- hasErrors: e.hasErrors,
571
+ hasErrors: l.hasErrors,
558
572
  index: t.index,
559
573
  item: t.original,
560
574
  loading: !!d.value,
@@ -568,56 +582,56 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
568
582
  ]),
569
583
  _: 2
570
584
  }, 1032, ["class", "text", "onClick:clear"]))), 128))
571
- ], 64)) : oe("", !0),
585
+ ], 64)) : ie("", !0),
572
586
  Fe(w("input", {
573
- id: e.id,
587
+ id: l.id,
574
588
  ref_key: "input",
575
- ref: T,
576
- "onUpdate:modelValue": a[0] || (a[0] = (t) => s.value = t),
577
- autocomplete: e.autocomplete,
578
- autofocus: e.autofocus,
589
+ ref: S,
590
+ "onUpdate:modelValue": a[0] || (a[0] = (t) => u.value = t),
591
+ autocomplete: l.autocomplete,
592
+ autofocus: l.autofocus,
579
593
  class: x("bb-base-select__text-input"),
580
- disabled: e.disabled,
594
+ disabled: l.disabled,
581
595
  placeholder: fe.value,
582
- readonly: e.readonly || !e.allowWriting,
596
+ readonly: l.readonly || !l.allowWriting,
583
597
  type: "text",
584
- onBlur: B(Ve, ["stop"]),
585
- onChange: B(Ce, ["stop"]),
586
- onFocus: B(we, ["stop"]),
587
- onInput: B(ke, ["stop"]),
588
- onKeydown: B(Te, ["stop"])
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"])
589
603
  }, null, 40, ll), [
590
- [Ae, s.value]
604
+ [Me, u.value]
591
605
  ]),
592
- (b(), se(Me, { to: "body" }, [
606
+ (g(), ue(Ae, { to: "body" }, [
593
607
  w("span", {
594
608
  ref_key: "optionsContainer",
595
609
  ref: v,
596
610
  class: x({
597
611
  "bb-base-select__options-container": !0,
598
- "bb-base-select__options-container--shown": _.value,
599
- "bb-base-select__options-container--showing": W.value,
600
- "bb-base-select__options-container--hiding": R.value,
612
+ "bb-base-select__options-container--shown": k.value,
613
+ "bb-base-select__options-container--showing": Q.value,
614
+ "bb-base-select__options-container--hiding": W.value,
601
615
  "bb-base-select__options-container--hidden": K.value
602
616
  }),
603
617
  role: "listbox",
604
618
  style: Je({ transitionDuration: ve }),
605
619
  tabindex: -1
606
620
  }, [
607
- h(e.$slots, "options:prepend"),
608
- !k.value.length && d.value ? (b(), y("span", tl, [
609
- h(e.$slots, "loading", { query: s.value }, () => [
610
- ee(L(e.loadingText), 1)
621
+ b(l.$slots, "options:prepend"),
622
+ !C.value.length && d.value ? (g(), h("span", tl, [
623
+ b(l.$slots, "loading", { query: u.value }, () => [
624
+ ee(L(l.loadingText), 1)
611
625
  ])
612
- ])) : k.value.length ? oe("", !0) : (b(), y("span", al, [
613
- h(e.$slots, "no-data", { query: s.value }, () => [
614
- ee(L(e.noDataText), 1)
626
+ ])) : C.value.length ? ie("", !0) : (g(), h("span", al, [
627
+ b(l.$slots, "no-data", { query: u.value }, () => [
628
+ ee(L(l.noDataText), 1)
615
629
  ])
616
630
  ])),
617
- (b(!0), y(D, null, j(k.value, (t) => (b(), y(D, {
631
+ (g(!0), h(D, null, H(C.value, (t) => (g(), h(D, {
618
632
  key: t.id
619
633
  }, [
620
- h(e.$slots, "option:prepend", {
634
+ b(l.$slots, "option:prepend", {
621
635
  item: t.original
622
636
  }),
623
637
  w("span", {
@@ -630,12 +644,12 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
630
644
  "bb-base-select-option--disabled": t.disabled
631
645
  }),
632
646
  role: "option",
633
- onClick: B(Be, ["stop"])
647
+ onClick: I(Ie, ["stop"])
634
648
  }, [
635
- h(e.$slots, "option", {
649
+ b(l.$slots, "option", {
636
650
  disabled: t.disabled,
637
651
  focused: t.focused,
638
- hasErrors: e.hasErrors,
652
+ hasErrors: l.hasErrors,
639
653
  index: t.index,
640
654
  item: t.original,
641
655
  loading: !!d.value,
@@ -644,49 +658,49 @@ const el = { class: "bb-base-select__input-container" }, ll = ["id", "autocomple
644
658
  text: t.text,
645
659
  value: t.value
646
660
  }, () => [
647
- w("span", ul, [
648
- w("span", sl, L(t.text), 1)
661
+ w("span", ol, [
662
+ w("span", ul, L(t.text), 1)
649
663
  ])
650
664
  ])
651
665
  ], 10, nl),
652
- h(e.$slots, "option:append", {
666
+ b(l.$slots, "option:append", {
653
667
  item: t.original
654
668
  })
655
669
  ], 64))), 128)),
656
- h(e.$slots, "options:append")
670
+ b(l.$slots, "options:append")
657
671
  ], 6)
658
672
  ]))
659
673
  ]),
660
- w("span", ol, [
661
- h(e.$slots, "chevron", {
674
+ w("span", il, [
675
+ b(l.$slots, "chevron", {
662
676
  loading: !!d.value,
663
- shown: _.value
677
+ shown: k.value
664
678
  }, () => [
665
- il
679
+ sl
666
680
  ])
667
681
  ]),
668
- d.value ? (b(), y("span", {
682
+ d.value ? (g(), h("span", {
669
683
  key: 1,
670
684
  class: x({
671
685
  "bb-base-select__spinner": !0,
672
686
  "bb-base-select__spinner--loading": d.value
673
687
  })
674
688
  }, [
675
- h(e.$slots, "spinner", {
689
+ b(l.$slots, "spinner", {
676
690
  loading: !!d.value
677
691
  }, () => [
678
- qe(He, { size: "sm" })
692
+ qe(Pe, { size: "sm" })
679
693
  ])
680
- ], 2)) : h(e.$slots, "append", { key: 0 })
694
+ ], 2)) : b(l.$slots, "append", { key: 0 })
681
695
  ], 512),
682
- h(e.$slots, "append-outer"),
683
- (b(!0), y(D, null, j(Ee.value, (t) => (b(), y("input", ze({
696
+ b(l.$slots, "append-outer"),
697
+ (g(!0), h(D, null, H(Ee.value, (t) => (g(), h("input", Re({
684
698
  key: t.value
685
699
  }, t), null, 16))), 128))
686
700
  ], 2));
687
701
  }
688
702
  });
689
703
  export {
690
- Ol as default
704
+ _l as default
691
705
  };
692
706
  //# sourceMappingURL=index31.js.map