@adyen/bento-vue3 1.11.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +11 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-scroller/use-scroller.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/date/date.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +43 -34
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +50 -1052
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +7 -13
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +4 -5
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +4 -5
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +4 -5
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/composables/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/composables/use-display-value.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/composables/{useDisplayValue.types.d.ts → use-display-value.types.d.ts} +16 -0
- package/dist/@types/packages/vue2/src/components/dropdown/composables/{useKeyboardNavigation.d.ts → use-keyboard-navigation.d.ts} +3 -13
- package/dist/@types/packages/vue2/src/components/dropdown/composables/use-keyboard-navigation.types.d.ts +15 -0
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +50 -2435
- package/dist/@types/packages/vue2/src/components/dropdown/index.d.ts +6 -5
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +12 -12
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +17 -11
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +17 -61
- package/dist/@types/packages/vue2/src/components/modal/components/modal-default/modal-default.vue.d.ts +60 -50
- package/dist/@types/packages/vue2/src/components/modal/components/modal-dialog/modal-dialog.vue.d.ts +40 -357
- package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +77 -84
- package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.types.d.ts +6 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +10 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/index.d.ts +1 -0
- package/dist/accordion.js +2 -2
- package/dist/action-bar.js +5 -5
- package/dist/alert.js +3 -3
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index47.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +5 -5
- package/dist/card.js +25 -24
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +6 -6
- package/dist/chunks/{base-button.39fae75f.js → base-button.9f2acdeb.js} +2 -2
- package/dist/chunks/{base-button.39fae75f.js.map → base-button.9f2acdeb.js.map} +1 -1
- package/dist/chunks/base-modal.56a671c3.js +284 -0
- package/dist/chunks/base-modal.56a671c3.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.2ff339f6.js → button-actions-with-menu.080ccaf8.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.2ff339f6.js.map → button-actions-with-menu.080ccaf8.js.map} +1 -1
- package/dist/chunks/{button.623a46d2.js → button.7ce49c43.js} +2 -2
- package/dist/chunks/{button.623a46d2.js.map → button.7ce49c43.js.map} +1 -1
- package/dist/chunks/{calendar.b1d05580.js → calendar.f0f7b405.js} +8 -7
- package/dist/chunks/{calendar.b1d05580.js.map → calendar.f0f7b405.js.map} +1 -1
- package/dist/chunks/{checkbox.d65694f2.js → checkbox.c63cd1d8.js} +3 -3
- package/dist/chunks/{checkbox.d65694f2.js.map → checkbox.c63cd1d8.js.map} +1 -1
- package/dist/chunks/{controls-group.30352ce4.js → controls-group.1660076e.js} +3 -3
- package/dist/chunks/{controls-group.30352ce4.js.map → controls-group.1660076e.js.map} +1 -1
- package/dist/chunks/{copy.2a9cddc1.js → copy.91983fad.js} +4 -4
- package/dist/chunks/{copy.2a9cddc1.js.map → copy.91983fad.js.map} +1 -1
- package/dist/chunks/dropdown-default-textbox.157f95f0.js +399 -0
- package/dist/chunks/dropdown-default-textbox.157f95f0.js.map +1 -0
- package/dist/chunks/dropdown.b0e80aaa.js +902 -0
- package/dist/chunks/dropdown.b0e80aaa.js.map +1 -0
- package/dist/chunks/{field-label.b681234d.js → field-label.894140ec.js} +2 -2
- package/dist/chunks/{field-label.b681234d.js.map → field-label.894140ec.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.ebfb2f80.js → fixed-scroller.708a4c4e.js} +2 -2
- package/dist/chunks/{fixed-scroller.ebfb2f80.js.map → fixed-scroller.708a4c4e.js.map} +1 -1
- package/dist/chunks/{footer-actions.03015ba1.js → footer-actions.21ba3026.js} +3 -3
- package/dist/chunks/{footer-actions.03015ba1.js.map → footer-actions.21ba3026.js.map} +1 -1
- package/dist/chunks/{index.80078bf9.js → index.266dd8ff.js} +2 -2
- package/dist/chunks/{index.80078bf9.js.map → index.266dd8ff.js.map} +1 -1
- package/dist/chunks/{index.45d00aad.js → index.3ec651d0.js} +5 -4
- package/dist/chunks/{index.45d00aad.js.map → index.3ec651d0.js.map} +1 -1
- package/dist/chunks/{index.0a8ddfaa.js → index.46b7b1d3.js} +6 -6
- package/dist/chunks/{index.0a8ddfaa.js.map → index.46b7b1d3.js.map} +1 -1
- package/dist/chunks/{index.1dac266a.js → index.62c5d91f.js} +3 -3
- package/dist/chunks/{index.1dac266a.js.map → index.62c5d91f.js.map} +1 -1
- package/dist/chunks/{index.cf561336.js → index.762f7ec9.js} +6 -6
- package/dist/chunks/{index.cf561336.js.map → index.762f7ec9.js.map} +1 -1
- package/dist/chunks/{index.a4a6e52f.js → index.9ae856b3.js} +3 -3
- package/dist/chunks/{index.a4a6e52f.js.map → index.9ae856b3.js.map} +1 -1
- package/dist/chunks/{index.03605cb0.js → index.a25e53b8.js} +5 -5
- package/dist/chunks/{index.03605cb0.js.map → index.a25e53b8.js.map} +1 -1
- package/dist/chunks/{index.ef1c4d59.js → index.d57976cb.js} +320 -317
- package/dist/chunks/index.d57976cb.js.map +1 -0
- package/dist/chunks/{index.09f7f1b5.js → index.fcfca776.js} +2 -2
- package/dist/chunks/{index.09f7f1b5.js.map → index.fcfca776.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.ff6d6f32.js → listbox-option-tag.1f42ad7f.js} +3 -3
- package/dist/chunks/{listbox-option-tag.ff6d6f32.js.map → listbox-option-tag.1f42ad7f.js.map} +1 -1
- package/dist/chunks/{listbox.dd9883c5.js → listbox.2c0a69a6.js} +6 -6
- package/dist/chunks/{listbox.dd9883c5.js.map → listbox.2c0a69a6.js.map} +1 -1
- package/dist/chunks/{loading-button.30c5fede.js → loading-button.52696f0f.js} +2 -2
- package/dist/chunks/{loading-button.30c5fede.js.map → loading-button.52696f0f.js.map} +1 -1
- package/dist/chunks/{tooltip.785993dd.js → tooltip.d366f95d.js} +3 -3
- package/dist/chunks/{tooltip.785993dd.js.map → tooltip.d366f95d.js.map} +1 -1
- package/dist/chunks/{useCountryItems.d2a1f224.js → use-country-items.d2a1f224.js} +1 -1
- package/dist/chunks/use-country-items.d2a1f224.js.map +1 -0
- package/dist/code-snippet.js +7 -7
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +658 -649
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +36 -35
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/dropdown.js +122 -174
- package/dist/dropdown.js.map +1 -1
- package/dist/empty-state.js +3 -3
- package/dist/filter-bar.js +20 -19
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +2 -2
- package/dist/header.js +3 -3
- package/dist/index.js +203 -200
- package/dist/info-icon.js +3 -3
- package/dist/input-field.js +4 -4
- package/dist/internal.js +7 -7
- package/dist/link.js +40 -30
- package/dist/link.js.map +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal.js +297 -404
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +122 -122
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +4 -4
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +2 -2
- package/dist/segmented-control.js +3 -3
- package/dist/sidepanel.js +5 -5
- package/dist/status.js +2 -2
- package/dist/stepper.js +3 -3
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +3 -3
- package/dist/tabs.js +39 -39
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +3 -3
- package/dist/textarea.js +4 -4
- package/dist/timeline.js +5 -5
- package/dist/toast.js +3 -3
- package/dist/toggle.js +2 -2
- package/dist/tutorial.js +5 -5
- package/dist/typography.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/composables/useDisplayValue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/dropdown/composables/useDropdownSearchFilter.d.ts +0 -3
- package/dist/chunks/base-modal.161ce8f0.js +0 -310
- package/dist/chunks/base-modal.161ce8f0.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.a731b5fb.js +0 -420
- package/dist/chunks/dropdown-default-textbox.a731b5fb.js.map +0 -1
- package/dist/chunks/dropdown.96431c25.js +0 -993
- package/dist/chunks/dropdown.96431c25.js.map +0 -1
- package/dist/chunks/index.ef1c4d59.js.map +0 -1
- package/dist/chunks/useCountryItems.d2a1f224.js.map +0 -1
- /package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/composables/{useDropdownOptionsListbox.d.ts → use-dropdown-options-listbox.d.ts} +0 -0
- /package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/composables/{useCountryItems.d.ts → use-country-items.d.ts} +0 -0
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { a as
|
|
3
|
-
import { B as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { r as ne, t as X, e as h, d as ce, f as De } from "./index.f55fdc32.js";
|
|
1
|
+
import { defineComponent as Pe, reactive as ie, ref as A, computed as O, onMounted as Je, resolveComponent as k, openBlock as b, createElementBlock as le, createElementVNode as P, renderSlot as Te, createCommentVNode as S, createBlock as w, createVNode as G, withCtx as U, createTextVNode as q, normalizeClass as de, toRef as ye, watch as Qe, resolveDirective as Xe, withDirectives as Ze, withKeys as xe, toDisplayString as ea } from "vue";
|
|
2
|
+
import { a as aa } from "./index.a25e53b8.js";
|
|
3
|
+
import { B as Ue } from "./index.fcfca776.js";
|
|
4
|
+
import { g as X } from "./unique-id.a2a2b458.js";
|
|
5
|
+
import { u as me } from "./i18n.6c402773.js";
|
|
6
|
+
import { t as ce, f as z } from "./index.3ec651d0.js";
|
|
7
|
+
import { D as h, f as ke, v as ta } from "./date-input.9186a0bf.js";
|
|
8
|
+
import { r as ne, t as Z, e as C, d as De, f as fe } from "./index.f55fdc32.js";
|
|
10
9
|
import { u as na } from "./use-form-layout-loading.d03e5d48.js";
|
|
11
10
|
import { B as ra } from "./directive.0408e565.js";
|
|
12
11
|
import { BentoInputField as oa } from "../input-field.js";
|
|
13
|
-
import { B as sa } from "./dropdown.
|
|
12
|
+
import { B as sa } from "./dropdown.b0e80aaa.js";
|
|
14
13
|
import { BentoSegmentedControl as ia } from "../segmented-control.js";
|
|
15
|
-
import { d as
|
|
14
|
+
import { d as ae } from "./debounce.b5ef6acf.js";
|
|
16
15
|
import { u as la } from "./use-has-slot.4d98bf29.js";
|
|
17
|
-
import { s as
|
|
18
|
-
import { e as
|
|
16
|
+
import { s as ue, c as Se, i as te, d as da, e as Ee, f as _e, g as oe, h as ua, C as V, u as ma } from "./calendar.f0f7b405.js";
|
|
17
|
+
import { e as j } from "./index.fdf12170.js";
|
|
19
18
|
import { e as ca } from "./index.d80206ed.js";
|
|
20
|
-
import { _ as
|
|
21
|
-
import {
|
|
22
|
-
import "
|
|
23
|
-
|
|
19
|
+
import { _ as Ae } from "./_plugin-vue_export-helper.dad06003.js";
|
|
20
|
+
import { c as Da } from "./dropdown-default-textbox.157f95f0.js";
|
|
21
|
+
import { E as fa, F as pa } from "./field-label.894140ec.js";
|
|
22
|
+
import "../assets/index26.css";
|
|
23
|
+
function Me(e, t) {
|
|
24
24
|
ne(2, arguments);
|
|
25
|
-
var s =
|
|
26
|
-
return s.getTime() ===
|
|
27
|
-
}
|
|
28
|
-
function pa(e, t) {
|
|
29
|
-
ne(2, arguments);
|
|
30
|
-
var s = X(e), u = me(t);
|
|
31
|
-
return s.setHours(u), s;
|
|
25
|
+
var s = Z(e), m = Z(t);
|
|
26
|
+
return s.getTime() === m.getTime();
|
|
32
27
|
}
|
|
33
28
|
function ga(e, t) {
|
|
34
29
|
ne(2, arguments);
|
|
35
|
-
var s =
|
|
36
|
-
return s.
|
|
30
|
+
var s = Z(e), m = ce(t);
|
|
31
|
+
return s.setHours(m), s;
|
|
37
32
|
}
|
|
38
33
|
function va(e, t) {
|
|
39
34
|
ne(2, arguments);
|
|
40
|
-
var s =
|
|
41
|
-
return s.
|
|
35
|
+
var s = Z(e), m = ce(t);
|
|
36
|
+
return s.setMinutes(m), s;
|
|
37
|
+
}
|
|
38
|
+
function Ia(e, t) {
|
|
39
|
+
ne(2, arguments);
|
|
40
|
+
var s = Z(e), m = ce(t);
|
|
41
|
+
return s.setSeconds(m), s;
|
|
42
42
|
}
|
|
43
|
-
const
|
|
43
|
+
const ba = ({
|
|
44
44
|
firstDayOfWeek: e,
|
|
45
45
|
min: t,
|
|
46
46
|
max: s
|
|
47
47
|
}) => ({ getGranularCalendarLimits: (i) => {
|
|
48
|
-
let
|
|
48
|
+
let d = ue(t), n = j(s);
|
|
49
49
|
if ((i == null ? void 0 : i.type) === "weekly") {
|
|
50
50
|
if (i.earliest)
|
|
51
|
-
|
|
51
|
+
d = i.earliest;
|
|
52
52
|
else {
|
|
53
|
-
const
|
|
54
|
-
|
|
53
|
+
const u = Se(d, { weekStartsOn: e });
|
|
54
|
+
te(d, u) || (d = ue(da(Ee(d, { weekStartsOn: e }), 1)));
|
|
55
55
|
}
|
|
56
56
|
if (i.latest)
|
|
57
|
-
|
|
57
|
+
n = i.latest;
|
|
58
58
|
else {
|
|
59
|
-
const
|
|
60
|
-
|
|
59
|
+
const u = Ee(n, { weekStartsOn: e });
|
|
60
|
+
te(n, u) || (n = j(_e(Se(n, { weekStartsOn: e }), 1)));
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
if ((i == null ? void 0 : i.type) === "monthly") {
|
|
64
64
|
if (i.earliest)
|
|
65
|
-
|
|
65
|
+
d = i.earliest;
|
|
66
66
|
else {
|
|
67
|
-
const
|
|
68
|
-
|
|
67
|
+
const u = oe(d);
|
|
68
|
+
te(d, u) || (d = oe(ua(d, 1)));
|
|
69
69
|
}
|
|
70
70
|
if (i.latest)
|
|
71
|
-
|
|
71
|
+
n = i.latest;
|
|
72
72
|
else {
|
|
73
|
-
const
|
|
74
|
-
|
|
73
|
+
const u = ca(n);
|
|
74
|
+
te(n, u) || (n = _e(oe(n), 1));
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
return { min:
|
|
77
|
+
return { min: d, max: n };
|
|
78
78
|
} });
|
|
79
|
-
var
|
|
80
|
-
const
|
|
81
|
-
const { selectionStart: t } = e.target, s =
|
|
82
|
-
!s && !
|
|
83
|
-
},
|
|
79
|
+
var f = /* @__PURE__ */ ((e) => (e.CUSTOM_RANGE = "custom-range", e.INPUT = "input", e.ERROR = "error", e.FORM_DATE = "form-date", e))(f || {});
|
|
80
|
+
const Ra = /[\d]/, Ta = /^\d{2}$/, ya = /^\d{2}:\d{2}$/, ka = (e) => {
|
|
81
|
+
const { selectionStart: t } = e.target, s = Ra.test(e.key) || e.key === "Backspace", m = [1, 2, 4, 5].includes(t) && e.key === ":";
|
|
82
|
+
!s && !m && e.preventDefault();
|
|
83
|
+
}, Oe = (e) => {
|
|
84
84
|
if (!e)
|
|
85
85
|
return e;
|
|
86
86
|
let t = e;
|
|
87
87
|
if (t.length === 1 && parseInt(e, 10) > 2)
|
|
88
88
|
return `0${t}:`;
|
|
89
|
-
const [s,
|
|
90
|
-
return [2, 5].includes(t.length) &&
|
|
91
|
-
},
|
|
89
|
+
const [s, m] = t.slice(-2);
|
|
90
|
+
return [2, 5].includes(t.length) && m === ":" && (t = `${t.slice(0, t.length - 2)}0${s}`), (Ta.test(t) || ya.test(t)) && (t += ":"), t;
|
|
91
|
+
}, we = {
|
|
92
92
|
"en-US": {
|
|
93
93
|
customRange: "Custom range",
|
|
94
94
|
daily: "Daily",
|
|
@@ -102,14 +102,14 @@ const ba = /[\d]/, Ra = /^\d{2}$/, Ta = /^\d{2}:\d{2}$/, ya = (e) => {
|
|
|
102
102
|
timeTo: "Time to",
|
|
103
103
|
weekly: "Weekly"
|
|
104
104
|
}
|
|
105
|
-
},
|
|
106
|
-
i18n: { messages:
|
|
105
|
+
}, he = 300, se = "customRange", Ce = "daily", Sa = Pe({
|
|
106
|
+
i18n: { messages: we },
|
|
107
107
|
name: "date-range-picker-calendar",
|
|
108
108
|
components: {
|
|
109
109
|
BentoDropdown: sa,
|
|
110
110
|
BentoInputField: oa,
|
|
111
111
|
BentoSegmentedControl: ia,
|
|
112
|
-
BentoTypography:
|
|
112
|
+
BentoTypography: Ue,
|
|
113
113
|
Calendar: V
|
|
114
114
|
},
|
|
115
115
|
props: {
|
|
@@ -173,232 +173,234 @@ const ba = /[\d]/, Ra = /^\d{2}$/, Ta = /^\d{2}:\d{2}$/, ya = (e) => {
|
|
|
173
173
|
value: { type: Object, default: void 0 }
|
|
174
174
|
},
|
|
175
175
|
emits: [
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
f.CUSTOM_RANGE,
|
|
177
|
+
f.INPUT,
|
|
178
|
+
f.ERROR,
|
|
179
|
+
f.FORM_DATE
|
|
180
180
|
],
|
|
181
181
|
setup(e, { emit: t, slots: s }) {
|
|
182
|
-
var
|
|
183
|
-
const { locale:
|
|
184
|
-
startDate: (
|
|
185
|
-
endDate: (
|
|
182
|
+
var ge, ve, Ie, be, Re;
|
|
183
|
+
const { locale: m, t: i } = me({ messages: we }), d = { de: De, enUS: C, fr: fe }, n = ie({
|
|
184
|
+
startDate: (ge = e.value) == null ? void 0 : ge.startDate,
|
|
185
|
+
endDate: (ve = e.value) == null ? void 0 : ve.endDate,
|
|
186
186
|
...e.granularities ? {
|
|
187
|
-
granularity: ((
|
|
187
|
+
granularity: ((Ie = e.value) == null ? void 0 : Ie.granularity) || Ce
|
|
188
188
|
} : {}
|
|
189
|
-
}),
|
|
190
|
-
((
|
|
191
|
-
({ data: a }) =>
|
|
192
|
-
)) == null ? void 0 :
|
|
193
|
-
),
|
|
189
|
+
}), u = A(
|
|
190
|
+
((Re = (be = e == null ? void 0 : e.quickSelectRanges) == null ? void 0 : be.find(
|
|
191
|
+
({ data: a }) => Me(a.startDate, n.startDate) && Me(a.endDate, n.endDate)
|
|
192
|
+
)) == null ? void 0 : Re.value) ?? se
|
|
193
|
+
), R = O(() => ({
|
|
194
194
|
"b-date-range-picker-calendar__form-input-wrapper": e.allowTimeInput
|
|
195
|
-
})),
|
|
195
|
+
})), I = O(() => e.quickSelectRanges ? [
|
|
196
196
|
{ label: i("customRange"), value: se },
|
|
197
197
|
...e.quickSelectRanges
|
|
198
|
-
] : []),
|
|
198
|
+
] : []), v = O(
|
|
199
199
|
() => {
|
|
200
200
|
var a;
|
|
201
|
-
return ((a = e.granularities) == null ? void 0 : a.find(({ type:
|
|
201
|
+
return ((a = e.granularities) == null ? void 0 : a.find(({ type: r }) => r === n.granularity)) || null;
|
|
202
202
|
}
|
|
203
|
-
),
|
|
204
|
-
() => e.granularities.map(({ type: a, disabled:
|
|
203
|
+
), D = O(
|
|
204
|
+
() => e.granularities.map(({ type: a, disabled: r }) => ({
|
|
205
205
|
label: i(a),
|
|
206
206
|
value: a,
|
|
207
|
-
disabled:
|
|
207
|
+
disabled: r
|
|
208
208
|
}))
|
|
209
|
-
), { getGranularCalendarLimits:
|
|
210
|
-
() => e.granularities ?
|
|
209
|
+
), { getGranularCalendarLimits: F } = ba(e), p = O(
|
|
210
|
+
() => e.granularities ? F(v.value) : { min: ue(e.min), max: j(e.max) }
|
|
211
211
|
), {
|
|
212
212
|
adjustStartDateInputForWeekly: W,
|
|
213
|
-
adjustEndDateInputForWeekly:
|
|
213
|
+
adjustEndDateInputForWeekly: _,
|
|
214
214
|
adjustStartDateInputForMonthly: N,
|
|
215
|
-
adjustEndDateInputForMonthly:
|
|
216
|
-
} = ma(e.firstDayOfWeek,
|
|
217
|
-
e != null && e.quickSelectRanges && (
|
|
218
|
-
},
|
|
219
|
-
locale:
|
|
220
|
-
}) : "",
|
|
221
|
-
locale:
|
|
215
|
+
adjustEndDateInputForMonthly: T
|
|
216
|
+
} = ma(e.firstDayOfWeek, p.value.min, p.value.max), $ = () => {
|
|
217
|
+
e != null && e.quickSelectRanges && (u.value = se);
|
|
218
|
+
}, E = (a) => a ? z(a, h.NUMERIC_DATE_YEAR_FIRST, {
|
|
219
|
+
locale: d[m.value.substring(0, 2)] || C
|
|
220
|
+
}) : "", J = (a) => a ? z(a, h.HOUR_MINUTE_SECONDS, {
|
|
221
|
+
locale: d[m.value.substring(0, 2)] || C
|
|
222
222
|
}) : "", B = A(!1), L = A(!1), Y = A(!1), K = A(!1), o = ie({
|
|
223
223
|
startDate: e.dateFormData.startDate,
|
|
224
224
|
endDate: e.dateFormData.endDate,
|
|
225
225
|
startTime: e.dateFormData.startTime,
|
|
226
226
|
endTime: e.dateFormData.endTime
|
|
227
|
-
}),
|
|
228
|
-
|
|
229
|
-
},
|
|
230
|
-
if (!
|
|
227
|
+
}), pe = (a) => {
|
|
228
|
+
n.startDate = a.startDate, n.endDate = a.endDate, t(f.INPUT, n);
|
|
229
|
+
}, x = (a) => /^(?:[01]\d|2[01234]):(?:[012345]\d):(?:[012345]\d)$/.test(a), c = (a, r) => {
|
|
230
|
+
if (!r || !x(r))
|
|
231
231
|
return a;
|
|
232
|
-
let
|
|
233
|
-
const [
|
|
234
|
-
return
|
|
235
|
-
},
|
|
236
|
-
const
|
|
237
|
-
return /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(a) &&
|
|
232
|
+
let l = new Date(a);
|
|
233
|
+
const [g, re, ze] = r.split(":");
|
|
234
|
+
return l = ga(l, parseInt(g, 10)), l = va(l, parseInt(re, 10)), l = Ia(l, parseInt(ze, 10)), l;
|
|
235
|
+
}, y = (a) => {
|
|
236
|
+
const r = (g) => e.min && g <= e.min || e.max && g >= e.max ? !1 : e.isDateDisabled ? !e.isDateDisabled(g) : !0;
|
|
237
|
+
return /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(a) && r(new Date(a));
|
|
238
238
|
};
|
|
239
|
-
|
|
240
|
-
e.dateFormData.startDate && !
|
|
239
|
+
Je(() => {
|
|
240
|
+
e.dateFormData.startDate && !y(e.dateFormData.startDate) ? B.value = !0 : (B.value = !1, Y.value = !1), e.dateFormData.endDate && !y(e.dateFormData.endDate) ? L.value = !0 : (L.value = !1, K.value = !1);
|
|
241
241
|
});
|
|
242
|
-
const
|
|
243
|
-
var
|
|
244
|
-
$(), o.startDate =
|
|
245
|
-
},
|
|
246
|
-
var
|
|
247
|
-
o.endDate =
|
|
248
|
-
},
|
|
249
|
-
const
|
|
250
|
-
if (
|
|
251
|
-
return
|
|
252
|
-
if (e.dateFormData[a] &&
|
|
242
|
+
const Q = (a) => {
|
|
243
|
+
var r;
|
|
244
|
+
$(), o.startDate = E(a), o.startTime ? Y.value && (o.startTime = (r = e.dateFormData) == null ? void 0 : r.startTime) : o.startTime = J(a), B.value = !1, Y.value = !1;
|
|
245
|
+
}, Ne = (a) => {
|
|
246
|
+
var r;
|
|
247
|
+
o.endDate = E(a), o.endTime ? K.value && (o.endTime = (r = e.dateFormData) == null ? void 0 : r.endTime) : o.endTime = J(j(a)), L.value = !1, K.value = !1;
|
|
248
|
+
}, ee = (a) => {
|
|
249
|
+
const r = e.value[a];
|
|
250
|
+
if (r)
|
|
251
|
+
return r;
|
|
252
|
+
if (e.dateFormData[a] && y(e.dateFormData[a]))
|
|
253
253
|
return new Date(e.dateFormData[a]);
|
|
254
|
-
},
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
254
|
+
}, $e = ae((a) => {
|
|
255
|
+
var r;
|
|
256
|
+
if (y(a)) {
|
|
257
|
+
let l = a;
|
|
258
|
+
switch (B.value = !1, (r = v.value) == null ? void 0 : r.type) {
|
|
258
259
|
case "weekly":
|
|
259
|
-
|
|
260
|
+
l = W(a, E), o.startDate = l;
|
|
260
261
|
break;
|
|
261
262
|
case "monthly":
|
|
262
|
-
|
|
263
|
+
l = N(a, E), o.startDate = l;
|
|
263
264
|
break;
|
|
264
265
|
}
|
|
265
|
-
|
|
266
|
-
const
|
|
267
|
-
t(
|
|
268
|
-
startDate: new Date(
|
|
269
|
-
endDate:
|
|
270
|
-
}), t(
|
|
271
|
-
startDate: new Date(
|
|
272
|
-
endDate:
|
|
266
|
+
n.startDate = c(new Date(l), o.startTime);
|
|
267
|
+
const g = ee("endDate");
|
|
268
|
+
t(f.FORM_DATE, {
|
|
269
|
+
startDate: new Date(l),
|
|
270
|
+
endDate: g
|
|
271
|
+
}), t(f.INPUT, {
|
|
272
|
+
startDate: new Date(l),
|
|
273
|
+
endDate: g
|
|
273
274
|
});
|
|
274
275
|
} else
|
|
275
|
-
B.value = !0, t(
|
|
276
|
-
},
|
|
277
|
-
$(), o.startDate =
|
|
278
|
-
},
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
276
|
+
B.value = !0, t(f.ERROR, { ...o });
|
|
277
|
+
}, he), Be = (a) => {
|
|
278
|
+
$(), o.startDate = ke(a), $e(o.startDate);
|
|
279
|
+
}, Le = ae((a) => {
|
|
280
|
+
var r;
|
|
281
|
+
if (y(a)) {
|
|
282
|
+
let l = a;
|
|
283
|
+
switch (L.value = !1, (r = v.value) == null ? void 0 : r.type) {
|
|
282
284
|
case "weekly":
|
|
283
|
-
|
|
285
|
+
l = _(a, E), o.endDate = l;
|
|
284
286
|
break;
|
|
285
287
|
case "monthly":
|
|
286
|
-
|
|
288
|
+
l = T(a, E), o.endDate = l;
|
|
287
289
|
break;
|
|
288
290
|
}
|
|
289
|
-
|
|
290
|
-
const
|
|
291
|
-
t(
|
|
292
|
-
startDate:
|
|
293
|
-
endDate: new Date(
|
|
291
|
+
n.endDate = c(new Date(l), o.endTime);
|
|
292
|
+
const g = ee("startDate");
|
|
293
|
+
t(f.FORM_DATE, {
|
|
294
|
+
startDate: g,
|
|
295
|
+
endDate: new Date(n.endDate),
|
|
294
296
|
startTime: e.dateFormData.endTime,
|
|
295
|
-
endTime:
|
|
296
|
-
}), t(
|
|
297
|
-
startDate:
|
|
298
|
-
endDate: new Date(
|
|
297
|
+
endTime: l
|
|
298
|
+
}), t(f.INPUT, {
|
|
299
|
+
startDate: g,
|
|
300
|
+
endDate: new Date(n.endDate)
|
|
299
301
|
});
|
|
300
302
|
} else
|
|
301
|
-
L.value = !0, t(
|
|
302
|
-
},
|
|
303
|
-
$(), o.endDate =
|
|
304
|
-
},
|
|
303
|
+
L.value = !0, t(f.ERROR, { ...o });
|
|
304
|
+
}, he), Ye = (a) => {
|
|
305
|
+
$(), o.endDate = ke(a), Le(o.endDate);
|
|
306
|
+
}, Ke = (a) => {
|
|
305
307
|
ta(a);
|
|
306
|
-
},
|
|
307
|
-
if (
|
|
308
|
-
Y.value = !1,
|
|
309
|
-
const
|
|
310
|
-
t(
|
|
311
|
-
startDate: new Date(
|
|
312
|
-
endDate:
|
|
308
|
+
}, Ve = ae((a) => {
|
|
309
|
+
if (x(a)) {
|
|
310
|
+
Y.value = !1, n.startDate = c(n.startDate, a);
|
|
311
|
+
const r = ee("endDate");
|
|
312
|
+
t(f.FORM_DATE, {
|
|
313
|
+
startDate: new Date(n.startDate),
|
|
314
|
+
endDate: r,
|
|
313
315
|
startTime: a,
|
|
314
316
|
endTime: e.dateFormData.endTime
|
|
315
|
-
}), t(
|
|
316
|
-
startDate: new Date(
|
|
317
|
-
endDate:
|
|
317
|
+
}), t(f.INPUT, {
|
|
318
|
+
startDate: new Date(n.startDate),
|
|
319
|
+
endDate: r
|
|
318
320
|
});
|
|
319
321
|
} else
|
|
320
|
-
Y.value = !0, t(
|
|
321
|
-
}),
|
|
322
|
-
if (
|
|
323
|
-
K.value = !1,
|
|
324
|
-
const
|
|
325
|
-
t(
|
|
326
|
-
startDate:
|
|
327
|
-
endDate: new Date(
|
|
322
|
+
Y.value = !0, t(f.ERROR, { ...o });
|
|
323
|
+
}), qe = ae((a) => {
|
|
324
|
+
if (x(a)) {
|
|
325
|
+
K.value = !1, n.endDate = c(n.endDate, a);
|
|
326
|
+
const r = ee("startDate");
|
|
327
|
+
t(f.FORM_DATE, {
|
|
328
|
+
startDate: r,
|
|
329
|
+
endDate: new Date(n.endDate),
|
|
328
330
|
startTime: e.dateFormData.startTime,
|
|
329
331
|
endTime: a
|
|
330
|
-
}), t(
|
|
331
|
-
startDate:
|
|
332
|
-
endDate: new Date(
|
|
332
|
+
}), t(f.INPUT, {
|
|
333
|
+
startDate: r,
|
|
334
|
+
endDate: new Date(n.endDate)
|
|
333
335
|
});
|
|
334
336
|
} else
|
|
335
|
-
K.value = !0, t(
|
|
336
|
-
}),
|
|
337
|
-
$(), o.startTime =
|
|
338
|
-
}, Ge = (a) => {
|
|
339
|
-
$(), o.endTime = Me(a), Ve(o.endTime);
|
|
337
|
+
K.value = !0, t(f.ERROR, { ...o });
|
|
338
|
+
}), Ge = (a) => {
|
|
339
|
+
$(), o.startTime = Oe(a), Ve(o.startTime);
|
|
340
340
|
}, We = (a) => {
|
|
341
|
-
|
|
341
|
+
$(), o.endTime = Oe(a), qe(o.endTime);
|
|
342
342
|
}, He = (a) => {
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
343
|
+
ka(a);
|
|
344
|
+
}, je = (a) => {
|
|
345
|
+
var l, g;
|
|
346
|
+
u.value = a;
|
|
347
|
+
const r = (g = (l = e.quickSelectRanges) == null ? void 0 : l.find(({ value: re }) => re === a)) == null ? void 0 : g.data;
|
|
348
|
+
r && (o.startDate = E(r.startDate), o.endDate = E(r.endDate), e.granularities && (n.granularity = r.granularity || Ce), o.startTime || (o.startTime = J(j(r.startDate))), o.endTime || (o.endTime = J(j(r.endDate))), t(f.CUSTOM_RANGE, r));
|
|
347
349
|
};
|
|
348
350
|
return {
|
|
349
351
|
// Values
|
|
350
|
-
internalRangeDate:
|
|
352
|
+
internalRangeDate: n,
|
|
351
353
|
dateTextInput: o,
|
|
352
354
|
endDateError: L,
|
|
353
355
|
endTimeError: K,
|
|
354
|
-
granularityItems:
|
|
355
|
-
selectedGranularity:
|
|
356
|
-
computedMinMax:
|
|
357
|
-
selectedRangeSelectorValue:
|
|
356
|
+
granularityItems: D,
|
|
357
|
+
selectedGranularity: v,
|
|
358
|
+
computedMinMax: p,
|
|
359
|
+
selectedRangeSelectorValue: u,
|
|
358
360
|
startDateError: B,
|
|
359
361
|
startTimeError: Y,
|
|
360
|
-
quickSelectRangeDefaultItems:
|
|
361
|
-
formInputWrapperConditionalClasses:
|
|
362
|
+
quickSelectRangeDefaultItems: I,
|
|
363
|
+
formInputWrapperConditionalClasses: R,
|
|
362
364
|
// Methods
|
|
363
365
|
hasSlot: la(s),
|
|
364
366
|
t: i,
|
|
365
367
|
// Events
|
|
366
|
-
onDateInput:
|
|
367
|
-
onDateInputKeyDown:
|
|
368
|
-
onEndDateInput:
|
|
369
|
-
onEndDateSelected:
|
|
370
|
-
onEndTimeInput:
|
|
371
|
-
onRangeSelectorInput:
|
|
372
|
-
onStartDateInput:
|
|
373
|
-
onStartDateSelected:
|
|
374
|
-
onStartTimeInput:
|
|
375
|
-
onTimeInputKeyDown:
|
|
368
|
+
onDateInput: pe,
|
|
369
|
+
onDateInputKeyDown: Ke,
|
|
370
|
+
onEndDateInput: Ye,
|
|
371
|
+
onEndDateSelected: Ne,
|
|
372
|
+
onEndTimeInput: We,
|
|
373
|
+
onRangeSelectorInput: je,
|
|
374
|
+
onStartDateInput: Be,
|
|
375
|
+
onStartDateSelected: Q,
|
|
376
|
+
onStartTimeInput: Ge,
|
|
377
|
+
onTimeInputKeyDown: He
|
|
376
378
|
};
|
|
377
379
|
}
|
|
378
380
|
});
|
|
379
|
-
const
|
|
380
|
-
function
|
|
381
|
-
const
|
|
382
|
-
return
|
|
383
|
-
P("div",
|
|
384
|
-
P("div",
|
|
385
|
-
e.hasSlot("title") ?
|
|
386
|
-
e.quickSelectRanges ? (
|
|
381
|
+
const Ea = { class: "b-date-range-picker-calendar" }, _a = { class: "b-date-range-picker-calendar__form-container" }, Ma = { class: "b-date-range-picker-calendar__form" }, Oa = { key: 0 }, wa = { class: "b-date-range-picker-calendar__calendars-container" };
|
|
382
|
+
function ha(e, t, s, m, i, d) {
|
|
383
|
+
const n = k("bento-dropdown"), u = k("bento-segmented-control"), R = k("bento-typography"), I = k("bento-input-field"), v = k("calendar");
|
|
384
|
+
return b(), le("div", Ea, [
|
|
385
|
+
P("div", _a, [
|
|
386
|
+
P("div", Ma, [
|
|
387
|
+
e.hasSlot("title") ? Te(e.$slots, "title", { key: 0 }, void 0, !0) : S("", !0),
|
|
388
|
+
e.quickSelectRanges ? (b(), w(n, {
|
|
387
389
|
key: 1,
|
|
388
390
|
"aria-label": e.t("customRange"),
|
|
389
391
|
items: e.quickSelectRangeDefaultItems,
|
|
390
392
|
value: e.selectedRangeSelectorValue,
|
|
391
393
|
onInput: e.onRangeSelectorInput
|
|
392
|
-
}, null, 8, ["aria-label", "items", "value", "onInput"])) :
|
|
393
|
-
e.granularities ? (
|
|
394
|
+
}, null, 8, ["aria-label", "items", "value", "onInput"])) : S("", !0),
|
|
395
|
+
e.granularities ? (b(), w(u, {
|
|
394
396
|
key: 2,
|
|
395
397
|
items: e.granularityItems,
|
|
396
398
|
"model-value": e.internalRangeDate.granularity,
|
|
397
399
|
"full-width": "",
|
|
398
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
399
|
-
}, null, 8, ["items", "model-value"])) :
|
|
400
|
+
"onUpdate:modelValue": t[0] || (t[0] = (D) => e.internalRangeDate.granularity = D)
|
|
401
|
+
}, null, 8, ["items", "model-value"])) : S("", !0),
|
|
400
402
|
P("div", null, [
|
|
401
|
-
G(
|
|
403
|
+
G(R, {
|
|
402
404
|
stronger: "",
|
|
403
405
|
el: "span",
|
|
404
406
|
class: "b-date-range-picker-calendar__label"
|
|
@@ -411,7 +413,7 @@ function wa(e, t, s, u, i, l) {
|
|
|
411
413
|
P("div", {
|
|
412
414
|
class: de(e.formInputWrapperConditionalClasses)
|
|
413
415
|
}, [
|
|
414
|
-
G(
|
|
416
|
+
G(I, {
|
|
415
417
|
"aria-label": e.$t("dateFrom"),
|
|
416
418
|
value: e.dateTextInput.startDate,
|
|
417
419
|
error: e.startDateError,
|
|
@@ -424,7 +426,7 @@ function wa(e, t, s, u, i, l) {
|
|
|
424
426
|
]),
|
|
425
427
|
_: 1
|
|
426
428
|
}, 8, ["aria-label", "value", "error", "onInput", "onKeydown"]),
|
|
427
|
-
e.allowTimeInput ? (
|
|
429
|
+
e.allowTimeInput ? (b(), w(I, {
|
|
428
430
|
key: 0,
|
|
429
431
|
"aria-label": e.t("timeFrom"),
|
|
430
432
|
value: e.dateTextInput.startTime,
|
|
@@ -437,11 +439,11 @@ function wa(e, t, s, u, i, l) {
|
|
|
437
439
|
q("HH:MM:SS")
|
|
438
440
|
]),
|
|
439
441
|
_: 1
|
|
440
|
-
}, 8, ["aria-label", "value", "error", "onInput", "onKeydown"])) :
|
|
442
|
+
}, 8, ["aria-label", "value", "error", "onInput", "onKeydown"])) : S("", !0)
|
|
441
443
|
], 2)
|
|
442
444
|
]),
|
|
443
445
|
P("div", null, [
|
|
444
|
-
G(
|
|
446
|
+
G(R, {
|
|
445
447
|
stronger: "",
|
|
446
448
|
el: "span",
|
|
447
449
|
class: "b-date-range-picker-calendar__label"
|
|
@@ -454,7 +456,7 @@ function wa(e, t, s, u, i, l) {
|
|
|
454
456
|
P("div", {
|
|
455
457
|
class: de(e.formInputWrapperConditionalClasses)
|
|
456
458
|
}, [
|
|
457
|
-
G(
|
|
459
|
+
G(I, {
|
|
458
460
|
class: "b-date-range-picker-calendar__form-input",
|
|
459
461
|
"aria-label": e.$t("dateTo"),
|
|
460
462
|
value: e.dateTextInput.endDate,
|
|
@@ -467,7 +469,7 @@ function wa(e, t, s, u, i, l) {
|
|
|
467
469
|
]),
|
|
468
470
|
_: 1
|
|
469
471
|
}, 8, ["aria-label", "value", "error", "onInput", "onKeydown"]),
|
|
470
|
-
e.allowTimeInput ? (
|
|
472
|
+
e.allowTimeInput ? (b(), w(I, {
|
|
471
473
|
key: 0,
|
|
472
474
|
"aria-label": e.t("timeTo"),
|
|
473
475
|
value: e.dateTextInput.endTime,
|
|
@@ -480,16 +482,16 @@ function wa(e, t, s, u, i, l) {
|
|
|
480
482
|
q("HH:MM:SS")
|
|
481
483
|
]),
|
|
482
484
|
_: 1
|
|
483
|
-
}, 8, ["aria-label", "value", "error", "onInput", "onKeydown"])) :
|
|
485
|
+
}, 8, ["aria-label", "value", "error", "onInput", "onKeydown"])) : S("", !0)
|
|
484
486
|
], 2)
|
|
485
487
|
])
|
|
486
488
|
]),
|
|
487
|
-
e.hasSlot("actions") ? (
|
|
488
|
-
|
|
489
|
-
])) :
|
|
489
|
+
e.hasSlot("actions") ? (b(), le("div", Oa, [
|
|
490
|
+
Te(e.$slots, "actions", {}, void 0, !0)
|
|
491
|
+
])) : S("", !0)
|
|
490
492
|
]),
|
|
491
|
-
P("div",
|
|
492
|
-
G(
|
|
493
|
+
P("div", wa, [
|
|
494
|
+
G(v, {
|
|
493
495
|
value: e.value,
|
|
494
496
|
"first-day-of-week": e.firstDayOfWeek,
|
|
495
497
|
"is-date-disabled": e.isDateDisabled,
|
|
@@ -506,42 +508,42 @@ function wa(e, t, s, u, i, l) {
|
|
|
506
508
|
])
|
|
507
509
|
]);
|
|
508
510
|
}
|
|
509
|
-
const
|
|
511
|
+
const M = /* @__PURE__ */ Ae(Sa, [["render", ha], ["__scopeId", "data-v-482a4614"]]), Ca = ({
|
|
510
512
|
datePickerValue: e,
|
|
511
513
|
isDateIncorrect: t
|
|
512
514
|
}) => {
|
|
513
|
-
var
|
|
514
|
-
const { locale: s, t:
|
|
515
|
-
locale: i[s.value.substring(0, 2)] ||
|
|
516
|
-
}),
|
|
517
|
-
locale: i[s.value.substring(0, 2)] ||
|
|
518
|
-
}),
|
|
519
|
-
startDate: (
|
|
520
|
-
endDate: (
|
|
515
|
+
var v, D, F, p, W;
|
|
516
|
+
const { locale: s, t: m } = me(), i = { de: De, enUS: C, fr: fe }, d = (_, N) => z(_, N, {
|
|
517
|
+
locale: i[s.value.substring(0, 2)] || C
|
|
518
|
+
}), n = (_) => z(_, h.HOUR_MINUTE_SECONDS, {
|
|
519
|
+
locale: i[s.value.substring(0, 2)] || C
|
|
520
|
+
}), u = ie({
|
|
521
|
+
startDate: (v = e.value) != null && v.startDate ? d(e.value.startDate, h.NUMERIC_DATE_YEAR_FIRST) : void 0,
|
|
522
|
+
endDate: (D = e.value) != null && D.endDate ? d(e.value.endDate, h.NUMERIC_DATE_YEAR_FIRST) : void 0,
|
|
521
523
|
// Set time if the startDate/endDate are set
|
|
522
|
-
startTime: (
|
|
523
|
-
endTime: (W = e.value) != null && W.endDate ?
|
|
524
|
+
startTime: (F = e.value) != null && F.startDate ? n((p = e.value) == null ? void 0 : p.startDate) : void 0,
|
|
525
|
+
endTime: (W = e.value) != null && W.endDate ? n(e.value.endDate) : void 0
|
|
524
526
|
});
|
|
525
527
|
return {
|
|
526
528
|
// Values
|
|
527
|
-
dateDisplayValue:
|
|
529
|
+
dateDisplayValue: O(() => {
|
|
528
530
|
if (t.value)
|
|
529
|
-
return `${
|
|
531
|
+
return `${u.startDate || ""} - ${u.endDate || ""}`;
|
|
530
532
|
if (!e.value || !e.value.startDate && !e.value.endDate)
|
|
531
|
-
return
|
|
532
|
-
const { startDate:
|
|
533
|
-
return `${
|
|
533
|
+
return m("selectDateRange");
|
|
534
|
+
const { startDate: _, endDate: N } = u;
|
|
535
|
+
return `${d(new Date(_), h.FULL_DATE_MONTH_FIRST)} - ${d(
|
|
534
536
|
new Date(N),
|
|
535
|
-
|
|
537
|
+
h.FULL_DATE_MONTH_FIRST
|
|
536
538
|
)}`;
|
|
537
539
|
}),
|
|
538
|
-
textInputDisplayValue:
|
|
540
|
+
textInputDisplayValue: u,
|
|
539
541
|
// Methods
|
|
540
542
|
formatTextInputDisplayValue: () => ""
|
|
541
543
|
};
|
|
542
544
|
};
|
|
543
545
|
var H = /* @__PURE__ */ ((e) => (e.INPUT = "input", e))(H || {});
|
|
544
|
-
const
|
|
546
|
+
const Fe = {
|
|
545
547
|
"en-US": {
|
|
546
548
|
dateRangePicker: "Date range picker {name}",
|
|
547
549
|
provideDateInAFormat: "Provide date in a YYYY-MM-DD format",
|
|
@@ -549,16 +551,16 @@ const Ce = {
|
|
|
549
551
|
selectDateRange: "Select a date range",
|
|
550
552
|
selectedDateIsNotAvailable: "Selected date is not available"
|
|
551
553
|
}
|
|
552
|
-
},
|
|
553
|
-
i18n: { messages:
|
|
554
|
+
}, Fa = Pe({
|
|
555
|
+
i18n: { messages: Fe },
|
|
554
556
|
name: "bento-date-range-picker",
|
|
555
557
|
components: {
|
|
556
|
-
BentoTypography:
|
|
557
|
-
BentoPopover:
|
|
558
|
-
DateRangePickerCalendar:
|
|
559
|
-
DropdownInputDefault:
|
|
560
|
-
ErrorMessage:
|
|
561
|
-
FieldLabel:
|
|
558
|
+
BentoTypography: Ue,
|
|
559
|
+
BentoPopover: aa,
|
|
560
|
+
DateRangePickerCalendar: M,
|
|
561
|
+
DropdownInputDefault: Da,
|
|
562
|
+
ErrorMessage: fa,
|
|
563
|
+
FieldLabel: pa
|
|
562
564
|
},
|
|
563
565
|
directives: { BentoClickOutsideDirective: ra },
|
|
564
566
|
props: {
|
|
@@ -581,16 +583,16 @@ const Ce = {
|
|
|
581
583
|
/**
|
|
582
584
|
* Allows user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
|
|
583
585
|
*/
|
|
584
|
-
firstDayOfWeek:
|
|
586
|
+
firstDayOfWeek: M.props.firstDayOfWeek,
|
|
585
587
|
/**
|
|
586
588
|
* A list of available granularities.
|
|
587
589
|
* If present, the date picker will display a segmented control to change granularity.
|
|
588
590
|
*/
|
|
589
|
-
granularities:
|
|
591
|
+
granularities: M.props.granularities,
|
|
590
592
|
/**
|
|
591
593
|
* Indicate if a date should be disabled or not
|
|
592
594
|
*/
|
|
593
|
-
isDateDisabled:
|
|
595
|
+
isDateDisabled: M.props.isDateDisabled,
|
|
594
596
|
/**
|
|
595
597
|
* Text that is displayed as a label above the element.
|
|
596
598
|
*/
|
|
@@ -625,114 +627,115 @@ const Ce = {
|
|
|
625
627
|
/**
|
|
626
628
|
* Set a maximum number of dates to be selectable by the range.
|
|
627
629
|
*/
|
|
628
|
-
maxRange:
|
|
630
|
+
maxRange: M.props.maxRange,
|
|
629
631
|
/**
|
|
630
632
|
* Sets a minimum limit for selectable dates - dates before `min` will not be selectable
|
|
631
633
|
*/
|
|
632
|
-
min:
|
|
634
|
+
min: M.props.min,
|
|
633
635
|
/**
|
|
634
636
|
* Sets a maximum limit for selectable dates - dates after `max` will not be selectable
|
|
635
637
|
*/
|
|
636
|
-
max:
|
|
638
|
+
max: M.props.max,
|
|
637
639
|
/**
|
|
638
640
|
* Number of months rendered on pane
|
|
639
641
|
*/
|
|
640
|
-
numberOfMonths:
|
|
642
|
+
numberOfMonths: M.props.numberOfMonths,
|
|
641
643
|
/**
|
|
642
644
|
* Selected date
|
|
643
645
|
*/
|
|
644
|
-
value:
|
|
646
|
+
value: M.props.value
|
|
645
647
|
},
|
|
646
648
|
emits: [H.INPUT],
|
|
647
649
|
setup(e, { emit: t }) {
|
|
648
|
-
const { locale: s, t:
|
|
649
|
-
() => e.label ||
|
|
650
|
-
),
|
|
651
|
-
|
|
650
|
+
const { locale: s, t: m } = me({ messages: Fe }), i = { de: De, enUS: C, fr: fe }, d = X("bento-date-range-picker-container"), n = X("bento-date-range-picker-label"), u = X("bento-date-range-picker-description"), R = X("bento-date-range-picker-error"), I = X("bento-date-range-picker-date-error"), v = O(
|
|
651
|
+
() => e.label || m("dateRangePicker", { name: d })
|
|
652
|
+
), D = A(!1), F = A(null), p = A(!1), { isReadOnly: W } = na(ye(e, "readonly"));
|
|
653
|
+
Qe(
|
|
652
654
|
() => e.disabled,
|
|
653
655
|
() => {
|
|
654
|
-
e.disabled &&
|
|
656
|
+
e.disabled && p.value && (p.value = !1);
|
|
655
657
|
}
|
|
656
658
|
);
|
|
657
|
-
const
|
|
658
|
-
"b-date-range-picker__description--error": !!e.errorMessage ||
|
|
659
|
-
})), { dateDisplayValue: N, textInputDisplayValue:
|
|
660
|
-
datePickerValue:
|
|
661
|
-
isDateIncorrect:
|
|
662
|
-
}),
|
|
663
|
-
() => `${e.description ?
|
|
659
|
+
const _ = O(() => ({
|
|
660
|
+
"b-date-range-picker__description--error": !!e.errorMessage || D.value
|
|
661
|
+
})), { dateDisplayValue: N, textInputDisplayValue: T, formatTextInputDisplayValue: $ } = Ca({
|
|
662
|
+
datePickerValue: ye(e, "value"),
|
|
663
|
+
isDateIncorrect: D
|
|
664
|
+
}), E = O(
|
|
665
|
+
() => `${e.description ? u : ""} ${e.errorMessage ? R : ""} ${D.value ? I : ""}`.trim() || null
|
|
664
666
|
);
|
|
665
667
|
return {
|
|
666
668
|
// Refs
|
|
667
|
-
inputContainerRef:
|
|
669
|
+
inputContainerRef: F,
|
|
668
670
|
// Values,
|
|
669
671
|
dateDisplayValue: N,
|
|
670
|
-
datePickerContainerId:
|
|
671
|
-
descriptionConditionalClasses:
|
|
672
|
-
isDateIncorrect:
|
|
673
|
-
isDateRangePickerOpen:
|
|
672
|
+
datePickerContainerId: d,
|
|
673
|
+
descriptionConditionalClasses: _,
|
|
674
|
+
isDateIncorrect: D,
|
|
675
|
+
isDateRangePickerOpen: p,
|
|
674
676
|
isReadOnly: W,
|
|
675
|
-
labelId:
|
|
676
|
-
descriptionId:
|
|
677
|
-
dateErrorId:
|
|
678
|
-
errorId:
|
|
679
|
-
popoverAriaLabel:
|
|
680
|
-
ariaDescribedBy:
|
|
681
|
-
textInputDisplayValue:
|
|
677
|
+
labelId: n,
|
|
678
|
+
descriptionId: u,
|
|
679
|
+
dateErrorId: I,
|
|
680
|
+
errorId: R,
|
|
681
|
+
popoverAriaLabel: v,
|
|
682
|
+
ariaDescribedBy: E,
|
|
683
|
+
textInputDisplayValue: T,
|
|
682
684
|
// Events
|
|
683
685
|
closeDateRangePicker: () => {
|
|
684
|
-
|
|
686
|
+
p.value = !1;
|
|
685
687
|
},
|
|
686
688
|
clearDateRangePickerValue: async () => {
|
|
687
|
-
|
|
689
|
+
D.value && (D.value = !1), t(H.INPUT, null);
|
|
688
690
|
},
|
|
689
691
|
openDateRangePicker: () => {
|
|
690
|
-
|
|
692
|
+
p.value = !0, $();
|
|
691
693
|
},
|
|
692
|
-
onRangeSelectorInput: (
|
|
693
|
-
if (
|
|
694
|
-
const
|
|
695
|
-
locale: i[s.value.substring(0, 2)] ||
|
|
694
|
+
onRangeSelectorInput: (c) => {
|
|
695
|
+
if (c) {
|
|
696
|
+
const y = (Q) => z(Q, h.NUMERIC_DATE_YEAR_FIRST, {
|
|
697
|
+
locale: i[s.value.substring(0, 2)] || C
|
|
696
698
|
});
|
|
697
|
-
|
|
699
|
+
T.startDate = y(c.startDate), T.endDate = y(c.endDate), t(H.INPUT, c);
|
|
698
700
|
}
|
|
699
701
|
},
|
|
700
702
|
onEnterPressedOverInput: () => {
|
|
701
|
-
|
|
703
|
+
D.value || (p.value = !1);
|
|
702
704
|
},
|
|
703
|
-
onDateRangePickerInput: (
|
|
704
|
-
|
|
705
|
-
const
|
|
706
|
-
locale: i[s.value.substring(0, 2)] ||
|
|
705
|
+
onDateRangePickerInput: (c) => {
|
|
706
|
+
D.value = !1;
|
|
707
|
+
const y = (Q) => z(Q, h.NUMERIC_DATE_YEAR_FIRST, {
|
|
708
|
+
locale: i[s.value.substring(0, 2)] || C
|
|
707
709
|
});
|
|
708
|
-
|
|
710
|
+
T.startDate = y(c.startDate), T.endDate = y(c.endDate), t(H.INPUT, c);
|
|
709
711
|
},
|
|
710
|
-
onDateRangePickerError: (
|
|
711
|
-
|
|
712
|
+
onDateRangePickerError: (c) => {
|
|
713
|
+
D.value = !0, T.startDate = c.startDate, T.endDate = c.endDate, t(H.INPUT, { startDate: null, endDate: null });
|
|
712
714
|
},
|
|
713
|
-
onDateRangePickerFormDateInputUpdate: (
|
|
714
|
-
|
|
715
|
+
onDateRangePickerFormDateInputUpdate: (c) => {
|
|
716
|
+
D.value = !1, c.startTime && (T.startTime = c.startTime), c.endTime && (T.endTime = c.endTime);
|
|
715
717
|
}
|
|
716
718
|
};
|
|
717
719
|
}
|
|
718
720
|
});
|
|
719
|
-
const
|
|
720
|
-
function
|
|
721
|
-
const
|
|
722
|
-
return
|
|
723
|
-
e.label ? (
|
|
721
|
+
const Pa = { class: "b-date-range-picker" };
|
|
722
|
+
function Ua(e, t, s, m, i, d) {
|
|
723
|
+
const n = k("field-label"), u = k("dropdown-input-default"), R = k("error-message"), I = k("bento-typography"), v = k("date-range-picker-calendar"), D = k("bento-popover"), F = Xe("bento-click-outside-directive");
|
|
724
|
+
return Ze((b(), le("div", Pa, [
|
|
725
|
+
e.label ? (b(), w(n, {
|
|
724
726
|
key: 0,
|
|
725
727
|
id: e.labelId,
|
|
726
728
|
label: e.label,
|
|
727
729
|
"tooltip-text": e.tooltipText,
|
|
728
730
|
optional: e.optional,
|
|
729
731
|
required: e.required
|
|
730
|
-
}, null, 8, ["id", "label", "tooltip-text", "optional", "required"])) :
|
|
732
|
+
}, null, 8, ["id", "label", "tooltip-text", "optional", "required"])) : S("", !0),
|
|
731
733
|
P("div", {
|
|
732
|
-
onKeydown: t[0] || (t[0] =
|
|
734
|
+
onKeydown: t[0] || (t[0] = xe((...p) => e.onEnterPressedOverInput && e.onEnterPressedOverInput(...p), ["enter"]))
|
|
733
735
|
}, [
|
|
734
|
-
G(
|
|
736
|
+
G(u, {
|
|
735
737
|
ref: "inputContainerRef",
|
|
738
|
+
"always-combobox-is-input": "",
|
|
736
739
|
ariaControls: e.datePickerContainerId,
|
|
737
740
|
ariaExpanded: e.isDateRangePickerOpen,
|
|
738
741
|
"aria-labelledby": e.label ? e.labelId : null,
|
|
@@ -747,30 +750,30 @@ function Pa(e, t, s, u, i, l) {
|
|
|
747
750
|
onClose: e.closeDateRangePicker
|
|
748
751
|
}, null, 8, ["ariaControls", "ariaExpanded", "aria-labelledby", "aria-describedby", "disabled", "is-invalid", "open", "display-value", "readonly", "onOpen", "onClear", "onClose"])
|
|
749
752
|
], 32),
|
|
750
|
-
e.isDateIncorrect ? (
|
|
753
|
+
e.isDateIncorrect ? (b(), w(R, {
|
|
751
754
|
key: 1,
|
|
752
755
|
id: e.dateErrorId,
|
|
753
756
|
"error-message": e.$t("provideDateInAFormat").toString(),
|
|
754
757
|
class: "b-date-range-picker__error-message"
|
|
755
|
-
}, null, 8, ["id", "error-message"])) :
|
|
756
|
-
e.errorMessage ? (
|
|
758
|
+
}, null, 8, ["id", "error-message"])) : S("", !0),
|
|
759
|
+
e.errorMessage ? (b(), w(R, {
|
|
757
760
|
key: 2,
|
|
758
761
|
id: e.errorId,
|
|
759
762
|
"error-message": e.errorMessage,
|
|
760
763
|
class: "b-date-range-picker__error-message"
|
|
761
|
-
}, null, 8, ["id", "error-message"])) :
|
|
762
|
-
e.description ? (
|
|
764
|
+
}, null, 8, ["id", "error-message"])) : S("", !0),
|
|
765
|
+
e.description ? (b(), w(I, {
|
|
763
766
|
key: 3,
|
|
764
767
|
id: e.descriptionId,
|
|
765
768
|
class: de(["b-date-range-picker__description", e.descriptionConditionalClasses]),
|
|
766
769
|
el: "span"
|
|
767
770
|
}, {
|
|
768
771
|
default: U(() => [
|
|
769
|
-
q(
|
|
772
|
+
q(ea(e.description), 1)
|
|
770
773
|
]),
|
|
771
774
|
_: 1
|
|
772
|
-
}, 8, ["id", "class"])) :
|
|
773
|
-
e.inputContainerRef ? (
|
|
775
|
+
}, 8, ["id", "class"])) : S("", !0),
|
|
776
|
+
e.inputContainerRef ? (b(), w(D, {
|
|
774
777
|
key: 4,
|
|
775
778
|
id: e.datePickerContainerId,
|
|
776
779
|
class: "b-date-range-picker__container",
|
|
@@ -783,7 +786,7 @@ function Pa(e, t, s, u, i, l) {
|
|
|
783
786
|
"fit-content": ""
|
|
784
787
|
}, {
|
|
785
788
|
default: U(() => [
|
|
786
|
-
G(
|
|
789
|
+
G(v, {
|
|
787
790
|
"allow-time-input": e.allowTimeInput,
|
|
788
791
|
"quick-select-ranges": e.quickSelectRanges,
|
|
789
792
|
value: e.value,
|
|
@@ -802,16 +805,16 @@ function Pa(e, t, s, u, i, l) {
|
|
|
802
805
|
}, null, 8, ["allow-time-input", "quick-select-ranges", "value", "first-day-of-week", "granularities", "is-date-disabled", "max-range", "min", "max", "number-of-months", "date-form-data", "onCustomRange", "onInput", "onError", "onFormDate"])
|
|
803
806
|
]),
|
|
804
807
|
_: 1
|
|
805
|
-
}, 8, ["id", "open", "target-element", "aria-label"])) :
|
|
808
|
+
}, 8, ["id", "open", "target-element", "aria-label"])) : S("", !0)
|
|
806
809
|
])), [
|
|
807
|
-
[
|
|
810
|
+
[F, e.closeDateRangePicker]
|
|
808
811
|
]);
|
|
809
812
|
}
|
|
810
|
-
const
|
|
813
|
+
const tt = /* @__PURE__ */ Ae(Fa, [["render", Ua], ["__scopeId", "data-v-ab807b85"]]);
|
|
811
814
|
export {
|
|
812
|
-
|
|
813
|
-
|
|
815
|
+
tt as B,
|
|
816
|
+
M as D,
|
|
814
817
|
H as a,
|
|
815
|
-
|
|
818
|
+
Me as i
|
|
816
819
|
};
|
|
817
|
-
//# sourceMappingURL=index.
|
|
820
|
+
//# sourceMappingURL=index.d57976cb.js.map
|