vlite3 0.4.6 → 0.4.7
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/Accordion/AccordionItem.vue.js +33 -32
- package/components/Accordion/types.d.ts +2 -0
- package/components/Alert.vue.d.ts +2 -0
- package/components/Alert.vue.js +38 -36
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.js +25 -24
- package/components/Button.vue.d.ts +1 -1
- package/components/Button.vue.js +37 -35
- package/components/CheckBox.vue.d.ts +1 -0
- package/components/CheckBox.vue.js +40 -40
- package/components/Chip/Chip.vue.js +55 -55
- package/components/Chip/types.d.ts +1 -0
- package/components/ChoiceBox/ChoiceBox.vue.d.ts +5 -0
- package/components/ChoiceBox/ChoiceBox.vue.js +61 -58
- package/components/ColorPicker/ColorPicker.vue.js +3 -2
- package/components/ConfirmationModal.vue.d.ts +4 -2
- package/components/ConfirmationModal.vue.js +48 -33
- package/components/DataList/DataList.vue.d.ts +0 -2
- package/components/DataList/DataList.vue.js +39 -35
- package/components/DataList/types.d.ts +2 -0
- package/components/DataTable/DataTable.vue.d.ts +0 -5
- package/components/DataTable/DataTable.vue.js +177 -158
- package/components/DataTable/DataTableHeader.vue.js +15 -14
- package/components/DataTable/DataTableToolbar.vue.d.ts +1 -1
- package/components/DataTable/DataTableToolbar.vue.js +30 -23
- package/components/DataTable/types.d.ts +4 -0
- package/components/DatePicker.vue.d.ts +1 -0
- package/components/DatePicker.vue.js +32 -25
- package/components/Dropdown/DropdownBooleanItem.vue.js +18 -17
- package/components/Dropdown/DropdownGroupedLayout.vue.js +28 -27
- package/components/Dropdown/DropdownItem.vue.js +24 -23
- package/components/Dropdown/DropdownMenu.vue.js +100 -91
- package/components/Dropdown/composables/useDropdownNavigation.js +24 -23
- package/components/Dropdown/composables/useDropdownSelection.js +19 -17
- package/components/Empty/Empty.vue.d.ts +2 -2
- package/components/Empty/Empty.vue.js +32 -18
- package/components/FilePicker/FilePicker.vue.d.ts +3 -1
- package/components/FilePicker/FilePicker.vue.js +140 -127
- package/components/FileTree/FileTree.vue.js +68 -58
- package/components/FileTree/FileTreeNode.vue.js +35 -34
- package/components/FileTree/types.d.ts +3 -0
- package/components/Form/CustomFields.vue.d.ts +3 -1
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/CustomFields.vue2.js +92 -80
- package/components/Form/Form.vue.d.ts +1 -1
- package/components/Form/FormField.vue.d.ts +1 -1
- package/components/Form/FormField.vue.js +60 -59
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +58 -57
- package/components/Form/composables/useForm.js +84 -79
- package/components/Form/types.d.ts +4 -0
- package/components/GoogleLogin.vue.d.ts +1 -1
- package/components/GoogleLogin.vue.js +39 -32
- package/components/Heatmap/Heatmap.vue2.js +3 -2
- package/components/IconPicker.vue.d.ts +2 -0
- package/components/IconPicker.vue.js +37 -29
- package/components/Input.vue.d.ts +1 -1
- package/components/Input.vue.js +96 -98
- package/components/Kanban/KanbanBoard.vue.js +1 -1
- package/components/Kanban/KanbanBoard.vue2.js +55 -54
- package/components/Kanban/types.d.ts +1 -0
- package/components/Masonry/Masonry.vue2.js +3 -2
- package/components/Modal.vue.d.ts +2 -0
- package/components/Modal.vue.js +62 -57
- package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
- package/components/MultiSelect/MultiSelect.vue.js +61 -54
- package/components/Navbar/Navbar.vue.js +46 -46
- package/components/Pagination/Pagination.vue.js +116 -97
- package/components/PricingPlan/PricingPlanItem.vue.js +60 -47
- package/components/PricingPlan/types.d.ts +5 -0
- package/components/Screen/Screen.vue.d.ts +0 -4
- package/components/Screen/Screen.vue.js +231 -189
- package/components/Screen/ScreenFilter.vue.js +73 -63
- package/components/Screen/types.d.ts +5 -0
- package/components/SidePanel.vue.d.ts +2 -0
- package/components/SidePanel.vue.js +140 -5
- package/components/SidePanel.vue2.js +2 -135
- package/components/SidebarMenu/SidebarMenuItem.vue.js +131 -130
- package/components/SidebarMenu/types.d.ts +1 -0
- package/components/Slider.vue.d.ts +1 -0
- package/components/Slider.vue.js +71 -69
- package/components/Switch.vue.d.ts +1 -0
- package/components/Switch.vue.js +23 -18
- package/components/Tabes/Tabes.vue.js +20 -19
- package/components/Tabes/types.d.ts +1 -0
- package/components/Textarea.vue.d.ts +1 -0
- package/components/Textarea.vue.js +18 -16
- package/components/ThemeToggle.vue.js +24 -14
- package/components/Timeline.vue.js +68 -82
- package/components/ToastNotification.vue.js +2 -2
- package/components/Tooltip.vue.d.ts +4 -3
- package/components/Tooltip.vue.js +17 -15
- package/components/Workbook/Sheet.vue.js +80 -71
- package/components/Workbook/WorkbookAddButton.vue.js +14 -10
- package/components/Workbook/types.d.ts +1 -0
- package/core/config.d.ts +2 -0
- package/index.d.ts +1 -0
- package/index.js +28 -26
- package/package.json +1 -1
- package/style.css +1 -2
- package/types/button.d.ts +1 -0
- package/types/config.type.d.ts +10 -0
- package/types/form.type.d.ts +2 -0
- package/types/styles.d.ts +3 -0
- package/types/timeline.type.d.ts +2 -0
- package/utils/i18n.d.ts +8 -0
- package/utils/i18n.js +5 -0
- package/utils/index.d.ts +1 -0
|
@@ -1,37 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { usePersistentState as
|
|
11
|
-
|
|
1
|
+
import { defineComponent as re, computed as i, ref as w, provide as K, watch as j, resolveComponent as se, openBlock as n, createElementBlock as o, normalizeClass as S, createElementVNode as b, renderSlot as k, toDisplayString as u, createCommentVNode as y, createBlock as s, unref as R, createVNode as f, resolveDynamicComponent as L, Fragment as I, mergeProps as v, withCtx as r, createTextVNode as h } from "vue";
|
|
2
|
+
import ce from "../Input.vue.js";
|
|
3
|
+
import m from "../Button.vue.js";
|
|
4
|
+
import M from "../Icon.vue.js";
|
|
5
|
+
import O from "../Modal.vue.js";
|
|
6
|
+
import ue from "../ConfirmationModal.vue.js";
|
|
7
|
+
import fe from "../Pagination/Pagination.vue.js";
|
|
8
|
+
import me from "../Empty/Empty.vue.js";
|
|
9
|
+
import ve from "./ScreenFilter.vue.js";
|
|
10
|
+
import { usePersistentState as ge } from "../../utils/usePersistentState.js";
|
|
11
|
+
import { $t as c } from "../../utils/i18n.js";
|
|
12
|
+
const ye = { class: "flex flex-col w-full space-y-8" }, he = { class: "flex flex-col shrink-0" }, Be = {
|
|
12
13
|
key: 0,
|
|
13
14
|
class: "text-fs-7.5 font-bold text-foreground"
|
|
14
|
-
},
|
|
15
|
+
}, we = {
|
|
15
16
|
key: 0,
|
|
16
17
|
class: "text-sm text-gray-700 mt-1 md:max-w-[450px]"
|
|
17
|
-
},
|
|
18
|
+
}, be = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-2.5 w-full justify-end" }, ke = { class: "flex items-center gap-2 w-full sm:w-auto flex-1 md:flex-none justify-start sm:justify-end" }, xe = {
|
|
18
19
|
key: 1,
|
|
19
20
|
class: "flex items-center p-1 rounded-md border border-border shrink-0"
|
|
20
|
-
},
|
|
21
|
+
}, Ce = ["title"], Pe = ["title"], De = {
|
|
21
22
|
key: 4,
|
|
22
23
|
class: "w-full md:w-60! max-sm:order-last"
|
|
23
|
-
},
|
|
24
|
+
}, Ie = { class: "flex items-center gap-3 max-sm:w-full sm:w-auto max-sm:order-last" }, $e = ["href", "target"], Ve = ["href", "target"], Te = {
|
|
24
25
|
key: 1,
|
|
25
26
|
class: "p-8 text-center text-muted-foreground border border-dashed border-border rounded-lg"
|
|
26
|
-
},
|
|
27
|
+
}, Se = {
|
|
27
28
|
key: 2,
|
|
28
29
|
class: "-mt-2"
|
|
29
|
-
},
|
|
30
|
+
}, Ke = /* @__PURE__ */ re({
|
|
30
31
|
__name: "Screen",
|
|
31
32
|
props: {
|
|
32
33
|
name: { default: "" },
|
|
33
|
-
title: {
|
|
34
|
-
|
|
34
|
+
title: {},
|
|
35
|
+
titleI18n: {},
|
|
36
|
+
description: {},
|
|
37
|
+
descriptionI18n: {},
|
|
35
38
|
pageInfo: {},
|
|
36
39
|
data: { default: () => [] },
|
|
37
40
|
loading: { type: Boolean, default: !1 },
|
|
@@ -42,8 +45,10 @@ const ae = { class: "flex flex-col w-full space-y-8" }, ne = { class: "flex flex
|
|
|
42
45
|
showItemsPerPage: !1,
|
|
43
46
|
itemsPerPageOptions: [10, 25, 50, 100]
|
|
44
47
|
}) },
|
|
45
|
-
emptyTitle: {
|
|
46
|
-
|
|
48
|
+
emptyTitle: {},
|
|
49
|
+
emptyTitleI18n: {},
|
|
50
|
+
emptyDescription: {},
|
|
51
|
+
emptyDescriptionI18n: {},
|
|
47
52
|
emptyIcon: { default: "lucide:inbox" },
|
|
48
53
|
addComponent: {},
|
|
49
54
|
addBtn: {},
|
|
@@ -60,143 +65,178 @@ const ae = { class: "flex flex-col w-full space-y-8" }, ne = { class: "flex flex
|
|
|
60
65
|
headerClass: {}
|
|
61
66
|
},
|
|
62
67
|
emits: ["add", "delete"],
|
|
63
|
-
setup(e, { emit:
|
|
64
|
-
const
|
|
65
|
-
`view-mode-${
|
|
66
|
-
|
|
67
|
-
),
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
|
|
68
|
+
setup(e, { emit: Q }) {
|
|
69
|
+
const a = e, z = Q, G = i(() => a.name || a.title || "default-screen"), C = ge(
|
|
70
|
+
`view-mode-${G.value}`,
|
|
71
|
+
a.table ? "table" : "list"
|
|
72
|
+
), $ = w(""), N = w({}), x = w(a.pageInfo?.currentPage || 1), V = w(a.pageInfo?.itemsPerPage || a.paginationProps?.itemsPerPage || 10), B = w([]), T = w([]), P = w(!1);
|
|
73
|
+
K("screen-selected-rows", B), K("screen-request-delete", (t) => A(t));
|
|
74
|
+
const A = (t) => {
|
|
75
|
+
T.value = t, P.value = !0;
|
|
76
|
+
}, J = () => {
|
|
77
|
+
z("delete", T.value), P.value = !1, B.value = [];
|
|
78
|
+
}, W = (t) => {
|
|
79
|
+
z("delete", t), B.value = [];
|
|
75
80
|
};
|
|
76
|
-
|
|
77
|
-
() =>
|
|
81
|
+
j(
|
|
82
|
+
() => a.pageInfo?.currentPage,
|
|
78
83
|
(t) => {
|
|
79
|
-
t && (
|
|
84
|
+
t && (x.value = t);
|
|
80
85
|
}
|
|
81
|
-
),
|
|
82
|
-
() =>
|
|
86
|
+
), j(
|
|
87
|
+
() => a.pageInfo?.itemsPerPage,
|
|
83
88
|
(t) => {
|
|
84
|
-
t && (
|
|
89
|
+
t && (V.value = t);
|
|
85
90
|
}
|
|
86
91
|
);
|
|
87
|
-
let
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
92
|
+
let U = null;
|
|
93
|
+
j($, (t) => {
|
|
94
|
+
U && clearTimeout(U), U = setTimeout(() => {
|
|
95
|
+
x.value = 1, D();
|
|
91
96
|
}, 300);
|
|
92
97
|
});
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
},
|
|
98
|
+
const X = (t) => {
|
|
99
|
+
x.value = t, D();
|
|
100
|
+
}, Y = (t) => {
|
|
101
|
+
V.value = t, x.value = 1, D();
|
|
102
|
+
}, D = () => {
|
|
98
103
|
const t = {
|
|
99
104
|
pageinfo: {
|
|
100
|
-
page:
|
|
101
|
-
limit:
|
|
105
|
+
page: x.value,
|
|
106
|
+
limit: V.value
|
|
102
107
|
},
|
|
103
108
|
pagination: {
|
|
104
|
-
page:
|
|
105
|
-
limit:
|
|
109
|
+
page: x.value,
|
|
110
|
+
limit: V.value
|
|
106
111
|
},
|
|
107
|
-
search:
|
|
108
|
-
filter:
|
|
112
|
+
search: $.value,
|
|
113
|
+
filter: N.value
|
|
109
114
|
};
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
a.refetch && a.refetch(t);
|
|
116
|
+
}, q = i(() => C.value === "table" && a.table ? a.table : a.list), Z = i(() => a.data && a.data.length > 0), E = i(() => a.titleI18n ? c(a.titleI18n) : a.title), F = i(() => a.descriptionI18n ? c(a.descriptionI18n) : a.description), p = i(() => {
|
|
117
|
+
const t = c("vlite.screen.deleteSelected");
|
|
118
|
+
return t !== "vlite.screen.deleteSelected" ? t : "Delete Selected";
|
|
119
|
+
}), _ = i(() => {
|
|
120
|
+
const t = c("vlite.screen.listView");
|
|
121
|
+
return t !== "vlite.screen.listView" ? t : "List View";
|
|
122
|
+
}), ee = i(() => {
|
|
123
|
+
const t = c("vlite.screen.tableView");
|
|
124
|
+
return t !== "vlite.screen.tableView" ? t : "Table View";
|
|
125
|
+
}), te = i(() => {
|
|
126
|
+
const t = c("vlite.screen.refresh");
|
|
127
|
+
return t !== "vlite.screen.refresh" ? t : "Refresh";
|
|
128
|
+
}), ne = i(() => {
|
|
129
|
+
const t = c("vlite.screen.searchPlaceholder");
|
|
130
|
+
return t !== "vlite.screen.searchPlaceholder" ? t : "Search...";
|
|
131
|
+
}), ae = i(() => {
|
|
132
|
+
const t = c("vlite.screen.confirmDeleteTitle");
|
|
133
|
+
return t !== "vlite.screen.confirmDeleteTitle" ? t : "Confirm Deletion";
|
|
134
|
+
}), le = i(() => {
|
|
135
|
+
const t = c("vlite.screen.confirmDeleteDesc", { count: T.value.length });
|
|
136
|
+
return t !== "vlite.screen.confirmDeleteDesc" ? t : `Are you sure you want to delete the selected ${T.value.length > 1 ? "items" : "item"}?`;
|
|
137
|
+
}), ie = i(() => {
|
|
138
|
+
const t = c("vlite.screen.confirmDeleteBtn");
|
|
139
|
+
return t !== "vlite.screen.confirmDeleteBtn" ? t : "Delete";
|
|
140
|
+
}), de = i(() => {
|
|
141
|
+
const t = c("vlite.screen.cancelBtn");
|
|
142
|
+
return t !== "vlite.screen.cancelBtn" ? t : "Cancel";
|
|
143
|
+
}), oe = i(() => {
|
|
144
|
+
const t = c("vlite.screen.missingView");
|
|
145
|
+
return t !== "vlite.screen.missingView" ? t : "Please provide a `:list` or `:table` component.";
|
|
146
|
+
}), g = i(() => {
|
|
147
|
+
if (a.addBtn?.labelI18n) return c(a.addBtn.labelI18n);
|
|
148
|
+
if (a.addBtn?.label) return a.addBtn.label;
|
|
149
|
+
const t = c("vlite.screen.addNew");
|
|
150
|
+
return t !== "vlite.screen.addNew" ? t : "Add New";
|
|
151
|
+
});
|
|
152
|
+
return (t, l) => {
|
|
153
|
+
const H = se("router-link");
|
|
154
|
+
return n(), o("div", ye, [
|
|
155
|
+
e.customHeader ? k(t.$slots, "custom-header", { key: 1 }) : (n(), o("div", {
|
|
116
156
|
key: 0,
|
|
117
|
-
class:
|
|
157
|
+
class: S([e.headerClass, "flex flex-col md:flex-row sm:items-start md:items-center justify-between gap-4"])
|
|
118
158
|
}, [
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
159
|
+
b("div", he, [
|
|
160
|
+
k(t.$slots, "title", {}, () => [
|
|
161
|
+
E.value ? (n(), o("h1", Be, u(E.value), 1)) : y("", !0)
|
|
122
162
|
]),
|
|
123
|
-
|
|
124
|
-
|
|
163
|
+
k(t.$slots, "description", {}, () => [
|
|
164
|
+
F.value ? (n(), o("p", we, u(F.value), 1)) : y("", !0)
|
|
125
165
|
])
|
|
126
166
|
]),
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
167
|
+
b("div", be, [
|
|
168
|
+
b("div", ke, [
|
|
169
|
+
B.value.length > 0 ? (n(), s(m, {
|
|
130
170
|
key: 0,
|
|
131
171
|
variant: "outline",
|
|
132
172
|
class: "hover:bg-destructive/10 shrink-0 h-9! w-9!",
|
|
133
173
|
icon: "lucide:trash-2",
|
|
134
|
-
title:
|
|
135
|
-
onClick:
|
|
136
|
-
})) :
|
|
137
|
-
e.table && e.list ? (
|
|
138
|
-
|
|
139
|
-
onClick:
|
|
140
|
-
class:
|
|
141
|
-
|
|
174
|
+
title: p.value,
|
|
175
|
+
onClick: l[0] || (l[0] = (d) => A(B.value))
|
|
176
|
+
}, null, 8, ["title"])) : y("", !0),
|
|
177
|
+
e.table && e.list ? (n(), o("div", xe, [
|
|
178
|
+
b("button", {
|
|
179
|
+
onClick: l[1] || (l[1] = (d) => C.value = "list"),
|
|
180
|
+
class: S(["p-1.5 rounded", [
|
|
181
|
+
R(C) === "list" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
142
182
|
]]),
|
|
143
|
-
title:
|
|
183
|
+
title: _.value
|
|
144
184
|
}, [
|
|
145
|
-
|
|
185
|
+
f(M, {
|
|
146
186
|
icon: "lucide:layout-grid",
|
|
147
187
|
class: "w-4 h-4"
|
|
148
188
|
})
|
|
149
|
-
],
|
|
150
|
-
|
|
151
|
-
onClick:
|
|
152
|
-
class:
|
|
153
|
-
|
|
189
|
+
], 10, Ce),
|
|
190
|
+
b("button", {
|
|
191
|
+
onClick: l[2] || (l[2] = (d) => C.value = "table"),
|
|
192
|
+
class: S(["p-1.5 rounded", [
|
|
193
|
+
R(C) === "table" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
154
194
|
]]),
|
|
155
|
-
title:
|
|
195
|
+
title: ee.value
|
|
156
196
|
}, [
|
|
157
|
-
|
|
197
|
+
f(M, {
|
|
158
198
|
icon: "lucide:list",
|
|
159
199
|
class: "w-4 h-4"
|
|
160
200
|
})
|
|
161
|
-
],
|
|
162
|
-
])) :
|
|
163
|
-
|
|
164
|
-
e.showRefresh ? (
|
|
201
|
+
], 10, Pe)
|
|
202
|
+
])) : y("", !0),
|
|
203
|
+
k(t.$slots, "before-search"),
|
|
204
|
+
e.showRefresh ? (n(), s(m, {
|
|
165
205
|
key: 2,
|
|
166
206
|
variant: "outline",
|
|
167
207
|
icon: "lucide:refresh-cw",
|
|
168
208
|
size: "lg",
|
|
169
209
|
class: "shrink-0 h-9! w-9!",
|
|
170
|
-
title:
|
|
210
|
+
title: te.value,
|
|
171
211
|
disabled: e.loading,
|
|
172
|
-
onClick:
|
|
173
|
-
}, null, 8, ["disabled"])) :
|
|
174
|
-
e.filterSchema && e.filterSchema.length > 0 ? (
|
|
212
|
+
onClick: D
|
|
213
|
+
}, null, 8, ["title", "disabled"])) : y("", !0),
|
|
214
|
+
e.filterSchema && e.filterSchema.length > 0 ? (n(), s(ve, {
|
|
175
215
|
key: 3,
|
|
176
216
|
schema: e.filterSchema,
|
|
177
217
|
type: e.filterType,
|
|
178
|
-
modelValue:
|
|
179
|
-
"onUpdate:modelValue":
|
|
180
|
-
onChange:
|
|
181
|
-
}, null, 8, ["schema", "type", "modelValue"])) :
|
|
182
|
-
e.canSearch ? (
|
|
183
|
-
|
|
218
|
+
modelValue: N.value,
|
|
219
|
+
"onUpdate:modelValue": l[3] || (l[3] = (d) => N.value = d),
|
|
220
|
+
onChange: D
|
|
221
|
+
}, null, 8, ["schema", "type", "modelValue"])) : y("", !0),
|
|
222
|
+
e.canSearch ? (n(), o("div", De, [
|
|
223
|
+
f(ce, {
|
|
184
224
|
lazy: "",
|
|
185
|
-
modelValue:
|
|
186
|
-
"onUpdate:modelValue":
|
|
225
|
+
modelValue: $.value,
|
|
226
|
+
"onUpdate:modelValue": l[4] || (l[4] = (d) => $.value = d),
|
|
187
227
|
icon: "lucide:search",
|
|
188
|
-
placeholder:
|
|
228
|
+
placeholder: ne.value,
|
|
189
229
|
variant: "outline",
|
|
190
230
|
class: "bg-background w-full",
|
|
191
231
|
"show-clear-button": !0
|
|
192
|
-
}, null, 8, ["modelValue"])
|
|
193
|
-
])) :
|
|
232
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
233
|
+
])) : y("", !0)
|
|
194
234
|
]),
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
e.addComponent ? (
|
|
198
|
-
e.addBtn ? (
|
|
199
|
-
e.addBtn.modal ? (
|
|
235
|
+
b("div", Ie, [
|
|
236
|
+
k(t.$slots, "actions", {}, () => [
|
|
237
|
+
e.addComponent ? (n(), s(L(e.addComponent), { key: 0 })) : e.canAdd ? (n(), o(I, { key: 1 }, [
|
|
238
|
+
e.addBtn ? (n(), o(I, { key: 0 }, [
|
|
239
|
+
e.addBtn.modal ? (n(), s(O, v({
|
|
200
240
|
key: 0,
|
|
201
241
|
body: e.addBtn.modal
|
|
202
242
|
}, e.addBtn.modalProps, {
|
|
@@ -205,211 +245,213 @@ const ae = { class: "flex flex-col w-full space-y-8" }, ne = { class: "flex flex
|
|
|
205
245
|
triggerClass: "w-full",
|
|
206
246
|
loading: e.loading
|
|
207
247
|
}), {
|
|
208
|
-
trigger:
|
|
209
|
-
|
|
248
|
+
trigger: r(() => [
|
|
249
|
+
f(m, v({
|
|
210
250
|
class: "w-full",
|
|
211
251
|
icon: e.addBtn.icon || "fluent:add-16-filled",
|
|
212
252
|
variant: e.addBtn.variant || "primary"
|
|
213
253
|
}, e.addBtn.buttonProps), {
|
|
214
|
-
default:
|
|
215
|
-
|
|
254
|
+
default: r(() => [
|
|
255
|
+
h(u(g.value), 1)
|
|
216
256
|
]),
|
|
217
257
|
_: 1
|
|
218
258
|
}, 16, ["icon", "variant"])
|
|
219
259
|
]),
|
|
220
260
|
_: 1
|
|
221
|
-
}, 16, ["body", "refetch", "data", "loading"])) : e.addBtn.to ? (
|
|
261
|
+
}, 16, ["body", "refetch", "data", "loading"])) : e.addBtn.to ? (n(), s(H, {
|
|
222
262
|
key: 1,
|
|
223
263
|
to: e.addBtn.to,
|
|
224
264
|
class: "inline-flex w-full sm:w-auto"
|
|
225
265
|
}, {
|
|
226
|
-
default:
|
|
227
|
-
|
|
266
|
+
default: r(() => [
|
|
267
|
+
f(m, v({
|
|
228
268
|
class: "w-full",
|
|
229
269
|
icon: e.addBtn.icon || "fluent:add-16-filled",
|
|
230
270
|
variant: e.addBtn.variant || "primary"
|
|
231
271
|
}, e.addBtn.buttonProps), {
|
|
232
|
-
default:
|
|
233
|
-
|
|
272
|
+
default: r(() => [
|
|
273
|
+
h(u(g.value), 1)
|
|
234
274
|
]),
|
|
235
275
|
_: 1
|
|
236
276
|
}, 16, ["icon", "variant"])
|
|
237
277
|
]),
|
|
238
278
|
_: 1
|
|
239
|
-
}, 8, ["to"])) : e.addBtn.href ? (
|
|
279
|
+
}, 8, ["to"])) : e.addBtn.href ? (n(), o("a", {
|
|
240
280
|
key: 2,
|
|
241
281
|
href: e.addBtn.href,
|
|
242
282
|
target: e.addBtn.target,
|
|
243
283
|
class: "inline-flex w-full sm:w-auto"
|
|
244
284
|
}, [
|
|
245
|
-
|
|
285
|
+
f(m, v({
|
|
246
286
|
class: "w-full",
|
|
247
287
|
icon: e.addBtn.icon || "fluent:add-16-filled",
|
|
248
288
|
variant: e.addBtn.variant || "primary"
|
|
249
289
|
}, e.addBtn.buttonProps), {
|
|
250
|
-
default:
|
|
251
|
-
|
|
290
|
+
default: r(() => [
|
|
291
|
+
h(u(g.value), 1)
|
|
252
292
|
]),
|
|
253
293
|
_: 1
|
|
254
294
|
}, 16, ["icon", "variant"])
|
|
255
|
-
], 8,
|
|
295
|
+
], 8, $e)) : (n(), s(m, v({
|
|
256
296
|
key: 3,
|
|
257
297
|
class: "w-full sm:w-auto",
|
|
258
298
|
icon: e.addBtn.icon || "fluent:add-16-filled",
|
|
259
299
|
variant: e.addBtn.variant || "primary"
|
|
260
300
|
}, e.addBtn.buttonProps, {
|
|
261
|
-
onClick:
|
|
301
|
+
onClick: l[5] || (l[5] = (d) => e.addBtn.onClick ? e.addBtn.onClick() : t.$emit("add"))
|
|
262
302
|
}), {
|
|
263
|
-
default:
|
|
264
|
-
|
|
303
|
+
default: r(() => [
|
|
304
|
+
h(u(g.value), 1)
|
|
265
305
|
]),
|
|
266
306
|
_: 1
|
|
267
307
|
}, 16, ["icon", "variant"]))
|
|
268
|
-
], 64)) : (
|
|
308
|
+
], 64)) : (n(), s(m, {
|
|
269
309
|
key: 1,
|
|
270
310
|
class: "w-full sm:w-auto",
|
|
271
311
|
icon: "fluent:add-16-filled",
|
|
272
312
|
variant: "primary",
|
|
273
|
-
onClick:
|
|
313
|
+
onClick: l[6] || (l[6] = (d) => t.$emit("add"))
|
|
274
314
|
}, {
|
|
275
|
-
default:
|
|
276
|
-
|
|
277
|
-
])
|
|
315
|
+
default: r(() => [
|
|
316
|
+
h(u(g.value), 1)
|
|
317
|
+
]),
|
|
278
318
|
_: 1
|
|
279
319
|
}))
|
|
280
|
-
], 64)) :
|
|
320
|
+
], 64)) : y("", !0)
|
|
281
321
|
]),
|
|
282
|
-
|
|
322
|
+
k(t.$slots, "after-add")
|
|
283
323
|
])
|
|
284
324
|
])
|
|
285
325
|
], 2)),
|
|
286
|
-
|
|
287
|
-
class:
|
|
326
|
+
b("div", {
|
|
327
|
+
class: S(["flex-1 w-full relative min-h-[300px]", e.containerClass])
|
|
288
328
|
}, [
|
|
289
|
-
!
|
|
290
|
-
|
|
329
|
+
!Z.value && !e.loading ? k(t.$slots, "empty", { key: 0 }, () => [
|
|
330
|
+
f(R(me), {
|
|
291
331
|
title: e.emptyTitle,
|
|
332
|
+
titleI18n: e.emptyTitleI18n,
|
|
292
333
|
description: e.emptyDescription,
|
|
334
|
+
descriptionI18n: e.emptyDescriptionI18n,
|
|
293
335
|
icon: e.emptyIcon
|
|
294
336
|
}, {
|
|
295
|
-
action:
|
|
296
|
-
e.addComponent ? (
|
|
297
|
-
e.addBtn ? (
|
|
298
|
-
e.addBtn.modal ? (
|
|
337
|
+
action: r(() => [
|
|
338
|
+
e.addComponent ? (n(), s(L(e.addComponent), { key: 0 })) : e.canAdd ? (n(), o(I, { key: 1 }, [
|
|
339
|
+
e.addBtn ? (n(), o(I, { key: 0 }, [
|
|
340
|
+
e.addBtn.modal ? (n(), s(O, v({
|
|
299
341
|
key: 0,
|
|
300
342
|
body: e.addBtn.modal
|
|
301
343
|
}, e.addBtn.modalProps), {
|
|
302
|
-
trigger:
|
|
303
|
-
|
|
344
|
+
trigger: r(() => [
|
|
345
|
+
f(m, v({
|
|
304
346
|
icon: e.addBtn.icon || "fluent:add-16-filled",
|
|
305
347
|
variant: e.addBtn.variant || "primary",
|
|
306
348
|
rounded: "full",
|
|
307
349
|
class: "px-6!"
|
|
308
350
|
}, e.addBtn.buttonProps), {
|
|
309
|
-
default:
|
|
310
|
-
|
|
351
|
+
default: r(() => [
|
|
352
|
+
h(u(g.value), 1)
|
|
311
353
|
]),
|
|
312
354
|
_: 1
|
|
313
355
|
}, 16, ["icon", "variant"])
|
|
314
356
|
]),
|
|
315
357
|
_: 1
|
|
316
|
-
}, 16, ["body"])) : e.addBtn.to ? (
|
|
358
|
+
}, 16, ["body"])) : e.addBtn.to ? (n(), s(H, {
|
|
317
359
|
key: 1,
|
|
318
360
|
to: e.addBtn.to,
|
|
319
361
|
class: "inline-flex"
|
|
320
362
|
}, {
|
|
321
|
-
default:
|
|
322
|
-
|
|
363
|
+
default: r(() => [
|
|
364
|
+
f(m, v({
|
|
323
365
|
icon: e.addBtn.icon || "fluent:add-16-filled",
|
|
324
366
|
variant: e.addBtn.variant || "outline"
|
|
325
367
|
}, e.addBtn.buttonProps), {
|
|
326
|
-
default:
|
|
327
|
-
|
|
368
|
+
default: r(() => [
|
|
369
|
+
h(u(g.value), 1)
|
|
328
370
|
]),
|
|
329
371
|
_: 1
|
|
330
372
|
}, 16, ["icon", "variant"])
|
|
331
373
|
]),
|
|
332
374
|
_: 1
|
|
333
|
-
}, 8, ["to"])) : e.addBtn.href ? (
|
|
375
|
+
}, 8, ["to"])) : e.addBtn.href ? (n(), o("a", {
|
|
334
376
|
key: 2,
|
|
335
377
|
href: e.addBtn.href,
|
|
336
378
|
target: e.addBtn.target,
|
|
337
379
|
class: "inline-flex"
|
|
338
380
|
}, [
|
|
339
|
-
|
|
381
|
+
f(m, v({
|
|
340
382
|
icon: e.addBtn.icon || "lucide:plus",
|
|
341
383
|
variant: e.addBtn.variant || "outline"
|
|
342
384
|
}, e.addBtn.buttonProps), {
|
|
343
|
-
default:
|
|
344
|
-
|
|
385
|
+
default: r(() => [
|
|
386
|
+
h(u(g.value), 1)
|
|
345
387
|
]),
|
|
346
388
|
_: 1
|
|
347
389
|
}, 16, ["icon", "variant"])
|
|
348
|
-
], 8,
|
|
390
|
+
], 8, Ve)) : (n(), s(m, v({
|
|
349
391
|
key: 3,
|
|
350
392
|
icon: e.addBtn.icon || "lucide:plus",
|
|
351
393
|
variant: e.addBtn.variant || "outline"
|
|
352
394
|
}, e.addBtn.buttonProps, {
|
|
353
|
-
onClick:
|
|
395
|
+
onClick: l[7] || (l[7] = (d) => e.addBtn.onClick ? e.addBtn.onClick() : t.$emit("add"))
|
|
354
396
|
}), {
|
|
355
|
-
default:
|
|
356
|
-
|
|
397
|
+
default: r(() => [
|
|
398
|
+
h(u(g.value), 1)
|
|
357
399
|
]),
|
|
358
400
|
_: 1
|
|
359
401
|
}, 16, ["icon", "variant"]))
|
|
360
|
-
], 64)) : (
|
|
402
|
+
], 64)) : (n(), s(m, {
|
|
361
403
|
key: 1,
|
|
362
404
|
icon: "lucide:plus",
|
|
363
405
|
variant: "outline",
|
|
364
|
-
onClick:
|
|
406
|
+
onClick: l[8] || (l[8] = (d) => t.$emit("add"))
|
|
365
407
|
}, {
|
|
366
|
-
default:
|
|
367
|
-
|
|
368
|
-
])
|
|
408
|
+
default: r(() => [
|
|
409
|
+
h(u(g.value), 1)
|
|
410
|
+
]),
|
|
369
411
|
_: 1
|
|
370
412
|
}))
|
|
371
|
-
], 64)) :
|
|
413
|
+
], 64)) : y("", !0)
|
|
372
414
|
]),
|
|
373
415
|
_: 1
|
|
374
|
-
}, 8, ["title", "description", "icon"])
|
|
375
|
-
]) : (
|
|
376
|
-
|
|
416
|
+
}, 8, ["title", "titleI18n", "description", "descriptionI18n", "icon"])
|
|
417
|
+
]) : (n(), o(I, { key: 1 }, [
|
|
418
|
+
q.value ? (n(), s(L(q.value), {
|
|
377
419
|
key: 0,
|
|
378
420
|
data: e.data,
|
|
379
421
|
loading: e.loading,
|
|
380
422
|
refetch: e.refetch,
|
|
381
|
-
selectedRows:
|
|
382
|
-
"onUpdate:selectedRows":
|
|
383
|
-
delete:
|
|
384
|
-
onDelete:
|
|
385
|
-
}, null, 40, ["data", "loading", "refetch", "selectedRows"])) : (
|
|
423
|
+
selectedRows: B.value,
|
|
424
|
+
"onUpdate:selectedRows": l[9] || (l[9] = (d) => B.value = d),
|
|
425
|
+
delete: A,
|
|
426
|
+
onDelete: W
|
|
427
|
+
}, null, 40, ["data", "loading", "refetch", "selectedRows"])) : (n(), o("div", Te, u(oe.value), 1))
|
|
386
428
|
], 64))
|
|
387
429
|
], 2),
|
|
388
|
-
e.pagination && e.pageInfo && e.pageInfo.totalPages > 1 ? (
|
|
389
|
-
|
|
430
|
+
e.pagination && e.pageInfo && e.pageInfo.totalPages > 1 ? (n(), o("div", Se, [
|
|
431
|
+
f(R(fe), v({
|
|
390
432
|
"current-page": e.pageInfo.currentPage,
|
|
391
433
|
"total-pages": e.pageInfo.totalPages,
|
|
392
434
|
"total-items": e.pageInfo.totalItems
|
|
393
435
|
}, e.paginationProps, {
|
|
394
|
-
onChange:
|
|
395
|
-
"onUpdate:itemsPerPage":
|
|
436
|
+
onChange: X,
|
|
437
|
+
"onUpdate:itemsPerPage": Y
|
|
396
438
|
}), null, 16, ["current-page", "total-pages", "total-items"])
|
|
397
|
-
])) :
|
|
398
|
-
|
|
399
|
-
show:
|
|
400
|
-
"onUpdate:show":
|
|
401
|
-
title:
|
|
402
|
-
description:
|
|
403
|
-
"confirm-text":
|
|
404
|
-
"cancel-text":
|
|
439
|
+
])) : y("", !0),
|
|
440
|
+
f(ue, {
|
|
441
|
+
show: P.value,
|
|
442
|
+
"onUpdate:show": l[10] || (l[10] = (d) => P.value = d),
|
|
443
|
+
title: ae.value,
|
|
444
|
+
description: le.value,
|
|
445
|
+
"confirm-text": ie.value,
|
|
446
|
+
"cancel-text": de.value,
|
|
405
447
|
variant: "danger",
|
|
406
|
-
onConfirm:
|
|
407
|
-
onCancel:
|
|
408
|
-
}, null, 8, ["show", "description"])
|
|
448
|
+
onConfirm: J,
|
|
449
|
+
onCancel: l[11] || (l[11] = (d) => P.value = !1)
|
|
450
|
+
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text"])
|
|
409
451
|
]);
|
|
410
452
|
};
|
|
411
453
|
}
|
|
412
454
|
});
|
|
413
455
|
export {
|
|
414
|
-
|
|
456
|
+
Ke as default
|
|
415
457
|
};
|