vue-data-ui 2.6.6 → 2.6.8

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 (197) hide show
  1. package/dist/{Arrow-DFWjAvCY.js → Arrow-BHD3VBsD.js} +1 -1
  2. package/dist/{Arrow-BYqxz6UG.cjs → Arrow-YuEygGzC.cjs} +1 -1
  3. package/dist/{BaseIcon-COe_H-UB.cjs → BaseIcon-D326yPTV.cjs} +1 -1
  4. package/dist/{BaseIcon-t20JEZNG.js → BaseIcon-dThl5uNa.js} +1 -1
  5. package/dist/{DataTable-Du7nJ0TM.cjs → DataTable-CaD8j-SL.cjs} +1 -1
  6. package/dist/{DataTable-CJN0sipt.js → DataTable-D0-zzsJg.js} +2 -2
  7. package/dist/{Legend-CM7IGBC3.cjs → Legend-CEw2uq9s.cjs} +1 -1
  8. package/dist/{Legend-BDyPoYfp.js → Legend-Oaw0MY8Y.js} +2 -2
  9. package/dist/{PackageVersion-qeLvq6l8.cjs → PackageVersion-CCgJTyH9.cjs} +1 -1
  10. package/dist/{PackageVersion-DqmHcoqz.js → PackageVersion-J_USnljf.js} +1 -1
  11. package/dist/{PenAndPaper-6UYizrkQ.js → PenAndPaper-CoEXEMcN.js} +3 -3
  12. package/dist/{PenAndPaper-BYqaxOpk.cjs → PenAndPaper-DvNBHCpq.cjs} +1 -1
  13. package/dist/Shape-Cwx-wRaK.cjs +1 -0
  14. package/dist/{Shape-C_qIhG3J.js → Shape-Dtm6toQp.js} +26 -23
  15. package/dist/{Slicer-DPae3p1M.cjs → Slicer-7z_6bjyU.cjs} +1 -1
  16. package/dist/{Slicer-BQP3UIW-.js → Slicer-BAcq2vD0.js} +2 -2
  17. package/dist/{Title-BGiQdt7J.cjs → Title-BQSh4ukk.cjs} +1 -1
  18. package/dist/{Title-D6h1gTvZ.js → Title-DePxeqVl.js} +1 -1
  19. package/dist/{Tooltip-BonEVaob.js → Tooltip-DRw9RoFp.js} +23 -20
  20. package/dist/Tooltip-DtqrGu-Q.cjs +1 -0
  21. package/dist/{index-B9qF6XbP.js → index-CZlI7PiS.js} +1 -1
  22. package/dist/{index-kZKcQZM_.cjs → index-DD4PT0Pl.cjs} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/useChartAccessibility-BWojgys7.js +13 -0
  25. package/dist/useChartAccessibility-Cm7nkzTG.cjs +1 -0
  26. package/dist/{useNestedProp-g5oKzlVy.js → useNestedProp-Cg0NIwr6.js} +1 -1
  27. package/dist/{useNestedProp-D4Jn2Oxr.cjs → useNestedProp-DU7JFxpL.cjs} +1 -1
  28. package/dist/{usePrinter-DR42gTOS.cjs → usePrinter-BtJq2wwh.cjs} +1 -1
  29. package/dist/{usePrinter-DsiBLAy1.js → usePrinter-D-sSdR2l.js} +1 -1
  30. package/dist/{vue-data-ui-DB2kdhYH.js → vue-data-ui-Dh3BJvUF.js} +61 -61
  31. package/dist/{vue-data-ui-DbhVASfn.cjs → vue-data-ui-DzVmFW3P.cjs} +1 -1
  32. package/dist/vue-data-ui.cjs +1 -1
  33. package/dist/vue-data-ui.js +1 -1
  34. package/dist/{vue-ui-3d-bar-DHeSFJ5z.js → vue-ui-3d-bar-Ckd-GTWY.js} +171 -168
  35. package/dist/vue-ui-3d-bar-llxfgI9N.cjs +19 -0
  36. package/dist/{vue-ui-accordion-BfDu7hTY.cjs → vue-ui-accordion-2He8z0Sy.cjs} +1 -1
  37. package/dist/{vue-ui-accordion-DBmchkva.js → vue-ui-accordion-DVtmOO3I.js} +3 -3
  38. package/dist/{vue-ui-age-pyramid-CvUCPqxa.js → vue-ui-age-pyramid-BUGAES7K.js} +85 -82
  39. package/dist/vue-ui-age-pyramid-CxBb12yp.cjs +1 -0
  40. package/dist/{vue-ui-annotator-BV9t6ro7.cjs → vue-ui-annotator-BDUanFLb.cjs} +1 -1
  41. package/dist/{vue-ui-annotator-Dr5PLrJx.js → vue-ui-annotator-gIa7-tAI.js} +1 -1
  42. package/dist/vue-ui-bullet-Bg8f_RzX.cjs +34 -0
  43. package/dist/{vue-ui-bullet-D7Uw9tez.js → vue-ui-bullet-DNfzMdcg.js} +92 -89
  44. package/dist/vue-ui-candlestick-CnKPX6xB.cjs +2 -0
  45. package/dist/{vue-ui-candlestick-BFmh-zx1.js → vue-ui-candlestick-jErGIOZA.js} +155 -152
  46. package/dist/{vue-ui-carousel-table-CUhkylz_.js → vue-ui-carousel-table-DHyvpjWL.js} +4 -4
  47. package/dist/{vue-ui-carousel-table-C30Gvanv.cjs → vue-ui-carousel-table-DsY9Mrdg.cjs} +1 -1
  48. package/dist/vue-ui-chestnut-BTCxF3dU.cjs +6 -0
  49. package/dist/{vue-ui-chestnut-C53wdHmR.js → vue-ui-chestnut-kQjk4FqR.js} +186 -183
  50. package/dist/{vue-ui-circle-pack-Bj3sA7RV.js → vue-ui-circle-pack-BQbwIDRa.js} +99 -96
  51. package/dist/vue-ui-circle-pack-D-eMMNzU.cjs +1 -0
  52. package/dist/{vue-ui-cursor-ZBrt-jTo.cjs → vue-ui-cursor-Dd2eSMAz.cjs} +1 -1
  53. package/dist/{vue-ui-cursor-0GY46Ywr.js → vue-ui-cursor-xy62w2ep.js} +2 -2
  54. package/dist/{vue-ui-dashboard-BX787_or.js → vue-ui-dashboard-DPjU-kPn.js} +2 -2
  55. package/dist/{vue-ui-dashboard-pzZD8J2y.cjs → vue-ui-dashboard-nMODKstD.cjs} +1 -1
  56. package/dist/{vue-ui-digits-BvCMwL0L.js → vue-ui-digits-BNTE0Lsb.js} +2 -2
  57. package/dist/{vue-ui-digits-Blb8fghV.cjs → vue-ui-digits-Beuy8wvV.cjs} +1 -1
  58. package/dist/vue-ui-donut-DWKUDr7k.cjs +1 -0
  59. package/dist/vue-ui-donut-evolution-BICtQ8ke.cjs +1 -0
  60. package/dist/{vue-ui-donut-evolution-DRfJVMrP.js → vue-ui-donut-evolution-DfHfXqar.js} +133 -131
  61. package/dist/{vue-ui-donut-yBjSgsTz.js → vue-ui-donut-ipVF2Pk6.js} +158 -155
  62. package/dist/{vue-ui-dumbbell-4-hWZn-o.js → vue-ui-dumbbell-D04To0aO.js} +125 -122
  63. package/dist/vue-ui-dumbbell-DPZYa6RZ.cjs +9 -0
  64. package/dist/{vue-ui-flow-aH6xSdwn.js → vue-ui-flow-DYpBU4gG.js} +96 -93
  65. package/dist/vue-ui-flow-HFjfjzgX.cjs +1 -0
  66. package/dist/vue-ui-funnel-BwClLXO6.cjs +1 -0
  67. package/dist/{vue-ui-funnel-BZy4SvlW.js → vue-ui-funnel-CVQHETom.js} +88 -85
  68. package/dist/vue-ui-galaxy-B0W8yBZU.cjs +1 -0
  69. package/dist/{vue-ui-galaxy-GDXdZqjm.js → vue-ui-galaxy-DseGnRIL.js} +123 -120
  70. package/dist/vue-ui-gauge-0vhiDi19.cjs +1 -0
  71. package/dist/{vue-ui-gauge-CeyHdkuS.js → vue-ui-gauge-B7nCLtyI.js} +86 -83
  72. package/dist/{vue-ui-gizmo-veFxjktw.js → vue-ui-gizmo-C1fpqm2H.js} +3 -3
  73. package/dist/{vue-ui-gizmo-CRTzb1J_.cjs → vue-ui-gizmo-CTMnMH7C.cjs} +1 -1
  74. package/dist/{vue-ui-heatmap-BizLgjJ8.js → vue-ui-heatmap-B0a6TegZ.js} +109 -106
  75. package/dist/vue-ui-heatmap-DjxXVFyU.cjs +1 -0
  76. package/dist/vue-ui-history-plot-CfjWg_3c.cjs +1 -0
  77. package/dist/{vue-ui-history-plot-gzx5uGyY.js → vue-ui-history-plot-DsLgXpZ8.js} +130 -127
  78. package/dist/{vue-ui-kpi-CP08PB51.cjs → vue-ui-kpi-CTsWQvCi.cjs} +1 -1
  79. package/dist/{vue-ui-kpi-MdyAQjdJ.js → vue-ui-kpi-be1EaVNS.js} +3 -3
  80. package/dist/{vue-ui-mini-loader-CYVr1K6S.js → vue-ui-mini-loader-BHm2QQQF.js} +2 -2
  81. package/dist/{vue-ui-mini-loader-BRmtJ6az.cjs → vue-ui-mini-loader-DLdlPE48.cjs} +1 -1
  82. package/dist/{vue-ui-molecule-CJ05ddhf.js → vue-ui-molecule--G2QIMak.js} +147 -144
  83. package/dist/vue-ui-molecule-DQOP_2JN.cjs +1 -0
  84. package/dist/{vue-ui-mood-radar-DG1pF6Ii.js → vue-ui-mood-radar-Bhr5Q9pC.js} +97 -94
  85. package/dist/vue-ui-mood-radar-HxyTIDLP.cjs +1 -0
  86. package/dist/vue-ui-nested-donuts-C0aK_Cmr.cjs +17 -0
  87. package/dist/{vue-ui-nested-donuts-CDjZ6KfI.js → vue-ui-nested-donuts-Dtll0W-x.js} +99 -96
  88. package/dist/{vue-ui-onion-DsskQUiP.js → vue-ui-onion-CRRZ8ajr.js} +105 -102
  89. package/dist/vue-ui-onion-DJFv8ezH.cjs +5 -0
  90. package/dist/vue-ui-parallel-coordinate-plot-BTkf3dkR.cjs +8 -0
  91. package/dist/{vue-ui-parallel-coordinate-plot-D7r71vdp.js → vue-ui-parallel-coordinate-plot-DMk3iobe.js} +97 -94
  92. package/dist/vue-ui-quadrant-B7iHGaqG.cjs +1 -0
  93. package/dist/{vue-ui-quadrant-DCHEhvMX.js → vue-ui-quadrant-EcGC8p0U.js} +155 -152
  94. package/dist/vue-ui-quick-chart-BOla8Yse.cjs +15 -0
  95. package/dist/{vue-ui-quick-chart-BB5b4AQ1.js → vue-ui-quick-chart-D6AS1YSx.js} +164 -161
  96. package/dist/vue-ui-radar-DmM3tCiY.cjs +1 -0
  97. package/dist/{vue-ui-radar-CNEXWSEx.js → vue-ui-radar-LzAasUWm.js} +105 -102
  98. package/dist/{vue-ui-rating-ClvF4LPg.cjs → vue-ui-rating-D9K7meNL.cjs} +1 -1
  99. package/dist/{vue-ui-rating-DJLSl0-4.js → vue-ui-rating-DK4hwg8z.js} +2 -2
  100. package/dist/{vue-ui-relation-circle-Hdzt7fOS.js → vue-ui-relation-circle-CbOCYAmF.js} +127 -124
  101. package/dist/vue-ui-relation-circle-DIJuJZrt.cjs +1 -0
  102. package/dist/vue-ui-rings-BWgF92GG.cjs +2 -0
  103. package/dist/{vue-ui-rings-BAFkqjcL.js → vue-ui-rings-Cqzy5T3m.js} +114 -111
  104. package/dist/{vue-ui-scatter-Ca67EOrI.js → vue-ui-scatter-DXvyWQYL.js} +157 -154
  105. package/dist/vue-ui-scatter-F-gNKXpp.cjs +1 -0
  106. package/dist/{vue-ui-screenshot-CsdnwhSO.js → vue-ui-screenshot-BL75IkNz.js} +1 -1
  107. package/dist/{vue-ui-screenshot-CFcvBOJm.cjs → vue-ui-screenshot-BXngAa8V.cjs} +1 -1
  108. package/dist/{vue-ui-skeleton-CHEZlRpn.js → vue-ui-skeleton-D8r-yAkW.js} +3 -3
  109. package/dist/{vue-ui-skeleton-BBNX7lud.cjs → vue-ui-skeleton-Tk4j6G2D.cjs} +1 -1
  110. package/dist/{vue-ui-smiley-Dth6gRqg.js → vue-ui-smiley-BKWWVHh7.js} +2 -2
  111. package/dist/{vue-ui-smiley-EngC6Vc4.cjs → vue-ui-smiley-BLnMEG6Z.cjs} +1 -1
  112. package/dist/{vue-ui-spark-trend-33sBlF-n.js → vue-ui-spark-trend-Bb7xpmpt.js} +5 -5
  113. package/dist/{vue-ui-spark-trend-DJ8yhFMx.cjs → vue-ui-spark-trend-CqG-PKFp.cjs} +1 -1
  114. package/dist/{vue-ui-sparkbar-D9QLpB7G.cjs → vue-ui-sparkbar-0h661dcM.cjs} +1 -1
  115. package/dist/{vue-ui-sparkbar-mJu95295.js → vue-ui-sparkbar-JIpGYhbq.js} +4 -4
  116. package/dist/vue-ui-sparkgauge-BLglWMCN.cjs +1 -0
  117. package/dist/{vue-ui-sparkgauge-nFFf8h-x.js → vue-ui-sparkgauge-Cc-l_NLU.js} +56 -53
  118. package/dist/{vue-ui-sparkhistogram-Bh6R737O.js → vue-ui-sparkhistogram-BysifQmq.js} +93 -90
  119. package/dist/vue-ui-sparkhistogram-CCbcvIJ1.cjs +1 -0
  120. package/dist/vue-ui-sparkline-CDJX8K9i.cjs +1 -0
  121. package/dist/{vue-ui-sparkline-BfBiA1O5.js → vue-ui-sparkline-CV-N3Wio.js} +109 -106
  122. package/dist/vue-ui-sparkstackbar-Bo4JAlsR.cjs +1 -0
  123. package/dist/{vue-ui-sparkstackbar-BNTFNUIA.js → vue-ui-sparkstackbar-WOO_AbtI.js} +59 -56
  124. package/dist/{vue-ui-stackbar-BbFUifMU.js → vue-ui-stackbar-CP0igpri.js} +136 -133
  125. package/dist/vue-ui-stackbar-D7odU6jb.cjs +6 -0
  126. package/dist/vue-ui-strip-plot-CUqC58Ki.cjs +1 -0
  127. package/dist/{vue-ui-strip-plot-wsxpyqrw.js → vue-ui-strip-plot-_3AJWLnm.js} +127 -124
  128. package/dist/{vue-ui-table-DUokotBj.cjs → vue-ui-table-8O19epjz.cjs} +1 -1
  129. package/dist/{vue-ui-table-CQYM4uPf.js → vue-ui-table-WdE7p5Oy.js} +1 -1
  130. package/dist/{vue-ui-table-heatmap-OYQ9OOzo.js → vue-ui-table-heatmap-CXS6WfTi.js} +4 -4
  131. package/dist/{vue-ui-table-heatmap-Brk58nK_.cjs → vue-ui-table-heatmap-DH5kHmxx.cjs} +1 -1
  132. package/dist/{vue-ui-table-sparkline-DUjDhg8A.js → vue-ui-table-sparkline-CWwjANqk.js} +5 -5
  133. package/dist/{vue-ui-table-sparkline-C9dOsIAB.cjs → vue-ui-table-sparkline-DnvQfr2p.cjs} +1 -1
  134. package/dist/{vue-ui-thermometer-WSMSVcM_.js → vue-ui-thermometer-BxrDTquG.js} +84 -81
  135. package/dist/vue-ui-thermometer-COmtpPaq.cjs +1 -0
  136. package/dist/vue-ui-timer-Bx3W4oUc.cjs +64 -0
  137. package/dist/{vue-ui-timer-DBP_fRcm.js → vue-ui-timer-DjKCOw9A.js} +183 -180
  138. package/dist/vue-ui-tiremarks--XDyJeJg.cjs +1 -0
  139. package/dist/{vue-ui-tiremarks-WWgS2mqw.js → vue-ui-tiremarks-VWxcZxB-.js} +59 -56
  140. package/dist/{vue-ui-treemap-CXoXEuSA.js → vue-ui-treemap-BGFmZcII.js} +123 -120
  141. package/dist/vue-ui-treemap-DTwjydy8.cjs +1 -0
  142. package/dist/vue-ui-vertical-bar-Bpv8mXW2.cjs +4 -0
  143. package/dist/{vue-ui-vertical-bar-COaAa4nz.js → vue-ui-vertical-bar-DC9czKCT.js} +108 -105
  144. package/dist/vue-ui-waffle-B_6ZAnKt.cjs +1 -0
  145. package/dist/{vue-ui-waffle-DD8pT7JN.js → vue-ui-waffle-Cu63K9Iy.js} +107 -104
  146. package/dist/{vue-ui-wheel-BLlKekiu.js → vue-ui-wheel-AOt-pfpa.js} +75 -72
  147. package/dist/vue-ui-wheel-BQM-dxTa.cjs +1 -0
  148. package/dist/vue-ui-word-cloud-Bam3-7P_.cjs +1 -0
  149. package/dist/{vue-ui-word-cloud-CcYtTXW6.js → vue-ui-word-cloud-CrILrx6m.js} +97 -94
  150. package/dist/{vue-ui-xy-DYzfiZnJ.js → vue-ui-xy-BuLymzS3.js} +179 -150
  151. package/dist/vue-ui-xy-CSmObuR7.cjs +3 -0
  152. package/dist/{vue-ui-xy-canvas-CkB7VDhF.cjs → vue-ui-xy-canvas-BQ0Lbxbd.cjs} +2 -2
  153. package/dist/{vue-ui-xy-canvas-DqnK_i0Q.js → vue-ui-xy-canvas-DPnb5mqS.js} +82 -81
  154. package/package.json +1 -1
  155. package/dist/Shape-BN3-_2DI.cjs +0 -1
  156. package/dist/Tooltip-DSPKrQcQ.cjs +0 -1
  157. package/dist/vue-ui-3d-bar-DEu24HHj.cjs +0 -19
  158. package/dist/vue-ui-age-pyramid-CRYYDXFo.cjs +0 -1
  159. package/dist/vue-ui-bullet-Dy71N3Jf.cjs +0 -34
  160. package/dist/vue-ui-candlestick-aZ1YN4hh.cjs +0 -2
  161. package/dist/vue-ui-chestnut-DuycsDaB.cjs +0 -6
  162. package/dist/vue-ui-circle-pack-BFF5_9Sm.cjs +0 -1
  163. package/dist/vue-ui-donut-BO6RWqZ6.cjs +0 -1
  164. package/dist/vue-ui-donut-evolution-BgJMw_a4.cjs +0 -1
  165. package/dist/vue-ui-dumbbell-BSXxNjyK.cjs +0 -9
  166. package/dist/vue-ui-flow-LNlNIRfb.cjs +0 -1
  167. package/dist/vue-ui-funnel-BhDmLkFj.cjs +0 -1
  168. package/dist/vue-ui-galaxy-BcwAAgUh.cjs +0 -1
  169. package/dist/vue-ui-gauge-BCf-2H4T.cjs +0 -1
  170. package/dist/vue-ui-heatmap-Bxhy4dCf.cjs +0 -1
  171. package/dist/vue-ui-history-plot-CTBCFIG0.cjs +0 -1
  172. package/dist/vue-ui-molecule-pTMJG_3k.cjs +0 -1
  173. package/dist/vue-ui-mood-radar-DXLYUXbX.cjs +0 -1
  174. package/dist/vue-ui-nested-donuts-yztsnsjM.cjs +0 -17
  175. package/dist/vue-ui-onion-BgbKMVNe.cjs +0 -5
  176. package/dist/vue-ui-parallel-coordinate-plot-Cha1Em8k.cjs +0 -8
  177. package/dist/vue-ui-quadrant-BzYnR_Hc.cjs +0 -1
  178. package/dist/vue-ui-quick-chart-BcW7URue.cjs +0 -15
  179. package/dist/vue-ui-radar-D-XPVXa9.cjs +0 -1
  180. package/dist/vue-ui-relation-circle-DfxnHEqR.cjs +0 -1
  181. package/dist/vue-ui-rings-C9NFME3F.cjs +0 -2
  182. package/dist/vue-ui-scatter-D0UloS1C.cjs +0 -1
  183. package/dist/vue-ui-sparkgauge-CBCbyOG2.cjs +0 -1
  184. package/dist/vue-ui-sparkhistogram-BstSpbti.cjs +0 -1
  185. package/dist/vue-ui-sparkline-DTRZ-_Qw.cjs +0 -1
  186. package/dist/vue-ui-sparkstackbar-CuU8Vpcv.cjs +0 -1
  187. package/dist/vue-ui-stackbar-B5uNBkxp.cjs +0 -6
  188. package/dist/vue-ui-strip-plot-7G7BAGQM.cjs +0 -1
  189. package/dist/vue-ui-thermometer-VnlcJh4G.cjs +0 -1
  190. package/dist/vue-ui-timer-Bh8RpM2u.cjs +0 -64
  191. package/dist/vue-ui-tiremarks-Ct96o_fd.cjs +0 -1
  192. package/dist/vue-ui-treemap-BfDk53pM.cjs +0 -1
  193. package/dist/vue-ui-vertical-bar-EIy7A0dV.cjs +0 -4
  194. package/dist/vue-ui-waffle-BB3l0zZU.cjs +0 -1
  195. package/dist/vue-ui-wheel-DfpXZJ8A.cjs +0 -1
  196. package/dist/vue-ui-word-cloud-DdaMzF2e.cjs +0 -1
  197. package/dist/vue-ui-xy-B4Mzyy81.cjs +0 -3
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DD4PT0Pl.cjs"),A=require("./useNestedProp-DU7JFxpL.cjs"),G=require("./vue-ui-skeleton-Tk4j6G2D.cjs"),P=require("./useResponsive-YQYQrAZ_.cjs"),H=require("./PackageVersion-CCgJTyH9.cjs"),U=require("./useChartAccessibility-Cm7nkzTG.cjs"),X=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z=["id"],Y=["xmlns","viewBox"],J=["width","height"],K=["id"],Q=["stop-color"],ee=["stop-color"],te=["id"],le=["stop-color"],ae=["stop-color"],oe=["id"],re=["stop-color"],ne=["stop-color"],ue={key:1},se=["d","fill"],ie=["d","fill"],de=["d","stroke","stroke-width"],ce=["d","stroke","stroke-width"],ve=["x","y","width","height","fill","rx"],he=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ye=["x1","x2","y1","y2","stroke","stroke-dasharray","stroke-width"],fe=["cx","cy","r","fill","stroke","stroke-width"],pe=["x","y","font-size","font-weight","fill"],me=["x","y","height","width","onMouseenter","onClick"],ge={__name:"vue-ui-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},showInfo:{type:Boolean,default:!0},selectedIndex:{type:Number,default:void 0},heightRatio:{type:Number,default:1},forcedPadding:{type:Number,default:30}},emits:["hoverIndex","selectDatapoint"],setup(p,{emit:z}){const{vue_ui_sparkline:D}=r.useConfig(),s=p,b=e.computed(()=>Array.isArray(s.dataset)&&s.dataset.length>0),v=e.ref(r.createUid()),x=e.ref(null),V=e.ref(null),C=e.ref(null),t=e.computed({get:()=>L(),set:l=>l}),{svgRef:O}=U.useChartAccessibility({config:t.value.style.title});function L(){const l=A.useNestedProp({userConfig:s.config,defaultConfig:D});let o={};return l.theme?o={...A.useNestedProp({userConfig:r.themes.vue_ui_sparkline[l.theme]||s.config,defaultConfig:l})}:o=l,s.config&&r.hasDeepProperty(s.config,"style.scaleMin")?o.style.scaleMin=s.config.style.scaleMin:o.style.scaleMin=null,s.config&&r.hasDeepProperty(s.config,"style.scaleMax")?o.style.scaleMax=s.config.style.scaleMax:o.style.scaleMax=null,o}const _=e.computed(()=>r.largestTriangleThreeBucketsArrayObjects({data:s.dataset,threshold:t.value.downsample.threshold}));e.watch(()=>s.config,l=>{t.value=L(),$(),n.value.chartWidth=t.value.style.chartWidth},{deep:!0}),e.watch(()=>s.dataset,l=>{y.value=r.largestTriangleThreeBucketsArrayObjects({data:s.dataset.map(o=>({...o,value:[void 0].includes(o.value)?null:o.value})),threshold:t.value.downsample.threshold})},{deep:!0});const y=e.ref(T());function T(){return r.largestTriangleThreeBucketsArrayObjects({data:s.dataset.map(l=>t.value.style.animation.show&&s.dataset.length>1?{...l,value:null}:{...l,value:[void 0].includes(l.value)?null:l.value}),threshold:t.value.downsample.threshold})}const E=e.ref(null);e.onMounted(()=>{if($(),t.value.style.animation.show&&s.dataset.length>1){let a=function(){o<_.value.length?(y.value.push(_.value[o]),setTimeout(()=>{requestAnimationFrame(a)},l)):y.value=_.value,o+=1};y.value=[];const l=t.value.style.animation.animationFrames/s.dataset.length;let o=0;a()}});function $(){if(r.objectIsEmpty(s.dataset)?r.error({componentName:"VueUiSparkline",type:"dataset"}):s.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["period","value"]}).forEach(a=>{r.error({componentName:"VueUiSparkline",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=P.throttle(()=>{const{width:o,height:a}=P.useResponsive({chart:x.value,title:t.value.style.title.show&&s.showInfo?V.value:null,source:C.value});requestAnimationFrame(()=>{n.value.width=o,n.value.height=a,n.value.chartWidth=t.value.style.chartWidth/500*o,n.value.padding=s.forcedPadding/500*o})});E.value=new ResizeObserver(l),E.value.observe(x.value.parentNode)}}const n=e.ref({height:80*s.heightRatio,width:500,chartWidth:t.value.style.chartWidth,padding:s.forcedPadding}),w=z,u=e.computed(()=>{const{top:l,right:o,bottom:a,left:i}=t.value.style.padding;return{top:l,left:i,right:n.value.width-o,bottom:n.value.height-a,start:s.showInfo&&t.value.style.dataLabel.show&&t.value.style.dataLabel.position==="left"?n.value.width-n.value.chartWidth+i:n.value.padding+i,width:s.showInfo&&t.value.style.dataLabel.show?n.value.chartWidth-i-o:n.value.width-n.value.padding-i-o,height:n.value.height-l-a}}),N=e.computed(()=>[null,void 0].includes(t.value.style.scaleMin)?Math.min(...y.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0)):t.value.style.scaleMin),W=e.computed(()=>[null,void 0].includes(t.value.style.scaleMax)?Math.max(...y.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0)):t.value.style.scaleMax),g=e.computed(()=>{const l=N.value>=0?0:N.value;return Math.abs(l)}),M=e.computed(()=>W.value+g.value),m=e.computed(()=>u.value.bottom-u.value.height*B(g.value));function B(l){return isNaN(l/M.value)?0:l/M.value}const f=e.computed(()=>_.value.length-1),d=e.computed(()=>y.value.map((l,o)=>{const a=isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0,i=u.value.width/(f.value+1)>n.padding?n.padding:u.value.width/(f.value+1);return{absoluteValue:a,period:l.period,plotValue:a+g.value,toMax:B(a+g.value),x:u.value.start+o*(i>u.value.width/12?u.value.width/12:i),y:u.value.bottom-u.value.height*B(a+g.value),id:`plot_${v.value}_${o}`,color:k.value?t.value.style.bar.color:t.value.style.area.useGradient?r.shiftHue(t.value.style.line.color,.05*(1-o/f.value)):t.value.style.line.color,width:i>u.value.width/12?u.value.width/12:i}})),q=e.computed(()=>{const l={x:d.value[0].x||0,y:(n.value.height||0)-6},o={x:d.value[d.value.length-1].x||0,y:(n.value.height||0)-6},a=[];return d.value.forEach(i=>{a.push(`${i.x||0},${i.y||0} `)}),[l.x,l.y,...a,o.x,o.y].toString()}),c=e.ref(void 0);function F(l,o){c.value=l,w("hoverIndex",{index:o})}function R(){c.value=void 0,w("hoverIndex",{index:void 0})}const h=e.computed(()=>{if(b.value){const l=d.value.map(a=>a.absoluteValue),o=l.reduce((a,i)=>a+i,0);return{latest:d.value[d.value.length-1].absoluteValue,sum:o,average:o/d.value.length,median:r.calcMedian(l),trend:r.calcLinearProgression(d.value.map(({x:a,y:i,absoluteValue:S})=>({x:a,y:i,value:S}))).trend}}else return{latest:null,sum:null,average:null,median:null,trend:null}}),I=e.computed(()=>b.value?t.value.style.dataLabel.valueType==="latest"?h.value.latest:t.value.style.dataLabel.valueType==="sum"?h.value.sum:t.value.style.dataLabel.valueType==="average"?h.value.average:0:0),k=e.computed(()=>t.value.type&&t.value.type==="bar");function j(l,o){w("selectDatapoint",{datapoint:l,index:o})}return(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"sparklineChart",ref:x,class:"vue-ui-sparkline",id:v.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};`)},[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps({selected:c.value,latest:h.value.latest,sum:h.value.sum,average:h.value.average,median:h.value.median,trend:h.value.trend})),void 0,!0),t.value.style.title.show&&p.showInfo?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:V,class:"vue-ui-sparkline-title",style:e.normalizeStyle(`display:flex;align-items:center;width:100%;color:${t.value.style.title.color};background:${t.value.style.backgroundColor};justify-content:${t.value.style.title.textAlign==="left"?"flex-start":t.value.style.title.textAlign==="right"?"flex-end":"center"};height:${t.value.style.title.fontSize*2}px;font-size:${t.value.style.title.fontSize}px;font-weight:${t.value.style.title.bold?"bold":"normal"};`)},[e.createElementVNode("span",{style:e.normalizeStyle(`padding:${t.value.style.title.textAlign==="left"?"0 0 0 12px":t.value.style.title.textAlign==="right"?"0 12px 0 0":"0"}`)},e.toDisplayString(c.value?c.value.period:t.value.style.title.text),5)],4)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:1,ref_key:"svgRef",ref:O,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};overflow:visible`)},[e.createVNode(H._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,J)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkline_gradient_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.area.color,.05),t.value.style.area.opacity)},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ee)],8,K),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_pos_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.bar.color},null,8,le),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.shiftHue)(t.value.style.bar.color,.05)},null,8,ae)],8,te),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_neg_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.shiftHue)(t.value.style.bar.color,.05)},null,8,re),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.bar.color},null,8,ne)],8,oe)]),t.value.style.area.show&&!k.value&&d.value[0]?(e.openBlock(),e.createElementBlock("g",ue,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${d.value[0].x},${u.value.bottom} ${e.unref(r.createSmoothPath)(d.value)} L ${d.value.at(-1).x},${u.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,se)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${q.value}Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ie))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${e.unref(r.createSmoothPath)(d.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,de)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${e.unref(r.createStraightPath)(d.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,ce)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,i)=>(e.openBlock(),e.createElementBlock("g",null,[k.value?(e.openBlock(),e.createElementBlock("rect",{key:0,x:a.x-a.width/2,y:isNaN(a.absoluteValue>0?a.y:m.value)?0:a.absoluteValue>0?a.y:m.value,width:a.width,height:isNaN(Math.abs(a.y-m.value))?0:Math.abs(a.y-m.value),fill:a.absoluteValue>0?`url(#sparkline_bar_gradient_pos_${v.value})`:`url(#sparkline_bar_gradient_neg_${v.value})`,rx:t.value.style.bar.borderRadius},null,8,ve)):e.createCommentVNode("",!0),t.value.style.verticalIndicator.show&&(c.value&&a.id===c.value.id||p.selectedIndex===i)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:a.x,x2:a.x,y1:u.value.top-6,y2:u.value.bottom,stroke:t.value.style.verticalIndicator.color||a.color,"stroke-width":t.value.style.verticalIndicator.strokeWidth,"stroke-linecap":"round","stroke-dasharray":t.value.style.verticalIndicator.strokeDasharray||0},null,8,he)):e.createCommentVNode("",!0)]))),256)),N.value<0?(e.openBlock(),e.createElementBlock("line",{key:4,x1:u.value.start,x2:u.value.start+u.value.width-16,y1:e.unref(r.forceValidValue)(m.value,u.value.bottom),y2:e.unref(r.forceValidValue)(m.value,u.value.bottom),stroke:t.value.style.zeroLine.color,"stroke-dasharray":t.value.style.zeroLine.strokeWidth*2,"stroke-width":t.value.style.zeroLine.strokeWidth,"stroke-linecap":"round"},null,8,ye)):e.createCommentVNode("",!0),t.value.style.plot.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:5},e.renderList(d.value,(a,i)=>(e.openBlock(),e.createElementBlock("g",null,[c.value&&a.id===c.value.id||p.selectedIndex===i||p.dataset.length===1?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:a.x,cy:a.y,r:t.value.style.plot.radius,fill:a.color,stroke:t.value.style.plot.stroke,"stroke-width":t.value.style.plot.strokeWidth},null,8,fe)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),p.showInfo&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:6,x:t.value.style.dataLabel.position==="left"?12+t.value.style.dataLabel.offsetX:u.value.width+12+t.value.style.dataLabel.offsetX,y:n.value.height/2+t.value.style.dataLabel.fontSize/2.5+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,"font-weight":t.value.style.dataLabel.bold?"bold":"normal",fill:t.value.style.dataLabel.color},e.toDisplayString(c.value?e.unref(r.applyDataLabel)(t.value.style.dataLabel.formatter,c.value.absoluteValue,e.unref(r.dataLabel)({p:t.value.style.dataLabel.prefix,v:c.value.absoluteValue,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}),{datapoint:c.value}):e.unref(r.applyDataLabel)(t.value.style.dataLabel.formatter,I.value,e.unref(r.dataLabel)({p:t.value.style.dataLabel.prefix,v:I.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}))),9,pe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,i)=>(e.openBlock(),e.createElementBlock("rect",{x:a.x-(u.value.width/(f.value+1)>n.value.padding?n.value.padding:u.value.width/(f.value+1))/2,y:u.value.top-6,height:u.value.height+6,width:u.value.width/(f.value+1)>n.value.padding?n.value.padding:u.value.width/(f.value+1),fill:"transparent",onMouseenter:S=>F(a,i),onMouseleave:R,onClick:()=>j(a,i)},null,40,me))),256)),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],12,Y)):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"source",ref:C,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(G.default,{key:3,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,Z))}},ke=X._export_sfc(ge,[["__scopeId","data-v-e4d46f5e"]]);exports.default=ke;
@@ -1,11 +1,12 @@
1
- import { computed as c, ref as m, watch as X, onMounted as ie, createElementBlock as i, openBlock as r, normalizeStyle as M, renderSlot as C, createCommentVNode as h, createBlock as de, normalizeProps as ve, guardReactiveProps as ce, createElementVNode as f, toDisplayString as q, unref as v, createVNode as he, Fragment as D, renderList as P } from "vue";
2
- import { u as ye, c as fe, a as pe, C as Z, a0 as T, o as ge, e as H, g as me, w as I, a1 as be, a2 as ke, X as _e, s as V, S as Y, R as we, a3 as J, i as K, f as Q } from "./index-B9qF6XbP.js";
3
- import { u as ee } from "./useNestedProp-g5oKzlVy.js";
4
- import xe from "./vue-ui-skeleton-CHEZlRpn.js";
5
- import { t as $e, u as Ne } from "./useResponsive-BWapHhVH.js";
6
- import { _ as Le } from "./PackageVersion-DqmHcoqz.js";
7
- import { _ as Me } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
- const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["id"], Ae = ["stop-color"], ze = ["stop-color"], We = ["id"], De = ["stop-color"], Pe = ["stop-color"], Te = ["id"], Fe = ["stop-color"], Oe = ["stop-color"], Be = { key: 1 }, Ee = ["d", "fill"], Ge = ["d", "fill"], Re = ["d", "stroke", "stroke-width"], je = ["d", "stroke", "stroke-width"], Ue = ["x", "y", "width", "height", "fill", "rx"], Xe = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], qe = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], Ze = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], He = ["x", "y", "font-size", "font-weight", "fill"], Ye = ["x", "y", "height", "width", "onMouseenter", "onClick"], Je = {
1
+ import { computed as c, ref as m, watch as X, onMounted as de, createElementBlock as i, openBlock as n, normalizeStyle as M, renderSlot as C, createCommentVNode as h, createBlock as ve, normalizeProps as ce, guardReactiveProps as he, createElementVNode as f, toDisplayString as q, unref as v, createVNode as ye, Fragment as D, renderList as P } from "vue";
2
+ import { u as fe, c as pe, a as ge, C as Z, a0 as R, o as me, e as H, g as be, w as I, a1 as ke, a2 as _e, X as we, s as V, S as Y, R as xe, a3 as J, i as K, f as Q } from "./index-CZlI7PiS.js";
3
+ import { u as ee } from "./useNestedProp-Cg0NIwr6.js";
4
+ import $e from "./vue-ui-skeleton-D8r-yAkW.js";
5
+ import { t as Ne, u as Le } from "./useResponsive-BWapHhVH.js";
6
+ import { _ as Me } from "./PackageVersion-J_USnljf.js";
7
+ import { u as Ce } from "./useChartAccessibility-BWojgys7.js";
8
+ import { _ as Ie } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
+ const Ve = ["id"], Ae = ["xmlns", "viewBox"], Se = ["width", "height"], ze = ["id"], We = ["stop-color"], De = ["stop-color"], Pe = ["id"], Re = ["stop-color"], Te = ["stop-color"], Fe = ["id"], Oe = ["stop-color"], Be = ["stop-color"], Ee = { key: 1 }, Ge = ["d", "fill"], je = ["d", "fill"], Ue = ["d", "stroke", "stroke-width"], Xe = ["d", "stroke", "stroke-width"], qe = ["x", "y", "width", "height", "fill", "rx"], Ze = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], He = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], Ye = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Je = ["x", "y", "font-size", "font-weight", "fill"], Ke = ["x", "y", "height", "width", "onMouseenter", "onClick"], Qe = {
9
10
  __name: "vue-ui-sparkline",
10
11
  props: {
11
12
  config: {
@@ -39,11 +40,11 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
39
40
  },
40
41
  emits: ["hoverIndex", "selectDatapoint"],
41
42
  setup(_, { emit: te }) {
42
- const { vue_ui_sparkline: ae } = ye(), o = _, N = c(() => Array.isArray(o.dataset) && o.dataset.length > 0), p = m(fe()), S = m(null), F = m(null), O = m(null), e = c({
43
- get: () => B(),
43
+ const { vue_ui_sparkline: ae } = fe(), o = _, N = c(() => Array.isArray(o.dataset) && o.dataset.length > 0), p = m(pe()), A = m(null), T = m(null), F = m(null), e = c({
44
+ get: () => O(),
44
45
  set: (t) => t
45
- });
46
- function B() {
46
+ }), { svgRef: le } = Ce({ config: e.value.style.title });
47
+ function O() {
47
48
  const t = ee({
48
49
  userConfig: o.config,
49
50
  defaultConfig: ae
@@ -51,19 +52,19 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
51
52
  let l = {};
52
53
  return t.theme ? l = {
53
54
  ...ee({
54
- userConfig: pe.vue_ui_sparkline[t.theme] || o.config,
55
+ userConfig: ge.vue_ui_sparkline[t.theme] || o.config,
55
56
  defaultConfig: t
56
57
  })
57
58
  } : l = t, o.config && Z(o.config, "style.scaleMin") ? l.style.scaleMin = o.config.style.scaleMin : l.style.scaleMin = null, o.config && Z(o.config, "style.scaleMax") ? l.style.scaleMax = o.config.style.scaleMax : l.style.scaleMax = null, l;
58
59
  }
59
- const L = c(() => T({
60
+ const L = c(() => R({
60
61
  data: o.dataset,
61
62
  threshold: e.value.downsample.threshold
62
63
  }));
63
64
  X(() => o.config, (t) => {
64
- e.value = B(), G(), s.value.chartWidth = e.value.style.chartWidth;
65
+ e.value = O(), E(), s.value.chartWidth = e.value.style.chartWidth;
65
66
  }, { deep: !0 }), X(() => o.dataset, (t) => {
66
- b.value = T({
67
+ b.value = R({
67
68
  data: o.dataset.map((l) => ({
68
69
  ...l,
69
70
  value: [void 0].includes(l.value) ? null : l.value
@@ -71,9 +72,9 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
71
72
  threshold: e.value.downsample.threshold
72
73
  });
73
74
  }, { deep: !0 });
74
- const b = m(le());
75
- function le() {
76
- return T({
75
+ const b = m(se());
76
+ function se() {
77
+ return R({
77
78
  data: o.dataset.map((t) => e.value.style.animation.show && o.dataset.length > 1 ? {
78
79
  ...t,
79
80
  value: null
@@ -84,9 +85,9 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
84
85
  threshold: e.value.downsample.threshold
85
86
  });
86
87
  }
87
- const E = m(null);
88
- ie(() => {
89
- if (G(), e.value.style.animation.show && o.dataset.length > 1) {
88
+ const B = m(null);
89
+ de(() => {
90
+ if (E(), e.value.style.animation.show && o.dataset.length > 1) {
90
91
  let a = function() {
91
92
  l < L.value.length ? (b.value.push(L.value[l]), setTimeout(() => {
92
93
  requestAnimationFrame(a);
@@ -98,12 +99,12 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
98
99
  a();
99
100
  }
100
101
  });
101
- function G() {
102
- if (ge(o.dataset) ? H({
102
+ function E() {
103
+ if (me(o.dataset) ? H({
103
104
  componentName: "VueUiSparkline",
104
105
  type: "dataset"
105
106
  }) : o.dataset.forEach((t, l) => {
106
- me({
107
+ be({
107
108
  datasetObject: t,
108
109
  requiredAttributes: ["period", "value"]
109
110
  }).forEach((a) => {
@@ -115,17 +116,17 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
115
116
  });
116
117
  });
117
118
  }), e.value.responsive) {
118
- const t = $e(() => {
119
- const { width: l, height: a } = Ne({
120
- chart: S.value,
121
- title: e.value.style.title.show && o.showInfo ? F.value : null,
122
- source: O.value
119
+ const t = Ne(() => {
120
+ const { width: l, height: a } = Le({
121
+ chart: A.value,
122
+ title: e.value.style.title.show && o.showInfo ? T.value : null,
123
+ source: F.value
123
124
  });
124
125
  requestAnimationFrame(() => {
125
126
  s.value.width = l, s.value.height = a, s.value.chartWidth = e.value.style.chartWidth / 500 * l, s.value.padding = o.forcedPadding / 500 * l;
126
127
  });
127
128
  });
128
- E.value = new ResizeObserver(t), E.value.observe(S.value.parentNode);
129
+ B.value = new ResizeObserver(t), B.value.observe(A.value.parentNode);
129
130
  }
130
131
  }
131
132
  const s = m({
@@ -133,60 +134,60 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
133
134
  width: 500,
134
135
  chartWidth: e.value.style.chartWidth,
135
136
  padding: o.forcedPadding
136
- }), A = te, u = c(() => {
137
- const { top: t, right: l, bottom: a, left: n } = e.value.style.padding;
137
+ }), S = te, u = c(() => {
138
+ const { top: t, right: l, bottom: a, left: r } = e.value.style.padding;
138
139
  return {
139
140
  top: t,
140
- left: n,
141
+ left: r,
141
142
  right: s.value.width - l,
142
143
  bottom: s.value.height - a,
143
- start: o.showInfo && e.value.style.dataLabel.show && e.value.style.dataLabel.position === "left" ? s.value.width - s.value.chartWidth + n : s.value.padding + n,
144
- width: o.showInfo && e.value.style.dataLabel.show ? s.value.chartWidth - n - l : s.value.width - s.value.padding - n - l,
144
+ start: o.showInfo && e.value.style.dataLabel.show && e.value.style.dataLabel.position === "left" ? s.value.width - s.value.chartWidth + r : s.value.padding + r,
145
+ width: o.showInfo && e.value.style.dataLabel.show ? s.value.chartWidth - r - l : s.value.width - s.value.padding - r - l,
145
146
  height: s.value.height - t - a
146
147
  };
147
- }), z = c(() => [null, void 0].includes(e.value.style.scaleMin) ? Math.min(...b.value.map((t) => isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0)) : e.value.style.scaleMin), se = c(() => [null, void 0].includes(e.value.style.scaleMax) ? Math.max(...b.value.map((t) => isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0)) : e.value.style.scaleMax), x = c(() => {
148
+ }), z = c(() => [null, void 0].includes(e.value.style.scaleMin) ? Math.min(...b.value.map((t) => isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0)) : e.value.style.scaleMin), ue = c(() => [null, void 0].includes(e.value.style.scaleMax) ? Math.max(...b.value.map((t) => isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0)) : e.value.style.scaleMax), x = c(() => {
148
149
  const t = z.value >= 0 ? 0 : z.value;
149
150
  return Math.abs(t);
150
- }), R = c(() => se.value + x.value), w = c(() => u.value.bottom - u.value.height * W(x.value));
151
+ }), G = c(() => ue.value + x.value), w = c(() => u.value.bottom - u.value.height * W(x.value));
151
152
  function W(t) {
152
- return isNaN(t / R.value) ? 0 : t / R.value;
153
+ return isNaN(t / G.value) ? 0 : t / G.value;
153
154
  }
154
155
  const k = c(() => L.value.length - 1), d = c(() => b.value.map((t, l) => {
155
- const a = isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0, n = u.value.width / (k.value + 1) > s.padding ? s.padding : u.value.width / (k.value + 1);
156
+ const a = isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0, r = u.value.width / (k.value + 1) > s.padding ? s.padding : u.value.width / (k.value + 1);
156
157
  return {
157
158
  absoluteValue: a,
158
159
  period: t.period,
159
160
  plotValue: a + x.value,
160
161
  toMax: W(a + x.value),
161
- x: u.value.start + l * (n > u.value.width / 12 ? u.value.width / 12 : n),
162
+ x: u.value.start + l * (r > u.value.width / 12 ? u.value.width / 12 : r),
162
163
  y: u.value.bottom - u.value.height * W(a + x.value),
163
164
  id: `plot_${p.value}_${l}`,
164
165
  color: $.value ? e.value.style.bar.color : e.value.style.area.useGradient ? I(e.value.style.line.color, 0.05 * (1 - l / k.value)) : e.value.style.line.color,
165
- width: n > u.value.width / 12 ? u.value.width / 12 : n
166
+ width: r > u.value.width / 12 ? u.value.width / 12 : r
166
167
  };
167
- })), ue = c(() => {
168
+ })), oe = c(() => {
168
169
  const t = { x: d.value[0].x || 0, y: (s.value.height || 0) - 6 }, l = { x: d.value[d.value.length - 1].x || 0, y: (s.value.height || 0) - 6 }, a = [];
169
- return d.value.forEach((n) => {
170
- a.push(`${n.x || 0},${n.y || 0} `);
170
+ return d.value.forEach((r) => {
171
+ a.push(`${r.x || 0},${r.y || 0} `);
171
172
  }), [t.x, t.y, ...a, l.x, l.y].toString();
172
173
  }), y = m(void 0);
173
- function oe(t, l) {
174
- y.value = t, A("hoverIndex", { index: l });
174
+ function re(t, l) {
175
+ y.value = t, S("hoverIndex", { index: l });
175
176
  }
176
177
  function ne() {
177
- y.value = void 0, A("hoverIndex", { index: void 0 });
178
+ y.value = void 0, S("hoverIndex", { index: void 0 });
178
179
  }
179
180
  const g = c(() => {
180
181
  if (N.value) {
181
- const t = d.value.map((a) => a.absoluteValue), l = t.reduce((a, n) => a + n, 0);
182
+ const t = d.value.map((a) => a.absoluteValue), l = t.reduce((a, r) => a + r, 0);
182
183
  return {
183
184
  latest: d.value[d.value.length - 1].absoluteValue,
184
185
  sum: l,
185
186
  average: l / d.value.length,
186
- median: ke(t),
187
- trend: be(d.value.map(({ x: a, y: n, absoluteValue: U }) => ({
187
+ median: _e(t),
188
+ trend: ke(d.value.map(({ x: a, y: r, absoluteValue: U }) => ({
188
189
  x: a,
189
- y: n,
190
+ y: r,
190
191
  value: U
191
192
  }))).trend
192
193
  };
@@ -199,17 +200,17 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
199
200
  trend: null
200
201
  };
201
202
  }), j = c(() => N.value ? e.value.style.dataLabel.valueType === "latest" ? g.value.latest : e.value.style.dataLabel.valueType === "sum" ? g.value.sum : e.value.style.dataLabel.valueType === "average" ? g.value.average : 0 : 0), $ = c(() => e.value.type && e.value.type === "bar");
202
- function re(t, l) {
203
- A("selectDatapoint", { datapoint: t, index: l });
203
+ function ie(t, l) {
204
+ S("selectDatapoint", { datapoint: t, index: l });
204
205
  }
205
- return (t, l) => (r(), i("div", {
206
+ return (t, l) => (n(), i("div", {
206
207
  ref_key: "sparklineChart",
207
- ref: S,
208
+ ref: A,
208
209
  class: "vue-ui-sparkline",
209
210
  id: p.value,
210
211
  style: M(`width:100%;font-family:${e.value.style.fontFamily};`)
211
212
  }, [
212
- C(t.$slots, "before", ve(ce({
213
+ C(t.$slots, "before", ce(he({
213
214
  selected: y.value,
214
215
  latest: g.value.latest,
215
216
  sum: g.value.sum,
@@ -217,10 +218,10 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
217
218
  median: g.value.median,
218
219
  trend: g.value.trend
219
220
  })), void 0, !0),
220
- e.value.style.title.show && _.showInfo ? (r(), i("div", {
221
+ e.value.style.title.show && _.showInfo ? (n(), i("div", {
221
222
  key: 0,
222
223
  ref_key: "chartTitle",
223
- ref: F,
224
+ ref: T,
224
225
  class: "vue-ui-sparkline-title",
225
226
  style: M(`display:flex;align-items:center;width:100%;color:${e.value.style.title.color};background:${e.value.style.backgroundColor};justify-content:${e.value.style.title.textAlign === "left" ? "flex-start" : e.value.style.title.textAlign === "right" ? "flex-end" : "center"};height:${e.value.style.title.fontSize * 2}px;font-size:${e.value.style.title.fontSize}px;font-weight:${e.value.style.title.bold ? "bold" : "normal"};`)
226
227
  }, [
@@ -228,14 +229,16 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
228
229
  style: M(`padding:${e.value.style.title.textAlign === "left" ? "0 0 0 12px" : e.value.style.title.textAlign === "right" ? "0 12px 0 0" : "0"}`)
229
230
  }, q(y.value ? y.value.period : e.value.style.title.text), 5)
230
231
  ], 4)) : h("", !0),
231
- N.value ? (r(), i("svg", {
232
+ N.value ? (n(), i("svg", {
232
233
  key: 1,
233
- xmlns: v(_e),
234
+ ref_key: "svgRef",
235
+ ref: le,
236
+ xmlns: v(we),
234
237
  viewBox: `0 0 ${s.value.width} ${s.value.height}`,
235
238
  style: M(`background:${e.value.style.backgroundColor};overflow:visible`)
236
239
  }, [
237
- he(Le),
238
- t.$slots["chart-background"] ? (r(), i("foreignObject", {
240
+ ye(Me),
241
+ t.$slots["chart-background"] ? (n(), i("foreignObject", {
239
242
  key: 0,
240
243
  x: 0,
241
244
  y: 0,
@@ -246,7 +249,7 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
246
249
  }
247
250
  }, [
248
251
  C(t.$slots, "chart-background", {}, void 0, !0)
249
- ], 8, Ve)) : h("", !0),
252
+ ], 8, Se)) : h("", !0),
250
253
  f("defs", null, [
251
254
  f("linearGradient", {
252
255
  x1: "0%",
@@ -258,12 +261,12 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
258
261
  f("stop", {
259
262
  offset: "0%",
260
263
  "stop-color": v(V)(v(I)(e.value.style.area.color, 0.05), e.value.style.area.opacity)
261
- }, null, 8, Ae),
264
+ }, null, 8, We),
262
265
  f("stop", {
263
266
  offset: "100%",
264
267
  "stop-color": v(V)(e.value.style.area.color, e.value.style.area.opacity)
265
- }, null, 8, ze)
266
- ], 8, Se),
268
+ }, null, 8, De)
269
+ ], 8, ze),
267
270
  f("linearGradient", {
268
271
  x2: "0%",
269
272
  y2: "100%",
@@ -272,12 +275,12 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
272
275
  f("stop", {
273
276
  offset: "0%",
274
277
  "stop-color": e.value.style.bar.color
275
- }, null, 8, De),
278
+ }, null, 8, Re),
276
279
  f("stop", {
277
280
  offset: "100%",
278
281
  "stop-color": v(I)(e.value.style.bar.color, 0.05)
279
- }, null, 8, Pe)
280
- ], 8, We),
282
+ }, null, 8, Te)
283
+ ], 8, Pe),
281
284
  f("linearGradient", {
282
285
  x2: "0%",
283
286
  y2: "100%",
@@ -286,42 +289,42 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
286
289
  f("stop", {
287
290
  offset: "0%",
288
291
  "stop-color": v(I)(e.value.style.bar.color, 0.05)
289
- }, null, 8, Fe),
292
+ }, null, 8, Oe),
290
293
  f("stop", {
291
294
  offset: "100%",
292
295
  "stop-color": e.value.style.bar.color
293
- }, null, 8, Oe)
294
- ], 8, Te)
296
+ }, null, 8, Be)
297
+ ], 8, Fe)
295
298
  ]),
296
- e.value.style.area.show && !$.value && d.value[0] ? (r(), i("g", Be, [
297
- e.value.style.line.smooth ? (r(), i("path", {
299
+ e.value.style.area.show && !$.value && d.value[0] ? (n(), i("g", Ee, [
300
+ e.value.style.line.smooth ? (n(), i("path", {
298
301
  key: 0,
299
302
  d: `M ${d.value[0].x},${u.value.bottom} ${v(Y)(d.value)} L ${d.value.at(-1).x},${u.value.bottom} Z`,
300
303
  fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : v(V)(e.value.style.area.color, e.value.style.area.opacity)
301
- }, null, 8, Ee)) : (r(), i("path", {
304
+ }, null, 8, Ge)) : (n(), i("path", {
302
305
  key: 1,
303
- d: `M${ue.value}Z`,
306
+ d: `M${oe.value}Z`,
304
307
  fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : v(V)(e.value.style.area.color, e.value.style.area.opacity)
305
- }, null, 8, Ge))
308
+ }, null, 8, je))
306
309
  ])) : h("", !0),
307
- e.value.style.line.smooth && !$.value ? (r(), i("path", {
310
+ e.value.style.line.smooth && !$.value ? (n(), i("path", {
308
311
  key: 2,
309
312
  d: `M ${v(Y)(d.value)}`,
310
313
  stroke: e.value.style.line.color,
311
314
  fill: "none",
312
315
  "stroke-width": e.value.style.line.strokeWidth,
313
316
  "stroke-linecap": "round"
314
- }, null, 8, Re)) : h("", !0),
315
- !e.value.style.line.smooth && !$.value ? (r(), i("path", {
317
+ }, null, 8, Ue)) : h("", !0),
318
+ !e.value.style.line.smooth && !$.value ? (n(), i("path", {
316
319
  key: 3,
317
- d: `M ${v(we)(d.value)}`,
320
+ d: `M ${v(xe)(d.value)}`,
318
321
  stroke: e.value.style.line.color,
319
322
  fill: "none",
320
323
  "stroke-width": e.value.style.line.strokeWidth,
321
324
  "stroke-linecap": "round"
322
- }, null, 8, je)) : h("", !0),
323
- (r(!0), i(D, null, P(d.value, (a, n) => (r(), i("g", null, [
324
- $.value ? (r(), i("rect", {
325
+ }, null, 8, Xe)) : h("", !0),
326
+ (n(!0), i(D, null, P(d.value, (a, r) => (n(), i("g", null, [
327
+ $.value ? (n(), i("rect", {
325
328
  key: 0,
326
329
  x: a.x - a.width / 2,
327
330
  y: isNaN(a.absoluteValue > 0 ? a.y : w.value) ? 0 : a.absoluteValue > 0 ? a.y : w.value,
@@ -329,8 +332,8 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
329
332
  height: isNaN(Math.abs(a.y - w.value)) ? 0 : Math.abs(a.y - w.value),
330
333
  fill: a.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${p.value})` : `url(#sparkline_bar_gradient_neg_${p.value})`,
331
334
  rx: e.value.style.bar.borderRadius
332
- }, null, 8, Ue)) : h("", !0),
333
- e.value.style.verticalIndicator.show && (y.value && a.id === y.value.id || _.selectedIndex === n) ? (r(), i("line", {
335
+ }, null, 8, qe)) : h("", !0),
336
+ e.value.style.verticalIndicator.show && (y.value && a.id === y.value.id || _.selectedIndex === r) ? (n(), i("line", {
334
337
  key: 1,
335
338
  x1: a.x,
336
339
  x2: a.x,
@@ -340,9 +343,9 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
340
343
  "stroke-width": e.value.style.verticalIndicator.strokeWidth,
341
344
  "stroke-linecap": "round",
342
345
  "stroke-dasharray": e.value.style.verticalIndicator.strokeDasharray || 0
343
- }, null, 8, Xe)) : h("", !0)
346
+ }, null, 8, Ze)) : h("", !0)
344
347
  ]))), 256)),
345
- z.value < 0 ? (r(), i("line", {
348
+ z.value < 0 ? (n(), i("line", {
346
349
  key: 4,
347
350
  x1: u.value.start,
348
351
  x2: u.value.start + u.value.width - 16,
@@ -352,9 +355,9 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
352
355
  "stroke-dasharray": e.value.style.zeroLine.strokeWidth * 2,
353
356
  "stroke-width": e.value.style.zeroLine.strokeWidth,
354
357
  "stroke-linecap": "round"
355
- }, null, 8, qe)) : h("", !0),
356
- e.value.style.plot.show ? (r(!0), i(D, { key: 5 }, P(d.value, (a, n) => (r(), i("g", null, [
357
- y.value && a.id === y.value.id || _.selectedIndex === n || _.dataset.length === 1 ? (r(), i("circle", {
358
+ }, null, 8, He)) : h("", !0),
359
+ e.value.style.plot.show ? (n(!0), i(D, { key: 5 }, P(d.value, (a, r) => (n(), i("g", null, [
360
+ y.value && a.id === y.value.id || _.selectedIndex === r || _.dataset.length === 1 ? (n(), i("circle", {
358
361
  key: 0,
359
362
  cx: a.x,
360
363
  cy: a.y,
@@ -362,9 +365,9 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
362
365
  fill: a.color,
363
366
  stroke: e.value.style.plot.stroke,
364
367
  "stroke-width": e.value.style.plot.strokeWidth
365
- }, null, 8, Ze)) : h("", !0)
368
+ }, null, 8, Ye)) : h("", !0)
366
369
  ]))), 256)) : h("", !0),
367
- _.showInfo && e.value.style.dataLabel.show ? (r(), i("text", {
370
+ _.showInfo && e.value.style.dataLabel.show ? (n(), i("text", {
368
371
  key: 6,
369
372
  x: e.value.style.dataLabel.position === "left" ? 12 + e.value.style.dataLabel.offsetX : u.value.width + 12 + e.value.style.dataLabel.offsetX,
370
373
  y: s.value.height / 2 + e.value.style.dataLabel.fontSize / 2.5 + e.value.style.dataLabel.offsetY,
@@ -380,28 +383,28 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
380
383
  e.value.style.dataLabel.formatter,
381
384
  j.value,
382
385
  v(Q)({ p: e.value.style.dataLabel.prefix, v: j.value, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue })
383
- )), 9, He)) : h("", !0),
384
- (r(!0), i(D, null, P(d.value, (a, n) => (r(), i("rect", {
386
+ )), 9, Je)) : h("", !0),
387
+ (n(!0), i(D, null, P(d.value, (a, r) => (n(), i("rect", {
385
388
  x: a.x - (u.value.width / (k.value + 1) > s.value.padding ? s.value.padding : u.value.width / (k.value + 1)) / 2,
386
389
  y: u.value.top - 6,
387
390
  height: u.value.height + 6,
388
391
  width: u.value.width / (k.value + 1) > s.value.padding ? s.value.padding : u.value.width / (k.value + 1),
389
392
  fill: "transparent",
390
- onMouseenter: (U) => oe(a, n),
393
+ onMouseenter: (U) => re(a, r),
391
394
  onMouseleave: ne,
392
- onClick: () => re(a, n)
393
- }, null, 40, Ye))), 256)),
395
+ onClick: () => ie(a, r)
396
+ }, null, 40, Ke))), 256)),
394
397
  C(t.$slots, "svg", { svg: s.value }, void 0, !0)
395
- ], 12, Ie)) : h("", !0),
396
- t.$slots.source ? (r(), i("div", {
398
+ ], 12, Ae)) : h("", !0),
399
+ t.$slots.source ? (n(), i("div", {
397
400
  key: 2,
398
401
  ref_key: "source",
399
- ref: O,
402
+ ref: F,
400
403
  dir: "auto"
401
404
  }, [
402
405
  C(t.$slots, "source", {}, void 0, !0)
403
406
  ], 512)) : h("", !0),
404
- N.value ? h("", !0) : (r(), de(xe, {
407
+ N.value ? h("", !0) : (n(), ve($e, {
405
408
  key: 3,
406
409
  config: {
407
410
  type: "sparkline",
@@ -413,9 +416,9 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
413
416
  }
414
417
  }
415
418
  }, null, 8, ["config"]))
416
- ], 12, Ce));
419
+ ], 12, Ve));
417
420
  }
418
- }, ut = /* @__PURE__ */ Me(Je, [["__scopeId", "data-v-e25baba2"]]);
421
+ }, nt = /* @__PURE__ */ Ie(Qe, [["__scopeId", "data-v-e4d46f5e"]]);
419
422
  export {
420
- ut as default
423
+ nt as default
421
424
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-DD4PT0Pl.cjs"),V=require("./useNestedProp-DU7JFxpL.cjs"),U=require("./vue-ui-skeleton-Tk4j6G2D.cjs"),M=require("./PackageVersion-CCgJTyH9.cjs"),j=require("./Tooltip-DtqrGu-Q.cjs"),R=require("./useChartAccessibility-Cm7nkzTG.cjs"),H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),I=["xmlns","viewBox"],W=["id"],Y=["stop-color"],G=["stop-color"],X=["stop-color"],J={id:"stackPill",clipPathUnits:"objectBoundingBox"},K=["fill"],Q={key:0,"clip-path":"url(#stackPill)"},Z=["x","width","height","fill"],ee=["x","width","height","fill","stroke"],te=["onClick","x","width","height","onMouseenter"],le=["width","height","rx"],oe=["onClick"],ae={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"4px","justify-content":"center"}},re=["height","width"],ne=["fill"],se={key:4,ref:"source",dir:"auto"},ue={__name:"vue-ui-sparkstackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(P,{emit:D}){const{vue_ui_sparkstackbar:L}=a.useConfig(),u=P,F=e.useSlots();e.onMounted(()=>{F["chart-background"]&&console.warn("VueUiSparkStackbar does not support the #chart-background slot.")});const x=e.computed(()=>!!u.dataset&&u.dataset.length),B=e.ref(null),S=e.ref(a.createUid()),b=e.ref(!1),C=e.ref(""),t=e.computed({get:()=>$(),set:l=>l}),{svgRef:A}=R.useChartAccessibility({config:t.value.style.title});function $(){const l=V.useNestedProp({userConfig:u.config,defaultConfig:L});return l.theme?{...V.useNestedProp({userConfig:a.themes.vue_ui_sparkstackbar[l.theme]||u.config,defaultConfig:l}),customPalette:a.themePalettes[l.theme]||a.palette}:l}e.watch(()=>u.config,l=>{t.value=$(),E()},{deep:!0}),e.watch(()=>u.dataset,l=>{p.value=u.dataset.map((n,o)=>({...n,color:n.color?a.convertColorToHex(n.color):f.value[o]||a.palette[o]||a.palette[o%a.palette.length]}))},{deep:!0});const f=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),p=e.ref(u.dataset.map((l,n)=>({...l,value:t.value.style.animation.show?0:l.value||0,color:l.color?a.convertColorToHex(l.color):f.value[n]||a.palette[n]||a.palette[n%a.palette.length]}))),g=e.ref(!0);e.onMounted(()=>{if(E(),t.value.style.animation.show){let v=function(){r+=o/l,r<o?(p.value=p.value.map((s,i)=>({...s,value:s.value+=n[i],color:s.color?a.convertColorToHex(s.color):f.value[i]||a.palette[i]||a.palette[i%a.palette.length]})),requestAnimationFrame(v)):(g.value=!1,p.value=u.dataset.map((s,i)=>({...s,value:s.value||0,color:s.color?a.convertColorToHex(s.color):f.value[i]||a.palette[i]||a.palette[i%a.palette.length],id:a.createUid()})))};const l=t.value.style.animation.animationFrames,n=u.dataset.map((s,i)=>s.value/l),o=u.dataset.map(s=>s.value||0).reduce((s,i)=>s+i,0);let r=0;g.value=!0,v()}});function E(){a.objectIsEmpty(u.dataset)?a.error({componentName:"VueUiSparkStackbar",type:"dataset"}):u.dataset.forEach((l,n)=>{a.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(o=>{a.error({componentName:"VueUiSparkStackbar",type:"datasetSerieAttribute",property:o,index:n})})})}const c=e.ref({width:500,height:16}),d=e.ref([]),N=e.computed(()=>u.dataset.map(l=>l.value||0).filter((l,n)=>!d.value.includes(n)).reduce((l,n)=>l+n,0)),y=e.computed(()=>p.value.map((l,n)=>{const o=l.value||0,r=o/N.value,v=isNaN(r)?0:r,s=v*c.value.width;return{...l,value:o,proportion:v,width:s,proportionLabel:a.dataLabel({v:v*100,s:"%",r:t.value.style.legend.percentage.rounding})}})),_=e.computed(()=>y.value.filter((l,n)=>!d.value.includes(n)));function T(l){d.value.includes(l)?d.value=d.value.filter(n=>n!==l):d.value.length<p.value.length-1&&d.value.push(l)}const h=e.computed(()=>{let l=0;const n=[];for(let o=0;o<_.value.length;o+=1)n.push({..._.value[o],start:l}),l+=_.value[o].width;return n}),q=D;function z(l,n){q("selectDatapoint",{datapoint:l,index:n})}const w=e.ref(null),k=e.ref(!1),m=e.ref(null);function O({datapoint:l,seriesIndex:n}){if(!t.value.style.tooltip.show)return;w.value={datapoint:l,seriesIndex:n,config:t.value,series:y.value},b.value=!0,m.value=n;const o=t.value.style.tooltip.customFormat;if(a.isFunction(o))try{const r=o({seriesIndex:n,datapoint:l,series:y.value,config:t.value});typeof r=="string"&&(C.value=r,k.value=!0)}catch{console.warn("Custom format cannot be applied."),k.value=!1}if(!k.value){let r="";r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,r+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,r+=`<b>${l.proportionLabel}</b>`,r+=`<span>(${a.applyDataLabel(t.value.style.legend.value.formatter,l.value,a.dataLabel({p:t.value.style.legend.value.prefix,v:l.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}),{datapoint:l,seriesIndex:n})})</span>`,C.value=`<div>${r}</div>`}}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-stackbar",ref_key:"sparkstackbarChart",ref:B,style:e.normalizeStyle(`width:100%; background:${t.value.style.backgroundColor}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{class:"atom-title",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"atom-subtitle",style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:1,ref_key:"svgRef",ref:A,xmlns:e.unref(a.XMLNS),width:"100%",viewBox:`0 0 ${c.value.width} ${c.value.height}`},[e.createVNode(M._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`stack_gradient_${r}`,gradientTransform:"rotate(90)",id:`stack_gradient_${r}_${S.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,Y),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(o.color,.05),100-t.value.style.bar.gradient.intensity)},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,X)],8,W))),128)),e.createElementVNode("clipPath",J,[e.createElementVNode("rect",{x:"0.005",y:"-2",width:"0.99",height:"5",rx:"3",ry:"3",fill:t.value.style.backgroundColor},null,8,K)])]),N.value>0?(e.openBlock(),e.createElementBlock("g",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_underlayer_${r}`,x:o.start,y:0,width:o.width,height:c.value.height,fill:t.value.style.bar.gradient.underlayerColor,class:e.normalizeClass({animated:!g.value}),style:e.normalizeStyle({opacity:m.value!==null&&t.value.style.tooltip.show?m.value===r?1:.5:1})},null,14,Z))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_${r}`,x:o.start,y:0,width:o.width,height:c.value.height,fill:t.value.style.bar.gradient.show?`url(#stack_gradient_${r}_${S.value})`:o.color,stroke:t.value.style.backgroundColor,"stroke-linecap":"round",class:e.normalizeClass({animated:!g.value}),style:e.normalizeStyle({opacity:m.value!==null&&t.value.style.tooltip.show?m.value===r?1:.5:1})},null,14,ee))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_trap_${r}`,onClick:()=>z(o,r),x:o.start,y:0,width:o.width,height:c.value.height,fill:"transparent",stroke:"none",class:e.normalizeClass({animated:!g.value}),onMouseenter:()=>O({datapoint:o,seriesIndex:r}),onMouseleave:n[0]||(n[0]=v=>{b.value=!1,m.value=null})},null,42,te))),128))])):(e.openBlock(),e.createElementBlock("rect",{key:1,x:2,y:1,width:c.value.width-4,height:c.value.height-2,stroke:"#CCCCCC","stroke-width":"2",fill:"transparent",rx:(c.value.height-4)/2},null,8,le))],8,I)):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(U.default,{key:2,config:{type:"sparkStackbar",style:{backgroundColor:t.value.style.backgroundColor,sparkStackbar:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.legend.show?(e.openBlock(),e.createElementBlock("div",{key:3,style:e.normalizeStyle(`background:transparent;margin:0 auto;margin:${t.value.style.legend.margin};justify-content:${t.value.style.legend.textAlign==="left"?"flex-start":t.value.style.legend.textAlign==="right"?"flex-end":"center"}`),class:"vue-ui-sparkstackbar-legend"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(o,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-size:${t.value.style.legend.fontSize}px;`),class:e.normalizeClass({"vue-ui-sparkstackbar-legend-item":!0,"vue-ui-sparkstackbar-legend-item-unselected":d.value.includes(r)}),onClick:v=>{T(r),z(o,r)}},[e.createElementVNode("div",ae,[(e.openBlock(),e.createElementBlock("svg",{height:`${t.value.style.legend.fontSize}px`,width:`${t.value.style.legend.fontSize}px`,viewBox:"0 0 10 10"},[e.createElementVNode("circle",{cx:5,cy:5,r:5,fill:o.color},null,8,ne)],8,re)),e.createElementVNode("span",{style:e.normalizeStyle(`color:${t.value.style.legend.name.color}; font-weight:${t.value.style.legend.name.bold?"bold":"normal"}`)},e.toDisplayString(o.name),5),t.value.style.legend.percentage.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.legend.percentage.bold?"bold":"normal"};color:${t.value.style.legend.percentage.color}`)},e.toDisplayString(d.value.includes(r)?" - ":o.proportionLabel),5)):e.createCommentVNode("",!0),t.value.style.legend.value.show?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-weight:${t.value.style.legend.value.bold?"bold":"normal"};color:${t.value.style.legend.value.color}`)}," ("+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.legend.value.formatter,o.value,e.unref(a.dataLabel)({p:t.value.style.legend.value.prefix,v:o.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}),{datapoint:o,seriesIndex:r}))+") ",5)):e.createCommentVNode("",!0)])],14,oe))),256))],4)):e.createCommentVNode("",!0),e.createVNode(j._sfc_main,{show:b.value&&t.value.style.tooltip.show,parent:B.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,fontSize:t.value.style.tooltip.fontSize,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,content:C.value,isCustom:k.value,offsetY:-124+t.value.style.tooltip.offsetY,blockShiftY:!0},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...w.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...w.value})),void 0,!0)]),_:3},8,["show","parent","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","content","isCustom","offsetY"]),l.$slots.source?(e.openBlock(),e.createElementBlock("div",se,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],4))}},ie=H._export_sfc(ue,[["__scopeId","data-v-7955299f"]]);exports.default=ie;