vue-data-ui 2.3.5 → 2.3.7

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 (139) hide show
  1. package/dist/{Arrow-BSOdhAJO.cjs → Arrow-BZtTM41y.cjs} +1 -1
  2. package/dist/{Arrow-BjDVSrfA.js → Arrow-nwrjVtgP.js} +1 -1
  3. package/dist/{BaseIcon-vmmfWlyR.js → BaseIcon-DLlcdgWI.js} +4 -3
  4. package/dist/{BaseIcon-BoKtpbrI.cjs → BaseIcon-DWx8aSo2.cjs} +1 -1
  5. package/dist/{DataTable-CaB7GIwQ.js → DataTable-BFsn-W_6.js} +2 -2
  6. package/dist/{DataTable-ssrNbONo.cjs → DataTable-BSoyXOFT.cjs} +1 -1
  7. package/dist/{Legend-DHpoRTAE.js → Legend-DThjLfzi.js} +1 -1
  8. package/dist/{Legend-Dl5IYoxK.cjs → Legend-DZhpxKg4.cjs} +1 -1
  9. package/dist/{Shape-CaF4pvOn.cjs → Shape-CoCdB8es.cjs} +1 -1
  10. package/dist/{Shape-CQT4S7N-.js → Shape-DdhpbOB2.js} +1 -1
  11. package/dist/{Slicer-QC8nTm24.cjs → Slicer-Bb7zhtxv.cjs} +1 -1
  12. package/dist/{Slicer-Bdb1BlrC.js → Slicer-CBsGmIKc.js} +1 -1
  13. package/dist/{Title-BNPZwnkp.js → Title-CfofmWzW.js} +1 -1
  14. package/dist/{Title-Cj_xubjI.cjs → Title-Ci74YZxW.cjs} +1 -1
  15. package/dist/{Tooltip-CdJ5hegk.cjs → Tooltip-BNMjZUBc.cjs} +1 -1
  16. package/dist/{Tooltip-ZnJAz6dl.js → Tooltip-cIpD1ChA.js} +1 -1
  17. package/dist/{index-BMCvLyab.js → index-CGb3gF5A.js} +1 -1
  18. package/dist/{index-BkomIE9L.cjs → index-DFXgoR1T.cjs} +1 -1
  19. package/dist/style.css +1 -1
  20. package/dist/types/vue-data-ui.d.cts +1 -1
  21. package/dist/types/vue-data-ui.d.ts +1 -1
  22. package/dist/{useNestedProp-BMxXyPbW.cjs → useNestedProp-CbZUIZc0.cjs} +1 -1
  23. package/dist/{useNestedProp-CkP8xhG_.js → useNestedProp-DCBzUHfz.js} +1 -1
  24. package/dist/{usePrinter-r6uHYEcR.cjs → usePrinter-DoFYRZKM.cjs} +1 -1
  25. package/dist/{usePrinter-BuuBz5JR.js → usePrinter-VlAyPtaS.js} +1 -1
  26. package/dist/{vue-data-ui-Bc5U1cOP.cjs → vue-data-ui-DT5BwtL1.cjs} +1 -1
  27. package/dist/{vue-data-ui-DxeO0iaC.js → vue-data-ui-DkU-TK4x.js} +55 -55
  28. package/dist/vue-data-ui.cjs +1 -1
  29. package/dist/vue-data-ui.js +1 -1
  30. package/dist/{vue-ui-3d-bar-32wM0tiX.js → vue-ui-3d-bar-B2ZdZ5yW.js} +7 -7
  31. package/dist/{vue-ui-3d-bar-CgB0fLQT.cjs → vue-ui-3d-bar-BwdmaNwO.cjs} +1 -1
  32. package/dist/{vue-ui-accordion-CLlVxx3Q.js → vue-ui-accordion-Br7xhAKF.js} +3 -3
  33. package/dist/{vue-ui-accordion-SXsobrUt.cjs → vue-ui-accordion-P9OYffC3.cjs} +1 -1
  34. package/dist/{vue-ui-age-pyramid-DqiwcOIr.cjs → vue-ui-age-pyramid-CJGz5iEy.cjs} +1 -1
  35. package/dist/{vue-ui-age-pyramid-D_CY99xF.js → vue-ui-age-pyramid-D_GP1VkP.js} +8 -8
  36. package/dist/{vue-ui-annotator-DvP-IxDm.js → vue-ui-annotator-BHI5Uicp.js} +1 -1
  37. package/dist/{vue-ui-annotator-mntqd3q_.cjs → vue-ui-annotator-C9I6Zikz.cjs} +1 -1
  38. package/dist/{vue-ui-candlestick-C_TvUQvH.cjs → vue-ui-candlestick-B3Z-Zw-o.cjs} +1 -1
  39. package/dist/{vue-ui-candlestick-C-5u3i-1.js → vue-ui-candlestick-BMz6lY9I.js} +9 -9
  40. package/dist/{vue-ui-carousel-table-CAqhsLVx.js → vue-ui-carousel-table-9W-FPpp4.js} +114 -104
  41. package/dist/vue-ui-carousel-table-ZyIsiWGm.cjs +1 -0
  42. package/dist/{vue-ui-chestnut-DhWlw2MD.cjs → vue-ui-chestnut-C4vJDydB.cjs} +1 -1
  43. package/dist/{vue-ui-chestnut-DylSfYMB.js → vue-ui-chestnut-DikFweqJ.js} +6 -6
  44. package/dist/{vue-ui-cursor-DTYEMgbU.js → vue-ui-cursor-CmWl10Om.js} +2 -2
  45. package/dist/{vue-ui-cursor-B04HJQVl.cjs → vue-ui-cursor-CxvSx8wW.cjs} +1 -1
  46. package/dist/{vue-ui-dashboard-DFIYwP1s.cjs → vue-ui-dashboard-BRZFA0Yv.cjs} +1 -1
  47. package/dist/{vue-ui-dashboard-Bd0-cmSZ.js → vue-ui-dashboard-CqNO4CkA.js} +2 -2
  48. package/dist/{vue-ui-digits-Ced5mBJZ.cjs → vue-ui-digits-B5AQ1wb4.cjs} +1 -1
  49. package/dist/{vue-ui-digits-CW5qNMIk.js → vue-ui-digits-Bq86VtLg.js} +2 -2
  50. package/dist/{vue-ui-donut-EeVmrVJs.js → vue-ui-donut-BSM49MRr.js} +9 -9
  51. package/dist/{vue-ui-donut-evolution-Ct6KAzs-.cjs → vue-ui-donut-evolution-D4vsG4oJ.cjs} +1 -1
  52. package/dist/{vue-ui-donut-evolution-BN08Y2hy.js → vue-ui-donut-evolution-hXH6wndl.js} +9 -9
  53. package/dist/{vue-ui-donut-DIhhgvWp.cjs → vue-ui-donut-fUSFXY5z.cjs} +1 -1
  54. package/dist/{vue-ui-dumbbell-pextarqH.cjs → vue-ui-dumbbell-CSxoMYt4.cjs} +1 -1
  55. package/dist/{vue-ui-dumbbell-BMlxS1Nq.js → vue-ui-dumbbell-DF7resYk.js} +8 -8
  56. package/dist/{vue-ui-flow-CHmkgfyb.js → vue-ui-flow-2Wc505ek.js} +7 -7
  57. package/dist/{vue-ui-flow-BXVsbmyb.cjs → vue-ui-flow-qhWWfhM9.cjs} +1 -1
  58. package/dist/{vue-ui-galaxy-kiVOZOBz.js → vue-ui-galaxy-C1tqFf2k.js} +9 -9
  59. package/dist/{vue-ui-galaxy-D4xyd-J1.cjs → vue-ui-galaxy-DTYcNRMO.cjs} +1 -1
  60. package/dist/{vue-ui-gauge-DPFBsbFj.cjs → vue-ui-gauge-4oL43tii.cjs} +1 -1
  61. package/dist/{vue-ui-gauge-BcO-z97J.js → vue-ui-gauge-qkz3wSir.js} +4 -4
  62. package/dist/{vue-ui-heatmap-DBOKYaJz.cjs → vue-ui-heatmap-B8vDpGuW.cjs} +1 -1
  63. package/dist/{vue-ui-heatmap-DD-Bzddj.js → vue-ui-heatmap-SUwlu7rR.js} +8 -8
  64. package/dist/{vue-ui-kpi-BEgf5yDv.cjs → vue-ui-kpi-Bw-xbRgX.cjs} +1 -1
  65. package/dist/{vue-ui-kpi-BS0o7zb9.js → vue-ui-kpi-jQgfkbVw.js} +2 -2
  66. package/dist/{vue-ui-mini-loader-DJEvG6ju.js → vue-ui-mini-loader-5YEExcv8.js} +2 -2
  67. package/dist/{vue-ui-mini-loader-Bm5EJxtG.cjs → vue-ui-mini-loader-DT-Ww_uE.cjs} +1 -1
  68. package/dist/{vue-ui-molecule-DzUqcaxd.cjs → vue-ui-molecule-DA0NQGMP.cjs} +1 -1
  69. package/dist/{vue-ui-molecule-DdwnFEBJ.js → vue-ui-molecule-sddRGEOr.js} +9 -9
  70. package/dist/{vue-ui-mood-radar-B9Gczs_Z.js → vue-ui-mood-radar-BlwtCy7m.js} +9 -9
  71. package/dist/{vue-ui-mood-radar-DbB7m4Ku.cjs → vue-ui-mood-radar-CUfTRsXf.cjs} +1 -1
  72. package/dist/{vue-ui-nested-donuts-CVQ1CaXo.js → vue-ui-nested-donuts-BYDoEtqK.js} +9 -9
  73. package/dist/{vue-ui-nested-donuts-BSINf8hd.cjs → vue-ui-nested-donuts-CyhCktfb.cjs} +1 -1
  74. package/dist/{vue-ui-onion-Ut75t7hB.js → vue-ui-onion-BiS7G_xb.js} +9 -9
  75. package/dist/{vue-ui-onion-D3-6Tv4u.cjs → vue-ui-onion-DKjJWVtm.cjs} +1 -1
  76. package/dist/{vue-ui-parallel-coordinate-plot-Bjo09ZTX.js → vue-ui-parallel-coordinate-plot-BcZOH5MA.js} +10 -10
  77. package/dist/{vue-ui-parallel-coordinate-plot-CJGkoIgN.cjs → vue-ui-parallel-coordinate-plot-CB5WohUW.cjs} +1 -1
  78. package/dist/{vue-ui-quadrant-Du9PKvlO.js → vue-ui-quadrant-BX2Z_BiG.js} +10 -10
  79. package/dist/{vue-ui-quadrant-CzCvejGn.cjs → vue-ui-quadrant-aRRuJrr1.cjs} +1 -1
  80. package/dist/{vue-ui-quick-chart-BsxsPbjz.cjs → vue-ui-quick-chart-BSov5yuk.cjs} +1 -1
  81. package/dist/{vue-ui-quick-chart-u0cPmD3q.js → vue-ui-quick-chart-aCDLYVC0.js} +6 -6
  82. package/dist/{vue-ui-radar-DIpCrj1h.cjs → vue-ui-radar-B3DWzSx8.cjs} +1 -1
  83. package/dist/{vue-ui-radar-CBrpuE5r.js → vue-ui-radar-DGhNZx7E.js} +10 -10
  84. package/dist/{vue-ui-rating-D8fJC8Yt.cjs → vue-ui-rating-DI2herA3.cjs} +1 -1
  85. package/dist/{vue-ui-rating-CaeGGlCw.js → vue-ui-rating-QJp1mzIX.js} +2 -2
  86. package/dist/{vue-ui-relation-circle-5DNf880s.js → vue-ui-relation-circle-DRKymwCT.js} +5 -5
  87. package/dist/{vue-ui-relation-circle-Ky3nPk6S.cjs → vue-ui-relation-circle-Dgk6ILFm.cjs} +1 -1
  88. package/dist/{vue-ui-rings-IE3IdNRF.js → vue-ui-rings-Dc_Xgav-.js} +9 -9
  89. package/dist/{vue-ui-rings-CffZ4T2S.cjs → vue-ui-rings-m9Gm4w5-.cjs} +1 -1
  90. package/dist/{vue-ui-scatter-C4GCZm0V.js → vue-ui-scatter-3p_U1RQz.js} +10 -10
  91. package/dist/{vue-ui-scatter-TsX5dW9l.cjs → vue-ui-scatter-CwNnmbpv.cjs} +1 -1
  92. package/dist/{vue-ui-screenshot-Bzpg6yof.cjs → vue-ui-screenshot-Bdg6KSR_.cjs} +1 -1
  93. package/dist/{vue-ui-screenshot-Bl3oooKI.js → vue-ui-screenshot-DjN1leGW.js} +1 -1
  94. package/dist/{vue-ui-skeleton-BisWX1sO.js → vue-ui-skeleton-B0udzFdQ.js} +2 -2
  95. package/dist/{vue-ui-skeleton-JmGp11-u.cjs → vue-ui-skeleton-CmABeGyu.cjs} +1 -1
  96. package/dist/{vue-ui-smiley-Sth2pqG1.js → vue-ui-smiley-BJdbZUnl.js} +2 -2
  97. package/dist/{vue-ui-smiley-BhSrt9f-.cjs → vue-ui-smiley-CIMwndRh.cjs} +1 -1
  98. package/dist/{vue-ui-spark-trend-C8NSz4l8.cjs → vue-ui-spark-trend-BiqhJCi0.cjs} +1 -1
  99. package/dist/{vue-ui-spark-trend-DAqO0TW2.js → vue-ui-spark-trend-Bs8wWJc2.js} +4 -4
  100. package/dist/{vue-ui-sparkbar-hL1Q6ObK.cjs → vue-ui-sparkbar-C2YT0NxS.cjs} +1 -1
  101. package/dist/{vue-ui-sparkbar-B0zX7NU7.js → vue-ui-sparkbar-CDi8i8_Q.js} +3 -3
  102. package/dist/{vue-ui-sparkgauge-CWR8zJnU.js → vue-ui-sparkgauge-11o7Kgbf.js} +3 -3
  103. package/dist/{vue-ui-sparkgauge-tbVqaLCK.cjs → vue-ui-sparkgauge-D7sVelKC.cjs} +1 -1
  104. package/dist/{vue-ui-sparkhistogram-Dv-lml4g.cjs → vue-ui-sparkhistogram-C6nnvqeP.cjs} +1 -1
  105. package/dist/{vue-ui-sparkhistogram-DxqCtDpw.js → vue-ui-sparkhistogram-DW4yBl5Z.js} +4 -4
  106. package/dist/{vue-ui-sparkline-BpL1jn7F.js → vue-ui-sparkline-B-jMIILk.js} +3 -3
  107. package/dist/{vue-ui-sparkline-B6pvaBY_.cjs → vue-ui-sparkline-Bnc9Cv0E.cjs} +1 -1
  108. package/dist/{vue-ui-sparkstackbar-CQ2TEi4p.cjs → vue-ui-sparkstackbar-CVyS6viy.cjs} +1 -1
  109. package/dist/{vue-ui-sparkstackbar-BzbuBNIV.js → vue-ui-sparkstackbar-cUpn5wUS.js} +3 -3
  110. package/dist/{vue-ui-strip-plot-DCcbD6UE.js → vue-ui-strip-plot-CpfV9-gw.js} +9 -9
  111. package/dist/{vue-ui-strip-plot-DCC6F4VM.cjs → vue-ui-strip-plot-Dc1Y7Lfz.cjs} +1 -1
  112. package/dist/{vue-ui-table-CseaFWgX.cjs → vue-ui-table-BHENqbW6.cjs} +1 -1
  113. package/dist/{vue-ui-table-CFqIWfxl.js → vue-ui-table-CaCOIekW.js} +1 -1
  114. package/dist/{vue-ui-table-heatmap-Bwut-V1D.cjs → vue-ui-table-heatmap-r9XRz_dD.cjs} +1 -1
  115. package/dist/{vue-ui-table-heatmap-Bz8KYDxr.js → vue-ui-table-heatmap-s7r2sGYk.js} +4 -4
  116. package/dist/{vue-ui-table-sparkline-z29ND2lq.js → vue-ui-table-sparkline-BS7VAPDv.js} +5 -5
  117. package/dist/{vue-ui-table-sparkline-CJBU3y8-.cjs → vue-ui-table-sparkline-Dk_FjirH.cjs} +1 -1
  118. package/dist/{vue-ui-thermometer-BNAITzJa.js → vue-ui-thermometer-BQLqVj-X.js} +5 -5
  119. package/dist/{vue-ui-thermometer-DM2IKhqN.cjs → vue-ui-thermometer-DU49ev3a.cjs} +1 -1
  120. package/dist/{vue-ui-timer-DLfXuW8T.cjs → vue-ui-timer-9QQVkkbc.cjs} +1 -1
  121. package/dist/{vue-ui-timer-DV6lQVHU.js → vue-ui-timer-DGM9AHJ5.js} +4 -4
  122. package/dist/{vue-ui-tiremarks-WyQPg7yo.js → vue-ui-tiremarks-Bxop3uDk.js} +5 -5
  123. package/dist/{vue-ui-tiremarks-B1bd1jPf.cjs → vue-ui-tiremarks-CJ9xiM-i.cjs} +1 -1
  124. package/dist/{vue-ui-treemap-BZGmoDHb.cjs → vue-ui-treemap-BOEC1m08.cjs} +1 -1
  125. package/dist/{vue-ui-treemap-DKmBhzV-.js → vue-ui-treemap-CQ9rJnkn.js} +9 -9
  126. package/dist/{vue-ui-vertical-bar-Bi-0rRN3.cjs → vue-ui-vertical-bar-BBHN-hhJ.cjs} +1 -1
  127. package/dist/{vue-ui-vertical-bar-C-ySfrhJ.js → vue-ui-vertical-bar-CwcIKeM-.js} +9 -9
  128. package/dist/{vue-ui-waffle-VLYkR-YZ.cjs → vue-ui-waffle-Bg_hB8yK.cjs} +1 -1
  129. package/dist/{vue-ui-waffle-CGRWu-da.js → vue-ui-waffle-DB3cEJx6.js} +9 -9
  130. package/dist/{vue-ui-wheel-Pj9OPk9f.js → vue-ui-wheel-CF6psk6N.js} +5 -5
  131. package/dist/{vue-ui-wheel-D2q5vy5V.cjs → vue-ui-wheel-DpTCJpZn.cjs} +1 -1
  132. package/dist/{vue-ui-word-cloud-Ba4BjatU.cjs → vue-ui-word-cloud-DVu3gTbu.cjs} +1 -1
  133. package/dist/{vue-ui-word-cloud-8Vr-jo1p.js → vue-ui-word-cloud-QlpZWR2c.js} +6 -6
  134. package/dist/{vue-ui-xy-qToggEfh.js → vue-ui-xy-CpcGvBUq.js} +12 -12
  135. package/dist/{vue-ui-xy-C4QW5Lfl.cjs → vue-ui-xy-DFiOxWGU.cjs} +1 -1
  136. package/dist/{vue-ui-xy-canvas-DnLWrf0e.js → vue-ui-xy-canvas-CBlzHZ_m.js} +10 -10
  137. package/dist/{vue-ui-xy-canvas-Be-Da_0x.cjs → vue-ui-xy-canvas-DR_8n36F.cjs} +1 -1
  138. package/package.json +1 -1
  139. package/dist/vue-ui-carousel-table-BCePqkuz.cjs +0 -1
@@ -1 +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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DFXgoR1T.cjs"),Z=require("./useResponsive-B3TrDDIG.cjs"),me=require("./Title-Ci74YZxW.cjs"),ee=require("./usePrinter-DoFYRZKM.cjs"),be=require("./Tooltip-BNMjZUBc.cjs"),ke=require("./DataTable-BSoyXOFT.cjs"),we=require("./Legend-DZhpxKg4.cjs"),xe=require("./vue-ui-skeleton-CmABeGyu.cjs"),Ce=require("./vue-ui-accordion-P9OYffC3.cjs"),te=require("./useNestedProp-CbZUIZc0.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;
@@ -1,14 +1,14 @@
1
1
  import { computed as c, ref as v, onMounted as Ve, onBeforeUnmount as Me, openBlock as s, createElementBlock as n, normalizeClass as ge, normalizeStyle as U, createVNode as te, createCommentVNode as w, createBlock as X, unref as f, createSlots as Be, withCtx as y, renderSlot as g, normalizeProps as Y, guardReactiveProps as J, createElementVNode as m, Fragment as $, renderList as M, toDisplayString as T, createTextVNode as me, nextTick as De, pushScopeId as Ee, popScopeId as Ge } from "vue";
2
- import { u as Re, c as Ue, t as je, a as We, p as O, o as He, e as le, g as qe, b as Xe, d as Ye, f as I, X as Je, s as Ke, r as Qe, C as Ze, E as et, v as tt, w as lt, n as at, q as ot } from "./index-BMCvLyab.js";
2
+ import { u as Re, c as Ue, t as je, a as We, p as O, o as He, e as le, g as qe, b as Xe, d as Ye, f as I, X as Je, s as Ke, r as Qe, C as Ze, E as et, v as tt, w as lt, n as at, q as ot } from "./index-CGb3gF5A.js";
3
3
  import { t as ut, u as rt } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as st } from "./Title-BNPZwnkp.js";
5
- import { u as nt, U as it } from "./usePrinter-BuuBz5JR.js";
6
- import { _ as ct } from "./Tooltip-ZnJAz6dl.js";
7
- import { D as vt } from "./DataTable-CaB7GIwQ.js";
8
- import { L as dt } from "./Legend-DHpoRTAE.js";
9
- import ht from "./vue-ui-skeleton-BisWX1sO.js";
10
- import pt from "./vue-ui-accordion-CLlVxx3Q.js";
11
- import { u as be } from "./useNestedProp-CkP8xhG_.js";
4
+ import { _ as st } from "./Title-CfofmWzW.js";
5
+ import { u as nt, U as it } from "./usePrinter-VlAyPtaS.js";
6
+ import { _ as ct } from "./Tooltip-cIpD1ChA.js";
7
+ import { D as vt } from "./DataTable-BFsn-W_6.js";
8
+ import { L as dt } from "./Legend-DThjLfzi.js";
9
+ import ht from "./vue-ui-skeleton-B0udzFdQ.js";
10
+ import pt from "./vue-ui-accordion-Br7xhAKF.js";
11
+ import { u as be } from "./useNestedProp-DCBzUHfz.js";
12
12
  import { _ as ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = ["xmlns", "viewBox"], mt = ["id"], bt = ["stop-color"], wt = ["stop-color"], xt = ["id"], kt = /* @__PURE__ */ we(() => /* @__PURE__ */ m("feGaussianBlur", {
14
14
  in: "SourceGraphic",
@@ -1,10 +1,10 @@
1
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";
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-CGb3gF5A.js";
3
+ import { _ as ue } from "./Title-CfofmWzW.js";
4
+ import { u as ie, U as ce } from "./usePrinter-VlAyPtaS.js";
5
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";
6
+ import de from "./vue-ui-skeleton-B0udzFdQ.js";
7
+ import { u as A } from "./useNestedProp-DCBzUHfz.js";
8
8
  import { _ as ye } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
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
10
  __name: "vue-ui-wheel",
@@ -1 +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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-DFXgoR1T.cjs"),q=require("./Title-Ci74YZxW.cjs"),x=require("./usePrinter-DoFYRZKM.cjs"),_=require("./useResponsive-B3TrDDIG.cjs"),T=require("./vue-ui-skeleton-CmABeGyu.cjs"),B=require("./useNestedProp-CbZUIZc0.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;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BkomIE9L.cjs"),Z=require("./Title-Cj_xubjI.cjs"),E=require("./usePrinter-r6uHYEcR.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),ee=require("./vue-ui-accordion-SXsobrUt.cjs"),te=require("./DataTable-ssrNbONo.cjs"),M=require("./useNestedProp-BMxXyPbW.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=["id"],ae=["xmlns","viewBox"],ne=["transform"],se=["fill","font-weight","x","y","font-size","transform"],re=["innerHTML"],ue={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(D,{expose:W}){const c=D,{vue_ui_word_cloud:q}=s.useConfig(),f=e.computed({get(){return!!c.dataset&&c.dataset.length},set(o){return o}}),x=e.ref(typeof c.dataset=="string"?s.createWordCloudDatasetFromPlainText(c.dataset):c.dataset),$=e.ref(s.createUid()),P=e.ref(0),g=e.ref(null),S=e.ref(null),t=e.computed(()=>{const o=M.useNestedProp({userConfig:c.config,defaultConfig:q});return o.theme?{...M.useNestedProp({userConfig:s.themes.vue_ui_word_cloud[o.theme]||c.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}),r=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),p=e.ref(null);e.onMounted(()=>{if(s.objectIsEmpty(c.dataset)?s.error({componentName:"VueUiWordCloud",type:"dataset"}):x.value.forEach((o,a)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{f.value=!1,s.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive){const o=V.throttle(()=>{const{width:a,height:l}=V.useResponsive({chart:g.value,title:t.value.style.chart.title.text?S.value:null});r.value.width=a,r.value.height=l,e.nextTick(F)});p.value=new ResizeObserver(o),p.value.observe(g.value.parentNode)}}),e.onBeforeUnmount(()=>{p.value&&p.value.disconnect()});const{isPrinting:A,isImaging:U,generatePdf:_,generateImage:z}=E.usePrinter({elementId:`wordCloud_${$.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),y=e.ref({showTable:t.value.table.show});function G(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function L(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function R(o,a,l){const u=[],n={x:-a/2,y:-l/2,width:a,height:l},i=0,v=0;return o.forEach(h=>{let T=!1;for(let k=0;k<Math.max(a,l)/2&&!T;k+=t.value.style.chart.words.packingWeight)for(let N=0;N<360&&!T;N+=t.value.style.chart.words.packingWeight){const O=N*Math.PI/180,H=i+k*Math.cos(O)-h.width/2,Y=v+k*Math.sin(O)-h.height/2,d={...h,x:H,y:Y},J=d.x>=n.x&&d.y>=n.y&&d.x+d.width<=n.x+n.width&&d.y+d.height<=n.y+n.height,K=u.some(Q=>L(d,Q));J&&!K&&(u.push(d),T=!0)}}),u}const m=e.ref([]);e.watch(()=>c.dataset,F,{immediate:!0});function F(){const o=x.value.map(n=>n.value),a=Math.max(...o),l=Math.min(...o),u=x.value.map((n,i)=>{const v=(n.value-l)/(a-l)*(r.value.maxFontSize-r.value.minFontSize)+r.value.minFontSize,h=G(n.name,v);return{...n,id:s.createUid(),fontSize:v,width:h.width,height:h.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[i]||t.value.customPalette[i%t.value.customPalette.length]||s.palette[i]||s.palette[i%s.palette.length]:t.value.style.chart.words.color}});m.value=R(u,r.value.width,r.value.height).sort((n,i)=>i.fontSize-n.fontSize)}const b=e.computed(()=>{const o=m.value.map(l=>({name:l.name,color:l.color})),a=m.value.map(l=>l.value);return{head:o,body:a}});function B(){e.nextTick(()=>{const o=b.value.head.map((u,n)=>[[u.name],[b.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const C=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=b.value.head.map((n,i)=>{const v=s.dataLabel({p:t.value.table.td.prefix,v:b.value.body[i],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},v]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}}),w=e.ref(!1);function X(o){w.value=o,P.value+=1}function j(){return m.value}function I(){y.value.showTable=!y.value.showTable}return W({getData:j,generateCsv:B,generatePdf:_,generateImage:z,toggleTable:I}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:g,id:`wordCloud_${$.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};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:S,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(Z._sfc_main,{config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(E.UserOptions,{ref:"details",key:`user_option_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(U),uid:$.value,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,isFullscreen:w.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,onToggleFullscreen:X,onGeneratePdf:e.unref(_),onGenerateCsv:B,onGenerateImage:e.unref(z),onToggleTable:I},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};`)},[e.createElementVNode("g",{transform:`translate(${(r.value.width<=0?10:r.value.width)/2}, ${(r.value.height<=0?10:r.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,u)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:u,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,style:e.normalizeStyle(`animation-delay:${u*t.value.animationDelayMs}ms !important`),class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":"middle","dominant-baseline":"middle"},e.toDisplayString(l.name),15,se))]))),256))],8,ne),e.renderSlot(o.$slots,"svg",{svg:{height:r.value.height,width:r.value.width}},void 0,!0)],14,ae)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createBlock(ee.default,{key:3,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(te.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.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[0]||(a[0]=l=>y.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,re)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],12,le))}},ie=oe._export_sfc(ue,[["__scopeId","data-v-83c65691"]]);exports.default=ie;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DFXgoR1T.cjs"),Z=require("./Title-Ci74YZxW.cjs"),E=require("./usePrinter-DoFYRZKM.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),ee=require("./vue-ui-accordion-P9OYffC3.cjs"),te=require("./DataTable-BSoyXOFT.cjs"),M=require("./useNestedProp-CbZUIZc0.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=["id"],ae=["xmlns","viewBox"],ne=["transform"],se=["fill","font-weight","x","y","font-size","transform"],re=["innerHTML"],ue={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(D,{expose:W}){const c=D,{vue_ui_word_cloud:q}=s.useConfig(),f=e.computed({get(){return!!c.dataset&&c.dataset.length},set(o){return o}}),x=e.ref(typeof c.dataset=="string"?s.createWordCloudDatasetFromPlainText(c.dataset):c.dataset),$=e.ref(s.createUid()),P=e.ref(0),g=e.ref(null),S=e.ref(null),t=e.computed(()=>{const o=M.useNestedProp({userConfig:c.config,defaultConfig:q});return o.theme?{...M.useNestedProp({userConfig:s.themes.vue_ui_word_cloud[o.theme]||c.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}),r=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),p=e.ref(null);e.onMounted(()=>{if(s.objectIsEmpty(c.dataset)?s.error({componentName:"VueUiWordCloud",type:"dataset"}):x.value.forEach((o,a)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{f.value=!1,s.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive){const o=V.throttle(()=>{const{width:a,height:l}=V.useResponsive({chart:g.value,title:t.value.style.chart.title.text?S.value:null});r.value.width=a,r.value.height=l,e.nextTick(F)});p.value=new ResizeObserver(o),p.value.observe(g.value.parentNode)}}),e.onBeforeUnmount(()=>{p.value&&p.value.disconnect()});const{isPrinting:A,isImaging:U,generatePdf:_,generateImage:z}=E.usePrinter({elementId:`wordCloud_${$.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),y=e.ref({showTable:t.value.table.show});function G(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function L(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function R(o,a,l){const u=[],n={x:-a/2,y:-l/2,width:a,height:l},i=0,v=0;return o.forEach(h=>{let T=!1;for(let k=0;k<Math.max(a,l)/2&&!T;k+=t.value.style.chart.words.packingWeight)for(let N=0;N<360&&!T;N+=t.value.style.chart.words.packingWeight){const O=N*Math.PI/180,H=i+k*Math.cos(O)-h.width/2,Y=v+k*Math.sin(O)-h.height/2,d={...h,x:H,y:Y},J=d.x>=n.x&&d.y>=n.y&&d.x+d.width<=n.x+n.width&&d.y+d.height<=n.y+n.height,K=u.some(Q=>L(d,Q));J&&!K&&(u.push(d),T=!0)}}),u}const m=e.ref([]);e.watch(()=>c.dataset,F,{immediate:!0});function F(){const o=x.value.map(n=>n.value),a=Math.max(...o),l=Math.min(...o),u=x.value.map((n,i)=>{const v=(n.value-l)/(a-l)*(r.value.maxFontSize-r.value.minFontSize)+r.value.minFontSize,h=G(n.name,v);return{...n,id:s.createUid(),fontSize:v,width:h.width,height:h.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[i]||t.value.customPalette[i%t.value.customPalette.length]||s.palette[i]||s.palette[i%s.palette.length]:t.value.style.chart.words.color}});m.value=R(u,r.value.width,r.value.height).sort((n,i)=>i.fontSize-n.fontSize)}const b=e.computed(()=>{const o=m.value.map(l=>({name:l.name,color:l.color})),a=m.value.map(l=>l.value);return{head:o,body:a}});function B(){e.nextTick(()=>{const o=b.value.head.map((u,n)=>[[u.name],[b.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const C=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=b.value.head.map((n,i)=>{const v=s.dataLabel({p:t.value.table.td.prefix,v:b.value.body[i],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},v]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}}),w=e.ref(!1);function X(o){w.value=o,P.value+=1}function j(){return m.value}function I(){y.value.showTable=!y.value.showTable}return W({getData:j,generateCsv:B,generatePdf:_,generateImage:z,toggleTable:I}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:g,id:`wordCloud_${$.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};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:S,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(Z._sfc_main,{config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(E.UserOptions,{ref:"details",key:`user_option_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(U),uid:$.value,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,isFullscreen:w.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,onToggleFullscreen:X,onGeneratePdf:e.unref(_),onGenerateCsv:B,onGenerateImage:e.unref(z),onToggleTable:I},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};`)},[e.createElementVNode("g",{transform:`translate(${(r.value.width<=0?10:r.value.width)/2}, ${(r.value.height<=0?10:r.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,u)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:u,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,style:e.normalizeStyle(`animation-delay:${u*t.value.animationDelayMs}ms !important`),class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":"middle","dominant-baseline":"middle"},e.toDisplayString(l.name),15,se))]))),256))],8,ne),e.renderSlot(o.$slots,"svg",{svg:{height:r.value.height,width:r.value.width}},void 0,!0)],14,ae)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createBlock(ee.default,{key:3,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(te.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.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[0]||(a[0]=l=>y.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,re)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],12,le))}},ie=oe._export_sfc(ue,[["__scopeId","data-v-83c65691"]]);exports.default=ie;
@@ -1,11 +1,11 @@
1
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";
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-CGb3gF5A.js";
3
+ import { _ as Se } from "./Title-CfofmWzW.js";
4
+ import { u as Oe, U as Me } from "./usePrinter-VlAyPtaS.js";
5
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";
6
+ import Ee from "./vue-ui-accordion-Br7xhAKF.js";
7
+ import { D as Ae } from "./DataTable-BFsn-W_6.js";
8
+ import { u as K } from "./useNestedProp-DCBzUHfz.js";
9
9
  import { _ as Ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  const Be = ["id"], Ue = ["xmlns", "viewBox"], Ge = ["transform"], Le = ["fill", "font-weight", "x", "y", "font-size", "transform"], Xe = ["innerHTML"], Re = {
11
11
  __name: "vue-ui-word-cloud",
@@ -1,16 +1,16 @@
1
1
  import { p as Z } from "./pdf-97UbtKC2.js";
2
- import { U as J, s as K } from "./usePrinter-BuuBz5JR.js";
3
- import { c as U, a as Q, t as j, r as $, p as ee, u as te, O as X, I as M, E as le, T as ae, z as re, U as ie, L as se, V as oe, x as ne, s as ce, d as he, y as ue, b as de, q as ge, n as fe, C as be, R as Ie, W as me, f as Ne, v as _e, w as Fe, e as xe, o as ye, Y as Ae, B as Se } from "./index-BMCvLyab.js";
4
- import { D as Le } from "./DataTable-CaB7GIwQ.js";
5
- import { _ as Ce } from "./Title-BNPZwnkp.js";
6
- import { _ as ke, u as we } from "./Tooltip-ZnJAz6dl.js";
7
- import { _ as Oe } from "./Shape-CQT4S7N-.js";
8
- import ve from "./BaseIcon-vmmfWlyR.js";
9
- import Ge from "./vue-ui-table-sparkline-z29ND2lq.js";
10
- import ze from "./vue-ui-skeleton-BisWX1sO.js";
11
- import { S as pe } from "./Slicer-Bdb1BlrC.js";
12
- import Te from "./vue-ui-accordion-CLlVxx3Q.js";
13
- import { u as q } from "./useNestedProp-CkP8xhG_.js";
2
+ import { U as J, s as K } from "./usePrinter-VlAyPtaS.js";
3
+ import { c as U, a as Q, t as j, r as $, p as ee, u as te, O as X, I as M, E as le, T as ae, z as re, U as ie, L as se, V as oe, x as ne, s as ce, d as he, y as ue, b as de, q as ge, n as fe, C as be, R as Ie, W as me, f as Ne, v as _e, w as Fe, e as xe, o as ye, Y as Ae, B as Se } from "./index-CGb3gF5A.js";
4
+ import { D as Le } from "./DataTable-BFsn-W_6.js";
5
+ import { _ as Ce } from "./Title-CfofmWzW.js";
6
+ import { _ as ke, u as we } from "./Tooltip-cIpD1ChA.js";
7
+ import { _ as Oe } from "./Shape-DdhpbOB2.js";
8
+ import ve from "./BaseIcon-DLlcdgWI.js";
9
+ import Ge from "./vue-ui-table-sparkline-BS7VAPDv.js";
10
+ import ze from "./vue-ui-skeleton-B0udzFdQ.js";
11
+ import { S as pe } from "./Slicer-CBsGmIKc.js";
12
+ import Te from "./vue-ui-accordion-Br7xhAKF.js";
13
+ import { u as q } from "./useNestedProp-DCBzUHfz.js";
14
14
  import { resolveComponent as P, openBlock as r, createElementBlock as i, normalizeClass as T, normalizeStyle as S, createVNode as W, createCommentVNode as c, createBlock as V, createSlots as Me, withCtx as z, renderSlot as G, normalizeProps as Y, guardReactiveProps as E, createElementVNode as d, Fragment as I, renderList as m, toDisplayString as C, withDirectives as Pe, vModelCheckbox as Ve, createTextVNode as Re } from "vue";
15
15
  import { _ as De } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
16
  const He = U(), Be = {