@adyen/bento-vue3 1.58.0 → 1.58.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/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/filter-bar.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/chunks/{calendar.DzwpAB0z.js → calendar.BzN254pQ.js} +3 -3
- package/dist/chunks/{calendar.DzwpAB0z.js.map → calendar.BzN254pQ.js.map} +1 -1
- package/dist/chunks/{data-grid.C98jzhfU.js → data-grid._VkSTE4U.js} +2 -2
- package/dist/chunks/{data-grid.C98jzhfU.js.map → data-grid._VkSTE4U.js.map} +1 -1
- package/dist/chunks/{date-picker.Bmkc0eYL.js → date-picker.BvP9lX7i.js} +2 -2
- package/dist/chunks/{date-picker.Bmkc0eYL.js.map → date-picker.BvP9lX7i.js.map} +1 -1
- package/dist/chunks/{date-range-picker.D-_e1W8W.js → date-range-picker.42PkRLKi.js} +438 -439
- package/dist/chunks/date-range-picker.42PkRLKi.js.map +1 -0
- package/dist/chunks/{filter-bar.CY2ZlyD4.js → filter-bar.B6MJc1pP.js} +1050 -1021
- package/dist/chunks/filter-bar.B6MJc1pP.js.map +1 -0
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/filter-bar.js +1 -1
- package/dist/index.js +5 -5
- package/dist/internal.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +3 -3
- package/dist/chunks/date-range-picker.D-_e1W8W.js.map +0 -1
- package/dist/chunks/filter-bar.CY2ZlyD4.js.map +0 -1
|
@@ -1,140 +1,140 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
import { B as
|
|
3
|
-
import { B as
|
|
4
|
-
import { B as Xe, d as
|
|
5
|
-
import { D as
|
|
6
|
-
import { r as
|
|
7
|
-
import { g as
|
|
1
|
+
import { reactive as be, defineComponent as ze, computed as b, ref as _, onMounted as Je, toRaw as ke, resolveComponent as E, createElementBlock as Ee, openBlock as O, createElementVNode as L, createCommentVNode as U, renderSlot as _e, createBlock as K, createVNode as G, withCtx as Y, createTextVNode as ne, normalizeClass as he, toRef as Re, watch as Se, resolveDirective as ft, withDirectives as pt, withKeys as vt, toDisplayString as gt, createSlots as yt } from "vue";
|
|
2
|
+
import { B as Tt } from "./divider.qUOSAbU6.js";
|
|
3
|
+
import { B as bt } from "./popover.DiIZe9RM.js";
|
|
4
|
+
import { B as Xe, d as It } from "./typography.DN5eC5ch.js";
|
|
5
|
+
import { D as Rt } from "./dropdown-default-textbox.BNhy-QDH.js";
|
|
6
|
+
import { r as M, t as J, g as we } from "./get-date-locale.BN8xEjY0.js";
|
|
7
|
+
import { g as de } from "./generate-uid.NJ8tVoha.js";
|
|
8
8
|
import { u as Oe } from "./i18n.B6g5VX0q.js";
|
|
9
|
-
import { t as
|
|
10
|
-
import { e as Ze, f as
|
|
11
|
-
import { f as qe, v as
|
|
12
|
-
import { u as
|
|
13
|
-
import { B as
|
|
9
|
+
import { t as De, f as ce } from "./date.CKXySBQv.js";
|
|
10
|
+
import { e as Ze, f as me, i as V, g as ie, h as Ue, j as St, k as Be, l as kt, s as Pe, m as Et, n as Ne, a as z, u as ht } from "./calendar.BzN254pQ.js";
|
|
11
|
+
import { f as qe, v as wt, D as h } from "./date-input.BqBdAO1E.js";
|
|
12
|
+
import { u as Ot } from "./use-form-layout-loading.D3lALhtC.js";
|
|
13
|
+
import { B as Mt } from "./directive.Cbdox5VL.js";
|
|
14
14
|
import "./events.FNmSWp_P.js";
|
|
15
|
-
import { B as
|
|
16
|
-
import { B as
|
|
17
|
-
import { B as
|
|
18
|
-
import { d as
|
|
19
|
-
import { u as
|
|
20
|
-
import { e as
|
|
15
|
+
import { B as Ct } from "./input-field.CUfSQLYO.js";
|
|
16
|
+
import { B as At } from "./dropdown.CnMnzXc2.js";
|
|
17
|
+
import { B as Ft } from "./segmented-control.ClJS7gzl.js";
|
|
18
|
+
import { d as ye } from "./debounce.DUTu11PS.js";
|
|
19
|
+
import { u as _t } from "./use-has-slot.B7eQSabc.js";
|
|
20
|
+
import { e as re, a as $e } from "./index.BDuTpjD8.js";
|
|
21
21
|
import { _ as xe } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
22
|
-
import { F as
|
|
23
|
-
import { B as
|
|
22
|
+
import { F as Ut, E as Bt } from "./error-message.KTNWtFyf.js";
|
|
23
|
+
import { B as Pt, c as Nt } from "./button-actions.WnxN4KnV.js";
|
|
24
24
|
import "../assets/date-range-picker.css";
|
|
25
25
|
function et(e, a) {
|
|
26
|
-
|
|
27
|
-
var s =
|
|
26
|
+
M(2, arguments);
|
|
27
|
+
var s = De(a), i = s * 3;
|
|
28
28
|
return Ze(e, i);
|
|
29
29
|
}
|
|
30
30
|
function Le(e) {
|
|
31
|
-
|
|
32
|
-
var a =
|
|
31
|
+
M(1, arguments);
|
|
32
|
+
var a = J(e), s = Math.floor(a.getMonth() / 3) + 1;
|
|
33
33
|
return s;
|
|
34
34
|
}
|
|
35
35
|
function Ye(e) {
|
|
36
|
-
return
|
|
36
|
+
return M(1, arguments), J(e).getFullYear();
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
var s =
|
|
38
|
+
function qt(e, a) {
|
|
39
|
+
M(2, arguments);
|
|
40
|
+
var s = J(e), i = J(a);
|
|
41
41
|
return s.getTime() === i.getTime();
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
|
|
45
|
-
var s =
|
|
43
|
+
function $t(e, a) {
|
|
44
|
+
M(2, arguments);
|
|
45
|
+
var s = me(e), i = me(a);
|
|
46
46
|
return s.getTime() === i.getTime();
|
|
47
47
|
}
|
|
48
48
|
function Ve(e) {
|
|
49
|
-
|
|
50
|
-
var a =
|
|
49
|
+
M(1, arguments);
|
|
50
|
+
var a = J(e);
|
|
51
51
|
return a.setMilliseconds(0), a;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
|
|
53
|
+
function Ke(e, a) {
|
|
54
|
+
M(2, arguments);
|
|
55
55
|
var s = Ve(e), i = Ve(a);
|
|
56
56
|
return s.getTime() === i.getTime();
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
return
|
|
58
|
+
function Lt(e) {
|
|
59
|
+
return M(1, arguments), V(e, Date.now());
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
|
|
63
|
-
var s =
|
|
61
|
+
function Yt(e, a) {
|
|
62
|
+
M(2, arguments);
|
|
63
|
+
var s = J(e), i = De(a);
|
|
64
64
|
return s.setHours(i), s;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
|
|
68
|
-
var s =
|
|
66
|
+
function Vt(e, a) {
|
|
67
|
+
M(2, arguments);
|
|
68
|
+
var s = J(e), i = De(a);
|
|
69
69
|
return s.setMinutes(i), s;
|
|
70
70
|
}
|
|
71
71
|
function Kt(e, a) {
|
|
72
|
-
|
|
73
|
-
var s =
|
|
72
|
+
M(2, arguments);
|
|
73
|
+
var s = J(e), i = De(a);
|
|
74
74
|
return s.setSeconds(i), s;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
|
|
78
|
-
var s =
|
|
76
|
+
function Gt(e, a) {
|
|
77
|
+
M(2, arguments);
|
|
78
|
+
var s = De(a);
|
|
79
79
|
return et(e, -s);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function oe(e) {
|
|
82
82
|
if (e == null)
|
|
83
|
-
return
|
|
83
|
+
return ie(/* @__PURE__ */ new Date());
|
|
84
84
|
const [a, s, i] = e.split("-").map((l) => parseInt(l, 10));
|
|
85
85
|
return new Date(a, s - 1, i);
|
|
86
86
|
}
|
|
87
|
-
const
|
|
87
|
+
const jt = ({
|
|
88
88
|
firstDayOfWeek: e,
|
|
89
89
|
min: a,
|
|
90
90
|
max: s
|
|
91
91
|
}) => ({ getGranularCalendarLimits: (l) => {
|
|
92
|
-
let
|
|
92
|
+
let m = ie(a), c = re(s);
|
|
93
93
|
if ((l == null ? void 0 : l.type) === "weekly") {
|
|
94
94
|
if (l.earliest)
|
|
95
|
-
|
|
95
|
+
m = ie(l.earliest);
|
|
96
96
|
else {
|
|
97
|
-
const n = Ue(
|
|
98
|
-
|
|
97
|
+
const n = Ue(m, { weekStartsOn: e });
|
|
98
|
+
V(m, n) || (m = ie(St(Be(m, { weekStartsOn: e }), 1)));
|
|
99
99
|
}
|
|
100
100
|
if (l.latest)
|
|
101
|
-
|
|
101
|
+
c = re(l.latest);
|
|
102
102
|
else {
|
|
103
|
-
const n = Be(
|
|
104
|
-
|
|
103
|
+
const n = Be(c, { weekStartsOn: e });
|
|
104
|
+
V(c, n) || (c = re(kt(Ue(c, { weekStartsOn: e }), 1)));
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
if ((l == null ? void 0 : l.type) === "monthly") {
|
|
108
108
|
if (l.earliest)
|
|
109
|
-
|
|
109
|
+
m = ie(l.earliest);
|
|
110
110
|
else {
|
|
111
|
-
const n = Pe(
|
|
112
|
-
|
|
111
|
+
const n = Pe(m);
|
|
112
|
+
V(m, n) || (m = Pe(Ze(m, 1)));
|
|
113
113
|
}
|
|
114
114
|
if (l.latest)
|
|
115
|
-
|
|
115
|
+
c = re(l.latest);
|
|
116
116
|
else {
|
|
117
|
-
const n = $e(
|
|
118
|
-
|
|
117
|
+
const n = $e(c);
|
|
118
|
+
V(c, n) || (c = $e(Et(c, 1)));
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
if ((l == null ? void 0 : l.type) === "quarterly") {
|
|
122
122
|
if (l.earliest)
|
|
123
|
-
|
|
123
|
+
m = me(l.earliest);
|
|
124
124
|
else {
|
|
125
|
-
const n =
|
|
126
|
-
|
|
125
|
+
const n = me(m);
|
|
126
|
+
V(m, n) || (m = me(et(m, 1)));
|
|
127
127
|
}
|
|
128
128
|
if (l.latest)
|
|
129
|
-
|
|
129
|
+
c = re(l.latest);
|
|
130
130
|
else {
|
|
131
|
-
const n = Ne(
|
|
132
|
-
|
|
131
|
+
const n = Ne(c);
|
|
132
|
+
V(c, n) || (c = Ne(Gt(c, 1)));
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
return { min:
|
|
136
|
-
} }),
|
|
137
|
-
const e =
|
|
135
|
+
return { min: m, max: c };
|
|
136
|
+
} }), Qt = () => {
|
|
137
|
+
const e = be({
|
|
138
138
|
daily: null,
|
|
139
139
|
weekly: null,
|
|
140
140
|
monthly: null,
|
|
@@ -151,18 +151,18 @@ const Gt = ({
|
|
|
151
151
|
};
|
|
152
152
|
};
|
|
153
153
|
var g = /* @__PURE__ */ ((e) => (e.CUSTOM_RANGE = "custom-range", e.INPUT = "input", e.ERROR = "error", e.FORM_DATE = "form-date", e.START_DATE_SELECTED = "start-date-selected", e))(g || {});
|
|
154
|
-
const
|
|
155
|
-
const { selectionStart: a } = e.target, s =
|
|
154
|
+
const Ht = /[\d]/, Wt = /^\d{2}$/, zt = /^\d{2}:\d{2}$/, Jt = (e) => {
|
|
155
|
+
const { selectionStart: a } = e.target, s = Ht.test(e.key) || e.key === "Backspace" || e.key === "Tab", i = [1, 2, 4, 5].includes(a) && e.key === ":";
|
|
156
156
|
!s && !i && e.preventDefault();
|
|
157
|
-
},
|
|
157
|
+
}, Ge = (e) => {
|
|
158
158
|
if (!e)
|
|
159
159
|
return e;
|
|
160
160
|
let a = e;
|
|
161
161
|
if (a.length === 1 && parseInt(e, 10) > 2)
|
|
162
162
|
return `0${a}:`;
|
|
163
163
|
const [s, i] = a.slice(-2);
|
|
164
|
-
return [2, 5].includes(a.length) && i === ":" && (a = `${a.slice(0, a.length - 2)}0${s}`), (
|
|
165
|
-
},
|
|
164
|
+
return [2, 5].includes(a.length) && i === ":" && (a = `${a.slice(0, a.length - 2)}0${s}`), (Wt.test(a) || zt.test(a)) && (a += ":"), a;
|
|
165
|
+
}, je = {
|
|
166
166
|
"en-US": {
|
|
167
167
|
customRange: "Custom range",
|
|
168
168
|
daily: "Daily",
|
|
@@ -193,15 +193,15 @@ const Wt = /[\d]/, zt = /^\d{2}$/, Jt = /^\d{2}:\d{2}$/, Xt = (e) => {
|
|
|
193
193
|
monthly: "Mensal",
|
|
194
194
|
weekly: "Semanal"
|
|
195
195
|
}
|
|
196
|
-
},
|
|
197
|
-
i18n: { messages:
|
|
196
|
+
}, Qe = 300, He = "customRange", Xt = ze({
|
|
197
|
+
i18n: { messages: je },
|
|
198
198
|
name: "date-range-picker-calendar",
|
|
199
199
|
components: {
|
|
200
|
-
BentoDropdown:
|
|
201
|
-
BentoInputField:
|
|
202
|
-
BentoSegmentedControl:
|
|
200
|
+
BentoDropdown: At,
|
|
201
|
+
BentoInputField: Ct,
|
|
202
|
+
BentoSegmentedControl: Ft,
|
|
203
203
|
BentoTypography: Xe,
|
|
204
|
-
Calendar:
|
|
204
|
+
Calendar: z
|
|
205
205
|
},
|
|
206
206
|
props: {
|
|
207
207
|
/**
|
|
@@ -218,7 +218,7 @@ const Wt = /[\d]/, zt = /^\d{2}$/, Jt = /^\d{2}:\d{2}$/, Xt = (e) => {
|
|
|
218
218
|
/**
|
|
219
219
|
* Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
|
|
220
220
|
*/
|
|
221
|
-
firstDayOfWeek:
|
|
221
|
+
firstDayOfWeek: z.props.firstDayOfWeek,
|
|
222
222
|
/**
|
|
223
223
|
* A list of available granularities.
|
|
224
224
|
* If present, the date picker will display a segmented control to change granularity.
|
|
@@ -230,23 +230,23 @@ const Wt = /[\d]/, zt = /^\d{2}$/, Jt = /^\d{2}:\d{2}$/, Xt = (e) => {
|
|
|
230
230
|
/**
|
|
231
231
|
* Indicate if a date should be disabled or not
|
|
232
232
|
*/
|
|
233
|
-
isDateDisabled:
|
|
233
|
+
isDateDisabled: z.props.isDateDisabled,
|
|
234
234
|
/**
|
|
235
235
|
* Set a maximum number of dates to be selectable by the range.
|
|
236
236
|
*/
|
|
237
|
-
maxRange:
|
|
237
|
+
maxRange: z.props.maxRange,
|
|
238
238
|
/**
|
|
239
239
|
* Sets a minimum limit for selectable dates - dates before `min` will not be selectable
|
|
240
240
|
*/
|
|
241
|
-
min:
|
|
241
|
+
min: z.props.min,
|
|
242
242
|
/**
|
|
243
243
|
* Sets a maximum limit for selectable dates - dates after `max` will not be selectable
|
|
244
244
|
*/
|
|
245
|
-
max:
|
|
245
|
+
max: z.props.max,
|
|
246
246
|
/**
|
|
247
247
|
* Number of months rendered on pane
|
|
248
248
|
*/
|
|
249
|
-
numberOfMonths:
|
|
249
|
+
numberOfMonths: z.props.numberOfMonths,
|
|
250
250
|
/**
|
|
251
251
|
* Displays the end date's month when the calendar is opened. Defaults to false i.e. the start date's month is displayed.
|
|
252
252
|
*/
|
|
@@ -269,7 +269,7 @@ const Wt = /[\d]/, zt = /^\d{2}$/, Jt = /^\d{2}:\d{2}$/, Xt = (e) => {
|
|
|
269
269
|
/**
|
|
270
270
|
* The type of calendar to display. Defaults to showing days.
|
|
271
271
|
*/
|
|
272
|
-
variant:
|
|
272
|
+
variant: z.props.variant
|
|
273
273
|
},
|
|
274
274
|
emits: [
|
|
275
275
|
g.CUSTOM_RANGE,
|
|
@@ -280,156 +280,153 @@ const Wt = /[\d]/, zt = /^\d{2}$/, Jt = /^\d{2}:\d{2}$/, Xt = (e) => {
|
|
|
280
280
|
],
|
|
281
281
|
setup(e, { emit: a, slots: s }) {
|
|
282
282
|
var Me, Ce, Ae, Fe;
|
|
283
|
-
const { locale: i, t: l } = Oe({ messages:
|
|
283
|
+
const { locale: i, t: l } = Oe({ messages: je }), m = we(), c = b(() => e.variant === "month" ? "monthly" : "daily"), n = be({
|
|
284
284
|
startDate: (Me = e.value) == null ? void 0 : Me.startDate,
|
|
285
285
|
endDate: (Ce = e.value) == null ? void 0 : Ce.endDate,
|
|
286
286
|
range: (Ae = e.value) == null ? void 0 : Ae.range,
|
|
287
287
|
...e.granularities ? {
|
|
288
|
-
granularity: ((Fe = e.value) == null ? void 0 : Fe.granularity) ||
|
|
288
|
+
granularity: ((Fe = e.value) == null ? void 0 : Fe.granularity) || c.value
|
|
289
289
|
} : {}
|
|
290
290
|
});
|
|
291
291
|
function p(t) {
|
|
292
|
-
return new Date(
|
|
292
|
+
return t ? new Date(
|
|
293
293
|
t.getUTCFullYear(),
|
|
294
294
|
t.getUTCMonth(),
|
|
295
295
|
t.getUTCDate(),
|
|
296
296
|
t.getUTCHours(),
|
|
297
297
|
t.getUTCMinutes(),
|
|
298
298
|
t.getUTCSeconds()
|
|
299
|
-
);
|
|
299
|
+
) : null;
|
|
300
300
|
}
|
|
301
|
-
const v =
|
|
302
|
-
var t,
|
|
301
|
+
const v = b(() => {
|
|
302
|
+
var t, o;
|
|
303
303
|
return (
|
|
304
304
|
// eslint-disable-next-line consistent-return
|
|
305
|
-
((
|
|
305
|
+
((o = (t = e == null ? void 0 : e.quickSelectRanges) == null ? void 0 : t.find(({ value: u, data: d }) => {
|
|
306
306
|
if (!d.endDate)
|
|
307
|
-
return u === n.range ||
|
|
307
|
+
return u === n.range || qt(
|
|
308
308
|
p(d.startDate),
|
|
309
309
|
p(n.startDate)
|
|
310
|
-
) &&
|
|
310
|
+
) && Lt(n.endDate);
|
|
311
311
|
if (e.allowTimeInput)
|
|
312
|
-
return
|
|
312
|
+
return Ke(
|
|
313
313
|
p(d.startDate),
|
|
314
314
|
p(n.startDate)
|
|
315
|
-
) &&
|
|
315
|
+
) && Ke(p(d.endDate), p(n.endDate));
|
|
316
316
|
if (d.endDate)
|
|
317
|
-
return
|
|
318
|
-
})) == null ? void 0 :
|
|
317
|
+
return V(d.startDate, n.startDate) && V(d.endDate, n.endDate);
|
|
318
|
+
})) == null ? void 0 : o.value) ?? He
|
|
319
319
|
);
|
|
320
|
-
}),
|
|
320
|
+
}), j = b(() => ({
|
|
321
321
|
"b-date-range-picker-calendar__form-input-wrapper": e.allowTimeInput
|
|
322
|
-
})),
|
|
322
|
+
})), T = b(() => [
|
|
323
323
|
{ label: l("customRange"), value: He },
|
|
324
|
-
...
|
|
325
|
-
]),
|
|
324
|
+
...e.quickSelectRanges ? e.quickSelectRanges : []
|
|
325
|
+
]), C = b(
|
|
326
326
|
() => {
|
|
327
327
|
var t;
|
|
328
|
-
return ((t = e.granularities) == null ? void 0 : t.find(({ type:
|
|
328
|
+
return ((t = e.granularities) == null ? void 0 : t.find(({ type: o }) => o === n.granularity)) || null;
|
|
329
329
|
}
|
|
330
|
-
), I =
|
|
330
|
+
), I = b(
|
|
331
331
|
() => {
|
|
332
332
|
var t;
|
|
333
|
-
return ((t = e.granularities) == null ? void 0 : t.map(({ type:
|
|
334
|
-
label: l(
|
|
335
|
-
value:
|
|
333
|
+
return ((t = e.granularities) == null ? void 0 : t.map(({ type: o, disabled: u }) => ({
|
|
334
|
+
label: l(o),
|
|
335
|
+
value: o,
|
|
336
336
|
disabled: u
|
|
337
337
|
}))) ?? [];
|
|
338
338
|
}
|
|
339
|
-
),
|
|
340
|
-
() => e.
|
|
341
|
-
...t,
|
|
342
|
-
data: {
|
|
343
|
-
...t.data,
|
|
344
|
-
// Adding timeDifference to calculate an up-to-date endDate on range selection
|
|
345
|
-
timeDifference: t.data.endDate ? void 0 : new Date(Date.now()).getTime() - t.data.startDate.getTime()
|
|
346
|
-
}
|
|
347
|
-
}))
|
|
348
|
-
), { getGranularCalendarLimits: P } = Gt(e), f = T(
|
|
349
|
-
() => e.granularities ? P(M.value) : { min: oe(e.min), max: G(e.max) }
|
|
339
|
+
), { getGranularCalendarLimits: Q } = jt(e), f = b(
|
|
340
|
+
() => e.granularities ? Q(C.value) : { min: ie(e.min), max: re(e.max) }
|
|
350
341
|
), {
|
|
351
|
-
adjustDateForQuarterly:
|
|
352
|
-
adjustDateForMonthly:
|
|
353
|
-
adjustDateForWeekly:
|
|
354
|
-
adjustStartDateInputForWeekly:
|
|
355
|
-
adjustEndDateInputForWeekly:
|
|
356
|
-
adjustStartDateInputForMonthly:
|
|
357
|
-
adjustEndDateInputForMonthly:
|
|
358
|
-
adjustStartDateInputForQuarterly:
|
|
359
|
-
adjustEndDateInputForQuarterly:
|
|
360
|
-
} =
|
|
361
|
-
locale:
|
|
362
|
-
}) : "",
|
|
363
|
-
locale:
|
|
364
|
-
}) : "",
|
|
342
|
+
adjustDateForQuarterly: A,
|
|
343
|
+
adjustDateForMonthly: X,
|
|
344
|
+
adjustDateForWeekly: P,
|
|
345
|
+
adjustStartDateInputForWeekly: y,
|
|
346
|
+
adjustEndDateInputForWeekly: B,
|
|
347
|
+
adjustStartDateInputForMonthly: N,
|
|
348
|
+
adjustEndDateInputForMonthly: F,
|
|
349
|
+
adjustStartDateInputForQuarterly: ue,
|
|
350
|
+
adjustEndDateInputForQuarterly: fe
|
|
351
|
+
} = ht(e.firstDayOfWeek), { savedRanges: q, saveRange: H, resetSavedRanges: Z } = Qt(), S = (t) => t ? ce(t, h.NUMERIC_DATE_YEAR_FIRST, {
|
|
352
|
+
locale: m[i.value.substring(0, 2)] || m.enUS
|
|
353
|
+
}) : "", se = (t) => t ? ce(t, h.HOUR_MINUTE_SECONDS, {
|
|
354
|
+
locale: m[i.value.substring(0, 2)] || m.enUS
|
|
355
|
+
}) : "", W = _(!1), x = _(!1), ee = _(!1), te = _(!1), r = be({
|
|
365
356
|
startDate: e.dateFormData.startDate,
|
|
366
357
|
endDate: e.dateFormData.endDate,
|
|
367
358
|
startTime: e.dateFormData.startTime,
|
|
368
359
|
endTime: e.dateFormData.endTime
|
|
369
|
-
}),
|
|
370
|
-
if (!
|
|
360
|
+
}), pe = (t) => /^(?:[01]\d|2[01234]):(?:[012345]\d):(?:[012345]\d)$/.test(t), w = (t, o) => {
|
|
361
|
+
if (!o || !pe(o) || e.variant === "month")
|
|
371
362
|
return t;
|
|
372
363
|
let u = new Date(t);
|
|
373
|
-
const [d, k,
|
|
374
|
-
return u =
|
|
375
|
-
},
|
|
376
|
-
n.startDate =
|
|
364
|
+
const [d, k, ae] = o.split(":");
|
|
365
|
+
return u = Yt(u, parseInt(d, 10)), u = Vt(u, parseInt(k, 10)), u = Kt(u, parseInt(ae, 10)), u;
|
|
366
|
+
}, D = (t) => {
|
|
367
|
+
n.startDate = w(t.startDate, r.startTime), n.endDate = w(t.endDate, r.endTime), n.range = null, e.granularities && Z(), a(g.INPUT, {
|
|
377
368
|
...n,
|
|
378
369
|
range: v.value
|
|
379
370
|
});
|
|
380
|
-
},
|
|
381
|
-
const
|
|
382
|
-
return /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(t) &&
|
|
371
|
+
}, R = (t) => {
|
|
372
|
+
const o = (d) => e.min && d <= e.min || e.max && d >= e.max ? !1 : e.isDateDisabled ? !e.isDateDisabled(d) : !0;
|
|
373
|
+
return /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(t) && o(new Date(t));
|
|
383
374
|
};
|
|
384
375
|
Je(() => {
|
|
385
|
-
e.dateFormData.startDate && !
|
|
376
|
+
e.dateFormData.startDate && !R(e.dateFormData.startDate) ? W.value = !0 : (W.value = !1, ee.value = !1), e.dateFormData.endDate && !R(e.dateFormData.endDate) ? x.value = !0 : (x.value = !1, te.value = !1);
|
|
386
377
|
});
|
|
387
|
-
const
|
|
388
|
-
var
|
|
389
|
-
|
|
390
|
-
},
|
|
391
|
-
var
|
|
392
|
-
|
|
393
|
-
},
|
|
394
|
-
const
|
|
395
|
-
if (
|
|
396
|
-
return
|
|
397
|
-
if (e.dateFormData[t] &&
|
|
378
|
+
const le = (t) => {
|
|
379
|
+
var o;
|
|
380
|
+
r.startDate = S(t), r.startTime ? ee.value && (r.startTime = (o = e.dateFormData) == null ? void 0 : o.startTime) : r.startTime = se(t), W.value = !1, ee.value = !1, a(g.START_DATE_SELECTED, t);
|
|
381
|
+
}, Ie = (t) => {
|
|
382
|
+
var o;
|
|
383
|
+
r.endDate = S(t), r.endTime ? te.value && (r.endTime = (o = e.dateFormData) == null ? void 0 : o.endTime) : r.endTime = se(re(t)), x.value = !1, te.value = !1;
|
|
384
|
+
}, ve = (t) => {
|
|
385
|
+
const o = e.value[t];
|
|
386
|
+
if (o)
|
|
387
|
+
return o;
|
|
388
|
+
if (e.dateFormData[t] && R(e.dateFormData[t]))
|
|
398
389
|
return new Date(e.dateFormData[t]);
|
|
399
|
-
},
|
|
400
|
-
var
|
|
401
|
-
if (
|
|
390
|
+
}, tt = ye((t) => {
|
|
391
|
+
var o;
|
|
392
|
+
if (R(t)) {
|
|
402
393
|
let u = t;
|
|
403
|
-
switch (
|
|
394
|
+
switch (W.value = !1, (o = C.value) == null ? void 0 : o.type) {
|
|
404
395
|
case "weekly":
|
|
405
|
-
u =
|
|
396
|
+
u = y(
|
|
406
397
|
t,
|
|
407
|
-
|
|
398
|
+
S,
|
|
408
399
|
f.value.min,
|
|
409
400
|
f.value.max
|
|
410
|
-
),
|
|
401
|
+
), r.startDate = u;
|
|
411
402
|
break;
|
|
412
403
|
case "monthly":
|
|
413
|
-
u =
|
|
404
|
+
u = N(
|
|
414
405
|
t,
|
|
415
|
-
|
|
406
|
+
S,
|
|
416
407
|
f.value.min,
|
|
417
408
|
f.value.max
|
|
418
|
-
),
|
|
409
|
+
), r.startDate = u;
|
|
419
410
|
break;
|
|
420
411
|
case "quarterly":
|
|
421
|
-
u =
|
|
412
|
+
u = ue(
|
|
422
413
|
t,
|
|
423
|
-
|
|
414
|
+
S,
|
|
424
415
|
f.value.min,
|
|
425
416
|
f.value.max
|
|
426
|
-
),
|
|
417
|
+
), r.startDate = u;
|
|
427
418
|
break;
|
|
428
419
|
}
|
|
429
|
-
const d =
|
|
430
|
-
n.startDate =
|
|
431
|
-
|
|
432
|
-
|
|
420
|
+
const d = oe(u);
|
|
421
|
+
n.startDate = w(d, r.startTime), n.endDate = w(
|
|
422
|
+
oe(r.endDate),
|
|
423
|
+
r.endTime
|
|
424
|
+
), R(r.endDate) && (n.endDate = w(
|
|
425
|
+
oe(r.endDate),
|
|
426
|
+
r.endTime
|
|
427
|
+
));
|
|
428
|
+
const k = ve("endDate");
|
|
429
|
+
n.range = null, a(g.FORM_DATE, {
|
|
433
430
|
startDate: d,
|
|
434
431
|
endDate: k
|
|
435
432
|
}), a(g.INPUT, {
|
|
@@ -437,43 +434,46 @@ const Wt = /[\d]/, zt = /^\d{2}$/, Jt = /^\d{2}:\d{2}$/, Xt = (e) => {
|
|
|
437
434
|
range: v.value
|
|
438
435
|
});
|
|
439
436
|
} else
|
|
440
|
-
|
|
441
|
-
},
|
|
442
|
-
|
|
443
|
-
},
|
|
444
|
-
var
|
|
445
|
-
if (
|
|
437
|
+
W.value = !0, a(g.ERROR, { ...r });
|
|
438
|
+
}, Qe), at = (t) => {
|
|
439
|
+
r.startDate = qe(t), tt(r.startDate);
|
|
440
|
+
}, nt = ye((t) => {
|
|
441
|
+
var o;
|
|
442
|
+
if (R(t)) {
|
|
446
443
|
let u = t;
|
|
447
|
-
switch (
|
|
444
|
+
switch (x.value = !1, (o = C.value) == null ? void 0 : o.type) {
|
|
448
445
|
case "weekly":
|
|
449
|
-
u =
|
|
446
|
+
u = B(
|
|
450
447
|
t,
|
|
451
|
-
|
|
448
|
+
S,
|
|
452
449
|
f.value.min,
|
|
453
450
|
f.value.max
|
|
454
|
-
),
|
|
451
|
+
), r.endDate = u;
|
|
455
452
|
break;
|
|
456
453
|
case "monthly":
|
|
457
|
-
u =
|
|
454
|
+
u = F(
|
|
458
455
|
t,
|
|
459
|
-
|
|
456
|
+
S,
|
|
460
457
|
f.value.min,
|
|
461
458
|
f.value.max
|
|
462
|
-
),
|
|
459
|
+
), r.endDate = u;
|
|
463
460
|
break;
|
|
464
461
|
case "quarterly":
|
|
465
|
-
u =
|
|
462
|
+
u = fe(
|
|
466
463
|
t,
|
|
467
|
-
|
|
464
|
+
S,
|
|
468
465
|
f.value.min,
|
|
469
466
|
f.value.max
|
|
470
|
-
),
|
|
467
|
+
), r.endDate = u;
|
|
471
468
|
break;
|
|
472
469
|
}
|
|
473
|
-
const d =
|
|
474
|
-
n.endDate =
|
|
475
|
-
|
|
476
|
-
|
|
470
|
+
const d = oe(u);
|
|
471
|
+
n.endDate = w(d, r.endTime), R(r.startDate) && (n.startDate = w(
|
|
472
|
+
oe(r.startDate),
|
|
473
|
+
r.startTime
|
|
474
|
+
));
|
|
475
|
+
const k = ve("startDate");
|
|
476
|
+
n.range = null, a(g.FORM_DATE, {
|
|
477
477
|
startDate: k,
|
|
478
478
|
endDate: d
|
|
479
479
|
}), a(g.INPUT, {
|
|
@@ -481,18 +481,18 @@ const Wt = /[\d]/, zt = /^\d{2}$/, Jt = /^\d{2}:\d{2}$/, Xt = (e) => {
|
|
|
481
481
|
range: v.value
|
|
482
482
|
});
|
|
483
483
|
} else
|
|
484
|
-
|
|
485
|
-
},
|
|
486
|
-
|
|
487
|
-
},
|
|
488
|
-
|
|
489
|
-
},
|
|
490
|
-
if (
|
|
491
|
-
|
|
492
|
-
const
|
|
484
|
+
x.value = !0, a(g.ERROR, { ...r });
|
|
485
|
+
}, Qe), rt = (t) => {
|
|
486
|
+
r.endDate = qe(t), nt(r.endDate);
|
|
487
|
+
}, ot = (t) => {
|
|
488
|
+
wt(t);
|
|
489
|
+
}, st = ye((t) => {
|
|
490
|
+
if (pe(t)) {
|
|
491
|
+
ee.value = !1, n.startDate = w(n.startDate, t);
|
|
492
|
+
const o = ve("endDate");
|
|
493
493
|
a(g.FORM_DATE, {
|
|
494
494
|
startDate: new Date(n.startDate),
|
|
495
|
-
endDate:
|
|
495
|
+
endDate: o,
|
|
496
496
|
startTime: t,
|
|
497
497
|
endTime: e.dateFormData.endTime
|
|
498
498
|
}), a(g.INPUT, {
|
|
@@ -500,13 +500,13 @@ const Wt = /[\d]/, zt = /^\d{2}$/, Jt = /^\d{2}:\d{2}$/, Xt = (e) => {
|
|
|
500
500
|
range: v.value
|
|
501
501
|
});
|
|
502
502
|
} else
|
|
503
|
-
|
|
504
|
-
}),
|
|
505
|
-
if (
|
|
506
|
-
|
|
507
|
-
const
|
|
508
|
-
n.startDate =
|
|
509
|
-
startDate:
|
|
503
|
+
ee.value = !0, a(g.ERROR, { ...r });
|
|
504
|
+
}), lt = ye((t) => {
|
|
505
|
+
if (pe(t)) {
|
|
506
|
+
te.value = !1, n.endDate = w(n.endDate, t);
|
|
507
|
+
const o = ve("startDate");
|
|
508
|
+
n.startDate = w(new Date(o), e.dateFormData.startTime), a(g.FORM_DATE, {
|
|
509
|
+
startDate: w(new Date(o), e.dateFormData.startTime),
|
|
510
510
|
endDate: new Date(n.endDate),
|
|
511
511
|
startTime: e.dateFormData.startTime,
|
|
512
512
|
endTime: t
|
|
@@ -515,57 +515,57 @@ const Wt = /[\d]/, zt = /^\d{2}$/, Jt = /^\d{2}:\d{2}$/, Xt = (e) => {
|
|
|
515
515
|
range: v.value
|
|
516
516
|
});
|
|
517
517
|
} else
|
|
518
|
-
|
|
519
|
-
}),
|
|
520
|
-
|
|
518
|
+
te.value = !0, a(g.ERROR, { ...r });
|
|
519
|
+
}), it = (t) => {
|
|
520
|
+
r.startTime = Ge(t), st(r.startTime);
|
|
521
|
+
}, ut = (t) => {
|
|
522
|
+
r.endTime = Ge(t), lt(r.endTime);
|
|
521
523
|
}, dt = (t) => {
|
|
522
|
-
|
|
524
|
+
Jt(t);
|
|
525
|
+
}, ge = (t, o, u, d) => {
|
|
526
|
+
n.startDate = t, n.endDate = o, u && (n.granularity = u), d && (n.range = d);
|
|
523
527
|
}, mt = (t) => {
|
|
524
|
-
Xt(t);
|
|
525
|
-
}, ve = (t, r, u, d) => {
|
|
526
|
-
n.startDate = t, n.endDate = r, u && (n.granularity = u), d && (n.range = d);
|
|
527
|
-
}, ct = (t) => {
|
|
528
528
|
var u;
|
|
529
|
-
const
|
|
530
|
-
if (
|
|
531
|
-
|
|
532
|
-
const d =
|
|
533
|
-
|
|
534
|
-
...
|
|
535
|
-
startDate:
|
|
529
|
+
const o = (u = e.quickSelectRanges) == null ? void 0 : u.find(({ value: d }) => d === t);
|
|
530
|
+
if (o) {
|
|
531
|
+
Z();
|
|
532
|
+
const d = o.data, k = d.endDate || new Date(Date.now()), ae = d.timeDifference ? new Date(k.getTime() - d.timeDifference) : d.startDate;
|
|
533
|
+
r.endDate = S(k), r.startDate = S(ae), ge(ae, k, null, t), e.granularities && (n.granularity = d.granularity || c.value), r.startTime = se(ae), r.endTime = se(k), n.endDate = k, n.startDate = ae, a(g.CUSTOM_RANGE, {
|
|
534
|
+
...o.data,
|
|
535
|
+
startDate: ae,
|
|
536
536
|
endDate: k,
|
|
537
|
-
range:
|
|
537
|
+
range: o.value
|
|
538
538
|
});
|
|
539
539
|
}
|
|
540
|
-
},
|
|
541
|
-
weekly:
|
|
542
|
-
monthly:
|
|
543
|
-
quarterly:
|
|
544
|
-
},
|
|
545
|
-
const
|
|
546
|
-
if (n.granularity = t,
|
|
540
|
+
}, ct = {
|
|
541
|
+
weekly: P,
|
|
542
|
+
monthly: X,
|
|
543
|
+
quarterly: A
|
|
544
|
+
}, Dt = (t) => {
|
|
545
|
+
const o = n.granularity;
|
|
546
|
+
if (n.granularity = t, o && H(o, structuredClone(ke(n))), n.startDate && n.endDate) {
|
|
547
547
|
switch (t) {
|
|
548
548
|
case "quarterly":
|
|
549
549
|
case "monthly":
|
|
550
550
|
case "weekly": {
|
|
551
|
-
if (
|
|
552
|
-
|
|
551
|
+
if (q[t]) {
|
|
552
|
+
ge(q[t].startDate, q[t].endDate, t);
|
|
553
553
|
break;
|
|
554
554
|
}
|
|
555
|
-
const { startDate: u, endDate: d } =
|
|
555
|
+
const { startDate: u, endDate: d } = ct[t](
|
|
556
556
|
n.startDate,
|
|
557
557
|
n.endDate,
|
|
558
558
|
f.value.min,
|
|
559
559
|
f.value.max
|
|
560
560
|
);
|
|
561
|
-
|
|
561
|
+
ge(u, d, t);
|
|
562
562
|
break;
|
|
563
563
|
}
|
|
564
564
|
case "daily":
|
|
565
|
-
|
|
565
|
+
q.daily && ge(q.daily.startDate, q.daily.endDate, t);
|
|
566
566
|
break;
|
|
567
567
|
}
|
|
568
|
-
|
|
568
|
+
r.startDate = S(n.startDate), r.endDate = S(n.endDate), a(g.INPUT, {
|
|
569
569
|
...n,
|
|
570
570
|
range: v.value
|
|
571
571
|
});
|
|
@@ -574,71 +574,70 @@ const Wt = /[\d]/, zt = /^\d{2}$/, Jt = /^\d{2}:\d{2}$/, Xt = (e) => {
|
|
|
574
574
|
return {
|
|
575
575
|
// Values
|
|
576
576
|
internalRangeDate: n,
|
|
577
|
-
dateTextInput:
|
|
578
|
-
endDateError:
|
|
579
|
-
endTimeError:
|
|
577
|
+
dateTextInput: r,
|
|
578
|
+
endDateError: x,
|
|
579
|
+
endTimeError: te,
|
|
580
580
|
granularityItems: I,
|
|
581
|
-
selectedGranularity:
|
|
581
|
+
selectedGranularity: C,
|
|
582
582
|
computedMinMax: f,
|
|
583
583
|
selectedRangeSelectorValue: v,
|
|
584
|
-
startDateError:
|
|
585
|
-
startTimeError:
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
formInputWrapperConditionalClasses: H,
|
|
584
|
+
startDateError: W,
|
|
585
|
+
startTimeError: ee,
|
|
586
|
+
quickSelectRangeDefaultItems: T,
|
|
587
|
+
formInputWrapperConditionalClasses: j,
|
|
589
588
|
// Methods
|
|
590
|
-
hasSlot:
|
|
589
|
+
hasSlot: _t(s),
|
|
591
590
|
t: l,
|
|
592
591
|
// Events
|
|
593
|
-
onDateInput:
|
|
594
|
-
onDateInputKeyDown:
|
|
595
|
-
onEndDateInput:
|
|
596
|
-
onEndDateSelected:
|
|
597
|
-
onEndTimeInput:
|
|
598
|
-
onGranularityInput:
|
|
599
|
-
onRangeSelectorInput:
|
|
600
|
-
onStartDateInput:
|
|
601
|
-
onStartDateSelected:
|
|
602
|
-
onStartTimeInput:
|
|
603
|
-
onTimeInputKeyDown:
|
|
592
|
+
onDateInput: D,
|
|
593
|
+
onDateInputKeyDown: ot,
|
|
594
|
+
onEndDateInput: rt,
|
|
595
|
+
onEndDateSelected: Ie,
|
|
596
|
+
onEndTimeInput: ut,
|
|
597
|
+
onGranularityInput: Dt,
|
|
598
|
+
onRangeSelectorInput: mt,
|
|
599
|
+
onStartDateInput: at,
|
|
600
|
+
onStartDateSelected: le,
|
|
601
|
+
onStartTimeInput: it,
|
|
602
|
+
onTimeInputKeyDown: dt
|
|
604
603
|
};
|
|
605
604
|
}
|
|
606
|
-
}),
|
|
607
|
-
function
|
|
608
|
-
const
|
|
609
|
-
return
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
e.hasSlot("title") ? _e(e.$slots, "title", { key: 0 }, void 0, !0) :
|
|
613
|
-
e.
|
|
605
|
+
}), Zt = { class: "b-date-range-picker-calendar" }, xt = { class: "b-date-range-picker-calendar__form-container" }, ea = { class: "b-date-range-picker-calendar__form" }, ta = { key: 0 }, aa = { class: "b-date-range-picker-calendar__calendars-container" };
|
|
606
|
+
function na(e, a, s, i, l, m) {
|
|
607
|
+
const c = E("bento-dropdown"), n = E("bento-segmented-control"), p = E("bento-typography"), v = E("bento-input-field"), j = E("calendar");
|
|
608
|
+
return O(), Ee("div", Zt, [
|
|
609
|
+
L("div", xt, [
|
|
610
|
+
L("div", ea, [
|
|
611
|
+
e.hasSlot("title") ? _e(e.$slots, "title", { key: 0 }, void 0, !0) : U("", !0),
|
|
612
|
+
e.quickSelectRanges ? (O(), K(c, {
|
|
614
613
|
key: 1,
|
|
615
614
|
"aria-label": e.t("customRange"),
|
|
616
615
|
items: e.quickSelectRangeDefaultItems,
|
|
617
616
|
value: e.selectedRangeSelectorValue,
|
|
618
617
|
onInput: e.onRangeSelectorInput
|
|
619
|
-
}, null, 8, ["aria-label", "items", "value", "onInput"])) :
|
|
620
|
-
e.granularities ? (
|
|
618
|
+
}, null, 8, ["aria-label", "items", "value", "onInput"])) : U("", !0),
|
|
619
|
+
e.granularities ? (O(), K(n, {
|
|
621
620
|
key: 2,
|
|
622
621
|
items: e.granularityItems,
|
|
623
622
|
"model-value": e.internalRangeDate.granularity,
|
|
624
623
|
"full-width": "",
|
|
625
624
|
"onUpdate:modelValue": e.onGranularityInput
|
|
626
|
-
}, null, 8, ["items", "model-value", "onUpdate:modelValue"])) :
|
|
627
|
-
|
|
628
|
-
|
|
625
|
+
}, null, 8, ["items", "model-value", "onUpdate:modelValue"])) : U("", !0),
|
|
626
|
+
L("div", null, [
|
|
627
|
+
G(p, {
|
|
629
628
|
stronger: "",
|
|
630
629
|
el: "span",
|
|
631
630
|
class: "b-date-range-picker-calendar__label"
|
|
632
631
|
}, {
|
|
633
|
-
default:
|
|
634
|
-
|
|
632
|
+
default: Y(() => a[0] || (a[0] = [
|
|
633
|
+
ne(" From ")
|
|
635
634
|
])),
|
|
636
635
|
_: 1
|
|
637
636
|
}),
|
|
638
|
-
|
|
637
|
+
L("div", {
|
|
639
638
|
class: he(e.formInputWrapperConditionalClasses)
|
|
640
639
|
}, [
|
|
641
|
-
|
|
640
|
+
G(v, {
|
|
642
641
|
"aria-label": e.t("dateFrom"),
|
|
643
642
|
value: e.dateTextInput.startDate,
|
|
644
643
|
error: e.startDateError,
|
|
@@ -646,12 +645,12 @@ function ra(e, a, s, i, l, c) {
|
|
|
646
645
|
onInput: e.onStartDateInput,
|
|
647
646
|
onKeydown: e.onDateInputKeyDown
|
|
648
647
|
}, {
|
|
649
|
-
description:
|
|
650
|
-
|
|
648
|
+
description: Y(() => a[1] || (a[1] = [
|
|
649
|
+
ne("YYYY-MM-DD")
|
|
651
650
|
])),
|
|
652
651
|
_: 1
|
|
653
652
|
}, 8, ["aria-label", "value", "error", "onInput", "onKeydown"]),
|
|
654
|
-
e.allowTimeInput ? (
|
|
653
|
+
e.allowTimeInput ? (O(), K(v, {
|
|
655
654
|
key: 0,
|
|
656
655
|
"aria-label": e.t("timeFrom"),
|
|
657
656
|
value: e.dateTextInput.startTime,
|
|
@@ -660,28 +659,28 @@ function ra(e, a, s, i, l, c) {
|
|
|
660
659
|
onInput: e.onStartTimeInput,
|
|
661
660
|
onKeydown: e.onTimeInputKeyDown
|
|
662
661
|
}, {
|
|
663
|
-
description:
|
|
664
|
-
|
|
662
|
+
description: Y(() => a[2] || (a[2] = [
|
|
663
|
+
ne("HH:MM:SS")
|
|
665
664
|
])),
|
|
666
665
|
_: 1
|
|
667
|
-
}, 8, ["aria-label", "value", "error", "onInput", "onKeydown"])) :
|
|
666
|
+
}, 8, ["aria-label", "value", "error", "onInput", "onKeydown"])) : U("", !0)
|
|
668
667
|
], 2)
|
|
669
668
|
]),
|
|
670
|
-
|
|
671
|
-
|
|
669
|
+
L("div", null, [
|
|
670
|
+
G(p, {
|
|
672
671
|
stronger: "",
|
|
673
672
|
el: "span",
|
|
674
673
|
class: "b-date-range-picker-calendar__label"
|
|
675
674
|
}, {
|
|
676
|
-
default:
|
|
677
|
-
|
|
675
|
+
default: Y(() => a[3] || (a[3] = [
|
|
676
|
+
ne(" To ")
|
|
678
677
|
])),
|
|
679
678
|
_: 1
|
|
680
679
|
}),
|
|
681
|
-
|
|
680
|
+
L("div", {
|
|
682
681
|
class: he(e.formInputWrapperConditionalClasses)
|
|
683
682
|
}, [
|
|
684
|
-
|
|
683
|
+
G(v, {
|
|
685
684
|
class: "b-date-range-picker-calendar__form-input",
|
|
686
685
|
"aria-label": e.t("dateTo"),
|
|
687
686
|
value: e.dateTextInput.endDate,
|
|
@@ -689,12 +688,12 @@ function ra(e, a, s, i, l, c) {
|
|
|
689
688
|
onInput: e.onEndDateInput,
|
|
690
689
|
onKeydown: e.onDateInputKeyDown
|
|
691
690
|
}, {
|
|
692
|
-
description:
|
|
693
|
-
|
|
691
|
+
description: Y(() => a[4] || (a[4] = [
|
|
692
|
+
ne("YYYY-MM-DD")
|
|
694
693
|
])),
|
|
695
694
|
_: 1
|
|
696
695
|
}, 8, ["aria-label", "value", "error", "onInput", "onKeydown"]),
|
|
697
|
-
e.allowTimeInput ? (
|
|
696
|
+
e.allowTimeInput ? (O(), K(v, {
|
|
698
697
|
key: 0,
|
|
699
698
|
"aria-label": e.t("timeTo"),
|
|
700
699
|
value: e.dateTextInput.endTime,
|
|
@@ -703,20 +702,20 @@ function ra(e, a, s, i, l, c) {
|
|
|
703
702
|
onInput: e.onEndTimeInput,
|
|
704
703
|
onKeydown: e.onTimeInputKeyDown
|
|
705
704
|
}, {
|
|
706
|
-
description:
|
|
707
|
-
|
|
705
|
+
description: Y(() => a[5] || (a[5] = [
|
|
706
|
+
ne("HH:MM:SS")
|
|
708
707
|
])),
|
|
709
708
|
_: 1
|
|
710
|
-
}, 8, ["aria-label", "value", "error", "onInput", "onKeydown"])) :
|
|
709
|
+
}, 8, ["aria-label", "value", "error", "onInput", "onKeydown"])) : U("", !0)
|
|
711
710
|
], 2)
|
|
712
711
|
])
|
|
713
712
|
]),
|
|
714
|
-
e.hasSlot("actions") ? (
|
|
713
|
+
e.hasSlot("actions") ? (O(), Ee("div", ta, [
|
|
715
714
|
_e(e.$slots, "actions", {}, void 0, !0)
|
|
716
|
-
])) :
|
|
715
|
+
])) : U("", !0)
|
|
717
716
|
]),
|
|
718
|
-
|
|
719
|
-
|
|
717
|
+
L("div", aa, [
|
|
718
|
+
G(j, {
|
|
720
719
|
value: e.internalRangeDate,
|
|
721
720
|
"first-day-of-week": e.firstDayOfWeek,
|
|
722
721
|
"is-date-disabled": e.isDateDisabled,
|
|
@@ -735,48 +734,48 @@ function ra(e, a, s, i, l, c) {
|
|
|
735
734
|
])
|
|
736
735
|
]);
|
|
737
736
|
}
|
|
738
|
-
const
|
|
737
|
+
const $ = /* @__PURE__ */ xe(Xt, [["render", na], ["__scopeId", "data-v-ba04969b"]]), ra = ({
|
|
739
738
|
datePickerValue: e,
|
|
740
739
|
isDateIncorrect: a,
|
|
741
740
|
quickSelectRanges: s,
|
|
742
741
|
isMonthVariant: i
|
|
743
742
|
}) => {
|
|
744
|
-
var
|
|
745
|
-
const { locale: l, t:
|
|
746
|
-
locale:
|
|
747
|
-
}) : void 0, v =
|
|
748
|
-
startDate: p((
|
|
743
|
+
var C, I, Q, f;
|
|
744
|
+
const { locale: l, t: m } = Oe(), c = we(), n = (A) => !!A && !isNaN(A.getTime()), p = (A, X) => n(A) ? ce(A, X, {
|
|
745
|
+
locale: c[l.value.substring(0, 2)] || c.enUS
|
|
746
|
+
}) : void 0, v = be({
|
|
747
|
+
startDate: p((C = e.value) == null ? void 0 : C.startDate, h.NUMERIC_DATE_YEAR_FIRST),
|
|
749
748
|
endDate: p((I = e.value) == null ? void 0 : I.endDate, h.NUMERIC_DATE_YEAR_FIRST),
|
|
750
|
-
startTime: p((
|
|
751
|
-
endTime: p((
|
|
749
|
+
startTime: p((Q = e.value) == null ? void 0 : Q.startDate, h.HOUR_MINUTE_SECONDS),
|
|
750
|
+
endTime: p((f = e.value) == null ? void 0 : f.endDate, h.HOUR_MINUTE_SECONDS)
|
|
752
751
|
});
|
|
753
752
|
return {
|
|
754
753
|
// Values
|
|
755
|
-
dateDisplayValue:
|
|
754
|
+
dateDisplayValue: b(() => {
|
|
756
755
|
var y;
|
|
757
756
|
if (a.value)
|
|
758
757
|
return `${v.startDate || ""} - ${v.endDate || ""}`;
|
|
759
758
|
if (!e.value || !e.value.startDate && !e.value.endDate)
|
|
760
|
-
return
|
|
759
|
+
return m("selectDateRange");
|
|
761
760
|
if ((y = s.value) != null && y.length) {
|
|
762
|
-
const
|
|
763
|
-
var
|
|
764
|
-
return
|
|
761
|
+
const B = s.value.find(({ value: N }) => {
|
|
762
|
+
var F;
|
|
763
|
+
return N === ((F = e.value) == null ? void 0 : F.range);
|
|
765
764
|
});
|
|
766
|
-
if (
|
|
767
|
-
return
|
|
765
|
+
if (B)
|
|
766
|
+
return B.label;
|
|
768
767
|
}
|
|
769
768
|
if (e.value.granularity === "quarterly") {
|
|
770
|
-
const { startDate:
|
|
771
|
-
if (
|
|
772
|
-
return
|
|
773
|
-
const
|
|
774
|
-
return `${
|
|
769
|
+
const { startDate: B, endDate: N } = e.value, F = m("quarter", { quarter: Le(B), year: Ye(B) });
|
|
770
|
+
if ($t(B, N))
|
|
771
|
+
return F;
|
|
772
|
+
const ue = m("quarter", { quarter: Le(N), year: Ye(N) });
|
|
773
|
+
return `${F} - ${ue}`;
|
|
775
774
|
}
|
|
776
|
-
const { startDate:
|
|
777
|
-
return `${p(
|
|
778
|
-
|
|
779
|
-
|
|
775
|
+
const { startDate: A, endDate: X } = v, P = i != null && i.value ? h.LONG_MONTH_YEAR : h.FULL_DATE_MONTH_FIRST;
|
|
776
|
+
return `${p(oe(A), P)} - ${p(
|
|
777
|
+
oe(X),
|
|
778
|
+
P
|
|
780
779
|
)}`;
|
|
781
780
|
}),
|
|
782
781
|
textInputDisplayValue: v,
|
|
@@ -784,7 +783,7 @@ const L = /* @__PURE__ */ xe(Zt, [["render", ra], ["__scopeId", "data-v-bb68460c
|
|
|
784
783
|
formatTextInputDisplayValue: () => ""
|
|
785
784
|
};
|
|
786
785
|
};
|
|
787
|
-
var
|
|
786
|
+
var Te = /* @__PURE__ */ ((e) => (e.INPUT = "input", e))(Te || {});
|
|
788
787
|
const We = {
|
|
789
788
|
"en-US": {
|
|
790
789
|
apply: "Apply",
|
|
@@ -806,20 +805,20 @@ const We = {
|
|
|
806
805
|
cancel: "Cancelar",
|
|
807
806
|
selectDate: "Selecione uma data"
|
|
808
807
|
}
|
|
809
|
-
},
|
|
808
|
+
}, oa = ze({
|
|
810
809
|
i18n: { messages: We },
|
|
811
810
|
name: "bento-date-range-picker",
|
|
812
811
|
components: {
|
|
813
|
-
BentoButtonActions:
|
|
814
|
-
BentoDivider:
|
|
812
|
+
BentoButtonActions: Pt,
|
|
813
|
+
BentoDivider: Tt,
|
|
815
814
|
BentoTypography: Xe,
|
|
816
|
-
BentoPopover:
|
|
817
|
-
DateRangePickerCalendar:
|
|
818
|
-
DropdownInputDefault:
|
|
819
|
-
ErrorMessage:
|
|
820
|
-
FieldLabel:
|
|
815
|
+
BentoPopover: bt,
|
|
816
|
+
DateRangePickerCalendar: $,
|
|
817
|
+
DropdownInputDefault: Rt,
|
|
818
|
+
ErrorMessage: Bt,
|
|
819
|
+
FieldLabel: Ut
|
|
821
820
|
},
|
|
822
|
-
directives: { BentoClickOutsideDirective:
|
|
821
|
+
directives: { BentoClickOutsideDirective: Mt },
|
|
823
822
|
props: {
|
|
824
823
|
/**
|
|
825
824
|
* Allows user to enter time values in the form
|
|
@@ -840,16 +839,16 @@ const We = {
|
|
|
840
839
|
/**
|
|
841
840
|
* Allows user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
|
|
842
841
|
*/
|
|
843
|
-
firstDayOfWeek:
|
|
842
|
+
firstDayOfWeek: $.props.firstDayOfWeek,
|
|
844
843
|
/**
|
|
845
844
|
* A list of available granularities.
|
|
846
845
|
* If present, the date picker will display a segmented control to change granularity.
|
|
847
846
|
*/
|
|
848
|
-
granularities:
|
|
847
|
+
granularities: $.props.granularities,
|
|
849
848
|
/**
|
|
850
849
|
* Indicate if a date should be disabled or not
|
|
851
850
|
*/
|
|
852
|
-
isDateDisabled:
|
|
851
|
+
isDateDisabled: $.props.isDateDisabled,
|
|
853
852
|
/**
|
|
854
853
|
* Text that is displayed as a label above the element.
|
|
855
854
|
*/
|
|
@@ -888,23 +887,23 @@ const We = {
|
|
|
888
887
|
/**
|
|
889
888
|
* Set a maximum number of dates to be selectable by the range.
|
|
890
889
|
*/
|
|
891
|
-
maxRange:
|
|
890
|
+
maxRange: $.props.maxRange,
|
|
892
891
|
/**
|
|
893
892
|
* Sets a minimum limit for selectable dates - dates before `min` will not be selectable
|
|
894
893
|
*/
|
|
895
|
-
min:
|
|
894
|
+
min: $.props.min,
|
|
896
895
|
/**
|
|
897
896
|
* Sets a maximum limit for selectable dates - dates after `max` will not be selectable
|
|
898
897
|
*/
|
|
899
|
-
max:
|
|
898
|
+
max: $.props.max,
|
|
900
899
|
/**
|
|
901
900
|
* Number of months rendered on pane
|
|
902
901
|
*/
|
|
903
|
-
numberOfMonths:
|
|
902
|
+
numberOfMonths: $.props.numberOfMonths,
|
|
904
903
|
/**
|
|
905
904
|
* Selected date
|
|
906
905
|
*/
|
|
907
|
-
value:
|
|
906
|
+
value: $.props.value,
|
|
908
907
|
/**
|
|
909
908
|
* The type of calendar to display. Defaults to showing days.
|
|
910
909
|
*/
|
|
@@ -921,108 +920,108 @@ const We = {
|
|
|
921
920
|
*/
|
|
922
921
|
hasActions: { type: Boolean, default: !1 }
|
|
923
922
|
},
|
|
924
|
-
emits: [
|
|
923
|
+
emits: [Te.INPUT],
|
|
925
924
|
setup(e, { emit: a }) {
|
|
926
|
-
const { locale: s, t: i } = Oe({ messages: We }), l = we(),
|
|
927
|
-
() => e.label || i("dateRangePicker", { name:
|
|
928
|
-
),
|
|
925
|
+
const { locale: s, t: i } = Oe({ messages: We }), l = we(), m = de("bento-date-range-picker-container"), c = de("bento-date-range-picker-label"), n = de("bento-date-range-picker-description"), p = de("bento-date-range-picker-error"), v = de("bento-date-range-picker-date-error"), j = b(
|
|
926
|
+
() => e.label || i("dateRangePicker", { name: m })
|
|
927
|
+
), T = _(!1), C = _(null), I = _(!1), { isReadOnly: Q } = Ot(Re(e, "readonly"));
|
|
929
928
|
Se(
|
|
930
929
|
() => e.disabled,
|
|
931
930
|
() => {
|
|
932
931
|
e.disabled && I.value && (I.value = !1);
|
|
933
932
|
}
|
|
934
933
|
);
|
|
935
|
-
const
|
|
936
|
-
"b-date-range-picker__description--error": !!e.errorMessage ||
|
|
937
|
-
})),
|
|
934
|
+
const f = b(() => e.hasActions ? !Z.value && T.value : T.value), A = b(() => ({
|
|
935
|
+
"b-date-range-picker__description--error": !!e.errorMessage || f.value
|
|
936
|
+
})), X = b(() => e.variant === "month"), { dateDisplayValue: P, textInputDisplayValue: y } = ra({
|
|
938
937
|
datePickerValue: Re(e, "value"),
|
|
939
|
-
isDateIncorrect:
|
|
938
|
+
isDateIncorrect: T,
|
|
940
939
|
quickSelectRanges: Re(e, "quickSelectRanges"),
|
|
941
|
-
isMonthVariant:
|
|
942
|
-
}),
|
|
943
|
-
() => `${e.description ? n : ""} ${e.errorMessage ? p : ""} ${
|
|
944
|
-
),
|
|
940
|
+
isMonthVariant: X
|
|
941
|
+
}), B = b(
|
|
942
|
+
() => `${e.description ? n : ""} ${e.errorMessage ? p : ""} ${T.value ? v : ""}`.trim() || null
|
|
943
|
+
), N = b(() => e.allowTimeInput && e.variant !== "month"), F = () => {
|
|
945
944
|
I.value = !1;
|
|
946
|
-
},
|
|
945
|
+
}, ue = () => {
|
|
947
946
|
I.value = !0;
|
|
948
|
-
},
|
|
947
|
+
}, fe = _(P.value), q = _(
|
|
949
948
|
// textInputDisplayValue is a reactive object
|
|
950
949
|
structuredClone(ke(y))
|
|
951
|
-
),
|
|
952
|
-
() => e.hasActions ?
|
|
953
|
-
),
|
|
954
|
-
() => e.hasActions ?
|
|
950
|
+
), H = _(e.value), Z = _(!0), S = b(
|
|
951
|
+
() => e.hasActions ? q.value : y
|
|
952
|
+
), se = b(
|
|
953
|
+
() => e.hasActions ? fe.value : P.value
|
|
955
954
|
);
|
|
956
955
|
Je(() => {
|
|
957
|
-
if (e.hasActions ||
|
|
956
|
+
if (e.hasActions || It(
|
|
958
957
|
'BentoDateRangePicker "hasActions" property',
|
|
959
958
|
`Set the BentoDateRangePicker "hasActions" property true which will display the "Apply" and "Cancel" buttons.
|
|
960
959
|
This will be the default behavior in the v2 and "hasActions" will be removed.`,
|
|
961
960
|
"2.0.0"
|
|
962
|
-
), e.granularities && e.variant !== "month" && e.granularities.find(({ type:
|
|
961
|
+
), e.granularities && e.variant !== "month" && e.granularities.find(({ type: D }) => D === "quarterly"))
|
|
963
962
|
throw new Error(
|
|
964
963
|
'Quarterly granularity is only supported by BentoDateRangePicker with variant: "month"'
|
|
965
964
|
);
|
|
966
965
|
}), Se(
|
|
967
966
|
() => e.value,
|
|
968
967
|
() => {
|
|
969
|
-
|
|
968
|
+
fe.value = P.value, q.value = structuredClone(ke(y));
|
|
970
969
|
}
|
|
971
970
|
);
|
|
972
|
-
const
|
|
971
|
+
const W = b(() => [
|
|
973
972
|
{
|
|
974
973
|
title: i("apply"),
|
|
975
974
|
event: () => {
|
|
976
|
-
a(
|
|
975
|
+
a(Te.INPUT, H.value), F(), Z.value = !0;
|
|
977
976
|
},
|
|
978
|
-
disabled:
|
|
977
|
+
disabled: Z.value
|
|
979
978
|
},
|
|
980
979
|
{
|
|
981
980
|
title: i("cancel"),
|
|
982
|
-
event:
|
|
981
|
+
event: F
|
|
983
982
|
}
|
|
984
983
|
]);
|
|
985
|
-
return Se(
|
|
984
|
+
return Se(H, (D) => {
|
|
986
985
|
if (e.hasActions) {
|
|
987
|
-
|
|
986
|
+
Z.value = T.value;
|
|
988
987
|
return;
|
|
989
988
|
}
|
|
990
|
-
a(
|
|
989
|
+
a(Te.INPUT, D);
|
|
991
990
|
}), {
|
|
992
991
|
// Refs
|
|
993
|
-
inputContainerRef:
|
|
992
|
+
inputContainerRef: C,
|
|
994
993
|
// Values,
|
|
995
|
-
dateDisplayValue:
|
|
996
|
-
datePickerContainerId:
|
|
997
|
-
descriptionConditionalClasses:
|
|
998
|
-
displayedTextInputValue:
|
|
999
|
-
displayedDateValue:
|
|
1000
|
-
isDateIncorrect:
|
|
994
|
+
dateDisplayValue: P,
|
|
995
|
+
datePickerContainerId: m,
|
|
996
|
+
descriptionConditionalClasses: A,
|
|
997
|
+
displayedTextInputValue: S,
|
|
998
|
+
displayedDateValue: se,
|
|
999
|
+
isDateIncorrect: T,
|
|
1001
1000
|
isDateRangePickerOpen: I,
|
|
1002
|
-
isReadOnly:
|
|
1003
|
-
labelId:
|
|
1001
|
+
isReadOnly: Q,
|
|
1002
|
+
labelId: c,
|
|
1004
1003
|
descriptionId: n,
|
|
1005
1004
|
dateErrorId: v,
|
|
1006
1005
|
errorId: p,
|
|
1007
|
-
popoverAriaLabel:
|
|
1008
|
-
shouldDisplayError:
|
|
1009
|
-
ariaDescribedBy:
|
|
1006
|
+
popoverAriaLabel: j,
|
|
1007
|
+
shouldDisplayError: f,
|
|
1008
|
+
ariaDescribedBy: B,
|
|
1010
1009
|
textInputDisplayValue: y,
|
|
1011
|
-
rangePickerButtonActions:
|
|
1012
|
-
BentoButtonActionsLayout:
|
|
1013
|
-
withTimeInput:
|
|
1010
|
+
rangePickerButtonActions: W,
|
|
1011
|
+
BentoButtonActionsLayout: Nt,
|
|
1012
|
+
withTimeInput: N,
|
|
1014
1013
|
// Events
|
|
1015
|
-
closeDateRangePicker:
|
|
1014
|
+
closeDateRangePicker: F,
|
|
1016
1015
|
clearDateRangePickerValue: async () => {
|
|
1017
|
-
|
|
1016
|
+
T.value && (T.value = !1), H.value = null;
|
|
1018
1017
|
},
|
|
1019
|
-
openDateRangePicker:
|
|
1020
|
-
onRangeSelectorInput: (
|
|
1021
|
-
if (
|
|
1022
|
-
const
|
|
1018
|
+
openDateRangePicker: ue,
|
|
1019
|
+
onRangeSelectorInput: (D) => {
|
|
1020
|
+
if (D) {
|
|
1021
|
+
const R = (le) => ce(le, h.NUMERIC_DATE_YEAR_FIRST, {
|
|
1023
1022
|
locale: l[s.value.substring(0, 2)] || l.enUS
|
|
1024
1023
|
});
|
|
1025
|
-
y.startDate =
|
|
1024
|
+
y.startDate = R(D.startDate), y.endDate = R(D.endDate), H.value = D;
|
|
1026
1025
|
}
|
|
1027
1026
|
},
|
|
1028
1027
|
onEnterPressedOverInput: () => {
|
|
@@ -1030,44 +1029,44 @@ const We = {
|
|
|
1030
1029
|
I.value = !0;
|
|
1031
1030
|
return;
|
|
1032
1031
|
}
|
|
1033
|
-
|
|
1032
|
+
T.value || (I.value = !1);
|
|
1034
1033
|
},
|
|
1035
|
-
onDateRangePickerInput: (
|
|
1036
|
-
|
|
1037
|
-
const
|
|
1034
|
+
onDateRangePickerInput: (D) => {
|
|
1035
|
+
T.value = !1;
|
|
1036
|
+
const R = (le, Ie) => le ? ce(le, Ie, {
|
|
1038
1037
|
locale: l[s.value.substring(0, 2)] || l.enUS
|
|
1039
1038
|
}) : void 0;
|
|
1040
|
-
y.startDate =
|
|
1041
|
-
|
|
1039
|
+
y.startDate = R(
|
|
1040
|
+
D.startDate,
|
|
1042
1041
|
h.NUMERIC_DATE_YEAR_FIRST
|
|
1043
|
-
), y.endDate =
|
|
1042
|
+
), y.endDate = R(D.endDate, h.NUMERIC_DATE_YEAR_FIRST), y.startTime = R(D.startDate, h.HOUR_MINUTE_SECONDS), y.endTime = R(D.endDate, h.HOUR_MINUTE_SECONDS), H.value = D;
|
|
1044
1043
|
},
|
|
1045
|
-
onDateRangePickerError: (
|
|
1046
|
-
|
|
1044
|
+
onDateRangePickerError: (D) => {
|
|
1045
|
+
T.value = !0, y.startDate = D.startDate, y.endDate = D.endDate, H.value = { startDate: null, endDate: null };
|
|
1047
1046
|
},
|
|
1048
|
-
onDateRangePickerFormDateInputUpdate: (
|
|
1049
|
-
|
|
1047
|
+
onDateRangePickerFormDateInputUpdate: (D) => {
|
|
1048
|
+
T.value = !1, D.startTime && (y.startTime = D.startTime), D.endTime && (y.endTime = D.endTime);
|
|
1050
1049
|
},
|
|
1051
1050
|
// Translations
|
|
1052
1051
|
t: i
|
|
1053
1052
|
};
|
|
1054
1053
|
}
|
|
1055
|
-
}),
|
|
1056
|
-
function
|
|
1057
|
-
const
|
|
1058
|
-
return
|
|
1059
|
-
e.label ? (
|
|
1054
|
+
}), sa = { class: "b-date-range-picker" }, la = { class: "b-date-range-picker__footer" };
|
|
1055
|
+
function ia(e, a, s, i, l, m) {
|
|
1056
|
+
const c = E("field-label"), n = E("dropdown-input-default"), p = E("error-message"), v = E("bento-typography"), j = E("bento-divider"), T = E("bento-button-actions"), C = E("date-range-picker-calendar"), I = E("bento-popover"), Q = ft("bento-click-outside-directive");
|
|
1057
|
+
return pt((O(), Ee("div", sa, [
|
|
1058
|
+
e.label ? (O(), K(c, {
|
|
1060
1059
|
key: 0,
|
|
1061
1060
|
id: e.labelId,
|
|
1062
1061
|
label: e.label,
|
|
1063
1062
|
"tooltip-text": e.tooltipText,
|
|
1064
1063
|
optional: e.optional,
|
|
1065
1064
|
required: e.required
|
|
1066
|
-
}, null, 8, ["id", "label", "tooltip-text", "optional", "required"])) :
|
|
1067
|
-
|
|
1068
|
-
onKeydown: a[0] || (a[0] =
|
|
1065
|
+
}, null, 8, ["id", "label", "tooltip-text", "optional", "required"])) : U("", !0),
|
|
1066
|
+
L("div", {
|
|
1067
|
+
onKeydown: a[0] || (a[0] = vt((...f) => e.onEnterPressedOverInput && e.onEnterPressedOverInput(...f), ["enter"]))
|
|
1069
1068
|
}, [
|
|
1070
|
-
|
|
1069
|
+
G(n, {
|
|
1071
1070
|
ref: "inputContainerRef",
|
|
1072
1071
|
"always-combobox-is-input": "",
|
|
1073
1072
|
ariaControls: e.datePickerContainerId,
|
|
@@ -1084,30 +1083,30 @@ function ua(e, a, s, i, l, c) {
|
|
|
1084
1083
|
onClose: e.closeDateRangePicker
|
|
1085
1084
|
}, null, 8, ["ariaControls", "ariaExpanded", "aria-labelledby", "aria-describedby", "disabled", "is-invalid", "open", "display-value", "readonly", "onOpen", "onClear", "onClose"])
|
|
1086
1085
|
], 32),
|
|
1087
|
-
e.shouldDisplayError ? (
|
|
1086
|
+
e.shouldDisplayError ? (O(), K(p, {
|
|
1088
1087
|
key: 1,
|
|
1089
1088
|
id: e.dateErrorId,
|
|
1090
1089
|
"error-message": e.t("provideDateInAFormat"),
|
|
1091
1090
|
class: "b-date-range-picker__error-message"
|
|
1092
|
-
}, null, 8, ["id", "error-message"])) :
|
|
1093
|
-
e.errorMessage ? (
|
|
1091
|
+
}, null, 8, ["id", "error-message"])) : U("", !0),
|
|
1092
|
+
e.errorMessage ? (O(), K(p, {
|
|
1094
1093
|
key: 2,
|
|
1095
1094
|
id: e.errorId,
|
|
1096
1095
|
"error-message": e.errorMessage,
|
|
1097
1096
|
class: "b-date-range-picker__error-message"
|
|
1098
|
-
}, null, 8, ["id", "error-message"])) :
|
|
1099
|
-
e.description ? (
|
|
1097
|
+
}, null, 8, ["id", "error-message"])) : U("", !0),
|
|
1098
|
+
e.description ? (O(), K(v, {
|
|
1100
1099
|
key: 3,
|
|
1101
1100
|
id: e.descriptionId,
|
|
1102
1101
|
class: he(["b-date-range-picker__description", e.descriptionConditionalClasses]),
|
|
1103
1102
|
el: "span"
|
|
1104
1103
|
}, {
|
|
1105
|
-
default:
|
|
1106
|
-
|
|
1104
|
+
default: Y(() => [
|
|
1105
|
+
ne(gt(e.description), 1)
|
|
1107
1106
|
]),
|
|
1108
1107
|
_: 1
|
|
1109
|
-
}, 8, ["id", "class"])) :
|
|
1110
|
-
e.inputContainerRef ? (
|
|
1108
|
+
}, 8, ["id", "class"])) : U("", !0),
|
|
1109
|
+
e.inputContainerRef ? (O(), K(I, {
|
|
1111
1110
|
key: 4,
|
|
1112
1111
|
id: e.datePickerContainerId,
|
|
1113
1112
|
class: "b-date-range-picker__container",
|
|
@@ -1119,8 +1118,8 @@ function ua(e, a, s, i, l, c) {
|
|
|
1119
1118
|
"without-space": "",
|
|
1120
1119
|
"fit-content": ""
|
|
1121
1120
|
}, {
|
|
1122
|
-
default:
|
|
1123
|
-
|
|
1121
|
+
default: Y(() => [
|
|
1122
|
+
G(C, {
|
|
1124
1123
|
"allow-time-input": e.withTimeInput,
|
|
1125
1124
|
"quick-select-ranges": e.quickSelectRanges,
|
|
1126
1125
|
value: e.value,
|
|
@@ -1138,13 +1137,13 @@ function ua(e, a, s, i, l, c) {
|
|
|
1138
1137
|
onInput: e.onDateRangePickerInput,
|
|
1139
1138
|
onError: e.onDateRangePickerError,
|
|
1140
1139
|
onFormDate: e.onDateRangePickerFormDateInputUpdate
|
|
1141
|
-
},
|
|
1140
|
+
}, yt({ _: 2 }, [
|
|
1142
1141
|
e.hasActions ? {
|
|
1143
1142
|
name: "actions",
|
|
1144
|
-
fn:
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1143
|
+
fn: Y(() => [
|
|
1144
|
+
G(j),
|
|
1145
|
+
L("div", la, [
|
|
1146
|
+
G(T, {
|
|
1148
1147
|
actions: e.rangePickerButtonActions,
|
|
1149
1148
|
layout: e.BentoButtonActionsLayout.SPACE_BETWEEN
|
|
1150
1149
|
}, null, 8, ["actions", "layout"])
|
|
@@ -1155,17 +1154,17 @@ function ua(e, a, s, i, l, c) {
|
|
|
1155
1154
|
]), 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", "onCustomRange", "onInput", "onError", "onFormDate"])
|
|
1156
1155
|
]),
|
|
1157
1156
|
_: 1
|
|
1158
|
-
}, 8, ["id", "open", "target-element", "aria-label"])) :
|
|
1157
|
+
}, 8, ["id", "open", "target-element", "aria-label"])) : U("", !0)
|
|
1159
1158
|
])), [
|
|
1160
|
-
[
|
|
1159
|
+
[Q, e.closeDateRangePicker]
|
|
1161
1160
|
]);
|
|
1162
1161
|
}
|
|
1163
|
-
const
|
|
1162
|
+
const Fa = /* @__PURE__ */ xe(oa, [["render", ia], ["__scopeId", "data-v-5b34fdfc"]]);
|
|
1164
1163
|
export {
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1164
|
+
Fa as B,
|
|
1165
|
+
$ as D,
|
|
1166
|
+
Te as a,
|
|
1167
|
+
Lt as b,
|
|
1168
|
+
qt as i
|
|
1170
1169
|
};
|
|
1171
|
-
//# sourceMappingURL=date-range-picker.
|
|
1170
|
+
//# sourceMappingURL=date-range-picker.42PkRLKi.js.map
|