@lingshugroup/web-plus 1.0.36 → 1.0.38
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 +1 -1
- package/lib/index.css +1 -1
- package/lib/index.css.br +0 -0
- package/lib/index.css.gz +0 -0
- package/lib/packages/ls-components/components/descriptions/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/descriptions/Index.vue/index.js +1 -1
- package/lib/packages/ls-components/components/descriptions/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/descriptions/Index.vue/index2.js +62 -60
- package/lib/packages/ls-components/components/descriptions/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/descriptions/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_docx/Docx.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_docx/Docx.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js +42 -42
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_image/Image.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Image.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js +159 -149
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_image/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js +44 -44
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index.js +4 -4
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js +38 -38
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_pdf/composable/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/composable/index.js +43 -43
- package/lib/packages/ls-components/components/preview_pdf/composable/index.js.br +0 -0
- package/lib/packages/ls-components/components/preview_pdf/composable/index.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_pdf/pdfs/Annotation.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/pdfs/Annotation.vue/index.js +20 -20
- package/lib/packages/ls-components/components/preview_pdf/pdfs/Annotation.vue/index.js.br +0 -0
- package/lib/packages/ls-components/components/preview_pdf/pdfs/Annotation.vue/index.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_pdf/pdfs/PdfItem.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/pdfs/PdfItem.vue/index.js +37 -37
- package/lib/packages/ls-components/components/preview_pdf/pdfs/PdfItem.vue/index.js.br +0 -0
- package/lib/packages/ls-components/components/preview_pdf/pdfs/PdfItem.vue/index.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_pdf/pdfs/Text.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/pdfs/Text.vue/index.js +12 -12
- package/lib/packages/ls-components/components/preview_pdf/pdfs/Text.vue/index.js.br +0 -0
- package/lib/packages/ls-components/components/preview_pdf/pdfs/Text.vue/index.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_pdf/pdfs/XFA.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/pdfs/XFA.vue/index.js +6 -6
- package/lib/packages/ls-components/components/preview_pdf/pdfs/XFA.vue/index.js.br +0 -0
- package/lib/packages/ls-components/components/preview_pdf/pdfs/XFA.vue/index.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index.js +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js +41 -41
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js.gz +0 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Q = Object.defineProperty;
|
|
2
2
|
var a = (x, k) => Q(x, "name", { value: k, configurable: !0 });
|
|
3
|
-
import { defineComponent as R, watch as E, ref as
|
|
4
|
-
import
|
|
3
|
+
import { defineComponent as R, watch as E, ref as b, computed as A, openBlock as S, createElementBlock as U, createElementVNode as V, createBlock as B, mergeProps as T, unref as f, createCommentVNode as F, createVNode as Y, withDirectives as Z, renderSlot as tt, vShow as et, toRaw as ot } from "vue";
|
|
4
|
+
import { AnnotationMode as N } from "pdfjs-dist";
|
|
5
5
|
import nt from "../Annotation.vue/index.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import at from "../Text.vue/index.js";
|
|
@@ -10,7 +10,7 @@ import it from "../XFA.vue/index.js";
|
|
|
10
10
|
import rt from "../../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
|
|
11
11
|
const lt = R({
|
|
12
12
|
name: "LSPdf"
|
|
13
|
-
}),
|
|
13
|
+
}), yt = /* @__PURE__ */ R({
|
|
14
14
|
...lt,
|
|
15
15
|
props: {
|
|
16
16
|
pdf: {},
|
|
@@ -38,26 +38,26 @@ const lt = R({
|
|
|
38
38
|
E(
|
|
39
39
|
() => o.pdf,
|
|
40
40
|
() => {
|
|
41
|
-
|
|
41
|
+
G();
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
immediate: !0,
|
|
45
45
|
deep: !0
|
|
46
46
|
}
|
|
47
47
|
);
|
|
48
|
-
const p =
|
|
48
|
+
const p = b(), m = b(), L = b(!1);
|
|
49
49
|
let y;
|
|
50
|
-
const s =
|
|
50
|
+
const s = A(() => ({
|
|
51
51
|
viewport: void 0,
|
|
52
52
|
document: void 0,
|
|
53
53
|
page: void 0
|
|
54
|
-
})), O =
|
|
54
|
+
})), O = A(() => ({
|
|
55
55
|
annotationsMap: o.annotationsMap,
|
|
56
56
|
annotationsFilter: o.annotationsFilter,
|
|
57
57
|
imageResourcesPath: o.imageResourcesPath,
|
|
58
58
|
hideForms: o.hideForms,
|
|
59
59
|
intent: o.intent
|
|
60
|
-
})), D =
|
|
60
|
+
})), D = A(() => ({
|
|
61
61
|
highlightText: o.highlightText,
|
|
62
62
|
highlightOptions: o.highlightOptions
|
|
63
63
|
}));
|
|
@@ -75,12 +75,12 @@ const lt = R({
|
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
a(z, "getWatermarkOptionsWithDefaults");
|
|
78
|
-
function
|
|
78
|
+
function P(n) {
|
|
79
79
|
if (!(typeof n == "number" && n % 90 === 0)) return 0;
|
|
80
80
|
const t = n / 90;
|
|
81
|
-
return t > 4 ?
|
|
81
|
+
return t > 4 ? P(n - 360) : t < 0 ? P(n + 360) : n;
|
|
82
82
|
}
|
|
83
|
-
a(
|
|
83
|
+
a(P, "getRotation");
|
|
84
84
|
function H(n) {
|
|
85
85
|
let t = o.scale;
|
|
86
86
|
if (o.fitParent) {
|
|
@@ -105,8 +105,8 @@ const lt = R({
|
|
|
105
105
|
const i = z(), c = o.watermarkText, r = i.columns, u = i.rows, d = r * u, g = i.rotation, v = i.fontSize * n;
|
|
106
106
|
e.font = `${v}px Trebuchet MS`, e.fillStyle = i.color;
|
|
107
107
|
for (let h = 0; h < d; h++) {
|
|
108
|
-
const w = h % r * (t.width / r) + t.width / (r * 2),
|
|
109
|
-
e.save(), e.translate(w,
|
|
108
|
+
const w = h % r * (t.width / r) + t.width / (r * 2), J = Math.floor(h / r) * (t.height / u) + t.height / (u * 2), K = e.measureText(c).width;
|
|
109
|
+
e.save(), e.translate(w, J), e.rotate(-g * (Math.PI / 180)), e.fillText(c, -K / 2, v / 2), e.restore();
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
a(_, "paintWatermark");
|
|
@@ -124,7 +124,7 @@ const lt = R({
|
|
|
124
124
|
const e = M();
|
|
125
125
|
e && (e == null ? void 0 : e.getAttribute("role")) === "main" ? t = e : (t = document.createElement("canvas"), t.style.display = "block", t.setAttribute("dir", "ltr"));
|
|
126
126
|
const i = window.devicePixelRatio || 1;
|
|
127
|
-
return t.width = Math.floor(n.width * i), t.height = Math.floor(n.height * i), t.style.width = `${Math.floor(n.width)}px`, t.style.height = `${Math.floor(n.height)}px`, t.setAttribute("class", "pdf-canvas"), (c = p.value) == null || c.style.setProperty("--scale-factor", `${n.scale}`), m.value.style.width = `${Math.floor(n.width)}px`, m.value.style.height = `${Math.floor(n.height)}px`, m.value.style.top = "0", m.value.style.left = "0",
|
|
127
|
+
return t.width = Math.floor(n.width * i), t.height = Math.floor(n.height * i), t.style.width = `${Math.floor(n.width)}px`, t.style.height = `${Math.floor(n.height)}px`, t.setAttribute("class", "pdf-canvas"), (c = p.value) == null || c.style.setProperty("--scale-factor", `${n.scale}`), m.value.style.width = `${Math.floor(n.width)}px`, m.value.style.height = `${Math.floor(n.height)}px`, m.value.style.top = "0", m.value.style.left = "0", L.value = !0, t;
|
|
128
128
|
}
|
|
129
129
|
a(I, "setupCanvas");
|
|
130
130
|
function $() {
|
|
@@ -138,84 +138,84 @@ const lt = R({
|
|
|
138
138
|
$();
|
|
139
139
|
const i = e.getViewport(), c = {
|
|
140
140
|
scale: H(e),
|
|
141
|
-
rotation:
|
|
141
|
+
rotation: P((o.rotation || 0) + i.rotation)
|
|
142
142
|
}, r = e.getViewport(c), u = M(), d = I(r), g = window.devicePixelRatio || 1, v = g !== 1 ? [g, 0, 0, g, 0, 0] : void 0, h = {
|
|
143
143
|
canvasContext: d.getContext("2d"),
|
|
144
144
|
viewport: r,
|
|
145
|
-
annotationMode: o.hideForms ? N.
|
|
145
|
+
annotationMode: o.hideForms ? N.ENABLE : N.ENABLE_FORMS,
|
|
146
146
|
transform: v,
|
|
147
147
|
intent: o.intent
|
|
148
148
|
};
|
|
149
149
|
(d == null ? void 0 : d.getAttribute("role")) !== "main" ? u && ((w = p.value) == null || w.replaceChild(d, u)) : d.removeAttribute("role"), s.value.page = e, s.value.viewport = r, y = e.render(h), y.promise.then(() => {
|
|
150
|
-
|
|
150
|
+
L.value = !1, _(r.scale), l("loaded", s.value.viewport), l("loadComplete");
|
|
151
151
|
}).catch(() => {
|
|
152
152
|
l("loadError");
|
|
153
153
|
});
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
a(C, "renderPage");
|
|
157
|
-
function
|
|
157
|
+
function X(n) {
|
|
158
158
|
n.promise && n.promise.then(async (t) => {
|
|
159
159
|
s.value.document = t, C(o.page);
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
|
-
a(
|
|
162
|
+
a(X, "initDoc"), E(
|
|
163
163
|
() => [o.page, o.scale, o.width, o.height, o.rotation, o.hideForms, o.intent],
|
|
164
164
|
() => {
|
|
165
165
|
C(o.page);
|
|
166
166
|
}
|
|
167
167
|
);
|
|
168
|
-
function
|
|
168
|
+
function j() {
|
|
169
169
|
C(o.page);
|
|
170
170
|
}
|
|
171
|
-
a(
|
|
172
|
-
function
|
|
171
|
+
a(j, "reload");
|
|
172
|
+
function q() {
|
|
173
173
|
$();
|
|
174
174
|
}
|
|
175
|
-
a(
|
|
176
|
-
async function
|
|
175
|
+
a(q, "cancel");
|
|
176
|
+
async function G() {
|
|
177
177
|
if (o.pdf)
|
|
178
178
|
try {
|
|
179
|
-
|
|
179
|
+
X(o.pdf);
|
|
180
180
|
} finally {
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
return a(
|
|
184
|
-
reload:
|
|
185
|
-
cancel:
|
|
186
|
-
}), (n, t) => (
|
|
183
|
+
return a(G, "initPdf"), k({
|
|
184
|
+
reload: j,
|
|
185
|
+
cancel: q
|
|
186
|
+
}), (n, t) => (S(), U("div", {
|
|
187
187
|
ref_key: "container",
|
|
188
188
|
ref: p,
|
|
189
189
|
style: { position: "relative", display: "block" }
|
|
190
190
|
}, [
|
|
191
|
-
t[5] || (t[5] =
|
|
191
|
+
t[5] || (t[5] = V("canvas", {
|
|
192
192
|
dir: "ltr",
|
|
193
193
|
style: { display: "block" },
|
|
194
194
|
role: "main"
|
|
195
195
|
}, null, -1)),
|
|
196
|
-
n.annotationLayer ? (
|
|
196
|
+
n.annotationLayer ? (S(), B(nt, T({ key: 0 }, { ...f(s), ...f(O) }, {
|
|
197
197
|
onAnnotation: t[0] || (t[0] = (e) => l("annotation", e)),
|
|
198
198
|
onAnnotationLoaded: t[1] || (t[1] = (e) => l("annotationLoaded", e))
|
|
199
|
-
}), null, 16)) :
|
|
200
|
-
n.textLayer ? (
|
|
199
|
+
}), null, 16)) : F("", !0),
|
|
200
|
+
n.textLayer ? (S(), B(at, T({ key: 1 }, { ...f(s), ...f(D) }, {
|
|
201
201
|
onHighlight: t[2] || (t[2] = (e) => l("highlight", e)),
|
|
202
202
|
onTextLoaded: t[3] || (t[3] = (e) => l("textLoaded", e))
|
|
203
|
-
}), null, 16)) :
|
|
203
|
+
}), null, 16)) : F("", !0),
|
|
204
204
|
Y(it, T({ ...f(s) }, {
|
|
205
205
|
onXfaLoaded: t[4] || (t[4] = (e) => l("xfaLoaded"))
|
|
206
206
|
}), null, 16),
|
|
207
|
-
Z(
|
|
207
|
+
Z(V("div", {
|
|
208
208
|
ref_key: "loadingLayer",
|
|
209
209
|
ref: m,
|
|
210
210
|
style: { position: "absolute" }
|
|
211
211
|
}, [
|
|
212
212
|
tt(n.$slots, "default")
|
|
213
213
|
], 512), [
|
|
214
|
-
[et, f(
|
|
214
|
+
[et, f(L)]
|
|
215
215
|
])
|
|
216
216
|
], 512));
|
|
217
217
|
}
|
|
218
218
|
});
|
|
219
219
|
export {
|
|
220
|
-
|
|
220
|
+
yt as default
|
|
221
221
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _=Object.defineProperty;var
|
|
1
|
+
"use strict";var _=Object.defineProperty;var s=(u,g)=>_(u,"name",{value:g,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("vue"),L=require("pdfjs-dist"),f=require("../highlight/index.cjs"),O=require("../../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.cjs"),D=i.defineComponent({__name:"Text",props:{page:{},viewport:{},highlightText:{},highlightOptions:{}},emits:["highlight","textLoaded"],setup(u,{emit:g}){const e=u,p=g,r=i.ref(),a=i.ref();let l=[];function w(){return O.default({},{ignoreCase:!0,completeWords:!1},e.highlightOptions)}s(w,"getHighlightOptionsWithDefaults");async function v(t=!1){const n=e.page,o=await(n==null?void 0:n.getTextContent());if(o&&(t&&f.resetDivs(o,l),e.highlightText)){const h=typeof e.highlightText=="string"?[e.highlightText]:e.highlightText,c=f.findMatches(h,o,w());f.highlightMatches(c,o,l),p("highlight",{matches:c,textContent:o,textDivs:l,page:(n==null?void 0:n.pageNumber)||1})}}s(v,"findAndHighlight");function x(){var c,m;(m=(c=r.value).replaceChildren)==null||m.call(c);const t=e.page,n=e.viewport,o=t==null?void 0:t.streamTextContent({includeMarkedContent:!0,disableNormalization:!0}),h=new L.TextLayer({container:r.value,textContentSource:o,viewport:n});h.render().then(async()=>{var C;l=h.textDivs;const M=await(t==null?void 0:t.getTextContent());p("textLoaded",{textDivs:l,textContent:M});const d=document.createElement("div");d.className="endOfContent",(C=r.value)==null||C.appendChild(d),a.value=d,v()})}s(x,"render");function y(){a.value&&a.value.classList.add("active")}s(y,"onMouseDown");function T(){a.value&&a.value.classList.remove("active")}return s(T,"onMouseUp"),i.watch(()=>e.viewport,()=>{e.page&&e.viewport&&r.value&&x()}),i.watch(()=>[e.highlightText,e.highlightOptions],()=>{v(!0)},{deep:!0}),i.onMounted(()=>{e.page&&e.viewport&&r.value&&x()}),(t,n)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"layer",ref:r,class:"textLayer",style:{display:"block"},onMousedown:y,onMouseup:T},null,544))}});exports.default=D;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var L = Object.defineProperty;
|
|
2
2
|
var r = (c, u) => L(c, "name", { value: u, configurable: !0 });
|
|
3
|
-
import { defineComponent as _, ref as x, watch as C, onMounted as
|
|
4
|
-
import
|
|
5
|
-
import { resetDivs as N, findMatches as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
3
|
+
import { defineComponent as _, ref as x, watch as C, onMounted as O, openBlock as k, createElementBlock as D } from "vue";
|
|
4
|
+
import { TextLayer as b } from "pdfjs-dist";
|
|
5
|
+
import { resetDivs as N, findMatches as B, highlightMatches as E } from "../highlight/index.js";
|
|
6
|
+
import H from "../../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
|
|
7
|
+
const U = /* @__PURE__ */ _({
|
|
8
8
|
__name: "Text",
|
|
9
9
|
props: {
|
|
10
10
|
page: {},
|
|
@@ -17,7 +17,7 @@ const A = /* @__PURE__ */ _({
|
|
|
17
17
|
const t = c, p = u, o = x(), s = x();
|
|
18
18
|
let a = [];
|
|
19
19
|
function w() {
|
|
20
|
-
return
|
|
20
|
+
return H(
|
|
21
21
|
{},
|
|
22
22
|
{
|
|
23
23
|
ignoreCase: !0,
|
|
@@ -30,8 +30,8 @@ const A = /* @__PURE__ */ _({
|
|
|
30
30
|
async function d(e = !1) {
|
|
31
31
|
const n = t.page, i = await (n == null ? void 0 : n.getTextContent());
|
|
32
32
|
if (i && (e && N(i, a), t.highlightText)) {
|
|
33
|
-
const h = typeof t.highlightText == "string" ? [t.highlightText] : t.highlightText, l =
|
|
34
|
-
|
|
33
|
+
const h = typeof t.highlightText == "string" ? [t.highlightText] : t.highlightText, l = B(h, i, w());
|
|
34
|
+
E(l, i, a), p("highlight", {
|
|
35
35
|
matches: l,
|
|
36
36
|
textContent: i,
|
|
37
37
|
textDivs: a,
|
|
@@ -43,7 +43,7 @@ const A = /* @__PURE__ */ _({
|
|
|
43
43
|
function f() {
|
|
44
44
|
var l, m;
|
|
45
45
|
(m = (l = o.value).replaceChildren) == null || m.call(l);
|
|
46
|
-
const e = t.page, n = t.viewport, i = e == null ? void 0 : e.streamTextContent({ includeMarkedContent: !0, disableNormalization: !0 }), h = new b
|
|
46
|
+
const e = t.page, n = t.viewport, i = e == null ? void 0 : e.streamTextContent({ includeMarkedContent: !0, disableNormalization: !0 }), h = new b({ container: o.value, textContentSource: i, viewport: n });
|
|
47
47
|
h.render().then(async () => {
|
|
48
48
|
var v;
|
|
49
49
|
a = h.textDivs;
|
|
@@ -72,9 +72,9 @@ const A = /* @__PURE__ */ _({
|
|
|
72
72
|
d(!0);
|
|
73
73
|
},
|
|
74
74
|
{ deep: !0 }
|
|
75
|
-
),
|
|
75
|
+
), O(() => {
|
|
76
76
|
t.page && t.viewport && o.value && f();
|
|
77
|
-
}), (e, n) => (
|
|
77
|
+
}), (e, n) => (k(), D("div", {
|
|
78
78
|
ref_key: "layer",
|
|
79
79
|
ref: o,
|
|
80
80
|
class: "textLayer",
|
|
@@ -85,5 +85,5 @@ const A = /* @__PURE__ */ _({
|
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
87
|
export {
|
|
88
|
-
|
|
88
|
+
U as default
|
|
89
89
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var m=Object.defineProperty;var
|
|
1
|
+
"use strict";var m=Object.defineProperty;var u=(r,a)=>m(r,"name",{value:a,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),w=require("pdfjs-dist"),g=require("../linkService/index.cjs"),S=t.defineComponent({__name:"XFA",props:{page:{},document:{},viewport:{}},emits:["xfaLoaded"],setup(r,{emit:a}){const e=r,p=a,o=t.ref();async function i(){var l,s;(s=(l=o.value).replaceChildren)==null||s.call(l);const n=t.toRaw(e.document),c=e.page,v=e.viewport;if(n.isPureXfa){const d=await c.getXfa(),f={div:o.value,viewport:v.clone({dontFlip:!0}),linkService:new g.SimpleLinkService,annotationStorage:n==null?void 0:n.annotationStorage,xfaHtml:d};w.XfaLayer.render(f),p("xfaLoaded")}}return u(i,"render"),t.watch(()=>e.viewport,()=>{e.page&&e.viewport&&o.value&&i()}),t.onMounted(()=>{e.page&&e.viewport&&o.value&&i()}),(n,c)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"layer",ref:o,style:{display:"block"}},null,512))}});exports.default=S;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var u = Object.defineProperty;
|
|
2
2
|
var l = (a, r) => u(a, "name", { value: r, configurable: !0 });
|
|
3
3
|
import { defineComponent as v, ref as w, watch as g, onMounted as y, openBlock as _, createElementBlock as k, toRaw as x } from "vue";
|
|
4
|
-
import
|
|
5
|
-
import { SimpleLinkService as
|
|
6
|
-
const
|
|
4
|
+
import { XfaLayer as L } from "pdfjs-dist";
|
|
5
|
+
import { SimpleLinkService as S } from "../linkService/index.js";
|
|
6
|
+
const F = /* @__PURE__ */ v({
|
|
7
7
|
__name: "XFA",
|
|
8
8
|
props: {
|
|
9
9
|
page: {},
|
|
@@ -21,11 +21,11 @@ const B = /* @__PURE__ */ v({
|
|
|
21
21
|
const m = await i.getXfa(), d = {
|
|
22
22
|
div: t.value,
|
|
23
23
|
viewport: f.clone({ dontFlip: !0 }),
|
|
24
|
-
linkService: new
|
|
24
|
+
linkService: new S(),
|
|
25
25
|
annotationStorage: o == null ? void 0 : o.annotationStorage,
|
|
26
26
|
xfaHtml: m
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
L.render(d), s("xfaLoaded");
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
return l(n, "render"), g(
|
|
@@ -43,5 +43,5 @@ const B = /* @__PURE__ */ v({
|
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
export {
|
|
46
|
-
|
|
46
|
+
F as default
|
|
47
47
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-78a6f94e"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-78a6f94e"]]);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var L=Object.defineProperty;var n=(s,u)=>L(s,"name",{value:u,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=,/* empty css */f=,/* empty css */M=,/* empty css */E=require("element-plus");;/* empty css */;/* empty css */;/* empty css */const P=,/* empty css */_=,/* empty css */S=e.defineComponent({name:"LSPreviewXlsx"}),w=e.defineComponent({...S,name:"LSPreviewXlsx",components:{LSXlsx:f.default},inheritAttrs:!1,props:e.mergeModels(M.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(s,{emit:u}){const i=u,o=s,{zoomSize:p}=e.toRefs(o),r=e.useModel(s,"modelValue"),d=e.reactive({zoomSize:p,source:""}),v=C.useNamespace("preview").b(),c=e.ref();let l=null;e.watch(()=>r==null?void 0:r.value,t=>{t&&m()},{immediate:!0,deep:!0}),e.watch(()=>o.source,t=>{d.source=t},{immediate:!0,deep:!0});function m(){o.needLoading&&(c.value=E.ElLoading.service(o.loadingOption)),l=setTimeout(()=>{o.source||(P.ElMessage.error("文件加载超时,请检查文件是否存在!"),a(),r.value=!1),clearTimeout(l)},6e3)}n(m,"openLoading");const a=n(()=>{l&&clearTimeout(l),o.needLoading&&c.value&&c.value.close()},"closeLoading"),g=n(()=>{a(),i("loadComplete")},"loadComplete"),q=n(()=>{a(),i("loadError")},"loadError");return e.onBeforeMount(()=>{r.value&&m()}),e.onBeforeUnmount(()=>{a()}),(t,B)=>r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(v))},[e.createVNode(f.default,e.mergeProps(e.unref(_.default)(e.unref(d),t.$attrs),{onLoadComplete:g,onLoadError:q}),null,16)],2)):e.createCommentVNode("",!0)}});exports.default=w;
|
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
var
|
|
2
|
-
var t = (n,
|
|
3
|
-
import { defineComponent as
|
|
4
|
-
import { useNamespace as
|
|
5
|
-
import
|
|
6
|
-
import { lsPreviewProp as
|
|
7
|
-
import { ElLoading as
|
|
1
|
+
var M = Object.defineProperty;
|
|
2
|
+
var t = (n, s) => M(n, "name", { value: s, configurable: !0 });
|
|
3
|
+
import { defineComponent as g, mergeModels as p, toRefs as P, useModel as _, reactive as w, ref as x, watch as f, onBeforeMount as S, onBeforeUnmount as V, openBlock as h, createElementBlock as k, normalizeClass as z, unref as i, createVNode as N, mergeProps as T, createCommentVNode as X } from "vue";
|
|
4
|
+
import { useNamespace as y } from "../../_hooks/useNamespace/index.js";
|
|
5
|
+
import v from "../Xlsx.vue/index.js";
|
|
6
|
+
import { lsPreviewProp as A } from "../types/index.js";
|
|
7
|
+
import { ElLoading as I } from "element-plus";
|
|
8
8
|
/* empty css */
|
|
9
9
|
/* empty css */
|
|
10
10
|
/* empty css */
|
|
11
|
-
import { ElMessage as
|
|
12
|
-
import
|
|
13
|
-
const
|
|
11
|
+
import { ElMessage as O } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/message/index/index.js";
|
|
12
|
+
import R from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
|
|
13
|
+
const U = g({
|
|
14
14
|
name: "LSPreviewXlsx"
|
|
15
|
-
}),
|
|
16
|
-
|
|
15
|
+
}), Z = /* @__PURE__ */ g({
|
|
16
|
+
...U,
|
|
17
17
|
name: "LSPreviewXlsx",
|
|
18
18
|
components: {
|
|
19
|
-
LSXlsx:
|
|
19
|
+
LSXlsx: v
|
|
20
20
|
},
|
|
21
21
|
inheritAttrs: !1,
|
|
22
|
-
props: /* @__PURE__ */ p(
|
|
22
|
+
props: /* @__PURE__ */ p(A, {
|
|
23
23
|
modelValue: {
|
|
24
24
|
type: Boolean
|
|
25
25
|
},
|
|
26
26
|
modelModifiers: {}
|
|
27
27
|
}),
|
|
28
28
|
emits: /* @__PURE__ */ p(["loadComplete", "loadError"], ["update:modelValue"]),
|
|
29
|
-
setup(n, { emit:
|
|
30
|
-
const c =
|
|
31
|
-
zoomSize:
|
|
29
|
+
setup(n, { emit: s }) {
|
|
30
|
+
const c = s, e = n, { zoomSize: L } = P(e), o = _(n, "modelValue"), d = w({
|
|
31
|
+
zoomSize: L,
|
|
32
32
|
source: ""
|
|
33
|
-
}),
|
|
34
|
-
let
|
|
35
|
-
|
|
33
|
+
}), C = y("preview").b(), m = x();
|
|
34
|
+
let a = null;
|
|
35
|
+
f(
|
|
36
36
|
() => o == null ? void 0 : o.value,
|
|
37
37
|
(r) => {
|
|
38
|
-
r &&
|
|
38
|
+
r && u();
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
immediate: !0,
|
|
42
42
|
deep: !0
|
|
43
43
|
}
|
|
44
|
-
),
|
|
44
|
+
), f(
|
|
45
45
|
() => e.source,
|
|
46
46
|
(r) => {
|
|
47
|
-
|
|
47
|
+
d.source = r;
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
immediate: !0,
|
|
51
51
|
deep: !0
|
|
52
52
|
}
|
|
53
53
|
);
|
|
54
|
-
function
|
|
55
|
-
e.needLoading && (m.value =
|
|
56
|
-
e.source || (
|
|
54
|
+
function u() {
|
|
55
|
+
e.needLoading && (m.value = I.service(e.loadingOption)), a = setTimeout(() => {
|
|
56
|
+
e.source || (O.error("文件加载超时,请检查文件是否存在!"), l(), o.value = !1), clearTimeout(a);
|
|
57
57
|
}, 6e3);
|
|
58
58
|
}
|
|
59
|
-
t(
|
|
59
|
+
t(u, "openLoading");
|
|
60
60
|
const l = /* @__PURE__ */ t(() => {
|
|
61
|
-
|
|
62
|
-
}, "closeLoading"),
|
|
61
|
+
a && clearTimeout(a), e.needLoading && m.value && m.value.close();
|
|
62
|
+
}, "closeLoading"), E = /* @__PURE__ */ t(() => {
|
|
63
63
|
l(), c("loadComplete");
|
|
64
|
-
}, "loadComplete"),
|
|
65
|
-
l(),
|
|
64
|
+
}, "loadComplete"), B = /* @__PURE__ */ t(() => {
|
|
65
|
+
l(), c("loadError");
|
|
66
66
|
}, "loadError");
|
|
67
|
-
return
|
|
68
|
-
o.value &&
|
|
69
|
-
}),
|
|
67
|
+
return S(() => {
|
|
68
|
+
o.value && u();
|
|
69
|
+
}), V(() => {
|
|
70
70
|
l();
|
|
71
|
-
}), (r,
|
|
71
|
+
}), (r, b) => o.value ? (h(), k("div", {
|
|
72
72
|
key: 0,
|
|
73
|
-
class:
|
|
73
|
+
class: z(i(C))
|
|
74
74
|
}, [
|
|
75
|
-
|
|
76
|
-
onLoadComplete:
|
|
77
|
-
onLoadError:
|
|
75
|
+
N(v, T(i(R)(i(d), r.$attrs), {
|
|
76
|
+
onLoadComplete: E,
|
|
77
|
+
onLoadError: B
|
|
78
78
|
}), null, 16)
|
|
79
|
-
], 2)) :
|
|
79
|
+
], 2)) : X("", !0);
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
export {
|
|
83
|
-
|
|
83
|
+
Z as default
|
|
84
84
|
};
|
|
Binary file
|
|
Binary file
|