@adyen/bento-vue2 1.90.0 → 1.92.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 (271) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/index.d.ts +372 -236
  3. package/dist/action-bar.js +1 -1
  4. package/dist/ai-tag.js +1 -1
  5. package/dist/alert.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/checkbox-group.css +1 -1
  12. package/dist/assets/checkbox.css +1 -1
  13. package/dist/assets/data-grid.css +1 -1
  14. package/dist/assets/date-picker.css +1 -1
  15. package/dist/assets/date-range-picker.css +1 -1
  16. package/dist/assets/dialog-page.css +1 -1
  17. package/dist/assets/draggable-handle.css +1 -1
  18. package/dist/assets/dropdown.css +1 -1
  19. package/dist/assets/error-message.css +1 -1
  20. package/dist/assets/field-label.css +1 -0
  21. package/dist/assets/file-uploader.css +1 -1
  22. package/dist/assets/filter-bar.css +1 -1
  23. package/dist/assets/form-layout-title.css +1 -1
  24. package/dist/assets/input-field.css +1 -1
  25. package/dist/assets/input-time.css +1 -1
  26. package/dist/assets/inspector.css +1 -1
  27. package/dist/assets/modal-fullscreen.css +1 -1
  28. package/dist/assets/secondary-nav.css +1 -1
  29. package/dist/assets/sidepanel.css +1 -1
  30. package/dist/assets/toggle.css +1 -1
  31. package/dist/assets/use-cached-selected-values.css +1 -1
  32. package/dist/button.js +1 -1
  33. package/dist/card.js +1 -1
  34. package/dist/checkbox.js +2 -2
  35. package/dist/chunks/{action-bar.B63qIiiH.js → action-bar.ChuPTyQG.js} +3 -3
  36. package/dist/chunks/{action-bar.B63qIiiH.js.map → action-bar.ChuPTyQG.js.map} +1 -1
  37. package/dist/chunks/{ai-tag.CCJCOdXu.js → ai-tag.Dt8nijLW.js} +2 -2
  38. package/dist/chunks/{ai-tag.CCJCOdXu.js.map → ai-tag.Dt8nijLW.js.map} +1 -1
  39. package/dist/chunks/{alert.CXRb-Smf.js → alert.CLqcPN0Q.js} +73 -55
  40. package/dist/chunks/alert.CLqcPN0Q.js.map +1 -0
  41. package/dist/chunks/{base-modal.DpmeDmq-.js → base-modal.DMdzcBrq.js} +4 -4
  42. package/dist/chunks/base-modal.DMdzcBrq.js.map +1 -0
  43. package/dist/chunks/{button-actions-with-menu.ChTUOsZl.js → button-actions-with-menu.CXFziNUr.js} +2 -2
  44. package/dist/chunks/{button-actions-with-menu.ChTUOsZl.js.map → button-actions-with-menu.CXFziNUr.js.map} +1 -1
  45. package/dist/chunks/{button-actions.BmU1DngD.js → button-actions.CXD6_9qN.js} +5 -5
  46. package/dist/chunks/button-actions.CXD6_9qN.js.map +1 -0
  47. package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
  48. package/dist/chunks/button.C9b2AC9w.js.map +1 -1
  49. package/dist/chunks/calendar.rZsIZPxm.js +1232 -0
  50. package/dist/chunks/calendar.rZsIZPxm.js.map +1 -0
  51. package/dist/chunks/{card.WWUfBkqf.js → card.Brma5kdb.js} +2 -2
  52. package/dist/chunks/card.Brma5kdb.js.map +1 -0
  53. package/dist/chunks/{checkbox-group.CI0xDnql.js → checkbox-group.DWZvFkjz.js} +6 -6
  54. package/dist/chunks/checkbox-group.DWZvFkjz.js.map +1 -0
  55. package/dist/chunks/{checkbox.TsWA6O3Z.js → checkbox.BZP0wtnE.js} +20 -22
  56. package/dist/chunks/checkbox.BZP0wtnE.js.map +1 -0
  57. package/dist/chunks/{click-outside.CDz_x8mN.js → click-outside.BG01Sm0A.js} +2 -2
  58. package/dist/chunks/{click-outside.CDz_x8mN.js.map → click-outside.BG01Sm0A.js.map} +1 -1
  59. package/dist/chunks/{code-snippet.4DX9iUV8.js → code-snippet.DHAymIXp.js} +3 -3
  60. package/dist/chunks/code-snippet.DHAymIXp.js.map +1 -0
  61. package/dist/chunks/constructNow.CK0ryPil.js +8 -0
  62. package/dist/chunks/{constructNow.CIc7d13I.js.map → constructNow.CK0ryPil.js.map} +1 -1
  63. package/dist/chunks/{controls-group.D_KE99mg.js → controls-group.DSm2Ujwt.js} +2 -2
  64. package/dist/chunks/{controls-group.D_KE99mg.js.map → controls-group.DSm2Ujwt.js.map} +1 -1
  65. package/dist/chunks/country.types.jjXwaoMl.js.map +1 -1
  66. package/dist/chunks/{dashboard-section.TWlLdQHG.js → dashboard-section.D9rS8myE.js} +2 -2
  67. package/dist/chunks/{dashboard-section.TWlLdQHG.js.map → dashboard-section.D9rS8myE.js.map} +1 -1
  68. package/dist/chunks/{dashed-underline.CpDuQ3Fo.js → dashed-underline.D_FhFRXM.js} +2 -2
  69. package/dist/chunks/{dashed-underline.CpDuQ3Fo.js.map → dashed-underline.D_FhFRXM.js.map} +1 -1
  70. package/dist/chunks/{data-grid-template.DZaE-kOS.js → data-grid-template.CRijG20n.js} +2 -2
  71. package/dist/chunks/{data-grid-template.DZaE-kOS.js.map → data-grid-template.CRijG20n.js.map} +1 -1
  72. package/dist/chunks/{data-grid.x6cEW0az.js → data-grid.hMM9F36T.js} +540 -538
  73. package/dist/chunks/data-grid.hMM9F36T.js.map +1 -0
  74. package/dist/chunks/date-picker.BSo6Cvum.js +237 -0
  75. package/dist/chunks/date-picker.BSo6Cvum.js.map +1 -0
  76. package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -1
  77. package/dist/chunks/date-range-picker.D90k5b8p.js +1097 -0
  78. package/dist/chunks/date-range-picker.D90k5b8p.js.map +1 -0
  79. package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -1
  80. package/dist/chunks/{de.BJvo6njq.js → de.pvjpUJ1o.js} +2 -2
  81. package/dist/chunks/{de.BJvo6njq.js.map → de.pvjpUJ1o.js.map} +1 -1
  82. package/dist/chunks/{differenceInMonths.CIYECBxK.js → differenceInMonths.CpwVtHZX.js} +3 -2
  83. package/dist/chunks/{differenceInMonths.CIYECBxK.js.map → differenceInMonths.CpwVtHZX.js.map} +1 -1
  84. package/dist/chunks/{directive.rXUeDb8p.js → directive.Bfr4fuOy.js} +2 -2
  85. package/dist/chunks/{directive.rXUeDb8p.js.map → directive.Bfr4fuOy.js.map} +1 -1
  86. package/dist/{draggable-handle.js → chunks/draggable-handle.BR_aQH5N.js} +49 -40
  87. package/dist/chunks/draggable-handle.BR_aQH5N.js.map +1 -0
  88. package/dist/chunks/{dropdown-tag.t3FlJUSy.js → dropdown-tag.z3rsxbpW.js} +4 -4
  89. package/dist/chunks/dropdown-tag.z3rsxbpW.js.map +1 -0
  90. package/dist/chunks/dropdown.BYJwx-JD.js +1148 -0
  91. package/dist/chunks/dropdown.BYJwx-JD.js.map +1 -0
  92. package/dist/chunks/{en-GB.C3-QUpva.js → en-GB.-Q7Oq-nY.js} +2 -2
  93. package/dist/chunks/{en-GB.C3-QUpva.js.map → en-GB.-Q7Oq-nY.js.map} +1 -1
  94. package/dist/chunks/{en-US.YeSsZuOc.js → en-US.BK5uiAND.js} +5 -5
  95. package/dist/chunks/{en-US.YeSsZuOc.js.map → en-US.BK5uiAND.js.map} +1 -1
  96. package/dist/chunks/error-message.CyERcfdt.js +72 -0
  97. package/dist/chunks/error-message.CyERcfdt.js.map +1 -0
  98. package/dist/chunks/{es.DyUjjSL8.js → es.2H4LvTyV.js} +2 -2
  99. package/dist/chunks/{es.DyUjjSL8.js.map → es.2H4LvTyV.js.map} +1 -1
  100. package/dist/chunks/field-label.DjjjkcO6.js +97 -0
  101. package/dist/chunks/field-label.DjjjkcO6.js.map +1 -0
  102. package/dist/chunks/{file-uploader.Cig5gDXT.js → file-uploader.Djl0xaDN.js} +4 -4
  103. package/dist/chunks/{file-uploader.Cig5gDXT.js.map → file-uploader.Djl0xaDN.js.map} +1 -1
  104. package/dist/chunks/{filter-bar.x445KK3y.js → filter-bar.C9rWMIWO.js} +899 -882
  105. package/dist/chunks/filter-bar.C9rWMIWO.js.map +1 -0
  106. package/dist/chunks/{footer-actions.CIkul1OD.js → footer-actions.D9mHwk5l.js} +2 -2
  107. package/dist/chunks/{footer-actions.CIkul1OD.js.map → footer-actions.D9mHwk5l.js.map} +1 -1
  108. package/dist/chunks/{form-layout-title.DR5M7GP3.js → form-layout-title.zZVLCyqe.js} +71 -62
  109. package/dist/chunks/form-layout-title.zZVLCyqe.js.map +1 -0
  110. package/dist/chunks/{fr.JD_4GwS8.js → fr.Cu0IIfBP.js} +2 -2
  111. package/dist/chunks/{fr.JD_4GwS8.js.map → fr.Cu0IIfBP.js.map} +1 -1
  112. package/dist/chunks/{header-meta.BC5fdpD1.js → header-meta.BSPnWWmi.js} +14 -14
  113. package/dist/chunks/{header-meta.BC5fdpD1.js.map → header-meta.BSPnWWmi.js.map} +1 -1
  114. package/dist/chunks/{header-with-views.-cvdi9-L.js → header-with-views.g6J7x6l2.js} +10 -10
  115. package/dist/chunks/{header-with-views.-cvdi9-L.js.map → header-with-views.g6J7x6l2.js.map} +1 -1
  116. package/dist/chunks/{header.DtmZjxiU.js → header.DyZG7qWe.js} +3 -3
  117. package/dist/chunks/header.DyZG7qWe.js.map +1 -0
  118. package/dist/chunks/{input-field-password.Bdlw4dzr.js → input-field-password.CiDdI6A_.js} +4 -4
  119. package/dist/chunks/input-field-password.CiDdI6A_.js.map +1 -0
  120. package/dist/chunks/{input-field-phone-number.DPuWxBBz.js → input-field-phone-number.DFS58acU.js} +3 -3
  121. package/dist/chunks/{input-field-phone-number.DPuWxBBz.js.map → input-field-phone-number.DFS58acU.js.map} +1 -1
  122. package/dist/chunks/input-field.CGLjYab8.js +222 -0
  123. package/dist/chunks/input-field.CGLjYab8.js.map +1 -0
  124. package/dist/chunks/input-time.BhAUyKZM.js +135 -0
  125. package/dist/chunks/input-time.BhAUyKZM.js.map +1 -0
  126. package/dist/chunks/isSameWeek.TrpUOIn5.js +14 -0
  127. package/dist/chunks/{isSameWeek.CzBCmu7d.js.map → isSameWeek.TrpUOIn5.js.map} +1 -1
  128. package/dist/chunks/{it.BlUnV-yA.js → it.B65snrJA.js} +3 -3
  129. package/dist/chunks/{it.BlUnV-yA.js.map → it.B65snrJA.js.map} +1 -1
  130. package/dist/chunks/{ja.nUwDmVf2.js → ja.xGVfFSzL.js} +2 -2
  131. package/dist/chunks/{ja.nUwDmVf2.js.map → ja.xGVfFSzL.js.map} +1 -1
  132. package/dist/chunks/link.DB5g6d48.js.map +1 -1
  133. package/dist/chunks/{modal-fullscreen.CaxuXW-H.js → modal-fullscreen.De6mevyD.js} +2 -2
  134. package/dist/chunks/{modal-fullscreen.CaxuXW-H.js.map → modal-fullscreen.De6mevyD.js.map} +1 -1
  135. package/dist/chunks/{modal.Brif0vAy.js → modal.BXxwn9H4.js} +93 -91
  136. package/dist/chunks/{modal.Brif0vAy.js.map → modal.BXxwn9H4.js.map} +1 -1
  137. package/dist/chunks/on-click-outside.Cy1eFULD.js +109 -0
  138. package/dist/chunks/on-click-outside.Cy1eFULD.js.map +1 -0
  139. package/dist/chunks/{pagination.BmrU_sn_.js → pagination.BzsKZFnw.js} +37 -37
  140. package/dist/chunks/{pagination.BmrU_sn_.js.map → pagination.BzsKZFnw.js.map} +1 -1
  141. package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
  142. package/dist/chunks/popover.types.hA13DZPg.js.map +1 -1
  143. package/dist/chunks/popper-container.C_n9Ds1W.js.map +1 -1
  144. package/dist/chunks/promo-banner.Dc_kK1x9.js.map +1 -1
  145. package/dist/chunks/{pt-BR.BCU2Hj36.js → pt-BR.D9FuAQZm.js} +2 -2
  146. package/dist/chunks/{pt-BR.BCU2Hj36.js.map → pt-BR.D9FuAQZm.js.map} +1 -1
  147. package/dist/chunks/{radio-group.5oS-AeYN.js → radio-group.Bb-L-0io.js} +3 -3
  148. package/dist/chunks/radio-group.Bb-L-0io.js.map +1 -0
  149. package/dist/chunks/{rich-text-editor.DSGTe8Zt.js → rich-text-editor.DPpIzYid.js} +7 -6
  150. package/dist/chunks/{rich-text-editor.DSGTe8Zt.js.map → rich-text-editor.DPpIzYid.js.map} +1 -1
  151. package/dist/chunks/{search-bar.CNfoeLLt.js → search-bar.BEOieKeA.js} +4 -4
  152. package/dist/chunks/{search-bar.CNfoeLLt.js.map → search-bar.BEOieKeA.js.map} +1 -1
  153. package/dist/chunks/{secondary-nav.IF5CgeIP.js → secondary-nav.BBL5zZPK.js} +2 -2
  154. package/dist/chunks/{secondary-nav.IF5CgeIP.js.map → secondary-nav.BBL5zZPK.js.map} +1 -1
  155. package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
  156. package/dist/chunks/{selection-card-group.DZjFeQKR.js → selection-card-group.CLJPaknG.js} +10 -10
  157. package/dist/chunks/{selection-card-group.DZjFeQKR.js.map → selection-card-group.CLJPaknG.js.map} +1 -1
  158. package/dist/chunks/{sidepanel.DZDXuyzg.js → sidepanel.nW0Bhk_u.js} +4 -4
  159. package/dist/chunks/{sidepanel.DZDXuyzg.js.map → sidepanel.nW0Bhk_u.js.map} +1 -1
  160. package/dist/chunks/{startOfWeek.CXhhX-R7.js → startOfWeek.Br5KM4z_.js} +2 -2
  161. package/dist/chunks/{startOfWeek.CXhhX-R7.js.map → startOfWeek.Br5KM4z_.js.map} +1 -1
  162. package/dist/chunks/status.types.Dx8MDhEH.js.map +1 -1
  163. package/dist/chunks/{summary-grid.types.CrPNQbX0.js → summary-grid.types.Dp_efYVN.js} +2 -2
  164. package/dist/chunks/{summary-grid.types.CrPNQbX0.js.map → summary-grid.types.Dp_efYVN.js.map} +1 -1
  165. package/dist/chunks/tag.D2xagTJv.js.map +1 -1
  166. package/dist/chunks/{textarea.Bi53QF5Q.js → textarea.CJS-1I41.js} +5 -4
  167. package/dist/chunks/textarea.CJS-1I41.js.map +1 -0
  168. package/dist/chunks/{timeline-item.C6Bi0eam.js → timeline-item.CF9jbIRr.js} +5 -5
  169. package/dist/chunks/timeline-item.CF9jbIRr.js.map +1 -0
  170. package/dist/chunks/{toggle.B1z1YPe_.js → toggle.Ca-MM3dt.js} +3 -5
  171. package/dist/chunks/toggle.Ca-MM3dt.js.map +1 -0
  172. package/dist/chunks/tooltip.BxtnF3is.js.map +1 -1
  173. package/dist/chunks/{tutorial.BCiZMLJE.js → tutorial.CoWDVs7_.js} +2 -2
  174. package/dist/chunks/{tutorial.BCiZMLJE.js.map → tutorial.CoWDVs7_.js.map} +1 -1
  175. package/dist/chunks/typography.C8lPlsbD.js.map +1 -1
  176. package/dist/chunks/use-cached-selected-values.Du8-wWR2.js +1520 -0
  177. package/dist/chunks/use-cached-selected-values.Du8-wWR2.js.map +1 -0
  178. package/dist/chunks/{use-date-input-formatter.DRMt9yR2.js → use-date-input-formatter.ibZeLD_V.js} +4 -4
  179. package/dist/chunks/{use-date-input-formatter.DRMt9yR2.js.map → use-date-input-formatter.ibZeLD_V.js.map} +1 -1
  180. package/dist/chunks/use-touch-device.DTqFAbXh.js +11 -0
  181. package/dist/chunks/use-touch-device.DTqFAbXh.js.map +1 -0
  182. package/dist/chunks/{zh-CN.ChYkuQAR.js → zh-CN.Be4pa3-g.js} +3 -3
  183. package/dist/chunks/{zh-CN.ChYkuQAR.js.map → zh-CN.Be4pa3-g.js.map} +1 -1
  184. package/dist/click-outside.js +1 -1
  185. package/dist/code-snippet.js +1 -1
  186. package/dist/dashboard-template.js +1 -1
  187. package/dist/dashed-underline.js +1 -1
  188. package/dist/data-grid-template.js +1 -1
  189. package/dist/data-grid.js +1 -1
  190. package/dist/date-picker.js +2 -2
  191. package/dist/date-range-picker.js +2 -2
  192. package/dist/draggable.js +1396 -0
  193. package/dist/draggable.js.map +1 -0
  194. package/dist/dropdown.js +11 -12
  195. package/dist/dropdown.js.map +1 -1
  196. package/dist/file-uploader.js +1 -1
  197. package/dist/filter-bar.js +1 -1
  198. package/dist/form-layout.js +1 -1
  199. package/dist/header-with-views.js +1 -1
  200. package/dist/header.js +1 -1
  201. package/dist/index.js +274 -271
  202. package/dist/index.js.map +1 -1
  203. package/dist/input-field-password.js +1 -1
  204. package/dist/input-field-phone-number.js +1 -1
  205. package/dist/input-field.js +1 -1
  206. package/dist/input-time.js +1 -1
  207. package/dist/internal.js +24 -23
  208. package/dist/internal.js.map +1 -1
  209. package/dist/menu.js +1 -1
  210. package/dist/modal-fullscreen.js +1 -1
  211. package/dist/modal.js +2 -2
  212. package/dist/pagination.js +1 -1
  213. package/dist/popover.js +1 -1
  214. package/dist/radio-group.js +1 -1
  215. package/dist/rich-text-editor.js +1 -1
  216. package/dist/search-bar.js +2 -2
  217. package/dist/secondary-nav.js +1 -1
  218. package/dist/selection-card.js +1 -1
  219. package/dist/sidepanel.js +1 -1
  220. package/dist/summary-grid.js +1 -1
  221. package/dist/textarea.js +1 -1
  222. package/dist/timeline.js +1 -1
  223. package/dist/toggle.js +1 -1
  224. package/dist/tutorial.js +1 -1
  225. package/dist/web-types.json +144 -7
  226. package/package.json +8 -13
  227. package/dist/assets/dropdown-default-textbox.css +0 -1
  228. package/dist/chunks/alert.CXRb-Smf.js.map +0 -1
  229. package/dist/chunks/base-modal.DpmeDmq-.js.map +0 -1
  230. package/dist/chunks/button-actions.BmU1DngD.js.map +0 -1
  231. package/dist/chunks/calendar.uvIGF_jU.js +0 -1154
  232. package/dist/chunks/calendar.uvIGF_jU.js.map +0 -1
  233. package/dist/chunks/card.WWUfBkqf.js.map +0 -1
  234. package/dist/chunks/checkbox-group.CI0xDnql.js.map +0 -1
  235. package/dist/chunks/checkbox.TsWA6O3Z.js.map +0 -1
  236. package/dist/chunks/code-snippet.4DX9iUV8.js.map +0 -1
  237. package/dist/chunks/constructNow.CIc7d13I.js +0 -8
  238. package/dist/chunks/data-grid.x6cEW0az.js.map +0 -1
  239. package/dist/chunks/date-picker.Dln8ocL4.js +0 -222
  240. package/dist/chunks/date-picker.Dln8ocL4.js.map +0 -1
  241. package/dist/chunks/date-range-picker.DPGy2h-9.js +0 -1068
  242. package/dist/chunks/date-range-picker.DPGy2h-9.js.map +0 -1
  243. package/dist/chunks/debounce.DUTu11PS.js +0 -10
  244. package/dist/chunks/debounce.DUTu11PS.js.map +0 -1
  245. package/dist/chunks/dropdown-default-textbox.CjhLIxVq.js +0 -364
  246. package/dist/chunks/dropdown-default-textbox.CjhLIxVq.js.map +0 -1
  247. package/dist/chunks/dropdown-tag.t3FlJUSy.js.map +0 -1
  248. package/dist/chunks/dropdown.CvNI2V33.js +0 -790
  249. package/dist/chunks/dropdown.CvNI2V33.js.map +0 -1
  250. package/dist/chunks/error-message.BUNKRa_w.js +0 -160
  251. package/dist/chunks/error-message.BUNKRa_w.js.map +0 -1
  252. package/dist/chunks/filter-bar.x445KK3y.js.map +0 -1
  253. package/dist/chunks/form-layout-title.DR5M7GP3.js.map +0 -1
  254. package/dist/chunks/header.DtmZjxiU.js.map +0 -1
  255. package/dist/chunks/input-field-password.Bdlw4dzr.js.map +0 -1
  256. package/dist/chunks/input-field.DH25CU_G.js +0 -207
  257. package/dist/chunks/input-field.DH25CU_G.js.map +0 -1
  258. package/dist/chunks/input-time.6eJ4-QdU.js +0 -92
  259. package/dist/chunks/input-time.6eJ4-QdU.js.map +0 -1
  260. package/dist/chunks/isSameWeek.CzBCmu7d.js +0 -14
  261. package/dist/chunks/on-click-outside.BW4rkhzG.js +0 -91
  262. package/dist/chunks/on-click-outside.BW4rkhzG.js.map +0 -1
  263. package/dist/chunks/radio-group.5oS-AeYN.js.map +0 -1
  264. package/dist/chunks/textarea.Bi53QF5Q.js.map +0 -1
  265. package/dist/chunks/timeline-item.C6Bi0eam.js.map +0 -1
  266. package/dist/chunks/toggle.B1z1YPe_.js.map +0 -1
  267. package/dist/chunks/use-cached-selected-values.Bn3Y8Iuq.js +0 -1450
  268. package/dist/chunks/use-cached-selected-values.Bn3Y8Iuq.js.map +0 -1
  269. package/dist/chunks/warning-filled.CbJ1pcB2.js +0 -24
  270. package/dist/chunks/warning-filled.CbJ1pcB2.js.map +0 -1
  271. package/dist/draggable-handle.js.map +0 -1
@@ -0,0 +1,1097 @@
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.CGLjYab8.js";
8
+ import { B as At, i as Be } from "./input-time.BhAUyKZM.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.D90k5b8p.js.map