vue-data-ui 3.22.6 → 3.22.8

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 (203) hide show
  1. package/dist/{Arrow-Ds4xmpiQ.js → Arrow-DdymhUfY.js} +1 -1
  2. package/dist/{BaseDraggableDialog-VbypEaAa.js → BaseDraggableDialog-DcfGlH8A.js} +2 -2
  3. package/dist/{BaseIcon-DcUvOfxf.js → BaseIcon-C2qlyHc7.js} +1 -1
  4. package/dist/{BaseLegendToggle-DFwIY5bE.js → BaseLegendToggle-DtQ8vyfr.js} +1 -1
  5. package/dist/{BaseZoomControls-DwolSINF.js → BaseZoomControls-C6zonwhr.js} +2 -2
  6. package/dist/{ColorPicker-UVDPcrjE.js → ColorPicker-CK2-h611.js} +2 -2
  7. package/dist/{DataTable-CXfvIulC.js → DataTable-D9NvewTT.js} +2 -2
  8. package/dist/{Legend-D-635Kag.js → Legend-ROt6ugzW.js} +2 -2
  9. package/dist/{NonSvgPenAndPaper-pR_1qp3s.js → NonSvgPenAndPaper-BHHNsVVP.js} +29 -29
  10. package/dist/{PackageVersion-Da7hl-34.js → PackageVersion-DW7zwRcm.js} +1 -1
  11. package/dist/{PenAndPaper-Bk2-E7V4.js → PenAndPaper-pcgwlYr2.js} +18 -18
  12. package/dist/{Shape-BSetplwm.js → Shape-UpH0a4Ur.js} +3 -3
  13. package/dist/{Slicer-ClIGOuoX.js → Slicer-BZ5VnOOS.js} +19 -19
  14. package/dist/{SlicerPreview-D1n9AW39.js → SlicerPreview-BQFeCw0m.js} +351 -351
  15. package/dist/{SparkTooltip-CjDAyolg.js → SparkTooltip-BTLN-Kex.js} +6 -6
  16. package/dist/{Title-C-p0ilWB.js → Title-CcNiYzEo.js} +1 -1
  17. package/dist/{Tooltip-YabpoXo1.js → Tooltip-CxOrWlFy.js} +1 -1
  18. package/dist/{UserOptions-BO4VFL8O.js → UserOptions-16uF1ayB.js} +2 -2
  19. package/dist/components/arrow.js +1 -1
  20. package/dist/components/vue-ui-3d-bar.js +1 -1
  21. package/dist/components/vue-ui-accordion.js +1 -1
  22. package/dist/components/vue-ui-age-pyramid.js +1 -1
  23. package/dist/components/vue-ui-annotator.js +1 -1
  24. package/dist/components/vue-ui-bullet.js +1 -1
  25. package/dist/components/vue-ui-bump.js +1 -1
  26. package/dist/components/vue-ui-candlestick.js +1 -1
  27. package/dist/components/vue-ui-carousel-table.js +1 -1
  28. package/dist/components/vue-ui-chestnut.js +1 -1
  29. package/dist/components/vue-ui-chord.js +1 -1
  30. package/dist/components/vue-ui-circle-pack.js +1 -1
  31. package/dist/components/vue-ui-cursor.js +1 -1
  32. package/dist/components/vue-ui-dag.js +1 -1
  33. package/dist/components/vue-ui-dashboard.js +1 -1
  34. package/dist/components/vue-ui-digits.js +1 -1
  35. package/dist/components/vue-ui-donut-evolution.js +1 -1
  36. package/dist/components/vue-ui-donut.js +1 -1
  37. package/dist/components/vue-ui-dumbbell.js +1 -1
  38. package/dist/components/vue-ui-flow.js +1 -1
  39. package/dist/components/vue-ui-funnel.js +1 -1
  40. package/dist/components/vue-ui-galaxy.js +1 -1
  41. package/dist/components/vue-ui-gauge.js +1 -1
  42. package/dist/components/vue-ui-geo.js +1 -1
  43. package/dist/components/vue-ui-gizmo.js +1 -1
  44. package/dist/components/vue-ui-heatmap.js +1 -1
  45. package/dist/components/vue-ui-history-plot.js +1 -1
  46. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  47. package/dist/components/vue-ui-icon.js +1 -1
  48. package/dist/components/vue-ui-kpi.js +1 -1
  49. package/dist/components/vue-ui-mini-loader.js +1 -1
  50. package/dist/components/vue-ui-molecule.js +1 -1
  51. package/dist/components/vue-ui-mood-radar.js +1 -1
  52. package/dist/components/vue-ui-nested-donuts.js +1 -1
  53. package/dist/components/vue-ui-onion.js +1 -1
  54. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  55. package/dist/components/vue-ui-quadrant.js +1 -1
  56. package/dist/components/vue-ui-quick-chart.js +1 -1
  57. package/dist/components/vue-ui-radar.js +1 -1
  58. package/dist/components/vue-ui-rating.js +1 -1
  59. package/dist/components/vue-ui-relation-circle.js +1 -1
  60. package/dist/components/vue-ui-ridgeline.js +1 -1
  61. package/dist/components/vue-ui-rings.js +1 -1
  62. package/dist/components/vue-ui-scatter.js +1 -1
  63. package/dist/components/vue-ui-skeleton.js +1 -1
  64. package/dist/components/vue-ui-smiley.js +1 -1
  65. package/dist/components/vue-ui-spark-trend.js +1 -1
  66. package/dist/components/vue-ui-sparkbar.js +1 -1
  67. package/dist/components/vue-ui-sparkgauge.js +1 -1
  68. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  69. package/dist/components/vue-ui-sparkline.js +1 -1
  70. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  71. package/dist/components/vue-ui-stackbar.js +1 -1
  72. package/dist/components/vue-ui-stackline.js +1 -1
  73. package/dist/components/vue-ui-strip-plot.js +1 -1
  74. package/dist/components/vue-ui-table-heatmap.js +1 -1
  75. package/dist/components/vue-ui-table-sparkline.js +1 -1
  76. package/dist/components/vue-ui-table.js +1 -1
  77. package/dist/components/vue-ui-thermometer.js +1 -1
  78. package/dist/components/vue-ui-timer.js +1 -1
  79. package/dist/components/vue-ui-tiremarks.js +1 -1
  80. package/dist/components/vue-ui-treemap.js +1 -1
  81. package/dist/components/vue-ui-vertical-bar.js +1 -1
  82. package/dist/components/vue-ui-waffle.js +1 -1
  83. package/dist/components/vue-ui-wheel.js +1 -1
  84. package/dist/components/vue-ui-word-cloud.js +1 -1
  85. package/dist/components/vue-ui-world.js +1 -1
  86. package/dist/components/vue-ui-xy-canvas.js +1 -1
  87. package/dist/components/vue-ui-xy.js +1 -1
  88. package/dist/{dom-to-png-CVJfsfwL.js → dom-to-png-BbwhsRIr.js} +1 -1
  89. package/dist/exposedLib-VXFp3Z2c.js +19 -0
  90. package/dist/{geoProjections-Czak6Jn1.js → geoProjections-BbN7z57k.js} +172 -15
  91. package/dist/{img-B_y5qDdm.js → img-DnP3eXuv.js} +1 -1
  92. package/dist/{labelUtils-CyVwqXSh.js → labelUtils-DBEh078l.js} +1 -1
  93. package/dist/{lib-DRBJCmHW.js → lib-JqW18y5I.js} +49 -30
  94. package/dist/{package-DyQ_PQis.js → package-gp9pYCfN.js} +1 -1
  95. package/dist/{pdf-CG02qhAH.js → pdf-hj3gzrE7.js} +1 -1
  96. package/dist/{render-common-CUAlQvAQ.js → render-common-CLn1VXJ9.js} +20 -20
  97. package/dist/ssr/vue-ui-donut.js +1 -1
  98. package/dist/ssr/vue-ui-xy.js +1 -1
  99. package/dist/ssr.js +2 -2
  100. package/dist/style.css +1 -1
  101. package/dist/types/utils.d.ts +18 -0
  102. package/dist/{useAutoSizeLabelsInsideViewbox-DPMOys9n.js → useAutoSizeLabelsInsideViewbox-BGnDfZdg.js} +1 -1
  103. package/dist/{useNestedProp-BEo2N1Db.js → useNestedProp-DIuuzG1r.js} +1 -1
  104. package/dist/{usePrinter-CRp5IW3v.js → usePrinter-CqqHmnBI.js} +2 -2
  105. package/dist/utils.js +23 -23
  106. package/dist/{vue-data-ui-Bpu4kxlm.js → vue-data-ui-AZZ9Cq-4.js} +68 -68
  107. package/dist/vue-data-ui.js +77 -77
  108. package/dist/{vue-ui-3d-bar-BAH0jNtT.js → vue-ui-3d-bar-B3HxJmDI.js} +124 -124
  109. package/dist/{vue-ui-accordion-CfMrbDoq.js → vue-ui-accordion-YyosvEPo.js} +3 -3
  110. package/dist/vue-ui-age-pyramid-DTAOc7fn.js +1238 -0
  111. package/dist/{vue-ui-annotator-CG6rhFpy.js → vue-ui-annotator-CfJXeAOE.js} +6 -6
  112. package/dist/vue-ui-bullet-CCLnrOLm.js +710 -0
  113. package/dist/vue-ui-bump-Rq7efdoe.js +1249 -0
  114. package/dist/vue-ui-candlestick-D-Z9pEaA.js +1829 -0
  115. package/dist/vue-ui-carousel-table-Lx5Zk4dG.js +455 -0
  116. package/dist/{vue-ui-chestnut-Cx8T3NEl.js → vue-ui-chestnut-RfWMGUD-.js} +114 -114
  117. package/dist/{vue-ui-chord-B-sauvLo.js → vue-ui-chord-Db1O_diJ.js} +57 -57
  118. package/dist/vue-ui-circle-pack-B4Ro7UuI.js +1608 -0
  119. package/dist/{vue-ui-cursor-DVsEm_4l.js → vue-ui-cursor-DLP7wxsw.js} +61 -61
  120. package/dist/{vue-ui-dag-Cfi0b9qm.js → vue-ui-dag-DL3zq0F2.js} +37 -37
  121. package/dist/{vue-ui-dashboard-F_NZ1xoQ.js → vue-ui-dashboard-C2ozZ-LI.js} +69 -69
  122. package/dist/{vue-ui-digits-BfP1kbj3.js → vue-ui-digits-ThFVNO3l.js} +3 -3
  123. package/dist/{vue-ui-donut-DlVRnVr_.js → vue-ui-donut-BuTd6dt4.js} +224 -224
  124. package/dist/{vue-ui-donut-BwAyvV3-.js → vue-ui-donut-C3Rt6j-I.js} +458 -458
  125. package/dist/vue-ui-donut-evolution-DY46UPF_.js +1510 -0
  126. package/dist/vue-ui-dumbbell-wK7vUB0x.js +1530 -0
  127. package/dist/{vue-ui-flow-D_7Idmmw.js → vue-ui-flow-BTUNfWb7.js} +122 -122
  128. package/dist/vue-ui-funnel-BhoHzyHa.js +777 -0
  129. package/dist/{vue-ui-galaxy-Bjxbg5_B.js → vue-ui-galaxy-DJ2uNYcN.js} +263 -263
  130. package/dist/{vue-ui-gauge-Dt0H7DgC.js → vue-ui-gauge-Cf4NqvrO.js} +226 -226
  131. package/dist/{vue-ui-geo-89DEQb5l.js → vue-ui-geo-ovHu_Sc9.js} +21 -21
  132. package/dist/{vue-ui-gizmo-CQyLK18v.js → vue-ui-gizmo-DDxEj-qe.js} +7 -7
  133. package/dist/{vue-ui-heatmap-o6MvoxBK.js → vue-ui-heatmap-Npqnvb1r.js} +282 -282
  134. package/dist/vue-ui-history-plot-C3Kjy2tc.js +1715 -0
  135. package/dist/vue-ui-horizontal-bar-D1rCsgqt.js +1683 -0
  136. package/dist/{vue-ui-kpi-4C-j92D-.js → vue-ui-kpi-BrlfYO-j.js} +4 -4
  137. package/dist/{vue-ui-mini-loader-Bj4Wv-i8.js → vue-ui-mini-loader-D5we7V_W.js} +2 -2
  138. package/dist/vue-ui-molecule-CExCqZ08.js +925 -0
  139. package/dist/{vue-ui-mood-radar-B5W35Fvp.js → vue-ui-mood-radar-DlVh6hwx.js} +27 -27
  140. package/dist/vue-ui-nested-donuts-3TRV8pN-.js +1487 -0
  141. package/dist/vue-ui-onion-DwKK9DXn.js +1200 -0
  142. package/dist/{vue-ui-parallel-coordinate-plot-DBpHCFxa.js → vue-ui-parallel-coordinate-plot-DSp_cwU-.js} +57 -57
  143. package/dist/vue-ui-quadrant-ByVg-NBs.js +1978 -0
  144. package/dist/{vue-ui-quick-chart-so_8PzvS.js → vue-ui-quick-chart-WMzSJxGZ.js} +188 -188
  145. package/dist/{vue-ui-radar-5fQ5AAWD.js → vue-ui-radar-DE-me6OC.js} +64 -64
  146. package/dist/vue-ui-rating-CzD3EQ3G.js +343 -0
  147. package/dist/vue-ui-relation-circle-L7-dTqet.js +924 -0
  148. package/dist/vue-ui-ridgeline-Cp3YP0xe.js +1622 -0
  149. package/dist/vue-ui-rings-WzWiEo9W.js +1246 -0
  150. package/dist/vue-ui-scatter-DwrAydha.js +2413 -0
  151. package/dist/{vue-ui-skeleton-BkxB6Dik.js → vue-ui-skeleton-CuFm4PtB.js} +58 -58
  152. package/dist/{vue-ui-smiley-C4g0iaF7.js → vue-ui-smiley-D4NnZ1mg.js} +17 -17
  153. package/dist/{vue-ui-spark-trend-0FELlq4x.js → vue-ui-spark-trend-C38ysZ-c.js} +21 -21
  154. package/dist/{vue-ui-sparkbar-D-i_VLO6.js → vue-ui-sparkbar-B03ndcUe.js} +80 -80
  155. package/dist/{vue-ui-sparkgauge-CWw6w_ng.js → vue-ui-sparkgauge-DgPc4vPT.js} +7 -7
  156. package/dist/{vue-ui-sparkhistogram-DuGpkfma.js → vue-ui-sparkhistogram-D02ff7ZI.js} +115 -115
  157. package/dist/{vue-ui-sparkline-Bi06lHQd.js → vue-ui-sparkline-DlTfNQj8.js} +464 -464
  158. package/dist/vue-ui-sparkstackbar-DrmiWFlw.js +662 -0
  159. package/dist/vue-ui-stackbar-BVdApDnY.js +2332 -0
  160. package/dist/vue-ui-stackline-QzQQ7lTy.js +2419 -0
  161. package/dist/vue-ui-strip-plot-C-TFNvgz.js +1729 -0
  162. package/dist/{vue-ui-table-DBlZswRi.js → vue-ui-table-Q3brrivC.js} +68 -68
  163. package/dist/{vue-ui-table-heatmap-3xYIDKcP.js → vue-ui-table-heatmap-D0pZbBOH.js} +14 -14
  164. package/dist/{vue-ui-table-sparkline-BH5PzEnJ.js → vue-ui-table-sparkline-Q6BHPKUn.js} +199 -199
  165. package/dist/{vue-ui-thermometer-BxMzAqoT.js → vue-ui-thermometer-Bg0RR6m4.js} +26 -26
  166. package/dist/{vue-ui-timer-ONSitYDm.js → vue-ui-timer-BdzKpoRj.js} +29 -29
  167. package/dist/{vue-ui-tiremarks-DWXM-9nR.js → vue-ui-tiremarks-DWb69ofh.js} +17 -17
  168. package/dist/{vue-ui-treemap-B03c4RIy.js → vue-ui-treemap-uUz07Prw.js} +401 -401
  169. package/dist/vue-ui-waffle-Pi9e7Ae7.js +1362 -0
  170. package/dist/{vue-ui-wheel-DRP7X8S2.js → vue-ui-wheel-DTfvWYA7.js} +137 -137
  171. package/dist/{vue-ui-word-cloud-AKpMO97a.js → vue-ui-word-cloud-DqfljAqH.js} +40 -40
  172. package/dist/vue-ui-world-BtBrH92Z.js +3016 -0
  173. package/dist/{vue-ui-xy-Bmd11BxR.js → vue-ui-xy-Bvgy2do1.js} +1598 -1596
  174. package/dist/{vue-ui-xy-DJ8YKPgs.js → vue-ui-xy-D5KsuNR2.js} +259 -259
  175. package/dist/{vue-ui-xy-canvas-DO_PDGKf.js → vue-ui-xy-canvas-BfgeE3TW.js} +440 -437
  176. package/package.json +1 -1
  177. package/dist/exposedLib-CjwriUaG.js +0 -19
  178. package/dist/vue-ui-age-pyramid-BF5ZuuyI.js +0 -1238
  179. package/dist/vue-ui-bullet-C_oBS1cr.js +0 -710
  180. package/dist/vue-ui-bump-BZB1Na8h.js +0 -1249
  181. package/dist/vue-ui-candlestick-8d_1xO8X.js +0 -1826
  182. package/dist/vue-ui-carousel-table-BfZNcwmY.js +0 -455
  183. package/dist/vue-ui-circle-pack-BLh8HnGK.js +0 -1608
  184. package/dist/vue-ui-donut-evolution-D1k4u6cA.js +0 -1510
  185. package/dist/vue-ui-dumbbell-DgmvPpK2.js +0 -1530
  186. package/dist/vue-ui-funnel-BYCFV5TD.js +0 -777
  187. package/dist/vue-ui-history-plot-B7zuCfdg.js +0 -1715
  188. package/dist/vue-ui-horizontal-bar-CwB4sc6M.js +0 -1683
  189. package/dist/vue-ui-molecule-BDrRmwmm.js +0 -925
  190. package/dist/vue-ui-nested-donuts-wfesrzle.js +0 -1487
  191. package/dist/vue-ui-onion-B8-psLbF.js +0 -1200
  192. package/dist/vue-ui-quadrant-BzyGOJR2.js +0 -1978
  193. package/dist/vue-ui-rating-CKWHDKOT.js +0 -343
  194. package/dist/vue-ui-relation-circle-Bd_ONHCz.js +0 -924
  195. package/dist/vue-ui-ridgeline-DVbYznRz.js +0 -1622
  196. package/dist/vue-ui-rings-c-yLWFHr.js +0 -1246
  197. package/dist/vue-ui-scatter-QhmE7n1H.js +0 -2413
  198. package/dist/vue-ui-sparkstackbar-DrKgBUmt.js +0 -662
  199. package/dist/vue-ui-stackbar-DDvuDGQ_.js +0 -2329
  200. package/dist/vue-ui-stackline-C0NHBUaE.js +0 -2416
  201. package/dist/vue-ui-strip-plot-_6LL45i9.js +0 -1729
  202. package/dist/vue-ui-waffle-afa8HSxz.js +0 -1362
  203. package/dist/vue-ui-world-CqS-HhZl.js +0 -14264
@@ -1,1487 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { At as t, Dt as n, Ht as r, It as i, Pt as a, Q as o, S as s, Tt as c, W as l, Wt as ee, X as te, Z as ne, _t as re, at as ie, b as ae, d as oe, i as se, jt as ce, n as le, q as u, t as ue, u as de, v as fe, w as pe } from "./lib-DRBJCmHW.js";
3
- import { t as me } from "./useConfig-DYM3f6EI.js";
4
- import { t as he } from "./usePrinter-CRp5IW3v.js";
5
- import { n as ge, t as _e } from "./BaseScanner-DZvpgOjM.js";
6
- import { t as ve } from "./useSvgExport-SVIsDot8.js";
7
- import { t as ye } from "./useNestedProp-BEo2N1Db.js";
8
- import { t as be } from "./useThemeCheck-C43Tcqmk.js";
9
- import { t as xe } from "./img-B_y5qDdm.js";
10
- import { n as Se } from "./Title-C-p0ilWB.js";
11
- import { t as Ce } from "./_plugin-vue_export-helper-B3ysoDQm.js";
12
- import { c as we } from "./canvas-lib-BOP_HS11.js";
13
- import { t as Te } from "./useResponsive-BfnK0KxU.js";
14
- import { t as Ee } from "./BaseLegendToggle-DFwIY5bE.js";
15
- import { t as De } from "./A11yDataTable-DdRsVULz.js";
16
- import { t as Oe } from "./useUserOptionState-DK-_1ddE.js";
17
- import { t as ke } from "./useChartAccessibility-DYqac8yF.js";
18
- import { t as Ae } from "./labelUtils-CyVwqXSh.js";
19
- import { t as je } from "./Legend-D-635Kag.js";
20
- import { t as Me } from "./vue_ui_nested_donuts-B8csIoVO.js";
21
- import { Fragment as d, Teleport as Ne, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createSlots as Pe, createTextVNode as Fe, createVNode as Ie, defineAsyncComponent as _, guardReactiveProps as v, mergeProps as Le, nextTick as Re, normalizeClass as y, normalizeProps as b, normalizeStyle as ze, onBeforeUnmount as Be, onMounted as Ve, openBlock as x, ref as S, renderList as C, renderSlot as w, resolveDynamicComponent as He, shallowRef as Ue, toDisplayString as T, toRefs as We, unref as E, vShow as Ge, watch as Ke, withCtx as D, withDirectives as qe } from "vue";
22
- //#region src/components/vue-ui-nested-donuts.vue
23
- var Je = /* @__PURE__ */ e({ default: () => Ot }), Ye = ["id"], Xe = ["id"], Ze = ["id"], Qe = { style: { position: "relative" } }, $e = [
24
- "xmlns",
25
- "aria-describedby",
26
- "viewBox"
27
- ], et = ["width", "height"], tt = ["id"], nt = ["offset", "stop-color"], rt = ["offset", "stop-opacity"], it = ["id"], at = ["id"], ot = ["id"], st = ["flood-color"], ct = ["id", "d"], lt = [
28
- "d",
29
- "fill",
30
- "stroke",
31
- "stroke-width",
32
- "filter"
33
- ], ut = [
34
- "d",
35
- "fill",
36
- "stroke",
37
- "stroke-width"
38
- ], dt = { key: 1 }, ft = ["d", "fill"], pt = { key: 2 }, mt = [
39
- "font-size",
40
- "font-weight",
41
- "fill",
42
- "dy"
43
- ], ht = ["href"], gt = [
44
- "x",
45
- "y",
46
- "font-size",
47
- "font-weight",
48
- "fill"
49
- ], _t = { key: 3 }, vt = ["filter"], yt = [
50
- "opacity",
51
- "text-anchor",
52
- "x",
53
- "y",
54
- "fill",
55
- "font-size",
56
- "font-weight"
57
- ], bt = [
58
- "opacity",
59
- "text-anchor",
60
- "x",
61
- "y",
62
- "fill",
63
- "font-size",
64
- "font-weight"
65
- ], xt = [
66
- "d",
67
- "fill",
68
- "onMouseenter",
69
- "onClick",
70
- "onMouseleave"
71
- ], St = {
72
- key: 0,
73
- style: {
74
- position: "absolute",
75
- top: "100%",
76
- left: "0",
77
- width: "100%"
78
- },
79
- "data-dom-to-png-ignore": "",
80
- "aria-hidden": "true"
81
- }, Ct = {
82
- key: 5,
83
- class: "vue-data-ui-watermark"
84
- }, wt = ["id"], Tt = {
85
- key: 0,
86
- class: "vue-ui-nested-donuts-legend-title"
87
- }, Et = ["onClick"], Dt = ["innerHTML"], Ot = /*#__PURE__*/ Ce({
88
- __name: "vue-ui-nested-donuts",
89
- props: {
90
- config: {
91
- type: Object,
92
- default() {
93
- return {};
94
- }
95
- },
96
- dataset: {
97
- type: Array,
98
- default() {
99
- return [];
100
- }
101
- }
102
- },
103
- emits: [
104
- "selectLegend",
105
- "selectDatapoint",
106
- "copyAlt"
107
- ],
108
- setup(e, { expose: Ce, emit: Je }) {
109
- let Ot = _(() => import("./Tooltip-YabpoXo1.js")), kt = _(() => import("./BaseIcon-DcUvOfxf.js").then((e) => e.n)), At = _(() => import("./vue-ui-accordion-CfMrbDoq.js").then((e) => e.n)), jt = _(() => import("./DataTable-CXfvIulC.js")), Mt = _(() => import("./UserOptions-BO4VFL8O.js").then((e) => e.n)), Nt = _(() => import("./PenAndPaper-Bk2-E7V4.js").then((e) => e.t)), Pt = _(() => import("./PackageVersion-Da7hl-34.js").then((e) => e.t)), Ft = _(() => import("./BaseDraggableDialog-VbypEaAa.js").then((e) => e.n)), { vue_ui_nested_donuts: It } = me(), { isThemeValid: Lt, warnInvalidTheme: Rt } = be(), O = e, zt = f({
110
- get() {
111
- return !!O.dataset && O.dataset.length;
112
- },
113
- set(e) {
114
- return e;
115
- }
116
- }), k = S(l()), Bt = S(!1), Vt = S(""), Ht = S(null), Ut = S(0), A = S(null), Wt = S(null), Gt = S(null), Kt = S(null), qt = S(null), Jt = S(0), Yt = S(0), Xt = S(0), j = S(!0), M = S([]), Zt = S([]), Qt = S(!1), $t = S(null), en = S(null), tn = S(!1), nn = S(!1), N = S(null), rn = S({
117
- x: 0,
118
- y: 0
119
- }), an = S("pointer"), on = S(!1), P = S(!1);
120
- function sn(e) {
121
- P.value = e, Ut.value += 1;
122
- }
123
- let F = S(hn()), I = f(() => F.value.userOptions.useCursorPointer), cn = {
124
- name: "",
125
- series: [
126
- {
127
- name: "",
128
- values: [3],
129
- color: "#BABABA"
130
- },
131
- {
132
- name: "",
133
- values: [2],
134
- color: "#AAAAAA"
135
- },
136
- {
137
- name: "",
138
- values: [1],
139
- color: "#CACACA"
140
- }
141
- ]
142
- }, ln = f(() => ee({
143
- defaultConfig: {
144
- useCssAnimation: !1,
145
- table: { show: !1 },
146
- startAnimation: { show: !1 },
147
- userOptions: { show: !1 },
148
- style: { chart: {
149
- backgroundColor: "#99999930",
150
- layout: { labels: { dataLabels: { show: !1 } } },
151
- legend: {
152
- backgroundColor: "transparent",
153
- showValue: !1,
154
- showPercentage: !1
155
- },
156
- title: {
157
- color: "#1A1A1A",
158
- subtitle: { color: "#5A5A5A" }
159
- }
160
- } }
161
- },
162
- userConfig: F.value.skeletonConfig ?? {}
163
- })), { loading: un, FINAL_DATASET: L, manualLoading: dn } = ge({
164
- ...We(O),
165
- FINAL_CONFIG: F,
166
- prepareConfig: hn,
167
- callback: () => {
168
- Promise.resolve().then(async () => {
169
- await vn();
170
- });
171
- },
172
- skeletonDataset: O.config?.skeletonDataset ?? [cn, cn],
173
- skeletonConfig: ee({
174
- defaultConfig: F.value,
175
- userConfig: ln.value
176
- })
177
- }), { userOptionsVisible: fn, setUserOptionsVisibility: pn, keepUserOptionState: mn } = Oe({ config: F.value }), { svgRef: R } = ke({ config: F.value.style.chart.title });
178
- function hn() {
179
- let e = ye({
180
- userConfig: O.config,
181
- defaultConfig: It
182
- }), n = {}, i = e.theme;
183
- if (i) if (!Lt.value(e)) Rt(e), n = e;
184
- else {
185
- let a = ye({
186
- userConfig: Me[i] || O.config,
187
- defaultConfig: e
188
- });
189
- n = {
190
- ...ye({
191
- userConfig: O.config,
192
- defaultConfig: a
193
- }),
194
- customPalette: e.customPalette.length ? e.customPalette : r[i] || t
195
- };
196
- }
197
- else n = e;
198
- return n;
199
- }
200
- Ke(() => O.config, (e) => {
201
- un.value || (F.value = hn()), fn.value = !F.value.userOptions.showOnChartHover, bn(), Jt.value += 1, Yt.value += 1, Xt.value += 1, V.value.dataLabels.show = F.value.style.chart.layout.labels.dataLabels.show, V.value.showTable = F.value.table.show, V.value.showTooltip = F.value.style.chart.tooltip.show, H.value.width = F.value.style.chart.width, H.value.height = F.value.style.chart.height;
202
- }, { deep: !0 });
203
- let gn = f(() => {
204
- let { top: e, right: t, bottom: n, left: r } = F.value.style.chart.padding;
205
- return {
206
- css: `padding:${e}px ${t}px ${n}px ${r}px`,
207
- top: e,
208
- right: t,
209
- bottom: n,
210
- left: r
211
- };
212
- });
213
- function _n(e, t = 1e3, n = 50) {
214
- return new Promise((r) => {
215
- let i = e.length;
216
- M.value = Array(i).fill(0), Zt.value = [];
217
- let o = 0;
218
- e.forEach((e, s) => {
219
- setTimeout(() => {
220
- let n = performance.now();
221
- function c(l) {
222
- let ee = Math.min((l - n) / t, 1), te = e * ne(ee);
223
- M.value[s] = te, M.value = [...M.value];
224
- let re = [], ie = 0;
225
- O.dataset.forEach((e, t) => {
226
- let n = fe(e.series.reduce((e, t) => e + fe(a(t.values).reduce((e, t) => e + t, 0)), 0)) - fe(M.value.slice(ie, ie + e.series.length).reduce((e, t) => e + t, 0));
227
- n > Number.MIN_VALUE && re.push({
228
- name: "__ghost__",
229
- arcOf: e.name,
230
- arcOfId: `${k.value}_${t}`,
231
- id: `ghost_${k.value}_${t}`,
232
- seriesIndex: -1,
233
- datasetIndex: t,
234
- color: "transparent",
235
- value: n,
236
- fullValue: n,
237
- absoluteValues: [],
238
- ghost: !0
239
- }), ie += e.series.length;
240
- }), Zt.value = re, ee < 1 ? requestAnimationFrame(c) : (o += 1, o === i && r());
241
- }
242
- requestAnimationFrame(c);
243
- }, s * n);
244
- });
245
- });
246
- }
247
- async function vn() {
248
- if (F.value.startAnimation?.show) {
249
- let e = L.value.flatMap((e) => e.series).map((e) => a(e.values).reduce((e, t) => e + t, 0));
250
- M.value = e.map(() => 0), j.value = !0, Zt.value = L.value.map((e, t) => {
251
- let n = e.series.reduce((e, t) => e + a(t.values).reduce((e, t) => e + t, 0), 0);
252
- return {
253
- name: "__ghost__",
254
- arcOf: e.name,
255
- arcOfId: `${k.value}_${t}`,
256
- id: `ghost_${k.value}_${t}`,
257
- seriesIndex: -1,
258
- datasetIndex: t,
259
- color: "transparent",
260
- value: n,
261
- fullValue: n,
262
- absoluteValues: [],
263
- ghost: !0
264
- };
265
- }), await Re(), _n(e, F.value.startAnimation.durationMs, F.value.startAnimation.staggerMs).then(() => {
266
- j.value = !1, Zt.value = [];
267
- });
268
- } else j.value = !1;
269
- }
270
- Ve(async () => {
271
- Qt.value = !0, bn(), await vn();
272
- });
273
- let z = Ue(null), B = Ue(null), yn = f(() => !!F.value.debug);
274
- function bn() {
275
- if (n(O.dataset) ? (o({
276
- componentName: "VueUiNestedDonuts",
277
- type: "dataset",
278
- debug: yn.value
279
- }), zt.value = !1, dn.value = !0) : dn.value = F.value.loading, F.value.responsive) {
280
- let e = we(() => {
281
- let { width: e, height: t } = Te({
282
- chart: A.value,
283
- title: F.value.style.chart.title.text ? Wt.value : null,
284
- legend: F.value.style.chart.legend.show ? Gt.value : null,
285
- source: Kt.value,
286
- noTitle: qt.value,
287
- padding: gn.value
288
- });
289
- requestAnimationFrame(() => {
290
- H.value.width = e, H.value.height = t;
291
- });
292
- });
293
- z.value && (B.value && z.value.unobserve(B.value), z.value.disconnect()), z.value = new ResizeObserver(e), B.value = A.value.parentNode, z.value.observe(B.value);
294
- }
295
- }
296
- Be(() => {
297
- z.value && (B.value && z.value.unobserve(B.value), z.value.disconnect());
298
- });
299
- let { isPrinting: xn, isImaging: Sn, generatePdf: Cn, generateImage: wn } = he({
300
- elementId: `nested_donuts_${k.value}`,
301
- fileName: F.value.style.chart.title.text || "vue-ui-nested-donuts",
302
- options: F.value.userOptions.print
303
- }), Tn = f(() => F.value.userOptions.show && !F.value.style.chart.title.text), En = f(() => s(F.value.customPalette)), V = S({
304
- dataLabels: { show: F.value.style.chart.layout.labels.dataLabels.show },
305
- showTable: F.value.table.show,
306
- showTooltip: F.value.style.chart.tooltip.show
307
- });
308
- Ke(F, () => {
309
- V.value = {
310
- dataLabels: { show: F.value.style.chart.layout.labels.dataLabels.show },
311
- showTable: F.value.table.show,
312
- showTooltip: F.value.style.chart.tooltip.show
313
- };
314
- }, { immediate: !0 });
315
- let H = S({
316
- width: F.value.style.chart.width,
317
- height: F.value.style.chart.height
318
- }), U = Je;
319
- function Dn({ datapoint: e, index: t, seriesIndex: n }) {
320
- F.value.events.datapointClick && F.value.events.datapointClick({
321
- datapoint: e,
322
- seriesIndex: n
323
- }), U("selectDatapoint", {
324
- datapoint: e,
325
- index: t
326
- });
327
- }
328
- function On({ from: e, to: t, duration: n, onUpdate: r, onDone: i, easing: a = ne }) {
329
- let o = performance.now();
330
- function s(c) {
331
- let l = Math.min((c - o) / n, 1), ee = a(l);
332
- r(e + (t - e) * ee, l), l < 1 ? requestAnimationFrame(s) : (r(t, 1), i && i());
333
- }
334
- requestAnimationFrame(s);
335
- }
336
- let W = S([]), G = f(() => {
337
- un.value, L.value.forEach((e, t) => {
338
- [null, void 0].includes(e.name) && o({
339
- componentName: "VueUiNestedDonuts",
340
- type: "datasetSerieAttribute",
341
- property: "name",
342
- index: t,
343
- debug: yn.value
344
- }), [null, void 0].includes(e.series) ? o({
345
- componentName: "VueUiNestedDonuts",
346
- type: "datasetSerieAttribute",
347
- property: "series",
348
- index: t,
349
- debug: yn.value
350
- }) : e.series.length === 0 ? o({
351
- componentName: "VueUiNestedDonuts",
352
- type: "datasetAttributeEmpty",
353
- property: `series at index ${t}`,
354
- debug: yn.value
355
- }) : e.series.forEach((e, t) => {
356
- [null, void 0].includes(e.name) && o({
357
- componentName: "VueUiNestedDonuts",
358
- type: "datasetSerieAttribute",
359
- property: "name",
360
- index: t,
361
- key: "serie",
362
- debug: yn.value
363
- }), [null, void 0].includes(e.values) && o({
364
- componentName: "VueUiNestedDonuts",
365
- type: "datasetSerieAttribute",
366
- property: "values",
367
- index: t,
368
- key: "serie",
369
- debug: yn.value
370
- });
371
- });
372
- });
373
- let e = 0;
374
- return L.value.map((n, r) => ({
375
- ...n,
376
- total: n.series.filter((e) => !W.value.includes(e.id)).map((e) => a(e.values).reduce((e, t) => e + t, 0)).reduce((e, t) => e + t, 0),
377
- datasetIndex: r,
378
- id: `${k.value}_${r}`,
379
- series: n.series.map((i, o) => {
380
- let s = a(i.values).reduce((e, t) => e + t, 0);
381
- return {
382
- name: i.name,
383
- arcOf: n.name,
384
- arcOfId: `${k.value}_${r}`,
385
- id: `${k.value}_${r}_${o}`,
386
- seriesIndex: o,
387
- datasetIndex: r,
388
- color: ae(i.color) || En.value[o] || t[o % t.length],
389
- value: j.value ? M.value[e++] ?? 0 : s,
390
- absoluteValues: i.values || []
391
- };
392
- })
393
- }));
394
- });
395
- Ke(() => O.dataset, (e) => {
396
- Array.isArray(e) && e.length > 0 && (dn.value = !1);
397
- }, { immediate: !0 });
398
- let K = f(() => Math.min(H.value.height, H.value.width) * (F.value.style.chart.layout.donut.strokeWidth / 512)), q = f(() => [...G.value].map((e, t) => {
399
- let n = e.series.filter((e) => !W.value.includes(e.id)).map((e) => e.value).reduce((e, t) => e + t, 0);
400
- return {
401
- ...e,
402
- total: n,
403
- series: e.series.filter((e) => !W.value.includes(e.id)).map((e) => ({
404
- ...e,
405
- proportion: e.value / n
406
- }))
407
- };
408
- }));
409
- function kn(e, t, n) {
410
- let r = 0;
411
- for (let t = 0; t < e.length; t += 1) n.includes(e[t]) && (r += 1);
412
- return r < t;
413
- }
414
- let J = S(q.value);
415
- Ke(() => q.value, (e) => J.value = e);
416
- function An(e) {
417
- let t = e.map((e) => e.id);
418
- if (e.some((e) => W.value.includes(e.id))) {
419
- let e = new Set(t);
420
- W.value = W.value.filter((t) => !e.has(t));
421
- } else W.value.push(...t);
422
- U("selectLegend", q.value);
423
- }
424
- function Y(e) {
425
- let t = O.dataset.flatMap((e, t) => e.series.map((e, n) => ({
426
- value: a(e.values).reduce((e, t) => e + t, 0),
427
- id: `${k.value}_${t}_${n}`,
428
- arcOfId: `${k.value}_${t}`
429
- }))).find((t) => t.id === e.id);
430
- if (!t) return;
431
- let n = G.value.flatMap((e) => e.series).find((t) => t.id === e.id)?.value ?? 0, r = J.value.flatMap((e) => e.series).find((t) => t.id === e.id), i = r ? r.value : 0, o = G.value.find((e) => e.id === t.arcOfId);
432
- if (!o) return;
433
- let s = o.series.map((e) => e.id), c = kn(s, s.length - 1, W.value);
434
- W.value.includes(e.id) ? (W.value = W.value.filter((t) => t !== e.id), F.value.serieToggleAnimation.show ? On({
435
- from: i,
436
- to: n,
437
- duration: F.value.serieToggleAnimation.durationMs,
438
- onUpdate: (t) => {
439
- J.value = J.value.map((n) => ({
440
- ...n,
441
- series: n.series.map((n) => n.id === e.id ? {
442
- ...n,
443
- value: t
444
- } : n)
445
- }));
446
- },
447
- onDone: () => {
448
- U("selectLegend", q.value);
449
- }
450
- }) : (J.value = J.value.map((t) => ({
451
- ...t,
452
- series: t.series.map((t) => t.id === e.id ? {
453
- ...t,
454
- value: n
455
- } : t)
456
- })), U("selectLegend", q.value))) : c && (F.value.serieToggleAnimation.show ? On({
457
- from: i,
458
- to: 0,
459
- duration: F.value.serieToggleAnimation.durationMs,
460
- onUpdate: (t) => {
461
- J.value = J.value.map((n) => ({
462
- ...n,
463
- series: n.series.map((n) => n.id === e.id ? {
464
- ...n,
465
- value: t
466
- } : n)
467
- }));
468
- },
469
- onDone: () => {
470
- W.value.push(e.id), U("selectLegend", q.value);
471
- }
472
- }) : (J.value = J.value.map((t) => ({
473
- ...t,
474
- series: t.series.map((t) => t.id === e.id ? {
475
- ...t,
476
- value: 0
477
- } : t)
478
- })), W.value.push(e.id), U("selectLegend", q.value)));
479
- }
480
- function jn(e) {
481
- return G.value.length ? G.value.flatMap((e) => e.series).filter((t) => t.name === e) || (F.value.debug && console.warn(`VueUiNestedDonuts - Series name not found "${e}"`), null) : (F.value.debug && console.warn("VueUiNestedDonuts - There are no series to show."), null);
482
- }
483
- function Mn(e) {
484
- let t = jn(e);
485
- t !== null && (Array.isArray(t) ? t.forEach((e) => {
486
- W.value.includes(e.id) && Y({ id: e.id });
487
- }) : W.value.includes(t.id) && Y({ id: t.id }));
488
- }
489
- function Nn(e) {
490
- let t = jn(e);
491
- t !== null && (Array.isArray(t) ? t.forEach((e) => {
492
- W.value.includes(e.id) || Y({ id: e.id });
493
- }) : W.value.includes(t.id) || Y({ id: t.id }));
494
- }
495
- let Pn = f(() => K.value / G.value.length * F.value.style.chart.layout.donut.spacingRatio), Fn = f(() => J.value.map((e, t) => K.value - t * K.value / G.value.length)), X = f(() => J.value.map((e, t) => {
496
- let n = Math.abs(e.series.map((e) => e.value).reduce((e, t) => e + t, 0)) > 0, r = K.value - t * K.value / J.value.length, i = j.value ? Zt.value.find((e) => e.datasetIndex === t) : null, a = [...e.series, ...i ? [i] : []].map((e) => ({
497
- ...e,
498
- value: e.value < 1e-11 ? Number.MIN_VALUE : e.value
499
- })), o = c({ series: [{
500
- name: "_",
501
- color: F.value.style.chart.layout.donut.emptyFill,
502
- value: 1
503
- }] }, H.value.width / 2, H.value.height / 2, r, r, 1.99999, 2, 1, 360, 105.25, Pn.value), s = `M ${H.value.width / 2},${H.value.height / 2 + r}
504
- a ${r},${r} 0 1,1 0,${-2 * r}
505
- a ${r},${r} 0 1,1 0,${2 * r}`;
506
- return {
507
- ...e,
508
- hasData: n,
509
- radius: r,
510
- skeleton: o,
511
- fullCirclePath: s,
512
- donut: c({ series: a }, H.value.width / 2, H.value.height / 2, r, r, 1.99999, 2, 1, 360, 105.25, Pn.value)
513
- };
514
- })), In = f(() => [...G.value].map((e, t) => {
515
- let n = t * K.value / G.value.length;
516
- return {
517
- sizeRatio: n,
518
- donut: c({ series: [{ value: 1 }] }, H.value.width / 2, H.value.height / 2, K.value - n, K.value - n, 1.99999, 2, 1, 360, 105.25, K.value / G.value.length * F.value.style.chart.layout.donut.spacingRatio)[0]
519
- };
520
- })), Ln = S(null), Rn = S(null), Z = S(null), zn = S(null);
521
- function Bn({ datapoint: e, seriesIndex: t }) {
522
- F.value.events.datapointLeave && F.value.events.datapointLeave({
523
- datapoint: e,
524
- seriesIndex: t
525
- }), Bt.value = !1, Ln.value = null, Ht.value = null, Rn.value = null, Z.value = null, N.value = null, an.value = "pointer";
526
- }
527
- function Vn({ val: e, percentage: t, showVal: n, showPercentage: r, config: i }) {
528
- return Ae({
529
- config: i,
530
- val: e,
531
- percentage: t,
532
- showVal: n,
533
- showPercentage: r
534
- });
535
- }
536
- function Hn({ datapoint: e, _relativeIndex: t, seriesIndex: n, triggerMode: r = "pointer" }) {
537
- F.value.events.datapointEnter && F.value.events.datapointEnter({
538
- datapoint: e,
539
- seriesIndex: n
540
- }), an.value = r, N.value = n, Ln.value = e.arcOfId, Rn.value = e.id, Z.value = n, Ht.value = e.id, zn.value = {
541
- datapoint: e,
542
- seriesIndex: n,
543
- series: J.value,
544
- config: F.value
545
- };
546
- let i = F.value.style.chart.tooltip.customFormat;
547
- if (re(i) && ie(() => i({
548
- seriesIndex: n,
549
- datapoint: e,
550
- series: J.value,
551
- config: F.value
552
- }))) Vt.value = i({
553
- seriesIndex: n,
554
- datapoint: e,
555
- series: J.value,
556
- config: F.value
557
- });
558
- else {
559
- let t = "";
560
- if (F.value.style.chart.tooltip.showAllItemsAtIndex && W.value.length === 0) {
561
- let r = J.value.map((e) => e.series.find((e) => e.seriesIndex === n));
562
- r.forEach((i, a) => {
563
- if (!i) return "";
564
- t += `
565
- <div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${a < r.length - 1 ? `border-bottom:1px solid ${F.value.style.chart.tooltip.borderColor}` : ""}">
566
- <div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
567
- <svg viewBox="0 0 20 20" height="${F.value.style.chart.tooltip.fontSize}" width="${F.value.style.chart.tooltip.fontSize}">
568
- <circle cx="10" cy="10" r="10" fill="${i.color}"/>
569
- </svg>
570
- <span>
571
- ${i.arcOf ?? ""} - ${i.name}
572
- </span>
573
- </div>
574
- <span>
575
- <b>
576
- ${Vn({
577
- config: F.value.style.chart.tooltip,
578
- showVal: F.value.style.chart.tooltip.showValue,
579
- showPercentage: F.value.style.chart.tooltip.showPercentage,
580
- val: se(F.value.style.chart.layout.labels.dataLabels.formatter, e.value, u({
581
- p: F.value.style.chart.layout.labels.dataLabels.prefix,
582
- v: e.value,
583
- s: F.value.style.chart.layout.labels.dataLabels.suffix,
584
- r: F.value.style.chart.tooltip.roundingValue
585
- }), {
586
- datapoint: e,
587
- seriesIndex: n
588
- }),
589
- percentage: u({
590
- v: i.proportion * 100,
591
- s: "%",
592
- r: F.value.style.chart.tooltip.roundingPercentage
593
- })
594
- })}
595
- </b>
596
- </span>
597
- </div>
598
- `;
599
- });
600
- } else t += `<div style="width:100%;text-align:center;border-bottom:1px solid ${F.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.arcOf ?? ""} - ${e.name}</div>`, t += `<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="${e.color}"/></svg>`, F.value.style.chart.tooltip.showValue && (t += `<b>${se(F.value.style.chart.layout.labels.dataLabels.formatter, e.value, u({
601
- p: F.value.style.chart.layout.labels.dataLabels.prefix,
602
- v: e.value,
603
- s: F.value.style.chart.layout.labels.dataLabels.suffix,
604
- r: F.value.style.chart.tooltip.roundingValue
605
- }), {
606
- datapoint: e,
607
- seriesIndex: n
608
- })}</b>`), F.value.style.chart.tooltip.showPercentage && (F.value.style.chart.tooltip.showValue ? t += `<span>(${u({
609
- v: e.proportion * 100,
610
- s: "%",
611
- r: F.value.style.chart.tooltip.roundingPercentage
612
- })})</span></div>` : t += `<b>${u({
613
- v: e.proportion * 100,
614
- s: "%",
615
- r: F.value.style.chart.tooltip.roundingPercentage
616
- })}</b></div>`);
617
- Vt.value = `<div style="font-size:${F.value.style.chart.tooltip.fontSize}px">${t}</div>`;
618
- }
619
- Bt.value = !0;
620
- }
621
- function Un(e) {
622
- return e.proportion * 100 > F.value.style.chart.layout.labels.dataLabels.hideUnderValue;
623
- }
624
- function Wn(e, t) {
625
- if (!F.value.useBlurOnHover) return "";
626
- if (F.value.style.chart.tooltip.showAllItemsAtIndex && W.value.length === 0) return [null, void 0].includes(Z.value) || Z.value === t ? "" : `url(#blur_${k.value})`;
627
- if (!F.value.style.chart.tooltip.showAllItemsAtIndex || W.value.length) return [null, void 0].includes(Rn.value) || Rn.value === e.id ? "" : `url(#blur_${k.value})`;
628
- }
629
- let Gn = f(() => G.value.map((e, t) => {
630
- let n = e.series.filter((e) => !W.value.includes(e.id)), r = j.value ? n.map((e) => {
631
- let n = L.value[t].series.findIndex((t) => t.name === e.name);
632
- return a(L.value[t].series[n].values).reduce((e, t) => e + t, 0);
633
- }).reduce((e, t) => e + t, 0) : n.map((e) => e.value).reduce((e, t) => e + t, 0);
634
- return e.series.map((e, n) => {
635
- let i = a(L.value[t].series[n].values).reduce((e, t) => e + t, 0), o = j.value ? i : e.value, s = Vn({
636
- val: se(F.value.style.chart.layout.labels.dataLabels.formatter, o, u({
637
- p: F.value.style.chart.layout.labels.dataLabels.prefix,
638
- v: o,
639
- s: F.value.style.chart.layout.labels.dataLabels.suffix,
640
- r: F.value.style.chart.legend.roundingValue
641
- }), {
642
- datapoint: e,
643
- seriesIndex: n
644
- }),
645
- percentage: isNaN(o / r) || W.value.includes(e.id) ? "-" : u({
646
- v: o / r * 100,
647
- s: "%",
648
- r: F.value.style.chart.legend.roundingPercentage
649
- }),
650
- showVal: F.value.style.chart.legend.showValue,
651
- showPercentage: F.value.style.chart.legend.showPercentage,
652
- config: F.value.style.chart.legend
653
- }), c = `${e.name}${F.value.style.chart.legend.showPercentage || F.value.style.chart.legend.showValue ? ": " : ""}${s}`;
654
- return {
655
- name: e.name,
656
- color: e.color,
657
- value: o,
658
- display: c,
659
- svgDisplay: `${e.arcOf ? `${e.arcOf} - ` : ""}${c}`,
660
- shape: "circle",
661
- arcOf: e.arcOf,
662
- id: e.id,
663
- seriesIndex: n,
664
- datasetIndex: t,
665
- total: r,
666
- opacity: W.value.includes(e.id) ? .5 : 1,
667
- segregate: () => Y(e),
668
- isSegregated: W.value.includes(e.id)
669
- };
670
- });
671
- })), Kn = f(() => ({
672
- cy: "nested-donuts-legend",
673
- backgroundColor: F.value.style.chart.legend.backgroundColor,
674
- color: F.value.style.chart.legend.color,
675
- fontSize: F.value.style.chart.legend.fontSize,
676
- paddingBottom: 12,
677
- fontWeight: F.value.style.chart.legend.bold ? "bold" : ""
678
- })), Q = f(() => ({
679
- head: J.value.flatMap((e) => e.series.map((t) => ({
680
- name: `${e.name} - ${t.name}`,
681
- color: t.color,
682
- total: e.total
683
- }))),
684
- body: J.value.flatMap((e) => e.series.map((e) => e.value))
685
- }));
686
- function qn(e = null) {
687
- Re(() => {
688
- let t = Q.value.head.map((e, t) => [
689
- [e.name],
690
- [Q.value.body[t]],
691
- [isNaN(Q.value.body[t] / e.total) ? "-" : Q.value.body[t] / e.total * 100]
692
- ]), n = pe([
693
- [F.value.style.chart.title.text],
694
- [F.value.style.chart.title.subtitle.text],
695
- [
696
- [""],
697
- ["val"],
698
- ["%"]
699
- ]
700
- ].concat(t));
701
- e ? e(n) : te({
702
- csvContent: n,
703
- title: F.value.style.chart.title.text || "vue-ui-nested-donuts"
704
- });
705
- });
706
- }
707
- let Jn = f(() => {
708
- let e = [
709
- F.value.table.columnNames.series,
710
- F.value.table.columnNames.value,
711
- F.value.table.columnNames.percentage
712
- ], t = Q.value.head.map((e, t) => {
713
- let n = u({
714
- p: F.value.style.chart.layout.labels.dataLabels.prefix,
715
- v: Q.value.body[t],
716
- s: F.value.style.chart.layout.labels.dataLabels.suffix,
717
- r: F.value.table.td.roundingValue
718
- });
719
- return [
720
- {
721
- color: e.color,
722
- name: e.name
723
- },
724
- n,
725
- isNaN(Q.value.body[t] / e.total) ? "-" : u({
726
- v: Q.value.body[t] / e.total * 100,
727
- s: "%",
728
- r: F.value.table.td.roundingPercentage
729
- })
730
- ];
731
- }), n = t.map((e) => e.map((e, t) => t === 0 ? e.name : e)), r = {
732
- th: {
733
- backgroundColor: F.value.table.th.backgroundColor,
734
- color: F.value.table.th.color,
735
- outline: F.value.table.th.outline
736
- },
737
- td: {
738
- backgroundColor: F.value.table.td.backgroundColor,
739
- color: F.value.table.td.color,
740
- outline: F.value.table.td.outline
741
- },
742
- breakpoint: F.value.table.responsiveBreakpoint
743
- };
744
- return {
745
- colNames: [
746
- F.value.table.columnNames.series,
747
- F.value.table.columnNames.value,
748
- F.value.table.columnNames.percentage
749
- ],
750
- head: e,
751
- body: t,
752
- a11yBody: n,
753
- config: r
754
- };
755
- });
756
- function Yn() {
757
- return G.value;
758
- }
759
- function Xn() {
760
- V.value.showTable = !V.value.showTable;
761
- }
762
- function Zn() {
763
- V.value.dataLabels.show = !V.value.dataLabels.show;
764
- }
765
- function Qn() {
766
- V.value.showTooltip = !V.value.showTooltip;
767
- }
768
- let $n = S(!1);
769
- function er() {
770
- $n.value = !$n.value;
771
- }
772
- async function tr({ scale: e = 2 } = {}) {
773
- if (!A.value) return;
774
- let { width: t, height: n } = A.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await xe({
775
- domElement: A.value,
776
- base64: !0,
777
- img: !0,
778
- scale: e
779
- });
780
- return {
781
- imageUri: i,
782
- base64: a,
783
- title: F.value.style.chart.title.text,
784
- width: t,
785
- height: n,
786
- aspectRatio: r
787
- };
788
- }
789
- let nr = S(null);
790
- function rr() {
791
- if (!nr.value) return;
792
- let { x: e, y: t, width: n, height: r } = nr.value.getBBox();
793
- R.value && R.value.setAttribute("viewBox", `${e} ${t} ${n + Math.min(0, e)} ${r + Math.min(0, t)}`);
794
- }
795
- let ir = f(() => {
796
- let e = F.value.table.useDialog && !F.value.table.show, t = V.value.showTable;
797
- return {
798
- component: e ? Ft : At,
799
- title: `${F.value.style.chart.title.text}${F.value.style.chart.title.subtitle.text ? `: ${F.value.style.chart.title.subtitle.text}` : ""}`,
800
- props: e ? {
801
- backgroundColor: F.value.table.th.backgroundColor,
802
- color: F.value.table.th.color,
803
- headerColor: F.value.table.th.color,
804
- headerBg: F.value.table.th.backgroundColor,
805
- isFullscreen: P.value,
806
- fullscreenParent: A.value,
807
- forcedWidth: Math.min(800, window.innerWidth * .8),
808
- isCursorPointer: I.value
809
- } : {
810
- hideDetails: !0,
811
- config: {
812
- open: t,
813
- maxHeight: 1e4,
814
- body: {
815
- backgroundColor: F.value.style.chart.backgroundColor,
816
- color: F.value.style.chart.color
817
- },
818
- head: {
819
- backgroundColor: F.value.style.chart.backgroundColor,
820
- color: F.value.style.chart.color
821
- }
822
- }
823
- }
824
- };
825
- });
826
- Ke(() => V.value.showTable, (e) => {
827
- F.value.table.show || (e && F.value.table.useDialog && $t.value ? $t.value.open() : "close" in $t.value && $t.value.close());
828
- });
829
- function ar() {
830
- V.value.showTable = !1, en.value && en.value.setTableIconState(!1);
831
- }
832
- let or = f(() => F.value.style.chart.backgroundColor), sr = f(() => F.value.style.chart.legend), { exportSvg: cr, getSvg: lr } = ve({
833
- svg: R,
834
- title: f(() => F.value.style.chart.title),
835
- legend: sr,
836
- legendItems: f(() => Gn.value.flat().map((e) => ({
837
- ...e,
838
- name: e.svgDisplay
839
- }))),
840
- backgroundColor: or
841
- });
842
- async function ur({ isCb: e }) {
843
- nn.value = !0, await Re();
844
- try {
845
- if (e) {
846
- let { blob: e, url: t, text: n, dataUrl: r } = await lr();
847
- await Promise.resolve(F.value.userOptions.callbacks.svg({
848
- blob: e,
849
- url: t,
850
- text: n,
851
- dataUrl: r
852
- }));
853
- } else await Promise.resolve(cr());
854
- } finally {
855
- nn.value = !1;
856
- }
857
- }
858
- function dr(e) {
859
- if (e?.stage === "start") {
860
- tn.value = !0;
861
- return;
862
- }
863
- if (e?.stage === "end") {
864
- tn.value = !1;
865
- return;
866
- }
867
- wn();
868
- }
869
- async function fr() {
870
- if (U("copyAlt", {
871
- config: F.value,
872
- dataset: J.value
873
- }), !F.value.userOptions.callbacks.altCopy) {
874
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
875
- return;
876
- }
877
- await Promise.resolve(F.value.userOptions.callbacks.altCopy({
878
- config: F.value,
879
- dataset: J.value
880
- }));
881
- }
882
- let $ = f(() => X.value.flatMap((e) => e.donut.filter((e) => !e.ghost)));
883
- function pr() {
884
- N.value = null, on.value = !0;
885
- }
886
- function mr() {
887
- N.value = null, an.value = "pointer", Bt.value = !1, Ln.value = null, Ht.value = null, Rn.value = null, Z.value = null, on.value = !1;
888
- }
889
- function hr(e) {
890
- if (!R.value || $n.value || document.activeElement !== R.value || !$.value.length) return;
891
- let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
892
- if (!t && !n && !r && !i) return;
893
- if (e.preventDefault(), e.stopPropagation(), i) {
894
- N.value = null, an.value = "pointer", Bt.value = !1, Ln.value = null, Ht.value = null, Rn.value = null, Z.value = null;
895
- return;
896
- }
897
- if (r) {
898
- if (N.value === null) return;
899
- let e = $.value[N.value];
900
- if (!e) return;
901
- Dn({
902
- datapoint: e,
903
- index: N.value,
904
- seriesIndex: e.seriesIndex
905
- });
906
- return;
907
- }
908
- let a = N.value, o = Z.value, s = a !== null && a >= 0 && a < $.value.length, c = o !== null && o >= 0 && o < $.value.length;
909
- s ? n ? (a += 1, a >= $.value.length && (a = 0)) : t && (--a, a < 0 && (a = $.value.length - 1)) : c ? (a = n ? o + 1 : o - 1, a >= $.value.length && (a = 0), a < 0 && (a = $.value.length - 1)) : a = n ? 0 : $.value.length - 1;
910
- let l = $.value[a];
911
- l && (N.value = a, gr(), Hn({
912
- datapoint: l,
913
- relativeIndex: a,
914
- seriesIndex: l.seriesIndex,
915
- show: !0,
916
- triggerMode: "keyboard"
917
- }));
918
- }
919
- function gr() {
920
- if (!R.value) return;
921
- let e = R.value.getBoundingClientRect();
922
- rn.value = {
923
- x: e.left + e.width / 2,
924
- y: e.top + e.height / 2
925
- };
926
- }
927
- let _r = f(() => ({
928
- headers: Jn.value?.colNames ?? [],
929
- rows: Jn.value?.a11yBody ?? []
930
- }));
931
- return Ce({
932
- autoSize: rr,
933
- getData: Yn,
934
- getImage: tr,
935
- generatePdf: Cn,
936
- generateCsv: qn,
937
- generateImage: wn,
938
- generateSvg: ur,
939
- hideSeries: Nn,
940
- showSeries: Mn,
941
- toggleTable: Xn,
942
- toggleLabels: Zn,
943
- toggleTooltip: Qn,
944
- toggleAnnotator: er,
945
- toggleFullscreen: sn,
946
- copyAlt: fr
947
- }), (e, t) => (x(), h("div", {
948
- ref_key: "nestedDonutsChart",
949
- ref: A,
950
- class: y(`vue-data-ui-component vue-ui-nested-donuts ${P.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${F.value.useCssAnimation ? "" : "vue-ui-dna"}`),
951
- style: ze(`font-family:${F.value.style.fontFamily};width:100%; text-align:center;background:${F.value.style.chart.backgroundColor}`),
952
- id: `nested_donuts_${k.value}`,
953
- onMouseenter: t[2] ||= () => E(pn)(!0),
954
- onMouseleave: t[3] ||= () => E(pn)(!1)
955
- }, [
956
- g("div", {
957
- id: `chart-instructions-${k.value}`,
958
- class: "sr-only"
959
- }, [g("p", null, T(F.value.a11y.translations.keyboardNavigation), 1)], 8, Xe),
960
- _r.value?.rows?.length ? (x(), p(De, {
961
- key: 0,
962
- uid: k.value,
963
- head: _r.value.headers,
964
- body: _r.value.rows,
965
- notice: F.value.a11y.translations.tableAvailable,
966
- caption: F.value.a11y.translations.tableCaption
967
- }, null, 8, [
968
- "uid",
969
- "head",
970
- "body",
971
- "notice",
972
- "caption"
973
- ])) : m("", !0),
974
- F.value.userOptions.buttons.annotator ? (x(), p(E(Nt), {
975
- key: 1,
976
- svgRef: E(R),
977
- backgroundColor: F.value.style.chart.backgroundColor,
978
- color: F.value.style.chart.color,
979
- active: $n.value,
980
- isCursorPointer: I.value,
981
- onClose: er
982
- }, {
983
- "annotator-action-close": D(() => [w(e.$slots, "annotator-action-close", {}, void 0, !0)]),
984
- "annotator-action-color": D(({ color: t }) => [w(e.$slots, "annotator-action-color", b(v({ color: t })), void 0, !0)]),
985
- "annotator-action-draw": D(({ mode: t }) => [w(e.$slots, "annotator-action-draw", b(v({ mode: t })), void 0, !0)]),
986
- "annotator-action-undo": D(({ disabled: t }) => [w(e.$slots, "annotator-action-undo", b(v({ disabled: t })), void 0, !0)]),
987
- "annotator-action-redo": D(({ disabled: t }) => [w(e.$slots, "annotator-action-redo", b(v({ disabled: t })), void 0, !0)]),
988
- "annotator-action-delete": D(({ disabled: t }) => [w(e.$slots, "annotator-action-delete", b(v({ disabled: t })), void 0, !0)]),
989
- _: 3
990
- }, 8, [
991
- "svgRef",
992
- "backgroundColor",
993
- "color",
994
- "active",
995
- "isCursorPointer"
996
- ])) : m("", !0),
997
- Tn.value ? (x(), h("div", {
998
- key: 2,
999
- ref_key: "noTitle",
1000
- ref: qt,
1001
- class: "vue-data-ui-no-title-space",
1002
- style: "height:36px; width: 100%;background:transparent"
1003
- }, null, 512)) : m("", !0),
1004
- F.value.style.chart.title.text ? (x(), h("div", {
1005
- key: 3,
1006
- ref_key: "chartTitle",
1007
- ref: Wt
1008
- }, [(x(), p(Se, {
1009
- key: `title_${Jt.value}`,
1010
- config: {
1011
- title: {
1012
- cy: "donut-div-title",
1013
- ...F.value.style.chart.title
1014
- },
1015
- subtitle: {
1016
- cy: "donut-div-subtitle",
1017
- ...F.value.style.chart.title.subtitle
1018
- }
1019
- }
1020
- }, null, 8, ["config"]))], 512)) : m("", !0),
1021
- g("div", { id: `legend-top-${k.value}` }, null, 8, Ze),
1022
- F.value.userOptions.show && zt.value && (E(mn) || E(fn)) ? (x(), p(E(Mt), {
1023
- ref_key: "userOptionsRef",
1024
- ref: en,
1025
- key: `user_option_${Ut.value}`,
1026
- backgroundColor: F.value.style.chart.backgroundColor,
1027
- color: F.value.style.chart.color,
1028
- isPrinting: E(xn),
1029
- isImaging: E(Sn),
1030
- uid: k.value,
1031
- hasTooltip: F.value.userOptions.buttons.tooltip && F.value.style.chart.tooltip.show,
1032
- hasPdf: F.value.userOptions.buttons.pdf,
1033
- hasXls: F.value.userOptions.buttons.csv,
1034
- hasImg: F.value.userOptions.buttons.img,
1035
- hasSvg: F.value.userOptions.buttons.svg,
1036
- hasTable: F.value.userOptions.buttons.table,
1037
- hasLabel: F.value.userOptions.buttons.labels,
1038
- hasFullscreen: F.value.userOptions.buttons.fullscreen,
1039
- hasAltCopy: F.value.userOptions.buttons.altCopy,
1040
- isFullscreen: P.value,
1041
- isTooltip: V.value.showTooltip,
1042
- titles: { ...F.value.userOptions.buttonTitles },
1043
- chartElement: A.value,
1044
- position: F.value.userOptions.position,
1045
- hasAnnotator: F.value.userOptions.buttons.annotator,
1046
- isAnnotation: $n.value,
1047
- callbacks: F.value.userOptions.callbacks,
1048
- printScale: F.value.userOptions.print.scale,
1049
- tableDialog: F.value.table.useDialog,
1050
- isCursorPointer: I.value,
1051
- onToggleFullscreen: sn,
1052
- onGeneratePdf: E(Cn),
1053
- onGenerateCsv: qn,
1054
- onGenerateImage: dr,
1055
- onGenerateSvg: ur,
1056
- onToggleTable: Xn,
1057
- onToggleLabels: Zn,
1058
- onToggleTooltip: Qn,
1059
- onToggleAnnotator: er,
1060
- onCopyAlt: fr,
1061
- style: ze({ visibility: E(mn) ? E(fn) ? "visible" : "hidden" : "visible" })
1062
- }, Pe({ _: 2 }, [
1063
- e.$slots.menuIcon ? {
1064
- name: "menuIcon",
1065
- fn: D(({ isOpen: t, color: n }) => [w(e.$slots, "menuIcon", b(v({
1066
- isOpen: t,
1067
- color: n
1068
- })), void 0, !0)]),
1069
- key: "0"
1070
- } : void 0,
1071
- e.$slots.optionTooltip ? {
1072
- name: "optionTooltip",
1073
- fn: D(() => [w(e.$slots, "optionTooltip", {}, void 0, !0)]),
1074
- key: "1"
1075
- } : void 0,
1076
- e.$slots.optionPdf ? {
1077
- name: "optionPdf",
1078
- fn: D(() => [w(e.$slots, "optionPdf", {}, void 0, !0)]),
1079
- key: "2"
1080
- } : void 0,
1081
- e.$slots.optionCsv ? {
1082
- name: "optionCsv",
1083
- fn: D(() => [w(e.$slots, "optionCsv", {}, void 0, !0)]),
1084
- key: "3"
1085
- } : void 0,
1086
- e.$slots.optionImg ? {
1087
- name: "optionImg",
1088
- fn: D(() => [w(e.$slots, "optionImg", {}, void 0, !0)]),
1089
- key: "4"
1090
- } : void 0,
1091
- e.$slots.optionSvg ? {
1092
- name: "optionSvg",
1093
- fn: D(() => [w(e.$slots, "optionSvg", {}, void 0, !0)]),
1094
- key: "5"
1095
- } : void 0,
1096
- e.$slots.optionTable ? {
1097
- name: "optionTable",
1098
- fn: D(() => [w(e.$slots, "optionTable", {}, void 0, !0)]),
1099
- key: "6"
1100
- } : void 0,
1101
- e.$slots.optionLabels ? {
1102
- name: "optionLabels",
1103
- fn: D(() => [w(e.$slots, "optionLabels", {}, void 0, !0)]),
1104
- key: "7"
1105
- } : void 0,
1106
- e.$slots.optionFullscreen ? {
1107
- name: "optionFullscreen",
1108
- fn: D(({ toggleFullscreen: t, isFullscreen: n }) => [w(e.$slots, "optionFullscreen", b(v({
1109
- toggleFullscreen: t,
1110
- isFullscreen: n
1111
- })), void 0, !0)]),
1112
- key: "8"
1113
- } : void 0,
1114
- e.$slots.optionAnnotator ? {
1115
- name: "optionAnnotator",
1116
- fn: D(({ toggleAnnotator: t, isAnnotator: n }) => [w(e.$slots, "optionAnnotator", b(v({
1117
- toggleAnnotator: t,
1118
- isAnnotator: n
1119
- })), void 0, !0)]),
1120
- key: "9"
1121
- } : void 0,
1122
- e.$slots.optionAltCopy ? {
1123
- name: "optionAltCopy",
1124
- fn: D(({ altCopy: t }) => [w(e.$slots, "optionAltCopy", b(v({ altCopy: t })), void 0, !0)]),
1125
- key: "10"
1126
- } : void 0,
1127
- e.$slots["custom-menu-before"] ? {
1128
- name: "custom-menu-before",
1129
- fn: D(() => [w(e.$slots, "custom-menu-before", {}, void 0, !0)]),
1130
- key: "11"
1131
- } : void 0,
1132
- e.$slots["custom-menu-after"] ? {
1133
- name: "custom-menu-after",
1134
- fn: D(() => [w(e.$slots, "custom-menu-after", {}, void 0, !0)]),
1135
- key: "12"
1136
- } : void 0
1137
- ]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.style".split("."))) : m("", !0),
1138
- g("div", Qe, [(x(), h("svg", {
1139
- ref_key: "svgRef",
1140
- ref: R,
1141
- xmlns: E(ue),
1142
- "aria-describedby": `chart-instructions-${k.value}`,
1143
- class: y({
1144
- "vue-data-ui-fullscreen--on": P.value,
1145
- "vue-data-ui-fulscreen--off": !P.value,
1146
- "vue-data-ui-svg": !0
1147
- }),
1148
- viewBox: `0 0 ${H.value.width <= 0 ? .001 : H.value.width} ${H.value.height < 0 ? .001 : H.value.height}`,
1149
- style: ze(`max-width:100%; overflow: visible; background:transparent;color:${F.value.style.chart.color};${gn.value.css}`),
1150
- tabindex: "0",
1151
- onFocus: pr,
1152
- onBlur: mr,
1153
- onKeydown: hr
1154
- }, [g("g", {
1155
- ref_key: "G",
1156
- ref: nr,
1157
- class: "vue-data-ui-g"
1158
- }, [
1159
- Ie(E(Pt)),
1160
- e.$slots["chart-background"] ? (x(), h("foreignObject", {
1161
- key: 0,
1162
- x: 0,
1163
- y: 0,
1164
- width: H.value.width <= 0 ? .001 : H.value.width,
1165
- height: H.value.height < 0 ? .001 : H.value.height,
1166
- style: { pointerEvents: "none" }
1167
- }, [w(e.$slots, "chart-background", {}, void 0, !0)], 8, et)) : m("", !0),
1168
- g("defs", null, [(x(!0), h(d, null, C(In.value, (e, n) => (x(), h("radialGradient", { id: `radial_${k.value}_${n}` }, [
1169
- t[4] ||= g("stop", {
1170
- offset: "0%",
1171
- "stop-color": "#FFFFFF",
1172
- "stop-opacity": "0"
1173
- }, null, -1),
1174
- g("stop", {
1175
- offset: `${(1 - Pn.value / Fn.value[n]) * 100}%`,
1176
- "stop-color": E(i)("#FFFFFF", 0),
1177
- "stop-opacity": "0"
1178
- }, null, 8, nt),
1179
- g("stop", {
1180
- offset: `${(1 - Pn.value / Fn.value[n] / 2) * 100}%`,
1181
- "stop-color": "#FFFFFF",
1182
- "stop-opacity": F.value.style.chart.gradientIntensity / 100
1183
- }, null, 8, rt),
1184
- t[5] ||= g("stop", {
1185
- offset: "100%",
1186
- "stop-color": "#FFFFFF",
1187
- "stop-opacity": "0"
1188
- }, null, -1)
1189
- ], 8, tt))), 256))]),
1190
- g("defs", null, [g("filter", {
1191
- id: `blur_${k.value}`,
1192
- x: "-50%",
1193
- y: "-50%",
1194
- width: "200%",
1195
- height: "200%"
1196
- }, [g("feGaussianBlur", {
1197
- in: "SourceGraphic",
1198
- stdDeviation: 2,
1199
- id: `blur_std_${k.value}`
1200
- }, null, 8, at), t[6] ||= g("feColorMatrix", {
1201
- type: "saturate",
1202
- values: "0"
1203
- }, null, -1)], 8, it), g("filter", {
1204
- id: `shadow_${k.value}`,
1205
- "color-interpolation-filters": "sRGB"
1206
- }, [g("feDropShadow", {
1207
- dx: "0",
1208
- dy: "0",
1209
- stdDeviation: "10",
1210
- "flood-opacity": "0.5",
1211
- "flood-color": F.value.style.chart.layout.donut.shadowColor
1212
- }, null, 8, st)], 8, ot)]),
1213
- g("defs", null, [(x(!0), h(d, null, C(X.value, (e, t) => (x(), h("path", {
1214
- key: `path-full-${t}`,
1215
- id: `path-full-${t}-${k.value}`,
1216
- d: e.fullCirclePath,
1217
- fill: "none"
1218
- }, null, 8, ct))), 128))]),
1219
- (x(!0), h(d, null, C(X.value, (e, t) => (x(), h("g", null, [e.hasData ? (x(!0), h(d, { key: 0 }, C(e.donut.filter((e) => !e.ghost), (e, t) => (x(), h("g", null, [g("path", {
1220
- class: "vue-ui-donut-arc-path",
1221
- d: e.arcSlice,
1222
- fill: e.color,
1223
- stroke: F.value.style.chart.layout.donut.borderColorAuto ? F.value.style.chart.backgroundColor : F.value.style.chart.layout.donut.borderColor,
1224
- "stroke-width": F.value.style.chart.layout.donut.borderWidth,
1225
- filter: Wn(e, t)
1226
- }, null, 8, lt)]))), 256)) : (x(!0), h(d, { key: 1 }, C(e.skeleton, (e, t) => (x(), h("g", null, [g("path", {
1227
- class: "vue-ui-donut-arc-path",
1228
- d: e.arcSlice,
1229
- fill: e.color,
1230
- stroke: F.value.style.chart.layout.donut.borderColorAuto ? F.value.style.chart.backgroundColor : F.value.style.chart.layout.donut.borderColor,
1231
- "stroke-width": F.value.style.chart.layout.donut.borderWidth
1232
- }, null, 8, ut)]))), 256))]))), 256)),
1233
- F.value.style.chart.useGradient ? (x(), h("g", dt, [(x(!0), h(d, null, C(In.value, (e, t) => (x(), h("g", null, [g("path", {
1234
- d: e.donut.arcSlice,
1235
- fill: `url(#radial_${k.value}_${t})`,
1236
- stroke: "transparent",
1237
- "stroke-width": "0"
1238
- }, null, 8, ft)]))), 256))])) : m("", !0),
1239
- F.value.style.chart.layout.labels.dataLabels.showDonutName ? (x(), h("g", pt, [F.value.style.chart.layout.labels.dataLabels.curvedDonutName ? (x(!0), h(d, { key: 0 }, C(X.value, (e, t) => (x(), h("g", null, [(x(!0), h(d, null, C(e.donut, (n, r) => (x(), h("g", null, [r === 0 && H.value.width && H.value.height ? (x(), h("text", {
1240
- key: 0,
1241
- class: y({ animated: F.value.useCssAnimation }),
1242
- "text-anchor": "middle",
1243
- "font-size": F.value.style.chart.layout.labels.dataLabels.fontSize,
1244
- "font-weight": F.value.style.chart.layout.labels.dataLabels.boldDonutName ? "bold" : "normal",
1245
- fill: F.value.style.chart.layout.labels.dataLabels.color,
1246
- dy: F.value.style.chart.layout.labels.dataLabels.donutNameOffsetY
1247
- }, [g("textPath", {
1248
- href: `#path-full-${t}-${k.value}`,
1249
- startOffset: "50%",
1250
- "text-anchor": "middle",
1251
- method: "align",
1252
- spacing: "auto"
1253
- }, T(F.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation ? E(le)({
1254
- source: e.name,
1255
- length: F.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize
1256
- }) : e.name), 9, ht)], 10, mt)) : m("", !0)]))), 256))]))), 256)) : (x(!0), h(d, { key: 1 }, C(X.value, (e, t) => (x(), h("g", null, [(x(!0), h(d, null, C(e.donut, (t, n) => (x(), h("g", null, [n === 0 && H.value.width && H.value.height ? (x(), h("text", {
1257
- key: 0,
1258
- class: y({ animated: F.value.useCssAnimation }),
1259
- x: H.value.width / 2,
1260
- y: t.startY - F.value.style.chart.layout.labels.dataLabels.fontSize + F.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,
1261
- "text-anchor": "middle",
1262
- "font-size": F.value.style.chart.layout.labels.dataLabels.fontSize,
1263
- "font-weight": F.value.style.chart.layout.labels.dataLabels.boldDonutName ? "bold" : "normal",
1264
- fill: F.value.style.chart.layout.labels.dataLabels.color
1265
- }, T(F.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation ? E(le)({
1266
- source: e.name,
1267
- length: F.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize
1268
- }) : e.name), 11, gt)) : m("", !0)]))), 256))]))), 256))])) : m("", !0),
1269
- F.value.style.chart.layout.labels.dataLabels.show ? (x(), h("g", _t, [(x(!0), h(d, null, C(X.value, (e, t) => (x(), h("g", null, [(x(!0), h(d, null, C(e.donut.filter((e) => !e.ghost), (e, n) => (x(), h("g", { filter: Wn(e, n) }, [qe(g("text", {
1270
- class: y({ animated: F.value.useCssAnimation }),
1271
- opacity: +!!Un(e),
1272
- "text-anchor": E(de)(e, !0).anchor,
1273
- x: E(de)(e, !1, F.value.style.chart.layout.labels.dataLabels.offsetX).x || 0,
1274
- y: E(oe)(e, F.value.style.chart.layout.labels.dataLabels.offsetY, F.value.style.chart.layout.labels.dataLabels.offsetY) + (F.value.style.chart.layout.labels.dataLabels.showValueFirst && F.value.style.chart.layout.labels.dataLabels.showValue ? F.value.style.chart.layout.labels.dataLabels.fontSize : 0),
1275
- fill: F.value.style.chart.layout.labels.dataLabels.useSerieColor ? e.color : F.value.style.chart.layout.labels.dataLabels.color,
1276
- "font-size": F.value.style.chart.layout.labels.dataLabels.fontSize,
1277
- "font-weight": F.value.style.chart.layout.labels.dataLabels.boldPercentage ? "bold" : "normal"
1278
- }, T(E(ce)(E(u)({
1279
- v: e.proportion * 100,
1280
- s: "%",
1281
- r: F.value.style.chart.layout.labels.dataLabels.roundingPercentage
1282
- }), F.value.style.chart.layout.labels.dataLabels.usePercentageParens ? "(" : "", F.value.style.chart.layout.labels.dataLabels.usePercentageParens ? ")" : "")), 11, yt), [[Ge, V.value.dataLabels.show && F.value.style.chart.layout.labels.dataLabels.showPercentage]]), qe(g("text", {
1283
- class: y({ animated: F.value.useCssAnimation }),
1284
- opacity: +!!Un(e),
1285
- "text-anchor": E(de)(e, !0).anchor,
1286
- x: E(de)(e, !1, F.value.style.chart.layout.labels.dataLabels.offsetX).x || 0,
1287
- y: E(oe)(e, F.value.style.chart.layout.labels.dataLabels.offsetY, F.value.style.chart.layout.labels.dataLabels.offsetY) + (F.value.style.chart.layout.labels.dataLabels.showValueFirst || !F.value.style.chart.layout.labels.dataLabels.showPercentage ? 0 : F.value.style.chart.layout.labels.dataLabels.fontSize),
1288
- fill: F.value.style.chart.layout.labels.dataLabels.useSerieColor ? e.color : F.value.style.chart.layout.labels.dataLabels.color,
1289
- "font-size": F.value.style.chart.layout.labels.dataLabels.fontSize,
1290
- "font-weight": F.value.style.chart.layout.labels.dataLabels.boldValue ? "bold" : "normal"
1291
- }, T(E(ce)(E(se)(F.value.style.chart.layout.labels.dataLabels.formatter, e.value, E(u)({
1292
- p: F.value.style.chart.layout.labels.dataLabels.prefix,
1293
- v: e.value,
1294
- s: F.value.style.chart.layout.labels.dataLabels.suffix,
1295
- r: F.value.style.chart.layout.labels.dataLabels.roundingValue
1296
- }), {
1297
- datapoint: e,
1298
- seriesIndex: t,
1299
- datapointIndex: n
1300
- }), F.value.style.chart.layout.labels.dataLabels.useValueParens ? "(" : "", F.value.style.chart.layout.labels.dataLabels.useValueParens ? ")" : "")), 11, bt), [[Ge, V.value.dataLabels.show && F.value.style.chart.layout.labels.dataLabels.showValue]])], 8, vt))), 256))]))), 256))])) : m("", !0),
1301
- (x(!0), h(d, null, C(X.value, (e, t) => (x(), h("g", null, [(x(!0), h(d, null, C(e.donut, (e, t) => (x(), h("g", null, [g("path", {
1302
- d: e.arcSlice,
1303
- fill: Ht.value === e.id ? F.value.style.chart.layout.donut.selectedColor : "transparent",
1304
- onMouseenter: (t) => Hn({
1305
- datapoint: e,
1306
- relativeIndex: $.value.findIndex((t) => t.id === e.id),
1307
- seriesIndex: e.seriesIndex
1308
- }),
1309
- onClick: (n) => Dn({
1310
- datapoint: e,
1311
- index: t,
1312
- seriesIndex: e.seriesIndex
1313
- }),
1314
- onMouseleave: (t) => Bn({
1315
- datapoint: e,
1316
- seriesIndex: e.seriesIndex
1317
- })
1318
- }, null, 40, xt)]))), 256))]))), 256)),
1319
- w(e.$slots, "svg", { svg: {
1320
- ...H.value,
1321
- isPrintingImg: E(xn) || E(Sn) || tn.value,
1322
- isPrintingSvg: nn.value
1323
- } }, void 0, !0)
1324
- ], 512)], 46, $e)), e.$slots.hint ? (x(), h("div", St, [w(e.$slots, "hint", b(v({
1325
- hint: F.value.a11y.translations.keyboardNavigation,
1326
- isVisible: on.value
1327
- })), void 0, !0)])) : m("", !0)]),
1328
- e.$slots.watermark ? (x(), h("div", Ct, [w(e.$slots, "watermark", b(v({ isPrinting: E(xn) || E(Sn) || tn.value || nn.value })), void 0, !0)])) : m("", !0),
1329
- Ie(E(Ot), {
1330
- teleportTo: F.value.style.chart.tooltip.teleportTo,
1331
- show: V.value.showTooltip && Bt.value,
1332
- backgroundColor: F.value.style.chart.tooltip.backgroundColor,
1333
- color: F.value.style.chart.tooltip.color,
1334
- borderRadius: F.value.style.chart.tooltip.borderRadius,
1335
- borderColor: F.value.style.chart.tooltip.borderColor,
1336
- borderWidth: F.value.style.chart.tooltip.borderWidth,
1337
- fontSize: F.value.style.chart.tooltip.fontSize,
1338
- backgroundOpacity: F.value.style.chart.tooltip.backgroundOpacity,
1339
- position: F.value.style.chart.tooltip.position,
1340
- offsetX: F.value.style.chart.tooltip.offsetX,
1341
- offsetY: F.value.style.chart.tooltip.offsetY,
1342
- parent: A.value,
1343
- content: Vt.value,
1344
- isFullscreen: P.value,
1345
- isCustom: E(re)(F.value.style.chart.tooltip.customFormat),
1346
- smooth: F.value.style.chart.tooltip.smooth,
1347
- backdropFilter: F.value.style.chart.tooltip.backdropFilter,
1348
- smoothForce: F.value.style.chart.tooltip.smoothForce,
1349
- smoothSnapThreshold: F.value.style.chart.tooltip.smoothSnapThreshold,
1350
- isA11yMode: an.value === "keyboard",
1351
- a11yPosition: rn.value
1352
- }, {
1353
- "tooltip-before": D(() => [w(e.$slots, "tooltip-before", b(v({ ...zn.value })), void 0, !0)]),
1354
- tooltip: D(() => [w(e.$slots, "tooltip", b(v({ ...zn.value })), void 0, !0)]),
1355
- "tooltip-after": D(() => [w(e.$slots, "tooltip-after", b(v({ ...zn.value })), void 0, !0)]),
1356
- _: 3
1357
- }, 8, [
1358
- "teleportTo",
1359
- "show",
1360
- "backgroundColor",
1361
- "color",
1362
- "borderRadius",
1363
- "borderColor",
1364
- "borderWidth",
1365
- "fontSize",
1366
- "backgroundOpacity",
1367
- "position",
1368
- "offsetX",
1369
- "offsetY",
1370
- "parent",
1371
- "content",
1372
- "isFullscreen",
1373
- "isCustom",
1374
- "smooth",
1375
- "backdropFilter",
1376
- "smoothForce",
1377
- "smoothSnapThreshold",
1378
- "isA11yMode",
1379
- "a11yPosition"
1380
- ]),
1381
- g("div", { id: `legend-bottom-${k.value}` }, null, 8, wt),
1382
- Qt.value && (F.value.style.chart.legend.show || e.$slots.legend) ? (x(), p(Ne, {
1383
- key: 6,
1384
- to: F.value.style.chart.legend.position === "top" ? `#legend-top-${k.value}` : `#legend-bottom-${k.value}`
1385
- }, [F.value.style.chart.legend.show ? (x(), h("div", {
1386
- key: 0,
1387
- ref_key: "chartLegend",
1388
- ref: Gt,
1389
- class: y({ "vue-ui-nested-donuts-legend": Gn.value.length > 1 })
1390
- }, [w(e.$slots, "legend", { legend: Gn.value }, () => [(x(!0), h(d, null, C(Gn.value, (e, n) => (x(), p(je, {
1391
- key: `legend_${n}_${Xt.value}`,
1392
- legendSet: e,
1393
- config: Kn.value,
1394
- isCursorPointer: I.value,
1395
- onClickMarker: t[0] ||= ({ legend: e }) => Y(e)
1396
- }, {
1397
- legendTitle: D(({ titleSet: e }) => [e[0] && e[0].arcOf ? (x(), h("div", Tt, T(e[0].arcOf), 1)) : m("", !0)]),
1398
- item: D(({ legend: e, index: t }) => [g("div", {
1399
- onClick: (t) => Y(e),
1400
- style: ze(`opacity:${W.value.includes(e.id) ? .5 : 1}`)
1401
- }, T(e.display), 13, Et)]),
1402
- legendToggle: D(() => [e.length > 2 && F.value.style.chart.legend.selectAllToggle.show && !E(un) ? (x(), p(Ee, {
1403
- key: `toggle-${n}`,
1404
- backgroundColor: F.value.style.chart.legend.selectAllToggle.backgroundColor,
1405
- color: F.value.style.chart.legend.selectAllToggle.color,
1406
- fontSize: F.value.style.chart.legend.fontSize,
1407
- checked: e.some((e) => W.value.includes(e.id)),
1408
- isCursorPointer: I.value,
1409
- onToggle: (t) => An(e)
1410
- }, null, 8, [
1411
- "backgroundColor",
1412
- "color",
1413
- "fontSize",
1414
- "checked",
1415
- "isCursorPointer",
1416
- "onToggle"
1417
- ])) : m("", !0)]),
1418
- _: 2
1419
- }, 1032, [
1420
- "legendSet",
1421
- "config",
1422
- "isCursorPointer"
1423
- ]))), 128))], !0)], 2)) : m("", !0)], 8, ["to"])) : m("", !0),
1424
- e.$slots.source ? (x(), h("div", {
1425
- key: 7,
1426
- ref_key: "source",
1427
- ref: Kt,
1428
- dir: "auto"
1429
- }, [w(e.$slots, "source", {}, void 0, !0)], 512)) : m("", !0),
1430
- zt.value && F.value.userOptions.buttons.table ? (x(), p(He(ir.value.component), Le({ key: 8 }, ir.value.props, {
1431
- ref_key: "tableUnit",
1432
- ref: $t,
1433
- onClose: ar
1434
- }), Pe({
1435
- content: D(() => [(x(), p(E(jt), {
1436
- key: `table_${Yt.value}`,
1437
- colNames: Jn.value.colNames,
1438
- head: Jn.value.head,
1439
- body: Jn.value.body,
1440
- config: Jn.value.config,
1441
- title: F.value.table.useDialog ? "" : ir.value.title,
1442
- withCloseButton: !F.value.table.useDialog,
1443
- isCursorPointer: I.value,
1444
- onClose: ar
1445
- }, {
1446
- th: D(({ th: e }) => [g("div", {
1447
- innerHTML: e,
1448
- style: {
1449
- display: "flex",
1450
- "align-items": "center"
1451
- }
1452
- }, null, 8, Dt)]),
1453
- td: D(({ td: e }) => [Fe(T(e.name || e), 1)]),
1454
- _: 1
1455
- }, 8, [
1456
- "colNames",
1457
- "head",
1458
- "body",
1459
- "config",
1460
- "title",
1461
- "withCloseButton",
1462
- "isCursorPointer"
1463
- ]))]),
1464
- _: 2
1465
- }, [F.value.table.useDialog ? {
1466
- name: "title",
1467
- fn: D(() => [Fe(T(ir.value.title), 1)]),
1468
- key: "0"
1469
- } : void 0, F.value.table.useDialog ? {
1470
- name: "actions",
1471
- fn: D(() => [g("button", {
1472
- tabindex: "0",
1473
- class: "vue-ui-user-options-button",
1474
- onClick: t[1] ||= (e) => qn(F.value.userOptions.callbacks.csv),
1475
- style: ze({ cursor: I.value ? "pointer" : "default" })
1476
- }, [Ie(E(kt), {
1477
- name: "fileCsv",
1478
- stroke: ir.value.props.color
1479
- }, null, 8, ["stroke"])], 4)]),
1480
- key: "1"
1481
- } : void 0]), 1040)) : m("", !0),
1482
- w(e.$slots, "skeleton", {}, () => [E(un) ? (x(), p(_e, { key: 0 })) : m("", !0)], !0)
1483
- ], 46, Ye));
1484
- }
1485
- }, [["__scopeId", "data-v-42769637"]]);
1486
- //#endregion
1487
- export { Je as n, Ot as t };