bitboss-ui 1.0.42 → 1.0.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 (116) hide show
  1. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +1 -1
  2. package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -1
  3. package/dist/components/BbTooltip/BbTooltip.vue.d.ts +1 -1
  4. package/dist/index103.js +1 -1
  5. package/dist/index113.js +4 -4
  6. package/dist/index119.js +1 -1
  7. package/dist/index12.js +3 -3
  8. package/dist/index120.js +1 -1
  9. package/dist/index121.js +1 -1
  10. package/dist/index133.js +2 -2
  11. package/dist/index16.js +8 -8
  12. package/dist/index18.js +20 -20
  13. package/dist/index18.js.map +1 -1
  14. package/dist/index199.js +1 -1
  15. package/dist/index20.js +4 -4
  16. package/dist/index200.js +5 -2
  17. package/dist/index200.js.map +1 -1
  18. package/dist/index201.js +16 -4
  19. package/dist/index201.js.map +1 -1
  20. package/dist/index202.js +16 -2
  21. package/dist/index202.js.map +1 -1
  22. package/dist/index203.js +19 -79
  23. package/dist/index203.js.map +1 -1
  24. package/dist/index204.js +20 -2
  25. package/dist/index204.js.map +1 -1
  26. package/dist/index205.js +29 -5
  27. package/dist/index205.js.map +1 -1
  28. package/dist/index206.js +8 -16
  29. package/dist/index206.js.map +1 -1
  30. package/dist/index207.js +2 -16
  31. package/dist/index207.js.map +1 -1
  32. package/dist/index208.js +119 -17
  33. package/dist/index208.js.map +1 -1
  34. package/dist/index209.js +131 -17
  35. package/dist/index209.js.map +1 -1
  36. package/dist/index210.js +2 -29
  37. package/dist/index210.js.map +1 -1
  38. package/dist/index211.js +35 -8
  39. package/dist/index211.js.map +1 -1
  40. package/dist/index212.js +174 -2
  41. package/dist/index212.js.map +1 -1
  42. package/dist/index213.js +6 -3
  43. package/dist/index213.js.map +1 -1
  44. package/dist/index214.js +7 -35
  45. package/dist/index214.js.map +1 -1
  46. package/dist/index215.js +368 -6
  47. package/dist/index215.js.map +1 -1
  48. package/dist/index216.js +373 -7
  49. package/dist/index216.js.map +1 -1
  50. package/dist/index217.js +3 -3
  51. package/dist/index217.js.map +1 -1
  52. package/dist/index218.js +7 -3
  53. package/dist/index218.js.map +1 -1
  54. package/dist/index219.js +70 -112
  55. package/dist/index219.js.map +1 -1
  56. package/dist/index22.js +2 -2
  57. package/dist/index220.js +2 -134
  58. package/dist/index220.js.map +1 -1
  59. package/dist/index221.js +4 -174
  60. package/dist/index221.js.map +1 -1
  61. package/dist/index222.js +2 -7
  62. package/dist/index222.js.map +1 -1
  63. package/dist/index223.js +3 -368
  64. package/dist/index223.js.map +1 -1
  65. package/dist/index224.js +3 -373
  66. package/dist/index224.js.map +1 -1
  67. package/dist/index226.js +2 -9
  68. package/dist/index226.js.map +1 -1
  69. package/dist/index227.js +9 -23
  70. package/dist/index227.js.map +1 -1
  71. package/dist/index228.js +23 -2
  72. package/dist/index228.js.map +1 -1
  73. package/dist/index232.js +1 -1
  74. package/dist/index236.js +295 -2
  75. package/dist/index236.js.map +1 -1
  76. package/dist/index237.js +6 -4
  77. package/dist/index237.js.map +1 -1
  78. package/dist/index238.js +2 -295
  79. package/dist/index238.js.map +1 -1
  80. package/dist/index239.js +2 -6
  81. package/dist/index239.js.map +1 -1
  82. package/dist/index240.js +2 -2
  83. package/dist/index244.js +2 -2
  84. package/dist/index245.js +106 -2
  85. package/dist/index245.js.map +1 -1
  86. package/dist/index246.js +1 -1
  87. package/dist/index247.js +3 -88
  88. package/dist/index247.js.map +1 -1
  89. package/dist/index248.js +200 -224
  90. package/dist/index248.js.map +1 -1
  91. package/dist/index249.js +105 -246
  92. package/dist/index249.js.map +1 -1
  93. package/dist/index250.js +224 -2
  94. package/dist/index250.js.map +1 -1
  95. package/dist/index251.js +246 -94
  96. package/dist/index251.js.map +1 -1
  97. package/dist/index252.js +2 -200
  98. package/dist/index252.js.map +1 -1
  99. package/dist/index253.js +87 -115
  100. package/dist/index253.js.map +1 -1
  101. package/dist/index26.js +2 -2
  102. package/dist/index30.js +3 -3
  103. package/dist/index32.js +7 -7
  104. package/dist/index34.js +1 -1
  105. package/dist/index36.js +2 -2
  106. package/dist/index38.js +9 -8
  107. package/dist/index38.js.map +1 -1
  108. package/dist/index40.js +1 -1
  109. package/dist/index50.js +1 -1
  110. package/dist/index52.js +1 -1
  111. package/dist/index68.js +5 -5
  112. package/dist/index74.js +1 -1
  113. package/dist/index77.js +2 -2
  114. package/dist/index81.js +4 -4
  115. package/dist/style.css +1 -1
  116. package/package.json +2 -2
@@ -52,10 +52,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
52
52
  }>>>, {
53
53
  width: number;
54
54
  placement: "left" | "right" | "top" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
55
+ padding: number;
55
56
  transitionDuration: number;
56
57
  arrowPadding: number;
57
58
  offset: number;
58
- padding: number;
59
59
  theme: string;
60
60
  }, {}>, Readonly<{
61
61
  activator?: ((props: {
@@ -39,11 +39,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
39
39
  onShown?: (() => any) | undefined;
40
40
  }, {
41
41
  placement: "left" | "right" | "top" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
42
+ padding: number;
42
43
  showClose: boolean;
43
44
  transitionDuration: number;
44
45
  arrowPadding: number;
45
46
  offset: number;
46
- padding: number;
47
47
  theme: string;
48
48
  }, {}>, Readonly<{
49
49
  activator?: ((props: {
@@ -37,10 +37,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
37
37
  transitionDuration: number;
38
38
  }>>>, {
39
39
  placement: "left" | "right" | "top" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
40
+ padding: number;
40
41
  showClose: boolean;
41
42
  transitionDuration: number;
42
43
  arrowPadding: number;
43
- padding: number;
44
44
  theme: string;
45
45
  }, {}>, Readonly<BbTooltipSlots> & BbTooltipSlots>;
46
46
  export default _default;
package/dist/index103.js CHANGED
@@ -6,7 +6,7 @@ import { isNil as x } from "./index122.js";
6
6
  import { isNotNil as he } from "./index126.js";
7
7
  import { useId as _e } from "./index8.js";
8
8
  import { useItemValue as ke } from "./index128.js";
9
- import { when as ge } from "./index201.js";
9
+ import { when as ge } from "./index221.js";
10
10
  import Q from "./index12.js";
11
11
  import "./index13.js";
12
12
  import ve from "./index26.js";
package/dist/index113.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as A, ref as o, computed as E, openBlock as b, createElementBlock as $, mergeProps as D, createElementVNode as i, renderSlot as L, normalizeProps as H, guardReactiveProps as I, unref as s, createBlock as M, Teleport as R, normalizeClass as U, normalizeStyle as j, withCtx as q, createCommentVNode as O } from "vue";
2
- import { useFloating as G, arrow as J } from "./index219.js";
2
+ import { useFloating as G, arrow as J } from "./index208.js";
3
3
  import { useId as K } from "./index8.js";
4
4
  import { wait as P } from "./index124.js";
5
5
  import Q from "./index10.js";
6
6
  import "./index11.js";
7
- import { throttle as v } from "./index213.js";
8
- import { waitFor as W } from "./index215.js";
9
- import { autoUpdate as X, flip as Y, shift as Z } from "./index223.js";
7
+ import { throttle as v } from "./index217.js";
8
+ import { waitFor as W } from "./index213.js";
9
+ import { autoUpdate as X, flip as Y, shift as Z } from "./index215.js";
10
10
  const ee = { class: "bb-tooltip__bubble" }, te = /* @__PURE__ */ i("svg", {
11
11
  fill: "none",
12
12
  viewBox: "0 0 24 24",
package/dist/index119.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as m, getCurrentInstance as d, inject as x, computed as l, ref as y, watchEffect as _, openBlock as b, createElementBlock as h, mergeProps as w } from "vue";
2
- import { isCssColor as z } from "./index200.js";
2
+ import { isCssColor as z } from "./index220.js";
3
3
  const g = ["innerHTML"], $ = /* @__PURE__ */ m({
4
4
  __name: "BbIcon",
5
5
  props: {
package/dist/index12.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as C, ref as b, computed as n, watch as E, openBlock as m, createElementBlock as p, normalizeProps as c, guardReactiveProps as h, mergeProps as f, createCommentVNode as I, createElementVNode as r, renderSlot as F } from "vue";
2
- import { isCssColor as k } from "./index200.js";
3
- import { when as N } from "./index201.js";
4
- import { booleanishToBoolean as S } from "./index202.js";
2
+ import { isCssColor as k } from "./index220.js";
3
+ import { when as N } from "./index221.js";
4
+ import { booleanishToBoolean as S } from "./index222.js";
5
5
  const A = {
6
6
  "aria-hidden": "true",
7
7
  class: "bb-base-checkbox-container"
package/dist/index120.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as v, ref as r, onMounted as p, onBeforeUnmount as h, openBlock as i, createBlock as l, resolveDynamicComponent as u, normalizeStyle as m, withCtx as f, renderSlot as d } from "vue";
2
- import { throttle as g } from "./index213.js";
2
+ import { throttle as g } from "./index217.js";
3
3
  const O = /* @__PURE__ */ v({
4
4
  __name: "BbSmoothHeight",
5
5
  props: {
package/dist/index121.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as m, computed as r, openBlock as a, createElementBlock as d, normalizeProps as u, guardReactiveProps as z, createElementVNode as c } from "vue";
2
- import { isCssColor as f } from "./index200.js";
2
+ import { isCssColor as f } from "./index220.js";
3
3
  const _ = /* @__PURE__ */ c("svg", {
4
4
  viewBox: "0 0 512 512",
5
5
  xmlns: "http://www.w3.org/2000/svg"
package/dist/index133.js CHANGED
@@ -1,5 +1,5 @@
1
- import { toValue as E, useDebounceFn as z, useThrottleFn as Q, tryOnMounted as Y, noop as F, isObject as X, tryOnScopeDispose as j, isClient as $ } from "./index203.js";
2
- import { createFilterWrapper as se, debounceFilter as ae, getLifeCycleTarget as ce, throttleFilter as fe } from "./index203.js";
1
+ import { toValue as E, useDebounceFn as z, useThrottleFn as Q, tryOnMounted as Y, noop as F, isObject as X, tryOnScopeDispose as j, isClient as $ } from "./index219.js";
2
+ import { createFilterWrapper as se, debounceFilter as ae, getLifeCycleTarget as ce, throttleFilter as fe } from "./index219.js";
3
3
  import { ref as T, computed as S, reactive as V, watch as k, watchEffect as q, getCurrentInstance as G, onMounted as J } from "vue";
4
4
  function K(l) {
5
5
  var u;
package/dist/index16.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as Ve, ref as k, computed as p, watch as F, nextTick as U, openBlock as d, createElementBlock as u, mergeProps as Se, createElementVNode as r, createTextVNode as De, toDisplayString as f, unref as y, withDirectives as q, createVNode as V, Transition as S, withCtx as D, vShow as j, createCommentVNode as Y, normalizeClass as g, Fragment as w, renderList as O, renderSlot as G } from "vue";
2
- import i from "./index205.js";
3
- import Me from "./index206.js";
4
- import Ae from "./index207.js";
5
- import xe from "./index208.js";
6
- import Ce from "./index209.js";
7
- import Ye from "./index210.js";
8
- import { groupBy as J } from "./index211.js";
2
+ import i from "./index200.js";
3
+ import Me from "./index201.js";
4
+ import Ae from "./index202.js";
5
+ import xe from "./index203.js";
6
+ import Ce from "./index204.js";
7
+ import Ye from "./index205.js";
8
+ import { groupBy as J } from "./index206.js";
9
9
  import { isNil as Be } from "./index122.js";
10
- import { last as Q } from "./index212.js";
10
+ import { last as Q } from "./index207.js";
11
11
  const Ie = { class: "bb-base-date-picker__header" }, Ee = ["disabled"], Ne = /* @__PURE__ */ r("span", null, null, -1), Te = {
12
12
  "aria-live": "polite",
13
13
  class: "bb-base-date-picker__selected-day-label"
package/dist/index18.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import { defineComponent as ae, ref as n, computed as c, watch as te, openBlock as B, createElementBlock as ne, normalizeClass as O, renderSlot as p, createElementVNode as r, withDirectives as oe, mergeProps as z, unref as m, toDisplayString as L, createBlock as re, Teleport as le, normalizeStyle as ie, createVNode as se, createSlots as ue, renderList as de, withCtx as ce, normalizeProps as pe, guardReactiveProps as me, createCommentVNode as fe } from "vue";
2
- import { useFloating as be } from "./index219.js";
3
- import ve from "./index220.js";
4
- import o from "./index205.js";
5
- import ye from "./index208.js";
6
- import { identity as ge } from "./index204.js";
7
- import { last as he } from "./index212.js";
8
- import { useFocusTrap as ke } from "./index214.js";
2
+ import { useFloating as be } from "./index208.js";
3
+ import ve from "./index209.js";
4
+ import o from "./index200.js";
5
+ import ge from "./index203.js";
6
+ import { identity as ye } from "./index210.js";
7
+ import { last as he } from "./index207.js";
8
+ import { useFocusTrap as ke } from "./index211.js";
9
9
  import { useId as Me } from "./index8.js";
10
- import { vMaska as we } from "./index221.js";
10
+ import { vMaska as we } from "./index212.js";
11
11
  import { wait as Y } from "./index124.js";
12
- import { waitFor as Ve } from "./index215.js";
12
+ import { waitFor as Ve } from "./index213.js";
13
13
  import _e from "./index16.js";
14
14
  import "./index17.js";
15
- import { useMobile as Ye } from "./index222.js";
16
- import { autoUpdate as De, flip as Ae, shift as Se } from "./index223.js";
17
- import { offset as Ce } from "./index224.js";
15
+ import { useMobile as Ye } from "./index214.js";
16
+ import { autoUpdate as De, flip as Ae, shift as Se } from "./index215.js";
17
+ import { offset as Ce } from "./index216.js";
18
18
  const $e = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska", "disabled", "inputmode", "name", "placeholder", "readonly", "value"], Ee = ["disabled"], Be = /* @__PURE__ */ r("svg", {
19
19
  viewBox: "-2 -3 24 24",
20
20
  xmlns: "http://www.w3.org/2000/svg"
@@ -45,7 +45,7 @@ const $e = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska",
45
45
  },
46
46
  emits: ["active", "error", "focus", "inactive", "update:modelValue"],
47
47
  setup(F, { emit: I }) {
48
- o.extend(ve), o.locale(ye);
48
+ o.extend(ve), o.locale(ge);
49
49
  const a = F, l = I, i = n(null), D = n(null), A = n(null), P = n(null), f = n(null), k = n(), b = a.id || `bdpi_${Me().id.value}`, { isMobile: S } = Ye(), W = c(
50
50
  () => a.allowWriting === "not-mobile" && S.value ? "none" : "numeric"
51
51
  ), G = c(() => ({
@@ -72,7 +72,7 @@ const $e = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska",
72
72
  if (e)
73
73
  if (Array.isArray(e)) {
74
74
  let t, s;
75
- return e.length && (t = e[0]), e.length > 1 && (s = he(e)), [t, s].filter(ge).map((h) => o(h).format("DD/MM/YYYY")).join(" - ");
75
+ return e.length && (t = e[0]), e.length > 1 && (s = he(e)), [t, s].filter(ye).map((h) => o(h).format("DD/MM/YYYY")).join(" - ");
76
76
  } else
77
77
  return o(e).format("DD/MM/YYYY");
78
78
  return null;
@@ -86,17 +86,17 @@ const $e = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska",
86
86
  const { floatingStyles: N } = be(A, i, {
87
87
  placement: "bottom",
88
88
  whileElementsMounted: De,
89
- middleware: [Ae(), Ce(5), Se()]
89
+ middleware: [Ae(), Ce(5), Se({ padding: 6 })]
90
90
  }), R = c(() => {
91
91
  const e = {
92
92
  ...N.value
93
93
  };
94
94
  return i.value, e;
95
- }), y = n(!1), M = n(!1), w = n(!1), g = n(!0), U = async () => {
96
- g.value = !1, M.value = !0, await Y(350), M.value = !1, g.value = !1, y.value = !0;
95
+ }), g = n(!1), M = n(!1), w = n(!1), y = n(!0), U = async () => {
96
+ y.value = !1, M.value = !0, await Y(350), M.value = !1, y.value = !1, g.value = !0;
97
97
  }, V = async () => {
98
98
  var e, t;
99
- y.value = !1, w.value = !0, await Y(350), w.value = !1, y.value = !1, g.value = !0, (e = k.value) == null || e.setSelectionModeToDay(), (t = k.value) == null || t.setCursor(a.modelValue);
99
+ g.value = !1, w.value = !0, await Y(350), w.value = !1, g.value = !1, y.value = !0, (e = k.value) == null || e.setSelectionModeToDay(), (t = k.value) == null || t.setCursor(a.modelValue);
100
100
  }, $ = n(!1), E = async () => {
101
101
  $.value = !0, await Ve(() => !!i.value), await U(), q();
102
102
  }, _ = n(!1), { activate: q, deactivate: J } = ke(i, {
@@ -191,10 +191,10 @@ const $e = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska",
191
191
  ref: i,
192
192
  class: O(["bb-base-date-picker-input__calendar", {
193
193
  "bb-base-date-picker-input__calendar--active": u.value,
194
- "bb-base-date-picker-input__calendar--shown": y.value,
194
+ "bb-base-date-picker-input__calendar--shown": g.value,
195
195
  "bb-base-date-picker-input__calendar--showing": M.value,
196
196
  "bb-base-date-picker-input__calendar--hiding": w.value,
197
- "bb-base-date-picker-input__calendar--hidden": g.value
197
+ "bb-base-date-picker-input__calendar--hidden": y.value
198
198
  }]),
199
199
  style: ie(R.value)
200
200
  }, [
@@ -1 +1 @@
1
- {"version":3,"file":"index18.js","sources":["../src/components/BaseDatePickerInput/BaseDatePickerInput.vue"],"sourcesContent":["<template>\n\t<span\n\t\tref=\"outerContainer\"\n\t\tclass=\"bb-base-date-picker-input__container\"\n\t\t:class=\"classes\"\n\t\t@focusin=\"onFocusIn\"\n\t>\n\t\t<slot name=\"prepend-outer\"></slot>\n\t\t<span\n\t\t\tref=\"innerContainer\"\n\t\t\tclass=\"bb-base-date-picker-input__inner-container\"\n\t\t>\n\t\t\t<slot name=\"prepend\"></slot>\n\t\t\t<input\n\t\t\t\t:id=\"id\"\n\t\t\t\tref=\"input\"\n\t\t\t\tv-maska\n\t\t\t\t:aria-describedby=\"`bdpi_description_${id}`\"\n\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:data-maska=\"props.range ? '##/##/#### - ##/##/####' : '##/##/####'\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:inputmode=\"inputmode\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:readonly=\"readonly || range || !allowWriting\"\n\t\t\t\t:type=\"'text'\"\n\t\t\t\t:value=\"displayValue\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t@focus=\"onFocus\"\n\t\t\t/>\n\t\t\t<button\n\t\t\t\tclass=\"bb-base-date-picker-input__calendar-btn\"\n\t\t\t\t:disabled=\"disabled || readonly\"\n\t\t\t\ttype=\"button\"\n\t\t\t\t@click=\"onOpenCalendar\"\n\t\t\t>\n\t\t\t\t<svg viewBox=\"-2 -3 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M18 7V5a1 1 0 0 0-1-1h-1v1a1 1 0 0 1-2 0V4H6v1a1 1 0 1 1-2 0V4H3a1 1 0 0 0-1 1v2zm0 2H2v6a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1zm-2-7h1a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V5a3 3 0 0 1 3-3h1V1a1 1 0 1 1 2 0v1h8V1a1 1 0 0 1 2 0z\"\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<span>{{ accessibleButtonLabel }}</span>\n\t\t\t</button>\n\n\t\t\t<slot name=\"append\"></slot>\n\t\t\t<span\n\t\t\t\t:id=\"`bdpi_description_${id}`\"\n\t\t\t\tclass=\"bb-base-date-picker-input__accessible-description\"\n\t\t\t\t>Formato della data\n\t\t\t\t{{ props.range ? 'GG/MM/AAAA - GG/MM/AAAA' : 'GG/MM/AAAA' }}</span\n\t\t\t>\n\t\t</span>\n\t\t<slot name=\"append-outer\"></slot>\n\t\t<teleport v-if=\"shouldRenderCalendar\" to=\"body\">\n\t\t\t<span\n\t\t\t\tref=\"calendar\"\n\t\t\t\tclass=\"bb-base-date-picker-input__calendar\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t'bb-base-date-picker-input__calendar--active': active,\n\t\t\t\t\t'bb-base-date-picker-input__calendar--shown': shown,\n\t\t\t\t\t'bb-base-date-picker-input__calendar--showing': showing,\n\t\t\t\t\t'bb-base-date-picker-input__calendar--hiding': hiding,\n\t\t\t\t\t'bb-base-date-picker-input__calendar--hidden': hidden,\n\t\t\t\t}\"\n\t\t\t\t:style=\"calendarStyles\"\n\t\t\t>\n\t\t\t\t<BaseDatePicker\n\t\t\t\t\t:id=\"id\"\n\t\t\t\t\tv-bind=\"calendarEventListeners\"\n\t\t\t\t\tref=\"basedatepicker\"\n\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t:first-day-of-week=\"firstDayOfWeek\"\n\t\t\t\t\t:max=\"max\"\n\t\t\t\t\t:min=\"min\"\n\t\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t\t:range=\"range\"\n\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t:selectable=\"selectable\"\n\t\t\t\t>\n\t\t\t\t\t<template v-for=\"(_, name) in $slots\" #[name]=\"data\">\n\t\t\t\t\t\t<slot :name=\"name\" v-bind=\"data\" />\n\t\t\t\t\t</template>\n\t\t\t\t</BaseDatePicker>\n\t\t\t</span>\n\t\t</teleport>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { autoUpdate, flip, offset, shift, useFloating } from '@floating-ui/vue';\nimport { computed, ref, watch } from 'vue';\nimport { default as customParseFormat } from 'dayjs/plugin/customParseFormat';\nimport { Dayjs, default as dayjs } from 'dayjs';\nimport { default as it } from 'dayjs/locale/it';\nimport { identity } from '@/utilities/functions/identity';\nimport { last } from '@/utilities/functions/last';\nimport { useFocusTrap } from '@vueuse/integrations/useFocusTrap';\nimport { useId } from '@/composables/useId';\nimport { vMaska } from 'maska';\nimport { wait } from '@/utilities/functions/wait';\nimport { waitFor } from '@/utilities/functions/waitFor';\nimport BaseDatePicker from '../BaseDatePicker/BaseDatePicker.vue';\nimport type { BaseDatePickerSlots } from '../BaseDatePicker/BaseDatePicker.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\nimport { useMobile } from '@/composables/useMobile';\n\ndayjs.extend(customParseFormat);\ndayjs.locale(it);\n\nexport type BaseDatePickerInputProps = {\n\t/**\n\t * Allows typing into the input.\n\t */\n\tallowWriting?: boolean | 'not-mobile';\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Defines the first day of the week with `0` meaning Sunday and `6` meaning Saturday\n\t */\n\tfirstDayOfWeek?: (typeof it)['weekStart'];\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Maximum selectable date\n\t */\n\tmax?: Date | string | number;\n\n\t/**\n\t * Minimum selectable date\n\t */\n\tmin?: Date | string | number;\n\n\t/**\n\t * Used by v-model. Can be null, a single string, or an array of strings based on whether a range or single date is needed\n\t */\n\tmodelValue: string | string[] | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Selects a range of dates between two dates. It selects all of the days between start and end\n\t */\n\trange?: boolean;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Function that accepts a `Date` object and returns a boolean. `false` meaning the date cannot be selected\n\t * @param date\n\t */\n\tselectable?: (date: Date) => boolean;\n\n\t/**\n\t * Width of the calendar\n\t */\n\twidth?: number | string;\n};\n\nconst props = withDefaults(defineProps<BaseDatePickerInputProps>(), {\n\tallowWriting: true,\n\tautocomplete: 'off',\n\twidth: 290,\n});\n\nexport type BaseDatePickerInputEvents = {\n\t(e: 'active'): void;\n\t(e: 'error', message: string): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'inactive'): void;\n\t(e: 'update:modelValue', value: BaseDatePickerInputProps['modelValue']): void;\n};\n\nconst emit = defineEmits<BaseDatePickerInputEvents>();\n\ndefineSlots<\n\t{\n\t\t'prepend-outer'?: (props: object) => any;\n\t\tprepend?: (props: object) => any;\n\t\tappend?: (props: object) => any;\n\t\t'append-outer'?: (props: object) => any;\n\t} & BaseDatePickerSlots\n>();\n\nconst calendar = ref<HTMLElement | null>(null);\nconst outerContainer = ref<HTMLElement | null>(null);\nconst innerContainer = ref<HTMLElement | null>(null);\nconst input = ref<HTMLElement | null>(null);\nconst inputValue = ref<string | null>(null);\nconst basedatepicker = ref();\nconst id = props.id || `bdpi_${useId().id.value}`;\n\nconst { isMobile } = useMobile();\nconst inputmode = computed(() =>\n\tprops.allowWriting === 'not-mobile' && isMobile.value ? 'none' : 'numeric'\n);\n\nconst classes = computed(() => ({\n\t'bb-base-date-picker-input': true,\n\t'bb-base-date-picker-input--active': active.value,\n\t'bb-base-date-picker-input--errors': props.hasErrors,\n\t'bb-base-date-picker-input--readonly': props.readonly,\n\t'bb-base-date-picker-input--disabled': props.disabled,\n}));\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonInput: (event: Event) => {\n\t\tif (props.range) return;\n\t\tif (event.target instanceof HTMLInputElement) {\n\t\t\tinputValue.value = event.target.value;\n\t\t\tif (/\\d{2}\\/\\d{2}\\/\\d{4}/.test(event.target.value)) {\n\t\t\t\tconst date = dayjs(event.target.value, 'DD/MM/YYYY');\n\t\t\t\tif (!isDateDisabled(date)) {\n\t\t\t\t\temit('update:modelValue', date.toISOString());\n\t\t\t\t} else {\n\t\t\t\t\temit('error', 'invalid_date_typed');\n\t\t\t\t}\n\t\t\t} else if (event.target.value === '') {\n\t\t\t\temit('update:modelValue', null);\n\t\t\t}\n\t\t}\n\t},\n};\n\n/**\n * Applies a class when the user is inside this whole component.\n * We cannot use focus within as it doesn't work for elements that are teleported.\n * Also we cannot use the <input/> if we phisically move focus to the calendar so\n * we track it manually.\n */\nconst active = ref(false);\n\nconst onFocusIn = () => {\n\tif (active.value) return;\n\temit('active');\n\tactive.value = true;\n\tdocument.addEventListener('focusin', onDocumentInteraction);\n\tdocument.addEventListener('click', onDocumentInteraction);\n};\n\nconst onDocumentInteraction = (event: FocusEvent) => {\n\tif (trapIsActive.value) return;\n\tif (event.target instanceof HTMLElement) {\n\t\tif (\n\t\t\t!outerContainer.value?.contains(event.target) &&\n\t\t\t!calendar.value?.contains(event.target)\n\t\t) {\n\t\t\tactive.value = false;\n\t\t\temit('inactive');\n\t\t\tdocument.removeEventListener('focusin', onDocumentInteraction);\n\t\t\tdocument.removeEventListener('click', onDocumentInteraction);\n\t\t}\n\t}\n};\n\nconst getStringFromModelValue = (value: typeof props.modelValue) => {\n\tif (value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tlet head;\n\t\t\tlet tail;\n\t\t\tif (value.length) head = value[0];\n\t\t\tif (value.length > 1) tail = last(value);\n\t\t\treturn [head, tail]\n\t\t\t\t.filter(identity)\n\t\t\t\t.map((el) => dayjs(el).format('DD/MM/YYYY'))\n\t\t\t\t.join(' - ');\n\t\t} else {\n\t\t\treturn dayjs(value).format('DD/MM/YYYY');\n\t\t}\n\t}\n\treturn null;\n};\n\nconst displayValue = computed(() => {\n\tif (inputValue.value) return inputValue.value;\n\treturn getStringFromModelValue(props.modelValue);\n});\n\nwatch(\n\t() => props.modelValue,\n\t(value) => {\n\t\tinputValue.value = getStringFromModelValue(value);\n\t}\n);\n\nconst { floatingStyles } = useFloating(innerContainer, calendar, {\n\tplacement: 'bottom',\n\twhileElementsMounted: autoUpdate,\n\tmiddleware: [flip(), offset(5), shift()],\n});\n\nconst calendarStyles = computed(() => {\n\tconst base: Record<string, any> = {\n\t\t...floatingStyles.value,\n\t};\n\tif (!calendar.value) return base;\n\n\treturn base;\n});\n\n/**\n * We need the transitions because elements must be hidden and shown\n * to accessibility tools when they are fully closed or fully open,\n * while still being animated for sighted users.\n */\n\n// Option panel is open\nconst shown = ref(false);\n// Option panel is opening\nconst showing = ref(false);\n// option panel is closing\nconst hiding = ref(false);\n// Option panel il closed\nconst hidden = ref(true);\n\nconst open = async () => {\n\thidden.value = false;\n\tshowing.value = true;\n\tawait wait(350);\n\tshowing.value = false;\n\n\thidden.value = false;\n\tshown.value = true;\n};\n\nconst close = async () => {\n\tshown.value = false;\n\thiding.value = true;\n\tawait wait(350);\n\thiding.value = false;\n\tshown.value = false;\n\thidden.value = true;\n\tbasedatepicker.value?.setSelectionModeToDay();\n\tbasedatepicker.value?.setCursor(props.modelValue);\n};\n\nconst shouldRenderCalendar = ref(false);\nconst onOpenCalendar = async () => {\n\tshouldRenderCalendar.value = true;\n\tawait waitFor(() => !!calendar.value);\n\tawait open();\n\tactivate();\n};\n\nconst trapIsActive = ref(false);\nconst { activate, deactivate } = useFocusTrap(calendar, {\n\tonActivate: () => (trapIsActive.value = true),\n\t// On post activation focus on current date\n\tonPostActivate: () => {\n\t\tcalendar\n\t\t\t.value!.querySelector<HTMLButtonElement>(\n\t\t\t\t'.bb-base-date-picker-date--current button'\n\t\t\t)\n\t\t\t?.focus();\n\t},\n\tonPostDeactivate: async () => {\n\t\t// Wait for transtion to end and for focus to return before\n\t\tawait wait(200);\n\t\ttrapIsActive.value = false;\n\t},\n\t/* On esc deactivate the trap, return focus and then close the modal */\n\tescapeDeactivates: () => {\n\t\tshouldOpen.value = false;\n\t\tclose();\n\t\treturn true;\n\t},\n\tclickOutsideDeactivates: () => {\n\t\tshouldOpen.value = false;\n\t\tclose();\n\t\treturn true;\n\t},\n\tallowOutsideClick: true,\n});\n\nconst shouldOpen = ref(!props.allowWriting || props.range);\nconst onFocus = async (event: FocusEvent) => {\n\temit('focus', event);\n\tif (shouldOpen.value) onOpenCalendar();\n\tshouldOpen.value =\n\t\t!props.allowWriting ||\n\t\t(props.allowWriting === 'not-mobile' && isMobile.value) ||\n\t\tprops.range;\n};\n\nconst satisfiesSelection = (value: typeof props.modelValue) => {\n\treturn (\n\t\t(props.range && Array.isArray(value) && value.length === 2) ||\n\t\t(!props.range && !!value)\n\t);\n};\n\n/**\n * These events are just propagated\n */\nconst calendarEventListeners = {\n\t'onUpdate:modelValue': (value: string | string[] | null) => {\n\t\temit('update:modelValue', value);\n\t\tif (satisfiesSelection(value)) {\n\t\t\tshouldOpen.value = false;\n\t\t\tdeactivate({ onPostDeactivate: () => close() });\n\t\t}\n\t},\n};\n\nconst accessibleButtonLabel = computed(() => {\n\tif (props.range) {\n\t\tif (!props.modelValue || props.modelValue.length < 2)\n\t\t\treturn `Seleziona un range`;\n\t\tconst start = dayjs(props.modelValue[0]).format('D MMMM YYYY');\n\t\tconst end = dayjs(props.modelValue[1]).format('D MMMM YYYY');\n\t\tif (props.range && props.modelValue.length === 2)\n\t\t\treturn `Cambia selezione, da ${start} a ${end}`;\n\t} else if (typeof props.modelValue === 'string') {\n\t\tconst selected = dayjs(props.modelValue).format('D MMMM YYYY');\n\t\treturn `Cambia selezione, ${selected}`;\n\t}\n\treturn 'Seleziona una data';\n});\n\nconst isDateDisabled = (date: Dayjs) => {\n\tlet passing = true;\n\tif (props.min) {\n\t\tpassing &&= date.isSameOrAfter(dayjs(props.min).startOf('day'));\n\t}\n\tif (props.max) {\n\t\tpassing &&= date.isSameOrBefore(dayjs(props.max).startOf('day'));\n\t}\n\tif (typeof props.selectable === 'function') {\n\t\tpassing &&= props.selectable(date.toDate());\n\t}\n\treturn !passing;\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseDatePickerInput';\n</style>\n"],"names":["dayjs","customParseFormat","it","props","__props","emit","__emit","calendar","ref","outerContainer","innerContainer","input","inputValue","basedatepicker","id","useId","isMobile","useMobile","inputmode","computed","classes","active","eventListeners","event","date","isDateDisabled","onFocusIn","onDocumentInteraction","trapIsActive","_a","_b","getStringFromModelValue","value","head","tail","last","identity","el","displayValue","watch","floatingStyles","useFloating","autoUpdate","flip","offset","shift","calendarStyles","base","shown","showing","hiding","hidden","open","wait","close","shouldRenderCalendar","onOpenCalendar","waitFor","activate","deactivate","useFocusTrap","shouldOpen","onFocus","satisfiesSelection","calendarEventListeners","accessibleButtonLabel","start","end","passing"],"mappings":";;;;;;;;;;;;;;;;;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,EAAK,eAAexB,EAAMG,EAAM,GAAG,EAAE,QAAQ,KAAK,CAAC,IAE5D,OAAOA,EAAM,cAAe,cAC/BiE,UAAYjE,EAAM,WAAWqB,EAAK,OAAQ,CAAA,IAEpC,CAAC4C;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index18.js","sources":["../src/components/BaseDatePickerInput/BaseDatePickerInput.vue"],"sourcesContent":["<template>\n\t<span\n\t\tref=\"outerContainer\"\n\t\tclass=\"bb-base-date-picker-input__container\"\n\t\t:class=\"classes\"\n\t\t@focusin=\"onFocusIn\"\n\t>\n\t\t<slot name=\"prepend-outer\"></slot>\n\t\t<span\n\t\t\tref=\"innerContainer\"\n\t\t\tclass=\"bb-base-date-picker-input__inner-container\"\n\t\t>\n\t\t\t<slot name=\"prepend\"></slot>\n\t\t\t<input\n\t\t\t\t:id=\"id\"\n\t\t\t\tref=\"input\"\n\t\t\t\tv-maska\n\t\t\t\t:aria-describedby=\"`bdpi_description_${id}`\"\n\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:data-maska=\"props.range ? '##/##/#### - ##/##/####' : '##/##/####'\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:inputmode=\"inputmode\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:readonly=\"readonly || range || !allowWriting\"\n\t\t\t\t:type=\"'text'\"\n\t\t\t\t:value=\"displayValue\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t@focus=\"onFocus\"\n\t\t\t/>\n\t\t\t<button\n\t\t\t\tclass=\"bb-base-date-picker-input__calendar-btn\"\n\t\t\t\t:disabled=\"disabled || readonly\"\n\t\t\t\ttype=\"button\"\n\t\t\t\t@click=\"onOpenCalendar\"\n\t\t\t>\n\t\t\t\t<svg viewBox=\"-2 -3 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M18 7V5a1 1 0 0 0-1-1h-1v1a1 1 0 0 1-2 0V4H6v1a1 1 0 1 1-2 0V4H3a1 1 0 0 0-1 1v2zm0 2H2v6a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1zm-2-7h1a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V5a3 3 0 0 1 3-3h1V1a1 1 0 1 1 2 0v1h8V1a1 1 0 0 1 2 0z\"\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<span>{{ accessibleButtonLabel }}</span>\n\t\t\t</button>\n\n\t\t\t<slot name=\"append\"></slot>\n\t\t\t<span\n\t\t\t\t:id=\"`bdpi_description_${id}`\"\n\t\t\t\tclass=\"bb-base-date-picker-input__accessible-description\"\n\t\t\t\t>Formato della data\n\t\t\t\t{{ props.range ? 'GG/MM/AAAA - GG/MM/AAAA' : 'GG/MM/AAAA' }}</span\n\t\t\t>\n\t\t</span>\n\t\t<slot name=\"append-outer\"></slot>\n\t\t<teleport v-if=\"shouldRenderCalendar\" to=\"body\">\n\t\t\t<span\n\t\t\t\tref=\"calendar\"\n\t\t\t\tclass=\"bb-base-date-picker-input__calendar\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t'bb-base-date-picker-input__calendar--active': active,\n\t\t\t\t\t'bb-base-date-picker-input__calendar--shown': shown,\n\t\t\t\t\t'bb-base-date-picker-input__calendar--showing': showing,\n\t\t\t\t\t'bb-base-date-picker-input__calendar--hiding': hiding,\n\t\t\t\t\t'bb-base-date-picker-input__calendar--hidden': hidden,\n\t\t\t\t}\"\n\t\t\t\t:style=\"calendarStyles\"\n\t\t\t>\n\t\t\t\t<BaseDatePicker\n\t\t\t\t\t:id=\"id\"\n\t\t\t\t\tv-bind=\"calendarEventListeners\"\n\t\t\t\t\tref=\"basedatepicker\"\n\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t:first-day-of-week=\"firstDayOfWeek\"\n\t\t\t\t\t:max=\"max\"\n\t\t\t\t\t:min=\"min\"\n\t\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t\t:range=\"range\"\n\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t:selectable=\"selectable\"\n\t\t\t\t>\n\t\t\t\t\t<template v-for=\"(_, name) in $slots\" #[name]=\"data\">\n\t\t\t\t\t\t<slot :name=\"name\" v-bind=\"data\" />\n\t\t\t\t\t</template>\n\t\t\t\t</BaseDatePicker>\n\t\t\t</span>\n\t\t</teleport>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { autoUpdate, flip, offset, shift, useFloating } from '@floating-ui/vue';\nimport { computed, ref, watch } from 'vue';\nimport { default as customParseFormat } from 'dayjs/plugin/customParseFormat';\nimport { Dayjs, default as dayjs } from 'dayjs';\nimport { default as it } from 'dayjs/locale/it';\nimport { identity } from '@/utilities/functions/identity';\nimport { last } from '@/utilities/functions/last';\nimport { useFocusTrap } from '@vueuse/integrations/useFocusTrap';\nimport { useId } from '@/composables/useId';\nimport { vMaska } from 'maska';\nimport { wait } from '@/utilities/functions/wait';\nimport { waitFor } from '@/utilities/functions/waitFor';\nimport BaseDatePicker from '../BaseDatePicker/BaseDatePicker.vue';\nimport type { BaseDatePickerSlots } from '../BaseDatePicker/BaseDatePicker.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\nimport { useMobile } from '@/composables/useMobile';\n\ndayjs.extend(customParseFormat);\ndayjs.locale(it);\n\nexport type BaseDatePickerInputProps = {\n\t/**\n\t * Allows typing into the input.\n\t */\n\tallowWriting?: boolean | 'not-mobile';\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Defines the first day of the week with `0` meaning Sunday and `6` meaning Saturday\n\t */\n\tfirstDayOfWeek?: (typeof it)['weekStart'];\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Maximum selectable date\n\t */\n\tmax?: Date | string | number;\n\n\t/**\n\t * Minimum selectable date\n\t */\n\tmin?: Date | string | number;\n\n\t/**\n\t * Used by v-model. Can be null, a single string, or an array of strings based on whether a range or single date is needed\n\t */\n\tmodelValue: string | string[] | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Selects a range of dates between two dates. It selects all of the days between start and end\n\t */\n\trange?: boolean;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Function that accepts a `Date` object and returns a boolean. `false` meaning the date cannot be selected\n\t * @param date\n\t */\n\tselectable?: (date: Date) => boolean;\n\n\t/**\n\t * Width of the calendar\n\t */\n\twidth?: number | string;\n};\n\nconst props = withDefaults(defineProps<BaseDatePickerInputProps>(), {\n\tallowWriting: true,\n\tautocomplete: 'off',\n\twidth: 290,\n});\n\nexport type BaseDatePickerInputEvents = {\n\t(e: 'active'): void;\n\t(e: 'error', message: string): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'inactive'): void;\n\t(e: 'update:modelValue', value: BaseDatePickerInputProps['modelValue']): void;\n};\n\nconst emit = defineEmits<BaseDatePickerInputEvents>();\n\ndefineSlots<\n\t{\n\t\t'prepend-outer'?: (props: object) => any;\n\t\tprepend?: (props: object) => any;\n\t\tappend?: (props: object) => any;\n\t\t'append-outer'?: (props: object) => any;\n\t} & BaseDatePickerSlots\n>();\n\nconst calendar = ref<HTMLElement | null>(null);\nconst outerContainer = ref<HTMLElement | null>(null);\nconst innerContainer = ref<HTMLElement | null>(null);\nconst input = ref<HTMLElement | null>(null);\nconst inputValue = ref<string | null>(null);\nconst basedatepicker = ref();\nconst id = props.id || `bdpi_${useId().id.value}`;\n\nconst { isMobile } = useMobile();\nconst inputmode = computed(() =>\n\tprops.allowWriting === 'not-mobile' && isMobile.value ? 'none' : 'numeric'\n);\n\nconst classes = computed(() => ({\n\t'bb-base-date-picker-input': true,\n\t'bb-base-date-picker-input--active': active.value,\n\t'bb-base-date-picker-input--errors': props.hasErrors,\n\t'bb-base-date-picker-input--readonly': props.readonly,\n\t'bb-base-date-picker-input--disabled': props.disabled,\n}));\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonInput: (event: Event) => {\n\t\tif (props.range) return;\n\t\tif (event.target instanceof HTMLInputElement) {\n\t\t\tinputValue.value = event.target.value;\n\t\t\tif (/\\d{2}\\/\\d{2}\\/\\d{4}/.test(event.target.value)) {\n\t\t\t\tconst date = dayjs(event.target.value, 'DD/MM/YYYY');\n\t\t\t\tif (!isDateDisabled(date)) {\n\t\t\t\t\temit('update:modelValue', date.toISOString());\n\t\t\t\t} else {\n\t\t\t\t\temit('error', 'invalid_date_typed');\n\t\t\t\t}\n\t\t\t} else if (event.target.value === '') {\n\t\t\t\temit('update:modelValue', null);\n\t\t\t}\n\t\t}\n\t},\n};\n\n/**\n * Applies a class when the user is inside this whole component.\n * We cannot use focus within as it doesn't work for elements that are teleported.\n * Also we cannot use the <input/> if we phisically move focus to the calendar so\n * we track it manually.\n */\nconst active = ref(false);\n\nconst onFocusIn = () => {\n\tif (active.value) return;\n\temit('active');\n\tactive.value = true;\n\tdocument.addEventListener('focusin', onDocumentInteraction);\n\tdocument.addEventListener('click', onDocumentInteraction);\n};\n\nconst onDocumentInteraction = (event: FocusEvent) => {\n\tif (trapIsActive.value) return;\n\tif (event.target instanceof HTMLElement) {\n\t\tif (\n\t\t\t!outerContainer.value?.contains(event.target) &&\n\t\t\t!calendar.value?.contains(event.target)\n\t\t) {\n\t\t\tactive.value = false;\n\t\t\temit('inactive');\n\t\t\tdocument.removeEventListener('focusin', onDocumentInteraction);\n\t\t\tdocument.removeEventListener('click', onDocumentInteraction);\n\t\t}\n\t}\n};\n\nconst getStringFromModelValue = (value: typeof props.modelValue) => {\n\tif (value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tlet head;\n\t\t\tlet tail;\n\t\t\tif (value.length) head = value[0];\n\t\t\tif (value.length > 1) tail = last(value);\n\t\t\treturn [head, tail]\n\t\t\t\t.filter(identity)\n\t\t\t\t.map((el) => dayjs(el).format('DD/MM/YYYY'))\n\t\t\t\t.join(' - ');\n\t\t} else {\n\t\t\treturn dayjs(value).format('DD/MM/YYYY');\n\t\t}\n\t}\n\treturn null;\n};\n\nconst displayValue = computed(() => {\n\tif (inputValue.value) return inputValue.value;\n\treturn getStringFromModelValue(props.modelValue);\n});\n\nwatch(\n\t() => props.modelValue,\n\t(value) => {\n\t\tinputValue.value = getStringFromModelValue(value);\n\t}\n);\n\nconst { floatingStyles } = useFloating(innerContainer, calendar, {\n\tplacement: 'bottom',\n\twhileElementsMounted: autoUpdate,\n\tmiddleware: [flip(), offset(5), shift({ padding: 6 })],\n});\n\nconst calendarStyles = computed(() => {\n\tconst base: Record<string, any> = {\n\t\t...floatingStyles.value,\n\t};\n\tif (!calendar.value) return base;\n\n\treturn base;\n});\n\n/**\n * We need the transitions because elements must be hidden and shown\n * to accessibility tools when they are fully closed or fully open,\n * while still being animated for sighted users.\n */\n\n// Option panel is open\nconst shown = ref(false);\n// Option panel is opening\nconst showing = ref(false);\n// option panel is closing\nconst hiding = ref(false);\n// Option panel il closed\nconst hidden = ref(true);\n\nconst open = async () => {\n\thidden.value = false;\n\tshowing.value = true;\n\tawait wait(350);\n\tshowing.value = false;\n\n\thidden.value = false;\n\tshown.value = true;\n};\n\nconst close = async () => {\n\tshown.value = false;\n\thiding.value = true;\n\tawait wait(350);\n\thiding.value = false;\n\tshown.value = false;\n\thidden.value = true;\n\tbasedatepicker.value?.setSelectionModeToDay();\n\tbasedatepicker.value?.setCursor(props.modelValue);\n};\n\nconst shouldRenderCalendar = ref(false);\nconst onOpenCalendar = async () => {\n\tshouldRenderCalendar.value = true;\n\tawait waitFor(() => !!calendar.value);\n\tawait open();\n\tactivate();\n};\n\nconst trapIsActive = ref(false);\nconst { activate, deactivate } = useFocusTrap(calendar, {\n\tonActivate: () => (trapIsActive.value = true),\n\t// On post activation focus on current date\n\tonPostActivate: () => {\n\t\tcalendar\n\t\t\t.value!.querySelector<HTMLButtonElement>(\n\t\t\t\t'.bb-base-date-picker-date--current button'\n\t\t\t)\n\t\t\t?.focus();\n\t},\n\tonPostDeactivate: async () => {\n\t\t// Wait for transtion to end and for focus to return before\n\t\tawait wait(200);\n\t\ttrapIsActive.value = false;\n\t},\n\t/* On esc deactivate the trap, return focus and then close the modal */\n\tescapeDeactivates: () => {\n\t\tshouldOpen.value = false;\n\t\tclose();\n\t\treturn true;\n\t},\n\tclickOutsideDeactivates: () => {\n\t\tshouldOpen.value = false;\n\t\tclose();\n\t\treturn true;\n\t},\n\tallowOutsideClick: true,\n});\n\nconst shouldOpen = ref(!props.allowWriting || props.range);\nconst onFocus = async (event: FocusEvent) => {\n\temit('focus', event);\n\tif (shouldOpen.value) onOpenCalendar();\n\tshouldOpen.value =\n\t\t!props.allowWriting ||\n\t\t(props.allowWriting === 'not-mobile' && isMobile.value) ||\n\t\tprops.range;\n};\n\nconst satisfiesSelection = (value: typeof props.modelValue) => {\n\treturn (\n\t\t(props.range && Array.isArray(value) && value.length === 2) ||\n\t\t(!props.range && !!value)\n\t);\n};\n\n/**\n * These events are just propagated\n */\nconst calendarEventListeners = {\n\t'onUpdate:modelValue': (value: string | string[] | null) => {\n\t\temit('update:modelValue', value);\n\t\tif (satisfiesSelection(value)) {\n\t\t\tshouldOpen.value = false;\n\t\t\tdeactivate({ onPostDeactivate: () => close() });\n\t\t}\n\t},\n};\n\nconst accessibleButtonLabel = computed(() => {\n\tif (props.range) {\n\t\tif (!props.modelValue || props.modelValue.length < 2)\n\t\t\treturn `Seleziona un range`;\n\t\tconst start = dayjs(props.modelValue[0]).format('D MMMM YYYY');\n\t\tconst end = dayjs(props.modelValue[1]).format('D MMMM YYYY');\n\t\tif (props.range && props.modelValue.length === 2)\n\t\t\treturn `Cambia selezione, da ${start} a ${end}`;\n\t} else if (typeof props.modelValue === 'string') {\n\t\tconst selected = dayjs(props.modelValue).format('D MMMM YYYY');\n\t\treturn `Cambia selezione, ${selected}`;\n\t}\n\treturn 'Seleziona una data';\n});\n\nconst isDateDisabled = (date: Dayjs) => {\n\tlet passing = true;\n\tif (props.min) {\n\t\tpassing &&= date.isSameOrAfter(dayjs(props.min).startOf('day'));\n\t}\n\tif (props.max) {\n\t\tpassing &&= date.isSameOrBefore(dayjs(props.max).startOf('day'));\n\t}\n\tif (typeof props.selectable === 'function') {\n\t\tpassing &&= props.selectable(date.toDate());\n\t}\n\treturn !passing;\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseDatePickerInput';\n</style>\n"],"names":["dayjs","customParseFormat","it","props","__props","emit","__emit","calendar","ref","outerContainer","innerContainer","input","inputValue","basedatepicker","id","useId","isMobile","useMobile","inputmode","computed","classes","active","eventListeners","event","date","isDateDisabled","onFocusIn","onDocumentInteraction","trapIsActive","_a","_b","getStringFromModelValue","value","head","tail","last","identity","el","displayValue","watch","floatingStyles","useFloating","autoUpdate","flip","offset","shift","calendarStyles","base","shown","showing","hiding","hidden","open","wait","close","shouldRenderCalendar","onOpenCalendar","waitFor","activate","deactivate","useFocusTrap","shouldOpen","onFocus","satisfiesSelection","calendarEventListeners","accessibleButtonLabel","start","end","passing"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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C,EAAK,eAAexB,EAAMG,EAAM,GAAG,EAAE,QAAQ,KAAK,CAAC,IAE5D,OAAOA,EAAM,cAAe,cAC/BiE,UAAYjE,EAAM,WAAWqB,EAAK,OAAQ,CAAA,IAEpC,CAAC4C;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index199.js CHANGED
@@ -1,4 +1,4 @@
1
- import { commonjsGlobal as f, getDefaultExportFromCjs as $ } from "./index239.js";
1
+ import { commonjsGlobal as f, getDefaultExportFromCjs as $ } from "./index237.js";
2
2
  var D = "Expected a function", O = "__lodash_hash_undefined__", j = 1 / 0, F = "[object Function]", N = "[object GeneratorFunction]", H = "[object Symbol]", G = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, R = /^\w*$/, A = /^\./, M = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, K = /[\\^$.*+?()[\]{}|]/g, L = /\\(\\)?/g, z = /^\[object .+?Constructor\]$/, U = typeof f == "object" && f && f.Object === Object && f, q = typeof self == "object" && self && self.Object === Object && self, d = U || q || Function("return this")();
3
3
  function J(t, e) {
4
4
  return t == null ? void 0 : t[e];
package/dist/index20.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as oe, ref as o, getCurrentInstance as ae, computed as m, nextTick as R, useAttrs as se, onMounted as ne, onBeforeUnmount as G, watch as ie, openBlock as w, createBlock as re, Teleport as ue, createElementVNode as a, mergeProps as K, createElementBlock as H, renderSlot as r, createTextVNode as de, toDisplayString as T, createCommentVNode as $ } from "vue";
2
- import { throttle as ce } from "./index213.js";
3
- import { useFocusTrap as ve } from "./index214.js";
2
+ import { throttle as ce } from "./index217.js";
3
+ import { useFocusTrap as ve } from "./index211.js";
4
4
  import { useId as P } from "./index8.js";
5
5
  import { wait as L } from "./index124.js";
6
- import { waitFor as be } from "./index215.js";
7
- import { useModalsState as k } from "./index216.js";
6
+ import { waitFor as be } from "./index213.js";
7
+ import { useModalsState as k } from "./index218.js";
8
8
  const fe = { class: "bb-base-dialog-close" }, pe = { class: "bb-base-dialog-close__content" }, me = { class: "bb-base-dialog-close__label" }, ge = /* @__PURE__ */ a("span", { class: "bb-base-dialog-close__icon" }, [
9
9
  /* @__PURE__ */ a("svg", {
10
10
  "aria-hidden": "true",
package/dist/index200.js CHANGED
@@ -1,5 +1,8 @@
1
- const s = (r) => !!r && !!r.match(/^(#|var\(--|(rgb|hsl)a?\()/);
1
+ import { getDefaultExportFromCjs as r } from "./index237.js";
2
+ import { __require as o } from "./index236.js";
3
+ var t = o();
4
+ const s = /* @__PURE__ */ r(t);
2
5
  export {
3
- s as isCssColor
6
+ s as default
4
7
  };
5
8
  //# sourceMappingURL=index200.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index200.js","sources":["../src/utilities/functions/isCssColor.ts"],"sourcesContent":["/**\n * Taken from vuetify colorable mixin\n * https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/mixins/colorable/index.ts\n */\nexport const isCssColor = (color: string): boolean => {\n\treturn !!color && !!color.match(/^(#|var\\(--|(rgb|hsl)a?\\()/);\n};\n"],"names":["isCssColor","color"],"mappings":"AAIa,MAAAA,IAAa,CAACC,MACnB,CAAC,CAACA,KAAS,CAAC,CAACA,EAAM,MAAM,4BAA4B;"}
1
+ {"version":3,"file":"index200.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
package/dist/index201.js CHANGED
@@ -1,7 +1,19 @@
1
- import { curry as e } from "./index237.js";
2
- const t = (n, o, r) => n(r) ? o(r) : r, s = e(t);
1
+ import { getDefaultExportFromCjs as f, commonjsGlobal as n } from "./index237.js";
2
+ import { __module as e } from "./index239.js";
3
+ (function(s, a) {
4
+ (function(i, t) {
5
+ s.exports = t();
6
+ })(n, function() {
7
+ return function(i, t) {
8
+ t.prototype.isSameOrAfter = function(r, o) {
9
+ return this.isSame(r, o) || this.isAfter(r, o);
10
+ };
11
+ };
12
+ });
13
+ })(e);
14
+ var m = e.exports;
15
+ const c = /* @__PURE__ */ f(m);
3
16
  export {
4
- t as baseWhen,
5
- s as when
17
+ c as default
6
18
  };
7
19
  //# sourceMappingURL=index201.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index201.js","sources":["../src/utilities/functions/when.ts"],"sourcesContent":["import { curry } from './curry';\n/**\n * Runs fn on item if iteratee(item) is thruthy\n * @param iteratee The test\n * @param item The item to test\n * @param fn The transformer function\n * @returns\n */\nexport const baseWhen = <T, U>(\n\titeratee: (item: T) => boolean,\n\tfn: (item: T) => U,\n\titem: T\n) => {\n\tif (iteratee(item)) return fn(item);\n\treturn item;\n};\n\nexport const when = curry(baseWhen);\n"],"names":["baseWhen","iteratee","fn","item","when","curry"],"mappings":";AAQO,MAAMA,IAAW,CACvBC,GACAC,GACAC,MAEIF,EAASE,CAAI,IAAUD,EAAGC,CAAI,IAC3BA,GAGKC,IAAOC,EAAML,CAAQ;"}
1
+ {"version":3,"file":"index201.js","sources":["../node_modules/dayjs/plugin/isSameOrAfter.js"],"sourcesContent":["!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isSameOrAfter=t()}(this,(function(){\"use strict\";return function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)}}}));"],"names":["e","module","this","t"],"mappings":";;;AAAA,GAAC,SAASA,GAAE,GAAE;AAAsD,IAAAC,EAAe,UAAA,EAAwI;AAAA,EAAA,GAAEC,GAAM,WAAU;AAAc,WAAO,SAASF,GAAE,GAAE;AAAC,QAAE,UAAU,gBAAc,SAASA,GAAEG,GAAE;AAAC,eAAO,KAAK,OAAOH,GAAEG,CAAC,KAAG,KAAK,QAAQH,GAAEG,CAAC;AAAA,MAAC;AAAA,IAAC;AAAA,EAAC,CAAC;;;;","x_google_ignoreList":[0]}
package/dist/index202.js CHANGED
@@ -1,5 +1,19 @@
1
- const o = (e) => typeof e == "boolean" ? e : e === "true";
1
+ import { getDefaultExportFromCjs as i, commonjsGlobal as n } from "./index237.js";
2
+ import { __module as t } from "./index240.js";
3
+ (function(s, a) {
4
+ (function(f, o) {
5
+ s.exports = o();
6
+ })(n, function() {
7
+ return function(f, o) {
8
+ o.prototype.isSameOrBefore = function(e, r) {
9
+ return this.isSame(e, r) || this.isBefore(e, r);
10
+ };
11
+ };
12
+ });
13
+ })(t);
14
+ var m = t.exports;
15
+ const c = /* @__PURE__ */ i(m);
2
16
  export {
3
- o as booleanishToBoolean
17
+ c as default
4
18
  };
5
19
  //# sourceMappingURL=index202.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index202.js","sources":["../src/utilities/functions/booleanishToBoolean.ts"],"sourcesContent":["/**\n * Accepts a booleanish input and returns a boolean value\n * @param input booleanish input\n * @returns\n */\nexport const booleanishToBoolean = (input: boolean | 'true' | 'false') => {\n\tif (typeof input === 'boolean') return input;\n\telse return input === 'true';\n};\n"],"names":["booleanishToBoolean","input"],"mappings":"AAKa,MAAAA,IAAsB,CAACC,MAC/B,OAAOA,KAAU,YAAkBA,IAC3BA,MAAU;"}
1
+ {"version":3,"file":"index202.js","sources":["../node_modules/dayjs/plugin/isSameOrBefore.js"],"sourcesContent":["!function(e,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isSameOrBefore=i()}(this,(function(){\"use strict\";return function(e,i){i.prototype.isSameOrBefore=function(e,i){return this.isSame(e,i)||this.isBefore(e,i)}}}));"],"names":["e","i","module","this"],"mappings":";;;AAAA,GAAC,SAASA,GAAEC,GAAE;AAAsD,IAAAC,EAAe,UAAAD,EAAyI;AAAA,EAAA,GAAEE,GAAM,WAAU;AAAc,WAAO,SAASH,GAAEC,GAAE;AAAC,MAAAA,EAAE,UAAU,iBAAe,SAAS,GAAEA,GAAE;AAAC,eAAO,KAAK,OAAO,GAAEA,CAAC,KAAG,KAAK,SAAS,GAAEA,CAAC;AAAA,MAAC;AAAA,IAAC;AAAA,EAAC,CAAC;;;;","x_google_ignoreList":[0]}
package/dist/index203.js CHANGED
@@ -1,82 +1,22 @@
1
- import { getCurrentScope as D, onScopeDispose as g, unref as j, onMounted as x, nextTick as S, getCurrentInstance as O } from "vue";
2
- function k(e) {
3
- return D() ? (g(e), !0) : !1;
4
- }
5
- function T(e) {
6
- return typeof e == "function" ? e() : j(e);
7
- }
8
- const G = typeof window < "u" && typeof document < "u";
9
- typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
10
- const C = Object.prototype.toString, L = (e) => C.call(e) === "[object Object]", m = () => {
11
- };
12
- function h(e, r) {
13
- function n(...t) {
14
- return new Promise((i, o) => {
15
- Promise.resolve(e(() => r.apply(this, t), { fn: r, thisArg: this, args: t })).then(i).catch(o);
16
- });
17
- }
18
- return n;
19
- }
20
- function F(e, r = {}) {
21
- let n, t, i = m;
22
- const o = (u) => {
23
- clearTimeout(u), i(), i = m;
24
- };
25
- return (u) => {
26
- const l = T(e), c = T(r.maxWait);
27
- return n && o(n), l <= 0 || c !== void 0 && c <= 0 ? (t && (o(t), t = null), Promise.resolve(u())) : new Promise((a, p) => {
28
- i = r.rejectOnCancel ? p : a, c && !t && (t = setTimeout(() => {
29
- n && o(n), t = null, a(u());
30
- }, c)), n = setTimeout(() => {
31
- t && o(t), t = null, a(u());
32
- }, l);
33
- });
34
- };
35
- }
36
- function P(e, r = !0, n = !0, t = !1) {
37
- let i = 0, o, s = !0, u = m, l;
38
- const c = () => {
39
- o && (clearTimeout(o), o = void 0, u(), u = m);
40
- };
41
- return (p) => {
42
- const f = T(e), w = Date.now() - i, d = () => l = p();
43
- return c(), f <= 0 ? (i = Date.now(), d()) : (w > f && (n || !s) ? (i = Date.now(), d()) : r && (l = new Promise((b, y) => {
44
- u = t ? y : b, o = setTimeout(() => {
45
- i = Date.now(), s = !0, b(d()), c();
46
- }, Math.max(0, f - w));
47
- })), !n && !o && (o = setTimeout(() => s = !0, f)), s = !1, l);
48
- };
49
- }
50
- function W(e) {
51
- return e || O();
52
- }
53
- function R(e, r = 200, n = {}) {
54
- return h(
55
- F(r, n),
56
- e
57
- );
58
- }
59
- function V(e, r = 200, n = !1, t = !0, i = !1) {
60
- return h(
61
- P(r, n, t, i),
62
- e
63
- );
64
- }
65
- function A(e, r = !0, n) {
66
- W() ? x(e, n) : r ? e() : S(e);
67
- }
1
+ import { getDefaultExportFromCjs as i, commonjsGlobal as m } from "./index237.js";
2
+ import { __module as _ } from "./index241.js";
3
+ import { __require as s } from "./index236.js";
4
+ (function(n, d) {
5
+ (function(t, o) {
6
+ n.exports = o(s());
7
+ })(m, function(t) {
8
+ function o(e) {
9
+ return e && typeof e == "object" && "default" in e ? e : { default: e };
10
+ }
11
+ var a = o(t), r = { name: "it", weekdays: "domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"), weekdaysShort: "dom_lun_mar_mer_gio_ven_sab".split("_"), weekdaysMin: "do_lu_ma_me_gi_ve_sa".split("_"), months: "gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"), weekStart: 1, monthsShort: "gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"), formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd D MMMM YYYY HH:mm" }, relativeTime: { future: "tra %s", past: "%s fa", s: "qualche secondo", m: "un minuto", mm: "%d minuti", h: "un' ora", hh: "%d ore", d: "un giorno", dd: "%d giorni", M: "un mese", MM: "%d mesi", y: "un anno", yy: "%d anni" }, ordinal: function(e) {
12
+ return e + "º";
13
+ } };
14
+ return a.default.locale(r, null, !0), r;
15
+ });
16
+ })(_);
17
+ var u = _.exports;
18
+ const p = /* @__PURE__ */ i(u);
68
19
  export {
69
- h as createFilterWrapper,
70
- F as debounceFilter,
71
- W as getLifeCycleTarget,
72
- G as isClient,
73
- L as isObject,
74
- m as noop,
75
- P as throttleFilter,
76
- T as toValue,
77
- A as tryOnMounted,
78
- k as tryOnScopeDispose,
79
- R as useDebounceFn,
80
- V as useThrottleFn
20
+ p as default
81
21
  };
82
22
  //# sourceMappingURL=index203.js.map