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.
Files changed (154) hide show
  1. package/README.md +19 -15
  2. package/dist/Arrow-BSOdhAJO.cjs +1 -0
  3. package/dist/Arrow-BjDVSrfA.js +101 -0
  4. package/dist/BaseIcon-BoKtpbrI.cjs +1 -0
  5. package/dist/BaseIcon-vmmfWlyR.js +174 -0
  6. package/dist/DataTable-CaB7GIwQ.js +127 -0
  7. package/dist/DataTable-ssrNbONo.cjs +1 -0
  8. package/dist/Legend-DHpoRTAE.js +62 -0
  9. package/dist/Legend-Dl5IYoxK.cjs +1 -0
  10. package/dist/Shape-CQT4S7N-.js +107 -0
  11. package/dist/Shape-CaF4pvOn.cjs +1 -0
  12. package/dist/Slicer-Bdb1BlrC.js +156 -0
  13. package/dist/Slicer-QC8nTm24.cjs +1 -0
  14. package/dist/Title-BNPZwnkp.js +46 -0
  15. package/dist/Title-Cj_xubjI.cjs +1 -0
  16. package/dist/Tooltip-CdJ5hegk.cjs +1 -0
  17. package/dist/Tooltip-ZnJAz6dl.js +94 -0
  18. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  19. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  20. package/dist/documentation/installation.md +14 -13
  21. package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
  22. package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
  23. package/dist/index-BMCvLyab.js +10369 -0
  24. package/dist/index-BkomIE9L.cjs +4 -0
  25. package/dist/{index.es-ypwniJN8.js → index.es-YufTdp0y.js} +1 -1
  26. package/dist/{index.es-Dnua3tHc.cjs → index.es-uyeSCnWE.cjs} +1 -1
  27. package/dist/jspdf.es.min-C660YX78.js +8038 -0
  28. package/dist/jspdf.es.min-DLYY9DTT.cjs +243 -0
  29. package/dist/pdf-97UbtKC2.js +44 -0
  30. package/dist/pdf-Cz3729tZ.cjs +1 -0
  31. package/dist/style.css +1 -1
  32. package/dist/types/vue-data-ui.d.cts +105 -5
  33. package/dist/types/vue-data-ui.d.ts +105 -5
  34. package/dist/useNestedProp-BMxXyPbW.cjs +1 -0
  35. package/dist/useNestedProp-CkP8xhG_.js +13 -0
  36. package/dist/usePrinter-BuuBz5JR.js +513 -0
  37. package/dist/usePrinter-r6uHYEcR.cjs +1 -0
  38. package/dist/useResponsive-B3TrDDIG.cjs +1 -0
  39. package/dist/useResponsive-NZB-WLRF.js +187 -0
  40. package/dist/vue-data-ui-Bc5U1cOP.cjs +9 -0
  41. package/dist/vue-data-ui-DxeO0iaC.js +254 -0
  42. package/dist/vue-data-ui.cjs +1 -1
  43. package/dist/vue-data-ui.js +61 -59
  44. package/dist/vue-ui-3d-bar-32wM0tiX.js +1085 -0
  45. package/dist/vue-ui-3d-bar-CgB0fLQT.cjs +19 -0
  46. package/dist/vue-ui-accordion-CLlVxx3Q.js +77 -0
  47. package/dist/vue-ui-accordion-SXsobrUt.cjs +1 -0
  48. package/dist/vue-ui-age-pyramid-D_CY99xF.js +596 -0
  49. package/dist/vue-ui-age-pyramid-DqiwcOIr.cjs +1 -0
  50. package/dist/vue-ui-annotator-DvP-IxDm.js +2177 -0
  51. package/dist/vue-ui-annotator-mntqd3q_.cjs +371 -0
  52. package/dist/vue-ui-candlestick-C-5u3i-1.js +657 -0
  53. package/dist/vue-ui-candlestick-C_TvUQvH.cjs +2 -0
  54. package/dist/vue-ui-carousel-table-BCePqkuz.cjs +1 -0
  55. package/dist/vue-ui-carousel-table-CAqhsLVx.js +304 -0
  56. package/dist/vue-ui-chestnut-DhWlw2MD.cjs +6 -0
  57. package/dist/vue-ui-chestnut-DylSfYMB.js +1051 -0
  58. package/dist/vue-ui-cursor-B04HJQVl.cjs +1 -0
  59. package/dist/vue-ui-cursor-DTYEMgbU.js +229 -0
  60. package/dist/vue-ui-dashboard-Bd0-cmSZ.js +232 -0
  61. package/dist/vue-ui-dashboard-DFIYwP1s.cjs +1 -0
  62. package/dist/vue-ui-digits-CW5qNMIk.js +153 -0
  63. package/dist/vue-ui-digits-Ced5mBJZ.cjs +1 -0
  64. package/dist/vue-ui-donut-DIhhgvWp.cjs +1 -0
  65. package/dist/vue-ui-donut-EeVmrVJs.js +743 -0
  66. package/dist/vue-ui-donut-evolution-BN08Y2hy.js +799 -0
  67. package/dist/vue-ui-donut-evolution-Ct6KAzs-.cjs +1 -0
  68. package/dist/vue-ui-dumbbell-BMlxS1Nq.js +624 -0
  69. package/dist/vue-ui-dumbbell-pextarqH.cjs +9 -0
  70. package/dist/vue-ui-flow-BXVsbmyb.cjs +1 -0
  71. package/dist/vue-ui-flow-CHmkgfyb.js +454 -0
  72. package/dist/vue-ui-galaxy-D4xyd-J1.cjs +1 -0
  73. package/dist/vue-ui-galaxy-kiVOZOBz.js +485 -0
  74. package/dist/vue-ui-gauge-BcO-z97J.js +466 -0
  75. package/dist/vue-ui-gauge-DPFBsbFj.cjs +1 -0
  76. package/dist/vue-ui-heatmap-DBOKYaJz.cjs +1 -0
  77. package/dist/vue-ui-heatmap-DD-Bzddj.js +598 -0
  78. package/dist/vue-ui-kpi-BEgf5yDv.cjs +1 -0
  79. package/dist/vue-ui-kpi-BS0o7zb9.js +54 -0
  80. package/dist/vue-ui-mini-loader-Bm5EJxtG.cjs +1 -0
  81. package/dist/vue-ui-mini-loader-DJEvG6ju.js +131 -0
  82. package/dist/vue-ui-molecule-DdwnFEBJ.js +750 -0
  83. package/dist/vue-ui-molecule-DzUqcaxd.cjs +1 -0
  84. package/dist/vue-ui-mood-radar-B9Gczs_Z.js +548 -0
  85. package/dist/vue-ui-mood-radar-DbB7m4Ku.cjs +1 -0
  86. package/dist/vue-ui-nested-donuts-BSINf8hd.cjs +16 -0
  87. package/dist/vue-ui-nested-donuts-CVQ1CaXo.js +771 -0
  88. package/dist/vue-ui-onion-D3-6Tv4u.cjs +1 -0
  89. package/dist/vue-ui-onion-Ut75t7hB.js +554 -0
  90. package/dist/vue-ui-parallel-coordinate-plot-Bjo09ZTX.js +651 -0
  91. package/dist/vue-ui-parallel-coordinate-plot-CJGkoIgN.cjs +8 -0
  92. package/dist/vue-ui-quadrant-CzCvejGn.cjs +1 -0
  93. package/dist/vue-ui-quadrant-Du9PKvlO.js +1178 -0
  94. package/dist/vue-ui-quick-chart-BsxsPbjz.cjs +13 -0
  95. package/dist/vue-ui-quick-chart-u0cPmD3q.js +1310 -0
  96. package/dist/vue-ui-radar-CBrpuE5r.js +614 -0
  97. package/dist/vue-ui-radar-DIpCrj1h.cjs +1 -0
  98. package/dist/vue-ui-rating-CaeGGlCw.js +271 -0
  99. package/dist/vue-ui-rating-D8fJC8Yt.cjs +1 -0
  100. package/dist/vue-ui-relation-circle-5DNf880s.js +304 -0
  101. package/dist/vue-ui-relation-circle-Ky3nPk6S.cjs +1 -0
  102. package/dist/vue-ui-rings-CffZ4T2S.cjs +1 -0
  103. package/dist/vue-ui-rings-IE3IdNRF.js +510 -0
  104. package/dist/vue-ui-scatter-C4GCZm0V.js +874 -0
  105. package/dist/vue-ui-scatter-TsX5dW9l.cjs +1 -0
  106. package/dist/vue-ui-screenshot-Bl3oooKI.js +160 -0
  107. package/dist/vue-ui-screenshot-Bzpg6yof.cjs +3 -0
  108. package/dist/vue-ui-skeleton-BisWX1sO.js +2064 -0
  109. package/dist/vue-ui-skeleton-JmGp11-u.cjs +41 -0
  110. package/dist/vue-ui-smiley-BhSrt9f-.cjs +2 -0
  111. package/dist/vue-ui-smiley-Sth2pqG1.js +763 -0
  112. package/dist/vue-ui-spark-trend-C8NSz4l8.cjs +1 -0
  113. package/dist/vue-ui-spark-trend-DAqO0TW2.js +246 -0
  114. package/dist/vue-ui-sparkbar-B0zX7NU7.js +242 -0
  115. package/dist/vue-ui-sparkbar-hL1Q6ObK.cjs +1 -0
  116. package/dist/vue-ui-sparkgauge-CWR8zJnU.js +157 -0
  117. package/dist/vue-ui-sparkgauge-tbVqaLCK.cjs +1 -0
  118. package/dist/vue-ui-sparkhistogram-Dv-lml4g.cjs +1 -0
  119. package/dist/vue-ui-sparkhistogram-DxqCtDpw.js +244 -0
  120. package/dist/vue-ui-sparkline-B6pvaBY_.cjs +1 -0
  121. package/dist/vue-ui-sparkline-BpL1jn7F.js +333 -0
  122. package/dist/vue-ui-sparkstackbar-BzbuBNIV.js +244 -0
  123. package/dist/vue-ui-sparkstackbar-CQ2TEi4p.cjs +1 -0
  124. package/dist/vue-ui-strip-plot-DCC6F4VM.cjs +1 -0
  125. package/dist/vue-ui-strip-plot-DCcbD6UE.js +618 -0
  126. package/dist/vue-ui-table-CFqIWfxl.js +1430 -0
  127. package/dist/vue-ui-table-CseaFWgX.cjs +14 -0
  128. package/dist/vue-ui-table-heatmap-Bwut-V1D.cjs +1 -0
  129. package/dist/vue-ui-table-heatmap-Bz8KYDxr.js +237 -0
  130. package/dist/vue-ui-table-sparkline-CJBU3y8-.cjs +1 -0
  131. package/dist/vue-ui-table-sparkline-z29ND2lq.js +420 -0
  132. package/dist/vue-ui-thermometer-BNAITzJa.js +385 -0
  133. package/dist/vue-ui-thermometer-DM2IKhqN.cjs +1 -0
  134. package/dist/vue-ui-timer-DLfXuW8T.cjs +64 -0
  135. package/dist/vue-ui-timer-DV6lQVHU.js +453 -0
  136. package/dist/vue-ui-tiremarks-B1bd1jPf.cjs +1 -0
  137. package/dist/vue-ui-tiremarks-WyQPg7yo.js +249 -0
  138. package/dist/vue-ui-treemap-BZGmoDHb.cjs +1 -0
  139. package/dist/vue-ui-treemap-DKmBhzV-.js +722 -0
  140. package/dist/vue-ui-vertical-bar-Bi-0rRN3.cjs +4 -0
  141. package/dist/vue-ui-vertical-bar-C-ySfrhJ.js +737 -0
  142. package/dist/vue-ui-waffle-CGRWu-da.js +638 -0
  143. package/dist/vue-ui-waffle-VLYkR-YZ.cjs +1 -0
  144. package/dist/vue-ui-wheel-D2q5vy5V.cjs +1 -0
  145. package/dist/vue-ui-wheel-Pj9OPk9f.js +227 -0
  146. package/dist/vue-ui-word-cloud-8Vr-jo1p.js +346 -0
  147. package/dist/vue-ui-word-cloud-Ba4BjatU.cjs +1 -0
  148. package/dist/vue-ui-xy-C4QW5Lfl.cjs +3 -0
  149. package/dist/vue-ui-xy-canvas-Be-Da_0x.cjs +9 -0
  150. package/dist/vue-ui-xy-canvas-DnLWrf0e.js +1006 -0
  151. package/dist/vue-ui-xy-qToggEfh.js +2064 -0
  152. package/package.json +1 -1
  153. package/dist/index-BcMihqI4.cjs +0 -843
  154. package/dist/index-C7FeCQ7K.js +0 -57303
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BkomIE9L.cjs"),D=require("./useResponsive-B3TrDDIG.cjs"),re=require("./Title-Cj_xubjI.cjs"),U=require("./usePrinter-r6uHYEcR.cjs"),ne=require("./Tooltip-CdJ5hegk.cjs"),ue=require("./DataTable-ssrNbONo.cjs"),se=require("./Legend-Dl5IYoxK.cjs"),ie=require("./vue-ui-skeleton-JmGp11-u.cjs"),ce=require("./vue-ui-accordion-SXsobrUt.cjs"),H=require("./useNestedProp-BMxXyPbW.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],pe=["xmlns","viewBox"],he=["id"],ge=["stop-color"],fe=["stop-color"],me=["stroke","cx","cy","r","fill"],ye=["stroke","stroke-width","cx","cy","r","fill"],be=["cx","cy","r","onMouseenter"],ke=["onClick"],Ce={key:0},we={key:1},xe=["innerHTML"],Te={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(W,{expose:G,emit:j}){const v=W,{vue_ui_rings:X}=n.useConfig(),y=e.ref(!1),x=e.computed(()=>!!v.dataset&&v.dataset.length),b=e.ref(n.createUid()),J=e.ref(null),T=e.ref(!1),_=e.ref(""),m=e.ref(null),V=e.ref(0),k=e.ref(null),F=e.ref(null),L=e.ref(null),t=e.computed(()=>{const l=H.useNestedProp({userConfig:v.config,defaultConfig:X});return l.theme?{...H.useNestedProp({userConfig:n.themes.vue_ui_rings[l.theme]||v.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}),$=e.ref(null);e.onMounted(()=>{if(n.objectIsEmpty(v.dataset)?n.error({componentName:"VueUiRings",type:"dataset"}):v.dataset.forEach((l,a)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{n.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:o,index:a})})}),t.value.responsive){const l=D.throttle(()=>{const{width:a,height:o}=D.useResponsive({chart:k.value,title:t.value.style.chart.title.text?F.value:null,legend:t.value.style.chart.legend.show?L.value:null});s.value.width=a,s.value.height=o});$.value=new ResizeObserver(l),$.value.observe(k.value.parentNode)}setTimeout(()=>{y.value=!0},600)}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:K,isImaging:Q,generatePdf:E,generateImage:z}=U.usePrinter({elementId:`rings_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),I=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),g=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),Y=e.computed(()=>Math.min(s.value.height,s.value.width)),i=e.ref([]);function B(l){i.value.includes(l)?i.value=i.value.filter(a=>a!==l):i.value.push(l),j("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const Z=e.computed(()=>Math.max(...N.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l)));function O(l){return l/Z.value}const N=e.computed(()=>v.dataset.map(({values:l,name:a,color:o=null},r)=>{const u=(l||[]).reduce((h,w)=>h+w,0);return{name:a,color:o||n.convertColorToHex(o)||I.value[r]||n.palette[r]||n.palette[r%n.palette.length],value:u,proportion:u/v.dataset.map(h=>(h.values||[]).reduce((w,ae)=>w+ae,0)).reduce((h,w)=>h+w,0),uid:n.createUid()}})),M=e.computed(()=>N.value.map(l=>({...l,shape:"circle",opacity:i.value.includes(l.uid)?.5:1,segregate:()=>B(l.uid),isSegregated:i.value.includes(l.uid)})).toSorted((l,a)=>a.value-l.value)),ee=e.computed(()=>({cy:"rings-div-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":""})),p=e.computed(()=>N.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>N.value.filter(l=>!i.value.includes(l.uid)).map(({name:l,value:a,color:o=null,uid:r},u)=>({uid:r,name:l,color:o||n.convertColorToHex(o)||I.value[u]||n.palette[u]||n.palette[u%n.palette.length],value:a,proportion:O(a),percentage:a/p.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*O(a)})).toSorted((l,a)=>a.value-l.value));function te(){return c.value.map(({name:l,color:a,value:o,absoluteValues:r,percentage:u})=>({name:l,color:a,value:o,absoluteValues:r,percentage:u}))}const d=e.computed(()=>Y.value-t.value.style.chart.layout.rings.strokeWidth*2),P=e.ref(null);function le(l,a){if(i.value.length===v.dataset.length)return;P.value={datapoint:a,seriesIndex:l,series:c.value,config:t.value},m.value=l;const o=c.value[l],r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:l,datapoint:a,series:c.value,config:t.value})))_.value=r({seriesIndex:l,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,u+=`<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="${o.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${n.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.tooltip.roundingValue})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${(o.value/p.value*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:u+=`<b>${(o.value/p.value*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),_.value=u}T.value=!0}const f=e.computed(()=>{const l=c.value.map(o=>({name:o.name,color:o.color})),a=c.value.map(o=>o.value);return{head:l,body:a}}),S=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=f.value.head.map((u,h)=>[{color:u.color,name:u.name},n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(f.value.body[h]/p.value)?"-":(f.value.body[h]/p.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={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},r=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:r}});function R(){e.nextTick(()=>{const l=f.value.head.map((r,u)=>[[r.name],[f.value.body[u]],[isNaN(f.value.body[u]/p.value)?"-":f.value.body[u]/p.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=n.createCsvContent(a);n.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-rings"})})}const C=e.ref(!1);function oe(l){C.value=l,V.value+=1}function q(){g.value.showTable=!g.value.showTable}function A(){g.value.showTooltip=!g.value.showTooltip}return G({getData:te,generatePdf:E,generateCsv:R,generateImage:z,toggleTable:q,toggleTooltip:A}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:k,class:e.normalizeClass(`vue-ui-rings ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${b.value}`,onMouseleave:a[3]||(a[3]=o=>{m.value=null,T.value=!1})},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:F,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(re._sfc_main,{config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(U.UserOptions,{ref_key:"details",ref:J,key:`user_options_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(K),isImaging:e.unref(Q),uid:b.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,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:g.value.showTooltip,isFullscreen:C.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,onToggleFullscreen:oe,onGeneratePdf:e.unref(E),onGenerateCsv:R,onGenerateImage:e.unref(z),onToggleTable:q,onToggleTooltip:A},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.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${b.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(o.color,.05)}${e.unref(n.opacity)[100-t.value.style.chart.layout.rings.gradient.intensity]}`},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,fe)],8,he))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":m.value!==null&&m.value!==r}),style:e.normalizeStyle(`animation-delay:${r*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(r+1),r:d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9,fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,me),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==r}),style:e.normalizeStyle(`animation-delay:${r*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(r+1),r:d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9,fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${b.value}_${r})`:o.color},null,14,ye),e.createElementVNode("circle",{"data-cy-trap":"",stroke:"none",cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(r+1),r:d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9,fill:"transparent",onMouseenter:u=>le(r,o),onMouseleave:a[0]||(a[0]=u=>{m.value=null,T.value=!1})},null,40,be)]))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,pe)):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:3,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:L},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(se.Legend,{key:0,legendSet:M.value,config:ee.value,onClickMarker:a[1]||(a[1]=({legend:o})=>B(o.uid))},{item:e.withCtx(({legend:o})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:r=>B(o.uid),style:e.normalizeStyle(`opacity:${i.value.includes(o.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(n.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),i.value.includes(o.uid)?(e.openBlock(),e.createElementBlock("span",we," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Ce," ("+e.toDisplayString(isNaN(o.value/p.value)?"-":(o.value/p.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,ke)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:M.value},void 0,!0)],512),e.createVNode(ne._sfc_main,{show:g.value.showTooltip&&T.value&&i.value.length<v.dataset.length,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:k.value,content:_.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),x.value?(e.openBlock(),e.createBlock(ce.default,{key:4,hideDetails:"",config:{open:g.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(ue.DataTable,{colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>g.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,xe)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ve))}},$e=de._export_sfc(Te,[["__scopeId","data-v-c7da9220"]]);exports.default=$e;
@@ -0,0 +1,510 @@
1
+ import { ref as n, computed as v, onMounted as xe, onBeforeUnmount as _e, openBlock as c, createElementBlock as m, normalizeClass as R, normalizeStyle as x, createVNode as U, createCommentVNode as S, createBlock as V, unref as C, createSlots as Ne, withCtx as h, renderSlot as f, normalizeProps as H, guardReactiveProps as X, Fragment as ae, renderList as se, createElementVNode as w, createTextVNode as ue, toDisplayString as B, nextTick as Fe } from "vue";
2
+ import { u as Pe, c as ne, t as Le, a as Se, p as T, o as Ie, e as re, g as Oe, b as Me, d as ie, f as D, X as ze, s as Ae, r as Re, v as Ve, w as Be, n as De, q as We } from "./index-BMCvLyab.js";
3
+ import { t as Ee, u as Ge } from "./useResponsive-NZB-WLRF.js";
4
+ import { _ as Ue } from "./Title-BNPZwnkp.js";
5
+ import { u as He, U as Xe } from "./usePrinter-BuuBz5JR.js";
6
+ import { _ as je } from "./Tooltip-ZnJAz6dl.js";
7
+ import { D as qe } from "./DataTable-CaB7GIwQ.js";
8
+ import { L as Je } from "./Legend-DHpoRTAE.js";
9
+ import Ke from "./vue-ui-skeleton-BisWX1sO.js";
10
+ import Qe from "./vue-ui-accordion-CLlVxx3Q.js";
11
+ import { u as ve } from "./useNestedProp-CkP8xhG_.js";
12
+ import { _ as Ye } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
+ const Ze = ["id"], et = ["xmlns", "viewBox"], tt = ["id"], lt = ["stop-color"], ot = ["stop-color"], at = ["stroke", "cx", "cy", "r", "fill"], st = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], ut = ["cx", "cy", "r", "onMouseenter"], nt = ["onClick"], rt = { key: 0 }, it = { key: 1 }, vt = ["innerHTML"], ct = {
14
+ __name: "vue-ui-rings",
15
+ props: {
16
+ config: {
17
+ type: Object,
18
+ default() {
19
+ return {};
20
+ }
21
+ },
22
+ dataset: {
23
+ type: Array,
24
+ default() {
25
+ return [];
26
+ }
27
+ }
28
+ },
29
+ emits: ["selectLegend"],
30
+ setup(ce, { expose: de, emit: he }) {
31
+ const p = ce, { vue_ui_rings: pe } = Pe(), _ = n(!1), I = v(() => !!p.dataset && p.dataset.length), N = n(ne()), ge = n(null), O = n(!1), W = n(""), $ = n(null), j = n(0), F = n(null), q = n(null), J = n(null), e = v(() => {
32
+ const t = ve({
33
+ userConfig: p.config,
34
+ defaultConfig: pe
35
+ });
36
+ return t.theme ? {
37
+ ...ve({
38
+ userConfig: Le.vue_ui_rings[t.theme] || p.config,
39
+ defaultConfig: t
40
+ }),
41
+ customPalette: Se[t.theme] || T
42
+ } : t;
43
+ }), M = n(null);
44
+ xe(() => {
45
+ if (Ie(p.dataset) ? re({
46
+ componentName: "VueUiRings",
47
+ type: "dataset"
48
+ }) : p.dataset.forEach((t, o) => {
49
+ Oe({
50
+ datasetObject: t,
51
+ requiredAttributes: ["name", "values"]
52
+ }).forEach((l) => {
53
+ re({
54
+ componentName: "VueUiRings",
55
+ type: "datasetSerieAttribute",
56
+ property: l,
57
+ index: o
58
+ });
59
+ });
60
+ }), e.value.responsive) {
61
+ const t = Ee(() => {
62
+ const { width: o, height: l } = Ge({
63
+ chart: F.value,
64
+ title: e.value.style.chart.title.text ? q.value : null,
65
+ legend: e.value.style.chart.legend.show ? J.value : null
66
+ });
67
+ u.value.width = o, u.value.height = l;
68
+ });
69
+ M.value = new ResizeObserver(t), M.value.observe(F.value.parentNode);
70
+ }
71
+ setTimeout(() => {
72
+ _.value = !0;
73
+ }, 600);
74
+ }), _e(() => {
75
+ M.value && M.value.disconnect();
76
+ });
77
+ const { isPrinting: fe, isImaging: ye, generatePdf: K, generateImage: Q } = He({
78
+ elementId: `rings_${N.value}`,
79
+ fileName: e.value.style.chart.title.text || "vue-ui-rings"
80
+ }), Y = v(() => Me(e.value.customPalette)), b = n({
81
+ showTable: e.value.table.show,
82
+ showTooltip: e.value.style.chart.tooltip.show
83
+ }), u = n({
84
+ height: 360,
85
+ width: 360
86
+ }), me = v(() => Math.min(u.value.height, u.value.width)), r = n([]);
87
+ function E(t) {
88
+ r.value.includes(t) ? r.value = r.value.filter((o) => o !== t) : r.value.push(t), he("selectLegend", i.value.map((o) => ({
89
+ name: o.name,
90
+ color: o.color,
91
+ value: o.value
92
+ })));
93
+ }
94
+ const be = v(() => Math.max(
95
+ ...z.value.filter((t) => !r.value.includes(t.uid)).map(({ value: t }) => t)
96
+ ));
97
+ function Z(t) {
98
+ return t / be.value;
99
+ }
100
+ const z = v(() => p.dataset.map(({ values: t, name: o, color: l = null }, a) => {
101
+ const s = (t || []).reduce((y, L) => y + L, 0);
102
+ return {
103
+ name: o,
104
+ color: l || ie(l) || Y.value[a] || T[a] || T[a % T.length],
105
+ value: s,
106
+ proportion: s / p.dataset.map((y) => (y.values || []).reduce((L, Te) => L + Te, 0)).reduce((y, L) => y + L, 0),
107
+ uid: ne()
108
+ };
109
+ })), ee = v(() => z.value.map((t) => ({
110
+ ...t,
111
+ shape: "circle",
112
+ opacity: r.value.includes(t.uid) ? 0.5 : 1,
113
+ segregate: () => E(t.uid),
114
+ isSegregated: r.value.includes(t.uid)
115
+ })).toSorted((t, o) => o.value - t.value)), ke = v(() => ({
116
+ cy: "rings-div-legend",
117
+ backgroundColor: e.value.style.chart.legend.backgroundColor,
118
+ color: e.value.style.chart.legend.color,
119
+ fontSize: e.value.style.chart.legend.fontSize,
120
+ paddingBottom: 12,
121
+ fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
122
+ })), g = v(() => z.value.filter((t) => !r.value.includes(t.uid)).map(({ value: t }) => t).reduce((t, o) => t + o, 0)), i = v(() => z.value.filter((t) => !r.value.includes(t.uid)).map(({ name: t, value: o, color: l = null, uid: a }, s) => ({
123
+ uid: a,
124
+ name: t,
125
+ color: l || ie(l) || Y.value[s] || T[s] || T[s % T.length],
126
+ value: o,
127
+ proportion: Z(o),
128
+ percentage: o / g.value * 100,
129
+ strokeWidth: e.value.style.chart.layout.rings.strokeWidth * Z(o)
130
+ })).toSorted((t, o) => o.value - t.value));
131
+ function Ce() {
132
+ return i.value.map(
133
+ ({ name: t, color: o, value: l, absoluteValues: a, percentage: s }) => ({
134
+ name: t,
135
+ color: o,
136
+ value: l,
137
+ absoluteValues: a,
138
+ percentage: s
139
+ })
140
+ );
141
+ }
142
+ const d = v(() => me.value - e.value.style.chart.layout.rings.strokeWidth * 2), G = n(null);
143
+ function we(t, o) {
144
+ if (r.value.length === p.dataset.length) return;
145
+ G.value = {
146
+ datapoint: o,
147
+ seriesIndex: t,
148
+ series: i.value,
149
+ config: e.value
150
+ }, $.value = t;
151
+ const l = i.value[t], a = e.value.style.chart.tooltip.customFormat;
152
+ if (Ve(a) && Be(() => a({
153
+ seriesIndex: t,
154
+ datapoint: o,
155
+ series: i.value,
156
+ config: e.value
157
+ })))
158
+ W.value = a({
159
+ seriesIndex: t,
160
+ datapoint: o,
161
+ series: i.value,
162
+ config: e.value
163
+ });
164
+ else {
165
+ let s = "";
166
+ s += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`, s += `<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>`, e.value.style.chart.tooltip.showValue && (s += `<b>${D({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: l.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.tooltip.roundingValue })}</b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? s += `<span>(${(l.value / g.value * 100).toFixed(
167
+ e.value.style.chart.tooltip.roundingPercentage
168
+ )}%)</span></div>` : s += `<b>${(l.value / g.value * 100).toFixed(
169
+ e.value.style.chart.tooltip.roundingPercentage
170
+ )}%</b></div>`), W.value = s;
171
+ }
172
+ O.value = !0;
173
+ }
174
+ const k = v(() => {
175
+ const t = i.value.map((l) => ({
176
+ name: l.name,
177
+ color: l.color
178
+ })), o = i.value.map((l) => l.value);
179
+ return { head: t, body: o };
180
+ }), A = v(() => {
181
+ const t = [
182
+ ' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',
183
+ D({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: g.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
184
+ "100%"
185
+ ], o = k.value.head.map((s, y) => [
186
+ {
187
+ color: s.color,
188
+ name: s.name
189
+ },
190
+ D({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: k.value.body[y], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
191
+ isNaN(k.value.body[y] / g.value) ? "-" : (k.value.body[y] / g.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
192
+ ]), l = {
193
+ th: {
194
+ backgroundColor: e.value.table.th.backgroundColor,
195
+ color: e.value.table.th.color,
196
+ outline: e.value.table.th.outline
197
+ },
198
+ td: {
199
+ backgroundColor: e.value.table.td.backgroundColor,
200
+ color: e.value.table.td.color,
201
+ outline: e.value.table.td.outline
202
+ },
203
+ breakpoint: e.value.table.responsiveBreakpoint
204
+ }, a = [
205
+ e.value.table.columnNames.series,
206
+ e.value.table.columnNames.value,
207
+ e.value.table.columnNames.percentage
208
+ ];
209
+ return {
210
+ head: t,
211
+ body: o,
212
+ config: l,
213
+ colNames: a
214
+ };
215
+ });
216
+ function te() {
217
+ Fe(() => {
218
+ const t = k.value.head.map((a, s) => [[
219
+ a.name
220
+ ], [k.value.body[s]], [isNaN(k.value.body[s] / g.value) ? "-" : k.value.body[s] / g.value * 100]]), o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(t), l = De(o);
221
+ We({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-rings" });
222
+ });
223
+ }
224
+ const P = n(!1);
225
+ function $e(t) {
226
+ P.value = t, j.value += 1;
227
+ }
228
+ function le() {
229
+ b.value.showTable = !b.value.showTable;
230
+ }
231
+ function oe() {
232
+ b.value.showTooltip = !b.value.showTooltip;
233
+ }
234
+ return de({
235
+ getData: Ce,
236
+ generatePdf: K,
237
+ generateCsv: te,
238
+ generateImage: Q,
239
+ toggleTable: le,
240
+ toggleTooltip: oe
241
+ }), (t, o) => (c(), m("div", {
242
+ ref_key: "ringsChart",
243
+ ref: F,
244
+ class: R(`vue-ui-rings ${P.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
245
+ style: x(`font-family:${e.value.style.fontFamily};text-align:center;width:100%;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
246
+ id: `rings_${N.value}`,
247
+ onMouseleave: o[3] || (o[3] = (l) => {
248
+ $.value = null, O.value = !1;
249
+ })
250
+ }, [
251
+ e.value.style.chart.title.text ? (c(), m("div", {
252
+ key: 0,
253
+ ref_key: "chartTitle",
254
+ ref: q,
255
+ style: x(`width:100%;background:${e.value.style.chart.backgroundColor}`)
256
+ }, [
257
+ U(Ue, {
258
+ config: {
259
+ title: {
260
+ cy: "rings-div-title",
261
+ ...e.value.style.chart.title
262
+ },
263
+ subtitle: {
264
+ cy: "rings-div-subtitle",
265
+ ...e.value.style.chart.title.subtitle
266
+ }
267
+ }
268
+ }, null, 8, ["config"])
269
+ ], 4)) : S("", !0),
270
+ e.value.userOptions.show && I.value ? (c(), V(Xe, {
271
+ ref_key: "details",
272
+ ref: ge,
273
+ key: `user_options_${j.value}`,
274
+ backgroundColor: e.value.style.chart.backgroundColor,
275
+ color: e.value.style.chart.color,
276
+ isPrinting: C(fe),
277
+ isImaging: C(ye),
278
+ uid: N.value,
279
+ hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
280
+ hasPdf: e.value.userOptions.buttons.pdf,
281
+ hasXls: e.value.userOptions.buttons.csv,
282
+ hasImg: e.value.userOptions.buttons.img,
283
+ hasTable: e.value.userOptions.buttons.table,
284
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
285
+ isTooltip: b.value.showTooltip,
286
+ isFullscreen: P.value,
287
+ titles: { ...e.value.userOptions.buttonTitles },
288
+ chartElement: F.value,
289
+ onToggleFullscreen: $e,
290
+ onGeneratePdf: C(K),
291
+ onGenerateCsv: te,
292
+ onGenerateImage: C(Q),
293
+ onToggleTable: le,
294
+ onToggleTooltip: oe
295
+ }, Ne({ _: 2 }, [
296
+ t.$slots.optionTooltip ? {
297
+ name: "optionTooltip",
298
+ fn: h(() => [
299
+ f(t.$slots, "optionTooltip", {}, void 0, !0)
300
+ ]),
301
+ key: "0"
302
+ } : void 0,
303
+ t.$slots.optionPdf ? {
304
+ name: "optionPdf",
305
+ fn: h(() => [
306
+ f(t.$slots, "optionPdf", {}, void 0, !0)
307
+ ]),
308
+ key: "1"
309
+ } : void 0,
310
+ t.$slots.optionCsv ? {
311
+ name: "optionCsv",
312
+ fn: h(() => [
313
+ f(t.$slots, "optionCsv", {}, void 0, !0)
314
+ ]),
315
+ key: "2"
316
+ } : void 0,
317
+ t.$slots.optionImg ? {
318
+ name: "optionImg",
319
+ fn: h(() => [
320
+ f(t.$slots, "optionImg", {}, void 0, !0)
321
+ ]),
322
+ key: "3"
323
+ } : void 0,
324
+ t.$slots.optionTable ? {
325
+ name: "optionTable",
326
+ fn: h(() => [
327
+ f(t.$slots, "optionTable", {}, void 0, !0)
328
+ ]),
329
+ key: "4"
330
+ } : void 0,
331
+ t.$slots.optionFullscreen ? {
332
+ name: "optionFullscreen",
333
+ fn: h(({ toggleFullscreen: l, isFullscreen: a }) => [
334
+ f(t.$slots, "optionFullscreen", H(X({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
335
+ ]),
336
+ key: "5"
337
+ } : void 0
338
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : S("", !0),
339
+ I.value ? (c(), m("svg", {
340
+ key: 2,
341
+ xmlns: C(ze),
342
+ class: R({ "vue-data-ui-fullscreen--on": P.value, "vue-data-ui-fulscreen--off": !P.value }),
343
+ viewBox: `0 0 ${u.value.width <= 0 ? 10 : u.value.width} ${u.value.height <= 0 ? 10 : u.value.height}`,
344
+ style: x(`max-width:100%;overflow:visible;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
345
+ }, [
346
+ (c(!0), m(ae, null, se(i.value, (l, a) => (c(), m("radialGradient", {
347
+ cx: "50%",
348
+ cy: "30%",
349
+ r: "50%",
350
+ fx: "50%",
351
+ fy: "50%",
352
+ id: `gradient_${N.value}_${a}`
353
+ }, [
354
+ w("stop", {
355
+ offset: "0%",
356
+ "stop-color": `${C(Ae)(l.color, 0.05)}${C(Re)[100 - e.value.style.chart.layout.rings.gradient.intensity]}`
357
+ }, null, 8, lt),
358
+ w("stop", {
359
+ offset: "100%",
360
+ "stop-color": l.color
361
+ }, null, 8, ot)
362
+ ], 8, tt))), 256)),
363
+ (c(!0), m(ae, null, se(i.value, (l, a) => (c(), m("g", null, [
364
+ w("circle", {
365
+ class: R({
366
+ "vue-ui-rings-item": _.value && e.value.useCssAnimation,
367
+ "vue-rings-item-onload": !_.value && e.value.useCssAnimation,
368
+ "vue-ui-rings-opacity": $.value !== null && $.value !== a
369
+ }),
370
+ style: x(`animation-delay:${a * 100}ms`),
371
+ stroke: e.value.style.chart.layout.rings.stroke,
372
+ cx: u.value.width / 2,
373
+ cy: a === 0 ? u.value.height / 2 : u.value.height / 2 + d.value * i.value[0].proportion / 2 - d.value * l.proportion / 2 - 2 * (a + 1),
374
+ r: d.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : d.value * l.proportion / 2 * 0.9,
375
+ fill: e.value.style.chart.layout.rings.gradient.underlayerColor
376
+ }, null, 14, at),
377
+ w("circle", {
378
+ class: R({
379
+ "vue-ui-rings-item": _.value && e.value.useCssAnimation,
380
+ "vue-rings-item-onload": !_.value && e.value.useCssAnimation,
381
+ "vue-ui-rings-shadow": e.value.style.chart.layout.rings.useShadow,
382
+ "vue-ui-rings-blur": $.value !== null && $.value !== a
383
+ }),
384
+ style: x(`animation-delay:${a * 100}ms`),
385
+ stroke: e.value.style.chart.layout.rings.stroke,
386
+ "stroke-width": l.strokeWidth < 0.5 ? 0.5 : l.strokeWidth,
387
+ cx: u.value.width / 2,
388
+ cy: a === 0 ? u.value.height / 2 : u.value.height / 2 + d.value * i.value[0].proportion / 2 - d.value * l.proportion / 2 - 2 * (a + 1),
389
+ r: d.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : d.value * l.proportion / 2 * 0.9,
390
+ fill: e.value.style.chart.layout.rings.gradient.show ? `url(#gradient_${N.value}_${a})` : l.color
391
+ }, null, 14, st),
392
+ w("circle", {
393
+ "data-cy-trap": "",
394
+ stroke: "none",
395
+ cx: u.value.width / 2,
396
+ cy: a === 0 ? u.value.height / 2 : u.value.height / 2 + d.value * i.value[0].proportion / 2 - d.value * l.proportion / 2 - 2 * (a + 1),
397
+ r: d.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : d.value * l.proportion / 2 * 0.9,
398
+ fill: "transparent",
399
+ onMouseenter: (s) => we(a, l),
400
+ onMouseleave: o[0] || (o[0] = (s) => {
401
+ $.value = null, O.value = !1;
402
+ })
403
+ }, null, 40, ut)
404
+ ]))), 256)),
405
+ f(t.$slots, "svg", { svg: u.value }, void 0, !0)
406
+ ], 14, et)) : S("", !0),
407
+ I.value ? S("", !0) : (c(), V(Ke, {
408
+ key: 3,
409
+ config: {
410
+ type: "rings",
411
+ style: {
412
+ backgroundColor: e.value.style.chart.backgroundColor,
413
+ rings: {
414
+ color: "#CCCCCC"
415
+ }
416
+ }
417
+ }
418
+ }, null, 8, ["config"])),
419
+ w("div", {
420
+ ref_key: "chartLegend",
421
+ ref: J
422
+ }, [
423
+ e.value.style.chart.legend.show ? (c(), V(Je, {
424
+ key: 0,
425
+ legendSet: ee.value,
426
+ config: ke.value,
427
+ onClickMarker: o[1] || (o[1] = ({ legend: l }) => E(l.uid))
428
+ }, {
429
+ item: h(({ legend: l }) => [
430
+ w("div", {
431
+ "data-cy-legend-item": "",
432
+ onClick: (a) => E(l.uid),
433
+ style: x(`opacity:${r.value.includes(l.uid) ? 0.5 : 1}`)
434
+ }, [
435
+ ue(B(l.name) + ": " + B(C(D)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: l.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.legend.roundingValue })) + " ", 1),
436
+ r.value.includes(l.uid) ? (c(), m("span", it, " ( - % ) ")) : (c(), m("span", rt, " (" + B(isNaN(l.value / g.value) ? "-" : (l.value / g.value * 100).toFixed(e.value.style.chart.legend.roundingPercentage)) + "%) ", 1))
437
+ ], 12, nt)
438
+ ]),
439
+ _: 1
440
+ }, 8, ["legendSet", "config"])) : f(t.$slots, "legend", {
441
+ key: 1,
442
+ legend: ee.value
443
+ }, void 0, !0)
444
+ ], 512),
445
+ U(je, {
446
+ show: b.value.showTooltip && O.value && r.value.length < p.dataset.length,
447
+ backgroundColor: e.value.style.chart.tooltip.backgroundColor,
448
+ color: e.value.style.chart.tooltip.color,
449
+ borderRadius: e.value.style.chart.tooltip.borderRadius,
450
+ borderColor: e.value.style.chart.tooltip.borderColor,
451
+ borderWidth: e.value.style.chart.tooltip.borderWidth,
452
+ fontSize: e.value.style.chart.tooltip.fontSize,
453
+ backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
454
+ parent: F.value,
455
+ content: W.value,
456
+ isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function"
457
+ }, {
458
+ "tooltip-before": h(() => [
459
+ f(t.$slots, "tooltip-before", H(X({ ...G.value })), void 0, !0)
460
+ ]),
461
+ "tooltip-after": h(() => [
462
+ f(t.$slots, "tooltip-after", H(X({ ...G.value })), void 0, !0)
463
+ ]),
464
+ _: 3
465
+ }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "parent", "content", "isCustom"]),
466
+ I.value ? (c(), V(Qe, {
467
+ key: 4,
468
+ hideDetails: "",
469
+ config: {
470
+ open: b.value.showTable,
471
+ maxHeight: 1e4,
472
+ body: {
473
+ backgroundColor: e.value.style.chart.backgroundColor,
474
+ color: e.value.style.chart.color
475
+ },
476
+ head: {
477
+ backgroundColor: e.value.style.chart.backgroundColor,
478
+ color: e.value.style.chart.color
479
+ }
480
+ }
481
+ }, {
482
+ content: h(() => [
483
+ U(qe, {
484
+ colNames: A.value.colNames,
485
+ head: A.value.head,
486
+ body: A.value.body,
487
+ config: A.value.config,
488
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
489
+ onClose: o[2] || (o[2] = (l) => b.value.showTable = !1)
490
+ }, {
491
+ th: h(({ th: l }) => [
492
+ w("div", {
493
+ innerHTML: l,
494
+ style: { display: "flex", "align-items": "center" }
495
+ }, null, 8, vt)
496
+ ]),
497
+ td: h(({ td: l }) => [
498
+ ue(B(l.name || l), 1)
499
+ ]),
500
+ _: 1
501
+ }, 8, ["colNames", "head", "body", "config", "title"])
502
+ ]),
503
+ _: 1
504
+ }, 8, ["config"])) : S("", !0)
505
+ ], 46, Ze));
506
+ }
507
+ }, Tt = /* @__PURE__ */ Ye(ct, [["__scopeId", "data-v-c7da9220"]]);
508
+ export {
509
+ Tt as default
510
+ };