@adyen/bento-vue3 1.96.1 → 1.97.0

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 (176) hide show
  1. package/dist/@types/index.d.ts +159 -125
  2. package/dist/action-bar.js +1 -1
  3. package/dist/ai-tag.js +1 -1
  4. package/dist/alert.js +1 -1
  5. package/dist/assets/accordion-item.css +1 -1
  6. package/dist/assets/action-bar.css +1 -1
  7. package/dist/assets/alert.css +1 -1
  8. package/dist/assets/base-modal.css +1 -1
  9. package/dist/assets/button-actions.css +1 -1
  10. package/dist/assets/calendar.css +1 -1
  11. package/dist/assets/card.css +1 -1
  12. package/dist/assets/country.css +1 -1
  13. package/dist/assets/data-grid.css +1 -1
  14. package/dist/assets/date-picker.css +1 -1
  15. package/dist/assets/date-range-picker.css +1 -1
  16. package/dist/assets/date-time-picker.css +1 -1
  17. package/dist/assets/dialog-page.css +1 -1
  18. package/dist/assets/dropdown.css +1 -1
  19. package/dist/assets/file-uploader.css +1 -1
  20. package/dist/assets/filter-bar.css +1 -1
  21. package/dist/assets/inspector.css +1 -1
  22. package/dist/assets/modal-fullscreen.css +1 -1
  23. package/dist/assets/navigation-menu-group.css +1 -1
  24. package/dist/assets/secondary-nav.css +1 -1
  25. package/dist/assets/sidepanel.css +1 -1
  26. package/dist/assets/summary-grid.css +1 -1
  27. package/dist/assets/textarea.css +1 -1
  28. package/dist/button.js +1 -1
  29. package/dist/card.js +1 -1
  30. package/dist/checkbox.js +2 -2
  31. package/dist/chunks/{action-bar.CIVprT2U.js → action-bar.BEV9uXHS.js} +3 -3
  32. package/dist/chunks/{action-bar.CIVprT2U.js.map → action-bar.BEV9uXHS.js.map} +1 -1
  33. package/dist/chunks/{ai-tag.DkTlRY__.js → ai-tag.BSzY3-0w.js} +2 -2
  34. package/dist/chunks/{ai-tag.DkTlRY__.js.map → ai-tag.BSzY3-0w.js.map} +1 -1
  35. package/dist/chunks/{alert.RD0qOLhx.js → alert.V1imvtyI.js} +3 -3
  36. package/dist/chunks/alert.V1imvtyI.js.map +1 -0
  37. package/dist/chunks/{base-modal.BKtpH-qh.js → base-modal.B7SiRo7c.js} +3 -3
  38. package/dist/chunks/{base-modal.BKtpH-qh.js.map → base-modal.B7SiRo7c.js.map} +1 -1
  39. package/dist/chunks/{button-actions-with-menu.cMAAF47d.js → button-actions-with-menu.DoUcLg-M.js} +2 -2
  40. package/dist/chunks/{button-actions-with-menu.cMAAF47d.js.map → button-actions-with-menu.DoUcLg-M.js.map} +1 -1
  41. package/dist/chunks/{button-actions.CxTxPprd.js → button-actions.CWmTl4cF.js} +170 -161
  42. package/dist/chunks/{button-actions.CxTxPprd.js.map → button-actions.CWmTl4cF.js.map} +1 -1
  43. package/dist/chunks/calendar.6NKd6IMo.js +1272 -0
  44. package/dist/chunks/calendar.6NKd6IMo.js.map +1 -0
  45. package/dist/chunks/{card.CQlyqa5-.js → card.Ca7FkYxy.js} +2 -2
  46. package/dist/chunks/{card.CQlyqa5-.js.map → card.Ca7FkYxy.js.map} +1 -1
  47. package/dist/chunks/{checkbox-group.BcDIXL27.js → checkbox-group.BWx4wn0F.js} +2 -2
  48. package/dist/chunks/{checkbox-group.BcDIXL27.js.map → checkbox-group.BWx4wn0F.js.map} +1 -1
  49. package/dist/chunks/{checkbox.LTRqb-pE.js → checkbox.DwfrmbwI.js} +18 -18
  50. package/dist/chunks/{checkbox.LTRqb-pE.js.map → checkbox.DwfrmbwI.js.map} +1 -1
  51. package/dist/chunks/{code-snippet.DHzB-8JJ.js → code-snippet.Cp61a0Ud.js} +3 -3
  52. package/dist/chunks/{code-snippet.DHzB-8JJ.js.map → code-snippet.Cp61a0Ud.js.map} +1 -1
  53. package/dist/chunks/{country.15m_ATbO.js → country.a-fpQGLP.js} +2 -2
  54. package/dist/chunks/country.a-fpQGLP.js.map +1 -0
  55. package/dist/chunks/{dashboard-section.Da6ZFGtm.js → dashboard-section.BR0xU-b-.js} +2 -2
  56. package/dist/chunks/{dashboard-section.Da6ZFGtm.js.map → dashboard-section.BR0xU-b-.js.map} +1 -1
  57. package/dist/chunks/{dashed-underline.DJmMXcdt.js → dashed-underline.CxpIRlCx.js} +2 -2
  58. package/dist/chunks/{dashed-underline.DJmMXcdt.js.map → dashed-underline.CxpIRlCx.js.map} +1 -1
  59. package/dist/chunks/{data-grid-template.-MuGcJp1.js → data-grid-template.LTILymaF.js} +2 -2
  60. package/dist/chunks/{data-grid-template.-MuGcJp1.js.map → data-grid-template.LTILymaF.js.map} +1 -1
  61. package/dist/chunks/{data-grid.kZgqWqQx.js → data-grid.xcmkjuyg.js} +26 -27
  62. package/dist/chunks/{data-grid.kZgqWqQx.js.map → data-grid.xcmkjuyg.js.map} +1 -1
  63. package/dist/chunks/date-picker.CCETX031.js +279 -0
  64. package/dist/chunks/date-picker.CCETX031.js.map +1 -0
  65. package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -1
  66. package/dist/chunks/date-range-picker.CtGaxtYh.js +1095 -0
  67. package/dist/chunks/date-range-picker.CtGaxtYh.js.map +1 -0
  68. package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -1
  69. package/dist/chunks/{draggable-handle.C1dudqKz.js → draggable-handle.CUecl-HB.js} +2 -2
  70. package/dist/chunks/{draggable-handle.C1dudqKz.js.map → draggable-handle.CUecl-HB.js.map} +1 -1
  71. package/dist/chunks/{dropdown-tag.C1ei1SyR.js → dropdown-tag.BgZYYc_D.js} +2 -2
  72. package/dist/chunks/{dropdown-tag.C1ei1SyR.js.map → dropdown-tag.BgZYYc_D.js.map} +1 -1
  73. package/dist/chunks/dropdown.C97ShfXZ.js +2958 -0
  74. package/dist/chunks/dropdown.C97ShfXZ.js.map +1 -0
  75. package/dist/chunks/{file-uploader.C9YOBRQg.js → file-uploader.CXgAfp0m.js} +2 -2
  76. package/dist/chunks/{file-uploader.C9YOBRQg.js.map → file-uploader.CXgAfp0m.js.map} +1 -1
  77. package/dist/chunks/{filter-bar.CzFtzztU.js → filter-bar.D8BVPHLT.js} +44 -41
  78. package/dist/chunks/filter-bar.D8BVPHLT.js.map +1 -0
  79. package/dist/chunks/{footer-actions.zlKq74F1.js → footer-actions.C_HlJeXP.js} +2 -2
  80. package/dist/chunks/{footer-actions.zlKq74F1.js.map → footer-actions.C_HlJeXP.js.map} +1 -1
  81. package/dist/chunks/{form-layout-title.Kwve4xv2.js → form-layout-title.CWw0poO8.js} +2 -2
  82. package/dist/chunks/{form-layout-title.Kwve4xv2.js.map → form-layout-title.CWw0poO8.js.map} +1 -1
  83. package/dist/chunks/{header-meta.NFZo1ACP.js → header-meta.yBxBW12f.js} +2 -2
  84. package/dist/chunks/{header-meta.NFZo1ACP.js.map → header-meta.yBxBW12f.js.map} +1 -1
  85. package/dist/chunks/{header-with-views.ubPTyW9A.js → header-with-views.qCyKEZW1.js} +8 -8
  86. package/dist/chunks/{header-with-views.ubPTyW9A.js.map → header-with-views.qCyKEZW1.js.map} +1 -1
  87. package/dist/chunks/{header.Ds0sFKBB.js → header.aJLkRe1D.js} +3 -3
  88. package/dist/chunks/{header.Ds0sFKBB.js.map → header.aJLkRe1D.js.map} +1 -1
  89. package/dist/chunks/{input-field-password.CZ-NTpZF.js → input-field-password.DUSoJYKT.js} +3 -3
  90. package/dist/chunks/{input-field-password.CZ-NTpZF.js.map → input-field-password.DUSoJYKT.js.map} +1 -1
  91. package/dist/chunks/{input-field-phone-number.DOHk6gSp.js → input-field-phone-number.Q-bQJL4g.js} +2 -2
  92. package/dist/chunks/{input-field-phone-number.DOHk6gSp.js.map → input-field-phone-number.Q-bQJL4g.js.map} +1 -1
  93. package/dist/chunks/{input-field.DBlTGgAD.js → input-field.CvnmfrzQ.js} +2 -2
  94. package/dist/chunks/{input-field.DBlTGgAD.js.map → input-field.CvnmfrzQ.js.map} +1 -1
  95. package/dist/chunks/{input-time.CHIjCO74.js → input-time.CGPUOOQ9.js} +45 -45
  96. package/dist/chunks/{input-time.CHIjCO74.js.map → input-time.CGPUOOQ9.js.map} +1 -1
  97. package/dist/chunks/{modal-fullscreen.DmruiE3n.js → modal-fullscreen.CBxh_3gU.js} +2 -2
  98. package/dist/chunks/{modal-fullscreen.DmruiE3n.js.map → modal-fullscreen.CBxh_3gU.js.map} +1 -1
  99. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.CrJQWuzb.js → modal.vue_vue_type_script_setup_true_lang.C3xuswtY.js} +4 -4
  100. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.CrJQWuzb.js.map → modal.vue_vue_type_script_setup_true_lang.C3xuswtY.js.map} +1 -1
  101. package/dist/chunks/{pagination.DbpHH_53.js → pagination.cNByWBP1.js} +2 -2
  102. package/dist/chunks/{pagination.DbpHH_53.js.map → pagination.cNByWBP1.js.map} +1 -1
  103. package/dist/chunks/{rich-text-editor.u-V4fNWK.js → rich-text-editor.CJA_d518.js} +3 -3
  104. package/dist/chunks/{rich-text-editor.u-V4fNWK.js.map → rich-text-editor.CJA_d518.js.map} +1 -1
  105. package/dist/chunks/{search-bar.TKgi1KLs.js → search-bar.CLjqWNaI.js} +6 -6
  106. package/dist/chunks/{search-bar.TKgi1KLs.js.map → search-bar.CLjqWNaI.js.map} +1 -1
  107. package/dist/chunks/{secondary-nav.0OsJiAWI.js → secondary-nav.BU47gyEO.js} +2 -2
  108. package/dist/chunks/{secondary-nav.0OsJiAWI.js.map → secondary-nav.BU47gyEO.js.map} +1 -1
  109. package/dist/chunks/{selection-card-group.C59ZIrVm.js → selection-card-group.C2Av3uyz.js} +9 -9
  110. package/dist/chunks/{selection-card-group.C59ZIrVm.js.map → selection-card-group.C2Av3uyz.js.map} +1 -1
  111. package/dist/chunks/{sidepanel.BVQt6Tac.js → sidepanel.Dw2If3qM.js} +3 -3
  112. package/dist/chunks/{sidepanel.BVQt6Tac.js.map → sidepanel.Dw2If3qM.js.map} +1 -1
  113. package/dist/chunks/{summary-grid.types.9sUs0LS0.js → summary-grid.types.Cnrc4ThJ.js} +3 -3
  114. package/dist/chunks/summary-grid.types.Cnrc4ThJ.js.map +1 -0
  115. package/dist/chunks/{timeline-item.DfwOm5do.js → timeline-item.BWhCoOf1.js} +3 -3
  116. package/dist/chunks/{timeline-item.DfwOm5do.js.map → timeline-item.BWhCoOf1.js.map} +1 -1
  117. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.B5-sWGlz.js → tutorial.vue_vue_type_script_setup_true_lang.QWcInKo7.js} +2 -2
  118. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.B5-sWGlz.js.map → tutorial.vue_vue_type_script_setup_true_lang.QWcInKo7.js.map} +1 -1
  119. package/dist/chunks/use-bento-delayed-hover.Csc3nIWt.js.map +1 -1
  120. package/dist/chunks/{use-date-input-formatter.x285YiSd.js → use-date-input-formatter.QXaVIBS0.js} +2 -2
  121. package/dist/chunks/{use-date-input-formatter.x285YiSd.js.map → use-date-input-formatter.QXaVIBS0.js.map} +1 -1
  122. package/dist/code-snippet.js +1 -1
  123. package/dist/country.js +1 -1
  124. package/dist/dashboard-template.js +1 -1
  125. package/dist/dashed-underline.js +1 -1
  126. package/dist/data-grid-template.js +1 -1
  127. package/dist/data-grid.js +1 -1
  128. package/dist/date-picker.js +2 -2
  129. package/dist/date-range-picker.js +2 -2
  130. package/dist/date-time-picker.js +87 -79
  131. package/dist/date-time-picker.js.map +1 -1
  132. package/dist/draggable.js +1 -1
  133. package/dist/dropdown.js +11 -12
  134. package/dist/dropdown.js.map +1 -1
  135. package/dist/file-uploader.js +1 -1
  136. package/dist/filter-bar.js +1 -1
  137. package/dist/form-layout.js +1 -1
  138. package/dist/header-with-views.js +1 -1
  139. package/dist/header.js +1 -1
  140. package/dist/index.js +255 -256
  141. package/dist/index.js.map +1 -1
  142. package/dist/input-field-password.js +1 -1
  143. package/dist/input-field-phone-number.js +1 -1
  144. package/dist/input-field.js +1 -1
  145. package/dist/input-time.js +1 -1
  146. package/dist/internal.js +13 -13
  147. package/dist/menu.js +1 -1
  148. package/dist/modal-fullscreen.js +1 -1
  149. package/dist/modal.js +2 -2
  150. package/dist/pagination.js +1 -1
  151. package/dist/popover.js +1 -1
  152. package/dist/rich-text-editor.js +1 -1
  153. package/dist/search-bar.js +2 -2
  154. package/dist/secondary-nav.js +1 -1
  155. package/dist/selection-card.js +1 -1
  156. package/dist/sidepanel.js +1 -1
  157. package/dist/summary-grid.js +1 -1
  158. package/dist/timeline.js +1 -1
  159. package/dist/tutorial.js +1 -1
  160. package/dist/web-types.json +1 -1
  161. package/package.json +4 -4
  162. package/dist/assets/use-cached-selected-values.css +0 -1
  163. package/dist/chunks/alert.RD0qOLhx.js.map +0 -1
  164. package/dist/chunks/calendar.iQyNwQBL.js +0 -1207
  165. package/dist/chunks/calendar.iQyNwQBL.js.map +0 -1
  166. package/dist/chunks/country.15m_ATbO.js.map +0 -1
  167. package/dist/chunks/date-picker.DyImOUH4.js +0 -277
  168. package/dist/chunks/date-picker.DyImOUH4.js.map +0 -1
  169. package/dist/chunks/date-range-picker.BigC6wm2.js +0 -1019
  170. package/dist/chunks/date-range-picker.BigC6wm2.js.map +0 -1
  171. package/dist/chunks/dropdown.C5um1anU.js +0 -1233
  172. package/dist/chunks/dropdown.C5um1anU.js.map +0 -1
  173. package/dist/chunks/filter-bar.CzFtzztU.js.map +0 -1
  174. package/dist/chunks/summary-grid.types.9sUs0LS0.js.map +0 -1
  175. package/dist/chunks/use-cached-selected-values.DOw5IKdU.js +0 -1740
  176. package/dist/chunks/use-cached-selected-values.DOw5IKdU.js.map +0 -1
@@ -1,1019 +0,0 @@
1
- import { reactive as he, defineComponent as la, useSlots as Ea, ref as _, computed as c, onMounted as ia, openBlock as I, createElementBlock as fe, createElementVNode as L, normalizeClass as ye, unref as u, renderSlot as Qe, createCommentVNode as F, createBlock as P, withCtx as J, createTextVNode as te, toDisplayString as ge, createVNode as V, createSlots as Ee, toRaw as xe, watch as Me, useAttrs as xa, toRef as Ie, withDirectives as Oa, withKeys as Ue } from "vue";
2
- import { b as qa } from "./index.oOAkh64h.js";
3
- import { B as _a } from "./divider.BIY84UH7.js";
4
- import { h as Pa, B as Ba } from "./button-actions.CxTxPprd.js";
5
- import { B as Oe, d as We } from "./typography.B3J6_tYk.js";
6
- import { B as Ca, D as Na } from "./dropdown.C5um1anU.js";
7
- import { g as le } from "./generate-uid.DBWe4g6T.js";
8
- import { u as qe } from "./index.B875RXHM.js";
9
- import { j as ie, k as q, s as h, l as Va, m as je, n as za, f as Ge, o as Qa, q as Ua, r as Wa, t as Le, u as ja, b as N, v as Ga, h as La, i as Ja, e as x, w as Je, x as $e, g as $a } from "./calendar.iQyNwQBL.js";
10
- import { u as _e, a as Ka } from "./use-date-input-formatter.x285YiSd.js";
11
- import { t as Te, n as Ha, c as Xa } from "./en-US.BR6y7foR.js";
12
- import { u as Za } from "./use-form-layout-loading.CWbjZiwP.js";
13
- import { B as et } from "./directive.D1-d-C2K.js";
14
- import { u as at } from "./form-field.D_2g7vaP.js";
15
- import { B as tt } from "./alert.RD0qOLhx.js";
16
- import { B as Ke } from "./input-field.DBlTGgAD.js";
17
- import { B as He, i as Xe } from "./input-time.CHIjCO74.js";
18
- import { B as nt } from "./segmented-control.D6Yvxxpc.js";
19
- import { d as Ze } from "./use-cached-selected-values.DOw5IKdU.js";
20
- import { u as rt } from "./use-has-slot.CyMiImRQ.js";
21
- import { u as st } from "./use-touch-device.DTqFAbXh.js";
22
- import { e as B, a as ea } from "./differenceInMonths.yz4Dfe-b.js";
23
- import { s as aa } from "./startOfWeek.muMEhS7U.js";
24
- import { c as ot } from "./constructNow.DyOJDyZZ.js";
25
- import { s as ta, a as na } from "./set-time-in-date.9-8WOiMT.js";
26
- import { _ as ua } from "./_plugin-vue_export-helper.CHgC5LLL.js";
27
- import { F as lt } from "./field-label.CLV3nSzz.js";
28
- import { E as ra } from "./error-message.Dyvrw6ZB.js";
29
- import { B as it } from "./button-actions.types.BptAXjD8.js";
30
- import "../assets/date-range-picker.css";
31
- function sa(r, p) {
32
- return Te(r, p?.in).getFullYear();
33
- }
34
- function we(r, p) {
35
- return +Te(r) == +Te(p);
36
- }
37
- function ut(r, p, T) {
38
- const [i, D] = Ha(
39
- T?.in,
40
- r,
41
- p
42
- );
43
- return +ie(i) == +ie(D);
44
- }
45
- function oa(r, p) {
46
- const T = Te(r, p?.in);
47
- return T.setMilliseconds(0), T;
48
- }
49
- function Fe(r, p) {
50
- return +oa(r) == +oa(p);
51
- }
52
- function dt(r, p) {
53
- return q(
54
- Xa(r, r),
55
- ot(r)
56
- );
57
- }
58
- const ct = ({
59
- firstDayOfWeek: r,
60
- min: p,
61
- max: T
62
- }) => ({ getGranularCalendarLimits: (D) => {
63
- if (!p && !T)
64
- return { min: null, max: null };
65
- let a = p ? h(p) : null, l = T ? B(T) : null;
66
- if (D?.type === "weekly") {
67
- if (D.earliest)
68
- a = h(D.earliest);
69
- else if (a) {
70
- const v = aa(a, { weekStartsOn: r });
71
- q(a, v) || (a = h(Va(je(a, { weekStartsOn: r }), 1)));
72
- }
73
- if (D.latest)
74
- l = B(D.latest);
75
- else if (l) {
76
- const v = je(l, { weekStartsOn: r });
77
- q(l, v) || (l = B(za(aa(l, { weekStartsOn: r }), 1)));
78
- }
79
- }
80
- if (D?.type === "monthly") {
81
- if (D.earliest)
82
- a = h(D.earliest);
83
- else if (a) {
84
- const v = Ge(a);
85
- q(a, v) || (a = Ge(Qa(a, 1)));
86
- }
87
- if (D.latest)
88
- l = B(D.latest);
89
- else if (l) {
90
- const v = ea(l);
91
- q(l, v) || (l = ea(Ua(l, 1)));
92
- }
93
- }
94
- if (D?.type === "quarterly") {
95
- if (D.earliest)
96
- a = ie(D.earliest);
97
- else if (a) {
98
- const v = ie(a);
99
- q(a, v) || (a = ie(Wa(a, 1)));
100
- }
101
- if (D.latest)
102
- l = B(D.latest);
103
- else if (l) {
104
- const v = Le(l);
105
- q(l, v) || (l = Le(ja(l, 1)));
106
- }
107
- }
108
- return { min: a, max: l };
109
- } }), mt = () => {
110
- const r = he({
111
- daily: null,
112
- weekly: null,
113
- monthly: null,
114
- quarterly: null
115
- });
116
- return {
117
- savedRanges: r,
118
- saveRange: (i, D) => {
119
- r[i] = D;
120
- },
121
- resetSavedRanges: () => {
122
- r.daily = null, r.weekly = null, r.monthly = null, r.quarterly = null;
123
- }
124
- };
125
- };
126
- var m = /* @__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))(m || {});
127
- const da = {
128
- "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", 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", timeFrom: "Zeit von", timeTo: "Zeit bis", weekly: "Wöchentlich" },
129
- "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", 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", timeFrom: "Time from", timeTo: "Time to", weekly: "Weekly" },
130
- "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", 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", timeFrom: "Time from", timeTo: "Time to", weekly: "Weekly" },
131
- "es-ES": { "DD-MM-YYYY": "DD-MM-AAAA", "MM-DD-YYYY": "MM-DD-AAAA", "YYYY-MM-DD": "AAAA-MM-DD", customRange: "Rango personalizado", daily: "Diario", dateFrom: "Fecha desde", dateTo: "Fecha hasta", lastMonth: "El mes pasado", lastSevenDays: "Últimos 7 días", lastThreeMonths: "Últimos tres meses", maxRangeDays: "Puedes seleccionar hasta {count} día | Puedes seleccionar hasta {count} días", maxRangeMonths: "Puedes seleccionar hasta {count} mes | Puedes seleccionar hasta {count} meses", maxRangeQuarters: "Puedes seleccionar hasta {count} trimestre | Puedes seleccionar hasta {count} trimestres", maxRangeWeeks: "Puedes seleccionar hasta {count} semana | Puedes seleccionar hasta {count} semanas", monthly: "Mensualmente", quarterly: "Trimestral", timeFrom: "Hora desde", timeTo: "Hora hasta", weekly: "Semanal" },
132
- "es-MX": { "DD-MM-YYYY": "DD-MM-AAAA", "MM-DD-YYYY": "MM-DD-AAAA", "YYYY-MM-DD": "AAAA-MM-DD", customRange: "Rango personalizado", daily: "Diario", dateFrom: "Fecha de", dateTo: "Fecha hasta", lastMonth: "El mes pasado", lastSevenDays: "Últimos 7 días", lastThreeMonths: "Últimos tres meses", maxRangeDays: "Puedes seleccionar hasta {count} día | Puedes seleccionar hasta {count} días", maxRangeMonths: "Puedes seleccionar hasta {count} mes | Puedes seleccionar hasta {count} meses", maxRangeQuarters: "Puedes seleccionar hasta {count} trimestre | Puedes seleccionar hasta {count} trimestres", maxRangeWeeks: "Puedes seleccionar hasta {count} semana | Puedes seleccionar hasta {count} semanas", monthly: "Mensual", quarterly: "Trimestral", timeFrom: "Tiempo desde", timeTo: "Es hora de", weekly: "Semanal" },
133
- "fr-FR": { "DD-MM-YYYY": "JJ-MM-AAAA", "MM-DD-YYYY": "MM-JJ-AAAA", "YYYY-MM-DD": "AAAA-MM-JJ", customRange: "Plage personnalisée", daily: "Quotidien", dateFrom: "Date de début", dateTo: "Date de fin", lastMonth: "Le mois dernier", lastSevenDays: "7 derniers jours", lastThreeMonths: "Trois derniers mois", maxRangeDays: "Vous pouvez sélectionner jusqu'à {count} jour | Vous pouvez sélectionner jusqu'à {count} jours", maxRangeMonths: "Vous pouvez sélectionner jusqu'à {count} mois | Vous pouvez sélectionner jusqu'à {count} mois", maxRangeQuarters: "Vous pouvez sélectionner jusqu'à {count} trimestre | Vous pouvez sélectionner jusqu'à {count} trimestres", maxRangeWeeks: "Vous pouvez sélectionner jusqu'à {count} semaine | Vous pouvez sélectionner jusqu'à {count} semaines", monthly: "Mensuel", quarterly: "Trimestriel", timeFrom: "Heure de début", timeTo: "Heure de fin", weekly: "Hebdomadaire" },
134
- "it-IT": { "DD-MM-YYYY": "GG-MM-AAAA", "MM-DD-YYYY": "MM-GG-AAAA", "YYYY-MM-DD": "AAAA-MM-GG", customRange: "Intervallo personalizzato", daily: "Giornaliero", dateFrom: "Data da", dateTo: "Da", lastMonth: "Il mese scorso", lastSevenDays: "Ultimi 7 giorni", lastThreeMonths: "Gli ultimi tre mesi", maxRangeDays: "Puoi selezionare fino a {count} giorno | Puoi selezionare fino a {count} giorni", maxRangeMonths: "Puoi selezionare fino a {count} mese | Puoi selezionare fino a {count} mesi", maxRangeQuarters: "Puoi selezionare fino a {count} trimestre | Puoi selezionare fino a {count} trimestri", maxRangeWeeks: "Puoi selezionare fino a {count} settimana | Puoi selezionare fino a {count} settimane", monthly: "Mensile", quarterly: "Trimestrale", timeFrom: "Tempo dal", timeTo: "Tempo fino al", weekly: "Settimanale" },
135
- "ja-JP": { "DD-MM-YYYY": "DD-MM-YYYY", "MM-DD-YYYY": "MM-DD-YYYY", "YYYY-MM-DD": "YYYY-MM-DD", customRange: "カスタム範囲", daily: "毎日", dateFrom: "開始日", dateTo: "終了日", lastMonth: "先月", lastSevenDays: "過去 7 日間", lastThreeMonths: "過去3か月", maxRangeDays: "{count}日間まで選択できます | {count}日間まで選択できます", maxRangeMonths: "{count}か月まで選択できます | {count}か月まで選択できます", maxRangeQuarters: "{count}四半期まで選択できます | {count}四半期まで選択できます", maxRangeWeeks: "{count}週間まで選択できます | {count}週間まで選択できます", monthly: "毎月", quarterly: "四半期ごと", timeFrom: "開始時刻", timeTo: "終了時刻", weekly: "毎週" },
136
- "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é", 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", timeFrom: "Horário a partir de", timeTo: "Horário até", weekly: "Semanal" },
137
- "zh-CN": { "DD-MM-YYYY": "日-月-年", "MM-DD-YYYY": "月-日-年", "YYYY-MM-DD": "年-月-日", customRange: "自定义范围", daily: "每日", dateFrom: "日期自", dateTo: "日期至", lastMonth: "上个月", lastSevenDays: "最近 7 天", lastThreeMonths: "过去三个月", maxRangeDays: "您可以选择最多 {count} 天 | 您可以选择最多 {count} 天", maxRangeMonths: "您可以选择最多 {count} 个月 | 您可以选择最多 {count} 个月", maxRangeQuarters: "您最多可以选择 {count} 个季度 | 您最多可以选择 {count} 个季度", maxRangeWeeks: "您最多可以选择 {count} 周 | 您最多可以选择 {count} 周", monthly: "每月", quarterly: "每季度", timeFrom: "时间自", timeTo: "是时候", weekly: "每周" }
138
- }, Dt = { class: "b-date-range-picker-calendar" }, pt = { class: "b-date-range-picker-calendar__form" }, vt = { key: 0 }, ft = {
139
- key: 0,
140
- class: "b-date-range-picker-calendar__calendars-container",
141
- "data-testid": "date-range-picker-calendar-calendar-container"
142
- }, yt = {
143
- name: "date-range-picker-calendar",
144
- i18n: { messages: da }
145
- }, gt = /* @__PURE__ */ la({
146
- ...yt,
147
- props: {
148
- /**
149
- * Allows user to enter time values in the form
150
- */
151
- allowTimeInput: { type: Boolean, default: !1 },
152
- /**
153
- * Ranges form persistance data
154
- */
155
- dateFormData: {
156
- type: Object,
157
- default: () => ({ startDate: void 0, endDate: void 0, startTime: void 0, endTime: void 0 })
158
- },
159
- /**
160
- * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
161
- */
162
- firstDayOfWeek: N.props.firstDayOfWeek,
163
- /**
164
- * A list of available granularities.
165
- * If present, the date picker will display a segmented control to change granularity.
166
- */
167
- granularities: {
168
- type: Array,
169
- default: null
170
- },
171
- /**
172
- * Indicate if a date should be disabled or not
173
- */
174
- isDateDisabled: N.props.isDateDisabled,
175
- /**
176
- * Set a maximum number of dates to be selectable by the range.
177
- */
178
- maxRange: N.props.maxRange,
179
- /**
180
- * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
181
- */
182
- min: N.props.min,
183
- /**
184
- * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
185
- */
186
- max: N.props.max,
187
- /**
188
- * Number of months rendered on pane
189
- */
190
- numberOfMonths: {
191
- type: N.props.numberOfMonths.type,
192
- default: N.props.numberOfMonths.default,
193
- validator: (r) => r >= 0
194
- },
195
- /**
196
- * Displays the end date's month when the calendar is opened. Defaults to false i.e. the start date's month is displayed.
197
- */
198
- showEndDateOnOpen: { type: Boolean, default: !1 },
199
- /**
200
- * Enables the custom range selector.
201
- * If provided, must be an array that sets the custom range dropdown items. Items are of the structure:
202
- * `label` - label of custom range item.
203
- * `value` - a unique key of the custom range item.
204
- * `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.
205
- */
206
- quickSelectRanges: {
207
- type: Array,
208
- default: void 0
209
- },
210
- /**
211
- * Selected date
212
- */
213
- value: { type: Object, default: void 0 },
214
- /**
215
- * The type of calendar to display. Defaults to showing days.
216
- */
217
- variant: N.props.variant
218
- },
219
- emits: [
220
- m.CUSTOM_RANGE,
221
- m.INPUT,
222
- m.ERROR,
223
- m.FORM_DATE,
224
- m.START_DATE_SELECTED
225
- ],
226
- setup(r, { emit: p }) {
227
- const i = "customRange", D = {
228
- daily: "maxRangeDays",
229
- weekly: "maxRangeWeeks",
230
- monthly: "maxRangeMonths",
231
- quarterly: "maxRangeQuarters"
232
- }, a = r, l = p, v = Ea(), z = rt(v), { t: Y, tc: A } = qe({ messages: da }), { isTouchDevice: k } = st(), {
233
- dateFormat: ne,
234
- isFormatValid: R,
235
- parseDate: g,
236
- onKeyDown: C,
237
- autoFormat: Q,
238
- formatDate: re
239
- } = _e(), b = _({}), Z = c(() => a.variant === "month" ? "monthly" : "daily"), w = c(() => a.numberOfMonths === 0), n = he({
240
- startDate: a.value?.startDate,
241
- endDate: a.value?.endDate,
242
- range: a.value?.range,
243
- ...a.granularities ? {
244
- granularity: a.value?.granularity || Z.value
245
- } : {}
246
- }), E = c(() => (
247
- // eslint-disable-next-line consistent-return
248
- a?.quickSelectRanges?.find(({ value: e, data: t }) => {
249
- if (!t.endDate) {
250
- if (t.isRelativeToNow) {
251
- const d = b.value?.[e];
252
- return d ? we(d.startDate, n.startDate) && we(d.endDate, n.endDate) : (
253
- // If not stored calculated dates, fall back to comparing the quick select item's value
254
- // with the internal range's stored range identifier.
255
- e === n.range
256
- );
257
- }
258
- return we(t.startDate, n.startDate) && dt(n.endDate) && (!a.allowTimeInput || Fe(n.endDate, B(n.endDate))) && (a.granularities ? t.granularity === n.granularity : !0);
259
- }
260
- if (a.allowTimeInput)
261
- return Fe(t.startDate, n.startDate) && Fe(t.endDate, n.endDate) && (a.granularities ? t.granularity === n.granularity : !0);
262
- if (t.endDate)
263
- return q(t.startDate, n.startDate) && q(t.endDate, n.endDate) && (a.granularities ? t.granularity === n.granularity : !0);
264
- })?.value ?? i
265
- )), se = c(() => ({
266
- "b-date-range-picker-calendar__form-input-wrapper": a.allowTimeInput
267
- })), oe = c(() => [
268
- { label: Y("customRange"), value: i },
269
- ...a.quickSelectRanges ? a.quickSelectRanges : []
270
- ]), $ = c(
271
- () => a.granularities?.find(({ type: e }) => e === n.granularity) || null
272
- ), Ye = c(
273
- () => a.granularities?.map(({ type: e, disabled: t }) => ({
274
- label: Y(e),
275
- value: e,
276
- disabled: t
277
- })) ?? []
278
- ), { getGranularCalendarLimits: ue } = ct(a), f = c(
279
- () => a.granularities ? ue($.value) : { min: a.min ? h(a.min) : null, max: a.max ? B(a.max) : null }
280
- ), {
281
- adjustDateForQuarterly: M,
282
- adjustDateForMonthly: Re,
283
- adjustDateForWeekly: K,
284
- adjustStartDateInputForWeekly: be,
285
- adjustEndDateInputForWeekly: de,
286
- adjustStartDateInputForMonthly: ce,
287
- adjustEndDateInputForMonthly: U,
288
- adjustStartDateInputForQuarterly: ee,
289
- adjustEndDateInputForQuarterly: Ae
290
- } = Ga(a.firstDayOfWeek), { savedRanges: W, saveRange: ke, resetSavedRanges: me } = mt(), S = (e) => e ? re(e) : "", H = _(!1), X = _(!1), s = he({
291
- startDate: a.dateFormData.startDate,
292
- endDate: a.dateFormData.endDate,
293
- startTime: a.dateFormData.startTime,
294
- endTime: a.dateFormData.endTime
295
- }), De = (e, t) => {
296
- const d = () => {
297
- if (t && G(t)) {
298
- const y = ta(g(t), e);
299
- if (a.min && y < na(a.min, 0) || a.max && y > na(a.max, 0))
300
- return !1;
301
- }
302
- return !0;
303
- };
304
- return Xe(e) && d();
305
- }, o = c(() => a.variant === "month"), j = (e) => e ? o.value ? La(e) : Ja(e) : "", pe = c(() => j(n.startDate)), ca = c(() => j(n.endDate)), Be = c(() => k.value ? o.value ? "month" : "date" : "text"), ma = c(() => k.value ? pe.value : s.startDate), Da = c(() => k.value ? ca.value : s.endDate), O = (e, t) => !t || !Xe(t) || a.variant === "month" ? e : ta(new Date(e), t), pa = (e) => {
306
- s.startTime = x(
307
- a.min && a.allowTimeInput && q(a.min, e.startDate) ? a.min : h(e.startDate)
308
- ), s.endTime = x(
309
- a.max && a.allowTimeInput && q(a.max, e.endDate) ? a.max : B(e.endDate)
310
- ), n.startDate = O(e.startDate, s.startTime), n.endDate = O(e.endDate, s.endTime), n.range = null, a.granularities && me(), l(m.INPUT, {
311
- ...n,
312
- range: E.value
313
- });
314
- }, G = (e) => {
315
- if (!e)
316
- return !1;
317
- const t = (d) => a.min && h(d) < h(a.min) || a.max && h(d) > h(a.max) ? !1 : a.isDateDisabled ? !a.isDateDisabled(h(d)) : !0;
318
- return R(e) && t(g(e));
319
- };
320
- ia(() => {
321
- H.value = !!(a.dateFormData.startDate && !G(a.dateFormData.startDate)), X.value = !!(a.dateFormData.endDate && !G(a.dateFormData.endDate));
322
- });
323
- const va = (e) => {
324
- s.startDate = S(e), s.startTime || (s.startTime = x(e)), H.value = !1, l(m.START_DATE_SELECTED, e);
325
- }, fa = (e) => {
326
- s.endDate = S(e), s.endTime || (s.endTime = x(B(e))), X.value = !1;
327
- }, Se = (e) => {
328
- const t = a.value[e];
329
- if (t)
330
- return t;
331
- if (a.dateFormData[e] && G(a.dateFormData[e]))
332
- return g(a.dateFormData[e]);
333
- }, Ce = (e) => {
334
- if (G(e)) {
335
- let t = e;
336
- switch (H.value = !1, $.value?.type) {
337
- case "weekly":
338
- t = be(
339
- e,
340
- S,
341
- f.value.min,
342
- f.value.max
343
- ), s.startDate = t;
344
- break;
345
- case "monthly":
346
- t = ce(
347
- e,
348
- S,
349
- f.value.min,
350
- f.value.max
351
- ), s.startDate = t;
352
- break;
353
- case "quarterly":
354
- t = ee(
355
- e,
356
- S,
357
- f.value.min,
358
- f.value.max
359
- ), s.startDate = t;
360
- break;
361
- }
362
- const d = h(g(t));
363
- n.startDate = O(d, s.startTime), n.endDate = O(
364
- h(g(s.endDate)),
365
- s.endTime
366
- ), G(s.endDate) && (n.endDate = O(
367
- h(g(s.endDate)),
368
- s.endTime
369
- ));
370
- const y = Se("endDate");
371
- n.range = null, l(m.FORM_DATE, {
372
- startDate: d,
373
- endDate: y
374
- }), l(m.INPUT, {
375
- ...n,
376
- range: E.value
377
- });
378
- } else
379
- H.value = !0, l(m.ERROR, { ...s });
380
- }, ya = Ze(Ce, 300), ga = (e) => {
381
- if (s.startDate = k.value && o.value ? e : Q(e), k.value)
382
- if (o.value && e) {
383
- const t = Je(e);
384
- n.startDate = O(t, s.startTime), n.range = null, l(m.INPUT, {
385
- ...n,
386
- range: E.value
387
- });
388
- } else
389
- Ce(s.startDate);
390
- else
391
- ya(s.startDate);
392
- }, Ne = (e) => {
393
- if (G(e)) {
394
- let t = e;
395
- switch (X.value = !1, $.value?.type) {
396
- case "weekly":
397
- t = de(
398
- e,
399
- S,
400
- f.value.min,
401
- f.value.max
402
- ), s.endDate = t;
403
- break;
404
- case "monthly":
405
- t = U(
406
- e,
407
- S,
408
- f.value.min,
409
- f.value.max
410
- ), s.endDate = t;
411
- break;
412
- case "quarterly":
413
- t = Ae(
414
- e,
415
- S,
416
- f.value.min,
417
- f.value.max
418
- ), s.endDate = t;
419
- break;
420
- }
421
- const d = h(g(t));
422
- n.endDate = O(d, s.endTime), G(s.startDate) && (n.startDate = O(
423
- h(g(s.startDate)),
424
- s.startTime
425
- ));
426
- const y = Se("startDate");
427
- n.range = null, l(m.FORM_DATE, {
428
- startDate: y,
429
- endDate: d
430
- }), l(m.INPUT, {
431
- ...n,
432
- range: E.value
433
- });
434
- } else
435
- X.value = !0, l(m.ERROR, { ...s });
436
- }, Ma = Ze(Ne, 300), ha = (e) => {
437
- if (s.endDate = k.value && o.value ? e : Q(e), k.value)
438
- if (o.value && e) {
439
- const t = Je(e);
440
- n.endDate = O(t, s.endTime), n.range = null, l(m.INPUT, {
441
- ...n,
442
- range: E.value
443
- });
444
- } else
445
- Ne(s.endDate);
446
- else
447
- Ma(s.endDate);
448
- }, Ve = (e) => {
449
- C(e);
450
- }, Ta = () => {
451
- l(m.ERROR, { ...s });
452
- }, Ya = () => {
453
- const e = s.startTime;
454
- if (!De(e, s.startDate)) {
455
- l(m.ERROR, { ...s });
456
- return;
457
- }
458
- n.startDate = O(n.startDate, e);
459
- const t = Se("endDate");
460
- l(m.FORM_DATE, {
461
- startDate: n.startDate,
462
- endDate: t,
463
- startTime: e,
464
- endTime: s.endTime ?? a.dateFormData.endTime
465
- }), l(m.INPUT, {
466
- ...n,
467
- range: E.value
468
- });
469
- }, Ra = () => {
470
- l(m.ERROR, { ...s });
471
- }, ba = () => {
472
- const e = s.endTime;
473
- if (!De(e, s.endDate)) {
474
- l(m.ERROR, { ...s });
475
- return;
476
- }
477
- n.endDate = O(n.endDate, e), l(m.FORM_DATE, {
478
- startDate: n.startDate,
479
- endDate: n.endDate,
480
- startTime: s.startTime ?? a.dateFormData.startTime,
481
- endTime: e
482
- }), l(m.INPUT, {
483
- ...n,
484
- range: E.value
485
- });
486
- }, Aa = (e) => {
487
- s.startTime = e;
488
- }, ka = (e) => {
489
- s.endTime = e;
490
- }, ve = (e, t, d, y) => {
491
- n.startDate = e, n.endDate = t, d && (n.granularity = d), y && (n.range = y);
492
- }, Sa = (e) => {
493
- const t = a.quickSelectRanges?.find(({ value: d }) => d === e);
494
- if (t) {
495
- me();
496
- const d = t.data, y = d.endDate || (d.isRelativeToNow ? new Date(Date.now()) : B(new Date(Date.now()))), ae = d.isRelativeToNow && d.timeDifference ? new Date(y.getTime() - d.timeDifference) : d.startDate;
497
- s.endDate = S(y), s.startDate = S(ae), ve(ae, y, null, e), a.granularities && (n.granularity = d.granularity || Z.value), s.startTime = x(ae), s.endTime = x(y), n.startDate = ae, n.endDate = y, d.isRelativeToNow && (b.value = {
498
- ...b.value,
499
- [e]: {
500
- startDate: ae,
501
- endDate: y
502
- }
503
- }), l(m.CUSTOM_RANGE, {
504
- ...t.data,
505
- startDate: ae,
506
- endDate: y,
507
- range: t.value
508
- });
509
- }
510
- }, Ia = {
511
- weekly: K,
512
- monthly: Re,
513
- quarterly: M
514
- }, wa = (e) => {
515
- const t = n.granularity;
516
- if (n.granularity = e, t && ke(t, structuredClone(xe(n))), n.startDate && n.endDate) {
517
- switch (e) {
518
- case "quarterly":
519
- case "monthly":
520
- case "weekly": {
521
- if (W[e]) {
522
- ve(W[e].startDate, W[e].endDate, e);
523
- break;
524
- }
525
- const { startDate: d, endDate: y } = Ia[e](
526
- n.startDate,
527
- n.endDate,
528
- f.value.min,
529
- f.value.max
530
- );
531
- ve(d, y, e);
532
- break;
533
- }
534
- case "daily":
535
- W.daily && ve(W.daily.startDate, W.daily.endDate, e);
536
- break;
537
- }
538
- s.startDate = S(n.startDate), s.endDate = S(n.endDate), l(m.INPUT, {
539
- ...n,
540
- range: E.value
541
- });
542
- }
543
- }, Fa = c(() => ({
544
- "b-date-range-picker-calendar__form-container--no-calendars": w.value
545
- })), ze = c(() => {
546
- const e = $.value, t = e?.maxRange || a.maxRange;
547
- if (!t)
548
- return null;
549
- const d = D[e?.type ?? "daily"];
550
- return A(d, t, { count: t });
551
- });
552
- return (e, t) => (I(), fe("div", Dt, [
553
- L("div", {
554
- class: ye(["b-date-range-picker-calendar__form-container", Fa.value]),
555
- "data-testid": "date-range-picker-calendar-form-container"
556
- }, [
557
- L("div", pt, [
558
- u(z)("title") ? Qe(e.$slots, "title", { key: 0 }, void 0, !0) : F("", !0),
559
- r.quickSelectRanges ? (I(), P(Ca, {
560
- key: 1,
561
- "aria-label": u(Y)("customRange"),
562
- items: oe.value,
563
- "model-value": E.value,
564
- "onUpdate:modelValue": Sa
565
- }, null, 8, ["aria-label", "items", "model-value"])) : F("", !0),
566
- r.granularities ? (I(), P(u(nt), {
567
- key: 2,
568
- items: Ye.value,
569
- "model-value": n.granularity,
570
- "full-width": "",
571
- "onUpdate:modelValue": wa
572
- }, null, 8, ["items", "model-value"])) : F("", !0),
573
- ze.value ? (I(), P(u(tt), {
574
- key: 3,
575
- variant: "tip"
576
- }, {
577
- description: J(() => [
578
- te(ge(ze.value), 1)
579
- ]),
580
- _: 1
581
- })) : F("", !0),
582
- L("div", null, [
583
- V(u(Oe), {
584
- stronger: "",
585
- el: "span",
586
- class: "b-date-range-picker-calendar__label"
587
- }, {
588
- default: J(() => t[0] || (t[0] = [
589
- te(" From ")
590
- ])),
591
- _: 1
592
- }),
593
- L("div", {
594
- class: ye(se.value)
595
- }, [
596
- V(u(Ke), {
597
- "aria-label": u(Y)("dateFrom"),
598
- "model-value": ma.value,
599
- error: H.value,
600
- class: "b-date-range-picker-calendar__form-input",
601
- type: Be.value,
602
- "onUpdate:modelValue": ga,
603
- onKeydown: Ve
604
- }, Ee({ _: 2 }, [
605
- u(k) ? void 0 : {
606
- name: "description",
607
- fn: J(() => [
608
- te(ge(u(Y)(u(ne))), 1)
609
- ]),
610
- key: "0"
611
- }
612
- ]), 1032, ["aria-label", "model-value", "error", "type"]),
613
- r.allowTimeInput ? (I(), P(u(He), {
614
- key: 0,
615
- "aria-label": u(Y)("timeFrom"),
616
- "model-value": s.startTime,
617
- class: "b-date-range-picker-calendar__form-input",
618
- "onUpdate:modelValue": Aa,
619
- "onInput:error": Ta,
620
- "onInput:valid": Ya
621
- }, null, 8, ["aria-label", "model-value"])) : F("", !0)
622
- ], 2)
623
- ]),
624
- L("div", null, [
625
- V(u(Oe), {
626
- stronger: "",
627
- el: "span",
628
- class: "b-date-range-picker-calendar__label"
629
- }, {
630
- default: J(() => t[1] || (t[1] = [
631
- te(" To ")
632
- ])),
633
- _: 1
634
- }),
635
- L("div", {
636
- class: ye(se.value)
637
- }, [
638
- V(u(Ke), {
639
- class: "b-date-range-picker-calendar__form-input",
640
- "aria-label": u(Y)("dateTo"),
641
- "model-value": Da.value,
642
- error: X.value,
643
- type: Be.value,
644
- "onUpdate:modelValue": ha,
645
- onKeydown: Ve
646
- }, Ee({ _: 2 }, [
647
- u(k) ? void 0 : {
648
- name: "description",
649
- fn: J(() => [
650
- te(ge(u(Y)(u(ne))), 1)
651
- ]),
652
- key: "0"
653
- }
654
- ]), 1032, ["aria-label", "model-value", "error", "type"]),
655
- r.allowTimeInput ? (I(), P(u(He), {
656
- key: 0,
657
- "aria-label": u(Y)("timeTo"),
658
- "model-value": s.endTime,
659
- class: "b-date-range-picker-calendar__form-input",
660
- "onUpdate:modelValue": ka,
661
- "onInput:error": Ra,
662
- "onInput:valid": ba
663
- }, null, 8, ["aria-label", "model-value"])) : F("", !0)
664
- ], 2)
665
- ])
666
- ]),
667
- u(z)("actions") ? (I(), fe("div", vt, [
668
- Qe(e.$slots, "actions", {}, void 0, !0)
669
- ])) : F("", !0)
670
- ], 2),
671
- !w.value && !u(k) ? (I(), fe("div", ft, [
672
- V(u(N), {
673
- value: n,
674
- "first-day-of-week": r.firstDayOfWeek,
675
- "is-date-disabled": r.isDateDisabled,
676
- "max-range": r.maxRange,
677
- min: f.value.min,
678
- max: f.value.max,
679
- "number-of-months": r.numberOfMonths,
680
- "show-end-date-on-open": r.showEndDateOnOpen,
681
- granularity: $.value,
682
- variant: r.variant,
683
- "is-range": "",
684
- onInput: pa,
685
- onStartDateSelected: va,
686
- onEndDateSelected: fa
687
- }, null, 8, ["value", "first-day-of-week", "is-date-disabled", "max-range", "min", "max", "number-of-months", "show-end-date-on-open", "granularity", "variant"])
688
- ])) : F("", !0)
689
- ]));
690
- }
691
- }), Mt = /* @__PURE__ */ ua(gt, [["__scopeId", "data-v-cb01ce62"]]), Pe = {
692
- "de-DE": { apply: "Anwenden", cancel: "Abbrechen", dateRangePicker: "Datumsbereichauswahl {name}", provideDateInAFormat: "Geben Sie das Datum im Format YYYY-MM-DD an", 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" },
693
- "en-GB": { apply: "Apply", cancel: "Cancel", dateRangePicker: "Date range picker {name}", provideDateInAFormat: "Enter date in YYYY-MM-DD format", quarter: "Q{quarter} {year}", selectDate: "Select a date", selectDateRange: "Select a date range", selectedDateIsNotAvailable: "Selected date is not available" },
694
- "en-US": { apply: "Apply", cancel: "Cancel", dateRangePicker: "Date range picker {name}", provideDateInAFormat: "Provide date in a YYYY-MM-DD format", quarter: "Q{quarter} {year}", selectDate: "Select a date", selectDateRange: "Select a date range", selectedDateIsNotAvailable: "Selected date is not available" },
695
- "es-ES": { apply: "Aplicar", cancel: "Cancelar", dateRangePicker: "Selector de intervalos de fechas {name}", provideDateInAFormat: "Proporciona la fecha en formato AAAAA-MM-DD", quarter: "T{quarter} {year}", selectDate: "Selecciona una fecha", selectDateRange: "Selecciona un rango de fechas", selectedDateIsNotAvailable: "La fecha seleccionada no está disponible" },
696
- "es-MX": { apply: "Aplicar", cancel: "Cancelar", dateRangePicker: "Selector de intervalos de fechas {name}", provideDateInAFormat: "Proporciona la fecha en formato AAAA-MM-DD", quarter: "T{quarter} {year}", selectDate: "Selecciona una fecha", selectDateRange: "Selecciona un rango de fechas", selectedDateIsNotAvailable: "La fecha seleccionada no está disponible" },
697
- "fr-FR": { apply: "Appliquer", cancel: "Annuler", dateRangePicker: "Sélecteur de plages de dates {name}", provideDateInAFormat: "Fournissez la date au format AAAA-MM-JJ", quarter: "T{quarter} {year}", selectDate: "Sélectionnez une date", selectDateRange: "Sélectionnez une plage de dates", selectedDateIsNotAvailable: "La date sélectionnée n’est pas disponible" },
698
- "it-IT": { apply: "Applica", cancel: "Annulla", dateRangePicker: "Selettore intervallo di date {name}", provideDateInAFormat: "Inserisci la data nel formato AAAA-MM-GG", quarter: "Q{quarter} {year}", selectDate: "Seleziona una data", selectDateRange: "Seleziona un intervallo di date", selectedDateIsNotAvailable: "La data selezionata non è disponibile" },
699
- "ja-JP": { apply: "適用", cancel: "キャンセル", dateRangePicker: "日付範囲ピッカー {name}", provideDateInAFormat: "YYYY-MM-DD形式で日付を入力してください", quarter: "{year}年第{quarter}四半期", selectDate: "日付を選択", selectDateRange: "日付範囲を選択", selectedDateIsNotAvailable: "選択した日付は利用できません" },
700
- "pt-BR": { apply: "Aplicar", cancel: "Cancelar", dateRangePicker: "Seletor de intervalo de datas {name}", provideDateInAFormat: "Inclua a data no formato AAAA-MM-DD", quarter: "{quarter}º trimestre de {year}", selectDate: "Selecione uma data", selectDateRange: "Selecione um intervalo de datas", selectedDateIsNotAvailable: "A data selecionada não está disponível" },
701
- "zh-CN": { apply: "应用", cancel: "取消", dateRangePicker: "日期范围选择器 {name}", provideDateInAFormat: "提供年-月-日格式的日期", quarter: "{year} {quarter} 季度", selectDate: "选择日期", selectDateRange: "选择日期范围", selectedDateIsNotAvailable: "所选日期不可用" }
702
- }, ht = ({
703
- datePickerValue: r,
704
- isDateIncorrect: p,
705
- quickSelectRanges: T,
706
- isMonthVariant: i,
707
- withTimeInput: D,
708
- placeholder: a
709
- }) => {
710
- const { locale: l, t: v } = qe({ messages: Pe }), { dateToInputDateString: z } = _e(), Y = (R) => !!R && !isNaN(R.getTime()), A = he({
711
- startDate: null,
712
- endDate: null,
713
- startTime: null,
714
- endTime: null
715
- });
716
- return Me(
717
- r,
718
- (R) => {
719
- A.startDate = z(R?.startDate), A.endDate = z(R?.endDate), A.startTime = x(R?.startDate), A.endTime = x(R?.endDate);
720
- },
721
- { immediate: !0 }
722
- ), {
723
- // Values
724
- dateDisplayValue: c(() => {
725
- if (p.value)
726
- return `${A.startDate || ""} - ${A.endDate || ""}`;
727
- if (!r.value || !r.value.startDate && !r.value.endDate)
728
- return a?.value || v("selectDateRange");
729
- if (T.value?.length) {
730
- const g = T.value.find(({ value: C }) => C === r.value?.range);
731
- if (g)
732
- return g.label;
733
- }
734
- if (r.value.granularity === "quarterly") {
735
- const { startDate: g, endDate: C } = r.value, Q = v("quarter", { quarter: $e(g), year: sa(g) });
736
- if (ut(g, C))
737
- return Q;
738
- const re = v("quarter", { quarter: $e(C), year: sa(C) });
739
- return `${Q} - ${re}`;
740
- }
741
- if (!Y(r.value.startDate) || !Y(r.value.endDate))
742
- return `${A.startDate || ""} - ${A.endDate || ""}`;
743
- let R = i?.value ? { month: "long", year: "numeric" } : { month: "short", day: "2-digit", year: "numeric" };
744
- return D.value && (R = {
745
- ...R,
746
- hour: "numeric",
747
- minute: "numeric",
748
- second: "numeric",
749
- hour12: !1
750
- }), $a(l.value, R).formatRange(
751
- r.value.startDate,
752
- r.value.endDate
753
- );
754
- }),
755
- textInputDisplayValue: A,
756
- // Methods
757
- formatTextInputDisplayValue: () => ""
758
- };
759
- }, Tt = { class: "b-date-range-picker" }, Yt = { class: "b-date-range-picker__footer" }, Rt = {
760
- i18n: { messages: Pe },
761
- name: "bento-date-range-picker",
762
- model: { prop: "modelValue" }
763
- }, bt = /* @__PURE__ */ la({
764
- ...Rt,
765
- props: {
766
- allowTimeInput: { type: Boolean },
767
- firstDayOfWeek: { default: void 0 },
768
- granularities: {},
769
- isDateDisabled: { type: Function, default: void 0 },
770
- showEndDateOnOpen: { type: Boolean, default: !1 },
771
- quickSelectRanges: { default: void 0 },
772
- maxRange: { default: null },
773
- min: { default: null },
774
- max: { default: null },
775
- numberOfMonths: { default: void 0 },
776
- modelValue: { default: null },
777
- value: { default: null },
778
- variant: { default: void 0 },
779
- hasActions: { type: Boolean, default: !1 },
780
- description: { default: void 0 },
781
- disabled: { type: Boolean, default: !1 },
782
- errorMessage: { default: null },
783
- label: { default: void 0 },
784
- optional: { type: Boolean, default: !1 },
785
- placeholder: { default: null },
786
- readonly: { type: Boolean, default: !1 },
787
- required: { type: Boolean, default: !1 },
788
- tooltipText: { default: null }
789
- },
790
- emits: ["update:model-value", "input"],
791
- setup(r, { emit: p }) {
792
- const T = p, i = r, D = xa(), { t: a } = qe({ messages: Pe }), { dateToInputDateString: l } = _e(), v = le("bento-date-range-picker-container"), z = le("bento-date-range-picker-label"), Y = le("bento-date-range-picker-description"), A = le("bento-date-range-picker-error"), k = le("bento-date-range-picker-date-error"), ne = c(() => i.label || a("dateRangePicker", { name: v })), { resolvedFirstDayOfWeek: R } = Ka(Ie(i, "firstDayOfWeek")), g = qa({
793
- none: 0,
794
- one: 710,
795
- // width of date range picker with one panes
796
- two: 1030,
797
- // width of date range picker with two panes
798
- three: 1290
799
- // width of date range picker with three panes
800
- }), C = c(() => {
801
- const o = g.active().value, j = {
802
- none: 0,
803
- one: 1,
804
- two: 2
805
- };
806
- if (o in j) {
807
- const pe = j[o];
808
- return i.numberOfMonths === void 0 ? pe : Math.min(i.numberOfMonths, pe);
809
- }
810
- return i.numberOfMonths;
811
- }), Q = c(() => i?.quickSelectRanges && i.quickSelectRanges.map((o) => {
812
- const j = o.data.endDate ? void 0 : new Date(Date.now()).getTime() - o.data.startDate.getTime();
813
- return {
814
- ...o,
815
- data: {
816
- ...o.data,
817
- // Adding timeDifference to calculate an up-to-date endDate on range selection
818
- timeDifference: j
819
- }
820
- };
821
- })), re = c(() => i.label ? z : D?.["aria-labelledby"] ?? null), b = _(!1), Z = _(null), w = _(!1), { isReadOnly: n } = Za(Ie(i, "readonly")), { emitValue: E } = at(T);
822
- Me(
823
- () => i.disabled,
824
- () => {
825
- i.disabled && w.value && (w.value = !1);
826
- }
827
- );
828
- const se = c(() => i.modelValue || i.value), oe = c(() => i.hasActions ? !ee.value && b.value : b.value), $ = c(() => ({
829
- "b-date-range-picker__description--error": !!i.errorMessage || oe.value
830
- })), Ye = c(() => i.variant === "month"), ue = c(() => i.allowTimeInput && i.variant !== "month"), { dateDisplayValue: f, textInputDisplayValue: M } = ht({
831
- datePickerValue: se,
832
- isDateIncorrect: b,
833
- quickSelectRanges: Q,
834
- isMonthVariant: Ye,
835
- withTimeInput: ue,
836
- placeholder: Ie(i, "placeholder")
837
- }), Re = c(
838
- () => `${i.description ? Y : ""} ${i.errorMessage ? A : ""} ${b.value ? k : ""}`.trim() || null
839
- ), K = () => {
840
- w.value = !1;
841
- }, be = () => {
842
- w.value = !0;
843
- }, de = _(f.value), ce = _(
844
- // textInputDisplayValue is a reactive object
845
- structuredClone(xe(M))
846
- ), U = _(i.modelValue ?? i.value), ee = _(!0), Ae = c(
847
- () => i.hasActions ? ce.value : M
848
- ), W = c(
849
- () => i.hasActions ? de.value : f.value
850
- );
851
- ia(() => {
852
- if (i.hasActions || We(
853
- 'BentoDateRangePicker "hasActions" property',
854
- `Set the BentoDateRangePicker "hasActions" property true which will display the "Apply" and "Cancel" buttons.
855
- This will be the default behavior in the v2 and "hasActions" will be removed.`,
856
- "2.0.0"
857
- ), i.value && We(
858
- 'BentoDateRangePicker "value" property',
859
- 'The use of "value" prop in "BentoDateRangePicker" is no longer supported. Use the "v-model" or "model-value" property instead.',
860
- "2.0.0"
861
- ), i.granularities && i.variant !== "month" && i.granularities.find(({ type: o }) => o === "quarterly"))
862
- throw new Error('Quarterly granularity is only supported by BentoDateRangePicker with variant: "month"');
863
- }), Me([() => i.value, () => i.modelValue], () => {
864
- de.value = f.value, ce.value = structuredClone(xe(M));
865
- });
866
- const ke = c(() => [
867
- {
868
- title: a("apply"),
869
- event: () => {
870
- E(U.value), K(), ee.value = !0;
871
- },
872
- disabled: ee.value
873
- },
874
- {
875
- title: a("cancel"),
876
- event: K
877
- }
878
- ]);
879
- Me(U, (o) => {
880
- if (i.hasActions) {
881
- ee.value = b.value;
882
- return;
883
- }
884
- E(o);
885
- });
886
- const me = (o) => {
887
- b.value = !1, M.startDate = l(o.startDate), M.endDate = l(o.endDate), M.startTime = x(o.startDate), M.endTime = x(o.endDate), U.value = o;
888
- }, S = async () => {
889
- b.value && (b.value = !1), U.value = null;
890
- }, H = () => {
891
- if (!w.value) {
892
- w.value = !0;
893
- return;
894
- }
895
- b.value || (w.value = !1);
896
- }, X = (o) => {
897
- b.value = !1, o.startTime && (M.startTime = o.startTime), o.endTime && (M.endTime = o.endTime);
898
- }, s = (o) => {
899
- b.value = !0, M.startDate = o.startDate, M.endDate = o.endDate, U.value = { startDate: null, endDate: null };
900
- }, De = (o) => {
901
- o && (M.startDate = l(o.startDate), M.endDate = l(o.endDate), M.startTime = x(o.startDate), M.endTime = x(o.endDate), U.value = o);
902
- };
903
- return (o, j) => Oa((I(), fe("div", Tt, [
904
- o.label ? (I(), P(u(lt), {
905
- key: 0,
906
- id: u(z),
907
- label: o.label,
908
- "tooltip-text": o.tooltipText,
909
- optional: o.optional,
910
- required: o.required
911
- }, null, 8, ["id", "label", "tooltip-text", "optional", "required"])) : F("", !0),
912
- L("div", {
913
- onKeydown: Ue(H, ["enter"])
914
- }, [
915
- V(u(Na), {
916
- ref_key: "inputContainerRef",
917
- ref: Z,
918
- "always-combobox-is-input": "",
919
- ariaControls: u(v),
920
- ariaExpanded: w.value,
921
- "aria-labelledby": re.value,
922
- "aria-describedby": Re.value,
923
- "aria-required": o.required,
924
- disabled: o.disabled,
925
- "is-invalid": !!o.errorMessage || oe.value,
926
- open: w.value,
927
- "display-value": W.value,
928
- readonly: u(n),
929
- onOpen: be,
930
- onClear: S,
931
- onClose: K
932
- }, null, 8, ["ariaControls", "ariaExpanded", "aria-labelledby", "aria-describedby", "aria-required", "disabled", "is-invalid", "open", "display-value", "readonly"])
933
- ], 32),
934
- oe.value ? (I(), P(u(ra), {
935
- key: 1,
936
- id: u(k),
937
- "error-message": u(a)("provideDateInAFormat"),
938
- class: "b-date-range-picker__error-message"
939
- }, null, 8, ["id", "error-message"])) : F("", !0),
940
- o.errorMessage ? (I(), P(u(ra), {
941
- key: 2,
942
- id: u(A),
943
- "error-message": o.errorMessage,
944
- class: "b-date-range-picker__error-message"
945
- }, null, 8, ["id", "error-message"])) : F("", !0),
946
- o.description ? (I(), P(u(Oe), {
947
- key: 3,
948
- id: u(Y),
949
- class: ye(["b-date-range-picker__description", $.value]),
950
- el: "span"
951
- }, {
952
- default: J(() => [
953
- te(ge(o.description), 1)
954
- ]),
955
- _: 1
956
- }, 8, ["id", "class"])) : F("", !0),
957
- Z.value ? (I(), P(u(Pa), {
958
- key: 4,
959
- id: u(v),
960
- class: "b-date-range-picker__container",
961
- open: w.value,
962
- "target-element": Z.value,
963
- "aria-label": ne.value,
964
- position: "bottom-start",
965
- "without-space": "",
966
- "fit-content": "",
967
- "trap-all": "",
968
- "overflow-visible": "",
969
- onKeydown: Ue(K, ["esc", "native"])
970
- }, {
971
- default: J(() => [
972
- V(u(Mt), {
973
- "allow-time-input": ue.value,
974
- "quick-select-ranges": Q.value,
975
- value: se.value,
976
- "first-day-of-week": u(R),
977
- granularities: o.granularities,
978
- "is-date-disabled": o.isDateDisabled,
979
- "max-range": o.maxRange,
980
- min: o.min,
981
- max: o.max,
982
- "number-of-months": C.value,
983
- "show-end-date-on-open": o.showEndDateOnOpen,
984
- "date-form-data": Ae.value,
985
- variant: o.variant,
986
- onCustomRange: De,
987
- onInput: me,
988
- onError: s,
989
- onFormDate: X
990
- }, Ee({ _: 2 }, [
991
- o.hasActions ? {
992
- name: "actions",
993
- fn: J(() => [
994
- V(u(_a)),
995
- L("div", Yt, [
996
- V(u(Ba), {
997
- actions: ke.value,
998
- layout: u(it).SPACE_BETWEEN
999
- }, null, 8, ["actions", "layout"])
1000
- ])
1001
- ]),
1002
- key: "0"
1003
- } : void 0
1004
- ]), 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"])
1005
- ]),
1006
- _: 1
1007
- }, 8, ["id", "open", "target-element", "aria-label"])) : F("", !0)
1008
- ])), [
1009
- [u(et), K]
1010
- ]);
1011
- }
1012
- }), en = /* @__PURE__ */ ua(bt, [["__scopeId", "data-v-e00826fe"]]);
1013
- export {
1014
- en as B,
1015
- Mt as D,
1016
- dt as a,
1017
- we as i
1018
- };
1019
- //# sourceMappingURL=date-range-picker.BigC6wm2.js.map