@adyen/bento-vue2 1.92.2 → 1.93.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 (215) hide show
  1. package/dist/@types/components.d.ts +8 -0
  2. package/dist/@types/index.d.ts +483 -136
  3. package/dist/action-bar.js +1 -1
  4. package/dist/ai-tag.js +1 -1
  5. package/dist/anchor-scroller.js +1 -1
  6. package/dist/assets/accordion-item.css +1 -1
  7. package/dist/assets/action-bar.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/card.css +1 -1
  11. package/dist/assets/data-grid.css +1 -1
  12. package/dist/assets/dialog-page.css +1 -1
  13. package/dist/assets/drawer.css +1 -0
  14. package/dist/assets/file-uploader.css +1 -1
  15. package/dist/assets/inspector.css +1 -1
  16. package/dist/assets/modal-fullscreen.css +1 -1
  17. package/dist/assets/navigation-menu-group.css +1 -0
  18. package/dist/assets/secondary-nav.css +1 -1
  19. package/dist/assets/sidepanel.css +1 -1
  20. package/dist/button.js +1 -1
  21. package/dist/card.js +1 -1
  22. package/dist/checkbox.js +2 -2
  23. package/dist/chunks/{action-bar.ChuPTyQG.js → action-bar.BPsug0x7.js} +4 -4
  24. package/dist/chunks/{action-bar.ChuPTyQG.js.map → action-bar.BPsug0x7.js.map} +1 -1
  25. package/dist/chunks/{ai-tag.Dt8nijLW.js → ai-tag.BfAbJI_v.js} +2 -2
  26. package/dist/chunks/{ai-tag.Dt8nijLW.js.map → ai-tag.BfAbJI_v.js.map} +1 -1
  27. package/dist/chunks/{anchor-scroller.DWaykZQj.js → anchor-scroller.cFxql5sk.js} +2 -2
  28. package/dist/chunks/{anchor-scroller.DWaykZQj.js.map → anchor-scroller.cFxql5sk.js.map} +1 -1
  29. package/dist/chunks/{base-modal.DMdzcBrq.js → base-modal.ByhHqRuT.js} +5 -5
  30. package/dist/chunks/{base-modal.DMdzcBrq.js.map → base-modal.ByhHqRuT.js.map} +1 -1
  31. package/dist/chunks/{button-actions-with-menu.CXFziNUr.js → button-actions-with-menu.Ctu2EwxW.js} +3 -3
  32. package/dist/chunks/{button-actions-with-menu.CXFziNUr.js.map → button-actions-with-menu.Ctu2EwxW.js.map} +1 -1
  33. package/dist/chunks/{button-actions.CXD6_9qN.js → button-actions.CdsmKyvj.js} +3 -3
  34. package/dist/chunks/{button-actions.CXD6_9qN.js.map → button-actions.CdsmKyvj.js.map} +1 -1
  35. package/dist/chunks/{calendar.rZsIZPxm.js → calendar.BaPh-1UW.js} +2 -2
  36. package/dist/chunks/{calendar.rZsIZPxm.js.map → calendar.BaPh-1UW.js.map} +1 -1
  37. package/dist/chunks/{card.Brma5kdb.js → card.BHssPRpx.js} +2 -2
  38. package/dist/chunks/{card.Brma5kdb.js.map → card.BHssPRpx.js.map} +1 -1
  39. package/dist/chunks/{checkbox-group.DmKZQlxZ.js → checkbox-group.KJvcjvpx.js} +3 -3
  40. package/dist/chunks/{checkbox-group.DmKZQlxZ.js.map → checkbox-group.KJvcjvpx.js.map} +1 -1
  41. package/dist/chunks/{checkbox.BObXaofv.js → checkbox.B2lQl9BE.js} +2 -2
  42. package/dist/chunks/{checkbox.BObXaofv.js.map → checkbox.B2lQl9BE.js.map} +1 -1
  43. package/dist/chunks/{code-snippet.DHAymIXp.js → code-snippet.7SHuhPxc.js} +5 -5
  44. package/dist/chunks/{code-snippet.DHAymIXp.js.map → code-snippet.7SHuhPxc.js.map} +1 -1
  45. package/dist/chunks/{controls-group.DSm2Ujwt.js → controls-group.DNmVV2pt.js} +2 -2
  46. package/dist/chunks/{controls-group.DSm2Ujwt.js.map → controls-group.DNmVV2pt.js.map} +1 -1
  47. package/dist/chunks/{copy.qqGYFbKJ.js → copy.DcpG08B_.js} +3 -3
  48. package/dist/chunks/{copy.qqGYFbKJ.js.map → copy.DcpG08B_.js.map} +1 -1
  49. package/dist/chunks/{dashboard-section.D9rS8myE.js → dashboard-section.BWhw2hvx.js} +3 -3
  50. package/dist/chunks/{dashboard-section.D9rS8myE.js.map → dashboard-section.BWhw2hvx.js.map} +1 -1
  51. package/dist/chunks/{dashed-underline.D_FhFRXM.js → dashed-underline.CPTkubjQ.js} +3 -3
  52. package/dist/chunks/{dashed-underline.D_FhFRXM.js.map → dashed-underline.CPTkubjQ.js.map} +1 -1
  53. package/dist/chunks/{data-grid-template.CRijG20n.js → data-grid-template.ZB5anthH.js} +3 -3
  54. package/dist/chunks/{data-grid-template.CRijG20n.js.map → data-grid-template.ZB5anthH.js.map} +1 -1
  55. package/dist/chunks/{data-grid.CJzEtn4Q.js → data-grid.CuLOPenn.js} +18 -18
  56. package/dist/chunks/{data-grid.CJzEtn4Q.js.map → data-grid.CuLOPenn.js.map} +1 -1
  57. package/dist/chunks/{date-picker.C9DIeaWH.js → date-picker.NdHdiufy.js} +8 -8
  58. package/dist/chunks/{date-picker.C9DIeaWH.js.map → date-picker.NdHdiufy.js.map} +1 -1
  59. package/dist/chunks/date-range-picker.BFgnw81F.js +1133 -0
  60. package/dist/chunks/{date-range-picker.zT42F9r4.js.map → date-range-picker.BFgnw81F.js.map} +1 -1
  61. package/dist/chunks/{dialog-page.EdejG53a.js → dialog-page.CziegEuc.js} +2 -2
  62. package/dist/chunks/{dialog-page.EdejG53a.js.map → dialog-page.CziegEuc.js.map} +1 -1
  63. package/dist/chunks/{draggable-handle.BR_aQH5N.js → draggable-handle.BsGnEMAT.js} +2 -2
  64. package/dist/chunks/{draggable-handle.BR_aQH5N.js.map → draggable-handle.BsGnEMAT.js.map} +1 -1
  65. package/dist/chunks/drawer.BqqodvlR.js +47 -0
  66. package/dist/chunks/drawer.BqqodvlR.js.map +1 -0
  67. package/dist/chunks/{dropdown-tag.z3rsxbpW.js → dropdown-tag.C6hkNptM.js} +3 -3
  68. package/dist/chunks/{dropdown-tag.z3rsxbpW.js.map → dropdown-tag.C6hkNptM.js.map} +1 -1
  69. package/dist/chunks/{dropdown.BYJwx-JD.js → dropdown.CF6Gf7ya.js} +5 -5
  70. package/dist/chunks/{dropdown.BYJwx-JD.js.map → dropdown.CF6Gf7ya.js.map} +1 -1
  71. package/dist/chunks/{es6.C1DXQV6f.js → es6.Cu3DYUPA.js} +3 -3
  72. package/dist/chunks/es6.Cu3DYUPA.js.map +1 -0
  73. package/dist/chunks/{field-label.DjjjkcO6.js → field-label.D7w7mHvW.js} +2 -2
  74. package/dist/chunks/{field-label.DjjjkcO6.js.map → field-label.D7w7mHvW.js.map} +1 -1
  75. package/dist/chunks/{file-uploader.Djl0xaDN.js → file-uploader.CX48W2BT.js} +3 -3
  76. package/dist/chunks/{file-uploader.Djl0xaDN.js.map → file-uploader.CX48W2BT.js.map} +1 -1
  77. package/dist/chunks/{filter-bar.C5NxhUhF.js → filter-bar.CFXeAK8X.js} +17 -17
  78. package/dist/chunks/{filter-bar.C5NxhUhF.js.map → filter-bar.CFXeAK8X.js.map} +1 -1
  79. package/dist/chunks/{focus-trap.DRqjHzt6.js → focus-trap.D4WDxUwu.js} +2 -2
  80. package/dist/chunks/{focus-trap.DRqjHzt6.js.map → focus-trap.D4WDxUwu.js.map} +1 -1
  81. package/dist/chunks/{footer-actions.D9mHwk5l.js → footer-actions.BoAzqs48.js} +2 -2
  82. package/dist/chunks/{footer-actions.D9mHwk5l.js.map → footer-actions.BoAzqs48.js.map} +1 -1
  83. package/dist/chunks/{header-meta.BSPnWWmi.js → header-meta.pubDFdDH.js} +3 -3
  84. package/dist/chunks/{header-meta.BSPnWWmi.js.map → header-meta.pubDFdDH.js.map} +1 -1
  85. package/dist/chunks/{header-with-views.DKD7O8pU.js → header-with-views.wMqUhzME.js} +10 -10
  86. package/dist/chunks/{header-with-views.DKD7O8pU.js.map → header-with-views.wMqUhzME.js.map} +1 -1
  87. package/dist/chunks/{header.DyZG7qWe.js → header.9h-5ZCv8.js} +3 -3
  88. package/dist/chunks/{header.DyZG7qWe.js.map → header.9h-5ZCv8.js.map} +1 -1
  89. package/dist/chunks/{index.CwzYJHw2.js → index.ByaCaB1Z.js} +15 -15
  90. package/dist/chunks/{index.CwzYJHw2.js.map → index.ByaCaB1Z.js.map} +1 -1
  91. package/dist/chunks/{info-icon.DCR42Kvm.js → info-icon.BOX4oIVD.js} +3 -3
  92. package/dist/chunks/{info-icon.DCR42Kvm.js.map → info-icon.BOX4oIVD.js.map} +1 -1
  93. package/dist/chunks/{input-field-password.hd-w1gkL.js → input-field-password.Ir5jAkAn.js} +6 -6
  94. package/dist/chunks/{input-field-password.hd-w1gkL.js.map → input-field-password.Ir5jAkAn.js.map} +1 -1
  95. package/dist/chunks/{input-field-phone-number.BRmSDrCn.js → input-field-phone-number.DmC5am2a.js} +3 -3
  96. package/dist/chunks/{input-field-phone-number.BRmSDrCn.js.map → input-field-phone-number.DmC5am2a.js.map} +1 -1
  97. package/dist/chunks/{input-field.BgzXEyxn.js → input-field.Cwep4H_C.js} +3 -3
  98. package/dist/chunks/input-field.Cwep4H_C.js.map +1 -0
  99. package/dist/chunks/{input-time.CF2kTtAp.js → input-time.CNgIob-u.js} +4 -4
  100. package/dist/chunks/{input-time.CF2kTtAp.js.map → input-time.CNgIob-u.js.map} +1 -1
  101. package/dist/chunks/{inspector.BzBPlz-5.js → inspector._xqiBe9X.js} +3 -3
  102. package/dist/chunks/{inspector.BzBPlz-5.js.map → inspector._xqiBe9X.js.map} +1 -1
  103. package/dist/chunks/{layout-row.B_IQC9Nq.js → layout-row.Du_4NPVx.js} +8 -8
  104. package/dist/chunks/{layout-row.B_IQC9Nq.js.map → layout-row.Du_4NPVx.js.map} +1 -1
  105. package/dist/chunks/{list-item.DqTHh8-Z.js → list-item.Disq4nSZ.js} +2 -2
  106. package/dist/chunks/{list-item.DqTHh8-Z.js.map → list-item.Disq4nSZ.js.map} +1 -1
  107. package/dist/chunks/{listbox-option-tag.CvbE-EuG.js → listbox-option-tag.B28d45lY.js} +2 -2
  108. package/dist/chunks/{listbox-option-tag.CvbE-EuG.js.map → listbox-option-tag.B28d45lY.js.map} +1 -1
  109. package/dist/chunks/{modal-fullscreen.De6mevyD.js → modal-fullscreen.CEGc-wKf.js} +4 -4
  110. package/dist/chunks/{modal-fullscreen.De6mevyD.js.map → modal-fullscreen.CEGc-wKf.js.map} +1 -1
  111. package/dist/chunks/{modal.B6n5AWs2.js → modal.DMMqMdJF.js} +4 -4
  112. package/dist/chunks/{modal.B6n5AWs2.js.map → modal.DMMqMdJF.js.map} +1 -1
  113. package/dist/chunks/navigation-menu-group.KJvGw1tX.js +231 -0
  114. package/dist/chunks/navigation-menu-group.KJvGw1tX.js.map +1 -0
  115. package/dist/chunks/{pagination.BzsKZFnw.js → pagination.hOIvu4hj.js} +2 -2
  116. package/dist/chunks/{pagination.BzsKZFnw.js.map → pagination.hOIvu4hj.js.map} +1 -1
  117. package/dist/chunks/popover.types.DhuEjpRI.js +6 -0
  118. package/dist/chunks/{popover.types.hA13DZPg.js.map → popover.types.DhuEjpRI.js.map} +1 -1
  119. package/dist/chunks/{popper-container.C_n9Ds1W.js → popper-container.D7-KbKnN.js} +2 -2
  120. package/dist/chunks/{popper-container.C_n9Ds1W.js.map → popper-container.D7-KbKnN.js.map} +1 -1
  121. package/dist/chunks/{promo-banner.Dc_kK1x9.js → promo-banner.BzKZCMJp.js} +2 -2
  122. package/dist/chunks/{promo-banner.Dc_kK1x9.js.map → promo-banner.BzKZCMJp.js.map} +1 -1
  123. package/dist/chunks/{radio-group.Bb-L-0io.js → radio-group.U3G8U7p0.js} +3 -3
  124. package/dist/chunks/{radio-group.Bb-L-0io.js.map → radio-group.U3G8U7p0.js.map} +1 -1
  125. package/dist/chunks/{rich-text-editor.CmsmiW87.js → rich-text-editor.BHo3e81W.js} +4 -4
  126. package/dist/chunks/{rich-text-editor.CmsmiW87.js.map → rich-text-editor.BHo3e81W.js.map} +1 -1
  127. package/dist/chunks/{search-bar.Brb3OP-y.js → search-bar.CHINuvXx.js} +4 -4
  128. package/dist/chunks/{search-bar.Brb3OP-y.js.map → search-bar.CHINuvXx.js.map} +1 -1
  129. package/dist/chunks/{secondary-nav.BBL5zZPK.js → secondary-nav.BWn_I33v.js} +4 -4
  130. package/dist/chunks/{secondary-nav.BBL5zZPK.js.map → secondary-nav.BWn_I33v.js.map} +1 -1
  131. package/dist/chunks/{segmented-control.DDtjX-V5.js → segmented-control.Dww21VC2.js} +2 -2
  132. package/dist/chunks/{segmented-control.DDtjX-V5.js.map → segmented-control.Dww21VC2.js.map} +1 -1
  133. package/dist/chunks/{selection-card-group.5jzX23fU.js → selection-card-group.DRP4Vk2d.js} +21 -21
  134. package/dist/chunks/{selection-card-group.5jzX23fU.js.map → selection-card-group.DRP4Vk2d.js.map} +1 -1
  135. package/dist/chunks/{sidepanel.nW0Bhk_u.js → sidepanel.B9ecjbyC.js} +5 -5
  136. package/dist/chunks/{sidepanel.nW0Bhk_u.js.map → sidepanel.B9ecjbyC.js.map} +1 -1
  137. package/dist/chunks/{structured-list-item.BBBtie1s.js → structured-list-item.De_yYayn.js} +4 -4
  138. package/dist/chunks/{structured-list-item.BBBtie1s.js.map → structured-list-item.De_yYayn.js.map} +1 -1
  139. package/dist/chunks/{summary-grid.types.Dp_efYVN.js → summary-grid.types.Dc-PJlfH.js} +5 -5
  140. package/dist/chunks/{summary-grid.types.Dp_efYVN.js.map → summary-grid.types.Dc-PJlfH.js.map} +1 -1
  141. package/dist/chunks/{tag.D2xagTJv.js → tag.DPNSUeue.js} +2 -2
  142. package/dist/chunks/{tag.D2xagTJv.js.map → tag.DPNSUeue.js.map} +1 -1
  143. package/dist/chunks/{textarea.CJS-1I41.js → textarea.C2gJX1kj.js} +3 -3
  144. package/dist/chunks/{textarea.CJS-1I41.js.map → textarea.C2gJX1kj.js.map} +1 -1
  145. package/dist/chunks/{timeline-item.CF9jbIRr.js → timeline-item.BKc5c9sS.js} +6 -6
  146. package/dist/chunks/{timeline-item.CF9jbIRr.js.map → timeline-item.BKc5c9sS.js.map} +1 -1
  147. package/dist/chunks/{tooltip.BxtnF3is.js → tooltip.Bl6kedql.js} +3 -3
  148. package/dist/chunks/{tooltip.BxtnF3is.js.map → tooltip.Bl6kedql.js.map} +1 -1
  149. package/dist/chunks/{tutorial.CoWDVs7_.js → tutorial.C1dZpvsz.js} +4 -4
  150. package/dist/chunks/{tutorial.CoWDVs7_.js.map → tutorial.C1dZpvsz.js.map} +1 -1
  151. package/dist/chunks/{use-cached-selected-values.Du8-wWR2.js → use-cached-selected-values.C6aShVBp.js} +2 -2
  152. package/dist/chunks/{use-cached-selected-values.Du8-wWR2.js.map → use-cached-selected-values.C6aShVBp.js.map} +1 -1
  153. package/dist/chunks/{use-date-input-formatter.ibZeLD_V.js → use-date-input-formatter.CrkJ_UfS.js} +2 -2
  154. package/dist/chunks/{use-date-input-formatter.ibZeLD_V.js.map → use-date-input-formatter.CrkJ_UfS.js.map} +1 -1
  155. package/dist/code-snippet.js +1 -1
  156. package/dist/dashboard-template.js +1 -1
  157. package/dist/dashed-underline.js +1 -1
  158. package/dist/data-grid-template.js +1 -1
  159. package/dist/data-grid.js +1 -1
  160. package/dist/date-picker.js +2 -2
  161. package/dist/date-range-picker.js +2 -2
  162. package/dist/draggable.js +1 -1
  163. package/dist/drawer.js +5 -0
  164. package/dist/drawer.js.map +1 -0
  165. package/dist/dropdown.js +3 -3
  166. package/dist/file-uploader.js +1 -1
  167. package/dist/filter-bar.js +1 -1
  168. package/dist/focus-trap.js +1 -1
  169. package/dist/header-with-views.js +1 -1
  170. package/dist/header.js +1 -1
  171. package/dist/index.js +291 -285
  172. package/dist/index.js.map +1 -1
  173. package/dist/info-icon.js +1 -1
  174. package/dist/input-field-password.js +1 -1
  175. package/dist/input-field-phone-number.js +1 -1
  176. package/dist/input-field.js +1 -1
  177. package/dist/input-time.js +1 -1
  178. package/dist/inspector.js +1 -1
  179. package/dist/internal.js +11 -11
  180. package/dist/layout.js +1 -1
  181. package/dist/list.js +1 -1
  182. package/dist/menu.js +1 -1
  183. package/dist/modal-fullscreen.js +1 -1
  184. package/dist/modal.js +2 -2
  185. package/dist/navigation-menu.js +7 -0
  186. package/dist/navigation-menu.js.map +1 -0
  187. package/dist/pagination.js +1 -1
  188. package/dist/popover.js +2 -2
  189. package/dist/popper-container.js +1 -1
  190. package/dist/promo-banner.js +1 -1
  191. package/dist/radio-group.js +1 -1
  192. package/dist/rich-text-editor.js +1 -1
  193. package/dist/search-bar.js +2 -2
  194. package/dist/secondary-nav.js +1 -1
  195. package/dist/segmented-control.js +1 -1
  196. package/dist/selection-card.js +1 -1
  197. package/dist/sidepanel.js +1 -1
  198. package/dist/structured-list.js +1 -1
  199. package/dist/styles/bento-dark.css +3 -0
  200. package/dist/styles/bento-light.css +3 -0
  201. package/dist/styles/bento.css +3 -0
  202. package/dist/styles/legacy.css +3 -0
  203. package/dist/styles/styleguide.css +3 -0
  204. package/dist/styles/utility.css +9 -0
  205. package/dist/summary-grid.js +1 -1
  206. package/dist/tag.js +1 -1
  207. package/dist/textarea.js +1 -1
  208. package/dist/timeline.js +1 -1
  209. package/dist/tutorial.js +1 -1
  210. package/dist/web-types.json +236 -2
  211. package/package.json +5 -5
  212. package/dist/chunks/date-range-picker.zT42F9r4.js +0 -1097
  213. package/dist/chunks/es6.C1DXQV6f.js.map +0 -1
  214. package/dist/chunks/input-field.BgzXEyxn.js.map +0 -1
  215. package/dist/chunks/popover.types.hA13DZPg.js +0 -6
@@ -1,1097 +0,0 @@
1
- import { reactive as ye, defineComponent as ze, useSlots as vt, ref as C, computed as p, onMounted as $e, toRaw as Re, watch as ve, useAttrs as yt, toRef as Te } from "vue";
2
- import { j as Mt } from "./index.CwzYJHw2.js";
3
- import { B as gt } from "./divider.DX5gwN7p.js";
4
- import { h as Tt, B as ht } from "./button-actions.CXD6_9qN.js";
5
- import { B as He, d as Ce } from "./typography.C8lPlsbD.js";
6
- import { B as Yt } from "./alert.CLqcPN0Q.js";
7
- import { B as Rt } from "./input-field.BgzXEyxn.js";
8
- import { B as At, i as Be } from "./input-time.CF2kTtAp.js";
9
- import { B as bt, D as It } from "./dropdown.BYJwx-JD.js";
10
- import { B as _t } from "./segmented-control.DDtjX-V5.js";
11
- import { u as Ae } from "./index.B6WW_F-J.js";
12
- import { d as xe } from "./use-cached-selected-values.Du8-wWR2.js";
13
- import { u as kt } from "./use-has-slot.C9lQZ6nz.js";
14
- import { u as be, a as St } from "./use-date-input-formatter.ibZeLD_V.js";
15
- import { u as Ft } from "./use-touch-device.DTqFAbXh.js";
16
- import { h as re, i as E, j as R, k as Et, l as qe, m as Ot, s as Ne, n as wt, o as Ct, q as Bt, r as Pe, t as xt, b as P, u as qt, e as Nt, f as Pt, v as S, p as Le, w as Ge, g as Lt } from "./calendar.rZsIZPxm.js";
17
- import { e as B, a as Qe } from "./differenceInMonths.CpwVtHZX.js";
18
- import { s as Ue } from "./startOfWeek.Br5KM4z_.js";
19
- import { t as U, n as Gt, c as Qt } from "./en-US.BK5uiAND.js";
20
- import { c as Ut } from "./constructNow.CK0ryPil.js";
21
- import { n as Ve } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
22
- import { g as ne } from "./generate-uid.NJ8tVoha.js";
23
- import { u as Wt } from "./use-form-layout-loading.CWbjZiwP.js";
24
- import "./index.Cl4_42j5.js";
25
- import { u as jt } from "./form-field.D_2g7vaP.js";
26
- import { B as Jt } from "./directive.Bfr4fuOy.js";
27
- import { F as zt } from "./field-label.DjjjkcO6.js";
28
- import { E as $t } from "./error-message.CyERcfdt.js";
29
- import { B as Ht } from "./button-actions.types.BptAXjD8.js";
30
- import "../assets/date-range-picker.css";
31
- function We(s, a) {
32
- return U(s, a == null ? void 0 : a.in).getFullYear();
33
- }
34
- function he(s, a) {
35
- return +U(s) == +U(a);
36
- }
37
- function Vt(s, a, e) {
38
- const [t, i] = Gt(
39
- e == null ? void 0 : e.in,
40
- s,
41
- a
42
- );
43
- return +re(t) == +re(i);
44
- }
45
- function je(s, a) {
46
- const e = U(s, a == null ? void 0 : a.in);
47
- return e.setMilliseconds(0), e;
48
- }
49
- function Ye(s, a) {
50
- return +je(s) == +je(a);
51
- }
52
- function Kt(s, a) {
53
- return E(
54
- Qt(s, s),
55
- Ut(s)
56
- );
57
- }
58
- function Xt(s, a, e) {
59
- const t = U(s, e == null ? void 0 : e.in);
60
- return t.setHours(a), t;
61
- }
62
- function Je(s, a, e) {
63
- const t = U(s, e == null ? void 0 : e.in);
64
- return t.setMilliseconds(a), t;
65
- }
66
- function Zt(s, a, e) {
67
- const t = U(s, e == null ? void 0 : e.in);
68
- return t.setMinutes(a), t;
69
- }
70
- function ea(s, a, e) {
71
- const t = U(s, e == null ? void 0 : e.in);
72
- return t.setSeconds(a), t;
73
- }
74
- const ta = ({
75
- firstDayOfWeek: s,
76
- min: a,
77
- max: e
78
- }) => ({ getGranularCalendarLimits: (i) => {
79
- if (!a && !e)
80
- return { min: null, max: null };
81
- let m = a ? R(a) : null, f = e ? B(e) : null;
82
- if ((i == null ? void 0 : i.type) === "weekly") {
83
- if (i.earliest)
84
- m = R(i.earliest);
85
- else if (m) {
86
- const g = Ue(m, { weekStartsOn: s });
87
- E(m, g) || (m = R(Et(qe(m, { weekStartsOn: s }), 1)));
88
- }
89
- if (i.latest)
90
- f = B(i.latest);
91
- else if (f) {
92
- const g = qe(f, { weekStartsOn: s });
93
- E(f, g) || (f = B(Ot(Ue(f, { weekStartsOn: s }), 1)));
94
- }
95
- }
96
- if ((i == null ? void 0 : i.type) === "monthly") {
97
- if (i.earliest)
98
- m = R(i.earliest);
99
- else if (m) {
100
- const g = Ne(m);
101
- E(m, g) || (m = Ne(wt(m, 1)));
102
- }
103
- if (i.latest)
104
- f = B(i.latest);
105
- else if (f) {
106
- const g = Qe(f);
107
- E(f, g) || (f = Qe(Ct(f, 1)));
108
- }
109
- }
110
- if ((i == null ? void 0 : i.type) === "quarterly") {
111
- if (i.earliest)
112
- m = re(i.earliest);
113
- else if (m) {
114
- const g = re(m);
115
- E(m, g) || (m = re(Bt(m, 1)));
116
- }
117
- if (i.latest)
118
- f = B(i.latest);
119
- else if (f) {
120
- const g = Pe(f);
121
- E(f, g) || (f = Pe(xt(f, 1)));
122
- }
123
- }
124
- return { min: m, max: f };
125
- } }), aa = () => {
126
- const s = ye({
127
- daily: null,
128
- weekly: null,
129
- monthly: null,
130
- quarterly: null
131
- });
132
- return {
133
- savedRanges: s,
134
- saveRange: (t, i) => {
135
- s[t] = i;
136
- },
137
- resetSavedRanges: () => {
138
- s.daily = null, s.weekly = null, s.monthly = null, s.quarterly = null;
139
- }
140
- };
141
- };
142
- 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 || {});
143
- const na = {
144
- "de-DE": {
145
- "DD-MM-YYYY": "TT-MM-JJJJ",
146
- "MM-DD-YYYY": "JJJJ-MM-TT",
147
- "YYYY-MM-DD": "JJJJ-MM-TT",
148
- customRange: "Benutzerdefinierter Bereich",
149
- daily: "Täglich",
150
- dateFrom: "Datum von",
151
- dateTo: "Datum bis",
152
- lastMonth: "Letzter Monat",
153
- lastSevenDays: "Letzte 7 Tage",
154
- lastThreeMonths: "Letzte drei Monate",
155
- monthly: "Monatlich",
156
- quarterly: "Vierteljährlich",
157
- timeFrom: "Zeit von",
158
- timeTo: "Zeit bis",
159
- weekly: "Wöchentlich"
160
- },
161
- "en-GB": {
162
- "DD-MM-YYYY": "DD-MM-YYYY",
163
- "MM-DD-YYYY": "MM-DD-YYYY",
164
- "YYYY-MM-DD": "YYYY-MM-DD",
165
- customRange: "Custom range",
166
- daily: "Daily",
167
- dateFrom: "Date from",
168
- dateTo: "Date to",
169
- lastMonth: "Last month",
170
- lastSevenDays: "Last 7 days",
171
- lastThreeMonths: "The last three months",
172
- monthly: "Monthly",
173
- quarterly: "Quarterly",
174
- timeFrom: "Time from",
175
- timeTo: "Time to",
176
- weekly: "Weekly"
177
- },
178
- "en-US": {
179
- "DD-MM-YYYY": "DD-MM-YYYY",
180
- "MM-DD-YYYY": "MM-DD-YYYY",
181
- "YYYY-MM-DD": "YYYY-MM-DD",
182
- customRange: "Custom range",
183
- daily: "Daily",
184
- dateFrom: "Date from",
185
- dateTo: "Date to",
186
- lastMonth: "Last month",
187
- lastSevenDays: "Last 7 days",
188
- lastThreeMonths: "Last three months",
189
- maxRangeDays: "You can select up to {count} day | You can select up to {count} days",
190
- maxRangeMonths: "You can select up to {count} month | You can select up to {count} months",
191
- maxRangeQuarters: "You can select up to {count} quarter | You can select up to {count} quarters",
192
- maxRangeWeeks: "You can select up to {count} week | You can select up to {count} weeks",
193
- monthly: "Monthly",
194
- quarterly: "Quarterly",
195
- timeFrom: "Time from",
196
- timeTo: "Time to",
197
- weekly: "Weekly"
198
- },
199
- "es-ES": {
200
- "DD-MM-YYYY": "DD-MM-AAAA",
201
- "MM-DD-YYYY": "MM-DD-AAAA",
202
- "YYYY-MM-DD": "AAAA-MM-DD",
203
- customRange: "Rango personalizado",
204
- daily: "Diario",
205
- dateFrom: "Fecha desde",
206
- dateTo: "Fecha hasta",
207
- lastMonth: "El mes pasado",
208
- lastSevenDays: "Últimos 7 días",
209
- lastThreeMonths: "Últimos tres meses",
210
- monthly: "Mensualmente",
211
- quarterly: "Trimestral",
212
- timeFrom: "Hora desde",
213
- timeTo: "Hora hasta",
214
- weekly: "Semanal"
215
- },
216
- "es-MX": {
217
- "DD-MM-YYYY": "DD-MM-AAAA",
218
- "MM-DD-YYYY": "MM-DD-AAAA",
219
- "YYYY-MM-DD": "AAAA-MM-DD",
220
- customRange: "Rango personalizado",
221
- daily: "Diario",
222
- dateFrom: "Fecha de",
223
- dateTo: "Fecha hasta",
224
- lastMonth: "El mes pasado",
225
- lastSevenDays: "Últimos 7 días",
226
- lastThreeMonths: "Últimos tres meses",
227
- monthly: "Mensual",
228
- quarterly: "Trimestral",
229
- timeFrom: "Tiempo desde",
230
- timeTo: "Es hora de",
231
- weekly: "Semanal"
232
- },
233
- "fr-FR": {
234
- "DD-MM-YYYY": "JJ-MM-AAAA",
235
- "MM-DD-YYYY": "MM-JJ-AAAA",
236
- "YYYY-MM-DD": "AAAA-MM-JJ",
237
- customRange: "Plage personnalisée",
238
- daily: "Quotidien",
239
- dateFrom: "Date de début",
240
- dateTo: "Date de fin",
241
- lastMonth: "Le mois dernier",
242
- lastSevenDays: "7 derniers jours",
243
- lastThreeMonths: "Trois derniers mois",
244
- monthly: "Mensuel",
245
- quarterly: "Trimestriel",
246
- timeFrom: "Heure de début",
247
- timeTo: "Heure de fin",
248
- weekly: "Hebdomadaire"
249
- },
250
- "it-IT": {
251
- "DD-MM-YYYY": "GG-MM-AAAA",
252
- "MM-DD-YYYY": "MM-GG-AAAA",
253
- "YYYY-MM-DD": "AAAA-MM-GG",
254
- customRange: "Intervallo personalizzato",
255
- daily: "Giornaliero",
256
- dateFrom: "Data da",
257
- dateTo: "Da",
258
- lastMonth: "Il mese scorso",
259
- lastSevenDays: "Ultimi 7 giorni",
260
- lastThreeMonths: "Gli ultimi tre mesi",
261
- monthly: "Mensile",
262
- quarterly: "Trimestrale",
263
- timeFrom: "Tempo dal",
264
- timeTo: "Tempo fino al",
265
- weekly: "Settimanale"
266
- },
267
- "ja-JP": {
268
- "DD-MM-YYYY": "DD-MM-YYYY",
269
- "MM-DD-YYYY": "MM-DD-YYYY",
270
- "YYYY-MM-DD": "YYYY-MM-DD",
271
- customRange: "カスタム範囲",
272
- daily: "毎日",
273
- dateFrom: "開始日",
274
- dateTo: "終了日",
275
- lastMonth: "先月",
276
- lastSevenDays: "過去 7 日間",
277
- lastThreeMonths: "過去3か月",
278
- monthly: "毎月",
279
- quarterly: "四半期ごと",
280
- timeFrom: "開始時刻",
281
- timeTo: "終了時刻",
282
- weekly: "毎週"
283
- },
284
- "pt-BR": {
285
- "DD-MM-YYYY": "DD-MM-AAAA",
286
- "MM-DD-YYYY": "MM-DD-AAAA",
287
- "YYYY-MM-DD": "AAAA-MM-DD",
288
- customRange: "Intervalo personalizado",
289
- daily: "Diário",
290
- dateFrom: "Data a partir de",
291
- dateTo: "Data até",
292
- lastMonth: "Último mês",
293
- lastSevenDays: "Últimos 7 dias",
294
- lastThreeMonths: "Últimos 3 meses",
295
- monthly: "Mensal",
296
- quarterly: "Trimestral",
297
- timeFrom: "Horário a partir de",
298
- timeTo: "Horário até",
299
- weekly: "Semanal"
300
- },
301
- "zh-CN": {
302
- "DD-MM-YYYY": "日-月-年",
303
- "MM-DD-YYYY": "YYYY-MM-DD",
304
- "YYYY-MM-DD": "年-月-日",
305
- customRange: "自定义范围",
306
- daily: "每日",
307
- dateFrom: "日期自",
308
- dateTo: "日期至",
309
- lastMonth: "上个月",
310
- lastSevenDays: "最近 7 天",
311
- lastThreeMonths: "过去三个月",
312
- monthly: "每月",
313
- quarterly: "每季度",
314
- timeFrom: "时间自",
315
- timeTo: "是时候",
316
- weekly: "每周"
317
- }
318
- }, ra = {
319
- name: "date-range-picker-calendar",
320
- i18n: { messages: na }
321
- }, sa = /* @__PURE__ */ ze({
322
- ...ra,
323
- props: {
324
- /**
325
- * Allows user to enter time values in the form
326
- */
327
- allowTimeInput: { type: Boolean, default: !1 },
328
- /**
329
- * Ranges form persistance data
330
- */
331
- dateFormData: {
332
- type: Object,
333
- default: () => ({ startDate: void 0, endDate: void 0, startTime: void 0, endTime: void 0 })
334
- },
335
- /**
336
- * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
337
- */
338
- firstDayOfWeek: P.props.firstDayOfWeek,
339
- /**
340
- * A list of available granularities.
341
- * If present, the date picker will display a segmented control to change granularity.
342
- */
343
- granularities: {
344
- type: Array,
345
- default: null
346
- },
347
- /**
348
- * Indicate if a date should be disabled or not
349
- */
350
- isDateDisabled: P.props.isDateDisabled,
351
- /**
352
- * Set a maximum number of dates to be selectable by the range.
353
- */
354
- maxRange: P.props.maxRange,
355
- /**
356
- * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
357
- */
358
- min: P.props.min,
359
- /**
360
- * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
361
- */
362
- max: P.props.max,
363
- /**
364
- * Number of months rendered on pane
365
- */
366
- numberOfMonths: {
367
- type: P.props.numberOfMonths.type,
368
- default: P.props.numberOfMonths.default,
369
- validator: (s) => s >= 0
370
- },
371
- /**
372
- * Displays the end date's month when the calendar is opened. Defaults to false i.e. the start date's month is displayed.
373
- */
374
- showEndDateOnOpen: { type: Boolean, default: !1 },
375
- /**
376
- * Enables the custom range selector.
377
- * If provided, must be an array that sets the custom range dropdown items. Items are of the structure:
378
- * `label` - label of custom range item.
379
- * `value` - a unique key of the custom range item.
380
- * `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.
381
- */
382
- quickSelectRanges: {
383
- type: Array,
384
- default: void 0
385
- },
386
- /**
387
- * Selected date
388
- */
389
- value: { type: Object, default: void 0 },
390
- /**
391
- * The type of calendar to display. Defaults to showing days.
392
- */
393
- variant: P.props.variant
394
- },
395
- emits: [
396
- v.CUSTOM_RANGE,
397
- v.INPUT,
398
- v.ERROR,
399
- v.FORM_DATE,
400
- v.START_DATE_SELECTED
401
- ],
402
- setup(s, { emit: a }) {
403
- var Fe, Ee, Oe, we;
404
- const e = s, t = 300, i = "customRange", m = {
405
- daily: "maxRangeDays",
406
- weekly: "maxRangeWeeks",
407
- monthly: "maxRangeMonths",
408
- quarterly: "maxRangeQuarters"
409
- }, f = vt(), g = kt(f), { t: x, tc: L } = Ae(), { isTouchDevice: M } = Ft(), {
410
- dateFormat: se,
411
- isFormatValid: X,
412
- parseDate: D,
413
- onKeyDown: W,
414
- autoFormat: b,
415
- formatDate: O
416
- } = be(), y = C({}), j = p(() => e.variant === "month" ? "monthly" : "daily"), F = p(() => e.numberOfMonths === 0), r = ye({
417
- startDate: (Fe = e.value) == null ? void 0 : Fe.startDate,
418
- endDate: (Ee = e.value) == null ? void 0 : Ee.endDate,
419
- range: (Oe = e.value) == null ? void 0 : Oe.range,
420
- ...e.granularities ? {
421
- granularity: ((we = e.value) == null ? void 0 : we.granularity) || j.value
422
- } : {}
423
- }), I = p(() => {
424
- var n, l;
425
- return (
426
- // eslint-disable-next-line consistent-return
427
- ((l = (n = e == null ? void 0 : e.quickSelectRanges) == null ? void 0 : n.find(({ value: u, data: c }) => {
428
- var Y;
429
- if (!c.endDate) {
430
- if (c.isRelativeToNow) {
431
- const _ = (Y = y.value) == null ? void 0 : Y[u];
432
- return _ ? he(_.startDate, r.startDate) && he(_.endDate, r.endDate) : (
433
- // If not stored calculated dates, fall back to comparing the quick select item's value
434
- // with the internal range's stored range identifier.
435
- u === r.range
436
- );
437
- }
438
- return he(c.startDate, r.startDate) && Kt(r.endDate) && (!e.allowTimeInput || Ye(r.endDate, B(r.endDate))) && (e.granularities ? c.granularity === r.granularity : !0);
439
- }
440
- if (e.allowTimeInput)
441
- return Ye(c.startDate, r.startDate) && Ye(c.endDate, r.endDate) && (e.granularities ? c.granularity === r.granularity : !0);
442
- if (c.endDate)
443
- return E(c.startDate, r.startDate) && E(c.endDate, r.endDate) && (e.granularities ? c.granularity === r.granularity : !0);
444
- })) == null ? void 0 : l.value) ?? i
445
- );
446
- }), oe = p(() => ({
447
- "b-date-range-picker-calendar__form-input-wrapper": e.allowTimeInput
448
- })), le = p(() => [
449
- { label: x("customRange"), value: i },
450
- ...e.quickSelectRanges ? e.quickSelectRanges : []
451
- ]), J = p(
452
- () => {
453
- var n;
454
- return ((n = e.granularities) == null ? void 0 : n.find(({ type: l }) => l === r.granularity)) || null;
455
- }
456
- ), ie = p(
457
- () => {
458
- var n;
459
- return ((n = e.granularities) == null ? void 0 : n.map(({ type: l, disabled: u }) => ({
460
- label: x(l),
461
- value: l,
462
- disabled: u
463
- }))) ?? [];
464
- }
465
- ), { getGranularCalendarLimits: Z } = ta(e), T = p(
466
- () => e.granularities ? Z(J.value) : { min: e.min ? R(e.min) : null, max: e.max ? B(e.max) : null }
467
- ), {
468
- adjustDateForQuarterly: h,
469
- adjustDateForMonthly: ue,
470
- adjustDateForWeekly: de,
471
- adjustStartDateInputForWeekly: z,
472
- adjustEndDateInputForWeekly: ce,
473
- adjustStartDateInputForMonthly: $,
474
- adjustEndDateInputForMonthly: H,
475
- adjustStartDateInputForQuarterly: w,
476
- adjustEndDateInputForQuarterly: G
477
- } = qt(e.firstDayOfWeek), { savedRanges: q, saveRange: me, resetSavedRanges: ee } = aa(), A = (n) => n ? O(n) : "", V = C(!1), K = C(!1), o = ye({
478
- startDate: e.dateFormData.startDate,
479
- endDate: e.dateFormData.endDate,
480
- startTime: e.dateFormData.startTime,
481
- endTime: e.dateFormData.endTime
482
- }), De = (n, l) => {
483
- let u = new Date(n);
484
- const [c, Y, _] = l.split(":");
485
- return u = Xt(u, parseInt(c, 10)), u = Zt(u, parseInt(Y, 10)), u = ea(u, parseInt(_, 10)), u;
486
- }, pe = (n, l) => {
487
- const u = () => {
488
- if (l && N(l)) {
489
- const c = De(D(l), n);
490
- if (e.min && c < Je(e.min, 0) || e.max && c > Je(e.max, 0))
491
- return !1;
492
- }
493
- return !0;
494
- };
495
- return Be(n) && u();
496
- }, d = p(() => e.variant === "month"), Q = (n) => n ? d.value ? Nt(n) : Pt(n) : "", te = p(() => Q(r.startDate)), Ie = p(() => Q(r.endDate)), Ke = p(() => M.value ? d.value ? "month" : "date" : "text"), Xe = p(() => M.value ? te.value : o.startDate), Ze = p(() => M.value ? Ie.value : o.endDate), k = (n, l) => !l || !Be(l) || e.variant === "month" ? n : De(new Date(n), l), et = (n) => {
497
- o.startTime = S(
498
- e.min && e.allowTimeInput && E(e.min, n.startDate) ? e.min : R(n.startDate)
499
- ), o.endTime = S(
500
- e.max && e.allowTimeInput && E(e.max, n.endDate) ? e.max : B(n.endDate)
501
- ), r.startDate = k(n.startDate, o.startTime), r.endDate = k(n.endDate, o.endTime), r.range = null, e.granularities && ee(), a(v.INPUT, {
502
- ...r,
503
- range: I.value
504
- });
505
- }, N = (n) => {
506
- if (!n)
507
- return !1;
508
- const l = (u) => e.min && R(u) < R(e.min) || e.max && R(u) > R(e.max) ? !1 : e.isDateDisabled ? !e.isDateDisabled(R(u)) : !0;
509
- return X(n) && l(D(n));
510
- };
511
- $e(() => {
512
- V.value = !!(e.dateFormData.startDate && !N(e.dateFormData.startDate)), K.value = !!(e.dateFormData.endDate && !N(e.dateFormData.endDate));
513
- });
514
- const tt = (n) => {
515
- o.startDate = A(n), o.startTime || (o.startTime = S(n)), V.value = !1, a(v.START_DATE_SELECTED, n);
516
- }, at = (n) => {
517
- o.endDate = A(n), o.endTime || (o.endTime = S(B(n))), K.value = !1;
518
- }, fe = (n) => {
519
- const l = e.value[n];
520
- if (l)
521
- return l;
522
- if (e.dateFormData[n] && N(e.dateFormData[n]))
523
- return D(e.dateFormData[n]);
524
- }, Me = (n) => {
525
- var l;
526
- if (N(n)) {
527
- let u = n;
528
- switch (V.value = !1, (l = J.value) == null ? void 0 : l.type) {
529
- case "weekly":
530
- u = z(
531
- n,
532
- A,
533
- T.value.min,
534
- T.value.max
535
- ), o.startDate = u;
536
- break;
537
- case "monthly":
538
- u = $(
539
- n,
540
- A,
541
- T.value.min,
542
- T.value.max
543
- ), o.startDate = u;
544
- break;
545
- case "quarterly":
546
- u = w(
547
- n,
548
- A,
549
- T.value.min,
550
- T.value.max
551
- ), o.startDate = u;
552
- break;
553
- }
554
- const c = R(D(u));
555
- r.startDate = k(c, o.startTime), r.endDate = k(
556
- R(D(o.endDate)),
557
- o.endTime
558
- ), N(o.endDate) && (r.endDate = k(
559
- R(D(o.endDate)),
560
- o.endTime
561
- ));
562
- const Y = fe("endDate");
563
- r.range = null, a(v.FORM_DATE, {
564
- startDate: c,
565
- endDate: Y
566
- }), a(v.INPUT, {
567
- ...r,
568
- range: I.value
569
- });
570
- } else
571
- V.value = !0, a(v.ERROR, { ...o });
572
- }, _e = xe(Me, t), nt = (n) => {
573
- if (o.startDate = M.value && d.value ? n : b(n), M.value)
574
- if (d.value && n) {
575
- const l = Le(n);
576
- r.startDate = k(l, o.startTime), r.range = null, a(v.INPUT, {
577
- ...r,
578
- range: I.value
579
- });
580
- } else
581
- Me(o.startDate);
582
- else
583
- _e(o.startDate);
584
- }, ge = (n) => {
585
- var l;
586
- if (N(n)) {
587
- let u = n;
588
- switch (K.value = !1, (l = J.value) == null ? void 0 : l.type) {
589
- case "weekly":
590
- u = ce(
591
- n,
592
- A,
593
- T.value.min,
594
- T.value.max
595
- ), o.endDate = u;
596
- break;
597
- case "monthly":
598
- u = H(
599
- n,
600
- A,
601
- T.value.min,
602
- T.value.max
603
- ), o.endDate = u;
604
- break;
605
- case "quarterly":
606
- u = G(
607
- n,
608
- A,
609
- T.value.min,
610
- T.value.max
611
- ), o.endDate = u;
612
- break;
613
- }
614
- const c = R(D(u));
615
- r.endDate = k(c, o.endTime), N(o.startDate) && (r.startDate = k(
616
- R(D(o.startDate)),
617
- o.startTime
618
- ));
619
- const Y = fe("startDate");
620
- r.range = null, a(v.FORM_DATE, {
621
- startDate: Y,
622
- endDate: c
623
- }), a(v.INPUT, {
624
- ...r,
625
- range: I.value
626
- });
627
- } else
628
- K.value = !0, a(v.ERROR, { ...o });
629
- }, ke = xe(ge, t), rt = (n) => {
630
- if (o.endDate = M.value && d.value ? n : b(n), M.value)
631
- if (d.value && n) {
632
- const l = Le(n);
633
- r.endDate = k(l, o.endTime), r.range = null, a(v.INPUT, {
634
- ...r,
635
- range: I.value
636
- });
637
- } else
638
- ge(o.endDate);
639
- else
640
- ke(o.endDate);
641
- }, st = (n) => {
642
- W(n);
643
- }, ot = () => {
644
- a(v.ERROR, { ...o });
645
- }, lt = () => {
646
- const n = o.startTime;
647
- if (!pe(n, o.startDate)) {
648
- a(v.ERROR, { ...o });
649
- return;
650
- }
651
- r.startDate = k(r.startDate, n);
652
- const l = fe("endDate");
653
- a(v.FORM_DATE, {
654
- startDate: r.startDate,
655
- endDate: l,
656
- startTime: n,
657
- endTime: o.endTime ?? e.dateFormData.endTime
658
- }), a(v.INPUT, {
659
- ...r,
660
- range: I.value
661
- });
662
- }, it = () => {
663
- a(v.ERROR, { ...o });
664
- }, ut = () => {
665
- const n = o.endTime;
666
- if (!pe(n, o.endDate)) {
667
- a(v.ERROR, { ...o });
668
- return;
669
- }
670
- r.endDate = k(r.endDate, n), a(v.FORM_DATE, {
671
- startDate: r.startDate,
672
- endDate: r.endDate,
673
- startTime: o.startTime ?? e.dateFormData.startTime,
674
- endTime: n
675
- }), a(v.INPUT, {
676
- ...r,
677
- range: I.value
678
- });
679
- }, dt = (n) => {
680
- o.startTime = n;
681
- }, ct = (n) => {
682
- o.endTime = n;
683
- }, ae = (n, l, u, c) => {
684
- r.startDate = n, r.endDate = l, u && (r.granularity = u), c && (r.range = c);
685
- }, mt = (n) => {
686
- var u;
687
- const l = (u = e.quickSelectRanges) == null ? void 0 : u.find(({ value: c }) => c === n);
688
- if (l) {
689
- ee();
690
- const c = l.data, Y = c.endDate || (c.isRelativeToNow ? new Date(Date.now()) : B(new Date(Date.now()))), _ = c.isRelativeToNow && c.timeDifference ? new Date(Y.getTime() - c.timeDifference) : c.startDate;
691
- o.endDate = A(Y), o.startDate = A(_), ae(_, Y, null, n), e.granularities && (r.granularity = c.granularity || j.value), o.startTime = S(_), o.endTime = S(Y), r.startDate = _, r.endDate = Y, c.isRelativeToNow && (y.value = {
692
- ...y.value,
693
- [n]: {
694
- startDate: _,
695
- endDate: Y
696
- }
697
- }), a(v.CUSTOM_RANGE, {
698
- ...l.data,
699
- startDate: _,
700
- endDate: Y,
701
- range: l.value
702
- });
703
- }
704
- }, Se = {
705
- weekly: de,
706
- monthly: ue,
707
- quarterly: h
708
- }, Dt = (n) => {
709
- const l = r.granularity;
710
- if (r.granularity = n, l && me(l, structuredClone(Re(r))), r.startDate && r.endDate) {
711
- switch (n) {
712
- case "quarterly":
713
- case "monthly":
714
- case "weekly": {
715
- if (q[n]) {
716
- ae(q[n].startDate, q[n].endDate, n);
717
- break;
718
- }
719
- const { startDate: u, endDate: c } = Se[n](
720
- r.startDate,
721
- r.endDate,
722
- T.value.min,
723
- T.value.max
724
- );
725
- ae(u, c, n);
726
- break;
727
- }
728
- case "daily":
729
- q.daily && ae(q.daily.startDate, q.daily.endDate, n);
730
- break;
731
- }
732
- o.startDate = A(r.startDate), o.endDate = A(r.endDate), a(v.INPUT, {
733
- ...r,
734
- range: I.value
735
- });
736
- }
737
- }, pt = p(() => ({
738
- "b-date-range-picker-calendar__form-container--no-calendars": F.value
739
- })), ft = p(() => {
740
- const n = J.value, l = (n == null ? void 0 : n.maxRange) || e.maxRange;
741
- if (!l)
742
- return null;
743
- const u = m[(n == null ? void 0 : n.type) ?? "daily"];
744
- return L(u, l, { count: l });
745
- });
746
- return { __sfc: !0, FORM_INPUT_DEBOUNCE_TIME: t, RANGE_SELECTOR_CUSTOM_RANGE_KEY: i, maxRangeMessageKeyMap: m, props: e, emit: a, slots: f, hasSlot: g, t: x, tc: L, isTouchDevice: M, dateFormat: se, isFormatValid: X, parseDate: D, onKeyDown: W, autoFormat: b, formatDateUtil: O, calculatedIsRelativeToNowQuickSelectRanges: y, defaultGranularity: j, hasNoCalendars: F, internalRangeDate: r, selectedRangeSelectorValue: I, formInputWrapperConditionalClasses: oe, quickSelectRangeDefaultItems: le, selectedGranularity: J, granularityItems: ie, getGranularCalendarLimits: Z, computedMinMax: T, adjustDateForQuarterly: h, adjustDateForMonthly: ue, adjustDateForWeekly: de, adjustStartDateInputForWeekly: z, adjustEndDateInputForWeekly: ce, adjustStartDateInputForMonthly: $, adjustEndDateInputForMonthly: H, adjustStartDateInputForQuarterly: w, adjustEndDateInputForQuarterly: G, savedRanges: q, saveRange: me, resetSavedRanges: ee, formatDate: A, startDateError: V, endDateError: K, dateTextInput: o, setTimeInDateObject: De, isValidTime: pe, isMonthVariant: d, formatNativeDate: Q, nativeStartDate: te, nativeEndDate: Ie, dateInputType: Ke, startDateValue: Xe, endDateValue: Ze, setTimeInDateRef: k, onDateInput: et, isValidDate: N, onStartDateSelected: tt, onEndDateSelected: at, getDate: fe, validateStartDate: Me, validateStartDateDebounced: _e, onStartDateInput: nt, validateEndDate: ge, validateEndDateDebounced: ke, onEndDateInput: rt, onDateInputKeyDown: st, onStartTimeError: ot, onStartTimeValid: lt, onEndTimeError: it, onEndTimeValid: ut, onStartTimeInput: dt, onEndTimeInput: ct, setInternalRange: ae, onRangeSelectorInput: mt, adjustDate: Se, onGranularityInput: Dt, computedFormContainerClasses: pt, maxRangeMessage: ft, Calendar: P, BentoAlert: Yt, BentoTypography: He, BentoInputField: Rt, BentoInputTime: At, BentoDropdown: bt, BentoSegmentedControl: _t };
747
- }
748
- });
749
- var oa = function() {
750
- var a = this, e = a._self._c, t = a._self._setupProxy;
751
- 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(), t.maxRangeMessage ? e(t.BentoAlert, { attrs: { variant: "tip" }, scopedSlots: a._u([{ key: "description", fn: function() {
752
- return [a._v(" " + a._s(t.maxRangeMessage) + " ")];
753
- }, proxy: !0 }], null, !1, 1192229622) }) : 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() {
754
- return [a._v(a._s(t.t(t.dateFormat)))];
755
- }, 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() {
756
- return [a._v(a._s(t.t(t.dateFormat)))];
757
- }, 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()]);
758
- }, la = [], ia = /* @__PURE__ */ Ve(
759
- sa,
760
- oa,
761
- la,
762
- !1,
763
- null,
764
- "7338c0ea"
765
- );
766
- const ua = ia.exports, da = {
767
- "de-DE": {
768
- apply: "Anwenden",
769
- cancel: "Abbrechen",
770
- dateRangePicker: "Datumsbereichauswahl {name}",
771
- provideDateInAFormat: "Geben Sie das Datum im Format YYYY-MM-DD an",
772
- quarter: "Q{quarter} {year}",
773
- selectDate: "Wählen Sie ein Datum",
774
- selectDateRange: "Wählen Sie einen Datumsbereich aus",
775
- selectedDateIsNotAvailable: "Ausgewähltes Datum ist nicht verfügbar"
776
- },
777
- "en-GB": {
778
- apply: "Apply",
779
- cancel: "Cancel",
780
- dateRangePicker: "Date range picker {name}",
781
- provideDateInAFormat: "Enter date in YYYY-MM-DD format",
782
- quarter: "Q{quarter} {year}",
783
- selectDate: "Select a date",
784
- selectDateRange: "Select a date range",
785
- selectedDateIsNotAvailable: "Selected date is not available"
786
- },
787
- "en-US": {
788
- apply: "Apply",
789
- cancel: "Cancel",
790
- dateRangePicker: "Date range picker {name}",
791
- provideDateInAFormat: "Provide date in a YYYY-MM-DD format",
792
- quarter: "Q{quarter} {year}",
793
- selectDate: "Select a date",
794
- selectDateRange: "Select a date range",
795
- selectedDateIsNotAvailable: "Selected date is not available"
796
- },
797
- "es-ES": {
798
- apply: "Aplicar",
799
- cancel: "Cancelar",
800
- dateRangePicker: "Selector de intervalos de fechas {name}",
801
- provideDateInAFormat: "Proporciona la fecha en formato AAAAA-MM-DD",
802
- quarter: "T{quarter} {year}",
803
- selectDate: "Selecciona una fecha",
804
- selectDateRange: "Selecciona un rango de fechas",
805
- selectedDateIsNotAvailable: "La fecha seleccionada no está disponible"
806
- },
807
- "es-MX": {
808
- apply: "Aplicar",
809
- cancel: "Cancelar",
810
- dateRangePicker: "Selector de intervalos de fechas {name}",
811
- provideDateInAFormat: "Proporciona la fecha en formato AAAA-MM-DD",
812
- quarter: "T{quarter} {year}",
813
- selectDate: "Selecciona una fecha",
814
- selectDateRange: "Selecciona un rango de fechas",
815
- selectedDateIsNotAvailable: "La fecha seleccionada no está disponible"
816
- },
817
- "fr-FR": {
818
- apply: "Appliquer",
819
- cancel: "Annuler",
820
- dateRangePicker: "Sélecteur de plages de dates {name}",
821
- provideDateInAFormat: "Fournissez la date au format AAAA-MM-JJ",
822
- quarter: "T{quarter} {year}",
823
- selectDate: "Sélectionnez une date",
824
- selectDateRange: "Sélectionnez une plage de dates",
825
- selectedDateIsNotAvailable: "La date sélectionnée n’est pas disponible"
826
- },
827
- "it-IT": {
828
- apply: "Applica",
829
- cancel: "Annulla",
830
- dateRangePicker: "Selettore intervallo di date {name}",
831
- provideDateInAFormat: "Inserisci la data nel formato AAAA-MM-GG",
832
- quarter: "Q{quarter} {year}",
833
- selectDate: "Seleziona una data",
834
- selectDateRange: "Seleziona un intervallo di date",
835
- selectedDateIsNotAvailable: "La data selezionata non è disponibile"
836
- },
837
- "ja-JP": {
838
- apply: "適用",
839
- cancel: "キャンセル",
840
- dateRangePicker: "日付範囲ピッカー {name}",
841
- provideDateInAFormat: "YYYY-MM-DD形式で日付を入力してください",
842
- quarter: "{year}年第{quarter}四半期",
843
- selectDate: "日付を選択",
844
- selectDateRange: "日付範囲を選択",
845
- selectedDateIsNotAvailable: "選択した日付は利用できません"
846
- },
847
- "pt-BR": {
848
- apply: "Aplicar",
849
- cancel: "Cancelar",
850
- dateRangePicker: "Seletor de intervalo de datas {name}",
851
- provideDateInAFormat: "Inclua a data no formato AAAA-MM-DD",
852
- quarter: "{quarter}º trimestre de {year}",
853
- selectDate: "Selecione uma data",
854
- selectDateRange: "Selecione um intervalo de datas",
855
- selectedDateIsNotAvailable: "A data selecionada não está disponível"
856
- },
857
- "zh-CN": {
858
- apply: "应用",
859
- cancel: "取消",
860
- dateRangePicker: "日期范围选择器 {name}",
861
- provideDateInAFormat: "提供 YYYY-MM-DD 格式的日期",
862
- quarter: "{year} {quarter} 季度",
863
- selectDate: "选择日期",
864
- selectDateRange: "选择日期范围",
865
- selectedDateIsNotAvailable: "所选日期不可用"
866
- }
867
- }, ca = ({
868
- datePickerValue: s,
869
- isDateIncorrect: a,
870
- quickSelectRanges: e,
871
- isMonthVariant: t,
872
- withTimeInput: i,
873
- placeholder: m
874
- }) => {
875
- const { locale: f, t: g } = Ae(), { dateToInputDateString: x } = be(), L = (D) => !!D && !isNaN(D.getTime()), M = ye({
876
- startDate: null,
877
- endDate: null,
878
- startTime: null,
879
- endTime: null
880
- });
881
- return ve(
882
- s,
883
- (D) => {
884
- M.startDate = x(D == null ? void 0 : D.startDate), M.endDate = x(D == null ? void 0 : D.endDate), M.startTime = S(D == null ? void 0 : D.startDate), M.endTime = S(D == null ? void 0 : D.endDate);
885
- },
886
- { immediate: !0 }
887
- ), {
888
- // Values
889
- dateDisplayValue: p(() => {
890
- var W;
891
- if (a.value)
892
- return `${M.startDate || ""} - ${M.endDate || ""}`;
893
- if (!s.value || !s.value.startDate && !s.value.endDate)
894
- return (m == null ? void 0 : m.value) || g("selectDateRange");
895
- if ((W = e.value) != null && W.length) {
896
- const b = e.value.find(({ value: O }) => {
897
- var y;
898
- return O === ((y = s.value) == null ? void 0 : y.range);
899
- });
900
- if (b)
901
- return b.label;
902
- }
903
- if (s.value.granularity === "quarterly") {
904
- const { startDate: b, endDate: O } = s.value, y = g("quarter", { quarter: Ge(b), year: We(b) });
905
- if (Vt(b, O))
906
- return y;
907
- const j = g("quarter", { quarter: Ge(O), year: We(O) });
908
- return `${y} - ${j}`;
909
- }
910
- if (!L(s.value.startDate) || !L(s.value.endDate))
911
- return `${M.startDate || ""} - ${M.endDate || ""}`;
912
- let D = t != null && t.value ? { month: "long", year: "numeric" } : { month: "short", day: "2-digit", year: "numeric" };
913
- return i.value && (D = {
914
- ...D,
915
- hour: "numeric",
916
- minute: "numeric",
917
- second: "numeric",
918
- hour12: !1
919
- }), Lt(f.value, D).formatRange(
920
- s.value.startDate,
921
- s.value.endDate
922
- );
923
- }),
924
- textInputDisplayValue: M,
925
- // Methods
926
- formatTextInputDisplayValue: () => ""
927
- };
928
- }, ma = {
929
- i18n: { messages: da },
930
- name: "bento-date-range-picker",
931
- model: { prop: "modelValue" }
932
- }, Da = /* @__PURE__ */ ze({
933
- ...ma,
934
- props: {
935
- description: { default: void 0 },
936
- disabled: { type: Boolean, default: !1 },
937
- errorMessage: { default: null },
938
- label: { default: void 0 },
939
- optional: { type: Boolean, default: !1 },
940
- placeholder: { default: null },
941
- readonly: { type: Boolean, default: !1 },
942
- required: { type: Boolean, default: !1 },
943
- tooltipText: { default: null },
944
- allowTimeInput: { type: Boolean },
945
- firstDayOfWeek: { default: void 0 },
946
- granularities: null,
947
- isDateDisabled: { default: void 0 },
948
- showEndDateOnOpen: { type: Boolean, default: !1 },
949
- quickSelectRanges: { default: void 0 },
950
- maxRange: { default: null },
951
- min: { default: null },
952
- max: { default: null },
953
- numberOfMonths: { default: void 0 },
954
- modelValue: { default: null },
955
- value: { default: null },
956
- variant: { default: void 0 },
957
- hasActions: { type: Boolean, default: !1 }
958
- },
959
- emits: ["update:model-value", "input"],
960
- setup(s, { emit: a }) {
961
- const e = s, t = yt(), { t: i } = Ae(), { dateToInputDateString: m } = be(), f = ne("bento-date-range-picker-container"), g = ne("bento-date-range-picker-label"), x = ne("bento-date-range-picker-description"), L = ne("bento-date-range-picker-error"), M = ne("bento-date-range-picker-date-error"), se = p(() => e.label || i("dateRangePicker", { name: f })), { resolvedFirstDayOfWeek: X } = St(Te(e, "firstDayOfWeek")), D = Mt({
962
- none: 0,
963
- one: 710,
964
- // width of date range picker with one panes
965
- two: 1030,
966
- // width of date range picker with two panes
967
- three: 1290
968
- // width of date range picker with three panes
969
- }), W = p(() => {
970
- const d = D.active().value, Q = {
971
- none: 0,
972
- one: 1,
973
- two: 2
974
- };
975
- if (d in Q) {
976
- const te = Q[d];
977
- return e.numberOfMonths === void 0 ? te : Math.min(e.numberOfMonths, te);
978
- }
979
- return e.numberOfMonths;
980
- }), b = p(() => (e == null ? void 0 : e.quickSelectRanges) && e.quickSelectRanges.map((d) => {
981
- const Q = d.data.endDate ? void 0 : new Date(Date.now()).getTime() - d.data.startDate.getTime();
982
- return {
983
- ...d,
984
- data: {
985
- ...d.data,
986
- // Adding timeDifference to calculate an up-to-date endDate on range selection
987
- timeDifference: Q
988
- }
989
- };
990
- })), O = p(() => e.label ? g : (t == null ? void 0 : t["aria-labelledby"]) ?? null), y = C(!1), j = C(null), F = C(!1), { isReadOnly: r } = Wt(Te(e, "readonly")), { emitValue: I } = jt(a);
991
- ve(
992
- () => e.disabled,
993
- () => {
994
- e.disabled && F.value && (F.value = !1);
995
- }
996
- );
997
- const oe = p(() => e.modelValue || e.value), le = p(() => e.hasActions ? !G.value && y.value : y.value), J = p(() => ({
998
- "b-date-range-picker__description--error": !!e.errorMessage || le.value
999
- })), ie = p(() => e.variant === "month"), Z = p(() => e.allowTimeInput && e.variant !== "month"), { dateDisplayValue: T, textInputDisplayValue: h, formatTextInputDisplayValue: ue } = ca({
1000
- datePickerValue: oe,
1001
- isDateIncorrect: y,
1002
- quickSelectRanges: b,
1003
- isMonthVariant: ie,
1004
- withTimeInput: Z,
1005
- placeholder: Te(e, "placeholder")
1006
- }), de = p(
1007
- () => `${e.description ? x : ""} ${e.errorMessage ? L : ""} ${y.value ? M : ""}`.trim() || null
1008
- ), z = () => {
1009
- F.value = !1;
1010
- }, ce = () => {
1011
- F.value = !0;
1012
- }, $ = C(T.value), H = C(
1013
- // textInputDisplayValue is a reactive object
1014
- structuredClone(Re(h))
1015
- ), w = C(e.modelValue ?? e.value), G = C(!0), q = p(
1016
- () => e.hasActions ? H.value : h
1017
- ), me = p(
1018
- () => e.hasActions ? $.value : T.value
1019
- );
1020
- $e(() => {
1021
- if (e.hasActions || Ce(
1022
- 'BentoDateRangePicker "hasActions" property',
1023
- `Set the BentoDateRangePicker "hasActions" property true which will display the "Apply" and "Cancel" buttons.
1024
- This will be the default behavior in the v2 and "hasActions" will be removed.`,
1025
- "2.0.0"
1026
- ), e.value && Ce(
1027
- 'BentoDateRangePicker "value" property',
1028
- 'The use of "value" prop in "BentoDateRangePicker" is no longer supported. Use the "v-model" or "model-value" property instead.',
1029
- "2.0.0"
1030
- ), e.granularities && e.variant !== "month" && e.granularities.find(({ type: d }) => d === "quarterly"))
1031
- throw new Error('Quarterly granularity is only supported by BentoDateRangePicker with variant: "month"');
1032
- }), ve([() => e.value, () => e.modelValue], () => {
1033
- $.value = T.value, H.value = structuredClone(Re(h));
1034
- });
1035
- const ee = p(() => [
1036
- {
1037
- title: i("apply"),
1038
- event: () => {
1039
- I(w.value), z(), G.value = !0;
1040
- },
1041
- disabled: G.value
1042
- },
1043
- {
1044
- title: i("cancel"),
1045
- event: z
1046
- }
1047
- ]);
1048
- return ve(w, (d) => {
1049
- if (e.hasActions) {
1050
- G.value = y.value;
1051
- return;
1052
- }
1053
- I(d);
1054
- }), { __sfc: !0, emit: a, props: e, attrs: t, t: i, dateToInputDateString: m, datePickerContainerId: f, labelId: g, descriptionId: x, errorId: L, dateErrorId: M, popoverAriaLabel: se, resolvedFirstDayOfWeek: X, breakpoints: D, computedNumberOfMonths: W, adjustedQuickSelectRanges: b, dropdownInputAriaLabelledBy: O, isDateIncorrect: y, inputContainerRef: j, isDateRangePickerOpen: F, isReadOnly: r, emitValue: I, internalModelValue: oe, shouldDisplayError: le, descriptionConditionalClasses: J, isMonthVariant: ie, withTimeInput: Z, dateDisplayValue: T, textInputDisplayValue: h, formatTextInputDisplayValue: ue, ariaDescribedBy: de, closeDateRangePicker: z, openDateRangePicker: ce, localDateDisplayValue: $, localTextInputDisplayValue: H, selectedDate: w, isApplyDisabled: G, displayedTextInputValue: q, displayedDateValue: me, rangePickerButtonActions: ee, onDateRangePickerInput: (d) => {
1055
- y.value = !1, h.startDate = m(d.startDate), h.endDate = m(d.endDate), h.startTime = S(d.startDate), h.endTime = S(d.endDate), w.value = d;
1056
- }, clearDateRangePickerValue: async () => {
1057
- y.value && (y.value = !1), w.value = null;
1058
- }, onEnterPressedOverInput: () => {
1059
- if (!F.value) {
1060
- F.value = !0;
1061
- return;
1062
- }
1063
- y.value || (F.value = !1);
1064
- }, onDateRangePickerFormDateInputUpdate: (d) => {
1065
- y.value = !1, d.startTime && (h.startTime = d.startTime), d.endTime && (h.endTime = d.endTime);
1066
- }, onDateRangePickerError: (d) => {
1067
- y.value = !0, h.startDate = d.startDate, h.endDate = d.endDate, w.value = { startDate: null, endDate: null };
1068
- }, onRangeSelectorInput: (d) => {
1069
- d && (h.startDate = m(d.startDate), h.endDate = m(d.endDate), h.startTime = S(d.startDate), h.endTime = S(d.endDate), w.value = d);
1070
- }, BentoButtonActions: ht, BentoButtonActionsLayout: Ht, BentoDivider: gt, BentoPopover: Tt, BentoTypography: He, DateRangePickerCalendar: ua, DropdownInputDefault: It, ErrorMessage: $t, FieldLabel: zt, vBentoClickOutsideDirective: Jt };
1071
- }
1072
- });
1073
- var pa = function() {
1074
- var a = this, e = a._self._c, t = a._self._setupProxy;
1075
- 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(i) {
1076
- return !i.type.indexOf("key") && a._k(i.keyCode, "enter", 13, i.key, "Enter") ? null : t.onEnterPressedOverInput.apply(null, arguments);
1077
- } } }, [e(t.DropdownInputDefault, { ref: "inputContainerRef", attrs: { "always-combobox-is-input": "", ariaControls: t.datePickerContainerId, ariaExpanded: t.isDateRangePickerOpen, "aria-labelledby": t.dropdownInputAriaLabelledBy, "aria-describedby": t.ariaDescribedBy, "aria-required": a.required, disabled: a.disabled, "is-invalid": !!a.errorMessage || t.shouldDisplayError, open: t.isDateRangePickerOpen, "display-value": t.displayedDateValue, readonly: t.isReadOnly }, on: { open: t.openDateRangePicker, clear: t.clearDateRangePickerValue, close: t.closeDateRangePicker } })], 1), t.shouldDisplayError ? e(t.ErrorMessage, { staticClass: "b-date-range-picker__error-message", attrs: { id: t.dateErrorId, "error-message": t.t("provideDateInAFormat") } }) : a._e(), a.errorMessage ? e(t.ErrorMessage, { staticClass: "b-date-range-picker__error-message", attrs: { id: t.errorId, "error-message": a.errorMessage } }) : a._e(), a.description ? e(t.BentoTypography, { staticClass: "b-date-range-picker__description", class: t.descriptionConditionalClasses, attrs: { id: t.descriptionId, el: "span" } }, [a._v(" " + a._s(a.description) + " ")]) : a._e(), t.inputContainerRef ? e(t.BentoPopover, { staticClass: "b-date-range-picker__container", attrs: { id: t.datePickerContainerId, open: t.isDateRangePickerOpen, "target-element": t.inputContainerRef, "aria-label": t.popoverAriaLabel, position: "bottom-start", "without-space": "", "fit-content": "", "trap-all": "", "overflow-visible": "" }, nativeOn: { keydown: function(i) {
1078
- return !i.type.indexOf("key") && a._k(i.keyCode, "esc", 27, i.key, ["Esc", "Escape"]) ? null : t.closeDateRangePicker.apply(null, arguments);
1079
- } } }, [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() {
1080
- 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)];
1081
- }, proxy: !0 } : null], null, !0) })], 1) : a._e()], 1);
1082
- }, fa = [], va = /* @__PURE__ */ Ve(
1083
- Da,
1084
- pa,
1085
- fa,
1086
- !1,
1087
- null,
1088
- "fbf1b83e"
1089
- );
1090
- const Ja = va.exports;
1091
- export {
1092
- Ja as B,
1093
- ua as D,
1094
- Kt as a,
1095
- he as i
1096
- };
1097
- //# sourceMappingURL=date-range-picker.zT42F9r4.js.map