@idux/charts-core 0.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/components/Chart.d.ts +9 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/useChart.d.ts +7 -0
- package/dist/composables/useResizeObserver.d.ts +6 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.mjs +1678 -0
- package/dist/index.umd.js +5 -0
- package/dist/themes/index.d.ts +1 -0
- package/dist/themes/seer.d.ts +43 -0
- package/dist/types/index.d.ts +48 -0
- package/dist/utils/index.d.ts +3 -0
- package/package.json +50 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
(function(x,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("vue-demi"),require("echarts/core"),require("lodash-es")):typeof define=="function"&&define.amd?define(["exports","vue-demi","echarts/core","lodash-es"],_):(x=typeof globalThis<"u"?globalThis:x||self,_(x.IduxChartsCore={},x.VueDemi,x.echarts,x._))})(this,function(x,_,Xe,ce){"use strict";function Qt(e,t){const n=Object.create(null),s=e.split(",");for(let r=0;r<s.length;r++)n[s[r]]=!0;return t?r=>!!n[r.toLowerCase()]:r=>!!n[r]}function Ce(e){if(E(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=I(s)?en(s):Ce(s);if(r)for(const o in r)t[o]=r[o]}return t}else{if(I(e))return e;if(v(e))return e}}const Xt=/;(?![^(]*\))/g,Zt=/:([^]+)/,kt=/\/\*.*?\*\//gs;function en(e){const t={};return e.replace(kt,"").split(Xt).forEach(n=>{if(n){const s=n.split(Zt);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function xe(e){let t="";if(I(e))t=e;else if(E(e))for(let n=0;n<e.length;n++){const s=xe(e[n]);s&&(t+=s+" ")}else if(v(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const T=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const Ze=()=>{},tn=/^on[^a-z]/,nn=e=>tn.test(e),y=Object.assign,rn=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},sn=Object.prototype.hasOwnProperty,w=(e,t)=>sn.call(e,t),E=Array.isArray,Y=e=>le(e)==="[object Map]",on=e=>le(e)==="[object Set]",O=e=>typeof e=="function",I=e=>typeof e=="string",ve=e=>typeof e=="symbol",v=e=>e!==null&&typeof e=="object",cn=e=>v(e)&&O(e.then)&&O(e.catch),ln=Object.prototype.toString,le=e=>ln.call(e),ke=e=>le(e).slice(8,-1),un=e=>le(e)==="[object Object]",Re=e=>I(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,an=(e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))})(e=>e.charAt(0).toUpperCase()+e.slice(1)),ue=(e,t)=>!Object.is(e,t),fn=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})};let et;const pn=()=>et||(et=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function tt(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let nt;function dn(e,t=nt){t&&t.active&&t.effects.push(e)}function hn(){return nt}const Ve=e=>{const t=new Set(e);return t.w=0,t.n=0,t},rt=e=>(e.w&M)>0,st=e=>(e.n&M)>0,gn=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=M},_n=e=>{const{deps:t}=e;if(t.length){let n=0;for(let s=0;s<t.length;s++){const r=t[s];rt(r)&&!st(r)?r.delete(e):t[n++]=r,r.w&=~M,r.n&=~M}t.length=n}},Fe=new WeakMap;let te=0,M=1;const ye=30;let R;const W=Symbol(process.env.NODE_ENV!=="production"?"iterate":""),Ie=Symbol(process.env.NODE_ENV!=="production"?"Map key iterate":"");class mn{constructor(t,n=null,s){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,dn(this,s)}run(){if(!this.active)return this.fn();let t=R,n=B;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=R,R=this,B=!0,M=1<<++te,te<=ye?gn(this):ot(this),this.fn()}finally{te<=ye&&_n(this),M=1<<--te,R=this.parent,B=n,this.parent=void 0,this.deferStop&&this.stop()}}stop(){R===this?this.deferStop=!0:this.active&&(ot(this),this.onStop&&this.onStop(),this.active=!1)}}function ot(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let B=!0;const it=[];function ct(){it.push(B),B=!1}function lt(){const e=it.pop();B=e===void 0?!0:e}function F(e,t,n){if(B&&R){let s=Fe.get(e);s||Fe.set(e,s=new Map);let r=s.get(n);r||s.set(n,r=Ve());const o=process.env.NODE_ENV!=="production"?{effect:R,target:e,type:t,key:n}:void 0;En(r,o)}}function En(e,t){let n=!1;te<=ye?st(e)||(e.n|=M,n=!rt(e)):n=!e.has(R),n&&(e.add(R),R.deps.push(e),process.env.NODE_ENV!=="production"&&R.onTrack&&R.onTrack(Object.assign({effect:R},t)))}function A(e,t,n,s,r,o){const i=Fe.get(e);if(!i)return;let c=[];if(t==="clear")c=[...i.values()];else if(n==="length"&&E(e)){const f=Number(s);i.forEach((h,l)=>{(l==="length"||l>=f)&&c.push(h)})}else switch(n!==void 0&&c.push(i.get(n)),t){case"add":E(e)?Re(n)&&c.push(i.get("length")):(c.push(i.get(W)),Y(e)&&c.push(i.get(Ie)));break;case"delete":E(e)||(c.push(i.get(W)),Y(e)&&c.push(i.get(Ie)));break;case"set":Y(e)&&c.push(i.get(W));break}const u=process.env.NODE_ENV!=="production"?{target:e,type:t,key:n,newValue:s,oldValue:r,oldTarget:o}:void 0;if(c.length===1)c[0]&&(process.env.NODE_ENV!=="production"?ae(c[0],u):ae(c[0]));else{const f=[];for(const h of c)h&&f.push(...h);process.env.NODE_ENV!=="production"?ae(Ve(f),u):ae(Ve(f))}}function ae(e,t){const n=E(e)?e:[...e];for(const s of n)s.computed&&ut(s,t);for(const s of n)s.computed||ut(s,t)}function ut(e,t){(e!==R||e.allowRecurse)&&(process.env.NODE_ENV!=="production"&&e.onTrigger&&e.onTrigger(y({effect:e},t)),e.scheduler?e.scheduler():e.run())}const wn=Qt("__proto__,__v_isRef,__isVue"),at=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ve)),Nn=De(),On=De(!0),bn=De(!0,!0),ft=Sn();function Sn(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=p(this);for(let o=0,i=this.length;o<i;o++)F(s,"get",o+"");const r=s[t](...n);return r===-1||r===!1?s[t](...n.map(p)):r}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){ct();const s=p(this)[t].apply(this,n);return lt(),s}}),e}function Cn(e){const t=p(this);return F(t,"has",e),t.hasOwnProperty(e)}function De(e=!1,t=!1){return function(s,r,o){if(r==="__v_isReactive")return!e;if(r==="__v_isReadonly")return e;if(r==="__v_isShallow")return t;if(r==="__v_raw"&&o===(e?t?Nt:wt:t?Kn:Et).get(s))return s;const i=E(s);if(!e){if(i&&w(ft,r))return Reflect.get(ft,r,o);if(r==="hasOwnProperty")return Cn}const c=Reflect.get(s,r,o);return(ve(r)?at.has(r):wn(r))||(e||F(s,"get",r),t)?c:V(c)?i&&Re(r)?c:c.value:v(c)?e?bt(c):Ot(c):c}}const xn=vn();function vn(e=!1){return function(n,s,r,o){let i=n[s];if(q(i)&&V(i)&&!V(r))return!1;if(!e&&(!Me(r)&&!q(r)&&(i=p(i),r=p(r)),!E(n)&&V(i)&&!V(r)))return i.value=r,!0;const c=E(n)&&Re(s)?Number(s)<n.length:w(n,s),u=Reflect.set(n,s,r,o);return n===p(o)&&(c?ue(r,i)&&A(n,"set",s,r,i):A(n,"add",s,r)),u}}function Rn(e,t){const n=w(e,t),s=e[t],r=Reflect.deleteProperty(e,t);return r&&n&&A(e,"delete",t,void 0,s),r}function Vn(e,t){const n=Reflect.has(e,t);return(!ve(t)||!at.has(t))&&F(e,"has",t),n}function Fn(e){return F(e,"iterate",E(e)?"length":W),Reflect.ownKeys(e)}const yn={get:Nn,set:xn,deleteProperty:Rn,has:Vn,ownKeys:Fn},pt={get:On,set(e,t){return process.env.NODE_ENV!=="production"&&tt(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0},deleteProperty(e,t){return process.env.NODE_ENV!=="production"&&tt(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},In=y({},pt,{get:bn}),Te=e=>e,fe=e=>Reflect.getPrototypeOf(e);function pe(e,t,n=!1,s=!1){e=e.__v_raw;const r=p(e),o=p(t);n||(t!==o&&F(r,"get",t),F(r,"get",o));const{has:i}=fe(r),c=s?Te:n?je:ze;if(i.call(r,t))return c(e.get(t));if(i.call(r,o))return c(e.get(o));e!==r&&e.get(t)}function de(e,t=!1){const n=this.__v_raw,s=p(n),r=p(e);return t||(e!==r&&F(s,"has",e),F(s,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function he(e,t=!1){return e=e.__v_raw,!t&&F(p(e),"iterate",W),Reflect.get(e,"size",e)}function dt(e){e=p(e);const t=p(this);return fe(t).has.call(t,e)||(t.add(e),A(t,"add",e,e)),this}function ht(e,t){t=p(t);const n=p(this),{has:s,get:r}=fe(n);let o=s.call(n,e);o?process.env.NODE_ENV!=="production"&&mt(n,s,e):(e=p(e),o=s.call(n,e));const i=r.call(n,e);return n.set(e,t),o?ue(t,i)&&A(n,"set",e,t,i):A(n,"add",e,t),this}function gt(e){const t=p(this),{has:n,get:s}=fe(t);let r=n.call(t,e);r?process.env.NODE_ENV!=="production"&&mt(t,n,e):(e=p(e),r=n.call(t,e));const o=s?s.call(t,e):void 0,i=t.delete(e);return r&&A(t,"delete",e,void 0,o),i}function _t(){const e=p(this),t=e.size!==0,n=process.env.NODE_ENV!=="production"?Y(e)?new Map(e):new Set(e):void 0,s=e.clear();return t&&A(e,"clear",void 0,void 0,n),s}function ge(e,t){return function(s,r){const o=this,i=o.__v_raw,c=p(i),u=t?Te:e?je:ze;return!e&&F(c,"iterate",W),i.forEach((f,h)=>s.call(r,u(f),u(h),o))}}function _e(e,t,n){return function(...s){const r=this.__v_raw,o=p(r),i=Y(o),c=e==="entries"||e===Symbol.iterator&&i,u=e==="keys"&&i,f=r[e](...s),h=n?Te:t?je:ze;return!t&&F(o,"iterate",u?Ie:W),{next(){const{value:l,done:a}=f.next();return a?{value:l,done:a}:{value:c?[h(l[0]),h(l[1])]:h(l),done:a}},[Symbol.iterator](){return this}}}}function z(e){return function(...t){if(process.env.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";console.warn(`${an(e)} operation ${n}failed: target is readonly.`,p(this))}return e==="delete"?!1:this}}function Dn(){const e={get(o){return pe(this,o)},get size(){return he(this)},has:de,add:dt,set:ht,delete:gt,clear:_t,forEach:ge(!1,!1)},t={get(o){return pe(this,o,!1,!0)},get size(){return he(this)},has:de,add:dt,set:ht,delete:gt,clear:_t,forEach:ge(!1,!0)},n={get(o){return pe(this,o,!0)},get size(){return he(this,!0)},has(o){return de.call(this,o,!0)},add:z("add"),set:z("set"),delete:z("delete"),clear:z("clear"),forEach:ge(!0,!1)},s={get(o){return pe(this,o,!0,!0)},get size(){return he(this,!0)},has(o){return de.call(this,o,!0)},add:z("add"),set:z("set"),delete:z("delete"),clear:z("clear"),forEach:ge(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=_e(o,!1,!1),n[o]=_e(o,!0,!1),t[o]=_e(o,!1,!0),s[o]=_e(o,!0,!0)}),[e,n,t,s]}const[Tn,Pn,$n,Mn]=Dn();function Pe(e,t){const n=t?e?Mn:$n:e?Pn:Tn;return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(w(n,r)&&r in s?n:s,r,o)}const An={get:Pe(!1,!1)},zn={get:Pe(!0,!1)},jn={get:Pe(!0,!0)};function mt(e,t,n){const s=p(n);if(s!==n&&t.call(e,s)){const r=ke(e);console.warn(`Reactive ${r} contains both the raw and reactive versions of the same object${r==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const Et=new WeakMap,Kn=new WeakMap,wt=new WeakMap,Nt=new WeakMap;function Hn(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Wn(e){return e.__v_skip||!Object.isExtensible(e)?0:Hn(ke(e))}function Ot(e){return q(e)?e:$e(e,!1,yn,An,Et)}function bt(e){return $e(e,!0,pt,zn,wt)}function me(e){return $e(e,!0,In,jn,Nt)}function $e(e,t,n,s,r){if(!v(e))return process.env.NODE_ENV!=="production"&&console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const i=Wn(e);if(i===0)return e;const c=new Proxy(e,i===2?s:n);return r.set(e,c),c}function U(e){return q(e)?U(e.__v_raw):!!(e&&e.__v_isReactive)}function q(e){return!!(e&&e.__v_isReadonly)}function Me(e){return!!(e&&e.__v_isShallow)}function Ae(e){return U(e)||q(e)}function p(e){const t=e&&e.__v_raw;return t?p(t):e}function Bn(e){return fn(e,"__v_skip",!0),e}const ze=e=>v(e)?Ot(e):e,je=e=>v(e)?bt(e):e;function V(e){return!!(e&&e.__v_isRef===!0)}function Un(e){return V(e)?e.value:e}const qn={get:(e,t,n)=>Un(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return V(r)&&!V(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Ln(e){return U(e)?e:new Proxy(e,qn)}const L=[];function Gn(e){L.push(e)}function Jn(){L.pop()}function b(e,...t){if(process.env.NODE_ENV==="production")return;ct();const n=L.length?L[L.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=Yn();if(s)G(s,n,11,[e+t.join(""),n&&n.proxy,r.map(({vnode:o})=>`at <${Bt(n,o.type)}>`).join(`
|
|
2
|
+
`),r]);else{const o=[`[Vue warn]: ${e}`,...t];r.length&&o.push(`
|
|
3
|
+
`,...Qn(r)),console.warn(...o)}lt()}function Yn(){let e=L[L.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function Qn(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[`
|
|
4
|
+
`],...Xn(n))}),t}function Xn({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,r=` at <${Bt(e.component,e.type,s)}`,o=">"+n;return e.props?[r,...Zn(e.props),o]:[r+o]}function Zn(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...St(s,e[s]))}),n.length>3&&t.push(" ..."),t}function St(e,t,n){return I(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:V(t)?(t=St(e,p(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):O(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=p(t),n?t:[`${e}=`,t])}const Ct={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",[0]:"setup function",[1]:"render function",[2]:"watcher getter",[3]:"watcher callback",[4]:"watcher cleanup function",[5]:"native event handler",[6]:"component event handler",[7]:"vnode hook",[8]:"directive hook",[9]:"transition hook",[10]:"app errorHandler",[11]:"app warnHandler",[12]:"ref function",[13]:"async component loader",[14]:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"};function G(e,t,n,s){let r;try{r=s?e(...s):e()}catch(o){xt(o,t,n)}return r}function Ke(e,t,n,s){if(O(e)){const o=G(e,t,n,s);return o&&cn(o)&&o.catch(i=>{xt(i,t,n)}),o}const r=[];for(let o=0;o<e.length;o++)r.push(Ke(e[o],t,n,s));return r}function xt(e,t,n,s=!0){const r=t?t.vnode:null;if(t){let o=t.parent;const i=t.proxy,c=process.env.NODE_ENV!=="production"?Ct[n]:n;for(;o;){const f=o.ec;if(f){for(let h=0;h<f.length;h++)if(f[h](e,i,c)===!1)return}o=o.parent}const u=t.appContext.config.errorHandler;if(u){G(u,null,10,[e,i,c]);return}}kn(e,n,r,s)}function kn(e,t,n,s=!0){if(process.env.NODE_ENV!=="production"){const r=Ct[t];if(n&&Gn(n),b(`Unhandled error${r?` during execution of ${r}`:""}`),n&&Jn(),s)throw e;console.error(e)}else console.error(e)}let Ee=!1,He=!1;const D=[];let j=0;const Q=[];let P=null,K=0;const vt=Promise.resolve();let We=null;const er=100;function tr(e){const t=We||vt;return e?t.then(this?e.bind(this):e):t}function nr(e){let t=j+1,n=D.length;for(;t<n;){const s=t+n>>>1;ne(D[s])<e?t=s+1:n=s}return t}function Be(e){(!D.length||!D.includes(e,Ee&&e.allowRecurse?j+1:j))&&(e.id==null?D.push(e):D.splice(nr(e.id),0,e),Rt())}function Rt(){!Ee&&!He&&(He=!0,We=vt.then(Ft))}function Vt(e){E(e)?Q.push(...e):(!P||!P.includes(e,e.allowRecurse?K+1:K))&&Q.push(e),Rt()}function rr(e){if(Q.length){const t=[...new Set(Q)];if(Q.length=0,P){P.push(...t);return}for(P=t,process.env.NODE_ENV!=="production"&&(e=e||new Map),P.sort((n,s)=>ne(n)-ne(s)),K=0;K<P.length;K++)process.env.NODE_ENV!=="production"&&yt(e,P[K])||P[K]();P=null,K=0}}const ne=e=>e.id==null?1/0:e.id,sr=(e,t)=>{const n=ne(e)-ne(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Ft(e){He=!1,Ee=!0,process.env.NODE_ENV!=="production"&&(e=e||new Map),D.sort(sr);const t=process.env.NODE_ENV!=="production"?n=>yt(e,n):Ze;try{for(j=0;j<D.length;j++){const n=D[j];if(n&&n.active!==!1){if(process.env.NODE_ENV!=="production"&&t(n))continue;G(n,null,14)}}}finally{j=0,D.length=0,rr(e),Ee=!1,We=null,(D.length||Q.length)&&Ft(e)}}function yt(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>er){const s=t.ownerInstance,r=s&&Wt(s.type);return b(`Maximum recursive updates exceeded${r?` in component <${r}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`),!0}else e.set(t,n+1)}}const re=new Set;process.env.NODE_ENV!=="production"&&(pn().__VUE_HMR_RUNTIME__={createRecord:Ue(or),rerender:Ue(ir),reload:Ue(cr)});const we=new Map;function or(e,t){return we.has(e)?!1:(we.set(e,{initialDef:se(t),instances:new Set}),!0)}function se(e){return Ut(e)?e.__vccOpts:e}function ir(e,t){const n=we.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(s=>{t&&(s.render=t,se(s.type).render=t),s.renderCache=[],s.update()}))}function cr(e,t){const n=we.get(e);if(!n)return;t=se(t),It(n.initialDef,t);const s=[...n.instances];for(const r of s){const o=se(r.type);re.has(o)||(o!==n.initialDef&&It(o,t),re.add(o)),r.appContext.optionsCache.delete(r.type),r.ceReload?(re.add(o),r.ceReload(t.styles),re.delete(o)):r.parent?Be(r.parent.update):r.appContext.reload?r.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")}Vt(()=>{for(const r of s)re.delete(se(r.type))})}function It(e,t){y(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function Ue(e){return(t,n)=>{try{return e(t,n)}catch(s){console.error(s),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let H=null,lr=null;function Lr(){}const ur=e=>e.__isSuspense;function ar(e,t){t&&t.pendingBranch?E(e)?t.effects.push(...e):t.effects.push(e):Vt(e)}const Ne={};function fr(e,t,{immediate:n,deep:s,flush:r,onTrack:o,onTrigger:i}=T){process.env.NODE_ENV!=="production"&&!t&&(n!==void 0&&b('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),s!==void 0&&b('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'));const c=m=>{b("Invalid watch source: ",m,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},u=hn()===($==null?void 0:$.scope)?$:null;let f,h=!1,l=!1;if(V(e)?(f=()=>e.value,h=Me(e)):U(e)?(f=()=>e,s=!0):E(e)?(l=!0,h=e.some(m=>U(m)||Me(m)),f=()=>e.map(m=>{if(V(m))return m.value;if(U(m))return X(m);if(O(m))return G(m,u,2);process.env.NODE_ENV!=="production"&&c(m)})):O(e)?t?f=()=>G(e,u,2):f=()=>{if(!(u&&u.isUnmounted))return a&&a(),Ke(e,u,3,[d])}:(f=Ze,process.env.NODE_ENV!=="production"&&c(e)),t&&s){const m=f;f=()=>X(m())}let a,d=m=>{a=C.onStop=()=>{G(m,u,4)}},g=l?new Array(e.length).fill(Ne):Ne;const N=()=>{if(C.active)if(t){const m=C.run();(s||h||(l?m.some((ie,Qe)=>ue(ie,g[Qe])):ue(m,g)))&&(a&&a(),Ke(t,u,3,[m,g===Ne?void 0:l&&g[0]===Ne?[]:g,d]),g=m)}else C.run()};N.allowRecurse=!!t;let ee;r==="sync"?ee=N:r==="post"?ee=()=>Pt(N,u&&u.suspense):(N.pre=!0,u&&(N.id=u.uid),ee=()=>Be(N));const C=new mn(f,ee);return process.env.NODE_ENV!=="production"&&(C.onTrack=o,C.onTrigger=i),t?n?N():g=C.run():r==="post"?Pt(C.run.bind(C),u&&u.suspense):C.run(),()=>{C.stop(),u&&u.scope&&rn(u.scope.effects,C)}}function pr(e,t,n){const s=this.proxy,r=I(e)?e.includes(".")?dr(s,e):()=>s[e]:e.bind(s,s);let o;O(t)?o=t:(o=t.handler,n=t);const i=$;Ht(this);const c=fr(r,o.bind(s),n);return i?Ht(i):yr(),c}function dr(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}function X(e,t){if(!v(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),V(e))X(e.value,t);else if(E(e))for(let n=0;n<e.length;n++)X(e[n],t);else if(on(e)||Y(e))e.forEach(n=>{X(n,t)});else if(un(e))for(const n in e)X(e[n],t);return e}const hr=Symbol(),qe=e=>e?Ir(e)?Dr(e)||e.proxy:qe(e.parent):null,oe=y(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>process.env.NODE_ENV!=="production"?me(e.props):e.props,$attrs:e=>process.env.NODE_ENV!=="production"?me(e.attrs):e.attrs,$slots:e=>process.env.NODE_ENV!=="production"?me(e.slots):e.slots,$refs:e=>process.env.NODE_ENV!=="production"?me(e.refs):e.refs,$parent:e=>qe(e.parent),$root:e=>qe(e.root),$emit:e=>e.emit,$options:e=>mr(e),$forceUpdate:e=>e.f||(e.f=()=>Be(e.update)),$nextTick:e=>e.n||(e.n=tr.bind(e.proxy)),$watch:e=>pr.bind(e)}),gr=e=>e==="_"||e==="$",Le=(e,t)=>e!==T&&!e.__isScriptSetup&&w(e,t),_r={get({_:e},t){const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:c,appContext:u}=e;if(process.env.NODE_ENV!=="production"&&t==="__isVue")return!0;let f;if(t[0]!=="$"){const d=i[t];if(d!==void 0)switch(d){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(Le(s,t))return i[t]=1,s[t];if(r!==T&&w(r,t))return i[t]=2,r[t];if((f=e.propsOptions[0])&&w(f,t))return i[t]=3,o[t];if(n!==T&&w(n,t))return i[t]=4,n[t];i[t]=0}}const h=oe[t];let l,a;if(h)return t==="$attrs"&&(F(e,"get",t),process.env.NODE_ENV!=="production"&&void 0),h(e);if((l=c.__cssModules)&&(l=l[t]))return l;if(n!==T&&w(n,t))return i[t]=4,n[t];if(a=u.config.globalProperties,w(a,t))return a[t];process.env.NODE_ENV!=="production"&&H&&(!I(t)||t.indexOf("__v")!==0)&&(r!==T&&gr(t[0])&&w(r,t)?b(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===H&&b(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return Le(r,t)?(r[t]=n,!0):process.env.NODE_ENV!=="production"&&r.__isScriptSetup&&w(r,t)?(b(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):s!==T&&w(s,t)?(s[t]=n,!0):w(e.props,t)?(process.env.NODE_ENV!=="production"&&b(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(process.env.NODE_ENV!=="production"&&b(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(process.env.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(o,t,{enumerable:!0,configurable:!0,value:n}):o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:o}},i){let c;return!!n[i]||e!==T&&w(e,i)||Le(t,i)||(c=o[0])&&w(c,i)||w(s,i)||w(oe,i)||w(r.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:w(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};process.env.NODE_ENV!=="production"&&(_r.ownKeys=e=>(b("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));function mr(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,c=o.get(t);let u;return c?u=c:!r.length&&!n&&!s?u=t:(u={},r.length&&r.forEach(f=>Oe(u,f,i,!0)),Oe(u,t,i)),v(t)&&o.set(t,u),u}function Oe(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&Oe(e,o,n,!0),r&&r.forEach(i=>Oe(e,i,n,!0));for(const i in t)if(s&&i==="expose")process.env.NODE_ENV!=="production"&&b('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const c=Er[i]||n&&n[i];e[i]=c?c(e[i],t[i]):t[i]}return e}const Er={data:Dt,props:J,emits:J,methods:J,computed:J,beforeCreate:S,created:S,beforeMount:S,mounted:S,beforeUpdate:S,updated:S,beforeDestroy:S,beforeUnmount:S,destroyed:S,unmounted:S,activated:S,deactivated:S,errorCaptured:S,serverPrefetch:S,components:J,directives:J,watch:Nr,provide:Dt,inject:wr};function Dt(e,t){return t?e?function(){return y(O(e)?e.call(this,this):e,O(t)?t.call(this,this):t)}:t:e}function wr(e,t){return J(Tt(e),Tt(t))}function Tt(e){if(E(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function S(e,t){return e?[...new Set([].concat(e,t))]:t}function J(e,t){return e?y(y(Object.create(null),e),t):t}function Nr(e,t){if(!e)return t;if(!t)return e;const n=y(Object.create(null),e);for(const s in t)n[s]=S(e[s],t[s]);return n}const Pt=ar,Or=e=>e.__isTeleport,$t=Symbol(process.env.NODE_ENV!=="production"?"Fragment":void 0),br=Symbol(process.env.NODE_ENV!=="production"?"Text":void 0),Sr=Symbol(process.env.NODE_ENV!=="production"?"Comment":void 0);Symbol(process.env.NODE_ENV!=="production"?"Static":void 0);let Z=null;function Cr(e){return e?e.__v_isVNode===!0:!1}const xr=(...e)=>jt(...e),Mt="__vInternal",At=({key:e})=>e??null,be=({ref:e,ref_key:t,ref_for:n})=>e!=null?I(e)||V(e)||O(e)?{i:H,r:e,k:t,f:!!n}:e:null;function vr(e,t=null,n=null,s=0,r=null,o=e===$t?0:1,i=!1,c=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&At(t),ref:t&&be(t),scopeId:lr,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:H};return c?(Ge(u,n),o&128&&e.normalize(u)):n&&(u.shapeFlag|=I(n)?8:16),process.env.NODE_ENV!=="production"&&u.key!==u.key&&b("VNode created with invalid key (NaN). VNode type:",u.type),!i&&Z&&(u.patchFlag>0||o&6)&&u.patchFlag!==32&&Z.push(u),u}const zt=process.env.NODE_ENV!=="production"?xr:jt;function jt(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===hr)&&(process.env.NODE_ENV!=="production"&&!e&&b(`Invalid vnode type when creating vnode: ${e}.`),e=Sr),Cr(e)){const c=Se(e,t,!0);return n&&Ge(c,n),!o&&Z&&(c.shapeFlag&6?Z[Z.indexOf(e)]=c:Z.push(c)),c.patchFlag|=-2,c}if(Ut(e)&&(e=e.__vccOpts),t){t=Rr(t);let{class:c,style:u}=t;c&&!I(c)&&(t.class=xe(c)),v(u)&&(Ae(u)&&!E(u)&&(u=y({},u)),t.style=Ce(u))}const i=I(e)?1:ur(e)?128:Or(e)?64:v(e)?4:O(e)?2:0;return process.env.NODE_ENV!=="production"&&i&4&&Ae(e)&&(e=p(e),b("Vue received a Component which was made a reactive object. This can lead to unnecessary performance overhead, and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
|
|
5
|
+
Component that was made reactive: `,e)),vr(e,t,n,s,r,i,o,!0)}function Rr(e){return e?Ae(e)||Mt in e?y({},e):e:null}function Se(e,t,n=!1){const{props:s,ref:r,patchFlag:o,children:i}=e,c=t?Fr(s||{},t):s;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&At(c),ref:t&&t.ref?n&&r?E(r)?r.concat(be(t)):[r,be(t)]:be(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:process.env.NODE_ENV!=="production"&&o===-1&&E(i)?i.map(Kt):i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==$t?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Se(e.ssContent),ssFallback:e.ssFallback&&Se(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Kt(e){const t=Se(e);return E(e.children)&&(t.children=e.children.map(Kt)),t}function Vr(e=" ",t=0){return zt(br,null,e,t)}function Ge(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(E(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Ge(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!(Mt in t)?t._ctx=H:r===3&&H&&(H.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else O(t)?(t={default:t,_ctx:H},n=32):(t=String(t),s&64?(n=16,t=[Vr(t)]):n=8);e.children=t,e.shapeFlag|=n}function Fr(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=xe([t.class,s.class]));else if(r==="style")t.style=Ce([t.style,s.style]);else if(nn(r)){const o=t[r],i=s[r];i&&o!==i&&!(E(o)&&o.includes(i))&&(t[r]=o?[].concat(o,i):i)}else r!==""&&(t[r]=s[r])}return t}let $=null;const Ht=e=>{$=e,e.scope.on()},yr=()=>{$&&$.scope.off(),$=null};function Ir(e){return e.vnode.shapeFlag&4}function Dr(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Ln(Bn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in oe)return oe[n](e)},has(t,n){return n in t||n in oe}}))}const Tr=/(?:^|[-_])(\w)/g,Pr=e=>e.replace(Tr,t=>t.toUpperCase()).replace(/[-_]/g,"");function Wt(e,t=!0){return O(e)?e.displayName||e.name:e.name||t&&e.__name}function Bt(e,t,n=!1){let s=Wt(t);if(!s&&t.__file){const r=t.__file.match(/([^/\\]+)\.\w+$/);r&&(s=r[1])}if(!s&&e&&e.parent){const r=o=>{for(const i in o)if(o[i]===t)return i};s=r(e.components||e.parent.type.components)||r(e.appContext.components)}return s?Pr(s):n?"App":"Anonymous"}function Ut(e){return O(e)&&"__vccOpts"in e}Symbol(process.env.NODE_ENV!=="production"?"ssrContext":"");function Je(e){return!!(e&&e.__v_isShallow)}function $r(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#0b1bc9"},n={style:"color:#b62e24"},s={style:"color:#9d288c"},r={header(l){return v(l)?l.__isVue?["div",e,"VueInstance"]:V(l)?["div",{},["span",e,h(l)],"<",c(l.value),">"]:U(l)?["div",{},["span",e,Je(l)?"ShallowReactive":"Reactive"],"<",c(l),`>${q(l)?" (readonly)":""}`]:q(l)?["div",{},["span",e,Je(l)?"ShallowReadonly":"Readonly"],"<",c(l),">"]:null:null},hasBody(l){return l&&l.__isVue},body(l){if(l&&l.__isVue)return["div",{},...o(l.$)]}};function o(l){const a=[];l.type.props&&l.props&&a.push(i("props",p(l.props))),l.setupState!==T&&a.push(i("setup",l.setupState)),l.data!==T&&a.push(i("data",p(l.data)));const d=u(l,"computed");d&&a.push(i("computed",d));const g=u(l,"inject");return g&&a.push(i("injected",g)),a.push(["div",{},["span",{style:s.style+";opacity:0.66"},"$ (internal): "],["object",{object:l}]]),a}function i(l,a){return a=y({},a),Object.keys(a).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},l],["div",{style:"padding-left:1.25em"},...Object.keys(a).map(d=>["div",{},["span",s,d+": "],c(a[d],!1)])]]:["span",{}]}function c(l,a=!0){return typeof l=="number"?["span",t,l]:typeof l=="string"?["span",n,JSON.stringify(l)]:typeof l=="boolean"?["span",s,l]:v(l)?["object",{object:a?p(l):l}]:["span",n,String(l)]}function u(l,a){const d=l.type;if(O(d))return;const g={};for(const N in l.ctx)f(d,N,a)&&(g[N]=l.ctx[N]);return g}function f(l,a,d){const g=l[d];if(E(g)&&g.includes(a)||v(g)&&a in g||l.extends&&f(l.extends,a,d)||l.mixins&&l.mixins.some(N=>f(N,a,d)))return!0}function h(l){return Je(l)?"ShallowRef":l.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(r):window.devtoolsFormatters=[r]}function Mr(){$r()}process.env.NODE_ENV!=="production"&&Mr();function Ar(e,t,n){let s;_.watch([e,t,n],([r,o,i],c,u)=>{!r||!o||(i?(s??(s=Xe.throttle(()=>o.resize(),16)),zr(r,s)):qt(r,s),u(()=>qt(r,s)))})}const k=new Map;function zr(e,t,n){if(!(!e||!t))if(k.has(e))k.get(e).listeners.push(t);else{const s=[t],r=new ResizeObserver(o=>{o.forEach(i=>s.forEach(c=>c(i)))});r.observe(e,n),k.set(e,{listeners:s,ro:r})}}function qt(e,t){if(!e||!t||!k.has(e))return;const{listeners:n,ro:s}=k.get(e),r=n.indexOf(t);r>-1&&(n.splice(r,1),n.length===0&&(s.disconnect(),k.delete(e)))}function Lt(e){const t=_.shallowRef(),n=_.shallowRef(),s=_.shallowRef(),r=_.computed(()=>e.value.autoResize??!0),o=_.computed(()=>e.value.group),i=_.computed(()=>e.value.initOption),c=_.computed(()=>e.value.loading),u=_.computed(()=>e.value.setOptionOpts),f=_.computed(()=>e.value.theme),h=()=>{const a=t.value;if(!a)return;const d=Xe.init(a,f.value,i.value),g=e.value,{restOptions:N,events:ee}=Gt(g,!1);d.setOption(N,u.value),s.value=ce.cloneDeep(N),ee.forEach(([C,Ye,m])=>{let ie=Ye;m&&(ie=(...Qe)=>{Ye(...Qe),d.off(C,ie)}),d.on(C,ie)}),g.onReady&&g.onReady(d),n.value=d},l=()=>{n.value&&(n.value.dispose(),n.value=void 0)};return _.onMounted(()=>h()),_.onBeforeUnmount(()=>l()),_.watch(e,a=>{const d=n.value;if(!d)return;const{restOptions:g}=Gt(a);ce.isEqual(g,s.value)||(d.setOption(g,u.value),s.value=ce.cloneDeep(g))},{deep:!0}),_.watch([f,i],()=>{l(),h()},{deep:!0}),_.watchEffect(()=>{const a=o.value;a&&n.value&&(n.value.group=a)}),_.watchEffect(()=>{const a=n.value;if(!a)return;const d=c.value;d?a.showLoading(ce.isObject(d)?d:void 0):a.hideLoading()}),Ar(t,n,r),{containerRef:t,chartRef:n}}function jr(e){return/^on[^a-z]/.test(e)}const Kr=["class","style","autoResize","group","loading","setOptionOpts","theme","onReady"];function Gt(e,t=!0){const n={},s=[];return Object.keys(e).forEach(r=>{if(!Kr.includes(r)){if(jr(r)){if(t)return;const o=e[r];if(o){const i=r.endsWith("Once"),c=i?r.length-4:void 0,u=r.charAt(2).toLowerCase()+r.substring(3,c);s.push([u,o,i])}return}n[r]=e[r]}}),{restOptions:n,events:s}}const Jt=Symbol("CHART_TOKEN"),Hr={theme:"seer"},Wr=_.defineComponent({name:"IxChart",inheritAttrs:!1,setup(e,{attrs:t}){const n=_.inject(Jt,Hr),s=_.computed(()=>({...n,...t})),{containerRef:r}=Lt(s);return()=>{const{class:o,style:i}=s.value;return zt("div",{ref:r,class:o,style:i},null)}}}),Yt=["#458FFF","#45D9A3","#FFC145","#F5654F","#6A6AFD","#6ED1FF","#008787","#FF9245","#F587B3","#8352CC"],Br=["#458FFF","#C8DEFF","#45D9A3","#C8F4E4","#FFC145","#FFEDC8","#F5654F","#FCD1CB","#6A6AFD","#D3D3FE","#6ED1FF","#D3D3FE","#008787","#B3DBDB","#FF9245","#FFDFC8","#F587B3","#FCDBE8","#8352CC","#FCDBE8"],Ur={color:Yt,textStyle:{color:"#2F3540",fontSize:"12px"},pie:{avoidLabelOverlap:!1,center:["25%","50%"],itemStyle:{borderWidth:1,borderColor:"#fff"},label:{show:!1,formatter:"{c}",position:"inside"}},legend:{textStyle:{color:"#2F3540",fontSize:"12px"}},title:{itemGap:4,textStyle:{color:"#2F3540",fontSize:"30px"},subtextStyle:{color:"#6F7785",fontSize:"12px"}},tooltip:{borderWidth:0,padding:12}};x.CHART_TOKEN=Jt,x.IxChart=Wr,x.seerColors10=Yt,x.seerColors20=Br,x.seerTheme=Ur,x.useChart=Lt,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './seer';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const seerColors10: string[];
|
|
2
|
+
export declare const seerColors20: string[];
|
|
3
|
+
export declare const seerTheme: {
|
|
4
|
+
color: string[];
|
|
5
|
+
textStyle: {
|
|
6
|
+
color: string;
|
|
7
|
+
fontSize: string;
|
|
8
|
+
};
|
|
9
|
+
pie: {
|
|
10
|
+
avoidLabelOverlap: boolean;
|
|
11
|
+
center: string[];
|
|
12
|
+
itemStyle: {
|
|
13
|
+
borderWidth: number;
|
|
14
|
+
borderColor: string;
|
|
15
|
+
};
|
|
16
|
+
label: {
|
|
17
|
+
show: boolean;
|
|
18
|
+
formatter: string;
|
|
19
|
+
position: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
legend: {
|
|
23
|
+
textStyle: {
|
|
24
|
+
color: string;
|
|
25
|
+
fontSize: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
title: {
|
|
29
|
+
itemGap: number;
|
|
30
|
+
textStyle: {
|
|
31
|
+
color: string;
|
|
32
|
+
fontSize: string;
|
|
33
|
+
};
|
|
34
|
+
subtextStyle: {
|
|
35
|
+
color: string;
|
|
36
|
+
fontSize: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
tooltip: {
|
|
40
|
+
borderWidth: number;
|
|
41
|
+
padding: number;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { BarSeriesOption, LineSeriesOption, PieSeriesOption } from 'echarts/charts';
|
|
2
|
+
import type { LegendComponentOption, TitleComponentOption, TooltipComponentOption } from 'echarts/components';
|
|
3
|
+
import type { ComposeOption, EChartsType, init, SetOptionOpts } from 'echarts/core';
|
|
4
|
+
export type ChartInitParameters = Parameters<typeof init>;
|
|
5
|
+
export type ChartTheme = NonNullable<ChartInitParameters[1]>;
|
|
6
|
+
export type ChartInitOption = NonNullable<ChartInitParameters[2]>;
|
|
7
|
+
export interface AdditionalChartOption<T extends EChartsType = EChartsType> {
|
|
8
|
+
/**
|
|
9
|
+
* 是否开启自动 resize
|
|
10
|
+
*/
|
|
11
|
+
autoResize?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* 图表的分组
|
|
14
|
+
*/
|
|
15
|
+
group?: string;
|
|
16
|
+
/**
|
|
17
|
+
* 图表用于初始化的配置
|
|
18
|
+
*/
|
|
19
|
+
initOption?: ChartInitOption;
|
|
20
|
+
/**
|
|
21
|
+
* 是否显示加载中状态
|
|
22
|
+
*/
|
|
23
|
+
loading?: boolean | object;
|
|
24
|
+
/**
|
|
25
|
+
* 图表实例 setOption 的第二个参数
|
|
26
|
+
*/
|
|
27
|
+
setOptionOpts?: SetOptionOpts;
|
|
28
|
+
/**
|
|
29
|
+
* 图表的主题
|
|
30
|
+
*/
|
|
31
|
+
theme?: ChartTheme;
|
|
32
|
+
/**
|
|
33
|
+
* 图表渲染完成执行回调
|
|
34
|
+
*/
|
|
35
|
+
onReady?: (chart: T) => void;
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
}
|
|
38
|
+
interface ComponentOption {
|
|
39
|
+
mainType?: string;
|
|
40
|
+
type?: string;
|
|
41
|
+
id?: string | number;
|
|
42
|
+
name?: string | number;
|
|
43
|
+
z?: number;
|
|
44
|
+
zlevel?: number;
|
|
45
|
+
}
|
|
46
|
+
export type BaseChartOption<T extends ComponentOption> = ComposeOption<LegendComponentOption | TitleComponentOption | TooltipComponentOption | T>;
|
|
47
|
+
export type ChartOption = ComposeOption<BarSeriesOption | PieSeriesOption | LineSeriesOption | LegendComponentOption | TitleComponentOption | TooltipComponentOption>;
|
|
48
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@idux/charts-core",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "A UI Component Development Kit for Vue 3.x",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"vue",
|
|
7
|
+
"vue3",
|
|
8
|
+
"vue 3.x",
|
|
9
|
+
"chart",
|
|
10
|
+
"charts"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/IDuxFE/idux-charts#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/IDuxFE/idux-charts/issues"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/IDuxFE/idux-charts",
|
|
19
|
+
"directory": "packages/core"
|
|
20
|
+
},
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"author": "IDuxFE<idux.feteam@gmail.com>",
|
|
23
|
+
"main": "./dist/index.mjs",
|
|
24
|
+
"module": "./dist/index.mjs",
|
|
25
|
+
"typings": "./dist/index.d.ts",
|
|
26
|
+
"unpkg": "./dist/index.umd.js",
|
|
27
|
+
"jsdelivr": "./dist/index.umd.js",
|
|
28
|
+
"sideEffects": false,
|
|
29
|
+
"files": [
|
|
30
|
+
"/dist"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"clean": "rimraf dist node_modules",
|
|
34
|
+
"build": "rimraf dist && vite build"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"echarts": "^5.4.0",
|
|
38
|
+
"lodash-es": "^4.17.0",
|
|
39
|
+
"vue-demi": "^0.13.0"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"@vue/composition-api": "^1.7.0",
|
|
43
|
+
"vue": "^2.6.0 || ^3.2.0"
|
|
44
|
+
},
|
|
45
|
+
"peerDependenciesMeta": {
|
|
46
|
+
"@vue/composition-api": {
|
|
47
|
+
"optional": true
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|