@adyen/bento-vue2 1.89.2 → 1.90.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 (255) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/index.d.ts +198 -80
  3. package/dist/accordion.js +1 -1
  4. package/dist/action-bar.js +1 -1
  5. package/dist/ai-tag.js +1 -1
  6. package/dist/alert.js +1 -1
  7. package/dist/anchor-scroller.js +1 -1
  8. package/dist/assets/accordion-item.css +1 -1
  9. package/dist/assets/action-bar.css +1 -1
  10. package/dist/assets/base-modal.css +1 -1
  11. package/dist/assets/button-actions.css +1 -1
  12. package/dist/assets/card.css +1 -1
  13. package/dist/assets/data-grid.css +1 -1
  14. package/dist/assets/date-range-picker.css +1 -1
  15. package/dist/assets/dialog-page.css +1 -1
  16. package/dist/assets/file-uploader.css +1 -1
  17. package/dist/assets/input-time.css +1 -0
  18. package/dist/assets/inspector.css +1 -1
  19. package/dist/assets/modal-fullscreen.css +1 -1
  20. package/dist/assets/secondary-nav.css +1 -1
  21. package/dist/assets/sidepanel.css +1 -1
  22. package/dist/button.js +3 -3
  23. package/dist/card.js +1 -1
  24. package/dist/checkbox.js +2 -2
  25. package/dist/chip.js +1 -1
  26. package/dist/chunks/accordion-item.D0WVCLec.js +145 -0
  27. package/dist/chunks/{accordion-item.BZDSJamR.js.map → accordion-item.D0WVCLec.js.map} +1 -1
  28. package/dist/chunks/action-bar.B63qIiiH.js +334 -0
  29. package/dist/chunks/{action-bar.CYGUYI0V.js.map → action-bar.B63qIiiH.js.map} +1 -1
  30. package/dist/chunks/{ai-button.CR_ePQRR.js → ai-button.7L9bANlk.js} +2 -2
  31. package/dist/chunks/{ai-button.CR_ePQRR.js.map → ai-button.7L9bANlk.js.map} +1 -1
  32. package/dist/chunks/ai-tag.CCJCOdXu.js +110 -0
  33. package/dist/chunks/{ai-tag.Cjf38mjR.js.map → ai-tag.CCJCOdXu.js.map} +1 -1
  34. package/dist/chunks/alert.CXRb-Smf.js +160 -0
  35. package/dist/chunks/{alert.QVQ6Zjbm.js.map → alert.CXRb-Smf.js.map} +1 -1
  36. package/dist/chunks/{anchor-scroller.CjJ26PJS.js → anchor-scroller.DWaykZQj.js} +66 -39
  37. package/dist/chunks/{anchor-scroller.CjJ26PJS.js.map → anchor-scroller.DWaykZQj.js.map} +1 -1
  38. package/dist/chunks/{base-modal.DmWkavtf.js → base-modal.DpmeDmq-.js} +103 -66
  39. package/dist/chunks/{base-modal.DmWkavtf.js.map → base-modal.DpmeDmq-.js.map} +1 -1
  40. package/dist/chunks/{button-actions-with-menu.Bi_HXopk.js → button-actions-with-menu.ChTUOsZl.js} +2 -2
  41. package/dist/chunks/{button-actions-with-menu.Bi_HXopk.js.map → button-actions-with-menu.ChTUOsZl.js.map} +1 -1
  42. package/dist/chunks/{button-actions.BLk114As.js → button-actions.BmU1DngD.js} +221 -147
  43. package/dist/chunks/{button-actions.BLk114As.js.map → button-actions.BmU1DngD.js.map} +1 -1
  44. package/dist/chunks/{button.DxhJNOtr.js → button.C9b2AC9w.js} +2 -2
  45. package/dist/chunks/{button.DxhJNOtr.js.map → button.C9b2AC9w.js.map} +1 -1
  46. package/dist/chunks/{calendar.CXKhBF2f.js → calendar.uvIGF_jU.js} +283 -209
  47. package/dist/chunks/{calendar.CXKhBF2f.js.map → calendar.uvIGF_jU.js.map} +1 -1
  48. package/dist/chunks/card.WWUfBkqf.js +165 -0
  49. package/dist/chunks/{card.GjhsXOT0.js.map → card.WWUfBkqf.js.map} +1 -1
  50. package/dist/chunks/{checkbox-group.B2BjU3ZN.js → checkbox-group.CI0xDnql.js} +4 -4
  51. package/dist/chunks/{checkbox-group.B2BjU3ZN.js.map → checkbox-group.CI0xDnql.js.map} +1 -1
  52. package/dist/chunks/{checkbox.CIv8WgGp.js → checkbox.TsWA6O3Z.js} +93 -56
  53. package/dist/chunks/{checkbox.CIv8WgGp.js.map → checkbox.TsWA6O3Z.js.map} +1 -1
  54. package/dist/chunks/chip.BFY_-VCz.js +84 -0
  55. package/dist/chunks/{chip.DTpENaGC.js.map → chip.BFY_-VCz.js.map} +1 -1
  56. package/dist/chunks/{code-snippet.YIm2oO_o.js → code-snippet.4DX9iUV8.js} +133 -76
  57. package/dist/chunks/{code-snippet.YIm2oO_o.js.map → code-snippet.4DX9iUV8.js.map} +1 -1
  58. package/dist/chunks/{controls-group.CqotnNEF.js → controls-group.D_KE99mg.js} +2 -2
  59. package/dist/chunks/{controls-group.CqotnNEF.js.map → controls-group.D_KE99mg.js.map} +1 -1
  60. package/dist/chunks/copy.qqGYFbKJ.js +133 -0
  61. package/dist/chunks/{copy.BVGQcf22.js.map → copy.qqGYFbKJ.js.map} +1 -1
  62. package/dist/chunks/{country.D20NCLLG.js → country.BEwW8TQo.js} +3 -3
  63. package/dist/chunks/{country.D20NCLLG.js.map → country.BEwW8TQo.js.map} +1 -1
  64. package/dist/chunks/country.types.jjXwaoMl.js +2537 -0
  65. package/dist/chunks/country.types.jjXwaoMl.js.map +1 -0
  66. package/dist/chunks/{dashboard-section.BubZyu8i.js → dashboard-section.TWlLdQHG.js} +3 -3
  67. package/dist/chunks/{dashboard-section.BubZyu8i.js.map → dashboard-section.TWlLdQHG.js.map} +1 -1
  68. package/dist/chunks/{dashed-underline.pjYTS0m1.js → dashed-underline.CpDuQ3Fo.js} +3 -3
  69. package/dist/chunks/{dashed-underline.pjYTS0m1.js.map → dashed-underline.CpDuQ3Fo.js.map} +1 -1
  70. package/dist/chunks/{data-grid-template.D8RhngPj.js → data-grid-template.DZaE-kOS.js} +4 -4
  71. package/dist/chunks/{data-grid-template.D8RhngPj.js.map → data-grid-template.DZaE-kOS.js.map} +1 -1
  72. package/dist/chunks/data-grid.x6cEW0az.js +4069 -0
  73. package/dist/chunks/data-grid.x6cEW0az.js.map +1 -0
  74. package/dist/chunks/date-picker.Dln8ocL4.js +222 -0
  75. package/dist/chunks/{date-picker.CnazYcSX.js.map → date-picker.Dln8ocL4.js.map} +1 -1
  76. package/dist/chunks/date-range-picker.DPGy2h-9.js +1068 -0
  77. package/dist/chunks/date-range-picker.DPGy2h-9.js.map +1 -0
  78. package/dist/chunks/dialog-page.EdejG53a.js +143 -0
  79. package/dist/chunks/{dialog-page.oyG153fC.js.map → dialog-page.EdejG53a.js.map} +1 -1
  80. package/dist/chunks/{dropdown-default-textbox.Dvzg0StF.js → dropdown-default-textbox.CjhLIxVq.js} +63 -36
  81. package/dist/chunks/{dropdown-default-textbox.Dvzg0StF.js.map → dropdown-default-textbox.CjhLIxVq.js.map} +1 -1
  82. package/dist/chunks/{dropdown-tag.BRB-emd1.js → dropdown-tag.t3FlJUSy.js} +5 -5
  83. package/dist/chunks/{dropdown-tag.BRB-emd1.js.map → dropdown-tag.t3FlJUSy.js.map} +1 -1
  84. package/dist/chunks/{dropdown.Ct7uhPr6.js → dropdown.CvNI2V33.js} +329 -235
  85. package/dist/chunks/{dropdown.Ct7uhPr6.js.map → dropdown.CvNI2V33.js.map} +1 -1
  86. package/dist/chunks/{empty-state.D_Ac-XXH.js → empty-state.DMV23IZy.js} +2 -2
  87. package/dist/chunks/{empty-state.D_Ac-XXH.js.map → empty-state.DMV23IZy.js.map} +1 -1
  88. package/dist/chunks/error-message.BUNKRa_w.js +160 -0
  89. package/dist/chunks/{error-message.RxdStT3S.js.map → error-message.BUNKRa_w.js.map} +1 -1
  90. package/dist/chunks/{file-uploader.D5Rjsx4k.js → file-uploader.Cig5gDXT.js} +749 -468
  91. package/dist/chunks/{file-uploader.D5Rjsx4k.js.map → file-uploader.Cig5gDXT.js.map} +1 -1
  92. package/dist/chunks/{filter-bar.zD_ctViU.js → filter-bar.x445KK3y.js} +1301 -761
  93. package/dist/chunks/{filter-bar.zD_ctViU.js.map → filter-bar.x445KK3y.js.map} +1 -1
  94. package/dist/chunks/fixed-scroller.DR2E_No4.js +148 -0
  95. package/dist/chunks/{fixed-scroller.MerESbd_.js.map → fixed-scroller.DR2E_No4.js.map} +1 -1
  96. package/dist/chunks/{footer-actions.CiPj7hZG.js → footer-actions.CIkul1OD.js} +3 -3
  97. package/dist/chunks/{footer-actions.CiPj7hZG.js.map → footer-actions.CIkul1OD.js.map} +1 -1
  98. package/dist/chunks/{form-layout-title.Bw7VgOO5.js → form-layout-title.DR5M7GP3.js} +77 -48
  99. package/dist/chunks/{form-layout-title.Bw7VgOO5.js.map → form-layout-title.DR5M7GP3.js.map} +1 -1
  100. package/dist/chunks/{header-meta.Dq6TlNPw.js → header-meta.BC5fdpD1.js} +127 -73
  101. package/dist/chunks/{header-meta.Dq6TlNPw.js.map → header-meta.BC5fdpD1.js.map} +1 -1
  102. package/dist/chunks/{header-with-views.DaEhkSS8.js → header-with-views.-cvdi9-L.js} +1120 -679
  103. package/dist/chunks/{header-with-views.DaEhkSS8.js.map → header-with-views.-cvdi9-L.js.map} +1 -1
  104. package/dist/chunks/{header.DkC-KKWa.js → header.DtmZjxiU.js} +3 -3
  105. package/dist/chunks/{header.DkC-KKWa.js.map → header.DtmZjxiU.js.map} +1 -1
  106. package/dist/chunks/{info-icon.BF8KxU-k.js → info-icon.DCR42Kvm.js} +2 -2
  107. package/dist/chunks/{info-icon.BF8KxU-k.js.map → info-icon.DCR42Kvm.js.map} +1 -1
  108. package/dist/chunks/input-field-password.Bdlw4dzr.js +381 -0
  109. package/dist/chunks/{input-field-password.BKT1mYUw.js.map → input-field-password.Bdlw4dzr.js.map} +1 -1
  110. package/dist/chunks/{input-field-phone-number.BjRKjQOQ.js → input-field-phone-number.DPuWxBBz.js} +98 -71
  111. package/dist/chunks/{input-field-phone-number.BjRKjQOQ.js.map → input-field-phone-number.DPuWxBBz.js.map} +1 -1
  112. package/dist/chunks/input-field.DH25CU_G.js +207 -0
  113. package/dist/chunks/{input-field.m1PMwa4C.js.map → input-field.DH25CU_G.js.map} +1 -1
  114. package/dist/chunks/input-time.6eJ4-QdU.js +92 -0
  115. package/dist/chunks/input-time.6eJ4-QdU.js.map +1 -0
  116. package/dist/chunks/inspector.BzBPlz-5.js +172 -0
  117. package/dist/chunks/{inspector.Bnm0hl_D.js.map → inspector.BzBPlz-5.js.map} +1 -1
  118. package/dist/chunks/{link.MhoM3zQj.js → link.DB5g6d48.js} +56 -29
  119. package/dist/chunks/{link.MhoM3zQj.js.map → link.DB5g6d48.js.map} +1 -1
  120. package/dist/chunks/{list-item.BnzU1LIu.js → list-item.DqTHh8-Z.js} +2 -2
  121. package/dist/chunks/{list-item.BnzU1LIu.js.map → list-item.DqTHh8-Z.js.map} +1 -1
  122. package/dist/chunks/{listbox-option-tag.BhPVuAjJ.js → listbox-option-tag.CvbE-EuG.js} +2 -2
  123. package/dist/chunks/{listbox-option-tag.BhPVuAjJ.js.map → listbox-option-tag.CvbE-EuG.js.map} +1 -1
  124. package/dist/chunks/{modal-fullscreen.CXOq6_Cv.js → modal-fullscreen.CaxuXW-H.js} +63 -36
  125. package/dist/chunks/{modal-fullscreen.CXOq6_Cv.js.map → modal-fullscreen.CaxuXW-H.js.map} +1 -1
  126. package/dist/chunks/{modal.o0KddMiG.js → modal.Brif0vAy.js} +63 -36
  127. package/dist/chunks/{modal.o0KddMiG.js.map → modal.Brif0vAy.js.map} +1 -1
  128. package/dist/chunks/{pagination.ZISqB4M_.js → pagination.BmrU_sn_.js} +221 -99
  129. package/dist/chunks/{pagination.ZISqB4M_.js.map → pagination.BmrU_sn_.js.map} +1 -1
  130. package/dist/chunks/promo-banner.Dc_kK1x9.js +91 -0
  131. package/dist/chunks/{promo-banner.Db2kh2qK.js.map → promo-banner.Dc_kK1x9.js.map} +1 -1
  132. package/dist/chunks/{radio-group.DnMy7brs.js → radio-group.5oS-AeYN.js} +4 -4
  133. package/dist/chunks/{radio-group.DnMy7brs.js.map → radio-group.5oS-AeYN.js.map} +1 -1
  134. package/dist/chunks/{rich-text-editor.Cbv1DxXn.js → rich-text-editor.DSGTe8Zt.js} +1781 -1731
  135. package/dist/chunks/{rich-text-editor.Cbv1DxXn.js.map → rich-text-editor.DSGTe8Zt.js.map} +1 -1
  136. package/dist/chunks/search-bar.CNfoeLLt.js +126 -0
  137. package/dist/chunks/{search-bar.DPjYDhja.js.map → search-bar.CNfoeLLt.js.map} +1 -1
  138. package/dist/chunks/secondary-nav.IF5CgeIP.js +226 -0
  139. package/dist/chunks/secondary-nav.IF5CgeIP.js.map +1 -0
  140. package/dist/chunks/{segmented-control.BqIiX9hv.js → segmented-control.DDtjX-V5.js} +2 -2
  141. package/dist/chunks/{segmented-control.BqIiX9hv.js.map → segmented-control.DDtjX-V5.js.map} +1 -1
  142. package/dist/chunks/{selection-card-group.IPiouuot.js → selection-card-group.DZjFeQKR.js} +10 -10
  143. package/dist/chunks/{selection-card-group.IPiouuot.js.map → selection-card-group.DZjFeQKR.js.map} +1 -1
  144. package/dist/chunks/{sidepanel.BGMjjB3F.js → sidepanel.DZDXuyzg.js} +66 -39
  145. package/dist/chunks/{sidepanel.BGMjjB3F.js.map → sidepanel.DZDXuyzg.js.map} +1 -1
  146. package/dist/chunks/{step.QFER3tSj.js → step.TDm_ts1S.js} +92 -63
  147. package/dist/chunks/{step.QFER3tSj.js.map → step.TDm_ts1S.js.map} +1 -1
  148. package/dist/chunks/{structured-list-item.BDJKRC_8.js → structured-list-item.BBBtie1s.js} +58 -31
  149. package/dist/chunks/{structured-list-item.BDJKRC_8.js.map → structured-list-item.BBBtie1s.js.map} +1 -1
  150. package/dist/chunks/{summary-grid.types.CIkArZf5.js → summary-grid.types.CrPNQbX0.js} +5 -5
  151. package/dist/chunks/{summary-grid.types.CIkArZf5.js.map → summary-grid.types.CrPNQbX0.js.map} +1 -1
  152. package/dist/chunks/{tab.CaXF0dho.js → tab.CNIZyfZt.js} +2 -2
  153. package/dist/chunks/{tab.CaXF0dho.js.map → tab.CNIZyfZt.js.map} +1 -1
  154. package/dist/chunks/{tag.CocLKztJ.js → tag.D2xagTJv.js} +2 -2
  155. package/dist/chunks/{tag.CocLKztJ.js.map → tag.D2xagTJv.js.map} +1 -1
  156. package/dist/chunks/textarea.Bi53QF5Q.js +218 -0
  157. package/dist/chunks/{textarea.D4X6Ss9q.js.map → textarea.Bi53QF5Q.js.map} +1 -1
  158. package/dist/chunks/timeline-item.C6Bi0eam.js +322 -0
  159. package/dist/chunks/{timeline-item.C8BxWdy1.js.map → timeline-item.C6Bi0eam.js.map} +1 -1
  160. package/dist/chunks/{toast.BRI3G7TL.js → toast.d8vg71CB.js} +81 -54
  161. package/dist/chunks/{toast.BRI3G7TL.js.map → toast.d8vg71CB.js.map} +1 -1
  162. package/dist/chunks/{tooltip.CbsNGnhw.js → tooltip.BxtnF3is.js} +38 -36
  163. package/dist/chunks/tooltip.BxtnF3is.js.map +1 -0
  164. package/dist/chunks/{tutorial.BzV6bHQJ.js → tutorial.BCiZMLJE.js} +190 -103
  165. package/dist/chunks/{tutorial.BzV6bHQJ.js.map → tutorial.BCiZMLJE.js.map} +1 -1
  166. package/dist/chunks/{use-cached-selected-values.DqX2qsMC.js → use-cached-selected-values.Bn3Y8Iuq.js} +490 -359
  167. package/dist/chunks/{use-cached-selected-values.DqX2qsMC.js.map → use-cached-selected-values.Bn3Y8Iuq.js.map} +1 -1
  168. package/dist/chunks/{use-country-items.CI8C7MLU.js → use-country-items.B4j8pAvW.js} +3 -3
  169. package/dist/chunks/{use-country-items.CI8C7MLU.js.map → use-country-items.B4j8pAvW.js.map} +1 -1
  170. package/dist/chunks/use-country-phon-code.ByqnuIni.js +6386 -0
  171. package/dist/chunks/use-country-phon-code.ByqnuIni.js.map +1 -0
  172. package/dist/chunks/{use-date-input-formatter.BYaTO3vz.js → use-date-input-formatter.DRMt9yR2.js} +2 -2
  173. package/dist/chunks/{use-date-input-formatter.BYaTO3vz.js.map → use-date-input-formatter.DRMt9yR2.js.map} +1 -1
  174. package/dist/code-snippet.js +1 -1
  175. package/dist/country.js +3 -3
  176. package/dist/dashboard-template.js +1 -1
  177. package/dist/dashed-underline.js +1 -1
  178. package/dist/data-grid-template.js +1 -1
  179. package/dist/data-grid.js +1 -1
  180. package/dist/date-picker.js +2 -2
  181. package/dist/date-range-picker.js +2 -2
  182. package/dist/draggable-handle.js +160 -73
  183. package/dist/draggable-handle.js.map +1 -1
  184. package/dist/dropdown.js +4 -4
  185. package/dist/empty-state.js +1 -1
  186. package/dist/file-uploader.js +1 -1
  187. package/dist/filter-bar.js +1 -1
  188. package/dist/form-layout.js +1 -1
  189. package/dist/header-with-views.js +1 -1
  190. package/dist/header.js +1 -1
  191. package/dist/index.js +215 -213
  192. package/dist/index.js.map +1 -1
  193. package/dist/info-icon.js +1 -1
  194. package/dist/input-field-password.js +1 -1
  195. package/dist/input-field-phone-number.js +1 -1
  196. package/dist/input-field.js +1 -1
  197. package/dist/input-time.js +5 -0
  198. package/dist/input-time.js.map +1 -0
  199. package/dist/inspector.js +1 -1
  200. package/dist/internal.js +12 -12
  201. package/dist/link.js +1 -1
  202. package/dist/list.js +1 -1
  203. package/dist/menu.js +1 -1
  204. package/dist/modal-fullscreen.js +1 -1
  205. package/dist/modal.js +2 -2
  206. package/dist/pagination.js +1 -1
  207. package/dist/popover.js +1 -1
  208. package/dist/promo-banner.js +1 -1
  209. package/dist/radio-group.js +1 -1
  210. package/dist/rich-text-editor.js +1 -1
  211. package/dist/search-bar.js +2 -2
  212. package/dist/secondary-nav.js +1 -1
  213. package/dist/segmented-control.js +1 -1
  214. package/dist/selection-card.js +1 -1
  215. package/dist/sidepanel.js +1 -1
  216. package/dist/stepper.js +1 -1
  217. package/dist/structured-list.js +1 -1
  218. package/dist/summary-grid.js +1 -1
  219. package/dist/tabs.js +1 -1
  220. package/dist/tag.js +1 -1
  221. package/dist/textarea.js +1 -1
  222. package/dist/timeline.js +1 -1
  223. package/dist/toast.js +1 -1
  224. package/dist/tutorial.js +1 -1
  225. package/dist/web-types.json +198 -1
  226. package/package.json +9 -9
  227. package/dist/chunks/accordion-item.BZDSJamR.js +0 -108
  228. package/dist/chunks/action-bar.CYGUYI0V.js +0 -207
  229. package/dist/chunks/ai-tag.Cjf38mjR.js +0 -73
  230. package/dist/chunks/alert.QVQ6Zjbm.js +0 -93
  231. package/dist/chunks/card.GjhsXOT0.js +0 -128
  232. package/dist/chunks/chip.DTpENaGC.js +0 -57
  233. package/dist/chunks/copy.BVGQcf22.js +0 -86
  234. package/dist/chunks/country.types.DxKjyd0S.js +0 -20
  235. package/dist/chunks/country.types.DxKjyd0S.js.map +0 -1
  236. package/dist/chunks/data-grid.DJG8Ty0A.js +0 -3194
  237. package/dist/chunks/data-grid.DJG8Ty0A.js.map +0 -1
  238. package/dist/chunks/date-picker.CnazYcSX.js +0 -155
  239. package/dist/chunks/date-range-picker.Bf9pRNL7.js +0 -811
  240. package/dist/chunks/date-range-picker.Bf9pRNL7.js.map +0 -1
  241. package/dist/chunks/dialog-page.oyG153fC.js +0 -116
  242. package/dist/chunks/error-message.RxdStT3S.js +0 -106
  243. package/dist/chunks/fixed-scroller.MerESbd_.js +0 -111
  244. package/dist/chunks/input-field-password.BKT1mYUw.js +0 -234
  245. package/dist/chunks/input-field.m1PMwa4C.js +0 -170
  246. package/dist/chunks/inspector.Bnm0hl_D.js +0 -105
  247. package/dist/chunks/promo-banner.Db2kh2qK.js +0 -64
  248. package/dist/chunks/search-bar.DPjYDhja.js +0 -89
  249. package/dist/chunks/secondary-nav.CwJjkJkj.js +0 -112
  250. package/dist/chunks/secondary-nav.CwJjkJkj.js.map +0 -1
  251. package/dist/chunks/textarea.D4X6Ss9q.js +0 -169
  252. package/dist/chunks/timeline-item.C8BxWdy1.js +0 -238
  253. package/dist/chunks/tooltip.CbsNGnhw.js.map +0 -1
  254. package/dist/chunks/use-country-phon-code.C6orQNnM.js +0 -291
  255. package/dist/chunks/use-country-phon-code.C6orQNnM.js.map +0 -1
@@ -1,811 +0,0 @@
1
- import { reactive as fe, defineComponent as Qe, useSlots as ot, ref as S, computed as f, onMounted as We, toRaw as _e, watch as pe, useAttrs as lt, toRef as ye } from "vue";
2
- import { j as it } from "./index.CwzYJHw2.js";
3
- import { B as ut } from "./divider.DX5gwN7p.js";
4
- import { h as dt, B as ct } from "./button-actions.BLk114As.js";
5
- import { B as $e, d as Ce } from "./typography.C8lPlsbD.js";
6
- import { B as mt } from "./input-field.m1PMwa4C.js";
7
- import { B as Dt } from "./dropdown.Ct7uhPr6.js";
8
- import { B as pt } from "./segmented-control.BqIiX9hv.js";
9
- import { u as be } from "./index.B6WW_F-J.js";
10
- import { d as De } from "./debounce.DUTu11PS.js";
11
- import { u as ft } from "./use-has-slot.C9lQZ6nz.js";
12
- import { u as Ie, a as vt } from "./use-date-input-formatter.BYaTO3vz.js";
13
- import { e as Ge, f as se, i as w, h as I, j as yt, k as Be, l as gt, s as xe, m as Tt, n as Ae, b as P, u as _t, o as E, g as bt } from "./calendar.CXKhBF2f.js";
14
- import { e as A, a as qe } from "./differenceInMonths.CIYECBxK.js";
15
- import { s as Ye } from "./startOfWeek.CXhhX-R7.js";
16
- import { t as N, n as It, c as Rt } from "./en-US.YeSsZuOc.js";
17
- import { c as ht } from "./constructNow.CIc7d13I.js";
18
- import { n as Ke } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
19
- import { D as kt } from "./dropdown-default-textbox.Dvzg0StF.js";
20
- import { g as re } from "./generate-uid.NJ8tVoha.js";
21
- import { u as Mt } from "./use-form-layout-loading.CWbjZiwP.js";
22
- import "./index.Cl4_42j5.js";
23
- import { u as St } from "./form-field.D_2g7vaP.js";
24
- import { B as Et } from "./directive.rXUeDb8p.js";
25
- import { F as Ft, E as Ot } from "./error-message.RxdStT3S.js";
26
- import { B as wt } from "./button-actions.types.BptAXjD8.js";
27
- import "../assets/date-range-picker.css";
28
- function He(r, t, e) {
29
- return Ge(r, t * 3, e);
30
- }
31
- function Pe(r, t) {
32
- const e = N(r, t == null ? void 0 : t.in);
33
- return Math.trunc(e.getMonth() / 3) + 1;
34
- }
35
- function Ne(r, t) {
36
- return N(r, t == null ? void 0 : t.in).getFullYear();
37
- }
38
- function ge(r, t) {
39
- return +N(r) == +N(t);
40
- }
41
- function Ct(r, t, e) {
42
- const [a, l] = It(
43
- e == null ? void 0 : e.in,
44
- r,
45
- t
46
- );
47
- return +se(a) == +se(l);
48
- }
49
- function Le(r, t) {
50
- const e = N(r, t == null ? void 0 : t.in);
51
- return e.setMilliseconds(0), e;
52
- }
53
- function Te(r, t) {
54
- return +Le(r) == +Le(t);
55
- }
56
- function Bt(r, t) {
57
- return w(
58
- Rt(r, r),
59
- ht(r)
60
- );
61
- }
62
- function xt(r, t, e) {
63
- const a = N(r, e == null ? void 0 : e.in);
64
- return a.setHours(t), a;
65
- }
66
- function Ue(r, t, e) {
67
- const a = N(r, e == null ? void 0 : e.in);
68
- return a.setMilliseconds(t), a;
69
- }
70
- function At(r, t, e) {
71
- const a = N(r, e == null ? void 0 : e.in);
72
- return a.setMinutes(t), a;
73
- }
74
- function qt(r, t, e) {
75
- const a = N(r, e == null ? void 0 : e.in);
76
- return a.setSeconds(t), a;
77
- }
78
- function Yt(r, t, e) {
79
- return He(r, -1, e);
80
- }
81
- const Pt = ({
82
- firstDayOfWeek: r,
83
- min: t,
84
- max: e
85
- }) => ({ getGranularCalendarLimits: (l) => {
86
- if (!t && !e)
87
- return { min: null, max: null };
88
- let m = t ? I(t) : null, D = e ? A(e) : null;
89
- if ((l == null ? void 0 : l.type) === "weekly") {
90
- if (l.earliest)
91
- m = I(l.earliest);
92
- else if (m) {
93
- const v = Ye(m, { weekStartsOn: r });
94
- w(m, v) || (m = I(yt(Be(m, { weekStartsOn: r }), 1)));
95
- }
96
- if (l.latest)
97
- D = A(l.latest);
98
- else if (D) {
99
- const v = Be(D, { weekStartsOn: r });
100
- w(D, v) || (D = A(gt(Ye(D, { weekStartsOn: r }), 1)));
101
- }
102
- }
103
- if ((l == null ? void 0 : l.type) === "monthly") {
104
- if (l.earliest)
105
- m = I(l.earliest);
106
- else if (m) {
107
- const v = xe(m);
108
- w(m, v) || (m = xe(Ge(m, 1)));
109
- }
110
- if (l.latest)
111
- D = A(l.latest);
112
- else if (D) {
113
- const v = qe(D);
114
- w(D, v) || (D = qe(Tt(D, 1)));
115
- }
116
- }
117
- if ((l == null ? void 0 : l.type) === "quarterly") {
118
- if (l.earliest)
119
- m = se(l.earliest);
120
- else if (m) {
121
- const v = se(m);
122
- w(m, v) || (m = se(He(m, 1)));
123
- }
124
- if (l.latest)
125
- D = A(l.latest);
126
- else if (D) {
127
- const v = Ae(D);
128
- w(D, v) || (D = Ae(Yt(D)));
129
- }
130
- }
131
- return { min: m, max: D };
132
- } }), Nt = () => {
133
- const r = fe({
134
- daily: null,
135
- weekly: null,
136
- monthly: null,
137
- quarterly: null
138
- });
139
- return {
140
- savedRanges: r,
141
- saveRange: (a, l) => {
142
- r[a] = l;
143
- },
144
- resetSavedRanges: () => {
145
- r.daily = null, r.weekly = null, r.monthly = null, r.quarterly = null;
146
- }
147
- };
148
- };
149
- var g = /* @__PURE__ */ ((r) => (r.CUSTOM_RANGE = "custom-range", r.INPUT = "input", r.ERROR = "error", r.FORM_DATE = "form-date", r.START_DATE_SELECTED = "start-date-selected", r))(g || {});
150
- const Lt = /[\d]/, Ut = /^\d{2}$/, jt = /^\d{2}:\d{2}$/, Qt = (r) => {
151
- const { selectionStart: t } = r.target, e = ["Backspace", "Tab", "ArrowLeft", "ArrowRight"], a = Lt.test(r.key) || e.includes(r.key), l = [1, 2, 4, 5].includes(t) && r.key === ":";
152
- !a && !l && r.preventDefault();
153
- }, je = (r) => {
154
- if (!r)
155
- return r;
156
- let t = r;
157
- if (t.length === 1 && parseInt(r, 10) > 2)
158
- return `0${t}:`;
159
- const [e, a] = t.slice(-2);
160
- return [2, 5].includes(t.length) && a === ":" && (t = `${t.slice(0, t.length - 2)}0${e}`), (Ut.test(t) || jt.test(t)) && (t += ":"), t;
161
- }, Wt = {
162
- "en-US": { "DD-MM-YYYY": "DD-MM-YYYY", "MM-DD-YYYY": "MM-DD-YYYY", "YYYY-MM-DD": "YYYY-MM-DD", customRange: "Custom range", daily: "Daily", dateFrom: "Date from", dateTo: "Date to", lastMonth: "Last month", lastSevenDays: "Last 7 days", lastThreeMonths: "Last three months", monthly: "Monthly", quarterly: "Quarterly", timeFrom: "Time from", timeTo: "Time to", weekly: "Weekly" },
163
- "ja-JP": { customRange: "カスタム範囲", daily: "毎日", dateFrom: "開始日", dateTo: "日付まで", lastMonth: "先月", lastSevenDays: "過去7日間", lastThreeMonths: "過去3か月", monthly: "毎月", quarterly: "毎四半期", timeFrom: "開始時刻", timeTo: "終了時刻", weekly: "毎週" },
164
- "pt-BR": { customRange: "Intervalo personalizado", daily: "Diária", dateFrom: "Data a partir de", dateTo: "Data até", lastMonth: "Último mês", lastSevenDays: "Últimos 7 dias", lastThreeMonths: "Últimos 3 meses", monthly: "Mensal", quarterly: "Trimestral", timeFrom: "Horário a partir de", timeTo: "Hora de", weekly: "Semanal" }
165
- }, $t = {
166
- name: "date-range-picker-calendar",
167
- i18n: { messages: Wt }
168
- }, Gt = /* @__PURE__ */ Qe({
169
- ...$t,
170
- props: {
171
- /**
172
- * Allows user to enter time values in the form
173
- */
174
- allowTimeInput: { type: Boolean, default: !1 },
175
- /**
176
- * Ranges form persistance data
177
- */
178
- dateFormData: {
179
- type: Object,
180
- default: () => ({ startDate: void 0, endDate: void 0, startTime: void 0, endTime: void 0 })
181
- },
182
- /**
183
- * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
184
- */
185
- firstDayOfWeek: P.props.firstDayOfWeek,
186
- /**
187
- * A list of available granularities.
188
- * If present, the date picker will display a segmented control to change granularity.
189
- */
190
- granularities: {
191
- type: Array,
192
- default: null
193
- },
194
- /**
195
- * Indicate if a date should be disabled or not
196
- */
197
- isDateDisabled: P.props.isDateDisabled,
198
- /**
199
- * Set a maximum number of dates to be selectable by the range.
200
- */
201
- maxRange: P.props.maxRange,
202
- /**
203
- * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
204
- */
205
- min: P.props.min,
206
- /**
207
- * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
208
- */
209
- max: P.props.max,
210
- /**
211
- * Number of months rendered on pane
212
- */
213
- numberOfMonths: {
214
- type: P.props.numberOfMonths.type,
215
- default: P.props.numberOfMonths.default,
216
- validator: (r) => r >= 0
217
- },
218
- /**
219
- * Displays the end date's month when the calendar is opened. Defaults to false i.e. the start date's month is displayed.
220
- */
221
- showEndDateOnOpen: { type: Boolean, default: !1 },
222
- /**
223
- * Enables the custom range selector.
224
- * If provided, must be an array that sets the custom range dropdown items. Items are of the structure:
225
- * `label` - label of custom range item.
226
- * `value` - a unique key of the custom range item.
227
- * `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.
228
- */
229
- quickSelectRanges: {
230
- type: Array,
231
- default: void 0
232
- },
233
- /**
234
- * Selected date
235
- */
236
- value: { type: Object, default: void 0 },
237
- /**
238
- * The type of calendar to display. Defaults to showing days.
239
- */
240
- variant: P.props.variant
241
- },
242
- emits: [
243
- g.CUSTOM_RANGE,
244
- g.INPUT,
245
- g.ERROR,
246
- g.FORM_DATE,
247
- g.START_DATE_SELECTED
248
- ],
249
- setup(r, { emit: t }) {
250
- var Ee, Fe, Oe, we;
251
- const e = r, a = 300, l = "customRange", m = ot(), D = ft(m), { t: v } = be(), {
252
- dateFormat: W,
253
- isFormatValid: L,
254
- parseDate: y,
255
- onKeyDown: Z,
256
- autoFormat: H,
257
- formatDate: p
258
- } = Ie(), q = S({}), h = f(() => e.variant === "month" ? "monthly" : "daily"), C = f(() => e.numberOfMonths === 0), s = fe({
259
- startDate: (Ee = e.value) == null ? void 0 : Ee.startDate,
260
- endDate: (Fe = e.value) == null ? void 0 : Fe.endDate,
261
- range: (Oe = e.value) == null ? void 0 : Oe.range,
262
- ...e.granularities ? {
263
- granularity: ((we = e.value) == null ? void 0 : we.granularity) || h.value
264
- } : {}
265
- }), F = f(() => {
266
- var n, i;
267
- return (
268
- // eslint-disable-next-line consistent-return
269
- ((i = (n = e == null ? void 0 : e.quickSelectRanges) == null ? void 0 : n.find(({ value: d, data: c }) => {
270
- var b;
271
- if (!c.endDate) {
272
- if (c.isRelativeToNow) {
273
- const k = (b = q.value) == null ? void 0 : b[d];
274
- return k ? ge(k.startDate, s.startDate) && ge(k.endDate, s.endDate) : (
275
- // If not stored calculated dates, fall back to comparing the quick select item's value
276
- // with the internal range's stored range identifier.
277
- d === s.range
278
- );
279
- }
280
- return ge(c.startDate, s.startDate) && Bt(s.endDate) && (!e.allowTimeInput || Te(s.endDate, A(s.endDate))) && (e.granularities ? c.granularity === s.granularity : !0);
281
- }
282
- if (e.allowTimeInput)
283
- return Te(c.startDate, s.startDate) && Te(c.endDate, s.endDate) && (e.granularities ? c.granularity === s.granularity : !0);
284
- if (c.endDate)
285
- return w(c.startDate, s.startDate) && w(c.endDate, s.endDate) && (e.granularities ? c.granularity === s.granularity : !0);
286
- })) == null ? void 0 : i.value) ?? l
287
- );
288
- }), B = f(() => ({
289
- "b-date-range-picker-calendar__form-input-wrapper": e.allowTimeInput
290
- })), ve = f(() => [
291
- { label: v("customRange"), value: l },
292
- ...e.quickSelectRanges ? e.quickSelectRanges : []
293
- ]), U = f(
294
- () => {
295
- var n;
296
- return ((n = e.granularities) == null ? void 0 : n.find(({ type: i }) => i === s.granularity)) || null;
297
- }
298
- ), oe = f(
299
- () => {
300
- var n;
301
- return ((n = e.granularities) == null ? void 0 : n.map(({ type: i, disabled: d }) => ({
302
- label: v(i),
303
- value: i,
304
- disabled: d
305
- }))) ?? [];
306
- }
307
- ), { getGranularCalendarLimits: ee } = Pt(e), _ = f(
308
- () => e.granularities ? ee(U.value) : { min: e.min ? I(e.min) : null, max: e.max ? A(e.max) : null }
309
- ), {
310
- adjustDateForQuarterly: te,
311
- adjustDateForMonthly: ae,
312
- adjustDateForWeekly: $,
313
- adjustStartDateInputForWeekly: T,
314
- adjustEndDateInputForWeekly: le,
315
- adjustStartDateInputForMonthly: ie,
316
- adjustEndDateInputForMonthly: V,
317
- adjustStartDateInputForQuarterly: ue,
318
- adjustEndDateInputForQuarterly: z
319
- } = _t(e.firstDayOfWeek), { savedRanges: O, saveRange: x, resetSavedRanges: Y } = Nt(), R = (n) => n ? p(n) : "", G = S(!1), K = S(!1), j = S(!1), Q = S(!1), o = fe({
320
- startDate: e.dateFormData.startDate,
321
- endDate: e.dateFormData.endDate,
322
- startTime: e.dateFormData.startTime,
323
- endTime: e.dateFormData.endTime
324
- }), de = (n, i) => {
325
- let d = new Date(n);
326
- const [c, b, k] = i.split(":");
327
- return d = xt(d, parseInt(c, 10)), d = At(d, parseInt(b, 10)), d = qt(d, parseInt(k, 10)), d;
328
- }, ce = (n) => /^(?:[01]\d|2[01234]):(?:[012345]\d):(?:[012345]\d)$/.test(n), J = (n, i) => {
329
- const d = () => {
330
- if (i && M(i)) {
331
- const c = de(y(i), n);
332
- if (e.min && c < Ue(e.min, 0) || e.max && c > Ue(e.max, 0))
333
- return !1;
334
- }
335
- return !0;
336
- };
337
- return ce(n) && d();
338
- }, u = (n, i) => !i || !ce(i) || e.variant === "month" ? n : de(new Date(n), i), X = (n) => {
339
- o.startTime = E(
340
- e.min && e.allowTimeInput && w(e.min, n.startDate) ? e.min : I(n.startDate)
341
- ), o.endTime = E(
342
- e.max && e.allowTimeInput && w(e.max, n.endDate) ? e.max : A(n.endDate)
343
- ), s.startDate = u(n.startDate, o.startTime), s.endDate = u(n.endDate, o.endTime), s.range = null, e.granularities && Y(), t(g.INPUT, {
344
- ...s,
345
- range: F.value
346
- });
347
- }, M = (n) => {
348
- if (!n)
349
- return !1;
350
- const i = (d) => e.min && I(d) < I(e.min) || e.max && I(d) > I(e.max) ? !1 : e.isDateDisabled ? !e.isDateDisabled(I(d)) : !0;
351
- return L(n) && i(y(n));
352
- };
353
- We(() => {
354
- G.value = !!(e.dateFormData.startDate && !M(e.dateFormData.startDate)), e.allowTimeInput ? j.value = !!(e.dateFormData.startTime && !J(e.dateFormData.startTime, e.dateFormData.startDate)) : j.value = !1, K.value = !!(e.dateFormData.endDate && !M(e.dateFormData.endDate)), e.allowTimeInput ? Q.value = !!(e.dateFormData.endTime && !J(e.dateFormData.endTime, e.dateFormData.endDate)) : Q.value = !1;
355
- });
356
- const Ve = (n) => {
357
- var i;
358
- o.startDate = R(n), o.startTime ? j.value && (o.startTime = (i = e.dateFormData) == null ? void 0 : i.startTime) : o.startTime = E(n), G.value = !1, j.value = !1, t(g.START_DATE_SELECTED, n);
359
- }, ze = (n) => {
360
- var i;
361
- o.endDate = R(n), o.endTime ? Q.value && (o.endTime = (i = e.dateFormData) == null ? void 0 : i.endTime) : o.endTime = E(A(n)), K.value = !1, Q.value = !1;
362
- }, me = (n) => {
363
- const i = e.value[n];
364
- if (i)
365
- return i;
366
- if (e.dateFormData[n] && M(e.dateFormData[n]))
367
- return y(e.dateFormData[n]);
368
- }, Re = De((n) => {
369
- var i;
370
- if (M(n)) {
371
- let d = n;
372
- switch (G.value = !1, (i = U.value) == null ? void 0 : i.type) {
373
- case "weekly":
374
- d = T(
375
- n,
376
- R,
377
- _.value.min,
378
- _.value.max
379
- ), o.startDate = d;
380
- break;
381
- case "monthly":
382
- d = ie(
383
- n,
384
- R,
385
- _.value.min,
386
- _.value.max
387
- ), o.startDate = d;
388
- break;
389
- case "quarterly":
390
- d = ue(
391
- n,
392
- R,
393
- _.value.min,
394
- _.value.max
395
- ), o.startDate = d;
396
- break;
397
- }
398
- const c = I(y(d));
399
- s.startDate = u(c, o.startTime), s.endDate = u(
400
- I(y(o.endDate)),
401
- o.endTime
402
- ), M(o.endDate) && (s.endDate = u(
403
- I(y(o.endDate)),
404
- o.endTime
405
- ));
406
- const b = me("endDate");
407
- s.range = null, t(g.FORM_DATE, {
408
- startDate: c,
409
- endDate: b
410
- }), t(g.INPUT, {
411
- ...s,
412
- range: F.value
413
- });
414
- } else
415
- G.value = !0, t(g.ERROR, { ...o });
416
- }, a), Je = (n) => {
417
- o.startDate = H(n), Re(o.startDate);
418
- }, he = De((n) => {
419
- var i;
420
- if (M(n)) {
421
- let d = n;
422
- switch (K.value = !1, (i = U.value) == null ? void 0 : i.type) {
423
- case "weekly":
424
- d = le(
425
- n,
426
- R,
427
- _.value.min,
428
- _.value.max
429
- ), o.endDate = d;
430
- break;
431
- case "monthly":
432
- d = V(
433
- n,
434
- R,
435
- _.value.min,
436
- _.value.max
437
- ), o.endDate = d;
438
- break;
439
- case "quarterly":
440
- d = z(
441
- n,
442
- R,
443
- _.value.min,
444
- _.value.max
445
- ), o.endDate = d;
446
- break;
447
- }
448
- const c = I(y(d));
449
- s.endDate = u(c, o.endTime), M(o.startDate) && (s.startDate = u(
450
- I(y(o.startDate)),
451
- o.startTime
452
- ));
453
- const b = me("startDate");
454
- s.range = null, t(g.FORM_DATE, {
455
- startDate: b,
456
- endDate: c
457
- }), t(g.INPUT, {
458
- ...s,
459
- range: F.value
460
- });
461
- } else
462
- K.value = !0, t(g.ERROR, { ...o });
463
- }, a), Xe = (n) => {
464
- o.endDate = H(n), he(o.endDate);
465
- }, Ze = (n) => {
466
- Z(n);
467
- }, ke = De((n) => {
468
- if (J(n, e.dateFormData.startDate)) {
469
- j.value = !1, s.startDate = u(s.startDate, n);
470
- const i = me("endDate");
471
- t(g.FORM_DATE, {
472
- startDate: s.startDate,
473
- endDate: i,
474
- startTime: n,
475
- endTime: o.endTime ?? e.dateFormData.endTime
476
- }), t(g.INPUT, {
477
- ...s,
478
- range: F.value
479
- });
480
- } else
481
- j.value = !0, t(g.ERROR, { ...o });
482
- }), Me = De((n) => {
483
- J(n, e.dateFormData.endDate) ? (Q.value = !1, s.endDate = u(s.endDate, n), t(g.FORM_DATE, {
484
- startDate: s.startDate,
485
- endDate: s.endDate,
486
- startTime: o.startTime ?? e.dateFormData.startTime,
487
- endTime: n
488
- }), t(g.INPUT, {
489
- ...s,
490
- range: F.value
491
- })) : (Q.value = !0, t(g.ERROR, { ...o }));
492
- }), et = (n) => {
493
- o.startTime = je(n), ke(o.startTime);
494
- }, tt = (n) => {
495
- o.endTime = je(n), Me(o.endTime);
496
- }, at = (n) => {
497
- Qt(n);
498
- }, ne = (n, i, d, c) => {
499
- s.startDate = n, s.endDate = i, d && (s.granularity = d), c && (s.range = c);
500
- }, nt = (n) => {
501
- var d;
502
- const i = (d = e.quickSelectRanges) == null ? void 0 : d.find(({ value: c }) => c === n);
503
- if (i) {
504
- Y();
505
- const c = i.data, b = c.endDate || (c.isRelativeToNow ? new Date(Date.now()) : A(new Date(Date.now()))), k = c.isRelativeToNow && c.timeDifference ? new Date(b.getTime() - c.timeDifference) : c.startDate;
506
- o.endDate = R(b), o.startDate = R(k), ne(k, b, null, n), e.granularities && (s.granularity = c.granularity || h.value), o.startTime = E(k), o.endTime = E(b), s.startDate = k, s.endDate = b, c.isRelativeToNow && (q.value = {
507
- ...q.value,
508
- [n]: {
509
- startDate: k,
510
- endDate: b
511
- }
512
- }), t(g.CUSTOM_RANGE, {
513
- ...i.data,
514
- startDate: k,
515
- endDate: b,
516
- range: i.value
517
- });
518
- }
519
- }, Se = {
520
- weekly: $,
521
- monthly: ae,
522
- quarterly: te
523
- }, rt = (n) => {
524
- const i = s.granularity;
525
- if (s.granularity = n, i && x(i, structuredClone(_e(s))), s.startDate && s.endDate) {
526
- switch (n) {
527
- case "quarterly":
528
- case "monthly":
529
- case "weekly": {
530
- if (O[n]) {
531
- ne(O[n].startDate, O[n].endDate, n);
532
- break;
533
- }
534
- const { startDate: d, endDate: c } = Se[n](
535
- s.startDate,
536
- s.endDate,
537
- _.value.min,
538
- _.value.max
539
- );
540
- ne(d, c, n);
541
- break;
542
- }
543
- case "daily":
544
- O.daily && ne(O.daily.startDate, O.daily.endDate, n);
545
- break;
546
- }
547
- o.startDate = R(s.startDate), o.endDate = R(s.endDate), t(g.INPUT, {
548
- ...s,
549
- range: F.value
550
- });
551
- }
552
- }, st = f(() => ({
553
- "b-date-range-picker-calendar__form-container--no-calendars": C.value
554
- }));
555
- return { __sfc: !0, FORM_INPUT_DEBOUNCE_TIME: a, RANGE_SELECTOR_CUSTOM_RANGE_KEY: l, props: e, emit: t, slots: m, hasSlot: D, t: v, dateFormat: W, isFormatValid: L, parseDate: y, onKeyDown: Z, autoFormat: H, formatDateUtil: p, calculatedIsRelativeToNowQuickSelectRanges: q, defaultGranularity: h, hasNoCalendars: C, internalRangeDate: s, selectedRangeSelectorValue: F, formInputWrapperConditionalClasses: B, quickSelectRangeDefaultItems: ve, selectedGranularity: U, granularityItems: oe, getGranularCalendarLimits: ee, computedMinMax: _, adjustDateForQuarterly: te, adjustDateForMonthly: ae, adjustDateForWeekly: $, adjustStartDateInputForWeekly: T, adjustEndDateInputForWeekly: le, adjustStartDateInputForMonthly: ie, adjustEndDateInputForMonthly: V, adjustStartDateInputForQuarterly: ue, adjustEndDateInputForQuarterly: z, savedRanges: O, saveRange: x, resetSavedRanges: Y, formatDate: R, startDateError: G, endDateError: K, startTimeError: j, endTimeError: Q, dateTextInput: o, setTimeInDateObject: de, isValidTimeString: ce, isValidTime: J, setTimeInDateRef: u, onDateInput: X, isValidDate: M, onStartDateSelected: Ve, onEndDateSelected: ze, getDate: me, validateStartDate: Re, onStartDateInput: Je, validateEndDate: he, onEndDateInput: Xe, onDateInputKeyDown: Ze, validateStartTime: ke, validateEndTime: Me, onStartTimeInput: et, onEndTimeInput: tt, onTimeInputKeyDown: at, setInternalRange: ne, onRangeSelectorInput: nt, adjustDate: Se, onGranularityInput: rt, computedFormContainerClasses: st, Calendar: P, BentoTypography: $e, BentoInputField: mt, BentoDropdown: Dt, BentoSegmentedControl: pt };
556
- }
557
- });
558
- var Kt = function() {
559
- var t = this, e = t._self._c, a = t._self._setupProxy;
560
- return e("div", { staticClass: "b-date-range-picker-calendar" }, [e("div", { staticClass: "b-date-range-picker-calendar__form-container", class: a.computedFormContainerClasses, attrs: { "data-testid": "date-range-picker-calendar-form-container" } }, [e("div", { staticClass: "b-date-range-picker-calendar__form" }, [a.hasSlot("title") ? [t._t("title")] : t._e(), t.quickSelectRanges ? e(a.BentoDropdown, { attrs: { "aria-label": a.t("customRange"), items: a.quickSelectRangeDefaultItems, "model-value": a.selectedRangeSelectorValue }, on: { "update:model-value": a.onRangeSelectorInput } }) : t._e(), t.granularities ? e(a.BentoSegmentedControl, { attrs: { items: a.granularityItems, "model-value": a.internalRangeDate.granularity, "full-width": "" }, on: { "update:model-value": a.onGranularityInput } }) : t._e(), e("div", [e(a.BentoTypography, { staticClass: "b-date-range-picker-calendar__label", attrs: { stronger: "", el: "span" } }, [t._v(" From ")]), e("div", { class: a.formInputWrapperConditionalClasses }, [e(a.BentoInputField, { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": a.t("dateFrom"), "model-value": a.dateTextInput.startDate, error: a.startDateError }, on: { "update:model-value": a.onStartDateInput, keydown: a.onDateInputKeyDown }, scopedSlots: t._u([{ key: "description", fn: function() {
561
- return [t._v(t._s(a.t(a.dateFormat)))];
562
- }, proxy: !0 }]) }), t.allowTimeInput ? e(a.BentoInputField, { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": a.t("timeFrom"), "model-value": a.dateTextInput.startTime, error: a.startTimeError }, on: { "update:model-value": a.onStartTimeInput, keydown: a.onTimeInputKeyDown }, scopedSlots: t._u([{ key: "description", fn: function() {
563
- return [t._v("HH:MM:SS")];
564
- }, proxy: !0 }], null, !1, 3442289499) }) : t._e()], 1)], 1), e("div", [e(a.BentoTypography, { staticClass: "b-date-range-picker-calendar__label", attrs: { stronger: "", el: "span" } }, [t._v(" To ")]), e("div", { class: a.formInputWrapperConditionalClasses }, [e(a.BentoInputField, { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": a.t("dateTo"), "model-value": a.dateTextInput.endDate, error: a.endDateError }, on: { "update:model-value": a.onEndDateInput, keydown: a.onDateInputKeyDown }, scopedSlots: t._u([{ key: "description", fn: function() {
565
- return [t._v(t._s(a.t(a.dateFormat)))];
566
- }, proxy: !0 }]) }), t.allowTimeInput ? e(a.BentoInputField, { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": a.t("timeTo"), "model-value": a.dateTextInput.endTime, error: a.endTimeError }, on: { "update:model-value": a.onEndTimeInput, keydown: a.onTimeInputKeyDown }, scopedSlots: t._u([{ key: "description", fn: function() {
567
- return [t._v("HH:MM:SS")];
568
- }, proxy: !0 }], null, !1, 3442289499) }) : t._e()], 1)], 1)], 2), a.hasSlot("actions") ? e("div", [t._t("actions")], 2) : t._e()]), a.hasNoCalendars ? t._e() : e("div", { staticClass: "b-date-range-picker-calendar__calendars-container", attrs: { "data-testid": "date-range-picker-calendar-calendar-container" } }, [e(a.Calendar, { attrs: { value: a.internalRangeDate, "first-day-of-week": t.firstDayOfWeek, "is-date-disabled": t.isDateDisabled, "max-range": t.maxRange, min: a.computedMinMax.min, max: a.computedMinMax.max, "number-of-months": t.numberOfMonths, "show-end-date-on-open": t.showEndDateOnOpen, granularity: a.selectedGranularity, variant: t.variant, "is-range": "" }, on: { input: a.onDateInput, "start-date-selected": a.onStartDateSelected, "end-date-selected": a.onEndDateSelected } })], 1)]);
569
- }, Ht = [], Vt = /* @__PURE__ */ Ke(
570
- Gt,
571
- Kt,
572
- Ht,
573
- !1,
574
- null,
575
- "8b3a8a9a"
576
- );
577
- const zt = Vt.exports, Jt = {
578
- "en-US": { apply: "Apply", cancel: "Cancel", dateRangePicker: "Date range picker {name}", provideDateInAFormat: "Provide date in a YYYY-MM-DD format", quarter: "Q{quarter} {year}", selectDate: "Select a date", selectDateRange: "Select a date range", selectedDateIsNotAvailable: "Selected date is not available" },
579
- "ja-JP": { apply: "適用", cancel: "キャンセル", dateRangePicker: "日付範囲ピッカー {name}", provideDateInAFormat: "YYYY-MM-DD形式で日付を入力してください", quarter: "{year}年第{quarter}四半期", selectDate: "日付を選択", selectDateRange: "日付範囲を選択", selectedDateIsNotAvailable: "選択した日付は利用できません" },
580
- "pt-BR": { apply: "Aplicar", cancel: "Cancelar", dateRangePicker: "Seletor de intervalo de datas {name}", provideDateInAFormat: "Forneça a data no formato AAAA-MM-DD", quarter: "{quarter}º trimestre de {year}", selectDate: "Selecione uma data", selectDateRange: "Selecione um intervalo de datas", selectedDateIsNotAvailable: "A data selecionada não está disponível" }
581
- }, Xt = ({
582
- datePickerValue: r,
583
- isDateIncorrect: t,
584
- quickSelectRanges: e,
585
- isMonthVariant: a,
586
- withTimeInput: l,
587
- placeholder: m
588
- }) => {
589
- const { locale: D, t: v } = be(), { dateToInputDateString: W } = Ie(), L = (p) => !!p && !isNaN(p.getTime()), y = fe({
590
- startDate: null,
591
- endDate: null,
592
- startTime: null,
593
- endTime: null
594
- });
595
- return pe(
596
- r,
597
- (p) => {
598
- y.startDate = W(p == null ? void 0 : p.startDate), y.endDate = W(p == null ? void 0 : p.endDate), y.startTime = E(p == null ? void 0 : p.startDate), y.endTime = E(p == null ? void 0 : p.endDate);
599
- },
600
- { immediate: !0 }
601
- ), {
602
- // Values
603
- dateDisplayValue: f(() => {
604
- var q;
605
- if (t.value)
606
- return `${y.startDate || ""} - ${y.endDate || ""}`;
607
- if (!r.value || !r.value.startDate && !r.value.endDate)
608
- return (m == null ? void 0 : m.value) || v("selectDateRange");
609
- if ((q = e.value) != null && q.length) {
610
- const h = e.value.find(({ value: C }) => {
611
- var s;
612
- return C === ((s = r.value) == null ? void 0 : s.range);
613
- });
614
- if (h)
615
- return h.label;
616
- }
617
- if (r.value.granularity === "quarterly") {
618
- const { startDate: h, endDate: C } = r.value, s = v("quarter", { quarter: Pe(h), year: Ne(h) });
619
- if (Ct(h, C))
620
- return s;
621
- const F = v("quarter", { quarter: Pe(C), year: Ne(C) });
622
- return `${s} - ${F}`;
623
- }
624
- if (!L(r.value.startDate) || !L(r.value.endDate))
625
- return `${y.startDate || ""} - ${y.endDate || ""}`;
626
- let p = a != null && a.value ? { month: "long", year: "numeric" } : { month: "short", day: "2-digit", year: "numeric" };
627
- return l.value && (p = {
628
- ...p,
629
- hour: "numeric",
630
- minute: "numeric",
631
- second: "numeric",
632
- hour12: !1
633
- }), bt(D.value, p).formatRange(
634
- r.value.startDate,
635
- r.value.endDate
636
- );
637
- }),
638
- textInputDisplayValue: y,
639
- // Methods
640
- formatTextInputDisplayValue: () => ""
641
- };
642
- }, Zt = {
643
- i18n: { messages: Jt },
644
- name: "bento-date-range-picker",
645
- model: { prop: "modelValue" }
646
- }, ea = /* @__PURE__ */ Qe({
647
- ...Zt,
648
- props: {
649
- description: { default: void 0 },
650
- disabled: { type: Boolean, default: !1 },
651
- errorMessage: { default: null },
652
- label: { default: void 0 },
653
- optional: { type: Boolean, default: !1 },
654
- placeholder: { default: null },
655
- readonly: { type: Boolean, default: !1 },
656
- required: { type: Boolean, default: !1 },
657
- tooltipText: { default: null },
658
- allowTimeInput: { type: Boolean },
659
- firstDayOfWeek: { default: void 0 },
660
- granularities: null,
661
- isDateDisabled: { default: void 0 },
662
- showEndDateOnOpen: { type: Boolean, default: !1 },
663
- quickSelectRanges: { default: void 0 },
664
- maxRange: { default: null },
665
- min: { default: null },
666
- max: { default: null },
667
- numberOfMonths: { default: void 0 },
668
- modelValue: { default: null },
669
- value: { default: null },
670
- variant: { default: void 0 },
671
- hasActions: { type: Boolean, default: !1 }
672
- },
673
- emits: ["update:model-value", "input"],
674
- setup(r, { emit: t }) {
675
- const e = r, a = lt(), { t: l } = be(), { dateToInputDateString: m } = Ie(), D = re("bento-date-range-picker-container"), v = re("bento-date-range-picker-label"), W = re("bento-date-range-picker-description"), L = re("bento-date-range-picker-error"), y = re("bento-date-range-picker-date-error"), Z = f(() => e.label || l("dateRangePicker", { name: D })), { resolvedFirstDayOfWeek: H } = vt(ye(e, "firstDayOfWeek")), p = it({
676
- none: 0,
677
- one: 710,
678
- // width of date range picker with one panes
679
- two: 1030,
680
- // width of date range picker with two panes
681
- three: 1290
682
- // width of date range picker with three panes
683
- }), q = f(() => {
684
- const u = p.active().value, X = {
685
- none: 0,
686
- one: 1,
687
- two: 2
688
- };
689
- if (u in X) {
690
- const M = X[u];
691
- return e.numberOfMonths === void 0 ? M : Math.min(e.numberOfMonths, M);
692
- }
693
- return e.numberOfMonths;
694
- }), h = f(() => (e == null ? void 0 : e.quickSelectRanges) && e.quickSelectRanges.map((u) => {
695
- const X = u.data.endDate ? void 0 : new Date(Date.now()).getTime() - u.data.startDate.getTime();
696
- return {
697
- ...u,
698
- data: {
699
- ...u.data,
700
- // Adding timeDifference to calculate an up-to-date endDate on range selection
701
- timeDifference: X
702
- }
703
- };
704
- })), C = f(() => e.label ? v : (a == null ? void 0 : a["aria-labelledby"]) ?? null), s = S(!1), F = S(null), B = S(!1), { isReadOnly: ve } = Mt(ye(e, "readonly")), { emitValue: U } = St(t);
705
- pe(
706
- () => e.disabled,
707
- () => {
708
- e.disabled && B.value && (B.value = !1);
709
- }
710
- );
711
- const oe = f(() => e.modelValue || e.value), ee = f(() => e.hasActions ? !Y.value && s.value : s.value), _ = f(() => ({
712
- "b-date-range-picker__description--error": !!e.errorMessage || ee.value
713
- })), te = f(() => e.variant === "month"), ae = f(() => e.allowTimeInput && e.variant !== "month"), { dateDisplayValue: $, textInputDisplayValue: T, formatTextInputDisplayValue: le } = Xt({
714
- datePickerValue: oe,
715
- isDateIncorrect: s,
716
- quickSelectRanges: h,
717
- isMonthVariant: te,
718
- withTimeInput: ae,
719
- placeholder: ye(e, "placeholder")
720
- }), ie = f(
721
- () => `${e.description ? W : ""} ${e.errorMessage ? L : ""} ${s.value ? y : ""}`.trim() || null
722
- ), V = () => {
723
- B.value = !1;
724
- }, ue = () => {
725
- B.value = !0;
726
- }, z = S($.value), O = S(
727
- // textInputDisplayValue is a reactive object
728
- structuredClone(_e(T))
729
- ), x = S(e.modelValue ?? e.value), Y = S(!0), R = f(
730
- () => e.hasActions ? O.value : T
731
- ), G = f(
732
- () => e.hasActions ? z.value : $.value
733
- );
734
- We(() => {
735
- if (e.hasActions || Ce(
736
- 'BentoDateRangePicker "hasActions" property',
737
- `Set the BentoDateRangePicker "hasActions" property true which will display the "Apply" and "Cancel" buttons.
738
- This will be the default behavior in the v2 and "hasActions" will be removed.`,
739
- "2.0.0"
740
- ), e.value && Ce(
741
- 'BentoDateRangePicker "value" property',
742
- 'The use of "value" prop in "BentoDateRangePicker" is no longer supported. Use the "v-model" or "model-value" property instead.',
743
- "2.0.0"
744
- ), e.granularities && e.variant !== "month" && e.granularities.find(({ type: u }) => u === "quarterly"))
745
- throw new Error('Quarterly granularity is only supported by BentoDateRangePicker with variant: "month"');
746
- }), pe([() => e.value, () => e.modelValue], () => {
747
- z.value = $.value, O.value = structuredClone(_e(T));
748
- });
749
- const K = f(() => [
750
- {
751
- title: l("apply"),
752
- event: () => {
753
- U(x.value), V(), Y.value = !0;
754
- },
755
- disabled: Y.value
756
- },
757
- {
758
- title: l("cancel"),
759
- event: V
760
- }
761
- ]);
762
- return pe(x, (u) => {
763
- if (e.hasActions) {
764
- Y.value = s.value;
765
- return;
766
- }
767
- U(u);
768
- }), { __sfc: !0, emit: t, props: e, attrs: a, t: l, dateToInputDateString: m, datePickerContainerId: D, labelId: v, descriptionId: W, errorId: L, dateErrorId: y, popoverAriaLabel: Z, resolvedFirstDayOfWeek: H, breakpoints: p, computedNumberOfMonths: q, adjustedQuickSelectRanges: h, dropdownInputAriaLabelledBy: C, isDateIncorrect: s, inputContainerRef: F, isDateRangePickerOpen: B, isReadOnly: ve, emitValue: U, internalModelValue: oe, shouldDisplayError: ee, descriptionConditionalClasses: _, isMonthVariant: te, withTimeInput: ae, dateDisplayValue: $, textInputDisplayValue: T, formatTextInputDisplayValue: le, ariaDescribedBy: ie, closeDateRangePicker: V, openDateRangePicker: ue, localDateDisplayValue: z, localTextInputDisplayValue: O, selectedDate: x, isApplyDisabled: Y, displayedTextInputValue: R, displayedDateValue: G, rangePickerButtonActions: K, onDateRangePickerInput: (u) => {
769
- s.value = !1, T.startDate = m(u.startDate), T.endDate = m(u.endDate), T.startTime = E(u.startDate), T.endTime = E(u.endDate), x.value = u;
770
- }, clearDateRangePickerValue: async () => {
771
- s.value && (s.value = !1), x.value = null;
772
- }, onEnterPressedOverInput: () => {
773
- if (!B.value) {
774
- B.value = !0;
775
- return;
776
- }
777
- s.value || (B.value = !1);
778
- }, onDateRangePickerFormDateInputUpdate: (u) => {
779
- s.value = !1, u.startTime && (T.startTime = u.startTime), u.endTime && (T.endTime = u.endTime);
780
- }, onDateRangePickerError: (u) => {
781
- s.value = !0, T.startDate = u.startDate, T.endDate = u.endDate, x.value = { startDate: null, endDate: null };
782
- }, onRangeSelectorInput: (u) => {
783
- u && (T.startDate = m(u.startDate), T.endDate = m(u.endDate), T.startTime = E(u.startDate), T.endTime = E(u.endDate), x.value = u);
784
- }, BentoButtonActions: ct, BentoButtonActionsLayout: wt, BentoDivider: ut, BentoPopover: dt, BentoTypography: $e, DateRangePickerCalendar: zt, DropdownInputDefault: kt, ErrorMessage: Ot, FieldLabel: Ft, vBentoClickOutsideDirective: Et };
785
- }
786
- });
787
- var ta = function() {
788
- var t = this, e = t._self._c, a = t._self._setupProxy;
789
- return e("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: a.closeDateRangePicker, expression: "closeDateRangePicker" }], staticClass: "b-date-range-picker" }, [t.label ? e(a.FieldLabel, { attrs: { id: a.labelId, label: t.label, "tooltip-text": t.tooltipText, optional: t.optional, required: t.required } }) : t._e(), e("div", { on: { keydown: function(l) {
790
- return !l.type.indexOf("key") && t._k(l.keyCode, "enter", 13, l.key, "Enter") ? null : a.onEnterPressedOverInput.apply(null, arguments);
791
- } } }, [e(a.DropdownInputDefault, { ref: "inputContainerRef", attrs: { "always-combobox-is-input": "", ariaControls: a.datePickerContainerId, ariaExpanded: a.isDateRangePickerOpen, "aria-labelledby": a.dropdownInputAriaLabelledBy, "aria-describedby": a.ariaDescribedBy, "aria-required": t.required, disabled: t.disabled, "is-invalid": !!t.errorMessage || a.shouldDisplayError, open: a.isDateRangePickerOpen, "display-value": a.displayedDateValue, readonly: a.isReadOnly }, on: { open: a.openDateRangePicker, clear: a.clearDateRangePickerValue, close: a.closeDateRangePicker } })], 1), a.shouldDisplayError ? e(a.ErrorMessage, { staticClass: "b-date-range-picker__error-message", attrs: { id: a.dateErrorId, "error-message": a.t("provideDateInAFormat") } }) : t._e(), t.errorMessage ? e(a.ErrorMessage, { staticClass: "b-date-range-picker__error-message", attrs: { id: a.errorId, "error-message": t.errorMessage } }) : t._e(), t.description ? e(a.BentoTypography, { staticClass: "b-date-range-picker__description", class: a.descriptionConditionalClasses, attrs: { id: a.descriptionId, el: "span" } }, [t._v(" " + t._s(t.description) + " ")]) : t._e(), a.inputContainerRef ? e(a.BentoPopover, { staticClass: "b-date-range-picker__container", attrs: { id: a.datePickerContainerId, open: a.isDateRangePickerOpen, "target-element": a.inputContainerRef, "aria-label": a.popoverAriaLabel, position: "bottom-start", "without-space": "", "fit-content": "", "trap-all": "", "overflow-visible": "" }, nativeOn: { keydown: function(l) {
792
- return !l.type.indexOf("key") && t._k(l.keyCode, "esc", 27, l.key, ["Esc", "Escape"]) ? null : a.closeDateRangePicker.apply(null, arguments);
793
- } } }, [e(a.DateRangePickerCalendar, { attrs: { "allow-time-input": a.withTimeInput, "quick-select-ranges": a.adjustedQuickSelectRanges, value: a.internalModelValue, "first-day-of-week": a.resolvedFirstDayOfWeek, granularities: t.granularities, "is-date-disabled": t.isDateDisabled, "max-range": t.maxRange, min: t.min, max: t.max, "number-of-months": a.computedNumberOfMonths, "show-end-date-on-open": t.showEndDateOnOpen, "date-form-data": a.displayedTextInputValue, variant: t.variant }, on: { "custom-range": a.onRangeSelectorInput, input: a.onDateRangePickerInput, error: a.onDateRangePickerError, "form-date": a.onDateRangePickerFormDateInputUpdate }, scopedSlots: t._u([t.hasActions ? { key: "actions", fn: function() {
794
- return [e(a.BentoDivider), e("div", { staticClass: "b-date-range-picker__footer" }, [e(a.BentoButtonActions, { attrs: { actions: a.rangePickerButtonActions, layout: a.BentoButtonActionsLayout.SPACE_BETWEEN } })], 1)];
795
- }, proxy: !0 } : null], null, !0) })], 1) : t._e()], 1);
796
- }, aa = [], na = /* @__PURE__ */ Ke(
797
- ea,
798
- ta,
799
- aa,
800
- !1,
801
- null,
802
- "fbf1b83e"
803
- );
804
- const Oa = na.exports;
805
- export {
806
- Oa as B,
807
- zt as D,
808
- Bt as a,
809
- ge as i
810
- };
811
- //# sourceMappingURL=date-range-picker.Bf9pRNL7.js.map