vue-data-ui 2.4.2 → 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 (194) hide show
  1. package/dist/{Arrow-JuK2z9IB.js → Arrow-C7lNL7sY.js} +1 -1
  2. package/dist/{Arrow-DLTRnzcG.cjs → Arrow-Dz6AomGr.cjs} +1 -1
  3. package/dist/{BaseIcon-rRli6Sfv.js → BaseIcon-BbvG1AlW.js} +1 -1
  4. package/dist/{BaseIcon-BGExhz6v.cjs → BaseIcon-uALK38Ov.cjs} +1 -1
  5. package/dist/{DataTable-DJzhv96s.cjs → DataTable-DTzynbND.cjs} +1 -1
  6. package/dist/{DataTable-DTk7C4Pr.js → DataTable-DYqC2pqu.js} +2 -2
  7. package/dist/{Legend-YZ7Hz3o1.cjs → Legend-Cgw4lO2O.cjs} +1 -1
  8. package/dist/{Legend-CYF2gpXG.js → Legend-DNgTCgEK.js} +1 -1
  9. package/dist/{PackageVersion-DVZtsuy4.cjs → PackageVersion-DwI-KhXH.cjs} +1 -1
  10. package/dist/{PackageVersion-CvCRsT5_.js → PackageVersion-VkaUzgmt.js} +1 -1
  11. package/dist/{PenAndPaper-CyXm-yVL.cjs → PenAndPaper-CDFVOo7X.cjs} +1 -1
  12. package/dist/{PenAndPaper-Jb0pLt3G.js → PenAndPaper-DAZYA8Ew.js} +2 -2
  13. package/dist/{Shape-BpPn4eWR.js → Shape-Bwon0l0g.js} +1 -1
  14. package/dist/{Shape-X2F-QV_B.cjs → Shape-D2Dpshg1.cjs} +1 -1
  15. package/dist/{Slicer-CU7dRZR0.js → Slicer-TfpN2Cr4.js} +3 -3
  16. package/dist/{Slicer-CL0tP5a5.cjs → Slicer-uSjfNJjG.cjs} +1 -1
  17. package/dist/{Title-Co5jI5ed.cjs → Title-0Tp4hZ4u.cjs} +1 -1
  18. package/dist/{Title-5VmBwT4i.js → Title-C5pIfQAz.js} +1 -1
  19. package/dist/{Tooltip-Bl6W8Zn7.cjs → Tooltip-9Tp2Yrd1.cjs} +1 -1
  20. package/dist/{Tooltip-Cj4EF7v1.js → Tooltip-Cz24YLfw.js} +1 -1
  21. package/dist/{index-DnVHQ2xI.js → index-Bya_q1J-.js} +4 -1
  22. package/dist/index-eFox7weK.cjs +9 -0
  23. package/dist/style.css +1 -1
  24. package/dist/types/vue-data-ui.d.cts +4 -1
  25. package/dist/types/vue-data-ui.d.ts +4 -1
  26. package/dist/{useNestedProp-Cox0K0Y5.js → useNestedProp-B33hazbH.js} +1 -1
  27. package/dist/{useNestedProp-q7byAAIJ.cjs → useNestedProp-BkgEhTQY.cjs} +1 -1
  28. package/dist/{usePrinter-BCAFeO_J.cjs → usePrinter-CSRFnDBU.cjs} +1 -1
  29. package/dist/{usePrinter-BEeNAqS5.js → usePrinter-CiHd1FwD.js} +1 -1
  30. package/dist/useResponsive-BY8tgM1n.js +188 -0
  31. package/dist/useResponsive-CodiGUOE.cjs +1 -0
  32. package/dist/{vue-data-ui-CRLLZpt0.cjs → vue-data-ui-BTtxyUc3.cjs} +1 -1
  33. package/dist/{vue-data-ui-W7nnqn0v.js → vue-data-ui-Bduq4f2p.js} +58 -58
  34. package/dist/vue-data-ui.cjs +1 -1
  35. package/dist/vue-data-ui.js +1 -1
  36. package/dist/{vue-ui-3d-bar-bD_n6qL_.cjs → vue-ui-3d-bar-B-P7PMHs.cjs} +2 -2
  37. package/dist/{vue-ui-3d-bar-BwBrUabe.js → vue-ui-3d-bar-BUEq_VdY.js} +41 -34
  38. package/dist/{vue-ui-accordion-DspS4q3f.js → vue-ui-accordion-DfUfL2dI.js} +3 -3
  39. package/dist/{vue-ui-accordion-xXgqfR2l.cjs → vue-ui-accordion-TEMpM1hO.cjs} +1 -1
  40. package/dist/{vue-ui-age-pyramid-CxBvm3uM.js → vue-ui-age-pyramid-CH72tAMb.js} +163 -154
  41. package/dist/vue-ui-age-pyramid-DsbZ1qcQ.cjs +1 -0
  42. package/dist/{vue-ui-annotator-BOofWpzv.js → vue-ui-annotator-DPeJ2its.js} +1 -1
  43. package/dist/{vue-ui-annotator-C6T5_7ZV.cjs → vue-ui-annotator-DU_DJKCw.cjs} +1 -1
  44. package/dist/{vue-ui-bullet-DraC-oFu.js → vue-ui-bullet-CtP3MlUT.js} +167 -136
  45. package/dist/vue-ui-bullet-D8ks_rKr.cjs +34 -0
  46. package/dist/vue-ui-candlestick-D1jdr0bv.cjs +2 -0
  47. package/dist/{vue-ui-candlestick-DQZ5eT1f.js → vue-ui-candlestick-DDil13a0.js} +173 -164
  48. package/dist/{vue-ui-carousel-table-PdLjpH1p.js → vue-ui-carousel-table-BaeIxyc0.js} +76 -69
  49. package/dist/vue-ui-carousel-table-C7SJIOG-.cjs +1 -0
  50. package/dist/{vue-ui-chestnut-ByI_O5hB.js → vue-ui-chestnut-BczSJF6S.js} +96 -89
  51. package/dist/vue-ui-chestnut-ih5r0Bj9.cjs +6 -0
  52. package/dist/{vue-ui-cursor-BvadpA2m.cjs → vue-ui-cursor-C2Pj_CI_.cjs} +1 -1
  53. package/dist/{vue-ui-cursor-BM74l93B.js → vue-ui-cursor-Dg_Dmww-.js} +2 -2
  54. package/dist/{vue-ui-dashboard-CoANBhAM.js → vue-ui-dashboard-Bul9dqx1.js} +2 -2
  55. package/dist/{vue-ui-dashboard-OP51Gs8I.cjs → vue-ui-dashboard-Cg020NiT.cjs} +1 -1
  56. package/dist/{vue-ui-digits-DioaBnkB.js → vue-ui-digits-B8iAa4YZ.js} +2 -2
  57. package/dist/{vue-ui-digits-C7jJJg9k.cjs → vue-ui-digits-Ctgd84JR.cjs} +1 -1
  58. package/dist/vue-ui-donut-D7KT9EAp.cjs +1 -0
  59. package/dist/{vue-ui-donut-ldqSm_JV.js → vue-ui-donut-DUcp-fat.js} +244 -235
  60. package/dist/vue-ui-donut-evolution-CHtJ8iOK.cjs +1 -0
  61. package/dist/{vue-ui-donut-evolution-DAb1xzNd.js → vue-ui-donut-evolution-C_YMbTwq.js} +125 -118
  62. package/dist/vue-ui-dumbbell-B0dikuqO.cjs +9 -0
  63. package/dist/{vue-ui-dumbbell-Dg7PkiKJ.js → vue-ui-dumbbell-Buwngz_V.js} +192 -183
  64. package/dist/{vue-ui-flow-DKT7ZEnr.js → vue-ui-flow-Bz3c0K5P.js} +78 -71
  65. package/dist/vue-ui-flow-D6rc8J-8.cjs +1 -0
  66. package/dist/{vue-ui-galaxy-qAA9be3S.js → vue-ui-galaxy-Cjh0XGTX.js} +49 -42
  67. package/dist/vue-ui-galaxy-CmTt0vBf.cjs +1 -0
  68. package/dist/{vue-ui-gauge-D8yVTIgP.js → vue-ui-gauge-B1UvGkQa.js} +160 -151
  69. package/dist/vue-ui-gauge-B_TKuyM7.cjs +1 -0
  70. package/dist/{vue-ui-gizmo-W6bTkg59.cjs → vue-ui-gizmo-DFW6HnHp.cjs} +1 -1
  71. package/dist/{vue-ui-gizmo-DC0uUwI3.js → vue-ui-gizmo-DUQ4t-At.js} +3 -3
  72. package/dist/{vue-ui-heatmap-u1raIzBQ.js → vue-ui-heatmap-C-poazUw.js} +110 -103
  73. package/dist/vue-ui-heatmap-C2HlnqzO.cjs +1 -0
  74. package/dist/{vue-ui-kpi-C-iTxMD2.js → vue-ui-kpi-DXe-vxAk.js} +3 -3
  75. package/dist/{vue-ui-kpi-DY_2WF7U.cjs → vue-ui-kpi-Z4Oi4raz.cjs} +1 -1
  76. package/dist/{vue-ui-mini-loader-C7x7S0hi.js → vue-ui-mini-loader-BVtHTqxS.js} +2 -2
  77. package/dist/{vue-ui-mini-loader-Bfq2MNWu.cjs → vue-ui-mini-loader-MMvpm9pz.cjs} +1 -1
  78. package/dist/{vue-ui-molecule-BFnOIxxs.js → vue-ui-molecule-BaJpDZND.js} +78 -71
  79. package/dist/vue-ui-molecule-BiYIcOKN.cjs +1 -0
  80. package/dist/{vue-ui-mood-radar-CR1v5v2x.js → vue-ui-mood-radar-BUNDwsEI.js} +132 -125
  81. package/dist/vue-ui-mood-radar-C6jMyFkb.cjs +1 -0
  82. package/dist/vue-ui-nested-donuts-DKO2dFKo.cjs +17 -0
  83. package/dist/{vue-ui-nested-donuts-DEiloQzq.js → vue-ui-nested-donuts-mDy2hXa6.js} +198 -189
  84. package/dist/{vue-ui-onion-LsEhBe4x.js → vue-ui-onion-DwFG3HAI.js} +248 -239
  85. package/dist/vue-ui-onion-GWNoZRhw.cjs +5 -0
  86. package/dist/vue-ui-parallel-coordinate-plot-DODn4Ohf.cjs +8 -0
  87. package/dist/{vue-ui-parallel-coordinate-plot-CTlIjJqG.js → vue-ui-parallel-coordinate-plot-ImET_zeo.js} +233 -224
  88. package/dist/{vue-ui-quadrant-DKVVFufb.js → vue-ui-quadrant-BeveRihK.js} +188 -179
  89. package/dist/vue-ui-quadrant-yuFAxV-5.cjs +1 -0
  90. package/dist/{vue-ui-quick-chart-8vJikiGH.js → vue-ui-quick-chart-DAhllTfa.js} +343 -334
  91. package/dist/{vue-ui-quick-chart-gG5Ar8-i.cjs → vue-ui-quick-chart-DgFDBzjS.cjs} +2 -2
  92. package/dist/vue-ui-radar-BJH5SE6-.cjs +1 -0
  93. package/dist/{vue-ui-radar-20QhOUer.js → vue-ui-radar-BllatzRa.js} +174 -165
  94. package/dist/{vue-ui-rating-Bbzm5nUK.cjs → vue-ui-rating-BoZo7caL.cjs} +1 -1
  95. package/dist/{vue-ui-rating-DRWJsve1.js → vue-ui-rating-D1ykV4xO.js} +2 -2
  96. package/dist/vue-ui-relation-circle-CKmjOle7.cjs +1 -0
  97. package/dist/{vue-ui-relation-circle-I45_Sk5l.js → vue-ui-relation-circle-xv2l5Be9.js} +142 -133
  98. package/dist/{vue-ui-rings-DG8GCi3y.js → vue-ui-rings-B-ZcX6y1.js} +165 -156
  99. package/dist/vue-ui-rings-DjH3CK23.cjs +2 -0
  100. package/dist/{vue-ui-scatter-Hqu5-F2H.js → vue-ui-scatter-DG43ck1g.js} +269 -260
  101. package/dist/vue-ui-scatter-SBCXAl7q.cjs +1 -0
  102. package/dist/{vue-ui-screenshot-D8nxd5RV.cjs → vue-ui-screenshot-C1JBP_N0.cjs} +1 -1
  103. package/dist/{vue-ui-screenshot-cjiqbtLK.js → vue-ui-screenshot-p3ca8cAl.js} +1 -1
  104. package/dist/{vue-ui-skeleton-aZmkNzAe.js → vue-ui-skeleton-BYssP0K4.js} +419 -379
  105. package/dist/vue-ui-skeleton-BqKzuhkB.cjs +41 -0
  106. package/dist/{vue-ui-smiley-B1TA19Hv.cjs → vue-ui-smiley-BXKVpHl2.cjs} +1 -1
  107. package/dist/{vue-ui-smiley-ChNvxygm.js → vue-ui-smiley-D7dDCdpq.js} +2 -2
  108. package/dist/vue-ui-spark-trend-9V60hM3Z.cjs +1 -0
  109. package/dist/{vue-ui-spark-trend-CQxELQcf.js → vue-ui-spark-trend-GWFrO_0z.js} +86 -79
  110. package/dist/vue-ui-sparkbar-Bgn6AY0q.cjs +1 -0
  111. package/dist/{vue-ui-sparkbar-0ixbKZzf.js → vue-ui-sparkbar-CwqlyAyv.js} +90 -83
  112. package/dist/vue-ui-sparkgauge-Dqntz2Zv.cjs +1 -0
  113. package/dist/{vue-ui-sparkgauge-pdYb7OwH.js → vue-ui-sparkgauge-F2XbiXyA.js} +57 -50
  114. package/dist/{vue-ui-sparkhistogram-N69h2q0U.js → vue-ui-sparkhistogram-DRIKK6Ym.js} +74 -67
  115. package/dist/vue-ui-sparkhistogram-DnY4-Sdn.cjs +1 -0
  116. package/dist/vue-ui-sparkline-CAEs-gtK.cjs +1 -0
  117. package/dist/{vue-ui-sparkline-2BKYZMOb.js → vue-ui-sparkline-Cxtzdlhi.js} +134 -125
  118. package/dist/{vue-ui-sparkstackbar-sh03cuOU.js → vue-ui-sparkstackbar-0A1klq9s.js} +84 -77
  119. package/dist/vue-ui-sparkstackbar-D37ms1rx.cjs +1 -0
  120. package/dist/{vue-ui-stackbar-B1si-1RM.js → vue-ui-stackbar-ByOuJSdM.js} +205 -196
  121. package/dist/{vue-ui-stackbar-Dy_saeSe.cjs → vue-ui-stackbar-wun4S3C0.cjs} +2 -2
  122. package/dist/{vue-ui-strip-plot-BYn-QrTQ.js → vue-ui-strip-plot-CMD0MSqY.js} +218 -209
  123. package/dist/vue-ui-strip-plot-IQrypGvz.cjs +1 -0
  124. package/dist/{vue-ui-table-DQORPCDJ.js → vue-ui-table-B75DJ39t.js} +1 -1
  125. package/dist/{vue-ui-table-Ce4waJaj.cjs → vue-ui-table-aj0XZ7T5.cjs} +1 -1
  126. package/dist/{vue-ui-table-heatmap-Csp7Tx8N.js → vue-ui-table-heatmap-BO2ugWqD.js} +55 -48
  127. package/dist/vue-ui-table-heatmap-Ce93TyBF.cjs +1 -0
  128. package/dist/{vue-ui-table-sparkline-DdwVrfUj.js → vue-ui-table-sparkline-CbjfAaj2.js} +88 -81
  129. package/dist/vue-ui-table-sparkline-D6KJjDnU.cjs +1 -0
  130. package/dist/{vue-ui-thermometer-I6ZnlfAv.js → vue-ui-thermometer-Pq4PvSIP.js} +67 -60
  131. package/dist/vue-ui-thermometer-swmi4FmH.cjs +1 -0
  132. package/dist/{vue-ui-timer-COOXcn14.cjs → vue-ui-timer-B6IB6yS6.cjs} +1 -1
  133. package/dist/{vue-ui-timer-pi1SazTU.js → vue-ui-timer-Bk3BvB-B.js} +6 -6
  134. package/dist/{vue-ui-tiremarks-vdPQYiDp.js → vue-ui-tiremarks-CU9HJIqf.js} +84 -77
  135. package/dist/vue-ui-tiremarks-Cn79uQH2.cjs +1 -0
  136. package/dist/vue-ui-treemap-BEMuKV7x.cjs +1 -0
  137. package/dist/{vue-ui-treemap-3FNUlKxL.js → vue-ui-treemap-DY-lRAhC.js} +211 -202
  138. package/dist/vue-ui-vertical-bar-B1e2RxTv.cjs +4 -0
  139. package/dist/{vue-ui-vertical-bar-DwxpB46q.js → vue-ui-vertical-bar-CtnIKsM1.js} +359 -350
  140. package/dist/vue-ui-waffle-BqP7Okgu.cjs +1 -0
  141. package/dist/{vue-ui-waffle-XecHJIc-.js → vue-ui-waffle-reOsx-gJ.js} +177 -168
  142. package/dist/vue-ui-wheel-BuWUGnkC.cjs +1 -0
  143. package/dist/{vue-ui-wheel-Bbih5sSL.js → vue-ui-wheel-kYxny3vn.js} +95 -86
  144. package/dist/{vue-ui-word-cloud-DnhXUn5x.js → vue-ui-word-cloud-DbMqrHAf.js} +192 -183
  145. package/dist/vue-ui-word-cloud-DwLY4QdB.cjs +1 -0
  146. package/dist/vue-ui-xy-CGWzriYn.cjs +3 -0
  147. package/dist/{vue-ui-xy-canvas-C8c2X5fk.js → vue-ui-xy-canvas-B0HTR7OV.js} +255 -246
  148. package/dist/vue-ui-xy-canvas-CgJd5FiT.cjs +9 -0
  149. package/dist/{vue-ui-xy-CqlRuFMc.js → vue-ui-xy-rbACig0h.js} +131 -122
  150. package/package.json +1 -1
  151. package/dist/index-FfZRtJ6A.cjs +0 -9
  152. package/dist/useResponsive-B3TrDDIG.cjs +0 -1
  153. package/dist/useResponsive-NZB-WLRF.js +0 -187
  154. package/dist/vue-ui-age-pyramid-BZcAwcVQ.cjs +0 -1
  155. package/dist/vue-ui-bullet-ChaEgXvR.cjs +0 -23
  156. package/dist/vue-ui-candlestick--hPCfMFH.cjs +0 -2
  157. package/dist/vue-ui-carousel-table-DpRQklDZ.cjs +0 -1
  158. package/dist/vue-ui-chestnut-ae6x87wl.cjs +0 -6
  159. package/dist/vue-ui-donut-CplNylps.cjs +0 -1
  160. package/dist/vue-ui-donut-evolution-CQpr-6IS.cjs +0 -1
  161. package/dist/vue-ui-dumbbell-_ijaYr8W.cjs +0 -9
  162. package/dist/vue-ui-flow-BPt35d5K.cjs +0 -1
  163. package/dist/vue-ui-galaxy-e06PkTmp.cjs +0 -1
  164. package/dist/vue-ui-gauge-DiZVIU0D.cjs +0 -1
  165. package/dist/vue-ui-heatmap-CbZcv_2I.cjs +0 -1
  166. package/dist/vue-ui-molecule-CbKMLrDT.cjs +0 -1
  167. package/dist/vue-ui-mood-radar-6LmFXuiw.cjs +0 -1
  168. package/dist/vue-ui-nested-donuts-DS0fjiLi.cjs +0 -17
  169. package/dist/vue-ui-onion-CLvvu4Ku.cjs +0 -5
  170. package/dist/vue-ui-parallel-coordinate-plot-BWg8OFqH.cjs +0 -8
  171. package/dist/vue-ui-quadrant-OM5J1mG3.cjs +0 -1
  172. package/dist/vue-ui-radar-CAaHjDO7.cjs +0 -1
  173. package/dist/vue-ui-relation-circle-BoGAFXuS.cjs +0 -1
  174. package/dist/vue-ui-rings-B9WQ7S5m.cjs +0 -2
  175. package/dist/vue-ui-scatter-BZfg1YIN.cjs +0 -1
  176. package/dist/vue-ui-skeleton-Djv08J67.cjs +0 -41
  177. package/dist/vue-ui-spark-trend-BqrPr63O.cjs +0 -1
  178. package/dist/vue-ui-sparkbar-CrTEPTU5.cjs +0 -1
  179. package/dist/vue-ui-sparkgauge-BYxpe_WV.cjs +0 -1
  180. package/dist/vue-ui-sparkhistogram-D21XDUH2.cjs +0 -1
  181. package/dist/vue-ui-sparkline-Cf4m-Fxo.cjs +0 -1
  182. package/dist/vue-ui-sparkstackbar-dAS8XoJs.cjs +0 -1
  183. package/dist/vue-ui-strip-plot-D53LABpZ.cjs +0 -1
  184. package/dist/vue-ui-table-heatmap-EqHt-O7Y.cjs +0 -1
  185. package/dist/vue-ui-table-sparkline-DONmVOMh.cjs +0 -1
  186. package/dist/vue-ui-thermometer-hQBkMa7u.cjs +0 -1
  187. package/dist/vue-ui-tiremarks-hdNqoGyd.cjs +0 -1
  188. package/dist/vue-ui-treemap-Cv0TSFQa.cjs +0 -1
  189. package/dist/vue-ui-vertical-bar-C--Ma0Dw.cjs +0 -4
  190. package/dist/vue-ui-waffle-CKM0QyJN.cjs +0 -1
  191. package/dist/vue-ui-wheel-C0dJrzOJ.cjs +0 -1
  192. package/dist/vue-ui-word-cloud-Cfd2wxsT.cjs +0 -1
  193. package/dist/vue-ui-xy-BDpqVzAq.cjs +0 -3
  194. package/dist/vue-ui-xy-canvas-Cansjd3L.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"),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-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=$;
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-DnVHQ2xI.js";
3
- import { u as F } from "./useNestedProp-Cox0K0Y5.js";
4
- import { _ as B } from "./PackageVersion-CvCRsT5_.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