vue-data-ui 2.3.46 → 2.3.48

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 (147) hide show
  1. package/dist/{Arrow-C45xNtet.cjs → Arrow-DVDUyObR.cjs} +1 -1
  2. package/dist/{Arrow-QBHviXQB.js → Arrow-Zxlib5TA.js} +1 -1
  3. package/dist/{BaseIcon-Ct3EasCg.js → BaseIcon-B_4EdVx8.js} +1 -1
  4. package/dist/{BaseIcon-NNgCqsH0.cjs → BaseIcon-DQUa2wbN.cjs} +1 -1
  5. package/dist/{DataTable-CkeQ7c6_.js → DataTable-97z7jeB3.js} +2 -2
  6. package/dist/{DataTable-BGF6x8iX.cjs → DataTable-pfsiGYAz.cjs} +1 -1
  7. package/dist/{Legend-aFYc_s9T.js → Legend-Dc30ZC8U.js} +1 -1
  8. package/dist/{Legend-DjuRskVd.cjs → Legend-lleMcfy9.cjs} +1 -1
  9. package/dist/{Shape-BTMZlA5Q.cjs → Shape-BtSgIgD_.cjs} +1 -1
  10. package/dist/{Shape-DoAgLIYa.js → Shape-Cjf9rDFw.js} +1 -1
  11. package/dist/Slicer-CanBZJ4V.cjs +1 -0
  12. package/dist/Slicer-dehuss8u.js +253 -0
  13. package/dist/{Title-NelrBSGO.cjs → Title-CUtmTGbN.cjs} +1 -1
  14. package/dist/{Title-D8HoSXgM.js → Title-DZ-9X7T_.js} +1 -1
  15. package/dist/{Tooltip-DTwn_FW5.js → Tooltip-BE1vKyP4.js} +1 -1
  16. package/dist/{Tooltip-CK94hatv.cjs → Tooltip-DhxfsNhL.cjs} +1 -1
  17. package/dist/{index-C1-FJ0sT.js → index-CAkeI2u7.js} +560 -552
  18. package/dist/index-DGxA8bUJ.cjs +4 -0
  19. package/dist/style.css +1 -1
  20. package/dist/types/vue-data-ui.d.cts +8 -0
  21. package/dist/types/vue-data-ui.d.ts +8 -0
  22. package/dist/{useNestedProp-CcMb2mLY.cjs → useNestedProp-DM4rgjhE.cjs} +1 -1
  23. package/dist/{useNestedProp-1fJhHDhT.js → useNestedProp-N72tOTWX.js} +1 -1
  24. package/dist/{usePrinter-AfD8nrd2.cjs → usePrinter-DbJ9I2vE.cjs} +1 -1
  25. package/dist/{usePrinter-B1a6uNio.js → usePrinter-MbSdbzew.js} +1 -1
  26. package/dist/{vue-data-ui-DfYg-sm0.cjs → vue-data-ui-BQHuRwzO.cjs} +1 -1
  27. package/dist/{vue-data-ui-DgzO0vYA.js → vue-data-ui-BtPs_riR.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-ikMJ_M47.js → vue-ui-3d-bar-CLfyDLPQ.js} +7 -7
  31. package/dist/{vue-ui-3d-bar-DctYjGhv.cjs → vue-ui-3d-bar-DXIhL0TF.cjs} +1 -1
  32. package/dist/{vue-ui-accordion-BLoKd0D-.js → vue-ui-accordion-BbsnFhS8.js} +3 -3
  33. package/dist/{vue-ui-accordion-CS2POBdq.cjs → vue-ui-accordion-Bs0EHuxc.cjs} +1 -1
  34. package/dist/{vue-ui-age-pyramid-C9hzFCN4.js → vue-ui-age-pyramid-B4ZZuW-3.js} +8 -8
  35. package/dist/{vue-ui-age-pyramid-6GljtWMq.cjs → vue-ui-age-pyramid-DpsPcpxc.cjs} +1 -1
  36. package/dist/{vue-ui-annotator-BFTGfEfF.cjs → vue-ui-annotator-B6tm7G-3.cjs} +1 -1
  37. package/dist/{vue-ui-annotator-DgdkTVYV.js → vue-ui-annotator-BhE_ZF6c.js} +1 -1
  38. package/dist/{vue-ui-candlestick-BW-okjzH.js → vue-ui-candlestick-C4uPOJHQ.js} +9 -9
  39. package/dist/{vue-ui-candlestick-C31d7Jvz.cjs → vue-ui-candlestick-DWF0o42E.cjs} +1 -1
  40. package/dist/{vue-ui-carousel-table-DlFu0byl.cjs → vue-ui-carousel-table-BOx_7UQr.cjs} +1 -1
  41. package/dist/{vue-ui-carousel-table-Cw7Vpun2.js → vue-ui-carousel-table-CuK3NH57.js} +4 -4
  42. package/dist/{vue-ui-chestnut-SLvSoUlS.js → vue-ui-chestnut-C7w4B_ur.js} +6 -6
  43. package/dist/{vue-ui-chestnut-B-H0j9-6.cjs → vue-ui-chestnut-wEen0cKE.cjs} +1 -1
  44. package/dist/{vue-ui-cursor-BnoYo8DD.js → vue-ui-cursor-Ctgm3n3f.js} +2 -2
  45. package/dist/{vue-ui-cursor-eMGHt_Cm.cjs → vue-ui-cursor-Yv8kl6qP.cjs} +1 -1
  46. package/dist/{vue-ui-dashboard-cOx4Zbit.js → vue-ui-dashboard-2lnPhwSk.js} +2 -2
  47. package/dist/{vue-ui-dashboard-BpwA8NTi.cjs → vue-ui-dashboard-DPpvlOhB.cjs} +1 -1
  48. package/dist/{vue-ui-digits-wo7Gctkj.js → vue-ui-digits-BaQVgAB3.js} +2 -2
  49. package/dist/{vue-ui-digits-MhR768JU.cjs → vue-ui-digits-CDsLYZQx.cjs} +1 -1
  50. package/dist/vue-ui-donut-BJvvOCw4.cjs +1 -0
  51. package/dist/{vue-ui-donut-CABoxvoV.js → vue-ui-donut-Bkhnx2Na.js} +45 -45
  52. package/dist/{vue-ui-donut-evolution-r6wIb3Tt.js → vue-ui-donut-evolution-ASmhsxgl.js} +9 -9
  53. package/dist/{vue-ui-donut-evolution-DzkcS9ET.cjs → vue-ui-donut-evolution-R7XCcHKT.cjs} +1 -1
  54. package/dist/{vue-ui-dumbbell-D3pvOoxP.js → vue-ui-dumbbell-Bnx1whQL.js} +8 -8
  55. package/dist/{vue-ui-dumbbell-DSSBvwhU.cjs → vue-ui-dumbbell-DOf__qbw.cjs} +1 -1
  56. package/dist/{vue-ui-flow-CCMFNXxy.js → vue-ui-flow-Cpt4rGww.js} +7 -7
  57. package/dist/{vue-ui-flow-Cp7EQLnA.cjs → vue-ui-flow-DESqaa_D.cjs} +1 -1
  58. package/dist/{vue-ui-galaxy-DHXdjlQl.cjs → vue-ui-galaxy-lyWd6uQ2.cjs} +1 -1
  59. package/dist/{vue-ui-galaxy-BVu0ZEeg.js → vue-ui-galaxy-yll2l5no.js} +9 -9
  60. package/dist/{vue-ui-gauge-DRy_VLi-.js → vue-ui-gauge-DvErHglc.js} +5 -5
  61. package/dist/{vue-ui-gauge-nnDuY2_P.cjs → vue-ui-gauge-_imuFpna.cjs} +1 -1
  62. package/dist/{vue-ui-gizmo-Bhqq90Gt.cjs → vue-ui-gizmo-BoTTd12O.cjs} +1 -1
  63. package/dist/{vue-ui-gizmo-B8rEv-J5.js → vue-ui-gizmo-CcJZ1BaJ.js} +2 -2
  64. package/dist/{vue-ui-heatmap-DoEghJHO.cjs → vue-ui-heatmap-BfVdowyK.cjs} +1 -1
  65. package/dist/{vue-ui-heatmap-CESWvx6H.js → vue-ui-heatmap-DJ1FMowz.js} +8 -8
  66. package/dist/{vue-ui-kpi-CHrIMR-b.cjs → vue-ui-kpi-BtOxRhb1.cjs} +1 -1
  67. package/dist/{vue-ui-kpi-CBH1WOLl.js → vue-ui-kpi-tyv7wQWA.js} +3 -3
  68. package/dist/{vue-ui-mini-loader-YjK49sOM.js → vue-ui-mini-loader-BZSFz3n8.js} +2 -2
  69. package/dist/{vue-ui-mini-loader-CP5HRcth.cjs → vue-ui-mini-loader-DAp6v1OO.cjs} +1 -1
  70. package/dist/{vue-ui-molecule-CZDSsnRY.js → vue-ui-molecule-B_IidHvj.js} +9 -9
  71. package/dist/{vue-ui-molecule-BIuegM-N.cjs → vue-ui-molecule-DRC62I9B.cjs} +1 -1
  72. package/dist/{vue-ui-mood-radar-CcnUPS5r.js → vue-ui-mood-radar-BdYscbyC.js} +9 -9
  73. package/dist/{vue-ui-mood-radar-DYTpiKG1.cjs → vue-ui-mood-radar-DTVywXlL.cjs} +1 -1
  74. package/dist/{vue-ui-nested-donuts-Dk0HSrH4.js → vue-ui-nested-donuts-Bw0Iifx1.js} +9 -9
  75. package/dist/{vue-ui-nested-donuts-CvPo6PIH.cjs → vue-ui-nested-donuts-EPd_poHo.cjs} +1 -1
  76. package/dist/{vue-ui-onion-C_Dy0awV.cjs → vue-ui-onion-4ULM84d3.cjs} +1 -1
  77. package/dist/{vue-ui-onion-C93R_Klx.js → vue-ui-onion-B9wG-dIS.js} +9 -9
  78. package/dist/{vue-ui-parallel-coordinate-plot-aEJjFh7V.js → vue-ui-parallel-coordinate-plot-5T4gwxht.js} +10 -10
  79. package/dist/{vue-ui-parallel-coordinate-plot-Do8zOqso.cjs → vue-ui-parallel-coordinate-plot-BUfuDzc3.cjs} +1 -1
  80. package/dist/{vue-ui-quadrant-7zsx3EOw.js → vue-ui-quadrant-C8Gob7gq.js} +10 -10
  81. package/dist/{vue-ui-quadrant-CMP5gv34.cjs → vue-ui-quadrant-Dr5JjCka.cjs} +1 -1
  82. package/dist/{vue-ui-quick-chart-DlKpBf-X.cjs → vue-ui-quick-chart-8GGtO2tf.cjs} +1 -1
  83. package/dist/{vue-ui-quick-chart-yGY2-cME.js → vue-ui-quick-chart-CFHyJ7rZ.js} +6 -6
  84. package/dist/{vue-ui-radar-CBAE5b_H.js → vue-ui-radar-Cr1Mb9Bx.js} +10 -10
  85. package/dist/{vue-ui-radar-FvOQWErL.cjs → vue-ui-radar-Dy5kHYce.cjs} +1 -1
  86. package/dist/{vue-ui-rating-D4ytgNsW.cjs → vue-ui-rating-BDKvG8bm.cjs} +1 -1
  87. package/dist/{vue-ui-rating-DCX9Hr51.js → vue-ui-rating-ClL1a6MY.js} +2 -2
  88. package/dist/{vue-ui-relation-circle-C0t4M_Eb.cjs → vue-ui-relation-circle-Cq__UW9k.cjs} +1 -1
  89. package/dist/{vue-ui-relation-circle-C5uvdRCs.js → vue-ui-relation-circle-oVSySfff.js} +5 -5
  90. package/dist/{vue-ui-rings-Cx9I0XCp.js → vue-ui-rings-B7381qCZ.js} +9 -9
  91. package/dist/{vue-ui-rings-CljU3aO-.cjs → vue-ui-rings-C8g7Xj86.cjs} +1 -1
  92. package/dist/{vue-ui-scatter-BxrCbWPm.js → vue-ui-scatter-Bh2Mjbi3.js} +10 -10
  93. package/dist/{vue-ui-scatter-BkvHY89U.cjs → vue-ui-scatter-D_DPdRoK.cjs} +1 -1
  94. package/dist/{vue-ui-screenshot-Cf9NK_5w.js → vue-ui-screenshot-Bl86uY0k.js} +1 -1
  95. package/dist/{vue-ui-screenshot-B198lkuF.cjs → vue-ui-screenshot-D46q2vBL.cjs} +1 -1
  96. package/dist/{vue-ui-skeleton-DpqVx122.cjs → vue-ui-skeleton-CHI4nqtV.cjs} +1 -1
  97. package/dist/{vue-ui-skeleton-DogpCRv2.js → vue-ui-skeleton-DtWvFTM9.js} +2 -2
  98. package/dist/{vue-ui-smiley-wnlpDBHn.js → vue-ui-smiley-BCsFzW-q.js} +2 -2
  99. package/dist/{vue-ui-smiley-Hv5SONWU.cjs → vue-ui-smiley-CvpjObu1.cjs} +1 -1
  100. package/dist/{vue-ui-spark-trend-DBFYuxbh.cjs → vue-ui-spark-trend-BGEFwDpP.cjs} +1 -1
  101. package/dist/{vue-ui-spark-trend-_STSpU0x.js → vue-ui-spark-trend-Cb1unGKY.js} +4 -4
  102. package/dist/{vue-ui-sparkbar-B2C4gKQS.js → vue-ui-sparkbar-2-EGfoOE.js} +3 -3
  103. package/dist/{vue-ui-sparkbar-D1OrFmz5.cjs → vue-ui-sparkbar-K6DV0yr0.cjs} +1 -1
  104. package/dist/{vue-ui-sparkgauge-CgX6ZpW7.cjs → vue-ui-sparkgauge-0uv6HhvN.cjs} +1 -1
  105. package/dist/{vue-ui-sparkgauge-fsJt_SRA.js → vue-ui-sparkgauge-DdQDS2KM.js} +3 -3
  106. package/dist/{vue-ui-sparkhistogram-gue0JMvB.js → vue-ui-sparkhistogram-CQOY13sM.js} +4 -4
  107. package/dist/{vue-ui-sparkhistogram-CV8k8NPB.cjs → vue-ui-sparkhistogram-DV6-Hmhz.cjs} +1 -1
  108. package/dist/{vue-ui-sparkline-ClFxAQkz.js → vue-ui-sparkline-Cnu3UnAn.js} +3 -3
  109. package/dist/{vue-ui-sparkline-DN7RZ5FX.cjs → vue-ui-sparkline-oYEzsMF2.cjs} +1 -1
  110. package/dist/{vue-ui-sparkstackbar-3D6MkgTR.js → vue-ui-sparkstackbar-CoHqnRmF.js} +3 -3
  111. package/dist/{vue-ui-sparkstackbar-Dxy0P3xJ.cjs → vue-ui-sparkstackbar-vJoAUAZJ.cjs} +1 -1
  112. package/dist/{vue-ui-stackbar-DAFHq-wh.js → vue-ui-stackbar-BGNfdn6K.js} +10 -10
  113. package/dist/{vue-ui-stackbar-BY0bcCBX.cjs → vue-ui-stackbar-BKiUGEDc.cjs} +1 -1
  114. package/dist/{vue-ui-strip-plot-B3ItWHyf.js → vue-ui-strip-plot-CPXr1Unl.js} +9 -9
  115. package/dist/{vue-ui-strip-plot-lfB-YBkt.cjs → vue-ui-strip-plot-DTvz7qPm.cjs} +1 -1
  116. package/dist/{vue-ui-table-Dxc80GV0.js → vue-ui-table-BkY3KOTh.js} +1 -1
  117. package/dist/{vue-ui-table-CiksARcd.cjs → vue-ui-table-XywHpa9F.cjs} +1 -1
  118. package/dist/{vue-ui-table-heatmap-C_Wr83fl.cjs → vue-ui-table-heatmap-CiRaCqLh.cjs} +1 -1
  119. package/dist/{vue-ui-table-heatmap-AI2JeTUR.js → vue-ui-table-heatmap-Ft_4H5TG.js} +4 -4
  120. package/dist/{vue-ui-table-sparkline-D2KWAYWO.js → vue-ui-table-sparkline-CXD6RQwT.js} +5 -5
  121. package/dist/{vue-ui-table-sparkline-BPYQI2Vo.cjs → vue-ui-table-sparkline-c_fn53DV.cjs} +1 -1
  122. package/dist/{vue-ui-thermometer-BopRBXkF.cjs → vue-ui-thermometer-Cm-phIMA.cjs} +1 -1
  123. package/dist/{vue-ui-thermometer-szsOVqgO.js → vue-ui-thermometer-DPv-QZyR.js} +5 -5
  124. package/dist/{vue-ui-timer-Ctcaiaej.cjs → vue-ui-timer-B-1okA9J.cjs} +1 -1
  125. package/dist/{vue-ui-timer-CpuqP9iZ.js → vue-ui-timer-B_e8jeFu.js} +4 -4
  126. package/dist/{vue-ui-tiremarks-9P4vBFZV.js → vue-ui-tiremarks-BTx3UPF6.js} +5 -5
  127. package/dist/{vue-ui-tiremarks-Cge2TXFU.cjs → vue-ui-tiremarks-n429npvo.cjs} +1 -1
  128. package/dist/{vue-ui-treemap-BxdorPsS.cjs → vue-ui-treemap-C6dlrtc-.cjs} +1 -1
  129. package/dist/{vue-ui-treemap-CLOwIrHN.js → vue-ui-treemap-Df7c03TV.js} +9 -9
  130. package/dist/{vue-ui-vertical-bar-BREOjM7U.cjs → vue-ui-vertical-bar-D04Qa1Ve.cjs} +1 -1
  131. package/dist/{vue-ui-vertical-bar-Br8Slvab.js → vue-ui-vertical-bar-bipz8aIc.js} +9 -9
  132. package/dist/{vue-ui-waffle-CPqrsii3.cjs → vue-ui-waffle-1JK9OthJ.cjs} +1 -1
  133. package/dist/{vue-ui-waffle-B62b9gwj.js → vue-ui-waffle-Dc-Drk3w.js} +9 -9
  134. package/dist/{vue-ui-wheel-B3Nw-ICG.js → vue-ui-wheel-CTD6Bxrd.js} +5 -5
  135. package/dist/{vue-ui-wheel-HqeFI8W9.cjs → vue-ui-wheel-w2xLqgyW.cjs} +1 -1
  136. package/dist/{vue-ui-word-cloud-HgAIxI93.js → vue-ui-word-cloud-DO8E-MmK.js} +7 -7
  137. package/dist/{vue-ui-word-cloud-B_W87vAs.cjs → vue-ui-word-cloud-DxIS-nBr.cjs} +1 -1
  138. package/dist/{vue-ui-xy-DpqyiCx6.js → vue-ui-xy-CM5MM7qx.js} +337 -316
  139. package/dist/{vue-ui-xy-canvas-CjGlVtb_.js → vue-ui-xy-canvas-Any2UpuS.js} +10 -10
  140. package/dist/{vue-ui-xy-canvas-5f_5ULEA.cjs → vue-ui-xy-canvas-Dg1-pLp8.cjs} +1 -1
  141. package/dist/vue-ui-xy-y3ThqwCN.cjs +3 -0
  142. package/package.json +1 -1
  143. package/dist/Slicer-BCr6bV0X.cjs +0 -1
  144. package/dist/Slicer-I9LVm-u8.js +0 -156
  145. package/dist/index-CEhe8nzy.cjs +0 -4
  146. package/dist/vue-ui-donut-C4bFM2ww.cjs +0 -1
  147. package/dist/vue-ui-xy-CWQd12R4.cjs +0 -3
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CEhe8nzy.cjs"),W=require("./Title-NelrBSGO.cjs"),B=require("./usePrinter-AfD8nrd2.cjs"),G=require("./Legend-DjuRskVd.cjs"),k=require("./BaseIcon-NNgCqsH0.cjs"),U=require("./DataTable-BGF6x8iX.cjs"),H=require("./vue-ui-skeleton-DpqVx122.cjs"),R=require("./vue-ui-accordion-CS2POBdq.cjs"),E=require("./useNestedProp-CcMb2mLY.cjs"),X=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Y=["xmlns","viewBox"],J=["id"],Q=["stop-color"],Z=["stop-color"],ee=["x1","y1","x2","y2","stroke","stroke-width"],te=["d","stroke","stroke-width"],le=["stroke"],oe=["fill"],ae=["stroke"],re=["fill"],ne=["stroke"],se=["fill"],ue=["stroke"],ie=["fill"],ce=["stroke"],de=["fill"],ye=["d","stroke","stroke-width","fill"],ve=["x1","y1","stroke"],me=["cx","cy","fill","stroke"],he=["fill","stroke"],fe=["y","fill","font-weight"],ke=["y","fill"],pe={key:3,class:"vue-data-ui-watermark"},ge=["onClick"],be={style:{"font-weight":"bold"}},Ce=["innerHTML"],Ne={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(L,{expose:S}){const s=L,{vue_ui_mood_radar:T}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})});const h=e.ref(r.createUid()),N=e.ref(null),A=e.ref(null),n=e.ref(null),t=e.computed(()=>{const o=E.useNestedProp({userConfig:s.config,defaultConfig:T});return o.theme?{...E.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[o.theme]||s.config,defaultConfig:o})}:o}),{isPrinting:x,isImaging:w,generatePdf:_,generateImage:V}=B.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),p=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function I({centerX:o,centerY:a,apexX:l,apexY:u,proportion:c,key:f,value:q}){return{x:o+(l-o)*c,y:a+(u-a)*c,key:f,value:q}}const F=e.computed(()=>Math.max(...Object.values(s.dataset).map(o=>isNaN(o)?0:o))),v=e.computed(()=>Object.values(s.dataset).reduce((o,a)=>(isNaN(o)?0:o)+(isNaN(a)?0:a),0)),i=e.computed(()=>Object.keys(s.dataset).map((o,a)=>{const l=typeof s.dataset[o]!="number"||isNaN(s.dataset[o])?0:s.dataset[o];return{index:a,key:o,value:l,proportion:l/v.value,color:t.value.style.chart.layout.smileys.colors[o]}}).sort((o,a)=>a.key-o.key)),$=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(o=>{[null,void 0].includes(s.dataset[o])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:o})}),C.value.coordinates.map((o,a)=>{const l=I({centerX:d.value.width/2,centerY:d.value.height/2,apexX:o.x,apexY:o.y,proportion:i.value[a].value/F.value,key:i.value[a].key,value:i.value[a].value});return{...o,plots:l,key:i.value[a].key}})):[]),O=e.computed(()=>({cy:"mood-radar-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":""}));function D(o){o===n.value?n.value=null:n.value=o}const y=e.computed(()=>{const o=i.value.map(l=>({name:l.key,color:l.color})),a=i.value.map(l=>isNaN(l.value)?0:l.value);return{head:o,body:a}});function M(){e.nextTick(()=>{const o=y.value.head.map((u,c)=>[[u.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=e.computed(()=>{const o=[' <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>',Number(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,f)=>[{color:c.color,name:c.name},y.value.body[f].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[f]/v.value)?"-":(y.value.body[f]/v.value*100).toFixed(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},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:o,body:a,config:l,colNames:u}});function z(){return i.value}function P(){p.value.showTable=!p.value.showTable}const b=e.ref(!1);function j(o){b.value=o}return S({getData:z,generatePdf:_,generateCsv:M,generateImage:V,toggleTable:P}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:N,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(W._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(B.UserOptions,{key:1,ref_key:"details",ref:A,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(x),isImaging:e.unref(w),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,onToggleFullscreen:j,onGeneratePdf:e.unref(_),onGenerateCsv:M,onGenerateImage:e.unref(V),onToggleTable:P},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.layout.dataPolygon.color+e.unref(r.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100)}${e.unref(r.opacity)[t.value.style.chart.layout.dataPolygon.opacity]}`},null,8,Z)],8,J)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.coordinates,l=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.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,ee))),256)),e.createElementVNode("path",{d:C.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,te),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,le),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=l=>n.value=5),onMouseleave:a[1]||(a[1]=l=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?t.value.style.chart.layout.smileys.colors[5]+"33":"transparent"},null,40,oe),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,ae),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=l=>n.value=4),onMouseleave:a[3]||(a[3]=l=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?t.value.style.chart.layout.smileys.colors[4]+"33":"transparent"},null,40,re),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,ne),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=l=>n.value=3),onMouseleave:a[5]||(a[5]=l=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?t.value.style.chart.layout.smileys.colors[3]+"33":"transparent"},null,40,se),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,ue),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=l=>n.value=2),onMouseleave:a[7]||(a[7]=l=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?t.value.style.chart.layout.smileys.colors[2]+"33":"transparent"},null,40,ie),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,ce),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=l=>n.value=1),onMouseleave:a[9]||(a[9]=l=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?t.value.style.chart.layout.smileys.colors[1]+"33":"transparent"},null,40,de),e.createElementVNode("path",{d:e.unref(r.makePath)($.value.map(l=>l.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:t.value.style.chart.layout.dataPolygon.color+e.unref(r.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,ye),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value.map(l=>l.plots),(l,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==l.key?"1":"0"}`)},[e.createElementVNode("line",{x1:l.x,y1:l.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,ve),e.createElementVNode("circle",{cx:l.x,cy:l.y,fill:t.value.style.chart.layout.smileys.colors[l.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,me),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[l.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,he),e.createElementVNode("text",{x:128,y:["5",5].includes(l.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:l.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:l,seriesIndex:u})),9,fe),e.createElementVNode("text",{x:128,y:["5",5].includes(l.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:l.value/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,ke)],4))),256)),e.renderSlot(o.$slots,"svg",{svg:d.value},void 0,!0)],14,Y)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",pe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(x)||e.unref(w)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(H.default,{key:4,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(G.Legend,{key:5,legendSet:i.value,config:O.value,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:l,index:u})=>[e.createElementVNode("div",{onClick:()=>D(l.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[l.key==1?(e.openBlock(),e.createBlock(k.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==2?(e.openBlock(),e.createBlock(k.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==3?(e.openBlock(),e.createBlock(k.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==4?(e.openBlock(),e.createBlock(k.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==5?(e.openBlock(),e.createBlock(k.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",be,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:l.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:l,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:l.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,ge)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:i.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(R.default,{key:6,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(U.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.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[10]||(a[10]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ce)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,K))}},xe=X._export_sfc(Ne,[["__scopeId","data-v-1399dfb6"]]);exports.default=xe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DGxA8bUJ.cjs"),W=require("./Title-CUtmTGbN.cjs"),B=require("./usePrinter-DbJ9I2vE.cjs"),G=require("./Legend-lleMcfy9.cjs"),k=require("./BaseIcon-DQUa2wbN.cjs"),U=require("./DataTable-pfsiGYAz.cjs"),H=require("./vue-ui-skeleton-CHI4nqtV.cjs"),R=require("./vue-ui-accordion-Bs0EHuxc.cjs"),E=require("./useNestedProp-DM4rgjhE.cjs"),X=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Y=["xmlns","viewBox"],J=["id"],Q=["stop-color"],Z=["stop-color"],ee=["x1","y1","x2","y2","stroke","stroke-width"],te=["d","stroke","stroke-width"],le=["stroke"],oe=["fill"],ae=["stroke"],re=["fill"],ne=["stroke"],se=["fill"],ue=["stroke"],ie=["fill"],ce=["stroke"],de=["fill"],ye=["d","stroke","stroke-width","fill"],ve=["x1","y1","stroke"],me=["cx","cy","fill","stroke"],he=["fill","stroke"],fe=["y","fill","font-weight"],ke=["y","fill"],pe={key:3,class:"vue-data-ui-watermark"},ge=["onClick"],be={style:{"font-weight":"bold"}},Ce=["innerHTML"],Ne={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(L,{expose:S}){const s=L,{vue_ui_mood_radar:T}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})});const h=e.ref(r.createUid()),N=e.ref(null),A=e.ref(null),n=e.ref(null),t=e.computed(()=>{const o=E.useNestedProp({userConfig:s.config,defaultConfig:T});return o.theme?{...E.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[o.theme]||s.config,defaultConfig:o})}:o}),{isPrinting:x,isImaging:w,generatePdf:_,generateImage:V}=B.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),p=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function I({centerX:o,centerY:a,apexX:l,apexY:u,proportion:c,key:f,value:q}){return{x:o+(l-o)*c,y:a+(u-a)*c,key:f,value:q}}const F=e.computed(()=>Math.max(...Object.values(s.dataset).map(o=>isNaN(o)?0:o))),v=e.computed(()=>Object.values(s.dataset).reduce((o,a)=>(isNaN(o)?0:o)+(isNaN(a)?0:a),0)),i=e.computed(()=>Object.keys(s.dataset).map((o,a)=>{const l=typeof s.dataset[o]!="number"||isNaN(s.dataset[o])?0:s.dataset[o];return{index:a,key:o,value:l,proportion:l/v.value,color:t.value.style.chart.layout.smileys.colors[o]}}).sort((o,a)=>a.key-o.key)),$=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(o=>{[null,void 0].includes(s.dataset[o])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:o})}),C.value.coordinates.map((o,a)=>{const l=I({centerX:d.value.width/2,centerY:d.value.height/2,apexX:o.x,apexY:o.y,proportion:i.value[a].value/F.value,key:i.value[a].key,value:i.value[a].value});return{...o,plots:l,key:i.value[a].key}})):[]),O=e.computed(()=>({cy:"mood-radar-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":""}));function D(o){o===n.value?n.value=null:n.value=o}const y=e.computed(()=>{const o=i.value.map(l=>({name:l.key,color:l.color})),a=i.value.map(l=>isNaN(l.value)?0:l.value);return{head:o,body:a}});function M(){e.nextTick(()=>{const o=y.value.head.map((u,c)=>[[u.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=e.computed(()=>{const o=[' <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>',Number(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,f)=>[{color:c.color,name:c.name},y.value.body[f].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[f]/v.value)?"-":(y.value.body[f]/v.value*100).toFixed(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},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:o,body:a,config:l,colNames:u}});function z(){return i.value}function P(){p.value.showTable=!p.value.showTable}const b=e.ref(!1);function j(o){b.value=o}return S({getData:z,generatePdf:_,generateCsv:M,generateImage:V,toggleTable:P}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:N,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(W._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(B.UserOptions,{key:1,ref_key:"details",ref:A,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(x),isImaging:e.unref(w),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,onToggleFullscreen:j,onGeneratePdf:e.unref(_),onGenerateCsv:M,onGenerateImage:e.unref(V),onToggleTable:P},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.layout.dataPolygon.color+e.unref(r.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100)}${e.unref(r.opacity)[t.value.style.chart.layout.dataPolygon.opacity]}`},null,8,Z)],8,J)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.coordinates,l=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.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,ee))),256)),e.createElementVNode("path",{d:C.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,te),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,le),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=l=>n.value=5),onMouseleave:a[1]||(a[1]=l=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?t.value.style.chart.layout.smileys.colors[5]+"33":"transparent"},null,40,oe),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,ae),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=l=>n.value=4),onMouseleave:a[3]||(a[3]=l=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?t.value.style.chart.layout.smileys.colors[4]+"33":"transparent"},null,40,re),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,ne),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=l=>n.value=3),onMouseleave:a[5]||(a[5]=l=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?t.value.style.chart.layout.smileys.colors[3]+"33":"transparent"},null,40,se),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,ue),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=l=>n.value=2),onMouseleave:a[7]||(a[7]=l=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?t.value.style.chart.layout.smileys.colors[2]+"33":"transparent"},null,40,ie),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,ce),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=l=>n.value=1),onMouseleave:a[9]||(a[9]=l=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?t.value.style.chart.layout.smileys.colors[1]+"33":"transparent"},null,40,de),e.createElementVNode("path",{d:e.unref(r.makePath)($.value.map(l=>l.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:t.value.style.chart.layout.dataPolygon.color+e.unref(r.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,ye),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value.map(l=>l.plots),(l,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==l.key?"1":"0"}`)},[e.createElementVNode("line",{x1:l.x,y1:l.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,ve),e.createElementVNode("circle",{cx:l.x,cy:l.y,fill:t.value.style.chart.layout.smileys.colors[l.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,me),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[l.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,he),e.createElementVNode("text",{x:128,y:["5",5].includes(l.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:l.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:l,seriesIndex:u})),9,fe),e.createElementVNode("text",{x:128,y:["5",5].includes(l.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:l.value/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,ke)],4))),256)),e.renderSlot(o.$slots,"svg",{svg:d.value},void 0,!0)],14,Y)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",pe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(x)||e.unref(w)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(H.default,{key:4,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(G.Legend,{key:5,legendSet:i.value,config:O.value,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:l,index:u})=>[e.createElementVNode("div",{onClick:()=>D(l.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[l.key==1?(e.openBlock(),e.createBlock(k.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==2?(e.openBlock(),e.createBlock(k.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==3?(e.openBlock(),e.createBlock(k.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==4?(e.openBlock(),e.createBlock(k.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==5?(e.openBlock(),e.createBlock(k.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",be,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:l.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:l,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:l.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,ge)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:i.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(R.default,{key:6,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(U.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.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[10]||(a[10]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ce)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,K))}},xe=X._export_sfc(Ne,[["__scopeId","data-v-1399dfb6"]]);exports.default=xe;
@@ -1,14 +1,14 @@
1
1
  import { computed as L, ref as c, onMounted as Be, onBeforeUnmount as Ue, watch as Re, openBlock as u, createElementBlock as n, normalizeClass as z, normalizeStyle as se, createVNode as ue, createCommentVNode as y, createBlock as H, unref as r, createSlots as Ee, withCtx as m, renderSlot as _, normalizeProps as q, guardReactiveProps as J, createElementVNode as b, Fragment as w, renderList as $, toDisplayString as F, createTextVNode as K, nextTick as Ge, pushScopeId as Ye, popScopeId as Xe } from "vue";
2
- import { u as We, c as He, t as qe, a as Je, p as Q, o as Ke, e as O, b as Qe, d as Ze, m as Ce, f as C, X as je, F as et, k as A, n as ne, i as R, w as Se, x as tt, q as lt, r as at } from "./index-C1-FJ0sT.js";
2
+ import { u as We, c as He, t as qe, a as Je, p as Q, o as Ke, e as O, b as Qe, d as Ze, m as Ce, f as C, X as je, F as et, k as A, n as ne, i as R, w as Se, x as tt, q as lt, r as at } from "./index-CAkeI2u7.js";
3
3
  import { t as ot, u as st } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as ut } from "./Title-D8HoSXgM.js";
5
- import { u as nt, U as rt } from "./usePrinter-B1a6uNio.js";
6
- import { D as it } from "./DataTable-CkeQ7c6_.js";
7
- import { _ as dt } from "./Tooltip-DTwn_FW5.js";
8
- import { L as ct } from "./Legend-aFYc_s9T.js";
9
- import vt from "./vue-ui-skeleton-DogpCRv2.js";
10
- import ht from "./vue-ui-accordion-BLoKd0D-.js";
11
- import { u as Ne } from "./useNestedProp-1fJhHDhT.js";
4
+ import { _ as ut } from "./Title-DZ-9X7T_.js";
5
+ import { u as nt, U as rt } from "./usePrinter-MbSdbzew.js";
6
+ import { D as it } from "./DataTable-97z7jeB3.js";
7
+ import { _ as dt } from "./Tooltip-BE1vKyP4.js";
8
+ import { L as ct } from "./Legend-Dc30ZC8U.js";
9
+ import vt from "./vue-ui-skeleton-DtWvFTM9.js";
10
+ import ht from "./vue-ui-accordion-BbsnFhS8.js";
11
+ import { u as Ne } from "./useNestedProp-N72tOTWX.js";
12
12
  import { _ as ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const re = (V) => (Ye("data-v-57753849"), V = V(), Xe(), V), yt = ["id"], bt = ["xmlns", "viewBox"], pt = ["id", "fr"], gt = /* @__PURE__ */ re(() => /* @__PURE__ */ b("stop", {
14
14
  offset: "0%",
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CEhe8nzy.cjs"),ae=require("./useResponsive-B3TrDDIG.cjs"),ye=require("./Title-NelrBSGO.cjs"),oe=require("./usePrinter-AfD8nrd2.cjs"),me=require("./DataTable-BGF6x8iX.cjs"),be=require("./Tooltip-CK94hatv.cjs"),ge=require("./Legend-DjuRskVd.cjs"),ke=require("./vue-ui-skeleton-DpqVx122.cjs"),Ce=require("./vue-ui-accordion-CS2POBdq.cjs"),ne=require("./useNestedProp-CcMb2mLY.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=x=>(e.pushScopeId("data-v-57753849"),x=x(),e.popScopeId(),x),xe=["id"],we=["xmlns","viewBox"],Be=["id","fr"],_e=A(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Ne=["offset","stop-opacity"],$e=A(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Se=["id"],Ee=["id"],Ve=A(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Fe=["id"],Te=["flood-color"],De=["cx","cy","r","fill","filter"],ze=["d","fill","stroke","stroke-width","filter"],Pe={key:0},Ie=["d","fill"],Oe={key:1},Ae=["x","y","font-size","font-weight","fill"],Me={key:2},Re=["filter"],Ue=["text-anchor","x","y","fill","font-size","font-weight"],qe=["text-anchor","x","y","fill","font-size","font-weight"],Ye=["text-anchor","x","y","fill","font-size","font-weight"],Xe=["d","fill","onMouseenter","onClick"],Ge={key:3,class:"vue-data-ui-watermark"},We={key:0,class:"vue-ui-nested-donuts-legend-title"},He=["onClick"],Je=["innerHTML"],Ke={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(x,{expose:re,emit:M}){const C=x,{vue_ui_nested_donuts:se}=r.useConfig(),N=e.computed(()=>!!C.dataset&&C.dataset.length),f=e.ref(r.createUid()),F=e.ref(!1),T=e.ref(""),ue=e.ref(null),R=e.ref(0),w=e.ref(null),U=e.ref(null),D=e.ref(null),B=e.ref(!1);function ie(l){B.value=l,R.value+=1}const t=e.computed(()=>{const l=ne.useNestedProp({userConfig:C.config,defaultConfig:se});return l.theme?{...ne.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||C.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),$=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(C.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=ae.throttle(()=>{const{width:s,height:a}=ae.useResponsive({chart:w.value,title:t.value.style.chart.title.text?U.value:null,legend:t.value.style.chart.legend.show?D.value:null});c.value.width=s,c.value.height=a});$.value=new ResizeObserver(l),$.value.observe(w.value.parentNode)}}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:q,isImaging:Y,generatePdf:X,generateImage:G}=oe.usePrinter({elementId:`nested_donuts_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),ce=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),p=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),c=e.ref({height:512,width:512});function de({datapoint:l,index:s}){M("selectDatapoint",{datapoint:l,index:s})}const v=e.ref([]),m=e.computed(()=>(C.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((a,o)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:o,key:"serie"}),[null,void 0].includes(a.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:o,key:"serie"})})}),C.dataset.map((l,s)=>({...l,total:l.series.filter(a=>!v.value.includes(a.id)).map(a=>(a.values||[]).reduce((o,n)=>o+n,0)).reduce((a,o)=>a+o,0),datasetIndex:s,id:`${f.value}_${s}`,series:l.series.map((a,o)=>({name:a.name,arcOf:l.name,arcOfId:`${f.value}_${s}`,id:`${f.value}_${s}_${o}`,seriesIndex:o,datasetIndex:s,color:r.convertColorToHex(a.color)||ce.value[o]||r.palette[o]||r.palette[o%r.palette.length],value:(a.values||[]).reduce((n,u)=>n+u,0),absoluteValues:a.values||[]}))}))));e.ref(t.value.style.chart.layout.donut.strokeWidth);const b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),W=e.computed(()=>[...m.value].map((l,s)=>{const a=l.series.filter(o=>!v.value.includes(o.id)).map(o=>o.value).reduce((o,n)=>o+n,0);return{...l,total:a,series:l.series.filter(o=>!v.value.includes(o.id)).map(o=>({...o,proportion:o.value/a}))}}));function ve(l,s,a){let o=0;for(let n=0;n<l.length;n+=1)a.includes(l[n])&&(o+=1);return o<s}const d=e.ref(W.value);e.watch(()=>W.value,l=>d.value=l);const H=e.ref(null),J=e.ref(null);function z(l){M("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),a=d.value.flatMap(i=>i.series).find(i=>i.id===l.id);let n=a?a.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),h=ve(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){n>s.value?(cancelAnimationFrame(H.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(n+=s.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:n}:g)})),H.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(h){let i=function(){n<.1?(cancelAnimationFrame(J.value),v.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:0}:L)}))):(n/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:n}:L)})),J.value=requestAnimationFrame(i))};i()}}const _=e.computed(()=>d.value.map((l,s)=>{const a=s*b.value/m.value.length;return{...l,radius:b.value-a,donut:r.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-a,b.value-a,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)}})),K=e.computed(()=>[...m.value].map((l,s)=>{const a=s*b.value/m.value.length;return{sizeRatio:a,donut:r.makeDonut({series:[{value:1}]},c.value.width/2,c.value.height/2,b.value-a,b.value-a,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),Q=e.ref(null),S=e.ref(null),E=e.ref(null),P=e.ref(null);function fe({datapoint:l,_relativeIndex:s,seriesIndex:a}){Q.value=l.arcOfId,S.value=l.id,E.value=a,P.value={datapoint:l,seriesIndex:a,series:d.value,config:t.value};const o=t.value.style.chart.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:a,datapoint:l,series:d.value,config:t.value})))T.value=o({seriesIndex:a,datapoint:l,series:d.value,config:t.value});else{let n="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=d.value.map(h=>h.series.find(i=>i.seriesIndex===a));u.forEach((h,i)=>{if(!h)return"";n+=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DGxA8bUJ.cjs"),ae=require("./useResponsive-B3TrDDIG.cjs"),ye=require("./Title-CUtmTGbN.cjs"),oe=require("./usePrinter-DbJ9I2vE.cjs"),me=require("./DataTable-pfsiGYAz.cjs"),be=require("./Tooltip-DhxfsNhL.cjs"),ge=require("./Legend-lleMcfy9.cjs"),ke=require("./vue-ui-skeleton-CHI4nqtV.cjs"),Ce=require("./vue-ui-accordion-Bs0EHuxc.cjs"),ne=require("./useNestedProp-DM4rgjhE.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=x=>(e.pushScopeId("data-v-57753849"),x=x(),e.popScopeId(),x),xe=["id"],we=["xmlns","viewBox"],Be=["id","fr"],_e=A(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Ne=["offset","stop-opacity"],$e=A(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Se=["id"],Ee=["id"],Ve=A(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Fe=["id"],Te=["flood-color"],De=["cx","cy","r","fill","filter"],ze=["d","fill","stroke","stroke-width","filter"],Pe={key:0},Ie=["d","fill"],Oe={key:1},Ae=["x","y","font-size","font-weight","fill"],Me={key:2},Re=["filter"],Ue=["text-anchor","x","y","fill","font-size","font-weight"],qe=["text-anchor","x","y","fill","font-size","font-weight"],Ye=["text-anchor","x","y","fill","font-size","font-weight"],Xe=["d","fill","onMouseenter","onClick"],Ge={key:3,class:"vue-data-ui-watermark"},We={key:0,class:"vue-ui-nested-donuts-legend-title"},He=["onClick"],Je=["innerHTML"],Ke={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(x,{expose:re,emit:M}){const C=x,{vue_ui_nested_donuts:se}=r.useConfig(),N=e.computed(()=>!!C.dataset&&C.dataset.length),f=e.ref(r.createUid()),F=e.ref(!1),T=e.ref(""),ue=e.ref(null),R=e.ref(0),w=e.ref(null),U=e.ref(null),D=e.ref(null),B=e.ref(!1);function ie(l){B.value=l,R.value+=1}const t=e.computed(()=>{const l=ne.useNestedProp({userConfig:C.config,defaultConfig:se});return l.theme?{...ne.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||C.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),$=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(C.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=ae.throttle(()=>{const{width:s,height:a}=ae.useResponsive({chart:w.value,title:t.value.style.chart.title.text?U.value:null,legend:t.value.style.chart.legend.show?D.value:null});c.value.width=s,c.value.height=a});$.value=new ResizeObserver(l),$.value.observe(w.value.parentNode)}}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:q,isImaging:Y,generatePdf:X,generateImage:G}=oe.usePrinter({elementId:`nested_donuts_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),ce=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),p=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),c=e.ref({height:512,width:512});function de({datapoint:l,index:s}){M("selectDatapoint",{datapoint:l,index:s})}const v=e.ref([]),m=e.computed(()=>(C.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((a,o)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:o,key:"serie"}),[null,void 0].includes(a.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:o,key:"serie"})})}),C.dataset.map((l,s)=>({...l,total:l.series.filter(a=>!v.value.includes(a.id)).map(a=>(a.values||[]).reduce((o,n)=>o+n,0)).reduce((a,o)=>a+o,0),datasetIndex:s,id:`${f.value}_${s}`,series:l.series.map((a,o)=>({name:a.name,arcOf:l.name,arcOfId:`${f.value}_${s}`,id:`${f.value}_${s}_${o}`,seriesIndex:o,datasetIndex:s,color:r.convertColorToHex(a.color)||ce.value[o]||r.palette[o]||r.palette[o%r.palette.length],value:(a.values||[]).reduce((n,u)=>n+u,0),absoluteValues:a.values||[]}))}))));e.ref(t.value.style.chart.layout.donut.strokeWidth);const b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),W=e.computed(()=>[...m.value].map((l,s)=>{const a=l.series.filter(o=>!v.value.includes(o.id)).map(o=>o.value).reduce((o,n)=>o+n,0);return{...l,total:a,series:l.series.filter(o=>!v.value.includes(o.id)).map(o=>({...o,proportion:o.value/a}))}}));function ve(l,s,a){let o=0;for(let n=0;n<l.length;n+=1)a.includes(l[n])&&(o+=1);return o<s}const d=e.ref(W.value);e.watch(()=>W.value,l=>d.value=l);const H=e.ref(null),J=e.ref(null);function z(l){M("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),a=d.value.flatMap(i=>i.series).find(i=>i.id===l.id);let n=a?a.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),h=ve(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){n>s.value?(cancelAnimationFrame(H.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(n+=s.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:n}:g)})),H.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(h){let i=function(){n<.1?(cancelAnimationFrame(J.value),v.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:0}:L)}))):(n/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:n}:L)})),J.value=requestAnimationFrame(i))};i()}}const _=e.computed(()=>d.value.map((l,s)=>{const a=s*b.value/m.value.length;return{...l,radius:b.value-a,donut:r.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-a,b.value-a,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)}})),K=e.computed(()=>[...m.value].map((l,s)=>{const a=s*b.value/m.value.length;return{sizeRatio:a,donut:r.makeDonut({series:[{value:1}]},c.value.width/2,c.value.height/2,b.value-a,b.value-a,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),Q=e.ref(null),S=e.ref(null),E=e.ref(null),P=e.ref(null);function fe({datapoint:l,_relativeIndex:s,seriesIndex:a}){Q.value=l.arcOfId,S.value=l.id,E.value=a,P.value={datapoint:l,seriesIndex:a,series:d.value,config:t.value};const o=t.value.style.chart.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:a,datapoint:l,series:d.value,config:t.value})))T.value=o({seriesIndex:a,datapoint:l,series:d.value,config:t.value});else{let n="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=d.value.map(h=>h.series.find(i=>i.seriesIndex===a));u.forEach((h,i)=>{if(!h)return"";n+=`
2
2
  <div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
3
3
  <div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
4
4
  <svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-CEhe8nzy.cjs"),U=require("./useResponsive-B3TrDDIG.cjs"),se=require("./Title-NelrBSGO.cjs"),X=require("./usePrinter-AfD8nrd2.cjs"),ie=require("./Legend-DjuRskVd.cjs"),ce=require("./DataTable-BGF6x8iX.cjs"),de=require("./Tooltip-CK94hatv.cjs"),ve=require("./vue-ui-skeleton-DpqVx122.cjs"),he=require("./vue-ui-accordion-CS2POBdq.cjs"),G=require("./useNestedProp-CcMb2mLY.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],ge=["xmlns","viewBox"],me=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],ye=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],be=["id"],ke=["stdDeviation"],we=["filter"],Ce=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],xe=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],$e={key:1},Be=["onMouseenter"],Te=["x","y","font-size","fill","font-weight"],Se={key:3,class:"vue-data-ui-watermark"},Pe=["onClick"],_e=["innerHTML"],Ne={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(H,{expose:W,emit:j}){const f=H,{vue_ui_onion:J}=u.useConfig(),w=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(u.createUid()),K=e.ref(null),F=e.ref(0),C=e.ref(!1),B=e.ref(""),c=e.ref([]),y=e.ref(null),I=e.ref(null),V=e.ref(null),t=e.computed(()=>{const a=G.useNestedProp({userConfig:f.config,defaultConfig:J});return a.theme?{...G.useNestedProp({userConfig:u.themes.vue_ui_onion[a.theme]||f.config,defaultConfig:a}),customPalette:u.themePalettes[a.theme]||u.palette}:a}),{isPrinting:E,isImaging:L,generatePdf:D,generateImage:M}=X.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),Q=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),p=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),x=e.ref(null);e.onMounted(()=>{if(u.objectIsEmpty(f.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=U.throttle(()=>{const{width:l,height:o}=U.useResponsive({chart:y.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?V.value:null});n.value.width=l,n.value.height=o,n.value.padding.top=Math.max(l,o)*.125,n.value.padding.right=Math.max(l,o)*.125,n.value.padding.bottom=Math.max(l,o)*.125,n.value.padding.left=Math.max(l,o)*.125,n.value.minRadius=Math.min(l,o)*.125});x.value=new ResizeObserver(r),x.value.observe(y.value.parentNode)}}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(f.dataset.forEach((a,r)=>{[null,void 0].includes(a.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(a.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),f.dataset.map((a,r)=>{const l=`onion_serie_${r}_${m.value}`;return{...a,percentage:a.percentage||0,targetPercentage:a.percentage||0,color:u.convertColorToHex(a.color)||Q.value[r]||u.palette[r],id:l,shape:"circle",opacity:c.value.includes(l)?.5:1,absoluteIndex:r,segregate:()=>R(l),isSegregated:c.value.includes(l)}}))),b=e.ref(i.value),Z=e.computed(()=>t.value.useStartAnimation),ee=e.ref(null),te=e.computed(()=>Math.max(...i.value.map(a=>a.percentage))),T=e.ref(!1);e.watch(()=>i.value,le,{immediate:!0});function le(){if(Z.value&&!T.value){let r=function(){a>=te.value?(cancelAnimationFrame(ee.value),b.value=i.value,T.value=!0):(b.value=i.value.map(l=>({...l,percentage:a<l.targetPercentage?a:l.targetPercentage})),a+=1,requestAnimationFrame(r),T.value=!0)};b.value=i.value.map(l=>({...l,percentage:0}));let a=0;r()}else b.value=i.value}const ae=e.computed(()=>({cy:"onion-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":""})),oe=e.computed(()=>i.value.filter(a=>!c.value.includes(a.id)).length),g=e.computed(()=>{const a=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(a>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:a)*t.value.style.chart.layout.gutter.width,track:(a>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:a)*t.value.style.chart.layout.track.width}}),d=e.computed(()=>b.value.filter(a=>!c.value.includes(a.id)).map((a,r)=>{const l=(s.value.maxRadius-g.value.track)/oe.value/2*(1+r),o=s.value.centerY-l;return{percentage:a.percentage||0,...a,labelY:o,radius:l,path:re(l,a.percentage||0)}}));function re(a,r){const l=a*(1.5+(r/100>.3333333333333333?0:1-r/100))*Math.PI,o=a*1.5*Math.PI;return{bgDashArray:`${o} ${o}`,bgDashOffset:o-r/100*o,dashArray:`${l} ${l}`,dashOffset:l-r/100*l,fullOffset:0,active:`M${s.value.centerX},${s.value.centerY} A ${a},${a} 0 0 0 ${s.value.right},${s.value.top}`}}function R(a){c.value.includes(a)?c.value=c.value.filter(r=>r!==a):c.value.push(a),j("selectLegend",d.value)}function ne(){return d.value}const S=e.computed(()=>{const a=[t.value.table.translations.serie,t.value.table.translations.percentage,t.value.table.translations.value],r=d.value.map(l=>[l.name,l.percentage,l.value]);return{head:a,body:r}}),$=e.computed(()=>{const a=S.value.head,r=d.value.map(o=>[`<span style="color:${o.color}">⬤</span> ${o.name}`,`${Number(o.percentage??0).toFixed(t.value.table.td.roundingPercentage).toLocaleString()}%`,`${o.prefix||""}${[null,void 0,NaN,"NaN"].includes(o.value)?"-":o.value.toFixed(t.value.table.td.roundingValue).toLocaleString()}${o.suffix||""}`]),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:a,body:r,config:l,colNames:a}});function z(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=S.value.head,l=S.value.body,o=a.concat([r]).concat(l),h=u.createCsvContent(o);u.downloadCsv({csvContent:h,title:t.value.style.chart.title.text||"vue-ui-onion"})})}const v=e.ref(void 0),k=e.ref(!1);function ue(a){k.value=a,F.value+=1}const P=e.ref(null);function A({datapoint:a,seriesIndex:r,show:l=!0}){const o=a.absoluteIndex;v.value=r,P.value={datapoint:a,seriesIndex:o,series:i.value,config:t.value},C.value=l;let h="";const _=t.value.style.chart.tooltip.customFormat;if(u.isFunction(_)&&u.functionReturnsString(()=>_({seriesIndex:o,datapoint:a,series:i.value,config:t.value})))B.value=_({seriesIndex:o,datapoint:a,series:i.value,config:t.value});else{const N=t.value.style.chart.tooltip.showPercentage,O=t.value.style.chart.tooltip.showValue;h+=`<div style="width: 100%; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; padding-bottom: 6px;margin-bottom:3px;display:flex;flex-direction:row;gap:3px;align-items:center"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${a.color}"/></svg><span></span>${a.name}</span></div>`,h+=`<div style="width:100%;text-align:left;"><b>${N?u.dataLabel({p:"",v:a.percentage,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}):""}</b> ${N&&O?"(":""}${O?u.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,a.value,u.dataLabel({p:a.prefix||"",v:a.value,s:a.suffix||"",r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:r}):""}${N&&O?")":""}</div>`,B.value=`<div>${h}</div>`}}function q(){p.value.showTable=!p.value.showTable}function Y(){p.value.showTooltip=!p.value.showTooltip}return W({getData:ne,generatePdf:D,generateCsv:z,generateImage:M,toggleTable:q,toggleTooltip:Y}),(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-onion ${k.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"onionChart",ref:y,id:`vue-ui-onion_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:I,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(se._sfc_main,{config:{title:{cy:"onion-div-title",...t.value.style.chart.title},subtitle:{cy:"onion-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&w.value?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:K,key:`user_options${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(L),isPrinting:e.unref(E),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:k.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(D),onGenerateCsv:z,onGenerateImage:e.unref(M),onToggleTable:q,onToggleTooltip:Y},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),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),w.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${n.value.width<=0?1e-4:n.value.width} ${n.value.height<=0?1e-4:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:t.value.style.chart.layout.gutter.color,"stroke-width":g.value.gutter,fill:"none","stroke-dasharray":l.path.bgDashArray,"stroke-dashoffset":l.path.fullOffset,"stroke-linecap":"round",class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(v.value)&&v.value!==o}),style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<0?1e-4:l.radius,stroke:`${l.color}`,"stroke-width":g.value.track,fill:"none","stroke-dasharray":l.path.dashArray,"stroke-dashoffset":l.path.dashOffset,class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(v.value)&&v.value!==o}),"stroke-linecap":"round",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,ye))),256)),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.gradientIntensity},null,8,ke)],8,be)]),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",{key:0,filter:`url(#blur_${m.value})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:"white","stroke-width":g.value.track/3,fill:"none","stroke-linecap":"round","stroke-dasharray":l.path.dashArray,"stroke-dashoffset":l.path.dashOffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,Ce))),256))],8,we)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{"data-cy-trap":"",cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:"transparent","stroke-width":Math.max(g.value.track,g.value.gutter),fill:"none","stroke-dasharray":l.path.bgDashArray,"stroke-dashoffset":l.path.fullOffset,"stroke-linecap":"round",class:"vue-ui-onion-path",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"},onMouseenter:h=>A({datapoint:l,show:!0,seriesIndex:o}),onMouseleave:r[0]||(r[0]=h=>{v.value=void 0,C.value=!1})},null,40,xe))),256)),t.value.style.chart.layout.labels.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",{onMouseenter:h=>A({datapoint:l,show:!0,seriesIndex:o}),onMouseleave:r[1]||(r[1]=h=>{v.value=void 0,C.value=!1})},[c.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:0,x:n.value.width/2-g.value.gutter*.8+t.value.style.chart.layout.labels.offsetX,y:l.labelY+t.value.style.chart.layout.labels.offsetY,"text-anchor":"end","font-size":t.value.style.chart.layout.labels.fontSize,fill:t.value.useBlurOnHover&&![null,void 0].includes(v.value)&&v.value===o?l.color:t.value.style.chart.layout.labels.color,"font-weight":t.value.style.chart.layout.labels.bold?"bold":"normal"},e.toDisplayString(l.name?l.name+": ":"")+" "+e.toDisplayString(t.value.style.chart.layout.labels.percentage.show?e.unref(u.dataLabel)({v:l.percentage,s:"%",r:t.value.style.chart.layout.labels.roundingPercentage}):"")+" "+e.toDisplayString(!t.value.style.chart.layout.labels.percentage.show&&t.value.style.chart.layout.labels.value.show?`: ${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(u.dataLabel)({p:l.prefix||"",v:l.value||0,s:l.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:l,seriesIndex:o})}`:`${t.value.style.chart.layout.labels.value.show&&l.value?`(${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(u.dataLabel)({p:l.prefix||"",v:l.value||0,s:l.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:l,seriesIndex:o})})`:""}`),9,Te))],40,Be))),256))])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:n.value},void 0,!0)],14,ge)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(E)||e.unref(L)})),void 0,!0)])):e.createCommentVNode("",!0),w.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:4,config:{type:"onion",style:{backgroundColor:t.value.style.chart.backgroundColor,onion:{color:t.value.style.chart.layout.gutter.color}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:V},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ie.Legend,{key:0,legendSet:i.value,config:ae.value,onClickMarker:r[2]||(r[2]=({legend:l})=>R(l.id))},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>l.segregate(),style:e.normalizeStyle(`opacity:${c.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name?l.name+": ":"")+" "+e.toDisplayString((l.percentage||0).toFixed(t.value.style.chart.legend.roundingPercentage))+"% ",13,Pe)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:i.value},void 0,!0)],512),e.createVNode(de._sfc_main,{show:p.value.showTooltip&&C.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:y.value,content:B.value,isCustom:e.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),w.value?(e.openBlock(),e.createBlock(he.default,{key:5,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ce.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:r[3]||(r[3]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),td:e.withCtx(({td:l})=>[e.createElementVNode("div",{innerHTML:l},null,8,_e)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},Oe=pe._export_sfc(Ne,[["__scopeId","data-v-92cdbc16"]]);exports.default=Oe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DGxA8bUJ.cjs"),U=require("./useResponsive-B3TrDDIG.cjs"),se=require("./Title-CUtmTGbN.cjs"),X=require("./usePrinter-DbJ9I2vE.cjs"),ie=require("./Legend-lleMcfy9.cjs"),ce=require("./DataTable-pfsiGYAz.cjs"),de=require("./Tooltip-DhxfsNhL.cjs"),ve=require("./vue-ui-skeleton-CHI4nqtV.cjs"),he=require("./vue-ui-accordion-Bs0EHuxc.cjs"),G=require("./useNestedProp-DM4rgjhE.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],ge=["xmlns","viewBox"],me=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],ye=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],be=["id"],ke=["stdDeviation"],we=["filter"],Ce=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],xe=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],$e={key:1},Be=["onMouseenter"],Te=["x","y","font-size","fill","font-weight"],Se={key:3,class:"vue-data-ui-watermark"},Pe=["onClick"],_e=["innerHTML"],Ne={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(H,{expose:W,emit:j}){const f=H,{vue_ui_onion:J}=u.useConfig(),w=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(u.createUid()),K=e.ref(null),F=e.ref(0),C=e.ref(!1),B=e.ref(""),c=e.ref([]),y=e.ref(null),I=e.ref(null),V=e.ref(null),t=e.computed(()=>{const a=G.useNestedProp({userConfig:f.config,defaultConfig:J});return a.theme?{...G.useNestedProp({userConfig:u.themes.vue_ui_onion[a.theme]||f.config,defaultConfig:a}),customPalette:u.themePalettes[a.theme]||u.palette}:a}),{isPrinting:E,isImaging:L,generatePdf:D,generateImage:M}=X.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),Q=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),p=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),x=e.ref(null);e.onMounted(()=>{if(u.objectIsEmpty(f.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=U.throttle(()=>{const{width:l,height:o}=U.useResponsive({chart:y.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?V.value:null});n.value.width=l,n.value.height=o,n.value.padding.top=Math.max(l,o)*.125,n.value.padding.right=Math.max(l,o)*.125,n.value.padding.bottom=Math.max(l,o)*.125,n.value.padding.left=Math.max(l,o)*.125,n.value.minRadius=Math.min(l,o)*.125});x.value=new ResizeObserver(r),x.value.observe(y.value.parentNode)}}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(f.dataset.forEach((a,r)=>{[null,void 0].includes(a.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(a.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),f.dataset.map((a,r)=>{const l=`onion_serie_${r}_${m.value}`;return{...a,percentage:a.percentage||0,targetPercentage:a.percentage||0,color:u.convertColorToHex(a.color)||Q.value[r]||u.palette[r],id:l,shape:"circle",opacity:c.value.includes(l)?.5:1,absoluteIndex:r,segregate:()=>R(l),isSegregated:c.value.includes(l)}}))),b=e.ref(i.value),Z=e.computed(()=>t.value.useStartAnimation),ee=e.ref(null),te=e.computed(()=>Math.max(...i.value.map(a=>a.percentage))),T=e.ref(!1);e.watch(()=>i.value,le,{immediate:!0});function le(){if(Z.value&&!T.value){let r=function(){a>=te.value?(cancelAnimationFrame(ee.value),b.value=i.value,T.value=!0):(b.value=i.value.map(l=>({...l,percentage:a<l.targetPercentage?a:l.targetPercentage})),a+=1,requestAnimationFrame(r),T.value=!0)};b.value=i.value.map(l=>({...l,percentage:0}));let a=0;r()}else b.value=i.value}const ae=e.computed(()=>({cy:"onion-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":""})),oe=e.computed(()=>i.value.filter(a=>!c.value.includes(a.id)).length),g=e.computed(()=>{const a=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(a>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:a)*t.value.style.chart.layout.gutter.width,track:(a>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:a)*t.value.style.chart.layout.track.width}}),d=e.computed(()=>b.value.filter(a=>!c.value.includes(a.id)).map((a,r)=>{const l=(s.value.maxRadius-g.value.track)/oe.value/2*(1+r),o=s.value.centerY-l;return{percentage:a.percentage||0,...a,labelY:o,radius:l,path:re(l,a.percentage||0)}}));function re(a,r){const l=a*(1.5+(r/100>.3333333333333333?0:1-r/100))*Math.PI,o=a*1.5*Math.PI;return{bgDashArray:`${o} ${o}`,bgDashOffset:o-r/100*o,dashArray:`${l} ${l}`,dashOffset:l-r/100*l,fullOffset:0,active:`M${s.value.centerX},${s.value.centerY} A ${a},${a} 0 0 0 ${s.value.right},${s.value.top}`}}function R(a){c.value.includes(a)?c.value=c.value.filter(r=>r!==a):c.value.push(a),j("selectLegend",d.value)}function ne(){return d.value}const S=e.computed(()=>{const a=[t.value.table.translations.serie,t.value.table.translations.percentage,t.value.table.translations.value],r=d.value.map(l=>[l.name,l.percentage,l.value]);return{head:a,body:r}}),$=e.computed(()=>{const a=S.value.head,r=d.value.map(o=>[`<span style="color:${o.color}">⬤</span> ${o.name}`,`${Number(o.percentage??0).toFixed(t.value.table.td.roundingPercentage).toLocaleString()}%`,`${o.prefix||""}${[null,void 0,NaN,"NaN"].includes(o.value)?"-":o.value.toFixed(t.value.table.td.roundingValue).toLocaleString()}${o.suffix||""}`]),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:a,body:r,config:l,colNames:a}});function z(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=S.value.head,l=S.value.body,o=a.concat([r]).concat(l),h=u.createCsvContent(o);u.downloadCsv({csvContent:h,title:t.value.style.chart.title.text||"vue-ui-onion"})})}const v=e.ref(void 0),k=e.ref(!1);function ue(a){k.value=a,F.value+=1}const P=e.ref(null);function A({datapoint:a,seriesIndex:r,show:l=!0}){const o=a.absoluteIndex;v.value=r,P.value={datapoint:a,seriesIndex:o,series:i.value,config:t.value},C.value=l;let h="";const _=t.value.style.chart.tooltip.customFormat;if(u.isFunction(_)&&u.functionReturnsString(()=>_({seriesIndex:o,datapoint:a,series:i.value,config:t.value})))B.value=_({seriesIndex:o,datapoint:a,series:i.value,config:t.value});else{const N=t.value.style.chart.tooltip.showPercentage,O=t.value.style.chart.tooltip.showValue;h+=`<div style="width: 100%; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; padding-bottom: 6px;margin-bottom:3px;display:flex;flex-direction:row;gap:3px;align-items:center"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${a.color}"/></svg><span></span>${a.name}</span></div>`,h+=`<div style="width:100%;text-align:left;"><b>${N?u.dataLabel({p:"",v:a.percentage,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}):""}</b> ${N&&O?"(":""}${O?u.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,a.value,u.dataLabel({p:a.prefix||"",v:a.value,s:a.suffix||"",r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:r}):""}${N&&O?")":""}</div>`,B.value=`<div>${h}</div>`}}function q(){p.value.showTable=!p.value.showTable}function Y(){p.value.showTooltip=!p.value.showTooltip}return W({getData:ne,generatePdf:D,generateCsv:z,generateImage:M,toggleTable:q,toggleTooltip:Y}),(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-onion ${k.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"onionChart",ref:y,id:`vue-ui-onion_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:I,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(se._sfc_main,{config:{title:{cy:"onion-div-title",...t.value.style.chart.title},subtitle:{cy:"onion-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&w.value?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:K,key:`user_options${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(L),isPrinting:e.unref(E),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:k.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(D),onGenerateCsv:z,onGenerateImage:e.unref(M),onToggleTable:q,onToggleTooltip:Y},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),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),w.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${n.value.width<=0?1e-4:n.value.width} ${n.value.height<=0?1e-4:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:t.value.style.chart.layout.gutter.color,"stroke-width":g.value.gutter,fill:"none","stroke-dasharray":l.path.bgDashArray,"stroke-dashoffset":l.path.fullOffset,"stroke-linecap":"round",class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(v.value)&&v.value!==o}),style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<0?1e-4:l.radius,stroke:`${l.color}`,"stroke-width":g.value.track,fill:"none","stroke-dasharray":l.path.dashArray,"stroke-dashoffset":l.path.dashOffset,class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(v.value)&&v.value!==o}),"stroke-linecap":"round",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,ye))),256)),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.gradientIntensity},null,8,ke)],8,be)]),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",{key:0,filter:`url(#blur_${m.value})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:"white","stroke-width":g.value.track/3,fill:"none","stroke-linecap":"round","stroke-dasharray":l.path.dashArray,"stroke-dashoffset":l.path.dashOffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,Ce))),256))],8,we)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{"data-cy-trap":"",cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:"transparent","stroke-width":Math.max(g.value.track,g.value.gutter),fill:"none","stroke-dasharray":l.path.bgDashArray,"stroke-dashoffset":l.path.fullOffset,"stroke-linecap":"round",class:"vue-ui-onion-path",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"},onMouseenter:h=>A({datapoint:l,show:!0,seriesIndex:o}),onMouseleave:r[0]||(r[0]=h=>{v.value=void 0,C.value=!1})},null,40,xe))),256)),t.value.style.chart.layout.labels.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",{onMouseenter:h=>A({datapoint:l,show:!0,seriesIndex:o}),onMouseleave:r[1]||(r[1]=h=>{v.value=void 0,C.value=!1})},[c.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:0,x:n.value.width/2-g.value.gutter*.8+t.value.style.chart.layout.labels.offsetX,y:l.labelY+t.value.style.chart.layout.labels.offsetY,"text-anchor":"end","font-size":t.value.style.chart.layout.labels.fontSize,fill:t.value.useBlurOnHover&&![null,void 0].includes(v.value)&&v.value===o?l.color:t.value.style.chart.layout.labels.color,"font-weight":t.value.style.chart.layout.labels.bold?"bold":"normal"},e.toDisplayString(l.name?l.name+": ":"")+" "+e.toDisplayString(t.value.style.chart.layout.labels.percentage.show?e.unref(u.dataLabel)({v:l.percentage,s:"%",r:t.value.style.chart.layout.labels.roundingPercentage}):"")+" "+e.toDisplayString(!t.value.style.chart.layout.labels.percentage.show&&t.value.style.chart.layout.labels.value.show?`: ${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(u.dataLabel)({p:l.prefix||"",v:l.value||0,s:l.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:l,seriesIndex:o})}`:`${t.value.style.chart.layout.labels.value.show&&l.value?`(${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(u.dataLabel)({p:l.prefix||"",v:l.value||0,s:l.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:l,seriesIndex:o})})`:""}`),9,Te))],40,Be))),256))])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:n.value},void 0,!0)],14,ge)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(E)||e.unref(L)})),void 0,!0)])):e.createCommentVNode("",!0),w.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:4,config:{type:"onion",style:{backgroundColor:t.value.style.chart.backgroundColor,onion:{color:t.value.style.chart.layout.gutter.color}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:V},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ie.Legend,{key:0,legendSet:i.value,config:ae.value,onClickMarker:r[2]||(r[2]=({legend:l})=>R(l.id))},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>l.segregate(),style:e.normalizeStyle(`opacity:${c.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name?l.name+": ":"")+" "+e.toDisplayString((l.percentage||0).toFixed(t.value.style.chart.legend.roundingPercentage))+"% ",13,Pe)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:i.value},void 0,!0)],512),e.createVNode(de._sfc_main,{show:p.value.showTooltip&&C.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:y.value,content:B.value,isCustom:e.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),w.value?(e.openBlock(),e.createBlock(he.default,{key:5,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ce.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:r[3]||(r[3]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),td:e.withCtx(({td:l})=>[e.createElementVNode("div",{innerHTML:l},null,8,_e)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},Oe=pe._export_sfc(Ne,[["__scopeId","data-v-92cdbc16"]]);exports.default=Oe;
@@ -1,14 +1,14 @@
1
1
  import { computed as d, ref as u, onMounted as Pe, onBeforeUnmount as Oe, watch as Ie, openBlock as s, createElementBlock as n, normalizeClass as D, normalizeStyle as L, createVNode as j, createCommentVNode as b, createBlock as z, unref as v, createSlots as Fe, withCtx as h, renderSlot as f, normalizeProps as B, guardReactiveProps as V, Fragment as I, renderList as F, createElementVNode as C, toDisplayString as T, createTextVNode as Se, nextTick as Me } from "vue";
2
- import { u as Ne, c as Re, t as Ae, a as De, p as ie, b as Le, o as ze, e as q, d as Be, X as Ve, f as S, i as J, w as ce, q as Ye, r as Xe, x as Ge } from "./index-C1-FJ0sT.js";
2
+ import { u as Ne, c as Re, t as Ae, a as De, p as ie, b as Le, o as ze, e as q, d as Be, X as Ve, f as S, i as J, w as ce, q as Ye, r as Xe, x as Ge } from "./index-CAkeI2u7.js";
3
3
  import { t as Ue, u as Ee } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as He } from "./Title-D8HoSXgM.js";
5
- import { u as We, U as je } from "./usePrinter-B1a6uNio.js";
6
- import { L as qe } from "./Legend-aFYc_s9T.js";
7
- import { D as Je } from "./DataTable-CkeQ7c6_.js";
8
- import { _ as Ke } from "./Tooltip-DTwn_FW5.js";
9
- import Qe from "./vue-ui-skeleton-DogpCRv2.js";
10
- import Ze from "./vue-ui-accordion-BLoKd0D-.js";
11
- import { u as de } from "./useNestedProp-1fJhHDhT.js";
4
+ import { _ as He } from "./Title-DZ-9X7T_.js";
5
+ import { u as We, U as je } from "./usePrinter-MbSdbzew.js";
6
+ import { L as qe } from "./Legend-Dc30ZC8U.js";
7
+ import { D as Je } from "./DataTable-97z7jeB3.js";
8
+ import { _ as Ke } from "./Tooltip-BE1vKyP4.js";
9
+ import Qe from "./vue-ui-skeleton-DtWvFTM9.js";
10
+ import Ze from "./vue-ui-accordion-BbsnFhS8.js";
11
+ import { u as de } from "./useNestedProp-N72tOTWX.js";
12
12
  import { _ as et } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const tt = ["id"], at = ["xmlns", "viewBox"], lt = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], ot = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], rt = ["id"], st = ["stdDeviation"], ut = ["filter"], nt = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], it = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "onMouseenter"], ct = { key: 1 }, dt = ["onMouseenter"], vt = ["x", "y", "font-size", "fill", "font-weight"], ht = {
14
14
  key: 3,
@@ -1,15 +1,15 @@
1
1
  import { computed as y, ref as f, onMounted as Ne, onBeforeUnmount as Pe, openBlock as u, createElementBlock as i, normalizeClass as E, normalizeStyle as _, createVNode as K, createCommentVNode as g, createBlock as D, unref as T, createSlots as Le, withCtx as b, renderSlot as x, normalizeProps as j, guardReactiveProps as R, Fragment as C, renderList as z, createElementVNode as I, toDisplayString as P, createTextVNode as Se } from "vue";
2
- import { u as Oe, c as Q, t as De, a as We, p as U, o as Be, e as ye, g as Ee, b as je, d as Re, A as Ue, L as Ve, M as Ge, N as He, X as Xe, w as fe, i as ge, f as be, x as Ye, q as qe, r as Je, C as V } from "./index-C1-FJ0sT.js";
2
+ import { u as Oe, c as Q, t as De, a as We, p as U, o as Be, e as ye, g as Ee, b as je, d as Re, A as Ue, L as Ve, M as Ge, N as He, X as Xe, w as fe, i as ge, f as be, x as Ye, q as qe, r as Je, C as V } from "./index-CAkeI2u7.js";
3
3
  import { t as Ke, u as Qe } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as Ze } from "./Title-D8HoSXgM.js";
5
- import { L as et } from "./Legend-aFYc_s9T.js";
6
- import { _ as tt } from "./Tooltip-DTwn_FW5.js";
7
- import { _ as at } from "./Shape-DoAgLIYa.js";
8
- import { u as lt, U as ot } from "./usePrinter-B1a6uNio.js";
9
- import { D as st } from "./DataTable-CkeQ7c6_.js";
10
- import nt from "./vue-ui-accordion-BLoKd0D-.js";
11
- import ut from "./vue-ui-skeleton-DogpCRv2.js";
12
- import { u as xe } from "./useNestedProp-1fJhHDhT.js";
4
+ import { _ as Ze } from "./Title-DZ-9X7T_.js";
5
+ import { L as et } from "./Legend-Dc30ZC8U.js";
6
+ import { _ as tt } from "./Tooltip-BE1vKyP4.js";
7
+ import { _ as at } from "./Shape-Cjf9rDFw.js";
8
+ import { u as lt, U as ot } from "./usePrinter-MbSdbzew.js";
9
+ import { D as st } from "./DataTable-97z7jeB3.js";
10
+ import nt from "./vue-ui-accordion-BbsnFhS8.js";
11
+ import ut from "./vue-ui-skeleton-DtWvFTM9.js";
12
+ import { u as xe } from "./useNestedProp-N72tOTWX.js";
13
13
  import { _ as it } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
14
  const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events": "none" } }, dt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ht = ["x", "y", "fill", "font-size", "font-weight"], pt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], mt = ["x", "y", "fill", "font-size", "font-weight"], yt = { key: 0 }, ft = ["x", "y", "font-size", "fill"], gt = ["width", "x", "y"], bt = { style: { width: "100%" } }, xt = ["x", "y", "fill", "font-weight", "font-size", "onMouseenter"], kt = ["d", "stroke", "stroke-width", "onMouseenter"], Ct = {
15
15
  key: 3,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-CEhe8nzy.cjs"),K=require("./useResponsive-B3TrDDIG.cjs"),de=require("./Title-NelrBSGO.cjs"),ve=require("./Legend-DjuRskVd.cjs"),he=require("./Tooltip-CK94hatv.cjs"),pe=require("./Shape-BTMZlA5Q.cjs"),Q=require("./usePrinter-AfD8nrd2.cjs"),me=require("./DataTable-BGF6x8iX.cjs"),ye=require("./vue-ui-accordion-CS2POBdq.cjs"),fe=require("./vue-ui-skeleton-DpqVx122.cjs"),Z=require("./useNestedProp-CcMb2mLY.cjs"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],ke=["xmlns","viewBox"],xe={style:{"pointer-events":"none"}},Ce=["x1","x2","y1","y2","stroke","stroke-width"],we=["x","y","fill","font-size","font-weight"],Be=["x1","x2","y1","y2","stroke","stroke-width"],ze=["x","y","fill","font-size","font-weight"],$e={key:0},Se=["x","y","font-size","fill"],Ne=["width","x","y"],Te={style:{width:"100%"}},Fe=["x","y","fill","font-weight","font-size","onMouseenter"],_e=["d","stroke","stroke-width","onMouseenter"],Pe={key:3,class:"vue-data-ui-watermark"},Ae=["onClick"],Me=["innerHTML"],Le={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ee,{expose:te,emit:M}){const k=ee,{vue_ui_parallel_coordinate_plot:le}=i.useConfig(),x=e.computed({get(){return!!k.dataset&&k.dataset.length},set(a){return a}}),L=e.ref(0),w=e.ref(null),E=e.ref(null),I=e.ref(null),N=e.ref(i.createUid()),B=e.ref(!1);function ae(a){B.value=a,L.value+=1}const t=e.computed(()=>{const a=Z.useNestedProp({userConfig:k.config,defaultConfig:le});return a.theme?{...Z.useNestedProp({userConfig:i.themes.vue_ui_parallel_coordinate_plot[a.theme]||k.config,defaultConfig:a}),customPalette:i.themePalettes[a.theme]||i.palette}:a}),$=e.ref(null);e.onMounted(()=>{if(i.objectIsEmpty(k.dataset)?i.error({componentName:"VueUiParallelCoordinatePlot",type:"dataset"}):k.dataset.forEach((a,o)=>{i.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","series"]}).forEach(l=>{x.value=!1,i.error({componentName:"VueUiParallelCoordinatePlot",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.responsive){const a=K.throttle(()=>{const{width:o,height:l}=K.useResponsive({chart:w.value,title:t.value.style.chart.title.text?E.value:null,legend:t.value.style.chart.legend.show?I.value:null});c.value.width=o,c.value.height=l,c.value.plotSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),c.value.ticksFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),c.value.datapointFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),c.value.axisNameFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})});$.value=new ResizeObserver(a),$.value.observe(w.value.parentNode)}}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:V,isImaging:D,generatePdf:O,generateImage:q}=Q.usePrinter({elementId:`pcp_${N.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"}),c=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width,plotSize:t.value.style.chart.plots.radius,ticksFontSize:t.value.style.chart.yAxis.labels.ticks.fontSize,datapointFontSize:t.value.style.chart.yAxis.labels.datapoints.fontSize,axisNameFontSize:t.value.style.chart.yAxis.labels.axisNamesFontSize}),d=e.computed(()=>{const{top:a,right:o,bottom:l,left:s}=t.value.style.chart.padding,r=c.value.height,n=c.value.width;return{chartHeight:r,chartWidth:n,height:r-a-l,width:n-s-o,top:a,left:s,right:n-o,bottom:r-l}}),oe=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),m=e.ref({dataLabels:{show:t.value.style.chart.yAxis.labels.datapoints.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),f=e.ref([]);function R(a){f.value.includes(a)?f.value=f.value.filter(o=>o!==a):f.value.push(a)}const b=e.computed(()=>k.dataset.map((a,o)=>{const l=i.convertColorToHex(a.color)||oe.value[o]||i.palette[o]||i.palette[o%i.palette.length];return{...a,series:a.series.map(s=>({...s,id:i.createUid(),color:l})),seriesIndex:o,color:l,id:i.createUid(),shape:a.shape||"circle"}})),se=e.computed(()=>b.value.map(a=>({...a,opacity:f.value.includes(a.id)?.5:1,segregate:()=>R(a.id),isSegregated:f.value.includes(a.id)}))),ne=e.computed(()=>({cy:"pcp-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":""})),U=e.computed(()=>Math.max(...b.value.filter(a=>!f.value.includes(a.id)).map(a=>Math.max(...a.series.flatMap(o=>o.values.length))))),y=e.computed(()=>d.value.width/U.value),T=e.computed(()=>b.value.filter(a=>!f.value.includes(a.id))),p=e.computed(()=>{let a=[];for(let o=0;o<U.value;o+=1){const l=Math.min(...T.value.flatMap(v=>v.series.map(S=>S.values[o]||0)||0)),s=Math.max(...T.value.flatMap(v=>v.series.map(S=>S.values[o]||0)||0)),r=s===l?l/4:l,n=s===l?s*2:s,u=i.calculateNiceScale(r,n,t.value.style.chart.yAxis.scaleTicks),g=u.ticks.map((v,S)=>{const ue=u.min<0?v+Math.abs(u.min):v-Math.abs(u.min),ce=u.min<0?u.max+Math.abs(u.min):u.max-Math.abs(u.min);return{y:d.value.bottom-d.value.height*(ue/ce),x:d.value.left+y.value*o+y.value/2,value:v}});a.push({scale:u,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[o]||`Y-${o+1}`})}return a}),F=e.computed(()=>T.value.map((a,o)=>({...a,series:a.series.map((l,s)=>({...l,datapoints:l.values.map((r,n)=>{const u=p.value[n].scale.min<0?(r||0)+Math.abs(p.value[n].scale.min):(r||0)-Math.abs(p.value[n].scale.min),g=p.value[n].scale.min<0?p.value[n].scale.max+Math.abs(p.value[n].scale.min):p.value[n].scale.max-Math.abs(p.value[n].scale.min);return{name:l.name,seriesName:a.name,axisIndex:n,datapointIndex:s,seriesIndex:o,value:r||0,x:d.value.left+y.value*n+y.value/2,y:d.value.bottom-d.value.height*(u/g),comment:l.comments&&l.comments[n]||""}})}))})).map(a=>({...a,series:a.series.map(o=>{const l=i.createStraightPath(o.datapoints),s=i.createSmoothPath(o.datapoints,.12),r=i.getPathLengthFromCoordinates(t.value.style.chart.lines.smooth?`M ${s}`:`M ${l}`);return{...o,smoothPath:s,straightPath:l,pathLength:r}})})));function W({value:a,index:o,datapoint:l}){return i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[o]||null,a,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[o]||"",v:a,s:t.value.style.chart.yAxis.labels.suffixes[o]||"",r:t.value.style.chart.yAxis.labels.roundings[o]||0}),{datapoint:l,seriesIndex:o})}const h=e.ref(null),_=e.ref(null),z=e.ref(!1),P=e.ref("");function A({shape:a,serieName:o,serie:l,relativeIndex:s,seriesIndex:r}){_.value={serie:l,relativeIndex:s,seriesIndex:r,series:b.value,scales:p.value},z.value=!0,h.value=l.id;let n="";const u=t.value.style.chart.tooltip.customFormat;i.isFunction(u)&&i.functionReturnsString(()=>u({serie:l,seriesIndex:l.seriesIndex,series:b.value,config:t.value,scales:p.value}))?P.value=u({serie:l,seriesIndex:l.seriesIndex,series:b.value,config:t.value,scales:p.value}):(n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o?o+" - ":""}${l.name}</div>`,p.value.map(g=>g.name).forEach((g,v)=>{n+=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-DGxA8bUJ.cjs"),K=require("./useResponsive-B3TrDDIG.cjs"),de=require("./Title-CUtmTGbN.cjs"),ve=require("./Legend-lleMcfy9.cjs"),he=require("./Tooltip-DhxfsNhL.cjs"),pe=require("./Shape-BtSgIgD_.cjs"),Q=require("./usePrinter-DbJ9I2vE.cjs"),me=require("./DataTable-pfsiGYAz.cjs"),ye=require("./vue-ui-accordion-Bs0EHuxc.cjs"),fe=require("./vue-ui-skeleton-CHI4nqtV.cjs"),Z=require("./useNestedProp-DM4rgjhE.cjs"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],ke=["xmlns","viewBox"],xe={style:{"pointer-events":"none"}},Ce=["x1","x2","y1","y2","stroke","stroke-width"],we=["x","y","fill","font-size","font-weight"],Be=["x1","x2","y1","y2","stroke","stroke-width"],ze=["x","y","fill","font-size","font-weight"],$e={key:0},Se=["x","y","font-size","fill"],Ne=["width","x","y"],Te={style:{width:"100%"}},Fe=["x","y","fill","font-weight","font-size","onMouseenter"],_e=["d","stroke","stroke-width","onMouseenter"],Pe={key:3,class:"vue-data-ui-watermark"},Ae=["onClick"],Me=["innerHTML"],Le={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ee,{expose:te,emit:M}){const k=ee,{vue_ui_parallel_coordinate_plot:le}=i.useConfig(),x=e.computed({get(){return!!k.dataset&&k.dataset.length},set(a){return a}}),L=e.ref(0),w=e.ref(null),E=e.ref(null),I=e.ref(null),N=e.ref(i.createUid()),B=e.ref(!1);function ae(a){B.value=a,L.value+=1}const t=e.computed(()=>{const a=Z.useNestedProp({userConfig:k.config,defaultConfig:le});return a.theme?{...Z.useNestedProp({userConfig:i.themes.vue_ui_parallel_coordinate_plot[a.theme]||k.config,defaultConfig:a}),customPalette:i.themePalettes[a.theme]||i.palette}:a}),$=e.ref(null);e.onMounted(()=>{if(i.objectIsEmpty(k.dataset)?i.error({componentName:"VueUiParallelCoordinatePlot",type:"dataset"}):k.dataset.forEach((a,o)=>{i.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","series"]}).forEach(l=>{x.value=!1,i.error({componentName:"VueUiParallelCoordinatePlot",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.responsive){const a=K.throttle(()=>{const{width:o,height:l}=K.useResponsive({chart:w.value,title:t.value.style.chart.title.text?E.value:null,legend:t.value.style.chart.legend.show?I.value:null});c.value.width=o,c.value.height=l,c.value.plotSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),c.value.ticksFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),c.value.datapointFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),c.value.axisNameFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})});$.value=new ResizeObserver(a),$.value.observe(w.value.parentNode)}}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:V,isImaging:D,generatePdf:O,generateImage:q}=Q.usePrinter({elementId:`pcp_${N.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"}),c=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width,plotSize:t.value.style.chart.plots.radius,ticksFontSize:t.value.style.chart.yAxis.labels.ticks.fontSize,datapointFontSize:t.value.style.chart.yAxis.labels.datapoints.fontSize,axisNameFontSize:t.value.style.chart.yAxis.labels.axisNamesFontSize}),d=e.computed(()=>{const{top:a,right:o,bottom:l,left:s}=t.value.style.chart.padding,r=c.value.height,n=c.value.width;return{chartHeight:r,chartWidth:n,height:r-a-l,width:n-s-o,top:a,left:s,right:n-o,bottom:r-l}}),oe=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),m=e.ref({dataLabels:{show:t.value.style.chart.yAxis.labels.datapoints.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),f=e.ref([]);function R(a){f.value.includes(a)?f.value=f.value.filter(o=>o!==a):f.value.push(a)}const b=e.computed(()=>k.dataset.map((a,o)=>{const l=i.convertColorToHex(a.color)||oe.value[o]||i.palette[o]||i.palette[o%i.palette.length];return{...a,series:a.series.map(s=>({...s,id:i.createUid(),color:l})),seriesIndex:o,color:l,id:i.createUid(),shape:a.shape||"circle"}})),se=e.computed(()=>b.value.map(a=>({...a,opacity:f.value.includes(a.id)?.5:1,segregate:()=>R(a.id),isSegregated:f.value.includes(a.id)}))),ne=e.computed(()=>({cy:"pcp-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":""})),U=e.computed(()=>Math.max(...b.value.filter(a=>!f.value.includes(a.id)).map(a=>Math.max(...a.series.flatMap(o=>o.values.length))))),y=e.computed(()=>d.value.width/U.value),T=e.computed(()=>b.value.filter(a=>!f.value.includes(a.id))),p=e.computed(()=>{let a=[];for(let o=0;o<U.value;o+=1){const l=Math.min(...T.value.flatMap(v=>v.series.map(S=>S.values[o]||0)||0)),s=Math.max(...T.value.flatMap(v=>v.series.map(S=>S.values[o]||0)||0)),r=s===l?l/4:l,n=s===l?s*2:s,u=i.calculateNiceScale(r,n,t.value.style.chart.yAxis.scaleTicks),g=u.ticks.map((v,S)=>{const ue=u.min<0?v+Math.abs(u.min):v-Math.abs(u.min),ce=u.min<0?u.max+Math.abs(u.min):u.max-Math.abs(u.min);return{y:d.value.bottom-d.value.height*(ue/ce),x:d.value.left+y.value*o+y.value/2,value:v}});a.push({scale:u,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[o]||`Y-${o+1}`})}return a}),F=e.computed(()=>T.value.map((a,o)=>({...a,series:a.series.map((l,s)=>({...l,datapoints:l.values.map((r,n)=>{const u=p.value[n].scale.min<0?(r||0)+Math.abs(p.value[n].scale.min):(r||0)-Math.abs(p.value[n].scale.min),g=p.value[n].scale.min<0?p.value[n].scale.max+Math.abs(p.value[n].scale.min):p.value[n].scale.max-Math.abs(p.value[n].scale.min);return{name:l.name,seriesName:a.name,axisIndex:n,datapointIndex:s,seriesIndex:o,value:r||0,x:d.value.left+y.value*n+y.value/2,y:d.value.bottom-d.value.height*(u/g),comment:l.comments&&l.comments[n]||""}})}))})).map(a=>({...a,series:a.series.map(o=>{const l=i.createStraightPath(o.datapoints),s=i.createSmoothPath(o.datapoints,.12),r=i.getPathLengthFromCoordinates(t.value.style.chart.lines.smooth?`M ${s}`:`M ${l}`);return{...o,smoothPath:s,straightPath:l,pathLength:r}})})));function W({value:a,index:o,datapoint:l}){return i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[o]||null,a,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[o]||"",v:a,s:t.value.style.chart.yAxis.labels.suffixes[o]||"",r:t.value.style.chart.yAxis.labels.roundings[o]||0}),{datapoint:l,seriesIndex:o})}const h=e.ref(null),_=e.ref(null),z=e.ref(!1),P=e.ref("");function A({shape:a,serieName:o,serie:l,relativeIndex:s,seriesIndex:r}){_.value={serie:l,relativeIndex:s,seriesIndex:r,series:b.value,scales:p.value},z.value=!0,h.value=l.id;let n="";const u=t.value.style.chart.tooltip.customFormat;i.isFunction(u)&&i.functionReturnsString(()=>u({serie:l,seriesIndex:l.seriesIndex,series:b.value,config:t.value,scales:p.value}))?P.value=u({serie:l,seriesIndex:l.seriesIndex,series:b.value,config:t.value,scales:p.value}):(n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o?o+" - ":""}${l.name}</div>`,p.value.map(g=>g.name).forEach((g,v)=>{n+=`
2
2
  <div class="vue-ui-tooltip-item" style="text-align:left">
3
3
  <span>${g}: </span>
4
4
  <span>
@@ -1,15 +1,15 @@
1
1
  import { computed as m, ref as h, onMounted as Oe, onBeforeUnmount as He, watch as Ie, openBlock as s, createElementBlock as i, normalizeClass as T, normalizeStyle as L, createVNode as ee, createCommentVNode as c, createBlock as U, unref as y, createSlots as De, withCtx as k, renderSlot as _, normalizeProps as te, guardReactiveProps as le, createElementVNode as v, Fragment as S, renderList as X, toDisplayString as x, createTextVNode as Ee, nextTick as Ue } from "vue";
2
- import { u as Ge, c as ze, t as Qe, a as Je, p as ie, o as je, e as R, b as Ze, v as ae, d as Ke, i as A, f as V, X as et, s as tt, O as lt, D as at, w as ut, x as ot, q as st, r as rt } from "./index-C1-FJ0sT.js";
2
+ import { u as Ge, c as ze, t as Qe, a as Je, p as ie, o as je, e as R, b as Ze, v as ae, d as Ke, i as A, f as V, X as et, s as tt, O as lt, D as at, w as ut, x as ot, q as st, r as rt } from "./index-CAkeI2u7.js";
3
3
  import { t as it, u as nt } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as vt } from "./Title-D8HoSXgM.js";
5
- import { u as dt, U as ct } from "./usePrinter-B1a6uNio.js";
6
- import { _ as ht } from "./Tooltip-DTwn_FW5.js";
7
- import { _ as Te } from "./Shape-DoAgLIYa.js";
8
- import { L as yt } from "./Legend-aFYc_s9T.js";
9
- import { D as bt } from "./DataTable-CkeQ7c6_.js";
10
- import ft from "./vue-ui-skeleton-DogpCRv2.js";
11
- import pt from "./vue-ui-accordion-BLoKd0D-.js";
12
- import { u as We } from "./useNestedProp-1fJhHDhT.js";
4
+ import { _ as vt } from "./Title-DZ-9X7T_.js";
5
+ import { u as dt, U as ct } from "./usePrinter-MbSdbzew.js";
6
+ import { _ as ht } from "./Tooltip-BE1vKyP4.js";
7
+ import { _ as Te } from "./Shape-Cjf9rDFw.js";
8
+ import { L as yt } from "./Legend-Dc30ZC8U.js";
9
+ import { D as bt } from "./DataTable-97z7jeB3.js";
10
+ import ft from "./vue-ui-skeleton-DtWvFTM9.js";
11
+ import pt from "./vue-ui-accordion-BbsnFhS8.js";
12
+ import { u as We } from "./useNestedProp-N72tOTWX.js";
13
13
  import { _ as gt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
14
  const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-color"], Lt = ["stop-color"], wt = { key: 0 }, qt = ["fill", "x", "y", "height", "width", "stroke-width", "stroke", "rx"], _t = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], St = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ct = { key: 1 }, zt = ["points", "fill"], Tt = ["points", "fill"], Wt = ["points", "fill"], Xt = ["points", "fill"], Yt = { key: 2 }, Mt = ["y", "fill", "font-size"], Nt = ["x", "y", "fill", "font-size"], At = ["x", "y", "fill", "font-size"], Vt = ["y", "fill", "font-size"], Bt = { key: 3 }, Pt = ["x", "y", "font-size", "fill"], Rt = ["x", "y", "font-size", "fill"], Ft = ["x", "y", "font-size", "fill"], Ot = ["id", "font-size", "transform", "fill"], Ht = ["id", "font-size", "transform", "fill"], It = ["id", "font-size", "transform", "fill"], Dt = { key: 4 }, Et = ["fill", "points"], Ut = ["x", "y", "width", "height"], Gt = ["x", "y", "width", "height"], Qt = ["x", "y", "width", "height"], Jt = ["x", "y", "width", "height"], jt = { key: 0 }, Zt = ["x", "y", "font-size", "fill"], Kt = { key: 0 }, el = ["x", "y", "onMouseover", "onClick"], tl = {
15
15
  key: 7,