@adyen/bento-vue2 1.68.2 → 1.70.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 +43 -97
- package/dist/@types/components.d.ts +1 -0
- package/dist/@types/index.d.ts +829 -2056
- package/dist/accordion.js +1 -1
- 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/alert.css +1 -1
- package/dist/assets/base-button.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.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/copy.css +1 -1
- package/dist/assets/country.css +1 -1
- package/dist/assets/currency.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/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/error-message.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/focus-trap.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/info-icon.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/input-field-phone-number.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/search-bar.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/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-button.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/typography.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/avatar.js +1 -1
- package/dist/button.js +9 -9
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chip.js +1 -1
- package/dist/chunks/{accordion-item.BNtdoVto.js → accordion-item.CoqaoVnC.js} +3 -3
- package/dist/chunks/accordion-item.CoqaoVnC.js.map +1 -0
- package/dist/chunks/{action-bar.DQb7WVVd.js → action-bar.LaW4Tzlo.js} +18 -19
- package/dist/chunks/action-bar.LaW4Tzlo.js.map +1 -0
- package/dist/chunks/{alert.c1rhDDrU.js → alert.CMyL-zWT.js} +17 -17
- package/dist/chunks/alert.CMyL-zWT.js.map +1 -0
- package/dist/chunks/aria-label.CaUURpnB.js.map +1 -1
- package/dist/chunks/{avatar.BgwjpLQO.js → avatar.KdcsNOsm.js} +2 -2
- package/dist/chunks/avatar.KdcsNOsm.js.map +1 -0
- package/dist/chunks/{base-button.-gx_u8Bd.js → base-button.BB5tkzjh.js} +6 -6
- package/dist/chunks/base-button.BB5tkzjh.js.map +1 -0
- package/dist/chunks/{base-modal.CkkfT6r6.js → base-modal.D8Rh5NUz.js} +19 -19
- package/dist/chunks/base-modal.D8Rh5NUz.js.map +1 -0
- package/dist/chunks/bin.Ddb69cr1.js +24 -0
- package/dist/chunks/bin.Ddb69cr1.js.map +1 -0
- package/dist/chunks/button-actions-with-menu.BDpWI2Fh.js +85 -0
- package/dist/chunks/button-actions-with-menu.BDpWI2Fh.js.map +1 -0
- package/dist/chunks/button-actions.types.BptAXjD8.js +8 -0
- package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -0
- package/dist/chunks/{button.hF-nD1Og.js → button.CilT7NmM.js} +4 -4
- package/dist/chunks/button.CilT7NmM.js.map +1 -0
- package/dist/chunks/{calendar.DvIQEYwN.js → calendar.DYI4omOF.js} +25 -25
- package/dist/chunks/calendar.DYI4omOF.js.map +1 -0
- package/dist/chunks/{card.CASAAsuJ.js → card.C5Uub0Fb.js} +20 -19
- package/dist/chunks/card.C5Uub0Fb.js.map +1 -0
- package/dist/chunks/{checkbox-group.QdX-NrSG.js → checkbox-group.CLYgcDZl.js} +6 -6
- package/dist/chunks/checkbox-group.CLYgcDZl.js.map +1 -0
- package/dist/chunks/{checkbox-input.CNWigbX4.js → checkbox-input.B0NsfSNR.js} +2 -2
- package/dist/chunks/checkbox-input.B0NsfSNR.js.map +1 -0
- package/dist/chunks/{checkbox.DCD6SSXC.js → checkbox.lwLS8MMI.js} +6 -6
- package/dist/chunks/checkbox.lwLS8MMI.js.map +1 -0
- package/dist/chunks/{chip.OV0EWIP3.js → chip.Bfi-ff5E.js} +10 -10
- package/dist/chunks/chip.Bfi-ff5E.js.map +1 -0
- package/dist/chunks/{code-snippet.dIKi0D7d.js → code-snippet.DsHNr3DK.js} +8 -8
- package/dist/chunks/code-snippet.DsHNr3DK.js.map +1 -0
- package/dist/chunks/{controls-group.CccuLkgP.js → controls-group.az4jCZQF.js} +30 -27
- package/dist/chunks/controls-group.az4jCZQF.js.map +1 -0
- package/dist/chunks/{copy.CF8Fzu2Y.js → copy.Cb7gQhU4.js} +15 -15
- package/dist/chunks/copy.Cb7gQhU4.js.map +1 -0
- package/dist/chunks/{country.melpzEsY.js → country.1yIZNjdj.js} +7 -7
- package/dist/chunks/country.1yIZNjdj.js.map +1 -0
- package/dist/chunks/country.types.C0Q_hhgJ.js.map +1 -1
- package/dist/chunks/{currency.BM9OXTqe.js → currency.MT3baDtO.js} +3 -3
- package/dist/chunks/currency.MT3baDtO.js.map +1 -0
- package/dist/chunks/{dashboard-section.BIe6eVHq.js → dashboard-section.C6zV9yL-.js} +4 -4
- package/dist/chunks/{dashboard-section.BIe6eVHq.js.map → dashboard-section.C6zV9yL-.js.map} +1 -1
- package/dist/chunks/{dashed-underline.BbH6Lnd2.js → dashed-underline.Dry6H2zs.js} +12 -13
- package/dist/chunks/dashed-underline.Dry6H2zs.js.map +1 -0
- package/dist/chunks/{data-grid-template.Co0Ecr79.js → data-grid-template.Dlevchxd.js} +5 -5
- package/dist/chunks/data-grid-template.Dlevchxd.js.map +1 -0
- package/dist/chunks/{data-grid.erxjh5TN.js → data-grid.CrvFYgjF.js} +1234 -1182
- package/dist/chunks/data-grid.CrvFYgjF.js.map +1 -0
- package/dist/chunks/{date-picker.DGIS6Pp-.js → date-picker.DPasFJS2.js} +11 -11
- package/dist/chunks/date-picker.DPasFJS2.js.map +1 -0
- package/dist/chunks/date-range-picker.BIj17geh.js +967 -0
- package/dist/chunks/date-range-picker.BIj17geh.js.map +1 -0
- package/dist/chunks/{date.BfyWX2PY.js → date.BTdCYdkj.js} +2 -2
- package/dist/chunks/{date.BfyWX2PY.js.map → date.BTdCYdkj.js.map} +1 -1
- package/dist/chunks/{dialog-page.CLHZqQeU.js → dialog-page.D20YBRQF.js} +9 -9
- package/dist/chunks/dialog-page.D20YBRQF.js.map +1 -0
- package/dist/chunks/{divider.Cc4JFWG_.js → divider.CFbtmKeQ.js} +6 -6
- package/dist/chunks/divider.CFbtmKeQ.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.94q6opSD.js → dropdown-default-textbox.CDm-PQfc.js} +81 -80
- package/dist/chunks/dropdown-default-textbox.CDm-PQfc.js.map +1 -0
- package/dist/chunks/dropdown-tag.cmaM8C2X.js +306 -0
- package/dist/chunks/dropdown-tag.cmaM8C2X.js.map +1 -0
- package/dist/chunks/{dropdown.DazYAy4B.js → dropdown.CEZXrC1C.js} +43 -43
- package/dist/chunks/dropdown.CEZXrC1C.js.map +1 -0
- package/dist/chunks/{empty-state.mtXfb1BB.js → empty-state.DAbj9xWF.js} +6 -6
- package/dist/chunks/empty-state.DAbj9xWF.js.map +1 -0
- package/dist/chunks/{error-message.BgxnwPLF.js → error-message.D_QAOG-5.js} +9 -9
- package/dist/chunks/{error-message.BgxnwPLF.js.map → error-message.D_QAOG-5.js.map} +1 -1
- package/dist/chunks/es6.MoTTyETW.js +12 -0
- package/dist/chunks/es6.MoTTyETW.js.map +1 -0
- package/dist/chunks/events.CMzGybJJ.js.map +1 -1
- package/dist/chunks/{file-uploader.BPslxGI8.js → file-uploader.D2k8GceS.js} +49 -49
- package/dist/chunks/file-uploader.D2k8GceS.js.map +1 -0
- package/dist/chunks/{filter-bar.DL19SXF1.js → filter-bar.C9suxxv-.js} +310 -316
- package/dist/chunks/filter-bar.C9suxxv-.js.map +1 -0
- package/dist/chunks/{fixed-scroller.XN-jvWqb.js → fixed-scroller.DDYpO7Li.js} +2 -2
- package/dist/chunks/{fixed-scroller.XN-jvWqb.js.map → fixed-scroller.DDYpO7Li.js.map} +1 -1
- package/dist/chunks/{focus-trap.C-wIQqpO.js → focus-trap.B4C5TXxl.js} +2 -2
- package/dist/chunks/focus-trap.B4C5TXxl.js.map +1 -0
- package/dist/chunks/{footer-actions.BE_zzX-e.js → footer-actions.Bbu1_rUb.js} +12 -12
- package/dist/chunks/footer-actions.Bbu1_rUb.js.map +1 -0
- package/dist/chunks/{form-layout-title.CIynHgCF.js → form-layout-title.aXVuAWiG.js} +5 -5
- package/dist/chunks/form-layout-title.aXVuAWiG.js.map +1 -0
- package/dist/chunks/{grid-layout.HvTAa4to.js → grid-layout.1aIiz2N_.js} +4 -4
- package/dist/chunks/grid-layout.1aIiz2N_.js.map +1 -0
- package/dist/chunks/{header-meta.CfloYa86.js → header-meta.Dj742jL5.js} +26 -27
- package/dist/chunks/{header-meta.CfloYa86.js.map → header-meta.Dj742jL5.js.map} +1 -1
- package/dist/chunks/{header-with-views.BUQ-MlAq.js → header-with-views.Cis2Ixho.js} +160 -164
- package/dist/chunks/header-with-views.Cis2Ixho.js.map +1 -0
- package/dist/chunks/{header.uyxNdQa3.js → header.Bo2fbjCm.js} +8 -8
- package/dist/chunks/header.Bo2fbjCm.js.map +1 -0
- package/dist/chunks/image.C2D2hKat.js.map +1 -1
- package/dist/chunks/{info-icon.CYOXx8CL.js → info-icon.BWC7gGmM.js} +7 -7
- package/dist/chunks/info-icon.BWC7gGmM.js.map +1 -0
- package/dist/chunks/info.CcMZ4aGg.js +24 -0
- package/dist/chunks/info.CcMZ4aGg.js.map +1 -0
- package/dist/chunks/{input-field-password.C1zTapiN.js → input-field-password.D6wAD55v.js} +29 -29
- package/dist/chunks/input-field-password.D6wAD55v.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.K8BYjWfa.js → input-field-phone-number.CLHuEXO7.js} +12 -11
- package/dist/chunks/{input-field-phone-number.K8BYjWfa.js.map → input-field-phone-number.CLHuEXO7.js.map} +1 -1
- package/dist/chunks/{input-field.5S-pUNxA.js → input-field.C3KYlPYa.js} +5 -5
- package/dist/chunks/input-field.C3KYlPYa.js.map +1 -0
- package/dist/chunks/{inspector.BI28vKQz.js → inspector.CH4kvF9q.js} +6 -6
- package/dist/chunks/inspector.CH4kvF9q.js.map +1 -0
- package/dist/chunks/keyboard-navigation.pB8weElW.js.map +1 -1
- package/dist/chunks/{layout-row.C_F2wX6d.js → layout-row.BLGCVZkD.js} +12 -12
- package/dist/chunks/layout-row.BLGCVZkD.js.map +1 -0
- package/dist/chunks/{link.CXy_LoFI.js → link.C4htMrDV.js} +3 -3
- package/dist/chunks/link.C4htMrDV.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.D0Cql_R3.js → listbox-option-tag.3zcrQQvI.js} +4 -4
- package/dist/chunks/listbox-option-tag.3zcrQQvI.js.map +1 -0
- package/dist/chunks/{loading-indicator.z8COalOc.js → loading-indicator.DXc7I1Lm.js} +2 -2
- package/dist/chunks/loading-indicator.DXc7I1Lm.js.map +1 -0
- package/dist/chunks/minus-small.DJacLGTw.js.map +1 -1
- package/dist/chunks/{modal-fullscreen.DHotw1RI.js → modal-fullscreen.DNxrRLZ5.js} +61 -56
- package/dist/chunks/modal-fullscreen.DNxrRLZ5.js.map +1 -0
- package/dist/chunks/{modal.eoNQ6E3U.js → modal.BjoHqKYF.js} +6 -6
- package/dist/chunks/modal.BjoHqKYF.js.map +1 -0
- package/dist/chunks/{pagination.4J7ZMyf5.js → pagination.BNjvTjtR.js} +5 -5
- package/dist/chunks/pagination.BNjvTjtR.js.map +1 -0
- package/dist/chunks/{payment-method.Cx4nPDtE.js → payment-method.DtvfUnit.js} +3 -3
- package/dist/chunks/payment-method.DtvfUnit.js.map +1 -0
- package/dist/chunks/popover.types.CiUPrUuw.js +6 -0
- package/dist/chunks/popover.types.CiUPrUuw.js.map +1 -0
- package/dist/chunks/{popper-container.DIFqmRsp.js → popper-container.BRkYcBmL.js} +3 -3
- package/dist/chunks/popper-container.BRkYcBmL.js.map +1 -0
- package/dist/chunks/{promo-banner.Bbc2U3S3.js → promo-banner.CmkrgQsm.js} +6 -6
- package/dist/chunks/promo-banner.CmkrgQsm.js.map +1 -0
- package/dist/chunks/{radio-group.4_KKjvAm.js → radio-group.ANbubbQK.js} +14 -12
- package/dist/chunks/radio-group.ANbubbQK.js.map +1 -0
- package/dist/chunks/{radio-input.uJAhxKRs.js → radio-input.D8mv2EYC.js} +2 -2
- package/dist/chunks/radio-input.D8mv2EYC.js.map +1 -0
- package/dist/chunks/{rich-text-editor.BUKLdRkN.js → rich-text-editor.DfUK2cie.js} +8 -8
- package/dist/chunks/rich-text-editor.DfUK2cie.js.map +1 -0
- package/dist/chunks/{search-bar.CuBj5FAE.js → search-bar.B4ln_DGC.js} +6 -5
- package/dist/chunks/search-bar.B4ln_DGC.js.map +1 -0
- package/dist/chunks/{secondary-nav.C6usurfD.js → secondary-nav.DGRvSeRY.js} +9 -9
- package/dist/chunks/secondary-nav.DGRvSeRY.js.map +1 -0
- package/dist/chunks/{segmented-control.DHZEfmT-.js → segmented-control.5-G1EwGt.js} +11 -11
- package/dist/chunks/segmented-control.5-G1EwGt.js.map +1 -0
- package/dist/chunks/{selection-card-group.0o5T4tab.js → selection-card-group.xs_M1a46.js} +10 -10
- package/dist/chunks/selection-card-group.xs_M1a46.js.map +1 -0
- package/dist/chunks/{sidepanel.DyThBUgV.js → sidepanel.DJAmLLPS.js} +9 -9
- package/dist/chunks/sidepanel.DJAmLLPS.js.map +1 -0
- package/dist/chunks/{status.types.p_TCvoo0.js → status.types.BpMK-6IT.js} +3 -3
- package/dist/chunks/status.types.BpMK-6IT.js.map +1 -0
- package/dist/chunks/{step.DMMofD4B.js → step.DwXkOVky.js} +5 -5
- package/dist/chunks/step.DwXkOVky.js.map +1 -0
- package/dist/chunks/{structured-list-item.Bnn6-Z3q.js → structured-list-item.TPZLf2rC.js} +7 -7
- package/dist/chunks/structured-list-item.TPZLf2rC.js.map +1 -0
- package/dist/chunks/{summary-grid.types.D_FU3sUq.js → summary-grid.types.Mua4SprI.js} +7 -7
- package/dist/chunks/{summary-grid.types.D_FU3sUq.js.map → summary-grid.types.Mua4SprI.js.map} +1 -1
- package/dist/chunks/{tab.BhWPBxcB.js → tab.ClkH0GtX.js} +5 -5
- package/dist/chunks/tab.ClkH0GtX.js.map +1 -0
- package/dist/chunks/{tag.CGkclKVL.js → tag.D1niMJDQ.js} +4 -4
- package/dist/chunks/tag.D1niMJDQ.js.map +1 -0
- package/dist/chunks/textarea.BNGBZJ3C.js +214 -0
- package/dist/chunks/textarea.BNGBZJ3C.js.map +1 -0
- package/dist/chunks/timeline-item.DYUON6R3.js +387 -0
- package/dist/chunks/timeline-item.DYUON6R3.js.map +1 -0
- package/dist/chunks/{toast.BOyeuS19.js → toast.gMDjItrP.js} +5 -5
- package/dist/chunks/toast.gMDjItrP.js.map +1 -0
- package/dist/chunks/toggle-button.COXDzXWu.js +1031 -0
- package/dist/chunks/toggle-button.COXDzXWu.js.map +1 -0
- package/dist/chunks/{toggle.DyXL09-x.js → toggle.Ct-5NUGu.js} +8 -8
- package/dist/chunks/toggle.Ct-5NUGu.js.map +1 -0
- package/dist/chunks/{tooltip.wQsyAwkC.js → tooltip.B2XJl4VK.js} +64 -60
- package/dist/chunks/tooltip.B2XJl4VK.js.map +1 -0
- package/dist/chunks/{tutorial.CxrGhLS7.js → tutorial.BiGj42TP.js} +29 -31
- package/dist/chunks/tutorial.BiGj42TP.js.map +1 -0
- package/dist/chunks/{typography.J1v_SPG3.js → typography.hlOAxsEn.js} +9 -9
- package/dist/chunks/typography.hlOAxsEn.js.map +1 -0
- package/dist/chunks/{use-bento-toast-controller.Cn_2Eogn.js → use-bento-toast-controller.BKHU1qBv.js} +2 -2
- package/dist/chunks/{use-bento-toast-controller.Cn_2Eogn.js.map → use-bento-toast-controller.BKHU1qBv.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.0EeyFfyF.js → use-cached-selected-values.ysbHRJ6L.js} +12 -12
- package/dist/chunks/use-cached-selected-values.ysbHRJ6L.js.map +1 -0
- package/dist/chunks/{use-country-items.BllTb5MK.js → use-country-items.DFdM2Ank.js} +2 -2
- package/dist/chunks/use-country-items.DFdM2Ank.js.map +1 -0
- package/dist/chunks/{use-country-phon-code.BOaJ9PDl.js → use-country-phon-code.Bui3zD6W.js} +5 -3
- package/dist/chunks/{use-country-phon-code.BOaJ9PDl.js.map → use-country-phon-code.Bui3zD6W.js.map} +1 -1
- package/dist/chunks/use-has-slot.C9lQZ6nz.js.map +1 -1
- package/dist/chunks/warning-filled.CbJ1pcB2.js +24 -0
- package/dist/chunks/warning-filled.CbJ1pcB2.js.map +1 -0
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- 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/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.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 +225 -227
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +3 -2
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +33 -32
- package/dist/internal.js.map +1 -1
- package/dist/layout.js +1 -1
- package/dist/link.js +1 -1
- package/dist/loading-indicator.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/payment-method.js +1 -1
- package/dist/popover.js +2 -2
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +2 -2
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/status.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +17 -4
- package/dist/styles/bento-light.css +17 -4
- package/dist/styles/bento.css +17 -4
- package/dist/styles/styleguide.css +17 -4
- package/dist/styles/utility.css +3 -0
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/typography.js +1 -1
- package/dist/use-form-v4.js.map +1 -1
- package/dist/web-types.json +1825 -740
- package/package.json +9 -13
- package/dist/assets/button-actions.css +0 -1
- package/dist/assets/menu.css +0 -1
- package/dist/assets/popover.css +0 -1
- package/dist/assets/teleport.css +0 -1
- package/dist/chunks/accordion-item.BNtdoVto.js.map +0 -1
- package/dist/chunks/action-bar.DQb7WVVd.js.map +0 -1
- package/dist/chunks/alert.c1rhDDrU.js.map +0 -1
- package/dist/chunks/avatar.BgwjpLQO.js.map +0 -1
- package/dist/chunks/base-button.-gx_u8Bd.js.map +0 -1
- package/dist/chunks/base-modal.CkkfT6r6.js.map +0 -1
- package/dist/chunks/base-modal.keys.C2PQXcE2.js +0 -5
- package/dist/chunks/base-modal.keys.C2PQXcE2.js.map +0 -1
- package/dist/chunks/bin.DLXkAVvw.js +0 -24
- package/dist/chunks/bin.DLXkAVvw.js.map +0 -1
- package/dist/chunks/button-actions-with-menu.nPj7sdGE.js +0 -83
- package/dist/chunks/button-actions-with-menu.nPj7sdGE.js.map +0 -1
- package/dist/chunks/button-actions.Ju27CRNG.js +0 -194
- package/dist/chunks/button-actions.Ju27CRNG.js.map +0 -1
- package/dist/chunks/button.hF-nD1Og.js.map +0 -1
- package/dist/chunks/calendar.DvIQEYwN.js.map +0 -1
- package/dist/chunks/card.CASAAsuJ.js.map +0 -1
- package/dist/chunks/checkbox-group.QdX-NrSG.js.map +0 -1
- package/dist/chunks/checkbox-input.CNWigbX4.js.map +0 -1
- package/dist/chunks/checkbox.DCD6SSXC.js.map +0 -1
- package/dist/chunks/chip.OV0EWIP3.js.map +0 -1
- package/dist/chunks/code-snippet.dIKi0D7d.js.map +0 -1
- package/dist/chunks/controls-group.CccuLkgP.js.map +0 -1
- package/dist/chunks/copy.CF8Fzu2Y.js.map +0 -1
- package/dist/chunks/country.melpzEsY.js.map +0 -1
- package/dist/chunks/currency.BM9OXTqe.js.map +0 -1
- package/dist/chunks/dashed-underline.BbH6Lnd2.js.map +0 -1
- package/dist/chunks/data-grid-template.Co0Ecr79.js.map +0 -1
- package/dist/chunks/data-grid.erxjh5TN.js.map +0 -1
- package/dist/chunks/date-picker.DGIS6Pp-.js.map +0 -1
- package/dist/chunks/date-range-picker.CIaKRXIQ.js +0 -1021
- package/dist/chunks/date-range-picker.CIaKRXIQ.js.map +0 -1
- package/dist/chunks/dialog-page.CLHZqQeU.js.map +0 -1
- package/dist/chunks/divider.Cc4JFWG_.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.94q6opSD.js.map +0 -1
- package/dist/chunks/dropdown-tag.BaosvGGZ.js +0 -240
- package/dist/chunks/dropdown-tag.BaosvGGZ.js.map +0 -1
- package/dist/chunks/dropdown.DazYAy4B.js.map +0 -1
- package/dist/chunks/empty-state.mtXfb1BB.js.map +0 -1
- package/dist/chunks/es6.n1ewaW31.js +0 -11
- package/dist/chunks/es6.n1ewaW31.js.map +0 -1
- package/dist/chunks/file-uploader.BPslxGI8.js.map +0 -1
- package/dist/chunks/filter-bar.DL19SXF1.js.map +0 -1
- package/dist/chunks/focus-trap.C-wIQqpO.js.map +0 -1
- package/dist/chunks/footer-actions.BE_zzX-e.js.map +0 -1
- package/dist/chunks/form-layout-title.CIynHgCF.js.map +0 -1
- package/dist/chunks/grid-layout.HvTAa4to.js.map +0 -1
- package/dist/chunks/header-with-views.BUQ-MlAq.js.map +0 -1
- package/dist/chunks/header.uyxNdQa3.js.map +0 -1
- package/dist/chunks/info-icon.CYOXx8CL.js.map +0 -1
- package/dist/chunks/info.CszJ0kMi.js +0 -24
- package/dist/chunks/info.CszJ0kMi.js.map +0 -1
- package/dist/chunks/input-field-password.C1zTapiN.js.map +0 -1
- package/dist/chunks/input-field.5S-pUNxA.js.map +0 -1
- package/dist/chunks/inspector.BI28vKQz.js.map +0 -1
- package/dist/chunks/layout-row.C_F2wX6d.js.map +0 -1
- package/dist/chunks/link.CXy_LoFI.js.map +0 -1
- package/dist/chunks/listbox-option-tag.D0Cql_R3.js.map +0 -1
- package/dist/chunks/loading-indicator.z8COalOc.js.map +0 -1
- package/dist/chunks/menu.D0OQgk40.js +0 -515
- package/dist/chunks/menu.D0OQgk40.js.map +0 -1
- package/dist/chunks/modal-fullscreen.DHotw1RI.js.map +0 -1
- package/dist/chunks/modal-fullscreen.keys.CMba3hYp.js +0 -5
- package/dist/chunks/modal-fullscreen.keys.CMba3hYp.js.map +0 -1
- package/dist/chunks/modal.eoNQ6E3U.js.map +0 -1
- package/dist/chunks/pagination.4J7ZMyf5.js.map +0 -1
- package/dist/chunks/payment-method.Cx4nPDtE.js.map +0 -1
- package/dist/chunks/popover.Bo4Bkudr.js +0 -145
- package/dist/chunks/popover.Bo4Bkudr.js.map +0 -1
- package/dist/chunks/popover.types.CBqyA4ly.js +0 -6
- package/dist/chunks/popover.types.CBqyA4ly.js.map +0 -1
- package/dist/chunks/popper-container.DIFqmRsp.js.map +0 -1
- package/dist/chunks/promo-banner.Bbc2U3S3.js.map +0 -1
- package/dist/chunks/radio-group.4_KKjvAm.js.map +0 -1
- package/dist/chunks/radio-input.uJAhxKRs.js.map +0 -1
- package/dist/chunks/rich-text-editor.BUKLdRkN.js.map +0 -1
- package/dist/chunks/search-bar.CuBj5FAE.js.map +0 -1
- package/dist/chunks/secondary-nav.C6usurfD.js.map +0 -1
- package/dist/chunks/segmented-control.DHZEfmT-.js.map +0 -1
- package/dist/chunks/selection-card-group.0o5T4tab.js.map +0 -1
- package/dist/chunks/sidepanel.DyThBUgV.js.map +0 -1
- package/dist/chunks/sidepanel.keys.R0DKQuYx.js +0 -5
- package/dist/chunks/sidepanel.keys.R0DKQuYx.js.map +0 -1
- package/dist/chunks/status.types.p_TCvoo0.js.map +0 -1
- package/dist/chunks/step.DMMofD4B.js.map +0 -1
- package/dist/chunks/structured-list-item.Bnn6-Z3q.js.map +0 -1
- package/dist/chunks/tab.BhWPBxcB.js.map +0 -1
- package/dist/chunks/tag.CGkclKVL.js.map +0 -1
- package/dist/chunks/teleport.BV6zrDjA.js +0 -128
- package/dist/chunks/teleport.BV6zrDjA.js.map +0 -1
- package/dist/chunks/textarea.UPM6N9V1.js +0 -203
- package/dist/chunks/textarea.UPM6N9V1.js.map +0 -1
- package/dist/chunks/timeline-item.DqLhj0Lb.js +0 -385
- package/dist/chunks/timeline-item.DqLhj0Lb.js.map +0 -1
- package/dist/chunks/toast.BOyeuS19.js.map +0 -1
- package/dist/chunks/toggle-button.DEVVvpkw.js +0 -83
- package/dist/chunks/toggle-button.DEVVvpkw.js.map +0 -1
- package/dist/chunks/toggle.DyXL09-x.js.map +0 -1
- package/dist/chunks/tooltip.wQsyAwkC.js.map +0 -1
- package/dist/chunks/tutorial.CxrGhLS7.js.map +0 -1
- package/dist/chunks/typography.J1v_SPG3.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.0EeyFfyF.js.map +0 -1
- package/dist/chunks/use-click-outside.BnhTgpSt.js +0 -14
- package/dist/chunks/use-click-outside.BnhTgpSt.js.map +0 -1
- package/dist/chunks/use-country-items.BllTb5MK.js.map +0 -1
- package/dist/chunks/warning-filled.tWOyLUQT.js +0 -24
- package/dist/chunks/warning-filled.tWOyLUQT.js.map +0 -1
- package/dist/styles/legacy.css +0 -2226
|
@@ -0,0 +1,967 @@
|
|
|
1
|
+
import { reactive as fe, defineComponent as Ye, ref as M, computed as I, onMounted as Qe, toRaw as ye, toRef as Ee, watch as Te } from "vue";
|
|
2
|
+
import { B as it } from "./divider.CFbtmKeQ.js";
|
|
3
|
+
import { h as ot, B as lt } from "./toggle-button.COXDzXWu.js";
|
|
4
|
+
import { B as je, d as ut } from "./typography.hlOAxsEn.js";
|
|
5
|
+
import { D as dt } from "./dropdown-default-textbox.CDm-PQfc.js";
|
|
6
|
+
import { e as U, a as he, g as _e } from "./get-date-locale.CAyOIbcp.js";
|
|
7
|
+
import { g as oe } from "./generate-uid.NJ8tVoha.js";
|
|
8
|
+
import { u as Re } from "./i18n.BQkEbtPM.js";
|
|
9
|
+
import { e as $e, t as te, g as le, i as F, h as C, j as Oe, k as ct, l as we, m as Dt, s as Me, n as mt, o as Ce, a as $, u as ft, f as ee } from "./calendar.DYI4omOF.js";
|
|
10
|
+
import { r as O, t as q } from "./index.BrH1t1iu.js";
|
|
11
|
+
import { f as Ae, v as vt, D as S } from "./date-input.BqBdAO1E.js";
|
|
12
|
+
import { u as pt } from "./use-form-layout-loading.D3lALhtC.js";
|
|
13
|
+
import "./index.Cl4_42j5.js";
|
|
14
|
+
import { B as gt } from "./input-field.C3KYlPYa.js";
|
|
15
|
+
import { B as Tt } from "./dropdown.CEZXrC1C.js";
|
|
16
|
+
import { B as yt } from "./segmented-control.5-G1EwGt.js";
|
|
17
|
+
import { d as ce } from "./debounce.DUTu11PS.js";
|
|
18
|
+
import { u as _t } from "./use-has-slot.C9lQZ6nz.js";
|
|
19
|
+
import { n as Ge } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
20
|
+
import { B as Rt } from "./directive.Cbdox5VL.js";
|
|
21
|
+
import { F as It, E as bt } from "./error-message.D_QAOG-5.js";
|
|
22
|
+
import { B as St } from "./button-actions.types.BptAXjD8.js";
|
|
23
|
+
import "../assets/date-range-picker.css";
|
|
24
|
+
function He(t, e) {
|
|
25
|
+
O(2, arguments);
|
|
26
|
+
var n = te(e), r = n * 3;
|
|
27
|
+
return $e(t, r);
|
|
28
|
+
}
|
|
29
|
+
function Fe(t) {
|
|
30
|
+
O(1, arguments);
|
|
31
|
+
var e = q(t), n = Math.floor(e.getMonth() / 3) + 1;
|
|
32
|
+
return n;
|
|
33
|
+
}
|
|
34
|
+
function xe(t) {
|
|
35
|
+
return O(1, arguments), q(t).getFullYear();
|
|
36
|
+
}
|
|
37
|
+
function De(t, e) {
|
|
38
|
+
O(2, arguments);
|
|
39
|
+
var n = q(t), r = q(e);
|
|
40
|
+
return n.getTime() === r.getTime();
|
|
41
|
+
}
|
|
42
|
+
function kt(t, e) {
|
|
43
|
+
O(2, arguments);
|
|
44
|
+
var n = le(t), r = le(e);
|
|
45
|
+
return n.getTime() === r.getTime();
|
|
46
|
+
}
|
|
47
|
+
function Ue(t) {
|
|
48
|
+
O(1, arguments);
|
|
49
|
+
var e = q(t);
|
|
50
|
+
return e.setMilliseconds(0), e;
|
|
51
|
+
}
|
|
52
|
+
function Be(t, e) {
|
|
53
|
+
O(2, arguments);
|
|
54
|
+
var n = Ue(t), r = Ue(e);
|
|
55
|
+
return n.getTime() === r.getTime();
|
|
56
|
+
}
|
|
57
|
+
function Et(t) {
|
|
58
|
+
return O(1, arguments), F(t, Date.now());
|
|
59
|
+
}
|
|
60
|
+
function ht(t, e) {
|
|
61
|
+
O(2, arguments);
|
|
62
|
+
var n = q(t), r = te(e);
|
|
63
|
+
return n.setHours(r), n;
|
|
64
|
+
}
|
|
65
|
+
function Ne(t, e) {
|
|
66
|
+
O(2, arguments);
|
|
67
|
+
var n = q(t), r = te(e);
|
|
68
|
+
return n.setMilliseconds(r), n;
|
|
69
|
+
}
|
|
70
|
+
function Ot(t, e) {
|
|
71
|
+
O(2, arguments);
|
|
72
|
+
var n = q(t), r = te(e);
|
|
73
|
+
return n.setMinutes(r), n;
|
|
74
|
+
}
|
|
75
|
+
function wt(t, e) {
|
|
76
|
+
O(2, arguments);
|
|
77
|
+
var n = q(t), r = te(e);
|
|
78
|
+
return n.setSeconds(r), n;
|
|
79
|
+
}
|
|
80
|
+
function Mt(t, e) {
|
|
81
|
+
O(2, arguments);
|
|
82
|
+
var n = te(e);
|
|
83
|
+
return He(t, -n);
|
|
84
|
+
}
|
|
85
|
+
function z(t) {
|
|
86
|
+
if (t == null)
|
|
87
|
+
return C(/* @__PURE__ */ new Date());
|
|
88
|
+
const [e, n, r] = t.split("-").map((l) => parseInt(l, 10));
|
|
89
|
+
return new Date(e, n - 1, r);
|
|
90
|
+
}
|
|
91
|
+
const Ct = ({
|
|
92
|
+
firstDayOfWeek: t,
|
|
93
|
+
min: e,
|
|
94
|
+
max: n
|
|
95
|
+
}) => ({ getGranularCalendarLimits: (l) => {
|
|
96
|
+
let c = C(e), m = U(n);
|
|
97
|
+
if ((l == null ? void 0 : l.type) === "weekly") {
|
|
98
|
+
if (l.earliest)
|
|
99
|
+
c = C(l.earliest);
|
|
100
|
+
else {
|
|
101
|
+
const _ = Oe(c, { weekStartsOn: t });
|
|
102
|
+
F(c, _) || (c = C(ct(we(c, { weekStartsOn: t }), 1)));
|
|
103
|
+
}
|
|
104
|
+
if (l.latest)
|
|
105
|
+
m = U(l.latest);
|
|
106
|
+
else {
|
|
107
|
+
const _ = we(m, { weekStartsOn: t });
|
|
108
|
+
F(m, _) || (m = U(Dt(Oe(m, { weekStartsOn: t }), 1)));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if ((l == null ? void 0 : l.type) === "monthly") {
|
|
112
|
+
if (l.earliest)
|
|
113
|
+
c = C(l.earliest);
|
|
114
|
+
else {
|
|
115
|
+
const _ = Me(c);
|
|
116
|
+
F(c, _) || (c = Me($e(c, 1)));
|
|
117
|
+
}
|
|
118
|
+
if (l.latest)
|
|
119
|
+
m = U(l.latest);
|
|
120
|
+
else {
|
|
121
|
+
const _ = he(m);
|
|
122
|
+
F(m, _) || (m = he(mt(m, 1)));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if ((l == null ? void 0 : l.type) === "quarterly") {
|
|
126
|
+
if (l.earliest)
|
|
127
|
+
c = le(l.earliest);
|
|
128
|
+
else {
|
|
129
|
+
const _ = le(c);
|
|
130
|
+
F(c, _) || (c = le(He(c, 1)));
|
|
131
|
+
}
|
|
132
|
+
if (l.latest)
|
|
133
|
+
m = U(l.latest);
|
|
134
|
+
else {
|
|
135
|
+
const _ = Ce(m);
|
|
136
|
+
F(m, _) || (m = Ce(Mt(m, 1)));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return { min: c, max: m };
|
|
140
|
+
} }), At = () => {
|
|
141
|
+
const t = fe({
|
|
142
|
+
daily: null,
|
|
143
|
+
weekly: null,
|
|
144
|
+
monthly: null,
|
|
145
|
+
quarterly: null
|
|
146
|
+
});
|
|
147
|
+
return {
|
|
148
|
+
savedRanges: t,
|
|
149
|
+
saveRange: (r, l) => {
|
|
150
|
+
t[r] = l;
|
|
151
|
+
},
|
|
152
|
+
resetSavedRanges: () => {
|
|
153
|
+
t.daily = null, t.weekly = null, t.monthly = null, t.quarterly = null;
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
var p = /* @__PURE__ */ ((t) => (t.CUSTOM_RANGE = "custom-range", t.INPUT = "input", t.ERROR = "error", t.FORM_DATE = "form-date", t.START_DATE_SELECTED = "start-date-selected", t))(p || {});
|
|
158
|
+
const Ft = /[\d]/, xt = /^\d{2}$/, Ut = /^\d{2}:\d{2}$/, Bt = (t) => {
|
|
159
|
+
const { selectionStart: e } = t.target, n = ["Backspace", "Tab", "ArrowLeft", "ArrowRight"], r = Ft.test(t.key) || n.includes(t.key), l = [1, 2, 4, 5].includes(e) && t.key === ":";
|
|
160
|
+
!r && !l && t.preventDefault();
|
|
161
|
+
}, Pe = (t) => {
|
|
162
|
+
if (!t)
|
|
163
|
+
return t;
|
|
164
|
+
let e = t;
|
|
165
|
+
if (e.length === 1 && parseInt(t, 10) > 2)
|
|
166
|
+
return `0${e}:`;
|
|
167
|
+
const [n, r] = e.slice(-2);
|
|
168
|
+
return [2, 5].includes(e.length) && r === ":" && (e = `${e.slice(0, e.length - 2)}0${n}`), (xt.test(e) || Ut.test(e)) && (e += ":"), e;
|
|
169
|
+
}, Nt = {
|
|
170
|
+
"en-US": {
|
|
171
|
+
customRange: "Custom range",
|
|
172
|
+
daily: "Daily",
|
|
173
|
+
dateFrom: "Date from",
|
|
174
|
+
dateTo: "Date to",
|
|
175
|
+
lastMonth: "Last month",
|
|
176
|
+
lastSevenDays: "Last 7 days",
|
|
177
|
+
lastThreeMonths: "Last three months",
|
|
178
|
+
monthly: "Monthly",
|
|
179
|
+
quarterly: "Quarterly",
|
|
180
|
+
timeFrom: "Time from",
|
|
181
|
+
timeTo: "Time to",
|
|
182
|
+
weekly: "Weekly"
|
|
183
|
+
},
|
|
184
|
+
"ja-JP": {
|
|
185
|
+
customRange: "カスタム範囲を選択",
|
|
186
|
+
daily: "毎日",
|
|
187
|
+
lastMonth: "先月",
|
|
188
|
+
lastSevenDays: "過去7日間",
|
|
189
|
+
monthly: "毎月",
|
|
190
|
+
weekly: "毎週"
|
|
191
|
+
},
|
|
192
|
+
"pt-BR": {
|
|
193
|
+
customRange: "Selecione um intervalo personalizado",
|
|
194
|
+
daily: "Diário",
|
|
195
|
+
lastMonth: "Último mês",
|
|
196
|
+
lastSevenDays: "Últimos 7 dias",
|
|
197
|
+
monthly: "Mensal",
|
|
198
|
+
weekly: "Semanal"
|
|
199
|
+
}
|
|
200
|
+
}, qe = 300, Le = "customRange", Pt = Ye({
|
|
201
|
+
i18n: { messages: Nt },
|
|
202
|
+
name: "date-range-picker-calendar",
|
|
203
|
+
components: {
|
|
204
|
+
BentoDropdown: Tt,
|
|
205
|
+
BentoInputField: gt,
|
|
206
|
+
BentoSegmentedControl: yt,
|
|
207
|
+
BentoTypography: je,
|
|
208
|
+
Calendar: $
|
|
209
|
+
},
|
|
210
|
+
props: {
|
|
211
|
+
/**
|
|
212
|
+
* Allows user to enter time values in the form
|
|
213
|
+
*/
|
|
214
|
+
allowTimeInput: { type: Boolean, default: !1 },
|
|
215
|
+
/**
|
|
216
|
+
* Ranges form persistance data
|
|
217
|
+
*/
|
|
218
|
+
dateFormData: {
|
|
219
|
+
type: Object,
|
|
220
|
+
default: () => ({ startDate: void 0, endDate: void 0, startTime: void 0, endTime: void 0 })
|
|
221
|
+
},
|
|
222
|
+
/**
|
|
223
|
+
* Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
|
|
224
|
+
*/
|
|
225
|
+
firstDayOfWeek: $.props.firstDayOfWeek,
|
|
226
|
+
/**
|
|
227
|
+
* A list of available granularities.
|
|
228
|
+
* If present, the date picker will display a segmented control to change granularity.
|
|
229
|
+
*/
|
|
230
|
+
granularities: {
|
|
231
|
+
type: Array,
|
|
232
|
+
default: null
|
|
233
|
+
},
|
|
234
|
+
/**
|
|
235
|
+
* Indicate if a date should be disabled or not
|
|
236
|
+
*/
|
|
237
|
+
isDateDisabled: $.props.isDateDisabled,
|
|
238
|
+
/**
|
|
239
|
+
* Set a maximum number of dates to be selectable by the range.
|
|
240
|
+
*/
|
|
241
|
+
maxRange: $.props.maxRange,
|
|
242
|
+
/**
|
|
243
|
+
* Sets a minimum limit for selectable dates - dates before `min` will not be selectable
|
|
244
|
+
*/
|
|
245
|
+
min: $.props.min,
|
|
246
|
+
/**
|
|
247
|
+
* Sets a maximum limit for selectable dates - dates after `max` will not be selectable
|
|
248
|
+
*/
|
|
249
|
+
max: $.props.max,
|
|
250
|
+
/**
|
|
251
|
+
* Number of months rendered on pane
|
|
252
|
+
*/
|
|
253
|
+
numberOfMonths: $.props.numberOfMonths,
|
|
254
|
+
/**
|
|
255
|
+
* Displays the end date's month when the calendar is opened. Defaults to false i.e. the start date's month is displayed.
|
|
256
|
+
*/
|
|
257
|
+
showEndDateOnOpen: { type: Boolean, default: !1 },
|
|
258
|
+
/**
|
|
259
|
+
* Enables the custom range selector.
|
|
260
|
+
* If provided, must be an array that sets the custom range dropdown items. Items are of the structure:
|
|
261
|
+
* `label` - label of custom range item.
|
|
262
|
+
* `value` - a unique key of the custom range item.
|
|
263
|
+
* `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.
|
|
264
|
+
*/
|
|
265
|
+
quickSelectRanges: {
|
|
266
|
+
type: Array,
|
|
267
|
+
default: void 0
|
|
268
|
+
},
|
|
269
|
+
/**
|
|
270
|
+
* Selected date
|
|
271
|
+
*/
|
|
272
|
+
value: { type: Object, default: void 0 },
|
|
273
|
+
/**
|
|
274
|
+
* The type of calendar to display. Defaults to showing days.
|
|
275
|
+
*/
|
|
276
|
+
variant: $.props.variant
|
|
277
|
+
},
|
|
278
|
+
emits: [
|
|
279
|
+
p.CUSTOM_RANGE,
|
|
280
|
+
p.INPUT,
|
|
281
|
+
p.ERROR,
|
|
282
|
+
p.FORM_DATE,
|
|
283
|
+
p.START_DATE_SELECTED
|
|
284
|
+
],
|
|
285
|
+
setup(t, { emit: e, slots: n }) {
|
|
286
|
+
var Ie, be, Se, ke;
|
|
287
|
+
const { locale: r, t: l } = Re(), c = _e(), m = M({}), _ = I(() => t.variant === "month" ? "monthly" : "daily"), s = fe({
|
|
288
|
+
startDate: (Ie = t.value) == null ? void 0 : Ie.startDate,
|
|
289
|
+
endDate: (be = t.value) == null ? void 0 : be.endDate,
|
|
290
|
+
range: (Se = t.value) == null ? void 0 : Se.range,
|
|
291
|
+
...t.granularities ? {
|
|
292
|
+
granularity: ((ke = t.value) == null ? void 0 : ke.granularity) || _.value
|
|
293
|
+
} : {}
|
|
294
|
+
});
|
|
295
|
+
function g(a) {
|
|
296
|
+
return a ? new Date(
|
|
297
|
+
a.getUTCFullYear(),
|
|
298
|
+
a.getUTCMonth(),
|
|
299
|
+
a.getUTCDate(),
|
|
300
|
+
a.getUTCHours(),
|
|
301
|
+
a.getUTCMinutes(),
|
|
302
|
+
a.getUTCSeconds()
|
|
303
|
+
) : null;
|
|
304
|
+
}
|
|
305
|
+
const A = I(() => {
|
|
306
|
+
var a, o;
|
|
307
|
+
return (
|
|
308
|
+
// eslint-disable-next-line consistent-return
|
|
309
|
+
((o = (a = t == null ? void 0 : t.quickSelectRanges) == null ? void 0 : a.find(({ value: u, data: d }) => {
|
|
310
|
+
var b;
|
|
311
|
+
if (!d.endDate) {
|
|
312
|
+
if (d.isRelativeToNow) {
|
|
313
|
+
const h = (b = m.value) == null ? void 0 : b[u];
|
|
314
|
+
return h ? De(
|
|
315
|
+
g(h.startDate),
|
|
316
|
+
g(s.startDate)
|
|
317
|
+
) && De(
|
|
318
|
+
g(h.endDate),
|
|
319
|
+
g(s.endDate)
|
|
320
|
+
) : (
|
|
321
|
+
// If not stored calculated dates, fall back to comparing the quick select item's value
|
|
322
|
+
// with the internal range's stored range identifier.
|
|
323
|
+
u === s.range
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
return De(
|
|
327
|
+
g(d.startDate),
|
|
328
|
+
g(s.startDate)
|
|
329
|
+
) && De(
|
|
330
|
+
g(s.endDate),
|
|
331
|
+
g(U(s.endDate))
|
|
332
|
+
) && Et(g(s.endDate));
|
|
333
|
+
}
|
|
334
|
+
if (t.allowTimeInput)
|
|
335
|
+
return Be(
|
|
336
|
+
g(d.startDate),
|
|
337
|
+
g(s.startDate)
|
|
338
|
+
) && Be(g(d.endDate), g(s.endDate));
|
|
339
|
+
if (d.endDate)
|
|
340
|
+
return F(d.startDate, s.startDate) && F(d.endDate, s.endDate);
|
|
341
|
+
})) == null ? void 0 : o.value) ?? Le
|
|
342
|
+
);
|
|
343
|
+
}), ue = I(() => ({
|
|
344
|
+
"b-date-range-picker-calendar__form-input-wrapper": t.allowTimeInput
|
|
345
|
+
})), G = I(() => [
|
|
346
|
+
{ label: l("customRange"), value: Le },
|
|
347
|
+
...t.quickSelectRanges ? t.quickSelectRanges : []
|
|
348
|
+
]), T = I(
|
|
349
|
+
() => {
|
|
350
|
+
var a;
|
|
351
|
+
return ((a = t.granularities) == null ? void 0 : a.find(({ type: o }) => o === s.granularity)) || null;
|
|
352
|
+
}
|
|
353
|
+
), J = I(
|
|
354
|
+
() => {
|
|
355
|
+
var a;
|
|
356
|
+
return ((a = t.granularities) == null ? void 0 : a.map(({ type: o, disabled: u }) => ({
|
|
357
|
+
label: l(o),
|
|
358
|
+
value: o,
|
|
359
|
+
disabled: u
|
|
360
|
+
}))) ?? [];
|
|
361
|
+
}
|
|
362
|
+
), { getGranularCalendarLimits: k } = Ct(t), f = I(
|
|
363
|
+
() => t.granularities ? k(T.value) : { min: C(t.min), max: U(t.max) }
|
|
364
|
+
), {
|
|
365
|
+
adjustDateForQuarterly: L,
|
|
366
|
+
adjustDateForMonthly: X,
|
|
367
|
+
adjustDateForWeekly: H,
|
|
368
|
+
adjustStartDateInputForWeekly: E,
|
|
369
|
+
adjustEndDateInputForWeekly: v,
|
|
370
|
+
adjustStartDateInputForMonthly: B,
|
|
371
|
+
adjustEndDateInputForMonthly: ae,
|
|
372
|
+
adjustStartDateInputForQuarterly: ve,
|
|
373
|
+
adjustEndDateInputForQuarterly: ne
|
|
374
|
+
} = ft(t.firstDayOfWeek), { savedRanges: Y, saveRange: re, resetSavedRanges: Z } = At(), y = (a) => a ? ee(a, S.NUMERIC_DATE_YEAR_FIRST, {
|
|
375
|
+
locale: c[r.value.substring(0, 2)] || c.enUS
|
|
376
|
+
}) : "", w = (a) => a ? ee(a, S.HOUR_MINUTE_SECONDS, {
|
|
377
|
+
locale: c[r.value.substring(0, 2)] || c.enUS
|
|
378
|
+
}) : "", V = M(!1), W = M(!1), N = M(!1), Q = M(!1), i = fe({
|
|
379
|
+
startDate: t.dateFormData.startDate,
|
|
380
|
+
endDate: t.dateFormData.endDate,
|
|
381
|
+
startTime: t.dateFormData.startTime,
|
|
382
|
+
endTime: t.dateFormData.endTime
|
|
383
|
+
}), pe = (a, o) => {
|
|
384
|
+
let u = new Date(a);
|
|
385
|
+
const [d, b, h] = o.split(":");
|
|
386
|
+
return u = ht(u, parseInt(d, 10)), u = Ot(u, parseInt(b, 10)), u = wt(u, parseInt(h, 10)), u;
|
|
387
|
+
}, ge = (a) => /^(?:[01]\d|2[01234]):(?:[012345]\d):(?:[012345]\d)$/.test(a), se = (a, o) => {
|
|
388
|
+
const u = () => {
|
|
389
|
+
if (o && R(o)) {
|
|
390
|
+
const d = pe(new Date(o), a);
|
|
391
|
+
if (t.min && d < Ne(t.min, 0) || t.max && d > Ne(t.max, 0))
|
|
392
|
+
return !1;
|
|
393
|
+
}
|
|
394
|
+
return !0;
|
|
395
|
+
};
|
|
396
|
+
return ge(a) && u();
|
|
397
|
+
}, x = (a, o) => !o || !ge(o) || t.variant === "month" ? a : pe(new Date(a), o), D = (a) => {
|
|
398
|
+
i.startTime = w(
|
|
399
|
+
t.min && t.allowTimeInput && F(t.min, a.startDate) ? t.min : C(a.startDate)
|
|
400
|
+
), i.endTime = w(
|
|
401
|
+
t.max && t.allowTimeInput && F(t.max, a.endDate) ? t.max : U(a.endDate)
|
|
402
|
+
), s.startDate = x(a.startDate, i.startTime), s.endDate = x(a.endDate, i.endTime), s.range = null, t.granularities && Z(), e(p.INPUT, {
|
|
403
|
+
...s,
|
|
404
|
+
range: A.value
|
|
405
|
+
});
|
|
406
|
+
}, R = (a) => {
|
|
407
|
+
const o = (d) => t.min && C(d) < C(t.min) || t.max && C(d) > C(t.max) ? !1 : t.isDateDisabled ? !t.isDateDisabled(C(d)) : !0;
|
|
408
|
+
return /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(a) && o(new Date(a));
|
|
409
|
+
};
|
|
410
|
+
Qe(() => {
|
|
411
|
+
V.value = !!(t.dateFormData.startDate && !R(t.dateFormData.startDate)), t.allowTimeInput ? N.value = !!(t.dateFormData.startTime && !se(t.dateFormData.startTime, t.dateFormData.startDate)) : N.value = !1, W.value = !!(t.dateFormData.endDate && !R(t.dateFormData.endDate)), t.allowTimeInput ? Q.value = !!(t.dateFormData.endTime && !se(t.dateFormData.endTime, t.dateFormData.endDate)) : Q.value = !1;
|
|
412
|
+
});
|
|
413
|
+
const K = (a) => {
|
|
414
|
+
var o;
|
|
415
|
+
i.startDate = y(a), i.startTime ? N.value && (i.startTime = (o = t.dateFormData) == null ? void 0 : o.startTime) : i.startTime = w(a), V.value = !1, N.value = !1, e(p.START_DATE_SELECTED, a);
|
|
416
|
+
}, j = (a) => {
|
|
417
|
+
var o;
|
|
418
|
+
i.endDate = y(a), i.endTime ? Q.value && (i.endTime = (o = t.dateFormData) == null ? void 0 : o.endTime) : i.endTime = w(U(a)), W.value = !1, Q.value = !1;
|
|
419
|
+
}, ie = (a) => {
|
|
420
|
+
const o = t.value[a];
|
|
421
|
+
if (o)
|
|
422
|
+
return o;
|
|
423
|
+
if (t.dateFormData[a] && R(t.dateFormData[a]))
|
|
424
|
+
return new Date(t.dateFormData[a]);
|
|
425
|
+
}, Ve = ce((a) => {
|
|
426
|
+
var o;
|
|
427
|
+
if (R(a)) {
|
|
428
|
+
let u = a;
|
|
429
|
+
switch (V.value = !1, (o = T.value) == null ? void 0 : o.type) {
|
|
430
|
+
case "weekly":
|
|
431
|
+
u = E(
|
|
432
|
+
a,
|
|
433
|
+
y,
|
|
434
|
+
f.value.min,
|
|
435
|
+
f.value.max
|
|
436
|
+
), i.startDate = u;
|
|
437
|
+
break;
|
|
438
|
+
case "monthly":
|
|
439
|
+
u = B(
|
|
440
|
+
a,
|
|
441
|
+
y,
|
|
442
|
+
f.value.min,
|
|
443
|
+
f.value.max
|
|
444
|
+
), i.startDate = u;
|
|
445
|
+
break;
|
|
446
|
+
case "quarterly":
|
|
447
|
+
u = ve(
|
|
448
|
+
a,
|
|
449
|
+
y,
|
|
450
|
+
f.value.min,
|
|
451
|
+
f.value.max
|
|
452
|
+
), i.startDate = u;
|
|
453
|
+
break;
|
|
454
|
+
}
|
|
455
|
+
const d = z(u);
|
|
456
|
+
s.startDate = x(d, i.startTime), s.endDate = x(
|
|
457
|
+
z(i.endDate),
|
|
458
|
+
i.endTime
|
|
459
|
+
), R(i.endDate) && (s.endDate = x(
|
|
460
|
+
z(i.endDate),
|
|
461
|
+
i.endTime
|
|
462
|
+
));
|
|
463
|
+
const b = ie("endDate");
|
|
464
|
+
s.range = null, e(p.FORM_DATE, {
|
|
465
|
+
startDate: d,
|
|
466
|
+
endDate: b
|
|
467
|
+
}), e(p.INPUT, {
|
|
468
|
+
...s,
|
|
469
|
+
range: A.value
|
|
470
|
+
});
|
|
471
|
+
} else
|
|
472
|
+
V.value = !0, e(p.ERROR, { ...i });
|
|
473
|
+
}, qe), We = (a) => {
|
|
474
|
+
i.startDate = Ae(a), Ve(i.startDate);
|
|
475
|
+
}, Ke = ce((a) => {
|
|
476
|
+
var o;
|
|
477
|
+
if (R(a)) {
|
|
478
|
+
let u = a;
|
|
479
|
+
switch (W.value = !1, (o = T.value) == null ? void 0 : o.type) {
|
|
480
|
+
case "weekly":
|
|
481
|
+
u = v(
|
|
482
|
+
a,
|
|
483
|
+
y,
|
|
484
|
+
f.value.min,
|
|
485
|
+
f.value.max
|
|
486
|
+
), i.endDate = u;
|
|
487
|
+
break;
|
|
488
|
+
case "monthly":
|
|
489
|
+
u = ae(
|
|
490
|
+
a,
|
|
491
|
+
y,
|
|
492
|
+
f.value.min,
|
|
493
|
+
f.value.max
|
|
494
|
+
), i.endDate = u;
|
|
495
|
+
break;
|
|
496
|
+
case "quarterly":
|
|
497
|
+
u = ne(
|
|
498
|
+
a,
|
|
499
|
+
y,
|
|
500
|
+
f.value.min,
|
|
501
|
+
f.value.max
|
|
502
|
+
), i.endDate = u;
|
|
503
|
+
break;
|
|
504
|
+
}
|
|
505
|
+
const d = z(u);
|
|
506
|
+
s.endDate = x(d, i.endTime), R(i.startDate) && (s.startDate = x(
|
|
507
|
+
z(i.startDate),
|
|
508
|
+
i.startTime
|
|
509
|
+
));
|
|
510
|
+
const b = ie("startDate");
|
|
511
|
+
s.range = null, e(p.FORM_DATE, {
|
|
512
|
+
startDate: b,
|
|
513
|
+
endDate: d
|
|
514
|
+
}), e(p.INPUT, {
|
|
515
|
+
...s,
|
|
516
|
+
range: A.value
|
|
517
|
+
});
|
|
518
|
+
} else
|
|
519
|
+
W.value = !0, e(p.ERROR, { ...i });
|
|
520
|
+
}, qe), ze = (a) => {
|
|
521
|
+
i.endDate = Ae(a), Ke(i.endDate);
|
|
522
|
+
}, Je = (a) => {
|
|
523
|
+
vt(a);
|
|
524
|
+
}, Xe = ce((a) => {
|
|
525
|
+
if (se(a, t.dateFormData.startDate)) {
|
|
526
|
+
N.value = !1, s.startDate = x(s.startDate, a);
|
|
527
|
+
const o = ie("endDate");
|
|
528
|
+
e(p.FORM_DATE, {
|
|
529
|
+
startDate: s.startDate,
|
|
530
|
+
endDate: o,
|
|
531
|
+
startTime: a,
|
|
532
|
+
endTime: i.endTime ?? t.dateFormData.endTime
|
|
533
|
+
}), e(p.INPUT, {
|
|
534
|
+
...s,
|
|
535
|
+
range: A.value
|
|
536
|
+
});
|
|
537
|
+
} else
|
|
538
|
+
N.value = !0, e(p.ERROR, { ...i });
|
|
539
|
+
}), Ze = ce((a) => {
|
|
540
|
+
se(a, t.dateFormData.endDate) ? (Q.value = !1, s.endDate = x(s.endDate, a), e(p.FORM_DATE, {
|
|
541
|
+
startDate: s.startDate,
|
|
542
|
+
endDate: s.endDate,
|
|
543
|
+
startTime: i.startTime ?? t.dateFormData.startTime,
|
|
544
|
+
endTime: a
|
|
545
|
+
}), e(p.INPUT, {
|
|
546
|
+
...s,
|
|
547
|
+
range: A.value
|
|
548
|
+
})) : (Q.value = !0, e(p.ERROR, { ...i }));
|
|
549
|
+
}), et = (a) => {
|
|
550
|
+
i.startTime = Pe(a), Xe(i.startTime);
|
|
551
|
+
}, tt = (a) => {
|
|
552
|
+
i.endTime = Pe(a), Ze(i.endTime);
|
|
553
|
+
}, at = (a) => {
|
|
554
|
+
Bt(a);
|
|
555
|
+
}, de = (a, o, u, d) => {
|
|
556
|
+
s.startDate = a, s.endDate = o, u && (s.granularity = u), d && (s.range = d);
|
|
557
|
+
}, nt = (a) => {
|
|
558
|
+
var u;
|
|
559
|
+
const o = (u = t.quickSelectRanges) == null ? void 0 : u.find(({ value: d }) => d === a);
|
|
560
|
+
if (o) {
|
|
561
|
+
Z();
|
|
562
|
+
const d = o.data, b = d.endDate || (d.isRelativeToNow ? new Date(Date.now()) : U(new Date(Date.now()))), h = d.isRelativeToNow && d.timeDifference ? new Date(b.getTime() - d.timeDifference) : d.startDate;
|
|
563
|
+
i.endDate = y(b), i.startDate = y(h), de(h, b, null, a), t.granularities && (s.granularity = d.granularity || _.value), i.startTime = w(h), i.endTime = w(b), s.startDate = h, s.endDate = b, d.isRelativeToNow && (m.value = {
|
|
564
|
+
...m.value,
|
|
565
|
+
[a]: {
|
|
566
|
+
startDate: h,
|
|
567
|
+
endDate: b
|
|
568
|
+
}
|
|
569
|
+
}), e(p.CUSTOM_RANGE, {
|
|
570
|
+
...o.data,
|
|
571
|
+
startDate: h,
|
|
572
|
+
endDate: b,
|
|
573
|
+
range: o.value
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
}, rt = {
|
|
577
|
+
weekly: H,
|
|
578
|
+
monthly: X,
|
|
579
|
+
quarterly: L
|
|
580
|
+
}, st = (a) => {
|
|
581
|
+
const o = s.granularity;
|
|
582
|
+
if (s.granularity = a, o && re(o, structuredClone(ye(s))), s.startDate && s.endDate) {
|
|
583
|
+
switch (a) {
|
|
584
|
+
case "quarterly":
|
|
585
|
+
case "monthly":
|
|
586
|
+
case "weekly": {
|
|
587
|
+
if (Y[a]) {
|
|
588
|
+
de(Y[a].startDate, Y[a].endDate, a);
|
|
589
|
+
break;
|
|
590
|
+
}
|
|
591
|
+
const { startDate: u, endDate: d } = rt[a](
|
|
592
|
+
s.startDate,
|
|
593
|
+
s.endDate,
|
|
594
|
+
f.value.min,
|
|
595
|
+
f.value.max
|
|
596
|
+
);
|
|
597
|
+
de(u, d, a);
|
|
598
|
+
break;
|
|
599
|
+
}
|
|
600
|
+
case "daily":
|
|
601
|
+
Y.daily && de(Y.daily.startDate, Y.daily.endDate, a);
|
|
602
|
+
break;
|
|
603
|
+
}
|
|
604
|
+
i.startDate = y(s.startDate), i.endDate = y(s.endDate), e(p.INPUT, {
|
|
605
|
+
...s,
|
|
606
|
+
range: A.value
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
};
|
|
610
|
+
return {
|
|
611
|
+
// Values
|
|
612
|
+
internalRangeDate: s,
|
|
613
|
+
dateTextInput: i,
|
|
614
|
+
endDateError: W,
|
|
615
|
+
endTimeError: Q,
|
|
616
|
+
granularityItems: J,
|
|
617
|
+
selectedGranularity: T,
|
|
618
|
+
computedMinMax: f,
|
|
619
|
+
selectedRangeSelectorValue: A,
|
|
620
|
+
startDateError: V,
|
|
621
|
+
startTimeError: N,
|
|
622
|
+
quickSelectRangeDefaultItems: G,
|
|
623
|
+
formInputWrapperConditionalClasses: ue,
|
|
624
|
+
// Methods
|
|
625
|
+
hasSlot: _t(n),
|
|
626
|
+
t: l,
|
|
627
|
+
// Events
|
|
628
|
+
onDateInput: D,
|
|
629
|
+
onDateInputKeyDown: Je,
|
|
630
|
+
onEndDateInput: ze,
|
|
631
|
+
onEndDateSelected: j,
|
|
632
|
+
onEndTimeInput: tt,
|
|
633
|
+
onGranularityInput: st,
|
|
634
|
+
onRangeSelectorInput: nt,
|
|
635
|
+
onStartDateInput: We,
|
|
636
|
+
onStartDateSelected: K,
|
|
637
|
+
onStartTimeInput: et,
|
|
638
|
+
onTimeInputKeyDown: at
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
});
|
|
642
|
+
var qt = function() {
|
|
643
|
+
var e = this, n = e._self._c;
|
|
644
|
+
return e._self._setupProxy, n("div", { staticClass: "b-date-range-picker-calendar" }, [n("div", { staticClass: "b-date-range-picker-calendar__form-container" }, [n("div", { staticClass: "b-date-range-picker-calendar__form" }, [e.hasSlot("title") ? [e._t("title")] : e._e(), e.quickSelectRanges ? n("bento-dropdown", { attrs: { "aria-label": e.t("customRange"), items: e.quickSelectRangeDefaultItems, value: e.selectedRangeSelectorValue }, on: { input: e.onRangeSelectorInput } }) : e._e(), e.granularities ? n("bento-segmented-control", { attrs: { items: e.granularityItems, "model-value": e.internalRangeDate.granularity, "full-width": "" }, on: { "update:model-value": e.onGranularityInput } }) : e._e(), n("div", [n("bento-typography", { staticClass: "b-date-range-picker-calendar__label", attrs: { stronger: "", el: "span" } }, [e._v(" From ")]), n("div", { class: e.formInputWrapperConditionalClasses }, [n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.t("dateFrom"), value: e.dateTextInput.startDate, error: e.startDateError }, on: { input: e.onStartDateInput, keydown: e.onDateInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
|
|
645
|
+
return [e._v("YYYY-MM-DD")];
|
|
646
|
+
}, proxy: !0 }]) }), e.allowTimeInput ? n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.t("timeFrom"), value: e.dateTextInput.startTime, error: e.startTimeError }, on: { input: e.onStartTimeInput, keydown: e.onTimeInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
|
|
647
|
+
return [e._v("HH:MM:SS")];
|
|
648
|
+
}, proxy: !0 }], null, !1, 3442289499) }) : e._e()], 1)], 1), n("div", [n("bento-typography", { staticClass: "b-date-range-picker-calendar__label", attrs: { stronger: "", el: "span" } }, [e._v(" To ")]), n("div", { class: e.formInputWrapperConditionalClasses }, [n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.t("dateTo"), value: e.dateTextInput.endDate, error: e.endDateError }, on: { input: e.onEndDateInput, keydown: e.onDateInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
|
|
649
|
+
return [e._v("YYYY-MM-DD")];
|
|
650
|
+
}, proxy: !0 }]) }), e.allowTimeInput ? n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.t("timeTo"), value: e.dateTextInput.endTime, error: e.endTimeError }, on: { input: e.onEndTimeInput, keydown: e.onTimeInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
|
|
651
|
+
return [e._v("HH:MM:SS")];
|
|
652
|
+
}, proxy: !0 }], null, !1, 3442289499) }) : e._e()], 1)], 1)], 2), e.hasSlot("actions") ? n("div", [e._t("actions")], 2) : e._e()]), n("div", { staticClass: "b-date-range-picker-calendar__calendars-container" }, [n("calendar", { attrs: { value: e.internalRangeDate, "first-day-of-week": e.firstDayOfWeek, "is-date-disabled": e.isDateDisabled, "max-range": e.maxRange, min: e.computedMinMax.min, max: e.computedMinMax.max, "number-of-months": e.numberOfMonths, "show-end-date-on-open": e.showEndDateOnOpen, granularity: e.selectedGranularity, variant: e.variant, "is-range": "" }, on: { input: e.onDateInput, "start-date-selected": e.onStartDateSelected, "end-date-selected": e.onEndDateSelected } })], 1)]);
|
|
653
|
+
}, Lt = [], Yt = /* @__PURE__ */ Ge(
|
|
654
|
+
Pt,
|
|
655
|
+
qt,
|
|
656
|
+
Lt,
|
|
657
|
+
!1,
|
|
658
|
+
null,
|
|
659
|
+
"76992b41"
|
|
660
|
+
);
|
|
661
|
+
const P = Yt.exports, Qt = ({
|
|
662
|
+
datePickerValue: t,
|
|
663
|
+
isDateIncorrect: e,
|
|
664
|
+
quickSelectRanges: n,
|
|
665
|
+
isMonthVariant: r
|
|
666
|
+
}) => {
|
|
667
|
+
var G, T, J, k;
|
|
668
|
+
const { locale: l, t: c } = Re(), m = _e(), _ = (f) => !!f && !isNaN(f.getTime()), s = (f, L) => _(f) ? ee(f, L, {
|
|
669
|
+
locale: m[l.value.substring(0, 2)] || m.enUS
|
|
670
|
+
}) : void 0, g = fe({
|
|
671
|
+
startDate: s((G = t.value) == null ? void 0 : G.startDate, S.NUMERIC_DATE_YEAR_FIRST),
|
|
672
|
+
endDate: s((T = t.value) == null ? void 0 : T.endDate, S.NUMERIC_DATE_YEAR_FIRST),
|
|
673
|
+
startTime: s((J = t.value) == null ? void 0 : J.startDate, S.HOUR_MINUTE_SECONDS),
|
|
674
|
+
endTime: s((k = t.value) == null ? void 0 : k.endDate, S.HOUR_MINUTE_SECONDS)
|
|
675
|
+
});
|
|
676
|
+
return {
|
|
677
|
+
// Values
|
|
678
|
+
dateDisplayValue: I(() => {
|
|
679
|
+
var H;
|
|
680
|
+
if (e.value)
|
|
681
|
+
return `${g.startDate || ""} - ${g.endDate || ""}`;
|
|
682
|
+
if (!t.value || !t.value.startDate && !t.value.endDate)
|
|
683
|
+
return c("selectDateRange");
|
|
684
|
+
if ((H = n.value) != null && H.length) {
|
|
685
|
+
const E = n.value.find(({ value: v }) => {
|
|
686
|
+
var B;
|
|
687
|
+
return v === ((B = t.value) == null ? void 0 : B.range);
|
|
688
|
+
});
|
|
689
|
+
if (E)
|
|
690
|
+
return E.label;
|
|
691
|
+
}
|
|
692
|
+
if (t.value.granularity === "quarterly") {
|
|
693
|
+
const { startDate: E, endDate: v } = t.value, B = c("quarter", { quarter: Fe(E), year: xe(E) });
|
|
694
|
+
if (kt(E, v))
|
|
695
|
+
return B;
|
|
696
|
+
const ae = c("quarter", { quarter: Fe(v), year: xe(v) });
|
|
697
|
+
return `${B} - ${ae}`;
|
|
698
|
+
}
|
|
699
|
+
const { startDate: f, endDate: L } = g, X = r != null && r.value ? S.LONG_MONTH_YEAR : S.FULL_DATE_MONTH_FIRST;
|
|
700
|
+
return `${s(z(f), X)} - ${s(
|
|
701
|
+
z(L),
|
|
702
|
+
X
|
|
703
|
+
)}`;
|
|
704
|
+
}),
|
|
705
|
+
textInputDisplayValue: g,
|
|
706
|
+
// Methods
|
|
707
|
+
formatTextInputDisplayValue: () => ""
|
|
708
|
+
};
|
|
709
|
+
};
|
|
710
|
+
var me = /* @__PURE__ */ ((t) => (t.INPUT = "input", t))(me || {});
|
|
711
|
+
const jt = {
|
|
712
|
+
"en-US": {
|
|
713
|
+
apply: "Apply",
|
|
714
|
+
cancel: "Cancel",
|
|
715
|
+
dateRangePicker: "Date range picker {name}",
|
|
716
|
+
provideDateInAFormat: "Provide date in a YYYY-MM-DD format",
|
|
717
|
+
quarter: "Q{quarter} {year}",
|
|
718
|
+
selectDate: "Select a date",
|
|
719
|
+
selectDateRange: "Select a date range",
|
|
720
|
+
selectedDateIsNotAvailable: "Selected date is not available"
|
|
721
|
+
},
|
|
722
|
+
"ja-JP": {
|
|
723
|
+
apply: "適用",
|
|
724
|
+
cancel: "キャンセル",
|
|
725
|
+
selectDate: "日付を選択"
|
|
726
|
+
},
|
|
727
|
+
"pt-BR": {
|
|
728
|
+
apply: "Aplicar",
|
|
729
|
+
cancel: "Cancelar",
|
|
730
|
+
selectDate: "Selecione uma data"
|
|
731
|
+
}
|
|
732
|
+
}, $t = {
|
|
733
|
+
i18n: { messages: jt },
|
|
734
|
+
name: "bento-date-range-picker"
|
|
735
|
+
}, Gt = /* @__PURE__ */ Ye({
|
|
736
|
+
...$t,
|
|
737
|
+
props: {
|
|
738
|
+
/**
|
|
739
|
+
* Allows user to enter time values in the form
|
|
740
|
+
*/
|
|
741
|
+
allowTimeInput: { type: Boolean, default: !1 },
|
|
742
|
+
/**
|
|
743
|
+
* Descriptive supporting text visbile underneath the dropdown.
|
|
744
|
+
*/
|
|
745
|
+
description: { type: String, default: void 0 },
|
|
746
|
+
/**
|
|
747
|
+
* Disables dropdown functionality.
|
|
748
|
+
*/
|
|
749
|
+
disabled: { type: Boolean, default: !1 },
|
|
750
|
+
/**
|
|
751
|
+
* Displays component in an error state with an error message
|
|
752
|
+
*/
|
|
753
|
+
errorMessage: { type: String, default: null },
|
|
754
|
+
/**
|
|
755
|
+
* Allows user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
|
|
756
|
+
*/
|
|
757
|
+
firstDayOfWeek: P.props.firstDayOfWeek,
|
|
758
|
+
/**
|
|
759
|
+
* A list of available granularities.
|
|
760
|
+
* If present, the date picker will display a segmented control to change granularity.
|
|
761
|
+
*/
|
|
762
|
+
granularities: P.props.granularities,
|
|
763
|
+
/**
|
|
764
|
+
* Indicate if a date should be disabled or not
|
|
765
|
+
*/
|
|
766
|
+
isDateDisabled: P.props.isDateDisabled,
|
|
767
|
+
/**
|
|
768
|
+
* Text that is displayed as a label above the element.
|
|
769
|
+
*/
|
|
770
|
+
label: { type: String, default: void 0 },
|
|
771
|
+
/**
|
|
772
|
+
* Upon opening date range picker, end date's month will be pre-selected.
|
|
773
|
+
*/
|
|
774
|
+
showEndDateOnOpen: { type: Boolean, default: !1 },
|
|
775
|
+
/**
|
|
776
|
+
* Highlights the dropdown is optional.
|
|
777
|
+
*/
|
|
778
|
+
optional: { type: Boolean, default: !1 },
|
|
779
|
+
/**
|
|
780
|
+
* The Boolean readonly property, when present, makes the element not mutable, meaning the user can not edit the date range picker.
|
|
781
|
+
*/
|
|
782
|
+
readonly: { type: Boolean, default: !1 },
|
|
783
|
+
/**
|
|
784
|
+
* Highlights the dropdown is required.
|
|
785
|
+
*/
|
|
786
|
+
required: { type: Boolean, default: !1 },
|
|
787
|
+
/**
|
|
788
|
+
* Adds a info icon next to the label to display the passed tooltip message.
|
|
789
|
+
*/
|
|
790
|
+
tooltipText: { type: String, default: null },
|
|
791
|
+
/**
|
|
792
|
+
* Enables the range selector.
|
|
793
|
+
* If provided, must be an array that sets the custom range dropdown items. Items are of the structure:
|
|
794
|
+
* `label` - label of custom range item.
|
|
795
|
+
* `value` - a unique key of the custom range item.
|
|
796
|
+
* `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.
|
|
797
|
+
*/
|
|
798
|
+
quickSelectRanges: {
|
|
799
|
+
type: Array,
|
|
800
|
+
default: void 0
|
|
801
|
+
},
|
|
802
|
+
/**
|
|
803
|
+
* Set a maximum number of dates to be selectable by the range.
|
|
804
|
+
*/
|
|
805
|
+
maxRange: P.props.maxRange,
|
|
806
|
+
/**
|
|
807
|
+
* Sets a minimum limit for selectable dates - dates before `min` will not be selectable
|
|
808
|
+
*/
|
|
809
|
+
min: P.props.min,
|
|
810
|
+
/**
|
|
811
|
+
* Sets a maximum limit for selectable dates - dates after `max` will not be selectable
|
|
812
|
+
*/
|
|
813
|
+
max: P.props.max,
|
|
814
|
+
/**
|
|
815
|
+
* Number of months rendered on pane
|
|
816
|
+
*/
|
|
817
|
+
numberOfMonths: P.props.numberOfMonths,
|
|
818
|
+
/**
|
|
819
|
+
* Selected date
|
|
820
|
+
*/
|
|
821
|
+
value: P.props.value,
|
|
822
|
+
/**
|
|
823
|
+
* The type of calendar to display. Defaults to showing days.
|
|
824
|
+
*/
|
|
825
|
+
variant: {
|
|
826
|
+
type: String,
|
|
827
|
+
default: void 0
|
|
828
|
+
// Default will be set by @/internal/calendar
|
|
829
|
+
},
|
|
830
|
+
/**
|
|
831
|
+
* Enables the date picker selection to persist until it is explicitly applied.
|
|
832
|
+
* Displays a set of buttons: Apply and Cancel.
|
|
833
|
+
*
|
|
834
|
+
* @deprecated This will be the default behaviour in v2.0.0.
|
|
835
|
+
*/
|
|
836
|
+
hasActions: { type: Boolean, default: !1 }
|
|
837
|
+
},
|
|
838
|
+
emits: [me.INPUT],
|
|
839
|
+
setup(t, { emit: e }) {
|
|
840
|
+
const n = t, { locale: r, t: l } = Re(), c = _e(), m = oe("bento-date-range-picker-container"), _ = oe("bento-date-range-picker-label"), s = oe("bento-date-range-picker-description"), g = oe("bento-date-range-picker-error"), A = oe("bento-date-range-picker-date-error"), ue = I(() => n.label || l("dateRangePicker", { name: m })), G = I(() => (n == null ? void 0 : n.quickSelectRanges) && n.quickSelectRanges.map((D) => {
|
|
841
|
+
const R = D.data.endDate ? void 0 : new Date(Date.now()).getTime() - D.data.startDate.getTime();
|
|
842
|
+
return {
|
|
843
|
+
...D,
|
|
844
|
+
data: {
|
|
845
|
+
...D.data,
|
|
846
|
+
// Adding timeDifference to calculate an up-to-date endDate on range selection
|
|
847
|
+
timeDifference: R
|
|
848
|
+
}
|
|
849
|
+
};
|
|
850
|
+
})), T = M(!1), J = M(null), k = M(!1), { isReadOnly: f } = pt(Ee(n, "readonly"));
|
|
851
|
+
Te(
|
|
852
|
+
() => n.disabled,
|
|
853
|
+
() => {
|
|
854
|
+
n.disabled && k.value && (k.value = !1);
|
|
855
|
+
}
|
|
856
|
+
);
|
|
857
|
+
const L = I(() => n.hasActions ? !w.value && T.value : T.value), X = I(() => ({
|
|
858
|
+
"b-date-range-picker__description--error": !!n.errorMessage || L.value
|
|
859
|
+
})), H = I(() => n.variant === "month"), { dateDisplayValue: E, textInputDisplayValue: v, formatTextInputDisplayValue: B } = Qt({
|
|
860
|
+
datePickerValue: Ee(n, "value"),
|
|
861
|
+
isDateIncorrect: T,
|
|
862
|
+
quickSelectRanges: G,
|
|
863
|
+
isMonthVariant: H
|
|
864
|
+
}), ae = I(
|
|
865
|
+
() => `${n.description ? s : ""} ${n.errorMessage ? g : ""} ${T.value ? A : ""}`.trim() || null
|
|
866
|
+
), ve = I(() => n.allowTimeInput && n.variant !== "month"), ne = () => {
|
|
867
|
+
k.value = !1;
|
|
868
|
+
}, Y = () => {
|
|
869
|
+
k.value = !0;
|
|
870
|
+
}, re = M(E.value), Z = M(
|
|
871
|
+
// textInputDisplayValue is a reactive object
|
|
872
|
+
structuredClone(ye(v))
|
|
873
|
+
), y = M(n.value), w = M(!0), V = I(
|
|
874
|
+
() => n.hasActions ? Z.value : v
|
|
875
|
+
), W = I(
|
|
876
|
+
() => n.hasActions ? re.value : E.value
|
|
877
|
+
);
|
|
878
|
+
Qe(() => {
|
|
879
|
+
if (n.hasActions || ut(
|
|
880
|
+
'BentoDateRangePicker "hasActions" property',
|
|
881
|
+
`Set the BentoDateRangePicker "hasActions" property true which will display the "Apply" and "Cancel" buttons.
|
|
882
|
+
This will be the default behavior in the v2 and "hasActions" will be removed.`,
|
|
883
|
+
"2.0.0"
|
|
884
|
+
), n.granularities && n.variant !== "month" && n.granularities.find(({ type: D }) => D === "quarterly"))
|
|
885
|
+
throw new Error('Quarterly granularity is only supported by BentoDateRangePicker with variant: "month"');
|
|
886
|
+
}), Te(
|
|
887
|
+
() => n.value,
|
|
888
|
+
() => {
|
|
889
|
+
re.value = E.value, Z.value = structuredClone(ye(v));
|
|
890
|
+
}
|
|
891
|
+
);
|
|
892
|
+
const N = I(() => [
|
|
893
|
+
{
|
|
894
|
+
title: l("apply"),
|
|
895
|
+
event: () => {
|
|
896
|
+
e(me.INPUT, y.value), ne(), w.value = !0;
|
|
897
|
+
},
|
|
898
|
+
disabled: w.value
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
title: l("cancel"),
|
|
902
|
+
event: ne
|
|
903
|
+
}
|
|
904
|
+
]);
|
|
905
|
+
return Te(y, (D) => {
|
|
906
|
+
if (n.hasActions) {
|
|
907
|
+
w.value = T.value;
|
|
908
|
+
return;
|
|
909
|
+
}
|
|
910
|
+
e(me.INPUT, D);
|
|
911
|
+
}), { __sfc: !0, emit: e, props: n, locale: r, t: l, locales: c, datePickerContainerId: m, labelId: _, descriptionId: s, errorId: g, dateErrorId: A, popoverAriaLabel: ue, adjustedQuickSelectRanges: G, isDateIncorrect: T, inputContainerRef: J, isDateRangePickerOpen: k, isReadOnly: f, shouldDisplayError: L, descriptionConditionalClasses: X, isMonthVariant: H, dateDisplayValue: E, textInputDisplayValue: v, formatTextInputDisplayValue: B, ariaDescribedBy: ae, withTimeInput: ve, closeDateRangePicker: ne, openDateRangePicker: Y, localDateDisplayValue: re, localTextInputDisplayValue: Z, selectedDate: y, isApplyDisabled: w, displayedTextInputValue: V, displayedDateValue: W, rangePickerButtonActions: N, onDateRangePickerInput: (D) => {
|
|
912
|
+
T.value = !1;
|
|
913
|
+
const R = (K, j) => K ? ee(K, j, {
|
|
914
|
+
locale: c[r.value.substring(0, 2)] || c.enUS
|
|
915
|
+
}) : void 0;
|
|
916
|
+
v.startDate = R(D.startDate, S.NUMERIC_DATE_YEAR_FIRST), v.endDate = R(D.endDate, S.NUMERIC_DATE_YEAR_FIRST), v.startTime = R(D.startDate, S.HOUR_MINUTE_SECONDS), v.endTime = R(D.endDate, S.HOUR_MINUTE_SECONDS), y.value = D;
|
|
917
|
+
}, clearDateRangePickerValue: async () => {
|
|
918
|
+
T.value && (T.value = !1), y.value = null;
|
|
919
|
+
}, onEnterPressedOverInput: () => {
|
|
920
|
+
if (!k.value) {
|
|
921
|
+
k.value = !0;
|
|
922
|
+
return;
|
|
923
|
+
}
|
|
924
|
+
T.value || (k.value = !1);
|
|
925
|
+
}, onDateRangePickerFormDateInputUpdate: (D) => {
|
|
926
|
+
T.value = !1, D.startTime && (v.startTime = D.startTime), D.endTime && (v.endTime = D.endTime);
|
|
927
|
+
}, onDateRangePickerError: (D) => {
|
|
928
|
+
T.value = !0, v.startDate = D.startDate, v.endDate = D.endDate, y.value = { startDate: null, endDate: null };
|
|
929
|
+
}, onRangeSelectorInput: (D) => {
|
|
930
|
+
if (D) {
|
|
931
|
+
const R = (j, ie) => j ? ee(j, ie, {
|
|
932
|
+
locale: c[r.value.substring(0, 2)] || c.enUS
|
|
933
|
+
}) : void 0, K = (j) => ee(j, S.NUMERIC_DATE_YEAR_FIRST, {
|
|
934
|
+
locale: c[r.value.substring(0, 2)] || c.enUS
|
|
935
|
+
});
|
|
936
|
+
v.startDate = K(D.startDate), v.endDate = K(D.endDate), v.startTime = R(
|
|
937
|
+
D.startDate,
|
|
938
|
+
S.HOUR_MINUTE_SECONDS
|
|
939
|
+
), v.endTime = R(D.endDate, S.HOUR_MINUTE_SECONDS), y.value = D;
|
|
940
|
+
}
|
|
941
|
+
}, BentoButtonActions: lt, BentoButtonActionsLayout: St, BentoDivider: it, BentoPopover: ot, BentoTypography: je, DateRangePickerCalendar: P, DropdownInputDefault: dt, ErrorMessage: bt, FieldLabel: It, vBentoClickOutsideDirective: Rt };
|
|
942
|
+
}
|
|
943
|
+
});
|
|
944
|
+
var Ht = function() {
|
|
945
|
+
var e = this, n = e._self._c, r = e._self._setupProxy;
|
|
946
|
+
return n("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: r.closeDateRangePicker, expression: "closeDateRangePicker" }], staticClass: "b-date-range-picker" }, [e.label ? n(r.FieldLabel, { attrs: { id: r.labelId, label: e.label, "tooltip-text": e.tooltipText, optional: e.optional, required: e.required } }) : e._e(), n("div", { on: { keydown: function(l) {
|
|
947
|
+
return !l.type.indexOf("key") && e._k(l.keyCode, "enter", 13, l.key, "Enter") ? null : r.onEnterPressedOverInput.apply(null, arguments);
|
|
948
|
+
} } }, [n(r.DropdownInputDefault, { ref: "inputContainerRef", attrs: { "always-combobox-is-input": "", ariaControls: r.datePickerContainerId, ariaExpanded: r.isDateRangePickerOpen, "aria-labelledby": e.label ? r.labelId : null, "aria-describedby": r.ariaDescribedBy, disabled: e.disabled, "is-invalid": !!e.errorMessage || r.shouldDisplayError, open: r.isDateRangePickerOpen, "display-value": r.displayedDateValue, readonly: r.isReadOnly }, on: { open: r.openDateRangePicker, clear: r.clearDateRangePickerValue, close: r.closeDateRangePicker } })], 1), r.shouldDisplayError ? n(r.ErrorMessage, { staticClass: "b-date-range-picker__error-message", attrs: { id: r.dateErrorId, "error-message": r.t("provideDateInAFormat") } }) : e._e(), e.errorMessage ? n(r.ErrorMessage, { staticClass: "b-date-range-picker__error-message", attrs: { id: r.errorId, "error-message": e.errorMessage } }) : e._e(), e.description ? n(r.BentoTypography, { staticClass: "b-date-range-picker__description", class: r.descriptionConditionalClasses, attrs: { id: r.descriptionId, el: "span" } }, [e._v(" " + e._s(e.description) + " ")]) : e._e(), r.inputContainerRef ? n(r.BentoPopover, { staticClass: "b-date-range-picker__container", attrs: { id: r.datePickerContainerId, open: r.isDateRangePickerOpen, "target-element": r.inputContainerRef, "disable-focus-trap": !0, "aria-label": r.popoverAriaLabel, position: "bottom-start", "without-space": "", "fit-content": "" } }, [n(r.DateRangePickerCalendar, { attrs: { "allow-time-input": r.withTimeInput, "quick-select-ranges": r.adjustedQuickSelectRanges, value: e.value, "first-day-of-week": e.firstDayOfWeek, granularities: e.granularities, "is-date-disabled": e.isDateDisabled, "max-range": e.maxRange, min: e.min, max: e.max, "number-of-months": e.numberOfMonths, "show-end-date-on-open": e.showEndDateOnOpen, "date-form-data": r.displayedTextInputValue, variant: e.variant }, on: { "custom-range": r.onRangeSelectorInput, input: r.onDateRangePickerInput, error: r.onDateRangePickerError, "form-date": r.onDateRangePickerFormDateInputUpdate }, scopedSlots: e._u([e.hasActions ? { key: "actions", fn: function() {
|
|
949
|
+
return [n(r.BentoDivider), n("div", { staticClass: "b-date-range-picker__footer" }, [n(r.BentoButtonActions, { attrs: { actions: r.rangePickerButtonActions, layout: r.BentoButtonActionsLayout.SPACE_BETWEEN } })], 1)];
|
|
950
|
+
}, proxy: !0 } : null], null, !0) })], 1) : e._e()], 1);
|
|
951
|
+
}, Vt = [], Wt = /* @__PURE__ */ Ge(
|
|
952
|
+
Gt,
|
|
953
|
+
Ht,
|
|
954
|
+
Vt,
|
|
955
|
+
!1,
|
|
956
|
+
null,
|
|
957
|
+
"09f46d89"
|
|
958
|
+
);
|
|
959
|
+
const ga = Wt.exports;
|
|
960
|
+
export {
|
|
961
|
+
ga as B,
|
|
962
|
+
P as D,
|
|
963
|
+
me as a,
|
|
964
|
+
Et as b,
|
|
965
|
+
De as i
|
|
966
|
+
};
|
|
967
|
+
//# sourceMappingURL=date-range-picker.BIj17geh.js.map
|