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