@adyen/bento-vue2 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.
Files changed (35) hide show
  1. package/dist/assets/accordion-item.css +1 -1
  2. package/dist/assets/action-bar.css +1 -1
  3. package/dist/assets/base-modal.css +1 -1
  4. package/dist/assets/calendar.css +1 -1
  5. package/dist/assets/card.css +1 -1
  6. package/dist/assets/data-grid.css +1 -1
  7. package/dist/assets/date-range-picker.css +1 -1
  8. package/dist/assets/dialog-page.css +1 -1
  9. package/dist/assets/file-uploader.css +1 -1
  10. package/dist/assets/filter-bar.css +1 -1
  11. package/dist/assets/inspector.css +1 -1
  12. package/dist/assets/menu.css +1 -1
  13. package/dist/assets/modal-fullscreen.css +1 -1
  14. package/dist/assets/popover.css +1 -1
  15. package/dist/assets/sidepanel.css +1 -1
  16. package/dist/chunks/{calendar.C7onA58P.js → calendar.C4vFYvsY.js} +3 -3
  17. package/dist/chunks/{calendar.C7onA58P.js.map → calendar.C4vFYvsY.js.map} +1 -1
  18. package/dist/chunks/{data-grid.Dl3xh62_.js → data-grid.BS_x1UJr.js} +2 -2
  19. package/dist/chunks/{data-grid.Dl3xh62_.js.map → data-grid.BS_x1UJr.js.map} +1 -1
  20. package/dist/chunks/{date-picker.DgF85qSC.js → date-picker.mm_Z28Ef.js} +2 -2
  21. package/dist/chunks/{date-picker.DgF85qSC.js.map → date-picker.mm_Z28Ef.js.map} +1 -1
  22. package/dist/chunks/{date-range-picker.CAQY6v7g.js → date-range-picker.Cx4vdGUZ.js} +388 -389
  23. package/dist/chunks/date-range-picker.Cx4vdGUZ.js.map +1 -0
  24. package/dist/chunks/{filter-bar.CcsUi7Xg.js → filter-bar.CJOZfPv2.js} +854 -826
  25. package/dist/chunks/filter-bar.CJOZfPv2.js.map +1 -0
  26. package/dist/data-grid.js +1 -1
  27. package/dist/date-picker.js +2 -2
  28. package/dist/date-range-picker.js +2 -2
  29. package/dist/filter-bar.js +1 -1
  30. package/dist/index.js +5 -5
  31. package/dist/internal.js +1 -1
  32. package/dist/web-types.json +1 -1
  33. package/package.json +6 -6
  34. package/dist/chunks/date-range-picker.CAQY6v7g.js.map +0 -1
  35. package/dist/chunks/filter-bar.CcsUi7Xg.js.map +0 -1
@@ -1,140 +1,140 @@
1
- import { reactive as ce, defineComponent as Pe, computed as g, ref as O, onMounted as Be, toRaw as pe, toRef as fe, watch as ve } from "vue";
2
- import { B as at } from "./divider.Cc4JFWG_.js";
3
- import { B as nt } from "./popover.CuOrBXcF.js";
4
- import { B as Ne, d as rt } from "./typography.J1v_SPG3.js";
5
- import { D as st } from "./dropdown-default-textbox.AUsF-RIc.js";
6
- import { r as E, t as L, g as ge } from "./get-date-locale.BN8xEjY0.js";
7
- import { g as X } from "./generate-uid.NJ8tVoha.js";
1
+ import { reactive as De, defineComponent as Pe, computed as g, ref as w, onMounted as Be, toRaw as pe, toRef as fe, watch as ve } from "vue";
2
+ import { B as tt } from "./divider.Cc4JFWG_.js";
3
+ import { B as at } from "./popover.CuOrBXcF.js";
4
+ import { B as Ne, d as nt } from "./typography.J1v_SPG3.js";
5
+ import { D as rt } from "./dropdown-default-textbox.AUsF-RIc.js";
6
+ import { r as h, t as Y, g as ge } from "./get-date-locale.BN8xEjY0.js";
7
+ import { g as te } from "./generate-uid.NJ8tVoha.js";
8
8
  import { u as ye } from "./i18n.BQkEbtPM.js";
9
- import { t as te, f as ee } from "./date.dYFFEunA.js";
10
- import { e as qe, f as Z, i as B, g as z, h as Ie, j as ot, k as Se, l as it, s as ke, m as lt, n as Ee, a as q, u as ut } from "./calendar.C7onA58P.js";
11
- import { f as he, v as dt, D as k } from "./date-input.BqBdAO1E.js";
12
- import { u as ct } from "./use-form-layout-loading.D3lALhtC.js";
9
+ import { t as re, f as ne } from "./date.dYFFEunA.js";
10
+ import { e as qe, f as ae, i as B, g as Z, h as Ie, j as st, k as Se, l as ot, s as ke, m as it, n as Ee, a as L, u as lt } from "./calendar.C4vFYvsY.js";
11
+ import { f as he, v as ut, D as k } from "./date-input.BqBdAO1E.js";
12
+ import { u as dt } from "./use-form-layout-loading.D3lALhtC.js";
13
13
  import "./index.Cl4_42j5.js";
14
- import { B as Dt } from "./input-field.CP8Qui6G.js";
15
- import { B as mt } from "./dropdown.C01pOog2.js";
16
- import { B as ft } from "./segmented-control.BffWAGrf.js";
17
- import { d as ue } from "./debounce.DUTu11PS.js";
18
- import { u as vt } from "./use-has-slot.C9lQZ6nz.js";
19
- import { e as N, a as Oe } from "./index.BDuTpjD8.js";
14
+ import { B as ct } from "./input-field.CP8Qui6G.js";
15
+ import { B as Dt } from "./dropdown.C01pOog2.js";
16
+ import { B as mt } from "./segmented-control.BffWAGrf.js";
17
+ import { d as de } from "./debounce.DUTu11PS.js";
18
+ import { u as ft } from "./use-has-slot.C9lQZ6nz.js";
19
+ import { e as W, a as Oe } from "./index.BDuTpjD8.js";
20
20
  import { n as Le } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
21
- import { B as pt } from "./directive.Cbdox5VL.js";
22
- import { F as gt, E as yt } from "./error-message.dQtl9mYG.js";
23
- import { B as Tt, c as _t } from "./button-actions.V0te_IrY.js";
21
+ import { B as vt } from "./directive.Cbdox5VL.js";
22
+ import { F as pt, E as gt } from "./error-message.dQtl9mYG.js";
23
+ import { B as yt, c as Tt } from "./button-actions.V0te_IrY.js";
24
24
  import "../assets/date-range-picker.css";
25
25
  function Ye(t, e) {
26
- E(2, arguments);
27
- var n = te(e), i = n * 3;
26
+ h(2, arguments);
27
+ var n = re(e), i = n * 3;
28
28
  return qe(t, i);
29
29
  }
30
30
  function Me(t) {
31
- E(1, arguments);
32
- var e = L(t), n = Math.floor(e.getMonth() / 3) + 1;
31
+ h(1, arguments);
32
+ var e = Y(t), n = Math.floor(e.getMonth() / 3) + 1;
33
33
  return n;
34
34
  }
35
35
  function we(t) {
36
- return E(1, arguments), L(t).getFullYear();
36
+ return h(1, arguments), Y(t).getFullYear();
37
37
  }
38
- function Rt(t, e) {
39
- E(2, arguments);
40
- var n = L(t), i = L(e);
38
+ function _t(t, e) {
39
+ h(2, arguments);
40
+ var n = Y(t), i = Y(e);
41
41
  return n.getTime() === i.getTime();
42
42
  }
43
- function bt(t, e) {
44
- E(2, arguments);
45
- var n = Z(t), i = Z(e);
43
+ function Rt(t, e) {
44
+ h(2, arguments);
45
+ var n = ae(t), i = ae(e);
46
46
  return n.getTime() === i.getTime();
47
47
  }
48
48
  function Ce(t) {
49
- E(1, arguments);
50
- var e = L(t);
49
+ h(1, arguments);
50
+ var e = Y(t);
51
51
  return e.setMilliseconds(0), e;
52
52
  }
53
53
  function xe(t, e) {
54
- E(2, arguments);
54
+ h(2, arguments);
55
55
  var n = Ce(t), i = Ce(e);
56
56
  return n.getTime() === i.getTime();
57
57
  }
58
- function It(t) {
59
- return E(1, arguments), B(t, Date.now());
58
+ function bt(t) {
59
+ return h(1, arguments), B(t, Date.now());
60
60
  }
61
- function St(t, e) {
62
- E(2, arguments);
63
- var n = L(t), i = te(e);
61
+ function It(t, e) {
62
+ h(2, arguments);
63
+ var n = Y(t), i = re(e);
64
64
  return n.setHours(i), n;
65
65
  }
66
- function kt(t, e) {
67
- E(2, arguments);
68
- var n = L(t), i = te(e);
66
+ function St(t, e) {
67
+ h(2, arguments);
68
+ var n = Y(t), i = re(e);
69
69
  return n.setMinutes(i), n;
70
70
  }
71
- function Et(t, e) {
72
- E(2, arguments);
73
- var n = L(t), i = te(e);
71
+ function kt(t, e) {
72
+ h(2, arguments);
73
+ var n = Y(t), i = re(e);
74
74
  return n.setSeconds(i), n;
75
75
  }
76
- function ht(t, e) {
77
- E(2, arguments);
78
- var n = te(e);
76
+ function Et(t, e) {
77
+ h(2, arguments);
78
+ var n = re(e);
79
79
  return Ye(t, -n);
80
80
  }
81
- function De(t) {
81
+ function K(t) {
82
82
  if (t == null)
83
- return z(/* @__PURE__ */ new Date());
83
+ return Z(/* @__PURE__ */ new Date());
84
84
  const [e, n, i] = t.split("-").map((l) => parseInt(l, 10));
85
85
  return new Date(e, n - 1, i);
86
86
  }
87
- const Ot = ({
87
+ const ht = ({
88
88
  firstDayOfWeek: t,
89
89
  min: e,
90
90
  max: n
91
91
  }) => ({ getGranularCalendarLimits: (l) => {
92
- let D = z(e), f = N(n);
92
+ let c = Z(e), D = W(n);
93
93
  if ((l == null ? void 0 : l.type) === "weekly") {
94
94
  if (l.earliest)
95
- D = z(l.earliest);
95
+ c = Z(l.earliest);
96
96
  else {
97
- const r = Ie(D, { weekStartsOn: t });
98
- B(D, r) || (D = z(ot(Se(D, { weekStartsOn: t }), 1)));
97
+ const r = Ie(c, { weekStartsOn: t });
98
+ B(c, r) || (c = Z(st(Se(c, { weekStartsOn: t }), 1)));
99
99
  }
100
100
  if (l.latest)
101
- f = N(l.latest);
101
+ D = W(l.latest);
102
102
  else {
103
- const r = Se(f, { weekStartsOn: t });
104
- B(f, r) || (f = N(it(Ie(f, { weekStartsOn: t }), 1)));
103
+ const r = Se(D, { weekStartsOn: t });
104
+ B(D, r) || (D = W(ot(Ie(D, { weekStartsOn: t }), 1)));
105
105
  }
106
106
  }
107
107
  if ((l == null ? void 0 : l.type) === "monthly") {
108
108
  if (l.earliest)
109
- D = z(l.earliest);
109
+ c = Z(l.earliest);
110
110
  else {
111
- const r = ke(D);
112
- B(D, r) || (D = ke(qe(D, 1)));
111
+ const r = ke(c);
112
+ B(c, r) || (c = ke(qe(c, 1)));
113
113
  }
114
114
  if (l.latest)
115
- f = N(l.latest);
115
+ D = W(l.latest);
116
116
  else {
117
- const r = Oe(f);
118
- B(f, r) || (f = Oe(lt(f, 1)));
117
+ const r = Oe(D);
118
+ B(D, r) || (D = Oe(it(D, 1)));
119
119
  }
120
120
  }
121
121
  if ((l == null ? void 0 : l.type) === "quarterly") {
122
122
  if (l.earliest)
123
- D = Z(l.earliest);
123
+ c = ae(l.earliest);
124
124
  else {
125
- const r = Z(D);
126
- B(D, r) || (D = Z(Ye(D, 1)));
125
+ const r = ae(c);
126
+ B(c, r) || (c = ae(Ye(c, 1)));
127
127
  }
128
128
  if (l.latest)
129
- f = N(l.latest);
129
+ D = W(l.latest);
130
130
  else {
131
- const r = Ee(f);
132
- B(f, r) || (f = Ee(ht(f, 1)));
131
+ const r = Ee(D);
132
+ B(D, r) || (D = Ee(Et(D, 1)));
133
133
  }
134
134
  }
135
- return { min: D, max: f };
136
- } }), Mt = () => {
137
- const t = ce({
135
+ return { min: c, max: D };
136
+ } }), Ot = () => {
137
+ const t = De({
138
138
  daily: null,
139
139
  weekly: null,
140
140
  monthly: null,
@@ -150,9 +150,9 @@ const Ot = ({
150
150
  }
151
151
  };
152
152
  };
153
- var v = /* @__PURE__ */ ((t) => (t.CUSTOM_RANGE = "custom-range", t.INPUT = "input", t.ERROR = "error", t.FORM_DATE = "form-date", t.START_DATE_SELECTED = "start-date-selected", t))(v || {});
154
- const wt = /[\d]/, Ct = /^\d{2}$/, xt = /^\d{2}:\d{2}$/, At = (t) => {
155
- const { selectionStart: e } = t.target, n = wt.test(t.key) || t.key === "Backspace" || t.key === "Tab", i = [1, 2, 4, 5].includes(e) && t.key === ":";
153
+ var f = /* @__PURE__ */ ((t) => (t.CUSTOM_RANGE = "custom-range", t.INPUT = "input", t.ERROR = "error", t.FORM_DATE = "form-date", t.START_DATE_SELECTED = "start-date-selected", t))(f || {});
154
+ const Mt = /[\d]/, wt = /^\d{2}$/, Ct = /^\d{2}:\d{2}$/, xt = (t) => {
155
+ const { selectionStart: e } = t.target, n = Mt.test(t.key) || t.key === "Backspace" || t.key === "Tab", i = [1, 2, 4, 5].includes(e) && t.key === ":";
156
156
  !n && !i && t.preventDefault();
157
157
  }, Ae = (t) => {
158
158
  if (!t)
@@ -161,8 +161,8 @@ const wt = /[\d]/, Ct = /^\d{2}$/, xt = /^\d{2}:\d{2}$/, At = (t) => {
161
161
  if (e.length === 1 && parseInt(t, 10) > 2)
162
162
  return `0${e}:`;
163
163
  const [n, i] = e.slice(-2);
164
- return [2, 5].includes(e.length) && i === ":" && (e = `${e.slice(0, e.length - 2)}0${n}`), (Ct.test(e) || xt.test(e)) && (e += ":"), e;
165
- }, Ft = {
164
+ return [2, 5].includes(e.length) && i === ":" && (e = `${e.slice(0, e.length - 2)}0${n}`), (wt.test(e) || Ct.test(e)) && (e += ":"), e;
165
+ }, At = {
166
166
  "en-US": {
167
167
  customRange: "Custom range",
168
168
  daily: "Daily",
@@ -193,15 +193,15 @@ const wt = /[\d]/, Ct = /^\d{2}$/, xt = /^\d{2}:\d{2}$/, At = (t) => {
193
193
  monthly: "Mensal",
194
194
  weekly: "Semanal"
195
195
  }
196
- }, Fe = 300, Ue = "customRange", Ut = Pe({
197
- i18n: { messages: Ft },
196
+ }, Fe = 300, Ue = "customRange", Ft = Pe({
197
+ i18n: { messages: At },
198
198
  name: "date-range-picker-calendar",
199
199
  components: {
200
- BentoDropdown: mt,
201
- BentoInputField: Dt,
202
- BentoSegmentedControl: ft,
200
+ BentoDropdown: Dt,
201
+ BentoInputField: ct,
202
+ BentoSegmentedControl: mt,
203
203
  BentoTypography: Ne,
204
- Calendar: q
204
+ Calendar: L
205
205
  },
206
206
  props: {
207
207
  /**
@@ -218,7 +218,7 @@ const wt = /[\d]/, Ct = /^\d{2}$/, xt = /^\d{2}:\d{2}$/, At = (t) => {
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: q.props.firstDayOfWeek,
221
+ firstDayOfWeek: L.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]/, Ct = /^\d{2}$/, xt = /^\d{2}:\d{2}$/, At = (t) => {
230
230
  /**
231
231
  * Indicate if a date should be disabled or not
232
232
  */
233
- isDateDisabled: q.props.isDateDisabled,
233
+ isDateDisabled: L.props.isDateDisabled,
234
234
  /**
235
235
  * Set a maximum number of dates to be selectable by the range.
236
236
  */
237
- maxRange: q.props.maxRange,
237
+ maxRange: L.props.maxRange,
238
238
  /**
239
239
  * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
240
240
  */
241
- min: q.props.min,
241
+ min: L.props.min,
242
242
  /**
243
243
  * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
244
244
  */
245
- max: q.props.max,
245
+ max: L.props.max,
246
246
  /**
247
247
  * Number of months rendered on pane
248
248
  */
249
- numberOfMonths: q.props.numberOfMonths,
249
+ numberOfMonths: L.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,45 +269,45 @@ const wt = /[\d]/, Ct = /^\d{2}$/, xt = /^\d{2}:\d{2}$/, At = (t) => {
269
269
  /**
270
270
  * The type of calendar to display. Defaults to showing days.
271
271
  */
272
- variant: q.props.variant
272
+ variant: L.props.variant
273
273
  },
274
274
  emits: [
275
- v.CUSTOM_RANGE,
276
- v.INPUT,
277
- v.ERROR,
278
- v.FORM_DATE,
279
- v.START_DATE_SELECTED
275
+ f.CUSTOM_RANGE,
276
+ f.INPUT,
277
+ f.ERROR,
278
+ f.FORM_DATE,
279
+ f.START_DATE_SELECTED
280
280
  ],
281
281
  setup(t, { emit: e, slots: n }) {
282
282
  var Te, _e, Re, be;
283
- const { locale: i, t: l } = ye(), D = ge(), f = g(() => t.variant === "month" ? "monthly" : "daily"), r = ce({
283
+ const { locale: i, t: l } = ye(), c = ge(), D = g(() => t.variant === "month" ? "monthly" : "daily"), r = De({
284
284
  startDate: (Te = t.value) == null ? void 0 : Te.startDate,
285
285
  endDate: (_e = t.value) == null ? void 0 : _e.endDate,
286
286
  range: (Re = t.value) == null ? void 0 : Re.range,
287
287
  ...t.granularities ? {
288
- granularity: ((be = t.value) == null ? void 0 : be.granularity) || f.value
288
+ granularity: ((be = t.value) == null ? void 0 : be.granularity) || D.value
289
289
  } : {}
290
290
  });
291
291
  function y(a) {
292
- return new Date(
292
+ return a ? new Date(
293
293
  a.getUTCFullYear(),
294
294
  a.getUTCMonth(),
295
295
  a.getUTCDate(),
296
296
  a.getUTCHours(),
297
297
  a.getUTCMinutes(),
298
298
  a.getUTCSeconds()
299
- );
299
+ ) : null;
300
300
  }
301
301
  const T = g(() => {
302
- var a, s;
302
+ var a, o;
303
303
  return (
304
304
  // eslint-disable-next-line consistent-return
305
- ((s = (a = t == null ? void 0 : t.quickSelectRanges) == null ? void 0 : a.find(({ value: u, data: d }) => {
305
+ ((o = (a = t == null ? void 0 : t.quickSelectRanges) == null ? void 0 : a.find(({ value: u, data: d }) => {
306
306
  if (!d.endDate)
307
- return u === r.range || Rt(
307
+ return u === r.range || _t(
308
308
  y(d.startDate),
309
309
  y(r.startDate)
310
- ) && It(r.endDate);
310
+ ) && bt(r.endDate);
311
311
  if (t.allowTimeInput)
312
312
  return xe(
313
313
  y(d.startDate),
@@ -315,257 +315,257 @@ const wt = /[\d]/, Ct = /^\d{2}$/, xt = /^\d{2}:\d{2}$/, At = (t) => {
315
315
  ) && xe(y(d.endDate), y(r.endDate));
316
316
  if (d.endDate)
317
317
  return B(d.startDate, r.startDate) && B(d.endDate, r.endDate);
318
- })) == null ? void 0 : s.value) ?? Ue
318
+ })) == null ? void 0 : o.value) ?? Ue
319
319
  );
320
- }), ae = g(() => ({
320
+ }), se = g(() => ({
321
321
  "b-date-range-picker-calendar__form-input-wrapper": t.allowTimeInput
322
322
  })), _ = g(() => [
323
323
  { label: l("customRange"), value: Ue },
324
- ...x.value ? x.value : []
325
- ]), C = g(
324
+ ...t.quickSelectRanges ? t.quickSelectRanges : []
325
+ ]), x = g(
326
326
  () => {
327
327
  var a;
328
- return ((a = t.granularities) == null ? void 0 : a.find(({ type: s }) => s === r.granularity)) || null;
328
+ return ((a = t.granularities) == null ? void 0 : a.find(({ type: o }) => o === r.granularity)) || null;
329
329
  }
330
- ), b = g(
330
+ ), I = g(
331
331
  () => {
332
332
  var a;
333
- return ((a = t.granularities) == null ? void 0 : a.map(({ type: s, disabled: u }) => ({
334
- label: l(s),
335
- value: s,
333
+ return ((a = t.granularities) == null ? void 0 : a.map(({ type: o, disabled: u }) => ({
334
+ label: l(o),
335
+ value: o,
336
336
  disabled: u
337
337
  }))) ?? [];
338
338
  }
339
- ), x = g(
340
- () => t.quickSelectRanges && t.quickSelectRanges.map((a) => ({
341
- ...a,
342
- data: {
343
- ...a.data,
344
- // Adding timeDifference to calculate an up-to-date endDate on range selection
345
- timeDifference: a.data.endDate ? void 0 : new Date(Date.now()).getTime() - a.data.startDate.getTime()
346
- }
347
- }))
348
- ), { getGranularCalendarLimits: Y } = Ot(t), m = g(
349
- () => t.granularities ? Y(C.value) : { min: z(t.min), max: N(t.max) }
339
+ ), { getGranularCalendarLimits: z } = ht(t), v = g(
340
+ () => t.granularities ? z(x.value) : { min: Z(t.min), max: W(t.max) }
350
341
  ), {
351
- adjustDateForQuarterly: $,
352
- adjustDateForMonthly: A,
353
- adjustDateForWeekly: p,
354
- adjustStartDateInputForWeekly: M,
355
- adjustEndDateInputForWeekly: F,
356
- adjustStartDateInputForMonthly: h,
357
- adjustEndDateInputForMonthly: J,
358
- adjustStartDateInputForQuarterly: ne,
359
- adjustEndDateInputForQuarterly: re
360
- } = ut(t.firstDayOfWeek), { savedRanges: I, saveRange: W, resetSavedRanges: se } = Mt(), R = (a) => a ? ee(a, k.NUMERIC_DATE_YEAR_FIRST, {
361
- locale: D[i.value.substring(0, 2)] || D.enUS
362
- }) : "", K = (a) => a ? ee(a, k.HOUR_MINUTE_SECONDS, {
363
- locale: D[i.value.substring(0, 2)] || D.enUS
364
- }) : "", j = O(!1), Q = O(!1), G = O(!1), H = O(!1), o = ce({
342
+ adjustDateForQuarterly: O,
343
+ adjustDateForMonthly: $,
344
+ adjustDateForWeekly: A,
345
+ adjustStartDateInputForWeekly: p,
346
+ adjustEndDateInputForWeekly: C,
347
+ adjustStartDateInputForMonthly: F,
348
+ adjustEndDateInputForMonthly: M,
349
+ adjustStartDateInputForQuarterly: ee,
350
+ adjustEndDateInputForQuarterly: oe
351
+ } = lt(t.firstDayOfWeek), { savedRanges: U, saveRange: N, resetSavedRanges: G } = Ot(), b = (a) => a ? ne(a, k.NUMERIC_DATE_YEAR_FIRST, {
352
+ locale: c[i.value.substring(0, 2)] || c.enUS
353
+ }) : "", J = (a) => a ? ne(a, k.HOUR_MINUTE_SECONDS, {
354
+ locale: c[i.value.substring(0, 2)] || c.enUS
355
+ }) : "", q = w(!1), j = w(!1), Q = w(!1), H = w(!1), s = De({
365
356
  startDate: t.dateFormData.startDate,
366
357
  endDate: t.dateFormData.endDate,
367
358
  startTime: t.dateFormData.startTime,
368
359
  endTime: t.dateFormData.endTime
369
- }), oe = (a) => /^(?:[01]\d|2[01234]):(?:[012345]\d):(?:[012345]\d)$/.test(a), c = (a, s) => {
370
- if (!s || !oe(s) || t.variant === "month")
360
+ }), ie = (a) => /^(?:[01]\d|2[01234]):(?:[012345]\d):(?:[012345]\d)$/.test(a), E = (a, o) => {
361
+ if (!o || !ie(o) || t.variant === "month")
371
362
  return a;
372
363
  let u = new Date(a);
373
- const [d, S, V] = s.split(":");
374
- return u = St(u, parseInt(d, 10)), u = kt(u, parseInt(S, 10)), u = Et(u, parseInt(V, 10)), u;
375
- }, U = (a) => {
376
- r.startDate = c(a.startDate, o.startTime), r.endDate = c(a.endDate, o.endTime), r.range = null, t.granularities && se(), e(v.INPUT, {
364
+ const [d, S, V] = o.split(":");
365
+ return u = It(u, parseInt(d, 10)), u = St(u, parseInt(S, 10)), u = kt(u, parseInt(V, 10)), u;
366
+ }, m = (a) => {
367
+ r.startDate = E(a.startDate, s.startTime), r.endDate = E(a.endDate, s.endTime), r.range = null, t.granularities && G(), e(f.INPUT, {
377
368
  ...r,
378
369
  range: T.value
379
370
  });
380
- }, w = (a) => {
381
- const s = (d) => t.min && d <= t.min || t.max && d >= t.max ? !1 : t.isDateDisabled ? !t.isDateDisabled(d) : !0;
382
- return /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(a) && s(new Date(a));
371
+ }, R = (a) => {
372
+ const o = (d) => t.min && d <= t.min || t.max && d >= t.max ? !1 : t.isDateDisabled ? !t.isDateDisabled(d) : !0;
373
+ return /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(a) && o(new Date(a));
383
374
  };
384
375
  Be(() => {
385
- t.dateFormData.startDate && !w(t.dateFormData.startDate) ? j.value = !0 : (j.value = !1, G.value = !1), t.dateFormData.endDate && !w(t.dateFormData.endDate) ? Q.value = !0 : (Q.value = !1, H.value = !1);
376
+ t.dateFormData.startDate && !R(t.dateFormData.startDate) ? q.value = !0 : (q.value = !1, Q.value = !1), t.dateFormData.endDate && !R(t.dateFormData.endDate) ? j.value = !0 : (j.value = !1, H.value = !1);
386
377
  });
387
- const me = (a) => {
388
- var s;
389
- o.startDate = R(a), o.startTime ? G.value && (o.startTime = (s = t.dateFormData) == null ? void 0 : s.startTime) : o.startTime = K(a), j.value = !1, G.value = !1, e(v.START_DATE_SELECTED, a);
390
- }, $e = (a) => {
391
- var s;
392
- o.endDate = R(a), o.endTime ? H.value && (o.endTime = (s = t.dateFormData) == null ? void 0 : s.endTime) : o.endTime = K(N(a)), Q.value = !1, H.value = !1;
393
- }, ie = (a) => {
394
- const s = t.value[a];
395
- if (s)
396
- return s;
397
- if (t.dateFormData[a] && w(t.dateFormData[a]))
378
+ const X = (a) => {
379
+ var o;
380
+ s.startDate = b(a), s.startTime ? Q.value && (s.startTime = (o = t.dateFormData) == null ? void 0 : o.startTime) : s.startTime = J(a), q.value = !1, Q.value = !1, e(f.START_DATE_SELECTED, a);
381
+ }, me = (a) => {
382
+ var o;
383
+ s.endDate = b(a), s.endTime ? H.value && (s.endTime = (o = t.dateFormData) == null ? void 0 : o.endTime) : s.endTime = J(W(a)), j.value = !1, H.value = !1;
384
+ }, le = (a) => {
385
+ const o = t.value[a];
386
+ if (o)
387
+ return o;
388
+ if (t.dateFormData[a] && R(t.dateFormData[a]))
398
389
  return new Date(t.dateFormData[a]);
399
- }, je = ue((a) => {
400
- var s;
401
- if (w(a)) {
390
+ }, $e = de((a) => {
391
+ var o;
392
+ if (R(a)) {
402
393
  let u = a;
403
- switch (j.value = !1, (s = C.value) == null ? void 0 : s.type) {
394
+ switch (q.value = !1, (o = x.value) == null ? void 0 : o.type) {
404
395
  case "weekly":
405
- u = M(
396
+ u = p(
406
397
  a,
407
- R,
408
- m.value.min,
409
- m.value.max
410
- ), o.startDate = u;
398
+ b,
399
+ v.value.min,
400
+ v.value.max
401
+ ), s.startDate = u;
411
402
  break;
412
403
  case "monthly":
413
- u = h(
404
+ u = F(
414
405
  a,
415
- R,
416
- m.value.min,
417
- m.value.max
418
- ), o.startDate = u;
406
+ b,
407
+ v.value.min,
408
+ v.value.max
409
+ ), s.startDate = u;
419
410
  break;
420
411
  case "quarterly":
421
- u = ne(
412
+ u = ee(
422
413
  a,
423
- R,
424
- m.value.min,
425
- m.value.max
426
- ), o.startDate = u;
414
+ b,
415
+ v.value.min,
416
+ v.value.max
417
+ ), s.startDate = u;
427
418
  break;
428
419
  }
429
- const d = De(u);
430
- r.startDate = c(d, o.startTime);
431
- const S = ie("endDate");
432
- e(v.FORM_DATE, {
420
+ const d = K(u);
421
+ r.startDate = E(d, s.startTime), r.endDate = E(
422
+ K(s.endDate),
423
+ s.endTime
424
+ ), R(s.endDate) && (r.endDate = E(
425
+ K(s.endDate),
426
+ s.endTime
427
+ ));
428
+ const S = le("endDate");
429
+ r.range = null, e(f.FORM_DATE, {
433
430
  startDate: d,
434
431
  endDate: S
435
- }), e(v.INPUT, {
432
+ }), e(f.INPUT, {
436
433
  ...r,
437
434
  range: T.value
438
435
  });
439
436
  } else
440
- j.value = !0, e(v.ERROR, { ...o });
441
- }, Fe), Qe = (a) => {
442
- o.startDate = he(a), je(o.startDate);
443
- }, Ge = ue((a) => {
444
- var s;
445
- if (w(a)) {
437
+ q.value = !0, e(f.ERROR, { ...s });
438
+ }, Fe), Ge = (a) => {
439
+ s.startDate = he(a), $e(s.startDate);
440
+ }, je = de((a) => {
441
+ var o;
442
+ if (R(a)) {
446
443
  let u = a;
447
- switch (Q.value = !1, (s = C.value) == null ? void 0 : s.type) {
444
+ switch (j.value = !1, (o = x.value) == null ? void 0 : o.type) {
448
445
  case "weekly":
449
- u = F(
446
+ u = C(
450
447
  a,
451
- R,
452
- m.value.min,
453
- m.value.max
454
- ), o.endDate = u;
448
+ b,
449
+ v.value.min,
450
+ v.value.max
451
+ ), s.endDate = u;
455
452
  break;
456
453
  case "monthly":
457
- u = J(
454
+ u = M(
458
455
  a,
459
- R,
460
- m.value.min,
461
- m.value.max
462
- ), o.endDate = u;
456
+ b,
457
+ v.value.min,
458
+ v.value.max
459
+ ), s.endDate = u;
463
460
  break;
464
461
  case "quarterly":
465
- u = re(
462
+ u = oe(
466
463
  a,
467
- R,
468
- m.value.min,
469
- m.value.max
470
- ), o.endDate = u;
464
+ b,
465
+ v.value.min,
466
+ v.value.max
467
+ ), s.endDate = u;
471
468
  break;
472
469
  }
473
- const d = De(u);
474
- r.endDate = c(d, o.endTime);
475
- const S = ie("startDate");
476
- e(v.FORM_DATE, {
470
+ const d = K(u);
471
+ r.endDate = E(d, s.endTime), R(s.startDate) && (r.startDate = E(
472
+ K(s.startDate),
473
+ s.startTime
474
+ ));
475
+ const S = le("startDate");
476
+ r.range = null, e(f.FORM_DATE, {
477
477
  startDate: S,
478
478
  endDate: d
479
- }), e(v.INPUT, {
479
+ }), e(f.INPUT, {
480
480
  ...r,
481
481
  range: T.value
482
482
  });
483
483
  } else
484
- Q.value = !0, e(v.ERROR, { ...o });
485
- }, Fe), He = (a) => {
486
- o.endDate = he(a), Ge(o.endDate);
487
- }, Ve = (a) => {
488
- dt(a);
489
- }, We = ue((a) => {
490
- if (oe(a)) {
491
- G.value = !1, r.startDate = c(r.startDate, a);
492
- const s = ie("endDate");
493
- e(v.FORM_DATE, {
484
+ j.value = !0, e(f.ERROR, { ...s });
485
+ }, Fe), Qe = (a) => {
486
+ s.endDate = he(a), je(s.endDate);
487
+ }, He = (a) => {
488
+ ut(a);
489
+ }, Ve = de((a) => {
490
+ if (ie(a)) {
491
+ Q.value = !1, r.startDate = E(r.startDate, a);
492
+ const o = le("endDate");
493
+ e(f.FORM_DATE, {
494
494
  startDate: new Date(r.startDate),
495
- endDate: s,
495
+ endDate: o,
496
496
  startTime: a,
497
497
  endTime: t.dateFormData.endTime
498
- }), e(v.INPUT, {
498
+ }), e(f.INPUT, {
499
499
  ...r,
500
500
  range: T.value
501
501
  });
502
502
  } else
503
- G.value = !0, e(v.ERROR, { ...o });
504
- }), Ke = ue((a) => {
505
- if (oe(a)) {
506
- H.value = !1, r.endDate = c(r.endDate, a);
507
- const s = ie("startDate");
508
- r.startDate = c(new Date(s), t.dateFormData.startTime), e(v.FORM_DATE, {
509
- startDate: c(new Date(s), t.dateFormData.startTime),
503
+ Q.value = !0, e(f.ERROR, { ...s });
504
+ }), We = de((a) => {
505
+ if (ie(a)) {
506
+ H.value = !1, r.endDate = E(r.endDate, a);
507
+ const o = le("startDate");
508
+ r.startDate = E(new Date(o), t.dateFormData.startTime), e(f.FORM_DATE, {
509
+ startDate: E(new Date(o), t.dateFormData.startTime),
510
510
  endDate: new Date(r.endDate),
511
511
  startTime: t.dateFormData.startTime,
512
512
  endTime: a
513
- }), e(v.INPUT, {
513
+ }), e(f.INPUT, {
514
514
  ...r,
515
515
  range: T.value
516
516
  });
517
517
  } else
518
- H.value = !0, e(v.ERROR, { ...o });
519
- }), ze = (a) => {
520
- o.startTime = Ae(a), We(o.startTime);
518
+ H.value = !0, e(f.ERROR, { ...s });
519
+ }), Ke = (a) => {
520
+ s.startTime = Ae(a), Ve(s.startTime);
521
+ }, ze = (a) => {
522
+ s.endTime = Ae(a), We(s.endTime);
521
523
  }, Je = (a) => {
522
- o.endTime = Ae(a), Ke(o.endTime);
524
+ xt(a);
525
+ }, ue = (a, o, u, d) => {
526
+ r.startDate = a, r.endDate = o, u && (r.granularity = u), d && (r.range = d);
523
527
  }, Xe = (a) => {
524
- At(a);
525
- }, le = (a, s, u, d) => {
526
- r.startDate = a, r.endDate = s, u && (r.granularity = u), d && (r.range = d);
527
- }, Ze = (a) => {
528
528
  var u;
529
- const s = (u = x.value) == null ? void 0 : u.find(({ value: d }) => d === a);
530
- if (s) {
531
- se();
532
- const d = s.data, S = d.endDate || new Date(Date.now()), V = d.timeDifference ? new Date(S.getTime() - d.timeDifference) : d.startDate;
533
- o.endDate = R(S), o.startDate = R(V), le(V, S, null, a), t.granularities && (r.granularity = d.granularity || f.value), o.startTime || (o.startTime = K(N(V))), o.endTime || (o.endTime = K(N(S))), r.startDate = V, r.endDate = S, e(v.CUSTOM_RANGE, {
534
- ...s.data,
529
+ const o = (u = t.quickSelectRanges) == null ? void 0 : u.find(({ value: d }) => d === a);
530
+ if (o) {
531
+ G();
532
+ const d = o.data, S = d.endDate || new Date(Date.now()), V = d.timeDifference ? new Date(S.getTime() - d.timeDifference) : d.startDate;
533
+ s.endDate = b(S), s.startDate = b(V), ue(V, S, null, a), t.granularities && (r.granularity = d.granularity || D.value), s.startTime = J(V), s.endTime = J(S), r.endDate = S, r.startDate = V, e(f.CUSTOM_RANGE, {
534
+ ...o.data,
535
535
  startDate: V,
536
536
  endDate: S,
537
- range: s.value
537
+ range: o.value
538
538
  });
539
539
  }
540
- }, et = {
541
- weekly: p,
542
- monthly: A,
543
- quarterly: $
544
- }, tt = (a) => {
545
- const s = r.granularity;
546
- if (r.granularity = a, s && W(s, structuredClone(pe(r))), r.startDate && r.endDate) {
540
+ }, Ze = {
541
+ weekly: A,
542
+ monthly: $,
543
+ quarterly: O
544
+ }, et = (a) => {
545
+ const o = r.granularity;
546
+ if (r.granularity = a, o && N(o, structuredClone(pe(r))), r.startDate && r.endDate) {
547
547
  switch (a) {
548
548
  case "quarterly":
549
549
  case "monthly":
550
550
  case "weekly": {
551
- if (I[a]) {
552
- le(I[a].startDate, I[a].endDate, a);
551
+ if (U[a]) {
552
+ ue(U[a].startDate, U[a].endDate, a);
553
553
  break;
554
554
  }
555
- const { startDate: u, endDate: d } = et[a](
555
+ const { startDate: u, endDate: d } = Ze[a](
556
556
  r.startDate,
557
557
  r.endDate,
558
- m.value.min,
559
- m.value.max
558
+ v.value.min,
559
+ v.value.max
560
560
  );
561
- le(u, d, a);
561
+ ue(u, d, a);
562
562
  break;
563
563
  }
564
564
  case "daily":
565
- I.daily && le(I.daily.startDate, I.daily.endDate, a);
565
+ U.daily && ue(U.daily.startDate, U.daily.endDate, a);
566
566
  break;
567
567
  }
568
- o.startDate = R(r.startDate), o.endDate = R(r.endDate), e(v.INPUT, {
568
+ s.startDate = b(r.startDate), s.endDate = b(r.endDate), e(f.INPUT, {
569
569
  ...r,
570
570
  range: T.value
571
571
  });
@@ -574,39 +574,38 @@ const wt = /[\d]/, Ct = /^\d{2}$/, xt = /^\d{2}:\d{2}$/, At = (t) => {
574
574
  return {
575
575
  // Values
576
576
  internalRangeDate: r,
577
- dateTextInput: o,
578
- endDateError: Q,
577
+ dateTextInput: s,
578
+ endDateError: j,
579
579
  endTimeError: H,
580
- granularityItems: b,
581
- selectedGranularity: C,
582
- computedMinMax: m,
580
+ granularityItems: I,
581
+ selectedGranularity: x,
582
+ computedMinMax: v,
583
583
  selectedRangeSelectorValue: T,
584
- startDateError: j,
585
- startTimeError: G,
586
- adjustedQuickSelectRanges: x,
584
+ startDateError: q,
585
+ startTimeError: Q,
587
586
  quickSelectRangeDefaultItems: _,
588
- formInputWrapperConditionalClasses: ae,
587
+ formInputWrapperConditionalClasses: se,
589
588
  // Methods
590
- hasSlot: vt(n),
589
+ hasSlot: ft(n),
591
590
  t: l,
592
591
  // Events
593
- onDateInput: U,
594
- onDateInputKeyDown: Ve,
595
- onEndDateInput: He,
596
- onEndDateSelected: $e,
597
- onEndTimeInput: Je,
598
- onGranularityInput: tt,
599
- onRangeSelectorInput: Ze,
600
- onStartDateInput: Qe,
601
- onStartDateSelected: me,
602
- onStartTimeInput: ze,
603
- onTimeInputKeyDown: Xe
592
+ onDateInput: m,
593
+ onDateInputKeyDown: He,
594
+ onEndDateInput: Qe,
595
+ onEndDateSelected: me,
596
+ onEndTimeInput: ze,
597
+ onGranularityInput: et,
598
+ onRangeSelectorInput: Xe,
599
+ onStartDateInput: Ge,
600
+ onStartDateSelected: X,
601
+ onStartTimeInput: Ke,
602
+ onTimeInputKeyDown: Je
604
603
  };
605
604
  }
606
605
  });
607
- var Pt = function() {
606
+ var Ut = function() {
608
607
  var e = this, n = e._self._c;
609
- return e._self._setupProxy, n("div", { staticClass: "b-date-range-picker-calendar" }, [n("div", { staticClass: "b-date-range-picker-calendar__form-container" }, [n("div", { staticClass: "b-date-range-picker-calendar__form" }, [e.hasSlot("title") ? [e._t("title")] : e._e(), e.adjustedQuickSelectRanges ? n("bento-dropdown", { attrs: { "aria-label": e.t("customRange"), items: e.quickSelectRangeDefaultItems, value: e.selectedRangeSelectorValue }, on: { input: e.onRangeSelectorInput } }) : e._e(), e.granularities ? n("bento-segmented-control", { attrs: { items: e.granularityItems, "model-value": e.internalRangeDate.granularity, "full-width": "" }, on: { "update:model-value": e.onGranularityInput } }) : e._e(), n("div", [n("bento-typography", { staticClass: "b-date-range-picker-calendar__label", attrs: { stronger: "", el: "span" } }, [e._v(" From ")]), n("div", { class: e.formInputWrapperConditionalClasses }, [n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.t("dateFrom"), value: e.dateTextInput.startDate, error: e.startDateError }, on: { input: e.onStartDateInput, keydown: e.onDateInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
608
+ return e._self._setupProxy, n("div", { staticClass: "b-date-range-picker-calendar" }, [n("div", { staticClass: "b-date-range-picker-calendar__form-container" }, [n("div", { staticClass: "b-date-range-picker-calendar__form" }, [e.hasSlot("title") ? [e._t("title")] : e._e(), e.quickSelectRanges ? n("bento-dropdown", { attrs: { "aria-label": e.t("customRange"), items: e.quickSelectRangeDefaultItems, value: e.selectedRangeSelectorValue }, on: { input: e.onRangeSelectorInput } }) : e._e(), e.granularities ? n("bento-segmented-control", { attrs: { items: e.granularityItems, "model-value": e.internalRangeDate.granularity, "full-width": "" }, on: { "update:model-value": e.onGranularityInput } }) : e._e(), n("div", [n("bento-typography", { staticClass: "b-date-range-picker-calendar__label", attrs: { stronger: "", el: "span" } }, [e._v(" From ")]), n("div", { class: e.formInputWrapperConditionalClasses }, [n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.t("dateFrom"), value: e.dateTextInput.startDate, error: e.startDateError }, on: { input: e.onStartDateInput, keydown: e.onDateInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
610
609
  return [e._v("YYYY-MM-DD")];
611
610
  }, proxy: !0 }]) }), e.allowTimeInput ? n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.t("timeFrom"), value: e.dateTextInput.startTime, error: e.startTimeError }, on: { input: e.onStartTimeInput, keydown: e.onTimeInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
612
611
  return [e._v("HH:MM:SS")];
@@ -615,28 +614,28 @@ var Pt = function() {
615
614
  }, proxy: !0 }]) }), e.allowTimeInput ? n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.t("timeTo"), value: e.dateTextInput.endTime, error: e.endTimeError }, on: { input: e.onEndTimeInput, keydown: e.onTimeInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
616
615
  return [e._v("HH:MM:SS")];
617
616
  }, proxy: !0 }], null, !1, 3442289499) }) : e._e()], 1)], 1)], 2), e.hasSlot("actions") ? n("div", [e._t("actions")], 2) : e._e()]), n("div", { staticClass: "b-date-range-picker-calendar__calendars-container" }, [n("calendar", { attrs: { value: e.internalRangeDate, "first-day-of-week": e.firstDayOfWeek, "is-date-disabled": e.isDateDisabled, "max-range": e.maxRange, min: e.computedMinMax.min, max: e.computedMinMax.max, "number-of-months": e.numberOfMonths, "show-end-date-on-open": e.showEndDateOnOpen, granularity: e.selectedGranularity, variant: e.variant, "is-range": "" }, on: { input: e.onDateInput, "start-date-selected": e.onStartDateSelected, "end-date-selected": e.onEndDateSelected } })], 1)]);
618
- }, Bt = [], Nt = /* @__PURE__ */ Le(
617
+ }, Pt = [], Bt = /* @__PURE__ */ Le(
618
+ Ft,
619
619
  Ut,
620
620
  Pt,
621
- Bt,
622
621
  !1,
623
622
  null,
624
- "508ade99"
623
+ "0477a483"
625
624
  );
626
- const P = Nt.exports, qt = ({
625
+ const P = Bt.exports, Nt = ({
627
626
  datePickerValue: t,
628
627
  isDateIncorrect: e,
629
628
  quickSelectRanges: n,
630
629
  isMonthVariant: i
631
630
  }) => {
632
- var C, b, x, Y;
633
- const { locale: l, t: D } = ye(), f = ge(), r = (m) => !!m && !isNaN(m.getTime()), y = (m, $) => r(m) ? ee(m, $, {
634
- locale: f[l.value.substring(0, 2)] || f.enUS
635
- }) : void 0, T = ce({
636
- startDate: y((C = t.value) == null ? void 0 : C.startDate, k.NUMERIC_DATE_YEAR_FIRST),
637
- endDate: y((b = t.value) == null ? void 0 : b.endDate, k.NUMERIC_DATE_YEAR_FIRST),
638
- startTime: y((x = t.value) == null ? void 0 : x.startDate, k.HOUR_MINUTE_SECONDS),
639
- endTime: y((Y = t.value) == null ? void 0 : Y.endDate, k.HOUR_MINUTE_SECONDS)
631
+ var x, I, z, v;
632
+ const { locale: l, t: c } = ye(), D = ge(), r = (O) => !!O && !isNaN(O.getTime()), y = (O, $) => r(O) ? ne(O, $, {
633
+ locale: D[l.value.substring(0, 2)] || D.enUS
634
+ }) : void 0, T = De({
635
+ startDate: y((x = t.value) == null ? void 0 : x.startDate, k.NUMERIC_DATE_YEAR_FIRST),
636
+ endDate: y((I = t.value) == null ? void 0 : I.endDate, k.NUMERIC_DATE_YEAR_FIRST),
637
+ startTime: y((z = t.value) == null ? void 0 : z.startDate, k.HOUR_MINUTE_SECONDS),
638
+ endTime: y((v = t.value) == null ? void 0 : v.endDate, k.HOUR_MINUTE_SECONDS)
640
639
  });
641
640
  return {
642
641
  // Values
@@ -645,25 +644,25 @@ const P = Nt.exports, qt = ({
645
644
  if (e.value)
646
645
  return `${T.startDate || ""} - ${T.endDate || ""}`;
647
646
  if (!t.value || !t.value.startDate && !t.value.endDate)
648
- return D("selectDateRange");
647
+ return c("selectDateRange");
649
648
  if ((p = n.value) != null && p.length) {
650
- const M = n.value.find(({ value: F }) => {
651
- var h;
652
- return F === ((h = t.value) == null ? void 0 : h.range);
649
+ const C = n.value.find(({ value: F }) => {
650
+ var M;
651
+ return F === ((M = t.value) == null ? void 0 : M.range);
653
652
  });
654
- if (M)
655
- return M.label;
653
+ if (C)
654
+ return C.label;
656
655
  }
657
656
  if (t.value.granularity === "quarterly") {
658
- const { startDate: M, endDate: F } = t.value, h = D("quarter", { quarter: Me(M), year: we(M) });
659
- if (bt(M, F))
660
- return h;
661
- const J = D("quarter", { quarter: Me(F), year: we(F) });
662
- return `${h} - ${J}`;
657
+ const { startDate: C, endDate: F } = t.value, M = c("quarter", { quarter: Me(C), year: we(C) });
658
+ if (Rt(C, F))
659
+ return M;
660
+ const ee = c("quarter", { quarter: Me(F), year: we(F) });
661
+ return `${M} - ${ee}`;
663
662
  }
664
- const { startDate: m, endDate: $ } = T, A = i != null && i.value ? k.LONG_MONTH_YEAR : k.FULL_DATE_MONTH_FIRST;
665
- return `${y(De(m), A)} - ${y(
666
- De($),
663
+ const { startDate: O, endDate: $ } = T, A = i != null && i.value ? k.LONG_MONTH_YEAR : k.FULL_DATE_MONTH_FIRST;
664
+ return `${y(K(O), A)} - ${y(
665
+ K($),
667
666
  A
668
667
  )}`;
669
668
  }),
@@ -672,8 +671,8 @@ const P = Nt.exports, qt = ({
672
671
  formatTextInputDisplayValue: () => ""
673
672
  };
674
673
  };
675
- var de = /* @__PURE__ */ ((t) => (t.INPUT = "input", t))(de || {});
676
- const Lt = {
674
+ var ce = /* @__PURE__ */ ((t) => (t.INPUT = "input", t))(ce || {});
675
+ const qt = {
677
676
  "en-US": {
678
677
  apply: "Apply",
679
678
  cancel: "Cancel",
@@ -694,20 +693,20 @@ const Lt = {
694
693
  cancel: "Cancelar",
695
694
  selectDate: "Selecione uma data"
696
695
  }
697
- }, Yt = Pe({
698
- i18n: { messages: Lt },
696
+ }, Lt = Pe({
697
+ i18n: { messages: qt },
699
698
  name: "bento-date-range-picker",
700
699
  components: {
701
- BentoButtonActions: Tt,
702
- BentoDivider: at,
700
+ BentoButtonActions: yt,
701
+ BentoDivider: tt,
703
702
  BentoTypography: Ne,
704
- BentoPopover: nt,
703
+ BentoPopover: at,
705
704
  DateRangePickerCalendar: P,
706
- DropdownInputDefault: st,
707
- ErrorMessage: yt,
708
- FieldLabel: gt
705
+ DropdownInputDefault: rt,
706
+ ErrorMessage: gt,
707
+ FieldLabel: pt
709
708
  },
710
- directives: { BentoClickOutsideDirective: pt },
709
+ directives: { BentoClickOutsideDirective: vt },
711
710
  props: {
712
711
  /**
713
712
  * Allows user to enter time values in the form
@@ -809,159 +808,159 @@ const Lt = {
809
808
  */
810
809
  hasActions: { type: Boolean, default: !1 }
811
810
  },
812
- emits: [de.INPUT],
811
+ emits: [ce.INPUT],
813
812
  setup(t, { emit: e }) {
814
- const { locale: n, t: i } = ye(), l = ge(), D = X("bento-date-range-picker-container"), f = X("bento-date-range-picker-label"), r = X("bento-date-range-picker-description"), y = X("bento-date-range-picker-error"), T = X("bento-date-range-picker-date-error"), ae = g(
815
- () => t.label || i("dateRangePicker", { name: D })
816
- ), _ = O(!1), C = O(null), b = O(!1), { isReadOnly: x } = ct(fe(t, "readonly"));
813
+ const { locale: n, t: i } = ye(), l = ge(), c = te("bento-date-range-picker-container"), D = te("bento-date-range-picker-label"), r = te("bento-date-range-picker-description"), y = te("bento-date-range-picker-error"), T = te("bento-date-range-picker-date-error"), se = g(
814
+ () => t.label || i("dateRangePicker", { name: c })
815
+ ), _ = w(!1), x = w(null), I = w(!1), { isReadOnly: z } = dt(fe(t, "readonly"));
817
816
  ve(
818
817
  () => t.disabled,
819
818
  () => {
820
- t.disabled && b.value && (b.value = !1);
819
+ t.disabled && I.value && (I.value = !1);
821
820
  }
822
821
  );
823
- const Y = g(() => t.hasActions ? !W.value && _.value : _.value), m = g(() => ({
824
- "b-date-range-picker__description--error": !!t.errorMessage || Y.value
825
- })), $ = g(() => t.variant === "month"), { dateDisplayValue: A, textInputDisplayValue: p } = qt({
822
+ const v = g(() => t.hasActions ? !G.value && _.value : _.value), O = g(() => ({
823
+ "b-date-range-picker__description--error": !!t.errorMessage || v.value
824
+ })), $ = g(() => t.variant === "month"), { dateDisplayValue: A, textInputDisplayValue: p } = Nt({
826
825
  datePickerValue: fe(t, "value"),
827
826
  isDateIncorrect: _,
828
827
  quickSelectRanges: fe(t, "quickSelectRanges"),
829
828
  isMonthVariant: $
830
- }), M = g(
829
+ }), C = g(
831
830
  () => `${t.description ? r : ""} ${t.errorMessage ? y : ""} ${_.value ? T : ""}`.trim() || null
832
- ), F = g(() => t.allowTimeInput && t.variant !== "month"), h = () => {
833
- b.value = !1;
834
- }, J = () => {
835
- b.value = !0;
836
- }, ne = O(A.value), re = O(
831
+ ), F = g(() => t.allowTimeInput && t.variant !== "month"), M = () => {
832
+ I.value = !1;
833
+ }, ee = () => {
834
+ I.value = !0;
835
+ }, oe = w(A.value), U = w(
837
836
  // textInputDisplayValue is a reactive object
838
837
  structuredClone(pe(p))
839
- ), I = O(t.value), W = O(!0), se = g(
840
- () => t.hasActions ? re.value : p
841
- ), R = g(
842
- () => t.hasActions ? ne.value : A.value
838
+ ), N = w(t.value), G = w(!0), b = g(
839
+ () => t.hasActions ? U.value : p
840
+ ), J = g(
841
+ () => t.hasActions ? oe.value : A.value
843
842
  );
844
843
  Be(() => {
845
- if (t.hasActions || rt(
844
+ if (t.hasActions || nt(
846
845
  'BentoDateRangePicker "hasActions" property',
847
846
  `Set the BentoDateRangePicker "hasActions" property true which will display the "Apply" and "Cancel" buttons.
848
847
  This will be the default behavior in the v2 and "hasActions" will be removed.`,
849
848
  "2.0.0"
850
- ), t.granularities && t.variant !== "month" && t.granularities.find(({ type: c }) => c === "quarterly"))
849
+ ), t.granularities && t.variant !== "month" && t.granularities.find(({ type: m }) => m === "quarterly"))
851
850
  throw new Error(
852
851
  'Quarterly granularity is only supported by BentoDateRangePicker with variant: "month"'
853
852
  );
854
853
  }), ve(
855
854
  () => t.value,
856
855
  () => {
857
- ne.value = A.value, re.value = structuredClone(pe(p));
856
+ oe.value = A.value, U.value = structuredClone(pe(p));
858
857
  }
859
858
  );
860
- const K = g(() => [
859
+ const q = g(() => [
861
860
  {
862
861
  title: i("apply"),
863
862
  event: () => {
864
- e(de.INPUT, I.value), h(), W.value = !0;
863
+ e(ce.INPUT, N.value), M(), G.value = !0;
865
864
  },
866
- disabled: W.value
865
+ disabled: G.value
867
866
  },
868
867
  {
869
868
  title: i("cancel"),
870
- event: h
869
+ event: M
871
870
  }
872
871
  ]);
873
- return ve(I, (c) => {
872
+ return ve(N, (m) => {
874
873
  if (t.hasActions) {
875
- W.value = _.value;
874
+ G.value = _.value;
876
875
  return;
877
876
  }
878
- e(de.INPUT, c);
877
+ e(ce.INPUT, m);
879
878
  }), {
880
879
  // Refs
881
- inputContainerRef: C,
880
+ inputContainerRef: x,
882
881
  // Values,
883
882
  dateDisplayValue: A,
884
- datePickerContainerId: D,
885
- descriptionConditionalClasses: m,
886
- displayedTextInputValue: se,
887
- displayedDateValue: R,
883
+ datePickerContainerId: c,
884
+ descriptionConditionalClasses: O,
885
+ displayedTextInputValue: b,
886
+ displayedDateValue: J,
888
887
  isDateIncorrect: _,
889
- isDateRangePickerOpen: b,
890
- isReadOnly: x,
891
- labelId: f,
888
+ isDateRangePickerOpen: I,
889
+ isReadOnly: z,
890
+ labelId: D,
892
891
  descriptionId: r,
893
892
  dateErrorId: T,
894
893
  errorId: y,
895
- popoverAriaLabel: ae,
896
- shouldDisplayError: Y,
897
- ariaDescribedBy: M,
894
+ popoverAriaLabel: se,
895
+ shouldDisplayError: v,
896
+ ariaDescribedBy: C,
898
897
  textInputDisplayValue: p,
899
- rangePickerButtonActions: K,
900
- BentoButtonActionsLayout: _t,
898
+ rangePickerButtonActions: q,
899
+ BentoButtonActionsLayout: Tt,
901
900
  withTimeInput: F,
902
901
  // Events
903
- closeDateRangePicker: h,
902
+ closeDateRangePicker: M,
904
903
  clearDateRangePickerValue: async () => {
905
- _.value && (_.value = !1), I.value = null;
904
+ _.value && (_.value = !1), N.value = null;
906
905
  },
907
- openDateRangePicker: J,
908
- onRangeSelectorInput: (c) => {
909
- if (c) {
910
- const U = (w) => ee(w, k.NUMERIC_DATE_YEAR_FIRST, {
906
+ openDateRangePicker: ee,
907
+ onRangeSelectorInput: (m) => {
908
+ if (m) {
909
+ const R = (X) => ne(X, k.NUMERIC_DATE_YEAR_FIRST, {
911
910
  locale: l[n.value.substring(0, 2)] || l.enUS
912
911
  });
913
- p.startDate = U(c.startDate), p.endDate = U(c.endDate), I.value = c;
912
+ p.startDate = R(m.startDate), p.endDate = R(m.endDate), N.value = m;
914
913
  }
915
914
  },
916
915
  onEnterPressedOverInput: () => {
917
- if (!b.value) {
918
- b.value = !0;
916
+ if (!I.value) {
917
+ I.value = !0;
919
918
  return;
920
919
  }
921
- _.value || (b.value = !1);
920
+ _.value || (I.value = !1);
922
921
  },
923
- onDateRangePickerInput: (c) => {
922
+ onDateRangePickerInput: (m) => {
924
923
  _.value = !1;
925
- const U = (w, me) => w ? ee(w, me, {
924
+ const R = (X, me) => X ? ne(X, me, {
926
925
  locale: l[n.value.substring(0, 2)] || l.enUS
927
926
  }) : void 0;
928
- p.startDate = U(
929
- c.startDate,
927
+ p.startDate = R(
928
+ m.startDate,
930
929
  k.NUMERIC_DATE_YEAR_FIRST
931
- ), p.endDate = U(c.endDate, k.NUMERIC_DATE_YEAR_FIRST), p.startTime = U(c.startDate, k.HOUR_MINUTE_SECONDS), p.endTime = U(c.endDate, k.HOUR_MINUTE_SECONDS), I.value = c;
930
+ ), p.endDate = R(m.endDate, k.NUMERIC_DATE_YEAR_FIRST), p.startTime = R(m.startDate, k.HOUR_MINUTE_SECONDS), p.endTime = R(m.endDate, k.HOUR_MINUTE_SECONDS), N.value = m;
932
931
  },
933
- onDateRangePickerError: (c) => {
934
- _.value = !0, p.startDate = c.startDate, p.endDate = c.endDate, I.value = { startDate: null, endDate: null };
932
+ onDateRangePickerError: (m) => {
933
+ _.value = !0, p.startDate = m.startDate, p.endDate = m.endDate, N.value = { startDate: null, endDate: null };
935
934
  },
936
- onDateRangePickerFormDateInputUpdate: (c) => {
937
- _.value = !1, c.startTime && (p.startTime = c.startTime), c.endTime && (p.endTime = c.endTime);
935
+ onDateRangePickerFormDateInputUpdate: (m) => {
936
+ _.value = !1, m.startTime && (p.startTime = m.startTime), m.endTime && (p.endTime = m.endTime);
938
937
  },
939
938
  // Translations
940
939
  t: i
941
940
  };
942
941
  }
943
942
  });
944
- var $t = function() {
943
+ var Yt = function() {
945
944
  var e = this, n = e._self._c;
946
945
  return e._self._setupProxy, n("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.closeDateRangePicker, expression: "closeDateRangePicker" }], staticClass: "b-date-range-picker" }, [e.label ? n("field-label", { attrs: { id: e.labelId, label: e.label, "tooltip-text": e.tooltipText, optional: e.optional, required: e.required } }) : e._e(), n("div", { on: { keydown: function(i) {
947
946
  return !i.type.indexOf("key") && e._k(i.keyCode, "enter", 13, i.key, "Enter") ? null : e.onEnterPressedOverInput.apply(null, arguments);
948
947
  } } }, [n("dropdown-input-default", { ref: "inputContainerRef", attrs: { "always-combobox-is-input": "", ariaControls: e.datePickerContainerId, ariaExpanded: e.isDateRangePickerOpen, "aria-labelledby": e.label ? e.labelId : null, "aria-describedby": e.ariaDescribedBy, disabled: e.disabled, "is-invalid": !!e.errorMessage || e.shouldDisplayError, open: e.isDateRangePickerOpen, "display-value": e.displayedDateValue, readonly: e.isReadOnly }, on: { open: e.openDateRangePicker, clear: e.clearDateRangePickerValue, close: e.closeDateRangePicker } })], 1), e.shouldDisplayError ? n("error-message", { staticClass: "b-date-range-picker__error-message", attrs: { id: e.dateErrorId, "error-message": e.t("provideDateInAFormat") } }) : e._e(), e.errorMessage ? n("error-message", { staticClass: "b-date-range-picker__error-message", attrs: { id: e.errorId, "error-message": e.errorMessage } }) : e._e(), e.description ? n("bento-typography", { staticClass: "b-date-range-picker__description", class: e.descriptionConditionalClasses, attrs: { id: e.descriptionId, el: "span" } }, [e._v(" " + e._s(e.description) + " ")]) : e._e(), e.inputContainerRef ? n("bento-popover", { staticClass: "b-date-range-picker__container", attrs: { id: e.datePickerContainerId, open: e.isDateRangePickerOpen, "target-element": e.inputContainerRef, "disable-focus-trap": !0, "aria-label": e.popoverAriaLabel, position: "bottom-start", "without-space": "", "fit-content": "" } }, [n("date-range-picker-calendar", { attrs: { "allow-time-input": e.withTimeInput, "quick-select-ranges": e.quickSelectRanges, value: e.value, "first-day-of-week": e.firstDayOfWeek, granularities: e.granularities, "is-date-disabled": e.isDateDisabled, "max-range": e.maxRange, min: e.min, max: e.max, "number-of-months": e.numberOfMonths, "show-end-date-on-open": e.showEndDateOnOpen, "date-form-data": e.displayedTextInputValue, variant: e.variant }, on: { "custom-range": e.onRangeSelectorInput, input: e.onDateRangePickerInput, error: e.onDateRangePickerError, "form-date": e.onDateRangePickerFormDateInputUpdate }, scopedSlots: e._u([e.hasActions ? { key: "actions", fn: function() {
949
948
  return [n("bento-divider"), n("div", { staticClass: "b-date-range-picker__footer" }, [n("bento-button-actions", { attrs: { actions: e.rangePickerButtonActions, layout: e.BentoButtonActionsLayout.SPACE_BETWEEN } })], 1)];
950
949
  }, proxy: !0 } : null], null, !0) })], 1) : e._e()], 1);
951
- }, jt = [], Qt = /* @__PURE__ */ Le(
950
+ }, $t = [], Gt = /* @__PURE__ */ Le(
951
+ Lt,
952
952
  Yt,
953
953
  $t,
954
- jt,
955
954
  !1,
956
955
  null,
957
956
  "f7eae115"
958
957
  );
959
- const fa = Qt.exports;
958
+ const ma = Gt.exports;
960
959
  export {
961
- fa as B,
960
+ ma as B,
962
961
  P as D,
963
- de as a,
964
- It as b,
965
- Rt as i
962
+ ce as a,
963
+ bt as b,
964
+ _t as i
966
965
  };
967
- //# sourceMappingURL=date-range-picker.CAQY6v7g.js.map
966
+ //# sourceMappingURL=date-range-picker.Cx4vdGUZ.js.map