vue-data-ui 2.6.2 → 2.6.4-beta.0

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 (181) hide show
  1. package/README.md +4 -4
  2. package/dist/{Arrow-DnYsOsEt.cjs → Arrow-BxhrO7GM.cjs} +1 -1
  3. package/dist/{Arrow-B4TCBt4-.js → Arrow-DnRkz3cJ.js} +1 -1
  4. package/dist/{BaseIcon-Dn1igOva.cjs → BaseIcon-BJi2tdtl.cjs} +1 -1
  5. package/dist/{BaseIcon-DTJIrD3k.js → BaseIcon-BhXkDb2X.js} +1 -1
  6. package/dist/DataTable-DN61toQQ.cjs +1 -0
  7. package/dist/{DataTable-BWABkdIL.js → DataTable-HDq8aOyj.js} +16 -16
  8. package/dist/{Legend-du4CJMG1.js → Legend-Be3l-GsN.js} +2 -2
  9. package/dist/{Legend-Bf8J9KZk.cjs → Legend-CxDZJIS9.cjs} +1 -1
  10. package/dist/PackageVersion-Cg_0Xov6.cjs +1 -0
  11. package/dist/{PackageVersion-Dqo8V-i_.js → PackageVersion-DL-70o6h.js} +3 -3
  12. package/dist/{PenAndPaper-QsaleY3R.js → PenAndPaper-C1v_7F2S.js} +161 -152
  13. package/dist/PenAndPaper-DpBM14U6.cjs +1 -0
  14. package/dist/{Shape-QydDpcqr.cjs → Shape-BeLBzUjm.cjs} +1 -1
  15. package/dist/{Shape-D_MGNYEa.js → Shape-DBqyaB9e.js} +1 -1
  16. package/dist/{Slicer-DKXIt2om.js → Slicer-BLv_S96I.js} +27 -28
  17. package/dist/Slicer-CvS2n5RR.cjs +1 -0
  18. package/dist/Title-CUoXs-XJ.cjs +1 -0
  19. package/dist/{Title-MKfkLka7.js → Title-rp5eHDVc.js} +8 -6
  20. package/dist/{Tooltip-BUMgVEu0.js → Tooltip-3XUFn6mK.js} +1 -1
  21. package/dist/{Tooltip-pA64woiQ.cjs → Tooltip-TqkUkWoH.cjs} +1 -1
  22. package/dist/documentation/installation.md +4 -4
  23. package/dist/{index-Bmq5HB9y.cjs → index-BfKO0mWG.cjs} +1 -1
  24. package/dist/{index-B8uVRkA1.js → index-GSCW0GhW.js} +1 -1
  25. package/dist/{index.es-BPcAjoFs.cjs → index.es-BvQiZh48.cjs} +6 -6
  26. package/dist/{index.es-7iEFeLUn.js → index.es-CsuAZrEh.js} +156 -157
  27. package/dist/jspdf.es.min-BJ0rgkUJ.cjs +243 -0
  28. package/dist/{jspdf.es.min-BnFm7Kpu.js → jspdf.es.min-af-Xj86b.js} +3834 -3784
  29. package/dist/{pdf-BoHS1PAA.cjs → pdf-DV2jHb_u.cjs} +1 -1
  30. package/dist/{pdf-FHG-_t_f.js → pdf-d7kl0_wm.js} +1 -1
  31. package/dist/{purify.es-BwOkayRK.js → purify.es-CKk_t3XZ.js} +72 -72
  32. package/dist/purify.es-CYVvLED6.cjs +3 -0
  33. package/dist/style.css +1 -1
  34. package/dist/{useNestedProp-CivZENAh.cjs → useNestedProp-D9fZbCk6.cjs} +1 -1
  35. package/dist/{useNestedProp-kStEZqtl.js → useNestedProp-Da-DNb_v.js} +1 -1
  36. package/dist/{usePrinter-Cf6Zct5m.cjs → usePrinter-B3WcbJUK.cjs} +1 -1
  37. package/dist/{usePrinter-CppD6oY_.js → usePrinter-BBNI0jHz.js} +3 -3
  38. package/dist/{vue-data-ui-ZZGY9nKv.js → vue-data-ui-BMhjdzlo.js} +62 -63
  39. package/dist/{vue-data-ui-HGY4nSGa.cjs → vue-data-ui-CFwQh6Nq.cjs} +1 -1
  40. package/dist/vue-data-ui.cjs +1 -1
  41. package/dist/vue-data-ui.js +1 -1
  42. package/dist/{vue-ui-3d-bar-BMZJgQzl.cjs → vue-ui-3d-bar-CsS9ZcR3.cjs} +2 -2
  43. package/dist/{vue-ui-3d-bar-DbhESYsC.js → vue-ui-3d-bar-DDrynTng.js} +10 -10
  44. package/dist/{vue-ui-accordion-CE2Pnpz3.js → vue-ui-accordion-CON_m6tj.js} +3 -3
  45. package/dist/{vue-ui-accordion-WWblnzaJ.cjs → vue-ui-accordion-CmsJv79_.cjs} +1 -1
  46. package/dist/{vue-ui-age-pyramid-DzPdTFTe.cjs → vue-ui-age-pyramid-DgMe9Sqk.cjs} +1 -1
  47. package/dist/{vue-ui-age-pyramid-CxW84Zy4.js → vue-ui-age-pyramid-vU0sQoum.js} +11 -11
  48. package/dist/{vue-ui-annotator-D5PCmH8u.cjs → vue-ui-annotator-CtH1hYMx.cjs} +1 -1
  49. package/dist/{vue-ui-annotator-DuS_kY-C.js → vue-ui-annotator-DDRpeWP1.js} +2 -2
  50. package/dist/{vue-ui-bullet-DND6LL0P.cjs → vue-ui-bullet-BPul6l6-.cjs} +2 -2
  51. package/dist/{vue-ui-bullet-CvB9cU_g.js → vue-ui-bullet-DE7BmFGO.js} +31 -31
  52. package/dist/{vue-ui-candlestick-C76ZVkkY.js → vue-ui-candlestick-BGfV1DZA.js} +12 -12
  53. package/dist/{vue-ui-candlestick-Bq4VyBVk.cjs → vue-ui-candlestick-D15TN1B5.cjs} +2 -2
  54. package/dist/vue-ui-carousel-table-BSa3YZb-.cjs +1 -0
  55. package/dist/{vue-ui-carousel-table-DPlos7Us.js → vue-ui-carousel-table-Bf9taWM2.js} +6 -5
  56. package/dist/{vue-ui-chestnut-CH1rO8yv.cjs → vue-ui-chestnut-8xbioUz3.cjs} +1 -1
  57. package/dist/{vue-ui-chestnut-CB4BA3mx.js → vue-ui-chestnut-DxRlK4Ay.js} +8 -8
  58. package/dist/{vue-ui-circle-pack-DslAztEw.js → vue-ui-circle-pack-CyDslseR.js} +12 -12
  59. package/dist/{vue-ui-circle-pack-T0baWnD4.cjs → vue-ui-circle-pack-muRA6J_Y.cjs} +1 -1
  60. package/dist/{vue-ui-cursor-CNrbLYcU.js → vue-ui-cursor-BHY7dRog.js} +3 -3
  61. package/dist/{vue-ui-cursor-tyy0Lbsc.cjs → vue-ui-cursor-D4yJTLt5.cjs} +1 -1
  62. package/dist/vue-ui-dashboard-DE0dhNVo.cjs +1 -0
  63. package/dist/{vue-ui-dashboard-BIQYUy0X.js → vue-ui-dashboard-Det8LJYN.js} +48 -48
  64. package/dist/{vue-ui-digits-9j9HvJAE.cjs → vue-ui-digits-BzhR0Mcn.cjs} +1 -1
  65. package/dist/{vue-ui-digits-B9zkzbxp.js → vue-ui-digits-Dt0qid-W.js} +3 -2
  66. package/dist/{vue-ui-donut-MNv-tPgT.cjs → vue-ui-donut-DaL830Ey.cjs} +1 -1
  67. package/dist/{vue-ui-donut-CTTVwsjp.js → vue-ui-donut-DaZEHulO.js} +12 -12
  68. package/dist/{vue-ui-donut-evolution-QrqawlMF.js → vue-ui-donut-evolution-DV83Qhft.js} +11 -11
  69. package/dist/{vue-ui-donut-evolution-ByfZmrmA.cjs → vue-ui-donut-evolution-Do_yzP73.cjs} +1 -1
  70. package/dist/{vue-ui-dumbbell-DdFhLM7x.cjs → vue-ui-dumbbell-D6RVlN16.cjs} +2 -2
  71. package/dist/{vue-ui-dumbbell-DbJC4PQf.js → vue-ui-dumbbell-_iB2kwjj.js} +187 -187
  72. package/dist/{vue-ui-flow-oXRtEqoD.js → vue-ui-flow-Dj9hwrL4.js} +31 -31
  73. package/dist/{vue-ui-flow-D3fu0o6H.cjs → vue-ui-flow-sPkKbG2Q.cjs} +1 -1
  74. package/dist/vue-ui-funnel-CPbO8wzf.cjs +1 -0
  75. package/dist/{vue-ui-funnel-wG5mmmoA.js → vue-ui-funnel-vsQxjwYY.js} +11 -11
  76. package/dist/{vue-ui-galaxy-DKsUFAVZ.js → vue-ui-galaxy-CK0YM3XM.js} +12 -12
  77. package/dist/{vue-ui-galaxy-D0chyXGV.cjs → vue-ui-galaxy-CbP6ke1z.cjs} +1 -1
  78. package/dist/{vue-ui-gauge-BgRQ_PbK.cjs → vue-ui-gauge-Czyxfawo.cjs} +1 -1
  79. package/dist/{vue-ui-gauge-CVS_Ragk.js → vue-ui-gauge-yJY1BsSw.js} +7 -7
  80. package/dist/{vue-ui-gizmo-Dhu6rJ9P.cjs → vue-ui-gizmo-2asc_BoL.cjs} +1 -1
  81. package/dist/{vue-ui-gizmo-D4BHhwJ8.js → vue-ui-gizmo-Csxmw_4Z.js} +3 -3
  82. package/dist/{vue-ui-heatmap-EGSWPEkM.cjs → vue-ui-heatmap-BoVcNorO.cjs} +1 -1
  83. package/dist/{vue-ui-heatmap-BGioOZJj.js → vue-ui-heatmap-DvtEgwd7.js} +10 -10
  84. package/dist/{vue-ui-history-plot-Be4mtSAH.cjs → vue-ui-history-plot-DClZa2Vh.cjs} +1 -1
  85. package/dist/{vue-ui-history-plot-B18G7ARJ.js → vue-ui-history-plot-jXu_grNZ.js} +12 -12
  86. package/dist/{vue-ui-kpi-BK1Vq6tA.js → vue-ui-kpi-B9srgPYW.js} +3 -3
  87. package/dist/{vue-ui-kpi-B7rHhQ3H.cjs → vue-ui-kpi-BmLtKTLO.cjs} +1 -1
  88. package/dist/vue-ui-mini-loader-BRg64vUC.cjs +1 -0
  89. package/dist/{vue-ui-mini-loader-lAOgjMme.js → vue-ui-mini-loader-BwE1E9sj.js} +7 -6
  90. package/dist/{vue-ui-molecule-TSwsc6wZ.cjs → vue-ui-molecule-BmriFNB0.cjs} +1 -1
  91. package/dist/{vue-ui-molecule-DEKmU-Mx.js → vue-ui-molecule-ZvqDoyQn.js} +50 -50
  92. package/dist/{vue-ui-mood-radar-6XZfljIe.js → vue-ui-mood-radar-CF_CFAho.js} +47 -46
  93. package/dist/vue-ui-mood-radar-CGhu07bI.cjs +1 -0
  94. package/dist/{vue-ui-nested-donuts-Cl8xdJU6.js → vue-ui-nested-donuts-Co3gUruy.js} +12 -13
  95. package/dist/{vue-ui-nested-donuts--A1qjixG.cjs → vue-ui-nested-donuts-TQhesJpT.cjs} +2 -2
  96. package/dist/{vue-ui-onion-C32u8Ezk.cjs → vue-ui-onion-BPTDTiWh.cjs} +1 -1
  97. package/dist/{vue-ui-onion-CPlqANiN.js → vue-ui-onion-D5fU3bvZ.js} +11 -11
  98. package/dist/{vue-ui-parallel-coordinate-plot-BY0t_Hc_.cjs → vue-ui-parallel-coordinate-plot-BDQK9tcd.cjs} +1 -1
  99. package/dist/{vue-ui-parallel-coordinate-plot-95RlJka2.js → vue-ui-parallel-coordinate-plot-S6Ru7Se6.js} +12 -12
  100. package/dist/{vue-ui-quadrant-CWwHr8BX.cjs → vue-ui-quadrant-CaWYkjaC.cjs} +1 -1
  101. package/dist/{vue-ui-quadrant-C_BIZcc8.js → vue-ui-quadrant-iUoaNCjW.js} +12 -12
  102. package/dist/{vue-ui-quick-chart-BZ5n0UQy.js → vue-ui-quick-chart-Bi37MmKx.js} +9 -9
  103. package/dist/{vue-ui-quick-chart-CZYAIILY.cjs → vue-ui-quick-chart-C-RgDysS.cjs} +1 -1
  104. package/dist/{vue-ui-radar-Ddu3Dzxx.js → vue-ui-radar-CopgFTuf.js} +12 -12
  105. package/dist/{vue-ui-radar-D4XBfJym.cjs → vue-ui-radar-vLsuc2uC.cjs} +1 -1
  106. package/dist/vue-ui-rating-B5hwtW5c.cjs +1 -0
  107. package/dist/vue-ui-rating-DLpcRbMZ.js +350 -0
  108. package/dist/{vue-ui-relation-circle-B_xPyr_-.js → vue-ui-relation-circle-9JR989rq.js} +7 -7
  109. package/dist/{vue-ui-relation-circle-8Kw5PdZD.cjs → vue-ui-relation-circle-DXtlx7Lb.cjs} +1 -1
  110. package/dist/{vue-ui-rings-CuLwbEa2.cjs → vue-ui-rings-BcsA17T9.cjs} +1 -1
  111. package/dist/{vue-ui-rings-pjfgnXyP.js → vue-ui-rings-aF4qo-1b.js} +12 -12
  112. package/dist/{vue-ui-scatter-x6zrT3IA.js → vue-ui-scatter-BKPsLeSZ.js} +12 -12
  113. package/dist/{vue-ui-scatter-YQ4zYJj0.cjs → vue-ui-scatter-CsrRv5Fs.cjs} +1 -1
  114. package/dist/{vue-ui-screenshot-D3k8rLXz.cjs → vue-ui-screenshot-CseUdcVu.cjs} +1 -1
  115. package/dist/{vue-ui-screenshot-DeKe5Csw.js → vue-ui-screenshot-D7IGq1jh.js} +1 -1
  116. package/dist/{vue-ui-skeleton-BC7kQhlE.js → vue-ui-skeleton-C0nuwFlf.js} +3 -3
  117. package/dist/{vue-ui-skeleton-D5890icn.cjs → vue-ui-skeleton-C9gd5UnC.cjs} +1 -1
  118. package/dist/{vue-ui-smiley-5evB5mWX.js → vue-ui-smiley-BE7j-VIB.js} +127 -125
  119. package/dist/{vue-ui-smiley-CNlhfa-H.cjs → vue-ui-smiley-DTJ3ccy1.cjs} +2 -2
  120. package/dist/{vue-ui-spark-trend-CuqG_rtb.cjs → vue-ui-spark-trend-D90EITXN.cjs} +1 -1
  121. package/dist/{vue-ui-spark-trend-BgZ0JbXH.js → vue-ui-spark-trend-vfSFcF96.js} +5 -5
  122. package/dist/vue-ui-sparkbar-B58Oyi3V.cjs +1 -0
  123. package/dist/{vue-ui-sparkbar-DkAi7xTy.js → vue-ui-sparkbar-DIjx229h.js} +37 -36
  124. package/dist/vue-ui-sparkgauge-Cz_40HEF.cjs +1 -0
  125. package/dist/{vue-ui-sparkgauge-BPhv4OLb.js → vue-ui-sparkgauge-DeshRwS5.js} +5 -4
  126. package/dist/{vue-ui-sparkhistogram-CvhqCMzj.js → vue-ui-sparkhistogram-ncgZ4wZw.js} +8 -7
  127. package/dist/vue-ui-sparkhistogram-r0bo1TVB.cjs +1 -0
  128. package/dist/{vue-ui-sparkline-TSwCmhPw.js → vue-ui-sparkline-DkisQakm.js} +4 -4
  129. package/dist/{vue-ui-sparkline-DAaH0160.cjs → vue-ui-sparkline-v244B9Zh.cjs} +1 -1
  130. package/dist/{vue-ui-sparkstackbar-BoS2_lla.js → vue-ui-sparkstackbar-C1iw9bm9.js} +7 -6
  131. package/dist/vue-ui-sparkstackbar-DXGhRt_y.cjs +1 -0
  132. package/dist/{vue-ui-stackbar-BEN8-V44.js → vue-ui-stackbar-BJVWyXjW.js} +14 -14
  133. package/dist/{vue-ui-stackbar-COZlH_nE.cjs → vue-ui-stackbar-BwLjbytq.cjs} +2 -2
  134. package/dist/{vue-ui-strip-plot-Cbd43lkd.js → vue-ui-strip-plot-BfqGpkmV.js} +11 -11
  135. package/dist/{vue-ui-strip-plot-zTtIMHMC.cjs → vue-ui-strip-plot-DyKHX-kX.cjs} +1 -1
  136. package/dist/{vue-ui-table-D3n9zK4_.cjs → vue-ui-table-DVxvUAL_.cjs} +1 -1
  137. package/dist/{vue-ui-table-Cdn-p4Sv.js → vue-ui-table-DciQKFtv.js} +1 -1
  138. package/dist/{vue-ui-table-heatmap-1gluLlyr.cjs → vue-ui-table-heatmap-BAhB_Cgh.cjs} +1 -1
  139. package/dist/{vue-ui-table-heatmap-DUoSqJAq.js → vue-ui-table-heatmap-BFmXRCdL.js} +4 -4
  140. package/dist/{vue-ui-table-sparkline-B6WbUZ-8.js → vue-ui-table-sparkline-79PG8n93.js} +8 -8
  141. package/dist/vue-ui-table-sparkline-BateR2Nz.cjs +1 -0
  142. package/dist/{vue-ui-thermometer-DO8jsmEA.cjs → vue-ui-thermometer-Bf5S9d7h.cjs} +1 -1
  143. package/dist/{vue-ui-thermometer-CYPaaRUL.js → vue-ui-thermometer-Cv2PMArr.js} +7 -7
  144. package/dist/{vue-ui-timer-BxB-pqMO.cjs → vue-ui-timer-DPqbrtc0.cjs} +1 -1
  145. package/dist/{vue-ui-timer-DVDPJaIq.js → vue-ui-timer-p0-7GCR6.js} +5 -5
  146. package/dist/{vue-ui-tiremarks-CHJQsXBn.cjs → vue-ui-tiremarks-CnevyfMg.cjs} +1 -1
  147. package/dist/{vue-ui-tiremarks-LeiTjrNE.js → vue-ui-tiremarks-DQg85vxU.js} +7 -7
  148. package/dist/{vue-ui-treemap-5vtoQA3B.cjs → vue-ui-treemap-CBRiSqHG.cjs} +1 -1
  149. package/dist/{vue-ui-treemap-D1qUMxJQ.js → vue-ui-treemap-DYf1uva6.js} +11 -11
  150. package/dist/{vue-ui-vertical-bar-BvooiWAc.cjs → vue-ui-vertical-bar-BmevaDcu.cjs} +1 -1
  151. package/dist/{vue-ui-vertical-bar-BjqeLwN6.js → vue-ui-vertical-bar-CRs5V3rk.js} +12 -12
  152. package/dist/{vue-ui-waffle-I9RUtRMp.cjs → vue-ui-waffle-VI2f9E3q.cjs} +1 -1
  153. package/dist/{vue-ui-waffle-DphHhyQF.js → vue-ui-waffle-mwsZ_eXx.js} +12 -12
  154. package/dist/{vue-ui-wheel-KJdapRnF.cjs → vue-ui-wheel-BA5MJUFr.cjs} +1 -1
  155. package/dist/{vue-ui-wheel-BloNNVqT.js → vue-ui-wheel-BrG1edQA.js} +7 -7
  156. package/dist/{vue-ui-word-cloud-BLpGQgdL.cjs → vue-ui-word-cloud-D0UHYoi6.cjs} +1 -1
  157. package/dist/{vue-ui-word-cloud-wxMpsmI9.js → vue-ui-word-cloud-Z9GyNMNG.js} +10 -10
  158. package/dist/{vue-ui-xy-Zy60Z2c1.js → vue-ui-xy-9bRzt40K.js} +15 -15
  159. package/dist/{vue-ui-xy-BEgKs6jA.cjs → vue-ui-xy-CAMdsd6U.cjs} +2 -2
  160. package/dist/{vue-ui-xy-canvas-rKk7-Q2Q.cjs → vue-ui-xy-canvas-BPxSRcBh.cjs} +3 -3
  161. package/dist/{vue-ui-xy-canvas-zINzDQlN.js → vue-ui-xy-canvas-Bfhn01pO.js} +13 -13
  162. package/package.json +3 -3
  163. package/dist/DataTable-Cybmjq2W.cjs +0 -1
  164. package/dist/PackageVersion-Bmro6-lR.cjs +0 -1
  165. package/dist/PenAndPaper-B7dv_ssy.cjs +0 -1
  166. package/dist/Slicer-Vzo3baUi.cjs +0 -1
  167. package/dist/Title-x7Hmi2zb.cjs +0 -1
  168. package/dist/jspdf.es.min-D9E1Pwzv.cjs +0 -243
  169. package/dist/purify.es-BJHiDXdY.cjs +0 -3
  170. package/dist/vue-ui-carousel-table-CdwSAavZ.cjs +0 -1
  171. package/dist/vue-ui-dashboard-2EJIfom5.cjs +0 -1
  172. package/dist/vue-ui-funnel-Btk9EM8C.cjs +0 -1
  173. package/dist/vue-ui-mini-loader-DrWDl3Hc.cjs +0 -1
  174. package/dist/vue-ui-mood-radar-vLXtDHcR.cjs +0 -1
  175. package/dist/vue-ui-rating-C7MH_wxf.js +0 -327
  176. package/dist/vue-ui-rating-WjFEnnp5.cjs +0 -1
  177. package/dist/vue-ui-sparkbar-DrG8Dq7-.cjs +0 -1
  178. package/dist/vue-ui-sparkgauge-C8JczQHv.cjs +0 -1
  179. package/dist/vue-ui-sparkhistogram-e9JHVPef.cjs +0 -1
  180. package/dist/vue-ui-sparkstackbar-r_awjtOp.cjs +0 -1
  181. package/dist/vue-ui-table-sparkline-axmTWfsW.cjs +0 -1
@@ -1,15 +1,15 @@
1
- import { computed as c, onMounted as Ce, ref as v, watch as we, createElementBlock as y, openBlock as r, unref as a, normalizeStyle as L, normalizeClass as Z, createBlock as p, createCommentVNode as u, renderSlot as h, createVNode as U, createSlots as xe, withCtx as m, normalizeProps as B, guardReactiveProps as D, createElementVNode as s, Fragment as ee, renderList as te, toDisplayString as P, createTextVNode as oe, nextTick as _e } from "vue";
2
- import { u as $e, o as Me, e as le, c as Pe, a as Ne, P as Ae, X as Oe, s as C, w as Te, Q as Le, i as ae, f as I, q as Ie, r as Fe } from "./index-B8uVRkA1.js";
3
- import { _ as Se } from "./Title-MKfkLka7.js";
4
- import { u as Ve, U as je } from "./usePrinter-CppD6oY_.js";
5
- import { L as Ue } from "./Legend-du4CJMG1.js";
6
- import N from "./BaseIcon-DTJIrD3k.js";
7
- import { D as Be } from "./DataTable-BWABkdIL.js";
8
- import De from "./vue-ui-skeleton-BC7kQhlE.js";
9
- import We from "./vue-ui-accordion-CE2Pnpz3.js";
10
- import { u as se } from "./useNestedProp-kStEZqtl.js";
11
- import { _ as ze } from "./PackageVersion-Dqo8V-i_.js";
12
- import { P as Ee } from "./PenAndPaper-QsaleY3R.js";
1
+ import { computed as c, onMounted as Ce, ref as v, watch as we, createElementBlock as y, openBlock as r, unref as a, normalizeStyle as L, normalizeClass as Z, createBlock as p, createCommentVNode as u, renderSlot as h, createVNode as U, createSlots as xe, withCtx as m, normalizeProps as B, guardReactiveProps as D, createElementVNode as s, Fragment as ee, renderList as te, toDisplayString as N, createTextVNode as oe, nextTick as _e } from "vue";
2
+ import { u as $e, o as Me, e as le, c as Pe, a as Ne, P as Ae, X as Oe, s as C, w as Te, Q as Le, i as ae, f as F, q as Fe, r as Ie } from "./index-GSCW0GhW.js";
3
+ import { _ as Se } from "./Title-rp5eHDVc.js";
4
+ import { u as Ve, U as je } from "./usePrinter-BBNI0jHz.js";
5
+ import { L as Ue } from "./Legend-Be3l-GsN.js";
6
+ import A from "./BaseIcon-BhXkDb2X.js";
7
+ import { D as Be } from "./DataTable-HDq8aOyj.js";
8
+ import De from "./vue-ui-skeleton-C0nuwFlf.js";
9
+ import We from "./vue-ui-accordion-CON_m6tj.js";
10
+ import { u as se } from "./useNestedProp-Da-DNb_v.js";
11
+ import { _ as ze } from "./PackageVersion-DL-70o6h.js";
12
+ import { P as Ee } from "./PenAndPaper-C1v_7F2S.js";
13
13
  import { u as Ge } from "./useUserOptionState-BIvW1Kz7.js";
14
14
  import { _ as He } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
15
  const Re = ["id"], Xe = {
@@ -49,7 +49,7 @@ const Re = ["id"], Xe = {
49
49
  type: "dataset"
50
50
  });
51
51
  }
52
- const _ = v(Pe()), F = v(null), ie = v(null), n = v(null), de = v(null), ce = v(0), ve = v(0), z = v(0), e = c({
52
+ const _ = v(Pe()), I = v(null), ie = v(null), n = v(null), de = v(null), ce = v(0), ve = v(0), z = v(0), e = c({
53
53
  get: () => H(),
54
54
  set: (o) => o
55
55
  }), { userOptionsVisible: S, setUserOptionsVisibility: E, keepUserOptionState: G } = Ge({ config: e.value });
@@ -82,11 +82,11 @@ const Re = ["id"], Xe = {
82
82
  sides: 5,
83
83
  rotation: 11
84
84
  }));
85
- function he({ centerX: o, centerY: l, apexX: t, apexY: d, proportion: k, key: M, value: be }) {
85
+ function he({ centerX: o, centerY: l, apexX: t, apexY: d, proportion: k, key: P, value: be }) {
86
86
  return {
87
87
  x: o + (t - o) * k,
88
88
  y: l + (d - l) * k,
89
- key: M,
89
+ key: P,
90
90
  value: be
91
91
  };
92
92
  }
@@ -142,22 +142,22 @@ const Re = ["id"], Xe = {
142
142
  _e(() => {
143
143
  const o = b.value.head.map((d, k) => [[
144
144
  d.name
145
- ], [b.value.body[k]], [isNaN(b.value.body[k] / w.value) ? "-" : b.value.body[k] / w.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), t = Ie(l);
146
- Fe({ csvContent: t, title: e.value.style.chart.title.text || "vue-ui-mood-radar" });
145
+ ], [b.value.body[k]], [isNaN(b.value.body[k] / w.value) ? "-" : b.value.body[k] / w.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), t = Fe(l);
146
+ Ie({ csvContent: t, title: e.value.style.chart.title.text || "vue-ui-mood-radar" });
147
147
  });
148
148
  }
149
- const A = c(() => {
149
+ const O = c(() => {
150
150
  const o = [
151
151
  ' <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>',
152
152
  Number(w.value.toFixed(e.value.table.td.roundingValue)).toLocaleString(),
153
153
  "100%"
154
- ], l = b.value.head.map((k, M) => [
154
+ ], l = b.value.head.map((k, P) => [
155
155
  {
156
156
  color: k.color,
157
157
  name: k.name
158
158
  },
159
- b.value.body[M].toFixed(e.value.table.td.roundingValue),
160
- isNaN(b.value.body[M] / w.value) ? "-" : (b.value.body[M] / w.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
159
+ b.value.body[P].toFixed(e.value.table.td.roundingValue),
160
+ isNaN(b.value.body[P] / w.value) ? "-" : (b.value.body[P] / w.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
161
161
  ]), t = {
162
162
  th: {
163
163
  backgroundColor: e.value.table.th.backgroundColor,
@@ -188,9 +188,9 @@ const Re = ["id"], Xe = {
188
188
  function J() {
189
189
  $.value.showTable = !$.value.showTable;
190
190
  }
191
- const O = v(!1);
191
+ const M = v(!1);
192
192
  function ke(o) {
193
- O.value = o;
193
+ M.value = o;
194
194
  }
195
195
  const T = v(!1);
196
196
  function j() {
@@ -204,9 +204,9 @@ const Re = ["id"], Xe = {
204
204
  toggleTable: J,
205
205
  toggleAnnotator: j
206
206
  }), (o, l) => (r(), y("div", {
207
- class: Z(`vue-ui-mood-radar ${O.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
207
+ class: Z(`vue-ui-mood-radar ${M.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
208
208
  ref_key: "moodRadarChart",
209
- ref: F,
209
+ ref: I,
210
210
  id: `${_.value}`,
211
211
  style: L(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
212
212
  onMouseenter: l[11] || (l[11] = () => a(E)(!0)),
@@ -214,7 +214,7 @@ const Re = ["id"], Xe = {
214
214
  }, [
215
215
  e.value.userOptions.buttons.annotator ? (r(), p(Ee, {
216
216
  key: 0,
217
- parent: F.value,
217
+ parent: I.value,
218
218
  backgroundColor: e.value.style.chart.backgroundColor,
219
219
  color: e.value.style.chart.color,
220
220
  active: T.value,
@@ -255,8 +255,9 @@ const Re = ["id"], Xe = {
255
255
  hasImg: e.value.userOptions.buttons.img,
256
256
  hasTable: e.value.userOptions.buttons.table,
257
257
  hasFullscreen: e.value.userOptions.buttons.fullscreen,
258
+ isFullscreen: M.value,
258
259
  titles: { ...e.value.userOptions.buttonTitles },
259
- chartElement: F.value,
260
+ chartElement: I.value,
260
261
  position: e.value.userOptions.position,
261
262
  hasAnnotator: e.value.userOptions.buttons.annotator,
262
263
  isAnnotation: T.value,
@@ -312,12 +313,12 @@ const Re = ["id"], Xe = {
312
313
  ]),
313
314
  key: "5"
314
315
  } : void 0
315
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : u("", !0),
316
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : u("", !0),
316
317
  x.value ? (r(), y("svg", {
317
318
  key: 4,
318
319
  xmlns: a(Oe),
319
320
  viewBox: `0 0 ${f.value.width} ${f.value.height}`,
320
- class: Z({ "vue-data-ui-fullscreen--on": O.value, "vue-data-ui-fulscreen--off": !O.value }),
321
+ class: Z({ "vue-data-ui-fullscreen--on": M.value, "vue-data-ui-fulscreen--off": !M.value }),
321
322
  style: L(`overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
322
323
  }, [
323
324
  U(ze),
@@ -490,10 +491,10 @@ const Re = ["id"], Xe = {
490
491
  "font-size": "12",
491
492
  "text-anchor": "middle",
492
493
  "font-weight": e.value.style.chart.layout.dataLabel.bold ? "bold" : "normal"
493
- }, P(a(ae)(
494
+ }, N(a(ae)(
494
495
  e.value.style.chart.layout.dataLabel.formatter,
495
496
  t.value,
496
- a(I)({
497
+ a(F)({
497
498
  p: e.value.style.chart.layout.dataLabel.prefix,
498
499
  v: t.value,
499
500
  s: e.value.style.chart.layout.dataLabel.suffix,
@@ -507,7 +508,7 @@ const Re = ["id"], Xe = {
507
508
  fill: e.value.style.chart.layout.dataLabel.color,
508
509
  "font-size": "12",
509
510
  "text-anchor": "middle"
510
- }, " (" + P(a(I)({
511
+ }, " (" + N(a(F)({
511
512
  v: t.value / w.value * 100,
512
513
  s: "%",
513
514
  r: e.value.style.chart.layout.dataLabel.roundingPercentage
@@ -546,40 +547,40 @@ const Re = ["id"], Xe = {
546
547
  onClick: () => me(t.key),
547
548
  style: { display: "flex", "flex-direction": "row", gap: "3px", "align-items": "center", margin: "3px 0" }
548
549
  }, [
549
- t.key == 1 ? (r(), p(N, {
550
+ t.key == 1 ? (r(), p(A, {
550
551
  key: 0,
551
552
  strokeWidth: 1,
552
553
  name: "moodSad",
553
554
  stroke: e.value.style.chart.layout.smileys.colors[t.key]
554
555
  }, null, 8, ["stroke"])) : u("", !0),
555
- t.key == 2 ? (r(), p(N, {
556
+ t.key == 2 ? (r(), p(A, {
556
557
  key: 1,
557
558
  strokeWidth: 1,
558
559
  name: "moodFlat",
559
560
  stroke: e.value.style.chart.layout.smileys.colors[t.key]
560
561
  }, null, 8, ["stroke"])) : u("", !0),
561
- t.key == 3 ? (r(), p(N, {
562
+ t.key == 3 ? (r(), p(A, {
562
563
  key: 2,
563
564
  strokeWidth: 1,
564
565
  name: "moodNeutral",
565
566
  stroke: e.value.style.chart.layout.smileys.colors[t.key]
566
567
  }, null, 8, ["stroke"])) : u("", !0),
567
- t.key == 4 ? (r(), p(N, {
568
+ t.key == 4 ? (r(), p(A, {
568
569
  key: 3,
569
570
  strokeWidth: 1,
570
571
  name: "smiley",
571
572
  stroke: e.value.style.chart.layout.smileys.colors[t.key]
572
573
  }, null, 8, ["stroke"])) : u("", !0),
573
- t.key == 5 ? (r(), p(N, {
574
+ t.key == 5 ? (r(), p(A, {
574
575
  key: 4,
575
576
  strokeWidth: 1,
576
577
  name: "moodHappy",
577
578
  stroke: e.value.style.chart.layout.smileys.colors[t.key]
578
579
  }, null, 8, ["stroke"])) : u("", !0),
579
- s("span", kt, P(a(ae)(
580
+ s("span", kt, N(a(ae)(
580
581
  e.value.style.chart.layout.dataLabel.formatter,
581
582
  t.value,
582
- a(I)({
583
+ a(F)({
583
584
  p: e.value.style.chart.layout.dataLabel.prefix,
584
585
  v: t.value,
585
586
  s: e.value.style.chart.layout.dataLabel.suffix,
@@ -587,7 +588,7 @@ const Re = ["id"], Xe = {
587
588
  }),
588
589
  { datapoint: t, seriesIndex: d }
589
590
  )), 1),
590
- oe(" (" + P(a(I)({
591
+ oe(" (" + N(a(F)({
591
592
  v: t.proportion * 100,
592
593
  s: "%",
593
594
  r: e.value.style.chart.legend.roundingPercentage
@@ -618,10 +619,10 @@ const Re = ["id"], Xe = {
618
619
  }, {
619
620
  content: m(() => [
620
621
  U(Be, {
621
- colNames: A.value.colNames,
622
- head: A.value.head,
623
- body: A.value.body,
624
- config: A.value.config,
622
+ colNames: O.value.colNames,
623
+ head: O.value.head,
624
+ body: O.value.body,
625
+ config: O.value.config,
625
626
  title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
626
627
  onClose: l[10] || (l[10] = (t) => $.value.showTable = !1)
627
628
  }, {
@@ -632,7 +633,7 @@ const Re = ["id"], Xe = {
632
633
  }, null, 8, Ct)
633
634
  ]),
634
635
  td: m(({ td: t }) => [
635
- oe(P(t.name || t), 1)
636
+ oe(N(t.name || t), 1)
636
637
  ]),
637
638
  _: 1
638
639
  }, 8, ["colNames", "head", "body", "config", "title"])
@@ -641,7 +642,7 @@ const Re = ["id"], Xe = {
641
642
  }, 8, ["config"])) : u("", !0)
642
643
  ], 46, Re));
643
644
  }
644
- }, jt = /* @__PURE__ */ He(wt, [["__scopeId", "data-v-171d740b"]]);
645
+ }, jt = /* @__PURE__ */ He(wt, [["__scopeId", "data-v-4ce58fc5"]]);
645
646
  export {
646
647
  jt as default
647
648
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BfKO0mWG.cjs"),te=require("./Title-CUoXs-XJ.cjs"),I=require("./usePrinter-B3WcbJUK.cjs"),oe=require("./Legend-CxDZJIS9.cjs"),g=require("./BaseIcon-BJi2tdtl.cjs"),le=require("./DataTable-DN61toQQ.cjs"),ae=require("./vue-ui-skeleton-C9gd5UnC.cjs"),re=require("./vue-ui-accordion-CmsJv79_.cjs"),q=require("./useNestedProp-D9fZbCk6.cjs"),ne=require("./PackageVersion-Cg_0Xov6.cjs"),se=require("./PenAndPaper-DpBM14U6.cjs"),ue=require("./useUserOptionState-BgepsfED.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],de={key:2,style:"width:100%;background:transparent"},ve=["xmlns","viewBox"],ye=["width","height"],me=["id"],he=["stop-color"],pe=["stop-color"],fe=["x1","y1","x2","y2","stroke","stroke-width"],ke=["d","stroke","stroke-width"],ge=["stroke"],be=["fill"],Ce=["stroke"],Ne=["fill"],we=["stroke"],xe=["fill"],Ve=["stroke"],_e=["fill"],Be=["stroke"],Pe=["fill"],$e=["d","stroke","stroke-width","fill"],Me=["x1","y1","stroke"],Ee=["cx","cy","fill","stroke"],Oe=["fill","stroke"],Se=["y","fill","font-weight"],Ae=["y","fill"],Te={key:5,class:"vue-data-ui-watermark"},Le=["onClick"],Fe={style:{"font-weight":"bold"}},Ie={key:8,ref:"source",dir:"auto"},qe=["innerHTML"],ze={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(z,{expose:D}){const{vue_ui_mood_radar:j}=r.useConfig(),s=z,m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),N=e.ref(null),U=e.ref(null),n=e.ref(null),W=e.ref(null),G=e.ref(0),H=e.ref(0),B=e.ref(0),t=e.computed({get:()=>M(),set:l=>l}),{userOptionsVisible:w,setUserOptionsVisibility:P,keepUserOptionState:$}=ue.useUserOptionState({config:t.value});function M(){const l=q.useNestedProp({userConfig:s.config,defaultConfig:j});return l.theme?{...q.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=M(),w.value=!t.value.userOptions.showOnChartHover,_(),G.value+=1,H.value+=1,B.value+=1,p.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:E,isImaging:O,generatePdf:S,generateImage:A}=I.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),R=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),p=e.ref({showTable:t.value.table.show}),i=e.computed(()=>({height:256,width:256})),x=e.computed(()=>r.createPolygonPath({plot:{x:128,y:i.value.height/2},radius:90,sides:5,rotation:11}));function X({centerX:l,centerY:a,apexX:o,apexY:u,proportion:d,key:k,value:ee}){return{x:l+(o-l)*d,y:a+(u-a)*d,key:k,value:ee}}const K=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),y=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),c=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/y.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),T=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),x.value.coordinates.map((l,a)=>{const o=X({centerX:i.value.width/2,centerY:i.value.height/2,apexX:l.x,apexY:l.y,proportion:c.value[a].value/K.value,key:c.value[a].key,value:c.value[a].value});return{...l,plots:o,key:c.value[a].key}})):[]),Y=e.computed(()=>({cy:"mood-radar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function J(l){l===n.value?n.value=null:n.value=l}const v=e.computed(()=>{const l=c.value.map(o=>({name:o.key,color:o.color})),a=c.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function L(){e.nextTick(()=>{const l=v.value.head.map((u,d)=>[[u.name],[v.value.body[d]],[isNaN(v.value.body[d]/y.value)?"-":v.value.body[d]/y.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const b=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(y.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=v.value.head.map((d,k)=>[{color:d.color,name:d.name},v.value.body[k].toFixed(t.value.table.td.roundingValue),isNaN(v.value.body[k]/y.value)?"-":(v.value.body[k]/y.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:u}});function Q(){return c.value}function F(){p.value.showTable=!p.value.showTable}const f=e.ref(!1);function Z(l){f.value=l}const C=e.ref(!1);function V(){C.value=!C.value}return D({getData:Q,generatePdf:S,generateCsv:L,generateImage:A,toggleTable:F,toggleAnnotator:V}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${f.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:N,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[11]||(a[11]=()=>e.unref(P)(!0)),onMouseleave:a[12]||(a[12]=()=>e.unref(P)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(se.PenAndPaper,{key:0,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:V},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),R.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:W,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",de,[e.createVNode(te._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref($)||e.unref(w))?(e.openBlock(),e.createBlock(I.UserOptions,{key:3,ref_key:"details",ref:U,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(E),isImaging:e.unref(O),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:f.value,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:Z,onGeneratePdf:e.unref(S),onGenerateCsv:L,onGenerateImage:e.unref(A),onToggleTable:F,onToggleAnnotator:V,style:e.normalizeStyle({visibility:e.unref($)?e.unref(w)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${i.value.width} ${i.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":f.value,"vue-data-ui-fulscreen--off":!f.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ne._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:i.value.width,height:i.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,ye)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,he),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,pe)],8,me)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:i.value.width/2,y1:i.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,fe))),256)),e.createElementVNode("path",{d:x.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,ke),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,ge),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,be),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,Ce),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,Ne),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,we),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,xe),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,Ve),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,_e),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,Be),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,Pe),e.createElementVNode("path",{d:e.unref(r.makePath)(T.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,$e),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value.map(o=>o.plots),(o,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,Me),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Ee),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Oe),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),9,Se),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/y.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,Ae)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,ve)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Te,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(E)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ae.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(oe.Legend,{legendSet:c.value,config:Y.value,key:`legend_${B.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>J(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(g.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(g.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(g.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(g.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(g.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",Fe,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Le)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:c.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(re.default,{key:9,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(le.DataTable,{colNames:b.value.colNames,head:b.value.head,body:b.value.body,config:b.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[10]||(a[10]=o=>p.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,qe)]),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,ce))}},De=ie._export_sfc(ze,[["__scopeId","data-v-4ce58fc5"]]);exports.default=De;
@@ -1,16 +1,16 @@
1
1
  import { computed as m, ref as i, watch as Ve, onMounted as at, onBeforeUnmount as ot, createElementBlock as n, openBlock as u, unref as r, normalizeStyle as K, normalizeClass as P, createBlock as D, createCommentVNode as f, createVNode as Me, createSlots as st, withCtx as k, renderSlot as w, normalizeProps as B, guardReactiveProps as E, createElementVNode as b, Fragment as C, renderList as F, toDisplayString as S, createTextVNode as Q, nextTick as ut } from "vue";
2
- import { u as nt, c as rt, t as it, p as Z, a as dt, o as vt, e as M, b as ct, J as Ue, d as ft, m as Be, f as x, X as ht, s as Ee, L as yt, k as ie, n as U, i as R, x as Re, q as pt, r as bt, y as gt } from "./index-B8uVRkA1.js";
2
+ import { u as nt, c as rt, t as it, p as Z, a as dt, o as vt, e as M, b as ct, J as Ue, d as ft, m as Be, f as x, X as ht, s as Ee, L as yt, k as ie, n as U, i as R, x as Re, q as pt, r as bt, y as gt } from "./index-GSCW0GhW.js";
3
3
  import { t as mt, u as kt } from "./useResponsive-CoxXLe23.js";
4
- import { _ as wt } from "./Title-MKfkLka7.js";
5
- import { u as $t, U as Lt } from "./usePrinter-CppD6oY_.js";
6
- import { D as Ct } from "./DataTable-BWABkdIL.js";
7
- import { _ as xt } from "./Tooltip-BUMgVEu0.js";
8
- import { L as _t } from "./Legend-du4CJMG1.js";
9
- import Tt from "./vue-ui-skeleton-BC7kQhlE.js";
10
- import Ft from "./vue-ui-accordion-CE2Pnpz3.js";
11
- import { u as Ge } from "./useNestedProp-kStEZqtl.js";
12
- import { _ as Nt } from "./PackageVersion-Dqo8V-i_.js";
13
- import { P as St } from "./PenAndPaper-QsaleY3R.js";
4
+ import { _ as wt } from "./Title-rp5eHDVc.js";
5
+ import { u as $t, U as Lt } from "./usePrinter-BBNI0jHz.js";
6
+ import { D as Ct } from "./DataTable-HDq8aOyj.js";
7
+ import { _ as xt } from "./Tooltip-3XUFn6mK.js";
8
+ import { L as _t } from "./Legend-Be3l-GsN.js";
9
+ import Tt from "./vue-ui-skeleton-C0nuwFlf.js";
10
+ import Ft from "./vue-ui-accordion-CON_m6tj.js";
11
+ import { u as Ge } from "./useNestedProp-Da-DNb_v.js";
12
+ import { _ as Nt } from "./PackageVersion-DL-70o6h.js";
13
+ import { P as St } from "./PenAndPaper-C1v_7F2S.js";
14
14
  import { u as Ot } from "./useUserOptionState-BIvW1Kz7.js";
15
15
  import { _ as At } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
16
  const It = ["id"], Pt = ["xmlns", "viewBox"], Dt = ["width", "height"], zt = ["id"], Vt = ["offset", "stop-color"], Mt = ["offset", "stop-opacity"], Ut = ["id"], Bt = ["id"], Et = ["id"], Rt = ["flood-color"], Gt = ["d", "fill", "stroke", "stroke-width", "filter"], Yt = { key: 1 }, Xt = ["d", "fill"], Ht = { key: 2 }, Wt = ["x", "y", "font-size", "font-weight", "fill"], qt = { key: 3 }, Jt = ["filter"], Kt = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], Qt = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], Zt = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], jt = ["d", "fill", "onMouseenter", "onClick"], el = {
@@ -758,7 +758,6 @@ const It = ["id"], Pt = ["xmlns", "viewBox"], Dt = ["width", "height"], zt = ["i
758
758
  (u(!0), n(C, null, F(X.value, (a, o) => (u(), n("g", null, [
759
759
  (u(!0), n(C, null, F(a.donut, (l, d) => (u(), n("g", null, [
760
760
  b("path", {
761
- "data-cy-donut-trap": "",
762
761
  d: l.arcSlice,
763
762
  fill: qe.value === o ? "rgba(0,0,0,0.1)" : "transparent",
764
763
  onMouseenter: (g) => et({
@@ -911,7 +910,7 @@ const It = ["id"], Pt = ["xmlns", "viewBox"], Dt = ["width", "height"], zt = ["i
911
910
  }, 8, ["config"])) : f("", !0)
912
911
  ], 46, It));
913
912
  }
914
- }, kl = /* @__PURE__ */ At(ol, [["__scopeId", "data-v-cf8b326c"]]);
913
+ }, kl = /* @__PURE__ */ At(ol, [["__scopeId", "data-v-93870f32"]]);
915
914
  export {
916
915
  kl as default
917
916
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Bmq5HB9y.cjs"),he=require("./useResponsive-BJ7DTGpm.cjs"),Ee=require("./Title-x7Hmi2zb.cjs"),ye=require("./usePrinter-Cf6Zct5m.cjs"),Fe=require("./DataTable-Cybmjq2W.cjs"),Te=require("./Tooltip-pA64woiQ.cjs"),Oe=require("./Legend-Bf8J9KZk.cjs"),Pe=require("./vue-ui-skeleton-D5890icn.cjs"),ze=require("./vue-ui-accordion-WWblnzaJ.cjs"),me=require("./useNestedProp-CivZENAh.cjs"),De=require("./PackageVersion-Bmro6-lR.cjs"),Ae=require("./PenAndPaper-B7dv_ssy.cjs"),Ie=require("./useUserOptionState-BgepsfED.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ue=["id"],qe=["xmlns","viewBox"],Re=["width","height"],Ye=["id"],Xe=["offset","stop-color"],Ge=["offset","stop-opacity"],He=["id"],We=["id"],Je=["id"],Ke=["flood-color"],Qe=["d","fill","stroke","stroke-width","filter"],Ze={key:1},je=["d","fill"],et={key:2},tt=["x","y","font-size","font-weight","fill"],lt={key:3},at=["filter"],ot=["text-anchor","x","y","fill","font-size","font-weight"],nt=["text-anchor","x","y","fill","font-size","font-weight"],rt=["text-anchor","x","y","fill","font-size","font-weight"],st=["d","fill","onMouseenter","onClick"],ut={key:5,class:"vue-data-ui-watermark"},it={key:0,class:"vue-ui-nested-donuts-legend-title"},ct=["onClick"],dt=["innerHTML"],vt={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(be,{expose:ge,emit:ke}){const{vue_ui_nested_donuts:Ce}=r.useConfig(),k=be,x=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(r.createUid()),F=e.ref(!1),T=e.ref(""),we=e.ref(null),q=e.ref(0),L=e.ref(null),R=e.ref(null),O=e.ref(null),Y=e.ref(null),X=e.ref(null),G=e.ref(0),H=e.ref(0),W=e.ref(0),B=e.ref(!1);function Le(l){B.value=l,q.value+=1}const t=e.computed({get:()=>Q(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:J,keepUserOptionState:K}=Ie.useUserOptionState({config:t.value});function Q(){const l=me.useNestedProp({userConfig:k.config,defaultConfig:Ce});return l.theme?{...me.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>k.config,l=>{t.value=Q(),P.value=!t.value.userOptions.showOnChartHover,Z(),G.value+=1,H.value+=1,W.value+=1,v.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const $=e.ref(null);e.onMounted(()=>{Z()});function Z(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=he.throttle(()=>{const{width:s,height:o}=he.useResponsive({chart:L.value,title:t.value.style.chart.title.text?R.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:Y.value,noTitle:X.value});requestAnimationFrame(()=>{c.value.width=s,c.value.height=o})});$.value=new ResizeObserver(l),$.value.observe(L.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:j,isImaging:ee,generatePdf:te,generateImage:le}=ye.usePrinter({elementId:`nested_donuts_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),xe=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),c=e.ref({height:512,width:512}),ae=ke;function $e({datapoint:l,index:s}){ae("selectDatapoint",{datapoint:l,index:s})}const f=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,s)=>({...l,total:l.series.filter(o=>!f.value.includes(o.id)).map(o=>r.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:s,id:`${h.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${h.value}_${s}`,id:`${h.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||xe.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:r.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),oe=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!f.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!f.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function Ne(l,s,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<s}const d=e.ref(oe.value);e.watch(()=>oe.value,l=>d.value=l);const ne=e.ref(null),re=e.ref(null);function z(l){ae("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=d.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),p=Ne(u,u.length-1,f.value);if(f.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(ne.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),ne.value=requestAnimationFrame(i))};f.value=f.value.filter(y=>y!==l.id),i()}else if(p){let i=function(){a<.1?(cancelAnimationFrame(re.value),f.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:0}:w)}))):(a/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:a}:w)})),re.value=requestAnimationFrame(i))};i()}}const D=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),se=e.computed(()=>d.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>d.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,D.value)}})),ue=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),ie=e.ref(null),S=e.ref(null),_=e.ref(null),A=e.ref(null);function Se({datapoint:l,_relativeIndex:s,seriesIndex:o}){ie.value=l.arcOfId,S.value=l.id,_.value=o,A.value={datapoint:l,seriesIndex:o,series:d.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:d.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:d.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0){const u=d.value.map(p=>p.series.find(i=>i.seriesIndex===o));u.forEach((p,i)=>{if(!p)return"";a+=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BfKO0mWG.cjs"),he=require("./useResponsive-BJ7DTGpm.cjs"),Ee=require("./Title-CUoXs-XJ.cjs"),ye=require("./usePrinter-B3WcbJUK.cjs"),Fe=require("./DataTable-DN61toQQ.cjs"),Te=require("./Tooltip-TqkUkWoH.cjs"),Oe=require("./Legend-CxDZJIS9.cjs"),Pe=require("./vue-ui-skeleton-C9gd5UnC.cjs"),ze=require("./vue-ui-accordion-CmsJv79_.cjs"),me=require("./useNestedProp-D9fZbCk6.cjs"),De=require("./PackageVersion-Cg_0Xov6.cjs"),Ae=require("./PenAndPaper-DpBM14U6.cjs"),Ie=require("./useUserOptionState-BgepsfED.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ue=["id"],qe=["xmlns","viewBox"],Re=["width","height"],Ye=["id"],Xe=["offset","stop-color"],Ge=["offset","stop-opacity"],He=["id"],We=["id"],Je=["id"],Ke=["flood-color"],Qe=["d","fill","stroke","stroke-width","filter"],Ze={key:1},je=["d","fill"],et={key:2},tt=["x","y","font-size","font-weight","fill"],lt={key:3},at=["filter"],ot=["text-anchor","x","y","fill","font-size","font-weight"],nt=["text-anchor","x","y","fill","font-size","font-weight"],rt=["text-anchor","x","y","fill","font-size","font-weight"],st=["d","fill","onMouseenter","onClick"],ut={key:5,class:"vue-data-ui-watermark"},it={key:0,class:"vue-ui-nested-donuts-legend-title"},ct=["onClick"],dt=["innerHTML"],vt={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(be,{expose:ge,emit:ke}){const{vue_ui_nested_donuts:Ce}=r.useConfig(),k=be,x=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(r.createUid()),F=e.ref(!1),T=e.ref(""),we=e.ref(null),q=e.ref(0),L=e.ref(null),R=e.ref(null),O=e.ref(null),Y=e.ref(null),X=e.ref(null),G=e.ref(0),H=e.ref(0),W=e.ref(0),B=e.ref(!1);function Le(l){B.value=l,q.value+=1}const t=e.computed({get:()=>Q(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:J,keepUserOptionState:K}=Ie.useUserOptionState({config:t.value});function Q(){const l=me.useNestedProp({userConfig:k.config,defaultConfig:Ce});return l.theme?{...me.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>k.config,l=>{t.value=Q(),P.value=!t.value.userOptions.showOnChartHover,Z(),G.value+=1,H.value+=1,W.value+=1,v.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const $=e.ref(null);e.onMounted(()=>{Z()});function Z(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=he.throttle(()=>{const{width:s,height:o}=he.useResponsive({chart:L.value,title:t.value.style.chart.title.text?R.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:Y.value,noTitle:X.value});requestAnimationFrame(()=>{c.value.width=s,c.value.height=o})});$.value=new ResizeObserver(l),$.value.observe(L.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:j,isImaging:ee,generatePdf:te,generateImage:le}=ye.usePrinter({elementId:`nested_donuts_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),xe=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),c=e.ref({height:512,width:512}),ae=ke;function $e({datapoint:l,index:s}){ae("selectDatapoint",{datapoint:l,index:s})}const f=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,s)=>({...l,total:l.series.filter(o=>!f.value.includes(o.id)).map(o=>r.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:s,id:`${h.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${h.value}_${s}`,id:`${h.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||xe.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:r.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),oe=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!f.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!f.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function Ne(l,s,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<s}const d=e.ref(oe.value);e.watch(()=>oe.value,l=>d.value=l);const ne=e.ref(null),re=e.ref(null);function z(l){ae("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=d.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),p=Ne(u,u.length-1,f.value);if(f.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(ne.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),ne.value=requestAnimationFrame(i))};f.value=f.value.filter(y=>y!==l.id),i()}else if(p){let i=function(){a<.1?(cancelAnimationFrame(re.value),f.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:0}:w)}))):(a/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:a}:w)})),re.value=requestAnimationFrame(i))};i()}}const D=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),se=e.computed(()=>d.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>d.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,D.value)}})),ue=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),ie=e.ref(null),S=e.ref(null),_=e.ref(null),A=e.ref(null);function Se({datapoint:l,_relativeIndex:s,seriesIndex:o}){ie.value=l.arcOfId,S.value=l.id,_.value=o,A.value={datapoint:l,seriesIndex:o,series:d.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:d.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:d.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0){const u=d.value.map(p=>p.series.find(i=>i.seriesIndex===o));u.forEach((p,i)=>{if(!p)return"";a+=`
2
2
  <div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
3
3
  <div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
4
4
  <svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
@@ -14,4 +14,4 @@
14
14
  ${t.value.style.chart.tooltip.showPercentage?`(${r.dataLabel({v:p.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})`:""}
15
15
  </span>
16
16
  </div>
17
- `})}else a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.arcOf??""} - ${l.name}</div>`,a+=`<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="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(a+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?a+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:a+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`);T.value=`<div style="font-size:${t.value.style.chart.tooltip.fontSize}px">${a}</div>`}F.value=!0}function I(l){return l.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function ce(l,s){if(!t.value.useBlurOnHover)return"";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0)return[null,void 0].includes(_.value)||_.value===s?"":`url(#blur_${h.value})`;if(!t.value.style.chart.tooltip.showAllItemsAtIndex||f.value.length)return[null,void 0].includes(S.value)||S.value===l.id?"":`url(#blur_${h.value})`}const M=e.computed(()=>m.value.map((l,s)=>l.series.map((o,n)=>({name:o.name,color:o.color,value:o.value,shape:"circle",arcOf:o.arcOf,id:o.id,seriesIndex:n,datasetIndex:s,total:l.series.filter(a=>!f.value.includes(a.id)).map(a=>a.value).reduce((a,u)=>a+u,0)})).map(o=>({...o,opacity:f.value.includes(o.id)?.5:1,segregate:()=>z(o),isSegregated:f.value.includes(o.id)})))),_e=e.computed(()=>({cy:"nested-donuts-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":""})),C=e.computed(()=>{const l=d.value.flatMap(o=>o.series.map(n=>({name:`${o.name} - ${n.name}`,color:n.color,total:o.total}))),s=d.value.flatMap(o=>o.series.map(n=>n.value));return{head:l,body:s}});function de(){e.nextTick(()=>{const l=C.value.head.map((n,a)=>[[n.name],[C.value.body[a]],[isNaN(C.value.body[a]/n.total)?"-":C.value.body[a]/n.total*100]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(s);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-nested-donuts"})})}const V=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],s=C.value.head.map((a,u)=>{const p=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:C.value.body[u],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:a.color,name:a.name},p,isNaN(C.value.body[u]/a.total)?"-":r.dataLabel({v:C.value.body[u]/a.total*100,s:"%",r: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};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:s,config:o}});function Ve(){return m.value}function ve(){v.value.showTable=!v.value.showTable}function fe(){v.value.dataLabels.show=!v.value.dataLabels.show}function pe(){v.value.showTooltip=!v.value.showTooltip}const E=e.ref(!1);function U(){E.value=!E.value}return ge({getData:Ve,generatePdf:te,generateCsv:de,generateImage:le,toggleTable:ve,toggleLabels:fe,toggleTooltip:pe,toggleAnnotator:U}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"nestedDonutsChart",ref:L,class:e.normalizeClass(`vue-ui-nested-donuts ${B.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`nested_donuts_${h.value}`,onMouseenter:s[3]||(s[3]=()=>e.unref(J)(!0)),onMouseleave:s[4]||(s[4]=()=>e.unref(J)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ae.PenAndPaper,{key:0,parent:L.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:E.value,onClose:U},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Be.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,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:R},[(e.openBlock(),e.createBlock(Ee._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value&&(e.unref(K)||e.unref(P))?(e.openBlock(),e.createBlock(ye.UserOptions,{ref:"details",key:`user_option_${q.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(j),isImaging:e.unref(ee),uid:h.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:L.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:E.value,onToggleFullscreen:Le,onGeneratePdf:e.unref(te),onGenerateCsv:de,onGenerateImage:e.unref(le),onToggleTable:ve,onToggleLabels:fe,onToggleTooltip:pe,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(K)?e.unref(P)?"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.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}: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:"6"}: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:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),x.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 ${c.value.width<=0?.001:c.value.width} ${c.value.height<0?.001:c.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(De._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:c.value.width<=0?.001:c.value.width,height:c.value.height<0?.001:c.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Re)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ue.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`radial_${h.value}_${n}`},[s[5]||(s[5]=e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),e.createElementVNode("stop",{offset:`${(1-D.value/se.value[n])*100}%`,"stop-color":e.unref(r.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,Xe),e.createElementVNode("stop",{offset:`${(1-D.value/se.value[n]/2)*100}%`,"stop-color":"#FFFFFF","stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,Ge),s[6]||(s[6]=e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1))],8,Ye))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${h.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${h.value}`},null,8,We),s[7]||(s[7]=e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1))],8,He),e.createElementVNode("filter",{id:`shadow_${h.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Ke)],8,Je)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{class:"vue-ui-donut-arc-path",d:a.arcSlice,fill:e.unref(r.setOpacity)(a.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:ce(a,u)},null,8,Qe)]))),256))]))),256)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ue.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:o.donut.arcSlice,fill:`url(#radial_${h.value}_${n})`,stroke:"transparent","stroke-width":"0"},null,8,je)]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.showDonutName?(e.openBlock(),e.createElementBlock("g",et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[u===0&&c.value.width&&c.value.height?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),x:c.value.width/2,y:a.startY-t.value.style.chart.layout.labels.dataLabels.fontSize+t.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,"text-anchor":"middle","font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldDonutName?"bold":"normal",fill:t.value.style.chart.layout.labels.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation?e.unref(r.abbreviate)({source:o.name,length:t.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize}):o.name),11,tt)):e.createCommentVNode("",!0)]))),256))]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",{filter:ce(a,u)},[I(a)&&v.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldPercentage?"bold":"normal"},e.toDisplayString(e.unref(r.dataLabel)({v:a.proportion*100,s:"%",r:t.value.style.chart.layout.labels.dataLabels.roundingPercentage})),11,ot)):e.createCommentVNode("",!0),I(a)&&v.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:1,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY)+t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"}," ("+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u}))+") ",11,nt)):e.createCommentVNode("",!0),I(a)&&v.value.dataLabels.show&&!t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:2,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u})),11,rt)):e.createCommentVNode("",!0)],8,at))),256))]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{"data-cy-donut-trap":"",d:a.arcSlice,fill:we.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:p=>Se({datapoint:a,seriesIndex:a.seriesIndex}),onClick:p=>$e({datapoint:a,index:u}),onMouseleave:s[0]||(s[0]=p=>{F.value=!1,ie.value=null,S.value=null,_.value=null})},null,40,st)]))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:c.value},void 0,!0)],14,qe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ut,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(j)||e.unref(ee)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:6,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Te._sfc_main,{show:v.value.showTooltip&&F.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:L.value,content:T.value,isFullscreen:B.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartLegend",ref:O,class:e.normalizeClass({"vue-ui-nested-donuts-legend":M.value.length>1})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(o,n)=>(e.openBlock(),e.createBlock(Oe.Legend,{key:`legend_${n}_${W.value}`,legendSet:o,config:_e.value,onClickMarker:s[1]||(s[1]=({legend:a})=>z(a))},{legendTitle:e.withCtx(({titleSet:a})=>[a[0]&&a[0].arcOf?(e.openBlock(),e.createElementBlock("div",it,e.toDisplayString(a[0].arcOf),1)):e.createCommentVNode("",!0)]),item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:p=>z(a),style:e.normalizeStyle(`opacity:${f.value.includes(a.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:a,seriesIndex:u}))+" ",1),f.value.includes(a.id)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" ( - % ) ")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" ("+e.toDisplayString(isNaN(a.value/a.total)?"-":e.unref(r.dataLabel)({v:a.value/a.total*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],64))],12,ct)]),_:2},1032,["legendSet","config"]))),128))],2)):e.createCommentVNode("",!0),t.value.style.chart.legend.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"chartLegend",ref:O},[e.renderSlot(l.$slots,"legend",{legend:M.value},void 0,!0)],512)),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:Y,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(ze.default,{key:10,hideDetails:"",config:{open:v.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(Fe.DataTable,{key:`table_${H.value}`,colNames:V.value.colNames,head:V.value.head,body:V.value.body,config:V.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[2]||(s[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,dt)]),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,Ue))}},ft=Me._export_sfc(vt,[["__scopeId","data-v-cf8b326c"]]);exports.default=ft;
17
+ `})}else a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.arcOf??""} - ${l.name}</div>`,a+=`<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="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(a+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?a+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:a+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`);T.value=`<div style="font-size:${t.value.style.chart.tooltip.fontSize}px">${a}</div>`}F.value=!0}function I(l){return l.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function ce(l,s){if(!t.value.useBlurOnHover)return"";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0)return[null,void 0].includes(_.value)||_.value===s?"":`url(#blur_${h.value})`;if(!t.value.style.chart.tooltip.showAllItemsAtIndex||f.value.length)return[null,void 0].includes(S.value)||S.value===l.id?"":`url(#blur_${h.value})`}const M=e.computed(()=>m.value.map((l,s)=>l.series.map((o,n)=>({name:o.name,color:o.color,value:o.value,shape:"circle",arcOf:o.arcOf,id:o.id,seriesIndex:n,datasetIndex:s,total:l.series.filter(a=>!f.value.includes(a.id)).map(a=>a.value).reduce((a,u)=>a+u,0)})).map(o=>({...o,opacity:f.value.includes(o.id)?.5:1,segregate:()=>z(o),isSegregated:f.value.includes(o.id)})))),_e=e.computed(()=>({cy:"nested-donuts-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":""})),C=e.computed(()=>{const l=d.value.flatMap(o=>o.series.map(n=>({name:`${o.name} - ${n.name}`,color:n.color,total:o.total}))),s=d.value.flatMap(o=>o.series.map(n=>n.value));return{head:l,body:s}});function de(){e.nextTick(()=>{const l=C.value.head.map((n,a)=>[[n.name],[C.value.body[a]],[isNaN(C.value.body[a]/n.total)?"-":C.value.body[a]/n.total*100]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(s);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-nested-donuts"})})}const V=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],s=C.value.head.map((a,u)=>{const p=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:C.value.body[u],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:a.color,name:a.name},p,isNaN(C.value.body[u]/a.total)?"-":r.dataLabel({v:C.value.body[u]/a.total*100,s:"%",r: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};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:s,config:o}});function Ve(){return m.value}function ve(){v.value.showTable=!v.value.showTable}function fe(){v.value.dataLabels.show=!v.value.dataLabels.show}function pe(){v.value.showTooltip=!v.value.showTooltip}const E=e.ref(!1);function U(){E.value=!E.value}return ge({getData:Ve,generatePdf:te,generateCsv:de,generateImage:le,toggleTable:ve,toggleLabels:fe,toggleTooltip:pe,toggleAnnotator:U}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"nestedDonutsChart",ref:L,class:e.normalizeClass(`vue-ui-nested-donuts ${B.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`nested_donuts_${h.value}`,onMouseenter:s[3]||(s[3]=()=>e.unref(J)(!0)),onMouseleave:s[4]||(s[4]=()=>e.unref(J)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ae.PenAndPaper,{key:0,parent:L.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:E.value,onClose:U},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Be.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,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:R},[(e.openBlock(),e.createBlock(Ee._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value&&(e.unref(K)||e.unref(P))?(e.openBlock(),e.createBlock(ye.UserOptions,{ref:"details",key:`user_option_${q.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(j),isImaging:e.unref(ee),uid:h.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:L.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:E.value,onToggleFullscreen:Le,onGeneratePdf:e.unref(te),onGenerateCsv:de,onGenerateImage:e.unref(le),onToggleTable:ve,onToggleLabels:fe,onToggleTooltip:pe,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(K)?e.unref(P)?"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.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}: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:"6"}: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:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),x.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 ${c.value.width<=0?.001:c.value.width} ${c.value.height<0?.001:c.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(De._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:c.value.width<=0?.001:c.value.width,height:c.value.height<0?.001:c.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Re)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ue.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`radial_${h.value}_${n}`},[s[5]||(s[5]=e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),e.createElementVNode("stop",{offset:`${(1-D.value/se.value[n])*100}%`,"stop-color":e.unref(r.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,Xe),e.createElementVNode("stop",{offset:`${(1-D.value/se.value[n]/2)*100}%`,"stop-color":"#FFFFFF","stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,Ge),s[6]||(s[6]=e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1))],8,Ye))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${h.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${h.value}`},null,8,We),s[7]||(s[7]=e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1))],8,He),e.createElementVNode("filter",{id:`shadow_${h.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Ke)],8,Je)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{class:"vue-ui-donut-arc-path",d:a.arcSlice,fill:e.unref(r.setOpacity)(a.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:ce(a,u)},null,8,Qe)]))),256))]))),256)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ue.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:o.donut.arcSlice,fill:`url(#radial_${h.value}_${n})`,stroke:"transparent","stroke-width":"0"},null,8,je)]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.showDonutName?(e.openBlock(),e.createElementBlock("g",et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[u===0&&c.value.width&&c.value.height?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),x:c.value.width/2,y:a.startY-t.value.style.chart.layout.labels.dataLabels.fontSize+t.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,"text-anchor":"middle","font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldDonutName?"bold":"normal",fill:t.value.style.chart.layout.labels.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation?e.unref(r.abbreviate)({source:o.name,length:t.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize}):o.name),11,tt)):e.createCommentVNode("",!0)]))),256))]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",{filter:ce(a,u)},[I(a)&&v.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldPercentage?"bold":"normal"},e.toDisplayString(e.unref(r.dataLabel)({v:a.proportion*100,s:"%",r:t.value.style.chart.layout.labels.dataLabels.roundingPercentage})),11,ot)):e.createCommentVNode("",!0),I(a)&&v.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:1,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY)+t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"}," ("+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u}))+") ",11,nt)):e.createCommentVNode("",!0),I(a)&&v.value.dataLabels.show&&!t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:2,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u})),11,rt)):e.createCommentVNode("",!0)],8,at))),256))]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:a.arcSlice,fill:we.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:p=>Se({datapoint:a,seriesIndex:a.seriesIndex}),onClick:p=>$e({datapoint:a,index:u}),onMouseleave:s[0]||(s[0]=p=>{F.value=!1,ie.value=null,S.value=null,_.value=null})},null,40,st)]))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:c.value},void 0,!0)],14,qe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ut,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(j)||e.unref(ee)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:6,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Te._sfc_main,{show:v.value.showTooltip&&F.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:L.value,content:T.value,isFullscreen:B.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartLegend",ref:O,class:e.normalizeClass({"vue-ui-nested-donuts-legend":M.value.length>1})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(o,n)=>(e.openBlock(),e.createBlock(Oe.Legend,{key:`legend_${n}_${W.value}`,legendSet:o,config:_e.value,onClickMarker:s[1]||(s[1]=({legend:a})=>z(a))},{legendTitle:e.withCtx(({titleSet:a})=>[a[0]&&a[0].arcOf?(e.openBlock(),e.createElementBlock("div",it,e.toDisplayString(a[0].arcOf),1)):e.createCommentVNode("",!0)]),item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:p=>z(a),style:e.normalizeStyle(`opacity:${f.value.includes(a.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:a,seriesIndex:u}))+" ",1),f.value.includes(a.id)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" ( - % ) ")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" ("+e.toDisplayString(isNaN(a.value/a.total)?"-":e.unref(r.dataLabel)({v:a.value/a.total*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],64))],12,ct)]),_:2},1032,["legendSet","config"]))),128))],2)):e.createCommentVNode("",!0),t.value.style.chart.legend.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"chartLegend",ref:O},[e.renderSlot(l.$slots,"legend",{legend:M.value},void 0,!0)],512)),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:Y,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(ze.default,{key:10,hideDetails:"",config:{open:v.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(Fe.DataTable,{key:`table_${H.value}`,colNames:V.value.colNames,head:V.value.head,body:V.value.body,config:V.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[2]||(s[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,dt)]),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,Ue))}},ft=Me._export_sfc(vt,[["__scopeId","data-v-93870f32"]]);exports.default=ft;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-Bmq5HB9y.cjs"),le=require("./useResponsive-BJ7DTGpm.cjs"),Ce=require("./Title-x7Hmi2zb.cjs"),ae=require("./usePrinter-Cf6Zct5m.cjs"),$e=require("./Legend-Bf8J9KZk.cjs"),xe=require("./DataTable-Cybmjq2W.cjs"),Be=require("./Tooltip-pA64woiQ.cjs"),Te=require("./vue-ui-skeleton-D5890icn.cjs"),Se=require("./vue-ui-accordion-WWblnzaJ.cjs"),oe=require("./useNestedProp-CivZENAh.cjs"),Pe=require("./PackageVersion-Bmro6-lR.cjs"),Oe=require("./PenAndPaper-B7dv_ssy.cjs"),Ne=require("./useUserOptionState-BgepsfED.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ve=["id"],Fe=["xmlns","viewBox"],Ae=["width","height"],Ee=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Ie=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Me=["id"],Le=["stdDeviation"],Re=["filter"],ze=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],De=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],qe={key:2},Ue=["onMouseenter"],Ye=["x","y","font-size","fill","font-weight"],Xe={key:5,class:"vue-data-ui-watermark"},Ge=["onClick"],He=["innerHTML"],je={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(re,{expose:ne,emit:ue}){const{vue_ui_onion:se}=u.useConfig(),f=re,C=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(u.createUid()),ie=e.ref(null),E=e.ref(0),$=e.ref(!1),S=e.ref(""),d=e.ref([]),y=e.ref(null),I=e.ref(null),M=e.ref(null),L=e.ref(null),R=e.ref(null),z=e.ref(0),D=e.ref(0),q=e.ref(0),t=e.computed({get:()=>X(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:U,keepUserOptionState:Y}=Ne.useUserOptionState({config:t.value});function X(){const l=oe.useNestedProp({userConfig:f.config,defaultConfig:se});return l.theme?{...oe.useNestedProp({userConfig:u.themes.vue_ui_onion[l.theme]||f.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>f.config,l=>{t.value=X(),P.value=!t.value.userOptions.showOnChartHover,J(),z.value+=1,D.value+=1,q.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:G,isImaging:H,generatePdf:j,generateImage:W}=ae.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),ce=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),de=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),x=e.ref(null);e.onMounted(()=>{J()});function J(){if(u.objectIsEmpty(f.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=le.throttle(()=>{const{width:a,height:o}=le.useResponsive({chart:y.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?M.value:null,source:L.value,noTitle:R.value});requestAnimationFrame(()=>{n.value.width=a,n.value.height=o,n.value.padding.top=Math.max(a,o)*.125,n.value.padding.right=Math.max(a,o)*.125,n.value.padding.bottom=Math.max(a,o)*.125,n.value.padding.left=Math.max(a,o)*.125,n.value.minRadius=Math.min(a,o)*.125})});x.value=new ResizeObserver(r),x.value.observe(y.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(f.dataset.forEach((l,r)=>{[null,void 0].includes(l.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(l.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),f.dataset.map((l,r)=>{const a=`onion_serie_${r}_${m.value}`;return{...l,percentage:l.percentage||0,targetPercentage:l.percentage||0,color:u.convertColorToHex(l.color)||de.value[r]||u.palette[r],id:a,shape:"circle",opacity:d.value.includes(a)?.5:1,absoluteIndex:r,segregate:()=>K(a),isSegregated:d.value.includes(a)}}))),k=e.ref(i.value),ve=e.computed(()=>t.value.useStartAnimation),he=e.ref(null),pe=e.computed(()=>Math.max(...i.value.map(l=>l.percentage))),O=e.ref(!1);e.watch(()=>i.value,fe,{immediate:!0});function fe(){if(ve.value&&!O.value){let r=function(){l>=pe.value?(cancelAnimationFrame(he.value),k.value=i.value,O.value=!0):(k.value=i.value.map(a=>({...a,percentage:l<a.targetPercentage?l:a.targetPercentage})),l+=1,requestAnimationFrame(r),O.value=!0)};k.value=i.value.map(a=>({...a,percentage:0}));let l=0;r()}else k.value=i.value}const ge=e.computed(()=>({cy:"onion-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),me=e.computed(()=>i.value.filter(l=>!d.value.includes(l.id)).length),g=e.computed(()=>{const l=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.gutter.width,track:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.track.width}}),h=e.computed(()=>k.value.filter(l=>!d.value.includes(l.id)).map((l,r)=>{const a=(s.value.maxRadius-g.value.track)/me.value/2*(1+r),o=s.value.centerY-a;return{percentage:l.percentage||0,...l,labelY:o,radius:a,path:ye(a,l.percentage||0)}}));function ye(l,r){const a=2*Math.PI*l,o=a*.75,c=`${o} ${a}`,w=o*(1-r/100);return{bgDashArray:`${o} ${a}`,bgDashOffset:0,dashArray:c,dashOffset:w,fullOffset:0,active:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BfKO0mWG.cjs"),le=require("./useResponsive-BJ7DTGpm.cjs"),Ce=require("./Title-CUoXs-XJ.cjs"),ae=require("./usePrinter-B3WcbJUK.cjs"),$e=require("./Legend-CxDZJIS9.cjs"),xe=require("./DataTable-DN61toQQ.cjs"),Be=require("./Tooltip-TqkUkWoH.cjs"),Te=require("./vue-ui-skeleton-C9gd5UnC.cjs"),Se=require("./vue-ui-accordion-CmsJv79_.cjs"),oe=require("./useNestedProp-D9fZbCk6.cjs"),Pe=require("./PackageVersion-Cg_0Xov6.cjs"),Oe=require("./PenAndPaper-DpBM14U6.cjs"),Ne=require("./useUserOptionState-BgepsfED.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ve=["id"],Fe=["xmlns","viewBox"],Ae=["width","height"],Ee=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Ie=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Me=["id"],Le=["stdDeviation"],Re=["filter"],ze=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],De=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],qe={key:2},Ue=["onMouseenter"],Ye=["x","y","font-size","fill","font-weight"],Xe={key:5,class:"vue-data-ui-watermark"},Ge=["onClick"],He=["innerHTML"],je={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(re,{expose:ne,emit:ue}){const{vue_ui_onion:se}=u.useConfig(),f=re,C=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(u.createUid()),ie=e.ref(null),E=e.ref(0),$=e.ref(!1),S=e.ref(""),d=e.ref([]),y=e.ref(null),I=e.ref(null),M=e.ref(null),L=e.ref(null),R=e.ref(null),z=e.ref(0),D=e.ref(0),q=e.ref(0),t=e.computed({get:()=>X(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:U,keepUserOptionState:Y}=Ne.useUserOptionState({config:t.value});function X(){const l=oe.useNestedProp({userConfig:f.config,defaultConfig:se});return l.theme?{...oe.useNestedProp({userConfig:u.themes.vue_ui_onion[l.theme]||f.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>f.config,l=>{t.value=X(),P.value=!t.value.userOptions.showOnChartHover,J(),z.value+=1,D.value+=1,q.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:G,isImaging:H,generatePdf:j,generateImage:W}=ae.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),ce=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),de=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),x=e.ref(null);e.onMounted(()=>{J()});function J(){if(u.objectIsEmpty(f.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=le.throttle(()=>{const{width:a,height:o}=le.useResponsive({chart:y.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?M.value:null,source:L.value,noTitle:R.value});requestAnimationFrame(()=>{n.value.width=a,n.value.height=o,n.value.padding.top=Math.max(a,o)*.125,n.value.padding.right=Math.max(a,o)*.125,n.value.padding.bottom=Math.max(a,o)*.125,n.value.padding.left=Math.max(a,o)*.125,n.value.minRadius=Math.min(a,o)*.125})});x.value=new ResizeObserver(r),x.value.observe(y.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(f.dataset.forEach((l,r)=>{[null,void 0].includes(l.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(l.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),f.dataset.map((l,r)=>{const a=`onion_serie_${r}_${m.value}`;return{...l,percentage:l.percentage||0,targetPercentage:l.percentage||0,color:u.convertColorToHex(l.color)||de.value[r]||u.palette[r],id:a,shape:"circle",opacity:d.value.includes(a)?.5:1,absoluteIndex:r,segregate:()=>K(a),isSegregated:d.value.includes(a)}}))),k=e.ref(i.value),ve=e.computed(()=>t.value.useStartAnimation),he=e.ref(null),pe=e.computed(()=>Math.max(...i.value.map(l=>l.percentage))),O=e.ref(!1);e.watch(()=>i.value,fe,{immediate:!0});function fe(){if(ve.value&&!O.value){let r=function(){l>=pe.value?(cancelAnimationFrame(he.value),k.value=i.value,O.value=!0):(k.value=i.value.map(a=>({...a,percentage:l<a.targetPercentage?l:a.targetPercentage})),l+=1,requestAnimationFrame(r),O.value=!0)};k.value=i.value.map(a=>({...a,percentage:0}));let l=0;r()}else k.value=i.value}const ge=e.computed(()=>({cy:"onion-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),me=e.computed(()=>i.value.filter(l=>!d.value.includes(l.id)).length),g=e.computed(()=>{const l=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.gutter.width,track:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.track.width}}),h=e.computed(()=>k.value.filter(l=>!d.value.includes(l.id)).map((l,r)=>{const a=(s.value.maxRadius-g.value.track)/me.value/2*(1+r),o=s.value.centerY-a;return{percentage:l.percentage||0,...l,labelY:o,radius:a,path:ye(a,l.percentage||0)}}));function ye(l,r){const a=2*Math.PI*l,o=a*.75,c=`${o} ${a}`,w=o*(1-r/100);return{bgDashArray:`${o} ${a}`,bgDashOffset:0,dashArray:c,dashOffset:w,fullOffset:0,active:`
2
2
  M ${s.value.centerX},${s.value.centerY-l}
3
3
  A ${l},${l} 0 1 1
4
4
  ${s.value.centerX+l*Math.cos(Math.PI*3/4)},${s.value.centerY+l*Math.sin(Math.PI*3/4)}
@@ -1,16 +1,16 @@
1
1
  import { computed as v, ref as s, watch as ke, onMounted as Ue, onBeforeUnmount as Xe, createElementBlock as u, openBlock as n, unref as i, normalizeStyle as B, normalizeClass as U, createBlock as C, createCommentVNode as f, createElementVNode as O, createVNode as we, createSlots as Ge, withCtx as g, renderSlot as h, normalizeProps as S, guardReactiveProps as F, Fragment as M, renderList as N, toDisplayString as P, createTextVNode as Ee, nextTick as He } from "vue";
2
- import { u as We, c as je, t as qe, p as $e, a as Je, b as Ke, o as Qe, e as K, d as Ze, X as et, f as R, i as Q, x as Ce, q as tt, r as at, y as lt } from "./index-B8uVRkA1.js";
2
+ import { u as We, c as je, t as qe, p as $e, a as Je, b as Ke, o as Qe, e as K, d as Ze, X as et, f as R, i as Q, x as Ce, q as tt, r as at, y as lt } from "./index-GSCW0GhW.js";
3
3
  import { t as ot, u as rt } from "./useResponsive-CoxXLe23.js";
4
- import { _ as nt } from "./Title-MKfkLka7.js";
5
- import { u as st, U as ut } from "./usePrinter-CppD6oY_.js";
6
- import { L as it } from "./Legend-du4CJMG1.js";
7
- import { D as ct } from "./DataTable-BWABkdIL.js";
8
- import { _ as dt } from "./Tooltip-BUMgVEu0.js";
9
- import vt from "./vue-ui-skeleton-BC7kQhlE.js";
10
- import ht from "./vue-ui-accordion-CE2Pnpz3.js";
11
- import { u as xe } from "./useNestedProp-kStEZqtl.js";
12
- import { _ as ft } from "./PackageVersion-Dqo8V-i_.js";
13
- import { P as gt } from "./PenAndPaper-QsaleY3R.js";
4
+ import { _ as nt } from "./Title-rp5eHDVc.js";
5
+ import { u as st, U as ut } from "./usePrinter-BBNI0jHz.js";
6
+ import { L as it } from "./Legend-Be3l-GsN.js";
7
+ import { D as ct } from "./DataTable-HDq8aOyj.js";
8
+ import { _ as dt } from "./Tooltip-3XUFn6mK.js";
9
+ import vt from "./vue-ui-skeleton-C0nuwFlf.js";
10
+ import ht from "./vue-ui-accordion-CON_m6tj.js";
11
+ import { u as xe } from "./useNestedProp-Da-DNb_v.js";
12
+ import { _ as ft } from "./PackageVersion-DL-70o6h.js";
13
+ import { P as gt } from "./PenAndPaper-C1v_7F2S.js";
14
14
  import { u as pt } from "./useUserOptionState-BIvW1Kz7.js";
15
15
  import { _ as yt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
16
  const mt = ["id"], bt = ["xmlns", "viewBox"], kt = ["width", "height"], wt = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], $t = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], Ct = ["id"], xt = ["stdDeviation"], Tt = ["filter"], _t = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], Ot = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "onMouseenter"], Pt = { key: 2 }, At = ["onMouseenter"], It = ["x", "y", "font-size", "fill", "font-weight"], St = {