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"),s=require("./index-BkomIE9L.cjs"),Z=require("./useResponsive-B3TrDDIG.cjs"),me=require("./Title-Cj_xubjI.cjs"),ee=require("./usePrinter-r6uHYEcR.cjs"),be=require("./Tooltip-CdJ5hegk.cjs"),ke=require("./DataTable-ssrNbONo.cjs"),we=require("./Legend-Dl5IYoxK.cjs"),xe=require("./vue-ui-skeleton-JmGp11-u.cjs"),Ce=require("./vue-ui-accordion-SXsobrUt.cjs"),te=require("./useNestedProp-BMxXyPbW.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=S=>(e.pushScopeId("data-v-e4e6d49b"),S=S(),e.popScopeId(),S),_e=["id"],Se=["xmlns","viewBox"],Ne=["id"],$e=["stop-color"],Te=["stop-color"],Ve=["id"],Ie=le(()=>e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1)),Ee=le(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Pe=[Ie,Ee],ze=["x","y","height","width"],Fe=["rx","x","y","height","width","stroke","stroke-width","filter"],Le=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],Oe=["x","y","height","width","filter"],De={key:0},Ae={key:1},Me={key:2},qe={key:3},Re=["onMouseover","x","y","height","width"],Ue=["onClick"],je={key:0},Ge={key:1},We=["innerHTML"],He={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(S,{expose:ae,emit:oe}){const p=S,{vue_ui_waffle:re}=s.useConfig(),I=e.computed(()=>!!p.dataset&&p.dataset.length),m=e.ref(s.createUid()),ue=e.ref(null),F=e.ref(!1),L=e.ref(""),B=e.ref(null),A=e.ref(0),N=e.ref(null),M=e.ref(null),q=e.ref(null),t=e.computed(()=>{const l=te.useNestedProp({userConfig:p.config,defaultConfig:re});return l.theme?{...te.useNestedProp({userConfig:s.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}),E=e.ref(null);e.onMounted(()=>{if(s.objectIsEmpty(p.dataset)?s.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,o)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{s.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=Z.throttle(()=>{const{width:o,height:a}=Z.useResponsive({chart:N.value,title:t.value.style.chart.title.text?M.value:null,legend:t.value.style.chart.legend.show?q.value:null});b.value.width=o,b.value.height=a,k.value.width=o,k.value.height=a});E.value=new ResizeObserver(l),E.value.observe(N.value.parentNode)}}),e.onBeforeUnmount(()=>{E.value&&E.value.disconnect()});const{isPrinting:ne,isImaging:se,generatePdf:R,generateImage:U}=ee.usePrinter({elementId:`vue-ui-waffle_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),j=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),b=e.ref({height:512,width:512}),k=e.ref({top:0,left:0,height:512,width:512}),w=e.computed(()=>(k.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),x=e.computed(()=>(k.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),$=e.computed(()=>k.value.width/t.value.style.chart.layout.grid.size),P=e.computed(()=>k.value.height/t.value.style.chart.layout.grid.size);function G(l){const o=l.reduce((u,n)=>u+n,0),a=l.map(u=>Math.round(u/o*100)/100),r=a.reduce((u,n)=>u+n,0);if(r!==1){const u=a.length-1;a[u]+=1-r,a[u]=Math.round(a[u]*100)/100}return a}const W=e.computed(()=>p.dataset.map((l,o)=>({...l,color:s.convertColorToHex(l.color)||j.value[o]||s.palette[o]||s.palette[o%s.palette.length],uid:`serie_${o}`,absoluteIndex:o}))),d=e.ref(W.value),ie=e.computed(()=>{const l=d.value.filter((o,a)=>!v.value.includes(o.uid)).map((o,a)=>(o.values||[]).reduce((r,u)=>r+u,0));return G(l)}),ce=e.computed(()=>{const l=d.value.map((o,a)=>(o.values||[]).reduce((r,u)=>r+u));return G(l)}),h=e.computed(()=>(p.dataset.forEach((l,o)=>{[null,void 0].includes(l.values)&&s.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:o})}),d.value.filter((l,o)=>!v.value.includes(l.uid)).map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:ie.value[o]*Math.pow(t.value.style.chart.layout.grid.size,2)})))),de=e.computed(()=>d.value.map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:ce.value[o]*Math.pow(t.value.style.chart.layout.grid.size,2)})));function ve(){return de.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)}))}const pe=e.computed(()=>h.value.map((l,o)=>{const a=o>0?h.value.filter((n,c)=>c<o).map(n=>n.proportion).reduce((n,c)=>n+c)+l.proportion-h.value[o-1].proportion:l.proportion-l.proportion,r=a+l.proportion,u=[];for(let n=a;n<=r;n+=1)u.push(n);return{...l,start:o>0?h.value.filter((n,c)=>c<o).map(n=>n.proportion).reduce((n,c)=>n+c)+l.proportion-h.value[o-1].proportion:l.proportion-l.proportion,rects:u}})),i=e.computed(()=>pe.value.flatMap((l,o)=>l.rects.map((a,r)=>({isFirst:r===0,isLongEnough:a.length>2,name:l.name,color:l.color,value:l.value,serieIndex:o,absoluteStartIndex:r<3,serieId:l.uid,...l}))).map((l,o)=>({...l,isAbsoluteFirst:o%t.value.style.chart.layout.grid.size===0}))),T=e.computed(()=>{const l=[];for(let o=0;o<t.value.style.chart.layout.grid.size;o+=1)for(let a=0;a<t.value.style.chart.layout.grid.size;a+=1)l.push({isStartOfLine:a===0,position:t.value.style.chart.layout.grid.vertical?o:a,x:(t.value.style.chart.layout.grid.vertical?o:a)*(w.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:o)*(x.value+t.value.style.chart.layout.grid.spaceBetween)+k.value.top});return l}),v=e.ref([]),C=e.ref(!1),H=e.ref(null),X=e.ref(null);function Y(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(u=>u!==l):v.value.length<_.value.length-1&&_.value.length>1&&v.value.push(l);return}const o=W.value.find(u=>u.uid===l).values.reduce((u,n)=>u+n,0);let r=d.value.find(u=>u.uid===l).values.reduce((u,n)=>u+n,0);if(v.value.includes(l)){let n=function(){r>u?(cancelAnimationFrame(H.value),d.value=d.value.map((c,ge)=>c.uid===l?{...c,values:[u]}:c),C.value=!1):(C.value=!0,r+=u*.025,d.value=d.value.map((c,ge)=>c.uid===l?{...c,values:[r]}:c),H.value=requestAnimationFrame(n))};v.value=v.value.filter(c=>c!==l);const u=o;n()}else if(v.value.length<_.value.length-1&&_.value.length>1){let u=function(){r<.1?(cancelAnimationFrame(X.value),v.value.push(l),d.value=d.value.map((n,c)=>n.uid===l?{...n,values:[0]}:n),C.value=!1):(C.value=!0,r/=1.5,d.value=d.value.map((n,c)=>n.uid===l?{...n,values:[r]}:n),X.value=requestAnimationFrame(u))};u()}oe("selectLegend",h.value.map(u=>({name:u.name,color:u.color,value:u.value,proportion:u.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)})))}const _=e.computed(()=>d.value.map((l,o)=>({name:l.name,color:l.color||j[o]||s.palette[o]||s.palette[o%s.palette.length],value:(l.values||[]).reduce((a,r)=>a+r,0),uid:l.uid,shape:"square"})).map((l,o)=>({...l,proportion:l.value/d.value.map(a=>(a.values||[]).reduce((r,u)=>r+u,0)).reduce((a,r)=>a+r,0),opacity:v.value.includes(l.uid)?.5:1,segregate:()=>Y(l.uid),isSegregated:v.value.includes(l.uid)}))),he=e.computed(()=>({cy:"waffle-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":""})),f=e.computed(()=>h.value.map(l=>l.value).reduce((l,o)=>l+o,0)),O=e.ref(null);function fe(l){if(v.value.length===p.dataset.length)return;const o=i.value[l];O.value={datapoint:o,seriesIndex:o.absoluteIndex,series:d.value,config:t.value},F.value=!0,B.value=i.value[l].serieIndex;const a=t.value.style.chart.tooltip.customFormat;if(s.isFunction(a)&&s.functionReturnsString(()=>a({seriesIndex:i.value[l].absoluteIndex,datapoint:o,series:d.value,config:t.value})))L.value=a({seriesIndex:i.value[l].absoluteIndex,datapoint:o,series:d.value,config:t.value});else{let r="";r+=`<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>`,r+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" rx="1" fill="${o.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(r+=`<b>${s.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?r+=`<span>(${(o.value/f.value*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:r+=`<b>${(o.value/f.value*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),L.value=r}}const g=e.computed(()=>{const l=h.value.map(a=>({name:a.name,color:a.color})),o=h.value.map(a=>a.value);return{head:l,body:o}});function D(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${m.value})`:""}function J(){e.nextTick(()=>{const l=g.value.head.map((r,u)=>[[r.name],[g.value.body[u]],[isNaN(g.value.body[u]/f.value)?"-":g.value.body[u]/f.value*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=s.createCsvContent(o);s.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const z=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>',s.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],o=g.value.head.map((u,n)=>[{color:u.color,name:u.name},s.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:g.value.body[n],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(g.value.body[n]/f.value)?"-":(g.value.body[n]/f.value*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},shape:"square",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:o,config:a,colNames:r}}),V=e.ref(!1);function ye(l){V.value=l,A.value+=1}function K(){y.value.showTable=!y.value.showTable}function Q(){y.value.showTooltip=!y.value.showTooltip}return ae({getData:ve,generatePdf:R,generateCsv:J,generateImage:U,toggleTable:K,toggleTooltip:Q}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:N,id:`vue-ui-waffle_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:M,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(me._sfc_main,{config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&I.value?(e.openBlock(),e.createBlock(ee.UserOptions,{ref_key:"details",ref:ue,key:`user_options_${A.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ne),isImaging:e.unref(se),uid:m.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(R),onGenerateCsv:J,onGenerateImage:e.unref(U),onToggleTable:K,onToggleTooltip:Q},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:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),I.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${b.value.width<=0?10:b.value.width} ${b.value.height<=0?10:b.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(i.value,(a,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(s.shiftHue)(a.color,.05)}${e.unref(s.opacity)[100-t.value.style.chart.layout.rect.gradientIntensity]}`},null,8,$e),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Te)],8,Ne))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},Pe,8,Ve)]),t.value.useCustomCells?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.normalizeProps(e.guardReactiveProps({cell:{...a,color:i.value[r].color,...i.value[r]},isSelected:[null,void 0].includes(B.value)?!0:i.value[r].serieIndex===B.value})),void 0,!0)],8,ze))),256)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x,y:a.y,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:D(i.value[r].serieIndex)},null,8,Fe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x,y:a.y,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${m.value}_${r})`:i.value[r].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:D(i.value[r].serieIndex)},null,8,Le))),256))],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!C.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(i.value[r].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||i.value[r].isAbsoluteFirst&&r%t.value.style.chart.layout.grid.size===0&&i.value[r].absoluteStartIndex)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:a.x+t.value.style.chart.layout.labels.captions.offsetX,y:a.y+t.value.style.chart.layout.labels.captions.offsetY,height:P.value<=0?1e-4:P.value,width:$.value*t.value.style.chart.layout.grid.size<=0?1e-4:$.value*t.value.style.chart.layout.grid.size,filter:D(i.value[r].serieIndex)},[e.createElementVNode("div",{class:"vue-ui-waffle-caption",style:e.normalizeStyle(`height: 100%; width: 100%; font-size:${t.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${$.value/12}px;color:${e.unref(s.adaptColorToBackground)(i.value[r].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",De,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(s.abbreviate)({source:i.value[r].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):i.value[r].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",Ae,e.toDisplayString(e.unref(s.dataLabel)({v:i.value[r].proportion,s:"%",r:t.value.style.chart.layout.labels.captions.roundingPercentage})),1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",Me," ("+e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:i.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}))+") ",1)):e.createCommentVNode("",!0),!t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",qe,e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:i.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue})),1)):e.createCommentVNode("",!0)],4)],8,Oe)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:u=>fe(r),onMouseleave:o[0]||(o[0]=u=>{F.value=!1,B.value=null}),x:a.x,y:a.y,height:P.value<=0?1e-4:P.value,width:$.value<=0?1e-4:$.value,fill:"transparent",stroke:"none"},null,40,Re))),256)),e.renderSlot(l.$slots,"svg",{svg:b.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),I.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:3,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:q},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:0,legendSet:_.value,config:he.value,onClickMarker:o[1]||(o[1]=({legend:a})=>Y(a.uid))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:r=>a.segregate(),style:e.normalizeStyle(`opacity:${v.value.includes(a.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue,isAnimating:C.value}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",Ge," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",je," ("+e.toDisplayString(isNaN(a.value/f.value)?"-":e.unref(s.dataLabel)({v:a.value/f.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:C.value}))+") ",1))],12,Ue)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:_.value},void 0,!0)],512),e.createVNode(be._sfc_main,{show:y.value.showTooltip&&F.value&&v.value.length<p.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,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,parent:N.value,content:L.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize},{"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","backgroundOpacity","parent","content","isCustom","fontSize"]),I.value?(e.openBlock(),e.createBlock(Ce.default,{key:4,hideDetails:"",config:{open:y.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(ke.DataTable,{colNames:z.value.colNames,head:z.value.head,body:z.value.body,config:z.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>y.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,We)]),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,_e))}},Xe=Be._export_sfc(He,[["__scopeId","data-v-e4e6d49b"]]);exports.default=Xe;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-BkomIE9L.cjs"),q=require("./Title-Cj_xubjI.cjs"),x=require("./usePrinter-r6uHYEcR.cjs"),_=require("./useResponsive-B3TrDDIG.cjs"),T=require("./vue-ui-skeleton-JmGp11-u.cjs"),B=require("./useNestedProp-BMxXyPbW.cjs"),U=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),G=["id"],L=["xmlns","viewBox"],X=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],j=["cx","cy","r","stroke","stroke-width"],H=["x","y","font-size","fill","font-weight"],R={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(I,{expose:P}){const o=I,{vue_ui_wheel:S}=c.useConfig(),y=e.computed(()=>!!o.dataset&&Object.keys(o.dataset).length),f=e.ref(c.createUid()),F=e.ref(null),m=e.ref(0),h=e.ref(null),p=e.ref(null),t=e.computed(()=>{const l=B.useNestedProp({userConfig:o.config,defaultConfig:S});return l.theme?{...B.useNestedProp({userConfig:c.themes.vue_ui_wheel[l.theme]||o.config,defaultConfig:l})}:l}),{isPrinting:N,isImaging:z,generatePdf:k,generateImage:w}=x.usePrinter({elementId:f.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel"}),n=e.ref({size:360,height:360,width:360}),g=e.ref(t.value.style.chart.layout.percentage.fontSize),r=e.computed(()=>({radius:Math.min(n.value.width,n.value.height)*.9/2,centerX:n.value.width/2,centerY:n.value.height/2}));function C(l,s=1){return{x:r.value.centerX+r.value.radius*Math.cos(29.85+l*Math.PI/180)*s,y:r.value.centerY+r.value.radius*Math.sin(29.85+l*Math.PI/180)*s}}const u=e.ref(t.value.style.chart.animation.use?0:o.dataset.percentage||0);e.watch(()=>o.dataset.percentage,()=>{u.value=e.ref(t.value.style.chart.animation.use?0:o.dataset.percentage||0),b()});const v=e.ref(null);e.onMounted(()=>{if(c.objectIsEmpty(o.dataset)&&c.error({componentName:"VueUiWheel",type:"dataset"}),b(),t.value.responsive){const l=_.throttle(()=>{const{width:s,height:a}=_.useResponsive({chart:h.value,title:t.value.style.chart.title.text?p.value:null});n.value.width=s,n.value.height=a,g.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(s,a)});v.value=new ResizeObserver(l),v.value.observe(h.value.parentNode)}}),e.onBeforeUnmount(()=>{v.value&&v.value.disconnect()});function b(){let l=0,s=t.value.style.chart.animation.speed,a=.005*t.value.style.chart.animation.acceleration;function i(){u.value+=s+l,l+=a,u.value<(o.dataset.percentage||0)?requestAnimationFrame(i):u.value=o.dataset.percentage||0}t.value.style.chart.animation.use&&(u.value=0,i())}const $=e.computed(()=>{const l=[];for(let a=0;a<100;a+=1){const i=u.value>a?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:E,y:A}=C(n.value.size/100*a),{x:M,y:V}=C(n.value.size/100*a,.9);l.push({x1:E,y1:A,x2:M,y2:V,color:t.value.style.chart.layout.wheel.ticks.gradient.show?c.shiftHue(i,a/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):i})}return l}),d=e.ref(!1);function O(l){d.value=l,m.value+=1}return P({generatePdf:k,generateImage:w}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:h,id:f.value,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:p,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(q._sfc_main,{config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value?(e.openBlock(),e.createBlock(x.UserOptions,{ref_key:"details",ref:F,key:`user_options_${m.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(N),isImaging:e.unref(z),uid:f.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:d.value,titles:{...t.value.userOptions.buttonTitles},chartElement:h.value,onToggleFullscreen:O,onGeneratePdf:e.unref(k),onGenerateImage:e.unref(w)},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:i})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:i})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":d.value,"vue-data-ui-fulscreen--off":!d.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.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($.value,(a,i)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2,stroke:a.color,"stroke-width":5/360*Math.min(n.value.width,n.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&i<=u.value})},null,10,X))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:r.value.centerX,cy:r.value.centerY,r:r.value.radius*.8<=0?1e-4:r.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,j)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:1,x:r.value.centerX,y:r.value.centerY+g.value/3,"font-size":g.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(c.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,u.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(Number(u.value.toFixed(t.value.style.chart.layout.percentage.rounding)).toLocaleString())+"% ",9,H)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,L)):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(T.default,{key:3,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],12,G))}},Y=U._export_sfc(R,[["__scopeId","data-v-9e158d61"]]);exports.default=Y;
@@ -0,0 +1,227 @@
1
+ import { computed as m, ref as n, watch as D, onMounted as H, onBeforeUnmount as W, openBlock as c, createElementBlock as h, normalizeStyle as C, createVNode as q, createCommentVNode as v, createBlock as S, unref as d, createSlots as J, withCtx as _, renderSlot as p, normalizeProps as K, guardReactiveProps as Q, normalizeClass as O, Fragment as Z, renderList as ee, toDisplayString as te } from "vue";
2
+ import { u as ae, c as le, t as ne, o as oe, e as se, s as N, X as re } from "./index-BMCvLyab.js";
3
+ import { _ as ue } from "./Title-BNPZwnkp.js";
4
+ import { u as ie, U as ce } from "./usePrinter-BuuBz5JR.js";
5
+ import { t as he, u as ve } from "./useResponsive-NZB-WLRF.js";
6
+ import de from "./vue-ui-skeleton-BisWX1sO.js";
7
+ import { u as A } from "./useNestedProp-CkP8xhG_.js";
8
+ import { _ as ye } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
+ const fe = ["id"], ge = ["xmlns", "viewBox"], me = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-linecap"], pe = ["cx", "cy", "r", "stroke", "stroke-width"], ke = ["x", "y", "font-size", "fill", "font-weight"], we = {
10
+ __name: "vue-ui-wheel",
11
+ props: {
12
+ config: {
13
+ type: Object,
14
+ default() {
15
+ return {};
16
+ }
17
+ },
18
+ dataset: {
19
+ type: Object,
20
+ default() {
21
+ return {};
22
+ }
23
+ }
24
+ },
25
+ setup(M, { expose: U }) {
26
+ const o = M, { vue_ui_wheel: X } = ae(), k = m(() => !!o.dataset && Object.keys(o.dataset).length), w = n(le()), B = n(null), x = n(0), y = n(null), I = n(null), e = m(() => {
27
+ const t = A({
28
+ userConfig: o.config,
29
+ defaultConfig: X
30
+ });
31
+ return t.theme ? {
32
+ ...A({
33
+ userConfig: ne.vue_ui_wheel[t.theme] || o.config,
34
+ defaultConfig: t
35
+ })
36
+ } : t;
37
+ }), { isPrinting: G, isImaging: L, generatePdf: F, generateImage: P } = ie({
38
+ elementId: w.value,
39
+ fileName: e.value.style.chart.title.text || "vue-ui-wheel"
40
+ }), l = n({
41
+ size: 360,
42
+ height: 360,
43
+ width: 360
44
+ }), b = n(e.value.style.chart.layout.percentage.fontSize), s = m(() => ({
45
+ radius: Math.min(l.value.width, l.value.height) * 0.9 / 2,
46
+ centerX: l.value.width / 2,
47
+ centerY: l.value.height / 2
48
+ }));
49
+ function $(t, u = 1) {
50
+ return {
51
+ x: s.value.centerX + s.value.radius * Math.cos(29.85 + t * Math.PI / 180) * u,
52
+ y: s.value.centerY + s.value.radius * Math.sin(29.85 + t * Math.PI / 180) * u
53
+ };
54
+ }
55
+ const r = n(e.value.style.chart.animation.use ? 0 : o.dataset.percentage || 0);
56
+ D(() => o.dataset.percentage, () => {
57
+ r.value = n(e.value.style.chart.animation.use ? 0 : o.dataset.percentage || 0), z();
58
+ });
59
+ const f = n(null);
60
+ H(() => {
61
+ if (oe(o.dataset) && se({
62
+ componentName: "VueUiWheel",
63
+ type: "dataset"
64
+ }), z(), e.value.responsive) {
65
+ const t = he(() => {
66
+ const { width: u, height: a } = ve({
67
+ chart: y.value,
68
+ title: e.value.style.chart.title.text ? I.value : null
69
+ });
70
+ l.value.width = u, l.value.height = a, b.value = e.value.style.chart.layout.percentage.fontSize / 360 * Math.min(u, a);
71
+ });
72
+ f.value = new ResizeObserver(t), f.value.observe(y.value.parentNode);
73
+ }
74
+ }), W(() => {
75
+ f.value && f.value.disconnect();
76
+ });
77
+ function z() {
78
+ let t = 0, u = e.value.style.chart.animation.speed, a = 5e-3 * e.value.style.chart.animation.acceleration;
79
+ function i() {
80
+ r.value += u + t, t += a, r.value < (o.dataset.percentage || 0) ? requestAnimationFrame(i) : r.value = o.dataset.percentage || 0;
81
+ }
82
+ e.value.style.chart.animation.use && (r.value = 0, i());
83
+ }
84
+ const T = m(() => {
85
+ const t = [];
86
+ for (let a = 0; a < 100; a += 1) {
87
+ const i = r.value > a ? e.value.style.chart.layout.wheel.ticks.activeColor : e.value.style.chart.layout.wheel.ticks.inactiveColor, { x: j, y: R } = $(l.value.size / 100 * a), { x: V, y: Y } = $(l.value.size / 100 * a, 0.9);
88
+ t.push({
89
+ x1: j,
90
+ y1: R,
91
+ x2: V,
92
+ y2: Y,
93
+ color: e.value.style.chart.layout.wheel.ticks.gradient.show ? N(i, a / 100 * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : i
94
+ });
95
+ }
96
+ return t;
97
+ }), g = n(!1);
98
+ function E(t) {
99
+ g.value = t, x.value += 1;
100
+ }
101
+ return U({
102
+ generatePdf: F,
103
+ generateImage: P
104
+ }), (t, u) => (c(), h("div", {
105
+ class: "vue-ui-wheel",
106
+ ref_key: "wheelChart",
107
+ ref: y,
108
+ id: w.value,
109
+ style: C(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`)
110
+ }, [
111
+ e.value.style.chart.title.text ? (c(), h("div", {
112
+ key: 0,
113
+ ref_key: "chartTitle",
114
+ ref: I,
115
+ style: C(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:12px`)
116
+ }, [
117
+ q(ue, {
118
+ config: {
119
+ title: {
120
+ cy: "wheel-title",
121
+ ...e.value.style.chart.title
122
+ },
123
+ subtitle: {
124
+ cy: "wheel-subtitle",
125
+ ...e.value.style.chart.title.subtitle
126
+ }
127
+ }
128
+ }, null, 8, ["config"])
129
+ ], 4)) : v("", !0),
130
+ e.value.userOptions.show && k.value ? (c(), S(ce, {
131
+ ref_key: "details",
132
+ ref: B,
133
+ key: `user_options_${x.value}`,
134
+ backgroundColor: e.value.style.chart.backgroundColor,
135
+ color: e.value.style.chart.color,
136
+ isPrinting: d(G),
137
+ isImaging: d(L),
138
+ uid: w.value,
139
+ hasPdf: e.value.userOptions.buttons.pdf,
140
+ hasImg: e.value.userOptions.buttons.img,
141
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
142
+ hasXls: !1,
143
+ isFullscreen: g.value,
144
+ titles: { ...e.value.userOptions.buttonTitles },
145
+ chartElement: y.value,
146
+ onToggleFullscreen: E,
147
+ onGeneratePdf: d(F),
148
+ onGenerateImage: d(P)
149
+ }, J({ _: 2 }, [
150
+ t.$slots.optionPdf ? {
151
+ name: "optionPdf",
152
+ fn: _(() => [
153
+ p(t.$slots, "optionPdf", {}, void 0, !0)
154
+ ]),
155
+ key: "0"
156
+ } : void 0,
157
+ t.$slots.optionImg ? {
158
+ name: "optionImg",
159
+ fn: _(() => [
160
+ p(t.$slots, "optionImg", {}, void 0, !0)
161
+ ]),
162
+ key: "1"
163
+ } : void 0,
164
+ t.$slots.optionFullscreen ? {
165
+ name: "optionFullscreen",
166
+ fn: _(({ toggleFullscreen: a, isFullscreen: i }) => [
167
+ p(t.$slots, "optionFullscreen", K(Q({ toggleFullscreen: a, isFullscreen: i })), void 0, !0)
168
+ ]),
169
+ key: "2"
170
+ } : void 0
171
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : v("", !0),
172
+ k.value ? (c(), h("svg", {
173
+ key: 2,
174
+ xmlns: d(re),
175
+ class: O({ "vue-data-ui-fullscreen--on": g.value, "vue-data-ui-fulscreen--off": !g.value }),
176
+ viewBox: `0 0 ${l.value.width <= 0 ? 10 : l.value.width} ${l.value.height <= 0 ? 10 : l.value.height}`,
177
+ style: C(`max-width:100%;overflow:visible;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
178
+ }, [
179
+ (c(!0), h(Z, null, ee(T.value, (a, i) => (c(), h("line", {
180
+ x1: a.x1,
181
+ x2: a.x2,
182
+ y1: a.y1,
183
+ y2: a.y2,
184
+ stroke: a.color,
185
+ "stroke-width": 5 / 360 * Math.min(l.value.width, l.value.height),
186
+ "stroke-linecap": e.value.style.chart.layout.wheel.ticks.rounded ? "round" : "butt",
187
+ class: O({ "vue-ui-tick-animated": e.value.style.chart.animation.use && i <= r.value })
188
+ }, null, 10, me))), 256)),
189
+ e.value.style.chart.layout.innerCircle.show ? (c(), h("circle", {
190
+ key: 0,
191
+ cx: s.value.centerX,
192
+ cy: s.value.centerY,
193
+ r: s.value.radius * 0.8 <= 0 ? 1e-4 : s.value.radius * 0.8,
194
+ stroke: e.value.style.chart.layout.innerCircle.stroke,
195
+ "stroke-width": e.value.style.chart.layout.innerCircle.strokeWidth,
196
+ fill: "none"
197
+ }, null, 8, pe)) : v("", !0),
198
+ e.value.style.chart.layout.percentage.show ? (c(), h("text", {
199
+ key: 1,
200
+ x: s.value.centerX,
201
+ y: s.value.centerY + b.value / 3,
202
+ "font-size": b.value,
203
+ fill: e.value.style.chart.layout.wheel.ticks.gradient.show ? d(N)(e.value.style.chart.layout.wheel.ticks.activeColor, r.value / 100 * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.wheel.ticks.activeColor,
204
+ "text-anchor": "middle",
205
+ "font-weight": e.value.style.chart.layout.percentage.bold ? "bold" : "normal",
206
+ style: { "font-variant-numeric": "tabluar-nums" }
207
+ }, te(Number(r.value.toFixed(e.value.style.chart.layout.percentage.rounding)).toLocaleString()) + "% ", 9, ke)) : v("", !0),
208
+ p(t.$slots, "svg", { svg: l.value }, void 0, !0)
209
+ ], 14, ge)) : v("", !0),
210
+ k.value ? v("", !0) : (c(), S(de, {
211
+ key: 3,
212
+ config: {
213
+ type: "wheel",
214
+ style: {
215
+ backgroundColor: e.value.style.chart.backgroundColor,
216
+ wheel: {
217
+ color: "#CCCCCC"
218
+ }
219
+ }
220
+ }
221
+ }, null, 8, ["config"]))
222
+ ], 12, fe));
223
+ }
224
+ }, ze = /* @__PURE__ */ ye(we, [["__scopeId", "data-v-9e158d61"]]);
225
+ export {
226
+ ze as default
227
+ };
@@ -0,0 +1,346 @@
1
+ import { computed as P, ref as r, onMounted as he, onBeforeUnmount as me, watch as fe, openBlock as d, createElementBlock as f, normalizeStyle as F, createVNode as L, createCommentVNode as N, createBlock as X, unref as b, createSlots as ge, withCtx as v, renderSlot as g, normalizeProps as pe, guardReactiveProps as be, normalizeClass as R, createElementVNode as j, Fragment as ye, renderList as Ce, toDisplayString as H, createTextVNode as we, nextTick as q } from "vue";
2
+ import { u as xe, S as ke, c as Y, t as $e, a as _e, p as z, o as Te, e as J, g as Pe, f as Fe, X as Ne, n as ze, q as Ie } from "./index-BMCvLyab.js";
3
+ import { _ as Se } from "./Title-BNPZwnkp.js";
4
+ import { u as Oe, U as Me } from "./usePrinter-BuuBz5JR.js";
5
+ import { t as De, u as We } from "./useResponsive-NZB-WLRF.js";
6
+ import Ee from "./vue-ui-accordion-CLlVxx3Q.js";
7
+ import { D as Ae } from "./DataTable-CaB7GIwQ.js";
8
+ import { u as K } from "./useNestedProp-CkP8xhG_.js";
9
+ import { _ as Ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
+ const Be = ["id"], Ue = ["xmlns", "viewBox"], Ge = ["transform"], Le = ["fill", "font-weight", "x", "y", "font-size", "transform"], Xe = ["innerHTML"], Re = {
11
+ __name: "vue-ui-word-cloud",
12
+ props: {
13
+ config: {
14
+ type: Object,
15
+ default() {
16
+ return {};
17
+ }
18
+ },
19
+ dataset: {
20
+ type: [Array, String],
21
+ default() {
22
+ return [];
23
+ }
24
+ }
25
+ },
26
+ setup(Q, { expose: Z }) {
27
+ const i = Q, { vue_ui_word_cloud: ee } = xe(), y = P({
28
+ get() {
29
+ return !!i.dataset && i.dataset.length;
30
+ },
31
+ set(t) {
32
+ return t;
33
+ }
34
+ }), I = r(typeof i.dataset == "string" ? ke(i.dataset) : i.dataset), S = r(Y()), D = r(0), C = r(null), W = r(null), e = P(() => {
35
+ const t = K({
36
+ userConfig: i.config,
37
+ defaultConfig: ee
38
+ });
39
+ return t.theme ? {
40
+ ...K({
41
+ userConfig: $e.vue_ui_word_cloud[t.theme] || i.config,
42
+ defaultConfig: t
43
+ }),
44
+ customPalette: _e[t.theme] || z
45
+ } : t;
46
+ }), n = r({
47
+ width: e.value.style.chart.width,
48
+ height: e.value.style.chart.height,
49
+ maxFontSize: e.value.style.chart.words.maxFontSize,
50
+ minFontSize: e.value.style.chart.words.minFontSize
51
+ }), w = r(null);
52
+ he(() => {
53
+ if (Te(i.dataset) ? J({
54
+ componentName: "VueUiWordCloud",
55
+ type: "dataset"
56
+ }) : I.value.forEach((t, o) => {
57
+ Pe({
58
+ datasetObject: t,
59
+ requiredAttributes: ["name", "value"]
60
+ }).forEach((a) => {
61
+ y.value = !1, J({
62
+ componentName: "VueUiWordCloud",
63
+ type: "datasetSerieAttribute",
64
+ property: a,
65
+ index: o
66
+ });
67
+ });
68
+ }), e.value.responsive) {
69
+ const t = De(() => {
70
+ const { width: o, height: a } = We({
71
+ chart: C.value,
72
+ title: e.value.style.chart.title.text ? W.value : null
73
+ });
74
+ n.value.width = o, n.value.height = a, q(V);
75
+ });
76
+ w.value = new ResizeObserver(t), w.value.observe(C.value.parentNode);
77
+ }
78
+ }), me(() => {
79
+ w.value && w.value.disconnect();
80
+ });
81
+ const { isPrinting: te, isImaging: ae, generatePdf: E, generateImage: A } = Oe({
82
+ elementId: `wordCloud_${S.value}`,
83
+ fileName: e.value.style.chart.title.text || "vue-ui-word-cloud"
84
+ }), x = r({
85
+ showTable: e.value.table.show
86
+ });
87
+ function oe(t, o, a = "Arial") {
88
+ const l = document.createElement("canvas").getContext("2d");
89
+ return l.font = `${o}px ${e.value.style.chart.words.bold ? "bold" : "normal"} ${a}`, {
90
+ width: l.measureText(t).width + e.value.style.chart.words.proximity,
91
+ height: o
92
+ };
93
+ }
94
+ function le(t, o) {
95
+ return t.x < o.x + o.width && t.x + t.width > o.x && t.y < o.y + o.height && t.y + t.height > o.y;
96
+ }
97
+ function ne(t, o, a) {
98
+ const s = [], l = { x: -o / 2, y: -a / 2, width: o, height: a }, u = 0, h = 0;
99
+ return t.forEach((m) => {
100
+ let O = !1;
101
+ for (let T = 0; T < Math.max(o, a) / 2 && !O; T += e.value.style.chart.words.packingWeight)
102
+ for (let M = 0; M < 360 && !O; M += e.value.style.chart.words.packingWeight) {
103
+ const G = M * Math.PI / 180, re = u + T * Math.cos(G) - m.width / 2, ie = h + T * Math.sin(G) - m.height / 2, c = { ...m, x: re, y: ie }, ce = c.x >= l.x && c.y >= l.y && c.x + c.width <= l.x + l.width && c.y + c.height <= l.y + l.height, de = s.some((ve) => le(c, ve));
104
+ ce && !de && (s.push(c), O = !0);
105
+ }
106
+ }), s;
107
+ }
108
+ const p = r([]);
109
+ fe(() => i.dataset, V, { immediate: !0 });
110
+ function V() {
111
+ const t = I.value.map((l) => l.value), o = Math.max(...t), a = Math.min(...t), s = I.value.map((l, u) => {
112
+ const h = (l.value - a) / (o - a) * (n.value.maxFontSize - n.value.minFontSize) + n.value.minFontSize, m = oe(l.name, h);
113
+ return {
114
+ ...l,
115
+ id: Y(),
116
+ fontSize: h,
117
+ width: m.width,
118
+ height: m.height,
119
+ color: e.value.style.chart.words.usePalette ? e.value.customPalette[u] || e.value.customPalette[u % e.value.customPalette.length] || z[u] || z[u % z.length] : e.value.style.chart.words.color
120
+ };
121
+ });
122
+ p.value = ne(s, n.value.width, n.value.height).sort((l, u) => u.fontSize - l.fontSize);
123
+ }
124
+ const k = P(() => {
125
+ const t = p.value.map((a) => ({
126
+ name: a.name,
127
+ color: a.color
128
+ })), o = p.value.map((a) => a.value);
129
+ return { head: t, body: o };
130
+ });
131
+ function B() {
132
+ q(() => {
133
+ const t = k.value.head.map((s, l) => [[
134
+ s.name
135
+ ], [k.value.body[l]]]), o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(t), a = ze(o);
136
+ Ie({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-word-cloud" });
137
+ });
138
+ }
139
+ const $ = P(() => {
140
+ const t = [
141
+ e.value.table.columnNames.series,
142
+ e.value.table.columnNames.value
143
+ ], o = k.value.head.map((l, u) => {
144
+ const h = Fe({ p: e.value.table.td.prefix, v: k.value.body[u], s: e.value.table.td.suffix, r: e.value.table.td.roundingValue });
145
+ return [
146
+ {
147
+ color: l.color,
148
+ name: l.name
149
+ },
150
+ h
151
+ ];
152
+ }), a = {
153
+ th: {
154
+ backgroundColor: e.value.table.th.backgroundColor,
155
+ color: e.value.table.th.color,
156
+ outline: e.value.table.th.outline
157
+ },
158
+ td: {
159
+ backgroundColor: e.value.table.td.backgroundColor,
160
+ color: e.value.table.td.color,
161
+ outline: e.value.table.td.outline
162
+ },
163
+ breakpoint: e.value.table.responsiveBreakpoint
164
+ };
165
+ return {
166
+ colNames: [
167
+ e.value.table.columnNames.series,
168
+ e.value.table.columnNames.value
169
+ ],
170
+ head: t,
171
+ body: o,
172
+ config: a
173
+ };
174
+ }), _ = r(!1);
175
+ function se(t) {
176
+ _.value = t, D.value += 1;
177
+ }
178
+ function ue() {
179
+ return p.value;
180
+ }
181
+ function U() {
182
+ x.value.showTable = !x.value.showTable;
183
+ }
184
+ return Z({
185
+ getData: ue,
186
+ generateCsv: B,
187
+ generatePdf: E,
188
+ generateImage: A,
189
+ toggleTable: U
190
+ }), (t, o) => (d(), f("div", {
191
+ class: "vue-ui-word-cloud",
192
+ ref_key: "wordCloudChart",
193
+ ref: C,
194
+ id: `wordCloud_${S.value}`,
195
+ style: F(`width: 100%; font-family:${e.value.style.fontFamily};background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`)
196
+ }, [
197
+ e.value.style.chart.title.text ? (d(), f("div", {
198
+ key: 0,
199
+ ref_key: "chartTitle",
200
+ ref: W,
201
+ style: F(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:24px`)
202
+ }, [
203
+ L(Se, {
204
+ config: {
205
+ title: {
206
+ ...e.value.style.chart.title
207
+ },
208
+ subtitle: {
209
+ ...e.value.style.chart.title.subtitle
210
+ }
211
+ }
212
+ }, null, 8, ["config"])
213
+ ], 4)) : N("", !0),
214
+ e.value.userOptions.show && y.value ? (d(), X(Me, {
215
+ ref: "details",
216
+ key: `user_option_${D.value}`,
217
+ backgroundColor: e.value.style.chart.backgroundColor,
218
+ color: e.value.style.chart.color,
219
+ isPrinting: b(te),
220
+ isImaging: b(ae),
221
+ uid: S.value,
222
+ hasPdf: e.value.userOptions.buttons.pdf,
223
+ hasXls: e.value.userOptions.buttons.csv,
224
+ hasImg: e.value.userOptions.buttons.img,
225
+ hasTable: e.value.userOptions.buttons.table,
226
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
227
+ isFullscreen: _.value,
228
+ titles: { ...e.value.userOptions.buttonTitles },
229
+ chartElement: C.value,
230
+ onToggleFullscreen: se,
231
+ onGeneratePdf: b(E),
232
+ onGenerateCsv: B,
233
+ onGenerateImage: b(A),
234
+ onToggleTable: U
235
+ }, ge({ _: 2 }, [
236
+ t.$slots.optionPdf ? {
237
+ name: "optionPdf",
238
+ fn: v(() => [
239
+ g(t.$slots, "optionPdf", {}, void 0, !0)
240
+ ]),
241
+ key: "0"
242
+ } : void 0,
243
+ t.$slots.optionCsv ? {
244
+ name: "optionCsv",
245
+ fn: v(() => [
246
+ g(t.$slots, "optionCsv", {}, void 0, !0)
247
+ ]),
248
+ key: "1"
249
+ } : void 0,
250
+ t.$slots.optionImg ? {
251
+ name: "optionImg",
252
+ fn: v(() => [
253
+ g(t.$slots, "optionImg", {}, void 0, !0)
254
+ ]),
255
+ key: "2"
256
+ } : void 0,
257
+ t.$slots.optionTable ? {
258
+ name: "optionTable",
259
+ fn: v(() => [
260
+ g(t.$slots, "optionTable", {}, void 0, !0)
261
+ ]),
262
+ key: "3"
263
+ } : void 0,
264
+ t.$slots.optionFullscreen ? {
265
+ name: "optionFullscreen",
266
+ fn: v(({ toggleFullscreen: a, isFullscreen: s }) => [
267
+ g(t.$slots, "optionFullscreen", pe(be({ toggleFullscreen: a, isFullscreen: s })), void 0, !0)
268
+ ]),
269
+ key: "4"
270
+ } : void 0
271
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : N("", !0),
272
+ y.value ? (d(), f("svg", {
273
+ key: 2,
274
+ class: R({ "vue-data-ui-fullscreen--on": _.value, "vue-data-ui-fulscreen--off": !_.value }),
275
+ xmlns: b(Ne),
276
+ viewBox: `0 0 ${n.value.width <= 0 ? 10 : n.value.width} ${n.value.height <= 0 ? 10 : n.value.height}`,
277
+ style: F(`overflow:visible;background:${e.value.style.chart.backgroundColor};`)
278
+ }, [
279
+ j("g", {
280
+ transform: `translate(${(n.value.width <= 0 ? 10 : n.value.width) / 2}, ${(n.value.height <= 0 ? 10 : n.value.height) / 2})`
281
+ }, [
282
+ (d(!0), f(ye, null, Ce(p.value, (a, s) => (d(), f("g", null, [
283
+ (d(), f("text", {
284
+ fill: a.color,
285
+ "font-weight": e.value.style.chart.words.bold ? "bold" : "normal",
286
+ key: s,
287
+ x: a.x,
288
+ y: a.y,
289
+ "font-size": a.fontSize,
290
+ transform: `translate(${a.width / 2}, ${a.height / 2})`,
291
+ style: F(`animation-delay:${s * e.value.animationDelayMs}ms !important`),
292
+ class: R({ animated: e.value.useCssAnimation }),
293
+ "text-anchor": "middle",
294
+ "dominant-baseline": "middle"
295
+ }, H(a.name), 15, Le))
296
+ ]))), 256))
297
+ ], 8, Ge),
298
+ g(t.$slots, "svg", {
299
+ svg: { height: n.value.height, width: n.value.width }
300
+ }, void 0, !0)
301
+ ], 14, Ue)) : N("", !0),
302
+ y.value ? (d(), X(Ee, {
303
+ key: 3,
304
+ hideDetails: "",
305
+ config: {
306
+ open: x.value.showTable,
307
+ maxHeight: 1e4,
308
+ body: {
309
+ backgroundColor: e.value.style.chart.backgroundColor,
310
+ color: e.value.style.chart.color
311
+ },
312
+ head: {
313
+ backgroundColor: e.value.style.chart.backgroundColor,
314
+ color: e.value.style.chart.color
315
+ }
316
+ }
317
+ }, {
318
+ content: v(() => [
319
+ L(Ae, {
320
+ colNames: $.value.colNames,
321
+ head: $.value.head,
322
+ body: $.value.body,
323
+ config: $.value.config,
324
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
325
+ onClose: o[0] || (o[0] = (a) => x.value.showTable = !1)
326
+ }, {
327
+ th: v(({ th: a }) => [
328
+ j("div", {
329
+ innerHTML: a,
330
+ style: { display: "flex", "align-items": "center" }
331
+ }, null, 8, Xe)
332
+ ]),
333
+ td: v(({ td: a }) => [
334
+ we(H(a.name || a), 1)
335
+ ]),
336
+ _: 1
337
+ }, 8, ["colNames", "head", "body", "config", "title"])
338
+ ]),
339
+ _: 1
340
+ }, 8, ["config"])) : N("", !0)
341
+ ], 12, Be));
342
+ }
343
+ }, tt = /* @__PURE__ */ Ve(Re, [["__scopeId", "data-v-83c65691"]]);
344
+ export {
345
+ tt as default
346
+ };