@topdatasec/report 1.0.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.iife.js +1 -1
- package/dist/index.js +93 -96
- package/dist/index.umd.cjs +1 -1
- package/es/bar/Bar.vue.js +6 -9
- package/lib/bar/Bar.vue.cjs +1 -1
- package/package.json +1 -1
- package/es/alert/Alert.d.ts +0 -52
- package/es/alert/index.d.ts +0 -66
- package/lib/alert/Alert.d.ts +0 -52
- package/lib/alert/index.d.ts +0 -66
package/dist/index.iife.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(u,
|
|
1
|
+
(function(u,o){"use strict";const O={class:"chart-components"},y=(e=>{const t=e;return t.install=function(n){n.component(t.__name,e)},e})(o.defineComponent({name:"TdsReportBar",__name:"Bar",props:{data:{}},setup(e){const t=e;return console.log(t.data,444444444),o.computed(()=>t.data.options),(n,r)=>(o.openBlock(),o.createElementBlock("div",O," 111111111111111111111 "))}})),B=Object.freeze(Object.defineProperty({__proto__:null,TdsReportBar:y},Symbol.toStringTag,{value:"Module"}));function U(e=Date.now(),t="YYYY-MM-DD HH:mm:ss"){try{let n;if(typeof e=="number"||typeof e=="string"){if(n=new Date(e),isNaN(n.getTime()))throw new Error("Invalid date")}else n=e;const r=(a,c=2)=>String(a).padStart(c,"0"),s=a=>{switch(a){case"YYYY":return r(n.getFullYear());case"YY":return r(n.getFullYear()).slice(2,4);case"MM":return r(n.getMonth()+1);case"M":return String(n.getMonth()+1);case"DD":return r(n.getDate());case"D":return String(n.getDate());case"HH":return r(n.getHours());case"H":return String(n.getHours());case"mm":return r(n.getMinutes());case"m":return String(n.getMinutes());case"ss":return r(n.getSeconds());case"s":return String(n.getSeconds());case"SSS":return r(n.getMilliseconds(),3);default:return a}};return t.replace(/(YYYY|YY|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS)/g,s)}catch(n){return console.error("Error formatting date:",n),""}}function k(e,t=2,n=",",r=".",s,a){typeof e!="number"&&typeof e!="string"&&console.warn("Expected value to be of type number or string"),typeof t!="number"&&console.warn("Expected precision to be of type number");const c=Number(e);if(isNaN(c)||!isFinite(c))return"";if(c===0)return c.toFixed(t);let i=c.toFixed(t);if(typeof n=="string"&&n!==""){const[f,m]=i.split(".");i=f.replace(/(\d)(?=(\d{3})+$)/g,"$1"+n)+(m?r+m:"")}return(s||"")+i+(a||"")}function V(e,t=0,n=!1){let r=null;function s(c){if(r||(r=c),c-r>=t){try{e()}catch(f){console.error("Error executing rafTimeout function:",f)}n&&(r=c,a.id=requestAnimationFrame(s))}else a.id=requestAnimationFrame(s)}const a={id:requestAnimationFrame(s)};return a}function H(e){e&&e.id&&typeof e.id=="number"?cancelAnimationFrame(e.id):console.warn("cancelRaf received an invalid id:",e)}function M(e,t=300){let n=!0;return function(...r){return n&&(e(...r),n=!1,setTimeout(()=>{n=!0},t)),!1}}function T(e,t=300){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function I(e,t){if(Number.isNaN(e)||Number.isNaN(t))throw new Error("Both num1 and num2 must be valid numbers.");const n=e%1!==0,r=t%1!==0;if(!n&&!r)return e+t;const s=String(e).split(".")[1]??"",a=String(t).split(".")[1]??"",c=Math.max(s.length,a.length),i=Math.pow(10,c),f=e.toFixed(c),m=t.toFixed(c);return(+f.replace(".","")+ +m.replace(".",""))/i}function j(e,t){if(!e){console.error("无效的 url");return}const n=t||e.split("?")[0].split("/").pop()||"download";try{fetch(e).then(r=>{r.ok?r.blob().then(s=>{const a=URL.createObjectURL(s),c=document.createElement("a");c.href=a,c.download=n,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(a)}):console.error("请求文件失败,状态码:",r.status)})}catch(r){console.error("文件下载失败:",r)}}function z(){const e=document.documentElement;e.classList.toggle("dark"),e.classList.contains("dark")?e.style.colorScheme="dark":e.style.colorScheme="light"}function N(){const e=o.ref(!1),t=o.getCurrentInstance();return t&&o.onMounted(()=>{e.value=!0},t),e}function R(e){const t=N();return o.computed(()=>(t.value,!!e()))}function $(e,t,n){o.onMounted(()=>e.addEventListener(t,n)),o.onUnmounted(()=>e.removeEventListener(t,n))}function q(e,t,n={}){const r=R(()=>window&&"MutationObserver"in window),s=o.ref(!1);let a;const c=o.computed(()=>{const d=o.toValue(e);return d?Array.isArray(d)?d.map(h=>o.toValue(h)).filter(h=>h):[d]:[]}),i=()=>{a&&(a.disconnect(),a=void 0)},f=()=>{r.value&&c.value.length&&!s.value&&(a=new MutationObserver(t),c.value.forEach(d=>a.observe(d,n)))};o.watch(()=>c.value,()=>{i(),f()},{immediate:!0,flush:"post"});const m=()=>{s.value=!0,i()},p=()=>{s.value=!1,f()};return o.onBeforeUnmount(()=>i()),{stop:m,start:p}}function P(e=window,t=0,n,r){const s=o.ref(0),a=o.ref(0),c=o.ref(0),i=o.ref(0),f=o.ref(!1),m=o.ref(!1),p=o.ref(!1),d=o.ref(!1),h=o.ref(!1),E=o.ref(0),S=o.ref(0);function Q(l){f.value=!0;const g=l.target.documentElement??l.target;s.value=g.scrollLeft,c.value=g.scrollTop,m.value=s.value<E.value,p.value=s.value>E.value,d.value=c.value<S.value,h.value=c.value>S.value,E.value=s.value,S.value=c.value,w(l),n&&n(l)}const _=M(Q,t);function X(l){f.value&&(f.value=!1,m.value=!1,p.value=!1,d.value=!1,h.value=!1,r&&r(l))}const w=T(X,t+200),A=o.computed(()=>{const l=o.toValue(e);return l||null});o.watch(()=>A.value,(l,g)=>{var v;if(g&&D(g),l){const b=((v=l==null?void 0:l.document)==null?void 0:v.documentElement)||(l==null?void 0:l.documentElement)||l;a.value=b.scrollWidth-b.clientWidth,i.value=b.scrollHeight-b.clientHeight,b.addEventListener("scroll",_),b.addEventListener("scrollend",w)}},{immediate:!0,flush:"post"});function D(l){var v;const g=((v=l==null?void 0:l.document)==null?void 0:v.documentElement)||(l==null?void 0:l.documentElement)||l;g.removeEventListener("scroll",_),g.removeEventListener("scrollend",w)}return o.onBeforeUnmount(()=>D(A.value)),{x:s,xScrollMax:a,y:c,yScrollMax:i,isScrolling:f,left:m,right:p,top:d,bottom:h}}function x(){const e=o.ref(0),t=o.ref(0);let n=performance.now();const r=10,s=a=>{if(t.value++,t.value>=r){const c=a-n;e.value=Math.round(1e3/(c/r)),n=a,t.value=0}requestAnimationFrame(s)};return requestAnimationFrame(s),{fps:e}}function W(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid mediaQuery parameter. It must be a non-empty string.");const t=o.ref(window&&window.matchMedia(e).matches),n=window.matchMedia(e),r=s=>{t.value=s.matches};return o.onMounted(()=>{n.addEventListener("change",r)}),o.onBeforeUnmount(()=>{n.removeEventListener("change",r)}),{match:t}}function C(e,t,n={}){const r=R(()=>window&&"ResizeObserver"in window);let s;const a=o.ref(!1),c=o.computed(()=>{const d=o.toValue(e);return d?Array.isArray(d)?d.map(h=>o.toValue(h)).filter(h=>h):[d]:[]}),i=()=>{s&&(s.disconnect(),s=void 0)},f=()=>{r.value&&c.value.length&&!a.value&&(s=new ResizeObserver(t),c.value.forEach(d=>s.observe(d,n)))};o.watch(()=>c.value,()=>{i(),f()},{immediate:!0,flush:"post"});const m=()=>{a.value=!0,i()},p=()=>{a.value=!1,f()};return o.onBeforeUnmount(()=>i()),{stop:m,start:p}}function Z(e="default"){const t=o.useSlots(),n=r=>{var c;const s=(c=t[r])==null?void 0:c.call(t),a=i=>{if(i.type===o.Comment||Array.isArray(i.children)&&!i.children.length)return!1;if(i.type!==o.Text)return!0;if(typeof i.children=="string")return i.children.trim()!==""};return s&&(s!=null&&s.length)?s.some(f=>a(f)):!1};if(Array.isArray(e)){const r=o.reactive({});return e.forEach(s=>{const a=o.computed(()=>n(s));r[s]=a}),r}else return o.computed(()=>n(e))}const F={TdsReportBar:"TdsReportBar"},L={BackTop:["Tooltip"]};function G(e,t){if(["NumberAnimation","Watermark"].includes(e))return[];const n=[e];e in L&&n.push(...L[e]);const r=t!=null&&t.cjs?"lib":"es",s=[`@topdatasec/report/${r}/style/global.css`];return n.forEach(a=>{s.push(`@topdatasec/report/${r}/${F[a]}/${a}.css`)}),s}function J(e){return{type:"component",resolve:t=>{if(t in F)return{name:t,from:"@topdatasec/report",sideEffects:G(t,e)}}}}const Y=function(e){return Object.values(B).forEach(t=>{t&&t.install&&e.use(t)}),e},K={install:Y};u.TdsReportBar=y,u.VueAmazingUIResolver=J,u.add=I,u.cancelRaf=H,u.dateFormat=U,u.debounce=T,u.default=K,u.downloadFile=j,u.formatNumber=k,u.install=Y,u.rafTimeout=V,u.throttle=M,u.toggleDark=z,u.useEventListener=$,u.useFps=x,u.useMediaQuery=W,u.useMutationObserver=q,u.useResizeObserver=C,u.useScroll=P,u.useSlotsExist=Z,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})(this.TdsReportUI=this.TdsReportUI||{},Vue);
|
package/dist/index.js
CHANGED
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
import { defineComponent as k, computed as h, createElementBlock as B, openBlock as H,
|
|
2
|
-
|
|
3
|
-
const P = { class: "chart-components" }, W = /* @__PURE__ */ k({
|
|
1
|
+
import { defineComponent as k, computed as h, createElementBlock as B, openBlock as H, onMounted as x, onUnmounted as U, ref as f, toValue as E, watch as L, onBeforeUnmount as S, useSlots as V, reactive as $, getCurrentInstance as j, Comment as I, Text as N } from "vue";
|
|
2
|
+
const q = { class: "chart-components" }, z = /* @__PURE__ */ k({
|
|
4
3
|
name: "TdsReportBar",
|
|
5
4
|
__name: "Bar",
|
|
6
5
|
props: {
|
|
7
6
|
data: {}
|
|
8
7
|
},
|
|
9
8
|
setup(e) {
|
|
10
|
-
const t = e
|
|
11
|
-
return (
|
|
12
|
-
U(V(C), { option: n.value }, null, 8, ["option"])
|
|
13
|
-
]));
|
|
9
|
+
const t = e;
|
|
10
|
+
return console.log(t.data, 444444444), h(() => t.data.options), (n, r) => (H(), B("div", q, " 111111111111111111111 "));
|
|
14
11
|
}
|
|
15
|
-
}),
|
|
12
|
+
}), P = (e) => {
|
|
16
13
|
const t = e;
|
|
17
14
|
return t.install = function(n) {
|
|
18
15
|
n.component(t.__name, e);
|
|
19
16
|
}, e;
|
|
20
|
-
},
|
|
17
|
+
}, W = P(z), C = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
21
18
|
__proto__: null,
|
|
22
|
-
TdsReportBar:
|
|
19
|
+
TdsReportBar: W
|
|
23
20
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
24
|
-
function
|
|
21
|
+
function ee(e = Date.now(), t = "YYYY-MM-DD HH:mm:ss") {
|
|
25
22
|
try {
|
|
26
23
|
let n;
|
|
27
24
|
if (typeof e == "number" || typeof e == "string") {
|
|
@@ -66,28 +63,28 @@ function se(e = Date.now(), t = "YYYY-MM-DD HH:mm:ss") {
|
|
|
66
63
|
return console.error("Error formatting date:", n), "";
|
|
67
64
|
}
|
|
68
65
|
}
|
|
69
|
-
function
|
|
66
|
+
function te(e, t = 2, n = ",", r = ".", s, c) {
|
|
70
67
|
typeof e != "number" && typeof e != "string" && console.warn("Expected value to be of type number or string"), typeof t != "number" && console.warn("Expected precision to be of type number");
|
|
71
68
|
const o = Number(e);
|
|
72
69
|
if (isNaN(o) || !isFinite(o))
|
|
73
70
|
return "";
|
|
74
71
|
if (o === 0)
|
|
75
72
|
return o.toFixed(t);
|
|
76
|
-
let
|
|
73
|
+
let l = o.toFixed(t);
|
|
77
74
|
if (typeof n == "string" && n !== "") {
|
|
78
|
-
const [
|
|
79
|
-
|
|
75
|
+
const [i, d] = l.split(".");
|
|
76
|
+
l = i.replace(/(\d)(?=(\d{3})+$)/g, "$1" + n) + (d ? r + d : "");
|
|
80
77
|
}
|
|
81
|
-
return (s || "") +
|
|
78
|
+
return (s || "") + l + (c || "");
|
|
82
79
|
}
|
|
83
|
-
function
|
|
80
|
+
function ne(e, t = 0, n = !1) {
|
|
84
81
|
let r = null;
|
|
85
82
|
function s(o) {
|
|
86
83
|
if (r || (r = o), o - r >= t) {
|
|
87
84
|
try {
|
|
88
85
|
e();
|
|
89
|
-
} catch (
|
|
90
|
-
console.error("Error executing rafTimeout function:",
|
|
86
|
+
} catch (i) {
|
|
87
|
+
console.error("Error executing rafTimeout function:", i);
|
|
91
88
|
}
|
|
92
89
|
n && (r = o, c.id = requestAnimationFrame(s));
|
|
93
90
|
} else
|
|
@@ -98,10 +95,10 @@ function ce(e, t = 0, n = !1) {
|
|
|
98
95
|
};
|
|
99
96
|
return c;
|
|
100
97
|
}
|
|
101
|
-
function
|
|
98
|
+
function re(e) {
|
|
102
99
|
e && e.id && typeof e.id == "number" ? cancelAnimationFrame(e.id) : console.warn("cancelRaf received an invalid id:", e);
|
|
103
100
|
}
|
|
104
|
-
function
|
|
101
|
+
function Z(e, t = 300) {
|
|
105
102
|
let n = !0;
|
|
106
103
|
return function(...r) {
|
|
107
104
|
return n && (e(...r), n = !1, setTimeout(() => {
|
|
@@ -109,7 +106,7 @@ function K(e, t = 300) {
|
|
|
109
106
|
}, t)), !1;
|
|
110
107
|
};
|
|
111
108
|
}
|
|
112
|
-
function
|
|
109
|
+
function G(e, t = 300) {
|
|
113
110
|
let n = null;
|
|
114
111
|
return function(...r) {
|
|
115
112
|
n && clearTimeout(n), n = setTimeout(() => {
|
|
@@ -117,16 +114,16 @@ function X(e, t = 300) {
|
|
|
117
114
|
}, t);
|
|
118
115
|
};
|
|
119
116
|
}
|
|
120
|
-
function
|
|
117
|
+
function se(e, t) {
|
|
121
118
|
if (Number.isNaN(e) || Number.isNaN(t))
|
|
122
119
|
throw new Error("Both num1 and num2 must be valid numbers.");
|
|
123
120
|
const n = e % 1 !== 0, r = t % 1 !== 0;
|
|
124
121
|
if (!n && !r)
|
|
125
122
|
return e + t;
|
|
126
|
-
const s = String(e).split(".")[1] ?? "", c = String(t).split(".")[1] ?? "", o = Math.max(s.length, c.length),
|
|
127
|
-
return (+
|
|
123
|
+
const s = String(e).split(".")[1] ?? "", c = String(t).split(".")[1] ?? "", o = Math.max(s.length, c.length), l = Math.pow(10, o), i = e.toFixed(o), d = t.toFixed(o);
|
|
124
|
+
return (+i.replace(".", "") + +d.replace(".", "")) / l;
|
|
128
125
|
}
|
|
129
|
-
function
|
|
126
|
+
function oe(e, t) {
|
|
130
127
|
if (!e) {
|
|
131
128
|
console.error("无效的 url");
|
|
132
129
|
return;
|
|
@@ -143,38 +140,38 @@ function le(e, t) {
|
|
|
143
140
|
console.error("文件下载失败:", r);
|
|
144
141
|
}
|
|
145
142
|
}
|
|
146
|
-
function
|
|
143
|
+
function ce() {
|
|
147
144
|
const e = document.documentElement;
|
|
148
145
|
e.classList.toggle("dark"), e.classList.contains("dark") ? e.style.colorScheme = "dark" : e.style.colorScheme = "light";
|
|
149
146
|
}
|
|
150
|
-
function
|
|
151
|
-
const e = f(!1), t =
|
|
147
|
+
function J() {
|
|
148
|
+
const e = f(!1), t = j();
|
|
152
149
|
return t && x(() => {
|
|
153
150
|
e.value = !0;
|
|
154
151
|
}, t), e;
|
|
155
152
|
}
|
|
156
153
|
function D(e) {
|
|
157
|
-
const t =
|
|
154
|
+
const t = J();
|
|
158
155
|
return h(() => (t.value, !!e()));
|
|
159
156
|
}
|
|
160
|
-
function
|
|
161
|
-
x(() => e.addEventListener(t, n)),
|
|
157
|
+
function ae(e, t, n) {
|
|
158
|
+
x(() => e.addEventListener(t, n)), U(() => e.removeEventListener(t, n));
|
|
162
159
|
}
|
|
163
|
-
function
|
|
160
|
+
function le(e, t, n = {}) {
|
|
164
161
|
const r = D(() => window && "MutationObserver" in window), s = f(!1);
|
|
165
162
|
let c;
|
|
166
163
|
const o = h(() => {
|
|
167
164
|
const u = E(e);
|
|
168
165
|
return u ? Array.isArray(u) ? u.map((m) => E(m)).filter((m) => m) : [u] : [];
|
|
169
|
-
}),
|
|
166
|
+
}), l = () => {
|
|
170
167
|
c && (c.disconnect(), c = void 0);
|
|
171
|
-
},
|
|
168
|
+
}, i = () => {
|
|
172
169
|
r.value && o.value.length && !s.value && (c = new MutationObserver(t), o.value.forEach((u) => c.observe(u, n)));
|
|
173
170
|
};
|
|
174
|
-
|
|
171
|
+
L(
|
|
175
172
|
() => o.value,
|
|
176
173
|
() => {
|
|
177
|
-
|
|
174
|
+
l(), i();
|
|
178
175
|
},
|
|
179
176
|
{
|
|
180
177
|
immediate: !0,
|
|
@@ -183,37 +180,37 @@ function de(e, t, n = {}) {
|
|
|
183
180
|
}
|
|
184
181
|
);
|
|
185
182
|
const d = () => {
|
|
186
|
-
s.value = !0,
|
|
183
|
+
s.value = !0, l();
|
|
187
184
|
}, v = () => {
|
|
188
|
-
s.value = !1,
|
|
185
|
+
s.value = !1, i();
|
|
189
186
|
};
|
|
190
|
-
return S(() =>
|
|
187
|
+
return S(() => l()), {
|
|
191
188
|
stop: d,
|
|
192
189
|
start: v
|
|
193
190
|
};
|
|
194
191
|
}
|
|
195
|
-
function
|
|
196
|
-
const s = f(0), c = f(0), o = f(0),
|
|
192
|
+
function ie(e = window, t = 0, n, r) {
|
|
193
|
+
const s = f(0), c = f(0), o = f(0), l = f(0), i = f(!1), d = f(!1), v = f(!1), u = f(!1), m = f(!1), w = f(0), y = f(0);
|
|
197
194
|
function _(a) {
|
|
198
|
-
|
|
195
|
+
i.value = !0;
|
|
199
196
|
const p = a.target.documentElement ?? a.target;
|
|
200
197
|
s.value = p.scrollLeft, o.value = p.scrollTop, d.value = s.value < w.value, v.value = s.value > w.value, u.value = o.value < y.value, m.value = o.value > y.value, w.value = s.value, y.value = o.value, M(a), n && n(a);
|
|
201
198
|
}
|
|
202
|
-
const
|
|
199
|
+
const T = Z(_, t);
|
|
203
200
|
function O(a) {
|
|
204
|
-
|
|
201
|
+
i.value && (i.value = !1, d.value = !1, v.value = !1, u.value = !1, m.value = !1, r && r(a));
|
|
205
202
|
}
|
|
206
|
-
const M =
|
|
203
|
+
const M = G(O, t + 200), Y = h(() => {
|
|
207
204
|
const a = E(e);
|
|
208
205
|
return a || null;
|
|
209
206
|
});
|
|
210
|
-
|
|
207
|
+
L(
|
|
211
208
|
() => Y.value,
|
|
212
209
|
(a, p) => {
|
|
213
210
|
var b;
|
|
214
211
|
if (p && F(p), a) {
|
|
215
212
|
const g = ((b = a == null ? void 0 : a.document) == null ? void 0 : b.documentElement) || (a == null ? void 0 : a.documentElement) || a;
|
|
216
|
-
c.value = g.scrollWidth - g.clientWidth,
|
|
213
|
+
c.value = g.scrollWidth - g.clientWidth, l.value = g.scrollHeight - g.clientHeight, g.addEventListener("scroll", T), g.addEventListener("scrollend", M);
|
|
217
214
|
}
|
|
218
215
|
},
|
|
219
216
|
{
|
|
@@ -224,11 +221,11 @@ function me(e = window, t = 0, n, r) {
|
|
|
224
221
|
function F(a) {
|
|
225
222
|
var b;
|
|
226
223
|
const p = ((b = a == null ? void 0 : a.document) == null ? void 0 : b.documentElement) || (a == null ? void 0 : a.documentElement) || a;
|
|
227
|
-
p.removeEventListener("scroll",
|
|
224
|
+
p.removeEventListener("scroll", T), p.removeEventListener("scrollend", M);
|
|
228
225
|
}
|
|
229
|
-
return S(() => F(Y.value)), { x: s, xScrollMax: c, y: o, yScrollMax:
|
|
226
|
+
return S(() => F(Y.value)), { x: s, xScrollMax: c, y: o, yScrollMax: l, isScrolling: i, left: d, right: v, top: u, bottom: m };
|
|
230
227
|
}
|
|
231
|
-
function
|
|
228
|
+
function ue() {
|
|
232
229
|
const e = f(0), t = f(0);
|
|
233
230
|
let n = performance.now();
|
|
234
231
|
const r = 10, s = (c) => {
|
|
@@ -240,7 +237,7 @@ function ve() {
|
|
|
240
237
|
};
|
|
241
238
|
return requestAnimationFrame(s), { fps: e };
|
|
242
239
|
}
|
|
243
|
-
function
|
|
240
|
+
function fe(e) {
|
|
244
241
|
if (!e || typeof e != "string" || e.trim() === "")
|
|
245
242
|
throw new Error("Invalid mediaQuery parameter. It must be a non-empty string.");
|
|
246
243
|
const t = f(window && window.matchMedia(e).matches), n = window.matchMedia(e), r = (s) => {
|
|
@@ -252,21 +249,21 @@ function pe(e) {
|
|
|
252
249
|
n.removeEventListener("change", r);
|
|
253
250
|
}), { match: t };
|
|
254
251
|
}
|
|
255
|
-
function
|
|
252
|
+
function de(e, t, n = {}) {
|
|
256
253
|
const r = D(() => window && "ResizeObserver" in window);
|
|
257
254
|
let s;
|
|
258
255
|
const c = f(!1), o = h(() => {
|
|
259
256
|
const u = E(e);
|
|
260
257
|
return u ? Array.isArray(u) ? u.map((m) => E(m)).filter((m) => m) : [u] : [];
|
|
261
|
-
}),
|
|
258
|
+
}), l = () => {
|
|
262
259
|
s && (s.disconnect(), s = void 0);
|
|
263
|
-
},
|
|
260
|
+
}, i = () => {
|
|
264
261
|
r.value && o.value.length && !c.value && (s = new ResizeObserver(t), o.value.forEach((u) => s.observe(u, n)));
|
|
265
262
|
};
|
|
266
|
-
|
|
263
|
+
L(
|
|
267
264
|
() => o.value,
|
|
268
265
|
() => {
|
|
269
|
-
|
|
266
|
+
l(), i();
|
|
270
267
|
},
|
|
271
268
|
{
|
|
272
269
|
immediate: !0,
|
|
@@ -275,30 +272,30 @@ function he(e, t, n = {}) {
|
|
|
275
272
|
}
|
|
276
273
|
);
|
|
277
274
|
const d = () => {
|
|
278
|
-
c.value = !0,
|
|
275
|
+
c.value = !0, l();
|
|
279
276
|
}, v = () => {
|
|
280
|
-
c.value = !1,
|
|
277
|
+
c.value = !1, i();
|
|
281
278
|
};
|
|
282
|
-
return S(() =>
|
|
279
|
+
return S(() => l()), {
|
|
283
280
|
stop: d,
|
|
284
281
|
start: v
|
|
285
282
|
};
|
|
286
283
|
}
|
|
287
|
-
function
|
|
288
|
-
const t =
|
|
284
|
+
function me(e = "default") {
|
|
285
|
+
const t = V(), n = (r) => {
|
|
289
286
|
var o;
|
|
290
|
-
const s = (o = t[r]) == null ? void 0 : o.call(t), c = (
|
|
291
|
-
if (
|
|
287
|
+
const s = (o = t[r]) == null ? void 0 : o.call(t), c = (l) => {
|
|
288
|
+
if (l.type === I || Array.isArray(l.children) && !l.children.length)
|
|
292
289
|
return !1;
|
|
293
|
-
if (
|
|
290
|
+
if (l.type !== N)
|
|
294
291
|
return !0;
|
|
295
|
-
if (typeof
|
|
296
|
-
return
|
|
292
|
+
if (typeof l.children == "string")
|
|
293
|
+
return l.children.trim() !== "";
|
|
297
294
|
};
|
|
298
|
-
return s && (s != null && s.length) ? s.some((
|
|
295
|
+
return s && (s != null && s.length) ? s.some((i) => c(i)) : !1;
|
|
299
296
|
};
|
|
300
297
|
if (Array.isArray(e)) {
|
|
301
|
-
const r =
|
|
298
|
+
const r = $({});
|
|
302
299
|
return e.forEach((s) => {
|
|
303
300
|
const c = h(() => n(s));
|
|
304
301
|
r[s] = c;
|
|
@@ -311,7 +308,7 @@ const R = {
|
|
|
311
308
|
}, A = {
|
|
312
309
|
BackTop: ["Tooltip"]
|
|
313
310
|
};
|
|
314
|
-
function
|
|
311
|
+
function K(e, t) {
|
|
315
312
|
if (["NumberAnimation", "Watermark"].includes(e))
|
|
316
313
|
return [];
|
|
317
314
|
const n = [e];
|
|
@@ -323,7 +320,7 @@ function ee(e, t) {
|
|
|
323
320
|
);
|
|
324
321
|
}), s;
|
|
325
322
|
}
|
|
326
|
-
function
|
|
323
|
+
function ve(e) {
|
|
327
324
|
return {
|
|
328
325
|
type: "component",
|
|
329
326
|
resolve: (t) => {
|
|
@@ -333,38 +330,38 @@ function be(e) {
|
|
|
333
330
|
// 组件名
|
|
334
331
|
from: "@topdatasec/report",
|
|
335
332
|
// 组件库名称
|
|
336
|
-
sideEffects:
|
|
333
|
+
sideEffects: K(t, e)
|
|
337
334
|
// 组件样式文件
|
|
338
335
|
};
|
|
339
336
|
}
|
|
340
337
|
};
|
|
341
338
|
}
|
|
342
|
-
const
|
|
343
|
-
return Object.values(
|
|
339
|
+
const X = function(e) {
|
|
340
|
+
return Object.values(C).forEach((t) => {
|
|
344
341
|
t && t.install && e.use(t);
|
|
345
342
|
}), e;
|
|
346
|
-
},
|
|
347
|
-
install:
|
|
343
|
+
}, pe = {
|
|
344
|
+
install: X
|
|
348
345
|
};
|
|
349
346
|
export {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
347
|
+
W as TdsReportBar,
|
|
348
|
+
ve as VueAmazingUIResolver,
|
|
349
|
+
se as add,
|
|
350
|
+
re as cancelRaf,
|
|
351
|
+
ee as dateFormat,
|
|
352
|
+
G as debounce,
|
|
353
|
+
pe as default,
|
|
354
|
+
oe as downloadFile,
|
|
355
|
+
te as formatNumber,
|
|
356
|
+
X as install,
|
|
357
|
+
ne as rafTimeout,
|
|
358
|
+
Z as throttle,
|
|
359
|
+
ce as toggleDark,
|
|
360
|
+
ae as useEventListener,
|
|
361
|
+
ue as useFps,
|
|
362
|
+
fe as useMediaQuery,
|
|
363
|
+
le as useMutationObserver,
|
|
364
|
+
de as useResizeObserver,
|
|
365
|
+
ie as useScroll,
|
|
366
|
+
me as useSlotsExist
|
|
370
367
|
};
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(i,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue")
|
|
1
|
+
(function(i,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(i=typeof globalThis<"u"?globalThis:i||self,r(i.TdsReportUI=i.TdsReportUI||{},i.Vue))})(this,function(i,r){"use strict";const O={class:"chart-components"},y=(e=>{const t=e;return t.install=function(n){n.component(t.__name,e)},e})(r.defineComponent({name:"TdsReportBar",__name:"Bar",props:{data:{}},setup(e){const t=e;return console.log(t.data,444444444),r.computed(()=>t.data.options),(n,o)=>(r.openBlock(),r.createElementBlock("div",O," 111111111111111111111 "))}})),B=Object.freeze(Object.defineProperty({__proto__:null,TdsReportBar:y},Symbol.toStringTag,{value:"Module"}));function U(e=Date.now(),t="YYYY-MM-DD HH:mm:ss"){try{let n;if(typeof e=="number"||typeof e=="string"){if(n=new Date(e),isNaN(n.getTime()))throw new Error("Invalid date")}else n=e;const o=(a,c=2)=>String(a).padStart(c,"0"),s=a=>{switch(a){case"YYYY":return o(n.getFullYear());case"YY":return o(n.getFullYear()).slice(2,4);case"MM":return o(n.getMonth()+1);case"M":return String(n.getMonth()+1);case"DD":return o(n.getDate());case"D":return String(n.getDate());case"HH":return o(n.getHours());case"H":return String(n.getHours());case"mm":return o(n.getMinutes());case"m":return String(n.getMinutes());case"ss":return o(n.getSeconds());case"s":return String(n.getSeconds());case"SSS":return o(n.getMilliseconds(),3);default:return a}};return t.replace(/(YYYY|YY|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS)/g,s)}catch(n){return console.error("Error formatting date:",n),""}}function k(e,t=2,n=",",o=".",s,a){typeof e!="number"&&typeof e!="string"&&console.warn("Expected value to be of type number or string"),typeof t!="number"&&console.warn("Expected precision to be of type number");const c=Number(e);if(isNaN(c)||!isFinite(c))return"";if(c===0)return c.toFixed(t);let u=c.toFixed(t);if(typeof n=="string"&&n!==""){const[f,m]=u.split(".");u=f.replace(/(\d)(?=(\d{3})+$)/g,"$1"+n)+(m?o+m:"")}return(s||"")+u+(a||"")}function V(e,t=0,n=!1){let o=null;function s(c){if(o||(o=c),c-o>=t){try{e()}catch(f){console.error("Error executing rafTimeout function:",f)}n&&(o=c,a.id=requestAnimationFrame(s))}else a.id=requestAnimationFrame(s)}const a={id:requestAnimationFrame(s)};return a}function H(e){e&&e.id&&typeof e.id=="number"?cancelAnimationFrame(e.id):console.warn("cancelRaf received an invalid id:",e)}function M(e,t=300){let n=!0;return function(...o){return n&&(e(...o),n=!1,setTimeout(()=>{n=!0},t)),!1}}function T(e,t=300){let n=null;return function(...o){n&&clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}function I(e,t){if(Number.isNaN(e)||Number.isNaN(t))throw new Error("Both num1 and num2 must be valid numbers.");const n=e%1!==0,o=t%1!==0;if(!n&&!o)return e+t;const s=String(e).split(".")[1]??"",a=String(t).split(".")[1]??"",c=Math.max(s.length,a.length),u=Math.pow(10,c),f=e.toFixed(c),m=t.toFixed(c);return(+f.replace(".","")+ +m.replace(".",""))/u}function j(e,t){if(!e){console.error("无效的 url");return}const n=t||e.split("?")[0].split("/").pop()||"download";try{fetch(e).then(o=>{o.ok?o.blob().then(s=>{const a=URL.createObjectURL(s),c=document.createElement("a");c.href=a,c.download=n,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(a)}):console.error("请求文件失败,状态码:",o.status)})}catch(o){console.error("文件下载失败:",o)}}function z(){const e=document.documentElement;e.classList.toggle("dark"),e.classList.contains("dark")?e.style.colorScheme="dark":e.style.colorScheme="light"}function N(){const e=r.ref(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function R(e){const t=N();return r.computed(()=>(t.value,!!e()))}function $(e,t,n){r.onMounted(()=>e.addEventListener(t,n)),r.onUnmounted(()=>e.removeEventListener(t,n))}function q(e,t,n={}){const o=R(()=>window&&"MutationObserver"in window),s=r.ref(!1);let a;const c=r.computed(()=>{const d=r.toValue(e);return d?Array.isArray(d)?d.map(p=>r.toValue(p)).filter(p=>p):[d]:[]}),u=()=>{a&&(a.disconnect(),a=void 0)},f=()=>{o.value&&c.value.length&&!s.value&&(a=new MutationObserver(t),c.value.forEach(d=>a.observe(d,n)))};r.watch(()=>c.value,()=>{u(),f()},{immediate:!0,flush:"post"});const m=()=>{s.value=!0,u()},h=()=>{s.value=!1,f()};return r.onBeforeUnmount(()=>u()),{stop:m,start:h}}function x(e=window,t=0,n,o){const s=r.ref(0),a=r.ref(0),c=r.ref(0),u=r.ref(0),f=r.ref(!1),m=r.ref(!1),h=r.ref(!1),d=r.ref(!1),p=r.ref(!1),E=r.ref(0),S=r.ref(0);function Q(l){f.value=!0;const g=l.target.documentElement??l.target;s.value=g.scrollLeft,c.value=g.scrollTop,m.value=s.value<E.value,h.value=s.value>E.value,d.value=c.value<S.value,p.value=c.value>S.value,E.value=s.value,S.value=c.value,w(l),n&&n(l)}const _=M(Q,t);function X(l){f.value&&(f.value=!1,m.value=!1,h.value=!1,d.value=!1,p.value=!1,o&&o(l))}const w=T(X,t+200),A=r.computed(()=>{const l=r.toValue(e);return l||null});r.watch(()=>A.value,(l,g)=>{var b;if(g&&D(g),l){const v=((b=l==null?void 0:l.document)==null?void 0:b.documentElement)||(l==null?void 0:l.documentElement)||l;a.value=v.scrollWidth-v.clientWidth,u.value=v.scrollHeight-v.clientHeight,v.addEventListener("scroll",_),v.addEventListener("scrollend",w)}},{immediate:!0,flush:"post"});function D(l){var b;const g=((b=l==null?void 0:l.document)==null?void 0:b.documentElement)||(l==null?void 0:l.documentElement)||l;g.removeEventListener("scroll",_),g.removeEventListener("scrollend",w)}return r.onBeforeUnmount(()=>D(A.value)),{x:s,xScrollMax:a,y:c,yScrollMax:u,isScrolling:f,left:m,right:h,top:d,bottom:p}}function P(){const e=r.ref(0),t=r.ref(0);let n=performance.now();const o=10,s=a=>{if(t.value++,t.value>=o){const c=a-n;e.value=Math.round(1e3/(c/o)),n=a,t.value=0}requestAnimationFrame(s)};return requestAnimationFrame(s),{fps:e}}function W(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid mediaQuery parameter. It must be a non-empty string.");const t=r.ref(window&&window.matchMedia(e).matches),n=window.matchMedia(e),o=s=>{t.value=s.matches};return r.onMounted(()=>{n.addEventListener("change",o)}),r.onBeforeUnmount(()=>{n.removeEventListener("change",o)}),{match:t}}function C(e,t,n={}){const o=R(()=>window&&"ResizeObserver"in window);let s;const a=r.ref(!1),c=r.computed(()=>{const d=r.toValue(e);return d?Array.isArray(d)?d.map(p=>r.toValue(p)).filter(p=>p):[d]:[]}),u=()=>{s&&(s.disconnect(),s=void 0)},f=()=>{o.value&&c.value.length&&!a.value&&(s=new ResizeObserver(t),c.value.forEach(d=>s.observe(d,n)))};r.watch(()=>c.value,()=>{u(),f()},{immediate:!0,flush:"post"});const m=()=>{a.value=!0,u()},h=()=>{a.value=!1,f()};return r.onBeforeUnmount(()=>u()),{stop:m,start:h}}function Z(e="default"){const t=r.useSlots(),n=o=>{var c;const s=(c=t[o])==null?void 0:c.call(t),a=u=>{if(u.type===r.Comment||Array.isArray(u.children)&&!u.children.length)return!1;if(u.type!==r.Text)return!0;if(typeof u.children=="string")return u.children.trim()!==""};return s&&(s!=null&&s.length)?s.some(f=>a(f)):!1};if(Array.isArray(e)){const o=r.reactive({});return e.forEach(s=>{const a=r.computed(()=>n(s));o[s]=a}),o}else return r.computed(()=>n(e))}const F={TdsReportBar:"TdsReportBar"},L={BackTop:["Tooltip"]};function G(e,t){if(["NumberAnimation","Watermark"].includes(e))return[];const n=[e];e in L&&n.push(...L[e]);const o=t!=null&&t.cjs?"lib":"es",s=[`@topdatasec/report/${o}/style/global.css`];return n.forEach(a=>{s.push(`@topdatasec/report/${o}/${F[a]}/${a}.css`)}),s}function J(e){return{type:"component",resolve:t=>{if(t in F)return{name:t,from:"@topdatasec/report",sideEffects:G(t,e)}}}}const Y=function(e){return Object.values(B).forEach(t=>{t&&t.install&&e.use(t)}),e},K={install:Y};i.TdsReportBar=y,i.VueAmazingUIResolver=J,i.add=I,i.cancelRaf=H,i.dateFormat=U,i.debounce=T,i.default=K,i.downloadFile=j,i.formatNumber=k,i.install=Y,i.rafTimeout=V,i.throttle=M,i.toggleDark=z,i.useEventListener=$,i.useFps=P,i.useMediaQuery=W,i.useMutationObserver=q,i.useResizeObserver=C,i.useScroll=x,i.useSlotsExist=Z,Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/es/bar/Bar.vue.js
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
const d = { class: "chart-components" }, f = /* @__PURE__ */ n({
|
|
1
|
+
import { defineComponent as e, computed as a, createElementBlock as n, openBlock as c } from "vue";
|
|
2
|
+
const s = { class: "chart-components" }, m = /* @__PURE__ */ e({
|
|
4
3
|
name: "TdsReportBar",
|
|
5
4
|
__name: "Bar",
|
|
6
5
|
props: {
|
|
7
6
|
data: {}
|
|
8
7
|
},
|
|
9
|
-
setup(
|
|
10
|
-
const
|
|
11
|
-
return (
|
|
12
|
-
s(c(m), { option: e.value }, null, 8, ["option"])
|
|
13
|
-
]));
|
|
8
|
+
setup(t) {
|
|
9
|
+
const o = t;
|
|
10
|
+
return console.log(o.data, 444444444), a(() => o.data.options), (r, p) => (c(), n("div", s, " 111111111111111111111 "));
|
|
14
11
|
}
|
|
15
12
|
});
|
|
16
13
|
export {
|
|
17
|
-
|
|
14
|
+
m as default
|
|
18
15
|
};
|
package/lib/bar/Bar.vue.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n={class:"chart-components"},a=e.defineComponent({name:"TdsReportBar",__name:"Bar",props:{data:{}},setup(o){const t=o;return console.log(t.data,444444444),e.computed(()=>t.data.options),(s,c)=>(e.openBlock(),e.createElementBlock("div",n," 111111111111111111111 "))}});exports.default=a;
|
package/package.json
CHANGED
package/es/alert/Alert.d.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Slot } from 'vue';
|
|
2
|
-
export interface Props {
|
|
3
|
-
message?: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
type?: 'default' | 'success' | 'info' | 'warning' | 'error';
|
|
6
|
-
bordered?: boolean;
|
|
7
|
-
closable?: boolean;
|
|
8
|
-
closeText?: string;
|
|
9
|
-
icon?: string;
|
|
10
|
-
showIcon?: boolean;
|
|
11
|
-
actions?: Slot;
|
|
12
|
-
}
|
|
13
|
-
declare function __VLS_template(): {
|
|
14
|
-
attrs: Partial<{}>;
|
|
15
|
-
slots: {
|
|
16
|
-
icon?(_: {}): any;
|
|
17
|
-
icon?(_: {}): any;
|
|
18
|
-
default?(_: {}): any;
|
|
19
|
-
description?(_: {}): any;
|
|
20
|
-
actions?(_: {}): any;
|
|
21
|
-
closeText?(_: {}): any;
|
|
22
|
-
};
|
|
23
|
-
refs: {
|
|
24
|
-
alertRef: HTMLDivElement;
|
|
25
|
-
};
|
|
26
|
-
rootEl: any;
|
|
27
|
-
};
|
|
28
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
29
|
-
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
30
|
-
close: (...args: any[]) => void;
|
|
31
|
-
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
32
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
33
|
-
}>, {
|
|
34
|
-
type: "default" | "success" | "info" | "warning" | "error";
|
|
35
|
-
message: string;
|
|
36
|
-
description: string;
|
|
37
|
-
bordered: boolean;
|
|
38
|
-
closable: boolean;
|
|
39
|
-
closeText: string;
|
|
40
|
-
icon: string;
|
|
41
|
-
showIcon: boolean;
|
|
42
|
-
actions: Slot;
|
|
43
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
44
|
-
alertRef: HTMLDivElement;
|
|
45
|
-
}, any>;
|
|
46
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
47
|
-
export default _default;
|
|
48
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
49
|
-
new (): {
|
|
50
|
-
$slots: S;
|
|
51
|
-
};
|
|
52
|
-
};
|
package/es/alert/index.d.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
export type { Props } from './Alert';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./Alert').Props> & Readonly<{
|
|
4
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
5
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
-
close: (...args: any[]) => void;
|
|
7
|
-
}, import('vue').PublicProps, {
|
|
8
|
-
type: "default" | "success" | "info" | "warning" | "error";
|
|
9
|
-
message: string;
|
|
10
|
-
description: string;
|
|
11
|
-
bordered: boolean;
|
|
12
|
-
closable: boolean;
|
|
13
|
-
closeText: string;
|
|
14
|
-
icon: string;
|
|
15
|
-
showIcon: boolean;
|
|
16
|
-
actions: import('vue').Slot;
|
|
17
|
-
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
18
|
-
alertRef: HTMLDivElement;
|
|
19
|
-
}, any, import('vue').ComponentProvideOptions, {
|
|
20
|
-
P: {};
|
|
21
|
-
B: {};
|
|
22
|
-
D: {};
|
|
23
|
-
C: {};
|
|
24
|
-
M: {};
|
|
25
|
-
Defaults: {};
|
|
26
|
-
}, Readonly<import('./Alert').Props> & Readonly<{
|
|
27
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
28
|
-
}>, {}, {}, {}, {}, {
|
|
29
|
-
type: "default" | "success" | "info" | "warning" | "error";
|
|
30
|
-
message: string;
|
|
31
|
-
description: string;
|
|
32
|
-
bordered: boolean;
|
|
33
|
-
closable: boolean;
|
|
34
|
-
closeText: string;
|
|
35
|
-
icon: string;
|
|
36
|
-
showIcon: boolean;
|
|
37
|
-
actions: import('vue').Slot;
|
|
38
|
-
}>;
|
|
39
|
-
__isFragment?: never;
|
|
40
|
-
__isTeleport?: never;
|
|
41
|
-
__isSuspense?: never;
|
|
42
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('./Alert').Props> & Readonly<{
|
|
43
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
44
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
45
|
-
close: (...args: any[]) => void;
|
|
46
|
-
}, string, {
|
|
47
|
-
type: "default" | "success" | "info" | "warning" | "error";
|
|
48
|
-
message: string;
|
|
49
|
-
description: string;
|
|
50
|
-
bordered: boolean;
|
|
51
|
-
closable: boolean;
|
|
52
|
-
closeText: string;
|
|
53
|
-
icon: string;
|
|
54
|
-
showIcon: boolean;
|
|
55
|
-
actions: import('vue').Slot;
|
|
56
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
57
|
-
$slots: {
|
|
58
|
-
icon?(_: {}): any;
|
|
59
|
-
icon?(_: {}): any;
|
|
60
|
-
default?(_: {}): any;
|
|
61
|
-
description?(_: {}): any;
|
|
62
|
-
actions?(_: {}): any;
|
|
63
|
-
closeText?(_: {}): any;
|
|
64
|
-
};
|
|
65
|
-
}) & import('vue').Plugin;
|
|
66
|
-
export default _default;
|
package/lib/alert/Alert.d.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Slot } from 'vue';
|
|
2
|
-
export interface Props {
|
|
3
|
-
message?: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
type?: 'default' | 'success' | 'info' | 'warning' | 'error';
|
|
6
|
-
bordered?: boolean;
|
|
7
|
-
closable?: boolean;
|
|
8
|
-
closeText?: string;
|
|
9
|
-
icon?: string;
|
|
10
|
-
showIcon?: boolean;
|
|
11
|
-
actions?: Slot;
|
|
12
|
-
}
|
|
13
|
-
declare function __VLS_template(): {
|
|
14
|
-
attrs: Partial<{}>;
|
|
15
|
-
slots: {
|
|
16
|
-
icon?(_: {}): any;
|
|
17
|
-
icon?(_: {}): any;
|
|
18
|
-
default?(_: {}): any;
|
|
19
|
-
description?(_: {}): any;
|
|
20
|
-
actions?(_: {}): any;
|
|
21
|
-
closeText?(_: {}): any;
|
|
22
|
-
};
|
|
23
|
-
refs: {
|
|
24
|
-
alertRef: HTMLDivElement;
|
|
25
|
-
};
|
|
26
|
-
rootEl: any;
|
|
27
|
-
};
|
|
28
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
29
|
-
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
30
|
-
close: (...args: any[]) => void;
|
|
31
|
-
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
32
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
33
|
-
}>, {
|
|
34
|
-
type: "default" | "success" | "info" | "warning" | "error";
|
|
35
|
-
message: string;
|
|
36
|
-
description: string;
|
|
37
|
-
bordered: boolean;
|
|
38
|
-
closable: boolean;
|
|
39
|
-
closeText: string;
|
|
40
|
-
icon: string;
|
|
41
|
-
showIcon: boolean;
|
|
42
|
-
actions: Slot;
|
|
43
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
44
|
-
alertRef: HTMLDivElement;
|
|
45
|
-
}, any>;
|
|
46
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
47
|
-
export default _default;
|
|
48
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
49
|
-
new (): {
|
|
50
|
-
$slots: S;
|
|
51
|
-
};
|
|
52
|
-
};
|
package/lib/alert/index.d.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
export type { Props } from './Alert';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./Alert').Props> & Readonly<{
|
|
4
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
5
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
-
close: (...args: any[]) => void;
|
|
7
|
-
}, import('vue').PublicProps, {
|
|
8
|
-
type: "default" | "success" | "info" | "warning" | "error";
|
|
9
|
-
message: string;
|
|
10
|
-
description: string;
|
|
11
|
-
bordered: boolean;
|
|
12
|
-
closable: boolean;
|
|
13
|
-
closeText: string;
|
|
14
|
-
icon: string;
|
|
15
|
-
showIcon: boolean;
|
|
16
|
-
actions: import('vue').Slot;
|
|
17
|
-
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
18
|
-
alertRef: HTMLDivElement;
|
|
19
|
-
}, any, import('vue').ComponentProvideOptions, {
|
|
20
|
-
P: {};
|
|
21
|
-
B: {};
|
|
22
|
-
D: {};
|
|
23
|
-
C: {};
|
|
24
|
-
M: {};
|
|
25
|
-
Defaults: {};
|
|
26
|
-
}, Readonly<import('./Alert').Props> & Readonly<{
|
|
27
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
28
|
-
}>, {}, {}, {}, {}, {
|
|
29
|
-
type: "default" | "success" | "info" | "warning" | "error";
|
|
30
|
-
message: string;
|
|
31
|
-
description: string;
|
|
32
|
-
bordered: boolean;
|
|
33
|
-
closable: boolean;
|
|
34
|
-
closeText: string;
|
|
35
|
-
icon: string;
|
|
36
|
-
showIcon: boolean;
|
|
37
|
-
actions: import('vue').Slot;
|
|
38
|
-
}>;
|
|
39
|
-
__isFragment?: never;
|
|
40
|
-
__isTeleport?: never;
|
|
41
|
-
__isSuspense?: never;
|
|
42
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('./Alert').Props> & Readonly<{
|
|
43
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
44
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
45
|
-
close: (...args: any[]) => void;
|
|
46
|
-
}, string, {
|
|
47
|
-
type: "default" | "success" | "info" | "warning" | "error";
|
|
48
|
-
message: string;
|
|
49
|
-
description: string;
|
|
50
|
-
bordered: boolean;
|
|
51
|
-
closable: boolean;
|
|
52
|
-
closeText: string;
|
|
53
|
-
icon: string;
|
|
54
|
-
showIcon: boolean;
|
|
55
|
-
actions: import('vue').Slot;
|
|
56
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
57
|
-
$slots: {
|
|
58
|
-
icon?(_: {}): any;
|
|
59
|
-
icon?(_: {}): any;
|
|
60
|
-
default?(_: {}): any;
|
|
61
|
-
description?(_: {}): any;
|
|
62
|
-
actions?(_: {}): any;
|
|
63
|
-
closeText?(_: {}): any;
|
|
64
|
-
};
|
|
65
|
-
}) & import('vue').Plugin;
|
|
66
|
-
export default _default;
|