@lingshugroup/web-plus 1.0.37 → 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.
Files changed (31) hide show
  1. package/README.md +1 -1
  2. package/lib/index.css +1 -1
  3. package/lib/index.css.br +0 -0
  4. package/lib/index.css.gz +0 -0
  5. package/lib/packages/ls-components/components/descriptions/Index.vue/index.cjs +1 -1
  6. package/lib/packages/ls-components/components/descriptions/Index.vue/index.js +1 -1
  7. package/lib/packages/ls-components/components/descriptions/Index.vue/index2.cjs +1 -1
  8. package/lib/packages/ls-components/components/descriptions/Index.vue/index2.js +62 -60
  9. package/lib/packages/ls-components/components/descriptions/Index.vue/index2.js.br +0 -0
  10. package/lib/packages/ls-components/components/descriptions/Index.vue/index2.js.gz +0 -0
  11. package/lib/packages/ls-components/components/preview_pdf/composable/index.cjs +1 -1
  12. package/lib/packages/ls-components/components/preview_pdf/composable/index.js +43 -43
  13. package/lib/packages/ls-components/components/preview_pdf/composable/index.js.br +0 -0
  14. package/lib/packages/ls-components/components/preview_pdf/composable/index.js.gz +0 -0
  15. package/lib/packages/ls-components/components/preview_pdf/pdfs/Annotation.vue/index.cjs +1 -1
  16. package/lib/packages/ls-components/components/preview_pdf/pdfs/Annotation.vue/index.js +20 -20
  17. package/lib/packages/ls-components/components/preview_pdf/pdfs/Annotation.vue/index.js.br +0 -0
  18. package/lib/packages/ls-components/components/preview_pdf/pdfs/Annotation.vue/index.js.gz +0 -0
  19. package/lib/packages/ls-components/components/preview_pdf/pdfs/PdfItem.vue/index.cjs +1 -1
  20. package/lib/packages/ls-components/components/preview_pdf/pdfs/PdfItem.vue/index.js +37 -37
  21. package/lib/packages/ls-components/components/preview_pdf/pdfs/PdfItem.vue/index.js.br +0 -0
  22. package/lib/packages/ls-components/components/preview_pdf/pdfs/PdfItem.vue/index.js.gz +0 -0
  23. package/lib/packages/ls-components/components/preview_pdf/pdfs/Text.vue/index.cjs +1 -1
  24. package/lib/packages/ls-components/components/preview_pdf/pdfs/Text.vue/index.js +12 -12
  25. package/lib/packages/ls-components/components/preview_pdf/pdfs/Text.vue/index.js.br +0 -0
  26. package/lib/packages/ls-components/components/preview_pdf/pdfs/Text.vue/index.js.gz +0 -0
  27. package/lib/packages/ls-components/components/preview_pdf/pdfs/XFA.vue/index.cjs +1 -1
  28. package/lib/packages/ls-components/components/preview_pdf/pdfs/XFA.vue/index.js +6 -6
  29. package/lib/packages/ls-components/components/preview_pdf/pdfs/XFA.vue/index.js.br +0 -0
  30. package/lib/packages/ls-components/components/preview_pdf/pdfs/XFA.vue/index.js.gz +0 -0
  31. 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 A, computed as S, openBlock as b, createElementBlock as U, createElementVNode as F, createBlock as V, mergeProps as T, unref as f, createCommentVNode as B, createVNode as Y, withDirectives as Z, renderSlot as tt, vShow as et, toRaw as ot } from "vue";
4
- import * as N from "pdfjs-dist";
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
- }), gt = /* @__PURE__ */ R({
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
- q();
41
+ G();
42
42
  },
43
43
  {
44
44
  immediate: !0,
45
45
  deep: !0
46
46
  }
47
47
  );
48
- const p = A(), m = A(), P = A(!1);
48
+ const p = b(), m = b(), L = b(!1);
49
49
  let y;
50
- const s = S(() => ({
50
+ const s = A(() => ({
51
51
  viewport: void 0,
52
52
  document: void 0,
53
53
  page: void 0
54
- })), O = S(() => ({
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 = S(() => ({
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 L(n) {
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 ? L(n - 360) : t < 0 ? L(n + 360) : n;
81
+ return t > 4 ? P(n - 360) : t < 0 ? P(n + 360) : n;
82
82
  }
83
- a(L, "getRotation");
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), G = Math.floor(h / r) * (t.height / u) + t.height / (u * 2), K = e.measureText(c).width;
109
- e.save(), e.translate(w, G), e.rotate(-g * (Math.PI / 180)), e.fillText(c, -K / 2, v / 2), e.restore();
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", P.value = !0, t;
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: L((o.rotation || 0) + i.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.AnnotationMode.ENABLE : N.AnnotationMode.ENABLE_FORMS,
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
- P.value = !1, _(r.scale), l("loaded", s.value.viewport), l("loadComplete");
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 J(n) {
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(J, "initDoc"), E(
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 X() {
168
+ function j() {
169
169
  C(o.page);
170
170
  }
171
- a(X, "reload");
172
- function j() {
171
+ a(j, "reload");
172
+ function q() {
173
173
  $();
174
174
  }
175
- a(j, "cancel");
176
- async function q() {
175
+ a(q, "cancel");
176
+ async function G() {
177
177
  if (o.pdf)
178
178
  try {
179
- J(o.pdf);
179
+ X(o.pdf);
180
180
  } finally {
181
181
  }
182
182
  }
183
- return a(q, "initPdf"), k({
184
- reload: X,
185
- cancel: j
186
- }), (n, t) => (b(), U("div", {
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] = F("canvas", {
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 ? (b(), V(nt, T({ key: 0 }, { ...f(s), ...f(O) }, {
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)) : B("", !0),
200
- n.textLayer ? (b(), V(at, T({ key: 1 }, { ...f(s), ...f(D) }, {
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)) : B("", !0),
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(F("div", {
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(P)]
214
+ [et, f(L)]
215
215
  ])
216
216
  ], 512));
217
217
  }
218
218
  });
219
219
  export {
220
- gt as default
220
+ yt as default
221
221
  };
@@ -1 +1 @@
1
- "use strict";var _=Object.defineProperty;var o=(t,s)=>_(t,"name",{value:s,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),b=require("pdfjs-dist"),p=require("../highlight/index.cjs"),M=require("../../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.cjs");function D(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const l=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(s,e,l.get?l:{enumerable:!0,get:o(()=>t[e],"get")})}}return s.default=t,Object.freeze(s)}o(D,"_interopNamespaceDefault");const S=D(b),L=r.defineComponent({__name:"Text",props:{page:{},viewport:{},highlightText:{},highlightOptions:{}},emits:["highlight","textLoaded"],setup(t,{emit:s}){const e=t,l=s,c=r.ref(),u=r.ref();let h=[];function w(){return M.default({},{ignoreCase:!0,completeWords:!1},e.highlightOptions)}o(w,"getHighlightOptionsWithDefaults");async function v(n=!1){const i=e.page,a=await(i==null?void 0:i.getTextContent());if(a&&(n&&p.resetDivs(a,h),e.highlightText)){const d=typeof e.highlightText=="string"?[e.highlightText]:e.highlightText,g=p.findMatches(d,a,w());p.highlightMatches(g,a,h),l("highlight",{matches:g,textContent:a,textDivs:h,page:(i==null?void 0:i.pageNumber)||1})}}o(v,"findAndHighlight");function m(){var g,x;(x=(g=c.value).replaceChildren)==null||x.call(g);const n=e.page,i=e.viewport,a=n==null?void 0:n.streamTextContent({includeMarkedContent:!0,disableNormalization:!0}),d=new S.TextLayer({container:c.value,textContentSource:a,viewport:i});d.render().then(async()=>{var y;h=d.textDivs;const O=await(n==null?void 0:n.getTextContent());l("textLoaded",{textDivs:h,textContent:O});const f=document.createElement("div");f.className="endOfContent",(y=c.value)==null||y.appendChild(f),u.value=f,v()})}o(m,"render");function C(){u.value&&u.value.classList.add("active")}o(C,"onMouseDown");function T(){u.value&&u.value.classList.remove("active")}return o(T,"onMouseUp"),r.watch(()=>e.viewport,()=>{e.page&&e.viewport&&c.value&&m()}),r.watch(()=>[e.highlightText,e.highlightOptions],()=>{v(!0)},{deep:!0}),r.onMounted(()=>{e.page&&e.viewport&&c.value&&m()}),(n,i)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"layer",ref:c,class:"textLayer",style:{display:"block"},onMousedown:C,onMouseup:T},null,544))}});exports.default=L;
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 D, openBlock as O, createElementBlock as k } from "vue";
4
- import * as b from "pdfjs-dist";
5
- import { resetDivs as N, findMatches as S, highlightMatches as B } from "../highlight/index.js";
6
- import E from "../../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
7
- const A = /* @__PURE__ */ _({
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 E(
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 = S(h, i, w());
34
- B(l, i, a), p("highlight", {
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.TextLayer({ container: o.value, textContentSource: i, viewport: n });
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
- ), D(() => {
75
+ ), O(() => {
76
76
  t.page && t.viewport && o.value && f();
77
- }), (e, n) => (O(), k("div", {
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
- A as default
88
+ U as default
89
89
  };
@@ -1 +1 @@
1
- "use strict";var m=Object.defineProperty;var c=(t,n)=>m(t,"name",{value:n,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),g=require("pdfjs-dist"),w=require("../linkService/index.cjs");function S(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:c(()=>t[e],"get")})}}return n.default=t,Object.freeze(n)}c(S,"_interopNamespaceDefault");const _=S(g),y=o.defineComponent({__name:"XFA",props:{page:{},document:{},viewport:{}},emits:["xfaLoaded"],setup(t,{emit:n}){const e=t,i=n,r=o.ref();async function l(){var s,p;(p=(s=r.value).replaceChildren)==null||p.call(s);const a=o.toRaw(e.document),u=e.page,f=e.viewport;if(a.isPureXfa){const d=await u.getXfa(),v={div:r.value,viewport:f.clone({dontFlip:!0}),linkService:new w.SimpleLinkService,annotationStorage:a==null?void 0:a.annotationStorage,xfaHtml:d};_.XfaLayer.render(v),i("xfaLoaded")}}return c(l,"render"),o.watch(()=>e.viewport,()=>{e.page&&e.viewport&&r.value&&l()}),o.onMounted(()=>{e.page&&e.viewport&&r.value&&l()}),(a,u)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"layer",ref:r,style:{display:"block"}},null,512))}});exports.default=y;
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 * as S from "pdfjs-dist";
5
- import { SimpleLinkService as L } from "../linkService/index.js";
6
- const B = /* @__PURE__ */ v({
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 L(),
24
+ linkService: new S(),
25
25
  annotationStorage: o == null ? void 0 : o.annotationStorage,
26
26
  xfaHtml: m
27
27
  };
28
- S.XfaLayer.render(d), s("xfaLoaded");
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
- B as default
46
+ F as default
47
47
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingshugroup/web-plus",
3
- "version": "1.0.37",
3
+ "version": "1.0.38",
4
4
  "description": "零数科技前端UI组件库(Vue3)",
5
5
  "type": "module",
6
6
  "main": "./lib/index/index.cjs",