vlite3 0.7.13 → 0.7.15
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 +1 -1
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +18 -17
- package/components/{CommandPaletteContent.vue.d.ts → CommandPalette/CommandPaletteContent.vue.d.ts} +3 -3
- package/components/CommandPalette/CommandPaletteContent.vue.js +7 -0
- package/components/CommandPalette/CommandPaletteContent.vue2.js +180 -0
- package/components/CommandPalette/CommandPaletteItem.vue.d.ts +15 -0
- package/components/CommandPalette/CommandPaletteItem.vue2.js +7 -0
- package/components/CommandPalette/CommandPaletteItem.vue3.js +60 -0
- package/components/CommandPalette/index.d.ts +5 -0
- package/components/CommandPalette/types.d.ts +40 -0
- package/components/CommandPalette/useCommandPaletteItems.d.ts +15 -0
- package/components/CommandPalette/useCommandPaletteItems.js +99 -0
- package/components/CommandPalette/useCommandPaletteNav.d.ts +13 -0
- package/components/CommandPalette/useCommandPaletteNav.js +49 -0
- package/components/DataList/DataList.vue.js +53 -50
- package/components/DataTable/DataTable.vue.js +185 -173
- package/components/DatePicker.vue.js +3 -2
- package/components/DateRangePicker.vue.js +26 -25
- package/components/Dropdown/Dropdown.vue.js +20 -20
- package/components/Dropdown/DropdownMenu.vue.js +5 -256
- package/components/Dropdown/DropdownMenu.vue2.js +256 -2
- package/components/Form/CustomFields.vue.js +1 -1
- package/components/Form/CustomFields.vue2.js +102 -97
- package/components/Form/Form.vue.d.ts +0 -1
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +20 -20
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +90 -78
- package/components/IconPicker.vue.js +3 -2
- package/components/ImportData/ImportStep2.vue.js +10 -9
- package/components/List/List.vue.js +205 -180
- package/components/Modal.vue.js +2 -2
- package/components/Modal.vue2.js +82 -96
- package/components/MultiSelect/MultiSelect.vue.js +7 -7
- package/components/Navbar/Navbar.vue.js +12 -12
- package/components/NavbarCommandPalette.vue.d.ts +7 -30
- package/components/NavbarCommandPalette.vue.js +40 -40
- package/components/PermissionMatrix/PermissionEditorList.vue.js +1 -1
- package/components/PermissionMatrix/PermissionEditorList.vue2.js +84 -75
- package/components/PermissionMatrix/PermissionEditorMatrix.vue.js +2 -2
- package/components/PermissionMatrix/PermissionEditorMatrix.vue2.js +122 -107
- package/components/PermissionMatrix/PermissionMatrix.vue.js +2 -2
- package/components/PermissionMatrix/PermissionMatrix.vue2.js +161 -138
- package/components/PermissionMatrix/PermissionTopBar.vue.js +19 -18
- package/components/Screen/Screen.vue.js +169 -166
- package/components/Screen/ScreenFilter.vue.js +4 -3
- package/components/SidePanel.vue.js +5 -146
- package/components/SidePanel.vue2.js +146 -2
- package/components/SidebarMenu/SidebarMenuItem.vue.js +26 -25
- package/components/Workbook/Sheet.vue.js +3 -2
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/components/CommandPaletteContent.vue.js +0 -7
- package/components/CommandPaletteContent.vue2.js +0 -311
- /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as Ve, useSlots as Re, computed as i, ref as y, markRaw as H, provide as K, watch as J, resolveComponent as Ee, openBlock as a, createElementBlock as s, normalizeClass as N, createElementVNode as w, renderSlot as p, toDisplayString as m, createBlock as c, withCtx as d, createVNode as u, createCommentVNode as f, unref as x, resolveDynamicComponent as Q, Fragment as P, mergeProps as v, createTextVNode as B, renderList as Ae } from "vue";
|
|
2
|
+
import je from "../Input.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import h from "../Button.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { usePersistentState as
|
|
16
|
-
import { useVLiteConfig as
|
|
5
|
+
import F from "../Icon.vue.js";
|
|
6
|
+
import Oe from "../Tooltip.vue.js";
|
|
7
|
+
import X from "../Modal.vue.js";
|
|
8
|
+
import Ne from "../ConfirmationModal.vue.js";
|
|
9
|
+
import Fe from "../Pagination/Pagination.vue.js";
|
|
10
|
+
import Me from "../Empty/Empty.vue.js";
|
|
11
|
+
import Le from "./ScreenFilter.vue.js";
|
|
12
|
+
import Ue from "../Dropdown/Dropdown.vue.js";
|
|
13
|
+
import qe from "../ExportData/ExportData.vue.js";
|
|
14
|
+
import ze from "../ImportData/ImportData.vue.js";
|
|
15
|
+
import { usePersistentState as He } from "../../utils/usePersistentState.js";
|
|
16
|
+
import { useVLiteConfig as Ke } from "../../core/config.js";
|
|
17
17
|
import { $t as r } from "../../utils/i18n.js";
|
|
18
|
-
import { SCREEN_CONTEXT_KEY as
|
|
19
|
-
const
|
|
18
|
+
import { SCREEN_CONTEXT_KEY as Je } from "../DataTable/types.js";
|
|
19
|
+
const Qe = { class: "flex flex-col w-full space-y-8" }, Xe = { class: "flex flex-col shrink-0" }, Ye = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "flex items-center! gap-2"
|
|
22
|
-
},
|
|
22
|
+
}, Ge = { class: "text-fs-7.5 font-bold text-foreground" }, We = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "text-sm text-gray-700 mt-1 md:max-w-[450px]"
|
|
25
|
-
},
|
|
25
|
+
}, Ze = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-2.5 w-full justify-end" }, _e = { class: "flex items-center gap-2 w-full sm:w-auto flex-1 md:flex-none justify-start sm:justify-end" }, et = {
|
|
26
26
|
key: 1,
|
|
27
27
|
class: "flex items-center p-1 rounded-md border border-border shrink-0"
|
|
28
|
-
},
|
|
28
|
+
}, tt = ["title"], lt = ["title"], at = {
|
|
29
29
|
key: 4,
|
|
30
30
|
class: "w-full md:w-60! max-sm:order-last"
|
|
31
|
-
},
|
|
31
|
+
}, nt = { class: "flex items-center gap-3 max-sm:w-full sm:w-auto max-sm:order-last" }, ot = ["href", "target"], it = ["href", "target"], rt = {
|
|
32
32
|
key: 4,
|
|
33
33
|
class: "p-8 text-center text-muted-foreground border border-dashed border-border rounded-lg"
|
|
34
|
-
},
|
|
34
|
+
}, dt = {
|
|
35
35
|
key: 2,
|
|
36
36
|
class: "-mt-2"
|
|
37
|
-
},
|
|
37
|
+
}, st = { class: "px-1 py-1 text-sm" }, ct = { class: "font-medium mb-3 text-muted-foreground" }, ut = { class: "space-y-3" }, ft = { key: 4 }, Rt = /* @__PURE__ */ Ve({
|
|
38
38
|
__name: "Screen",
|
|
39
39
|
props: {
|
|
40
40
|
name: { default: "" },
|
|
@@ -83,83 +83,86 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
|
|
|
83
83
|
canSelectRows: { type: Boolean, default: !0 }
|
|
84
84
|
},
|
|
85
85
|
emits: ["add", "delete"],
|
|
86
|
-
setup(t, { emit:
|
|
87
|
-
const l = t, S =
|
|
88
|
-
`view-mode-${
|
|
86
|
+
setup(t, { emit: ne }) {
|
|
87
|
+
const l = t, S = Ke(), Y = ne, V = Re(), oe = i(() => l.name || l.title || "default-screen"), k = He(
|
|
88
|
+
`view-mode-${oe.value}`,
|
|
89
89
|
l.table || V.table ? "table" : "list"
|
|
90
|
-
), $ = y(""), R = y({}),
|
|
90
|
+
), $ = y(""), R = y({}), G = y({ field: "", order: "" }), I = y(l.pageInfo?.currentPage || 1), M = y(l.pageInfo?.itemsPerPage || l.paginationProps?.itemsPerPage || 10), g = y([]), E = y([]), T = y(!1), A = i(() => l.addComponent ? H(l.addComponent) : void 0), W = i(() => l.addBtn?.modal ? H(l.addBtn.modal) : void 0), Z = i(() => {
|
|
91
|
+
let e;
|
|
92
|
+
return k.value === "table" ? e = l.table || !!V.table : e = l.list || !!V.list || !!V.grid, typeof e == "object" && e !== null ? H(e) : e;
|
|
93
|
+
}), ie = {
|
|
91
94
|
disableSearch: !0,
|
|
92
95
|
forceSelectable: l.canSelectRows,
|
|
93
96
|
onTableChange: (e) => {
|
|
94
|
-
|
|
97
|
+
G.value = { field: e.sort.field, order: e.sort.order }, C();
|
|
95
98
|
}
|
|
96
99
|
};
|
|
97
|
-
|
|
100
|
+
K(Je, ie), K("screen-selected-rows", g), K("screen-request-delete", (e) => D(e));
|
|
98
101
|
const D = (e) => {
|
|
99
102
|
E.value = e, T.value = !0;
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
},
|
|
103
|
-
|
|
103
|
+
}, re = () => {
|
|
104
|
+
Y("delete", E.value), T.value = !1, g.value = [];
|
|
105
|
+
}, de = (e) => {
|
|
106
|
+
Y("delete", e), g.value = [];
|
|
104
107
|
};
|
|
105
|
-
|
|
108
|
+
J(
|
|
106
109
|
() => l.pageInfo?.currentPage,
|
|
107
110
|
(e) => {
|
|
108
111
|
e && (I.value = e);
|
|
109
112
|
}
|
|
110
|
-
),
|
|
113
|
+
), J(
|
|
111
114
|
() => l.pageInfo?.itemsPerPage,
|
|
112
115
|
(e) => {
|
|
113
|
-
e && (
|
|
116
|
+
e && (M.value = e);
|
|
114
117
|
}
|
|
115
118
|
);
|
|
116
119
|
let L = null;
|
|
117
|
-
|
|
120
|
+
J($, () => {
|
|
118
121
|
L && clearTimeout(L), L = setTimeout(() => {
|
|
119
122
|
I.value = 1, C();
|
|
120
123
|
}, 300);
|
|
121
124
|
});
|
|
122
|
-
const
|
|
125
|
+
const se = (e) => {
|
|
123
126
|
I.value = e, C();
|
|
124
|
-
},
|
|
125
|
-
|
|
127
|
+
}, ce = (e) => {
|
|
128
|
+
M.value = e, I.value = 1, C();
|
|
126
129
|
}, C = () => {
|
|
127
130
|
l.refetch && l.refetch({
|
|
128
|
-
pagination: { page: I.value, limit:
|
|
131
|
+
pagination: { page: I.value, limit: M.value },
|
|
129
132
|
search: $.value,
|
|
130
|
-
sort: { ...
|
|
133
|
+
sort: { ...G.value },
|
|
131
134
|
filter: { ...R.value }
|
|
132
135
|
});
|
|
133
|
-
},
|
|
136
|
+
}, ue = i(() => l.data && l.data.length > 0), _ = i(() => l.titleI18n ? r(l.titleI18n) : l.title), ee = i(
|
|
134
137
|
() => l.descriptionI18n ? r(l.descriptionI18n) : l.description
|
|
135
|
-
),
|
|
138
|
+
), fe = i(() => {
|
|
136
139
|
const e = r("vlite.screen.deleteSelected");
|
|
137
140
|
return e !== "vlite.screen.deleteSelected" ? e : "Delete Selected";
|
|
138
|
-
}),
|
|
141
|
+
}), me = i(() => {
|
|
139
142
|
const e = r("vlite.screen.listView");
|
|
140
143
|
return e !== "vlite.screen.listView" ? e : "List View";
|
|
141
|
-
}),
|
|
144
|
+
}), ve = i(() => {
|
|
142
145
|
const e = r("vlite.screen.tableView");
|
|
143
146
|
return e !== "vlite.screen.tableView" ? e : "Table View";
|
|
144
|
-
}),
|
|
147
|
+
}), ge = i(() => {
|
|
145
148
|
const e = r("vlite.screen.refresh");
|
|
146
149
|
return e !== "vlite.screen.refresh" ? e : "Refresh";
|
|
147
|
-
}),
|
|
150
|
+
}), he = i(() => {
|
|
148
151
|
const e = r("vlite.screen.searchPlaceholder");
|
|
149
152
|
return e !== "vlite.screen.searchPlaceholder" ? e : "Search...";
|
|
150
|
-
}),
|
|
153
|
+
}), ye = i(() => {
|
|
151
154
|
const e = r("vlite.screen.confirmDeleteTitle");
|
|
152
155
|
return e !== "vlite.screen.confirmDeleteTitle" ? e : "Confirm Deletion";
|
|
153
|
-
}),
|
|
156
|
+
}), we = i(() => {
|
|
154
157
|
const e = r("vlite.screen.confirmDeleteDesc", { count: E.value.length });
|
|
155
158
|
return e !== "vlite.screen.confirmDeleteDesc" ? e : `Are you sure you want to delete the selected ${E.value.length > 1 ? "items" : "item"}?`;
|
|
156
|
-
}),
|
|
159
|
+
}), pe = i(() => {
|
|
157
160
|
const e = r("vlite.screen.confirmDeleteBtn");
|
|
158
161
|
return e !== "vlite.screen.confirmDeleteBtn" ? e : "Delete";
|
|
159
|
-
}),
|
|
162
|
+
}), xe = i(() => {
|
|
160
163
|
const e = r("vlite.screen.cancelBtn");
|
|
161
164
|
return e !== "vlite.screen.cancelBtn" ? e : "Cancel";
|
|
162
|
-
}),
|
|
165
|
+
}), be = i(() => {
|
|
163
166
|
const e = r("vlite.screen.missingView");
|
|
164
167
|
return e !== "vlite.screen.missingView" ? e : "Please provide a `:list` or `:table` component or slot.";
|
|
165
168
|
}), b = i(() => {
|
|
@@ -167,31 +170,31 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
|
|
|
167
170
|
if (l.addBtn?.label) return l.addBtn.label;
|
|
168
171
|
const e = r("vlite.screen.addNew");
|
|
169
172
|
return e !== "vlite.screen.addNew" ? e : "Add New";
|
|
170
|
-
}),
|
|
173
|
+
}), te = i(
|
|
171
174
|
() => l.exportSchema && l.exportSchema.length > 0 && l.exportProps !== !1 || l.importSchema && l.importSchema.length > 0 && l.importProps !== !1
|
|
172
|
-
),
|
|
175
|
+
), U = i(() => {
|
|
173
176
|
const e = r("vlite.screen.exportData");
|
|
174
177
|
return e !== "vlite.screen.exportData" ? e : "Export Data";
|
|
175
|
-
}),
|
|
178
|
+
}), le = i(() => {
|
|
176
179
|
const e = r("vlite.screen.importData");
|
|
177
180
|
return e !== "vlite.screen.importData" ? e : "Import Data";
|
|
178
|
-
}),
|
|
181
|
+
}), Be = i(() => {
|
|
179
182
|
const e = [];
|
|
180
|
-
return l.exportProps !== !1 && e.push({ value: "export", label:
|
|
181
|
-
}),
|
|
182
|
-
e.value === "export" ?
|
|
183
|
-
},
|
|
183
|
+
return l.exportProps !== !1 && e.push({ value: "export", label: U.value, icon: "lucide:download" }), l.importProps !== !1 && e.push({ value: "import", label: le.value, icon: "lucide:upload" }), e;
|
|
184
|
+
}), q = y(null), ke = y(null), j = y(!1), z = y(!1), Ce = (e) => {
|
|
185
|
+
e.value === "export" ? j.value = !0 : e.value === "import" && (z.value = !0);
|
|
186
|
+
}, De = i(
|
|
184
187
|
() => (l.exportSchema || []).map((e) => ({
|
|
185
188
|
field: e.name || e.field,
|
|
186
189
|
title: e.label || e.title || e.name || e.field
|
|
187
190
|
}))
|
|
188
|
-
),
|
|
191
|
+
), Pe = i(
|
|
189
192
|
() => (l.importSchema || []).map((e) => ({
|
|
190
193
|
field: e.name || e.field,
|
|
191
194
|
title: e.label || e.title || e.name || e.field,
|
|
192
195
|
required: e.required || !1
|
|
193
196
|
}))
|
|
194
|
-
),
|
|
197
|
+
), Se = async (e) => S?.services?.importApi && l.importType ? await S.services.importApi(l.importType, e) : (console.warn(
|
|
195
198
|
"VLite Screen: No importApi configured or no importType provided for generic import."
|
|
196
199
|
), {
|
|
197
200
|
processed: e.data.length,
|
|
@@ -200,9 +203,9 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
|
|
|
200
203
|
skipped: 0,
|
|
201
204
|
failed: 0,
|
|
202
205
|
errors: []
|
|
203
|
-
}),
|
|
206
|
+
}), $e = () => C(), Ie = i(
|
|
204
207
|
() => l.exportMode || S?.exportData?.mode || "frontend"
|
|
205
|
-
),
|
|
208
|
+
), Te = async (e) => {
|
|
206
209
|
S?.services?.exportApi && l.exportType ? await S.services.exportApi(l.exportType, {
|
|
207
210
|
format: e,
|
|
208
211
|
search: $.value,
|
|
@@ -212,24 +215,24 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
|
|
|
212
215
|
);
|
|
213
216
|
};
|
|
214
217
|
return (e, n) => {
|
|
215
|
-
const
|
|
216
|
-
return a(), s("div",
|
|
217
|
-
t.customHeader ?
|
|
218
|
+
const ae = Ee("router-link");
|
|
219
|
+
return a(), s("div", Qe, [
|
|
220
|
+
t.customHeader ? p(e.$slots, "custom-header", { key: 1 }) : (a(), s("div", {
|
|
218
221
|
key: 0,
|
|
219
|
-
class:
|
|
222
|
+
class: N([t.headerClass, "flex flex-col md:flex-row sm:items-start md:items-center justify-between gap-4"])
|
|
220
223
|
}, [
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
t.info || t.infoI18n ? (a(), c(
|
|
224
|
+
w("div", Xe, [
|
|
225
|
+
p(e.$slots, "title", {}, () => [
|
|
226
|
+
_.value ? (a(), s("div", Ye, [
|
|
227
|
+
w("h1", Ge, m(_.value), 1),
|
|
228
|
+
t.info || t.infoI18n ? (a(), c(Oe, {
|
|
226
229
|
key: 0,
|
|
227
230
|
content: t.info,
|
|
228
231
|
"content-i18n": t.infoI18n,
|
|
229
232
|
placement: "right"
|
|
230
233
|
}, {
|
|
231
234
|
default: d(() => [
|
|
232
|
-
u(
|
|
235
|
+
u(F, {
|
|
233
236
|
icon: "lucide:info",
|
|
234
237
|
class: "w-[18px] h-[18px] mt-3! text-muted-foreground hover:text-foreground cursor-pointer transition-colors outline-none"
|
|
235
238
|
})
|
|
@@ -238,58 +241,58 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
|
|
|
238
241
|
}, 8, ["content", "content-i18n"])) : f("", !0)
|
|
239
242
|
])) : f("", !0)
|
|
240
243
|
]),
|
|
241
|
-
|
|
242
|
-
|
|
244
|
+
p(e.$slots, "description", {}, () => [
|
|
245
|
+
ee.value ? (a(), s("p", We, m(ee.value), 1)) : f("", !0)
|
|
243
246
|
])
|
|
244
247
|
]),
|
|
245
|
-
|
|
246
|
-
|
|
248
|
+
w("div", Ze, [
|
|
249
|
+
w("div", _e, [
|
|
247
250
|
g.value.length > 0 && t.canSelectRows ? (a(), c(h, {
|
|
248
251
|
key: 0,
|
|
249
252
|
variant: "outline",
|
|
250
253
|
class: "hover:bg-destructive/10 shrink-0 h-9! w-9!",
|
|
251
254
|
icon: "lucide:trash-2",
|
|
252
|
-
title:
|
|
255
|
+
title: fe.value,
|
|
253
256
|
onClick: n[0] || (n[0] = (o) => D(g.value))
|
|
254
257
|
}, null, 8, ["title"])) : f("", !0),
|
|
255
|
-
(t.table || e.$slots.table) && (t.list || e.$slots.list || e.$slots.grid) ? (a(), s("div",
|
|
256
|
-
|
|
258
|
+
(t.table || e.$slots.table) && (t.list || e.$slots.list || e.$slots.grid) ? (a(), s("div", et, [
|
|
259
|
+
w("button", {
|
|
257
260
|
onClick: n[1] || (n[1] = (o) => k.value = "list"),
|
|
258
|
-
class:
|
|
259
|
-
|
|
261
|
+
class: N(["p-1.5 rounded", [
|
|
262
|
+
x(k) === "list" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
260
263
|
]]),
|
|
261
|
-
title:
|
|
264
|
+
title: me.value
|
|
262
265
|
}, [
|
|
263
|
-
u(
|
|
266
|
+
u(F, {
|
|
264
267
|
icon: "lucide:layout-grid",
|
|
265
268
|
class: "w-4 h-4"
|
|
266
269
|
})
|
|
267
|
-
], 10,
|
|
268
|
-
|
|
270
|
+
], 10, tt),
|
|
271
|
+
w("button", {
|
|
269
272
|
onClick: n[2] || (n[2] = (o) => k.value = "table"),
|
|
270
|
-
class:
|
|
271
|
-
|
|
273
|
+
class: N(["p-1.5 rounded", [
|
|
274
|
+
x(k) === "table" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
272
275
|
]]),
|
|
273
|
-
title:
|
|
276
|
+
title: ve.value
|
|
274
277
|
}, [
|
|
275
|
-
u(
|
|
278
|
+
u(F, {
|
|
276
279
|
icon: "lucide:list",
|
|
277
280
|
class: "w-4 h-4"
|
|
278
281
|
})
|
|
279
|
-
], 10,
|
|
282
|
+
], 10, lt)
|
|
280
283
|
])) : f("", !0),
|
|
281
|
-
|
|
284
|
+
p(e.$slots, "before-search"),
|
|
282
285
|
t.showRefresh ? (a(), c(h, {
|
|
283
286
|
key: 2,
|
|
284
287
|
variant: "outline",
|
|
285
288
|
icon: "lucide:refresh-cw",
|
|
286
289
|
size: "lg",
|
|
287
290
|
class: "shrink-0 h-9! w-9!",
|
|
288
|
-
title:
|
|
291
|
+
title: ge.value,
|
|
289
292
|
disabled: t.loading,
|
|
290
293
|
onClick: C
|
|
291
294
|
}, null, 8, ["title", "disabled"])) : f("", !0),
|
|
292
|
-
t.filterSchema && t.filterSchema.length > 0 ? (a(), c(
|
|
295
|
+
t.filterSchema && t.filterSchema.length > 0 ? (a(), c(Le, {
|
|
293
296
|
key: 3,
|
|
294
297
|
schema: t.filterSchema,
|
|
295
298
|
type: t.filterType,
|
|
@@ -297,26 +300,26 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
|
|
|
297
300
|
"onUpdate:modelValue": n[3] || (n[3] = (o) => R.value = o),
|
|
298
301
|
onChange: C
|
|
299
302
|
}, null, 8, ["schema", "type", "modelValue"])) : f("", !0),
|
|
300
|
-
t.canSearch ? (a(), s("div",
|
|
301
|
-
u(
|
|
303
|
+
t.canSearch ? (a(), s("div", at, [
|
|
304
|
+
u(je, {
|
|
302
305
|
lazy: "",
|
|
303
306
|
modelValue: $.value,
|
|
304
307
|
"onUpdate:modelValue": n[4] || (n[4] = (o) => $.value = o),
|
|
305
308
|
icon: "lucide:search",
|
|
306
|
-
placeholder:
|
|
309
|
+
placeholder: he.value,
|
|
307
310
|
variant: "outline",
|
|
308
311
|
class: "bg-background w-full",
|
|
309
312
|
"show-clear-button": !0
|
|
310
313
|
}, null, 8, ["modelValue", "placeholder"])
|
|
311
314
|
])) : f("", !0)
|
|
312
315
|
]),
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
+
w("div", nt, [
|
|
317
|
+
p(e.$slots, "actions", {}, () => [
|
|
318
|
+
A.value ? (a(), c(Q(A.value), { key: 0 })) : t.canAdd ? (a(), s(P, { key: 1 }, [
|
|
316
319
|
t.addBtn ? (a(), s(P, { key: 0 }, [
|
|
317
|
-
t.addBtn.modal ? (a(), c(
|
|
320
|
+
t.addBtn.modal ? (a(), c(X, v({
|
|
318
321
|
key: 0,
|
|
319
|
-
body:
|
|
322
|
+
body: W.value
|
|
320
323
|
}, t.addBtn.modalProps, {
|
|
321
324
|
refetch: t.refetch,
|
|
322
325
|
data: t.data,
|
|
@@ -336,7 +339,7 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
|
|
|
336
339
|
}, 16, ["icon", "variant"])
|
|
337
340
|
]),
|
|
338
341
|
_: 1
|
|
339
|
-
}, 16, ["body", "refetch", "data", "loading"])) : t.addBtn.to ? (a(), c(
|
|
342
|
+
}, 16, ["body", "refetch", "data", "loading"])) : t.addBtn.to ? (a(), c(ae, {
|
|
340
343
|
key: 1,
|
|
341
344
|
to: t.addBtn.to,
|
|
342
345
|
class: "inline-flex w-full sm:w-auto"
|
|
@@ -370,7 +373,7 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
|
|
|
370
373
|
]),
|
|
371
374
|
_: 1
|
|
372
375
|
}, 16, ["icon", "variant"])
|
|
373
|
-
], 8,
|
|
376
|
+
], 8, ot)) : (a(), c(h, v({
|
|
374
377
|
key: 3,
|
|
375
378
|
class: "w-full sm:w-auto",
|
|
376
379
|
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
@@ -386,33 +389,33 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
|
|
|
386
389
|
], 64)) : f("", !0)
|
|
387
390
|
], 64)) : f("", !0)
|
|
388
391
|
]),
|
|
389
|
-
|
|
392
|
+
te.value ? (a(), c(Ue, {
|
|
390
393
|
key: 0,
|
|
391
394
|
closeOnSelect: "",
|
|
392
395
|
position: "bottom-end",
|
|
393
|
-
options:
|
|
394
|
-
onOnSelect:
|
|
396
|
+
options: Be.value,
|
|
397
|
+
onOnSelect: Ce
|
|
395
398
|
}, {
|
|
396
399
|
trigger: d(() => [
|
|
397
400
|
u(h, {
|
|
398
401
|
variant: "outline",
|
|
399
402
|
icon: "lucide:more-vertical",
|
|
400
403
|
class: "px-2!",
|
|
401
|
-
title:
|
|
404
|
+
title: x(r)("vlite.screen.moreOptions") !== "vlite.screen.moreOptions" ? x(r)("vlite.screen.moreOptions") : "More Options"
|
|
402
405
|
}, null, 8, ["title"])
|
|
403
406
|
]),
|
|
404
407
|
_: 1
|
|
405
408
|
}, 8, ["options"])) : f("", !0),
|
|
406
|
-
|
|
409
|
+
p(e.$slots, "after-add")
|
|
407
410
|
])
|
|
408
411
|
])
|
|
409
412
|
], 2)),
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
class:
|
|
413
|
+
p(e.$slots, "sub-header"),
|
|
414
|
+
w("div", {
|
|
415
|
+
class: N(["flex-1 w-full relative", t.containerClass])
|
|
413
416
|
}, [
|
|
414
|
-
!
|
|
415
|
-
u(
|
|
417
|
+
!ue.value && !t.loading ? p(e.$slots, "empty", { key: 0 }, () => [
|
|
418
|
+
u(x(Me), {
|
|
416
419
|
title: t.emptyTitle,
|
|
417
420
|
titleI18n: t.emptyTitleI18n,
|
|
418
421
|
description: t.emptyDescription,
|
|
@@ -420,11 +423,11 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
|
|
|
420
423
|
icon: t.emptyIcon
|
|
421
424
|
}, {
|
|
422
425
|
action: d(() => [
|
|
423
|
-
|
|
426
|
+
A.value ? (a(), c(Q(A.value), { key: 0 })) : t.canAdd ? (a(), s(P, { key: 1 }, [
|
|
424
427
|
t.addBtn ? (a(), s(P, { key: 0 }, [
|
|
425
|
-
t.addBtn.modal ? (a(), c(
|
|
428
|
+
t.addBtn.modal ? (a(), c(X, v({
|
|
426
429
|
key: 0,
|
|
427
|
-
body:
|
|
430
|
+
body: W.value
|
|
428
431
|
}, t.addBtn.modalProps), {
|
|
429
432
|
trigger: d(() => [
|
|
430
433
|
u(h, v({
|
|
@@ -440,7 +443,7 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
|
|
|
440
443
|
}, 16, ["icon", "variant"])
|
|
441
444
|
]),
|
|
442
445
|
_: 1
|
|
443
|
-
}, 16, ["body"])) : t.addBtn.to ? (a(), c(
|
|
446
|
+
}, 16, ["body"])) : t.addBtn.to ? (a(), c(ae, {
|
|
444
447
|
key: 1,
|
|
445
448
|
to: t.addBtn.to,
|
|
446
449
|
class: "inline-flex"
|
|
@@ -472,7 +475,7 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
|
|
|
472
475
|
]),
|
|
473
476
|
_: 1
|
|
474
477
|
}, 16, ["icon", "variant"])
|
|
475
|
-
], 8,
|
|
478
|
+
], 8, it)) : (a(), c(h, v({
|
|
476
479
|
key: 3,
|
|
477
480
|
icon: t.addBtn.icon || "lucide:plus",
|
|
478
481
|
variant: t.addBtn.variant || "outline"
|
|
@@ -500,28 +503,28 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
|
|
|
500
503
|
_: 1
|
|
501
504
|
}, 8, ["title", "titleI18n", "description", "descriptionI18n", "icon"])
|
|
502
505
|
]) : (a(), s(P, { key: 1 }, [
|
|
503
|
-
|
|
506
|
+
x(k) === "table" && e.$slots.table ? p(e.$slots, "table", {
|
|
504
507
|
key: 0,
|
|
505
508
|
data: t.data,
|
|
506
509
|
loading: t.loading,
|
|
507
510
|
selectedRows: g.value,
|
|
508
511
|
delete: D,
|
|
509
512
|
updateSelectedRows: (o) => g.value = o
|
|
510
|
-
}) :
|
|
513
|
+
}) : x(k) === "list" && e.$slots.list ? p(e.$slots, "list", {
|
|
511
514
|
key: 1,
|
|
512
515
|
data: t.data,
|
|
513
516
|
loading: t.loading,
|
|
514
517
|
selectedRows: g.value,
|
|
515
518
|
delete: D,
|
|
516
519
|
updateSelectedRows: (o) => g.value = o
|
|
517
|
-
}) :
|
|
520
|
+
}) : x(k) === "list" && e.$slots.grid ? p(e.$slots, "grid", {
|
|
518
521
|
key: 2,
|
|
519
522
|
data: t.data,
|
|
520
523
|
loading: t.loading,
|
|
521
524
|
selectedRows: g.value,
|
|
522
525
|
delete: D,
|
|
523
526
|
updateSelectedRows: (o) => g.value = o
|
|
524
|
-
}) :
|
|
527
|
+
}) : Z.value ? (a(), c(Q(Z.value), v({
|
|
525
528
|
key: 3,
|
|
526
529
|
data: t.data,
|
|
527
530
|
loading: t.loading,
|
|
@@ -529,69 +532,69 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
|
|
|
529
532
|
selectedRows: g.value,
|
|
530
533
|
"onUpdate:selectedRows": n[8] || (n[8] = (o) => g.value = o),
|
|
531
534
|
delete: D,
|
|
532
|
-
onDelete:
|
|
533
|
-
}, t.viewProps), null, 16, ["data", "loading", "refetch", "selectedRows"])) : (a(), s("div",
|
|
535
|
+
onDelete: de
|
|
536
|
+
}, t.viewProps), null, 16, ["data", "loading", "refetch", "selectedRows"])) : (a(), s("div", rt, m(be.value), 1))
|
|
534
537
|
], 64))
|
|
535
538
|
], 2),
|
|
536
|
-
t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (a(), s("div",
|
|
537
|
-
u(
|
|
539
|
+
t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (a(), s("div", dt, [
|
|
540
|
+
u(x(Fe), v({
|
|
538
541
|
"current-page": t.pageInfo.currentPage,
|
|
539
542
|
"total-pages": t.pageInfo.totalPages,
|
|
540
543
|
"total-items": t.pageInfo.totalItems
|
|
541
544
|
}, t.paginationProps, {
|
|
542
|
-
onChange:
|
|
543
|
-
"onUpdate:itemsPerPage":
|
|
545
|
+
onChange: se,
|
|
546
|
+
"onUpdate:itemsPerPage": ce
|
|
544
547
|
}), null, 16, ["current-page", "total-pages", "total-items"])
|
|
545
548
|
])) : f("", !0),
|
|
546
|
-
u(
|
|
549
|
+
u(Ne, {
|
|
547
550
|
show: T.value,
|
|
548
551
|
"onUpdate:show": n[9] || (n[9] = (o) => T.value = o),
|
|
549
|
-
title:
|
|
550
|
-
description:
|
|
551
|
-
"confirm-text":
|
|
552
|
-
"cancel-text":
|
|
552
|
+
title: ye.value,
|
|
553
|
+
description: we.value,
|
|
554
|
+
"confirm-text": pe.value,
|
|
555
|
+
"cancel-text": xe.value,
|
|
553
556
|
variant: "danger",
|
|
554
|
-
onConfirm:
|
|
557
|
+
onConfirm: re,
|
|
555
558
|
onCancel: n[10] || (n[10] = (o) => T.value = !1)
|
|
556
559
|
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text"]),
|
|
557
|
-
|
|
560
|
+
j.value ? (a(), c(X, {
|
|
558
561
|
key: 3,
|
|
559
|
-
show:
|
|
560
|
-
"onUpdate:show": n[11] || (n[11] = (o) =>
|
|
561
|
-
title:
|
|
562
|
+
show: j.value,
|
|
563
|
+
"onUpdate:show": n[11] || (n[11] = (o) => j.value = o),
|
|
564
|
+
title: U.value,
|
|
562
565
|
"max-width": "sm:max-w-[400px]"
|
|
563
566
|
}, {
|
|
564
567
|
default: d(({ close: o }) => [
|
|
565
|
-
u(
|
|
568
|
+
u(qe, v({
|
|
566
569
|
ref_key: "exportDataRef",
|
|
567
|
-
ref:
|
|
570
|
+
ref: q,
|
|
568
571
|
data: t.data || [],
|
|
569
|
-
fields:
|
|
570
|
-
mode:
|
|
571
|
-
"on-export":
|
|
572
|
+
fields: De.value,
|
|
573
|
+
mode: Ie.value,
|
|
574
|
+
"on-export": Te
|
|
572
575
|
}, typeof t.exportProps == "object" ? t.exportProps : {}, {
|
|
573
|
-
title:
|
|
576
|
+
title: U.value,
|
|
574
577
|
class: "hidden!"
|
|
575
578
|
}), null, 16, ["data", "fields", "mode", "title"]),
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
(a(!0), s(P, null,
|
|
579
|
+
w("div", st, [
|
|
580
|
+
w("h6", ct, m(x(r)("vlite.exportData.selectFormat") !== "vlite.exportData.selectFormat" ? x(r)("vlite.exportData.selectFormat") : "Select Export Format"), 1),
|
|
581
|
+
w("div", ut, [
|
|
582
|
+
(a(!0), s(P, null, Ae(q.value?.availableFormats || [
|
|
580
583
|
{ value: "excel", label: "Excel (.xlsx)", icon: "lucide:file-spreadsheet" },
|
|
581
584
|
{ value: "csv", label: "CSV (.csv)", icon: "lucide:file-text" },
|
|
582
585
|
{ value: "json", label: "JSON (.json)", icon: "lucide:file-json" }
|
|
583
|
-
], (
|
|
584
|
-
key:
|
|
586
|
+
], (O) => (a(), c(h, {
|
|
587
|
+
key: O.value,
|
|
585
588
|
variant: "outline",
|
|
586
589
|
class: "w-full flex items-center justify-start gap-3 h-12",
|
|
587
|
-
onClick: (
|
|
590
|
+
onClick: (mt) => q.value?.exportData(O.value, o)
|
|
588
591
|
}, {
|
|
589
592
|
default: d(() => [
|
|
590
|
-
u(
|
|
591
|
-
icon:
|
|
593
|
+
u(F, {
|
|
594
|
+
icon: O.icon,
|
|
592
595
|
class: "text-muted-foreground h-5 w-5"
|
|
593
596
|
}, null, 8, ["icon"]),
|
|
594
|
-
|
|
597
|
+
w("span", null, m(O.label), 1)
|
|
595
598
|
]),
|
|
596
599
|
_: 2
|
|
597
600
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -600,17 +603,17 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
|
|
|
600
603
|
]),
|
|
601
604
|
_: 1
|
|
602
605
|
}, 8, ["show", "title"])) : f("", !0),
|
|
603
|
-
|
|
604
|
-
u(
|
|
605
|
-
show:
|
|
606
|
-
"onUpdate:show": n[12] || (n[12] = (o) =>
|
|
606
|
+
te.value ? (a(), s("div", ft, [
|
|
607
|
+
u(ze, v({
|
|
608
|
+
show: z.value,
|
|
609
|
+
"onUpdate:show": n[12] || (n[12] = (o) => z.value = o),
|
|
607
610
|
ref_key: "importDataRef",
|
|
608
|
-
ref:
|
|
609
|
-
fields:
|
|
610
|
-
processBatch:
|
|
611
|
-
onComplete:
|
|
611
|
+
ref: ke,
|
|
612
|
+
fields: Pe.value,
|
|
613
|
+
processBatch: Se,
|
|
614
|
+
onComplete: $e
|
|
612
615
|
}, typeof t.importProps == "object" ? t.importProps : {}, {
|
|
613
|
-
title:
|
|
616
|
+
title: le.value,
|
|
614
617
|
class: "hidden!"
|
|
615
618
|
}), null, 16, ["show", "fields", "title"])
|
|
616
619
|
])) : f("", !0)
|
|
@@ -619,5 +622,5 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
|
|
|
619
622
|
}
|
|
620
623
|
});
|
|
621
624
|
export {
|
|
622
|
-
|
|
625
|
+
Rt as default
|
|
623
626
|
};
|