@lingshugroup/web-plus 1.7.10 → 1.7.11

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 (35) hide show
  1. package/lib/index.css +1 -1
  2. package/lib/index.css.br +0 -0
  3. package/lib/index.css.gz +0 -0
  4. package/lib/packages/ls-components/components/chart/config/template/bar/index.cjs +1 -1
  5. package/lib/packages/ls-components/components/chart/config/template/bar/index.js +89 -65
  6. package/lib/packages/ls-components/components/chart/config/template/bar/index.js.br +0 -0
  7. package/lib/packages/ls-components/components/chart/config/template/bar/index.js.gz +0 -0
  8. package/lib/packages/ls-components/components/chart/config/template/line/index.cjs +1 -1
  9. package/lib/packages/ls-components/components/chart/config/template/line/index.js +102 -85
  10. package/lib/packages/ls-components/components/chart/config/template/line/index.js.br +0 -0
  11. package/lib/packages/ls-components/components/chart/config/template/line/index.js.gz +0 -0
  12. package/lib/packages/ls-components/components/preview_pdf/composable/index.cjs +1 -1
  13. package/lib/packages/ls-components/components/preview_pdf/composable/index.js +37 -35
  14. package/lib/packages/ls-components/components/preview_pdf/composable/index.js.br +0 -0
  15. package/lib/packages/ls-components/components/preview_pdf/composable/index.js.gz +0 -0
  16. package/lib/packages/ls-components/components/tooltip/Index.vue/index.cjs +1 -1
  17. package/lib/packages/ls-components/components/tooltip/Index.vue/index.js +2 -2
  18. package/lib/packages/ls-components/components/tooltip/Index.vue/index2.cjs +1 -1
  19. package/lib/packages/ls-components/components/tooltip/Index.vue/index2.js +25 -25
  20. package/lib/packages/ls-components/components/tooltip/Index.vue/index2.js.br +0 -0
  21. package/lib/packages/ls-components/components/tooltip/Index.vue/index2.js.gz +0 -0
  22. package/lib/packages/ls-components/components/tree/Index.vue/index.cjs +1 -1
  23. package/lib/packages/ls-components/components/tree/Index.vue/index.js +2 -2
  24. package/lib/packages/ls-components/components/tree/Index.vue/index2.cjs +1 -1
  25. package/lib/packages/ls-components/components/tree/Index.vue/index2.js +35 -31
  26. package/lib/packages/ls-components/components/tree/Index.vue/index2.js.br +0 -0
  27. package/lib/packages/ls-components/components/tree/Index.vue/index2.js.gz +0 -0
  28. package/lib/packages/ls-components/components/upload/Index.vue/index.cjs +1 -1
  29. package/lib/packages/ls-components/components/upload/Index.vue/index.js +2 -2
  30. package/lib/packages/ls-components/components/upload/Index.vue/index2.cjs +1 -1
  31. package/lib/packages/ls-components/components/upload/Index.vue/index2.js +2 -2
  32. package/lib/packages/ls-components/components/upload/Index.vue/index2.js.br +0 -0
  33. package/lib/packages/ls-components/components/upload/Index.vue/index2.js.gz +0 -0
  34. package/lib/types/components/chart/types.d.ts +2 -0
  35. package/package.json +1 -1
@@ -1,36 +1,44 @@
1
- var $ = Object.defineProperty;
2
- var p = (o, e) => $(o, "name", { value: e, configurable: !0 });
3
- import { numberFixed as C, formatChartAxis as I } from "../../../../_utils/utils/index.js";
4
- import { BG_COLOR_MAP as k, DEF_THEME as l, BAR_COLOR_MAP as _, TOOLTIP_COLOR_MAP as S, FONT_COLOR_MAP as v, BG_BAR_COLOR_MAP as L, SPLIT_LINE_COLOR as w } from "../../base/index.js";
5
- const D = /* @__PURE__ */ p((o, e, t, n, a) => {
6
- const { name: s, seriesName: i, value: r, color: u } = o, d = n == 0 ? `<div class="name">${s}</div>` : "", y = e && r !== "-" && i !== "temp" ? `<span class="serise-name">${e ? i : ""}</span>` : "", c = r !== "-" && i !== "temp" ? `<span class="value">${r || r == 0 ? r : "-"}</span>` : "", m = r !== "-" && i !== "temp" ? `<div class="content-badge ${t}" style="background-color: ${typeof u == "string" ? u : a};"></div>` : "";
7
- return ` ${d} <div class="content"> <div class="serise-wrap"> ${m} ${y} </div> ${c} </div> `;
8
- }, "setTooltipFormat"), R = /* @__PURE__ */ p((o) => {
9
- let { legend: e, legendIcon: t, tooltip: n = "shadow", theme: a, tooltipFormatter: s, barColorList: i } = o;
10
- const r = i || _[a || l][0];
11
- return s = s || function(u) {
12
- let d = `<div class="ls-bar-tooltip-wrap ${a}">`;
13
- return u.forEach((y, c) => {
14
- d += D(y, !!e, t, c, r);
15
- }), d + "</div>";
1
+ var M = Object.defineProperty;
2
+ var f = (o, e) => M(o, "name", { value: e, configurable: !0 });
3
+ import { numberFixed as A, formatChartAxis as $ } from "../../../../_utils/utils/index.js";
4
+ import { BG_COLOR_MAP as k, DEF_THEME as l, BAR_COLOR_MAP as I, TOOLTIP_COLOR_MAP as O, FONT_COLOR_MAP as w, BG_BAR_COLOR_MAP as _, SPLIT_LINE_COLOR as C } from "../../base/index.js";
5
+ const D = /* @__PURE__ */ f((o, e, t, n, r, a, m) => {
6
+ const { name: c, seriesName: u, value: s, color: p } = o, i = n == 0 ? `<div class="name">${c}</div>` : "", d = e && s !== "-" && u !== "temp" ? `<span class="serise-name">${e ? u : ""}</span>` : "", h = s !== "-" && u !== "temp" ? `<span class="value">${a ? a(s, m) : s || s == 0 ? s : "-"}</span>` : "", x = s !== "-" && u !== "temp" ? `<div class="content-badge ${t}" style="background-color: ${typeof p == "string" ? p : r};"></div>` : "";
7
+ return ` ${i} <div class="content"> <div class="serise-wrap"> ${x} ${d} </div> ${h} </div> `;
8
+ }, "setTooltipFormat"), R = /* @__PURE__ */ f((o) => {
9
+ let { legend: e, legendIcon: t, tooltip: n = "shadow", theme: r, tooltipFormatter: a, barColorList: m, tooltipValueFormatter: c } = o;
10
+ const u = m || I[r || l][0];
11
+ return a = a || function(s) {
12
+ let p = `<div class="ls-bar-tooltip-wrap ${r}">`;
13
+ return s.forEach((i, d) => {
14
+ p += D(
15
+ i,
16
+ !!e,
17
+ t,
18
+ d,
19
+ u,
20
+ c,
21
+ i.dataIndex
22
+ );
23
+ }), p + "</div>";
16
24
  }, n ? {
17
25
  trigger: "axis",
18
26
  axisPointer: {
19
27
  type: n,
20
28
  z: 1,
21
29
  label: {
22
- color: S[a || l].color
30
+ color: O[r || l].color
23
31
  }
24
32
  },
25
33
  textStyle: {
26
- color: v[a || l]
34
+ color: w[r || l]
27
35
  },
28
36
  padding: 12,
29
- backgroundColor: S[a || l].bgColor,
30
- extraCssText: `box-shadow: ${S[a || l].shadowColor};`,
31
- formatter: s
37
+ backgroundColor: O[r || l].bgColor,
38
+ extraCssText: `box-shadow: ${O[r || l].shadowColor};`,
39
+ formatter: a
32
40
  } : null;
33
- }, "setTooltip"), H = /* @__PURE__ */ p((o) => {
41
+ }, "setTooltip"), F = /* @__PURE__ */ f((o) => {
34
42
  const { legend: e, legendIcon: t = "rect", theme: n } = o;
35
43
  return {
36
44
  type: "scroll",
@@ -39,7 +47,7 @@ const D = /* @__PURE__ */ p((o, e, t, n, a) => {
39
47
  itemWidth: 12,
40
48
  itemHeight: 10,
41
49
  textStyle: {
42
- color: v[n || l],
50
+ color: w[n || l],
43
51
  fontSize: 12,
44
52
  height: 10,
45
53
  rich: {
@@ -49,7 +57,7 @@ const D = /* @__PURE__ */ p((o, e, t, n, a) => {
49
57
  }
50
58
  }
51
59
  };
52
- }, "setLegend"), F = /* @__PURE__ */ p((o) => {
60
+ }, "setLegend"), H = /* @__PURE__ */ f((o) => {
53
61
  const { dataZoom: e } = o, t = {
54
62
  left: "3%",
55
63
  right: "3%",
@@ -58,19 +66,19 @@ const D = /* @__PURE__ */ p((o, e, t, n, a) => {
58
66
  containLabel: !0
59
67
  };
60
68
  return e === "vertical" && delete t.right, e === "horizontal" && delete t.bottom, t;
61
- }, "setGrid"), A = /* @__PURE__ */ p((o, e, t) => {
62
- const { axisData: n, seriesData: a } = o, { axis: s = "x", theme: i, lineBar: r, dynamicAxis: u, type: d } = e;
63
- let y = [
69
+ }, "setGrid"), B = /* @__PURE__ */ f((o, e, t) => {
70
+ const { axisData: n, seriesData: r } = o, { axis: a = "x", theme: m, lineBar: c, dynamicAxis: u, type: s } = e;
71
+ let p = [
64
72
  {
65
- type: s == t ? "category" : "value",
73
+ type: a == t ? "category" : "value",
66
74
  axisTick: {
67
75
  show: !1
68
76
  },
69
77
  axisLine: {
70
- show: s == t,
78
+ show: a == t,
71
79
  lineStyle: {
72
80
  width: 1,
73
- color: v[i || l]
81
+ color: w[m || l]
74
82
  }
75
83
  },
76
84
  axisLabel: {
@@ -79,19 +87,19 @@ const D = /* @__PURE__ */ p((o, e, t, n, a) => {
79
87
  splitLine: {
80
88
  lineStyle: {
81
89
  type: "dashed",
82
- color: w[i || l]
90
+ color: C[m || l]
83
91
  }
84
92
  },
85
- data: s == t ? n : []
93
+ data: a == t ? n : []
86
94
  }
87
95
  ];
88
- if (s !== t && (r && (y = s == "x" ? [
96
+ if (a !== t && (c && (p = a == "x" ? [
89
97
  {
90
98
  type: "value",
91
99
  splitLine: {
92
100
  show: !1,
93
101
  lineStyle: {
94
- color: w[i || l]
102
+ color: C[m || l]
95
103
  }
96
104
  }
97
105
  },
@@ -99,7 +107,7 @@ const D = /* @__PURE__ */ p((o, e, t, n, a) => {
99
107
  type: "value",
100
108
  splitLine: {
101
109
  lineStyle: {
102
- color: w[i || l],
110
+ color: C[m || l],
103
111
  type: "dashed",
104
112
  width: 2,
105
113
  dashOffset: 2
@@ -111,17 +119,17 @@ const D = /* @__PURE__ */ p((o, e, t, n, a) => {
111
119
  type: "value"
112
120
  }
113
121
  ]), u)) {
114
- let c = [];
115
- d === "multiple" && (!r || s == "y" && r) && (c = (a || []).reduce((m, f) => m.concat(f.data), [])), y.map((m, f) => {
116
- var O;
117
- d === "multiple" ? r && s == "x" && (c = (((O = (a || [])[f]) == null ? void 0 : O.data) || []).map((g) => C(g))) : c = (a || []).map((g) => C(g)), c = c.filter((g) => g > 0);
118
- const h = Math.max(...c), b = Math.min(...c), { aInterval: x, aMax: B, aMin: M } = I(h, b);
119
- return m.min = M, m.max = B, m.interval = x, m;
122
+ let i = [];
123
+ s === "multiple" && (!c || a == "y" && c) && (i = (r || []).reduce((d, h) => d.concat(h.data), [])), p.map((d, h) => {
124
+ var b;
125
+ s === "multiple" ? c && a == "x" && (i = (((b = (r || [])[h]) == null ? void 0 : b.data) || []).map((S) => A(S))) : i = (r || []).map((S) => A(S)), i = i.filter((S) => S > 0);
126
+ const x = Math.max(...i), y = Math.min(...i), { aInterval: g, aMax: v, aMin: L } = $(x, y);
127
+ return d.min = L, d.max = v, d.interval = g, d;
120
128
  });
121
129
  }
122
- return y;
123
- }, "setAxis"), T = /* @__PURE__ */ p((o) => {
124
- const { dataZoom: e, dataZoomColorOut: t, dataZoomColorIn: n, theme: a } = o;
130
+ return p;
131
+ }, "setAxis"), T = /* @__PURE__ */ f((o) => {
132
+ const { dataZoom: e, dataZoomColorOut: t, dataZoomColorIn: n, theme: r } = o;
125
133
  return e ? [
126
134
  {
127
135
  show: !0,
@@ -143,7 +151,7 @@ const D = /* @__PURE__ */ p((o, e, t, n, a) => {
143
151
  // },
144
152
  // borderColor: null,
145
153
  textStyle: {
146
- color: v[a || l]
154
+ color: w[r || l]
147
155
  }
148
156
  },
149
157
  {
@@ -159,79 +167,88 @@ const D = /* @__PURE__ */ p((o, e, t, n, a) => {
159
167
  showDataShadow: !0
160
168
  }
161
169
  ] : null;
162
- }, "setDataZoom"), Z = /* @__PURE__ */ p((o, e) => {
170
+ }, "setDataZoom"), Z = /* @__PURE__ */ f((o, e) => {
163
171
  const { seriesData: t } = o, {
164
172
  type: n = "simple",
165
- showBarFont: a = !0,
166
- labelPosition: s = "inside",
167
- smooth: i = !0,
168
- areaStyle: r = void 0,
173
+ showBarFont: r = !0,
174
+ labelPosition: a = "inside",
175
+ smooth: m = !0,
176
+ areaStyle: c = void 0,
169
177
  showBackground: u,
170
- theme: d,
171
- name: y,
172
- lineBar: c,
173
- axis: m,
174
- symbol: f = "circle"
178
+ theme: s,
179
+ name: p,
180
+ lineBar: i,
181
+ axis: d,
182
+ symbol: h = "circle",
183
+ seriesLabelFormatter: x
175
184
  } = e;
176
- return n === "multiple" ? (t || []).map((h, b) => {
177
- const x = {
178
- name: h.name,
179
- type: h.type,
180
- symbol: f,
181
- emphasis: h.emphasis || {
185
+ return n === "multiple" ? (t || []).map((y, g) => {
186
+ const v = {
187
+ name: y.name,
188
+ type: y.type,
189
+ symbol: h,
190
+ emphasis: y.emphasis || {
182
191
  focus: "series"
183
192
  },
184
- smooth: i,
185
- areaStyle: r || null,
193
+ smooth: m,
194
+ areaStyle: c || null,
186
195
  label: {
187
- show: a,
188
- position: s
196
+ show: r,
197
+ position: a,
198
+ formatter: x || function(L) {
199
+ const b = L.value;
200
+ return b !== 0 ? b : "";
201
+ }
189
202
  },
190
203
  showBackground: u,
191
204
  backgroundStyle: {
192
- color: L[d || l]
205
+ color: _[s || l]
193
206
  },
194
- itemStyle: h.itemStyle || {},
195
- data: h.data || []
207
+ itemStyle: y.itemStyle || {},
208
+ data: y.data || []
196
209
  };
197
- return c && (m !== "y" && b === 1 ? x.yAxisIndex = b : x.yAxisIndex && delete x.yAxisIndex), x;
210
+ return i && (d !== "y" && g === 1 ? v.yAxisIndex = g : v.yAxisIndex && delete v.yAxisIndex), v;
198
211
  }) : [
199
212
  {
200
- name: y,
213
+ name: p,
201
214
  label: {
202
- show: a,
203
- position: s
215
+ show: r,
216
+ position: a,
217
+ formatter: x || function(y) {
218
+ const g = y.value;
219
+ return g !== 0 ? g : "";
220
+ }
204
221
  },
205
222
  showBackground: u,
206
223
  backgroundStyle: {
207
- color: L[d || l]
224
+ color: _[s || l]
208
225
  },
209
226
  data: t || [],
210
- smooth: i,
211
- symbol: f,
227
+ smooth: m,
228
+ symbol: h,
212
229
  // 设置填充透明度
213
- areaStyle: r || null,
230
+ areaStyle: c || null,
214
231
  type: "line"
215
232
  }
216
233
  ];
217
- }, "setSeries"), E = /* @__PURE__ */ p((o, e) => {
218
- const { theme: t, barColorList: n } = e, a = {
234
+ }, "setSeries"), E = /* @__PURE__ */ f((o, e) => {
235
+ const { theme: t, barColorList: n } = e, r = {
219
236
  textStyle: {},
220
237
  backgroundColor: k[t || l],
221
- color: n || _[t || l],
222
- legend: H(e),
223
- grid: F(e),
224
- xAxis: A(o, e, "x"),
225
- yAxis: A(o, e, "y"),
238
+ color: n || I[t || l],
239
+ legend: F(e),
240
+ grid: H(e),
241
+ xAxis: B(o, e, "x"),
242
+ yAxis: B(o, e, "y"),
226
243
  series: Z(o, e),
227
244
  dataZoom: T(e)
228
- }, s = R(e);
229
- return s && (a.tooltip = s), a;
245
+ }, a = R(e);
246
+ return a && (r.tooltip = a), r;
230
247
  }, "setOption");
231
248
  function P(o = {}, e = {}) {
232
249
  return E(o, e);
233
250
  }
234
- p(P, "dealOption");
251
+ f(P, "dealOption");
235
252
  export {
236
253
  P as dealOption
237
254
  };
@@ -1 +1 @@
1
- "use strict";var N=Object.defineProperty;var c=(s,b)=>N(s,"name",{value:b,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("pdfjs-dist"),O=require("../../../../../node_modules/.pnpm/pdfjs-dist@4.8.69/node_modules/pdfjs-dist/build/pdf.worker.min/index.cjs"),f=require("vue"),h=require("../pdfs/destination/index.cjs"),I=require("../pdfs/miscellaneous/index.cjs");function q(s){P.GlobalWorkerOptions.workerSrc=s}c(q,"configWorker");function A(s,b,i={onProgress:void 0,onPassword:void 0,onError:void 0,password:""}){var S;(S=P.GlobalWorkerOptions)!=null&&S.workerSrc||q(O.default);const D=f.shallowRef(),l=f.shallowRef(),k=f.shallowRef(0),R=f.shallowRef({});function g(u){l.value&&l.value.destroy();const o=P.getDocument({url:u,cMapUrl:b,cMapPacked:!0});if(i.onProgress&&(o.onProgress=i.onProgress),i.onPassword)o.onPassword=i.onPassword;else if(i.password){const e=c(r=>{r(i.password??"")},"onPassword");o.onPassword=e}return o.promise.then(async e=>{l.value=e,D.value=e.loadingTask,k.value=e.numPages;const r=await e.getMetadata(),a=await e.getAttachments(),n=await e.getJSActions(),d=await e.getOutline();R.value={metadata:r,attachments:a,javascript:n,outline:d}},e=>{typeof i.onError=="function"&&i.onError(e)})}c(g,"processLoadingTask");async function U(u){var t;const o=await((t=D.value)==null?void 0:t.promise);if(!o)return null;const e=await h.getDestinationArray(o,u),r=await h.getDestinationRef(o,e);if(!r||!e)return null;const a=await o.getPageIndex(r),n=e[1].name,d=e.slice(2),v=h.isSpecLike(d)?h.getLocation(n,d):null;return{pageIndex:a,location:v??{type:"Fit",spec:[]}}}c(U,"getPDFDestination");async function x(u="filename"){var n;if(!l.value)throw new Error("Current PDFDocumentProxy have not loaded yet");const o=await((n=l.value)==null?void 0:n.saveDocument()),e=new Blob([o],{type:"application/pdf"}),r=URL.createObjectURL(e),a=document.createElement("a");document.body.appendChild(a),a.href=r,a.download=u,a.style.display="none",a.click(),setTimeout(()=>{URL.revokeObjectURL(r),document.body.removeChild(a)},10)}c(x,"download");async function E(u=150,o="filename"){var C,T;if(!l.value)throw new Error("Current PDFDocumentProxy have not loaded yet");const e=await((C=l.value)==null?void 0:C.saveDocument()),a=await P.getDocument(e.buffer).promise,n=u/72,d=96/72,v=await I.createIframe(),t=v.contentWindow;t.document.title=o;const F=[...Array(a.numPages).keys()].map(p=>p+1);for(const p of F){const y=await a.getPage(p),m=y.getViewport({scale:1});p===1&&I.addStylesToIframe(t,m.width*n/d,m.height*n/d);const w=document.createElement("canvas");w.width=m.width*n,w.height=m.height*n;const L=w.cloneNode();t==null||t.document.body.appendChild(L),await(y==null?void 0:y.render({canvasContext:w.getContext("2d"),intent:"print",transform:[n,0,0,n,0,0],viewport:m}).promise),(T=L.getContext("2d"))==null||T.drawImage(w,0,0)}t==null||t.focus(),t==null||t.print(),document.body.removeChild(v)}return c(E,"print"),f.isRef(s)?(s.value&&g(s.value),f.watch(s,()=>{s.value&&g(s.value)})):s&&g(s),{pdf:D,pages:k,info:R,print:E,download:x,getPDFDestination:U,processLoadingTask:g}}c(A,"usePDF");exports.usePDF=A;
1
+ "use strict";var N=Object.defineProperty;var l=(s,g)=>N(s,"name",{value:g,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("pdfjs-dist"),O=require("../../../../../node_modules/.pnpm/pdfjs-dist@4.8.69/node_modules/pdfjs-dist/build/pdf.worker.min/index.cjs"),f=require("vue"),P=require("../pdfs/destination/index.cjs"),I=require("../pdfs/miscellaneous/index.cjs");function q(s){b.GlobalWorkerOptions.workerSrc=s}l(q,"configWorker");function A(s,g,i={onProgress:void 0,onPassword:void 0,onError:void 0,password:""}){var S;(S=b.GlobalWorkerOptions)!=null&&S.workerSrc||q(O.default);const D=f.shallowRef(),u=f.shallowRef(),k=f.shallowRef(0),R=f.shallowRef({});function v(c){u.value&&u.value.destroy();const o=b.getDocument(g?{url:c,cMapUrl:g,cMapPacked:!0}:c);if(i.onProgress&&(o.onProgress=i.onProgress),i.onPassword)o.onPassword=i.onPassword;else if(i.password){const e=l(r=>{r(i.password??"")},"onPassword");o.onPassword=e}return o.promise.then(async e=>{u.value=e,D.value=e.loadingTask,k.value=e.numPages;const r=await e.getMetadata(),a=await e.getAttachments(),n=await e.getJSActions(),d=await e.getOutline();R.value={metadata:r,attachments:a,javascript:n,outline:d}},e=>{typeof i.onError=="function"&&i.onError(e)})}l(v,"processLoadingTask");async function x(c){var t;const o=await((t=D.value)==null?void 0:t.promise);if(!o)return null;const e=await P.getDestinationArray(o,c),r=await P.getDestinationRef(o,e);if(!r||!e)return null;const a=await o.getPageIndex(r),n=e[1].name,d=e.slice(2),p=P.isSpecLike(d)?P.getLocation(n,d):null;return{pageIndex:a,location:p??{type:"Fit",spec:[]}}}l(x,"getPDFDestination");async function E(c="filename"){var n;if(!u.value)throw new Error("Current PDFDocumentProxy have not loaded yet");const o=await((n=u.value)==null?void 0:n.saveDocument()),e=new Blob([o],{type:"application/pdf"}),r=URL.createObjectURL(e),a=document.createElement("a");document.body.appendChild(a),a.href=r,a.download=c,a.style.display="none",a.click(),setTimeout(()=>{URL.revokeObjectURL(r),document.body.removeChild(a)},10)}l(E,"download");async function F(c=150,o="filename"){var C,T;if(!u.value)throw new Error("Current PDFDocumentProxy have not loaded yet");const e=await((C=u.value)==null?void 0:C.saveDocument()),a=await b.getDocument(e.buffer).promise,n=c/72,d=96/72,p=await I.createIframe(),t=p.contentWindow;t.document.title=o;const U=[...Array(a.numPages).keys()].map(y=>y+1);for(const y of U){const h=await a.getPage(y),m=h.getViewport({scale:1});y===1&&I.addStylesToIframe(t,m.width*n/d,m.height*n/d);const w=document.createElement("canvas");w.width=m.width*n,w.height=m.height*n;const L=w.cloneNode();t==null||t.document.body.appendChild(L),await(h==null?void 0:h.render({canvasContext:w.getContext("2d"),intent:"print",transform:[n,0,0,n,0,0],viewport:m}).promise),(T=L.getContext("2d"))==null||T.drawImage(w,0,0)}t==null||t.focus(),t==null||t.print(),document.body.removeChild(p)}return l(F,"print"),f.isRef(s)?(s.value&&v(s.value),f.watch(s,()=>{s.value&&v(s.value)})):s&&v(s),{pdf:D,pages:k,info:R,print:F,download:E,getPDFDestination:x,processLoadingTask:v}}l(A,"usePDF");exports.usePDF=A;
@@ -1,15 +1,15 @@
1
1
  var F = Object.defineProperty;
2
- var c = (r, h) => F(r, "name", { value: h, configurable: !0 });
2
+ var d = (r, w) => F(r, "name", { value: w, configurable: !0 });
3
3
  import { GlobalWorkerOptions as T, getDocument as S } from "pdfjs-dist";
4
4
  import N from "../../../../../node_modules/.pnpm/pdfjs-dist@4.8.69/node_modules/pdfjs-dist/build/pdf.worker.min/index.js";
5
- import { shallowRef as y, isRef as A, watch as O } from "vue";
6
- import { getDestinationArray as j, getDestinationRef as M, isSpecLike as B, getLocation as _ } from "../pdfs/destination/index.js";
5
+ import { shallowRef as h, isRef as A, watch as O } from "vue";
6
+ import { getDestinationArray as j, getDestinationRef as B, isSpecLike as M, getLocation as _ } from "../pdfs/destination/index.js";
7
7
  import { createIframe as G, addStylesToIframe as J } from "../pdfs/miscellaneous/index.js";
8
8
  function V(r) {
9
9
  T.workerSrc = r;
10
10
  }
11
- c(V, "configWorker");
12
- function Y(r, h, i = {
11
+ d(V, "configWorker");
12
+ function Y(r, w, i = {
13
13
  onProgress: void 0,
14
14
  onPassword: void 0,
15
15
  onError: void 0,
@@ -17,18 +17,20 @@ function Y(r, h, i = {
17
17
  }) {
18
18
  var k;
19
19
  (k = T) != null && k.workerSrc || V(N);
20
- const P = y(), l = y(), b = y(0), D = y({});
21
- function w(d) {
20
+ const P = h(), l = h(), b = h(0), D = h({});
21
+ function g(c) {
22
22
  l.value && l.value.destroy();
23
- const o = S({
24
- url: d,
25
- cMapUrl: h,
26
- cMapPacked: !0
27
- });
23
+ const o = S(
24
+ w ? {
25
+ url: c,
26
+ cMapUrl: w,
27
+ cMapPacked: !0
28
+ } : c
29
+ );
28
30
  if (i.onProgress && (o.onProgress = i.onProgress), i.onPassword)
29
31
  o.onPassword = i.onPassword;
30
32
  else if (i.password) {
31
- const e = /* @__PURE__ */ c((s) => {
33
+ const e = /* @__PURE__ */ d((s) => {
32
34
  s(i.password ?? "");
33
35
  }, "onPassword");
34
36
  o.onPassword = e;
@@ -49,34 +51,34 @@ function Y(r, h, i = {
49
51
  }
50
52
  );
51
53
  }
52
- c(w, "processLoadingTask");
53
- async function x(d) {
54
+ d(g, "processLoadingTask");
55
+ async function x(c) {
54
56
  var t;
55
57
  const o = await ((t = P.value) == null ? void 0 : t.promise);
56
58
  if (!o) return null;
57
- const e = await j(o, d), s = await M(o, e);
59
+ const e = await j(o, c), s = await B(o, e);
58
60
  if (!s || !e) return null;
59
- const a = await o.getPageIndex(s), n = e[1].name, u = e.slice(2), g = B(u) ? _(n, u) : null;
60
- return { pageIndex: a, location: g ?? { type: "Fit", spec: [] } };
61
+ const a = await o.getPageIndex(s), n = e[1].name, u = e.slice(2), v = M(u) ? _(n, u) : null;
62
+ return { pageIndex: a, location: v ?? { type: "Fit", spec: [] } };
61
63
  }
62
- c(x, "getPDFDestination");
63
- async function I(d = "filename") {
64
+ d(x, "getPDFDestination");
65
+ async function I(c = "filename") {
64
66
  var n;
65
67
  if (!l.value) throw new Error("Current PDFDocumentProxy have not loaded yet");
66
68
  const o = await ((n = l.value) == null ? void 0 : n.saveDocument()), e = new Blob([o], { type: "application/pdf" }), s = URL.createObjectURL(e), a = document.createElement("a");
67
- document.body.appendChild(a), a.href = s, a.download = d, a.style.display = "none", a.click(), setTimeout(() => {
69
+ document.body.appendChild(a), a.href = s, a.download = c, a.style.display = "none", a.click(), setTimeout(() => {
68
70
  URL.revokeObjectURL(s), document.body.removeChild(a);
69
71
  }, 10);
70
72
  }
71
- c(I, "download");
72
- async function U(d = 150, o = "filename") {
73
+ d(I, "download");
74
+ async function E(c = 150, o = "filename") {
73
75
  var C, L;
74
76
  if (!l.value) throw new Error("Current PDFDocumentProxy have not loaded yet");
75
- const e = await ((C = l.value) == null ? void 0 : C.saveDocument()), a = await S(e.buffer).promise, n = d / 72, u = 96 / 72, g = await G(), t = g.contentWindow;
77
+ const e = await ((C = l.value) == null ? void 0 : C.saveDocument()), a = await S(e.buffer).promise, n = c / 72, u = 96 / 72, v = await G(), t = v.contentWindow;
76
78
  t.document.title = o;
77
- const E = [...Array(a.numPages).keys()].map((p) => p + 1);
78
- for (const p of E) {
79
- const v = await a.getPage(p), m = v.getViewport({ scale: 1 });
79
+ const U = [...Array(a.numPages).keys()].map((p) => p + 1);
80
+ for (const p of U) {
81
+ const y = await a.getPage(p), m = y.getViewport({ scale: 1 });
80
82
  p === 1 && J(
81
83
  t,
82
84
  m.width * n / u,
@@ -85,28 +87,28 @@ function Y(r, h, i = {
85
87
  const f = document.createElement("canvas");
86
88
  f.width = m.width * n, f.height = m.height * n;
87
89
  const R = f.cloneNode();
88
- t == null || t.document.body.appendChild(R), await (v == null ? void 0 : v.render({
90
+ t == null || t.document.body.appendChild(R), await (y == null ? void 0 : y.render({
89
91
  canvasContext: f.getContext("2d"),
90
92
  intent: "print",
91
93
  transform: [n, 0, 0, n, 0, 0],
92
94
  viewport: m
93
95
  }).promise), (L = R.getContext("2d")) == null || L.drawImage(f, 0, 0);
94
96
  }
95
- t == null || t.focus(), t == null || t.print(), document.body.removeChild(g);
97
+ t == null || t.focus(), t == null || t.print(), document.body.removeChild(v);
96
98
  }
97
- return c(U, "print"), A(r) ? (r.value && w(r.value), O(r, () => {
98
- r.value && w(r.value);
99
- })) : r && w(r), {
99
+ return d(E, "print"), A(r) ? (r.value && g(r.value), O(r, () => {
100
+ r.value && g(r.value);
101
+ })) : r && g(r), {
100
102
  pdf: P,
101
103
  pages: b,
102
104
  info: D,
103
- print: U,
105
+ print: E,
104
106
  download: I,
105
107
  getPDFDestination: x,
106
- processLoadingTask: w
108
+ processLoadingTask: g
107
109
  };
108
110
  }
109
- c(Y, "usePDF");
111
+ d(Y, "usePDF");
110
112
  export {
111
113
  Y as usePDF
112
114
  };
@@ -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-610acd0b"]]);exports.default=u;
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-11f81900"]]);exports.default=u;
@@ -1,7 +1,7 @@
1
1
  import o from "./index2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-610acd0b"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-11f81900"]]);
5
5
  export {
6
- a as default
6
+ f as default
7
7
  };
@@ -1 +1 @@
1
- "use strict";var v=Object.defineProperty;var u=(r,o)=>v(r,"name",{value:o,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),y=,/* empty css */S=,/* empty css */a=,/* empty css */w=,/* empty css */_=e.defineComponent({name:"LSTooltip"}),C=e.defineComponent({..._,props:S.lsTooltipProps,setup(r){const o=r,p=y.useNamespace("tooltip").b(),s=e.ref(!1),i=e.ref(),d=e.useAttrs(),c=e.computed(()=>{const t=o.width;let n="100%";return(t.endsWith("%")||t.endsWith("px"))&&!a.isEmpty(parseInt(t))?n=t:a.isEmpty(Number(t))||(n=`${t}px`),{width:n}}),f=e.computed(()=>d.content||""),m=e.computed(()=>{const t=o.lineClamp>1?Object.assign({height:"auto"},c.value):{width:"auto",height:0},n=o.fontSize;n&&(t.fontSize=`${n}px`);const l=o.lineHeight;return l&&(t.lineHeight=`${l}px`),t});function h(){g()}u(h,"onMouseEnter");async function g(){if(await e.nextTick(),i.value){const t=i.value.getBoundingClientRect(),n=i.value.querySelector(".temp-content").getBoundingClientRect();o.lineClamp<=1?n.width>t.width?s.value=!0:s.value=!1:n.height>t.height?s.value=!0:s.value=!1}}return u(g,"updateTooltip"),(t,n)=>{const l=w.ElTooltip;return e.openBlock(),e.createElementBlock("div",{ref_key:"lsTooltipRef",ref:i,class:e.normalizeClass(e.unref(p)),style:e.normalizeStyle(e.unref(c)),onMouseenter:h},[e.createElementVNode("div",{class:"temp-content",style:e.normalizeStyle(e.unref(m))},e.toDisplayString(e.unref(f)),5),e.createVNode(l,e.mergeProps({disabled:!e.unref(s)},t.$attrs),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),content:e.withCtx(()=>[e.renderSlot(t.$slots,"content",{},void 0,!0)]),_:3},16,["disabled"])],38)}}});exports.default=C;
1
+ "use strict";var y=Object.defineProperty;var u=(l,o)=>y(l,"name",{value:o,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),S=,/* empty css */v=,/* empty css */a=,/* empty css */w=,/* empty css */_=e.defineComponent({name:"LSTooltip"}),C=e.defineComponent({..._,props:v.lsTooltipProps,setup(l){const o=l,p=S.useNamespace("tooltip").b(),r=e.ref(!1),s=e.ref(),d=e.useAttrs(),c=e.computed(()=>{const t=o.width.toString();let n="100%";return(t.endsWith("%")||t.endsWith("px"))&&!a.isEmpty(parseInt(t))?n=t:a.isEmpty(Number(t))||(n=`${t}px`),{width:n}}),f=e.computed(()=>d.content||""),m=e.computed(()=>{const t=o.lineClamp>1?Object.assign({height:"auto"},c.value):{width:"auto",height:0},n=o.fontSize;n&&(t.fontSize=`${n}px`);const i=o.lineHeight;return i&&(t.lineHeight=`${i}px`),t});function h(){g()}u(h,"onMouseEnter");async function g(){if(await e.nextTick(),s.value){const t=s.value.getBoundingClientRect(),n=s.value.querySelector(".temp-content").getBoundingClientRect();o.lineClamp<=1?r.value=n.width>t.width:r.value=n.height>t.height}}return u(g,"updateTooltip"),(t,n)=>{const i=w.ElTooltip;return e.openBlock(),e.createElementBlock("div",{ref_key:"lsTooltipRef",ref:s,class:e.normalizeClass(e.unref(p)),style:e.normalizeStyle(e.unref(c)),onMouseenter:h},[e.createElementVNode("div",{class:"temp-content",style:e.normalizeStyle(e.unref(m))},e.toDisplayString(e.unref(f)),5),e.createVNode(i,e.mergeProps({disabled:!e.unref(r)},t.$attrs),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),content:e.withCtx(()=>[e.renderSlot(t.$slots,"content",{},void 0,!0)]),_:3},16,["disabled"])],38)}}});exports.default=C;
@@ -1,9 +1,9 @@
1
1
  var T = Object.defineProperty;
2
- var a = (r, o) => T(r, "name", { value: o, configurable: !0 });
2
+ var c = (l, o) => T(l, "name", { value: o, configurable: !0 });
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  /* empty css */
6
- import { defineComponent as g, ref as u, useAttrs as $, computed as c, openBlock as b, createElementBlock as x, normalizeClass as z, unref as s, normalizeStyle as m, createElementVNode as E, toDisplayString as k, createVNode as B, mergeProps as N, withCtx as f, renderSlot as d, nextTick as R } from "vue";
6
+ import { defineComponent as g, ref as m, useAttrs as B, computed as p, openBlock as $, createElementBlock as b, normalizeClass as x, unref as n, normalizeStyle as u, createElementVNode as z, toDisplayString as E, createVNode as k, mergeProps as N, withCtx as f, renderSlot as d, nextTick as R } from "vue";
7
7
  import { useNamespace as W } from "../../_hooks/useNamespace/index.js";
8
8
  import { lsTooltipProps as H } from "../types/index.js";
9
9
  import { isEmpty as h } from "../../_utils/utils/index.js";
@@ -13,52 +13,52 @@ const P = g({
13
13
  }), J = /* @__PURE__ */ g({
14
14
  ...P,
15
15
  props: H,
16
- setup(r) {
17
- const o = r, v = W("tooltip").b(), n = u(!1), i = u(), w = $(), p = c(() => {
18
- const t = o.width;
16
+ setup(l) {
17
+ const o = l, w = W("tooltip").b(), r = m(!1), i = m(), y = B(), a = p(() => {
18
+ const t = o.width.toString();
19
19
  let e = "100%";
20
20
  return (t.endsWith("%") || t.endsWith("px")) && !h(parseInt(t)) ? e = t : h(Number(t)) || (e = `${t}px`), {
21
21
  width: e
22
22
  };
23
- }), y = c(() => w.content || ""), _ = c(() => {
23
+ }), v = p(() => y.content || ""), S = p(() => {
24
24
  const t = o.lineClamp > 1 ? Object.assign(
25
25
  {
26
26
  height: "auto"
27
27
  },
28
- p.value
28
+ a.value
29
29
  ) : {
30
30
  width: "auto",
31
31
  height: 0
32
32
  }, e = o.fontSize;
33
33
  e && (t.fontSize = `${e}px`);
34
- const l = o.lineHeight;
35
- return l && (t.lineHeight = `${l}px`), t;
34
+ const s = o.lineHeight;
35
+ return s && (t.lineHeight = `${s}px`), t;
36
36
  });
37
- function C() {
38
- S();
37
+ function _() {
38
+ C();
39
39
  }
40
- a(C, "onMouseEnter");
41
- async function S() {
40
+ c(_, "onMouseEnter");
41
+ async function C() {
42
42
  if (await R(), i.value) {
43
43
  const t = i.value.getBoundingClientRect(), e = i.value.querySelector(".temp-content").getBoundingClientRect();
44
- o.lineClamp <= 1 ? e.width > t.width ? n.value = !0 : n.value = !1 : e.height > t.height ? n.value = !0 : n.value = !1;
44
+ o.lineClamp <= 1 ? r.value = e.width > t.width : r.value = e.height > t.height;
45
45
  }
46
46
  }
47
- return a(S, "updateTooltip"), (t, e) => {
48
- const l = M;
49
- return b(), x("div", {
47
+ return c(C, "updateTooltip"), (t, e) => {
48
+ const s = M;
49
+ return $(), b("div", {
50
50
  ref_key: "lsTooltipRef",
51
51
  ref: i,
52
- class: z(s(v)),
53
- style: m(s(p)),
54
- onMouseenter: C
52
+ class: x(n(w)),
53
+ style: u(n(a)),
54
+ onMouseenter: _
55
55
  }, [
56
- E("div", {
56
+ z("div", {
57
57
  class: "temp-content",
58
- style: m(s(_))
59
- }, k(s(y)), 5),
60
- B(l, N({
61
- disabled: !s(n)
58
+ style: u(n(S))
59
+ }, E(n(v)), 5),
60
+ k(s, N({
61
+ disabled: !n(r)
62
62
  }, t.$attrs), {
63
63
  default: f(() => [
64
64
  d(t.$slots, "default", {}, void 0, !0)
@@ -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-70fd2b26"]]);exports.default=u;
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-96110588"]]);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 f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-70fd2b26"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-96110588"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };