vue-data-ui 2.4.54 → 2.4.55

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 (151) hide show
  1. package/dist/{Arrow-DeKmbj7B.js → Arrow-D9oPJhO0.js} +1 -1
  2. package/dist/{Arrow-B10uy-UU.cjs → Arrow-Lu-rJXGl.cjs} +1 -1
  3. package/dist/{BaseIcon-DtUsvREa.cjs → BaseIcon-DxRKjbz1.cjs} +1 -1
  4. package/dist/{BaseIcon-Ca67-Cyv.js → BaseIcon-mHeKnX4-.js} +1 -1
  5. package/dist/{DataTable-BgiV2CfC.js → DataTable-D8MTezlM.js} +2 -2
  6. package/dist/{DataTable-CwiudM8v.cjs → DataTable-rMMvio1U.cjs} +1 -1
  7. package/dist/{Legend-TTzHdVeD.cjs → Legend-Ba34oTdO.cjs} +1 -1
  8. package/dist/{Legend-C1rLFGjN.js → Legend-wr5XLSfL.js} +1 -1
  9. package/dist/{PackageVersion-B_ULr99C.cjs → PackageVersion-BJi2ywG9.cjs} +1 -1
  10. package/dist/{PackageVersion-Bp3Bq9Jn.js → PackageVersion-xnKIqody.js} +1 -1
  11. package/dist/{PenAndPaper-DFNDy1y9.cjs → PenAndPaper-CX6N7FR7.cjs} +1 -1
  12. package/dist/{PenAndPaper-Cu0Ae0MN.js → PenAndPaper-iek0aH4r.js} +3 -3
  13. package/dist/{Shape-GWT6Hhcc.cjs → Shape-9v-w5i6N.cjs} +1 -1
  14. package/dist/{Shape-B_GK3n6y.js → Shape-B_lWjwmP.js} +1 -1
  15. package/dist/{Slicer-DyNqrpR4.cjs → Slicer--m1nOwbO.cjs} +1 -1
  16. package/dist/{Slicer-Bi4zZd-A.js → Slicer-Bwg4WzZf.js} +2 -2
  17. package/dist/{Title-Z93_y2gr.cjs → Title-BWhYDGb-.cjs} +1 -1
  18. package/dist/{Title-DPlURQtx.js → Title-BecmraNn.js} +1 -1
  19. package/dist/{Tooltip-C7wb_p0L.js → Tooltip-BZYApG0d.js} +1 -1
  20. package/dist/{Tooltip-DVfgJ6mM.cjs → Tooltip-cPxZzSgr.cjs} +1 -1
  21. package/dist/{index-BdlNqn9B.cjs → index-DGcOW0vL.cjs} +1 -1
  22. package/dist/{index-DH1CMY7m.js → index-Dhlyke5j.js} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/{useNestedProp-DDvMHRIf.cjs → useNestedProp-C9KmUVBy.cjs} +1 -1
  25. package/dist/{useNestedProp-DBnFzAfW.js → useNestedProp-D9eTQKze.js} +1 -1
  26. package/dist/{usePrinter-C0N1CiBZ.js → usePrinter-BnBk8gnl.js} +1 -1
  27. package/dist/{usePrinter-DtSijS1B.cjs → usePrinter-DpEuGyLP.cjs} +1 -1
  28. package/dist/{vue-data-ui-ByVHf_kl.cjs → vue-data-ui-CGGZHtx3.cjs} +1 -1
  29. package/dist/{vue-data-ui-CXxSOk_7.js → vue-data-ui-aSR5-7gp.js} +60 -60
  30. package/dist/vue-data-ui.cjs +1 -1
  31. package/dist/vue-data-ui.js +1 -1
  32. package/dist/{vue-ui-3d-bar-CVe5jYPi.js → vue-ui-3d-bar-D9pXx9fJ.js} +9 -9
  33. package/dist/{vue-ui-3d-bar-B7WLQ4Xw.cjs → vue-ui-3d-bar-Dm2wnS6e.cjs} +1 -1
  34. package/dist/{vue-ui-accordion-azKgDbn4.js → vue-ui-accordion-CGpOsWNN.js} +3 -3
  35. package/dist/{vue-ui-accordion-Dm8myRhk.cjs → vue-ui-accordion-mtZIFAv9.cjs} +1 -1
  36. package/dist/{vue-ui-age-pyramid-BLq5EYnh.cjs → vue-ui-age-pyramid-BcMERmA5.cjs} +1 -1
  37. package/dist/{vue-ui-age-pyramid-BW4_XPjw.js → vue-ui-age-pyramid-dbX4WaaY.js} +10 -10
  38. package/dist/{vue-ui-annotator-BIiP8tfh.cjs → vue-ui-annotator-CY-rCEDB.cjs} +1 -1
  39. package/dist/{vue-ui-annotator-BXNCscLc.js → vue-ui-annotator-DfRkh1D_.js} +1 -1
  40. package/dist/{vue-ui-bullet-zqDSLDqP.js → vue-ui-bullet-CUoiQcb5.js} +8 -8
  41. package/dist/{vue-ui-bullet-oszrU2rQ.cjs → vue-ui-bullet-jsXAmYsX.cjs} +1 -1
  42. package/dist/{vue-ui-candlestick-EY9e1UXf.cjs → vue-ui-candlestick-BD58hsql.cjs} +1 -1
  43. package/dist/{vue-ui-candlestick-DlhrXggi.js → vue-ui-candlestick-BLIICgdz.js} +11 -11
  44. package/dist/{vue-ui-carousel-table-DpN88ZNk.cjs → vue-ui-carousel-table-CCmB_BJ7.cjs} +1 -1
  45. package/dist/{vue-ui-carousel-table-7w6OlJGJ.js → vue-ui-carousel-table-NUliqwxA.js} +4 -4
  46. package/dist/{vue-ui-chestnut-jHgtDbmU.js → vue-ui-chestnut-DIPBJ5D2.js} +8 -8
  47. package/dist/{vue-ui-chestnut-DUceRFNk.cjs → vue-ui-chestnut-vivMozHy.cjs} +1 -1
  48. package/dist/{vue-ui-cursor-Cq1HIpIa.cjs → vue-ui-cursor-Cgv_2p2T.cjs} +1 -1
  49. package/dist/{vue-ui-cursor-Dkndm06c.js → vue-ui-cursor-CzLtzn7N.js} +2 -2
  50. package/dist/{vue-ui-dashboard-NZKZnvIp.cjs → vue-ui-dashboard-CtlrjFxl.cjs} +1 -1
  51. package/dist/{vue-ui-dashboard-B6_Xkd1u.js → vue-ui-dashboard-DqZVcLlQ.js} +2 -2
  52. package/dist/{vue-ui-digits-ZFMtrfsc.js → vue-ui-digits-CGFznMkY.js} +2 -2
  53. package/dist/{vue-ui-digits-DHGYQ4mk.cjs → vue-ui-digits-e1HQVXb9.cjs} +1 -1
  54. package/dist/{vue-ui-donut-D3Yw-xVC.js → vue-ui-donut-DmLq2iWK.js} +16 -16
  55. package/dist/{vue-ui-donut-evolution-CzQo7feu.cjs → vue-ui-donut-evolution-4odFZbUM.cjs} +1 -1
  56. package/dist/{vue-ui-donut-evolution-kzFgoErC.js → vue-ui-donut-evolution-DpollzkH.js} +11 -11
  57. package/dist/vue-ui-donut-z2eOcEI5.cjs +1 -0
  58. package/dist/{vue-ui-dumbbell-LcWHXAvv.js → vue-ui-dumbbell-DLr4Lh3u.js} +10 -10
  59. package/dist/{vue-ui-dumbbell-qBYKyZL0.cjs → vue-ui-dumbbell-i7E-B6zN.cjs} +1 -1
  60. package/dist/{vue-ui-flow-RQrUlBZx.cjs → vue-ui-flow-BuYhmRed.cjs} +1 -1
  61. package/dist/{vue-ui-flow-CM2CzG9l.js → vue-ui-flow-CosxAYPJ.js} +9 -9
  62. package/dist/{vue-ui-funnel-CBZO8HbM.cjs → vue-ui-funnel-BNPISgC0.cjs} +1 -1
  63. package/dist/{vue-ui-funnel-oJgYKMnU.js → vue-ui-funnel-C_2YAtFj.js} +8 -8
  64. package/dist/{vue-ui-galaxy-C2Y_DDJB.js → vue-ui-galaxy-D1cWyHG9.js} +11 -11
  65. package/dist/{vue-ui-galaxy-BCVy8Fif.cjs → vue-ui-galaxy-DMOx2Le7.cjs} +1 -1
  66. package/dist/{vue-ui-gauge--Y59kiK4.js → vue-ui-gauge-Dnq0t_eH.js} +7 -7
  67. package/dist/{vue-ui-gauge-DdCG-E2p.cjs → vue-ui-gauge-Dw7QvZei.cjs} +1 -1
  68. package/dist/{vue-ui-gizmo-Rb4ZXTmW.cjs → vue-ui-gizmo-DcT9tTS-.cjs} +1 -1
  69. package/dist/{vue-ui-gizmo-g2JoyNcP.js → vue-ui-gizmo-vHQVGdpR.js} +3 -3
  70. package/dist/{vue-ui-heatmap-CSW7Sckl.js → vue-ui-heatmap-CtxQI5Mq.js} +10 -10
  71. package/dist/{vue-ui-heatmap-CuhK1-fD.cjs → vue-ui-heatmap-D-r7qdj0.cjs} +1 -1
  72. package/dist/{vue-ui-history-plot-3I1ZczPE.cjs → vue-ui-history-plot-B8pP20QN.cjs} +1 -1
  73. package/dist/{vue-ui-history-plot-BUh8mFcS.js → vue-ui-history-plot-BjcPvcaK.js} +11 -11
  74. package/dist/{vue-ui-kpi-BokZ78tj.cjs → vue-ui-kpi-BPwU5pay.cjs} +1 -1
  75. package/dist/{vue-ui-kpi-DqkHOwnT.js → vue-ui-kpi-BjuKXuQM.js} +3 -3
  76. package/dist/{vue-ui-mini-loader-DgRUssIh.cjs → vue-ui-mini-loader-DE2NXywp.cjs} +1 -1
  77. package/dist/{vue-ui-mini-loader-OgezY5bJ.js → vue-ui-mini-loader-DZYw7bD6.js} +2 -2
  78. package/dist/{vue-ui-molecule-DPme2DL7.js → vue-ui-molecule-A3yHt8cl.js} +11 -11
  79. package/dist/{vue-ui-molecule-BjZEWe-M.cjs → vue-ui-molecule-B8I4iuBQ.cjs} +1 -1
  80. package/dist/{vue-ui-mood-radar-qn-DhbDt.cjs → vue-ui-mood-radar-BKtVVOZz.cjs} +1 -1
  81. package/dist/{vue-ui-mood-radar-C3dVMbCW.js → vue-ui-mood-radar-Dh1qbcXz.js} +11 -11
  82. package/dist/{vue-ui-nested-donuts-Cz04Q0zc.cjs → vue-ui-nested-donuts-B5ixdGsx.cjs} +1 -1
  83. package/dist/{vue-ui-nested-donuts-B96zg3ew.js → vue-ui-nested-donuts-DPuIU4IX.js} +11 -11
  84. package/dist/{vue-ui-onion-CVXrJUcF.cjs → vue-ui-onion-BTMaTU2a.cjs} +1 -1
  85. package/dist/{vue-ui-onion-DqtSzdyq.js → vue-ui-onion-BgcJBzxI.js} +11 -11
  86. package/dist/{vue-ui-parallel-coordinate-plot-BSrrIy_u.cjs → vue-ui-parallel-coordinate-plot-Cye2V8MQ.cjs} +1 -1
  87. package/dist/{vue-ui-parallel-coordinate-plot-uPB5LMUG.js → vue-ui-parallel-coordinate-plot-Ksh3Tuvx.js} +12 -12
  88. package/dist/{vue-ui-quadrant-B4Xp90go.js → vue-ui-quadrant-DGBXeeOe.js} +12 -12
  89. package/dist/{vue-ui-quadrant-DZu-EjEj.cjs → vue-ui-quadrant-DOet5Q47.cjs} +1 -1
  90. package/dist/{vue-ui-quick-chart-CmdJuhrV.js → vue-ui-quick-chart-DQcck_x6.js} +53 -54
  91. package/dist/{vue-ui-quick-chart-BbmneGkd.cjs → vue-ui-quick-chart-DhCA-7B5.cjs} +5 -5
  92. package/dist/{vue-ui-radar-C0fJVGMX.js → vue-ui-radar-CI5egNer.js} +12 -12
  93. package/dist/{vue-ui-radar-Uw9jHF-A.cjs → vue-ui-radar-qk20LKHr.cjs} +1 -1
  94. package/dist/{vue-ui-rating--WDHkylh.cjs → vue-ui-rating-CYhvKLSi.cjs} +1 -1
  95. package/dist/{vue-ui-rating-m1AvXMFo.js → vue-ui-rating-Ch2PSMeW.js} +2 -2
  96. package/dist/{vue-ui-relation-circle-BnGSpsh3.js → vue-ui-relation-circle-G6KC4zs0.js} +7 -7
  97. package/dist/{vue-ui-relation-circle-46aZfLDY.cjs → vue-ui-relation-circle-t-WDgqtA.cjs} +1 -1
  98. package/dist/{vue-ui-rings-C5uc13Mz.cjs → vue-ui-rings-DxpkXXwJ.cjs} +1 -1
  99. package/dist/{vue-ui-rings-BvwB9Pgy.js → vue-ui-rings-NIIfGve4.js} +11 -11
  100. package/dist/{vue-ui-scatter-CoW5nT_m.js → vue-ui-scatter-BqxcKjb2.js} +12 -12
  101. package/dist/{vue-ui-scatter-BAxQgdPf.cjs → vue-ui-scatter-DynxMn7l.cjs} +1 -1
  102. package/dist/{vue-ui-screenshot-CoBL8VvU.cjs → vue-ui-screenshot-BUP9G_uK.cjs} +1 -1
  103. package/dist/{vue-ui-screenshot-C_s7_D5X.js → vue-ui-screenshot-DreZMmrO.js} +1 -1
  104. package/dist/{vue-ui-skeleton-DBo32QSA.js → vue-ui-skeleton-DQqwDUqP.js} +3 -3
  105. package/dist/{vue-ui-skeleton-Czl8iTZQ.cjs → vue-ui-skeleton-D_lU-hWK.cjs} +1 -1
  106. package/dist/{vue-ui-smiley-D-FU6RGS.cjs → vue-ui-smiley-AGwF1X7u.cjs} +1 -1
  107. package/dist/{vue-ui-smiley-BQisdetv.js → vue-ui-smiley-CdmO39JE.js} +2 -2
  108. package/dist/{vue-ui-spark-trend-DMwCqGul.js → vue-ui-spark-trend-BUx5YwEZ.js} +5 -5
  109. package/dist/{vue-ui-spark-trend-C6d6P8_s.cjs → vue-ui-spark-trend-DD1s6Thz.cjs} +1 -1
  110. package/dist/{vue-ui-sparkbar-DHpoNSzN.js → vue-ui-sparkbar-KZd6YQwQ.js} +4 -4
  111. package/dist/{vue-ui-sparkbar-CR3IzauM.cjs → vue-ui-sparkbar-mlrF_QEO.cjs} +1 -1
  112. package/dist/{vue-ui-sparkgauge-CeXq_PnB.cjs → vue-ui-sparkgauge-B4J8ZYzs.cjs} +1 -1
  113. package/dist/{vue-ui-sparkgauge-CC1Eglzs.js → vue-ui-sparkgauge-Db-d9x9r.js} +4 -4
  114. package/dist/{vue-ui-sparkhistogram-xIK7lFrl.js → vue-ui-sparkhistogram-B61JDza9.js} +5 -5
  115. package/dist/{vue-ui-sparkhistogram-X9_zqOZb.cjs → vue-ui-sparkhistogram-DzJ5NNi9.cjs} +1 -1
  116. package/dist/{vue-ui-sparkline-DgEXD0bt.js → vue-ui-sparkline-P6ubVgp0.js} +4 -4
  117. package/dist/{vue-ui-sparkline-z8F4XzTG.cjs → vue-ui-sparkline-S6HehQ0a.cjs} +1 -1
  118. package/dist/{vue-ui-sparkstackbar-wjQ7KHJm.cjs → vue-ui-sparkstackbar-BDBqoeJQ.cjs} +1 -1
  119. package/dist/{vue-ui-sparkstackbar-Co449w2-.js → vue-ui-sparkstackbar-DKtOqh-Y.js} +5 -5
  120. package/dist/{vue-ui-stackbar-C9Q0eM4s.cjs → vue-ui-stackbar-DCCcEgQZ.cjs} +1 -1
  121. package/dist/{vue-ui-stackbar-BCjjWZUq.js → vue-ui-stackbar-WShCS9A1.js} +12 -12
  122. package/dist/{vue-ui-strip-plot-D9nUWA5a.js → vue-ui-strip-plot-Bq3u8k2l.js} +11 -11
  123. package/dist/{vue-ui-strip-plot-SbdQQDJD.cjs → vue-ui-strip-plot-DH4LQTfB.cjs} +1 -1
  124. package/dist/{vue-ui-table-4Zx9e6xR.cjs → vue-ui-table-aV4pHrWD.cjs} +1 -1
  125. package/dist/{vue-ui-table-heatmap-CQAwn6-B.cjs → vue-ui-table-heatmap-CruECEYA.cjs} +1 -1
  126. package/dist/{vue-ui-table-heatmap-Dojf1B9-.js → vue-ui-table-heatmap-DsdyE14x.js} +4 -4
  127. package/dist/{vue-ui-table-Df6cgK1g.js → vue-ui-table-sJN2rS51.js} +1 -1
  128. package/dist/{vue-ui-table-sparkline-WSmyQwR2.js → vue-ui-table-sparkline-BlUe2QFV.js} +5 -5
  129. package/dist/{vue-ui-table-sparkline-DLd74n0T.cjs → vue-ui-table-sparkline-CcsNg6th.cjs} +1 -1
  130. package/dist/{vue-ui-thermometer-El0SBOq3.js → vue-ui-thermometer-80aa72_6.js} +7 -7
  131. package/dist/{vue-ui-thermometer-9gklDJUj.cjs → vue-ui-thermometer-ButIh820.cjs} +1 -1
  132. package/dist/{vue-ui-timer-DDuXYQZM.js → vue-ui-timer-CuUSpISM.js} +5 -5
  133. package/dist/{vue-ui-timer-BBg7_SOY.cjs → vue-ui-timer-Dk4I7cRn.cjs} +1 -1
  134. package/dist/{vue-ui-tiremarks-BIyXvipR.cjs → vue-ui-tiremarks-BsYfeNCN.cjs} +1 -1
  135. package/dist/{vue-ui-tiremarks-BfIV-QDF.js → vue-ui-tiremarks-CQ98xHZ5.js} +7 -7
  136. package/dist/{vue-ui-treemap-DpshmJwJ.cjs → vue-ui-treemap-CHXb8mBG.cjs} +1 -1
  137. package/dist/{vue-ui-treemap-BXGSdZ7D.js → vue-ui-treemap-s1nZAhAS.js} +11 -11
  138. package/dist/{vue-ui-vertical-bar-CWCfyMLl.js → vue-ui-vertical-bar-Dd306Z10.js} +11 -11
  139. package/dist/{vue-ui-vertical-bar-CKwjHdCp.cjs → vue-ui-vertical-bar-iZWowEik.cjs} +1 -1
  140. package/dist/{vue-ui-waffle-IvkVZcab.cjs → vue-ui-waffle-BJgSuNVY.cjs} +1 -1
  141. package/dist/{vue-ui-waffle-qrwD0df7.js → vue-ui-waffle-CQfOCZjf.js} +19 -19
  142. package/dist/{vue-ui-wheel-BVzCac3i.js → vue-ui-wheel-DB-4Rn84.js} +7 -7
  143. package/dist/{vue-ui-wheel-DhwjPquK.cjs → vue-ui-wheel-s8UTbo9G.cjs} +1 -1
  144. package/dist/{vue-ui-word-cloud-CMibfjKu.js → vue-ui-word-cloud-C-l2Z3Dd.js} +10 -10
  145. package/dist/{vue-ui-word-cloud-DNXgz7Aj.cjs → vue-ui-word-cloud-DvfOJe4M.cjs} +1 -1
  146. package/dist/{vue-ui-xy-DPybwkIx.cjs → vue-ui-xy-D1Nkk2Gp.cjs} +1 -1
  147. package/dist/{vue-ui-xy-DRPrnIDh.js → vue-ui-xy-P_VLOaMg.js} +14 -14
  148. package/dist/{vue-ui-xy-canvas-DmhWHa44.js → vue-ui-xy-canvas-BwNEs-cY.js} +11 -11
  149. package/dist/{vue-ui-xy-canvas-prkO7IV3.cjs → vue-ui-xy-canvas-CIKl9AXf.cjs} +1 -1
  150. package/package.json +1 -1
  151. package/dist/vue-ui-donut-DFS8YDvi.cjs +0 -1
@@ -1,17 +1,17 @@
1
1
  import { computed as p, ref as u, watch as He, onMounted as Ye, onBeforeUnmount as je, openBlock as r, createElementBlock as n, normalizeClass as z, normalizeStyle as W, unref as c, createBlock as _, createCommentVNode as h, createSlots as qe, withCtx as y, renderSlot as m, normalizeProps as M, guardReactiveProps as R, createVNode as ee, createElementVNode as $, Fragment as P, renderList as T, toDisplayString as U, createTextVNode as Te, nextTick as Je } from "vue";
2
- import { u as Ke, c as Qe, t as Ze, a as et, p as x, o as tt, e as F, b as at, g as xe, d as Oe, O as Ae, v as ot, i as Ne, f as V, X as lt, s as te, w as rt, P as Se, x as st, y as nt, q as ut, r as it } from "./index-DH1CMY7m.js";
2
+ import { u as Ke, c as Qe, t as Ze, a as et, p as x, o as tt, e as F, b as at, g as xe, d as Oe, O as Ae, v as ot, i as Ne, f as V, X as lt, s as te, w as rt, P as Se, x as st, y as nt, q as ut, r as it } from "./index-Dhlyke5j.js";
3
3
  import { t as ct, u as dt } from "./useResponsive-CoxXLe23.js";
4
- import { _ as vt } from "./Title-DPlURQtx.js";
5
- import { u as pt, U as ht } from "./usePrinter-C0N1CiBZ.js";
6
- import { _ as gt } from "./Tooltip-C7wb_p0L.js";
7
- import ft from "./vue-ui-sparkbar-DHpoNSzN.js";
8
- import { L as yt } from "./Legend-C1rLFGjN.js";
9
- import { D as mt } from "./DataTable-BgiV2CfC.js";
10
- import bt from "./vue-ui-skeleton-DBo32QSA.js";
11
- import kt from "./vue-ui-accordion-azKgDbn4.js";
12
- import { u as Fe } from "./useNestedProp-DBnFzAfW.js";
13
- import { _ as Ct } from "./PackageVersion-Bp3Bq9Jn.js";
14
- import { P as wt } from "./PenAndPaper-Cu0Ae0MN.js";
4
+ import { _ as vt } from "./Title-BecmraNn.js";
5
+ import { u as pt, U as ht } from "./usePrinter-BnBk8gnl.js";
6
+ import { _ as gt } from "./Tooltip-BZYApG0d.js";
7
+ import ft from "./vue-ui-sparkbar-KZd6YQwQ.js";
8
+ import { L as yt } from "./Legend-wr5XLSfL.js";
9
+ import { D as mt } from "./DataTable-D8MTezlM.js";
10
+ import bt from "./vue-ui-skeleton-DQqwDUqP.js";
11
+ import kt from "./vue-ui-accordion-CGpOsWNN.js";
12
+ import { u as Fe } from "./useNestedProp-D9eTQKze.js";
13
+ import { _ as Ct } from "./PackageVersion-xnKIqody.js";
14
+ import { P as wt } from "./PenAndPaper-iek0aH4r.js";
15
15
  import { u as _t } from "./useUserOptionState-BIvW1Kz7.js";
16
16
  import { _ as $t } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
17
  const Pt = ["id"], Tt = ["xmlns", "viewBox"], xt = ["id"], Ot = ["stop-color"], At = ["stop-color"], Nt = { key: 0 }, St = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ft = { key: 0 }, It = ["d", "stroke", "stroke-width"], Lt = ["d", "stroke", "stroke-width"], zt = { key: 1 }, Mt = ["x", "y", "text-anchor", "font-size", "fill", "onMouseenter"], Rt = ["points", "stroke", "stroke-width"], Ut = ["points", "stroke", "stroke-width", "fill"], Vt = { key: 2 }, Et = ["cx", "cy", "fill", "r", "stroke"], Bt = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BdlNqn9B.cjs"),ne=require("./useResponsive-BJ7DTGpm.cjs"),we=require("./Title-Z93_y2gr.cjs"),se=require("./usePrinter-DtSijS1B.cjs"),Be=require("./Tooltip-DVfgJ6mM.cjs"),Pe=require("./vue-ui-sparkbar-CR3IzauM.cjs"),_e=require("./Legend-TTzHdVeD.cjs"),$e=require("./DataTable-CwiudM8v.cjs"),xe=require("./vue-ui-skeleton-Czl8iTZQ.cjs"),Ne=require("./vue-ui-accordion-Dm8myRhk.cjs"),ue=require("./useNestedProp-DDvMHRIf.cjs"),Te=require("./PackageVersion-B_ULr99C.cjs"),Se=require("./PenAndPaper-DFNDy1y9.cjs"),Ee=require("./useUserOptionState-BgepsfED.cjs"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Oe=["id"],Ae=["xmlns","viewBox"],Fe=["id"],Le=["stop-color"],ze=["stop-color"],Ie={key:0},Re=["x1","y1","x2","y2","stroke","stroke-width"],qe={key:0},Me=["d","stroke","stroke-width"],Ue=["d","stroke","stroke-width"],De={key:1},Ge=["x","y","text-anchor","font-size","fill","onMouseenter"],We=["points","stroke","stroke-width"],He=["points","stroke","stroke-width","fill"],Xe={key:2},je=["cx","cy","fill","r","stroke"],Ye={key:5,class:"vue-data-ui-watermark"},Je=["onClick"],Ke={key:0,style:{"max-width":"200px",margin:"0 auto"}},Qe={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ie,{expose:ce,emit:de}){const d=ie,{vue_ui_radar:ve}=n.useConfig(),C=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),f=e.ref(n.createUid()),pe=e.ref(null),x=e.ref(!1),N=e.ref(""),L=e.ref(0),m=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(null),M=e.ref(0),U=e.ref(0),D=e.ref(0),t=e.computed({get:()=>H(),set:o=>o}),{userOptionsVisible:T,setUserOptionsVisibility:G,keepUserOptionState:W}=Ee.useUserOptionState({config:t.value});function H(){const o=ue.useNestedProp({userConfig:d.config,defaultConfig:ve});return o.theme?{...ue.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=H(),T.value=!t.value.showOnChartHover,X(),M.value+=1,U.value+=1,D.value+=1},{deep:!0});const B=e.ref(null);function X(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=ne.throttle(()=>{const{width:a,height:l}=ne.useResponsive({chart:m.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?I.value:null,source:R.value,noTitle:q.value});u.value.width=a,u.value.height=l});B.value=new ResizeObserver(o),B.value.observe(m.value.parentNode)}}e.onMounted(()=>{X()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:j,isImaging:Y,generatePdf:J,generateImage:K}=se.usePrinter({elementId:`vue-ui-radar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),ge=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Q=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),g=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),he=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),u=e.ref({height:312,width:512}),i=e.ref([]),w=e.ref(null),y=e.ref(!1);function Z(o){y.value=!0,i.value.includes(o)?(w.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{y.value=!1,w.value=null},500)):(i.value.push(o),setTimeout(()=>{y.value=!1},500)),de("selectLegend",k.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function fe(){return k.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${f.value}_${a}`,color:n.convertColorToHex(o.color)||Q.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>C.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Q.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${f.value}_${a}`,formatter:o.formatter||null})):[]),ee=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),te=e.computed(()=>p.value.length),S=e.computed(()=>Math.min(u.value.width,u.value.height)/3),oe=e.computed(()=>n.createPolygonPath({plot:{x:u.value.width/2,y:u.value.height/2},radius:S.value,sides:te.value,rotation:0})),me=e.computed(()=>{const o=[];for(let a=0;a<S.value;a+=S.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),h=e.computed(()=>oe.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>ye({centerX:u.value.width/2,centerY:u.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||ee.value)}));return{...o,...p.value[a],plots:l}}));function E({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>u.value.width/2&&(o+=12,l="start"),o<u.value.width/2&&(o-=12,l="end"),a>u.value.height/2&&(a+=20),a<u.value.height/2&&(a-=12),a===u.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function ye({centerX:o,centerY:a,apexX:l,apexY:r,proportion:s}){return{x:o+(l-o)*s,y:a+(r-a)*s}}const k=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||ee.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,s)=>r+s,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>Z(l),isSegregated:i.value.includes(l)}))}),ke=e.computed(()=>({cy:"radar-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),P=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...k.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((s,c)=>`${n.applyDataLabel(r.formatter,s,n.dataLabel({p:v.value[c].prefix,v:s,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(s/r.target)?"":n.dataLabel({v:s/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:a,config:l,colNames:o}}),_=e.ref(null),V=e.ref([]),O=e.ref(null);function be(o,a){V.value=[],_.value=a,x.value=!0;let l="";O.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let s=0;s<o.values.length;s+=1)i.value.includes(s)||V.value.push({name:v.value[s].name,value:o.values[s]/o.target*100,color:v.value[s].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[s].prefix??"",v:o.values[s],s:v.value[s].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function ae(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...k.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,et)=>[c.name,c.target,...c.values.flatMap(F=>[F,isNaN(F/c.target)?"":F/c.target*100])]),r=o.concat([a]).concat(l),s=n.createCsvContent(r);n.downloadCsv({csvContent:s,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const b=e.ref(!1);function Ce(o){b.value=o,L.value+=1}function le(){g.value.showTable=!g.value.showTable}function re(){g.value.showTooltip=!g.value.showTooltip}const $=e.ref(!1);function A(){$.value=!$.value}return ce({getData:fe,generatePdf:J,generateCsv:ae,generateImage:K,toggleTable:le,toggleTooltip:re,toggleAnnotator:A}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:m,id:`vue-ui-radar_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[3]||(a[3]=()=>e.unref(G)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(G)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Se.PenAndPaper,{key:0,parent:m.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:A},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ge.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:q,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(we._sfc_main,{key:`title_${M.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&C.value&&(e.unref(W)||e.unref(T))?(e.openBlock(),e.createBlock(se.UserOptions,{ref_key:"details",ref:pe,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(Y),isPrinting:e.unref(j),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:Ce,onGeneratePdf:e.unref(J),onGenerateCsv:ae,onGenerateImage:e.unref(K),onToggleTable:le,onToggleTooltip:re,onToggleAnnotator:A,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(T)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Te._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,Le),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,ze)],8,Fe))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.width/2,y1:u.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Re))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:u.value.width/2,y:u.value.height/2},radius:l,sides:te.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Me))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:oe.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,Ue),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:E(l).x,y:E(l).y,"text-anchor":E(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:s=>be(l,r),onMouseleave:a[0]||(a[0]=s=>{x.value=!1,_.value=null})},e.toDisplayString(l.name),41,Ge))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(s=>s.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===r&&t.value.useCssAnimation})},null,10,We)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(s=>s.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${f.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===r&&t.value.useCssAnimation})},null,10,He)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(s,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:_.value!==null&&_.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===c&&t.value.useCssAnimation})},null,10,je))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:u.value},void 0,!0)],14,Ae)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(j)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(_e.Legend,{key:`legend_${D.value}`,legendSet:k.value,config:ke.value,onClickMarker:a[1]||(a[1]=({i:l})=>Z(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,Je)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:R,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:g.value.showTooltip&&x.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:m.value,content:N.value,isFullscreen:b.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({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ke,[e.createVNode(Pe.default,{dataset:V.value,config:he.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isFullscreen","isCustom"]),C.value?(e.openBlock(),e.createBlock(Ne.default,{key:8,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock($e.DataTable,{key:`table_${U.value}`,colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>g.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Oe))}},Ze=Ve._export_sfc(Qe,[["__scopeId","data-v-921087d8"]]);exports.default=Ze;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DGcOW0vL.cjs"),ne=require("./useResponsive-BJ7DTGpm.cjs"),we=require("./Title-BWhYDGb-.cjs"),se=require("./usePrinter-DpEuGyLP.cjs"),Be=require("./Tooltip-cPxZzSgr.cjs"),Pe=require("./vue-ui-sparkbar-mlrF_QEO.cjs"),_e=require("./Legend-Ba34oTdO.cjs"),$e=require("./DataTable-rMMvio1U.cjs"),xe=require("./vue-ui-skeleton-D_lU-hWK.cjs"),Ne=require("./vue-ui-accordion-mtZIFAv9.cjs"),ue=require("./useNestedProp-C9KmUVBy.cjs"),Te=require("./PackageVersion-BJi2ywG9.cjs"),Se=require("./PenAndPaper-CX6N7FR7.cjs"),Ee=require("./useUserOptionState-BgepsfED.cjs"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Oe=["id"],Ae=["xmlns","viewBox"],Fe=["id"],Le=["stop-color"],ze=["stop-color"],Ie={key:0},Re=["x1","y1","x2","y2","stroke","stroke-width"],qe={key:0},Me=["d","stroke","stroke-width"],Ue=["d","stroke","stroke-width"],De={key:1},Ge=["x","y","text-anchor","font-size","fill","onMouseenter"],We=["points","stroke","stroke-width"],He=["points","stroke","stroke-width","fill"],Xe={key:2},je=["cx","cy","fill","r","stroke"],Ye={key:5,class:"vue-data-ui-watermark"},Je=["onClick"],Ke={key:0,style:{"max-width":"200px",margin:"0 auto"}},Qe={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ie,{expose:ce,emit:de}){const d=ie,{vue_ui_radar:ve}=n.useConfig(),C=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),f=e.ref(n.createUid()),pe=e.ref(null),x=e.ref(!1),N=e.ref(""),L=e.ref(0),m=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(null),M=e.ref(0),U=e.ref(0),D=e.ref(0),t=e.computed({get:()=>H(),set:o=>o}),{userOptionsVisible:T,setUserOptionsVisibility:G,keepUserOptionState:W}=Ee.useUserOptionState({config:t.value});function H(){const o=ue.useNestedProp({userConfig:d.config,defaultConfig:ve});return o.theme?{...ue.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=H(),T.value=!t.value.showOnChartHover,X(),M.value+=1,U.value+=1,D.value+=1},{deep:!0});const B=e.ref(null);function X(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=ne.throttle(()=>{const{width:a,height:l}=ne.useResponsive({chart:m.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?I.value:null,source:R.value,noTitle:q.value});u.value.width=a,u.value.height=l});B.value=new ResizeObserver(o),B.value.observe(m.value.parentNode)}}e.onMounted(()=>{X()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:j,isImaging:Y,generatePdf:J,generateImage:K}=se.usePrinter({elementId:`vue-ui-radar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),ge=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Q=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),g=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),he=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),u=e.ref({height:312,width:512}),i=e.ref([]),w=e.ref(null),y=e.ref(!1);function Z(o){y.value=!0,i.value.includes(o)?(w.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{y.value=!1,w.value=null},500)):(i.value.push(o),setTimeout(()=>{y.value=!1},500)),de("selectLegend",k.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function fe(){return k.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${f.value}_${a}`,color:n.convertColorToHex(o.color)||Q.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>C.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Q.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${f.value}_${a}`,formatter:o.formatter||null})):[]),ee=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),te=e.computed(()=>p.value.length),S=e.computed(()=>Math.min(u.value.width,u.value.height)/3),oe=e.computed(()=>n.createPolygonPath({plot:{x:u.value.width/2,y:u.value.height/2},radius:S.value,sides:te.value,rotation:0})),me=e.computed(()=>{const o=[];for(let a=0;a<S.value;a+=S.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),h=e.computed(()=>oe.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>ye({centerX:u.value.width/2,centerY:u.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||ee.value)}));return{...o,...p.value[a],plots:l}}));function E({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>u.value.width/2&&(o+=12,l="start"),o<u.value.width/2&&(o-=12,l="end"),a>u.value.height/2&&(a+=20),a<u.value.height/2&&(a-=12),a===u.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function ye({centerX:o,centerY:a,apexX:l,apexY:r,proportion:s}){return{x:o+(l-o)*s,y:a+(r-a)*s}}const k=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||ee.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,s)=>r+s,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>Z(l),isSegregated:i.value.includes(l)}))}),ke=e.computed(()=>({cy:"radar-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),P=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...k.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((s,c)=>`${n.applyDataLabel(r.formatter,s,n.dataLabel({p:v.value[c].prefix,v:s,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(s/r.target)?"":n.dataLabel({v:s/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:a,config:l,colNames:o}}),_=e.ref(null),V=e.ref([]),O=e.ref(null);function be(o,a){V.value=[],_.value=a,x.value=!0;let l="";O.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let s=0;s<o.values.length;s+=1)i.value.includes(s)||V.value.push({name:v.value[s].name,value:o.values[s]/o.target*100,color:v.value[s].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[s].prefix??"",v:o.values[s],s:v.value[s].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function ae(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...k.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,et)=>[c.name,c.target,...c.values.flatMap(F=>[F,isNaN(F/c.target)?"":F/c.target*100])]),r=o.concat([a]).concat(l),s=n.createCsvContent(r);n.downloadCsv({csvContent:s,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const b=e.ref(!1);function Ce(o){b.value=o,L.value+=1}function le(){g.value.showTable=!g.value.showTable}function re(){g.value.showTooltip=!g.value.showTooltip}const $=e.ref(!1);function A(){$.value=!$.value}return ce({getData:fe,generatePdf:J,generateCsv:ae,generateImage:K,toggleTable:le,toggleTooltip:re,toggleAnnotator:A}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:m,id:`vue-ui-radar_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[3]||(a[3]=()=>e.unref(G)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(G)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Se.PenAndPaper,{key:0,parent:m.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:A},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ge.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:q,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(we._sfc_main,{key:`title_${M.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&C.value&&(e.unref(W)||e.unref(T))?(e.openBlock(),e.createBlock(se.UserOptions,{ref_key:"details",ref:pe,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(Y),isPrinting:e.unref(j),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:Ce,onGeneratePdf:e.unref(J),onGenerateCsv:ae,onGenerateImage:e.unref(K),onToggleTable:le,onToggleTooltip:re,onToggleAnnotator:A,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(T)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Te._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,Le),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,ze)],8,Fe))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.width/2,y1:u.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Re))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:u.value.width/2,y:u.value.height/2},radius:l,sides:te.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Me))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:oe.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,Ue),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:E(l).x,y:E(l).y,"text-anchor":E(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:s=>be(l,r),onMouseleave:a[0]||(a[0]=s=>{x.value=!1,_.value=null})},e.toDisplayString(l.name),41,Ge))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(s=>s.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===r&&t.value.useCssAnimation})},null,10,We)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(s=>s.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${f.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===r&&t.value.useCssAnimation})},null,10,He)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(s,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:_.value!==null&&_.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===c&&t.value.useCssAnimation})},null,10,je))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:u.value},void 0,!0)],14,Ae)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(j)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(_e.Legend,{key:`legend_${D.value}`,legendSet:k.value,config:ke.value,onClickMarker:a[1]||(a[1]=({i:l})=>Z(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,Je)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:R,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:g.value.showTooltip&&x.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:m.value,content:N.value,isFullscreen:b.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({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ke,[e.createVNode(Pe.default,{dataset:V.value,config:he.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isFullscreen","isCustom"]),C.value?(e.openBlock(),e.createBlock(Ne.default,{key:8,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock($e.DataTable,{key:`table_${U.value}`,colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>g.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Oe))}},Ze=Ve._export_sfc(Qe,[["__scopeId","data-v-921087d8"]]);exports.default=Ze;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-BdlNqn9B.cjs"),L=require("./useNestedProp-DDvMHRIf.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},A=["src","height","width"],R=["xmlns","height","width"],X=["id"],j=["stop-color"],F=["stop-color"],I=["points","fill","stroke","stroke-width"],O=["src","alt","height","width","id"],Y=["xmlns","viewBox","height","id"],G=["id"],q=["stop-color"],U=["stop-color"],H=["points","fill","stroke"],K=["xmlns","height"],P=["onClick","onMouseenter","onKeyup"],T=["onMouseenter"],W={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(k,{expose:_,emit:S}){const i=k,{vue_ui_rating:z}=a.useConfig(),d=e.ref(a.createUid()),f=e.ref(!1),s=e.ref(void 0),y=e.ref([]),t=e.computed({get:()=>g(),set:o=>o});function g(){return L.useNestedProp({userConfig:i.config,defaultConfig:z})}e.watch(()=>i.config,o=>{t.value=g(),h()},{deep:!0});const w=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?N(i.dataset.rating):i.dataset.rating),B=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),r=e.ref(w.value),m=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function N(o){let n=0,l=0;for(const u in o){const V=parseInt(u),b=o[u];n+=V*b,l+=b}if(l===0)return 0;const v=n/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{h()});function h(){a.objectIsEmpty(i.dataset)&&a.error({componentName:"VueUiRating",type:"dataset"}),y.value=[];for(let o=t.value.from;o<=t.value.to;o+=1)y.value.push(o)}function p(o,n=!1){return o>s.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function x(o,n=!1){const l=r.value-o,v=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function $(o){c.value||(r.value=o,S("rate",o))}function C(){return r.value}function E(o=!0){c.value=o}return _({getData:C,toggleReadonly:E}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[2]||(n[2]=l=>f.value=!0),onMouseleave:n[3]||(n[3]=l=>{f.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,v)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(s.value)?t.value.style.image.inactiveOpacity:p(l,!0)}`)},null,12,A)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,j),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,F)],8,X)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(s.value)?t.value.style.star.inactiveColor:p(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:s.value?p(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,I)],8,R)),m.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${x(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,O)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${x(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,q),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,U)],8,G)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,H)],8,Y)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:u=>$(l),onMouseenter:u=>s.value=l,onMouseleave:n[0]||(n[0]=u=>s.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>$(l),["enter"])},null,40,P)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:u=>s.value=l,onMouseleave:n[1]||(n[1]=u=>s.value=void 0)},null,40,T)):e.createCommentVNode("",!0)],12,K)),t.value.style.tooltip.show&&B.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(a.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},J=D._export_sfc(W,[["__scopeId","data-v-d90e158f"]]);exports.default=J;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-DGcOW0vL.cjs"),L=require("./useNestedProp-C9KmUVBy.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},A=["src","height","width"],R=["xmlns","height","width"],X=["id"],j=["stop-color"],F=["stop-color"],I=["points","fill","stroke","stroke-width"],O=["src","alt","height","width","id"],Y=["xmlns","viewBox","height","id"],G=["id"],q=["stop-color"],U=["stop-color"],H=["points","fill","stroke"],K=["xmlns","height"],P=["onClick","onMouseenter","onKeyup"],T=["onMouseenter"],W={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(k,{expose:_,emit:S}){const i=k,{vue_ui_rating:z}=a.useConfig(),d=e.ref(a.createUid()),f=e.ref(!1),s=e.ref(void 0),y=e.ref([]),t=e.computed({get:()=>g(),set:o=>o});function g(){return L.useNestedProp({userConfig:i.config,defaultConfig:z})}e.watch(()=>i.config,o=>{t.value=g(),h()},{deep:!0});const w=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?N(i.dataset.rating):i.dataset.rating),B=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),r=e.ref(w.value),m=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function N(o){let n=0,l=0;for(const u in o){const V=parseInt(u),b=o[u];n+=V*b,l+=b}if(l===0)return 0;const v=n/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{h()});function h(){a.objectIsEmpty(i.dataset)&&a.error({componentName:"VueUiRating",type:"dataset"}),y.value=[];for(let o=t.value.from;o<=t.value.to;o+=1)y.value.push(o)}function p(o,n=!1){return o>s.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function x(o,n=!1){const l=r.value-o,v=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function $(o){c.value||(r.value=o,S("rate",o))}function C(){return r.value}function E(o=!0){c.value=o}return _({getData:C,toggleReadonly:E}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[2]||(n[2]=l=>f.value=!0),onMouseleave:n[3]||(n[3]=l=>{f.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,v)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(s.value)?t.value.style.image.inactiveOpacity:p(l,!0)}`)},null,12,A)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,j),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,F)],8,X)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(s.value)?t.value.style.star.inactiveColor:p(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:s.value?p(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,I)],8,R)),m.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${x(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,O)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${x(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,q),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,U)],8,G)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,H)],8,Y)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:u=>$(l),onMouseenter:u=>s.value=l,onMouseleave:n[0]||(n[0]=u=>s.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>$(l),["enter"])},null,40,P)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:u=>s.value=l,onMouseleave:n[1]||(n[1]=u=>s.value=void 0)},null,40,T)):e.createCommentVNode("",!0)],12,K)),t.value.style.tooltip.show&&B.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(a.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},J=D._export_sfc(W,[["__scopeId","data-v-d90e158f"]]);exports.default=J;
@@ -1,6 +1,6 @@
1
1
  import { ref as h, computed as x, watch as U, onMounted as K, openBlock as a, createElementBlock as i, normalizeStyle as o, createElementVNode as r, toDisplayString as g, createCommentVNode as d, unref as s, Fragment as T, renderList as H, withKeys as P } from "vue";
2
- import { u as W, c as q, o as J, e as Q, i as $, f as _, X as k, w as R, V as F } from "./index-DH1CMY7m.js";
3
- import { u as Z } from "./useNestedProp-DBnFzAfW.js";
2
+ import { u as W, c as q, o as J, e as Q, i as $, f as _, X as k, w as R, V as F } from "./index-Dhlyke5j.js";
3
+ import { u as Z } from "./useNestedProp-D9eTQKze.js";
4
4
  import { _ as tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const et = {
6
6
  key: 0,
@@ -1,12 +1,12 @@
1
1
  import { useCssVars as Ge, computed as f, ref as u, watch as Ve, onMounted as We, onBeforeUnmount as De, openBlock as i, createElementBlock as a, normalizeStyle as C, unref as r, createBlock as F, createCommentVNode as v, createSlots as Xe, withCtx as B, renderSlot as p, normalizeProps as A, guardReactiveProps as W, normalizeClass as D, createVNode as Ye, createElementVNode as qe, Fragment as P, renderList as L, mergeProps as ge, toDisplayString as T } from "vue";
2
- import { u as He, c as Je, t as Ke, a as Qe, p as me, b as Ze, o as et, e as pe, g as tt, X as lt, G as ke, i as X, f as Y, F as q } from "./index-DH1CMY7m.js";
2
+ import { u as He, c as Je, t as Ke, a as Qe, p as me, b as Ze, o as et, e as pe, g as tt, X as lt, G as ke, i as X, f as Y, F as q } from "./index-Dhlyke5j.js";
3
3
  import { t as st, u as it } from "./useResponsive-CoxXLe23.js";
4
- import { _ as at } from "./Title-DPlURQtx.js";
5
- import { u as nt, U as rt } from "./usePrinter-C0N1CiBZ.js";
6
- import ut from "./vue-ui-skeleton-DBo32QSA.js";
7
- import { u as xe } from "./useNestedProp-DBnFzAfW.js";
8
- import { _ as ot } from "./PackageVersion-Bp3Bq9Jn.js";
9
- import { P as ct } from "./PenAndPaper-Cu0Ae0MN.js";
4
+ import { _ as at } from "./Title-BecmraNn.js";
5
+ import { u as nt, U as rt } from "./usePrinter-BnBk8gnl.js";
6
+ import ut from "./vue-ui-skeleton-DQqwDUqP.js";
7
+ import { u as xe } from "./useNestedProp-D9eTQKze.js";
8
+ import { _ as ot } from "./PackageVersion-xnKIqody.js";
9
+ import { P as ct } from "./PenAndPaper-iek0aH4r.js";
10
10
  import { u as dt } from "./useUserOptionState-BIvW1Kz7.js";
11
11
  import { _ as vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  const yt = ["id"], ft = ["xmlns", "viewBox"], ht = ["cx", "cy", "r", "stroke", "stroke-width"], gt = { key: 0 }, mt = ["stroke", "d", "stroke-width"], pt = { style: { "pointer-events": "none" } }, kt = ["cx", "cy", "fill", "r", "stroke"], xt = ["x", "y", "fill", "font-size"], wt = { key: 1 }, bt = ["stroke", "stroke-width", "x1", "x2", "y1", "y2"], $t = { style: { "pointer-events": "none" } }, _t = ["cx", "cy", "fill", "r", "stroke"], Ct = ["x", "y", "fill", "font-size"], Pt = ["text-anchor", "transform", "x", "y", "onClick", "font-weight", "font-size", "fill"], Lt = ["cx", "cy", "fill", "stroke", "onClick", "r"], Ot = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-BdlNqn9B.cjs"),Z=require("./useResponsive-BJ7DTGpm.cjs"),Ce=require("./Title-Z93_y2gr.cjs"),ee=require("./usePrinter-DtSijS1B.cjs"),Be=require("./vue-ui-skeleton-Czl8iTZQ.cjs"),te=require("./useNestedProp-DDvMHRIf.cjs"),Pe=require("./PackageVersion-B_ULr99C.cjs"),$e=require("./PenAndPaper-DFNDy1y9.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ze=["id"],Oe=["xmlns","viewBox"],Se=["cx","cy","r","stroke","stroke-width"],Ee={key:0},Ae=["stroke","d","stroke-width"],Ne={style:{"pointer-events":"none"}},Ie=["cx","cy","fill","r","stroke"],Me=["x","y","fill","font-size"],Ve={key:1},Fe=["stroke","stroke-width","x1","x2","y1","y2"],Te={style:{"pointer-events":"none"}},Re=["cx","cy","fill","r","stroke"],je=["x","y","fill","font-size"],qe=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],De=["cx","cy","fill","stroke","onClick","r"],Ue={key:5,class:"vue-data-ui-watermark"},Ge={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(le,{expose:re}){const y=le;e.useCssVars(t=>({"4590ab93":ue.value,"63813bf2":ie.value,"371a2454":ce.value}));const{vue_ui_relation_circle:ne}=o.useConfig(),P=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),x=e.ref(o.createUid()),E=e.ref(0),w=e.ref(null),A=e.ref(null),N=e.ref(null),I=e.ref(null),M=e.ref(0),r=e.computed({get:()=>T(),set:t=>t}),{userOptionsVisible:$,setUserOptionsVisibility:V,keepUserOptionState:F}=_e.useUserOptionState({config:r.value});function T(){const t=te.useNestedProp({userConfig:y.config,defaultConfig:ne});return t.theme?{...te.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}e.watch(()=>y.config,t=>{r.value=T(),$.value=!r.value.showOnChartHover,Y(),M.value+=1},{deep:!0});const{isPrinting:R,isImaging:j,generatePdf:q,generateImage:D}=ee.usePrinter({elementId:`relation_circle_${x.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),oe=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),U=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),a=e.ref({}),v=e.ref([]),se=e.ref(0),_=e.computed(()=>y.dataset.slice(0,r.value.style.limit)),k=e.ref(r.value.style.size),f=e.ref(r.value.style.weightLabels.size),G=e.ref(r.value.style.plot.radius),W=e.ref(r.value.style.labels.fontSize),i=e.ref({height:r.value.style.size,width:r.value.style.size}),m=e.computed({get(){return k.value*r.value.style.circle.radiusProportion},set(t){return t}}),ae=e.computed(()=>r.value.style.links.curved),ie=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ue=e.computed(()=>m.value*2),ce=e.computed(()=>m.value*4),b=e.ref(null);e.onMounted(()=>{Y(),document.getElementById(`relation_circle_${x.value}`).addEventListener("click",X)});function Y(){if(o.objectIsEmpty(y.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{o.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=Z.throttle(()=>{const{width:n,height:l}=Z.useResponsive({chart:w.value,title:r.value.style.title.text?A.value:null,source:N.value,noTitle:I.value});k.value=Math.min(n,l),i.value.width=n,i.value.height=l,m.value=k.value*r.value.style.circle.radiusProportion,h.value=[],d.value=[],H(),J(),f.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),G.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),W.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})});b.value=new ResizeObserver(t),b.value.observe(w.value.parentNode)}else h.value=[],d.value=[],H(),J()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${x.value}`).removeEventListener("click",X),b.value&&b.value.disconnect()});function X(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(a.value={},v.value=[])}function H(){const t=6.28319/_.value.length,n=360/_.value.length;let l=0,s=0;_.value.forEach((c,u)=>{const O=c.weights.reduce((we,be)=>we+be,0),S=m.value*Math.cos(l)+i.value.width/2,xe=m.value*Math.sin(l)+i.value.height/2+r.value.style.circle.offsetY;h.value.push({x:S,y:xe,...c,color:c.color?c.color:U.value[u]?U.value[u]:o.palette[u],regAngle:s,totalWeight:O}),l+=t,s+=n})}function de(t,n){const l=(t.x+n.x)/2,s=(t.y+n.y)/2;return{x:l,y:s}}function J(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,s)=>{const c=l.relations.indexOf(t.id);d.value.push({weight:l.weights[c]?l.weights[c]:0,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,midPointLine:de({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:ve({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function ve(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},s={x:t.x1,y:t.y1},c={x:i.value.width/2,y:i.value.height/2+r.value.style.circle.offsetY},u=.5,O=Math.pow(1-u,3)*n.x+3*Math.pow(1-u,2)*u*s.x+3*(1-u)*Math.pow(u,2)*c.x+Math.pow(u,3)*l.x,S=Math.pow(1-u,3)*n.y+3*Math.pow(1-u,2)*u*s.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:O,y:S}}const fe=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function ye(t){return Object.hasOwn(a.value,"x")?v.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function g(t){return t.colorSource}function K(t){return Object.hasOwn(a.value,"x")?v.value.includes(t.id)&&t.relationId===`${t.id}_${a.value.id}`||t.relationId===`${a.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function p(t){return Object.hasOwn(a.value,"x")?!!(v.value.includes(t.id)&&t.relationId===`${t.id}_${a.value.id}`||t.relationId===`${a.value.id}_${t.id}`):!1}function ge(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function he(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function me(t){return Object.hasOwn(a.value,"x")?a.value.id===t.id||v.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function ke(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function Q(t){se.value=360-t.regAngle,a.value.id&&t.id===a.value.id?(a.value={},v.value=[]):(a.value=t,v.value=[...t.relations])}function L(t){const n=t.weight/fe.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function pe(t){C.value=t,E.value+=1}const B=e.ref(!1);function z(){B.value=!B.value}return re({generatePdf:q,generateImage:D,toggleAnnotator:z}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:w,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${x.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref(V)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(V)(!1))},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock($e.PenAndPaper,{key:0,parent:w.value,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:z},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),oe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:I,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${M.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&P.value&&(e.unref(F)||e.unref($))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(R),isImaging:e.unref(j),uid:x.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:C.value,titles:{...r.value.userOptions.buttonTitles},chartElement:w.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(D),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(F)?e.unref($)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"2"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:s})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:s})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value},"relation-circle"]),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${i.value.height<=0?10:i.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode(Pe._sfc_main),e.createElementVNode("circle",{cx:(i.value.width<=0?1e-4:i.value.width)/2,cy:(i.value.height<=0?1e-4:i.value.height)/2+r.value.style.circle.offsetY,r:m.value<=0?1e-4:m.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,Se),ae.value?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${s}`,style:e.normalizeStyle(K(l)),stroke:g(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&v.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${i.value.width/2},${i.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,Ae))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",Ne,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointBezier.x,y:l.midPointBezier.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointBezier.x,cy:l.midPointBezier.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Ie)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointBezier.x,y:l.midPointBezier.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Me)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${s}`,stroke:g(l),"stroke-width":L(l),style:e.normalizeStyle(K(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&v.value.includes(l.id)}),"stroke-linecap":"round"},null,14,Fe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",Te,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointLine.x,y:l.midPointLine.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointLine.x,cy:l.midPointLine.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Re)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointLine.x,y:l.midPointLine.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,je)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${s}`,"text-anchor":ge(l),transform:ke(l),x:he(l),y:l.y+5,onClick:c=>Q(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":a.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${me(l)}`),"font-size":W.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,qe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${s}`,style:e.normalizeStyle(ye(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.useSerieColor?l.color:r.value.style.plot.color,stroke:r.value.style.backgroundColor,"stroke-width":"1",onClick:c=>Q(l),r:G.value},null,12,De))),128)),e.renderSlot(t.$slots,"svg",{svg:i.value},void 0,!0)],10,Oe)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ue,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Be.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],44,ze))}},We=Le._export_sfc(Ge,[["__scopeId","data-v-f56b9326"]]);exports.default=We;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-DGcOW0vL.cjs"),Z=require("./useResponsive-BJ7DTGpm.cjs"),Ce=require("./Title-BWhYDGb-.cjs"),ee=require("./usePrinter-DpEuGyLP.cjs"),Be=require("./vue-ui-skeleton-D_lU-hWK.cjs"),te=require("./useNestedProp-C9KmUVBy.cjs"),Pe=require("./PackageVersion-BJi2ywG9.cjs"),$e=require("./PenAndPaper-CX6N7FR7.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ze=["id"],Oe=["xmlns","viewBox"],Se=["cx","cy","r","stroke","stroke-width"],Ee={key:0},Ae=["stroke","d","stroke-width"],Ne={style:{"pointer-events":"none"}},Ie=["cx","cy","fill","r","stroke"],Me=["x","y","fill","font-size"],Ve={key:1},Fe=["stroke","stroke-width","x1","x2","y1","y2"],Te={style:{"pointer-events":"none"}},Re=["cx","cy","fill","r","stroke"],je=["x","y","fill","font-size"],qe=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],De=["cx","cy","fill","stroke","onClick","r"],Ue={key:5,class:"vue-data-ui-watermark"},Ge={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(le,{expose:re}){const y=le;e.useCssVars(t=>({"4590ab93":ue.value,"63813bf2":ie.value,"371a2454":ce.value}));const{vue_ui_relation_circle:ne}=o.useConfig(),P=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),x=e.ref(o.createUid()),E=e.ref(0),w=e.ref(null),A=e.ref(null),N=e.ref(null),I=e.ref(null),M=e.ref(0),r=e.computed({get:()=>T(),set:t=>t}),{userOptionsVisible:$,setUserOptionsVisibility:V,keepUserOptionState:F}=_e.useUserOptionState({config:r.value});function T(){const t=te.useNestedProp({userConfig:y.config,defaultConfig:ne});return t.theme?{...te.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}e.watch(()=>y.config,t=>{r.value=T(),$.value=!r.value.showOnChartHover,Y(),M.value+=1},{deep:!0});const{isPrinting:R,isImaging:j,generatePdf:q,generateImage:D}=ee.usePrinter({elementId:`relation_circle_${x.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),oe=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),U=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),a=e.ref({}),v=e.ref([]),se=e.ref(0),_=e.computed(()=>y.dataset.slice(0,r.value.style.limit)),k=e.ref(r.value.style.size),f=e.ref(r.value.style.weightLabels.size),G=e.ref(r.value.style.plot.radius),W=e.ref(r.value.style.labels.fontSize),i=e.ref({height:r.value.style.size,width:r.value.style.size}),m=e.computed({get(){return k.value*r.value.style.circle.radiusProportion},set(t){return t}}),ae=e.computed(()=>r.value.style.links.curved),ie=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ue=e.computed(()=>m.value*2),ce=e.computed(()=>m.value*4),b=e.ref(null);e.onMounted(()=>{Y(),document.getElementById(`relation_circle_${x.value}`).addEventListener("click",X)});function Y(){if(o.objectIsEmpty(y.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{o.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=Z.throttle(()=>{const{width:n,height:l}=Z.useResponsive({chart:w.value,title:r.value.style.title.text?A.value:null,source:N.value,noTitle:I.value});k.value=Math.min(n,l),i.value.width=n,i.value.height=l,m.value=k.value*r.value.style.circle.radiusProportion,h.value=[],d.value=[],H(),J(),f.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),G.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),W.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})});b.value=new ResizeObserver(t),b.value.observe(w.value.parentNode)}else h.value=[],d.value=[],H(),J()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${x.value}`).removeEventListener("click",X),b.value&&b.value.disconnect()});function X(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(a.value={},v.value=[])}function H(){const t=6.28319/_.value.length,n=360/_.value.length;let l=0,s=0;_.value.forEach((c,u)=>{const O=c.weights.reduce((we,be)=>we+be,0),S=m.value*Math.cos(l)+i.value.width/2,xe=m.value*Math.sin(l)+i.value.height/2+r.value.style.circle.offsetY;h.value.push({x:S,y:xe,...c,color:c.color?c.color:U.value[u]?U.value[u]:o.palette[u],regAngle:s,totalWeight:O}),l+=t,s+=n})}function de(t,n){const l=(t.x+n.x)/2,s=(t.y+n.y)/2;return{x:l,y:s}}function J(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,s)=>{const c=l.relations.indexOf(t.id);d.value.push({weight:l.weights[c]?l.weights[c]:0,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,midPointLine:de({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:ve({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function ve(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},s={x:t.x1,y:t.y1},c={x:i.value.width/2,y:i.value.height/2+r.value.style.circle.offsetY},u=.5,O=Math.pow(1-u,3)*n.x+3*Math.pow(1-u,2)*u*s.x+3*(1-u)*Math.pow(u,2)*c.x+Math.pow(u,3)*l.x,S=Math.pow(1-u,3)*n.y+3*Math.pow(1-u,2)*u*s.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:O,y:S}}const fe=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function ye(t){return Object.hasOwn(a.value,"x")?v.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function g(t){return t.colorSource}function K(t){return Object.hasOwn(a.value,"x")?v.value.includes(t.id)&&t.relationId===`${t.id}_${a.value.id}`||t.relationId===`${a.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function p(t){return Object.hasOwn(a.value,"x")?!!(v.value.includes(t.id)&&t.relationId===`${t.id}_${a.value.id}`||t.relationId===`${a.value.id}_${t.id}`):!1}function ge(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function he(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function me(t){return Object.hasOwn(a.value,"x")?a.value.id===t.id||v.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function ke(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function Q(t){se.value=360-t.regAngle,a.value.id&&t.id===a.value.id?(a.value={},v.value=[]):(a.value=t,v.value=[...t.relations])}function L(t){const n=t.weight/fe.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function pe(t){C.value=t,E.value+=1}const B=e.ref(!1);function z(){B.value=!B.value}return re({generatePdf:q,generateImage:D,toggleAnnotator:z}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:w,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${x.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref(V)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(V)(!1))},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock($e.PenAndPaper,{key:0,parent:w.value,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:z},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),oe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:I,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${M.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&P.value&&(e.unref(F)||e.unref($))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(R),isImaging:e.unref(j),uid:x.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:C.value,titles:{...r.value.userOptions.buttonTitles},chartElement:w.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(D),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(F)?e.unref($)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"2"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:s})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:s})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value},"relation-circle"]),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${i.value.height<=0?10:i.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode(Pe._sfc_main),e.createElementVNode("circle",{cx:(i.value.width<=0?1e-4:i.value.width)/2,cy:(i.value.height<=0?1e-4:i.value.height)/2+r.value.style.circle.offsetY,r:m.value<=0?1e-4:m.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,Se),ae.value?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${s}`,style:e.normalizeStyle(K(l)),stroke:g(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&v.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${i.value.width/2},${i.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,Ae))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",Ne,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointBezier.x,y:l.midPointBezier.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointBezier.x,cy:l.midPointBezier.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Ie)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointBezier.x,y:l.midPointBezier.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Me)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${s}`,stroke:g(l),"stroke-width":L(l),style:e.normalizeStyle(K(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&v.value.includes(l.id)}),"stroke-linecap":"round"},null,14,Fe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",Te,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointLine.x,y:l.midPointLine.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointLine.x,cy:l.midPointLine.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Re)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointLine.x,y:l.midPointLine.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,je)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${s}`,"text-anchor":ge(l),transform:ke(l),x:he(l),y:l.y+5,onClick:c=>Q(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":a.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${me(l)}`),"font-size":W.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,qe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${s}`,style:e.normalizeStyle(ye(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.useSerieColor?l.color:r.value.style.plot.color,stroke:r.value.style.backgroundColor,"stroke-width":"1",onClick:c=>Q(l),r:G.value},null,12,De))),128)),e.renderSlot(t.$slots,"svg",{svg:i.value},void 0,!0)],10,Oe)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ue,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Be.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],44,ze))}},We=Le._export_sfc(Ge,[["__scopeId","data-v-f56b9326"]]);exports.default=We;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BdlNqn9B.cjs"),le=require("./useResponsive-BJ7DTGpm.cjs"),ye=require("./Title-Z93_y2gr.cjs"),oe=require("./usePrinter-DtSijS1B.cjs"),be=require("./Tooltip-DVfgJ6mM.cjs"),ke=require("./DataTable-CwiudM8v.cjs"),Ce=require("./Legend-TTzHdVeD.cjs"),we=require("./vue-ui-skeleton-Czl8iTZQ.cjs"),Te=require("./vue-ui-accordion-Dm8myRhk.cjs"),ae=require("./useNestedProp-DDvMHRIf.cjs"),xe=require("./PackageVersion-B_ULr99C.cjs"),Ne=require("./PenAndPaper-DFNDy1y9.cjs"),$e=require("./useUserOptionState-BgepsfED.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Be=["id"],Pe=["xmlns","viewBox"],_e=["id"],Ve=["stop-color"],Le=["stop-color"],Oe=["stroke","cx","cy","r","fill"],Ee=["stroke","stroke-width","cx","cy","r","fill"],ze=["cx","cy","r","onMouseenter"],Ae={key:5,class:"vue-data-ui-watermark"},Fe=["onClick"],Ie={key:0},Re={key:1},Me=["innerHTML"],qe={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(re,{expose:ne,emit:ue}){const v=re,{vue_ui_rings:se}=r.useConfig(),k=e.ref(!1),T=e.computed(()=>!!v.dataset&&v.dataset.length),C=e.ref(r.createUid()),ie=e.ref(null),x=e.ref(!1),P=e.ref(""),m=e.ref(null),E=e.ref(0),y=e.ref(null),z=e.ref(null),A=e.ref(null),F=e.ref(null),I=e.ref(null),R=e.ref(0),M=e.ref(0),q=e.ref(0),t=e.computed({get:()=>H(),set:l=>l}),{userOptionsVisible:_,setUserOptionsVisibility:U,keepUserOptionState:D}=$e.useUserOptionState({config:t.value});function H(){const l=ae.useNestedProp({userConfig:v.config,defaultConfig:se});return l.theme?{...ae.useNestedProp({userConfig:r.themes.vue_ui_rings[l.theme]||v.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>v.config,l=>{t.value=H(),_.value=!t.value.showOnChartHover,W(),R.value+=1,M.value+=1,q.value+=1},{deep:!0});const N=e.ref(null);e.onMounted(()=>{W()});function W(){if(r.objectIsEmpty(v.dataset)?r.error({componentName:"VueUiRings",type:"dataset"}):v.dataset.forEach((l,a)=>{l.values.length||r.error({componentName:"VueUiRings",type:"dataset"}),r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:o,index:a})})}),t.value.responsive){const l=le.throttle(()=>{const{width:a,height:o}=le.useResponsive({chart:y.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?A.value:null,source:F.value,noTitle:I.value});s.value.width=a,s.value.height=o});N.value=new ResizeObserver(l),N.value.observe(y.value.parentNode)}setTimeout(()=>{k.value=!0},600)}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:G,isImaging:j,generatePdf:X,generateImage:Y}=oe.usePrinter({elementId:`rings_${C.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),ce=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),J=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),f=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),de=e.computed(()=>Math.min(s.value.height,s.value.width)),i=e.ref([]);function V(l){i.value.includes(l)?i.value=i.value.filter(a=>a!==l):i.value.push(l),ue("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const ve=e.computed(()=>Math.max(...$.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l)));function K(l){return l/ve.value}const $=e.computed(()=>v.dataset.map(({values:l,name:a,color:o=null},n)=>{const u=r.sanitizeArray(l).reduce((h,w)=>h+w,0);return{name:a,color:o||r.convertColorToHex(o)||J.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:u,proportion:u/v.dataset.map(h=>(h.values||[]).reduce((w,me)=>w+me,0)).reduce((h,w)=>h+w,0),uid:r.createUid()}})),Q=e.computed(()=>$.value.map(l=>({...l,shape:"circle",opacity:i.value.includes(l.uid)?.5:1,segregate:()=>V(l.uid),isSegregated:i.value.includes(l.uid)})).toSorted((l,a)=>a.value-l.value)),pe=e.computed(()=>({cy:"rings-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),p=e.computed(()=>$.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>$.value.filter(l=>!i.value.includes(l.uid)).map(({name:l,value:a,color:o=null,uid:n},u)=>({uid:n,name:l,color:o||r.convertColorToHex(o)||J.value[u]||r.palette[u]||r.palette[u%r.palette.length],value:a,proportion:K(a),percentage:a/p.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*K(a)})).toSorted((l,a)=>a.value-l.value));function he(){return c.value.map(({name:l,color:a,value:o,absoluteValues:n,percentage:u})=>({name:l,color:a,value:o,absoluteValues:n,percentage:u}))}const d=e.computed(()=>de.value-t.value.style.chart.layout.rings.strokeWidth*2),L=e.ref(null);function fe(l,a){if(i.value.length===v.dataset.length)return;L.value={datapoint:a,seriesIndex:l,series:c.value,config:t.value},m.value=l;const o=c.value[l],n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:l,datapoint:a,series:c.value,config:t.value})))P.value=n({seriesIndex:l,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:l})}
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DGcOW0vL.cjs"),le=require("./useResponsive-BJ7DTGpm.cjs"),ye=require("./Title-BWhYDGb-.cjs"),oe=require("./usePrinter-DpEuGyLP.cjs"),be=require("./Tooltip-cPxZzSgr.cjs"),ke=require("./DataTable-rMMvio1U.cjs"),Ce=require("./Legend-Ba34oTdO.cjs"),we=require("./vue-ui-skeleton-D_lU-hWK.cjs"),Te=require("./vue-ui-accordion-mtZIFAv9.cjs"),ae=require("./useNestedProp-C9KmUVBy.cjs"),xe=require("./PackageVersion-BJi2ywG9.cjs"),Ne=require("./PenAndPaper-CX6N7FR7.cjs"),$e=require("./useUserOptionState-BgepsfED.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Be=["id"],Pe=["xmlns","viewBox"],_e=["id"],Ve=["stop-color"],Le=["stop-color"],Oe=["stroke","cx","cy","r","fill"],Ee=["stroke","stroke-width","cx","cy","r","fill"],ze=["cx","cy","r","onMouseenter"],Ae={key:5,class:"vue-data-ui-watermark"},Fe=["onClick"],Ie={key:0},Re={key:1},Me=["innerHTML"],qe={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(re,{expose:ne,emit:ue}){const v=re,{vue_ui_rings:se}=r.useConfig(),k=e.ref(!1),T=e.computed(()=>!!v.dataset&&v.dataset.length),C=e.ref(r.createUid()),ie=e.ref(null),x=e.ref(!1),P=e.ref(""),m=e.ref(null),E=e.ref(0),y=e.ref(null),z=e.ref(null),A=e.ref(null),F=e.ref(null),I=e.ref(null),R=e.ref(0),M=e.ref(0),q=e.ref(0),t=e.computed({get:()=>H(),set:l=>l}),{userOptionsVisible:_,setUserOptionsVisibility:U,keepUserOptionState:D}=$e.useUserOptionState({config:t.value});function H(){const l=ae.useNestedProp({userConfig:v.config,defaultConfig:se});return l.theme?{...ae.useNestedProp({userConfig:r.themes.vue_ui_rings[l.theme]||v.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>v.config,l=>{t.value=H(),_.value=!t.value.showOnChartHover,W(),R.value+=1,M.value+=1,q.value+=1},{deep:!0});const N=e.ref(null);e.onMounted(()=>{W()});function W(){if(r.objectIsEmpty(v.dataset)?r.error({componentName:"VueUiRings",type:"dataset"}):v.dataset.forEach((l,a)=>{l.values.length||r.error({componentName:"VueUiRings",type:"dataset"}),r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:o,index:a})})}),t.value.responsive){const l=le.throttle(()=>{const{width:a,height:o}=le.useResponsive({chart:y.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?A.value:null,source:F.value,noTitle:I.value});s.value.width=a,s.value.height=o});N.value=new ResizeObserver(l),N.value.observe(y.value.parentNode)}setTimeout(()=>{k.value=!0},600)}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:G,isImaging:j,generatePdf:X,generateImage:Y}=oe.usePrinter({elementId:`rings_${C.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),ce=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),J=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),f=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),de=e.computed(()=>Math.min(s.value.height,s.value.width)),i=e.ref([]);function V(l){i.value.includes(l)?i.value=i.value.filter(a=>a!==l):i.value.push(l),ue("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const ve=e.computed(()=>Math.max(...$.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l)));function K(l){return l/ve.value}const $=e.computed(()=>v.dataset.map(({values:l,name:a,color:o=null},n)=>{const u=r.sanitizeArray(l).reduce((h,w)=>h+w,0);return{name:a,color:o||r.convertColorToHex(o)||J.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:u,proportion:u/v.dataset.map(h=>(h.values||[]).reduce((w,me)=>w+me,0)).reduce((h,w)=>h+w,0),uid:r.createUid()}})),Q=e.computed(()=>$.value.map(l=>({...l,shape:"circle",opacity:i.value.includes(l.uid)?.5:1,segregate:()=>V(l.uid),isSegregated:i.value.includes(l.uid)})).toSorted((l,a)=>a.value-l.value)),pe=e.computed(()=>({cy:"rings-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),p=e.computed(()=>$.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>$.value.filter(l=>!i.value.includes(l.uid)).map(({name:l,value:a,color:o=null,uid:n},u)=>({uid:n,name:l,color:o||r.convertColorToHex(o)||J.value[u]||r.palette[u]||r.palette[u%r.palette.length],value:a,proportion:K(a),percentage:a/p.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*K(a)})).toSorted((l,a)=>a.value-l.value));function he(){return c.value.map(({name:l,color:a,value:o,absoluteValues:n,percentage:u})=>({name:l,color:a,value:o,absoluteValues:n,percentage:u}))}const d=e.computed(()=>de.value-t.value.style.chart.layout.rings.strokeWidth*2),L=e.ref(null);function fe(l,a){if(i.value.length===v.dataset.length)return;L.value={datapoint:a,seriesIndex:l,series:c.value,config:t.value},m.value=l;const o=c.value[l],n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:l,datapoint:a,series:c.value,config:t.value})))P.value=n({seriesIndex:l,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:l})}
2
2
  </b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${r.dataLabel({v:o.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${r.dataLabel({v:o.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),P.value=u}x.value=!0}const g=e.computed(()=>{const l=c.value.map(o=>({name:o.name,color:o.color})),a=c.value.map(o=>o.value);return{head:l,body:a}}),S=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=g.value.head.map((u,h)=>[{color:u.color,name:u.name},r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:g.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(g.value.body[h]/p.value)?"-":(g.value.body[h]/p.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},n=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:n}});function Z(){e.nextTick(()=>{const l=g.value.head.map((n,u)=>[[n.name],[g.value.body[u]],[isNaN(g.value.body[u]/p.value)?"-":g.value.body[u]/p.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-rings"})})}const b=e.ref(!1);function ge(l){b.value=l,E.value+=1}function ee(){f.value.showTable=!f.value.showTable}function te(){f.value.showTooltip=!f.value.showTooltip}const B=e.ref(!1);function O(){B.value=!B.value}return ne({getData:he,generatePdf:X,generateCsv:Z,generateImage:Y,toggleTable:ee,toggleTooltip:te,toggleAnnotator:O}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:y,class:e.normalizeClass(`vue-ui-rings ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${C.value}`,onMouseleave:a[3]||(a[3]=o=>{m.value=null,x.value=!1,e.unref(U)(!1)}),onMouseenter:a[4]||(a[4]=()=>e.unref(U)(!0))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ne.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ce.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:I,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ye._sfc_main,{key:`title_${R.value}`,config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&T.value&&(e.unref(D)||e.unref(_))?(e.openBlock(),e.createBlock(oe.UserOptions,{ref_key:"details",ref:ie,key:`user_options_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(G),isImaging:e.unref(j),uid:C.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:f.value.showTooltip,isFullscreen:b.value,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:ge,onGeneratePdf:e.unref(X),onGenerateCsv:Z,onGenerateImage:e.unref(Y),onToggleTable:ee,onToggleTooltip:te,onToggleAnnotator:O,style:e.normalizeStyle({visibility:e.unref(D)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),T.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(xe._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${C.value}_${n}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(o.color,.05),100-t.value.style.chart.layout.rings.gradient.intensity)},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,Le)],8,_e))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":k.value&&t.value.useCssAnimation,"vue-rings-item-onload":!k.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,Oe),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":k.value&&t.value.useCssAnimation,"vue-rings-item-onload":!k.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${C.value}_${n})`:o.color},null,14,Ee),e.createElementVNode("circle",{"data-cy-trap":"",stroke:"none",cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9),fill:"transparent",onMouseenter:u=>fe(n,o),onMouseleave:a[0]||(a[0]=u=>{m.value=null,x.value=!1})},null,40,ze)]))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,Pe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(G)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),T.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:6,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:A},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ce.Legend,{key:`legend_${q.value}`,legendSet:Q.value,config:pe.value,onClickMarker:a[1]||(a[1]=({legend:o})=>V(o.uid))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>V(o.uid),style:e.normalizeStyle(`opacity:${i.value.includes(o.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),i.value.includes(o.uid)?(e.openBlock(),e.createElementBlock("span",Re," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Ie," ("+e.toDisplayString(isNaN(o.value/p.value)?"-":e.unref(r.dataLabel)({v:o.value/p.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Fe)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:Q.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:F,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(be._sfc_main,{show:f.value.showTooltip&&x.value&&i.value.length<v.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:y.value,content:P.value,isFullscreen:b.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$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"]),T.value?(e.openBlock(),e.createBlock(Te.default,{key:8,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.openBlock(),e.createBlock(ke.DataTable,{key:`table_${M.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>f.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Me)]),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,Be))}},Ue=Se._export_sfc(qe,[["__scopeId","data-v-2f2c85e4"]]);exports.default=Ue;
@@ -1,16 +1,16 @@
1
1
  import { ref as n, computed as v, watch as Be, onMounted as De, onBeforeUnmount as We, openBlock as u, createElementBlock as f, normalizeClass as W, normalizeStyle as S, unref as r, createBlock as _, createCommentVNode as k, createSlots as Ee, withCtx as p, renderSlot as h, normalizeProps as I, guardReactiveProps as M, createVNode as be, createElementVNode as C, Fragment as ke, renderList as Ce, createTextVNode as we, toDisplayString as E, nextTick as Ge } from "vue";
2
- import { u as He, c as $e, t as Xe, a as je, p as x, o as Ye, e as q, g as qe, b as Je, J as Ke, d as Te, f as N, X as Qe, s as Ze, w as et, v as J, i as _e, x as tt, y as lt, q as ot, r as at } from "./index-DH1CMY7m.js";
2
+ import { u as He, c as $e, t as Xe, a as je, p as x, o as Ye, e as q, g as qe, b as Je, J as Ke, d as Te, f as N, X as Qe, s as Ze, w as et, v as J, i as _e, x as tt, y as lt, q as ot, r as at } from "./index-Dhlyke5j.js";
3
3
  import { t as st, u as nt } from "./useResponsive-CoxXLe23.js";
4
- import { _ as rt } from "./Title-DPlURQtx.js";
5
- import { u as ut, U as it } from "./usePrinter-C0N1CiBZ.js";
6
- import { _ as vt } from "./Tooltip-C7wb_p0L.js";
7
- import { D as ct } from "./DataTable-BgiV2CfC.js";
8
- import { L as dt } from "./Legend-C1rLFGjN.js";
9
- import pt from "./vue-ui-skeleton-DBo32QSA.js";
10
- import ht from "./vue-ui-accordion-azKgDbn4.js";
11
- import { u as xe } from "./useNestedProp-DBnFzAfW.js";
12
- import { _ as gt } from "./PackageVersion-Bp3Bq9Jn.js";
13
- import { P as ft } from "./PenAndPaper-Cu0Ae0MN.js";
4
+ import { _ as rt } from "./Title-BecmraNn.js";
5
+ import { u as ut, U as it } from "./usePrinter-BnBk8gnl.js";
6
+ import { _ as vt } from "./Tooltip-BZYApG0d.js";
7
+ import { D as ct } from "./DataTable-D8MTezlM.js";
8
+ import { L as dt } from "./Legend-wr5XLSfL.js";
9
+ import pt from "./vue-ui-skeleton-DQqwDUqP.js";
10
+ import ht from "./vue-ui-accordion-CGpOsWNN.js";
11
+ import { u as xe } from "./useNestedProp-D9eTQKze.js";
12
+ import { _ as gt } from "./PackageVersion-xnKIqody.js";
13
+ import { P as ft } from "./PenAndPaper-iek0aH4r.js";
14
14
  import { u as yt } from "./useUserOptionState-BIvW1Kz7.js";
15
15
  import { _ as mt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
16
  const bt = ["id"], kt = ["xmlns", "viewBox"], Ct = ["id"], wt = ["stop-color"], $t = ["stop-color"], Tt = ["stroke", "cx", "cy", "r", "fill"], _t = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], xt = ["cx", "cy", "r", "onMouseenter"], Nt = {
@@ -1,17 +1,17 @@
1
1
  import { computed as m, ref as h, watch as lt, onMounted as at, onBeforeUnmount as ot, openBlock as o, createElementBlock as r, normalizeClass as je, normalizeStyle as Y, unref as n, createBlock as V, createCommentVNode as c, createSlots as st, withCtx as _, renderSlot as M, normalizeProps as Q, guardReactiveProps as Z, createVNode as pe, createElementVNode as d, Fragment as N, renderList as X, toDisplayString as $, createTextVNode as ut, nextTick as rt } from "vue";
2
- import { u as it, c as nt, t as vt, a as yt, p as q, o as ct, e as fe, b as dt, g as Ue, T as ht, R as pt, W as ft, X as gt, U as xt, s as ge, i as j, v as C, f as P, x as mt, y as bt, q as kt, r as _t } from "./index-DH1CMY7m.js";
2
+ import { u as it, c as nt, t as vt, a as yt, p as q, o as ct, e as fe, b as dt, g as Ue, T as ht, R as pt, W as ft, X as gt, U as xt, s as ge, i as j, v as C, f as P, x as mt, y as bt, q as kt, r as _t } from "./index-Dhlyke5j.js";
3
3
  import { t as wt, u as Mt } from "./useResponsive-CoxXLe23.js";
4
- import { _ as $t } from "./Title-DPlURQtx.js";
5
- import { u as Ct, U as zt } from "./usePrinter-C0N1CiBZ.js";
6
- import { _ as At } from "./Tooltip-C7wb_p0L.js";
7
- import { L as St } from "./Legend-C1rLFGjN.js";
8
- import { _ as Ee } from "./Shape-B_GK3n6y.js";
9
- import { D as Lt } from "./DataTable-BgiV2CfC.js";
10
- import Tt from "./vue-ui-skeleton-DBo32QSA.js";
11
- import Bt from "./vue-ui-accordion-azKgDbn4.js";
12
- import { u as Ge } from "./useNestedProp-DBnFzAfW.js";
13
- import { _ as Ot } from "./PackageVersion-Bp3Bq9Jn.js";
14
- import { P as Nt } from "./PenAndPaper-Cu0Ae0MN.js";
4
+ import { _ as $t } from "./Title-BecmraNn.js";
5
+ import { u as Ct, U as zt } from "./usePrinter-BnBk8gnl.js";
6
+ import { _ as At } from "./Tooltip-BZYApG0d.js";
7
+ import { L as St } from "./Legend-wr5XLSfL.js";
8
+ import { _ as Ee } from "./Shape-B_lWjwmP.js";
9
+ import { D as Lt } from "./DataTable-D8MTezlM.js";
10
+ import Tt from "./vue-ui-skeleton-DQqwDUqP.js";
11
+ import Bt from "./vue-ui-accordion-CGpOsWNN.js";
12
+ import { u as Ge } from "./useNestedProp-D9eTQKze.js";
13
+ import { _ as Ot } from "./PackageVersion-xnKIqody.js";
14
+ import { P as Nt } from "./PenAndPaper-iek0aH4r.js";
15
15
  import { u as Pt } from "./useUserOptionState-BIvW1Kz7.js";
16
16
  import { _ as Wt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
17
  const Ft = ["id"], Xt = ["xmlns", "viewBox"], It = { key: 0 }, Dt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Yt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Vt = { key: 1 }, jt = ["points", "fill", "stroke-width", "stroke-dasharray", "stroke"], Ut = { key: 0 }, Et = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onMouseover"], Gt = { key: 1 }, Rt = { key: 2 }, qt = ["id"], Ht = ["stop-color"], Jt = ["stop-color"], Kt = ["id"], Qt = ["stop-color"], Zt = ["stop-color"], el = ["x", "y", "width", "height", "fill", "stroke", "stroke-width", "rx"], tl = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], ll = { key: 0 }, al = ["d", "stroke", "stroke-width"], ol = ["d", "stroke", "stroke-width"], sl = ["d", "stroke", "stroke-width"], ul = ["d", "stroke", "stroke-width"], rl = {