@oneb/ui-vue 0.3.32 → 0.4.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/ChevronLeftIcon-7505e081.cjs +1 -0
- package/dist/ChevronLeftIcon-bb9adb5b.js +20 -0
- package/dist/ChevronRightIcon-2992cf0d.cjs +1 -0
- package/dist/ChevronRightIcon-b0585768.js +20 -0
- package/dist/ChevronUpIcon-64a673e1.cjs +1 -0
- package/dist/{ChevronRightIcon-4549a26b.js → ChevronUpIcon-c43f27a9.js} +2 -19
- package/dist/MagnifyingGlassIcon-adf871ba.cjs +1 -0
- package/dist/MagnifyingGlassIcon-ca213d3d.js +20 -0
- package/dist/OneDropdownAuto.vue_vue_type_script_setup_true_lang-2c508e8a.js +79 -0
- package/dist/OneDropdownAuto.vue_vue_type_script_setup_true_lang-bf923b04.cjs +1 -0
- package/dist/OneFormInput.vue_vue_type_script_setup_true_lang-b89117e7.js +521 -0
- package/dist/OneFormInput.vue_vue_type_script_setup_true_lang-f6f7cd96.cjs +1 -0
- package/dist/OneHelpMenu-6ec63535.cjs +1 -0
- package/dist/{OneHelpMenu-73817f8a.js → OneHelpMenu-d5182c78.js} +118 -213
- package/dist/OneMarkdown.vue_vue_type_script_setup_true_lang-05266fc3.cjs +1 -0
- package/dist/OneMarkdown.vue_vue_type_script_setup_true_lang-bb2219c7.js +18 -0
- package/dist/OneModal-02a9a173.js +189 -0
- package/dist/OneModal-0e92c039.cjs +1 -0
- package/dist/OneTooltip.vue_vue_type_script_setup_true_lang-c492c128.js +25 -0
- package/dist/OneTooltip.vue_vue_type_script_setup_true_lang-e83a81ea.cjs +1 -0
- package/dist/SpinnerIcon-01be39fe.cjs +1 -0
- package/dist/{SpinnerIcon-74648c98.js → SpinnerIcon-516264ba.js} +5 -6
- package/dist/button/index.cjs +1 -1
- package/dist/button/index.d.ts +1 -1
- package/dist/button/index.js +3 -4
- package/dist/checkbox/checkbox.d.ts +5 -0
- package/dist/checkbox/index.cjs +1 -1
- package/dist/checkbox/index.js +40 -34
- package/dist/chips/OneChips.vue.d.ts +2 -0
- package/dist/chips/chips.d.ts +25 -0
- package/dist/chips/index.cjs +1 -0
- package/dist/chips/index.d.ts +3 -0
- package/dist/chips/index.js +62 -0
- package/dist/clipboard-494e1513.cjs +1 -0
- package/dist/clipboard-733b79a1.js +22 -0
- package/dist/common/OneDetailsList.vue.d.ts +2 -0
- package/dist/common/OneDetailsRow.vue.d.ts +2 -0
- package/dist/common/index.cjs +1 -1
- package/dist/common/index.d.ts +2 -0
- package/dist/common/index.js +68 -16
- package/dist/composables/index.cjs +1 -0
- package/dist/composables/index.d.ts +18 -0
- package/dist/composables/index.js +91 -0
- package/dist/composables/useAsyncMethod.d.ts +17 -0
- package/dist/composables/useAsyncSelect.d.ts +26 -0
- package/dist/composables/useConfirm.d.ts +27 -0
- package/dist/composables/useCursorList.d.ts +42 -0
- package/dist/composables/useDebouncedRef.d.ts +6 -0
- package/dist/composables/useFileUpload.d.ts +21 -0
- package/dist/composables/useFormSubmit.d.ts +23 -0
- package/dist/composables/useIsMobile.d.ts +8 -0
- package/dist/confirm/OneConfirmHost.vue.d.ts +2 -0
- package/dist/confirm/confirm.d.ts +10 -0
- package/dist/confirm/index.cjs +1 -0
- package/dist/confirm/index.d.ts +5 -0
- package/dist/confirm/index.js +59 -0
- package/dist/cursorList/OneCursorList.vue.d.ts +2 -0
- package/dist/cursorList/index.cjs +1 -0
- package/dist/cursorList/index.d.ts +3 -0
- package/dist/cursorList/index.js +78 -0
- package/dist/dataTable/index.cjs +1 -1
- package/dist/dataTable/index.js +256 -301
- package/dist/dateTime/OneDateTime.vue.d.ts +2 -0
- package/dist/dateTime/dateTime.d.ts +43 -0
- package/dist/dateTime/index.cjs +1 -0
- package/dist/dateTime/index.d.ts +3 -0
- package/dist/dateTime/index.js +66 -0
- package/dist/dropdown/index.cjs +1 -1
- package/dist/dropdown/index.js +302 -376
- package/dist/dropdown-5cb64ab7.cjs +1 -0
- package/dist/dropdown-c81fb945.js +101 -0
- package/dist/entityPicker/index.cjs +1 -1
- package/dist/entityPicker/index.js +57 -57
- package/dist/entityPicker/useEntityModal.d.ts +7 -3
- package/dist/errorsPage/OneCrashScreen.vue.d.ts +2 -0
- package/dist/errorsPage/OneErrorHero.vue.d.ts +2 -0
- package/dist/errorsPage/OneNotFoundPage.vue.d.ts +2 -0
- package/dist/errorsPage/OneServerErrorPage.vue.d.ts +2 -0
- package/dist/errorsPage/OneSnakeGame.vue.d.ts +2 -0
- package/dist/errorsPage/createAppErrorHandler.d.ts +24 -0
- package/dist/errorsPage/errorsType.d.ts +5 -0
- package/dist/errorsPage/index.cjs +1 -1
- package/dist/errorsPage/index.d.ts +8 -0
- package/dist/errorsPage/index.js +557 -28
- package/dist/errorsPage/useCrashState.d.ts +10 -0
- package/dist/fileUpload/OneDropzone.vue.d.ts +2 -0
- package/dist/fileUpload/OneFileUpload.vue.d.ts +2 -0
- package/dist/fileUpload/fileUpload.d.ts +17 -0
- package/dist/fileUpload/index.cjs +1 -0
- package/dist/fileUpload/index.d.ts +6 -0
- package/dist/fileUpload/index.js +228 -0
- package/dist/filterBuilder/OneFilterBuilder.vue.d.ts +2 -0
- package/dist/filterBuilder/OneFilterGroup.vue.d.ts +2 -0
- package/dist/filterBuilder/OneFilterRule.vue.d.ts +2 -0
- package/dist/filterBuilder/filterBuilder.d.ts +17 -0
- package/dist/filterBuilder/index.cjs +1 -0
- package/dist/filterBuilder/index.d.ts +5 -0
- package/dist/filterBuilder/index.js +257 -0
- package/dist/form/form.d.ts +1 -1
- package/dist/form/index.cjs +1 -1
- package/dist/form/index.js +66 -574
- package/dist/i18n/index.cjs +1 -1
- package/dist/i18n/index.js +99 -15
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +18 -0
- package/dist/index.js +242 -104
- package/dist/indicators/OneStatCard.vue.d.ts +2 -0
- package/dist/indicators/index.cjs +1 -1
- package/dist/indicators/index.d.ts +1 -0
- package/dist/indicators/index.js +66 -29
- package/dist/label/index.cjs +1 -1
- package/dist/label/index.js +5 -5
- package/dist/layout/OneAuthLayout.vue.d.ts +2 -0
- package/dist/layout/OneBackButton.vue.d.ts +2 -0
- package/dist/layout/OneBreadcrumbs.vue.d.ts +2 -0
- package/dist/layout/OneEmptyLayout.vue.d.ts +6 -0
- package/dist/layout/OneGridLayout.vue.d.ts +2 -0
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.d.ts +6 -1
- package/dist/layout/index.js +1057 -765
- package/dist/layout/layout.d.ts +11 -0
- package/dist/modal/OneModalHost.vue.d.ts +2 -0
- package/dist/modal/index.cjs +1 -1
- package/dist/modal/index.d.ts +3 -0
- package/dist/modal/index.js +84 -27
- package/dist/modal/modal.d.ts +9 -0
- package/dist/modal/useModalStack.d.ts +20 -0
- package/dist/notifications/OneNotificationItem.vue.d.ts +2 -0
- package/dist/notifications/OneNotificationsBell.vue.d.ts +2 -0
- package/dist/notifications/OneNotificationsPanel.vue.d.ts +2 -0
- package/dist/notifications/index.cjs +1 -0
- package/dist/notifications/index.d.ts +7 -0
- package/dist/notifications/index.js +477 -0
- package/dist/notifications/notifications.d.ts +53 -0
- package/dist/notifications/useNotifyfeed.d.ts +32 -0
- package/dist/periodPicker/index.cjs +1 -1
- package/dist/periodPicker/index.js +126 -139
- package/dist/popover/OnePopover.vue.d.ts +2 -0
- package/dist/popover/index.cjs +1 -0
- package/dist/popover/index.d.ts +3 -0
- package/dist/popover/index.js +102 -0
- package/dist/popover/popover.d.ts +31 -0
- package/dist/progress/OneProgress.vue.d.ts +2 -0
- package/dist/progress/index.cjs +1 -0
- package/dist/progress/index.d.ts +3 -0
- package/dist/progress/index.js +74 -0
- package/dist/progress/progress.d.ts +32 -0
- package/dist/searchInput/OneSearchInput.vue.d.ts +2 -0
- package/dist/searchInput/index.cjs +1 -0
- package/dist/searchInput/index.d.ts +3 -0
- package/dist/searchInput/index.js +103 -0
- package/dist/searchInput/searchInput.d.ts +39 -0
- package/dist/settings/OneSettingsLayout.vue.d.ts +2 -0
- package/dist/settings/OneSettingsRow.vue.d.ts +2 -0
- package/dist/settings/OneSettingsSection.vue.d.ts +2 -0
- package/dist/settings/index.cjs +1 -0
- package/dist/settings/index.d.ts +4 -0
- package/dist/settings/index.js +116 -0
- package/dist/spinner/OneSpinner.vue.d.ts +2 -0
- package/dist/spinner/index.cjs +1 -0
- package/dist/spinner/index.d.ts +3 -0
- package/dist/spinner/index.js +30 -0
- package/dist/spinner/spinner.d.ts +10 -0
- package/dist/stageBadge/index.cjs +1 -1
- package/dist/stageBadge/index.js +18 -16
- package/dist/stepper/OneStepper.vue.d.ts +2 -0
- package/dist/stepper/index.cjs +1 -0
- package/dist/stepper/index.d.ts +3 -0
- package/dist/stepper/index.js +53 -0
- package/dist/stepper/stepper.d.ts +24 -0
- package/dist/style.css +1 -1
- package/dist/switch/index.cjs +1 -1
- package/dist/switch/index.js +3 -4
- package/dist/tabs/OneTab.vue.d.ts +2 -0
- package/dist/tabs/OneTabs.vue.d.ts +2 -0
- package/dist/tabs/index.cjs +1 -0
- package/dist/tabs/index.d.ts +4 -0
- package/dist/tabs/index.js +64 -0
- package/dist/tabs/tabs.d.ts +7 -0
- package/dist/toast/OneMascotToast.vue.d.ts +2 -0
- package/dist/toast/RabbitIcon.vue.d.ts +2 -0
- package/dist/toast/index.cjs +1 -1
- package/dist/toast/index.d.ts +4 -0
- package/dist/toast/index.js +139 -74
- package/dist/toast/useMascotToast.d.ts +12 -0
- package/dist/tooltip/OneTooltip.vue.d.ts +2 -0
- package/dist/tooltip/index.cjs +2 -2
- package/dist/tooltip/index.d.ts +1 -0
- package/dist/tooltip/index.js +33 -30
- package/dist/useConfirm-6344b49d.cjs +1 -0
- package/dist/useConfirm-74e99a5c.js +23 -0
- package/dist/useCursorList-5c1b57aa.js +62 -0
- package/dist/useCursorList-e1cb41e7.cjs +1 -0
- package/dist/useElementWidth-b36a7ce9.js +40 -0
- package/dist/useElementWidth-b3e53f48.cjs +1 -0
- package/dist/useFileUpload-228dbc07.js +24 -0
- package/dist/useFileUpload-f47622bb.cjs +1 -0
- package/dist/useIsMobile-7b1f08cf.cjs +1 -0
- package/dist/useIsMobile-98fc0cf9.js +7 -0
- package/dist/useMediaQuery-1d87df02.cjs +1 -0
- package/dist/useMediaQuery-77a19b18.js +37 -0
- package/dist/useModal-6a5d870b.js +30 -0
- package/dist/useModal-aa6f4a57.cjs +1 -0
- package/dist/userList/OneUserInviteModal.vue.d.ts +2 -0
- package/dist/userList/OneUserList.vue.d.ts +2 -0
- package/dist/userList/OneUserListItem.vue.d.ts +2 -0
- package/dist/userList/index.cjs +1 -0
- package/dist/userList/index.d.ts +4 -0
- package/dist/userList/index.js +559 -0
- package/dist/utils/clipboard.d.ts +6 -0
- package/dist/utils/format.d.ts +17 -0
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +125 -0
- package/dist/utils/string.d.ts +25 -0
- package/dist/utils/versionChecker.d.ts +26 -0
- package/package.json +215 -24
- package/dist/ChevronRightIcon-7a2f0c20.cjs +0 -1
- package/dist/OneHelpMenu-c6e88d8f.cjs +0 -1
- package/dist/OneMarkdown.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs +0 -1
- package/dist/OneMarkdown.vue_vue_type_style_index_0_lang-4ed993c7.js +0 -1
- package/dist/SpinnerIcon-ccb6f3fc.cjs +0 -1
- package/dist/SpinnerIcon.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs +0 -1
- package/dist/SpinnerIcon.vue_vue_type_style_index_0_lang-4ed993c7.js +0 -1
- package/dist/useModal-0c73777f.cjs +0 -1
- package/dist/useModal-7fe9444b.js +0 -194
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
import { openBlock as o, createElementBlock as
|
|
1
|
+
import { openBlock as o, createElementBlock as p, createElementVNode as v, defineComponent as vt, computed as f, createBlock as F, unref as M, withCtx as Wt, normalizeStyle as ue, Fragment as W, renderList as Z, normalizeClass as c, toDisplayString as _, createCommentVNode as k, ref as b, watch as me, nextTick as E, onMounted as Tt, onUnmounted as Ut, withDirectives as Me, withKeys as Oe, vModelText as _e, createVNode as J, Teleport as st, renderSlot as Se } from "vue";
|
|
2
2
|
import { autoUpdate as qt, computePosition as It, offset as Et, flip as Ft, shift as jt } from "@floating-ui/dom";
|
|
3
3
|
import { DatePicker as Be } from "v-calendar";
|
|
4
4
|
import { OneButton as Le } from "../button/index.js";
|
|
5
|
-
import {
|
|
5
|
+
import { u as Nt } from "../useModal-6a5d870b.js";
|
|
6
6
|
import { r as it } from "../CheckIcon-f1c94824.js";
|
|
7
|
-
import { r as
|
|
8
|
-
import { r as
|
|
7
|
+
import { r as Kt } from "../XMarkIcon-51ef0691.js";
|
|
8
|
+
import { r as Qt } from "../ChevronDownIcon-6805ce6c.js";
|
|
9
|
+
import { r as Ht } from "../MagnifyingGlassIcon-ca213d3d.js";
|
|
10
|
+
import { O as Jt } from "../OneModal-02a9a173.js";
|
|
9
11
|
import { useOnebI18n as ft } from "../i18n/index.js";
|
|
10
12
|
import { _ as mt } from "../_plugin-vue_export-helper-dad06003.js";
|
|
11
13
|
import n from "dayjs";
|
|
12
|
-
import { default as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import "../SpinnerIcon-
|
|
19
|
-
import "../
|
|
14
|
+
import { default as tl } from "dayjs";
|
|
15
|
+
import Xt from "dayjs/plugin/advancedFormat";
|
|
16
|
+
import Zt from "dayjs/plugin/isoWeek";
|
|
17
|
+
import ea from "dayjs/plugin/quarterOfYear";
|
|
18
|
+
import ta from "dayjs/plugin/utc";
|
|
19
|
+
import aa from "dayjs/plugin/customParseFormat";
|
|
20
|
+
import "../SpinnerIcon-516264ba.js";
|
|
21
|
+
import "../useIsMobile-98fc0cf9.js";
|
|
22
|
+
import "../useMediaQuery-77a19b18.js";
|
|
20
23
|
function We(a, u) {
|
|
21
|
-
return o(),
|
|
24
|
+
return o(), p("svg", {
|
|
22
25
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23
26
|
fill: "none",
|
|
24
27
|
viewBox: "0 0 24 24",
|
|
@@ -33,22 +36,6 @@ function We(a, u) {
|
|
|
33
36
|
})
|
|
34
37
|
]);
|
|
35
38
|
}
|
|
36
|
-
function aa(a, u) {
|
|
37
|
-
return o(), d("svg", {
|
|
38
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
39
|
-
fill: "none",
|
|
40
|
-
viewBox: "0 0 24 24",
|
|
41
|
-
"stroke-width": "1.8",
|
|
42
|
-
stroke: "currentColor",
|
|
43
|
-
"aria-hidden": "true"
|
|
44
|
-
}, [
|
|
45
|
-
v("path", {
|
|
46
|
-
"stroke-linecap": "round",
|
|
47
|
-
"stroke-linejoin": "round",
|
|
48
|
-
d: "M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"
|
|
49
|
-
})
|
|
50
|
-
]);
|
|
51
|
-
}
|
|
52
39
|
const Te = {
|
|
53
40
|
xs: {
|
|
54
41
|
trigger: "h-7 rounded-lg",
|
|
@@ -254,7 +241,7 @@ const Te = {
|
|
|
254
241
|
"--pp-fast-list-max-h": "540px"
|
|
255
242
|
}
|
|
256
243
|
}
|
|
257
|
-
}, ze = "manual-date", oe = "manual-range", B = "date", la = "period",
|
|
244
|
+
}, ze = "manual-date", oe = "manual-range", B = "date", la = "period", C = "range", na = { class: "fast-picker-group__list" }, ra = ["onClick"], oa = { class: "fast-picker-option__label" }, ua = {
|
|
258
245
|
key: 0,
|
|
259
246
|
class: "fast-picker-option__description"
|
|
260
247
|
}, sa = /* @__PURE__ */ vt({
|
|
@@ -269,7 +256,7 @@ const Te = {
|
|
|
269
256
|
emits: ["select"],
|
|
270
257
|
setup(a) {
|
|
271
258
|
const u = ft(), m = a, r = f(() => m.t ?? u), s = f(() => Te[m.size ?? "md"]), y = f(() => s.value.vars);
|
|
272
|
-
return (i, z) => a.useModal.isOpened.value ? (o(), F(M(
|
|
259
|
+
return (i, z) => a.useModal.isOpened.value ? (o(), F(M(Jt), {
|
|
273
260
|
key: 0,
|
|
274
261
|
useModal: a.useModal,
|
|
275
262
|
size: s.value.fastModalSize,
|
|
@@ -280,25 +267,25 @@ const Te = {
|
|
|
280
267
|
class: "grid gap-4 grid-cols-1 sm:grid-cols-2 md:grid-cols-3",
|
|
281
268
|
style: ue(y.value)
|
|
282
269
|
}, [
|
|
283
|
-
(o(!0),
|
|
270
|
+
(o(!0), p(W, null, Z(a.groups, (T) => (o(), p("section", {
|
|
284
271
|
key: T.id,
|
|
285
272
|
class: "fast-picker-group"
|
|
286
273
|
}, [
|
|
287
274
|
v("div", na, [
|
|
288
|
-
(o(!0),
|
|
275
|
+
(o(!0), p(W, null, Z(T.options, (S) => (o(), p("div", {
|
|
289
276
|
key: S.key
|
|
290
277
|
}, [
|
|
291
|
-
S.type === "label" ? (o(),
|
|
278
|
+
S.type === "label" ? (o(), p("p", {
|
|
292
279
|
key: 0,
|
|
293
280
|
class: c([s.value.presetLabel, "uppercase tracking-wide text-gray-500 mt-3 mb-1 first:mt-0"])
|
|
294
|
-
}, _(S.label), 3)) : (o(),
|
|
281
|
+
}, _(S.label), 3)) : (o(), p("button", {
|
|
295
282
|
key: 1,
|
|
296
283
|
type: "button",
|
|
297
284
|
class: c(["fast-picker-option", { "fast-picker-option--active": a.activePresetKey === S.key }]),
|
|
298
285
|
onClick: (Q) => i.$emit("select", S)
|
|
299
286
|
}, [
|
|
300
287
|
v("span", oa, _(S.label), 1),
|
|
301
|
-
S.description ? (o(),
|
|
288
|
+
S.description ? (o(), p("span", ua, _(S.description), 1)) : k("", !0)
|
|
302
289
|
], 10, ra))
|
|
303
290
|
]))), 128))
|
|
304
291
|
])
|
|
@@ -309,12 +296,12 @@ const Te = {
|
|
|
309
296
|
}, 8, ["useModal", "size", "title"])) : k("", !0);
|
|
310
297
|
}
|
|
311
298
|
});
|
|
312
|
-
const ia = /* @__PURE__ */ mt(sa, [["__scopeId", "data-v-
|
|
313
|
-
n.extend(Jt);
|
|
299
|
+
const ia = /* @__PURE__ */ mt(sa, [["__scopeId", "data-v-55ba1e9a"]]);
|
|
314
300
|
n.extend(Xt);
|
|
315
301
|
n.extend(Zt);
|
|
316
302
|
n.extend(ea);
|
|
317
303
|
n.extend(ta);
|
|
304
|
+
n.extend(aa);
|
|
318
305
|
const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
319
306
|
day: a.format("DD"),
|
|
320
307
|
month: u("ui.months_short." + a.month()),
|
|
@@ -351,7 +338,7 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
351
338
|
return r === n().endOf("day").format("DD.MM.YYYY") ? m("ui.period_select.until end of today") : r === n().subtract(1, "d").endOf("day").format("DD.MM.YYYY") ? m("ui.period_select.until end of yesterday") : r === n().endOf("month").format("DD.MM.YYYY") ? m("ui.period_select.until end of month") : r === n().subtract(1, "month").endOf("month").format("DD.MM.YYYY") ? m("ui.period_select.until end of last month") : `${m("ui.period_select.Till")} ${n.unix(u).format("DD.MM.YYYY")}`;
|
|
352
339
|
}
|
|
353
340
|
return "";
|
|
354
|
-
}, da = (a, u, m) => m === B ? B : m === la ?
|
|
341
|
+
}, da = (a, u, m) => m === B ? B : m === la ? C : a != null && u != null ? n.unix(a).isSame(n.unix(u), "day") ? B : C : a != null || u != null ? C : null, ct = (a) => [
|
|
355
342
|
// === Date presets (group: 'date') ===
|
|
356
343
|
O({
|
|
357
344
|
key: "until-now",
|
|
@@ -600,9 +587,9 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
600
587
|
},
|
|
601
588
|
emits: ["update:modelValue", "focus"],
|
|
602
589
|
setup(a, { emit: u }) {
|
|
603
|
-
const m = ft(), r = a, s = f(() => r.t ?? m), y = f(() => Te[r.size ?? "md"]), i = f(() => Te[r.dropdownSize ?? r.size ?? "md"]), z = f(() => i.value.vars), T = f(() => r.dropdownSize ?? r.size ?? "md"), S = f(() => T.value !== "xs" && T.value !== "sm"), Q = f(() => r.mode === "date"), se = u, ee = b(null), j = b(null), h = b(!1), P = b(!1), Ge = b(!1), w = b(B), A = b(null), N = b(0), R = b(!1), Ue = b(!1), ie = b(""), de = b(""),
|
|
590
|
+
const m = ft(), r = a, s = f(() => r.t ?? m), y = f(() => Te[r.size ?? "md"]), i = f(() => Te[r.dropdownSize ?? r.size ?? "md"]), z = f(() => i.value.vars), T = f(() => r.dropdownSize ?? r.size ?? "md"), S = f(() => T.value !== "xs" && T.value !== "sm"), Q = f(() => r.mode === "date"), se = u, ee = b(null), j = b(null), h = b(!1), P = b(!1), Ge = b(!1), w = b(B), A = b(null), N = b(0), R = b(!1), Ue = b(!1), ie = b(""), de = b(""), $ = b(n().format("YYYY-MM-DD")), V = b(void 0), pe = b(""), ce = b(""), I = b(0), G = b(null), $e = b(null), K = b(null);
|
|
604
591
|
let te = null;
|
|
605
|
-
const ae = b(null),
|
|
592
|
+
const ae = b(null), Ce = b(!1), qe = b(typeof window < "u" ? window.innerWidth : 1024), ve = f(() => qe.value < 640), ge = Nt(), x = f(() => {
|
|
606
593
|
var e, t;
|
|
607
594
|
return (e = r.modelValue) != null && e.start ? n(r.modelValue.start).startOf("day").unix() : dt((t = r.modelValue) == null ? void 0 : t.startUnix);
|
|
608
595
|
}), Y = f(() => {
|
|
@@ -610,7 +597,7 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
610
597
|
return (e = r.modelValue) != null && e.end ? n(r.modelValue.end).endOf("day").unix() : dt((t = r.modelValue) == null ? void 0 : t.endUnix);
|
|
611
598
|
}), Pe = f(() => x.value != null || Y.value != null), yt = f(
|
|
612
599
|
() => pt(x.value, Y.value, s.value) || r.placeholder || s.value("ui.period_select.Select date")
|
|
613
|
-
), be = f(() => r.disableDate ?? void 0), xt = f(() => pt(x.value, Y.value, s.value) || ""), Ae = f(() => `date-${N.value}`), gt = f(() => `range-${N.value}`), Ie = f(() => r.columns != null ? r.columns : ve.value || w.value !==
|
|
600
|
+
), be = f(() => r.disableDate ?? void 0), xt = f(() => pt(x.value, Y.value, s.value) || ""), Ae = f(() => `date-${N.value}`), gt = f(() => `range-${N.value}`), Ie = f(() => r.columns != null ? r.columns : ve.value || w.value !== C || T.value === "xs" || T.value === "sm" ? 1 : 2), he = f(
|
|
614
601
|
() => !r.minGranularity || r.minGranularity === "day" || r.minGranularity === "week"
|
|
615
602
|
), bt = f(() => r.minGranularity === "month" ? s.value("ui.period_select.Months") : r.minGranularity === "quarter" ? s.value("ui.period_select.Quarters") : r.minGranularity === "year" ? s.value("ui.period_select.Years") : s.value("ui.period_select.Period group title")), U = f(() => {
|
|
616
603
|
if (!r.minGranularity || r.minGranularity === "day" || r.minGranularity === "week")
|
|
@@ -624,10 +611,10 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
624
611
|
unit: r.minGranularity,
|
|
625
612
|
yearGroups: e.map((l) => ({
|
|
626
613
|
yearLabel: n().subtract(l, "year").format("YYYY"),
|
|
627
|
-
items: t ? Array.from({ length: 12 }, (
|
|
614
|
+
items: t ? Array.from({ length: 12 }, (d, g) => ({
|
|
628
615
|
date: n().subtract(l, "year").month(g),
|
|
629
616
|
label: s.value("ui.months_short." + g)
|
|
630
|
-
})) : Array.from({ length: 4 }, (
|
|
617
|
+
})) : Array.from({ length: 4 }, (d, g) => ({
|
|
631
618
|
date: n().subtract(l, "year").quarter(g + 1).startOf("quarter"),
|
|
632
619
|
label: `Q${g + 1}`
|
|
633
620
|
}))
|
|
@@ -664,13 +651,13 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
664
651
|
] : e;
|
|
665
652
|
}), je = f(() => {
|
|
666
653
|
N.value;
|
|
667
|
-
const e = ct(s.value).filter((D) => D.group === "period").filter((D) => X(D.key, r.minGranularity)), t = r.hideDayAndWeek || !X("week-0", r.minGranularity) ? [] : ye("week", s.value), l = X("month-0", r.minGranularity) ? ye("month", s.value) : [],
|
|
668
|
-
return { shortcuts: e, rollingWeek: t, rollingMonth: l, rollingQuarter:
|
|
654
|
+
const e = ct(s.value).filter((D) => D.group === "period").filter((D) => X(D.key, r.minGranularity)), t = r.hideDayAndWeek || !X("week-0", r.minGranularity) ? [] : ye("week", s.value), l = X("month-0", r.minGranularity) ? ye("month", s.value) : [], d = X("quarter-0", r.minGranularity) ? ye("quarter", s.value) : [], g = X("year-0", r.minGranularity) ? ye("year", s.value) : [];
|
|
655
|
+
return { shortcuts: e, rollingWeek: t, rollingMonth: l, rollingQuarter: d, rollingYear: g };
|
|
669
656
|
}), Ne = f(() => {
|
|
670
|
-
const { shortcuts: e, rollingWeek: t, rollingMonth: l, rollingQuarter:
|
|
657
|
+
const { shortcuts: e, rollingWeek: t, rollingMonth: l, rollingQuarter: d, rollingYear: g } = je.value, D = [...e], q = [
|
|
671
658
|
{ items: t, key: "weeks-history", labelKey: "Weeks history label" },
|
|
672
659
|
{ items: l, key: "months-history", labelKey: "Months history label" },
|
|
673
|
-
{ items:
|
|
660
|
+
{ items: d, key: "quarters-history", labelKey: "Quarters history label" },
|
|
674
661
|
{ items: g, key: "years-history", labelKey: "Years history label" }
|
|
675
662
|
];
|
|
676
663
|
for (const H of q)
|
|
@@ -699,7 +686,7 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
699
686
|
]), le = f(
|
|
700
687
|
() => r.hideDatePresets ? Ke.value.filter((e) => e.id !== "date") : Ke.value
|
|
701
688
|
), ht = f(() => {
|
|
702
|
-
const { shortcuts: e, rollingWeek: t, rollingMonth: l, rollingQuarter:
|
|
689
|
+
const { shortcuts: e, rollingWeek: t, rollingMonth: l, rollingQuarter: d } = je.value, g = [...e];
|
|
703
690
|
t.length > 0 && (g.push({
|
|
704
691
|
key: "weeks-history",
|
|
705
692
|
type: "label",
|
|
@@ -719,7 +706,7 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
719
706
|
return [
|
|
720
707
|
{ id: "presets-weeks", title: "", subtitle: "", ctaLabel: "", options: g },
|
|
721
708
|
D("months", l, "Months history label"),
|
|
722
|
-
D("quarters",
|
|
709
|
+
D("quarters", d, "Quarters history label")
|
|
723
710
|
].filter((q) => q != null && q.options.length > 0);
|
|
724
711
|
}), kt = f(() => ht.value), Yt = f(() => [
|
|
725
712
|
...Fe.value.filter((e) => e.type === "option"),
|
|
@@ -727,7 +714,7 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
727
714
|
]), wt = f(
|
|
728
715
|
() => P.value && w.value === B || A.value === ze
|
|
729
716
|
), Dt = f(
|
|
730
|
-
() => P.value && w.value ===
|
|
717
|
+
() => P.value && w.value === C || A.value === oe
|
|
731
718
|
), Qe = () => {
|
|
732
719
|
N.value++;
|
|
733
720
|
}, Mt = () => {
|
|
@@ -765,7 +752,7 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
765
752
|
});
|
|
766
753
|
return;
|
|
767
754
|
}
|
|
768
|
-
((e = r.modelValue) == null ? void 0 : e.kind) === B ? (w.value = B, re()) : ((t = r.modelValue) == null ? void 0 : t.kind) ===
|
|
755
|
+
((e = r.modelValue) == null ? void 0 : e.kind) === B ? (w.value = B, re()) : ((t = r.modelValue) == null ? void 0 : t.kind) === C ? (w.value = C, fe()) : r.asDateString || r.editable ? (w.value = B, re()) : (w.value = C, fe()), P.value = !0, E(() => {
|
|
769
756
|
R.value = !0;
|
|
770
757
|
});
|
|
771
758
|
}
|
|
@@ -798,7 +785,7 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
798
785
|
});
|
|
799
786
|
}, re = () => {
|
|
800
787
|
const e = x.value && Y.value && n.unix(x.value).isSame(n.unix(Y.value), "day") ? x.value : Y.value || x.value || n().unix();
|
|
801
|
-
|
|
788
|
+
$.value = e ? n.unix(e).format("YYYY-MM-DD") : n().format("YYYY-MM-DD");
|
|
802
789
|
}, fe = () => {
|
|
803
790
|
x.value || Y.value ? V.value = {
|
|
804
791
|
start: x.value ? n.unix(x.value).format("YYYY-MM-DD") : void 0,
|
|
@@ -813,58 +800,58 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
813
800
|
R.value = !0;
|
|
814
801
|
});
|
|
815
802
|
}, Vt = (e = !0) => {
|
|
816
|
-
if (
|
|
803
|
+
if (!$.value)
|
|
817
804
|
return;
|
|
818
|
-
const t = n(
|
|
805
|
+
const t = n($.value);
|
|
819
806
|
t.isValid() && (L(t.startOf("day").unix(), t.endOf("day").unix(), B), A.value = ze, e && (h.value = !1));
|
|
820
807
|
}, we = (e, t) => {
|
|
821
808
|
var l;
|
|
822
809
|
(l = t.target) == null || l.blur();
|
|
823
810
|
}, et = (e) => {
|
|
824
|
-
e && (
|
|
811
|
+
e && ($.value = e, !(!P.value && !Q.value) && Vt());
|
|
825
812
|
}, Gt = (e) => {
|
|
826
813
|
if (!e)
|
|
827
814
|
return;
|
|
828
|
-
|
|
815
|
+
$.value = e;
|
|
829
816
|
const t = n(e);
|
|
830
817
|
t.isValid() && (ie.value = t.format("DD.MM.YYYY"), L(t.startOf("day").unix(), t.endOf("day").unix(), B));
|
|
831
818
|
}, tt = () => {
|
|
832
819
|
const e = xe(ie.value);
|
|
833
820
|
if (e) {
|
|
834
|
-
|
|
821
|
+
$.value = e, N.value++;
|
|
835
822
|
const t = n(e);
|
|
836
823
|
t.isValid() && L(t.startOf("day").unix(), t.endOf("day").unix(), B);
|
|
837
824
|
}
|
|
838
|
-
},
|
|
839
|
-
|
|
840
|
-
|
|
825
|
+
}, $t = () => {
|
|
826
|
+
Ce.value = !0, setTimeout(() => {
|
|
827
|
+
Ce.value = !1;
|
|
841
828
|
}, 0);
|
|
842
829
|
}, at = () => {
|
|
843
|
-
if (
|
|
830
|
+
if (Ce.value)
|
|
844
831
|
return;
|
|
845
832
|
const e = de.value.trim(), t = e.split(/\s*-\s*/);
|
|
846
833
|
if (t.length === 2) {
|
|
847
|
-
const
|
|
848
|
-
if (
|
|
849
|
-
const D = n(
|
|
834
|
+
const d = xe(t[0]), g = xe(t[1]);
|
|
835
|
+
if (d && g) {
|
|
836
|
+
const D = n(d), q = n(g);
|
|
850
837
|
if (D.isValid() && q.isValid() && !q.isBefore(D)) {
|
|
851
|
-
L(D.startOf("day").unix(), q.endOf("day").unix(),
|
|
838
|
+
L(D.startOf("day").unix(), q.endOf("day").unix(), C), A.value = oe;
|
|
852
839
|
return;
|
|
853
840
|
}
|
|
854
841
|
}
|
|
855
842
|
}
|
|
856
843
|
const l = xe(e);
|
|
857
844
|
if (l) {
|
|
858
|
-
|
|
859
|
-
const
|
|
860
|
-
|
|
845
|
+
$.value = l, N.value++, A.value = ze;
|
|
846
|
+
const d = n(l);
|
|
847
|
+
d.isValid() && L(d.startOf("day").unix(), d.endOf("day").unix(), B);
|
|
861
848
|
}
|
|
862
|
-
},
|
|
849
|
+
}, Ct = () => {
|
|
863
850
|
var e, t;
|
|
864
851
|
!Ee.value || !((e = V.value) != null && e.start) || !((t = V.value) != null && t.end) || (L(
|
|
865
852
|
n(V.value.start).startOf("day").unix(),
|
|
866
853
|
n(V.value.end).endOf("day").unix(),
|
|
867
|
-
|
|
854
|
+
C
|
|
868
855
|
), A.value = oe, h.value = !1);
|
|
869
856
|
}, De = (e) => {
|
|
870
857
|
const l = xe((e === "start" ? pe : ce).value);
|
|
@@ -873,24 +860,24 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
873
860
|
if (!G.value)
|
|
874
861
|
G.value = e;
|
|
875
862
|
else {
|
|
876
|
-
const l = G.value.isBefore(e) ? G.value : e,
|
|
863
|
+
const l = G.value.isBefore(e) ? G.value : e, d = G.value.isBefore(e) ? e : G.value;
|
|
877
864
|
L(
|
|
878
865
|
l.startOf(t).startOf("day").unix(),
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
), A.value = oe, G.value = null,
|
|
866
|
+
d.endOf(t).endOf("day").unix(),
|
|
867
|
+
C
|
|
868
|
+
), A.value = oe, G.value = null, $e.value = null, h.value = !1;
|
|
882
869
|
}
|
|
883
870
|
}, nt = (e, t) => {
|
|
884
|
-
if (G.value &&
|
|
871
|
+
if (G.value && !$e.value) {
|
|
885
872
|
if (K.value) {
|
|
886
|
-
const l = G.value.isBefore(K.value) ? G.value : K.value,
|
|
887
|
-
return (e.isSame(l, t) || e.isAfter(l, t)) && (e.isSame(
|
|
873
|
+
const l = G.value.isBefore(K.value) ? G.value : K.value, d = G.value.isBefore(K.value) ? K.value : G.value;
|
|
874
|
+
return (e.isSame(l, t) || e.isAfter(l, t)) && (e.isSame(d, t) || e.isBefore(d, t));
|
|
888
875
|
}
|
|
889
876
|
return e.isSame(G.value, t);
|
|
890
877
|
}
|
|
891
878
|
if (x.value && Y.value) {
|
|
892
|
-
const l = n.unix(x.value),
|
|
893
|
-
return (e.isSame(l, t) || e.isAfter(l, t)) && (e.isSame(
|
|
879
|
+
const l = n.unix(x.value), d = n.unix(Y.value);
|
|
880
|
+
return (e.isSame(l, t) || e.isAfter(l, t)) && (e.isSame(d, t) || e.isBefore(d, t));
|
|
894
881
|
}
|
|
895
882
|
return !1;
|
|
896
883
|
}, rt = (e) => {
|
|
@@ -903,7 +890,7 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
903
890
|
const e = Yt.value.find((t) => {
|
|
904
891
|
if (!t.resolveRange)
|
|
905
892
|
return !1;
|
|
906
|
-
const [l,
|
|
893
|
+
const [l, d] = t.resolveRange(), g = l == null && x.value == null || l != null && x.value != null && l === x.value, D = d == null && Y.value == null || d != null && Y.value != null && d === Y.value;
|
|
907
894
|
return g && D;
|
|
908
895
|
});
|
|
909
896
|
return e ? e.key : x.value && Y.value && n.unix(x.value).isSame(n.unix(Y.value), "day") ? ze : oe;
|
|
@@ -915,9 +902,9 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
915
902
|
me(xt, (e) => {
|
|
916
903
|
r.editable && (de.value = e);
|
|
917
904
|
}, { immediate: !0 }), me(h, (e) => {
|
|
918
|
-
e ? (Qe(), E(He), !Q.value && (!he.value || le.value.length === 0) && !P.value && (R.value = !1, w.value =
|
|
905
|
+
e ? (Qe(), E(He), !Q.value && (!he.value || le.value.length === 0) && !P.value && (R.value = !1, w.value = C, fe(), P.value = !0, E(() => {
|
|
919
906
|
R.value = !0;
|
|
920
|
-
}))) : (Je(), R.value = !1, P.value = !1, Ge.value = !1, I.value = 0, G.value = null,
|
|
907
|
+
}))) : (Je(), R.value = !1, P.value = !1, Ge.value = !1, I.value = 0, G.value = null, $e.value = null, K.value = null);
|
|
921
908
|
}), me(
|
|
922
909
|
() => [x.value, Y.value, N.value],
|
|
923
910
|
() => {
|
|
@@ -927,7 +914,7 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
927
914
|
), me(
|
|
928
915
|
() => r.minGranularity,
|
|
929
916
|
() => {
|
|
930
|
-
Qe(), !he.value && w.value === B && (w.value =
|
|
917
|
+
Qe(), !he.value && w.value === B && (w.value = C);
|
|
931
918
|
}
|
|
932
919
|
), me(V, (e) => {
|
|
933
920
|
e != null && e.start && (pe.value = n(e.start).format("DD.MM.YYYY")), e != null && e.end && (ce.value = n(e.end).format("DD.MM.YYYY"));
|
|
@@ -944,13 +931,13 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
944
931
|
}));
|
|
945
932
|
}), Ut(() => {
|
|
946
933
|
Je(), window.removeEventListener("resize", Re), document.removeEventListener("click", ut);
|
|
947
|
-
}), (e, t) => (o(),
|
|
934
|
+
}), (e, t) => (o(), p("div", {
|
|
948
935
|
class: "relative",
|
|
949
936
|
ref_key: "containerRef",
|
|
950
937
|
ref: ee,
|
|
951
938
|
style: ue(z.value)
|
|
952
939
|
}, [
|
|
953
|
-
a.mode === "inline" ? (o(),
|
|
940
|
+
a.mode === "inline" ? (o(), p("div", {
|
|
954
941
|
key: 0,
|
|
955
942
|
class: "one-pp-panel",
|
|
956
943
|
style: ue(z.value)
|
|
@@ -967,9 +954,9 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
967
954
|
]),
|
|
968
955
|
Ue.value ? (o(), F(M(Be), {
|
|
969
956
|
key: Ae.value,
|
|
970
|
-
modelValue:
|
|
957
|
+
modelValue: $.value,
|
|
971
958
|
"onUpdate:modelValue": [
|
|
972
|
-
t[1] || (t[1] = (l) =>
|
|
959
|
+
t[1] || (t[1] = (l) => $.value = l),
|
|
973
960
|
Gt
|
|
974
961
|
],
|
|
975
962
|
onDayclick: we,
|
|
@@ -982,14 +969,14 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
982
969
|
masks: { title: "MMMM YYYY" },
|
|
983
970
|
"disabled-dates": be.value
|
|
984
971
|
}, null, 8, ["modelValue", "disabled-dates"])) : k("", !0)
|
|
985
|
-
], 4)) : (o(),
|
|
972
|
+
], 4)) : (o(), p("div", {
|
|
986
973
|
key: 1,
|
|
987
974
|
class: c(["flex items-center overflow-hidden", [
|
|
988
975
|
y.value.trigger,
|
|
989
976
|
a.editable ? ["border transition-colors", a.noBorder ? "border-transparent focus-within:border-blue-500" : "border-gray-200 focus-within:border-blue-500"] : [{ border: !a.noBorder }, "border-gray-200"]
|
|
990
977
|
]])
|
|
991
978
|
}, [
|
|
992
|
-
a.editable ? (o(),
|
|
979
|
+
a.editable ? (o(), p("div", {
|
|
993
980
|
key: 0,
|
|
994
981
|
class: c(["flex items-center h-full bg-white flex-1", [y.value.triggerButton]])
|
|
995
982
|
}, [
|
|
@@ -1013,7 +1000,7 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
1013
1000
|
}, null, 42, va), [
|
|
1014
1001
|
[_e, de.value]
|
|
1015
1002
|
])
|
|
1016
|
-
], 2)) : (o(),
|
|
1003
|
+
], 2)) : (o(), p("button", {
|
|
1017
1004
|
key: 1,
|
|
1018
1005
|
onClick: ke,
|
|
1019
1006
|
type: "button",
|
|
@@ -1024,7 +1011,7 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
1024
1011
|
}, null, 8, ["class"]),
|
|
1025
1012
|
v("span", fa, _(yt.value), 1)
|
|
1026
1013
|
], 2)),
|
|
1027
|
-
a.mode === "short" ? (o(),
|
|
1014
|
+
a.mode === "short" ? (o(), p(W, { key: 2 }, [
|
|
1028
1015
|
v("div", {
|
|
1029
1016
|
class: c(["w-px bg-gray-200", y.value.triggerDivider])
|
|
1030
1017
|
}, null, 2),
|
|
@@ -1033,12 +1020,12 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
1033
1020
|
type: "button",
|
|
1034
1021
|
class: c(["flex items-center justify-center h-full bg-white hover:bg-gray-50 transition-colors", y.value.triggerAction])
|
|
1035
1022
|
}, [
|
|
1036
|
-
J(M(
|
|
1023
|
+
J(M(Qt), {
|
|
1037
1024
|
class: c([y.value.triggerIcon, "text-gray-600"])
|
|
1038
1025
|
}, null, 8, ["class"])
|
|
1039
1026
|
], 2)
|
|
1040
1027
|
], 64)) : k("", !0),
|
|
1041
|
-
a.mode === "full" ? (o(),
|
|
1028
|
+
a.mode === "full" ? (o(), p(W, { key: 3 }, [
|
|
1042
1029
|
v("div", {
|
|
1043
1030
|
class: c(["w-px bg-gray-200", y.value.triggerDivider])
|
|
1044
1031
|
}, null, 2),
|
|
@@ -1047,12 +1034,12 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
1047
1034
|
type: "button",
|
|
1048
1035
|
class: c(["flex items-center justify-center h-full bg-white hover:bg-gray-50 transition-colors", y.value.triggerAction])
|
|
1049
1036
|
}, [
|
|
1050
|
-
J(M(
|
|
1037
|
+
J(M(Ht), {
|
|
1051
1038
|
class: c([y.value.triggerIcon, "text-gray-600"])
|
|
1052
1039
|
}, null, 8, ["class"])
|
|
1053
1040
|
], 2)
|
|
1054
1041
|
], 64)) : k("", !0),
|
|
1055
|
-
Pe.value && !a.noClear ? (o(),
|
|
1042
|
+
Pe.value && !a.noClear ? (o(), p(W, { key: 4 }, [
|
|
1056
1043
|
v("div", {
|
|
1057
1044
|
class: c(["w-px bg-gray-200", y.value.triggerDivider])
|
|
1058
1045
|
}, null, 2),
|
|
@@ -1061,21 +1048,21 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
1061
1048
|
type: "button",
|
|
1062
1049
|
class: c(["flex items-center justify-center h-full bg-white hover:bg-gray-50 transition-colors", y.value.triggerAction])
|
|
1063
1050
|
}, [
|
|
1064
|
-
J(M(
|
|
1051
|
+
J(M(Kt), {
|
|
1065
1052
|
class: c([y.value.clearIcon, "text-gray-600"])
|
|
1066
1053
|
}, null, 8, ["class"])
|
|
1067
1054
|
], 2)
|
|
1068
1055
|
], 64)) : k("", !0)
|
|
1069
1056
|
], 2)),
|
|
1070
1057
|
(o(), F(st, { to: "body" }, [
|
|
1071
|
-
h.value && ve.value ? (o(),
|
|
1058
|
+
h.value && ve.value ? (o(), p("div", {
|
|
1072
1059
|
key: 0,
|
|
1073
1060
|
class: "fixed inset-0 z-40 bg-black/20",
|
|
1074
1061
|
onClick: ne
|
|
1075
1062
|
})) : k("", !0)
|
|
1076
1063
|
])),
|
|
1077
1064
|
(o(), F(st, { to: "body" }, [
|
|
1078
|
-
h.value ? (o(),
|
|
1065
|
+
h.value ? (o(), p("div", {
|
|
1079
1066
|
key: 0,
|
|
1080
1067
|
ref_key: "dropdownRef",
|
|
1081
1068
|
ref: j,
|
|
@@ -1084,12 +1071,12 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
1084
1071
|
ve.value ? "fixed inset-x-0 bottom-0 max-h-[93vh]" : "fixed max-h-[85vh]"
|
|
1085
1072
|
]]),
|
|
1086
1073
|
style: ue(z.value),
|
|
1087
|
-
onMousedown:
|
|
1074
|
+
onMousedown: $t
|
|
1088
1075
|
}, [
|
|
1089
1076
|
t[16] || (t[16] = v("div", { class: "sm:hidden flex justify-center pb-2" }, [
|
|
1090
1077
|
v("div", { class: "w-10 h-1 bg-gray-300 rounded-full" })
|
|
1091
1078
|
], -1)),
|
|
1092
|
-
Q.value ? (o(),
|
|
1079
|
+
Q.value ? (o(), p("div", {
|
|
1093
1080
|
key: 0,
|
|
1094
1081
|
class: c(["picker-panel one-pp-panel", i.value.panelGap]),
|
|
1095
1082
|
style: ue(z.value)
|
|
@@ -1106,9 +1093,9 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
1106
1093
|
}, void 0, !0),
|
|
1107
1094
|
R.value ? (o(), F(M(Be), {
|
|
1108
1095
|
key: Ae.value,
|
|
1109
|
-
modelValue:
|
|
1096
|
+
modelValue: $.value,
|
|
1110
1097
|
"onUpdate:modelValue": [
|
|
1111
|
-
t[3] || (t[3] = (l) =>
|
|
1098
|
+
t[3] || (t[3] = (l) => $.value = l),
|
|
1112
1099
|
et
|
|
1113
1100
|
],
|
|
1114
1101
|
onDayclick: we,
|
|
@@ -1121,18 +1108,18 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
1121
1108
|
masks: { title: "MMMM YYYY" },
|
|
1122
1109
|
"disabled-dates": be.value
|
|
1123
1110
|
}, null, 8, ["modelValue", "disabled-dates"])) : k("", !0)
|
|
1124
|
-
], 6)) : (o(),
|
|
1125
|
-
!P.value && (le.value.length > 0 || e.$slots["presets-top"] || e.$slots["presets-bottom"]) ? (o(),
|
|
1111
|
+
], 6)) : (o(), p(W, { key: 1 }, [
|
|
1112
|
+
!P.value && (le.value.length > 0 || e.$slots["presets-top"] || e.$slots["presets-bottom"]) ? (o(), p("div", ma, [
|
|
1126
1113
|
Se(e.$slots, "presets-top", {
|
|
1127
1114
|
select: Ye,
|
|
1128
1115
|
close: ne,
|
|
1129
1116
|
value: a.modelValue
|
|
1130
1117
|
}, void 0, !0),
|
|
1131
|
-
le.value.length > 0 ? (o(),
|
|
1118
|
+
le.value.length > 0 ? (o(), p("div", {
|
|
1132
1119
|
key: 0,
|
|
1133
1120
|
class: c(["flex flex-col gap-4 w-full", S.value && le.value.length > 1 ? "sm:grid sm:gap-3 sm:grid-cols-2" : ""])
|
|
1134
1121
|
}, [
|
|
1135
|
-
(o(!0),
|
|
1122
|
+
(o(!0), p(W, null, Z(le.value, (l) => (o(), p("section", {
|
|
1136
1123
|
key: l.id,
|
|
1137
1124
|
class: "flex flex-col picker-group"
|
|
1138
1125
|
}, [
|
|
@@ -1145,20 +1132,20 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
1145
1132
|
}, _(l.subtitle), 3)
|
|
1146
1133
|
]),
|
|
1147
1134
|
v("div", xa, [
|
|
1148
|
-
(o(!0),
|
|
1149
|
-
key:
|
|
1135
|
+
(o(!0), p(W, null, Z(l.options, (d) => (o(), p("div", {
|
|
1136
|
+
key: d.key
|
|
1150
1137
|
}, [
|
|
1151
|
-
|
|
1138
|
+
d.type === "label" ? (o(), p("p", {
|
|
1152
1139
|
key: 0,
|
|
1153
1140
|
class: c([i.value.presetLabel, "uppercase tracking-wide text-gray-500 mt-4 mb-1"])
|
|
1154
|
-
}, _(
|
|
1141
|
+
}, _(d.label), 3)) : (o(), p("button", {
|
|
1155
1142
|
key: 1,
|
|
1156
|
-
class: c(["picker-option", { "picker-option--active": A.value ===
|
|
1157
|
-
onClick: (g) => Xe(
|
|
1143
|
+
class: c(["picker-option", { "picker-option--active": A.value === d.key }]),
|
|
1144
|
+
onClick: (g) => Xe(d),
|
|
1158
1145
|
type: "button"
|
|
1159
1146
|
}, [
|
|
1160
|
-
v("span", ba, _(
|
|
1161
|
-
|
|
1147
|
+
v("span", ba, _(d.label), 1),
|
|
1148
|
+
d.description ? (o(), p("span", ha, _(d.description), 1)) : k("", !0)
|
|
1162
1149
|
], 10, ga))
|
|
1163
1150
|
]))), 128))
|
|
1164
1151
|
]),
|
|
@@ -1170,7 +1157,7 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
1170
1157
|
variant: l.id === "date" ? "primary" : "secondary",
|
|
1171
1158
|
icon: l.id === "date" ? M(We) : M(it),
|
|
1172
1159
|
label: l.ctaLabel,
|
|
1173
|
-
onClick: (
|
|
1160
|
+
onClick: (d) => zt(l.id === "date" ? "date" : "range")
|
|
1174
1161
|
}, null, 8, ["class", "size", "variant", "icon", "label", "onClick"])
|
|
1175
1162
|
]))), 128))
|
|
1176
1163
|
], 2)) : k("", !0),
|
|
@@ -1180,7 +1167,7 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
1180
1167
|
value: a.modelValue
|
|
1181
1168
|
}, void 0, !0)
|
|
1182
1169
|
])) : k("", !0),
|
|
1183
|
-
P.value ? (o(),
|
|
1170
|
+
P.value ? (o(), p("div", {
|
|
1184
1171
|
key: 1,
|
|
1185
1172
|
class: c(["picker-panel one-pp-panel", i.value.panelGap]),
|
|
1186
1173
|
style: ue(z.value)
|
|
@@ -1188,7 +1175,7 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
1188
1175
|
v("div", {
|
|
1189
1176
|
class: c(["grid gap-2", he.value ? "grid-cols-2" : "grid-cols-1"])
|
|
1190
1177
|
}, [
|
|
1191
|
-
he.value ? (o(),
|
|
1178
|
+
he.value ? (o(), p("button", {
|
|
1192
1179
|
key: 0,
|
|
1193
1180
|
type: "button",
|
|
1194
1181
|
class: c(["border font-medium transition-colors", [
|
|
@@ -1206,12 +1193,12 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
1206
1193
|
onClick: t[5] || (t[5] = (l) => Ze("range"))
|
|
1207
1194
|
}, _(bt.value), 3)
|
|
1208
1195
|
], 2),
|
|
1209
|
-
R.value && (!a.minGranularity || a.minGranularity === "day" || a.minGranularity === "week") ? (o(),
|
|
1196
|
+
R.value && (!a.minGranularity || a.minGranularity === "day" || a.minGranularity === "week") ? (o(), p(W, { key: 0 }, [
|
|
1210
1197
|
w.value === "date" ? (o(), F(M(Be), {
|
|
1211
1198
|
key: Ae.value,
|
|
1212
|
-
modelValue:
|
|
1199
|
+
modelValue: $.value,
|
|
1213
1200
|
"onUpdate:modelValue": [
|
|
1214
|
-
t[6] || (t[6] = (l) =>
|
|
1201
|
+
t[6] || (t[6] = (l) => $.value = l),
|
|
1215
1202
|
et
|
|
1216
1203
|
],
|
|
1217
1204
|
onDayclick: we,
|
|
@@ -1238,7 +1225,7 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
1238
1225
|
masks: { title: "MMMM YYYY" },
|
|
1239
1226
|
"disabled-dates": be.value
|
|
1240
1227
|
}, null, 8, ["modelValue", "columns", "disabled-dates"])) : k("", !0)
|
|
1241
|
-
], 64)) : U.value ? (o(),
|
|
1228
|
+
], 64)) : U.value ? (o(), p("div", ka, [
|
|
1242
1229
|
v("div", Ya, [
|
|
1243
1230
|
v("button", {
|
|
1244
1231
|
onClick: t[8] || (t[8] = (l) => I.value++),
|
|
@@ -1255,8 +1242,8 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
1255
1242
|
class: "nav-btn"
|
|
1256
1243
|
}, " » ", 8, wa)
|
|
1257
1244
|
]),
|
|
1258
|
-
U.value.yearGroups ? (o(),
|
|
1259
|
-
(o(!0),
|
|
1245
|
+
U.value.yearGroups ? (o(), p("div", Da, [
|
|
1246
|
+
(o(!0), p(W, null, Z(U.value.yearGroups, (l) => (o(), p("div", {
|
|
1260
1247
|
key: l.yearLabel,
|
|
1261
1248
|
class: "space-y-2"
|
|
1262
1249
|
}, [
|
|
@@ -1266,22 +1253,22 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
1266
1253
|
v("div", {
|
|
1267
1254
|
class: c(["grid gap-2", U.value.gridCols])
|
|
1268
1255
|
}, [
|
|
1269
|
-
(o(!0),
|
|
1256
|
+
(o(!0), p(W, null, Z(l.items, (d, g) => (o(), p("button", {
|
|
1270
1257
|
key: g,
|
|
1271
1258
|
type: "button",
|
|
1272
|
-
class: c(["month-btn", nt(
|
|
1273
|
-
onClick: (D) => lt(
|
|
1274
|
-
onMouseenter: (D) => rt(
|
|
1259
|
+
class: c(["month-btn", nt(d.date, U.value.unit) ? "month-btn--active" : ""]),
|
|
1260
|
+
onClick: (D) => lt(d.date, U.value.unit),
|
|
1261
|
+
onMouseenter: (D) => rt(d.date),
|
|
1275
1262
|
onMouseleave: ot
|
|
1276
|
-
}, _(
|
|
1263
|
+
}, _(d.label), 43, Ma))), 128))
|
|
1277
1264
|
], 2)
|
|
1278
1265
|
]))), 128))
|
|
1279
|
-
])) : U.value.flatItems ? (o(),
|
|
1266
|
+
])) : U.value.flatItems ? (o(), p("div", {
|
|
1280
1267
|
key: 1,
|
|
1281
1268
|
class: c(["grid gap-2", U.value.gridCols])
|
|
1282
1269
|
}, [
|
|
1283
|
-
(o(!0),
|
|
1284
|
-
key:
|
|
1270
|
+
(o(!0), p(W, null, Z(U.value.flatItems, (l, d) => (o(), p("button", {
|
|
1271
|
+
key: d,
|
|
1285
1272
|
type: "button",
|
|
1286
1273
|
class: c(["month-btn", nt(l.date, "year") ? "month-btn--active" : ""]),
|
|
1287
1274
|
onClick: (g) => lt(l.date, "year"),
|
|
@@ -1290,11 +1277,11 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
1290
1277
|
}, _(l.label), 43, Oa))), 128))
|
|
1291
1278
|
], 2)) : k("", !0)
|
|
1292
1279
|
])) : k("", !0),
|
|
1293
|
-
w.value === "range" && (!a.minGranularity || a.minGranularity === "day" || a.minGranularity === "week") ? (o(),
|
|
1280
|
+
w.value === "range" && (!a.minGranularity || a.minGranularity === "day" || a.minGranularity === "week") ? (o(), p("div", {
|
|
1294
1281
|
key: 2,
|
|
1295
1282
|
class: c(["border-t border-gray-200", S.value ? "gap-3 pt-3" : "gap-1.5 pt-1.5"])
|
|
1296
1283
|
}, [
|
|
1297
|
-
Ie.value > 1 ? (o(),
|
|
1284
|
+
Ie.value > 1 ? (o(), p("div", _a, [
|
|
1298
1285
|
v("div", null, [
|
|
1299
1286
|
v("p", Sa, _(s.value("ui.period_select.From date")), 1),
|
|
1300
1287
|
Me(v("input", {
|
|
@@ -1337,7 +1324,7 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
1337
1324
|
variant: "primary",
|
|
1338
1325
|
icon: M(it),
|
|
1339
1326
|
label: s.value("ui.period_select.Apply"),
|
|
1340
|
-
onClick:
|
|
1327
|
+
onClick: Ct,
|
|
1341
1328
|
disabled: !Ee.value,
|
|
1342
1329
|
class: c(i.value.actionButton),
|
|
1343
1330
|
size: i.value.actionButtonSize
|
|
@@ -1360,19 +1347,19 @@ const Ve = (a, u) => u("ui.period_select.date_short", {
|
|
|
1360
1347
|
], 4));
|
|
1361
1348
|
}
|
|
1362
1349
|
});
|
|
1363
|
-
const
|
|
1350
|
+
const Xa = /* @__PURE__ */ mt(za, [["__scopeId", "data-v-7a5e5043"]]);
|
|
1364
1351
|
export {
|
|
1365
1352
|
B as DATE_KIND,
|
|
1366
1353
|
ze as MANUAL_DATE_KEY,
|
|
1367
1354
|
oe as MANUAL_RANGE_KEY,
|
|
1368
|
-
|
|
1355
|
+
Xa as OnePeriodPicker,
|
|
1369
1356
|
ia as OnePeriodPickerFastModal,
|
|
1370
1357
|
la as PERIOD_KIND,
|
|
1371
|
-
|
|
1358
|
+
C as RANGE_KIND,
|
|
1372
1359
|
O as buildPreset,
|
|
1373
1360
|
ye as buildRollingOptions,
|
|
1374
1361
|
ct as createShortcutPresets,
|
|
1375
|
-
|
|
1362
|
+
tl as dayjs,
|
|
1376
1363
|
da as determineKind,
|
|
1377
1364
|
Ve as formatDateShort,
|
|
1378
1365
|
pt as formatPeriod,
|