vue-data-ui 2.3.3 → 2.3.5
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/README.md +19 -15
- package/dist/Arrow-BSOdhAJO.cjs +1 -0
- package/dist/Arrow-BjDVSrfA.js +101 -0
- package/dist/BaseIcon-BoKtpbrI.cjs +1 -0
- package/dist/BaseIcon-vmmfWlyR.js +174 -0
- package/dist/DataTable-CaB7GIwQ.js +127 -0
- package/dist/DataTable-ssrNbONo.cjs +1 -0
- package/dist/Legend-DHpoRTAE.js +62 -0
- package/dist/Legend-Dl5IYoxK.cjs +1 -0
- package/dist/Shape-CQT4S7N-.js +107 -0
- package/dist/Shape-CaF4pvOn.cjs +1 -0
- package/dist/Slicer-Bdb1BlrC.js +156 -0
- package/dist/Slicer-QC8nTm24.cjs +1 -0
- package/dist/Title-BNPZwnkp.js +46 -0
- package/dist/Title-Cj_xubjI.cjs +1 -0
- package/dist/Tooltip-CdJ5hegk.cjs +1 -0
- package/dist/Tooltip-ZnJAz6dl.js +94 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/documentation/installation.md +14 -13
- package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
- package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
- package/dist/index-BMCvLyab.js +10369 -0
- package/dist/index-BkomIE9L.cjs +4 -0
- package/dist/{index.es-ypwniJN8.js → index.es-YufTdp0y.js} +1 -1
- package/dist/{index.es-Dnua3tHc.cjs → index.es-uyeSCnWE.cjs} +1 -1
- package/dist/jspdf.es.min-C660YX78.js +8038 -0
- package/dist/jspdf.es.min-DLYY9DTT.cjs +243 -0
- package/dist/pdf-97UbtKC2.js +44 -0
- package/dist/pdf-Cz3729tZ.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +105 -5
- package/dist/types/vue-data-ui.d.ts +105 -5
- package/dist/useNestedProp-BMxXyPbW.cjs +1 -0
- package/dist/useNestedProp-CkP8xhG_.js +13 -0
- package/dist/usePrinter-BuuBz5JR.js +513 -0
- package/dist/usePrinter-r6uHYEcR.cjs +1 -0
- package/dist/useResponsive-B3TrDDIG.cjs +1 -0
- package/dist/useResponsive-NZB-WLRF.js +187 -0
- package/dist/vue-data-ui-Bc5U1cOP.cjs +9 -0
- package/dist/vue-data-ui-DxeO0iaC.js +254 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +61 -59
- package/dist/vue-ui-3d-bar-32wM0tiX.js +1085 -0
- package/dist/vue-ui-3d-bar-CgB0fLQT.cjs +19 -0
- package/dist/vue-ui-accordion-CLlVxx3Q.js +77 -0
- package/dist/vue-ui-accordion-SXsobrUt.cjs +1 -0
- package/dist/vue-ui-age-pyramid-D_CY99xF.js +596 -0
- package/dist/vue-ui-age-pyramid-DqiwcOIr.cjs +1 -0
- package/dist/vue-ui-annotator-DvP-IxDm.js +2177 -0
- package/dist/vue-ui-annotator-mntqd3q_.cjs +371 -0
- package/dist/vue-ui-candlestick-C-5u3i-1.js +657 -0
- package/dist/vue-ui-candlestick-C_TvUQvH.cjs +2 -0
- package/dist/vue-ui-carousel-table-BCePqkuz.cjs +1 -0
- package/dist/vue-ui-carousel-table-CAqhsLVx.js +304 -0
- package/dist/vue-ui-chestnut-DhWlw2MD.cjs +6 -0
- package/dist/vue-ui-chestnut-DylSfYMB.js +1051 -0
- package/dist/vue-ui-cursor-B04HJQVl.cjs +1 -0
- package/dist/vue-ui-cursor-DTYEMgbU.js +229 -0
- package/dist/vue-ui-dashboard-Bd0-cmSZ.js +232 -0
- package/dist/vue-ui-dashboard-DFIYwP1s.cjs +1 -0
- package/dist/vue-ui-digits-CW5qNMIk.js +153 -0
- package/dist/vue-ui-digits-Ced5mBJZ.cjs +1 -0
- package/dist/vue-ui-donut-DIhhgvWp.cjs +1 -0
- package/dist/vue-ui-donut-EeVmrVJs.js +743 -0
- package/dist/vue-ui-donut-evolution-BN08Y2hy.js +799 -0
- package/dist/vue-ui-donut-evolution-Ct6KAzs-.cjs +1 -0
- package/dist/vue-ui-dumbbell-BMlxS1Nq.js +624 -0
- package/dist/vue-ui-dumbbell-pextarqH.cjs +9 -0
- package/dist/vue-ui-flow-BXVsbmyb.cjs +1 -0
- package/dist/vue-ui-flow-CHmkgfyb.js +454 -0
- package/dist/vue-ui-galaxy-D4xyd-J1.cjs +1 -0
- package/dist/vue-ui-galaxy-kiVOZOBz.js +485 -0
- package/dist/vue-ui-gauge-BcO-z97J.js +466 -0
- package/dist/vue-ui-gauge-DPFBsbFj.cjs +1 -0
- package/dist/vue-ui-heatmap-DBOKYaJz.cjs +1 -0
- package/dist/vue-ui-heatmap-DD-Bzddj.js +598 -0
- package/dist/vue-ui-kpi-BEgf5yDv.cjs +1 -0
- package/dist/vue-ui-kpi-BS0o7zb9.js +54 -0
- package/dist/vue-ui-mini-loader-Bm5EJxtG.cjs +1 -0
- package/dist/vue-ui-mini-loader-DJEvG6ju.js +131 -0
- package/dist/vue-ui-molecule-DdwnFEBJ.js +750 -0
- package/dist/vue-ui-molecule-DzUqcaxd.cjs +1 -0
- package/dist/vue-ui-mood-radar-B9Gczs_Z.js +548 -0
- package/dist/vue-ui-mood-radar-DbB7m4Ku.cjs +1 -0
- package/dist/vue-ui-nested-donuts-BSINf8hd.cjs +16 -0
- package/dist/vue-ui-nested-donuts-CVQ1CaXo.js +771 -0
- package/dist/vue-ui-onion-D3-6Tv4u.cjs +1 -0
- package/dist/vue-ui-onion-Ut75t7hB.js +554 -0
- package/dist/vue-ui-parallel-coordinate-plot-Bjo09ZTX.js +651 -0
- package/dist/vue-ui-parallel-coordinate-plot-CJGkoIgN.cjs +8 -0
- package/dist/vue-ui-quadrant-CzCvejGn.cjs +1 -0
- package/dist/vue-ui-quadrant-Du9PKvlO.js +1178 -0
- package/dist/vue-ui-quick-chart-BsxsPbjz.cjs +13 -0
- package/dist/vue-ui-quick-chart-u0cPmD3q.js +1310 -0
- package/dist/vue-ui-radar-CBrpuE5r.js +614 -0
- package/dist/vue-ui-radar-DIpCrj1h.cjs +1 -0
- package/dist/vue-ui-rating-CaeGGlCw.js +271 -0
- package/dist/vue-ui-rating-D8fJC8Yt.cjs +1 -0
- package/dist/vue-ui-relation-circle-5DNf880s.js +304 -0
- package/dist/vue-ui-relation-circle-Ky3nPk6S.cjs +1 -0
- package/dist/vue-ui-rings-CffZ4T2S.cjs +1 -0
- package/dist/vue-ui-rings-IE3IdNRF.js +510 -0
- package/dist/vue-ui-scatter-C4GCZm0V.js +874 -0
- package/dist/vue-ui-scatter-TsX5dW9l.cjs +1 -0
- package/dist/vue-ui-screenshot-Bl3oooKI.js +160 -0
- package/dist/vue-ui-screenshot-Bzpg6yof.cjs +3 -0
- package/dist/vue-ui-skeleton-BisWX1sO.js +2064 -0
- package/dist/vue-ui-skeleton-JmGp11-u.cjs +41 -0
- package/dist/vue-ui-smiley-BhSrt9f-.cjs +2 -0
- package/dist/vue-ui-smiley-Sth2pqG1.js +763 -0
- package/dist/vue-ui-spark-trend-C8NSz4l8.cjs +1 -0
- package/dist/vue-ui-spark-trend-DAqO0TW2.js +246 -0
- package/dist/vue-ui-sparkbar-B0zX7NU7.js +242 -0
- package/dist/vue-ui-sparkbar-hL1Q6ObK.cjs +1 -0
- package/dist/vue-ui-sparkgauge-CWR8zJnU.js +157 -0
- package/dist/vue-ui-sparkgauge-tbVqaLCK.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-Dv-lml4g.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-DxqCtDpw.js +244 -0
- package/dist/vue-ui-sparkline-B6pvaBY_.cjs +1 -0
- package/dist/vue-ui-sparkline-BpL1jn7F.js +333 -0
- package/dist/vue-ui-sparkstackbar-BzbuBNIV.js +244 -0
- package/dist/vue-ui-sparkstackbar-CQ2TEi4p.cjs +1 -0
- package/dist/vue-ui-strip-plot-DCC6F4VM.cjs +1 -0
- package/dist/vue-ui-strip-plot-DCcbD6UE.js +618 -0
- package/dist/vue-ui-table-CFqIWfxl.js +1430 -0
- package/dist/vue-ui-table-CseaFWgX.cjs +14 -0
- package/dist/vue-ui-table-heatmap-Bwut-V1D.cjs +1 -0
- package/dist/vue-ui-table-heatmap-Bz8KYDxr.js +237 -0
- package/dist/vue-ui-table-sparkline-CJBU3y8-.cjs +1 -0
- package/dist/vue-ui-table-sparkline-z29ND2lq.js +420 -0
- package/dist/vue-ui-thermometer-BNAITzJa.js +385 -0
- package/dist/vue-ui-thermometer-DM2IKhqN.cjs +1 -0
- package/dist/vue-ui-timer-DLfXuW8T.cjs +64 -0
- package/dist/vue-ui-timer-DV6lQVHU.js +453 -0
- package/dist/vue-ui-tiremarks-B1bd1jPf.cjs +1 -0
- package/dist/vue-ui-tiremarks-WyQPg7yo.js +249 -0
- package/dist/vue-ui-treemap-BZGmoDHb.cjs +1 -0
- package/dist/vue-ui-treemap-DKmBhzV-.js +722 -0
- package/dist/vue-ui-vertical-bar-Bi-0rRN3.cjs +4 -0
- package/dist/vue-ui-vertical-bar-C-ySfrhJ.js +737 -0
- package/dist/vue-ui-waffle-CGRWu-da.js +638 -0
- package/dist/vue-ui-waffle-VLYkR-YZ.cjs +1 -0
- package/dist/vue-ui-wheel-D2q5vy5V.cjs +1 -0
- package/dist/vue-ui-wheel-Pj9OPk9f.js +227 -0
- package/dist/vue-ui-word-cloud-8Vr-jo1p.js +346 -0
- package/dist/vue-ui-word-cloud-Ba4BjatU.cjs +1 -0
- package/dist/vue-ui-xy-C4QW5Lfl.cjs +3 -0
- package/dist/vue-ui-xy-canvas-Be-Da_0x.cjs +9 -0
- package/dist/vue-ui-xy-canvas-DnLWrf0e.js +1006 -0
- package/dist/vue-ui-xy-qToggEfh.js +2064 -0
- package/package.json +1 -1
- package/dist/index-BcMihqI4.cjs +0 -843
- package/dist/index-C7FeCQ7K.js +0 -57303
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BkomIE9L.cjs"),te=require("./useResponsive-B3TrDDIG.cjs"),ye=require("./Title-Cj_xubjI.cjs"),le=require("./usePrinter-r6uHYEcR.cjs"),me=require("./DataTable-ssrNbONo.cjs"),be=require("./Tooltip-CdJ5hegk.cjs"),ge=require("./Legend-Dl5IYoxK.cjs"),ke=require("./vue-ui-skeleton-JmGp11-u.cjs"),Ce=require("./vue-ui-accordion-SXsobrUt.cjs"),ae=require("./useNestedProp-BMxXyPbW.cjs"),xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=w=>(e.pushScopeId("data-v-fbefb973"),w=w(),e.popScopeId(),w),we=["id"],Le=["xmlns","viewBox"],Be=["id","fr"],_e=A(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Ne=["offset","stop-opacity"],$e=A(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Se=["id"],Ee=["id"],Fe=A(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Ve=["id"],Te=["flood-color"],ze=["cx","cy","r","fill","filter"],De=["d","fill","stroke","stroke-width","filter"],Oe={key:0},Pe=["d","fill"],Ie={key:1},Ae=["x","y","font-size","font-weight","fill"],Me={key:2},Re=["filter"],Ue=["text-anchor","x","y","fill","font-size","font-weight"],qe=["text-anchor","x","y","fill","font-size","font-weight"],Xe=["text-anchor","x","y","fill","font-size","font-weight"],Ge=["d","fill","onMouseenter","onClick"],Ye={key:0,class:"vue-ui-nested-donuts-legend-title"},We=["onClick"],He=["innerHTML"],je={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(w,{expose:oe,emit:M}){const C=w,{vue_ui_nested_donuts:ne}=r.useConfig(),N=e.computed(()=>!!C.dataset&&C.dataset.length),f=e.ref(r.createUid()),V=e.ref(!1),T=e.ref(""),re=e.ref(null),R=e.ref(0),L=e.ref(null),U=e.ref(null),z=e.ref(null),B=e.ref(!1);function se(l){B.value=l,R.value+=1}const t=e.computed(()=>{const l=ae.useNestedProp({userConfig:C.config,defaultConfig:ne});return l.theme?{...ae.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||C.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),$=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(C.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=te.throttle(()=>{const{width:s,height:a}=te.useResponsive({chart:L.value,title:t.value.style.chart.title.text?U.value:null,legend:t.value.style.chart.legend.show?z.value:null});c.value.width=s,c.value.height=a});$.value=new ResizeObserver(l),$.value.observe(L.value.parentNode)}}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:ue,isImaging:ie,generatePdf:q,generateImage:X}=le.usePrinter({elementId:`nested_donuts_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),ce=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),p=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),c=e.ref({height:512,width:512});function de({datapoint:l,index:s}){M("selectDatapoint",{datapoint:l,index:s})}const v=e.ref([]),m=e.computed(()=>(C.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((a,o)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:o,key:"serie"}),[null,void 0].includes(a.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:o,key:"serie"})})}),C.dataset.map((l,s)=>({...l,total:l.series.filter(a=>!v.value.includes(a.id)).map(a=>(a.values||[]).reduce((o,n)=>o+n,0)).reduce((a,o)=>a+o,0),datasetIndex:s,id:`${f.value}_${s}`,series:l.series.map((a,o)=>({name:a.name,arcOf:l.name,arcOfId:`${f.value}_${s}`,id:`${f.value}_${s}_${o}`,seriesIndex:o,datasetIndex:s,color:r.convertColorToHex(a.color)||ce.value[o]||r.palette[o]||r.palette[o%r.palette.length],value:(a.values||[]).reduce((n,u)=>n+u,0),absoluteValues:a.values||[]}))}))));e.ref(t.value.style.chart.layout.donut.strokeWidth);const b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),G=e.computed(()=>[...m.value].map((l,s)=>{const a=l.series.filter(o=>!v.value.includes(o.id)).map(o=>o.value).reduce((o,n)=>o+n,0);return{...l,total:a,series:l.series.filter(o=>!v.value.includes(o.id)).map(o=>({...o,proportion:o.value/a}))}}));function ve(l,s,a){let o=0;for(let n=0;n<l.length;n+=1)a.includes(l[n])&&(o+=1);return o<s}const d=e.ref(G.value);e.watch(()=>G.value,l=>d.value=l);const Y=e.ref(null),W=e.ref(null);function D(l){M("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),a=d.value.flatMap(i=>i.series).find(i=>i.id===l.id);let n=a?a.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),h=ve(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){n>s.value?(cancelAnimationFrame(Y.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(n+=s.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:n}:g)})),Y.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(h){let i=function(){n<.1?(cancelAnimationFrame(W.value),v.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(x=>x.id===l.id?{...x,value:0}:x)}))):(n/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(x=>x.id===l.id?{...x,value:n}:x)})),W.value=requestAnimationFrame(i))};i()}}const _=e.computed(()=>d.value.map((l,s)=>{const a=s*b.value/m.value.length;return{...l,radius:b.value-a,donut:r.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-a,b.value-a,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)}})),H=e.computed(()=>[...m.value].map((l,s)=>{const a=s*b.value/m.value.length;return{sizeRatio:a,donut:r.makeDonut({series:[{value:1}]},c.value.width/2,c.value.height/2,b.value-a,b.value-a,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),j=e.ref(null),S=e.ref(null),E=e.ref(null),O=e.ref(null);function fe({datapoint:l,_relativeIndex:s,seriesIndex:a}){j.value=l.arcOfId,S.value=l.id,E.value=a,O.value={datapoint:l,seriesIndex:a,series:d.value,config:t.value};const o=t.value.style.chart.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:a,datapoint:l,series:d.value,config:t.value})))T.value=o({seriesIndex:a,datapoint:l,series:d.value,config:t.value});else{let n="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=d.value.map(h=>h.series.find(i=>i.seriesIndex===a));u.forEach((h,i)=>{if(!h)return"";n+=`
|
|
2
|
+
<div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
|
|
3
|
+
<div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
|
|
4
|
+
<svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
|
|
5
|
+
<circle cx="10" cy="10" r="10" fill="${h.color}"/>
|
|
6
|
+
</svg>
|
|
7
|
+
<span>
|
|
8
|
+
${h.arcOf??""} - ${h.name}
|
|
9
|
+
</span>
|
|
10
|
+
</div>
|
|
11
|
+
<span>
|
|
12
|
+
${t.value.style.chart.tooltip.showValue?`<b>${r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</b>`:""}
|
|
13
|
+
${t.value.style.chart.tooltip.showPercentage?`(${r.dataLabel({v:h.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})`:""}
|
|
14
|
+
</span>
|
|
15
|
+
</div>
|
|
16
|
+
`})}else n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.arcOf??""} - ${l.name}</div>`,n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(n+=`<b>${r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?n+=`<span>(${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:n+=`<b>${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`);T.value=`<div style="font-size:${t.value.style.chart.tooltip.fontSize}px">${n}</div>`}V.value=!0}function P(l){return l.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function J(l,s){if(!t.value.useBlurOnHover)return"";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0)return[null,void 0].includes(E.value)||E.value===s?"":`url(#blur_${f.value})`;if(!t.value.style.chart.tooltip.showAllItemsAtIndex||v.value.length)return[null,void 0].includes(S.value)||S.value===l.id?"":`url(#blur_${f.value})`}const I=e.computed(()=>m.value.map((l,s)=>l.series.map((a,o)=>({name:a.name,color:a.color,value:a.value,shape:"circle",arcOf:a.arcOf,id:a.id,seriesIndex:o,datasetIndex:s,total:l.series.filter(n=>!v.value.includes(n.id)).map(n=>n.value).reduce((n,u)=>n+u,0)})).map(a=>({...a,opacity:v.value.includes(a.id)?.5:1,segregate:()=>D(a),isSegregated:v.value.includes(a.id)})))),he=e.computed(()=>({cy:"nested-donuts-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),k=e.computed(()=>{const l=d.value.flatMap(a=>a.series.map(o=>({name:`${a.name} - ${o.name}`,color:o.color,total:a.total}))),s=d.value.flatMap(a=>a.series.map(o=>o.value));return{head:l,body:s}});function K(){e.nextTick(()=>{const l=k.value.head.map((o,n)=>[[o.name],[k.value.body[n]],[isNaN(k.value.body[n]/o.total)?"-":k.value.body[n]/o.total*100]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=r.createCsvContent(s);r.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-nested-donuts"})})}const F=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],s=k.value.head.map((n,u)=>{const h=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value.body[u],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},h,isNaN(k.value.body[u]/n.total)?"-":(k.value.body[u]/n.total*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:s,config:a}});function pe(){return m.value}function Q(){p.value.showTable=!p.value.showTable}function Z(){p.value.dataLabels.show=!p.value.dataLabels.show}function ee(){p.value.showTooltip=!p.value.showTooltip}return oe({getData:pe,generatePdf:q,generateCsv:K,generateImage:X,toggleTable:Q,toggleLabels:Z,toggleTooltip:ee}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"nestedDonutsChart",ref:L,class:e.normalizeClass(`vue-ui-nested-donuts ${B.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${!t.value.style.chart.title.text&&t.value.userOptions.show?"padding-top:36px":""};background:${t.value.style.chart.backgroundColor}`),id:`nested_donuts_${f.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:U},[e.createVNode(ye._sfc_main,{config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&N.value?(e.openBlock(),e.createBlock(le.UserOptions,{ref:"details",key:`user_option_${R.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ue),isImaging:e.unref(ie),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:L.value,onToggleFullscreen:se,onGeneratePdf:e.unref(q),onGenerateCsv:K,onGenerateImage:e.unref(X),onToggleTable:Q,onToggleLabels:Z,onToggleTooltip:ee},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),N.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`0 0 ${c.value.width<=0?.001:c.value.width} ${c.value.height<0?.001:c.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value,(a,o)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`radial_${f.value}_${o}`,cx:"50%",cy:"50%",r:"50%",fr:30-1*(o+1)+"%"},[_e,e.createElementVNode("stop",{offset:70-20*o+"%","stop-color":"#FFFFFF","stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,Ne),$e],8,Be))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${f.value}`},null,8,Ee),Fe],8,Se),e.createElementVNode("filter",{id:`shadow_${f.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Te)],8,Ve)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,a=>(e.openBlock(),e.createElementBlock("circle",{cx:c.value.width/2,cy:c.value.height/2,r:a.radius<0?1e-5:a.radius,fill:t.value.style.chart.backgroundColor,filter:t.value.style.chart.layout.donut.useShadow?`url(#shadow_${f.value})`:""},null,8,ze))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.donut,(n,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{class:"vue-ui-donut-arc-path",d:n.arcSlice,fill:`${n.color}CC`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:J(n,u)},null,8,De)]))),256))]))),256)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:a.donut.arcSlice,fill:`url(#radial_${f.value}_${o})`,stroke:"transparent","stroke-width":"0"},null,8,Pe)]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.showDonutName?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.donut,(n,u)=>(e.openBlock(),e.createElementBlock("g",null,[u===0&&c.value.width&&c.value.height?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),x:c.value.width/2,y:n.startY-t.value.style.chart.layout.labels.dataLabels.fontSize+t.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,"text-anchor":"middle","font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldDonutName?"bold":"normal",fill:t.value.style.chart.layout.labels.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation?e.unref(r.abbreviate)({source:a.name,length:t.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize}):a.name),11,Ae)):e.createCommentVNode("",!0)]))),256))]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.donut,(n,u)=>(e.openBlock(),e.createElementBlock("g",{filter:J(n,u)},[P(n)&&p.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(n,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(n,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(n,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?n.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldPercentage?"bold":"normal"},e.toDisplayString(e.unref(r.dataLabel)({v:n.proportion*100,s:"%",r:t.value.style.chart.layout.labels.dataLabels.roundingPercentage})),11,Ue)):e.createCommentVNode("",!0),P(n)&&p.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:1,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(n,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(n,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(n,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY)+t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?n.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"}," ("+e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:n.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}))+") ",11,qe)):e.createCommentVNode("",!0),P(n)&&p.value.dataLabels.show&&!t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:2,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(n,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(n,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(n,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?n.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"},e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:n.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue})),11,Xe)):e.createCommentVNode("",!0)],8,Re))),256))]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.donut,(n,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{"data-cy-donut-trap":"",d:n.arcSlice,fill:re.value===o?"rgba(0,0,0,0.1)":"transparent",onMouseenter:h=>fe({datapoint:n,relativeIndex:o,seriesIndex:n.seriesIndex}),onClick:h=>de({datapoint:n,index:u}),onMouseleave:s[0]||(s[0]=h=>{V.value=!1,j.value=null,S.value=null,E.value=null})},null,40,Ge)]))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:c.value},void 0,!0)],14,Le)):e.createCommentVNode("",!0),N.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:3,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(be._sfc_main,{show:p.value.showTooltip&&V.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,parent:L.value,content:T.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("div",{key:4,ref_key:"chartLegend",ref:z,class:e.normalizeClass({"vue-ui-nested-donuts-legend":I.value.length>1})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,a=>(e.openBlock(),e.createBlock(ge.Legend,{legendSet:a,config:he.value,onClickMarker:s[1]||(s[1]=({legend:o})=>D(o))},{legendTitle:e.withCtx(({titleSet:o})=>[o[0].arcOf?(e.openBlock(),e.createElementBlock("div",Ye,e.toDisplayString(o[0].arcOf),1)):e.createCommentVNode("",!0)]),item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:u=>D(o),style:e.normalizeStyle(`opacity:${v.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}))+" ",1),v.value.includes(o.id)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" ( - % ) ")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" ("+e.toDisplayString(isNaN(o.value/o.total)?"-":e.unref(r.dataLabel)({v:o.value/o.total*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],64))],12,We)]),_:2},1032,["legendSet","config"]))),256))],2)):e.createCommentVNode("",!0),t.value.style.chart.legend.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"chartLegend",ref:z},[e.renderSlot(l.$slots,"legend",{legend:I.value},void 0,!0)],512)),N.value?(e.openBlock(),e.createBlock(Ce.default,{key:6,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(me.DataTable,{colNames:F.value.colNames,head:F.value.head,body:F.value.body,config:F.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[2]||(s[2]=a=>p.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,He)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,we))}},Je=xe._export_sfc(je,[["__scopeId","data-v-fbefb973"]]);exports.default=Je;
|