vlite3 1.5.0 → 1.5.2
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/components/Button.vue.js +2 -2
- package/components/Button.vue2.js +10 -10
- package/components/CategoryManager/CategoryManager.vue2.js +3 -3
- package/components/Chart/GanttChart.vue.d.ts +92 -2
- package/components/Chart/GanttChart.vue.js +2 -2
- package/components/Chart/GanttChart.vue2.js +1028 -878
- package/components/Chart/GanttChartDateUtils.js +28 -24
- package/components/Chart/index.d.ts +1 -1
- package/components/Chart/types.d.ts +88 -1
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
- package/components/DataTable/DataTable.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Form/{AccordionView.vue.js → AccordionView.vue2.js} +1 -1
- package/components/Form/index.vue2.js +1 -1
- package/components/Kanban/Kanban.vue.d.ts +6 -5
- package/components/Kanban/Kanban.vue.js +1 -1
- package/components/Kanban/Kanban.vue2.js +139 -118
- package/components/Kanban/groupKanbanData.d.ts +36 -0
- package/components/Kanban/groupKanbanData.js +72 -0
- package/components/Kanban/index.d.ts +1 -0
- package/components/Kanban/types.d.ts +17 -0
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/PanZoomViewport/PanZoomViewport.vue.d.ts +1 -1
- package/components/RichTextEditor/RichTextEditor.vue.js +4 -4
- package/components/RichTextEditor/RichTextLinkPopover.vue3.js +2 -2
- package/components/RichTextEditor/RichTextToolbar.vue3.js +2 -2
- package/components/Screen/Screen.vue.js +80 -82
- package/components/Screen/ScreenFilter.vue.js +3 -3
- package/components/Screen/components/ScreenAddAction.vue.js +32 -32
- package/components/Screen/components/ScreenHeaderTitle.vue.js +11 -11
- package/components/Screen/components/ScreenToolbar.vue.d.ts +9 -0
- package/components/Screen/components/ScreenToolbar.vue.js +85 -52
- package/components/ToastNotification.vue.js +2 -2
- package/components/ToastNotification.vue2.js +38 -36
- package/index.js +426 -421
- package/package.json +1 -1
- package/style.css +10 -1
- /package/components/Dropdown/{DropdownMenu.vue2.js → DropdownMenu.vue3.js} +0 -0
- /package/components/RichTextEditor/{RichTextLinkPopover.vue2.js → RichTextLinkPopover.vue.js} +0 -0
- /package/components/RichTextEditor/{RichTextToolbar.vue2.js → RichTextToolbar.vue.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as A, computed as m, markRaw as y, resolveComponent as N, openBlock as n, createBlock as o, resolveDynamicComponent as P, createElementBlock as f, Fragment as k, mergeProps as e, withCtx as d, createVNode as B, createTextVNode as i, toDisplayString as r, createCommentVNode as s } from "vue";
|
|
2
2
|
import c from "../../Button.vue.js";
|
|
3
3
|
import V from "../../Modal.vue.js";
|
|
4
4
|
import { $t as g } from "../../../utils/i18n.js";
|
|
5
|
-
const D = ["href", "target"], F = /* @__PURE__ */
|
|
5
|
+
const D = ["href", "target"], F = /* @__PURE__ */ A({
|
|
6
6
|
__name: "ScreenAddAction",
|
|
7
7
|
props: {
|
|
8
8
|
canAdd: { type: Boolean },
|
|
@@ -13,92 +13,92 @@ const D = ["href", "target"], F = /* @__PURE__ */ x({
|
|
|
13
13
|
refetch: {}
|
|
14
14
|
},
|
|
15
15
|
emits: ["add"],
|
|
16
|
-
setup(t, { emit:
|
|
17
|
-
const a = t,
|
|
18
|
-
() => a.addComponent ?
|
|
19
|
-
),
|
|
20
|
-
() => a.addBtn?.modal ?
|
|
16
|
+
setup(t, { emit: x }) {
|
|
17
|
+
const a = t, C = x, v = m(
|
|
18
|
+
() => a.addComponent ? y(a.addComponent) : void 0
|
|
19
|
+
), b = m(
|
|
20
|
+
() => a.addBtn?.modal ? y(a.addBtn.modal) : void 0
|
|
21
21
|
), l = m(() => {
|
|
22
22
|
if (a.addBtn?.labelI18n) return g(a.addBtn.labelI18n);
|
|
23
23
|
if (a.addBtn?.label) return a.addBtn.label;
|
|
24
24
|
const u = g("vlite.screen.addNew");
|
|
25
25
|
return u !== "vlite.screen.addNew" ? u : "Add New";
|
|
26
26
|
});
|
|
27
|
-
return (u,
|
|
28
|
-
const
|
|
29
|
-
return v.value ? (
|
|
30
|
-
t.addBtn ? (
|
|
31
|
-
t.addBtn.modal ? (
|
|
27
|
+
return (u, w) => {
|
|
28
|
+
const h = N("router-link");
|
|
29
|
+
return v.value ? (n(), o(P(v.value), { key: 0 })) : t.canAdd ? (n(), f(k, { key: 1 }, [
|
|
30
|
+
t.addBtn ? (n(), f(k, { key: 0 }, [
|
|
31
|
+
t.addBtn.modal ? (n(), o(V, e({
|
|
32
32
|
key: 0,
|
|
33
|
-
body:
|
|
33
|
+
body: b.value
|
|
34
34
|
}, t.addBtn.modalProps, {
|
|
35
35
|
refetch: t.refetch,
|
|
36
36
|
data: t.data,
|
|
37
|
-
|
|
37
|
+
class: "w-full min-[900px]:w-auto!",
|
|
38
38
|
loading: t.loading
|
|
39
39
|
}), {
|
|
40
|
-
trigger:
|
|
40
|
+
trigger: d(() => [
|
|
41
41
|
B(c, e({
|
|
42
|
-
class: "w-full",
|
|
42
|
+
class: "w-full min-[900px]:w-auto!",
|
|
43
43
|
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
44
44
|
variant: t.addBtn.variant || "primary"
|
|
45
45
|
}, t.addBtn.buttonProps), {
|
|
46
|
-
default:
|
|
46
|
+
default: d(() => [
|
|
47
47
|
i(r(l.value), 1)
|
|
48
48
|
]),
|
|
49
49
|
_: 1
|
|
50
50
|
}, 16, ["icon", "variant"])
|
|
51
51
|
]),
|
|
52
52
|
_: 1
|
|
53
|
-
}, 16, ["body", "refetch", "data", "loading"])) : t.addBtn.to ? (
|
|
53
|
+
}, 16, ["body", "refetch", "data", "loading"])) : t.addBtn.to ? (n(), o(h, {
|
|
54
54
|
key: 1,
|
|
55
55
|
to: t.addBtn.to,
|
|
56
|
-
class: "inline-flex w-full
|
|
56
|
+
class: "inline-flex w-full min-[900px]:w-auto"
|
|
57
57
|
}, {
|
|
58
|
-
default:
|
|
58
|
+
default: d(() => [
|
|
59
59
|
B(c, e({
|
|
60
|
-
class: "w-full",
|
|
60
|
+
class: "w-full min-[900px]:w-auto!",
|
|
61
61
|
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
62
62
|
variant: t.addBtn.variant || "primary"
|
|
63
63
|
}, t.addBtn.buttonProps), {
|
|
64
|
-
default:
|
|
64
|
+
default: d(() => [
|
|
65
65
|
i(r(l.value), 1)
|
|
66
66
|
]),
|
|
67
67
|
_: 1
|
|
68
68
|
}, 16, ["icon", "variant"])
|
|
69
69
|
]),
|
|
70
70
|
_: 1
|
|
71
|
-
}, 8, ["to"])) : t.addBtn.href ? (
|
|
71
|
+
}, 8, ["to"])) : t.addBtn.href ? (n(), f("a", {
|
|
72
72
|
key: 2,
|
|
73
73
|
href: t.addBtn.href,
|
|
74
74
|
target: t.addBtn.target,
|
|
75
|
-
class: "inline-flex w-full
|
|
75
|
+
class: "inline-flex w-full min-[900px]:w-auto"
|
|
76
76
|
}, [
|
|
77
77
|
B(c, e({
|
|
78
|
-
class: "w-full",
|
|
78
|
+
class: "w-full min-[900px]:w-auto!",
|
|
79
79
|
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
80
80
|
variant: t.addBtn.variant || "primary"
|
|
81
81
|
}, t.addBtn.buttonProps), {
|
|
82
|
-
default:
|
|
82
|
+
default: d(() => [
|
|
83
83
|
i(r(l.value), 1)
|
|
84
84
|
]),
|
|
85
85
|
_: 1
|
|
86
86
|
}, 16, ["icon", "variant"])
|
|
87
|
-
], 8, D)) : (
|
|
87
|
+
], 8, D)) : (n(), o(c, e({
|
|
88
88
|
key: 3,
|
|
89
|
-
class: "w-full
|
|
89
|
+
class: "w-full min-[900px]:w-auto!",
|
|
90
90
|
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
91
91
|
variant: t.addBtn.variant || "primary"
|
|
92
92
|
}, t.addBtn.buttonProps, {
|
|
93
|
-
onClick:
|
|
93
|
+
onClick: w[0] || (w[0] = (I) => t.addBtn.onClick ? t.addBtn.onClick() : C("add"))
|
|
94
94
|
}), {
|
|
95
|
-
default:
|
|
95
|
+
default: d(() => [
|
|
96
96
|
i(r(l.value), 1)
|
|
97
97
|
]),
|
|
98
98
|
_: 1
|
|
99
99
|
}, 16, ["icon", "variant"]))
|
|
100
|
-
], 64)) :
|
|
101
|
-
], 64)) :
|
|
100
|
+
], 64)) : s("", !0)
|
|
101
|
+
], 64)) : s("", !0);
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as p, computed as c, openBlock as n, createElementBlock as o, renderSlot as a, createElementVNode as u, normalizeClass as d, toDisplayString as m, createBlock as x, withCtx as
|
|
1
|
+
import { defineComponent as p, computed as c, openBlock as n, createElementBlock as o, renderSlot as a, createElementVNode as u, normalizeClass as d, toDisplayString as m, createBlock as x, withCtx as I, createVNode as h, createCommentVNode as i } from "vue";
|
|
2
2
|
import C from "../../Icon.vue.js";
|
|
3
3
|
import g from "../../Tooltip.vue.js";
|
|
4
4
|
import { $t as f } from "../../../utils/i18n.js";
|
|
5
|
-
const
|
|
5
|
+
const v = { class: "flex flex-col min-w-0" }, y = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "flex items-center! gap-2"
|
|
8
8
|
}, S = /* @__PURE__ */ p({
|
|
@@ -18,12 +18,12 @@ const k = { class: "flex flex-col shrink-0" }, v = {
|
|
|
18
18
|
descriptionClass: {}
|
|
19
19
|
},
|
|
20
20
|
setup(t) {
|
|
21
|
-
const e = t, s = c(() => e.titleI18n ? f(e.titleI18n) : e.title),
|
|
21
|
+
const e = t, s = c(() => e.titleI18n ? f(e.titleI18n) : e.title), l = c(
|
|
22
22
|
() => e.descriptionI18n ? f(e.descriptionI18n) : e.description
|
|
23
23
|
);
|
|
24
|
-
return (
|
|
25
|
-
a(
|
|
26
|
-
s.value ? (n(), o("div",
|
|
24
|
+
return (r, k) => (n(), o("div", v, [
|
|
25
|
+
a(r.$slots, "title", {}, () => [
|
|
26
|
+
s.value ? (n(), o("div", y, [
|
|
27
27
|
u("h1", {
|
|
28
28
|
class: d(["text-fs-7.5 font-bold text-foreground", t.titleClass])
|
|
29
29
|
}, m(s.value), 3),
|
|
@@ -33,8 +33,8 @@ const k = { class: "flex flex-col shrink-0" }, v = {
|
|
|
33
33
|
"content-i18n": t.infoI18n,
|
|
34
34
|
placement: "right"
|
|
35
35
|
}, {
|
|
36
|
-
default:
|
|
37
|
-
|
|
36
|
+
default: I(() => [
|
|
37
|
+
h(C, {
|
|
38
38
|
icon: "lucide:info",
|
|
39
39
|
class: "w-[18px] h-[18px] mt-3! text-muted-foreground hover:text-foreground cursor-pointer transition-colors outline-none"
|
|
40
40
|
})
|
|
@@ -43,11 +43,11 @@ const k = { class: "flex flex-col shrink-0" }, v = {
|
|
|
43
43
|
}, 8, ["content", "content-i18n"])) : i("", !0)
|
|
44
44
|
])) : i("", !0)
|
|
45
45
|
]),
|
|
46
|
-
a(
|
|
47
|
-
|
|
46
|
+
a(r.$slots, "description", {}, () => [
|
|
47
|
+
l.value ? (n(), o("p", {
|
|
48
48
|
key: 0,
|
|
49
49
|
class: d(["text-sm text-gray-700 mt-1 md:max-w-[450px]", t.descriptionClass])
|
|
50
|
-
}, m(
|
|
50
|
+
}, m(l.value), 3)) : i("", !0)
|
|
51
51
|
])
|
|
52
52
|
]));
|
|
53
53
|
}
|
|
@@ -24,6 +24,15 @@ type __VLS_Props = {
|
|
|
24
24
|
exportProps?: any;
|
|
25
25
|
importProps?: any;
|
|
26
26
|
screenState: any;
|
|
27
|
+
/**
|
|
28
|
+
* Layout mode.
|
|
29
|
+
* - `false` (default): "header" mode — the two logical groups are emitted as
|
|
30
|
+
* sibling flex items (via a `display:contents` wrapper) so the parent header
|
|
31
|
+
* grid can reflow them across breakpoints (see Screen.vue variant one).
|
|
32
|
+
* - `true`: "inline" mode — the groups render inside a self-contained flex row,
|
|
33
|
+
* used by variant two where the toolbar sits next to the quick-filters.
|
|
34
|
+
*/
|
|
35
|
+
inline?: boolean;
|
|
27
36
|
};
|
|
28
37
|
declare function __VLS_template(): {
|
|
29
38
|
attrs: Partial<{}>;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as b, useSlots as R, computed as i, openBlock as o, createElementBlock as m, normalizeClass as s, createBlock as d, createCommentVNode as r, renderSlot as c, normalizeProps as f, guardReactiveProps as h, createVNode as w, createElementVNode as P } from "vue";
|
|
2
|
+
import y from "../../Button.vue.js";
|
|
3
|
+
import A from "../../Input.vue.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
-
key: 4,
|
|
11
|
-
class: "w-full md:w-60! max-sm:order-last"
|
|
12
|
-
}, k = { class: "flex items-center gap-3 max-sm:w-full sm:w-auto max-sm:order-last" }, E = /* @__PURE__ */ h({
|
|
5
|
+
import D from "./ScreenViewToggle.vue.js";
|
|
6
|
+
import E from "../ScreenFilter.vue.js";
|
|
7
|
+
import F from "./ScreenAddAction.vue.js";
|
|
8
|
+
import z from "./ScreenOptionsDropdown.vue.js";
|
|
9
|
+
const W = /* @__PURE__ */ b({
|
|
13
10
|
__name: "ScreenToolbar",
|
|
14
11
|
props: {
|
|
15
12
|
selectedRows: {},
|
|
@@ -36,28 +33,53 @@ const g = { class: "flex items-center gap-2 w-full sm:w-auto flex-1 md:flex-none
|
|
|
36
33
|
hasExportOrImport: { type: Boolean },
|
|
37
34
|
exportProps: {},
|
|
38
35
|
importProps: {},
|
|
39
|
-
screenState: {}
|
|
36
|
+
screenState: {},
|
|
37
|
+
inline: { type: Boolean }
|
|
40
38
|
},
|
|
41
39
|
emits: ["update:activeView", "update:activeFilters", "update:searchQuery", "delete", "refresh", "add", "select-dropdown"],
|
|
42
40
|
setup(e) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
const t = e, u = R(), p = i(
|
|
42
|
+
() => t.selectedRows.length > 0 && !t.hideSelectable && !t.hideDeleteBtn
|
|
43
|
+
), v = i(() => !!t.filterSchema && t.filterSchema.length > 0), x = i(
|
|
44
|
+
() => p.value || t.hasMultipleViews || !!u["before-search"] || !!t.showRefresh || v.value || !!t.canSearch
|
|
45
|
+
), S = i(
|
|
46
|
+
() => !!u.actions || !!t.addComponent || !!t.canAdd && !!t.addBtn
|
|
47
|
+
), g = i(
|
|
48
|
+
() => S.value || !!t.hasExportOrImport || !!u["after-add"]
|
|
49
|
+
), k = i(
|
|
50
|
+
() => t.inline ? "flex flex-col sm:flex-row items-stretch sm:items-center gap-2.5 w-full lg:w-auto justify-end" : "contents"
|
|
51
|
+
), $ = i(
|
|
52
|
+
() => t.inline ? "flex items-center gap-2.5 w-full sm:w-auto min-w-0" : "order-2 min-[900px]:order-3 min-[1250px]:order-2 min-[900px]:col-span-2 min-[1250px]:col-span-1 flex items-center gap-2.5 min-w-0"
|
|
53
|
+
), B = i(
|
|
54
|
+
() => t.inline ? "flex items-center gap-3 shrink-0 w-full sm:w-auto justify-end" : "order-3 min-[900px]:order-2 min-[1250px]:order-3 flex items-center gap-3 shrink-0 justify-end"
|
|
55
|
+
), V = i(
|
|
56
|
+
() => t.inline ? "flex-1 sm:flex-none sm:w-56 lg:w-60 min-w-0" : "flex-1 min-w-0 min-[1250px]:flex-none min-[1250px]:w-60"
|
|
57
|
+
), C = i(
|
|
58
|
+
() => t.inline ? "w-full sm:w-auto" : "flex-1 min-[900px]:flex-none min-w-0"
|
|
59
|
+
);
|
|
60
|
+
return (a, l) => (o(), m("div", {
|
|
61
|
+
class: s(k.value)
|
|
62
|
+
}, [
|
|
63
|
+
x.value ? (o(), m("div", {
|
|
64
|
+
key: 0,
|
|
65
|
+
class: s($.value)
|
|
66
|
+
}, [
|
|
67
|
+
p.value ? (o(), d(y, {
|
|
46
68
|
key: 0,
|
|
47
69
|
variant: "outline",
|
|
48
70
|
class: "hover:bg-destructive/10 shrink-0 h-9! w-9!",
|
|
49
71
|
icon: "lucide:trash-2",
|
|
50
72
|
title: e.txtDeleteSelected,
|
|
51
|
-
onClick:
|
|
52
|
-
}, null, 8, ["title"])) :
|
|
53
|
-
e.hasMultipleViews ? (o(),
|
|
73
|
+
onClick: l[0] || (l[0] = (n) => a.$emit("delete", e.selectedRows))
|
|
74
|
+
}, null, 8, ["title"])) : r("", !0),
|
|
75
|
+
e.hasMultipleViews ? (o(), d(D, {
|
|
54
76
|
key: 1,
|
|
55
77
|
"model-value": e.activeView,
|
|
56
|
-
"onUpdate:modelValue":
|
|
78
|
+
"onUpdate:modelValue": l[1] || (l[1] = (n) => a.$emit("update:activeView", n)),
|
|
57
79
|
views: e.resolvedViews
|
|
58
|
-
}, null, 8, ["model-value", "views"])) :
|
|
59
|
-
|
|
60
|
-
e.showRefresh ? (o(),
|
|
80
|
+
}, null, 8, ["model-value", "views"])) : r("", !0),
|
|
81
|
+
c(a.$slots, "before-search", f(h(e.screenState))),
|
|
82
|
+
e.showRefresh ? (o(), d(y, {
|
|
61
83
|
key: 2,
|
|
62
84
|
variant: "outline",
|
|
63
85
|
icon: "lucide:refresh-cw",
|
|
@@ -65,52 +87,63 @@ const g = { class: "flex items-center gap-2 w-full sm:w-auto flex-1 md:flex-none
|
|
|
65
87
|
class: "shrink-0 h-9! w-9!",
|
|
66
88
|
title: e.txtRefresh,
|
|
67
89
|
disabled: e.loading,
|
|
68
|
-
onClick:
|
|
69
|
-
}, null, 8, ["title", "disabled"])) :
|
|
70
|
-
|
|
90
|
+
onClick: l[2] || (l[2] = (n) => a.$emit("refresh"))
|
|
91
|
+
}, null, 8, ["title", "disabled"])) : r("", !0),
|
|
92
|
+
v.value ? (o(), d(E, {
|
|
71
93
|
key: 3,
|
|
72
94
|
schema: e.filterSchema,
|
|
73
95
|
type: e.filterType,
|
|
74
96
|
"model-value": e.activeFilters,
|
|
75
|
-
"onUpdate:modelValue":
|
|
76
|
-
onChange:
|
|
77
|
-
}, null, 8, ["schema", "type", "model-value"])) :
|
|
78
|
-
e.canSearch ? (o(), m("div",
|
|
79
|
-
|
|
97
|
+
"onUpdate:modelValue": l[3] || (l[3] = (n) => a.$emit("update:activeFilters", n)),
|
|
98
|
+
onChange: l[4] || (l[4] = (n) => a.$emit("refresh"))
|
|
99
|
+
}, null, 8, ["schema", "type", "model-value"])) : r("", !0),
|
|
100
|
+
e.canSearch ? (o(), m("div", {
|
|
101
|
+
key: 4,
|
|
102
|
+
class: s(V.value)
|
|
103
|
+
}, [
|
|
104
|
+
w(A, {
|
|
80
105
|
lazy: "",
|
|
81
106
|
"model-value": e.searchQuery,
|
|
82
|
-
"onUpdate:modelValue":
|
|
107
|
+
"onUpdate:modelValue": l[5] || (l[5] = (n) => a.$emit("update:searchQuery", String(n))),
|
|
83
108
|
icon: "lucide:search",
|
|
84
109
|
placeholder: e.txtSearch,
|
|
85
110
|
variant: "outline",
|
|
86
111
|
class: "bg-background w-full",
|
|
87
112
|
"show-clear-button": !0
|
|
88
113
|
}, null, 8, ["model-value", "placeholder"])
|
|
89
|
-
])) :
|
|
90
|
-
]),
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
114
|
+
], 2)) : r("", !0)
|
|
115
|
+
], 2)) : r("", !0),
|
|
116
|
+
g.value ? (o(), m("div", {
|
|
117
|
+
key: 1,
|
|
118
|
+
class: s(B.value)
|
|
119
|
+
}, [
|
|
120
|
+
P("div", {
|
|
121
|
+
class: s(C.value)
|
|
122
|
+
}, [
|
|
123
|
+
c(a.$slots, "actions", f(h(e.screenState)), () => [
|
|
124
|
+
w(F, {
|
|
125
|
+
"can-add": e.canAdd,
|
|
126
|
+
"add-component": e.addComponent,
|
|
127
|
+
"add-btn": e.addBtn,
|
|
128
|
+
loading: e.loading,
|
|
129
|
+
data: e.data,
|
|
130
|
+
refetch: e.refetch,
|
|
131
|
+
onAdd: l[6] || (l[6] = (n) => a.$emit("add"))
|
|
132
|
+
}, null, 8, ["can-add", "add-component", "add-btn", "loading", "data", "refetch"])
|
|
133
|
+
])
|
|
134
|
+
], 2),
|
|
135
|
+
e.hasExportOrImport ? (o(), d(z, {
|
|
104
136
|
key: 0,
|
|
137
|
+
class: "shrink-0",
|
|
105
138
|
"export-props": e.exportProps,
|
|
106
139
|
"import-props": e.importProps,
|
|
107
|
-
onSelect:
|
|
108
|
-
}, null, 8, ["export-props", "import-props"])) :
|
|
109
|
-
|
|
110
|
-
])
|
|
111
|
-
]));
|
|
140
|
+
onSelect: l[7] || (l[7] = (n) => a.$emit("select-dropdown", n))
|
|
141
|
+
}, null, 8, ["export-props", "import-props"])) : r("", !0),
|
|
142
|
+
c(a.$slots, "after-add", f(h(e.screenState)))
|
|
143
|
+
], 2)) : r("", !0)
|
|
144
|
+
], 2));
|
|
112
145
|
}
|
|
113
146
|
});
|
|
114
147
|
export {
|
|
115
|
-
|
|
148
|
+
W as default
|
|
116
149
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ToastNotification.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7ea251ae"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as P, ref as Y, onUnmounted as F, openBlock as
|
|
1
|
+
import { defineComponent as P, ref as Y, onUnmounted as F, openBlock as s, createElementBlock as a, createBlock as y, Teleport as U, Fragment as v, renderList as w, createElementVNode as m, normalizeClass as f, createVNode as k, TransitionGroup as q, withCtx as _, unref as H, isMemoSame as J, normalizeStyle as K, toDisplayString as p, createCommentVNode as T, createTextVNode as Q } from "vue";
|
|
2
2
|
import R from "./Icon.vue.js";
|
|
3
3
|
import { useNotifications as W } from "../composables/useNotifications.js";
|
|
4
4
|
import X from "./Button.vue.js";
|
|
@@ -8,13 +8,13 @@ const Z = {
|
|
|
8
8
|
}, ee = { class: "flex-1 min-w-0" }, te = { class: "text-sm font-medium leading-tight mt-0.5" }, re = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "text-sm mt-1 leading-relaxed opacity-90"
|
|
11
|
-
},
|
|
11
|
+
}, oe = 3, C = 14, ce = /* @__PURE__ */ P({
|
|
12
12
|
__name: "ToastNotification",
|
|
13
13
|
props: {
|
|
14
14
|
position: {},
|
|
15
15
|
expand: { type: Boolean }
|
|
16
16
|
},
|
|
17
|
-
setup(
|
|
17
|
+
setup(se) {
|
|
18
18
|
const { notifications: B, removeToast: z, globalConfig: b, pauseTimers: S, resumeTimers: V } = W(), c = Y(!1), $ = [
|
|
19
19
|
"top-left",
|
|
20
20
|
"top-center",
|
|
@@ -29,9 +29,9 @@ const Z = {
|
|
|
29
29
|
"bottom-left": "bottom-2.5 left-0",
|
|
30
30
|
"bottom-center": "bottom-2.5 left-1/2 -translate-x-1/2",
|
|
31
31
|
"bottom-right": "bottom-2.5 right-0"
|
|
32
|
-
}, E = (e,
|
|
32
|
+
}, E = (e, o, t) => {
|
|
33
33
|
const r = t.includes("bottom"), l = c.value || b.value.expand;
|
|
34
|
-
if (!(e <
|
|
34
|
+
if (!(e < oe) && !l)
|
|
35
35
|
return {
|
|
36
36
|
opacity: 0,
|
|
37
37
|
pointerEvents: "none",
|
|
@@ -42,32 +42,34 @@ const Z = {
|
|
|
42
42
|
return {
|
|
43
43
|
transform: `translate3d(0, ${e * ((r ? -1 : 1) * (100 + C))}%, 0) scale(1)`,
|
|
44
44
|
opacity: 1,
|
|
45
|
-
zIndex:
|
|
45
|
+
zIndex: o - e
|
|
46
46
|
};
|
|
47
|
-
const
|
|
47
|
+
const i = 1 - e * 0.05, u = r ? -1 : 1;
|
|
48
48
|
return {
|
|
49
|
-
transform: `translate3d(0, ${e * C * u}px, -${e}px) scale(${
|
|
49
|
+
transform: `translate3d(0, ${e * C * u}px, -${e}px) scale(${i})`,
|
|
50
50
|
opacity: 1,
|
|
51
|
-
zIndex:
|
|
51
|
+
zIndex: o - e
|
|
52
52
|
};
|
|
53
|
-
}, I = (e,
|
|
53
|
+
}, I = (e, o) => o !== 0 ? {} : {
|
|
54
54
|
"--entrance-offset": e.includes("bottom") ? "25px" : "-25px",
|
|
55
55
|
"--entrance-opacity": "0.6"
|
|
56
56
|
}, M = (e) => {
|
|
57
57
|
e.action && (e.action.onClick(), z(e.id));
|
|
58
|
-
},
|
|
58
|
+
}, x = {
|
|
59
59
|
error: "lucide:octagon-x",
|
|
60
60
|
success: "lucide:circle-check",
|
|
61
61
|
info: "lucide:info",
|
|
62
62
|
warning: "lucide:triangle-alert",
|
|
63
63
|
default: "lucide:bell"
|
|
64
|
-
},
|
|
64
|
+
}, h = {
|
|
65
65
|
default: "bg-gray-100 border-border text-foreground shadow-lg",
|
|
66
66
|
success: "bg-success text-success-fg border-success-fg/30 dark:border-success-fg/10 shadow-lg",
|
|
67
67
|
error: "bg-danger text-danger-fg border-danger-fg/30 dark:border-danger-fg/10 shadow-lg",
|
|
68
|
-
warning
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
// Solid warning + warning-fg (white) — warning-light + warning-fg was unreadable
|
|
69
|
+
// (cream bg + white text). Matches success/error contrast pattern.
|
|
70
|
+
warning: "bg-warning text-warning-fg border-warning-fg/30 dark:border-warning-fg/10 shadow-lg",
|
|
71
|
+
info: "bg-info text-info-fg border-info-fg/30 dark:border-info-fg/10 shadow-lg"
|
|
72
|
+
}, D = (e) => h[e] || h.default;
|
|
71
73
|
let n = null;
|
|
72
74
|
const O = () => {
|
|
73
75
|
n && (clearTimeout(n), n = null), c.value = !0, S();
|
|
@@ -80,14 +82,14 @@ const Z = {
|
|
|
80
82
|
n && clearTimeout(n);
|
|
81
83
|
});
|
|
82
84
|
const A = (e) => {
|
|
83
|
-
const
|
|
84
|
-
return `${
|
|
85
|
+
const o = e.includes("bottom") ? "bottom" : "top", t = e.includes("right") ? "right" : e.includes("left") ? "left" : "center";
|
|
86
|
+
return `${o} ${t}`;
|
|
85
87
|
};
|
|
86
|
-
return (e,
|
|
87
|
-
(
|
|
88
|
-
(
|
|
88
|
+
return (e, o) => (s(), a("div", Z, [
|
|
89
|
+
(s(), y(U, { to: "body" }, [
|
|
90
|
+
(s(), a(v, null, w($, (t) => m("div", {
|
|
89
91
|
key: t,
|
|
90
|
-
class:
|
|
92
|
+
class: f(["fixed z-[9999999999]! pointer-events-none px-4 flex flex-col gap-2 transition-all duration-300 max-w-full sm:max-w-120", [
|
|
91
93
|
N[t],
|
|
92
94
|
t.includes("center") ? "items-center" : t.includes("right") ? "items-end" : "items-start"
|
|
93
95
|
]]),
|
|
@@ -95,18 +97,18 @@ const Z = {
|
|
|
95
97
|
onMouseleave: j
|
|
96
98
|
}, [
|
|
97
99
|
m("div", {
|
|
98
|
-
class:
|
|
100
|
+
class: f(["relative w-full transition-all", [{ "flex-col-reverse": t.includes("top") }]])
|
|
99
101
|
}, [
|
|
100
|
-
|
|
102
|
+
k(q, {
|
|
101
103
|
name: d(t).length <= 1 ? "first-toast" : "stack-toast",
|
|
102
104
|
tag: "div",
|
|
103
|
-
class:
|
|
105
|
+
class: f(["w-full grid grid-cols-1 grid-rows-1", [
|
|
104
106
|
t.includes("center") ? "justify-items-center" : t.includes("right") ? "justify-items-end" : "justify-items-start"
|
|
105
107
|
]]),
|
|
106
108
|
style: { "min-height": "20px" }
|
|
107
109
|
}, {
|
|
108
|
-
default:
|
|
109
|
-
(
|
|
110
|
+
default: _(() => [
|
|
111
|
+
(s(!0), a(v, null, w(d(t), (r, l, L, i) => {
|
|
110
112
|
const u = [
|
|
111
113
|
r,
|
|
112
114
|
l,
|
|
@@ -114,10 +116,10 @@ const Z = {
|
|
|
114
116
|
c.value,
|
|
115
117
|
H(b).expand
|
|
116
118
|
];
|
|
117
|
-
if (
|
|
118
|
-
const
|
|
119
|
+
if (i && i.key === r.id && J(i, u)) return i;
|
|
120
|
+
const g = (s(), a("div", {
|
|
119
121
|
key: r.id,
|
|
120
|
-
class:
|
|
122
|
+
class: f(["toast-item pointer-events-auto col-start-1 h-max row-start-1 mb-1 w-auto border pl-4 pr-6 py-2.5 flex gap-2.5 items-start transition-all duration-300 ease-[cubic-bezier(0.16,1,0.3,1)] transform-gpu", [
|
|
121
123
|
D(r.type),
|
|
122
124
|
r.description || r.action ? "rounded-xl" : "rounded-full"
|
|
123
125
|
]]),
|
|
@@ -130,15 +132,15 @@ const Z = {
|
|
|
130
132
|
}
|
|
131
133
|
])
|
|
132
134
|
}, [
|
|
133
|
-
|
|
134
|
-
icon:
|
|
135
|
+
k(R, {
|
|
136
|
+
icon: x[r.type] || x.default,
|
|
135
137
|
class: "w-5 h-5 shrink-0 mt-0.5"
|
|
136
138
|
}, null, 8, ["icon"]),
|
|
137
139
|
m("div", ee, [
|
|
138
140
|
m("p", te, p(r.message), 1),
|
|
139
|
-
r.description ? (
|
|
141
|
+
r.description ? (s(), a("p", re, p(r.description), 1)) : T("", !0)
|
|
140
142
|
]),
|
|
141
|
-
r.action ? (
|
|
143
|
+
r.action ? (s(), y(X, {
|
|
142
144
|
key: 0,
|
|
143
145
|
type: "button",
|
|
144
146
|
size: "xs",
|
|
@@ -146,14 +148,14 @@ const Z = {
|
|
|
146
148
|
class: "ml-2 shrink-0 h-8 px-3 text-xs bg-transparent border-current/20 hover:bg-black/5 dark:hover:bg-white/10",
|
|
147
149
|
onClick: (G) => M(r)
|
|
148
150
|
}, {
|
|
149
|
-
default:
|
|
151
|
+
default: _(() => [
|
|
150
152
|
Q(p(r.action.label), 1)
|
|
151
153
|
]),
|
|
152
154
|
_: 2
|
|
153
155
|
}, 1032, ["onClick"])) : T("", !0)
|
|
154
156
|
], 6));
|
|
155
|
-
return
|
|
156
|
-
},
|
|
157
|
+
return g.memo = u, g;
|
|
158
|
+
}, o, 0), 128))
|
|
157
159
|
]),
|
|
158
160
|
_: 2
|
|
159
161
|
}, 1032, ["name", "class"])
|