@adyen/bento-vue2 1.86.0 → 1.86.1
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/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/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{checkbox-group.d6VQvZL7.js → checkbox-group.BOZpz83Y.js} +2 -2
- package/dist/chunks/{checkbox-group.d6VQvZL7.js.map → checkbox-group.BOZpz83Y.js.map} +1 -1
- package/dist/chunks/{checkbox.ClFNfhNh.js → checkbox.DoeTl4xh.js} +18 -18
- package/dist/chunks/{checkbox.ClFNfhNh.js.map → checkbox.DoeTl4xh.js.map} +1 -1
- package/dist/chunks/{data-grid.B_uZEPDW.js → data-grid.7trhuJ5D.js} +12 -12
- package/dist/chunks/{data-grid.B_uZEPDW.js.map → data-grid.7trhuJ5D.js.map} +1 -1
- package/dist/chunks/{date-range-picker.DxVjXxap.js → date-range-picker.BhBpy-oH.js} +311 -331
- package/dist/chunks/{date-range-picker.DxVjXxap.js.map → date-range-picker.BhBpy-oH.js.map} +1 -1
- package/dist/chunks/{filter-bar.UdXQf_RN.js → filter-bar.BUVhS3jE.js} +7 -7
- package/dist/chunks/{filter-bar.UdXQf_RN.js.map → filter-bar.BUVhS3jE.js.map} +1 -1
- package/dist/chunks/{header-with-views.DX8EXLMJ.js → header-with-views.BcyAUerg.js} +2 -2
- package/dist/chunks/{header-with-views.DX8EXLMJ.js.map → header-with-views.BcyAUerg.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.DiuS9alD.js → rich-text-editor.RHbCDQhe.js} +2 -2
- package/dist/chunks/{rich-text-editor.DiuS9alD.js.map → rich-text-editor.RHbCDQhe.js.map} +1 -1
- package/dist/chunks/{selection-card-group.CqGYskmS.js → selection-card-group.DdvpTgg4.js} +8 -8
- package/dist/chunks/{selection-card-group.CqGYskmS.js.map → selection-card-group.DdvpTgg4.js.map} +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-range-picker.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/index.js +8 -8
- package/dist/rich-text-editor.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +4 -4
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
import { j 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
|
|
1
|
+
import { reactive as De, defineComponent as je, useSlots as at, ref as O, computed as y, onMounted as Ye, toRaw as ye, watch as me, toRef as pe } from "vue";
|
|
2
|
+
import { j as nt } from "./index.BkJqgYF1.js";
|
|
3
|
+
import { B as rt } from "./divider.DX5gwN7p.js";
|
|
4
|
+
import { h as st, B as ot } from "./button-actions.VSc47LLH.js";
|
|
5
|
+
import { B as Qe, d as Ee } from "./typography.C8lPlsbD.js";
|
|
6
|
+
import { B as lt } from "./input-field.NEKXqT4R.js";
|
|
7
|
+
import { B as it } from "./dropdown.DDPfKc74.js";
|
|
8
|
+
import { B as ut } from "./segmented-control.BLnuxgnJ.js";
|
|
9
9
|
import { u as ge } from "./index.B6WW_F-J.js";
|
|
10
|
-
import { f as E, h as
|
|
11
|
-
import { d as
|
|
12
|
-
import { u as
|
|
13
|
-
import { e as
|
|
10
|
+
import { f as E, h as We, i as A, j as dt, k as we, l as ct, s as Fe, m as mt, n as re, o as Ce, b as j, u as Dt, e as S, p as w, g as pt } from "./calendar.DiXkjQDP.js";
|
|
11
|
+
import { d as ce } from "./debounce.DUTu11PS.js";
|
|
12
|
+
import { u as ft } from "./use-has-slot.C9lQZ6nz.js";
|
|
13
|
+
import { e as N, a as xe } from "./differenceInMonths.BR4Z2HIa.js";
|
|
14
14
|
import { s as Be } from "./startOfWeek.D8Yh4c0G.js";
|
|
15
|
-
import { f as Ae, v as
|
|
16
|
-
import { t as
|
|
17
|
-
import { c as
|
|
18
|
-
import { n as
|
|
19
|
-
import { D as
|
|
15
|
+
import { f as Ae, v as vt, u as yt } from "./date-input.etw_pFpA.js";
|
|
16
|
+
import { t as Y, c as gt, n as Tt } from "./getTimezoneOffsetInMilliseconds.Tu2wlbTR.js";
|
|
17
|
+
import { c as _t } from "./constructNow.B8T1ljs6.js";
|
|
18
|
+
import { n as $e } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
19
|
+
import { D as Rt } from "./dropdown-default-textbox.5WjhJWdh.js";
|
|
20
20
|
import { g as ae } from "./generate-uid.NJ8tVoha.js";
|
|
21
|
-
import { u as
|
|
21
|
+
import { u as It } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
22
22
|
import "./index.Cl4_42j5.js";
|
|
23
|
-
import { u as
|
|
24
|
-
import { B as
|
|
25
|
-
import { F as
|
|
26
|
-
import { B as
|
|
23
|
+
import { u as bt } from "./form-field.D_2g7vaP.js";
|
|
24
|
+
import { B as ht } from "./directive.rXUeDb8p.js";
|
|
25
|
+
import { F as kt, E as St } from "./error-message.VenUl2OK.js";
|
|
26
|
+
import { B as Mt } from "./button-actions.types.BptAXjD8.js";
|
|
27
27
|
import "../assets/date-range-picker.css";
|
|
28
28
|
function ne(r) {
|
|
29
29
|
if (r == null)
|
|
@@ -31,46 +31,46 @@ function ne(r) {
|
|
|
31
31
|
const [t, e, a] = r.split("-").map((l) => parseInt(l, 10));
|
|
32
32
|
return new Date(t, e - 1, a);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
return
|
|
34
|
+
function Ge(r, t, e) {
|
|
35
|
+
return We(r, t * 3, e);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
return
|
|
37
|
+
function Ot(r, t, e) {
|
|
38
|
+
return Ge(r, -1, e);
|
|
39
39
|
}
|
|
40
|
-
const
|
|
40
|
+
const Et = ({
|
|
41
41
|
firstDayOfWeek: r,
|
|
42
42
|
min: t,
|
|
43
43
|
max: e
|
|
44
44
|
}) => ({ getGranularCalendarLimits: (l) => {
|
|
45
45
|
if (!t && !e)
|
|
46
46
|
return { min: null, max: null };
|
|
47
|
-
let D = t ? E(t) : null, p = e ?
|
|
47
|
+
let D = t ? E(t) : null, p = e ? N(e) : null;
|
|
48
48
|
if ((l == null ? void 0 : l.type) === "weekly") {
|
|
49
49
|
if (l.earliest)
|
|
50
50
|
D = E(l.earliest);
|
|
51
51
|
else if (D) {
|
|
52
52
|
const f = Be(D, { weekStartsOn: r });
|
|
53
|
-
|
|
53
|
+
A(D, f) || (D = E(dt(we(D, { weekStartsOn: r }), 1)));
|
|
54
54
|
}
|
|
55
55
|
if (l.latest)
|
|
56
|
-
p =
|
|
56
|
+
p = N(l.latest);
|
|
57
57
|
else if (p) {
|
|
58
|
-
const f =
|
|
59
|
-
|
|
58
|
+
const f = we(p, { weekStartsOn: r });
|
|
59
|
+
A(p, f) || (p = N(ct(Be(p, { weekStartsOn: r }), 1)));
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
if ((l == null ? void 0 : l.type) === "monthly") {
|
|
63
63
|
if (l.earliest)
|
|
64
64
|
D = E(l.earliest);
|
|
65
65
|
else if (D) {
|
|
66
|
-
const f =
|
|
67
|
-
|
|
66
|
+
const f = Fe(D);
|
|
67
|
+
A(D, f) || (D = Fe(We(D, 1)));
|
|
68
68
|
}
|
|
69
69
|
if (l.latest)
|
|
70
|
-
p =
|
|
70
|
+
p = N(l.latest);
|
|
71
71
|
else if (p) {
|
|
72
72
|
const f = xe(p);
|
|
73
|
-
|
|
73
|
+
A(p, f) || (p = xe(mt(p, 1)));
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
if ((l == null ? void 0 : l.type) === "quarterly") {
|
|
@@ -78,18 +78,18 @@ const Ct = ({
|
|
|
78
78
|
D = re(l.earliest);
|
|
79
79
|
else if (D) {
|
|
80
80
|
const f = re(D);
|
|
81
|
-
|
|
81
|
+
A(D, f) || (D = re(Ge(D, 1)));
|
|
82
82
|
}
|
|
83
83
|
if (l.latest)
|
|
84
|
-
p =
|
|
84
|
+
p = N(l.latest);
|
|
85
85
|
else if (p) {
|
|
86
|
-
const f =
|
|
87
|
-
|
|
86
|
+
const f = Ce(p);
|
|
87
|
+
A(p, f) || (p = Ce(Ot(p)));
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
return { min: D, max: p };
|
|
91
91
|
} }), wt = () => {
|
|
92
|
-
const r =
|
|
92
|
+
const r = De({
|
|
93
93
|
daily: null,
|
|
94
94
|
weekly: null,
|
|
95
95
|
monthly: null,
|
|
@@ -107,48 +107,48 @@ const Ct = ({
|
|
|
107
107
|
};
|
|
108
108
|
var v = /* @__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))(v || {});
|
|
109
109
|
function Ft(r, t, e) {
|
|
110
|
-
const a =
|
|
110
|
+
const a = Y(r, e == null ? void 0 : e.in);
|
|
111
111
|
return a.setHours(t), a;
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
const a =
|
|
113
|
+
function Ct(r, t, e) {
|
|
114
|
+
const a = Y(r, e == null ? void 0 : e.in);
|
|
115
115
|
return a.setMinutes(t), a;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
const a =
|
|
117
|
+
function xt(r, t, e) {
|
|
118
|
+
const a = Y(r, e == null ? void 0 : e.in);
|
|
119
119
|
return a.setSeconds(t), a;
|
|
120
120
|
}
|
|
121
121
|
function qe(r, t) {
|
|
122
|
-
const e =
|
|
122
|
+
const e = Y(r, t == null ? void 0 : t.in);
|
|
123
123
|
return e.setMilliseconds(0), e;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function fe(r, t) {
|
|
126
126
|
return +qe(r) == +qe(t);
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
return +
|
|
128
|
+
function ve(r, t) {
|
|
129
|
+
return +Y(r) == +Y(t);
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
return
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
function Bt(r, t) {
|
|
132
|
+
return A(
|
|
133
|
+
gt(r, r),
|
|
134
|
+
_t(r)
|
|
135
135
|
);
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
const a =
|
|
137
|
+
function Pe(r, t, e) {
|
|
138
|
+
const a = Y(r, e == null ? void 0 : e.in);
|
|
139
139
|
return a.setMilliseconds(t), a;
|
|
140
140
|
}
|
|
141
|
-
const
|
|
142
|
-
const { selectionStart: t } = r.target, e = ["Backspace", "Tab", "ArrowLeft", "ArrowRight"], a =
|
|
141
|
+
const At = /[\d]/, qt = /^\d{2}$/, Pt = /^\d{2}:\d{2}$/, Nt = (r) => {
|
|
142
|
+
const { selectionStart: t } = r.target, e = ["Backspace", "Tab", "ArrowLeft", "ArrowRight"], a = At.test(r.key) || e.includes(r.key), l = [1, 2, 4, 5].includes(t) && r.key === ":";
|
|
143
143
|
!a && !l && r.preventDefault();
|
|
144
|
-
},
|
|
144
|
+
}, Ne = (r) => {
|
|
145
145
|
if (!r)
|
|
146
146
|
return r;
|
|
147
147
|
let t = r;
|
|
148
148
|
if (t.length === 1 && parseInt(r, 10) > 2)
|
|
149
149
|
return `0${t}:`;
|
|
150
150
|
const [e, a] = t.slice(-2);
|
|
151
|
-
return [2, 5].includes(t.length) && a === ":" && (t = `${t.slice(0, t.length - 2)}0${e}`), (
|
|
151
|
+
return [2, 5].includes(t.length) && a === ":" && (t = `${t.slice(0, t.length - 2)}0${e}`), (qt.test(t) || Pt.test(t)) && (t += ":"), t;
|
|
152
152
|
}, Lt = {
|
|
153
153
|
"en-US": {
|
|
154
154
|
customRange: "Custom range",
|
|
@@ -192,11 +192,11 @@ const qt = /[\d]/, Pt = /^\d{2}$/, Nt = /^\d{2}:\d{2}$/, Ut = (r) => {
|
|
|
192
192
|
timeTo: "Hora de",
|
|
193
193
|
weekly: "Semanal"
|
|
194
194
|
}
|
|
195
|
-
},
|
|
195
|
+
}, Ut = {
|
|
196
196
|
name: "date-range-picker-calendar",
|
|
197
197
|
i18n: { messages: Lt }
|
|
198
|
-
},
|
|
199
|
-
...
|
|
198
|
+
}, jt = /* @__PURE__ */ je({
|
|
199
|
+
...Ut,
|
|
200
200
|
props: {
|
|
201
201
|
/**
|
|
202
202
|
* Allows user to enter time values in the form
|
|
@@ -212,7 +212,7 @@ const qt = /[\d]/, Pt = /^\d{2}$/, Nt = /^\d{2}:\d{2}$/, Ut = (r) => {
|
|
|
212
212
|
/**
|
|
213
213
|
* Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
|
|
214
214
|
*/
|
|
215
|
-
firstDayOfWeek:
|
|
215
|
+
firstDayOfWeek: j.props.firstDayOfWeek,
|
|
216
216
|
/**
|
|
217
217
|
* A list of available granularities.
|
|
218
218
|
* If present, the date picker will display a segmented control to change granularity.
|
|
@@ -224,25 +224,25 @@ const qt = /[\d]/, Pt = /^\d{2}$/, Nt = /^\d{2}:\d{2}$/, Ut = (r) => {
|
|
|
224
224
|
/**
|
|
225
225
|
* Indicate if a date should be disabled or not
|
|
226
226
|
*/
|
|
227
|
-
isDateDisabled:
|
|
227
|
+
isDateDisabled: j.props.isDateDisabled,
|
|
228
228
|
/**
|
|
229
229
|
* Set a maximum number of dates to be selectable by the range.
|
|
230
230
|
*/
|
|
231
|
-
maxRange:
|
|
231
|
+
maxRange: j.props.maxRange,
|
|
232
232
|
/**
|
|
233
233
|
* Sets a minimum limit for selectable dates - dates before `min` will not be selectable
|
|
234
234
|
*/
|
|
235
|
-
min:
|
|
235
|
+
min: j.props.min,
|
|
236
236
|
/**
|
|
237
237
|
* Sets a maximum limit for selectable dates - dates after `max` will not be selectable
|
|
238
238
|
*/
|
|
239
|
-
max:
|
|
239
|
+
max: j.props.max,
|
|
240
240
|
/**
|
|
241
241
|
* Number of months rendered on pane
|
|
242
242
|
*/
|
|
243
243
|
numberOfMonths: {
|
|
244
|
-
type:
|
|
245
|
-
default:
|
|
244
|
+
type: j.props.numberOfMonths.type,
|
|
245
|
+
default: j.props.numberOfMonths.default,
|
|
246
246
|
validator: (r) => r >= 0
|
|
247
247
|
},
|
|
248
248
|
/**
|
|
@@ -267,7 +267,7 @@ const qt = /[\d]/, Pt = /^\d{2}$/, Nt = /^\d{2}:\d{2}$/, Ut = (r) => {
|
|
|
267
267
|
/**
|
|
268
268
|
* The type of calendar to display. Defaults to showing days.
|
|
269
269
|
*/
|
|
270
|
-
variant:
|
|
270
|
+
variant: j.props.variant
|
|
271
271
|
},
|
|
272
272
|
emits: [
|
|
273
273
|
v.CUSTOM_RANGE,
|
|
@@ -278,239 +278,219 @@ const qt = /[\d]/, Pt = /^\d{2}$/, Nt = /^\d{2}:\d{2}$/, Ut = (r) => {
|
|
|
278
278
|
],
|
|
279
279
|
setup(r, { emit: t }) {
|
|
280
280
|
var ke, Se, Me, Oe;
|
|
281
|
-
const e = r, a = 300, l = "customRange", D =
|
|
281
|
+
const e = r, a = 300, l = "customRange", D = at(), p = ft(D), { t: f } = ge(), q = O({}), b = y(() => e.variant === "month" ? "monthly" : "daily"), z = y(() => e.numberOfMonths === 0), s = De({
|
|
282
282
|
startDate: (ke = e.value) == null ? void 0 : ke.startDate,
|
|
283
283
|
endDate: (Se = e.value) == null ? void 0 : Se.endDate,
|
|
284
284
|
range: (Me = e.value) == null ? void 0 : Me.range,
|
|
285
285
|
...e.granularities ? {
|
|
286
286
|
granularity: ((Oe = e.value) == null ? void 0 : Oe.granularity) || b.value
|
|
287
287
|
} : {}
|
|
288
|
-
})
|
|
289
|
-
function m(n) {
|
|
290
|
-
return n ? new Date(
|
|
291
|
-
n.getUTCFullYear(),
|
|
292
|
-
n.getUTCMonth(),
|
|
293
|
-
n.getUTCDate(),
|
|
294
|
-
n.getUTCHours(),
|
|
295
|
-
n.getUTCMinutes(),
|
|
296
|
-
n.getUTCSeconds()
|
|
297
|
-
) : null;
|
|
298
|
-
}
|
|
299
|
-
const k = y(() => {
|
|
288
|
+
}), m = y(() => {
|
|
300
289
|
var n, i;
|
|
301
290
|
return (
|
|
302
291
|
// eslint-disable-next-line consistent-return
|
|
303
|
-
((i = (n = e == null ? void 0 : e.quickSelectRanges) == null ? void 0 : n.find(({ value:
|
|
292
|
+
((i = (n = e == null ? void 0 : e.quickSelectRanges) == null ? void 0 : n.find(({ value: d, data: u }) => {
|
|
304
293
|
var I;
|
|
305
|
-
if (!
|
|
306
|
-
if (
|
|
307
|
-
const
|
|
308
|
-
return
|
|
309
|
-
m(S.startDate),
|
|
310
|
-
m(s.startDate)
|
|
311
|
-
) && De(
|
|
312
|
-
m(S.endDate),
|
|
313
|
-
m(s.endDate)
|
|
314
|
-
) : (
|
|
294
|
+
if (!u.endDate) {
|
|
295
|
+
if (u.isRelativeToNow) {
|
|
296
|
+
const k = (I = q.value) == null ? void 0 : I[d];
|
|
297
|
+
return k ? ve(k.startDate, s.startDate) && ve(k.endDate, s.endDate) : (
|
|
315
298
|
// If not stored calculated dates, fall back to comparing the quick select item's value
|
|
316
299
|
// with the internal range's stored range identifier.
|
|
317
|
-
|
|
300
|
+
d === s.range
|
|
318
301
|
);
|
|
319
302
|
}
|
|
320
|
-
return
|
|
321
|
-
m(s.endDate),
|
|
322
|
-
m(A(s.endDate))
|
|
323
|
-
) && At(m(s.endDate)) && (e.granularities ? d.granularity === s.granularity : !0);
|
|
303
|
+
return ve(u.startDate, s.startDate) && Bt(s.endDate) && (!e.allowTimeInput || fe(s.endDate, N(s.endDate))) && (e.granularities ? u.granularity === s.granularity : !0);
|
|
324
304
|
}
|
|
325
305
|
if (e.allowTimeInput)
|
|
326
|
-
return
|
|
327
|
-
if (
|
|
328
|
-
return
|
|
306
|
+
return fe(u.startDate, s.startDate) && fe(u.endDate, s.endDate) && (e.granularities ? u.granularity === s.granularity : !0);
|
|
307
|
+
if (u.endDate)
|
|
308
|
+
return A(u.startDate, s.startDate) && A(u.endDate, s.endDate) && (e.granularities ? u.granularity === s.granularity : !0);
|
|
329
309
|
})) == null ? void 0 : i.value) ?? l
|
|
330
310
|
);
|
|
331
|
-
}),
|
|
311
|
+
}), Q = y(() => ({
|
|
332
312
|
"b-date-range-picker-calendar__form-input-wrapper": e.allowTimeInput
|
|
333
|
-
})),
|
|
313
|
+
})), g = y(() => [
|
|
334
314
|
{ label: f("customRange"), value: l },
|
|
335
315
|
...e.quickSelectRanges ? e.quickSelectRanges : []
|
|
336
|
-
]),
|
|
316
|
+
]), M = y(
|
|
337
317
|
() => {
|
|
338
318
|
var n;
|
|
339
319
|
return ((n = e.granularities) == null ? void 0 : n.find(({ type: i }) => i === s.granularity)) || null;
|
|
340
320
|
}
|
|
341
|
-
),
|
|
321
|
+
), R = y(
|
|
342
322
|
() => {
|
|
343
323
|
var n;
|
|
344
|
-
return ((n = e.granularities) == null ? void 0 : n.map(({ type: i, disabled:
|
|
324
|
+
return ((n = e.granularities) == null ? void 0 : n.map(({ type: i, disabled: d }) => ({
|
|
345
325
|
label: f(i),
|
|
346
326
|
value: i,
|
|
347
|
-
disabled:
|
|
327
|
+
disabled: d
|
|
348
328
|
}))) ?? [];
|
|
349
329
|
}
|
|
350
|
-
), { getGranularCalendarLimits:
|
|
351
|
-
() => e.granularities ?
|
|
330
|
+
), { getGranularCalendarLimits: H } = Et(e), T = y(
|
|
331
|
+
() => e.granularities ? H(M.value) : { min: e.min ? E(e.min) : null, max: e.max ? N(e.max) : null }
|
|
352
332
|
), {
|
|
353
|
-
adjustDateForQuarterly:
|
|
354
|
-
adjustDateForMonthly:
|
|
355
|
-
adjustDateForWeekly:
|
|
356
|
-
adjustStartDateInputForWeekly:
|
|
357
|
-
adjustEndDateInputForWeekly:
|
|
358
|
-
adjustStartDateInputForMonthly:
|
|
359
|
-
adjustEndDateInputForMonthly:
|
|
360
|
-
adjustStartDateInputForQuarterly:
|
|
361
|
-
adjustEndDateInputForQuarterly:
|
|
362
|
-
} =
|
|
333
|
+
adjustDateForQuarterly: J,
|
|
334
|
+
adjustDateForMonthly: X,
|
|
335
|
+
adjustDateForWeekly: se,
|
|
336
|
+
adjustStartDateInputForWeekly: Z,
|
|
337
|
+
adjustEndDateInputForWeekly: ee,
|
|
338
|
+
adjustStartDateInputForMonthly: W,
|
|
339
|
+
adjustEndDateInputForMonthly: _,
|
|
340
|
+
adjustStartDateInputForQuarterly: oe,
|
|
341
|
+
adjustEndDateInputForQuarterly: le
|
|
342
|
+
} = Dt(e.firstDayOfWeek), { savedRanges: F, saveRange: ie, resetSavedRanges: $ } = wt(), C = (n) => n ? S(n) : "", h = O(!1), x = O(!1), L = O(!1), U = O(!1), o = De({
|
|
363
343
|
startDate: e.dateFormData.startDate,
|
|
364
344
|
endDate: e.dateFormData.endDate,
|
|
365
345
|
startTime: e.dateFormData.startTime,
|
|
366
346
|
endTime: e.dateFormData.endTime
|
|
367
|
-
}),
|
|
368
|
-
let
|
|
369
|
-
const [
|
|
370
|
-
return
|
|
371
|
-
},
|
|
372
|
-
const
|
|
373
|
-
if (i &&
|
|
374
|
-
const
|
|
375
|
-
if (e.min &&
|
|
347
|
+
}), ue = (n, i) => {
|
|
348
|
+
let d = new Date(n);
|
|
349
|
+
const [u, I, k] = i.split(":");
|
|
350
|
+
return d = Ft(d, parseInt(u, 10)), d = Ct(d, parseInt(I, 10)), d = xt(d, parseInt(k, 10)), d;
|
|
351
|
+
}, de = (n) => /^(?:[01]\d|2[01234]):(?:[012345]\d):(?:[012345]\d)$/.test(n), K = (n, i) => {
|
|
352
|
+
const d = () => {
|
|
353
|
+
if (i && P(i)) {
|
|
354
|
+
const u = ue(new Date(i), n);
|
|
355
|
+
if (e.min && u < Pe(e.min, 0) || e.max && u > Pe(e.max, 0))
|
|
376
356
|
return !1;
|
|
377
357
|
}
|
|
378
358
|
return !0;
|
|
379
359
|
};
|
|
380
|
-
return
|
|
381
|
-
},
|
|
382
|
-
o.startTime =
|
|
383
|
-
e.min && e.allowTimeInput &&
|
|
384
|
-
), o.endTime =
|
|
385
|
-
e.max && e.allowTimeInput &&
|
|
386
|
-
), s.startDate =
|
|
360
|
+
return de(n) && d();
|
|
361
|
+
}, B = (n, i) => !i || !de(i) || e.variant === "month" ? n : ue(new Date(n), i), Te = (n) => {
|
|
362
|
+
o.startTime = w(
|
|
363
|
+
e.min && e.allowTimeInput && A(e.min, n.startDate) ? e.min : E(n.startDate)
|
|
364
|
+
), o.endTime = w(
|
|
365
|
+
e.max && e.allowTimeInput && A(e.max, n.endDate) ? e.max : N(n.endDate)
|
|
366
|
+
), s.startDate = B(n.startDate, o.startTime), s.endDate = B(n.endDate, o.endTime), s.range = null, e.granularities && $(), t(v.INPUT, {
|
|
387
367
|
...s,
|
|
388
|
-
range:
|
|
368
|
+
range: m.value
|
|
389
369
|
});
|
|
390
|
-
},
|
|
370
|
+
}, P = (n) => {
|
|
391
371
|
if (!n)
|
|
392
372
|
return !1;
|
|
393
|
-
const i = (
|
|
373
|
+
const i = (u) => e.min && E(u) < E(e.min) || e.max && E(u) > E(e.max) ? !1 : e.isDateDisabled ? !e.isDateDisabled(E(u)) : !0;
|
|
394
374
|
return /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(n) && i(new Date(n));
|
|
395
375
|
};
|
|
396
|
-
|
|
397
|
-
|
|
376
|
+
Ye(() => {
|
|
377
|
+
h.value = !!(e.dateFormData.startDate && !P(e.dateFormData.startDate)), e.allowTimeInput ? L.value = !!(e.dateFormData.startTime && !K(e.dateFormData.startTime, e.dateFormData.startDate)) : L.value = !1, x.value = !!(e.dateFormData.endDate && !P(e.dateFormData.endDate)), e.allowTimeInput ? U.value = !!(e.dateFormData.endTime && !K(e.dateFormData.endTime, e.dateFormData.endDate)) : U.value = !1;
|
|
398
378
|
});
|
|
399
|
-
const
|
|
379
|
+
const c = (n) => {
|
|
400
380
|
var i;
|
|
401
|
-
o.startDate =
|
|
402
|
-
},
|
|
381
|
+
o.startDate = S(n), o.startTime ? L.value && (o.startTime = (i = e.dateFormData) == null ? void 0 : i.startTime) : o.startTime = w(n), h.value = !1, L.value = !1, t(v.START_DATE_SELECTED, n);
|
|
382
|
+
}, V = (n) => {
|
|
403
383
|
var i;
|
|
404
|
-
o.endDate =
|
|
405
|
-
},
|
|
384
|
+
o.endDate = S(n), o.endTime ? U.value && (o.endTime = (i = e.dateFormData) == null ? void 0 : i.endTime) : o.endTime = w(N(n)), x.value = !1, U.value = !1;
|
|
385
|
+
}, G = (n) => {
|
|
406
386
|
const i = e.value[n];
|
|
407
387
|
if (i)
|
|
408
388
|
return i;
|
|
409
|
-
if (e.dateFormData[n] &&
|
|
389
|
+
if (e.dateFormData[n] && P(e.dateFormData[n]))
|
|
410
390
|
return new Date(e.dateFormData[n]);
|
|
411
|
-
}, _e =
|
|
391
|
+
}, _e = ce((n) => {
|
|
412
392
|
var i;
|
|
413
|
-
if (
|
|
414
|
-
let
|
|
415
|
-
switch (
|
|
393
|
+
if (P(n)) {
|
|
394
|
+
let d = n;
|
|
395
|
+
switch (h.value = !1, (i = M.value) == null ? void 0 : i.type) {
|
|
416
396
|
case "weekly":
|
|
417
|
-
|
|
397
|
+
d = Z(
|
|
418
398
|
n,
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
), o.startDate =
|
|
399
|
+
C,
|
|
400
|
+
T.value.min,
|
|
401
|
+
T.value.max
|
|
402
|
+
), o.startDate = d;
|
|
423
403
|
break;
|
|
424
404
|
case "monthly":
|
|
425
|
-
|
|
405
|
+
d = W(
|
|
426
406
|
n,
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
), o.startDate =
|
|
407
|
+
C,
|
|
408
|
+
T.value.min,
|
|
409
|
+
T.value.max
|
|
410
|
+
), o.startDate = d;
|
|
431
411
|
break;
|
|
432
412
|
case "quarterly":
|
|
433
|
-
|
|
413
|
+
d = oe(
|
|
434
414
|
n,
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
), o.startDate =
|
|
415
|
+
C,
|
|
416
|
+
T.value.min,
|
|
417
|
+
T.value.max
|
|
418
|
+
), o.startDate = d;
|
|
439
419
|
break;
|
|
440
420
|
}
|
|
441
|
-
const
|
|
442
|
-
s.startDate =
|
|
421
|
+
const u = ne(d);
|
|
422
|
+
s.startDate = B(u, o.startTime), s.endDate = B(
|
|
443
423
|
ne(o.endDate),
|
|
444
424
|
o.endTime
|
|
445
|
-
),
|
|
425
|
+
), P(o.endDate) && (s.endDate = B(
|
|
446
426
|
ne(o.endDate),
|
|
447
427
|
o.endTime
|
|
448
428
|
));
|
|
449
|
-
const I =
|
|
429
|
+
const I = G("endDate");
|
|
450
430
|
s.range = null, t(v.FORM_DATE, {
|
|
451
|
-
startDate:
|
|
431
|
+
startDate: u,
|
|
452
432
|
endDate: I
|
|
453
433
|
}), t(v.INPUT, {
|
|
454
434
|
...s,
|
|
455
|
-
range:
|
|
435
|
+
range: m.value
|
|
456
436
|
});
|
|
457
437
|
} else
|
|
458
|
-
|
|
459
|
-
}, a),
|
|
438
|
+
h.value = !0, t(v.ERROR, { ...o });
|
|
439
|
+
}, a), He = (n) => {
|
|
460
440
|
o.startDate = Ae(n), _e(o.startDate);
|
|
461
|
-
}, Re =
|
|
441
|
+
}, Re = ce((n) => {
|
|
462
442
|
var i;
|
|
463
|
-
if (
|
|
464
|
-
let
|
|
465
|
-
switch (
|
|
443
|
+
if (P(n)) {
|
|
444
|
+
let d = n;
|
|
445
|
+
switch (x.value = !1, (i = M.value) == null ? void 0 : i.type) {
|
|
466
446
|
case "weekly":
|
|
467
|
-
|
|
447
|
+
d = ee(
|
|
468
448
|
n,
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
), o.endDate =
|
|
449
|
+
C,
|
|
450
|
+
T.value.min,
|
|
451
|
+
T.value.max
|
|
452
|
+
), o.endDate = d;
|
|
473
453
|
break;
|
|
474
454
|
case "monthly":
|
|
475
|
-
|
|
455
|
+
d = _(
|
|
476
456
|
n,
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
), o.endDate =
|
|
457
|
+
C,
|
|
458
|
+
T.value.min,
|
|
459
|
+
T.value.max
|
|
460
|
+
), o.endDate = d;
|
|
481
461
|
break;
|
|
482
462
|
case "quarterly":
|
|
483
|
-
|
|
463
|
+
d = le(
|
|
484
464
|
n,
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
), o.endDate =
|
|
465
|
+
C,
|
|
466
|
+
T.value.min,
|
|
467
|
+
T.value.max
|
|
468
|
+
), o.endDate = d;
|
|
489
469
|
break;
|
|
490
470
|
}
|
|
491
|
-
const
|
|
492
|
-
s.endDate =
|
|
471
|
+
const u = ne(d);
|
|
472
|
+
s.endDate = B(u, o.endTime), P(o.startDate) && (s.startDate = B(
|
|
493
473
|
ne(o.startDate),
|
|
494
474
|
o.startTime
|
|
495
475
|
));
|
|
496
|
-
const I =
|
|
476
|
+
const I = G("startDate");
|
|
497
477
|
s.range = null, t(v.FORM_DATE, {
|
|
498
478
|
startDate: I,
|
|
499
|
-
endDate:
|
|
479
|
+
endDate: u
|
|
500
480
|
}), t(v.INPUT, {
|
|
501
481
|
...s,
|
|
502
|
-
range:
|
|
482
|
+
range: m.value
|
|
503
483
|
});
|
|
504
484
|
} else
|
|
505
|
-
|
|
506
|
-
}, a),
|
|
485
|
+
x.value = !0, t(v.ERROR, { ...o });
|
|
486
|
+
}, a), Ke = (n) => {
|
|
507
487
|
o.endDate = Ae(n), Re(o.endDate);
|
|
508
488
|
}, Ve = (n) => {
|
|
509
|
-
|
|
510
|
-
}, Ie =
|
|
489
|
+
vt(n);
|
|
490
|
+
}, Ie = ce((n) => {
|
|
511
491
|
if (K(n, e.dateFormData.startDate)) {
|
|
512
|
-
|
|
513
|
-
const i =
|
|
492
|
+
L.value = !1, s.startDate = B(s.startDate, n);
|
|
493
|
+
const i = G("endDate");
|
|
514
494
|
t(v.FORM_DATE, {
|
|
515
495
|
startDate: s.startDate,
|
|
516
496
|
endDate: i,
|
|
@@ -518,87 +498,87 @@ const qt = /[\d]/, Pt = /^\d{2}$/, Nt = /^\d{2}:\d{2}$/, Ut = (r) => {
|
|
|
518
498
|
endTime: o.endTime ?? e.dateFormData.endTime
|
|
519
499
|
}), t(v.INPUT, {
|
|
520
500
|
...s,
|
|
521
|
-
range:
|
|
501
|
+
range: m.value
|
|
522
502
|
});
|
|
523
503
|
} else
|
|
524
|
-
|
|
525
|
-
}), be =
|
|
526
|
-
K(n, e.dateFormData.endDate) ? (U.value = !1, s.endDate =
|
|
504
|
+
L.value = !0, t(v.ERROR, { ...o });
|
|
505
|
+
}), be = ce((n) => {
|
|
506
|
+
K(n, e.dateFormData.endDate) ? (U.value = !1, s.endDate = B(s.endDate, n), t(v.FORM_DATE, {
|
|
527
507
|
startDate: s.startDate,
|
|
528
508
|
endDate: s.endDate,
|
|
529
509
|
startTime: o.startTime ?? e.dateFormData.startTime,
|
|
530
510
|
endTime: n
|
|
531
511
|
}), t(v.INPUT, {
|
|
532
512
|
...s,
|
|
533
|
-
range:
|
|
513
|
+
range: m.value
|
|
534
514
|
})) : (U.value = !0, t(v.ERROR, { ...o }));
|
|
535
|
-
}),
|
|
536
|
-
o.startTime =
|
|
515
|
+
}), ze = (n) => {
|
|
516
|
+
o.startTime = Ne(n), Ie(o.startTime);
|
|
517
|
+
}, Je = (n) => {
|
|
518
|
+
o.endTime = Ne(n), be(o.endTime);
|
|
537
519
|
}, Xe = (n) => {
|
|
538
|
-
|
|
520
|
+
Nt(n);
|
|
521
|
+
}, te = (n, i, d, u) => {
|
|
522
|
+
s.startDate = n, s.endDate = i, d && (s.granularity = d), u && (s.range = u);
|
|
539
523
|
}, Ze = (n) => {
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
s.startDate = n, s.endDate = i, c && (s.granularity = c), d && (s.range = d);
|
|
543
|
-
}, et = (n) => {
|
|
544
|
-
var c;
|
|
545
|
-
const i = (c = e.quickSelectRanges) == null ? void 0 : c.find(({ value: d }) => d === n);
|
|
524
|
+
var d;
|
|
525
|
+
const i = (d = e.quickSelectRanges) == null ? void 0 : d.find(({ value: u }) => u === n);
|
|
546
526
|
if (i) {
|
|
547
|
-
|
|
548
|
-
const
|
|
549
|
-
o.endDate =
|
|
550
|
-
...
|
|
527
|
+
$();
|
|
528
|
+
const u = i.data, I = u.endDate || (u.isRelativeToNow ? new Date(Date.now()) : N(new Date(Date.now()))), k = u.isRelativeToNow && u.timeDifference ? new Date(I.getTime() - u.timeDifference) : u.startDate;
|
|
529
|
+
o.endDate = S(I), o.startDate = S(k), te(k, I, null, n), e.granularities && (s.granularity = u.granularity || b.value), o.startTime = w(k), o.endTime = w(I), s.startDate = k, s.endDate = I, u.isRelativeToNow && (q.value = {
|
|
530
|
+
...q.value,
|
|
551
531
|
[n]: {
|
|
552
|
-
startDate:
|
|
532
|
+
startDate: k,
|
|
553
533
|
endDate: I
|
|
554
534
|
}
|
|
555
535
|
}), t(v.CUSTOM_RANGE, {
|
|
556
536
|
...i.data,
|
|
557
|
-
startDate:
|
|
537
|
+
startDate: k,
|
|
558
538
|
endDate: I,
|
|
559
539
|
range: i.value
|
|
560
540
|
});
|
|
561
541
|
}
|
|
562
542
|
}, he = {
|
|
563
|
-
weekly:
|
|
564
|
-
monthly:
|
|
565
|
-
quarterly:
|
|
566
|
-
},
|
|
543
|
+
weekly: se,
|
|
544
|
+
monthly: X,
|
|
545
|
+
quarterly: J
|
|
546
|
+
}, et = (n) => {
|
|
567
547
|
const i = s.granularity;
|
|
568
|
-
if (s.granularity = n, i &&
|
|
548
|
+
if (s.granularity = n, i && ie(i, structuredClone(ye(s))), s.startDate && s.endDate) {
|
|
569
549
|
switch (n) {
|
|
570
550
|
case "quarterly":
|
|
571
551
|
case "monthly":
|
|
572
552
|
case "weekly": {
|
|
573
|
-
if (
|
|
574
|
-
te(
|
|
553
|
+
if (F[n]) {
|
|
554
|
+
te(F[n].startDate, F[n].endDate, n);
|
|
575
555
|
break;
|
|
576
556
|
}
|
|
577
|
-
const { startDate:
|
|
557
|
+
const { startDate: d, endDate: u } = he[n](
|
|
578
558
|
s.startDate,
|
|
579
559
|
s.endDate,
|
|
580
|
-
|
|
581
|
-
|
|
560
|
+
T.value.min,
|
|
561
|
+
T.value.max
|
|
582
562
|
);
|
|
583
|
-
te(
|
|
563
|
+
te(d, u, n);
|
|
584
564
|
break;
|
|
585
565
|
}
|
|
586
566
|
case "daily":
|
|
587
|
-
|
|
567
|
+
F.daily && te(F.daily.startDate, F.daily.endDate, n);
|
|
588
568
|
break;
|
|
589
569
|
}
|
|
590
|
-
o.startDate =
|
|
570
|
+
o.startDate = S(s.startDate), o.endDate = S(s.endDate), t(v.INPUT, {
|
|
591
571
|
...s,
|
|
592
|
-
range:
|
|
572
|
+
range: m.value
|
|
593
573
|
});
|
|
594
574
|
}
|
|
595
|
-
},
|
|
596
|
-
"b-date-range-picker-calendar__form-container--no-calendars":
|
|
575
|
+
}, tt = y(() => ({
|
|
576
|
+
"b-date-range-picker-calendar__form-container--no-calendars": z.value
|
|
597
577
|
}));
|
|
598
|
-
return { __sfc: !0, FORM_INPUT_DEBOUNCE_TIME: a, RANGE_SELECTOR_CUSTOM_RANGE_KEY: l, props: e, emit: t, slots: D, hasSlot: p, t: f, calculatedIsRelativeToNowQuickSelectRanges:
|
|
578
|
+
return { __sfc: !0, FORM_INPUT_DEBOUNCE_TIME: a, RANGE_SELECTOR_CUSTOM_RANGE_KEY: l, props: e, emit: t, slots: D, hasSlot: p, t: f, calculatedIsRelativeToNowQuickSelectRanges: q, defaultGranularity: b, hasNoCalendars: z, internalRangeDate: s, selectedRangeSelectorValue: m, formInputWrapperConditionalClasses: Q, quickSelectRangeDefaultItems: g, selectedGranularity: M, granularityItems: R, getGranularCalendarLimits: H, computedMinMax: T, adjustDateForQuarterly: J, adjustDateForMonthly: X, adjustDateForWeekly: se, adjustStartDateInputForWeekly: Z, adjustEndDateInputForWeekly: ee, adjustStartDateInputForMonthly: W, adjustEndDateInputForMonthly: _, adjustStartDateInputForQuarterly: oe, adjustEndDateInputForQuarterly: le, savedRanges: F, saveRange: ie, resetSavedRanges: $, formatDate: C, startDateError: h, endDateError: x, startTimeError: L, endTimeError: U, dateTextInput: o, setTimeInDateObject: ue, isValidTimeString: de, isValidTime: K, setTimeInDateRef: B, onDateInput: Te, isValidDate: P, onStartDateSelected: c, onEndDateSelected: V, getDate: G, validateStartDate: _e, onStartDateInput: He, validateEndDate: Re, onEndDateInput: Ke, onDateInputKeyDown: Ve, validateStartTime: Ie, validateEndTime: be, onStartTimeInput: ze, onEndTimeInput: Je, onTimeInputKeyDown: Xe, setInternalRange: te, onRangeSelectorInput: Ze, adjustDate: he, onGranularityInput: et, computedFormContainerClasses: tt, Calendar: j, BentoTypography: Qe, BentoInputField: lt, BentoDropdown: it, BentoSegmentedControl: ut };
|
|
599
579
|
}
|
|
600
580
|
});
|
|
601
|
-
var
|
|
581
|
+
var Yt = function() {
|
|
602
582
|
var t = this, e = t._self._c, a = t._self._setupProxy;
|
|
603
583
|
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(), e("div", [e(a.BentoTypography, { staticClass: "b-date-range-picker-calendar__label", attrs: { stronger: "", el: "span" } }, [t._v(" From ")]), e("div", { class: a.formInputWrapperConditionalClasses }, [e(a.BentoInputField, { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": a.t("dateFrom"), "model-value": a.dateTextInput.startDate, error: a.startDateError }, on: { "update:model-value": a.onStartDateInput, keydown: a.onDateInputKeyDown }, scopedSlots: t._u([{ key: "description", fn: function() {
|
|
604
584
|
return [t._v("YYYY-MM-DD")];
|
|
@@ -609,31 +589,31 @@ var Qt = function() {
|
|
|
609
589
|
}, proxy: !0 }]) }), t.allowTimeInput ? e(a.BentoInputField, { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": a.t("timeTo"), "model-value": a.dateTextInput.endTime, error: a.endTimeError }, on: { "update:model-value": a.onEndTimeInput, keydown: a.onTimeInputKeyDown }, scopedSlots: t._u([{ key: "description", fn: function() {
|
|
610
590
|
return [t._v("HH:MM:SS")];
|
|
611
591
|
}, proxy: !0 }], null, !1, 3442289499) }) : t._e()], 1)], 1)], 2), a.hasSlot("actions") ? e("div", [t._t("actions")], 2) : t._e()]), a.hasNoCalendars ? t._e() : 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, "is-range": "" }, on: { input: a.onDateInput, "start-date-selected": a.onStartDateSelected, "end-date-selected": a.onEndDateSelected } })], 1)]);
|
|
612
|
-
},
|
|
592
|
+
}, Qt = [], Wt = /* @__PURE__ */ $e(
|
|
593
|
+
jt,
|
|
613
594
|
Yt,
|
|
614
595
|
Qt,
|
|
615
|
-
Wt,
|
|
616
596
|
!1,
|
|
617
597
|
null,
|
|
618
|
-
"
|
|
598
|
+
"7b94a28f"
|
|
619
599
|
);
|
|
620
|
-
const
|
|
600
|
+
const $t = Wt.exports;
|
|
621
601
|
function Le(r, t) {
|
|
622
|
-
const e =
|
|
602
|
+
const e = Y(r, t == null ? void 0 : t.in);
|
|
623
603
|
return Math.trunc(e.getMonth() / 3) + 1;
|
|
624
604
|
}
|
|
625
|
-
function
|
|
626
|
-
return
|
|
605
|
+
function Ue(r, t) {
|
|
606
|
+
return Y(r, t == null ? void 0 : t.in).getFullYear();
|
|
627
607
|
}
|
|
628
|
-
function
|
|
629
|
-
const [a, l] =
|
|
608
|
+
function Gt(r, t, e) {
|
|
609
|
+
const [a, l] = Tt(
|
|
630
610
|
e == null ? void 0 : e.in,
|
|
631
611
|
r,
|
|
632
612
|
t
|
|
633
613
|
);
|
|
634
614
|
return +re(a) == +re(l);
|
|
635
615
|
}
|
|
636
|
-
const
|
|
616
|
+
const Ht = {
|
|
637
617
|
"en-US": {
|
|
638
618
|
apply: "Apply",
|
|
639
619
|
cancel: "Cancel",
|
|
@@ -664,7 +644,7 @@ const Kt = {
|
|
|
664
644
|
selectDateRange: "Selecione um intervalo de datas",
|
|
665
645
|
selectedDateIsNotAvailable: "A data selecionada não está disponível"
|
|
666
646
|
}
|
|
667
|
-
},
|
|
647
|
+
}, Kt = ({
|
|
668
648
|
datePickerValue: r,
|
|
669
649
|
isDateIncorrect: t,
|
|
670
650
|
quickSelectRanges: e,
|
|
@@ -672,42 +652,42 @@ const Kt = {
|
|
|
672
652
|
withTimeInput: l,
|
|
673
653
|
placeholder: D
|
|
674
654
|
}) => {
|
|
675
|
-
const { locale: p, t: f } = ge(),
|
|
655
|
+
const { locale: p, t: f } = ge(), q = (m) => !!m && !isNaN(m.getTime()), b = De({
|
|
676
656
|
startDate: null,
|
|
677
657
|
endDate: null,
|
|
678
658
|
startTime: null,
|
|
679
659
|
endTime: null
|
|
680
660
|
});
|
|
681
|
-
return
|
|
661
|
+
return me(
|
|
682
662
|
r,
|
|
683
663
|
(m) => {
|
|
684
|
-
b.startDate =
|
|
664
|
+
b.startDate = S(m == null ? void 0 : m.startDate), b.endDate = S(m == null ? void 0 : m.endDate), b.startTime = w(m == null ? void 0 : m.startDate), b.endTime = w(m == null ? void 0 : m.endDate);
|
|
685
665
|
},
|
|
686
666
|
{ immediate: !0 }
|
|
687
667
|
), {
|
|
688
668
|
// Values
|
|
689
669
|
dateDisplayValue: y(() => {
|
|
690
|
-
var
|
|
670
|
+
var Q;
|
|
691
671
|
if (t.value)
|
|
692
672
|
return `${b.startDate || ""} - ${b.endDate || ""}`;
|
|
693
673
|
if (!r.value || !r.value.startDate && !r.value.endDate)
|
|
694
674
|
return (D == null ? void 0 : D.value) || f("selectDateRange");
|
|
695
|
-
if ((
|
|
696
|
-
const g = e.value.find(({ value:
|
|
697
|
-
var
|
|
698
|
-
return
|
|
675
|
+
if ((Q = e.value) != null && Q.length) {
|
|
676
|
+
const g = e.value.find(({ value: M }) => {
|
|
677
|
+
var R;
|
|
678
|
+
return M === ((R = r.value) == null ? void 0 : R.range);
|
|
699
679
|
});
|
|
700
680
|
if (g)
|
|
701
681
|
return g.label;
|
|
702
682
|
}
|
|
703
683
|
if (r.value.granularity === "quarterly") {
|
|
704
|
-
const { startDate: g, endDate:
|
|
705
|
-
if (
|
|
706
|
-
return
|
|
707
|
-
const
|
|
708
|
-
return `${
|
|
684
|
+
const { startDate: g, endDate: M } = r.value, R = f("quarter", { quarter: Le(g), year: Ue(g) });
|
|
685
|
+
if (Gt(g, M))
|
|
686
|
+
return R;
|
|
687
|
+
const H = f("quarter", { quarter: Le(M), year: Ue(M) });
|
|
688
|
+
return `${R} - ${H}`;
|
|
709
689
|
}
|
|
710
|
-
if (!
|
|
690
|
+
if (!q(r.value.startDate) || !q(r.value.endDate))
|
|
711
691
|
return `${b.startDate || ""} - ${b.endDate || ""}`;
|
|
712
692
|
let m = a != null && a.value ? { month: "long", year: "numeric" } : { month: "short", day: "2-digit", year: "numeric" };
|
|
713
693
|
return l.value && (m = {
|
|
@@ -716,7 +696,7 @@ const Kt = {
|
|
|
716
696
|
minute: "numeric",
|
|
717
697
|
second: "numeric",
|
|
718
698
|
hour12: !1
|
|
719
|
-
}),
|
|
699
|
+
}), pt(p.value, m).formatRange(
|
|
720
700
|
r.value.startDate,
|
|
721
701
|
r.value.endDate
|
|
722
702
|
);
|
|
@@ -726,10 +706,10 @@ const Kt = {
|
|
|
726
706
|
formatTextInputDisplayValue: () => ""
|
|
727
707
|
};
|
|
728
708
|
}, Vt = {
|
|
729
|
-
i18n: { messages:
|
|
709
|
+
i18n: { messages: Ht },
|
|
730
710
|
name: "bento-date-range-picker",
|
|
731
711
|
model: { prop: "modelValue" }
|
|
732
|
-
},
|
|
712
|
+
}, zt = /* @__PURE__ */ je({
|
|
733
713
|
...Vt,
|
|
734
714
|
props: {
|
|
735
715
|
description: { default: void 0 },
|
|
@@ -758,7 +738,7 @@ const Kt = {
|
|
|
758
738
|
},
|
|
759
739
|
emits: ["update:model-value", "input"],
|
|
760
740
|
setup(r, { emit: t }) {
|
|
761
|
-
const e = r, { t: a } = ge(), l = ae("bento-date-range-picker-container"), D = ae("bento-date-range-picker-label"), p = ae("bento-date-range-picker-description"), f = ae("bento-date-range-picker-error"),
|
|
741
|
+
const e = r, { t: a } = ge(), l = ae("bento-date-range-picker-container"), D = ae("bento-date-range-picker-label"), p = ae("bento-date-range-picker-description"), f = ae("bento-date-range-picker-error"), q = ae("bento-date-range-picker-date-error"), b = y(() => e.label || a("dateRangePicker", { name: l })), { resolvedFirstDayOfWeek: z } = yt(pe(e, "firstDayOfWeek")), s = nt({
|
|
762
742
|
none: 0,
|
|
763
743
|
one: 710,
|
|
764
744
|
// width of date range picker with one panes
|
|
@@ -767,57 +747,57 @@ const Kt = {
|
|
|
767
747
|
three: 1290
|
|
768
748
|
// width of date range picker with three panes
|
|
769
749
|
}), m = y(() => {
|
|
770
|
-
const
|
|
750
|
+
const c = s.active().value, V = {
|
|
771
751
|
none: 0,
|
|
772
752
|
one: 1,
|
|
773
753
|
two: 2
|
|
774
754
|
};
|
|
775
|
-
if (
|
|
776
|
-
const
|
|
777
|
-
return e.numberOfMonths === void 0 ?
|
|
755
|
+
if (c in V) {
|
|
756
|
+
const G = V[c];
|
|
757
|
+
return e.numberOfMonths === void 0 ? G : Math.min(e.numberOfMonths, G);
|
|
778
758
|
}
|
|
779
759
|
return e.numberOfMonths;
|
|
780
|
-
}),
|
|
781
|
-
const
|
|
760
|
+
}), Q = y(() => (e == null ? void 0 : e.quickSelectRanges) && e.quickSelectRanges.map((c) => {
|
|
761
|
+
const V = c.data.endDate ? void 0 : new Date(Date.now()).getTime() - c.data.startDate.getTime();
|
|
782
762
|
return {
|
|
783
|
-
...
|
|
763
|
+
...c,
|
|
784
764
|
data: {
|
|
785
|
-
...
|
|
765
|
+
...c.data,
|
|
786
766
|
// Adding timeDifference to calculate an up-to-date endDate on range selection
|
|
787
|
-
timeDifference:
|
|
767
|
+
timeDifference: V
|
|
788
768
|
}
|
|
789
769
|
};
|
|
790
|
-
})), g = O(!1),
|
|
791
|
-
|
|
770
|
+
})), g = O(!1), M = O(null), R = O(!1), { isReadOnly: H } = It(pe(e, "readonly")), { emitValue: T } = bt(t);
|
|
771
|
+
me(
|
|
792
772
|
() => e.disabled,
|
|
793
773
|
() => {
|
|
794
|
-
e.disabled &&
|
|
774
|
+
e.disabled && R.value && (R.value = !1);
|
|
795
775
|
}
|
|
796
776
|
);
|
|
797
|
-
const
|
|
777
|
+
const J = y(() => e.modelValue || e.value), X = y(() => e.hasActions ? !x.value && g.value : g.value), se = y(() => ({
|
|
798
778
|
"b-date-range-picker__description--error": !!e.errorMessage || X.value
|
|
799
|
-
})), Z = y(() => e.variant === "month"), ee = y(() => e.allowTimeInput && e.variant !== "month"), { dateDisplayValue:
|
|
800
|
-
datePickerValue:
|
|
779
|
+
})), Z = y(() => e.variant === "month"), ee = y(() => e.allowTimeInput && e.variant !== "month"), { dateDisplayValue: W, textInputDisplayValue: _, formatTextInputDisplayValue: oe } = Kt({
|
|
780
|
+
datePickerValue: J,
|
|
801
781
|
isDateIncorrect: g,
|
|
802
|
-
quickSelectRanges:
|
|
782
|
+
quickSelectRanges: Q,
|
|
803
783
|
isMonthVariant: Z,
|
|
804
784
|
withTimeInput: ee,
|
|
805
|
-
placeholder:
|
|
785
|
+
placeholder: pe(e, "placeholder")
|
|
806
786
|
}), le = y(
|
|
807
|
-
() => `${e.description ? p : ""} ${e.errorMessage ? f : ""} ${g.value ?
|
|
808
|
-
),
|
|
809
|
-
|
|
810
|
-
},
|
|
811
|
-
|
|
812
|
-
},
|
|
787
|
+
() => `${e.description ? p : ""} ${e.errorMessage ? f : ""} ${g.value ? q : ""}`.trim() || null
|
|
788
|
+
), F = () => {
|
|
789
|
+
R.value = !1;
|
|
790
|
+
}, ie = () => {
|
|
791
|
+
R.value = !0;
|
|
792
|
+
}, $ = O(W.value), C = O(
|
|
813
793
|
// textInputDisplayValue is a reactive object
|
|
814
794
|
structuredClone(ye(_))
|
|
815
|
-
), h = O(e.modelValue ?? e.value),
|
|
816
|
-
() => e.hasActions ?
|
|
817
|
-
),
|
|
818
|
-
() => e.hasActions ?
|
|
795
|
+
), h = O(e.modelValue ?? e.value), x = O(!0), L = y(
|
|
796
|
+
() => e.hasActions ? C.value : _
|
|
797
|
+
), U = y(
|
|
798
|
+
() => e.hasActions ? $.value : W.value
|
|
819
799
|
);
|
|
820
|
-
|
|
800
|
+
Ye(() => {
|
|
821
801
|
if (e.hasActions || Ee(
|
|
822
802
|
'BentoDateRangePicker "hasActions" property',
|
|
823
803
|
`Set the BentoDateRangePicker "hasActions" property true which will display the "Apply" and "Cancel" buttons.
|
|
@@ -827,50 +807,50 @@ const Kt = {
|
|
|
827
807
|
'BentoDateRangePicker "value" property',
|
|
828
808
|
'The use of "value" prop in "BentoDateRangePicker" is no longer supported. Use the "v-model" or "model-value" property instead.',
|
|
829
809
|
"2.0.0"
|
|
830
|
-
), e.granularities && e.variant !== "month" && e.granularities.find(({ type:
|
|
810
|
+
), e.granularities && e.variant !== "month" && e.granularities.find(({ type: c }) => c === "quarterly"))
|
|
831
811
|
throw new Error('Quarterly granularity is only supported by BentoDateRangePicker with variant: "month"');
|
|
832
|
-
}),
|
|
833
|
-
|
|
812
|
+
}), me([() => e.value, () => e.modelValue], () => {
|
|
813
|
+
$.value = W.value, C.value = structuredClone(ye(_));
|
|
834
814
|
});
|
|
835
|
-
const
|
|
815
|
+
const o = y(() => [
|
|
836
816
|
{
|
|
837
817
|
title: a("apply"),
|
|
838
818
|
event: () => {
|
|
839
|
-
|
|
819
|
+
T(h.value), F(), x.value = !0;
|
|
840
820
|
},
|
|
841
|
-
disabled:
|
|
821
|
+
disabled: x.value
|
|
842
822
|
},
|
|
843
823
|
{
|
|
844
824
|
title: a("cancel"),
|
|
845
|
-
event:
|
|
825
|
+
event: F
|
|
846
826
|
}
|
|
847
827
|
]);
|
|
848
|
-
return
|
|
828
|
+
return me(h, (c) => {
|
|
849
829
|
if (e.hasActions) {
|
|
850
|
-
|
|
830
|
+
x.value = g.value;
|
|
851
831
|
return;
|
|
852
832
|
}
|
|
853
|
-
|
|
854
|
-
}), { __sfc: !0, emit: t, props: e, t: a, datePickerContainerId: l, labelId: D, descriptionId: p, errorId: f, dateErrorId:
|
|
855
|
-
g.value = !1, _.startDate =
|
|
833
|
+
T(c);
|
|
834
|
+
}), { __sfc: !0, emit: t, props: e, t: a, datePickerContainerId: l, labelId: D, descriptionId: p, errorId: f, dateErrorId: q, popoverAriaLabel: b, resolvedFirstDayOfWeek: z, breakpoints: s, computedNumberOfMonths: m, adjustedQuickSelectRanges: Q, isDateIncorrect: g, inputContainerRef: M, isDateRangePickerOpen: R, isReadOnly: H, emitValue: T, internalModelValue: J, shouldDisplayError: X, descriptionConditionalClasses: se, isMonthVariant: Z, withTimeInput: ee, dateDisplayValue: W, textInputDisplayValue: _, formatTextInputDisplayValue: oe, ariaDescribedBy: le, closeDateRangePicker: F, openDateRangePicker: ie, localDateDisplayValue: $, localTextInputDisplayValue: C, selectedDate: h, isApplyDisabled: x, displayedTextInputValue: L, displayedDateValue: U, rangePickerButtonActions: o, onDateRangePickerInput: (c) => {
|
|
835
|
+
g.value = !1, _.startDate = S(c.startDate), _.endDate = S(c.endDate), _.startTime = w(c.startDate), _.endTime = w(c.endDate), h.value = c;
|
|
856
836
|
}, clearDateRangePickerValue: async () => {
|
|
857
837
|
g.value && (g.value = !1), h.value = null;
|
|
858
838
|
}, onEnterPressedOverInput: () => {
|
|
859
|
-
if (!
|
|
860
|
-
|
|
839
|
+
if (!R.value) {
|
|
840
|
+
R.value = !0;
|
|
861
841
|
return;
|
|
862
842
|
}
|
|
863
|
-
g.value || (
|
|
864
|
-
}, onDateRangePickerFormDateInputUpdate: (
|
|
865
|
-
g.value = !1,
|
|
866
|
-
}, onDateRangePickerError: (
|
|
867
|
-
g.value = !0, _.startDate =
|
|
868
|
-
}, onRangeSelectorInput: (
|
|
869
|
-
|
|
870
|
-
}, BentoButtonActions:
|
|
843
|
+
g.value || (R.value = !1);
|
|
844
|
+
}, onDateRangePickerFormDateInputUpdate: (c) => {
|
|
845
|
+
g.value = !1, c.startTime && (_.startTime = c.startTime), c.endTime && (_.endTime = c.endTime);
|
|
846
|
+
}, onDateRangePickerError: (c) => {
|
|
847
|
+
g.value = !0, _.startDate = c.startDate, _.endDate = c.endDate, h.value = { startDate: null, endDate: null };
|
|
848
|
+
}, onRangeSelectorInput: (c) => {
|
|
849
|
+
c && (_.startDate = S(c.startDate), _.endDate = S(c.endDate), _.startTime = w(c.startDate), _.endTime = w(c.endDate), h.value = c);
|
|
850
|
+
}, BentoButtonActions: ot, BentoButtonActionsLayout: Mt, BentoDivider: rt, BentoPopover: st, BentoTypography: Qe, DateRangePickerCalendar: $t, DropdownInputDefault: Rt, ErrorMessage: St, FieldLabel: kt, vBentoClickOutsideDirective: ht };
|
|
871
851
|
}
|
|
872
852
|
});
|
|
873
|
-
var
|
|
853
|
+
var Jt = function() {
|
|
874
854
|
var t = this, e = t._self._c, a = t._self._setupProxy;
|
|
875
855
|
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", { on: { keydown: function(l) {
|
|
876
856
|
return !l.type.indexOf("key") && t._k(l.keyCode, "enter", 13, l.key, "Enter") ? null : a.onEnterPressedOverInput.apply(null, arguments);
|
|
@@ -879,19 +859,19 @@ var Xt = function() {
|
|
|
879
859
|
} } }, [e(a.DateRangePickerCalendar, { attrs: { "allow-time-input": a.withTimeInput, "quick-select-ranges": a.adjustedQuickSelectRanges, value: a.internalModelValue, "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 }, on: { "custom-range": a.onRangeSelectorInput, input: a.onDateRangePickerInput, error: a.onDateRangePickerError, "form-date": a.onDateRangePickerFormDateInputUpdate }, scopedSlots: t._u([t.hasActions ? { key: "actions", fn: function() {
|
|
880
860
|
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)];
|
|
881
861
|
}, proxy: !0 } : null], null, !0) })], 1) : t._e()], 1);
|
|
882
|
-
},
|
|
862
|
+
}, Xt = [], Zt = /* @__PURE__ */ $e(
|
|
863
|
+
zt,
|
|
883
864
|
Jt,
|
|
884
865
|
Xt,
|
|
885
|
-
Zt,
|
|
886
866
|
!1,
|
|
887
867
|
null,
|
|
888
868
|
"20451845"
|
|
889
869
|
);
|
|
890
|
-
const
|
|
870
|
+
const Sa = Zt.exports;
|
|
891
871
|
export {
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
872
|
+
Sa as B,
|
|
873
|
+
$t as D,
|
|
874
|
+
Bt as a,
|
|
875
|
+
ve as i
|
|
896
876
|
};
|
|
897
|
-
//# sourceMappingURL=date-range-picker.
|
|
877
|
+
//# sourceMappingURL=date-range-picker.BhBpy-oH.js.map
|