vue-data-ui 2.4.13 → 2.4.15

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 (149) hide show
  1. package/dist/{Arrow-D-arGVx0.cjs → Arrow-BCKnYufb.cjs} +1 -1
  2. package/dist/{Arrow-Bj-fZHYt.js → Arrow-ChrPMCIE.js} +1 -1
  3. package/dist/{BaseIcon-CJw1rm7G.js → BaseIcon-CSptCx3b.js} +1 -1
  4. package/dist/{BaseIcon-bxNR7IJr.cjs → BaseIcon-rMg8xfhX.cjs} +1 -1
  5. package/dist/{DataTable-DPFAxETx.cjs → DataTable-CRmILZBX.cjs} +1 -1
  6. package/dist/{DataTable-DSmlK27d.js → DataTable-Cccy3rvu.js} +2 -2
  7. package/dist/{Legend-CjRX0KB0.js → Legend-CfcLlhaP.js} +1 -1
  8. package/dist/{Legend-pFwNBjPs.cjs → Legend-Dx7YB-Bt.cjs} +1 -1
  9. package/dist/{PackageVersion-Bdfz6JAs.cjs → PackageVersion-B34JcKhO.cjs} +1 -1
  10. package/dist/{PackageVersion-6g32vfzE.js → PackageVersion-CiFF5PGi.js} +1 -1
  11. package/dist/{PenAndPaper-Bxz6JnY-.js → PenAndPaper-BpIqWG4P.js} +2 -2
  12. package/dist/{PenAndPaper-qO8pMTxM.cjs → PenAndPaper-DrCIS0Eh.cjs} +1 -1
  13. package/dist/{Shape-B9d1hhZS.js → Shape-HKyyToSG.js} +1 -1
  14. package/dist/{Shape-tOhcWMkG.cjs → Shape-JdI6ZCm8.cjs} +1 -1
  15. package/dist/{Slicer-BzuIYjHU.js → Slicer-Dgnj8x-K.js} +92 -88
  16. package/dist/Slicer-t7C4_beF.cjs +1 -0
  17. package/dist/{Title-CFHy9-HZ.js → Title-BYSs_RNw.js} +1 -1
  18. package/dist/{Title-DPx1SQ60.cjs → Title-CExB31p9.cjs} +1 -1
  19. package/dist/{Tooltip-BxmlUqdH.cjs → Tooltip-CLsCXPX_.cjs} +1 -1
  20. package/dist/{Tooltip-DLCVqP66.js → Tooltip-CZd_cGTh.js} +1 -1
  21. package/dist/{index-DwLdoaoI.js → index-XO811G4S.js} +1 -1
  22. package/dist/{index-YfDOzIGL.cjs → index-kr_QwGDL.cjs} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/{useNestedProp-WJ8kD00a.cjs → useNestedProp-DCTYscDQ.cjs} +1 -1
  25. package/dist/{useNestedProp-BE-9rWPi.js → useNestedProp-LP4oR6kx.js} +1 -1
  26. package/dist/{usePrinter-QQ8sIBRI.js → usePrinter-CsX9yzzX.js} +2 -2
  27. package/dist/{usePrinter-BfKKkLev.cjs → usePrinter-DnY533x9.cjs} +1 -1
  28. package/dist/{vue-data-ui-B8pOC7vP.cjs → vue-data-ui-DuqyXh3Z.cjs} +1 -1
  29. package/dist/{vue-data-ui-a0ppZO9B.js → vue-data-ui-DxuS01kK.js} +58 -58
  30. package/dist/vue-data-ui.cjs +1 -1
  31. package/dist/vue-data-ui.js +1 -1
  32. package/dist/{vue-ui-3d-bar-BLM0gdFx.cjs → vue-ui-3d-bar-46IqOg67.cjs} +1 -1
  33. package/dist/{vue-ui-3d-bar-cP2pNaKD.js → vue-ui-3d-bar-BcY_qYRY.js} +9 -9
  34. package/dist/{vue-ui-accordion-BDO_Zh68.cjs → vue-ui-accordion-Cc1lCYCG.cjs} +1 -1
  35. package/dist/{vue-ui-accordion-BCbBgQnM.js → vue-ui-accordion-DvWhOtea.js} +3 -3
  36. package/dist/{vue-ui-age-pyramid-D83sx902.cjs → vue-ui-age-pyramid-CfCFWXzM.cjs} +1 -1
  37. package/dist/{vue-ui-age-pyramid-CrCircJT.js → vue-ui-age-pyramid-iHGxmPqt.js} +10 -10
  38. package/dist/{vue-ui-annotator-CPc0zP6z.cjs → vue-ui-annotator-BUiIefjR.cjs} +1 -1
  39. package/dist/{vue-ui-annotator-Bsxswk9y.js → vue-ui-annotator-CS09PEb4.js} +1 -1
  40. package/dist/{vue-ui-bullet-Y-4z-p0q.js → vue-ui-bullet-DifOvgtE.js} +8 -8
  41. package/dist/{vue-ui-bullet-0uF7uLzI.cjs → vue-ui-bullet-EzXv2sWS.cjs} +1 -1
  42. package/dist/{vue-ui-candlestick-DEf62bqT.cjs → vue-ui-candlestick-CUGe6R39.cjs} +1 -1
  43. package/dist/{vue-ui-candlestick-DgcbuAOG.js → vue-ui-candlestick-DByuzyzO.js} +11 -11
  44. package/dist/{vue-ui-carousel-table-JVCaW1uQ.js → vue-ui-carousel-table-DDRFUlqH.js} +4 -4
  45. package/dist/{vue-ui-carousel-table-D5mhqTJP.cjs → vue-ui-carousel-table-DPLphRGv.cjs} +1 -1
  46. package/dist/{vue-ui-chestnut-Bf-i3FaN.js → vue-ui-chestnut-0ZG6Eg8o.js} +8 -8
  47. package/dist/{vue-ui-chestnut-BzIsyDCJ.cjs → vue-ui-chestnut-_pU4PH9Y.cjs} +1 -1
  48. package/dist/{vue-ui-cursor-QzjfpeEf.js → vue-ui-cursor-BL-euH7c.js} +2 -2
  49. package/dist/{vue-ui-cursor-BbkGAq5Z.cjs → vue-ui-cursor-Ci3pOLTZ.cjs} +1 -1
  50. package/dist/{vue-ui-dashboard-DCU5dw0v.cjs → vue-ui-dashboard-1--C3XNW.cjs} +1 -1
  51. package/dist/{vue-ui-dashboard-BRi99J78.js → vue-ui-dashboard-ZJ8u97Qf.js} +2 -2
  52. package/dist/{vue-ui-digits-RFS4E6dl.cjs → vue-ui-digits-C5O9vZxI.cjs} +1 -1
  53. package/dist/{vue-ui-digits-C2fR0QCG.js → vue-ui-digits-CMskyA7T.js} +2 -2
  54. package/dist/{vue-ui-donut-C2yuDXOJ.cjs → vue-ui-donut-BNiP18Il.cjs} +1 -1
  55. package/dist/{vue-ui-donut-BC07kmTG.js → vue-ui-donut-CX41zowC.js} +11 -11
  56. package/dist/{vue-ui-donut-evolution-DxdShz3M.js → vue-ui-donut-evolution-QV1JE3Fo.js} +11 -11
  57. package/dist/{vue-ui-donut-evolution-D0aPzssn.cjs → vue-ui-donut-evolution-vqZF9YJJ.cjs} +1 -1
  58. package/dist/{vue-ui-dumbbell-DQq-pgEi.cjs → vue-ui-dumbbell-BY4NAOG1.cjs} +1 -1
  59. package/dist/{vue-ui-dumbbell-5moTjRU_.js → vue-ui-dumbbell-DxhJJy_r.js} +10 -10
  60. package/dist/{vue-ui-flow-EMWBDlYH.cjs → vue-ui-flow-DBBfBgUK.cjs} +1 -1
  61. package/dist/{vue-ui-flow-CJVI2R0U.js → vue-ui-flow-DjydJgwR.js} +9 -9
  62. package/dist/{vue-ui-galaxy-xrPaGHQg.js → vue-ui-galaxy-CtcRy5Ij.js} +11 -11
  63. package/dist/{vue-ui-galaxy-0PGxS1cN.cjs → vue-ui-galaxy-VSr_DAmu.cjs} +1 -1
  64. package/dist/{vue-ui-gauge-UDtF52j4.js → vue-ui-gauge-BjmS4qFe.js} +7 -7
  65. package/dist/{vue-ui-gauge-CS3jqlat.cjs → vue-ui-gauge-IvNa_DR8.cjs} +1 -1
  66. package/dist/{vue-ui-gizmo-1NLXOp5J.js → vue-ui-gizmo-BzLy3mWD.js} +3 -3
  67. package/dist/{vue-ui-gizmo-BvSR_xyA.cjs → vue-ui-gizmo-DgANbqmC.cjs} +1 -1
  68. package/dist/{vue-ui-heatmap-Dm0WDiz1.js → vue-ui-heatmap-Bvej9oTA.js} +10 -10
  69. package/dist/{vue-ui-heatmap-DyDsLNJO.cjs → vue-ui-heatmap-yQSNz-vk.cjs} +1 -1
  70. package/dist/{vue-ui-kpi-DX6XNFXG.cjs → vue-ui-kpi-9eMhWuJa.cjs} +1 -1
  71. package/dist/{vue-ui-kpi-DJjEfWZh.js → vue-ui-kpi-B08Q3iHK.js} +3 -3
  72. package/dist/{vue-ui-mini-loader-CILHcM-o.cjs → vue-ui-mini-loader-BdW1vPkj.cjs} +1 -1
  73. package/dist/{vue-ui-mini-loader-izD98Oto.js → vue-ui-mini-loader-CA8Jh2xW.js} +2 -2
  74. package/dist/{vue-ui-molecule-BwmpBwnD.js → vue-ui-molecule-JzIu9Xhu.js} +11 -11
  75. package/dist/{vue-ui-molecule-D8tlnNvH.cjs → vue-ui-molecule-oCNTo9qq.cjs} +1 -1
  76. package/dist/{vue-ui-mood-radar-CorAQOLG.js → vue-ui-mood-radar-BlUEjpq1.js} +11 -11
  77. package/dist/{vue-ui-mood-radar-iFQR2rec.cjs → vue-ui-mood-radar-D4MmvJeX.cjs} +1 -1
  78. package/dist/{vue-ui-nested-donuts-3tDIUZ4K.cjs → vue-ui-nested-donuts-D1vpqiqh.cjs} +1 -1
  79. package/dist/{vue-ui-nested-donuts-DmHkGxsD.js → vue-ui-nested-donuts-Di7bDbya.js} +11 -11
  80. package/dist/{vue-ui-onion-vTqEZNQz.js → vue-ui-onion-BuxtifKO.js} +11 -11
  81. package/dist/{vue-ui-onion-CqdVnbs9.cjs → vue-ui-onion-D73_4ozI.cjs} +1 -1
  82. package/dist/vue-ui-parallel-coordinate-plot-B5gOiDmN.cjs +8 -0
  83. package/dist/{vue-ui-parallel-coordinate-plot-BgOxX64T.js → vue-ui-parallel-coordinate-plot-D984zizH.js} +139 -120
  84. package/dist/{vue-ui-quadrant-BWQq4PHY.js → vue-ui-quadrant-1lD2dgpm.js} +12 -12
  85. package/dist/{vue-ui-quadrant-BI_7I8Yj.cjs → vue-ui-quadrant-qXlDTKps.cjs} +1 -1
  86. package/dist/{vue-ui-quick-chart-CqHSqq5T.js → vue-ui-quick-chart-A78wO49s.js} +9 -9
  87. package/dist/{vue-ui-quick-chart-N-1EOfxf.cjs → vue-ui-quick-chart-BYL-VfNK.cjs} +1 -1
  88. package/dist/{vue-ui-radar-DXS1Am0r.js → vue-ui-radar-D3KbMPY7.js} +12 -12
  89. package/dist/{vue-ui-radar-B-jTKgCL.cjs → vue-ui-radar-DXcRNCAa.cjs} +1 -1
  90. package/dist/{vue-ui-rating-DjuCoq0M.js → vue-ui-rating-CnkBBFHV.js} +2 -2
  91. package/dist/{vue-ui-rating-CWLJYf2s.cjs → vue-ui-rating-rjjSmIEJ.cjs} +1 -1
  92. package/dist/{vue-ui-relation-circle-AK--8JLM.js → vue-ui-relation-circle-CZ_FS4Hd.js} +7 -7
  93. package/dist/{vue-ui-relation-circle-Ql6ZFkYK.cjs → vue-ui-relation-circle-DtPwUZGn.cjs} +1 -1
  94. package/dist/{vue-ui-rings-DlszOdMT.cjs → vue-ui-rings-BMwEdEke.cjs} +1 -1
  95. package/dist/{vue-ui-rings-lOFH_to8.js → vue-ui-rings-ByRA0qd4.js} +11 -11
  96. package/dist/{vue-ui-scatter-l-l8Cllm.js → vue-ui-scatter-BXpXY86w.js} +12 -12
  97. package/dist/{vue-ui-scatter-DldUTIFq.cjs → vue-ui-scatter-Cpjy_MXZ.cjs} +1 -1
  98. package/dist/{vue-ui-screenshot-CrvTcVxC.cjs → vue-ui-screenshot-BjEmpeGQ.cjs} +1 -1
  99. package/dist/{vue-ui-screenshot-BiVtkpB9.js → vue-ui-screenshot-CLTmzBUl.js} +1 -1
  100. package/dist/{vue-ui-skeleton-C7cQjNuh.js → vue-ui-skeleton-B-eJiyiK.js} +3 -3
  101. package/dist/{vue-ui-skeleton-BypGpnGR.cjs → vue-ui-skeleton-BFwKDNWk.cjs} +1 -1
  102. package/dist/{vue-ui-smiley-BBUWMyj5.cjs → vue-ui-smiley-B0aRXyCK.cjs} +1 -1
  103. package/dist/{vue-ui-smiley-C0P-U_YM.js → vue-ui-smiley-DPT05g_d.js} +2 -2
  104. package/dist/{vue-ui-spark-trend-Pohir-w4.cjs → vue-ui-spark-trend-DFhBUPgA.cjs} +1 -1
  105. package/dist/{vue-ui-spark-trend-jPUjOnKd.js → vue-ui-spark-trend-ciVsjAVV.js} +5 -5
  106. package/dist/{vue-ui-sparkbar-DRGrJShZ.js → vue-ui-sparkbar-7G6NJ6jC.js} +4 -4
  107. package/dist/{vue-ui-sparkbar-DSIgmn4z.cjs → vue-ui-sparkbar-DXwlMAdA.cjs} +1 -1
  108. package/dist/{vue-ui-sparkgauge-KMNHHr4A.js → vue-ui-sparkgauge-DtL-EHgS.js} +4 -4
  109. package/dist/{vue-ui-sparkgauge-Bb_GeFli.cjs → vue-ui-sparkgauge-RLpXQQdL.cjs} +1 -1
  110. package/dist/{vue-ui-sparkhistogram-BqwrB7j-.cjs → vue-ui-sparkhistogram-C05pVLX4.cjs} +1 -1
  111. package/dist/{vue-ui-sparkhistogram-CMvUAyiv.js → vue-ui-sparkhistogram-CBabO6KY.js} +5 -5
  112. package/dist/{vue-ui-sparkline-ptuGTvxy.js → vue-ui-sparkline-CGpCbxYp.js} +4 -4
  113. package/dist/{vue-ui-sparkline-BGV0iTE1.cjs → vue-ui-sparkline-Dzx9vneB.cjs} +1 -1
  114. package/dist/{vue-ui-sparkstackbar-Bg-rRMOG.js → vue-ui-sparkstackbar-0XJ1y_hw.js} +5 -5
  115. package/dist/{vue-ui-sparkstackbar-B0yQaDMk.cjs → vue-ui-sparkstackbar-BvvoP0Hr.cjs} +1 -1
  116. package/dist/{vue-ui-stackbar-B4iWyEBr.js → vue-ui-stackbar-RxoRAQV1.js} +12 -12
  117. package/dist/{vue-ui-stackbar-BhcvcsKz.cjs → vue-ui-stackbar-S4ZxRQNf.cjs} +1 -1
  118. package/dist/{vue-ui-strip-plot-CteBC2Pl.cjs → vue-ui-strip-plot-6Zxs0p_t.cjs} +1 -1
  119. package/dist/{vue-ui-strip-plot-BEj83Tgt.js → vue-ui-strip-plot-Dd7unCwX.js} +11 -11
  120. package/dist/{vue-ui-table-CVvMDfob.cjs → vue-ui-table-CSEZc0DF.cjs} +1 -1
  121. package/dist/{vue-ui-table-BUeJnxZj.js → vue-ui-table-DZLcx9jA.js} +1 -1
  122. package/dist/{vue-ui-table-heatmap-CBbrj4Q-.cjs → vue-ui-table-heatmap-BA9KsnPZ.cjs} +1 -1
  123. package/dist/{vue-ui-table-heatmap-B49k29Rh.js → vue-ui-table-heatmap-DE6RTOjN.js} +4 -4
  124. package/dist/{vue-ui-table-sparkline-ycJMm1Hk.cjs → vue-ui-table-sparkline-BQZylioG.cjs} +1 -1
  125. package/dist/{vue-ui-table-sparkline-Dvbvgw65.js → vue-ui-table-sparkline-ChmFLAEt.js} +5 -5
  126. package/dist/{vue-ui-thermometer-CkRdpjaQ.cjs → vue-ui-thermometer-BgMnwVpw.cjs} +1 -1
  127. package/dist/{vue-ui-thermometer-CV1MMj-E.js → vue-ui-thermometer-Bj8e-yG-.js} +7 -7
  128. package/dist/{vue-ui-timer-BN12JB4S.js → vue-ui-timer-CcUwIcM7.js} +5 -5
  129. package/dist/{vue-ui-timer-DaBdNn36.cjs → vue-ui-timer-Dql8XcMQ.cjs} +1 -1
  130. package/dist/{vue-ui-tiremarks-DHXn5sWw.cjs → vue-ui-tiremarks-CfNXN9nv.cjs} +1 -1
  131. package/dist/{vue-ui-tiremarks-ClWPLlir.js → vue-ui-tiremarks-ZWxDYt63.js} +7 -7
  132. package/dist/{vue-ui-treemap-DWq5_ImB.cjs → vue-ui-treemap-BQUkiRrP.cjs} +1 -1
  133. package/dist/{vue-ui-treemap-1uBqR8E7.js → vue-ui-treemap-DJlHYN6o.js} +11 -11
  134. package/dist/{vue-ui-vertical-bar-CTEo3CxB.cjs → vue-ui-vertical-bar-DLFK5GLD.cjs} +1 -1
  135. package/dist/{vue-ui-vertical-bar-DV8c2BrB.js → vue-ui-vertical-bar-DfMOQWhA.js} +11 -11
  136. package/dist/{vue-ui-waffle-CuA3KaoT.cjs → vue-ui-waffle-BzqYPHzr.cjs} +1 -1
  137. package/dist/{vue-ui-waffle-fXL2N03M.js → vue-ui-waffle-CVmVbugH.js} +11 -11
  138. package/dist/{vue-ui-wheel-D3l8Zj6H.cjs → vue-ui-wheel-B7jyz4v1.cjs} +1 -1
  139. package/dist/{vue-ui-wheel-Buw3ZXPa.js → vue-ui-wheel-DPgJtWnl.js} +7 -7
  140. package/dist/{vue-ui-word-cloud-Xqjh9Q30.js → vue-ui-word-cloud-D_aYLkHs.js} +10 -10
  141. package/dist/{vue-ui-word-cloud-B8VMBqal.cjs → vue-ui-word-cloud-YBQ8Tptq.cjs} +1 -1
  142. package/dist/vue-ui-xy-CnXzhDb7.cjs +3 -0
  143. package/dist/{vue-ui-xy-Cr_UmMcD.js → vue-ui-xy-DIvGE5ZZ.js} +869 -869
  144. package/dist/{vue-ui-xy-canvas-CBxPjJOJ.cjs → vue-ui-xy-canvas-Dy7oda3-.cjs} +1 -1
  145. package/dist/{vue-ui-xy-canvas-B82jCvbc.js → vue-ui-xy-canvas-Kf-kmYwM.js} +11 -11
  146. package/package.json +2 -2
  147. package/dist/Slicer-CiHJ4t5H.cjs +0 -1
  148. package/dist/vue-ui-parallel-coordinate-plot-DfMN7jaW.cjs +0 -8
  149. package/dist/vue-ui-xy-BSvt9roY.cjs +0 -3
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-YfDOzIGL.cjs"),Q=require("./Title-DPx1SQ60.cjs"),L=require("./usePrinter-BfKKkLev.cjs"),Z=require("./Legend-pFwNBjPs.cjs"),f=require("./BaseIcon-bxNR7IJr.cjs"),ee=require("./DataTable-DPFAxETx.cjs"),te=require("./vue-ui-skeleton-BypGpnGR.cjs"),oe=require("./vue-ui-accordion-BDO_Zh68.cjs"),O=require("./useNestedProp-WJ8kD00a.cjs"),le=require("./PackageVersion-Bdfz6JAs.cjs"),ae=require("./PenAndPaper-qO8pMTxM.cjs"),re=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],se={key:2,style:"width:100%;background:transparent"},ue=["xmlns","viewBox"],ie=["id"],ce=["stop-color"],de=["stop-color"],ye=["x1","y1","x2","y2","stroke","stroke-width"],ve=["d","stroke","stroke-width"],me=["stroke"],he=["fill"],pe=["stroke"],fe=["fill"],ke=["stroke"],ge=["fill"],be=["stroke"],Ce=["fill"],Ne=["stroke"],xe=["fill"],we=["d","stroke","stroke-width","fill"],_e=["x1","y1","stroke"],Ve=["cx","cy","fill","stroke"],Pe=["fill","stroke"],Be=["y","fill","font-weight"],$e=["y","fill"],Me={key:5,class:"vue-data-ui-watermark"},Ee=["onClick"],Ae={style:{"font-weight":"bold"}},Se={key:8,ref:"source",dir:"auto"},Te=["innerHTML"],Le={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(I,{expose:F}){const s=I,{vue_ui_mood_radar:D}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),N=e.ref(null),q=e.ref(null),n=e.ref(null),z=e.ref(null),j=e.ref(0),W=e.ref(0),V=e.ref(0),t=e.computed({get:()=>P(),set:l=>l});function P(){const l=O.useNestedProp({userConfig:s.config,defaultConfig:D});return l.theme?{...O.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=P(),_(),j.value+=1,W.value+=1,V.value+=1},{deep:!0});const{isPrinting:B,isImaging:$,generatePdf:M,generateImage:E}=L.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),G=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),k=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),x=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function R({centerX:l,centerY:a,apexX:o,apexY:u,proportion:c,key:p,value:J}){return{x:l+(o-l)*c,y:a+(u-a)*c,key:p,value:J}}const U=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),v=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),i=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/v.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),A=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),x.value.coordinates.map((l,a)=>{const o=R({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:i.value[a].value/U.value,key:i.value[a].key,value:i.value[a].value});return{...l,plots:o,key:i.value[a].key}})):[]),H=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 X(l){l===n.value?n.value=null:n.value=l}const y=e.computed(()=>{const l=i.value.map(o=>({name:o.key,color:o.color})),a=i.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function S(){e.nextTick(()=>{const l=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(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,p)=>[{color:c.color,name:c.name},y.value.body[p].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[p]/v.value)?"-":(y.value.body[p]/v.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:u}});function K(){return i.value}function T(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function Y(l){b.value=l}const C=e.ref(!1);function w(){C.value=!C.value}return F({getData:K,generatePdf:M,generateCsv:S,generateImage:E,toggleTable:T,toggleAnnotator:w}),(l,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;background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ae.PenAndPaper,{key:0,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:w},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),G.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:z,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(Q._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"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(L.UserOptions,{key:3,ref_key:"details",ref:q,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(B),isImaging:e.unref($),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,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:Y,onGeneratePdf:e.unref(M),onGenerateCsv:S,onGenerateImage:e.unref(E),onToggleTable:T,onToggleAnnotator:w},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,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:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(le._sfc_main),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":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,ce),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,de)],8,ie)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ye))),256)),e.createElementVNode("path",{d:x.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,ve),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,me),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,he),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,pe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,fe),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,ke),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,ge),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,be),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,Ce),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,Ne),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,xe),e.createElementVNode("path",{d:e.unref(r.makePath)(A.value.map(o=>o.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})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,we),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value.map(o=>o.plots),(o,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,_e),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Ve),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Pe),e.createElementVNode("text",{x:128,y:["5",5].includes(o.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,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),9,Be),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,$e)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,ue)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(B)||e.unref($)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(te.default,{key:6,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(Z.Legend,{legendSet:i.value,config:H.value,key:`legend_${V.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>X(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(f.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(f.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(f.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(f.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(f.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",Ae,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Ee)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:i.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(oe.default,{key:9,hideDetails:"",config:{open:k.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(ee.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]=o=>k.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Te)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ne))}},Oe=re._export_sfc(Le,[["__scopeId","data-v-80a971b6"]]);exports.default=Oe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-kr_QwGDL.cjs"),Q=require("./Title-CExB31p9.cjs"),L=require("./usePrinter-DnY533x9.cjs"),Z=require("./Legend-Dx7YB-Bt.cjs"),f=require("./BaseIcon-rMg8xfhX.cjs"),ee=require("./DataTable-CRmILZBX.cjs"),te=require("./vue-ui-skeleton-BFwKDNWk.cjs"),oe=require("./vue-ui-accordion-Cc1lCYCG.cjs"),O=require("./useNestedProp-DCTYscDQ.cjs"),le=require("./PackageVersion-B34JcKhO.cjs"),ae=require("./PenAndPaper-DrCIS0Eh.cjs"),re=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],se={key:2,style:"width:100%;background:transparent"},ue=["xmlns","viewBox"],ie=["id"],ce=["stop-color"],de=["stop-color"],ye=["x1","y1","x2","y2","stroke","stroke-width"],ve=["d","stroke","stroke-width"],me=["stroke"],he=["fill"],pe=["stroke"],fe=["fill"],ke=["stroke"],ge=["fill"],be=["stroke"],Ce=["fill"],Ne=["stroke"],xe=["fill"],we=["d","stroke","stroke-width","fill"],_e=["x1","y1","stroke"],Ve=["cx","cy","fill","stroke"],Pe=["fill","stroke"],Be=["y","fill","font-weight"],$e=["y","fill"],Me={key:5,class:"vue-data-ui-watermark"},Ee=["onClick"],Ae={style:{"font-weight":"bold"}},Se={key:8,ref:"source",dir:"auto"},Te=["innerHTML"],Le={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(I,{expose:F}){const s=I,{vue_ui_mood_radar:D}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),N=e.ref(null),q=e.ref(null),n=e.ref(null),z=e.ref(null),j=e.ref(0),W=e.ref(0),V=e.ref(0),t=e.computed({get:()=>P(),set:l=>l});function P(){const l=O.useNestedProp({userConfig:s.config,defaultConfig:D});return l.theme?{...O.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=P(),_(),j.value+=1,W.value+=1,V.value+=1},{deep:!0});const{isPrinting:B,isImaging:$,generatePdf:M,generateImage:E}=L.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),G=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),k=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),x=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function R({centerX:l,centerY:a,apexX:o,apexY:u,proportion:c,key:p,value:J}){return{x:l+(o-l)*c,y:a+(u-a)*c,key:p,value:J}}const U=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),v=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),i=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/v.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),A=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),x.value.coordinates.map((l,a)=>{const o=R({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:i.value[a].value/U.value,key:i.value[a].key,value:i.value[a].value});return{...l,plots:o,key:i.value[a].key}})):[]),H=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 X(l){l===n.value?n.value=null:n.value=l}const y=e.computed(()=>{const l=i.value.map(o=>({name:o.key,color:o.color})),a=i.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function S(){e.nextTick(()=>{const l=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(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,p)=>[{color:c.color,name:c.name},y.value.body[p].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[p]/v.value)?"-":(y.value.body[p]/v.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:u}});function K(){return i.value}function T(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function Y(l){b.value=l}const C=e.ref(!1);function w(){C.value=!C.value}return F({getData:K,generatePdf:M,generateCsv:S,generateImage:E,toggleTable:T,toggleAnnotator:w}),(l,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;background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ae.PenAndPaper,{key:0,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:w},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),G.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:z,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(Q._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"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(L.UserOptions,{key:3,ref_key:"details",ref:q,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(B),isImaging:e.unref($),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,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:Y,onGeneratePdf:e.unref(M),onGenerateCsv:S,onGenerateImage:e.unref(E),onToggleTable:T,onToggleAnnotator:w},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,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:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(le._sfc_main),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":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,ce),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,de)],8,ie)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ye))),256)),e.createElementVNode("path",{d:x.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,ve),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,me),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,he),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,pe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,fe),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,ke),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,ge),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,be),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,Ce),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,Ne),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,xe),e.createElementVNode("path",{d:e.unref(r.makePath)(A.value.map(o=>o.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})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,we),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value.map(o=>o.plots),(o,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,_e),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Ve),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Pe),e.createElementVNode("text",{x:128,y:["5",5].includes(o.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,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),9,Be),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,$e)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,ue)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(B)||e.unref($)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(te.default,{key:6,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(Z.Legend,{legendSet:i.value,config:H.value,key:`legend_${V.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>X(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(f.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(f.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(f.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(f.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(f.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",Ae,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Ee)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:i.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(oe.default,{key:9,hideDetails:"",config:{open:k.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(ee.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]=o=>k.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Te)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ne))}},Oe=re._export_sfc(Le,[["__scopeId","data-v-80a971b6"]]);exports.default=Oe;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-YfDOzIGL.cjs"),pe=require("./useResponsive-BJ7DTGpm.cjs"),Ne=require("./Title-DPx1SQ60.cjs"),he=require("./usePrinter-BfKKkLev.cjs"),Se=require("./DataTable-DPFAxETx.cjs"),Ee=require("./Tooltip-BxmlUqdH.cjs"),Ve=require("./Legend-pFwNBjPs.cjs"),Fe=require("./vue-ui-skeleton-BypGpnGR.cjs"),Te=require("./vue-ui-accordion-BDO_Zh68.cjs"),ye=require("./useNestedProp-WJ8kD00a.cjs"),Pe=require("./PackageVersion-Bdfz6JAs.cjs"),De=require("./PenAndPaper-qO8pMTxM.cjs"),ze=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),q=B=>(e.pushScopeId("data-v-038450b3"),B=B(),e.popScopeId(),B),Oe=["id"],Ie=["xmlns","viewBox"],Ae=["id"],Me=q(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Re=["offset","stop-color"],qe=["offset","stop-opacity"],Ue=q(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Ye=["id"],Xe=["id"],Ge=q(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),He=["id"],We=["flood-color"],Je=["d","fill","stroke","stroke-width","filter"],Ke={key:0},Qe=["d","fill"],Ze={key:1},je=["x","y","font-size","font-weight","fill"],et={key:2},tt=["filter"],lt=["text-anchor","x","y","fill","font-size","font-weight"],at=["text-anchor","x","y","fill","font-size","font-weight"],ot=["text-anchor","x","y","fill","font-size","font-weight"],nt=["d","fill","onMouseenter","onClick"],rt={key:5,class:"vue-data-ui-watermark"},st={key:0,class:"vue-ui-nested-donuts-legend-title"},ut=["onClick"],it=["innerHTML"],ct={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(B,{expose:me,emit:U}){const k=B,{vue_ui_nested_donuts:be}=r.useConfig(),_=e.computed(()=>!!k.dataset&&k.dataset.length),p=e.ref(r.createUid()),T=e.ref(!1),P=e.ref(""),ge=e.ref(null),Y=e.ref(0),w=e.ref(null),X=e.ref(null),D=e.ref(null),G=e.ref(null),H=e.ref(null),W=e.ref(0),J=e.ref(0),K=e.ref(0),x=e.ref(!1);function ke(l){x.value=l,Y.value+=1}const t=e.computed({get:()=>Q(),set:l=>l});function Q(){const l=ye.useNestedProp({userConfig:k.config,defaultConfig:be});return l.theme?{...ye.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>k.config,l=>{t.value=Q(),Z(),W.value+=1,J.value+=1,K.value+=1},{deep:!0});const $=e.ref(null);e.onMounted(()=>{Z()});function Z(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=pe.throttle(()=>{const{width:s,height:o}=pe.useResponsive({chart:w.value,title:t.value.style.chart.title.text?X.value:null,legend:t.value.style.chart.legend.show?D.value:null,source:G.value,noTitle:H.value});d.value.width=s,d.value.height=o});$.value=new ResizeObserver(l),$.value.observe(w.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:j,isImaging:ee,generatePdf:te,generateImage:le}=he.usePrinter({elementId:`nested_donuts_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),Ce=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Le=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),d=e.ref({height:512,width:512});function we({datapoint:l,index:s}){U("selectDatapoint",{datapoint:l,index:s})}const v=e.ref([]),m=e.computed(()=>(k.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((o,n)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,s)=>({...l,total:l.series.filter(o=>!v.value.includes(o.id)).map(o=>r.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:s,id:`${p.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${p.value}_${s}`,id:`${p.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||Le.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:r.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(d.value.height,d.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),ae=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!v.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!v.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function Be(l,s,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<s}const c=e.ref(ae.value);e.watch(()=>ae.value,l=>c.value=l);const oe=e.ref(null),ne=e.ref(null);function z(l){U("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=c.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),f=Be(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(oe.value),c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),oe.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(f){let i=function(){a<.1?(cancelAnimationFrame(ne.value),v.value.push(l.id),c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:0}:L)}))):(a/=1.1,c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:a}:L)})),ne.value=requestAnimationFrame(i))};i()}}const O=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),re=e.computed(()=>c.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>c.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,O.value)}})),se=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),ue=e.ref(null),S=e.ref(null),E=e.ref(null),I=e.ref(null);function xe({datapoint:l,_relativeIndex:s,seriesIndex:o}){ue.value=l.arcOfId,S.value=l.id,E.value=o,I.value={datapoint:l,seriesIndex:o,series:c.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:c.value,config:t.value})))P.value=n({seriesIndex:o,datapoint:l,series:c.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=c.value.map(f=>f.series.find(i=>i.seriesIndex===o));u.forEach((f,i)=>{if(!f)return"";a+=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-kr_QwGDL.cjs"),pe=require("./useResponsive-BJ7DTGpm.cjs"),Ne=require("./Title-CExB31p9.cjs"),he=require("./usePrinter-DnY533x9.cjs"),Se=require("./DataTable-CRmILZBX.cjs"),Ee=require("./Tooltip-CLsCXPX_.cjs"),Ve=require("./Legend-Dx7YB-Bt.cjs"),Fe=require("./vue-ui-skeleton-BFwKDNWk.cjs"),Te=require("./vue-ui-accordion-Cc1lCYCG.cjs"),ye=require("./useNestedProp-DCTYscDQ.cjs"),Pe=require("./PackageVersion-B34JcKhO.cjs"),De=require("./PenAndPaper-DrCIS0Eh.cjs"),ze=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),q=B=>(e.pushScopeId("data-v-038450b3"),B=B(),e.popScopeId(),B),Oe=["id"],Ie=["xmlns","viewBox"],Ae=["id"],Me=q(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Re=["offset","stop-color"],qe=["offset","stop-opacity"],Ue=q(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Ye=["id"],Xe=["id"],Ge=q(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),He=["id"],We=["flood-color"],Je=["d","fill","stroke","stroke-width","filter"],Ke={key:0},Qe=["d","fill"],Ze={key:1},je=["x","y","font-size","font-weight","fill"],et={key:2},tt=["filter"],lt=["text-anchor","x","y","fill","font-size","font-weight"],at=["text-anchor","x","y","fill","font-size","font-weight"],ot=["text-anchor","x","y","fill","font-size","font-weight"],nt=["d","fill","onMouseenter","onClick"],rt={key:5,class:"vue-data-ui-watermark"},st={key:0,class:"vue-ui-nested-donuts-legend-title"},ut=["onClick"],it=["innerHTML"],ct={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(B,{expose:me,emit:U}){const k=B,{vue_ui_nested_donuts:be}=r.useConfig(),_=e.computed(()=>!!k.dataset&&k.dataset.length),p=e.ref(r.createUid()),T=e.ref(!1),P=e.ref(""),ge=e.ref(null),Y=e.ref(0),w=e.ref(null),X=e.ref(null),D=e.ref(null),G=e.ref(null),H=e.ref(null),W=e.ref(0),J=e.ref(0),K=e.ref(0),x=e.ref(!1);function ke(l){x.value=l,Y.value+=1}const t=e.computed({get:()=>Q(),set:l=>l});function Q(){const l=ye.useNestedProp({userConfig:k.config,defaultConfig:be});return l.theme?{...ye.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>k.config,l=>{t.value=Q(),Z(),W.value+=1,J.value+=1,K.value+=1},{deep:!0});const $=e.ref(null);e.onMounted(()=>{Z()});function Z(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=pe.throttle(()=>{const{width:s,height:o}=pe.useResponsive({chart:w.value,title:t.value.style.chart.title.text?X.value:null,legend:t.value.style.chart.legend.show?D.value:null,source:G.value,noTitle:H.value});d.value.width=s,d.value.height=o});$.value=new ResizeObserver(l),$.value.observe(w.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:j,isImaging:ee,generatePdf:te,generateImage:le}=he.usePrinter({elementId:`nested_donuts_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),Ce=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Le=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),d=e.ref({height:512,width:512});function we({datapoint:l,index:s}){U("selectDatapoint",{datapoint:l,index:s})}const v=e.ref([]),m=e.computed(()=>(k.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((o,n)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,s)=>({...l,total:l.series.filter(o=>!v.value.includes(o.id)).map(o=>r.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:s,id:`${p.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${p.value}_${s}`,id:`${p.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||Le.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:r.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(d.value.height,d.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),ae=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!v.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!v.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function Be(l,s,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<s}const c=e.ref(ae.value);e.watch(()=>ae.value,l=>c.value=l);const oe=e.ref(null),ne=e.ref(null);function z(l){U("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=c.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),f=Be(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(oe.value),c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),oe.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(f){let i=function(){a<.1?(cancelAnimationFrame(ne.value),v.value.push(l.id),c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:0}:L)}))):(a/=1.1,c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:a}:L)})),ne.value=requestAnimationFrame(i))};i()}}const O=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),re=e.computed(()=>c.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>c.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,O.value)}})),se=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),ue=e.ref(null),S=e.ref(null),E=e.ref(null),I=e.ref(null);function xe({datapoint:l,_relativeIndex:s,seriesIndex:o}){ue.value=l.arcOfId,S.value=l.id,E.value=o,I.value={datapoint:l,seriesIndex:o,series:c.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:c.value,config:t.value})))P.value=n({seriesIndex:o,datapoint:l,series:c.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=c.value.map(f=>f.series.find(i=>i.seriesIndex===o));u.forEach((f,i)=>{if(!f)return"";a+=`
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,16 +1,16 @@
1
1
  import { computed as g, ref as i, watch as ze, onMounted as et, onBeforeUnmount as tt, openBlock as s, createElementBlock as n, normalizeClass as P, normalizeStyle as re, createBlock as D, createCommentVNode as v, unref as r, createSlots as lt, withCtx as m, renderSlot as k, normalizeProps as R, guardReactiveProps as E, createVNode as Ve, createElementVNode as p, Fragment as L, renderList as F, toDisplayString as N, createTextVNode as Q, nextTick as at, pushScopeId as ot, popScopeId as st } from "vue";
2
- import { u as ut, c as nt, t as rt, a as it, p as Z, o as dt, e as V, b as ct, I as Me, d as vt, m as Be, f as x, X as ft, s as Ue, K as ht, k as M, n as ie, i as G, x as Re, y as yt, q as pt, r as bt } from "./index-DwLdoaoI.js";
2
+ import { u as ut, c as nt, t as rt, a as it, p as Z, o as dt, e as V, b as ct, I as Me, d as vt, m as Be, f as x, X as ft, s as Ue, K as ht, k as M, n as ie, i as G, x as Re, y as yt, q as pt, r as bt } from "./index-XO811G4S.js";
3
3
  import { t as gt, u as mt } from "./useResponsive-CoxXLe23.js";
4
- import { _ as kt } from "./Title-CFHy9-HZ.js";
5
- import { u as wt, U as _t } from "./usePrinter-QQ8sIBRI.js";
6
- import { D as $t } from "./DataTable-DSmlK27d.js";
7
- import { _ as Lt } from "./Tooltip-DLCVqP66.js";
8
- import { L as xt } from "./Legend-CjRX0KB0.js";
9
- import Ct from "./vue-ui-skeleton-C7cQjNuh.js";
10
- import Tt from "./vue-ui-accordion-BCbBgQnM.js";
11
- import { u as Ee } from "./useNestedProp-BE-9rWPi.js";
12
- import { _ as Ft } from "./PackageVersion-6g32vfzE.js";
13
- import { P as St } from "./PenAndPaper-Bxz6JnY-.js";
4
+ import { _ as kt } from "./Title-BYSs_RNw.js";
5
+ import { u as wt, U as _t } from "./usePrinter-CsX9yzzX.js";
6
+ import { D as $t } from "./DataTable-Cccy3rvu.js";
7
+ import { _ as Lt } from "./Tooltip-CZd_cGTh.js";
8
+ import { L as xt } from "./Legend-CfcLlhaP.js";
9
+ import Ct from "./vue-ui-skeleton-B-eJiyiK.js";
10
+ import Tt from "./vue-ui-accordion-DvWhOtea.js";
11
+ import { u as Ee } from "./useNestedProp-LP4oR6kx.js";
12
+ import { _ as Ft } from "./PackageVersion-CiFF5PGi.js";
13
+ import { P as St } from "./PenAndPaper-BpIqWG4P.js";
14
14
  import { _ as Nt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
15
  const de = (B) => (ot("data-v-038450b3"), B = B(), st(), B), It = ["id"], At = ["xmlns", "viewBox"], Ot = ["id"], Pt = /* @__PURE__ */ de(() => /* @__PURE__ */ p("stop", {
16
16
  offset: "0%",
@@ -1,16 +1,16 @@
1
1
  import { computed as d, ref as s, watch as ye, onMounted as ze, onBeforeUnmount as Ye, openBlock as n, createElementBlock as u, normalizeClass as V, normalizeStyle as q, createBlock as C, createCommentVNode as g, unref as v, createSlots as Be, withCtx as h, renderSlot as f, normalizeProps as S, guardReactiveProps as M, createVNode as me, Fragment as F, renderList as N, createElementVNode as _, toDisplayString as O, createTextVNode as Ve, nextTick as Xe } from "vue";
2
- import { u as Ge, c as Ue, t as Ee, a as He, p as be, b as We, o as je, e as J, d as qe, X as Je, f as R, i as K, x as ke, q as Ke, r as Qe, y as Ze } from "./index-DwLdoaoI.js";
2
+ import { u as Ge, c as Ue, t as Ee, a as He, p as be, b as We, o as je, e as J, d as qe, X as Je, f as R, i as K, x as ke, q as Ke, r as Qe, y as Ze } from "./index-XO811G4S.js";
3
3
  import { t as et, u as tt } from "./useResponsive-CoxXLe23.js";
4
- import { _ as at } from "./Title-CFHy9-HZ.js";
5
- import { u as lt, U as ot } from "./usePrinter-QQ8sIBRI.js";
6
- import { L as rt } from "./Legend-CjRX0KB0.js";
7
- import { D as nt } from "./DataTable-DSmlK27d.js";
8
- import { _ as st } from "./Tooltip-DLCVqP66.js";
9
- import ut from "./vue-ui-skeleton-C7cQjNuh.js";
10
- import it from "./vue-ui-accordion-BCbBgQnM.js";
11
- import { u as $e } from "./useNestedProp-BE-9rWPi.js";
12
- import { _ as ct } from "./PackageVersion-6g32vfzE.js";
13
- import { P as dt } from "./PenAndPaper-Bxz6JnY-.js";
4
+ import { _ as at } from "./Title-BYSs_RNw.js";
5
+ import { u as lt, U as ot } from "./usePrinter-CsX9yzzX.js";
6
+ import { L as rt } from "./Legend-CfcLlhaP.js";
7
+ import { D as nt } from "./DataTable-Cccy3rvu.js";
8
+ import { _ as st } from "./Tooltip-CZd_cGTh.js";
9
+ import ut from "./vue-ui-skeleton-B-eJiyiK.js";
10
+ import it from "./vue-ui-accordion-DvWhOtea.js";
11
+ import { u as $e } from "./useNestedProp-LP4oR6kx.js";
12
+ import { _ as ct } from "./PackageVersion-CiFF5PGi.js";
13
+ import { P as dt } from "./PenAndPaper-BpIqWG4P.js";
14
14
  import { _ as vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
15
  const ht = ["id"], ft = ["xmlns", "viewBox"], gt = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], pt = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], yt = ["id"], mt = ["stdDeviation"], bt = ["filter"], kt = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], $t = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "onMouseenter"], wt = { key: 1 }, Ct = ["onMouseenter"], xt = ["x", "y", "font-size", "fill", "font-weight"], Tt = {
16
16
  key: 5,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-YfDOzIGL.cjs"),Z=require("./useResponsive-BJ7DTGpm.cjs"),ye=require("./Title-DPx1SQ60.cjs"),ee=require("./usePrinter-BfKKkLev.cjs"),ke=require("./Legend-pFwNBjPs.cjs"),be=require("./DataTable-DPFAxETx.cjs"),Ce=require("./Tooltip-BxmlUqdH.cjs"),we=require("./vue-ui-skeleton-BypGpnGR.cjs"),$e=require("./vue-ui-accordion-BDO_Zh68.cjs"),te=require("./useNestedProp-WJ8kD00a.cjs"),xe=require("./PackageVersion-Bdfz6JAs.cjs"),Be=require("./PenAndPaper-qO8pMTxM.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Pe=["id"],Se=["xmlns","viewBox"],_e=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Ne=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Oe=["id"],Ve=["stdDeviation"],Ae=["filter"],Ee=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],Fe=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],Ie={key:1},Le=["onMouseenter"],Me=["x","y","font-size","fill","font-weight"],Re={key:5,class:"vue-data-ui-watermark"},De=["onClick"],ze=["innerHTML"],qe={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ae,{expose:le,emit:oe}){const p=ae,{vue_ui_onion:re}=u.useConfig(),w=e.computed(()=>!!p.dataset&&p.dataset.length),m=e.ref(u.createUid()),ne=e.ref(null),E=e.ref(0),$=e.ref(!1),P=e.ref(""),d=e.ref([]),y=e.ref(null),F=e.ref(null),I=e.ref(null),L=e.ref(null),M=e.ref(null),R=e.ref(0),D=e.ref(0),z=e.ref(0),t=e.computed({get:()=>q(),set:a=>a});function q(){const a=te.useNestedProp({userConfig:p.config,defaultConfig:re});return a.theme?{...te.useNestedProp({userConfig:u.themes.vue_ui_onion[a.theme]||p.config,defaultConfig:a}),customPalette:u.themePalettes[a.theme]||u.palette}:a}e.watch(()=>p.config,a=>{t.value=q(),H(),R.value+=1,D.value+=1,z.value+=1},{deep:!0});const{isPrinting:Y,isImaging:X,generatePdf:U,generateImage:G}=ee.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),ue=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),se=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),f=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(()=>{H()});function H(){if(u.objectIsEmpty(p.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=Z.throttle(()=>{const{width:l,height:o}=Z.useResponsive({chart:y.value,title:t.value.style.chart.title.text?F.value:null,legend:t.value.style.chart.legend.show?I.value:null,source:L.value,noTitle:M.value});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(()=>(p.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})}),p.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)||se.value[r]||u.palette[r],id:l,shape:"circle",opacity:d.value.includes(l)?.5:1,absoluteIndex:r,segregate:()=>W(l),isSegregated:d.value.includes(l)}}))),k=e.ref(i.value),ie=e.computed(()=>t.value.useStartAnimation),ce=e.ref(null),de=e.computed(()=>Math.max(...i.value.map(a=>a.percentage))),S=e.ref(!1);e.watch(()=>i.value,ve,{immediate:!0});function ve(){if(ie.value&&!S.value){let r=function(){a>=de.value?(cancelAnimationFrame(ce.value),k.value=i.value,S.value=!0):(k.value=i.value.map(l=>({...l,percentage:a<l.targetPercentage?a:l.targetPercentage})),a+=1,requestAnimationFrame(r),S.value=!0)};k.value=i.value.map(l=>({...l,percentage:0}));let a=0;r()}else k.value=i.value}const he=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":""})),pe=e.computed(()=>i.value.filter(a=>!d.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}}),v=e.computed(()=>k.value.filter(a=>!d.value.includes(a.id)).map((a,r)=>{const l=(s.value.maxRadius-g.value.track)/pe.value/2*(1+r),o=s.value.centerY-l;return{percentage:a.percentage||0,...a,labelY:o,radius:l,path:fe(l,a.percentage||0)}}));function fe(a,r){const l=2*Math.PI*a,o=l*.75,c=`${o} ${l}`,C=o*(1-r/100);return{bgDashArray:`${o} ${l}`,bgDashOffset:0,dashArray:c,dashOffset:C,fullOffset:0,active:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-kr_QwGDL.cjs"),Z=require("./useResponsive-BJ7DTGpm.cjs"),ye=require("./Title-CExB31p9.cjs"),ee=require("./usePrinter-DnY533x9.cjs"),ke=require("./Legend-Dx7YB-Bt.cjs"),be=require("./DataTable-CRmILZBX.cjs"),Ce=require("./Tooltip-CLsCXPX_.cjs"),we=require("./vue-ui-skeleton-BFwKDNWk.cjs"),$e=require("./vue-ui-accordion-Cc1lCYCG.cjs"),te=require("./useNestedProp-DCTYscDQ.cjs"),xe=require("./PackageVersion-B34JcKhO.cjs"),Be=require("./PenAndPaper-DrCIS0Eh.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Pe=["id"],Se=["xmlns","viewBox"],_e=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Ne=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Oe=["id"],Ve=["stdDeviation"],Ae=["filter"],Ee=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],Fe=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],Ie={key:1},Le=["onMouseenter"],Me=["x","y","font-size","fill","font-weight"],Re={key:5,class:"vue-data-ui-watermark"},De=["onClick"],ze=["innerHTML"],qe={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ae,{expose:le,emit:oe}){const p=ae,{vue_ui_onion:re}=u.useConfig(),w=e.computed(()=>!!p.dataset&&p.dataset.length),m=e.ref(u.createUid()),ne=e.ref(null),E=e.ref(0),$=e.ref(!1),P=e.ref(""),d=e.ref([]),y=e.ref(null),F=e.ref(null),I=e.ref(null),L=e.ref(null),M=e.ref(null),R=e.ref(0),D=e.ref(0),z=e.ref(0),t=e.computed({get:()=>q(),set:a=>a});function q(){const a=te.useNestedProp({userConfig:p.config,defaultConfig:re});return a.theme?{...te.useNestedProp({userConfig:u.themes.vue_ui_onion[a.theme]||p.config,defaultConfig:a}),customPalette:u.themePalettes[a.theme]||u.palette}:a}e.watch(()=>p.config,a=>{t.value=q(),H(),R.value+=1,D.value+=1,z.value+=1},{deep:!0});const{isPrinting:Y,isImaging:X,generatePdf:U,generateImage:G}=ee.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),ue=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),se=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),f=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(()=>{H()});function H(){if(u.objectIsEmpty(p.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=Z.throttle(()=>{const{width:l,height:o}=Z.useResponsive({chart:y.value,title:t.value.style.chart.title.text?F.value:null,legend:t.value.style.chart.legend.show?I.value:null,source:L.value,noTitle:M.value});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(()=>(p.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})}),p.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)||se.value[r]||u.palette[r],id:l,shape:"circle",opacity:d.value.includes(l)?.5:1,absoluteIndex:r,segregate:()=>W(l),isSegregated:d.value.includes(l)}}))),k=e.ref(i.value),ie=e.computed(()=>t.value.useStartAnimation),ce=e.ref(null),de=e.computed(()=>Math.max(...i.value.map(a=>a.percentage))),S=e.ref(!1);e.watch(()=>i.value,ve,{immediate:!0});function ve(){if(ie.value&&!S.value){let r=function(){a>=de.value?(cancelAnimationFrame(ce.value),k.value=i.value,S.value=!0):(k.value=i.value.map(l=>({...l,percentage:a<l.targetPercentage?a:l.targetPercentage})),a+=1,requestAnimationFrame(r),S.value=!0)};k.value=i.value.map(l=>({...l,percentage:0}));let a=0;r()}else k.value=i.value}const he=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":""})),pe=e.computed(()=>i.value.filter(a=>!d.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}}),v=e.computed(()=>k.value.filter(a=>!d.value.includes(a.id)).map((a,r)=>{const l=(s.value.maxRadius-g.value.track)/pe.value/2*(1+r),o=s.value.centerY-l;return{percentage:a.percentage||0,...a,labelY:o,radius:l,path:fe(l,a.percentage||0)}}));function fe(a,r){const l=2*Math.PI*a,o=l*.75,c=`${o} ${l}`,C=o*(1-r/100);return{bgDashArray:`${o} ${l}`,bgDashOffset:0,dashArray:c,dashOffset:C,fullOffset:0,active:`
2
2
  M ${s.value.centerX},${s.value.centerY-a}
3
3
  A ${a},${a} 0 1 1
4
4
  ${s.value.centerX+a*Math.cos(Math.PI*3/4)},${s.value.centerY+a*Math.sin(Math.PI*3/4)}
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-kr_QwGDL.cjs"),se=require("./useResponsive-BJ7DTGpm.cjs"),xe=require("./Title-CExB31p9.cjs"),Ce=require("./Legend-Dx7YB-Bt.cjs"),we=require("./Tooltip-CLsCXPX_.cjs"),Be=require("./Shape-JdI6ZCm8.cjs"),re=require("./usePrinter-DnY533x9.cjs"),$e=require("./DataTable-CRmILZBX.cjs"),ze=require("./vue-ui-accordion-Cc1lCYCG.cjs"),Ne=require("./vue-ui-skeleton-BFwKDNWk.cjs"),ue=require("./useNestedProp-DCTYscDQ.cjs"),Se=require("./PackageVersion-B34JcKhO.cjs"),Ae=require("./PenAndPaper-DrCIS0Eh.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Pe=["id"],_e=["xmlns","viewBox"],Fe={style:{"pointer-events":"none"}},Me=["x1","x2","y1","y2","stroke","stroke-width"],Ee=["x","y","fill","font-size","font-weight"],Ie=["x1","x2","y1","y2","stroke","stroke-width"],Le=["x","y","fill","font-size","font-weight"],Ve={key:0},Oe=["x","y","font-size","fill"],De=["width","x","y"],qe={style:{width:"100%"}},Re=["x","y","fill","font-weight","font-size","onMouseenter"],Ue=["d","stroke","stroke-width","onMouseenter"],We=["d","onMouseenter"],je={key:5,class:"vue-data-ui-watermark"},He=["onClick"],Ge=["innerHTML"],Ye={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ie,{expose:ce,emit:I}){const b=ie,{vue_ui_parallel_coordinate_plot:de}=u.useConfig(),x=e.computed({get(){return!!b.dataset&&b.dataset.length},set(a){return a}}),L=e.ref(0),C=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),q=e.ref(null),R=e.ref(0),U=e.ref(0),W=e.ref(0),T=e.ref(u.createUid()),$=e.ref(!1);function ve(a){$.value=a,L.value+=1}const t=e.computed({get:()=>j(),set:a=>a});function j(){const a=ue.useNestedProp({userConfig:b.config,defaultConfig:de});return a.theme?{...ue.useNestedProp({userConfig:u.themes.vue_ui_parallel_coordinate_plot[a.theme]||b.config,defaultConfig:a}),customPalette:u.themePalettes[a.theme]||u.palette}:a}e.watch(()=>b.config,a=>{t.value=j(),H(),R.value+=1,W.value+=1,U.value+=1},{deep:!0});const z=e.ref(null);e.onMounted(()=>{H()});function H(){if(u.objectIsEmpty(b.dataset)?u.error({componentName:"VueUiParallelCoordinatePlot",type:"dataset"}):b.dataset.forEach((a,o)=>{u.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","series"]}).forEach(l=>{x.value=!1,u.error({componentName:"VueUiParallelCoordinatePlot",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.responsive){const a=se.throttle(()=>{const{width:o,height:l}=se.useResponsive({chart:C.value,title:t.value.style.chart.title.text?V.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:D.value,noTitle:q.value});c.value.width=o,c.value.height=l,c.value.plotSize=u.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),c.value.ticksFontSize=u.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),c.value.datapointFontSize=u.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),c.value.axisNameFontSize=u.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})});z.value=new ResizeObserver(a),z.value.observe(C.value.parentNode)}}e.onBeforeUnmount(()=>{z.value&&z.value.disconnect()});const{isPrinting:G,isImaging:Y,generatePdf:X,generateImage:J}=re.usePrinter({elementId:`pcp_${T.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"}),pe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),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:n}=t.value.style.chart.padding,r=c.value.height,s=c.value.width;return{chartHeight:r,chartWidth:s,height:r-a-l,width:s-n-o,top:a,left:n,right:s-o,bottom:r-l}}),he=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),h=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 K(a){f.value.includes(a)?f.value=f.value.filter(o=>o!==a):f.value.push(a)}const k=e.computed(()=>b.dataset.map((a,o)=>{const l=u.convertColorToHex(a.color)||he.value[o]||u.palette[o]||u.palette[o%u.palette.length];return{...a,series:a.series.map(n=>({...n,id:u.createUid(),color:l})),seriesIndex:o,color:l,id:u.createUid(),shape:a.shape||"circle"}})),me=e.computed(()=>k.value.map(a=>({...a,opacity:f.value.includes(a.id)?.5:1,segregate:()=>K(a.id),isSegregated:f.value.includes(a.id)}))),ye=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":""})),Q=e.computed(()=>Math.max(...k.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/Q.value),P=e.computed(()=>k.value.filter(a=>!f.value.includes(a.id))),m=e.computed(()=>{let a=[];for(let o=0;o<Q.value;o+=1){const l=Math.min(...P.value.flatMap(v=>v.series.map(A=>A.values[o]||0)||0)),n=Math.max(...P.value.flatMap(v=>v.series.map(A=>A.values[o]||0)||0)),r=n===l?l/4:l,s=n===l?n*2:n,i=u.calculateNiceScale(r,s,t.value.style.chart.yAxis.scaleTicks),g=i.ticks.map((v,A)=>{const be=i.min<0?v+Math.abs(i.min):v-Math.abs(i.min),ke=i.min<0?i.max+Math.abs(i.min):i.max-Math.abs(i.min);return{y:d.value.bottom-d.value.height*(be/ke),x:d.value.left+y.value*o+y.value/2,value:v}});a.push({scale:i,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[o]||`Y-${o+1}`})}return a}),_=e.computed(()=>P.value.map((a,o)=>({...a,series:a.series.map((l,n)=>({...l,datapoints:l.values.map((r,s)=>{const i=m.value[s].scale.min<0?(r||0)+Math.abs(m.value[s].scale.min):(r||0)-Math.abs(m.value[s].scale.min),g=m.value[s].scale.min<0?m.value[s].scale.max+Math.abs(m.value[s].scale.min):m.value[s].scale.max-Math.abs(m.value[s].scale.min);return{name:l.name,seriesName:a.name,axisIndex:s,datapointIndex:n,seriesIndex:o,value:r||0,x:d.value.left+y.value*s+y.value/2,y:d.value.bottom-d.value.height*(i/g),comment:l.comments&&l.comments[s]||""}})}))})).map(a=>({...a,series:a.series.map(o=>{const l=u.createStraightPath(o.datapoints),n=u.createSmoothPath(o.datapoints),r=u.getPathLengthFromCoordinates(t.value.style.chart.lines.smooth?`M ${n}`:`M ${l}`);return{...o,smoothPath:n,straightPath:l,pathLength:r}})})));function Z({value:a,index:o,datapoint:l}){return u.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[o]||null,a,u.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 p=e.ref(null),F=e.ref(null),w=e.ref(!1),M=e.ref("");function N({shape:a,serieName:o,serie:l,relativeIndex:n,seriesIndex:r}){F.value={serie:l,relativeIndex:n,seriesIndex:r,series:k.value,scales:m.value},w.value=!0,p.value=l.id;let s="";const i=t.value.style.chart.tooltip.customFormat;u.isFunction(i)&&u.functionReturnsString(()=>i({serie:l,seriesIndex:l.seriesIndex,series:k.value,config:t.value,scales:m.value}))?M.value=i({serie:l,seriesIndex:l.seriesIndex,series:k.value,config:t.value,scales:m.value}):(s+=`<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>`,m.value.map(g=>g.name).forEach((g,v)=>{s+=`
2
+ <div class="vue-ui-tooltip-item" style="text-align:left">
3
+ <span>${g}: </span>
4
+ <span>
5
+ ${u.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[v]||null,l.datapoints[v].value,u.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[v]||"",v:l.datapoints[v].value,s:t.value.style.chart.yAxis.labels.suffixes[v]||"",r:t.value.style.chart.yAxis.labels.roundings[v]||""}),{datapoint:l.datapoints[v],seriesIndex:v})}
6
+ </span>
7
+ </div>
8
+ `,t.value.style.chart.comments.showInTooltip&&l.datapoints[v].comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${l.color}">${l.datapoints[v].comment}</div>`)}),M.value=`<div>${s}</div>`)}function fe(){return k.value}const B=e.computed(()=>{const a=[t.value.table.columnNames.series].concat([t.value.table.columnNames.item]).concat(m.value.map(r=>r.name)),o=_.value.flatMap((r,s)=>r.series.map(i=>[r.name].concat([i.name]).concat(i.values))),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},n=[t.value.table.columnNames.series].concat([t.value.table.columnNames.item]).concat(m.value.map(r=>r.name));return{body:o,head:a,config:l,colNames:n}}),ee=e.computed(()=>_.value.length===0?{head:[],body:[],config:{},columnNames:[]}:{head:B.value.head,body:B.value.body});function te(){const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=ee.value.head,l=ee.value.body,n=a.concat([o]).concat(l),r=u.createCsvContent(n);u.downloadCsv({csvContent:r,title:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"})}function ge(a){I("selectDatapoint",a)}function ae(a){I("selectLegend",{...a,isSegregated:!a.isSegregated,opacity:a.isSegregated?1:.5})}function le(){h.value.showTable=!h.value.showTable}function oe(){h.value.dataLabels.show=!h.value.dataLabels.show}function ne(){h.value.showTooltip=!h.value.showTooltip}const S=e.ref(!1);function E(){S.value=!S.value}return ce({getData:fe,generateCsv:te,generatePdf:X,generateImage:J,toggleTable:le,toggleLabels:oe,toggleTooltip:ne,toggleAnnotator:E}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"pcpChart",ref:C,class:e.normalizeClass(`vue-ui-pcp ${$.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`pcp_${T.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ae.PenAndPaper,{key:0,parent:C.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:S.value,onClose:E},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),pe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:q,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:V,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(xe._sfc_main,{key:`title_${R.value}`,config:{title:{cy:"pcp-div-title",...t.value.style.chart.title},subtitle:{cy:"pcp-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(re.UserOptions,{ref:"details",key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(G),isImaging:e.unref(Y),uid:T.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:$.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:S.value,onToggleFullscreen:ve,onGeneratePdf:e.unref(X),onGenerateCsv:te,onGenerateImage:e.unref(J),onToggleTable:le,onToggleLabels:oe,onToggleTooltip:ne,onToggleAnnotator:E},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value}),viewBox:`0 0 ${d.value.chartWidth<=0?10:d.value.chartWidth} ${d.value.chartHeight<=0?10:d.value.chartHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Se._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",Fe,[e.createElementVNode("line",{x1:d.value.left+y.value*n+y.value/2,x2:d.value.left+y.value*n+y.value/2,y1:d.value.top,y2:d.value.bottom,stroke:t.value.style.chart.yAxis.stroke,"stroke-width":t.value.style.chart.yAxis.strokeWidth},null,8,Me),e.createElementVNode("text",{x:d.value.left+y.value*n+y.value/2,y:d.value.top-24,fill:t.value.style.chart.yAxis.labels.axisNamesColor,"font-size":c.value.axisNameFontSize,"font-weight":t.value.style.chart.yAxis.labels.axisNamesBold?"bold":"","text-anchor":"middle"},e.toDisplayString(l.name),9,Ee),t.value.style.chart.yAxis.labels.ticks.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.ticks,r=>(e.openBlock(),e.createElementBlock("line",{x1:r.x,x2:r.x-10,y1:r.y,y2:r.y,stroke:t.value.style.chart.yAxis.stroke,"stroke-width":t.value.style.chart.yAxis.strokeWidth,style:e.normalizeStyle(`opacity:${p.value&&!h.value.showTooltip?.2:1}`)},null,12,Ie))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.ticks,r=>(e.openBlock(),e.createElementBlock("text",{x:r.x-12+t.value.style.chart.yAxis.labels.ticks.offsetX,y:r.y+t.value.style.chart.yAxis.labels.ticks.offsetY+c.value.ticksFontSize/3,fill:t.value.style.chart.yAxis.labels.ticks.color,"text-anchor":"end","font-size":c.value.ticksFontSize,"font-weight":t.value.style.chart.yAxis.labels.ticks.bold?"bold":"normal",style:e.normalizeStyle(`opacity:${p.value&&!h.value.showTooltip?.2:1}`)},e.toDisplayString(Z({value:r.value,index:n,datapoint:r})),13,Le))),256))],64)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,l=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.series,(n,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.plots.show?(e.openBlock(),e.createElementBlock("g",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.datapoints,s=>(e.openBlock(),e.createBlock(Be._sfc_main,{plot:{x:s.x,y:s.y},color:l.color,shape:l.shape,radius:l.shape==="triangle"?c.value.plotSize*1.2:c.value.plotSize,stroke:t.value.style.chart.backgroundColor,strokeWidth:.5,onMouseenter:i=>N({shape:l.shape,serieName:l.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[0]||(o[0]=i=>{p.value=null,w.value=!1}),style:e.normalizeStyle(`opacity:${p.value?p.value===n.id?t.value.style.chart.plots.opacity:.2:t.value.style.chart.plots.opacity}`),onClick:()=>ge(s)},null,8,["plot","color","shape","radius","stroke","onMouseenter","style","onClick"]))),256)),h.value.showTooltip?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[p.value&&p.value===n.id&&n.datapoints.length?(e.openBlock(),e.createElementBlock("text",{key:0,x:n.datapoints[0].x-c.value.ticksFontSize,y:n.datapoints[0].y+c.value.ticksFontSize/3,"text-anchor":"end","font-size":c.value.ticksFontSize,fill:l.color,"font-weight":"bold"},e.toDisplayString(n.name),9,Oe)):e.createCommentVNode("",!0)],64)),t.value.style.chart.comments.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.datapoints,s=>(e.openBlock(),e.createElementBlock("g",null,[s.comment?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,style:{overflow:"visible"},height:"12",width:t.value.style.chart.comments.width,x:s.x-t.value.style.chart.comments.width/2+t.value.style.chart.comments.offsetX,y:s.y+t.value.style.chart.comments.offsetY+6},[e.createElementVNode("div",qe,[e.renderSlot(a.$slots,"plot-comment",{plot:{...s,color:l.color}},void 0,!0)])],8,De)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),h.value.dataLabels.show||p.value&&p.value===n.id?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.datapoints,(s,i)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+12+t.value.style.chart.yAxis.labels.datapoints.offsetX,y:s.y+t.value.style.chart.yAxis.labels.datapoints.offsetY+c.value.datapointFontSize/3,fill:t.value.style.chart.yAxis.labels.datapoints.useSerieColor?l.color:t.value.style.chart.yAxis.labels.datapoints.color,"text-anchor":"start","font-weight":t.value.style.chart.yAxis.labels.datapoints.bold?"bold":"normal",class:e.normalizeClass({"vue-ui-pcp-animated":!1,"vue-ui-pcp-transition":!0}),"font-size":c.value.datapointFontSize,onMouseenter:g=>N({shape:l.shape,serieName:l.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[1]||(o[1]=g=>{p.value=null,w.value=!1}),style:e.normalizeStyle(`opacity:${p.value?p.value===n.id?1:.2:1}`)},e.toDisplayString(Z({value:s.value,index:i,datapoint:s})),45,Re))),256)):e.createCommentVNode("",!0),e.createElementVNode("path",{d:`M${t.value.style.chart.lines.smooth?n.smoothPath:n.straightPath}`,stroke:l.color,"stroke-width":t.value.style.chart.lines.strokeWidth,fill:"none",class:e.normalizeClass({"vue-ui-pcp-animated vue-data-ui-line-animated":t.value.useCssAnimation,"vue-ui-pcp-transition":!0}),onMouseenter:s=>N({shape:l.shape,serieName:l.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[2]||(o[2]=s=>{p.value=null,w.value=!1}),style:e.normalizeStyle(`opacity:${p.value?p.value===n.id?t.value.style.chart.lines.opacity:.2:t.value.style.chart.lines.opacity}; stroke-dasharray:${n.pathLength}; stroke-dashoffset: ${t.value.useCssAnimation?n.pathLength:0}`)},null,46,Ue),h.value.showTooltip?(e.openBlock(),e.createElementBlock("path",{key:2,d:`M${t.value.style.chart.lines.smooth?n.smoothPath:n.straightPath}`,stroke:"transparent","stroke-width":12,fill:"none",class:e.normalizeClass({"vue-ui-pcp-animated vue-data-ui-line-animated":t.value.useCssAnimation,"vue-ui-pcp-transition":!0}),onMouseenter:s=>N({shape:l.shape,serieName:l.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[3]||(o[3]=s=>{p.value=null,w.value=!1}),style:{opacity:"0"}},null,42,We)):e.createCommentVNode("",!0)]))),256))]))),256)),e.renderSlot(a.$slots,"svg",{svg:d.value},void 0,!0)],14,_e)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(G)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ne.default,{key:6,config:{type:"parallelCoordinatePlot",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[t.value.style.chart.legend.show&&x.value?(e.openBlock(),e.createBlock(Ce.Legend,{key:`legend_${U.value}`,legendSet:me.value,config:ye.value,onClickMarker:o[4]||(o[4]=({legend:l})=>{K(l.id),ae(l)})},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{onClick:r=>{l.segregate(),ae(l)},style:e.normalizeStyle(`opacity:${f.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name),13,He)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:D,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(we._sfc_main,{show:h.value.showTooltip&&w.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:M.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({...F.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),x.value?(e.openBlock(),e.createBlock(ze.default,{key:8,hideDetails:"",config:{open:h.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock($e.DataTable,{key:`table_${W.value}`,colNames:B.value.colNames,head:B.value.head,body:B.value.body,config:B.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[5]||(o[5]=l=>h.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l},null,8,Ge)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Pe))}},Xe=Te._export_sfc(Ye,[["__scopeId","data-v-0d19b552"]]);exports.default=Xe;