@adyen/bento-vue2 1.83.1 → 1.84.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.
- package/README.md +5 -5
- package/dist/@types/index.d.ts +56 -5
- package/dist/action-bar.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/ai-button.css +1 -1
- package/dist/assets/alert.css +1 -1
- package/dist/assets/avatar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions-with-menu.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox-group.css +1 -1
- package/dist/assets/checkbox-input.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/chip.css +1 -1
- package/dist/assets/code-snippet.css +1 -1
- package/dist/assets/controls-group.css +1 -1
- package/dist/assets/country.css +1 -1
- package/dist/assets/currency.css +1 -1
- package/dist/assets/dashboard-section.css +1 -1
- package/dist/assets/dashed-underline.css +1 -1
- package/dist/assets/data-grid-template.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/date.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/divider.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown-tag.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/empty-state.css +1 -1
- package/dist/assets/field-label.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/fixed-scroller.css +1 -1
- package/dist/assets/footer-actions.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/grid-layout.css +1 -1
- package/dist/assets/header-meta.css +1 -1
- package/dist/assets/header-with-views.css +1 -1
- package/dist/assets/header.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/info-icon.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/layout-row.css +1 -1
- package/dist/assets/link.css +1 -1
- package/dist/assets/listbox-option-tag.css +1 -1
- package/dist/assets/loading-indicator.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/payment-method.css +1 -1
- package/dist/assets/popper-container.css +1 -1
- package/dist/assets/promo-banner.css +1 -1
- package/dist/assets/radio-group.css +1 -1
- package/dist/assets/radio-input.css +1 -1
- package/dist/assets/rich-text-editor.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/segmented-control.css +1 -1
- package/dist/assets/selection-card-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/status.css +1 -1
- package/dist/assets/step.css +1 -1
- package/dist/assets/structured-list-item.css +1 -1
- package/dist/assets/summary-grid.css +1 -1
- package/dist/assets/tab.css +1 -1
- package/dist/assets/tag.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/assets/toast.css +1 -1
- package/dist/assets/toggle.css +1 -1
- package/dist/assets/tooltip.css +1 -1
- package/dist/assets/tutorial.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.C2GnRugW.js → action-bar.y4tcdk7R.js} +8 -6
- package/dist/chunks/{action-bar.C2GnRugW.js.map → action-bar.y4tcdk7R.js.map} +1 -1
- package/dist/chunks/{ai-button.C9Uc6vBY.js → ai-button.BEy4Gly-.js} +2 -2
- package/dist/chunks/{ai-button.C9Uc6vBY.js.map → ai-button.BEy4Gly-.js.map} +1 -1
- package/dist/chunks/{alert.BlJBrD8c.js → alert.B3Pdp02a.js} +29 -21
- package/dist/chunks/{alert.BlJBrD8c.js.map → alert.B3Pdp02a.js.map} +1 -1
- package/dist/chunks/{base-modal.L39wmqVD.js → base-modal.KYkLKswF.js} +20 -18
- package/dist/chunks/{base-modal.L39wmqVD.js.map → base-modal.KYkLKswF.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.CQlsQa_f.js → button-actions-with-menu.B5mKwc-F.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.CQlsQa_f.js.map → button-actions-with-menu.B5mKwc-F.js.map} +1 -1
- package/dist/chunks/{button-actions.BWVq6OZQ.js → button-actions.D9n7MxWe.js} +270 -239
- package/dist/chunks/{button-actions.BWVq6OZQ.js.map → button-actions.D9n7MxWe.js.map} +1 -1
- package/dist/chunks/{button.C5GvPqe5.js → button.DIU6m9wD.js} +2 -2
- package/dist/chunks/{button.C5GvPqe5.js.map → button.DIU6m9wD.js.map} +1 -1
- package/dist/chunks/calendar.C8DpZ4Sr.js +1101 -0
- package/dist/chunks/calendar.C8DpZ4Sr.js.map +1 -0
- package/dist/chunks/{card.CktheSva.js → card.CLX0RGG6.js} +2 -2
- package/dist/chunks/{card.CktheSva.js.map → card.CLX0RGG6.js.map} +1 -1
- package/dist/chunks/{checkbox-group.BUXnMhO8.js → checkbox-group.BCnhjQie.js} +4 -4
- package/dist/chunks/{checkbox-group.BUXnMhO8.js.map → checkbox-group.BCnhjQie.js.map} +1 -1
- package/dist/chunks/{checkbox-input.B0NsfSNR.js → checkbox-input.08E9BNeF.js} +45 -40
- package/dist/chunks/checkbox-input.08E9BNeF.js.map +1 -0
- package/dist/chunks/{checkbox.DgPVHJnT.js → checkbox.CU5ierOq.js} +9 -9
- package/dist/chunks/{checkbox.DgPVHJnT.js.map → checkbox.CU5ierOq.js.map} +1 -1
- package/dist/chunks/{code-snippet.1_edHDaZ.js → code-snippet.9MwDHp50.js} +62 -60
- package/dist/chunks/code-snippet.9MwDHp50.js.map +1 -0
- package/dist/chunks/constructNow.DuaJst0D.js +8 -0
- package/dist/chunks/{constructNow.BhymNmy5.js.map → constructNow.DuaJst0D.js.map} +1 -1
- package/dist/chunks/{controls-group.BqPxnEl3.js → controls-group.D4eW9DtP.js} +2 -2
- package/dist/chunks/{controls-group.BqPxnEl3.js.map → controls-group.D4eW9DtP.js.map} +1 -1
- package/dist/chunks/{copy.I2GvwCvt.js → copy.C0q7xgXs.js} +19 -17
- package/dist/chunks/{copy.I2GvwCvt.js.map → copy.C0q7xgXs.js.map} +1 -1
- package/dist/chunks/{country.BPrh4fXO.js → country.DyrDj95W.js} +2 -2
- package/dist/chunks/{country.BPrh4fXO.js.map → country.DyrDj95W.js.map} +1 -1
- package/dist/chunks/country.types.DaVCMxk-.js +773 -0
- package/dist/chunks/{country.types.C0Q_hhgJ.js.map → country.types.DaVCMxk-.js.map} +1 -1
- package/dist/chunks/{dashboard-section.B4bHrFIl.js → dashboard-section.B83FdC0Z.js} +3 -3
- package/dist/chunks/{dashboard-section.B4bHrFIl.js.map → dashboard-section.B83FdC0Z.js.map} +1 -1
- package/dist/chunks/{dashed-underline.ByK3QxFJ.js → dashed-underline.DQGVy5T2.js} +2 -2
- package/dist/chunks/{dashed-underline.ByK3QxFJ.js.map → dashed-underline.DQGVy5T2.js.map} +1 -1
- package/dist/chunks/{data-grid-template.CvZbOkih.js → data-grid-template.BTEFoEwf.js} +4 -4
- package/dist/chunks/{data-grid-template.CvZbOkih.js.map → data-grid-template.BTEFoEwf.js.map} +1 -1
- package/dist/chunks/{data-grid.CsVqTwy0.js → data-grid.BPG1GPIl.js} +482 -398
- package/dist/chunks/{data-grid.CsVqTwy0.js.map → data-grid.BPG1GPIl.js.map} +1 -1
- package/dist/chunks/date-input.BbZqj10S.js +15 -0
- package/dist/chunks/date-input.BbZqj10S.js.map +1 -0
- package/dist/chunks/{date-picker.-a_TXwjx.js → date-picker.CnsC_UMG.js} +78 -74
- package/dist/chunks/date-picker.CnsC_UMG.js.map +1 -0
- package/dist/chunks/date-range-picker.B6GSRjjK.js +1693 -0
- package/dist/chunks/date-range-picker.B6GSRjjK.js.map +1 -0
- package/dist/chunks/de.DvtL0g75.js +478 -0
- package/dist/chunks/de.DvtL0g75.js.map +1 -0
- package/dist/chunks/{dialog-page.Dn-WbcxU.js → dialog-page.QpRiNPyx.js} +29 -23
- package/dist/chunks/{dialog-page.Dn-WbcxU.js.map → dialog-page.QpRiNPyx.js.map} +1 -1
- package/dist/chunks/differenceInMonths.DcFDl4eH.js +43 -0
- package/dist/chunks/differenceInMonths.DcFDl4eH.js.map +1 -0
- package/dist/chunks/{dropdown-tag.AYIB0ec5.js → dropdown-tag.HBM0wrEV.js} +4 -4
- package/dist/chunks/{dropdown-tag.AYIB0ec5.js.map → dropdown-tag.HBM0wrEV.js.map} +1 -1
- package/dist/chunks/{dropdown.Dt0_ZUBn.js → dropdown.C2pXf8Li.js} +85 -81
- package/dist/chunks/{dropdown.Dt0_ZUBn.js.map → dropdown.C2pXf8Li.js.map} +1 -1
- package/dist/chunks/{empty-state.jVTWhJW7.js → empty-state.DpBnqAxu.js} +2 -2
- package/dist/chunks/{empty-state.jVTWhJW7.js.map → empty-state.DpBnqAxu.js.map} +1 -1
- package/dist/chunks/en-GB.DCGuCmAv.js +46 -0
- package/dist/chunks/en-GB.DCGuCmAv.js.map +1 -0
- package/dist/chunks/{getTimezoneOffsetInMilliseconds.B7sxiukN.js → en-US.BZii9jNW.js} +160 -196
- package/dist/chunks/en-US.BZii9jNW.js.map +1 -0
- package/dist/chunks/es.bz0mzkMq.js +374 -0
- package/dist/chunks/es.bz0mzkMq.js.map +1 -0
- package/dist/chunks/es6.C1DXQV6f.js +12 -0
- package/dist/chunks/es6.C1DXQV6f.js.map +1 -0
- package/dist/chunks/{field-label.BpeaR4Qc.js → field-label.CEkJnsiL.js} +5 -5
- package/dist/chunks/{field-label.BpeaR4Qc.js.map → field-label.CEkJnsiL.js.map} +1 -1
- package/dist/chunks/{file-uploader.G6mr6RuA.js → file-uploader.CnOqfuI-.js} +299 -253
- package/dist/chunks/{file-uploader.G6mr6RuA.js.map → file-uploader.CnOqfuI-.js.map} +1 -1
- package/dist/chunks/filter-bar.CnJAxz9B.js +2559 -0
- package/dist/chunks/filter-bar.CnJAxz9B.js.map +1 -0
- package/dist/chunks/fixed-scroller.Bp4-iO80.js +114 -0
- package/dist/chunks/{fixed-scroller.Ca1ujamx.js.map → fixed-scroller.Bp4-iO80.js.map} +1 -1
- package/dist/chunks/{footer-actions.3JdT8b0p.js → footer-actions.BOiN47Xd.js} +3 -3
- package/dist/chunks/{footer-actions.3JdT8b0p.js.map → footer-actions.BOiN47Xd.js.map} +1 -1
- package/dist/chunks/{form-layout-title.D9GJQfF9.js → form-layout-title.CdC1T4gs.js} +2 -2
- package/dist/chunks/{form-layout-title.D9GJQfF9.js.map → form-layout-title.CdC1T4gs.js.map} +1 -1
- package/dist/chunks/fr-CA.B1aPU8fp.js +48 -0
- package/dist/chunks/fr-CA.B1aPU8fp.js.map +1 -0
- package/dist/chunks/fr.Dj7wEToe.js +47 -0
- package/dist/chunks/fr.Dj7wEToe.js.map +1 -0
- package/dist/chunks/getTimezoneOffsetInMilliseconds.C-aIpRfB.js +51 -0
- package/dist/chunks/getTimezoneOffsetInMilliseconds.C-aIpRfB.js.map +1 -0
- package/dist/chunks/header-meta.D_oAu2S9.js +212 -0
- package/dist/chunks/header-meta.D_oAu2S9.js.map +1 -0
- package/dist/chunks/{header-with-views.lzT3kGpo.js → header-with-views.Dc9LUYNY.js} +379 -315
- package/dist/chunks/{header-with-views.lzT3kGpo.js.map → header-with-views.Dc9LUYNY.js.map} +1 -1
- package/dist/chunks/{header.D76MKCdS.js → header.BmtlQmPs.js} +3 -3
- package/dist/chunks/{header.D76MKCdS.js.map → header.BmtlQmPs.js.map} +1 -1
- package/dist/chunks/{input-field-password.C7zjyp7f.js → input-field-password.D23H_RvO.js} +48 -42
- package/dist/chunks/{input-field-password.C7zjyp7f.js.map → input-field-password.D23H_RvO.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.DwuTziSU.js → input-field-phone-number.Bvk2Pvec.js} +9 -3
- package/dist/chunks/{input-field-phone-number.DwuTziSU.js.map → input-field-phone-number.Bvk2Pvec.js.map} +1 -1
- package/dist/chunks/{input-field.DsT4AWXC.js → input-field.hf0_ALq0.js} +37 -29
- package/dist/chunks/{input-field.DsT4AWXC.js.map → input-field.hf0_ALq0.js.map} +1 -1
- package/dist/chunks/{inspector.2A5vWUou.js → inspector.C0iAxxoz.js} +40 -34
- package/dist/chunks/{inspector.2A5vWUou.js.map → inspector.C0iAxxoz.js.map} +1 -1
- package/dist/chunks/isSameWeek.CUD7czUN.js +14 -0
- package/dist/chunks/isSameWeek.CUD7czUN.js.map +1 -0
- package/dist/chunks/it.Oaj6BklL.js +392 -0
- package/dist/chunks/it.Oaj6BklL.js.map +1 -0
- package/dist/chunks/ja.Cm9tJMi2.js +367 -0
- package/dist/chunks/ja.Cm9tJMi2.js.map +1 -0
- package/dist/chunks/ko.Ceaof6EP.js +348 -0
- package/dist/chunks/ko.Ceaof6EP.js.map +1 -0
- package/dist/chunks/{link.BoDUCYmM.js → link.PsTSQjK3.js} +27 -21
- package/dist/chunks/{link.BoDUCYmM.js.map → link.PsTSQjK3.js.map} +1 -1
- package/dist/chunks/match.CMBZxEs9.js +302 -0
- package/dist/chunks/match.CMBZxEs9.js.map +1 -0
- package/dist/chunks/{modal-fullscreen.CcvZBUoF.js → modal-fullscreen.B1gltlxA.js} +5 -5
- package/dist/chunks/{modal-fullscreen.CcvZBUoF.js.map → modal-fullscreen.B1gltlxA.js.map} +1 -1
- package/dist/chunks/{modal.6hFEbnZM.js → modal.e3EQ6Kex.js} +5 -5
- package/dist/chunks/{modal.6hFEbnZM.js.map → modal.e3EQ6Kex.js.map} +1 -1
- package/dist/chunks/nl.B6vCf2B9.js +327 -0
- package/dist/chunks/nl.B6vCf2B9.js.map +1 -0
- package/dist/chunks/{pagination.BSyshRGH.js → pagination.BcFt2FqK.js} +6 -6
- package/dist/chunks/{pagination.BSyshRGH.js.map → pagination.BcFt2FqK.js.map} +1 -1
- package/dist/chunks/{promo-banner.D3aG5wnp.js → promo-banner.yfBorKj7.js} +2 -2
- package/dist/chunks/{promo-banner.D3aG5wnp.js.map → promo-banner.yfBorKj7.js.map} +1 -1
- package/dist/chunks/pt-BR.CiGdfP45.js +380 -0
- package/dist/chunks/pt-BR.CiGdfP45.js.map +1 -0
- package/dist/chunks/{radio-group.DTZwsfwW.js → radio-group.CtTnfkYg.js} +3 -3
- package/dist/chunks/{radio-group.DTZwsfwW.js.map → radio-group.CtTnfkYg.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.B0ivi3UG.js → rich-text-editor.Dq2CFGOu.js} +5 -5
- package/dist/chunks/{rich-text-editor.B0ivi3UG.js.map → rich-text-editor.Dq2CFGOu.js.map} +1 -1
- package/dist/chunks/{search-bar.Bpk-PuYT.js → search-bar.B0SdQBnY.js} +3 -3
- package/dist/chunks/{search-bar.Bpk-PuYT.js.map → search-bar.B0SdQBnY.js.map} +1 -1
- package/dist/chunks/{secondary-nav.BGOYJrsB.js → secondary-nav.BPGpxd0p.js} +35 -29
- package/dist/chunks/{secondary-nav.BGOYJrsB.js.map → secondary-nav.BPGpxd0p.js.map} +1 -1
- package/dist/chunks/{selection-card-group.CLqWoLSN.js → selection-card-group.BryV14qP.js} +5 -5
- package/dist/chunks/{selection-card-group.CLqWoLSN.js.map → selection-card-group.BryV14qP.js.map} +1 -1
- package/dist/chunks/{sidepanel.C5SvJNMR.js → sidepanel.NFyZGE57.js} +5 -5
- package/dist/chunks/{sidepanel.C5SvJNMR.js.map → sidepanel.NFyZGE57.js.map} +1 -1
- package/dist/chunks/startOfWeek.Dxw2MhGp.js +10 -0
- package/dist/chunks/startOfWeek.Dxw2MhGp.js.map +1 -0
- package/dist/chunks/step.BLFXvHL6.js +223 -0
- package/dist/chunks/step.BLFXvHL6.js.map +1 -0
- package/dist/chunks/{structured-list-item.CbXDKwsF.js → structured-list-item.CptOCpHP.js} +3 -3
- package/dist/chunks/{structured-list-item.CbXDKwsF.js.map → structured-list-item.CptOCpHP.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.haWi7oaf.js → summary-grid.types.B1T8_k1m.js} +3 -3
- package/dist/chunks/{summary-grid.types.haWi7oaf.js.map → summary-grid.types.B1T8_k1m.js.map} +1 -1
- package/dist/chunks/sv.f8EfZjMZ.js +377 -0
- package/dist/chunks/sv.f8EfZjMZ.js.map +1 -0
- package/dist/chunks/{tab.ZQfGp_FP.js → tab.FUMpPsBP.js} +2 -2
- package/dist/chunks/{tab.ZQfGp_FP.js.map → tab.FUMpPsBP.js.map} +1 -1
- package/dist/chunks/{textarea.DfR2o1lz.js → textarea.riUt0BiI.js} +31 -31
- package/dist/chunks/textarea.riUt0BiI.js.map +1 -0
- package/dist/chunks/{timeline-item.rLqeBsyz.js → timeline-item.CFfW1DoD.js} +16 -15
- package/dist/chunks/{timeline-item.rLqeBsyz.js.map → timeline-item.CFfW1DoD.js.map} +1 -1
- package/dist/chunks/{toast.C7lu_NsX.js → toast.Csv6tMyT.js} +2 -2
- package/dist/chunks/{toast.C7lu_NsX.js.map → toast.Csv6tMyT.js.map} +1 -1
- package/dist/chunks/{tutorial.DA775wec.js → tutorial.D18LwXVy.js} +2 -2
- package/dist/chunks/{tutorial.DA775wec.js.map → tutorial.D18LwXVy.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.DIKJ8yNE.js → use-cached-selected-values.gDWGi5Nk.js} +240 -231
- package/dist/chunks/{use-cached-selected-values.DIKJ8yNE.js.map → use-cached-selected-values.gDWGi5Nk.js.map} +1 -1
- package/dist/chunks/{use-country-items.B3Cd3Tdo.js → use-country-items.ClS_So5N.js} +2 -2
- package/dist/chunks/{use-country-items.B3Cd3Tdo.js.map → use-country-items.ClS_So5N.js.map} +1 -1
- package/dist/chunks/zh-CN.BzH0fIXr.js +389 -0
- package/dist/chunks/zh-CN.BzH0fIXr.js.map +1 -0
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +2 -2
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/dropdown.js +3 -3
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +250 -251
- package/dist/index.js.map +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +10 -10
- package/dist/link.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +0 -1829
- package/dist/styles/bento-light.css +0 -1829
- package/dist/styles/bento.css +0 -1829
- package/dist/styles/legacy.css +0 -1829
- package/dist/styles/styleguide.css +0 -1829
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/tutorial.js +1 -1
- package/package.json +14 -25
- package/dist/@types/components.d.ts +0 -196
- package/dist/@types/use-form-v4.d.ts +0 -86
- package/dist/chunks/calendar.DCLyThOl.js +0 -1832
- package/dist/chunks/calendar.DCLyThOl.js.map +0 -1
- package/dist/chunks/checkbox-input.B0NsfSNR.js.map +0 -1
- package/dist/chunks/code-snippet.1_edHDaZ.js.map +0 -1
- package/dist/chunks/constructNow.BhymNmy5.js +0 -8
- package/dist/chunks/country.types.C0Q_hhgJ.js +0 -269
- package/dist/chunks/date-format.B8RU7D42.js +0 -17
- package/dist/chunks/date-format.B8RU7D42.js.map +0 -1
- package/dist/chunks/date-picker.-a_TXwjx.js.map +0 -1
- package/dist/chunks/date-range-picker.Bw1yPTu-.js +0 -906
- package/dist/chunks/date-range-picker.Bw1yPTu-.js.map +0 -1
- package/dist/chunks/differenceInMonths.Cab3nOsb.js +0 -1590
- package/dist/chunks/differenceInMonths.Cab3nOsb.js.map +0 -1
- package/dist/chunks/es6.MoTTyETW.js +0 -12
- package/dist/chunks/es6.MoTTyETW.js.map +0 -1
- package/dist/chunks/filter-bar.DNA9QblV.js +0 -2472
- package/dist/chunks/filter-bar.DNA9QblV.js.map +0 -1
- package/dist/chunks/fixed-scroller.Ca1ujamx.js +0 -106
- package/dist/chunks/getTimezoneOffsetInMilliseconds.B7sxiukN.js.map +0 -1
- package/dist/chunks/header-meta.C8_W0j_p.js +0 -170
- package/dist/chunks/header-meta.C8_W0j_p.js.map +0 -1
- package/dist/chunks/step.mqn8E6dm.js +0 -217
- package/dist/chunks/step.mqn8E6dm.js.map +0 -1
- package/dist/chunks/textarea.DfR2o1lz.js.map +0 -1
- package/dist/web-types.json +0 -17280
|
@@ -0,0 +1,1693 @@
|
|
|
1
|
+
import { reactive as Oe, defineComponent as nt, useSlots as bt, ref as q, computed as b, onMounted as rt, toRaw as Ee, watch as Me, toRef as qe } from "vue";
|
|
2
|
+
import { g as Mt } from "./index.BDK4hwK_.js";
|
|
3
|
+
import { B as Ot } from "./divider.DX5gwN7p.js";
|
|
4
|
+
import { h as Rt, B as Et } from "./button-actions.D9n7MxWe.js";
|
|
5
|
+
import { B as st, d as We } from "./typography.Bq-EGj9y.js";
|
|
6
|
+
import { B as kt } from "./input-field.hf0_ALq0.js";
|
|
7
|
+
import { B as It } from "./dropdown.C2pXf8Li.js";
|
|
8
|
+
import { B as St } from "./segmented-control.BtWFda0P.js";
|
|
9
|
+
import { ptBR as xt } from "./pt-BR.CiGdfP45.js";
|
|
10
|
+
import { ja as Ct } from "./ja.Cm9tJMi2.js";
|
|
11
|
+
import { fr as Ft } from "./fr.Dj7wEToe.js";
|
|
12
|
+
import { g as ot } from "./en-US.BZii9jNW.js";
|
|
13
|
+
import { de as Nt } from "./de.DvtL0g75.js";
|
|
14
|
+
import { u as ke } from "./index.B6WW_F-J.js";
|
|
15
|
+
import { f as W, h as it, i as Q, j as Yt, k as He, l as At, s as Le, m as Pt, n as he, o as Ge, p as Bt, q as Ut, b as K, u as qt } from "./calendar.C8DpZ4Sr.js";
|
|
16
|
+
import { d as we } from "./debounce.DUTu11PS.js";
|
|
17
|
+
import { u as Wt } from "./use-has-slot.C9lQZ6nz.js";
|
|
18
|
+
import { e as $, a as Qe } from "./differenceInMonths.DcFDl4eH.js";
|
|
19
|
+
import { s as oe } from "./startOfWeek.Dxw2MhGp.js";
|
|
20
|
+
import { f as $e, v as Ht } from "./date-input.BbZqj10S.js";
|
|
21
|
+
import { t as C, c as ie, h as ut, g as Ie, n as Lt } from "./getTimezoneOffsetInMilliseconds.C-aIpRfB.js";
|
|
22
|
+
import { c as Gt } from "./constructNow.DuaJst0D.js";
|
|
23
|
+
import { n as lt } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
24
|
+
import { D as Qt } from "./dropdown-default-textbox.Cq68tN9F.js";
|
|
25
|
+
import { g as pe } from "./generate-uid.NJ8tVoha.js";
|
|
26
|
+
import { u as $t } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
27
|
+
import "./index.Cl4_42j5.js";
|
|
28
|
+
import { u as jt } from "./form-field.D_2g7vaP.js";
|
|
29
|
+
import { B as Xt } from "./directive.Cbdox5VL.js";
|
|
30
|
+
import { F as Kt, E as Vt } from "./field-label.CEkJnsiL.js";
|
|
31
|
+
import { B as Jt } from "./button-actions.types.BptAXjD8.js";
|
|
32
|
+
import "../assets/date-range-picker.css";
|
|
33
|
+
function Se() {
|
|
34
|
+
return {
|
|
35
|
+
de: Nt,
|
|
36
|
+
enUS: ot,
|
|
37
|
+
fr: Ft,
|
|
38
|
+
ja: Ct,
|
|
39
|
+
ptBR: xt
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function se(n) {
|
|
43
|
+
if (n == null)
|
|
44
|
+
return W(/* @__PURE__ */ new Date());
|
|
45
|
+
const [t, e, a] = n.split("-").map((r) => parseInt(r, 10));
|
|
46
|
+
return new Date(t, e - 1, a);
|
|
47
|
+
}
|
|
48
|
+
function ct(n, t, e) {
|
|
49
|
+
return it(n, t * 3, e);
|
|
50
|
+
}
|
|
51
|
+
function Zt(n, t, e) {
|
|
52
|
+
return ct(n, -1, e);
|
|
53
|
+
}
|
|
54
|
+
const zt = ({
|
|
55
|
+
firstDayOfWeek: n,
|
|
56
|
+
min: t,
|
|
57
|
+
max: e
|
|
58
|
+
}) => ({ getGranularCalendarLimits: (r) => {
|
|
59
|
+
if (!t && !e)
|
|
60
|
+
return { min: null, max: null };
|
|
61
|
+
let o = t ? W(t) : null, m = e ? $(e) : null;
|
|
62
|
+
if ((r == null ? void 0 : r.type) === "weekly") {
|
|
63
|
+
if (r.earliest)
|
|
64
|
+
o = W(r.earliest);
|
|
65
|
+
else if (o) {
|
|
66
|
+
const g = oe(o, { weekStartsOn: n });
|
|
67
|
+
Q(o, g) || (o = W(Yt(He(o, { weekStartsOn: n }), 1)));
|
|
68
|
+
}
|
|
69
|
+
if (r.latest)
|
|
70
|
+
m = $(r.latest);
|
|
71
|
+
else if (m) {
|
|
72
|
+
const g = He(m, { weekStartsOn: n });
|
|
73
|
+
Q(m, g) || (m = $(At(oe(m, { weekStartsOn: n }), 1)));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if ((r == null ? void 0 : r.type) === "monthly") {
|
|
77
|
+
if (r.earliest)
|
|
78
|
+
o = W(r.earliest);
|
|
79
|
+
else if (o) {
|
|
80
|
+
const g = Le(o);
|
|
81
|
+
Q(o, g) || (o = Le(it(o, 1)));
|
|
82
|
+
}
|
|
83
|
+
if (r.latest)
|
|
84
|
+
m = $(r.latest);
|
|
85
|
+
else if (m) {
|
|
86
|
+
const g = Qe(m);
|
|
87
|
+
Q(m, g) || (m = Qe(Pt(m, 1)));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if ((r == null ? void 0 : r.type) === "quarterly") {
|
|
91
|
+
if (r.earliest)
|
|
92
|
+
o = he(r.earliest);
|
|
93
|
+
else if (o) {
|
|
94
|
+
const g = he(o);
|
|
95
|
+
Q(o, g) || (o = he(ct(o, 1)));
|
|
96
|
+
}
|
|
97
|
+
if (r.latest)
|
|
98
|
+
m = $(r.latest);
|
|
99
|
+
else if (m) {
|
|
100
|
+
const g = Ge(m);
|
|
101
|
+
Q(m, g) || (m = Ge(Zt(m)));
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return { min: o, max: m };
|
|
105
|
+
} }), ea = () => {
|
|
106
|
+
const n = Oe({
|
|
107
|
+
daily: null,
|
|
108
|
+
weekly: null,
|
|
109
|
+
monthly: null,
|
|
110
|
+
quarterly: null
|
|
111
|
+
});
|
|
112
|
+
return {
|
|
113
|
+
savedRanges: n,
|
|
114
|
+
saveRange: (a, r) => {
|
|
115
|
+
n[a] = r;
|
|
116
|
+
},
|
|
117
|
+
resetSavedRanges: () => {
|
|
118
|
+
n.daily = null, n.weekly = null, n.monthly = null, n.quarterly = null;
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
var w = /* @__PURE__ */ ((n) => (n.CUSTOM_RANGE = "custom-range", n.INPUT = "input", n.ERROR = "error", n.FORM_DATE = "form-date", n.START_DATE_SELECTED = "start-date-selected", n))(w || {}), x = /* @__PURE__ */ ((n) => (n.DAY_OF_MONTH = "d", n.NUMERIC_DAY = "dd", n.SHORT_WEEKDAY = "EEE", n.NUMERIC_MONTH = "MM", n.SHORT_MONTH = "MMM", n.LONG_MONTH = "MMMM", n.LONG_MONTH_YEAR = "MMMM yyyy", n.FULL_YEAR = "yyyy", n.FULL_DATE = "d MMM, yyyy", n.FULL_DATE_MONTH_FIRST = "MMM dd, yyyy", n.NUMERIC_DATE_YEAR_FIRST = "yyyy-MM-dd", n.NUMERIC_DATE_DAY_FIRST = "yyyy-MM-dd", n.MILITARY_HOUR = "HH", n.MINUTES_TWO_DIGITS = "mm", n.SECONDS_TWO_DIGITS = "ss", n.HOUR_MINUTE_SECONDS = "HH:mm:ss", n))(x || {});
|
|
123
|
+
const ta = /[\d]/, aa = /^\d{2}$/, na = /^\d{2}:\d{2}$/, ra = (n) => {
|
|
124
|
+
const { selectionStart: t } = n.target, e = ["Backspace", "Tab", "ArrowLeft", "ArrowRight"], a = ta.test(n.key) || e.includes(n.key), r = [1, 2, 4, 5].includes(t) && n.key === ":";
|
|
125
|
+
!a && !r && n.preventDefault();
|
|
126
|
+
}, je = (n) => {
|
|
127
|
+
if (!n)
|
|
128
|
+
return n;
|
|
129
|
+
let t = n;
|
|
130
|
+
if (t.length === 1 && parseInt(n, 10) > 2)
|
|
131
|
+
return `0${t}:`;
|
|
132
|
+
const [e, a] = t.slice(-2);
|
|
133
|
+
return [2, 5].includes(t.length) && a === ":" && (t = `${t.slice(0, t.length - 2)}0${e}`), (aa.test(t) || na.test(t)) && (t += ":"), t;
|
|
134
|
+
};
|
|
135
|
+
function sa(n, t) {
|
|
136
|
+
const e = C(n, t == null ? void 0 : t.in);
|
|
137
|
+
return Bt(e, Ut(e)) + 1;
|
|
138
|
+
}
|
|
139
|
+
function Re(n, t) {
|
|
140
|
+
return oe(n, { ...t, weekStartsOn: 1 });
|
|
141
|
+
}
|
|
142
|
+
function dt(n, t) {
|
|
143
|
+
const e = C(n, t == null ? void 0 : t.in), a = e.getFullYear(), r = ie(e, 0);
|
|
144
|
+
r.setFullYear(a + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
145
|
+
const o = Re(r), m = ie(e, 0);
|
|
146
|
+
m.setFullYear(a, 0, 4), m.setHours(0, 0, 0, 0);
|
|
147
|
+
const g = Re(m);
|
|
148
|
+
return e.getTime() >= o.getTime() ? a + 1 : e.getTime() >= g.getTime() ? a : a - 1;
|
|
149
|
+
}
|
|
150
|
+
function oa(n, t) {
|
|
151
|
+
const e = dt(n, t), a = ie(n, 0);
|
|
152
|
+
return a.setFullYear(e, 0, 4), a.setHours(0, 0, 0, 0), Re(a);
|
|
153
|
+
}
|
|
154
|
+
function ia(n, t) {
|
|
155
|
+
const e = C(n, t == null ? void 0 : t.in), a = +Re(e) - +oa(e);
|
|
156
|
+
return Math.round(a / ut) + 1;
|
|
157
|
+
}
|
|
158
|
+
function ft(n, t) {
|
|
159
|
+
var v, O, P, i;
|
|
160
|
+
const e = C(n, t == null ? void 0 : t.in), a = e.getFullYear(), r = Ie(), o = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((O = (v = t == null ? void 0 : t.locale) == null ? void 0 : v.options) == null ? void 0 : O.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((i = (P = r.locale) == null ? void 0 : P.options) == null ? void 0 : i.firstWeekContainsDate) ?? 1, m = ie((t == null ? void 0 : t.in) || n, 0);
|
|
161
|
+
m.setFullYear(a + 1, 0, o), m.setHours(0, 0, 0, 0);
|
|
162
|
+
const g = oe(m, t), M = ie((t == null ? void 0 : t.in) || n, 0);
|
|
163
|
+
M.setFullYear(a, 0, o), M.setHours(0, 0, 0, 0);
|
|
164
|
+
const I = oe(M, t);
|
|
165
|
+
return +e >= +g ? a + 1 : +e >= +I ? a : a - 1;
|
|
166
|
+
}
|
|
167
|
+
function ua(n, t) {
|
|
168
|
+
var g, M, I, v;
|
|
169
|
+
const e = Ie(), a = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((M = (g = t == null ? void 0 : t.locale) == null ? void 0 : g.options) == null ? void 0 : M.firstWeekContainsDate) ?? e.firstWeekContainsDate ?? ((v = (I = e.locale) == null ? void 0 : I.options) == null ? void 0 : v.firstWeekContainsDate) ?? 1, r = ft(n, t), o = ie((t == null ? void 0 : t.in) || n, 0);
|
|
170
|
+
return o.setFullYear(r, 0, a), o.setHours(0, 0, 0, 0), oe(o, t);
|
|
171
|
+
}
|
|
172
|
+
function la(n, t) {
|
|
173
|
+
const e = C(n, t == null ? void 0 : t.in), a = +oe(e, t) - +ua(e, t);
|
|
174
|
+
return Math.round(a / ut) + 1;
|
|
175
|
+
}
|
|
176
|
+
function p(n, t) {
|
|
177
|
+
const e = n < 0 ? "-" : "", a = Math.abs(n).toString().padStart(t, "0");
|
|
178
|
+
return e + a;
|
|
179
|
+
}
|
|
180
|
+
const ee = {
|
|
181
|
+
// Year
|
|
182
|
+
y(n, t) {
|
|
183
|
+
const e = n.getFullYear(), a = e > 0 ? e : 1 - e;
|
|
184
|
+
return p(t === "yy" ? a % 100 : a, t.length);
|
|
185
|
+
},
|
|
186
|
+
// Month
|
|
187
|
+
M(n, t) {
|
|
188
|
+
const e = n.getMonth();
|
|
189
|
+
return t === "M" ? String(e + 1) : p(e + 1, 2);
|
|
190
|
+
},
|
|
191
|
+
// Day of the month
|
|
192
|
+
d(n, t) {
|
|
193
|
+
return p(n.getDate(), t.length);
|
|
194
|
+
},
|
|
195
|
+
// AM or PM
|
|
196
|
+
a(n, t) {
|
|
197
|
+
const e = n.getHours() / 12 >= 1 ? "pm" : "am";
|
|
198
|
+
switch (t) {
|
|
199
|
+
case "a":
|
|
200
|
+
case "aa":
|
|
201
|
+
return e.toUpperCase();
|
|
202
|
+
case "aaa":
|
|
203
|
+
return e;
|
|
204
|
+
case "aaaaa":
|
|
205
|
+
return e[0];
|
|
206
|
+
default:
|
|
207
|
+
return e === "am" ? "a.m." : "p.m.";
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
// Hour [1-12]
|
|
211
|
+
h(n, t) {
|
|
212
|
+
return p(n.getHours() % 12 || 12, t.length);
|
|
213
|
+
},
|
|
214
|
+
// Hour [0-23]
|
|
215
|
+
H(n, t) {
|
|
216
|
+
return p(n.getHours(), t.length);
|
|
217
|
+
},
|
|
218
|
+
// Minute
|
|
219
|
+
m(n, t) {
|
|
220
|
+
return p(n.getMinutes(), t.length);
|
|
221
|
+
},
|
|
222
|
+
// Second
|
|
223
|
+
s(n, t) {
|
|
224
|
+
return p(n.getSeconds(), t.length);
|
|
225
|
+
},
|
|
226
|
+
// Fraction of second
|
|
227
|
+
S(n, t) {
|
|
228
|
+
const e = t.length, a = n.getMilliseconds(), r = Math.trunc(
|
|
229
|
+
a * Math.pow(10, e - 3)
|
|
230
|
+
);
|
|
231
|
+
return p(r, t.length);
|
|
232
|
+
}
|
|
233
|
+
}, me = {
|
|
234
|
+
midnight: "midnight",
|
|
235
|
+
noon: "noon",
|
|
236
|
+
morning: "morning",
|
|
237
|
+
afternoon: "afternoon",
|
|
238
|
+
evening: "evening",
|
|
239
|
+
night: "night"
|
|
240
|
+
}, Xe = {
|
|
241
|
+
// Era
|
|
242
|
+
G: function(n, t, e) {
|
|
243
|
+
const a = n.getFullYear() > 0 ? 1 : 0;
|
|
244
|
+
switch (t) {
|
|
245
|
+
// AD, BC
|
|
246
|
+
case "G":
|
|
247
|
+
case "GG":
|
|
248
|
+
case "GGG":
|
|
249
|
+
return e.era(a, { width: "abbreviated" });
|
|
250
|
+
// A, B
|
|
251
|
+
case "GGGGG":
|
|
252
|
+
return e.era(a, { width: "narrow" });
|
|
253
|
+
default:
|
|
254
|
+
return e.era(a, { width: "wide" });
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
// Year
|
|
258
|
+
y: function(n, t, e) {
|
|
259
|
+
if (t === "yo") {
|
|
260
|
+
const a = n.getFullYear(), r = a > 0 ? a : 1 - a;
|
|
261
|
+
return e.ordinalNumber(r, { unit: "year" });
|
|
262
|
+
}
|
|
263
|
+
return ee.y(n, t);
|
|
264
|
+
},
|
|
265
|
+
// Local week-numbering year
|
|
266
|
+
Y: function(n, t, e, a) {
|
|
267
|
+
const r = ft(n, a), o = r > 0 ? r : 1 - r;
|
|
268
|
+
if (t === "YY") {
|
|
269
|
+
const m = o % 100;
|
|
270
|
+
return p(m, 2);
|
|
271
|
+
}
|
|
272
|
+
return t === "Yo" ? e.ordinalNumber(o, { unit: "year" }) : p(o, t.length);
|
|
273
|
+
},
|
|
274
|
+
// ISO week-numbering year
|
|
275
|
+
R: function(n, t) {
|
|
276
|
+
const e = dt(n);
|
|
277
|
+
return p(e, t.length);
|
|
278
|
+
},
|
|
279
|
+
// Extended year. This is a single number designating the year of this calendar system.
|
|
280
|
+
// The main difference between `y` and `u` localizers are B.C. years:
|
|
281
|
+
// | Year | `y` | `u` |
|
|
282
|
+
// |------|-----|-----|
|
|
283
|
+
// | AC 1 | 1 | 1 |
|
|
284
|
+
// | BC 1 | 1 | 0 |
|
|
285
|
+
// | BC 2 | 2 | -1 |
|
|
286
|
+
// Also `yy` always returns the last two digits of a year,
|
|
287
|
+
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
288
|
+
u: function(n, t) {
|
|
289
|
+
const e = n.getFullYear();
|
|
290
|
+
return p(e, t.length);
|
|
291
|
+
},
|
|
292
|
+
// Quarter
|
|
293
|
+
Q: function(n, t, e) {
|
|
294
|
+
const a = Math.ceil((n.getMonth() + 1) / 3);
|
|
295
|
+
switch (t) {
|
|
296
|
+
// 1, 2, 3, 4
|
|
297
|
+
case "Q":
|
|
298
|
+
return String(a);
|
|
299
|
+
// 01, 02, 03, 04
|
|
300
|
+
case "QQ":
|
|
301
|
+
return p(a, 2);
|
|
302
|
+
// 1st, 2nd, 3rd, 4th
|
|
303
|
+
case "Qo":
|
|
304
|
+
return e.ordinalNumber(a, { unit: "quarter" });
|
|
305
|
+
// Q1, Q2, Q3, Q4
|
|
306
|
+
case "QQQ":
|
|
307
|
+
return e.quarter(a, {
|
|
308
|
+
width: "abbreviated",
|
|
309
|
+
context: "formatting"
|
|
310
|
+
});
|
|
311
|
+
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
312
|
+
case "QQQQQ":
|
|
313
|
+
return e.quarter(a, {
|
|
314
|
+
width: "narrow",
|
|
315
|
+
context: "formatting"
|
|
316
|
+
});
|
|
317
|
+
default:
|
|
318
|
+
return e.quarter(a, {
|
|
319
|
+
width: "wide",
|
|
320
|
+
context: "formatting"
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
// Stand-alone quarter
|
|
325
|
+
q: function(n, t, e) {
|
|
326
|
+
const a = Math.ceil((n.getMonth() + 1) / 3);
|
|
327
|
+
switch (t) {
|
|
328
|
+
// 1, 2, 3, 4
|
|
329
|
+
case "q":
|
|
330
|
+
return String(a);
|
|
331
|
+
// 01, 02, 03, 04
|
|
332
|
+
case "qq":
|
|
333
|
+
return p(a, 2);
|
|
334
|
+
// 1st, 2nd, 3rd, 4th
|
|
335
|
+
case "qo":
|
|
336
|
+
return e.ordinalNumber(a, { unit: "quarter" });
|
|
337
|
+
// Q1, Q2, Q3, Q4
|
|
338
|
+
case "qqq":
|
|
339
|
+
return e.quarter(a, {
|
|
340
|
+
width: "abbreviated",
|
|
341
|
+
context: "standalone"
|
|
342
|
+
});
|
|
343
|
+
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
344
|
+
case "qqqqq":
|
|
345
|
+
return e.quarter(a, {
|
|
346
|
+
width: "narrow",
|
|
347
|
+
context: "standalone"
|
|
348
|
+
});
|
|
349
|
+
default:
|
|
350
|
+
return e.quarter(a, {
|
|
351
|
+
width: "wide",
|
|
352
|
+
context: "standalone"
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
// Month
|
|
357
|
+
M: function(n, t, e) {
|
|
358
|
+
const a = n.getMonth();
|
|
359
|
+
switch (t) {
|
|
360
|
+
case "M":
|
|
361
|
+
case "MM":
|
|
362
|
+
return ee.M(n, t);
|
|
363
|
+
// 1st, 2nd, ..., 12th
|
|
364
|
+
case "Mo":
|
|
365
|
+
return e.ordinalNumber(a + 1, { unit: "month" });
|
|
366
|
+
// Jan, Feb, ..., Dec
|
|
367
|
+
case "MMM":
|
|
368
|
+
return e.month(a, {
|
|
369
|
+
width: "abbreviated",
|
|
370
|
+
context: "formatting"
|
|
371
|
+
});
|
|
372
|
+
// J, F, ..., D
|
|
373
|
+
case "MMMMM":
|
|
374
|
+
return e.month(a, {
|
|
375
|
+
width: "narrow",
|
|
376
|
+
context: "formatting"
|
|
377
|
+
});
|
|
378
|
+
default:
|
|
379
|
+
return e.month(a, { width: "wide", context: "formatting" });
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
// Stand-alone month
|
|
383
|
+
L: function(n, t, e) {
|
|
384
|
+
const a = n.getMonth();
|
|
385
|
+
switch (t) {
|
|
386
|
+
// 1, 2, ..., 12
|
|
387
|
+
case "L":
|
|
388
|
+
return String(a + 1);
|
|
389
|
+
// 01, 02, ..., 12
|
|
390
|
+
case "LL":
|
|
391
|
+
return p(a + 1, 2);
|
|
392
|
+
// 1st, 2nd, ..., 12th
|
|
393
|
+
case "Lo":
|
|
394
|
+
return e.ordinalNumber(a + 1, { unit: "month" });
|
|
395
|
+
// Jan, Feb, ..., Dec
|
|
396
|
+
case "LLL":
|
|
397
|
+
return e.month(a, {
|
|
398
|
+
width: "abbreviated",
|
|
399
|
+
context: "standalone"
|
|
400
|
+
});
|
|
401
|
+
// J, F, ..., D
|
|
402
|
+
case "LLLLL":
|
|
403
|
+
return e.month(a, {
|
|
404
|
+
width: "narrow",
|
|
405
|
+
context: "standalone"
|
|
406
|
+
});
|
|
407
|
+
default:
|
|
408
|
+
return e.month(a, { width: "wide", context: "standalone" });
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
// Local week of year
|
|
412
|
+
w: function(n, t, e, a) {
|
|
413
|
+
const r = la(n, a);
|
|
414
|
+
return t === "wo" ? e.ordinalNumber(r, { unit: "week" }) : p(r, t.length);
|
|
415
|
+
},
|
|
416
|
+
// ISO week of year
|
|
417
|
+
I: function(n, t, e) {
|
|
418
|
+
const a = ia(n);
|
|
419
|
+
return t === "Io" ? e.ordinalNumber(a, { unit: "week" }) : p(a, t.length);
|
|
420
|
+
},
|
|
421
|
+
// Day of the month
|
|
422
|
+
d: function(n, t, e) {
|
|
423
|
+
return t === "do" ? e.ordinalNumber(n.getDate(), { unit: "date" }) : ee.d(n, t);
|
|
424
|
+
},
|
|
425
|
+
// Day of year
|
|
426
|
+
D: function(n, t, e) {
|
|
427
|
+
const a = sa(n);
|
|
428
|
+
return t === "Do" ? e.ordinalNumber(a, { unit: "dayOfYear" }) : p(a, t.length);
|
|
429
|
+
},
|
|
430
|
+
// Day of week
|
|
431
|
+
E: function(n, t, e) {
|
|
432
|
+
const a = n.getDay();
|
|
433
|
+
switch (t) {
|
|
434
|
+
// Tue
|
|
435
|
+
case "E":
|
|
436
|
+
case "EE":
|
|
437
|
+
case "EEE":
|
|
438
|
+
return e.day(a, {
|
|
439
|
+
width: "abbreviated",
|
|
440
|
+
context: "formatting"
|
|
441
|
+
});
|
|
442
|
+
// T
|
|
443
|
+
case "EEEEE":
|
|
444
|
+
return e.day(a, {
|
|
445
|
+
width: "narrow",
|
|
446
|
+
context: "formatting"
|
|
447
|
+
});
|
|
448
|
+
// Tu
|
|
449
|
+
case "EEEEEE":
|
|
450
|
+
return e.day(a, {
|
|
451
|
+
width: "short",
|
|
452
|
+
context: "formatting"
|
|
453
|
+
});
|
|
454
|
+
default:
|
|
455
|
+
return e.day(a, {
|
|
456
|
+
width: "wide",
|
|
457
|
+
context: "formatting"
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
// Local day of week
|
|
462
|
+
e: function(n, t, e, a) {
|
|
463
|
+
const r = n.getDay(), o = (r - a.weekStartsOn + 8) % 7 || 7;
|
|
464
|
+
switch (t) {
|
|
465
|
+
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
466
|
+
case "e":
|
|
467
|
+
return String(o);
|
|
468
|
+
// Padded numerical value
|
|
469
|
+
case "ee":
|
|
470
|
+
return p(o, 2);
|
|
471
|
+
// 1st, 2nd, ..., 7th
|
|
472
|
+
case "eo":
|
|
473
|
+
return e.ordinalNumber(o, { unit: "day" });
|
|
474
|
+
case "eee":
|
|
475
|
+
return e.day(r, {
|
|
476
|
+
width: "abbreviated",
|
|
477
|
+
context: "formatting"
|
|
478
|
+
});
|
|
479
|
+
// T
|
|
480
|
+
case "eeeee":
|
|
481
|
+
return e.day(r, {
|
|
482
|
+
width: "narrow",
|
|
483
|
+
context: "formatting"
|
|
484
|
+
});
|
|
485
|
+
// Tu
|
|
486
|
+
case "eeeeee":
|
|
487
|
+
return e.day(r, {
|
|
488
|
+
width: "short",
|
|
489
|
+
context: "formatting"
|
|
490
|
+
});
|
|
491
|
+
default:
|
|
492
|
+
return e.day(r, {
|
|
493
|
+
width: "wide",
|
|
494
|
+
context: "formatting"
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
// Stand-alone local day of week
|
|
499
|
+
c: function(n, t, e, a) {
|
|
500
|
+
const r = n.getDay(), o = (r - a.weekStartsOn + 8) % 7 || 7;
|
|
501
|
+
switch (t) {
|
|
502
|
+
// Numerical value (same as in `e`)
|
|
503
|
+
case "c":
|
|
504
|
+
return String(o);
|
|
505
|
+
// Padded numerical value
|
|
506
|
+
case "cc":
|
|
507
|
+
return p(o, t.length);
|
|
508
|
+
// 1st, 2nd, ..., 7th
|
|
509
|
+
case "co":
|
|
510
|
+
return e.ordinalNumber(o, { unit: "day" });
|
|
511
|
+
case "ccc":
|
|
512
|
+
return e.day(r, {
|
|
513
|
+
width: "abbreviated",
|
|
514
|
+
context: "standalone"
|
|
515
|
+
});
|
|
516
|
+
// T
|
|
517
|
+
case "ccccc":
|
|
518
|
+
return e.day(r, {
|
|
519
|
+
width: "narrow",
|
|
520
|
+
context: "standalone"
|
|
521
|
+
});
|
|
522
|
+
// Tu
|
|
523
|
+
case "cccccc":
|
|
524
|
+
return e.day(r, {
|
|
525
|
+
width: "short",
|
|
526
|
+
context: "standalone"
|
|
527
|
+
});
|
|
528
|
+
default:
|
|
529
|
+
return e.day(r, {
|
|
530
|
+
width: "wide",
|
|
531
|
+
context: "standalone"
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
// ISO day of week
|
|
536
|
+
i: function(n, t, e) {
|
|
537
|
+
const a = n.getDay(), r = a === 0 ? 7 : a;
|
|
538
|
+
switch (t) {
|
|
539
|
+
// 2
|
|
540
|
+
case "i":
|
|
541
|
+
return String(r);
|
|
542
|
+
// 02
|
|
543
|
+
case "ii":
|
|
544
|
+
return p(r, t.length);
|
|
545
|
+
// 2nd
|
|
546
|
+
case "io":
|
|
547
|
+
return e.ordinalNumber(r, { unit: "day" });
|
|
548
|
+
// Tue
|
|
549
|
+
case "iii":
|
|
550
|
+
return e.day(a, {
|
|
551
|
+
width: "abbreviated",
|
|
552
|
+
context: "formatting"
|
|
553
|
+
});
|
|
554
|
+
// T
|
|
555
|
+
case "iiiii":
|
|
556
|
+
return e.day(a, {
|
|
557
|
+
width: "narrow",
|
|
558
|
+
context: "formatting"
|
|
559
|
+
});
|
|
560
|
+
// Tu
|
|
561
|
+
case "iiiiii":
|
|
562
|
+
return e.day(a, {
|
|
563
|
+
width: "short",
|
|
564
|
+
context: "formatting"
|
|
565
|
+
});
|
|
566
|
+
default:
|
|
567
|
+
return e.day(a, {
|
|
568
|
+
width: "wide",
|
|
569
|
+
context: "formatting"
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
// AM or PM
|
|
574
|
+
a: function(n, t, e) {
|
|
575
|
+
const r = n.getHours() / 12 >= 1 ? "pm" : "am";
|
|
576
|
+
switch (t) {
|
|
577
|
+
case "a":
|
|
578
|
+
case "aa":
|
|
579
|
+
return e.dayPeriod(r, {
|
|
580
|
+
width: "abbreviated",
|
|
581
|
+
context: "formatting"
|
|
582
|
+
});
|
|
583
|
+
case "aaa":
|
|
584
|
+
return e.dayPeriod(r, {
|
|
585
|
+
width: "abbreviated",
|
|
586
|
+
context: "formatting"
|
|
587
|
+
}).toLowerCase();
|
|
588
|
+
case "aaaaa":
|
|
589
|
+
return e.dayPeriod(r, {
|
|
590
|
+
width: "narrow",
|
|
591
|
+
context: "formatting"
|
|
592
|
+
});
|
|
593
|
+
default:
|
|
594
|
+
return e.dayPeriod(r, {
|
|
595
|
+
width: "wide",
|
|
596
|
+
context: "formatting"
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
},
|
|
600
|
+
// AM, PM, midnight, noon
|
|
601
|
+
b: function(n, t, e) {
|
|
602
|
+
const a = n.getHours();
|
|
603
|
+
let r;
|
|
604
|
+
switch (a === 12 ? r = me.noon : a === 0 ? r = me.midnight : r = a / 12 >= 1 ? "pm" : "am", t) {
|
|
605
|
+
case "b":
|
|
606
|
+
case "bb":
|
|
607
|
+
return e.dayPeriod(r, {
|
|
608
|
+
width: "abbreviated",
|
|
609
|
+
context: "formatting"
|
|
610
|
+
});
|
|
611
|
+
case "bbb":
|
|
612
|
+
return e.dayPeriod(r, {
|
|
613
|
+
width: "abbreviated",
|
|
614
|
+
context: "formatting"
|
|
615
|
+
}).toLowerCase();
|
|
616
|
+
case "bbbbb":
|
|
617
|
+
return e.dayPeriod(r, {
|
|
618
|
+
width: "narrow",
|
|
619
|
+
context: "formatting"
|
|
620
|
+
});
|
|
621
|
+
default:
|
|
622
|
+
return e.dayPeriod(r, {
|
|
623
|
+
width: "wide",
|
|
624
|
+
context: "formatting"
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
// in the morning, in the afternoon, in the evening, at night
|
|
629
|
+
B: function(n, t, e) {
|
|
630
|
+
const a = n.getHours();
|
|
631
|
+
let r;
|
|
632
|
+
switch (a >= 17 ? r = me.evening : a >= 12 ? r = me.afternoon : a >= 4 ? r = me.morning : r = me.night, t) {
|
|
633
|
+
case "B":
|
|
634
|
+
case "BB":
|
|
635
|
+
case "BBB":
|
|
636
|
+
return e.dayPeriod(r, {
|
|
637
|
+
width: "abbreviated",
|
|
638
|
+
context: "formatting"
|
|
639
|
+
});
|
|
640
|
+
case "BBBBB":
|
|
641
|
+
return e.dayPeriod(r, {
|
|
642
|
+
width: "narrow",
|
|
643
|
+
context: "formatting"
|
|
644
|
+
});
|
|
645
|
+
default:
|
|
646
|
+
return e.dayPeriod(r, {
|
|
647
|
+
width: "wide",
|
|
648
|
+
context: "formatting"
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
},
|
|
652
|
+
// Hour [1-12]
|
|
653
|
+
h: function(n, t, e) {
|
|
654
|
+
if (t === "ho") {
|
|
655
|
+
let a = n.getHours() % 12;
|
|
656
|
+
return a === 0 && (a = 12), e.ordinalNumber(a, { unit: "hour" });
|
|
657
|
+
}
|
|
658
|
+
return ee.h(n, t);
|
|
659
|
+
},
|
|
660
|
+
// Hour [0-23]
|
|
661
|
+
H: function(n, t, e) {
|
|
662
|
+
return t === "Ho" ? e.ordinalNumber(n.getHours(), { unit: "hour" }) : ee.H(n, t);
|
|
663
|
+
},
|
|
664
|
+
// Hour [0-11]
|
|
665
|
+
K: function(n, t, e) {
|
|
666
|
+
const a = n.getHours() % 12;
|
|
667
|
+
return t === "Ko" ? e.ordinalNumber(a, { unit: "hour" }) : p(a, t.length);
|
|
668
|
+
},
|
|
669
|
+
// Hour [1-24]
|
|
670
|
+
k: function(n, t, e) {
|
|
671
|
+
let a = n.getHours();
|
|
672
|
+
return a === 0 && (a = 24), t === "ko" ? e.ordinalNumber(a, { unit: "hour" }) : p(a, t.length);
|
|
673
|
+
},
|
|
674
|
+
// Minute
|
|
675
|
+
m: function(n, t, e) {
|
|
676
|
+
return t === "mo" ? e.ordinalNumber(n.getMinutes(), { unit: "minute" }) : ee.m(n, t);
|
|
677
|
+
},
|
|
678
|
+
// Second
|
|
679
|
+
s: function(n, t, e) {
|
|
680
|
+
return t === "so" ? e.ordinalNumber(n.getSeconds(), { unit: "second" }) : ee.s(n, t);
|
|
681
|
+
},
|
|
682
|
+
// Fraction of second
|
|
683
|
+
S: function(n, t) {
|
|
684
|
+
return ee.S(n, t);
|
|
685
|
+
},
|
|
686
|
+
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
687
|
+
X: function(n, t, e) {
|
|
688
|
+
const a = n.getTimezoneOffset();
|
|
689
|
+
if (a === 0)
|
|
690
|
+
return "Z";
|
|
691
|
+
switch (t) {
|
|
692
|
+
// Hours and optional minutes
|
|
693
|
+
case "X":
|
|
694
|
+
return Ve(a);
|
|
695
|
+
// Hours, minutes and optional seconds without `:` delimiter
|
|
696
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
697
|
+
// so this token always has the same output as `XX`
|
|
698
|
+
case "XXXX":
|
|
699
|
+
case "XX":
|
|
700
|
+
return re(a);
|
|
701
|
+
// Hours and minutes with `:` delimiter
|
|
702
|
+
default:
|
|
703
|
+
return re(a, ":");
|
|
704
|
+
}
|
|
705
|
+
},
|
|
706
|
+
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
707
|
+
x: function(n, t, e) {
|
|
708
|
+
const a = n.getTimezoneOffset();
|
|
709
|
+
switch (t) {
|
|
710
|
+
// Hours and optional minutes
|
|
711
|
+
case "x":
|
|
712
|
+
return Ve(a);
|
|
713
|
+
// Hours, minutes and optional seconds without `:` delimiter
|
|
714
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
715
|
+
// so this token always has the same output as `xx`
|
|
716
|
+
case "xxxx":
|
|
717
|
+
case "xx":
|
|
718
|
+
return re(a);
|
|
719
|
+
// Hours and minutes with `:` delimiter
|
|
720
|
+
default:
|
|
721
|
+
return re(a, ":");
|
|
722
|
+
}
|
|
723
|
+
},
|
|
724
|
+
// Timezone (GMT)
|
|
725
|
+
O: function(n, t, e) {
|
|
726
|
+
const a = n.getTimezoneOffset();
|
|
727
|
+
switch (t) {
|
|
728
|
+
// Short
|
|
729
|
+
case "O":
|
|
730
|
+
case "OO":
|
|
731
|
+
case "OOO":
|
|
732
|
+
return "GMT" + Ke(a, ":");
|
|
733
|
+
default:
|
|
734
|
+
return "GMT" + re(a, ":");
|
|
735
|
+
}
|
|
736
|
+
},
|
|
737
|
+
// Timezone (specific non-location)
|
|
738
|
+
z: function(n, t, e) {
|
|
739
|
+
const a = n.getTimezoneOffset();
|
|
740
|
+
switch (t) {
|
|
741
|
+
// Short
|
|
742
|
+
case "z":
|
|
743
|
+
case "zz":
|
|
744
|
+
case "zzz":
|
|
745
|
+
return "GMT" + Ke(a, ":");
|
|
746
|
+
default:
|
|
747
|
+
return "GMT" + re(a, ":");
|
|
748
|
+
}
|
|
749
|
+
},
|
|
750
|
+
// Seconds timestamp
|
|
751
|
+
t: function(n, t, e) {
|
|
752
|
+
const a = Math.trunc(+n / 1e3);
|
|
753
|
+
return p(a, t.length);
|
|
754
|
+
},
|
|
755
|
+
// Milliseconds timestamp
|
|
756
|
+
T: function(n, t, e) {
|
|
757
|
+
return p(+n, t.length);
|
|
758
|
+
}
|
|
759
|
+
};
|
|
760
|
+
function Ke(n, t = "") {
|
|
761
|
+
const e = n > 0 ? "-" : "+", a = Math.abs(n), r = Math.trunc(a / 60), o = a % 60;
|
|
762
|
+
return o === 0 ? e + String(r) : e + String(r) + t + p(o, 2);
|
|
763
|
+
}
|
|
764
|
+
function Ve(n, t) {
|
|
765
|
+
return n % 60 === 0 ? (n > 0 ? "-" : "+") + p(Math.abs(n) / 60, 2) : re(n, t);
|
|
766
|
+
}
|
|
767
|
+
function re(n, t = "") {
|
|
768
|
+
const e = n > 0 ? "-" : "+", a = Math.abs(n), r = p(Math.trunc(a / 60), 2), o = p(a % 60, 2);
|
|
769
|
+
return e + r + t + o;
|
|
770
|
+
}
|
|
771
|
+
const Je = (n, t) => {
|
|
772
|
+
switch (n) {
|
|
773
|
+
case "P":
|
|
774
|
+
return t.date({ width: "short" });
|
|
775
|
+
case "PP":
|
|
776
|
+
return t.date({ width: "medium" });
|
|
777
|
+
case "PPP":
|
|
778
|
+
return t.date({ width: "long" });
|
|
779
|
+
default:
|
|
780
|
+
return t.date({ width: "full" });
|
|
781
|
+
}
|
|
782
|
+
}, mt = (n, t) => {
|
|
783
|
+
switch (n) {
|
|
784
|
+
case "p":
|
|
785
|
+
return t.time({ width: "short" });
|
|
786
|
+
case "pp":
|
|
787
|
+
return t.time({ width: "medium" });
|
|
788
|
+
case "ppp":
|
|
789
|
+
return t.time({ width: "long" });
|
|
790
|
+
default:
|
|
791
|
+
return t.time({ width: "full" });
|
|
792
|
+
}
|
|
793
|
+
}, ca = (n, t) => {
|
|
794
|
+
const e = n.match(/(P+)(p+)?/) || [], a = e[1], r = e[2];
|
|
795
|
+
if (!r)
|
|
796
|
+
return Je(n, t);
|
|
797
|
+
let o;
|
|
798
|
+
switch (a) {
|
|
799
|
+
case "P":
|
|
800
|
+
o = t.dateTime({ width: "short" });
|
|
801
|
+
break;
|
|
802
|
+
case "PP":
|
|
803
|
+
o = t.dateTime({ width: "medium" });
|
|
804
|
+
break;
|
|
805
|
+
case "PPP":
|
|
806
|
+
o = t.dateTime({ width: "long" });
|
|
807
|
+
break;
|
|
808
|
+
default:
|
|
809
|
+
o = t.dateTime({ width: "full" });
|
|
810
|
+
break;
|
|
811
|
+
}
|
|
812
|
+
return o.replace("{{date}}", Je(a, t)).replace("{{time}}", mt(r, t));
|
|
813
|
+
}, da = {
|
|
814
|
+
p: mt,
|
|
815
|
+
P: ca
|
|
816
|
+
}, fa = /^D+$/, ma = /^Y+$/, Da = ["D", "DD", "YY", "YYYY"];
|
|
817
|
+
function ga(n) {
|
|
818
|
+
return fa.test(n);
|
|
819
|
+
}
|
|
820
|
+
function pa(n) {
|
|
821
|
+
return ma.test(n);
|
|
822
|
+
}
|
|
823
|
+
function ha(n, t, e) {
|
|
824
|
+
const a = ya(n, t, e);
|
|
825
|
+
if (console.warn(a), Da.includes(n)) throw new RangeError(a);
|
|
826
|
+
}
|
|
827
|
+
function ya(n, t, e) {
|
|
828
|
+
const a = n[0] === "Y" ? "years" : "days of the month";
|
|
829
|
+
return `Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${a} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
830
|
+
}
|
|
831
|
+
function va(n) {
|
|
832
|
+
return n instanceof Date || typeof n == "object" && Object.prototype.toString.call(n) === "[object Date]";
|
|
833
|
+
}
|
|
834
|
+
function Ta(n) {
|
|
835
|
+
return !(!va(n) && typeof n != "number" || isNaN(+C(n)));
|
|
836
|
+
}
|
|
837
|
+
const _a = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, wa = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, ba = /^'([^]*?)'?$/, Ma = /''/g, Oa = /[a-zA-Z]/;
|
|
838
|
+
function De(n, t, e) {
|
|
839
|
+
var v, O, P, i, f, h, H, F;
|
|
840
|
+
const a = Ie(), r = (e == null ? void 0 : e.locale) ?? a.locale ?? ot, o = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((O = (v = e == null ? void 0 : e.locale) == null ? void 0 : v.options) == null ? void 0 : O.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((i = (P = a.locale) == null ? void 0 : P.options) == null ? void 0 : i.firstWeekContainsDate) ?? 1, m = (e == null ? void 0 : e.weekStartsOn) ?? ((h = (f = e == null ? void 0 : e.locale) == null ? void 0 : f.options) == null ? void 0 : h.weekStartsOn) ?? a.weekStartsOn ?? ((F = (H = a.locale) == null ? void 0 : H.options) == null ? void 0 : F.weekStartsOn) ?? 0, g = C(n, e == null ? void 0 : e.in);
|
|
841
|
+
if (!Ta(g))
|
|
842
|
+
throw new RangeError("Invalid time value");
|
|
843
|
+
let M = t.match(wa).map((T) => {
|
|
844
|
+
const _ = T[0];
|
|
845
|
+
if (_ === "p" || _ === "P") {
|
|
846
|
+
const B = da[_];
|
|
847
|
+
return B(T, r.formatLong);
|
|
848
|
+
}
|
|
849
|
+
return T;
|
|
850
|
+
}).join("").match(_a).map((T) => {
|
|
851
|
+
if (T === "''")
|
|
852
|
+
return { isToken: !1, value: "'" };
|
|
853
|
+
const _ = T[0];
|
|
854
|
+
if (_ === "'")
|
|
855
|
+
return { isToken: !1, value: Ra(T) };
|
|
856
|
+
if (Xe[_])
|
|
857
|
+
return { isToken: !0, value: T };
|
|
858
|
+
if (_.match(Oa))
|
|
859
|
+
throw new RangeError(
|
|
860
|
+
"Format string contains an unescaped latin alphabet character `" + _ + "`"
|
|
861
|
+
);
|
|
862
|
+
return { isToken: !1, value: T };
|
|
863
|
+
});
|
|
864
|
+
r.localize.preprocessor && (M = r.localize.preprocessor(g, M));
|
|
865
|
+
const I = {
|
|
866
|
+
firstWeekContainsDate: o,
|
|
867
|
+
weekStartsOn: m,
|
|
868
|
+
locale: r
|
|
869
|
+
};
|
|
870
|
+
return M.map((T) => {
|
|
871
|
+
if (!T.isToken) return T.value;
|
|
872
|
+
const _ = T.value;
|
|
873
|
+
(!(e != null && e.useAdditionalWeekYearTokens) && pa(_) || !(e != null && e.useAdditionalDayOfYearTokens) && ga(_)) && ha(_, t, String(n));
|
|
874
|
+
const B = Xe[_[0]];
|
|
875
|
+
return B(g, _, r.localize, I);
|
|
876
|
+
}).join("");
|
|
877
|
+
}
|
|
878
|
+
function Ra(n) {
|
|
879
|
+
const t = n.match(ba);
|
|
880
|
+
return t ? t[1].replace(Ma, "'") : n;
|
|
881
|
+
}
|
|
882
|
+
function Ea(n, t, e) {
|
|
883
|
+
const a = C(n, e == null ? void 0 : e.in);
|
|
884
|
+
return a.setHours(t), a;
|
|
885
|
+
}
|
|
886
|
+
function ka(n, t, e) {
|
|
887
|
+
const a = C(n, e == null ? void 0 : e.in);
|
|
888
|
+
return a.setMinutes(t), a;
|
|
889
|
+
}
|
|
890
|
+
function Ia(n, t, e) {
|
|
891
|
+
const a = C(n, e == null ? void 0 : e.in);
|
|
892
|
+
return a.setSeconds(t), a;
|
|
893
|
+
}
|
|
894
|
+
function Ze(n, t) {
|
|
895
|
+
const e = C(n, t == null ? void 0 : t.in);
|
|
896
|
+
return e.setMilliseconds(0), e;
|
|
897
|
+
}
|
|
898
|
+
function ze(n, t) {
|
|
899
|
+
return +Ze(n) == +Ze(t);
|
|
900
|
+
}
|
|
901
|
+
function be(n, t) {
|
|
902
|
+
return +C(n) == +C(t);
|
|
903
|
+
}
|
|
904
|
+
function Sa(n, t) {
|
|
905
|
+
return Q(
|
|
906
|
+
ie(n, n),
|
|
907
|
+
Gt(n)
|
|
908
|
+
);
|
|
909
|
+
}
|
|
910
|
+
function et(n, t, e) {
|
|
911
|
+
const a = C(n, e == null ? void 0 : e.in);
|
|
912
|
+
return a.setMilliseconds(t), a;
|
|
913
|
+
}
|
|
914
|
+
const xa = {
|
|
915
|
+
"en-US": {
|
|
916
|
+
customRange: "Custom range",
|
|
917
|
+
daily: "Daily",
|
|
918
|
+
dateFrom: "Date from",
|
|
919
|
+
dateTo: "Date to",
|
|
920
|
+
lastMonth: "Last month",
|
|
921
|
+
lastSevenDays: "Last 7 days",
|
|
922
|
+
lastThreeMonths: "Last three months",
|
|
923
|
+
monthly: "Monthly",
|
|
924
|
+
quarterly: "Quarterly",
|
|
925
|
+
timeFrom: "Time from",
|
|
926
|
+
timeTo: "Time to",
|
|
927
|
+
weekly: "Weekly"
|
|
928
|
+
},
|
|
929
|
+
"ja-JP": {
|
|
930
|
+
customRange: "カスタム範囲",
|
|
931
|
+
daily: "毎日",
|
|
932
|
+
dateFrom: "開始日",
|
|
933
|
+
dateTo: "日付まで",
|
|
934
|
+
lastMonth: "先月",
|
|
935
|
+
lastSevenDays: "過去7日間",
|
|
936
|
+
lastThreeMonths: "過去3か月",
|
|
937
|
+
monthly: "毎月",
|
|
938
|
+
quarterly: "毎四半期",
|
|
939
|
+
timeFrom: "開始時刻",
|
|
940
|
+
timeTo: "終了時刻",
|
|
941
|
+
weekly: "毎週"
|
|
942
|
+
},
|
|
943
|
+
"pt-BR": {
|
|
944
|
+
customRange: "Intervalo personalizado",
|
|
945
|
+
daily: "Diária",
|
|
946
|
+
dateFrom: "Data a partir de",
|
|
947
|
+
dateTo: "Data até",
|
|
948
|
+
lastMonth: "Último mês",
|
|
949
|
+
lastSevenDays: "Últimos 7 dias",
|
|
950
|
+
lastThreeMonths: "Últimos 3 meses",
|
|
951
|
+
monthly: "Mensal",
|
|
952
|
+
quarterly: "Trimestral",
|
|
953
|
+
timeFrom: "Horário a partir de",
|
|
954
|
+
timeTo: "Hora de",
|
|
955
|
+
weekly: "Semanal"
|
|
956
|
+
}
|
|
957
|
+
}, Ca = {
|
|
958
|
+
name: "date-range-picker-calendar",
|
|
959
|
+
i18n: { messages: xa }
|
|
960
|
+
}, Fa = /* @__PURE__ */ nt({
|
|
961
|
+
...Ca,
|
|
962
|
+
props: {
|
|
963
|
+
/**
|
|
964
|
+
* Allows user to enter time values in the form
|
|
965
|
+
*/
|
|
966
|
+
allowTimeInput: { type: Boolean, default: !1 },
|
|
967
|
+
/**
|
|
968
|
+
* Ranges form persistance data
|
|
969
|
+
*/
|
|
970
|
+
dateFormData: {
|
|
971
|
+
type: Object,
|
|
972
|
+
default: () => ({ startDate: void 0, endDate: void 0, startTime: void 0, endTime: void 0 })
|
|
973
|
+
},
|
|
974
|
+
/**
|
|
975
|
+
* Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
|
|
976
|
+
*/
|
|
977
|
+
firstDayOfWeek: K.props.firstDayOfWeek,
|
|
978
|
+
/**
|
|
979
|
+
* A list of available granularities.
|
|
980
|
+
* If present, the date picker will display a segmented control to change granularity.
|
|
981
|
+
*/
|
|
982
|
+
granularities: {
|
|
983
|
+
type: Array,
|
|
984
|
+
default: null
|
|
985
|
+
},
|
|
986
|
+
/**
|
|
987
|
+
* Indicate if a date should be disabled or not
|
|
988
|
+
*/
|
|
989
|
+
isDateDisabled: K.props.isDateDisabled,
|
|
990
|
+
/**
|
|
991
|
+
* Set a maximum number of dates to be selectable by the range.
|
|
992
|
+
*/
|
|
993
|
+
maxRange: K.props.maxRange,
|
|
994
|
+
/**
|
|
995
|
+
* Sets a minimum limit for selectable dates - dates before `min` will not be selectable
|
|
996
|
+
*/
|
|
997
|
+
min: K.props.min,
|
|
998
|
+
/**
|
|
999
|
+
* Sets a maximum limit for selectable dates - dates after `max` will not be selectable
|
|
1000
|
+
*/
|
|
1001
|
+
max: K.props.max,
|
|
1002
|
+
/**
|
|
1003
|
+
* Number of months rendered on pane
|
|
1004
|
+
*/
|
|
1005
|
+
numberOfMonths: {
|
|
1006
|
+
type: K.props.numberOfMonths.type,
|
|
1007
|
+
default: K.props.numberOfMonths.default,
|
|
1008
|
+
validator: (n) => n >= 0
|
|
1009
|
+
},
|
|
1010
|
+
/**
|
|
1011
|
+
* Displays the end date's month when the calendar is opened. Defaults to false i.e. the start date's month is displayed.
|
|
1012
|
+
*/
|
|
1013
|
+
showEndDateOnOpen: { type: Boolean, default: !1 },
|
|
1014
|
+
/**
|
|
1015
|
+
* Enables the custom range selector.
|
|
1016
|
+
* If provided, must be an array that sets the custom range dropdown items. Items are of the structure:
|
|
1017
|
+
* `label` - label of custom range item.
|
|
1018
|
+
* `value` - a unique key of the custom range item.
|
|
1019
|
+
* `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.
|
|
1020
|
+
*/
|
|
1021
|
+
quickSelectRanges: {
|
|
1022
|
+
type: Array,
|
|
1023
|
+
default: void 0
|
|
1024
|
+
},
|
|
1025
|
+
/**
|
|
1026
|
+
* Selected date
|
|
1027
|
+
*/
|
|
1028
|
+
value: { type: Object, default: void 0 },
|
|
1029
|
+
/**
|
|
1030
|
+
* The type of calendar to display. Defaults to showing days.
|
|
1031
|
+
*/
|
|
1032
|
+
variant: K.props.variant
|
|
1033
|
+
},
|
|
1034
|
+
emits: [
|
|
1035
|
+
w.CUSTOM_RANGE,
|
|
1036
|
+
w.INPUT,
|
|
1037
|
+
w.ERROR,
|
|
1038
|
+
w.FORM_DATE,
|
|
1039
|
+
w.START_DATE_SELECTED
|
|
1040
|
+
],
|
|
1041
|
+
setup(n, { emit: t }) {
|
|
1042
|
+
var Ae, Pe, Be, Ue;
|
|
1043
|
+
const e = n, a = 300, r = "customRange", o = bt(), m = Wt(o), { locale: g, t: M } = ke(), I = Se(), v = q({}), O = b(() => e.variant === "month" ? "monthly" : "daily"), P = b(() => e.numberOfMonths === 0), i = Oe({
|
|
1044
|
+
startDate: (Ae = e.value) == null ? void 0 : Ae.startDate,
|
|
1045
|
+
endDate: (Pe = e.value) == null ? void 0 : Pe.endDate,
|
|
1046
|
+
range: (Be = e.value) == null ? void 0 : Be.range,
|
|
1047
|
+
...e.granularities ? {
|
|
1048
|
+
granularity: ((Ue = e.value) == null ? void 0 : Ue.granularity) || O.value
|
|
1049
|
+
} : {}
|
|
1050
|
+
});
|
|
1051
|
+
function f(s) {
|
|
1052
|
+
return s ? new Date(
|
|
1053
|
+
s.getUTCFullYear(),
|
|
1054
|
+
s.getUTCMonth(),
|
|
1055
|
+
s.getUTCDate(),
|
|
1056
|
+
s.getUTCHours(),
|
|
1057
|
+
s.getUTCMinutes(),
|
|
1058
|
+
s.getUTCSeconds()
|
|
1059
|
+
) : null;
|
|
1060
|
+
}
|
|
1061
|
+
const h = b(() => {
|
|
1062
|
+
var s, u;
|
|
1063
|
+
return (
|
|
1064
|
+
// eslint-disable-next-line consistent-return
|
|
1065
|
+
((u = (s = e == null ? void 0 : e.quickSelectRanges) == null ? void 0 : s.find(({ value: D, data: d }) => {
|
|
1066
|
+
var S;
|
|
1067
|
+
if (!d.endDate) {
|
|
1068
|
+
if (d.isRelativeToNow) {
|
|
1069
|
+
const A = (S = v.value) == null ? void 0 : S[D];
|
|
1070
|
+
return A ? be(
|
|
1071
|
+
f(A.startDate),
|
|
1072
|
+
f(i.startDate)
|
|
1073
|
+
) && be(
|
|
1074
|
+
f(A.endDate),
|
|
1075
|
+
f(i.endDate)
|
|
1076
|
+
) : (
|
|
1077
|
+
// If not stored calculated dates, fall back to comparing the quick select item's value
|
|
1078
|
+
// with the internal range's stored range identifier.
|
|
1079
|
+
D === i.range
|
|
1080
|
+
);
|
|
1081
|
+
}
|
|
1082
|
+
return be(f(d.startDate), f(i.startDate)) && be(
|
|
1083
|
+
f(i.endDate),
|
|
1084
|
+
f($(i.endDate))
|
|
1085
|
+
) && Sa(f(i.endDate)) && (e.granularities ? d.granularity === i.granularity : !0);
|
|
1086
|
+
}
|
|
1087
|
+
if (e.allowTimeInput)
|
|
1088
|
+
return ze(f(d.startDate), f(i.startDate)) && ze(f(d.endDate), f(i.endDate)) && (e.granularities ? d.granularity === i.granularity : !0);
|
|
1089
|
+
if (d.endDate)
|
|
1090
|
+
return Q(d.startDate, i.startDate) && Q(d.endDate, i.endDate) && (e.granularities ? d.granularity === i.granularity : !0);
|
|
1091
|
+
})) == null ? void 0 : u.value) ?? r
|
|
1092
|
+
);
|
|
1093
|
+
}), H = b(() => ({
|
|
1094
|
+
"b-date-range-picker-calendar__form-input-wrapper": e.allowTimeInput
|
|
1095
|
+
})), F = b(() => [
|
|
1096
|
+
{ label: M("customRange"), value: r },
|
|
1097
|
+
...e.quickSelectRanges ? e.quickSelectRanges : []
|
|
1098
|
+
]), T = b(
|
|
1099
|
+
() => {
|
|
1100
|
+
var s;
|
|
1101
|
+
return ((s = e.granularities) == null ? void 0 : s.find(({ type: u }) => u === i.granularity)) || null;
|
|
1102
|
+
}
|
|
1103
|
+
), _ = b(
|
|
1104
|
+
() => {
|
|
1105
|
+
var s;
|
|
1106
|
+
return ((s = e.granularities) == null ? void 0 : s.map(({ type: u, disabled: D }) => ({
|
|
1107
|
+
label: M(u),
|
|
1108
|
+
value: u,
|
|
1109
|
+
disabled: D
|
|
1110
|
+
}))) ?? [];
|
|
1111
|
+
}
|
|
1112
|
+
), { getGranularCalendarLimits: B } = zt(e), R = b(
|
|
1113
|
+
() => e.granularities ? B(T.value) : { min: e.min ? W(e.min) : null, max: e.max ? $(e.max) : null }
|
|
1114
|
+
), {
|
|
1115
|
+
adjustDateForQuarterly: ue,
|
|
1116
|
+
adjustDateForMonthly: V,
|
|
1117
|
+
adjustDateForWeekly: U,
|
|
1118
|
+
adjustStartDateInputForWeekly: Y,
|
|
1119
|
+
adjustEndDateInputForWeekly: y,
|
|
1120
|
+
adjustStartDateInputForMonthly: le,
|
|
1121
|
+
adjustEndDateInputForMonthly: ye,
|
|
1122
|
+
adjustStartDateInputForQuarterly: ce,
|
|
1123
|
+
adjustEndDateInputForQuarterly: ve
|
|
1124
|
+
} = qt(e.firstDayOfWeek), { savedRanges: L, saveRange: de, resetSavedRanges: G } = ea(), E = (s) => {
|
|
1125
|
+
var u;
|
|
1126
|
+
return s ? De(s, x.NUMERIC_DATE_YEAR_FIRST, {
|
|
1127
|
+
locale: I[(u = g.value) == null ? void 0 : u.substring(0, 2)] || I.enUS
|
|
1128
|
+
}) : "";
|
|
1129
|
+
}, j = (s) => {
|
|
1130
|
+
var u;
|
|
1131
|
+
return s ? De(s, x.HOUR_MINUTE_SECONDS, {
|
|
1132
|
+
locale: I[(u = g.value) == null ? void 0 : u.substring(0, 2)] || I.enUS
|
|
1133
|
+
}) : "";
|
|
1134
|
+
}, te = q(!1), ae = q(!1), J = q(!1), Z = q(!1), l = Oe({
|
|
1135
|
+
startDate: e.dateFormData.startDate,
|
|
1136
|
+
endDate: e.dateFormData.endDate,
|
|
1137
|
+
startTime: e.dateFormData.startTime,
|
|
1138
|
+
endTime: e.dateFormData.endTime
|
|
1139
|
+
}), Te = (s, u) => {
|
|
1140
|
+
let D = new Date(s);
|
|
1141
|
+
const [d, S, A] = u.split(":");
|
|
1142
|
+
return D = Ea(D, parseInt(d, 10)), D = ka(D, parseInt(S, 10)), D = Ia(D, parseInt(A, 10)), D;
|
|
1143
|
+
}, _e = (s) => /^(?:[01]\d|2[01234]):(?:[012345]\d):(?:[012345]\d)$/.test(s), fe = (s, u) => {
|
|
1144
|
+
const D = () => {
|
|
1145
|
+
if (u && k(u)) {
|
|
1146
|
+
const d = Te(new Date(u), s);
|
|
1147
|
+
if (e.min && d < et(e.min, 0) || e.max && d > et(e.max, 0))
|
|
1148
|
+
return !1;
|
|
1149
|
+
}
|
|
1150
|
+
return !0;
|
|
1151
|
+
};
|
|
1152
|
+
return _e(s) && D();
|
|
1153
|
+
}, c = (s, u) => !u || !_e(u) || e.variant === "month" ? s : Te(new Date(s), u), N = (s) => {
|
|
1154
|
+
l.startTime = j(
|
|
1155
|
+
e.min && e.allowTimeInput && Q(e.min, s.startDate) ? e.min : W(s.startDate)
|
|
1156
|
+
), l.endTime = j(
|
|
1157
|
+
e.max && e.allowTimeInput && Q(e.max, s.endDate) ? e.max : $(s.endDate)
|
|
1158
|
+
), i.startDate = c(s.startDate, l.startTime), i.endDate = c(s.endDate, l.endTime), i.range = null, e.granularities && G(), t(w.INPUT, {
|
|
1159
|
+
...i,
|
|
1160
|
+
range: h.value
|
|
1161
|
+
});
|
|
1162
|
+
}, k = (s) => {
|
|
1163
|
+
const u = (d) => e.min && W(d) < W(e.min) || e.max && W(d) > W(e.max) ? !1 : e.isDateDisabled ? !e.isDateDisabled(W(d)) : !0;
|
|
1164
|
+
return /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(s) && u(new Date(s));
|
|
1165
|
+
};
|
|
1166
|
+
rt(() => {
|
|
1167
|
+
te.value = !!(e.dateFormData.startDate && !k(e.dateFormData.startDate)), e.allowTimeInput ? J.value = !!(e.dateFormData.startTime && !fe(e.dateFormData.startTime, e.dateFormData.startDate)) : J.value = !1, ae.value = !!(e.dateFormData.endDate && !k(e.dateFormData.endDate)), e.allowTimeInput ? Z.value = !!(e.dateFormData.endTime && !fe(e.dateFormData.endTime, e.dateFormData.endDate)) : Z.value = !1;
|
|
1168
|
+
});
|
|
1169
|
+
const z = (s) => {
|
|
1170
|
+
var u;
|
|
1171
|
+
l.startDate = E(s), l.startTime ? J.value && (l.startTime = (u = e.dateFormData) == null ? void 0 : u.startTime) : l.startTime = j(s), te.value = !1, J.value = !1, t(w.START_DATE_SELECTED, s);
|
|
1172
|
+
}, X = (s) => {
|
|
1173
|
+
var u;
|
|
1174
|
+
l.endDate = E(s), l.endTime ? Z.value && (l.endTime = (u = e.dateFormData) == null ? void 0 : u.endTime) : l.endTime = j($(s)), ae.value = !1, Z.value = !1;
|
|
1175
|
+
}, ne = (s) => {
|
|
1176
|
+
const u = e.value[s];
|
|
1177
|
+
if (u)
|
|
1178
|
+
return u;
|
|
1179
|
+
if (e.dateFormData[s] && k(e.dateFormData[s]))
|
|
1180
|
+
return new Date(e.dateFormData[s]);
|
|
1181
|
+
}, xe = we((s) => {
|
|
1182
|
+
var u;
|
|
1183
|
+
if (k(s)) {
|
|
1184
|
+
let D = s;
|
|
1185
|
+
switch (te.value = !1, (u = T.value) == null ? void 0 : u.type) {
|
|
1186
|
+
case "weekly":
|
|
1187
|
+
D = Y(
|
|
1188
|
+
s,
|
|
1189
|
+
E,
|
|
1190
|
+
R.value.min,
|
|
1191
|
+
R.value.max
|
|
1192
|
+
), l.startDate = D;
|
|
1193
|
+
break;
|
|
1194
|
+
case "monthly":
|
|
1195
|
+
D = le(
|
|
1196
|
+
s,
|
|
1197
|
+
E,
|
|
1198
|
+
R.value.min,
|
|
1199
|
+
R.value.max
|
|
1200
|
+
), l.startDate = D;
|
|
1201
|
+
break;
|
|
1202
|
+
case "quarterly":
|
|
1203
|
+
D = ce(
|
|
1204
|
+
s,
|
|
1205
|
+
E,
|
|
1206
|
+
R.value.min,
|
|
1207
|
+
R.value.max
|
|
1208
|
+
), l.startDate = D;
|
|
1209
|
+
break;
|
|
1210
|
+
}
|
|
1211
|
+
const d = se(D);
|
|
1212
|
+
i.startDate = c(d, l.startTime), i.endDate = c(
|
|
1213
|
+
se(l.endDate),
|
|
1214
|
+
l.endTime
|
|
1215
|
+
), k(l.endDate) && (i.endDate = c(
|
|
1216
|
+
se(l.endDate),
|
|
1217
|
+
l.endTime
|
|
1218
|
+
));
|
|
1219
|
+
const S = ne("endDate");
|
|
1220
|
+
i.range = null, t(w.FORM_DATE, {
|
|
1221
|
+
startDate: d,
|
|
1222
|
+
endDate: S
|
|
1223
|
+
}), t(w.INPUT, {
|
|
1224
|
+
...i,
|
|
1225
|
+
range: h.value
|
|
1226
|
+
});
|
|
1227
|
+
} else
|
|
1228
|
+
te.value = !0, t(w.ERROR, { ...l });
|
|
1229
|
+
}, a), Dt = (s) => {
|
|
1230
|
+
l.startDate = $e(s), xe(l.startDate);
|
|
1231
|
+
}, Ce = we((s) => {
|
|
1232
|
+
var u;
|
|
1233
|
+
if (k(s)) {
|
|
1234
|
+
let D = s;
|
|
1235
|
+
switch (ae.value = !1, (u = T.value) == null ? void 0 : u.type) {
|
|
1236
|
+
case "weekly":
|
|
1237
|
+
D = y(
|
|
1238
|
+
s,
|
|
1239
|
+
E,
|
|
1240
|
+
R.value.min,
|
|
1241
|
+
R.value.max
|
|
1242
|
+
), l.endDate = D;
|
|
1243
|
+
break;
|
|
1244
|
+
case "monthly":
|
|
1245
|
+
D = ye(
|
|
1246
|
+
s,
|
|
1247
|
+
E,
|
|
1248
|
+
R.value.min,
|
|
1249
|
+
R.value.max
|
|
1250
|
+
), l.endDate = D;
|
|
1251
|
+
break;
|
|
1252
|
+
case "quarterly":
|
|
1253
|
+
D = ve(
|
|
1254
|
+
s,
|
|
1255
|
+
E,
|
|
1256
|
+
R.value.min,
|
|
1257
|
+
R.value.max
|
|
1258
|
+
), l.endDate = D;
|
|
1259
|
+
break;
|
|
1260
|
+
}
|
|
1261
|
+
const d = se(D);
|
|
1262
|
+
i.endDate = c(d, l.endTime), k(l.startDate) && (i.startDate = c(
|
|
1263
|
+
se(l.startDate),
|
|
1264
|
+
l.startTime
|
|
1265
|
+
));
|
|
1266
|
+
const S = ne("startDate");
|
|
1267
|
+
i.range = null, t(w.FORM_DATE, {
|
|
1268
|
+
startDate: S,
|
|
1269
|
+
endDate: d
|
|
1270
|
+
}), t(w.INPUT, {
|
|
1271
|
+
...i,
|
|
1272
|
+
range: h.value
|
|
1273
|
+
});
|
|
1274
|
+
} else
|
|
1275
|
+
ae.value = !0, t(w.ERROR, { ...l });
|
|
1276
|
+
}, a), gt = (s) => {
|
|
1277
|
+
l.endDate = $e(s), Ce(l.endDate);
|
|
1278
|
+
}, pt = (s) => {
|
|
1279
|
+
Ht(s);
|
|
1280
|
+
}, Fe = we((s) => {
|
|
1281
|
+
if (fe(s, e.dateFormData.startDate)) {
|
|
1282
|
+
J.value = !1, i.startDate = c(i.startDate, s);
|
|
1283
|
+
const u = ne("endDate");
|
|
1284
|
+
t(w.FORM_DATE, {
|
|
1285
|
+
startDate: i.startDate,
|
|
1286
|
+
endDate: u,
|
|
1287
|
+
startTime: s,
|
|
1288
|
+
endTime: l.endTime ?? e.dateFormData.endTime
|
|
1289
|
+
}), t(w.INPUT, {
|
|
1290
|
+
...i,
|
|
1291
|
+
range: h.value
|
|
1292
|
+
});
|
|
1293
|
+
} else
|
|
1294
|
+
J.value = !0, t(w.ERROR, { ...l });
|
|
1295
|
+
}), Ne = we((s) => {
|
|
1296
|
+
fe(s, e.dateFormData.endDate) ? (Z.value = !1, i.endDate = c(i.endDate, s), t(w.FORM_DATE, {
|
|
1297
|
+
startDate: i.startDate,
|
|
1298
|
+
endDate: i.endDate,
|
|
1299
|
+
startTime: l.startTime ?? e.dateFormData.startTime,
|
|
1300
|
+
endTime: s
|
|
1301
|
+
}), t(w.INPUT, {
|
|
1302
|
+
...i,
|
|
1303
|
+
range: h.value
|
|
1304
|
+
})) : (Z.value = !0, t(w.ERROR, { ...l }));
|
|
1305
|
+
}), ht = (s) => {
|
|
1306
|
+
l.startTime = je(s), Fe(l.startTime);
|
|
1307
|
+
}, yt = (s) => {
|
|
1308
|
+
l.endTime = je(s), Ne(l.endTime);
|
|
1309
|
+
}, vt = (s) => {
|
|
1310
|
+
ra(s);
|
|
1311
|
+
}, ge = (s, u, D, d) => {
|
|
1312
|
+
i.startDate = s, i.endDate = u, D && (i.granularity = D), d && (i.range = d);
|
|
1313
|
+
}, Tt = (s) => {
|
|
1314
|
+
var D;
|
|
1315
|
+
const u = (D = e.quickSelectRanges) == null ? void 0 : D.find(({ value: d }) => d === s);
|
|
1316
|
+
if (u) {
|
|
1317
|
+
G();
|
|
1318
|
+
const d = u.data, S = d.endDate || (d.isRelativeToNow ? new Date(Date.now()) : $(new Date(Date.now()))), A = d.isRelativeToNow && d.timeDifference ? new Date(S.getTime() - d.timeDifference) : d.startDate;
|
|
1319
|
+
l.endDate = E(S), l.startDate = E(A), ge(A, S, null, s), e.granularities && (i.granularity = d.granularity || O.value), l.startTime = j(A), l.endTime = j(S), i.startDate = A, i.endDate = S, d.isRelativeToNow && (v.value = {
|
|
1320
|
+
...v.value,
|
|
1321
|
+
[s]: {
|
|
1322
|
+
startDate: A,
|
|
1323
|
+
endDate: S
|
|
1324
|
+
}
|
|
1325
|
+
}), t(w.CUSTOM_RANGE, {
|
|
1326
|
+
...u.data,
|
|
1327
|
+
startDate: A,
|
|
1328
|
+
endDate: S,
|
|
1329
|
+
range: u.value
|
|
1330
|
+
});
|
|
1331
|
+
}
|
|
1332
|
+
}, Ye = {
|
|
1333
|
+
weekly: U,
|
|
1334
|
+
monthly: V,
|
|
1335
|
+
quarterly: ue
|
|
1336
|
+
}, _t = (s) => {
|
|
1337
|
+
const u = i.granularity;
|
|
1338
|
+
if (i.granularity = s, u && de(u, structuredClone(Ee(i))), i.startDate && i.endDate) {
|
|
1339
|
+
switch (s) {
|
|
1340
|
+
case "quarterly":
|
|
1341
|
+
case "monthly":
|
|
1342
|
+
case "weekly": {
|
|
1343
|
+
if (L[s]) {
|
|
1344
|
+
ge(L[s].startDate, L[s].endDate, s);
|
|
1345
|
+
break;
|
|
1346
|
+
}
|
|
1347
|
+
const { startDate: D, endDate: d } = Ye[s](
|
|
1348
|
+
i.startDate,
|
|
1349
|
+
i.endDate,
|
|
1350
|
+
R.value.min,
|
|
1351
|
+
R.value.max
|
|
1352
|
+
);
|
|
1353
|
+
ge(D, d, s);
|
|
1354
|
+
break;
|
|
1355
|
+
}
|
|
1356
|
+
case "daily":
|
|
1357
|
+
L.daily && ge(L.daily.startDate, L.daily.endDate, s);
|
|
1358
|
+
break;
|
|
1359
|
+
}
|
|
1360
|
+
l.startDate = E(i.startDate), l.endDate = E(i.endDate), t(w.INPUT, {
|
|
1361
|
+
...i,
|
|
1362
|
+
range: h.value
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1365
|
+
}, wt = b(() => ({
|
|
1366
|
+
"b-date-range-picker-calendar__form-container--no-calendars": P.value
|
|
1367
|
+
}));
|
|
1368
|
+
return { __sfc: !0, FORM_INPUT_DEBOUNCE_TIME: a, RANGE_SELECTOR_CUSTOM_RANGE_KEY: r, props: e, emit: t, slots: o, hasSlot: m, locale: g, t: M, locales: I, calculatedIsRelativeToNowQuickSelectRanges: v, defaultGranularity: O, hasNoCalendars: P, internalRangeDate: i, deserializeDate: f, selectedRangeSelectorValue: h, formInputWrapperConditionalClasses: H, quickSelectRangeDefaultItems: F, selectedGranularity: T, granularityItems: _, getGranularCalendarLimits: B, computedMinMax: R, adjustDateForQuarterly: ue, adjustDateForMonthly: V, adjustDateForWeekly: U, adjustStartDateInputForWeekly: Y, adjustEndDateInputForWeekly: y, adjustStartDateInputForMonthly: le, adjustEndDateInputForMonthly: ye, adjustStartDateInputForQuarterly: ce, adjustEndDateInputForQuarterly: ve, savedRanges: L, saveRange: de, resetSavedRanges: G, formatDate: E, formatTime: j, startDateError: te, endDateError: ae, startTimeError: J, endTimeError: Z, dateTextInput: l, setTimeInDateObject: Te, isValidTimeString: _e, isValidTime: fe, setTimeInDateRef: c, onDateInput: N, isValidDate: k, onStartDateSelected: z, onEndDateSelected: X, getDate: ne, validateStartDate: xe, onStartDateInput: Dt, validateEndDate: Ce, onEndDateInput: gt, onDateInputKeyDown: pt, validateStartTime: Fe, validateEndTime: Ne, onStartTimeInput: ht, onEndTimeInput: yt, onTimeInputKeyDown: vt, setInternalRange: ge, onRangeSelectorInput: Tt, adjustDate: Ye, onGranularityInput: _t, computedFormContainerClasses: wt, Calendar: K, BentoTypography: st, BentoInputField: kt, BentoDropdown: It, BentoSegmentedControl: St };
|
|
1369
|
+
}
|
|
1370
|
+
});
|
|
1371
|
+
var Na = function() {
|
|
1372
|
+
var t = this, e = t._self._c, a = t._self._setupProxy;
|
|
1373
|
+
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() {
|
|
1374
|
+
return [t._v("YYYY-MM-DD")];
|
|
1375
|
+
}, 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() {
|
|
1376
|
+
return [t._v("HH:MM:SS")];
|
|
1377
|
+
}, 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() {
|
|
1378
|
+
return [t._v("YYYY-MM-DD")];
|
|
1379
|
+
}, 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() {
|
|
1380
|
+
return [t._v("HH:MM:SS")];
|
|
1381
|
+
}, 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)]);
|
|
1382
|
+
}, Ya = [], Aa = /* @__PURE__ */ lt(
|
|
1383
|
+
Fa,
|
|
1384
|
+
Na,
|
|
1385
|
+
Ya,
|
|
1386
|
+
!1,
|
|
1387
|
+
null,
|
|
1388
|
+
"849d410f"
|
|
1389
|
+
);
|
|
1390
|
+
const Pa = Aa.exports;
|
|
1391
|
+
function tt(n, t) {
|
|
1392
|
+
const e = C(n, t == null ? void 0 : t.in);
|
|
1393
|
+
return Math.trunc(e.getMonth() / 3) + 1;
|
|
1394
|
+
}
|
|
1395
|
+
function at(n, t) {
|
|
1396
|
+
return C(n, t == null ? void 0 : t.in).getFullYear();
|
|
1397
|
+
}
|
|
1398
|
+
function Ba(n, t, e) {
|
|
1399
|
+
const [a, r] = Lt(
|
|
1400
|
+
e == null ? void 0 : e.in,
|
|
1401
|
+
n,
|
|
1402
|
+
t
|
|
1403
|
+
);
|
|
1404
|
+
return +he(a) == +he(r);
|
|
1405
|
+
}
|
|
1406
|
+
const Ua = {
|
|
1407
|
+
"en-US": {
|
|
1408
|
+
apply: "Apply",
|
|
1409
|
+
cancel: "Cancel",
|
|
1410
|
+
dateRangePicker: "Date range picker {name}",
|
|
1411
|
+
provideDateInAFormat: "Provide date in a YYYY-MM-DD format",
|
|
1412
|
+
quarter: "Q{quarter} {year}",
|
|
1413
|
+
selectDate: "Select a date",
|
|
1414
|
+
selectDateRange: "Select a date range",
|
|
1415
|
+
selectedDateIsNotAvailable: "Selected date is not available"
|
|
1416
|
+
},
|
|
1417
|
+
"ja-JP": {
|
|
1418
|
+
apply: "適用",
|
|
1419
|
+
cancel: "キャンセル",
|
|
1420
|
+
dateRangePicker: "日付範囲ピッカー {name}",
|
|
1421
|
+
provideDateInAFormat: "YYYY-MM-DD形式で日付を入力してください",
|
|
1422
|
+
quarter: "{year}年第{quarter}四半期",
|
|
1423
|
+
selectDate: "日付を選択",
|
|
1424
|
+
selectDateRange: "日付範囲を選択",
|
|
1425
|
+
selectedDateIsNotAvailable: "選択した日付は利用できません"
|
|
1426
|
+
},
|
|
1427
|
+
"pt-BR": {
|
|
1428
|
+
apply: "Aplicar",
|
|
1429
|
+
cancel: "Cancelar",
|
|
1430
|
+
dateRangePicker: "Seletor de intervalo de datas {name}",
|
|
1431
|
+
provideDateInAFormat: "Forneça a data no formato AAAA-MM-DD",
|
|
1432
|
+
quarter: "{quarter}º trimestre de {year}",
|
|
1433
|
+
selectDate: "Selecione uma data",
|
|
1434
|
+
selectDateRange: "Selecione um intervalo de datas",
|
|
1435
|
+
selectedDateIsNotAvailable: "A data selecionada não está disponível"
|
|
1436
|
+
}
|
|
1437
|
+
}, qa = ({
|
|
1438
|
+
datePickerValue: n,
|
|
1439
|
+
isDateIncorrect: t,
|
|
1440
|
+
quickSelectRanges: e,
|
|
1441
|
+
isMonthVariant: a,
|
|
1442
|
+
withTimeInput: r,
|
|
1443
|
+
placeholder: o
|
|
1444
|
+
}) => {
|
|
1445
|
+
const { locale: m, t: g } = ke(), M = Se(), I = (f) => !!f && !isNaN(f.getTime()), v = (f, h) => {
|
|
1446
|
+
var H;
|
|
1447
|
+
return I(f) ? De(f, h, {
|
|
1448
|
+
locale: M[(H = m.value) == null ? void 0 : H.substring(0, 2)] || M.enUS
|
|
1449
|
+
}) : void 0;
|
|
1450
|
+
}, O = Oe({
|
|
1451
|
+
startDate: null,
|
|
1452
|
+
endDate: null,
|
|
1453
|
+
startTime: null,
|
|
1454
|
+
endTime: null
|
|
1455
|
+
});
|
|
1456
|
+
return Me(
|
|
1457
|
+
n,
|
|
1458
|
+
(f) => {
|
|
1459
|
+
O.startDate = v(
|
|
1460
|
+
f == null ? void 0 : f.startDate,
|
|
1461
|
+
x.NUMERIC_DATE_YEAR_FIRST
|
|
1462
|
+
), O.endDate = v(f == null ? void 0 : f.endDate, x.NUMERIC_DATE_YEAR_FIRST), O.startTime = v(f == null ? void 0 : f.startDate, x.HOUR_MINUTE_SECONDS), O.endTime = v(f == null ? void 0 : f.endDate, x.HOUR_MINUTE_SECONDS);
|
|
1463
|
+
},
|
|
1464
|
+
{ immediate: !0 }
|
|
1465
|
+
), {
|
|
1466
|
+
// Values
|
|
1467
|
+
dateDisplayValue: b(() => {
|
|
1468
|
+
var V;
|
|
1469
|
+
if (t.value)
|
|
1470
|
+
return `${O.startDate || ""} - ${O.endDate || ""}`;
|
|
1471
|
+
if (!n.value || !n.value.startDate && !n.value.endDate)
|
|
1472
|
+
return (o == null ? void 0 : o.value) || g("selectDateRange");
|
|
1473
|
+
if ((V = e.value) != null && V.length) {
|
|
1474
|
+
const U = e.value.find(({ value: Y }) => {
|
|
1475
|
+
var y;
|
|
1476
|
+
return Y === ((y = n.value) == null ? void 0 : y.range);
|
|
1477
|
+
});
|
|
1478
|
+
if (U)
|
|
1479
|
+
return U.label;
|
|
1480
|
+
}
|
|
1481
|
+
if (n.value.granularity === "quarterly") {
|
|
1482
|
+
const { startDate: U, endDate: Y } = n.value, y = g("quarter", { quarter: tt(U), year: at(U) });
|
|
1483
|
+
if (Ba(U, Y))
|
|
1484
|
+
return y;
|
|
1485
|
+
const le = g("quarter", { quarter: tt(Y), year: at(Y) });
|
|
1486
|
+
return `${y} - ${le}`;
|
|
1487
|
+
}
|
|
1488
|
+
const { startDate: f, endDate: h, startTime: H, endTime: F } = O, T = a != null && a.value ? x.LONG_MONTH_YEAR : x.FULL_DATE_MONTH_FIRST, _ = v(se(f), T), B = v(se(h), T);
|
|
1489
|
+
if (!r.value)
|
|
1490
|
+
return `${_} - ${B}`;
|
|
1491
|
+
const R = [_, H].filter(Boolean).join(", "), ue = [B, F].filter(Boolean).join(", ");
|
|
1492
|
+
return `${R} - ${ue}`;
|
|
1493
|
+
}),
|
|
1494
|
+
textInputDisplayValue: O,
|
|
1495
|
+
// Methods
|
|
1496
|
+
formatTextInputDisplayValue: () => ""
|
|
1497
|
+
};
|
|
1498
|
+
}, Wa = {
|
|
1499
|
+
i18n: { messages: Ua },
|
|
1500
|
+
name: "bento-date-range-picker",
|
|
1501
|
+
model: { prop: "modelValue" }
|
|
1502
|
+
}, Ha = /* @__PURE__ */ nt({
|
|
1503
|
+
...Wa,
|
|
1504
|
+
props: {
|
|
1505
|
+
description: { default: void 0 },
|
|
1506
|
+
disabled: { type: Boolean, default: !1 },
|
|
1507
|
+
errorMessage: { default: null },
|
|
1508
|
+
label: { default: void 0 },
|
|
1509
|
+
optional: { type: Boolean, default: !1 },
|
|
1510
|
+
placeholder: { default: null },
|
|
1511
|
+
readonly: { type: Boolean, default: !1 },
|
|
1512
|
+
required: { type: Boolean, default: !1 },
|
|
1513
|
+
tooltipText: { default: null },
|
|
1514
|
+
allowTimeInput: { type: Boolean },
|
|
1515
|
+
firstDayOfWeek: { default: 1 },
|
|
1516
|
+
granularities: null,
|
|
1517
|
+
isDateDisabled: { default: void 0 },
|
|
1518
|
+
showEndDateOnOpen: { type: Boolean, default: !1 },
|
|
1519
|
+
quickSelectRanges: { default: void 0 },
|
|
1520
|
+
maxRange: { default: null },
|
|
1521
|
+
min: { default: null },
|
|
1522
|
+
max: { default: null },
|
|
1523
|
+
numberOfMonths: { default: void 0 },
|
|
1524
|
+
modelValue: { default: null },
|
|
1525
|
+
value: { default: null },
|
|
1526
|
+
variant: { default: void 0 },
|
|
1527
|
+
hasActions: { type: Boolean, default: !1 }
|
|
1528
|
+
},
|
|
1529
|
+
emits: ["update:model-value", "input"],
|
|
1530
|
+
setup(n, { emit: t }) {
|
|
1531
|
+
const e = n, { locale: a, t: r } = ke(), o = Se(), m = pe("bento-date-range-picker-container"), g = pe("bento-date-range-picker-label"), M = pe("bento-date-range-picker-description"), I = pe("bento-date-range-picker-error"), v = pe("bento-date-range-picker-date-error"), O = b(() => e.label || r("dateRangePicker", { name: m })), P = Mt({
|
|
1532
|
+
none: 0,
|
|
1533
|
+
one: 710,
|
|
1534
|
+
// width of date range picker with one panes
|
|
1535
|
+
two: 1030,
|
|
1536
|
+
// width of date range picker with two panes
|
|
1537
|
+
three: 1290
|
|
1538
|
+
// width of date range picker with three panes
|
|
1539
|
+
}), i = b(() => {
|
|
1540
|
+
const c = P.active().value, N = {
|
|
1541
|
+
none: 0,
|
|
1542
|
+
one: 1,
|
|
1543
|
+
two: 2
|
|
1544
|
+
};
|
|
1545
|
+
if (c in N) {
|
|
1546
|
+
const k = N[c];
|
|
1547
|
+
return e.numberOfMonths === void 0 ? k : Math.min(e.numberOfMonths, k);
|
|
1548
|
+
}
|
|
1549
|
+
return e.numberOfMonths;
|
|
1550
|
+
}), f = b(() => (e == null ? void 0 : e.quickSelectRanges) && e.quickSelectRanges.map((c) => {
|
|
1551
|
+
const N = c.data.endDate ? void 0 : new Date(Date.now()).getTime() - c.data.startDate.getTime();
|
|
1552
|
+
return {
|
|
1553
|
+
...c,
|
|
1554
|
+
data: {
|
|
1555
|
+
...c.data,
|
|
1556
|
+
// Adding timeDifference to calculate an up-to-date endDate on range selection
|
|
1557
|
+
timeDifference: N
|
|
1558
|
+
}
|
|
1559
|
+
};
|
|
1560
|
+
})), h = q(!1), H = q(null), F = q(!1), { isReadOnly: T } = $t(qe(e, "readonly")), { emitValue: _ } = jt(t);
|
|
1561
|
+
Me(
|
|
1562
|
+
() => e.disabled,
|
|
1563
|
+
() => {
|
|
1564
|
+
e.disabled && F.value && (F.value = !1);
|
|
1565
|
+
}
|
|
1566
|
+
);
|
|
1567
|
+
const B = b(() => e.modelValue || e.value), R = b(() => e.hasActions ? !E.value && h.value : h.value), ue = b(() => ({
|
|
1568
|
+
"b-date-range-picker__description--error": !!e.errorMessage || R.value
|
|
1569
|
+
})), V = b(() => e.variant === "month"), U = b(() => e.allowTimeInput && e.variant !== "month"), { dateDisplayValue: Y, textInputDisplayValue: y, formatTextInputDisplayValue: le } = qa({
|
|
1570
|
+
datePickerValue: B,
|
|
1571
|
+
isDateIncorrect: h,
|
|
1572
|
+
quickSelectRanges: f,
|
|
1573
|
+
isMonthVariant: V,
|
|
1574
|
+
withTimeInput: U,
|
|
1575
|
+
placeholder: qe(e, "placeholder")
|
|
1576
|
+
}), ye = b(
|
|
1577
|
+
() => `${e.description ? M : ""} ${e.errorMessage ? I : ""} ${h.value ? v : ""}`.trim() || null
|
|
1578
|
+
), ce = () => {
|
|
1579
|
+
F.value = !1;
|
|
1580
|
+
}, ve = () => {
|
|
1581
|
+
F.value = !0;
|
|
1582
|
+
}, L = q(Y.value), de = q(
|
|
1583
|
+
// textInputDisplayValue is a reactive object
|
|
1584
|
+
structuredClone(Ee(y))
|
|
1585
|
+
), G = q(e.modelValue ?? e.value), E = q(!0), j = b(
|
|
1586
|
+
() => e.hasActions ? de.value : y
|
|
1587
|
+
), te = b(
|
|
1588
|
+
() => e.hasActions ? L.value : Y.value
|
|
1589
|
+
);
|
|
1590
|
+
rt(() => {
|
|
1591
|
+
if (e.hasActions || We(
|
|
1592
|
+
'BentoDateRangePicker "hasActions" property',
|
|
1593
|
+
`Set the BentoDateRangePicker "hasActions" property true which will display the "Apply" and "Cancel" buttons.
|
|
1594
|
+
This will be the default behavior in the v2 and "hasActions" will be removed.`,
|
|
1595
|
+
"2.0.0"
|
|
1596
|
+
), e.value && We(
|
|
1597
|
+
'BentoDateRangePicker "value" property',
|
|
1598
|
+
'The use of "value" prop in "BentoDateRangePicker" is no longer supported. Use the "v-model" or "model-value" property instead.',
|
|
1599
|
+
"2.0.0"
|
|
1600
|
+
), e.granularities && e.variant !== "month" && e.granularities.find(({ type: c }) => c === "quarterly"))
|
|
1601
|
+
throw new Error('Quarterly granularity is only supported by BentoDateRangePicker with variant: "month"');
|
|
1602
|
+
}), Me([() => e.value, () => e.modelValue], () => {
|
|
1603
|
+
L.value = Y.value, de.value = structuredClone(Ee(y));
|
|
1604
|
+
});
|
|
1605
|
+
const ae = b(() => [
|
|
1606
|
+
{
|
|
1607
|
+
title: r("apply"),
|
|
1608
|
+
event: () => {
|
|
1609
|
+
_(G.value), ce(), E.value = !0;
|
|
1610
|
+
},
|
|
1611
|
+
disabled: E.value
|
|
1612
|
+
},
|
|
1613
|
+
{
|
|
1614
|
+
title: r("cancel"),
|
|
1615
|
+
event: ce
|
|
1616
|
+
}
|
|
1617
|
+
]);
|
|
1618
|
+
return Me(G, (c) => {
|
|
1619
|
+
if (e.hasActions) {
|
|
1620
|
+
E.value = h.value;
|
|
1621
|
+
return;
|
|
1622
|
+
}
|
|
1623
|
+
_(c);
|
|
1624
|
+
}), { __sfc: !0, emit: t, props: e, locale: a, t: r, locales: o, datePickerContainerId: m, labelId: g, descriptionId: M, errorId: I, dateErrorId: v, popoverAriaLabel: O, breakpoints: P, computedNumberOfMonths: i, adjustedQuickSelectRanges: f, isDateIncorrect: h, inputContainerRef: H, isDateRangePickerOpen: F, isReadOnly: T, emitValue: _, internalModelValue: B, shouldDisplayError: R, descriptionConditionalClasses: ue, isMonthVariant: V, withTimeInput: U, dateDisplayValue: Y, textInputDisplayValue: y, formatTextInputDisplayValue: le, ariaDescribedBy: ye, closeDateRangePicker: ce, openDateRangePicker: ve, localDateDisplayValue: L, localTextInputDisplayValue: de, selectedDate: G, isApplyDisabled: E, displayedTextInputValue: j, displayedDateValue: te, rangePickerButtonActions: ae, onDateRangePickerInput: (c) => {
|
|
1625
|
+
h.value = !1;
|
|
1626
|
+
const N = (k, z) => {
|
|
1627
|
+
var X;
|
|
1628
|
+
return k ? De(k, z, {
|
|
1629
|
+
locale: o[(X = a.value) == null ? void 0 : X.substring(0, 2)] || o.enUS
|
|
1630
|
+
}) : void 0;
|
|
1631
|
+
};
|
|
1632
|
+
y.startDate = N(c.startDate, x.NUMERIC_DATE_YEAR_FIRST), y.endDate = N(c.endDate, x.NUMERIC_DATE_YEAR_FIRST), y.startTime = N(c.startDate, x.HOUR_MINUTE_SECONDS), y.endTime = N(c.endDate, x.HOUR_MINUTE_SECONDS), G.value = c;
|
|
1633
|
+
}, clearDateRangePickerValue: async () => {
|
|
1634
|
+
h.value && (h.value = !1), G.value = null;
|
|
1635
|
+
}, onEnterPressedOverInput: () => {
|
|
1636
|
+
if (!F.value) {
|
|
1637
|
+
F.value = !0;
|
|
1638
|
+
return;
|
|
1639
|
+
}
|
|
1640
|
+
h.value || (F.value = !1);
|
|
1641
|
+
}, onDateRangePickerFormDateInputUpdate: (c) => {
|
|
1642
|
+
h.value = !1, c.startTime && (y.startTime = c.startTime), c.endTime && (y.endTime = c.endTime);
|
|
1643
|
+
}, onDateRangePickerError: (c) => {
|
|
1644
|
+
h.value = !0, y.startDate = c.startDate, y.endDate = c.endDate, G.value = { startDate: null, endDate: null };
|
|
1645
|
+
}, onRangeSelectorInput: (c) => {
|
|
1646
|
+
if (c) {
|
|
1647
|
+
const N = (z, X) => {
|
|
1648
|
+
var ne;
|
|
1649
|
+
return z ? De(z, X, {
|
|
1650
|
+
locale: o[(ne = a.value) == null ? void 0 : ne.substring(0, 2)] || o.enUS
|
|
1651
|
+
}) : void 0;
|
|
1652
|
+
}, k = (z) => {
|
|
1653
|
+
var X;
|
|
1654
|
+
return De(z, x.NUMERIC_DATE_YEAR_FIRST, {
|
|
1655
|
+
locale: o[(X = a.value) == null ? void 0 : X.substring(0, 2)] || o.enUS
|
|
1656
|
+
});
|
|
1657
|
+
};
|
|
1658
|
+
y.startDate = k(c.startDate), y.endDate = k(c.endDate), y.startTime = N(
|
|
1659
|
+
c.startDate,
|
|
1660
|
+
x.HOUR_MINUTE_SECONDS
|
|
1661
|
+
), y.endTime = N(c.endDate, x.HOUR_MINUTE_SECONDS), G.value = c;
|
|
1662
|
+
}
|
|
1663
|
+
}, BentoButtonActions: Et, BentoButtonActionsLayout: Jt, BentoDivider: Ot, BentoPopover: Rt, BentoTypography: st, DateRangePickerCalendar: Pa, DropdownInputDefault: Qt, ErrorMessage: Vt, FieldLabel: Kt, vBentoClickOutsideDirective: Xt };
|
|
1664
|
+
}
|
|
1665
|
+
});
|
|
1666
|
+
var La = function() {
|
|
1667
|
+
var t = this, e = t._self._c, a = t._self._setupProxy;
|
|
1668
|
+
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(r) {
|
|
1669
|
+
return !r.type.indexOf("key") && t._k(r.keyCode, "enter", 13, r.key, "Enter") ? null : a.onEnterPressedOverInput.apply(null, arguments);
|
|
1670
|
+
} } }, [e(a.DropdownInputDefault, { ref: "inputContainerRef", attrs: { "always-combobox-is-input": "", ariaControls: a.datePickerContainerId, ariaExpanded: a.isDateRangePickerOpen, "aria-labelledby": t.label ? a.labelId : null, "aria-describedby": a.ariaDescribedBy, 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(r) {
|
|
1671
|
+
return !r.type.indexOf("key") && t._k(r.keyCode, "esc", 27, r.key, ["Esc", "Escape"]) ? null : a.closeDateRangePicker.apply(null, arguments);
|
|
1672
|
+
} } }, [e(a.DateRangePickerCalendar, { attrs: { "allow-time-input": a.withTimeInput, "quick-select-ranges": a.adjustedQuickSelectRanges, value: a.internalModelValue, "first-day-of-week": t.firstDayOfWeek, 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() {
|
|
1673
|
+
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)];
|
|
1674
|
+
}, proxy: !0 } : null], null, !0) })], 1) : t._e()], 1);
|
|
1675
|
+
}, Ga = [], Qa = /* @__PURE__ */ lt(
|
|
1676
|
+
Ha,
|
|
1677
|
+
La,
|
|
1678
|
+
Ga,
|
|
1679
|
+
!1,
|
|
1680
|
+
null,
|
|
1681
|
+
"f840ff41"
|
|
1682
|
+
);
|
|
1683
|
+
const Mn = Qa.exports;
|
|
1684
|
+
export {
|
|
1685
|
+
Mn as B,
|
|
1686
|
+
x as D,
|
|
1687
|
+
Pa as a,
|
|
1688
|
+
Sa as b,
|
|
1689
|
+
De as f,
|
|
1690
|
+
Se as g,
|
|
1691
|
+
be as i
|
|
1692
|
+
};
|
|
1693
|
+
//# sourceMappingURL=date-range-picker.B6GSRjjK.js.map
|