vue-data-ui 2.4.1 → 2.4.3

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 (218) hide show
  1. package/README.md +44 -44
  2. package/dist/{Arrow-BIs_9yK8.js → Arrow-C7lNL7sY.js} +1 -1
  3. package/dist/{Arrow-DpMf3yPs.cjs → Arrow-Dz6AomGr.cjs} +1 -1
  4. package/dist/{BaseIcon-CXDdkPfN.js → BaseIcon-BbvG1AlW.js} +7 -4
  5. package/dist/BaseIcon-uALK38Ov.cjs +1 -0
  6. package/dist/{DataTable-BTgMVOwp.cjs → DataTable-DTzynbND.cjs} +1 -1
  7. package/dist/{DataTable-DL2agEJ3.js → DataTable-DYqC2pqu.js} +2 -2
  8. package/dist/{Legend-Dj9KiaLv.cjs → Legend-Cgw4lO2O.cjs} +1 -1
  9. package/dist/{Legend-DXLiSLHd.js → Legend-DNgTCgEK.js} +1 -1
  10. package/dist/{PackageVersion-D4D0WicU.cjs → PackageVersion-DwI-KhXH.cjs} +1 -1
  11. package/dist/{PackageVersion-DtnhR89q.js → PackageVersion-VkaUzgmt.js} +1 -1
  12. package/dist/PenAndPaper-CDFVOo7X.cjs +1 -0
  13. package/dist/PenAndPaper-DAZYA8Ew.js +269 -0
  14. package/dist/{Shape-CO_Ak9Zm.js → Shape-Bwon0l0g.js} +1 -1
  15. package/dist/{Shape-7EC2UKDK.cjs → Shape-D2Dpshg1.cjs} +1 -1
  16. package/dist/{Slicer-BZfUZr1J.js → Slicer-TfpN2Cr4.js} +3 -3
  17. package/dist/{Slicer-CLAVjSQP.cjs → Slicer-uSjfNJjG.cjs} +1 -1
  18. package/dist/{Title-C-lm3Mkl.cjs → Title-0Tp4hZ4u.cjs} +1 -1
  19. package/dist/{Title-DYNLqCCT.js → Title-C5pIfQAz.js} +1 -1
  20. package/dist/{Tooltip-t-3mVhcz.cjs → Tooltip-9Tp2Yrd1.cjs} +1 -1
  21. package/dist/{Tooltip-CICAYyQj.js → Tooltip-Cz24YLfw.js} +1 -1
  22. package/dist/{index-DDXisDKy.js → index-Bya_q1J-.js} +883 -842
  23. package/dist/index-eFox7weK.cjs +9 -0
  24. package/dist/style.css +1 -1
  25. package/dist/types/vue-data-ui.d.cts +22 -17
  26. package/dist/types/vue-data-ui.d.ts +22 -17
  27. package/dist/{useNestedProp-S1UXxUgm.js → useNestedProp-B33hazbH.js} +1 -1
  28. package/dist/{useNestedProp-CC9zGr7C.cjs → useNestedProp-BkgEhTQY.cjs} +1 -1
  29. package/dist/usePrinter-CSRFnDBU.cjs +1 -0
  30. package/dist/{usePrinter-8ofTb2MJ.js → usePrinter-CiHd1FwD.js} +230 -185
  31. package/dist/useResponsive-BY8tgM1n.js +188 -0
  32. package/dist/useResponsive-CodiGUOE.cjs +1 -0
  33. package/dist/vue-data-ui-BTtxyUc3.cjs +9 -0
  34. package/dist/vue-data-ui-Bduq4f2p.js +261 -0
  35. package/dist/vue-data-ui.cjs +1 -1
  36. package/dist/vue-data-ui.js +1 -1
  37. package/dist/vue-ui-3d-bar-B-P7PMHs.cjs +19 -0
  38. package/dist/{vue-ui-3d-bar-DcF1nyGW.js → vue-ui-3d-bar-BUEq_VdY.js} +421 -390
  39. package/dist/{vue-ui-accordion-D_1fE5EF.js → vue-ui-accordion-DfUfL2dI.js} +3 -3
  40. package/dist/{vue-ui-accordion-Cc9958th.cjs → vue-ui-accordion-TEMpM1hO.cjs} +1 -1
  41. package/dist/{vue-ui-age-pyramid-Oe_yHDL0.js → vue-ui-age-pyramid-CH72tAMb.js} +255 -222
  42. package/dist/vue-ui-age-pyramid-DsbZ1qcQ.cjs +1 -0
  43. package/dist/{vue-ui-annotator-Dix6_Gm6.js → vue-ui-annotator-DPeJ2its.js} +1 -1
  44. package/dist/{vue-ui-annotator-Dbp6cWMr.cjs → vue-ui-annotator-DU_DJKCw.cjs} +1 -1
  45. package/dist/vue-ui-bullet-CtP3MlUT.js +464 -0
  46. package/dist/vue-ui-bullet-D8ks_rKr.cjs +34 -0
  47. package/dist/vue-ui-candlestick-D1jdr0bv.cjs +2 -0
  48. package/dist/{vue-ui-candlestick-CRwzWF6j.js → vue-ui-candlestick-DDil13a0.js} +278 -245
  49. package/dist/{vue-ui-carousel-table-BHeEbRKY.js → vue-ui-carousel-table-BaeIxyc0.js} +76 -69
  50. package/dist/vue-ui-carousel-table-C7SJIOG-.cjs +1 -0
  51. package/dist/{vue-ui-chestnut-CRk0RCB9.js → vue-ui-chestnut-BczSJF6S.js} +322 -291
  52. package/dist/vue-ui-chestnut-ih5r0Bj9.cjs +6 -0
  53. package/dist/{vue-ui-cursor-lU1rts1B.cjs → vue-ui-cursor-C2Pj_CI_.cjs} +1 -1
  54. package/dist/{vue-ui-cursor-y0kdr0uA.js → vue-ui-cursor-Dg_Dmww-.js} +2 -2
  55. package/dist/{vue-ui-dashboard-OyihaKdu.js → vue-ui-dashboard-Bul9dqx1.js} +2 -2
  56. package/dist/{vue-ui-dashboard-BfC0jS-X.cjs → vue-ui-dashboard-Cg020NiT.cjs} +1 -1
  57. package/dist/{vue-ui-digits-IKt4qT2-.js → vue-ui-digits-B8iAa4YZ.js} +2 -2
  58. package/dist/{vue-ui-digits-BJfcAiq_.cjs → vue-ui-digits-Ctgd84JR.cjs} +1 -1
  59. package/dist/vue-ui-donut-D7KT9EAp.cjs +1 -0
  60. package/dist/{vue-ui-donut-DFaGk4fI.js → vue-ui-donut-DUcp-fat.js} +376 -343
  61. package/dist/vue-ui-donut-evolution-CHtJ8iOK.cjs +1 -0
  62. package/dist/{vue-ui-donut-evolution-Dd4o37RP.js → vue-ui-donut-evolution-C_YMbTwq.js} +375 -344
  63. package/dist/vue-ui-dumbbell-B0dikuqO.cjs +9 -0
  64. package/dist/{vue-ui-dumbbell-B7j1_JoQ.js → vue-ui-dumbbell-Buwngz_V.js} +294 -261
  65. package/dist/vue-ui-flow-Bz3c0K5P.js +515 -0
  66. package/dist/vue-ui-flow-D6rc8J-8.cjs +1 -0
  67. package/dist/{vue-ui-galaxy-CH1BDtWl.js → vue-ui-galaxy-Cjh0XGTX.js} +212 -181
  68. package/dist/vue-ui-galaxy-CmTt0vBf.cjs +1 -0
  69. package/dist/vue-ui-gauge-B1UvGkQa.js +527 -0
  70. package/dist/vue-ui-gauge-B_TKuyM7.cjs +1 -0
  71. package/dist/{vue-ui-gizmo-DVwQaEH1.cjs → vue-ui-gizmo-DFW6HnHp.cjs} +1 -1
  72. package/dist/{vue-ui-gizmo-CKQcbe_7.js → vue-ui-gizmo-DUQ4t-At.js} +3 -3
  73. package/dist/{vue-ui-heatmap-B-zWMk0Y.js → vue-ui-heatmap-C-poazUw.js} +308 -277
  74. package/dist/vue-ui-heatmap-C2HlnqzO.cjs +1 -0
  75. package/dist/{vue-ui-kpi-CghbfSdM.js → vue-ui-kpi-DXe-vxAk.js} +3 -3
  76. package/dist/{vue-ui-kpi-CuY3xlVq.cjs → vue-ui-kpi-Z4Oi4raz.cjs} +1 -1
  77. package/dist/{vue-ui-mini-loader-C7roqZ4p.js → vue-ui-mini-loader-BVtHTqxS.js} +2 -2
  78. package/dist/{vue-ui-mini-loader-CH_PfeDc.cjs → vue-ui-mini-loader-MMvpm9pz.cjs} +1 -1
  79. package/dist/vue-ui-molecule-BaJpDZND.js +805 -0
  80. package/dist/vue-ui-molecule-BiYIcOKN.cjs +1 -0
  81. package/dist/{vue-ui-mood-radar-DSznHxLS.js → vue-ui-mood-radar-BUNDwsEI.js} +259 -228
  82. package/dist/vue-ui-mood-radar-C6jMyFkb.cjs +1 -0
  83. package/dist/vue-ui-nested-donuts-DKO2dFKo.cjs +17 -0
  84. package/dist/{vue-ui-nested-donuts-CiE4DdEQ.js → vue-ui-nested-donuts-mDy2hXa6.js} +371 -338
  85. package/dist/vue-ui-onion-DwFG3HAI.js +650 -0
  86. package/dist/vue-ui-onion-GWNoZRhw.cjs +5 -0
  87. package/dist/vue-ui-parallel-coordinate-plot-DODn4Ohf.cjs +8 -0
  88. package/dist/vue-ui-parallel-coordinate-plot-ImET_zeo.js +719 -0
  89. package/dist/{vue-ui-quadrant-Cs3A77us.js → vue-ui-quadrant-BeveRihK.js} +359 -326
  90. package/dist/vue-ui-quadrant-yuFAxV-5.cjs +1 -0
  91. package/dist/{vue-ui-quick-chart-CiiSUexi.js → vue-ui-quick-chart-DAhllTfa.js} +585 -552
  92. package/dist/vue-ui-quick-chart-DgFDBzjS.cjs +15 -0
  93. package/dist/vue-ui-radar-BJH5SE6-.cjs +1 -0
  94. package/dist/{vue-ui-radar-CNSpiNrM.js → vue-ui-radar-BllatzRa.js} +279 -246
  95. package/dist/{vue-ui-rating-GoUNDOdZ.cjs → vue-ui-rating-BoZo7caL.cjs} +1 -1
  96. package/dist/{vue-ui-rating-b_iYZWF8.js → vue-ui-rating-D1ykV4xO.js} +2 -2
  97. package/dist/vue-ui-relation-circle-CKmjOle7.cjs +1 -0
  98. package/dist/vue-ui-relation-circle-xv2l5Be9.js +358 -0
  99. package/dist/vue-ui-rings-B-ZcX6y1.js +602 -0
  100. package/dist/vue-ui-rings-DjH3CK23.cjs +2 -0
  101. package/dist/{vue-ui-scatter-CVuoW-cD.js → vue-ui-scatter-DG43ck1g.js} +440 -407
  102. package/dist/vue-ui-scatter-SBCXAl7q.cjs +1 -0
  103. package/dist/{vue-ui-screenshot-Co2o48d6.cjs → vue-ui-screenshot-C1JBP_N0.cjs} +1 -1
  104. package/dist/{vue-ui-screenshot-Csc0dQL9.js → vue-ui-screenshot-p3ca8cAl.js} +1 -1
  105. package/dist/{vue-ui-skeleton-B2sRnIXX.js → vue-ui-skeleton-BYssP0K4.js} +419 -379
  106. package/dist/vue-ui-skeleton-BqKzuhkB.cjs +41 -0
  107. package/dist/{vue-ui-smiley-Ci3uMgVh.cjs → vue-ui-smiley-BXKVpHl2.cjs} +1 -1
  108. package/dist/{vue-ui-smiley-D4s-AdIE.js → vue-ui-smiley-D7dDCdpq.js} +2 -2
  109. package/dist/vue-ui-spark-trend-9V60hM3Z.cjs +1 -0
  110. package/dist/{vue-ui-spark-trend-CHKQGMLs.js → vue-ui-spark-trend-GWFrO_0z.js} +86 -79
  111. package/dist/vue-ui-sparkbar-Bgn6AY0q.cjs +1 -0
  112. package/dist/{vue-ui-sparkbar-Bb1fq2GR.js → vue-ui-sparkbar-CwqlyAyv.js} +90 -83
  113. package/dist/vue-ui-sparkgauge-Dqntz2Zv.cjs +1 -0
  114. package/dist/{vue-ui-sparkgauge-DWuaAQbo.js → vue-ui-sparkgauge-F2XbiXyA.js} +57 -50
  115. package/dist/{vue-ui-sparkhistogram-CjeJ3ch1.js → vue-ui-sparkhistogram-DRIKK6Ym.js} +74 -67
  116. package/dist/vue-ui-sparkhistogram-DnY4-Sdn.cjs +1 -0
  117. package/dist/vue-ui-sparkline-CAEs-gtK.cjs +1 -0
  118. package/dist/{vue-ui-sparkline-DGJDBArr.js → vue-ui-sparkline-Cxtzdlhi.js} +134 -125
  119. package/dist/{vue-ui-sparkstackbar-B3ul3qUZ.js → vue-ui-sparkstackbar-0A1klq9s.js} +84 -77
  120. package/dist/vue-ui-sparkstackbar-D37ms1rx.cjs +1 -0
  121. package/dist/vue-ui-stackbar-ByOuJSdM.js +947 -0
  122. package/dist/vue-ui-stackbar-wun4S3C0.cjs +6 -0
  123. package/dist/{vue-ui-strip-plot-CIb2LSV8.js → vue-ui-strip-plot-CMD0MSqY.js} +297 -264
  124. package/dist/vue-ui-strip-plot-IQrypGvz.cjs +1 -0
  125. package/dist/{vue-ui-table-CmVi0nv2.js → vue-ui-table-B75DJ39t.js} +1 -1
  126. package/dist/{vue-ui-table-B_sFrAO9.cjs → vue-ui-table-aj0XZ7T5.cjs} +1 -1
  127. package/dist/{vue-ui-table-heatmap-CgFr38QT.js → vue-ui-table-heatmap-BO2ugWqD.js} +55 -48
  128. package/dist/vue-ui-table-heatmap-Ce93TyBF.cjs +1 -0
  129. package/dist/{vue-ui-table-sparkline-eg2Qd8ws.js → vue-ui-table-sparkline-CbjfAaj2.js} +88 -81
  130. package/dist/vue-ui-table-sparkline-D6KJjDnU.cjs +1 -0
  131. package/dist/vue-ui-thermometer-Pq4PvSIP.js +447 -0
  132. package/dist/vue-ui-thermometer-swmi4FmH.cjs +1 -0
  133. package/dist/{vue-ui-timer-DM1IStj1.cjs → vue-ui-timer-B6IB6yS6.cjs} +1 -1
  134. package/dist/{vue-ui-timer-COSI3Q5T.js → vue-ui-timer-Bk3BvB-B.js} +6 -6
  135. package/dist/vue-ui-tiremarks-CU9HJIqf.js +310 -0
  136. package/dist/vue-ui-tiremarks-Cn79uQH2.cjs +1 -0
  137. package/dist/vue-ui-treemap-BEMuKV7x.cjs +1 -0
  138. package/dist/vue-ui-treemap-DY-lRAhC.js +825 -0
  139. package/dist/vue-ui-vertical-bar-B1e2RxTv.cjs +4 -0
  140. package/dist/vue-ui-vertical-bar-CtnIKsM1.js +861 -0
  141. package/dist/vue-ui-waffle-BqP7Okgu.cjs +1 -0
  142. package/dist/vue-ui-waffle-reOsx-gJ.js +791 -0
  143. package/dist/vue-ui-wheel-BuWUGnkC.cjs +1 -0
  144. package/dist/vue-ui-wheel-kYxny3vn.js +291 -0
  145. package/dist/vue-ui-word-cloud-DbMqrHAf.js +607 -0
  146. package/dist/vue-ui-word-cloud-DwLY4QdB.cjs +1 -0
  147. package/dist/vue-ui-xy-CGWzriYn.cjs +3 -0
  148. package/dist/{vue-ui-xy-canvas-BYdTxzi6.js → vue-ui-xy-canvas-B0HTR7OV.js} +441 -408
  149. package/dist/vue-ui-xy-canvas-CgJd5FiT.cjs +9 -0
  150. package/dist/{vue-ui-xy-x8KEsGV-.js → vue-ui-xy-rbACig0h.js} +824 -791
  151. package/package.json +1 -1
  152. package/dist/BaseIcon-E7FmzMcY.cjs +0 -1
  153. package/dist/index-C7_6YjWN.cjs +0 -9
  154. package/dist/usePrinter-8EP4iaGm.cjs +0 -1
  155. package/dist/useResponsive-B3TrDDIG.cjs +0 -1
  156. package/dist/useResponsive-NZB-WLRF.js +0 -187
  157. package/dist/vue-data-ui-4Yd255Ia.cjs +0 -9
  158. package/dist/vue-data-ui-Cp7bO_tj.js +0 -258
  159. package/dist/vue-ui-3d-bar-BeR2aBgQ.cjs +0 -19
  160. package/dist/vue-ui-age-pyramid-R-C4P4mI.cjs +0 -1
  161. package/dist/vue-ui-bullet-CQKaC4wG.js +0 -409
  162. package/dist/vue-ui-bullet-DSZox236.cjs +0 -23
  163. package/dist/vue-ui-candlestick-Dilozp3V.cjs +0 -2
  164. package/dist/vue-ui-carousel-table-C0GDDSW9.cjs +0 -1
  165. package/dist/vue-ui-chestnut-DdEcEI04.cjs +0 -6
  166. package/dist/vue-ui-donut-DTSVlGMg.cjs +0 -1
  167. package/dist/vue-ui-donut-evolution-BuUafabD.cjs +0 -1
  168. package/dist/vue-ui-dumbbell-CVfgnyKi.cjs +0 -9
  169. package/dist/vue-ui-flow-C45dODaB.cjs +0 -1
  170. package/dist/vue-ui-flow-DkPTzNv9.js +0 -484
  171. package/dist/vue-ui-galaxy-DlPavMK0.cjs +0 -1
  172. package/dist/vue-ui-gauge-BXiy515T.js +0 -494
  173. package/dist/vue-ui-gauge-vMFUYHYH.cjs +0 -1
  174. package/dist/vue-ui-heatmap-CMQqQnxc.cjs +0 -1
  175. package/dist/vue-ui-molecule-BwmkMEVN.js +0 -774
  176. package/dist/vue-ui-molecule-nOuD0hR5.cjs +0 -1
  177. package/dist/vue-ui-mood-radar-Bof_C9Ae.cjs +0 -1
  178. package/dist/vue-ui-nested-donuts-DIb6YyWv.cjs +0 -17
  179. package/dist/vue-ui-onion-D9o6Rcgu.js +0 -617
  180. package/dist/vue-ui-onion-N3tRNc4u.cjs +0 -5
  181. package/dist/vue-ui-parallel-coordinate-plot-BcYrYXhG.js +0 -686
  182. package/dist/vue-ui-parallel-coordinate-plot-qKGk2bX6.cjs +0 -8
  183. package/dist/vue-ui-quadrant-Do48rGrX.cjs +0 -1
  184. package/dist/vue-ui-quick-chart-BxU4d-sJ.cjs +0 -15
  185. package/dist/vue-ui-radar-CooAvwPA.cjs +0 -1
  186. package/dist/vue-ui-relation-circle-nRf1pvD0.js +0 -325
  187. package/dist/vue-ui-relation-circle-uNgJni4x.cjs +0 -1
  188. package/dist/vue-ui-rings-BgRc1o4_.js +0 -569
  189. package/dist/vue-ui-rings-iIgQI9Ws.cjs +0 -2
  190. package/dist/vue-ui-scatter-CkrpmLxP.cjs +0 -1
  191. package/dist/vue-ui-skeleton-CGV1dEUD.cjs +0 -41
  192. package/dist/vue-ui-spark-trend-BfoEoJEy.cjs +0 -1
  193. package/dist/vue-ui-sparkbar-DB2DeXti.cjs +0 -1
  194. package/dist/vue-ui-sparkgauge-CJepIY2u.cjs +0 -1
  195. package/dist/vue-ui-sparkhistogram-B7B36LLT.cjs +0 -1
  196. package/dist/vue-ui-sparkline-BcqmwDAb.cjs +0 -1
  197. package/dist/vue-ui-sparkstackbar-DT3aKNeV.cjs +0 -1
  198. package/dist/vue-ui-stackbar-CRcUugkl.cjs +0 -6
  199. package/dist/vue-ui-stackbar-DNROvZII.js +0 -915
  200. package/dist/vue-ui-strip-plot-Ck9Fmt_b.cjs +0 -1
  201. package/dist/vue-ui-table-heatmap-Chvdf2Gi.cjs +0 -1
  202. package/dist/vue-ui-table-sparkline-DUUYQ5dH.cjs +0 -1
  203. package/dist/vue-ui-thermometer-BFfN4aat.cjs +0 -1
  204. package/dist/vue-ui-thermometer-BePmFiwy.js +0 -416
  205. package/dist/vue-ui-tiremarks-BkYXzU3R.cjs +0 -1
  206. package/dist/vue-ui-tiremarks-d6TmSHY7.js +0 -279
  207. package/dist/vue-ui-treemap-BgeZnbl3.cjs +0 -1
  208. package/dist/vue-ui-treemap-Qg0858o6.js +0 -792
  209. package/dist/vue-ui-vertical-bar-CieqHVD5.js +0 -828
  210. package/dist/vue-ui-vertical-bar-D3atbdvl.cjs +0 -4
  211. package/dist/vue-ui-waffle-CD7C9Lu4.cjs +0 -1
  212. package/dist/vue-ui-waffle-CjNhM-mV.js +0 -758
  213. package/dist/vue-ui-wheel-B8mbO6ht.js +0 -258
  214. package/dist/vue-ui-wheel-CYmM7J61.cjs +0 -1
  215. package/dist/vue-ui-word-cloud-DMXrUmX5.js +0 -574
  216. package/dist/vue-ui-word-cloud-Dm9yZ1zQ.cjs +0 -1
  217. package/dist/vue-ui-xy-DoWnidom.cjs +0 -3
  218. package/dist/vue-ui-xy-canvas-DHs5sb3t.cjs +0 -9
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-eFox7weK.cjs"),ae=require("./Legend-Cgw4lO2O.cjs"),re=require("./Title-0Tp4hZ4u.cjs"),ne=require("./Tooltip-9Tp2Yrd1.cjs"),se=require("./DataTable-DTzynbND.cjs"),U=require("./usePrinter-CSRFnDBU.cjs"),ue=require("./vue-ui-skeleton-BqKzuhkB.cjs"),ie=require("./vue-ui-accordion-TEMpM1hO.cjs"),H=require("./useNestedProp-BkgEhTQY.cjs"),ce=require("./PackageVersion-DwI-KhXH.cjs"),de=require("./PenAndPaper-CDFVOo7X.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),pe=["id"],he={key:1,style:"width:100%;background:transparent;padding-bottom:24px"},fe=["xmlns","viewBox"],ye=["id"],ge=["stdDeviation"],me=["d","stroke","stroke-width"],be=["d","stroke","stroke-width"],ke=["filter"],Ce=["d","stroke","stroke-width"],we=["d","stroke-width","onMouseenter","onClick"],xe={key:4,class:"vue-data-ui-watermark"},$e=["onClick"],Be={key:0},Ne={key:1},Se={key:7,ref:"source",dir:"auto"},Te=["innerHTML"],_e={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(X,{expose:j,emit:_}){const i=X,{vue_ui_galaxy:Y}=r.useConfig(),b=e.computed(()=>!!i.dataset&&i.dataset.length);e.onMounted(()=>{P()});function P(){r.objectIsEmpty(i.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):i.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const y=e.ref(r.createUid()),k=e.ref(null),J=e.ref(null),x=e.ref(!1),$=e.ref(""),c=e.ref(null),V=e.ref(0),E=e.ref(0),L=e.ref(0),A=e.ref(0),t=e.computed({get:()=>F(),set:l=>l});function F(){const l=H.useNestedProp({userConfig:i.config,defaultConfig:Y});return l.theme?{...H.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||i.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>i.config,l=>{t.value=F(),P(),E.value+=1,L.value+=1,A.value+=1},{deep:!0});const{isPrinting:O,isImaging:I,generatePdf:z,generateImage:D}=U.usePrinter({elementId:`galaxy_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),K=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),B=e.ref({height:180,width:250}),u=e.ref([]);function N(l){u.value.includes(l.id)?u.value=u.value.filter(a=>a!==l.id):u.value.push(l.id),_("selectLegend",g.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const h=e.computed(()=>i.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||K.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function Q(){return h.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const d=e.computed(()=>h.value.filter(l=>!u.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),Z=e.ref(190),q=e.computed(()=>h.value.filter(l=>!u.value.includes(l.id))),g=e.computed(()=>{const l=[];for(let a=0;a<q.value.length;a+=1){const o=q.value[a];let n=o.value/d.value*Z.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/d.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!u.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),m=e.ref(!1);function ee(l){m.value=l,V.value+=1}const S=e.ref(null);function te({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){S.value={datapoint:l,seriesIndex:o,series:h.value,config:t.value},x.value=n,c.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:h.value,config:t.value}))?$.value=f({seriesIndex:o,datapoint:l,series:h.value,config:t.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),$.value=`<div>${s}</div>`)}const G=e.computed(()=>h.value.map((l,a)=>({...l,proportion:(l.value||0)/i.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:u.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>N(l),isSegregated:u.value.includes(l.id)}))),le=e.computed(()=>({cy:"galaxy-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),p=e.computed(()=>{const l=g.value.map(o=>({name:o.name,color:o.color})),a=g.value.map(o=>o.value);return{head:l,body:a}});function M(){e.nextTick(()=>{const l=p.value.head.map((n,s)=>[[n.name],[p.value.body[s]],[isNaN(p.value.body[s]/d.value)?"-":p.value.body[s]/d.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const C=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:d.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=p.value.head.map((s,f)=>{const oe=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},oe,isNaN(p.value.body[f]/d.value)?"-":r.dataLabel({v:p.value.body[f]/d.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function W(){v.value.showTable=!v.value.showTable}function R(){v.value.showTooltip=!v.value.showTooltip}const w=e.ref(!1);function T(){w.value=!w.value}return j({getData:Q,generatePdf:z,generateCsv:M,generateImage:D,toggleTable:W,toggleTooltip:R,toggleAnnotator:T}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:k,class:e.normalizeClass(`vue-ui-galaxy ${m.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${y.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(de.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:T},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",he,[(e.openBlock(),e.createBlock(re._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(U.UserOptions,{ref_key:"details",ref:J,key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(O),isImaging:e.unref(I),uid:y.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:v.value.showTooltip,isFullscreen:m.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:ee,onGeneratePdf:e.unref(z),onGenerateCsv:M,onGenerateImage:e.unref(D),onToggleTable:W,onToggleTooltip:R,onToggleAnnotator:T},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):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":m.value,"vue-data-ui-fulscreen--off":!m.value}),viewBox:`0 0 ${B.value.width} ${B.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ce._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${y.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,ge)],8,ye)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,me)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,be)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${y.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Ce)],8,ke)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>te({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{x.value=!1,c.value=null}),onClick:s=>_("selectDatapoint",o)},null,40,we)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:B.value},void 0,!0)],14,fe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:5,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ae.Legend,{key:`legend_${A.value}`,legendSet:G.value,config:le.value,onClickMarker:a[1]||(a[1]=({legend:o})=>N(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>N(o),style:e.normalizeStyle(`opacity:${u.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),u.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",Ne," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Be," ("+e.toDisplayString(isNaN(o.value/d.value)?"-":e.unref(r.dataLabel)({v:o.value/d.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,$e)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:G.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ne._sfc_main,{show:v.value.showTooltip&&x.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:$.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...S.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...S.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(ie.default,{key:8,hideDetails:"",config:{open:v.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(se.DataTable,{key:`table_${L.value}`,colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Te)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,pe))}},Pe=ve._export_sfc(_e,[["__scopeId","data-v-f8542232"]]);exports.default=Pe;
@@ -0,0 +1,527 @@
1
+ import { computed as g, ref as c, watch as le, onMounted as xe, onBeforeUnmount as we, openBlock as r, createElementBlock as i, normalizeClass as oe, normalizeStyle as re, createBlock as X, createCommentVNode as f, withCtx as z, toDisplayString as C, unref as v, createSlots as Fe, renderSlot as m, normalizeProps as E, guardReactiveProps as j, createVNode as Se, createElementVNode as y, Fragment as D, renderList as U } from "vue";
2
+ import { u as ze, c as Ce, t as $e, a as Me, p as se, b as Pe, o as ne, d as Ie, e as A, g as ue, m as ie, X as Oe, s as B, H as N, i as Xe, f as Ae, E as ce } from "./index-Bya_q1J-.js";
3
+ import { t as Ne, u as Ye } from "./useResponsive-BY8tgM1n.js";
4
+ import { u as Ge, U as Re } from "./usePrinter-CiHd1FwD.js";
5
+ import Ee from "./vue-ui-skeleton-BYssP0K4.js";
6
+ import { _ as je } from "./Title-C5pIfQAz.js";
7
+ import { u as ve } from "./useNestedProp-B33hazbH.js";
8
+ import { _ as De } from "./PackageVersion-VkaUzgmt.js";
9
+ import { P as Ue } from "./PenAndPaper-DAZYA8Ew.js";
10
+ import { _ as Be } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
+ const Le = ["id"], We = { key: 0 }, Te = ["xmlns", "viewBox"], Ve = ["id"], qe = ["stop-color"], He = ["stop-color"], Ze = ["stop-color"], Je = ["id"], Ke = ["stdDeviation"], Qe = ["d", "fill", "stroke"], et = ["d", "filter"], tt = ["x", "y", "text-anchor", "font-size", "font-weight", "fill"], at = ["x", "y", "font-size", "font-weight", "fill"], lt = { key: 1 }, ot = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], rt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], st = ["x1", "y1", "x2", "y2", "stroke-width", "filter"], nt = { key: 2 }, ut = ["d", "fill", "stroke", "stroke-width"], it = ["cx", "cy", "fill", "r", "stroke-width", "stroke"], ct = ["x", "y", "font-size", "fill"], vt = {
12
+ key: 4,
13
+ class: "vue-data-ui-watermark"
14
+ }, dt = {
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: de }) {
31
+ const s = Y, { vue_ui_gauge: he } = ze(), $ = g(() => !!s.dataset && Object.keys(s.dataset).length > 0 && s.dataset.series && s.dataset.series.length), k = c(Ce()), fe = c(null), L = c(0), w = c(null), W = c(null), T = c(null), V = c(null), q = c(0), e = g({
32
+ get: () => H(),
33
+ set: (a) => a
34
+ });
35
+ le(() => s.config, (a) => {
36
+ e.value = H(), te(), q.value += 1;
37
+ }, { deep: !0 });
38
+ function H() {
39
+ const a = ve({
40
+ userConfig: s.config,
41
+ defaultConfig: he
42
+ });
43
+ return a.theme ? {
44
+ ...ve({
45
+ userConfig: $e.vue_ui_gauge[a.theme] || s.config,
46
+ defaultConfig: a
47
+ }),
48
+ customPalette: Me[a.theme] || se
49
+ } : a;
50
+ }
51
+ const { isPrinting: Z, isImaging: J, generatePdf: K, generateImage: Q } = Ge({
52
+ elementId: `vue-ui-gauge_${k.value}`,
53
+ fileName: e.value.style.chart.title.text || "vue-ui-gauge"
54
+ }), ye = g(() => Pe(e.value.customPalette)), _ = g(() => {
55
+ if (!$.value || ne(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: Ie(l.color) || ye.value[n] || se[n],
75
+ value: ((l.to || 0) - (l.from || 0)) / o * 100
76
+ }))
77
+ };
78
+ }), p = c(512), t = c({
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 = c(0), F = c(0), d = c(e.value.style.chart.animation.use ? 0 : s.dataset.value);
93
+ le(() => s.dataset.value, () => {
94
+ ae(s.dataset.value);
95
+ });
96
+ const h = g(() => {
97
+ const a = t.value.width / 2, o = u.value.base, l = Math.PI * ((d.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
+ }), ee = g(() => {
105
+ const a = t.value.width / 2, o = u.value.base, l = Math.PI * ((d.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), b = t.value.pointerRadius, me = a + b * Math.cos(l + Math.PI / 2), ke = o + b * Math.sin(l + Math.PI / 2), be = a + b * Math.cos(l - Math.PI / 2), _e = o + b * Math.sin(l - Math.PI / 2);
106
+ return isNaN(n) ? null : `M ${n},${O} ${me},${ke} ${be},${_e} 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 (d.value >= l && d.value <= n)
111
+ return o;
112
+ }
113
+ return "#2D353C";
114
+ }), P = c(null);
115
+ function te() {
116
+ if (ne(s.dataset) ? A({
117
+ componentName: "VueUiGauge",
118
+ type: "dataset"
119
+ }) : (ue({
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
+ ue({
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
+ }))), ae(s.dataset.value || 0), e.value.responsive) {
145
+ const a = Ne(() => {
146
+ const { width: o, height: l } = Ye({
147
+ chart: w.value,
148
+ title: e.value.style.chart.title.text ? W.value : null,
149
+ legend: T.value,
150
+ source: V.value
151
+ });
152
+ 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 = ce({
153
+ relator: Math.min(o, l),
154
+ adjuster: p.value,
155
+ source: e.value.style.chart.layout.pointer.strokeWidth,
156
+ threshold: 2,
157
+ fallback: 2
158
+ }), t.value.markerOffset = ce({
159
+ relator: Math.max(o, l),
160
+ adjuster: p.value,
161
+ source: e.value.style.chart.layout.markers.offsetY + 3,
162
+ threshold: 2,
163
+ fallback: 2
164
+ });
165
+ });
166
+ P.value = new ResizeObserver(a), P.value.observe(w.value.parentNode);
167
+ }
168
+ }
169
+ xe(() => {
170
+ te();
171
+ }), we(() => {
172
+ P.value && P.value.disconnect();
173
+ });
174
+ function ae(a) {
175
+ const o = [];
176
+ (_.value.series || []).forEach((b) => {
177
+ o.push(b.from || 0), o.push(b.to || 0);
178
+ }), M.value = Math.max(...o), F.value = Math.min(...o);
179
+ let l = e.value.style.chart.animation.speed;
180
+ const n = Math.abs(a - d.value) / (l * 60);
181
+ function O() {
182
+ d.value < a ? d.value = Math.min(d.value + n, a) : d.value > a && (d.value = Math.max(d.value - n, a)), d.value !== a && requestAnimationFrame(O);
183
+ }
184
+ O();
185
+ }
186
+ const u = g(() => {
187
+ const a = e.value.responsive ? Math.min(t.value.width, t.value.height) : t.value.width;
188
+ return {
189
+ arcs: a / 2.5,
190
+ gradients: a / 2.75,
191
+ base: e.value.responsive ? t.value.height / 2 : t.value.height * 0.7,
192
+ ratingBase: e.value.responsive ? t.value.height / 2 + t.value.height / 4 : t.value.height * 0.9,
193
+ pointerSize: e.value.responsive ? Math.min(t.value.width, t.value.height) / 3 : t.value.width / 3.2
194
+ };
195
+ }), x = g(() => ie(
196
+ { series: _.value.series },
197
+ t.value.width / 2,
198
+ u.value.base,
199
+ u.value.arcs,
200
+ u.value.arcs,
201
+ 1,
202
+ 1,
203
+ 1,
204
+ 180,
205
+ 109.9495,
206
+ 40 * t.value.trackSize
207
+ )), pe = g(() => ie(
208
+ { series: _.value.series },
209
+ t.value.width / 2,
210
+ u.value.base,
211
+ u.value.gradients,
212
+ u.value.gradients,
213
+ 0.95,
214
+ 1,
215
+ 1,
216
+ 180,
217
+ 110.02,
218
+ 2 * t.value.trackSize
219
+ )), S = c(!1);
220
+ function ge(a) {
221
+ S.value = a, L.value += 1;
222
+ }
223
+ const I = c(!1);
224
+ function R() {
225
+ I.value = !I.value;
226
+ }
227
+ return de({
228
+ generatePdf: K,
229
+ generateImage: Q,
230
+ toggleAnnotator: R
231
+ }), (a, o) => (r(), i("div", {
232
+ class: oe(`vue-ui-gauge ${S.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
233
+ ref_key: "gaugeChart",
234
+ ref: w,
235
+ id: `vue-ui-gauge_${k.value}`,
236
+ style: re(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`)
237
+ }, [
238
+ e.value.userOptions.buttons.annotator ? (r(), X(Ue, {
239
+ key: 0,
240
+ parent: w.value,
241
+ backgroundColor: e.value.style.chart.backgroundColor,
242
+ color: e.value.style.chart.color,
243
+ active: I.value,
244
+ onClose: R
245
+ }, null, 8, ["parent", "backgroundColor", "color", "active"])) : f("", !0),
246
+ e.value.style.chart.title.text ? (r(), i("div", {
247
+ key: 1,
248
+ ref_key: "chartTitle",
249
+ ref: W,
250
+ style: "width:100%;background:transparent;padding-bottom:12px"
251
+ }, [
252
+ (r(), X(je, {
253
+ key: `title_${q.value}`,
254
+ config: {
255
+ title: {
256
+ cy: "gauge-div-title",
257
+ ...e.value.style.chart.title
258
+ },
259
+ subtitle: {
260
+ cy: "gauge-div-subtitle",
261
+ ...e.value.style.chart.title.subtitle
262
+ }
263
+ }
264
+ }, {
265
+ default: z(() => [
266
+ e.value.translations.base && Y.dataset.base ? (r(), i("span", We, C(e.value.translations.base) + ": " + C(Y.dataset.base), 1)) : f("", !0)
267
+ ]),
268
+ _: 1
269
+ }, 8, ["config"]))
270
+ ], 512)) : f("", !0),
271
+ e.value.userOptions.show && $.value ? (r(), X(Re, {
272
+ ref_key: "details",
273
+ ref: fe,
274
+ key: `user_options_${L.value}`,
275
+ backgroundColor: e.value.style.chart.backgroundColor,
276
+ color: e.value.style.chart.color,
277
+ isImaging: v(J),
278
+ isPrinting: v(Z),
279
+ uid: k.value,
280
+ hasXls: !1,
281
+ hasPdf: e.value.userOptions.buttons.pdf,
282
+ hasImg: e.value.userOptions.buttons.img,
283
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
284
+ isFullscreen: S.value,
285
+ titles: { ...e.value.userOptions.buttonTitles },
286
+ chartElement: w.value,
287
+ position: e.value.userOptions.position,
288
+ hasAnnotator: e.value.userOptions.buttons.annotator,
289
+ isAnnotation: I.value,
290
+ onToggleFullscreen: ge,
291
+ onGeneratePdf: v(K),
292
+ onGenerateImage: v(Q),
293
+ onToggleAnnotator: R
294
+ }, Fe({ _: 2 }, [
295
+ a.$slots.optionPdf ? {
296
+ name: "optionPdf",
297
+ fn: z(() => [
298
+ m(a.$slots, "optionPdf", {}, void 0, !0)
299
+ ]),
300
+ key: "0"
301
+ } : void 0,
302
+ a.$slots.optionImg ? {
303
+ name: "optionImg",
304
+ fn: z(() => [
305
+ m(a.$slots, "optionImg", {}, void 0, !0)
306
+ ]),
307
+ key: "1"
308
+ } : void 0,
309
+ a.$slots.optionFullscreen ? {
310
+ name: "optionFullscreen",
311
+ fn: z(({ toggleFullscreen: l, isFullscreen: n }) => [
312
+ m(a.$slots, "optionFullscreen", E(j({ toggleFullscreen: l, isFullscreen: n })), void 0, !0)
313
+ ]),
314
+ key: "2"
315
+ } : void 0,
316
+ a.$slots.optionAnnotator ? {
317
+ name: "optionAnnotator",
318
+ fn: z(({ toggleAnnotator: l, isAnnotator: n }) => [
319
+ m(a.$slots, "optionAnnotator", E(j({ toggleAnnotator: l, isAnnotator: n })), void 0, !0)
320
+ ]),
321
+ key: "3"
322
+ } : void 0
323
+ ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) : f("", !0),
324
+ $.value ? (r(), i("svg", {
325
+ key: 3,
326
+ xmlns: v(Oe),
327
+ class: oe({ "vue-data-ui-fullscreen--on": S.value, "vue-data-ui-fulscreen--off": !S.value }),
328
+ viewBox: `0 0 ${t.value.width <= 0 ? 10 : t.value.width} ${t.value.height <= 0 ? 10 : t.value.height}`,
329
+ style: re(`max-width:100%;overflow:hidden !important;background:transparent;color:${e.value.style.chart.color}`)
330
+ }, [
331
+ Se(De),
332
+ y("defs", null, [
333
+ y("radialGradient", {
334
+ id: `gradient_${k.value}`,
335
+ cx: "50%",
336
+ cy: "50%",
337
+ r: "50%",
338
+ fx: "50%",
339
+ fy: "50%"
340
+ }, [
341
+ y("stop", {
342
+ offset: "0%",
343
+ "stop-color": v(B)("#FFFFFF", 1)
344
+ }, null, 8, qe),
345
+ y("stop", {
346
+ offset: "80%",
347
+ "stop-color": v(B)("#FFFFFF", e.value.style.chart.layout.track.gradientIntensity)
348
+ }, null, 8, He),
349
+ y("stop", {
350
+ offset: "100%",
351
+ "stop-color": v(B)("#FFFFFF", 1)
352
+ }, null, 8, Ze)
353
+ ], 8, Ve)
354
+ ]),
355
+ y("defs", null, [
356
+ y("filter", {
357
+ id: `blur_${k.value}`,
358
+ x: "-50%",
359
+ y: "-50%",
360
+ width: "200%",
361
+ height: "200%"
362
+ }, [
363
+ y("feGaussianBlur", {
364
+ in: "SourceGraphic",
365
+ stdDeviation: 100 / e.value.style.chart.layout.track.gradientIntensity
366
+ }, null, 8, Ke)
367
+ ], 8, Je)
368
+ ]),
369
+ (r(!0), i(D, null, U(x.value, (l, n) => (r(), i("path", {
370
+ key: `arc_${n}`,
371
+ d: l.arcSlice,
372
+ fill: l.color,
373
+ stroke: e.value.style.chart.backgroundColor,
374
+ "stroke-linecap": "round"
375
+ }, null, 8, Qe))), 128)),
376
+ e.value.style.chart.layout.track.useGradient ? (r(!0), i(D, { key: 0 }, U(pe.value, (l, n) => (r(), i("path", {
377
+ key: `arc_${n}`,
378
+ d: l.arcSlice,
379
+ fill: "#FFFFFF",
380
+ stroke: "none",
381
+ "stroke-linecap": "round",
382
+ filter: `url(#blur_${k.value})`
383
+ }, null, 8, et))), 128)) : f("", !0),
384
+ (r(!0), i(D, null, U(x.value, (l, n) => (r(), i("text", {
385
+ x: v(N)({
386
+ centerX: t.value.width / 2,
387
+ centerY: u.value.base,
388
+ initX: l.center.startX,
389
+ initY: l.center.startY,
390
+ offset: t.value.markerOffset
391
+ }).x,
392
+ y: v(N)({
393
+ centerX: t.value.width / 2,
394
+ centerY: u.value.base,
395
+ initX: l.center.startX,
396
+ initY: l.center.startY,
397
+ offset: t.value.markerOffset
398
+ }).y,
399
+ "text-anchor": l.center.startX < t.value.width / 2 - 5 ? "end" : l.center.startX > t.value.width / 2 + 5 ? "start" : "middle",
400
+ "font-size": t.value.labelFontSize * e.value.style.chart.layout.markers.fontSizeRatio,
401
+ "font-weight": `${e.value.style.chart.layout.markers.bold ? "bold" : "normal"}`,
402
+ fill: e.value.style.chart.layout.markers.color
403
+ }, C(l.from.toFixed(e.value.style.chart.layout.markers.roundingValue)), 9, tt))), 256)),
404
+ y("text", {
405
+ x: v(N)({
406
+ centerX: t.value.width / 2,
407
+ centerY: u.value.base,
408
+ initX: x.value.at(-1).endX,
409
+ initY: x.value.at(-1).endY,
410
+ offset: t.value.markerOffset
411
+ }).x,
412
+ y: v(N)({
413
+ centerX: t.value.width / 2,
414
+ centerY: u.value.base,
415
+ initX: x.value.at(-1).endX,
416
+ initY: x.value.at(-1).endY,
417
+ offset: t.value.markerOffset
418
+ }).y,
419
+ "text-anchor": "start",
420
+ "font-size": t.value.labelFontSize * e.value.style.chart.layout.markers.fontSizeRatio,
421
+ "font-weight": `${e.value.style.chart.layout.markers.bold ? "bold" : "normal"}`,
422
+ fill: e.value.style.chart.layout.markers.color
423
+ }, C(M.value.toFixed(e.value.style.chart.layout.markers.roundingValue)), 9, at),
424
+ e.value.style.chart.layout.pointer.type === "rounded" ? (r(), i("g", lt, [
425
+ isNaN(h.value.x2) ? f("", !0) : (r(), i("line", {
426
+ key: 0,
427
+ x1: h.value.x1,
428
+ y1: h.value.y1,
429
+ x2: h.value.x2,
430
+ y2: h.value.y2,
431
+ stroke: e.value.style.chart.layout.pointer.stroke,
432
+ "stroke-width": t.value.pointerStrokeWidth,
433
+ "stroke-linecap": "round"
434
+ }, null, 8, ot)),
435
+ isNaN(h.value.x2) ? f("", !0) : (r(), i("line", {
436
+ key: 1,
437
+ x1: h.value.x1,
438
+ y1: h.value.y1,
439
+ x2: h.value.x2,
440
+ y2: h.value.y2,
441
+ stroke: e.value.style.chart.layout.pointer.useRatingColor ? G.value : e.value.style.chart.layout.pointer.color,
442
+ "stroke-linecap": "round",
443
+ "stroke-width": t.value.pointerStrokeWidth * 0.7
444
+ }, null, 8, rt)),
445
+ !isNaN(h.value.x2) && e.value.style.chart.layout.track.useGradient ? (r(), i("line", {
446
+ key: 2,
447
+ x1: h.value.x1,
448
+ y1: h.value.y1,
449
+ x2: h.value.x2,
450
+ y2: h.value.y2,
451
+ stroke: "white",
452
+ "stroke-linecap": "round",
453
+ "stroke-width": t.value.pointerStrokeWidth * 0.3,
454
+ filter: `url(#blur_${k.value})`
455
+ }, null, 8, st)) : f("", !0)
456
+ ])) : (r(), i("g", nt, [
457
+ ee.value ? (r(), i("path", {
458
+ key: 0,
459
+ d: ee.value,
460
+ fill: e.value.style.chart.layout.pointer.useRatingColor ? G.value : e.value.style.chart.layout.pointer.color,
461
+ stroke: e.value.style.chart.layout.pointer.stroke,
462
+ "stroke-width": e.value.style.chart.layout.pointer.circle.strokeWidth,
463
+ "stroke-linejoin": "round"
464
+ }, null, 8, ut)) : f("", !0)
465
+ ])),
466
+ y("circle", {
467
+ cx: t.value.width / 2,
468
+ cy: u.value.base,
469
+ fill: e.value.style.chart.layout.pointer.circle.color,
470
+ r: t.value.pointerRadius <= 0 ? 1e-4 : t.value.pointerRadius,
471
+ "stroke-width": e.value.style.chart.layout.pointer.circle.strokeWidth,
472
+ stroke: e.value.style.chart.layout.pointer.circle.stroke
473
+ }, null, 8, it),
474
+ y("text", {
475
+ x: t.value.width / 2,
476
+ y: u.value.ratingBase,
477
+ "text-anchor": "middle",
478
+ "font-size": t.value.legendFontSize,
479
+ "font-weight": "bold",
480
+ fill: e.value.style.chart.legend.useRatingColor ? G.value : e.value.style.chart.legend.color
481
+ }, C(v(Xe)(
482
+ e.value.style.chart.legend.formatter,
483
+ d.value,
484
+ v(Ae)({
485
+ p: e.value.style.chart.legend.prefix + (e.value.style.chart.legend.showPlusSymbol && d.value > 0 ? "+" : ""),
486
+ v: d.value,
487
+ s: e.value.style.chart.legend.suffix,
488
+ r: e.value.style.chart.legend.roundingValue
489
+ })
490
+ )), 9, ct),
491
+ m(a.$slots, "svg", { svg: t.value }, void 0, !0)
492
+ ], 14, Te)) : f("", !0),
493
+ a.$slots.watermark ? (r(), i("div", vt, [
494
+ m(a.$slots, "watermark", E(j({ isPrinting: v(Z) || v(J) })), void 0, !0)
495
+ ])) : f("", !0),
496
+ $.value ? f("", !0) : (r(), X(Ee, {
497
+ key: 5,
498
+ config: {
499
+ type: "gauge",
500
+ style: {
501
+ backgroundColor: e.value.style.chart.backgroundColor,
502
+ gauge: {
503
+ color: "#CCCCCC"
504
+ }
505
+ }
506
+ }
507
+ }, null, 8, ["config"])),
508
+ y("div", {
509
+ ref_key: "chartLegend",
510
+ ref: T
511
+ }, [
512
+ m(a.$slots, "legend", { legend: _.value }, void 0, !0)
513
+ ], 512),
514
+ a.$slots.source ? (r(), i("div", {
515
+ key: 6,
516
+ ref_key: "source",
517
+ ref: V,
518
+ dir: "auto"
519
+ }, [
520
+ m(a.$slots, "source", {}, void 0, !0)
521
+ ], 512)) : f("", !0)
522
+ ], 14, Le));
523
+ }
524
+ }, wt = /* @__PURE__ */ Be(dt, [["__scopeId", "data-v-d9452596"]]);
525
+ export {
526
+ wt as default
527
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-eFox7weK.cjs"),D=require("./useResponsive-CodiGUOE.cjs"),G=require("./usePrinter-CSRFnDBU.cjs"),ee=require("./vue-ui-skeleton-BqKzuhkB.cjs"),te=require("./Title-0Tp4hZ4u.cjs"),q=require("./useNestedProp-BkgEhTQY.cjs"),ae=require("./PackageVersion-DwI-KhXH.cjs"),oe=require("./PenAndPaper-CDFVOo7X.cjs"),le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),re=["id"],ne={key:0},se=["xmlns","viewBox"],ue=["id"],ie=["stop-color"],ce=["stop-color"],de=["stop-color"],ve=["id"],he=["stdDeviation"],fe=["d","fill","stroke"],pe=["d","filter"],me=["x","y","text-anchor","font-size","font-weight","fill"],ye=["x","y","font-size","font-weight","fill"],ge={key:1},ke=["x1","y1","x2","y2","stroke","stroke-width"],be=["x1","y1","x2","y2","stroke","stroke-width"],_e=["x1","y1","x2","y2","stroke-width","filter"],xe={key:2},Se=["d","fill","stroke","stroke-width"],Ce=["cx","cy","fill","r","stroke-width","stroke"],we=["x","y","font-size","fill"],Fe={key:4,class:"vue-data-ui-watermark"},Be={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(w,{expose:j}){const s=w,{vue_ui_gauge:L}=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()),U=e.ref(null),z=e.ref(0),y=e.ref(null),P=e.ref(null),N=e.ref(null),E=e.ref(null),$=e.ref(0),t=e.computed({get:()=>M(),set:o=>o});e.watch(()=>s.config,o=>{t.value=M(),Y(),$.value+=1},{deep:!0});function M(){const o=q.useNestedProp({userConfig:s.config,defaultConfig:L});return o.theme?{...q.useNestedProp({userConfig:r.themes.vue_ui_gauge[o.theme]||s.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}const{isPrinting:O,isImaging:V,generatePdf:I,generateImage:A}=G.usePrinter({elementId:`vue-ui-gauge_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),T=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)||T.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,()=>{R(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)}}),X=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),C=n+i.value.pointerSize*a.value.pointerSize*.9*Math.sin(l),f=a.value.pointerRadius,Z=o+f*Math.cos(l+Math.PI/2),J=n+f*Math.sin(l+Math.PI/2),K=o+f*Math.cos(l-Math.PI/2),Q=n+f*Math.sin(l-Math.PI/2);return isNaN(u)?null:`M ${u},${C} ${Z},${J} ${K},${Q} 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 Y(){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"}))),R(s.dataset.value||0),t.value.responsive){const o=D.throttle(()=>{const{width:n,height:l}=D.useResponsive({chart:y.value,title:t.value.style.chart.title.text?P.value:null,legend:N.value,source:E.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(()=>{Y()}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});function R(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 C(){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(C)}C()}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)),W=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 H(o){k.value=o,z.value+=1}const S=e.ref(!1);function B(){S.value=!S.value}return j({generatePdf:I,generateImage:A,toggleAnnotator:B}),(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(oe.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:S.value,onClose:B},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:P,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(te._sfc_main,{key:`title_${$.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&&w.dataset.base?(e.openBlock(),e.createElementBlock("span",ne,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(w.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(G.UserOptions,{ref_key:"details",ref:U,key:`user_options_${z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(V),isPrinting:e.unref(O),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:H,onGeneratePdf:e.unref(I),onGenerateImage:e.unref(A),onToggleAnnotator:B},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(ae._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,ie),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(r.setOpacity)("#FFFFFF",t.value.style.chart.layout.track.gradientIntensity)},null,8,ce),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)("#FFFFFF",1)},null,8,de)],8,ue)]),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,he)],8,ve)]),(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,fe))),128)),t.value.style.chart.layout.track.useGradient?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(W.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,pe))),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,me))),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,ye),t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",ge,[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,ke)),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,be)),!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,_e)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",xe,[X.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:X.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,Se)):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,Ce),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,se)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ee.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),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:E,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],14,re))}},ze=le._export_sfc(Be,[["__scopeId","data-v-d9452596"]]);exports.default=ze;
@@ -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-eFox7weK.cjs"),m=require("./useNestedProp-BkgEhTQY.cjs"),_=require("./PackageVersion-DwI-KhXH.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,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-Bya_q1J-.js";
3
+ import { u as F } from "./useNestedProp-B33hazbH.js";
4
+ import { _ as B } from "./PackageVersion-VkaUzgmt.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