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,13 +1,13 @@
1
- import { computed as p, onMounted as ze, ref as b, watch as Ye, createElementBlock as c, openBlock as u, unref as i, normalizeStyle as x, normalizeClass as me, createBlock as F, createCommentVNode as k, createSlots as De, withCtx as w, renderSlot as m, normalizeProps as W, guardReactiveProps as q, createVNode as ye, createElementVNode as M, Fragment as I, renderList as L, toDisplayString as R, createTextVNode as Ge, nextTick as Ue } from "vue";
2
- import { u as Ve, o as Be, e as je, c as be, t as Xe, p as Z, a as We, b as qe, v as h, f as ke, X as Re, G as we, L as Ze, i as Je, q as Ke, r as Qe } from "./index-B8uVRkA1.js";
3
- import { _ as et } from "./Title-MKfkLka7.js";
4
- import { u as tt, U as ot } from "./usePrinter-CppD6oY_.js";
5
- import { D as lt } from "./DataTable-BWABkdIL.js";
6
- import at from "./vue-ui-accordion-CE2Pnpz3.js";
7
- import nt from "./vue-ui-skeleton-BC7kQhlE.js";
8
- import { u as Ce } from "./useNestedProp-kStEZqtl.js";
9
- import { _ as st } from "./PackageVersion-Dqo8V-i_.js";
10
- import { P as rt } from "./PenAndPaper-QsaleY3R.js";
1
+ import { computed as p, onMounted as ze, ref as y, watch as Ye, createElementBlock as c, openBlock as u, unref as i, normalizeStyle as x, normalizeClass as me, createBlock as F, createCommentVNode as k, createSlots as De, withCtx as w, renderSlot as m, normalizeProps as W, guardReactiveProps as q, createVNode as be, createElementVNode as M, Fragment as I, renderList as L, toDisplayString as R, createTextVNode as Ge, nextTick as Ue } from "vue";
2
+ import { u as Ve, o as Be, e as je, c as ye, t as Xe, p as Z, a as We, b as qe, v as h, f as ke, X as Re, G as we, L as Ze, i as Je, q as Ke, r as Qe } from "./index-GSCW0GhW.js";
3
+ import { _ as et } from "./Title-rp5eHDVc.js";
4
+ import { u as tt, U as ot } from "./usePrinter-BBNI0jHz.js";
5
+ import { D as lt } from "./DataTable-HDq8aOyj.js";
6
+ import at from "./vue-ui-accordion-CON_m6tj.js";
7
+ import nt from "./vue-ui-skeleton-C0nuwFlf.js";
8
+ import { u as Ce } from "./useNestedProp-Da-DNb_v.js";
9
+ import { _ as st } from "./PackageVersion-DL-70o6h.js";
10
+ import { P as rt } from "./PenAndPaper-C1v_7F2S.js";
11
11
  import { u as ut } from "./useUserOptionState-BIvW1Kz7.js";
12
12
  import { _ as it } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const ct = ["id"], dt = {
@@ -18,7 +18,7 @@ const ct = ["id"], dt = {
18
18
  }, vt = {
19
19
  key: 2,
20
20
  style: "width:100%;background:transparent;padding-bottom:24px"
21
- }, ht = ["xmlns", "viewBox"], ft = ["width", "height"], pt = ["id"], gt = ["stop-color"], mt = ["stop-color"], yt = ["d", "fill", "stroke", "stroke-width"], bt = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "onMouseenter"], kt = ["x", "y", "font-size", "fill"], wt = ["x", "y", "font-size", "fill"], Ct = {
21
+ }, ht = ["xmlns", "viewBox"], ft = ["width", "height"], pt = ["id"], gt = ["stop-color"], mt = ["stop-color"], bt = ["d", "fill", "stroke", "stroke-width"], yt = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "onMouseenter"], kt = ["x", "y", "font-size", "fill"], wt = ["x", "y", "font-size", "fill"], Ct = {
22
22
  key: 4,
23
23
  class: "vue-data-ui-watermark"
24
24
  }, $t = {
@@ -52,7 +52,7 @@ const ct = ["id"], dt = {
52
52
  type: "dataset"
53
53
  });
54
54
  }
55
- const Y = b(be()), D = b(null), K = b(0), Q = b(0), T = b(!1);
55
+ const Y = y(ye()), D = y(null), K = y(0), Q = y(0), T = y(!1);
56
56
  function Ne(t) {
57
57
  T.value = t, K.value += 1;
58
58
  }
@@ -79,7 +79,7 @@ const ct = ["id"], dt = {
79
79
  const { isPrinting: le, isImaging: ae, generatePdf: ne, generateImage: se } = tt({
80
80
  elementId: `flow_${Y.value}`,
81
81
  fileName: e.value.style.chart.title.text || "vue-ui-flow"
82
- }), Te = p(() => e.value.userOptions.show && !e.value.style.chart.title.text), U = p(() => qe(e.value.customPalette)), re = p(() => e.value.style.chart.nodes.gap), _ = p(() => e.value.style.chart.nodes.width), O = b({
82
+ }), Te = p(() => e.value.userOptions.show && !e.value.style.chart.title.text), U = p(() => qe(e.value.customPalette)), re = p(() => e.value.style.chart.nodes.gap), _ = p(() => e.value.style.chart.nodes.width), O = y({
83
83
  showTable: e.value.table.show
84
84
  }), ue = p(() => e.value.style.chart.links.width), V = p(() => !g.dataset || !g.dataset.length ? [] : g.dataset.map((t) => [
85
85
  t[0],
@@ -141,7 +141,7 @@ const ct = ["id"], dt = {
141
141
  let r = a[s].absoluteY + e.value.style.chart.padding.top;
142
142
  l[s].children && l[s].children.forEach(({ target: f, value: N }, $) => {
143
143
  const E = a[f].y + e.value.style.chart.padding.top, j = a[s], X = a[f], he = h(r), fe = h(r + N / l[s].outflow * j.height), pe = h(E), ge = h(E + N / l[f].inflow * X.height), Me = {
144
- id: be(),
144
+ id: ye(),
145
145
  source: s,
146
146
  target: f,
147
147
  path: `M ${h(j.x) + h(_.value)} ${he} L ${h(j.x) + h(_.value)} ${fe} L ${h(X.x)} ${ge} L ${h(X.x)} ${pe} Z`,
@@ -154,7 +154,7 @@ const ct = ["id"], dt = {
154
154
  }
155
155
  return { nodeCoordinates: a, links: v };
156
156
  }
157
- const y = p(() => {
157
+ const b = p(() => {
158
158
  const t = Fe(g.dataset);
159
159
  return {
160
160
  nodes: Object.keys(t.nodeCoordinates).map((l, o) => ({
@@ -163,7 +163,7 @@ const ct = ["id"], dt = {
163
163
  })),
164
164
  links: t.links
165
165
  };
166
- }), Ie = p(() => Le(y.value.nodes));
166
+ }), Ie = p(() => Le(b.value.nodes));
167
167
  function Le(t) {
168
168
  const l = {};
169
169
  for (const n in t) {
@@ -176,7 +176,7 @@ const ct = ["id"], dt = {
176
176
  const { top: t, right: l, left: o, bottom: n } = e.value.style.chart.padding, a = V.value.length * ue.value;
177
177
  return {
178
178
  height: Ie.value + t + n,
179
- width: l + Math.max(...y.value.nodes.map((v) => v.x)) + _.value,
179
+ width: l + Math.max(...b.value.nodes.map((v) => v.x)) + _.value,
180
180
  left: o,
181
181
  top: t,
182
182
  right: a - l,
@@ -190,14 +190,14 @@ const ct = ["id"], dt = {
190
190
  l[a] || (l[a] = []), o[v] || (o[v] = []), l[a].push(v), o[v].push(a);
191
191
  }), l[t] && l[t].forEach((a) => n.add(a)), o[t] && o[t].forEach((a) => n.add(a)), Array.from(n).concat(t);
192
192
  }
193
- const C = b(null), A = b(null);
193
+ const C = y(null), A = y(null);
194
194
  function He(t) {
195
195
  C.value = Ae(t.name), A.value = t.name;
196
196
  }
197
197
  function Se() {
198
198
  C.value = null, A.value = null;
199
199
  }
200
- const ce = p(() => y.value.links.map(({ source: t, target: l, sourceColor: o, targetColor: n, value: a }) => ({
200
+ const ce = p(() => b.value.links.map(({ source: t, target: l, sourceColor: o, targetColor: n, value: a }) => ({
201
201
  source: t,
202
202
  target: l,
203
203
  sourceColor: o,
@@ -270,12 +270,12 @@ const ct = ["id"], dt = {
270
270
  };
271
271
  });
272
272
  function Ee() {
273
- return y.value;
273
+ return b.value;
274
274
  }
275
275
  function ve() {
276
276
  O.value.showTable = !O.value.showTable;
277
277
  }
278
- const S = b(!1);
278
+ const S = y(!1);
279
279
  function B() {
280
280
  S.value = !S.value;
281
281
  }
@@ -397,7 +397,7 @@ const ct = ["id"], dt = {
397
397
  class: me({ "vue-data-ui-fullscreen--on": T.value, "vue-data-ui-fulscreen--off": !T.value }),
398
398
  style: x(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
399
399
  }, [
400
- ye(st),
400
+ be(st),
401
401
  t.$slots["chart-background"] ? (u(), c("foreignObject", {
402
402
  key: 0,
403
403
  x: 0,
@@ -411,7 +411,7 @@ const ct = ["id"], dt = {
411
411
  m(t.$slots, "chart-background", {}, void 0, !0)
412
412
  ], 8, ft)) : k("", !0),
413
413
  M("defs", null, [
414
- (u(!0), c(I, null, L(y.value.links, (o, n) => (u(), c("linearGradient", {
414
+ (u(!0), c(I, null, L(b.value.links, (o, n) => (u(), c("linearGradient", {
415
415
  id: o.id,
416
416
  x1: "0%",
417
417
  y1: "0%",
@@ -428,15 +428,15 @@ const ct = ["id"], dt = {
428
428
  }, null, 8, mt)
429
429
  ], 8, pt))), 256))
430
430
  ]),
431
- (u(!0), c(I, null, L(y.value.links, (o) => (u(), c("path", {
431
+ (u(!0), c(I, null, L(b.value.links, (o) => (u(), c("path", {
432
432
  class: "vue-ui-flow-link",
433
433
  d: o.path,
434
434
  fill: `url(#${o.id})`,
435
435
  stroke: e.value.style.chart.links.stroke,
436
436
  "stroke-width": e.value.style.chart.links.strokeWidth,
437
437
  style: x(`opacity:${A.value ? [o.target, o.source].includes(A.value) ? 1 : 0.3 : e.value.style.chart.links.opacity}`)
438
- }, null, 12, yt))), 256)),
439
- (u(!0), c(I, null, L(y.value.nodes, (o, n) => (u(), c("rect", {
438
+ }, null, 12, bt))), 256)),
439
+ (u(!0), c(I, null, L(b.value.nodes, (o, n) => (u(), c("rect", {
440
440
  class: "vue-ui-flow-node",
441
441
  x: o.x,
442
442
  y: i(h)(o.absoluteY) + e.value.style.chart.padding.top,
@@ -448,8 +448,8 @@ const ct = ["id"], dt = {
448
448
  onMouseenter: (a) => He(o),
449
449
  onMouseleave: l[0] || (l[0] = (a) => Se()),
450
450
  style: x(`opacity:${C.value ? C.value.includes(o.name) ? 1 : 0.2 : 1}`)
451
- }, null, 44, bt))), 256)),
452
- (u(!0), c(I, null, L(y.value.nodes, (o, n) => (u(), c("text", {
451
+ }, null, 44, yt))), 256)),
452
+ (u(!0), c(I, null, L(b.value.nodes, (o, n) => (u(), c("text", {
453
453
  x: o.x + _.value / 2,
454
454
  y: i(h)(o.absoluteY + o.height / 2 - e.value.style.chart.nodes.labels.fontSize / 4) + e.value.style.chart.padding.top,
455
455
  "font-size": e.value.style.chart.nodes.labels.fontSize,
@@ -457,7 +457,7 @@ const ct = ["id"], dt = {
457
457
  "text-anchor": "middle",
458
458
  style: x(`pointer-events: none; opacity:${C.value ? C.value.includes(o.name) ? 1 : 0 : 1}`)
459
459
  }, R(e.value.style.chart.nodes.labels.abbreviation.use ? i(Ze)({ source: o.name, length: e.value.style.chart.nodes.labels.abbreviation.length }) : o.name), 13, kt))), 256)),
460
- (u(!0), c(I, null, L(y.value.nodes, (o, n) => (u(), c("text", {
460
+ (u(!0), c(I, null, L(b.value.nodes, (o, n) => (u(), c("text", {
461
461
  x: o.x + _.value / 2,
462
462
  y: i(h)(o.absoluteY + o.height / 2 + e.value.style.chart.nodes.labels.fontSize) + e.value.style.chart.padding.top,
463
463
  "font-size": e.value.style.chart.nodes.labels.fontSize,
@@ -509,7 +509,7 @@ const ct = ["id"], dt = {
509
509
  }
510
510
  }, {
511
511
  content: w(() => [
512
- ye(lt, {
512
+ be(lt, {
513
513
  colNames: H.value.colNames,
514
514
  head: H.value.head,
515
515
  body: H.value.body,
@@ -533,7 +533,7 @@ const ct = ["id"], dt = {
533
533
  }, 8, ["config"])) : k("", !0)
534
534
  ], 46, ct));
535
535
  }
536
- }, zt = /* @__PURE__ */ it(_t, [["__scopeId", "data-v-0aa84563"]]);
536
+ }, zt = /* @__PURE__ */ it(_t, [["__scopeId", "data-v-c2fb2d59"]]);
537
537
  export {
538
538
  zt as default
539
539
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Bmq5HB9y.cjs"),ke=require("./Title-x7Hmi2zb.cjs"),te=require("./usePrinter-Cf6Zct5m.cjs"),ye=require("./DataTable-Cybmjq2W.cjs"),be=require("./vue-ui-accordion-WWblnzaJ.cjs"),we=require("./vue-ui-skeleton-D5890icn.cjs"),oe=require("./useNestedProp-CivZENAh.cjs"),Ce=require("./PackageVersion-Bmro6-lR.cjs"),Ne=require("./PenAndPaper-B7dv_ssy.cjs"),xe=require("./useUserOptionState-BgepsfED.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),$e=["id"],_e={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Se={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},Ee=["xmlns","viewBox"],Pe=["width","height"],Te=["id"],Oe=["stop-color"],Fe=["stop-color"],Le=["d","fill","stroke","stroke-width"],Ve=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],ze=["x","y","font-size","fill"],Ie=["x","y","font-size","fill"],Ae={key:4,class:"vue-data-ui-watermark"},He={key:6,ref:"source",dir:"auto"},Me=["innerHTML"],qe={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(le,{expose:ne}){const{vue_ui_flow:ae}=s.useConfig(),h=le,$=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{V()});function V(){s.objectIsEmpty(h.dataset)&&s.error({componentName:"VueUiFlow",type:"dataset"})}const _=e.ref(s.createUid()),S=e.ref(null),z=e.ref(0),I=e.ref(0),y=e.ref(!1);function re(o){y.value=o,z.value+=1}const t=e.computed({get:()=>M(),set:o=>o}),{userOptionsVisible:E,setUserOptionsVisibility:A,keepUserOptionState:H}=xe.useUserOptionState({config:t.value});function M(){const o=oe.useNestedProp({userConfig:h.config,defaultConfig:ae});return o.theme?{...oe.useNestedProp({userConfig:s.themes.vue_ui_flow[o.theme]||h.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>h.config,o=>{t.value=M(),E.value=!t.value.userOptions.showOnChartHover,V(),I.value+=1,b.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:q,isImaging:D,generatePdf:U,generateImage:Y}=te.usePrinter({elementId:`flow_${_.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),se=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),P=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),G=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),b=e.ref({showTable:t.value.table.show}),j=e.computed(()=>t.value.style.chart.links.width),T=e.computed(()=>!h.dataset||!h.dataset.length?[]:h.dataset.map(o=>[o[0],o[1],s.checkNaN(o[2])])),W=e.computed(()=>{const o={};function n(r){o[r]||(o[r]={inflow:0,outflow:0})}T.value.forEach(([r,a,c])=>{n(r),n(a),o[r].outflow+=c,o[a].inflow+=c});let l=0;for(const r in o){const a=Math.max(o[r].inflow,o[r].outflow);l=Math.max(l,a)}return l});function ue(o){return o/W.value*100+t.value.style.chart.nodes.minHeight}function ie(o){const n=t.value.style.chart.nodes.minHeight;return(o-n)/100*W.value}function ce(o){const n={},l={};function r(u,i){n[u]||(n[u]={height:0,level:null,inflow:0,outflow:0}),n[u].level===null&&(n[u].level=i),l[i]||(l[i]=[]),l[i].includes(u)||l[i].push(u)}o.forEach(([u,i,v],k)=>{const m=n[u]?n[u].level:0,B=m+1;r(u,m),r(i,B),n[u].children||(n[u].children=[]),n[u].children.push({target:i,value:v}),n[u].outflow+=v,n[i].inflow+=v}),Object.keys(n).forEach((u,i)=>{n[u].color=P.value[i]||P.value[i%P.value.length]||s.palette[i]||s.palette[i%d.length]});for(const u in n)n[u].height=ue(Math.max(n[u].inflow,n[u].outflow)),n[u].name=u;const a={};for(const u in l){let i=0;l[u].forEach((v,k)=>{const m=n[v].height;a[v]={x:parseInt(u,10)*j.value+t.value.style.chart.padding.left,y:i,absoluteY:i,height:m,i:k,color:n[v].color,value:ie(m)},i+=m+G.value})}const c=[];for(const u in n){let i=a[u].absoluteY+t.value.style.chart.padding.top;n[u].children&&n[u].children.forEach(({target:v,value:k},m)=>{const B=a[v].y+t.value.style.chart.padding.top,F=a[u],L=a[v],J=s.checkNaN(i),K=s.checkNaN(i+k/n[u].outflow*F.height),Q=s.checkNaN(B),ee=s.checkNaN(B+k/n[v].inflow*L.height),ge={id:s.createUid(),source:u,target:v,path:`M ${s.checkNaN(F.x)+s.checkNaN(g.value)} ${J} L ${s.checkNaN(F.x)+s.checkNaN(g.value)} ${K} L ${s.checkNaN(L.x)} ${ee} L ${s.checkNaN(L.x)} ${Q} Z`,value:k,sourceColor:n[u].color,targetColor:n[v].color};c.push(ge),i+=K-J,a[v].y+=ee-Q})}return{nodeCoordinates:a,links:c}}const f=e.computed(()=>{const o=ce(h.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((n,l)=>({...o.nodeCoordinates[n],name:n})),links:o.links}}),de=e.computed(()=>ve(f.value.nodes));function ve(o){const n={};for(const r in o){const{x:a,height:c}=o[r];n[a]||(n[a]=0),n[a]+=c+G.value}return Math.max(...Object.values(n))}const w=e.computed(()=>{const{top:o,right:n,left:l,bottom:r}=t.value.style.chart.padding,a=T.value.length*j.value;return{height:de.value+o+r,width:n+Math.max(...f.value.nodes.map(c=>c.x))+g.value,left:l,top:o,right:a-n,p_top:o,p_bottom:r}});function he(o){const n={},l={},r=new Set;return T.value.forEach(([a,c,u])=>{n[a]||(n[a]=[]),l[c]||(l[c]=[]),n[a].push(c),l[c].push(a)}),n[o]&&n[o].forEach(a=>r.add(a)),l[o]&&l[o].forEach(a=>r.add(a)),Array.from(r).concat(o)}const p=e.ref(null),C=e.ref(null);function fe(o){p.value=he(o.name),C.value=o.name}function pe(){p.value=null,C.value=null}const X=e.computed(()=>f.value.links.map(({source:o,target:n,sourceColor:l,targetColor:r,value:a})=>({source:o,target:n,sourceColor:l,targetColor:r,value:a})));function R(){e.nextTick(()=>{const o=X.value.map((r,a)=>[[r.source],[r.target],[r.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const N=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=X.value.map((a,c)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},s.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:o,body:n,config:l}});function me(){return f.value}function Z(){b.value.showTable=!b.value.showTable}const x=e.ref(!1);function O(){x.value=!x.value}return ne({getData:me,generateCsv:R,generateImage:Y,generatePdf:U,toggleTable:Z,toggleAnnotator:O}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:S,class:e.normalizeClass(`vue-ui-flow ${y.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`flow_${_.value}`,onMouseenter:n[2]||(n[2]=()=>e.unref(A)(!0)),onMouseleave:n[3]||(n[3]=()=>e.unref(A)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ne.PenAndPaper,{key:0,parent:S.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:x.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",_e,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Se,[(e.openBlock(),e.createBlock(ke._sfc_main,{key:`title_${I.value}`,config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(H)||e.unref(E))?(e.openBlock(),e.createBlock(te.UserOptions,{ref:"details",key:`user_option_${z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(q),isImaging:e.unref(D),uid:_.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:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:S.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:x.value,onToggleFullscreen:re,onGeneratePdf:e.unref(U),onGenerateCsv:R,onGenerateImage:e.unref(Y),onToggleTable:Z,onToggleAnnotator:O,style:e.normalizeStyle({visibility:e.unref(H)?e.unref(E)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"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),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${w.value.width} ${w.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ce._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:w.value.width,height:w.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Pe)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.links,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:l.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.sourceColor},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,Fe)],8,Te))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.links,l=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:l.path,fill:`url(#${l.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${C.value?[l.target,l.source].includes(C.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:e.unref(s.checkNaN)(l.absoluteY)+t.value.style.chart.padding.top,height:e.unref(s.checkNaN)(l.height),width:g.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>fe(l),onMouseleave:n[0]||(n[0]=a=>pe()),style:e.normalizeStyle(`opacity:${p.value?p.value.includes(l.name)?1:.2:1}`)},null,44,Ve))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2-t.value.style.chart.nodes.labels.fontSize/4)+t.value.style.chart.padding.top,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${p.value?p.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(s.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,ze))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2+t.value.style.chart.nodes.labels.fontSize)+t.value.style.chart.padding.top,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${p.value?p.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,l.value,e.unref(s.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:l.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:l,seriesIndex:r})),13,Ie))),256)),e.renderSlot(o.$slots,"svg",{svg:w.value},void 0,!0)],14,Ee)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:5,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",He,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createBlock(be.default,{key:7,hideDetails:"",config:{open:b.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(ye.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=l=>b.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Me)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,$e))}},De=Be._export_sfc(qe,[["__scopeId","data-v-0aa84563"]]);exports.default=De;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BfKO0mWG.cjs"),ke=require("./Title-CUoXs-XJ.cjs"),te=require("./usePrinter-B3WcbJUK.cjs"),ye=require("./DataTable-DN61toQQ.cjs"),be=require("./vue-ui-accordion-CmsJv79_.cjs"),we=require("./vue-ui-skeleton-C9gd5UnC.cjs"),oe=require("./useNestedProp-D9fZbCk6.cjs"),Ce=require("./PackageVersion-Cg_0Xov6.cjs"),Ne=require("./PenAndPaper-DpBM14U6.cjs"),xe=require("./useUserOptionState-BgepsfED.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),$e=["id"],_e={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Se={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},Ee=["xmlns","viewBox"],Pe=["width","height"],Te=["id"],Oe=["stop-color"],Fe=["stop-color"],Le=["d","fill","stroke","stroke-width"],Ve=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],ze=["x","y","font-size","fill"],Ie=["x","y","font-size","fill"],Ae={key:4,class:"vue-data-ui-watermark"},He={key:6,ref:"source",dir:"auto"},Me=["innerHTML"],qe={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(le,{expose:ne}){const{vue_ui_flow:ae}=s.useConfig(),h=le,$=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{V()});function V(){s.objectIsEmpty(h.dataset)&&s.error({componentName:"VueUiFlow",type:"dataset"})}const _=e.ref(s.createUid()),S=e.ref(null),z=e.ref(0),I=e.ref(0),y=e.ref(!1);function re(o){y.value=o,z.value+=1}const t=e.computed({get:()=>M(),set:o=>o}),{userOptionsVisible:E,setUserOptionsVisibility:A,keepUserOptionState:H}=xe.useUserOptionState({config:t.value});function M(){const o=oe.useNestedProp({userConfig:h.config,defaultConfig:ae});return o.theme?{...oe.useNestedProp({userConfig:s.themes.vue_ui_flow[o.theme]||h.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>h.config,o=>{t.value=M(),E.value=!t.value.userOptions.showOnChartHover,V(),I.value+=1,b.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:q,isImaging:D,generatePdf:U,generateImage:Y}=te.usePrinter({elementId:`flow_${_.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),se=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),P=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),G=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),b=e.ref({showTable:t.value.table.show}),j=e.computed(()=>t.value.style.chart.links.width),T=e.computed(()=>!h.dataset||!h.dataset.length?[]:h.dataset.map(o=>[o[0],o[1],s.checkNaN(o[2])])),W=e.computed(()=>{const o={};function n(r){o[r]||(o[r]={inflow:0,outflow:0})}T.value.forEach(([r,a,c])=>{n(r),n(a),o[r].outflow+=c,o[a].inflow+=c});let l=0;for(const r in o){const a=Math.max(o[r].inflow,o[r].outflow);l=Math.max(l,a)}return l});function ue(o){return o/W.value*100+t.value.style.chart.nodes.minHeight}function ie(o){const n=t.value.style.chart.nodes.minHeight;return(o-n)/100*W.value}function ce(o){const n={},l={};function r(u,i){n[u]||(n[u]={height:0,level:null,inflow:0,outflow:0}),n[u].level===null&&(n[u].level=i),l[i]||(l[i]=[]),l[i].includes(u)||l[i].push(u)}o.forEach(([u,i,v],k)=>{const m=n[u]?n[u].level:0,B=m+1;r(u,m),r(i,B),n[u].children||(n[u].children=[]),n[u].children.push({target:i,value:v}),n[u].outflow+=v,n[i].inflow+=v}),Object.keys(n).forEach((u,i)=>{n[u].color=P.value[i]||P.value[i%P.value.length]||s.palette[i]||s.palette[i%d.length]});for(const u in n)n[u].height=ue(Math.max(n[u].inflow,n[u].outflow)),n[u].name=u;const a={};for(const u in l){let i=0;l[u].forEach((v,k)=>{const m=n[v].height;a[v]={x:parseInt(u,10)*j.value+t.value.style.chart.padding.left,y:i,absoluteY:i,height:m,i:k,color:n[v].color,value:ie(m)},i+=m+G.value})}const c=[];for(const u in n){let i=a[u].absoluteY+t.value.style.chart.padding.top;n[u].children&&n[u].children.forEach(({target:v,value:k},m)=>{const B=a[v].y+t.value.style.chart.padding.top,F=a[u],L=a[v],J=s.checkNaN(i),K=s.checkNaN(i+k/n[u].outflow*F.height),Q=s.checkNaN(B),ee=s.checkNaN(B+k/n[v].inflow*L.height),ge={id:s.createUid(),source:u,target:v,path:`M ${s.checkNaN(F.x)+s.checkNaN(g.value)} ${J} L ${s.checkNaN(F.x)+s.checkNaN(g.value)} ${K} L ${s.checkNaN(L.x)} ${ee} L ${s.checkNaN(L.x)} ${Q} Z`,value:k,sourceColor:n[u].color,targetColor:n[v].color};c.push(ge),i+=K-J,a[v].y+=ee-Q})}return{nodeCoordinates:a,links:c}}const f=e.computed(()=>{const o=ce(h.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((n,l)=>({...o.nodeCoordinates[n],name:n})),links:o.links}}),de=e.computed(()=>ve(f.value.nodes));function ve(o){const n={};for(const r in o){const{x:a,height:c}=o[r];n[a]||(n[a]=0),n[a]+=c+G.value}return Math.max(...Object.values(n))}const w=e.computed(()=>{const{top:o,right:n,left:l,bottom:r}=t.value.style.chart.padding,a=T.value.length*j.value;return{height:de.value+o+r,width:n+Math.max(...f.value.nodes.map(c=>c.x))+g.value,left:l,top:o,right:a-n,p_top:o,p_bottom:r}});function he(o){const n={},l={},r=new Set;return T.value.forEach(([a,c,u])=>{n[a]||(n[a]=[]),l[c]||(l[c]=[]),n[a].push(c),l[c].push(a)}),n[o]&&n[o].forEach(a=>r.add(a)),l[o]&&l[o].forEach(a=>r.add(a)),Array.from(r).concat(o)}const p=e.ref(null),C=e.ref(null);function fe(o){p.value=he(o.name),C.value=o.name}function pe(){p.value=null,C.value=null}const X=e.computed(()=>f.value.links.map(({source:o,target:n,sourceColor:l,targetColor:r,value:a})=>({source:o,target:n,sourceColor:l,targetColor:r,value:a})));function R(){e.nextTick(()=>{const o=X.value.map((r,a)=>[[r.source],[r.target],[r.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const N=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=X.value.map((a,c)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},s.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:o,body:n,config:l}});function me(){return f.value}function Z(){b.value.showTable=!b.value.showTable}const x=e.ref(!1);function O(){x.value=!x.value}return ne({getData:me,generateCsv:R,generateImage:Y,generatePdf:U,toggleTable:Z,toggleAnnotator:O}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:S,class:e.normalizeClass(`vue-ui-flow ${y.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`flow_${_.value}`,onMouseenter:n[2]||(n[2]=()=>e.unref(A)(!0)),onMouseleave:n[3]||(n[3]=()=>e.unref(A)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ne.PenAndPaper,{key:0,parent:S.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:x.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",_e,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Se,[(e.openBlock(),e.createBlock(ke._sfc_main,{key:`title_${I.value}`,config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(H)||e.unref(E))?(e.openBlock(),e.createBlock(te.UserOptions,{ref:"details",key:`user_option_${z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(q),isImaging:e.unref(D),uid:_.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:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:S.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:x.value,onToggleFullscreen:re,onGeneratePdf:e.unref(U),onGenerateCsv:R,onGenerateImage:e.unref(Y),onToggleTable:Z,onToggleAnnotator:O,style:e.normalizeStyle({visibility:e.unref(H)?e.unref(E)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"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),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${w.value.width} ${w.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ce._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:w.value.width,height:w.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Pe)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.links,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:l.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.sourceColor},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,Fe)],8,Te))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.links,l=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:l.path,fill:`url(#${l.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${C.value?[l.target,l.source].includes(C.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:e.unref(s.checkNaN)(l.absoluteY)+t.value.style.chart.padding.top,height:e.unref(s.checkNaN)(l.height),width:g.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>fe(l),onMouseleave:n[0]||(n[0]=a=>pe()),style:e.normalizeStyle(`opacity:${p.value?p.value.includes(l.name)?1:.2:1}`)},null,44,Ve))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2-t.value.style.chart.nodes.labels.fontSize/4)+t.value.style.chart.padding.top,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${p.value?p.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(s.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,ze))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2+t.value.style.chart.nodes.labels.fontSize)+t.value.style.chart.padding.top,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${p.value?p.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,l.value,e.unref(s.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:l.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:l,seriesIndex:r})),13,Ie))),256)),e.renderSlot(o.$slots,"svg",{svg:w.value},void 0,!0)],14,Ee)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:5,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",He,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createBlock(be.default,{key:7,hideDetails:"",config:{open:b.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(ye.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=l=>b.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Me)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,$e))}},De=Be._export_sfc(qe,[["__scopeId","data-v-c2fb2d59"]]);exports.default=De;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BfKO0mWG.cjs"),W=require("./useNestedProp-D9fZbCk6.cjs"),J=require("./usePrinter-B3WcbJUK.cjs"),se=require("./Title-CUoXs-XJ.cjs"),ue=require("./PenAndPaper-DpBM14U6.cjs"),ie=require("./DataTable-DN61toQQ.cjs"),ce=require("./vue-ui-accordion-CmsJv79_.cjs"),K=require("./useResponsive-BJ7DTGpm.cjs"),ve=require("./vue-ui-skeleton-C9gd5UnC.cjs"),de=require("./useUserOptionState-BgepsfED.cjs"),he=require("./PackageVersion-Cg_0Xov6.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],pe=["xmlns","viewBox"],be=["width","height"],ye=["id"],ge=["stop-color"],ke=["stop-color"],Ce=["stop-color"],we=["stroke","stroke-width"],xe=["stroke","stroke-width"],Le=["x","y","font-size","fill","font-weight"],Be=["points","fill"],$e=["stroke","stroke-width","rx"],_e=["x","y","font-size","fill","font-weight"],Ne=["x","y","font-size","fill","font-weight"],Se={key:5,class:"vue-data-ui-watermark"},ze=["innerHTML"],Te={__name:"vue-ui-funnel",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Q,{expose:Z}){e.useCssVars(a=>({"1de04001":re.value}));const{vue_ui_funnel:ee}=r.useConfig(),d=Q,b=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(z);function z(){if(r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiFunnel",type:"dataset"}):d.dataset.forEach((a,o)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(l=>{b.value=!1,r.error({componentName:"VueUiFunnel",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.responsive){const a=K.throttle(()=>{const{width:o,height:l}=K.useResponsive({chart:g.value,title:t.value.style.chart.title.text?O.value:null,source:V.value,noTitle:E.value});requestAnimationFrame(()=>{u.value.height=l,u.value.width=o,m.value=G(),i.value.circles=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.circles.dataLabels.fontSize,threshold:10,fallback:10}),i.value.names=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.name.fontSize,threshold:10,fallback:10}),i.value.values=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.value.fontSize,threshold:10,fallback:10})})});D.value=new ResizeObserver(a),D.value.observe(g.value.parentNode)}}const g=e.ref(null),k=e.ref(r.createUid()),T=e.ref(0),A=e.ref(0),P=e.ref(0),E=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),f=e.ref(!1);function F(){const a=W.useNestedProp({userConfig:d.config,defaultConfig:ee});return a.theme?{...W.useNestedProp({userConfig:r.themes.vue_ui_funnel[a.theme]||d.config,defaultConfig:a})}:a}const t=e.computed({get:()=>F(),set:a=>a}),{userOptionsVisible:_,setUserOptionsVisibility:I,keepUserOptionState:q}=de.useUserOptionState({config:t.value});e.watch(()=>d.config,a=>{t.value=F(),_.value=!t.value.userOptions.showOnChartHover,z(),A.value+=1,P.value+=1,i.value.circles=t.value.style.chart.circles.dataLabels.fontSize,i.value.names=t.value.style.chart.bars.dataLabels.name.fontSize,i.value.values=t.value.style.chart.bars.dataLabels.value.fontSize,C.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:M,isImaging:R,generatePdf:U,generateImage:j}=J.usePrinter({elementId:`funnel_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-funnel"}),te=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),C=e.ref({showTable:t.value.table.show}),i=e.ref({circles:t.value.style.chart.circles.dataLabels.fontSize,names:t.value.style.chart.bars.dataLabels.name.fontSize,values:t.value.style.chart.bars.dataLabels.value.fontSize}),u=e.computed({get:()=>({height:t.value.style.chart.height,width:t.value.style.chart.width}),set:a=>a}),h=e.computed(()=>b.value?d.dataset.map((a,o)=>({...a,color:a.color?r.convertColorToHex(a.color):r.lightenHexColor(t.value.style.chart.bars.defaultColor,o/d.dataset.length)})):[]);setTimeout(()=>{f.value=!0},h.value.length*150);function G(){const a=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:a,top:o,right:u.value.width-t.value.style.chart.padding.right,bottom:u.value.height-t.value.style.chart.padding.bottom,width:u.value.width-a-t.value.style.chart.padding.right,height:u.value.height-o-t.value.style.chart.padding.bottom}}const m=e.ref(G()),y=e.computed(()=>m.value.height/d.dataset.length),p=e.computed(()=>y.value*t.value.style.chart.bars.gapRatio),H=e.computed(()=>m.value.width*t.value.style.chart.barCircleSpacingRatio),n=e.computed(()=>h.value.map((a,o)=>{const l=y.value-p.value,s=m.value.top+p.value/2*o+(y.value-p.value/2)*o+p.value/2,v=a.value/h.value[0].value,c=(m.value.width-l-H.value)*(a.value/h.value[0].value);return{...a,cx:m.value.left+l/2,cy:s+l/2,datapointIndex:o,fill:a.color,height:Math.max(l,0),proportion:v,r:Math.max(l/2,0),width:Math.max(c,0),x:m.value.left+l+H.value,y:s}})),ae=e.computed(()=>{const a=n.value.map(o=>`${o.x+o.width},${o.y+(y.value-p.value)/2}`);return`${n.value[0].x},${n.value[0].y+(y.value-p.value)/2} ${a.toString()} ${n.value.at(-1).x},${n.value.at(-1).y+(y.value-p.value)/2}`}),le=e.computed(()=>({x1:n.value[0].cx,y1:n.value[0].cy,x2:n.value.at(-1).cx,y2:n.value.at(-1).cy})),w=e.ref(!1);function oe(a){w.value=a,T.value+=1}const re=e.computed(()=>`${h.value.length*150}ms`),B=e.ref(!1);function N(){B.value=!B.value}function X(){C.value.showTable=!C.value.showTable}const x=e.computed(()=>{const a=h.value.map(l=>({name:l.name,color:l.color})),o=h.value.map(l=>l.value);return{head:a,body:o}}),$=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],o=x.value.head.map((v,c)=>{const L=r.applyDataLabel(t.value.style.chart.bars.dataLabels.value.formatter,x.value.body[c],r.dataLabel({p:t.value.style.chart.bars.dataLabels.value.prefix,v:x.value.body[c],s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.table.td.roundingValue}),{datapoint:n.value[c]}),S=r.applyDataLabel(t.value.style.chart.circles.dataLabels.formatter,n.value[c].proportion*100,r.dataLabel({v:n.value[c].proportion*100,s:"%",r:t.value.table.td.roundingPercentage}),{datapoint:n.value[c]});return[{color:v.color,name:v.name},L,S]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:a,body:o,config:l}});function Y(){e.nextTick(()=>{const a=x.value.head.map((s,v)=>[[s.name],[x.value.body[v]],[n.value[v].proportion*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value],["%"]]].concat(a),l=r.createCsvContent(o);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-funnel"})})}function ne(){return h.value}return Z({getData:ne,generatePdf:U,generateCsv:Y,generateImage:j,toggleTable:X,toggleAnnotator:N}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"funnelChart",ref:g,class:e.normalizeClass(`vue-ui-funnel ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height:100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`funnel_${k.value}`,onMouseenter:o[1]||(o[1]=()=>e.unref(I)(!0)),onMouseleave:o[2]||(o[2]=()=>e.unref(I)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ue.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:N},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:E,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:O,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(se._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"funnel-div-title",...t.value.style.chart.title},subtitle:{cy:"funnel-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(q)||e.unref(_))?(e.openBlock(),e.createBlock(J.UserOptions,{ref:"details",key:`user_option_${T.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(M),isImaging:e.unref(R),uid:k.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:w.value,chartElement:g.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleAnnotator:N,onToggleFullscreen:oe,onGeneratePdf:e.unref(U),onGenerateImage:e.unref(j),onToggleTable:X,onGenerateCsv:Y,style:e.normalizeStyle({visibility:e.unref(q)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:s})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:s})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(he._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,be)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`funnel_area_${k.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.backgroundColor,"stop-opacity":0},null,8,ge),e.createElementVNode("stop",{offset:"20%","stop-color":t.value.style.chart.area.color},null,8,ke),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.area.color},null,8,Ce)],8,ye)]),t.value.style.chart.circleLinks.show?(e.openBlock(),e.createElementBlock("line",e.mergeProps({key:1},le.value,{stroke:t.value.style.chart.circleLinks.color,"stroke-width":12*t.value.style.chart.circleLinks.widthRatio,"stroke-linecap":"round",class:{animated:t.value.useCssAnimation},style:{strokeDasharray:t.value.useCssAnimation?m.value.height:0,strokeDashoffset:t.value.useCssAnimation?m.value.height:0}}),null,16,we)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,({cx:l,cy:s,r:v,fill:c},L)=>(e.openBlock(),e.createElementBlock("circle",e.mergeProps({ref_for:!0},{cx:l,cy:s,r:v,fill:c},{stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth,class:{animated:t.value.useCssAnimation&&!f.value},style:{animationDelay:`${150*L}ms`}}),null,16,xe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{x:l.cx,y:l.cy+i.value.circles/3+t.value.style.chart.circles.dataLabels.offsetY,"text-anchor":"middle","font-size":i.value.circles,fill:t.value.style.chart.circles.dataLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(l.color):t.value.style.chart.circles.dataLabels.color,"font-weight":t.value.style.chart.circles.dataLabels.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.circles.dataLabels.formatter,l.proportion*100,e.unref(r.dataLabel)({v:l.proportion*100,s:"%",r:t.value.style.chart.circles.dataLabels.rounding}),{datapoint:l})),15,Le))),256)),t.value.style.chart.area.show?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:ae.value,fill:`url(#funnel_area_${k.value})`,class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({transition:t.value.useCssAnimation?`all ${150*h.value.length}ms ease-in`:"none"})},null,14,Be)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,({x:l,y:s,height:v,width:c,fill:L},S)=>(e.openBlock(),e.createElementBlock("rect",e.mergeProps({ref_for:!0},{x:l,y:s,height:v,width:c,fill:L},{stroke:t.value.style.chart.bars.stroke,"stroke-width":t.value.style.chart.bars.strokeWidth,rx:t.value.style.chart.bars.borderRadius,class:{animated:t.value.useCssAnimation&&!f.value},style:{animationDelay:`${150*S}ms`}}),null,16,$e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.name.offsetX+12,y:l.cy-i.value.names/2+t.value.style.chart.bars.dataLabels.name.offsetY,"text-anchor":"start","font-size":i.value.names,fill:t.value.style.chart.bars.dataLabels.name.color,"font-weight":t.value.style.chart.bars.dataLabels.name.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(l.name),15,_e),e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.value.offsetX+12,y:l.cy+i.value.values+t.value.style.chart.bars.dataLabels.value.offsetY,"text-anchor":"start","font-size":i.value.values,fill:t.value.style.chart.bars.dataLabels.value.color,"font-weight":t.value.style.chart.bars.dataLabels.value.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.bars.dataLabels.value.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.bars.dataLabels.value.prefix,v:l.value,s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.style.chart.bars.dataLabels.value.rounding}),{datapoint:l})),15,Ne)]))),256)),e.renderSlot(a.$slots,"svg",{svg:u.value},void 0,!0)],14,pe)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:6,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:V,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(ce.default,{key:8,hideDetails:"",config:{open:C.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(ie.DataTable,{key:`table_${P.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[0]||(o[0]=l=>C.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,ze)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,fe))}},Ae=me._export_sfc(Te,[["__scopeId","data-v-6313f861"]]);exports.default=Ae;
@@ -1,15 +1,15 @@
1
1
  import { useCssVars as xe, computed as v, onMounted as Le, ref as c, watch as Te, createElementBlock as u, openBlock as s, unref as n, normalizeStyle as _, normalizeClass as T, createBlock as A, createCommentVNode as f, createSlots as Ae, withCtx as k, renderSlot as y, normalizeProps as H, guardReactiveProps as X, createVNode as Ne, createElementVNode as C, mergeProps as q, Fragment as M, renderList as V, toDisplayString as B, createTextVNode as Oe, nextTick as ze } from "vue";
2
- import { u as Se, o as Pe, e as fe, g as Fe, c as De, d as Ie, l as Me, i as U, f as E, X as Ve, G as Be, F as Y, a as Ue, q as Ee, r as Ge } from "./index-B8uVRkA1.js";
3
- import { u as be } from "./useNestedProp-kStEZqtl.js";
4
- import { u as Re, U as je } from "./usePrinter-CppD6oY_.js";
5
- import { _ as He } from "./Title-MKfkLka7.js";
6
- import { P as Xe } from "./PenAndPaper-QsaleY3R.js";
7
- import { D as qe } from "./DataTable-BWABkdIL.js";
8
- import Ye from "./vue-ui-accordion-CE2Pnpz3.js";
2
+ import { u as Se, o as Pe, e as fe, g as Fe, c as De, d as Ie, l as Me, i as U, f as E, X as Ve, G as Be, F as Y, a as Ue, q as Ee, r as Ge } from "./index-GSCW0GhW.js";
3
+ import { u as be } from "./useNestedProp-Da-DNb_v.js";
4
+ import { u as Re, U as je } from "./usePrinter-BBNI0jHz.js";
5
+ import { _ as He } from "./Title-rp5eHDVc.js";
6
+ import { P as Xe } from "./PenAndPaper-C1v_7F2S.js";
7
+ import { D as qe } from "./DataTable-HDq8aOyj.js";
8
+ import Ye from "./vue-ui-accordion-CON_m6tj.js";
9
9
  import { t as We, u as Je } from "./useResponsive-CoxXLe23.js";
10
- import Ke from "./vue-ui-skeleton-BC7kQhlE.js";
10
+ import Ke from "./vue-ui-skeleton-C0nuwFlf.js";
11
11
  import { u as Qe } from "./useUserOptionState-BIvW1Kz7.js";
12
- import { _ as Ze } from "./PackageVersion-Dqo8V-i_.js";
12
+ import { _ as Ze } from "./PackageVersion-DL-70o6h.js";
13
13
  import { _ as et } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
14
  const tt = ["id"], at = ["xmlns", "viewBox"], lt = ["width", "height"], st = ["id"], ot = ["stop-color"], rt = ["stop-color"], nt = ["stop-color"], ut = ["stroke", "stroke-width"], it = ["stroke", "stroke-width"], ct = ["x", "y", "font-size", "fill", "font-weight"], vt = ["points", "fill"], dt = ["stroke", "stroke-width", "rx"], ht = ["x", "y", "font-size", "fill", "font-weight"], ft = ["x", "y", "font-size", "fill", "font-weight"], bt = {
15
15
  key: 5,
@@ -32,7 +32,7 @@ const tt = ["id"], at = ["xmlns", "viewBox"], lt = ["width", "height"], st = ["i
32
32
  },
33
33
  setup(me, { expose: ye }) {
34
34
  xe((t) => ({
35
- a7833e2c: $e.value
35
+ "1de04001": $e.value
36
36
  }));
37
37
  const { vue_ui_funnel: ge } = Se(), m = me, x = v(() => !!m.dataset && m.dataset.length);
38
38
  Le(W);
@@ -589,7 +589,7 @@ const tt = ["id"], at = ["xmlns", "viewBox"], lt = ["width", "height"], st = ["i
589
589
  }, 8, ["config"])) : f("", !0)
590
590
  ], 46, tt));
591
591
  }
592
- }, zt = /* @__PURE__ */ et(yt, [["__scopeId", "data-v-3f74da0f"]]);
592
+ }, zt = /* @__PURE__ */ et(yt, [["__scopeId", "data-v-6313f861"]]);
593
593
  export {
594
594
  zt as default
595
595
  };
@@ -1,15 +1,15 @@
1
1
  import { computed as h, onMounted as Fe, ref as u, watch as Ae, createElementBlock as n, openBlock as o, unref as i, normalizeStyle as E, normalizeClass as V, createBlock as $, createCommentVNode as c, renderSlot as v, createVNode as ie, createSlots as Ie, withCtx as d, normalizeProps as S, guardReactiveProps as N, createElementVNode as T, Fragment as ce, renderList as ve, createTextVNode as de, toDisplayString as M, nextTick as Ee } from "vue";
2
- import { u as Ve, o as Me, e as he, g as De, c as pe, t as Be, p as D, a as Ge, b as ze, J as ye, d as Ue, M as We, f as k, X as He, i as ge, x as fe, q as Xe, r as je, y as Re } from "./index-B8uVRkA1.js";
3
- import { L as Ye } from "./Legend-du4CJMG1.js";
4
- import { _ as qe } from "./Title-MKfkLka7.js";
5
- import { _ as Je } from "./Tooltip-BUMgVEu0.js";
6
- import { D as Ke } from "./DataTable-BWABkdIL.js";
7
- import { u as Qe, U as Ze } from "./usePrinter-CppD6oY_.js";
8
- import et from "./vue-ui-skeleton-BC7kQhlE.js";
9
- import tt from "./vue-ui-accordion-CE2Pnpz3.js";
10
- import { u as be } from "./useNestedProp-kStEZqtl.js";
11
- import { _ as lt } from "./PackageVersion-Dqo8V-i_.js";
12
- import { P as at } from "./PenAndPaper-QsaleY3R.js";
2
+ import { u as Ve, o as Me, e as he, g as De, c as pe, t as Be, p as D, a as Ge, b as ze, J as ye, d as Ue, M as We, f as k, X as He, i as ge, x as fe, q as Xe, r as je, y as Re } from "./index-GSCW0GhW.js";
3
+ import { L as Ye } from "./Legend-Be3l-GsN.js";
4
+ import { _ as qe } from "./Title-rp5eHDVc.js";
5
+ import { _ as Je } from "./Tooltip-3XUFn6mK.js";
6
+ import { D as Ke } from "./DataTable-HDq8aOyj.js";
7
+ import { u as Qe, U as Ze } from "./usePrinter-BBNI0jHz.js";
8
+ import et from "./vue-ui-skeleton-C0nuwFlf.js";
9
+ import tt from "./vue-ui-accordion-CON_m6tj.js";
10
+ import { u as be } from "./useNestedProp-Da-DNb_v.js";
11
+ import { _ as lt } from "./PackageVersion-DL-70o6h.js";
12
+ import { P as at } from "./PenAndPaper-C1v_7F2S.js";
13
13
  import { u as ot } from "./useUserOptionState-BIvW1Kz7.js";
14
14
  import { _ as st } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
15
  const rt = ["id"], ut = {
@@ -594,7 +594,7 @@ const rt = ["id"], ut = {
594
594
  }, 8, ["config"])) : c("", !0)
595
595
  ], 46, rt));
596
596
  }
597
- }, Bt = /* @__PURE__ */ st(xt, [["__scopeId", "data-v-b397a028"]]);
597
+ }, Bt = /* @__PURE__ */ st(xt, [["__scopeId", "data-v-0ba6a1b9"]]);
598
598
  export {
599
599
  Bt as default
600
600
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Bmq5HB9y.cjs"),ie=require("./Legend-Bf8J9KZk.cjs"),ce=require("./Title-x7Hmi2zb.cjs"),de=require("./Tooltip-pA64woiQ.cjs"),ve=require("./DataTable-Cybmjq2W.cjs"),X=require("./usePrinter-Cf6Zct5m.cjs"),he=require("./vue-ui-skeleton-D5890icn.cjs"),pe=require("./vue-ui-accordion-WWblnzaJ.cjs"),Y=require("./useNestedProp-CivZENAh.cjs"),fe=require("./PackageVersion-Bmro6-lR.cjs"),ye=require("./PenAndPaper-B7dv_ssy.cjs"),ge=require("./useUserOptionState-BgepsfED.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],ke={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Ce={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},we=["xmlns","viewBox"],xe=["width","height"],$e=["id"],Be=["stdDeviation"],Se=["d","stroke","stroke-width"],Te=["d","stroke","stroke-width"],Ne=["filter"],Pe=["d","stroke","stroke-width"],_e=["d","stroke-width","onMouseenter","onClick"],Ve={key:5,class:"vue-data-ui-watermark"},Ee=["onClick"],Le={key:0},Oe={key:1},Fe={key:8,ref:"source",dir:"auto"},Ae=["innerHTML"],ze={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(J,{expose:K,emit:Q}){const{vue_ui_galaxy:Z}=r.useConfig(),c=J,k=e.computed(()=>!!c.dataset&&c.dataset.length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):c.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const g=e.ref(r.createUid()),C=e.ref(null),ee=e.ref(null),$=e.ref(!1),B=e.ref(""),d=e.ref(null),V=e.ref(0),E=e.ref(0),L=e.ref(0),O=e.ref(0),t=e.computed({get:()=>z(),set:l=>l}),{userOptionsVisible:S,setUserOptionsVisibility:F,keepUserOptionState:A}=ge.useUserOptionState({config:t.value});function z(){const l=Y.useNestedProp({userConfig:c.config,defaultConfig:Z});return l.theme?{...Y.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>c.config,l=>{t.value=z(),S.value=!t.value.userOptions.showOnChartHover,_(),E.value+=1,L.value+=1,O.value+=1,u.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,u.value.showTable=t.value.table.show,u.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:I,isImaging:D,generatePdf:q,generateImage:M}=X.usePrinter({elementId:`galaxy_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),te=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),le=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),u=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),m=e.ref({height:180,width:250}),U=Q,i=e.ref([]);function T(l){i.value.includes(l.id)?i.value=i.value.filter(a=>a!==l.id):i.value.push(l.id),U("selectLegend",b.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>c.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||le.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function oe(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const v=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),ae=e.ref(190),G=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id))),b=e.computed(()=>{const l=[];for(let a=0;a<G.value.length;a+=1){const o=G.value[a];let n=o.value/v.value*ae.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/v.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!i.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),y=e.ref(!1);function re(l){y.value=l,V.value+=1}const N=e.ref(null);function ne({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){N.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},$.value=n,d.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?B.value=f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,s+=`<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&&(s+=`<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?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),B.value=`<div>${s}</div>`)}const W=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/c.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:i.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>T(l),isSegregated:i.value.includes(l.id)}))),se=e.computed(()=>({cy:"galaxy-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":""})),h=e.computed(()=>{const l=b.value.map(o=>({name:o.name,color:o.color})),a=b.value.map(o=>o.value);return{head:l,body:a}});function H(){e.nextTick(()=>{const l=h.value.head.map((n,s)=>[[n.name],[h.value.body[s]],[isNaN(h.value.body[s]/v.value)?"-":h.value.body[s]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const w=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:v.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((s,f)=>{const ue=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},ue,isNaN(h.value.body[f]/v.value)?"-":r.dataLabel({v:h.value.body[f]/v.value*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:a,config:o}});function R(){u.value.showTable=!u.value.showTable}function j(){u.value.showTooltip=!u.value.showTooltip}const x=e.ref(!1);function P(){x.value=!x.value}return K({getData:oe,generatePdf:q,generateCsv:H,generateImage:M,toggleTable:R,toggleTooltip:j,toggleAnnotator:P}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${y.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;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${g.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(F)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(F)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ye.PenAndPaper,{key:0,parent:C.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:x.value,onClose:P},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createElementBlock("div",ke,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Ce,[(e.openBlock(),e.createBlock(ce._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value&&(e.unref(A)||e.unref(S))?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:ee,key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(D),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:u.value.showTooltip,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:x.value,onToggleFullscreen:re,onGeneratePdf:e.unref(q),onGenerateCsv:H,onGenerateImage:e.unref(M),onToggleTable:R,onToggleTooltip:j,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(A)?e.unref(S)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${m.value.width} ${m.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(fe._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:m.value.width,height:m.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,xe)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${g.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,Be)],8,$e)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,Se)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Te)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${g.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Pe)],8,Ne)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>ne({datapoint:o,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{$.value=!1,d.value=null}),onClick:s=>U("selectDatapoint",o)},null,40,_e)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:m.value},void 0,!0)],14,we)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ve,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.default,{key:6,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ie.Legend,{key:`legend_${O.value}`,legendSet:W.value,config:se.value,onClickMarker:a[1]||(a[1]=({legend:o})=>T(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>T(o),style:e.normalizeStyle(`opacity:${i.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),i.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",Oe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Le," ("+e.toDisplayString(isNaN(o.value/v.value)?"-":e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ee)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:W.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(de._sfc_main,{show:u.value.showTooltip&&$.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:C.value,content:B.value,isFullscreen:y.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({...N.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),k.value?(e.openBlock(),e.createBlock(pe.default,{key:9,hideDetails:"",config:{open:u.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(ve.DataTable,{key:`table_${L.value}`,colNames:w.value.colNames,head:w.value.head,body:w.value.body,config:w.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>u.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Ae)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,be))}},Ie=me._export_sfc(ze,[["__scopeId","data-v-b397a028"]]);exports.default=Ie;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BfKO0mWG.cjs"),ie=require("./Legend-CxDZJIS9.cjs"),ce=require("./Title-CUoXs-XJ.cjs"),de=require("./Tooltip-TqkUkWoH.cjs"),ve=require("./DataTable-DN61toQQ.cjs"),X=require("./usePrinter-B3WcbJUK.cjs"),he=require("./vue-ui-skeleton-C9gd5UnC.cjs"),pe=require("./vue-ui-accordion-CmsJv79_.cjs"),Y=require("./useNestedProp-D9fZbCk6.cjs"),fe=require("./PackageVersion-Cg_0Xov6.cjs"),ye=require("./PenAndPaper-DpBM14U6.cjs"),ge=require("./useUserOptionState-BgepsfED.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],ke={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Ce={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},we=["xmlns","viewBox"],xe=["width","height"],$e=["id"],Be=["stdDeviation"],Se=["d","stroke","stroke-width"],Te=["d","stroke","stroke-width"],Ne=["filter"],Pe=["d","stroke","stroke-width"],_e=["d","stroke-width","onMouseenter","onClick"],Ve={key:5,class:"vue-data-ui-watermark"},Ee=["onClick"],Le={key:0},Oe={key:1},Fe={key:8,ref:"source",dir:"auto"},Ae=["innerHTML"],ze={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(J,{expose:K,emit:Q}){const{vue_ui_galaxy:Z}=r.useConfig(),c=J,k=e.computed(()=>!!c.dataset&&c.dataset.length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):c.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const g=e.ref(r.createUid()),C=e.ref(null),ee=e.ref(null),$=e.ref(!1),B=e.ref(""),d=e.ref(null),V=e.ref(0),E=e.ref(0),L=e.ref(0),O=e.ref(0),t=e.computed({get:()=>z(),set:l=>l}),{userOptionsVisible:S,setUserOptionsVisibility:F,keepUserOptionState:A}=ge.useUserOptionState({config:t.value});function z(){const l=Y.useNestedProp({userConfig:c.config,defaultConfig:Z});return l.theme?{...Y.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>c.config,l=>{t.value=z(),S.value=!t.value.userOptions.showOnChartHover,_(),E.value+=1,L.value+=1,O.value+=1,u.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,u.value.showTable=t.value.table.show,u.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:I,isImaging:D,generatePdf:q,generateImage:M}=X.usePrinter({elementId:`galaxy_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),te=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),le=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),u=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),m=e.ref({height:180,width:250}),U=Q,i=e.ref([]);function T(l){i.value.includes(l.id)?i.value=i.value.filter(a=>a!==l.id):i.value.push(l.id),U("selectLegend",b.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>c.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||le.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function oe(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const v=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),ae=e.ref(190),G=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id))),b=e.computed(()=>{const l=[];for(let a=0;a<G.value.length;a+=1){const o=G.value[a];let n=o.value/v.value*ae.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/v.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!i.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),y=e.ref(!1);function re(l){y.value=l,V.value+=1}const N=e.ref(null);function ne({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){N.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},$.value=n,d.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?B.value=f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,s+=`<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&&(s+=`<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?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),B.value=`<div>${s}</div>`)}const W=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/c.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:i.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>T(l),isSegregated:i.value.includes(l.id)}))),se=e.computed(()=>({cy:"galaxy-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":""})),h=e.computed(()=>{const l=b.value.map(o=>({name:o.name,color:o.color})),a=b.value.map(o=>o.value);return{head:l,body:a}});function H(){e.nextTick(()=>{const l=h.value.head.map((n,s)=>[[n.name],[h.value.body[s]],[isNaN(h.value.body[s]/v.value)?"-":h.value.body[s]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const w=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:v.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((s,f)=>{const ue=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},ue,isNaN(h.value.body[f]/v.value)?"-":r.dataLabel({v:h.value.body[f]/v.value*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:a,config:o}});function R(){u.value.showTable=!u.value.showTable}function j(){u.value.showTooltip=!u.value.showTooltip}const x=e.ref(!1);function P(){x.value=!x.value}return K({getData:oe,generatePdf:q,generateCsv:H,generateImage:M,toggleTable:R,toggleTooltip:j,toggleAnnotator:P}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${y.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;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${g.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(F)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(F)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ye.PenAndPaper,{key:0,parent:C.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:x.value,onClose:P},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createElementBlock("div",ke,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Ce,[(e.openBlock(),e.createBlock(ce._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value&&(e.unref(A)||e.unref(S))?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:ee,key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(D),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:u.value.showTooltip,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:x.value,onToggleFullscreen:re,onGeneratePdf:e.unref(q),onGenerateCsv:H,onGenerateImage:e.unref(M),onToggleTable:R,onToggleTooltip:j,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(A)?e.unref(S)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${m.value.width} ${m.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(fe._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:m.value.width,height:m.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,xe)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${g.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,Be)],8,$e)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,Se)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Te)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${g.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Pe)],8,Ne)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>ne({datapoint:o,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{$.value=!1,d.value=null}),onClick:s=>U("selectDatapoint",o)},null,40,_e)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:m.value},void 0,!0)],14,we)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ve,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.default,{key:6,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ie.Legend,{key:`legend_${O.value}`,legendSet:W.value,config:se.value,onClickMarker:a[1]||(a[1]=({legend:o})=>T(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>T(o),style:e.normalizeStyle(`opacity:${i.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),i.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",Oe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Le," ("+e.toDisplayString(isNaN(o.value/v.value)?"-":e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ee)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:W.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(de._sfc_main,{show:u.value.showTooltip&&$.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:C.value,content:B.value,isFullscreen:y.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({...N.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),k.value?(e.openBlock(),e.createBlock(pe.default,{key:9,hideDetails:"",config:{open:u.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(ve.DataTable,{key:`table_${L.value}`,colNames:w.value.colNames,head:w.value.head,body:w.value.body,config:w.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>u.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Ae)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,be))}},Ie=me._export_sfc(ze,[["__scopeId","data-v-0ba6a1b9"]]);exports.default=Ie;