@lingshugroup/web-plus 1.5.2 → 1.6.0

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 (33) hide show
  1. package/lib/downloadFile/index.cjs +1 -0
  2. package/lib/downloadFile/index.js +12 -0
  3. package/lib/index/index.cjs +1 -1
  4. package/lib/index/index.js +20 -18
  5. package/lib/index/index.js.br +0 -0
  6. package/lib/index/index.js.gz +0 -0
  7. package/lib/index.css +1 -1
  8. package/lib/index.css.br +0 -0
  9. package/lib/index.css.gz +0 -0
  10. package/lib/packages/ls-components/components/_utils/utils/index.cjs +1 -1
  11. package/lib/packages/ls-components/components/_utils/utils/index.js +117 -64
  12. package/lib/packages/ls-components/components/_utils/utils/index.js.br +0 -0
  13. package/lib/packages/ls-components/components/_utils/utils/index.js.gz +0 -0
  14. package/lib/packages/ls-components/components/downloadFile/Index.vue/index.cjs +1 -0
  15. package/lib/packages/ls-components/components/downloadFile/Index.vue/index.js +94 -0
  16. package/lib/packages/ls-components/components/downloadFile/Index.vue/index.js.br +0 -0
  17. package/lib/packages/ls-components/components/downloadFile/Index.vue/index.js.gz +0 -0
  18. package/lib/packages/ls-components/components/downloadFile/Index.vue/index2.cjs +1 -0
  19. package/lib/packages/ls-components/components/downloadFile/Index.vue/index2.js +4 -0
  20. package/lib/packages/ls-components/components/downloadFile/types/index.cjs +1 -0
  21. package/lib/packages/ls-components/components/downloadFile/types/index.js +46 -0
  22. package/lib/packages/ls-components/components/index/index.cjs +1 -1
  23. package/lib/packages/ls-components/components/index/index.js +35 -33
  24. package/lib/packages/ls-components/components/index/index.js.br +0 -0
  25. package/lib/packages/ls-components/components/index/index.js.gz +0 -0
  26. package/lib/types/components/_utils/index.d.ts +2 -1
  27. package/lib/types/components/_utils/utils.d.ts +17 -0
  28. package/lib/types/components/downloadFile/Index.vue.d.ts +34 -0
  29. package/lib/types/components/downloadFile/index.d.ts +78 -0
  30. package/lib/types/components/downloadFile/types.d.ts +12 -0
  31. package/lib/utils/index.cjs +1 -1
  32. package/lib/utils/index.js +2 -0
  33. package/package.json +1 -1
package/lib/index.css.br CHANGED
Binary file
package/lib/index.css.gz CHANGED
Binary file
@@ -1 +1 @@
1
- "use strict";var a=Object.defineProperty;var n=(t,e)=>a(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function f(t){if(t===null)return!0;const e=typeof t;return!!(e==="undefined"||e==="string"&&(t=t.replace(/^\s*|\s*$/g,""),t==="")||e==="number"&&Number.isNaN(t)||e==="object"&&Object.keys(t).length===0)}n(f,"isEmpty");const d=n((t=[])=>{const e=[];return t.forEach(o=>{e.push(new Promise((c,u)=>{const r=document.createElement("script");r.id=o.id,r.src=o.src,document.body.appendChild(r),r.onload=function(){c({})},r.onerror=function(){r.remove(),u({})}}))}),Promise.all(e)},"loadJs"),p=n((t=[])=>{t.forEach(e=>{const o=document.getElementById(e.id);o&&o.remove()})},"removeJs"),h=n((t=[])=>{const e=[];return t.forEach(o=>{e.push(new Promise((c,u)=>{const r=document.createElement("link");r.id=o.id,r.rel="stylesheet",r.href=o.src,document.body.appendChild(r),r.onload=function(){c({})},r.onerror=function(){r.remove(),u({})}}))}),Promise.all(e)},"loadCss"),m=n((t=[])=>{t.forEach(e=>{const o=document.getElementById(e.id);o&&o.remove()})},"removeCss");function s(t,e){return Number((Math.ceil(t*100)/100).toFixed(e||1))}n(s,"numberFixed");function b(t,e,o){const c=t,u=e;o=o||0,t=s(t,o),e=s(e,o);let r=s((t-e)/2,o);r=r==0?.1:r;let l=Math.ceil((t-e)/r);l=l==0?1:l,e<r&&(e=0);let i=s(r*l+e,o);return i<=c&&(i=s(i+r,o)),{aMax:i,aMin:e==0||e<u?e:s(e-r,o),aInterval:r}}n(b,"formatChartAxis");function y(t){try{return t=JSON.parse(t),t!==null&&typeof t=="object"?t.constructor===Object:!1}catch{return!1}}n(y,"isValidJSON");exports.formatChartAxis=b;exports.isEmpty=f;exports.isValidJSON=y;exports.loadCss=h;exports.loadJs=d;exports.numberFixed=s;exports.removeCss=m;exports.removeJs=p;
1
+ "use strict";var C=Object.defineProperty;var s=(e,t)=>C(e,"name",{value:t,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function f(e){if(e===null)return!0;const t=typeof e;return!!(t==="undefined"||t==="string"&&(e=e.replace(/^\s*|\s*$/g,""),e==="")||t==="number"&&Number.isNaN(e)||t==="object"&&Object.keys(e).length===0)}s(f,"isEmpty");function a(e,t){try{const n=new Blob([e]),c=URL.createObjectURL(n),o=document.createElement("a");o.style.display="none",o.href=c,o.download=t,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(c)}catch{}}s(a,"exportFile");function d(e){if(f(e))return"";const t=e.lastIndexOf(".");return t>=0?e.substring(t):""}s(d,"getExtension");const h=s((e=[])=>{const t=[];return e.forEach(n=>{t.push(new Promise((c,o)=>{const r=document.createElement("script");r.id=n.id,r.src=n.src,document.body.appendChild(r),r.onload=function(){c({})},r.onerror=function(){r.remove(),o({})}}))}),Promise.all(t)},"loadJs"),b=s((e=[])=>{e.forEach(t=>{const n=document.getElementById(t.id);n&&n.remove()})},"removeJs"),p=s((e=[])=>{const t=[];return e.forEach(n=>{t.push(new Promise((c,o)=>{const r=document.createElement("link");r.id=n.id,r.rel="stylesheet",r.href=n.src,document.body.appendChild(r),r.onload=function(){c({})},r.onerror=function(){r.remove(),o({})}}))}),Promise.all(t)},"loadCss"),y=s((e=[])=>{e.forEach(t=>{const n=document.getElementById(t.id);n&&n.remove()})},"removeCss");function m(){return`#${Math.floor(Math.random()*16777215).toString(16).padStart(6,"0")}`}s(m,"getRandomHexColor");function u(e,t){return Number((Math.ceil(e*100)/100).toFixed(t||1))}s(u,"numberFixed");function M(e,t,n){const c=e,o=t;n=n||0,e=u(e,n),t=u(t,n);let r=u((e-t)/2,n);r=r==0?.1:r;let i=Math.ceil((e-t)/r);i=i==0?1:i,t<r&&(t=0);let l=u(r*i+t,n);return l<=c&&(l=u(l+r,n)),{aMax:l,aMin:t==0||t<o?t:u(t-r,n),aInterval:r}}s(M,"formatChartAxis");function g(e){try{return e=JSON.parse(e),e!==null&&typeof e=="object"?e.constructor===Object:!1}catch{return!1}}s(g,"isValidJSON");function E(e){const t=e.reduce((r,i)=>r+i.byteLength,0),n=new ArrayBuffer(t),c=new Uint8Array(n);let o=0;return e.forEach(r=>{c.set(new Uint8Array(r.file),o),o+=r.byteLength}),c}s(E,"mergeBuffer");function w(e){const t=window.atob(e),n=t.length,c=new Uint8Array(n);for(let o=0;o<n;o++)c[o]=t.charCodeAt(o);return new Uint8Array(c).buffer}s(w,"fileToBuffer");const v={isEmpty:f,exportFile:a,getExtension:d,loadJs:h,removeJs:b,loadCss:p,removeCss:y,getRandomHexColor:m,numberFixed:u,isValidJSON:g,mergeBuffer:E,fileToBuffer:w};exports.default=v;exports.exportFile=a;exports.fileToBuffer=w;exports.formatChartAxis=M;exports.getExtension=d;exports.getRandomHexColor=m;exports.isEmpty=f;exports.isValidJSON=g;exports.loadCss=p;exports.loadJs=h;exports.mergeBuffer=E;exports.numberFixed=u;exports.removeCss=y;exports.removeJs=b;
@@ -1,84 +1,137 @@
1
- var f = Object.defineProperty;
2
- var o = (t, e) => f(t, "name", { value: e, configurable: !0 });
3
- function d(t) {
4
- if (t === null) return !0;
5
- const e = typeof t;
6
- return !!(e === "undefined" || e === "string" && (t = t.replace(/^\s*|\s*$/g, ""), t === "") || e === "number" && Number.isNaN(t) || e === "object" && Object.keys(t).length === 0);
1
+ var a = Object.defineProperty;
2
+ var s = (e, t) => a(e, "name", { value: t, configurable: !0 });
3
+ function f(e) {
4
+ if (e === null) return !0;
5
+ const t = typeof e;
6
+ return !!(t === "undefined" || t === "string" && (e = e.replace(/^\s*|\s*$/g, ""), e === "") || t === "number" && Number.isNaN(e) || t === "object" && Object.keys(e).length === 0);
7
7
  }
8
- o(d, "isEmpty");
9
- const p = /* @__PURE__ */ o((t = []) => {
10
- const e = [];
11
- return t.forEach((n) => {
12
- e.push(
13
- new Promise((s, u) => {
14
- const r = document.createElement("script");
15
- r.id = n.id, r.src = n.src, document.body.appendChild(r), r.onload = function() {
16
- s({});
17
- }, r.onerror = function() {
18
- r.remove(), u({});
8
+ s(f, "isEmpty");
9
+ function d(e, t) {
10
+ try {
11
+ const r = new Blob([e]), c = URL.createObjectURL(r), o = document.createElement("a");
12
+ o.style.display = "none", o.href = c, o.download = t, document.body.appendChild(o), o.click(), o.remove(), URL.revokeObjectURL(c);
13
+ } catch {
14
+ }
15
+ }
16
+ s(d, "exportFile");
17
+ function h(e) {
18
+ if (f(e)) return "";
19
+ const t = e.lastIndexOf(".");
20
+ return t >= 0 ? e.substring(t) : "";
21
+ }
22
+ s(h, "getExtension");
23
+ const b = /* @__PURE__ */ s((e = []) => {
24
+ const t = [];
25
+ return e.forEach((r) => {
26
+ t.push(
27
+ new Promise((c, o) => {
28
+ const n = document.createElement("script");
29
+ n.id = r.id, n.src = r.src, document.body.appendChild(n), n.onload = function() {
30
+ c({});
31
+ }, n.onerror = function() {
32
+ n.remove(), o({});
19
33
  };
20
34
  })
21
35
  );
22
- }), Promise.all(e);
23
- }, "loadJs"), h = /* @__PURE__ */ o((t = []) => {
24
- t.forEach((e) => {
25
- const n = document.getElementById(e.id);
26
- n && n.remove();
36
+ }), Promise.all(t);
37
+ }, "loadJs"), p = /* @__PURE__ */ s((e = []) => {
38
+ e.forEach((t) => {
39
+ const r = document.getElementById(t.id);
40
+ r && r.remove();
27
41
  });
28
- }, "removeJs"), b = /* @__PURE__ */ o((t = []) => {
29
- const e = [];
30
- return t.forEach((n) => {
31
- e.push(
32
- new Promise((s, u) => {
33
- const r = document.createElement("link");
34
- r.id = n.id, r.rel = "stylesheet", r.href = n.src, document.body.appendChild(r), r.onload = function() {
35
- s({});
36
- }, r.onerror = function() {
37
- r.remove(), u({});
42
+ }, "removeJs"), y = /* @__PURE__ */ s((e = []) => {
43
+ const t = [];
44
+ return e.forEach((r) => {
45
+ t.push(
46
+ new Promise((c, o) => {
47
+ const n = document.createElement("link");
48
+ n.id = r.id, n.rel = "stylesheet", n.href = r.src, document.body.appendChild(n), n.onload = function() {
49
+ c({});
50
+ }, n.onerror = function() {
51
+ n.remove(), o({});
38
52
  };
39
53
  })
40
54
  );
41
- }), Promise.all(e);
42
- }, "loadCss"), y = /* @__PURE__ */ o((t = []) => {
43
- t.forEach((e) => {
44
- const n = document.getElementById(e.id);
45
- n && n.remove();
55
+ }), Promise.all(t);
56
+ }, "loadCss"), g = /* @__PURE__ */ s((e = []) => {
57
+ e.forEach((t) => {
58
+ const r = document.getElementById(t.id);
59
+ r && r.remove();
46
60
  });
47
61
  }, "removeCss");
48
- function c(t, e) {
49
- return Number((Math.ceil(t * 100) / 100).toFixed(e || 1));
62
+ function m() {
63
+ return `#${Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0")}`;
50
64
  }
51
- o(c, "numberFixed");
52
- function m(t, e, n) {
53
- const s = t, u = e;
54
- n = n || 0, t = c(t, n), e = c(e, n);
55
- let r = c((t - e) / 2, n);
56
- r = r == 0 ? 0.1 : r;
57
- let l = Math.ceil((t - e) / r);
58
- l = l == 0 ? 1 : l, e < r && (e = 0);
59
- let i = c(r * l + e, n);
60
- return i <= s && (i = c(i + r, n)), {
61
- aMax: i,
62
- aMin: e == 0 || e < u ? e : c(e - r, n),
63
- aInterval: r
65
+ s(m, "getRandomHexColor");
66
+ function u(e, t) {
67
+ return Number((Math.ceil(e * 100) / 100).toFixed(t || 1));
68
+ }
69
+ s(u, "numberFixed");
70
+ function C(e, t, r) {
71
+ const c = e, o = t;
72
+ r = r || 0, e = u(e, r), t = u(t, r);
73
+ let n = u((e - t) / 2, r);
74
+ n = n == 0 ? 0.1 : n;
75
+ let i = Math.ceil((e - t) / n);
76
+ i = i == 0 ? 1 : i, t < n && (t = 0);
77
+ let l = u(n * i + t, r);
78
+ return l <= c && (l = u(l + n, r)), {
79
+ aMax: l,
80
+ aMin: t == 0 || t < o ? t : u(t - n, r),
81
+ aInterval: n
64
82
  };
65
83
  }
66
- o(m, "formatChartAxis");
67
- function E(t) {
84
+ s(C, "formatChartAxis");
85
+ function w(e) {
68
86
  try {
69
- return t = JSON.parse(t), t !== null && typeof t == "object" ? t.constructor === Object : !1;
87
+ return e = JSON.parse(e), e !== null && typeof e == "object" ? e.constructor === Object : !1;
70
88
  } catch {
71
89
  return !1;
72
90
  }
73
91
  }
74
- o(E, "isValidJSON");
92
+ s(w, "isValidJSON");
93
+ function E(e) {
94
+ const t = e.reduce((n, i) => n + i.byteLength, 0), r = new ArrayBuffer(t), c = new Uint8Array(r);
95
+ let o = 0;
96
+ return e.forEach((n) => {
97
+ c.set(new Uint8Array(n.file), o), o += n.byteLength;
98
+ }), c;
99
+ }
100
+ s(E, "mergeBuffer");
101
+ function U(e) {
102
+ const t = window.atob(e), r = t.length, c = new Uint8Array(r);
103
+ for (let o = 0; o < r; o++)
104
+ c[o] = t.charCodeAt(o);
105
+ return new Uint8Array(c).buffer;
106
+ }
107
+ s(U, "fileToBuffer");
108
+ const M = {
109
+ isEmpty: f,
110
+ exportFile: d,
111
+ getExtension: h,
112
+ loadJs: b,
113
+ removeJs: p,
114
+ loadCss: y,
115
+ removeCss: g,
116
+ getRandomHexColor: m,
117
+ numberFixed: u,
118
+ isValidJSON: w,
119
+ mergeBuffer: E,
120
+ fileToBuffer: U
121
+ };
75
122
  export {
76
- m as formatChartAxis,
77
- d as isEmpty,
78
- E as isValidJSON,
79
- b as loadCss,
80
- p as loadJs,
81
- c as numberFixed,
82
- y as removeCss,
83
- h as removeJs
123
+ M as default,
124
+ d as exportFile,
125
+ U as fileToBuffer,
126
+ C as formatChartAxis,
127
+ h as getExtension,
128
+ m as getRandomHexColor,
129
+ f as isEmpty,
130
+ w as isValidJSON,
131
+ y as loadCss,
132
+ b as loadJs,
133
+ E as mergeBuffer,
134
+ u as numberFixed,
135
+ g as removeCss,
136
+ p as removeJs
84
137
  };
@@ -0,0 +1 @@
1
+ "use strict";var M=Object.defineProperty;var s=(d,m)=>M(d,"name",{value:m,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */const e=require("vue"),T=,/* empty css */C=,/* empty css */j=,/* empty css */I=e.defineComponent({name:"LSDownloadFile"}),O=e.defineComponent({...I,props:C.lsDownloadProp,emits:C.emitNames,setup(d,{expose:m,emit:w}){const D=T.useNamespace("download-file").b(),n=d,g=w,o=e.ref({strokeWidth:15,striped:!0,stripedFlow:!0,percentage:0,duration:10}),v=e.ref([]),i=e.ref([]),a=e.ref([]),h=e.ref([]),l=e.ref([]),r=e.ref(0),k=e.computed(()=>n.maxErrorNum<=a.value.length),x=e.computed(()=>i.value.length===n.chunkTotal);function y(){E()}s(y,"start");function b(){i.value=[],a.value=[],h.value=[],o.value.status="",l.value=[],r.value=0}s(b,"reset");function P(){l.value=Array.from({length:n.chunkTotal},(t,u)=>u+1)}s(P,"initChunkQueue");function _(){return Math.ceil(i.value.length/n.chunkTotal*100)}s(_,"setPercentage");async function E(){r.value==0&&(b(),P()),o.value.percentage=_(),N()}s(E,"initDownload");async function N(){if(a.value.length>0){const t=Math.max(...a.value),u=n.initRequstNum-a.value.length||0;l.value=a.value.concat(Array.from({length:u},(f,p)=>p+t+1))}l.value.forEach(t=>{q(t)})}s(N,"downloadChunk");async function q(t){r.value++;const u=t-1;v.value[u]=new AbortController;const f=v.value[u].signal;return new Promise(async(p,R)=>{const A=n.chunkDataRequestParams?Object.assign(n.chunkDataRequestParams,{chunk:t}):{id:n.recordId,chunk:t};try{const c=await n.chunkDataRequest(Object.assign(A),n.chunkDataRequestConfig||{signal:f});r.value--,h.value[u]=c,i.value.includes(t)||i.value.push(t),o.value.percentage=_(),p(c)}catch(c){a.value.includes(t)||a.value.push(t),R(c)}finally{r.value===0&&a.value.length>0||k.value?(o.value.status="exception",g("onDownloadError",{errChunk:a.value}),n.cancelUploadInLimit&&v.value.forEach(c=>c.abort())):r.value!==0&&!k.value&&l.value.length!=n.chunkTotal?q(l.value.length):x.value&&(o.value.status="success",g("onDownloadSuccess",h.value))}})}return s(q,"chunkDataRequestFunc"),e.onUnmounted(()=>{v.value.forEach(t=>t.abort())}),m({start:y}),(t,u)=>{const f=j.ElProgress;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(D))},[e.createVNode(f,e.normalizeProps(e.guardReactiveProps(Object.assign(e.unref(o),t.$attrs))),null,16)],2)}}});exports.default=O;
@@ -0,0 +1,94 @@
1
+ var j = Object.defineProperty;
2
+ var o = (f, p) => j(f, "name", { value: p, configurable: !0 });
3
+ /* empty css */
4
+ /* empty css */
5
+ import { defineComponent as x, ref as s, computed as C, onUnmounted as F, openBlock as L, createElementBlock as M, normalizeClass as O, unref as D, createVNode as z, normalizeProps as B, guardReactiveProps as Q } from "vue";
6
+ import { useNamespace as S } from "../../_hooks/useNamespace/index.js";
7
+ import { lsDownloadProp as U, emitNames as V } from "../types/index.js";
8
+ import { ElProgress as W } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/progress/index/index.js";
9
+ const $ = x({
10
+ name: "LSDownloadFile"
11
+ }), ae = /* @__PURE__ */ x({
12
+ ...$,
13
+ props: U,
14
+ emits: V,
15
+ setup(f, { expose: p, emit: y }) {
16
+ const E = S("download-file").b(), a = f, g = y, u = s({
17
+ strokeWidth: 15,
18
+ striped: !0,
19
+ stripedFlow: !0,
20
+ percentage: 0,
21
+ duration: 10
22
+ }), v = s([]), i = s([]), t = s([]), d = s([]), l = s([]), r = s(0), k = C(() => a.maxErrorNum <= t.value.length), P = C(() => i.value.length === a.chunkTotal);
23
+ function b() {
24
+ N();
25
+ }
26
+ o(b, "start");
27
+ function R() {
28
+ i.value = [], t.value = [], d.value = [], u.value.status = "", l.value = [], r.value = 0;
29
+ }
30
+ o(R, "reset");
31
+ function q() {
32
+ l.value = Array.from({ length: a.chunkTotal }, (e, n) => n + 1);
33
+ }
34
+ o(q, "initChunkQueue");
35
+ function _() {
36
+ return Math.ceil(i.value.length / a.chunkTotal * 100);
37
+ }
38
+ o(_, "setPercentage");
39
+ async function N() {
40
+ r.value == 0 && (R(), q()), u.value.percentage = _(), A();
41
+ }
42
+ o(N, "initDownload");
43
+ async function A() {
44
+ if (t.value.length > 0) {
45
+ const e = Math.max(...t.value), n = a.initRequstNum - t.value.length || 0;
46
+ l.value = t.value.concat(Array.from({ length: n }, (m, h) => h + e + 1));
47
+ }
48
+ l.value.forEach((e) => {
49
+ w(e);
50
+ });
51
+ }
52
+ o(A, "downloadChunk");
53
+ async function w(e) {
54
+ r.value++;
55
+ const n = e - 1;
56
+ v.value[n] = new AbortController();
57
+ const m = v.value[n].signal;
58
+ return new Promise(async (h, I) => {
59
+ const T = a.chunkDataRequestParams ? Object.assign(a.chunkDataRequestParams, { chunk: e }) : {
60
+ id: a.recordId,
61
+ chunk: e
62
+ };
63
+ try {
64
+ const c = await a.chunkDataRequest(
65
+ Object.assign(T),
66
+ a.chunkDataRequestConfig || {
67
+ signal: m
68
+ }
69
+ );
70
+ r.value--, d.value[n] = c, i.value.includes(e) || i.value.push(e), u.value.percentage = _(), h(c);
71
+ } catch (c) {
72
+ t.value.includes(e) || t.value.push(e), I(c);
73
+ } finally {
74
+ r.value === 0 && t.value.length > 0 || k.value ? (u.value.status = "exception", g("onDownloadError", {
75
+ errChunk: t.value
76
+ }), a.cancelUploadInLimit && v.value.forEach((c) => c.abort())) : r.value !== 0 && !k.value && l.value.length != a.chunkTotal ? w(l.value.length) : P.value && (u.value.status = "success", g("onDownloadSuccess", d.value));
77
+ }
78
+ });
79
+ }
80
+ return o(w, "chunkDataRequestFunc"), F(() => {
81
+ v.value.forEach((e) => e.abort());
82
+ }), p({ start: b }), (e, n) => {
83
+ const m = W;
84
+ return L(), M("div", {
85
+ class: O(D(E))
86
+ }, [
87
+ z(m, B(Q(Object.assign(D(u), e.$attrs))), null, 16)
88
+ ], 2);
89
+ };
90
+ }
91
+ });
92
+ export {
93
+ ae as default
94
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.cjs");exports.default=e.default;
@@ -0,0 +1,4 @@
1
+ import f from "./index.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../_utils/runtime/index.cjs"),t=e.buildProps({recordId:{type:[String,Number],default:""},chunkTotal:{type:Number,default:0},chunkDataRequest:{type:Function,default:null},chunkDataRequestParams:{type:Object,default:null},chunkDataRequestConfig:{type:Object,default:null},initRequstNum:{type:Number,default:10},maxErrorNum:{type:Number,default:6},cancelUploadInLimit:{type:Boolean,default:!0}}),u=["onDownloadSuccess","onDownloadError"];exports.emitNames=u;exports.lsDownloadProp=t;
@@ -0,0 +1,46 @@
1
+ import { buildProps as e } from "../../_utils/runtime/index.js";
2
+ const u = e({
3
+ // 数据记录id
4
+ recordId: {
5
+ type: [String, Number],
6
+ default: ""
7
+ },
8
+ // 下载分片总数量
9
+ chunkTotal: {
10
+ type: Number,
11
+ default: 0
12
+ },
13
+ // 分片下载请求
14
+ chunkDataRequest: {
15
+ type: Function,
16
+ default: null
17
+ },
18
+ // 分片下载请求参数
19
+ chunkDataRequestParams: {
20
+ type: Object,
21
+ default: null
22
+ },
23
+ chunkDataRequestConfig: {
24
+ type: Object,
25
+ default: null
26
+ },
27
+ // 初始请求数量
28
+ initRequstNum: {
29
+ type: Number,
30
+ default: 10
31
+ },
32
+ // 最大异常请求数
33
+ maxErrorNum: {
34
+ type: Number,
35
+ default: 6
36
+ },
37
+ // 超出上限是否取消上传
38
+ cancelUploadInLimit: {
39
+ type: Boolean,
40
+ default: !0
41
+ }
42
+ }), a = ["onDownloadSuccess", "onDownloadError"];
43
+ export {
44
+ a as emitNames,
45
+ u as lsDownloadProp
46
+ };
@@ -1 +1 @@
1
- "use strict";var s=Object.defineProperty;var o=(t,r)=>s(t,"name",{value:r,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("@element-plus/icons-vue"),i=require("../../../../button/index.cjs"),l=require("../../../../descriptions/index.cjs"),c=require("../../../../form/index.cjs"),d=require("../../../../table/index.cjs"),f=require("../../../../upload/index.cjs"),S=require("../../../../preview/index.cjs"),L=require("../../../../menu/index.cjs"),m=require("../../../../icon/index.cjs"),q=require("../../../../confirm/index.cjs"),p=require("../../../../chart/index.cjs"),b=require("../../../../breadcrumb/index.cjs"),v=require("../../../../bellMessage/index.cjs"),g=require("../../../../live/index.cjs"),P=require("../../../../tree/index.cjs"),w=require("../../../../print/index.cjs"),y=require("../../../../containerBox/index.cjs"),B=require("../../../../backTop/index.cjs"),_=require("../../../../map/index.cjs"),O=require("../../../../editor/index.cjs"),j=require("../../../../dialog/index.cjs"),x=require("../../../../layout/index.cjs"),M=require("../../../../list/index.cjs"),k=require("../../../../preview_image/index.cjs"),I=require("../../../../preview_docx/index.cjs"),T=require("../../../../preview_pdf/index.cjs"),D=require("../../../../preview_xlsx/index.cjs");function F(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:o(()=>t[e],"get")})}}return r.default=t,Object.freeze(r)}o(F,"_interopNamespaceDefault");const C=F(a),u={LSButtonGroup:i.LSButtonGroup,LSButton:i.LSButton,LSDescriptions:l.default,LSUpload:f.default,LSPreview:S.default,LSForm:c.LSForm,LSFormItem:c.LSFormItem,LSTable:d.default,LSMenu:L.default,LSIcon:m.default,LSConfirm:q.default,LSChart:p.default,LSBreadcrumb:b.default,LSBellMessage:v.default,LSLive:g.default,LSTree:P.default,LSPrint:w.default,LSContainerBox:y.default,LSBackTop:B.default,LSMap:_.default,LSEditor:O.default,LSDialog:j.default,LSLayout:x.default,LSList:M.default,LSPreviewImage:k.default,LSPreviewDocx:I.default,LSPreviewPdf:T.default,LSPreviewXlsx:D.default},E=o(t=>{for(const[r,e]of Object.entries(C))t.component(r,e);for(const r of Object.keys(u)){const e=u[r];t.component(e==null?void 0:e.name,e)}},"install"),h={...u,install:E};exports.default=h;
1
+ "use strict";var l=Object.defineProperty;var o=(t,r)=>l(t,"name",{value:r,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("@element-plus/icons-vue"),i=require("../../../../button/index.cjs"),a=require("../../../../descriptions/index.cjs"),c=require("../../../../form/index.cjs"),d=require("../../../../table/index.cjs"),f=require("../../../../upload/index.cjs"),S=require("../../../../preview/index.cjs"),L=require("../../../../menu/index.cjs"),q=require("../../../../icon/index.cjs"),m=require("../../../../confirm/index.cjs"),p=require("../../../../chart/index.cjs"),b=require("../../../../breadcrumb/index.cjs"),v=require("../../../../bellMessage/index.cjs"),g=require("../../../../live/index.cjs"),w=require("../../../../tree/index.cjs"),P=require("../../../../print/index.cjs"),y=require("../../../../containerBox/index.cjs"),B=require("../../../../backTop/index.cjs"),_=require("../../../../map/index.cjs"),O=require("../../../../editor/index.cjs"),j=require("../../../../dialog/index.cjs"),x=require("../../../../layout/index.cjs"),M=require("../../../../list/index.cjs"),k=require("../../../../preview_image/index.cjs"),D=require("../../../../preview_docx/index.cjs"),F=require("../../../../preview_pdf/index.cjs"),I=require("../../../../preview_xlsx/index.cjs"),T=require("../../../../downloadFile/index.cjs");function C(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:o(()=>t[e],"get")})}}return r.default=t,Object.freeze(r)}o(C,"_interopNamespaceDefault");const E=C(s),u={LSButtonGroup:i.LSButtonGroup,LSButton:i.LSButton,LSDescriptions:a.default,LSUpload:f.default,LSPreview:S.default,LSForm:c.LSForm,LSFormItem:c.LSFormItem,LSTable:d.default,LSMenu:L.default,LSIcon:q.default,LSConfirm:m.default,LSChart:p.default,LSBreadcrumb:b.default,LSBellMessage:v.default,LSLive:g.default,LSTree:w.default,LSPrint:P.default,LSContainerBox:y.default,LSBackTop:B.default,LSMap:_.default,LSEditor:O.default,LSDialog:j.default,LSLayout:x.default,LSList:M.default,LSPreviewImage:k.default,LSPreviewDocx:D.default,LSPreviewPdf:F.default,LSPreviewXlsx:I.default,LSDownloadFile:T.default},h=o(t=>{for(const[r,e]of Object.entries(E))t.component(r,e);for(const r of Object.keys(u)){const e=u[r];t.component(e==null?void 0:e.name,e)}},"install"),G={...u,install:h};exports.default=G;
@@ -9,24 +9,25 @@ import a from "../../../../upload/index.js";
9
9
  import l from "../../../../preview/index.js";
10
10
  import u from "../../../../menu/index.js";
11
11
  import P from "../../../../icon/index.js";
12
- import v from "../../../../confirm/index.js";
13
- import B from "../../../../chart/index.js";
14
- import b from "../../../../breadcrumb/index.js";
15
- import d from "../../../../bellMessage/index.js";
16
- import w from "../../../../live/index.js";
12
+ import d from "../../../../confirm/index.js";
13
+ import v from "../../../../chart/index.js";
14
+ import w from "../../../../breadcrumb/index.js";
15
+ import B from "../../../../bellMessage/index.js";
16
+ import b from "../../../../live/index.js";
17
17
  import k from "../../../../tree/index.js";
18
18
  import x from "../../../../print/index.js";
19
19
  import y from "../../../../containerBox/index.js";
20
- import I from "../../../../backTop/index.js";
21
- import g from "../../../../map/index.js";
22
- import C from "../../../../editor/index.js";
23
- import D from "../../../../dialog/index.js";
24
- import M from "../../../../layout/index.js";
25
- import T from "../../../../list/index.js";
26
- import j from "../../../../preview_image/index.js";
27
- import E from "../../../../preview_docx/index.js";
28
- import F from "../../../../preview_pdf/index.js";
20
+ import D from "../../../../backTop/index.js";
21
+ import I from "../../../../map/index.js";
22
+ import g from "../../../../editor/index.js";
23
+ import C from "../../../../dialog/index.js";
24
+ import F from "../../../../layout/index.js";
25
+ import M from "../../../../list/index.js";
26
+ import T from "../../../../preview_image/index.js";
27
+ import j from "../../../../preview_docx/index.js";
28
+ import E from "../../../../preview_pdf/index.js";
29
29
  import O from "../../../../preview_xlsx/index.js";
30
+ import h from "../../../../downloadFile/index.js";
30
31
  const t = {
31
32
  LSButtonGroup: p,
32
33
  LSButton: L,
@@ -38,35 +39,36 @@ const t = {
38
39
  LSTable: c,
39
40
  LSMenu: u,
40
41
  LSIcon: P,
41
- LSConfirm: v,
42
- LSChart: B,
43
- LSBreadcrumb: b,
44
- LSBellMessage: d,
45
- LSLive: w,
42
+ LSConfirm: d,
43
+ LSChart: v,
44
+ LSBreadcrumb: w,
45
+ LSBellMessage: B,
46
+ LSLive: b,
46
47
  LSTree: k,
47
48
  LSPrint: x,
48
49
  LSContainerBox: y,
49
- LSBackTop: I,
50
- LSMap: g,
51
- LSEditor: C,
52
- LSDialog: D,
53
- LSLayout: M,
54
- LSList: T,
55
- LSPreviewImage: j,
56
- LSPreviewDocx: E,
57
- LSPreviewPdf: F,
58
- LSPreviewXlsx: O
59
- }, h = /* @__PURE__ */ i((m) => {
50
+ LSBackTop: D,
51
+ LSMap: I,
52
+ LSEditor: g,
53
+ LSDialog: C,
54
+ LSLayout: F,
55
+ LSList: M,
56
+ LSPreviewImage: T,
57
+ LSPreviewDocx: j,
58
+ LSPreviewPdf: E,
59
+ LSPreviewXlsx: O,
60
+ LSDownloadFile: h
61
+ }, G = /* @__PURE__ */ i((m) => {
60
62
  for (const [r, o] of Object.entries(f))
61
63
  m.component(r, o);
62
64
  for (const r of Object.keys(t)) {
63
65
  const o = t[r];
64
66
  m.component(o == null ? void 0 : o.name, o);
65
67
  }
66
- }, "install"), So = {
68
+ }, "install"), so = {
67
69
  ...t,
68
- install: h
70
+ install: G
69
71
  };
70
72
  export {
71
- So as default
73
+ so as default
72
74
  };
@@ -1,3 +1,4 @@
1
1
  import { default as lsValidate } from './validate';
2
2
  import { default as lsCheck } from './check';
3
- export { lsCheck, lsValidate };
3
+ import { default as lsUtil } from './utils';
4
+ export { lsCheck, lsValidate, lsUtil };
@@ -42,3 +42,20 @@ export declare function formatChartAxis(max: any, min: any, fixed?: number): {
42
42
  aInterval: number;
43
43
  };
44
44
  export declare function isValidJSON(str: any): boolean;
45
+ export declare function mergeBuffer(bufferArray: any[]): Uint8Array;
46
+ export declare function fileToBuffer(base64: any): ArrayBufferLike;
47
+ declare const _default: {
48
+ isEmpty: typeof isEmpty;
49
+ exportFile: typeof exportFile;
50
+ getExtension: typeof getExtension;
51
+ loadJs: (list?: Array<any>) => Promise<any[]>;
52
+ removeJs: (list?: Array<any>) => void;
53
+ loadCss: (list?: Array<any>) => Promise<any[]>;
54
+ removeCss: (list?: Array<any>) => void;
55
+ getRandomHexColor: typeof getRandomHexColor;
56
+ numberFixed: typeof numberFixed;
57
+ isValidJSON: typeof isValidJSON;
58
+ mergeBuffer: typeof mergeBuffer;
59
+ fileToBuffer: typeof fileToBuffer;
60
+ };
61
+ export default _default;
@@ -0,0 +1,34 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ import { EpPropFinalized, EpPropMergeType } from '../_utils/types';
3
+ declare function start(): void;
4
+ declare const _default: DefineComponent<globalThis.ExtractPropTypes<{
5
+ recordId: EpPropFinalized<(NumberConstructor | StringConstructor)[], unknown, unknown, string, boolean>;
6
+ chunkTotal: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
7
+ chunkDataRequest: EpPropFinalized<FunctionConstructor, unknown, unknown, null, boolean>;
8
+ chunkDataRequestParams: EpPropFinalized<ObjectConstructor, unknown, unknown, null, boolean>;
9
+ chunkDataRequestConfig: EpPropFinalized<ObjectConstructor, unknown, unknown, null, boolean>;
10
+ initRequstNum: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
11
+ maxErrorNum: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
12
+ cancelUploadInLimit: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
13
+ }>, {
14
+ start: typeof start;
15
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
16
+ recordId: EpPropFinalized<(NumberConstructor | StringConstructor)[], unknown, unknown, string, boolean>;
17
+ chunkTotal: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
18
+ chunkDataRequest: EpPropFinalized<FunctionConstructor, unknown, unknown, null, boolean>;
19
+ chunkDataRequestParams: EpPropFinalized<ObjectConstructor, unknown, unknown, null, boolean>;
20
+ chunkDataRequestConfig: EpPropFinalized<ObjectConstructor, unknown, unknown, null, boolean>;
21
+ initRequstNum: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
22
+ maxErrorNum: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
23
+ cancelUploadInLimit: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
24
+ }>> & Readonly<{}>, {
25
+ recordId: EpPropMergeType<(NumberConstructor | StringConstructor)[], unknown, unknown>;
26
+ chunkTotal: number;
27
+ chunkDataRequest: Function;
28
+ chunkDataRequestParams: Record<string, any>;
29
+ chunkDataRequestConfig: Record<string, any>;
30
+ initRequstNum: number;
31
+ maxErrorNum: number;
32
+ cancelUploadInLimit: EpPropMergeType<BooleanConstructor, unknown, unknown>;
33
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
34
+ export default _default;