vlite3 1.4.39 → 1.4.41
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/AppShell/AppShellLayoutClassic.vue.js +27 -28
- package/components/AppShell/AppShellLayoutDashboard.vue.js +48 -48
- package/components/AppShell/AppShellLayoutDock.vue.js +51 -51
- package/components/AppShell/AppShellLayoutHeaderShell.vue.js +69 -69
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.d.ts +2 -2
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +78 -78
- package/components/AppShell/AppShellLayoutStorefront.vue.js +14 -15
- package/components/AppShell/useAppShell.d.ts +4 -0
- package/components/AppShell/useAppShell.js +45 -40
- package/components/AsyncSelect/createAsyncSelect.js +10 -10
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +50 -2
- package/components/AttachmentsList/AttachmentsList.vue.js +289 -272
- package/components/AttachmentsList/types.d.ts +37 -0
- package/components/BackButton.vue.js +2 -2
- package/components/Button.vue.d.ts +1 -0
- package/components/Button.vue.js +5 -241
- package/components/Button.vue2.js +245 -2
- package/components/ButtonGroup.vue.js +2 -2
- package/components/ButtonGroup.vue2.js +4 -1
- package/components/Calendar/Calendar.vue2.js +16 -16
- package/components/Cart/CartCouponInput.vue.js +24 -24
- package/components/Cart/CartEmptyState.vue.js +4 -4
- package/components/Cart/CartLineItem.vue.js +33 -33
- package/components/Cart/CartVariant1.vue.js +3 -3
- package/components/Cart/CartVariant2.vue.js +5 -5
- package/components/Cart/CartVariant3.vue.js +25 -25
- package/components/Cart/CartVariant4.vue.js +9 -9
- package/components/CategoryManager/CategoryManager.vue2.js +18 -18
- package/components/CategoryManager/CategoryNode.vue.js +4 -4
- package/components/CategoryMenu/CategoryMenu.vue.js +3 -2
- package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +3 -2
- package/components/Chat/ChatInterface.vue.js +23 -23
- package/components/Clipboard.vue.d.ts +7 -1
- package/components/Clipboard.vue.js +19 -17
- package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +22 -22
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +8 -8
- package/components/Comment/CommentEditor.vue.js +14 -14
- package/components/Comment/CommentItem.vue2.js +6 -6
- package/components/Comment/CommentThread.vue.js +4 -4
- package/components/DataList/DataList.vue.js +7 -7
- package/components/DataTable/DataTable.vue.d.ts +9 -0
- package/components/DataTable/DataTable.vue.js +380 -265
- package/components/DataTable/DataTableRow.vue.d.ts +23 -2
- package/components/DataTable/DataTableRow.vue.js +5 -198
- package/components/DataTable/DataTableRow.vue2.js +360 -2
- package/components/DataTable/dataTableHeaders.d.ts +18 -0
- package/components/DataTable/dataTableHeaders.js +9 -0
- package/components/DataTable/types.d.ts +11 -0
- package/components/DatePicker.vue.js +8 -9
- package/components/DateRangePicker.vue2.js +34 -34
- package/components/Dropdown/Dropdown.vue.d.ts +7 -2
- package/components/Dropdown/Dropdown.vue.js +146 -139
- package/components/Dropdown/DropdownTrigger.vue.js +6 -6
- package/components/ExportData/ExportData.vue.js +15 -15
- package/components/FilePicker/FilePickerDropzone.vue.js +16 -16
- package/components/FilePicker/FilePickerInput.vue.js +3 -2
- package/components/FilePicker/FilePreview.vue.js +3 -3
- package/components/FileTree/FileTree.vue.js +4 -4
- package/components/FileTree/FileTree.vue2.js +9 -9
- package/components/FileTree/FileTreeNode.vue.js +76 -72
- package/components/Footer/Variant1.vue.js +48 -48
- package/components/Footer/Variant2.vue.js +42 -42
- package/components/Form/AccordionView.vue.d.ts +1 -1
- package/components/Form/AccordionView.vue2.js +2 -2
- package/components/Form/AccordionView.vue3.js +61 -57
- package/components/Form/Form.vue2.js +41 -41
- package/components/Form/TableRow.vue.d.ts +7 -0
- package/components/Form/TableRow.vue.js +187 -41
- package/components/Form/TableView.vue.d.ts +11 -1
- package/components/Form/TableView.vue.js +71 -49
- package/components/Form/composables/useForm.js +146 -142
- package/components/Form/index.vue.d.ts +5 -1
- package/components/Form/index.vue.js +2 -2
- package/components/Form/index.vue2.js +44 -37
- package/components/Form/rowHelpers.d.ts +20 -0
- package/components/Form/rowHelpers.js +76 -28
- package/components/Form/types.d.ts +11 -0
- package/components/GoogleLogin.vue.js +4 -4
- package/components/IconPicker.vue.js +9 -9
- package/components/ImportData/ImportData.vue.js +11 -11
- package/components/ImportData/ImportStep1.vue.js +10 -10
- package/components/ImportData/ImportStep2.vue.js +15 -14
- package/components/Input.vue.js +133 -129
- package/components/Kanban/KanbanBoard.vue.js +1 -1
- package/components/Kanban/KanbanBoard.vue2.js +9 -9
- package/components/MultiSelect/MultiSelect.vue.js +3 -2
- package/components/Navbar/Navbar.vue.js +17 -17
- package/components/Navbar/NavbarGroup.vue.js +8 -7
- package/components/Navbar/NavbarItem.vue.js +40 -39
- package/components/Navbar/NavbarTabs.vue.js +6 -184
- package/components/Navbar/NavbarTabs.vue2.js +204 -0
- package/components/Navbar/useNavbar.js +3 -3
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +81 -77
- package/components/OTPInput/OTPInput.vue.js +24 -23
- package/components/Pagination/Pagination.vue.d.ts +1 -1
- package/components/Pagination/Pagination.vue.js +5 -274
- package/components/Pagination/Pagination.vue2.js +283 -2
- package/components/PermissionMatrix/PermissionTopBar.vue.js +19 -18
- package/components/PricingPlan/PricingPlanItem.vue.js +7 -7
- package/components/Screen/Screen.vue.d.ts +1 -1
- package/components/Screen/Screen.vue.js +21 -21
- package/components/Screen/ScreenFilter.vue.js +5 -5
- package/components/Screen/components/ScreenAddAction.vue.js +3 -3
- package/components/Screen/components/ScreenEmptyState.vue.js +10 -10
- package/components/Screen/components/ScreenExportModal.vue.js +12 -12
- package/components/Screen/components/ScreenOptionsDropdown.vue.js +5 -5
- package/components/Screen/components/ScreenToolbar.vue.js +15 -15
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +6 -6
- package/components/SidebarMenu/SidebarMenu.vue.js +77 -72
- package/components/SidebarMenu/SidebarMenuItem.vue.js +172 -168
- package/components/Slider.vue.js +123 -108
- package/components/Tabes/Tabes.vue.d.ts +8 -3
- package/components/Tabes/Tabes.vue.js +2 -2
- package/components/Tabes/Tabes.vue2.js +209 -200
- package/components/Tabes/tabes.utils.d.ts +23 -0
- package/components/Tabes/tabes.utils.js +39 -16
- package/components/Textarea.vue.d.ts +2 -0
- package/components/Textarea.vue.js +19 -16
- package/components/ThemeToggle.vue.js +8 -8
- package/components/ToastNotification.vue2.js +10 -10
- package/components/TreeConnectors/TreeConnectors.vue.d.ts +1 -1
- package/components/TreeConnectors/TreeConnectors.vue.js +13 -8
- package/components/TreeConnectors/geometry.js +77 -69
- package/components/Workbook/WorkbookAddButton.vue.js +2 -2
- package/composables/useRtl.d.ts +14 -0
- package/composables/useRtl.js +33 -0
- package/index.js +470 -471
- package/package.json +1 -1
- package/style.css +86 -1
- package/types/button.d.ts +8 -0
- package/components/Navbar/NavbarTabs.vue3.js +0 -5
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { $t as
|
|
6
|
-
import { downloadFile as
|
|
7
|
-
import { getComponentConfig as
|
|
8
|
-
import
|
|
9
|
-
import { getFileTypeIcon as
|
|
10
|
-
const
|
|
1
|
+
import { defineComponent as we, computed as o, ref as X, openBlock as a, createElementBlock as l, normalizeClass as r, Fragment as g, renderList as F, renderSlot as q, mergeProps as H, createElementVNode as k, createVNode as I, createCommentVNode as u, createBlock as w, unref as m, withCtx as M, withModifiers as J, toDisplayString as P } from "vue";
|
|
2
|
+
import D from "../Modal.vue.js";
|
|
3
|
+
import b from "../Icon.vue.js";
|
|
4
|
+
import A from "../Button.vue.js";
|
|
5
|
+
import { $t as f } from "../../utils/i18n.js";
|
|
6
|
+
import { downloadFile as he } from "../../utils/functions.js";
|
|
7
|
+
import { getComponentConfig as ye } from "../../utils/configUtils.js";
|
|
8
|
+
import T from "../FilePreview/FilePreview.vue.js";
|
|
9
|
+
import { getFileTypeIcon as W } from "./fileTypeIcon.js";
|
|
10
|
+
const ge = ["onClick"], be = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "absolute inset-0 bg-background/50 flex items-center justify-center z-10 backdrop-blur-[2px] transition-all"
|
|
13
|
-
},
|
|
13
|
+
}, fe = ["src"], _e = ["title"], xe = {
|
|
14
14
|
key: 1,
|
|
15
15
|
class: "vl-attachments-list__item-size text-xs text-muted-foreground mt-0.5"
|
|
16
|
-
},
|
|
16
|
+
}, Ce = ["onClick"], ke = { class: "flex items-center gap-3 overflow-hidden min-w-0 flex-1" }, ze = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "absolute inset-0 bg-background/60 flex items-center justify-center z-10 backdrop-blur-[1px] transition-all"
|
|
19
|
-
},
|
|
19
|
+
}, Ne = ["src"], Ie = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "flex flex-col overflow-hidden leading-tight min-w-0"
|
|
22
|
-
},
|
|
22
|
+
}, Pe = ["title"], Se = ["aria-label"], Be = ["aria-label", "onClick"], Fe = /* @__PURE__ */ we({
|
|
23
23
|
__name: "AttachmentsList",
|
|
24
24
|
props: {
|
|
25
25
|
attachments: {},
|
|
@@ -43,18 +43,18 @@ const pe = ["onClick"], he = {
|
|
|
43
43
|
itemActionsClass: {},
|
|
44
44
|
emptyClass: {}
|
|
45
45
|
},
|
|
46
|
-
setup(
|
|
47
|
-
const
|
|
48
|
-
() =>
|
|
49
|
-
),
|
|
50
|
-
() =>
|
|
51
|
-
),
|
|
52
|
-
() =>
|
|
53
|
-
),
|
|
54
|
-
() =>
|
|
55
|
-
),
|
|
56
|
-
() =>
|
|
57
|
-
),
|
|
46
|
+
setup(Q) {
|
|
47
|
+
const n = Q, c = ye("attachmentsList") || {}, y = o(() => n.canView ?? c.canView ?? !0), p = o(() => n.canDownload ?? c.canDownload ?? !0), h = o(() => n.variant ?? c.variant ?? "default"), U = o(() => n.size ?? c.size ?? "md"), _ = o(() => n.clickToPreview ?? c.clickToPreview ?? !1), G = o(
|
|
48
|
+
() => n.showDownloadInList ?? c.showDownloadInList ?? !0
|
|
49
|
+
), Y = o(() => n.rootClass ?? c.rootClass ?? ""), Z = o(() => n.gridClass ?? c.gridClass ?? ""), ee = o(() => n.cardClass ?? c.cardClass ?? ""), te = o(
|
|
50
|
+
() => n.cardThumbnailClass ?? c.cardThumbnailClass ?? ""
|
|
51
|
+
), ae = o(() => n.cardInfoClass ?? c.cardInfoClass ?? ""), se = o(
|
|
52
|
+
() => n.cardActionsClass ?? c.cardActionsClass ?? ""
|
|
53
|
+
), oe = o(() => n.listClass ?? c.listClass ?? ""), le = o(() => n.itemClass ?? c.itemClass ?? ""), ne = o(
|
|
54
|
+
() => n.itemIconBoxClass ?? c.itemIconBoxClass ?? ""
|
|
55
|
+
), ie = o(() => n.itemNameClass ?? c.itemNameClass ?? ""), re = o(() => n.itemSizeClass ?? c.itemSizeClass ?? ""), ce = o(
|
|
56
|
+
() => n.itemActionsClass ?? c.itemActionsClass ?? ""
|
|
57
|
+
), ue = o(() => n.emptyClass ?? c.emptyClass ?? ""), j = X(null), v = X(/* @__PURE__ */ new Set()), de = [
|
|
58
58
|
"pdf",
|
|
59
59
|
"docx",
|
|
60
60
|
"xlsx",
|
|
@@ -80,37 +80,55 @@ const pe = ["onClick"], he = {
|
|
|
80
80
|
"css",
|
|
81
81
|
"txt",
|
|
82
82
|
"md"
|
|
83
|
-
], S = o(() =>
|
|
84
|
-
if (!
|
|
85
|
-
const
|
|
86
|
-
return parseFloat((
|
|
87
|
-
},
|
|
88
|
-
if (!
|
|
89
|
-
const
|
|
90
|
-
return e !== -1 ?
|
|
91
|
-
},
|
|
92
|
-
const
|
|
93
|
-
return
|
|
94
|
-
},
|
|
95
|
-
if (
|
|
83
|
+
], S = o(() => n.attachments ? Array.isArray(n.attachments) ? n.attachments : [n.attachments] : []), $ = (t) => {
|
|
84
|
+
if (!t) return "0 Bytes";
|
|
85
|
+
const s = 1024, e = ["Bytes", "KB", "MB", "GB"], i = Math.floor(Math.log(t) / Math.log(s));
|
|
86
|
+
return parseFloat((t / Math.pow(s, i)).toFixed(2)) + " " + e[i];
|
|
87
|
+
}, me = (t) => {
|
|
88
|
+
if (!t) return "";
|
|
89
|
+
const s = t.split("?")[0].split("#")[0], e = s.lastIndexOf(".");
|
|
90
|
+
return e !== -1 ? s.slice(e + 1).toLowerCase() : "";
|
|
91
|
+
}, x = (t) => {
|
|
92
|
+
const s = me(t.fileName || t.fileUrl);
|
|
93
|
+
return de.includes(s);
|
|
94
|
+
}, z = async (t, s) => {
|
|
95
|
+
if (t.fileUrl && t.fileUrl !== "#")
|
|
96
96
|
try {
|
|
97
|
-
if (
|
|
97
|
+
if (s !== void 0) {
|
|
98
98
|
const e = new Set(v.value);
|
|
99
|
-
e.add(
|
|
99
|
+
e.add(s), v.value = e;
|
|
100
100
|
}
|
|
101
|
-
await
|
|
101
|
+
await he(t.fileUrl, t.fileName || "attachment");
|
|
102
102
|
} finally {
|
|
103
|
-
if (
|
|
103
|
+
if (s !== void 0) {
|
|
104
104
|
const e = new Set(v.value);
|
|
105
|
-
e.delete(
|
|
105
|
+
e.delete(s), v.value = e;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
|
|
108
|
+
}, L = (t) => t.fileType && t.fileType.startsWith("image/") ? !0 : /\.(jpg|jpeg|png|gif|webp|svg|bmp)(\?.*)?$/i.test(t.fileUrl || ""), N = (t) => t.fileName !== void 0 && t.fileName !== null && String(t.fileName).trim() !== "", C = (t) => t.fileSize !== void 0 && t.fileSize !== null && String(t.fileSize).trim() !== "", K = async (t, s) => {
|
|
109
|
+
y.value && x(s) ? j.value = t : p.value && await z(s, t);
|
|
110
|
+
}, O = async (t, s) => {
|
|
111
|
+
_.value && await K(t, s);
|
|
112
|
+
}, ve = () => {
|
|
113
|
+
j.value = null;
|
|
114
|
+
}, R = (t, s) => ({
|
|
115
|
+
file: t,
|
|
116
|
+
index: s,
|
|
117
|
+
variant: h.value,
|
|
118
|
+
size: U.value,
|
|
119
|
+
canView: y.value,
|
|
120
|
+
canDownload: p.value,
|
|
121
|
+
clickToPreview: _.value,
|
|
122
|
+
showDownloadInList: G.value,
|
|
123
|
+
isDownloading: v.value.has(s),
|
|
124
|
+
isPreviewable: x(t),
|
|
125
|
+
isImage: L(t),
|
|
126
|
+
formattedSize: C(t) ? $(t.fileSize) : "",
|
|
127
|
+
icon: W(t.fileName, t.fileUrl, t.fileType),
|
|
128
|
+
preview: () => K(s, t),
|
|
129
|
+
download: () => z(t, s)
|
|
130
|
+
}), d = o(() => {
|
|
131
|
+
switch (U.value) {
|
|
114
132
|
case "sm":
|
|
115
133
|
return {
|
|
116
134
|
item: "pl-2 pr-2.5 py-1.5 gap-1.5",
|
|
@@ -142,248 +160,247 @@ const pe = ["onClick"], he = {
|
|
|
142
160
|
actionIcon: "w-4 h-4"
|
|
143
161
|
};
|
|
144
162
|
}
|
|
145
|
-
}),
|
|
146
|
-
return (
|
|
147
|
-
class:
|
|
163
|
+
}), V = o(() => y.value && !_.value), E = o(() => p.value && G.value), pe = o(() => V.value || E.value);
|
|
164
|
+
return (t, s) => (a(), l("div", {
|
|
165
|
+
class: r(["vl-attachments-list w-full", Y.value])
|
|
148
166
|
}, [
|
|
149
|
-
S.value.length > 0 ? (
|
|
150
|
-
|
|
167
|
+
S.value.length > 0 ? (a(), l(g, { key: 0 }, [
|
|
168
|
+
h.value === "card" ? (a(), l("div", {
|
|
151
169
|
key: 0,
|
|
152
|
-
class:
|
|
170
|
+
class: r(["vl-attachments-list__grid grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4", Z.value])
|
|
153
171
|
}, [
|
|
154
|
-
(
|
|
155
|
-
key:
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
Y.value,
|
|
162
|
-
C(e) || k(e) ? "border-b border-border" : ""
|
|
163
|
-
]])
|
|
172
|
+
(a(!0), l(g, null, F(S.value, (e, i) => q(t.$slots, "item", H({
|
|
173
|
+
key: i,
|
|
174
|
+
ref_for: !0
|
|
175
|
+
}, R(e, i)), () => [
|
|
176
|
+
k("div", {
|
|
177
|
+
class: r(["vl-attachments-list__card relative group rounded-xl border border-border bg-body overflow-hidden hover:shadow-md transition-all flex flex-col", [{ "cursor-pointer": _.value && (y.value || p.value) }, ee.value]]),
|
|
178
|
+
onClick: (B) => O(i, e)
|
|
164
179
|
}, [
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
})
|
|
170
|
-
])) : c("", !0),
|
|
171
|
-
M(e) ? (t(), s("img", {
|
|
172
|
-
key: 1,
|
|
173
|
-
src: e.thumbnailUrl || e.fileUrl,
|
|
174
|
-
class: "w-full h-full object-cover transition-transform group-hover:scale-105"
|
|
175
|
-
}, null, 8, we)) : (t(), p(f, {
|
|
176
|
-
key: 2,
|
|
177
|
-
icon: d(R)(e.fileName, e.fileUrl, e.fileType),
|
|
178
|
-
class: "w-12 h-12 text-muted-foreground/40 transition-transform group-hover:scale-110"
|
|
179
|
-
}, null, 8, ["icon"])),
|
|
180
|
-
b.value ? c("", !0) : (t(), s("div", {
|
|
181
|
-
key: 3,
|
|
182
|
-
class: i(["vl-attachments-list__card-actions absolute top-2 right-2 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity", ee.value])
|
|
183
|
-
}, [
|
|
184
|
-
y.value && _(e) ? (t(), p(P, {
|
|
185
|
-
key: 0,
|
|
186
|
-
title: e.fileName || d(w)("common.words.preview", "Preview"),
|
|
187
|
-
"max-width": "max-w-3xl",
|
|
188
|
-
body: d(I),
|
|
189
|
-
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value }
|
|
190
|
-
}, {
|
|
191
|
-
trigger: V(() => [
|
|
192
|
-
N(j, {
|
|
193
|
-
variant: "secondary",
|
|
194
|
-
size: "xs",
|
|
195
|
-
icon: "lucide:eye",
|
|
196
|
-
class: "h-7 w-7 px-0 rounded-md shadow-sm"
|
|
197
|
-
})
|
|
198
|
-
]),
|
|
199
|
-
_: 1
|
|
200
|
-
}, 8, ["title", "body", "bodyProps"])) : c("", !0),
|
|
201
|
-
h.value ? (t(), p(j, {
|
|
202
|
-
key: 1,
|
|
203
|
-
variant: "secondary",
|
|
204
|
-
size: "xs",
|
|
205
|
-
icon: v.value.has(n) ? "lucide:loader-2" : "lucide:download",
|
|
206
|
-
loading: v.value.has(n),
|
|
207
|
-
class: "h-7 w-7 px-0 rounded-md shadow-sm",
|
|
208
|
-
onClick: O((D) => A(e, n), ["stop"])
|
|
209
|
-
}, null, 8, ["icon", "loading", "onClick"])) : c("", !0)
|
|
210
|
-
], 2))
|
|
211
|
-
], 2),
|
|
212
|
-
C(e) || k(e) ? (t(), s("div", {
|
|
213
|
-
key: 0,
|
|
214
|
-
class: i(["vl-attachments-list__card-info p-3 flex flex-col min-w-0", Z.value])
|
|
215
|
-
}, [
|
|
216
|
-
C(e) ? (t(), s("span", {
|
|
217
|
-
key: 0,
|
|
218
|
-
class: "vl-attachments-list__item-name text-sm font-medium truncate",
|
|
219
|
-
title: e.fileName
|
|
220
|
-
}, z(e.fileName), 9, ye)) : c("", !0),
|
|
221
|
-
k(e) ? (t(), s("span", ge, z(F(e.fileSize)), 1)) : c("", !0)
|
|
222
|
-
], 2)) : c("", !0),
|
|
223
|
-
b.value && y.value && _(e) ? (t(), p(P, {
|
|
224
|
-
key: 1,
|
|
225
|
-
show: B.value === n,
|
|
226
|
-
title: e.fileName || d(w)("common.words.preview", "Preview"),
|
|
227
|
-
"max-width": "max-w-3xl",
|
|
228
|
-
body: d(I),
|
|
229
|
-
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value },
|
|
230
|
-
onClose: G
|
|
231
|
-
}, null, 8, ["show", "title", "body", "bodyProps"])) : c("", !0)
|
|
232
|
-
], 10, pe))), 128))
|
|
233
|
-
], 2)) : (t(), s("div", {
|
|
234
|
-
key: 1,
|
|
235
|
-
class: i(["vl-attachments-list__list flex flex-col gap-1.5", te.value])
|
|
236
|
-
}, [
|
|
237
|
-
(t(!0), s(x, null, L(S.value, (e, n) => (t(), s("div", {
|
|
238
|
-
key: n,
|
|
239
|
-
class: i(["vl-attachments-list__item flex items-center justify-between transition-colors rounded-lg", [
|
|
240
|
-
g.value === "inline" ? "bg-[#79797924] hover:bg-[#7979793f]" : "border border-border bg-muted/20 hover:bg-muted/40",
|
|
241
|
-
m.value.item,
|
|
242
|
-
b.value && (y.value || h.value) ? "cursor-pointer select-none" : "",
|
|
243
|
-
ae.value
|
|
244
|
-
]]),
|
|
245
|
-
onClick: (D) => W(n, e)
|
|
246
|
-
}, [
|
|
247
|
-
U("div", xe, [
|
|
248
|
-
U("div", {
|
|
249
|
-
class: i(["vl-attachments-list__item-icon-box flex items-center justify-center shrink-0 overflow-hidden relative", [
|
|
250
|
-
m.value.iconBox,
|
|
251
|
-
g.value === "inline" ? "bg-[#79797924] hover:bg-[#7979793f]" : "bg-primary/10",
|
|
252
|
-
se.value
|
|
180
|
+
k("div", {
|
|
181
|
+
class: r(["vl-attachments-list__card-thumbnail h-40 w-full bg-muted/30 flex items-center justify-center overflow-hidden relative", [
|
|
182
|
+
te.value,
|
|
183
|
+
N(e) || C(e) ? "border-b border-border" : ""
|
|
253
184
|
]])
|
|
254
185
|
}, [
|
|
255
|
-
v.value.has(
|
|
256
|
-
|
|
186
|
+
v.value.has(i) ? (a(), l("div", be, [
|
|
187
|
+
I(b, {
|
|
257
188
|
icon: "lucide:loader-2",
|
|
258
|
-
class:
|
|
259
|
-
}
|
|
260
|
-
])) :
|
|
261
|
-
|
|
189
|
+
class: "w-8 h-8 text-primary animate-spin"
|
|
190
|
+
})
|
|
191
|
+
])) : u("", !0),
|
|
192
|
+
L(e) ? (a(), l("img", {
|
|
262
193
|
key: 1,
|
|
263
194
|
src: e.thumbnailUrl || e.fileUrl,
|
|
264
|
-
class: "w-full h-full object-cover"
|
|
265
|
-
}, null, 8,
|
|
195
|
+
class: "w-full h-full object-cover transition-transform group-hover:scale-105"
|
|
196
|
+
}, null, 8, fe)) : (a(), w(b, {
|
|
266
197
|
key: 2,
|
|
267
|
-
icon:
|
|
268
|
-
class:
|
|
269
|
-
}, null, 8, ["icon"
|
|
198
|
+
icon: m(W)(e.fileName, e.fileUrl, e.fileType),
|
|
199
|
+
class: "w-12 h-12 text-muted-foreground/40 transition-transform group-hover:scale-110"
|
|
200
|
+
}, null, 8, ["icon"])),
|
|
201
|
+
_.value ? u("", !0) : (a(), l("div", {
|
|
202
|
+
key: 3,
|
|
203
|
+
class: r(["vl-attachments-list__card-actions absolute top-2 right-2 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity", se.value])
|
|
204
|
+
}, [
|
|
205
|
+
y.value && x(e) ? (a(), w(D, {
|
|
206
|
+
key: 0,
|
|
207
|
+
title: e.fileName || m(f)("common.words.preview", "Preview"),
|
|
208
|
+
"max-width": "max-w-3xl",
|
|
209
|
+
body: m(T),
|
|
210
|
+
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: p.value }
|
|
211
|
+
}, {
|
|
212
|
+
trigger: M(() => [
|
|
213
|
+
I(A, {
|
|
214
|
+
variant: "secondary",
|
|
215
|
+
size: "xs",
|
|
216
|
+
icon: "lucide:eye",
|
|
217
|
+
class: "h-7 w-7 px-0 rounded-md shadow-sm"
|
|
218
|
+
})
|
|
219
|
+
]),
|
|
220
|
+
_: 1
|
|
221
|
+
}, 8, ["title", "body", "bodyProps"])) : u("", !0),
|
|
222
|
+
p.value ? (a(), w(A, {
|
|
223
|
+
key: 1,
|
|
224
|
+
variant: "secondary",
|
|
225
|
+
size: "xs",
|
|
226
|
+
icon: v.value.has(i) ? "lucide:loader-2" : "lucide:download",
|
|
227
|
+
loading: v.value.has(i),
|
|
228
|
+
class: "h-7 w-7 px-0 rounded-md shadow-sm",
|
|
229
|
+
onClick: J((B) => z(e, i), ["stop"])
|
|
230
|
+
}, null, 8, ["icon", "loading", "onClick"])) : u("", !0)
|
|
231
|
+
], 2))
|
|
270
232
|
], 2),
|
|
271
|
-
|
|
272
|
-
|
|
233
|
+
N(e) || C(e) ? (a(), l("div", {
|
|
234
|
+
key: 0,
|
|
235
|
+
class: r(["vl-attachments-list__card-info p-3 flex flex-col min-w-0", ae.value])
|
|
236
|
+
}, [
|
|
237
|
+
N(e) ? (a(), l("span", {
|
|
273
238
|
key: 0,
|
|
274
|
-
class:
|
|
275
|
-
m.value.text,
|
|
276
|
-
g.value === "inline" ? "" : "text-foreground",
|
|
277
|
-
oe.value
|
|
278
|
-
]]),
|
|
239
|
+
class: "vl-attachments-list__item-name text-sm font-medium truncate",
|
|
279
240
|
title: e.fileName
|
|
280
|
-
},
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
241
|
+
}, P(e.fileName), 9, _e)) : u("", !0),
|
|
242
|
+
C(e) ? (a(), l("span", xe, P($(e.fileSize)), 1)) : u("", !0)
|
|
243
|
+
], 2)) : u("", !0)
|
|
244
|
+
], 10, ge)
|
|
245
|
+
])), 128))
|
|
246
|
+
], 2)) : (a(), l("div", {
|
|
247
|
+
key: 1,
|
|
248
|
+
class: r(["vl-attachments-list__list flex flex-col gap-1.5", oe.value])
|
|
249
|
+
}, [
|
|
250
|
+
(a(!0), l(g, null, F(S.value, (e, i) => q(t.$slots, "item", H({
|
|
251
|
+
key: i,
|
|
252
|
+
ref_for: !0
|
|
253
|
+
}, R(e, i)), () => [
|
|
254
|
+
k("div", {
|
|
255
|
+
class: r(["vl-attachments-list__item flex items-center justify-between transition-colors rounded-lg", [
|
|
256
|
+
h.value === "inline" ? "bg-[#79797924] hover:bg-[#7979793f]" : "border border-border bg-muted/20 hover:bg-muted/40",
|
|
257
|
+
d.value.item,
|
|
258
|
+
_.value && (y.value || p.value) ? "cursor-pointer select-none" : "",
|
|
259
|
+
le.value
|
|
260
|
+
]]),
|
|
261
|
+
onClick: (B) => O(i, e)
|
|
296
262
|
}, [
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
}, {
|
|
305
|
-
trigger: V(() => [
|
|
306
|
-
U("button", {
|
|
307
|
-
type: "button",
|
|
308
|
-
class: i(["inline-flex items-center justify-center rounded opacity-60 hover:opacity-100 bg-transparent! transition-all", m.value.actions]),
|
|
309
|
-
"aria-label": d(w)("common.words.preview", "Preview")
|
|
310
|
-
}, [
|
|
311
|
-
N(f, {
|
|
312
|
-
icon: "lucide:eye",
|
|
313
|
-
class: i(m.value.actionIcon)
|
|
314
|
-
}, null, 8, ["class"])
|
|
315
|
-
], 10, Ne)
|
|
316
|
-
]),
|
|
317
|
-
_: 1
|
|
318
|
-
}, 8, ["title", "body", "bodyProps"])) : c("", !0),
|
|
319
|
-
$.value ? (t(), s("button", {
|
|
320
|
-
key: 1,
|
|
321
|
-
type: "button",
|
|
322
|
-
class: i(["inline-flex items-center justify-center rounded opacity-60 hover:opacity-100 bg-transparent! transition-all", m.value.actions]),
|
|
323
|
-
"aria-label": d(w)("common.words.download", "Download"),
|
|
324
|
-
onClick: (D) => A(e, n)
|
|
263
|
+
k("div", ke, [
|
|
264
|
+
k("div", {
|
|
265
|
+
class: r(["vl-attachments-list__item-icon-box flex items-center justify-center shrink-0 overflow-hidden relative", [
|
|
266
|
+
d.value.iconBox,
|
|
267
|
+
h.value === "inline" ? "bg-[#79797924] hover:bg-[#7979793f]" : "bg-primary/10",
|
|
268
|
+
ne.value
|
|
269
|
+
]])
|
|
325
270
|
}, [
|
|
326
|
-
v.value.has(
|
|
271
|
+
v.value.has(i) ? (a(), l("div", ze, [
|
|
272
|
+
I(b, {
|
|
273
|
+
icon: "lucide:loader-2",
|
|
274
|
+
class: r([d.value.icon, "text-primary animate-spin"])
|
|
275
|
+
}, null, 8, ["class"])
|
|
276
|
+
])) : u("", !0),
|
|
277
|
+
L(e) ? (a(), l("img", {
|
|
278
|
+
key: 1,
|
|
279
|
+
src: e.thumbnailUrl || e.fileUrl,
|
|
280
|
+
class: "w-full h-full object-cover"
|
|
281
|
+
}, null, 8, Ne)) : (a(), w(b, {
|
|
282
|
+
key: 2,
|
|
283
|
+
icon: m(W)(e.fileName, e.fileUrl, e.fileType),
|
|
284
|
+
class: r([d.value.icon, h.value === "inline" ? "opacity-75" : "text-primary"])
|
|
285
|
+
}, null, 8, ["icon", "class"]))
|
|
286
|
+
], 2),
|
|
287
|
+
N(e) || C(e) ? (a(), l("div", Ie, [
|
|
288
|
+
N(e) ? (a(), l("span", {
|
|
327
289
|
key: 0,
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
290
|
+
class: r(["vl-attachments-list__item-name font-medium truncate block", [
|
|
291
|
+
d.value.text,
|
|
292
|
+
h.value === "inline" ? "" : "text-foreground",
|
|
293
|
+
ie.value
|
|
294
|
+
]]),
|
|
295
|
+
title: e.fileName
|
|
296
|
+
}, P(e.fileName), 11, Pe)) : u("", !0),
|
|
297
|
+
C(e) ? (a(), l("span", {
|
|
331
298
|
key: 1,
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
299
|
+
class: r(["vl-attachments-list__item-size mt-0.5", [
|
|
300
|
+
d.value.subtext,
|
|
301
|
+
h.value === "inline" ? "opacity-50" : "text-muted-foreground",
|
|
302
|
+
re.value
|
|
303
|
+
]])
|
|
304
|
+
}, P($(e.fileSize)), 3)) : u("", !0)
|
|
305
|
+
])) : u("", !0)
|
|
306
|
+
]),
|
|
307
|
+
pe.value ? (a(), l("div", {
|
|
308
|
+
key: 0,
|
|
309
|
+
class: r(["vl-attachments-list__item-actions flex items-center shrink-0 ml-2", [U.value !== "lg" ? "gap-0.5" : "gap-0", ce.value]]),
|
|
310
|
+
onClick: s[0] || (s[0] = J(() => {
|
|
311
|
+
}, ["stop"]))
|
|
312
|
+
}, [
|
|
313
|
+
h.value === "inline" ? (a(), l(g, { key: 0 }, [
|
|
314
|
+
V.value && x(e) ? (a(), w(D, {
|
|
315
|
+
key: 0,
|
|
316
|
+
title: e.fileName || m(f)("common.words.preview", "Preview"),
|
|
317
|
+
"max-width": "max-w-3xl",
|
|
318
|
+
body: m(T),
|
|
319
|
+
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: p.value }
|
|
320
|
+
}, {
|
|
321
|
+
trigger: M(() => [
|
|
322
|
+
k("button", {
|
|
323
|
+
type: "button",
|
|
324
|
+
class: r(["inline-flex items-center justify-center rounded opacity-60 hover:opacity-100 bg-transparent! transition-all", d.value.actions]),
|
|
325
|
+
"aria-label": m(f)("common.words.preview", "Preview")
|
|
326
|
+
}, [
|
|
327
|
+
I(b, {
|
|
328
|
+
icon: "lucide:eye",
|
|
329
|
+
class: r(d.value.actionIcon)
|
|
330
|
+
}, null, 8, ["class"])
|
|
331
|
+
], 10, Se)
|
|
332
|
+
]),
|
|
333
|
+
_: 1
|
|
334
|
+
}, 8, ["title", "body", "bodyProps"])) : u("", !0),
|
|
335
|
+
E.value ? (a(), l("button", {
|
|
336
|
+
key: 1,
|
|
337
|
+
type: "button",
|
|
338
|
+
class: r(["inline-flex items-center justify-center rounded opacity-60 hover:opacity-100 bg-transparent! transition-all", d.value.actions]),
|
|
339
|
+
"aria-label": m(f)("common.words.download", "Download"),
|
|
340
|
+
onClick: (B) => z(e, i)
|
|
341
|
+
}, [
|
|
342
|
+
v.value.has(i) ? (a(), w(b, {
|
|
343
|
+
key: 0,
|
|
344
|
+
icon: "lucide:loader-2",
|
|
345
|
+
class: r([d.value.actionIcon, "animate-spin"])
|
|
346
|
+
}, null, 8, ["class"])) : (a(), w(b, {
|
|
347
|
+
key: 1,
|
|
348
|
+
icon: "lucide:download",
|
|
349
|
+
class: r(d.value.actionIcon)
|
|
350
|
+
}, null, 8, ["class"]))
|
|
351
|
+
], 10, Be)) : u("", !0)
|
|
352
|
+
], 64)) : (a(), l(g, { key: 1 }, [
|
|
353
|
+
V.value && x(e) ? (a(), w(D, {
|
|
354
|
+
key: 0,
|
|
355
|
+
title: e.fileName || m(f)("common.words.preview", "Preview"),
|
|
356
|
+
"max-width": "max-w-3xl",
|
|
357
|
+
body: m(T),
|
|
358
|
+
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: p.value }
|
|
359
|
+
}, {
|
|
360
|
+
trigger: M(() => [
|
|
361
|
+
I(A, {
|
|
362
|
+
variant: "ghost",
|
|
363
|
+
size: "xs",
|
|
364
|
+
class: r([d.value.actions, "px-0"]),
|
|
365
|
+
icon: "lucide:eye"
|
|
366
|
+
}, null, 8, ["class"])
|
|
367
|
+
]),
|
|
368
|
+
_: 1
|
|
369
|
+
}, 8, ["title", "body", "bodyProps"])) : u("", !0),
|
|
370
|
+
E.value ? (a(), w(A, {
|
|
371
|
+
key: 1,
|
|
372
|
+
variant: "ghost",
|
|
373
|
+
size: "xs",
|
|
374
|
+
class: r([d.value.actions, "px-0"]),
|
|
375
|
+
icon: v.value.has(i) ? "lucide:loader-2" : "lucide:download",
|
|
376
|
+
loading: v.value.has(i),
|
|
377
|
+
onClick: (B) => z(e, i)
|
|
378
|
+
}, null, 8, ["class", "icon", "loading", "onClick"])) : u("", !0)
|
|
379
|
+
], 64))
|
|
380
|
+
], 2)) : u("", !0)
|
|
381
|
+
], 10, Ce)
|
|
382
|
+
])), 128))
|
|
383
|
+
], 2)),
|
|
384
|
+
(a(!0), l(g, null, F(S.value, (e, i) => (a(), l(g, {
|
|
385
|
+
key: `preview-${i}`
|
|
386
|
+
}, [
|
|
387
|
+
y.value && x(e) ? (a(), w(D, {
|
|
388
|
+
key: 0,
|
|
389
|
+
show: j.value === i,
|
|
390
|
+
title: e.fileName || m(f)("common.words.preview", "Preview"),
|
|
391
|
+
"max-width": "max-w-3xl",
|
|
392
|
+
body: m(T),
|
|
393
|
+
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: p.value },
|
|
394
|
+
onClose: ve
|
|
395
|
+
}, null, 8, ["show", "title", "body", "bodyProps"])) : u("", !0)
|
|
396
|
+
], 64))), 128))
|
|
397
|
+
], 64)) : (a(), l("div", {
|
|
381
398
|
key: 1,
|
|
382
|
-
class:
|
|
383
|
-
},
|
|
399
|
+
class: r(["vl-attachments-list__empty text-sm text-muted-foreground italic bg-muted/10 p-4 rounded-lg border border-dashed border-border text-center", ue.value])
|
|
400
|
+
}, P(m(f)("common.words.noAttachments", "No attachments found.")), 3))
|
|
384
401
|
], 2));
|
|
385
402
|
}
|
|
386
403
|
});
|
|
387
404
|
export {
|
|
388
|
-
|
|
405
|
+
Fe as default
|
|
389
406
|
};
|