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,518 @@
1
+ import { computed as g, ref as h, watch as ae, onMounted as _e, onBeforeUnmount as xe, openBlock as r, createElementBlock as i, normalizeClass as le, normalizeStyle as oe, createBlock as X, createCommentVNode as f, withCtx as z, toDisplayString as C, unref as c, createSlots as we, renderSlot as b, normalizeProps as E, guardReactiveProps as j, createVNode as Fe, createElementVNode as y, Fragment as D, renderList as U } from "vue";
2
+ import { u as Se, c as ze, t as Ce, a as $e, p as re, b as Me, o as se, d as Pe, e as A, g as ne, m as ue, X as Ie, s as B, H as N, i as Oe, f as Xe, E as ie } from "./index-DnVHQ2xI.js";
3
+ import { t as Ae, u as Ne } from "./useResponsive-NZB-WLRF.js";
4
+ import { u as Ye, U as Ge } from "./usePrinter-BEeNAqS5.js";
5
+ import Re from "./vue-ui-skeleton-aZmkNzAe.js";
6
+ import { _ as Ee } from "./Title-5VmBwT4i.js";
7
+ import { u as ce } from "./useNestedProp-Cox0K0Y5.js";
8
+ import { _ as je } from "./PackageVersion-CvCRsT5_.js";
9
+ import { P as De } from "./PenAndPaper-Jb0pLt3G.js";
10
+ import { _ as Ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
+ const Be = ["id"], Le = { key: 0 }, We = ["xmlns", "viewBox"], Te = ["id"], Ve = ["stop-color"], qe = ["stop-color"], He = ["stop-color"], Ze = ["id"], Je = ["stdDeviation"], Ke = ["d", "fill", "stroke"], Qe = ["d", "filter"], et = ["x", "y", "text-anchor", "font-size", "font-weight", "fill"], tt = ["x", "y", "font-size", "font-weight", "fill"], at = { key: 1 }, lt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], ot = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], rt = ["x1", "y1", "x2", "y2", "stroke-width", "filter"], st = { key: 2 }, nt = ["d", "fill", "stroke", "stroke-width"], ut = ["cx", "cy", "fill", "r", "stroke-width", "stroke"], it = ["x", "y", "font-size", "fill"], ct = {
12
+ key: 4,
13
+ class: "vue-data-ui-watermark"
14
+ }, vt = {
15
+ __name: "vue-ui-gauge",
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: ve }) {
31
+ const s = Y, { vue_ui_gauge: de } = Se(), $ = g(() => !!s.dataset && Object.keys(s.dataset).length > 0 && s.dataset.series && s.dataset.series.length), m = h(ze()), he = h(null), L = h(0), w = h(null), W = h(null), T = h(null), V = h(0), e = g({
32
+ get: () => q(),
33
+ set: (a) => a
34
+ });
35
+ ae(() => s.config, (a) => {
36
+ e.value = q(), ee(), V.value += 1;
37
+ }, { deep: !0 });
38
+ function q() {
39
+ const a = ce({
40
+ userConfig: s.config,
41
+ defaultConfig: de
42
+ });
43
+ return a.theme ? {
44
+ ...ce({
45
+ userConfig: Ce.vue_ui_gauge[a.theme] || s.config,
46
+ defaultConfig: a
47
+ }),
48
+ customPalette: $e[a.theme] || re
49
+ } : a;
50
+ }
51
+ const { isPrinting: H, isImaging: Z, generatePdf: J, generateImage: K } = Ye({
52
+ elementId: `vue-ui-gauge_${m.value}`,
53
+ fileName: e.value.style.chart.title.text || "vue-ui-gauge"
54
+ }), fe = g(() => Me(e.value.customPalette)), _ = g(() => {
55
+ if (!$.value || se(s.dataset.series || {}))
56
+ return {
57
+ value: 0,
58
+ series: [
59
+ {
60
+ from: 0,
61
+ to: 0
62
+ }
63
+ ]
64
+ };
65
+ const a = [];
66
+ (s.dataset.series || []).forEach((l) => {
67
+ a.push(l.from || 0), a.push(l.to || 0);
68
+ });
69
+ const o = Math.max(...a);
70
+ return {
71
+ ...s.dataset,
72
+ series: (s.dataset.series || []).map((l, n) => ({
73
+ ...l,
74
+ color: Pe(l.color) || fe.value[n] || re[n],
75
+ value: ((l.to || 0) - (l.from || 0)) / o * 100
76
+ }))
77
+ };
78
+ }), p = h(512), t = h({
79
+ height: 358.4,
80
+ width: p.value,
81
+ top: 0,
82
+ bottom: 358.4,
83
+ centerX: 179.2,
84
+ centerY: p.value / 2,
85
+ labelFontSize: 18,
86
+ legendFontSize: e.value.style.chart.legend.fontSize,
87
+ pointerRadius: e.value.style.chart.layout.pointer.circle.radius,
88
+ trackSize: e.value.style.chart.layout.track.size,
89
+ pointerSize: e.value.style.chart.layout.pointer.size,
90
+ pointerStrokeWidth: e.value.style.chart.layout.pointer.strokeWidth,
91
+ markerOffset: e.value.style.chart.layout.markers.offsetY + 3
92
+ }), M = h(0), F = h(0), v = h(e.value.style.chart.animation.use ? 0 : s.dataset.value);
93
+ ae(() => s.dataset.value, () => {
94
+ te(s.dataset.value);
95
+ });
96
+ const d = g(() => {
97
+ const a = t.value.width / 2, o = u.value.base, l = Math.PI * ((v.value + 0 - F.value) / (M.value - F.value)) + Math.PI;
98
+ return {
99
+ x1: a,
100
+ y1: o,
101
+ x2: a + u.value.pointerSize * t.value.pointerSize * 0.9 * Math.cos(l),
102
+ y2: o + u.value.pointerSize * t.value.pointerSize * 0.9 * Math.sin(l)
103
+ };
104
+ }), Q = g(() => {
105
+ const a = t.value.width / 2, o = u.value.base, l = Math.PI * ((v.value + 0 - F.value) / (M.value - F.value)) + Math.PI, n = a + u.value.pointerSize * t.value.pointerSize * 0.9 * Math.cos(l), O = o + u.value.pointerSize * t.value.pointerSize * 0.9 * Math.sin(l), k = t.value.pointerRadius, ge = a + k * Math.cos(l + Math.PI / 2), me = o + k * Math.sin(l + Math.PI / 2), ke = a + k * Math.cos(l - Math.PI / 2), be = o + k * Math.sin(l - Math.PI / 2);
106
+ return isNaN(n) ? null : `M ${n},${O} ${ge},${me} ${ke},${be} Z`;
107
+ }), G = g(() => {
108
+ for (let a = 0; a < _.value.series.length; a += 1) {
109
+ const { color: o, from: l, to: n } = _.value.series[a];
110
+ if (v.value >= l && v.value <= n)
111
+ return o;
112
+ }
113
+ return "#2D353C";
114
+ }), P = h(null);
115
+ function ee() {
116
+ if (se(s.dataset) ? A({
117
+ componentName: "VueUiGauge",
118
+ type: "dataset"
119
+ }) : (ne({
120
+ datasetObject: s.dataset,
121
+ requiredAttributes: ["value", "series"]
122
+ }).forEach((a) => {
123
+ A({
124
+ componentName: "VueUiGauge",
125
+ type: "datasetAttribute",
126
+ property: a
127
+ });
128
+ }), Object.hasOwn(s.dataset, "series") && (s.dataset.series.length ? s.dataset.series.forEach((a, o) => {
129
+ ne({
130
+ datasetObject: a,
131
+ requiredAttributes: ["from", "to"]
132
+ }).forEach((l) => {
133
+ A({
134
+ componentName: "VueUiGauge",
135
+ type: "datasetSerieAttribute",
136
+ property: l,
137
+ index: o
138
+ });
139
+ });
140
+ }) : A({
141
+ componentName: "VueUiGauge",
142
+ type: "datasetAttributeEmpty",
143
+ property: "series"
144
+ }))), te(s.dataset.value || 0), e.value.responsive) {
145
+ const a = Ae(() => {
146
+ const { width: o, height: l } = Ne({
147
+ chart: w.value,
148
+ title: e.value.style.chart.title.text ? W.value : null,
149
+ legend: T.value
150
+ });
151
+ t.value.width = o, t.value.height = l, t.value.centerX = o / 2, t.value.centerY = p.value / 2 / 358.4 * l, t.value.bottom = l, t.value.labelFontSize = 18 / p.value * Math.min(l, o) < 10 ? 10 : 18 / p.value * Math.min(l, o), t.value.legendFontSize = e.value.style.chart.legend.fontSize / p.value * Math.min(l, o) < 14 ? 14 : e.value.style.chart.legend.fontSize / p.value * Math.min(l, o), t.value.pointerRadius = e.value.style.chart.layout.pointer.circle.radius / p.value * Math.min(l, o), t.value.trackSize = e.value.style.chart.layout.track.size / p.value * Math.min(l, o), t.value.pointerStrokeWidth = ie({
152
+ relator: Math.min(o, l),
153
+ adjuster: p.value,
154
+ source: e.value.style.chart.layout.pointer.strokeWidth,
155
+ threshold: 2,
156
+ fallback: 2
157
+ }), t.value.markerOffset = ie({
158
+ relator: Math.max(o, l),
159
+ adjuster: p.value,
160
+ source: e.value.style.chart.layout.markers.offsetY + 3,
161
+ threshold: 2,
162
+ fallback: 2
163
+ });
164
+ });
165
+ P.value = new ResizeObserver(a), P.value.observe(w.value.parentNode);
166
+ }
167
+ }
168
+ _e(() => {
169
+ ee();
170
+ }), xe(() => {
171
+ P.value && P.value.disconnect();
172
+ });
173
+ function te(a) {
174
+ const o = [];
175
+ (_.value.series || []).forEach((k) => {
176
+ o.push(k.from || 0), o.push(k.to || 0);
177
+ }), M.value = Math.max(...o), F.value = Math.min(...o);
178
+ let l = e.value.style.chart.animation.speed;
179
+ const n = Math.abs(a - v.value) / (l * 60);
180
+ function O() {
181
+ v.value < a ? v.value = Math.min(v.value + n, a) : v.value > a && (v.value = Math.max(v.value - n, a)), v.value !== a && requestAnimationFrame(O);
182
+ }
183
+ O();
184
+ }
185
+ const u = g(() => {
186
+ const a = e.value.responsive ? Math.min(t.value.width, t.value.height) : t.value.width;
187
+ return {
188
+ arcs: a / 2.5,
189
+ gradients: a / 2.75,
190
+ base: e.value.responsive ? t.value.height / 2 : t.value.height * 0.7,
191
+ ratingBase: e.value.responsive ? t.value.height / 2 + t.value.height / 4 : t.value.height * 0.9,
192
+ pointerSize: e.value.responsive ? Math.min(t.value.width, t.value.height) / 3 : t.value.width / 3.2
193
+ };
194
+ }), x = g(() => ue(
195
+ { series: _.value.series },
196
+ t.value.width / 2,
197
+ u.value.base,
198
+ u.value.arcs,
199
+ u.value.arcs,
200
+ 1,
201
+ 1,
202
+ 1,
203
+ 180,
204
+ 109.9495,
205
+ 40 * t.value.trackSize
206
+ )), ye = g(() => ue(
207
+ { series: _.value.series },
208
+ t.value.width / 2,
209
+ u.value.base,
210
+ u.value.gradients,
211
+ u.value.gradients,
212
+ 0.95,
213
+ 1,
214
+ 1,
215
+ 180,
216
+ 110.02,
217
+ 2 * t.value.trackSize
218
+ )), S = h(!1);
219
+ function pe(a) {
220
+ S.value = a, L.value += 1;
221
+ }
222
+ const I = h(!1);
223
+ function R() {
224
+ I.value = !I.value;
225
+ }
226
+ return ve({
227
+ generatePdf: J,
228
+ generateImage: K,
229
+ toggleAnnotator: R
230
+ }), (a, o) => (r(), i("div", {
231
+ class: le(`vue-ui-gauge ${S.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
232
+ ref_key: "gaugeChart",
233
+ ref: w,
234
+ id: `vue-ui-gauge_${m.value}`,
235
+ style: oe(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`)
236
+ }, [
237
+ e.value.userOptions.buttons.annotator ? (r(), X(De, {
238
+ key: 0,
239
+ parent: w.value,
240
+ backgroundColor: e.value.style.chart.backgroundColor,
241
+ color: e.value.style.chart.color,
242
+ active: I.value,
243
+ onClose: R
244
+ }, null, 8, ["parent", "backgroundColor", "color", "active"])) : f("", !0),
245
+ e.value.style.chart.title.text ? (r(), i("div", {
246
+ key: 1,
247
+ ref_key: "chartTitle",
248
+ ref: W,
249
+ style: "width:100%;background:transparent;padding-bottom:12px"
250
+ }, [
251
+ (r(), X(Ee, {
252
+ key: `title_${V.value}`,
253
+ config: {
254
+ title: {
255
+ cy: "gauge-div-title",
256
+ ...e.value.style.chart.title
257
+ },
258
+ subtitle: {
259
+ cy: "gauge-div-subtitle",
260
+ ...e.value.style.chart.title.subtitle
261
+ }
262
+ }
263
+ }, {
264
+ default: z(() => [
265
+ e.value.translations.base && Y.dataset.base ? (r(), i("span", Le, C(e.value.translations.base) + ": " + C(Y.dataset.base), 1)) : f("", !0)
266
+ ]),
267
+ _: 1
268
+ }, 8, ["config"]))
269
+ ], 512)) : f("", !0),
270
+ e.value.userOptions.show && $.value ? (r(), X(Ge, {
271
+ ref_key: "details",
272
+ ref: he,
273
+ key: `user_options_${L.value}`,
274
+ backgroundColor: e.value.style.chart.backgroundColor,
275
+ color: e.value.style.chart.color,
276
+ isImaging: c(Z),
277
+ isPrinting: c(H),
278
+ uid: m.value,
279
+ hasXls: !1,
280
+ hasPdf: e.value.userOptions.buttons.pdf,
281
+ hasImg: e.value.userOptions.buttons.img,
282
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
283
+ isFullscreen: S.value,
284
+ titles: { ...e.value.userOptions.buttonTitles },
285
+ chartElement: w.value,
286
+ position: e.value.userOptions.position,
287
+ hasAnnotator: e.value.userOptions.buttons.annotator,
288
+ isAnnotation: I.value,
289
+ onToggleFullscreen: pe,
290
+ onGeneratePdf: c(J),
291
+ onGenerateImage: c(K),
292
+ onToggleAnnotator: R
293
+ }, we({ _: 2 }, [
294
+ a.$slots.optionPdf ? {
295
+ name: "optionPdf",
296
+ fn: z(() => [
297
+ b(a.$slots, "optionPdf", {}, void 0, !0)
298
+ ]),
299
+ key: "0"
300
+ } : void 0,
301
+ a.$slots.optionImg ? {
302
+ name: "optionImg",
303
+ fn: z(() => [
304
+ b(a.$slots, "optionImg", {}, void 0, !0)
305
+ ]),
306
+ key: "1"
307
+ } : void 0,
308
+ a.$slots.optionFullscreen ? {
309
+ name: "optionFullscreen",
310
+ fn: z(({ toggleFullscreen: l, isFullscreen: n }) => [
311
+ b(a.$slots, "optionFullscreen", E(j({ toggleFullscreen: l, isFullscreen: n })), void 0, !0)
312
+ ]),
313
+ key: "2"
314
+ } : void 0,
315
+ a.$slots.optionAnnotator ? {
316
+ name: "optionAnnotator",
317
+ fn: z(({ toggleAnnotator: l, isAnnotator: n }) => [
318
+ b(a.$slots, "optionAnnotator", E(j({ toggleAnnotator: l, isAnnotator: n })), void 0, !0)
319
+ ]),
320
+ key: "3"
321
+ } : void 0
322
+ ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) : f("", !0),
323
+ $.value ? (r(), i("svg", {
324
+ key: 3,
325
+ xmlns: c(Ie),
326
+ class: le({ "vue-data-ui-fullscreen--on": S.value, "vue-data-ui-fulscreen--off": !S.value }),
327
+ viewBox: `0 0 ${t.value.width <= 0 ? 10 : t.value.width} ${t.value.height <= 0 ? 10 : t.value.height}`,
328
+ style: oe(`max-width:100%;overflow:hidden !important;background:transparent;color:${e.value.style.chart.color}`)
329
+ }, [
330
+ Fe(je),
331
+ y("defs", null, [
332
+ y("radialGradient", {
333
+ id: `gradient_${m.value}`,
334
+ cx: "50%",
335
+ cy: "50%",
336
+ r: "50%",
337
+ fx: "50%",
338
+ fy: "50%"
339
+ }, [
340
+ y("stop", {
341
+ offset: "0%",
342
+ "stop-color": c(B)("#FFFFFF", 1)
343
+ }, null, 8, Ve),
344
+ y("stop", {
345
+ offset: "80%",
346
+ "stop-color": c(B)("#FFFFFF", e.value.style.chart.layout.track.gradientIntensity)
347
+ }, null, 8, qe),
348
+ y("stop", {
349
+ offset: "100%",
350
+ "stop-color": c(B)("#FFFFFF", 1)
351
+ }, null, 8, He)
352
+ ], 8, Te)
353
+ ]),
354
+ y("defs", null, [
355
+ y("filter", {
356
+ id: `blur_${m.value}`,
357
+ x: "-50%",
358
+ y: "-50%",
359
+ width: "200%",
360
+ height: "200%"
361
+ }, [
362
+ y("feGaussianBlur", {
363
+ in: "SourceGraphic",
364
+ stdDeviation: 100 / e.value.style.chart.layout.track.gradientIntensity
365
+ }, null, 8, Je)
366
+ ], 8, Ze)
367
+ ]),
368
+ (r(!0), i(D, null, U(x.value, (l, n) => (r(), i("path", {
369
+ key: `arc_${n}`,
370
+ d: l.arcSlice,
371
+ fill: l.color,
372
+ stroke: e.value.style.chart.backgroundColor,
373
+ "stroke-linecap": "round"
374
+ }, null, 8, Ke))), 128)),
375
+ e.value.style.chart.layout.track.useGradient ? (r(!0), i(D, { key: 0 }, U(ye.value, (l, n) => (r(), i("path", {
376
+ key: `arc_${n}`,
377
+ d: l.arcSlice,
378
+ fill: "#FFFFFF",
379
+ stroke: "none",
380
+ "stroke-linecap": "round",
381
+ filter: `url(#blur_${m.value})`
382
+ }, null, 8, Qe))), 128)) : f("", !0),
383
+ (r(!0), i(D, null, U(x.value, (l, n) => (r(), i("text", {
384
+ x: c(N)({
385
+ centerX: t.value.width / 2,
386
+ centerY: u.value.base,
387
+ initX: l.center.startX,
388
+ initY: l.center.startY,
389
+ offset: t.value.markerOffset
390
+ }).x,
391
+ y: c(N)({
392
+ centerX: t.value.width / 2,
393
+ centerY: u.value.base,
394
+ initX: l.center.startX,
395
+ initY: l.center.startY,
396
+ offset: t.value.markerOffset
397
+ }).y,
398
+ "text-anchor": l.center.startX < t.value.width / 2 - 5 ? "end" : l.center.startX > t.value.width / 2 + 5 ? "start" : "middle",
399
+ "font-size": t.value.labelFontSize * e.value.style.chart.layout.markers.fontSizeRatio,
400
+ "font-weight": `${e.value.style.chart.layout.markers.bold ? "bold" : "normal"}`,
401
+ fill: e.value.style.chart.layout.markers.color
402
+ }, C(l.from.toFixed(e.value.style.chart.layout.markers.roundingValue)), 9, et))), 256)),
403
+ y("text", {
404
+ x: c(N)({
405
+ centerX: t.value.width / 2,
406
+ centerY: u.value.base,
407
+ initX: x.value.at(-1).endX,
408
+ initY: x.value.at(-1).endY,
409
+ offset: t.value.markerOffset
410
+ }).x,
411
+ y: c(N)({
412
+ centerX: t.value.width / 2,
413
+ centerY: u.value.base,
414
+ initX: x.value.at(-1).endX,
415
+ initY: x.value.at(-1).endY,
416
+ offset: t.value.markerOffset
417
+ }).y,
418
+ "text-anchor": "start",
419
+ "font-size": t.value.labelFontSize * e.value.style.chart.layout.markers.fontSizeRatio,
420
+ "font-weight": `${e.value.style.chart.layout.markers.bold ? "bold" : "normal"}`,
421
+ fill: e.value.style.chart.layout.markers.color
422
+ }, C(M.value.toFixed(e.value.style.chart.layout.markers.roundingValue)), 9, tt),
423
+ e.value.style.chart.layout.pointer.type === "rounded" ? (r(), i("g", at, [
424
+ isNaN(d.value.x2) ? f("", !0) : (r(), i("line", {
425
+ key: 0,
426
+ x1: d.value.x1,
427
+ y1: d.value.y1,
428
+ x2: d.value.x2,
429
+ y2: d.value.y2,
430
+ stroke: e.value.style.chart.layout.pointer.stroke,
431
+ "stroke-width": t.value.pointerStrokeWidth,
432
+ "stroke-linecap": "round"
433
+ }, null, 8, lt)),
434
+ isNaN(d.value.x2) ? f("", !0) : (r(), i("line", {
435
+ key: 1,
436
+ x1: d.value.x1,
437
+ y1: d.value.y1,
438
+ x2: d.value.x2,
439
+ y2: d.value.y2,
440
+ stroke: e.value.style.chart.layout.pointer.useRatingColor ? G.value : e.value.style.chart.layout.pointer.color,
441
+ "stroke-linecap": "round",
442
+ "stroke-width": t.value.pointerStrokeWidth * 0.7
443
+ }, null, 8, ot)),
444
+ !isNaN(d.value.x2) && e.value.style.chart.layout.track.useGradient ? (r(), i("line", {
445
+ key: 2,
446
+ x1: d.value.x1,
447
+ y1: d.value.y1,
448
+ x2: d.value.x2,
449
+ y2: d.value.y2,
450
+ stroke: "white",
451
+ "stroke-linecap": "round",
452
+ "stroke-width": t.value.pointerStrokeWidth * 0.3,
453
+ filter: `url(#blur_${m.value})`
454
+ }, null, 8, rt)) : f("", !0)
455
+ ])) : (r(), i("g", st, [
456
+ Q.value ? (r(), i("path", {
457
+ key: 0,
458
+ d: Q.value,
459
+ fill: e.value.style.chart.layout.pointer.useRatingColor ? G.value : e.value.style.chart.layout.pointer.color,
460
+ stroke: e.value.style.chart.layout.pointer.stroke,
461
+ "stroke-width": e.value.style.chart.layout.pointer.circle.strokeWidth,
462
+ "stroke-linejoin": "round"
463
+ }, null, 8, nt)) : f("", !0)
464
+ ])),
465
+ y("circle", {
466
+ cx: t.value.width / 2,
467
+ cy: u.value.base,
468
+ fill: e.value.style.chart.layout.pointer.circle.color,
469
+ r: t.value.pointerRadius <= 0 ? 1e-4 : t.value.pointerRadius,
470
+ "stroke-width": e.value.style.chart.layout.pointer.circle.strokeWidth,
471
+ stroke: e.value.style.chart.layout.pointer.circle.stroke
472
+ }, null, 8, ut),
473
+ y("text", {
474
+ x: t.value.width / 2,
475
+ y: u.value.ratingBase,
476
+ "text-anchor": "middle",
477
+ "font-size": t.value.legendFontSize,
478
+ "font-weight": "bold",
479
+ fill: e.value.style.chart.legend.useRatingColor ? G.value : e.value.style.chart.legend.color
480
+ }, C(c(Oe)(
481
+ e.value.style.chart.legend.formatter,
482
+ v.value,
483
+ c(Xe)({
484
+ p: e.value.style.chart.legend.prefix + (e.value.style.chart.legend.showPlusSymbol && v.value > 0 ? "+" : ""),
485
+ v: v.value,
486
+ s: e.value.style.chart.legend.suffix,
487
+ r: e.value.style.chart.legend.roundingValue
488
+ })
489
+ )), 9, it),
490
+ b(a.$slots, "svg", { svg: t.value }, void 0, !0)
491
+ ], 14, We)) : f("", !0),
492
+ a.$slots.watermark ? (r(), i("div", ct, [
493
+ b(a.$slots, "watermark", E(j({ isPrinting: c(H) || c(Z) })), void 0, !0)
494
+ ])) : f("", !0),
495
+ $.value ? f("", !0) : (r(), X(Re, {
496
+ key: 5,
497
+ config: {
498
+ type: "gauge",
499
+ style: {
500
+ backgroundColor: e.value.style.chart.backgroundColor,
501
+ gauge: {
502
+ color: "#CCCCCC"
503
+ }
504
+ }
505
+ }
506
+ }, null, 8, ["config"])),
507
+ y("div", {
508
+ ref_key: "chartLegend",
509
+ ref: T
510
+ }, [
511
+ b(a.$slots, "legend", { legend: _.value }, void 0, !0)
512
+ ], 512)
513
+ ], 14, Be));
514
+ }
515
+ }, xt = /* @__PURE__ */ Ue(vt, [["__scopeId", "data-v-732b5d09"]]);
516
+ export {
517
+ xt as default
518
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-FfZRtJ6A.cjs"),R=require("./useResponsive-B3TrDDIG.cjs"),D=require("./usePrinter-BCAFeO_J.cjs"),Q=require("./vue-ui-skeleton-Djv08J67.cjs"),ee=require("./Title-Co5jI5ed.cjs"),G=require("./useNestedProp-q7byAAIJ.cjs"),te=require("./PackageVersion-DVZtsuy4.cjs"),ae=require("./PenAndPaper-CyXm-yVL.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=["id"],re={key:0},ne=["xmlns","viewBox"],se=["id"],ue=["stop-color"],ie=["stop-color"],ce=["stop-color"],de=["id"],ve=["stdDeviation"],he=["d","fill","stroke"],fe=["d","filter"],pe=["x","y","text-anchor","font-size","font-weight","fill"],me=["x","y","font-size","font-weight","fill"],ye={key:1},ge=["x1","y1","x2","y2","stroke","stroke-width"],ke=["x1","y1","x2","y2","stroke","stroke-width"],be=["x1","y1","x2","y2","stroke-width","filter"],_e={key:2},xe=["d","fill","stroke","stroke-width"],Se=["cx","cy","fill","r","stroke-width","stroke"],we=["x","y","font-size","fill"],Ce={key:4,class:"vue-data-ui-watermark"},Fe={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(C,{expose:q}){const s=C,{vue_ui_gauge:j}=r.useConfig(),b=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length>0&&s.dataset.series&&s.dataset.series.length),h=e.ref(r.createUid()),L=e.ref(null),P=e.ref(0),y=e.ref(null),B=e.ref(null),N=e.ref(null),E=e.ref(0),t=e.computed({get:()=>M(),set:o=>o});e.watch(()=>s.config,o=>{t.value=M(),X(),E.value+=1},{deep:!0});function M(){const o=G.useNestedProp({userConfig:s.config,defaultConfig:j});return o.theme?{...G.useNestedProp({userConfig:r.themes.vue_ui_gauge[o.theme]||s.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}const{isPrinting:$,isImaging:O,generatePdf:V,generateImage:I}=D.usePrinter({elementId:`vue-ui-gauge_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),U=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),p=e.computed(()=>{if(!b.value||r.objectIsEmpty(s.dataset.series||{}))return{value:0,series:[{from:0,to:0}]};const o=[];(s.dataset.series||[]).forEach(l=>{o.push(l.from||0),o.push(l.to||0)});const n=Math.max(...o);return{...s.dataset,series:(s.dataset.series||[]).map((l,u)=>({...l,color:r.convertColorToHex(l.color)||U.value[u]||r.palette[u],value:((l.to||0)-(l.from||0))/n*100}))}}),v=e.ref(512),a=e.ref({height:358.4,width:v.value,top:0,bottom:358.4,centerX:179.2,centerY:v.value/2,labelFontSize:18,legendFontSize:t.value.style.chart.legend.fontSize,pointerRadius:t.value.style.chart.layout.pointer.circle.radius,trackSize:t.value.style.chart.layout.track.size,pointerSize:t.value.style.chart.layout.pointer.size,pointerStrokeWidth:t.value.style.chart.layout.pointer.strokeWidth,markerOffset:t.value.style.chart.layout.markers.offsetY+3}),_=e.ref(0),g=e.ref(0),c=e.ref(t.value.style.chart.animation.use?0:s.dataset.value);e.watch(()=>s.dataset.value,()=>{Y(s.dataset.value)});const d=e.computed(()=>{const o=a.value.width/2,n=i.value.base,l=Math.PI*((c.value+0-g.value)/(_.value-g.value))+Math.PI;return{x1:o,y1:n,x2:o+i.value.pointerSize*a.value.pointerSize*.9*Math.cos(l),y2:n+i.value.pointerSize*a.value.pointerSize*.9*Math.sin(l)}}),A=e.computed(()=>{const o=a.value.width/2,n=i.value.base,l=Math.PI*((c.value+0-g.value)/(_.value-g.value))+Math.PI,u=o+i.value.pointerSize*a.value.pointerSize*.9*Math.cos(l),w=n+i.value.pointerSize*a.value.pointerSize*.9*Math.sin(l),f=a.value.pointerRadius,H=o+f*Math.cos(l+Math.PI/2),Z=n+f*Math.sin(l+Math.PI/2),J=o+f*Math.cos(l-Math.PI/2),K=n+f*Math.sin(l-Math.PI/2);return isNaN(u)?null:`M ${u},${w} ${H},${Z} ${J},${K} Z`}),F=e.computed(()=>{for(let o=0;o<p.value.series.length;o+=1){const{color:n,from:l,to:u}=p.value.series[o];if(c.value>=l&&c.value<=u)return n}return"#2D353C"}),x=e.ref(null);function X(){if(r.objectIsEmpty(s.dataset)?r.error({componentName:"VueUiGauge",type:"dataset"}):(r.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","series"]}).forEach(o=>{r.error({componentName:"VueUiGauge",type:"datasetAttribute",property:o})}),Object.hasOwn(s.dataset,"series")&&(s.dataset.series.length?s.dataset.series.forEach((o,n)=>{r.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["from","to"]}).forEach(l=>{r.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:l,index:n})})}):r.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),Y(s.dataset.value||0),t.value.responsive){const o=R.throttle(()=>{const{width:n,height:l}=R.useResponsive({chart:y.value,title:t.value.style.chart.title.text?B.value:null,legend:N.value});a.value.width=n,a.value.height=l,a.value.centerX=n/2,a.value.centerY=v.value/2/358.4*l,a.value.bottom=l,a.value.labelFontSize=18/v.value*Math.min(l,n)<10?10:18/v.value*Math.min(l,n),a.value.legendFontSize=t.value.style.chart.legend.fontSize/v.value*Math.min(l,n)<14?14:t.value.style.chart.legend.fontSize/v.value*Math.min(l,n),a.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/v.value*Math.min(l,n),a.value.trackSize=t.value.style.chart.layout.track.size/v.value*Math.min(l,n),a.value.pointerStrokeWidth=r.translateSize({relator:Math.min(n,l),adjuster:v.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),a.value.markerOffset=r.translateSize({relator:Math.max(n,l),adjuster:v.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2})});x.value=new ResizeObserver(o),x.value.observe(y.value.parentNode)}}e.onMounted(()=>{X()}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});function Y(o){const n=[];(p.value.series||[]).forEach(f=>{n.push(f.from||0),n.push(f.to||0)}),_.value=Math.max(...n),g.value=Math.min(...n);let l=t.value.style.chart.animation.speed;const u=Math.abs(o-c.value)/(l*60);function w(){c.value<o?c.value=Math.min(c.value+u,o):c.value>o&&(c.value=Math.max(c.value-u,o)),c.value!==o&&requestAnimationFrame(w)}w()}const i=e.computed(()=>{const o=t.value.responsive?Math.min(a.value.width,a.value.height):a.value.width;return{arcs:o/2.5,gradients:o/2.75,base:t.value.responsive?a.value.height/2:a.value.height*.7,ratingBase:t.value.responsive?a.value.height/2+a.value.height/4:a.value.height*.9,pointerSize:t.value.responsive?Math.min(a.value.width,a.value.height)/3:a.value.width/3.2}}),m=e.computed(()=>r.makeDonut({series:p.value.series},a.value.width/2,i.value.base,i.value.arcs,i.value.arcs,1,1,1,180,109.9495,40*a.value.trackSize)),T=e.computed(()=>r.makeDonut({series:p.value.series},a.value.width/2,i.value.base,i.value.gradients,i.value.gradients,.95,1,1,180,110.02,2*a.value.trackSize)),k=e.ref(!1);function W(o){k.value=o,P.value+=1}const S=e.ref(!1);function z(){S.value=!S.value}return q({generatePdf:V,generateImage:I,toggleAnnotator:z}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${k.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:y,id:`vue-ui-gauge_${h.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(ae.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:S.value,onClose:z},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:B,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(ee._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"gauge-div-title",...t.value.style.chart.title},subtitle:{cy:"gauge-div-subtitle",...t.value.style.chart.title.subtitle}}},{default:e.withCtx(()=>[t.value.translations.base&&C.dataset.base?(e.openBlock(),e.createElementBlock("span",re,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(C.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(D.UserOptions,{ref_key:"details",ref:L,key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(O),isPrinting:e.unref($),uid:h.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:S.value,onToggleFullscreen:W,onGeneratePdf:e.unref(V),onGenerateImage:e.unref(I),onToggleAnnotator:z},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.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:u})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:u})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.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:hidden !important;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(te._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${h.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)("#FFFFFF",1)},null,8,ue),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(r.setOpacity)("#FFFFFF",t.value.style.chart.layout.track.gradientIntensity)},null,8,ie),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)("#FFFFFF",1)},null,8,ce)],8,se)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${h.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.track.gradientIntensity},null,8,ve)],8,de)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,u)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${u}`,d:l.arcSlice,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,he))),128)),t.value.style.chart.layout.track.useGradient?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(T.value,(l,u)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${u}`,d:l.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${h.value})`},null,8,fe))),128)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,u)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:i.value.base,initX:l.center.startX,initY:l.center.startY,offset:a.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:i.value.base,initX:l.center.startX,initY:l.center.startY,offset:a.value.markerOffset}).y,"text-anchor":l.center.startX<a.value.width/2-5?"end":l.center.startX>a.value.width/2+5?"start":"middle","font-size":a.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(l.from.toFixed(t.value.style.chart.layout.markers.roundingValue)),9,pe))),256)),e.createElementVNode("text",{x:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:i.value.base,initX:m.value.at(-1).endX,initY:m.value.at(-1).endY,offset:a.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:i.value.base,initX:m.value.at(-1).endX,initY:m.value.at(-1).endY,offset:a.value.markerOffset}).y,"text-anchor":"start","font-size":a.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(_.value.toFixed(t.value.style.chart.layout.markers.roundingValue)),9,me),t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",ye,[isNaN(d.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:d.value.x1,y1:d.value.y1,x2:d.value.x2,y2:d.value.y2,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":a.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,ge)),isNaN(d.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:d.value.x1,y1:d.value.y1,x2:d.value.x2,y2:d.value.y2,stroke:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":a.value.pointerStrokeWidth*.7},null,8,ke)),!isNaN(d.value.x2)&&t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:d.value.x1,y1:d.value.y1,x2:d.value.x2,y2:d.value.y2,stroke:"white","stroke-linecap":"round","stroke-width":a.value.pointerStrokeWidth*.3,filter:`url(#blur_${h.value})`},null,8,be)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",_e,[A.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:A.value,fill:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,"stroke-linejoin":"round"},null,8,xe)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:a.value.width/2,cy:i.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:a.value.pointerRadius<=0?1e-4:a.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,Se),e.createElementVNode("text",{x:a.value.width/2,y:i.value.ratingBase,"text-anchor":"middle","font-size":a.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?F.value:t.value.style.chart.legend.color},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.legend.formatter,c.value,e.unref(r.dataLabel)({p:t.value.style.chart.legend.prefix+(t.value.style.chart.legend.showPlusSymbol&&c.value>0?"+":""),v:c.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}))),9,we),e.renderSlot(o.$slots,"svg",{svg:a.value},void 0,!0)],14,ne)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ce,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref($)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Q.default,{key:5,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:N},[e.renderSlot(o.$slots,"legend",{legend:p.value},void 0,!0)],512)],14,le))}},ze=oe._export_sfc(Fe,[["__scopeId","data-v-732b5d09"]]);exports.default=ze;
@@ -1,7 +1,7 @@
1
1
  import { ref as x, onMounted as C, computed as c, watch as z, openBlock as a, createElementBlock as s, normalizeStyle as G, createVNode as L, createElementVNode as t, createCommentVNode as r, Fragment as g, toDisplayString as y, unref as d } from "vue";
2
- import { u as b, c as N, e as $, i as p, f as m } from "./index-DDXisDKy.js";
3
- import { u as F } from "./useNestedProp-S1UXxUgm.js";
4
- import { _ as B } from "./PackageVersion-DtnhR89q.js";
2
+ import { u as b, c as N, e as $, i as p, f as m } from "./index-DnVHQ2xI.js";
3
+ import { u as F } from "./useNestedProp-Cox0K0Y5.js";
4
+ import { _ as B } from "./PackageVersion-CvCRsT5_.js";
5
5
  const P = ["viewBox", "width"], V = { key: 0 }, D = ["id"], I = ["stop-color"], M = ["stop-color"], U = ["stroke"], E = ["stroke"], O = ["width", "fill"], S = ["fill"], A = { key: 0 }, j = ["id"], T = /* @__PURE__ */ t("feGaussianBlur", {
6
6
  in: "SourceGraphic",
7
7
  stdDeviation: 1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-C7_6YjWN.cjs"),m=require("./useNestedProp-CC9zGr7C.cjs"),_=require("./PackageVersion-D4D0WicU.cjs"),k=["viewBox","width"],p={key:0},g=["id"],v=["stop-color"],y=["stop-color"],N=["stroke"],C=["stroke"],V=["width","fill"],w=["fill"],x={key:0},B=["id"],E=e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:1},null,-1),b=[E],L=["stroke"],z=["stroke","stroke-dasharray","stroke-dashoffset"],G=["filter"],F=["stroke","stroke-dasharray","stroke-dashoffset"],P=["fill"],$={__name:"vue-ui-gizmo",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(i){const o=i,{vue_ui_gizmo:f}=a.useConfig(),n=e.ref(a.createUid());e.onMounted(()=>{c()});function c(){!o.dataset&&o.dataset!==0&&a.error({componentName:"VueUiGizmo",type:"dataset"}),o.dataset<0&&console.warn("VueUiGizmo: dataset cannot be negative.")}const t=e.computed({get:()=>d(),set:r=>r});function d(){return m.useNestedProp({userConfig:o.config,defaultConfig:f})}e.watch(()=>o.config,r=>{t.value=d(),c()},{deep:!0});const u=e.computed(()=>({battery:{width:t.value.showPercentage?140:80,height:50},gauge:{width:80,height:80}})[t.value.type]),l=e.computed(()=>{const s=2*Math.PI*35,h=s-o.dataset/100*s;return{dasharray:`${s} ${s}`,dashoffset:h}});return(r,s)=>(e.openBlock(),e.createElementBlock("svg",{class:"vue-ui-gizmo",viewBox:`0 0 ${u.value.width} ${u.value.height}`,width:t.value.size,style:e.normalizeStyle({background:"transparent",fontFamily:t.value.fontFamily})},[e.createVNode(_._sfc_main),t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",p,[e.createElementVNode("linearGradient",{id:`gizmo_gradient_${n.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.gradientColor},null,8,v),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.color},null,8,y)],8,g)])):e.createCommentVNode("",!0),t.value.type==="battery"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("path",{d:"M 5 10 L 5 40 C 5 43 7 45 9 45 L 65 45 C 68 45 70 43 70 40 L 70 38 C 73 38 75 38 75 33 L 75 17 C 75 12 73 12 70 12 L 70 10 C 70 7 68 5 65 5 L 10 5 C 7 5 5 7 5 10",stroke:t.value.stroke,"stroke-width":2,fill:"none"},null,8,N),e.createElementVNode("path",{d:"M 70 16 L 70 34",stroke:t.value.stroke,"stroke-width":2,fill:"none",style:{opacity:"0.5"}},null,8,C),e.createElementVNode("rect",{x:10,y:10,height:30,width:55*(i.dataset/100),fill:t.value.useGradient?`url(#gizmo_gradient_${n.value})`:t.value.color,rx:2},null,8,V),t.value.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,x:85,y:32,"text-anchor":"start","font-size":"20",fill:t.value.textColor},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.formatter,o.dataset,e.unref(a.dataLabel)({v:o.dataset,s:"%"}))),9,w)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="gauge"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",x,[e.createElementVNode("filter",{id:`blur_${n.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},b,8,B)])):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.stroke,"stroke-width":2*4,fill:"none"},null,8,L),e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.color,"stroke-width":2*4,"stroke-dasharray":l.value.dasharray,"stroke-dashoffset":l.value.dashoffset,"stroke-linecap":"round",fill:"none",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,z),t.value.useGradient?(e.openBlock(),e.createElementBlock("g",{key:1,filter:`url(#blur_${n.value})`},[e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.gradientColor,"stroke-width":1,fill:"none","stroke-dasharray":l.value.dasharray,"stroke-dashoffset":l.value.dashoffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,F)],8,G)):e.createCommentVNode("",!0),t.value.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:2,x:40,y:47,"text-anchor":"middle","font-size":"20",fill:t.value.textColor},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.formatter,o.dataset,e.unref(a.dataLabel)({v:o.dataset,s:"%"}))),9,P)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],12,k))}};exports.default=$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-FfZRtJ6A.cjs"),m=require("./useNestedProp-q7byAAIJ.cjs"),_=require("./PackageVersion-DVZtsuy4.cjs"),k=["viewBox","width"],p={key:0},g=["id"],v=["stop-color"],y=["stop-color"],N=["stroke"],C=["stroke"],V=["width","fill"],w=["fill"],x={key:0},B=["id"],E=e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:1},null,-1),b=[E],L=["stroke"],z=["stroke","stroke-dasharray","stroke-dashoffset"],G=["filter"],F=["stroke","stroke-dasharray","stroke-dashoffset"],P=["fill"],$={__name:"vue-ui-gizmo",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(i){const o=i,{vue_ui_gizmo:f}=a.useConfig(),n=e.ref(a.createUid());e.onMounted(()=>{c()});function c(){!o.dataset&&o.dataset!==0&&a.error({componentName:"VueUiGizmo",type:"dataset"}),o.dataset<0&&console.warn("VueUiGizmo: dataset cannot be negative.")}const t=e.computed({get:()=>d(),set:r=>r});function d(){return m.useNestedProp({userConfig:o.config,defaultConfig:f})}e.watch(()=>o.config,r=>{t.value=d(),c()},{deep:!0});const u=e.computed(()=>({battery:{width:t.value.showPercentage?140:80,height:50},gauge:{width:80,height:80}})[t.value.type]),l=e.computed(()=>{const s=2*Math.PI*35,h=s-o.dataset/100*s;return{dasharray:`${s} ${s}`,dashoffset:h}});return(r,s)=>(e.openBlock(),e.createElementBlock("svg",{class:"vue-ui-gizmo",viewBox:`0 0 ${u.value.width} ${u.value.height}`,width:t.value.size,style:e.normalizeStyle({background:"transparent",fontFamily:t.value.fontFamily})},[e.createVNode(_._sfc_main),t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",p,[e.createElementVNode("linearGradient",{id:`gizmo_gradient_${n.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.gradientColor},null,8,v),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.color},null,8,y)],8,g)])):e.createCommentVNode("",!0),t.value.type==="battery"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("path",{d:"M 5 10 L 5 40 C 5 43 7 45 9 45 L 65 45 C 68 45 70 43 70 40 L 70 38 C 73 38 75 38 75 33 L 75 17 C 75 12 73 12 70 12 L 70 10 C 70 7 68 5 65 5 L 10 5 C 7 5 5 7 5 10",stroke:t.value.stroke,"stroke-width":2,fill:"none"},null,8,N),e.createElementVNode("path",{d:"M 70 16 L 70 34",stroke:t.value.stroke,"stroke-width":2,fill:"none",style:{opacity:"0.5"}},null,8,C),e.createElementVNode("rect",{x:10,y:10,height:30,width:55*(i.dataset/100),fill:t.value.useGradient?`url(#gizmo_gradient_${n.value})`:t.value.color,rx:2},null,8,V),t.value.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,x:85,y:32,"text-anchor":"start","font-size":"20",fill:t.value.textColor},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.formatter,o.dataset,e.unref(a.dataLabel)({v:o.dataset,s:"%"}))),9,w)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="gauge"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",x,[e.createElementVNode("filter",{id:`blur_${n.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},b,8,B)])):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.stroke,"stroke-width":2*4,fill:"none"},null,8,L),e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.color,"stroke-width":2*4,"stroke-dasharray":l.value.dasharray,"stroke-dashoffset":l.value.dashoffset,"stroke-linecap":"round",fill:"none",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,z),t.value.useGradient?(e.openBlock(),e.createElementBlock("g",{key:1,filter:`url(#blur_${n.value})`},[e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.gradientColor,"stroke-width":1,fill:"none","stroke-dasharray":l.value.dasharray,"stroke-dashoffset":l.value.dashoffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,F)],8,G)):e.createCommentVNode("",!0),t.value.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:2,x:40,y:47,"text-anchor":"middle","font-size":"20",fill:t.value.textColor},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.formatter,o.dataset,e.unref(a.dataLabel)({v:o.dataset,s:"%"}))),9,P)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],12,k))}};exports.default=$;