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