@adyen/bento-vue2 1.65.0 → 1.67.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/dist/@types/index.d.ts +473 -253
- package/dist/action-bar.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.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/card.css +1 -1
- package/dist/assets/copy.css +1 -1
- package/dist/assets/data-grid-template.css +1 -1
- package/dist/assets/data-grid.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/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/footer-actions.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.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/step.css +1 -1
- package/dist/assets/summary-grid.css +1 -1
- package/dist/assets/tab.css +1 -0
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.DHdrZtmW.js → action-bar.BxX3I27_.js} +31 -31
- package/dist/chunks/action-bar.BxX3I27_.js.map +1 -0
- package/dist/chunks/{base-modal.3OptY7u_.js → base-modal.QGDM_kjG.js} +2 -2
- package/dist/chunks/{base-modal.3OptY7u_.js.map → base-modal.QGDM_kjG.js.map} +1 -1
- package/dist/chunks/button-actions-with-menu.itkbcqzk.js +83 -0
- package/dist/chunks/button-actions-with-menu.itkbcqzk.js.map +1 -0
- package/dist/chunks/{button-actions._OIvTdKt.js → button-actions.BKdI_ooV.js} +2 -2
- package/dist/chunks/button-actions.BKdI_ooV.js.map +1 -0
- package/dist/chunks/calendar.DvIQEYwN.js +2086 -0
- package/dist/chunks/calendar.DvIQEYwN.js.map +1 -0
- package/dist/chunks/{card.CypgT0Ji.js → card.BktfAMv5.js} +2 -2
- package/dist/chunks/{card.CypgT0Ji.js.map → card.BktfAMv5.js.map} +1 -1
- package/dist/chunks/{checkbox-group.DVX0GFm9.js → checkbox-group.BVMGnokj.js} +4 -4
- package/dist/chunks/{checkbox-group.DVX0GFm9.js.map → checkbox-group.BVMGnokj.js.map} +1 -1
- package/dist/chunks/{checkbox.nHrvoKfp.js → checkbox.Bg5FM5Oa.js} +2 -2
- package/dist/chunks/{checkbox.nHrvoKfp.js.map → checkbox.Bg5FM5Oa.js.map} +1 -1
- package/dist/chunks/{code-snippet.W8Zp0zQP.js → code-snippet.DDiQ9R3o.js} +4 -4
- package/dist/chunks/{code-snippet.W8Zp0zQP.js.map → code-snippet.DDiQ9R3o.js.map} +1 -1
- package/dist/chunks/{controls-group.BWAmz7Tg.js → controls-group.CccuLkgP.js} +2 -2
- package/dist/chunks/{controls-group.BWAmz7Tg.js.map → controls-group.CccuLkgP.js.map} +1 -1
- package/dist/chunks/copy.CF8Fzu2Y.js +96 -0
- package/dist/chunks/copy.CF8Fzu2Y.js.map +1 -0
- package/dist/chunks/{dashboard-section.Bz54Z6Hh.js → dashboard-section.Beep1lY8.js} +3 -3
- package/dist/chunks/{dashboard-section.Bz54Z6Hh.js.map → dashboard-section.Beep1lY8.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CEaAmjDa.js → dashed-underline.BQwLgzz6.js} +2 -2
- package/dist/chunks/{dashed-underline.CEaAmjDa.js.map → dashed-underline.BQwLgzz6.js.map} +1 -1
- package/dist/chunks/{data-grid-template.DtFRjaR8.js → data-grid-template.nkx0pCMA.js} +16 -14
- package/dist/chunks/data-grid-template.nkx0pCMA.js.map +1 -0
- package/dist/chunks/{data-grid.D4oeTUhn.js → data-grid.CkwZVy3a.js} +190 -188
- package/dist/chunks/data-grid.CkwZVy3a.js.map +1 -0
- package/dist/chunks/{date-picker.k0g6anfy.js → date-picker.BLBXaDHv.js} +8 -9
- package/dist/chunks/{date-picker.k0g6anfy.js.map → date-picker.BLBXaDHv.js.map} +1 -1
- package/dist/chunks/{date-range-picker.D9lyIoO-.js → date-range-picker.am63DgMj.js} +409 -393
- package/dist/chunks/date-range-picker.am63DgMj.js.map +1 -0
- package/dist/chunks/date.BfyWX2PY.js +160 -0
- package/dist/chunks/date.BfyWX2PY.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.BNuuA4ES.js → dropdown-default-textbox.94q6opSD.js} +3 -3
- package/dist/chunks/dropdown-default-textbox.94q6opSD.js.map +1 -0
- package/dist/chunks/{dropdown-tag.DKhxBV52.js → dropdown-tag.DYIkCBa6.js} +2 -2
- package/dist/chunks/{dropdown-tag.DKhxBV52.js.map → dropdown-tag.DYIkCBa6.js.map} +1 -1
- package/dist/chunks/{dropdown.DV7uhHNP.js → dropdown.HA6ISg2h.js} +265 -270
- package/dist/chunks/{dropdown.DV7uhHNP.js.map → dropdown.HA6ISg2h.js.map} +1 -1
- package/dist/chunks/{error-message.1Em7Lis3.js → error-message.BgxnwPLF.js} +2 -2
- package/dist/chunks/{error-message.1Em7Lis3.js.map → error-message.BgxnwPLF.js.map} +1 -1
- package/dist/chunks/es6.n1ewaW31.js.map +1 -1
- package/dist/chunks/{file-uploader.DyjdNLOa.js → file-uploader.BPslxGI8.js} +323 -323
- package/dist/chunks/file-uploader.BPslxGI8.js.map +1 -0
- package/dist/chunks/{filter-bar.BxDEplt3.js → filter-bar.DbqsoAI1.js} +667 -652
- package/dist/chunks/{filter-bar.BxDEplt3.js.map → filter-bar.DbqsoAI1.js.map} +1 -1
- package/dist/chunks/{footer-actions.DyuSTjC5.js → footer-actions.BUfQFz7J.js} +2 -2
- package/dist/chunks/{footer-actions.DyuSTjC5.js.map → footer-actions.BUfQFz7J.js.map} +1 -1
- package/dist/chunks/{get-date-locale.BN8xEjY0.js → get-date-locale.CAyOIbcp.js} +288 -649
- package/dist/chunks/get-date-locale.CAyOIbcp.js.map +1 -0
- package/dist/chunks/{header-with-views.Ds9mcwmp.js → header-with-views.JllLR2nW.js} +341 -327
- package/dist/chunks/header-with-views.JllLR2nW.js.map +1 -0
- package/dist/chunks/{header.Cb644uAi.js → header.04Y0unpy.js} +27 -26
- package/dist/chunks/{header.Cb644uAi.js.map → header.04Y0unpy.js.map} +1 -1
- package/dist/chunks/index.BrH1t1iu.js +407 -0
- package/dist/chunks/index.BrH1t1iu.js.map +1 -0
- package/dist/chunks/{info-icon-with-popover.COq40yTq.js → info-icon-with-popover.B1DnkW4B.js} +2 -2
- package/dist/chunks/{info-icon-with-popover.COq40yTq.js.map → info-icon-with-popover.B1DnkW4B.js.map} +1 -1
- package/dist/chunks/info-icon.CYOXx8CL.js +37 -0
- package/dist/chunks/info-icon.CYOXx8CL.js.map +1 -0
- package/dist/chunks/{input-field-password.Bloa-rqx.js → input-field-password.BtOdV0gF.js} +124 -123
- package/dist/chunks/input-field-password.BtOdV0gF.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.B3qzZKuP.js → input-field-phone-number.Dq-LnGag.js} +3 -3
- package/dist/chunks/{input-field-phone-number.B3qzZKuP.js.map → input-field-phone-number.Dq-LnGag.js.map} +1 -1
- package/dist/chunks/input-field.Bg77qHT2.js +157 -0
- package/dist/chunks/input-field.Bg77qHT2.js.map +1 -0
- package/dist/chunks/{menu.BCD4FW54.js → menu.EgYjFAku.js} +2 -2
- package/dist/chunks/{menu.BCD4FW54.js.map → menu.EgYjFAku.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.1OdCgyca.js → modal-fullscreen.BNTUOC7o.js} +2 -2
- package/dist/chunks/{modal-fullscreen.1OdCgyca.js.map → modal-fullscreen.BNTUOC7o.js.map} +1 -1
- package/dist/chunks/{modal.xY5aFhAO.js → modal.OvB4kEGR.js} +4 -4
- package/dist/chunks/{modal.xY5aFhAO.js.map → modal.OvB4kEGR.js.map} +1 -1
- package/dist/chunks/{pagination.Cl7SzoId.js → pagination.Dw153NzQ.js} +115 -115
- package/dist/chunks/pagination.Dw153NzQ.js.map +1 -0
- package/dist/chunks/{popover.B05xkQ4e.js → popover.BGHbPUOr.js} +2 -2
- package/dist/chunks/{popover.B05xkQ4e.js.map → popover.BGHbPUOr.js.map} +1 -1
- package/dist/chunks/promo-banner.Bbc2U3S3.js.map +1 -1
- package/dist/chunks/{radio-group.CtPG_iiI.js → radio-group.4_KKjvAm.js} +3 -3
- package/dist/chunks/{radio-group.CtPG_iiI.js.map → radio-group.4_KKjvAm.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.CLxVaskq.js → rich-text-editor.CRJRvfJn.js} +5 -7
- package/dist/chunks/{rich-text-editor.CLxVaskq.js.map → rich-text-editor.CRJRvfJn.js.map} +1 -1
- package/dist/chunks/{search-bar.CadVBoj0.js → search-bar.BTZSePJh.js} +3 -3
- package/dist/chunks/{search-bar.CadVBoj0.js.map → search-bar.BTZSePJh.js.map} +1 -1
- package/dist/chunks/{secondary-nav.OwimHNCb.js → secondary-nav.BBhSBNn7.js} +2 -2
- package/dist/chunks/{secondary-nav.OwimHNCb.js.map → secondary-nav.BBhSBNn7.js.map} +1 -1
- package/dist/chunks/{selection-card-group.CoqBRUT8.js → selection-card-group.0o5T4tab.js} +3 -3
- package/dist/chunks/{selection-card-group.CoqBRUT8.js.map → selection-card-group.0o5T4tab.js.map} +1 -1
- package/dist/chunks/{sidepanel.CI8fu1Q3.js → sidepanel.Dt-BnFzN.js} +2 -2
- package/dist/chunks/{sidepanel.CI8fu1Q3.js.map → sidepanel.Dt-BnFzN.js.map} +1 -1
- package/dist/chunks/step.DMMofD4B.js +217 -0
- package/dist/chunks/step.DMMofD4B.js.map +1 -0
- package/dist/chunks/{structured-list-item.tox2Kcb6.js → structured-list-item.Bnn6-Z3q.js} +3 -3
- package/dist/chunks/{structured-list-item.tox2Kcb6.js.map → structured-list-item.Bnn6-Z3q.js.map} +1 -1
- package/dist/chunks/summary-grid.types.DsvtLg3D.js +337 -0
- package/dist/chunks/summary-grid.types.DsvtLg3D.js.map +1 -0
- package/dist/chunks/tab.BhWPBxcB.js +192 -0
- package/dist/chunks/tab.BhWPBxcB.js.map +1 -0
- package/dist/chunks/{tabs.keys.Bc2pSKRw.js → tabs.keys.Cb4Vw5Jh.js} +3 -3
- package/dist/chunks/{tabs.keys.Bc2pSKRw.js.map → tabs.keys.Cb4Vw5Jh.js.map} +1 -1
- package/dist/chunks/{textarea.BPeDUAPL.js → textarea.RAU710Uw.js} +83 -80
- package/dist/chunks/textarea.RAU710Uw.js.map +1 -0
- package/dist/chunks/{timeline-item.CS9ZDOsm.js → timeline-item.Dz66luo5.js} +11 -12
- package/dist/chunks/timeline-item.Dz66luo5.js.map +1 -0
- package/dist/chunks/{tutorial.DJ_Cwp9i.js → tutorial.DAKO-fKz.js} +4 -4
- package/dist/chunks/{tutorial.DJ_Cwp9i.js.map → tutorial.DAKO-fKz.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.DNOmzQVy.js → use-cached-selected-values.DQPABFfG.js} +538 -498
- package/dist/chunks/use-cached-selected-values.DQPABFfG.js.map +1 -0
- package/dist/code-snippet.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/dropdown.js +4 -4
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +45 -45
- package/dist/info-icon.js +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/internal.js +8 -8
- 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/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 +1 -0
- package/dist/styles/bento-light.css +1 -0
- package/dist/styles/bento.css +1 -0
- package/dist/styles/legacy.css +1 -0
- package/dist/styles/styleguide.css +1 -0
- 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/tutorial.js +1 -1
- package/dist/web-types.json +261 -81
- package/package.json +6 -6
- package/dist/assets/tabs.css +0 -1
- package/dist/chunks/action-bar.DHdrZtmW.js.map +0 -1
- package/dist/chunks/button-actions-with-menu.CYkEoiee.js +0 -166
- package/dist/chunks/button-actions-with-menu.CYkEoiee.js.map +0 -1
- package/dist/chunks/button-actions._OIvTdKt.js.map +0 -1
- package/dist/chunks/calendar.DbTC35rM.js +0 -1167
- package/dist/chunks/calendar.DbTC35rM.js.map +0 -1
- package/dist/chunks/copy.CXeLbvUP.js +0 -129
- package/dist/chunks/copy.CXeLbvUP.js.map +0 -1
- package/dist/chunks/data-grid-template.DtFRjaR8.js.map +0 -1
- package/dist/chunks/data-grid.D4oeTUhn.js.map +0 -1
- package/dist/chunks/date-range-picker.D9lyIoO-.js.map +0 -1
- package/dist/chunks/date.dYFFEunA.js +0 -987
- package/dist/chunks/date.dYFFEunA.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.BNuuA4ES.js.map +0 -1
- package/dist/chunks/file-uploader.DyjdNLOa.js.map +0 -1
- package/dist/chunks/get-date-locale.BN8xEjY0.js.map +0 -1
- package/dist/chunks/header-with-views.Ds9mcwmp.js.map +0 -1
- package/dist/chunks/index.BDuTpjD8.js +0 -40
- package/dist/chunks/index.BDuTpjD8.js.map +0 -1
- package/dist/chunks/index.DD7TppDb.js +0 -10
- package/dist/chunks/index.DD7TppDb.js.map +0 -1
- package/dist/chunks/info-icon.B9aTl1nU.js +0 -41
- package/dist/chunks/info-icon.B9aTl1nU.js.map +0 -1
- package/dist/chunks/input-field-password.Bloa-rqx.js.map +0 -1
- package/dist/chunks/input-field.B_3nZFYz.js +0 -152
- package/dist/chunks/input-field.B_3nZFYz.js.map +0 -1
- package/dist/chunks/pagination.Cl7SzoId.js.map +0 -1
- package/dist/chunks/step.dNTg2rtW.js +0 -217
- package/dist/chunks/step.dNTg2rtW.js.map +0 -1
- package/dist/chunks/summary-grid.types.CkUIw703.js +0 -301
- package/dist/chunks/summary-grid.types.CkUIw703.js.map +0 -1
- package/dist/chunks/tabs.Dx6teJGW.js +0 -205
- package/dist/chunks/tabs.Dx6teJGW.js.map +0 -1
- package/dist/chunks/textarea.BPeDUAPL.js.map +0 -1
- package/dist/chunks/timeline-item.CS9ZDOsm.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.DNOmzQVy.js.map +0 -1
|
@@ -1,53 +1,52 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
import { B as
|
|
3
|
-
import { B as
|
|
4
|
-
import { B as
|
|
5
|
-
import { D as
|
|
6
|
-
import {
|
|
7
|
-
import { g as
|
|
8
|
-
import { u as
|
|
9
|
-
import { t as
|
|
10
|
-
import {
|
|
11
|
-
import { f as
|
|
12
|
-
import { u as
|
|
1
|
+
import { reactive as ce, defineComponent as Le, ref as w, computed as _, onMounted as Ye, toRaw as ye, toRef as ke, watch as Te } from "vue";
|
|
2
|
+
import { B as it } from "./divider.Cc4JFWG_.js";
|
|
3
|
+
import { B as lt } from "./popover.BGHbPUOr.js";
|
|
4
|
+
import { B as Qe, d as ot } from "./typography.J1v_SPG3.js";
|
|
5
|
+
import { D as ut } from "./dropdown-default-textbox.94q6opSD.js";
|
|
6
|
+
import { e as F, a as Ee, g as pe } from "./get-date-locale.CAyOIbcp.js";
|
|
7
|
+
import { g as re } from "./generate-uid.NJ8tVoha.js";
|
|
8
|
+
import { u as _e } from "./i18n.BQkEbtPM.js";
|
|
9
|
+
import { e as je, t as ae, g as se, i as C, h as M, j as he, k as dt, l as Oe, m as ct, s as we, n as Dt, o as Me, a as G, u as mt, f as te } from "./calendar.DvIQEYwN.js";
|
|
10
|
+
import { r as O, t as L } from "./index.BrH1t1iu.js";
|
|
11
|
+
import { f as Ce, v as ft, D as S } from "./date-input.BqBdAO1E.js";
|
|
12
|
+
import { u as vt } from "./use-form-layout-loading.D3lALhtC.js";
|
|
13
13
|
import "./index.Cl4_42j5.js";
|
|
14
|
-
import { B as
|
|
15
|
-
import { B as
|
|
16
|
-
import { B as
|
|
17
|
-
import { d as
|
|
14
|
+
import { B as gt } from "./input-field.Bg77qHT2.js";
|
|
15
|
+
import { B as Tt } from "./dropdown.HA6ISg2h.js";
|
|
16
|
+
import { B as yt } from "./segmented-control.DHZEfmT-.js";
|
|
17
|
+
import { d as oe } from "./debounce.DUTu11PS.js";
|
|
18
18
|
import { u as pt } from "./use-has-slot.C9lQZ6nz.js";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { B as _t, c as Rt } from "./button-actions._OIvTdKt.js";
|
|
19
|
+
import { n as $e } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
20
|
+
import { B as _t } from "./directive.Cbdox5VL.js";
|
|
21
|
+
import { F as Rt, E as It } from "./error-message.BgxnwPLF.js";
|
|
22
|
+
import { B as bt, c as St } from "./button-actions.BKdI_ooV.js";
|
|
24
23
|
import "../assets/date-range-picker.css";
|
|
25
|
-
function
|
|
24
|
+
function Ge(t, e) {
|
|
26
25
|
O(2, arguments);
|
|
27
|
-
var n =
|
|
28
|
-
return
|
|
26
|
+
var n = ae(e), l = n * 3;
|
|
27
|
+
return je(t, l);
|
|
29
28
|
}
|
|
30
|
-
function
|
|
29
|
+
function Ae(t) {
|
|
31
30
|
O(1, arguments);
|
|
32
|
-
var e =
|
|
31
|
+
var e = L(t), n = Math.floor(e.getMonth() / 3) + 1;
|
|
33
32
|
return n;
|
|
34
33
|
}
|
|
35
|
-
function
|
|
36
|
-
return O(1, arguments),
|
|
34
|
+
function Fe(t) {
|
|
35
|
+
return O(1, arguments), L(t).getFullYear();
|
|
37
36
|
}
|
|
38
|
-
function
|
|
37
|
+
function ue(t, e) {
|
|
39
38
|
O(2, arguments);
|
|
40
|
-
var n =
|
|
39
|
+
var n = L(t), l = L(e);
|
|
41
40
|
return n.getTime() === l.getTime();
|
|
42
41
|
}
|
|
43
|
-
function
|
|
42
|
+
function kt(t, e) {
|
|
44
43
|
O(2, arguments);
|
|
45
|
-
var n =
|
|
44
|
+
var n = se(t), l = se(e);
|
|
46
45
|
return n.getTime() === l.getTime();
|
|
47
46
|
}
|
|
48
47
|
function xe(t) {
|
|
49
48
|
O(1, arguments);
|
|
50
|
-
var e =
|
|
49
|
+
var e = L(t);
|
|
51
50
|
return e.setMilliseconds(0), e;
|
|
52
51
|
}
|
|
53
52
|
function Ue(t, e) {
|
|
@@ -55,86 +54,91 @@ function Ue(t, e) {
|
|
|
55
54
|
var n = xe(t), l = xe(e);
|
|
56
55
|
return n.getTime() === l.getTime();
|
|
57
56
|
}
|
|
58
|
-
function
|
|
59
|
-
return O(1, arguments),
|
|
57
|
+
function Et(t) {
|
|
58
|
+
return O(1, arguments), C(t, Date.now());
|
|
60
59
|
}
|
|
61
|
-
function
|
|
60
|
+
function ht(t, e) {
|
|
62
61
|
O(2, arguments);
|
|
63
|
-
var n =
|
|
62
|
+
var n = L(t), l = ae(e);
|
|
64
63
|
return n.setHours(l), n;
|
|
65
64
|
}
|
|
66
|
-
function
|
|
65
|
+
function Ne(t, e) {
|
|
66
|
+
O(2, arguments);
|
|
67
|
+
var n = L(t), l = ae(e);
|
|
68
|
+
return n.setMilliseconds(l), n;
|
|
69
|
+
}
|
|
70
|
+
function Ot(t, e) {
|
|
67
71
|
O(2, arguments);
|
|
68
|
-
var n =
|
|
72
|
+
var n = L(t), l = ae(e);
|
|
69
73
|
return n.setMinutes(l), n;
|
|
70
74
|
}
|
|
71
|
-
function
|
|
75
|
+
function wt(t, e) {
|
|
72
76
|
O(2, arguments);
|
|
73
|
-
var n =
|
|
77
|
+
var n = L(t), l = ae(e);
|
|
74
78
|
return n.setSeconds(l), n;
|
|
75
79
|
}
|
|
76
|
-
function
|
|
80
|
+
function Mt(t, e) {
|
|
77
81
|
O(2, arguments);
|
|
78
|
-
var n =
|
|
79
|
-
return
|
|
82
|
+
var n = ae(e);
|
|
83
|
+
return Ge(t, -n);
|
|
80
84
|
}
|
|
81
|
-
function
|
|
85
|
+
function J(t) {
|
|
82
86
|
if (t == null)
|
|
83
|
-
return
|
|
87
|
+
return M(/* @__PURE__ */ new Date());
|
|
84
88
|
const [e, n, l] = t.split("-").map((o) => parseInt(o, 10));
|
|
85
89
|
return new Date(e, n - 1, l);
|
|
86
90
|
}
|
|
87
|
-
const
|
|
91
|
+
const Ct = ({
|
|
88
92
|
firstDayOfWeek: t,
|
|
89
93
|
min: e,
|
|
90
94
|
max: n
|
|
91
95
|
}) => ({ getGranularCalendarLimits: (o) => {
|
|
92
|
-
let D =
|
|
96
|
+
let D = M(e), f = F(n);
|
|
93
97
|
if ((o == null ? void 0 : o.type) === "weekly") {
|
|
94
98
|
if (o.earliest)
|
|
95
|
-
D =
|
|
99
|
+
D = M(o.earliest);
|
|
96
100
|
else {
|
|
97
|
-
const y =
|
|
98
|
-
|
|
101
|
+
const y = he(D, { weekStartsOn: t });
|
|
102
|
+
C(D, y) || (D = M(dt(Oe(D, { weekStartsOn: t }), 1)));
|
|
99
103
|
}
|
|
100
104
|
if (o.latest)
|
|
101
|
-
f =
|
|
105
|
+
f = F(o.latest);
|
|
102
106
|
else {
|
|
103
|
-
const y =
|
|
104
|
-
|
|
107
|
+
const y = Oe(f, { weekStartsOn: t });
|
|
108
|
+
C(f, y) || (f = F(ct(he(f, { weekStartsOn: t }), 1)));
|
|
105
109
|
}
|
|
106
110
|
}
|
|
107
111
|
if ((o == null ? void 0 : o.type) === "monthly") {
|
|
108
112
|
if (o.earliest)
|
|
109
|
-
D =
|
|
113
|
+
D = M(o.earliest);
|
|
110
114
|
else {
|
|
111
|
-
const y =
|
|
112
|
-
|
|
115
|
+
const y = we(D);
|
|
116
|
+
C(D, y) || (D = we(je(D, 1)));
|
|
113
117
|
}
|
|
114
118
|
if (o.latest)
|
|
115
|
-
f =
|
|
119
|
+
f = F(o.latest);
|
|
116
120
|
else {
|
|
117
|
-
const y =
|
|
118
|
-
|
|
121
|
+
const y = Ee(f);
|
|
122
|
+
C(f, y) || (f = Ee(Dt(f, 1)));
|
|
119
123
|
}
|
|
120
124
|
}
|
|
121
125
|
if ((o == null ? void 0 : o.type) === "quarterly") {
|
|
122
126
|
if (o.earliest)
|
|
123
|
-
D =
|
|
127
|
+
D = se(o.earliest);
|
|
124
128
|
else {
|
|
125
|
-
const y =
|
|
126
|
-
|
|
129
|
+
const y = se(D);
|
|
130
|
+
C(D, y) || (D = se(Ge(D, 1)));
|
|
127
131
|
}
|
|
128
132
|
if (o.latest)
|
|
129
|
-
f =
|
|
133
|
+
f = F(o.latest);
|
|
130
134
|
else {
|
|
131
|
-
const y =
|
|
132
|
-
|
|
135
|
+
const y = Me(f);
|
|
136
|
+
C(f, y) || (f = Me(Mt(f, 1)));
|
|
133
137
|
}
|
|
134
138
|
}
|
|
135
139
|
return { min: D, max: f };
|
|
136
|
-
} }),
|
|
137
|
-
const t =
|
|
140
|
+
} }), At = () => {
|
|
141
|
+
const t = ce({
|
|
138
142
|
daily: null,
|
|
139
143
|
weekly: null,
|
|
140
144
|
monthly: null,
|
|
@@ -150,19 +154,19 @@ const Ot = ({
|
|
|
150
154
|
}
|
|
151
155
|
};
|
|
152
156
|
};
|
|
153
|
-
var
|
|
154
|
-
const
|
|
155
|
-
const { selectionStart: e } = t.target, n = ["Backspace", "Tab", "ArrowLeft", "ArrowRight"], l =
|
|
157
|
+
var g = /* @__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))(g || {});
|
|
158
|
+
const Ft = /[\d]/, xt = /^\d{2}$/, Ut = /^\d{2}:\d{2}$/, Nt = (t) => {
|
|
159
|
+
const { selectionStart: e } = t.target, n = ["Backspace", "Tab", "ArrowLeft", "ArrowRight"], l = Ft.test(t.key) || n.includes(t.key), o = [1, 2, 4, 5].includes(e) && t.key === ":";
|
|
156
160
|
!l && !o && t.preventDefault();
|
|
157
|
-
},
|
|
161
|
+
}, Pe = (t) => {
|
|
158
162
|
if (!t)
|
|
159
163
|
return t;
|
|
160
164
|
let e = t;
|
|
161
165
|
if (e.length === 1 && parseInt(t, 10) > 2)
|
|
162
166
|
return `0${e}:`;
|
|
163
167
|
const [n, l] = e.slice(-2);
|
|
164
|
-
return [2, 5].includes(e.length) && l === ":" && (e = `${e.slice(0, e.length - 2)}0${n}`), (
|
|
165
|
-
},
|
|
168
|
+
return [2, 5].includes(e.length) && l === ":" && (e = `${e.slice(0, e.length - 2)}0${n}`), (xt.test(e) || Ut.test(e)) && (e += ":"), e;
|
|
169
|
+
}, Pt = {
|
|
166
170
|
"en-US": {
|
|
167
171
|
customRange: "Custom range",
|
|
168
172
|
daily: "Daily",
|
|
@@ -193,15 +197,15 @@ const Mt = /[\d]/, Ct = /^\d{2}$/, At = /^\d{2}:\d{2}$/, xt = (t) => {
|
|
|
193
197
|
monthly: "Mensal",
|
|
194
198
|
weekly: "Semanal"
|
|
195
199
|
}
|
|
196
|
-
},
|
|
197
|
-
i18n: { messages:
|
|
200
|
+
}, Be = 300, qe = "customRange", Bt = Le({
|
|
201
|
+
i18n: { messages: Pt },
|
|
198
202
|
name: "date-range-picker-calendar",
|
|
199
203
|
components: {
|
|
200
|
-
BentoDropdown:
|
|
201
|
-
BentoInputField:
|
|
202
|
-
BentoSegmentedControl:
|
|
203
|
-
BentoTypography:
|
|
204
|
-
Calendar:
|
|
204
|
+
BentoDropdown: Tt,
|
|
205
|
+
BentoInputField: gt,
|
|
206
|
+
BentoSegmentedControl: yt,
|
|
207
|
+
BentoTypography: Qe,
|
|
208
|
+
Calendar: G
|
|
205
209
|
},
|
|
206
210
|
props: {
|
|
207
211
|
/**
|
|
@@ -218,7 +222,7 @@ const Mt = /[\d]/, Ct = /^\d{2}$/, At = /^\d{2}:\d{2}$/, xt = (t) => {
|
|
|
218
222
|
/**
|
|
219
223
|
* Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
|
|
220
224
|
*/
|
|
221
|
-
firstDayOfWeek:
|
|
225
|
+
firstDayOfWeek: G.props.firstDayOfWeek,
|
|
222
226
|
/**
|
|
223
227
|
* A list of available granularities.
|
|
224
228
|
* If present, the date picker will display a segmented control to change granularity.
|
|
@@ -230,23 +234,23 @@ const Mt = /[\d]/, Ct = /^\d{2}$/, At = /^\d{2}:\d{2}$/, xt = (t) => {
|
|
|
230
234
|
/**
|
|
231
235
|
* Indicate if a date should be disabled or not
|
|
232
236
|
*/
|
|
233
|
-
isDateDisabled:
|
|
237
|
+
isDateDisabled: G.props.isDateDisabled,
|
|
234
238
|
/**
|
|
235
239
|
* Set a maximum number of dates to be selectable by the range.
|
|
236
240
|
*/
|
|
237
|
-
maxRange:
|
|
241
|
+
maxRange: G.props.maxRange,
|
|
238
242
|
/**
|
|
239
243
|
* Sets a minimum limit for selectable dates - dates before `min` will not be selectable
|
|
240
244
|
*/
|
|
241
|
-
min:
|
|
245
|
+
min: G.props.min,
|
|
242
246
|
/**
|
|
243
247
|
* Sets a maximum limit for selectable dates - dates after `max` will not be selectable
|
|
244
248
|
*/
|
|
245
|
-
max:
|
|
249
|
+
max: G.props.max,
|
|
246
250
|
/**
|
|
247
251
|
* Number of months rendered on pane
|
|
248
252
|
*/
|
|
249
|
-
numberOfMonths:
|
|
253
|
+
numberOfMonths: G.props.numberOfMonths,
|
|
250
254
|
/**
|
|
251
255
|
* Displays the end date's month when the calendar is opened. Defaults to false i.e. the start date's month is displayed.
|
|
252
256
|
*/
|
|
@@ -269,26 +273,26 @@ const Mt = /[\d]/, Ct = /^\d{2}$/, At = /^\d{2}:\d{2}$/, xt = (t) => {
|
|
|
269
273
|
/**
|
|
270
274
|
* The type of calendar to display. Defaults to showing days.
|
|
271
275
|
*/
|
|
272
|
-
variant:
|
|
276
|
+
variant: G.props.variant
|
|
273
277
|
},
|
|
274
278
|
emits: [
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
279
|
+
g.CUSTOM_RANGE,
|
|
280
|
+
g.INPUT,
|
|
281
|
+
g.ERROR,
|
|
282
|
+
g.FORM_DATE,
|
|
283
|
+
g.START_DATE_SELECTED
|
|
280
284
|
],
|
|
281
285
|
setup(t, { emit: e, slots: n }) {
|
|
282
|
-
var
|
|
283
|
-
const { locale: l, t: o } =
|
|
284
|
-
startDate: (
|
|
285
|
-
endDate: (
|
|
286
|
+
var Re, Ie, be, Se;
|
|
287
|
+
const { locale: l, t: o } = _e(), D = pe(), f = w({}), y = _(() => t.variant === "month" ? "monthly" : "daily"), r = ce({
|
|
288
|
+
startDate: (Re = t.value) == null ? void 0 : Re.startDate,
|
|
289
|
+
endDate: (Ie = t.value) == null ? void 0 : Ie.endDate,
|
|
286
290
|
range: (be = t.value) == null ? void 0 : be.range,
|
|
287
291
|
...t.granularities ? {
|
|
288
|
-
granularity: ((
|
|
292
|
+
granularity: ((Se = t.value) == null ? void 0 : Se.granularity) || y.value
|
|
289
293
|
} : {}
|
|
290
294
|
});
|
|
291
|
-
function
|
|
295
|
+
function T(a) {
|
|
292
296
|
return a ? new Date(
|
|
293
297
|
a.getUTCFullYear(),
|
|
294
298
|
a.getUTCMonth(),
|
|
@@ -298,55 +302,55 @@ const Mt = /[\d]/, Ct = /^\d{2}$/, At = /^\d{2}:\d{2}$/, xt = (t) => {
|
|
|
298
302
|
a.getUTCSeconds()
|
|
299
303
|
) : null;
|
|
300
304
|
}
|
|
301
|
-
const
|
|
305
|
+
const A = _(() => {
|
|
302
306
|
var a, i;
|
|
303
307
|
return (
|
|
304
308
|
// eslint-disable-next-line consistent-return
|
|
305
309
|
((i = (a = t == null ? void 0 : t.quickSelectRanges) == null ? void 0 : a.find(({ value: u, data: d }) => {
|
|
306
|
-
var
|
|
310
|
+
var I;
|
|
307
311
|
if (!d.endDate) {
|
|
308
312
|
if (d.isRelativeToNow) {
|
|
309
|
-
const
|
|
310
|
-
return
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
) &&
|
|
314
|
-
|
|
315
|
-
|
|
313
|
+
const h = (I = f.value) == null ? void 0 : I[u];
|
|
314
|
+
return h ? ue(
|
|
315
|
+
T(h.startDate),
|
|
316
|
+
T(r.startDate)
|
|
317
|
+
) && ue(
|
|
318
|
+
T(h.endDate),
|
|
319
|
+
T(r.endDate)
|
|
316
320
|
) : (
|
|
317
321
|
// If not stored calculated dates, fall back to comparing the quick select item's value
|
|
318
322
|
// with the internal range's stored range identifier.
|
|
319
323
|
u === r.range
|
|
320
324
|
);
|
|
321
325
|
}
|
|
322
|
-
return
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
) &&
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
) &&
|
|
326
|
+
return ue(
|
|
327
|
+
T(d.startDate),
|
|
328
|
+
T(r.startDate)
|
|
329
|
+
) && ue(
|
|
330
|
+
T(r.endDate),
|
|
331
|
+
T(F(r.endDate))
|
|
332
|
+
) && Et(T(r.endDate));
|
|
329
333
|
}
|
|
330
334
|
if (t.allowTimeInput)
|
|
331
335
|
return Ue(
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
) && Ue(
|
|
336
|
+
T(d.startDate),
|
|
337
|
+
T(r.startDate)
|
|
338
|
+
) && Ue(T(d.endDate), T(r.endDate));
|
|
335
339
|
if (d.endDate)
|
|
336
|
-
return
|
|
337
|
-
})) == null ? void 0 : i.value) ??
|
|
340
|
+
return C(d.startDate, r.startDate) && C(d.endDate, r.endDate);
|
|
341
|
+
})) == null ? void 0 : i.value) ?? qe
|
|
338
342
|
);
|
|
339
|
-
}), ne =
|
|
343
|
+
}), ne = _(() => ({
|
|
340
344
|
"b-date-range-picker-calendar__form-input-wrapper": t.allowTimeInput
|
|
341
|
-
})),
|
|
342
|
-
{ label: o("customRange"), value:
|
|
345
|
+
})), R = _(() => [
|
|
346
|
+
{ label: o("customRange"), value: qe },
|
|
343
347
|
...t.quickSelectRanges ? t.quickSelectRanges : []
|
|
344
|
-
]),
|
|
348
|
+
]), x = _(
|
|
345
349
|
() => {
|
|
346
350
|
var a;
|
|
347
351
|
return ((a = t.granularities) == null ? void 0 : a.find(({ type: i }) => i === r.granularity)) || null;
|
|
348
352
|
}
|
|
349
|
-
),
|
|
353
|
+
), E = _(
|
|
350
354
|
() => {
|
|
351
355
|
var a;
|
|
352
356
|
return ((a = t.granularities) == null ? void 0 : a.map(({ type: i, disabled: u }) => ({
|
|
@@ -355,239 +359,251 @@ const Mt = /[\d]/, Ct = /^\d{2}$/, At = /^\d{2}:\d{2}$/, xt = (t) => {
|
|
|
355
359
|
disabled: u
|
|
356
360
|
}))) ?? [];
|
|
357
361
|
}
|
|
358
|
-
), { getGranularCalendarLimits:
|
|
359
|
-
() => t.granularities ?
|
|
362
|
+
), { getGranularCalendarLimits: X } = Ct(t), m = _(
|
|
363
|
+
() => t.granularities ? X(x.value) : { min: M(t.min), max: F(t.max) }
|
|
360
364
|
), {
|
|
361
|
-
adjustDateForQuarterly:
|
|
362
|
-
adjustDateForMonthly:
|
|
363
|
-
adjustDateForWeekly:
|
|
365
|
+
adjustDateForQuarterly: H,
|
|
366
|
+
adjustDateForMonthly: Z,
|
|
367
|
+
adjustDateForWeekly: U,
|
|
364
368
|
adjustStartDateInputForWeekly: v,
|
|
365
|
-
adjustEndDateInputForWeekly:
|
|
366
|
-
adjustStartDateInputForMonthly:
|
|
367
|
-
adjustEndDateInputForMonthly:
|
|
368
|
-
adjustStartDateInputForQuarterly:
|
|
369
|
-
adjustEndDateInputForQuarterly:
|
|
370
|
-
} =
|
|
369
|
+
adjustEndDateInputForWeekly: N,
|
|
370
|
+
adjustStartDateInputForMonthly: P,
|
|
371
|
+
adjustEndDateInputForMonthly: W,
|
|
372
|
+
adjustStartDateInputForQuarterly: De,
|
|
373
|
+
adjustEndDateInputForQuarterly: ie
|
|
374
|
+
} = mt(t.firstDayOfWeek), { savedRanges: B, saveRange: Y, resetSavedRanges: V } = At(), k = (a) => a ? te(a, S.NUMERIC_DATE_YEAR_FIRST, {
|
|
371
375
|
locale: D[l.value.substring(0, 2)] || D.enUS
|
|
372
|
-
}) : "",
|
|
376
|
+
}) : "", Q = (a) => a ? te(a, S.HOUR_MINUTE_SECONDS, {
|
|
373
377
|
locale: D[l.value.substring(0, 2)] || D.enUS
|
|
374
|
-
}) : "",
|
|
378
|
+
}) : "", K = w(!1), ee = w(!1), j = w(!1), $ = w(!1), s = ce({
|
|
375
379
|
startDate: t.dateFormData.startDate,
|
|
376
380
|
endDate: t.dateFormData.endDate,
|
|
377
381
|
startTime: t.dateFormData.startTime,
|
|
378
382
|
endTime: t.dateFormData.endTime
|
|
379
|
-
}),
|
|
380
|
-
if (!i || !ue(i) || t.variant === "month")
|
|
381
|
-
return a;
|
|
383
|
+
}), me = (a, i) => {
|
|
382
384
|
let u = new Date(a);
|
|
383
|
-
const [d,
|
|
384
|
-
return u =
|
|
385
|
-
}, c = (a) => {
|
|
386
|
-
|
|
385
|
+
const [d, I, h] = i.split(":");
|
|
386
|
+
return u = ht(u, parseInt(d, 10)), u = Ot(u, parseInt(I, 10)), u = wt(u, parseInt(h, 10)), u;
|
|
387
|
+
}, fe = (a) => /^(?:[01]\d|2[01234]):(?:[012345]\d):(?:[012345]\d)$/.test(a), c = (a, i) => {
|
|
388
|
+
const u = () => {
|
|
389
|
+
if (i && b(i)) {
|
|
390
|
+
const d = me(new Date(i), 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 fe(a) && u();
|
|
397
|
+
}, p = (a, i) => !i || !fe(i) || t.variant === "month" ? a : me(new Date(a), i), z = (a) => {
|
|
398
|
+
s.startTime = Q(
|
|
399
|
+
t.min && t.allowTimeInput && C(t.min, a.startDate) ? t.min : M(a.startDate)
|
|
400
|
+
), s.endTime = Q(
|
|
401
|
+
t.max && t.allowTimeInput && C(t.max, a.endDate) ? t.max : F(a.endDate)
|
|
402
|
+
), r.startDate = p(a.startDate, s.startTime), r.endDate = p(a.endDate, s.endTime), r.range = null, t.granularities && V(), e(g.INPUT, {
|
|
387
403
|
...r,
|
|
388
|
-
range:
|
|
404
|
+
range: A.value
|
|
389
405
|
});
|
|
390
|
-
},
|
|
391
|
-
const i = (d) => t.min && d
|
|
406
|
+
}, b = (a) => {
|
|
407
|
+
const i = (d) => t.min && M(d) < M(t.min) || t.max && M(d) > M(t.max) ? !1 : t.isDateDisabled ? !t.isDateDisabled(M(d)) : !0;
|
|
392
408
|
return /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(a) && i(new Date(a));
|
|
393
409
|
};
|
|
394
|
-
|
|
395
|
-
t.dateFormData.startDate && !
|
|
410
|
+
Ye(() => {
|
|
411
|
+
K.value = !!(t.dateFormData.startDate && !b(t.dateFormData.startDate)), t.allowTimeInput ? j.value = !!(t.dateFormData.startTime && !c(t.dateFormData.startTime, t.dateFormData.startDate)) : j.value = !1, ee.value = !!(t.dateFormData.endDate && !b(t.dateFormData.endDate)), t.allowTimeInput ? $.value = !!(t.dateFormData.endTime && !c(t.dateFormData.endTime, t.dateFormData.endDate)) : $.value = !1;
|
|
396
412
|
});
|
|
397
|
-
const
|
|
413
|
+
const ve = (a) => {
|
|
398
414
|
var i;
|
|
399
|
-
s.startDate =
|
|
400
|
-
},
|
|
415
|
+
s.startDate = k(a), s.startTime ? j.value && (s.startTime = (i = t.dateFormData) == null ? void 0 : i.startTime) : s.startTime = Q(a), K.value = !1, j.value = !1, e(g.START_DATE_SELECTED, a);
|
|
416
|
+
}, He = (a) => {
|
|
401
417
|
var i;
|
|
402
|
-
s.endDate =
|
|
403
|
-
},
|
|
418
|
+
s.endDate = k(a), s.endTime ? $.value && (s.endTime = (i = t.dateFormData) == null ? void 0 : i.endTime) : s.endTime = Q(F(a)), ee.value = !1, $.value = !1;
|
|
419
|
+
}, ge = (a) => {
|
|
404
420
|
const i = t.value[a];
|
|
405
421
|
if (i)
|
|
406
422
|
return i;
|
|
407
|
-
if (t.dateFormData[a] &&
|
|
423
|
+
if (t.dateFormData[a] && b(t.dateFormData[a]))
|
|
408
424
|
return new Date(t.dateFormData[a]);
|
|
409
|
-
},
|
|
425
|
+
}, We = oe((a) => {
|
|
410
426
|
var i;
|
|
411
|
-
if (
|
|
427
|
+
if (b(a)) {
|
|
412
428
|
let u = a;
|
|
413
|
-
switch (
|
|
429
|
+
switch (K.value = !1, (i = x.value) == null ? void 0 : i.type) {
|
|
414
430
|
case "weekly":
|
|
415
431
|
u = v(
|
|
416
432
|
a,
|
|
417
|
-
|
|
433
|
+
k,
|
|
418
434
|
m.value.min,
|
|
419
435
|
m.value.max
|
|
420
436
|
), s.startDate = u;
|
|
421
437
|
break;
|
|
422
438
|
case "monthly":
|
|
423
|
-
u =
|
|
439
|
+
u = P(
|
|
424
440
|
a,
|
|
425
|
-
|
|
441
|
+
k,
|
|
426
442
|
m.value.min,
|
|
427
443
|
m.value.max
|
|
428
444
|
), s.startDate = u;
|
|
429
445
|
break;
|
|
430
446
|
case "quarterly":
|
|
431
|
-
u =
|
|
447
|
+
u = De(
|
|
432
448
|
a,
|
|
433
|
-
|
|
449
|
+
k,
|
|
434
450
|
m.value.min,
|
|
435
451
|
m.value.max
|
|
436
452
|
), s.startDate = u;
|
|
437
453
|
break;
|
|
438
454
|
}
|
|
439
|
-
const d =
|
|
440
|
-
r.startDate =
|
|
441
|
-
|
|
455
|
+
const d = J(u);
|
|
456
|
+
r.startDate = p(d, s.startTime), r.endDate = p(
|
|
457
|
+
J(s.endDate),
|
|
442
458
|
s.endTime
|
|
443
|
-
),
|
|
444
|
-
|
|
459
|
+
), b(s.endDate) && (r.endDate = p(
|
|
460
|
+
J(s.endDate),
|
|
445
461
|
s.endTime
|
|
446
462
|
));
|
|
447
|
-
const
|
|
448
|
-
r.range = null, e(
|
|
463
|
+
const I = ge("endDate");
|
|
464
|
+
r.range = null, e(g.FORM_DATE, {
|
|
449
465
|
startDate: d,
|
|
450
|
-
endDate:
|
|
451
|
-
}), e(
|
|
466
|
+
endDate: I
|
|
467
|
+
}), e(g.INPUT, {
|
|
452
468
|
...r,
|
|
453
|
-
range:
|
|
469
|
+
range: A.value
|
|
454
470
|
});
|
|
455
471
|
} else
|
|
456
|
-
|
|
457
|
-
},
|
|
458
|
-
s.startDate =
|
|
459
|
-
},
|
|
472
|
+
K.value = !0, e(g.ERROR, { ...s });
|
|
473
|
+
}, Be), Ve = (a) => {
|
|
474
|
+
s.startDate = Ce(a), We(s.startDate);
|
|
475
|
+
}, Ke = oe((a) => {
|
|
460
476
|
var i;
|
|
461
|
-
if (
|
|
477
|
+
if (b(a)) {
|
|
462
478
|
let u = a;
|
|
463
|
-
switch (
|
|
479
|
+
switch (ee.value = !1, (i = x.value) == null ? void 0 : i.type) {
|
|
464
480
|
case "weekly":
|
|
465
|
-
u =
|
|
481
|
+
u = N(
|
|
466
482
|
a,
|
|
467
|
-
|
|
483
|
+
k,
|
|
468
484
|
m.value.min,
|
|
469
485
|
m.value.max
|
|
470
486
|
), s.endDate = u;
|
|
471
487
|
break;
|
|
472
488
|
case "monthly":
|
|
473
|
-
u =
|
|
489
|
+
u = W(
|
|
474
490
|
a,
|
|
475
|
-
|
|
491
|
+
k,
|
|
476
492
|
m.value.min,
|
|
477
493
|
m.value.max
|
|
478
494
|
), s.endDate = u;
|
|
479
495
|
break;
|
|
480
496
|
case "quarterly":
|
|
481
|
-
u =
|
|
497
|
+
u = ie(
|
|
482
498
|
a,
|
|
483
|
-
|
|
499
|
+
k,
|
|
484
500
|
m.value.min,
|
|
485
501
|
m.value.max
|
|
486
502
|
), s.endDate = u;
|
|
487
503
|
break;
|
|
488
504
|
}
|
|
489
|
-
const d =
|
|
490
|
-
r.endDate =
|
|
491
|
-
|
|
505
|
+
const d = J(u);
|
|
506
|
+
r.endDate = p(d, s.endTime), b(s.startDate) && (r.startDate = p(
|
|
507
|
+
J(s.startDate),
|
|
492
508
|
s.startTime
|
|
493
509
|
));
|
|
494
|
-
const
|
|
495
|
-
r.range = null, e(
|
|
496
|
-
startDate:
|
|
510
|
+
const I = ge("startDate");
|
|
511
|
+
r.range = null, e(g.FORM_DATE, {
|
|
512
|
+
startDate: I,
|
|
497
513
|
endDate: d
|
|
498
|
-
}), e(
|
|
514
|
+
}), e(g.INPUT, {
|
|
499
515
|
...r,
|
|
500
|
-
range:
|
|
516
|
+
range: A.value
|
|
501
517
|
});
|
|
502
518
|
} else
|
|
503
|
-
|
|
504
|
-
},
|
|
505
|
-
s.endDate =
|
|
506
|
-
},
|
|
507
|
-
|
|
508
|
-
},
|
|
509
|
-
if (
|
|
510
|
-
|
|
511
|
-
const i =
|
|
512
|
-
e(
|
|
519
|
+
ee.value = !0, e(g.ERROR, { ...s });
|
|
520
|
+
}, Be), ze = (a) => {
|
|
521
|
+
s.endDate = Ce(a), Ke(s.endDate);
|
|
522
|
+
}, Je = (a) => {
|
|
523
|
+
ft(a);
|
|
524
|
+
}, Xe = oe((a) => {
|
|
525
|
+
if (c(a, t.dateFormData.startDate)) {
|
|
526
|
+
j.value = !1, r.startDate = p(r.startDate, a);
|
|
527
|
+
const i = ge("endDate");
|
|
528
|
+
e(g.FORM_DATE, {
|
|
513
529
|
startDate: r.startDate,
|
|
514
530
|
endDate: i,
|
|
515
531
|
startTime: a,
|
|
516
532
|
endTime: s.endTime ?? t.dateFormData.endTime
|
|
517
|
-
}), e(
|
|
533
|
+
}), e(g.INPUT, {
|
|
518
534
|
...r,
|
|
519
|
-
range:
|
|
535
|
+
range: A.value
|
|
520
536
|
});
|
|
521
537
|
} else
|
|
522
|
-
|
|
523
|
-
}),
|
|
524
|
-
|
|
538
|
+
j.value = !0, e(g.ERROR, { ...s });
|
|
539
|
+
}), Ze = oe((a) => {
|
|
540
|
+
c(a, t.dateFormData.endDate) ? ($.value = !1, r.endDate = p(r.endDate, a), e(g.FORM_DATE, {
|
|
525
541
|
startDate: r.startDate,
|
|
526
542
|
endDate: r.endDate,
|
|
527
543
|
startTime: s.startTime ?? t.dateFormData.startTime,
|
|
528
544
|
endTime: a
|
|
529
|
-
}), e(
|
|
545
|
+
}), e(g.INPUT, {
|
|
530
546
|
...r,
|
|
531
|
-
range:
|
|
532
|
-
})) : (
|
|
533
|
-
}),
|
|
534
|
-
s.startTime =
|
|
535
|
-
},
|
|
536
|
-
s.endTime =
|
|
537
|
-
},
|
|
538
|
-
|
|
539
|
-
},
|
|
547
|
+
range: A.value
|
|
548
|
+
})) : ($.value = !0, e(g.ERROR, { ...s }));
|
|
549
|
+
}), et = (a) => {
|
|
550
|
+
s.startTime = Pe(a), Xe(s.startTime);
|
|
551
|
+
}, tt = (a) => {
|
|
552
|
+
s.endTime = Pe(a), Ze(s.endTime);
|
|
553
|
+
}, at = (a) => {
|
|
554
|
+
Nt(a);
|
|
555
|
+
}, le = (a, i, u, d) => {
|
|
540
556
|
r.startDate = a, r.endDate = i, u && (r.granularity = u), d && (r.range = d);
|
|
541
|
-
},
|
|
557
|
+
}, nt = (a) => {
|
|
542
558
|
var u;
|
|
543
559
|
const i = (u = t.quickSelectRanges) == null ? void 0 : u.find(({ value: d }) => d === a);
|
|
544
560
|
if (i) {
|
|
545
|
-
|
|
546
|
-
const d = i.data,
|
|
547
|
-
s.endDate =
|
|
561
|
+
V();
|
|
562
|
+
const d = i.data, I = d.endDate || (d.isRelativeToNow ? new Date(Date.now()) : F(new Date(Date.now()))), h = d.isRelativeToNow && d.timeDifference ? new Date(I.getTime() - d.timeDifference) : d.startDate;
|
|
563
|
+
s.endDate = k(I), s.startDate = k(h), le(h, I, null, a), t.granularities && (r.granularity = d.granularity || y.value), s.startTime = Q(h), s.endTime = Q(I), r.startDate = h, r.endDate = I, d.isRelativeToNow && (f.value = {
|
|
548
564
|
...f.value,
|
|
549
565
|
[a]: {
|
|
550
|
-
startDate:
|
|
551
|
-
endDate:
|
|
566
|
+
startDate: h,
|
|
567
|
+
endDate: I
|
|
552
568
|
}
|
|
553
|
-
}), e(
|
|
569
|
+
}), e(g.CUSTOM_RANGE, {
|
|
554
570
|
...i.data,
|
|
555
|
-
startDate:
|
|
556
|
-
endDate:
|
|
571
|
+
startDate: h,
|
|
572
|
+
endDate: I,
|
|
557
573
|
range: i.value
|
|
558
574
|
});
|
|
559
575
|
}
|
|
560
|
-
},
|
|
561
|
-
weekly:
|
|
562
|
-
monthly:
|
|
563
|
-
quarterly:
|
|
564
|
-
},
|
|
576
|
+
}, rt = {
|
|
577
|
+
weekly: U,
|
|
578
|
+
monthly: Z,
|
|
579
|
+
quarterly: H
|
|
580
|
+
}, st = (a) => {
|
|
565
581
|
const i = r.granularity;
|
|
566
|
-
if (r.granularity = a, i &&
|
|
582
|
+
if (r.granularity = a, i && Y(i, structuredClone(ye(r))), r.startDate && r.endDate) {
|
|
567
583
|
switch (a) {
|
|
568
584
|
case "quarterly":
|
|
569
585
|
case "monthly":
|
|
570
586
|
case "weekly": {
|
|
571
|
-
if (
|
|
572
|
-
|
|
587
|
+
if (B[a]) {
|
|
588
|
+
le(B[a].startDate, B[a].endDate, a);
|
|
573
589
|
break;
|
|
574
590
|
}
|
|
575
|
-
const { startDate: u, endDate: d } =
|
|
591
|
+
const { startDate: u, endDate: d } = rt[a](
|
|
576
592
|
r.startDate,
|
|
577
593
|
r.endDate,
|
|
578
594
|
m.value.min,
|
|
579
595
|
m.value.max
|
|
580
596
|
);
|
|
581
|
-
|
|
597
|
+
le(u, d, a);
|
|
582
598
|
break;
|
|
583
599
|
}
|
|
584
600
|
case "daily":
|
|
585
|
-
|
|
601
|
+
B.daily && le(B.daily.startDate, B.daily.endDate, a);
|
|
586
602
|
break;
|
|
587
603
|
}
|
|
588
|
-
s.startDate =
|
|
604
|
+
s.startDate = k(r.startDate), s.endDate = k(r.endDate), e(g.INPUT, {
|
|
589
605
|
...r,
|
|
590
|
-
range:
|
|
606
|
+
range: A.value
|
|
591
607
|
});
|
|
592
608
|
}
|
|
593
609
|
};
|
|
@@ -595,35 +611,35 @@ const Mt = /[\d]/, Ct = /^\d{2}$/, At = /^\d{2}:\d{2}$/, xt = (t) => {
|
|
|
595
611
|
// Values
|
|
596
612
|
internalRangeDate: r,
|
|
597
613
|
dateTextInput: s,
|
|
598
|
-
endDateError:
|
|
599
|
-
endTimeError:
|
|
600
|
-
granularityItems:
|
|
601
|
-
selectedGranularity:
|
|
614
|
+
endDateError: ee,
|
|
615
|
+
endTimeError: $,
|
|
616
|
+
granularityItems: E,
|
|
617
|
+
selectedGranularity: x,
|
|
602
618
|
computedMinMax: m,
|
|
603
|
-
selectedRangeSelectorValue:
|
|
604
|
-
startDateError:
|
|
605
|
-
startTimeError:
|
|
606
|
-
quickSelectRangeDefaultItems:
|
|
619
|
+
selectedRangeSelectorValue: A,
|
|
620
|
+
startDateError: K,
|
|
621
|
+
startTimeError: j,
|
|
622
|
+
quickSelectRangeDefaultItems: R,
|
|
607
623
|
formInputWrapperConditionalClasses: ne,
|
|
608
624
|
// Methods
|
|
609
625
|
hasSlot: pt(n),
|
|
610
626
|
t: o,
|
|
611
627
|
// Events
|
|
612
|
-
onDateInput:
|
|
613
|
-
onDateInputKeyDown:
|
|
614
|
-
onEndDateInput:
|
|
615
|
-
onEndDateSelected:
|
|
616
|
-
onEndTimeInput:
|
|
617
|
-
onGranularityInput:
|
|
618
|
-
onRangeSelectorInput:
|
|
619
|
-
onStartDateInput:
|
|
620
|
-
onStartDateSelected:
|
|
621
|
-
onStartTimeInput:
|
|
622
|
-
onTimeInputKeyDown:
|
|
628
|
+
onDateInput: z,
|
|
629
|
+
onDateInputKeyDown: Je,
|
|
630
|
+
onEndDateInput: ze,
|
|
631
|
+
onEndDateSelected: He,
|
|
632
|
+
onEndTimeInput: tt,
|
|
633
|
+
onGranularityInput: st,
|
|
634
|
+
onRangeSelectorInput: nt,
|
|
635
|
+
onStartDateInput: Ve,
|
|
636
|
+
onStartDateSelected: ve,
|
|
637
|
+
onStartTimeInput: et,
|
|
638
|
+
onTimeInputKeyDown: at
|
|
623
639
|
};
|
|
624
640
|
}
|
|
625
641
|
});
|
|
626
|
-
var
|
|
642
|
+
var qt = function() {
|
|
627
643
|
var e = this, n = e._self._c;
|
|
628
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() {
|
|
629
645
|
return [e._v("YYYY-MM-DD")];
|
|
@@ -634,65 +650,65 @@ var Nt = function() {
|
|
|
634
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() {
|
|
635
651
|
return [e._v("HH:MM:SS")];
|
|
636
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)]);
|
|
637
|
-
},
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
653
|
+
}, Lt = [], Yt = /* @__PURE__ */ $e(
|
|
654
|
+
Bt,
|
|
655
|
+
qt,
|
|
656
|
+
Lt,
|
|
641
657
|
!1,
|
|
642
658
|
null,
|
|
643
|
-
"
|
|
659
|
+
"f113fd62"
|
|
644
660
|
);
|
|
645
|
-
const
|
|
661
|
+
const q = Yt.exports, Qt = ({
|
|
646
662
|
datePickerValue: t,
|
|
647
663
|
isDateIncorrect: e,
|
|
648
664
|
quickSelectRanges: n,
|
|
649
665
|
isMonthVariant: l
|
|
650
666
|
}) => {
|
|
651
|
-
var
|
|
652
|
-
const { locale: o, t: D } =
|
|
667
|
+
var R, x, E, X;
|
|
668
|
+
const { locale: o, t: D } = _e(), f = pe(), y = (m) => !!m && !isNaN(m.getTime()), r = (m, H) => y(m) ? te(m, H, {
|
|
653
669
|
locale: f[o.value.substring(0, 2)] || f.enUS
|
|
654
|
-
}) : void 0,
|
|
655
|
-
startDate: r((
|
|
656
|
-
endDate: r((
|
|
657
|
-
startTime: r((
|
|
658
|
-
endTime: r((
|
|
670
|
+
}) : void 0, T = ce({
|
|
671
|
+
startDate: r((R = t.value) == null ? void 0 : R.startDate, S.NUMERIC_DATE_YEAR_FIRST),
|
|
672
|
+
endDate: r((x = t.value) == null ? void 0 : x.endDate, S.NUMERIC_DATE_YEAR_FIRST),
|
|
673
|
+
startTime: r((E = t.value) == null ? void 0 : E.startDate, S.HOUR_MINUTE_SECONDS),
|
|
674
|
+
endTime: r((X = t.value) == null ? void 0 : X.endDate, S.HOUR_MINUTE_SECONDS)
|
|
659
675
|
});
|
|
660
676
|
return {
|
|
661
677
|
// Values
|
|
662
|
-
dateDisplayValue:
|
|
663
|
-
var
|
|
678
|
+
dateDisplayValue: _(() => {
|
|
679
|
+
var U;
|
|
664
680
|
if (e.value)
|
|
665
|
-
return `${
|
|
681
|
+
return `${T.startDate || ""} - ${T.endDate || ""}`;
|
|
666
682
|
if (!t.value || !t.value.startDate && !t.value.endDate)
|
|
667
683
|
return D("selectDateRange");
|
|
668
|
-
if ((
|
|
669
|
-
const v = n.value.find(({ value:
|
|
670
|
-
var
|
|
671
|
-
return
|
|
684
|
+
if ((U = n.value) != null && U.length) {
|
|
685
|
+
const v = n.value.find(({ value: N }) => {
|
|
686
|
+
var P;
|
|
687
|
+
return N === ((P = t.value) == null ? void 0 : P.range);
|
|
672
688
|
});
|
|
673
689
|
if (v)
|
|
674
690
|
return v.label;
|
|
675
691
|
}
|
|
676
692
|
if (t.value.granularity === "quarterly") {
|
|
677
|
-
const { startDate: v, endDate:
|
|
678
|
-
if (
|
|
679
|
-
return
|
|
680
|
-
const
|
|
681
|
-
return `${
|
|
693
|
+
const { startDate: v, endDate: N } = t.value, P = D("quarter", { quarter: Ae(v), year: Fe(v) });
|
|
694
|
+
if (kt(v, N))
|
|
695
|
+
return P;
|
|
696
|
+
const W = D("quarter", { quarter: Ae(N), year: Fe(N) });
|
|
697
|
+
return `${P} - ${W}`;
|
|
682
698
|
}
|
|
683
|
-
const { startDate: m, endDate:
|
|
684
|
-
return `${r(
|
|
685
|
-
|
|
686
|
-
|
|
699
|
+
const { startDate: m, endDate: H } = T, Z = l != null && l.value ? S.LONG_MONTH_YEAR : S.FULL_DATE_MONTH_FIRST;
|
|
700
|
+
return `${r(J(m), Z)} - ${r(
|
|
701
|
+
J(H),
|
|
702
|
+
Z
|
|
687
703
|
)}`;
|
|
688
704
|
}),
|
|
689
|
-
textInputDisplayValue:
|
|
705
|
+
textInputDisplayValue: T,
|
|
690
706
|
// Methods
|
|
691
707
|
formatTextInputDisplayValue: () => ""
|
|
692
708
|
};
|
|
693
709
|
};
|
|
694
|
-
var
|
|
695
|
-
const
|
|
710
|
+
var de = /* @__PURE__ */ ((t) => (t.INPUT = "input", t))(de || {});
|
|
711
|
+
const jt = {
|
|
696
712
|
"en-US": {
|
|
697
713
|
apply: "Apply",
|
|
698
714
|
cancel: "Cancel",
|
|
@@ -713,20 +729,20 @@ const Lt = {
|
|
|
713
729
|
cancel: "Cancelar",
|
|
714
730
|
selectDate: "Selecione uma data"
|
|
715
731
|
}
|
|
716
|
-
},
|
|
717
|
-
i18n: { messages:
|
|
732
|
+
}, $t = Le({
|
|
733
|
+
i18n: { messages: jt },
|
|
718
734
|
name: "bento-date-range-picker",
|
|
719
735
|
components: {
|
|
720
|
-
BentoButtonActions:
|
|
721
|
-
BentoDivider:
|
|
722
|
-
BentoTypography:
|
|
723
|
-
BentoPopover:
|
|
724
|
-
DateRangePickerCalendar:
|
|
725
|
-
DropdownInputDefault:
|
|
726
|
-
ErrorMessage:
|
|
727
|
-
FieldLabel:
|
|
736
|
+
BentoButtonActions: bt,
|
|
737
|
+
BentoDivider: it,
|
|
738
|
+
BentoTypography: Qe,
|
|
739
|
+
BentoPopover: lt,
|
|
740
|
+
DateRangePickerCalendar: q,
|
|
741
|
+
DropdownInputDefault: ut,
|
|
742
|
+
ErrorMessage: It,
|
|
743
|
+
FieldLabel: Rt
|
|
728
744
|
},
|
|
729
|
-
directives: { BentoClickOutsideDirective:
|
|
745
|
+
directives: { BentoClickOutsideDirective: _t },
|
|
730
746
|
props: {
|
|
731
747
|
/**
|
|
732
748
|
* Allows user to enter time values in the form
|
|
@@ -747,16 +763,16 @@ const Lt = {
|
|
|
747
763
|
/**
|
|
748
764
|
* Allows user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
|
|
749
765
|
*/
|
|
750
|
-
firstDayOfWeek:
|
|
766
|
+
firstDayOfWeek: q.props.firstDayOfWeek,
|
|
751
767
|
/**
|
|
752
768
|
* A list of available granularities.
|
|
753
769
|
* If present, the date picker will display a segmented control to change granularity.
|
|
754
770
|
*/
|
|
755
|
-
granularities:
|
|
771
|
+
granularities: q.props.granularities,
|
|
756
772
|
/**
|
|
757
773
|
* Indicate if a date should be disabled or not
|
|
758
774
|
*/
|
|
759
|
-
isDateDisabled:
|
|
775
|
+
isDateDisabled: q.props.isDateDisabled,
|
|
760
776
|
/**
|
|
761
777
|
* Text that is displayed as a label above the element.
|
|
762
778
|
*/
|
|
@@ -795,23 +811,23 @@ const Lt = {
|
|
|
795
811
|
/**
|
|
796
812
|
* Set a maximum number of dates to be selectable by the range.
|
|
797
813
|
*/
|
|
798
|
-
maxRange:
|
|
814
|
+
maxRange: q.props.maxRange,
|
|
799
815
|
/**
|
|
800
816
|
* Sets a minimum limit for selectable dates - dates before `min` will not be selectable
|
|
801
817
|
*/
|
|
802
|
-
min:
|
|
818
|
+
min: q.props.min,
|
|
803
819
|
/**
|
|
804
820
|
* Sets a maximum limit for selectable dates - dates after `max` will not be selectable
|
|
805
821
|
*/
|
|
806
|
-
max:
|
|
822
|
+
max: q.props.max,
|
|
807
823
|
/**
|
|
808
824
|
* Number of months rendered on pane
|
|
809
825
|
*/
|
|
810
|
-
numberOfMonths:
|
|
826
|
+
numberOfMonths: q.props.numberOfMonths,
|
|
811
827
|
/**
|
|
812
828
|
* Selected date
|
|
813
829
|
*/
|
|
814
|
-
value:
|
|
830
|
+
value: q.props.value,
|
|
815
831
|
/**
|
|
816
832
|
* The type of calendar to display. Defaults to showing days.
|
|
817
833
|
*/
|
|
@@ -828,50 +844,50 @@ const Lt = {
|
|
|
828
844
|
*/
|
|
829
845
|
hasActions: { type: Boolean, default: !1 }
|
|
830
846
|
},
|
|
831
|
-
emits: [
|
|
847
|
+
emits: [de.INPUT],
|
|
832
848
|
setup(t, { emit: e }) {
|
|
833
|
-
const { locale: n, t: l } =
|
|
849
|
+
const { locale: n, t: l } = _e(), o = pe(), D = re("bento-date-range-picker-container"), f = re("bento-date-range-picker-label"), y = re("bento-date-range-picker-description"), r = re("bento-date-range-picker-error"), T = re("bento-date-range-picker-date-error"), A = _(
|
|
834
850
|
() => t.label || l("dateRangePicker", { name: D })
|
|
835
|
-
), ne =
|
|
836
|
-
const
|
|
851
|
+
), ne = _(() => (t == null ? void 0 : t.quickSelectRanges) && t.quickSelectRanges.map((c) => {
|
|
852
|
+
const p = c.data.endDate ? void 0 : new Date(Date.now()).getTime() - c.data.startDate.getTime();
|
|
837
853
|
return {
|
|
838
854
|
...c,
|
|
839
855
|
data: {
|
|
840
856
|
...c.data,
|
|
841
857
|
// Adding timeDifference to calculate an up-to-date endDate on range selection
|
|
842
|
-
timeDifference:
|
|
858
|
+
timeDifference: p
|
|
843
859
|
}
|
|
844
860
|
};
|
|
845
|
-
})),
|
|
846
|
-
|
|
861
|
+
})), R = w(!1), x = w(null), E = w(!1), { isReadOnly: X } = vt(ke(t, "readonly"));
|
|
862
|
+
Te(
|
|
847
863
|
() => t.disabled,
|
|
848
864
|
() => {
|
|
849
|
-
t.disabled &&
|
|
865
|
+
t.disabled && E.value && (E.value = !1);
|
|
850
866
|
}
|
|
851
867
|
);
|
|
852
|
-
const m =
|
|
868
|
+
const m = _(() => t.hasActions ? !V.value && R.value : R.value), H = _(() => ({
|
|
853
869
|
"b-date-range-picker__description--error": !!t.errorMessage || m.value
|
|
854
|
-
})),
|
|
855
|
-
datePickerValue:
|
|
856
|
-
isDateIncorrect:
|
|
870
|
+
})), Z = _(() => t.variant === "month"), { dateDisplayValue: U, textInputDisplayValue: v } = Qt({
|
|
871
|
+
datePickerValue: ke(t, "value"),
|
|
872
|
+
isDateIncorrect: R,
|
|
857
873
|
quickSelectRanges: ne,
|
|
858
|
-
isMonthVariant:
|
|
859
|
-
}),
|
|
860
|
-
() => `${t.description ? y : ""} ${t.errorMessage ? r : ""} ${
|
|
861
|
-
),
|
|
862
|
-
|
|
863
|
-
},
|
|
864
|
-
|
|
865
|
-
},
|
|
874
|
+
isMonthVariant: Z
|
|
875
|
+
}), N = _(
|
|
876
|
+
() => `${t.description ? y : ""} ${t.errorMessage ? r : ""} ${R.value ? T : ""}`.trim() || null
|
|
877
|
+
), P = _(() => t.allowTimeInput && t.variant !== "month"), W = () => {
|
|
878
|
+
E.value = !1;
|
|
879
|
+
}, De = () => {
|
|
880
|
+
E.value = !0;
|
|
881
|
+
}, ie = w(U.value), B = w(
|
|
866
882
|
// textInputDisplayValue is a reactive object
|
|
867
|
-
structuredClone(
|
|
868
|
-
),
|
|
869
|
-
() => t.hasActions ?
|
|
870
|
-
),
|
|
871
|
-
() => t.hasActions ?
|
|
883
|
+
structuredClone(ye(v))
|
|
884
|
+
), Y = w(t.value), V = w(!0), k = _(
|
|
885
|
+
() => t.hasActions ? B.value : v
|
|
886
|
+
), Q = _(
|
|
887
|
+
() => t.hasActions ? ie.value : U.value
|
|
872
888
|
);
|
|
873
|
-
|
|
874
|
-
if (t.hasActions ||
|
|
889
|
+
Ye(() => {
|
|
890
|
+
if (t.hasActions || ot(
|
|
875
891
|
'BentoDateRangePicker "hasActions" property',
|
|
876
892
|
`Set the BentoDateRangePicker "hasActions" property true which will display the "Apply" and "Cancel" buttons.
|
|
877
893
|
This will be the default behavior in the v2 and "hasActions" will be removed.`,
|
|
@@ -880,126 +896,126 @@ const Lt = {
|
|
|
880
896
|
throw new Error(
|
|
881
897
|
'Quarterly granularity is only supported by BentoDateRangePicker with variant: "month"'
|
|
882
898
|
);
|
|
883
|
-
}),
|
|
899
|
+
}), Te(
|
|
884
900
|
() => t.value,
|
|
885
901
|
() => {
|
|
886
|
-
|
|
902
|
+
ie.value = U.value, B.value = structuredClone(ye(v));
|
|
887
903
|
}
|
|
888
904
|
);
|
|
889
|
-
const
|
|
905
|
+
const K = _(() => [
|
|
890
906
|
{
|
|
891
907
|
title: l("apply"),
|
|
892
908
|
event: () => {
|
|
893
|
-
e(
|
|
909
|
+
e(de.INPUT, Y.value), W(), V.value = !0;
|
|
894
910
|
},
|
|
895
|
-
disabled:
|
|
911
|
+
disabled: V.value
|
|
896
912
|
},
|
|
897
913
|
{
|
|
898
914
|
title: l("cancel"),
|
|
899
|
-
event:
|
|
915
|
+
event: W
|
|
900
916
|
}
|
|
901
917
|
]);
|
|
902
|
-
return
|
|
918
|
+
return Te(Y, (c) => {
|
|
903
919
|
if (t.hasActions) {
|
|
904
|
-
|
|
920
|
+
V.value = R.value;
|
|
905
921
|
return;
|
|
906
922
|
}
|
|
907
|
-
e(
|
|
923
|
+
e(de.INPUT, c);
|
|
908
924
|
}), {
|
|
909
925
|
// Refs
|
|
910
|
-
inputContainerRef:
|
|
926
|
+
inputContainerRef: x,
|
|
911
927
|
// Values,
|
|
912
928
|
adjustedQuickSelectRanges: ne,
|
|
913
|
-
dateDisplayValue:
|
|
929
|
+
dateDisplayValue: U,
|
|
914
930
|
datePickerContainerId: D,
|
|
915
|
-
descriptionConditionalClasses:
|
|
916
|
-
displayedTextInputValue:
|
|
917
|
-
displayedDateValue:
|
|
918
|
-
isDateIncorrect:
|
|
919
|
-
isDateRangePickerOpen:
|
|
920
|
-
isReadOnly:
|
|
931
|
+
descriptionConditionalClasses: H,
|
|
932
|
+
displayedTextInputValue: k,
|
|
933
|
+
displayedDateValue: Q,
|
|
934
|
+
isDateIncorrect: R,
|
|
935
|
+
isDateRangePickerOpen: E,
|
|
936
|
+
isReadOnly: X,
|
|
921
937
|
labelId: f,
|
|
922
938
|
descriptionId: y,
|
|
923
|
-
dateErrorId:
|
|
939
|
+
dateErrorId: T,
|
|
924
940
|
errorId: r,
|
|
925
|
-
popoverAriaLabel:
|
|
941
|
+
popoverAriaLabel: A,
|
|
926
942
|
shouldDisplayError: m,
|
|
927
|
-
ariaDescribedBy:
|
|
943
|
+
ariaDescribedBy: N,
|
|
928
944
|
textInputDisplayValue: v,
|
|
929
|
-
rangePickerButtonActions:
|
|
930
|
-
BentoButtonActionsLayout:
|
|
931
|
-
withTimeInput:
|
|
945
|
+
rangePickerButtonActions: K,
|
|
946
|
+
BentoButtonActionsLayout: St,
|
|
947
|
+
withTimeInput: P,
|
|
932
948
|
// Events
|
|
933
|
-
closeDateRangePicker:
|
|
949
|
+
closeDateRangePicker: W,
|
|
934
950
|
clearDateRangePickerValue: async () => {
|
|
935
|
-
|
|
951
|
+
R.value && (R.value = !1), Y.value = null;
|
|
936
952
|
},
|
|
937
|
-
openDateRangePicker:
|
|
953
|
+
openDateRangePicker: De,
|
|
938
954
|
onRangeSelectorInput: (c) => {
|
|
939
955
|
if (c) {
|
|
940
|
-
const
|
|
956
|
+
const p = (b, ve) => b ? te(b, ve, {
|
|
941
957
|
locale: o[n.value.substring(0, 2)] || o.enUS
|
|
942
|
-
}) : void 0,
|
|
958
|
+
}) : void 0, z = (b) => te(b, S.NUMERIC_DATE_YEAR_FIRST, {
|
|
943
959
|
locale: o[n.value.substring(0, 2)] || o.enUS
|
|
944
960
|
});
|
|
945
|
-
v.startDate =
|
|
961
|
+
v.startDate = z(c.startDate), v.endDate = z(c.endDate), v.startTime = p(
|
|
946
962
|
c.startDate,
|
|
947
|
-
|
|
948
|
-
), v.endTime =
|
|
963
|
+
S.HOUR_MINUTE_SECONDS
|
|
964
|
+
), v.endTime = p(
|
|
949
965
|
c.endDate,
|
|
950
|
-
|
|
951
|
-
),
|
|
966
|
+
S.HOUR_MINUTE_SECONDS
|
|
967
|
+
), Y.value = c;
|
|
952
968
|
}
|
|
953
969
|
},
|
|
954
970
|
onEnterPressedOverInput: () => {
|
|
955
|
-
if (!
|
|
956
|
-
|
|
971
|
+
if (!E.value) {
|
|
972
|
+
E.value = !0;
|
|
957
973
|
return;
|
|
958
974
|
}
|
|
959
|
-
|
|
975
|
+
R.value || (E.value = !1);
|
|
960
976
|
},
|
|
961
977
|
onDateRangePickerInput: (c) => {
|
|
962
|
-
|
|
963
|
-
const
|
|
978
|
+
R.value = !1;
|
|
979
|
+
const p = (z, b) => z ? te(z, b, {
|
|
964
980
|
locale: o[n.value.substring(0, 2)] || o.enUS
|
|
965
981
|
}) : void 0;
|
|
966
|
-
v.startDate =
|
|
982
|
+
v.startDate = p(
|
|
967
983
|
c.startDate,
|
|
968
|
-
|
|
969
|
-
), v.endDate =
|
|
984
|
+
S.NUMERIC_DATE_YEAR_FIRST
|
|
985
|
+
), v.endDate = p(c.endDate, S.NUMERIC_DATE_YEAR_FIRST), v.startTime = p(c.startDate, S.HOUR_MINUTE_SECONDS), v.endTime = p(c.endDate, S.HOUR_MINUTE_SECONDS), Y.value = c;
|
|
970
986
|
},
|
|
971
987
|
onDateRangePickerError: (c) => {
|
|
972
|
-
|
|
988
|
+
R.value = !0, v.startDate = c.startDate, v.endDate = c.endDate, Y.value = { startDate: null, endDate: null };
|
|
973
989
|
},
|
|
974
990
|
onDateRangePickerFormDateInputUpdate: (c) => {
|
|
975
|
-
|
|
991
|
+
R.value = !1, c.startTime && (v.startTime = c.startTime), c.endTime && (v.endTime = c.endTime);
|
|
976
992
|
},
|
|
977
993
|
// Translations
|
|
978
994
|
t: l
|
|
979
995
|
};
|
|
980
996
|
}
|
|
981
997
|
});
|
|
982
|
-
var
|
|
998
|
+
var Gt = function() {
|
|
983
999
|
var e = this, n = e._self._c;
|
|
984
1000
|
return e._self._setupProxy, n("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.closeDateRangePicker, expression: "closeDateRangePicker" }], staticClass: "b-date-range-picker" }, [e.label ? n("field-label", { attrs: { id: e.labelId, label: e.label, "tooltip-text": e.tooltipText, optional: e.optional, required: e.required } }) : e._e(), n("div", { on: { keydown: function(l) {
|
|
985
1001
|
return !l.type.indexOf("key") && e._k(l.keyCode, "enter", 13, l.key, "Enter") ? null : e.onEnterPressedOverInput.apply(null, arguments);
|
|
986
1002
|
} } }, [n("dropdown-input-default", { ref: "inputContainerRef", attrs: { "always-combobox-is-input": "", ariaControls: e.datePickerContainerId, ariaExpanded: e.isDateRangePickerOpen, "aria-labelledby": e.label ? e.labelId : null, "aria-describedby": e.ariaDescribedBy, disabled: e.disabled, "is-invalid": !!e.errorMessage || e.shouldDisplayError, open: e.isDateRangePickerOpen, "display-value": e.displayedDateValue, readonly: e.isReadOnly }, on: { open: e.openDateRangePicker, clear: e.clearDateRangePickerValue, close: e.closeDateRangePicker } })], 1), e.shouldDisplayError ? n("error-message", { staticClass: "b-date-range-picker__error-message", attrs: { id: e.dateErrorId, "error-message": e.t("provideDateInAFormat") } }) : e._e(), e.errorMessage ? n("error-message", { staticClass: "b-date-range-picker__error-message", attrs: { id: e.errorId, "error-message": e.errorMessage } }) : e._e(), e.description ? n("bento-typography", { staticClass: "b-date-range-picker__description", class: e.descriptionConditionalClasses, attrs: { id: e.descriptionId, el: "span" } }, [e._v(" " + e._s(e.description) + " ")]) : e._e(), e.inputContainerRef ? n("bento-popover", { staticClass: "b-date-range-picker__container", attrs: { id: e.datePickerContainerId, open: e.isDateRangePickerOpen, "target-element": e.inputContainerRef, "disable-focus-trap": !0, "aria-label": e.popoverAriaLabel, position: "bottom-start", "without-space": "", "fit-content": "" } }, [n("date-range-picker-calendar", { attrs: { "allow-time-input": e.withTimeInput, "quick-select-ranges": e.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": e.displayedTextInputValue, variant: e.variant }, on: { "custom-range": e.onRangeSelectorInput, input: e.onDateRangePickerInput, error: e.onDateRangePickerError, "form-date": e.onDateRangePickerFormDateInputUpdate }, scopedSlots: e._u([e.hasActions ? { key: "actions", fn: function() {
|
|
987
1003
|
return [n("bento-divider"), n("div", { staticClass: "b-date-range-picker__footer" }, [n("bento-button-actions", { attrs: { actions: e.rangePickerButtonActions, layout: e.BentoButtonActionsLayout.SPACE_BETWEEN } })], 1)];
|
|
988
1004
|
}, proxy: !0 } : null], null, !0) })], 1) : e._e()], 1);
|
|
989
|
-
},
|
|
990
|
-
Yt,
|
|
991
|
-
Qt,
|
|
1005
|
+
}, Ht = [], Wt = /* @__PURE__ */ $e(
|
|
992
1006
|
$t,
|
|
1007
|
+
Gt,
|
|
1008
|
+
Ht,
|
|
993
1009
|
!1,
|
|
994
1010
|
null,
|
|
995
1011
|
"288c6da8"
|
|
996
1012
|
);
|
|
997
|
-
const
|
|
1013
|
+
const ga = Wt.exports;
|
|
998
1014
|
export {
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1015
|
+
ga as B,
|
|
1016
|
+
q as D,
|
|
1017
|
+
de as a,
|
|
1018
|
+
Et as b,
|
|
1019
|
+
ue as i
|
|
1004
1020
|
};
|
|
1005
|
-
//# sourceMappingURL=date-range-picker.
|
|
1021
|
+
//# sourceMappingURL=date-range-picker.am63DgMj.js.map
|