@jt-home/mfe-components 1.0.62-beta.1 → 1.0.62
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/dist/JtAttachmentPreview/index.cjs +1 -2
- package/dist/JtAttachmentPreview/index.mjs +552 -340
- package/dist/JtAttachmentPreview/style.css +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +1712 -1721
- package/dist/locale/index.cjs +1 -0
- package/dist/{shared/locale-DZoOXmOC.js → locale/index.mjs} +58 -69
- package/dist/pdf-BmBuG7of.js +18058 -0
- package/dist/pdf-Da0bm_Ya.cjs +55 -0
- package/dist/pdf.worker.min-4PI-nNLo.js +4 -0
- package/dist/pdf.worker.min-BAJUPwg6.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/types/components/JtAttachmentPreview/index.d.ts +2 -3
- package/dist/types/components/JtAttachmentPreview/types.d.ts +4 -6
- package/dist/types/components/form/types.d.ts +4 -1
- package/dist/types/components/globalInfo/components/GlobalInfoLeftNav.vue.d.ts +1 -1
- package/dist/types/components/globalInfo/model/slotIdentity.d.ts +1 -1
- package/dist/types/components/globalInfo/model/types.d.ts +1 -1
- package/dist/types/components/globalInfo/renderers/GlobalInfoDeleteConfirm.vue.d.ts +2 -2
- package/dist/types/components/index.d.ts +2 -1
- package/dist/types/locale/index.d.ts +2 -1
- package/dist/types/locale/types.d.ts +1 -2
- package/dist/types/main.d.ts +2 -5
- package/package.json +31 -33
- package/readme.md +694 -694
- package/dist/shared/locale-Da8Pg9-2.cjs +0 -1
|
@@ -1,9 +1,65 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { t as c } from "../locale/index.mjs";
|
|
2
|
+
import { defineComponent as L, openBlock as q, createElementBlock as N, createElementVNode as S, ref as B, watch as ne, onBeforeUnmount as G, h as r, computed as x, onMounted as V, nextTick as ue, render as j } from "vue";
|
|
3
|
+
import { ElIcon as U } from "element-plus";
|
|
4
|
+
/*! Element Plus Icons Vue v2.3.2 */
|
|
5
|
+
var de = /* @__PURE__ */ L({
|
|
6
|
+
name: "Download",
|
|
7
|
+
__name: "download",
|
|
8
|
+
setup(e) {
|
|
9
|
+
return (t, n) => (q(), N("svg", {
|
|
10
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11
|
+
viewBox: "0 0 1024 1024"
|
|
12
|
+
}, [
|
|
13
|
+
S("path", {
|
|
14
|
+
fill: "currentColor",
|
|
15
|
+
d: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"
|
|
16
|
+
})
|
|
17
|
+
]));
|
|
18
|
+
}
|
|
19
|
+
}), me = de, ve = /* @__PURE__ */ L({
|
|
20
|
+
name: "RefreshLeft",
|
|
21
|
+
__name: "refresh-left",
|
|
22
|
+
setup(e) {
|
|
23
|
+
return (t, n) => (q(), N("svg", {
|
|
24
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
25
|
+
viewBox: "0 0 1024 1024"
|
|
26
|
+
}, [
|
|
27
|
+
S("path", {
|
|
28
|
+
fill: "currentColor",
|
|
29
|
+
d: "M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"
|
|
30
|
+
})
|
|
31
|
+
]));
|
|
32
|
+
}
|
|
33
|
+
}), fe = ve, we = /* @__PURE__ */ L({
|
|
34
|
+
name: "ZoomIn",
|
|
35
|
+
__name: "zoom-in",
|
|
36
|
+
setup(e) {
|
|
37
|
+
return (t, n) => (q(), N("svg", {
|
|
38
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
39
|
+
viewBox: "0 0 1024 1024"
|
|
40
|
+
}, [
|
|
41
|
+
S("path", {
|
|
42
|
+
fill: "currentColor",
|
|
43
|
+
d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"
|
|
44
|
+
})
|
|
45
|
+
]));
|
|
46
|
+
}
|
|
47
|
+
}), pe = we, he = /* @__PURE__ */ L({
|
|
48
|
+
name: "ZoomOut",
|
|
49
|
+
__name: "zoom-out",
|
|
50
|
+
setup(e) {
|
|
51
|
+
return (t, n) => (q(), N("svg", {
|
|
52
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
53
|
+
viewBox: "0 0 1024 1024"
|
|
54
|
+
}, [
|
|
55
|
+
S("path", {
|
|
56
|
+
fill: "currentColor",
|
|
57
|
+
d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"
|
|
58
|
+
})
|
|
59
|
+
]));
|
|
60
|
+
}
|
|
61
|
+
}), ge = he;
|
|
62
|
+
const ye = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAADYCAMAAAC+/t3fAAAAaVBMVEUAAABWapNVapKeqsLJztx3hKnGzN2yu8////9XapWcqMGps8lXapVYa5RWaZWps8lfcJjS1+KjrsVXapWapr////9sfaKrtMrV2uWBj7B4iKqWob1wgaXr7fOBj6/Ax9dhc5yhq8OKl7Wba+6tAAAAE3RSTlMAgGDuDyVLoYDe2XuXRb68cy6e4BCQEAAAAyZJREFUeNrt29tyokAUheGOQjIoeMhuCQ4e0Pd/yCE1STU4mGq7bXqzZ/23ufoqYblTqkIIIYQQQggNlM42Lzctf5nMD22bKQYVOQ30sTPt6dEO74mKXLoiCgDTi1RFbUMUBhZXluQUDKbnWxWtjMLB2pYqUjmFg8WUzSg0TL+rCKVZeJheRJj9DYWHRRnHbBSYnr+qcSsoKCyeLKcfK/emc2UqH4LFGMcVWVftTC4w/TbmhGQjwvR6RBmNAbMYx4nD7k/I1GF3ZZOH3RtHAbDhcZQAG5SJgOn1Vt0mAzYwIUJgvjJ/2OVo2pcmcoQZWehxpBGue5sJEQTryyTBeuMoCtadEFmwjkwYzIyjNJief02IONj3OAqE/ZVJhJnZj3RS1c4nld04ijiC/5EJhbUyobBWJhT2OY5CYa1MKKyVCYXpdSIUphdbobB2HIXCWplQmJGFhZUn07kyNaFgbUsx1/1tb1Jh+i1hDmu0Y+uEN4xqV9ki5Q27atfmKWtYqd1lW84wqj1kr5xhB+3RkjGMrl4yxrCm9pG984V5ytZJINjpY7hmLNki5XjdP0fGFkZ0qL1kfGEt7erzgsYY1lYefrtWsIZ5NAMMMBNg9gEGmD3sejbVnRpyjAvs5rr3DzDAAOsEmH2AAQZYJ8Ds4wJrSlN1NE3+CDYJu+5NgNkHGGCAdQLMPsAAA0zuEQyYbYABBlgnwOwDDDDAOvVhl5NJ1Fu1O6lHMGA/xQl2rPodpcBq6gfYYIABBpgJsAdiBDvX/cTAxF4egNkEWGDY5Q5s8v9onoZdR3KNC4yOg7AzOccFNvi36POJIy4wqgZgF/KIC6yporuCwNrq/nNW7ckzLjCi/bO//MEF9mCAAQYYYDwCDDAmAQYYkwADjEmAAcYkwABjEmCAMQkwwJgEGGBMAgwwJgEGGJMAA4xJgAHGJMD+B1hGE6hwgK1oAqUOsJz4lymHCuJfrpTM9SicYC/EvUw5lRD3Psde4lP29YSJG8bse+ulvZZ5uFTCV5YZl6hpXKXKs5TlL22jnlCaM7uHV7NEPam02LwwaVYkCiGEEEIIITTUH1Fqd5V0WMtQAAAAAElFTkSuQmCC", be = "data:image/png;base64,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", Ae = /* @__PURE__ */ new Set([
|
|
7
63
|
"jpg",
|
|
8
64
|
"jpeg",
|
|
9
65
|
"png",
|
|
@@ -13,7 +69,7 @@ const se = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAADYCAMAAAC+/t3fAA
|
|
|
13
69
|
"svg",
|
|
14
70
|
"avif",
|
|
15
71
|
"ico"
|
|
16
|
-
]),
|
|
72
|
+
]), _e = /* @__PURE__ */ new Set(["mp4", "webm", "ogg", "ogv", "mov", "m4v"]), je = /* @__PURE__ */ new Set([
|
|
17
73
|
"mp3",
|
|
18
74
|
"wav",
|
|
19
75
|
"ogg",
|
|
@@ -21,7 +77,7 @@ const se = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAADYCAMAAAC+/t3fAA
|
|
|
21
77
|
"m4a",
|
|
22
78
|
"aac",
|
|
23
79
|
"flac"
|
|
24
|
-
]),
|
|
80
|
+
]), Ee = /* @__PURE__ */ new Set([
|
|
25
81
|
"html",
|
|
26
82
|
"htm",
|
|
27
83
|
"txt",
|
|
@@ -30,7 +86,7 @@ const se = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAADYCAMAAAC+/t3fAA
|
|
|
30
86
|
"csv",
|
|
31
87
|
"md",
|
|
32
88
|
"log"
|
|
33
|
-
]),
|
|
89
|
+
]), De = /* @__PURE__ */ new Set([
|
|
34
90
|
"doc",
|
|
35
91
|
"docx",
|
|
36
92
|
"xls",
|
|
@@ -40,118 +96,135 @@ const se = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAADYCAMAAAC+/t3fAA
|
|
|
40
96
|
"zip",
|
|
41
97
|
"rar",
|
|
42
98
|
"7z"
|
|
43
|
-
]),
|
|
99
|
+
]), K = {
|
|
44
100
|
component: "JtAttachmentPreview",
|
|
45
101
|
marker: "2026-06-25-download-error-detail",
|
|
46
102
|
source: "@jt-home/mfe-components/src/components/JtAttachmentPreview/index.ts",
|
|
47
|
-
pdfLoadMode: "
|
|
103
|
+
pdfLoadMode: "fetch-bytes-then-pdfjs-data",
|
|
48
104
|
previewDownloadMode: "openByParams-uses-registered-downloadRequest",
|
|
49
105
|
downloadResponseMode: "supports-blob-and-axios-response-data-blob"
|
|
50
106
|
};
|
|
51
|
-
function
|
|
52
|
-
console.info(`[JtAttachmentPreview DEBUG ${
|
|
53
|
-
...
|
|
107
|
+
function f(e, t) {
|
|
108
|
+
console.info(`[JtAttachmentPreview DEBUG ${K.marker}] ${e}`, {
|
|
109
|
+
...K,
|
|
54
110
|
...t
|
|
55
111
|
});
|
|
56
112
|
}
|
|
57
|
-
typeof window < "u" && (window.__JT_ATTACHMENT_PREVIEW_DEBUG__ =
|
|
58
|
-
let
|
|
59
|
-
|
|
60
|
-
(
|
|
61
|
-
|
|
62
|
-
import("
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
function
|
|
113
|
+
typeof window < "u" && (window.__JT_ATTACHMENT_PREVIEW_DEBUG__ = K, f("module-loaded"));
|
|
114
|
+
let E = null, H = null, D = null;
|
|
115
|
+
async function ke() {
|
|
116
|
+
return H || (H = Promise.all([
|
|
117
|
+
import("../pdf-BmBuG7of.js"),
|
|
118
|
+
import("../pdf.worker.min-4PI-nNLo.js")
|
|
119
|
+
]).then(([e, t]) => (e.GlobalWorkerOptions.workerSrc = t.default, e))), H;
|
|
120
|
+
}
|
|
121
|
+
function xe(e) {
|
|
66
122
|
return typeof e == "string" ? { url: e } : e;
|
|
67
123
|
}
|
|
68
|
-
function
|
|
124
|
+
function ae(e) {
|
|
69
125
|
const [t] = e.split(/[?#]/);
|
|
70
126
|
return t ?? "";
|
|
71
127
|
}
|
|
72
|
-
function
|
|
128
|
+
function F(e, t) {
|
|
73
129
|
if (t?.trim()) return t.trim();
|
|
74
|
-
const
|
|
75
|
-
if (!
|
|
130
|
+
const n = ae(e).split("/").filter(Boolean).pop();
|
|
131
|
+
if (!n) return c("common.附件预览");
|
|
76
132
|
try {
|
|
77
|
-
return decodeURIComponent(
|
|
133
|
+
return decodeURIComponent(n);
|
|
78
134
|
} catch {
|
|
79
|
-
return
|
|
135
|
+
return n;
|
|
80
136
|
}
|
|
81
137
|
}
|
|
82
|
-
function
|
|
83
|
-
return
|
|
138
|
+
function Q(e) {
|
|
139
|
+
return ae(e).match(/\.([a-z0-9]+)$/i)?.[1]?.toLowerCase() ?? "";
|
|
84
140
|
}
|
|
85
|
-
function
|
|
141
|
+
function Be(e) {
|
|
86
142
|
return e?.trim().replace(/^\./, "").toLowerCase() ?? "";
|
|
87
143
|
}
|
|
88
|
-
function
|
|
89
|
-
const t =
|
|
90
|
-
return
|
|
144
|
+
function Le(e) {
|
|
145
|
+
const t = Be(e);
|
|
146
|
+
return Ae.has(t) ? "image" : t === "pdf" ? "pdf" : _e.has(t) ? "video" : je.has(t) ? "audio" : Ee.has(t) ? "iframe" : De.has(t) ? "unsupported" : "unknown";
|
|
91
147
|
}
|
|
92
|
-
function
|
|
148
|
+
function X(e) {
|
|
93
149
|
const t = e.toLowerCase().split(";")[0]?.trim() ?? "";
|
|
94
150
|
return t.startsWith("image/") ? "image" : t === "application/pdf" ? "pdf" : t.startsWith("video/") ? "video" : t.startsWith("audio/") ? "audio" : t.startsWith("text/") ? "iframe" : "unknown";
|
|
95
151
|
}
|
|
96
|
-
function
|
|
152
|
+
function re(e) {
|
|
97
153
|
if (!e.url.trim()) return "empty";
|
|
98
154
|
if (e.mode && e.mode !== "auto") return e.mode;
|
|
99
155
|
if (e.mimeType) {
|
|
100
|
-
const
|
|
101
|
-
if (
|
|
156
|
+
const n = X(e.mimeType);
|
|
157
|
+
if (n !== "unknown") return n;
|
|
102
158
|
}
|
|
103
|
-
const t =
|
|
104
|
-
e.extension ||
|
|
159
|
+
const t = Le(
|
|
160
|
+
e.extension || Q(e.name || "") || Q(e.url)
|
|
105
161
|
);
|
|
106
162
|
return t !== "unknown" ? t : "unknown";
|
|
107
163
|
}
|
|
108
|
-
async function
|
|
164
|
+
async function Ce(e) {
|
|
109
165
|
try {
|
|
110
|
-
const
|
|
111
|
-
return
|
|
166
|
+
const n = (await fetch(e, { method: "HEAD" })).headers.get("content-type") ?? "";
|
|
167
|
+
return X(n);
|
|
112
168
|
} catch {
|
|
113
169
|
return "unknown";
|
|
114
170
|
}
|
|
115
171
|
}
|
|
116
|
-
async function
|
|
117
|
-
const
|
|
118
|
-
if (!
|
|
119
|
-
return
|
|
172
|
+
async function oe(e, t) {
|
|
173
|
+
const n = await fetch(e, t);
|
|
174
|
+
if (!n.ok) throw new Error(`fetch failed: ${n.status}`);
|
|
175
|
+
return n.blob();
|
|
176
|
+
}
|
|
177
|
+
async function Me(e) {
|
|
178
|
+
f("fetch-pdf-bytes-start", {
|
|
179
|
+
url: e
|
|
180
|
+
});
|
|
181
|
+
const t = await fetch(e);
|
|
182
|
+
if (!t.ok) throw new Error(`fetch failed: ${t.status}`);
|
|
183
|
+
const n = new Uint8Array(await t.arrayBuffer());
|
|
184
|
+
return f("fetch-pdf-bytes-done", {
|
|
185
|
+
url: e,
|
|
186
|
+
byteLength: n.byteLength,
|
|
187
|
+
contentType: t.headers.get("content-type") ?? ""
|
|
188
|
+
}), n;
|
|
189
|
+
}
|
|
190
|
+
function Pe(e, t) {
|
|
191
|
+
const n = Q(t);
|
|
192
|
+
return n === "doc" || n === "docx" ? "W" : n === "xls" || n === "xlsx" ? "X" : n === "ppt" || n === "pptx" ? "P" : n === "zip" || n === "rar" || n === "7z" ? "ZIP" : e === "pdf" ? "PDF" : "FILE";
|
|
120
193
|
}
|
|
121
|
-
function
|
|
194
|
+
function ie(e, t, n, o = !1) {
|
|
122
195
|
return r(
|
|
123
196
|
"button",
|
|
124
197
|
{
|
|
125
|
-
class:
|
|
198
|
+
class: n,
|
|
126
199
|
type: "button",
|
|
127
200
|
onClick: () => {
|
|
128
|
-
|
|
201
|
+
f("download-button-click", {
|
|
129
202
|
url: e.url,
|
|
130
203
|
downloadName: t,
|
|
131
204
|
fallbackToRawUrl: o
|
|
132
|
-
}),
|
|
205
|
+
}), ce(e, t, {
|
|
133
206
|
fallbackToRawUrl: o
|
|
134
207
|
});
|
|
135
208
|
}
|
|
136
209
|
},
|
|
137
210
|
[
|
|
138
211
|
r(
|
|
139
|
-
|
|
212
|
+
U,
|
|
140
213
|
{ class: "jt-attachment-preview-service__download-icon" },
|
|
141
|
-
() => r(
|
|
214
|
+
() => r(me)
|
|
142
215
|
),
|
|
143
216
|
r(
|
|
144
217
|
"span",
|
|
145
218
|
{ class: "jt-attachment-preview-service__download-text" },
|
|
146
|
-
|
|
219
|
+
c("common.下载")
|
|
147
220
|
)
|
|
148
221
|
]
|
|
149
222
|
);
|
|
150
223
|
}
|
|
151
|
-
function
|
|
224
|
+
function W(e) {
|
|
152
225
|
return e === "image" || e === "pdf";
|
|
153
226
|
}
|
|
154
|
-
function
|
|
227
|
+
function le(e) {
|
|
155
228
|
return r(
|
|
156
229
|
"div",
|
|
157
230
|
{ class: "jt-attachment-preview-service__preview-fallback" },
|
|
@@ -164,7 +237,7 @@ function Q(e) {
|
|
|
164
237
|
r(
|
|
165
238
|
"div",
|
|
166
239
|
{ class: "jt-attachment-preview-service__unsupported-text" },
|
|
167
|
-
|
|
240
|
+
c("common.暂不支持预览此类型的文件")
|
|
168
241
|
),
|
|
169
242
|
r(
|
|
170
243
|
"div",
|
|
@@ -177,56 +250,56 @@ function Q(e) {
|
|
|
177
250
|
]
|
|
178
251
|
);
|
|
179
252
|
}
|
|
180
|
-
function
|
|
181
|
-
const
|
|
182
|
-
|
|
253
|
+
function Z(e, t) {
|
|
254
|
+
const n = document.createElement("a");
|
|
255
|
+
n.href = e, n.download = t, n.style.display = "none", document.body.appendChild(n), n.click(), n.remove();
|
|
183
256
|
}
|
|
184
|
-
function
|
|
185
|
-
const
|
|
186
|
-
|
|
257
|
+
function $(e, t) {
|
|
258
|
+
const n = URL.createObjectURL(e);
|
|
259
|
+
Z(n, t), window.setTimeout(() => URL.revokeObjectURL(n), 1e3);
|
|
187
260
|
}
|
|
188
|
-
function
|
|
261
|
+
function J(e) {
|
|
189
262
|
return e instanceof Blob || Object.prototype.toString.call(e) === "[object Blob]";
|
|
190
263
|
}
|
|
191
|
-
function
|
|
192
|
-
if (
|
|
264
|
+
function Re(e, t) {
|
|
265
|
+
if (J(e))
|
|
193
266
|
return e;
|
|
194
267
|
if (e && typeof e == "object") {
|
|
195
|
-
const
|
|
196
|
-
if (
|
|
197
|
-
const o =
|
|
268
|
+
const n = e;
|
|
269
|
+
if (J(n.data)) {
|
|
270
|
+
const o = n.data;
|
|
198
271
|
return {
|
|
199
|
-
blob:
|
|
200
|
-
name:
|
|
272
|
+
blob: n.data,
|
|
273
|
+
name: n.fileName || n.name || o.name || t
|
|
201
274
|
};
|
|
202
275
|
}
|
|
203
276
|
}
|
|
204
277
|
return null;
|
|
205
278
|
}
|
|
206
|
-
async function
|
|
207
|
-
|
|
279
|
+
async function Te(e, t, n = {}) {
|
|
280
|
+
f("download-start", {
|
|
208
281
|
url: e,
|
|
209
282
|
downloadName: t,
|
|
210
|
-
fallbackToRawUrl: !!
|
|
211
|
-
hasRequestInit: !!
|
|
283
|
+
fallbackToRawUrl: !!n.fallbackToRawUrl,
|
|
284
|
+
hasRequestInit: !!n.requestInit
|
|
212
285
|
});
|
|
213
286
|
try {
|
|
214
|
-
const o = await
|
|
215
|
-
|
|
287
|
+
const o = await oe(e, n.requestInit);
|
|
288
|
+
f("download-blob-ready", {
|
|
216
289
|
url: e,
|
|
217
290
|
downloadName: t,
|
|
218
291
|
blobType: o.type,
|
|
219
292
|
blobSize: o.size
|
|
220
|
-
}),
|
|
293
|
+
}), $(o, t);
|
|
221
294
|
} catch {
|
|
222
|
-
|
|
295
|
+
f("download-blob-failed", {
|
|
223
296
|
url: e,
|
|
224
297
|
downloadName: t,
|
|
225
|
-
fallbackToRawUrl: !!
|
|
226
|
-
}),
|
|
298
|
+
fallbackToRawUrl: !!n.fallbackToRawUrl
|
|
299
|
+
}), n.fallbackToRawUrl && Z(e, t);
|
|
227
300
|
}
|
|
228
301
|
}
|
|
229
|
-
function
|
|
302
|
+
function te(e, t) {
|
|
230
303
|
return e instanceof Blob ? { blob: e, name: t } : e ? {
|
|
231
304
|
url: e.url,
|
|
232
305
|
blob: e.blob,
|
|
@@ -235,7 +308,7 @@ function S(e, t) {
|
|
|
235
308
|
fallbackToRawUrl: e.fallbackToRawUrl
|
|
236
309
|
} : null;
|
|
237
310
|
}
|
|
238
|
-
async function
|
|
311
|
+
async function ce(e, t, n = {}) {
|
|
239
312
|
const o = {
|
|
240
313
|
url: e.url,
|
|
241
314
|
name: t,
|
|
@@ -243,80 +316,80 @@ async function z(e, t, a = {}) {
|
|
|
243
316
|
options: e
|
|
244
317
|
};
|
|
245
318
|
try {
|
|
246
|
-
let
|
|
247
|
-
if (
|
|
319
|
+
let a = null;
|
|
320
|
+
if (f("download-resolve-start", {
|
|
248
321
|
url: e.url,
|
|
249
322
|
downloadName: t,
|
|
250
323
|
hasCustomDownload: !!e.download,
|
|
251
|
-
hasRegisteredDownload: !!
|
|
324
|
+
hasRegisteredDownload: !!D?.downloadRequest,
|
|
252
325
|
useRegisteredDownload: !!e.useRegisteredDownload,
|
|
253
326
|
hasRequestParams: Object.prototype.hasOwnProperty.call(
|
|
254
327
|
e,
|
|
255
328
|
"requestParams"
|
|
256
329
|
)
|
|
257
330
|
}), e.download) {
|
|
258
|
-
|
|
331
|
+
f("download-custom-handler-start", {
|
|
259
332
|
url: e.url,
|
|
260
333
|
downloadName: t
|
|
261
334
|
});
|
|
262
335
|
const i = await e.download(o);
|
|
263
|
-
if (
|
|
264
|
-
|
|
336
|
+
if (a = te(i, t), !a) {
|
|
337
|
+
f("download-custom-handler-done", {
|
|
265
338
|
url: e.url,
|
|
266
339
|
downloadName: t
|
|
267
340
|
});
|
|
268
341
|
return;
|
|
269
342
|
}
|
|
270
|
-
} else if (e.useRegisteredDownload &&
|
|
271
|
-
|
|
343
|
+
} else if (e.useRegisteredDownload && D?.downloadRequest) {
|
|
344
|
+
f("download-setup-request-start", {
|
|
272
345
|
url: e.url,
|
|
273
346
|
downloadName: t,
|
|
274
347
|
params: e.requestParams
|
|
275
348
|
});
|
|
276
|
-
const i = await
|
|
349
|
+
const i = await D.downloadRequest(
|
|
277
350
|
e.requestParams
|
|
278
351
|
);
|
|
279
|
-
|
|
280
|
-
isBlob:
|
|
281
|
-
isDataBlob: !!i && typeof i == "object" &&
|
|
352
|
+
f("download-request-response", {
|
|
353
|
+
isBlob: J(i),
|
|
354
|
+
isDataBlob: !!i && typeof i == "object" && J(i.data),
|
|
282
355
|
responseType: Object.prototype.toString.call(i)
|
|
283
356
|
});
|
|
284
|
-
const
|
|
357
|
+
const p = Re(i, t), v = p || (D.mapDownloadResponse ? D.mapDownloadResponse(
|
|
285
358
|
i,
|
|
286
359
|
e.requestParams
|
|
287
360
|
) : i);
|
|
288
|
-
|
|
289
|
-
}
|
|
290
|
-
if (
|
|
291
|
-
|
|
292
|
-
downloadName:
|
|
293
|
-
blobType:
|
|
294
|
-
blobSize:
|
|
295
|
-
}),
|
|
361
|
+
a = te(v, t);
|
|
362
|
+
}
|
|
363
|
+
if (a?.blob) {
|
|
364
|
+
f("download-result-blob", {
|
|
365
|
+
downloadName: a.name,
|
|
366
|
+
blobType: a.blob.type,
|
|
367
|
+
blobSize: a.blob.size
|
|
368
|
+
}), $(a.blob, a.name);
|
|
296
369
|
return;
|
|
297
370
|
}
|
|
298
|
-
const
|
|
299
|
-
await
|
|
300
|
-
requestInit:
|
|
301
|
-
fallbackToRawUrl:
|
|
371
|
+
const s = a?.url || e.downloadUrl || e.url, u = a?.name || t;
|
|
372
|
+
await Te(s, u, {
|
|
373
|
+
requestInit: a?.requestInit || e.downloadRequestInit,
|
|
374
|
+
fallbackToRawUrl: a?.fallbackToRawUrl ?? e.downloadFallbackToRawUrl ?? n.fallbackToRawUrl
|
|
302
375
|
});
|
|
303
|
-
} catch (
|
|
304
|
-
|
|
376
|
+
} catch (a) {
|
|
377
|
+
f("download-handler-failed", {
|
|
305
378
|
url: e.url,
|
|
306
379
|
downloadName: t,
|
|
307
|
-
errorName:
|
|
308
|
-
errorMessage:
|
|
309
|
-
errorStack:
|
|
310
|
-
errorResponseStatus:
|
|
311
|
-
errorResponseType:
|
|
312
|
-
|
|
380
|
+
errorName: a instanceof Error ? a.name : "",
|
|
381
|
+
errorMessage: a instanceof Error ? a.message : String(a),
|
|
382
|
+
errorStack: a instanceof Error ? a.stack : "",
|
|
383
|
+
errorResponseStatus: a && typeof a == "object" ? a.response?.status : void 0,
|
|
384
|
+
errorResponseType: a && typeof a == "object" ? Object.prototype.toString.call(
|
|
385
|
+
a.response?.data
|
|
313
386
|
) : void 0,
|
|
314
|
-
errorResponseDataType:
|
|
315
|
-
}),
|
|
387
|
+
errorResponseDataType: a && typeof a == "object" ? a.response?.data?.type : void 0
|
|
388
|
+
}), n.fallbackToRawUrl && Z(e.downloadUrl || e.url, t);
|
|
316
389
|
}
|
|
317
390
|
}
|
|
318
|
-
const
|
|
319
|
-
name: "
|
|
391
|
+
const Ye = L({
|
|
392
|
+
name: "JtAttachmentPreviewPdfCanvas",
|
|
320
393
|
props: {
|
|
321
394
|
url: {
|
|
322
395
|
type: String,
|
|
@@ -340,34 +413,159 @@ const je = _({
|
|
|
340
413
|
previewError: (e) => e instanceof Event
|
|
341
414
|
},
|
|
342
415
|
setup(e, { emit: t }) {
|
|
343
|
-
const a =
|
|
344
|
-
|
|
345
|
-
|
|
416
|
+
const n = B("loading"), o = B([]), a = B([]), s = /* @__PURE__ */ new Map(), u = B("");
|
|
417
|
+
let i = null, p = [], v = 0;
|
|
418
|
+
async function w(l, d) {
|
|
419
|
+
if (!d) return null;
|
|
420
|
+
const g = typeof d == "string" ? await l.getDestination(d) : d;
|
|
421
|
+
return !Array.isArray(g) || !g[0] ? null : await l.getPageIndex(g[0]) + 1;
|
|
346
422
|
}
|
|
347
|
-
function
|
|
348
|
-
|
|
423
|
+
async function A(l, d, g = 0) {
|
|
424
|
+
if (!d?.length) return [];
|
|
425
|
+
const y = [];
|
|
426
|
+
for (const k of d) {
|
|
427
|
+
const R = await w(l, k.dest);
|
|
428
|
+
y.push({
|
|
429
|
+
title: k.title || c("common.未命名标题"),
|
|
430
|
+
pageNumber: R,
|
|
431
|
+
level: g
|
|
432
|
+
});
|
|
433
|
+
const M = await A(l, k.items, g + 1);
|
|
434
|
+
y.push(...M);
|
|
435
|
+
}
|
|
436
|
+
return y;
|
|
349
437
|
}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
(
|
|
353
|
-
|
|
438
|
+
function h() {
|
|
439
|
+
v += 1;
|
|
440
|
+
for (const l of p)
|
|
441
|
+
l.cancel();
|
|
442
|
+
p = [], i?.destroy(), i = null, s.clear();
|
|
443
|
+
}
|
|
444
|
+
async function C() {
|
|
445
|
+
h();
|
|
446
|
+
const l = v;
|
|
447
|
+
n.value = "loading", u.value = "", o.value = [], a.value = [];
|
|
448
|
+
try {
|
|
449
|
+
const d = await ke();
|
|
450
|
+
if (l !== v) return;
|
|
451
|
+
const g = await Me(e.url);
|
|
452
|
+
if (l !== v) return;
|
|
453
|
+
f("render-pdf-get-document-data", {
|
|
454
|
+
byteLength: g.byteLength
|
|
455
|
+
}), i = d.getDocument({ data: g });
|
|
456
|
+
const y = await i.promise;
|
|
457
|
+
if (l !== v) return;
|
|
458
|
+
o.value = Array.from(
|
|
459
|
+
{ length: y.numPages },
|
|
460
|
+
(M, P) => P + 1
|
|
461
|
+
), a.value = await A(
|
|
462
|
+
y,
|
|
463
|
+
await y.getOutline()
|
|
464
|
+
), await ue();
|
|
465
|
+
const k = s.values().next().value, R = Math.max(
|
|
466
|
+
(k?.parentElement?.clientWidth ?? 800) - 32,
|
|
467
|
+
320
|
|
468
|
+
);
|
|
469
|
+
for (const M of o.value) {
|
|
470
|
+
if (l !== v) return;
|
|
471
|
+
const P = await y.getPage(M), b = s.get(M), T = b?.getContext("2d");
|
|
472
|
+
if (!b || !T) continue;
|
|
473
|
+
const z = P.getViewport({ scale: 1 }), m = Math.min(R / z.width, 2), Y = P.getViewport({ scale: m }), O = window.devicePixelRatio || 1;
|
|
474
|
+
b.width = Math.floor(Y.width * O), b.height = Math.floor(Y.height * O), b.style.width = `${Math.floor(Y.width)}px`, b.style.height = `${Math.floor(Y.height)}px`, T.setTransform(O, 0, 0, O, 0, 0);
|
|
475
|
+
const ee = P.render({
|
|
476
|
+
canvas: b,
|
|
477
|
+
canvasContext: T,
|
|
478
|
+
viewport: Y
|
|
479
|
+
});
|
|
480
|
+
p.push(ee), await ee.promise;
|
|
481
|
+
}
|
|
482
|
+
if (l !== v) return;
|
|
483
|
+
n.value = "ready", t("previewLoad", new Event("load"));
|
|
484
|
+
} catch (d) {
|
|
485
|
+
if (l !== v) return;
|
|
486
|
+
n.value = "error", u.value = d instanceof Error ? d.message : c("common.PDF加载失败"), t("previewError", new Event("error"));
|
|
354
487
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
488
|
+
}
|
|
489
|
+
ne(() => e.url, C, { immediate: !0 }), G(h);
|
|
490
|
+
function _(l) {
|
|
491
|
+
if (!l) return;
|
|
492
|
+
s.get(l)?.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
493
|
+
}
|
|
494
|
+
return () => r("div", { class: "jt-attachment-preview-service__pdf-viewer" }, [
|
|
495
|
+
n.value === "loading" ? r(
|
|
496
|
+
"div",
|
|
497
|
+
{ class: "jt-attachment-preview-service__pdf-state" },
|
|
498
|
+
c("common.PDF加载中___")
|
|
499
|
+
) : null,
|
|
500
|
+
n.value === "error" ? r("div", { class: "jt-attachment-preview-service__pdf-state" }, [
|
|
501
|
+
le({
|
|
502
|
+
icon: be,
|
|
360
503
|
name: e.name
|
|
361
504
|
})
|
|
362
|
-
]) :
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
505
|
+
]) : null,
|
|
506
|
+
null,
|
|
507
|
+
null,
|
|
508
|
+
r(
|
|
509
|
+
"div",
|
|
510
|
+
{
|
|
511
|
+
class: [
|
|
512
|
+
"jt-attachment-preview-service__pdf-layout",
|
|
513
|
+
n.value !== "ready" ? "jt-attachment-preview-service__pdf-layout--hidden" : ""
|
|
514
|
+
]
|
|
515
|
+
},
|
|
516
|
+
[
|
|
517
|
+
a.value.length ? r(
|
|
518
|
+
"aside",
|
|
519
|
+
{ class: "jt-attachment-preview-service__pdf-outline" },
|
|
520
|
+
[
|
|
521
|
+
r(
|
|
522
|
+
"div",
|
|
523
|
+
{
|
|
524
|
+
class: "jt-attachment-preview-service__pdf-outline-title"
|
|
525
|
+
},
|
|
526
|
+
c("common.目录")
|
|
527
|
+
),
|
|
528
|
+
r(
|
|
529
|
+
"div",
|
|
530
|
+
{
|
|
531
|
+
class: "jt-attachment-preview-service__pdf-outline-list"
|
|
532
|
+
},
|
|
533
|
+
a.value.map(
|
|
534
|
+
(l, d) => r(
|
|
535
|
+
"button",
|
|
536
|
+
{
|
|
537
|
+
key: `${l.title}-${d}`,
|
|
538
|
+
class: "jt-attachment-preview-service__pdf-outline-item",
|
|
539
|
+
style: { paddingLeft: `${12 + l.level * 14}px` },
|
|
540
|
+
type: "button",
|
|
541
|
+
disabled: !l.pageNumber,
|
|
542
|
+
title: l.title,
|
|
543
|
+
onClick: () => _(l.pageNumber)
|
|
544
|
+
},
|
|
545
|
+
l.title
|
|
546
|
+
)
|
|
547
|
+
)
|
|
548
|
+
)
|
|
549
|
+
]
|
|
550
|
+
) : null,
|
|
551
|
+
r(
|
|
552
|
+
"div",
|
|
553
|
+
{ class: "jt-attachment-preview-service__pdf-pages" },
|
|
554
|
+
o.value.map(
|
|
555
|
+
(l) => r("canvas", {
|
|
556
|
+
key: l,
|
|
557
|
+
ref: (d) => {
|
|
558
|
+
d instanceof HTMLCanvasElement && s.set(l, d);
|
|
559
|
+
},
|
|
560
|
+
class: "jt-attachment-preview-service__pdf-page"
|
|
561
|
+
})
|
|
562
|
+
)
|
|
563
|
+
)
|
|
564
|
+
]
|
|
565
|
+
)
|
|
368
566
|
]);
|
|
369
567
|
}
|
|
370
|
-
}),
|
|
568
|
+
}), Ie = L({
|
|
371
569
|
name: "JtAttachmentPreviewImageTransform",
|
|
372
570
|
props: {
|
|
373
571
|
url: {
|
|
@@ -396,83 +594,83 @@ const je = _({
|
|
|
396
594
|
previewError: (e) => e instanceof Event
|
|
397
595
|
},
|
|
398
596
|
setup(e, { emit: t }) {
|
|
399
|
-
const
|
|
400
|
-
let
|
|
401
|
-
const
|
|
597
|
+
const n = B(null), o = B("ready"), a = B(1), s = B(!1);
|
|
598
|
+
let u = 0, i = 0, p = 0, v = 0, w = 0, A = 0, h = 0;
|
|
599
|
+
const C = x(
|
|
402
600
|
() => ({
|
|
403
601
|
"--jt-attachment-preview-service-image-fit": e.fit,
|
|
404
|
-
transform: `translate(${
|
|
602
|
+
transform: `translate(${u}px, ${i}px) scale(${a.value})`
|
|
405
603
|
})
|
|
406
604
|
);
|
|
407
|
-
function
|
|
408
|
-
|
|
605
|
+
function _() {
|
|
606
|
+
n.value && (n.value.style.transform = `translate(${u}px, ${i}px) scale(${a.value})`);
|
|
409
607
|
}
|
|
410
|
-
function
|
|
411
|
-
|
|
412
|
-
|
|
608
|
+
function l() {
|
|
609
|
+
h || (h = window.requestAnimationFrame(() => {
|
|
610
|
+
h = 0, _();
|
|
413
611
|
}));
|
|
414
612
|
}
|
|
415
|
-
function
|
|
416
|
-
|
|
613
|
+
function d(m) {
|
|
614
|
+
a.value = Math.min(Math.max(Number(m.toFixed(2)), 0.2), 5), a.value <= 1 && (u = 0, i = 0), _();
|
|
417
615
|
}
|
|
418
|
-
function
|
|
419
|
-
|
|
616
|
+
function g() {
|
|
617
|
+
d(a.value + 0.2);
|
|
420
618
|
}
|
|
421
|
-
function
|
|
422
|
-
const
|
|
423
|
-
|
|
619
|
+
function y() {
|
|
620
|
+
const m = Math.max(Number((a.value - 0.2).toFixed(2)), 0.2);
|
|
621
|
+
a.value = m, m <= 1 && (u = 0, i = 0), _();
|
|
424
622
|
}
|
|
425
|
-
function
|
|
426
|
-
|
|
623
|
+
function k() {
|
|
624
|
+
u = 0, i = 0, d(1);
|
|
427
625
|
}
|
|
428
|
-
function
|
|
429
|
-
o.value = "ready", t("previewLoad",
|
|
626
|
+
function R(m) {
|
|
627
|
+
o.value = "ready", t("previewLoad", m);
|
|
430
628
|
}
|
|
431
|
-
function
|
|
432
|
-
o.value = "error", t("previewError",
|
|
629
|
+
function M(m) {
|
|
630
|
+
o.value = "error", t("previewError", m);
|
|
433
631
|
}
|
|
434
|
-
function
|
|
435
|
-
|
|
632
|
+
function P(m) {
|
|
633
|
+
a.value <= 1 || (m.preventDefault(), s.value = !0, p = m.clientX, v = m.clientY, w = u, A = i, window.addEventListener("pointermove", b), window.addEventListener("pointerup", T, { once: !0 }));
|
|
436
634
|
}
|
|
437
|
-
function
|
|
438
|
-
|
|
635
|
+
function b(m) {
|
|
636
|
+
s.value && (u = w + m.clientX - p, i = A + m.clientY - v, l());
|
|
439
637
|
}
|
|
440
|
-
function
|
|
441
|
-
|
|
638
|
+
function T() {
|
|
639
|
+
s.value = !1, window.removeEventListener("pointermove", b);
|
|
442
640
|
}
|
|
443
|
-
function
|
|
444
|
-
|
|
641
|
+
function z(m) {
|
|
642
|
+
m.preventDefault(), d(a.value + (m.deltaY < 0 ? 0.1 : -0.1));
|
|
445
643
|
}
|
|
446
|
-
return
|
|
644
|
+
return V(_), ne(
|
|
447
645
|
() => e.url,
|
|
448
646
|
() => {
|
|
449
|
-
o.value = "ready",
|
|
647
|
+
o.value = "ready", k();
|
|
450
648
|
}
|
|
451
|
-
),
|
|
452
|
-
window.removeEventListener("pointermove",
|
|
649
|
+
), G(() => {
|
|
650
|
+
window.removeEventListener("pointermove", b), h && window.cancelAnimationFrame(h);
|
|
453
651
|
}), () => r(
|
|
454
652
|
"div",
|
|
455
653
|
{ class: "jt-attachment-preview-service__image-viewer" },
|
|
456
|
-
o.value === "error" ?
|
|
457
|
-
icon:
|
|
654
|
+
o.value === "error" ? le({
|
|
655
|
+
icon: ye,
|
|
458
656
|
name: e.name
|
|
459
657
|
}) : [
|
|
460
658
|
r("img", {
|
|
461
|
-
ref:
|
|
659
|
+
ref: n,
|
|
462
660
|
class: [
|
|
463
661
|
"jt-attachment-preview-service__media",
|
|
464
662
|
"jt-attachment-preview-service__image",
|
|
465
|
-
|
|
466
|
-
|
|
663
|
+
a.value > 1 ? "jt-attachment-preview-service__image--draggable" : "",
|
|
664
|
+
s.value ? "jt-attachment-preview-service__image--dragging" : ""
|
|
467
665
|
],
|
|
468
666
|
src: e.url,
|
|
469
667
|
alt: e.name,
|
|
470
|
-
style:
|
|
471
|
-
onLoad:
|
|
472
|
-
onError:
|
|
473
|
-
onPointerdown:
|
|
474
|
-
onWheel:
|
|
475
|
-
onDragstart: (
|
|
668
|
+
style: C.value,
|
|
669
|
+
onLoad: R,
|
|
670
|
+
onError: M,
|
|
671
|
+
onPointerdown: P,
|
|
672
|
+
onWheel: z,
|
|
673
|
+
onDragstart: (m) => m.preventDefault(),
|
|
476
674
|
draggable: !1
|
|
477
675
|
}),
|
|
478
676
|
r(
|
|
@@ -484,42 +682,42 @@ const je = _({
|
|
|
484
682
|
{
|
|
485
683
|
class: "jt-attachment-preview-service__image-tool",
|
|
486
684
|
type: "button",
|
|
487
|
-
title:
|
|
488
|
-
onClick:
|
|
685
|
+
title: c("common.缩小"),
|
|
686
|
+
onClick: y
|
|
489
687
|
},
|
|
490
|
-
[r(
|
|
688
|
+
[r(U, () => r(ge))]
|
|
491
689
|
),
|
|
492
690
|
r(
|
|
493
691
|
"span",
|
|
494
692
|
{ class: "jt-attachment-preview-service__image-scale" },
|
|
495
|
-
`${Math.round(
|
|
693
|
+
`${Math.round(a.value * 100)}%`
|
|
496
694
|
),
|
|
497
695
|
r(
|
|
498
696
|
"button",
|
|
499
697
|
{
|
|
500
698
|
class: "jt-attachment-preview-service__image-tool",
|
|
501
699
|
type: "button",
|
|
502
|
-
title:
|
|
503
|
-
onClick:
|
|
700
|
+
title: c("common.放大"),
|
|
701
|
+
onClick: g
|
|
504
702
|
},
|
|
505
|
-
[r(
|
|
703
|
+
[r(U, () => r(pe))]
|
|
506
704
|
),
|
|
507
705
|
r(
|
|
508
706
|
"button",
|
|
509
707
|
{
|
|
510
708
|
class: "jt-attachment-preview-service__image-tool",
|
|
511
709
|
type: "button",
|
|
512
|
-
title:
|
|
513
|
-
onClick:
|
|
710
|
+
title: c("common.复位"),
|
|
711
|
+
onClick: k
|
|
514
712
|
},
|
|
515
|
-
[r(
|
|
713
|
+
[r(U, () => r(fe))]
|
|
516
714
|
)
|
|
517
715
|
]
|
|
518
716
|
)
|
|
519
717
|
]
|
|
520
718
|
);
|
|
521
719
|
}
|
|
522
|
-
}),
|
|
720
|
+
}), Oe = L({
|
|
523
721
|
name: "JtAttachmentPreviewService",
|
|
524
722
|
props: {
|
|
525
723
|
options: {
|
|
@@ -532,43 +730,45 @@ const je = _({
|
|
|
532
730
|
}
|
|
533
731
|
},
|
|
534
732
|
setup(e) {
|
|
535
|
-
const t =
|
|
536
|
-
() =>
|
|
537
|
-
),
|
|
733
|
+
const t = x(
|
|
734
|
+
() => F(e.options.url, e.options.name)
|
|
735
|
+
), n = x(
|
|
538
736
|
() => e.options.downloadName || t.value
|
|
539
|
-
), o =
|
|
737
|
+
), o = x(() => re(e.options)), a = x(
|
|
738
|
+
() => Pe(o.value, e.options.url)
|
|
739
|
+
), s = x(
|
|
540
740
|
() => ({
|
|
541
741
|
zIndex: e.options.zIndex ?? 3e3,
|
|
542
742
|
"--jt-attachment-preview-service-image-fit": e.options.fit ?? "contain"
|
|
543
743
|
})
|
|
544
744
|
);
|
|
545
|
-
function
|
|
745
|
+
function u() {
|
|
546
746
|
e.options.onClose?.(), e.onDestroy();
|
|
547
747
|
}
|
|
548
|
-
function
|
|
549
|
-
|
|
748
|
+
function i(w) {
|
|
749
|
+
w.key === "Escape" && e.options.closeOnPressEscape !== !1 && u();
|
|
550
750
|
}
|
|
551
|
-
function
|
|
552
|
-
e.options.onLoad?.(
|
|
751
|
+
function p(w) {
|
|
752
|
+
e.options.onLoad?.(w);
|
|
553
753
|
}
|
|
554
|
-
function v(
|
|
555
|
-
e.options.onError?.(
|
|
754
|
+
function v(w) {
|
|
755
|
+
e.options.onError?.(w);
|
|
556
756
|
}
|
|
557
|
-
return
|
|
558
|
-
document.addEventListener("keydown",
|
|
559
|
-
}),
|
|
560
|
-
document.removeEventListener("keydown",
|
|
757
|
+
return V(() => {
|
|
758
|
+
document.addEventListener("keydown", i), document.body.classList.add("jt-attachment-preview-service-lock");
|
|
759
|
+
}), G(() => {
|
|
760
|
+
document.removeEventListener("keydown", i), document.body.classList.remove("jt-attachment-preview-service-lock");
|
|
561
761
|
}), () => {
|
|
562
|
-
const
|
|
563
|
-
|
|
762
|
+
const w = e.options.downloadable === !1 ? [] : [
|
|
763
|
+
ie(
|
|
564
764
|
e.options,
|
|
565
|
-
|
|
765
|
+
n.value,
|
|
566
766
|
"jt-attachment-preview-service__top-download"
|
|
567
767
|
)
|
|
568
768
|
];
|
|
569
769
|
return r(
|
|
570
770
|
"div",
|
|
571
|
-
{ class: "jt-attachment-preview-service", style:
|
|
771
|
+
{ class: "jt-attachment-preview-service", style: s.value },
|
|
572
772
|
[
|
|
573
773
|
r("div", { class: "jt-attachment-preview-service__modal" }, [
|
|
574
774
|
r("div", { class: "jt-attachment-preview-service__header" }, [
|
|
@@ -584,14 +784,14 @@ const je = _({
|
|
|
584
784
|
"div",
|
|
585
785
|
{ class: "jt-attachment-preview-service__header-actions" },
|
|
586
786
|
[
|
|
587
|
-
...
|
|
787
|
+
...w,
|
|
588
788
|
r(
|
|
589
789
|
"button",
|
|
590
790
|
{
|
|
591
791
|
class: "jt-attachment-preview-service__close",
|
|
592
792
|
type: "button",
|
|
593
|
-
"aria-label":
|
|
594
|
-
onClick:
|
|
793
|
+
"aria-label": c("common.关闭"),
|
|
794
|
+
onClick: u
|
|
595
795
|
},
|
|
596
796
|
"×"
|
|
597
797
|
)
|
|
@@ -599,14 +799,16 @@ const je = _({
|
|
|
599
799
|
)
|
|
600
800
|
]),
|
|
601
801
|
r("div", { class: "jt-attachment-preview-service__body" }, [
|
|
602
|
-
|
|
802
|
+
Ue({
|
|
603
803
|
type: o.value,
|
|
604
804
|
url: e.options.url,
|
|
605
805
|
name: t.value,
|
|
606
|
-
downloadName:
|
|
806
|
+
downloadName: n.value,
|
|
607
807
|
sourceOptions: e.options,
|
|
808
|
+
sandbox: e.options.sandbox,
|
|
809
|
+
iconText: a.value,
|
|
608
810
|
downloadable: e.options.downloadable !== !1,
|
|
609
|
-
onLoad:
|
|
811
|
+
onLoad: p,
|
|
610
812
|
onError: v
|
|
611
813
|
})
|
|
612
814
|
])
|
|
@@ -615,7 +817,7 @@ const je = _({
|
|
|
615
817
|
);
|
|
616
818
|
};
|
|
617
819
|
}
|
|
618
|
-
}),
|
|
820
|
+
}), I = L({
|
|
619
821
|
name: "JtAttachmentPreviewDetectingService",
|
|
620
822
|
props: {
|
|
621
823
|
options: {
|
|
@@ -628,11 +830,11 @@ const je = _({
|
|
|
628
830
|
},
|
|
629
831
|
title: {
|
|
630
832
|
type: String,
|
|
631
|
-
default:
|
|
833
|
+
default: c("common.正在识别文件类型")
|
|
632
834
|
},
|
|
633
835
|
desc: {
|
|
634
836
|
type: String,
|
|
635
|
-
default:
|
|
837
|
+
default: c("common.请稍候,识别完成后将自动预览或下载")
|
|
636
838
|
},
|
|
637
839
|
spinning: {
|
|
638
840
|
type: Boolean,
|
|
@@ -640,24 +842,24 @@ const je = _({
|
|
|
640
842
|
}
|
|
641
843
|
},
|
|
642
844
|
setup(e) {
|
|
643
|
-
const t =
|
|
644
|
-
() =>
|
|
645
|
-
),
|
|
845
|
+
const t = x(
|
|
846
|
+
() => F(e.options.url, e.options.name)
|
|
847
|
+
), n = x(() => ({
|
|
646
848
|
zIndex: e.options.zIndex ?? 3e3
|
|
647
849
|
}));
|
|
648
850
|
function o() {
|
|
649
851
|
e.options.onClose?.(), e.onDestroy();
|
|
650
852
|
}
|
|
651
|
-
function
|
|
652
|
-
|
|
853
|
+
function a(s) {
|
|
854
|
+
s.key === "Escape" && e.options.closeOnPressEscape !== !1 && o();
|
|
653
855
|
}
|
|
654
|
-
return
|
|
655
|
-
document.addEventListener("keydown",
|
|
656
|
-
}),
|
|
657
|
-
document.removeEventListener("keydown",
|
|
856
|
+
return V(() => {
|
|
857
|
+
document.addEventListener("keydown", a), document.body.classList.add("jt-attachment-preview-service-lock");
|
|
858
|
+
}), G(() => {
|
|
859
|
+
document.removeEventListener("keydown", a), document.body.classList.remove("jt-attachment-preview-service-lock");
|
|
658
860
|
}), () => r(
|
|
659
861
|
"div",
|
|
660
|
-
{ class: "jt-attachment-preview-service", style:
|
|
862
|
+
{ class: "jt-attachment-preview-service", style: n.value },
|
|
661
863
|
[
|
|
662
864
|
r("div", { class: "jt-attachment-preview-service__modal" }, [
|
|
663
865
|
r("div", { class: "jt-attachment-preview-service__header" }, [
|
|
@@ -678,7 +880,7 @@ const je = _({
|
|
|
678
880
|
{
|
|
679
881
|
class: "jt-attachment-preview-service__close",
|
|
680
882
|
type: "button",
|
|
681
|
-
"aria-label":
|
|
883
|
+
"aria-label": c("common.关闭"),
|
|
682
884
|
onClick: o
|
|
683
885
|
},
|
|
684
886
|
"×"
|
|
@@ -708,36 +910,54 @@ const je = _({
|
|
|
708
910
|
);
|
|
709
911
|
}
|
|
710
912
|
});
|
|
711
|
-
function
|
|
913
|
+
function Ue(e) {
|
|
712
914
|
return e.type === "empty" ? r(
|
|
713
915
|
"div",
|
|
714
916
|
{ class: "jt-attachment-preview-service__empty" },
|
|
715
|
-
|
|
716
|
-
) : e.type === "image" ? r(
|
|
917
|
+
c("common.暂无附件")
|
|
918
|
+
) : e.type === "image" ? r(Ie, {
|
|
717
919
|
url: e.url,
|
|
718
920
|
name: e.name,
|
|
719
921
|
downloadName: e.downloadName,
|
|
720
922
|
downloadable: e.downloadable,
|
|
721
923
|
onPreviewLoad: e.onLoad,
|
|
722
924
|
onPreviewError: e.onError
|
|
723
|
-
}) : e.type === "
|
|
925
|
+
}) : e.type === "video" ? r("video", {
|
|
926
|
+
class: "jt-attachment-preview-service__media",
|
|
927
|
+
src: e.url,
|
|
928
|
+
controls: !0,
|
|
929
|
+
onLoadeddata: e.onLoad,
|
|
930
|
+
onError: e.onError
|
|
931
|
+
}) : e.type === "audio" ? r("audio", {
|
|
932
|
+
class: "jt-attachment-preview-service__audio",
|
|
933
|
+
src: e.url,
|
|
934
|
+
controls: !0,
|
|
935
|
+
onLoadeddata: e.onLoad,
|
|
936
|
+
onError: e.onError
|
|
937
|
+
}) : e.type === "pdf" ? r(Ye, {
|
|
724
938
|
url: e.url,
|
|
725
939
|
name: e.name,
|
|
726
940
|
downloadName: e.downloadName,
|
|
727
941
|
downloadable: e.downloadable,
|
|
728
942
|
onPreviewLoad: e.onLoad,
|
|
729
943
|
onPreviewError: e.onError
|
|
944
|
+
}) : e.type === "iframe" ? r("iframe", {
|
|
945
|
+
class: "jt-attachment-preview-service__iframe",
|
|
946
|
+
src: e.url,
|
|
947
|
+
title: e.name,
|
|
948
|
+
sandbox: e.sandbox || void 0,
|
|
949
|
+
onLoad: e.onLoad
|
|
730
950
|
}) : r("div", { class: "jt-attachment-preview-service__unsupported" }, [
|
|
731
951
|
r("div", { class: "jt-attachment-preview-service__file-card" }, [
|
|
732
952
|
r(
|
|
733
953
|
"div",
|
|
734
954
|
{ class: "jt-attachment-preview-service__file-icon" },
|
|
735
|
-
|
|
955
|
+
e.iconText
|
|
736
956
|
),
|
|
737
957
|
r(
|
|
738
958
|
"div",
|
|
739
959
|
{ class: "jt-attachment-preview-service__unsupported-text" },
|
|
740
|
-
|
|
960
|
+
c("common.暂不支持预览此类型的文件")
|
|
741
961
|
)
|
|
742
962
|
]),
|
|
743
963
|
r(
|
|
@@ -748,161 +968,153 @@ function Be(e) {
|
|
|
748
968
|
},
|
|
749
969
|
e.name
|
|
750
970
|
),
|
|
751
|
-
e.downloadable ?
|
|
971
|
+
e.downloadable ? ie(
|
|
752
972
|
e.sourceOptions,
|
|
753
973
|
e.downloadName,
|
|
754
974
|
"jt-attachment-preview-service__primary-download"
|
|
755
975
|
) : null
|
|
756
976
|
]);
|
|
757
977
|
}
|
|
758
|
-
function
|
|
978
|
+
function se(e) {
|
|
759
979
|
if (typeof document > "u")
|
|
760
980
|
return { close: () => {
|
|
761
981
|
} };
|
|
762
|
-
|
|
982
|
+
f("open-called", {
|
|
763
983
|
rawOptions: typeof e == "string" ? e : { ...e }
|
|
764
|
-
}),
|
|
765
|
-
const t =
|
|
984
|
+
}), E?.close();
|
|
985
|
+
const t = xe(
|
|
766
986
|
e
|
|
767
|
-
),
|
|
768
|
-
let o = !1,
|
|
769
|
-
const
|
|
770
|
-
o = !0,
|
|
987
|
+
), n = t.downloadName || F(t.url, t.name);
|
|
988
|
+
let o = !1, a = null, s = null;
|
|
989
|
+
const u = () => {
|
|
990
|
+
o = !0, a && (j(null, a), a.remove(), a = null), s && (URL.revokeObjectURL(s), s = null), E?.close === u && (E = null);
|
|
771
991
|
};
|
|
772
992
|
function i() {
|
|
773
|
-
o || (
|
|
774
|
-
r(
|
|
993
|
+
o || (a || (a = document.createElement("div"), document.body.appendChild(a)), j(
|
|
994
|
+
r(Oe, {
|
|
775
995
|
options: t,
|
|
776
|
-
onDestroy:
|
|
996
|
+
onDestroy: u
|
|
777
997
|
}),
|
|
778
|
-
|
|
998
|
+
a
|
|
779
999
|
));
|
|
780
1000
|
}
|
|
781
|
-
function
|
|
782
|
-
o || (
|
|
783
|
-
r(
|
|
1001
|
+
function p() {
|
|
1002
|
+
o || (a || (a = document.createElement("div"), document.body.appendChild(a)), j(
|
|
1003
|
+
r(I, {
|
|
784
1004
|
options: t,
|
|
785
|
-
onDestroy:
|
|
1005
|
+
onDestroy: u
|
|
786
1006
|
}),
|
|
787
|
-
|
|
1007
|
+
a
|
|
788
1008
|
));
|
|
789
1009
|
}
|
|
790
|
-
function
|
|
791
|
-
|
|
1010
|
+
function v() {
|
|
1011
|
+
a && (j(null, a), a.remove(), a = null);
|
|
792
1012
|
}
|
|
793
|
-
function
|
|
794
|
-
o ||
|
|
1013
|
+
function w() {
|
|
1014
|
+
o || ce(t, n, {
|
|
795
1015
|
fallbackToRawUrl: !0
|
|
796
1016
|
});
|
|
797
1017
|
}
|
|
798
|
-
const
|
|
799
|
-
return
|
|
800
|
-
resolvedType:
|
|
1018
|
+
const A = re(t);
|
|
1019
|
+
return f("type-resolved", {
|
|
1020
|
+
resolvedType: A,
|
|
801
1021
|
url: t.url,
|
|
802
1022
|
name: t.name,
|
|
803
1023
|
mode: t.mode,
|
|
804
1024
|
mimeType: t.mimeType,
|
|
805
1025
|
extension: t.extension
|
|
806
|
-
}),
|
|
1026
|
+
}), W(A) ? i() : A === "unknown" ? (p(), Ce(t.url).then(async (h) => {
|
|
807
1027
|
if (!o) {
|
|
808
|
-
if (
|
|
809
|
-
t.mode =
|
|
1028
|
+
if (W(h)) {
|
|
1029
|
+
t.mode = h, i();
|
|
810
1030
|
return;
|
|
811
1031
|
}
|
|
812
1032
|
try {
|
|
813
|
-
const
|
|
814
|
-
if (
|
|
815
|
-
|
|
1033
|
+
const C = await oe(t.url), _ = X(C.type);
|
|
1034
|
+
if (W(_)) {
|
|
1035
|
+
s = URL.createObjectURL(C), t.url = s, t.mode = _, i();
|
|
816
1036
|
return;
|
|
817
1037
|
}
|
|
818
|
-
|
|
1038
|
+
v(), $(C, n);
|
|
819
1039
|
} catch {
|
|
820
|
-
|
|
1040
|
+
v(), w();
|
|
821
1041
|
}
|
|
822
1042
|
}
|
|
823
|
-
})) :
|
|
1043
|
+
})) : w(), E = { close: u }, E;
|
|
824
1044
|
}
|
|
825
|
-
function
|
|
826
|
-
|
|
827
|
-
p = null, B = e;
|
|
828
|
-
return;
|
|
829
|
-
}
|
|
830
|
-
p = e, B = async (t) => {
|
|
831
|
-
const a = await p.request(t);
|
|
832
|
-
return p.mapResponse(a, t);
|
|
833
|
-
};
|
|
1045
|
+
function Je(e) {
|
|
1046
|
+
D = e;
|
|
834
1047
|
}
|
|
835
|
-
function
|
|
1048
|
+
function qe(e) {
|
|
836
1049
|
if (typeof document > "u")
|
|
837
1050
|
return { close: () => {
|
|
838
1051
|
} };
|
|
839
|
-
|
|
840
|
-
let t = !1,
|
|
841
|
-
document.body.appendChild(
|
|
1052
|
+
E?.close();
|
|
1053
|
+
let t = !1, n = document.createElement("div");
|
|
1054
|
+
document.body.appendChild(n);
|
|
842
1055
|
const o = () => {
|
|
843
|
-
t = !0,
|
|
844
|
-
},
|
|
845
|
-
return
|
|
846
|
-
r(
|
|
847
|
-
options: { url: "", name:
|
|
848
|
-
title:
|
|
849
|
-
desc:
|
|
1056
|
+
t = !0, n && (j(null, n), n.remove(), n = null), E?.close === o && (E = null);
|
|
1057
|
+
}, a = { close: o };
|
|
1058
|
+
return E = a, D ? (j(
|
|
1059
|
+
r(I, {
|
|
1060
|
+
options: { url: "", name: c("common.附件预览") },
|
|
1061
|
+
title: c("common.正在获取文件信息"),
|
|
1062
|
+
desc: c("common.请稍候,获取完成后将自动预览或下载"),
|
|
850
1063
|
spinning: !0,
|
|
851
1064
|
onDestroy: o
|
|
852
1065
|
}),
|
|
853
|
-
|
|
854
|
-
),
|
|
855
|
-
if (
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
V({
|
|
870
|
-
...c,
|
|
871
|
-
requestParams: e,
|
|
872
|
-
useRegisteredDownload: !0
|
|
873
|
-
});
|
|
1066
|
+
n
|
|
1067
|
+
), D.request(e).then((s) => {
|
|
1068
|
+
if (t) return;
|
|
1069
|
+
const u = D?.mapResponse(s, e);
|
|
1070
|
+
if (!u?.url) {
|
|
1071
|
+
j(
|
|
1072
|
+
r(I, {
|
|
1073
|
+
options: { url: "", name: c("common.附件预览") },
|
|
1074
|
+
title: c("common.文件信息缺少URL"),
|
|
1075
|
+
desc: c("common.请检查mapResponse是否返回了url字段"),
|
|
1076
|
+
spinning: !1,
|
|
1077
|
+
onDestroy: o
|
|
1078
|
+
}),
|
|
1079
|
+
n
|
|
1080
|
+
);
|
|
1081
|
+
return;
|
|
874
1082
|
}
|
|
875
|
-
|
|
1083
|
+
se({
|
|
1084
|
+
...u,
|
|
1085
|
+
requestParams: e,
|
|
1086
|
+
useRegisteredDownload: !0
|
|
1087
|
+
});
|
|
1088
|
+
}).catch((s) => {
|
|
876
1089
|
if (t) return;
|
|
877
|
-
const
|
|
878
|
-
|
|
879
|
-
r(
|
|
880
|
-
options: { url: "", name:
|
|
881
|
-
title:
|
|
882
|
-
desc:
|
|
1090
|
+
const u = s instanceof Error ? s.message : c("common.接口请求失败");
|
|
1091
|
+
j(
|
|
1092
|
+
r(I, {
|
|
1093
|
+
options: { url: "", name: c("common.附件预览") },
|
|
1094
|
+
title: c("common.文件信息获取失败"),
|
|
1095
|
+
desc: u,
|
|
883
1096
|
spinning: !1,
|
|
884
1097
|
onDestroy: o
|
|
885
1098
|
}),
|
|
886
|
-
|
|
1099
|
+
n
|
|
887
1100
|
);
|
|
888
|
-
}),
|
|
889
|
-
r(
|
|
890
|
-
options: { url: "", name:
|
|
891
|
-
title:
|
|
892
|
-
desc:
|
|
1101
|
+
}), a) : (j(
|
|
1102
|
+
r(I, {
|
|
1103
|
+
options: { url: "", name: c("common.附件预览") },
|
|
1104
|
+
title: c("common.附件预览未初始化"),
|
|
1105
|
+
desc: c("common.请先调用setupJtAttachmentPreview注册请求配置"),
|
|
893
1106
|
spinning: !1,
|
|
894
1107
|
onDestroy: o
|
|
895
1108
|
}),
|
|
896
|
-
|
|
897
|
-
),
|
|
1109
|
+
n
|
|
1110
|
+
), a);
|
|
898
1111
|
}
|
|
899
|
-
const
|
|
900
|
-
openByParams:
|
|
901
|
-
setup:
|
|
1112
|
+
const ze = Object.assign(se, {
|
|
1113
|
+
openByParams: qe,
|
|
1114
|
+
setup: Je
|
|
902
1115
|
});
|
|
903
|
-
globalThis.__JT_ATTACHMENT_PREVIEW_SERVICE__ = Ce;
|
|
904
1116
|
export {
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
1117
|
+
ze as JtAttachmentPreview,
|
|
1118
|
+
qe as JtAttachmentPreviewByParams,
|
|
1119
|
+
Je as setupJtAttachmentPreview
|
|
908
1120
|
};
|