vue-data-ui 2.6.5 → 2.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/dist/{Arrow-DfGZcZu4.js → Arrow-BxUmDF04.js} +1 -1
  2. package/dist/{Arrow-CyeGXbbD.cjs → Arrow-PPbxds1Q.cjs} +1 -1
  3. package/dist/{BaseIcon-B5DvqSYe.cjs → BaseIcon-BmVwfJg2.cjs} +1 -1
  4. package/dist/{BaseIcon-BzuvxztF.js → BaseIcon-CDx9pxUG.js} +1 -1
  5. package/dist/{DataTable-zpYtivMM.cjs → DataTable-Cv_TVAas.cjs} +1 -1
  6. package/dist/{DataTable-BCCBpyhr.js → DataTable-TjJIVFlL.js} +2 -2
  7. package/dist/{Legend-CJkkmRNE.cjs → Legend-DunrYGuw.cjs} +1 -1
  8. package/dist/{Legend-CyJrN721.js → Legend-NKGwxkI7.js} +2 -2
  9. package/dist/{PackageVersion-Dv25_ZxF.cjs → PackageVersion-DJKkRuOD.cjs} +1 -1
  10. package/dist/{PackageVersion-PZr4BkQ5.js → PackageVersion-QRvxRYPv.js} +1 -1
  11. package/dist/{PenAndPaper-Cniu2YEX.js → PenAndPaper-CxC1lWGK.js} +3 -3
  12. package/dist/{PenAndPaper-Cx3_Liuv.cjs → PenAndPaper-MTTJ3Gd9.cjs} +1 -1
  13. package/dist/{Shape-BXTmpde5.js → Shape-58uyOuYc.js} +26 -23
  14. package/dist/Shape-D_1vUjCL.cjs +1 -0
  15. package/dist/{Slicer-DzKrIvL0.cjs → Slicer-BGEieXKn.cjs} +1 -1
  16. package/dist/{Slicer-D3tEQT9Z.js → Slicer-C7ormJRw.js} +2 -2
  17. package/dist/{Title-CXBc1TH6.js → Title-BI8etrRU.js} +1 -1
  18. package/dist/{Title-DdUtciJN.cjs → Title-Dk92HYMu.cjs} +1 -1
  19. package/dist/Tooltip-ClMeqejQ.cjs +1 -0
  20. package/dist/{Tooltip-C9lPh5bN.js → Tooltip-Cxc8c50d.js} +23 -20
  21. package/dist/{index-DLCyjPV0.js → index-9EeNZMz1.js} +6 -1
  22. package/dist/index-DEnRHTzk.cjs +9 -0
  23. package/dist/style.css +1 -1
  24. package/dist/types/vue-data-ui.d.cts +89 -62
  25. package/dist/types/vue-data-ui.d.ts +89 -62
  26. package/dist/useChartAccessibility-BWojgys7.js +13 -0
  27. package/dist/useChartAccessibility-Cm7nkzTG.cjs +1 -0
  28. package/dist/{useNestedProp-BdTohsDJ.cjs → useNestedProp-BNT60LxO.cjs} +1 -1
  29. package/dist/{useNestedProp-q86V3_LA.js → useNestedProp-df_bKQEI.js} +1 -1
  30. package/dist/{usePrinter-CPqTP09H.cjs → usePrinter-dyVny55M.cjs} +1 -1
  31. package/dist/{usePrinter-CpHZjw3G.js → usePrinter-ngrh00Ym.js} +1 -1
  32. package/dist/{vue-data-ui-CR9Dof80.cjs → vue-data-ui-BYX-I7HQ.cjs} +1 -1
  33. package/dist/{vue-data-ui-CzqznXmA.js → vue-data-ui-CDD7JcMs.js} +61 -61
  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-DvHdA_uo.js → vue-ui-3d-bar-BArLjlrc.js} +171 -168
  37. package/dist/vue-ui-3d-bar-DegdXf_S.cjs +19 -0
  38. package/dist/{vue-ui-accordion-FM16tlk7.cjs → vue-ui-accordion-D2qxHGzp.cjs} +1 -1
  39. package/dist/{vue-ui-accordion-DR2qjfsa.js → vue-ui-accordion-Qo8JxnIN.js} +3 -3
  40. package/dist/{vue-ui-age-pyramid-BoXxK9_W.js → vue-ui-age-pyramid-Biz02m7c.js} +85 -82
  41. package/dist/vue-ui-age-pyramid-kpaaJ2Gx.cjs +1 -0
  42. package/dist/{vue-ui-annotator-5tI8NuFh.cjs → vue-ui-annotator-By6XNYm0.cjs} +1 -1
  43. package/dist/{vue-ui-annotator-D4kCCpAK.js → vue-ui-annotator-MXs48Lua.js} +1 -1
  44. package/dist/{vue-ui-bullet-X3Xa_OZ6.js → vue-ui-bullet-CtBs_r3I.js} +92 -89
  45. package/dist/vue-ui-bullet-Dkz6vX0T.cjs +34 -0
  46. package/dist/vue-ui-candlestick-DiEUIuW8.cjs +2 -0
  47. package/dist/{vue-ui-candlestick-BTW5toA5.js → vue-ui-candlestick-gPztmuJE.js} +155 -152
  48. package/dist/{vue-ui-carousel-table-Cmnwv9Y3.cjs → vue-ui-carousel-table-CYeXP21y.cjs} +1 -1
  49. package/dist/{vue-ui-carousel-table-D7s_SrJR.js → vue-ui-carousel-table-D9ckYNKZ.js} +4 -4
  50. package/dist/{vue-ui-chestnut-DN9EZShg.js → vue-ui-chestnut-DWjn-jcN.js} +186 -183
  51. package/dist/vue-ui-chestnut-oZtRERnV.cjs +6 -0
  52. package/dist/{vue-ui-circle-pack-ts3rurGX.js → vue-ui-circle-pack-Bz5yVvAM.js} +99 -96
  53. package/dist/vue-ui-circle-pack-DCJ6N00S.cjs +1 -0
  54. package/dist/{vue-ui-cursor-SW96fYT3.js → vue-ui-cursor-BrrVDy1u.js} +2 -2
  55. package/dist/{vue-ui-cursor-CpWkrHpR.cjs → vue-ui-cursor-DZhRygRy.cjs} +1 -1
  56. package/dist/{vue-ui-dashboard-BZcfgajg.js → vue-ui-dashboard-DEmGN8Js.js} +2 -2
  57. package/dist/{vue-ui-dashboard-Buh9xBz-.cjs → vue-ui-dashboard-o8Ju_cXW.cjs} +1 -1
  58. package/dist/{vue-ui-digits-rB78vJRR.cjs → vue-ui-digits-CgyYdrQ5.cjs} +1 -1
  59. package/dist/{vue-ui-digits-C00yOT24.js → vue-ui-digits-DbOrROu7.js} +2 -2
  60. package/dist/vue-ui-donut-9pWaRwf3.cjs +1 -0
  61. package/dist/{vue-ui-donut-BkGR2Q-_.js → vue-ui-donut-CP5uWglM.js} +158 -156
  62. package/dist/{vue-ui-donut-evolution-B7WrjiTO.js → vue-ui-donut-evolution-BAMD1wQ5.js} +133 -131
  63. package/dist/vue-ui-donut-evolution-Ci_gIrkO.cjs +1 -0
  64. package/dist/{vue-ui-dumbbell-gQadUH53.js → vue-ui-dumbbell-CFYd-Ypn.js} +125 -122
  65. package/dist/vue-ui-dumbbell-DUNYoZxT.cjs +9 -0
  66. package/dist/{vue-ui-flow-CqSTZbgP.js → vue-ui-flow-CdvGWFzv.js} +96 -93
  67. package/dist/vue-ui-flow-W89ofPB-.cjs +1 -0
  68. package/dist/{vue-ui-funnel-Jr9TMTsq.js → vue-ui-funnel-DYutKyoz.js} +88 -85
  69. package/dist/vue-ui-funnel-RvdVrhFu.cjs +1 -0
  70. package/dist/{vue-ui-galaxy-BrQ10tPo.js → vue-ui-galaxy-BCBRlYS1.js} +123 -120
  71. package/dist/vue-ui-galaxy-Djdx-ca8.cjs +1 -0
  72. package/dist/{vue-ui-gauge-DOMio6Mv.js → vue-ui-gauge-BNAAZt4F.js} +86 -83
  73. package/dist/vue-ui-gauge-BVVmf09x.cjs +1 -0
  74. package/dist/{vue-ui-gizmo-SKS1idHb.js → vue-ui-gizmo-BFQ_KgLX.js} +3 -3
  75. package/dist/{vue-ui-gizmo-C3NimqVM.cjs → vue-ui-gizmo-Ceh0oFY3.cjs} +1 -1
  76. package/dist/vue-ui-heatmap-CiZpI-tA.cjs +1 -0
  77. package/dist/{vue-ui-heatmap-l4vCjb6f.js → vue-ui-heatmap-Ct3qaBv7.js} +109 -106
  78. package/dist/vue-ui-history-plot-Ci8Y2EFg.cjs +1 -0
  79. package/dist/{vue-ui-history-plot-B05tJML1.js → vue-ui-history-plot-shn74MJ6.js} +130 -127
  80. package/dist/{vue-ui-kpi-DF4U5E1w.js → vue-ui-kpi-B_pV-2JJ.js} +3 -3
  81. package/dist/{vue-ui-kpi-DQJr571M.cjs → vue-ui-kpi-DfYrbxlX.cjs} +1 -1
  82. package/dist/{vue-ui-mini-loader-BMARnOW4.js → vue-ui-mini-loader-BFnWQs5p.js} +2 -2
  83. package/dist/{vue-ui-mini-loader-BZkVKkqn.cjs → vue-ui-mini-loader-LIqf62jk.cjs} +1 -1
  84. package/dist/vue-ui-molecule-D8YuYTKv.cjs +1 -0
  85. package/dist/{vue-ui-molecule-C1ycekVJ.js → vue-ui-molecule-DNz1m8XZ.js} +147 -144
  86. package/dist/{vue-ui-mood-radar-_Kd-Lhpm.js → vue-ui-mood-radar-DiYB_zhM.js} +97 -94
  87. package/dist/vue-ui-mood-radar-uvH7qUHy.cjs +1 -0
  88. package/dist/{vue-ui-nested-donuts-DIwRSn-O.js → vue-ui-nested-donuts-9hn-g4ir.js} +99 -96
  89. package/dist/vue-ui-nested-donuts-C7ikDjp7.cjs +17 -0
  90. package/dist/vue-ui-onion-5Rqvd4Fw.cjs +5 -0
  91. package/dist/{vue-ui-onion-Dqb0gwGl.js → vue-ui-onion-DCWfNTNu.js} +105 -102
  92. package/dist/{vue-ui-parallel-coordinate-plot-De-tYNNy.js → vue-ui-parallel-coordinate-plot-CaPFL9_1.js} +97 -94
  93. package/dist/vue-ui-parallel-coordinate-plot-tlgTbaNX.cjs +8 -0
  94. package/dist/vue-ui-quadrant-B0Sw5NGo.cjs +1 -0
  95. package/dist/{vue-ui-quadrant-BQ5maxJq.js → vue-ui-quadrant-BoQZ375K.js} +155 -153
  96. package/dist/vue-ui-quick-chart-D3zV1d7t.cjs +15 -0
  97. package/dist/{vue-ui-quick-chart-DF_510YT.js → vue-ui-quick-chart-vfMN8F1q.js} +164 -161
  98. package/dist/{vue-ui-radar-DDHd0AYs.js → vue-ui-radar-CAuu6wkh.js} +129 -127
  99. package/dist/vue-ui-radar-CNMJCAwo.cjs +1 -0
  100. package/dist/{vue-ui-rating-Chi3OOtp.js → vue-ui-rating-Bm0HZ3du.js} +2 -2
  101. package/dist/{vue-ui-rating-D9kQcY2a.cjs → vue-ui-rating-dsRDRL98.cjs} +1 -1
  102. package/dist/{vue-ui-relation-circle-CV1xQOok.js → vue-ui-relation-circle-5OZMN9jR.js} +127 -124
  103. package/dist/vue-ui-relation-circle-iD7BufNH.cjs +1 -0
  104. package/dist/{vue-ui-rings-D2ezwyae.js → vue-ui-rings-COefBaQT.js} +114 -112
  105. package/dist/vue-ui-rings-DC4WG4sK.cjs +2 -0
  106. package/dist/vue-ui-scatter-5ny76dmi.cjs +1 -0
  107. package/dist/{vue-ui-scatter-BxbUYPk1.js → vue-ui-scatter-DhO83TZZ.js} +157 -154
  108. package/dist/{vue-ui-screenshot-Bc7Lv1i8.cjs → vue-ui-screenshot-DABH_phE.cjs} +1 -1
  109. package/dist/{vue-ui-screenshot-cxDgcXJB.js → vue-ui-screenshot-brillPo5.js} +1 -1
  110. package/dist/{vue-ui-skeleton-D6ojufhb.js → vue-ui-skeleton-BmJiYGtE.js} +3 -3
  111. package/dist/{vue-ui-skeleton-DvdPnQbR.cjs → vue-ui-skeleton-_DN0U6W6.cjs} +1 -1
  112. package/dist/{vue-ui-smiley-DEJ6S-We.cjs → vue-ui-smiley-CW6714mb.cjs} +1 -1
  113. package/dist/{vue-ui-smiley-9nGRDSn7.js → vue-ui-smiley-D9NRimij.js} +2 -2
  114. package/dist/{vue-ui-spark-trend-DiNeAGXR.js → vue-ui-spark-trend-BKZj03CQ.js} +5 -5
  115. package/dist/{vue-ui-spark-trend-BosbwgVe.cjs → vue-ui-spark-trend-expbkxgR.cjs} +1 -1
  116. package/dist/{vue-ui-sparkbar-DNf_Majv.js → vue-ui-sparkbar-CYRORE5i.js} +4 -4
  117. package/dist/{vue-ui-sparkbar-DGFKrcg0.cjs → vue-ui-sparkbar-Cr9FtevP.cjs} +1 -1
  118. package/dist/vue-ui-sparkgauge-BHXFhvTv.cjs +1 -0
  119. package/dist/{vue-ui-sparkgauge-D89HjxSK.js → vue-ui-sparkgauge-JV4tYB7P.js} +56 -53
  120. package/dist/{vue-ui-sparkhistogram-CU1_P6AJ.js → vue-ui-sparkhistogram-DKINHX2q.js} +93 -90
  121. package/dist/vue-ui-sparkhistogram-T4a3DDck.cjs +1 -0
  122. package/dist/{vue-ui-sparkline-C2McLmh5.js → vue-ui-sparkline-CbRTHtig.js} +109 -106
  123. package/dist/vue-ui-sparkline-Dc6Sf3n8.cjs +1 -0
  124. package/dist/{vue-ui-sparkstackbar-Cu4aG9PB.js → vue-ui-sparkstackbar-6u9-2nG4.js} +59 -56
  125. package/dist/vue-ui-sparkstackbar-CV5SkdsP.cjs +1 -0
  126. package/dist/{vue-ui-stackbar-6m5CpvNM.js → vue-ui-stackbar-CUppObfj.js} +136 -133
  127. package/dist/vue-ui-stackbar-CXB-nd71.cjs +6 -0
  128. package/dist/vue-ui-strip-plot-6IXF_U6-.cjs +1 -0
  129. package/dist/{vue-ui-strip-plot-DlZ2Eez4.js → vue-ui-strip-plot-doaNZAW4.js} +127 -124
  130. package/dist/{vue-ui-table-U0_3I0fu.js → vue-ui-table-CZsNuDR5.js} +1 -1
  131. package/dist/{vue-ui-table-BjhcV9qB.cjs → vue-ui-table-S66UCskD.cjs} +1 -1
  132. package/dist/{vue-ui-table-heatmap-Bfqytiv5.cjs → vue-ui-table-heatmap-BU9UU15H.cjs} +1 -1
  133. package/dist/{vue-ui-table-heatmap-BrGkCaOG.js → vue-ui-table-heatmap-CjohHqDV.js} +4 -4
  134. package/dist/{vue-ui-table-sparkline-CXlnp8E3.cjs → vue-ui-table-sparkline-CHFFTD0a.cjs} +1 -1
  135. package/dist/{vue-ui-table-sparkline-C1wNBDqO.js → vue-ui-table-sparkline-ab2rwdKB.js} +5 -5
  136. package/dist/{vue-ui-thermometer-Bx2abW1B.js → vue-ui-thermometer-C72mHwUi.js} +84 -81
  137. package/dist/vue-ui-thermometer-Ccd6RGh8.cjs +1 -0
  138. package/dist/vue-ui-timer-C8Fn2B0b.cjs +64 -0
  139. package/dist/{vue-ui-timer-3UkgrtEj.js → vue-ui-timer-D-LNi6lz.js} +183 -180
  140. package/dist/{vue-ui-tiremarks-C_xuD4De.js → vue-ui-tiremarks-Bo8EWsJ8.js} +59 -56
  141. package/dist/vue-ui-tiremarks-SOzvMOz4.cjs +1 -0
  142. package/dist/vue-ui-treemap-BqTTQrVh.cjs +1 -0
  143. package/dist/{vue-ui-treemap-BjDSR72h.js → vue-ui-treemap-uj94elVB.js} +123 -120
  144. package/dist/{vue-ui-vertical-bar-DUhOoSNl.js → vue-ui-vertical-bar-BUTOw-DK.js} +108 -106
  145. package/dist/vue-ui-vertical-bar-C4Sxun4Q.cjs +4 -0
  146. package/dist/{vue-ui-waffle-Dpox5n5s.js → vue-ui-waffle-CTWA1frT.js} +107 -104
  147. package/dist/vue-ui-waffle-DYWGRKdT.cjs +1 -0
  148. package/dist/vue-ui-wheel-8K72ZKda.js +330 -0
  149. package/dist/vue-ui-wheel-Cz5-0klT.cjs +1 -0
  150. package/dist/{vue-ui-word-cloud-u5S86-Ft.js → vue-ui-word-cloud-CSwBPDB8.js} +97 -94
  151. package/dist/vue-ui-word-cloud-D39riLZb.cjs +1 -0
  152. package/dist/vue-ui-xy-BbWXjajH.cjs +3 -0
  153. package/dist/{vue-ui-xy-0nBQDwL2.js → vue-ui-xy-DpDKutd7.js} +65 -58
  154. package/dist/{vue-ui-xy-canvas-yQlThVu7.cjs → vue-ui-xy-canvas-BCj0SCqe.cjs} +2 -2
  155. package/dist/{vue-ui-xy-canvas-DI7LiD4U.js → vue-ui-xy-canvas-BQm9gah4.js} +82 -81
  156. package/package.json +1 -1
  157. package/dist/Shape-GAZUIBfN.cjs +0 -1
  158. package/dist/Tooltip-BlGVq6xj.cjs +0 -1
  159. package/dist/index-DSGAenF3.cjs +0 -9
  160. package/dist/vue-ui-3d-bar-vvpkf_bv.cjs +0 -19
  161. package/dist/vue-ui-age-pyramid-CMMnrI3R.cjs +0 -1
  162. package/dist/vue-ui-bullet-nXPlud-q.cjs +0 -34
  163. package/dist/vue-ui-candlestick-B6T0LhEG.cjs +0 -2
  164. package/dist/vue-ui-chestnut-D8Gq_i77.cjs +0 -6
  165. package/dist/vue-ui-circle-pack-DCz3OWlu.cjs +0 -1
  166. package/dist/vue-ui-donut-BpgK-I9o.cjs +0 -1
  167. package/dist/vue-ui-donut-evolution-BVJCDPQ2.cjs +0 -1
  168. package/dist/vue-ui-dumbbell-DRcemHVG.cjs +0 -9
  169. package/dist/vue-ui-flow-DdQsK5DR.cjs +0 -1
  170. package/dist/vue-ui-funnel-Bq4yoTfd.cjs +0 -1
  171. package/dist/vue-ui-galaxy-ia1UNlpc.cjs +0 -1
  172. package/dist/vue-ui-gauge-C3FbYOSi.cjs +0 -1
  173. package/dist/vue-ui-heatmap-BCau2Z3U.cjs +0 -1
  174. package/dist/vue-ui-history-plot-DL7VjOd0.cjs +0 -1
  175. package/dist/vue-ui-molecule-B5XDGmLx.cjs +0 -1
  176. package/dist/vue-ui-mood-radar-DyMCJKFb.cjs +0 -1
  177. package/dist/vue-ui-nested-donuts-B4Am-r6T.cjs +0 -17
  178. package/dist/vue-ui-onion-YeBdJrdx.cjs +0 -5
  179. package/dist/vue-ui-parallel-coordinate-plot-CoecETlm.cjs +0 -8
  180. package/dist/vue-ui-quadrant-Btzq3qNJ.cjs +0 -1
  181. package/dist/vue-ui-quick-chart-5cWjffLJ.cjs +0 -15
  182. package/dist/vue-ui-radar-t22bqFiQ.cjs +0 -1
  183. package/dist/vue-ui-relation-circle-CWgGPxDJ.cjs +0 -1
  184. package/dist/vue-ui-rings-CiLJkRwa.cjs +0 -2
  185. package/dist/vue-ui-scatter-B24gGA8q.cjs +0 -1
  186. package/dist/vue-ui-sparkgauge-DwK7dzdJ.cjs +0 -1
  187. package/dist/vue-ui-sparkhistogram-DKoI6_TT.cjs +0 -1
  188. package/dist/vue-ui-sparkline-Bp7GMRrA.cjs +0 -1
  189. package/dist/vue-ui-sparkstackbar-Dayxdcr7.cjs +0 -1
  190. package/dist/vue-ui-stackbar-C21xTVy9.cjs +0 -6
  191. package/dist/vue-ui-strip-plot-DAo8FMup.cjs +0 -1
  192. package/dist/vue-ui-thermometer-CBdAwYdC.cjs +0 -1
  193. package/dist/vue-ui-timer-CRDQbqJ_.cjs +0 -64
  194. package/dist/vue-ui-tiremarks-C78mfaBr.cjs +0 -1
  195. package/dist/vue-ui-treemap-CP__1pdb.cjs +0 -1
  196. package/dist/vue-ui-vertical-bar-DTB8r4LH.cjs +0 -4
  197. package/dist/vue-ui-waffle-CrVyCF7k.cjs +0 -1
  198. package/dist/vue-ui-wheel-DV2zgr4d.cjs +0 -1
  199. package/dist/vue-ui-wheel-ykD8OULJ.js +0 -319
  200. package/dist/vue-ui-word-cloud-DBkAo2uX.cjs +0 -1
  201. package/dist/vue-ui-xy-mEVVQr_U.cjs +0 -3
@@ -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-DLCyjPV0.js";
3
- import { u as ee } from "./useNestedProp-q86V3_LA.js";
4
- import xe from "./vue-ui-skeleton-D6ojufhb.js";
5
- import { t as $e, u as Ne } from "./useResponsive-BWapHhVH.js";
6
- import { _ as Le } from "./PackageVersion-PZr4BkQ5.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-9EeNZMz1.js";
3
+ import { u as ee } from "./useNestedProp-df_bKQEI.js";
4
+ import $e from "./vue-ui-skeleton-BmJiYGtE.js";
5
+ import { t as Ne, u as Le } from "./useResponsive-BWapHhVH.js";
6
+ import { _ as Me } from "./PackageVersion-QRvxRYPv.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"),r=require("./index-DEnRHTzk.cjs"),A=require("./useNestedProp-BNT60LxO.cjs"),G=require("./vue-ui-skeleton-_DN0U6W6.cjs"),P=require("./useResponsive-YQYQrAZ_.cjs"),H=require("./PackageVersion-DJKkRuOD.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;