vue-data-ui 2.4.1 → 2.4.2

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 (201) hide show
  1. package/README.md +44 -44
  2. package/dist/{Arrow-DpMf3yPs.cjs → Arrow-DLTRnzcG.cjs} +1 -1
  3. package/dist/{Arrow-BIs_9yK8.js → Arrow-JuK2z9IB.js} +1 -1
  4. package/dist/BaseIcon-BGExhz6v.cjs +1 -0
  5. package/dist/{BaseIcon-CXDdkPfN.js → BaseIcon-rRli6Sfv.js} +7 -4
  6. package/dist/{DataTable-BTgMVOwp.cjs → DataTable-DJzhv96s.cjs} +1 -1
  7. package/dist/{DataTable-DL2agEJ3.js → DataTable-DTk7C4Pr.js} +2 -2
  8. package/dist/{Legend-DXLiSLHd.js → Legend-CYF2gpXG.js} +1 -1
  9. package/dist/{Legend-Dj9KiaLv.cjs → Legend-YZ7Hz3o1.cjs} +1 -1
  10. package/dist/{PackageVersion-DtnhR89q.js → PackageVersion-CvCRsT5_.js} +1 -1
  11. package/dist/{PackageVersion-D4D0WicU.cjs → PackageVersion-DVZtsuy4.cjs} +1 -1
  12. package/dist/PenAndPaper-CyXm-yVL.cjs +1 -0
  13. package/dist/PenAndPaper-Jb0pLt3G.js +269 -0
  14. package/dist/{Shape-CO_Ak9Zm.js → Shape-BpPn4eWR.js} +1 -1
  15. package/dist/{Shape-7EC2UKDK.cjs → Shape-X2F-QV_B.cjs} +1 -1
  16. package/dist/{Slicer-CLAVjSQP.cjs → Slicer-CL0tP5a5.cjs} +1 -1
  17. package/dist/{Slicer-BZfUZr1J.js → Slicer-CU7dRZR0.js} +2 -2
  18. package/dist/{Title-DYNLqCCT.js → Title-5VmBwT4i.js} +1 -1
  19. package/dist/{Title-C-lm3Mkl.cjs → Title-Co5jI5ed.cjs} +1 -1
  20. package/dist/{Tooltip-t-3mVhcz.cjs → Tooltip-Bl6W8Zn7.cjs} +1 -1
  21. package/dist/{Tooltip-CICAYyQj.js → Tooltip-Cj4EF7v1.js} +1 -1
  22. package/dist/{index-DDXisDKy.js → index-DnVHQ2xI.js} +880 -842
  23. package/dist/index-FfZRtJ6A.cjs +9 -0
  24. package/dist/style.css +1 -1
  25. package/dist/types/vue-data-ui.d.cts +18 -16
  26. package/dist/types/vue-data-ui.d.ts +18 -16
  27. package/dist/{useNestedProp-S1UXxUgm.js → useNestedProp-Cox0K0Y5.js} +1 -1
  28. package/dist/{useNestedProp-CC9zGr7C.cjs → useNestedProp-q7byAAIJ.cjs} +1 -1
  29. package/dist/usePrinter-BCAFeO_J.cjs +1 -0
  30. package/dist/{usePrinter-8ofTb2MJ.js → usePrinter-BEeNAqS5.js} +230 -185
  31. package/dist/vue-data-ui-CRLLZpt0.cjs +9 -0
  32. package/dist/vue-data-ui-W7nnqn0v.js +261 -0
  33. package/dist/vue-data-ui.cjs +1 -1
  34. package/dist/vue-data-ui.js +1 -1
  35. package/dist/{vue-ui-3d-bar-DcF1nyGW.js → vue-ui-3d-bar-BwBrUabe.js} +414 -390
  36. package/dist/vue-ui-3d-bar-bD_n6qL_.cjs +19 -0
  37. package/dist/{vue-ui-accordion-D_1fE5EF.js → vue-ui-accordion-DspS4q3f.js} +3 -3
  38. package/dist/{vue-ui-accordion-Cc9958th.cjs → vue-ui-accordion-xXgqfR2l.cjs} +1 -1
  39. package/dist/vue-ui-age-pyramid-BZcAwcVQ.cjs +1 -0
  40. package/dist/{vue-ui-age-pyramid-Oe_yHDL0.js → vue-ui-age-pyramid-CxBvm3uM.js} +218 -194
  41. package/dist/{vue-ui-annotator-Dix6_Gm6.js → vue-ui-annotator-BOofWpzv.js} +1 -1
  42. package/dist/{vue-ui-annotator-Dbp6cWMr.cjs → vue-ui-annotator-C6T5_7ZV.cjs} +1 -1
  43. package/dist/vue-ui-bullet-ChaEgXvR.cjs +23 -0
  44. package/dist/vue-ui-bullet-DraC-oFu.js +433 -0
  45. package/dist/vue-ui-candlestick--hPCfMFH.cjs +2 -0
  46. package/dist/{vue-ui-candlestick-CRwzWF6j.js → vue-ui-candlestick-DQZ5eT1f.js} +267 -243
  47. package/dist/{vue-ui-carousel-table-C0GDDSW9.cjs → vue-ui-carousel-table-DpRQklDZ.cjs} +1 -1
  48. package/dist/{vue-ui-carousel-table-BHeEbRKY.js → vue-ui-carousel-table-PdLjpH1p.js} +4 -4
  49. package/dist/{vue-ui-chestnut-CRk0RCB9.js → vue-ui-chestnut-ByI_O5hB.js} +293 -269
  50. package/dist/vue-ui-chestnut-ae6x87wl.cjs +6 -0
  51. package/dist/{vue-ui-cursor-y0kdr0uA.js → vue-ui-cursor-BM74l93B.js} +2 -2
  52. package/dist/{vue-ui-cursor-lU1rts1B.cjs → vue-ui-cursor-BvadpA2m.cjs} +1 -1
  53. package/dist/{vue-ui-dashboard-OyihaKdu.js → vue-ui-dashboard-CoANBhAM.js} +2 -2
  54. package/dist/{vue-ui-dashboard-BfC0jS-X.cjs → vue-ui-dashboard-OP51Gs8I.cjs} +1 -1
  55. package/dist/{vue-ui-digits-BJfcAiq_.cjs → vue-ui-digits-C7jJJg9k.cjs} +1 -1
  56. package/dist/{vue-ui-digits-IKt4qT2-.js → vue-ui-digits-DioaBnkB.js} +2 -2
  57. package/dist/vue-ui-donut-CplNylps.cjs +1 -0
  58. package/dist/vue-ui-donut-evolution-CQpr-6IS.cjs +1 -0
  59. package/dist/{vue-ui-donut-evolution-Dd4o37RP.js → vue-ui-donut-evolution-DAb1xzNd.js} +330 -306
  60. package/dist/{vue-ui-donut-DFaGk4fI.js → vue-ui-donut-ldqSm_JV.js} +345 -321
  61. package/dist/{vue-ui-dumbbell-B7j1_JoQ.js → vue-ui-dumbbell-Dg7PkiKJ.js} +265 -241
  62. package/dist/vue-ui-dumbbell-_ijaYr8W.cjs +9 -0
  63. package/dist/vue-ui-flow-BPt35d5K.cjs +1 -0
  64. package/dist/vue-ui-flow-DKT7ZEnr.js +508 -0
  65. package/dist/vue-ui-galaxy-e06PkTmp.cjs +1 -0
  66. package/dist/{vue-ui-galaxy-CH1BDtWl.js → vue-ui-galaxy-qAA9be3S.js} +193 -169
  67. package/dist/vue-ui-gauge-D8yVTIgP.js +518 -0
  68. package/dist/vue-ui-gauge-DiZVIU0D.cjs +1 -0
  69. package/dist/{vue-ui-gizmo-CKQcbe_7.js → vue-ui-gizmo-DC0uUwI3.js} +3 -3
  70. package/dist/{vue-ui-gizmo-DVwQaEH1.cjs → vue-ui-gizmo-W6bTkg59.cjs} +1 -1
  71. package/dist/vue-ui-heatmap-CbZcv_2I.cjs +1 -0
  72. package/dist/{vue-ui-heatmap-B-zWMk0Y.js → vue-ui-heatmap-u1raIzBQ.js} +252 -228
  73. package/dist/{vue-ui-kpi-CghbfSdM.js → vue-ui-kpi-C-iTxMD2.js} +3 -3
  74. package/dist/{vue-ui-kpi-CuY3xlVq.cjs → vue-ui-kpi-DY_2WF7U.cjs} +1 -1
  75. package/dist/{vue-ui-mini-loader-CH_PfeDc.cjs → vue-ui-mini-loader-Bfq2MNWu.cjs} +1 -1
  76. package/dist/{vue-ui-mini-loader-C7roqZ4p.js → vue-ui-mini-loader-C7x7S0hi.js} +2 -2
  77. package/dist/vue-ui-molecule-BFnOIxxs.js +798 -0
  78. package/dist/vue-ui-molecule-CbKMLrDT.cjs +1 -0
  79. package/dist/vue-ui-mood-radar-6LmFXuiw.cjs +1 -0
  80. package/dist/{vue-ui-mood-radar-DSznHxLS.js → vue-ui-mood-radar-CR1v5v2x.js} +263 -239
  81. package/dist/{vue-ui-nested-donuts-CiE4DdEQ.js → vue-ui-nested-donuts-DEiloQzq.js} +342 -318
  82. package/dist/vue-ui-nested-donuts-DS0fjiLi.cjs +17 -0
  83. package/dist/vue-ui-onion-CLvvu4Ku.cjs +5 -0
  84. package/dist/{vue-ui-onion-D9o6Rcgu.js → vue-ui-onion-LsEhBe4x.js} +226 -202
  85. package/dist/vue-ui-parallel-coordinate-plot-BWg8OFqH.cjs +8 -0
  86. package/dist/{vue-ui-parallel-coordinate-plot-BcYrYXhG.js → vue-ui-parallel-coordinate-plot-CTlIjJqG.js} +243 -219
  87. package/dist/{vue-ui-quadrant-Cs3A77us.js → vue-ui-quadrant-DKVVFufb.js} +350 -326
  88. package/dist/vue-ui-quadrant-OM5J1mG3.cjs +1 -0
  89. package/dist/{vue-ui-quick-chart-CiiSUexi.js → vue-ui-quick-chart-8vJikiGH.js} +505 -481
  90. package/dist/vue-ui-quick-chart-gG5Ar8-i.cjs +15 -0
  91. package/dist/{vue-ui-radar-CNSpiNrM.js → vue-ui-radar-20QhOUer.js} +255 -231
  92. package/dist/vue-ui-radar-CAaHjDO7.cjs +1 -0
  93. package/dist/{vue-ui-rating-GoUNDOdZ.cjs → vue-ui-rating-Bbzm5nUK.cjs} +1 -1
  94. package/dist/{vue-ui-rating-b_iYZWF8.js → vue-ui-rating-DRWJsve1.js} +2 -2
  95. package/dist/vue-ui-relation-circle-BoGAFXuS.cjs +1 -0
  96. package/dist/vue-ui-relation-circle-I45_Sk5l.js +349 -0
  97. package/dist/vue-ui-rings-B9WQ7S5m.cjs +2 -0
  98. package/dist/vue-ui-rings-DG8GCi3y.js +593 -0
  99. package/dist/vue-ui-scatter-BZfg1YIN.cjs +1 -0
  100. package/dist/{vue-ui-scatter-CVuoW-cD.js → vue-ui-scatter-Hqu5-F2H.js} +369 -345
  101. package/dist/{vue-ui-screenshot-Co2o48d6.cjs → vue-ui-screenshot-D8nxd5RV.cjs} +1 -1
  102. package/dist/{vue-ui-screenshot-Csc0dQL9.js → vue-ui-screenshot-cjiqbtLK.js} +1 -1
  103. package/dist/{vue-ui-skeleton-CGV1dEUD.cjs → vue-ui-skeleton-Djv08J67.cjs} +1 -1
  104. package/dist/{vue-ui-skeleton-B2sRnIXX.js → vue-ui-skeleton-aZmkNzAe.js} +3 -3
  105. package/dist/{vue-ui-smiley-Ci3uMgVh.cjs → vue-ui-smiley-B1TA19Hv.cjs} +1 -1
  106. package/dist/{vue-ui-smiley-D4s-AdIE.js → vue-ui-smiley-ChNvxygm.js} +2 -2
  107. package/dist/{vue-ui-spark-trend-BfoEoJEy.cjs → vue-ui-spark-trend-BqrPr63O.cjs} +1 -1
  108. package/dist/{vue-ui-spark-trend-CHKQGMLs.js → vue-ui-spark-trend-CQxELQcf.js} +5 -5
  109. package/dist/{vue-ui-sparkbar-Bb1fq2GR.js → vue-ui-sparkbar-0ixbKZzf.js} +4 -4
  110. package/dist/{vue-ui-sparkbar-DB2DeXti.cjs → vue-ui-sparkbar-CrTEPTU5.cjs} +1 -1
  111. package/dist/{vue-ui-sparkgauge-CJepIY2u.cjs → vue-ui-sparkgauge-BYxpe_WV.cjs} +1 -1
  112. package/dist/{vue-ui-sparkgauge-DWuaAQbo.js → vue-ui-sparkgauge-pdYb7OwH.js} +4 -4
  113. package/dist/{vue-ui-sparkhistogram-B7B36LLT.cjs → vue-ui-sparkhistogram-D21XDUH2.cjs} +1 -1
  114. package/dist/{vue-ui-sparkhistogram-CjeJ3ch1.js → vue-ui-sparkhistogram-N69h2q0U.js} +5 -5
  115. package/dist/{vue-ui-sparkline-DGJDBArr.js → vue-ui-sparkline-2BKYZMOb.js} +4 -4
  116. package/dist/{vue-ui-sparkline-BcqmwDAb.cjs → vue-ui-sparkline-Cf4m-Fxo.cjs} +1 -1
  117. package/dist/{vue-ui-sparkstackbar-DT3aKNeV.cjs → vue-ui-sparkstackbar-dAS8XoJs.cjs} +1 -1
  118. package/dist/{vue-ui-sparkstackbar-B3ul3qUZ.js → vue-ui-sparkstackbar-sh03cuOU.js} +4 -4
  119. package/dist/vue-ui-stackbar-B1si-1RM.js +938 -0
  120. package/dist/vue-ui-stackbar-Dy_saeSe.cjs +6 -0
  121. package/dist/{vue-ui-strip-plot-CIb2LSV8.js → vue-ui-strip-plot-BYn-QrTQ.js} +274 -250
  122. package/dist/vue-ui-strip-plot-D53LABpZ.cjs +1 -0
  123. package/dist/{vue-ui-table-B_sFrAO9.cjs → vue-ui-table-Ce4waJaj.cjs} +1 -1
  124. package/dist/{vue-ui-table-CmVi0nv2.js → vue-ui-table-DQORPCDJ.js} +1 -1
  125. package/dist/{vue-ui-table-heatmap-CgFr38QT.js → vue-ui-table-heatmap-Csp7Tx8N.js} +4 -4
  126. package/dist/{vue-ui-table-heatmap-Chvdf2Gi.cjs → vue-ui-table-heatmap-EqHt-O7Y.cjs} +1 -1
  127. package/dist/{vue-ui-table-sparkline-DUUYQ5dH.cjs → vue-ui-table-sparkline-DONmVOMh.cjs} +1 -1
  128. package/dist/{vue-ui-table-sparkline-eg2Qd8ws.js → vue-ui-table-sparkline-DdwVrfUj.js} +5 -5
  129. package/dist/vue-ui-thermometer-I6ZnlfAv.js +440 -0
  130. package/dist/vue-ui-thermometer-hQBkMa7u.cjs +1 -0
  131. package/dist/{vue-ui-timer-DM1IStj1.cjs → vue-ui-timer-COOXcn14.cjs} +1 -1
  132. package/dist/{vue-ui-timer-COSI3Q5T.js → vue-ui-timer-pi1SazTU.js} +5 -5
  133. package/dist/vue-ui-tiremarks-hdNqoGyd.cjs +1 -0
  134. package/dist/vue-ui-tiremarks-vdPQYiDp.js +303 -0
  135. package/dist/vue-ui-treemap-3FNUlKxL.js +816 -0
  136. package/dist/vue-ui-treemap-Cv0TSFQa.cjs +1 -0
  137. package/dist/vue-ui-vertical-bar-C--Ma0Dw.cjs +4 -0
  138. package/dist/{vue-ui-vertical-bar-CieqHVD5.js → vue-ui-vertical-bar-DwxpB46q.js} +312 -288
  139. package/dist/vue-ui-waffle-CKM0QyJN.cjs +1 -0
  140. package/dist/vue-ui-waffle-XecHJIc-.js +782 -0
  141. package/dist/vue-ui-wheel-Bbih5sSL.js +282 -0
  142. package/dist/vue-ui-wheel-C0dJrzOJ.cjs +1 -0
  143. package/dist/vue-ui-word-cloud-Cfd2wxsT.cjs +1 -0
  144. package/dist/vue-ui-word-cloud-DnhXUn5x.js +598 -0
  145. package/dist/vue-ui-xy-BDpqVzAq.cjs +3 -0
  146. package/dist/{vue-ui-xy-x8KEsGV-.js → vue-ui-xy-CqlRuFMc.js} +775 -751
  147. package/dist/{vue-ui-xy-canvas-BYdTxzi6.js → vue-ui-xy-canvas-C8c2X5fk.js} +409 -385
  148. package/dist/vue-ui-xy-canvas-Cansjd3L.cjs +9 -0
  149. package/package.json +1 -1
  150. package/dist/BaseIcon-E7FmzMcY.cjs +0 -1
  151. package/dist/index-C7_6YjWN.cjs +0 -9
  152. package/dist/usePrinter-8EP4iaGm.cjs +0 -1
  153. package/dist/vue-data-ui-4Yd255Ia.cjs +0 -9
  154. package/dist/vue-data-ui-Cp7bO_tj.js +0 -258
  155. package/dist/vue-ui-3d-bar-BeR2aBgQ.cjs +0 -19
  156. package/dist/vue-ui-age-pyramid-R-C4P4mI.cjs +0 -1
  157. package/dist/vue-ui-bullet-CQKaC4wG.js +0 -409
  158. package/dist/vue-ui-bullet-DSZox236.cjs +0 -23
  159. package/dist/vue-ui-candlestick-Dilozp3V.cjs +0 -2
  160. package/dist/vue-ui-chestnut-DdEcEI04.cjs +0 -6
  161. package/dist/vue-ui-donut-DTSVlGMg.cjs +0 -1
  162. package/dist/vue-ui-donut-evolution-BuUafabD.cjs +0 -1
  163. package/dist/vue-ui-dumbbell-CVfgnyKi.cjs +0 -9
  164. package/dist/vue-ui-flow-C45dODaB.cjs +0 -1
  165. package/dist/vue-ui-flow-DkPTzNv9.js +0 -484
  166. package/dist/vue-ui-galaxy-DlPavMK0.cjs +0 -1
  167. package/dist/vue-ui-gauge-BXiy515T.js +0 -494
  168. package/dist/vue-ui-gauge-vMFUYHYH.cjs +0 -1
  169. package/dist/vue-ui-heatmap-CMQqQnxc.cjs +0 -1
  170. package/dist/vue-ui-molecule-BwmkMEVN.js +0 -774
  171. package/dist/vue-ui-molecule-nOuD0hR5.cjs +0 -1
  172. package/dist/vue-ui-mood-radar-Bof_C9Ae.cjs +0 -1
  173. package/dist/vue-ui-nested-donuts-DIb6YyWv.cjs +0 -17
  174. package/dist/vue-ui-onion-N3tRNc4u.cjs +0 -5
  175. package/dist/vue-ui-parallel-coordinate-plot-qKGk2bX6.cjs +0 -8
  176. package/dist/vue-ui-quadrant-Do48rGrX.cjs +0 -1
  177. package/dist/vue-ui-quick-chart-BxU4d-sJ.cjs +0 -15
  178. package/dist/vue-ui-radar-CooAvwPA.cjs +0 -1
  179. package/dist/vue-ui-relation-circle-nRf1pvD0.js +0 -325
  180. package/dist/vue-ui-relation-circle-uNgJni4x.cjs +0 -1
  181. package/dist/vue-ui-rings-BgRc1o4_.js +0 -569
  182. package/dist/vue-ui-rings-iIgQI9Ws.cjs +0 -2
  183. package/dist/vue-ui-scatter-CkrpmLxP.cjs +0 -1
  184. package/dist/vue-ui-stackbar-CRcUugkl.cjs +0 -6
  185. package/dist/vue-ui-stackbar-DNROvZII.js +0 -915
  186. package/dist/vue-ui-strip-plot-Ck9Fmt_b.cjs +0 -1
  187. package/dist/vue-ui-thermometer-BFfN4aat.cjs +0 -1
  188. package/dist/vue-ui-thermometer-BePmFiwy.js +0 -416
  189. package/dist/vue-ui-tiremarks-BkYXzU3R.cjs +0 -1
  190. package/dist/vue-ui-tiremarks-d6TmSHY7.js +0 -279
  191. package/dist/vue-ui-treemap-BgeZnbl3.cjs +0 -1
  192. package/dist/vue-ui-treemap-Qg0858o6.js +0 -792
  193. package/dist/vue-ui-vertical-bar-D3atbdvl.cjs +0 -4
  194. package/dist/vue-ui-waffle-CD7C9Lu4.cjs +0 -1
  195. package/dist/vue-ui-waffle-CjNhM-mV.js +0 -758
  196. package/dist/vue-ui-wheel-B8mbO6ht.js +0 -258
  197. package/dist/vue-ui-wheel-CYmM7J61.cjs +0 -1
  198. package/dist/vue-ui-word-cloud-DMXrUmX5.js +0 -574
  199. package/dist/vue-ui-word-cloud-Dm9yZ1zQ.cjs +0 -1
  200. package/dist/vue-ui-xy-DoWnidom.cjs +0 -3
  201. package/dist/vue-ui-xy-canvas-DHs5sb3t.cjs +0 -9
@@ -0,0 +1,282 @@
1
+ import { computed as k, ref as n, watch as B, onMounted as te, onBeforeUnmount as ae, openBlock as s, createElementBlock as h, normalizeStyle as G, createBlock as w, createCommentVNode as d, unref as r, createSlots as le, withCtx as b, renderSlot as f, normalizeProps as I, guardReactiveProps as P, normalizeClass as E, createVNode as oe, Fragment as ne, renderList as se, toDisplayString as re } from "vue";
2
+ import { u as ue, c as ie, t as ce, o as ve, e as he, w as R, X as de, i as fe, v as j, f as ye } from "./index-DnVHQ2xI.js";
3
+ import { _ as me } from "./Title-5VmBwT4i.js";
4
+ import { u as pe, U as ge } from "./usePrinter-BEeNAqS5.js";
5
+ import { t as ke, u as we } from "./useResponsive-NZB-WLRF.js";
6
+ import be from "./vue-ui-skeleton-aZmkNzAe.js";
7
+ import { u as D } from "./useNestedProp-Cox0K0Y5.js";
8
+ import { _ as Ce } from "./PackageVersion-CvCRsT5_.js";
9
+ import { P as _e } from "./PenAndPaper-Jb0pLt3G.js";
10
+ import { _ as xe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
+ const Ae = ["id"], Ie = ["xmlns", "viewBox"], Pe = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-linecap"], $e = ["cx", "cy", "r", "stroke", "stroke-width"], Fe = ["x", "y", "font-size", "fill", "font-weight"], Oe = {
12
+ key: 4,
13
+ class: "vue-data-ui-watermark"
14
+ }, ze = {
15
+ __name: "vue-ui-wheel",
16
+ props: {
17
+ config: {
18
+ type: Object,
19
+ default() {
20
+ return {};
21
+ }
22
+ },
23
+ dataset: {
24
+ type: Object,
25
+ default() {
26
+ return {};
27
+ }
28
+ }
29
+ },
30
+ setup(Y, { expose: H }) {
31
+ const c = Y, { vue_ui_wheel: W } = ue(), C = k(() => !!c.dataset && Object.keys(c.dataset).length), _ = n(ie()), q = n(null), $ = n(0), y = n(null), F = n(null), O = n(0), e = k({
32
+ get: () => z(),
33
+ set: (t) => t
34
+ });
35
+ function z() {
36
+ const t = D({
37
+ userConfig: c.config,
38
+ defaultConfig: W
39
+ });
40
+ return t.theme ? {
41
+ ...D({
42
+ userConfig: ce.vue_ui_wheel[t.theme] || c.config,
43
+ defaultConfig: t
44
+ })
45
+ } : t;
46
+ }
47
+ B(() => c.config, (t) => {
48
+ e.value = z(), U(), O.value += 1;
49
+ }, { deep: !0 });
50
+ const { isPrinting: S, isImaging: M, generatePdf: N, generateImage: L } = pe({
51
+ elementId: _.value,
52
+ fileName: e.value.style.chart.title.text || "vue-ui-wheel"
53
+ }), l = n({
54
+ size: 360,
55
+ height: 360,
56
+ width: 360
57
+ }), x = n(e.value.style.chart.layout.percentage.fontSize), i = k(() => ({
58
+ radius: Math.min(l.value.width, l.value.height) * 0.9 / 2,
59
+ centerX: l.value.width / 2,
60
+ centerY: l.value.height / 2
61
+ }));
62
+ function T(t, v = 1) {
63
+ return {
64
+ x: i.value.centerX + i.value.radius * Math.cos(29.85 + t * Math.PI / 180) * v,
65
+ y: i.value.centerY + i.value.radius * Math.sin(29.85 + t * Math.PI / 180) * v
66
+ };
67
+ }
68
+ const o = n(e.value.style.chart.animation.use ? 0 : c.dataset.percentage || 0);
69
+ B(() => c.dataset, (t) => {
70
+ e.value.style.chart.animation.use ? X(t.percentage) : o.value = t.percentage || 0;
71
+ }, { deep: !0 });
72
+ const m = n(null);
73
+ te(() => {
74
+ U();
75
+ });
76
+ function U() {
77
+ if (ve(c.dataset) && he({
78
+ componentName: "VueUiWheel",
79
+ type: "dataset"
80
+ }), X(c.dataset.percentage || 0), e.value.responsive) {
81
+ const t = ke(() => {
82
+ const { width: v, height: a } = we({
83
+ chart: y.value,
84
+ title: e.value.style.chart.title.text ? F.value : null
85
+ });
86
+ l.value.width = v, l.value.height = a, x.value = e.value.style.chart.layout.percentage.fontSize / 360 * Math.min(v, a);
87
+ });
88
+ m.value = new ResizeObserver(t), m.value.observe(y.value.parentNode);
89
+ }
90
+ }
91
+ ae(() => {
92
+ m.value && m.value.disconnect();
93
+ });
94
+ function X(t) {
95
+ let v = e.value.style.chart.animation.speed;
96
+ const a = Math.abs(t - o.value) / (v * 120);
97
+ function u() {
98
+ o.value < t ? o.value = Math.min(o.value + a, t) : o.value > t && (o.value = Math.max(o.value - a, t)), o.value !== t && requestAnimationFrame(u);
99
+ }
100
+ u();
101
+ }
102
+ const J = k(() => {
103
+ const t = [];
104
+ for (let a = 0; a < 100; a += 1) {
105
+ const u = o.value > a ? e.value.style.chart.layout.wheel.ticks.activeColor : e.value.style.chart.layout.wheel.ticks.inactiveColor, { x: Q, y: Z } = T(l.value.size / 100 * a), { x: V, y: ee } = T(l.value.size / 100 * a, e.value.style.chart.layout.wheel.ticks.sizeRatio);
106
+ t.push({
107
+ x1: Q,
108
+ y1: Z,
109
+ x2: V,
110
+ y2: ee,
111
+ color: e.value.style.chart.layout.wheel.ticks.gradient.show ? R(u, a / 100 * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : u
112
+ });
113
+ }
114
+ return t;
115
+ }), p = n(!1);
116
+ function K(t) {
117
+ p.value = t, $.value += 1;
118
+ }
119
+ const g = n(!1);
120
+ function A() {
121
+ g.value = !g.value;
122
+ }
123
+ return H({
124
+ generatePdf: N,
125
+ generateImage: L,
126
+ toggleAnnotator: A
127
+ }), (t, v) => (s(), h("div", {
128
+ class: "vue-ui-wheel",
129
+ ref_key: "wheelChart",
130
+ ref: y,
131
+ id: _.value,
132
+ style: G(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`)
133
+ }, [
134
+ e.value.userOptions.buttons.annotator ? (s(), w(_e, {
135
+ key: 0,
136
+ parent: y.value,
137
+ backgroundColor: e.value.style.chart.backgroundColor,
138
+ color: e.value.style.chart.color,
139
+ active: g.value,
140
+ onClose: A
141
+ }, null, 8, ["parent", "backgroundColor", "color", "active"])) : d("", !0),
142
+ e.value.style.chart.title.text ? (s(), h("div", {
143
+ key: 1,
144
+ ref_key: "chartTitle",
145
+ ref: F,
146
+ style: "width:100%;background:transparent;padding-bottom:12px"
147
+ }, [
148
+ (s(), w(me, {
149
+ key: `title_${O.value}`,
150
+ config: {
151
+ title: {
152
+ cy: "wheel-title",
153
+ ...e.value.style.chart.title
154
+ },
155
+ subtitle: {
156
+ cy: "wheel-subtitle",
157
+ ...e.value.style.chart.title.subtitle
158
+ }
159
+ }
160
+ }, null, 8, ["config"]))
161
+ ], 512)) : d("", !0),
162
+ e.value.userOptions.show && C.value ? (s(), w(ge, {
163
+ ref_key: "details",
164
+ ref: q,
165
+ key: `user_options_${$.value}`,
166
+ backgroundColor: e.value.style.chart.backgroundColor,
167
+ color: e.value.style.chart.color,
168
+ isPrinting: r(S),
169
+ isImaging: r(M),
170
+ uid: _.value,
171
+ hasPdf: e.value.userOptions.buttons.pdf,
172
+ hasImg: e.value.userOptions.buttons.img,
173
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
174
+ hasXls: !1,
175
+ isFullscreen: p.value,
176
+ position: e.value.userOptions.position,
177
+ titles: { ...e.value.userOptions.buttonTitles },
178
+ hasAnnotator: e.value.userOptions.buttons.annotator,
179
+ isAnnotation: g.value,
180
+ chartElement: y.value,
181
+ onToggleFullscreen: K,
182
+ onGeneratePdf: r(N),
183
+ onGenerateImage: r(L),
184
+ onToggleAnnotator: A
185
+ }, le({ _: 2 }, [
186
+ t.$slots.optionPdf ? {
187
+ name: "optionPdf",
188
+ fn: b(() => [
189
+ f(t.$slots, "optionPdf", {}, void 0, !0)
190
+ ]),
191
+ key: "0"
192
+ } : void 0,
193
+ t.$slots.optionImg ? {
194
+ name: "optionImg",
195
+ fn: b(() => [
196
+ f(t.$slots, "optionImg", {}, void 0, !0)
197
+ ]),
198
+ key: "1"
199
+ } : void 0,
200
+ t.$slots.optionFullscreen ? {
201
+ name: "optionFullscreen",
202
+ fn: b(({ toggleFullscreen: a, isFullscreen: u }) => [
203
+ f(t.$slots, "optionFullscreen", I(P({ toggleFullscreen: a, isFullscreen: u })), void 0, !0)
204
+ ]),
205
+ key: "2"
206
+ } : void 0,
207
+ t.$slots.optionAnnotator ? {
208
+ name: "optionAnnotator",
209
+ fn: b(({ toggleAnnotator: a, isAnnotator: u }) => [
210
+ f(t.$slots, "optionAnnotator", I(P({ toggleAnnotator: a, isAnnotator: u })), void 0, !0)
211
+ ]),
212
+ key: "3"
213
+ } : void 0
214
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "position", "titles", "hasAnnotator", "isAnnotation", "chartElement", "onGeneratePdf", "onGenerateImage"])) : d("", !0),
215
+ C.value ? (s(), h("svg", {
216
+ key: 3,
217
+ xmlns: r(de),
218
+ class: E({ "vue-data-ui-fullscreen--on": p.value, "vue-data-ui-fulscreen--off": !p.value }),
219
+ viewBox: `0 0 ${l.value.width <= 0 ? 10 : l.value.width} ${l.value.height <= 0 ? 10 : l.value.height}`,
220
+ style: G(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
221
+ }, [
222
+ oe(Ce),
223
+ (s(!0), h(ne, null, se(J.value, (a, u) => (s(), h("line", {
224
+ x1: a.x1,
225
+ x2: a.x2,
226
+ y1: a.y1,
227
+ y2: a.y2,
228
+ stroke: a.color,
229
+ "stroke-width": 5 / 360 * Math.min(l.value.width, l.value.height),
230
+ "stroke-linecap": e.value.style.chart.layout.wheel.ticks.rounded ? "round" : "butt",
231
+ class: E({ "vue-ui-tick-animated": e.value.style.chart.animation.use && u <= o.value })
232
+ }, null, 10, Pe))), 256)),
233
+ e.value.style.chart.layout.innerCircle.show ? (s(), h("circle", {
234
+ key: 0,
235
+ cx: i.value.centerX,
236
+ cy: i.value.centerY,
237
+ r: i.value.radius * 0.8 <= 0 ? 1e-4 : i.value.radius * 0.8,
238
+ stroke: e.value.style.chart.layout.innerCircle.stroke,
239
+ "stroke-width": e.value.style.chart.layout.innerCircle.strokeWidth,
240
+ fill: "none"
241
+ }, null, 8, $e)) : d("", !0),
242
+ e.value.style.chart.layout.percentage.show ? (s(), h("text", {
243
+ key: 1,
244
+ x: i.value.centerX,
245
+ y: i.value.centerY + x.value / 3,
246
+ "font-size": x.value,
247
+ fill: e.value.style.chart.layout.wheel.ticks.gradient.show ? r(R)(e.value.style.chart.layout.wheel.ticks.activeColor, o.value / 100 * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.wheel.ticks.activeColor,
248
+ "text-anchor": "middle",
249
+ "font-weight": e.value.style.chart.layout.percentage.bold ? "bold" : "normal",
250
+ style: { "font-variant-numeric": "tabluar-nums" }
251
+ }, re(r(fe)(
252
+ e.value.style.chart.layout.percentage.formatter,
253
+ r(j)(o.value),
254
+ r(ye)({
255
+ v: r(j)(o.value),
256
+ s: "%",
257
+ r: e.value.style.chart.layout.percentage.rounding
258
+ })
259
+ )), 9, Fe)) : d("", !0),
260
+ f(t.$slots, "svg", { svg: l.value }, void 0, !0)
261
+ ], 14, Ie)) : d("", !0),
262
+ t.$slots.watermark ? (s(), h("div", Oe, [
263
+ f(t.$slots, "watermark", I(P({ isPrinting: r(S) || r(M) })), void 0, !0)
264
+ ])) : d("", !0),
265
+ C.value ? d("", !0) : (s(), w(be, {
266
+ key: 5,
267
+ config: {
268
+ type: "wheel",
269
+ style: {
270
+ backgroundColor: e.value.style.chart.backgroundColor,
271
+ wheel: {
272
+ color: "#CCCCCC"
273
+ }
274
+ }
275
+ }
276
+ }, null, 8, ["config"]))
277
+ ], 12, Ae));
278
+ }
279
+ }, Re = /* @__PURE__ */ xe(ze, [["__scopeId", "data-v-98d0ddd9"]]);
280
+ export {
281
+ Re as default
282
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-FfZRtJ6A.cjs"),G=require("./Title-Co5jI5ed.cjs"),I=require("./usePrinter-BCAFeO_J.cjs"),z=require("./useResponsive-B3TrDDIG.cjs"),X=require("./vue-ui-skeleton-Djv08J67.cjs"),$=require("./useNestedProp-q7byAAIJ.cjs"),j=require("./PackageVersion-DVZtsuy4.cjs"),H=require("./PenAndPaper-CyXm-yVL.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Y=["id"],W=["xmlns","viewBox"],J=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],K=["cx","cy","r","stroke","stroke-width"],Q=["x","y","font-size","fill","font-weight"],Z={key:4,class:"vue-data-ui-watermark"},ee={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(F,{expose:O}){const i=F,{vue_ui_wheel:M}=r.useConfig(),y=e.computed(()=>!!i.dataset&&Object.keys(i.dataset).length),p=e.ref(r.createUid()),E=e.ref(null),k=e.ref(0),v=e.ref(null),w=e.ref(null),C=e.ref(0),t=e.computed({get:()=>b(),set:n=>n});function b(){const n=$.useNestedProp({userConfig:i.config,defaultConfig:M});return n.theme?{...$.useNestedProp({userConfig:r.themes.vue_ui_wheel[n.theme]||i.config,defaultConfig:n})}:n}e.watch(()=>i.config,n=>{t.value=b(),A(),C.value+=1},{deep:!0});const{isPrinting:P,isImaging:_,generatePdf:B,generateImage:x}=I.usePrinter({elementId:p.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel"}),a=e.ref({size:360,height:360,width:360}),m=e.ref(t.value.style.chart.layout.percentage.fontSize),s=e.computed(()=>({radius:Math.min(a.value.width,a.value.height)*.9/2,centerX:a.value.width/2,centerY:a.value.height/2}));function N(n,c=1){return{x:s.value.centerX+s.value.radius*Math.cos(29.85+n*Math.PI/180)*c,y:s.value.centerY+s.value.radius*Math.sin(29.85+n*Math.PI/180)*c}}const o=e.ref(t.value.style.chart.animation.use?0:i.dataset.percentage||0);e.watch(()=>i.dataset,n=>{t.value.style.chart.animation.use?S(n.percentage):o.value=n.percentage||0},{deep:!0});const d=e.ref(null);e.onMounted(()=>{A()});function A(){if(r.objectIsEmpty(i.dataset)&&r.error({componentName:"VueUiWheel",type:"dataset"}),S(i.dataset.percentage||0),t.value.responsive){const n=z.throttle(()=>{const{width:c,height:l}=z.useResponsive({chart:v.value,title:t.value.style.chart.title.text?w.value:null});a.value.width=c,a.value.height=l,m.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(c,l)});d.value=new ResizeObserver(n),d.value.observe(v.value.parentNode)}}e.onBeforeUnmount(()=>{d.value&&d.value.disconnect()});function S(n){let c=t.value.style.chart.animation.speed;const l=Math.abs(n-o.value)/(c*120);function u(){o.value<n?o.value=Math.min(o.value+l,n):o.value>n&&(o.value=Math.max(o.value-l,n)),o.value!==n&&requestAnimationFrame(u)}u()}const q=e.computed(()=>{const n=[];for(let l=0;l<100;l+=1){const u=o.value>l?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:R,y:V}=N(a.value.size/100*l),{x:L,y:U}=N(a.value.size/100*l,t.value.style.chart.layout.wheel.ticks.sizeRatio);n.push({x1:R,y1:V,x2:L,y2:U,color:t.value.style.chart.layout.wheel.ticks.gradient.show?r.shiftHue(u,l/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):u})}return n}),h=e.ref(!1);function T(n){h.value=n,k.value+=1}const f=e.ref(!1);function g(){f.value=!f.value}return O({generatePdf:B,generateImage:x,toggleAnnotator:g}),(n,c)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:v,id:p.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.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(H.PenAndPaper,{key:0,parent:v.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:g},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:w,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(G._sfc_main,{key:`title_${C.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value?(e.openBlock(),e.createBlock(I.UserOptions,{ref_key:"details",ref:E,key:`user_options_${k.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(P),isImaging:e.unref(_),uid:p.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,chartElement:v.value,onToggleFullscreen:T,onGeneratePdf:e.unref(B),onGenerateImage:e.unref(x),onToggleAnnotator:g},e.createSlots({_:2},[n.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,n.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,n.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(n.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0,n.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:u})=>[e.renderSlot(n.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:u})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","position","titles","hasAnnotator","isAnnotation","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(j._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(l,u)=>(e.openBlock(),e.createElementBlock("line",{x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,stroke:l.color,"stroke-width":5/360*Math.min(a.value.width,a.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&&u<=o.value})},null,10,J))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:s.value.centerX,cy:s.value.centerY,r:s.value.radius*.8<=0?1e-4:s.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,K)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:1,x:s.value.centerX,y:s.value.centerY+m.value/3,"font-size":m.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(r.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,o.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(e.unref(r.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(r.checkNaN)(o.value),e.unref(r.dataLabel)({v:e.unref(r.checkNaN)(o.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,Q)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"svg",{svg:a.value},void 0,!0)],14,W)):e.createCommentVNode("",!0),n.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Z,[e.renderSlot(n.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(P)||e.unref(_)})),void 0,!0)])):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(X.default,{key:5,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],12,Y))}},te=D._export_sfc(ee,[["__scopeId","data-v-98d0ddd9"]]);exports.default=te;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-FfZRtJ6A.cjs"),Ce=require("./Title-Co5jI5ed.cjs"),le=require("./usePrinter-BCAFeO_J.cjs"),G=require("./useResponsive-B3TrDDIG.cjs"),ke=require("./vue-ui-accordion-xXgqfR2l.cjs"),we=require("./DataTable-DJzhv96s.cjs"),xe=require("./BaseIcon-BGExhz6v.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=require("./useNestedProp-q7byAAIJ.cjs"),Se=require("./PackageVersion-DVZtsuy4.cjs"),$e=require("./Tooltip-Bl6W8Zn7.cjs"),Te=require("./PenAndPaper-CyXm-yVL.cjs"),Ne=c=>(e.pushScopeId("data-v-3fd7d274"),c=c(),e.popScopeId(),c),Pe={"data-html2canvas-ignore":""},Be={key:0,class:"reset-wrapper"},Fe={key:1,class:"reset-wrapper"},ze={class:"mono-slicer"},_e=Ne(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),Ae=["min","max","value"],Ve={__name:"MonoSlicer",props:{min:{type:Number,default:0},max:{type:Number,default:0},inputColor:{type:String,default:"#1A1A1A"},background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},selectColor:{type:String,default:"#4A4A4A"},textColor:{type:String,default:"#1A1A1A"},useResetSlot:{type:Boolean,default:!1},value:{type:Number,default:0},source:{type:Number,default:0}},emits:["update:value","reset"],setup(c,{emit:P}){const r=c;e.useCssVars(g=>({"90ad3208":E.value,"4f9eef70":S.value,"6e07ae3e":f.value,"2fd430a0":c.selectColor,"6b8169a4":y.value}));const E=e.computed(()=>r.inputColor),y=e.computed(()=>r.background),f=e.computed(()=>`${r.selectColor}33`),S=e.computed(()=>r.borderColor);function $(){P("reset")}const h=e.computed(()=>{const g=r.max-r.min,p=0,b=(r.value-r.min)/g*100;return{left:`${p}%`,width:`${b-p}%`,background:r.selectColor}});return(g,p)=>(e.openBlock(),e.createElementBlock("div",Pe,[c.value!==c.source?(e.openBlock(),e.createElementBlock("div",Be,[c.useResetSlot?e.renderSlot(g.$slots,"reset-action",{key:1,reset:$},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:$},[e.createVNode(xe.default,{name:"refresh",stroke:c.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",Fe)),e.createElementVNode("div",ze,[_e,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(h.value)},null,4),e.createElementVNode("input",{type:"range",min:c.min,max:c.max,value:Number(c.value),onInput:p[0]||(p[0]=b=>P("update:value",Number(b.target.value)))},null,40,Ae)])]))}},Ee=ne._export_sfc(Ve,[["__scopeId","data-v-3fd7d274"]]),Ie=["id"],Oe=["xmlns","viewBox"],Me=["transform"],Re=["fill","font-weight","x","y","font-size","transform","onMouseover"],qe={key:4,class:"vue-data-ui-watermark"},We=["innerHTML"],De={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(c,{expose:P}){const r=c,{vue_ui_word_cloud:E}=s.useConfig(),y=e.computed({get(){return!!r.dataset&&r.dataset.length},set(o){return o}}),f=e.ref(typeof r.dataset=="string"?s.createWordCloudDatasetFromPlainText(r.dataset):r.dataset.map(o=>({...o,value:s.checkNaN(o.value)}))),S=e.ref(s.createUid()),$=e.ref(0),h=e.ref(null),g=e.ref(null),p=e.ref(0),b=e.ref(0),I=e.ref(!1),t=e.computed({get:()=>L(),set:o=>o});function L(){const o=ae.useNestedProp({userConfig:r.config,defaultConfig:E});return o.theme?{...ae.useNestedProp({userConfig:s.themes.vue_ui_word_cloud[o.theme]||r.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>r.config,o=>{t.value=L(),X(),p.value+=1,b.value+=1,O()},{deep:!0});const j=e.ref(null),C=e.ref(0),u=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),re=G.throttle(()=>{const{width:o,height:a}=G.useResponsive({chart:h.value,title:t.value.style.chart.title.text?g.value:null,slicer:t.value.style.chart.zoom.show&&j.value});u.value.width=o,u.value.height=a,e.nextTick(M)});e.watch(()=>C.value,()=>{se()});const se=G.debounce(()=>{M()},10);function O(){C.value=Q.value}const B=e.ref(null);e.onMounted(()=>{X(),O()});function X(){s.objectIsEmpty(r.dataset)?s.error({componentName:"VueUiWordCloud",type:"dataset"}):f.value.forEach((o,a)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{y.value=!1,s.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(B.value=new ResizeObserver(re),B.value.observe(h.value.parentNode))}e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:H,isImaging:Y,generatePdf:J,generateImage:K}=le.usePrinter({elementId:`wordCloud_${S.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),d=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function ue(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function ie(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function ce(o,a,l){const i=[],n={x:-a/2,y:-l/2,width:a,height:l},v=0,w=0;return o.forEach(x=>{let D=!1;for(let V=0;V<Math.max(a,l)/2&&!D;V+=t.value.style.chart.words.packingWeight)for(let U=0;U<360&&!D;U+=t.value.style.chart.words.packingWeight){const oe=U*Math.PI/180,me=v+V*Math.cos(oe)-x.width/2,fe=w+V*Math.sin(oe)-x.height/2,m={...x,x:me,y:fe},ge=m.x>=n.x&&m.y>=n.y&&m.x+m.width<=n.x+n.width&&m.y+m.height<=n.y+n.height,ye=i.some(be=>ie(m,be));ge&&!ye&&(i.push(m),D=!0)}}),i}const T=e.ref([]);e.watch(()=>r.dataset,M,{immediate:!0});const Q=e.computed(()=>Math.min(...f.value.map(o=>o.value))),de=e.computed(()=>Math.max(...f.value.map(o=>o.value)));function M(){const o=[...f.value].filter(n=>n.value>=C.value).map(n=>n.value),a=Math.max(...o),l=Math.min(...o),i=[...f.value].filter(n=>n.value>=C.value).map((n,v)=>{const w=(n.value-l)/(a-l)*(u.value.maxFontSize-u.value.minFontSize)+u.value.minFontSize,x=ue(n.name,w);return{...n,id:s.createUid(),fontSize:w,width:x.width,height:x.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[v]||t.value.customPalette[v%t.value.customPalette.length]||s.palette[v]||s.palette[v%s.palette.length]:t.value.style.chart.words.color}});T.value=ce(i,u.value.width,u.value.height).sort((n,v)=>v.fontSize-n.fontSize)}const F=e.computed(()=>{const o=T.value.map(l=>({name:l.name,color:l.color})),a=T.value.map(l=>l.value);return{head:o,body:a}});function Z(){e.nextTick(()=>{const o=F.value.head.map((i,n)=>[[i.name],[F.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const z=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=F.value.head.map((n,v)=>{const w=s.dataLabel({p:t.value.table.td.prefix,v:F.value.body[v],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},w]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}}),_=e.ref(!1);function ve(o){_.value=o,$.value+=1}function he(){return T.value}function ee(){d.value.showTable=!d.value.showTable}function te(){d.value.showTooltip=!d.value.showTooltip}const A=e.ref(!1);function R(){A.value=!A.value}P({getData:he,generateCsv:Z,generatePdf:J,generateImage:K,toggleTable:ee,toggleTooltip:te,toggleAnnotator:R});const k=e.ref(null),N=e.ref(!1),q=e.ref(""),W=e.ref(null);function pe(o){if(!d.value.showTooltip)return;k.value=o.id,W.value={datapoint:o,config:t.value};const a=t.value.style.chart.tooltip.customFormat;if(N.value=!1,s.isFunction(a))try{const l=a({datapoint:o,config:t.value});typeof l=="string"&&(q.value=l,N.value=!0)}catch{console.warn("Custom format cannot be applied."),N.value=!1}if(!N.value){let l=`<svg viewBox="0 0 10 10" height="${t.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${o.color}"/></svg><span>${o.name}:</span><b>${(o.value||0).toFixed(t.value.style.chart.tooltip.roundingValue)}</b>`;q.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}I.value=!0}return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:h,id:`wordCloud_${S.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Te.PenAndPaper,{key:0,parent:h.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:A.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:g,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${p.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value?(e.openBlock(),e.createBlock(le.UserOptions,{ref:"details",key:`user_option_${$.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(H),isImaging:e.unref(Y),uid:S.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:h.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:d.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:ve,onGeneratePdf:e.unref(J),onGenerateCsv:Z,onGenerateImage:e.unref(K),onToggleTable:ee,onToggleTooltip:te,onToggleAnnotator:R},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:3,class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:"overflow:visible;background:transparent;"},[e.createVNode(Se._sfc_main),e.createElementVNode("g",{transform:`translate(${(u.value.width<=0?10:u.value.width)/2}, ${(u.value.height<=0?10:u.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:i,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":k.value&&k.value===l.id&&d.value.showTooltip,"word-not-selected":k.value&&k.value!==l.id&&d.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"middle",onMouseover:n=>pe(l),onMouseleave:a[0]||(a[0]=n=>{k.value=null,I.value=!1}),style:e.normalizeStyle(`animation-delay:${i*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,Re))]))),256))],8,Me),e.renderSlot(o.$slots,"svg",{svg:{height:u.value.height,width:u.value.width}},void 0,!0)],10,Oe)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",qe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(H)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),e.createVNode($e._sfc_main,{show:d.value.showTooltip&&I.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,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,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:h.value,content:q.value,isCustom:N.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...W.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...W.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartSlicer",ref:j,style:"width:100%;background:transparent","data-html2canvas-ignore":""},[t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(Ee,{key:0,value:C.value,"onUpdate:value":a[1]||(a[1]=l=>C.value=l),min:Q.value,max:de.value,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:O},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","min","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],512),y.value?(e.openBlock(),e.createBlock(ke.default,{key:5,hideDetails:"",config:{open:d.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(we.DataTable,{key:`table_${b.value}`,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:a[2]||(a[2]=l=>d.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,We)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],12,Ie))}},Ue=ne._export_sfc(De,[["__scopeId","data-v-23646184"]]);exports.default=Ue;