@adyen/bento-vue2 1.90.0 → 1.91.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 (198) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/index.d.ts +254 -109
  3. package/dist/action-bar.js +1 -1
  4. package/dist/ai-tag.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/base-modal.css +1 -1
  8. package/dist/assets/button-actions.css +1 -1
  9. package/dist/assets/card.css +1 -1
  10. package/dist/assets/data-grid.css +1 -1
  11. package/dist/assets/date-picker.css +1 -1
  12. package/dist/assets/date-range-picker.css +1 -1
  13. package/dist/assets/dialog-page.css +1 -1
  14. package/dist/assets/draggable-handle.css +1 -1
  15. package/dist/assets/dropdown.css +1 -1
  16. package/dist/assets/error-message.css +1 -1
  17. package/dist/assets/field-label.css +1 -0
  18. package/dist/assets/file-uploader.css +1 -1
  19. package/dist/assets/filter-bar.css +1 -1
  20. package/dist/assets/form-layout-title.css +1 -1
  21. package/dist/assets/input-field.css +1 -1
  22. package/dist/assets/input-time.css +1 -1
  23. package/dist/assets/inspector.css +1 -1
  24. package/dist/assets/modal-fullscreen.css +1 -1
  25. package/dist/assets/secondary-nav.css +1 -1
  26. package/dist/assets/sidepanel.css +1 -1
  27. package/dist/assets/use-cached-selected-values.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.B63qIiiH.js → action-bar.Dj830k6L.js} +3 -3
  32. package/dist/chunks/{action-bar.B63qIiiH.js.map → action-bar.Dj830k6L.js.map} +1 -1
  33. package/dist/chunks/{ai-tag.CCJCOdXu.js → ai-tag.AyG2UWCB.js} +2 -2
  34. package/dist/chunks/{ai-tag.CCJCOdXu.js.map → ai-tag.AyG2UWCB.js.map} +1 -1
  35. package/dist/chunks/{base-modal.DpmeDmq-.js → base-modal.C52VMtnd.js} +4 -4
  36. package/dist/chunks/{base-modal.DpmeDmq-.js.map → base-modal.C52VMtnd.js.map} +1 -1
  37. package/dist/chunks/{button-actions-with-menu.ChTUOsZl.js → button-actions-with-menu.OsPQ-POD.js} +2 -2
  38. package/dist/chunks/{button-actions-with-menu.ChTUOsZl.js.map → button-actions-with-menu.OsPQ-POD.js.map} +1 -1
  39. package/dist/chunks/{button-actions.BmU1DngD.js → button-actions.Bdbu0bvt.js} +2 -2
  40. package/dist/chunks/{button-actions.BmU1DngD.js.map → button-actions.Bdbu0bvt.js.map} +1 -1
  41. package/dist/chunks/{calendar.uvIGF_jU.js → calendar.CqsfThnC.js} +271 -253
  42. package/dist/chunks/calendar.CqsfThnC.js.map +1 -0
  43. package/dist/chunks/{card.WWUfBkqf.js → card.8z7UQeVK.js} +2 -2
  44. package/dist/chunks/{card.WWUfBkqf.js.map → card.8z7UQeVK.js.map} +1 -1
  45. package/dist/chunks/{checkbox-group.CI0xDnql.js → checkbox-group.Dur2Edtw.js} +4 -4
  46. package/dist/chunks/{checkbox-group.CI0xDnql.js.map → checkbox-group.Dur2Edtw.js.map} +1 -1
  47. package/dist/chunks/{checkbox.TsWA6O3Z.js → checkbox.vNjt6QDJ.js} +18 -18
  48. package/dist/chunks/{checkbox.TsWA6O3Z.js.map → checkbox.vNjt6QDJ.js.map} +1 -1
  49. package/dist/chunks/{click-outside.CDz_x8mN.js → click-outside.BG01Sm0A.js} +2 -2
  50. package/dist/chunks/{click-outside.CDz_x8mN.js.map → click-outside.BG01Sm0A.js.map} +1 -1
  51. package/dist/chunks/{code-snippet.4DX9iUV8.js → code-snippet.BVpFBhKq.js} +3 -3
  52. package/dist/chunks/{code-snippet.4DX9iUV8.js.map → code-snippet.BVpFBhKq.js.map} +1 -1
  53. package/dist/chunks/{controls-group.D_KE99mg.js → controls-group.DSm2Ujwt.js} +2 -2
  54. package/dist/chunks/{controls-group.D_KE99mg.js.map → controls-group.DSm2Ujwt.js.map} +1 -1
  55. package/dist/chunks/{dashboard-section.TWlLdQHG.js → dashboard-section.DNxNVV44.js} +2 -2
  56. package/dist/chunks/{dashboard-section.TWlLdQHG.js.map → dashboard-section.DNxNVV44.js.map} +1 -1
  57. package/dist/chunks/{dashed-underline.CpDuQ3Fo.js → dashed-underline.DL2_sik5.js} +2 -2
  58. package/dist/chunks/{dashed-underline.CpDuQ3Fo.js.map → dashed-underline.DL2_sik5.js.map} +1 -1
  59. package/dist/chunks/{data-grid-template.DZaE-kOS.js → data-grid-template.BFv1zr6g.js} +2 -2
  60. package/dist/chunks/{data-grid-template.DZaE-kOS.js.map → data-grid-template.BFv1zr6g.js.map} +1 -1
  61. package/dist/chunks/{data-grid.x6cEW0az.js → data-grid.ZHY5EzP3.js} +318 -316
  62. package/dist/chunks/{data-grid.x6cEW0az.js.map → data-grid.ZHY5EzP3.js.map} +1 -1
  63. package/dist/chunks/date-picker.kl6aFlr1.js +237 -0
  64. package/dist/chunks/date-picker.kl6aFlr1.js.map +1 -0
  65. package/dist/chunks/{date-range-picker.DPGy2h-9.js → date-range-picker.LCWVAa5R.js} +412 -391
  66. package/dist/chunks/date-range-picker.LCWVAa5R.js.map +1 -0
  67. package/dist/chunks/{directive.rXUeDb8p.js → directive.Bfr4fuOy.js} +2 -2
  68. package/dist/chunks/{directive.rXUeDb8p.js.map → directive.Bfr4fuOy.js.map} +1 -1
  69. package/dist/{draggable-handle.js → chunks/draggable-handle.Ba28eM8o.js} +49 -40
  70. package/dist/chunks/draggable-handle.Ba28eM8o.js.map +1 -0
  71. package/dist/chunks/{dropdown-tag.t3FlJUSy.js → dropdown-tag.B61hPq5n.js} +2 -2
  72. package/dist/chunks/{dropdown-tag.t3FlJUSy.js.map → dropdown-tag.B61hPq5n.js.map} +1 -1
  73. package/dist/chunks/dropdown.Ca-f8tdX.js +1140 -0
  74. package/dist/chunks/dropdown.Ca-f8tdX.js.map +1 -0
  75. package/dist/chunks/error-message.CyERcfdt.js +72 -0
  76. package/dist/chunks/error-message.CyERcfdt.js.map +1 -0
  77. package/dist/chunks/field-label.DjjjkcO6.js +97 -0
  78. package/dist/chunks/field-label.DjjjkcO6.js.map +1 -0
  79. package/dist/chunks/{file-uploader.Cig5gDXT.js → file-uploader.DeWmLpfp.js} +5 -4
  80. package/dist/chunks/{file-uploader.Cig5gDXT.js.map → file-uploader.DeWmLpfp.js.map} +1 -1
  81. package/dist/chunks/{filter-bar.x445KK3y.js → filter-bar.Bd4ghW_B.js} +888 -871
  82. package/dist/chunks/filter-bar.Bd4ghW_B.js.map +1 -0
  83. package/dist/chunks/{footer-actions.CIkul1OD.js → footer-actions.CvUaoMzj.js} +2 -2
  84. package/dist/chunks/{footer-actions.CIkul1OD.js.map → footer-actions.CvUaoMzj.js.map} +1 -1
  85. package/dist/chunks/{form-layout-title.DR5M7GP3.js → form-layout-title.DzGajv4U.js} +70 -61
  86. package/dist/chunks/form-layout-title.DzGajv4U.js.map +1 -0
  87. package/dist/chunks/{header-meta.BC5fdpD1.js → header-meta.AXUGoqDd.js} +2 -2
  88. package/dist/chunks/{header-meta.BC5fdpD1.js.map → header-meta.AXUGoqDd.js.map} +1 -1
  89. package/dist/chunks/{header-with-views.-cvdi9-L.js → header-with-views.Ba4dswJF.js} +10 -10
  90. package/dist/chunks/{header-with-views.-cvdi9-L.js.map → header-with-views.Ba4dswJF.js.map} +1 -1
  91. package/dist/chunks/{header.DtmZjxiU.js → header.C7B7RBib.js} +3 -3
  92. package/dist/chunks/{header.DtmZjxiU.js.map → header.C7B7RBib.js.map} +1 -1
  93. package/dist/chunks/{input-field-password.Bdlw4dzr.js → input-field-password.BNAtIn_D.js} +4 -4
  94. package/dist/chunks/{input-field-password.Bdlw4dzr.js.map → input-field-password.BNAtIn_D.js.map} +1 -1
  95. package/dist/chunks/{input-field-phone-number.DPuWxBBz.js → input-field-phone-number.CEYx1s4b.js} +3 -3
  96. package/dist/chunks/{input-field-phone-number.DPuWxBBz.js.map → input-field-phone-number.CEYx1s4b.js.map} +1 -1
  97. package/dist/chunks/{input-field.DH25CU_G.js → input-field.Dh5W0Az-.js} +74 -70
  98. package/dist/chunks/input-field.Dh5W0Az-.js.map +1 -0
  99. package/dist/chunks/input-time.BLuMfakv.js +135 -0
  100. package/dist/chunks/input-time.BLuMfakv.js.map +1 -0
  101. package/dist/chunks/{modal-fullscreen.CaxuXW-H.js → modal-fullscreen.DTvg2NLk.js} +2 -2
  102. package/dist/chunks/{modal-fullscreen.CaxuXW-H.js.map → modal-fullscreen.DTvg2NLk.js.map} +1 -1
  103. package/dist/chunks/{modal.Brif0vAy.js → modal.D_TcWTkf.js} +4 -4
  104. package/dist/chunks/{modal.Brif0vAy.js.map → modal.D_TcWTkf.js.map} +1 -1
  105. package/dist/chunks/on-click-outside.Cy1eFULD.js +109 -0
  106. package/dist/chunks/on-click-outside.Cy1eFULD.js.map +1 -0
  107. package/dist/chunks/{pagination.BmrU_sn_.js → pagination.D6BxMw5L.js} +37 -37
  108. package/dist/chunks/{pagination.BmrU_sn_.js.map → pagination.D6BxMw5L.js.map} +1 -1
  109. package/dist/chunks/{radio-group.5oS-AeYN.js → radio-group.Bb-L-0io.js} +3 -3
  110. package/dist/chunks/{radio-group.5oS-AeYN.js.map → radio-group.Bb-L-0io.js.map} +1 -1
  111. package/dist/chunks/{rich-text-editor.DSGTe8Zt.js → rich-text-editor.Dtdfh-0V.js} +6 -5
  112. package/dist/chunks/{rich-text-editor.DSGTe8Zt.js.map → rich-text-editor.Dtdfh-0V.js.map} +1 -1
  113. package/dist/chunks/{search-bar.CNfoeLLt.js → search-bar.MVJS9-Mh.js} +4 -4
  114. package/dist/chunks/{search-bar.CNfoeLLt.js.map → search-bar.MVJS9-Mh.js.map} +1 -1
  115. package/dist/chunks/{secondary-nav.IF5CgeIP.js → secondary-nav.C-nPZR-2.js} +2 -2
  116. package/dist/chunks/{secondary-nav.IF5CgeIP.js.map → secondary-nav.C-nPZR-2.js.map} +1 -1
  117. package/dist/chunks/{selection-card-group.DZjFeQKR.js → selection-card-group.CLJPaknG.js} +10 -10
  118. package/dist/chunks/{selection-card-group.DZjFeQKR.js.map → selection-card-group.CLJPaknG.js.map} +1 -1
  119. package/dist/chunks/{sidepanel.DZDXuyzg.js → sidepanel.BTRfwGiS.js} +4 -4
  120. package/dist/chunks/{sidepanel.DZDXuyzg.js.map → sidepanel.BTRfwGiS.js.map} +1 -1
  121. package/dist/chunks/{summary-grid.types.CrPNQbX0.js → summary-grid.types.DUIqCmwg.js} +2 -2
  122. package/dist/chunks/{summary-grid.types.CrPNQbX0.js.map → summary-grid.types.DUIqCmwg.js.map} +1 -1
  123. package/dist/chunks/{textarea.Bi53QF5Q.js → textarea.CJS-1I41.js} +5 -4
  124. package/dist/chunks/{textarea.Bi53QF5Q.js.map → textarea.CJS-1I41.js.map} +1 -1
  125. package/dist/chunks/{timeline-item.C6Bi0eam.js → timeline-item.BOUWkLi1.js} +4 -4
  126. package/dist/chunks/{timeline-item.C6Bi0eam.js.map → timeline-item.BOUWkLi1.js.map} +1 -1
  127. package/dist/chunks/{tutorial.BCiZMLJE.js → tutorial.CZt_mcuT.js} +2 -2
  128. package/dist/chunks/{tutorial.BCiZMLJE.js.map → tutorial.CZt_mcuT.js.map} +1 -1
  129. package/dist/chunks/{use-cached-selected-values.Bn3Y8Iuq.js → use-cached-selected-values.BJbWbkEQ.js} +180 -175
  130. package/dist/chunks/use-cached-selected-values.BJbWbkEQ.js.map +1 -0
  131. package/dist/chunks/{use-date-input-formatter.DRMt9yR2.js → use-date-input-formatter.Djf8AoLr.js} +2 -2
  132. package/dist/chunks/{use-date-input-formatter.DRMt9yR2.js.map → use-date-input-formatter.Djf8AoLr.js.map} +1 -1
  133. package/dist/chunks/use-touch-device.DTqFAbXh.js +11 -0
  134. package/dist/chunks/use-touch-device.DTqFAbXh.js.map +1 -0
  135. package/dist/click-outside.js +1 -1
  136. package/dist/code-snippet.js +1 -1
  137. package/dist/dashboard-template.js +1 -1
  138. package/dist/dashed-underline.js +1 -1
  139. package/dist/data-grid-template.js +1 -1
  140. package/dist/data-grid.js +1 -1
  141. package/dist/date-picker.js +2 -2
  142. package/dist/date-range-picker.js +2 -2
  143. package/dist/draggable.js +1396 -0
  144. package/dist/draggable.js.map +1 -0
  145. package/dist/dropdown.js +11 -12
  146. package/dist/dropdown.js.map +1 -1
  147. package/dist/file-uploader.js +1 -1
  148. package/dist/filter-bar.js +1 -1
  149. package/dist/form-layout.js +1 -1
  150. package/dist/header-with-views.js +1 -1
  151. package/dist/header.js +1 -1
  152. package/dist/index.js +274 -271
  153. package/dist/index.js.map +1 -1
  154. package/dist/input-field-password.js +1 -1
  155. package/dist/input-field-phone-number.js +1 -1
  156. package/dist/input-field.js +1 -1
  157. package/dist/input-time.js +1 -1
  158. package/dist/internal.js +24 -23
  159. package/dist/internal.js.map +1 -1
  160. package/dist/menu.js +1 -1
  161. package/dist/modal-fullscreen.js +1 -1
  162. package/dist/modal.js +2 -2
  163. package/dist/pagination.js +1 -1
  164. package/dist/popover.js +1 -1
  165. package/dist/radio-group.js +1 -1
  166. package/dist/rich-text-editor.js +1 -1
  167. package/dist/search-bar.js +2 -2
  168. package/dist/secondary-nav.js +1 -1
  169. package/dist/selection-card.js +1 -1
  170. package/dist/sidepanel.js +1 -1
  171. package/dist/summary-grid.js +1 -1
  172. package/dist/textarea.js +1 -1
  173. package/dist/timeline.js +1 -1
  174. package/dist/tutorial.js +1 -1
  175. package/dist/web-types.json +100 -4
  176. package/package.json +8 -13
  177. package/dist/assets/dropdown-default-textbox.css +0 -1
  178. package/dist/chunks/calendar.uvIGF_jU.js.map +0 -1
  179. package/dist/chunks/date-picker.Dln8ocL4.js +0 -222
  180. package/dist/chunks/date-picker.Dln8ocL4.js.map +0 -1
  181. package/dist/chunks/date-range-picker.DPGy2h-9.js.map +0 -1
  182. package/dist/chunks/debounce.DUTu11PS.js +0 -10
  183. package/dist/chunks/debounce.DUTu11PS.js.map +0 -1
  184. package/dist/chunks/dropdown-default-textbox.CjhLIxVq.js +0 -364
  185. package/dist/chunks/dropdown-default-textbox.CjhLIxVq.js.map +0 -1
  186. package/dist/chunks/dropdown.CvNI2V33.js +0 -790
  187. package/dist/chunks/dropdown.CvNI2V33.js.map +0 -1
  188. package/dist/chunks/error-message.BUNKRa_w.js +0 -160
  189. package/dist/chunks/error-message.BUNKRa_w.js.map +0 -1
  190. package/dist/chunks/filter-bar.x445KK3y.js.map +0 -1
  191. package/dist/chunks/form-layout-title.DR5M7GP3.js.map +0 -1
  192. package/dist/chunks/input-field.DH25CU_G.js.map +0 -1
  193. package/dist/chunks/input-time.6eJ4-QdU.js +0 -92
  194. package/dist/chunks/input-time.6eJ4-QdU.js.map +0 -1
  195. package/dist/chunks/on-click-outside.BW4rkhzG.js +0 -91
  196. package/dist/chunks/on-click-outside.BW4rkhzG.js.map +0 -1
  197. package/dist/chunks/use-cached-selected-values.Bn3Y8Iuq.js.map +0 -1
  198. package/dist/draggable-handle.js.map +0 -1
@@ -1,137 +1,138 @@
1
- import { reactive as me, defineComponent as Le, useSlots as rt, ref as B, computed as v, onMounted as Ge, toRaw as ye, watch as ce, useAttrs as st, toRef as pe } from "vue";
2
- import { j as ot } from "./index.CwzYJHw2.js";
3
- import { B as lt } from "./divider.DX5gwN7p.js";
4
- import { h as it, B as dt } from "./button-actions.BmU1DngD.js";
5
- import { B as Qe, d as ke } from "./typography.C8lPlsbD.js";
6
- import { B as ut } from "./input-field.DH25CU_G.js";
7
- import { B as ct, i as Se } from "./input-time.6eJ4-QdU.js";
8
- import { B as mt } from "./dropdown.CvNI2V33.js";
9
- import { B as Dt } from "./segmented-control.DDtjX-V5.js";
10
- import { u as Me } from "./index.B6WW_F-J.js";
11
- import { d as Fe } from "./debounce.DUTu11PS.js";
12
- import { u as pt } from "./use-has-slot.C9lQZ6nz.js";
13
- import { u as ge, a as ft } from "./use-date-input-formatter.DRMt9yR2.js";
14
- import { e as Ue, f as re, i as F, h, j as vt, k as Ee, l as yt, s as Oe, m as Mt, n as Ce, b as N, u as gt, o as I, g as Tt } from "./calendar.uvIGF_jU.js";
15
- import { e as x, a as we } from "./differenceInMonths.CIYECBxK.js";
16
- import { s as Be } from "./startOfWeek.CXhhX-R7.js";
17
- import { t as L, n as Yt, c as ht } from "./en-US.YeSsZuOc.js";
18
- import { c as At } from "./constructNow.CIc7d13I.js";
19
- import { n as je } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
20
- import { D as Rt } from "./dropdown-default-textbox.CjhLIxVq.js";
1
+ import { reactive as ve, defineComponent as We, useSlots as ft, ref as B, computed as m, onMounted as ze, toRaw as Ae, watch as fe, useAttrs as vt, toRef as Te } from "vue";
2
+ import { j as yt } from "./index.CwzYJHw2.js";
3
+ import { B as Mt } from "./divider.DX5gwN7p.js";
4
+ import { h as gt, B as Tt } from "./button-actions.Bdbu0bvt.js";
5
+ import { B as $e, d as Ce } from "./typography.C8lPlsbD.js";
6
+ import { B as ht } from "./input-field.Dh5W0Az-.js";
7
+ import { B as Yt, i as we } from "./input-time.BLuMfakv.js";
8
+ import { B as At, D as Rt } from "./dropdown.Ca-f8tdX.js";
9
+ import { B as bt } from "./segmented-control.DDtjX-V5.js";
10
+ import { u as Re } from "./index.B6WW_F-J.js";
11
+ import { d as Be } from "./use-cached-selected-values.BJbWbkEQ.js";
12
+ import { u as It } from "./use-has-slot.C9lQZ6nz.js";
13
+ import { u as be, a as _t } from "./use-date-input-formatter.Djf8AoLr.js";
14
+ import { u as kt } from "./use-touch-device.DTqFAbXh.js";
15
+ import { h as He, i as re, j as w, k as A, l as St, m as qe, n as Ft, s as xe, o as Et, q as Ne, b as N, u as Ot, e as Ct, f as wt, r as O, p as Pe, g as Bt } from "./calendar.CqsfThnC.js";
16
+ import { e as q, a as Le } from "./differenceInMonths.CIYECBxK.js";
17
+ import { s as Ge } from "./startOfWeek.CXhhX-R7.js";
18
+ import { t as P, n as qt, c as xt } from "./en-US.YeSsZuOc.js";
19
+ import { c as Nt } from "./constructNow.CIc7d13I.js";
20
+ import { n as Ve } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
21
21
  import { g as ne } from "./generate-uid.NJ8tVoha.js";
22
- import { u as bt } from "./use-form-layout-loading.CWbjZiwP.js";
22
+ import { u as Pt } from "./use-form-layout-loading.CWbjZiwP.js";
23
23
  import "./index.Cl4_42j5.js";
24
- import { u as It } from "./form-field.D_2g7vaP.js";
25
- import { B as _t } from "./directive.rXUeDb8p.js";
26
- import { F as kt, E as St } from "./error-message.BUNKRa_w.js";
27
- import { B as Ft } from "./button-actions.types.BptAXjD8.js";
24
+ import { u as Lt } from "./form-field.D_2g7vaP.js";
25
+ import { B as Gt } from "./directive.Bfr4fuOy.js";
26
+ import { F as Ut } from "./field-label.DjjjkcO6.js";
27
+ import { E as Qt } from "./error-message.CyERcfdt.js";
28
+ import { B as jt } from "./button-actions.types.BptAXjD8.js";
28
29
  import "../assets/date-range-picker.css";
29
- function Je(s, a, e) {
30
- return Ue(s, a * 3, e);
30
+ function Ke(s, a, e) {
31
+ return He(s, a * 3, e);
31
32
  }
32
- function xe(s, a) {
33
- const e = L(s, a == null ? void 0 : a.in);
33
+ function Ue(s, a) {
34
+ const e = P(s, a == null ? void 0 : a.in);
34
35
  return Math.trunc(e.getMonth() / 3) + 1;
35
36
  }
36
- function qe(s, a) {
37
- return L(s, a == null ? void 0 : a.in).getFullYear();
37
+ function Qe(s, a) {
38
+ return P(s, a == null ? void 0 : a.in).getFullYear();
38
39
  }
39
- function fe(s, a) {
40
- return +L(s) == +L(a);
40
+ function he(s, a) {
41
+ return +P(s) == +P(a);
41
42
  }
42
- function Et(s, a, e) {
43
- const [t, l] = Yt(
43
+ function Jt(s, a, e) {
44
+ const [t, l] = qt(
44
45
  e == null ? void 0 : e.in,
45
46
  s,
46
47
  a
47
48
  );
48
49
  return +re(t) == +re(l);
49
50
  }
50
- function Pe(s, a) {
51
- const e = L(s, a == null ? void 0 : a.in);
51
+ function je(s, a) {
52
+ const e = P(s, a == null ? void 0 : a.in);
52
53
  return e.setMilliseconds(0), e;
53
54
  }
54
- function ve(s, a) {
55
- return +Pe(s) == +Pe(a);
55
+ function Ye(s, a) {
56
+ return +je(s) == +je(a);
56
57
  }
57
- function Ot(s, a) {
58
- return F(
59
- ht(s, s),
60
- At(s)
58
+ function Wt(s, a) {
59
+ return w(
60
+ xt(s, s),
61
+ Nt(s)
61
62
  );
62
63
  }
63
- function Ct(s, a, e) {
64
- const t = L(s, e == null ? void 0 : e.in);
64
+ function zt(s, a, e) {
65
+ const t = P(s, e == null ? void 0 : e.in);
65
66
  return t.setHours(a), t;
66
67
  }
67
- function Ne(s, a, e) {
68
- const t = L(s, e == null ? void 0 : e.in);
68
+ function Je(s, a, e) {
69
+ const t = P(s, e == null ? void 0 : e.in);
69
70
  return t.setMilliseconds(a), t;
70
71
  }
71
- function wt(s, a, e) {
72
- const t = L(s, e == null ? void 0 : e.in);
72
+ function $t(s, a, e) {
73
+ const t = P(s, e == null ? void 0 : e.in);
73
74
  return t.setMinutes(a), t;
74
75
  }
75
- function Bt(s, a, e) {
76
- const t = L(s, e == null ? void 0 : e.in);
76
+ function Ht(s, a, e) {
77
+ const t = P(s, e == null ? void 0 : e.in);
77
78
  return t.setSeconds(a), t;
78
79
  }
79
- function xt(s, a, e) {
80
- return Je(s, -1, e);
80
+ function Vt(s, a, e) {
81
+ return Ke(s, -1, e);
81
82
  }
82
- const qt = ({
83
+ const Kt = ({
83
84
  firstDayOfWeek: s,
84
85
  min: a,
85
86
  max: e
86
87
  }) => ({ getGranularCalendarLimits: (l) => {
87
88
  if (!a && !e)
88
89
  return { min: null, max: null };
89
- let m = a ? h(a) : null, D = e ? x(e) : null;
90
+ let D = a ? A(a) : null, p = e ? q(e) : null;
90
91
  if ((l == null ? void 0 : l.type) === "weekly") {
91
92
  if (l.earliest)
92
- m = h(l.earliest);
93
- else if (m) {
94
- const y = Be(m, { weekStartsOn: s });
95
- F(m, y) || (m = h(vt(Ee(m, { weekStartsOn: s }), 1)));
93
+ D = A(l.earliest);
94
+ else if (D) {
95
+ const y = Ge(D, { weekStartsOn: s });
96
+ w(D, y) || (D = A(St(qe(D, { weekStartsOn: s }), 1)));
96
97
  }
97
98
  if (l.latest)
98
- D = x(l.latest);
99
- else if (D) {
100
- const y = Ee(D, { weekStartsOn: s });
101
- F(D, y) || (D = x(yt(Be(D, { weekStartsOn: s }), 1)));
99
+ p = q(l.latest);
100
+ else if (p) {
101
+ const y = qe(p, { weekStartsOn: s });
102
+ w(p, y) || (p = q(Ft(Ge(p, { weekStartsOn: s }), 1)));
102
103
  }
103
104
  }
104
105
  if ((l == null ? void 0 : l.type) === "monthly") {
105
106
  if (l.earliest)
106
- m = h(l.earliest);
107
- else if (m) {
108
- const y = Oe(m);
109
- F(m, y) || (m = Oe(Ue(m, 1)));
107
+ D = A(l.earliest);
108
+ else if (D) {
109
+ const y = xe(D);
110
+ w(D, y) || (D = xe(He(D, 1)));
110
111
  }
111
112
  if (l.latest)
112
- D = x(l.latest);
113
- else if (D) {
114
- const y = we(D);
115
- F(D, y) || (D = we(Mt(D, 1)));
113
+ p = q(l.latest);
114
+ else if (p) {
115
+ const y = Le(p);
116
+ w(p, y) || (p = Le(Et(p, 1)));
116
117
  }
117
118
  }
118
119
  if ((l == null ? void 0 : l.type) === "quarterly") {
119
120
  if (l.earliest)
120
- m = re(l.earliest);
121
- else if (m) {
122
- const y = re(m);
123
- F(m, y) || (m = re(Je(m, 1)));
121
+ D = re(l.earliest);
122
+ else if (D) {
123
+ const y = re(D);
124
+ w(D, y) || (D = re(Ke(D, 1)));
124
125
  }
125
126
  if (l.latest)
126
- D = x(l.latest);
127
- else if (D) {
128
- const y = Ce(D);
129
- F(D, y) || (D = Ce(xt(D)));
127
+ p = q(l.latest);
128
+ else if (p) {
129
+ const y = Ne(p);
130
+ w(p, y) || (p = Ne(Vt(p)));
130
131
  }
131
132
  }
132
- return { min: m, max: D };
133
- } }), Pt = () => {
134
- const s = me({
133
+ return { min: D, max: p };
134
+ } }), Xt = () => {
135
+ const s = ve({
135
136
  daily: null,
136
137
  weekly: null,
137
138
  monthly: null,
@@ -147,8 +148,8 @@ const qt = ({
147
148
  }
148
149
  };
149
150
  };
150
- var f = /* @__PURE__ */ ((s) => (s.CUSTOM_RANGE = "custom-range", s.INPUT = "input", s.ERROR = "error", s.FORM_DATE = "form-date", s.START_DATE_SELECTED = "start-date-selected", s))(f || {});
151
- const Nt = {
151
+ var v = /* @__PURE__ */ ((s) => (s.CUSTOM_RANGE = "custom-range", s.INPUT = "input", s.ERROR = "error", s.FORM_DATE = "form-date", s.START_DATE_SELECTED = "start-date-selected", s))(v || {});
152
+ const Zt = {
152
153
  "de-DE": {
153
154
  "DD-MM-YYYY": "TT-MM-JJJJ",
154
155
  "MM-DD-YYYY": "JJJJ-MM-TT",
@@ -319,11 +320,11 @@ const Nt = {
319
320
  timeTo: "是时候",
320
321
  weekly: "每周"
321
322
  }
322
- }, Lt = {
323
+ }, ea = {
323
324
  name: "date-range-picker-calendar",
324
- i18n: { messages: Nt }
325
- }, Gt = /* @__PURE__ */ Le({
326
- ...Lt,
325
+ i18n: { messages: Zt }
326
+ }, ta = /* @__PURE__ */ We({
327
+ ...ea,
327
328
  props: {
328
329
  /**
329
330
  * Allows user to enter time values in the form
@@ -397,344 +398,364 @@ const Nt = {
397
398
  variant: N.props.variant
398
399
  },
399
400
  emits: [
400
- f.CUSTOM_RANGE,
401
- f.INPUT,
402
- f.ERROR,
403
- f.FORM_DATE,
404
- f.START_DATE_SELECTED
401
+ v.CUSTOM_RANGE,
402
+ v.INPUT,
403
+ v.ERROR,
404
+ v.FORM_DATE,
405
+ v.START_DATE_SELECTED
405
406
  ],
406
407
  setup(s, { emit: a }) {
407
- var Re, be, Ie, _e;
408
- const e = s, t = 300, l = "customRange", m = rt(), D = pt(m), { t: y } = Me(), {
408
+ var Se, Fe, Ee, Oe;
409
+ const e = s, t = 300, l = "customRange", D = ft(), p = It(D), { t: y } = Re(), { isTouchDevice: _ } = kt(), {
409
410
  dateFormat: U,
410
- isFormatValid: G,
411
- parseDate: M,
411
+ isFormatValid: R,
412
+ parseDate: F,
412
413
  onKeyDown: X,
413
- autoFormat: $,
414
- formatDate: p
415
- } = ge(), q = B({}), R = v(() => e.variant === "month" ? "monthly" : "daily"), E = v(() => e.numberOfMonths === 0), r = me({
416
- startDate: (Re = e.value) == null ? void 0 : Re.startDate,
417
- endDate: (be = e.value) == null ? void 0 : be.endDate,
418
- range: (Ie = e.value) == null ? void 0 : Ie.range,
414
+ autoFormat: f,
415
+ formatDate: Q
416
+ } = be(), k = B({}), C = m(() => e.variant === "month" ? "monthly" : "daily"), M = m(() => e.numberOfMonths === 0), r = ve({
417
+ startDate: (Se = e.value) == null ? void 0 : Se.startDate,
418
+ endDate: (Fe = e.value) == null ? void 0 : Fe.endDate,
419
+ range: (Ee = e.value) == null ? void 0 : Ee.range,
419
420
  ...e.granularities ? {
420
- granularity: ((_e = e.value) == null ? void 0 : _e.granularity) || R.value
421
+ granularity: ((Oe = e.value) == null ? void 0 : Oe.granularity) || C.value
421
422
  } : {}
422
- }), _ = v(() => {
423
- var n, d;
423
+ }), T = m(() => {
424
+ var n, i;
424
425
  return (
425
426
  // eslint-disable-next-line consistent-return
426
- ((d = (n = e == null ? void 0 : e.quickSelectRanges) == null ? void 0 : n.find(({ value: i, data: u }) => {
427
+ ((i = (n = e == null ? void 0 : e.quickSelectRanges) == null ? void 0 : n.find(({ value: d, data: u }) => {
427
428
  var Y;
428
429
  if (!u.endDate) {
429
430
  if (u.isRelativeToNow) {
430
- const b = (Y = q.value) == null ? void 0 : Y[i];
431
- return b ? fe(b.startDate, r.startDate) && fe(b.endDate, r.endDate) : (
431
+ const S = (Y = k.value) == null ? void 0 : Y[d];
432
+ return S ? he(S.startDate, r.startDate) && he(S.endDate, r.endDate) : (
432
433
  // If not stored calculated dates, fall back to comparing the quick select item's value
433
434
  // with the internal range's stored range identifier.
434
- i === r.range
435
+ d === r.range
435
436
  );
436
437
  }
437
- return fe(u.startDate, r.startDate) && Ot(r.endDate) && (!e.allowTimeInput || ve(r.endDate, x(r.endDate))) && (e.granularities ? u.granularity === r.granularity : !0);
438
+ return he(u.startDate, r.startDate) && Wt(r.endDate) && (!e.allowTimeInput || Ye(r.endDate, q(r.endDate))) && (e.granularities ? u.granularity === r.granularity : !0);
438
439
  }
439
440
  if (e.allowTimeInput)
440
- return ve(u.startDate, r.startDate) && ve(u.endDate, r.endDate) && (e.granularities ? u.granularity === r.granularity : !0);
441
+ return Ye(u.startDate, r.startDate) && Ye(u.endDate, r.endDate) && (e.granularities ? u.granularity === r.granularity : !0);
441
442
  if (u.endDate)
442
- return F(u.startDate, r.startDate) && F(u.endDate, r.endDate) && (e.granularities ? u.granularity === r.granularity : !0);
443
- })) == null ? void 0 : d.value) ?? l
443
+ return w(u.startDate, r.startDate) && w(u.endDate, r.endDate) && (e.granularities ? u.granularity === r.granularity : !0);
444
+ })) == null ? void 0 : i.value) ?? l
444
445
  );
445
- }), O = v(() => ({
446
+ }), ye = m(() => ({
446
447
  "b-date-range-picker-calendar__form-input-wrapper": e.allowTimeInput
447
- })), De = v(() => [
448
+ })), Z = m(() => [
448
449
  { label: y("customRange"), value: l },
449
450
  ...e.quickSelectRanges ? e.quickSelectRanges : []
450
- ]), Q = v(
451
+ ]), j = m(
451
452
  () => {
452
453
  var n;
453
- return ((n = e.granularities) == null ? void 0 : n.find(({ type: d }) => d === r.granularity)) || null;
454
+ return ((n = e.granularities) == null ? void 0 : n.find(({ type: i }) => i === r.granularity)) || null;
454
455
  }
455
- ), se = v(
456
+ ), se = m(
456
457
  () => {
457
458
  var n;
458
- return ((n = e.granularities) == null ? void 0 : n.map(({ type: d, disabled: i }) => ({
459
- label: y(d),
460
- value: d,
461
- disabled: i
459
+ return ((n = e.granularities) == null ? void 0 : n.map(({ type: i, disabled: d }) => ({
460
+ label: y(i),
461
+ value: i,
462
+ disabled: d
462
463
  }))) ?? [];
463
464
  }
464
- ), { getGranularCalendarLimits: Z } = qt(e), T = v(
465
- () => e.granularities ? Z(Q.value) : { min: e.min ? h(e.min) : null, max: e.max ? x(e.max) : null }
465
+ ), { getGranularCalendarLimits: oe } = Kt(e), h = m(
466
+ () => e.granularities ? oe(j.value) : { min: e.min ? A(e.min) : null, max: e.max ? q(e.max) : null }
466
467
  ), {
467
468
  adjustDateForQuarterly: ee,
468
- adjustDateForMonthly: te,
469
- adjustDateForWeekly: j,
470
- adjustStartDateInputForWeekly: g,
471
- adjustEndDateInputForWeekly: oe,
472
- adjustStartDateInputForMonthly: le,
473
- adjustEndDateInputForMonthly: H,
474
- adjustStartDateInputForQuarterly: ie,
475
- adjustEndDateInputForQuarterly: K
476
- } = gt(e.firstDayOfWeek), { savedRanges: k, saveRange: C, resetSavedRanges: P } = Pt(), A = (n) => n ? p(n) : "", J = B(!1), W = B(!1), o = me({
469
+ adjustDateForMonthly: J,
470
+ adjustDateForWeekly: g,
471
+ adjustStartDateInputForWeekly: le,
472
+ adjustEndDateInputForWeekly: ie,
473
+ adjustStartDateInputForMonthly: $,
474
+ adjustEndDateInputForMonthly: de,
475
+ adjustStartDateInputForQuarterly: H,
476
+ adjustEndDateInputForQuarterly: V
477
+ } = Ot(e.firstDayOfWeek), { savedRanges: b, saveRange: L, resetSavedRanges: te } = Xt(), I = (n) => n ? Q(n) : "", W = B(!1), K = B(!1), o = ve({
477
478
  startDate: e.dateFormData.startDate,
478
479
  endDate: e.dateFormData.endDate,
479
480
  startTime: e.dateFormData.startTime,
480
481
  endTime: e.dateFormData.endTime
481
- }), de = (n, d) => {
482
- let i = new Date(n);
483
- const [u, Y, b] = d.split(":");
484
- return i = Ct(i, parseInt(u, 10)), i = wt(i, parseInt(Y, 10)), i = Bt(i, parseInt(b, 10)), i;
485
- }, ue = (n, d) => {
486
- const i = () => {
487
- if (d && w(d)) {
488
- const u = de(M(d), n);
489
- if (e.min && u < Ne(e.min, 0) || e.max && u > Ne(e.max, 0))
482
+ }), ue = (n, i) => {
483
+ let d = new Date(n);
484
+ const [u, Y, S] = i.split(":");
485
+ return d = zt(d, parseInt(u, 10)), d = $t(d, parseInt(Y, 10)), d = Ht(d, parseInt(S, 10)), d;
486
+ }, ce = (n, i) => {
487
+ const d = () => {
488
+ if (i && x(i)) {
489
+ const u = ue(F(i), n);
490
+ if (e.min && u < Je(e.min, 0) || e.max && u > Je(e.max, 0))
490
491
  return !1;
491
492
  }
492
493
  return !0;
493
494
  };
494
- return Se(n) && i();
495
- }, S = (n, d) => !d || !Se(d) || e.variant === "month" ? n : de(new Date(n), d), Te = (n) => {
496
- o.startTime = I(
497
- e.min && e.allowTimeInput && F(e.min, n.startDate) ? e.min : h(n.startDate)
498
- ), o.endTime = I(
499
- e.max && e.allowTimeInput && F(e.max, n.endDate) ? e.max : x(n.endDate)
500
- ), r.startDate = S(n.startDate, o.startTime), r.endDate = S(n.endDate, o.endTime), r.range = null, e.granularities && P(), a(f.INPUT, {
495
+ return we(n) && d();
496
+ }, G = m(() => e.variant === "month"), De = (n) => n ? G.value ? Ct(n) : wt(n) : "", c = m(() => De(r.startDate)), z = m(() => De(r.endDate)), me = m(() => _.value ? G.value ? "month" : "date" : "text"), Xe = m(() => _.value ? c.value : o.startDate), Ze = m(() => _.value ? z.value : o.endDate), E = (n, i) => !i || !we(i) || e.variant === "month" ? n : ue(new Date(n), i), et = (n) => {
497
+ o.startTime = O(
498
+ e.min && e.allowTimeInput && w(e.min, n.startDate) ? e.min : A(n.startDate)
499
+ ), o.endTime = O(
500
+ e.max && e.allowTimeInput && w(e.max, n.endDate) ? e.max : q(n.endDate)
501
+ ), r.startDate = E(n.startDate, o.startTime), r.endDate = E(n.endDate, o.endTime), r.range = null, e.granularities && te(), a(v.INPUT, {
501
502
  ...r,
502
- range: _.value
503
+ range: T.value
503
504
  });
504
- }, w = (n) => {
505
+ }, x = (n) => {
505
506
  if (!n)
506
507
  return !1;
507
- const d = (i) => e.min && h(i) < h(e.min) || e.max && h(i) > h(e.max) ? !1 : e.isDateDisabled ? !e.isDateDisabled(h(i)) : !0;
508
- return G(n) && d(M(n));
508
+ const i = (d) => e.min && A(d) < A(e.min) || e.max && A(d) > A(e.max) ? !1 : e.isDateDisabled ? !e.isDateDisabled(A(d)) : !0;
509
+ return R(n) && i(F(n));
509
510
  };
510
- Ge(() => {
511
- J.value = !!(e.dateFormData.startDate && !w(e.dateFormData.startDate)), W.value = !!(e.dateFormData.endDate && !w(e.dateFormData.endDate));
511
+ ze(() => {
512
+ W.value = !!(e.dateFormData.startDate && !x(e.dateFormData.startDate)), K.value = !!(e.dateFormData.endDate && !x(e.dateFormData.endDate));
512
513
  });
513
- const c = (n) => {
514
- o.startDate = A(n), o.startTime || (o.startTime = I(n)), J.value = !1, a(f.START_DATE_SELECTED, n);
515
- }, V = (n) => {
516
- o.endDate = A(n), o.endTime || (o.endTime = I(x(n))), W.value = !1;
517
- }, z = (n) => {
518
- const d = e.value[n];
519
- if (d)
520
- return d;
521
- if (e.dateFormData[n] && w(e.dateFormData[n]))
522
- return M(e.dateFormData[n]);
523
- }, Ye = Fe((n) => {
524
- var d;
525
- if (w(n)) {
526
- let i = n;
527
- switch (J.value = !1, (d = Q.value) == null ? void 0 : d.type) {
514
+ const tt = (n) => {
515
+ o.startDate = I(n), o.startTime || (o.startTime = O(n)), W.value = !1, a(v.START_DATE_SELECTED, n);
516
+ }, at = (n) => {
517
+ o.endDate = I(n), o.endTime || (o.endTime = O(q(n))), K.value = !1;
518
+ }, pe = (n) => {
519
+ const i = e.value[n];
520
+ if (i)
521
+ return i;
522
+ if (e.dateFormData[n] && x(e.dateFormData[n]))
523
+ return F(e.dateFormData[n]);
524
+ }, Me = (n) => {
525
+ var i;
526
+ if (x(n)) {
527
+ let d = n;
528
+ switch (W.value = !1, (i = j.value) == null ? void 0 : i.type) {
528
529
  case "weekly":
529
- i = g(
530
+ d = le(
530
531
  n,
531
- A,
532
- T.value.min,
533
- T.value.max
534
- ), o.startDate = i;
532
+ I,
533
+ h.value.min,
534
+ h.value.max
535
+ ), o.startDate = d;
535
536
  break;
536
537
  case "monthly":
537
- i = le(
538
+ d = $(
538
539
  n,
539
- A,
540
- T.value.min,
541
- T.value.max
542
- ), o.startDate = i;
540
+ I,
541
+ h.value.min,
542
+ h.value.max
543
+ ), o.startDate = d;
543
544
  break;
544
545
  case "quarterly":
545
- i = ie(
546
+ d = H(
546
547
  n,
547
- A,
548
- T.value.min,
549
- T.value.max
550
- ), o.startDate = i;
548
+ I,
549
+ h.value.min,
550
+ h.value.max
551
+ ), o.startDate = d;
551
552
  break;
552
553
  }
553
- const u = h(M(i));
554
- r.startDate = S(u, o.startTime), r.endDate = S(
555
- h(M(o.endDate)),
554
+ const u = A(F(d));
555
+ r.startDate = E(u, o.startTime), r.endDate = E(
556
+ A(F(o.endDate)),
556
557
  o.endTime
557
- ), w(o.endDate) && (r.endDate = S(
558
- h(M(o.endDate)),
558
+ ), x(o.endDate) && (r.endDate = E(
559
+ A(F(o.endDate)),
559
560
  o.endTime
560
561
  ));
561
- const Y = z("endDate");
562
- r.range = null, a(f.FORM_DATE, {
562
+ const Y = pe("endDate");
563
+ r.range = null, a(v.FORM_DATE, {
563
564
  startDate: u,
564
565
  endDate: Y
565
- }), a(f.INPUT, {
566
+ }), a(v.INPUT, {
566
567
  ...r,
567
- range: _.value
568
+ range: T.value
568
569
  });
569
570
  } else
570
- J.value = !0, a(f.ERROR, { ...o });
571
- }, t), We = (n) => {
572
- o.startDate = $(n), Ye(o.startDate);
573
- }, he = Fe((n) => {
574
- var d;
575
- if (w(n)) {
576
- let i = n;
577
- switch (W.value = !1, (d = Q.value) == null ? void 0 : d.type) {
571
+ W.value = !0, a(v.ERROR, { ...o });
572
+ }, Ie = Be(Me, t), nt = (n) => {
573
+ if (o.startDate = _.value && G.value ? n : f(n), _.value)
574
+ if (G.value && n) {
575
+ const i = Pe(n);
576
+ r.startDate = E(i, o.startTime), r.range = null, a(v.INPUT, {
577
+ ...r,
578
+ range: T.value
579
+ });
580
+ } else
581
+ Me(o.startDate);
582
+ else
583
+ Ie(o.startDate);
584
+ }, ge = (n) => {
585
+ var i;
586
+ if (x(n)) {
587
+ let d = n;
588
+ switch (K.value = !1, (i = j.value) == null ? void 0 : i.type) {
578
589
  case "weekly":
579
- i = oe(
590
+ d = ie(
580
591
  n,
581
- A,
582
- T.value.min,
583
- T.value.max
584
- ), o.endDate = i;
592
+ I,
593
+ h.value.min,
594
+ h.value.max
595
+ ), o.endDate = d;
585
596
  break;
586
597
  case "monthly":
587
- i = H(
598
+ d = de(
588
599
  n,
589
- A,
590
- T.value.min,
591
- T.value.max
592
- ), o.endDate = i;
600
+ I,
601
+ h.value.min,
602
+ h.value.max
603
+ ), o.endDate = d;
593
604
  break;
594
605
  case "quarterly":
595
- i = K(
606
+ d = V(
596
607
  n,
597
- A,
598
- T.value.min,
599
- T.value.max
600
- ), o.endDate = i;
608
+ I,
609
+ h.value.min,
610
+ h.value.max
611
+ ), o.endDate = d;
601
612
  break;
602
613
  }
603
- const u = h(M(i));
604
- r.endDate = S(u, o.endTime), w(o.startDate) && (r.startDate = S(
605
- h(M(o.startDate)),
614
+ const u = A(F(d));
615
+ r.endDate = E(u, o.endTime), x(o.startDate) && (r.startDate = E(
616
+ A(F(o.startDate)),
606
617
  o.startTime
607
618
  ));
608
- const Y = z("startDate");
609
- r.range = null, a(f.FORM_DATE, {
619
+ const Y = pe("startDate");
620
+ r.range = null, a(v.FORM_DATE, {
610
621
  startDate: Y,
611
622
  endDate: u
612
- }), a(f.INPUT, {
623
+ }), a(v.INPUT, {
613
624
  ...r,
614
- range: _.value
625
+ range: T.value
615
626
  });
616
627
  } else
617
- W.value = !0, a(f.ERROR, { ...o });
618
- }, t), ze = (n) => {
619
- o.endDate = $(n), he(o.endDate);
620
- }, $e = (n) => {
628
+ K.value = !0, a(v.ERROR, { ...o });
629
+ }, _e = Be(ge, t), rt = (n) => {
630
+ if (o.endDate = _.value && G.value ? n : f(n), _.value)
631
+ if (G.value && n) {
632
+ const i = Pe(n);
633
+ r.endDate = E(i, o.endTime), r.range = null, a(v.INPUT, {
634
+ ...r,
635
+ range: T.value
636
+ });
637
+ } else
638
+ ge(o.endDate);
639
+ else
640
+ _e(o.endDate);
641
+ }, st = (n) => {
621
642
  X(n);
622
- }, He = () => {
623
- a(f.ERROR, { ...o });
624
- }, Ke = () => {
643
+ }, ot = () => {
644
+ a(v.ERROR, { ...o });
645
+ }, lt = () => {
625
646
  const n = o.startTime;
626
- if (!ue(n, o.startDate)) {
627
- a(f.ERROR, { ...o });
647
+ if (!ce(n, o.startDate)) {
648
+ a(v.ERROR, { ...o });
628
649
  return;
629
650
  }
630
- r.startDate = S(r.startDate, n);
631
- const d = z("endDate");
632
- a(f.FORM_DATE, {
651
+ r.startDate = E(r.startDate, n);
652
+ const i = pe("endDate");
653
+ a(v.FORM_DATE, {
633
654
  startDate: r.startDate,
634
- endDate: d,
655
+ endDate: i,
635
656
  startTime: n,
636
657
  endTime: o.endTime ?? e.dateFormData.endTime
637
- }), a(f.INPUT, {
658
+ }), a(v.INPUT, {
638
659
  ...r,
639
- range: _.value
660
+ range: T.value
640
661
  });
641
- }, Ve = () => {
642
- a(f.ERROR, { ...o });
643
- }, Xe = () => {
662
+ }, it = () => {
663
+ a(v.ERROR, { ...o });
664
+ }, dt = () => {
644
665
  const n = o.endTime;
645
- if (!ue(n, o.endDate)) {
646
- a(f.ERROR, { ...o });
666
+ if (!ce(n, o.endDate)) {
667
+ a(v.ERROR, { ...o });
647
668
  return;
648
669
  }
649
- r.endDate = S(r.endDate, n), a(f.FORM_DATE, {
670
+ r.endDate = E(r.endDate, n), a(v.FORM_DATE, {
650
671
  startDate: r.startDate,
651
672
  endDate: r.endDate,
652
673
  startTime: o.startTime ?? e.dateFormData.startTime,
653
674
  endTime: n
654
- }), a(f.INPUT, {
675
+ }), a(v.INPUT, {
655
676
  ...r,
656
- range: _.value
677
+ range: T.value
657
678
  });
658
- }, Ze = (n) => {
679
+ }, ut = (n) => {
659
680
  o.startTime = n;
660
- }, et = (n) => {
681
+ }, ct = (n) => {
661
682
  o.endTime = n;
662
- }, ae = (n, d, i, u) => {
663
- r.startDate = n, r.endDate = d, i && (r.granularity = i), u && (r.range = u);
664
- }, tt = (n) => {
665
- var i;
666
- const d = (i = e.quickSelectRanges) == null ? void 0 : i.find(({ value: u }) => u === n);
667
- if (d) {
668
- P();
669
- const u = d.data, Y = u.endDate || (u.isRelativeToNow ? new Date(Date.now()) : x(new Date(Date.now()))), b = u.isRelativeToNow && u.timeDifference ? new Date(Y.getTime() - u.timeDifference) : u.startDate;
670
- o.endDate = A(Y), o.startDate = A(b), ae(b, Y, null, n), e.granularities && (r.granularity = u.granularity || R.value), o.startTime = I(b), o.endTime = I(Y), r.startDate = b, r.endDate = Y, u.isRelativeToNow && (q.value = {
671
- ...q.value,
683
+ }, ae = (n, i, d, u) => {
684
+ r.startDate = n, r.endDate = i, d && (r.granularity = d), u && (r.range = u);
685
+ }, Dt = (n) => {
686
+ var d;
687
+ const i = (d = e.quickSelectRanges) == null ? void 0 : d.find(({ value: u }) => u === n);
688
+ if (i) {
689
+ te();
690
+ const u = i.data, Y = u.endDate || (u.isRelativeToNow ? new Date(Date.now()) : q(new Date(Date.now()))), S = u.isRelativeToNow && u.timeDifference ? new Date(Y.getTime() - u.timeDifference) : u.startDate;
691
+ o.endDate = I(Y), o.startDate = I(S), ae(S, Y, null, n), e.granularities && (r.granularity = u.granularity || C.value), o.startTime = O(S), o.endTime = O(Y), r.startDate = S, r.endDate = Y, u.isRelativeToNow && (k.value = {
692
+ ...k.value,
672
693
  [n]: {
673
- startDate: b,
694
+ startDate: S,
674
695
  endDate: Y
675
696
  }
676
- }), a(f.CUSTOM_RANGE, {
677
- ...d.data,
678
- startDate: b,
697
+ }), a(v.CUSTOM_RANGE, {
698
+ ...i.data,
699
+ startDate: S,
679
700
  endDate: Y,
680
- range: d.value
701
+ range: i.value
681
702
  });
682
703
  }
683
- }, Ae = {
684
- weekly: j,
685
- monthly: te,
704
+ }, ke = {
705
+ weekly: g,
706
+ monthly: J,
686
707
  quarterly: ee
687
- }, at = (n) => {
688
- const d = r.granularity;
689
- if (r.granularity = n, d && C(d, structuredClone(ye(r))), r.startDate && r.endDate) {
708
+ }, mt = (n) => {
709
+ const i = r.granularity;
710
+ if (r.granularity = n, i && L(i, structuredClone(Ae(r))), r.startDate && r.endDate) {
690
711
  switch (n) {
691
712
  case "quarterly":
692
713
  case "monthly":
693
714
  case "weekly": {
694
- if (k[n]) {
695
- ae(k[n].startDate, k[n].endDate, n);
715
+ if (b[n]) {
716
+ ae(b[n].startDate, b[n].endDate, n);
696
717
  break;
697
718
  }
698
- const { startDate: i, endDate: u } = Ae[n](
719
+ const { startDate: d, endDate: u } = ke[n](
699
720
  r.startDate,
700
721
  r.endDate,
701
- T.value.min,
702
- T.value.max
722
+ h.value.min,
723
+ h.value.max
703
724
  );
704
- ae(i, u, n);
725
+ ae(d, u, n);
705
726
  break;
706
727
  }
707
728
  case "daily":
708
- k.daily && ae(k.daily.startDate, k.daily.endDate, n);
729
+ b.daily && ae(b.daily.startDate, b.daily.endDate, n);
709
730
  break;
710
731
  }
711
- o.startDate = A(r.startDate), o.endDate = A(r.endDate), a(f.INPUT, {
732
+ o.startDate = I(r.startDate), o.endDate = I(r.endDate), a(v.INPUT, {
712
733
  ...r,
713
- range: _.value
734
+ range: T.value
714
735
  });
715
736
  }
716
- }, nt = v(() => ({
717
- "b-date-range-picker-calendar__form-container--no-calendars": E.value
737
+ }, pt = m(() => ({
738
+ "b-date-range-picker-calendar__form-container--no-calendars": M.value
718
739
  }));
719
- return { __sfc: !0, FORM_INPUT_DEBOUNCE_TIME: t, RANGE_SELECTOR_CUSTOM_RANGE_KEY: l, props: e, emit: a, slots: m, hasSlot: D, t: y, dateFormat: U, isFormatValid: G, parseDate: M, onKeyDown: X, autoFormat: $, formatDateUtil: p, calculatedIsRelativeToNowQuickSelectRanges: q, defaultGranularity: R, hasNoCalendars: E, internalRangeDate: r, selectedRangeSelectorValue: _, formInputWrapperConditionalClasses: O, quickSelectRangeDefaultItems: De, selectedGranularity: Q, granularityItems: se, getGranularCalendarLimits: Z, computedMinMax: T, adjustDateForQuarterly: ee, adjustDateForMonthly: te, adjustDateForWeekly: j, adjustStartDateInputForWeekly: g, adjustEndDateInputForWeekly: oe, adjustStartDateInputForMonthly: le, adjustEndDateInputForMonthly: H, adjustStartDateInputForQuarterly: ie, adjustEndDateInputForQuarterly: K, savedRanges: k, saveRange: C, resetSavedRanges: P, formatDate: A, startDateError: J, endDateError: W, dateTextInput: o, setTimeInDateObject: de, isValidTime: ue, setTimeInDateRef: S, onDateInput: Te, isValidDate: w, onStartDateSelected: c, onEndDateSelected: V, getDate: z, validateStartDate: Ye, onStartDateInput: We, validateEndDate: he, onEndDateInput: ze, onDateInputKeyDown: $e, onStartTimeError: He, onStartTimeValid: Ke, onEndTimeError: Ve, onEndTimeValid: Xe, onStartTimeInput: Ze, onEndTimeInput: et, setInternalRange: ae, onRangeSelectorInput: tt, adjustDate: Ae, onGranularityInput: at, computedFormContainerClasses: nt, Calendar: N, BentoTypography: Qe, BentoInputField: ut, BentoInputTime: ct, BentoDropdown: mt, BentoSegmentedControl: Dt };
740
+ return { __sfc: !0, FORM_INPUT_DEBOUNCE_TIME: t, RANGE_SELECTOR_CUSTOM_RANGE_KEY: l, props: e, emit: a, slots: D, hasSlot: p, t: y, isTouchDevice: _, dateFormat: U, isFormatValid: R, parseDate: F, onKeyDown: X, autoFormat: f, formatDateUtil: Q, calculatedIsRelativeToNowQuickSelectRanges: k, defaultGranularity: C, hasNoCalendars: M, internalRangeDate: r, selectedRangeSelectorValue: T, formInputWrapperConditionalClasses: ye, quickSelectRangeDefaultItems: Z, selectedGranularity: j, granularityItems: se, getGranularCalendarLimits: oe, computedMinMax: h, adjustDateForQuarterly: ee, adjustDateForMonthly: J, adjustDateForWeekly: g, adjustStartDateInputForWeekly: le, adjustEndDateInputForWeekly: ie, adjustStartDateInputForMonthly: $, adjustEndDateInputForMonthly: de, adjustStartDateInputForQuarterly: H, adjustEndDateInputForQuarterly: V, savedRanges: b, saveRange: L, resetSavedRanges: te, formatDate: I, startDateError: W, endDateError: K, dateTextInput: o, setTimeInDateObject: ue, isValidTime: ce, isMonthVariant: G, formatNativeDate: De, nativeStartDate: c, nativeEndDate: z, dateInputType: me, startDateValue: Xe, endDateValue: Ze, setTimeInDateRef: E, onDateInput: et, isValidDate: x, onStartDateSelected: tt, onEndDateSelected: at, getDate: pe, validateStartDate: Me, validateStartDateDebounced: Ie, onStartDateInput: nt, validateEndDate: ge, validateEndDateDebounced: _e, onEndDateInput: rt, onDateInputKeyDown: st, onStartTimeError: ot, onStartTimeValid: lt, onEndTimeError: it, onEndTimeValid: dt, onStartTimeInput: ut, onEndTimeInput: ct, setInternalRange: ae, onRangeSelectorInput: Dt, adjustDate: ke, onGranularityInput: mt, computedFormContainerClasses: pt, Calendar: N, BentoTypography: $e, BentoInputField: ht, BentoInputTime: Yt, BentoDropdown: At, BentoSegmentedControl: bt };
720
741
  }
721
742
  });
722
- var Qt = function() {
743
+ var aa = function() {
723
744
  var a = this, e = a._self._c, t = a._self._setupProxy;
724
- return e("div", { staticClass: "b-date-range-picker-calendar" }, [e("div", { staticClass: "b-date-range-picker-calendar__form-container", class: t.computedFormContainerClasses, attrs: { "data-testid": "date-range-picker-calendar-form-container" } }, [e("div", { staticClass: "b-date-range-picker-calendar__form" }, [t.hasSlot("title") ? [a._t("title")] : a._e(), a.quickSelectRanges ? e(t.BentoDropdown, { attrs: { "aria-label": t.t("customRange"), items: t.quickSelectRangeDefaultItems, "model-value": t.selectedRangeSelectorValue }, on: { "update:model-value": t.onRangeSelectorInput } }) : a._e(), a.granularities ? e(t.BentoSegmentedControl, { attrs: { items: t.granularityItems, "model-value": t.internalRangeDate.granularity, "full-width": "" }, on: { "update:model-value": t.onGranularityInput } }) : a._e(), e("div", [e(t.BentoTypography, { staticClass: "b-date-range-picker-calendar__label", attrs: { stronger: "", el: "span" } }, [a._v(" From ")]), e("div", { class: t.formInputWrapperConditionalClasses }, [e(t.BentoInputField, { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": t.t("dateFrom"), "model-value": t.dateTextInput.startDate, error: t.startDateError }, on: { "update:model-value": t.onStartDateInput, keydown: t.onDateInputKeyDown }, scopedSlots: a._u([{ key: "description", fn: function() {
745
+ return e("div", { staticClass: "b-date-range-picker-calendar" }, [e("div", { staticClass: "b-date-range-picker-calendar__form-container", class: t.computedFormContainerClasses, attrs: { "data-testid": "date-range-picker-calendar-form-container" } }, [e("div", { staticClass: "b-date-range-picker-calendar__form" }, [t.hasSlot("title") ? [a._t("title")] : a._e(), a.quickSelectRanges ? e(t.BentoDropdown, { attrs: { "aria-label": t.t("customRange"), items: t.quickSelectRangeDefaultItems, "model-value": t.selectedRangeSelectorValue }, on: { "update:model-value": t.onRangeSelectorInput } }) : a._e(), a.granularities ? e(t.BentoSegmentedControl, { attrs: { items: t.granularityItems, "model-value": t.internalRangeDate.granularity, "full-width": "" }, on: { "update:model-value": t.onGranularityInput } }) : a._e(), e("div", [e(t.BentoTypography, { staticClass: "b-date-range-picker-calendar__label", attrs: { stronger: "", el: "span" } }, [a._v(" From ")]), e("div", { class: t.formInputWrapperConditionalClasses }, [e(t.BentoInputField, { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": t.t("dateFrom"), "model-value": t.startDateValue, error: t.startDateError, type: t.dateInputType }, on: { "update:model-value": t.onStartDateInput, keydown: t.onDateInputKeyDown }, scopedSlots: a._u([t.isTouchDevice ? null : { key: "description", fn: function() {
725
746
  return [a._v(a._s(t.t(t.dateFormat)))];
726
- }, proxy: !0 }]) }), a.allowTimeInput ? e(t.BentoInputTime, { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": t.t("timeFrom"), "model-value": t.dateTextInput.startTime }, on: { "update:model-value": t.onStartTimeInput, "input:error": t.onStartTimeError, "input:valid": t.onStartTimeValid } }) : a._e()], 1)], 1), e("div", [e(t.BentoTypography, { staticClass: "b-date-range-picker-calendar__label", attrs: { stronger: "", el: "span" } }, [a._v(" To ")]), e("div", { class: t.formInputWrapperConditionalClasses }, [e(t.BentoInputField, { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": t.t("dateTo"), "model-value": t.dateTextInput.endDate, error: t.endDateError }, on: { "update:model-value": t.onEndDateInput, keydown: t.onDateInputKeyDown }, scopedSlots: a._u([{ key: "description", fn: function() {
747
+ }, proxy: !0 }], null, !0) }), a.allowTimeInput ? e(t.BentoInputTime, { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": t.t("timeFrom"), "model-value": t.dateTextInput.startTime }, on: { "update:model-value": t.onStartTimeInput, "input:error": t.onStartTimeError, "input:valid": t.onStartTimeValid } }) : a._e()], 1)], 1), e("div", [e(t.BentoTypography, { staticClass: "b-date-range-picker-calendar__label", attrs: { stronger: "", el: "span" } }, [a._v(" To ")]), e("div", { class: t.formInputWrapperConditionalClasses }, [e(t.BentoInputField, { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": t.t("dateTo"), "model-value": t.endDateValue, error: t.endDateError, type: t.dateInputType }, on: { "update:model-value": t.onEndDateInput, keydown: t.onDateInputKeyDown }, scopedSlots: a._u([t.isTouchDevice ? null : { key: "description", fn: function() {
727
748
  return [a._v(a._s(t.t(t.dateFormat)))];
728
- }, proxy: !0 }]) }), a.allowTimeInput ? e(t.BentoInputTime, { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": t.t("timeTo"), "model-value": t.dateTextInput.endTime }, on: { "update:model-value": t.onEndTimeInput, "input:error": t.onEndTimeError, "input:valid": t.onEndTimeValid } }) : a._e()], 1)], 1)], 2), t.hasSlot("actions") ? e("div", [a._t("actions")], 2) : a._e()]), t.hasNoCalendars ? a._e() : e("div", { staticClass: "b-date-range-picker-calendar__calendars-container", attrs: { "data-testid": "date-range-picker-calendar-calendar-container" } }, [e(t.Calendar, { attrs: { value: t.internalRangeDate, "first-day-of-week": a.firstDayOfWeek, "is-date-disabled": a.isDateDisabled, "max-range": a.maxRange, min: t.computedMinMax.min, max: t.computedMinMax.max, "number-of-months": a.numberOfMonths, "show-end-date-on-open": a.showEndDateOnOpen, granularity: t.selectedGranularity, variant: a.variant, "is-range": "" }, on: { input: t.onDateInput, "start-date-selected": t.onStartDateSelected, "end-date-selected": t.onEndDateSelected } })], 1)]);
729
- }, Ut = [], jt = /* @__PURE__ */ je(
730
- Gt,
731
- Qt,
732
- Ut,
749
+ }, proxy: !0 }], null, !0) }), a.allowTimeInput ? e(t.BentoInputTime, { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": t.t("timeTo"), "model-value": t.dateTextInput.endTime }, on: { "update:model-value": t.onEndTimeInput, "input:error": t.onEndTimeError, "input:valid": t.onEndTimeValid } }) : a._e()], 1)], 1)], 2), t.hasSlot("actions") ? e("div", [a._t("actions")], 2) : a._e()]), !t.hasNoCalendars && !t.isTouchDevice ? e("div", { staticClass: "b-date-range-picker-calendar__calendars-container", attrs: { "data-testid": "date-range-picker-calendar-calendar-container" } }, [e(t.Calendar, { attrs: { value: t.internalRangeDate, "first-day-of-week": a.firstDayOfWeek, "is-date-disabled": a.isDateDisabled, "max-range": a.maxRange, min: t.computedMinMax.min, max: t.computedMinMax.max, "number-of-months": a.numberOfMonths, "show-end-date-on-open": a.showEndDateOnOpen, granularity: t.selectedGranularity, variant: a.variant, "is-range": "" }, on: { input: t.onDateInput, "start-date-selected": t.onStartDateSelected, "end-date-selected": t.onEndDateSelected } })], 1) : a._e()]);
750
+ }, na = [], ra = /* @__PURE__ */ Ve(
751
+ ta,
752
+ aa,
753
+ na,
733
754
  !1,
734
755
  null,
735
- "73f96cbc"
756
+ "e684b7ff"
736
757
  );
737
- const Jt = jt.exports, Wt = {
758
+ const sa = ra.exports, oa = {
738
759
  "de-DE": {
739
760
  apply: "Anwenden",
740
761
  cancel: "Abbrechen",
@@ -835,73 +856,73 @@ const Jt = jt.exports, Wt = {
835
856
  selectDateRange: "选择日期范围",
836
857
  selectedDateIsNotAvailable: "所选日期不可用"
837
858
  }
838
- }, zt = ({
859
+ }, la = ({
839
860
  datePickerValue: s,
840
861
  isDateIncorrect: a,
841
862
  quickSelectRanges: e,
842
863
  isMonthVariant: t,
843
864
  withTimeInput: l,
844
- placeholder: m
865
+ placeholder: D
845
866
  }) => {
846
- const { locale: D, t: y } = Me(), { dateToInputDateString: U } = ge(), G = (p) => !!p && !isNaN(p.getTime()), M = me({
867
+ const { locale: p, t: y } = Re(), { dateToInputDateString: _ } = be(), U = (f) => !!f && !isNaN(f.getTime()), R = ve({
847
868
  startDate: null,
848
869
  endDate: null,
849
870
  startTime: null,
850
871
  endTime: null
851
872
  });
852
- return ce(
873
+ return fe(
853
874
  s,
854
- (p) => {
855
- M.startDate = U(p == null ? void 0 : p.startDate), M.endDate = U(p == null ? void 0 : p.endDate), M.startTime = I(p == null ? void 0 : p.startDate), M.endTime = I(p == null ? void 0 : p.endDate);
875
+ (f) => {
876
+ R.startDate = _(f == null ? void 0 : f.startDate), R.endDate = _(f == null ? void 0 : f.endDate), R.startTime = O(f == null ? void 0 : f.startDate), R.endTime = O(f == null ? void 0 : f.endDate);
856
877
  },
857
878
  { immediate: !0 }
858
879
  ), {
859
880
  // Values
860
- dateDisplayValue: v(() => {
861
- var q;
881
+ dateDisplayValue: m(() => {
882
+ var Q;
862
883
  if (a.value)
863
- return `${M.startDate || ""} - ${M.endDate || ""}`;
884
+ return `${R.startDate || ""} - ${R.endDate || ""}`;
864
885
  if (!s.value || !s.value.startDate && !s.value.endDate)
865
- return (m == null ? void 0 : m.value) || y("selectDateRange");
866
- if ((q = e.value) != null && q.length) {
867
- const R = e.value.find(({ value: E }) => {
868
- var r;
869
- return E === ((r = s.value) == null ? void 0 : r.range);
886
+ return (D == null ? void 0 : D.value) || y("selectDateRange");
887
+ if ((Q = e.value) != null && Q.length) {
888
+ const k = e.value.find(({ value: C }) => {
889
+ var M;
890
+ return C === ((M = s.value) == null ? void 0 : M.range);
870
891
  });
871
- if (R)
872
- return R.label;
892
+ if (k)
893
+ return k.label;
873
894
  }
874
895
  if (s.value.granularity === "quarterly") {
875
- const { startDate: R, endDate: E } = s.value, r = y("quarter", { quarter: xe(R), year: qe(R) });
876
- if (Et(R, E))
877
- return r;
878
- const _ = y("quarter", { quarter: xe(E), year: qe(E) });
879
- return `${r} - ${_}`;
896
+ const { startDate: k, endDate: C } = s.value, M = y("quarter", { quarter: Ue(k), year: Qe(k) });
897
+ if (Jt(k, C))
898
+ return M;
899
+ const r = y("quarter", { quarter: Ue(C), year: Qe(C) });
900
+ return `${M} - ${r}`;
880
901
  }
881
- if (!G(s.value.startDate) || !G(s.value.endDate))
882
- return `${M.startDate || ""} - ${M.endDate || ""}`;
883
- let p = t != null && t.value ? { month: "long", year: "numeric" } : { month: "short", day: "2-digit", year: "numeric" };
884
- return l.value && (p = {
885
- ...p,
902
+ if (!U(s.value.startDate) || !U(s.value.endDate))
903
+ return `${R.startDate || ""} - ${R.endDate || ""}`;
904
+ let f = t != null && t.value ? { month: "long", year: "numeric" } : { month: "short", day: "2-digit", year: "numeric" };
905
+ return l.value && (f = {
906
+ ...f,
886
907
  hour: "numeric",
887
908
  minute: "numeric",
888
909
  second: "numeric",
889
910
  hour12: !1
890
- }), Tt(D.value, p).formatRange(
911
+ }), Bt(p.value, f).formatRange(
891
912
  s.value.startDate,
892
913
  s.value.endDate
893
914
  );
894
915
  }),
895
- textInputDisplayValue: M,
916
+ textInputDisplayValue: R,
896
917
  // Methods
897
918
  formatTextInputDisplayValue: () => ""
898
919
  };
899
- }, $t = {
900
- i18n: { messages: Wt },
920
+ }, ia = {
921
+ i18n: { messages: oa },
901
922
  name: "bento-date-range-picker",
902
923
  model: { prop: "modelValue" }
903
- }, Ht = /* @__PURE__ */ Le({
904
- ...$t,
924
+ }, da = /* @__PURE__ */ We({
925
+ ...ia,
905
926
  props: {
906
927
  description: { default: void 0 },
907
928
  disabled: { type: Boolean, default: !1 },
@@ -929,7 +950,7 @@ const Jt = jt.exports, Wt = {
929
950
  },
930
951
  emits: ["update:model-value", "input"],
931
952
  setup(s, { emit: a }) {
932
- const e = s, t = st(), { t: l } = Me(), { dateToInputDateString: m } = ge(), D = ne("bento-date-range-picker-container"), y = ne("bento-date-range-picker-label"), U = ne("bento-date-range-picker-description"), G = ne("bento-date-range-picker-error"), M = ne("bento-date-range-picker-date-error"), X = v(() => e.label || l("dateRangePicker", { name: D })), { resolvedFirstDayOfWeek: $ } = ft(pe(e, "firstDayOfWeek")), p = ot({
953
+ const e = s, t = vt(), { t: l } = Re(), { dateToInputDateString: D } = be(), p = ne("bento-date-range-picker-container"), y = ne("bento-date-range-picker-label"), _ = ne("bento-date-range-picker-description"), U = ne("bento-date-range-picker-error"), R = ne("bento-date-range-picker-date-error"), F = m(() => e.label || l("dateRangePicker", { name: p })), { resolvedFirstDayOfWeek: X } = _t(Te(e, "firstDayOfWeek")), f = yt({
933
954
  none: 0,
934
955
  one: 710,
935
956
  // width of date range picker with one panes
@@ -937,111 +958,111 @@ const Jt = jt.exports, Wt = {
937
958
  // width of date range picker with two panes
938
959
  three: 1290
939
960
  // width of date range picker with three panes
940
- }), q = v(() => {
941
- const c = p.active().value, V = {
961
+ }), Q = m(() => {
962
+ const c = f.active().value, z = {
942
963
  none: 0,
943
964
  one: 1,
944
965
  two: 2
945
966
  };
946
- if (c in V) {
947
- const z = V[c];
948
- return e.numberOfMonths === void 0 ? z : Math.min(e.numberOfMonths, z);
967
+ if (c in z) {
968
+ const me = z[c];
969
+ return e.numberOfMonths === void 0 ? me : Math.min(e.numberOfMonths, me);
949
970
  }
950
971
  return e.numberOfMonths;
951
- }), R = v(() => (e == null ? void 0 : e.quickSelectRanges) && e.quickSelectRanges.map((c) => {
952
- const V = c.data.endDate ? void 0 : new Date(Date.now()).getTime() - c.data.startDate.getTime();
972
+ }), k = m(() => (e == null ? void 0 : e.quickSelectRanges) && e.quickSelectRanges.map((c) => {
973
+ const z = c.data.endDate ? void 0 : new Date(Date.now()).getTime() - c.data.startDate.getTime();
953
974
  return {
954
975
  ...c,
955
976
  data: {
956
977
  ...c.data,
957
978
  // Adding timeDifference to calculate an up-to-date endDate on range selection
958
- timeDifference: V
979
+ timeDifference: z
959
980
  }
960
981
  };
961
- })), E = v(() => e.label ? y : (t == null ? void 0 : t["aria-labelledby"]) ?? null), r = B(!1), _ = B(null), O = B(!1), { isReadOnly: De } = bt(pe(e, "readonly")), { emitValue: Q } = It(a);
962
- ce(
982
+ })), C = m(() => e.label ? y : (t == null ? void 0 : t["aria-labelledby"]) ?? null), M = B(!1), r = B(null), T = B(!1), { isReadOnly: ye } = Pt(Te(e, "readonly")), { emitValue: Z } = Lt(a);
983
+ fe(
963
984
  () => e.disabled,
964
985
  () => {
965
- e.disabled && O.value && (O.value = !1);
986
+ e.disabled && T.value && (T.value = !1);
966
987
  }
967
988
  );
968
- const se = v(() => e.modelValue || e.value), Z = v(() => e.hasActions ? !P.value && r.value : r.value), T = v(() => ({
969
- "b-date-range-picker__description--error": !!e.errorMessage || Z.value
970
- })), ee = v(() => e.variant === "month"), te = v(() => e.allowTimeInput && e.variant !== "month"), { dateDisplayValue: j, textInputDisplayValue: g, formatTextInputDisplayValue: oe } = zt({
971
- datePickerValue: se,
972
- isDateIncorrect: r,
973
- quickSelectRanges: R,
974
- isMonthVariant: ee,
975
- withTimeInput: te,
976
- placeholder: pe(e, "placeholder")
977
- }), le = v(
978
- () => `${e.description ? U : ""} ${e.errorMessage ? G : ""} ${r.value ? M : ""}`.trim() || null
979
- ), H = () => {
980
- O.value = !1;
981
- }, ie = () => {
982
- O.value = !0;
983
- }, K = B(j.value), k = B(
989
+ const j = m(() => e.modelValue || e.value), se = m(() => e.hasActions ? !L.value && M.value : M.value), oe = m(() => ({
990
+ "b-date-range-picker__description--error": !!e.errorMessage || se.value
991
+ })), h = m(() => e.variant === "month"), ee = m(() => e.allowTimeInput && e.variant !== "month"), { dateDisplayValue: J, textInputDisplayValue: g, formatTextInputDisplayValue: le } = la({
992
+ datePickerValue: j,
993
+ isDateIncorrect: M,
994
+ quickSelectRanges: k,
995
+ isMonthVariant: h,
996
+ withTimeInput: ee,
997
+ placeholder: Te(e, "placeholder")
998
+ }), ie = m(
999
+ () => `${e.description ? _ : ""} ${e.errorMessage ? U : ""} ${M.value ? R : ""}`.trim() || null
1000
+ ), $ = () => {
1001
+ T.value = !1;
1002
+ }, de = () => {
1003
+ T.value = !0;
1004
+ }, H = B(J.value), V = B(
984
1005
  // textInputDisplayValue is a reactive object
985
- structuredClone(ye(g))
986
- ), C = B(e.modelValue ?? e.value), P = B(!0), A = v(
987
- () => e.hasActions ? k.value : g
988
- ), J = v(
989
- () => e.hasActions ? K.value : j.value
1006
+ structuredClone(Ae(g))
1007
+ ), b = B(e.modelValue ?? e.value), L = B(!0), te = m(
1008
+ () => e.hasActions ? V.value : g
1009
+ ), I = m(
1010
+ () => e.hasActions ? H.value : J.value
990
1011
  );
991
- Ge(() => {
992
- if (e.hasActions || ke(
1012
+ ze(() => {
1013
+ if (e.hasActions || Ce(
993
1014
  'BentoDateRangePicker "hasActions" property',
994
1015
  `Set the BentoDateRangePicker "hasActions" property true which will display the "Apply" and "Cancel" buttons.
995
1016
  This will be the default behavior in the v2 and "hasActions" will be removed.`,
996
1017
  "2.0.0"
997
- ), e.value && ke(
1018
+ ), e.value && Ce(
998
1019
  'BentoDateRangePicker "value" property',
999
1020
  'The use of "value" prop in "BentoDateRangePicker" is no longer supported. Use the "v-model" or "model-value" property instead.',
1000
1021
  "2.0.0"
1001
1022
  ), e.granularities && e.variant !== "month" && e.granularities.find(({ type: c }) => c === "quarterly"))
1002
1023
  throw new Error('Quarterly granularity is only supported by BentoDateRangePicker with variant: "month"');
1003
- }), ce([() => e.value, () => e.modelValue], () => {
1004
- K.value = j.value, k.value = structuredClone(ye(g));
1024
+ }), fe([() => e.value, () => e.modelValue], () => {
1025
+ H.value = J.value, V.value = structuredClone(Ae(g));
1005
1026
  });
1006
- const W = v(() => [
1027
+ const W = m(() => [
1007
1028
  {
1008
1029
  title: l("apply"),
1009
1030
  event: () => {
1010
- Q(C.value), H(), P.value = !0;
1031
+ Z(b.value), $(), L.value = !0;
1011
1032
  },
1012
- disabled: P.value
1033
+ disabled: L.value
1013
1034
  },
1014
1035
  {
1015
1036
  title: l("cancel"),
1016
- event: H
1037
+ event: $
1017
1038
  }
1018
1039
  ]);
1019
- return ce(C, (c) => {
1040
+ return fe(b, (c) => {
1020
1041
  if (e.hasActions) {
1021
- P.value = r.value;
1042
+ L.value = M.value;
1022
1043
  return;
1023
1044
  }
1024
- Q(c);
1025
- }), { __sfc: !0, emit: a, props: e, attrs: t, t: l, dateToInputDateString: m, datePickerContainerId: D, labelId: y, descriptionId: U, errorId: G, dateErrorId: M, popoverAriaLabel: X, resolvedFirstDayOfWeek: $, breakpoints: p, computedNumberOfMonths: q, adjustedQuickSelectRanges: R, dropdownInputAriaLabelledBy: E, isDateIncorrect: r, inputContainerRef: _, isDateRangePickerOpen: O, isReadOnly: De, emitValue: Q, internalModelValue: se, shouldDisplayError: Z, descriptionConditionalClasses: T, isMonthVariant: ee, withTimeInput: te, dateDisplayValue: j, textInputDisplayValue: g, formatTextInputDisplayValue: oe, ariaDescribedBy: le, closeDateRangePicker: H, openDateRangePicker: ie, localDateDisplayValue: K, localTextInputDisplayValue: k, selectedDate: C, isApplyDisabled: P, displayedTextInputValue: A, displayedDateValue: J, rangePickerButtonActions: W, onDateRangePickerInput: (c) => {
1026
- r.value = !1, g.startDate = m(c.startDate), g.endDate = m(c.endDate), g.startTime = I(c.startDate), g.endTime = I(c.endDate), C.value = c;
1045
+ Z(c);
1046
+ }), { __sfc: !0, emit: a, props: e, attrs: t, t: l, dateToInputDateString: D, datePickerContainerId: p, labelId: y, descriptionId: _, errorId: U, dateErrorId: R, popoverAriaLabel: F, resolvedFirstDayOfWeek: X, breakpoints: f, computedNumberOfMonths: Q, adjustedQuickSelectRanges: k, dropdownInputAriaLabelledBy: C, isDateIncorrect: M, inputContainerRef: r, isDateRangePickerOpen: T, isReadOnly: ye, emitValue: Z, internalModelValue: j, shouldDisplayError: se, descriptionConditionalClasses: oe, isMonthVariant: h, withTimeInput: ee, dateDisplayValue: J, textInputDisplayValue: g, formatTextInputDisplayValue: le, ariaDescribedBy: ie, closeDateRangePicker: $, openDateRangePicker: de, localDateDisplayValue: H, localTextInputDisplayValue: V, selectedDate: b, isApplyDisabled: L, displayedTextInputValue: te, displayedDateValue: I, rangePickerButtonActions: W, onDateRangePickerInput: (c) => {
1047
+ M.value = !1, g.startDate = D(c.startDate), g.endDate = D(c.endDate), g.startTime = O(c.startDate), g.endTime = O(c.endDate), b.value = c;
1027
1048
  }, clearDateRangePickerValue: async () => {
1028
- r.value && (r.value = !1), C.value = null;
1049
+ M.value && (M.value = !1), b.value = null;
1029
1050
  }, onEnterPressedOverInput: () => {
1030
- if (!O.value) {
1031
- O.value = !0;
1051
+ if (!T.value) {
1052
+ T.value = !0;
1032
1053
  return;
1033
1054
  }
1034
- r.value || (O.value = !1);
1055
+ M.value || (T.value = !1);
1035
1056
  }, onDateRangePickerFormDateInputUpdate: (c) => {
1036
- r.value = !1, c.startTime && (g.startTime = c.startTime), c.endTime && (g.endTime = c.endTime);
1057
+ M.value = !1, c.startTime && (g.startTime = c.startTime), c.endTime && (g.endTime = c.endTime);
1037
1058
  }, onDateRangePickerError: (c) => {
1038
- r.value = !0, g.startDate = c.startDate, g.endDate = c.endDate, C.value = { startDate: null, endDate: null };
1059
+ M.value = !0, g.startDate = c.startDate, g.endDate = c.endDate, b.value = { startDate: null, endDate: null };
1039
1060
  }, onRangeSelectorInput: (c) => {
1040
- c && (g.startDate = m(c.startDate), g.endDate = m(c.endDate), g.startTime = I(c.startDate), g.endTime = I(c.endDate), C.value = c);
1041
- }, BentoButtonActions: dt, BentoButtonActionsLayout: Ft, BentoDivider: lt, BentoPopover: it, BentoTypography: Qe, DateRangePickerCalendar: Jt, DropdownInputDefault: Rt, ErrorMessage: St, FieldLabel: kt, vBentoClickOutsideDirective: _t };
1061
+ c && (g.startDate = D(c.startDate), g.endDate = D(c.endDate), g.startTime = O(c.startDate), g.endTime = O(c.endDate), b.value = c);
1062
+ }, BentoButtonActions: Tt, BentoButtonActionsLayout: jt, BentoDivider: Mt, BentoPopover: gt, BentoTypography: $e, DateRangePickerCalendar: sa, DropdownInputDefault: Rt, ErrorMessage: Qt, FieldLabel: Ut, vBentoClickOutsideDirective: Gt };
1042
1063
  }
1043
1064
  });
1044
- var Kt = function() {
1065
+ var ua = function() {
1045
1066
  var a = this, e = a._self._c, t = a._self._setupProxy;
1046
1067
  return e("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: t.closeDateRangePicker, expression: "closeDateRangePicker" }], staticClass: "b-date-range-picker" }, [a.label ? e(t.FieldLabel, { attrs: { id: t.labelId, label: a.label, "tooltip-text": a.tooltipText, optional: a.optional, required: a.required } }) : a._e(), e("div", { on: { keydown: function(l) {
1047
1068
  return !l.type.indexOf("key") && a._k(l.keyCode, "enter", 13, l.key, "Enter") ? null : t.onEnterPressedOverInput.apply(null, arguments);
@@ -1050,19 +1071,19 @@ var Kt = function() {
1050
1071
  } } }, [e(t.DateRangePickerCalendar, { attrs: { "allow-time-input": t.withTimeInput, "quick-select-ranges": t.adjustedQuickSelectRanges, value: t.internalModelValue, "first-day-of-week": t.resolvedFirstDayOfWeek, granularities: a.granularities, "is-date-disabled": a.isDateDisabled, "max-range": a.maxRange, min: a.min, max: a.max, "number-of-months": t.computedNumberOfMonths, "show-end-date-on-open": a.showEndDateOnOpen, "date-form-data": t.displayedTextInputValue, variant: a.variant }, on: { "custom-range": t.onRangeSelectorInput, input: t.onDateRangePickerInput, error: t.onDateRangePickerError, "form-date": t.onDateRangePickerFormDateInputUpdate }, scopedSlots: a._u([a.hasActions ? { key: "actions", fn: function() {
1051
1072
  return [e(t.BentoDivider), e("div", { staticClass: "b-date-range-picker__footer" }, [e(t.BentoButtonActions, { attrs: { actions: t.rangePickerButtonActions, layout: t.BentoButtonActionsLayout.SPACE_BETWEEN } })], 1)];
1052
1073
  }, proxy: !0 } : null], null, !0) })], 1) : a._e()], 1);
1053
- }, Vt = [], Xt = /* @__PURE__ */ je(
1054
- Ht,
1055
- Kt,
1056
- Vt,
1074
+ }, ca = [], Da = /* @__PURE__ */ Ve(
1075
+ da,
1076
+ ua,
1077
+ ca,
1057
1078
  !1,
1058
1079
  null,
1059
1080
  "fbf1b83e"
1060
1081
  );
1061
- const Ia = Xt.exports;
1082
+ const Ga = Da.exports;
1062
1083
  export {
1063
- Ia as B,
1064
- Jt as D,
1065
- Ot as a,
1066
- fe as i
1084
+ Ga as B,
1085
+ sa as D,
1086
+ Wt as a,
1087
+ he as i
1067
1088
  };
1068
- //# sourceMappingURL=date-range-picker.DPGy2h-9.js.map
1089
+ //# sourceMappingURL=date-range-picker.LCWVAa5R.js.map