bitboss-ui 3.0.0-beta.72 → 3.0.0-beta.74
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/README.md +4 -2
- package/bin/bitboss-ui-mcp.mjs +101 -3
- package/bin/bitboss-ui.mjs +6 -1
- package/bin/cli.mjs +34 -7
- package/dist/ai/BbBadge.md +4 -4
- package/dist/ai/BbCalendar.md +4 -3
- package/dist/ai/BbColorPalette.md +8 -9
- package/dist/ai/BbConfirmPortal.md +1 -1
- package/dist/ai/BbDatePicker.md +4 -3
- package/dist/ai/BbDialog.md +17 -4
- package/dist/ai/BbDropdown.md +23 -10
- package/dist/ai/BbDropdownButton.md +2 -2
- package/dist/ai/BbForm.md +11 -7
- package/dist/ai/BbHoverCardPortal.md +1 -1
- package/dist/ai/BbNumberInput.md +5 -3
- package/dist/ai/BbPopoverPortal.md +1 -1
- package/dist/ai/BbTable.md +43 -19
- package/dist/ai/BbTimePicker.md +4 -3
- package/dist/ai/BbToastPortal.md +1 -1
- package/dist/ai/changelog.json +60 -4
- package/dist/ai/components.json +56 -20
- package/dist/ai/guides/design-tokens.md +20 -0
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/inertia-helpers.md +613 -53
- package/dist/ai/guides/migration/adoption-checklist.md +5 -5
- package/dist/ai/guides/migration/components/use-confirm.md +4 -1
- package/dist/ai/guides/migration/v2-to-v3.md +24 -0
- package/dist/ai/guides/migration/v3-beta-tooling.md +3 -0
- package/dist/ai/guides/preset-components.md +15 -2
- package/dist/ai/guides/reporting.md +49 -0
- package/dist/ai/helpers/inertia/manifest.json +33 -38
- package/dist/ai/helpers/inertia/useHasChanged.ts +25 -37
- package/dist/ai/helpers/inertia/useQuery.ts +24 -6
- package/dist/ai/helpers/inertia/utils.ts +552 -3
- package/dist/ai/index.md +1 -0
- package/dist/ai/manifest/components/BbAlert.tree.json +1 -1
- package/dist/ai/manifest/components/BbCalendar.json +2 -2
- package/dist/ai/manifest/components/BbColorPalette.json +3 -3
- package/dist/ai/manifest/components/BbConfirm.removed.json +4 -4
- package/dist/ai/manifest/components/BbConfirmPortal.json +1 -1
- package/dist/ai/manifest/components/BbConfirmPortal.removed.json +2 -2
- package/dist/ai/manifest/components/BbDatePicker.json +3 -3
- package/dist/ai/manifest/components/BbDialog.tree.json +5 -1
- package/dist/ai/manifest/components/BbDropdown.json +3 -3
- package/dist/ai/manifest/components/BbDropdown.tree.json +3 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbHoverCardPortal.json +1 -1
- package/dist/ai/manifest/components/BbNumberInput.json +1 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbPopoverPortal.json +1 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +1 -1
- package/dist/ai/manifest/components/BbTable.tree.json +12 -6
- package/dist/ai/manifest/components/BbTimePicker.json +3 -3
- package/dist/ai/manifest/components/BbToast.removed.json +1 -1
- package/dist/ai/manifest/components/BbToastPortal.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +1 -1
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +36 -0
- package/dist/ai/manifest/types.advanced.json +81 -80
- package/dist/ai/manifest/types.api.json +66 -65
- package/dist/ai/manifest/types.wrapper.json +155 -118
- package/dist/ai/recipes/inertia/layout-scaffold.md +3 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +3 -1
- package/dist/ai/recipes/vue/layout-scaffold.md +3 -1
- package/dist/ai/source/BbAlert.md +16 -4
- package/dist/ai/source/BbAvatar.md +2 -0
- package/dist/ai/source/BbBreadcrumbs.md +4 -1
- package/dist/ai/source/BbCalendar.md +22 -12
- package/dist/ai/source/BbColorPalette.md +41 -12
- package/dist/ai/source/BbConfirm.md +7 -0
- package/dist/ai/source/BbConfirmPortal.md +9 -4
- package/dist/ai/source/BbDatePicker.md +53 -22
- package/dist/ai/source/BbDatePickerInput.md +32 -8
- package/dist/ai/source/BbDialog.md +31 -1
- package/dist/ai/source/BbDropdown.md +52 -24
- package/dist/ai/source/BbDropdownGroup.md +17 -21
- package/dist/ai/source/BbForm.md +80 -6
- package/dist/ai/source/BbHoverCard.md +7 -0
- package/dist/ai/source/BbHoverCardPortal.md +9 -5
- package/dist/ai/source/BbNumberInput.md +5 -6
- package/dist/ai/source/BbOffCanvas.md +34 -1
- package/dist/ai/source/BbPopover.md +7 -0
- package/dist/ai/source/BbPopoverPortal.md +9 -5
- package/dist/ai/source/BbRadio.md +4 -3
- package/dist/ai/source/BbRadioGroup.md +7 -5
- package/dist/ai/source/BbTable.md +54 -6
- package/dist/ai/source/BbTag.md +10 -3
- package/dist/ai/source/BbTimePicker.md +50 -15
- package/dist/ai/source/BbTimePickerInput.md +30 -7
- package/dist/ai/source/BbToast.md +14 -0
- package/dist/ai/source/BbToastPortal.md +16 -4
- package/dist/ai/source/CommonFieldInput.md +11 -5
- package/dist/ai/source/CommonPopover.md +4 -1
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +31 -26
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +235 -234
- package/dist/components/BbCalendar/types.d.ts +2 -2
- package/dist/components/BbCalendar/useDayjsLocale.js +11 -8
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +197 -192
- package/dist/components/BbColorPalette/types.d.ts +1 -1
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +2 -4
- package/dist/components/BbConfirm/types.d.ts +5 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +145 -139
- package/dist/components/BbDatePicker/types.d.ts +2 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +337 -335
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +253 -245
- package/dist/components/BbDialog/leaveGhost.js +33 -0
- package/dist/components/BbDialog/overlayActions.js +34 -20
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +11 -3
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +119 -120
- package/dist/components/BbDropdown/types.d.ts +8 -17
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -21
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +229 -227
- package/dist/components/BbForm/types.d.ts +31 -0
- package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -5
- package/dist/components/BbHoverCard/types.d.ts +5 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbNumberInput/numberDisplay.js +102 -106
- package/dist/components/BbNumberInput/types.d.ts +4 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +385 -377
- package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -5
- package/dist/components/BbPopover/types.d.ts +5 -0
- package/dist/components/BbRadio/types.d.ts +4 -3
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +10 -12
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +231 -231
- package/dist/components/BbTable/BbTableDataRow.js +96 -96
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +9 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +1 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +106 -100
- package/dist/components/BbTimePicker/types.d.ts +2 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +214 -213
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +2 -4
- package/dist/components/BbToast/types.d.ts +5 -0
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +36 -36
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/CommonTimeSelector/useMeridiem.js +6 -6
- package/dist/composables/formSubmitLock.js +2 -1
- package/dist/composables/overlayRegistry.js +52 -42
- package/dist/composables/useActiveInactiveState.js +8 -4
- package/dist/composables/useBbDialog.js +5 -5
- package/dist/composables/useOwnModel.js +16 -0
- package/dist/composables/useSegmentedFields.js +31 -20
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/i18n/currencyDigits.js +58 -0
- package/dist/i18n/regionDates.js +250 -0
- package/dist/i18n/regionHints.js +30 -41
- package/dist/index.d.ts +34 -30
- package/dist/llms-full.txt +874 -136
- package/dist/llms.txt +3 -1
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +3 -1
- package/dist/types/CommonProps.d.ts +8 -0
- package/dist/utilities/functions/hash.js +123 -3
- package/dist/utilities/functions/isEqual.js +69 -3
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +2 -1
- package/dist/vite.js +8 -5
- package/llms.txt +3 -1
- package/package.json +2 -3
- package/scripts/README.md +43 -43
- package/scripts/lib/adoption-checklist.json +6 -5
- package/scripts/lib/agent-manifest.mjs +33 -6
- package/scripts/lib/agent-setup.mjs +54 -6
- package/scripts/lib/cldr-pins.ts +182 -0
- package/scripts/lib/engines-include.d.mts +5 -0
- package/scripts/lib/engines-include.mjs +40 -0
- package/scripts/lib/eslint-plugin.mjs +8 -2
- package/scripts/lib/helpers-add.mjs +21 -2
- package/scripts/lib/hidden-label-placeholder.mjs +25 -5
- package/scripts/lib/idiom-scan.mjs +30 -3
- package/scripts/lib/legacy-agent-files.json +152 -0
- package/scripts/lib/mcp-config.mjs +74 -7
- package/scripts/lib/portal-names.mjs +78 -8
- package/scripts/lib/release-results.mjs +153 -6
- package/scripts/lib/report.mjs +340 -0
- package/scripts/lib/run-beat.mjs +14 -0
- package/scripts/lib/run-records.mjs +313 -0
- package/scripts/lib/selector-log.mjs +98 -0
- package/scripts/lib/ticket-beat.mjs +30 -0
- package/scripts/lib/validate-bb-markup.mjs +17 -2
package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -20,24 +20,25 @@ import { warnRemovedAttrs as _e } from "../../utilities/functions/warnRemovedAtt
|
|
|
20
20
|
import ve from "../../assets/svgs/calendar.svg_raw.js";
|
|
21
21
|
import { calendars as ye, localeOf as be } from "../../utilities/calendar/index.js";
|
|
22
22
|
import { foldDigits as xe } from "../../utilities/calendar/digits.js";
|
|
23
|
-
import { formatDateOf as Se, intlLocaleOf as Ce,
|
|
24
|
-
import Oe from "
|
|
25
|
-
import
|
|
26
|
-
import je from "../
|
|
27
|
-
import Me from "../
|
|
28
|
-
import Ne from "../
|
|
29
|
-
import
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
23
|
+
import { formatDateOf as Se, intlLocaleOf as Ce, spokenClockOf as we, spokenDateOptionsOf as Te, useDayjsLocale as Ee, weekSpanOf as De } from "../BbCalendar/useDayjsLocale.js";
|
|
24
|
+
import { useHydrated as Oe } from "../../composables/useHydrated.js";
|
|
25
|
+
import ke from "../BbDatePicker/BbDatePicker.vue.js";
|
|
26
|
+
import { BB_DATE_PICKER_PT as Ae, DATE_PICKER_CALENDAR_PARTS as je } from "../BbDatePicker/types.js";
|
|
27
|
+
import Me from "../BbIcon/BbIcon.vue.js";
|
|
28
|
+
import Ne from "../CommonField/CommonField.vue.js";
|
|
29
|
+
import Pe from "../CommonFieldInput/CommonFieldInput.vue.js";
|
|
30
|
+
import { useMeridiem as Fe } from "../CommonTimeSelector/useMeridiem.js";
|
|
31
|
+
import { BB_DATE_PICKER_INPUT_PT as Ie } from "./types.js";
|
|
32
|
+
import { dateLayoutFromHint as Le, dateReadsRtl as Re, monthLayoutFromHint as ze } from "./dateFieldLayout.js";
|
|
33
|
+
import { calendarFieldSpecs as Be, calendarFieldsOf as Ve, eraHint as He, matchEra as Ue } from "./calendarFields.js";
|
|
34
|
+
import { Fragment as We, computed as p, createBlock as Ge, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createSlots as Ke, createVNode as qe, defineComponent as Je, guardReactiveProps as Ye, mergeProps as _, normalizeClass as Xe, normalizeProps as Ze, normalizeStyle as Qe, onBeforeUnmount as $e, onDeactivated as et, openBlock as v, ref as y, renderList as tt, renderSlot as b, toDisplayString as nt, toRaw as rt, unref as x, useAttrs as it, useSlots as at, watch as ot, withCtx as S, withDirectives as st } from "vue";
|
|
34
35
|
import C from "dayjs";
|
|
35
|
-
import
|
|
36
|
-
import { formatCalendarDate as w, formatDigits as
|
|
37
|
-
import
|
|
38
|
-
import
|
|
36
|
+
import ct from "dayjs/plugin/customParseFormat";
|
|
37
|
+
import { formatCalendarDate as w, formatDigits as lt } from "virtual:bitboss-ui/calendars";
|
|
38
|
+
import ut from "dayjs/plugin/isSameOrAfter";
|
|
39
|
+
import dt from "dayjs/plugin/isSameOrBefore";
|
|
39
40
|
// src/components/BbDatePickerInput/BbDatePickerInput.vue?vue&type=script&setup=true&lang.ts
|
|
40
|
-
var
|
|
41
|
+
var ft = ["dir"], pt = ["onClick"], mt = ["data-value"], ht = [
|
|
41
42
|
"id",
|
|
42
43
|
"aria-describedby",
|
|
43
44
|
"aria-disabled",
|
|
@@ -60,8 +61,8 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
60
61
|
"onInput",
|
|
61
62
|
"onKeydown",
|
|
62
63
|
"onPaste"
|
|
63
|
-
],
|
|
64
|
-
mixins: [u(
|
|
64
|
+
], gt = ["onClick"], _t = ["onClick"], vt = ["aria-disabled", "disabled"], yt = ["id"], T = "YYYY-MM-DD", bt = "YYYY-MM-DDTHH:mm", xt = /*@__PURE__*/ Je({
|
|
65
|
+
mixins: [u(Ie)],
|
|
65
66
|
inheritAttrs: !1,
|
|
66
67
|
__name: "BbDatePickerInput",
|
|
67
68
|
props: {
|
|
@@ -437,198 +438,199 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
437
438
|
"update:modelValue",
|
|
438
439
|
"update:time"
|
|
439
440
|
],
|
|
440
|
-
setup(u, { emit:
|
|
441
|
-
let
|
|
441
|
+
setup(u, { emit: Je }) {
|
|
442
|
+
let xt = u, St = Je, Ct = at(), { props: E, emit: D, showAsterisk: wt, errors: Tt, required: Et, ariaRequired: Dt, model: Ot, readonly: kt, locked: At } = r(xt, St, {
|
|
442
443
|
componentName: "BbDatePickerInput",
|
|
443
|
-
identifierFallback: () =>
|
|
444
|
-
leaveOn: "inactive"
|
|
445
|
-
|
|
444
|
+
identifierFallback: () => xt.label,
|
|
445
|
+
leaveOn: "inactive",
|
|
446
|
+
emptyValue: () => null
|
|
447
|
+
}), jt = /^\d{4}-\d{2}-\d{2}(:append)?$/, Mt = () => Object.keys(Ct).filter((e) => jt.test(e)), O = t();
|
|
446
448
|
process.env.NODE_ENV !== "production" && _e("BbDatePickerInput", te("BbDatePickerInput"), { fixedSlots: ["append:outer"] });
|
|
447
|
-
let
|
|
448
|
-
|
|
449
|
-
},
|
|
450
|
-
|
|
451
|
-
},
|
|
452
|
-
|
|
449
|
+
let Nt = y(!1), Pt = y(!1), Ft = () => {
|
|
450
|
+
Pt.value = !1;
|
|
451
|
+
}, It = y(!1), Lt = () => {
|
|
452
|
+
It.value = !0, D("show");
|
|
453
|
+
}, Rt = () => {
|
|
454
|
+
It.value = !1, D("hide");
|
|
453
455
|
};
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
}),
|
|
457
|
-
let
|
|
456
|
+
et(() => {
|
|
457
|
+
Nt.value ? pn() : Ft();
|
|
458
|
+
}), $e(Ft);
|
|
459
|
+
let zt = p(() => E.persistentHint || Pt.value), Bt = p(() => me(E.modelValue)), k = n("BbDatePickerInput", E, {
|
|
458
460
|
labelMode: "outside",
|
|
459
461
|
autocomplete: "off",
|
|
460
462
|
compact: !1,
|
|
461
463
|
reverse: !1,
|
|
462
464
|
floating: !1
|
|
463
|
-
}),
|
|
465
|
+
}), Vt = p(() => k.labelMode), Ht = [
|
|
464
466
|
"panel",
|
|
465
467
|
"sheet",
|
|
466
|
-
...
|
|
467
|
-
],
|
|
468
|
+
...je
|
|
469
|
+
], A = l({
|
|
468
470
|
component: "BbDatePickerInput",
|
|
469
|
-
attrs:
|
|
471
|
+
attrs: it(),
|
|
470
472
|
controlAttrs: s,
|
|
471
473
|
props: E,
|
|
472
|
-
parts:
|
|
473
|
-
states:
|
|
474
|
+
parts: Ie.parts,
|
|
475
|
+
states: Ie.states,
|
|
474
476
|
active: {
|
|
475
|
-
...c(E, () =>
|
|
476
|
-
open: () =>
|
|
477
|
+
...c(E, () => Bt.value),
|
|
478
|
+
open: () => It.value
|
|
477
479
|
},
|
|
478
480
|
variant: {
|
|
479
|
-
...
|
|
481
|
+
...Ie.variant,
|
|
480
482
|
current: () => E.variant ?? "outline"
|
|
481
483
|
}
|
|
482
|
-
}),
|
|
484
|
+
}), j = p(() => E.type === "datetime"), M = p(() => re(E.type)), Ut = p(() => k.floating || ie(E.type)), N = p(() => E.type === "week"), Wt = p(() => ae(E.type)), P = w ? p(() => {
|
|
483
485
|
let { calendar: e } = be(O.locale);
|
|
484
486
|
return e === "gregory" ? void 0 : ye[e];
|
|
485
|
-
}) : null,
|
|
486
|
-
C.extend(
|
|
487
|
-
let { t:
|
|
488
|
-
let n = [e,
|
|
487
|
+
}) : null, Gt = p(() => ne(E.type, P?.value));
|
|
488
|
+
C.extend(ct), C.extend(ut), C.extend(dt), Ee();
|
|
489
|
+
let { t: F } = i(), I = a(), L = y(null), Kt = (e) => `bdpi-description_${e}`, qt = (e, t) => {
|
|
490
|
+
let n = [e, Kt(t)].filter((e) => !!e?.trim()).flatMap((e) => e.split(/\s+/)).filter(Boolean);
|
|
489
491
|
return Array.from(new Set(n)).join(" ");
|
|
490
|
-
}, { isMobile:
|
|
491
|
-
|
|
492
|
-
},
|
|
492
|
+
}, { isMobile: Jt } = o(), Yt = p(() => E.disableWriting === "mobile" ? !Jt.value : E.disableWriting === "desktop" ? Jt.value : !E.disableWriting), Xt = p(() => !Yt.value && !tn.value && !E.disabled && !E.readonly), Zt = () => {
|
|
493
|
+
Xt.value && !It.value && (L.value?.$el)?.querySelector(".bb-segmented-field__activator")?.click();
|
|
494
|
+
}, Qt = (e) => {
|
|
493
495
|
let t = e.target;
|
|
494
|
-
t?.closest(".bb-field-input__box") && (t.closest(".bb-segmented-field__activator, .bb-clearable-button, .bb-date-picker__panel, [role=\"dialog\"]") ||
|
|
495
|
-
},
|
|
496
|
-
if (
|
|
497
|
-
else if (E.readonly &&
|
|
496
|
+
t?.closest(".bb-field-input__box") && (t.closest(".bb-segmented-field__activator, .bb-clearable-button, .bb-date-picker__panel, [role=\"dialog\"]") || Zt());
|
|
497
|
+
}, $t = (e) => e.key === "ArrowUp" || e.key === "ArrowDown" || e.key === "Backspace" || e.key === "Delete" || e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey, en = (e, t) => {
|
|
498
|
+
if (Xt.value && (t.key === "Enter" || t.key === " ")) t.preventDefault(), Zt();
|
|
499
|
+
else if (E.readonly && $t(t)) t.preventDefault();
|
|
498
500
|
else if (w && V.value?.eras.length && e.field === "year" && (t.key === "ArrowUp" || t.key === "ArrowDown")) {
|
|
499
501
|
t.preventDefault();
|
|
500
502
|
let n = q.value[e.segment], r = V.value.lastYearOf(n.era), i = n.year ? parseInt(n.year, 10) : 0, a = n.year ? Math.min(Math.max(i + (t.key === "ArrowUp" ? 1 : -1), 1), r) : 1;
|
|
501
|
-
a !== i && (n.year = String(a), Y(), $({ finalize: !1 })), t.target.value =
|
|
502
|
-
} else
|
|
503
|
-
},
|
|
504
|
-
if (
|
|
505
|
-
if (
|
|
506
|
-
let t = C(e,
|
|
503
|
+
a !== i && (n.year = String(a), Y(), $({ finalize: !1 })), t.target.value = Zn(n.year);
|
|
504
|
+
} else ar(e, t);
|
|
505
|
+
}, tn = p(() => E.disableCalendar === "mobile" ? Jt.value : E.disableCalendar === "desktop" ? !Jt.value : !!E.disableCalendar), nn = p(() => !!E.readonly || !Yt.value), rn = (e) => Yt.value ? Rn.value[e].kind === "enum" ? "none" : "numeric" : "none", an = (e) => e.includes("T"), R = (e) => {
|
|
506
|
+
if (N.value) return C(le(e, "min"), T, !0);
|
|
507
|
+
if (M.value) {
|
|
508
|
+
let t = C(e, Gt.value, !0);
|
|
507
509
|
return t.isValid() ? t : C(e);
|
|
508
510
|
}
|
|
509
|
-
return
|
|
510
|
-
}, z = p(() => he(E.min, E.type, "min", (e) =>
|
|
511
|
-
for (let [e, t] of [["min", E.min], ["max", E.max]]) t && (R(t).isValid() ||
|
|
512
|
-
let
|
|
513
|
-
!
|
|
514
|
-
let
|
|
515
|
-
floating:
|
|
511
|
+
return an(e) ? C(e, bt, !0) : C(e, T, !0);
|
|
512
|
+
}, z = p(() => he(E.min, E.type, "min", (e) => I.warn(`BbDatePickerInput: ${e}`), P?.value)), B = p(() => he(E.max, E.type, "max", (e) => I.warn(`BbDatePickerInput: ${e}`), P?.value));
|
|
513
|
+
for (let [e, t] of [["min", E.min], ["max", E.max]]) t && (R(t).isValid() || I.throw(N.value ? `BbDatePickerInput: ${e} must be a week (YYYY-Www) or a date (YYYY-MM-DD) with type="week"` : M.value ? `BbDatePickerInput: ${e} must be a ${Gt.value} value (a longer date is accepted and rounded to the ${Wt.value}) with type="${E.type}"` : `BbDatePickerInput: ${e} must be in the format YYYY-MM-DD or YYYY-MM-DDTHH:mm`), (M.value || N.value) && (e === "min" ? z.value : B.value));
|
|
514
|
+
let on = E.disableWriting !== !0 && E.disableWriting !== "desktop", sn = E.disableCalendar !== !0 && E.disableCalendar !== "desktop", cn = E.disableWriting !== !0 && E.disableWriting !== "mobile", ln = E.disableCalendar !== !0 && E.disableCalendar !== "mobile";
|
|
515
|
+
!on && !sn && I.throw("BbDatePickerInput: desktop users would have no interaction method — disableWriting:true (or \"desktop\") and disableCalendar:true (or \"desktop\") cannot be combined."), !cn && !ln && I.throw("BbDatePickerInput: mobile users would have no interaction method — combine disableWriting:\"mobile\" with disableCalendar:\"desktop\" to keep calendar interaction on mobile while staying keyboard-first on desktop.");
|
|
516
|
+
let un = p(() => ({
|
|
517
|
+
floating: Ut.value,
|
|
516
518
|
utc: E.utc,
|
|
517
519
|
type: E.type,
|
|
518
|
-
calendar:
|
|
520
|
+
calendar: P?.value
|
|
519
521
|
})), V = w ? p(() => {
|
|
520
522
|
let { calendar: e, intl: t } = be(O.locale);
|
|
521
523
|
if (e === "gregory" || E.type === "week") return null;
|
|
522
524
|
let n = ye[e];
|
|
523
|
-
return n ?
|
|
524
|
-
}) : null, H = (e) => de(e,
|
|
525
|
-
|
|
525
|
+
return n ? Ve(n, t, (e, t) => Se(e, O.locale, t)) : null;
|
|
526
|
+
}) : null, H = (e) => de(e, un.value), dn = (e) => ue(e, un.value), fn = () => {
|
|
527
|
+
Nt.value || (Pt.value = !0, D("active"), Nt.value = !0, document.addEventListener("focusin", U), document.addEventListener("click", U, !0));
|
|
526
528
|
}, U = (e) => {
|
|
527
529
|
let t = e.target;
|
|
528
|
-
t instanceof HTMLElement &&
|
|
529
|
-
},
|
|
530
|
-
$({ finalize: !0 }),
|
|
531
|
-
},
|
|
532
|
-
let n =
|
|
530
|
+
t instanceof HTMLElement && L.value?.$el && (e.type === "focusin" && t.contains(L.value.$el) || L.value.$el.contains(t) || pn());
|
|
531
|
+
}, pn = () => {
|
|
532
|
+
$({ finalize: !0 }), jr() && (kr(), Y()), Nt.value = !1, Ft(), D("inactive"), document.removeEventListener("focusin", U), document.removeEventListener("click", U, !0);
|
|
533
|
+
}, mn = (e, t) => {
|
|
534
|
+
let n = dn(t);
|
|
533
535
|
if (!n.isValid()) return;
|
|
534
536
|
let r = q.value[e];
|
|
535
|
-
w && V.value ?
|
|
536
|
-
},
|
|
537
|
+
w && V.value ? Un(r, n) : (r.day = n.format("DD"), r.month = n.format("MM"), r.year = n.format("YYYY"));
|
|
538
|
+
}, hn = (e) => {
|
|
537
539
|
let { week: t, year: n } = oe(e);
|
|
538
540
|
return {
|
|
539
541
|
week: String(t).padStart(2, "0"),
|
|
540
542
|
year: String(n).padStart(4, "0")
|
|
541
543
|
};
|
|
542
|
-
},
|
|
543
|
-
if (e === null && E.range && (e = []), !
|
|
544
|
+
}, gn = { "onUpdate:modelValue": (e) => {
|
|
545
|
+
if (e === null && E.range && (e = []), !j.value) D("update:modelValue", e);
|
|
544
546
|
else if (e === null || Array.isArray(e) && !e.length) q.value.start = J(), q.value.end = J(), Y(), Q(E.range ? [] : null);
|
|
545
547
|
else if (Array.isArray(e)) {
|
|
546
548
|
let [t, n] = e;
|
|
547
|
-
t ?
|
|
548
|
-
} else
|
|
549
|
-
} },
|
|
549
|
+
t ? mn("start", t) : q.value.start = J(), n ? mn("end", n) : q.value.end = J(), Y(), $({ finalize: !1 });
|
|
550
|
+
} else mn("start", e), Y(), $({ finalize: !1 });
|
|
551
|
+
} }, _n = (e) => {
|
|
550
552
|
let t = q.value[e];
|
|
551
|
-
return
|
|
552
|
-
},
|
|
553
|
+
return N.value ? !!(t.week && t.year && t.year.length === 4) : !!(t.day && t.month && (w ? vn(t) : t.year.length === 4));
|
|
554
|
+
}, vn = (e) => {
|
|
553
555
|
let t = V.value;
|
|
554
556
|
return t ? t.eras.length && !e.era ? !1 : t.yearFullLength ? e.year.length === t.yearDigits : !!e.year : e.year.length === 4;
|
|
555
|
-
},
|
|
556
|
-
|
|
557
|
-
},
|
|
558
|
-
let n = q.value[
|
|
559
|
-
e === "hour" ?
|
|
560
|
-
},
|
|
561
|
-
if (
|
|
562
|
-
let t = Se(e, O.locale,
|
|
563
|
-
return
|
|
564
|
-
},
|
|
565
|
-
if (
|
|
557
|
+
}, yn = y("start"), bn = (e, t) => {
|
|
558
|
+
yn.value = e.segment, or(e, t), D("focus", t);
|
|
559
|
+
}, xn = p(() => E.range ? _n(yn.value) ? yn.value : _n("end") ? "end" : "start" : "start"), Sn = ({ unit: e, value: t }) => {
|
|
560
|
+
let n = q.value[xn.value];
|
|
561
|
+
e === "hour" ? hr(n, parseInt(t, 10)) : e === "meridiem" ? n.meridiem = W.label(t === "PM" ? "PM" : "AM") : n[e] = t, n.hour ||= E.ampm ? "12" : "00", E.ampm && !n.meridiem && (n.meridiem = W.am.value), n.minute ||= "00", E.seconds && !n.second && (n.second = "00"), Y(), $({ finalize: !1 });
|
|
562
|
+
}, Cn = p(() => Te(E.type)), { isHydrated: wn } = Oe(), Tn = (e) => {
|
|
563
|
+
if (N.value) return F("datePicker.weekSpan", String(oe(e).week), De(f(e), O.locale)).value;
|
|
564
|
+
let t = Se(e, O.locale, Cn.value);
|
|
565
|
+
return j.value ? `${t} ${we(e, O.locale, !!E.ampm, !!E.seconds, wn.value)}` : t;
|
|
566
|
+
}, En = (e) => {
|
|
567
|
+
if (rr(e) !== "complete") return null;
|
|
566
568
|
let t = q.value[e];
|
|
567
|
-
if (
|
|
569
|
+
if (N.value) {
|
|
568
570
|
let e = se(parseInt(t.year, 10), parseInt(t.week, 10));
|
|
569
571
|
return e.isValid() ? e : null;
|
|
570
572
|
}
|
|
571
573
|
let n = G.value;
|
|
572
574
|
if (w && V.value) {
|
|
573
|
-
let e = V.value.dateOf(
|
|
574
|
-
return !e ||
|
|
575
|
+
let e = V.value.dateOf(Vn(t), n), r = j.value ? Nr(t) : null;
|
|
576
|
+
return !e || j.value && !r ? null : r ? e.hour(+r.hour).minute(+r.minute).second(+r.second) : e;
|
|
575
577
|
}
|
|
576
578
|
let r = n.has("day") ? t.day.padStart(2, "0") : "01", i = n.has("month") ? t.month.padStart(2, "0") : "01", a = `${t.year.padStart(4, "0")}-${i}-${r}`, o = T;
|
|
577
|
-
|
|
579
|
+
j.value && (a += `T${Ir(e)}`, o += E.seconds ? "THH:mm:ss" : "THH:mm");
|
|
578
580
|
let s = C(a, o, !0);
|
|
579
581
|
return s.isValid() ? s : null;
|
|
580
|
-
},
|
|
582
|
+
}, Dn = p(() => {
|
|
581
583
|
if (E.range) {
|
|
582
|
-
let e =
|
|
583
|
-
return !e || !t ?
|
|
584
|
+
let e = En("start"), t = En("end");
|
|
585
|
+
return !e || !t ? F("datePickerInput.emptyRange").value : F("datePickerInput.changeSelectionRange", Tn(e), Tn(t)).value;
|
|
584
586
|
}
|
|
585
|
-
let e =
|
|
586
|
-
return e ?
|
|
587
|
-
}),
|
|
587
|
+
let e = En("start");
|
|
588
|
+
return e ? F("datePickerInput.changeSelection", Tn(e)).value : F("datePickerInput.emptySelection").value;
|
|
589
|
+
}), On = (e) => {
|
|
588
590
|
if (!e.isValid()) return !0;
|
|
589
|
-
if (
|
|
591
|
+
if (N.value) {
|
|
590
592
|
let t = f(e), n = z.value, r = B.value;
|
|
591
593
|
return n && t.isBefore(R(n), "day") || r && t.add(6, "day").isAfter(R(r), "day") ? !0 : typeof E.selectable == "function" && !E.selectable(H(t));
|
|
592
594
|
}
|
|
593
595
|
let t = !0;
|
|
594
|
-
if (w &&
|
|
596
|
+
if (w && P.value && M.value) return ge(e, {
|
|
595
597
|
min: E.min,
|
|
596
598
|
max: E.max,
|
|
597
599
|
selectable: E.selectable,
|
|
598
600
|
type: E.type,
|
|
599
|
-
calendar:
|
|
601
|
+
calendar: P.value
|
|
600
602
|
});
|
|
601
|
-
let n = (e) =>
|
|
603
|
+
let n = (e) => M.value ? Wt.value : j.value && an(e) ? "minute" : "day", r = z.value, i = B.value;
|
|
602
604
|
return r && (t &&= e.isSameOrAfter(R(r), n(r))), i && (t &&= e.isSameOrBefore(R(i), n(i))), typeof E.selectable == "function" && (t &&= E.selectable(H(e))), !t;
|
|
603
|
-
},
|
|
604
|
-
E.range ? (D("update:modelValue", []),
|
|
605
|
-
},
|
|
605
|
+
}, kn = () => {
|
|
606
|
+
E.range ? (D("update:modelValue", []), j.value && (Lr.value = [], D("update:time", []))) : (D("update:modelValue", null), j.value && (Lr.value = null, D("update:time", null)));
|
|
607
|
+
}, An = /* @__PURE__ */ new Set([
|
|
606
608
|
"hour",
|
|
607
609
|
"minute",
|
|
608
610
|
"second",
|
|
609
611
|
"meridiem"
|
|
610
|
-
]), W =
|
|
612
|
+
]), W = Fe(), jn = (e, t) => W.isPm(t) ? e === 12 ? 12 : e + 12 : e === 12 ? 0 : e, Mn = (e) => {
|
|
611
613
|
let t = e >= 12 ? "PM" : "AM", n = e % 12;
|
|
612
614
|
return n === 0 && (n = 12), {
|
|
613
615
|
hour: String(n).padStart(2, "0"),
|
|
614
616
|
meridiem: t
|
|
615
617
|
};
|
|
616
|
-
},
|
|
618
|
+
}, Nn = p(() => {
|
|
617
619
|
if (E.type === "year") return {
|
|
618
620
|
order: ["year"],
|
|
619
621
|
separator: "/"
|
|
620
622
|
};
|
|
621
|
-
if (
|
|
623
|
+
if (N.value) return {
|
|
622
624
|
order: ["week", "year"],
|
|
623
625
|
separator: " "
|
|
624
626
|
};
|
|
625
|
-
let e =
|
|
626
|
-
if (E.type === "month") return
|
|
627
|
+
let e = F("datePickerInput.monthFormatSingle").value;
|
|
628
|
+
if (E.type === "month") return ze(e) ?? {
|
|
627
629
|
order: ["month", "year"],
|
|
628
630
|
separator: "/"
|
|
629
631
|
};
|
|
630
|
-
let t =
|
|
631
|
-
return
|
|
632
|
+
let t = F("datePickerInput.dateFormatSingle").value;
|
|
633
|
+
return Le(t, e) ?? {
|
|
632
634
|
order: [
|
|
633
635
|
"day",
|
|
634
636
|
"month",
|
|
@@ -636,8 +638,8 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
636
638
|
],
|
|
637
639
|
separator: "/"
|
|
638
640
|
};
|
|
639
|
-
}),
|
|
640
|
-
let e =
|
|
641
|
+
}), Pn = p(() => {
|
|
642
|
+
let e = Nn.value.order;
|
|
641
643
|
if (!w || !V.value?.eras.length) return e;
|
|
642
644
|
let t = e.indexOf("year") + +!V.value.eraFirst;
|
|
643
645
|
return [
|
|
@@ -645,12 +647,12 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
645
647
|
"era",
|
|
646
648
|
...e.slice(t)
|
|
647
649
|
];
|
|
648
|
-
}), G = p(() => new Set(
|
|
649
|
-
if (!
|
|
650
|
+
}), G = p(() => new Set(Pn.value)), Fn = p(() => {
|
|
651
|
+
if (!j.value) return [];
|
|
650
652
|
let e = ["hour", "minute"];
|
|
651
653
|
return E.seconds && e.push("second"), E.ampm && e.push("meridiem"), e;
|
|
652
654
|
}), K = p(() => {
|
|
653
|
-
let e = [...
|
|
655
|
+
let e = [...Pn.value, ...Fn.value], t = e.map((e) => ({
|
|
654
656
|
segment: "start",
|
|
655
657
|
field: e
|
|
656
658
|
}));
|
|
@@ -660,12 +662,12 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
660
662
|
field: e
|
|
661
663
|
}));
|
|
662
664
|
return [...t, ...n];
|
|
663
|
-
}),
|
|
665
|
+
}), In = p(() => {
|
|
664
666
|
let e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set();
|
|
665
667
|
return K.value.forEach((n, r) => {
|
|
666
668
|
e.has(n.segment) || (e.add(n.segment), t.add(r));
|
|
667
669
|
}), t;
|
|
668
|
-
}),
|
|
670
|
+
}), Ln = (e) => In.value.has(e), Rn = p(() => ({
|
|
669
671
|
era: {
|
|
670
672
|
kind: "enum",
|
|
671
673
|
maxLength: 0
|
|
@@ -736,24 +738,24 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
736
738
|
label: "Second"
|
|
737
739
|
},
|
|
738
740
|
meridiem: W.fieldSpec.value,
|
|
739
|
-
...
|
|
740
|
-
})),
|
|
741
|
+
...Bn?.value
|
|
742
|
+
})), zn = (e) => Rn.value[e].kind === "numeric" ? void 0 : Rn.value[e].maxLength, Bn = w ? p(() => V.value ? Be(V.value) : null) : null, Vn = (e) => ({
|
|
741
743
|
era: e.era,
|
|
742
744
|
year: e.year,
|
|
743
745
|
month: e.month,
|
|
744
746
|
day: e.day
|
|
745
|
-
}),
|
|
746
|
-
|
|
747
|
+
}), Hn = /* @__PURE__ */ new WeakMap(), Un = (e, t) => {
|
|
748
|
+
Hn.set(rt(e), t);
|
|
747
749
|
let n = V.value.fieldsOf(t);
|
|
748
750
|
e.era = n.era, e.year = n.year, G.value.has("month") && (e.month = n.month), G.value.has("day") && (e.day = n.day);
|
|
749
|
-
},
|
|
751
|
+
}, Wn = p(() => ee(K.value, (e) => e === "meridiem" ? "meridiem" : An.has(e) ? "time" : "date")), Gn = (e) => e.items.at(-1).index, Kn = p(() => Re(Ce(O.locale))), qn = (e) => e.kind === "meridiem" || e.kind === "date" && Kn.value ? void 0 : "ltr", Jn = (e, t) => {
|
|
750
752
|
if (e.segment !== t.segment) return "–";
|
|
751
753
|
if (t.field === "meridiem") return "\xA0";
|
|
752
|
-
let n =
|
|
753
|
-
return n && r ? ":" : !n && r ? "\xA0" : w && (e.field === "era" && t.field === "year" || e.field === "year" && t.field === "era") ? V.value?.eraSeparator ?? " " :
|
|
754
|
-
}, { fields: q, fieldRefs:
|
|
754
|
+
let n = An.has(e.field), r = An.has(t.field);
|
|
755
|
+
return n && r ? ":" : !n && r ? "\xA0" : w && (e.field === "era" && t.field === "year" || e.field === "year" && t.field === "era") ? V.value?.eraSeparator ?? " " : lt && Kn.value ? `\u200F${Nn.value.separator}` : Nn.value.separator;
|
|
756
|
+
}, { fields: q, fieldRefs: Yn, descriptorKey: Xn, displayOf: Zn, emptyFieldGroup: J, getSizedValue: Qn, minChars: $n, updateAllSizedValues: Y, isOwnField: er, focusField: tr, focusFirstField: nr, segmentStatus: rr, onFieldInput: ir, onFieldKeydown: ar, onFieldFocus: or, onFieldBlur: sr, onFieldPaste: cr } = d({
|
|
755
757
|
fieldOrder: K,
|
|
756
|
-
specs:
|
|
758
|
+
specs: Rn,
|
|
757
759
|
segments: ["start", "end"],
|
|
758
760
|
fieldKeys: [
|
|
759
761
|
"era",
|
|
@@ -778,13 +780,13 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
778
780
|
" "
|
|
779
781
|
],
|
|
780
782
|
onDirty: () => $({ finalize: !1 }),
|
|
781
|
-
numberingSystem:
|
|
782
|
-
}),
|
|
783
|
+
numberingSystem: lt ? () => be(O.locale).numberingSystem : void 0
|
|
784
|
+
}), lr = (e, t) => {
|
|
783
785
|
if (w && e.field === "era" && V.value) {
|
|
784
|
-
let n = q.value[e.segment], r = t.target, i = xe(r.value), a =
|
|
786
|
+
let n = q.value[e.segment], r = t.target, i = xe(r.value), a = Ue(V.value, i, n.era), o = i.replace(/\D/g, "");
|
|
785
787
|
if (a && a !== n.era) n.era = a, $({ finalize: !1 });
|
|
786
788
|
else if (o && V.value.eraFirst) {
|
|
787
|
-
n.era ||= V.value.fieldsOf(
|
|
789
|
+
n.era ||= V.value.fieldsOf(ur()).era, n.year = o.slice(0, Rn.value.year.maxLength), r.value = n.era, Y(), tr({
|
|
788
790
|
segment: e.segment,
|
|
789
791
|
field: "year"
|
|
790
792
|
}, { caretToEnd: !0 }), $({ finalize: !1 });
|
|
@@ -795,18 +797,18 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
795
797
|
let n = q.value[e.segment], r = W.match(t.target.value, n.meridiem);
|
|
796
798
|
r && r !== n.meridiem && (n.meridiem = r, $({ finalize: !1 }));
|
|
797
799
|
}
|
|
798
|
-
|
|
800
|
+
ir(e, t);
|
|
799
801
|
};
|
|
800
802
|
W.onRelabel((e, t) => {
|
|
801
803
|
for (let n of Object.values(q.value)) n.meridiem === e && (n.meridiem = t);
|
|
802
804
|
Y();
|
|
803
805
|
});
|
|
804
|
-
let
|
|
806
|
+
let ur = () => {
|
|
805
807
|
let { min: e, max: t } = V.value.system.range, n = C().format(T);
|
|
806
808
|
return C(n < e ? e : n > t ? t : n);
|
|
807
|
-
},
|
|
809
|
+
}, dr = (e, t) => E.range ? `${t}-${e.segment}-${e.field}` : `${t}-${e.field}`, fr = (e) => {
|
|
808
810
|
if (E.name) return E.range ? `${E.name}-${e.segment}-${e.field}` : `${E.name}-${e.field}`;
|
|
809
|
-
},
|
|
811
|
+
}, pr = {
|
|
810
812
|
era: "datePickerInput.eraField",
|
|
811
813
|
week: "datePickerInput.weekField",
|
|
812
814
|
day: "datePickerInput.dayField",
|
|
@@ -816,23 +818,23 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
816
818
|
minute: "datePickerInput.minuteField",
|
|
817
819
|
second: "datePickerInput.secondField",
|
|
818
820
|
meridiem: "datePickerInput.meridiemField"
|
|
819
|
-
},
|
|
820
|
-
let t =
|
|
821
|
-
return E.range ?
|
|
822
|
-
},
|
|
821
|
+
}, mr = (e) => {
|
|
822
|
+
let t = F(pr[e.field]).value;
|
|
823
|
+
return E.range ? F(e.segment === "start" ? "datePickerInput.startFieldLabel" : "datePickerInput.endFieldLabel", t).value : t;
|
|
824
|
+
}, hr = (e, t) => {
|
|
823
825
|
if (!E.ampm) {
|
|
824
826
|
e.hour = String(t).padStart(2, "0");
|
|
825
827
|
return;
|
|
826
828
|
}
|
|
827
|
-
let n =
|
|
829
|
+
let n = Mn(t);
|
|
828
830
|
e.hour = n.hour, e.meridiem = W.label(n.meridiem);
|
|
829
|
-
},
|
|
831
|
+
}, gr = (e) => {
|
|
830
832
|
if (!e.hour) return 0;
|
|
831
833
|
let t = parseInt(e.hour, 10);
|
|
832
|
-
return E.ampm ?
|
|
833
|
-
},
|
|
834
|
+
return E.ampm ? jn(t, e.meridiem || "AM") : t;
|
|
835
|
+
}, _r = p(() => E.seconds ? "HH:mm:ss" : "HH:mm"), vr = (e) => e.format(_r.value), yr = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, br = (e) => {
|
|
834
836
|
if (!e) return null;
|
|
835
|
-
let t =
|
|
837
|
+
let t = yr.exec(e);
|
|
836
838
|
if (!t) return null;
|
|
837
839
|
let [, n, r, i] = t;
|
|
838
840
|
return parseInt(n, 10) > 23 || parseInt(r, 10) > 59 || i && parseInt(i, 10) > 59 ? null : {
|
|
@@ -840,28 +842,28 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
840
842
|
minute: r.padStart(2, "0"),
|
|
841
843
|
second: (i ?? "").padStart(i ? 2 : 0, "0")
|
|
842
844
|
};
|
|
843
|
-
},
|
|
844
|
-
if (!
|
|
845
|
-
let n =
|
|
846
|
-
n ? (
|
|
847
|
-
},
|
|
845
|
+
}, xr = (e, t) => {
|
|
846
|
+
if (!j.value) return;
|
|
847
|
+
let n = br(t);
|
|
848
|
+
n ? (hr(e, parseInt(n.hour, 10)), e.minute = n.minute, e.second = E.seconds ? n.second : "") : (e.hour = "", e.minute = "", e.second = "", e.meridiem = "");
|
|
849
|
+
}, Sr = p(() => E.seconds ? "datePickerInput.timeFormatSeconds" : "datePickerInput.timeFormat"), Cr = p(() => w && V.value?.eras.length ? He(V.value, wr.value, F("datePickerInput.dateFormatSingle").value, F("datePickerInput.eraField").value) : wr.value), wr = p(() => {
|
|
848
850
|
if (E.type === "week" || E.type === "month" || E.type === "year") {
|
|
849
851
|
let e = E.type;
|
|
850
|
-
return
|
|
852
|
+
return F(E.range ? `datePickerInput.${e}FormatRange` : `datePickerInput.${e}FormatSingle`).value;
|
|
851
853
|
}
|
|
852
|
-
if (!
|
|
853
|
-
let e = `${
|
|
854
|
+
if (!j.value) return F(E.range ? "datePickerInput.dateFormatRange" : "datePickerInput.dateFormatSingle").value;
|
|
855
|
+
let e = `${F("datePickerInput.dateFormatSingle").value} ${F(Sr.value).value}`;
|
|
854
856
|
return E.range ? `${e} – ${e}` : e;
|
|
855
|
-
}),
|
|
857
|
+
}), Tr = p(() => E.placeholder || Cr.value), Er = p(() => K.value.every((e) => !q.value[e.segment][e.field])), Dr = (e) => {
|
|
856
858
|
if (!e) return J();
|
|
857
|
-
let t =
|
|
859
|
+
let t = dn(e);
|
|
858
860
|
if (!t.isValid()) return J();
|
|
859
861
|
let n = J();
|
|
860
|
-
return
|
|
862
|
+
return N.value ? {
|
|
861
863
|
...n,
|
|
862
|
-
...
|
|
863
|
-
} : (w && V.value ?
|
|
864
|
-
},
|
|
864
|
+
...hn(t)
|
|
865
|
+
} : (w && V.value ? Un(n, t) : (G.value.has("day") && (n.day = t.format("DD")), G.value.has("month") && (n.month = t.format("MM")), n.year = t.format("YYYY")), j.value && !k.floating && (hr(n, t.hour()), n.minute = t.format("mm"), n.second = E.seconds ? t.format("ss") : ""), n);
|
|
866
|
+
}, Or = (e) => Array.isArray(E.time) ? E.time[e === "start" ? 0 : 1] : e === "start" ? E.time : void 0, X = (e) => {
|
|
865
867
|
if (!e) q.value = {
|
|
866
868
|
start: J(),
|
|
867
869
|
end: J()
|
|
@@ -870,54 +872,54 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
870
872
|
if (E.range) {
|
|
871
873
|
let [t, n] = Array.isArray(e) ? e : [];
|
|
872
874
|
q.value = {
|
|
873
|
-
start:
|
|
874
|
-
end:
|
|
875
|
+
start: Dr(t),
|
|
876
|
+
end: Dr(n)
|
|
875
877
|
};
|
|
876
878
|
} else Array.isArray(e) ? q.value = {
|
|
877
879
|
start: J(),
|
|
878
880
|
end: J()
|
|
879
881
|
} : q.value = {
|
|
880
|
-
start:
|
|
882
|
+
start: Dr(e),
|
|
881
883
|
end: J()
|
|
882
884
|
};
|
|
883
|
-
if (
|
|
885
|
+
if (j.value && k.floating) for (let e of ["start", "end"]) {
|
|
884
886
|
let t = q.value[e];
|
|
885
|
-
t.day &&
|
|
887
|
+
t.day && xr(t, Or(e));
|
|
886
888
|
}
|
|
887
889
|
}
|
|
888
|
-
},
|
|
889
|
-
|
|
890
|
+
}, kr = () => {
|
|
891
|
+
X(E.modelValue);
|
|
890
892
|
};
|
|
891
|
-
|
|
892
|
-
|
|
893
|
+
X(E.modelValue), Y(), w && ot(V, () => {
|
|
894
|
+
X(E.modelValue), Y();
|
|
893
895
|
});
|
|
894
|
-
let
|
|
895
|
-
if (!
|
|
896
|
+
let Ar = (e) => {
|
|
897
|
+
if (!j.value || k.floating) return;
|
|
896
898
|
let t;
|
|
897
|
-
t = e ? Array.isArray(e) ? e.map((e) =>
|
|
899
|
+
t = e ? Array.isArray(e) ? e.map((e) => vr(dn(e))) : vr(dn(e)) : null, Lr.value = t, D("update:time", t);
|
|
898
900
|
};
|
|
899
|
-
|
|
901
|
+
ot(() => E.modelValue, (e) => {
|
|
900
902
|
if (e === null || Array.isArray(e) && e.length === 0) {
|
|
901
|
-
|
|
903
|
+
X(e), Y(), Ar(e);
|
|
902
904
|
return;
|
|
903
905
|
}
|
|
904
906
|
let t = document.activeElement;
|
|
905
|
-
t &&
|
|
906
|
-
}),
|
|
907
|
-
if (!
|
|
907
|
+
t && er(t) || (X(e), Y(), Ar(e));
|
|
908
|
+
}), ot(() => E.time, (e) => {
|
|
909
|
+
if (!j.value || pe(e ?? null) === pe(Lr.value ?? null)) return;
|
|
908
910
|
let t = document.activeElement;
|
|
909
|
-
if (!(t &&
|
|
911
|
+
if (!(t && er(t))) {
|
|
910
912
|
for (let e of ["start", "end"]) {
|
|
911
913
|
if (e === "end" && !E.range) break;
|
|
912
|
-
let t =
|
|
913
|
-
t !== void 0 &&
|
|
914
|
+
let t = Or(e), n = q.value[e];
|
|
915
|
+
t !== void 0 && xr(n, t);
|
|
914
916
|
}
|
|
915
917
|
Y(), $({ finalize: !1 });
|
|
916
918
|
}
|
|
917
919
|
});
|
|
918
|
-
let
|
|
920
|
+
let jr = () => rr("start") === "partial" ? !0 : E.range ? rr("end") === "partial" : !1, Mr = (e) => {
|
|
919
921
|
let t = q.value[e], n = G.value;
|
|
920
|
-
if (
|
|
922
|
+
if (N.value) {
|
|
921
923
|
if (!t.week || !t.year) return null;
|
|
922
924
|
let n = parseInt(t.year, 10), r = parseInt(t.week, 10);
|
|
923
925
|
if (n < 1e3 || n > 9999 || r < 1) return null;
|
|
@@ -928,9 +930,9 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
928
930
|
}
|
|
929
931
|
if (n.has("day") && !t.day || n.has("month") && !t.month || !t.year) return null;
|
|
930
932
|
if (w && V.value) {
|
|
931
|
-
let r =
|
|
932
|
-
if (
|
|
933
|
-
let i =
|
|
933
|
+
let r = j.value ? Nr(t) : null;
|
|
934
|
+
if (j.value && !r) return null;
|
|
935
|
+
let i = Vn(t), a = Hn.get(rt(q.value[e]));
|
|
934
936
|
if (a && !V.value.eras.length && n.has("month")) {
|
|
935
937
|
let e = V.value.fieldsOf(a), n = parseInt(t.year, 10) - parseInt(e.year, 10);
|
|
936
938
|
n && parseInt(t.month, 10) === parseInt(e.month, 10) && (i = {
|
|
@@ -940,7 +942,7 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
940
942
|
}
|
|
941
943
|
let o = V.value.nearest(i, n);
|
|
942
944
|
if (!o) return null;
|
|
943
|
-
|
|
945
|
+
Hn.set(rt(q.value[e]), o);
|
|
944
946
|
let s = V.value.fieldsOf(o);
|
|
945
947
|
for (let r of [
|
|
946
948
|
"era",
|
|
@@ -953,8 +955,8 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
953
955
|
let r = n.has("day") ? parseInt(t.day, 10) : 1, i = n.has("month") ? parseInt(t.month, 10) : 1, a = parseInt(t.year, 10);
|
|
954
956
|
if (r < 1 || r > 31 || i < 1 || i > 12 || a < 1e3 || a > 9999) return null;
|
|
955
957
|
let o = t.year.padStart(4, "0"), s = String(i).padStart(2, "0"), c = String(r).padStart(2, "0"), l = "", u = "";
|
|
956
|
-
if (
|
|
957
|
-
let e =
|
|
958
|
+
if (j.value) {
|
|
959
|
+
let e = Nr(t);
|
|
958
960
|
if (!e) return null;
|
|
959
961
|
l = `T${e.hour}:${e.minute}:${e.second}`, u = "THH:mm:ss";
|
|
960
962
|
}
|
|
@@ -964,68 +966,68 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
964
966
|
d = C(i, T + u, !0), q.value[e].day = String(n).padStart(2, "0");
|
|
965
967
|
}
|
|
966
968
|
return d.isValid() ? d : null;
|
|
967
|
-
},
|
|
969
|
+
}, Nr = (e) => {
|
|
968
970
|
if (E.ampm && e.hour) {
|
|
969
971
|
let t = parseInt(e.hour, 10);
|
|
970
972
|
if (t < 1 || t > 12) return null;
|
|
971
973
|
}
|
|
972
|
-
let t = String(
|
|
974
|
+
let t = String(gr(e)).padStart(2, "0"), n = (e.minute || "0").padStart(2, "0"), r = ((E.seconds ? e.second : "") || "0").padStart(2, "0");
|
|
973
975
|
return parseInt(t, 10) > 23 || parseInt(n, 10) > 59 || parseInt(r, 10) > 59 ? null : {
|
|
974
976
|
hour: t,
|
|
975
977
|
minute: n,
|
|
976
978
|
second: r
|
|
977
979
|
};
|
|
978
|
-
},
|
|
980
|
+
}, Pr = (e) => {
|
|
979
981
|
let t = J();
|
|
980
|
-
return
|
|
982
|
+
return N.value ? {
|
|
981
983
|
...t,
|
|
982
|
-
...
|
|
983
|
-
} : (w && V.value ?
|
|
984
|
-
},
|
|
985
|
-
if (
|
|
984
|
+
...hn(e)
|
|
985
|
+
} : (w && V.value ? Un(t, e) : (G.value.has("day") && (t.day = e.format("DD")), G.value.has("month") && (t.month = e.format("MM")), t.year = e.format("YYYY")), j.value && (hr(t, e.hour()), t.minute = e.format("mm"), t.second = E.seconds ? e.format("ss") : ""), t);
|
|
986
|
+
}, Fr = (e) => {
|
|
987
|
+
if (N.value) {
|
|
986
988
|
let t = f(e), n = z.value ? R(z.value) : null, r = B.value ? R(B.value) : null;
|
|
987
|
-
return n && t.isBefore(n, "day") && (t = f(n), t.isBefore(n, "day") && (t = t.add(1, "week"))), r && t.add(6, "day").isAfter(r, "day") && (t = f(r), t.add(6, "day").isAfter(r, "day") && (t = t.subtract(1, "week"))), t.isSame(f(e), "day") ||
|
|
989
|
+
return n && t.isBefore(n, "day") && (t = f(n), t.isBefore(n, "day") && (t = t.add(1, "week"))), r && t.add(6, "day").isAfter(r, "day") && (t = f(r), t.add(6, "day").isAfter(r, "day") && (t = t.subtract(1, "week"))), t.isSame(f(e), "day") || On(t) ? null : t;
|
|
988
990
|
}
|
|
989
|
-
let t = (t, n) =>
|
|
991
|
+
let t = (t, n) => j.value && !n ? t.hour(e.hour()).minute(e.minute()).second(e.second()) : t, n = !!(w && P.value && M.value), r = n ? "day" : Wt.value, i = M.value ? r : j.value ? "minute" : "day", a = e, o = z.value, s = B.value;
|
|
990
992
|
if (o) {
|
|
991
|
-
let e =
|
|
992
|
-
a.isBefore(n,
|
|
993
|
+
let e = an(o), n = R(o);
|
|
994
|
+
a.isBefore(n, M.value ? r : j.value && e ? "minute" : "day") && (a = M.value ? n : t(n, e));
|
|
993
995
|
}
|
|
994
996
|
if (s) {
|
|
995
|
-
let e =
|
|
996
|
-
a.isAfter(i,
|
|
997
|
+
let e = an(s), i = R(s);
|
|
998
|
+
a.isAfter(i, M.value ? r : j.value && e ? "minute" : "day") && (a = M.value ? n ? i : i.startOf(Wt.value) : t(i, e));
|
|
997
999
|
}
|
|
998
|
-
return a.isSame(e, i) ||
|
|
999
|
-
},
|
|
1000
|
+
return a.isSame(e, i) || On(a) ? null : a;
|
|
1001
|
+
}, Z = (e) => {
|
|
1000
1002
|
D("error", e);
|
|
1001
|
-
},
|
|
1002
|
-
let t = q.value[e], n = String(
|
|
1003
|
+
}, Ir = (e) => {
|
|
1004
|
+
let t = q.value[e], n = String(gr(t)).padStart(2, "0"), r = (t.minute || "0").padStart(2, "0");
|
|
1003
1005
|
return E.seconds ? `${n}:${r}:${(t.second || "0").padStart(2, "0")}` : `${n}:${r}`;
|
|
1004
|
-
},
|
|
1005
|
-
if (D("update:modelValue", e), !
|
|
1006
|
+
}, Lr = y(void 0), Q = (e) => {
|
|
1007
|
+
if (D("update:modelValue", e), !j.value) return;
|
|
1006
1008
|
let t;
|
|
1007
|
-
t = e === null ? null : Array.isArray(e) ? e.map((e, t) =>
|
|
1009
|
+
t = e === null ? null : Array.isArray(e) ? e.map((e, t) => Ir(t === 0 ? "start" : "end")) : Ir("start"), Lr.value = t, D("update:time", t);
|
|
1008
1010
|
}, $ = (e = {}) => {
|
|
1009
|
-
let t = !!e.finalize, n =
|
|
1011
|
+
let t = !!e.finalize, n = rr("start");
|
|
1010
1012
|
if (!E.range) {
|
|
1011
1013
|
if (n === "empty") {
|
|
1012
1014
|
Q(null);
|
|
1013
1015
|
return;
|
|
1014
1016
|
}
|
|
1015
1017
|
if (n === "partial") return;
|
|
1016
|
-
let e =
|
|
1018
|
+
let e = Mr("start");
|
|
1017
1019
|
if (!e) return;
|
|
1018
|
-
if (
|
|
1020
|
+
if (On(e)) {
|
|
1019
1021
|
if (!t) return;
|
|
1020
|
-
let n = H(e), r =
|
|
1022
|
+
let n = H(e), r = Fr(e);
|
|
1021
1023
|
if (r) {
|
|
1022
1024
|
let e = H(r);
|
|
1023
|
-
q.value.start =
|
|
1025
|
+
q.value.start = Pr(r), Q(e), Z({
|
|
1024
1026
|
code: "disabled_date",
|
|
1025
1027
|
original: n,
|
|
1026
1028
|
normalized: e
|
|
1027
1029
|
});
|
|
1028
|
-
} else q.value.start = J(), Q(null),
|
|
1030
|
+
} else q.value.start = J(), Q(null), Z({
|
|
1029
1031
|
code: "disabled_date",
|
|
1030
1032
|
original: n,
|
|
1031
1033
|
normalized: null
|
|
@@ -1035,29 +1037,29 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
1035
1037
|
Q(H(e));
|
|
1036
1038
|
return;
|
|
1037
1039
|
}
|
|
1038
|
-
let r =
|
|
1040
|
+
let r = rr("end");
|
|
1039
1041
|
if (n === "empty" && r === "empty") {
|
|
1040
1042
|
Q([]);
|
|
1041
1043
|
return;
|
|
1042
1044
|
}
|
|
1043
1045
|
if (n === "partial" || r === "partial" || n === "empty") return;
|
|
1044
|
-
let i =
|
|
1046
|
+
let i = Mr("start");
|
|
1045
1047
|
if (!i) return;
|
|
1046
|
-
let a = r === "empty" ? null :
|
|
1047
|
-
if (
|
|
1048
|
+
let a = r === "empty" ? null : Mr("end"), o = H(i), s = a ? H(a) : null, c = i, l = !1;
|
|
1049
|
+
if (On(i)) {
|
|
1048
1050
|
if (!t) return;
|
|
1049
|
-
let e =
|
|
1051
|
+
let e = Fr(i), n = s ? [o, s] : [o];
|
|
1050
1052
|
if (!e) {
|
|
1051
|
-
q.value.start = J(), q.value.end = J(), Q([]),
|
|
1053
|
+
q.value.start = J(), q.value.end = J(), Q([]), Z({
|
|
1052
1054
|
code: "disabled_range_start",
|
|
1053
1055
|
original: n,
|
|
1054
1056
|
normalized: []
|
|
1055
1057
|
});
|
|
1056
1058
|
return;
|
|
1057
1059
|
}
|
|
1058
|
-
if (c = e, l = !0, q.value.start =
|
|
1060
|
+
if (c = e, l = !0, q.value.start = Pr(e), !a) {
|
|
1059
1061
|
let t = [H(e)];
|
|
1060
|
-
Q(t),
|
|
1062
|
+
Q(t), Z({
|
|
1061
1063
|
code: "disabled_range_start",
|
|
1062
1064
|
original: n,
|
|
1063
1065
|
normalized: t
|
|
@@ -1070,36 +1072,36 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
1070
1072
|
return;
|
|
1071
1073
|
}
|
|
1072
1074
|
let u = a, ee = !1;
|
|
1073
|
-
if (
|
|
1075
|
+
if (On(a)) {
|
|
1074
1076
|
if (!t) return;
|
|
1075
|
-
let e =
|
|
1077
|
+
let e = Fr(a), n = [o, s];
|
|
1076
1078
|
if (!e) {
|
|
1077
1079
|
let e = [H(c)];
|
|
1078
|
-
q.value.end = J(), Q(e), l &&
|
|
1080
|
+
q.value.end = J(), Q(e), l && Z({
|
|
1079
1081
|
code: "disabled_range_start",
|
|
1080
1082
|
original: n,
|
|
1081
1083
|
normalized: e
|
|
1082
|
-
}),
|
|
1084
|
+
}), Z({
|
|
1083
1085
|
code: "disabled_range_end",
|
|
1084
1086
|
original: n,
|
|
1085
1087
|
normalized: e
|
|
1086
1088
|
});
|
|
1087
1089
|
return;
|
|
1088
1090
|
}
|
|
1089
|
-
u = e, ee = !0, q.value.end =
|
|
1091
|
+
u = e, ee = !0, q.value.end = Pr(e);
|
|
1090
1092
|
}
|
|
1091
|
-
if (u.isBefore(c,
|
|
1093
|
+
if (u.isBefore(c, j.value ? "second" : "day")) {
|
|
1092
1094
|
if (!t) return;
|
|
1093
1095
|
let e = [H(c), H(u)], n = [H(u), H(c)], r = { ...q.value.start };
|
|
1094
|
-
q.value.start = { ...q.value.end }, q.value.end = r, Y(), Q(n), l &&
|
|
1096
|
+
q.value.start = { ...q.value.end }, q.value.end = r, Y(), Q(n), l && Z({
|
|
1095
1097
|
code: "disabled_range_start",
|
|
1096
1098
|
original: [o, s],
|
|
1097
1099
|
normalized: n
|
|
1098
|
-
}), ee &&
|
|
1100
|
+
}), ee && Z({
|
|
1099
1101
|
code: "disabled_range_end",
|
|
1100
1102
|
original: [o, s],
|
|
1101
1103
|
normalized: n
|
|
1102
|
-
}),
|
|
1104
|
+
}), Z({
|
|
1103
1105
|
code: "end_before_start",
|
|
1104
1106
|
original: e,
|
|
1105
1107
|
normalized: n
|
|
@@ -1107,89 +1109,89 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
1107
1109
|
return;
|
|
1108
1110
|
}
|
|
1109
1111
|
let d = [H(c), H(u)];
|
|
1110
|
-
Q(d), l &&
|
|
1112
|
+
Q(d), l && Z({
|
|
1111
1113
|
code: "disabled_range_start",
|
|
1112
1114
|
original: s ? [o, s] : [o],
|
|
1113
1115
|
normalized: d
|
|
1114
|
-
}), ee &&
|
|
1116
|
+
}), ee && Z({
|
|
1115
1117
|
code: "disabled_range_end",
|
|
1116
1118
|
original: [o, s],
|
|
1117
1119
|
normalized: d
|
|
1118
1120
|
});
|
|
1119
1121
|
};
|
|
1120
|
-
return
|
|
1121
|
-
document.removeEventListener("focusin", U), document.removeEventListener("click", U);
|
|
1122
|
-
}), (t, n) => (v(),
|
|
1122
|
+
return $e(() => {
|
|
1123
|
+
document.removeEventListener("focusin", U), document.removeEventListener("click", U, !0);
|
|
1124
|
+
}), (t, n) => (v(), Ge(Ne, _({
|
|
1123
1125
|
id: u.id,
|
|
1124
1126
|
class: "bb-date-picker-input",
|
|
1125
|
-
clearable: u.clearable &&
|
|
1126
|
-
compact: x(
|
|
1127
|
+
clearable: u.clearable && Bt.value,
|
|
1128
|
+
compact: x(k).compact,
|
|
1127
1129
|
description: u.description,
|
|
1128
1130
|
disabled: u.disabled,
|
|
1129
|
-
errors: x(
|
|
1131
|
+
errors: x(Tt),
|
|
1130
1132
|
"has-errors": u.hasErrors,
|
|
1131
|
-
"has-value":
|
|
1133
|
+
"has-value": Bt.value,
|
|
1132
1134
|
"has-warnings": u.hasWarnings,
|
|
1133
1135
|
"hide-label": u.hideLabel,
|
|
1134
1136
|
hint: u.hint,
|
|
1135
1137
|
"input-align": u.inputAlign,
|
|
1136
1138
|
label: u.label,
|
|
1137
1139
|
"label-align": u.labelAlign,
|
|
1138
|
-
"label-mode":
|
|
1140
|
+
"label-mode": Vt.value,
|
|
1139
1141
|
"label-position": u.labelPosition,
|
|
1140
|
-
layout: x(
|
|
1142
|
+
layout: x(k).layout,
|
|
1141
1143
|
loading: u.loading,
|
|
1142
1144
|
name: u.name,
|
|
1143
|
-
passthrough: x(
|
|
1144
|
-
readonly: x(
|
|
1145
|
-
reverse: x(
|
|
1146
|
-
"show-asterisk": x(
|
|
1147
|
-
"show-hint":
|
|
1145
|
+
passthrough: x(A),
|
|
1146
|
+
readonly: x(kt),
|
|
1147
|
+
reverse: x(k).reverse,
|
|
1148
|
+
"show-asterisk": x(wt),
|
|
1149
|
+
"show-hint": zt.value,
|
|
1148
1150
|
warnings: u.warnings
|
|
1149
|
-
}, x(
|
|
1150
|
-
label: S((e) => [b(t.$slots, "label",
|
|
1151
|
-
input: S(({ id: r, hasErrors: i, hasWarnings: a, ariaDescribedby: o }) => [
|
|
1151
|
+
}, x(A).forwardAttrs), Ke({
|
|
1152
|
+
label: S((e) => [b(t.$slots, "label", Ze(Ye(e)))]),
|
|
1153
|
+
input: S(({ id: r, hasErrors: i, hasWarnings: a, ariaDescribedby: o }) => [qe(Pe, {
|
|
1152
1154
|
ref_key: "wrapper",
|
|
1153
|
-
ref:
|
|
1154
|
-
active:
|
|
1155
|
+
ref: L,
|
|
1156
|
+
active: Nt.value,
|
|
1155
1157
|
"append:icon": x(E)["append:icon"],
|
|
1156
|
-
class:
|
|
1157
|
-
clearable: u.clearable && !x(fe)(x(
|
|
1158
|
-
compact: x(
|
|
1158
|
+
class: Xe(["bb-date-picker-input__field", { "bb-date-picker-input__field--range": u.range }]),
|
|
1159
|
+
clearable: u.clearable && !x(fe)(x(Ot)),
|
|
1160
|
+
compact: x(k).compact,
|
|
1159
1161
|
disabled: u.disabled,
|
|
1160
1162
|
"has-errors": i,
|
|
1161
|
-
"has-value":
|
|
1163
|
+
"has-value": Bt.value,
|
|
1162
1164
|
"has-warnings": a,
|
|
1163
1165
|
loading: u.loading,
|
|
1164
|
-
passthrough: x(
|
|
1166
|
+
passthrough: x(A),
|
|
1165
1167
|
"prepend:icon": x(E)["prepend:icon"],
|
|
1166
|
-
readonly: x(
|
|
1168
|
+
readonly: x(kt),
|
|
1167
1169
|
variant: u.variant,
|
|
1168
|
-
onClick:
|
|
1169
|
-
"onClick:clear":
|
|
1170
|
-
onFocusin:
|
|
1171
|
-
},
|
|
1170
|
+
onClick: Qt,
|
|
1171
|
+
"onClick:clear": kn,
|
|
1172
|
+
onFocusin: fn
|
|
1173
|
+
}, Ke({
|
|
1172
1174
|
"prepend:outer": S(() => [b(t.$slots, "prepend:outer")]),
|
|
1173
1175
|
prepend: S(() => [b(t.$slots, "prepend")]),
|
|
1174
|
-
append: S(() => [
|
|
1176
|
+
append: S(() => [tn.value ? m("", !0) : (v(), Ge(ke, {
|
|
1175
1177
|
key: 0,
|
|
1176
|
-
"active-segment":
|
|
1177
|
-
adaptive: x(
|
|
1178
|
+
"active-segment": xn.value,
|
|
1179
|
+
adaptive: x(k).adaptive,
|
|
1178
1180
|
ampm: u.ampm,
|
|
1179
|
-
anchor:
|
|
1181
|
+
anchor: L.value,
|
|
1180
1182
|
clearable: u.clearable,
|
|
1181
1183
|
disabled: u.disabled,
|
|
1182
1184
|
"first-day-of-week": u.firstDayOfWeek,
|
|
1183
|
-
floating: x(
|
|
1184
|
-
label:
|
|
1185
|
+
floating: x(k).floating,
|
|
1186
|
+
label: Dn.value,
|
|
1185
1187
|
max: u.max,
|
|
1186
1188
|
min: u.min,
|
|
1187
|
-
"model-value": x(
|
|
1189
|
+
"model-value": x(Ot),
|
|
1188
1190
|
"number-of-months": u.numberOfMonths,
|
|
1189
1191
|
"off-canvas-props": u.offCanvasProps,
|
|
1190
|
-
pt: x(
|
|
1192
|
+
pt: x(A).forward(Ht, x(Ae).states),
|
|
1191
1193
|
range: x(E).range,
|
|
1192
|
-
readonly: x(
|
|
1194
|
+
readonly: x(kt),
|
|
1193
1195
|
seconds: u.seconds,
|
|
1194
1196
|
selectable: u.selectable,
|
|
1195
1197
|
step: u.step,
|
|
@@ -1197,28 +1199,28 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
1197
1199
|
"transition-duration": u.transitionDuration,
|
|
1198
1200
|
type: u.type,
|
|
1199
1201
|
utc: u.utc,
|
|
1200
|
-
onGridPick:
|
|
1202
|
+
onGridPick: gn["onUpdate:modelValue"],
|
|
1201
1203
|
onHidden: n[1] ||= (e) => x(D)("hidden"),
|
|
1202
|
-
onHide:
|
|
1203
|
-
onShow:
|
|
1204
|
+
onHide: Rt,
|
|
1205
|
+
onShow: Lt,
|
|
1204
1206
|
onShown: n[2] ||= (e) => x(D)("shown"),
|
|
1205
|
-
onTimePick:
|
|
1206
|
-
},
|
|
1207
|
+
onTimePick: Sn
|
|
1208
|
+
}, Ke({
|
|
1207
1209
|
activator: S(({ props: e }) => [g("button", _({
|
|
1208
|
-
"aria-disabled": x(
|
|
1210
|
+
"aria-disabled": x(At) || void 0,
|
|
1209
1211
|
class: "bb-segmented-field__activator",
|
|
1210
1212
|
disabled: u.disabled || u.readonly,
|
|
1211
1213
|
type: "button"
|
|
1212
|
-
}, _(e, x(
|
|
1214
|
+
}, _(e, x(A).activator)), [qe(Me, {
|
|
1213
1215
|
class: "bb-segmented-field__trigger-icon",
|
|
1214
1216
|
icon: x(ve)
|
|
1215
|
-
}, null, 8, ["icon"])], 16,
|
|
1216
|
-
day: S((e) => [b(t.$slots, "day",
|
|
1217
|
-
"day:append": S((e) => [b(t.$slots, "day:append",
|
|
1217
|
+
}, null, 8, ["icon"])], 16, vt)]),
|
|
1218
|
+
day: S((e) => [b(t.$slots, "day", Ze(Ye(e)))]),
|
|
1219
|
+
"day:append": S((e) => [b(t.$slots, "day:append", Ze(Ye(e)))]),
|
|
1218
1220
|
_: 2
|
|
1219
|
-
}, [
|
|
1221
|
+
}, [tt(Mt(), (e) => ({
|
|
1220
1222
|
name: e,
|
|
1221
|
-
fn: S((n) => [b(t.$slots, e,
|
|
1223
|
+
fn: S((n) => [b(t.$slots, e, Ze(Ye(n)))])
|
|
1222
1224
|
}))]), 1032, [
|
|
1223
1225
|
"active-segment",
|
|
1224
1226
|
"adaptive",
|
|
@@ -1248,78 +1250,78 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
1248
1250
|
])), b(t.$slots, "append", {}, () => [t.$slots.suffix ? (v(), h("span", _({
|
|
1249
1251
|
key: 0,
|
|
1250
1252
|
class: "bb-field-input__suffix"
|
|
1251
|
-
}, x(
|
|
1253
|
+
}, x(A).suffix), [b(t.$slots, "suffix")], 16)) : m("", !0)])]),
|
|
1252
1254
|
"append:outer": S(() => [b(t.$slots, "append:outer")]),
|
|
1253
1255
|
default: S(() => [g("div", {
|
|
1254
|
-
class:
|
|
1255
|
-
"bb-segmented-field__fields--empty":
|
|
1256
|
+
class: Xe(["bb-segmented-field__fields", {
|
|
1257
|
+
"bb-segmented-field__fields--empty": Er.value,
|
|
1256
1258
|
"bb-segmented-field__fields--range": u.range
|
|
1257
1259
|
}]),
|
|
1258
|
-
style:
|
|
1259
|
-
}, [
|
|
1260
|
+
style: Qe({ "--fields-min-ch": x($n) })
|
|
1261
|
+
}, [Er.value ? (v(), h("span", {
|
|
1260
1262
|
key: 0,
|
|
1261
1263
|
"aria-hidden": "true",
|
|
1262
1264
|
class: "bb-segmented-field__placeholder",
|
|
1263
|
-
onClick: n[0] ||= (...e) => x(
|
|
1264
|
-
},
|
|
1265
|
-
class:
|
|
1266
|
-
dir:
|
|
1267
|
-
}, [(v(!0), h(
|
|
1265
|
+
onClick: n[0] ||= (...e) => x(nr) && x(nr)(...e)
|
|
1266
|
+
}, nt(Tr.value), 1)) : m("", !0), (v(!0), h(We, null, tt(Wn.value, (t, n) => (v(), h(We, { key: t.key }, [g("span", {
|
|
1267
|
+
class: Xe(["bb-segmented-field__run", `bb-segmented-field__run--${t.kind}`]),
|
|
1268
|
+
dir: qn(t)
|
|
1269
|
+
}, [(v(!0), h(We, null, tt(t.items, ({ descriptor: n, index: a }, s) => (v(), h(We, { key: x(Xn)(n) }, [
|
|
1268
1270
|
n.field === "week" ? (v(), h("span", {
|
|
1269
1271
|
key: 0,
|
|
1270
1272
|
"aria-hidden": "true",
|
|
1271
1273
|
class: "bb-segmented-field__separator bb-segmented-field__week-prefix",
|
|
1272
|
-
onClick: (e) => x(
|
|
1273
|
-
}, "W", 8,
|
|
1274
|
+
onClick: (e) => x(tr)(n, { select: !0 })
|
|
1275
|
+
}, "W", 8, pt)) : m("", !0),
|
|
1274
1276
|
g("span", {
|
|
1275
1277
|
class: "bb-segmented-field__field-sizer",
|
|
1276
|
-
"data-value": x(
|
|
1277
|
-
}, [
|
|
1278
|
-
id: a === 0 ? r :
|
|
1278
|
+
"data-value": x(Qn)(n)
|
|
1279
|
+
}, [st(g("input", _({
|
|
1280
|
+
id: a === 0 ? r : dr(n, r),
|
|
1279
1281
|
ref_for: !0,
|
|
1280
|
-
ref: (e) => x(
|
|
1281
|
-
"aria-describedby":
|
|
1282
|
+
ref: (e) => x(Yn)[x(Xn)(n)] = e,
|
|
1283
|
+
"aria-describedby": qt(o, r),
|
|
1282
1284
|
"aria-disabled": u.disabled || void 0,
|
|
1283
1285
|
"aria-invalid": i ? "true" : void 0,
|
|
1284
|
-
"aria-label":
|
|
1285
|
-
"aria-readonly":
|
|
1286
|
-
autocomplete: x(
|
|
1286
|
+
"aria-label": mr(n),
|
|
1287
|
+
"aria-readonly": nn.value || void 0,
|
|
1288
|
+
autocomplete: x(k).autocomplete,
|
|
1287
1289
|
autofocus: u.autofocus && a === 0,
|
|
1288
1290
|
class: ["bb-segmented-field__input", [`bb-segmented-field__input--${n.field}`, `bb-segmented-field__input--${n.segment}`]],
|
|
1289
1291
|
disabled: u.disabled,
|
|
1290
|
-
inputmode:
|
|
1291
|
-
maxlength:
|
|
1292
|
-
name:
|
|
1293
|
-
readonly:
|
|
1294
|
-
required: x(
|
|
1295
|
-
"aria-required": x(
|
|
1296
|
-
tabindex:
|
|
1292
|
+
inputmode: rn(n.field),
|
|
1293
|
+
maxlength: zn(n.field),
|
|
1294
|
+
name: fr(n),
|
|
1295
|
+
readonly: nn.value,
|
|
1296
|
+
required: x(Et),
|
|
1297
|
+
"aria-required": x(Dt),
|
|
1298
|
+
tabindex: Ln(a) ? 0 : -1,
|
|
1297
1299
|
type: "text",
|
|
1298
|
-
value: x(
|
|
1299
|
-
onBlur: (e) => x(
|
|
1300
|
-
onFocus: (e) =>
|
|
1301
|
-
onInput: (e) =>
|
|
1302
|
-
onKeydown: (e) =>
|
|
1303
|
-
onPaste: (e) => x(
|
|
1304
|
-
}, { ref_for: !0 }, _(x(
|
|
1300
|
+
value: x(Zn)(x(q)[n.segment][n.field]),
|
|
1301
|
+
onBlur: (e) => x(sr)(n),
|
|
1302
|
+
onFocus: (e) => bn(n, e),
|
|
1303
|
+
onInput: (e) => lr(n, e),
|
|
1304
|
+
onKeydown: (e) => en(n, e),
|
|
1305
|
+
onPaste: (e) => x(cr)(n, e)
|
|
1306
|
+
}, { ref_for: !0 }, _(x(A).controlAttrs, x(A).input)), null, 16, ht), [[x(e)]])], 8, mt),
|
|
1305
1307
|
s < t.items.length - 1 ? (v(), h("span", {
|
|
1306
1308
|
key: 1,
|
|
1307
1309
|
"aria-hidden": "true",
|
|
1308
1310
|
class: "bb-segmented-field__separator",
|
|
1309
1311
|
role: "presentation",
|
|
1310
|
-
onClick: (e) => x(
|
|
1311
|
-
},
|
|
1312
|
-
], 64))), 128))], 10,
|
|
1312
|
+
onClick: (e) => x(tr)(K.value[a + 1], { select: !0 })
|
|
1313
|
+
}, nt(Jn(K.value[a], K.value[a + 1])), 9, gt)) : m("", !0)
|
|
1314
|
+
], 64))), 128))], 10, ft), n < Wn.value.length - 1 ? (v(), h("span", {
|
|
1313
1315
|
key: 0,
|
|
1314
1316
|
"aria-hidden": "true",
|
|
1315
|
-
class:
|
|
1317
|
+
class: Xe(["bb-segmented-field__separator", { "bb-segmented-field__separator--range": K.value[Gn(t)].segment !== K.value[Gn(t) + 1].segment }]),
|
|
1316
1318
|
role: "presentation",
|
|
1317
|
-
onClick: (e) => x(
|
|
1318
|
-
},
|
|
1319
|
-
id:
|
|
1319
|
+
onClick: (e) => x(tr)(K.value[Gn(t) + 1], { select: !0 })
|
|
1320
|
+
}, nt(Jn(K.value[Gn(t)], K.value[Gn(t) + 1])), 11, _t)) : m("", !0)], 64))), 128))], 6), g("span", {
|
|
1321
|
+
id: Kt(r),
|
|
1320
1322
|
class: "bb-date-picker-input__accessible-description",
|
|
1321
1323
|
hidden: ""
|
|
1322
|
-
},
|
|
1324
|
+
}, nt(x(F)("datePickerInput.dateFormat")) + " " + nt(Cr.value), 9, yt)]),
|
|
1323
1325
|
_: 2
|
|
1324
1326
|
}, [t.$slots.prefix ? {
|
|
1325
1327
|
name: "prefix",
|
|
@@ -1344,7 +1346,7 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
1344
1346
|
_: 2
|
|
1345
1347
|
}, [t.$slots.description ? {
|
|
1346
1348
|
name: "description",
|
|
1347
|
-
fn: S((e) => [b(t.$slots, "description",
|
|
1349
|
+
fn: S((e) => [b(t.$slots, "description", Ze(Ye(e)))]),
|
|
1348
1350
|
key: "0"
|
|
1349
1351
|
} : void 0]), 1040, [
|
|
1350
1352
|
"id",
|
|
@@ -1375,4 +1377,4 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
1375
1377
|
]));
|
|
1376
1378
|
}
|
|
1377
1379
|
});
|
|
1378
|
-
export {
|
|
1380
|
+
export { xt as default };
|