vue-data-ui 2.9.2 → 2.9.3

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 (167) hide show
  1. package/dist/{Arrow-KvKZ2SBJ.cjs → Arrow-Byzfuz-Y.cjs} +1 -1
  2. package/dist/{Arrow-DIEvl571.js → Arrow-Dd8sFWk7.js} +1 -1
  3. package/dist/{BaseIcon-BH4bJe82.js → BaseIcon-CLefSNKF.js} +1 -1
  4. package/dist/{BaseIcon-C6L3qbQ8.cjs → BaseIcon-CSELstL2.cjs} +1 -1
  5. package/dist/{ColorPicker-Dnjy6olA.js → ColorPicker-CZqXDroo.js} +3 -3
  6. package/dist/{ColorPicker-BmVm6Lqe.cjs → ColorPicker-DMqX5Kn5.cjs} +1 -1
  7. package/dist/{DataTable-Cz1SDtvT.cjs → DataTable-CpuMdjPX.cjs} +1 -1
  8. package/dist/{DataTable-CaUgku7o.js → DataTable-Cuky8ZpI.js} +2 -2
  9. package/dist/{Legend-BxZxsJCp.js → Legend-BQ5HGf8B.js} +2 -2
  10. package/dist/{Legend-Bl_MrORk.cjs → Legend-CqHSKd8f.cjs} +1 -1
  11. package/dist/{PackageVersion-BEE_4baV.js → PackageVersion-DJo_CKR-.js} +1 -1
  12. package/dist/{PackageVersion-BrUdYdIC.cjs → PackageVersion-DkyZc28_.cjs} +1 -1
  13. package/dist/{PenAndPaper-B3WdOAcZ.js → PenAndPaper-DK3Wbwoz.js} +3 -3
  14. package/dist/{PenAndPaper-DyGcaflS.cjs → PenAndPaper-DU2wA7cg.cjs} +1 -1
  15. package/dist/{Shape-Hrc-BQkc.js → Shape-BchKnVQT.js} +1 -1
  16. package/dist/{Shape-DuVb3Mev.cjs → Shape-Cp1FyHcE.cjs} +1 -1
  17. package/dist/{Slicer-DVYmI2V1.cjs → Slicer-CE1LNNRp.cjs} +1 -1
  18. package/dist/{Slicer-2ZyRAred.js → Slicer-DvQmWmSB.js} +2 -2
  19. package/dist/{Title-BGh0hWb2.cjs → Title-DV4IpbZv.cjs} +1 -1
  20. package/dist/{Title-CGY0WlAI.js → Title-DmtXFzpc.js} +1 -1
  21. package/dist/{Tooltip-BfEhZz9k.js → Tooltip-BMaBMPpZ.js} +1 -1
  22. package/dist/{Tooltip-DckFFIYj.cjs → Tooltip-De6uq1YK.cjs} +1 -1
  23. package/dist/{dom-to-png-BgJJyI6M.js → dom-to-png-725pnoVX.js} +1 -1
  24. package/dist/{dom-to-png-DnnnXKpR.cjs → dom-to-png-BE7poR2a.cjs} +1 -1
  25. package/dist/{img-DT7UDEPk.cjs → img-CFYnBJP3.cjs} +1 -1
  26. package/dist/{img-DkpJ0ciT.js → img-Ciiut165.js} +1 -1
  27. package/dist/index-Bw9yF1Ws.cjs +9 -0
  28. package/dist/{index-9ZicrZWM.js → index-CeGGP5OF.js} +47 -40
  29. package/dist/pdf-DLDggJUq.cjs +1 -0
  30. package/dist/{pdf-zqw8E-me.js → pdf-DyTBDj-k.js} +18 -18
  31. package/dist/style.css +1 -1
  32. package/dist/types/vue-data-ui.d.cts +2 -0
  33. package/dist/types/vue-data-ui.d.ts +2 -0
  34. package/dist/{useNestedProp-s1XZrtPS.js → useNestedProp-CD9pbB7F.js} +1 -1
  35. package/dist/{useNestedProp-BS9eJthK.cjs → useNestedProp-CuyRUIUu.cjs} +1 -1
  36. package/dist/{usePrinter-vFXYgZiT.cjs → usePrinter-O9uCoI6k.cjs} +1 -1
  37. package/dist/{usePrinter-D7IXLE53.js → usePrinter-Ox_AUldH.js} +3 -3
  38. package/dist/{vue-data-ui-gEqI-hOT.js → vue-data-ui-Bqni-1Zf.js} +61 -61
  39. package/dist/{vue-data-ui-CNieT2ov.cjs → vue-data-ui-Ci_EB1Pl.cjs} +1 -1
  40. package/dist/vue-data-ui.cjs +1 -1
  41. package/dist/vue-data-ui.js +18 -18
  42. package/dist/{vue-ui-3d-bar-DX5baNUz.cjs → vue-ui-3d-bar-CwXVZG3Y.cjs} +1 -1
  43. package/dist/{vue-ui-3d-bar-Sbk5MT1S.js → vue-ui-3d-bar-Du8HQpHI.js} +9 -9
  44. package/dist/{vue-ui-accordion-62KnRfCb.js → vue-ui-accordion-B5Gs-td_.js} +3 -3
  45. package/dist/{vue-ui-accordion-DIMalTE4.cjs → vue-ui-accordion-B7WLy1Jg.cjs} +1 -1
  46. package/dist/{vue-ui-age-pyramid-DfuEC7WE.cjs → vue-ui-age-pyramid-B4H7JQkT.cjs} +1 -1
  47. package/dist/{vue-ui-age-pyramid-BkhVyOTM.js → vue-ui-age-pyramid-B8W-ss5n.js} +10 -10
  48. package/dist/vue-ui-annotator-BINIZaue.cjs +371 -0
  49. package/dist/{vue-ui-annotator-CrwbL3rn.js → vue-ui-annotator-DNF_ObQQ.js} +43 -43
  50. package/dist/{vue-ui-bullet-BVr_zBo7.js → vue-ui-bullet-C70Q3NPV.js} +8 -8
  51. package/dist/{vue-ui-bullet-TmXeLFPZ.cjs → vue-ui-bullet-DAbmjJO4.cjs} +1 -1
  52. package/dist/{vue-ui-candlestick-BArypZ1A.js → vue-ui-candlestick-CdC4R7M2.js} +11 -11
  53. package/dist/{vue-ui-candlestick-BFJ8I4sb.cjs → vue-ui-candlestick-DteMmbOt.cjs} +1 -1
  54. package/dist/{vue-ui-carousel-table-CqWp06Xz.js → vue-ui-carousel-table-DRia7BnJ.js} +4 -4
  55. package/dist/{vue-ui-carousel-table-B1i5b5xU.cjs → vue-ui-carousel-table-Dav_wxu5.cjs} +1 -1
  56. package/dist/{vue-ui-chestnut-B8oiuRgc.cjs → vue-ui-chestnut-B6DIgsRe.cjs} +1 -1
  57. package/dist/{vue-ui-chestnut-EHo3sSMv.js → vue-ui-chestnut-CHB6EIMR.js} +8 -8
  58. package/dist/{vue-ui-circle-pack-kx10AVM0.js → vue-ui-circle-pack-DqTsATrx.js} +9 -9
  59. package/dist/{vue-ui-circle-pack-BGLhSNyo.cjs → vue-ui-circle-pack-ZYPeAycn.cjs} +1 -1
  60. package/dist/{vue-ui-cursor-C8qofYJh.js → vue-ui-cursor-D6Klb7Ub.js} +2 -2
  61. package/dist/{vue-ui-cursor-H77Z-m2e.cjs → vue-ui-cursor-pMITkG0c.cjs} +1 -1
  62. package/dist/{vue-ui-dashboard-Bn2slDQx.js → vue-ui-dashboard-BjOefVNY.js} +62 -62
  63. package/dist/{vue-ui-dashboard-4YFqFygh.cjs → vue-ui-dashboard-DMKc0NXK.cjs} +1 -1
  64. package/dist/{vue-ui-digits-DbSV0D-j.cjs → vue-ui-digits-CeQ3UvM5.cjs} +1 -1
  65. package/dist/{vue-ui-digits-Cv__rzXF.js → vue-ui-digits-D7bnAeht.js} +2 -2
  66. package/dist/{vue-ui-donut-D_CLR29p.js → vue-ui-donut-B2RReI5v.js} +28 -28
  67. package/dist/{vue-ui-donut-Bno5POxU.cjs → vue-ui-donut-dt7wntWx.cjs} +1 -1
  68. package/dist/{vue-ui-donut-evolution-Dg6laY3D.cjs → vue-ui-donut-evolution-CEMUyFGj.cjs} +1 -1
  69. package/dist/{vue-ui-donut-evolution-BgNwQ1J8.js → vue-ui-donut-evolution-Q8efqEFi.js} +40 -40
  70. package/dist/{vue-ui-dumbbell-DWQl4sxh.cjs → vue-ui-dumbbell-Da0UGWon.cjs} +1 -1
  71. package/dist/{vue-ui-dumbbell-C5Z8rSTk.js → vue-ui-dumbbell-DmJnlQk9.js} +10 -10
  72. package/dist/{vue-ui-flow-D0t3MSCU.cjs → vue-ui-flow-B2LxKwSy.cjs} +1 -1
  73. package/dist/{vue-ui-flow-DKS1oZHc.js → vue-ui-flow-DnpEech8.js} +36 -36
  74. package/dist/{vue-ui-funnel-CqhhBoYG.cjs → vue-ui-funnel-Cfg8_Y28.cjs} +1 -1
  75. package/dist/{vue-ui-funnel-r57KM4Wi.js → vue-ui-funnel-D1FBngXC.js} +9 -9
  76. package/dist/{vue-ui-galaxy-BeQSEKLG.cjs → vue-ui-galaxy-BBseh1Xu.cjs} +1 -1
  77. package/dist/{vue-ui-galaxy-CLIAdqkr.js → vue-ui-galaxy-DeiFZ4-K.js} +35 -35
  78. package/dist/{vue-ui-gauge-BQ4S55FH.js → vue-ui-gauge-BYAT1lpA.js} +19 -19
  79. package/dist/{vue-ui-gauge-CcTneeaQ.cjs → vue-ui-gauge-CgbP28Lu.cjs} +1 -1
  80. package/dist/{vue-ui-gizmo-B_rVeweF.cjs → vue-ui-gizmo-Cg8EOszW.cjs} +1 -1
  81. package/dist/{vue-ui-gizmo-DACB7BcV.js → vue-ui-gizmo-Dx0a1RXr.js} +3 -3
  82. package/dist/{vue-ui-heatmap-DNvbR504.js → vue-ui-heatmap-8ztV6WVL.js} +33 -33
  83. package/dist/{vue-ui-heatmap-DBtRfAWr.cjs → vue-ui-heatmap-Dmnsolb3.cjs} +1 -1
  84. package/dist/{vue-ui-history-plot-MfnR_Gg0.js → vue-ui-history-plot-Bqjnj0j7.js} +11 -11
  85. package/dist/{vue-ui-history-plot-B1zXFmOc.cjs → vue-ui-history-plot-Dyh-V9Gh.cjs} +1 -1
  86. package/dist/{vue-ui-kpi-Dm71j1ZP.cjs → vue-ui-kpi-BC6eewXW.cjs} +1 -1
  87. package/dist/{vue-ui-kpi-DDMCa5qe.js → vue-ui-kpi-BcquwnAL.js} +3 -3
  88. package/dist/{vue-ui-mini-loader-mMxdW73Y.js → vue-ui-mini-loader-B5TCB-jm.js} +2 -2
  89. package/dist/{vue-ui-mini-loader-CROjVz1w.cjs → vue-ui-mini-loader-DwEPWCvw.cjs} +1 -1
  90. package/dist/{vue-ui-molecule-BHUWRS5i.js → vue-ui-molecule-BlQ9EKHu.js} +22 -22
  91. package/dist/{vue-ui-molecule-BulwtJre.cjs → vue-ui-molecule-CxdrRZT1.cjs} +1 -1
  92. package/dist/{vue-ui-mood-radar-CUWTjV4S.js → vue-ui-mood-radar-CaMrzhKf.js} +11 -11
  93. package/dist/{vue-ui-mood-radar-BhS9UcqE.cjs → vue-ui-mood-radar-D5dAbRIg.cjs} +1 -1
  94. package/dist/{vue-ui-nested-donuts-BQk9K-uM.js → vue-ui-nested-donuts-B0Msfykw.js} +11 -11
  95. package/dist/{vue-ui-nested-donuts-Db_lFOB1.cjs → vue-ui-nested-donuts-PH-8er1N.cjs} +1 -1
  96. package/dist/{vue-ui-onion-C38MS0We.cjs → vue-ui-onion-BdgRqKZC.cjs} +1 -1
  97. package/dist/{vue-ui-onion-CEP_SVGa.js → vue-ui-onion-CJQvWcZc.js} +11 -11
  98. package/dist/{vue-ui-parallel-coordinate-plot-DOER4ePV.cjs → vue-ui-parallel-coordinate-plot-CFSlIws_.cjs} +1 -1
  99. package/dist/{vue-ui-parallel-coordinate-plot-DlIPqsBr.js → vue-ui-parallel-coordinate-plot-e_Fy1AqK.js} +12 -12
  100. package/dist/{vue-ui-quadrant-hEW2euTx.js → vue-ui-quadrant-BUdDJDiC.js} +40 -40
  101. package/dist/{vue-ui-quadrant-BzA3R8WL.cjs → vue-ui-quadrant-CgmJi4VO.cjs} +1 -1
  102. package/dist/{vue-ui-quick-chart-vCYn3Ycg.cjs → vue-ui-quick-chart-WOakiHbL.cjs} +1 -1
  103. package/dist/{vue-ui-quick-chart-D43_sxe7.js → vue-ui-quick-chart-a0Aq180v.js} +37 -37
  104. package/dist/{vue-ui-radar-CrPGLRgF.cjs → vue-ui-radar-D3XH7mnS.cjs} +1 -1
  105. package/dist/{vue-ui-radar-ea-S6hNo.js → vue-ui-radar-Dq5awTJ4.js} +12 -12
  106. package/dist/{vue-ui-rating-DQhxPqnC.cjs → vue-ui-rating-BLYhtefr.cjs} +1 -1
  107. package/dist/{vue-ui-rating-Cr7OYhms.js → vue-ui-rating-CbJwIMBH.js} +10 -10
  108. package/dist/{vue-ui-relation-circle-BD63yYPk.js → vue-ui-relation-circle-Dt3L1hs0.js} +7 -7
  109. package/dist/{vue-ui-relation-circle-Ci_zTDv6.cjs → vue-ui-relation-circle-QSXzaYcG.cjs} +1 -1
  110. package/dist/{vue-ui-rings-Dup7cJhU.js → vue-ui-rings-BzzWkMfI.js} +22 -22
  111. package/dist/{vue-ui-rings-o_5TelyF.cjs → vue-ui-rings-XJSxdsBz.cjs} +1 -1
  112. package/dist/{vue-ui-scatter-D1p3fd_k.cjs → vue-ui-scatter-KB-arFYU.cjs} +1 -1
  113. package/dist/{vue-ui-scatter-CpUvuCj4.js → vue-ui-scatter-WfGg6-i5.js} +44 -44
  114. package/dist/{vue-ui-skeleton-BGykkjYQ.cjs → vue-ui-skeleton-1LYIEAgE.cjs} +1 -1
  115. package/dist/{vue-ui-skeleton-BjminQzl.js → vue-ui-skeleton-CpGgeJbB.js} +57 -57
  116. package/dist/{vue-ui-smiley-CFKscwS7.js → vue-ui-smiley-C6NH0Lex.js} +2 -2
  117. package/dist/{vue-ui-smiley-BtpjYEEP.cjs → vue-ui-smiley-Dz2M3bCK.cjs} +1 -1
  118. package/dist/{vue-ui-spark-trend-CRcDMTzh.cjs → vue-ui-spark-trend-B_GfxBXt.cjs} +1 -1
  119. package/dist/{vue-ui-spark-trend-wAANMLZ4.js → vue-ui-spark-trend-DTeJM_9L.js} +5 -5
  120. package/dist/{vue-ui-sparkbar-BTUT-uco.js → vue-ui-sparkbar-CLGDM4VK.js} +4 -4
  121. package/dist/{vue-ui-sparkbar-BVh9AOEX.cjs → vue-ui-sparkbar-odjVGeM_.cjs} +1 -1
  122. package/dist/{vue-ui-sparkgauge-B_N07sh6.cjs → vue-ui-sparkgauge-83j8e2xQ.cjs} +1 -1
  123. package/dist/{vue-ui-sparkgauge-DXxoZfG0.js → vue-ui-sparkgauge-DenhO9cj.js} +9 -9
  124. package/dist/{vue-ui-sparkhistogram-CHbsbOtx.cjs → vue-ui-sparkhistogram-Bsid3CJE.cjs} +1 -1
  125. package/dist/{vue-ui-sparkhistogram-cSUQzQ6o.js → vue-ui-sparkhistogram-Ch5_voyg.js} +5 -5
  126. package/dist/{vue-ui-sparkline-_wbJMVVr.js → vue-ui-sparkline-CFx-n0Ax.js} +15 -15
  127. package/dist/{vue-ui-sparkline-Cr5KANZ_.cjs → vue-ui-sparkline-LpkWUXEl.cjs} +1 -1
  128. package/dist/{vue-ui-sparkstackbar-SRvQImaw.cjs → vue-ui-sparkstackbar-CDpHiCTo.cjs} +1 -1
  129. package/dist/{vue-ui-sparkstackbar-D93-i-tg.js → vue-ui-sparkstackbar-ZvPhkKk4.js} +5 -5
  130. package/dist/{vue-ui-stackbar-D3KicC2k.cjs → vue-ui-stackbar-CKaqcgK_.cjs} +1 -1
  131. package/dist/{vue-ui-stackbar-CnZsiebh.js → vue-ui-stackbar-CX96MGjz.js} +13 -13
  132. package/dist/{vue-ui-strip-plot-Dv-C246v.js → vue-ui-strip-plot-BCRGcKhd.js} +13 -14
  133. package/dist/{vue-ui-strip-plot-Dz8doRxV.cjs → vue-ui-strip-plot-Cw8Su0WV.cjs} +1 -1
  134. package/dist/vue-ui-table-BcnDEvP5.js +1470 -0
  135. package/dist/vue-ui-table-DCGpCB-H.cjs +14 -0
  136. package/dist/{vue-ui-table-heatmap-CYuY_cv8.js → vue-ui-table-heatmap-BvdOkoVy.js} +4 -4
  137. package/dist/{vue-ui-table-heatmap-C8Vi0yvC.cjs → vue-ui-table-heatmap-XbKVm0qZ.cjs} +1 -1
  138. package/dist/{vue-ui-table-sparkline-C4REu4fs.cjs → vue-ui-table-sparkline-ClWB_nso.cjs} +1 -1
  139. package/dist/{vue-ui-table-sparkline-B76wcNNt.js → vue-ui-table-sparkline-DlAlNznI.js} +5 -5
  140. package/dist/{vue-ui-thermometer-DiZILoae.js → vue-ui-thermometer-DfTbUkLT.js} +7 -7
  141. package/dist/{vue-ui-thermometer-DvNlCnAL.cjs → vue-ui-thermometer-zpcoSEWt.cjs} +1 -1
  142. package/dist/{vue-ui-timer-DUN6vOs9.cjs → vue-ui-timer-DwFy6VaG.cjs} +1 -1
  143. package/dist/{vue-ui-timer-DxYKc_c7.js → vue-ui-timer-TchnXzem.js} +5 -5
  144. package/dist/{vue-ui-tiremarks-BV7MTnlS.cjs → vue-ui-tiremarks-CmAFj_nG.cjs} +1 -1
  145. package/dist/{vue-ui-tiremarks-D52pzq2N.js → vue-ui-tiremarks-fzrlOBsj.js} +7 -7
  146. package/dist/{vue-ui-treemap-CNbw7CLO.js → vue-ui-treemap-CDo8x9s6.js} +12 -12
  147. package/dist/{vue-ui-treemap-gQhTSE_P.cjs → vue-ui-treemap-DnNrJ4dw.cjs} +1 -1
  148. package/dist/{vue-ui-vertical-bar-B_nsQpZa.js → vue-ui-vertical-bar-Bx1KnXDB.js} +12 -12
  149. package/dist/{vue-ui-vertical-bar-ClJttiMf.cjs → vue-ui-vertical-bar-DxcAPPXR.cjs} +1 -1
  150. package/dist/{vue-ui-waffle-BYBctA3T.cjs → vue-ui-waffle-CvQaobYo.cjs} +1 -1
  151. package/dist/{vue-ui-waffle-CLfNk30s.js → vue-ui-waffle-faLsv9bZ.js} +37 -37
  152. package/dist/{vue-ui-wheel-Bj6lxA5M.cjs → vue-ui-wheel-BWXUHx3h.cjs} +1 -1
  153. package/dist/{vue-ui-wheel-4Yit1iRJ.js → vue-ui-wheel-pn6-k3Wb.js} +7 -7
  154. package/dist/{vue-ui-word-cloud-AZ1OJrxo.cjs → vue-ui-word-cloud-BPU3c5Z2.cjs} +1 -1
  155. package/dist/{vue-ui-word-cloud-D94M5Lsf.js → vue-ui-word-cloud-Bfn2BGMh.js} +10 -10
  156. package/dist/{vue-ui-world-rkzHCxBG.js → vue-ui-world-BbjG83CB.js} +12 -12
  157. package/dist/{vue-ui-world-BwcOIaHG.cjs → vue-ui-world-DWecwIQS.cjs} +2 -2
  158. package/dist/{vue-ui-xy-DXgpQ8zr.js → vue-ui-xy-B5DZ8Qmi.js} +34 -35
  159. package/dist/{vue-ui-xy-DJiY5DSr.cjs → vue-ui-xy-DJZ-eOyQ.cjs} +2 -2
  160. package/dist/{vue-ui-xy-canvas-DsuvSNM3.cjs → vue-ui-xy-canvas-2gXEGzLd.cjs} +1 -1
  161. package/dist/{vue-ui-xy-canvas-CAfAcJWj.js → vue-ui-xy-canvas-BwmEkw6g.js} +12 -12
  162. package/package.json +1 -1
  163. package/dist/index-DjDcQ8pe.cjs +0 -9
  164. package/dist/pdf-DuohwkFu.cjs +0 -1
  165. package/dist/vue-ui-annotator-BGWZZUN7.cjs +0 -371
  166. package/dist/vue-ui-table-Dkoj_poY.js +0 -1466
  167. package/dist/vue-ui-table-iE1t-zP9.cjs +0 -14
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./useNestedProp-BS9eJthK.cjs"),u=require("./index-DjDcQ8pe.cjs"),y=require("./vue-ui-digits-DbSV0D-j.cjs"),C={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(n){const{vue_ui_kpi:m}=u.useConfig(),o=n,a=e.computed({get:()=>i(),set:t=>t}),f=e.useSlots();e.onMounted(()=>{f["chart-background"]&&console.warn("VueUiKpi does not support the #chart-background slot.")});function i(){return p.useNestedProp({userConfig:o.config,defaultConfig:m})}e.watch(()=>o.config,t=>{a.value=i(),r()},{deep:!0});const g=e.ref((typeof o.dataset=="number",o.dataset)),l=e.ref(a.value.useAnimation?a.value.animationValueStart:g.value),s=t=>{const v=a.value.animationFrames,c=Math.abs(t-l.value)/v;function d(){l.value<t?l.value=Math.min(l.value+c,t):l.value>t&&(l.value=Math.max(l.value-c,t)),l.value!==t&&requestAnimationFrame(d)}d()};e.onMounted(()=>{r()});function r(){a.value.useAnimation?(l.value=a.value.animationValueStart,s(o.dataset)):l.value=o.dataset}return e.watch(()=>o.dataset,t=>{a.value.useAnimation?s(t):l.value=t}),(t,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-kpi ${a.value.layoutClass}`),style:e.normalizeStyle(`background:${a.value.backgroundColor}; ${a.value.layoutCss}`)},[e.createElementVNode("div",{class:e.normalizeClass(`vue-ui-kpi-title ${a.value.titleClass}`),style:e.normalizeStyle(`font-family: ${a.value.fontFamily}; font-size:${a.value.titleFontSize}px; color:${a.value.titleColor}; font-weight:${a.value.titleBold?"bold":"normal"}; ${a.value.titleCss}`)},[e.renderSlot(t.$slots,"title",{comment:n.dataset}),e.createTextVNode(" "+e.toDisplayString(a.value.title),1)],6),e.renderSlot(t.$slots,"comment-before",{comment:n.dataset}),e.createElementVNode("div",{class:e.normalizeClass(`vue-ui-kpi-value ${a.value.valueClass}`),style:e.normalizeStyle(`font-family: ${a.value.fontFamily}; font-size:${a.value.valueFontSize}px; color:${a.value.valueColor}; font-weight:${a.value.valueBold?"bold":"normal"}; ${a.value.valueCss}`)},[e.renderSlot(t.$slots,"value",{comment:n.dataset}),a.value.analogDigits.show?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({height:a.value.analogDigits.height+"px"})},[e.createVNode(y.default,{dataset:Number(l.value.toFixed(a.value.valueRounding)),config:{backgroundColor:a.value.backgroundColor,digits:{color:a.value.analogDigits.color,skeletonColor:a.value.analogDigits.skeletonColor}}},null,8,["dataset","config"])],4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(u.applyDataLabel)(a.value.formatter,l.value,e.unref(u.dataLabel)({p:a.value.prefix,v:l.value,s:a.value.suffix,r:a.value.valueRounding}))),1)],64))],6),e.renderSlot(t.$slots,"comment-after",{comment:n.dataset})],6))}};exports.default=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./useNestedProp-CuyRUIUu.cjs"),u=require("./index-Bw9yF1Ws.cjs"),y=require("./vue-ui-digits-CeQ3UvM5.cjs"),C={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(n){const{vue_ui_kpi:m}=u.useConfig(),o=n,a=e.computed({get:()=>i(),set:t=>t}),f=e.useSlots();e.onMounted(()=>{f["chart-background"]&&console.warn("VueUiKpi does not support the #chart-background slot.")});function i(){return p.useNestedProp({userConfig:o.config,defaultConfig:m})}e.watch(()=>o.config,t=>{a.value=i(),r()},{deep:!0});const g=e.ref((typeof o.dataset=="number",o.dataset)),l=e.ref(a.value.useAnimation?a.value.animationValueStart:g.value),s=t=>{const v=a.value.animationFrames,c=Math.abs(t-l.value)/v;function d(){l.value<t?l.value=Math.min(l.value+c,t):l.value>t&&(l.value=Math.max(l.value-c,t)),l.value!==t&&requestAnimationFrame(d)}d()};e.onMounted(()=>{r()});function r(){a.value.useAnimation?(l.value=a.value.animationValueStart,s(o.dataset)):l.value=o.dataset}return e.watch(()=>o.dataset,t=>{a.value.useAnimation?s(t):l.value=t}),(t,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-kpi ${a.value.layoutClass}`),style:e.normalizeStyle(`background:${a.value.backgroundColor}; ${a.value.layoutCss}`)},[e.createElementVNode("div",{class:e.normalizeClass(`vue-ui-kpi-title ${a.value.titleClass}`),style:e.normalizeStyle(`font-family: ${a.value.fontFamily}; font-size:${a.value.titleFontSize}px; color:${a.value.titleColor}; font-weight:${a.value.titleBold?"bold":"normal"}; ${a.value.titleCss}`)},[e.renderSlot(t.$slots,"title",{comment:n.dataset}),e.createTextVNode(" "+e.toDisplayString(a.value.title),1)],6),e.renderSlot(t.$slots,"comment-before",{comment:n.dataset}),e.createElementVNode("div",{class:e.normalizeClass(`vue-ui-kpi-value ${a.value.valueClass}`),style:e.normalizeStyle(`font-family: ${a.value.fontFamily}; font-size:${a.value.valueFontSize}px; color:${a.value.valueColor}; font-weight:${a.value.valueBold?"bold":"normal"}; ${a.value.valueCss}`)},[e.renderSlot(t.$slots,"value",{comment:n.dataset}),a.value.analogDigits.show?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({height:a.value.analogDigits.height+"px"})},[e.createVNode(y.default,{dataset:Number(l.value.toFixed(a.value.valueRounding)),config:{backgroundColor:a.value.backgroundColor,digits:{color:a.value.analogDigits.color,skeletonColor:a.value.analogDigits.skeletonColor}}},null,8,["dataset","config"])],4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(u.applyDataLabel)(a.value.formatter,l.value,e.unref(u.dataLabel)({p:a.value.prefix,v:l.value,s:a.value.suffix,r:a.value.valueRounding}))),1)],64))],6),e.renderSlot(t.$slots,"comment-after",{comment:n.dataset})],6))}};exports.default=C;
@@ -1,7 +1,7 @@
1
1
  import { computed as D, useSlots as x, onMounted as g, watch as C, ref as $, createElementBlock as i, openBlock as s, normalizeStyle as u, normalizeClass as r, createElementVNode as k, renderSlot as n, createTextVNode as y, toDisplayString as h, createVNode as z, Fragment as A, unref as b } from "vue";
2
- import { u as w } from "./useNestedProp-s1XZrtPS.js";
3
- import { u as B, i as L, f as M } from "./index-9ZicrZWM.js";
4
- import E from "./vue-ui-digits-Cv__rzXF.js";
2
+ import { u as w } from "./useNestedProp-CD9pbB7F.js";
3
+ import { u as B, i as L, f as M } from "./index-CeGGP5OF.js";
4
+ import E from "./vue-ui-digits-D7bnAeht.js";
5
5
  const G = {
6
6
  __name: "vue-ui-kpi",
7
7
  props: {
@@ -1,6 +1,6 @@
1
1
  import { useCssVars as h, computed as r, ref as f, createElementBlock as n, openBlock as u, unref as M, createCommentVNode as a, createElementVNode as t, normalizeStyle as l } from "vue";
2
- import { u as m } from "./useNestedProp-s1XZrtPS.js";
3
- import { u as y, X as L } from "./index-9ZicrZWM.js";
2
+ import { u as m } from "./useNestedProp-CD9pbB7F.js";
3
+ import { u as y, X as L } from "./index-CeGGP5OF.js";
4
4
  import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const b = ["xmlns", "viewBox"], x = { key: 0 }, $ = ["stroke"], w = ["stroke"], A = ["stroke"], N = { key: 1 }, O = ["stroke"], S = { key: 2 }, F = ["stroke"], I = {
6
6
  __name: "vue-ui-mini-loader",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-BS9eJthK.cjs"),n=require("./index-DjDcQ8pe.cjs"),m=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=["xmlns","viewBox"],C={key:0},_=["stroke"],h=["stroke"],M=["stroke"],y={key:1},B=["stroke"],f={key:2},L=["stroke"],b={__name:"vue-ui-mini-loader",props:{config:{type:Object,default(){return{}}}},setup(u){e.useCssVars(k=>({"4430a3e6":c.value,"056a6732":d.value,"7f3540a4":p.value}));const{vue_ui_mini_loader:a}=n.useConfig(),i=u,t=e.computed(()=>v.useNestedProp({userConfig:i.config,defaultConfig:a})),s=e.ref({onion:"-10 -10 84 84",line:"-10 -10 112 84",bar:"-10 -10 106 84"}),r=e.computed(()=>({gutter:`stroke:${t.value.line.gutterColor};opacity:${t.value.line.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.line.gutterBlur}px);`})),l=e.computed(()=>({gutter:`stroke:${t.value.bar.gutterColor};opacity:${t.value.bar.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.bar.gutterBlur}px);`})),o=e.computed(()=>({gutter:`stroke:${t.value.onion.gutterColor};opacity:${t.value.onion.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.onion.gutterBlur}px);`})),c=e.computed(()=>`blur(${t.value.onion.trackBlur}px) hue-rotate(${t.value.onion.trackHueRotate}deg)`),d=e.computed(()=>`blur(${t.value.line.trackBlur}px) hue-rotate(${t.value.line.trackHueRotate}deg)`),p=e.computed(()=>`blur(${t.value.bar.trackBlur}px) hue-rotate(${t.value.bar.trackHueRotate}deg)`);return(k,x)=>(e.openBlock(),e.createElementBlock("svg",{class:"vue-ui-mini-loader",xmlns:e.unref(n.XMLNS),viewBox:s.value[t.value.type],style:{background:"transparent"},width:"100%"},[t.value.type==="onion"?(e.openBlock(),e.createElementBlock("g",C,[e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,_),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,h),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,M)])):e.createCommentVNode("",!0),t.value.type==="line"?(e.openBlock(),e.createElementBlock("g",y,[e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(r.value.gutter+r.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5",stroke:t.value.line.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"line-animated"},null,8,B)])):e.createCommentVNode("",!0),t.value.type==="bar"?(e.openBlock(),e.createElementBlock("g",f,[e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(l.value.gutter+l.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5",stroke:t.value.bar.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"bar-animated"},null,8,L)])):e.createCommentVNode("",!0)],8,g))}},N=m._export_sfc(b,[["__scopeId","data-v-3b670831"]]);exports.default=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-CuyRUIUu.cjs"),n=require("./index-Bw9yF1Ws.cjs"),m=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=["xmlns","viewBox"],C={key:0},_=["stroke"],h=["stroke"],M=["stroke"],y={key:1},B=["stroke"],f={key:2},L=["stroke"],b={__name:"vue-ui-mini-loader",props:{config:{type:Object,default(){return{}}}},setup(u){e.useCssVars(k=>({"4430a3e6":c.value,"056a6732":d.value,"7f3540a4":p.value}));const{vue_ui_mini_loader:a}=n.useConfig(),i=u,t=e.computed(()=>v.useNestedProp({userConfig:i.config,defaultConfig:a})),s=e.ref({onion:"-10 -10 84 84",line:"-10 -10 112 84",bar:"-10 -10 106 84"}),r=e.computed(()=>({gutter:`stroke:${t.value.line.gutterColor};opacity:${t.value.line.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.line.gutterBlur}px);`})),l=e.computed(()=>({gutter:`stroke:${t.value.bar.gutterColor};opacity:${t.value.bar.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.bar.gutterBlur}px);`})),o=e.computed(()=>({gutter:`stroke:${t.value.onion.gutterColor};opacity:${t.value.onion.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.onion.gutterBlur}px);`})),c=e.computed(()=>`blur(${t.value.onion.trackBlur}px) hue-rotate(${t.value.onion.trackHueRotate}deg)`),d=e.computed(()=>`blur(${t.value.line.trackBlur}px) hue-rotate(${t.value.line.trackHueRotate}deg)`),p=e.computed(()=>`blur(${t.value.bar.trackBlur}px) hue-rotate(${t.value.bar.trackHueRotate}deg)`);return(k,x)=>(e.openBlock(),e.createElementBlock("svg",{class:"vue-ui-mini-loader",xmlns:e.unref(n.XMLNS),viewBox:s.value[t.value.type],style:{background:"transparent"},width:"100%"},[t.value.type==="onion"?(e.openBlock(),e.createElementBlock("g",C,[e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,_),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,h),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,M)])):e.createCommentVNode("",!0),t.value.type==="line"?(e.openBlock(),e.createElementBlock("g",y,[e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(r.value.gutter+r.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5",stroke:t.value.line.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"line-animated"},null,8,B)])):e.createCommentVNode("",!0),t.value.type==="bar"?(e.openBlock(),e.createElementBlock("g",f,[e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(l.value.gutter+l.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5",stroke:t.value.bar.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"bar-animated"},null,8,L)])):e.createCommentVNode("",!0)],8,g))}},N=m._export_sfc(b,[["__scopeId","data-v-3b670831"]]);exports.default=N;
@@ -1,18 +1,18 @@
1
1
  import { toRef as ee, resolveComponent as te, createElementBlock as r, openBlock as l, Fragment as p, renderList as I, createCommentVNode as f, createBlock as O, createElementVNode as U, withModifiers as Ve, renderSlot as y, mergeProps as $e, withCtx as m, toDisplayString as Oe, useCssVars as je, computed as S, onMounted as We, ref as g, watch as Xe, unref as v, normalizeStyle as W, normalizeClass as we, createVNode as G, createSlots as Ye, normalizeProps as D, guardReactiveProps as N, createTextVNode as Ze, nextTick as qe } from "vue";
2
- import { u as Qe, o as Je, e as Ke, c as Te, t as et, p as Pe, a as tt, b as ot, P as lt, X as st, l as at, Q as rt, d as xe, q as nt, r as it, x as ut, y as ct } from "./index-9ZicrZWM.js";
3
- import { _ as dt } from "./Title-CGY0WlAI.js";
4
- import { u as vt, U as ht } from "./usePrinter-D7IXLE53.js";
5
- import { D as ft } from "./DataTable-CaUgku7o.js";
6
- import { _ as yt } from "./Tooltip-BfEhZz9k.js";
7
- import pt from "./vue-ui-skeleton-BjminQzl.js";
8
- import gt from "./vue-ui-accordion-62KnRfCb.js";
9
- import { u as Fe } from "./useNestedProp-s1XZrtPS.js";
10
- import { _ as mt } from "./PackageVersion-BEE_4baV.js";
11
- import { _ as bt } from "./PenAndPaper-B3WdOAcZ.js";
2
+ import { u as Je, o as Ke, e as Qe, c as Te, t as et, p as Pe, a as tt, b as ot, O as lt, X as st, l as at, P as rt, d as xe, q as nt, r as it, x as ut, y as ct } from "./index-CeGGP5OF.js";
3
+ import { _ as dt } from "./Title-DmtXFzpc.js";
4
+ import { u as vt, U as ht } from "./usePrinter-Ox_AUldH.js";
5
+ import { D as ft } from "./DataTable-Cuky8ZpI.js";
6
+ import { _ as yt } from "./Tooltip-BMaBMPpZ.js";
7
+ import pt from "./vue-ui-skeleton-CpGgeJbB.js";
8
+ import gt from "./vue-ui-accordion-B5Gs-td_.js";
9
+ import { u as Fe } from "./useNestedProp-CD9pbB7F.js";
10
+ import { _ as mt } from "./PackageVersion-DJo_CKR-.js";
11
+ import { _ as bt } from "./PenAndPaper-DK3Wbwoz.js";
12
12
  import { u as kt } from "./useUserOptionState-BIvW1Kz7.js";
13
13
  import { u as Ct } from "./useChartAccessibility-BWojgys7.js";
14
14
  import { u as $t } from "./usePanZoom-CUkkqW81.js";
15
- import wt from "./BaseIcon-BH4bJe82.js";
15
+ import wt from "./BaseIcon-CLefSNKF.js";
16
16
  import { _ as Tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
17
  const Pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], xt = ["x", "y", "height", "width", "onClick", "onMouseover"], Ft = {
18
18
  __name: "RecursiveCircles",
@@ -248,12 +248,12 @@ const Pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
248
248
  je((t) => ({
249
249
  "6c5e8f09": t.slicerColor
250
250
  }));
251
- const { vue_ui_molecule: T } = Qe(), h = n, w = H, i = S(() => !!h.dataset && h.dataset.length);
251
+ const { vue_ui_molecule: T } = Je(), h = n, w = H, i = S(() => !!h.dataset && h.dataset.length);
252
252
  We(() => {
253
253
  a();
254
254
  });
255
255
  function a() {
256
- Je(h.dataset) && Ke({
256
+ Ke(h.dataset) && Qe({
257
257
  componentName: "VueUiMolecule",
258
258
  type: "dataset"
259
259
  });
@@ -302,7 +302,7 @@ const Pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
302
302
  }
303
303
  const C = g(Ae());
304
304
  g(`0 0 ${C.value.width} ${C.value.height}`);
305
- function ve(t, s = { x: -C.value.width / 2.43, y: C.value.height / 2 }, o = C.value.width / 1.1, d = 24, c = 0, b = 0, x = "#BBBBBB", J = 0) {
305
+ function ve(t, s = { x: -C.value.width / 2.43, y: C.value.height / 2 }, o = C.value.width / 1.1, d = 24, c = 0, b = 0, x = "#BBBBBB", K = 0) {
306
306
  if (!Array.isArray(t) || t.length === 0) return t;
307
307
  const Ge = rt({
308
308
  plot: s,
@@ -312,11 +312,11 @@ const Pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
312
312
  });
313
313
  return t.forEach((F, be) => {
314
314
  const ke = Ge.coordinates[be], Ce = F.color ? (() => {
315
- let K = xe(F.color);
316
- return K.startsWith("#") ? K : `#${K}`;
315
+ let Q = xe(F.color);
316
+ return Q.startsWith("#") ? Q : `#${Q}`;
317
317
  })() : null;
318
318
  let L;
319
- Ce ? L = Ce : J === 0 ? L = x : J === 1 ? (L = Se.value[b] || Pe[b] || x, b += 1) : L = x, F.polygonPath = { coordinates: [ke] }, F.circleRadius = d, F.color = L, F.uid = Te(), Array.isArray(F.nodes) && F.nodes.length && (F.nodes = ve(
319
+ Ce ? L = Ce : K === 0 ? L = x : K === 1 ? (L = Se.value[b] || Pe[b] || x, b += 1) : L = x, F.polygonPath = { coordinates: [ke] }, F.circleRadius = d, F.color = L, F.uid = Te(), Array.isArray(F.nodes) && F.nodes.length && (F.nodes = ve(
320
320
  F.nodes,
321
321
  ke,
322
322
  o / 2.9,
@@ -324,7 +324,7 @@ const Pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
324
324
  c + Math.PI * be / F.nodes.length,
325
325
  b,
326
326
  L,
327
- J + 1
327
+ K + 1
328
328
  ));
329
329
  }), t;
330
330
  }
@@ -452,7 +452,7 @@ const Pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
452
452
  $.value.showTooltip = !$.value.showTooltip;
453
453
  }
454
454
  const z = g(!1);
455
- function Q() {
455
+ function J() {
456
456
  z.value = !z.value;
457
457
  }
458
458
  const Me = S(() => !z.value), { viewBox: j, resetZoom: me, isZoom: Be } = $t(Z, {
@@ -472,7 +472,7 @@ const Pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
472
472
  toggleTable: ye,
473
473
  toggleLabels: pe,
474
474
  toggleTooltip: ge,
475
- toggleAnnotator: Q
475
+ toggleAnnotator: J
476
476
  }), (t, s) => (l(), r("div", {
477
477
  ref_key: "moleculeChart",
478
478
  ref: V,
@@ -490,7 +490,7 @@ const Pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
490
490
  backgroundColor: e.value.style.chart.backgroundColor,
491
491
  color: e.value.style.chart.color,
492
492
  active: z.value,
493
- onClose: Q
493
+ onClose: J
494
494
  }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : f("", !0),
495
495
  Re.value ? (l(), r("div", Dt, null, 512)) : f("", !0),
496
496
  e.value.style.chart.title.text ? (l(), r("div", Nt, [
@@ -537,7 +537,7 @@ const Pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
537
537
  onToggleTable: ye,
538
538
  onToggleLabels: pe,
539
539
  onToggleTooltip: ge,
540
- onToggleAnnotator: Q,
540
+ onToggleAnnotator: J,
541
541
  style: W({
542
542
  visibility: v(ae) ? v(Y) ? "visible" : "hidden" : "visible"
543
543
  })
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./index-DjDcQ8pe.cjs"),we=require("./Title-BGh0hWb2.cjs"),ae=require("./usePrinter-vFXYgZiT.cjs"),$e=require("./DataTable-Cz1SDtvT.cjs"),Pe=require("./Tooltip-DckFFIYj.cjs"),Ne=require("./vue-ui-skeleton-BGykkjYQ.cjs"),Se=require("./vue-ui-accordion-DIMalTE4.cjs"),se=require("./useNestedProp-BS9eJthK.cjs"),Te=require("./PackageVersion-BrUdYdIC.cjs"),Ee=require("./PenAndPaper-DyGcaflS.cjs"),Fe=require("./useUserOptionState-BgepsfED.cjs"),xe=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ve=require("./usePanZoom-PXRi2Rwx.cjs"),Re=require("./BaseIcon-C6L3qbQ8.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ae=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Le=["x","y","height","width","onClick","onMouseover"],Ue={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["click","hover"],setup(a,{emit:$}){const P=a,k=$;function d(n){k("click",n)}function g(n){k("hover",n)}return e.toRef(P,"dataset").value.forEach(n=>{n.nodes&&n.nodes.length>0&&n.nodes.forEach(f=>{f.ancestor=n})}),(n,f)=>{const R=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,(y,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("circle",{cx:y.x,cy:y.y,r:i.circleRadius,fill:`url(#gradient_${i.color})`,stroke:a.hoveredUid&&a.hoveredUid===i.uid?a.strokeHovered:a.stroke,"stroke-width":a.hoveredUid&&a.hoveredUid===i.uid?i.circleRadius/6:i.circleRadius/12,style:{cursor:"pointer"},onClick:w=>d(i),onMouseover:w=>g(i),onMouseleave:f[0]||(f[0]=w=>g(null))},null,40,Ae),n.$slots.node?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:y.x-i.circleRadius,y:y.y-i.circleRadius,height:i.circleRadius*2,width:i.circleRadius*2,style:{overflow:"visible"},onClick:e.withModifiers(w=>d(i),["stop"]),onMouseover:w=>g(i),onMouseleave:f[1]||(f[1]=w=>g(null))},[e.renderSlot(n.$slots,"node",e.mergeProps({ref_for:!0},{node:i}))],40,Le)):e.createCommentVNode("",!0)],64))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(R,{key:0,dataset:i.nodes,color:a.color,stroke:a.stroke,strokeHovered:a.strokeHovered,hoveredUid:a.hoveredUid,onClick:d,onHover:g},{node:e.withCtx(({node:y})=>[e.renderSlot(n.$slots,"node",e.mergeProps({ref_for:!0},{node:y}))]),_:2},1032,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},De=["x1","y1","x2","y2","stroke","stroke-width"],Ie=["x1","y1","x2","y2","stroke","stroke-width"],ze={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(a){const $=a;return e.toRef($,"dataset").value.forEach(k=>{k.nodes&&k.nodes.length>0&&k.nodes.forEach(d=>{d.ancestor=k})}),(k,d)=>{const g=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,s=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.polygonPath&&s.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s.polygonPath.coordinates,(n,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.ancestor&&s.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:n.x,y1:n.y,x2:s.ancestor.polygonPath.coordinates[0].x,y2:s.ancestor.polygonPath.coordinates[0].y,stroke:a.backgroundColor,"stroke-width":s.circleRadius/1.5},null,8,De),e.createElementVNode("line",{x1:n.x,y1:n.y,x2:s.ancestor.polygonPath.coordinates[0].x,y2:s.ancestor.polygonPath.coordinates[0].y,stroke:a.color,"stroke-width":s.circleRadius/2},null,8,Ie)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,s=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.polygonPath&&s.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.nodes&&s.nodes.length>0?(e.openBlock(),e.createBlock(g,{key:0,dataset:s.nodes,color:a.color,backgroundColor:a.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},_e=["x","y","fill","font-size"],He={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(a,{emit:$}){const P=a;return e.toRef(P,"dataset").value.forEach(d=>{d.nodes&&d.nodes.length>0&&d.nodes.forEach(g=>{g.ancestor=d})}),(d,g)=>{const s=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,n=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.polygonPath&&n.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.polygonPath.coordinates,f=>(e.openBlock(),e.createElementBlock("text",{x:f.x,y:f.y+n.circleRadius*2,fill:a.color,"font-size":n.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(n.name),9,_e))),256)),n.nodes&&n.nodes.length>0?(e.openBlock(),e.createBlock(s,{key:0,dataset:n.nodes,color:a.color,hoveredUid:a.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Me=["id"],qe={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Ge={key:2,style:"width:100%;background:transparent;"},je=["xmlns","viewBox"],We=["width","height"],Xe=["id"],Ze=["stop-color"],Ye=["stop-color"],Je={key:5,class:"vue-data-ui-watermark"},Ke={key:6,"data-dom-to-png-ignore":"",class:"reset-wrapper"},Qe={key:8,ref:"source",dir:"auto"},et=["innerHTML"],tt={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectNode"],setup(a,{expose:$,emit:P}){e.useCssVars(o=>({"6c5e8f09":o.slicerColor}));const{vue_ui_molecule:k}=v.useConfig(),d=a,g=P,s=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{n()});function n(){v.objectIsEmpty(d.dataset)&&v.error({componentName:"VueUiMolecule",type:"dataset"})}const f=e.ref(v.createUid()),R=e.ref(null),i=e.ref(!1),y=e.ref(""),x=e.ref(null),w=e.ref(0),z=e.ref(0),_=e.ref(0),t=e.computed({get:()=>q(),set:o=>o}),{userOptionsVisible:O,setUserOptionsVisibility:H,keepUserOptionState:M}=Fe.useUserOptionState({config:t.value}),{svgRef:A}=xe.useChartAccessibility({config:t.value.style.chart.title});function q(){const o=se.useNestedProp({userConfig:d.config,defaultConfig:k});return o.theme?{...se.useNestedProp({userConfig:v.themes.vue_ui_molecule[o.theme]||d.config,defaultConfig:o}),customPalette:v.themePalettes[o.theme]||v.palette}:o}e.watch(()=>d.config,o=>{t.value=q(),O.value=!t.value.userOptions.showOnChartHover,n(),z.value+=1,_.value+=1,p.value.showTable=t.value.table.show,p.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:G,isImaging:j,generatePdf:W,generateImage:X}=ae.usePrinter({elementId:`cluster_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-molecule",options:t.value.userOptions.print}),ie=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ue=e.computed(()=>v.convertCustomPalette(t.value.customPalette)),p=e.ref({showTable:t.value.table.show,showDataLabels:!0,showTooltip:t.value.style.chart.tooltip.show});function Z(o,r=0){return Array.isArray(o)&&o.length>0&&o[0].nodes?Z(o[0].nodes,r+1):r}function ce(){const o=Z(d.dataset);let r=100,l=r;for(let c=0;c<o;c+=1)r/=1,l+=r;return{height:l,width:l}}const m=e.ref(ce());e.ref(`0 0 ${m.value.width} ${m.value.height}`);function Y(o,r={x:-m.value.width/2.43,y:m.value.height/2},l=m.value.width/1.1,c=24,u=0,h=0,b="#BBBBBB",D=0){if(!Array.isArray(o)||o.length===0)return o;const Be=v.createPolygonPath({plot:r,radius:l,sides:o.length,rotation:u});return o.forEach((C,le)=>{const re=Be.coordinates[le],ne=C.color?(()=>{let I=v.convertColorToHex(C.color);return I.startsWith("#")?I:`#${I}`})():null;let S;ne?S=ne:D===0?S=b:D===1?(S=ue.value[h]||v.palette[h]||b,h+=1):S=b,C.polygonPath={coordinates:[re]},C.circleRadius=c,C.color=S,C.uid=v.createUid(),Array.isArray(C.nodes)&&C.nodes.length&&(C.nodes=Y(C.nodes,re,l/2.9,c/2.2,u+Math.PI*le/C.nodes.length,h,S,D+1))}),o}function de(o){const r=new Set;function l(u){u.forEach(h=>{if(!h.color)return;let b=h.color;/^#?[0-9A-F]{6}$/i.test(b)||(b=v.convertColorToHex(b)),b.startsWith("#")||(b=`#${b}`),r.add(b),Array.isArray(h.nodes)&&h.nodes.length&&l(h.nodes)})}l(o);const c={};return Array.from(r).forEach(u=>{const h=u.slice(1);c[u]=`gradient_${h}`}),c}const ve=e.computed(()=>de(B.value)),B=e.computed(()=>{const o=v.deepClone(d.dataset);return Y(o)}),L=e.ref(null);function he(o){L.value={datapoint:o,seriesIndex:-1,series:B.value,config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(v.isFunction(r)&&v.functionReturnsString(()=>r({seriesIndex:-1,datapoint:o,series:B.value,config:t.value})))y.value=r({seriesIndex:-1,datapoint:o,series:B.value,config:t.value});else{let l="";l+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${o.color}">⬤</div><div>${o.name}</div></div>`,o.details&&(l+=`<div style="width:100%;border-top:1px solid ${t.value.style.chart.tooltip.borderColor};margin-top: 2px">${o.details}</div>`),y.value=`<div style="font-family:inherit">${l}</div>`}}const J=e.ref(null),T=e.ref(null);function fe(o){J.value=o,o?(i.value=!0,he(o),T.value=o.uid):(i.value=!1,y.value="",T.value=null)}function me(o){const r=[];function l(c){c.forEach(u=>{const h={name:u.name,details:u.details||"-",ancestor:u.ancestor&&u.ancestor.name||"-",color:u.color||""};r.push(h),u.nodes&&u.nodes.length>0&&l(u.nodes,u.name)})}return l(o),r}const pe=e.computed(()=>me(B.value)),N=e.computed(()=>{const o=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor],r=pe.value.map((u,h)=>[{color:u.color,name:u.name},u.details,u.ancestor||""]),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},c=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor];return{head:o,body:r,config:l,colNames:c}});function K(){e.nextTick(()=>{const o=N.value.body.map((c,u)=>[[c[0].name],[c[1]],[c[2]]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(o),l=v.createCsvContent(r);v.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-molecule"})})}function ge(){return B.value}const E=e.ref(!1);function ke(o){E.value=o,w.value+=1}function Q(){p.value.showTable=!p.value.showTable}function ee(){p.value.showDataLabels=!p.value.showDataLabels}function te(){p.value.showTooltip=!p.value.showTooltip}const F=e.ref(!1);function U(){F.value=!F.value}const ye=e.computed(()=>!F.value),{viewBox:V,resetZoom:oe,isZoom:be}=Ve.usePanZoom(A,{x:0,y:0,width:m.value.width<=0?10:m.value.width,height:m.value.height<=0?10:m.value.height},t.value.style.chart.zoom.speed,ye);function Ce(o){g("selectNode",o)}return $({getData:ge,generatePdf:W,generateCsv:K,generateImage:X,toggleTable:Q,toggleLabels:ee,toggleTooltip:te,toggleAnnotator:U}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"moleculeChart",ref:x,class:e.normalizeClass(`vue-ui-molecule ${E.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`cluster_${f.value}`,onMouseleave:r[2]||(r[2]=l=>{J.value=null,T.value=null,e.unref(H)(!1)}),onMouseenter:r[3]||(r[3]=()=>e.unref(H)(!0))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ee._sfc_main,{key:0,svgRef:e.unref(A),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:U},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ie.value?(e.openBlock(),e.createElementBlock("div",qe,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Ge,[(e.openBlock(),e.createBlock(we._sfc_main,{key:`title_${z.value}`,config:{title:{cy:"molecule-div-title",...t.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&s.value&&(e.unref(M)||e.unref(O))?(e.openBlock(),e.createBlock(ae.UserOptions,{ref_key:"details",ref:R,key:`user_options_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(G),isImaging:e.unref(j),uid:f.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,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:ke,onGeneratePdf:e.unref(W),onGenerateCsv:K,onGenerateImage:e.unref(X),onToggleTable:Q,onToggleLabels:ee,onToggleTooltip:te,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(O)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:c})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:c})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:c})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),void 0,!0)]),key:"7"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:c})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:c})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:A,xmlns:e.unref(v.XMLNS),viewBox:`${e.unref(V).x} ${e.unref(V).y} ${e.unref(V).width} ${e.unref(V).height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":E.value,"vue-data-ui-fulscreen--off":!E.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Te._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:m.value.width<=0?10:m.value.width,height:m.value.height<=0?10:m.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,We)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ve.value),l=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${l}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(v.lightenHexColor)(l,.5)},null,8,Ze),e.createElementVNode("stop",{offset:"100%","stop-color":l},null,8,Ye)],8,Xe))),256))]),e.createVNode(ze,{dataset:B.value,color:t.value.style.chart.links.stroke,backgroundColor:t.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Ue,{dataset:B.value,hoveredUid:T.value,stroke:t.value.style.chart.nodes.stroke,strokeHovered:t.value.style.chart.nodes.strokeHovered,onClick:Ce,onHover:fe},{node:e.withCtx(({node:l})=>[e.renderSlot(o.$slots,"node",e.normalizeProps(e.guardReactiveProps({node:l})),void 0,!0)]),_:3},8,["dataset","hoveredUid","stroke","strokeHovered"]),p.value.showDataLabels?(e.openBlock(),e.createBlock(He,{key:1,dataset:B.value,color:t.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:m.value},void 0,!0)],14,je)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(G)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(be)?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(o.$slots,"reset-action",{reset:e.unref(oe)},()=>[e.createElementVNode("button",{"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({background:t.value.style.chart.backgroundColor}),onClick:r[0]||(r[0]=l=>e.unref(oe)(!0))},[e.createVNode(Re.default,{name:"refresh",stroke:t.value.style.chart.color},null,8,["stroke"])],4)],!0)])):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ne.default,{key:7,config:{type:"molecule",style:{backgroundColor:t.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",Qe,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Pe._sfc_main,{show:p.value.showTooltip&&i.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:x.value,content:y.value,isFullscreen:E.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),s.value?(e.openBlock(),e.createBlock(Se.default,{key:9,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock($e.DataTable,{key:`table_${_.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[1]||(r[1]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,et)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Me))}},ot=Oe._export_sfc(tt,[["__scopeId","data-v-90558edd"]]);exports.default=ot;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./index-Bw9yF1Ws.cjs"),we=require("./Title-DV4IpbZv.cjs"),ae=require("./usePrinter-O9uCoI6k.cjs"),$e=require("./DataTable-CpuMdjPX.cjs"),Pe=require("./Tooltip-De6uq1YK.cjs"),Ne=require("./vue-ui-skeleton-1LYIEAgE.cjs"),Se=require("./vue-ui-accordion-B7WLy1Jg.cjs"),se=require("./useNestedProp-CuyRUIUu.cjs"),Te=require("./PackageVersion-DkyZc28_.cjs"),Ee=require("./PenAndPaper-DU2wA7cg.cjs"),Fe=require("./useUserOptionState-BgepsfED.cjs"),xe=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ve=require("./usePanZoom-PXRi2Rwx.cjs"),Re=require("./BaseIcon-CSELstL2.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ae=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Le=["x","y","height","width","onClick","onMouseover"],Ue={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["click","hover"],setup(a,{emit:$}){const P=a,k=$;function d(n){k("click",n)}function g(n){k("hover",n)}return e.toRef(P,"dataset").value.forEach(n=>{n.nodes&&n.nodes.length>0&&n.nodes.forEach(f=>{f.ancestor=n})}),(n,f)=>{const R=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,(y,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("circle",{cx:y.x,cy:y.y,r:i.circleRadius,fill:`url(#gradient_${i.color})`,stroke:a.hoveredUid&&a.hoveredUid===i.uid?a.strokeHovered:a.stroke,"stroke-width":a.hoveredUid&&a.hoveredUid===i.uid?i.circleRadius/6:i.circleRadius/12,style:{cursor:"pointer"},onClick:w=>d(i),onMouseover:w=>g(i),onMouseleave:f[0]||(f[0]=w=>g(null))},null,40,Ae),n.$slots.node?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:y.x-i.circleRadius,y:y.y-i.circleRadius,height:i.circleRadius*2,width:i.circleRadius*2,style:{overflow:"visible"},onClick:e.withModifiers(w=>d(i),["stop"]),onMouseover:w=>g(i),onMouseleave:f[1]||(f[1]=w=>g(null))},[e.renderSlot(n.$slots,"node",e.mergeProps({ref_for:!0},{node:i}))],40,Le)):e.createCommentVNode("",!0)],64))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(R,{key:0,dataset:i.nodes,color:a.color,stroke:a.stroke,strokeHovered:a.strokeHovered,hoveredUid:a.hoveredUid,onClick:d,onHover:g},{node:e.withCtx(({node:y})=>[e.renderSlot(n.$slots,"node",e.mergeProps({ref_for:!0},{node:y}))]),_:2},1032,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},De=["x1","y1","x2","y2","stroke","stroke-width"],Ie=["x1","y1","x2","y2","stroke","stroke-width"],ze={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(a){const $=a;return e.toRef($,"dataset").value.forEach(k=>{k.nodes&&k.nodes.length>0&&k.nodes.forEach(d=>{d.ancestor=k})}),(k,d)=>{const g=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,s=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.polygonPath&&s.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s.polygonPath.coordinates,(n,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.ancestor&&s.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:n.x,y1:n.y,x2:s.ancestor.polygonPath.coordinates[0].x,y2:s.ancestor.polygonPath.coordinates[0].y,stroke:a.backgroundColor,"stroke-width":s.circleRadius/1.5},null,8,De),e.createElementVNode("line",{x1:n.x,y1:n.y,x2:s.ancestor.polygonPath.coordinates[0].x,y2:s.ancestor.polygonPath.coordinates[0].y,stroke:a.color,"stroke-width":s.circleRadius/2},null,8,Ie)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,s=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.polygonPath&&s.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.nodes&&s.nodes.length>0?(e.openBlock(),e.createBlock(g,{key:0,dataset:s.nodes,color:a.color,backgroundColor:a.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},_e=["x","y","fill","font-size"],He={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(a,{emit:$}){const P=a;return e.toRef(P,"dataset").value.forEach(d=>{d.nodes&&d.nodes.length>0&&d.nodes.forEach(g=>{g.ancestor=d})}),(d,g)=>{const s=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,n=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.polygonPath&&n.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.polygonPath.coordinates,f=>(e.openBlock(),e.createElementBlock("text",{x:f.x,y:f.y+n.circleRadius*2,fill:a.color,"font-size":n.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(n.name),9,_e))),256)),n.nodes&&n.nodes.length>0?(e.openBlock(),e.createBlock(s,{key:0,dataset:n.nodes,color:a.color,hoveredUid:a.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Me=["id"],qe={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Ge={key:2,style:"width:100%;background:transparent;"},je=["xmlns","viewBox"],We=["width","height"],Xe=["id"],Ze=["stop-color"],Ye=["stop-color"],Je={key:5,class:"vue-data-ui-watermark"},Ke={key:6,"data-dom-to-png-ignore":"",class:"reset-wrapper"},Qe={key:8,ref:"source",dir:"auto"},et=["innerHTML"],tt={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectNode"],setup(a,{expose:$,emit:P}){e.useCssVars(o=>({"6c5e8f09":o.slicerColor}));const{vue_ui_molecule:k}=v.useConfig(),d=a,g=P,s=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{n()});function n(){v.objectIsEmpty(d.dataset)&&v.error({componentName:"VueUiMolecule",type:"dataset"})}const f=e.ref(v.createUid()),R=e.ref(null),i=e.ref(!1),y=e.ref(""),x=e.ref(null),w=e.ref(0),z=e.ref(0),_=e.ref(0),t=e.computed({get:()=>q(),set:o=>o}),{userOptionsVisible:O,setUserOptionsVisibility:H,keepUserOptionState:M}=Fe.useUserOptionState({config:t.value}),{svgRef:A}=xe.useChartAccessibility({config:t.value.style.chart.title});function q(){const o=se.useNestedProp({userConfig:d.config,defaultConfig:k});return o.theme?{...se.useNestedProp({userConfig:v.themes.vue_ui_molecule[o.theme]||d.config,defaultConfig:o}),customPalette:v.themePalettes[o.theme]||v.palette}:o}e.watch(()=>d.config,o=>{t.value=q(),O.value=!t.value.userOptions.showOnChartHover,n(),z.value+=1,_.value+=1,p.value.showTable=t.value.table.show,p.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:G,isImaging:j,generatePdf:W,generateImage:X}=ae.usePrinter({elementId:`cluster_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-molecule",options:t.value.userOptions.print}),ie=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ue=e.computed(()=>v.convertCustomPalette(t.value.customPalette)),p=e.ref({showTable:t.value.table.show,showDataLabels:!0,showTooltip:t.value.style.chart.tooltip.show});function Z(o,r=0){return Array.isArray(o)&&o.length>0&&o[0].nodes?Z(o[0].nodes,r+1):r}function ce(){const o=Z(d.dataset);let r=100,l=r;for(let c=0;c<o;c+=1)r/=1,l+=r;return{height:l,width:l}}const m=e.ref(ce());e.ref(`0 0 ${m.value.width} ${m.value.height}`);function Y(o,r={x:-m.value.width/2.43,y:m.value.height/2},l=m.value.width/1.1,c=24,u=0,h=0,b="#BBBBBB",D=0){if(!Array.isArray(o)||o.length===0)return o;const Be=v.createPolygonPath({plot:r,radius:l,sides:o.length,rotation:u});return o.forEach((C,le)=>{const re=Be.coordinates[le],ne=C.color?(()=>{let I=v.convertColorToHex(C.color);return I.startsWith("#")?I:`#${I}`})():null;let S;ne?S=ne:D===0?S=b:D===1?(S=ue.value[h]||v.palette[h]||b,h+=1):S=b,C.polygonPath={coordinates:[re]},C.circleRadius=c,C.color=S,C.uid=v.createUid(),Array.isArray(C.nodes)&&C.nodes.length&&(C.nodes=Y(C.nodes,re,l/2.9,c/2.2,u+Math.PI*le/C.nodes.length,h,S,D+1))}),o}function de(o){const r=new Set;function l(u){u.forEach(h=>{if(!h.color)return;let b=h.color;/^#?[0-9A-F]{6}$/i.test(b)||(b=v.convertColorToHex(b)),b.startsWith("#")||(b=`#${b}`),r.add(b),Array.isArray(h.nodes)&&h.nodes.length&&l(h.nodes)})}l(o);const c={};return Array.from(r).forEach(u=>{const h=u.slice(1);c[u]=`gradient_${h}`}),c}const ve=e.computed(()=>de(B.value)),B=e.computed(()=>{const o=v.deepClone(d.dataset);return Y(o)}),L=e.ref(null);function he(o){L.value={datapoint:o,seriesIndex:-1,series:B.value,config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(v.isFunction(r)&&v.functionReturnsString(()=>r({seriesIndex:-1,datapoint:o,series:B.value,config:t.value})))y.value=r({seriesIndex:-1,datapoint:o,series:B.value,config:t.value});else{let l="";l+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${o.color}">⬤</div><div>${o.name}</div></div>`,o.details&&(l+=`<div style="width:100%;border-top:1px solid ${t.value.style.chart.tooltip.borderColor};margin-top: 2px">${o.details}</div>`),y.value=`<div style="font-family:inherit">${l}</div>`}}const J=e.ref(null),T=e.ref(null);function fe(o){J.value=o,o?(i.value=!0,he(o),T.value=o.uid):(i.value=!1,y.value="",T.value=null)}function me(o){const r=[];function l(c){c.forEach(u=>{const h={name:u.name,details:u.details||"-",ancestor:u.ancestor&&u.ancestor.name||"-",color:u.color||""};r.push(h),u.nodes&&u.nodes.length>0&&l(u.nodes,u.name)})}return l(o),r}const pe=e.computed(()=>me(B.value)),N=e.computed(()=>{const o=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor],r=pe.value.map((u,h)=>[{color:u.color,name:u.name},u.details,u.ancestor||""]),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},c=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor];return{head:o,body:r,config:l,colNames:c}});function K(){e.nextTick(()=>{const o=N.value.body.map((c,u)=>[[c[0].name],[c[1]],[c[2]]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(o),l=v.createCsvContent(r);v.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-molecule"})})}function ge(){return B.value}const E=e.ref(!1);function ke(o){E.value=o,w.value+=1}function Q(){p.value.showTable=!p.value.showTable}function ee(){p.value.showDataLabels=!p.value.showDataLabels}function te(){p.value.showTooltip=!p.value.showTooltip}const F=e.ref(!1);function U(){F.value=!F.value}const ye=e.computed(()=>!F.value),{viewBox:V,resetZoom:oe,isZoom:be}=Ve.usePanZoom(A,{x:0,y:0,width:m.value.width<=0?10:m.value.width,height:m.value.height<=0?10:m.value.height},t.value.style.chart.zoom.speed,ye);function Ce(o){g("selectNode",o)}return $({getData:ge,generatePdf:W,generateCsv:K,generateImage:X,toggleTable:Q,toggleLabels:ee,toggleTooltip:te,toggleAnnotator:U}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"moleculeChart",ref:x,class:e.normalizeClass(`vue-ui-molecule ${E.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`cluster_${f.value}`,onMouseleave:r[2]||(r[2]=l=>{J.value=null,T.value=null,e.unref(H)(!1)}),onMouseenter:r[3]||(r[3]=()=>e.unref(H)(!0))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ee._sfc_main,{key:0,svgRef:e.unref(A),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:U},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ie.value?(e.openBlock(),e.createElementBlock("div",qe,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Ge,[(e.openBlock(),e.createBlock(we._sfc_main,{key:`title_${z.value}`,config:{title:{cy:"molecule-div-title",...t.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&s.value&&(e.unref(M)||e.unref(O))?(e.openBlock(),e.createBlock(ae.UserOptions,{ref_key:"details",ref:R,key:`user_options_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(G),isImaging:e.unref(j),uid:f.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,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:ke,onGeneratePdf:e.unref(W),onGenerateCsv:K,onGenerateImage:e.unref(X),onToggleTable:Q,onToggleLabels:ee,onToggleTooltip:te,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(O)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:c})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:c})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:c})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),void 0,!0)]),key:"7"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:c})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:c})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:A,xmlns:e.unref(v.XMLNS),viewBox:`${e.unref(V).x} ${e.unref(V).y} ${e.unref(V).width} ${e.unref(V).height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":E.value,"vue-data-ui-fulscreen--off":!E.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Te._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:m.value.width<=0?10:m.value.width,height:m.value.height<=0?10:m.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,We)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ve.value),l=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${l}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(v.lightenHexColor)(l,.5)},null,8,Ze),e.createElementVNode("stop",{offset:"100%","stop-color":l},null,8,Ye)],8,Xe))),256))]),e.createVNode(ze,{dataset:B.value,color:t.value.style.chart.links.stroke,backgroundColor:t.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Ue,{dataset:B.value,hoveredUid:T.value,stroke:t.value.style.chart.nodes.stroke,strokeHovered:t.value.style.chart.nodes.strokeHovered,onClick:Ce,onHover:fe},{node:e.withCtx(({node:l})=>[e.renderSlot(o.$slots,"node",e.normalizeProps(e.guardReactiveProps({node:l})),void 0,!0)]),_:3},8,["dataset","hoveredUid","stroke","strokeHovered"]),p.value.showDataLabels?(e.openBlock(),e.createBlock(He,{key:1,dataset:B.value,color:t.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:m.value},void 0,!0)],14,je)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(G)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(be)?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(o.$slots,"reset-action",{reset:e.unref(oe)},()=>[e.createElementVNode("button",{"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({background:t.value.style.chart.backgroundColor}),onClick:r[0]||(r[0]=l=>e.unref(oe)(!0))},[e.createVNode(Re.default,{name:"refresh",stroke:t.value.style.chart.color},null,8,["stroke"])],4)],!0)])):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ne.default,{key:7,config:{type:"molecule",style:{backgroundColor:t.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",Qe,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Pe._sfc_main,{show:p.value.showTooltip&&i.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:x.value,content:y.value,isFullscreen:E.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),s.value?(e.openBlock(),e.createBlock(Se.default,{key:9,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock($e.DataTable,{key:`table_${_.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[1]||(r[1]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,et)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Me))}},ot=Oe._export_sfc(tt,[["__scopeId","data-v-90558edd"]]);exports.default=ot;
@@ -1,15 +1,15 @@
1
1
  import { computed as c, onMounted as we, ref as y, watch as _e, createElementBlock as h, openBlock as r, unref as a, normalizeStyle as L, normalizeClass as ee, createBlock as p, createCommentVNode as u, renderSlot as v, createVNode as U, createSlots as xe, withCtx as f, normalizeProps as I, guardReactiveProps as F, createElementVNode as s, Fragment as te, renderList as oe, toDisplayString as P, createTextVNode as le, nextTick as $e } from "vue";
2
- import { u as Me, o as Ne, e as ae, c as Pe, a as Ae, Q as Oe, X as Te, s as C, w as Le, R as Ie, i as se, f as S, q as Fe, r as Se } from "./index-9ZicrZWM.js";
3
- import { _ as Ve } from "./Title-CGY0WlAI.js";
4
- import { u as je, U as Re } from "./usePrinter-D7IXLE53.js";
5
- import { L as Ue } from "./Legend-BxZxsJCp.js";
6
- import A from "./BaseIcon-BH4bJe82.js";
7
- import { D as Be } from "./DataTable-CaUgku7o.js";
8
- import De from "./vue-ui-skeleton-BjminQzl.js";
9
- import We from "./vue-ui-accordion-62KnRfCb.js";
10
- import { u as re } from "./useNestedProp-s1XZrtPS.js";
11
- import { _ as ze } from "./PackageVersion-BEE_4baV.js";
12
- import { _ as Ee } from "./PenAndPaper-B3WdOAcZ.js";
2
+ import { u as Me, o as Ne, e as ae, c as Pe, a as Ae, P as Oe, X as Te, s as C, w as Le, Q as Ie, i as se, f as S, q as Fe, r as Se } from "./index-CeGGP5OF.js";
3
+ import { _ as Ve } from "./Title-DmtXFzpc.js";
4
+ import { u as je, U as Re } from "./usePrinter-Ox_AUldH.js";
5
+ import { L as Ue } from "./Legend-BQ5HGf8B.js";
6
+ import A from "./BaseIcon-CLefSNKF.js";
7
+ import { D as Be } from "./DataTable-Cuky8ZpI.js";
8
+ import De from "./vue-ui-skeleton-CpGgeJbB.js";
9
+ import We from "./vue-ui-accordion-B5Gs-td_.js";
10
+ import { u as re } from "./useNestedProp-CD9pbB7F.js";
11
+ import { _ as ze } from "./PackageVersion-DJo_CKR-.js";
12
+ import { _ as Ee } from "./PenAndPaper-DK3Wbwoz.js";
13
13
  import { u as Ge } from "./useUserOptionState-BIvW1Kz7.js";
14
14
  import { u as He } from "./useChartAccessibility-BWojgys7.js";
15
15
  import { _ as Xe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DjDcQ8pe.cjs"),oe=require("./Title-BGh0hWb2.cjs"),q=require("./usePrinter-vFXYgZiT.cjs"),le=require("./Legend-Bl_MrORk.cjs"),g=require("./BaseIcon-C6L3qbQ8.cjs"),ae=require("./DataTable-Cz1SDtvT.cjs"),re=require("./vue-ui-skeleton-BGykkjYQ.cjs"),ne=require("./vue-ui-accordion-DIMalTE4.cjs"),z=require("./useNestedProp-BS9eJthK.cjs"),se=require("./PackageVersion-BrUdYdIC.cjs"),ue=require("./PenAndPaper-DyGcaflS.cjs"),ie=require("./useUserOptionState-BgepsfED.cjs"),ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],ye={key:2,style:"width:100%;background:transparent"},me=["xmlns","viewBox"],he=["width","height"],fe=["id"],pe=["stop-color"],ke=["stop-color"],ge=["x1","y1","x2","y2","stroke","stroke-width"],be=["d","stroke","stroke-width"],Ce=["stroke"],Ne=["fill"],we=["stroke"],xe=["fill"],Ve=["stroke"],_e=["fill"],Be=["stroke"],Pe=["fill"],$e=["stroke"],Me=["fill"],Ee=["d","stroke","stroke-width","fill"],Oe=["x1","y1","stroke"],Se=["cx","cy","fill","stroke"],Ae=["fill","stroke"],Te=["y","fill","font-weight"],Le=["y","fill"],Ie={key:5,class:"vue-data-ui-watermark"},Fe=["onClick"],qe={style:{"font-weight":"bold"}},ze={key:8,ref:"source",dir:"auto"},De=["innerHTML"],Re={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(D,{expose:R}){const{vue_ui_mood_radar:j}=r.useConfig(),u=D,m=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length);e.onMounted(()=>{V()});function V(){r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),_=e.ref(null),U=e.ref(null),n=e.ref(null),W=e.ref(null),G=e.ref(0),H=e.ref(0),B=e.ref(0),t=e.computed({get:()=>E(),set:l=>l}),{userOptionsVisible:N,setUserOptionsVisibility:P,keepUserOptionState:$}=ie.useUserOptionState({config:t.value}),{svgRef:M}=ce.useChartAccessibility({config:t.value.style.chart.title});function E(){const l=z.useNestedProp({userConfig:u.config,defaultConfig:j});return l.theme?{...z.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||u.config,defaultConfig:l})}:l}e.watch(()=>u.config,l=>{t.value=E(),N.value=!t.value.userOptions.showOnChartHover,V(),G.value+=1,H.value+=1,B.value+=1,f.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:O,isImaging:S,generatePdf:A,generateImage:T}=q.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar",options:t.value.userOptions.print}),X=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),f=e.ref({showTable:t.value.table.show}),i=e.computed(()=>({height:256,width:256})),w=e.computed(()=>r.createPolygonPath({plot:{x:128,y:i.value.height/2},radius:90,sides:5,rotation:11}));function K({centerX:l,centerY:a,apexX:o,apexY:s,proportion:d,key:k,value:te}){return{x:l+(o-l)*d,y:a+(s-a)*d,key:k,value:te}}const Y=e.computed(()=>Math.max(...Object.values(u.dataset).map(l=>isNaN(l)?0:l))),y=e.computed(()=>Object.values(u.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),c=e.computed(()=>Object.keys(u.dataset).map((l,a)=>{const o=typeof u.dataset[l]!="number"||isNaN(u.dataset[l])?0:u.dataset[l];return{index:a,key:l,value:o,proportion:o/y.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),L=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(u.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),w.value.coordinates.map((l,a)=>{const o=K({centerX:i.value.width/2,centerY:i.value.height/2,apexX:l.x,apexY:l.y,proportion:c.value[a].value/Y.value,key:c.value[a].key,value:c.value[a].value});return{...l,plots:o,key:c.value[a].key}})):[]),J=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 Q(l){l===n.value?n.value=null:n.value=l}const v=e.computed(()=>{const l=c.value.map(o=>({name:o.key,color:o.color})),a=c.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function I(){e.nextTick(()=>{const l=v.value.head.map((s,d)=>[[s.name],[v.value.body[d]],[isNaN(v.value.body[d]/y.value)?"-":v.value.body[d]/y.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 b=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(y.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=v.value.head.map((d,k)=>[{color:d.color,name:d.name},v.value.body[k].toFixed(t.value.table.td.roundingValue),isNaN(v.value.body[k]/y.value)?"-":(v.value.body[k]/y.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},s=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:s}});function Z(){return c.value}function F(){f.value.showTable=!f.value.showTable}const p=e.ref(!1);function ee(l){p.value=l}const C=e.ref(!1);function x(){C.value=!C.value}return R({getData:Z,generatePdf:A,generateCsv:I,generateImage:T,toggleTable:F,toggleAnnotator:x}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${p.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:_,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[11]||(a[11]=()=>e.unref(P)(!0)),onMouseleave:a[12]||(a[12]=()=>e.unref(P)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ue._sfc_main,{key:0,svgRef:e.unref(M),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),X.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:W,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",ye,[e.createVNode(oe._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.unref($)||e.unref(N))?(e.openBlock(),e.createBlock(q.UserOptions,{key:3,ref_key:"details",ref:U,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(O),isImaging:e.unref(S),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,isFullscreen:p.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:ee,onGeneratePdf:e.unref(A),onGenerateCsv:I,onGenerateImage:e.unref(T),onToggleTable:F,onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref($)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:s})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:s})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:s})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:s})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:s})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:s})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:M,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${i.value.width} ${i.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":p.value,"vue-data-ui-fulscreen--off":!p.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(se._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:i.value.width,height:i.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,he)):e.createCommentVNode("",!0),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,pe),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,ke)],8,fe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:i.value.width/2,y1:i.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,ge))),256)),e.createElementVNode("path",{d:w.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,be),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,Ce),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,Ne),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,we),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,xe),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,Ve),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,_e),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,Pe),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,$e),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,Me),e.createElementVNode("path",{d:e.unref(r.makePath)(L.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,Ee),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value.map(o=>o.plots),(o,s)=>(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,Oe),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,Se),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,Ae),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:s})),9,Te),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/y.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,Le)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,me)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(S)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re.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(le.Legend,{legendSet:c.value,config:J.value,key:`legend_${B.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:s})=>[e.createElementVNode("div",{onClick:()=>Q(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(g.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(g.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(g.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(g.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(g.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",qe,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:s})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Fe)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:c.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",ze,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(ne.default,{key:9,hideDetails:"",config:{open:f.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(ae.DataTable,{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:a[10]||(a[10]=o=>f.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,De)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ve))}},je=de._export_sfc(Re,[["__scopeId","data-v-219c3ecd"]]);exports.default=je;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Bw9yF1Ws.cjs"),oe=require("./Title-DV4IpbZv.cjs"),q=require("./usePrinter-O9uCoI6k.cjs"),le=require("./Legend-CqHSKd8f.cjs"),g=require("./BaseIcon-CSELstL2.cjs"),ae=require("./DataTable-CpuMdjPX.cjs"),re=require("./vue-ui-skeleton-1LYIEAgE.cjs"),ne=require("./vue-ui-accordion-B7WLy1Jg.cjs"),z=require("./useNestedProp-CuyRUIUu.cjs"),se=require("./PackageVersion-DkyZc28_.cjs"),ue=require("./PenAndPaper-DU2wA7cg.cjs"),ie=require("./useUserOptionState-BgepsfED.cjs"),ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],ye={key:2,style:"width:100%;background:transparent"},me=["xmlns","viewBox"],he=["width","height"],fe=["id"],pe=["stop-color"],ke=["stop-color"],ge=["x1","y1","x2","y2","stroke","stroke-width"],be=["d","stroke","stroke-width"],Ce=["stroke"],Ne=["fill"],we=["stroke"],xe=["fill"],Ve=["stroke"],_e=["fill"],Be=["stroke"],Pe=["fill"],$e=["stroke"],Me=["fill"],Ee=["d","stroke","stroke-width","fill"],Oe=["x1","y1","stroke"],Se=["cx","cy","fill","stroke"],Ae=["fill","stroke"],Te=["y","fill","font-weight"],Le=["y","fill"],Ie={key:5,class:"vue-data-ui-watermark"},Fe=["onClick"],qe={style:{"font-weight":"bold"}},ze={key:8,ref:"source",dir:"auto"},De=["innerHTML"],Re={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(D,{expose:R}){const{vue_ui_mood_radar:j}=r.useConfig(),u=D,m=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length);e.onMounted(()=>{V()});function V(){r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),_=e.ref(null),U=e.ref(null),n=e.ref(null),W=e.ref(null),G=e.ref(0),H=e.ref(0),B=e.ref(0),t=e.computed({get:()=>E(),set:l=>l}),{userOptionsVisible:N,setUserOptionsVisibility:P,keepUserOptionState:$}=ie.useUserOptionState({config:t.value}),{svgRef:M}=ce.useChartAccessibility({config:t.value.style.chart.title});function E(){const l=z.useNestedProp({userConfig:u.config,defaultConfig:j});return l.theme?{...z.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||u.config,defaultConfig:l})}:l}e.watch(()=>u.config,l=>{t.value=E(),N.value=!t.value.userOptions.showOnChartHover,V(),G.value+=1,H.value+=1,B.value+=1,f.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:O,isImaging:S,generatePdf:A,generateImage:T}=q.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar",options:t.value.userOptions.print}),X=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),f=e.ref({showTable:t.value.table.show}),i=e.computed(()=>({height:256,width:256})),w=e.computed(()=>r.createPolygonPath({plot:{x:128,y:i.value.height/2},radius:90,sides:5,rotation:11}));function K({centerX:l,centerY:a,apexX:o,apexY:s,proportion:d,key:k,value:te}){return{x:l+(o-l)*d,y:a+(s-a)*d,key:k,value:te}}const Y=e.computed(()=>Math.max(...Object.values(u.dataset).map(l=>isNaN(l)?0:l))),y=e.computed(()=>Object.values(u.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),c=e.computed(()=>Object.keys(u.dataset).map((l,a)=>{const o=typeof u.dataset[l]!="number"||isNaN(u.dataset[l])?0:u.dataset[l];return{index:a,key:l,value:o,proportion:o/y.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),L=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(u.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),w.value.coordinates.map((l,a)=>{const o=K({centerX:i.value.width/2,centerY:i.value.height/2,apexX:l.x,apexY:l.y,proportion:c.value[a].value/Y.value,key:c.value[a].key,value:c.value[a].value});return{...l,plots:o,key:c.value[a].key}})):[]),J=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 Q(l){l===n.value?n.value=null:n.value=l}const v=e.computed(()=>{const l=c.value.map(o=>({name:o.key,color:o.color})),a=c.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function I(){e.nextTick(()=>{const l=v.value.head.map((s,d)=>[[s.name],[v.value.body[d]],[isNaN(v.value.body[d]/y.value)?"-":v.value.body[d]/y.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 b=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(y.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=v.value.head.map((d,k)=>[{color:d.color,name:d.name},v.value.body[k].toFixed(t.value.table.td.roundingValue),isNaN(v.value.body[k]/y.value)?"-":(v.value.body[k]/y.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},s=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:s}});function Z(){return c.value}function F(){f.value.showTable=!f.value.showTable}const p=e.ref(!1);function ee(l){p.value=l}const C=e.ref(!1);function x(){C.value=!C.value}return R({getData:Z,generatePdf:A,generateCsv:I,generateImage:T,toggleTable:F,toggleAnnotator:x}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${p.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:_,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[11]||(a[11]=()=>e.unref(P)(!0)),onMouseleave:a[12]||(a[12]=()=>e.unref(P)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ue._sfc_main,{key:0,svgRef:e.unref(M),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),X.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:W,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",ye,[e.createVNode(oe._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.unref($)||e.unref(N))?(e.openBlock(),e.createBlock(q.UserOptions,{key:3,ref_key:"details",ref:U,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(O),isImaging:e.unref(S),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,isFullscreen:p.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:ee,onGeneratePdf:e.unref(A),onGenerateCsv:I,onGenerateImage:e.unref(T),onToggleTable:F,onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref($)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:s})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:s})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:s})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:s})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:s})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:s})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:M,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${i.value.width} ${i.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":p.value,"vue-data-ui-fulscreen--off":!p.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(se._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:i.value.width,height:i.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,he)):e.createCommentVNode("",!0),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,pe),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,ke)],8,fe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:i.value.width/2,y1:i.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,ge))),256)),e.createElementVNode("path",{d:w.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,be),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,Ce),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,Ne),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,we),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,xe),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,Ve),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,_e),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,Pe),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,$e),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,Me),e.createElementVNode("path",{d:e.unref(r.makePath)(L.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,Ee),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value.map(o=>o.plots),(o,s)=>(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,Oe),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,Se),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,Ae),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:s})),9,Te),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/y.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,Le)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,me)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(S)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re.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(le.Legend,{legendSet:c.value,config:J.value,key:`legend_${B.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:s})=>[e.createElementVNode("div",{onClick:()=>Q(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(g.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(g.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(g.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(g.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(g.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",qe,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:s})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Fe)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:c.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",ze,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(ne.default,{key:9,hideDetails:"",config:{open:f.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(ae.DataTable,{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:a[10]||(a[10]=o=>f.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,De)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ve))}},je=de._export_sfc(Re,[["__scopeId","data-v-219c3ecd"]]);exports.default=je;
@@ -1,16 +1,16 @@
1
1
  import { computed as b, ref as i, watch as Ue, onMounted as st, onBeforeUnmount as ut, createElementBlock as n, openBlock as u, unref as r, normalizeStyle as K, normalizeClass as D, createBlock as z, createCommentVNode as f, createVNode as Re, createSlots as nt, withCtx as g, renderSlot as m, normalizeProps as V, guardReactiveProps as M, createElementVNode as k, Fragment as C, renderList as F, toDisplayString as S, createTextVNode as Q, nextTick as rt } from "vue";
2
- import { u as it, c as dt, t as vt, p as Z, a as ct, o as ft, e as U, b as ht, J as Be, d as yt, m as Ee, f as x, X as pt, s as Ge, L as bt, k as ie, n as R, i as E, x as Ye, q as gt, r as mt, y as kt } from "./index-9ZicrZWM.js";
2
+ import { u as it, c as dt, t as vt, p as Z, a as ct, o as ft, e as U, b as ht, H as Be, d as yt, m as Ee, f as x, X as pt, s as Ge, J as bt, k as ie, n as R, i as E, x as Ye, q as gt, r as mt, y as kt } from "./index-CeGGP5OF.js";
3
3
  import { t as wt, u as $t } from "./useResponsive-Cw4oZ8sQ.js";
4
- import { _ as Lt } from "./Title-CGY0WlAI.js";
5
- import { u as Ct, U as xt } from "./usePrinter-D7IXLE53.js";
6
- import { D as _t } from "./DataTable-CaUgku7o.js";
7
- import { _ as Tt } from "./Tooltip-BfEhZz9k.js";
8
- import { L as Ft } from "./Legend-BxZxsJCp.js";
9
- import Nt from "./vue-ui-skeleton-BjminQzl.js";
10
- import St from "./vue-ui-accordion-62KnRfCb.js";
11
- import { u as Xe } from "./useNestedProp-s1XZrtPS.js";
12
- import { _ as Ot } from "./PackageVersion-BEE_4baV.js";
13
- import { _ as It } from "./PenAndPaper-B3WdOAcZ.js";
4
+ import { _ as Lt } from "./Title-DmtXFzpc.js";
5
+ import { u as Ct, U as xt } from "./usePrinter-Ox_AUldH.js";
6
+ import { D as _t } from "./DataTable-Cuky8ZpI.js";
7
+ import { _ as Tt } from "./Tooltip-BMaBMPpZ.js";
8
+ import { L as Ft } from "./Legend-BQ5HGf8B.js";
9
+ import Nt from "./vue-ui-skeleton-CpGgeJbB.js";
10
+ import St from "./vue-ui-accordion-B5Gs-td_.js";
11
+ import { u as Xe } from "./useNestedProp-CD9pbB7F.js";
12
+ import { _ as Ot } from "./PackageVersion-DJo_CKR-.js";
13
+ import { _ as It } from "./PenAndPaper-DK3Wbwoz.js";
14
14
  import { u as At } from "./useUserOptionState-BIvW1Kz7.js";
15
15
  import { u as Dt } from "./useChartAccessibility-BWojgys7.js";
16
16
  import { _ as zt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DjDcQ8pe.cjs"),me=require("./useResponsive-DQmBAoBf.cjs"),Te=require("./Title-BGh0hWb2.cjs"),be=require("./usePrinter-vFXYgZiT.cjs"),Oe=require("./DataTable-Cz1SDtvT.cjs"),Pe=require("./Tooltip-DckFFIYj.cjs"),ze=require("./Legend-Bl_MrORk.cjs"),De=require("./vue-ui-skeleton-BGykkjYQ.cjs"),Ae=require("./vue-ui-accordion-DIMalTE4.cjs"),ge=require("./useNestedProp-BS9eJthK.cjs"),Ie=require("./PackageVersion-BrUdYdIC.cjs"),Me=require("./PenAndPaper-DyGcaflS.cjs"),Re=require("./useUserOptionState-BgepsfED.cjs"),Ue=require("./useChartAccessibility-Cm7nkzTG.cjs"),qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ye=["id"],Xe=["xmlns","viewBox"],Ge=["width","height"],He=["id"],We=["offset","stop-color"],Je=["offset","stop-opacity"],Ke=["id"],Qe=["id"],Ze=["id"],je=["flood-color"],et=["d","fill","stroke","stroke-width","filter"],tt={key:1},lt=["d","fill"],at={key:2},ot=["x","y","font-size","font-weight","fill"],nt={key:3},rt=["filter"],st=["text-anchor","x","y","fill","font-size","font-weight"],ut=["text-anchor","x","y","fill","font-size","font-weight"],it=["text-anchor","x","y","fill","font-size","font-weight"],ct=["d","fill","onMouseenter","onClick"],dt={key:5,class:"vue-data-ui-watermark"},vt={key:0,class:"vue-ui-nested-donuts-legend-title"},ft=["onClick"],pt=["innerHTML"],ht={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ke,{expose:Ce,emit:we}){const{vue_ui_nested_donuts:Le}=s.useConfig(),k=ke,x=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(s.createUid()),F=e.ref(!1),T=e.ref(""),Be=e.ref(null),U=e.ref(0),B=e.ref(null),q=e.ref(null),O=e.ref(null),Y=e.ref(null),X=e.ref(null),G=e.ref(0),H=e.ref(0),W=e.ref(0),L=e.ref(!1);function xe(l){L.value=l,U.value+=1}const t=e.computed({get:()=>Z(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:J,keepUserOptionState:K}=Re.useUserOptionState({config:t.value}),{svgRef:Q}=Ue.useChartAccessibility({config:t.value.style.chart.title});function Z(){const l=ge.useNestedProp({userConfig:k.config,defaultConfig:Le});return l.theme?{...ge.useNestedProp({userConfig:s.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}e.watch(()=>k.config,l=>{t.value=Z(),P.value=!t.value.userOptions.showOnChartHover,ee(),G.value+=1,H.value+=1,W.value+=1,v.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const j=e.computed(()=>{const{top:l,right:r,bottom:o,left:n}=t.value.style.chart.padding;return{css:`padding:${l}px ${r}px ${o}px ${n}px`,top:l,right:r,bottom:o,left:n}}),$=e.ref(null);e.onMounted(()=>{ee()});function ee(){if(s.objectIsEmpty(k.dataset)&&s.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=me.throttle(()=>{const{width:r,height:o}=me.useResponsive({chart:B.value,title:t.value.style.chart.title.text?q.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:Y.value,noTitle:X.value,padding:j.value});requestAnimationFrame(()=>{c.value.width=r,c.value.height=o})});$.value=new ResizeObserver(l),$.value.observe(B.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:te,isImaging:le,generatePdf:ae,generateImage:oe}=be.usePrinter({elementId:`nested_donuts_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts",options:t.value.userOptions.print}),$e=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Ne=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),c=e.ref({height:512,width:512}),ne=we;function Se({datapoint:l,index:r}){ne("selectDatapoint",{datapoint:l,index:r})}const f=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,r)=>{[null,void 0].includes(l.name)&&s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:r}),[null,void 0].includes(l.series)?s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:r}):l.series.length===0?s.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${r}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,r)=>({...l,total:l.series.filter(o=>!f.value.includes(o.id)).map(o=>s.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:r,id:`${h.value}_${r}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${h.value}_${r}`,id:`${h.value}_${r}_${n}`,seriesIndex:n,datasetIndex:r,color:s.convertColorToHex(o.color)||Ne.value[n]||s.palette[n]||s.palette[n%s.palette.length],value:s.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),re=e.computed(()=>[...m.value].map((l,r)=>{const o=l.series.filter(n=>!f.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!f.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function _e(l,r,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<r}const d=e.ref(re.value);e.watch(()=>re.value,l=>d.value=l);const se=e.ref(null),ue=e.ref(null);function z(l){ne("selectLegend",l);const r=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=d.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===r.arcOfId).series.map(i=>i.id),p=_e(u,u.length-1,f.value);if(f.value.includes(l.id)){let i=function(){a>r.value?(cancelAnimationFrame(se.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:r.value}:g)}))):(a+=r.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),se.value=requestAnimationFrame(i))};f.value=f.value.filter(y=>y!==l.id),i()}else if(p){let i=function(){a<.1?(cancelAnimationFrame(ue.value),f.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:0}:w)}))):(a/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:a}:w)})),ue.value=requestAnimationFrame(i))};i()}}const D=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),ie=e.computed(()=>d.value.map((l,r)=>b.value-r*b.value/m.value.length)),N=e.computed(()=>d.value.map((l,r)=>{const o=r*b.value/m.value.length;return{...l,radius:b.value-o,donut:s.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,D.value)}})),ce=e.computed(()=>[...m.value].map((l,r)=>{const o=r*b.value/m.value.length;return{sizeRatio:o,donut:s.makeDonut({series:[{value:1}]},c.value.width/2,c.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]}})),de=e.ref(null),S=e.ref(null),_=e.ref(null),A=e.ref(null);function Ve({datapoint:l,_relativeIndex:r,seriesIndex:o}){de.value=l.arcOfId,S.value=l.id,_.value=o,A.value={datapoint:l,seriesIndex:o,series:d.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(s.isFunction(n)&&s.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:d.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:d.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0){const u=d.value.map(p=>p.series.find(i=>i.seriesIndex===o));u.forEach((p,i)=>{if(!p)return"";a+=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Bw9yF1Ws.cjs"),me=require("./useResponsive-DQmBAoBf.cjs"),Te=require("./Title-DV4IpbZv.cjs"),be=require("./usePrinter-O9uCoI6k.cjs"),Oe=require("./DataTable-CpuMdjPX.cjs"),Pe=require("./Tooltip-De6uq1YK.cjs"),ze=require("./Legend-CqHSKd8f.cjs"),De=require("./vue-ui-skeleton-1LYIEAgE.cjs"),Ae=require("./vue-ui-accordion-B7WLy1Jg.cjs"),ge=require("./useNestedProp-CuyRUIUu.cjs"),Ie=require("./PackageVersion-DkyZc28_.cjs"),Me=require("./PenAndPaper-DU2wA7cg.cjs"),Re=require("./useUserOptionState-BgepsfED.cjs"),Ue=require("./useChartAccessibility-Cm7nkzTG.cjs"),qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ye=["id"],Xe=["xmlns","viewBox"],Ge=["width","height"],He=["id"],We=["offset","stop-color"],Je=["offset","stop-opacity"],Ke=["id"],Qe=["id"],Ze=["id"],je=["flood-color"],et=["d","fill","stroke","stroke-width","filter"],tt={key:1},lt=["d","fill"],at={key:2},ot=["x","y","font-size","font-weight","fill"],nt={key:3},rt=["filter"],st=["text-anchor","x","y","fill","font-size","font-weight"],ut=["text-anchor","x","y","fill","font-size","font-weight"],it=["text-anchor","x","y","fill","font-size","font-weight"],ct=["d","fill","onMouseenter","onClick"],dt={key:5,class:"vue-data-ui-watermark"},vt={key:0,class:"vue-ui-nested-donuts-legend-title"},ft=["onClick"],pt=["innerHTML"],ht={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ke,{expose:Ce,emit:we}){const{vue_ui_nested_donuts:Le}=s.useConfig(),k=ke,x=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(s.createUid()),F=e.ref(!1),T=e.ref(""),Be=e.ref(null),U=e.ref(0),B=e.ref(null),q=e.ref(null),O=e.ref(null),Y=e.ref(null),X=e.ref(null),G=e.ref(0),H=e.ref(0),W=e.ref(0),L=e.ref(!1);function xe(l){L.value=l,U.value+=1}const t=e.computed({get:()=>Z(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:J,keepUserOptionState:K}=Re.useUserOptionState({config:t.value}),{svgRef:Q}=Ue.useChartAccessibility({config:t.value.style.chart.title});function Z(){const l=ge.useNestedProp({userConfig:k.config,defaultConfig:Le});return l.theme?{...ge.useNestedProp({userConfig:s.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}e.watch(()=>k.config,l=>{t.value=Z(),P.value=!t.value.userOptions.showOnChartHover,ee(),G.value+=1,H.value+=1,W.value+=1,v.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const j=e.computed(()=>{const{top:l,right:r,bottom:o,left:n}=t.value.style.chart.padding;return{css:`padding:${l}px ${r}px ${o}px ${n}px`,top:l,right:r,bottom:o,left:n}}),$=e.ref(null);e.onMounted(()=>{ee()});function ee(){if(s.objectIsEmpty(k.dataset)&&s.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=me.throttle(()=>{const{width:r,height:o}=me.useResponsive({chart:B.value,title:t.value.style.chart.title.text?q.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:Y.value,noTitle:X.value,padding:j.value});requestAnimationFrame(()=>{c.value.width=r,c.value.height=o})});$.value=new ResizeObserver(l),$.value.observe(B.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:te,isImaging:le,generatePdf:ae,generateImage:oe}=be.usePrinter({elementId:`nested_donuts_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts",options:t.value.userOptions.print}),$e=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Ne=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),c=e.ref({height:512,width:512}),ne=we;function Se({datapoint:l,index:r}){ne("selectDatapoint",{datapoint:l,index:r})}const f=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,r)=>{[null,void 0].includes(l.name)&&s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:r}),[null,void 0].includes(l.series)?s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:r}):l.series.length===0?s.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${r}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,r)=>({...l,total:l.series.filter(o=>!f.value.includes(o.id)).map(o=>s.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:r,id:`${h.value}_${r}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${h.value}_${r}`,id:`${h.value}_${r}_${n}`,seriesIndex:n,datasetIndex:r,color:s.convertColorToHex(o.color)||Ne.value[n]||s.palette[n]||s.palette[n%s.palette.length],value:s.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),re=e.computed(()=>[...m.value].map((l,r)=>{const o=l.series.filter(n=>!f.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!f.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function _e(l,r,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<r}const d=e.ref(re.value);e.watch(()=>re.value,l=>d.value=l);const se=e.ref(null),ue=e.ref(null);function z(l){ne("selectLegend",l);const r=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=d.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===r.arcOfId).series.map(i=>i.id),p=_e(u,u.length-1,f.value);if(f.value.includes(l.id)){let i=function(){a>r.value?(cancelAnimationFrame(se.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:r.value}:g)}))):(a+=r.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),se.value=requestAnimationFrame(i))};f.value=f.value.filter(y=>y!==l.id),i()}else if(p){let i=function(){a<.1?(cancelAnimationFrame(ue.value),f.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:0}:w)}))):(a/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:a}:w)})),ue.value=requestAnimationFrame(i))};i()}}const D=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),ie=e.computed(()=>d.value.map((l,r)=>b.value-r*b.value/m.value.length)),N=e.computed(()=>d.value.map((l,r)=>{const o=r*b.value/m.value.length;return{...l,radius:b.value-o,donut:s.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,D.value)}})),ce=e.computed(()=>[...m.value].map((l,r)=>{const o=r*b.value/m.value.length;return{sizeRatio:o,donut:s.makeDonut({series:[{value:1}]},c.value.width/2,c.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]}})),de=e.ref(null),S=e.ref(null),_=e.ref(null),A=e.ref(null);function Ve({datapoint:l,_relativeIndex:r,seriesIndex:o}){de.value=l.arcOfId,S.value=l.id,_.value=o,A.value={datapoint:l,seriesIndex:o,series:d.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(s.isFunction(n)&&s.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:d.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:d.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0){const u=d.value.map(p=>p.series.find(i=>i.seriesIndex===o));u.forEach((p,i)=>{if(!p)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,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DjDcQ8pe.cjs"),ae=require("./useResponsive-DQmBAoBf.cjs"),$e=require("./Title-BGh0hWb2.cjs"),oe=require("./usePrinter-vFXYgZiT.cjs"),xe=require("./Legend-Bl_MrORk.cjs"),Be=require("./DataTable-Cz1SDtvT.cjs"),Te=require("./Tooltip-DckFFIYj.cjs"),Se=require("./vue-ui-skeleton-BGykkjYQ.cjs"),Pe=require("./vue-ui-accordion-DIMalTE4.cjs"),re=require("./useNestedProp-BS9eJthK.cjs"),Oe=require("./PackageVersion-BrUdYdIC.cjs"),Ne=require("./PenAndPaper-DyGcaflS.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Ve=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Fe=["id"],Ie=["xmlns","viewBox"],Ee=["width","height"],Re=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Me=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Le=["id"],ze=["stdDeviation"],De=["filter"],qe=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],Ue=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],Ye={key:2},Xe=["onMouseenter"],Ge=["x","y","font-size","fill","font-weight"],He={key:5,class:"vue-data-ui-watermark"},je=["onClick"],We=["innerHTML"],Je={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ne,{expose:ue,emit:se}){const{vue_ui_onion:ie}=u.useConfig(),f=ne,C=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(u.createUid()),ce=e.ref(null),I=e.ref(0),$=e.ref(!1),S=e.ref(""),d=e.ref([]),b=e.ref(null),E=e.ref(null),R=e.ref(null),M=e.ref(null),L=e.ref(null),z=e.ref(0),D=e.ref(0),q=e.ref(0),t=e.computed({get:()=>G(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:U,keepUserOptionState:Y}=_e.useUserOptionState({config:t.value}),{svgRef:X}=Ve.useChartAccessibility({config:t.value.style.chart.title});function G(){const l=re.useNestedProp({userConfig:f.config,defaultConfig:ie});return l.theme?{...re.useNestedProp({userConfig:u.themes.vue_ui_onion[l.theme]||f.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>f.config,l=>{t.value=G(),P.value=!t.value.userOptions.showOnChartHover,K(),z.value+=1,D.value+=1,q.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:H,isImaging:j,generatePdf:W,generateImage:J}=oe.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion",options:t.value.userOptions.print}),de=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ve=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),v=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(()=>{K()});function K(){if(u.objectIsEmpty(f.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=ae.throttle(()=>{const{width:a,height:o}=ae.useResponsive({chart:b.value,title:t.value.style.chart.title.text?E.value:null,legend:t.value.style.chart.legend.show?R.value:null,source:M.value,noTitle:L.value});requestAnimationFrame(()=>{n.value.width=a,n.value.height=o,n.value.padding.top=Math.max(a,o)*.125,n.value.padding.right=Math.max(a,o)*.125,n.value.padding.bottom=Math.max(a,o)*.125,n.value.padding.left=Math.max(a,o)*.125,n.value.minRadius=Math.min(a,o)*.125})});x.value=new ResizeObserver(r),x.value.observe(b.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(f.dataset.forEach((l,r)=>{[null,void 0].includes(l.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(l.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),f.dataset.map((l,r)=>{const a=`onion_serie_${r}_${m.value}`;return{...l,percentage:l.percentage||0,targetPercentage:l.percentage||0,color:u.convertColorToHex(l.color)||ve.value[r]||u.palette[r],id:a,shape:"circle",opacity:d.value.includes(a)?.5:1,absoluteIndex:r,segregate:()=>Q(a),isSegregated:d.value.includes(a)}}))),k=e.ref(i.value),he=e.computed(()=>t.value.useStartAnimation),pe=e.ref(null),fe=e.computed(()=>Math.max(...i.value.map(l=>l.percentage))),O=e.ref(!1);e.watch(()=>i.value,ge,{immediate:!0});function ge(){if(he.value&&!O.value){let r=function(){l>=fe.value?(cancelAnimationFrame(pe.value),k.value=i.value,O.value=!0):(k.value=i.value.map(a=>({...a,percentage:l<a.targetPercentage?l:a.targetPercentage})),l+=1,requestAnimationFrame(r),O.value=!0)};k.value=i.value.map(a=>({...a,percentage:0}));let l=0;r()}else k.value=i.value}const me=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":""})),ye=e.computed(()=>i.value.filter(l=>!d.value.includes(l.id)).length),g=e.computed(()=>{const l=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.gutter.width,track:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.track.width}}),h=e.computed(()=>k.value.filter(l=>!d.value.includes(l.id)).map((l,r)=>{const a=(s.value.maxRadius-g.value.track)/ye.value/2*(1+r),o=s.value.centerY-a;return{percentage:l.percentage||0,...l,labelY:o,radius:a,path:be(a,l.percentage||0)}}));function be(l,r){const a=2*Math.PI*l,o=a*.75,c=`${o} ${a}`,w=o*(1-r/100);return{bgDashArray:`${o} ${a}`,bgDashOffset:0,dashArray:c,dashOffset:w,fullOffset:0,active:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-Bw9yF1Ws.cjs"),ae=require("./useResponsive-DQmBAoBf.cjs"),$e=require("./Title-DV4IpbZv.cjs"),oe=require("./usePrinter-O9uCoI6k.cjs"),xe=require("./Legend-CqHSKd8f.cjs"),Be=require("./DataTable-CpuMdjPX.cjs"),Te=require("./Tooltip-De6uq1YK.cjs"),Se=require("./vue-ui-skeleton-1LYIEAgE.cjs"),Pe=require("./vue-ui-accordion-B7WLy1Jg.cjs"),re=require("./useNestedProp-CuyRUIUu.cjs"),Oe=require("./PackageVersion-DkyZc28_.cjs"),Ne=require("./PenAndPaper-DU2wA7cg.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Ve=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Fe=["id"],Ie=["xmlns","viewBox"],Ee=["width","height"],Re=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Me=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Le=["id"],ze=["stdDeviation"],De=["filter"],qe=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],Ue=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],Ye={key:2},Xe=["onMouseenter"],Ge=["x","y","font-size","fill","font-weight"],He={key:5,class:"vue-data-ui-watermark"},je=["onClick"],We=["innerHTML"],Je={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ne,{expose:ue,emit:se}){const{vue_ui_onion:ie}=u.useConfig(),f=ne,C=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(u.createUid()),ce=e.ref(null),I=e.ref(0),$=e.ref(!1),S=e.ref(""),d=e.ref([]),b=e.ref(null),E=e.ref(null),R=e.ref(null),M=e.ref(null),L=e.ref(null),z=e.ref(0),D=e.ref(0),q=e.ref(0),t=e.computed({get:()=>G(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:U,keepUserOptionState:Y}=_e.useUserOptionState({config:t.value}),{svgRef:X}=Ve.useChartAccessibility({config:t.value.style.chart.title});function G(){const l=re.useNestedProp({userConfig:f.config,defaultConfig:ie});return l.theme?{...re.useNestedProp({userConfig:u.themes.vue_ui_onion[l.theme]||f.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>f.config,l=>{t.value=G(),P.value=!t.value.userOptions.showOnChartHover,K(),z.value+=1,D.value+=1,q.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:H,isImaging:j,generatePdf:W,generateImage:J}=oe.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion",options:t.value.userOptions.print}),de=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ve=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),v=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(()=>{K()});function K(){if(u.objectIsEmpty(f.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=ae.throttle(()=>{const{width:a,height:o}=ae.useResponsive({chart:b.value,title:t.value.style.chart.title.text?E.value:null,legend:t.value.style.chart.legend.show?R.value:null,source:M.value,noTitle:L.value});requestAnimationFrame(()=>{n.value.width=a,n.value.height=o,n.value.padding.top=Math.max(a,o)*.125,n.value.padding.right=Math.max(a,o)*.125,n.value.padding.bottom=Math.max(a,o)*.125,n.value.padding.left=Math.max(a,o)*.125,n.value.minRadius=Math.min(a,o)*.125})});x.value=new ResizeObserver(r),x.value.observe(b.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(f.dataset.forEach((l,r)=>{[null,void 0].includes(l.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(l.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),f.dataset.map((l,r)=>{const a=`onion_serie_${r}_${m.value}`;return{...l,percentage:l.percentage||0,targetPercentage:l.percentage||0,color:u.convertColorToHex(l.color)||ve.value[r]||u.palette[r],id:a,shape:"circle",opacity:d.value.includes(a)?.5:1,absoluteIndex:r,segregate:()=>Q(a),isSegregated:d.value.includes(a)}}))),k=e.ref(i.value),he=e.computed(()=>t.value.useStartAnimation),pe=e.ref(null),fe=e.computed(()=>Math.max(...i.value.map(l=>l.percentage))),O=e.ref(!1);e.watch(()=>i.value,ge,{immediate:!0});function ge(){if(he.value&&!O.value){let r=function(){l>=fe.value?(cancelAnimationFrame(pe.value),k.value=i.value,O.value=!0):(k.value=i.value.map(a=>({...a,percentage:l<a.targetPercentage?l:a.targetPercentage})),l+=1,requestAnimationFrame(r),O.value=!0)};k.value=i.value.map(a=>({...a,percentage:0}));let l=0;r()}else k.value=i.value}const me=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":""})),ye=e.computed(()=>i.value.filter(l=>!d.value.includes(l.id)).length),g=e.computed(()=>{const l=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.gutter.width,track:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.track.width}}),h=e.computed(()=>k.value.filter(l=>!d.value.includes(l.id)).map((l,r)=>{const a=(s.value.maxRadius-g.value.track)/ye.value/2*(1+r),o=s.value.centerY-a;return{percentage:l.percentage||0,...l,labelY:o,radius:a,path:be(a,l.percentage||0)}}));function be(l,r){const a=2*Math.PI*l,o=a*.75,c=`${o} ${a}`,w=o*(1-r/100);return{bgDashArray:`${o} ${a}`,bgDashOffset:0,dashArray:c,dashOffset:w,fullOffset:0,active:`
2
2
  M ${s.value.centerX},${s.value.centerY-l}
3
3
  A ${l},${l} 0 1 1
4
4
  ${s.value.centerX+l*Math.cos(Math.PI*3/4)},${s.value.centerY+l*Math.sin(Math.PI*3/4)}
@@ -1,16 +1,16 @@
1
1
  import { computed as h, ref as r, watch as we, onMounted as Xe, onBeforeUnmount as Ge, createElementBlock as u, openBlock as n, unref as i, normalizeStyle as B, normalizeClass as U, createBlock as C, createCommentVNode as g, createElementVNode as _, createVNode as $e, createSlots as Ee, withCtx as f, renderSlot as d, normalizeProps as O, guardReactiveProps as P, Fragment as M, renderList as N, toDisplayString as I, createTextVNode as He, nextTick as We } from "vue";
2
- import { u as je, c as qe, t as Je, p as Ce, a as Ke, b as Qe, o as Ze, e as K, d as et, X as tt, f as R, i as Q, x as xe, q as at, r as lt, y as ot } from "./index-9ZicrZWM.js";
2
+ import { u as je, c as qe, t as Je, p as Ce, a as Ke, b as Qe, o as Ze, e as K, d as et, X as tt, f as R, i as Q, x as xe, q as at, r as lt, y as ot } from "./index-CeGGP5OF.js";
3
3
  import { t as st, u as nt } from "./useResponsive-Cw4oZ8sQ.js";
4
- import { _ as rt } from "./Title-CGY0WlAI.js";
5
- import { u as ut, U as it } from "./usePrinter-D7IXLE53.js";
6
- import { L as ct } from "./Legend-BxZxsJCp.js";
7
- import { D as dt } from "./DataTable-CaUgku7o.js";
8
- import { _ as vt } from "./Tooltip-BfEhZz9k.js";
9
- import ht from "./vue-ui-skeleton-BjminQzl.js";
10
- import ft from "./vue-ui-accordion-62KnRfCb.js";
11
- import { u as Te } from "./useNestedProp-s1XZrtPS.js";
12
- import { _ as gt } from "./PackageVersion-BEE_4baV.js";
13
- import { _ as pt } from "./PenAndPaper-B3WdOAcZ.js";
4
+ import { _ as rt } from "./Title-DmtXFzpc.js";
5
+ import { u as ut, U as it } from "./usePrinter-Ox_AUldH.js";
6
+ import { L as ct } from "./Legend-BQ5HGf8B.js";
7
+ import { D as dt } from "./DataTable-Cuky8ZpI.js";
8
+ import { _ as vt } from "./Tooltip-BMaBMPpZ.js";
9
+ import ht from "./vue-ui-skeleton-CpGgeJbB.js";
10
+ import ft from "./vue-ui-accordion-B5Gs-td_.js";
11
+ import { u as Te } from "./useNestedProp-CD9pbB7F.js";
12
+ import { _ as gt } from "./PackageVersion-DJo_CKR-.js";
13
+ import { _ as pt } from "./PenAndPaper-DK3Wbwoz.js";
14
14
  import { u as yt } from "./useUserOptionState-BIvW1Kz7.js";
15
15
  import { u as mt } from "./useChartAccessibility-BWojgys7.js";
16
16
  import { _ as bt } from "./_plugin-vue_export-helper-CHgC5LLL.js";