vue-data-ui 2.3.7 → 2.3.9

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 (139) hide show
  1. package/dist/{Arrow-nwrjVtgP.js → Arrow-CyqlT0ih.js} +1 -1
  2. package/dist/{Arrow-BZtTM41y.cjs → Arrow-Xy7TAWLU.cjs} +1 -1
  3. package/dist/{BaseIcon-DWx8aSo2.cjs → BaseIcon-DpzJwh5Z.cjs} +1 -1
  4. package/dist/{BaseIcon-DLlcdgWI.js → BaseIcon-vF6zgXvp.js} +1 -1
  5. package/dist/{DataTable-BSoyXOFT.cjs → DataTable-DZ7GOCVh.cjs} +1 -1
  6. package/dist/{DataTable-BFsn-W_6.js → DataTable-Dj8KLJHc.js} +2 -2
  7. package/dist/{Legend-DZhpxKg4.cjs → Legend-BNUo8JKO.cjs} +1 -1
  8. package/dist/{Legend-DThjLfzi.js → Legend-MfrOhwon.js} +1 -1
  9. package/dist/{Shape-CoCdB8es.cjs → Shape-DBYznwuk.cjs} +1 -1
  10. package/dist/{Shape-DdhpbOB2.js → Shape-fssaGSn1.js} +1 -1
  11. package/dist/{Slicer-Bb7zhtxv.cjs → Slicer-B8qDEiI2.cjs} +1 -1
  12. package/dist/{Slicer-CBsGmIKc.js → Slicer-C2VIWW3F.js} +1 -1
  13. package/dist/{Title-Ci74YZxW.cjs → Title--kLbBq-N.cjs} +1 -1
  14. package/dist/{Title-CfofmWzW.js → Title-DM6fKrUI.js} +1 -1
  15. package/dist/{Tooltip-cIpD1ChA.js → Tooltip-CAmd4pzg.js} +1 -1
  16. package/dist/{Tooltip-BNMjZUBc.cjs → Tooltip-Dwh7A0L5.cjs} +1 -1
  17. package/dist/{index-DFXgoR1T.cjs → index-CSlObCMJ.cjs} +1 -1
  18. package/dist/{index-CGb3gF5A.js → index-D0PI50d6.js} +1 -1
  19. package/dist/style.css +1 -1
  20. package/dist/{useNestedProp-DCBzUHfz.js → useNestedProp-BNV_Y29K.js} +1 -1
  21. package/dist/{useNestedProp-CbZUIZc0.cjs → useNestedProp-DUXlSjg2.cjs} +1 -1
  22. package/dist/{usePrinter-DoFYRZKM.cjs → usePrinter-ClpmcbPy.cjs} +1 -1
  23. package/dist/{usePrinter-VlAyPtaS.js → usePrinter-DJnJEVGy.js} +1 -1
  24. package/dist/{vue-data-ui-DT5BwtL1.cjs → vue-data-ui-B5epGKMS.cjs} +1 -1
  25. package/dist/{vue-data-ui-DkU-TK4x.js → vue-data-ui-DLhyTmG3.js} +55 -55
  26. package/dist/vue-data-ui.cjs +1 -1
  27. package/dist/vue-data-ui.js +1 -1
  28. package/dist/{vue-ui-3d-bar-BwdmaNwO.cjs → vue-ui-3d-bar-Dv5Nu-Kz.cjs} +1 -1
  29. package/dist/{vue-ui-3d-bar-B2ZdZ5yW.js → vue-ui-3d-bar-JeMsTT6R.js} +7 -7
  30. package/dist/{vue-ui-accordion-Br7xhAKF.js → vue-ui-accordion-C1dTIdYg.js} +3 -3
  31. package/dist/{vue-ui-accordion-P9OYffC3.cjs → vue-ui-accordion-IPISean4.cjs} +1 -1
  32. package/dist/{vue-ui-age-pyramid-D_GP1VkP.js → vue-ui-age-pyramid-BPrB-Srk.js} +8 -8
  33. package/dist/{vue-ui-age-pyramid-CJGz5iEy.cjs → vue-ui-age-pyramid-ytOUpNe5.cjs} +1 -1
  34. package/dist/{vue-ui-annotator-C9I6Zikz.cjs → vue-ui-annotator-Bp2ylQ-N.cjs} +1 -1
  35. package/dist/{vue-ui-annotator-BHI5Uicp.js → vue-ui-annotator-DpY8JI03.js} +1 -1
  36. package/dist/{vue-ui-candlestick-B3Z-Zw-o.cjs → vue-ui-candlestick-BoDWcJYz.cjs} +1 -1
  37. package/dist/{vue-ui-candlestick-BMz6lY9I.js → vue-ui-candlestick-D_KnLwpq.js} +9 -9
  38. package/dist/vue-ui-carousel-table-DWUmj6NW.js +330 -0
  39. package/dist/vue-ui-carousel-table-tPbrubLn.cjs +1 -0
  40. package/dist/{vue-ui-chestnut-C4vJDydB.cjs → vue-ui-chestnut-BltZicnq.cjs} +1 -1
  41. package/dist/{vue-ui-chestnut-DikFweqJ.js → vue-ui-chestnut-gUPyB2F7.js} +6 -6
  42. package/dist/{vue-ui-cursor-CmWl10Om.js → vue-ui-cursor-CBrYcHgg.js} +2 -2
  43. package/dist/{vue-ui-cursor-CxvSx8wW.cjs → vue-ui-cursor-Mi9mivGV.cjs} +1 -1
  44. package/dist/{vue-ui-dashboard-CqNO4CkA.js → vue-ui-dashboard-BvJccz-l.js} +2 -2
  45. package/dist/{vue-ui-dashboard-BRZFA0Yv.cjs → vue-ui-dashboard-DKJRkuMC.cjs} +1 -1
  46. package/dist/{vue-ui-digits-Bq86VtLg.js → vue-ui-digits-PvPOOZTT.js} +2 -2
  47. package/dist/{vue-ui-digits-B5AQ1wb4.cjs → vue-ui-digits-UvPWZIkN.cjs} +1 -1
  48. package/dist/{vue-ui-donut-BSM49MRr.js → vue-ui-donut-CCnmksR_.js} +9 -9
  49. package/dist/{vue-ui-donut-fUSFXY5z.cjs → vue-ui-donut-DBD9IyRA.cjs} +1 -1
  50. package/dist/{vue-ui-donut-evolution-D4vsG4oJ.cjs → vue-ui-donut-evolution-C2mbsaP5.cjs} +1 -1
  51. package/dist/{vue-ui-donut-evolution-hXH6wndl.js → vue-ui-donut-evolution-DWz0XIkn.js} +9 -9
  52. package/dist/{vue-ui-dumbbell-CSxoMYt4.cjs → vue-ui-dumbbell-CdQ1eQN_.cjs} +1 -1
  53. package/dist/{vue-ui-dumbbell-DF7resYk.js → vue-ui-dumbbell-DnhWlDqn.js} +8 -8
  54. package/dist/{vue-ui-flow-qhWWfhM9.cjs → vue-ui-flow-CXeTBawu.cjs} +1 -1
  55. package/dist/{vue-ui-flow-2Wc505ek.js → vue-ui-flow-zTfYWLOo.js} +7 -7
  56. package/dist/{vue-ui-galaxy-DTYcNRMO.cjs → vue-ui-galaxy-Cr1TLsZ-.cjs} +1 -1
  57. package/dist/{vue-ui-galaxy-C1tqFf2k.js → vue-ui-galaxy-CviL0-9-.js} +9 -9
  58. package/dist/{vue-ui-gauge-qkz3wSir.js → vue-ui-gauge-0wjKwTcJ.js} +4 -4
  59. package/dist/{vue-ui-gauge-4oL43tii.cjs → vue-ui-gauge-C8cqiuMs.cjs} +1 -1
  60. package/dist/vue-ui-heatmap-BempgzJY.cjs +1 -0
  61. package/dist/{vue-ui-heatmap-SUwlu7rR.js → vue-ui-heatmap-BjX35pDk.js} +227 -227
  62. package/dist/{vue-ui-kpi-Bw-xbRgX.cjs → vue-ui-kpi-Cwoq-OQZ.cjs} +1 -1
  63. package/dist/{vue-ui-kpi-jQgfkbVw.js → vue-ui-kpi-DKPUNPyD.js} +2 -2
  64. package/dist/{vue-ui-mini-loader-DT-Ww_uE.cjs → vue-ui-mini-loader-DYmuLkr_.cjs} +1 -1
  65. package/dist/{vue-ui-mini-loader-5YEExcv8.js → vue-ui-mini-loader-umbgz-jE.js} +2 -2
  66. package/dist/{vue-ui-molecule-DA0NQGMP.cjs → vue-ui-molecule-D04xU1nK.cjs} +1 -1
  67. package/dist/{vue-ui-molecule-sddRGEOr.js → vue-ui-molecule-DnTFVeGw.js} +9 -9
  68. package/dist/{vue-ui-mood-radar-BlwtCy7m.js → vue-ui-mood-radar-BdsUM6EW.js} +9 -9
  69. package/dist/{vue-ui-mood-radar-CUfTRsXf.cjs → vue-ui-mood-radar-wHCxSeNT.cjs} +1 -1
  70. package/dist/{vue-ui-nested-donuts-CyhCktfb.cjs → vue-ui-nested-donuts--34k7AUI.cjs} +1 -1
  71. package/dist/{vue-ui-nested-donuts-BYDoEtqK.js → vue-ui-nested-donuts-CX_V9UIk.js} +9 -9
  72. package/dist/{vue-ui-onion-BiS7G_xb.js → vue-ui-onion-C3scIn1m.js} +9 -9
  73. package/dist/{vue-ui-onion-DKjJWVtm.cjs → vue-ui-onion-ot5UiFnD.cjs} +1 -1
  74. package/dist/{vue-ui-parallel-coordinate-plot-BcZOH5MA.js → vue-ui-parallel-coordinate-plot-BrtFu6_R.js} +10 -10
  75. package/dist/{vue-ui-parallel-coordinate-plot-CB5WohUW.cjs → vue-ui-parallel-coordinate-plot-CLYNauuG.cjs} +1 -1
  76. package/dist/{vue-ui-quadrant-BX2Z_BiG.js → vue-ui-quadrant-CZQnq031.js} +10 -10
  77. package/dist/{vue-ui-quadrant-aRRuJrr1.cjs → vue-ui-quadrant-b3C38Y-z.cjs} +1 -1
  78. package/dist/{vue-ui-quick-chart-aCDLYVC0.js → vue-ui-quick-chart-CQ_m8VuI.js} +6 -6
  79. package/dist/{vue-ui-quick-chart-BSov5yuk.cjs → vue-ui-quick-chart-CS1XKyME.cjs} +1 -1
  80. package/dist/{vue-ui-radar-DGhNZx7E.js → vue-ui-radar-Bk_bQCIc.js} +10 -10
  81. package/dist/{vue-ui-radar-B3DWzSx8.cjs → vue-ui-radar-ayBCV2nl.cjs} +1 -1
  82. package/dist/{vue-ui-rating-DI2herA3.cjs → vue-ui-rating-BNAFeqKV.cjs} +1 -1
  83. package/dist/{vue-ui-rating-QJp1mzIX.js → vue-ui-rating-CwmqAW6j.js} +2 -2
  84. package/dist/{vue-ui-relation-circle-DRKymwCT.js → vue-ui-relation-circle-B19oCBsQ.js} +5 -5
  85. package/dist/{vue-ui-relation-circle-Dgk6ILFm.cjs → vue-ui-relation-circle-D__4tmLy.cjs} +1 -1
  86. package/dist/{vue-ui-rings-m9Gm4w5-.cjs → vue-ui-rings-DWv1YjLY.cjs} +1 -1
  87. package/dist/{vue-ui-rings-Dc_Xgav-.js → vue-ui-rings-Ekq8eld0.js} +9 -9
  88. package/dist/{vue-ui-scatter-3p_U1RQz.js → vue-ui-scatter-B5lq6TQb.js} +10 -10
  89. package/dist/{vue-ui-scatter-CwNnmbpv.cjs → vue-ui-scatter-Djt3w_7K.cjs} +1 -1
  90. package/dist/{vue-ui-screenshot-Bdg6KSR_.cjs → vue-ui-screenshot-BBTScesQ.cjs} +1 -1
  91. package/dist/{vue-ui-screenshot-DjN1leGW.js → vue-ui-screenshot-BGEu-1aK.js} +1 -1
  92. package/dist/{vue-ui-skeleton-B0udzFdQ.js → vue-ui-skeleton-CDB2sB2S.js} +2 -2
  93. package/dist/{vue-ui-skeleton-CmABeGyu.cjs → vue-ui-skeleton-aEAr9fnx.cjs} +1 -1
  94. package/dist/{vue-ui-smiley-BJdbZUnl.js → vue-ui-smiley-5sY2rtTd.js} +2 -2
  95. package/dist/{vue-ui-smiley-CIMwndRh.cjs → vue-ui-smiley-pHCa1uHj.cjs} +1 -1
  96. package/dist/{vue-ui-spark-trend-BiqhJCi0.cjs → vue-ui-spark-trend-BLYjicGH.cjs} +1 -1
  97. package/dist/{vue-ui-spark-trend-Bs8wWJc2.js → vue-ui-spark-trend-C6U8pRYP.js} +4 -4
  98. package/dist/{vue-ui-sparkbar-CDi8i8_Q.js → vue-ui-sparkbar-DdEDQOc8.js} +3 -3
  99. package/dist/{vue-ui-sparkbar-C2YT0NxS.cjs → vue-ui-sparkbar-e9mZh74f.cjs} +1 -1
  100. package/dist/{vue-ui-sparkgauge-11o7Kgbf.js → vue-ui-sparkgauge-CV0OpVGr.js} +3 -3
  101. package/dist/{vue-ui-sparkgauge-D7sVelKC.cjs → vue-ui-sparkgauge-S9QibidM.cjs} +1 -1
  102. package/dist/{vue-ui-sparkhistogram-DW4yBl5Z.js → vue-ui-sparkhistogram-BCcYAQYV.js} +4 -4
  103. package/dist/{vue-ui-sparkhistogram-C6nnvqeP.cjs → vue-ui-sparkhistogram-DVc-tjMC.cjs} +1 -1
  104. package/dist/{vue-ui-sparkline-B-jMIILk.js → vue-ui-sparkline-C6emienJ.js} +3 -3
  105. package/dist/{vue-ui-sparkline-Bnc9Cv0E.cjs → vue-ui-sparkline-WkYNaf-r.cjs} +1 -1
  106. package/dist/{vue-ui-sparkstackbar-cUpn5wUS.js → vue-ui-sparkstackbar-CptWawfp.js} +3 -3
  107. package/dist/{vue-ui-sparkstackbar-CVyS6viy.cjs → vue-ui-sparkstackbar-oB0fsXWO.cjs} +1 -1
  108. package/dist/{vue-ui-strip-plot-Dc1Y7Lfz.cjs → vue-ui-strip-plot-D30zeVfM.cjs} +1 -1
  109. package/dist/{vue-ui-strip-plot-CpfV9-gw.js → vue-ui-strip-plot-Kb7Kk-C8.js} +9 -9
  110. package/dist/{vue-ui-table-CaCOIekW.js → vue-ui-table-Dqyr1Go9.js} +1 -1
  111. package/dist/{vue-ui-table-BHENqbW6.cjs → vue-ui-table-FUX1jbtH.cjs} +1 -1
  112. package/dist/{vue-ui-table-heatmap-r9XRz_dD.cjs → vue-ui-table-heatmap-Cqd_rPSG.cjs} +1 -1
  113. package/dist/{vue-ui-table-heatmap-s7r2sGYk.js → vue-ui-table-heatmap-DAWzPS1D.js} +4 -4
  114. package/dist/{vue-ui-table-sparkline-Dk_FjirH.cjs → vue-ui-table-sparkline-CWSL5RtX.cjs} +1 -1
  115. package/dist/{vue-ui-table-sparkline-BS7VAPDv.js → vue-ui-table-sparkline-DgUpsNVO.js} +5 -5
  116. package/dist/{vue-ui-thermometer-DU49ev3a.cjs → vue-ui-thermometer-DDpxHZhQ.cjs} +1 -1
  117. package/dist/{vue-ui-thermometer-BQLqVj-X.js → vue-ui-thermometer-UZFTkdJs.js} +5 -5
  118. package/dist/{vue-ui-timer-9QQVkkbc.cjs → vue-ui-timer-CXonfhMU.cjs} +1 -1
  119. package/dist/{vue-ui-timer-DGM9AHJ5.js → vue-ui-timer-DCexI32t.js} +4 -4
  120. package/dist/{vue-ui-tiremarks-CJ9xiM-i.cjs → vue-ui-tiremarks-DByzjHco.cjs} +1 -1
  121. package/dist/{vue-ui-tiremarks-Bxop3uDk.js → vue-ui-tiremarks-UtTUbZUt.js} +5 -5
  122. package/dist/{vue-ui-treemap-BOEC1m08.cjs → vue-ui-treemap-BT9zMgOs.cjs} +1 -1
  123. package/dist/{vue-ui-treemap-CQ9rJnkn.js → vue-ui-treemap-DpLJGsie.js} +9 -9
  124. package/dist/{vue-ui-vertical-bar-CwcIKeM-.js → vue-ui-vertical-bar-B9poCwqT.js} +9 -9
  125. package/dist/{vue-ui-vertical-bar-BBHN-hhJ.cjs → vue-ui-vertical-bar-BWWvfTkx.cjs} +1 -1
  126. package/dist/{vue-ui-waffle-DB3cEJx6.js → vue-ui-waffle-BGnyyHVp.js} +83 -83
  127. package/dist/{vue-ui-waffle-Bg_hB8yK.cjs → vue-ui-waffle-fRaiL6eW.cjs} +1 -1
  128. package/dist/{vue-ui-wheel-CF6psk6N.js → vue-ui-wheel-7JdR9vyK.js} +5 -5
  129. package/dist/{vue-ui-wheel-DpTCJpZn.cjs → vue-ui-wheel-C0BVez2R.cjs} +1 -1
  130. package/dist/{vue-ui-word-cloud-DVu3gTbu.cjs → vue-ui-word-cloud-CDDYvCP9.cjs} +1 -1
  131. package/dist/{vue-ui-word-cloud-QlpZWR2c.js → vue-ui-word-cloud-S1x3FJQ6.js} +6 -6
  132. package/dist/{vue-ui-xy-CpcGvBUq.js → vue-ui-xy-DBC1QS_G.js} +12 -12
  133. package/dist/{vue-ui-xy-DFiOxWGU.cjs → vue-ui-xy-DMkykmZN.cjs} +1 -1
  134. package/dist/{vue-ui-xy-canvas-CBlzHZ_m.js → vue-ui-xy-canvas-1yb0nuDg.js} +10 -10
  135. package/dist/{vue-ui-xy-canvas-DR_8n36F.cjs → vue-ui-xy-canvas-B4xzjjjm.cjs} +1 -1
  136. package/package.json +1 -1
  137. package/dist/vue-ui-carousel-table-9W-FPpp4.js +0 -314
  138. package/dist/vue-ui-carousel-table-ZyIsiWGm.cjs +0 -1
  139. package/dist/vue-ui-heatmap-B8vDpGuW.cjs +0 -1
@@ -1,16 +1,16 @@
1
- import { computed as c, ref as v, onMounted as Ve, onBeforeUnmount as Me, openBlock as s, createElementBlock as n, normalizeClass as ge, normalizeStyle as U, createVNode as te, createCommentVNode as w, createBlock as X, unref as f, createSlots as Be, withCtx as y, renderSlot as g, normalizeProps as Y, guardReactiveProps as J, createElementVNode as m, Fragment as $, renderList as M, toDisplayString as T, createTextVNode as me, nextTick as De, pushScopeId as Ee, popScopeId as Ge } from "vue";
2
- import { u as Re, c as Ue, t as je, a as We, p as O, o as He, e as le, g as qe, b as Xe, d as Ye, f as I, X as Je, s as Ke, r as Qe, C as Ze, E as et, v as tt, w as lt, n as at, q as ot } from "./index-CGb3gF5A.js";
1
+ import { computed as c, ref as v, onMounted as Ae, onBeforeUnmount as Ve, openBlock as s, createElementBlock as n, normalizeClass as ge, normalizeStyle as U, createVNode as te, createCommentVNode as w, createBlock as X, unref as y, createSlots as Me, withCtx as f, renderSlot as g, normalizeProps as Y, guardReactiveProps as J, createElementVNode as m, Fragment as $, renderList as V, toDisplayString as T, createTextVNode as me, nextTick as De, pushScopeId as Ee, popScopeId as Ge } from "vue";
2
+ import { u as Re, c as Ue, t as je, a as We, p as B, o as He, e as le, g as qe, b as Xe, d as Ye, f as I, X as Je, s as Ke, r as Qe, C as Ze, E as et, v as tt, w as lt, n as at, q as ot } from "./index-D0PI50d6.js";
3
3
  import { t as ut, u as rt } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as st } from "./Title-CfofmWzW.js";
5
- import { u as nt, U as it } from "./usePrinter-VlAyPtaS.js";
6
- import { _ as ct } from "./Tooltip-cIpD1ChA.js";
7
- import { D as vt } from "./DataTable-BFsn-W_6.js";
8
- import { L as dt } from "./Legend-DThjLfzi.js";
9
- import ht from "./vue-ui-skeleton-B0udzFdQ.js";
10
- import pt from "./vue-ui-accordion-Br7xhAKF.js";
11
- import { u as be } from "./useNestedProp-DCBzUHfz.js";
12
- import { _ as ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
- const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = ["xmlns", "viewBox"], mt = ["id"], bt = ["stop-color"], wt = ["stop-color"], xt = ["id"], kt = /* @__PURE__ */ we(() => /* @__PURE__ */ m("feGaussianBlur", {
4
+ import { _ as st } from "./Title-DM6fKrUI.js";
5
+ import { u as nt, U as it } from "./usePrinter-DJnJEVGy.js";
6
+ import { _ as ct } from "./Tooltip-CAmd4pzg.js";
7
+ import { D as vt } from "./DataTable-Dj8KLJHc.js";
8
+ import { L as dt } from "./Legend-MfrOhwon.js";
9
+ import ht from "./vue-ui-skeleton-CDB2sB2S.js";
10
+ import pt from "./vue-ui-accordion-C1dTIdYg.js";
11
+ import { u as be } from "./useNestedProp-BNV_Y29K.js";
12
+ import { _ as yt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
+ const we = (M) => (Ee("data-v-dc5a40b0"), M = M(), Ge(), M), ft = ["id"], gt = ["xmlns", "viewBox"], mt = ["id"], bt = ["stop-color"], wt = ["stop-color"], xt = ["id"], kt = /* @__PURE__ */ we(() => /* @__PURE__ */ m("feGaussianBlur", {
14
14
  in: "SourceGraphic",
15
15
  stdDeviation: 2
16
16
  }, null, -1)), Ct = /* @__PURE__ */ we(() => /* @__PURE__ */ m("feColorMatrix", {
@@ -19,7 +19,7 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
19
19
  }, null, -1)), _t = [
20
20
  kt,
21
21
  Ct
22
- ], $t = ["x", "y", "height", "width"], Tt = ["rx", "x", "y", "height", "width", "stroke", "stroke-width", "filter"], It = ["rx", "x", "y", "height", "width", "fill", "stroke", "stroke-width", "filter"], St = ["x", "y", "height", "width", "filter"], Ft = { key: 0 }, zt = { key: 1 }, Pt = { key: 2 }, Nt = { key: 3 }, Lt = ["onMouseover", "x", "y", "height", "width"], Ot = ["onClick"], At = { key: 0 }, Vt = { key: 1 }, Mt = ["innerHTML"], Bt = {
22
+ ], $t = ["x", "y", "height", "width"], Tt = ["rx", "x", "y", "height", "width", "stroke", "stroke-width", "filter"], It = ["rx", "x", "y", "height", "width", "fill", "stroke", "stroke-width", "filter"], St = ["x", "y", "height", "width", "filter"], Ft = { key: 0 }, zt = { key: 1 }, Pt = { key: 2 }, Nt = { key: 3 }, Lt = ["onMouseover", "x", "y", "height", "width"], Bt = ["onClick"], Ot = { key: 0 }, At = { key: 1 }, Vt = ["innerHTML"], Mt = {
23
23
  __name: "vue-ui-waffle",
24
24
  props: {
25
25
  config: {
@@ -36,8 +36,8 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
36
36
  }
37
37
  },
38
38
  emits: ["selectLegend"],
39
- setup(B, { expose: xe, emit: ke }) {
40
- const b = B, { vue_ui_waffle: Ce } = Re(), j = c(() => !!b.dataset && b.dataset.length), S = v(Ue()), _e = v(null), K = v(!1), Q = v(""), A = v(null), ae = v(0), D = v(null), oe = v(null), ue = v(null), e = c(() => {
39
+ setup(M, { expose: xe, emit: ke }) {
40
+ const b = M, { vue_ui_waffle: Ce } = Re(), j = c(() => !!b.dataset && b.dataset.length), S = v(Ue()), _e = v(null), K = v(!1), Q = v(""), O = v(null), ae = v(0), D = v(null), oe = v(null), ue = v(null), e = c(() => {
41
41
  const t = be({
42
42
  userConfig: b.config,
43
43
  defaultConfig: Ce
@@ -47,10 +47,10 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
47
47
  userConfig: je.vue_ui_waffle[t.theme] || b.config,
48
48
  defaultConfig: t
49
49
  }),
50
- customPalette: We[t.theme] || O
50
+ customPalette: We[t.theme] || B
51
51
  } : t;
52
52
  }), W = v(null);
53
- Ve(() => {
53
+ Ae(() => {
54
54
  if (He(b.dataset) ? le({
55
55
  componentName: "VueUiWaffle",
56
56
  type: "dataset"
@@ -77,7 +77,7 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
77
77
  });
78
78
  W.value = new ResizeObserver(t), W.value.observe(D.value.parentNode);
79
79
  }
80
- }), Me(() => {
80
+ }), Ve(() => {
81
81
  W.value && W.value.disconnect();
82
82
  });
83
83
  const { isPrinting: $e, isImaging: Te, generatePdf: re, generateImage: se } = nt({
@@ -105,7 +105,7 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
105
105
  }
106
106
  const ce = c(() => b.dataset.map((t, a) => ({
107
107
  ...t,
108
- color: Ye(t.color) || ne.value[a] || O[a] || O[a % O.length],
108
+ color: Ye(t.color) || ne.value[a] || B[a] || B[a % B.length],
109
109
  uid: `serie_${a}`,
110
110
  absoluteIndex: a
111
111
  }))), h = v(ce.value), Ie = c(() => {
@@ -182,17 +182,17 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
182
182
  }), p = v([]), L = v(!1), ve = v(null), de = v(null);
183
183
  function he(t) {
184
184
  if (!e.value.useAnimation) {
185
- p.value.includes(t) ? p.value = p.value.filter((u) => u !== t) : p.value.length < V.value.length - 1 && V.value.length > 1 && p.value.push(t);
185
+ p.value.includes(t) ? p.value = p.value.filter((u) => u !== t) : p.value.length < A.value.length - 1 && A.value.length > 1 && p.value.push(t);
186
186
  return;
187
187
  }
188
188
  const a = ce.value.find((u) => u.uid === t).values.reduce((u, r) => u + r, 0);
189
189
  let o = h.value.find((u) => u.uid === t).values.reduce((u, r) => u + r, 0);
190
190
  if (p.value.includes(t)) {
191
191
  let r = function() {
192
- o > u ? (cancelAnimationFrame(ve.value), h.value = h.value.map((d, Ae) => d.uid === t ? {
192
+ o > u ? (cancelAnimationFrame(ve.value), h.value = h.value.map((d, Oe) => d.uid === t ? {
193
193
  ...d,
194
194
  values: [u]
195
- } : d), L.value = !1) : (L.value = !0, o += u * 0.025, h.value = h.value.map((d, Ae) => d.uid === t ? {
195
+ } : d), L.value = !1) : (L.value = !0, o += u * 0.025, h.value = h.value.map((d, Oe) => d.uid === t ? {
196
196
  ...d,
197
197
  values: [o]
198
198
  } : d), ve.value = requestAnimationFrame(r));
@@ -200,7 +200,7 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
200
200
  p.value = p.value.filter((d) => d !== t);
201
201
  const u = a;
202
202
  r();
203
- } else if (p.value.length < V.value.length - 1 && V.value.length > 1) {
203
+ } else if (p.value.length < A.value.length - 1 && A.value.length > 1) {
204
204
  let u = function() {
205
205
  o < 0.1 ? (cancelAnimationFrame(de.value), p.value.push(t), h.value = h.value.map((r, d) => r.uid === t ? {
206
206
  ...r,
@@ -219,9 +219,9 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
219
219
  proportion: u.proportion / Math.pow(e.value.style.chart.layout.grid.size, 2)
220
220
  })));
221
221
  }
222
- const V = c(() => h.value.map((t, a) => ({
222
+ const A = c(() => h.value.map((t, a) => ({
223
223
  name: t.name,
224
- color: t.color || ne[a] || O[a] || O[a % O.length],
224
+ color: t.color || ne[a] || B[a] || B[a % B.length],
225
225
  value: (t.values || []).reduce((l, o) => l + o, 0),
226
226
  uid: t.uid,
227
227
  shape: "square"
@@ -247,7 +247,7 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
247
247
  seriesIndex: a.absoluteIndex,
248
248
  series: h.value,
249
249
  config: e.value
250
- }, K.value = !0, A.value = i.value[t].serieIndex;
250
+ }, K.value = !0, O.value = i.value[t].serieIndex;
251
251
  const l = e.value.style.chart.tooltip.customFormat;
252
252
  if (tt(l) && lt(() => l({
253
253
  seriesIndex: i.value[t].absoluteIndex,
@@ -274,7 +274,7 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
274
274
  return { head: t, body: a };
275
275
  });
276
276
  function ee(t) {
277
- return e.value.useBlurOnHover && ![null, void 0].includes(A.value) && A.value !== t ? `url(#blur_${S.value})` : "";
277
+ return e.value.useBlurOnHover && ![null, void 0].includes(O.value) && O.value !== t ? `url(#blur_${S.value})` : "";
278
278
  }
279
279
  function pe() {
280
280
  De(() => {
@@ -321,13 +321,13 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
321
321
  colNames: o
322
322
  };
323
323
  }), R = v(!1);
324
- function Oe(t) {
324
+ function Be(t) {
325
325
  R.value = t, ae.value += 1;
326
326
  }
327
- function fe() {
327
+ function ye() {
328
328
  C.value.showTable = !C.value.showTable;
329
329
  }
330
- function ye() {
330
+ function fe() {
331
331
  C.value.showTooltip = !C.value.showTooltip;
332
332
  }
333
333
  return xe({
@@ -335,8 +335,8 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
335
335
  generatePdf: re,
336
336
  generateCsv: pe,
337
337
  generateImage: se,
338
- toggleTable: fe,
339
- toggleTooltip: ye
338
+ toggleTable: ye,
339
+ toggleTooltip: fe
340
340
  }), (t, a) => (s(), n("div", {
341
341
  class: ge(`vue-ui-waffle ${R.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
342
342
  ref_key: "waffleChart",
@@ -369,8 +369,8 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
369
369
  key: `user_options_${ae.value}`,
370
370
  backgroundColor: e.value.style.chart.backgroundColor,
371
371
  color: e.value.style.chart.color,
372
- isPrinting: f($e),
373
- isImaging: f(Te),
372
+ isPrinting: y($e),
373
+ isImaging: y(Te),
374
374
  uid: S.value,
375
375
  hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
376
376
  hasPdf: e.value.userOptions.buttons.pdf,
@@ -382,51 +382,51 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
382
382
  isTooltip: C.value.showTooltip,
383
383
  titles: { ...e.value.userOptions.buttonTitles },
384
384
  chartElement: D.value,
385
- onToggleFullscreen: Oe,
386
- onGeneratePdf: f(re),
385
+ onToggleFullscreen: Be,
386
+ onGeneratePdf: y(re),
387
387
  onGenerateCsv: pe,
388
- onGenerateImage: f(se),
389
- onToggleTable: fe,
390
- onToggleTooltip: ye
391
- }, Be({ _: 2 }, [
388
+ onGenerateImage: y(se),
389
+ onToggleTable: ye,
390
+ onToggleTooltip: fe
391
+ }, Me({ _: 2 }, [
392
392
  t.$slots.optionTooltip ? {
393
393
  name: "optionTooltip",
394
- fn: y(() => [
394
+ fn: f(() => [
395
395
  g(t.$slots, "optionTooltip", {}, void 0, !0)
396
396
  ]),
397
397
  key: "0"
398
398
  } : void 0,
399
399
  t.$slots.optionPdf ? {
400
400
  name: "optionPdf",
401
- fn: y(() => [
401
+ fn: f(() => [
402
402
  g(t.$slots, "optionPdf", {}, void 0, !0)
403
403
  ]),
404
404
  key: "1"
405
405
  } : void 0,
406
406
  t.$slots.optionCsv ? {
407
407
  name: "optionCsv",
408
- fn: y(() => [
408
+ fn: f(() => [
409
409
  g(t.$slots, "optionCsv", {}, void 0, !0)
410
410
  ]),
411
411
  key: "2"
412
412
  } : void 0,
413
413
  t.$slots.optionImg ? {
414
414
  name: "optionImg",
415
- fn: y(() => [
415
+ fn: f(() => [
416
416
  g(t.$slots, "optionImg", {}, void 0, !0)
417
417
  ]),
418
418
  key: "3"
419
419
  } : void 0,
420
420
  t.$slots.optionTable ? {
421
421
  name: "optionTable",
422
- fn: y(() => [
422
+ fn: f(() => [
423
423
  g(t.$slots, "optionTable", {}, void 0, !0)
424
424
  ]),
425
425
  key: "4"
426
426
  } : void 0,
427
427
  t.$slots.optionFullscreen ? {
428
428
  name: "optionFullscreen",
429
- fn: y(({ toggleFullscreen: l, isFullscreen: o }) => [
429
+ fn: f(({ toggleFullscreen: l, isFullscreen: o }) => [
430
430
  g(t.$slots, "optionFullscreen", Y(J({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
431
431
  ]),
432
432
  key: "5"
@@ -434,13 +434,13 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
434
434
  ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : w("", !0),
435
435
  j.value ? (s(), n("svg", {
436
436
  key: 2,
437
- xmlns: f(Je),
437
+ xmlns: y(Je),
438
438
  class: ge({ "vue-data-ui-fullscreen--on": R.value, "vue-data-ui-fulscreen--off": !R.value }),
439
439
  viewBox: `0 0 ${F.value.width <= 0 ? 10 : F.value.width} ${F.value.height <= 0 ? 10 : F.value.height}`,
440
440
  style: U(`max-width:100%;overflow:visible;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
441
441
  }, [
442
442
  m("defs", null, [
443
- (s(!0), n($, null, M(i.value, (l, o) => (s(), n("radialGradient", {
443
+ (s(!0), n($, null, V(i.value, (l, o) => (s(), n("radialGradient", {
444
444
  cx: "50%",
445
445
  cy: "50%",
446
446
  r: "50%",
@@ -450,7 +450,7 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
450
450
  }, [
451
451
  m("stop", {
452
452
  offset: "0%",
453
- "stop-color": `${f(Ke)(l.color, 0.05)}${f(Qe)[100 - e.value.style.chart.layout.rect.gradientIntensity]}`
453
+ "stop-color": `${y(Ke)(l.color, 0.05)}${y(Qe)[100 - e.value.style.chart.layout.rect.gradientIntensity]}`
454
454
  }, null, 8, bt),
455
455
  m("stop", {
456
456
  offset: "100%",
@@ -467,19 +467,19 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
467
467
  height: "200%"
468
468
  }, _t, 8, xt)
469
469
  ]),
470
- e.value.useCustomCells ? (s(!0), n($, { key: 0 }, M(G.value, (l, o) => (s(), n("foreignObject", {
470
+ e.value.useCustomCells ? (s(!0), n($, { key: 0 }, V(G.value, (l, o) => (s(), n("foreignObject", {
471
471
  x: l.x,
472
472
  y: l.y,
473
473
  height: N.value <= 0 ? 1e-4 : N.value,
474
474
  width: P.value <= 0 ? 1e-4 : P.value,
475
475
  class: "vue-ui-waffle-custom-cell-foreignObject"
476
476
  }, [
477
- g(t.$slots, "cell", Y(J({ cell: { ...l, color: i.value[o].color, ...i.value[o] }, isSelected: [null, void 0].includes(A.value) ? !0 : i.value[o].serieIndex === A.value })), void 0, !0)
477
+ g(t.$slots, "cell", Y(J({ cell: { ...l, color: i.value[o].color, ...i.value[o] }, isSelected: [null, void 0].includes(O.value) ? !0 : i.value[o].serieIndex === O.value })), void 0, !0)
478
478
  ], 8, $t))), 256)) : (s(), n($, { key: 1 }, [
479
- (s(!0), n($, null, M(G.value, (l, o) => (s(), n("rect", {
479
+ (s(!0), n($, null, V(G.value, (l, o) => (s(), n("rect", {
480
480
  rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
481
- x: l.x,
482
- y: l.y,
481
+ x: l.x + e.value.style.chart.layout.grid.spaceBetween / 2,
482
+ y: l.y + e.value.style.chart.layout.grid.spaceBetween / 2,
483
483
  height: N.value <= 0 ? 1e-4 : N.value,
484
484
  width: P.value <= 0 ? 1e-4 : P.value,
485
485
  fill: "white",
@@ -487,10 +487,10 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
487
487
  "stroke-width": e.value.style.chart.layout.rect.strokeWidth,
488
488
  filter: ee(i.value[o].serieIndex)
489
489
  }, null, 8, Tt))), 256)),
490
- (s(!0), n($, null, M(G.value, (l, o) => (s(), n("rect", {
490
+ (s(!0), n($, null, V(G.value, (l, o) => (s(), n("rect", {
491
491
  rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
492
- x: l.x,
493
- y: l.y,
492
+ x: l.x + e.value.style.chart.layout.grid.spaceBetween / 2,
493
+ y: l.y + e.value.style.chart.layout.grid.spaceBetween / 2,
494
494
  height: N.value <= 0 ? 1e-4 : N.value,
495
495
  width: P.value <= 0 ? 1e-4 : P.value,
496
496
  fill: e.value.style.chart.layout.rect.useGradient && e.value.style.chart.layout.rect.gradientIntensity > 0 ? `url(#gradient_${S.value}_${o})` : i.value[o].color,
@@ -499,33 +499,33 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
499
499
  filter: ee(i.value[o].serieIndex)
500
500
  }, null, 8, It))), 256))
501
501
  ], 64)),
502
- (s(!0), n($, null, M(G.value, (l, o) => (s(), n($, null, [
502
+ (s(!0), n($, null, V(G.value, (l, o) => (s(), n($, null, [
503
503
  !L.value && !e.value.style.chart.layout.grid.vertical && e.value.style.chart.layout.labels.captions.show && (i.value[o].isFirst && l.position < e.value.style.chart.layout.grid.size - 2 || i.value[o].isAbsoluteFirst && o % e.value.style.chart.layout.grid.size === 0 && i.value[o].absoluteStartIndex) ? (s(), n("foreignObject", {
504
504
  key: 0,
505
- x: l.x + e.value.style.chart.layout.labels.captions.offsetX,
506
- y: l.y + e.value.style.chart.layout.labels.captions.offsetY,
505
+ x: l.x + e.value.style.chart.layout.labels.captions.offsetX + e.value.style.chart.layout.grid.spaceBetween / 2,
506
+ y: l.y + e.value.style.chart.layout.labels.captions.offsetY + e.value.style.chart.layout.grid.spaceBetween / 2,
507
507
  height: H.value <= 0 ? 1e-4 : H.value,
508
508
  width: E.value * e.value.style.chart.layout.grid.size <= 0 ? 1e-4 : E.value * e.value.style.chart.layout.grid.size,
509
509
  filter: ee(i.value[o].serieIndex)
510
510
  }, [
511
511
  m("div", {
512
512
  class: "vue-ui-waffle-caption",
513
- style: U(`height: 100%; width: 100%; font-size:${e.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${E.value / 12}px;color:${f(Ze)(i.value[o].color)};gap:2px`)
513
+ style: U(`height: 100%; width: 100%; font-size:${e.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${E.value / 12}px;color:${y(Ze)(i.value[o].color)};gap:2px`)
514
514
  }, [
515
- e.value.style.chart.layout.labels.captions.showSerieName ? (s(), n("span", Ft, T(e.value.style.chart.layout.labels.captions.serieNameAbbreviation ? f(et)({ source: i.value[o].name, length: e.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize }) : i.value[o].name) + ": ", 1)) : w("", !0),
516
- e.value.style.chart.layout.labels.captions.showPercentage ? (s(), n("span", zt, T(f(I)({ v: i.value[o].proportion, s: "%", r: e.value.style.chart.layout.labels.captions.roundingPercentage })), 1)) : w("", !0),
517
- e.value.style.chart.layout.labels.captions.showPercentage && e.value.style.chart.layout.labels.captions.showValue ? (s(), n("span", Pt, " (" + T(f(I)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: i.value[o].value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.layout.labels.captions.roundingValue })) + ") ", 1)) : w("", !0),
518
- !e.value.style.chart.layout.labels.captions.showPercentage && e.value.style.chart.layout.labels.captions.showValue ? (s(), n("span", Nt, T(f(I)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: i.value[o].value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.layout.labels.captions.roundingValue })), 1)) : w("", !0)
515
+ e.value.style.chart.layout.labels.captions.showSerieName ? (s(), n("span", Ft, T(e.value.style.chart.layout.labels.captions.serieNameAbbreviation ? y(et)({ source: i.value[o].name, length: e.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize }) : i.value[o].name) + ": ", 1)) : w("", !0),
516
+ e.value.style.chart.layout.labels.captions.showPercentage ? (s(), n("span", zt, T(y(I)({ v: i.value[o].proportion, s: "%", r: e.value.style.chart.layout.labels.captions.roundingPercentage })), 1)) : w("", !0),
517
+ e.value.style.chart.layout.labels.captions.showPercentage && e.value.style.chart.layout.labels.captions.showValue ? (s(), n("span", Pt, " (" + T(y(I)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: i.value[o].value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.layout.labels.captions.roundingValue })) + ") ", 1)) : w("", !0),
518
+ !e.value.style.chart.layout.labels.captions.showPercentage && e.value.style.chart.layout.labels.captions.showValue ? (s(), n("span", Nt, T(y(I)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: i.value[o].value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.layout.labels.captions.roundingValue })), 1)) : w("", !0)
519
519
  ], 4)
520
520
  ], 8, St)) : w("", !0)
521
521
  ], 64))), 256)),
522
- (s(!0), n($, null, M(G.value, (l, o) => (s(), n("rect", {
522
+ (s(!0), n($, null, V(G.value, (l, o) => (s(), n("rect", {
523
523
  onMouseover: (u) => Le(o),
524
524
  onMouseleave: a[0] || (a[0] = (u) => {
525
- K.value = !1, A.value = null;
525
+ K.value = !1, O.value = null;
526
526
  }),
527
- x: l.x,
528
- y: l.y,
527
+ x: l.x + e.value.style.chart.layout.grid.spaceBetween / 2,
528
+ y: l.y + e.value.style.chart.layout.grid.spaceBetween / 2,
529
529
  height: H.value <= 0 ? 1e-4 : H.value,
530
530
  width: E.value <= 0 ? 1e-4 : E.value,
531
531
  fill: "transparent",
@@ -551,23 +551,23 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
551
551
  }, [
552
552
  e.value.style.chart.legend.show ? (s(), X(dt, {
553
553
  key: 0,
554
- legendSet: V.value,
554
+ legendSet: A.value,
555
555
  config: Ne.value,
556
556
  onClickMarker: a[1] || (a[1] = ({ legend: l }) => he(l.uid))
557
557
  }, {
558
- item: y(({ legend: l }) => [
558
+ item: f(({ legend: l }) => [
559
559
  m("div", {
560
560
  onClick: (o) => l.segregate(),
561
561
  style: U(`opacity:${p.value.includes(l.uid) ? 0.5 : 1}`)
562
562
  }, [
563
- me(T(l.name) + ": " + T(f(I)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: l.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.legend.roundingValue, isAnimating: L.value })) + " ", 1),
564
- p.value.includes(l.uid) ? (s(), n("span", Vt, " ( - % ) ")) : (s(), n("span", At, " (" + T(isNaN(l.value / k.value) ? "-" : f(I)({ v: l.value / k.value * 100, s: "%", r: e.value.style.chart.legend.roundingPercentage, isAnimating: L.value })) + ") ", 1))
565
- ], 12, Ot)
563
+ me(T(l.name) + ": " + T(y(I)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: l.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.legend.roundingValue, isAnimating: L.value })) + " ", 1),
564
+ p.value.includes(l.uid) ? (s(), n("span", At, " ( - % ) ")) : (s(), n("span", Ot, " (" + T(isNaN(l.value / k.value) ? "-" : y(I)({ v: l.value / k.value * 100, s: "%", r: e.value.style.chart.legend.roundingPercentage, isAnimating: L.value })) + ") ", 1))
565
+ ], 12, Bt)
566
566
  ]),
567
567
  _: 1
568
568
  }, 8, ["legendSet", "config"])) : g(t.$slots, "legend", {
569
569
  key: 1,
570
- legend: V.value
570
+ legend: A.value
571
571
  }, void 0, !0)
572
572
  ], 512),
573
573
  te(ct, {
@@ -583,10 +583,10 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
583
583
  isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function",
584
584
  fontSize: e.value.style.chart.tooltip.fontSize
585
585
  }, {
586
- "tooltip-before": y(() => [
586
+ "tooltip-before": f(() => [
587
587
  g(t.$slots, "tooltip-before", Y(J({ ...Z.value })), void 0, !0)
588
588
  ]),
589
- "tooltip-after": y(() => [
589
+ "tooltip-after": f(() => [
590
590
  g(t.$slots, "tooltip-after", Y(J({ ...Z.value })), void 0, !0)
591
591
  ]),
592
592
  _: 3
@@ -607,7 +607,7 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
607
607
  }
608
608
  }
609
609
  }, {
610
- content: y(() => [
610
+ content: f(() => [
611
611
  te(vt, {
612
612
  colNames: q.value.colNames,
613
613
  head: q.value.head,
@@ -616,13 +616,13 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
616
616
  title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
617
617
  onClose: a[2] || (a[2] = (l) => C.value.showTable = !1)
618
618
  }, {
619
- th: y(({ th: l }) => [
619
+ th: f(({ th: l }) => [
620
620
  m("div", {
621
621
  innerHTML: l,
622
622
  style: { display: "flex", "align-items": "center" }
623
- }, null, 8, Mt)
623
+ }, null, 8, Vt)
624
624
  ]),
625
- td: y(({ td: l }) => [
625
+ td: f(({ td: l }) => [
626
626
  me(T(l.name || l), 1)
627
627
  ]),
628
628
  _: 1
@@ -630,9 +630,9 @@ const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = [
630
630
  ]),
631
631
  _: 1
632
632
  }, 8, ["config"])) : w("", !0)
633
- ], 14, yt));
633
+ ], 14, ft));
634
634
  }
635
- }, Kt = /* @__PURE__ */ ft(Bt, [["__scopeId", "data-v-e4e6d49b"]]);
635
+ }, Kt = /* @__PURE__ */ yt(Mt, [["__scopeId", "data-v-dc5a40b0"]]);
636
636
  export {
637
637
  Kt as default
638
638
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DFXgoR1T.cjs"),Z=require("./useResponsive-B3TrDDIG.cjs"),me=require("./Title-Ci74YZxW.cjs"),ee=require("./usePrinter-DoFYRZKM.cjs"),be=require("./Tooltip-BNMjZUBc.cjs"),ke=require("./DataTable-BSoyXOFT.cjs"),we=require("./Legend-DZhpxKg4.cjs"),xe=require("./vue-ui-skeleton-CmABeGyu.cjs"),Ce=require("./vue-ui-accordion-P9OYffC3.cjs"),te=require("./useNestedProp-CbZUIZc0.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=S=>(e.pushScopeId("data-v-e4e6d49b"),S=S(),e.popScopeId(),S),_e=["id"],Se=["xmlns","viewBox"],Ne=["id"],$e=["stop-color"],Te=["stop-color"],Ve=["id"],Ie=le(()=>e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1)),Ee=le(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Pe=[Ie,Ee],ze=["x","y","height","width"],Fe=["rx","x","y","height","width","stroke","stroke-width","filter"],Le=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],Oe=["x","y","height","width","filter"],De={key:0},Ae={key:1},Me={key:2},qe={key:3},Re=["onMouseover","x","y","height","width"],Ue=["onClick"],je={key:0},Ge={key:1},We=["innerHTML"],He={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(S,{expose:ae,emit:oe}){const p=S,{vue_ui_waffle:re}=s.useConfig(),I=e.computed(()=>!!p.dataset&&p.dataset.length),m=e.ref(s.createUid()),ue=e.ref(null),F=e.ref(!1),L=e.ref(""),B=e.ref(null),A=e.ref(0),N=e.ref(null),M=e.ref(null),q=e.ref(null),t=e.computed(()=>{const l=te.useNestedProp({userConfig:p.config,defaultConfig:re});return l.theme?{...te.useNestedProp({userConfig:s.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}),E=e.ref(null);e.onMounted(()=>{if(s.objectIsEmpty(p.dataset)?s.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,o)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{s.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=Z.throttle(()=>{const{width:o,height:a}=Z.useResponsive({chart:N.value,title:t.value.style.chart.title.text?M.value:null,legend:t.value.style.chart.legend.show?q.value:null});b.value.width=o,b.value.height=a,k.value.width=o,k.value.height=a});E.value=new ResizeObserver(l),E.value.observe(N.value.parentNode)}}),e.onBeforeUnmount(()=>{E.value&&E.value.disconnect()});const{isPrinting:ne,isImaging:se,generatePdf:R,generateImage:U}=ee.usePrinter({elementId:`vue-ui-waffle_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),j=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),b=e.ref({height:512,width:512}),k=e.ref({top:0,left:0,height:512,width:512}),w=e.computed(()=>(k.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),x=e.computed(()=>(k.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),$=e.computed(()=>k.value.width/t.value.style.chart.layout.grid.size),P=e.computed(()=>k.value.height/t.value.style.chart.layout.grid.size);function G(l){const o=l.reduce((u,n)=>u+n,0),a=l.map(u=>Math.round(u/o*100)/100),r=a.reduce((u,n)=>u+n,0);if(r!==1){const u=a.length-1;a[u]+=1-r,a[u]=Math.round(a[u]*100)/100}return a}const W=e.computed(()=>p.dataset.map((l,o)=>({...l,color:s.convertColorToHex(l.color)||j.value[o]||s.palette[o]||s.palette[o%s.palette.length],uid:`serie_${o}`,absoluteIndex:o}))),d=e.ref(W.value),ie=e.computed(()=>{const l=d.value.filter((o,a)=>!v.value.includes(o.uid)).map((o,a)=>(o.values||[]).reduce((r,u)=>r+u,0));return G(l)}),ce=e.computed(()=>{const l=d.value.map((o,a)=>(o.values||[]).reduce((r,u)=>r+u));return G(l)}),h=e.computed(()=>(p.dataset.forEach((l,o)=>{[null,void 0].includes(l.values)&&s.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:o})}),d.value.filter((l,o)=>!v.value.includes(l.uid)).map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:ie.value[o]*Math.pow(t.value.style.chart.layout.grid.size,2)})))),de=e.computed(()=>d.value.map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:ce.value[o]*Math.pow(t.value.style.chart.layout.grid.size,2)})));function ve(){return de.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)}))}const pe=e.computed(()=>h.value.map((l,o)=>{const a=o>0?h.value.filter((n,c)=>c<o).map(n=>n.proportion).reduce((n,c)=>n+c)+l.proportion-h.value[o-1].proportion:l.proportion-l.proportion,r=a+l.proportion,u=[];for(let n=a;n<=r;n+=1)u.push(n);return{...l,start:o>0?h.value.filter((n,c)=>c<o).map(n=>n.proportion).reduce((n,c)=>n+c)+l.proportion-h.value[o-1].proportion:l.proportion-l.proportion,rects:u}})),i=e.computed(()=>pe.value.flatMap((l,o)=>l.rects.map((a,r)=>({isFirst:r===0,isLongEnough:a.length>2,name:l.name,color:l.color,value:l.value,serieIndex:o,absoluteStartIndex:r<3,serieId:l.uid,...l}))).map((l,o)=>({...l,isAbsoluteFirst:o%t.value.style.chart.layout.grid.size===0}))),T=e.computed(()=>{const l=[];for(let o=0;o<t.value.style.chart.layout.grid.size;o+=1)for(let a=0;a<t.value.style.chart.layout.grid.size;a+=1)l.push({isStartOfLine:a===0,position:t.value.style.chart.layout.grid.vertical?o:a,x:(t.value.style.chart.layout.grid.vertical?o:a)*(w.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:o)*(x.value+t.value.style.chart.layout.grid.spaceBetween)+k.value.top});return l}),v=e.ref([]),C=e.ref(!1),H=e.ref(null),X=e.ref(null);function Y(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(u=>u!==l):v.value.length<_.value.length-1&&_.value.length>1&&v.value.push(l);return}const o=W.value.find(u=>u.uid===l).values.reduce((u,n)=>u+n,0);let r=d.value.find(u=>u.uid===l).values.reduce((u,n)=>u+n,0);if(v.value.includes(l)){let n=function(){r>u?(cancelAnimationFrame(H.value),d.value=d.value.map((c,ge)=>c.uid===l?{...c,values:[u]}:c),C.value=!1):(C.value=!0,r+=u*.025,d.value=d.value.map((c,ge)=>c.uid===l?{...c,values:[r]}:c),H.value=requestAnimationFrame(n))};v.value=v.value.filter(c=>c!==l);const u=o;n()}else if(v.value.length<_.value.length-1&&_.value.length>1){let u=function(){r<.1?(cancelAnimationFrame(X.value),v.value.push(l),d.value=d.value.map((n,c)=>n.uid===l?{...n,values:[0]}:n),C.value=!1):(C.value=!0,r/=1.5,d.value=d.value.map((n,c)=>n.uid===l?{...n,values:[r]}:n),X.value=requestAnimationFrame(u))};u()}oe("selectLegend",h.value.map(u=>({name:u.name,color:u.color,value:u.value,proportion:u.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)})))}const _=e.computed(()=>d.value.map((l,o)=>({name:l.name,color:l.color||j[o]||s.palette[o]||s.palette[o%s.palette.length],value:(l.values||[]).reduce((a,r)=>a+r,0),uid:l.uid,shape:"square"})).map((l,o)=>({...l,proportion:l.value/d.value.map(a=>(a.values||[]).reduce((r,u)=>r+u,0)).reduce((a,r)=>a+r,0),opacity:v.value.includes(l.uid)?.5:1,segregate:()=>Y(l.uid),isSegregated:v.value.includes(l.uid)}))),he=e.computed(()=>({cy:"waffle-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":""})),f=e.computed(()=>h.value.map(l=>l.value).reduce((l,o)=>l+o,0)),O=e.ref(null);function fe(l){if(v.value.length===p.dataset.length)return;const o=i.value[l];O.value={datapoint:o,seriesIndex:o.absoluteIndex,series:d.value,config:t.value},F.value=!0,B.value=i.value[l].serieIndex;const a=t.value.style.chart.tooltip.customFormat;if(s.isFunction(a)&&s.functionReturnsString(()=>a({seriesIndex:i.value[l].absoluteIndex,datapoint:o,series:d.value,config:t.value})))L.value=a({seriesIndex:i.value[l].absoluteIndex,datapoint:o,series:d.value,config:t.value});else{let r="";r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,r+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" rx="1" fill="${o.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(r+=`<b>${s.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?r+=`<span>(${(o.value/f.value*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:r+=`<b>${(o.value/f.value*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),L.value=r}}const g=e.computed(()=>{const l=h.value.map(a=>({name:a.name,color:a.color})),o=h.value.map(a=>a.value);return{head:l,body:o}});function D(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${m.value})`:""}function J(){e.nextTick(()=>{const l=g.value.head.map((r,u)=>[[r.name],[g.value.body[u]],[isNaN(g.value.body[u]/f.value)?"-":g.value.body[u]/f.value*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=s.createCsvContent(o);s.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const z=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>',s.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],o=g.value.head.map((u,n)=>[{color:u.color,name:u.name},s.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:g.value.body[n],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(g.value.body[n]/f.value)?"-":(g.value.body[n]/f.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),a={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},shape:"square",breakpoint:t.value.table.responsiveBreakpoint},r=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:o,config:a,colNames:r}}),V=e.ref(!1);function ye(l){V.value=l,A.value+=1}function K(){y.value.showTable=!y.value.showTable}function Q(){y.value.showTooltip=!y.value.showTooltip}return ae({getData:ve,generatePdf:R,generateCsv:J,generateImage:U,toggleTable:K,toggleTooltip:Q}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:N,id:`vue-ui-waffle_${m.value}`,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};${t.value.responsive?"height: 100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:M,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(me._sfc_main,{config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&I.value?(e.openBlock(),e.createBlock(ee.UserOptions,{ref_key:"details",ref:ue,key:`user_options_${A.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ne),isImaging:e.unref(se),uid:m.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(R),onGenerateCsv:J,onGenerateImage:e.unref(U),onToggleTable:K,onToggleTooltip:Q},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:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),I.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${b.value.width<=0?10:b.value.width} ${b.value.height<=0?10:b.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(a,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(s.shiftHue)(a.color,.05)}${e.unref(s.opacity)[100-t.value.style.chart.layout.rect.gradientIntensity]}`},null,8,$e),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Te)],8,Ne))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},Pe,8,Ve)]),t.value.useCustomCells?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.normalizeProps(e.guardReactiveProps({cell:{...a,color:i.value[r].color,...i.value[r]},isSelected:[null,void 0].includes(B.value)?!0:i.value[r].serieIndex===B.value})),void 0,!0)],8,ze))),256)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x,y:a.y,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:D(i.value[r].serieIndex)},null,8,Fe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x,y:a.y,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${m.value}_${r})`:i.value[r].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:D(i.value[r].serieIndex)},null,8,Le))),256))],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!C.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(i.value[r].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||i.value[r].isAbsoluteFirst&&r%t.value.style.chart.layout.grid.size===0&&i.value[r].absoluteStartIndex)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:a.x+t.value.style.chart.layout.labels.captions.offsetX,y:a.y+t.value.style.chart.layout.labels.captions.offsetY,height:P.value<=0?1e-4:P.value,width:$.value*t.value.style.chart.layout.grid.size<=0?1e-4:$.value*t.value.style.chart.layout.grid.size,filter:D(i.value[r].serieIndex)},[e.createElementVNode("div",{class:"vue-ui-waffle-caption",style:e.normalizeStyle(`height: 100%; width: 100%; font-size:${t.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${$.value/12}px;color:${e.unref(s.adaptColorToBackground)(i.value[r].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",De,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(s.abbreviate)({source:i.value[r].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):i.value[r].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",Ae,e.toDisplayString(e.unref(s.dataLabel)({v:i.value[r].proportion,s:"%",r:t.value.style.chart.layout.labels.captions.roundingPercentage})),1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",Me," ("+e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:i.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}))+") ",1)):e.createCommentVNode("",!0),!t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",qe,e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:i.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue})),1)):e.createCommentVNode("",!0)],4)],8,Oe)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:u=>fe(r),onMouseleave:o[0]||(o[0]=u=>{F.value=!1,B.value=null}),x:a.x,y:a.y,height:P.value<=0?1e-4:P.value,width:$.value<=0?1e-4:$.value,fill:"transparent",stroke:"none"},null,40,Re))),256)),e.renderSlot(l.$slots,"svg",{svg:b.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),I.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:3,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:q},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:0,legendSet:_.value,config:he.value,onClickMarker:o[1]||(o[1]=({legend:a})=>Y(a.uid))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:r=>a.segregate(),style:e.normalizeStyle(`opacity:${v.value.includes(a.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue,isAnimating:C.value}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",Ge," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",je," ("+e.toDisplayString(isNaN(a.value/f.value)?"-":e.unref(s.dataLabel)({v:a.value/f.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:C.value}))+") ",1))],12,Ue)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:_.value},void 0,!0)],512),e.createVNode(be._sfc_main,{show:y.value.showTooltip&&F.value&&v.value.length<p.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,parent:N.value,content:L.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","parent","content","isCustom","fontSize"]),I.value?(e.openBlock(),e.createBlock(Ce.default,{key:4,hideDetails:"",config:{open:y.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(ke.DataTable,{colNames:z.value.colNames,head:z.value.head,body:z.value.body,config:z.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[2]||(o[2]=a=>y.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,We)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,_e))}},Xe=Be._export_sfc(He,[["__scopeId","data-v-e4e6d49b"]]);exports.default=Xe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CSlObCMJ.cjs"),Z=require("./useResponsive-B3TrDDIG.cjs"),me=require("./Title--kLbBq-N.cjs"),ee=require("./usePrinter-ClpmcbPy.cjs"),be=require("./Tooltip-Dwh7A0L5.cjs"),ke=require("./DataTable-DZ7GOCVh.cjs"),we=require("./Legend-BNUo8JKO.cjs"),xe=require("./vue-ui-skeleton-aEAr9fnx.cjs"),Ce=require("./vue-ui-accordion-IPISean4.cjs"),te=require("./useNestedProp-DUXlSjg2.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=S=>(e.pushScopeId("data-v-dc5a40b0"),S=S(),e.popScopeId(),S),_e=["id"],Se=["xmlns","viewBox"],Ne=["id"],$e=["stop-color"],Te=["stop-color"],Ve=["id"],Ie=le(()=>e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1)),Ee=le(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Pe=[Ie,Ee],ze=["x","y","height","width"],Fe=["rx","x","y","height","width","stroke","stroke-width","filter"],Le=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],Oe=["x","y","height","width","filter"],De={key:0},Ae={key:1},Me={key:2},qe={key:3},Re=["onMouseover","x","y","height","width"],Ue=["onClick"],je={key:0},Ge={key:1},We=["innerHTML"],He={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(S,{expose:ae,emit:oe}){const p=S,{vue_ui_waffle:re}=s.useConfig(),I=e.computed(()=>!!p.dataset&&p.dataset.length),m=e.ref(s.createUid()),ue=e.ref(null),F=e.ref(!1),L=e.ref(""),B=e.ref(null),A=e.ref(0),N=e.ref(null),M=e.ref(null),q=e.ref(null),t=e.computed(()=>{const l=te.useNestedProp({userConfig:p.config,defaultConfig:re});return l.theme?{...te.useNestedProp({userConfig:s.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}),E=e.ref(null);e.onMounted(()=>{if(s.objectIsEmpty(p.dataset)?s.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,o)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{s.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=Z.throttle(()=>{const{width:o,height:a}=Z.useResponsive({chart:N.value,title:t.value.style.chart.title.text?M.value:null,legend:t.value.style.chart.legend.show?q.value:null});b.value.width=o,b.value.height=a,k.value.width=o,k.value.height=a});E.value=new ResizeObserver(l),E.value.observe(N.value.parentNode)}}),e.onBeforeUnmount(()=>{E.value&&E.value.disconnect()});const{isPrinting:ne,isImaging:se,generatePdf:R,generateImage:U}=ee.usePrinter({elementId:`vue-ui-waffle_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),j=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),f=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),b=e.ref({height:512,width:512}),k=e.ref({top:0,left:0,height:512,width:512}),w=e.computed(()=>(k.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),x=e.computed(()=>(k.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),$=e.computed(()=>k.value.width/t.value.style.chart.layout.grid.size),P=e.computed(()=>k.value.height/t.value.style.chart.layout.grid.size);function G(l){const o=l.reduce((u,n)=>u+n,0),a=l.map(u=>Math.round(u/o*100)/100),r=a.reduce((u,n)=>u+n,0);if(r!==1){const u=a.length-1;a[u]+=1-r,a[u]=Math.round(a[u]*100)/100}return a}const W=e.computed(()=>p.dataset.map((l,o)=>({...l,color:s.convertColorToHex(l.color)||j.value[o]||s.palette[o]||s.palette[o%s.palette.length],uid:`serie_${o}`,absoluteIndex:o}))),d=e.ref(W.value),ie=e.computed(()=>{const l=d.value.filter((o,a)=>!v.value.includes(o.uid)).map((o,a)=>(o.values||[]).reduce((r,u)=>r+u,0));return G(l)}),ce=e.computed(()=>{const l=d.value.map((o,a)=>(o.values||[]).reduce((r,u)=>r+u));return G(l)}),h=e.computed(()=>(p.dataset.forEach((l,o)=>{[null,void 0].includes(l.values)&&s.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:o})}),d.value.filter((l,o)=>!v.value.includes(l.uid)).map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:ie.value[o]*Math.pow(t.value.style.chart.layout.grid.size,2)})))),de=e.computed(()=>d.value.map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:ce.value[o]*Math.pow(t.value.style.chart.layout.grid.size,2)})));function ve(){return de.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)}))}const pe=e.computed(()=>h.value.map((l,o)=>{const a=o>0?h.value.filter((n,c)=>c<o).map(n=>n.proportion).reduce((n,c)=>n+c)+l.proportion-h.value[o-1].proportion:l.proportion-l.proportion,r=a+l.proportion,u=[];for(let n=a;n<=r;n+=1)u.push(n);return{...l,start:o>0?h.value.filter((n,c)=>c<o).map(n=>n.proportion).reduce((n,c)=>n+c)+l.proportion-h.value[o-1].proportion:l.proportion-l.proportion,rects:u}})),i=e.computed(()=>pe.value.flatMap((l,o)=>l.rects.map((a,r)=>({isFirst:r===0,isLongEnough:a.length>2,name:l.name,color:l.color,value:l.value,serieIndex:o,absoluteStartIndex:r<3,serieId:l.uid,...l}))).map((l,o)=>({...l,isAbsoluteFirst:o%t.value.style.chart.layout.grid.size===0}))),T=e.computed(()=>{const l=[];for(let o=0;o<t.value.style.chart.layout.grid.size;o+=1)for(let a=0;a<t.value.style.chart.layout.grid.size;a+=1)l.push({isStartOfLine:a===0,position:t.value.style.chart.layout.grid.vertical?o:a,x:(t.value.style.chart.layout.grid.vertical?o:a)*(w.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:o)*(x.value+t.value.style.chart.layout.grid.spaceBetween)+k.value.top});return l}),v=e.ref([]),C=e.ref(!1),H=e.ref(null),X=e.ref(null);function Y(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(u=>u!==l):v.value.length<_.value.length-1&&_.value.length>1&&v.value.push(l);return}const o=W.value.find(u=>u.uid===l).values.reduce((u,n)=>u+n,0);let r=d.value.find(u=>u.uid===l).values.reduce((u,n)=>u+n,0);if(v.value.includes(l)){let n=function(){r>u?(cancelAnimationFrame(H.value),d.value=d.value.map((c,ge)=>c.uid===l?{...c,values:[u]}:c),C.value=!1):(C.value=!0,r+=u*.025,d.value=d.value.map((c,ge)=>c.uid===l?{...c,values:[r]}:c),H.value=requestAnimationFrame(n))};v.value=v.value.filter(c=>c!==l);const u=o;n()}else if(v.value.length<_.value.length-1&&_.value.length>1){let u=function(){r<.1?(cancelAnimationFrame(X.value),v.value.push(l),d.value=d.value.map((n,c)=>n.uid===l?{...n,values:[0]}:n),C.value=!1):(C.value=!0,r/=1.5,d.value=d.value.map((n,c)=>n.uid===l?{...n,values:[r]}:n),X.value=requestAnimationFrame(u))};u()}oe("selectLegend",h.value.map(u=>({name:u.name,color:u.color,value:u.value,proportion:u.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)})))}const _=e.computed(()=>d.value.map((l,o)=>({name:l.name,color:l.color||j[o]||s.palette[o]||s.palette[o%s.palette.length],value:(l.values||[]).reduce((a,r)=>a+r,0),uid:l.uid,shape:"square"})).map((l,o)=>({...l,proportion:l.value/d.value.map(a=>(a.values||[]).reduce((r,u)=>r+u,0)).reduce((a,r)=>a+r,0),opacity:v.value.includes(l.uid)?.5:1,segregate:()=>Y(l.uid),isSegregated:v.value.includes(l.uid)}))),he=e.computed(()=>({cy:"waffle-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":""})),y=e.computed(()=>h.value.map(l=>l.value).reduce((l,o)=>l+o,0)),O=e.ref(null);function ye(l){if(v.value.length===p.dataset.length)return;const o=i.value[l];O.value={datapoint:o,seriesIndex:o.absoluteIndex,series:d.value,config:t.value},F.value=!0,B.value=i.value[l].serieIndex;const a=t.value.style.chart.tooltip.customFormat;if(s.isFunction(a)&&s.functionReturnsString(()=>a({seriesIndex:i.value[l].absoluteIndex,datapoint:o,series:d.value,config:t.value})))L.value=a({seriesIndex:i.value[l].absoluteIndex,datapoint:o,series:d.value,config:t.value});else{let r="";r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,r+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" rx="1" fill="${o.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(r+=`<b>${s.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?r+=`<span>(${(o.value/y.value*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:r+=`<b>${(o.value/y.value*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),L.value=r}}const g=e.computed(()=>{const l=h.value.map(a=>({name:a.name,color:a.color})),o=h.value.map(a=>a.value);return{head:l,body:o}});function D(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${m.value})`:""}function J(){e.nextTick(()=>{const l=g.value.head.map((r,u)=>[[r.name],[g.value.body[u]],[isNaN(g.value.body[u]/y.value)?"-":g.value.body[u]/y.value*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=s.createCsvContent(o);s.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const z=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>',s.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:y.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],o=g.value.head.map((u,n)=>[{color:u.color,name:u.name},s.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:g.value.body[n],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(g.value.body[n]/y.value)?"-":(g.value.body[n]/y.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),a={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},shape:"square",breakpoint:t.value.table.responsiveBreakpoint},r=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:o,config:a,colNames:r}}),V=e.ref(!1);function fe(l){V.value=l,A.value+=1}function K(){f.value.showTable=!f.value.showTable}function Q(){f.value.showTooltip=!f.value.showTooltip}return ae({getData:ve,generatePdf:R,generateCsv:J,generateImage:U,toggleTable:K,toggleTooltip:Q}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:N,id:`vue-ui-waffle_${m.value}`,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};${t.value.responsive?"height: 100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:M,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(me._sfc_main,{config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&I.value?(e.openBlock(),e.createBlock(ee.UserOptions,{ref_key:"details",ref:ue,key:`user_options_${A.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ne),isImaging:e.unref(se),uid:m.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,isTooltip:f.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(R),onGenerateCsv:J,onGenerateImage:e.unref(U),onToggleTable:K,onToggleTooltip:Q},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:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),I.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${b.value.width<=0?10:b.value.width} ${b.value.height<=0?10:b.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(a,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(s.shiftHue)(a.color,.05)}${e.unref(s.opacity)[100-t.value.style.chart.layout.rect.gradientIntensity]}`},null,8,$e),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Te)],8,Ne))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},Pe,8,Ve)]),t.value.useCustomCells?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.normalizeProps(e.guardReactiveProps({cell:{...a,color:i.value[r].color,...i.value[r]},isSelected:[null,void 0].includes(B.value)?!0:i.value[r].serieIndex===B.value})),void 0,!0)],8,ze))),256)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:D(i.value[r].serieIndex)},null,8,Fe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${m.value}_${r})`:i.value[r].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:D(i.value[r].serieIndex)},null,8,Le))),256))],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!C.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(i.value[r].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||i.value[r].isAbsoluteFirst&&r%t.value.style.chart.layout.grid.size===0&&i.value[r].absoluteStartIndex)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:a.x+t.value.style.chart.layout.labels.captions.offsetX+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.labels.captions.offsetY+t.value.style.chart.layout.grid.spaceBetween/2,height:P.value<=0?1e-4:P.value,width:$.value*t.value.style.chart.layout.grid.size<=0?1e-4:$.value*t.value.style.chart.layout.grid.size,filter:D(i.value[r].serieIndex)},[e.createElementVNode("div",{class:"vue-ui-waffle-caption",style:e.normalizeStyle(`height: 100%; width: 100%; font-size:${t.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${$.value/12}px;color:${e.unref(s.adaptColorToBackground)(i.value[r].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",De,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(s.abbreviate)({source:i.value[r].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):i.value[r].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",Ae,e.toDisplayString(e.unref(s.dataLabel)({v:i.value[r].proportion,s:"%",r:t.value.style.chart.layout.labels.captions.roundingPercentage})),1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",Me," ("+e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:i.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}))+") ",1)):e.createCommentVNode("",!0),!t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",qe,e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:i.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue})),1)):e.createCommentVNode("",!0)],4)],8,Oe)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:u=>ye(r),onMouseleave:o[0]||(o[0]=u=>{F.value=!1,B.value=null}),x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:P.value<=0?1e-4:P.value,width:$.value<=0?1e-4:$.value,fill:"transparent",stroke:"none"},null,40,Re))),256)),e.renderSlot(l.$slots,"svg",{svg:b.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),I.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:3,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:q},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:0,legendSet:_.value,config:he.value,onClickMarker:o[1]||(o[1]=({legend:a})=>Y(a.uid))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:r=>a.segregate(),style:e.normalizeStyle(`opacity:${v.value.includes(a.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue,isAnimating:C.value}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",Ge," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",je," ("+e.toDisplayString(isNaN(a.value/y.value)?"-":e.unref(s.dataLabel)({v:a.value/y.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:C.value}))+") ",1))],12,Ue)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:_.value},void 0,!0)],512),e.createVNode(be._sfc_main,{show:f.value.showTooltip&&F.value&&v.value.length<p.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,parent:N.value,content:L.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","parent","content","isCustom","fontSize"]),I.value?(e.openBlock(),e.createBlock(Ce.default,{key:4,hideDetails:"",config:{open:f.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ke.DataTable,{colNames:z.value.colNames,head:z.value.head,body:z.value.body,config:z.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[2]||(o[2]=a=>f.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,We)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,_e))}},Xe=Be._export_sfc(He,[["__scopeId","data-v-dc5a40b0"]]);exports.default=Xe;
@@ -1,10 +1,10 @@
1
1
  import { computed as m, ref as n, watch as D, onMounted as H, onBeforeUnmount as W, openBlock as c, createElementBlock as h, normalizeStyle as C, createVNode as q, createCommentVNode as v, createBlock as S, unref as d, createSlots as J, withCtx as _, renderSlot as p, normalizeProps as K, guardReactiveProps as Q, normalizeClass as O, Fragment as Z, renderList as ee, toDisplayString as te } from "vue";
2
- import { u as ae, c as le, t as ne, o as oe, e as se, s as N, X as re } from "./index-CGb3gF5A.js";
3
- import { _ as ue } from "./Title-CfofmWzW.js";
4
- import { u as ie, U as ce } from "./usePrinter-VlAyPtaS.js";
2
+ import { u as ae, c as le, t as ne, o as oe, e as se, s as N, X as re } from "./index-D0PI50d6.js";
3
+ import { _ as ue } from "./Title-DM6fKrUI.js";
4
+ import { u as ie, U as ce } from "./usePrinter-DJnJEVGy.js";
5
5
  import { t as he, u as ve } from "./useResponsive-NZB-WLRF.js";
6
- import de from "./vue-ui-skeleton-B0udzFdQ.js";
7
- import { u as A } from "./useNestedProp-DCBzUHfz.js";
6
+ import de from "./vue-ui-skeleton-CDB2sB2S.js";
7
+ import { u as A } from "./useNestedProp-BNV_Y29K.js";
8
8
  import { _ as ye } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  const fe = ["id"], ge = ["xmlns", "viewBox"], me = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-linecap"], pe = ["cx", "cy", "r", "stroke", "stroke-width"], ke = ["x", "y", "font-size", "fill", "font-weight"], we = {
10
10
  __name: "vue-ui-wheel",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-DFXgoR1T.cjs"),q=require("./Title-Ci74YZxW.cjs"),x=require("./usePrinter-DoFYRZKM.cjs"),_=require("./useResponsive-B3TrDDIG.cjs"),T=require("./vue-ui-skeleton-CmABeGyu.cjs"),B=require("./useNestedProp-CbZUIZc0.cjs"),U=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),G=["id"],L=["xmlns","viewBox"],X=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],j=["cx","cy","r","stroke","stroke-width"],H=["x","y","font-size","fill","font-weight"],R={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(I,{expose:P}){const o=I,{vue_ui_wheel:S}=c.useConfig(),y=e.computed(()=>!!o.dataset&&Object.keys(o.dataset).length),f=e.ref(c.createUid()),F=e.ref(null),m=e.ref(0),h=e.ref(null),p=e.ref(null),t=e.computed(()=>{const l=B.useNestedProp({userConfig:o.config,defaultConfig:S});return l.theme?{...B.useNestedProp({userConfig:c.themes.vue_ui_wheel[l.theme]||o.config,defaultConfig:l})}:l}),{isPrinting:N,isImaging:z,generatePdf:k,generateImage:w}=x.usePrinter({elementId:f.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel"}),n=e.ref({size:360,height:360,width:360}),g=e.ref(t.value.style.chart.layout.percentage.fontSize),r=e.computed(()=>({radius:Math.min(n.value.width,n.value.height)*.9/2,centerX:n.value.width/2,centerY:n.value.height/2}));function C(l,s=1){return{x:r.value.centerX+r.value.radius*Math.cos(29.85+l*Math.PI/180)*s,y:r.value.centerY+r.value.radius*Math.sin(29.85+l*Math.PI/180)*s}}const u=e.ref(t.value.style.chart.animation.use?0:o.dataset.percentage||0);e.watch(()=>o.dataset.percentage,()=>{u.value=e.ref(t.value.style.chart.animation.use?0:o.dataset.percentage||0),b()});const v=e.ref(null);e.onMounted(()=>{if(c.objectIsEmpty(o.dataset)&&c.error({componentName:"VueUiWheel",type:"dataset"}),b(),t.value.responsive){const l=_.throttle(()=>{const{width:s,height:a}=_.useResponsive({chart:h.value,title:t.value.style.chart.title.text?p.value:null});n.value.width=s,n.value.height=a,g.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(s,a)});v.value=new ResizeObserver(l),v.value.observe(h.value.parentNode)}}),e.onBeforeUnmount(()=>{v.value&&v.value.disconnect()});function b(){let l=0,s=t.value.style.chart.animation.speed,a=.005*t.value.style.chart.animation.acceleration;function i(){u.value+=s+l,l+=a,u.value<(o.dataset.percentage||0)?requestAnimationFrame(i):u.value=o.dataset.percentage||0}t.value.style.chart.animation.use&&(u.value=0,i())}const $=e.computed(()=>{const l=[];for(let a=0;a<100;a+=1){const i=u.value>a?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:E,y:A}=C(n.value.size/100*a),{x:M,y:V}=C(n.value.size/100*a,.9);l.push({x1:E,y1:A,x2:M,y2:V,color:t.value.style.chart.layout.wheel.ticks.gradient.show?c.shiftHue(i,a/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):i})}return l}),d=e.ref(!1);function O(l){d.value=l,m.value+=1}return P({generatePdf:k,generateImage:w}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:h,id:f.value,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:p,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(q._sfc_main,{config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value?(e.openBlock(),e.createBlock(x.UserOptions,{ref_key:"details",ref:F,key:`user_options_${m.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(N),isImaging:e.unref(z),uid:f.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:d.value,titles:{...t.value.userOptions.buttonTitles},chartElement:h.value,onToggleFullscreen:O,onGeneratePdf:e.unref(k),onGenerateImage:e.unref(w)},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:i})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:i})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":d.value,"vue-data-ui-fulscreen--off":!d.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(a,i)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2,stroke:a.color,"stroke-width":5/360*Math.min(n.value.width,n.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&i<=u.value})},null,10,X))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:r.value.centerX,cy:r.value.centerY,r:r.value.radius*.8<=0?1e-4:r.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,j)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:1,x:r.value.centerX,y:r.value.centerY+g.value/3,"font-size":g.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(c.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,u.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(Number(u.value.toFixed(t.value.style.chart.layout.percentage.rounding)).toLocaleString())+"% ",9,H)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,L)):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(T.default,{key:3,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],12,G))}},Y=U._export_sfc(R,[["__scopeId","data-v-9e158d61"]]);exports.default=Y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-CSlObCMJ.cjs"),q=require("./Title--kLbBq-N.cjs"),x=require("./usePrinter-ClpmcbPy.cjs"),_=require("./useResponsive-B3TrDDIG.cjs"),T=require("./vue-ui-skeleton-aEAr9fnx.cjs"),B=require("./useNestedProp-DUXlSjg2.cjs"),U=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),G=["id"],L=["xmlns","viewBox"],X=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],j=["cx","cy","r","stroke","stroke-width"],H=["x","y","font-size","fill","font-weight"],R={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(I,{expose:P}){const o=I,{vue_ui_wheel:S}=c.useConfig(),y=e.computed(()=>!!o.dataset&&Object.keys(o.dataset).length),f=e.ref(c.createUid()),F=e.ref(null),m=e.ref(0),h=e.ref(null),p=e.ref(null),t=e.computed(()=>{const l=B.useNestedProp({userConfig:o.config,defaultConfig:S});return l.theme?{...B.useNestedProp({userConfig:c.themes.vue_ui_wheel[l.theme]||o.config,defaultConfig:l})}:l}),{isPrinting:N,isImaging:z,generatePdf:k,generateImage:w}=x.usePrinter({elementId:f.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel"}),n=e.ref({size:360,height:360,width:360}),g=e.ref(t.value.style.chart.layout.percentage.fontSize),r=e.computed(()=>({radius:Math.min(n.value.width,n.value.height)*.9/2,centerX:n.value.width/2,centerY:n.value.height/2}));function C(l,s=1){return{x:r.value.centerX+r.value.radius*Math.cos(29.85+l*Math.PI/180)*s,y:r.value.centerY+r.value.radius*Math.sin(29.85+l*Math.PI/180)*s}}const u=e.ref(t.value.style.chart.animation.use?0:o.dataset.percentage||0);e.watch(()=>o.dataset.percentage,()=>{u.value=e.ref(t.value.style.chart.animation.use?0:o.dataset.percentage||0),b()});const v=e.ref(null);e.onMounted(()=>{if(c.objectIsEmpty(o.dataset)&&c.error({componentName:"VueUiWheel",type:"dataset"}),b(),t.value.responsive){const l=_.throttle(()=>{const{width:s,height:a}=_.useResponsive({chart:h.value,title:t.value.style.chart.title.text?p.value:null});n.value.width=s,n.value.height=a,g.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(s,a)});v.value=new ResizeObserver(l),v.value.observe(h.value.parentNode)}}),e.onBeforeUnmount(()=>{v.value&&v.value.disconnect()});function b(){let l=0,s=t.value.style.chart.animation.speed,a=.005*t.value.style.chart.animation.acceleration;function i(){u.value+=s+l,l+=a,u.value<(o.dataset.percentage||0)?requestAnimationFrame(i):u.value=o.dataset.percentage||0}t.value.style.chart.animation.use&&(u.value=0,i())}const $=e.computed(()=>{const l=[];for(let a=0;a<100;a+=1){const i=u.value>a?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:E,y:A}=C(n.value.size/100*a),{x:M,y:V}=C(n.value.size/100*a,.9);l.push({x1:E,y1:A,x2:M,y2:V,color:t.value.style.chart.layout.wheel.ticks.gradient.show?c.shiftHue(i,a/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):i})}return l}),d=e.ref(!1);function O(l){d.value=l,m.value+=1}return P({generatePdf:k,generateImage:w}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:h,id:f.value,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:p,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(q._sfc_main,{config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value?(e.openBlock(),e.createBlock(x.UserOptions,{ref_key:"details",ref:F,key:`user_options_${m.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(N),isImaging:e.unref(z),uid:f.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:d.value,titles:{...t.value.userOptions.buttonTitles},chartElement:h.value,onToggleFullscreen:O,onGeneratePdf:e.unref(k),onGenerateImage:e.unref(w)},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:i})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:i})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":d.value,"vue-data-ui-fulscreen--off":!d.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(a,i)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2,stroke:a.color,"stroke-width":5/360*Math.min(n.value.width,n.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&i<=u.value})},null,10,X))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:r.value.centerX,cy:r.value.centerY,r:r.value.radius*.8<=0?1e-4:r.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,j)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:1,x:r.value.centerX,y:r.value.centerY+g.value/3,"font-size":g.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(c.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,u.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(Number(u.value.toFixed(t.value.style.chart.layout.percentage.rounding)).toLocaleString())+"% ",9,H)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,L)):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(T.default,{key:3,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],12,G))}},Y=U._export_sfc(R,[["__scopeId","data-v-9e158d61"]]);exports.default=Y;