@adyen/bento-vue2 1.108.2 → 1.108.3
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 +1 -0
- 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/calendar.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/file-uploader.css +1 -1
- package/dist/assets/input-time.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/navigation-menu-group.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/selection-card-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/chunks/{calendar.CbsgWJTo.js → calendar.B-fVLsHA.js} +289 -286
- package/dist/chunks/calendar.B-fVLsHA.js.map +1 -0
- package/dist/chunks/{data-grid.CWVHdx2g.js → data-grid.Bh8ADT7E.js} +2 -2
- package/dist/chunks/{data-grid.CWVHdx2g.js.map → data-grid.Bh8ADT7E.js.map} +1 -1
- package/dist/chunks/{date-picker.mP11cD8l.js → date-picker.BZWr0kKU.js} +3 -3
- package/dist/chunks/{date-picker.mP11cD8l.js.map → date-picker.BZWr0kKU.js.map} +1 -1
- package/dist/chunks/{date-range-picker.BK1Fe9dv.js → date-range-picker.DcG3KxuF.js} +293 -284
- package/dist/chunks/date-range-picker.DcG3KxuF.js.map +1 -0
- package/dist/chunks/{date-time-picker.Cejtycaf.js → date-time-picker.Cs8Ev9k4.js} +5 -5
- package/dist/chunks/{date-time-picker.Cejtycaf.js.map → date-time-picker.Cs8Ev9k4.js.map} +1 -1
- package/dist/chunks/{filter-bar.D_31DtTq.js → filter-bar.Cx3YORQe.js} +5 -5
- package/dist/chunks/{filter-bar.D_31DtTq.js.map → filter-bar.Cx3YORQe.js.map} +1 -1
- package/dist/chunks/{input-time.DDYaCY3r.js → input-time.D4GB-OBv.js} +21 -19
- package/dist/chunks/input-time.D4GB-OBv.js.map +1 -0
- package/dist/chunks/{selection-card-group.CGUEcVTZ.js → selection-card-group.mAC1hrzJ.js} +49 -48
- package/dist/chunks/{selection-card-group.CGUEcVTZ.js.map → selection-card-group.mAC1hrzJ.js.map} +1 -1
- package/dist/chunks/{textarea.ec4ubFuL.js → textarea.DmEgZbGe.js} +3 -3
- package/dist/chunks/textarea.DmEgZbGe.js.map +1 -0
- package/dist/chunks/{timeline-item.BoaJTmzW.js → timeline-item.BLHykoIV.js} +2 -2
- package/dist/chunks/{timeline-item.BoaJTmzW.js.map → timeline-item.BLHykoIV.js.map} +1 -1
- package/dist/chunks/{use-date-input-formatter.3Cgguj4S.js → use-date-input-formatter.CzQbwvPo.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.3Cgguj4S.js.map → use-date-input-formatter.CzQbwvPo.js.map} +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-time-picker.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/index.js +10 -10
- package/dist/input-time.js +1 -1
- package/dist/internal.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/web-types.json +9 -1
- package/package.json +6 -6
- package/dist/chunks/calendar.CbsgWJTo.js.map +0 -1
- package/dist/chunks/date-range-picker.BK1Fe9dv.js.map +0 -1
- package/dist/chunks/input-time.DDYaCY3r.js.map +0 -1
- package/dist/chunks/textarea.ec4ubFuL.js.map +0 -1
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { d as
|
|
3
|
-
import { B as
|
|
4
|
-
import { h as
|
|
5
|
-
import { B as
|
|
6
|
-
import { B as
|
|
7
|
-
import { B as
|
|
8
|
-
import { B as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
import { u as
|
|
13
|
-
import { j as
|
|
14
|
-
import { e as q, a as
|
|
15
|
-
import { s as
|
|
16
|
-
import { t as
|
|
17
|
-
import { c as
|
|
18
|
-
import { s as
|
|
19
|
-
import { B as
|
|
20
|
-
import { B as
|
|
21
|
-
import { B as
|
|
22
|
-
import { n as
|
|
23
|
-
import { g as
|
|
24
|
-
import { u as
|
|
1
|
+
import { defineComponent as ke, computed as d, reactive as Me, useSlots as Da, ref as b, onMounted as Ke, toRaw as Ae, watch as ye, useAttrs as pa, toRef as Ye } from "vue";
|
|
2
|
+
import { d as va, h as fa } from "./index.CL3TXc0a.js";
|
|
3
|
+
import { B as ga } from "./divider.KxXy6nzJ.js";
|
|
4
|
+
import { h as ha, B as ya } from "./button-actions.DDLh7iWK.js";
|
|
5
|
+
import { B as Xe, d as qe } from "./typography.D1OZJbEa.js";
|
|
6
|
+
import { B as Ma } from "./alert.Dj57zB88.js";
|
|
7
|
+
import { B as Ra, g as ze, D as Ta } from "./dropdown.DGUdfiro.js";
|
|
8
|
+
import { B as Ya } from "./segmented-control.F0Y-i9DQ.js";
|
|
9
|
+
import { u as _e } from "./index.CPOlyau9.js";
|
|
10
|
+
import { u as ba } from "./use-has-slot.C9lQZ6nz.js";
|
|
11
|
+
import { u as Se, a as Aa } from "./use-date-input-formatter.CzQbwvPo.js";
|
|
12
|
+
import { u as ka } from "./use-touch-device.DTqFAbXh.js";
|
|
13
|
+
import { j as ue, k as w, s as T, l as _a, m as Ne, n as Sa, f as Ve, o as Ia, q as Ea, r as Pa, t as Le, u as Fa, b as C, v as xa, h as wa, i as Oa, e as E, w as We, x as Qe, g as Ba } from "./calendar.B-fVLsHA.js";
|
|
14
|
+
import { e as q, a as Ge } from "./differenceInMonths.yz4Dfe-b.js";
|
|
15
|
+
import { s as $e } from "./startOfWeek.muMEhS7U.js";
|
|
16
|
+
import { t as Re, n as Ca, c as qa } from "./en-US.BR6y7foR.js";
|
|
17
|
+
import { c as za } from "./constructNow.DyOJDyZZ.js";
|
|
18
|
+
import { s as he, a as Ue } from "./set-time-in-date.BVfkl8K8.js";
|
|
19
|
+
import { B as Na, i as je } from "./input-time.D4GB-OBv.js";
|
|
20
|
+
import { B as Va } from "./input-field.BwGCbmk0.js";
|
|
21
|
+
import { B as La } from "./form-layout-group.C_0b8u-g.js";
|
|
22
|
+
import { n as Ie } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
23
|
+
import { g as le } from "./generate-uid.DBWe4g6T.js";
|
|
24
|
+
import { u as Wa } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
25
25
|
import "./index.Cl4_42j5.js";
|
|
26
|
-
import { u as
|
|
27
|
-
import { B as
|
|
28
|
-
import { F as
|
|
29
|
-
import { E as
|
|
30
|
-
import { B as
|
|
26
|
+
import { u as Qa } from "./form-field.D_2g7vaP.js";
|
|
27
|
+
import { B as Ga } from "./directive.D1-d-C2K.js";
|
|
28
|
+
import { F as $a } from "./field-label.BSWtn7ew.js";
|
|
29
|
+
import { E as Ua } from "./error-message.BEHBfjmn.js";
|
|
30
|
+
import { B as ja } from "./button-actions.types.BptAXjD8.js";
|
|
31
31
|
import "../assets/date-range-picker.css";
|
|
32
|
-
function
|
|
33
|
-
return
|
|
32
|
+
function Je(o, t) {
|
|
33
|
+
return Re(o, t?.in).getFullYear();
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
return +
|
|
35
|
+
function ie(o, t) {
|
|
36
|
+
return +Re(o) == +Re(t);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
const [a, i] =
|
|
38
|
+
function Ja(o, t, e) {
|
|
39
|
+
const [a, i] = Ca(
|
|
40
40
|
e?.in,
|
|
41
41
|
o,
|
|
42
42
|
t
|
|
43
43
|
);
|
|
44
|
-
return +
|
|
44
|
+
return +ue(a) == +ue(i);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
const e =
|
|
46
|
+
function He(o, t) {
|
|
47
|
+
const e = Re(o, t?.in);
|
|
48
48
|
return e.setMilliseconds(0), e;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
return +
|
|
50
|
+
function be(o, t) {
|
|
51
|
+
return +He(o) == +He(t);
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function Ha(o, t) {
|
|
54
54
|
return w(
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
qa(o, o),
|
|
56
|
+
za(o)
|
|
57
57
|
);
|
|
58
58
|
}
|
|
59
|
-
const
|
|
59
|
+
const Ka = {
|
|
60
60
|
name: "date-time-input"
|
|
61
|
-
},
|
|
62
|
-
...
|
|
61
|
+
}, Xa = /* @__PURE__ */ ke({
|
|
62
|
+
...Ka,
|
|
63
63
|
props: {
|
|
64
64
|
dateModelValue: { default: "" },
|
|
65
65
|
dateProps: { default: () => ({}) },
|
|
@@ -68,7 +68,7 @@ const ja = {
|
|
|
68
68
|
timeModelValue: { default: "" },
|
|
69
69
|
timeProps: { default: () => ({}) }
|
|
70
70
|
},
|
|
71
|
-
emits: ["update:date-model-value", "date:keydown", "update:time-model-value", "time:error", "time:valid"],
|
|
71
|
+
emits: ["click", "update:date-model-value", "date:keydown", "update:time-model-value", "time:error", "time:valid"],
|
|
72
72
|
setup(o) {
|
|
73
73
|
const t = o, e = d(() => ({
|
|
74
74
|
errorMessage: t.errorMessage,
|
|
@@ -77,83 +77,87 @@ const ja = {
|
|
|
77
77
|
errorMessage: t.errorMessage,
|
|
78
78
|
...t.timeProps
|
|
79
79
|
}));
|
|
80
|
-
return { __sfc: !0, props: t, resolvedDateProps: e, resolvedTimeProps: a, BentoFormLayoutGroup:
|
|
80
|
+
return { __sfc: !0, props: t, resolvedDateProps: e, resolvedTimeProps: a, BentoFormLayoutGroup: La, BentoInputField: Va, BentoInputTime: Na };
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
|
-
var
|
|
83
|
+
var Za = function() {
|
|
84
84
|
var t = this, e = t._self._c, a = t._self._setupProxy;
|
|
85
|
-
return e(a.BentoFormLayoutGroup, { attrs: { layout: t.showTimeInput ? "50-50" : "100", "error-message": t.errorMessage } }, [e(a.BentoInputField, t._b({ attrs: { "model-value": t.dateModelValue }, on: {
|
|
85
|
+
return e(a.BentoFormLayoutGroup, { attrs: { layout: t.showTimeInput ? "50-50" : "100", "error-message": t.errorMessage } }, [e(a.BentoInputField, t._b({ attrs: { "model-value": t.dateModelValue }, on: { click: function(i) {
|
|
86
|
+
return t.$emit("click");
|
|
87
|
+
}, "update:model-value": function(i) {
|
|
86
88
|
return t.$emit("update:date-model-value", i);
|
|
87
89
|
}, keydown: function(i) {
|
|
88
90
|
return t.$emit("date:keydown", i);
|
|
89
|
-
} } }, "bento-input-field", a.resolvedDateProps, !1)), t.showTimeInput ? e(a.BentoInputTime, t._b({ attrs: { "model-value": t.timeModelValue }, on: {
|
|
91
|
+
} } }, "bento-input-field", a.resolvedDateProps, !1)), t.showTimeInput ? e(a.BentoInputTime, t._b({ attrs: { "model-value": t.timeModelValue }, on: { click: function(i) {
|
|
92
|
+
return t.$emit("click");
|
|
93
|
+
}, "update:model-value": function(i) {
|
|
90
94
|
return t.$emit("update:time-model-value", i);
|
|
91
95
|
}, "input:error": function(i) {
|
|
92
96
|
return t.$emit("time:error");
|
|
93
97
|
}, "input:valid": function(i) {
|
|
94
98
|
return t.$emit("time:valid");
|
|
95
99
|
} } }, "bento-input-time", a.resolvedTimeProps, !1)) : t._e()], 1);
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
}, et = [], at = /* @__PURE__ */ Ie(
|
|
101
|
+
Xa,
|
|
102
|
+
Za,
|
|
103
|
+
et,
|
|
100
104
|
!1,
|
|
101
105
|
null,
|
|
102
106
|
null
|
|
103
107
|
);
|
|
104
|
-
const
|
|
108
|
+
const tt = at.exports, nt = ({
|
|
105
109
|
firstDayOfWeek: o,
|
|
106
110
|
min: t,
|
|
107
111
|
max: e
|
|
108
112
|
}) => ({ getGranularCalendarLimits: (i) => {
|
|
109
113
|
if (!t && !e)
|
|
110
114
|
return { min: null, max: null };
|
|
111
|
-
let m = t ?
|
|
115
|
+
let m = t ? T(t) : null, p = e ? q(e) : null;
|
|
112
116
|
if (i?.type === "weekly") {
|
|
113
117
|
if (i.earliest)
|
|
114
|
-
m =
|
|
118
|
+
m = T(i.earliest);
|
|
115
119
|
else if (m) {
|
|
116
|
-
const y =
|
|
117
|
-
w(m, y) || (m =
|
|
120
|
+
const y = $e(m, { weekStartsOn: o });
|
|
121
|
+
w(m, y) || (m = T(_a(Ne(m, { weekStartsOn: o }), 1)));
|
|
118
122
|
}
|
|
119
123
|
if (i.latest)
|
|
120
124
|
p = q(i.latest);
|
|
121
125
|
else if (p) {
|
|
122
|
-
const y =
|
|
123
|
-
w(p, y) || (p = q(
|
|
126
|
+
const y = Ne(p, { weekStartsOn: o });
|
|
127
|
+
w(p, y) || (p = q(Sa($e(p, { weekStartsOn: o }), 1)));
|
|
124
128
|
}
|
|
125
129
|
}
|
|
126
130
|
if (i?.type === "monthly") {
|
|
127
131
|
if (i.earliest)
|
|
128
|
-
m =
|
|
132
|
+
m = T(i.earliest);
|
|
129
133
|
else if (m) {
|
|
130
|
-
const y =
|
|
131
|
-
w(m, y) || (m =
|
|
134
|
+
const y = Ve(m);
|
|
135
|
+
w(m, y) || (m = Ve(Ia(m, 1)));
|
|
132
136
|
}
|
|
133
137
|
if (i.latest)
|
|
134
138
|
p = q(i.latest);
|
|
135
139
|
else if (p) {
|
|
136
|
-
const y =
|
|
137
|
-
w(p, y) || (p =
|
|
140
|
+
const y = Ge(p);
|
|
141
|
+
w(p, y) || (p = Ge(Ea(p, 1)));
|
|
138
142
|
}
|
|
139
143
|
}
|
|
140
144
|
if (i?.type === "quarterly") {
|
|
141
145
|
if (i.earliest)
|
|
142
|
-
m =
|
|
146
|
+
m = ue(i.earliest);
|
|
143
147
|
else if (m) {
|
|
144
|
-
const y =
|
|
145
|
-
w(m, y) || (m =
|
|
148
|
+
const y = ue(m);
|
|
149
|
+
w(m, y) || (m = ue(Pa(m, 1)));
|
|
146
150
|
}
|
|
147
151
|
if (i.latest)
|
|
148
152
|
p = q(i.latest);
|
|
149
153
|
else if (p) {
|
|
150
|
-
const y =
|
|
151
|
-
w(p, y) || (p =
|
|
154
|
+
const y = Le(p);
|
|
155
|
+
w(p, y) || (p = Le(Fa(p, 1)));
|
|
152
156
|
}
|
|
153
157
|
}
|
|
154
158
|
return { min: m, max: p };
|
|
155
|
-
} }),
|
|
156
|
-
const o =
|
|
159
|
+
} }), rt = () => {
|
|
160
|
+
const o = Me({
|
|
157
161
|
daily: null,
|
|
158
162
|
weekly: null,
|
|
159
163
|
monthly: null,
|
|
@@ -170,7 +174,7 @@ const Za = Xa.exports, et = ({
|
|
|
170
174
|
};
|
|
171
175
|
};
|
|
172
176
|
var D = /* @__PURE__ */ ((o) => (o.CUSTOM_RANGE = "custom-range", o.INPUT = "input", o.ERROR = "error", o.FORM_DATE = "form-date", o.START_DATE_SELECTED = "start-date-selected", o))(D || {});
|
|
173
|
-
const
|
|
177
|
+
const st = {
|
|
174
178
|
"de-DE": { "DD-MM-YYYY": "TT-MM-JJJJ", "MM-DD-YYYY": "MM-TT-JJJJ", "YYYY-MM-DD": "JJJJ-MM-TT", customRange: "Benutzerdefinierter Bereich", daily: "Täglich", dateFrom: "Datum von", dateTo: "Datum bis", from: "Von", invalidDateFormat: "Ungültiges Datumsformat", lastMonth: "Letzter Monat", lastSevenDays: "Letzte 7 Tage", lastThreeMonths: "Letzte drei Monate", maxRangeDays: "Sie können bis zu {count} Tag auswählen | Sie können bis zu {count} Tage auswählen", maxRangeMonths: "Sie können bis zu {count} Monat auswählen | Sie können bis zu {count} Monate auswählen", maxRangeQuarters: "Sie können bis zu {count} Quartal auswählen | Sie können bis zu {count} Quartale auswählen", maxRangeWeeks: "Sie können bis zu {count} Woche auswählen | Sie können bis zu {count} Wochen auswählen", monthly: "Monatlich", quarterly: "Vierteljährlich", selectedDateIsNotAvailable: "Ausgewähltes Datum ist nicht verfügbar", startDateMustPrecedeEndDate: "Das Anfangsdatum muss vor dem Enddatum liegen", timeFrom: "Zeit von", timeTo: "Zeit bis", to: "Bis", weekly: "Wöchentlich" },
|
|
175
179
|
"en-GB": { "DD-MM-YYYY": "DD-MM-YYYY", "MM-DD-YYYY": "MM-DD-YYYY", "YYYY-MM-DD": "YYYY-MM-DD", customRange: "Custom range", daily: "Daily", dateFrom: "Date from", dateTo: "Date to", from: "From", invalidDateFormat: "Invalid date format", lastMonth: "Last month", lastSevenDays: "Last 7 days", lastThreeMonths: "The last three months", maxRangeDays: "You can select up to {count} day | You can select up to {count} days", maxRangeMonths: "You can select up to {count} month | You can select up to {count} months", maxRangeQuarters: "You can select up to {count} quarter | You can select up to {count} quarters", maxRangeWeeks: "You can select up to {count} week | You can select up to {count} weeks", monthly: "Monthly", quarterly: "Quarterly", selectedDateIsNotAvailable: "Selected date is not available", startDateMustPrecedeEndDate: "Start date must precede end date", timeFrom: "Time from", timeTo: "Time to", to: "To", weekly: "Weekly" },
|
|
176
180
|
"en-US": { "DD-MM-YYYY": "DD-MM-YYYY", "MM-DD-YYYY": "MM-DD-YYYY", "YYYY-MM-DD": "YYYY-MM-DD", customRange: "Custom range", daily: "Daily", dateFrom: "Date from", dateTo: "Date to", from: "From", invalidDateFormat: "Invalid date format", lastMonth: "Last month", lastSevenDays: "Last 7 days", lastThreeMonths: "Last three months", maxRangeDays: "You can select up to {count} day | You can select up to {count} days", maxRangeMonths: "You can select up to {count} month | You can select up to {count} months", maxRangeQuarters: "You can select up to {count} quarter | You can select up to {count} quarters", maxRangeWeeks: "You can select up to {count} week | You can select up to {count} weeks", monthly: "Monthly", quarterly: "Quarterly", selectedDateIsNotAvailable: "Selected date is not available", startDateMustPrecedeEndDate: "Start date must precede end date", timeFrom: "Time from", timeTo: "Time to", to: "To", weekly: "Weekly" },
|
|
@@ -182,11 +186,11 @@ const tt = {
|
|
|
182
186
|
"ja-JP": { "DD-MM-YYYY": "DD-MM-YYYY", "MM-DD-YYYY": "MM-DD-YYYY", "YYYY-MM-DD": "YYYY-MM-DD", customRange: "カスタム範囲", daily: "毎日", dateFrom: "開始日", dateTo: "終了日", from: "下限", invalidDateFormat: "無効な日付形式", lastMonth: "先月", lastSevenDays: "過去 7 日間", lastThreeMonths: "過去3か月", maxRangeDays: "{count}日間まで選択できます | {count}日間まで選択できます", maxRangeMonths: "{count}か月まで選択できます | {count}か月まで選択できます", maxRangeQuarters: "{count}四半期まで選択できます | {count}四半期まで選択できます", maxRangeWeeks: "{count}週間まで選択できます | {count}週間まで選択できます", monthly: "毎月", quarterly: "四半期ごと", selectedDateIsNotAvailable: "選択した日付は利用できません", startDateMustPrecedeEndDate: "開始日は終了日より前にする必要があります", timeFrom: "開始時刻", timeTo: "終了時刻", to: "上限", weekly: "毎週" },
|
|
183
187
|
"pt-BR": { "DD-MM-YYYY": "DD-MM-AAAA", "MM-DD-YYYY": "MM-DD-AAAA", "YYYY-MM-DD": "AAAA-MM-DD", customRange: "Intervalo personalizado", daily: "Diário", dateFrom: "Data a partir de", dateTo: "Data até", from: "De", invalidDateFormat: "Formato de data inválido", lastMonth: "Último mês", lastSevenDays: "Últimos 7 dias", lastThreeMonths: "Últimos 3 meses", maxRangeDays: "Você pode selecionar até {count} dia | Você pode selecionar até {count} dias", maxRangeMonths: "Você pode selecionar até {count} mês | Você pode selecionar até {count} meses", maxRangeQuarters: "Você pode selecionar até {count} trimestre | Você pode selecionar até {count} trimestres", maxRangeWeeks: "Você pode selecionar até {count} semana | Você pode selecionar até {count} semanas", monthly: "Mensal", quarterly: "Trimestral", selectedDateIsNotAvailable: "A data selecionada não está disponível", startDateMustPrecedeEndDate: "A data de início deve preceder a data de término", timeFrom: "Horário a partir de", timeTo: "Horário até", to: "Para", weekly: "Semanal" },
|
|
184
188
|
"zh-CN": { "DD-MM-YYYY": "日-月-年", "MM-DD-YYYY": "月-日-年", "YYYY-MM-DD": "年-月-日", customRange: "自定义范围", daily: "每日", dateFrom: "日期自", dateTo: "日期至", from: "自", invalidDateFormat: "日期格式无效", lastMonth: "上个月", lastSevenDays: "最近 7 天", lastThreeMonths: "过去三个月", maxRangeDays: "您可以选择最多 {count} 天 | 您可以选择最多 {count} 天", maxRangeMonths: "您可以选择最多 {count} 个月 | 您可以选择最多 {count} 个月", maxRangeQuarters: "您最多可以选择 {count} 个季度 | 您最多可以选择 {count} 个季度", maxRangeWeeks: "您最多可以选择 {count} 周 | 您最多可以选择 {count} 周", monthly: "每月", quarterly: "每季度", selectedDateIsNotAvailable: "所选日期不可用", startDateMustPrecedeEndDate: "开始日期必须早于结束日期", timeFrom: "时间自", timeTo: "是时候", to: "至", weekly: "每周" }
|
|
185
|
-
},
|
|
189
|
+
}, ot = {
|
|
186
190
|
name: "date-range-picker-calendar",
|
|
187
|
-
i18n: { messages:
|
|
188
|
-
},
|
|
189
|
-
...
|
|
191
|
+
i18n: { messages: st }
|
|
192
|
+
}, lt = /* @__PURE__ */ ke({
|
|
193
|
+
...ot,
|
|
190
194
|
props: {
|
|
191
195
|
/**
|
|
192
196
|
* Allows user to enter time values in the form
|
|
@@ -276,202 +280,207 @@ const tt = {
|
|
|
276
280
|
weekly: "maxRangeWeeks",
|
|
277
281
|
monthly: "maxRangeMonths",
|
|
278
282
|
quarterly: "maxRangeQuarters"
|
|
279
|
-
}, p =
|
|
280
|
-
dateFormat:
|
|
283
|
+
}, p = Da(), y = ba(p), { t: P, tc: L } = _e(), { isTouchDevice: f } = ka(), {
|
|
284
|
+
dateFormat: de,
|
|
281
285
|
isFormatValid: ee,
|
|
282
286
|
parseDate: v,
|
|
283
|
-
onKeyDown:
|
|
284
|
-
autoFormat:
|
|
285
|
-
formatDate:
|
|
286
|
-
} =
|
|
287
|
+
onKeyDown: A,
|
|
288
|
+
autoFormat: k,
|
|
289
|
+
formatDate: Q
|
|
290
|
+
} = Se(), M = b({}), ce = b(null), H = d(() => e.variant === "month" ? "monthly" : "daily"), F = d(() => e.numberOfMonths === 0), r = Me({
|
|
287
291
|
startDate: e.value?.startDate,
|
|
288
292
|
endDate: e.value?.endDate,
|
|
289
293
|
range: e.value?.range,
|
|
290
294
|
...e.granularities ? {
|
|
291
|
-
granularity: e.value?.granularity ||
|
|
295
|
+
granularity: e.value?.granularity || H.value
|
|
292
296
|
} : {}
|
|
293
|
-
}),
|
|
297
|
+
}), z = d(() => (
|
|
294
298
|
// eslint-disable-next-line consistent-return
|
|
295
299
|
e?.quickSelectRanges?.find(({ value: n, data: l }) => {
|
|
296
300
|
if (!l.endDate) {
|
|
297
301
|
if (l.isRelativeToNow) {
|
|
298
302
|
const u = M.value?.[n];
|
|
299
|
-
return u ?
|
|
303
|
+
return u ? ie(u.startDate, r.startDate) && ie(u.endDate, r.endDate) : (
|
|
300
304
|
// If not stored calculated dates, fall back to comparing the quick select item's value
|
|
301
305
|
// with the internal range's stored range identifier.
|
|
302
306
|
n === r.range
|
|
303
307
|
);
|
|
304
308
|
}
|
|
305
|
-
return
|
|
309
|
+
return ie(l.startDate, r.startDate) && Ha(r.endDate) && (!e.allowTimeInput || be(r.endDate, q(r.endDate))) && (e.granularities ? l.granularity === r.granularity : !0);
|
|
306
310
|
}
|
|
307
311
|
if (e.allowTimeInput)
|
|
308
|
-
return
|
|
312
|
+
return be(l.startDate, r.startDate) && be(l.endDate, r.endDate) && (e.granularities ? l.granularity === r.granularity : !0);
|
|
309
313
|
if (l.endDate)
|
|
310
314
|
return w(l.startDate, r.startDate) && w(l.endDate, r.endDate) && (e.granularities ? l.granularity === r.granularity : !0);
|
|
311
315
|
})?.value ?? i
|
|
312
|
-
)),
|
|
316
|
+
)), ae = d(() => [
|
|
313
317
|
{ label: P("customRange"), value: i },
|
|
314
318
|
...e.quickSelectRanges ? e.quickSelectRanges : []
|
|
315
|
-
]),
|
|
319
|
+
]), K = d(
|
|
316
320
|
() => e.granularities?.find(({ type: n }) => n === r.granularity) || null
|
|
317
|
-
),
|
|
321
|
+
), G = d(
|
|
318
322
|
() => e.granularities?.map(({ type: n, disabled: l }) => ({
|
|
319
323
|
label: P(n),
|
|
320
324
|
value: n,
|
|
321
325
|
disabled: l
|
|
322
326
|
})) ?? []
|
|
323
|
-
), { getGranularCalendarLimits:
|
|
324
|
-
() => e.granularities ?
|
|
325
|
-
), { normalizeRange:
|
|
327
|
+
), { getGranularCalendarLimits: te } = nt(e), ne = d(
|
|
328
|
+
() => e.granularities ? te(K.value) : { min: e.min ? T(e.min) : null, max: e.max ? q(e.max) : null }
|
|
329
|
+
), { normalizeRange: re } = xa(e.firstDayOfWeek), { savedRanges: $, saveRange: U, resetSavedRanges: N } = rt(), Y = (n) => n ? Q(n) : "", X = (n, l = !0) => {
|
|
326
330
|
if (!r.startDate || !r.endDate)
|
|
327
331
|
return;
|
|
328
|
-
const u =
|
|
332
|
+
const u = re({
|
|
329
333
|
startDate: r.startDate,
|
|
330
334
|
endDate: r.endDate,
|
|
331
335
|
fixedEndpoint: n,
|
|
332
|
-
granularity:
|
|
336
|
+
granularity: K.value,
|
|
333
337
|
alignToGranularity: l,
|
|
334
338
|
fallbackMaxRange: e.maxRange,
|
|
335
|
-
min:
|
|
336
|
-
max:
|
|
339
|
+
min: ne.value.min,
|
|
340
|
+
max: ne.value.max
|
|
337
341
|
});
|
|
338
|
-
|
|
339
|
-
},
|
|
340
|
-
() =>
|
|
341
|
-
),
|
|
342
|
+
ie(u.startDate, r.startDate) && ie(u.endDate, r.endDate) || (r.startDate = u.startDate, r.endDate = u.endDate, s.startDate = Y(u.startDate), s.endDate = Y(u.endDate));
|
|
343
|
+
}, g = b(null), R = b(null), Z = d(() => g.value ? P(g.value) : null), j = d(() => R.value ? P(R.value) : null), x = d(
|
|
344
|
+
() => g.value === "invalidDateFormat" ? null : Z.value
|
|
345
|
+
), W = d(() => R.value === "invalidDateFormat" ? null : j.value), _ = (n, l, u, h) => {
|
|
342
346
|
if (!n || !ee(n))
|
|
343
347
|
return "invalidDateFormat";
|
|
344
|
-
const I = v(n), B =
|
|
345
|
-
if (e.min && B <
|
|
348
|
+
const I = v(n), B = T(I);
|
|
349
|
+
if (e.min && B < T(e.min) || e.max && B > T(e.max) || e.isDateDisabled && e.isDateDisabled(B))
|
|
346
350
|
return "selectedDateIsNotAvailable";
|
|
347
351
|
if (l) {
|
|
348
|
-
const
|
|
349
|
-
if (u === "start" ?
|
|
352
|
+
const Be = h ? he(h, 0).getTime() : B.getTime(), Ce = h ? he(l, 0).getTime() : T(l).getTime();
|
|
353
|
+
if (u === "start" ? Be >= Ce : Be <= Ce)
|
|
350
354
|
return "startDateMustPrecedeEndDate";
|
|
351
355
|
}
|
|
352
356
|
return null;
|
|
353
|
-
}, s =
|
|
357
|
+
}, s = Me({
|
|
354
358
|
startDate: e.dateFormData.startDate,
|
|
355
359
|
endDate: e.dateFormData.endDate,
|
|
356
360
|
startTime: e.dateFormData.startTime,
|
|
357
361
|
endTime: e.dateFormData.endTime
|
|
358
|
-
}),
|
|
362
|
+
}), se = (n, l) => {
|
|
359
363
|
const u = () => {
|
|
360
|
-
if (l &&
|
|
361
|
-
const h =
|
|
362
|
-
if (e.min && h <
|
|
364
|
+
if (l && S(l)) {
|
|
365
|
+
const h = Ue(v(l), n);
|
|
366
|
+
if (e.min && h < he(e.min, 0) || e.max && h > he(e.max, 0))
|
|
363
367
|
return !1;
|
|
364
368
|
}
|
|
365
369
|
return !0;
|
|
366
370
|
};
|
|
367
|
-
return
|
|
368
|
-
},
|
|
369
|
-
s.startTime = E(
|
|
370
|
-
e.min && e.allowTimeInput && w(e.min, n.startDate) ? e.min :
|
|
371
|
+
return je(n) && u();
|
|
372
|
+
}, V = d(() => e.variant === "month"), J = (n) => n ? V.value ? wa(n) : Oa(n) : "", oe = d(() => J(r.startDate)), me = d(() => J(r.endDate)), Ee = d(() => f.value ? V.value ? "month" : "date" : "text"), Pe = d(() => f.value ? oe.value : s.startDate), Fe = d(() => f.value ? me.value : s.endDate), O = (n, l) => !l || !je(l) || e.variant === "month" ? n : Ue(new Date(n), l), De = (n, l = !1) => {
|
|
373
|
+
l || (s.startTime = E(
|
|
374
|
+
e.min && e.allowTimeInput && w(e.min, n.startDate) ? e.min : T(n.startDate)
|
|
371
375
|
), s.endTime = E(
|
|
372
376
|
e.max && e.allowTimeInput && w(e.max, n.endDate) ? e.max : q(n.endDate)
|
|
373
|
-
), r.startDate = O(n.startDate, s.startTime), r.endDate = O(n.endDate, s.endTime), r.range = null, e.granularities &&
|
|
377
|
+
)), r.startDate = O(n.startDate, s.startTime), r.endDate = O(n.endDate, s.endTime), r.range = null, e.granularities && N(), t(D.INPUT, {
|
|
374
378
|
...r,
|
|
375
|
-
range:
|
|
379
|
+
range: z.value
|
|
376
380
|
});
|
|
377
|
-
},
|
|
378
|
-
|
|
379
|
-
|
|
381
|
+
}, xe = (n) => {
|
|
382
|
+
De(n);
|
|
383
|
+
}, c = () => {
|
|
384
|
+
const n = ce.value?.finalizeRangeSelection();
|
|
385
|
+
n && De(n, !0);
|
|
386
|
+
}, S = (n) => !!n && !_(n);
|
|
387
|
+
Ke(() => {
|
|
388
|
+
g.value = e.dateFormData.startDate ? _(e.dateFormData.startDate) : null, R.value = e.dateFormData.endDate ? _(e.dateFormData.endDate) : null;
|
|
380
389
|
});
|
|
381
|
-
const
|
|
382
|
-
s.startDate = Y(n), s.startTime || (s.startTime = E(n)),
|
|
383
|
-
},
|
|
384
|
-
s.endDate = Y(n), s.endTime || (s.endTime = E(q(n))),
|
|
385
|
-
},
|
|
390
|
+
const pe = (n) => {
|
|
391
|
+
s.startDate = Y(n), s.startTime || (s.startTime = E(n)), g.value = null, R.value === "startDateMustPrecedeEndDate" && (R.value = null), t(D.START_DATE_SELECTED, n);
|
|
392
|
+
}, Ze = (n) => {
|
|
393
|
+
s.endDate = Y(n), s.endTime || (s.endTime = E(q(n))), R.value = null, g.value === "startDateMustPrecedeEndDate" && (g.value = null);
|
|
394
|
+
}, ve = (n) => {
|
|
386
395
|
const l = e.value?.[n];
|
|
387
396
|
if (l)
|
|
388
397
|
return l;
|
|
389
|
-
if (e.dateFormData[n] &&
|
|
398
|
+
if (e.dateFormData[n] && S(e.dateFormData[n]))
|
|
390
399
|
return v(e.dateFormData[n]);
|
|
391
|
-
},
|
|
392
|
-
if (
|
|
400
|
+
}, fe = (n, l = !1) => {
|
|
401
|
+
if (S(n)) {
|
|
393
402
|
const u = n;
|
|
394
|
-
|
|
395
|
-
const h =
|
|
396
|
-
r.startDate = O(h, s.startTime),
|
|
397
|
-
|
|
403
|
+
g.value = null, s.startDate = u;
|
|
404
|
+
const h = T(v(u));
|
|
405
|
+
r.startDate = O(h, s.startTime), S(s.endDate) && (r.endDate = O(
|
|
406
|
+
T(v(s.endDate)),
|
|
398
407
|
s.endTime
|
|
399
408
|
));
|
|
400
|
-
const I =
|
|
409
|
+
const I = ve("endDate"), B = _(
|
|
401
410
|
u,
|
|
402
411
|
e.allowTimeInput ? r.endDate : I,
|
|
403
412
|
"start",
|
|
404
413
|
e.allowTimeInput ? r.startDate : void 0
|
|
405
414
|
);
|
|
406
415
|
if (B) {
|
|
407
|
-
|
|
416
|
+
g.value = B, t(D.ERROR, { ...s });
|
|
408
417
|
return;
|
|
409
418
|
}
|
|
410
|
-
|
|
419
|
+
R.value === "startDateMustPrecedeEndDate" && (R.value = null), X("end", l), r.range = null, t(D.FORM_DATE, {
|
|
411
420
|
startDate: r.startDate,
|
|
412
421
|
endDate: r.endDate
|
|
413
422
|
}), t(D.INPUT, {
|
|
414
423
|
...r,
|
|
415
|
-
range:
|
|
424
|
+
range: z.value
|
|
416
425
|
});
|
|
417
426
|
} else
|
|
418
|
-
|
|
419
|
-
},
|
|
420
|
-
s.startDate = f.value &&
|
|
421
|
-
},
|
|
422
|
-
if (
|
|
427
|
+
g.value = _(n), t(D.ERROR, { ...s });
|
|
428
|
+
}, we = ze(fe, a), ea = (n) => {
|
|
429
|
+
s.startDate = f.value && V.value ? n : k(n), f.value ? V.value && n ? fe(Y(We(n)), !0) : s.startDate ? fe(s.startDate) : g.value = null : we(s.startDate);
|
|
430
|
+
}, ge = (n, l = !1) => {
|
|
431
|
+
if (S(n)) {
|
|
423
432
|
const u = n;
|
|
424
|
-
|
|
425
|
-
const h =
|
|
426
|
-
r.endDate = O(h, s.endTime),
|
|
427
|
-
|
|
433
|
+
R.value = null, s.endDate = u;
|
|
434
|
+
const h = T(v(u));
|
|
435
|
+
r.endDate = O(h, s.endTime), S(s.startDate) && (r.startDate = O(
|
|
436
|
+
T(v(s.startDate)),
|
|
428
437
|
s.startTime
|
|
429
438
|
));
|
|
430
|
-
const I =
|
|
439
|
+
const I = ve("startDate"), B = _(
|
|
431
440
|
u,
|
|
432
441
|
e.allowTimeInput ? r.startDate : I,
|
|
433
442
|
"end",
|
|
434
443
|
e.allowTimeInput ? r.endDate : void 0
|
|
435
444
|
);
|
|
436
445
|
if (B) {
|
|
437
|
-
|
|
446
|
+
R.value = B, t(D.ERROR, { ...s });
|
|
438
447
|
return;
|
|
439
448
|
}
|
|
440
|
-
|
|
449
|
+
g.value === "startDateMustPrecedeEndDate" && (g.value = null), X("start", l), r.range = null, t(D.FORM_DATE, {
|
|
441
450
|
startDate: r.startDate,
|
|
442
451
|
endDate: r.endDate
|
|
443
452
|
}), t(D.INPUT, {
|
|
444
453
|
...r,
|
|
445
|
-
range:
|
|
454
|
+
range: z.value
|
|
446
455
|
});
|
|
447
456
|
} else
|
|
448
|
-
|
|
449
|
-
},
|
|
450
|
-
s.endDate = f.value &&
|
|
451
|
-
},
|
|
452
|
-
|
|
453
|
-
},
|
|
457
|
+
R.value = _(n), t(D.ERROR, { ...s });
|
|
458
|
+
}, Oe = ze(ge, a), aa = (n) => {
|
|
459
|
+
s.endDate = f.value && V.value ? n : k(n), f.value ? V.value && n ? ge(Y(We(n)), !0) : s.endDate ? ge(s.endDate) : R.value = null : Oe(s.endDate);
|
|
460
|
+
}, ta = (n) => {
|
|
461
|
+
A(n);
|
|
462
|
+
}, na = () => {
|
|
454
463
|
t(D.ERROR, { ...s });
|
|
455
|
-
},
|
|
464
|
+
}, ra = () => {
|
|
456
465
|
const n = s.startTime;
|
|
457
|
-
if (!
|
|
466
|
+
if (!se(n, s.startDate)) {
|
|
458
467
|
t(D.ERROR, { ...s });
|
|
459
468
|
return;
|
|
460
469
|
}
|
|
461
470
|
if (r.startDate = O(r.startDate, n), s.startDate && r.endDate) {
|
|
462
|
-
const u =
|
|
471
|
+
const u = _(
|
|
463
472
|
s.startDate,
|
|
464
473
|
r.endDate,
|
|
465
474
|
"start",
|
|
466
475
|
r.startDate
|
|
467
476
|
);
|
|
468
477
|
if (u) {
|
|
469
|
-
|
|
478
|
+
g.value = u, t(D.ERROR, { ...s });
|
|
470
479
|
return;
|
|
471
480
|
}
|
|
472
481
|
}
|
|
473
|
-
|
|
474
|
-
const l =
|
|
482
|
+
g.value = null, R.value === "startDateMustPrecedeEndDate" && (R.value = null);
|
|
483
|
+
const l = ve("endDate");
|
|
475
484
|
t(D.FORM_DATE, {
|
|
476
485
|
startDate: r.startDate,
|
|
477
486
|
endDate: l,
|
|
@@ -479,49 +488,49 @@ const tt = {
|
|
|
479
488
|
endTime: s.endTime ?? e.dateFormData.endTime
|
|
480
489
|
}), t(D.INPUT, {
|
|
481
490
|
...r,
|
|
482
|
-
range:
|
|
491
|
+
range: z.value
|
|
483
492
|
});
|
|
484
|
-
},
|
|
493
|
+
}, sa = () => {
|
|
485
494
|
t(D.ERROR, { ...s });
|
|
486
|
-
},
|
|
495
|
+
}, oa = () => {
|
|
487
496
|
const n = s.endTime;
|
|
488
|
-
if (!
|
|
497
|
+
if (!se(n, s.endDate)) {
|
|
489
498
|
t(D.ERROR, { ...s });
|
|
490
499
|
return;
|
|
491
500
|
}
|
|
492
501
|
if (r.endDate = O(r.endDate, n), s.endDate && r.startDate) {
|
|
493
|
-
const l =
|
|
502
|
+
const l = _(
|
|
494
503
|
s.endDate,
|
|
495
504
|
r.startDate,
|
|
496
505
|
"end",
|
|
497
506
|
r.endDate
|
|
498
507
|
);
|
|
499
508
|
if (l) {
|
|
500
|
-
|
|
509
|
+
R.value = l, t(D.ERROR, { ...s });
|
|
501
510
|
return;
|
|
502
511
|
}
|
|
503
512
|
}
|
|
504
|
-
|
|
513
|
+
R.value = null, g.value === "startDateMustPrecedeEndDate" && (g.value = null), t(D.FORM_DATE, {
|
|
505
514
|
startDate: r.startDate,
|
|
506
515
|
endDate: r.endDate,
|
|
507
516
|
startTime: s.startTime ?? e.dateFormData.startTime,
|
|
508
517
|
endTime: n
|
|
509
518
|
}), t(D.INPUT, {
|
|
510
519
|
...r,
|
|
511
|
-
range:
|
|
520
|
+
range: z.value
|
|
512
521
|
});
|
|
513
|
-
},
|
|
522
|
+
}, la = (n) => {
|
|
514
523
|
s.startTime = n;
|
|
515
|
-
},
|
|
524
|
+
}, ia = (n) => {
|
|
516
525
|
s.endTime = n;
|
|
517
|
-
},
|
|
526
|
+
}, Te = (n, l, u, h) => {
|
|
518
527
|
r.startDate = n, r.endDate = l, u && (r.granularity = u), h && (r.range = h);
|
|
519
|
-
},
|
|
528
|
+
}, ua = (n) => {
|
|
520
529
|
const l = e.quickSelectRanges?.find(({ value: u }) => u === n);
|
|
521
530
|
if (l) {
|
|
522
|
-
|
|
531
|
+
N();
|
|
523
532
|
const u = l.data, h = u.endDate || (u.isRelativeToNow ? new Date(Date.now()) : q(new Date(Date.now()))), I = u.isRelativeToNow && u.timeDifference ? new Date(h.getTime() - u.timeDifference) : u.startDate;
|
|
524
|
-
s.endDate = Y(h), s.startDate = Y(I),
|
|
533
|
+
s.endDate = Y(h), s.startDate = Y(I), Te(I, h, null, n), e.granularities && (r.granularity = u.granularity || H.value), s.startTime = E(I), s.endTime = E(h), r.startDate = I, r.endDate = h, u.isRelativeToNow && (M.value = {
|
|
525
534
|
...M.value,
|
|
526
535
|
[n]: {
|
|
527
536
|
startDate: I,
|
|
@@ -534,25 +543,25 @@ const tt = {
|
|
|
534
543
|
range: l.value
|
|
535
544
|
});
|
|
536
545
|
}
|
|
537
|
-
},
|
|
546
|
+
}, da = (n) => {
|
|
538
547
|
const l = r.granularity;
|
|
539
|
-
r.granularity = n, l &&
|
|
548
|
+
r.granularity = n, l && U(l, structuredClone(Ae(r))), r.startDate && r.endDate && ($[n] && Te($[n].startDate, $[n].endDate, n), X("end"), s.startDate = Y(r.startDate), s.endDate = Y(r.endDate), t(D.INPUT, {
|
|
540
549
|
...r,
|
|
541
|
-
range:
|
|
550
|
+
range: z.value
|
|
542
551
|
}));
|
|
543
|
-
},
|
|
544
|
-
"b-date-range-picker-calendar__form-container--no-calendars":
|
|
545
|
-
})),
|
|
546
|
-
const n =
|
|
552
|
+
}, ca = d(() => ({
|
|
553
|
+
"b-date-range-picker-calendar__form-container--no-calendars": F.value || f.value
|
|
554
|
+
})), ma = d(() => {
|
|
555
|
+
const n = K.value, l = n?.maxRange || e.maxRange;
|
|
547
556
|
if (!l)
|
|
548
557
|
return null;
|
|
549
558
|
const u = m[n?.type ?? "daily"];
|
|
550
|
-
return
|
|
559
|
+
return L(u, l, { count: l });
|
|
551
560
|
});
|
|
552
|
-
return { __sfc: !0, FORM_INPUT_DEBOUNCE_TIME: a, RANGE_SELECTOR_CUSTOM_RANGE_KEY: i, maxRangeMessageKeyMap: m, props: e, emit: t, slots: p, hasSlot: y, t: P, tc:
|
|
561
|
+
return { __sfc: !0, FORM_INPUT_DEBOUNCE_TIME: a, RANGE_SELECTOR_CUSTOM_RANGE_KEY: i, maxRangeMessageKeyMap: m, props: e, emit: t, slots: p, hasSlot: y, t: P, tc: L, isTouchDevice: f, dateFormat: de, isFormatValid: ee, parseDate: v, onKeyDown: A, autoFormat: k, formatDateUtil: Q, calculatedIsRelativeToNowQuickSelectRanges: M, calendarRef: ce, defaultGranularity: H, hasNoCalendars: F, internalRangeDate: r, selectedRangeSelectorValue: z, quickSelectRangeDefaultItems: ae, selectedGranularity: K, granularityItems: G, getGranularCalendarLimits: te, computedMinMax: ne, normalizeRange: re, savedRanges: $, saveRange: U, resetSavedRanges: N, formatDate: Y, normalizeInternalRange: X, startDateError: g, endDateError: R, startDateErrorText: Z, endDateErrorText: j, startSharedError: x, endSharedError: W, getDateErrorMessage: _, dateTextInput: s, isValidTime: se, isMonthVariant: V, formatNativeDate: J, nativeStartDate: oe, nativeEndDate: me, dateInputType: Ee, startDateValue: Pe, endDateValue: Fe, setTimeInDateRef: O, updateSelectedRange: De, onDateInput: xe, finalizeHoveredRange: c, isValidDate: S, onStartDateSelected: pe, onEndDateSelected: Ze, getDate: ve, validateStartDate: fe, validateStartDateDebounced: we, onStartDateInput: ea, validateEndDate: ge, validateEndDateDebounced: Oe, onEndDateInput: aa, onDateInputKeyDown: ta, onStartTimeError: na, onStartTimeValid: ra, onEndTimeError: sa, onEndTimeValid: oa, onStartTimeInput: la, onEndTimeInput: ia, setInternalRange: Te, onRangeSelectorInput: ua, onGranularityInput: da, computedFormContainerClasses: ca, maxRangeMessage: ma, Calendar: C, DateTimeInput: tt, BentoAlert: Ma, BentoTypography: Xe, BentoDropdown: Ra, BentoSegmentedControl: Ya };
|
|
553
562
|
}
|
|
554
563
|
});
|
|
555
|
-
var
|
|
564
|
+
var it = function() {
|
|
556
565
|
var t = this, e = t._self._c, a = t._self._setupProxy;
|
|
557
566
|
return e("div", { staticClass: "b-date-range-picker-calendar" }, [e("div", { staticClass: "b-date-range-picker-calendar__form-container", class: a.computedFormContainerClasses, attrs: { "data-testid": "date-range-picker-calendar-form-container" } }, [e("div", { staticClass: "b-date-range-picker-calendar__form" }, [a.hasSlot("title") ? [t._t("title")] : t._e(), t.quickSelectRanges ? e(a.BentoDropdown, { attrs: { "aria-label": a.t("customRange"), items: a.quickSelectRangeDefaultItems, "model-value": a.selectedRangeSelectorValue }, on: { "update:model-value": a.onRangeSelectorInput } }) : t._e(), t.granularities ? e(a.BentoSegmentedControl, { attrs: { items: a.granularityItems, "model-value": a.internalRangeDate.granularity, "full-width": "" }, on: { "update:model-value": a.onGranularityInput } }) : t._e(), a.maxRangeMessage ? e(a.BentoAlert, { attrs: { variant: "tip" }, scopedSlots: t._u([{ key: "description", fn: function() {
|
|
558
567
|
return [t._v(" " + t._s(a.maxRangeMessage) + " ")];
|
|
@@ -564,7 +573,7 @@ var st = function() {
|
|
|
564
573
|
}, "error-message": a.startSharedError, "show-time-input": t.allowTimeInput, "time-model-value": a.dateTextInput.startTime, "time-props": {
|
|
565
574
|
ariaLabel: a.t("timeFrom"),
|
|
566
575
|
errorMessage: a.startSharedError
|
|
567
|
-
} }, on: { "update:date-model-value": a.onStartDateInput, "date:keydown": a.onDateInputKeyDown, "update:time-model-value": a.onStartTimeInput, "time:error": a.onStartTimeError, "time:valid": a.onStartTimeValid } })], 1), e("div", [e(a.BentoTypography, { staticClass: "b-date-range-picker-calendar__label", attrs: { stronger: "", el: "span" } }, [t._v(" " + t._s(a.t("to")) + " ")]), e(a.DateTimeInput, { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "date-model-value": a.endDateValue, "date-props": {
|
|
576
|
+
} }, on: { click: a.finalizeHoveredRange, "update:date-model-value": a.onStartDateInput, "date:keydown": a.onDateInputKeyDown, "update:time-model-value": a.onStartTimeInput, "time:error": a.onStartTimeError, "time:valid": a.onStartTimeValid } })], 1), e("div", [e(a.BentoTypography, { staticClass: "b-date-range-picker-calendar__label", attrs: { stronger: "", el: "span" } }, [t._v(" " + t._s(a.t("to")) + " ")]), e(a.DateTimeInput, { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "date-model-value": a.endDateValue, "date-props": {
|
|
568
577
|
ariaLabel: a.t("dateTo"),
|
|
569
578
|
type: a.dateInputType,
|
|
570
579
|
description: a.isTouchDevice ? void 0 : a.t(a.dateFormat),
|
|
@@ -572,16 +581,16 @@ var st = function() {
|
|
|
572
581
|
}, "error-message": a.endSharedError, "show-time-input": t.allowTimeInput, "time-model-value": a.dateTextInput.endTime, "time-props": {
|
|
573
582
|
ariaLabel: a.t("timeTo"),
|
|
574
583
|
errorMessage: a.endSharedError
|
|
575
|
-
} }, on: { "update:date-model-value": a.onEndDateInput, "date:keydown": a.onDateInputKeyDown, "update:time-model-value": a.onEndTimeInput, "time:error": a.onEndTimeError, "time:valid": a.onEndTimeValid } })], 1)], 2), a.hasSlot("actions") ? e("div", [t._t("actions")], 2) : t._e()]), !a.hasNoCalendars && !a.isTouchDevice ? e("div", { staticClass: "b-date-range-picker-calendar__calendars-container", attrs: { "data-testid": "date-range-picker-calendar-calendar-container" } }, [e(a.Calendar, { attrs: { value: a.internalRangeDate, "first-day-of-week": t.firstDayOfWeek, "is-date-disabled": t.isDateDisabled, "max-range": t.maxRange, min: a.computedMinMax.min, max: a.computedMinMax.max, "number-of-months": t.numberOfMonths, "show-end-date-on-open": t.showEndDateOnOpen, granularity: a.selectedGranularity, variant: t.variant, "year-range": t.yearRange, "is-range": "" }, on: { input: a.onDateInput, "start-date-selected": a.onStartDateSelected, "end-date-selected": a.onEndDateSelected } })], 1) : t._e()]);
|
|
576
|
-
},
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
584
|
+
} }, on: { click: a.finalizeHoveredRange, "update:date-model-value": a.onEndDateInput, "date:keydown": a.onDateInputKeyDown, "update:time-model-value": a.onEndTimeInput, "time:error": a.onEndTimeError, "time:valid": a.onEndTimeValid } })], 1)], 2), a.hasSlot("actions") ? e("div", [t._t("actions")], 2) : t._e()]), !a.hasNoCalendars && !a.isTouchDevice ? e("div", { staticClass: "b-date-range-picker-calendar__calendars-container", attrs: { "data-testid": "date-range-picker-calendar-calendar-container" } }, [e(a.Calendar, { ref: "calendarRef", attrs: { value: a.internalRangeDate, "first-day-of-week": t.firstDayOfWeek, "is-date-disabled": t.isDateDisabled, "max-range": t.maxRange, min: a.computedMinMax.min, max: a.computedMinMax.max, "number-of-months": t.numberOfMonths, "show-end-date-on-open": t.showEndDateOnOpen, granularity: a.selectedGranularity, variant: t.variant, "year-range": t.yearRange, "is-range": "" }, on: { input: a.onDateInput, "start-date-selected": a.onStartDateSelected, "end-date-selected": a.onEndDateSelected } })], 1) : t._e()]);
|
|
585
|
+
}, ut = [], dt = /* @__PURE__ */ Ie(
|
|
586
|
+
lt,
|
|
587
|
+
it,
|
|
588
|
+
ut,
|
|
580
589
|
!1,
|
|
581
590
|
null,
|
|
582
|
-
"
|
|
591
|
+
"4fb5b376"
|
|
583
592
|
);
|
|
584
|
-
const
|
|
593
|
+
const ct = dt.exports, mt = {
|
|
585
594
|
"de-DE": { apply: "Anwenden", cancel: "Abbrechen", dateRangePicker: "Datumsbereichauswahl {name}", invalidDateFormat: "Ungültiges Datumsformat", quarter: "Q{quarter} {year}", selectDate: "Wählen Sie ein Datum", selectDateRange: "Wählen Sie einen Datumsbereich aus", selectedDateIsNotAvailable: "Ausgewähltes Datum ist nicht verfügbar" },
|
|
586
595
|
"en-GB": { apply: "Apply", cancel: "Cancel", dateRangePicker: "Date range picker {name}", invalidDateFormat: "Invalid date format", quarter: "Q{quarter} {year}", selectDate: "Select a date", selectDateRange: "Select a date range", selectedDateIsNotAvailable: "Selected date is not available" },
|
|
587
596
|
"en-US": { apply: "Apply", cancel: "Cancel", dateRangePicker: "Date range picker {name}", invalidDateFormat: "Invalid date format", quarter: "Q{quarter} {year}", selectDate: "Select a date", selectDateRange: "Select a date range", selectedDateIsNotAvailable: "Selected date is not available" },
|
|
@@ -593,7 +602,7 @@ const it = lt.exports, ut = {
|
|
|
593
602
|
"ja-JP": { apply: "適用", cancel: "キャンセル", dateRangePicker: "日付範囲ピッカー {name}", invalidDateFormat: "無効な日付形式", quarter: "{year}年第{quarter}四半期", selectDate: "日付を選択", selectDateRange: "日付範囲を選択", selectedDateIsNotAvailable: "選択した日付は利用できません" },
|
|
594
603
|
"pt-BR": { apply: "Aplicar", cancel: "Cancelar", dateRangePicker: "Seletor de intervalo de datas {name}", invalidDateFormat: "Formato de data inválido", quarter: "{quarter}º trimestre de {year}", selectDate: "Selecione uma data", selectDateRange: "Selecione um intervalo de datas", selectedDateIsNotAvailable: "A data selecionada não está disponível" },
|
|
595
604
|
"zh-CN": { apply: "应用", cancel: "取消", dateRangePicker: "日期范围选择器 {name}", invalidDateFormat: "日期格式无效", quarter: "{year} {quarter} 季度", selectDate: "选择日期", selectDateRange: "选择日期范围", selectedDateIsNotAvailable: "所选日期不可用" }
|
|
596
|
-
},
|
|
605
|
+
}, Dt = ({
|
|
597
606
|
datePickerValue: o,
|
|
598
607
|
isDateIncorrect: t,
|
|
599
608
|
quickSelectRanges: e,
|
|
@@ -601,13 +610,13 @@ const it = lt.exports, ut = {
|
|
|
601
610
|
withTimeInput: i,
|
|
602
611
|
placeholder: m
|
|
603
612
|
}) => {
|
|
604
|
-
const { locale: p, t: y } =
|
|
613
|
+
const { locale: p, t: y } = _e(), { dateToInputDateString: P } = Se(), L = (v) => !!v && !isNaN(v.getTime()), f = Me({
|
|
605
614
|
startDate: null,
|
|
606
615
|
endDate: null,
|
|
607
616
|
startTime: null,
|
|
608
617
|
endTime: null
|
|
609
618
|
});
|
|
610
|
-
return
|
|
619
|
+
return ye(
|
|
611
620
|
o,
|
|
612
621
|
(v) => {
|
|
613
622
|
f.startDate = P(v?.startDate), f.endDate = P(v?.endDate), f.startTime = E(v?.startDate), f.endTime = E(v?.endDate);
|
|
@@ -621,18 +630,18 @@ const it = lt.exports, ut = {
|
|
|
621
630
|
if (!o.value || !o.value.startDate && !o.value.endDate)
|
|
622
631
|
return m?.value || y("selectDateRange");
|
|
623
632
|
if (e.value?.length) {
|
|
624
|
-
const
|
|
625
|
-
if (
|
|
626
|
-
return
|
|
633
|
+
const A = e.value.find(({ value: k }) => k === o.value?.range);
|
|
634
|
+
if (A)
|
|
635
|
+
return A.label;
|
|
627
636
|
}
|
|
628
637
|
if (o.value.granularity === "quarterly") {
|
|
629
|
-
const { startDate:
|
|
630
|
-
if (
|
|
631
|
-
return
|
|
632
|
-
const M = y("quarter", { quarter:
|
|
633
|
-
return `${
|
|
638
|
+
const { startDate: A, endDate: k } = o.value, Q = y("quarter", { quarter: Qe(A), year: Je(A) });
|
|
639
|
+
if (Ja(A, k))
|
|
640
|
+
return Q;
|
|
641
|
+
const M = y("quarter", { quarter: Qe(k), year: Je(k) });
|
|
642
|
+
return `${Q} - ${M}`;
|
|
634
643
|
}
|
|
635
|
-
if (!
|
|
644
|
+
if (!L(o.value.startDate) || !L(o.value.endDate))
|
|
636
645
|
return `${f.startDate || ""} - ${f.endDate || ""}`;
|
|
637
646
|
let v = a?.value ? { month: "long", year: "numeric" } : { month: "short", day: "2-digit", year: "numeric" };
|
|
638
647
|
return i.value && (v = {
|
|
@@ -641,7 +650,7 @@ const it = lt.exports, ut = {
|
|
|
641
650
|
minute: "numeric",
|
|
642
651
|
second: "numeric",
|
|
643
652
|
hour12: !1
|
|
644
|
-
}),
|
|
653
|
+
}), Ba(p.value, v).formatRange(
|
|
645
654
|
o.value.startDate,
|
|
646
655
|
o.value.endDate
|
|
647
656
|
);
|
|
@@ -650,12 +659,12 @@ const it = lt.exports, ut = {
|
|
|
650
659
|
// Methods
|
|
651
660
|
formatTextInputDisplayValue: () => ""
|
|
652
661
|
};
|
|
653
|
-
},
|
|
654
|
-
i18n: { messages:
|
|
662
|
+
}, pt = {
|
|
663
|
+
i18n: { messages: mt },
|
|
655
664
|
name: "bento-date-range-picker",
|
|
656
665
|
model: { prop: "modelValue" }
|
|
657
|
-
},
|
|
658
|
-
...
|
|
666
|
+
}, vt = /* @__PURE__ */ ke({
|
|
667
|
+
...pt,
|
|
659
668
|
props: {
|
|
660
669
|
description: { default: void 0 },
|
|
661
670
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -684,7 +693,7 @@ const it = lt.exports, ut = {
|
|
|
684
693
|
},
|
|
685
694
|
emits: ["update:model-value", "input"],
|
|
686
695
|
setup(o, { emit: t }) {
|
|
687
|
-
const e = o, a =
|
|
696
|
+
const e = o, a = pa(), { t: i } = _e(), { dateToInputDateString: m } = Se(), p = le("bento-date-range-picker-container"), y = le("bento-date-range-picker-label"), P = le("bento-date-range-picker-description"), L = le("bento-date-range-picker-error"), f = le("bento-date-range-picker-date-error"), de = d(() => e.label || i("dateRangePicker", { name: p })), { resolvedFirstDayOfWeek: ee } = Aa(Ye(e, "firstDayOfWeek")), v = va({
|
|
688
697
|
none: 0,
|
|
689
698
|
one: 710,
|
|
690
699
|
// width of date range picker with one panes
|
|
@@ -692,124 +701,124 @@ const it = lt.exports, ut = {
|
|
|
692
701
|
// width of date range picker with two panes
|
|
693
702
|
three: 1290
|
|
694
703
|
// width of date range picker with three panes
|
|
695
|
-
}),
|
|
696
|
-
const c = v.active().value,
|
|
704
|
+
}), A = d(() => {
|
|
705
|
+
const c = v.active().value, S = {
|
|
697
706
|
none: 0,
|
|
698
707
|
one: 1,
|
|
699
708
|
two: 2
|
|
700
709
|
};
|
|
701
|
-
if (c in
|
|
702
|
-
const
|
|
703
|
-
return e.numberOfMonths === void 0 ?
|
|
710
|
+
if (c in S) {
|
|
711
|
+
const pe = S[c];
|
|
712
|
+
return e.numberOfMonths === void 0 ? pe : Math.min(e.numberOfMonths, pe);
|
|
704
713
|
}
|
|
705
714
|
return e.numberOfMonths;
|
|
706
|
-
}),
|
|
707
|
-
const
|
|
715
|
+
}), k = d(() => e?.quickSelectRanges && e.quickSelectRanges.map((c) => {
|
|
716
|
+
const S = c.data.endDate ? void 0 : new Date(Date.now()).getTime() - c.data.startDate.getTime();
|
|
708
717
|
return {
|
|
709
718
|
...c,
|
|
710
719
|
data: {
|
|
711
720
|
...c.data,
|
|
712
721
|
// Adding timeDifference to calculate an up-to-date endDate on range selection
|
|
713
|
-
timeDifference:
|
|
722
|
+
timeDifference: S
|
|
714
723
|
}
|
|
715
724
|
};
|
|
716
|
-
})),
|
|
717
|
-
|
|
725
|
+
})), Q = d(() => e.label ? y : a?.["aria-labelledby"] ?? null), M = b(!1), ce = b(null), H = b(null), F = b(!1), { width: r } = fa(H), { isReadOnly: z } = Wa(Ye(e, "readonly")), { emitValue: ae } = Qa(t);
|
|
726
|
+
ye(
|
|
718
727
|
() => e.disabled,
|
|
719
728
|
() => {
|
|
720
|
-
e.disabled &&
|
|
729
|
+
e.disabled && F.value && (F.value = !1);
|
|
721
730
|
}
|
|
722
731
|
);
|
|
723
|
-
const
|
|
724
|
-
() =>
|
|
732
|
+
const K = d(
|
|
733
|
+
() => A.value === 0 && r.value > 0 && r.value < 332
|
|
725
734
|
// size of date range picker form
|
|
726
|
-
),
|
|
727
|
-
"b-date-range-picker__description--error": !!e.errorMessage ||
|
|
728
|
-
})),
|
|
729
|
-
datePickerValue:
|
|
735
|
+
), G = d(() => e.modelValue || e.value), te = d(() => e.hasActions ? !W.value && M.value : M.value), ne = d(() => ({
|
|
736
|
+
"b-date-range-picker__description--error": !!e.errorMessage || te.value
|
|
737
|
+
})), re = d(() => e.variant === "month"), $ = d(() => e.allowTimeInput && e.variant !== "month"), { dateDisplayValue: U, textInputDisplayValue: N, formatTextInputDisplayValue: Y } = Dt({
|
|
738
|
+
datePickerValue: G,
|
|
730
739
|
isDateIncorrect: M,
|
|
731
|
-
quickSelectRanges:
|
|
732
|
-
isMonthVariant:
|
|
733
|
-
withTimeInput:
|
|
734
|
-
placeholder:
|
|
735
|
-
}),
|
|
736
|
-
() => `${e.description ? P : ""} ${e.errorMessage ?
|
|
740
|
+
quickSelectRanges: k,
|
|
741
|
+
isMonthVariant: re,
|
|
742
|
+
withTimeInput: $,
|
|
743
|
+
placeholder: Ye(e, "placeholder")
|
|
744
|
+
}), X = d(
|
|
745
|
+
() => `${e.description ? P : ""} ${e.errorMessage ? L : ""} ${M.value ? f : ""}`.trim() || null
|
|
737
746
|
), g = () => {
|
|
738
|
-
|
|
739
|
-
},
|
|
740
|
-
|
|
741
|
-
},
|
|
747
|
+
F.value = !1;
|
|
748
|
+
}, R = () => {
|
|
749
|
+
F.value = !0;
|
|
750
|
+
}, Z = b(U.value), j = b(
|
|
742
751
|
// textInputDisplayValue is a reactive object
|
|
743
|
-
structuredClone(
|
|
744
|
-
), x =
|
|
745
|
-
() => e.hasActions ? x.value :
|
|
746
|
-
),
|
|
747
|
-
e.hasActions ?
|
|
748
|
-
),
|
|
749
|
-
() => e.hasActions ?
|
|
750
|
-
),
|
|
752
|
+
structuredClone(Ae(N))
|
|
753
|
+
), x = b(e.modelValue ?? e.value), W = b(!0), _ = d(
|
|
754
|
+
() => e.hasActions ? x.value : G.value
|
|
755
|
+
), s = b(
|
|
756
|
+
e.hasActions ? j.value : N
|
|
757
|
+
), se = d(
|
|
758
|
+
() => e.hasActions ? Z.value : U.value
|
|
759
|
+
), V = {
|
|
751
760
|
allowOutsideClick: !0
|
|
752
761
|
};
|
|
753
|
-
|
|
754
|
-
if (e.hasActions ||
|
|
762
|
+
Ke(() => {
|
|
763
|
+
if (e.hasActions || qe(
|
|
755
764
|
'BentoDateRangePicker "hasActions" property',
|
|
756
765
|
`Set the BentoDateRangePicker "hasActions" property true which will display the "Apply" and "Cancel" buttons.
|
|
757
766
|
This will be the default behavior in the v2 and "hasActions" will be removed.`,
|
|
758
767
|
"2.0.0"
|
|
759
|
-
), e.value &&
|
|
768
|
+
), e.value && qe(
|
|
760
769
|
'BentoDateRangePicker "value" property',
|
|
761
770
|
'The use of "value" prop in "BentoDateRangePicker" is no longer supported. Use the "v-model" or "model-value" property instead.',
|
|
762
771
|
"2.0.0"
|
|
763
772
|
), e.granularities && e.variant !== "month" && e.granularities.find(({ type: c }) => c === "quarterly"))
|
|
764
773
|
throw new Error('Quarterly granularity is only supported by BentoDateRangePicker with variant: "month"');
|
|
765
774
|
});
|
|
766
|
-
const
|
|
767
|
-
|
|
775
|
+
const J = () => {
|
|
776
|
+
Z.value = U.value, j.value = structuredClone(Ae(N)), s.value = e.hasActions ? j.value : N, x.value = G.value;
|
|
768
777
|
};
|
|
769
|
-
|
|
770
|
-
|
|
778
|
+
ye([() => e.value, () => e.modelValue], () => {
|
|
779
|
+
J();
|
|
771
780
|
});
|
|
772
|
-
const
|
|
773
|
-
|
|
774
|
-
},
|
|
781
|
+
const oe = () => {
|
|
782
|
+
J(), M.value = !1, W.value = !0, g();
|
|
783
|
+
}, me = d(() => [
|
|
775
784
|
{
|
|
776
785
|
title: i("apply"),
|
|
777
786
|
event: () => {
|
|
778
|
-
|
|
787
|
+
ae(x.value), g(), W.value = !0;
|
|
779
788
|
},
|
|
780
|
-
disabled:
|
|
789
|
+
disabled: W.value
|
|
781
790
|
},
|
|
782
791
|
{
|
|
783
792
|
title: i("cancel"),
|
|
784
|
-
event:
|
|
793
|
+
event: oe
|
|
785
794
|
}
|
|
786
795
|
]);
|
|
787
|
-
return
|
|
796
|
+
return ye(x, (c) => {
|
|
788
797
|
if (e.hasActions) {
|
|
789
|
-
|
|
798
|
+
W.value = M.value || c === G.value;
|
|
790
799
|
return;
|
|
791
800
|
}
|
|
792
|
-
|
|
793
|
-
}), { __sfc: !0, emit: t, props: e, attrs: a, t: i, dateToInputDateString: m, datePickerContainerId: p, labelId: y, descriptionId: P, errorId:
|
|
794
|
-
M.value = !1,
|
|
801
|
+
ae(c);
|
|
802
|
+
}), { __sfc: !0, emit: t, props: e, attrs: a, t: i, dateToInputDateString: m, datePickerContainerId: p, labelId: y, descriptionId: P, errorId: L, dateErrorId: f, popoverAriaLabel: de, resolvedFirstDayOfWeek: ee, breakpoints: v, computedNumberOfMonths: A, adjustedQuickSelectRanges: k, dropdownInputAriaLabelledBy: Q, isDateIncorrect: M, inputContainerRef: ce, inputWrapperRef: H, isDateRangePickerOpen: F, inputWrapperWidth: r, isReadOnly: z, emitValue: ae, shouldMatchPopoverWidth: K, internalModelValue: G, shouldDisplayError: te, descriptionConditionalClasses: ne, isMonthVariant: re, withTimeInput: $, dateDisplayValue: U, textInputDisplayValue: N, formatTextInputDisplayValue: Y, ariaDescribedBy: X, closeDateRangePicker: g, openDateRangePicker: R, localDateDisplayValue: Z, localTextInputDisplayValue: j, selectedDate: x, isApplyDisabled: W, dateRangePickerCalendarValue: _, displayedTextInputValue: s, displayedDateValue: se, trapAllOptions: V, syncLocalDisplayStateFromCommittedValue: J, cancelDateRangePicker: oe, rangePickerButtonActions: me, onDateRangePickerInput: (c) => {
|
|
803
|
+
M.value = !1, s.value.startDate = m(c.startDate), s.value.endDate = m(c.endDate), s.value.startTime = E(c.startDate), s.value.endTime = E(c.endDate), x.value = c;
|
|
795
804
|
}, clearDateRangePickerValue: async () => {
|
|
796
805
|
M.value && (M.value = !1), x.value = null;
|
|
797
806
|
}, onEnterPressedOverInput: () => {
|
|
798
|
-
if (!
|
|
799
|
-
|
|
807
|
+
if (!F.value) {
|
|
808
|
+
F.value = !0;
|
|
800
809
|
return;
|
|
801
810
|
}
|
|
802
|
-
M.value || (
|
|
811
|
+
M.value || (F.value = !1);
|
|
803
812
|
}, onDateRangePickerFormDateInputUpdate: (c) => {
|
|
804
|
-
M.value = !1, c.startTime && (
|
|
813
|
+
M.value = !1, c.startTime && (s.value.startTime = c.startTime), c.endTime && (s.value.endTime = c.endTime);
|
|
805
814
|
}, onDateRangePickerError: (c) => {
|
|
806
|
-
M.value = !0,
|
|
815
|
+
M.value = !0, s.value.startDate = c.startDate, s.value.endDate = c.endDate, x.value = { startDate: null, endDate: null };
|
|
807
816
|
}, onRangeSelectorInput: (c) => {
|
|
808
|
-
c && (
|
|
809
|
-
}, BentoButtonActions:
|
|
817
|
+
c && (s.value.startDate = m(c.startDate), s.value.endDate = m(c.endDate), s.value.startTime = E(c.startDate), s.value.endTime = E(c.endDate), x.value = c);
|
|
818
|
+
}, BentoButtonActions: ya, BentoButtonActionsLayout: ja, BentoDivider: ga, BentoPopover: ha, BentoTypography: Xe, DateRangePickerCalendar: ct, DropdownInputDefault: Ta, ErrorMessage: Ua, FieldLabel: $a, vBentoClickOutsideDirective: Ga };
|
|
810
819
|
}
|
|
811
820
|
});
|
|
812
|
-
var
|
|
821
|
+
var ft = function() {
|
|
813
822
|
var t = this, e = t._self._c, a = t._self._setupProxy;
|
|
814
823
|
return e("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: a.closeDateRangePicker, expression: "closeDateRangePicker" }], staticClass: "b-date-range-picker" }, [t.label ? e(a.FieldLabel, { attrs: { id: a.labelId, label: t.label, "tooltip-text": t.tooltipText, optional: t.optional, required: t.required } }) : t._e(), e("div", { ref: "inputWrapperRef", on: { keydown: function(i) {
|
|
815
824
|
return !i.type.indexOf("key") && t._k(i.keyCode, "enter", 13, i.key, "Enter") ? null : a.onEnterPressedOverInput.apply(null, arguments);
|
|
@@ -818,19 +827,19 @@ var Dt = function() {
|
|
|
818
827
|
} } }, [e(a.DateRangePickerCalendar, { attrs: { "allow-time-input": a.withTimeInput, "quick-select-ranges": a.adjustedQuickSelectRanges, value: a.dateRangePickerCalendarValue, "first-day-of-week": a.resolvedFirstDayOfWeek, granularities: t.granularities, "is-date-disabled": t.isDateDisabled, "max-range": t.maxRange, min: t.min, max: t.max, "number-of-months": a.computedNumberOfMonths, "show-end-date-on-open": t.showEndDateOnOpen, "date-form-data": a.displayedTextInputValue, variant: t.variant, "year-range": t.yearRange }, on: { "custom-range": a.onRangeSelectorInput, input: a.onDateRangePickerInput, error: a.onDateRangePickerError, "form-date": a.onDateRangePickerFormDateInputUpdate }, scopedSlots: t._u([t.hasActions ? { key: "actions", fn: function() {
|
|
819
828
|
return [e(a.BentoDivider), e("div", { staticClass: "b-date-range-picker__footer" }, [e(a.BentoButtonActions, { attrs: { actions: a.rangePickerButtonActions, layout: a.BentoButtonActionsLayout.SPACE_BETWEEN } })], 1)];
|
|
820
829
|
}, proxy: !0 } : null], null, !0) })], 1) : t._e()], 1);
|
|
821
|
-
},
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
830
|
+
}, gt = [], ht = /* @__PURE__ */ Ie(
|
|
831
|
+
vt,
|
|
832
|
+
ft,
|
|
833
|
+
gt,
|
|
825
834
|
!1,
|
|
826
835
|
null,
|
|
827
836
|
"de510695"
|
|
828
837
|
);
|
|
829
|
-
const
|
|
838
|
+
const Ht = ht.exports;
|
|
830
839
|
export {
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
840
|
+
Ht as B,
|
|
841
|
+
ct as D,
|
|
842
|
+
Ha as a,
|
|
843
|
+
ie as i
|
|
835
844
|
};
|
|
836
|
-
//# sourceMappingURL=date-range-picker.
|
|
845
|
+
//# sourceMappingURL=date-range-picker.DcG3KxuF.js.map
|