vlite3 1.0.4 → 1.0.6
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 +19 -3
- package/components/AttachmentsList/AttachmentsList.vue.js +274 -111
- package/components/AttachmentsList/fileTypeIcon.d.ts +16 -0
- package/components/AttachmentsList/fileTypeIcon.js +127 -0
- package/components/AttachmentsList/index.d.ts +1 -0
- package/components/AttachmentsList/types.d.ts +74 -2
- package/components/Avatar.vue.js +2 -2
- package/components/Badge.vue.js +7 -7
- package/components/Button.vue.js +36 -43
- package/components/ButtonGroup.vue.js +2 -2
- package/components/ButtonGroup.vue2.js +8 -8
- package/components/CategoryManager/CategoryManager.vue.d.ts +36 -0
- package/components/CategoryManager/CategoryNode.vue.d.ts +15 -0
- package/components/CategoryManager/index.d.ts +2 -0
- package/components/CategoryManager/types.d.ts +43 -0
- package/components/Chat/ChatBubble.vue.js +70 -56
- package/components/Chat/ChatInterface.vue.js +182 -142
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
- package/components/Dropdown/DropdownMenu.vue.js +2 -2
- package/components/Dropdown/DropdownMenu.vue2.js +1 -0
- package/components/FilePicker/FilePicker.vue.js +117 -122
- package/components/Input.vue.js +28 -26
- package/components/Kanban/Kanban.vue.d.ts +7 -16
- package/components/Kanban/Kanban.vue.js +1 -1
- package/components/Kanban/Kanban.vue2.js +79 -47
- package/components/Kanban/KanbanBoard.vue.js +2 -2
- package/components/Kanban/KanbanBoard.vue2.js +21 -21
- package/components/Kanban/types.d.ts +3 -0
- package/components/List/List.vue.js +89 -85
- package/components/Navbar/Navbar.vue.d.ts +4 -0
- package/components/Navbar/Navbar.vue.js +196 -173
- package/components/Navbar/NavbarTabs.vue.js +72 -66
- package/components/NavbarCommandPalette.vue.js +11 -11
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +144 -104
- package/components/Screen/Screen.vue.d.ts +12 -29
- package/components/Screen/Screen.vue.js +228 -195
- package/components/Screen/components/ScreenViewToggle.vue.d.ts +6 -3
- package/components/Screen/components/ScreenViewToggle.vue.js +29 -34
- package/components/Screen/types.d.ts +59 -7
- package/components/Stats/Stats.vue.d.ts +1 -0
- package/components/Stats/Stats.vue.js +184 -156
- package/components/Stats/types.d.ts +1 -0
- package/components/Workbook/Sheet.vue.d.ts +1 -1
- package/directives/vRipple.js +28 -9
- package/index.js +87 -85
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as Pe, useSlots as Ve, computed as n, markRaw as Q, ref as s, provide as U, watch as N, openBlock as o, createElementBlock as h, normalizeClass as M, createVNode as S, createSlots as $e, withCtx as X, renderSlot as c, normalizeProps as k, guardReactiveProps as V, createElementVNode as R, createBlock as b, createCommentVNode as v, isRef as Ie, unref as Y, mergeProps as x, Fragment as G, resolveDynamicComponent as Fe, toDisplayString as Be } from "vue";
|
|
2
|
+
import Te from "../Input.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { usePersistentState as
|
|
10
|
-
import { useVLiteConfig as
|
|
11
|
-
import { $t as
|
|
12
|
-
import { SCREEN_CONTEXT_KEY as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
const
|
|
4
|
+
import J from "../Button.vue.js";
|
|
5
|
+
import Re from "../ConfirmationModal.vue.js";
|
|
6
|
+
import qe from "../Pagination/Pagination.vue.js";
|
|
7
|
+
import Ee from "./ScreenFilter.vue.js";
|
|
8
|
+
import Ae from "../ImportData/ImportData.vue.js";
|
|
9
|
+
import { usePersistentState as je } from "../../utils/usePersistentState.js";
|
|
10
|
+
import { useVLiteConfig as Qe } from "../../core/config.js";
|
|
11
|
+
import { $t as g } from "../../utils/i18n.js";
|
|
12
|
+
import { SCREEN_CONTEXT_KEY as Ue } from "../DataTable/types.js";
|
|
13
|
+
import Ne from "./components/ScreenHeaderTitle.vue.js";
|
|
14
|
+
import Me from "./components/ScreenViewToggle.vue.js";
|
|
15
|
+
import Oe from "./components/ScreenOptionsDropdown.vue.js";
|
|
16
|
+
import Le from "./components/ScreenAddAction.vue.js";
|
|
17
|
+
import ze from "./components/ScreenEmptyState.vue.js";
|
|
18
|
+
import Ke from "./components/ScreenExportModal.vue.js";
|
|
19
|
+
import He from "./components/ScreenQuickFilters.vue.js";
|
|
20
|
+
const Xe = { class: "flex flex-col w-full space-y-8" }, Ye = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-2.5 w-full justify-end" }, Ge = { class: "flex items-center gap-2 w-full sm:w-auto flex-1 md:flex-none justify-start sm:justify-end" }, Je = {
|
|
21
21
|
key: 4,
|
|
22
22
|
class: "w-full md:w-60! max-sm:order-last"
|
|
23
|
-
},
|
|
23
|
+
}, We = { class: "flex items-center gap-3 max-sm:w-full sm:w-auto max-sm:order-last" }, Ze = {
|
|
24
24
|
key: 4,
|
|
25
25
|
class: "p-8 text-center text-muted-foreground border border-dashed border-border rounded-lg"
|
|
26
|
-
},
|
|
26
|
+
}, _e = {
|
|
27
27
|
key: 3,
|
|
28
28
|
class: "-mt-2"
|
|
29
|
-
},
|
|
29
|
+
}, et = { key: 5 }, kt = /* @__PURE__ */ Pe({
|
|
30
30
|
__name: "Screen",
|
|
31
31
|
props: {
|
|
32
32
|
name: { default: "" },
|
|
@@ -62,6 +62,7 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
62
62
|
exportType: {},
|
|
63
63
|
list: {},
|
|
64
64
|
table: {},
|
|
65
|
+
views: {},
|
|
65
66
|
customHeader: { type: Boolean, default: !1 },
|
|
66
67
|
canSearch: { type: Boolean, default: !0 },
|
|
67
68
|
canAdd: { type: Boolean, default: !0 },
|
|
@@ -77,113 +78,144 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
77
78
|
hideSelectable: { type: Boolean, default: !1 },
|
|
78
79
|
hideDeleteBtn: { type: Boolean, default: !1 },
|
|
79
80
|
quickFilters: { default: () => [] },
|
|
81
|
+
quickFilterViews: {},
|
|
80
82
|
quickFilterKey: { default: "status" },
|
|
81
83
|
defaultQuickFilter: {},
|
|
82
|
-
quickFilterVariant: { default: "line" }
|
|
84
|
+
quickFilterVariant: { default: "line" },
|
|
85
|
+
skipEmptyViews: { default: () => [] }
|
|
83
86
|
},
|
|
84
87
|
emits: ["add", "delete"],
|
|
85
|
-
setup(t, { emit:
|
|
86
|
-
const l = t,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
setup(t, { emit: W }) {
|
|
89
|
+
const l = t, $ = Qe(), O = W, p = Ve(), Z = n(() => l.name || l.title || "default-screen"), q = n(() => {
|
|
90
|
+
if (l.views && l.views.length > 0)
|
|
91
|
+
return l.views.map((a) => ({
|
|
92
|
+
...a,
|
|
93
|
+
component: typeof a.component == "object" && a.component !== null ? Q(a.component) : a.component
|
|
94
|
+
}));
|
|
95
|
+
const e = [];
|
|
96
|
+
return l.table && e.push({
|
|
97
|
+
key: "table",
|
|
98
|
+
component: Q(l.table),
|
|
99
|
+
icon: "lucide:list",
|
|
100
|
+
label: "Table View"
|
|
101
|
+
}), l.list && e.push({
|
|
102
|
+
key: "list",
|
|
103
|
+
component: Q(l.list),
|
|
104
|
+
icon: "lucide:layout-grid",
|
|
105
|
+
label: "List View"
|
|
106
|
+
}), e;
|
|
107
|
+
});
|
|
108
|
+
n(() => q.value.map((e) => e.key));
|
|
109
|
+
const _ = n(() => {
|
|
110
|
+
const e = q.value.length, a = [p.table, p.list, p.grid].filter(Boolean).length;
|
|
111
|
+
return e + a > 1;
|
|
112
|
+
}), ee = n(() => l.views && l.views.length > 0 ? l.views[0].key : l.table || p.table ? "table" : l.list || p.list || p.grid ? "list" : "table"), m = je(`view-mode-${Z.value}`, ee.value), L = n(() => q.value.find((a) => a.key === m.value)?.component ?? null), E = n(() => m.value === "table" && p.table ? "table" : m.value === "list" && p.list ? "list" : m.value === "list" && p.grid ? "grid" : null), y = s(""), f = s({}), D = s({ field: "", order: "" }), C = s(l.pageInfo?.currentPage || 1), F = s(l.pageInfo?.itemsPerPage || l.paginationProps?.itemsPerPage || 10), r = s([]), B = s([]), I = s(!1), d = s(
|
|
90
113
|
l.defaultQuickFilter !== void 0 ? l.defaultQuickFilter : l.quickFilters && l.quickFilters.length > 0 ? l.quickFilters[0].value : ""
|
|
91
|
-
),
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
114
|
+
), te = n(() => !l.quickFilters || l.quickFilters.length === 0 ? !1 : l.quickFilterViews && l.quickFilterViews.length > 0 ? l.quickFilterViews.includes(m.value) : !0), le = (e) => {
|
|
115
|
+
d.value = e, C.value = 1, w();
|
|
116
|
+
}, z = n(() => y.value && y.value.trim() !== "" || d.value !== "" && d.value !== null && d.value !== void 0 ? !0 : f.value ? Object.keys(f.value).some(
|
|
117
|
+
(e) => f.value[e] !== "" && f.value[e] !== null && f.value[e] !== void 0
|
|
118
|
+
) : !1), K = n(() => l.data && l.data.length > 0), ae = n(() => !l.skipEmptyViews || l.skipEmptyViews.length === 0 ? !1 : l.skipEmptyViews.includes(m.value)), u = n(() => ({
|
|
119
|
+
activeView: m.value,
|
|
120
|
+
searchQuery: y.value,
|
|
121
|
+
activeFilters: f.value,
|
|
122
|
+
activeQuickFilter: d.value,
|
|
123
|
+
activeSort: D.value,
|
|
124
|
+
page: C.value,
|
|
125
|
+
limit: F.value,
|
|
126
|
+
selectedRows: r.value,
|
|
127
|
+
isFiltered: z.value,
|
|
128
|
+
hasData: K.value,
|
|
129
|
+
loading: l.loading
|
|
130
|
+
})), ie = {
|
|
99
131
|
disableSearch: !0,
|
|
100
132
|
forceSelectable: !l.hideSelectable,
|
|
101
133
|
onTableChange: (e) => {
|
|
102
|
-
|
|
134
|
+
D.value = { field: e.sort.field, order: e.sort.order }, w();
|
|
103
135
|
}
|
|
104
136
|
};
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
},
|
|
111
|
-
|
|
137
|
+
U(Ue, ie), U("screen-selected-rows", r), U("screen-request-delete", (e) => P(e));
|
|
138
|
+
const P = (e) => {
|
|
139
|
+
B.value = e, I.value = !0;
|
|
140
|
+
}, ne = () => {
|
|
141
|
+
O("delete", B.value), I.value = !1, r.value = [];
|
|
142
|
+
}, oe = (e) => {
|
|
143
|
+
O("delete", e), r.value = [];
|
|
112
144
|
};
|
|
113
|
-
|
|
145
|
+
N(
|
|
114
146
|
() => l.pageInfo?.currentPage,
|
|
115
147
|
(e) => {
|
|
116
|
-
e && (
|
|
148
|
+
e && (C.value = e);
|
|
117
149
|
}
|
|
118
|
-
),
|
|
150
|
+
), N(
|
|
119
151
|
() => l.pageInfo?.itemsPerPage,
|
|
120
152
|
(e) => {
|
|
121
|
-
e && (
|
|
153
|
+
e && (F.value = e);
|
|
122
154
|
}
|
|
123
155
|
);
|
|
124
|
-
let
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
156
|
+
let A = null;
|
|
157
|
+
N(y, () => {
|
|
158
|
+
A && clearTimeout(A), A = setTimeout(() => {
|
|
159
|
+
C.value = 1, w();
|
|
128
160
|
}, 300);
|
|
129
161
|
});
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
},
|
|
133
|
-
|
|
134
|
-
},
|
|
162
|
+
const re = (e) => {
|
|
163
|
+
C.value = e, w();
|
|
164
|
+
}, se = (e) => {
|
|
165
|
+
F.value = e, C.value = 1, w();
|
|
166
|
+
}, w = () => {
|
|
135
167
|
if (!l.refetch) return;
|
|
136
|
-
const e = { ...
|
|
137
|
-
|
|
138
|
-
const
|
|
139
|
-
pagination: { page:
|
|
168
|
+
const e = { ...f.value };
|
|
169
|
+
d.value !== "" && d.value !== null && d.value !== void 0 && (e[l.quickFilterKey] = d.value);
|
|
170
|
+
const a = D.value.field && D.value.order ? { field: D.value.field, order: D.value.order } : void 0, i = {
|
|
171
|
+
pagination: { page: C.value, limit: F.value },
|
|
140
172
|
search: y.value,
|
|
141
173
|
filter: e
|
|
142
174
|
};
|
|
143
|
-
|
|
144
|
-
},
|
|
145
|
-
const e =
|
|
175
|
+
a && (i.sort = a), l.refetch(i);
|
|
176
|
+
}, de = n(() => {
|
|
177
|
+
const e = g("vlite.screen.deleteSelected");
|
|
146
178
|
return e !== "vlite.screen.deleteSelected" ? e : "Delete Selected";
|
|
147
|
-
}),
|
|
148
|
-
const e =
|
|
179
|
+
}), ue = n(() => {
|
|
180
|
+
const e = g("vlite.screen.refresh");
|
|
149
181
|
return e !== "vlite.screen.refresh" ? e : "Refresh";
|
|
150
|
-
}),
|
|
151
|
-
const e =
|
|
182
|
+
}), ce = n(() => {
|
|
183
|
+
const e = g("vlite.screen.searchPlaceholder");
|
|
152
184
|
return e !== "vlite.screen.searchPlaceholder" ? e : "Search...";
|
|
153
|
-
}),
|
|
154
|
-
const e =
|
|
185
|
+
}), me = n(() => {
|
|
186
|
+
const e = g("vlite.screen.confirmDeleteTitle");
|
|
155
187
|
return e !== "vlite.screen.confirmDeleteTitle" ? e : "Confirm Deletion";
|
|
156
|
-
}),
|
|
157
|
-
const e =
|
|
158
|
-
return e !== "vlite.screen.confirmDeleteDesc" ? e : `Are you sure you want to delete the selected ${
|
|
159
|
-
}),
|
|
160
|
-
const e =
|
|
188
|
+
}), fe = n(() => {
|
|
189
|
+
const e = g("vlite.screen.confirmDeleteDesc", { count: B.value.length });
|
|
190
|
+
return e !== "vlite.screen.confirmDeleteDesc" ? e : `Are you sure you want to delete the selected ${B.value.length > 1 ? "items" : "item"}?`;
|
|
191
|
+
}), ve = n(() => {
|
|
192
|
+
const e = g("vlite.screen.confirmDeleteBtn");
|
|
161
193
|
return e !== "vlite.screen.confirmDeleteBtn" ? e : "Delete";
|
|
162
|
-
}),
|
|
163
|
-
const e =
|
|
194
|
+
}), pe = n(() => {
|
|
195
|
+
const e = g("vlite.screen.cancelBtn");
|
|
164
196
|
return e !== "vlite.screen.cancelBtn" ? e : "Cancel";
|
|
165
|
-
}),
|
|
166
|
-
const e =
|
|
167
|
-
return e !== "vlite.screen.missingView" ? e : "Please provide a `:list
|
|
168
|
-
}),
|
|
197
|
+
}), he = n(() => {
|
|
198
|
+
const e = g("vlite.screen.missingView");
|
|
199
|
+
return e !== "vlite.screen.missingView" ? e : "Please provide a `:list`, `:table`, or `:views` component/slot.";
|
|
200
|
+
}), H = n(
|
|
169
201
|
() => l.exportSchema && l.exportSchema.length > 0 && l.exportProps !== !1 || l.importSchema && l.importSchema.length > 0 && l.importProps !== !1
|
|
170
|
-
),
|
|
171
|
-
const e =
|
|
202
|
+
), ge = n(() => {
|
|
203
|
+
const e = g("vlite.screen.importData");
|
|
172
204
|
return e !== "vlite.screen.importData" ? e : "Import Data";
|
|
173
|
-
}),
|
|
174
|
-
e.value === "export" ?
|
|
175
|
-
},
|
|
205
|
+
}), ye = s(null), T = s(!1), j = s(!1), we = (e) => {
|
|
206
|
+
e.value === "export" ? T.value = !0 : e.value === "import" && (j.value = !0);
|
|
207
|
+
}, ke = n(
|
|
176
208
|
() => (l.exportSchema || []).map((e) => ({
|
|
177
209
|
field: e.name || e.field,
|
|
178
210
|
title: e.label || e.title || e.name || e.field
|
|
179
211
|
}))
|
|
180
|
-
),
|
|
212
|
+
), be = n(
|
|
181
213
|
() => (l.importSchema || []).map((e) => ({
|
|
182
214
|
field: e.name || e.field,
|
|
183
215
|
title: e.label || e.title || e.name || e.field,
|
|
184
216
|
required: e.required || !1
|
|
185
217
|
}))
|
|
186
|
-
),
|
|
218
|
+
), xe = async (e) => $?.services?.importApi && l.importType ? await $.services.importApi(l.importType, e) : (console.warn(
|
|
187
219
|
"VLite Screen: No importApi configured or no importType provided for generic import."
|
|
188
220
|
), {
|
|
189
221
|
processed: e.data.length,
|
|
@@ -192,23 +224,23 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
192
224
|
skipped: 0,
|
|
193
225
|
failed: 0,
|
|
194
226
|
errors: []
|
|
195
|
-
}),
|
|
196
|
-
() => l.exportMode ||
|
|
197
|
-
),
|
|
198
|
-
|
|
227
|
+
}), Ce = () => w(), Se = n(
|
|
228
|
+
() => l.exportMode || $?.exportData?.mode || "frontend"
|
|
229
|
+
), De = async (e) => {
|
|
230
|
+
$?.services?.exportApi && l.exportType ? await $.services.exportApi(l.exportType, {
|
|
199
231
|
format: e,
|
|
200
232
|
search: y.value,
|
|
201
|
-
filter:
|
|
233
|
+
filter: f.value
|
|
202
234
|
}) : console.warn(
|
|
203
235
|
"VLite Screen: No exportApi configured or no exportType provided for generic backend export."
|
|
204
236
|
);
|
|
205
237
|
};
|
|
206
|
-
return (e,
|
|
207
|
-
t.customHeader ?
|
|
238
|
+
return (e, a) => (o(), h("div", Xe, [
|
|
239
|
+
t.customHeader ? c(e.$slots, "custom-header", k(x({ key: 1 }, u.value))) : (o(), h("div", {
|
|
208
240
|
key: 0,
|
|
209
|
-
class:
|
|
241
|
+
class: M([t.headerClass, "flex flex-col md:flex-row sm:items-start md:items-center justify-between gap-4"])
|
|
210
242
|
}, [
|
|
211
|
-
|
|
243
|
+
S(Ne, {
|
|
212
244
|
title: t.title,
|
|
213
245
|
"title-i18n": t.titleI18n,
|
|
214
246
|
"title-class": t.titleClass,
|
|
@@ -217,202 +249,203 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
217
249
|
"description-class": t.descriptionClass,
|
|
218
250
|
info: t.info,
|
|
219
251
|
"info-i18n": t.infoI18n
|
|
220
|
-
},
|
|
252
|
+
}, $e({ _: 2 }, [
|
|
221
253
|
e.$slots.title ? {
|
|
222
254
|
name: "title",
|
|
223
|
-
fn:
|
|
224
|
-
|
|
255
|
+
fn: X(() => [
|
|
256
|
+
c(e.$slots, "title", k(V(u.value)))
|
|
225
257
|
]),
|
|
226
258
|
key: "0"
|
|
227
259
|
} : void 0,
|
|
228
260
|
e.$slots.description ? {
|
|
229
261
|
name: "description",
|
|
230
|
-
fn:
|
|
231
|
-
|
|
262
|
+
fn: X(() => [
|
|
263
|
+
c(e.$slots, "description", k(V(u.value)))
|
|
232
264
|
]),
|
|
233
265
|
key: "1"
|
|
234
266
|
} : void 0
|
|
235
267
|
]), 1032, ["title", "title-i18n", "title-class", "description", "description-i18n", "description-class", "info", "info-i18n"]),
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
r.value.length > 0 && !t.hideSelectable && !t.hideDeleteBtn ? (
|
|
268
|
+
R("div", Ye, [
|
|
269
|
+
R("div", Ge, [
|
|
270
|
+
r.value.length > 0 && !t.hideSelectable && !t.hideDeleteBtn ? (o(), b(J, {
|
|
239
271
|
key: 0,
|
|
240
272
|
variant: "outline",
|
|
241
273
|
class: "hover:bg-destructive/10 shrink-0 h-9! w-9!",
|
|
242
274
|
icon: "lucide:trash-2",
|
|
243
|
-
title:
|
|
244
|
-
onClick:
|
|
245
|
-
}, null, 8, ["title"])) :
|
|
246
|
-
|
|
275
|
+
title: de.value,
|
|
276
|
+
onClick: a[0] || (a[0] = (i) => P(r.value))
|
|
277
|
+
}, null, 8, ["title"])) : v("", !0),
|
|
278
|
+
_.value ? (o(), b(Me, {
|
|
247
279
|
key: 1,
|
|
248
|
-
modelValue:
|
|
249
|
-
"onUpdate:modelValue":
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
280
|
+
modelValue: Y(m),
|
|
281
|
+
"onUpdate:modelValue": a[1] || (a[1] = (i) => Ie(m) ? m.value = i : null),
|
|
282
|
+
views: t.views && t.views.length > 0 ? t.views : void 0
|
|
283
|
+
}, null, 8, ["modelValue", "views"])) : v("", !0),
|
|
284
|
+
c(e.$slots, "before-search", k(V(u.value))),
|
|
285
|
+
t.showRefresh ? (o(), b(J, {
|
|
253
286
|
key: 2,
|
|
254
287
|
variant: "outline",
|
|
255
288
|
icon: "lucide:refresh-cw",
|
|
256
289
|
size: "lg",
|
|
257
290
|
class: "shrink-0 h-9! w-9!",
|
|
258
|
-
title:
|
|
291
|
+
title: ue.value,
|
|
259
292
|
disabled: t.loading,
|
|
260
|
-
onClick:
|
|
261
|
-
}, null, 8, ["title", "disabled"])) :
|
|
262
|
-
t.filterSchema && t.filterSchema.length > 0 ? (
|
|
293
|
+
onClick: w
|
|
294
|
+
}, null, 8, ["title", "disabled"])) : v("", !0),
|
|
295
|
+
t.filterSchema && t.filterSchema.length > 0 ? (o(), b(Ee, {
|
|
263
296
|
key: 3,
|
|
264
297
|
schema: t.filterSchema,
|
|
265
298
|
type: t.filterType,
|
|
266
|
-
modelValue:
|
|
267
|
-
"onUpdate:modelValue":
|
|
268
|
-
onChange:
|
|
269
|
-
}, null, 8, ["schema", "type", "modelValue"])) :
|
|
270
|
-
t.canSearch ? (
|
|
271
|
-
|
|
299
|
+
modelValue: f.value,
|
|
300
|
+
"onUpdate:modelValue": a[2] || (a[2] = (i) => f.value = i),
|
|
301
|
+
onChange: w
|
|
302
|
+
}, null, 8, ["schema", "type", "modelValue"])) : v("", !0),
|
|
303
|
+
t.canSearch ? (o(), h("div", Je, [
|
|
304
|
+
S(Te, {
|
|
272
305
|
lazy: "",
|
|
273
306
|
modelValue: y.value,
|
|
274
|
-
"onUpdate:modelValue":
|
|
307
|
+
"onUpdate:modelValue": a[3] || (a[3] = (i) => y.value = i),
|
|
275
308
|
icon: "lucide:search",
|
|
276
|
-
placeholder:
|
|
309
|
+
placeholder: ce.value,
|
|
277
310
|
variant: "outline",
|
|
278
311
|
class: "bg-background w-full",
|
|
279
312
|
"show-clear-button": !0
|
|
280
313
|
}, null, 8, ["modelValue", "placeholder"])
|
|
281
|
-
])) :
|
|
314
|
+
])) : v("", !0)
|
|
282
315
|
]),
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
316
|
+
R("div", We, [
|
|
317
|
+
c(e.$slots, "actions", k(V(u.value)), () => [
|
|
318
|
+
S(Le, {
|
|
286
319
|
"can-add": t.canAdd,
|
|
287
320
|
"add-component": t.addComponent,
|
|
288
321
|
"add-btn": t.addBtn,
|
|
289
322
|
loading: t.loading,
|
|
290
323
|
data: t.data,
|
|
291
324
|
refetch: t.refetch,
|
|
292
|
-
onAdd:
|
|
325
|
+
onAdd: a[4] || (a[4] = (i) => e.$emit("add"))
|
|
293
326
|
}, null, 8, ["can-add", "add-component", "add-btn", "loading", "data", "refetch"])
|
|
294
327
|
]),
|
|
295
|
-
|
|
328
|
+
H.value ? (o(), b(Oe, {
|
|
296
329
|
key: 0,
|
|
297
330
|
"export-props": t.exportProps,
|
|
298
331
|
"import-props": t.importProps,
|
|
299
|
-
onSelect:
|
|
300
|
-
}, null, 8, ["export-props", "import-props"])) :
|
|
301
|
-
|
|
332
|
+
onSelect: we
|
|
333
|
+
}, null, 8, ["export-props", "import-props"])) : v("", !0),
|
|
334
|
+
c(e.$slots, "after-add", k(V(u.value)))
|
|
302
335
|
])
|
|
303
336
|
])
|
|
304
337
|
], 2)),
|
|
305
|
-
|
|
306
|
-
|
|
338
|
+
c(e.$slots, "sub-header", k(V(u.value))),
|
|
339
|
+
te.value ? (o(), h("div", {
|
|
307
340
|
key: 2,
|
|
308
|
-
class:
|
|
341
|
+
class: M(["-mt-1.5 max-sm:hidden!", t.quickFilterVariant == "line" ? "mb-1.5 sm:mb-3" : "mb-3.5"])
|
|
309
342
|
}, [
|
|
310
|
-
|
|
311
|
-
modelValue:
|
|
312
|
-
"onUpdate:modelValue":
|
|
343
|
+
S(He, {
|
|
344
|
+
modelValue: d.value,
|
|
345
|
+
"onUpdate:modelValue": a[5] || (a[5] = (i) => d.value = i),
|
|
313
346
|
options: t.quickFilters,
|
|
314
347
|
variant: t.quickFilterVariant,
|
|
315
|
-
onChange:
|
|
348
|
+
onChange: le
|
|
316
349
|
}, null, 8, ["modelValue", "options", "variant"])
|
|
317
|
-
], 2)) :
|
|
318
|
-
|
|
319
|
-
class:
|
|
350
|
+
], 2)) : v("", !0),
|
|
351
|
+
R("div", {
|
|
352
|
+
class: M(["flex-1 w-full relative", t.containerClass])
|
|
320
353
|
}, [
|
|
321
|
-
!
|
|
322
|
-
e.$slots.empty ?
|
|
354
|
+
!K.value && !t.loading && !ae.value ? (o(), h(G, { key: 0 }, [
|
|
355
|
+
e.$slots.empty ? c(e.$slots, "empty", k(x({ key: 0 }, u.value))) : (o(), b(ze, {
|
|
323
356
|
key: 1,
|
|
324
357
|
"empty-title": t.emptyTitle,
|
|
325
358
|
"empty-title-i18n": t.emptyTitleI18n,
|
|
326
359
|
"empty-description": t.emptyDescription,
|
|
327
360
|
"empty-description-i18n": t.emptyDescriptionI18n,
|
|
328
361
|
"empty-icon": t.emptyIcon,
|
|
329
|
-
"is-filtered":
|
|
362
|
+
"is-filtered": z.value,
|
|
330
363
|
"can-add": t.canAdd,
|
|
331
364
|
"add-component": t.addComponent,
|
|
332
365
|
"add-btn": t.addBtn
|
|
333
366
|
}, null, 8, ["empty-title", "empty-title-i18n", "empty-description", "empty-description-i18n", "empty-icon", "is-filtered", "can-add", "add-component", "add-btn"]))
|
|
334
|
-
], 64)) : (
|
|
335
|
-
|
|
367
|
+
], 64)) : (o(), h(G, { key: 1 }, [
|
|
368
|
+
E.value === "table" ? c(e.$slots, "table", x({
|
|
336
369
|
key: 0,
|
|
337
370
|
data: t.data,
|
|
338
371
|
loading: t.loading,
|
|
339
372
|
selectedRows: r.value,
|
|
340
|
-
delete:
|
|
341
|
-
updateSelectedRows: (
|
|
342
|
-
}) :
|
|
373
|
+
delete: P,
|
|
374
|
+
updateSelectedRows: (i) => r.value = i
|
|
375
|
+
}, u.value)) : E.value === "list" ? c(e.$slots, "list", x({
|
|
343
376
|
key: 1,
|
|
344
377
|
data: t.data,
|
|
345
378
|
loading: t.loading,
|
|
346
379
|
selectedRows: r.value,
|
|
347
|
-
delete:
|
|
348
|
-
updateSelectedRows: (
|
|
349
|
-
}) :
|
|
380
|
+
delete: P,
|
|
381
|
+
updateSelectedRows: (i) => r.value = i
|
|
382
|
+
}, u.value)) : E.value === "grid" ? c(e.$slots, "grid", x({
|
|
350
383
|
key: 2,
|
|
351
384
|
data: t.data,
|
|
352
385
|
loading: t.loading,
|
|
353
386
|
selectedRows: r.value,
|
|
354
|
-
delete:
|
|
355
|
-
updateSelectedRows: (
|
|
356
|
-
}) :
|
|
387
|
+
delete: P,
|
|
388
|
+
updateSelectedRows: (i) => r.value = i
|
|
389
|
+
}, u.value)) : L.value ? (o(), b(Fe(L.value), x({
|
|
357
390
|
key: 3,
|
|
358
391
|
data: t.data,
|
|
359
392
|
loading: t.loading,
|
|
360
393
|
refetch: t.refetch,
|
|
361
394
|
selectedRows: r.value,
|
|
362
|
-
"onUpdate:selectedRows":
|
|
363
|
-
delete:
|
|
364
|
-
onDelete:
|
|
365
|
-
}, t.viewProps), null, 16, ["data", "loading", "refetch", "selectedRows"])) : (
|
|
395
|
+
"onUpdate:selectedRows": a[6] || (a[6] = (i) => r.value = i),
|
|
396
|
+
delete: P,
|
|
397
|
+
onDelete: oe
|
|
398
|
+
}, t.viewProps), null, 16, ["data", "loading", "refetch", "selectedRows"])) : (o(), h("div", Ze, Be(he.value), 1))
|
|
366
399
|
], 64))
|
|
367
400
|
], 2),
|
|
368
|
-
t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (
|
|
369
|
-
|
|
401
|
+
t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (o(), h("div", _e, [
|
|
402
|
+
S(Y(qe), x({
|
|
370
403
|
"current-page": t.pageInfo.currentPage,
|
|
371
404
|
"total-pages": t.pageInfo.totalPages,
|
|
372
405
|
"total-items": t.pageInfo.totalItems
|
|
373
406
|
}, t.paginationProps, {
|
|
374
|
-
onChange:
|
|
375
|
-
"onUpdate:itemsPerPage":
|
|
407
|
+
onChange: re,
|
|
408
|
+
"onUpdate:itemsPerPage": se
|
|
376
409
|
}), null, 16, ["current-page", "total-pages", "total-items"])
|
|
377
|
-
])) :
|
|
378
|
-
|
|
379
|
-
show:
|
|
380
|
-
"onUpdate:show":
|
|
381
|
-
title:
|
|
382
|
-
description:
|
|
383
|
-
"confirm-text":
|
|
384
|
-
"cancel-text":
|
|
410
|
+
])) : v("", !0),
|
|
411
|
+
S(Re, {
|
|
412
|
+
show: I.value,
|
|
413
|
+
"onUpdate:show": a[7] || (a[7] = (i) => I.value = i),
|
|
414
|
+
title: me.value,
|
|
415
|
+
description: fe.value,
|
|
416
|
+
"confirm-text": ve.value,
|
|
417
|
+
"cancel-text": pe.value,
|
|
385
418
|
variant: "danger",
|
|
386
|
-
onConfirm:
|
|
387
|
-
onCancel:
|
|
419
|
+
onConfirm: ne,
|
|
420
|
+
onCancel: a[8] || (a[8] = (i) => I.value = !1)
|
|
388
421
|
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text"]),
|
|
389
|
-
|
|
422
|
+
T.value ? (o(), b(Ke, {
|
|
390
423
|
key: 4,
|
|
391
|
-
show:
|
|
392
|
-
"onUpdate:show":
|
|
424
|
+
show: T.value,
|
|
425
|
+
"onUpdate:show": a[9] || (a[9] = (i) => T.value = i),
|
|
393
426
|
data: t.data || [],
|
|
394
|
-
fields:
|
|
395
|
-
mode:
|
|
427
|
+
fields: ke.value,
|
|
428
|
+
mode: Se.value,
|
|
396
429
|
"export-props": t.exportProps,
|
|
397
|
-
"on-export":
|
|
398
|
-
}, null, 8, ["show", "data", "fields", "mode", "export-props"])) :
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
show:
|
|
402
|
-
"onUpdate:show":
|
|
430
|
+
"on-export": De
|
|
431
|
+
}, null, 8, ["show", "data", "fields", "mode", "export-props"])) : v("", !0),
|
|
432
|
+
H.value ? (o(), h("div", et, [
|
|
433
|
+
S(Ae, x({
|
|
434
|
+
show: j.value,
|
|
435
|
+
"onUpdate:show": a[10] || (a[10] = (i) => j.value = i),
|
|
403
436
|
ref_key: "importDataRef",
|
|
404
|
-
ref:
|
|
405
|
-
fields:
|
|
406
|
-
processBatch:
|
|
407
|
-
onComplete:
|
|
437
|
+
ref: ye,
|
|
438
|
+
fields: be.value,
|
|
439
|
+
processBatch: xe,
|
|
440
|
+
onComplete: Ce
|
|
408
441
|
}, typeof t.importProps == "object" ? t.importProps : {}, {
|
|
409
|
-
title:
|
|
442
|
+
title: ge.value,
|
|
410
443
|
class: "hidden!"
|
|
411
444
|
}), null, 16, ["show", "fields", "title"])
|
|
412
|
-
])) :
|
|
445
|
+
])) : v("", !0)
|
|
413
446
|
]));
|
|
414
447
|
}
|
|
415
448
|
});
|
|
416
449
|
export {
|
|
417
|
-
|
|
450
|
+
kt as default
|
|
418
451
|
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { ScreenView } from '../types';
|
|
1
2
|
type __VLS_Props = {
|
|
2
|
-
modelValue:
|
|
3
|
+
modelValue: string;
|
|
4
|
+
/** Dynamic views array. When provided, renders one button per entry. */
|
|
5
|
+
views?: ScreenView[];
|
|
3
6
|
};
|
|
4
7
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
5
|
-
"update:modelValue": (val:
|
|
8
|
+
"update:modelValue": (val: string) => any;
|
|
6
9
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
7
|
-
"onUpdate:modelValue"?: (val:
|
|
10
|
+
"onUpdate:modelValue"?: (val: string) => any;
|
|
8
11
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
9
12
|
export default _default;
|