vue-data-ui 2.3.47 → 2.3.49

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 (146) hide show
  1. package/dist/{Arrow-THOuTDcq.js → Arrow-Bo8pfwKs.js} +1 -1
  2. package/dist/{Arrow-Bj64dVl2.cjs → Arrow-iqIdxIKZ.cjs} +1 -1
  3. package/dist/{BaseIcon-Lz2AkAUF.js → BaseIcon-BoVYVkUT.js} +1 -1
  4. package/dist/{BaseIcon-CAlmCZtL.cjs → BaseIcon-DuVD-1qH.cjs} +1 -1
  5. package/dist/{DataTable-E_zoBxXZ.cjs → DataTable-CMF1l-gL.cjs} +1 -1
  6. package/dist/{DataTable-Cg9dMxHZ.js → DataTable-Dy0vFXS7.js} +2 -2
  7. package/dist/{Legend-DKGyWu7I.js → Legend-BbSR193q.js} +1 -1
  8. package/dist/{Legend-L_Enr1Hx.cjs → Legend-C3LgyVKP.cjs} +1 -1
  9. package/dist/{Shape-npSEDLuX.js → Shape-B5VTXCQH.js} +1 -1
  10. package/dist/{Shape-BLiPCHkv.cjs → Shape-BNlNwrBB.cjs} +1 -1
  11. package/dist/Slicer-CIqhDVuv.cjs +1 -0
  12. package/dist/Slicer-D62jXLRQ.js +257 -0
  13. package/dist/{Title-C0_PhO2u.js → Title-0px6u9U5.js} +1 -1
  14. package/dist/{Title-DSPpszvp.cjs → Title-CSRD5z1r.cjs} +1 -1
  15. package/dist/{Tooltip-CgSI_niS.cjs → Tooltip-DFpYO4rz.cjs} +1 -1
  16. package/dist/{Tooltip-dfMcr3Yl.js → Tooltip-TTopnCsK.js} +1 -1
  17. package/dist/{index-ChMHOLEV.js → index-8Lp8V0TB.js} +561 -552
  18. package/dist/index-De6Dj52h.cjs +4 -0
  19. package/dist/style.css +1 -1
  20. package/dist/types/vue-data-ui.d.cts +9 -0
  21. package/dist/types/vue-data-ui.d.ts +9 -0
  22. package/dist/{useNestedProp-DFwnYdme.js → useNestedProp-DE-a5lMx.js} +1 -1
  23. package/dist/{useNestedProp-BH5s4SOa.cjs → useNestedProp-Vjg1xsU_.cjs} +1 -1
  24. package/dist/{usePrinter-DUD-LDLx.cjs → usePrinter-SLYneJmG.cjs} +1 -1
  25. package/dist/{usePrinter-BW4S0cF1.js → usePrinter-cCBJ71Cc.js} +1 -1
  26. package/dist/{vue-data-ui-D0OBzNWS.cjs → vue-data-ui-B1ngLIqD.cjs} +1 -1
  27. package/dist/{vue-data-ui-CbuAnIFO.js → vue-data-ui-pmpX1nQY.js} +57 -57
  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-B9L0Q6d9.cjs → vue-ui-3d-bar-8yOSr9F5.cjs} +1 -1
  31. package/dist/{vue-ui-3d-bar-FHiGe0fx.js → vue-ui-3d-bar-DcoFVkRG.js} +7 -7
  32. package/dist/{vue-ui-accordion-Bukh98Pi.js → vue-ui-accordion-BQfLl7n5.js} +3 -3
  33. package/dist/{vue-ui-accordion-ZPhdh-C7.cjs → vue-ui-accordion-CiSEQOBc.cjs} +1 -1
  34. package/dist/{vue-ui-age-pyramid-CfKlnJ-N.cjs → vue-ui-age-pyramid-BRr6sDTU.cjs} +1 -1
  35. package/dist/{vue-ui-age-pyramid-DLBZkGqa.js → vue-ui-age-pyramid-Cyzoxsd_.js} +8 -8
  36. package/dist/{vue-ui-annotator-DwJ8pgXD.cjs → vue-ui-annotator-60JYTNTN.cjs} +1 -1
  37. package/dist/{vue-ui-annotator-sEd3t3Xa.js → vue-ui-annotator-DkkEj4IE.js} +1 -1
  38. package/dist/{vue-ui-candlestick-DGAu46FK.js → vue-ui-candlestick-CDLGf1AM.js} +9 -9
  39. package/dist/{vue-ui-candlestick-CEgbkXwC.cjs → vue-ui-candlestick-D7IRuRY-.cjs} +1 -1
  40. package/dist/{vue-ui-carousel-table-DziSeBtT.js → vue-ui-carousel-table-CGqR-L66.js} +4 -4
  41. package/dist/{vue-ui-carousel-table-BZRMnoU1.cjs → vue-ui-carousel-table-dITvFJuB.cjs} +1 -1
  42. package/dist/{vue-ui-chestnut-iLTYa9Xl.js → vue-ui-chestnut-BGLp2adQ.js} +6 -6
  43. package/dist/{vue-ui-chestnut-DAaMh6sq.cjs → vue-ui-chestnut-x6ysM7Re.cjs} +1 -1
  44. package/dist/{vue-ui-cursor-D5XYd9sC.cjs → vue-ui-cursor-C5gPJbwq.cjs} +1 -1
  45. package/dist/{vue-ui-cursor-DUwUhpoT.js → vue-ui-cursor-X_1-s3ik.js} +2 -2
  46. package/dist/{vue-ui-dashboard-DyB_oaXE.cjs → vue-ui-dashboard-Cgtk8oJP.cjs} +1 -1
  47. package/dist/{vue-ui-dashboard-DiXf1UFz.js → vue-ui-dashboard-zfHS3YDI.js} +2 -2
  48. package/dist/{vue-ui-digits-RUrqXG5U.js → vue-ui-digits-C6o6diGb.js} +2 -2
  49. package/dist/{vue-ui-digits-DVwp3Vzr.cjs → vue-ui-digits-DJL1XNX-.cjs} +1 -1
  50. package/dist/{vue-ui-donut-CMT341XH.cjs → vue-ui-donut-BwdyNBGR.cjs} +1 -1
  51. package/dist/{vue-ui-donut-CIo7evf6.js → vue-ui-donut-Do84LyRn.js} +9 -9
  52. package/dist/{vue-ui-donut-evolution-BTw0E5sZ.cjs → vue-ui-donut-evolution-CIjVTIAJ.cjs} +1 -1
  53. package/dist/{vue-ui-donut-evolution-DpflCS73.js → vue-ui-donut-evolution-DQnRpcIw.js} +9 -9
  54. package/dist/{vue-ui-dumbbell-BgZEQGlE.js → vue-ui-dumbbell-B71pIx5Z.js} +8 -8
  55. package/dist/{vue-ui-dumbbell-UGicuItz.cjs → vue-ui-dumbbell-D_Bvl_1q.cjs} +1 -1
  56. package/dist/{vue-ui-flow-BqK29554.js → vue-ui-flow-BFXzVNCo.js} +7 -7
  57. package/dist/{vue-ui-flow-BfouRr14.cjs → vue-ui-flow-DpFcTi7P.cjs} +1 -1
  58. package/dist/{vue-ui-galaxy-DgIe6MYv.cjs → vue-ui-galaxy-CI546a3O.cjs} +1 -1
  59. package/dist/{vue-ui-galaxy-CuE0gjDn.js → vue-ui-galaxy-DC0LoWFu.js} +9 -9
  60. package/dist/{vue-ui-gauge-BKi2QGVX.cjs → vue-ui-gauge-COVSZG36.cjs} +1 -1
  61. package/dist/{vue-ui-gauge-CcuW6li6.js → vue-ui-gauge-Chz7KDBu.js} +5 -5
  62. package/dist/{vue-ui-gizmo-B9LHgK5x.cjs → vue-ui-gizmo-DuSQv_6q.cjs} +1 -1
  63. package/dist/{vue-ui-gizmo-Cp06yGvf.js → vue-ui-gizmo-ydAuESKo.js} +2 -2
  64. package/dist/{vue-ui-heatmap-D5pMKFX8.js → vue-ui-heatmap-Ba_jzJB2.js} +8 -8
  65. package/dist/{vue-ui-heatmap-D1GsWm8S.cjs → vue-ui-heatmap-CdpBaTry.cjs} +1 -1
  66. package/dist/{vue-ui-kpi-B0YwsHBF.js → vue-ui-kpi-C5yFYQ19.js} +3 -3
  67. package/dist/{vue-ui-kpi-DuBd9Cfw.cjs → vue-ui-kpi-D2TypVZG.cjs} +1 -1
  68. package/dist/{vue-ui-mini-loader-BCE21FIO.js → vue-ui-mini-loader-BD6Lu94h.js} +2 -2
  69. package/dist/{vue-ui-mini-loader-CAJwCMGP.cjs → vue-ui-mini-loader-DJXMipP5.cjs} +1 -1
  70. package/dist/{vue-ui-molecule-DDasACBO.cjs → vue-ui-molecule-DCCCC-6a.cjs} +1 -1
  71. package/dist/{vue-ui-molecule-DeI-vOCp.js → vue-ui-molecule-DCsLwmnF.js} +9 -9
  72. package/dist/{vue-ui-mood-radar-C2ylWXY4.cjs → vue-ui-mood-radar-CX6Gq6UB.cjs} +1 -1
  73. package/dist/{vue-ui-mood-radar-B8IcNhp-.js → vue-ui-mood-radar-D-FUCHS-.js} +9 -9
  74. package/dist/{vue-ui-nested-donuts-CgpGyxKR.js → vue-ui-nested-donuts-CgRfdcJy.js} +9 -9
  75. package/dist/{vue-ui-nested-donuts-DUnTzrPT.cjs → vue-ui-nested-donuts-DWuCVtg8.cjs} +1 -1
  76. package/dist/{vue-ui-onion-B1cdXNvI.js → vue-ui-onion-BWo7GrFe.js} +9 -9
  77. package/dist/{vue-ui-onion-DGjKbke1.cjs → vue-ui-onion-Dg-7GylY.cjs} +1 -1
  78. package/dist/{vue-ui-parallel-coordinate-plot-DWYOet0Y.js → vue-ui-parallel-coordinate-plot-DSUZL2Sy.js} +10 -10
  79. package/dist/{vue-ui-parallel-coordinate-plot-BZtCTNKa.cjs → vue-ui-parallel-coordinate-plot-prF4TxQD.cjs} +1 -1
  80. package/dist/{vue-ui-quadrant-D4Pfvypx.cjs → vue-ui-quadrant-Ct06vgiw.cjs} +1 -1
  81. package/dist/{vue-ui-quadrant-bc2ZAF-e.js → vue-ui-quadrant-DYApa1bj.js} +10 -10
  82. package/dist/{vue-ui-quick-chart-CmJ7o4Sy.cjs → vue-ui-quick-chart-CwIWb_LQ.cjs} +1 -1
  83. package/dist/{vue-ui-quick-chart-U0Bwmo7o.js → vue-ui-quick-chart-DOHmWoHL.js} +6 -6
  84. package/dist/{vue-ui-radar-ClHJwcdQ.cjs → vue-ui-radar-BJ23WOh7.cjs} +1 -1
  85. package/dist/{vue-ui-radar-KXEodxY0.js → vue-ui-radar-C4SFHmfz.js} +10 -10
  86. package/dist/{vue-ui-rating-B4i_esmV.js → vue-ui-rating-BSFASHFc.js} +2 -2
  87. package/dist/{vue-ui-rating-CUR8udEY.cjs → vue-ui-rating-BsRGR-VS.cjs} +1 -1
  88. package/dist/{vue-ui-relation-circle-B0IYw3cW.cjs → vue-ui-relation-circle-CEzXa3yt.cjs} +1 -1
  89. package/dist/{vue-ui-relation-circle-CR0-9RVH.js → vue-ui-relation-circle-Dg-99k9k.js} +5 -5
  90. package/dist/{vue-ui-rings-B0quOkZB.js → vue-ui-rings-CCcc9cFR.js} +9 -9
  91. package/dist/{vue-ui-rings-dZ5s41lD.cjs → vue-ui-rings-DiQhsWx_.cjs} +1 -1
  92. package/dist/{vue-ui-scatter-DGkgA3c2.js → vue-ui-scatter-BgsexKX4.js} +10 -10
  93. package/dist/{vue-ui-scatter-B6ONtpIT.cjs → vue-ui-scatter-D7z4c6k-.cjs} +1 -1
  94. package/dist/{vue-ui-screenshot-DHzHE3bq.cjs → vue-ui-screenshot-Bj85MdEJ.cjs} +1 -1
  95. package/dist/{vue-ui-screenshot-C54ey8-p.js → vue-ui-screenshot-viGaG1cU.js} +1 -1
  96. package/dist/{vue-ui-skeleton-BWu2nLeV.cjs → vue-ui-skeleton-Cl9Kp9yE.cjs} +1 -1
  97. package/dist/{vue-ui-skeleton-CwTDNzek.js → vue-ui-skeleton-apODtH32.js} +2 -2
  98. package/dist/{vue-ui-smiley-BfHCG14T.js → vue-ui-smiley-BUDu21nW.js} +2 -2
  99. package/dist/{vue-ui-smiley-YycNcszs.cjs → vue-ui-smiley-CfDLeydH.cjs} +1 -1
  100. package/dist/{vue-ui-spark-trend-DNxVD2pk.js → vue-ui-spark-trend-B1bpQlNI.js} +4 -4
  101. package/dist/{vue-ui-spark-trend-Dyilmz2Z.cjs → vue-ui-spark-trend-ZS_m-z6R.cjs} +1 -1
  102. package/dist/{vue-ui-sparkbar-CUxLYyQb.cjs → vue-ui-sparkbar-C8fgdM5i.cjs} +1 -1
  103. package/dist/{vue-ui-sparkbar-Bbaou7w5.js → vue-ui-sparkbar-CpwYwA2h.js} +3 -3
  104. package/dist/{vue-ui-sparkgauge-tsCLtZpw.cjs → vue-ui-sparkgauge-CGy4jbtz.cjs} +1 -1
  105. package/dist/{vue-ui-sparkgauge-CX_a9jtx.js → vue-ui-sparkgauge-DpDoOc6V.js} +3 -3
  106. package/dist/{vue-ui-sparkhistogram-Cwz2wQ1e.cjs → vue-ui-sparkhistogram-CX35Cfkc.cjs} +1 -1
  107. package/dist/{vue-ui-sparkhistogram-DZVZ-RXk.js → vue-ui-sparkhistogram-CcEB0gwD.js} +4 -4
  108. package/dist/{vue-ui-sparkline-C-PJg1EI.js → vue-ui-sparkline-Bk4kWGco.js} +3 -3
  109. package/dist/{vue-ui-sparkline-BEprcYEe.cjs → vue-ui-sparkline-CdPAtBR8.cjs} +1 -1
  110. package/dist/{vue-ui-sparkstackbar-DGyE2dE3.cjs → vue-ui-sparkstackbar-6xwj9rme.cjs} +1 -1
  111. package/dist/{vue-ui-sparkstackbar-CxPo843r.js → vue-ui-sparkstackbar-B7Pvvmo_.js} +3 -3
  112. package/dist/{vue-ui-stackbar-BrX0uP0u.cjs → vue-ui-stackbar-7xZmgZo4.cjs} +1 -1
  113. package/dist/{vue-ui-stackbar-DFFORChg.js → vue-ui-stackbar-BMhowvyb.js} +10 -10
  114. package/dist/{vue-ui-strip-plot-DhcPpafE.js → vue-ui-strip-plot-CnLnX_zO.js} +9 -9
  115. package/dist/{vue-ui-strip-plot-C_J9uvvB.cjs → vue-ui-strip-plot-DOXU1HhU.cjs} +1 -1
  116. package/dist/{vue-ui-table-BuBIC5Ep.js → vue-ui-table-CoIUKpaM.js} +1 -1
  117. package/dist/{vue-ui-table-B0CfGG_e.cjs → vue-ui-table-Ly0OlueB.cjs} +1 -1
  118. package/dist/{vue-ui-table-heatmap-D3YP4078.js → vue-ui-table-heatmap-CtVr--3k.js} +4 -4
  119. package/dist/{vue-ui-table-heatmap-BRNGFUm-.cjs → vue-ui-table-heatmap-cLUGY_I8.cjs} +1 -1
  120. package/dist/{vue-ui-table-sparkline-BDaZLq9H.js → vue-ui-table-sparkline-Ct4n3vjB.js} +5 -5
  121. package/dist/{vue-ui-table-sparkline-OXdcU6JH.cjs → vue-ui-table-sparkline-i_FQjHJt.cjs} +1 -1
  122. package/dist/{vue-ui-thermometer-Dq6DVPKi.js → vue-ui-thermometer-CELrItTb.js} +5 -5
  123. package/dist/{vue-ui-thermometer-BPHxKklC.cjs → vue-ui-thermometer-vrEGhPDN.cjs} +1 -1
  124. package/dist/{vue-ui-timer-C51UJ8cf.js → vue-ui-timer-BKhOVqdo.js} +4 -4
  125. package/dist/{vue-ui-timer-Cc5OaHL8.cjs → vue-ui-timer-C5oaCNfC.cjs} +1 -1
  126. package/dist/{vue-ui-tiremarks-DWRRMm0S.cjs → vue-ui-tiremarks-CSbL6U73.cjs} +1 -1
  127. package/dist/{vue-ui-tiremarks-Cc9PjBa8.js → vue-ui-tiremarks-p6l5H8Xo.js} +5 -5
  128. package/dist/{vue-ui-treemap-BUPvuWKn.cjs → vue-ui-treemap-BwegaYVE.cjs} +1 -1
  129. package/dist/{vue-ui-treemap-Dfsnew-o.js → vue-ui-treemap-C4DTISo2.js} +9 -9
  130. package/dist/{vue-ui-vertical-bar-4E0DyBl3.cjs → vue-ui-vertical-bar-B3GbC7E_.cjs} +1 -1
  131. package/dist/{vue-ui-vertical-bar-aTTLZNFG.js → vue-ui-vertical-bar-C8dwl1ez.js} +9 -9
  132. package/dist/{vue-ui-waffle-CDv36WNb.js → vue-ui-waffle-BjXgV05U.js} +9 -9
  133. package/dist/{vue-ui-waffle-CZPrfM_0.cjs → vue-ui-waffle-DfhoqEtv.cjs} +1 -1
  134. package/dist/{vue-ui-wheel-DZck6SNJ.js → vue-ui-wheel-BpGLo5wJ.js} +5 -5
  135. package/dist/{vue-ui-wheel-IMuXbp1R.cjs → vue-ui-wheel-CtUEp9En.cjs} +1 -1
  136. package/dist/{vue-ui-word-cloud-EVeSzBUX.cjs → vue-ui-word-cloud-BSmOL5UE.cjs} +1 -1
  137. package/dist/{vue-ui-word-cloud-C9bnwx69.js → vue-ui-word-cloud-DNBF-X9H.js} +7 -7
  138. package/dist/vue-ui-xy-ClD6S1Ok.cjs +3 -0
  139. package/dist/{vue-ui-xy-BRRAfLis.js → vue-ui-xy-W_Zawlkz.js} +402 -380
  140. package/dist/{vue-ui-xy-canvas-DhHEH5ib.cjs → vue-ui-xy-canvas-BZTwibcy.cjs} +1 -1
  141. package/dist/{vue-ui-xy-canvas-5bhkoiT4.js → vue-ui-xy-canvas-DELc-ZEx.js} +10 -10
  142. package/package.json +1 -1
  143. package/dist/Slicer-DGciWCaF.js +0 -156
  144. package/dist/Slicer-DNvTnINC.cjs +0 -1
  145. package/dist/index-Br-wm_4r.cjs +0 -4
  146. package/dist/vue-ui-xy-BVwJjkYt.cjs +0 -3
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-Br-wm_4r.cjs"),j=require("./useResponsive-B3TrDDIG.cjs"),ie=require("./Title-DSPpszvp.cjs"),Y=require("./usePrinter-DUD-LDLx.cjs"),ce=require("./Tooltip-CgSI_niS.cjs"),de=require("./vue-ui-sparkbar-CUxLYyQb.cjs"),ve=require("./Legend-L_Enr1Hx.cjs"),pe=require("./DataTable-E_zoBxXZ.cjs"),he=require("./vue-ui-skeleton-BWu2nLeV.cjs"),ge=require("./vue-ui-accordion-ZPhdh-C7.cjs"),J=require("./useNestedProp-BH5s4SOa.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],ye=["xmlns","viewBox"],ke=["id"],be=["stop-color"],Ce=["stop-color"],we={key:0},Be=["x1","y1","x2","y2","stroke","stroke-width"],_e={key:0},xe=["d","stroke","stroke-width"],Pe=["d","stroke","stroke-width"],$e={key:1},Ne=["x","y","text-anchor","font-size","fill","onMouseenter"],Te=["points","stroke","stroke-width"],Se=["points","stroke","stroke-width","fill"],Ee={key:2},Ve=["cx","cy","fill","r","stroke"],Fe={key:3,class:"vue-data-ui-watermark"},Le=["onClick"],ze={key:0,style:{"max-width":"200px",margin:"0 auto"}},Oe={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(K,{expose:Q,emit:Z}){const d=K,{vue_ui_radar:ee}=n.useConfig(),k=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),te=e.ref(null),P=e.ref(!1),$=e.ref(""),F=e.ref(0),b=e.ref(null),L=e.ref(null),z=e.ref(null),t=e.computed(()=>{const o=J.useNestedProp({userConfig:d.config,defaultConfig:ee});return o.theme?{...J.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}),B=e.ref(null);e.onMounted(()=>{if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=j.throttle(()=>{const{width:a,height:l}=j.useResponsive({chart:b.value,title:t.value.style.chart.title.text?L.value:null,legend:t.value.style.chart.legend.show?z.value:null});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(b.value.parentNode)}}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:O,isImaging:A,generatePdf:I,generateImage:R}=Y.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),D=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),oe=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),s=e.ref({height:312,width:512}),i=e.ref([]),C=e.ref(null),f=e.ref(!1);function M(o){f.value=!0,i.value.includes(o)?(C.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{f.value=!1,C.value=null},500)):(i.value.push(o),setTimeout(()=>{f.value=!1},500)),Z("selectLegend",y.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function ae(){return y.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${m.value}_${a}`,color:n.convertColorToHex(o.color)||D.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>k.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||D.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`,formatter:o.formatter||null})):[]),q=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),U=e.computed(()=>p.value.length),N=e.computed(()=>Math.min(s.value.width,s.value.height)/3),G=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:N.value,sides:U.value,rotation:0})),le=e.computed(()=>{const o=[];for(let a=0;a<N.value;a+=N.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),g=e.computed(()=>G.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>re({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||q.value)}));return{...o,...p.value[a],plots:l}}));function T({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>s.value.width/2&&(o+=12,l="start"),o<s.value.width/2&&(o-=12,l="end"),a>s.value.height/2&&(a+=20),a<s.value.height/2&&(a-=12),a===s.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function re({centerX:o,centerY:a,apexX:l,apexY:r,proportion:u}){return{x:o+(l-o)*u,y:a+(r-a)*u}}const y=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||q.value)));return v.value.map((a,l)=>({...a,totalProportion:o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length,shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>M(l),isSegregated:i.value.includes(l)}))}),ne=e.computed(()=>({cy:"radar-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":""})),_=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...y.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((u,c)=>`${n.applyDataLabel(r.formatter,u,n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(u/r.target)?"":n.dataLabel({v:u/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),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{head:o,body:a,config:l,colNames:o}}),x=e.ref(null),S=e.ref([]),E=e.ref(null);function ue(o,a){S.value=[],x.value=a,P.value=!0;let l="";E.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value})))$.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value});else{l+=`<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>`;for(let u=0;u<o.values.length;u+=1)i.value.includes(u)||S.value.push({name:v.value[u].name,value:o.values[u]/o.target*100,color:v.value[u].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[u].prefix??"",v:o.values[u],s:v.value[u].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});$.value=l}}function W(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...y.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,Ie)=>[c.name,c.target,...c.values.flatMap(V=>[V,isNaN(V/c.target)?"":V/c.target*100])]),r=o.concat([a]).concat(l),u=n.createCsvContent(r);n.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const w=e.ref(!1);function se(o){w.value=o,F.value+=1}function H(){h.value.showTable=!h.value.showTable}function X(){h.value.showTooltip=!h.value.showTooltip}return Q({getData:ae,generatePdf:I,generateCsv:W,generateImage:R,toggleTable:H,toggleTooltip:X}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:b,id:`vue-ui-radar_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:L,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(ie._sfc_main,{config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:te,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(A),isPrinting:e.unref(O),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:w.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,onToggleFullscreen:se,onGeneratePdf:e.unref(I),onGenerateCsv:W,onGenerateImage:e.unref(R),onToggleTable:H,onToggleTooltip:X},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(l.color,.05)}${e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]}`},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":l.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,Ce)],8,ke))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.width/2,y1:s.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Be))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:s.value.width/2,y:s.value.height/2},radius:l,sides:U.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,xe))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:G.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Pe),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:T(l).x,y:T(l).y,"text-anchor":T(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:u=>ue(l,r),onMouseleave:a[0]||(a[0]=u=>{P.value=!1,x.value=null})},e.toDisplayString(l.name),41,Ne))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(u=>u.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,Te)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(u=>u.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${m.value}_${r})`:l.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity],class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,Se)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(u,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:x.value!==null&&x.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===c&&t.value.useCssAnimation})},null,10,Ve))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,ye)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(A)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.default,{key:4,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ve.Legend,{key:0,legendSet:y.value,config:ne.value,onClickMarker:a[1]||(a[1]=({i:l})=>M(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,Le)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:y.value},void 0,!0)],512),e.createVNode(ce._sfc_main,{show:h.value.showTooltip&&P.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:b.value,content:$.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...E.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(de.default,{dataset:S.value,config:oe.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...E.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isCustom"]),k.value?(e.openBlock(),e.createBlock(ge.default,{key:5,hideDetails:"",config:{open:h.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(pe.DataTable,{colNames:_.value.colNames,head:_.value.head,body:_.value.body,config:_.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>h.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},Ae=me._export_sfc(Oe,[["__scopeId","data-v-614f05d5"]]);exports.default=Ae;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-De6Dj52h.cjs"),j=require("./useResponsive-B3TrDDIG.cjs"),ie=require("./Title-CSRD5z1r.cjs"),Y=require("./usePrinter-SLYneJmG.cjs"),ce=require("./Tooltip-DFpYO4rz.cjs"),de=require("./vue-ui-sparkbar-C8fgdM5i.cjs"),ve=require("./Legend-C3LgyVKP.cjs"),pe=require("./DataTable-CMF1l-gL.cjs"),he=require("./vue-ui-skeleton-Cl9Kp9yE.cjs"),ge=require("./vue-ui-accordion-CiSEQOBc.cjs"),J=require("./useNestedProp-Vjg1xsU_.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],ye=["xmlns","viewBox"],ke=["id"],be=["stop-color"],Ce=["stop-color"],we={key:0},Be=["x1","y1","x2","y2","stroke","stroke-width"],_e={key:0},xe=["d","stroke","stroke-width"],Pe=["d","stroke","stroke-width"],$e={key:1},Ne=["x","y","text-anchor","font-size","fill","onMouseenter"],Te=["points","stroke","stroke-width"],Se=["points","stroke","stroke-width","fill"],Ee={key:2},Ve=["cx","cy","fill","r","stroke"],Fe={key:3,class:"vue-data-ui-watermark"},Le=["onClick"],ze={key:0,style:{"max-width":"200px",margin:"0 auto"}},Oe={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(K,{expose:Q,emit:Z}){const d=K,{vue_ui_radar:ee}=n.useConfig(),k=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),te=e.ref(null),P=e.ref(!1),$=e.ref(""),F=e.ref(0),b=e.ref(null),L=e.ref(null),z=e.ref(null),t=e.computed(()=>{const o=J.useNestedProp({userConfig:d.config,defaultConfig:ee});return o.theme?{...J.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}),B=e.ref(null);e.onMounted(()=>{if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=j.throttle(()=>{const{width:a,height:l}=j.useResponsive({chart:b.value,title:t.value.style.chart.title.text?L.value:null,legend:t.value.style.chart.legend.show?z.value:null});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(b.value.parentNode)}}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:O,isImaging:A,generatePdf:I,generateImage:R}=Y.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),D=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),oe=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),s=e.ref({height:312,width:512}),i=e.ref([]),C=e.ref(null),f=e.ref(!1);function M(o){f.value=!0,i.value.includes(o)?(C.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{f.value=!1,C.value=null},500)):(i.value.push(o),setTimeout(()=>{f.value=!1},500)),Z("selectLegend",y.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function ae(){return y.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${m.value}_${a}`,color:n.convertColorToHex(o.color)||D.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>k.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||D.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`,formatter:o.formatter||null})):[]),q=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),U=e.computed(()=>p.value.length),N=e.computed(()=>Math.min(s.value.width,s.value.height)/3),G=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:N.value,sides:U.value,rotation:0})),le=e.computed(()=>{const o=[];for(let a=0;a<N.value;a+=N.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),g=e.computed(()=>G.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>re({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||q.value)}));return{...o,...p.value[a],plots:l}}));function T({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>s.value.width/2&&(o+=12,l="start"),o<s.value.width/2&&(o-=12,l="end"),a>s.value.height/2&&(a+=20),a<s.value.height/2&&(a-=12),a===s.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function re({centerX:o,centerY:a,apexX:l,apexY:r,proportion:u}){return{x:o+(l-o)*u,y:a+(r-a)*u}}const y=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||q.value)));return v.value.map((a,l)=>({...a,totalProportion:o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length,shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>M(l),isSegregated:i.value.includes(l)}))}),ne=e.computed(()=>({cy:"radar-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":""})),_=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...y.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((u,c)=>`${n.applyDataLabel(r.formatter,u,n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(u/r.target)?"":n.dataLabel({v:u/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),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{head:o,body:a,config:l,colNames:o}}),x=e.ref(null),S=e.ref([]),E=e.ref(null);function ue(o,a){S.value=[],x.value=a,P.value=!0;let l="";E.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value})))$.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value});else{l+=`<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>`;for(let u=0;u<o.values.length;u+=1)i.value.includes(u)||S.value.push({name:v.value[u].name,value:o.values[u]/o.target*100,color:v.value[u].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[u].prefix??"",v:o.values[u],s:v.value[u].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});$.value=l}}function W(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...y.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,Ie)=>[c.name,c.target,...c.values.flatMap(V=>[V,isNaN(V/c.target)?"":V/c.target*100])]),r=o.concat([a]).concat(l),u=n.createCsvContent(r);n.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const w=e.ref(!1);function se(o){w.value=o,F.value+=1}function H(){h.value.showTable=!h.value.showTable}function X(){h.value.showTooltip=!h.value.showTooltip}return Q({getData:ae,generatePdf:I,generateCsv:W,generateImage:R,toggleTable:H,toggleTooltip:X}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:b,id:`vue-ui-radar_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:L,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(ie._sfc_main,{config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:te,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(A),isPrinting:e.unref(O),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:w.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,onToggleFullscreen:se,onGeneratePdf:e.unref(I),onGenerateCsv:W,onGenerateImage:e.unref(R),onToggleTable:H,onToggleTooltip:X},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(l.color,.05)}${e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]}`},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":l.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,Ce)],8,ke))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.width/2,y1:s.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Be))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:s.value.width/2,y:s.value.height/2},radius:l,sides:U.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,xe))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:G.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Pe),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:T(l).x,y:T(l).y,"text-anchor":T(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:u=>ue(l,r),onMouseleave:a[0]||(a[0]=u=>{P.value=!1,x.value=null})},e.toDisplayString(l.name),41,Ne))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(u=>u.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,Te)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(u=>u.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${m.value}_${r})`:l.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity],class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,Se)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(u,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:x.value!==null&&x.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===c&&t.value.useCssAnimation})},null,10,Ve))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,ye)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(A)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.default,{key:4,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ve.Legend,{key:0,legendSet:y.value,config:ne.value,onClickMarker:a[1]||(a[1]=({i:l})=>M(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,Le)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:y.value},void 0,!0)],512),e.createVNode(ce._sfc_main,{show:h.value.showTooltip&&P.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:b.value,content:$.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...E.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(de.default,{dataset:S.value,config:oe.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...E.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isCustom"]),k.value?(e.openBlock(),e.createBlock(ge.default,{key:5,hideDetails:"",config:{open:h.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(pe.DataTable,{colNames:_.value.colNames,head:_.value.head,body:_.value.body,config:_.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>h.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},Ae=me._export_sfc(Oe,[["__scopeId","data-v-614f05d5"]]);exports.default=Ae;
@@ -1,15 +1,15 @@
1
1
  import { computed as v, ref as i, onMounted as Se, onBeforeUnmount as Le, openBlock as s, createElementBlock as n, normalizeClass as L, normalizeStyle as E, createVNode as B, createCommentVNode as f, createBlock as D, unref as h, createSlots as ze, withCtx as y, renderSlot as m, normalizeProps as G, guardReactiveProps as W, createElementVNode as w, Fragment as $, renderList as x, toDisplayString as z, createTextVNode as pe, nextTick as Re } from "vue";
2
- import { u as Me, c as Ve, t as Ue, a as Ee, p as P, o as Be, e as F, b as De, g as ge, d as fe, J as ye, i as me, f as R, X as Ge, s as We, v as Q, K as be, w as Xe, x as Ye, q as je, r as qe } from "./index-ChMHOLEV.js";
2
+ import { u as Me, c as Ve, t as Ue, a as Ee, p as P, o as Be, e as F, b as De, g as ge, d as fe, J as ye, i as me, f as R, X as Ge, s as We, v as Q, K as be, w as Xe, x as Ye, q as je, r as qe } from "./index-8Lp8V0TB.js";
3
3
  import { t as He, u as Je } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as Ke } from "./Title-C0_PhO2u.js";
5
- import { u as Qe, U as Ze } from "./usePrinter-BW4S0cF1.js";
6
- import { _ as et } from "./Tooltip-dfMcr3Yl.js";
7
- import tt from "./vue-ui-sparkbar-Bbaou7w5.js";
8
- import { L as at } from "./Legend-DKGyWu7I.js";
9
- import { D as ot } from "./DataTable-Cg9dMxHZ.js";
10
- import lt from "./vue-ui-skeleton-CwTDNzek.js";
11
- import rt from "./vue-ui-accordion-Bukh98Pi.js";
12
- import { u as ke } from "./useNestedProp-DFwnYdme.js";
4
+ import { _ as Ke } from "./Title-0px6u9U5.js";
5
+ import { u as Qe, U as Ze } from "./usePrinter-cCBJ71Cc.js";
6
+ import { _ as et } from "./Tooltip-TTopnCsK.js";
7
+ import tt from "./vue-ui-sparkbar-CpwYwA2h.js";
8
+ import { L as at } from "./Legend-BbSR193q.js";
9
+ import { D as ot } from "./DataTable-Dy0vFXS7.js";
10
+ import lt from "./vue-ui-skeleton-apODtH32.js";
11
+ import rt from "./vue-ui-accordion-BQfLl7n5.js";
12
+ import { u as ke } from "./useNestedProp-DE-a5lMx.js";
13
13
  import { _ as st } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
14
  const nt = ["id"], ut = ["xmlns", "viewBox"], it = ["id"], ct = ["stop-color"], dt = ["stop-color"], vt = { key: 0 }, ht = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], pt = { key: 0 }, gt = ["d", "stroke", "stroke-width"], ft = ["d", "stroke", "stroke-width"], yt = { key: 1 }, mt = ["x", "y", "text-anchor", "font-size", "fill", "onMouseenter"], bt = ["points", "stroke", "stroke-width"], kt = ["points", "stroke", "stroke-width", "fill"], Ct = { key: 2 }, _t = ["cx", "cy", "fill", "r", "stroke"], wt = {
15
15
  key: 3,
@@ -1,6 +1,6 @@
1
1
  import { ref as f, computed as $, onMounted as O, openBlock as l, createElementBlock as i, normalizeStyle as a, createElementVNode as n, toDisplayString as p, createCommentVNode as d, Fragment as E, renderList as L, unref as m, withKeys as U, createTextVNode as D } from "vue";
2
- import { u as K, c as T, o as P, e as H, X as _, s as N, P as F } from "./index-ChMHOLEV.js";
3
- import { u as W } from "./useNestedProp-DFwnYdme.js";
2
+ import { u as K, c as T, o as P, e as H, X as _, s as N, P as F } from "./index-8Lp8V0TB.js";
3
+ import { u as W } from "./useNestedProp-DE-a5lMx.js";
4
4
  import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const J = {
6
6
  key: 0,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-Br-wm_4r.cjs"),C=require("./useNestedProp-BH5s4SOa.cjs"),V=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},F=["src","height","width"],A=["xmlns","height","width"],D=["id"],R=["stop-color"],X=["stop-color"],j=["points","fill","stroke","stroke-width"],I=["src","alt","height","width","id"],O=["xmlns","viewBox","height","id"],Y=["id"],G=["stop-color"],L=["stop-color"],q=["points","fill","stroke"],T=["xmlns","height"],U=["onClick","onMouseenter","onKeyup"],H=["onMouseenter"],K={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup($,{expose:k,emit:S}){const s=$,{vue_ui_rating:_}=n.useConfig(),d=e.ref(n.createUid()),p=e.ref(!1),r=e.ref(void 0),g=e.ref([]),t=e.computed(()=>C.useNestedProp({userConfig:s.config,defaultConfig:_})),b=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)?z(s.dataset.rating):s.dataset.rating),N=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)),i=e.ref(b.value),f=e.ref(t.value.type==="image"),c=e.ref(t.value.readonly);function z(o){let a=0,l=0;for(const u in o){const E=parseInt(u),h=o[u];a+=E*h,l+=h}if(l===0)return 0;const v=a/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{n.objectIsEmpty(s.dataset)&&n.error({componentName:"VueUiRating",type:"dataset"});for(let o=t.value.from;o<=t.value.to;o+=1)g.value.push(o)});function y(o,a=!1){return o>r.value||c.value?a?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:a?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function m(o,a=!1){const l=i.value-o,v=a?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function x(o){c.value||(i.value=o,S("rate",o))}function w(){return i.value}function B(o=!0){c.value=o}return k({getData:w,toggleReadonly:B}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:a[2]||(a[2]=l=>p.value=!0),onMouseleave:a[3]||(a[3]=l=>{p.value=!1,r.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,v)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[f.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(r.value)?t.value.style.image.inactiveOpacity:y(l,!0)}`)},null,12,F)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,R),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,X)],8,D)]),e.createElementVNode("polygon",{points:e.unref(n.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(r.value)?t.value.style.star.inactiveColor:y(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:r.value?y(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,j)],8,A)),f.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${m(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,I)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${m(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,L)],8,Y)]),e.createElementVNode("polygon",{points:e.unref(n.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,q)],8,O)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:u=>x(l),onMouseenter:u=>r.value=l,onMouseleave:a[0]||(a[0]=u=>r.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>x(l),["enter"])},null,40,U)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:u=>r.value=l,onMouseleave:a[1]||(a[1]=u=>r.value=void 0)},null,40,H)):e.createCommentVNode("",!0)],12,T)),t.value.style.tooltip.show&&N.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${r.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l),5),e.createTextVNode(" : "),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(s.dataset.rating[l]),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],36))}},P=V._export_sfc(K,[["__scopeId","data-v-86ced882"]]);exports.default=P;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-De6Dj52h.cjs"),C=require("./useNestedProp-Vjg1xsU_.cjs"),V=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},F=["src","height","width"],A=["xmlns","height","width"],D=["id"],R=["stop-color"],X=["stop-color"],j=["points","fill","stroke","stroke-width"],I=["src","alt","height","width","id"],O=["xmlns","viewBox","height","id"],Y=["id"],G=["stop-color"],L=["stop-color"],q=["points","fill","stroke"],T=["xmlns","height"],U=["onClick","onMouseenter","onKeyup"],H=["onMouseenter"],K={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup($,{expose:k,emit:S}){const s=$,{vue_ui_rating:_}=n.useConfig(),d=e.ref(n.createUid()),p=e.ref(!1),r=e.ref(void 0),g=e.ref([]),t=e.computed(()=>C.useNestedProp({userConfig:s.config,defaultConfig:_})),b=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)?z(s.dataset.rating):s.dataset.rating),N=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)),i=e.ref(b.value),f=e.ref(t.value.type==="image"),c=e.ref(t.value.readonly);function z(o){let a=0,l=0;for(const u in o){const E=parseInt(u),h=o[u];a+=E*h,l+=h}if(l===0)return 0;const v=a/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{n.objectIsEmpty(s.dataset)&&n.error({componentName:"VueUiRating",type:"dataset"});for(let o=t.value.from;o<=t.value.to;o+=1)g.value.push(o)});function y(o,a=!1){return o>r.value||c.value?a?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:a?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function m(o,a=!1){const l=i.value-o,v=a?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function x(o){c.value||(i.value=o,S("rate",o))}function w(){return i.value}function B(o=!0){c.value=o}return k({getData:w,toggleReadonly:B}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:a[2]||(a[2]=l=>p.value=!0),onMouseleave:a[3]||(a[3]=l=>{p.value=!1,r.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,v)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[f.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(r.value)?t.value.style.image.inactiveOpacity:y(l,!0)}`)},null,12,F)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,R),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,X)],8,D)]),e.createElementVNode("polygon",{points:e.unref(n.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(r.value)?t.value.style.star.inactiveColor:y(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:r.value?y(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,j)],8,A)),f.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${m(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,I)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${m(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,L)],8,Y)]),e.createElementVNode("polygon",{points:e.unref(n.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,q)],8,O)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:u=>x(l),onMouseenter:u=>r.value=l,onMouseleave:a[0]||(a[0]=u=>r.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>x(l),["enter"])},null,40,U)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:u=>r.value=l,onMouseleave:a[1]||(a[1]=u=>r.value=void 0)},null,40,H)):e.createCommentVNode("",!0)],12,T)),t.value.style.tooltip.show&&N.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${r.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l),5),e.createTextVNode(" : "),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(s.dataset.rating[l]),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],36))}},P=V._export_sfc(K,[["__scopeId","data-v-86ced882"]]);exports.default=P;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-Br-wm_4r.cjs"),R=require("./useResponsive-B3TrDDIG.cjs"),re=require("./Title-DSPpszvp.cjs"),T=require("./usePrinter-DUD-LDLx.cjs"),ne=require("./vue-ui-skeleton-BWu2nLeV.cjs"),V=require("./useNestedProp-BH5s4SOa.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],se=["xmlns","viewBox"],oe=["cx","cy","r","stroke","stroke-width"],ue={key:0},ce=["stroke","d","stroke-width"],de={key:1},ve=["stroke","x1","x2","y1","y2"],fe=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],ge=["cx","cy","fill","onClick","r"],me={key:3,class:"vue-data-ui-watermark"},ye={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(M,{expose:j}){const c=M;e.useCssVars(t=>({"6c440314":W.value,"6c6a2a1a":D.value,"7e559f95":X.value}));const{vue_ui_relation_circle:q}=o.useConfig(),p=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),f=e.ref(o.createUid()),x=e.ref(0),y=e.ref(null),w=e.ref(null),r=e.computed(()=>{const t=V.useNestedProp({userConfig:c.config,defaultConfig:q});return t.theme?{...V.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||c.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}),{isPrinting:b,isImaging:B,generatePdf:P,generateImage:O}=T.usePrinter({elementId:`relation_circle_${f.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),E=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),v=e.ref([]),g=e.ref([]),a=e.ref({}),u=e.ref([]),G=e.ref(0),_=e.computed(()=>c.dataset.slice(0,r.value.style.limit)),C=e.ref(r.value.style.size),s=e.ref({height:r.value.style.size,width:r.value.style.size}),d=e.computed({get(){return C.value*r.value.style.circle.radiusProportion},set(t){return t}}),U=e.computed(()=>r.value.style.links.curved),D=e.computed(()=>`${r.value.style.animation.speedMs}ms`),W=e.computed(()=>d.value*2),X=e.computed(()=>d.value*4),h=e.ref(null);e.onMounted(()=>{if(o.objectIsEmpty(c.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):c.dataset.forEach((i,l)=>{o.getMissingDatasetAttributes({datasetObject:i,requiredAttributes:["id","label","relations","weights"]}).forEach(n=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:n,index:l})})}),r.value.responsive){const i=R.throttle(()=>{const{width:l,height:n}=R.useResponsive({chart:y.value,title:r.value.style.title.text?w.value:null});C.value=Math.min(l,n),s.value.width=l,s.value.height=n,d.value=C.value*r.value.style.circle.radiusProportion,v.value=[],g.value=[],S(),z()});h.value=new ResizeObserver(i),h.value.observe(y.value.parentNode)}else S(),z();document.getElementById(`relation_circle_${f.value}`).addEventListener("click",A)}),e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${f.value}`).removeEventListener("click",A),h.value&&h.value.disconnect()});function A(t){const i=t.target;i&&Array.from(i.classList).includes("vue-ui-user-options")||i&&Array.from(i.classList).includes("vue-ui-user-options-summary")||i&&Array.from(i.classList).includes("vue-data-ui-button")||i&&Array.from(i.classList).includes("vue-ui-relation-circle-legend")||(a.value={},u.value=[])}function S(){const t=6.28319/_.value.length,i=360/_.value.length;let l=0,n=0;_.value.forEach((m,$)=>{const te=d.value*Math.cos(l)+s.value.width/2,le=d.value*Math.sin(l)+s.value.height/2+r.value.style.circle.offsetY;v.value.push({x:te,y:le,...m,color:m.color?m.color:E.value[$]?E.value[$]:o.palette[$],regAngle:n}),l+=t,n+=i})}function z(){v.value.forEach(t=>{v.value.filter(l=>l.relations.includes(t.id)).forEach((l,n)=>{g.value.push({weight:t.weights&&t.weights[n]?t.weights[n]:1,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,...t})})})}const Y=e.computed(()=>Math.max(...g.value.map(t=>t.weight)));function H(t){return Object.hasOwn(a.value,"x")?u.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function I(t){return Object.hasOwn(a.value,"x")?t.colorTarget:t.colorSource}function F(t){return Object.hasOwn(a.value,"x")?u.value.includes(t.id)&&t.relationId===`${t.id}_${a.value.id}`||t.relationId===`${a.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function J(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function K(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function Q(t){return Object.hasOwn(a.value,"x")?a.value.id===t.id||u.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function Z(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function N(t){G.value=360-t.regAngle,a.value.id&&t.id===a.value.id?(a.value={},u.value=[]):(a.value=t,u.value=[...t.relations])}function L(t){return t.weight/Y.value*r.value.style.links.maxWidth}const k=e.ref(!1);function ee(t){k.value=t,x.value+=1}return j({generatePdf:P,generateImage:O}),(t,i)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:y,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${f.value}`},[r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:w,style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor}`)},[e.createVNode(re._sfc_main,{config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),r.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(T.UserOptions,{ref:"details",key:`user_options_${x.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(b),isImaging:e.unref(B),uid:f.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:k.value,titles:{...r.value.userOptions.buttonTitles},chartElement:y.value,onToggleFullscreen:ee,onGeneratePdf:e.unref(P),onGenerateImage:e.unref(O)},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value},"relation-circle"]),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,width:"100%",style:e.normalizeStyle(`user-select:none; background:${r.value.style.backgroundColor}`)},[e.createElementVNode("circle",{cx:(s.value.width<=0?1e-4:s.value.width)/2,cy:(s.value.height<=0?1e-4:s.value.height)/2+r.value.style.circle.offsetY,r:d.value<=0?1e-4:d.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,oe),U.value?(e.openBlock(),e.createElementBlock("g",ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,n)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${n}`,style:e.normalizeStyle(F(l)),stroke:I(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&u.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${s.value.width/2},${s.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,ce))),128))])):(e.openBlock(),e.createElementBlock("g",de,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,n)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${n}`,stroke:I(l),style:e.normalizeStyle(F(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&u.value.includes(l.id)}),"stroke-linecap":"round"},null,14,ve))),128))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${n}`,"text-anchor":J(l),transform:Z(l),x:K(l),y:l.y+5,onClick:m=>N(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":a.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${Q(l)}`),"font-size":r.value.style.labels.fontSize,fill:r.value.style.labels.color},e.toDisplayString(l.label),13,fe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${n}`,style:e.normalizeStyle(H(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.color,onClick:m=>N(l),r:r.value.style.plot.radius},null,12,ge))),128)),e.renderSlot(t.$slots,"svg",{svg:s.value},void 0,!0)],14,se)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",me,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(b)||e.unref(B)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ne.default,{key:4,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],12,ae))}},he=ie._export_sfc(ye,[["__scopeId","data-v-2352f00b"]]);exports.default=he;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-De6Dj52h.cjs"),R=require("./useResponsive-B3TrDDIG.cjs"),re=require("./Title-CSRD5z1r.cjs"),T=require("./usePrinter-SLYneJmG.cjs"),ne=require("./vue-ui-skeleton-Cl9Kp9yE.cjs"),V=require("./useNestedProp-Vjg1xsU_.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],se=["xmlns","viewBox"],oe=["cx","cy","r","stroke","stroke-width"],ue={key:0},ce=["stroke","d","stroke-width"],de={key:1},ve=["stroke","x1","x2","y1","y2"],fe=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],ge=["cx","cy","fill","onClick","r"],me={key:3,class:"vue-data-ui-watermark"},ye={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(M,{expose:j}){const c=M;e.useCssVars(t=>({"6c440314":W.value,"6c6a2a1a":D.value,"7e559f95":X.value}));const{vue_ui_relation_circle:q}=o.useConfig(),p=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),f=e.ref(o.createUid()),x=e.ref(0),y=e.ref(null),w=e.ref(null),r=e.computed(()=>{const t=V.useNestedProp({userConfig:c.config,defaultConfig:q});return t.theme?{...V.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||c.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}),{isPrinting:b,isImaging:B,generatePdf:P,generateImage:O}=T.usePrinter({elementId:`relation_circle_${f.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),E=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),v=e.ref([]),g=e.ref([]),a=e.ref({}),u=e.ref([]),G=e.ref(0),_=e.computed(()=>c.dataset.slice(0,r.value.style.limit)),C=e.ref(r.value.style.size),s=e.ref({height:r.value.style.size,width:r.value.style.size}),d=e.computed({get(){return C.value*r.value.style.circle.radiusProportion},set(t){return t}}),U=e.computed(()=>r.value.style.links.curved),D=e.computed(()=>`${r.value.style.animation.speedMs}ms`),W=e.computed(()=>d.value*2),X=e.computed(()=>d.value*4),h=e.ref(null);e.onMounted(()=>{if(o.objectIsEmpty(c.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):c.dataset.forEach((i,l)=>{o.getMissingDatasetAttributes({datasetObject:i,requiredAttributes:["id","label","relations","weights"]}).forEach(n=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:n,index:l})})}),r.value.responsive){const i=R.throttle(()=>{const{width:l,height:n}=R.useResponsive({chart:y.value,title:r.value.style.title.text?w.value:null});C.value=Math.min(l,n),s.value.width=l,s.value.height=n,d.value=C.value*r.value.style.circle.radiusProportion,v.value=[],g.value=[],S(),z()});h.value=new ResizeObserver(i),h.value.observe(y.value.parentNode)}else S(),z();document.getElementById(`relation_circle_${f.value}`).addEventListener("click",A)}),e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${f.value}`).removeEventListener("click",A),h.value&&h.value.disconnect()});function A(t){const i=t.target;i&&Array.from(i.classList).includes("vue-ui-user-options")||i&&Array.from(i.classList).includes("vue-ui-user-options-summary")||i&&Array.from(i.classList).includes("vue-data-ui-button")||i&&Array.from(i.classList).includes("vue-ui-relation-circle-legend")||(a.value={},u.value=[])}function S(){const t=6.28319/_.value.length,i=360/_.value.length;let l=0,n=0;_.value.forEach((m,$)=>{const te=d.value*Math.cos(l)+s.value.width/2,le=d.value*Math.sin(l)+s.value.height/2+r.value.style.circle.offsetY;v.value.push({x:te,y:le,...m,color:m.color?m.color:E.value[$]?E.value[$]:o.palette[$],regAngle:n}),l+=t,n+=i})}function z(){v.value.forEach(t=>{v.value.filter(l=>l.relations.includes(t.id)).forEach((l,n)=>{g.value.push({weight:t.weights&&t.weights[n]?t.weights[n]:1,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,...t})})})}const Y=e.computed(()=>Math.max(...g.value.map(t=>t.weight)));function H(t){return Object.hasOwn(a.value,"x")?u.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function I(t){return Object.hasOwn(a.value,"x")?t.colorTarget:t.colorSource}function F(t){return Object.hasOwn(a.value,"x")?u.value.includes(t.id)&&t.relationId===`${t.id}_${a.value.id}`||t.relationId===`${a.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function J(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function K(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function Q(t){return Object.hasOwn(a.value,"x")?a.value.id===t.id||u.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function Z(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function N(t){G.value=360-t.regAngle,a.value.id&&t.id===a.value.id?(a.value={},u.value=[]):(a.value=t,u.value=[...t.relations])}function L(t){return t.weight/Y.value*r.value.style.links.maxWidth}const k=e.ref(!1);function ee(t){k.value=t,x.value+=1}return j({generatePdf:P,generateImage:O}),(t,i)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:y,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${f.value}`},[r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:w,style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor}`)},[e.createVNode(re._sfc_main,{config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),r.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(T.UserOptions,{ref:"details",key:`user_options_${x.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(b),isImaging:e.unref(B),uid:f.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:k.value,titles:{...r.value.userOptions.buttonTitles},chartElement:y.value,onToggleFullscreen:ee,onGeneratePdf:e.unref(P),onGenerateImage:e.unref(O)},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value},"relation-circle"]),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,width:"100%",style:e.normalizeStyle(`user-select:none; background:${r.value.style.backgroundColor}`)},[e.createElementVNode("circle",{cx:(s.value.width<=0?1e-4:s.value.width)/2,cy:(s.value.height<=0?1e-4:s.value.height)/2+r.value.style.circle.offsetY,r:d.value<=0?1e-4:d.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,oe),U.value?(e.openBlock(),e.createElementBlock("g",ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,n)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${n}`,style:e.normalizeStyle(F(l)),stroke:I(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&u.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${s.value.width/2},${s.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,ce))),128))])):(e.openBlock(),e.createElementBlock("g",de,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,n)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${n}`,stroke:I(l),style:e.normalizeStyle(F(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&u.value.includes(l.id)}),"stroke-linecap":"round"},null,14,ve))),128))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${n}`,"text-anchor":J(l),transform:Z(l),x:K(l),y:l.y+5,onClick:m=>N(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":a.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${Q(l)}`),"font-size":r.value.style.labels.fontSize,fill:r.value.style.labels.color},e.toDisplayString(l.label),13,fe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${n}`,style:e.normalizeStyle(H(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.color,onClick:m=>N(l),r:r.value.style.plot.radius},null,12,ge))),128)),e.renderSlot(t.$slots,"svg",{svg:s.value},void 0,!0)],14,se)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",me,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(b)||e.unref(B)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ne.default,{key:4,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],12,ae))}},he=ie._export_sfc(ye,[["__scopeId","data-v-2352f00b"]]);exports.default=he;
@@ -1,10 +1,10 @@
1
1
  import { useCssVars as ye, computed as c, ref as o, onMounted as me, onBeforeUnmount as ke, openBlock as a, createElementBlock as u, normalizeStyle as g, createVNode as _e, createCommentVNode as $, createBlock as Y, unref as h, createSlots as $e, withCtx as E, renderSlot as p, normalizeProps as q, guardReactiveProps as H, normalizeClass as z, createElementVNode as pe, Fragment as b, renderList as O, toDisplayString as xe } from "vue";
2
- import { u as Ce, c as we, t as be, a as Oe, p as J, b as Pe, o as Ae, e as K, g as Ie, X as Fe } from "./index-ChMHOLEV.js";
2
+ import { u as Ce, c as we, t as be, a as Oe, p as J, b as Pe, o as Ae, e as K, g as Ie, X as Fe } from "./index-8Lp8V0TB.js";
3
3
  import { t as Ee, u as ze } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as Le } from "./Title-C0_PhO2u.js";
5
- import { u as Ne, U as Re } from "./usePrinter-BW4S0cF1.js";
6
- import Se from "./vue-ui-skeleton-CwTDNzek.js";
7
- import { u as Q } from "./useNestedProp-DFwnYdme.js";
4
+ import { _ as Le } from "./Title-0px6u9U5.js";
5
+ import { u as Ne, U as Re } from "./usePrinter-cCBJ71Cc.js";
6
+ import Se from "./vue-ui-skeleton-apODtH32.js";
7
+ import { u as Q } from "./useNestedProp-DE-a5lMx.js";
8
8
  import { _ as Te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  const Me = ["id"], je = ["xmlns", "viewBox"], Be = ["cx", "cy", "r", "stroke", "stroke-width"], Ge = { key: 0 }, Ue = ["stroke", "d", "stroke-width"], De = { key: 1 }, Ve = ["stroke", "x1", "x2", "y1", "y2"], We = ["text-anchor", "transform", "x", "y", "onClick", "font-weight", "font-size", "fill"], Xe = ["cx", "cy", "fill", "onClick", "r"], Ye = {
10
10
  key: 3,
@@ -1,14 +1,14 @@
1
1
  import { ref as r, computed as c, onMounted as _e, onBeforeUnmount as Ne, openBlock as n, createElementBlock as m, normalizeClass as V, normalizeStyle as _, createVNode as X, createCommentVNode as N, createBlock as B, unref as h, createSlots as Pe, withCtx as p, renderSlot as g, normalizeProps as D, guardReactiveProps as W, Fragment as ue, renderList as re, createElementVNode as w, createTextVNode as ne, toDisplayString as E, nextTick as Le } from "vue";
2
- import { u as Fe, c as ie, t as Ie, a as Se, p as T, o as Oe, e as ve, g as Me, b as ze, d as ce, f as x, X as Ae, s as Re, v as Ve, i as de, w as Be, x as De, q as We, r as Ee } from "./index-ChMHOLEV.js";
2
+ import { u as Fe, c as ie, t as Ie, a as Se, p as T, o as Oe, e as ve, g as Me, b as ze, d as ce, f as x, X as Ae, s as Re, v as Ve, i as de, w as Be, x as De, q as We, r as Ee } from "./index-8Lp8V0TB.js";
3
3
  import { t as Ge, u as Ue } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as He } from "./Title-C0_PhO2u.js";
5
- import { u as Xe, U as je } from "./usePrinter-BW4S0cF1.js";
6
- import { _ as Ye } from "./Tooltip-dfMcr3Yl.js";
7
- import { D as qe } from "./DataTable-Cg9dMxHZ.js";
8
- import { L as Je } from "./Legend-DKGyWu7I.js";
9
- import Ke from "./vue-ui-skeleton-CwTDNzek.js";
10
- import Qe from "./vue-ui-accordion-Bukh98Pi.js";
11
- import { u as he } from "./useNestedProp-DFwnYdme.js";
4
+ import { _ as He } from "./Title-0px6u9U5.js";
5
+ import { u as Xe, U as je } from "./usePrinter-cCBJ71Cc.js";
6
+ import { _ as Ye } from "./Tooltip-TTopnCsK.js";
7
+ import { D as qe } from "./DataTable-Dy0vFXS7.js";
8
+ import { L as Je } from "./Legend-BbSR193q.js";
9
+ import Ke from "./vue-ui-skeleton-apODtH32.js";
10
+ import Qe from "./vue-ui-accordion-BQfLl7n5.js";
11
+ import { u as he } from "./useNestedProp-DE-a5lMx.js";
12
12
  import { _ as Ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const et = ["id"], tt = ["xmlns", "viewBox"], lt = ["id"], ot = ["stop-color"], at = ["stop-color"], st = ["stroke", "cx", "cy", "r", "fill"], ut = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], rt = ["cx", "cy", "r", "onMouseenter"], nt = {
14
14
  key: 3,
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Br-wm_4r.cjs"),H=require("./useResponsive-B3TrDDIG.cjs"),re=require("./Title-DSPpszvp.cjs"),W=require("./usePrinter-DUD-LDLx.cjs"),ne=require("./Tooltip-CgSI_niS.cjs"),ue=require("./DataTable-E_zoBxXZ.cjs"),se=require("./Legend-L_Enr1Hx.cjs"),ie=require("./vue-ui-skeleton-BWu2nLeV.cjs"),ce=require("./vue-ui-accordion-ZPhdh-C7.cjs"),G=require("./useNestedProp-BH5s4SOa.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],pe=["xmlns","viewBox"],he=["id"],ge=["stop-color"],fe=["stop-color"],me=["stroke","cx","cy","r","fill"],ye=["stroke","stroke-width","cx","cy","r","fill"],be=["cx","cy","r","onMouseenter"],ke={key:3,class:"vue-data-ui-watermark"},Ce=["onClick"],we={key:0},xe={key:1},Te=["innerHTML"],$e={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(j,{expose:X,emit:Y}){const v=j,{vue_ui_rings:J}=r.useConfig(),y=e.ref(!1),x=e.computed(()=>!!v.dataset&&v.dataset.length),b=e.ref(r.createUid()),K=e.ref(null),T=e.ref(!1),_=e.ref(""),m=e.ref(null),L=e.ref(0),k=e.ref(null),V=e.ref(null),E=e.ref(null),t=e.computed(()=>{const l=G.useNestedProp({userConfig:v.config,defaultConfig:J});return l.theme?{...G.useNestedProp({userConfig:r.themes.vue_ui_rings[l.theme]||v.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),$=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(v.dataset)?r.error({componentName:"VueUiRings",type:"dataset"}):v.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:o,index:a})})}),t.value.responsive){const l=H.throttle(()=>{const{width:a,height:o}=H.useResponsive({chart:k.value,title:t.value.style.chart.title.text?V.value:null,legend:t.value.style.chart.legend.show?E.value:null});s.value.width=a,s.value.height=o});$.value=new ResizeObserver(l),$.value.observe(k.value.parentNode)}setTimeout(()=>{y.value=!0},600)}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:z,isImaging:F,generatePdf:I,generateImage:O}=W.usePrinter({elementId:`rings_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),M=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),g=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),Q=e.computed(()=>Math.min(s.value.height,s.value.width)),i=e.ref([]);function P(l){i.value.includes(l)?i.value=i.value.filter(a=>a!==l):i.value.push(l),Y("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const Z=e.computed(()=>Math.max(...N.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l)));function R(l){return l/Z.value}const N=e.computed(()=>v.dataset.map(({values:l,name:a,color:o=null},n)=>{const u=(l||[]).reduce((h,w)=>h+w,0);return{name:a,color:o||r.convertColorToHex(o)||M.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:u,proportion:u/v.dataset.map(h=>(h.values||[]).reduce((w,ae)=>w+ae,0)).reduce((h,w)=>h+w,0),uid:r.createUid()}})),D=e.computed(()=>N.value.map(l=>({...l,shape:"circle",opacity:i.value.includes(l.uid)?.5:1,segregate:()=>P(l.uid),isSegregated:i.value.includes(l.uid)})).toSorted((l,a)=>a.value-l.value)),ee=e.computed(()=>({cy:"rings-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),p=e.computed(()=>N.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>N.value.filter(l=>!i.value.includes(l.uid)).map(({name:l,value:a,color:o=null,uid:n},u)=>({uid:n,name:l,color:o||r.convertColorToHex(o)||M.value[u]||r.palette[u]||r.palette[u%r.palette.length],value:a,proportion:R(a),percentage:a/p.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*R(a)})).toSorted((l,a)=>a.value-l.value));function te(){return c.value.map(({name:l,color:a,value:o,absoluteValues:n,percentage:u})=>({name:l,color:a,value:o,absoluteValues:n,percentage:u}))}const d=e.computed(()=>Q.value-t.value.style.chart.layout.rings.strokeWidth*2),B=e.ref(null);function le(l,a){if(i.value.length===v.dataset.length)return;B.value={datapoint:a,seriesIndex:l,series:c.value,config:t.value},m.value=l;const o=c.value[l],n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:l,datapoint:a,series:c.value,config:t.value})))_.value=n({seriesIndex:l,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:l})}
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-De6Dj52h.cjs"),H=require("./useResponsive-B3TrDDIG.cjs"),re=require("./Title-CSRD5z1r.cjs"),W=require("./usePrinter-SLYneJmG.cjs"),ne=require("./Tooltip-DFpYO4rz.cjs"),ue=require("./DataTable-CMF1l-gL.cjs"),se=require("./Legend-C3LgyVKP.cjs"),ie=require("./vue-ui-skeleton-Cl9Kp9yE.cjs"),ce=require("./vue-ui-accordion-CiSEQOBc.cjs"),G=require("./useNestedProp-Vjg1xsU_.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],pe=["xmlns","viewBox"],he=["id"],ge=["stop-color"],fe=["stop-color"],me=["stroke","cx","cy","r","fill"],ye=["stroke","stroke-width","cx","cy","r","fill"],be=["cx","cy","r","onMouseenter"],ke={key:3,class:"vue-data-ui-watermark"},Ce=["onClick"],we={key:0},xe={key:1},Te=["innerHTML"],$e={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(j,{expose:X,emit:Y}){const v=j,{vue_ui_rings:J}=r.useConfig(),y=e.ref(!1),x=e.computed(()=>!!v.dataset&&v.dataset.length),b=e.ref(r.createUid()),K=e.ref(null),T=e.ref(!1),_=e.ref(""),m=e.ref(null),L=e.ref(0),k=e.ref(null),V=e.ref(null),E=e.ref(null),t=e.computed(()=>{const l=G.useNestedProp({userConfig:v.config,defaultConfig:J});return l.theme?{...G.useNestedProp({userConfig:r.themes.vue_ui_rings[l.theme]||v.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),$=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(v.dataset)?r.error({componentName:"VueUiRings",type:"dataset"}):v.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:o,index:a})})}),t.value.responsive){const l=H.throttle(()=>{const{width:a,height:o}=H.useResponsive({chart:k.value,title:t.value.style.chart.title.text?V.value:null,legend:t.value.style.chart.legend.show?E.value:null});s.value.width=a,s.value.height=o});$.value=new ResizeObserver(l),$.value.observe(k.value.parentNode)}setTimeout(()=>{y.value=!0},600)}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:z,isImaging:F,generatePdf:I,generateImage:O}=W.usePrinter({elementId:`rings_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),M=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),g=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),Q=e.computed(()=>Math.min(s.value.height,s.value.width)),i=e.ref([]);function P(l){i.value.includes(l)?i.value=i.value.filter(a=>a!==l):i.value.push(l),Y("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const Z=e.computed(()=>Math.max(...N.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l)));function R(l){return l/Z.value}const N=e.computed(()=>v.dataset.map(({values:l,name:a,color:o=null},n)=>{const u=(l||[]).reduce((h,w)=>h+w,0);return{name:a,color:o||r.convertColorToHex(o)||M.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:u,proportion:u/v.dataset.map(h=>(h.values||[]).reduce((w,ae)=>w+ae,0)).reduce((h,w)=>h+w,0),uid:r.createUid()}})),D=e.computed(()=>N.value.map(l=>({...l,shape:"circle",opacity:i.value.includes(l.uid)?.5:1,segregate:()=>P(l.uid),isSegregated:i.value.includes(l.uid)})).toSorted((l,a)=>a.value-l.value)),ee=e.computed(()=>({cy:"rings-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),p=e.computed(()=>N.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>N.value.filter(l=>!i.value.includes(l.uid)).map(({name:l,value:a,color:o=null,uid:n},u)=>({uid:n,name:l,color:o||r.convertColorToHex(o)||M.value[u]||r.palette[u]||r.palette[u%r.palette.length],value:a,proportion:R(a),percentage:a/p.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*R(a)})).toSorted((l,a)=>a.value-l.value));function te(){return c.value.map(({name:l,color:a,value:o,absoluteValues:n,percentage:u})=>({name:l,color:a,value:o,absoluteValues:n,percentage:u}))}const d=e.computed(()=>Q.value-t.value.style.chart.layout.rings.strokeWidth*2),B=e.ref(null);function le(l,a){if(i.value.length===v.dataset.length)return;B.value={datapoint:a,seriesIndex:l,series:c.value,config:t.value},m.value=l;const o=c.value[l],n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:l,datapoint:a,series:c.value,config:t.value})))_.value=n({seriesIndex:l,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:l})}
2
2
  </b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${r.dataLabel({v:o.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${r.dataLabel({v:o.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),_.value=u}T.value=!0}const f=e.computed(()=>{const l=c.value.map(o=>({name:o.name,color:o.color})),a=c.value.map(o=>o.value);return{head:l,body:a}}),S=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=f.value.head.map((u,h)=>[{color:u.color,name:u.name},r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(f.value.body[h]/p.value)?"-":(f.value.body[h]/p.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},n=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:n}});function q(){e.nextTick(()=>{const l=f.value.head.map((n,u)=>[[n.name],[f.value.body[u]],[isNaN(f.value.body[u]/p.value)?"-":f.value.body[u]/p.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-rings"})})}const C=e.ref(!1);function oe(l){C.value=l,L.value+=1}function A(){g.value.showTable=!g.value.showTable}function U(){g.value.showTooltip=!g.value.showTooltip}return X({getData:te,generatePdf:I,generateCsv:q,generateImage:O,toggleTable:A,toggleTooltip:U}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:k,class:e.normalizeClass(`vue-ui-rings ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${b.value}`,onMouseleave:a[3]||(a[3]=o=>{m.value=null,T.value=!1})},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:V,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(re._sfc_main,{config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref_key:"details",ref:K,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(z),isImaging:e.unref(F),uid:b.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:g.value.showTooltip,isFullscreen:C.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,onToggleFullscreen:oe,onGeneratePdf:e.unref(I),onGenerateCsv:q,onGenerateImage:e.unref(O),onToggleTable:A,onToggleTooltip:U},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${b.value}_${n}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(r.shiftHue)(o.color,.05)}${e.unref(r.opacity)[100-t.value.style.chart.layout.rings.gradient.intensity]}`},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,fe)],8,he))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9,fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,me),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9,fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${b.value}_${n})`:o.color},null,14,ye),e.createElementVNode("circle",{"data-cy-trap":"",stroke:"none",cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9,fill:"transparent",onMouseenter:u=>le(n,o),onMouseleave:a[0]||(a[0]=u=>{m.value=null,T.value=!1})},null,40,be)]))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,pe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(z)||e.unref(F)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:4,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:E},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(se.Legend,{key:0,legendSet:D.value,config:ee.value,onClickMarker:a[1]||(a[1]=({legend:o})=>P(o.uid))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>P(o.uid),style:e.normalizeStyle(`opacity:${i.value.includes(o.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),i.value.includes(o.uid)?(e.openBlock(),e.createElementBlock("span",xe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",we," ("+e.toDisplayString(isNaN(o.value/p.value)?"-":e.unref(r.dataLabel)({v:o.value/p.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ce)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:D.value},void 0,!0)],512),e.createVNode(ne._sfc_main,{show:g.value.showTooltip&&T.value&&i.value.length<v.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:_.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),x.value?(e.openBlock(),e.createBlock(ce.default,{key:5,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ue.DataTable,{colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>g.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Te)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ve))}},Ne=de._export_sfc($e,[["__scopeId","data-v-747e43da"]]);exports.default=Ne;
@@ -1,15 +1,15 @@
1
1
  import { computed as b, ref as k, onMounted as Ee, onBeforeUnmount as Ve, openBlock as s, createElementBlock as r, normalizeClass as Ae, normalizeStyle as D, createVNode as le, createCommentVNode as c, createBlock as J, unref as d, createSlots as Ge, withCtx as w, renderSlot as A, normalizeProps as ae, guardReactiveProps as oe, createElementVNode as v, Fragment as N, renderList as P, toDisplayString as M, createTextVNode as Re, nextTick as qe } from "vue";
2
- import { u as Ue, c as He, t as Je, a as Ke, p as R, o as Qe, e as ce, b as Ze, g as Te, M as Be, X as et, O as tt, v as de, i as Y, f as F, w as lt, x as at, q as ot, r as st } from "./index-ChMHOLEV.js";
2
+ import { u as Ue, c as He, t as Je, a as Ke, p as R, o as Qe, e as ce, b as Ze, g as Te, M as Be, X as et, O as tt, v as de, i as Y, f as F, w as lt, x as at, q as ot, r as st } from "./index-8Lp8V0TB.js";
3
3
  import { t as ut, u as rt } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as it } from "./Title-C0_PhO2u.js";
5
- import { u as nt, U as yt } from "./usePrinter-BW4S0cF1.js";
6
- import { _ as vt } from "./Tooltip-dfMcr3Yl.js";
7
- import { L as ct } from "./Legend-DKGyWu7I.js";
8
- import { _ as Ne } from "./Shape-npSEDLuX.js";
9
- import { D as dt } from "./DataTable-Cg9dMxHZ.js";
10
- import ht from "./vue-ui-skeleton-CwTDNzek.js";
11
- import pt from "./vue-ui-accordion-Bukh98Pi.js";
12
- import { u as We } from "./useNestedProp-DFwnYdme.js";
4
+ import { _ as it } from "./Title-0px6u9U5.js";
5
+ import { u as nt, U as yt } from "./usePrinter-cCBJ71Cc.js";
6
+ import { _ as vt } from "./Tooltip-TTopnCsK.js";
7
+ import { L as ct } from "./Legend-BbSR193q.js";
8
+ import { _ as Ne } from "./Shape-B5VTXCQH.js";
9
+ import { D as dt } from "./DataTable-Dy0vFXS7.js";
10
+ import ht from "./vue-ui-skeleton-apODtH32.js";
11
+ import pt from "./vue-ui-accordion-BQfLl7n5.js";
12
+ import { u as We } from "./useNestedProp-DE-a5lMx.js";
13
13
  import { _ as ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
14
  const gt = ["id"], xt = ["xmlns", "viewBox"], mt = { key: 0 }, bt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], kt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], _t = { key: 1 }, wt = ["points", "fill", "stroke-width", "stroke-dasharray", "stroke"], Mt = { key: 0 }, $t = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onMouseover"], Ct = { key: 1 }, zt = { key: 2 }, St = ["id"], Lt = ["stop-color"], At = ["stop-color"], Tt = ["id"], Bt = ["stop-color"], Nt = ["stop-color"], Wt = ["x", "y", "width", "height", "fill", "stroke", "stroke-width", "rx"], Pt = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], Ft = { key: 0 }, Ot = ["d", "stroke", "stroke-width"], Xt = ["d", "stroke", "stroke-width"], It = ["d", "stroke", "stroke-width"], Dt = ["d", "stroke", "stroke-width"], Yt = {
15
15
  key: 3,