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