vlite3 0.8.11 → 0.9.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/AttachmentsList/AttachmentsList.vue.d.ts +6 -0
- package/components/AttachmentsList/AttachmentsList.vue.js +82 -0
- package/components/AttachmentsList/AttachmentsList.vue2.js +4 -0
- package/components/AttachmentsList/index.d.ts +2 -0
- package/components/AttachmentsList/types.d.ts +11 -0
- package/components/Button.vue.js +6 -6
- package/components/Chat/ChatBubble.vue.d.ts +18 -0
- package/components/Chat/ChatInterface.vue.d.ts +45 -0
- package/components/Chat/index.d.ts +2 -0
- package/components/DataList/DataList.vue.d.ts +1 -1
- package/components/DataTable/DataTable.vue.d.ts +3 -3
- package/components/DataTable/DataTable.vue.js +22 -22
- package/components/DataTable/types.d.ts +1 -1
- package/components/DatePicker.vue.d.ts +3 -2
- package/components/DatePicker.vue.js +1 -1
- package/components/Dropdown/Dropdown.vue.d.ts +2 -0
- package/components/Dropdown/Dropdown.vue.js +106 -90
- package/components/Dropdown/DropdownItem.vue.js +8 -8
- package/components/Dropdown/DropdownMenu.vue.js +2 -2
- package/components/Dropdown/DropdownMenu.vue2.js +1 -1
- package/components/ExportData/ExportData.vue.d.ts +1 -1
- package/components/FilePicker/FilePicker.vue.d.ts +4 -1
- package/components/FilePicker/FilePicker.vue.js +189 -139
- package/components/FilePreview/FilePreview.vue.d.ts +5 -0
- package/components/FilePreview/FilePreview.vue.js +27 -0
- package/components/FilePreview/FilePreview.vue2.js +4 -0
- package/components/FilePreview/index.d.ts +2 -0
- package/components/FilePreview/types.d.ts +5 -0
- package/components/Form/FormField.vue.js +3 -1
- package/components/Form/composables/useForm.js +50 -47
- package/components/Input.vue.d.ts +1 -0
- package/components/Input.vue.js +18 -15
- package/components/Modal.vue.js +2 -2
- package/components/Modal.vue2.js +31 -31
- package/components/MultiSelect/MultiSelect.vue.js +92 -84
- package/components/Navbar/Navbar.vue.js +61 -60
- package/components/Screen/Screen.vue.d.ts +200 -7
- package/components/Screen/Screen.vue.js +306 -502
- package/components/Screen/ScreenFilter.vue.js +45 -42
- package/components/Screen/components/ScreenAddAction.vue.d.ts +15 -0
- package/components/Screen/components/ScreenAddAction.vue.js +107 -0
- package/components/Screen/components/ScreenAddAction.vue2.js +4 -0
- package/components/Screen/components/ScreenEmptyState.vue.d.ts +14 -0
- package/components/Screen/components/ScreenEmptyState.vue.js +105 -0
- package/components/Screen/components/ScreenEmptyState.vue2.js +4 -0
- package/components/Screen/components/ScreenExportModal.vue.d.ts +49 -0
- package/components/Screen/components/ScreenExportModal.vue.js +83 -0
- package/components/Screen/components/ScreenExportModal.vue2.js +4 -0
- package/components/Screen/components/ScreenHeaderTitle.vue.d.ts +28 -0
- package/components/Screen/components/ScreenHeaderTitle.vue.js +57 -0
- package/components/Screen/components/ScreenHeaderTitle.vue2.js +4 -0
- package/components/Screen/components/ScreenOptionsDropdown.vue.d.ts +10 -0
- package/components/Screen/components/ScreenOptionsDropdown.vue.js +43 -0
- package/components/Screen/components/ScreenOptionsDropdown.vue2.js +4 -0
- package/components/Screen/components/ScreenQuickFilters.vue.d.ts +15 -0
- package/components/Screen/components/ScreenQuickFilters.vue.js +36 -0
- package/components/Screen/components/ScreenQuickFilters.vue2.js +4 -0
- package/components/Screen/components/ScreenViewToggle.vue.d.ts +9 -0
- package/components/Screen/components/ScreenViewToggle.vue.js +48 -0
- package/components/Screen/components/ScreenViewToggle.vue2.js +4 -0
- package/components/Screen/index.d.ts +1 -0
- package/components/Screen/types.d.ts +41 -2
- package/components/SidePanel.vue.js +1 -1
- package/components/SidePanel.vue2.js +7 -7
- package/components/SidebarMenu/SidebarMenu.vue.js +1 -1
- package/components/Stats/Stats.vue.js +50 -49
- package/components/StatusChip/StatusChip.vue.d.ts +2 -2
- package/components/StatusChip/StatusChip.vue.js +15 -14
- package/components/StatusChip/status-map.d.ts +2 -1
- package/components/StatusChip/status-map.js +16 -6
- package/components/Tabes/Tabes.vue.d.ts +1 -1
- package/components/Tabes/Tabes.vue.js +5 -143
- package/components/Tabes/Tabes.vue2.js +144 -2
- package/components/Timeline/TimelineIndicator.vue.js +6 -6
- package/components/Workbook/Sheet.vue.d.ts +1 -1
- package/core/config.d.ts +8 -0
- package/core/config.js +10 -6
- package/core/index.js +28 -20
- package/index.d.ts +2 -0
- package/index.js +209 -203
- package/package.json +3 -2
- package/style.css +80 -6
- package/types/config.type.d.ts +10 -0
- package/types/form.type.d.ts +1 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as B, ref as M, computed as d, openBlock as i, createBlock as n, withCtx as o, createElementVNode as l, createVNode as a, unref as w, toDisplayString as v, withModifiers as F, setBlockTracking as C, createElementBlock as S } from "vue";
|
|
2
2
|
import f from "../Button.vue.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import j from "../Modal.vue.js";
|
|
4
|
+
import z from "../Dropdown/Dropdown.vue.js";
|
|
5
5
|
import h from "../Icon.vue.js";
|
|
6
|
-
import { $t as
|
|
6
|
+
import { $t as y } from "../../utils/i18n.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
|
-
import
|
|
9
|
+
import O from "../Form/Form.vue.js";
|
|
10
10
|
/* empty css */
|
|
11
11
|
import "v-datepicker-lite";
|
|
12
12
|
import "v-datepicker-lite/style.css";
|
|
@@ -18,7 +18,10 @@ import "iconify-icon-picker/style.css";
|
|
|
18
18
|
/* empty css */
|
|
19
19
|
/* empty css */
|
|
20
20
|
import "../../core/config.js";
|
|
21
|
-
const
|
|
21
|
+
const A = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }, E = { style: { "will-change": "transform", contain: "layout style" } }, I = {
|
|
22
|
+
class: "py-4 px-3.5 min-w-[290px]",
|
|
23
|
+
style: { "will-change": "transform", contain: "layout style" }
|
|
24
|
+
}, le = /* @__PURE__ */ B({
|
|
22
25
|
__name: "ScreenFilter",
|
|
23
26
|
props: {
|
|
24
27
|
schema: {},
|
|
@@ -26,45 +29,45 @@ const z = { class: "" }, B = { class: "py-4 px-3.5 min-w-[290px]" }, Z = /* @__P
|
|
|
26
29
|
type: { default: "modal" }
|
|
27
30
|
},
|
|
28
31
|
emits: ["update:modelValue", "change"],
|
|
29
|
-
setup(r, { emit:
|
|
30
|
-
const u = r, m =
|
|
32
|
+
setup(r, { emit: $ }) {
|
|
33
|
+
const u = r, m = $, s = M(!1), p = d(() => u.modelValue ? Object.keys(u.modelValue).filter(
|
|
31
34
|
(e) => u.modelValue[e] !== "" && u.modelValue[e] !== null && u.modelValue[e] !== void 0
|
|
32
35
|
).length : 0), k = (e) => {
|
|
33
36
|
m("update:modelValue", e.values), m("change", e.values), s.value = !1;
|
|
34
|
-
},
|
|
37
|
+
}, x = () => {
|
|
35
38
|
m("update:modelValue", {}), m("change", {});
|
|
36
39
|
}, g = d(() => {
|
|
37
|
-
const e =
|
|
40
|
+
const e = y("vlite.screen.filters");
|
|
38
41
|
return e !== "vlite.screen.filters" ? e : "Filters";
|
|
39
42
|
}), b = d(() => {
|
|
40
|
-
const e =
|
|
43
|
+
const e = y("vlite.screen.applyFilters");
|
|
41
44
|
return e !== "vlite.screen.applyFilters" ? e : "Apply Filters";
|
|
42
45
|
}), V = d(() => {
|
|
43
|
-
const e =
|
|
46
|
+
const e = y("vlite.screen.filter");
|
|
44
47
|
return e !== "vlite.screen.filter" ? e : "Filter";
|
|
45
48
|
});
|
|
46
|
-
return (e, t) => r.type === "modal" ? (
|
|
49
|
+
return (e, t) => r.type === "modal" ? (i(), n(j, {
|
|
47
50
|
key: 0,
|
|
48
51
|
title: g.value,
|
|
49
52
|
show: s.value,
|
|
50
|
-
"onUpdate:show": t[
|
|
53
|
+
"onUpdate:show": t[3] || (t[3] = (c) => s.value = c),
|
|
51
54
|
"max-width": "sm:max-w-md"
|
|
52
55
|
}, {
|
|
53
|
-
trigger:
|
|
54
|
-
p.value > 0 ? (
|
|
56
|
+
trigger: o(() => [
|
|
57
|
+
p.value > 0 ? (i(), n(f, {
|
|
55
58
|
key: 0,
|
|
56
59
|
variant: "secondary",
|
|
57
60
|
class: "flex items-center gap-1.5 pl-3 pr-1.5 shrink-0",
|
|
58
61
|
onClick: t[0] || (t[0] = (c) => s.value = !0)
|
|
59
62
|
}, {
|
|
60
|
-
default:
|
|
63
|
+
default: o(() => [
|
|
61
64
|
a(h, {
|
|
62
65
|
icon: "ci:filter",
|
|
63
66
|
class: "w-4 h-4"
|
|
64
67
|
}),
|
|
65
68
|
l("span", null, v(g.value) + " (" + v(p.value) + ")", 1),
|
|
66
69
|
l("div", {
|
|
67
|
-
onClick: F(
|
|
70
|
+
onClick: F(x, ["stop"]),
|
|
68
71
|
class: "ml-1 p-1 hover:bg-black/10 dark:hover:bg-white/10 rounded-full transition-colors cursor-pointer"
|
|
69
72
|
}, [
|
|
70
73
|
a(h, {
|
|
@@ -74,40 +77,40 @@ const z = { class: "" }, B = { class: "py-4 px-3.5 min-w-[290px]" }, Z = /* @__P
|
|
|
74
77
|
])
|
|
75
78
|
]),
|
|
76
79
|
_: 1
|
|
77
|
-
})) : (
|
|
80
|
+
})) : (i(), n(f, {
|
|
78
81
|
key: 1,
|
|
79
82
|
variant: "outline",
|
|
80
|
-
onClick: t[
|
|
83
|
+
onClick: t[2] || (t[2] = (c) => s.value = !0),
|
|
81
84
|
title: V.value,
|
|
82
85
|
size: "lg",
|
|
83
86
|
asIcon: "",
|
|
84
87
|
class: "shrink-0 h-9! w-9!"
|
|
85
88
|
}, {
|
|
86
|
-
default:
|
|
87
|
-
l("div",
|
|
88
|
-
|
|
89
|
+
default: o(() => [
|
|
90
|
+
l("div", A, [
|
|
91
|
+
t[1] || (C(-1, !0), (t[1] = (i(), S("svg", {
|
|
89
92
|
xmlns: "http://www.w3.org/2000/svg",
|
|
90
93
|
width: "1.132em",
|
|
91
94
|
height: "1.132em",
|
|
92
95
|
viewBox: "0 0 24 24"
|
|
93
96
|
}, [
|
|
94
|
-
l("path", {
|
|
97
|
+
t[5] || (t[5] = l("path", {
|
|
95
98
|
fill: "none",
|
|
96
99
|
stroke: "currentColor",
|
|
97
100
|
"stroke-linecap": "round",
|
|
98
101
|
"stroke-linejoin": "round",
|
|
99
102
|
"stroke-width": "2",
|
|
100
103
|
d: "M20.67 7c.083-.182.127-.374.16-.627c.202-1.572.303-2.358-.158-2.866C20.212 3 19.396 3 17.766 3H6.234c-1.63 0-2.445 0-2.906.507c-.461.508-.36 1.294-.158 2.866c.06.459.158.72.457 1.076c.969 1.15 2.742 3.197 5.23 5.057c.228.17.377.448.402.755c.28 3.425.537 5.765.674 6.917c.071.604.741 1.069 1.293.678c.927-.655 2.66-1.39 2.888-2.612c.108-.577.267-1.585.445-3.244M17.5 8v7m3.5-3.5h-7"
|
|
101
|
-
})
|
|
102
|
-
])
|
|
103
|
-
]
|
|
104
|
-
])
|
|
104
|
+
}, null, -1))
|
|
105
|
+
]))).cacheIndex = 1, C(1), t[1])
|
|
106
|
+
])
|
|
107
|
+
]),
|
|
105
108
|
_: 1
|
|
106
109
|
}, 8, ["title"]))
|
|
107
110
|
]),
|
|
108
|
-
default:
|
|
109
|
-
l("div",
|
|
110
|
-
a(w(
|
|
111
|
+
default: o(() => [
|
|
112
|
+
l("div", E, [
|
|
113
|
+
a(w(O), {
|
|
111
114
|
schema: r.schema,
|
|
112
115
|
values: r.modelValue,
|
|
113
116
|
"submit-text": b.value,
|
|
@@ -116,29 +119,29 @@ const z = { class: "" }, B = { class: "py-4 px-3.5 min-w-[290px]" }, Z = /* @__P
|
|
|
116
119
|
])
|
|
117
120
|
]),
|
|
118
121
|
_: 1
|
|
119
|
-
}, 8, ["title", "show"])) : (
|
|
122
|
+
}, 8, ["title", "show"])) : (i(), n(w(z), {
|
|
120
123
|
key: 1,
|
|
121
124
|
isOpen: s.value,
|
|
122
|
-
"onUpdate:isOpen": t[
|
|
125
|
+
"onUpdate:isOpen": t[4] || (t[4] = (c) => s.value = c),
|
|
123
126
|
"close-on-select": !1,
|
|
124
127
|
position: "bottom-end",
|
|
125
128
|
class: "w-auto"
|
|
126
129
|
}, {
|
|
127
|
-
trigger:
|
|
128
|
-
p.value > 0 ? (
|
|
130
|
+
trigger: o(() => [
|
|
131
|
+
p.value > 0 ? (i(), n(f, {
|
|
129
132
|
key: 0,
|
|
130
133
|
variant: "secondary",
|
|
131
134
|
class: "flex items-center gap-1.5 pl-3 pr-1.5 shrink-0 bg-gray-150! hover:bg-gray-100!",
|
|
132
135
|
style: { "pointer-events": "auto" }
|
|
133
136
|
}, {
|
|
134
|
-
default:
|
|
137
|
+
default: o(() => [
|
|
135
138
|
a(h, {
|
|
136
139
|
icon: "ci:filter",
|
|
137
140
|
class: "w-4 h-4"
|
|
138
141
|
}),
|
|
139
142
|
l("span", null, v(g.value) + " (" + v(p.value) + ")", 1),
|
|
140
143
|
l("div", {
|
|
141
|
-
onClick: F(
|
|
144
|
+
onClick: F(x, ["stop"]),
|
|
142
145
|
class: "ml-1 p-1 hover:bg-black/10 dark:hover:bg-white/10 rounded-full transition-colors cursor-pointer"
|
|
143
146
|
}, [
|
|
144
147
|
a(h, {
|
|
@@ -148,7 +151,7 @@ const z = { class: "" }, B = { class: "py-4 px-3.5 min-w-[290px]" }, Z = /* @__P
|
|
|
148
151
|
])
|
|
149
152
|
]),
|
|
150
153
|
_: 1
|
|
151
|
-
})) : (
|
|
154
|
+
})) : (i(), n(f, {
|
|
152
155
|
key: 1,
|
|
153
156
|
variant: "outline",
|
|
154
157
|
icon: "hugeicons:filter-add",
|
|
@@ -157,9 +160,9 @@ const z = { class: "" }, B = { class: "py-4 px-3.5 min-w-[290px]" }, Z = /* @__P
|
|
|
157
160
|
class: "shrink-0 h-9! w-9!"
|
|
158
161
|
}, null, 8, ["title"]))
|
|
159
162
|
]),
|
|
160
|
-
default:
|
|
161
|
-
l("div",
|
|
162
|
-
a(w(
|
|
163
|
+
default: o(() => [
|
|
164
|
+
l("div", I, [
|
|
165
|
+
a(w(O), {
|
|
163
166
|
schema: r.schema,
|
|
164
167
|
values: r.modelValue,
|
|
165
168
|
"submit-text": b.value,
|
|
@@ -177,5 +180,5 @@ const z = { class: "" }, B = { class: "py-4 px-3.5 min-w-[290px]" }, Z = /* @__P
|
|
|
177
180
|
}
|
|
178
181
|
});
|
|
179
182
|
export {
|
|
180
|
-
|
|
183
|
+
le as default
|
|
181
184
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AddBtnConfig } from '../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
canAdd: boolean;
|
|
4
|
+
addComponent?: any;
|
|
5
|
+
addBtn?: AddBtnConfig;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
data?: any[];
|
|
8
|
+
refetch?: any;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
11
|
+
add: () => any;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
onAdd?: () => any;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { defineComponent as x, computed as m, markRaw as w, resolveComponent as N, openBlock as d, createBlock as o, resolveDynamicComponent as P, createElementBlock as f, Fragment as y, mergeProps as e, withCtx as n, createVNode as B, createTextVNode as i, toDisplayString as r, createCommentVNode as k } from "vue";
|
|
2
|
+
import c from "../../Button.vue.js";
|
|
3
|
+
import V from "../../Modal.vue.js";
|
|
4
|
+
import { $t as g } from "../../../utils/i18n.js";
|
|
5
|
+
const $ = ["href", "target"], F = /* @__PURE__ */ x({
|
|
6
|
+
__name: "ScreenAddAction",
|
|
7
|
+
props: {
|
|
8
|
+
canAdd: { type: Boolean },
|
|
9
|
+
addComponent: {},
|
|
10
|
+
addBtn: {},
|
|
11
|
+
loading: { type: Boolean },
|
|
12
|
+
data: {},
|
|
13
|
+
refetch: {}
|
|
14
|
+
},
|
|
15
|
+
emits: ["add"],
|
|
16
|
+
setup(t, { emit: C }) {
|
|
17
|
+
const a = t, b = C, v = m(
|
|
18
|
+
() => a.addComponent ? w(a.addComponent) : void 0
|
|
19
|
+
), h = m(
|
|
20
|
+
() => a.addBtn?.modal ? w(a.addBtn.modal) : void 0
|
|
21
|
+
), l = m(() => {
|
|
22
|
+
if (a.addBtn?.labelI18n) return g(a.addBtn.labelI18n);
|
|
23
|
+
if (a.addBtn?.label) return a.addBtn.label;
|
|
24
|
+
const u = g("vlite.screen.addNew");
|
|
25
|
+
return u !== "vlite.screen.addNew" ? u : "Add New";
|
|
26
|
+
});
|
|
27
|
+
return (u, s) => {
|
|
28
|
+
const A = N("router-link");
|
|
29
|
+
return v.value ? (d(), o(P(v.value), { key: 0 })) : t.canAdd ? (d(), f(y, { key: 1 }, [
|
|
30
|
+
t.addBtn ? (d(), f(y, { key: 0 }, [
|
|
31
|
+
t.addBtn.modal ? (d(), o(V, e({
|
|
32
|
+
key: 0,
|
|
33
|
+
body: h.value
|
|
34
|
+
}, t.addBtn.modalProps, {
|
|
35
|
+
refetch: t.refetch,
|
|
36
|
+
data: t.data,
|
|
37
|
+
triggerClass: "w-full",
|
|
38
|
+
loading: t.loading
|
|
39
|
+
}), {
|
|
40
|
+
trigger: n(() => [
|
|
41
|
+
B(c, e({
|
|
42
|
+
class: "w-full",
|
|
43
|
+
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
44
|
+
variant: t.addBtn.variant || "primary"
|
|
45
|
+
}, t.addBtn.buttonProps), {
|
|
46
|
+
default: n(() => [
|
|
47
|
+
i(r(l.value), 1)
|
|
48
|
+
]),
|
|
49
|
+
_: 1
|
|
50
|
+
}, 16, ["icon", "variant"])
|
|
51
|
+
]),
|
|
52
|
+
_: 1
|
|
53
|
+
}, 16, ["body", "refetch", "data", "loading"])) : t.addBtn.to ? (d(), o(A, {
|
|
54
|
+
key: 1,
|
|
55
|
+
to: t.addBtn.to,
|
|
56
|
+
class: "inline-flex w-full sm:w-auto"
|
|
57
|
+
}, {
|
|
58
|
+
default: n(() => [
|
|
59
|
+
B(c, e({
|
|
60
|
+
class: "w-full",
|
|
61
|
+
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
62
|
+
variant: t.addBtn.variant || "primary"
|
|
63
|
+
}, t.addBtn.buttonProps), {
|
|
64
|
+
default: n(() => [
|
|
65
|
+
i(r(l.value), 1)
|
|
66
|
+
]),
|
|
67
|
+
_: 1
|
|
68
|
+
}, 16, ["icon", "variant"])
|
|
69
|
+
]),
|
|
70
|
+
_: 1
|
|
71
|
+
}, 8, ["to"])) : t.addBtn.href ? (d(), f("a", {
|
|
72
|
+
key: 2,
|
|
73
|
+
href: t.addBtn.href,
|
|
74
|
+
target: t.addBtn.target,
|
|
75
|
+
class: "inline-flex w-full sm:w-auto"
|
|
76
|
+
}, [
|
|
77
|
+
B(c, e({
|
|
78
|
+
class: "w-full",
|
|
79
|
+
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
80
|
+
variant: t.addBtn.variant || "primary"
|
|
81
|
+
}, t.addBtn.buttonProps), {
|
|
82
|
+
default: n(() => [
|
|
83
|
+
i(r(l.value), 1)
|
|
84
|
+
]),
|
|
85
|
+
_: 1
|
|
86
|
+
}, 16, ["icon", "variant"])
|
|
87
|
+
], 8, $)) : (d(), o(c, e({
|
|
88
|
+
key: 3,
|
|
89
|
+
class: "w-full sm:w-auto",
|
|
90
|
+
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
91
|
+
variant: t.addBtn.variant || "primary"
|
|
92
|
+
}, t.addBtn.buttonProps, {
|
|
93
|
+
onClick: s[0] || (s[0] = (D) => t.addBtn.onClick ? t.addBtn.onClick() : b("add"))
|
|
94
|
+
}), {
|
|
95
|
+
default: n(() => [
|
|
96
|
+
i(r(l.value), 1)
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
}, 16, ["icon", "variant"]))
|
|
100
|
+
], 64)) : k("", !0)
|
|
101
|
+
], 64)) : k("", !0);
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
export {
|
|
106
|
+
F as default
|
|
107
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AddBtnConfig } from '../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
emptyTitle?: string;
|
|
4
|
+
emptyTitleI18n?: string;
|
|
5
|
+
emptyDescription?: string;
|
|
6
|
+
emptyDescriptionI18n?: string;
|
|
7
|
+
emptyIcon?: string;
|
|
8
|
+
isFiltered: boolean;
|
|
9
|
+
canAdd: boolean;
|
|
10
|
+
addComponent?: any;
|
|
11
|
+
addBtn?: AddBtnConfig;
|
|
12
|
+
};
|
|
13
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { defineComponent as C, computed as m, markRaw as k, resolveComponent as p, openBlock as n, createBlock as a, unref as h, withCtx as d, createElementBlock as o, Fragment as u, resolveDynamicComponent as w, mergeProps as i, createVNode as f, createTextVNode as y, toDisplayString as B, createCommentVNode as l } from "vue";
|
|
2
|
+
import x from "../../Empty/Empty.vue.js";
|
|
3
|
+
import s from "../../Button.vue.js";
|
|
4
|
+
import A from "../../Modal.vue.js";
|
|
5
|
+
import { $t as I } from "../../../utils/i18n.js";
|
|
6
|
+
const D = ["href", "target"], $ = /* @__PURE__ */ C({
|
|
7
|
+
__name: "ScreenEmptyState",
|
|
8
|
+
props: {
|
|
9
|
+
emptyTitle: {},
|
|
10
|
+
emptyTitleI18n: {},
|
|
11
|
+
emptyDescription: {},
|
|
12
|
+
emptyDescriptionI18n: {},
|
|
13
|
+
emptyIcon: {},
|
|
14
|
+
isFiltered: { type: Boolean },
|
|
15
|
+
canAdd: { type: Boolean },
|
|
16
|
+
addComponent: {},
|
|
17
|
+
addBtn: {}
|
|
18
|
+
},
|
|
19
|
+
setup(e) {
|
|
20
|
+
const t = e, v = m(
|
|
21
|
+
() => t.addComponent ? k(t.addComponent) : void 0
|
|
22
|
+
), b = m(
|
|
23
|
+
() => t.addBtn?.modal ? k(t.addBtn.modal) : void 0
|
|
24
|
+
), c = m(() => {
|
|
25
|
+
if (t.addBtn?.labelI18n) return I(t.addBtn.labelI18n);
|
|
26
|
+
if (t.addBtn?.label) return t.addBtn.label;
|
|
27
|
+
const r = I("vlite.screen.addNew");
|
|
28
|
+
return r !== "vlite.screen.addNew" ? r : "Add New";
|
|
29
|
+
});
|
|
30
|
+
return (r, N) => {
|
|
31
|
+
const g = p("router-link");
|
|
32
|
+
return n(), a(h(x), {
|
|
33
|
+
title: e.emptyTitle,
|
|
34
|
+
titleI18n: e.emptyTitleI18n,
|
|
35
|
+
description: e.emptyDescription,
|
|
36
|
+
descriptionI18n: e.emptyDescriptionI18n,
|
|
37
|
+
icon: e.emptyIcon
|
|
38
|
+
}, {
|
|
39
|
+
action: d(() => [
|
|
40
|
+
e.isFiltered ? l("", !0) : (n(), o(u, { key: 0 }, [
|
|
41
|
+
v.value ? (n(), a(w(v.value), { key: 0 })) : e.canAdd ? (n(), o(u, { key: 1 }, [
|
|
42
|
+
e.addBtn ? (n(), o(u, { key: 0 }, [
|
|
43
|
+
e.addBtn.modal ? (n(), a(A, i({
|
|
44
|
+
key: 0,
|
|
45
|
+
body: b.value
|
|
46
|
+
}, e.addBtn.modalProps), {
|
|
47
|
+
trigger: d(() => [
|
|
48
|
+
f(s, i({
|
|
49
|
+
icon: e.addBtn.icon || "fluent:add-16-filled",
|
|
50
|
+
variant: "secondary",
|
|
51
|
+
rounded: "full",
|
|
52
|
+
class: "px-6!"
|
|
53
|
+
}, e.addBtn.buttonProps), {
|
|
54
|
+
default: d(() => [
|
|
55
|
+
y(B(c.value), 1)
|
|
56
|
+
]),
|
|
57
|
+
_: 1
|
|
58
|
+
}, 16, ["icon"])
|
|
59
|
+
]),
|
|
60
|
+
_: 1
|
|
61
|
+
}, 16, ["body"])) : e.addBtn.to ? (n(), a(g, {
|
|
62
|
+
key: 1,
|
|
63
|
+
to: e.addBtn.to,
|
|
64
|
+
class: "inline-flex"
|
|
65
|
+
}, {
|
|
66
|
+
default: d(() => [
|
|
67
|
+
f(s, i({
|
|
68
|
+
icon: e.addBtn.icon || "fluent:add-16-filled",
|
|
69
|
+
variant: "secondary"
|
|
70
|
+
}, e.addBtn.buttonProps), {
|
|
71
|
+
default: d(() => [
|
|
72
|
+
y(B(c.value), 1)
|
|
73
|
+
]),
|
|
74
|
+
_: 1
|
|
75
|
+
}, 16, ["icon"])
|
|
76
|
+
]),
|
|
77
|
+
_: 1
|
|
78
|
+
}, 8, ["to"])) : e.addBtn.href ? (n(), o("a", {
|
|
79
|
+
key: 2,
|
|
80
|
+
href: e.addBtn.href,
|
|
81
|
+
target: e.addBtn.target,
|
|
82
|
+
class: "inline-flex"
|
|
83
|
+
}, [
|
|
84
|
+
f(s, i({
|
|
85
|
+
icon: e.addBtn.icon || "lucide:plus",
|
|
86
|
+
variant: "secondary"
|
|
87
|
+
}, e.addBtn.buttonProps), {
|
|
88
|
+
default: d(() => [
|
|
89
|
+
y(B(c.value), 1)
|
|
90
|
+
]),
|
|
91
|
+
_: 1
|
|
92
|
+
}, 16, ["icon"])
|
|
93
|
+
], 8, D)) : l("", !0)
|
|
94
|
+
], 64)) : l("", !0)
|
|
95
|
+
], 64)) : l("", !0)
|
|
96
|
+
], 64))
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
}, 8, ["title", "titleI18n", "description", "descriptionI18n", "icon"]);
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
export {
|
|
104
|
+
$ as default
|
|
105
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
show: boolean;
|
|
3
|
+
data: any[];
|
|
4
|
+
fields: any[];
|
|
5
|
+
mode: 'frontend' | 'backend';
|
|
6
|
+
exportProps: any;
|
|
7
|
+
onExport: (format: string) => Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
10
|
+
"update:show": (val: boolean) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
"onUpdate:show"?: (val: boolean) => any;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
14
|
+
exportDataRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../ExportData').ExportDataProps> & Readonly<{}>, {
|
|
15
|
+
exportData: (format: import('../../ExportData').ExportFormat, close?: () => void) => Promise<void>;
|
|
16
|
+
availableFormats: import('vue').ComputedRef<{
|
|
17
|
+
label: string;
|
|
18
|
+
value: import('../../ExportData').ExportFormat;
|
|
19
|
+
icon: string;
|
|
20
|
+
}[]>;
|
|
21
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
22
|
+
title: string;
|
|
23
|
+
mode: "frontend" | "backend";
|
|
24
|
+
buttonText: string;
|
|
25
|
+
buttonIcon: string;
|
|
26
|
+
formats: import('../../ExportData').ExportFormat[];
|
|
27
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
28
|
+
P: {};
|
|
29
|
+
B: {};
|
|
30
|
+
D: {};
|
|
31
|
+
C: {};
|
|
32
|
+
M: {};
|
|
33
|
+
Defaults: {};
|
|
34
|
+
}, Readonly<import('../../ExportData').ExportDataProps> & Readonly<{}>, {
|
|
35
|
+
exportData: (format: import('../../ExportData').ExportFormat, close?: () => void) => Promise<void>;
|
|
36
|
+
availableFormats: import('vue').ComputedRef<{
|
|
37
|
+
label: string;
|
|
38
|
+
value: import('../../ExportData').ExportFormat;
|
|
39
|
+
icon: string;
|
|
40
|
+
}[]>;
|
|
41
|
+
}, {}, {}, {}, {
|
|
42
|
+
title: string;
|
|
43
|
+
mode: "frontend" | "backend";
|
|
44
|
+
buttonText: string;
|
|
45
|
+
buttonIcon: string;
|
|
46
|
+
formats: import('../../ExportData').ExportFormat[];
|
|
47
|
+
}>;
|
|
48
|
+
}, any>;
|
|
49
|
+
export default _default;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { defineComponent as _, ref as E, computed as d, openBlock as i, createBlock as p, withCtx as x, createVNode as f, mergeProps as b, createElementVNode as a, toDisplayString as v, createElementBlock as k, Fragment as g, renderList as F, isMemoSame as S } from "vue";
|
|
2
|
+
import j from "../../Modal.vue.js";
|
|
3
|
+
import C from "../../ExportData/ExportData.vue.js";
|
|
4
|
+
import $ from "../../Button.vue.js";
|
|
5
|
+
import B from "../../Icon.vue.js";
|
|
6
|
+
import { $t as h } from "../../../utils/i18n.js";
|
|
7
|
+
const P = {
|
|
8
|
+
class: "px-1 py-1 text-sm",
|
|
9
|
+
style: { "will-change": "transform", contain: "layout style" }
|
|
10
|
+
}, M = { class: "font-medium mb-3 text-muted-foreground" }, N = { class: "space-y-3" }, G = /* @__PURE__ */ _({
|
|
11
|
+
__name: "ScreenExportModal",
|
|
12
|
+
props: {
|
|
13
|
+
show: { type: Boolean },
|
|
14
|
+
data: {},
|
|
15
|
+
fields: {},
|
|
16
|
+
mode: {},
|
|
17
|
+
exportProps: {},
|
|
18
|
+
onExport: { type: Function }
|
|
19
|
+
},
|
|
20
|
+
emits: ["update:show"],
|
|
21
|
+
setup(t, { emit: w }) {
|
|
22
|
+
const y = w, n = E(null), c = d(() => {
|
|
23
|
+
const o = h("vlite.screen.exportData");
|
|
24
|
+
return o !== "vlite.screen.exportData" ? o : "Export Data";
|
|
25
|
+
}), D = d(() => {
|
|
26
|
+
const o = h("vlite.exportData.selectFormat");
|
|
27
|
+
return o !== "vlite.exportData.selectFormat" ? o : "Select Export Format";
|
|
28
|
+
});
|
|
29
|
+
return (o, s) => (i(), p(j, {
|
|
30
|
+
show: t.show,
|
|
31
|
+
"onUpdate:show": s[2] || (s[2] = (r) => y("update:show", r)),
|
|
32
|
+
title: c.value,
|
|
33
|
+
"max-width": "sm:max-w-[400px]"
|
|
34
|
+
}, {
|
|
35
|
+
default: x(({ close: r }) => [
|
|
36
|
+
f(C, b({
|
|
37
|
+
ref_key: "exportDataRef",
|
|
38
|
+
ref: n,
|
|
39
|
+
data: t.data || [],
|
|
40
|
+
fields: t.fields,
|
|
41
|
+
mode: t.mode,
|
|
42
|
+
"on-export": t.onExport
|
|
43
|
+
}, typeof t.exportProps == "object" ? t.exportProps : {}, {
|
|
44
|
+
title: c.value,
|
|
45
|
+
class: "hidden!"
|
|
46
|
+
}), null, 16, ["data", "fields", "mode", "on-export", "title"]),
|
|
47
|
+
a("div", P, [
|
|
48
|
+
a("h6", M, v(D.value), 1),
|
|
49
|
+
a("div", N, [
|
|
50
|
+
(i(!0), k(g, null, F(n.value?.availableFormats || [
|
|
51
|
+
{ value: "excel", label: "Excel (.xlsx)", icon: "lucide:file-spreadsheet" },
|
|
52
|
+
{ value: "csv", label: "CSV (.csv)", icon: "lucide:file-text" },
|
|
53
|
+
{ value: "json", label: "JSON (.json)", icon: "lucide:file-json" }
|
|
54
|
+
], (e, V, R, l) => {
|
|
55
|
+
const m = [e.value, e.label, e.icon];
|
|
56
|
+
if (l && l.key === e.value && S(l, m)) return l;
|
|
57
|
+
const u = (i(), p($, {
|
|
58
|
+
key: e.value,
|
|
59
|
+
variant: "outline",
|
|
60
|
+
class: "w-full flex items-center justify-start gap-3 h-12",
|
|
61
|
+
onClick: (J) => n.value?.exportData(e.value, r)
|
|
62
|
+
}, {
|
|
63
|
+
default: x(() => [
|
|
64
|
+
f(B, {
|
|
65
|
+
icon: e.icon,
|
|
66
|
+
class: "text-muted-foreground h-5 w-5"
|
|
67
|
+
}, null, 8, ["icon"]),
|
|
68
|
+
a("span", null, v(e.label), 1)
|
|
69
|
+
]),
|
|
70
|
+
_: 2
|
|
71
|
+
}, 1032, ["onClick"]));
|
|
72
|
+
return u.memo = m, u;
|
|
73
|
+
}, s, 0), 128))
|
|
74
|
+
])
|
|
75
|
+
])
|
|
76
|
+
]),
|
|
77
|
+
_: 1
|
|
78
|
+
}, 8, ["show", "title"]));
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
export {
|
|
82
|
+
G as default
|
|
83
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title?: string;
|
|
3
|
+
titleI18n?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
descriptionI18n?: string;
|
|
6
|
+
info?: string;
|
|
7
|
+
infoI18n?: string;
|
|
8
|
+
titleClass?: string;
|
|
9
|
+
descriptionClass?: string;
|
|
10
|
+
};
|
|
11
|
+
declare function __VLS_template(): {
|
|
12
|
+
attrs: Partial<{}>;
|
|
13
|
+
slots: {
|
|
14
|
+
title?(_: {}): any;
|
|
15
|
+
description?(_: {}): any;
|
|
16
|
+
};
|
|
17
|
+
refs: {};
|
|
18
|
+
rootEl: HTMLDivElement;
|
|
19
|
+
};
|
|
20
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
21
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
22
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|