@adyen/bento-vue3 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/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/checkbox.js +2 -2
- package/dist/chunks/{calendar.BHBrXP7_.js → calendar.BZBxMz2J.js} +321 -318
- package/dist/chunks/calendar.BZBxMz2J.js.map +1 -0
- package/dist/chunks/{checkbox-group.BGEBpE4D.js → checkbox-group.BRmJOdie.js} +2 -2
- package/dist/chunks/{checkbox-group.BGEBpE4D.js.map → checkbox-group.BRmJOdie.js.map} +1 -1
- package/dist/chunks/{checkbox.D79gPqfo.js → checkbox.BlFFZ9sQ.js} +14 -14
- package/dist/chunks/{checkbox.D79gPqfo.js.map → checkbox.BlFFZ9sQ.js.map} +1 -1
- package/dist/chunks/{code-snippet.DIg7oTE6.js → code-snippet.bQFbKfA8.js} +2 -2
- package/dist/chunks/{code-snippet.DIg7oTE6.js.map → code-snippet.bQFbKfA8.js.map} +1 -1
- package/dist/chunks/{data-grid.DiB9ClKW.js → data-grid.DujCIIF6.js} +6 -6
- package/dist/chunks/{data-grid.DiB9ClKW.js.map → data-grid.DujCIIF6.js.map} +1 -1
- package/dist/chunks/{date-picker.81ASPpns.js → date-picker.DjxBw6Ur.js} +8 -8
- package/dist/chunks/{date-picker.81ASPpns.js.map → date-picker.DjxBw6Ur.js.map} +1 -1
- package/dist/chunks/{date-range-picker.CFjZwUb_.js → date-range-picker.BU9R2jNa.js} +425 -414
- package/dist/chunks/date-range-picker.BU9R2jNa.js.map +1 -0
- package/dist/chunks/{dropdown-tag.7plhjvUU.js → dropdown-tag.B8nYIdkZ.js} +2 -2
- package/dist/chunks/{dropdown-tag.7plhjvUU.js.map → dropdown-tag.B8nYIdkZ.js.map} +1 -1
- package/dist/chunks/{dropdown.ByQDIs7p.js → dropdown.DIuBwxF-.js} +43 -43
- package/dist/chunks/{dropdown.ByQDIs7p.js.map → dropdown.DIuBwxF-.js.map} +1 -1
- package/dist/chunks/{filter-bar.C1fDfEQj.js → filter-bar.C2THG1iA.js} +9 -9
- package/dist/chunks/{filter-bar.C1fDfEQj.js.map → filter-bar.C2THG1iA.js.map} +1 -1
- package/dist/chunks/{header-with-views.ChAss37D.js → header-with-views.CwEcK_6P.js} +4 -4
- package/dist/chunks/{header-with-views.ChAss37D.js.map → header-with-views.CwEcK_6P.js.map} +1 -1
- package/dist/chunks/{input-field-password.B3d1f64g.js → input-field-password.LCZamdFv.js} +2 -2
- package/dist/chunks/{input-field-password.B3d1f64g.js.map → input-field-password.LCZamdFv.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.DF6mnD7K.js → input-field-phone-number.CzOJ82aH.js} +2 -2
- package/dist/chunks/{input-field-phone-number.DF6mnD7K.js.map → input-field-phone-number.CzOJ82aH.js.map} +1 -1
- package/dist/chunks/{input-field.CG5dopgq.js → input-field.CuZNoZOd.js} +2 -2
- package/dist/chunks/{input-field.CG5dopgq.js.map → input-field.CuZNoZOd.js.map} +1 -1
- package/dist/chunks/{input-time.U4n485N0.js → input-time.DT_ivIBv.js} +40 -39
- package/dist/chunks/input-time.DT_ivIBv.js.map +1 -0
- package/dist/chunks/{pagination.o-BWToPt.js → pagination.DcJYeAN4.js} +2 -2
- package/dist/chunks/{pagination.o-BWToPt.js.map → pagination.DcJYeAN4.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.C_YFAC_Z.js → rich-text-editor.DRe01q0o.js} +2 -2
- package/dist/chunks/{rich-text-editor.C_YFAC_Z.js.map → rich-text-editor.DRe01q0o.js.map} +1 -1
- package/dist/chunks/{search-bar.Bw7rMy3B.js → search-bar.B3NyMQTb.js} +3 -3
- package/dist/chunks/{search-bar.Bw7rMy3B.js.map → search-bar.B3NyMQTb.js.map} +1 -1
- package/dist/chunks/{secondary-nav.xM1xXQmI.js → secondary-nav.CtrLRB5d.js} +2 -2
- package/dist/chunks/{secondary-nav.xM1xXQmI.js.map → secondary-nav.CtrLRB5d.js.map} +1 -1
- package/dist/chunks/{selection-card-group.DGVasyKy.js → selection-card-group.BsDPDAea.js} +81 -80
- package/dist/chunks/{selection-card-group.DGVasyKy.js.map → selection-card-group.BsDPDAea.js.map} +1 -1
- package/dist/chunks/{textarea.TOBR_UYN.js → textarea.C4IHcY2Q.js} +3 -3
- package/dist/chunks/textarea.C4IHcY2Q.js.map +1 -0
- package/dist/chunks/{timeline-item.B1IhRV3t.js → timeline-item.DuwEXAe5.js} +2 -2
- package/dist/chunks/{timeline-item.B1IhRV3t.js.map → timeline-item.DuwEXAe5.js.map} +1 -1
- package/dist/chunks/{use-date-input-formatter.BWGtdqki.js → use-date-input-formatter.BOgLVtWE.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.BWGtdqki.js.map → use-date-input-formatter.BOgLVtWE.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date-time-picker.js +4 -4
- package/dist/dropdown.js +2 -2
- package/dist/filter-bar.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/index.js +22 -22
- 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/input-time.js +1 -1
- package/dist/internal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +2 -2
- package/dist/chunks/calendar.BHBrXP7_.js.map +0 -1
- package/dist/chunks/date-range-picker.CFjZwUb_.js.map +0 -1
- package/dist/chunks/input-time.U4n485N0.js.map +0 -1
- package/dist/chunks/textarea.TOBR_UYN.js.map +0 -1
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { d as
|
|
3
|
-
import { B as
|
|
4
|
-
import { h as
|
|
5
|
-
import { B as
|
|
1
|
+
import { defineComponent as Ve, computed as m, openBlock as w, createBlock as L, unref as u, withCtx as Z, createVNode as _, mergeProps as Je, createCommentVNode as O, reactive as ke, useSlots as Pa, ref as F, onMounted as Da, createElementBlock as Re, createElementVNode as oe, normalizeClass as va, renderSlot as He, createTextVNode as Ye, toDisplayString as be, toRaw as Ce, watch as Ae, useAttrs as Oa, toRef as Be, withDirectives as qa, withKeys as Ke, createSlots as xa } from "vue";
|
|
2
|
+
import { d as Ba, h as Na } from "./index.DkAcVBvr.js";
|
|
3
|
+
import { B as Ca } from "./divider.BlxQCxkM.js";
|
|
4
|
+
import { h as za, B as Va } from "./button-actions.iIMUk8Vx.js";
|
|
5
|
+
import { B as ze, d as Xe } from "./typography.wIM07Hbl.js";
|
|
6
|
+
import { B as La, g as Ze, D as _a } from "./dropdown.DIuBwxF-.js";
|
|
6
7
|
import { g as me } from "./generate-uid.DBWe4g6T.js";
|
|
7
|
-
import { u as
|
|
8
|
-
import { j as ve, k as
|
|
9
|
-
import { u as _e, a as
|
|
10
|
-
import { t as
|
|
11
|
-
import { u as
|
|
12
|
-
import { B as
|
|
13
|
-
import { u as
|
|
14
|
-
import { B as
|
|
15
|
-
import { B as
|
|
16
|
-
import {
|
|
17
|
-
import { u as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { B as
|
|
24
|
-
import { B as
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import { B as ct } from "./button-actions.types.BptAXjD8.js";
|
|
8
|
+
import { u as Le } from "./index.B875RXHM.js";
|
|
9
|
+
import { j as ve, k as B, s as S, l as Ua, m as ea, n as Qa, f as aa, o as Wa, q as $a, r as Ga, t as ta, u as ja, b as V, v as Ja, h as Ha, i as Ka, e as q, w as na, x as ra, g as Xa } from "./calendar.BZBxMz2J.js";
|
|
10
|
+
import { u as _e, a as Za } from "./use-date-input-formatter.BOgLVtWE.js";
|
|
11
|
+
import { t as Se, n as et, c as at } from "./en-US.BR6y7foR.js";
|
|
12
|
+
import { u as tt } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
13
|
+
import { B as nt } from "./directive.D1-d-C2K.js";
|
|
14
|
+
import { u as rt } from "./form-field.D_2g7vaP.js";
|
|
15
|
+
import { B as st } from "./alert.cqiNVGbY.js";
|
|
16
|
+
import { B as ot } from "./segmented-control.Cn3imrj5.js";
|
|
17
|
+
import { u as lt } from "./use-has-slot.CyMiImRQ.js";
|
|
18
|
+
import { u as it } from "./use-touch-device.DTqFAbXh.js";
|
|
19
|
+
import { e as U, a as sa } from "./differenceInMonths.yz4Dfe-b.js";
|
|
20
|
+
import { s as oa } from "./startOfWeek.muMEhS7U.js";
|
|
21
|
+
import { c as ut } from "./constructNow.DyOJDyZZ.js";
|
|
22
|
+
import { a as Te, s as la } from "./set-time-in-date.9-8WOiMT.js";
|
|
23
|
+
import { B as dt, i as ia } from "./input-time.DT_ivIBv.js";
|
|
24
|
+
import { B as ct } from "./input-field.CuZNoZOd.js";
|
|
25
|
+
import { B as mt } from "./form-layout-group.DWvmX49g.js";
|
|
26
|
+
import { _ as pa } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
27
|
+
import { F as Dt } from "./field-label.B3HF2C1r.js";
|
|
28
|
+
import { E as ua } from "./error-message.ROkM72Gh.js";
|
|
29
|
+
import { B as vt } from "./button-actions.types.BptAXjD8.js";
|
|
30
30
|
import "../assets/date-range-picker.css";
|
|
31
|
-
function
|
|
32
|
-
return
|
|
31
|
+
function da(r, v) {
|
|
32
|
+
return Se(r, v?.in).getFullYear();
|
|
33
33
|
}
|
|
34
34
|
function De(r, v) {
|
|
35
|
-
return +
|
|
35
|
+
return +Se(r) == +Se(v);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const [i, c] =
|
|
39
|
-
|
|
37
|
+
function pt(r, v, T) {
|
|
38
|
+
const [i, c] = et(
|
|
39
|
+
T?.in,
|
|
40
40
|
r,
|
|
41
41
|
v
|
|
42
42
|
);
|
|
43
43
|
return +ve(i) == +ve(c);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
const
|
|
47
|
-
return
|
|
45
|
+
function ca(r, v) {
|
|
46
|
+
const T = Se(r, v?.in);
|
|
47
|
+
return T.setMilliseconds(0), T;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
return +
|
|
49
|
+
function Ne(r, v) {
|
|
50
|
+
return +ca(r) == +ca(v);
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
function ft(r, v) {
|
|
53
|
+
return B(
|
|
54
|
+
at(r, r),
|
|
55
|
+
ut(r)
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
|
-
const
|
|
58
|
+
const gt = {
|
|
59
59
|
name: "date-time-input"
|
|
60
|
-
},
|
|
61
|
-
...
|
|
60
|
+
}, ma = /* @__PURE__ */ Ve({
|
|
61
|
+
...gt,
|
|
62
62
|
props: {
|
|
63
63
|
dateModelValue: { default: "" },
|
|
64
64
|
dateProps: { default: () => ({}) },
|
|
@@ -67,69 +67,71 @@ const vt = {
|
|
|
67
67
|
timeModelValue: { default: "" },
|
|
68
68
|
timeProps: { default: () => ({}) }
|
|
69
69
|
},
|
|
70
|
-
emits: ["update:date-model-value", "date:keydown", "update:time-model-value", "time:error", "time:valid"],
|
|
70
|
+
emits: ["click", "update:date-model-value", "date:keydown", "update:time-model-value", "time:error", "time:valid"],
|
|
71
71
|
setup(r) {
|
|
72
|
-
const v = r,
|
|
72
|
+
const v = r, T = m(() => ({
|
|
73
73
|
errorMessage: v.errorMessage,
|
|
74
74
|
...v.dateProps
|
|
75
75
|
})), i = m(() => ({
|
|
76
76
|
errorMessage: v.errorMessage,
|
|
77
77
|
...v.timeProps
|
|
78
78
|
}));
|
|
79
|
-
return (c, e) => (w(),
|
|
79
|
+
return (c, e) => (w(), L(u(mt), {
|
|
80
80
|
layout: c.showTimeInput ? "50-50" : "100",
|
|
81
81
|
"error-message": c.errorMessage
|
|
82
82
|
}, {
|
|
83
|
-
default:
|
|
84
|
-
|
|
83
|
+
default: Z(() => [
|
|
84
|
+
_(u(ct), Je(T.value, {
|
|
85
85
|
"model-value": c.dateModelValue,
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
onClick: e[0] || (e[0] = (s) => c.$emit("click")),
|
|
87
|
+
"onUpdate:modelValue": e[1] || (e[1] = (s) => c.$emit("update:date-model-value", s)),
|
|
88
|
+
onKeydown: e[2] || (e[2] = (s) => c.$emit("date:keydown", s))
|
|
88
89
|
}), null, 16, ["model-value"]),
|
|
89
|
-
c.showTimeInput ? (w(),
|
|
90
|
+
c.showTimeInput ? (w(), L(u(dt), Je({ key: 0 }, i.value, {
|
|
90
91
|
"model-value": c.timeModelValue,
|
|
91
|
-
|
|
92
|
-
"
|
|
93
|
-
"onInput:
|
|
94
|
-
|
|
92
|
+
onClick: e[3] || (e[3] = (s) => c.$emit("click")),
|
|
93
|
+
"onUpdate:modelValue": e[4] || (e[4] = (s) => c.$emit("update:time-model-value", s)),
|
|
94
|
+
"onInput:error": e[5] || (e[5] = (s) => c.$emit("time:error")),
|
|
95
|
+
"onInput:valid": e[6] || (e[6] = (s) => c.$emit("time:valid"))
|
|
96
|
+
}), null, 16, ["model-value"])) : O("", !0)
|
|
95
97
|
]),
|
|
96
98
|
_: 1
|
|
97
99
|
}, 8, ["layout", "error-message"]));
|
|
98
100
|
}
|
|
99
|
-
}),
|
|
101
|
+
}), Mt = ({
|
|
100
102
|
firstDayOfWeek: r,
|
|
101
103
|
min: v,
|
|
102
|
-
max:
|
|
104
|
+
max: T
|
|
103
105
|
}) => ({ getGranularCalendarLimits: (c) => {
|
|
104
|
-
if (!v && !
|
|
106
|
+
if (!v && !T)
|
|
105
107
|
return { min: null, max: null };
|
|
106
|
-
let e = v ? S(v) : null, s =
|
|
108
|
+
let e = v ? S(v) : null, s = T ? U(T) : null;
|
|
107
109
|
if (c?.type === "weekly") {
|
|
108
110
|
if (c.earliest)
|
|
109
111
|
e = S(c.earliest);
|
|
110
112
|
else if (e) {
|
|
111
|
-
const f =
|
|
112
|
-
|
|
113
|
+
const f = oa(e, { weekStartsOn: r });
|
|
114
|
+
B(e, f) || (e = S(Ua(ea(e, { weekStartsOn: r }), 1)));
|
|
113
115
|
}
|
|
114
116
|
if (c.latest)
|
|
115
117
|
s = U(c.latest);
|
|
116
118
|
else if (s) {
|
|
117
|
-
const f =
|
|
118
|
-
|
|
119
|
+
const f = ea(s, { weekStartsOn: r });
|
|
120
|
+
B(s, f) || (s = U(Qa(oa(s, { weekStartsOn: r }), 1)));
|
|
119
121
|
}
|
|
120
122
|
}
|
|
121
123
|
if (c?.type === "monthly") {
|
|
122
124
|
if (c.earliest)
|
|
123
125
|
e = S(c.earliest);
|
|
124
126
|
else if (e) {
|
|
125
|
-
const f =
|
|
126
|
-
|
|
127
|
+
const f = aa(e);
|
|
128
|
+
B(e, f) || (e = aa(Wa(e, 1)));
|
|
127
129
|
}
|
|
128
130
|
if (c.latest)
|
|
129
131
|
s = U(c.latest);
|
|
130
132
|
else if (s) {
|
|
131
|
-
const f =
|
|
132
|
-
|
|
133
|
+
const f = sa(s);
|
|
134
|
+
B(s, f) || (s = sa($a(s, 1)));
|
|
133
135
|
}
|
|
134
136
|
}
|
|
135
137
|
if (c?.type === "quarterly") {
|
|
@@ -137,18 +139,18 @@ const vt = {
|
|
|
137
139
|
e = ve(c.earliest);
|
|
138
140
|
else if (e) {
|
|
139
141
|
const f = ve(e);
|
|
140
|
-
|
|
142
|
+
B(e, f) || (e = ve(Ga(e, 1)));
|
|
141
143
|
}
|
|
142
144
|
if (c.latest)
|
|
143
145
|
s = U(c.latest);
|
|
144
146
|
else if (s) {
|
|
145
|
-
const f =
|
|
146
|
-
|
|
147
|
+
const f = ta(s);
|
|
148
|
+
B(s, f) || (s = ta(ja(s, 1)));
|
|
147
149
|
}
|
|
148
150
|
}
|
|
149
151
|
return { min: e, max: s };
|
|
150
|
-
} }),
|
|
151
|
-
const r =
|
|
152
|
+
} }), ht = () => {
|
|
153
|
+
const r = ke({
|
|
152
154
|
daily: null,
|
|
153
155
|
weekly: null,
|
|
154
156
|
monthly: null,
|
|
@@ -165,7 +167,7 @@ const vt = {
|
|
|
165
167
|
};
|
|
166
168
|
};
|
|
167
169
|
var D = /* @__PURE__ */ ((r) => (r.CUSTOM_RANGE = "custom-range", r.INPUT = "input", r.ERROR = "error", r.FORM_DATE = "form-date", r.START_DATE_SELECTED = "start-date-selected", r))(D || {});
|
|
168
|
-
const
|
|
170
|
+
const fa = {
|
|
169
171
|
"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" },
|
|
170
172
|
"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" },
|
|
171
173
|
"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" },
|
|
@@ -177,15 +179,15 @@ const pa = {
|
|
|
177
179
|
"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: "毎週" },
|
|
178
180
|
"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" },
|
|
179
181
|
"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: "每周" }
|
|
180
|
-
},
|
|
182
|
+
}, yt = { class: "b-date-range-picker-calendar" }, Tt = { class: "b-date-range-picker-calendar__form" }, Rt = { key: 0 }, Yt = {
|
|
181
183
|
key: 0,
|
|
182
184
|
class: "b-date-range-picker-calendar__calendars-container",
|
|
183
185
|
"data-testid": "date-range-picker-calendar-calendar-container"
|
|
184
|
-
},
|
|
186
|
+
}, bt = {
|
|
185
187
|
name: "date-range-picker-calendar",
|
|
186
|
-
i18n: { messages:
|
|
187
|
-
},
|
|
188
|
-
...
|
|
188
|
+
i18n: { messages: fa }
|
|
189
|
+
}, At = /* @__PURE__ */ Ve({
|
|
190
|
+
...bt,
|
|
189
191
|
props: {
|
|
190
192
|
/**
|
|
191
193
|
* Allows user to enter time values in the form
|
|
@@ -201,7 +203,7 @@ const pa = {
|
|
|
201
203
|
/**
|
|
202
204
|
* Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
|
|
203
205
|
*/
|
|
204
|
-
firstDayOfWeek:
|
|
206
|
+
firstDayOfWeek: V.props.firstDayOfWeek,
|
|
205
207
|
/**
|
|
206
208
|
* A list of available granularities.
|
|
207
209
|
* If present, the date picker will display a segmented control to change granularity.
|
|
@@ -213,25 +215,25 @@ const pa = {
|
|
|
213
215
|
/**
|
|
214
216
|
* Indicate if a date should be disabled or not
|
|
215
217
|
*/
|
|
216
|
-
isDateDisabled:
|
|
218
|
+
isDateDisabled: V.props.isDateDisabled,
|
|
217
219
|
/**
|
|
218
220
|
* Set a maximum number of dates to be selectable by the range.
|
|
219
221
|
*/
|
|
220
|
-
maxRange:
|
|
222
|
+
maxRange: V.props.maxRange,
|
|
221
223
|
/**
|
|
222
224
|
* Sets a minimum limit for selectable dates - dates before `min` will not be selectable
|
|
223
225
|
*/
|
|
224
|
-
min:
|
|
226
|
+
min: V.props.min,
|
|
225
227
|
/**
|
|
226
228
|
* Sets a maximum limit for selectable dates - dates after `max` will not be selectable
|
|
227
229
|
*/
|
|
228
|
-
max:
|
|
230
|
+
max: V.props.max,
|
|
229
231
|
/**
|
|
230
232
|
* Number of months rendered on pane
|
|
231
233
|
*/
|
|
232
234
|
numberOfMonths: {
|
|
233
|
-
type:
|
|
234
|
-
default:
|
|
235
|
+
type: V.props.numberOfMonths.type,
|
|
236
|
+
default: V.props.numberOfMonths.default,
|
|
235
237
|
validator: (r) => r >= 0
|
|
236
238
|
},
|
|
237
239
|
/**
|
|
@@ -256,11 +258,11 @@ const pa = {
|
|
|
256
258
|
/**
|
|
257
259
|
* The type of calendar to display. Defaults to showing days.
|
|
258
260
|
*/
|
|
259
|
-
variant:
|
|
261
|
+
variant: V.props.variant,
|
|
260
262
|
/**
|
|
261
263
|
* Range of years to be selectable from the year dropdown
|
|
262
264
|
*/
|
|
263
|
-
yearRange:
|
|
265
|
+
yearRange: V.props.yearRange
|
|
264
266
|
},
|
|
265
267
|
emits: [
|
|
266
268
|
D.CUSTOM_RANGE,
|
|
@@ -275,160 +277,165 @@ const pa = {
|
|
|
275
277
|
weekly: "maxRangeWeeks",
|
|
276
278
|
monthly: "maxRangeMonths",
|
|
277
279
|
quarterly: "maxRangeQuarters"
|
|
278
|
-
}, e = r, s = v, f =
|
|
279
|
-
dateFormat:
|
|
280
|
-
isFormatValid:
|
|
281
|
-
parseDate:
|
|
282
|
-
onKeyDown:
|
|
283
|
-
autoFormat:
|
|
284
|
-
formatDate:
|
|
285
|
-
} = _e(),
|
|
280
|
+
}, e = r, s = v, f = Pa(), j = lt(f), { t: h, tc: k } = Le({ messages: fa }), { isTouchDevice: b } = it(), {
|
|
281
|
+
dateFormat: le,
|
|
282
|
+
isFormatValid: A,
|
|
283
|
+
parseDate: R,
|
|
284
|
+
onKeyDown: N,
|
|
285
|
+
autoFormat: J,
|
|
286
|
+
formatDate: ie
|
|
287
|
+
} = _e(), Y = F({}), ee = F(null), ue = m(() => e.variant === "month" ? "monthly" : "daily"), E = m(() => e.numberOfMonths === 0), t = ke({
|
|
286
288
|
startDate: e.value?.startDate,
|
|
287
289
|
endDate: e.value?.endDate,
|
|
288
290
|
range: e.value?.range,
|
|
289
291
|
...e.granularities ? {
|
|
290
|
-
granularity: e.value?.granularity ||
|
|
292
|
+
granularity: e.value?.granularity || ue.value
|
|
291
293
|
} : {}
|
|
292
|
-
}),
|
|
294
|
+
}), Q = m(() => (
|
|
293
295
|
// eslint-disable-next-line consistent-return
|
|
294
296
|
e?.quickSelectRanges?.find(({ value: a, data: l }) => {
|
|
295
297
|
if (!l.endDate) {
|
|
296
298
|
if (l.isRelativeToNow) {
|
|
297
|
-
const d =
|
|
299
|
+
const d = Y.value?.[a];
|
|
298
300
|
return d ? De(d.startDate, t.startDate) && De(d.endDate, t.endDate) : (
|
|
299
301
|
// If not stored calculated dates, fall back to comparing the quick select item's value
|
|
300
302
|
// with the internal range's stored range identifier.
|
|
301
303
|
a === t.range
|
|
302
304
|
);
|
|
303
305
|
}
|
|
304
|
-
return De(l.startDate, t.startDate) &&
|
|
306
|
+
return De(l.startDate, t.startDate) && ft(t.endDate) && (!e.allowTimeInput || Ne(t.endDate, U(t.endDate))) && (e.granularities ? l.granularity === t.granularity : !0);
|
|
305
307
|
}
|
|
306
308
|
if (e.allowTimeInput)
|
|
307
|
-
return
|
|
309
|
+
return Ne(l.startDate, t.startDate) && Ne(l.endDate, t.endDate) && (e.granularities ? l.granularity === t.granularity : !0);
|
|
308
310
|
if (l.endDate)
|
|
309
|
-
return
|
|
311
|
+
return B(l.startDate, t.startDate) && B(l.endDate, t.endDate) && (e.granularities ? l.granularity === t.granularity : !0);
|
|
310
312
|
})?.value ?? i
|
|
311
|
-
)),
|
|
313
|
+
)), pe = m(() => [
|
|
312
314
|
{ label: h("customRange"), value: i },
|
|
313
315
|
...e.quickSelectRanges ? e.quickSelectRanges : []
|
|
314
|
-
]),
|
|
316
|
+
]), ae = m(
|
|
315
317
|
() => e.granularities?.find(({ type: a }) => a === t.granularity) || null
|
|
316
|
-
),
|
|
318
|
+
), te = m(
|
|
317
319
|
() => e.granularities?.map(({ type: a, disabled: l }) => ({
|
|
318
320
|
label: h(a),
|
|
319
321
|
value: a,
|
|
320
322
|
disabled: l
|
|
321
323
|
})) ?? []
|
|
322
|
-
), { getGranularCalendarLimits:
|
|
323
|
-
() => e.granularities ?
|
|
324
|
-
), { normalizeRange:
|
|
324
|
+
), { getGranularCalendarLimits: de } = Mt(e), ne = m(
|
|
325
|
+
() => e.granularities ? de(ae.value) : { min: e.min ? S(e.min) : null, max: e.max ? U(e.max) : null }
|
|
326
|
+
), { normalizeRange: we } = Ja(e.firstDayOfWeek), { savedRanges: re, saveRange: ce, resetSavedRanges: X } = ht(), I = (a) => a ? ie(a) : "", W = (a, l = !0) => {
|
|
325
327
|
if (!t.startDate || !t.endDate)
|
|
326
328
|
return;
|
|
327
|
-
const d =
|
|
329
|
+
const d = we({
|
|
328
330
|
startDate: t.startDate,
|
|
329
331
|
endDate: t.endDate,
|
|
330
332
|
fixedEndpoint: a,
|
|
331
|
-
granularity:
|
|
333
|
+
granularity: ae.value,
|
|
332
334
|
alignToGranularity: l,
|
|
333
335
|
fallbackMaxRange: e.maxRange,
|
|
334
|
-
min:
|
|
335
|
-
max:
|
|
336
|
+
min: ne.value.min,
|
|
337
|
+
max: ne.value.max
|
|
336
338
|
});
|
|
337
|
-
De(d.startDate, t.startDate) && De(d.endDate, t.endDate) || (t.startDate = d.startDate, t.endDate = d.endDate, n.startDate =
|
|
338
|
-
},
|
|
339
|
-
() =>
|
|
340
|
-
),
|
|
341
|
-
if (!a || !
|
|
339
|
+
De(d.startDate, t.startDate) && De(d.endDate, t.endDate) || (t.startDate = d.startDate, t.endDate = d.endDate, n.startDate = I(d.startDate), n.endDate = I(d.endDate));
|
|
340
|
+
}, y = F(null), M = F(null), se = m(() => y.value ? h(y.value) : null), x = m(() => M.value ? h(M.value) : null), H = m(
|
|
341
|
+
() => y.value === "invalidDateFormat" ? null : se.value
|
|
342
|
+
), fe = m(() => M.value === "invalidDateFormat" ? null : x.value), p = (a, l, d, g) => {
|
|
343
|
+
if (!a || !A(a))
|
|
342
344
|
return "invalidDateFormat";
|
|
343
|
-
const
|
|
345
|
+
const P = R(a), z = S(P);
|
|
344
346
|
if (e.min && z < S(e.min) || e.max && z > S(e.max) || e.isDateDisabled && e.isDateDisabled(z))
|
|
345
347
|
return "selectedDateIsNotAvailable";
|
|
346
348
|
if (l) {
|
|
347
|
-
const Ge = g ?
|
|
348
|
-
if (d === "start" ? Ge >=
|
|
349
|
+
const Ge = g ? Te(g, 0).getTime() : z.getTime(), je = g ? Te(l, 0).getTime() : S(l).getTime();
|
|
350
|
+
if (d === "start" ? Ge >= je : Ge <= je)
|
|
349
351
|
return "startDateMustPrecedeEndDate";
|
|
350
352
|
}
|
|
351
353
|
return null;
|
|
352
|
-
}, n =
|
|
354
|
+
}, n = ke({
|
|
353
355
|
startDate: e.dateFormData.startDate,
|
|
354
356
|
endDate: e.dateFormData.endDate,
|
|
355
357
|
startTime: e.dateFormData.startTime,
|
|
356
358
|
endTime: e.dateFormData.endTime
|
|
357
|
-
}),
|
|
359
|
+
}), ge = (a, l) => {
|
|
358
360
|
const d = () => {
|
|
359
|
-
if (l &&
|
|
360
|
-
const g =
|
|
361
|
-
if (e.min && g <
|
|
361
|
+
if (l && G(l)) {
|
|
362
|
+
const g = la(R(l), a);
|
|
363
|
+
if (e.min && g < Te(e.min, 0) || e.max && g > Te(e.max, 0))
|
|
362
364
|
return !1;
|
|
363
365
|
}
|
|
364
366
|
return !0;
|
|
365
367
|
};
|
|
366
|
-
return
|
|
367
|
-
},
|
|
368
|
-
n.startTime =
|
|
369
|
-
e.min && e.allowTimeInput &&
|
|
370
|
-
), n.endTime =
|
|
371
|
-
e.max && e.allowTimeInput &&
|
|
372
|
-
), t.startDate =
|
|
368
|
+
return ia(a) && d();
|
|
369
|
+
}, $ = m(() => e.variant === "month"), Me = (a) => a ? $.value ? Ha(a) : Ka(a) : "", Ee = m(() => Me(t.startDate)), Fe = m(() => Me(t.endDate)), he = m(() => b.value ? $.value ? "month" : "date" : "text"), Ie = m(() => b.value ? Ee.value : n.startDate), Pe = m(() => b.value ? Fe.value : n.endDate), C = (a, l) => !l || !ia(l) || e.variant === "month" ? a : la(new Date(a), l), ye = (a, l = !1) => {
|
|
370
|
+
l || (n.startTime = q(
|
|
371
|
+
e.min && e.allowTimeInput && B(e.min, a.startDate) ? e.min : S(a.startDate)
|
|
372
|
+
), n.endTime = q(
|
|
373
|
+
e.max && e.allowTimeInput && B(e.max, a.endDate) ? e.max : U(a.endDate)
|
|
374
|
+
)), t.startDate = C(a.startDate, n.startTime), t.endDate = C(a.endDate, n.endTime), t.range = null, e.granularities && X(), s(D.INPUT, {
|
|
373
375
|
...t,
|
|
374
|
-
range:
|
|
376
|
+
range: Q.value
|
|
375
377
|
});
|
|
376
|
-
},
|
|
377
|
-
|
|
378
|
-
|
|
378
|
+
}, o = (a) => {
|
|
379
|
+
ye(a);
|
|
380
|
+
}, K = () => {
|
|
381
|
+
const a = ee.value?.finalizeRangeSelection();
|
|
382
|
+
a && ye(a, !0);
|
|
383
|
+
}, G = (a) => !!a && !p(a);
|
|
384
|
+
Da(() => {
|
|
385
|
+
y.value = e.dateFormData.startDate ? p(e.dateFormData.startDate) : null, M.value = e.dateFormData.endDate ? p(e.dateFormData.endDate) : null;
|
|
379
386
|
});
|
|
380
|
-
const
|
|
381
|
-
n.startDate =
|
|
382
|
-
},
|
|
383
|
-
n.endDate =
|
|
384
|
-
},
|
|
387
|
+
const ga = (a) => {
|
|
388
|
+
n.startDate = I(a), n.startTime || (n.startTime = q(a)), y.value = null, M.value === "startDateMustPrecedeEndDate" && (M.value = null), s(D.START_DATE_SELECTED, a);
|
|
389
|
+
}, Ma = (a) => {
|
|
390
|
+
n.endDate = I(a), n.endTime || (n.endTime = q(U(a))), M.value = null, y.value === "startDateMustPrecedeEndDate" && (y.value = null);
|
|
391
|
+
}, Oe = (a) => {
|
|
385
392
|
const l = e.value?.[a];
|
|
386
393
|
if (l)
|
|
387
394
|
return l;
|
|
388
|
-
if (e.dateFormData[a] &&
|
|
389
|
-
return
|
|
390
|
-
},
|
|
391
|
-
if (
|
|
395
|
+
if (e.dateFormData[a] && G(e.dateFormData[a]))
|
|
396
|
+
return R(e.dateFormData[a]);
|
|
397
|
+
}, qe = (a, l = !1) => {
|
|
398
|
+
if (G(a)) {
|
|
392
399
|
const d = a;
|
|
393
|
-
|
|
394
|
-
const g = S(
|
|
395
|
-
t.startDate =
|
|
396
|
-
S(
|
|
400
|
+
y.value = null, n.startDate = d;
|
|
401
|
+
const g = S(R(d));
|
|
402
|
+
t.startDate = C(g, n.startTime), G(n.endDate) && (t.endDate = C(
|
|
403
|
+
S(R(n.endDate)),
|
|
397
404
|
n.endTime
|
|
398
405
|
));
|
|
399
|
-
const
|
|
406
|
+
const P = Oe("endDate"), z = p(
|
|
400
407
|
d,
|
|
401
|
-
e.allowTimeInput ? t.endDate :
|
|
408
|
+
e.allowTimeInput ? t.endDate : P,
|
|
402
409
|
"start",
|
|
403
410
|
e.allowTimeInput ? t.startDate : void 0
|
|
404
411
|
);
|
|
405
412
|
if (z) {
|
|
406
|
-
|
|
413
|
+
y.value = z, s(D.ERROR, { ...n });
|
|
407
414
|
return;
|
|
408
415
|
}
|
|
409
|
-
M.value === "startDateMustPrecedeEndDate" && (M.value = null),
|
|
416
|
+
M.value === "startDateMustPrecedeEndDate" && (M.value = null), W("end", l), t.range = null, s(D.FORM_DATE, {
|
|
410
417
|
startDate: t.startDate,
|
|
411
418
|
endDate: t.endDate
|
|
412
419
|
}), s(D.INPUT, {
|
|
413
420
|
...t,
|
|
414
|
-
range:
|
|
421
|
+
range: Q.value
|
|
415
422
|
});
|
|
416
423
|
} else
|
|
417
|
-
|
|
418
|
-
},
|
|
419
|
-
n.startDate =
|
|
424
|
+
y.value = p(a), s(D.ERROR, { ...n });
|
|
425
|
+
}, ha = Ze(qe, 300), ya = (a) => {
|
|
426
|
+
n.startDate = b.value && $.value ? a : J(a), b.value ? $.value && a ? qe(I(na(a)), !0) : n.startDate ? qe(n.startDate) : y.value = null : ha(n.startDate);
|
|
420
427
|
}, xe = (a, l = !1) => {
|
|
421
|
-
if (
|
|
428
|
+
if (G(a)) {
|
|
422
429
|
const d = a;
|
|
423
430
|
M.value = null, n.endDate = d;
|
|
424
|
-
const g = S(
|
|
425
|
-
t.endDate =
|
|
426
|
-
S(
|
|
431
|
+
const g = S(R(d));
|
|
432
|
+
t.endDate = C(g, n.endTime), G(n.startDate) && (t.startDate = C(
|
|
433
|
+
S(R(n.startDate)),
|
|
427
434
|
n.startTime
|
|
428
435
|
));
|
|
429
|
-
const
|
|
436
|
+
const P = Oe("startDate"), z = p(
|
|
430
437
|
d,
|
|
431
|
-
e.allowTimeInput ? t.startDate :
|
|
438
|
+
e.allowTimeInput ? t.startDate : P,
|
|
432
439
|
"end",
|
|
433
440
|
e.allowTimeInput ? t.endDate : void 0
|
|
434
441
|
);
|
|
@@ -436,41 +443,41 @@ const pa = {
|
|
|
436
443
|
M.value = z, s(D.ERROR, { ...n });
|
|
437
444
|
return;
|
|
438
445
|
}
|
|
439
|
-
|
|
446
|
+
y.value === "startDateMustPrecedeEndDate" && (y.value = null), W("start", l), t.range = null, s(D.FORM_DATE, {
|
|
440
447
|
startDate: t.startDate,
|
|
441
448
|
endDate: t.endDate
|
|
442
449
|
}), s(D.INPUT, {
|
|
443
450
|
...t,
|
|
444
|
-
range:
|
|
451
|
+
range: Q.value
|
|
445
452
|
});
|
|
446
453
|
} else
|
|
447
|
-
M.value =
|
|
448
|
-
},
|
|
449
|
-
n.endDate =
|
|
450
|
-
},
|
|
451
|
-
|
|
452
|
-
},
|
|
454
|
+
M.value = p(a), s(D.ERROR, { ...n });
|
|
455
|
+
}, Ta = Ze(xe, 300), Ra = (a) => {
|
|
456
|
+
n.endDate = b.value && $.value ? a : J(a), b.value ? $.value && a ? xe(I(na(a)), !0) : n.endDate ? xe(n.endDate) : M.value = null : Ta(n.endDate);
|
|
457
|
+
}, Qe = (a) => {
|
|
458
|
+
N(a);
|
|
459
|
+
}, Ya = () => {
|
|
453
460
|
s(D.ERROR, { ...n });
|
|
454
|
-
},
|
|
461
|
+
}, ba = () => {
|
|
455
462
|
const a = n.startTime;
|
|
456
|
-
if (!
|
|
463
|
+
if (!ge(a, n.startDate)) {
|
|
457
464
|
s(D.ERROR, { ...n });
|
|
458
465
|
return;
|
|
459
466
|
}
|
|
460
|
-
if (t.startDate =
|
|
461
|
-
const d =
|
|
467
|
+
if (t.startDate = C(t.startDate, a), n.startDate && t.endDate) {
|
|
468
|
+
const d = p(
|
|
462
469
|
n.startDate,
|
|
463
470
|
t.endDate,
|
|
464
471
|
"start",
|
|
465
472
|
t.startDate
|
|
466
473
|
);
|
|
467
474
|
if (d) {
|
|
468
|
-
|
|
475
|
+
y.value = d, s(D.ERROR, { ...n });
|
|
469
476
|
return;
|
|
470
477
|
}
|
|
471
478
|
}
|
|
472
|
-
|
|
473
|
-
const l =
|
|
479
|
+
y.value = null, M.value === "startDateMustPrecedeEndDate" && (M.value = null);
|
|
480
|
+
const l = Oe("endDate");
|
|
474
481
|
s(D.FORM_DATE, {
|
|
475
482
|
startDate: t.startDate,
|
|
476
483
|
endDate: l,
|
|
@@ -478,18 +485,18 @@ const pa = {
|
|
|
478
485
|
endTime: n.endTime ?? e.dateFormData.endTime
|
|
479
486
|
}), s(D.INPUT, {
|
|
480
487
|
...t,
|
|
481
|
-
range:
|
|
488
|
+
range: Q.value
|
|
482
489
|
});
|
|
483
|
-
},
|
|
490
|
+
}, Aa = () => {
|
|
484
491
|
s(D.ERROR, { ...n });
|
|
485
|
-
},
|
|
492
|
+
}, ka = () => {
|
|
486
493
|
const a = n.endTime;
|
|
487
|
-
if (!
|
|
494
|
+
if (!ge(a, n.endDate)) {
|
|
488
495
|
s(D.ERROR, { ...n });
|
|
489
496
|
return;
|
|
490
497
|
}
|
|
491
|
-
if (t.endDate =
|
|
492
|
-
const l =
|
|
498
|
+
if (t.endDate = C(t.endDate, a), n.endDate && t.startDate) {
|
|
499
|
+
const l = p(
|
|
493
500
|
n.endDate,
|
|
494
501
|
t.startDate,
|
|
495
502
|
"end",
|
|
@@ -500,179 +507,183 @@ const pa = {
|
|
|
500
507
|
return;
|
|
501
508
|
}
|
|
502
509
|
}
|
|
503
|
-
M.value = null,
|
|
510
|
+
M.value = null, y.value === "startDateMustPrecedeEndDate" && (y.value = null), s(D.FORM_DATE, {
|
|
504
511
|
startDate: t.startDate,
|
|
505
512
|
endDate: t.endDate,
|
|
506
513
|
startTime: n.startTime ?? e.dateFormData.startTime,
|
|
507
514
|
endTime: a
|
|
508
515
|
}), s(D.INPUT, {
|
|
509
516
|
...t,
|
|
510
|
-
range:
|
|
517
|
+
range: Q.value
|
|
511
518
|
});
|
|
512
|
-
},
|
|
519
|
+
}, Sa = (a) => {
|
|
513
520
|
n.startTime = a;
|
|
514
|
-
},
|
|
521
|
+
}, wa = (a) => {
|
|
515
522
|
n.endTime = a;
|
|
516
|
-
},
|
|
523
|
+
}, We = (a, l, d, g) => {
|
|
517
524
|
t.startDate = a, t.endDate = l, d && (t.granularity = d), g && (t.range = g);
|
|
518
|
-
},
|
|
525
|
+
}, Ea = (a) => {
|
|
519
526
|
const l = e.quickSelectRanges?.find(({ value: d }) => d === a);
|
|
520
527
|
if (l) {
|
|
521
|
-
|
|
522
|
-
const d = l.data, g = d.endDate || (d.isRelativeToNow ? new Date(Date.now()) : U(new Date(Date.now()))),
|
|
523
|
-
n.endDate =
|
|
524
|
-
...
|
|
528
|
+
X();
|
|
529
|
+
const d = l.data, g = d.endDate || (d.isRelativeToNow ? new Date(Date.now()) : U(new Date(Date.now()))), P = d.isRelativeToNow && d.timeDifference ? new Date(g.getTime() - d.timeDifference) : d.startDate;
|
|
530
|
+
n.endDate = I(g), n.startDate = I(P), We(P, g, null, a), e.granularities && (t.granularity = d.granularity || ue.value), n.startTime = q(P), n.endTime = q(g), t.startDate = P, t.endDate = g, d.isRelativeToNow && (Y.value = {
|
|
531
|
+
...Y.value,
|
|
525
532
|
[a]: {
|
|
526
|
-
startDate:
|
|
533
|
+
startDate: P,
|
|
527
534
|
endDate: g
|
|
528
535
|
}
|
|
529
536
|
}), s(D.CUSTOM_RANGE, {
|
|
530
537
|
...l.data,
|
|
531
|
-
startDate:
|
|
538
|
+
startDate: P,
|
|
532
539
|
endDate: g,
|
|
533
540
|
range: l.value
|
|
534
541
|
});
|
|
535
542
|
}
|
|
536
|
-
},
|
|
543
|
+
}, Fa = (a) => {
|
|
537
544
|
const l = t.granularity;
|
|
538
|
-
t.granularity = a, l &&
|
|
545
|
+
t.granularity = a, l && ce(l, structuredClone(Ce(t))), t.startDate && t.endDate && (re[a] && We(re[a].startDate, re[a].endDate, a), W("end"), n.startDate = I(t.startDate), n.endDate = I(t.endDate), s(D.INPUT, {
|
|
539
546
|
...t,
|
|
540
|
-
range:
|
|
547
|
+
range: Q.value
|
|
541
548
|
}));
|
|
542
|
-
},
|
|
543
|
-
"b-date-range-picker-calendar__form-container--no-calendars":
|
|
544
|
-
})),
|
|
545
|
-
const a =
|
|
549
|
+
}, Ia = m(() => ({
|
|
550
|
+
"b-date-range-picker-calendar__form-container--no-calendars": E.value || b.value
|
|
551
|
+
})), $e = m(() => {
|
|
552
|
+
const a = ae.value, l = a?.maxRange || e.maxRange;
|
|
546
553
|
if (!l)
|
|
547
554
|
return null;
|
|
548
555
|
const d = c[a?.type ?? "daily"];
|
|
549
556
|
return k(d, l, { count: l });
|
|
550
557
|
});
|
|
551
|
-
return (a, l) => (w(),
|
|
552
|
-
|
|
553
|
-
class:
|
|
558
|
+
return (a, l) => (w(), Re("div", yt, [
|
|
559
|
+
oe("div", {
|
|
560
|
+
class: va(["b-date-range-picker-calendar__form-container", Ia.value]),
|
|
554
561
|
"data-testid": "date-range-picker-calendar-form-container"
|
|
555
562
|
}, [
|
|
556
|
-
|
|
557
|
-
u(
|
|
558
|
-
r.quickSelectRanges ? (w(),
|
|
563
|
+
oe("div", Tt, [
|
|
564
|
+
u(j)("title") ? He(a.$slots, "title", { key: 0 }, void 0, !0) : O("", !0),
|
|
565
|
+
r.quickSelectRanges ? (w(), L(La, {
|
|
559
566
|
key: 1,
|
|
560
567
|
"aria-label": u(h)("customRange"),
|
|
561
|
-
items:
|
|
562
|
-
"model-value":
|
|
563
|
-
"onUpdate:modelValue":
|
|
564
|
-
}, null, 8, ["aria-label", "items", "model-value"])) :
|
|
565
|
-
r.granularities ? (w(),
|
|
568
|
+
items: pe.value,
|
|
569
|
+
"model-value": Q.value,
|
|
570
|
+
"onUpdate:modelValue": Ea
|
|
571
|
+
}, null, 8, ["aria-label", "items", "model-value"])) : O("", !0),
|
|
572
|
+
r.granularities ? (w(), L(u(ot), {
|
|
566
573
|
key: 2,
|
|
567
|
-
items:
|
|
574
|
+
items: te.value,
|
|
568
575
|
"model-value": t.granularity,
|
|
569
576
|
"full-width": "",
|
|
570
|
-
"onUpdate:modelValue":
|
|
571
|
-
}, null, 8, ["items", "model-value"])) :
|
|
572
|
-
|
|
577
|
+
"onUpdate:modelValue": Fa
|
|
578
|
+
}, null, 8, ["items", "model-value"])) : O("", !0),
|
|
579
|
+
$e.value ? (w(), L(u(st), {
|
|
573
580
|
key: 3,
|
|
574
581
|
variant: "tip"
|
|
575
582
|
}, {
|
|
576
|
-
description:
|
|
577
|
-
|
|
583
|
+
description: Z(() => [
|
|
584
|
+
Ye(be($e.value), 1)
|
|
578
585
|
]),
|
|
579
586
|
_: 1
|
|
580
|
-
})) :
|
|
581
|
-
|
|
582
|
-
|
|
587
|
+
})) : O("", !0),
|
|
588
|
+
oe("div", null, [
|
|
589
|
+
_(u(ze), {
|
|
583
590
|
stronger: "",
|
|
584
591
|
el: "span",
|
|
585
592
|
class: "b-date-range-picker-calendar__label"
|
|
586
593
|
}, {
|
|
587
|
-
default:
|
|
588
|
-
|
|
594
|
+
default: Z(() => [
|
|
595
|
+
Ye(be(u(h)("from")), 1)
|
|
589
596
|
]),
|
|
590
597
|
_: 1
|
|
591
598
|
}),
|
|
592
|
-
|
|
593
|
-
"date-model-value":
|
|
599
|
+
_(u(ma), {
|
|
600
|
+
"date-model-value": Ie.value,
|
|
594
601
|
"date-props": {
|
|
595
602
|
ariaLabel: u(h)("dateFrom"),
|
|
596
|
-
type:
|
|
597
|
-
description: u(
|
|
598
|
-
errorMessage:
|
|
603
|
+
type: he.value,
|
|
604
|
+
description: u(b) ? void 0 : u(h)(u(le)),
|
|
605
|
+
errorMessage: se.value
|
|
599
606
|
},
|
|
600
|
-
"error-message":
|
|
607
|
+
"error-message": H.value,
|
|
601
608
|
"show-time-input": r.allowTimeInput,
|
|
602
609
|
"time-model-value": n.startTime,
|
|
603
610
|
"time-props": {
|
|
604
611
|
ariaLabel: u(h)("timeFrom"),
|
|
605
|
-
errorMessage:
|
|
612
|
+
errorMessage: H.value
|
|
606
613
|
},
|
|
607
614
|
class: "b-date-range-picker-calendar__form-input",
|
|
608
|
-
|
|
609
|
-
"
|
|
610
|
-
"
|
|
611
|
-
"
|
|
612
|
-
"onTime:
|
|
615
|
+
onClick: K,
|
|
616
|
+
"onUpdate:dateModelValue": ya,
|
|
617
|
+
"onDate:keydown": Qe,
|
|
618
|
+
"onUpdate:timeModelValue": Sa,
|
|
619
|
+
"onTime:error": Ya,
|
|
620
|
+
"onTime:valid": ba
|
|
613
621
|
}, null, 8, ["date-model-value", "date-props", "error-message", "show-time-input", "time-model-value", "time-props"])
|
|
614
622
|
]),
|
|
615
|
-
|
|
616
|
-
|
|
623
|
+
oe("div", null, [
|
|
624
|
+
_(u(ze), {
|
|
617
625
|
stronger: "",
|
|
618
626
|
el: "span",
|
|
619
627
|
class: "b-date-range-picker-calendar__label"
|
|
620
628
|
}, {
|
|
621
|
-
default:
|
|
622
|
-
|
|
629
|
+
default: Z(() => [
|
|
630
|
+
Ye(be(u(h)("to")), 1)
|
|
623
631
|
]),
|
|
624
632
|
_: 1
|
|
625
633
|
}),
|
|
626
|
-
|
|
627
|
-
"date-model-value":
|
|
634
|
+
_(u(ma), {
|
|
635
|
+
"date-model-value": Pe.value,
|
|
628
636
|
"date-props": {
|
|
629
637
|
ariaLabel: u(h)("dateTo"),
|
|
630
|
-
type:
|
|
631
|
-
description: u(
|
|
632
|
-
errorMessage:
|
|
638
|
+
type: he.value,
|
|
639
|
+
description: u(b) ? void 0 : u(h)(u(le)),
|
|
640
|
+
errorMessage: x.value
|
|
633
641
|
},
|
|
634
|
-
"error-message":
|
|
642
|
+
"error-message": fe.value,
|
|
635
643
|
"show-time-input": r.allowTimeInput,
|
|
636
644
|
"time-model-value": n.endTime,
|
|
637
645
|
"time-props": {
|
|
638
646
|
ariaLabel: u(h)("timeTo"),
|
|
639
|
-
errorMessage:
|
|
647
|
+
errorMessage: fe.value
|
|
640
648
|
},
|
|
641
649
|
class: "b-date-range-picker-calendar__form-input",
|
|
642
|
-
|
|
643
|
-
"
|
|
644
|
-
"
|
|
645
|
-
"
|
|
646
|
-
"onTime:
|
|
650
|
+
onClick: K,
|
|
651
|
+
"onUpdate:dateModelValue": Ra,
|
|
652
|
+
"onDate:keydown": Qe,
|
|
653
|
+
"onUpdate:timeModelValue": wa,
|
|
654
|
+
"onTime:error": Aa,
|
|
655
|
+
"onTime:valid": ka
|
|
647
656
|
}, null, 8, ["date-model-value", "date-props", "error-message", "show-time-input", "time-model-value", "time-props"])
|
|
648
657
|
])
|
|
649
658
|
]),
|
|
650
|
-
u(
|
|
651
|
-
|
|
652
|
-
])) :
|
|
659
|
+
u(j)("actions") ? (w(), Re("div", Rt, [
|
|
660
|
+
He(a.$slots, "actions", {}, void 0, !0)
|
|
661
|
+
])) : O("", !0)
|
|
653
662
|
], 2),
|
|
654
|
-
!
|
|
655
|
-
|
|
663
|
+
!E.value && !u(b) ? (w(), Re("div", Yt, [
|
|
664
|
+
_(u(V), {
|
|
665
|
+
ref_key: "calendarRef",
|
|
666
|
+
ref: ee,
|
|
656
667
|
value: t,
|
|
657
668
|
"first-day-of-week": r.firstDayOfWeek,
|
|
658
669
|
"is-date-disabled": r.isDateDisabled,
|
|
659
670
|
"max-range": r.maxRange,
|
|
660
|
-
min:
|
|
661
|
-
max:
|
|
671
|
+
min: ne.value.min,
|
|
672
|
+
max: ne.value.max,
|
|
662
673
|
"number-of-months": r.numberOfMonths,
|
|
663
674
|
"show-end-date-on-open": r.showEndDateOnOpen,
|
|
664
|
-
granularity:
|
|
675
|
+
granularity: ae.value,
|
|
665
676
|
variant: r.variant,
|
|
666
677
|
"year-range": r.yearRange,
|
|
667
678
|
"is-range": "",
|
|
668
|
-
onInput:
|
|
669
|
-
onStartDateSelected:
|
|
670
|
-
onEndDateSelected:
|
|
679
|
+
onInput: o,
|
|
680
|
+
onStartDateSelected: ga,
|
|
681
|
+
onEndDateSelected: Ma
|
|
671
682
|
}, null, 8, ["value", "first-day-of-week", "is-date-disabled", "max-range", "min", "max", "number-of-months", "show-end-date-on-open", "granularity", "variant", "year-range"])
|
|
672
|
-
])) :
|
|
683
|
+
])) : O("", !0)
|
|
673
684
|
]));
|
|
674
685
|
}
|
|
675
|
-
}),
|
|
686
|
+
}), kt = /* @__PURE__ */ pa(At, [["__scopeId", "data-v-24c84188"]]), Ue = {
|
|
676
687
|
"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" },
|
|
677
688
|
"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" },
|
|
678
689
|
"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" },
|
|
@@ -684,24 +695,24 @@ const pa = {
|
|
|
684
695
|
"ja-JP": { apply: "適用", cancel: "キャンセル", dateRangePicker: "日付範囲ピッカー {name}", invalidDateFormat: "無効な日付形式", quarter: "{year}年第{quarter}四半期", selectDate: "日付を選択", selectDateRange: "日付範囲を選択", selectedDateIsNotAvailable: "選択した日付は利用できません" },
|
|
685
696
|
"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" },
|
|
686
697
|
"zh-CN": { apply: "应用", cancel: "取消", dateRangePicker: "日期范围选择器 {name}", invalidDateFormat: "日期格式无效", quarter: "{year} {quarter} 季度", selectDate: "选择日期", selectDateRange: "选择日期范围", selectedDateIsNotAvailable: "所选日期不可用" }
|
|
687
|
-
},
|
|
698
|
+
}, St = ({
|
|
688
699
|
datePickerValue: r,
|
|
689
700
|
isDateIncorrect: v,
|
|
690
|
-
quickSelectRanges:
|
|
701
|
+
quickSelectRanges: T,
|
|
691
702
|
isMonthVariant: i,
|
|
692
703
|
withTimeInput: c,
|
|
693
704
|
placeholder: e
|
|
694
705
|
}) => {
|
|
695
|
-
const { locale: s, t: f } =
|
|
706
|
+
const { locale: s, t: f } = Le({ messages: Ue }), { dateToInputDateString: j } = _e(), h = (A) => !!A && !isNaN(A.getTime()), k = ke({
|
|
696
707
|
startDate: null,
|
|
697
708
|
endDate: null,
|
|
698
709
|
startTime: null,
|
|
699
710
|
endTime: null
|
|
700
711
|
});
|
|
701
|
-
return
|
|
712
|
+
return Ae(
|
|
702
713
|
r,
|
|
703
|
-
(
|
|
704
|
-
k.startDate =
|
|
714
|
+
(A) => {
|
|
715
|
+
k.startDate = j(A?.startDate), k.endDate = j(A?.endDate), k.startTime = q(A?.startDate), k.endTime = q(A?.endDate);
|
|
705
716
|
},
|
|
706
717
|
{ immediate: !0 }
|
|
707
718
|
), {
|
|
@@ -711,28 +722,28 @@ const pa = {
|
|
|
711
722
|
return `${k.startDate || ""} - ${k.endDate || ""}`;
|
|
712
723
|
if (!r.value || !r.value.startDate && !r.value.endDate)
|
|
713
724
|
return e?.value || f("selectDateRange");
|
|
714
|
-
if (
|
|
715
|
-
const
|
|
716
|
-
if (
|
|
717
|
-
return
|
|
725
|
+
if (T.value?.length) {
|
|
726
|
+
const R = T.value.find(({ value: N }) => N === r.value?.range);
|
|
727
|
+
if (R)
|
|
728
|
+
return R.label;
|
|
718
729
|
}
|
|
719
730
|
if (r.value.granularity === "quarterly") {
|
|
720
|
-
const { startDate:
|
|
721
|
-
if (
|
|
722
|
-
return
|
|
723
|
-
const
|
|
724
|
-
return `${
|
|
731
|
+
const { startDate: R, endDate: N } = r.value, J = f("quarter", { quarter: ra(R), year: da(R) });
|
|
732
|
+
if (pt(R, N))
|
|
733
|
+
return J;
|
|
734
|
+
const ie = f("quarter", { quarter: ra(N), year: da(N) });
|
|
735
|
+
return `${J} - ${ie}`;
|
|
725
736
|
}
|
|
726
737
|
if (!h(r.value.startDate) || !h(r.value.endDate))
|
|
727
738
|
return `${k.startDate || ""} - ${k.endDate || ""}`;
|
|
728
|
-
let
|
|
729
|
-
return c.value && (
|
|
730
|
-
...
|
|
739
|
+
let A = i?.value ? { month: "long", year: "numeric" } : { month: "short", day: "2-digit", year: "numeric" };
|
|
740
|
+
return c.value && (A = {
|
|
741
|
+
...A,
|
|
731
742
|
hour: "numeric",
|
|
732
743
|
minute: "numeric",
|
|
733
744
|
second: "numeric",
|
|
734
745
|
hour12: !1
|
|
735
|
-
}),
|
|
746
|
+
}), Xa(s.value, A).formatRange(
|
|
736
747
|
r.value.startDate,
|
|
737
748
|
r.value.endDate
|
|
738
749
|
);
|
|
@@ -741,12 +752,12 @@ const pa = {
|
|
|
741
752
|
// Methods
|
|
742
753
|
formatTextInputDisplayValue: () => ""
|
|
743
754
|
};
|
|
744
|
-
},
|
|
745
|
-
i18n: { messages:
|
|
755
|
+
}, wt = { class: "b-date-range-picker" }, Et = { class: "b-date-range-picker__footer" }, Ft = {
|
|
756
|
+
i18n: { messages: Ue },
|
|
746
757
|
name: "bento-date-range-picker",
|
|
747
758
|
model: { prop: "modelValue" }
|
|
748
|
-
},
|
|
749
|
-
...
|
|
759
|
+
}, It = /* @__PURE__ */ Ve({
|
|
760
|
+
...Ft,
|
|
750
761
|
props: {
|
|
751
762
|
allowTimeInput: { type: Boolean },
|
|
752
763
|
firstDayOfWeek: { default: void 0 },
|
|
@@ -775,7 +786,7 @@ const pa = {
|
|
|
775
786
|
},
|
|
776
787
|
emits: ["update:model-value", "input"],
|
|
777
788
|
setup(r, { emit: v }) {
|
|
778
|
-
const
|
|
789
|
+
const T = v, i = r, c = Oa(), { t: e } = Le({ messages: Ue }), { dateToInputDateString: s } = _e(), f = me("bento-date-range-picker-container"), j = me("bento-date-range-picker-label"), h = me("bento-date-range-picker-description"), k = me("bento-date-range-picker-error"), b = me("bento-date-range-picker-date-error"), le = m(() => i.label || e("dateRangePicker", { name: f })), { resolvedFirstDayOfWeek: A } = Za(Be(i, "firstDayOfWeek")), R = Ba({
|
|
779
790
|
none: 0,
|
|
780
791
|
one: 710,
|
|
781
792
|
// width of date range picker with one panes
|
|
@@ -783,18 +794,18 @@ const pa = {
|
|
|
783
794
|
// width of date range picker with two panes
|
|
784
795
|
three: 1290
|
|
785
796
|
// width of date range picker with three panes
|
|
786
|
-
}),
|
|
787
|
-
const o =
|
|
797
|
+
}), N = m(() => {
|
|
798
|
+
const o = R.active().value, K = {
|
|
788
799
|
none: 0,
|
|
789
800
|
one: 1,
|
|
790
801
|
two: 2
|
|
791
802
|
};
|
|
792
803
|
if (o in K) {
|
|
793
|
-
const
|
|
794
|
-
return i.numberOfMonths === void 0 ?
|
|
804
|
+
const G = K[o];
|
|
805
|
+
return i.numberOfMonths === void 0 ? G : Math.min(i.numberOfMonths, G);
|
|
795
806
|
}
|
|
796
807
|
return i.numberOfMonths;
|
|
797
|
-
}),
|
|
808
|
+
}), J = m(() => i?.quickSelectRanges && i.quickSelectRanges.map((o) => {
|
|
798
809
|
const K = o.data.endDate ? void 0 : new Date(Date.now()).getTime() - o.data.startDate.getTime();
|
|
799
810
|
return {
|
|
800
811
|
...o,
|
|
@@ -804,203 +815,203 @@ const pa = {
|
|
|
804
815
|
timeDifference: K
|
|
805
816
|
}
|
|
806
817
|
};
|
|
807
|
-
})),
|
|
808
|
-
|
|
818
|
+
})), ie = m(() => i.label ? j : c?.["aria-labelledby"] ?? null), Y = F(!1), ee = F(null), ue = F(null), E = F(!1), { width: t } = Na(ue), { isReadOnly: Q } = tt(Be(i, "readonly")), { emitValue: pe } = rt(T);
|
|
819
|
+
Ae(
|
|
809
820
|
() => i.disabled,
|
|
810
821
|
() => {
|
|
811
|
-
i.disabled &&
|
|
822
|
+
i.disabled && E.value && (E.value = !1);
|
|
812
823
|
}
|
|
813
824
|
);
|
|
814
|
-
const
|
|
815
|
-
() =>
|
|
825
|
+
const ae = m(
|
|
826
|
+
() => N.value === 0 && t.value > 0 && t.value < 332
|
|
816
827
|
// size of date range picker form
|
|
817
|
-
),
|
|
818
|
-
"b-date-range-picker__description--error": !!i.errorMessage ||
|
|
819
|
-
})),
|
|
820
|
-
datePickerValue:
|
|
821
|
-
isDateIncorrect:
|
|
822
|
-
quickSelectRanges:
|
|
823
|
-
isMonthVariant:
|
|
824
|
-
withTimeInput:
|
|
825
|
-
placeholder:
|
|
826
|
-
}),
|
|
827
|
-
() => `${i.description ? h : ""} ${i.errorMessage ? k : ""} ${
|
|
828
|
-
),
|
|
829
|
-
|
|
830
|
-
},
|
|
831
|
-
|
|
832
|
-
},
|
|
828
|
+
), te = m(() => i.modelValue || i.value), de = m(() => i.hasActions ? !H.value && Y.value : Y.value), ne = m(() => ({
|
|
829
|
+
"b-date-range-picker__description--error": !!i.errorMessage || de.value
|
|
830
|
+
})), we = m(() => i.variant === "month"), re = m(() => i.allowTimeInput && i.variant !== "month"), { dateDisplayValue: ce, textInputDisplayValue: X } = St({
|
|
831
|
+
datePickerValue: te,
|
|
832
|
+
isDateIncorrect: Y,
|
|
833
|
+
quickSelectRanges: J,
|
|
834
|
+
isMonthVariant: we,
|
|
835
|
+
withTimeInput: re,
|
|
836
|
+
placeholder: Be(i, "placeholder")
|
|
837
|
+
}), I = m(
|
|
838
|
+
() => `${i.description ? h : ""} ${i.errorMessage ? k : ""} ${Y.value ? b : ""}`.trim() || null
|
|
839
|
+
), W = () => {
|
|
840
|
+
E.value = !1;
|
|
841
|
+
}, y = () => {
|
|
842
|
+
E.value = !0;
|
|
843
|
+
}, M = F(ce.value), se = F(
|
|
833
844
|
// textInputDisplayValue is a reactive object
|
|
834
|
-
structuredClone(
|
|
835
|
-
),
|
|
836
|
-
() => i.hasActions ?
|
|
837
|
-
),
|
|
838
|
-
i.hasActions ?
|
|
839
|
-
),
|
|
840
|
-
() => i.hasActions ?
|
|
841
|
-
),
|
|
845
|
+
structuredClone(Ce(X))
|
|
846
|
+
), x = F(i.modelValue ?? i.value), H = F(!0), fe = m(
|
|
847
|
+
() => i.hasActions ? x.value : te.value
|
|
848
|
+
), p = F(
|
|
849
|
+
i.hasActions ? se.value : X
|
|
850
|
+
), n = m(
|
|
851
|
+
() => i.hasActions ? M.value : ce.value
|
|
852
|
+
), ge = {
|
|
842
853
|
allowOutsideClick: !0
|
|
843
854
|
};
|
|
844
|
-
|
|
845
|
-
if (i.hasActions ||
|
|
855
|
+
Da(() => {
|
|
856
|
+
if (i.hasActions || Xe(
|
|
846
857
|
'BentoDateRangePicker "hasActions" property',
|
|
847
858
|
`Set the BentoDateRangePicker "hasActions" property true which will display the "Apply" and "Cancel" buttons.
|
|
848
859
|
This will be the default behavior in the v2 and "hasActions" will be removed.`,
|
|
849
860
|
"2.0.0"
|
|
850
|
-
), i.value &&
|
|
861
|
+
), i.value && Xe(
|
|
851
862
|
'BentoDateRangePicker "value" property',
|
|
852
863
|
'The use of "value" prop in "BentoDateRangePicker" is no longer supported. Use the "v-model" or "model-value" property instead.',
|
|
853
864
|
"2.0.0"
|
|
854
865
|
), i.granularities && i.variant !== "month" && i.granularities.find(({ type: o }) => o === "quarterly"))
|
|
855
866
|
throw new Error('Quarterly granularity is only supported by BentoDateRangePicker with variant: "month"');
|
|
856
867
|
});
|
|
857
|
-
const
|
|
858
|
-
|
|
868
|
+
const $ = () => {
|
|
869
|
+
M.value = ce.value, se.value = structuredClone(Ce(X)), p.value = i.hasActions ? se.value : X, x.value = te.value;
|
|
859
870
|
};
|
|
860
|
-
|
|
861
|
-
|
|
871
|
+
Ae([() => i.value, () => i.modelValue], () => {
|
|
872
|
+
$();
|
|
862
873
|
});
|
|
863
|
-
const
|
|
864
|
-
|
|
874
|
+
const Me = () => {
|
|
875
|
+
$(), Y.value = !1, H.value = !0, W();
|
|
865
876
|
}, Ee = m(() => [
|
|
866
877
|
{
|
|
867
878
|
title: e("apply"),
|
|
868
879
|
event: () => {
|
|
869
|
-
|
|
880
|
+
pe(x.value), W(), H.value = !0;
|
|
870
881
|
},
|
|
871
|
-
disabled:
|
|
882
|
+
disabled: H.value
|
|
872
883
|
},
|
|
873
884
|
{
|
|
874
885
|
title: e("cancel"),
|
|
875
|
-
event:
|
|
886
|
+
event: Me
|
|
876
887
|
}
|
|
877
888
|
]);
|
|
878
|
-
|
|
889
|
+
Ae(x, (o) => {
|
|
879
890
|
if (i.hasActions) {
|
|
880
|
-
|
|
891
|
+
H.value = Y.value || o === te.value;
|
|
881
892
|
return;
|
|
882
893
|
}
|
|
883
|
-
|
|
894
|
+
pe(o);
|
|
884
895
|
});
|
|
885
|
-
const
|
|
886
|
-
|
|
887
|
-
},
|
|
888
|
-
|
|
896
|
+
const Fe = (o) => {
|
|
897
|
+
Y.value = !1, p.value.startDate = s(o.startDate), p.value.endDate = s(o.endDate), p.value.startTime = q(o.startDate), p.value.endTime = q(o.endDate), x.value = o;
|
|
898
|
+
}, he = async () => {
|
|
899
|
+
Y.value && (Y.value = !1), x.value = null;
|
|
889
900
|
}, Ie = () => {
|
|
890
|
-
if (!
|
|
891
|
-
|
|
901
|
+
if (!E.value) {
|
|
902
|
+
E.value = !0;
|
|
892
903
|
return;
|
|
893
904
|
}
|
|
894
|
-
|
|
895
|
-
}, V = (o) => {
|
|
896
|
-
R.value = !1, o.startTime && (n.value.startTime = o.startTime), o.endTime && (n.value.endTime = o.endTime);
|
|
905
|
+
Y.value || (E.value = !1);
|
|
897
906
|
}, Pe = (o) => {
|
|
898
|
-
|
|
899
|
-
},
|
|
900
|
-
|
|
907
|
+
Y.value = !1, o.startTime && (p.value.startTime = o.startTime), o.endTime && (p.value.endTime = o.endTime);
|
|
908
|
+
}, C = (o) => {
|
|
909
|
+
Y.value = !0, p.value.startDate = o.startDate, p.value.endDate = o.endDate, x.value = { startDate: null, endDate: null };
|
|
910
|
+
}, ye = (o) => {
|
|
911
|
+
o && (p.value.startDate = s(o.startDate), p.value.endDate = s(o.endDate), p.value.startTime = q(o.startDate), p.value.endTime = q(o.endDate), x.value = o);
|
|
901
912
|
};
|
|
902
|
-
return (o, K) =>
|
|
903
|
-
o.label ? (w(),
|
|
913
|
+
return (o, K) => qa((w(), Re("div", wt, [
|
|
914
|
+
o.label ? (w(), L(u(Dt), {
|
|
904
915
|
key: 0,
|
|
905
|
-
id: u(
|
|
916
|
+
id: u(j),
|
|
906
917
|
label: o.label,
|
|
907
918
|
"tooltip-text": o.tooltipText,
|
|
908
919
|
optional: o.optional,
|
|
909
920
|
required: o.required
|
|
910
|
-
}, null, 8, ["id", "label", "tooltip-text", "optional", "required"])) :
|
|
911
|
-
|
|
921
|
+
}, null, 8, ["id", "label", "tooltip-text", "optional", "required"])) : O("", !0),
|
|
922
|
+
oe("div", {
|
|
912
923
|
ref_key: "inputWrapperRef",
|
|
913
|
-
ref:
|
|
914
|
-
onKeydown:
|
|
924
|
+
ref: ue,
|
|
925
|
+
onKeydown: Ke(Ie, ["enter"])
|
|
915
926
|
}, [
|
|
916
|
-
|
|
927
|
+
_(u(_a), {
|
|
917
928
|
ref_key: "inputContainerRef",
|
|
918
|
-
ref:
|
|
929
|
+
ref: ee,
|
|
919
930
|
"always-combobox-is-input": "",
|
|
920
931
|
ariaControls: u(f),
|
|
921
|
-
ariaExpanded:
|
|
922
|
-
"aria-labelledby":
|
|
923
|
-
"aria-describedby":
|
|
932
|
+
ariaExpanded: E.value,
|
|
933
|
+
"aria-labelledby": ie.value,
|
|
934
|
+
"aria-describedby": I.value,
|
|
924
935
|
"aria-required": o.required,
|
|
925
936
|
disabled: o.disabled,
|
|
926
|
-
"is-invalid": !!o.errorMessage ||
|
|
927
|
-
open:
|
|
928
|
-
"display-value":
|
|
929
|
-
readonly: u(
|
|
930
|
-
onOpen:
|
|
931
|
-
onClear:
|
|
932
|
-
onClose:
|
|
937
|
+
"is-invalid": !!o.errorMessage || de.value,
|
|
938
|
+
open: E.value,
|
|
939
|
+
"display-value": n.value,
|
|
940
|
+
readonly: u(Q),
|
|
941
|
+
onOpen: y,
|
|
942
|
+
onClear: he,
|
|
943
|
+
onClose: W
|
|
933
944
|
}, null, 8, ["ariaControls", "ariaExpanded", "aria-labelledby", "aria-describedby", "aria-required", "disabled", "is-invalid", "open", "display-value", "readonly"])
|
|
934
945
|
], 544),
|
|
935
|
-
|
|
946
|
+
de.value ? (w(), L(u(ua), {
|
|
936
947
|
key: 1,
|
|
937
|
-
id: u(
|
|
948
|
+
id: u(b),
|
|
938
949
|
"error-message": u(e)("invalidDateFormat"),
|
|
939
950
|
class: "b-date-range-picker__error-message"
|
|
940
|
-
}, null, 8, ["id", "error-message"])) :
|
|
941
|
-
o.errorMessage ? (w(),
|
|
951
|
+
}, null, 8, ["id", "error-message"])) : O("", !0),
|
|
952
|
+
o.errorMessage ? (w(), L(u(ua), {
|
|
942
953
|
key: 2,
|
|
943
954
|
id: u(k),
|
|
944
955
|
"error-message": o.errorMessage,
|
|
945
956
|
class: "b-date-range-picker__error-message"
|
|
946
|
-
}, null, 8, ["id", "error-message"])) :
|
|
947
|
-
o.description ? (w(),
|
|
957
|
+
}, null, 8, ["id", "error-message"])) : O("", !0),
|
|
958
|
+
o.description ? (w(), L(u(ze), {
|
|
948
959
|
key: 3,
|
|
949
960
|
id: u(h),
|
|
950
|
-
class:
|
|
961
|
+
class: va(["b-date-range-picker__description", ne.value]),
|
|
951
962
|
el: "span"
|
|
952
963
|
}, {
|
|
953
|
-
default:
|
|
954
|
-
|
|
964
|
+
default: Z(() => [
|
|
965
|
+
Ye(be(o.description), 1)
|
|
955
966
|
]),
|
|
956
967
|
_: 1
|
|
957
|
-
}, 8, ["id", "class"])) :
|
|
958
|
-
|
|
968
|
+
}, 8, ["id", "class"])) : O("", !0),
|
|
969
|
+
ee.value ? (w(), L(u(za), {
|
|
959
970
|
key: 4,
|
|
960
971
|
id: u(f),
|
|
961
972
|
class: "b-date-range-picker__container",
|
|
962
|
-
open:
|
|
963
|
-
"target-element":
|
|
964
|
-
"aria-label":
|
|
973
|
+
open: E.value,
|
|
974
|
+
"target-element": ee.value,
|
|
975
|
+
"aria-label": le.value,
|
|
965
976
|
position: "bottom-start",
|
|
966
977
|
"fallback-strategy": "initialPlacement",
|
|
967
978
|
"without-space": "",
|
|
968
979
|
"fit-content": "",
|
|
969
|
-
"match-width":
|
|
980
|
+
"match-width": ae.value,
|
|
970
981
|
"trap-all": "",
|
|
971
982
|
"overflow-visible": "",
|
|
972
|
-
"trap-all-options":
|
|
973
|
-
onKeydown:
|
|
983
|
+
"trap-all-options": ge,
|
|
984
|
+
onKeydown: Ke(W, ["esc", "native"])
|
|
974
985
|
}, {
|
|
975
|
-
default:
|
|
976
|
-
|
|
977
|
-
"allow-time-input":
|
|
978
|
-
"quick-select-ranges":
|
|
979
|
-
value:
|
|
980
|
-
"first-day-of-week": u(
|
|
986
|
+
default: Z(() => [
|
|
987
|
+
_(u(kt), {
|
|
988
|
+
"allow-time-input": re.value,
|
|
989
|
+
"quick-select-ranges": J.value,
|
|
990
|
+
value: fe.value,
|
|
991
|
+
"first-day-of-week": u(A),
|
|
981
992
|
granularities: o.granularities,
|
|
982
993
|
"is-date-disabled": o.isDateDisabled,
|
|
983
994
|
"max-range": o.maxRange,
|
|
984
995
|
min: o.min,
|
|
985
996
|
max: o.max,
|
|
986
|
-
"number-of-months":
|
|
997
|
+
"number-of-months": N.value,
|
|
987
998
|
"show-end-date-on-open": o.showEndDateOnOpen,
|
|
988
|
-
"date-form-data":
|
|
999
|
+
"date-form-data": p.value,
|
|
989
1000
|
variant: o.variant,
|
|
990
1001
|
"year-range": o.yearRange,
|
|
991
|
-
onCustomRange:
|
|
992
|
-
onInput:
|
|
993
|
-
onError:
|
|
994
|
-
onFormDate:
|
|
995
|
-
},
|
|
1002
|
+
onCustomRange: ye,
|
|
1003
|
+
onInput: Fe,
|
|
1004
|
+
onError: C,
|
|
1005
|
+
onFormDate: Pe
|
|
1006
|
+
}, xa({ _: 2 }, [
|
|
996
1007
|
o.hasActions ? {
|
|
997
1008
|
name: "actions",
|
|
998
|
-
fn:
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1009
|
+
fn: Z(() => [
|
|
1010
|
+
_(u(Ca)),
|
|
1011
|
+
oe("div", Et, [
|
|
1012
|
+
_(u(Va), {
|
|
1002
1013
|
actions: Ee.value,
|
|
1003
|
-
layout: u(
|
|
1014
|
+
layout: u(vt).SPACE_BETWEEN
|
|
1004
1015
|
}, null, 8, ["actions", "layout"])
|
|
1005
1016
|
])
|
|
1006
1017
|
]),
|
|
@@ -1009,16 +1020,16 @@ const pa = {
|
|
|
1009
1020
|
]), 1032, ["allow-time-input", "quick-select-ranges", "value", "first-day-of-week", "granularities", "is-date-disabled", "max-range", "min", "max", "number-of-months", "show-end-date-on-open", "date-form-data", "variant", "year-range"])
|
|
1010
1021
|
]),
|
|
1011
1022
|
_: 1
|
|
1012
|
-
}, 8, ["id", "open", "target-element", "aria-label", "match-width"])) :
|
|
1023
|
+
}, 8, ["id", "open", "target-element", "aria-label", "match-width"])) : O("", !0)
|
|
1013
1024
|
])), [
|
|
1014
|
-
[u(
|
|
1025
|
+
[u(nt), W]
|
|
1015
1026
|
]);
|
|
1016
1027
|
}
|
|
1017
|
-
}),
|
|
1028
|
+
}), un = /* @__PURE__ */ pa(It, [["__scopeId", "data-v-84b100ba"]]);
|
|
1018
1029
|
export {
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1030
|
+
un as B,
|
|
1031
|
+
kt as D,
|
|
1032
|
+
ft as a,
|
|
1022
1033
|
De as i
|
|
1023
1034
|
};
|
|
1024
|
-
//# sourceMappingURL=date-range-picker.
|
|
1035
|
+
//# sourceMappingURL=date-range-picker.BU9R2jNa.js.map
|