@adyen/bento-vue3 1.108.2 → 1.108.3

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 (92) hide show
  1. package/dist/assets/accordion-item.css +1 -1
  2. package/dist/assets/action-bar.css +1 -1
  3. package/dist/assets/base-modal.css +1 -1
  4. package/dist/assets/button-actions.css +1 -1
  5. package/dist/assets/calendar.css +1 -1
  6. package/dist/assets/card.css +1 -1
  7. package/dist/assets/data-grid.css +1 -1
  8. package/dist/assets/date-range-picker.css +1 -1
  9. package/dist/assets/dialog-page.css +1 -1
  10. package/dist/assets/file-uploader.css +1 -1
  11. package/dist/assets/input-time.css +1 -1
  12. package/dist/assets/inspector.css +1 -1
  13. package/dist/assets/modal-fullscreen.css +1 -1
  14. package/dist/assets/navigation-menu-group.css +1 -1
  15. package/dist/assets/secondary-nav.css +1 -1
  16. package/dist/assets/selection-card-group.css +1 -1
  17. package/dist/assets/sidepanel.css +1 -1
  18. package/dist/assets/textarea.css +1 -1
  19. package/dist/checkbox.js +2 -2
  20. package/dist/chunks/{calendar.BHBrXP7_.js → calendar.BZBxMz2J.js} +321 -318
  21. package/dist/chunks/calendar.BZBxMz2J.js.map +1 -0
  22. package/dist/chunks/{checkbox-group.BGEBpE4D.js → checkbox-group.BRmJOdie.js} +2 -2
  23. package/dist/chunks/{checkbox-group.BGEBpE4D.js.map → checkbox-group.BRmJOdie.js.map} +1 -1
  24. package/dist/chunks/{checkbox.D79gPqfo.js → checkbox.BlFFZ9sQ.js} +14 -14
  25. package/dist/chunks/{checkbox.D79gPqfo.js.map → checkbox.BlFFZ9sQ.js.map} +1 -1
  26. package/dist/chunks/{code-snippet.DIg7oTE6.js → code-snippet.bQFbKfA8.js} +2 -2
  27. package/dist/chunks/{code-snippet.DIg7oTE6.js.map → code-snippet.bQFbKfA8.js.map} +1 -1
  28. package/dist/chunks/{data-grid.DiB9ClKW.js → data-grid.DujCIIF6.js} +6 -6
  29. package/dist/chunks/{data-grid.DiB9ClKW.js.map → data-grid.DujCIIF6.js.map} +1 -1
  30. package/dist/chunks/{date-picker.81ASPpns.js → date-picker.DjxBw6Ur.js} +8 -8
  31. package/dist/chunks/{date-picker.81ASPpns.js.map → date-picker.DjxBw6Ur.js.map} +1 -1
  32. package/dist/chunks/{date-range-picker.CFjZwUb_.js → date-range-picker.BU9R2jNa.js} +425 -414
  33. package/dist/chunks/date-range-picker.BU9R2jNa.js.map +1 -0
  34. package/dist/chunks/{dropdown-tag.7plhjvUU.js → dropdown-tag.B8nYIdkZ.js} +2 -2
  35. package/dist/chunks/{dropdown-tag.7plhjvUU.js.map → dropdown-tag.B8nYIdkZ.js.map} +1 -1
  36. package/dist/chunks/{dropdown.ByQDIs7p.js → dropdown.DIuBwxF-.js} +43 -43
  37. package/dist/chunks/{dropdown.ByQDIs7p.js.map → dropdown.DIuBwxF-.js.map} +1 -1
  38. package/dist/chunks/{filter-bar.C1fDfEQj.js → filter-bar.C2THG1iA.js} +9 -9
  39. package/dist/chunks/{filter-bar.C1fDfEQj.js.map → filter-bar.C2THG1iA.js.map} +1 -1
  40. package/dist/chunks/{header-with-views.ChAss37D.js → header-with-views.CwEcK_6P.js} +4 -4
  41. package/dist/chunks/{header-with-views.ChAss37D.js.map → header-with-views.CwEcK_6P.js.map} +1 -1
  42. package/dist/chunks/{input-field-password.B3d1f64g.js → input-field-password.LCZamdFv.js} +2 -2
  43. package/dist/chunks/{input-field-password.B3d1f64g.js.map → input-field-password.LCZamdFv.js.map} +1 -1
  44. package/dist/chunks/{input-field-phone-number.DF6mnD7K.js → input-field-phone-number.CzOJ82aH.js} +2 -2
  45. package/dist/chunks/{input-field-phone-number.DF6mnD7K.js.map → input-field-phone-number.CzOJ82aH.js.map} +1 -1
  46. package/dist/chunks/{input-field.CG5dopgq.js → input-field.CuZNoZOd.js} +2 -2
  47. package/dist/chunks/{input-field.CG5dopgq.js.map → input-field.CuZNoZOd.js.map} +1 -1
  48. package/dist/chunks/{input-time.U4n485N0.js → input-time.DT_ivIBv.js} +40 -39
  49. package/dist/chunks/input-time.DT_ivIBv.js.map +1 -0
  50. package/dist/chunks/{pagination.o-BWToPt.js → pagination.DcJYeAN4.js} +2 -2
  51. package/dist/chunks/{pagination.o-BWToPt.js.map → pagination.DcJYeAN4.js.map} +1 -1
  52. package/dist/chunks/{rich-text-editor.C_YFAC_Z.js → rich-text-editor.DRe01q0o.js} +2 -2
  53. package/dist/chunks/{rich-text-editor.C_YFAC_Z.js.map → rich-text-editor.DRe01q0o.js.map} +1 -1
  54. package/dist/chunks/{search-bar.Bw7rMy3B.js → search-bar.B3NyMQTb.js} +3 -3
  55. package/dist/chunks/{search-bar.Bw7rMy3B.js.map → search-bar.B3NyMQTb.js.map} +1 -1
  56. package/dist/chunks/{secondary-nav.xM1xXQmI.js → secondary-nav.CtrLRB5d.js} +2 -2
  57. package/dist/chunks/{secondary-nav.xM1xXQmI.js.map → secondary-nav.CtrLRB5d.js.map} +1 -1
  58. package/dist/chunks/{selection-card-group.DGVasyKy.js → selection-card-group.BsDPDAea.js} +81 -80
  59. package/dist/chunks/{selection-card-group.DGVasyKy.js.map → selection-card-group.BsDPDAea.js.map} +1 -1
  60. package/dist/chunks/{textarea.TOBR_UYN.js → textarea.C4IHcY2Q.js} +3 -3
  61. package/dist/chunks/textarea.C4IHcY2Q.js.map +1 -0
  62. package/dist/chunks/{timeline-item.B1IhRV3t.js → timeline-item.DuwEXAe5.js} +2 -2
  63. package/dist/chunks/{timeline-item.B1IhRV3t.js.map → timeline-item.DuwEXAe5.js.map} +1 -1
  64. package/dist/chunks/{use-date-input-formatter.BWGtdqki.js → use-date-input-formatter.BOgLVtWE.js} +2 -2
  65. package/dist/chunks/{use-date-input-formatter.BWGtdqki.js.map → use-date-input-formatter.BOgLVtWE.js.map} +1 -1
  66. package/dist/code-snippet.js +1 -1
  67. package/dist/data-grid.js +1 -1
  68. package/dist/date-picker.js +2 -2
  69. package/dist/date-range-picker.js +2 -2
  70. package/dist/date-time-picker.js +4 -4
  71. package/dist/dropdown.js +2 -2
  72. package/dist/filter-bar.js +1 -1
  73. package/dist/header-with-views.js +1 -1
  74. package/dist/index.js +22 -22
  75. package/dist/input-field-password.js +1 -1
  76. package/dist/input-field-phone-number.js +1 -1
  77. package/dist/input-field.js +1 -1
  78. package/dist/input-time.js +1 -1
  79. package/dist/internal.js +2 -2
  80. package/dist/pagination.js +1 -1
  81. package/dist/rich-text-editor.js +1 -1
  82. package/dist/search-bar.js +2 -2
  83. package/dist/secondary-nav.js +1 -1
  84. package/dist/selection-card.js +1 -1
  85. package/dist/textarea.js +1 -1
  86. package/dist/timeline.js +1 -1
  87. package/dist/web-types.json +1 -1
  88. package/package.json +2 -2
  89. package/dist/chunks/calendar.BHBrXP7_.js.map +0 -1
  90. package/dist/chunks/date-range-picker.CFjZwUb_.js.map +0 -1
  91. package/dist/chunks/input-time.U4n485N0.js.map +0 -1
  92. package/dist/chunks/textarea.TOBR_UYN.js.map +0 -1
@@ -1,64 +1,64 @@
1
- import { defineComponent as ze, computed as m, openBlock as w, createBlock as _, unref as u, withCtx as X, createVNode as L, mergeProps as je, createCommentVNode as I, reactive as Ye, useSlots as Ea, ref as F, onMounted as ma, createElementBlock as Me, createElementVNode as re, normalizeClass as Da, renderSlot as Je, createTextVNode as ye, toDisplayString as Te, toRaw as Ne, watch as Re, useAttrs as Fa, toRef as qe, withDirectives as Ia, withKeys as He, createSlots as Pa } from "vue";
2
- import { d as Oa, h as xa } from "./index.DkAcVBvr.js";
3
- import { B as qa } from "./divider.BlxQCxkM.js";
4
- import { h as Ba, B as Na } from "./button-actions.iIMUk8Vx.js";
5
- import { B as Ve, d as Ke } from "./typography.wIM07Hbl.js";
1
+ import { defineComponent as Ve, computed as m, openBlock as w, createBlock as L, unref as u, withCtx as Z, createVNode as _, mergeProps as Je, createCommentVNode as O, reactive as ke, useSlots as Pa, ref as F, onMounted as Da, createElementBlock as Re, createElementVNode as oe, normalizeClass as va, renderSlot as He, createTextVNode as Ye, toDisplayString as be, toRaw as Ce, watch as Ae, useAttrs as Oa, toRef as Be, withDirectives as qa, withKeys as Ke, createSlots as xa } from "vue";
2
+ import { d as Ba, h as Na } from "./index.DkAcVBvr.js";
3
+ import { B as Ca } from "./divider.BlxQCxkM.js";
4
+ import { h as za, B as Va } from "./button-actions.iIMUk8Vx.js";
5
+ import { B as ze, d as Xe } from "./typography.wIM07Hbl.js";
6
+ import { B as La, g as Ze, D as _a } from "./dropdown.DIuBwxF-.js";
6
7
  import { g as me } from "./generate-uid.DBWe4g6T.js";
7
- import { u as Ce } from "./index.B875RXHM.js";
8
- import { j as ve, k as q, s as S, l as Va, m as Xe, n as za, f as Ze, o as Ca, q as _a, r as La, t as ea, u as Ua, b as C, v as Qa, h as Wa, i as Ga, e as P, w as aa, x as ta, g as $a } from "./calendar.BHBrXP7_.js";
9
- import { u as _e, a as ja } from "./use-date-input-formatter.BWGtdqki.js";
10
- import { t as be, n as Ja, c as Ha } from "./en-US.BR6y7foR.js";
11
- import { u as Ka } from "./use-form-layout-loading.CWbjZiwP.js";
12
- import { B as Xa } from "./directive.D1-d-C2K.js";
13
- import { u as Za } from "./form-field.D_2g7vaP.js";
14
- import { B as et, g as na, D as at } from "./dropdown.ByQDIs7p.js";
15
- import { B as tt } from "./alert.cqiNVGbY.js";
16
- import { B as nt } from "./segmented-control.Cn3imrj5.js";
17
- import { u as rt } from "./use-has-slot.CyMiImRQ.js";
18
- import { u as st } from "./use-touch-device.DTqFAbXh.js";
19
- import { e as U, a as ra } from "./differenceInMonths.yz4Dfe-b.js";
20
- import { s as sa } from "./startOfWeek.muMEhS7U.js";
21
- import { c as ot } from "./constructNow.DyOJDyZZ.js";
22
- import { a as he, s as oa } from "./set-time-in-date.9-8WOiMT.js";
23
- import { B as lt, i as la } from "./input-time.U4n485N0.js";
24
- import { B as it } from "./input-field.CG5dopgq.js";
25
- import { B as ut } from "./form-layout-group.DWvmX49g.js";
26
- import { _ as va } from "./_plugin-vue_export-helper.CHgC5LLL.js";
27
- import { F as dt } from "./field-label.B3HF2C1r.js";
28
- import { E as ia } from "./error-message.ROkM72Gh.js";
29
- import { B as ct } from "./button-actions.types.BptAXjD8.js";
8
+ import { u as Le } from "./index.B875RXHM.js";
9
+ import { j as ve, k as B, s as S, l as Ua, m as ea, n as Qa, f as aa, o as Wa, q as $a, r as Ga, t as ta, u as ja, b as V, v as Ja, h as Ha, i as Ka, e as q, w as na, x as ra, g as Xa } from "./calendar.BZBxMz2J.js";
10
+ import { u as _e, a as Za } from "./use-date-input-formatter.BOgLVtWE.js";
11
+ import { t as Se, n as et, c as at } from "./en-US.BR6y7foR.js";
12
+ import { u as tt } from "./use-form-layout-loading.CWbjZiwP.js";
13
+ import { B as nt } from "./directive.D1-d-C2K.js";
14
+ import { u as rt } from "./form-field.D_2g7vaP.js";
15
+ import { B as st } from "./alert.cqiNVGbY.js";
16
+ import { B as ot } from "./segmented-control.Cn3imrj5.js";
17
+ import { u as lt } from "./use-has-slot.CyMiImRQ.js";
18
+ import { u as it } from "./use-touch-device.DTqFAbXh.js";
19
+ import { e as U, a as sa } from "./differenceInMonths.yz4Dfe-b.js";
20
+ import { s as oa } from "./startOfWeek.muMEhS7U.js";
21
+ import { c as ut } from "./constructNow.DyOJDyZZ.js";
22
+ import { a as Te, s as la } from "./set-time-in-date.9-8WOiMT.js";
23
+ import { B as dt, i as ia } from "./input-time.DT_ivIBv.js";
24
+ import { B as ct } from "./input-field.CuZNoZOd.js";
25
+ import { B as mt } from "./form-layout-group.DWvmX49g.js";
26
+ import { _ as pa } from "./_plugin-vue_export-helper.CHgC5LLL.js";
27
+ import { F as Dt } from "./field-label.B3HF2C1r.js";
28
+ import { E as ua } from "./error-message.ROkM72Gh.js";
29
+ import { B as vt } from "./button-actions.types.BptAXjD8.js";
30
30
  import "../assets/date-range-picker.css";
31
- function ua(r, v) {
32
- return be(r, v?.in).getFullYear();
31
+ function da(r, v) {
32
+ return Se(r, v?.in).getFullYear();
33
33
  }
34
34
  function De(r, v) {
35
- return +be(r) == +be(v);
35
+ return +Se(r) == +Se(v);
36
36
  }
37
- function mt(r, v, y) {
38
- const [i, c] = Ja(
39
- y?.in,
37
+ function pt(r, v, T) {
38
+ const [i, c] = et(
39
+ T?.in,
40
40
  r,
41
41
  v
42
42
  );
43
43
  return +ve(i) == +ve(c);
44
44
  }
45
- function da(r, v) {
46
- const y = be(r, v?.in);
47
- return y.setMilliseconds(0), y;
45
+ function ca(r, v) {
46
+ const T = Se(r, v?.in);
47
+ return T.setMilliseconds(0), T;
48
48
  }
49
- function Be(r, v) {
50
- return +da(r) == +da(v);
49
+ function Ne(r, v) {
50
+ return +ca(r) == +ca(v);
51
51
  }
52
- function Dt(r, v) {
53
- return q(
54
- Ha(r, r),
55
- ot(r)
52
+ function ft(r, v) {
53
+ return B(
54
+ at(r, r),
55
+ ut(r)
56
56
  );
57
57
  }
58
- const vt = {
58
+ const gt = {
59
59
  name: "date-time-input"
60
- }, ca = /* @__PURE__ */ ze({
61
- ...vt,
60
+ }, ma = /* @__PURE__ */ Ve({
61
+ ...gt,
62
62
  props: {
63
63
  dateModelValue: { default: "" },
64
64
  dateProps: { default: () => ({}) },
@@ -67,69 +67,71 @@ const vt = {
67
67
  timeModelValue: { default: "" },
68
68
  timeProps: { default: () => ({}) }
69
69
  },
70
- emits: ["update:date-model-value", "date:keydown", "update:time-model-value", "time:error", "time:valid"],
70
+ emits: ["click", "update:date-model-value", "date:keydown", "update:time-model-value", "time:error", "time:valid"],
71
71
  setup(r) {
72
- const v = r, y = m(() => ({
72
+ const v = r, T = m(() => ({
73
73
  errorMessage: v.errorMessage,
74
74
  ...v.dateProps
75
75
  })), i = m(() => ({
76
76
  errorMessage: v.errorMessage,
77
77
  ...v.timeProps
78
78
  }));
79
- return (c, e) => (w(), _(u(ut), {
79
+ return (c, e) => (w(), L(u(mt), {
80
80
  layout: c.showTimeInput ? "50-50" : "100",
81
81
  "error-message": c.errorMessage
82
82
  }, {
83
- default: X(() => [
84
- L(u(it), je(y.value, {
83
+ default: Z(() => [
84
+ _(u(ct), Je(T.value, {
85
85
  "model-value": c.dateModelValue,
86
- "onUpdate:modelValue": e[0] || (e[0] = (s) => c.$emit("update:date-model-value", s)),
87
- onKeydown: e[1] || (e[1] = (s) => c.$emit("date:keydown", s))
86
+ onClick: e[0] || (e[0] = (s) => c.$emit("click")),
87
+ "onUpdate:modelValue": e[1] || (e[1] = (s) => c.$emit("update:date-model-value", s)),
88
+ onKeydown: e[2] || (e[2] = (s) => c.$emit("date:keydown", s))
88
89
  }), null, 16, ["model-value"]),
89
- c.showTimeInput ? (w(), _(u(lt), je({ key: 0 }, i.value, {
90
+ c.showTimeInput ? (w(), L(u(dt), Je({ key: 0 }, i.value, {
90
91
  "model-value": c.timeModelValue,
91
- "onUpdate:modelValue": e[2] || (e[2] = (s) => c.$emit("update:time-model-value", s)),
92
- "onInput:error": e[3] || (e[3] = (s) => c.$emit("time:error")),
93
- "onInput:valid": e[4] || (e[4] = (s) => c.$emit("time:valid"))
94
- }), null, 16, ["model-value"])) : I("", !0)
92
+ onClick: e[3] || (e[3] = (s) => c.$emit("click")),
93
+ "onUpdate:modelValue": e[4] || (e[4] = (s) => c.$emit("update:time-model-value", s)),
94
+ "onInput:error": e[5] || (e[5] = (s) => c.$emit("time:error")),
95
+ "onInput:valid": e[6] || (e[6] = (s) => c.$emit("time:valid"))
96
+ }), null, 16, ["model-value"])) : O("", !0)
95
97
  ]),
96
98
  _: 1
97
99
  }, 8, ["layout", "error-message"]));
98
100
  }
99
- }), pt = ({
101
+ }), Mt = ({
100
102
  firstDayOfWeek: r,
101
103
  min: v,
102
- max: y
104
+ max: T
103
105
  }) => ({ getGranularCalendarLimits: (c) => {
104
- if (!v && !y)
106
+ if (!v && !T)
105
107
  return { min: null, max: null };
106
- let e = v ? S(v) : null, s = y ? U(y) : null;
108
+ let e = v ? S(v) : null, s = T ? U(T) : null;
107
109
  if (c?.type === "weekly") {
108
110
  if (c.earliest)
109
111
  e = S(c.earliest);
110
112
  else if (e) {
111
- const f = sa(e, { weekStartsOn: r });
112
- q(e, f) || (e = S(Va(Xe(e, { weekStartsOn: r }), 1)));
113
+ const f = oa(e, { weekStartsOn: r });
114
+ B(e, f) || (e = S(Ua(ea(e, { weekStartsOn: r }), 1)));
113
115
  }
114
116
  if (c.latest)
115
117
  s = U(c.latest);
116
118
  else if (s) {
117
- const f = Xe(s, { weekStartsOn: r });
118
- q(s, f) || (s = U(za(sa(s, { weekStartsOn: r }), 1)));
119
+ const f = ea(s, { weekStartsOn: r });
120
+ B(s, f) || (s = U(Qa(oa(s, { weekStartsOn: r }), 1)));
119
121
  }
120
122
  }
121
123
  if (c?.type === "monthly") {
122
124
  if (c.earliest)
123
125
  e = S(c.earliest);
124
126
  else if (e) {
125
- const f = Ze(e);
126
- q(e, f) || (e = Ze(Ca(e, 1)));
127
+ const f = aa(e);
128
+ B(e, f) || (e = aa(Wa(e, 1)));
127
129
  }
128
130
  if (c.latest)
129
131
  s = U(c.latest);
130
132
  else if (s) {
131
- const f = ra(s);
132
- q(s, f) || (s = ra(_a(s, 1)));
133
+ const f = sa(s);
134
+ B(s, f) || (s = sa($a(s, 1)));
133
135
  }
134
136
  }
135
137
  if (c?.type === "quarterly") {
@@ -137,18 +139,18 @@ const vt = {
137
139
  e = ve(c.earliest);
138
140
  else if (e) {
139
141
  const f = ve(e);
140
- q(e, f) || (e = ve(La(e, 1)));
142
+ B(e, f) || (e = ve(Ga(e, 1)));
141
143
  }
142
144
  if (c.latest)
143
145
  s = U(c.latest);
144
146
  else if (s) {
145
- const f = ea(s);
146
- q(s, f) || (s = ea(Ua(s, 1)));
147
+ const f = ta(s);
148
+ B(s, f) || (s = ta(ja(s, 1)));
147
149
  }
148
150
  }
149
151
  return { min: e, max: s };
150
- } }), ft = () => {
151
- const r = Ye({
152
+ } }), ht = () => {
153
+ const r = ke({
152
154
  daily: null,
153
155
  weekly: null,
154
156
  monthly: null,
@@ -165,7 +167,7 @@ const vt = {
165
167
  };
166
168
  };
167
169
  var D = /* @__PURE__ */ ((r) => (r.CUSTOM_RANGE = "custom-range", r.INPUT = "input", r.ERROR = "error", r.FORM_DATE = "form-date", r.START_DATE_SELECTED = "start-date-selected", r))(D || {});
168
- const pa = {
170
+ const fa = {
169
171
  "de-DE": { "DD-MM-YYYY": "TT-MM-JJJJ", "MM-DD-YYYY": "MM-TT-JJJJ", "YYYY-MM-DD": "JJJJ-MM-TT", customRange: "Benutzerdefinierter Bereich", daily: "Täglich", dateFrom: "Datum von", dateTo: "Datum bis", from: "Von", invalidDateFormat: "Ungültiges Datumsformat", lastMonth: "Letzter Monat", lastSevenDays: "Letzte 7 Tage", lastThreeMonths: "Letzte drei Monate", maxRangeDays: "Sie können bis zu {count} Tag auswählen | Sie können bis zu {count} Tage auswählen", maxRangeMonths: "Sie können bis zu {count} Monat auswählen | Sie können bis zu {count} Monate auswählen", maxRangeQuarters: "Sie können bis zu {count} Quartal auswählen | Sie können bis zu {count} Quartale auswählen", maxRangeWeeks: "Sie können bis zu {count} Woche auswählen | Sie können bis zu {count} Wochen auswählen", monthly: "Monatlich", quarterly: "Vierteljährlich", selectedDateIsNotAvailable: "Ausgewähltes Datum ist nicht verfügbar", startDateMustPrecedeEndDate: "Das Anfangsdatum muss vor dem Enddatum liegen", timeFrom: "Zeit von", timeTo: "Zeit bis", to: "Bis", weekly: "Wöchentlich" },
170
172
  "en-GB": { "DD-MM-YYYY": "DD-MM-YYYY", "MM-DD-YYYY": "MM-DD-YYYY", "YYYY-MM-DD": "YYYY-MM-DD", customRange: "Custom range", daily: "Daily", dateFrom: "Date from", dateTo: "Date to", from: "From", invalidDateFormat: "Invalid date format", lastMonth: "Last month", lastSevenDays: "Last 7 days", lastThreeMonths: "The last three months", maxRangeDays: "You can select up to {count} day | You can select up to {count} days", maxRangeMonths: "You can select up to {count} month | You can select up to {count} months", maxRangeQuarters: "You can select up to {count} quarter | You can select up to {count} quarters", maxRangeWeeks: "You can select up to {count} week | You can select up to {count} weeks", monthly: "Monthly", quarterly: "Quarterly", selectedDateIsNotAvailable: "Selected date is not available", startDateMustPrecedeEndDate: "Start date must precede end date", timeFrom: "Time from", timeTo: "Time to", to: "To", weekly: "Weekly" },
171
173
  "en-US": { "DD-MM-YYYY": "DD-MM-YYYY", "MM-DD-YYYY": "MM-DD-YYYY", "YYYY-MM-DD": "YYYY-MM-DD", customRange: "Custom range", daily: "Daily", dateFrom: "Date from", dateTo: "Date to", from: "From", invalidDateFormat: "Invalid date format", lastMonth: "Last month", lastSevenDays: "Last 7 days", lastThreeMonths: "Last three months", maxRangeDays: "You can select up to {count} day | You can select up to {count} days", maxRangeMonths: "You can select up to {count} month | You can select up to {count} months", maxRangeQuarters: "You can select up to {count} quarter | You can select up to {count} quarters", maxRangeWeeks: "You can select up to {count} week | You can select up to {count} weeks", monthly: "Monthly", quarterly: "Quarterly", selectedDateIsNotAvailable: "Selected date is not available", startDateMustPrecedeEndDate: "Start date must precede end date", timeFrom: "Time from", timeTo: "Time to", to: "To", weekly: "Weekly" },
@@ -177,15 +179,15 @@ const pa = {
177
179
  "ja-JP": { "DD-MM-YYYY": "DD-MM-YYYY", "MM-DD-YYYY": "MM-DD-YYYY", "YYYY-MM-DD": "YYYY-MM-DD", customRange: "カスタム範囲", daily: "毎日", dateFrom: "開始日", dateTo: "終了日", from: "下限", invalidDateFormat: "無効な日付形式", lastMonth: "先月", lastSevenDays: "過去 7 日間", lastThreeMonths: "過去3か月", maxRangeDays: "{count}日間まで選択できます | {count}日間まで選択できます", maxRangeMonths: "{count}か月まで選択できます | {count}か月まで選択できます", maxRangeQuarters: "{count}四半期まで選択できます | {count}四半期まで選択できます", maxRangeWeeks: "{count}週間まで選択できます | {count}週間まで選択できます", monthly: "毎月", quarterly: "四半期ごと", selectedDateIsNotAvailable: "選択した日付は利用できません", startDateMustPrecedeEndDate: "開始日は終了日より前にする必要があります", timeFrom: "開始時刻", timeTo: "終了時刻", to: "上限", weekly: "毎週" },
178
180
  "pt-BR": { "DD-MM-YYYY": "DD-MM-AAAA", "MM-DD-YYYY": "MM-DD-AAAA", "YYYY-MM-DD": "AAAA-MM-DD", customRange: "Intervalo personalizado", daily: "Diário", dateFrom: "Data a partir de", dateTo: "Data até", from: "De", invalidDateFormat: "Formato de data inválido", lastMonth: "Último mês", lastSevenDays: "Últimos 7 dias", lastThreeMonths: "Últimos 3 meses", maxRangeDays: "Você pode selecionar até {count} dia | Você pode selecionar até {count} dias", maxRangeMonths: "Você pode selecionar até {count} mês | Você pode selecionar até {count} meses", maxRangeQuarters: "Você pode selecionar até {count} trimestre | Você pode selecionar até {count} trimestres", maxRangeWeeks: "Você pode selecionar até {count} semana | Você pode selecionar até {count} semanas", monthly: "Mensal", quarterly: "Trimestral", selectedDateIsNotAvailable: "A data selecionada não está disponível", startDateMustPrecedeEndDate: "A data de início deve preceder a data de término", timeFrom: "Horário a partir de", timeTo: "Horário até", to: "Para", weekly: "Semanal" },
179
181
  "zh-CN": { "DD-MM-YYYY": "日-月-年", "MM-DD-YYYY": "月-日-年", "YYYY-MM-DD": "年-月-日", customRange: "自定义范围", daily: "每日", dateFrom: "日期自", dateTo: "日期至", from: "自", invalidDateFormat: "日期格式无效", lastMonth: "上个月", lastSevenDays: "最近 7 天", lastThreeMonths: "过去三个月", maxRangeDays: "您可以选择最多 {count} 天 | 您可以选择最多 {count} 天", maxRangeMonths: "您可以选择最多 {count} 个月 | 您可以选择最多 {count} 个月", maxRangeQuarters: "您最多可以选择 {count} 个季度 | 您最多可以选择 {count} 个季度", maxRangeWeeks: "您最多可以选择 {count} 周 | 您最多可以选择 {count} 周", monthly: "每月", quarterly: "每季度", selectedDateIsNotAvailable: "所选日期不可用", startDateMustPrecedeEndDate: "开始日期必须早于结束日期", timeFrom: "时间自", timeTo: "是时候", to: "至", weekly: "每周" }
180
- }, gt = { class: "b-date-range-picker-calendar" }, ht = { class: "b-date-range-picker-calendar__form" }, Mt = { key: 0 }, yt = {
182
+ }, yt = { class: "b-date-range-picker-calendar" }, Tt = { class: "b-date-range-picker-calendar__form" }, Rt = { key: 0 }, Yt = {
181
183
  key: 0,
182
184
  class: "b-date-range-picker-calendar__calendars-container",
183
185
  "data-testid": "date-range-picker-calendar-calendar-container"
184
- }, Tt = {
186
+ }, bt = {
185
187
  name: "date-range-picker-calendar",
186
- i18n: { messages: pa }
187
- }, Rt = /* @__PURE__ */ ze({
188
- ...Tt,
188
+ i18n: { messages: fa }
189
+ }, At = /* @__PURE__ */ Ve({
190
+ ...bt,
189
191
  props: {
190
192
  /**
191
193
  * Allows user to enter time values in the form
@@ -201,7 +203,7 @@ const pa = {
201
203
  /**
202
204
  * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
203
205
  */
204
- firstDayOfWeek: C.props.firstDayOfWeek,
206
+ firstDayOfWeek: V.props.firstDayOfWeek,
205
207
  /**
206
208
  * A list of available granularities.
207
209
  * If present, the date picker will display a segmented control to change granularity.
@@ -213,25 +215,25 @@ const pa = {
213
215
  /**
214
216
  * Indicate if a date should be disabled or not
215
217
  */
216
- isDateDisabled: C.props.isDateDisabled,
218
+ isDateDisabled: V.props.isDateDisabled,
217
219
  /**
218
220
  * Set a maximum number of dates to be selectable by the range.
219
221
  */
220
- maxRange: C.props.maxRange,
222
+ maxRange: V.props.maxRange,
221
223
  /**
222
224
  * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
223
225
  */
224
- min: C.props.min,
226
+ min: V.props.min,
225
227
  /**
226
228
  * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
227
229
  */
228
- max: C.props.max,
230
+ max: V.props.max,
229
231
  /**
230
232
  * Number of months rendered on pane
231
233
  */
232
234
  numberOfMonths: {
233
- type: C.props.numberOfMonths.type,
234
- default: C.props.numberOfMonths.default,
235
+ type: V.props.numberOfMonths.type,
236
+ default: V.props.numberOfMonths.default,
235
237
  validator: (r) => r >= 0
236
238
  },
237
239
  /**
@@ -256,11 +258,11 @@ const pa = {
256
258
  /**
257
259
  * The type of calendar to display. Defaults to showing days.
258
260
  */
259
- variant: C.props.variant,
261
+ variant: V.props.variant,
260
262
  /**
261
263
  * Range of years to be selectable from the year dropdown
262
264
  */
263
- yearRange: C.props.yearRange
265
+ yearRange: V.props.yearRange
264
266
  },
265
267
  emits: [
266
268
  D.CUSTOM_RANGE,
@@ -275,160 +277,165 @@ const pa = {
275
277
  weekly: "maxRangeWeeks",
276
278
  monthly: "maxRangeMonths",
277
279
  quarterly: "maxRangeQuarters"
278
- }, e = r, s = v, f = Ea(), Q = rt(f), { t: h, tc: k } = Ce({ messages: pa }), { isTouchDevice: Y } = st(), {
279
- dateFormat: se,
280
- isFormatValid: b,
281
- parseDate: T,
282
- onKeyDown: B,
283
- autoFormat: W,
284
- formatDate: oe
285
- } = _e(), R = F({}), Z = m(() => e.variant === "month" ? "monthly" : "daily"), le = m(() => e.numberOfMonths === 0), t = Ye({
280
+ }, e = r, s = v, f = Pa(), j = lt(f), { t: h, tc: k } = Le({ messages: fa }), { isTouchDevice: b } = it(), {
281
+ dateFormat: le,
282
+ isFormatValid: A,
283
+ parseDate: R,
284
+ onKeyDown: N,
285
+ autoFormat: J,
286
+ formatDate: ie
287
+ } = _e(), Y = F({}), ee = F(null), ue = m(() => e.variant === "month" ? "monthly" : "daily"), E = m(() => e.numberOfMonths === 0), t = ke({
286
288
  startDate: e.value?.startDate,
287
289
  endDate: e.value?.endDate,
288
290
  range: e.value?.range,
289
291
  ...e.granularities ? {
290
- granularity: e.value?.granularity || Z.value
292
+ granularity: e.value?.granularity || ue.value
291
293
  } : {}
292
- }), N = m(() => (
294
+ }), Q = m(() => (
293
295
  // eslint-disable-next-line consistent-return
294
296
  e?.quickSelectRanges?.find(({ value: a, data: l }) => {
295
297
  if (!l.endDate) {
296
298
  if (l.isRelativeToNow) {
297
- const d = R.value?.[a];
299
+ const d = Y.value?.[a];
298
300
  return d ? De(d.startDate, t.startDate) && De(d.endDate, t.endDate) : (
299
301
  // If not stored calculated dates, fall back to comparing the quick select item's value
300
302
  // with the internal range's stored range identifier.
301
303
  a === t.range
302
304
  );
303
305
  }
304
- return De(l.startDate, t.startDate) && Dt(t.endDate) && (!e.allowTimeInput || Be(t.endDate, U(t.endDate))) && (e.granularities ? l.granularity === t.granularity : !0);
306
+ return De(l.startDate, t.startDate) && ft(t.endDate) && (!e.allowTimeInput || Ne(t.endDate, U(t.endDate))) && (e.granularities ? l.granularity === t.granularity : !0);
305
307
  }
306
308
  if (e.allowTimeInput)
307
- return Be(l.startDate, t.startDate) && Be(l.endDate, t.endDate) && (e.granularities ? l.granularity === t.granularity : !0);
309
+ return Ne(l.startDate, t.startDate) && Ne(l.endDate, t.endDate) && (e.granularities ? l.granularity === t.granularity : !0);
308
310
  if (l.endDate)
309
- return q(l.startDate, t.startDate) && q(l.endDate, t.endDate) && (e.granularities ? l.granularity === t.granularity : !0);
311
+ return B(l.startDate, t.startDate) && B(l.endDate, t.endDate) && (e.granularities ? l.granularity === t.granularity : !0);
310
312
  })?.value ?? i
311
- )), Ae = m(() => [
313
+ )), pe = m(() => [
312
314
  { label: h("customRange"), value: i },
313
315
  ...e.quickSelectRanges ? e.quickSelectRanges : []
314
- ]), H = m(
316
+ ]), ae = m(
315
317
  () => e.granularities?.find(({ type: a }) => a === t.granularity) || null
316
- ), ke = m(
318
+ ), te = m(
317
319
  () => e.granularities?.map(({ type: a, disabled: l }) => ({
318
320
  label: h(a),
319
321
  value: a,
320
322
  disabled: l
321
323
  })) ?? []
322
- ), { getGranularCalendarLimits: ee } = pt(e), G = m(
323
- () => e.granularities ? ee(H.value) : { min: e.min ? S(e.min) : null, max: e.max ? U(e.max) : null }
324
- ), { normalizeRange: Se } = Qa(e.firstDayOfWeek), { savedRanges: ie, saveRange: pe, resetSavedRanges: ae } = ft(), A = (a) => a ? oe(a) : "", ue = (a, l = !0) => {
324
+ ), { getGranularCalendarLimits: de } = Mt(e), ne = m(
325
+ () => e.granularities ? de(ae.value) : { min: e.min ? S(e.min) : null, max: e.max ? U(e.max) : null }
326
+ ), { normalizeRange: we } = Ja(e.firstDayOfWeek), { savedRanges: re, saveRange: ce, resetSavedRanges: X } = ht(), I = (a) => a ? ie(a) : "", W = (a, l = !0) => {
325
327
  if (!t.startDate || !t.endDate)
326
328
  return;
327
- const d = Se({
329
+ const d = we({
328
330
  startDate: t.startDate,
329
331
  endDate: t.endDate,
330
332
  fixedEndpoint: a,
331
- granularity: H.value,
333
+ granularity: ae.value,
332
334
  alignToGranularity: l,
333
335
  fallbackMaxRange: e.maxRange,
334
- min: G.value.min,
335
- max: G.value.max
336
+ min: ne.value.min,
337
+ max: ne.value.max
336
338
  });
337
- De(d.startDate, t.startDate) && De(d.endDate, t.endDate) || (t.startDate = d.startDate, t.endDate = d.endDate, n.startDate = A(d.startDate), n.endDate = A(d.endDate));
338
- }, p = F(null), M = F(null), de = m(() => p.value ? h(p.value) : null), te = m(() => M.value ? h(M.value) : null), O = m(
339
- () => p.value === "invalidDateFormat" ? null : de.value
340
- ), $ = m(() => M.value === "invalidDateFormat" ? null : te.value), x = (a, l, d, g) => {
341
- if (!a || !b(a))
339
+ De(d.startDate, t.startDate) && De(d.endDate, t.endDate) || (t.startDate = d.startDate, t.endDate = d.endDate, n.startDate = I(d.startDate), n.endDate = I(d.endDate));
340
+ }, y = F(null), M = F(null), se = m(() => y.value ? h(y.value) : null), x = m(() => M.value ? h(M.value) : null), H = m(
341
+ () => y.value === "invalidDateFormat" ? null : se.value
342
+ ), fe = m(() => M.value === "invalidDateFormat" ? null : x.value), p = (a, l, d, g) => {
343
+ if (!a || !A(a))
342
344
  return "invalidDateFormat";
343
- const E = T(a), z = S(E);
345
+ const P = R(a), z = S(P);
344
346
  if (e.min && z < S(e.min) || e.max && z > S(e.max) || e.isDateDisabled && e.isDateDisabled(z))
345
347
  return "selectedDateIsNotAvailable";
346
348
  if (l) {
347
- const Ge = g ? he(g, 0).getTime() : z.getTime(), $e = g ? he(l, 0).getTime() : S(l).getTime();
348
- if (d === "start" ? Ge >= $e : Ge <= $e)
349
+ const Ge = g ? Te(g, 0).getTime() : z.getTime(), je = g ? Te(l, 0).getTime() : S(l).getTime();
350
+ if (d === "start" ? Ge >= je : Ge <= je)
349
351
  return "startDateMustPrecedeEndDate";
350
352
  }
351
353
  return null;
352
- }, n = Ye({
354
+ }, n = ke({
353
355
  startDate: e.dateFormData.startDate,
354
356
  endDate: e.dateFormData.endDate,
355
357
  startTime: e.dateFormData.startTime,
356
358
  endTime: e.dateFormData.endTime
357
- }), fe = (a, l) => {
359
+ }), ge = (a, l) => {
358
360
  const d = () => {
359
- if (l && J(l)) {
360
- const g = oa(T(l), a);
361
- if (e.min && g < he(e.min, 0) || e.max && g > he(e.max, 0))
361
+ if (l && G(l)) {
362
+ const g = la(R(l), a);
363
+ if (e.min && g < Te(e.min, 0) || e.max && g > Te(e.max, 0))
362
364
  return !1;
363
365
  }
364
366
  return !0;
365
367
  };
366
- return la(a) && d();
367
- }, j = m(() => e.variant === "month"), ce = (a) => a ? j.value ? Wa(a) : Ga(a) : "", we = m(() => ce(t.startDate)), Ee = m(() => ce(t.endDate)), ge = m(() => Y.value ? j.value ? "month" : "date" : "text"), Fe = m(() => Y.value ? we.value : n.startDate), Ie = m(() => Y.value ? Ee.value : n.endDate), V = (a, l) => !l || !la(l) || e.variant === "month" ? a : oa(new Date(a), l), Pe = (a) => {
368
- n.startTime = P(
369
- e.min && e.allowTimeInput && q(e.min, a.startDate) ? e.min : S(a.startDate)
370
- ), n.endTime = P(
371
- e.max && e.allowTimeInput && q(e.max, a.endDate) ? e.max : U(a.endDate)
372
- ), t.startDate = V(a.startDate, n.startTime), t.endDate = V(a.endDate, n.endTime), t.range = null, e.granularities && ae(), s(D.INPUT, {
368
+ return ia(a) && d();
369
+ }, $ = m(() => e.variant === "month"), Me = (a) => a ? $.value ? Ha(a) : Ka(a) : "", Ee = m(() => Me(t.startDate)), Fe = m(() => Me(t.endDate)), he = m(() => b.value ? $.value ? "month" : "date" : "text"), Ie = m(() => b.value ? Ee.value : n.startDate), Pe = m(() => b.value ? Fe.value : n.endDate), C = (a, l) => !l || !ia(l) || e.variant === "month" ? a : la(new Date(a), l), ye = (a, l = !1) => {
370
+ l || (n.startTime = q(
371
+ e.min && e.allowTimeInput && B(e.min, a.startDate) ? e.min : S(a.startDate)
372
+ ), n.endTime = q(
373
+ e.max && e.allowTimeInput && B(e.max, a.endDate) ? e.max : U(a.endDate)
374
+ )), t.startDate = C(a.startDate, n.startTime), t.endDate = C(a.endDate, n.endTime), t.range = null, e.granularities && X(), s(D.INPUT, {
373
375
  ...t,
374
- range: N.value
376
+ range: Q.value
375
377
  });
376
- }, J = (a) => !!a && !x(a);
377
- ma(() => {
378
- p.value = e.dateFormData.startDate ? x(e.dateFormData.startDate) : null, M.value = e.dateFormData.endDate ? x(e.dateFormData.endDate) : null;
378
+ }, o = (a) => {
379
+ ye(a);
380
+ }, K = () => {
381
+ const a = ee.value?.finalizeRangeSelection();
382
+ a && ye(a, !0);
383
+ }, G = (a) => !!a && !p(a);
384
+ Da(() => {
385
+ y.value = e.dateFormData.startDate ? p(e.dateFormData.startDate) : null, M.value = e.dateFormData.endDate ? p(e.dateFormData.endDate) : null;
379
386
  });
380
- const o = (a) => {
381
- n.startDate = A(a), n.startTime || (n.startTime = P(a)), p.value = null, M.value === "startDateMustPrecedeEndDate" && (M.value = null), s(D.START_DATE_SELECTED, a);
382
- }, K = (a) => {
383
- n.endDate = A(a), n.endTime || (n.endTime = P(U(a))), M.value = null, p.value === "startDateMustPrecedeEndDate" && (p.value = null);
384
- }, ne = (a) => {
387
+ const ga = (a) => {
388
+ n.startDate = I(a), n.startTime || (n.startTime = q(a)), y.value = null, M.value === "startDateMustPrecedeEndDate" && (M.value = null), s(D.START_DATE_SELECTED, a);
389
+ }, Ma = (a) => {
390
+ n.endDate = I(a), n.endTime || (n.endTime = q(U(a))), M.value = null, y.value === "startDateMustPrecedeEndDate" && (y.value = null);
391
+ }, Oe = (a) => {
385
392
  const l = e.value?.[a];
386
393
  if (l)
387
394
  return l;
388
- if (e.dateFormData[a] && J(e.dateFormData[a]))
389
- return T(e.dateFormData[a]);
390
- }, Oe = (a, l = !1) => {
391
- if (J(a)) {
395
+ if (e.dateFormData[a] && G(e.dateFormData[a]))
396
+ return R(e.dateFormData[a]);
397
+ }, qe = (a, l = !1) => {
398
+ if (G(a)) {
392
399
  const d = a;
393
- p.value = null, n.startDate = d;
394
- const g = S(T(d));
395
- t.startDate = V(g, n.startTime), J(n.endDate) && (t.endDate = V(
396
- S(T(n.endDate)),
400
+ y.value = null, n.startDate = d;
401
+ const g = S(R(d));
402
+ t.startDate = C(g, n.startTime), G(n.endDate) && (t.endDate = C(
403
+ S(R(n.endDate)),
397
404
  n.endTime
398
405
  ));
399
- const E = ne("endDate"), z = x(
406
+ const P = Oe("endDate"), z = p(
400
407
  d,
401
- e.allowTimeInput ? t.endDate : E,
408
+ e.allowTimeInput ? t.endDate : P,
402
409
  "start",
403
410
  e.allowTimeInput ? t.startDate : void 0
404
411
  );
405
412
  if (z) {
406
- p.value = z, s(D.ERROR, { ...n });
413
+ y.value = z, s(D.ERROR, { ...n });
407
414
  return;
408
415
  }
409
- M.value === "startDateMustPrecedeEndDate" && (M.value = null), ue("end", l), t.range = null, s(D.FORM_DATE, {
416
+ M.value === "startDateMustPrecedeEndDate" && (M.value = null), W("end", l), t.range = null, s(D.FORM_DATE, {
410
417
  startDate: t.startDate,
411
418
  endDate: t.endDate
412
419
  }), s(D.INPUT, {
413
420
  ...t,
414
- range: N.value
421
+ range: Q.value
415
422
  });
416
423
  } else
417
- p.value = x(a), s(D.ERROR, { ...n });
418
- }, fa = na(Oe, 300), ga = (a) => {
419
- n.startDate = Y.value && j.value ? a : W(a), Y.value ? j.value && a ? Oe(A(aa(a)), !0) : n.startDate ? Oe(n.startDate) : p.value = null : fa(n.startDate);
424
+ y.value = p(a), s(D.ERROR, { ...n });
425
+ }, ha = Ze(qe, 300), ya = (a) => {
426
+ n.startDate = b.value && $.value ? a : J(a), b.value ? $.value && a ? qe(I(na(a)), !0) : n.startDate ? qe(n.startDate) : y.value = null : ha(n.startDate);
420
427
  }, xe = (a, l = !1) => {
421
- if (J(a)) {
428
+ if (G(a)) {
422
429
  const d = a;
423
430
  M.value = null, n.endDate = d;
424
- const g = S(T(d));
425
- t.endDate = V(g, n.endTime), J(n.startDate) && (t.startDate = V(
426
- S(T(n.startDate)),
431
+ const g = S(R(d));
432
+ t.endDate = C(g, n.endTime), G(n.startDate) && (t.startDate = C(
433
+ S(R(n.startDate)),
427
434
  n.startTime
428
435
  ));
429
- const E = ne("startDate"), z = x(
436
+ const P = Oe("startDate"), z = p(
430
437
  d,
431
- e.allowTimeInput ? t.startDate : E,
438
+ e.allowTimeInput ? t.startDate : P,
432
439
  "end",
433
440
  e.allowTimeInput ? t.endDate : void 0
434
441
  );
@@ -436,41 +443,41 @@ const pa = {
436
443
  M.value = z, s(D.ERROR, { ...n });
437
444
  return;
438
445
  }
439
- p.value === "startDateMustPrecedeEndDate" && (p.value = null), ue("start", l), t.range = null, s(D.FORM_DATE, {
446
+ y.value === "startDateMustPrecedeEndDate" && (y.value = null), W("start", l), t.range = null, s(D.FORM_DATE, {
440
447
  startDate: t.startDate,
441
448
  endDate: t.endDate
442
449
  }), s(D.INPUT, {
443
450
  ...t,
444
- range: N.value
451
+ range: Q.value
445
452
  });
446
453
  } else
447
- M.value = x(a), s(D.ERROR, { ...n });
448
- }, ha = na(xe, 300), Ma = (a) => {
449
- n.endDate = Y.value && j.value ? a : W(a), Y.value ? j.value && a ? xe(A(aa(a)), !0) : n.endDate ? xe(n.endDate) : M.value = null : ha(n.endDate);
450
- }, Ue = (a) => {
451
- B(a);
452
- }, ya = () => {
454
+ M.value = p(a), s(D.ERROR, { ...n });
455
+ }, Ta = Ze(xe, 300), Ra = (a) => {
456
+ n.endDate = b.value && $.value ? a : J(a), b.value ? $.value && a ? xe(I(na(a)), !0) : n.endDate ? xe(n.endDate) : M.value = null : Ta(n.endDate);
457
+ }, Qe = (a) => {
458
+ N(a);
459
+ }, Ya = () => {
453
460
  s(D.ERROR, { ...n });
454
- }, Ta = () => {
461
+ }, ba = () => {
455
462
  const a = n.startTime;
456
- if (!fe(a, n.startDate)) {
463
+ if (!ge(a, n.startDate)) {
457
464
  s(D.ERROR, { ...n });
458
465
  return;
459
466
  }
460
- if (t.startDate = V(t.startDate, a), n.startDate && t.endDate) {
461
- const d = x(
467
+ if (t.startDate = C(t.startDate, a), n.startDate && t.endDate) {
468
+ const d = p(
462
469
  n.startDate,
463
470
  t.endDate,
464
471
  "start",
465
472
  t.startDate
466
473
  );
467
474
  if (d) {
468
- p.value = d, s(D.ERROR, { ...n });
475
+ y.value = d, s(D.ERROR, { ...n });
469
476
  return;
470
477
  }
471
478
  }
472
- p.value = null, M.value === "startDateMustPrecedeEndDate" && (M.value = null);
473
- const l = ne("endDate");
479
+ y.value = null, M.value === "startDateMustPrecedeEndDate" && (M.value = null);
480
+ const l = Oe("endDate");
474
481
  s(D.FORM_DATE, {
475
482
  startDate: t.startDate,
476
483
  endDate: l,
@@ -478,18 +485,18 @@ const pa = {
478
485
  endTime: n.endTime ?? e.dateFormData.endTime
479
486
  }), s(D.INPUT, {
480
487
  ...t,
481
- range: N.value
488
+ range: Q.value
482
489
  });
483
- }, Ra = () => {
490
+ }, Aa = () => {
484
491
  s(D.ERROR, { ...n });
485
- }, Ya = () => {
492
+ }, ka = () => {
486
493
  const a = n.endTime;
487
- if (!fe(a, n.endDate)) {
494
+ if (!ge(a, n.endDate)) {
488
495
  s(D.ERROR, { ...n });
489
496
  return;
490
497
  }
491
- if (t.endDate = V(t.endDate, a), n.endDate && t.startDate) {
492
- const l = x(
498
+ if (t.endDate = C(t.endDate, a), n.endDate && t.startDate) {
499
+ const l = p(
493
500
  n.endDate,
494
501
  t.startDate,
495
502
  "end",
@@ -500,179 +507,183 @@ const pa = {
500
507
  return;
501
508
  }
502
509
  }
503
- M.value = null, p.value === "startDateMustPrecedeEndDate" && (p.value = null), s(D.FORM_DATE, {
510
+ M.value = null, y.value === "startDateMustPrecedeEndDate" && (y.value = null), s(D.FORM_DATE, {
504
511
  startDate: t.startDate,
505
512
  endDate: t.endDate,
506
513
  startTime: n.startTime ?? e.dateFormData.startTime,
507
514
  endTime: a
508
515
  }), s(D.INPUT, {
509
516
  ...t,
510
- range: N.value
517
+ range: Q.value
511
518
  });
512
- }, ba = (a) => {
519
+ }, Sa = (a) => {
513
520
  n.startTime = a;
514
- }, Aa = (a) => {
521
+ }, wa = (a) => {
515
522
  n.endTime = a;
516
- }, Qe = (a, l, d, g) => {
523
+ }, We = (a, l, d, g) => {
517
524
  t.startDate = a, t.endDate = l, d && (t.granularity = d), g && (t.range = g);
518
- }, ka = (a) => {
525
+ }, Ea = (a) => {
519
526
  const l = e.quickSelectRanges?.find(({ value: d }) => d === a);
520
527
  if (l) {
521
- ae();
522
- const d = l.data, g = d.endDate || (d.isRelativeToNow ? new Date(Date.now()) : U(new Date(Date.now()))), E = d.isRelativeToNow && d.timeDifference ? new Date(g.getTime() - d.timeDifference) : d.startDate;
523
- n.endDate = A(g), n.startDate = A(E), Qe(E, g, null, a), e.granularities && (t.granularity = d.granularity || Z.value), n.startTime = P(E), n.endTime = P(g), t.startDate = E, t.endDate = g, d.isRelativeToNow && (R.value = {
524
- ...R.value,
528
+ X();
529
+ const d = l.data, g = d.endDate || (d.isRelativeToNow ? new Date(Date.now()) : U(new Date(Date.now()))), P = d.isRelativeToNow && d.timeDifference ? new Date(g.getTime() - d.timeDifference) : d.startDate;
530
+ n.endDate = I(g), n.startDate = I(P), We(P, g, null, a), e.granularities && (t.granularity = d.granularity || ue.value), n.startTime = q(P), n.endTime = q(g), t.startDate = P, t.endDate = g, d.isRelativeToNow && (Y.value = {
531
+ ...Y.value,
525
532
  [a]: {
526
- startDate: E,
533
+ startDate: P,
527
534
  endDate: g
528
535
  }
529
536
  }), s(D.CUSTOM_RANGE, {
530
537
  ...l.data,
531
- startDate: E,
538
+ startDate: P,
532
539
  endDate: g,
533
540
  range: l.value
534
541
  });
535
542
  }
536
- }, Sa = (a) => {
543
+ }, Fa = (a) => {
537
544
  const l = t.granularity;
538
- t.granularity = a, l && pe(l, structuredClone(Ne(t))), t.startDate && t.endDate && (ie[a] && Qe(ie[a].startDate, ie[a].endDate, a), ue("end"), n.startDate = A(t.startDate), n.endDate = A(t.endDate), s(D.INPUT, {
545
+ t.granularity = a, l && ce(l, structuredClone(Ce(t))), t.startDate && t.endDate && (re[a] && We(re[a].startDate, re[a].endDate, a), W("end"), n.startDate = I(t.startDate), n.endDate = I(t.endDate), s(D.INPUT, {
539
546
  ...t,
540
- range: N.value
547
+ range: Q.value
541
548
  }));
542
- }, wa = m(() => ({
543
- "b-date-range-picker-calendar__form-container--no-calendars": le.value || Y.value
544
- })), We = m(() => {
545
- const a = H.value, l = a?.maxRange || e.maxRange;
549
+ }, Ia = m(() => ({
550
+ "b-date-range-picker-calendar__form-container--no-calendars": E.value || b.value
551
+ })), $e = m(() => {
552
+ const a = ae.value, l = a?.maxRange || e.maxRange;
546
553
  if (!l)
547
554
  return null;
548
555
  const d = c[a?.type ?? "daily"];
549
556
  return k(d, l, { count: l });
550
557
  });
551
- return (a, l) => (w(), Me("div", gt, [
552
- re("div", {
553
- class: Da(["b-date-range-picker-calendar__form-container", wa.value]),
558
+ return (a, l) => (w(), Re("div", yt, [
559
+ oe("div", {
560
+ class: va(["b-date-range-picker-calendar__form-container", Ia.value]),
554
561
  "data-testid": "date-range-picker-calendar-form-container"
555
562
  }, [
556
- re("div", ht, [
557
- u(Q)("title") ? Je(a.$slots, "title", { key: 0 }, void 0, !0) : I("", !0),
558
- r.quickSelectRanges ? (w(), _(et, {
563
+ oe("div", Tt, [
564
+ u(j)("title") ? He(a.$slots, "title", { key: 0 }, void 0, !0) : O("", !0),
565
+ r.quickSelectRanges ? (w(), L(La, {
559
566
  key: 1,
560
567
  "aria-label": u(h)("customRange"),
561
- items: Ae.value,
562
- "model-value": N.value,
563
- "onUpdate:modelValue": ka
564
- }, null, 8, ["aria-label", "items", "model-value"])) : I("", !0),
565
- r.granularities ? (w(), _(u(nt), {
568
+ items: pe.value,
569
+ "model-value": Q.value,
570
+ "onUpdate:modelValue": Ea
571
+ }, null, 8, ["aria-label", "items", "model-value"])) : O("", !0),
572
+ r.granularities ? (w(), L(u(ot), {
566
573
  key: 2,
567
- items: ke.value,
574
+ items: te.value,
568
575
  "model-value": t.granularity,
569
576
  "full-width": "",
570
- "onUpdate:modelValue": Sa
571
- }, null, 8, ["items", "model-value"])) : I("", !0),
572
- We.value ? (w(), _(u(tt), {
577
+ "onUpdate:modelValue": Fa
578
+ }, null, 8, ["items", "model-value"])) : O("", !0),
579
+ $e.value ? (w(), L(u(st), {
573
580
  key: 3,
574
581
  variant: "tip"
575
582
  }, {
576
- description: X(() => [
577
- ye(Te(We.value), 1)
583
+ description: Z(() => [
584
+ Ye(be($e.value), 1)
578
585
  ]),
579
586
  _: 1
580
- })) : I("", !0),
581
- re("div", null, [
582
- L(u(Ve), {
587
+ })) : O("", !0),
588
+ oe("div", null, [
589
+ _(u(ze), {
583
590
  stronger: "",
584
591
  el: "span",
585
592
  class: "b-date-range-picker-calendar__label"
586
593
  }, {
587
- default: X(() => [
588
- ye(Te(u(h)("from")), 1)
594
+ default: Z(() => [
595
+ Ye(be(u(h)("from")), 1)
589
596
  ]),
590
597
  _: 1
591
598
  }),
592
- L(u(ca), {
593
- "date-model-value": Fe.value,
599
+ _(u(ma), {
600
+ "date-model-value": Ie.value,
594
601
  "date-props": {
595
602
  ariaLabel: u(h)("dateFrom"),
596
- type: ge.value,
597
- description: u(Y) ? void 0 : u(h)(u(se)),
598
- errorMessage: de.value
603
+ type: he.value,
604
+ description: u(b) ? void 0 : u(h)(u(le)),
605
+ errorMessage: se.value
599
606
  },
600
- "error-message": O.value,
607
+ "error-message": H.value,
601
608
  "show-time-input": r.allowTimeInput,
602
609
  "time-model-value": n.startTime,
603
610
  "time-props": {
604
611
  ariaLabel: u(h)("timeFrom"),
605
- errorMessage: O.value
612
+ errorMessage: H.value
606
613
  },
607
614
  class: "b-date-range-picker-calendar__form-input",
608
- "onUpdate:dateModelValue": ga,
609
- "onDate:keydown": Ue,
610
- "onUpdate:timeModelValue": ba,
611
- "onTime:error": ya,
612
- "onTime:valid": Ta
615
+ onClick: K,
616
+ "onUpdate:dateModelValue": ya,
617
+ "onDate:keydown": Qe,
618
+ "onUpdate:timeModelValue": Sa,
619
+ "onTime:error": Ya,
620
+ "onTime:valid": ba
613
621
  }, null, 8, ["date-model-value", "date-props", "error-message", "show-time-input", "time-model-value", "time-props"])
614
622
  ]),
615
- re("div", null, [
616
- L(u(Ve), {
623
+ oe("div", null, [
624
+ _(u(ze), {
617
625
  stronger: "",
618
626
  el: "span",
619
627
  class: "b-date-range-picker-calendar__label"
620
628
  }, {
621
- default: X(() => [
622
- ye(Te(u(h)("to")), 1)
629
+ default: Z(() => [
630
+ Ye(be(u(h)("to")), 1)
623
631
  ]),
624
632
  _: 1
625
633
  }),
626
- L(u(ca), {
627
- "date-model-value": Ie.value,
634
+ _(u(ma), {
635
+ "date-model-value": Pe.value,
628
636
  "date-props": {
629
637
  ariaLabel: u(h)("dateTo"),
630
- type: ge.value,
631
- description: u(Y) ? void 0 : u(h)(u(se)),
632
- errorMessage: te.value
638
+ type: he.value,
639
+ description: u(b) ? void 0 : u(h)(u(le)),
640
+ errorMessage: x.value
633
641
  },
634
- "error-message": $.value,
642
+ "error-message": fe.value,
635
643
  "show-time-input": r.allowTimeInput,
636
644
  "time-model-value": n.endTime,
637
645
  "time-props": {
638
646
  ariaLabel: u(h)("timeTo"),
639
- errorMessage: $.value
647
+ errorMessage: fe.value
640
648
  },
641
649
  class: "b-date-range-picker-calendar__form-input",
642
- "onUpdate:dateModelValue": Ma,
643
- "onDate:keydown": Ue,
644
- "onUpdate:timeModelValue": Aa,
645
- "onTime:error": Ra,
646
- "onTime:valid": Ya
650
+ onClick: K,
651
+ "onUpdate:dateModelValue": Ra,
652
+ "onDate:keydown": Qe,
653
+ "onUpdate:timeModelValue": wa,
654
+ "onTime:error": Aa,
655
+ "onTime:valid": ka
647
656
  }, null, 8, ["date-model-value", "date-props", "error-message", "show-time-input", "time-model-value", "time-props"])
648
657
  ])
649
658
  ]),
650
- u(Q)("actions") ? (w(), Me("div", Mt, [
651
- Je(a.$slots, "actions", {}, void 0, !0)
652
- ])) : I("", !0)
659
+ u(j)("actions") ? (w(), Re("div", Rt, [
660
+ He(a.$slots, "actions", {}, void 0, !0)
661
+ ])) : O("", !0)
653
662
  ], 2),
654
- !le.value && !u(Y) ? (w(), Me("div", yt, [
655
- L(u(C), {
663
+ !E.value && !u(b) ? (w(), Re("div", Yt, [
664
+ _(u(V), {
665
+ ref_key: "calendarRef",
666
+ ref: ee,
656
667
  value: t,
657
668
  "first-day-of-week": r.firstDayOfWeek,
658
669
  "is-date-disabled": r.isDateDisabled,
659
670
  "max-range": r.maxRange,
660
- min: G.value.min,
661
- max: G.value.max,
671
+ min: ne.value.min,
672
+ max: ne.value.max,
662
673
  "number-of-months": r.numberOfMonths,
663
674
  "show-end-date-on-open": r.showEndDateOnOpen,
664
- granularity: H.value,
675
+ granularity: ae.value,
665
676
  variant: r.variant,
666
677
  "year-range": r.yearRange,
667
678
  "is-range": "",
668
- onInput: Pe,
669
- onStartDateSelected: o,
670
- onEndDateSelected: K
679
+ onInput: o,
680
+ onStartDateSelected: ga,
681
+ onEndDateSelected: Ma
671
682
  }, null, 8, ["value", "first-day-of-week", "is-date-disabled", "max-range", "min", "max", "number-of-months", "show-end-date-on-open", "granularity", "variant", "year-range"])
672
- ])) : I("", !0)
683
+ ])) : O("", !0)
673
684
  ]));
674
685
  }
675
- }), Yt = /* @__PURE__ */ va(Rt, [["__scopeId", "data-v-6dcd7a15"]]), Le = {
686
+ }), kt = /* @__PURE__ */ pa(At, [["__scopeId", "data-v-24c84188"]]), Ue = {
676
687
  "de-DE": { apply: "Anwenden", cancel: "Abbrechen", dateRangePicker: "Datumsbereichauswahl {name}", invalidDateFormat: "Ungültiges Datumsformat", quarter: "Q{quarter} {year}", selectDate: "Wählen Sie ein Datum", selectDateRange: "Wählen Sie einen Datumsbereich aus", selectedDateIsNotAvailable: "Ausgewähltes Datum ist nicht verfügbar" },
677
688
  "en-GB": { apply: "Apply", cancel: "Cancel", dateRangePicker: "Date range picker {name}", invalidDateFormat: "Invalid date format", quarter: "Q{quarter} {year}", selectDate: "Select a date", selectDateRange: "Select a date range", selectedDateIsNotAvailable: "Selected date is not available" },
678
689
  "en-US": { apply: "Apply", cancel: "Cancel", dateRangePicker: "Date range picker {name}", invalidDateFormat: "Invalid date format", quarter: "Q{quarter} {year}", selectDate: "Select a date", selectDateRange: "Select a date range", selectedDateIsNotAvailable: "Selected date is not available" },
@@ -684,24 +695,24 @@ const pa = {
684
695
  "ja-JP": { apply: "適用", cancel: "キャンセル", dateRangePicker: "日付範囲ピッカー {name}", invalidDateFormat: "無効な日付形式", quarter: "{year}年第{quarter}四半期", selectDate: "日付を選択", selectDateRange: "日付範囲を選択", selectedDateIsNotAvailable: "選択した日付は利用できません" },
685
696
  "pt-BR": { apply: "Aplicar", cancel: "Cancelar", dateRangePicker: "Seletor de intervalo de datas {name}", invalidDateFormat: "Formato de data inválido", quarter: "{quarter}º trimestre de {year}", selectDate: "Selecione uma data", selectDateRange: "Selecione um intervalo de datas", selectedDateIsNotAvailable: "A data selecionada não está disponível" },
686
697
  "zh-CN": { apply: "应用", cancel: "取消", dateRangePicker: "日期范围选择器 {name}", invalidDateFormat: "日期格式无效", quarter: "{year} {quarter} 季度", selectDate: "选择日期", selectDateRange: "选择日期范围", selectedDateIsNotAvailable: "所选日期不可用" }
687
- }, bt = ({
698
+ }, St = ({
688
699
  datePickerValue: r,
689
700
  isDateIncorrect: v,
690
- quickSelectRanges: y,
701
+ quickSelectRanges: T,
691
702
  isMonthVariant: i,
692
703
  withTimeInput: c,
693
704
  placeholder: e
694
705
  }) => {
695
- const { locale: s, t: f } = Ce({ messages: Le }), { dateToInputDateString: Q } = _e(), h = (b) => !!b && !isNaN(b.getTime()), k = Ye({
706
+ const { locale: s, t: f } = Le({ messages: Ue }), { dateToInputDateString: j } = _e(), h = (A) => !!A && !isNaN(A.getTime()), k = ke({
696
707
  startDate: null,
697
708
  endDate: null,
698
709
  startTime: null,
699
710
  endTime: null
700
711
  });
701
- return Re(
712
+ return Ae(
702
713
  r,
703
- (b) => {
704
- k.startDate = Q(b?.startDate), k.endDate = Q(b?.endDate), k.startTime = P(b?.startDate), k.endTime = P(b?.endDate);
714
+ (A) => {
715
+ k.startDate = j(A?.startDate), k.endDate = j(A?.endDate), k.startTime = q(A?.startDate), k.endTime = q(A?.endDate);
705
716
  },
706
717
  { immediate: !0 }
707
718
  ), {
@@ -711,28 +722,28 @@ const pa = {
711
722
  return `${k.startDate || ""} - ${k.endDate || ""}`;
712
723
  if (!r.value || !r.value.startDate && !r.value.endDate)
713
724
  return e?.value || f("selectDateRange");
714
- if (y.value?.length) {
715
- const T = y.value.find(({ value: B }) => B === r.value?.range);
716
- if (T)
717
- return T.label;
725
+ if (T.value?.length) {
726
+ const R = T.value.find(({ value: N }) => N === r.value?.range);
727
+ if (R)
728
+ return R.label;
718
729
  }
719
730
  if (r.value.granularity === "quarterly") {
720
- const { startDate: T, endDate: B } = r.value, W = f("quarter", { quarter: ta(T), year: ua(T) });
721
- if (mt(T, B))
722
- return W;
723
- const oe = f("quarter", { quarter: ta(B), year: ua(B) });
724
- return `${W} - ${oe}`;
731
+ const { startDate: R, endDate: N } = r.value, J = f("quarter", { quarter: ra(R), year: da(R) });
732
+ if (pt(R, N))
733
+ return J;
734
+ const ie = f("quarter", { quarter: ra(N), year: da(N) });
735
+ return `${J} - ${ie}`;
725
736
  }
726
737
  if (!h(r.value.startDate) || !h(r.value.endDate))
727
738
  return `${k.startDate || ""} - ${k.endDate || ""}`;
728
- let b = i?.value ? { month: "long", year: "numeric" } : { month: "short", day: "2-digit", year: "numeric" };
729
- return c.value && (b = {
730
- ...b,
739
+ let A = i?.value ? { month: "long", year: "numeric" } : { month: "short", day: "2-digit", year: "numeric" };
740
+ return c.value && (A = {
741
+ ...A,
731
742
  hour: "numeric",
732
743
  minute: "numeric",
733
744
  second: "numeric",
734
745
  hour12: !1
735
- }), $a(s.value, b).formatRange(
746
+ }), Xa(s.value, A).formatRange(
736
747
  r.value.startDate,
737
748
  r.value.endDate
738
749
  );
@@ -741,12 +752,12 @@ const pa = {
741
752
  // Methods
742
753
  formatTextInputDisplayValue: () => ""
743
754
  };
744
- }, At = { class: "b-date-range-picker" }, kt = { class: "b-date-range-picker__footer" }, St = {
745
- i18n: { messages: Le },
755
+ }, wt = { class: "b-date-range-picker" }, Et = { class: "b-date-range-picker__footer" }, Ft = {
756
+ i18n: { messages: Ue },
746
757
  name: "bento-date-range-picker",
747
758
  model: { prop: "modelValue" }
748
- }, wt = /* @__PURE__ */ ze({
749
- ...St,
759
+ }, It = /* @__PURE__ */ Ve({
760
+ ...Ft,
750
761
  props: {
751
762
  allowTimeInput: { type: Boolean },
752
763
  firstDayOfWeek: { default: void 0 },
@@ -775,7 +786,7 @@ const pa = {
775
786
  },
776
787
  emits: ["update:model-value", "input"],
777
788
  setup(r, { emit: v }) {
778
- const y = v, i = r, c = Fa(), { t: e } = Ce({ messages: Le }), { dateToInputDateString: s } = _e(), f = me("bento-date-range-picker-container"), Q = me("bento-date-range-picker-label"), h = me("bento-date-range-picker-description"), k = me("bento-date-range-picker-error"), Y = me("bento-date-range-picker-date-error"), se = m(() => i.label || e("dateRangePicker", { name: f })), { resolvedFirstDayOfWeek: b } = ja(qe(i, "firstDayOfWeek")), T = Oa({
789
+ const T = v, i = r, c = Oa(), { t: e } = Le({ messages: Ue }), { dateToInputDateString: s } = _e(), f = me("bento-date-range-picker-container"), j = me("bento-date-range-picker-label"), h = me("bento-date-range-picker-description"), k = me("bento-date-range-picker-error"), b = me("bento-date-range-picker-date-error"), le = m(() => i.label || e("dateRangePicker", { name: f })), { resolvedFirstDayOfWeek: A } = Za(Be(i, "firstDayOfWeek")), R = Ba({
779
790
  none: 0,
780
791
  one: 710,
781
792
  // width of date range picker with one panes
@@ -783,18 +794,18 @@ const pa = {
783
794
  // width of date range picker with two panes
784
795
  three: 1290
785
796
  // width of date range picker with three panes
786
- }), B = m(() => {
787
- const o = T.active().value, K = {
797
+ }), N = m(() => {
798
+ const o = R.active().value, K = {
788
799
  none: 0,
789
800
  one: 1,
790
801
  two: 2
791
802
  };
792
803
  if (o in K) {
793
- const ne = K[o];
794
- return i.numberOfMonths === void 0 ? ne : Math.min(i.numberOfMonths, ne);
804
+ const G = K[o];
805
+ return i.numberOfMonths === void 0 ? G : Math.min(i.numberOfMonths, G);
795
806
  }
796
807
  return i.numberOfMonths;
797
- }), W = m(() => i?.quickSelectRanges && i.quickSelectRanges.map((o) => {
808
+ }), J = m(() => i?.quickSelectRanges && i.quickSelectRanges.map((o) => {
798
809
  const K = o.data.endDate ? void 0 : new Date(Date.now()).getTime() - o.data.startDate.getTime();
799
810
  return {
800
811
  ...o,
@@ -804,203 +815,203 @@ const pa = {
804
815
  timeDifference: K
805
816
  }
806
817
  };
807
- })), oe = m(() => i.label ? Q : c?.["aria-labelledby"] ?? null), R = F(!1), Z = F(null), le = F(null), t = F(!1), { width: N } = xa(le), { isReadOnly: Ae } = Ka(qe(i, "readonly")), { emitValue: H } = Za(y);
808
- Re(
818
+ })), ie = m(() => i.label ? j : c?.["aria-labelledby"] ?? null), Y = F(!1), ee = F(null), ue = F(null), E = F(!1), { width: t } = Na(ue), { isReadOnly: Q } = tt(Be(i, "readonly")), { emitValue: pe } = rt(T);
819
+ Ae(
809
820
  () => i.disabled,
810
821
  () => {
811
- i.disabled && t.value && (t.value = !1);
822
+ i.disabled && E.value && (E.value = !1);
812
823
  }
813
824
  );
814
- const ke = m(
815
- () => B.value === 0 && N.value > 0 && N.value < 332
825
+ const ae = m(
826
+ () => N.value === 0 && t.value > 0 && t.value < 332
816
827
  // size of date range picker form
817
- ), ee = m(() => i.modelValue || i.value), G = m(() => i.hasActions ? !$.value && R.value : R.value), Se = m(() => ({
818
- "b-date-range-picker__description--error": !!i.errorMessage || G.value
819
- })), ie = m(() => i.variant === "month"), pe = m(() => i.allowTimeInput && i.variant !== "month"), { dateDisplayValue: ae, textInputDisplayValue: A } = bt({
820
- datePickerValue: ee,
821
- isDateIncorrect: R,
822
- quickSelectRanges: W,
823
- isMonthVariant: ie,
824
- withTimeInput: pe,
825
- placeholder: qe(i, "placeholder")
826
- }), ue = m(
827
- () => `${i.description ? h : ""} ${i.errorMessage ? k : ""} ${R.value ? Y : ""}`.trim() || null
828
- ), p = () => {
829
- t.value = !1;
830
- }, M = () => {
831
- t.value = !0;
832
- }, de = F(ae.value), te = F(
828
+ ), te = m(() => i.modelValue || i.value), de = m(() => i.hasActions ? !H.value && Y.value : Y.value), ne = m(() => ({
829
+ "b-date-range-picker__description--error": !!i.errorMessage || de.value
830
+ })), we = m(() => i.variant === "month"), re = m(() => i.allowTimeInput && i.variant !== "month"), { dateDisplayValue: ce, textInputDisplayValue: X } = St({
831
+ datePickerValue: te,
832
+ isDateIncorrect: Y,
833
+ quickSelectRanges: J,
834
+ isMonthVariant: we,
835
+ withTimeInput: re,
836
+ placeholder: Be(i, "placeholder")
837
+ }), I = m(
838
+ () => `${i.description ? h : ""} ${i.errorMessage ? k : ""} ${Y.value ? b : ""}`.trim() || null
839
+ ), W = () => {
840
+ E.value = !1;
841
+ }, y = () => {
842
+ E.value = !0;
843
+ }, M = F(ce.value), se = F(
833
844
  // textInputDisplayValue is a reactive object
834
- structuredClone(Ne(A))
835
- ), O = F(i.modelValue ?? i.value), $ = F(!0), x = m(
836
- () => i.hasActions ? O.value : ee.value
837
- ), n = F(
838
- i.hasActions ? te.value : A
839
- ), fe = m(
840
- () => i.hasActions ? de.value : ae.value
841
- ), j = {
845
+ structuredClone(Ce(X))
846
+ ), x = F(i.modelValue ?? i.value), H = F(!0), fe = m(
847
+ () => i.hasActions ? x.value : te.value
848
+ ), p = F(
849
+ i.hasActions ? se.value : X
850
+ ), n = m(
851
+ () => i.hasActions ? M.value : ce.value
852
+ ), ge = {
842
853
  allowOutsideClick: !0
843
854
  };
844
- ma(() => {
845
- if (i.hasActions || Ke(
855
+ Da(() => {
856
+ if (i.hasActions || Xe(
846
857
  'BentoDateRangePicker "hasActions" property',
847
858
  `Set the BentoDateRangePicker "hasActions" property true which will display the "Apply" and "Cancel" buttons.
848
859
  This will be the default behavior in the v2 and "hasActions" will be removed.`,
849
860
  "2.0.0"
850
- ), i.value && Ke(
861
+ ), i.value && Xe(
851
862
  'BentoDateRangePicker "value" property',
852
863
  'The use of "value" prop in "BentoDateRangePicker" is no longer supported. Use the "v-model" or "model-value" property instead.',
853
864
  "2.0.0"
854
865
  ), i.granularities && i.variant !== "month" && i.granularities.find(({ type: o }) => o === "quarterly"))
855
866
  throw new Error('Quarterly granularity is only supported by BentoDateRangePicker with variant: "month"');
856
867
  });
857
- const ce = () => {
858
- de.value = ae.value, te.value = structuredClone(Ne(A)), n.value = i.hasActions ? te.value : A, O.value = ee.value;
868
+ const $ = () => {
869
+ M.value = ce.value, se.value = structuredClone(Ce(X)), p.value = i.hasActions ? se.value : X, x.value = te.value;
859
870
  };
860
- Re([() => i.value, () => i.modelValue], () => {
861
- ce();
871
+ Ae([() => i.value, () => i.modelValue], () => {
872
+ $();
862
873
  });
863
- const we = () => {
864
- ce(), R.value = !1, $.value = !0, p();
874
+ const Me = () => {
875
+ $(), Y.value = !1, H.value = !0, W();
865
876
  }, Ee = m(() => [
866
877
  {
867
878
  title: e("apply"),
868
879
  event: () => {
869
- H(O.value), p(), $.value = !0;
880
+ pe(x.value), W(), H.value = !0;
870
881
  },
871
- disabled: $.value
882
+ disabled: H.value
872
883
  },
873
884
  {
874
885
  title: e("cancel"),
875
- event: we
886
+ event: Me
876
887
  }
877
888
  ]);
878
- Re(O, (o) => {
889
+ Ae(x, (o) => {
879
890
  if (i.hasActions) {
880
- $.value = R.value || o === ee.value;
891
+ H.value = Y.value || o === te.value;
881
892
  return;
882
893
  }
883
- H(o);
894
+ pe(o);
884
895
  });
885
- const ge = (o) => {
886
- R.value = !1, n.value.startDate = s(o.startDate), n.value.endDate = s(o.endDate), n.value.startTime = P(o.startDate), n.value.endTime = P(o.endDate), O.value = o;
887
- }, Fe = async () => {
888
- R.value && (R.value = !1), O.value = null;
896
+ const Fe = (o) => {
897
+ Y.value = !1, p.value.startDate = s(o.startDate), p.value.endDate = s(o.endDate), p.value.startTime = q(o.startDate), p.value.endTime = q(o.endDate), x.value = o;
898
+ }, he = async () => {
899
+ Y.value && (Y.value = !1), x.value = null;
889
900
  }, Ie = () => {
890
- if (!t.value) {
891
- t.value = !0;
901
+ if (!E.value) {
902
+ E.value = !0;
892
903
  return;
893
904
  }
894
- R.value || (t.value = !1);
895
- }, V = (o) => {
896
- R.value = !1, o.startTime && (n.value.startTime = o.startTime), o.endTime && (n.value.endTime = o.endTime);
905
+ Y.value || (E.value = !1);
897
906
  }, Pe = (o) => {
898
- R.value = !0, n.value.startDate = o.startDate, n.value.endDate = o.endDate, O.value = { startDate: null, endDate: null };
899
- }, J = (o) => {
900
- o && (n.value.startDate = s(o.startDate), n.value.endDate = s(o.endDate), n.value.startTime = P(o.startDate), n.value.endTime = P(o.endDate), O.value = o);
907
+ Y.value = !1, o.startTime && (p.value.startTime = o.startTime), o.endTime && (p.value.endTime = o.endTime);
908
+ }, C = (o) => {
909
+ Y.value = !0, p.value.startDate = o.startDate, p.value.endDate = o.endDate, x.value = { startDate: null, endDate: null };
910
+ }, ye = (o) => {
911
+ o && (p.value.startDate = s(o.startDate), p.value.endDate = s(o.endDate), p.value.startTime = q(o.startDate), p.value.endTime = q(o.endDate), x.value = o);
901
912
  };
902
- return (o, K) => Ia((w(), Me("div", At, [
903
- o.label ? (w(), _(u(dt), {
913
+ return (o, K) => qa((w(), Re("div", wt, [
914
+ o.label ? (w(), L(u(Dt), {
904
915
  key: 0,
905
- id: u(Q),
916
+ id: u(j),
906
917
  label: o.label,
907
918
  "tooltip-text": o.tooltipText,
908
919
  optional: o.optional,
909
920
  required: o.required
910
- }, null, 8, ["id", "label", "tooltip-text", "optional", "required"])) : I("", !0),
911
- re("div", {
921
+ }, null, 8, ["id", "label", "tooltip-text", "optional", "required"])) : O("", !0),
922
+ oe("div", {
912
923
  ref_key: "inputWrapperRef",
913
- ref: le,
914
- onKeydown: He(Ie, ["enter"])
924
+ ref: ue,
925
+ onKeydown: Ke(Ie, ["enter"])
915
926
  }, [
916
- L(u(at), {
927
+ _(u(_a), {
917
928
  ref_key: "inputContainerRef",
918
- ref: Z,
929
+ ref: ee,
919
930
  "always-combobox-is-input": "",
920
931
  ariaControls: u(f),
921
- ariaExpanded: t.value,
922
- "aria-labelledby": oe.value,
923
- "aria-describedby": ue.value,
932
+ ariaExpanded: E.value,
933
+ "aria-labelledby": ie.value,
934
+ "aria-describedby": I.value,
924
935
  "aria-required": o.required,
925
936
  disabled: o.disabled,
926
- "is-invalid": !!o.errorMessage || G.value,
927
- open: t.value,
928
- "display-value": fe.value,
929
- readonly: u(Ae),
930
- onOpen: M,
931
- onClear: Fe,
932
- onClose: p
937
+ "is-invalid": !!o.errorMessage || de.value,
938
+ open: E.value,
939
+ "display-value": n.value,
940
+ readonly: u(Q),
941
+ onOpen: y,
942
+ onClear: he,
943
+ onClose: W
933
944
  }, null, 8, ["ariaControls", "ariaExpanded", "aria-labelledby", "aria-describedby", "aria-required", "disabled", "is-invalid", "open", "display-value", "readonly"])
934
945
  ], 544),
935
- G.value ? (w(), _(u(ia), {
946
+ de.value ? (w(), L(u(ua), {
936
947
  key: 1,
937
- id: u(Y),
948
+ id: u(b),
938
949
  "error-message": u(e)("invalidDateFormat"),
939
950
  class: "b-date-range-picker__error-message"
940
- }, null, 8, ["id", "error-message"])) : I("", !0),
941
- o.errorMessage ? (w(), _(u(ia), {
951
+ }, null, 8, ["id", "error-message"])) : O("", !0),
952
+ o.errorMessage ? (w(), L(u(ua), {
942
953
  key: 2,
943
954
  id: u(k),
944
955
  "error-message": o.errorMessage,
945
956
  class: "b-date-range-picker__error-message"
946
- }, null, 8, ["id", "error-message"])) : I("", !0),
947
- o.description ? (w(), _(u(Ve), {
957
+ }, null, 8, ["id", "error-message"])) : O("", !0),
958
+ o.description ? (w(), L(u(ze), {
948
959
  key: 3,
949
960
  id: u(h),
950
- class: Da(["b-date-range-picker__description", Se.value]),
961
+ class: va(["b-date-range-picker__description", ne.value]),
951
962
  el: "span"
952
963
  }, {
953
- default: X(() => [
954
- ye(Te(o.description), 1)
964
+ default: Z(() => [
965
+ Ye(be(o.description), 1)
955
966
  ]),
956
967
  _: 1
957
- }, 8, ["id", "class"])) : I("", !0),
958
- Z.value ? (w(), _(u(Ba), {
968
+ }, 8, ["id", "class"])) : O("", !0),
969
+ ee.value ? (w(), L(u(za), {
959
970
  key: 4,
960
971
  id: u(f),
961
972
  class: "b-date-range-picker__container",
962
- open: t.value,
963
- "target-element": Z.value,
964
- "aria-label": se.value,
973
+ open: E.value,
974
+ "target-element": ee.value,
975
+ "aria-label": le.value,
965
976
  position: "bottom-start",
966
977
  "fallback-strategy": "initialPlacement",
967
978
  "without-space": "",
968
979
  "fit-content": "",
969
- "match-width": ke.value,
980
+ "match-width": ae.value,
970
981
  "trap-all": "",
971
982
  "overflow-visible": "",
972
- "trap-all-options": j,
973
- onKeydown: He(p, ["esc", "native"])
983
+ "trap-all-options": ge,
984
+ onKeydown: Ke(W, ["esc", "native"])
974
985
  }, {
975
- default: X(() => [
976
- L(u(Yt), {
977
- "allow-time-input": pe.value,
978
- "quick-select-ranges": W.value,
979
- value: x.value,
980
- "first-day-of-week": u(b),
986
+ default: Z(() => [
987
+ _(u(kt), {
988
+ "allow-time-input": re.value,
989
+ "quick-select-ranges": J.value,
990
+ value: fe.value,
991
+ "first-day-of-week": u(A),
981
992
  granularities: o.granularities,
982
993
  "is-date-disabled": o.isDateDisabled,
983
994
  "max-range": o.maxRange,
984
995
  min: o.min,
985
996
  max: o.max,
986
- "number-of-months": B.value,
997
+ "number-of-months": N.value,
987
998
  "show-end-date-on-open": o.showEndDateOnOpen,
988
- "date-form-data": n.value,
999
+ "date-form-data": p.value,
989
1000
  variant: o.variant,
990
1001
  "year-range": o.yearRange,
991
- onCustomRange: J,
992
- onInput: ge,
993
- onError: Pe,
994
- onFormDate: V
995
- }, Pa({ _: 2 }, [
1002
+ onCustomRange: ye,
1003
+ onInput: Fe,
1004
+ onError: C,
1005
+ onFormDate: Pe
1006
+ }, xa({ _: 2 }, [
996
1007
  o.hasActions ? {
997
1008
  name: "actions",
998
- fn: X(() => [
999
- L(u(qa)),
1000
- re("div", kt, [
1001
- L(u(Na), {
1009
+ fn: Z(() => [
1010
+ _(u(Ca)),
1011
+ oe("div", Et, [
1012
+ _(u(Va), {
1002
1013
  actions: Ee.value,
1003
- layout: u(ct).SPACE_BETWEEN
1014
+ layout: u(vt).SPACE_BETWEEN
1004
1015
  }, null, 8, ["actions", "layout"])
1005
1016
  ])
1006
1017
  ]),
@@ -1009,16 +1020,16 @@ const pa = {
1009
1020
  ]), 1032, ["allow-time-input", "quick-select-ranges", "value", "first-day-of-week", "granularities", "is-date-disabled", "max-range", "min", "max", "number-of-months", "show-end-date-on-open", "date-form-data", "variant", "year-range"])
1010
1021
  ]),
1011
1022
  _: 1
1012
- }, 8, ["id", "open", "target-element", "aria-label", "match-width"])) : I("", !0)
1023
+ }, 8, ["id", "open", "target-element", "aria-label", "match-width"])) : O("", !0)
1013
1024
  ])), [
1014
- [u(Xa), p]
1025
+ [u(nt), W]
1015
1026
  ]);
1016
1027
  }
1017
- }), sn = /* @__PURE__ */ va(wt, [["__scopeId", "data-v-84b100ba"]]);
1028
+ }), un = /* @__PURE__ */ pa(It, [["__scopeId", "data-v-84b100ba"]]);
1018
1029
  export {
1019
- sn as B,
1020
- Yt as D,
1021
- Dt as a,
1030
+ un as B,
1031
+ kt as D,
1032
+ ft as a,
1022
1033
  De as i
1023
1034
  };
1024
- //# sourceMappingURL=date-range-picker.CFjZwUb_.js.map
1035
+ //# sourceMappingURL=date-range-picker.BU9R2jNa.js.map