handy-uploader 3.0.0 → 3.1.1
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/README.md +133 -21
- package/dist/element/HandyUploaderElement.d.ts +20 -0
- package/dist/element/index.d.ts +21 -0
- package/dist/element/types.d.ts +108 -0
- package/dist/element.mjs +6178 -0
- package/dist/vuetify.cjs +1 -1
- package/dist/vuetify.mjs +419 -407
- package/package.json +30 -11
package/dist/vuetify.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as J, computed as
|
|
2
|
-
import { z as Le, m as se, u as re, g as ce, b as
|
|
3
|
-
import { C as
|
|
1
|
+
import { defineComponent as J, computed as Q, resolveComponent as f, openBlock as u, createElementBlock as w, createVNode as s, withCtx as o, createTextVNode as _, toDisplayString as y, ref as Z, watch as U, onMounted as ke, Fragment as H, renderList as W, createBlock as v, createElementVNode as D, unref as G, mergeProps as R, createCommentVNode as A, withDirectives as pe, vShow as ge, reactive as we, onBeforeMount as $e, onDeactivated as Ae } from "vue";
|
|
2
|
+
import { z as Le, m as se, u as re, g as ce, b as Te, A as de, B as ue, c as Ve, f as ze, r as Be, l as Se, j as Ue, a as Ee, y as Ie, x as Pe, i as je, k as me, q as Me } from "./language-CYpPw-mk.mjs";
|
|
3
|
+
import { C as Ut, e as Et, h as It, d as Pt, n as jt, o as Mt, t as Ht, v as Nt, p as Ot, w as qt, s as Rt } from "./language-CYpPw-mk.mjs";
|
|
4
4
|
const te = /* @__PURE__ */ J({
|
|
5
5
|
__name: "SelectFileIconType",
|
|
6
6
|
props: {
|
|
@@ -8,14 +8,14 @@ const te = /* @__PURE__ */ J({
|
|
|
8
8
|
size: { default: 30 }
|
|
9
9
|
},
|
|
10
10
|
setup(l) {
|
|
11
|
-
const i = l, t =
|
|
11
|
+
const i = l, t = Q(() => {
|
|
12
12
|
const e = `file.${i.fileFormat}`;
|
|
13
13
|
return Le(e);
|
|
14
14
|
});
|
|
15
15
|
return (e, m) => {
|
|
16
|
-
const
|
|
17
|
-
return
|
|
18
|
-
s(
|
|
16
|
+
const C = f("v-icon");
|
|
17
|
+
return u(), w("div", null, [
|
|
18
|
+
s(C, {
|
|
19
19
|
size: i.size,
|
|
20
20
|
color: t.value.color
|
|
21
21
|
}, {
|
|
@@ -27,23 +27,23 @@ const te = /* @__PURE__ */ J({
|
|
|
27
27
|
]);
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
}),
|
|
30
|
+
}), He = {
|
|
31
31
|
key: 0,
|
|
32
32
|
style: { height: "200px", display: "flex", "align-items": "center", "justify-content": "center", "background-color": "#f5f5f5", overflow: "hidden" }
|
|
33
|
-
},
|
|
33
|
+
}, Ne = ["src", "onError"], Oe = {
|
|
34
34
|
key: 1,
|
|
35
35
|
style: { height: "200px", "background-color": "#f5f5f5", position: "relative", overflow: "hidden", display: "flex", "align-items": "center", "justify-content": "center" }
|
|
36
|
-
},
|
|
36
|
+
}, qe = ["src", "onError"], Re = {
|
|
37
37
|
key: 1,
|
|
38
38
|
style: { width: "100%", height: "100%", background: "#e0e0e0", display: "flex", "align-items": "center", "justify-content": "center" }
|
|
39
|
-
},
|
|
39
|
+
}, We = {
|
|
40
40
|
class: "d-flex justify-center align-center",
|
|
41
41
|
style: { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", background: "rgba(0,0,0,0.7)", "border-radius": "50%", width: "60px", height: "60px", cursor: "pointer" }
|
|
42
|
-
},
|
|
42
|
+
}, Xe = {
|
|
43
43
|
key: 2,
|
|
44
44
|
class: "d-flex justify-center align-center",
|
|
45
45
|
style: { height: "200px", "background-color": "#f5f5f5" }
|
|
46
|
-
},
|
|
46
|
+
}, Ye = { class: "BYekan" }, Ge = { class: "BYekan" }, Ke = { key: 0 }, he = /* @__PURE__ */ J({
|
|
47
47
|
__name: "ThumbnailUploader",
|
|
48
48
|
props: {
|
|
49
49
|
lang: { default: "en" },
|
|
@@ -64,51 +64,52 @@ const te = /* @__PURE__ */ J({
|
|
|
64
64
|
const t = (n) => {
|
|
65
65
|
const a = re(n);
|
|
66
66
|
return console.log("🔍 isImageFile check:", n, "→", a), a;
|
|
67
|
-
}, e = l, m = i,
|
|
67
|
+
}, e = l, m = i, C = (n) => {
|
|
68
68
|
const a = ce(n) === "video";
|
|
69
69
|
return console.log("🎥 Checking if video file:", n, "result:", a, "fileType:", ce(n)), a;
|
|
70
|
-
},
|
|
70
|
+
}, T = (n) => {
|
|
71
71
|
var r;
|
|
72
72
|
if (!n.base64 || !n.format)
|
|
73
73
|
return console.error("❌ Missing base64 or format for:", n.name, { base64: !!n.base64, format: n.format }), "";
|
|
74
|
-
const a =
|
|
74
|
+
const a = Te(n.base64, n.format);
|
|
75
75
|
return console.log("🖼️ Image source for:", n.name, {
|
|
76
76
|
format: n.format,
|
|
77
77
|
base64Length: ((r = n.base64) == null ? void 0 : r.length) || 0,
|
|
78
78
|
srcLength: a.length,
|
|
79
79
|
srcPreview: a.substring(0, 100) + "..."
|
|
80
80
|
}), a;
|
|
81
|
-
},
|
|
81
|
+
}, k = (n) => {
|
|
82
82
|
var a;
|
|
83
83
|
console.error("Image failed to load:", {
|
|
84
84
|
name: n.name,
|
|
85
85
|
format: n.format,
|
|
86
86
|
base64Length: ((a = n.base64) == null ? void 0 : a.length) || 0
|
|
87
87
|
});
|
|
88
|
-
},
|
|
88
|
+
}, z = Z(0), h = Ve(() => z.value++), g = (n) => (z.value, h.get(n)), B = (n) => {
|
|
89
89
|
console.error("Video thumbnail failed to load:", { name: n.name, format: n.format }), h.invalidate(n);
|
|
90
90
|
}, L = (n) => ({
|
|
91
91
|
icon: ue(n),
|
|
92
92
|
color: de(n)
|
|
93
|
-
}),
|
|
93
|
+
}), S = (n) => n.tags.length > 0 || !!n.description, j = (n) => {
|
|
94
94
|
n.showDetailState = !n.showDetailState;
|
|
95
|
-
},
|
|
95
|
+
}, E = (n, a) => {
|
|
96
96
|
m("openDeleteDialog", n, a);
|
|
97
97
|
}, M = (n, a) => {
|
|
98
98
|
m("openEditDocumentDialog", n, a);
|
|
99
|
-
},
|
|
100
|
-
h.retain(e.documentAttachment.map((a) => a.file)),
|
|
101
|
-
|
|
99
|
+
}, c = () => {
|
|
100
|
+
if (h.retain(e.documentAttachment.map((a) => a.file)), !e.thumb) return;
|
|
101
|
+
console.log("🎯 Generating thumbnails for videos, total attachments:", e.documentAttachment.length);
|
|
102
|
+
const n = e.documentAttachment.filter((a) => C(a.file.name));
|
|
102
103
|
console.log("📹 Found video attachments:", n.length, n.map((a) => a.file.name)), n.forEach((a) => {
|
|
103
104
|
console.log("🎬 Processing video:", a.file.name), g(a.file);
|
|
104
105
|
});
|
|
105
106
|
};
|
|
106
|
-
return
|
|
107
|
-
const r = f("v-icon"),
|
|
108
|
-
return
|
|
107
|
+
return U(() => e.documentAttachment, c, { immediate: !0 }), ke(c), (n, a) => {
|
|
108
|
+
const r = f("v-icon"), d = f("v-card-subtitle"), x = f("v-chip"), b = f("v-divider"), V = f("v-btn"), F = f("v-tooltip"), N = f("v-spacer"), K = f("v-card-actions"), ee = f("v-chip-group"), q = f("v-card-text"), le = f("v-expand-transition"), oe = f("v-card"), ne = f("v-col"), ae = f("v-row");
|
|
109
|
+
return u(), w("div", null, [
|
|
109
110
|
s(ae, null, {
|
|
110
111
|
default: o(() => [
|
|
111
|
-
(
|
|
112
|
+
(u(!0), w(H, null, W(l.documentAttachment, ($, X) => (u(), v(ne, {
|
|
112
113
|
key: `attachment-${X}`,
|
|
113
114
|
cols: "12",
|
|
114
115
|
md: l.cols,
|
|
@@ -124,19 +125,19 @@ const te = /* @__PURE__ */ J({
|
|
|
124
125
|
"max-width": "344"
|
|
125
126
|
}, {
|
|
126
127
|
default: o(() => [
|
|
127
|
-
t($.file.name) ? (
|
|
128
|
+
l.thumb && t($.file.name) ? (u(), w("div", He, [
|
|
128
129
|
D("img", {
|
|
129
|
-
src:
|
|
130
|
+
src: T($.file),
|
|
130
131
|
style: { "max-width": "100%", "max-height": "100%", "object-fit": "contain" },
|
|
131
|
-
onError: (
|
|
132
|
-
}, null, 40,
|
|
133
|
-
])) :
|
|
134
|
-
g($.file) ? (
|
|
132
|
+
onError: (I) => k($.file)
|
|
133
|
+
}, null, 40, Ne)
|
|
134
|
+
])) : l.thumb && C($.file.name) ? (u(), w("div", Oe, [
|
|
135
|
+
g($.file) ? (u(), w("img", {
|
|
135
136
|
key: 0,
|
|
136
137
|
src: g($.file),
|
|
137
138
|
style: { width: "100%", height: "100%", "object-fit": "cover" },
|
|
138
|
-
onError: (
|
|
139
|
-
}, null, 40,
|
|
139
|
+
onError: (I) => B($.file)
|
|
140
|
+
}, null, 40, qe)) : (u(), w("div", Re, [
|
|
140
141
|
s(r, {
|
|
141
142
|
size: "60",
|
|
142
143
|
color: "grey"
|
|
@@ -147,7 +148,7 @@ const te = /* @__PURE__ */ J({
|
|
|
147
148
|
_: 1
|
|
148
149
|
})
|
|
149
150
|
])),
|
|
150
|
-
D("div",
|
|
151
|
+
D("div", We, [
|
|
151
152
|
s(r, {
|
|
152
153
|
color: "white",
|
|
153
154
|
size: "30"
|
|
@@ -158,7 +159,7 @@ const te = /* @__PURE__ */ J({
|
|
|
158
159
|
_: 1
|
|
159
160
|
})
|
|
160
161
|
])
|
|
161
|
-
])) : (
|
|
162
|
+
])) : (u(), w("div", Xe, [
|
|
162
163
|
s(r, {
|
|
163
164
|
size: "120",
|
|
164
165
|
color: L($.file.name).color
|
|
@@ -169,13 +170,13 @@ const te = /* @__PURE__ */ J({
|
|
|
169
170
|
_: 2
|
|
170
171
|
}, 1032, ["color"])
|
|
171
172
|
])),
|
|
172
|
-
s(
|
|
173
|
+
s(d, { class: "text-truncate py-2" }, {
|
|
173
174
|
default: o(() => [
|
|
174
175
|
_(y($.file.name), 1)
|
|
175
176
|
]),
|
|
176
177
|
_: 2
|
|
177
178
|
}, 1024),
|
|
178
|
-
s(
|
|
179
|
+
s(d, { class: "pt-2 pb-3" }, {
|
|
179
180
|
default: o(() => [
|
|
180
181
|
s(x, {
|
|
181
182
|
color: G(se)($.file.size).color,
|
|
@@ -196,17 +197,17 @@ const te = /* @__PURE__ */ J({
|
|
|
196
197
|
]),
|
|
197
198
|
_: 2
|
|
198
199
|
}, 1024),
|
|
199
|
-
s(
|
|
200
|
+
s(b, { class: "mx-4" }),
|
|
200
201
|
s(K, { style: { padding: "0" } }, {
|
|
201
202
|
default: o(() => [
|
|
202
203
|
s(F, { right: "" }, {
|
|
203
|
-
activator: o(({ props:
|
|
204
|
-
l.deletePermission ? (
|
|
204
|
+
activator: o(({ props: I }) => [
|
|
205
|
+
l.deletePermission ? (u(), v(V, R({
|
|
205
206
|
key: 0,
|
|
206
207
|
text: "",
|
|
207
208
|
fab: ""
|
|
208
|
-
}, { ref_for: !0 },
|
|
209
|
-
onClick: (Y) =>
|
|
209
|
+
}, { ref_for: !0 }, I, {
|
|
210
|
+
onClick: (Y) => E(X, "")
|
|
210
211
|
}), {
|
|
211
212
|
default: o(() => [
|
|
212
213
|
s(r, { color: "red" }, {
|
|
@@ -220,17 +221,17 @@ const te = /* @__PURE__ */ J({
|
|
|
220
221
|
}, 16, ["onClick"])) : A("", !0)
|
|
221
222
|
]),
|
|
222
223
|
default: o(() => [
|
|
223
|
-
D("span",
|
|
224
|
+
D("span", Ye, y(l.selectedLang[l.lang].delete), 1)
|
|
224
225
|
]),
|
|
225
226
|
_: 2
|
|
226
227
|
}, 1024),
|
|
227
228
|
s(F, { right: "" }, {
|
|
228
|
-
activator: o(({ props:
|
|
229
|
-
l.editPermission ? (
|
|
229
|
+
activator: o(({ props: I }) => [
|
|
230
|
+
l.editPermission ? (u(), v(V, R({
|
|
230
231
|
key: 0,
|
|
231
232
|
text: "",
|
|
232
233
|
fab: ""
|
|
233
|
-
}, { ref_for: !0 },
|
|
234
|
+
}, { ref_for: !0 }, I, {
|
|
234
235
|
onClick: (Y) => M($, X)
|
|
235
236
|
}), {
|
|
236
237
|
default: o(() => [
|
|
@@ -245,15 +246,15 @@ const te = /* @__PURE__ */ J({
|
|
|
245
246
|
}, 16, ["onClick"])) : A("", !0)
|
|
246
247
|
]),
|
|
247
248
|
default: o(() => [
|
|
248
|
-
D("span",
|
|
249
|
+
D("span", Ge, y(l.selectedLang[l.lang].edit), 1)
|
|
249
250
|
]),
|
|
250
251
|
_: 2
|
|
251
252
|
}, 1024),
|
|
252
253
|
s(N),
|
|
253
|
-
|
|
254
|
+
S($.file) ? (u(), v(V, {
|
|
254
255
|
key: 0,
|
|
255
256
|
icon: "",
|
|
256
|
-
onClick: (
|
|
257
|
+
onClick: (I) => j($.file)
|
|
257
258
|
}, {
|
|
258
259
|
default: o(() => [
|
|
259
260
|
s(r, null, {
|
|
@@ -270,28 +271,28 @@ const te = /* @__PURE__ */ J({
|
|
|
270
271
|
}, 1024),
|
|
271
272
|
s(le, null, {
|
|
272
273
|
default: o(() => [
|
|
273
|
-
|
|
274
|
-
s(
|
|
275
|
-
$.file.tags.length ? (
|
|
274
|
+
S($.file) ? pe((u(), w("div", Ke, [
|
|
275
|
+
s(b),
|
|
276
|
+
$.file.tags.length ? (u(), v(ee, {
|
|
276
277
|
key: 0,
|
|
277
278
|
multiple: "",
|
|
278
279
|
"active-class": "primary--text",
|
|
279
280
|
class: "pa-2"
|
|
280
281
|
}, {
|
|
281
282
|
default: o(() => [
|
|
282
|
-
(
|
|
283
|
+
(u(!0), w(H, null, W($.file.tags, (I, Y) => (u(), v(x, {
|
|
283
284
|
key: `tag-${Y}`,
|
|
284
285
|
class: "ma-1"
|
|
285
286
|
}, {
|
|
286
287
|
default: o(() => [
|
|
287
|
-
_(y(
|
|
288
|
+
_(y(I), 1)
|
|
288
289
|
]),
|
|
289
290
|
_: 2
|
|
290
291
|
}, 1024))), 128))
|
|
291
292
|
]),
|
|
292
293
|
_: 2
|
|
293
294
|
}, 1024)) : A("", !0),
|
|
294
|
-
$.file.description ? (
|
|
295
|
+
$.file.description ? (u(), v(q, {
|
|
295
296
|
key: 1,
|
|
296
297
|
class: "text-justify"
|
|
297
298
|
}, {
|
|
@@ -318,16 +319,16 @@ const te = /* @__PURE__ */ J({
|
|
|
318
319
|
]);
|
|
319
320
|
};
|
|
320
321
|
}
|
|
321
|
-
}),
|
|
322
|
+
}), Je = {
|
|
322
323
|
class: "text-left",
|
|
323
324
|
style: { width: "80px" }
|
|
324
|
-
},
|
|
325
|
+
}, Qe = { class: "text-center" }, Ze = {
|
|
325
326
|
class: "text-left",
|
|
326
327
|
style: { width: "120px" }
|
|
327
|
-
},
|
|
328
|
+
}, et = {
|
|
328
329
|
class: "text-left",
|
|
329
330
|
style: { width: "120px" }
|
|
330
|
-
},
|
|
331
|
+
}, tt = { class: "text-center pa-3" }, lt = { class: "text-left pa-3" }, ot = { class: "text-left pa-3" }, nt = { class: "text-center pa-2" }, at = { class: "d-flex justify-center ga-1" }, it = /* @__PURE__ */ J({
|
|
331
332
|
__name: "TableUploader",
|
|
332
333
|
props: {
|
|
333
334
|
documentAttachment: {},
|
|
@@ -343,23 +344,23 @@ const te = /* @__PURE__ */ J({
|
|
|
343
344
|
},
|
|
344
345
|
emits: ["openDeleteDialog", "openEditDocumentDialog"],
|
|
345
346
|
setup(l, { emit: i }) {
|
|
346
|
-
const t = l, e = i, m = (h) => h ? re(h) : !1,
|
|
347
|
-
const g = h / 1e3,
|
|
348
|
-
return
|
|
349
|
-
},
|
|
347
|
+
const t = l, e = i, m = (h) => h ? re(h) : !1, C = (h) => {
|
|
348
|
+
const g = h / 1e3, B = g / 1024;
|
|
349
|
+
return B >= 1 ? `${B.toFixed(1)} MB` : `${g.toFixed(1)} KB`;
|
|
350
|
+
}, T = (h) => {
|
|
350
351
|
const g = h / 1024e3;
|
|
351
352
|
return g < 1 ? "success" : g < 5 ? "warning" : "error";
|
|
352
|
-
},
|
|
353
|
+
}, k = (h, g) => {
|
|
353
354
|
e("openDeleteDialog", h, g);
|
|
354
|
-
},
|
|
355
|
+
}, z = (h, g) => {
|
|
355
356
|
e("openEditDocumentDialog", h, g);
|
|
356
357
|
};
|
|
357
358
|
return (h, g) => {
|
|
358
|
-
const
|
|
359
|
-
return
|
|
359
|
+
const B = f("v-img"), L = f("v-icon"), S = f("v-tooltip"), j = f("v-chip"), E = f("v-btn"), M = f("v-table"), c = f("v-col"), n = f("v-row");
|
|
360
|
+
return u(), w("div", null, [
|
|
360
361
|
s(n, null, {
|
|
361
362
|
default: o(() => [
|
|
362
|
-
s(
|
|
363
|
+
s(c, { cols: "12" }, {
|
|
363
364
|
default: o(() => [
|
|
364
365
|
s(M, {
|
|
365
366
|
"fixed-header": t.tableFixedHeader,
|
|
@@ -369,26 +370,26 @@ const te = /* @__PURE__ */ J({
|
|
|
369
370
|
default: o(() => [
|
|
370
371
|
D("thead", null, [
|
|
371
372
|
D("tr", null, [
|
|
372
|
-
D("th",
|
|
373
|
-
D("th",
|
|
374
|
-
D("th",
|
|
375
|
-
D("th",
|
|
373
|
+
D("th", Je, y(t.selectedLang[l.lang].table.thumb), 1),
|
|
374
|
+
D("th", Qe, y(t.selectedLang[l.lang].table.name), 1),
|
|
375
|
+
D("th", Ze, y(t.selectedLang[l.lang].table.size), 1),
|
|
376
|
+
D("th", et, y(t.selectedLang[l.lang].table.action.action), 1)
|
|
376
377
|
])
|
|
377
378
|
]),
|
|
378
379
|
D("tbody", null, [
|
|
379
|
-
(
|
|
380
|
+
(u(!0), w(H, null, W(t.documentAttachment, (a, r) => (u(), w("tr", {
|
|
380
381
|
key: `attachment-${r}`,
|
|
381
382
|
class: "table-row"
|
|
382
383
|
}, [
|
|
383
|
-
D("td",
|
|
384
|
-
s(
|
|
385
|
-
activator: o(({ props:
|
|
384
|
+
D("td", tt, [
|
|
385
|
+
s(S, { location: "top" }, {
|
|
386
|
+
activator: o(({ props: d }) => [
|
|
386
387
|
D("div", R({
|
|
387
388
|
class: "d-flex justify-center align-center",
|
|
388
389
|
style: { height: "60px", width: "60px" }
|
|
389
|
-
}, { ref_for: !0 },
|
|
390
|
-
m(a.file.name) ? (
|
|
391
|
-
t.thumb && a.file.base64 ? (
|
|
390
|
+
}, { ref_for: !0 }, d), [
|
|
391
|
+
m(a.file.name) ? (u(), w(H, { key: 0 }, [
|
|
392
|
+
t.thumb && a.file.base64 ? (u(), v(B, {
|
|
392
393
|
key: 0,
|
|
393
394
|
style: { height: "40px", width: "40px" },
|
|
394
395
|
src: "data:" + a.file.format + ";base64," + a.file.base64,
|
|
@@ -396,7 +397,7 @@ const te = /* @__PURE__ */ J({
|
|
|
396
397
|
width: "40",
|
|
397
398
|
class: "rounded",
|
|
398
399
|
contain: ""
|
|
399
|
-
}, null, 8, ["src"])) : (
|
|
400
|
+
}, null, 8, ["src"])) : (u(), v(L, {
|
|
400
401
|
key: 1,
|
|
401
402
|
size: "40",
|
|
402
403
|
color: "deep-purple"
|
|
@@ -406,7 +407,7 @@ const te = /* @__PURE__ */ J({
|
|
|
406
407
|
])]),
|
|
407
408
|
_: 1
|
|
408
409
|
}))
|
|
409
|
-
], 64)) : (
|
|
410
|
+
], 64)) : (u(), v(L, {
|
|
410
411
|
key: 1,
|
|
411
412
|
icon: G(ue)(a.file.name),
|
|
412
413
|
color: G(de)(a.file.name),
|
|
@@ -420,12 +421,12 @@ const te = /* @__PURE__ */ J({
|
|
|
420
421
|
_: 2
|
|
421
422
|
}, 1024)
|
|
422
423
|
]),
|
|
423
|
-
D("td",
|
|
424
|
-
s(
|
|
425
|
-
activator: o(({ props:
|
|
426
|
-
D("span", R({ ref_for: !0 },
|
|
427
|
-
const x = a.file.name.split(".").pop(),
|
|
428
|
-
return `${
|
|
424
|
+
D("td", lt, [
|
|
425
|
+
s(S, { location: "top" }, {
|
|
426
|
+
activator: o(({ props: d }) => [
|
|
427
|
+
D("span", R({ ref_for: !0 }, d), y((() => {
|
|
428
|
+
const x = a.file.name.split(".").pop(), b = a.file.name.slice(0, a.file.name.lastIndexOf("."));
|
|
429
|
+
return `${b.length > 10 ? b.slice(0, 10) + "..." : b}.${x}`;
|
|
429
430
|
})()), 17)
|
|
430
431
|
]),
|
|
431
432
|
default: o(() => [
|
|
@@ -434,33 +435,33 @@ const te = /* @__PURE__ */ J({
|
|
|
434
435
|
_: 2
|
|
435
436
|
}, 1024)
|
|
436
437
|
]),
|
|
437
|
-
D("td",
|
|
438
|
+
D("td", ot, [
|
|
438
439
|
s(j, {
|
|
439
|
-
color:
|
|
440
|
+
color: T(a.file.size),
|
|
440
441
|
variant: "tonal",
|
|
441
442
|
size: "small",
|
|
442
443
|
class: "text-caption"
|
|
443
444
|
}, {
|
|
444
445
|
default: o(() => [
|
|
445
|
-
_(y(
|
|
446
|
+
_(y(C(a.file.size)), 1)
|
|
446
447
|
]),
|
|
447
448
|
_: 2
|
|
448
449
|
}, 1032, ["color"])
|
|
449
450
|
]),
|
|
450
|
-
D("td",
|
|
451
|
-
D("div",
|
|
452
|
-
l.editPermission ? (
|
|
451
|
+
D("td", nt, [
|
|
452
|
+
D("div", at, [
|
|
453
|
+
l.editPermission ? (u(), v(S, {
|
|
453
454
|
key: 0,
|
|
454
455
|
location: "top"
|
|
455
456
|
}, {
|
|
456
|
-
activator: o(({ props:
|
|
457
|
-
s(
|
|
457
|
+
activator: o(({ props: d }) => [
|
|
458
|
+
s(E, R({
|
|
458
459
|
icon: "",
|
|
459
460
|
size: "small",
|
|
460
461
|
color: "success",
|
|
461
462
|
variant: "text"
|
|
462
|
-
}, { ref_for: !0 },
|
|
463
|
-
onClick: (x) =>
|
|
463
|
+
}, { ref_for: !0 }, d, {
|
|
464
|
+
onClick: (x) => z(a, r)
|
|
464
465
|
}), {
|
|
465
466
|
default: o(() => [
|
|
466
467
|
s(L, { size: "18" }, {
|
|
@@ -478,18 +479,18 @@ const te = /* @__PURE__ */ J({
|
|
|
478
479
|
]),
|
|
479
480
|
_: 2
|
|
480
481
|
}, 1024)) : A("", !0),
|
|
481
|
-
l.deletePermission ? (
|
|
482
|
+
l.deletePermission ? (u(), v(S, {
|
|
482
483
|
key: 1,
|
|
483
484
|
location: "top"
|
|
484
485
|
}, {
|
|
485
|
-
activator: o(({ props:
|
|
486
|
-
s(
|
|
486
|
+
activator: o(({ props: d }) => [
|
|
487
|
+
s(E, R({
|
|
487
488
|
icon: "",
|
|
488
489
|
size: "small",
|
|
489
490
|
color: "error",
|
|
490
491
|
variant: "text"
|
|
491
|
-
}, { ref_for: !0 },
|
|
492
|
-
onClick: (x) =>
|
|
492
|
+
}, { ref_for: !0 }, d, {
|
|
493
|
+
onClick: (x) => k(r, "")
|
|
493
494
|
}), {
|
|
494
495
|
default: o(() => [
|
|
495
496
|
s(L, { size: "18" }, {
|
|
@@ -528,25 +529,25 @@ const te = /* @__PURE__ */ J({
|
|
|
528
529
|
for (const [e, m] of i)
|
|
529
530
|
t[e] = m;
|
|
530
531
|
return t;
|
|
531
|
-
}, be = /* @__PURE__ */ ve(
|
|
532
|
+
}, be = /* @__PURE__ */ ve(it, [["__scopeId", "data-v-d05b814b"]]), st = {
|
|
532
533
|
class: "d-flex align-center pa-3",
|
|
533
534
|
style: { height: "100%" }
|
|
534
|
-
},
|
|
535
|
+
}, rt = {
|
|
535
536
|
class: "flex-grow-1 pr-4",
|
|
536
537
|
style: { "max-width": "60%" }
|
|
537
|
-
},
|
|
538
|
+
}, dt = {
|
|
538
539
|
class: "text-subtitle-1 font-weight-medium mb-2",
|
|
539
540
|
style: { overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap", "max-width": "100%" }
|
|
540
|
-
},
|
|
541
|
+
}, ut = {
|
|
541
542
|
class: "flex-shrink-0",
|
|
542
543
|
style: { "min-width": "80px" }
|
|
543
|
-
},
|
|
544
|
+
}, ct = {
|
|
544
545
|
key: 0,
|
|
545
546
|
class: "thumbnail-container"
|
|
546
|
-
},
|
|
547
|
+
}, mt = {
|
|
547
548
|
key: 1,
|
|
548
549
|
class: "d-flex align-center justify-center"
|
|
549
|
-
},
|
|
550
|
+
}, ft = { class: "d-flex gap-2 pb-1" }, pt = /* @__PURE__ */ J({
|
|
550
551
|
__name: "SimpleUploader",
|
|
551
552
|
props: {
|
|
552
553
|
documentAttachment: {},
|
|
@@ -567,17 +568,17 @@ const te = /* @__PURE__ */ J({
|
|
|
567
568
|
const t = l, e = i, m = (h) => {
|
|
568
569
|
const g = h / 1e3;
|
|
569
570
|
return g < 1024 ? `${g.toFixed(1)} ${t.selectedLang[t.lang].size.kb}` : `${(g / 1024).toFixed(1)} ${t.selectedLang[t.lang].size.mb}`;
|
|
570
|
-
},
|
|
571
|
+
}, C = (h) => {
|
|
571
572
|
var g;
|
|
572
573
|
return ["jpg", "jpeg", "png", "tif", "bmp"].includes(((g = h.split(".").pop()) == null ? void 0 : g.toLowerCase()) || "");
|
|
573
|
-
},
|
|
574
|
+
}, T = (h) => h.base64 ? h.base64.startsWith("data:") ? h.base64 : `data:${h.format};base64,${h.base64}` : "", k = (h, g) => e("openDeleteDialog", h, g), z = (h, g) => e("openEditDocumentDialog", h, g);
|
|
574
575
|
return (h, g) => {
|
|
575
|
-
const
|
|
576
|
-
return
|
|
576
|
+
const B = f("v-icon"), L = f("v-chip"), S = f("v-img"), j = f("v-divider"), E = f("v-btn"), M = f("v-tooltip"), c = f("v-chip-group"), n = f("v-card-text"), a = f("v-expand-transition"), r = f("v-card"), d = f("v-col"), x = f("v-row");
|
|
577
|
+
return u(), w("div", null, [
|
|
577
578
|
s(x, null, {
|
|
578
579
|
default: o(() => [
|
|
579
|
-
(
|
|
580
|
-
key: `attachment-${
|
|
580
|
+
(u(!0), w(H, null, W(t.documentAttachment, (b, V) => (u(), v(d, {
|
|
581
|
+
key: `attachment-${V}`,
|
|
581
582
|
cols: "12",
|
|
582
583
|
sm: "6",
|
|
583
584
|
md: "4",
|
|
@@ -593,9 +594,9 @@ const te = /* @__PURE__ */ J({
|
|
|
593
594
|
height: "180"
|
|
594
595
|
}, {
|
|
595
596
|
default: o(() => [
|
|
596
|
-
D("div",
|
|
597
|
-
D("div",
|
|
598
|
-
D("div",
|
|
597
|
+
D("div", st, [
|
|
598
|
+
D("div", rt, [
|
|
599
|
+
D("div", dt, y(b.file.name), 1),
|
|
599
600
|
s(L, {
|
|
600
601
|
color: "teal",
|
|
601
602
|
variant: "flat",
|
|
@@ -603,7 +604,7 @@ const te = /* @__PURE__ */ J({
|
|
|
603
604
|
class: "text-white mb-2"
|
|
604
605
|
}, {
|
|
605
606
|
default: o(() => [
|
|
606
|
-
s(
|
|
607
|
+
s(B, {
|
|
607
608
|
start: "",
|
|
608
609
|
size: "16"
|
|
609
610
|
}, {
|
|
@@ -612,27 +613,27 @@ const te = /* @__PURE__ */ J({
|
|
|
612
613
|
])]),
|
|
613
614
|
_: 1
|
|
614
615
|
}),
|
|
615
|
-
_(" " + y(m(
|
|
616
|
+
_(" " + y(m(b.file.size)), 1)
|
|
616
617
|
]),
|
|
617
618
|
_: 2
|
|
618
619
|
}, 1024)
|
|
619
620
|
]),
|
|
620
|
-
D("div",
|
|
621
|
-
|
|
622
|
-
s(
|
|
623
|
-
src:
|
|
621
|
+
D("div", ut, [
|
|
622
|
+
C(b.file.name) && t.thumb ? (u(), w("div", ct, [
|
|
623
|
+
s(S, {
|
|
624
|
+
src: T(b.file),
|
|
624
625
|
height: "80",
|
|
625
626
|
width: "80",
|
|
626
627
|
cover: "",
|
|
627
628
|
class: "rounded"
|
|
628
629
|
}, null, 8, ["src"])
|
|
629
|
-
])) : (
|
|
630
|
-
s(
|
|
631
|
-
color: G(de)(
|
|
630
|
+
])) : (u(), w("div", mt, [
|
|
631
|
+
s(B, {
|
|
632
|
+
color: G(de)(b.file.name),
|
|
632
633
|
size: "60"
|
|
633
634
|
}, {
|
|
634
635
|
default: o(() => [
|
|
635
|
-
_(y(G(ue)(
|
|
636
|
+
_(y(G(ue)(b.file.name)), 1)
|
|
636
637
|
]),
|
|
637
638
|
_: 2
|
|
638
639
|
}, 1032, ["color"])
|
|
@@ -640,19 +641,19 @@ const te = /* @__PURE__ */ J({
|
|
|
640
641
|
])
|
|
641
642
|
]),
|
|
642
643
|
s(j, { class: "my-2" }),
|
|
643
|
-
D("div",
|
|
644
|
+
D("div", ft, [
|
|
644
645
|
s(M, { bottom: "" }, {
|
|
645
646
|
activator: o(({ props: F }) => [
|
|
646
|
-
t.deletePermission ? (
|
|
647
|
+
t.deletePermission ? (u(), v(E, R({
|
|
647
648
|
key: 0,
|
|
648
649
|
icon: "",
|
|
649
650
|
variant: "text",
|
|
650
651
|
size: "small"
|
|
651
652
|
}, { ref_for: !0 }, F, {
|
|
652
|
-
onClick: (N) =>
|
|
653
|
+
onClick: (N) => k(V, "")
|
|
653
654
|
}), {
|
|
654
655
|
default: o(() => [
|
|
655
|
-
s(
|
|
656
|
+
s(B, {
|
|
656
657
|
color: "red",
|
|
657
658
|
size: "20"
|
|
658
659
|
}, {
|
|
@@ -672,16 +673,16 @@ const te = /* @__PURE__ */ J({
|
|
|
672
673
|
}, 1024),
|
|
673
674
|
s(M, { bottom: "" }, {
|
|
674
675
|
activator: o(({ props: F }) => [
|
|
675
|
-
t.editPermission ? (
|
|
676
|
+
t.editPermission ? (u(), v(E, R({
|
|
676
677
|
key: 0,
|
|
677
678
|
icon: "",
|
|
678
679
|
variant: "text",
|
|
679
680
|
size: "small"
|
|
680
681
|
}, { ref_for: !0 }, F, {
|
|
681
|
-
onClick: (N) =>
|
|
682
|
+
onClick: (N) => z(b, V)
|
|
682
683
|
}), {
|
|
683
684
|
default: o(() => [
|
|
684
|
-
s(
|
|
685
|
+
s(B, {
|
|
685
686
|
color: "green",
|
|
686
687
|
size: "20"
|
|
687
688
|
}, {
|
|
@@ -704,14 +705,14 @@ const te = /* @__PURE__ */ J({
|
|
|
704
705
|
default: o(() => [
|
|
705
706
|
pe(D("div", null, [
|
|
706
707
|
s(j),
|
|
707
|
-
|
|
708
|
+
b.file.tags.length ? (u(), v(c, {
|
|
708
709
|
key: 0,
|
|
709
710
|
multiple: "",
|
|
710
711
|
"active-class": "primary--text",
|
|
711
712
|
style: { padding: "8px" }
|
|
712
713
|
}, {
|
|
713
714
|
default: o(() => [
|
|
714
|
-
(
|
|
715
|
+
(u(!0), w(H, null, W(b.file.tags, (F, N) => (u(), v(L, {
|
|
715
716
|
key: `tag-${N}`,
|
|
716
717
|
style: { margin: "5px" }
|
|
717
718
|
}, {
|
|
@@ -723,17 +724,17 @@ const te = /* @__PURE__ */ J({
|
|
|
723
724
|
]),
|
|
724
725
|
_: 2
|
|
725
726
|
}, 1024)) : A("", !0),
|
|
726
|
-
|
|
727
|
+
b.file.description ? (u(), v(n, {
|
|
727
728
|
key: 1,
|
|
728
729
|
style: { "text-align": "justify" }
|
|
729
730
|
}, {
|
|
730
731
|
default: o(() => [
|
|
731
|
-
_(y(
|
|
732
|
+
_(y(b.file.description), 1)
|
|
732
733
|
]),
|
|
733
734
|
_: 2
|
|
734
735
|
}, 1024)) : A("", !0)
|
|
735
736
|
], 512), [
|
|
736
|
-
[ge,
|
|
737
|
+
[ge, b.file.showDetailState]
|
|
737
738
|
])
|
|
738
739
|
]),
|
|
739
740
|
_: 2
|
|
@@ -750,7 +751,7 @@ const te = /* @__PURE__ */ J({
|
|
|
750
751
|
]);
|
|
751
752
|
};
|
|
752
753
|
}
|
|
753
|
-
}), _e = /* @__PURE__ */ ve(
|
|
754
|
+
}), _e = /* @__PURE__ */ ve(pt, [["__scopeId", "data-v-f7000da4"]]), ye = /* @__PURE__ */ J({
|
|
754
755
|
__name: "InsertButton",
|
|
755
756
|
props: {
|
|
756
757
|
documentAttachment: {},
|
|
@@ -762,97 +763,100 @@ const te = /* @__PURE__ */ J({
|
|
|
762
763
|
},
|
|
763
764
|
emits: ["openInputDocumentModal"],
|
|
764
765
|
setup(l, { emit: i }) {
|
|
765
|
-
const t = i, e = l, m = () => {
|
|
766
|
+
const t = i, e = l, m = Q(() => e.documentAttachment.length >= e.maxFileCount), C = () => {
|
|
766
767
|
t("openInputDocumentModal");
|
|
767
768
|
};
|
|
768
|
-
return (
|
|
769
|
-
const
|
|
770
|
-
return
|
|
771
|
-
e.badgeCounter ? (
|
|
772
|
-
e.documentAttachment.length > 0 ? (
|
|
769
|
+
return (T, k) => {
|
|
770
|
+
const z = f("v-btn"), h = f("v-badge");
|
|
771
|
+
return u(), w("div", null, [
|
|
772
|
+
e.badgeCounter ? (u(), w(H, { key: 0 }, [
|
|
773
|
+
e.documentAttachment.length > 0 ? (u(), v(h, {
|
|
773
774
|
key: 0,
|
|
774
775
|
bordered: "",
|
|
775
|
-
color:
|
|
776
|
+
color: m.value ? "error" : "success",
|
|
776
777
|
overlap: "",
|
|
777
778
|
content: l.documentAttachment.length
|
|
778
779
|
}, {
|
|
779
780
|
default: o(() => [
|
|
780
|
-
s(
|
|
781
|
+
s(z, {
|
|
781
782
|
color: e.btnColor,
|
|
782
|
-
|
|
783
|
+
disabled: m.value,
|
|
784
|
+
onClick: C,
|
|
783
785
|
class: "mb-4"
|
|
784
786
|
}, {
|
|
785
787
|
default: o(() => [
|
|
786
788
|
_(y(e.selectedLang[l.lang].insertFile), 1)
|
|
787
789
|
]),
|
|
788
790
|
_: 1
|
|
789
|
-
}, 8, ["color"])
|
|
791
|
+
}, 8, ["color", "disabled"])
|
|
790
792
|
]),
|
|
791
793
|
_: 1
|
|
792
|
-
}, 8, ["color", "content"])) : (
|
|
794
|
+
}, 8, ["color", "content"])) : (u(), v(z, {
|
|
793
795
|
key: 1,
|
|
794
796
|
color: e.btnColor,
|
|
795
|
-
|
|
797
|
+
disabled: m.value,
|
|
798
|
+
onClick: C,
|
|
796
799
|
class: "mb-4"
|
|
797
800
|
}, {
|
|
798
801
|
default: o(() => [
|
|
799
802
|
_(y(e.selectedLang[l.lang].insertFile), 1)
|
|
800
803
|
]),
|
|
801
804
|
_: 1
|
|
802
|
-
}, 8, ["color"]))
|
|
805
|
+
}, 8, ["color", "disabled"]))
|
|
803
806
|
], 64)) : A("", !0),
|
|
804
|
-
e.badgeCounter ? A("", !0) : (
|
|
807
|
+
e.badgeCounter ? A("", !0) : (u(), v(z, {
|
|
805
808
|
key: 1,
|
|
806
809
|
color: l.btnColor,
|
|
807
|
-
|
|
810
|
+
disabled: m.value,
|
|
811
|
+
onClick: C,
|
|
808
812
|
class: "mb-4"
|
|
809
813
|
}, {
|
|
810
814
|
default: o(() => [
|
|
811
815
|
_(y(e.selectedLang[l.lang].insertFile), 1)
|
|
812
816
|
]),
|
|
813
817
|
_: 1
|
|
814
|
-
}, 8, ["color"]))
|
|
818
|
+
}, 8, ["color", "disabled"]))
|
|
815
819
|
]);
|
|
816
820
|
};
|
|
817
821
|
}
|
|
818
822
|
});
|
|
819
|
-
function
|
|
823
|
+
function gt(l) {
|
|
820
824
|
const i = ["simple", "thumbnail", "table"], t = { isValid: !0, errors: [], warnings: [] };
|
|
821
825
|
return typeof l != "string" ? (t.isValid = !1, t.errors.push("File uploader type must be a string")) : i.includes(l) || (t.isValid = !1, t.errors.push(`File uploader type must be one of: ${i.join(", ")}`)), t;
|
|
822
826
|
}
|
|
823
|
-
function
|
|
827
|
+
function ht(l) {
|
|
824
828
|
const i = ["default", "outlined", "shaped", "raised", "tile"], t = { isValid: !0, errors: [], warnings: [] };
|
|
825
829
|
return l !== void 0 && typeof l != "string" ? (t.isValid = !1, t.errors.push("Card type must be a string")) : l && !i.includes(l) && (t.isValid = !1, t.errors.push(`Card type must be one of: ${i.join(", ")}`)), t;
|
|
826
830
|
}
|
|
827
|
-
function
|
|
831
|
+
function vt(l) {
|
|
828
832
|
const i = ["en", "fa", "fr", "ch", "ar"], t = { isValid: !0, errors: [], warnings: [] };
|
|
829
833
|
return typeof l != "string" ? (t.isValid = !1, t.errors.push("Language code must be a string")) : i.includes(l) || (t.isValid = !1, t.errors.push(`Language code must be one of: ${i.join(", ")}`)), t;
|
|
830
834
|
}
|
|
831
|
-
function
|
|
835
|
+
function bt(l) {
|
|
832
836
|
const i = { isValid: !0, errors: [], warnings: [] };
|
|
833
837
|
return typeof l != "number" ? (i.isValid = !1, i.errors.push("File size must be a number")) : l <= 0 ? (i.isValid = !1, i.errors.push("File size must be greater than 0")) : l > 100 * 1024 * 1024 && i.warnings.push("File size limit is very large (>100MB), consider reducing for better performance"), i;
|
|
834
838
|
}
|
|
835
|
-
function
|
|
839
|
+
function _t(l) {
|
|
836
840
|
const i = { isValid: !0, errors: [], warnings: [] };
|
|
837
841
|
return typeof l != "number" ? (i.isValid = !1, i.errors.push("File count must be a number")) : l < 0 ? (i.isValid = !1, i.errors.push("File count cannot be negative")) : l > 100 && i.warnings.push("File count limit is very high (>100), consider reducing for better performance"), i;
|
|
838
842
|
}
|
|
839
|
-
function
|
|
843
|
+
function yt(l) {
|
|
840
844
|
const i = { isValid: !0, errors: [], warnings: [] };
|
|
841
845
|
return typeof l != "number" ? (i.isValid = !1, i.errors.push("Compression level must be a number")) : l < 0 || l > 1 ? (i.isValid = !1, i.errors.push("Compression level must be between 0 and 1")) : l < 0.1 ? i.warnings.push("Very low compression level may result in poor image quality") : l > 0.9 && i.warnings.push("Very high compression level may not reduce file size significantly"), i;
|
|
842
846
|
}
|
|
843
|
-
function
|
|
847
|
+
function xt(l) {
|
|
844
848
|
const i = { isValid: !0, errors: [], warnings: [] };
|
|
845
849
|
return l !== void 0 && typeof l != "string" ? (i.isValid = !1, i.errors.push("File accept pattern must be a string")) : l && l.trim() === "" && i.warnings.push("Empty file accept pattern will accept all files"), i;
|
|
846
850
|
}
|
|
847
|
-
function
|
|
851
|
+
function Ft(l) {
|
|
848
852
|
const i = { isValid: !0, errors: [], warnings: [] };
|
|
849
853
|
return typeof l != "number" ? (i.isValid = !1, i.errors.push("Columns count must be a number")) : (l < 1 || l > 12) && (i.isValid = !1, i.errors.push("Columns count must be between 1 and 12")), i;
|
|
850
854
|
}
|
|
851
|
-
function
|
|
855
|
+
function Dt(l) {
|
|
852
856
|
const i = { isValid: !0, errors: [], warnings: [] };
|
|
853
857
|
return l !== void 0 && typeof l != "number" ? (i.isValid = !1, i.errors.push("Table height must be a number")) : l && l < 100 ? i.warnings.push("Table height is very small (<100px), content may not be visible") : l && l > 1e3 && i.warnings.push("Table height is very large (>1000px), consider reducing for better UX"), i;
|
|
854
858
|
}
|
|
855
|
-
function
|
|
859
|
+
function Ct(l) {
|
|
856
860
|
const i = { isValid: !0, errors: [], warnings: [] };
|
|
857
861
|
return Array.isArray(l) ? (l.forEach((t, e) => {
|
|
858
862
|
if (!t || typeof t != "object") {
|
|
@@ -864,32 +868,32 @@ function Dt(l) {
|
|
|
864
868
|
return;
|
|
865
869
|
}
|
|
866
870
|
const m = t.file;
|
|
867
|
-
["name", "format", "base64", "size"].forEach((
|
|
868
|
-
|
|
871
|
+
["name", "format", "base64", "size"].forEach((T) => {
|
|
872
|
+
T in m || i.errors.push(`File at index ${e} is missing required field: ${T}`);
|
|
869
873
|
}), m.name && typeof m.name != "string" && i.errors.push(`File name at index ${e} must be a string`), m.format && typeof m.format != "string" && i.errors.push(`File format at index ${e} must be a string`), m.base64 && typeof m.base64 != "string" && i.errors.push(`File base64 at index ${e} must be a string`), m.size && typeof m.size != "number" && i.errors.push(`File size at index ${e} must be a number`), m.tags && !Array.isArray(m.tags) && i.errors.push(`File tags at index ${e} must be an array`);
|
|
870
874
|
}), i.errors.length > 0 && (i.isValid = !1), i) : (i.isValid = !1, i.errors.push("Document attachment must be an array"), i);
|
|
871
875
|
}
|
|
872
|
-
function
|
|
876
|
+
function kt(l) {
|
|
873
877
|
const i = { isValid: !0, errors: [], warnings: [] };
|
|
874
878
|
return [
|
|
875
|
-
{ key: "fileUploaderType", validator:
|
|
876
|
-
{ key: "cardType", validator:
|
|
877
|
-
{ key: "lang", validator:
|
|
878
|
-
{ key: "maxFileSize", validator:
|
|
879
|
-
{ key: "maxFileCount", validator:
|
|
880
|
-
{ key: "imageCompressLevel", validator:
|
|
881
|
-
{ key: "fileAccept", validator:
|
|
882
|
-
{ key: "cols", validator:
|
|
883
|
-
{ key: "tableHeight", validator:
|
|
884
|
-
{ key: "documentAttachment", validator:
|
|
879
|
+
{ key: "fileUploaderType", validator: gt },
|
|
880
|
+
{ key: "cardType", validator: ht },
|
|
881
|
+
{ key: "lang", validator: vt },
|
|
882
|
+
{ key: "maxFileSize", validator: bt },
|
|
883
|
+
{ key: "maxFileCount", validator: _t },
|
|
884
|
+
{ key: "imageCompressLevel", validator: yt },
|
|
885
|
+
{ key: "fileAccept", validator: xt },
|
|
886
|
+
{ key: "cols", validator: Ft },
|
|
887
|
+
{ key: "tableHeight", validator: Dt },
|
|
888
|
+
{ key: "documentAttachment", validator: Ct }
|
|
885
889
|
].forEach(({ key: e, validator: m }) => {
|
|
886
890
|
if (e in l) {
|
|
887
|
-
const
|
|
888
|
-
i.errors.push(...
|
|
891
|
+
const C = m(l[e]);
|
|
892
|
+
i.errors.push(...C.errors.map((T) => `${e}: ${T}`)), i.warnings.push(...C.warnings.map((T) => `${e}: ${T}`)), C.isValid || (i.isValid = !1);
|
|
889
893
|
}
|
|
890
894
|
}), i;
|
|
891
895
|
}
|
|
892
|
-
const
|
|
896
|
+
const wt = /* @__PURE__ */ J({
|
|
893
897
|
__name: "handyUploader",
|
|
894
898
|
props: {
|
|
895
899
|
documentAttachment: {},
|
|
@@ -942,8 +946,8 @@ const kt = /* @__PURE__ */ J({
|
|
|
942
946
|
setup(l, { emit: i }) {
|
|
943
947
|
const t = l;
|
|
944
948
|
if (process.env.NODE_ENV === "development") {
|
|
945
|
-
const
|
|
946
|
-
|
|
949
|
+
const c = kt(t);
|
|
950
|
+
c.isValid || console.error("HandyUploader prop validation failed:", c.errors), c.warnings.length > 0 && console.warn("HandyUploader prop validation warnings:", c.warnings);
|
|
947
951
|
}
|
|
948
952
|
const e = we({
|
|
949
953
|
insertDocumentDialog: !1,
|
|
@@ -972,61 +976,66 @@ const kt = /* @__PURE__ */ J({
|
|
|
972
976
|
attachmentIndex: 0
|
|
973
977
|
}), m = i;
|
|
974
978
|
$e(() => {
|
|
975
|
-
|
|
979
|
+
k(), e.registryDocFile = t.documentAttachment, t.rtlSupport && z(), h();
|
|
976
980
|
});
|
|
977
|
-
let
|
|
978
|
-
|
|
981
|
+
let C = 0;
|
|
982
|
+
U(
|
|
979
983
|
() => e.tempAttachment,
|
|
980
|
-
async (
|
|
981
|
-
const n = ++
|
|
982
|
-
if (
|
|
984
|
+
async (c) => {
|
|
985
|
+
const n = ++C;
|
|
986
|
+
if (c && c.length > 0) {
|
|
987
|
+
const { accepted: a, errors: r } = ze(c, t.fileAccept), d = r[r.length - 1];
|
|
988
|
+
if (d && g(B(d), "red"), a.length === 0) {
|
|
989
|
+
e.tempAttachment = [];
|
|
990
|
+
return;
|
|
991
|
+
}
|
|
983
992
|
e.btnLoader = !0;
|
|
984
|
-
const
|
|
985
|
-
if (n !==
|
|
986
|
-
e.tempAttachmentChanged =
|
|
993
|
+
const x = await Be(a);
|
|
994
|
+
if (n !== C || !e.insertDocumentDialog) return;
|
|
995
|
+
e.tempAttachmentChanged = x, e.btnLoader = !1;
|
|
987
996
|
} else
|
|
988
997
|
e.tempAttachmentChanged = [];
|
|
989
998
|
}
|
|
990
|
-
),
|
|
991
|
-
m("updateCardType",
|
|
992
|
-
}),
|
|
993
|
-
m("updateBadgeCounter",
|
|
994
|
-
}),
|
|
995
|
-
m("updateMaxFileCount",
|
|
996
|
-
}),
|
|
997
|
-
m("updateMaxFileSize",
|
|
998
|
-
}),
|
|
999
|
-
m("updateMaxFileSize",
|
|
1000
|
-
}),
|
|
1001
|
-
m("updateImageCompressor",
|
|
1002
|
-
}),
|
|
1003
|
-
m("updateImageCompressLevel",
|
|
1004
|
-
}),
|
|
1005
|
-
m("updateFileAccept",
|
|
1006
|
-
}),
|
|
1007
|
-
m("updateThumb",
|
|
1008
|
-
}),
|
|
1009
|
-
m("updateChangeFileName",
|
|
1010
|
-
}),
|
|
1011
|
-
m("updateAddFileDescription",
|
|
1012
|
-
}),
|
|
1013
|
-
m("updateAddFileDescription",
|
|
1014
|
-
}),
|
|
1015
|
-
m("updateTableThumbColumn",
|
|
1016
|
-
}),
|
|
1017
|
-
m("updateTableFixedHeader",
|
|
1018
|
-
}),
|
|
1019
|
-
m("updateTableHeight",
|
|
1020
|
-
}),
|
|
1021
|
-
m("updateLang",
|
|
999
|
+
), U(() => t.cardType, (c) => {
|
|
1000
|
+
m("updateCardType", c), h();
|
|
1001
|
+
}), U(() => t.badgeCounter, (c) => {
|
|
1002
|
+
m("updateBadgeCounter", c);
|
|
1003
|
+
}), U(() => t.maxFileCount, (c) => {
|
|
1004
|
+
m("updateMaxFileCount", c);
|
|
1005
|
+
}), U(() => t.maxFileSize, (c) => {
|
|
1006
|
+
m("updateMaxFileSize", c);
|
|
1007
|
+
}), U(() => t.maxFileSize, (c) => {
|
|
1008
|
+
m("updateMaxFileSize", c);
|
|
1009
|
+
}), U(() => t.imageCompressor, (c) => {
|
|
1010
|
+
m("updateImageCompressor", c);
|
|
1011
|
+
}), U(() => t.imageCompressLevel, (c) => {
|
|
1012
|
+
m("updateImageCompressLevel", c);
|
|
1013
|
+
}), U(() => t.fileAccept, (c) => {
|
|
1014
|
+
m("updateFileAccept", c);
|
|
1015
|
+
}), U(() => t.thumb, (c) => {
|
|
1016
|
+
m("updateThumb", c);
|
|
1017
|
+
}), U(() => t.changeFileName, (c) => {
|
|
1018
|
+
m("updateChangeFileName", c);
|
|
1019
|
+
}), U(() => t.addFileDescription, (c) => {
|
|
1020
|
+
m("updateAddFileDescription", c);
|
|
1021
|
+
}), U(() => t.addFileTag, (c) => {
|
|
1022
|
+
m("updateAddFileDescription", c);
|
|
1023
|
+
}), U(() => t.tableThumbColumn, (c) => {
|
|
1024
|
+
m("updateTableThumbColumn", c);
|
|
1025
|
+
}), U(() => t.tableFixedHeader, (c) => {
|
|
1026
|
+
m("updateTableFixedHeader", c);
|
|
1027
|
+
}), U(() => t.tableHeight, (c) => {
|
|
1028
|
+
m("updateTableHeight", c);
|
|
1029
|
+
}), U(() => t.lang, (c) => {
|
|
1030
|
+
m("updateLang", c);
|
|
1022
1031
|
}), Ae(() => {
|
|
1023
1032
|
e.registryDocFile = [];
|
|
1024
1033
|
});
|
|
1025
|
-
const
|
|
1034
|
+
const T = () => {
|
|
1026
1035
|
e.btnLoader = !1, e.tempAttachment = [], e.insertDocumentDialog = !0;
|
|
1027
|
-
},
|
|
1028
|
-
t.customLang !== null ? e.selectedLang = t.customLang : e.selectedLang =
|
|
1029
|
-
},
|
|
1036
|
+
}, k = () => {
|
|
1037
|
+
t.customLang !== null ? e.selectedLang = t.customLang : e.selectedLang = Se;
|
|
1038
|
+
}, z = () => {
|
|
1030
1039
|
}, h = () => {
|
|
1031
1040
|
const n = {
|
|
1032
1041
|
default: { outlined: !1, raised: !1, shaped: !1, tile: !1 },
|
|
@@ -1036,47 +1045,49 @@ const kt = /* @__PURE__ */ J({
|
|
|
1036
1045
|
tile: { outlined: !1, raised: !1, shaped: !1, tile: !0 }
|
|
1037
1046
|
}[t.cardType || "default"];
|
|
1038
1047
|
e.outlined = n.outlined, e.raised = n.raised, e.shaped = n.shaped, e.tile = n.tile;
|
|
1039
|
-
}, g = (
|
|
1040
|
-
e.fileUploaderSnackText =
|
|
1041
|
-
},
|
|
1048
|
+
}, g = (c, n) => {
|
|
1049
|
+
e.fileUploaderSnackText = c, e.fileUploaderSnackBarAlertColor = n, e.fileUploaderSnackBarAlert = !0;
|
|
1050
|
+
}, B = (c) => {
|
|
1042
1051
|
const n = e.selectedLang[t.lang];
|
|
1043
|
-
switch (
|
|
1052
|
+
switch (c.code) {
|
|
1044
1053
|
case "maxFileCount":
|
|
1045
1054
|
return `${n.maxFileCountAlert} ${t.maxFileCount}`;
|
|
1046
1055
|
case "maxFileSize":
|
|
1047
1056
|
return `${n.maxFileSizeAlert} ${Number((t.maxFileSize / (1024 * 1024)).toFixed(1))} ${n.size.mb}`;
|
|
1057
|
+
case "fileType":
|
|
1058
|
+
return `${c.fileName}: ${n.fileTypeAlert ?? "File type is not allowed"}`;
|
|
1048
1059
|
default:
|
|
1049
1060
|
return "File could not be processed due to an invalid format.";
|
|
1050
1061
|
}
|
|
1051
1062
|
}, L = async () => {
|
|
1052
1063
|
e.btnLoader = !0;
|
|
1053
|
-
const { accepted:
|
|
1064
|
+
const { accepted: c, errors: n } = await Ee(e.tempAttachmentChanged, {
|
|
1054
1065
|
currentCount: t.documentAttachment.length,
|
|
1055
1066
|
maxFileCount: t.maxFileCount,
|
|
1056
1067
|
maxFileSize: t.maxFileSize,
|
|
1057
1068
|
imageCompressor: t.imageCompressor,
|
|
1058
1069
|
imageCompressLevel: t.imageCompressLevel
|
|
1059
1070
|
});
|
|
1060
|
-
|
|
1071
|
+
c.length > 0 && (e.registryDocFile.push(...c), m("updateDocumentAttachment", e.registryDocFile));
|
|
1061
1072
|
const a = n[n.length - 1];
|
|
1062
|
-
a && g(
|
|
1063
|
-
},
|
|
1064
|
-
e.btnLoader = !1, e.selectedIndex =
|
|
1073
|
+
a && g(B(a), "red"), e.documentAttachmentAPI = [], e.tempAttachmentChanged = [], e.insertDocumentDialog = !1, e.btnLoader = !1;
|
|
1074
|
+
}, S = (c, n) => {
|
|
1075
|
+
e.btnLoader = !1, e.selectedIndex = c, e.selectedId = n, e.deleteDocumentDialog = !0;
|
|
1065
1076
|
}, j = () => {
|
|
1066
1077
|
e.registryDocFile.splice(e.selectedIndex, 1), m("updateDocumentAttachment", e.registryDocFile), e.deleteDocumentDialog = !1;
|
|
1067
|
-
},
|
|
1068
|
-
|
|
1078
|
+
}, E = (c, n) => {
|
|
1079
|
+
C++, e.btnLoader = !1, e.attachmentIndex = n, e.editDocumentDialog = !0, e.tempAttachmentChanged = [c];
|
|
1069
1080
|
}, M = () => {
|
|
1070
|
-
const
|
|
1071
|
-
|
|
1081
|
+
const c = [...t.documentAttachment];
|
|
1082
|
+
c.splice(
|
|
1072
1083
|
e.attachmentIndex,
|
|
1073
1084
|
1,
|
|
1074
1085
|
e.tempAttachmentChanged[0]
|
|
1075
|
-
), m("updateDocumentAttachment",
|
|
1086
|
+
), m("updateDocumentAttachment", c), e.editDocumentDialog = !1;
|
|
1076
1087
|
};
|
|
1077
|
-
return (
|
|
1078
|
-
const a = f("v-col"), r = f("v-row"),
|
|
1079
|
-
return
|
|
1088
|
+
return (c, n) => {
|
|
1089
|
+
const a = f("v-col"), r = f("v-row"), d = f("v-icon"), x = f("v-card-title"), b = f("v-file-input"), V = f("v-expansion-panel-title"), F = f("v-text-field"), N = f("v-textarea"), K = f("v-autocomplete"), ee = f("v-img"), q = f("v-card"), le = f("v-expansion-panel-text"), oe = f("v-expansion-panel"), ne = f("v-expansion-panels"), ae = f("v-list-item-title"), $ = f("v-list-item"), X = f("v-card-text"), I = f("v-btn"), Y = f("v-card-actions"), ie = f("v-dialog"), Fe = f("v-snackbar"), De = f("v-spacer"), Ce = f("v-container");
|
|
1090
|
+
return u(), v(Ce, null, {
|
|
1080
1091
|
default: o(() => [
|
|
1081
1092
|
s(r, null, {
|
|
1082
1093
|
default: o(() => [
|
|
@@ -1086,17 +1097,18 @@ const kt = /* @__PURE__ */ J({
|
|
|
1086
1097
|
xs: "12"
|
|
1087
1098
|
}, {
|
|
1088
1099
|
default: o(() => [
|
|
1089
|
-
|
|
1100
|
+
t.insertPermission ? (u(), v(ye, {
|
|
1101
|
+
key: 0,
|
|
1090
1102
|
documentAttachment: t.documentAttachment,
|
|
1091
1103
|
selectedLang: e.selectedLang,
|
|
1092
1104
|
lang: t.lang,
|
|
1093
1105
|
badgeCounter: t.badgeCounter,
|
|
1094
1106
|
btnColor: t.btnColor,
|
|
1095
1107
|
maxFileCount: t.maxFileCount,
|
|
1096
|
-
onOpenInputDocumentModal:
|
|
1097
|
-
}, null, 8, ["documentAttachment", "selectedLang", "lang", "badgeCounter", "btnColor", "maxFileCount"]),
|
|
1098
|
-
t.fileUploaderType === "simple" ? (
|
|
1099
|
-
key:
|
|
1108
|
+
onOpenInputDocumentModal: T
|
|
1109
|
+
}, null, 8, ["documentAttachment", "selectedLang", "lang", "badgeCounter", "btnColor", "maxFileCount"])) : A("", !0),
|
|
1110
|
+
t.fileUploaderType === "simple" ? (u(), v(_e, {
|
|
1111
|
+
key: 1,
|
|
1100
1112
|
documentAttachment: t.documentAttachment,
|
|
1101
1113
|
cols: t.cols,
|
|
1102
1114
|
thumb: t.thumb,
|
|
@@ -1110,11 +1122,11 @@ const kt = /* @__PURE__ */ J({
|
|
|
1110
1122
|
editPermission: t.editPermission,
|
|
1111
1123
|
selectedLang: e.selectedLang,
|
|
1112
1124
|
onSetCardTheme: h,
|
|
1113
|
-
onOpenDeleteDialog:
|
|
1114
|
-
onOpenEditDocumentDialog:
|
|
1125
|
+
onOpenDeleteDialog: S,
|
|
1126
|
+
onOpenEditDocumentDialog: E
|
|
1115
1127
|
}, null, 8, ["documentAttachment", "cols", "thumb", "outlined", "raised", "shaped", "tile", "lang", "cardType", "deletePermission", "editPermission", "selectedLang"])) : A("", !0),
|
|
1116
|
-
t.fileUploaderType === "thumbnail" ? (
|
|
1117
|
-
key:
|
|
1128
|
+
t.fileUploaderType === "thumbnail" ? (u(), v(he, {
|
|
1129
|
+
key: 2,
|
|
1118
1130
|
documentAttachment: t.documentAttachment,
|
|
1119
1131
|
cols: t.cols,
|
|
1120
1132
|
thumb: t.thumb,
|
|
@@ -1128,11 +1140,11 @@ const kt = /* @__PURE__ */ J({
|
|
|
1128
1140
|
editPermission: t.editPermission,
|
|
1129
1141
|
selectedLang: e.selectedLang,
|
|
1130
1142
|
onSetCardTheme: h,
|
|
1131
|
-
onOpenDeleteDialog: n[0] || (n[0] = (p, O) =>
|
|
1132
|
-
onOpenEditDocumentDialog: n[1] || (n[1] = (p, O) =>
|
|
1143
|
+
onOpenDeleteDialog: n[0] || (n[0] = (p, O) => S(p, O)),
|
|
1144
|
+
onOpenEditDocumentDialog: n[1] || (n[1] = (p, O) => E(p, O))
|
|
1133
1145
|
}, null, 8, ["documentAttachment", "cols", "thumb", "outlined", "raised", "shaped", "tile", "lang", "cardType", "deletePermission", "editPermission", "selectedLang"])) : A("", !0),
|
|
1134
|
-
t.fileUploaderType === "table" ? (
|
|
1135
|
-
key:
|
|
1146
|
+
t.fileUploaderType === "table" ? (u(), v(be, {
|
|
1147
|
+
key: 3,
|
|
1136
1148
|
documentAttachment: t.documentAttachment,
|
|
1137
1149
|
cols: t.cols,
|
|
1138
1150
|
thumb: t.thumb,
|
|
@@ -1149,8 +1161,8 @@ const kt = /* @__PURE__ */ J({
|
|
|
1149
1161
|
editPermission: t.editPermission,
|
|
1150
1162
|
selectedLang: e.selectedLang,
|
|
1151
1163
|
onSetCardTheme: h,
|
|
1152
|
-
onOpenDeleteDialog:
|
|
1153
|
-
onOpenEditDocumentDialog:
|
|
1164
|
+
onOpenDeleteDialog: S,
|
|
1165
|
+
onOpenEditDocumentDialog: E
|
|
1154
1166
|
}, null, 8, ["documentAttachment", "cols", "thumb", "outlined", "raised", "shaped", "tile", "lang", "tableThumbColumn", "tableFixedHeader", "tableHeight", "cardType", "deletePermission", "editPermission", "selectedLang"])) : A("", !0)
|
|
1155
1167
|
]),
|
|
1156
1168
|
_: 1
|
|
@@ -1172,7 +1184,7 @@ const kt = /* @__PURE__ */ J({
|
|
|
1172
1184
|
default: o(() => [
|
|
1173
1185
|
s(x, null, {
|
|
1174
1186
|
default: o(() => [
|
|
1175
|
-
s(
|
|
1187
|
+
s(d, {
|
|
1176
1188
|
onClick: n[2] || (n[2] = (p) => e.insertDocumentDialog = !1)
|
|
1177
1189
|
}, {
|
|
1178
1190
|
default: o(() => [...n[12] || (n[12] = [
|
|
@@ -1185,8 +1197,8 @@ const kt = /* @__PURE__ */ J({
|
|
|
1185
1197
|
}),
|
|
1186
1198
|
s(X, null, {
|
|
1187
1199
|
default: o(() => [
|
|
1188
|
-
e.tempAttachment.length === 0 ? (
|
|
1189
|
-
t.fileAccept !== "" ? (
|
|
1200
|
+
e.tempAttachment.length === 0 ? (u(), w(H, { key: 0 }, [
|
|
1201
|
+
t.fileAccept !== "" ? (u(), v(b, {
|
|
1190
1202
|
key: 0,
|
|
1191
1203
|
multiple: "",
|
|
1192
1204
|
accept: t.fileAccept,
|
|
@@ -1194,21 +1206,21 @@ const kt = /* @__PURE__ */ J({
|
|
|
1194
1206
|
modelValue: e.tempAttachment,
|
|
1195
1207
|
"onUpdate:modelValue": n[3] || (n[3] = (p) => e.tempAttachment = p),
|
|
1196
1208
|
label: e.selectedLang[l.lang].insertNewFile
|
|
1197
|
-
}, null, 8, ["accept", "modelValue", "label"])) : (
|
|
1209
|
+
}, null, 8, ["accept", "modelValue", "label"])) : (u(), v(b, {
|
|
1198
1210
|
key: 1,
|
|
1199
1211
|
multiple: "",
|
|
1200
1212
|
modelValue: e.tempAttachment,
|
|
1201
1213
|
"onUpdate:modelValue": n[4] || (n[4] = (p) => e.tempAttachment = p),
|
|
1202
1214
|
label: e.selectedLang[l.lang].insertNewFile
|
|
1203
1215
|
}, null, 8, ["modelValue", "label"]))
|
|
1204
|
-
], 64)) : (
|
|
1205
|
-
t.addFileTag || t.addFileDescription || t.changeFileName ? (
|
|
1216
|
+
], 64)) : (u(), w(H, { key: 1 }, [
|
|
1217
|
+
t.addFileTag || t.addFileDescription || t.changeFileName ? (u(), v(ne, { key: 0 }, {
|
|
1206
1218
|
default: o(() => [
|
|
1207
|
-
(
|
|
1219
|
+
(u(!0), w(H, null, W(e.tempAttachmentChanged, (p, O) => (u(), v(oe, {
|
|
1208
1220
|
key: `attachment-${O}`
|
|
1209
1221
|
}, {
|
|
1210
1222
|
default: o(() => [
|
|
1211
|
-
s(
|
|
1223
|
+
s(V, null, {
|
|
1212
1224
|
default: o(() => [
|
|
1213
1225
|
_(y(p.file.name), 1)
|
|
1214
1226
|
]),
|
|
@@ -1228,13 +1240,13 @@ const kt = /* @__PURE__ */ J({
|
|
|
1228
1240
|
xs: "12"
|
|
1229
1241
|
}, {
|
|
1230
1242
|
default: o(() => [
|
|
1231
|
-
t.changeFileName ? (
|
|
1243
|
+
t.changeFileName ? (u(), v(F, {
|
|
1232
1244
|
key: 0,
|
|
1233
1245
|
label: e.selectedLang[l.lang].fileName,
|
|
1234
1246
|
modelValue: p.file.name,
|
|
1235
1247
|
"onUpdate:modelValue": (P) => p.file.name = P
|
|
1236
1248
|
}, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : A("", !0),
|
|
1237
|
-
t.addFileDescription ? (
|
|
1249
|
+
t.addFileDescription ? (u(), v(N, {
|
|
1238
1250
|
key: 1,
|
|
1239
1251
|
label: e.selectedLang[l.lang].fileDescription,
|
|
1240
1252
|
"auto-grow": "",
|
|
@@ -1242,7 +1254,7 @@ const kt = /* @__PURE__ */ J({
|
|
|
1242
1254
|
modelValue: p.file.description,
|
|
1243
1255
|
"onUpdate:modelValue": (P) => p.file.description = P
|
|
1244
1256
|
}, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : A("", !0),
|
|
1245
|
-
t.addFileTag ? (
|
|
1257
|
+
t.addFileTag ? (u(), v(K, {
|
|
1246
1258
|
key: 2,
|
|
1247
1259
|
modelValue: p.file.tags,
|
|
1248
1260
|
"onUpdate:modelValue": (P) => p.file.tags = P,
|
|
@@ -1263,14 +1275,14 @@ const kt = /* @__PURE__ */ J({
|
|
|
1263
1275
|
xs: "12"
|
|
1264
1276
|
}, {
|
|
1265
1277
|
default: o(() => [
|
|
1266
|
-
p.file.format === "jpg" || p.file.format === "jpeg" || p.file.format === "png" || p.file.format === "tif" || p.file.format === "bmp" ? (
|
|
1278
|
+
p.file.format === "jpg" || p.file.format === "jpeg" || p.file.format === "png" || p.file.format === "tif" || p.file.format === "bmp" ? (u(), v(q, { key: 0 }, {
|
|
1267
1279
|
default: o(() => [
|
|
1268
|
-
s(
|
|
1280
|
+
s(ee, {
|
|
1269
1281
|
src: "data:" + p.file.format + ";base64," + p.file.base64
|
|
1270
1282
|
}, null, 8, ["src"])
|
|
1271
1283
|
]),
|
|
1272
1284
|
_: 2
|
|
1273
|
-
}, 1024)) : (
|
|
1285
|
+
}, 1024)) : (u(), v(te, {
|
|
1274
1286
|
key: 1,
|
|
1275
1287
|
"file-format": p.file.format,
|
|
1276
1288
|
size: 60
|
|
@@ -1289,13 +1301,13 @@ const kt = /* @__PURE__ */ J({
|
|
|
1289
1301
|
}, 1024))), 128))
|
|
1290
1302
|
]),
|
|
1291
1303
|
_: 1
|
|
1292
|
-
})) : (
|
|
1304
|
+
})) : (u(), v(q, {
|
|
1293
1305
|
key: 1,
|
|
1294
1306
|
class: "mx-auto",
|
|
1295
1307
|
tile: ""
|
|
1296
1308
|
}, {
|
|
1297
1309
|
default: o(() => [
|
|
1298
|
-
(
|
|
1310
|
+
(u(!0), w(H, null, W(e.tempAttachmentChanged, (p, O) => (u(), v($, {
|
|
1299
1311
|
key: `attachment-${O}`,
|
|
1300
1312
|
style: { "border-bottom": "1px solid #E0E0E0" }
|
|
1301
1313
|
}, {
|
|
@@ -1306,7 +1318,7 @@ const kt = /* @__PURE__ */ J({
|
|
|
1306
1318
|
"file-format": p.file.format,
|
|
1307
1319
|
size: 24
|
|
1308
1320
|
}, null, 8, ["file-format"]),
|
|
1309
|
-
_(" " + y(G(
|
|
1321
|
+
_(" " + y(G(Ue)(p.file.name, p.file.format)), 1)
|
|
1310
1322
|
]),
|
|
1311
1323
|
_: 2
|
|
1312
1324
|
}, 1024)
|
|
@@ -1322,7 +1334,7 @@ const kt = /* @__PURE__ */ J({
|
|
|
1322
1334
|
}),
|
|
1323
1335
|
s(Y, null, {
|
|
1324
1336
|
default: o(() => [
|
|
1325
|
-
s(
|
|
1337
|
+
s(I, {
|
|
1326
1338
|
disabled: e.tempAttachment == null || e.btnLoader,
|
|
1327
1339
|
loading: e.btnLoader,
|
|
1328
1340
|
color: t.btnColor,
|
|
@@ -1359,7 +1371,7 @@ const kt = /* @__PURE__ */ J({
|
|
|
1359
1371
|
default: o(() => [
|
|
1360
1372
|
s(x, null, {
|
|
1361
1373
|
default: o(() => [
|
|
1362
|
-
s(
|
|
1374
|
+
s(d, {
|
|
1363
1375
|
onClick: n[6] || (n[6] = (p) => e.editDocumentDialog = !1)
|
|
1364
1376
|
}, {
|
|
1365
1377
|
default: o(() => [...n[13] || (n[13] = [
|
|
@@ -1370,7 +1382,7 @@ const kt = /* @__PURE__ */ J({
|
|
|
1370
1382
|
]),
|
|
1371
1383
|
_: 1
|
|
1372
1384
|
}),
|
|
1373
|
-
(
|
|
1385
|
+
(u(!0), w(H, null, W(e.tempAttachmentChanged, (p, O) => (u(), v(X, {
|
|
1374
1386
|
key: `attachment-${O}`
|
|
1375
1387
|
}, {
|
|
1376
1388
|
default: o(() => [
|
|
@@ -1386,13 +1398,13 @@ const kt = /* @__PURE__ */ J({
|
|
|
1386
1398
|
xs: "12"
|
|
1387
1399
|
}, {
|
|
1388
1400
|
default: o(() => [
|
|
1389
|
-
t.changeFileName ? (
|
|
1401
|
+
t.changeFileName ? (u(), v(F, {
|
|
1390
1402
|
key: 0,
|
|
1391
1403
|
label: e.selectedLang[l.lang].fileName,
|
|
1392
1404
|
modelValue: p.file.name,
|
|
1393
1405
|
"onUpdate:modelValue": (P) => p.file.name = P
|
|
1394
1406
|
}, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : A("", !0),
|
|
1395
|
-
t.addFileDescription ? (
|
|
1407
|
+
t.addFileDescription ? (u(), v(N, {
|
|
1396
1408
|
key: 1,
|
|
1397
1409
|
label: e.selectedLang[l.lang].fileDescription,
|
|
1398
1410
|
"auto-grow": "",
|
|
@@ -1400,7 +1412,7 @@ const kt = /* @__PURE__ */ J({
|
|
|
1400
1412
|
modelValue: p.file.description,
|
|
1401
1413
|
"onUpdate:modelValue": (P) => p.file.description = P
|
|
1402
1414
|
}, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : A("", !0),
|
|
1403
|
-
t.addFileTag ? (
|
|
1415
|
+
t.addFileTag ? (u(), v(K, {
|
|
1404
1416
|
key: 2,
|
|
1405
1417
|
modelValue: p.file.tags,
|
|
1406
1418
|
"onUpdate:modelValue": (P) => p.file.tags = P,
|
|
@@ -1425,14 +1437,14 @@ const kt = /* @__PURE__ */ J({
|
|
|
1425
1437
|
return [
|
|
1426
1438
|
p.file.name && ["jpg", "jpeg", "png", "tif", "bmp"].includes(
|
|
1427
1439
|
((P = p.file.name.split(".").pop()) == null ? void 0 : P.toLowerCase()) || ""
|
|
1428
|
-
) ? (
|
|
1440
|
+
) ? (u(), v(q, { key: 0 }, {
|
|
1429
1441
|
default: o(() => [
|
|
1430
|
-
s(
|
|
1442
|
+
s(ee, {
|
|
1431
1443
|
src: "data:" + p.file.format + ";base64," + p.file.base64
|
|
1432
1444
|
}, null, 8, ["src"])
|
|
1433
1445
|
]),
|
|
1434
1446
|
_: 2
|
|
1435
|
-
}, 1024)) : (
|
|
1447
|
+
}, 1024)) : (u(), v(te, {
|
|
1436
1448
|
key: 1,
|
|
1437
1449
|
"file-format": p.file.format,
|
|
1438
1450
|
size: 60
|
|
@@ -1449,7 +1461,7 @@ const kt = /* @__PURE__ */ J({
|
|
|
1449
1461
|
}, 1024))), 128)),
|
|
1450
1462
|
s(Y, null, {
|
|
1451
1463
|
default: o(() => [
|
|
1452
|
-
s(
|
|
1464
|
+
s(I, {
|
|
1453
1465
|
disabled: e.tempAttachment === null || e.btnLoader,
|
|
1454
1466
|
loading: e.btnLoader,
|
|
1455
1467
|
color: t.btnColor,
|
|
@@ -1482,13 +1494,13 @@ const kt = /* @__PURE__ */ J({
|
|
|
1482
1494
|
}, {
|
|
1483
1495
|
default: o(() => [
|
|
1484
1496
|
_(y(e.fileUploaderSnackText) + " ", 1),
|
|
1485
|
-
s(
|
|
1497
|
+
s(I, {
|
|
1486
1498
|
color: "white",
|
|
1487
1499
|
text: "",
|
|
1488
1500
|
onClick: n[8] || (n[8] = (p) => e.fileUploaderSnackBarAlert = !1)
|
|
1489
1501
|
}, {
|
|
1490
1502
|
default: o(() => [
|
|
1491
|
-
s(
|
|
1503
|
+
s(d, null, {
|
|
1492
1504
|
default: o(() => [...n[14] || (n[14] = [
|
|
1493
1505
|
_("mdi-close", -1)
|
|
1494
1506
|
])]),
|
|
@@ -1513,7 +1525,7 @@ const kt = /* @__PURE__ */ J({
|
|
|
1513
1525
|
default: o(() => [
|
|
1514
1526
|
s(x, null, {
|
|
1515
1527
|
default: o(() => [
|
|
1516
|
-
s(
|
|
1528
|
+
s(d, { color: "red" })
|
|
1517
1529
|
]),
|
|
1518
1530
|
_: 1
|
|
1519
1531
|
}),
|
|
@@ -1526,7 +1538,7 @@ const kt = /* @__PURE__ */ J({
|
|
|
1526
1538
|
s(Y, null, {
|
|
1527
1539
|
default: o(() => [
|
|
1528
1540
|
s(De),
|
|
1529
|
-
s(
|
|
1541
|
+
s(I, {
|
|
1530
1542
|
color: "green darken-1",
|
|
1531
1543
|
text: "",
|
|
1532
1544
|
onClick: n[10] || (n[10] = (p) => e.deleteDocumentDialog = !1)
|
|
@@ -1536,7 +1548,7 @@ const kt = /* @__PURE__ */ J({
|
|
|
1536
1548
|
]),
|
|
1537
1549
|
_: 1
|
|
1538
1550
|
}),
|
|
1539
|
-
s(
|
|
1551
|
+
s(I, {
|
|
1540
1552
|
color: "primary",
|
|
1541
1553
|
disabled: e.btnLoader,
|
|
1542
1554
|
loading: e.btnLoader,
|
|
@@ -1570,43 +1582,43 @@ function xe(l, i) {
|
|
|
1570
1582
|
`[handy-uploader] ${l}() is deprecated and will be removed in the next major version. Use ${i} instead.`
|
|
1571
1583
|
));
|
|
1572
1584
|
}
|
|
1573
|
-
function
|
|
1585
|
+
function Tt(l, i = {}) {
|
|
1574
1586
|
xe("useFileUpload", "useUploader");
|
|
1575
1587
|
const {
|
|
1576
1588
|
maxFileSize: t = 5 * 1024 * 1024,
|
|
1577
1589
|
// 5MB default
|
|
1578
1590
|
maxFileCount: e = 10,
|
|
1579
1591
|
imageCompressor: m = !1,
|
|
1580
|
-
imageCompressLevel:
|
|
1581
|
-
fileAccept:
|
|
1582
|
-
} = i,
|
|
1592
|
+
imageCompressLevel: C = 0.8,
|
|
1593
|
+
fileAccept: T = "*"
|
|
1594
|
+
} = i, k = Z(!1), z = Z({
|
|
1583
1595
|
show: !1,
|
|
1584
1596
|
text: "",
|
|
1585
1597
|
color: "success"
|
|
1586
|
-
}), h =
|
|
1598
|
+
}), h = Q(() => l.value.length), g = Q(() => h.value < e), B = Q(
|
|
1587
1599
|
() => l.value.reduce((a, r) => a + r.file.size, 0)
|
|
1588
1600
|
);
|
|
1589
1601
|
function L(a, r = "success") {
|
|
1590
|
-
|
|
1602
|
+
z.value = { show: !0, text: a, color: r };
|
|
1591
1603
|
}
|
|
1592
|
-
function
|
|
1604
|
+
function S(a) {
|
|
1593
1605
|
var r;
|
|
1594
1606
|
if (!Ie(a.size, t))
|
|
1595
1607
|
return {
|
|
1596
1608
|
valid: !1,
|
|
1597
1609
|
error: `File size exceeds maximum allowed size of ${(t / 1048576).toFixed(1)}MB`
|
|
1598
1610
|
};
|
|
1599
|
-
if (!
|
|
1611
|
+
if (!Pe(h.value, e))
|
|
1600
1612
|
return {
|
|
1601
1613
|
valid: !1,
|
|
1602
1614
|
error: `Maximum file count of ${e} reached`
|
|
1603
1615
|
};
|
|
1604
|
-
if (
|
|
1605
|
-
const
|
|
1606
|
-
if (!
|
|
1616
|
+
if (T !== "*") {
|
|
1617
|
+
const d = T.split(",").map((F) => F.trim()), x = `.${(r = a.name.split(".").pop()) == null ? void 0 : r.toLowerCase()}`, b = a.type;
|
|
1618
|
+
if (!d.some((F) => F.startsWith(".") ? F === x : F.includes("/*") ? b.startsWith(F.replace("/*", "")) : F === b))
|
|
1607
1619
|
return {
|
|
1608
1620
|
valid: !1,
|
|
1609
|
-
error: `File type not accepted. Allowed types: ${
|
|
1621
|
+
error: `File type not accepted. Allowed types: ${T}`
|
|
1610
1622
|
};
|
|
1611
1623
|
}
|
|
1612
1624
|
return { valid: !0 };
|
|
@@ -1615,16 +1627,16 @@ function Lt(l, i = {}) {
|
|
|
1615
1627
|
let r;
|
|
1616
1628
|
if (m && re(a.name, a.type))
|
|
1617
1629
|
try {
|
|
1618
|
-
r = (await
|
|
1619
|
-
} catch (
|
|
1620
|
-
console.warn("Image compression failed, using original file:",
|
|
1630
|
+
r = (await je(a, C)).split(",")[1];
|
|
1631
|
+
} catch (b) {
|
|
1632
|
+
console.warn("Image compression failed, using original file:", b), r = await me(a);
|
|
1621
1633
|
}
|
|
1622
1634
|
else
|
|
1623
1635
|
r = await me(a);
|
|
1624
|
-
const
|
|
1636
|
+
const d = se(a.size), x = Me(a.name);
|
|
1625
1637
|
return {
|
|
1626
1638
|
base64: r,
|
|
1627
|
-
size:
|
|
1639
|
+
size: d.text,
|
|
1628
1640
|
name: a.name,
|
|
1629
1641
|
tags: [],
|
|
1630
1642
|
description: "",
|
|
@@ -1632,19 +1644,19 @@ function Lt(l, i = {}) {
|
|
|
1632
1644
|
format: x
|
|
1633
1645
|
};
|
|
1634
1646
|
}
|
|
1635
|
-
async function
|
|
1636
|
-
if (
|
|
1637
|
-
|
|
1638
|
-
const r = Array.from(a),
|
|
1647
|
+
async function E(a) {
|
|
1648
|
+
if (k.value) return !1;
|
|
1649
|
+
k.value = !0;
|
|
1650
|
+
const r = Array.from(a), d = [];
|
|
1639
1651
|
for (const x of r) {
|
|
1640
|
-
const
|
|
1641
|
-
|
|
1652
|
+
const b = S(x);
|
|
1653
|
+
b.valid ? d.push(x) : L(b.error, "error");
|
|
1642
1654
|
}
|
|
1643
|
-
if (
|
|
1644
|
-
return
|
|
1655
|
+
if (d.length === 0)
|
|
1656
|
+
return k.value = !1, !1;
|
|
1645
1657
|
try {
|
|
1646
|
-
const
|
|
1647
|
-
|
|
1658
|
+
const b = (await Promise.all(
|
|
1659
|
+
d.map((F) => j(F))
|
|
1648
1660
|
)).map((F) => {
|
|
1649
1661
|
var N;
|
|
1650
1662
|
return {
|
|
@@ -1652,20 +1664,20 @@ function Lt(l, i = {}) {
|
|
|
1652
1664
|
name: F.name,
|
|
1653
1665
|
format: F.format,
|
|
1654
1666
|
base64: F.base64,
|
|
1655
|
-
size: ((N =
|
|
1667
|
+
size: ((N = d.find((K) => K.name === F.name)) == null ? void 0 : N.size) || 0,
|
|
1656
1668
|
tags: F.tags,
|
|
1657
1669
|
description: F.description,
|
|
1658
1670
|
showDetailState: F.showDetailState
|
|
1659
1671
|
}
|
|
1660
1672
|
};
|
|
1661
1673
|
});
|
|
1662
|
-
l.value.push(...
|
|
1663
|
-
const
|
|
1664
|
-
return L(
|
|
1674
|
+
l.value.push(...b);
|
|
1675
|
+
const V = d.length === 1 ? `File "${d[0].name}" uploaded successfully` : `${d.length} files uploaded successfully`;
|
|
1676
|
+
return L(V, "success"), !0;
|
|
1665
1677
|
} catch (x) {
|
|
1666
1678
|
return console.error("File upload error:", x), L("Failed to upload files. Please try again.", "error"), !1;
|
|
1667
1679
|
} finally {
|
|
1668
|
-
|
|
1680
|
+
k.value = !1;
|
|
1669
1681
|
}
|
|
1670
1682
|
}
|
|
1671
1683
|
function M(a) {
|
|
@@ -1675,10 +1687,10 @@ function Lt(l, i = {}) {
|
|
|
1675
1687
|
}
|
|
1676
1688
|
return !1;
|
|
1677
1689
|
}
|
|
1678
|
-
function
|
|
1690
|
+
function c(a, r) {
|
|
1679
1691
|
if (a >= 0 && a < l.value.length) {
|
|
1680
|
-
const
|
|
1681
|
-
return Object.assign(
|
|
1692
|
+
const d = l.value[a].file;
|
|
1693
|
+
return Object.assign(d, r), L("File updated successfully", "success"), !0;
|
|
1682
1694
|
}
|
|
1683
1695
|
return !1;
|
|
1684
1696
|
}
|
|
@@ -1688,18 +1700,18 @@ function Lt(l, i = {}) {
|
|
|
1688
1700
|
}
|
|
1689
1701
|
return {
|
|
1690
1702
|
// State
|
|
1691
|
-
isUploading:
|
|
1692
|
-
snackbar:
|
|
1703
|
+
isUploading: k,
|
|
1704
|
+
snackbar: z,
|
|
1693
1705
|
// Computed
|
|
1694
1706
|
fileCount: h,
|
|
1695
1707
|
canAddMoreFiles: g,
|
|
1696
|
-
totalSize:
|
|
1708
|
+
totalSize: B,
|
|
1697
1709
|
// Methods
|
|
1698
|
-
uploadFiles:
|
|
1710
|
+
uploadFiles: E,
|
|
1699
1711
|
removeFile: M,
|
|
1700
|
-
updateFileMetadata:
|
|
1712
|
+
updateFileMetadata: c,
|
|
1701
1713
|
clearAllFiles: n,
|
|
1702
|
-
validateFile:
|
|
1714
|
+
validateFile: S,
|
|
1703
1715
|
showSnackbar: L
|
|
1704
1716
|
};
|
|
1705
1717
|
}
|
|
@@ -1709,90 +1721,90 @@ function Vt(l = {}) {
|
|
|
1709
1721
|
maxErrors: i = 10,
|
|
1710
1722
|
autoRemoveTimeout: t = 5e3,
|
|
1711
1723
|
logToConsole: e = !0
|
|
1712
|
-
} = l, m =
|
|
1713
|
-
function
|
|
1724
|
+
} = l, m = Z([]), C = Z(!1);
|
|
1725
|
+
function T() {
|
|
1714
1726
|
return `error_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
1715
1727
|
}
|
|
1716
|
-
function
|
|
1717
|
-
const
|
|
1718
|
-
id:
|
|
1728
|
+
function k(r, d = "error", x, b) {
|
|
1729
|
+
const V = {
|
|
1730
|
+
id: T(),
|
|
1719
1731
|
message: r,
|
|
1720
|
-
type:
|
|
1732
|
+
type: d,
|
|
1721
1733
|
timestamp: /* @__PURE__ */ new Date(),
|
|
1722
1734
|
context: x,
|
|
1723
|
-
action:
|
|
1735
|
+
action: b
|
|
1724
1736
|
};
|
|
1725
|
-
return e && (
|
|
1726
|
-
|
|
1727
|
-
}, t),
|
|
1737
|
+
return e && (d === "error" ? console.error : d === "warning" ? console.warn : d === "info" ? console.info : console.log)(`[${d.toUpperCase()}] ${r}`, x || ""), m.value.unshift(V), m.value.length > i && (m.value = m.value.slice(0, i)), t > 0 && setTimeout(() => {
|
|
1738
|
+
z(V.id);
|
|
1739
|
+
}, t), V.id;
|
|
1728
1740
|
}
|
|
1729
|
-
function
|
|
1730
|
-
const
|
|
1731
|
-
return
|
|
1741
|
+
function z(r) {
|
|
1742
|
+
const d = m.value.findIndex((x) => x.id === r);
|
|
1743
|
+
return d !== -1 ? (m.value.splice(d, 1), !0) : !1;
|
|
1732
1744
|
}
|
|
1733
1745
|
function h() {
|
|
1734
1746
|
m.value = [];
|
|
1735
1747
|
}
|
|
1736
1748
|
function g(r) {
|
|
1737
|
-
m.value = m.value.filter((
|
|
1749
|
+
m.value = m.value.filter((d) => d.type !== r);
|
|
1738
1750
|
}
|
|
1739
|
-
async function
|
|
1740
|
-
|
|
1751
|
+
async function B(r, d, x) {
|
|
1752
|
+
C.value = !0;
|
|
1741
1753
|
try {
|
|
1742
1754
|
return await r();
|
|
1743
|
-
} catch (
|
|
1744
|
-
const
|
|
1745
|
-
return
|
|
1755
|
+
} catch (b) {
|
|
1756
|
+
const V = d || (b instanceof Error ? b.message : "An unexpected error occurred");
|
|
1757
|
+
return k(V, "error", {
|
|
1746
1758
|
...x,
|
|
1747
|
-
originalError:
|
|
1759
|
+
originalError: b instanceof Error ? b.message : String(b)
|
|
1748
1760
|
}), null;
|
|
1749
1761
|
} finally {
|
|
1750
|
-
|
|
1762
|
+
C.value = !1;
|
|
1751
1763
|
}
|
|
1752
1764
|
}
|
|
1753
|
-
function L(r,
|
|
1754
|
-
return r ||
|
|
1765
|
+
function L(r, d, x) {
|
|
1766
|
+
return r || k(d, "error", x), r;
|
|
1755
1767
|
}
|
|
1756
|
-
function
|
|
1757
|
-
return
|
|
1768
|
+
function S(r, d) {
|
|
1769
|
+
return k(r, "success", d);
|
|
1758
1770
|
}
|
|
1759
|
-
function j(r,
|
|
1760
|
-
return
|
|
1771
|
+
function j(r, d) {
|
|
1772
|
+
return k(r, "warning", d);
|
|
1761
1773
|
}
|
|
1762
|
-
function
|
|
1763
|
-
return
|
|
1774
|
+
function E(r, d) {
|
|
1775
|
+
return k(r, "info", d);
|
|
1764
1776
|
}
|
|
1765
1777
|
function M(r) {
|
|
1766
|
-
return m.value.filter((
|
|
1778
|
+
return m.value.filter((d) => d.type === r);
|
|
1767
1779
|
}
|
|
1768
|
-
function
|
|
1780
|
+
function c() {
|
|
1769
1781
|
return m.value[0] || null;
|
|
1770
1782
|
}
|
|
1771
1783
|
function n(r) {
|
|
1772
|
-
return r ? m.value.some((
|
|
1784
|
+
return r ? m.value.some((d) => d.type === r) : m.value.length > 0;
|
|
1773
1785
|
}
|
|
1774
1786
|
const a = {
|
|
1775
|
-
fileSizeExceeded: (r,
|
|
1776
|
-
`File "${r}" exceeds maximum size of ${(
|
|
1787
|
+
fileSizeExceeded: (r, d) => k(
|
|
1788
|
+
`File "${r}" exceeds maximum size of ${(d / (1024 * 1024)).toFixed(1)}MB`,
|
|
1777
1789
|
"error",
|
|
1778
|
-
{ fileName: r, maxSize:
|
|
1790
|
+
{ fileName: r, maxSize: d, category: "file-upload" }
|
|
1779
1791
|
),
|
|
1780
|
-
fileCountExceeded: (r) =>
|
|
1792
|
+
fileCountExceeded: (r) => k(
|
|
1781
1793
|
`Maximum file count of ${r} reached`,
|
|
1782
1794
|
"error",
|
|
1783
1795
|
{ maxCount: r, category: "file-upload" }
|
|
1784
1796
|
),
|
|
1785
|
-
invalidFileType: (r,
|
|
1786
|
-
`File "${r}" type not allowed. Accepted types: ${
|
|
1797
|
+
invalidFileType: (r, d) => k(
|
|
1798
|
+
`File "${r}" type not allowed. Accepted types: ${d}`,
|
|
1787
1799
|
"error",
|
|
1788
|
-
{ fileName: r, allowedTypes:
|
|
1800
|
+
{ fileName: r, allowedTypes: d, category: "file-upload" }
|
|
1789
1801
|
),
|
|
1790
|
-
uploadFailed: (r,
|
|
1791
|
-
`Failed to upload "${r}"${
|
|
1802
|
+
uploadFailed: (r, d) => k(
|
|
1803
|
+
`Failed to upload "${r}"${d ? `: ${d}` : ""}`,
|
|
1792
1804
|
"error",
|
|
1793
|
-
{ fileName: r, reason:
|
|
1805
|
+
{ fileName: r, reason: d, category: "file-upload" }
|
|
1794
1806
|
),
|
|
1795
|
-
compressionFailed: (r) =>
|
|
1807
|
+
compressionFailed: (r) => k(
|
|
1796
1808
|
`Image compression failed for "${r}", using original file`,
|
|
1797
1809
|
"warning",
|
|
1798
1810
|
{ fileName: r, category: "file-upload" }
|
|
@@ -1801,70 +1813,70 @@ function Vt(l = {}) {
|
|
|
1801
1813
|
return {
|
|
1802
1814
|
// State
|
|
1803
1815
|
errors: m,
|
|
1804
|
-
isLoading:
|
|
1816
|
+
isLoading: C,
|
|
1805
1817
|
// Methods
|
|
1806
|
-
addError:
|
|
1807
|
-
removeError:
|
|
1818
|
+
addError: k,
|
|
1819
|
+
removeError: z,
|
|
1808
1820
|
clearErrors: h,
|
|
1809
1821
|
clearErrorsByType: g,
|
|
1810
|
-
handleAsync:
|
|
1822
|
+
handleAsync: B,
|
|
1811
1823
|
validate: L,
|
|
1812
|
-
showSuccess:
|
|
1824
|
+
showSuccess: S,
|
|
1813
1825
|
showWarning: j,
|
|
1814
|
-
showInfo:
|
|
1826
|
+
showInfo: E,
|
|
1815
1827
|
getErrorsByType: M,
|
|
1816
|
-
getLatestError:
|
|
1828
|
+
getLatestError: c,
|
|
1817
1829
|
hasErrors: n,
|
|
1818
1830
|
// File upload specific
|
|
1819
1831
|
fileUploadErrors: a
|
|
1820
1832
|
};
|
|
1821
1833
|
}
|
|
1822
|
-
const
|
|
1834
|
+
const $t = {
|
|
1823
1835
|
ThumbnailUploader: he,
|
|
1824
1836
|
TableUploader: be,
|
|
1825
1837
|
SimpleUploader: _e,
|
|
1826
|
-
HandyUploader:
|
|
1838
|
+
HandyUploader: wt,
|
|
1827
1839
|
InsertButton: ye,
|
|
1828
1840
|
SelectFileIconType: te
|
|
1829
1841
|
};
|
|
1830
|
-
function
|
|
1831
|
-
for (const [i, t] of Object.entries(
|
|
1842
|
+
function zt(l) {
|
|
1843
|
+
for (const [i, t] of Object.entries($t)) l.component(i, t);
|
|
1832
1844
|
}
|
|
1833
1845
|
export {
|
|
1834
|
-
|
|
1835
|
-
|
|
1846
|
+
Ut as COMPRESSIBLE_EXTENSIONS,
|
|
1847
|
+
wt as HandyUploader,
|
|
1836
1848
|
ye as InsertButton,
|
|
1837
1849
|
te as SelectFileIconType,
|
|
1838
1850
|
_e as SimpleUploader,
|
|
1839
1851
|
be as TableUploader,
|
|
1840
1852
|
he as ThumbnailUploader,
|
|
1841
|
-
|
|
1853
|
+
Et as base64ByteLength,
|
|
1842
1854
|
It as compressDataUrl,
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1855
|
+
je as compressImage,
|
|
1856
|
+
Te as constructImageDataUrl,
|
|
1857
|
+
Ve as createVideoThumbnailCache,
|
|
1858
|
+
$t as default,
|
|
1847
1859
|
me as fileToBase64,
|
|
1848
|
-
|
|
1860
|
+
ze as filterByAccept,
|
|
1849
1861
|
Pt as formatBytes,
|
|
1850
1862
|
se as formatFileSize,
|
|
1851
1863
|
jt as generateVideoThumbnail,
|
|
1852
1864
|
Mt as getFileIcon,
|
|
1853
1865
|
ce as getFileType,
|
|
1854
|
-
|
|
1866
|
+
Me as getMimeTypeFromExtension,
|
|
1855
1867
|
Ht as getVideoDataUrl,
|
|
1856
|
-
|
|
1868
|
+
zt as install,
|
|
1857
1869
|
re as isImageFile,
|
|
1858
|
-
|
|
1859
|
-
|
|
1870
|
+
Ue as joinFileName,
|
|
1871
|
+
Se as languageData,
|
|
1860
1872
|
Nt as matchesAccept,
|
|
1861
1873
|
Ot as precheckFiles,
|
|
1862
|
-
|
|
1874
|
+
Ee as prepareAttachments,
|
|
1863
1875
|
qt as readFileAsDataUrl,
|
|
1864
|
-
|
|
1876
|
+
Be as readFiles,
|
|
1865
1877
|
Rt as splitFileName,
|
|
1866
1878
|
Vt as useErrorHandler,
|
|
1867
|
-
|
|
1868
|
-
|
|
1879
|
+
Tt as useFileUpload,
|
|
1880
|
+
Pe as validateFileCount,
|
|
1869
1881
|
Ie as validateFileSize
|
|
1870
1882
|
};
|