vue-data-ui 2.4.9 → 2.4.11

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 (158) hide show
  1. package/README.md +25 -0
  2. package/dist/{Arrow-BGrY1ydc.cjs → Arrow-B2lMAc1C.cjs} +1 -1
  3. package/dist/{Arrow-Fke-ybVE.js → Arrow-DTcpIx4P.js} +1 -1
  4. package/dist/{BaseIcon-BFZiytmY.js → BaseIcon-CNl_wwAN.js} +1 -1
  5. package/dist/{BaseIcon-P668oVRL.cjs → BaseIcon-Cci48l_M.cjs} +1 -1
  6. package/dist/{DataTable-8vTlt4e4.cjs → DataTable-BoMFIudG.cjs} +1 -1
  7. package/dist/{DataTable-Bqouzjik.js → DataTable-DD2NjgWr.js} +2 -2
  8. package/dist/{Legend-DiLvq4vW.cjs → Legend-BEBhnrMH.cjs} +1 -1
  9. package/dist/{Legend-BN2BcDVi.js → Legend-rLopjauc.js} +1 -1
  10. package/dist/PackageVersion-BPbxd_rU.cjs +1 -0
  11. package/dist/{PackageVersion-CTpPwNFg.js → PackageVersion-DjRRmHKg.js} +1 -1
  12. package/dist/{PenAndPaper-DLwiH2Np.js → PenAndPaper-BkFQN_fq.js} +2 -2
  13. package/dist/{PenAndPaper-bKJD5B9n.cjs → PenAndPaper-CLAyC1BP.cjs} +1 -1
  14. package/dist/{Shape-IDJlHO6G.js → Shape-Bc8lWk7D.js} +1 -1
  15. package/dist/{Shape-CLIJMoFo.cjs → Shape-DFrKEycb.cjs} +1 -1
  16. package/dist/{Slicer-CQsrB1vr.js → Slicer-CfPeFpUJ.js} +2 -2
  17. package/dist/{Slicer-BkionZj4.cjs → Slicer-DnddhuPD.cjs} +1 -1
  18. package/dist/{Title-RGaMCxMM.cjs → Title-BWAmAhTl.cjs} +1 -1
  19. package/dist/{Title-eBZtf9JC.js → Title-NE47pLld.js} +1 -1
  20. package/dist/{Tooltip-wUAIAM2C.js → Tooltip-1RIjj9Cf.js} +1 -1
  21. package/dist/{Tooltip-DfxV57uu.cjs → Tooltip-CopGUpZs.cjs} +1 -1
  22. package/dist/{index-CRiXU5u4.js → index-9EusFpSb.js} +1265 -1195
  23. package/dist/index-D3H-ye-i.cjs +9 -0
  24. package/dist/style.css +1 -1
  25. package/dist/types/vue-data-ui.d.cts +18 -0
  26. package/dist/types/vue-data-ui.d.ts +18 -0
  27. package/dist/{useNestedProp-DxRaQ3VM.cjs → useNestedProp-BkL_BRGP.cjs} +1 -1
  28. package/dist/{useNestedProp-CJpdmtwu.js → useNestedProp-DLOArwu0.js} +1 -1
  29. package/dist/{usePrinter-1WhDjgbn.cjs → usePrinter-Bp96LusR.cjs} +1 -1
  30. package/dist/{usePrinter-uc7d9V3q.js → usePrinter-Q5_oK30J.js} +1 -1
  31. package/dist/{vue-data-ui-MkOQ0Nle.cjs → vue-data-ui-HoFeCyRO.cjs} +1 -1
  32. package/dist/{vue-data-ui-CIm7VqEX.js → vue-data-ui-mDZeKnLu.js} +58 -58
  33. package/dist/vue-data-ui.cjs +1 -1
  34. package/dist/vue-data-ui.js +11 -11
  35. package/dist/{vue-ui-3d-bar-C1Me6SaI.cjs → vue-ui-3d-bar-CUChTQDT.cjs} +1 -1
  36. package/dist/{vue-ui-3d-bar-BJ3zWmrS.js → vue-ui-3d-bar-e8ooZusZ.js} +9 -9
  37. package/dist/{vue-ui-accordion-Bwp3om8n.cjs → vue-ui-accordion-BmZSXtWn.cjs} +1 -1
  38. package/dist/{vue-ui-accordion-UcagglMR.js → vue-ui-accordion-DE04OBLu.js} +3 -3
  39. package/dist/{vue-ui-age-pyramid-DFBnbj8i.cjs → vue-ui-age-pyramid-R8-ov8YO.cjs} +1 -1
  40. package/dist/{vue-ui-age-pyramid-CVziTeLg.js → vue-ui-age-pyramid-rBF6FLI0.js} +10 -10
  41. package/dist/{vue-ui-annotator-X2GVxnvT.js → vue-ui-annotator-C6w7-GB3.js} +1 -1
  42. package/dist/{vue-ui-annotator-DtntPrcs.cjs → vue-ui-annotator-C_ePw9hm.cjs} +1 -1
  43. package/dist/{vue-ui-bullet-Dgbg2x2i.cjs → vue-ui-bullet-CBMK8LjV.cjs} +1 -1
  44. package/dist/{vue-ui-bullet-gkQMIEIY.js → vue-ui-bullet-CrrpYnF-.js} +8 -8
  45. package/dist/{vue-ui-candlestick-a8DCa9QA.cjs → vue-ui-candlestick-DxzQ2_Xw.cjs} +1 -1
  46. package/dist/{vue-ui-candlestick-DlrvnR9W.js → vue-ui-candlestick-pRGkapAM.js} +11 -11
  47. package/dist/{vue-ui-carousel-table-Dv7Y4mPd.cjs → vue-ui-carousel-table-DEyQbJoc.cjs} +1 -1
  48. package/dist/{vue-ui-carousel-table-DqDoR5Ke.js → vue-ui-carousel-table-XQAJxsSd.js} +4 -4
  49. package/dist/{vue-ui-chestnut-B8O8csWz.cjs → vue-ui-chestnut-B0SB93Um.cjs} +1 -1
  50. package/dist/{vue-ui-chestnut-B01FJ4C4.js → vue-ui-chestnut-CqkJL5mj.js} +8 -8
  51. package/dist/{vue-ui-cursor-BViP1aeI.cjs → vue-ui-cursor-8F-TYD5m.cjs} +1 -1
  52. package/dist/{vue-ui-cursor-Ba_H8Ncs.js → vue-ui-cursor-i9FdNF85.js} +2 -2
  53. package/dist/{vue-ui-dashboard-gP-6lXnW.cjs → vue-ui-dashboard-B-uIDy9E.cjs} +1 -1
  54. package/dist/{vue-ui-dashboard-14KBNioW.js → vue-ui-dashboard-BVNC1LLY.js} +2 -2
  55. package/dist/{vue-ui-digits-BsR96Ev2.js → vue-ui-digits-2kFZOssj.js} +2 -2
  56. package/dist/{vue-ui-digits-D2YQwzS9.cjs → vue-ui-digits-DE2wuVjS.cjs} +1 -1
  57. package/dist/{vue-ui-donut-CRfeBum_.js → vue-ui-donut-BBPED91N.js} +11 -11
  58. package/dist/{vue-ui-donut-BBgDxAnA.cjs → vue-ui-donut-Dj37tKw3.cjs} +1 -1
  59. package/dist/{vue-ui-donut-evolution-B8HXkrQY.js → vue-ui-donut-evolution-BUfkTz0e.js} +11 -11
  60. package/dist/{vue-ui-donut-evolution-BJv9WfCY.cjs → vue-ui-donut-evolution-i1mnDbEF.cjs} +1 -1
  61. package/dist/{vue-ui-dumbbell-W6qsJcrI.cjs → vue-ui-dumbbell-BRUIB_6C.cjs} +1 -1
  62. package/dist/{vue-ui-dumbbell-B8JLe4Rx.js → vue-ui-dumbbell-DhJADY6g.js} +10 -10
  63. package/dist/{vue-ui-flow-BaGjUUsp.cjs → vue-ui-flow-Blm_8Qvt.cjs} +1 -1
  64. package/dist/{vue-ui-flow-XQRrGPwP.js → vue-ui-flow-kshJA6fg.js} +9 -9
  65. package/dist/{vue-ui-galaxy-Dll7-xmx.cjs → vue-ui-galaxy-BD4b4UPK.cjs} +1 -1
  66. package/dist/{vue-ui-galaxy-C860KoXR.js → vue-ui-galaxy-CRympGmo.js} +11 -11
  67. package/dist/{vue-ui-gauge-Cw6HxC9W.cjs → vue-ui-gauge-CctxHIyM.cjs} +1 -1
  68. package/dist/{vue-ui-gauge-CaM7KOxs.js → vue-ui-gauge-GhVHQWB5.js} +7 -7
  69. package/dist/{vue-ui-gizmo-CUsTgs2Y.js → vue-ui-gizmo-BmxuTH7g.js} +3 -3
  70. package/dist/{vue-ui-gizmo-9S26lSOK.cjs → vue-ui-gizmo-DtizFyAK.cjs} +1 -1
  71. package/dist/{vue-ui-heatmap-BDBRTOtW.cjs → vue-ui-heatmap-C-sjrmzc.cjs} +1 -1
  72. package/dist/{vue-ui-heatmap-C_2gDpgT.js → vue-ui-heatmap-DxRULRVw.js} +10 -10
  73. package/dist/{vue-ui-kpi-8TItSsJI.js → vue-ui-kpi-9gsCJSlL.js} +3 -3
  74. package/dist/{vue-ui-kpi-x5RLnUtN.cjs → vue-ui-kpi-ByeLCYYp.cjs} +1 -1
  75. package/dist/{vue-ui-mini-loader-AZUp82dL.cjs → vue-ui-mini-loader--9CTs5gd.cjs} +1 -1
  76. package/dist/{vue-ui-mini-loader-BeWlFItj.js → vue-ui-mini-loader-BoUDfasO.js} +2 -2
  77. package/dist/{vue-ui-molecule-tkmH5BKP.cjs → vue-ui-molecule-GiHkJdKW.cjs} +1 -1
  78. package/dist/{vue-ui-molecule-CJ_9xqd9.js → vue-ui-molecule-kL3t5Yhh.js} +11 -11
  79. package/dist/{vue-ui-mood-radar-Ck53yZA6.js → vue-ui-mood-radar-Btlxem3-.js} +11 -11
  80. package/dist/{vue-ui-mood-radar-C75OoHKh.cjs → vue-ui-mood-radar-hasGnJHW.cjs} +1 -1
  81. package/dist/{vue-ui-nested-donuts-Bpyw1aFZ.cjs → vue-ui-nested-donuts-A8iBv-cs.cjs} +1 -1
  82. package/dist/{vue-ui-nested-donuts-B_S0s6fo.js → vue-ui-nested-donuts-BNHhURZB.js} +11 -11
  83. package/dist/{vue-ui-onion-DnLZsLDV.js → vue-ui-onion-BjT6FXBW.js} +11 -11
  84. package/dist/{vue-ui-onion-lMCndwqx.cjs → vue-ui-onion-CfvgXR20.cjs} +1 -1
  85. package/dist/{vue-ui-parallel-coordinate-plot-Cjr4ER1g.js → vue-ui-parallel-coordinate-plot-1gJHwi-G.js} +12 -12
  86. package/dist/{vue-ui-parallel-coordinate-plot-CiuKqlpx.cjs → vue-ui-parallel-coordinate-plot-72ULVOQs.cjs} +1 -1
  87. package/dist/vue-ui-quadrant-BIReuPm7.cjs +1 -0
  88. package/dist/{vue-ui-quadrant-7ayR33KM.js → vue-ui-quadrant-sfyO2CyO.js} +130 -123
  89. package/dist/{vue-ui-quick-chart-CF5lJluJ.cjs → vue-ui-quick-chart-C-Z1DYoT.cjs} +1 -1
  90. package/dist/{vue-ui-quick-chart-C0jzFqV_.js → vue-ui-quick-chart-C-srQH9J.js} +9 -9
  91. package/dist/{vue-ui-radar-_wv53dRp.js → vue-ui-radar-BzC0VQbN.js} +12 -12
  92. package/dist/{vue-ui-radar-Dpfn4aPE.cjs → vue-ui-radar-MiFm7SRw.cjs} +1 -1
  93. package/dist/{vue-ui-rating-DW2tgPIX.cjs → vue-ui-rating-BuD7W04t.cjs} +1 -1
  94. package/dist/{vue-ui-rating-DQHUlrFb.js → vue-ui-rating-ki_gfG3m.js} +11 -11
  95. package/dist/{vue-ui-relation-circle-BMq4fJ88.cjs → vue-ui-relation-circle-B67IFMK8.cjs} +1 -1
  96. package/dist/{vue-ui-relation-circle-79WZpSrS.js → vue-ui-relation-circle-BZMISq3F.js} +7 -7
  97. package/dist/{vue-ui-rings-BoTgy6Fr.cjs → vue-ui-rings-BUyJgRUc.cjs} +1 -1
  98. package/dist/{vue-ui-rings-BrCjSI5Z.js → vue-ui-rings-CfpBmZkF.js} +11 -11
  99. package/dist/{vue-ui-scatter-CBmiFQT9.js → vue-ui-scatter-BFs-7dvK.js} +131 -127
  100. package/dist/vue-ui-scatter-DMNVRT91.cjs +1 -0
  101. package/dist/{vue-ui-screenshot-Bq3qvacn.cjs → vue-ui-screenshot-BMSEKDz2.cjs} +1 -1
  102. package/dist/{vue-ui-screenshot-BKOcxDB2.js → vue-ui-screenshot-Cauo4x1P.js} +1 -1
  103. package/dist/{vue-ui-skeleton-xn62L2MO.cjs → vue-ui-skeleton-BWO9iit6.cjs} +1 -1
  104. package/dist/{vue-ui-skeleton-CjpLaxv-.js → vue-ui-skeleton-DptJx8-6.js} +20 -20
  105. package/dist/{vue-ui-smiley-D6aLE71R.js → vue-ui-smiley-Cg1vDE5p.js} +2 -2
  106. package/dist/{vue-ui-smiley-9H9LUASi.cjs → vue-ui-smiley-DEV_dsFD.cjs} +1 -1
  107. package/dist/vue-ui-spark-trend-DFwmZlab.cjs +1 -0
  108. package/dist/vue-ui-spark-trend-DmponpJr.js +282 -0
  109. package/dist/{vue-ui-sparkbar-BzN6k1x-.js → vue-ui-sparkbar-D4dlelWC.js} +4 -4
  110. package/dist/{vue-ui-sparkbar-CyNsfVim.cjs → vue-ui-sparkbar-DvVvbi80.cjs} +1 -1
  111. package/dist/{vue-ui-sparkgauge-Cze6RBhD.js → vue-ui-sparkgauge-C2VZgwK6.js} +4 -4
  112. package/dist/{vue-ui-sparkgauge-m2_6j81L.cjs → vue-ui-sparkgauge-CRydFcHZ.cjs} +1 -1
  113. package/dist/{vue-ui-sparkhistogram-CLsOngeA.cjs → vue-ui-sparkhistogram-C8R8LNDx.cjs} +1 -1
  114. package/dist/{vue-ui-sparkhistogram-B-v4hU6_.js → vue-ui-sparkhistogram-DsMLAwhW.js} +5 -5
  115. package/dist/vue-ui-sparkline-CjRhD9aT.cjs +1 -0
  116. package/dist/{vue-ui-sparkline-DLnP9odc.js → vue-ui-sparkline-D0tbUqaT.js} +134 -124
  117. package/dist/{vue-ui-sparkstackbar-BXP6IEtT.cjs → vue-ui-sparkstackbar-Mcu-MB5q.cjs} +1 -1
  118. package/dist/{vue-ui-sparkstackbar-cDy_FCNx.js → vue-ui-sparkstackbar-oXLKSeVe.js} +5 -5
  119. package/dist/{vue-ui-stackbar-DrpNm-6r.cjs → vue-ui-stackbar-CLejMfqE.cjs} +1 -1
  120. package/dist/{vue-ui-stackbar-CiqiPCPX.js → vue-ui-stackbar-JD5iEkUX.js} +12 -12
  121. package/dist/{vue-ui-strip-plot-DNo9nipS.cjs → vue-ui-strip-plot-DT_HJhrK.cjs} +1 -1
  122. package/dist/{vue-ui-strip-plot-C-zS7o1M.js → vue-ui-strip-plot-ZLb1XbOJ.js} +11 -11
  123. package/dist/{vue-ui-table-D9aY6eJT.cjs → vue-ui-table-CATIqeAZ.cjs} +1 -1
  124. package/dist/{vue-ui-table-heatmap-KxsHw3d3.cjs → vue-ui-table-heatmap-2xNfY1n-.cjs} +1 -1
  125. package/dist/{vue-ui-table-heatmap-zs6Z470G.js → vue-ui-table-heatmap-Bx0wx_p5.js} +21 -21
  126. package/dist/{vue-ui-table-EATZiVw7.js → vue-ui-table-i2KKmKxr.js} +10 -10
  127. package/dist/{vue-ui-table-sparkline-BNI0g8vI.js → vue-ui-table-sparkline-BJ1p4Emo.js} +16 -16
  128. package/dist/{vue-ui-table-sparkline-CKXBmV2x.cjs → vue-ui-table-sparkline-lIhP_jpT.cjs} +1 -1
  129. package/dist/{vue-ui-thermometer-B70IlU6G.cjs → vue-ui-thermometer-C5HlafWP.cjs} +1 -1
  130. package/dist/{vue-ui-thermometer-DWYtuYTq.js → vue-ui-thermometer-Cpw1HsJj.js} +7 -7
  131. package/dist/{vue-ui-timer-DLobjqLZ.js → vue-ui-timer-BqlatBRs.js} +5 -5
  132. package/dist/{vue-ui-timer-Dimpnhrr.cjs → vue-ui-timer-DJ6Z60f7.cjs} +1 -1
  133. package/dist/{vue-ui-tiremarks-CehKPt9l.cjs → vue-ui-tiremarks-COUOuw47.cjs} +1 -1
  134. package/dist/{vue-ui-tiremarks-DHosMEnc.js → vue-ui-tiremarks-D-X3Nci7.js} +7 -7
  135. package/dist/{vue-ui-treemap-3zwGXPWM.js → vue-ui-treemap-Bt24Hk6i.js} +11 -11
  136. package/dist/{vue-ui-treemap-uxUzrgJw.cjs → vue-ui-treemap-x7BAU-Mj.cjs} +1 -1
  137. package/dist/{vue-ui-vertical-bar-UXCZ5jyu.js → vue-ui-vertical-bar-BwLl08U5.js} +11 -11
  138. package/dist/{vue-ui-vertical-bar-tljvI8ZD.cjs → vue-ui-vertical-bar-DLarr8xJ.cjs} +1 -1
  139. package/dist/{vue-ui-waffle-B5YJ2-qg.js → vue-ui-waffle-CL53rtX8.js} +11 -11
  140. package/dist/{vue-ui-waffle-BB0nwq8k.cjs → vue-ui-waffle-CUgTo43L.cjs} +1 -1
  141. package/dist/{vue-ui-wheel-Doj339q6.cjs → vue-ui-wheel-BNcFNmnp.cjs} +1 -1
  142. package/dist/{vue-ui-wheel-BNV-kvRK.js → vue-ui-wheel-Cnktsvs_.js} +7 -7
  143. package/dist/{vue-ui-word-cloud-DzlAcim2.js → vue-ui-word-cloud-CNq7Fs2o.js} +10 -10
  144. package/dist/{vue-ui-word-cloud-vEgW75C-.cjs → vue-ui-word-cloud-DMQf_Jlw.cjs} +1 -1
  145. package/dist/{vue-ui-xy-DcinX3ix.js → vue-ui-xy-D0CYaEFW.js} +269 -255
  146. package/dist/{vue-ui-xy-canvas-C5oFgOEO.js → vue-ui-xy-canvas-CBkXw173.js} +63 -60
  147. package/dist/vue-ui-xy-canvas-CzEUFhi7.cjs +9 -0
  148. package/dist/vue-ui-xy-dwJ4ji_y.cjs +3 -0
  149. package/package.json +1 -1
  150. package/dist/PackageVersion-DPna32U7.cjs +0 -1
  151. package/dist/index-CxfVE-zl.cjs +0 -9
  152. package/dist/vue-ui-quadrant-DDbKIPVl.cjs +0 -1
  153. package/dist/vue-ui-scatter-AgWOR5nX.cjs +0 -1
  154. package/dist/vue-ui-spark-trend-DhUNW1YZ.js +0 -272
  155. package/dist/vue-ui-spark-trend-KO9LcvA9.cjs +0 -1
  156. package/dist/vue-ui-sparkline--mWL3SLf.cjs +0 -1
  157. package/dist/vue-ui-xy-CpuHnuJR.cjs +0 -3
  158. package/dist/vue-ui-xy-canvas-D665Zxts.cjs +0 -9
@@ -1,11 +1,11 @@
1
- import { computed as v, ref as m, watch as R, onMounted as se, openBlock as o, createElementBlock as n, normalizeStyle as N, renderSlot as W, normalizeProps as oe, guardReactiveProps as re, createElementVNode as f, toDisplayString as j, createCommentVNode as y, unref as c, createVNode as ne, Fragment as P, renderList as A, createBlock as ie } from "vue";
2
- import { u as de, c as ve, t as ce, o as he, e as U, g as ye, w as C, Y as fe, Z as pe, X as ge, s as I, R as X, i as Z, f as q } from "./index-CRiXU5u4.js";
3
- import { u as Y } from "./useNestedProp-CJpdmtwu.js";
4
- import me from "./vue-ui-skeleton-CjpLaxv-.js";
5
- import { t as ke, u as be } from "./useResponsive-CoxXLe23.js";
6
- import { _ as _e } from "./PackageVersion-CTpPwNFg.js";
7
- import { _ as xe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
- const we = ["id"], Le = ["xmlns", "viewBox"], $e = ["id"], Ne = ["stop-color"], Ce = ["stop-color"], Ie = ["id"], Me = ["stop-color"], Ve = ["stop-color"], ze = ["id"], Se = ["stop-color"], We = ["stop-color"], Pe = { key: 0 }, Ae = ["d", "fill"], De = ["d", "fill"], Fe = ["d", "stroke", "stroke-width"], Ge = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Te = ["x", "y", "width", "height", "fill", "rx"], Be = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Ee = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], Oe = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Re = ["x", "y", "font-size", "font-weight", "fill"], je = ["x", "y", "height", "width", "onMouseenter", "onClick"], Ue = {
1
+ import { computed as v, ref as m, watch as U, onMounted as re, openBlock as o, createElementBlock as n, normalizeStyle as C, renderSlot as A, normalizeProps as ne, guardReactiveProps as ie, createElementVNode as f, toDisplayString as X, createCommentVNode as y, unref as c, createVNode as de, Fragment as P, renderList as D, createBlock as ve } from "vue";
2
+ import { u as ce, c as he, t as ye, _ as T, o as fe, e as Z, g as pe, w as I, $ as ge, a0 as me, X as ke, s as M, R as q, i as H, f as Y } from "./index-9EusFpSb.js";
3
+ import { u as J } from "./useNestedProp-DLOArwu0.js";
4
+ import be from "./vue-ui-skeleton-DptJx8-6.js";
5
+ import { t as _e, u as xe } from "./useResponsive-CoxXLe23.js";
6
+ import { _ as we } from "./PackageVersion-DjRRmHKg.js";
7
+ import { _ as Le } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
+ const $e = ["id"], Ne = ["xmlns", "viewBox"], Ce = ["id"], Ie = ["stop-color"], Me = ["stop-color"], Ve = ["id"], ze = ["stop-color"], Se = ["stop-color"], We = ["id"], Ae = ["stop-color"], Pe = ["stop-color"], De = { key: 0 }, Te = ["d", "fill"], Be = ["d", "fill"], Fe = ["d", "stroke", "stroke-width"], Ge = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Oe = ["x", "y", "width", "height", "fill", "rx"], Ee = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], je = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], Re = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Ue = ["x", "y", "font-size", "font-weight", "fill"], Xe = ["x", "y", "height", "width", "onMouseenter", "onClick"], Ze = {
9
9
  __name: "vue-ui-sparkline",
10
10
  props: {
11
11
  config: {
@@ -30,48 +30,58 @@ const we = ["id"], Le = ["xmlns", "viewBox"], $e = ["id"], Ne = ["stop-color"],
30
30
  }
31
31
  },
32
32
  emits: ["hoverIndex", "selectDatapoint"],
33
- setup(_, { emit: M }) {
34
- const i = _, { vue_ui_sparkline: H } = de(), L = v(() => !!i.dataset && i.dataset.length), p = m(ve()), V = m(null), D = m(null), F = m(null), e = v({
33
+ setup(_, { emit: V }) {
34
+ const i = _, { vue_ui_sparkline: K } = ce(), L = v(() => !!i.dataset && i.dataset.length), p = m(he()), z = m(null), B = m(null), F = m(null), e = v({
35
35
  get: () => G(),
36
36
  set: (t) => t
37
37
  });
38
38
  function G() {
39
- const t = Y({
39
+ const t = J({
40
40
  userConfig: i.config,
41
- defaultConfig: H
41
+ defaultConfig: K
42
42
  });
43
43
  return t.theme ? {
44
- ...Y({
45
- userConfig: ce.vue_ui_sparkline[t.theme] || i.config,
44
+ ...J({
45
+ userConfig: ye.vue_ui_sparkline[t.theme] || i.config,
46
46
  defaultConfig: t
47
47
  })
48
48
  } : t;
49
49
  }
50
- R(() => i.config, (t) => {
51
- e.value = G(), B(), l.value.chartWidth = e.value.style.chartWidth;
52
- }, { deep: !0 }), R(() => i.dataset, (t) => {
53
- b.value = i.dataset.map((u) => ({
54
- ...u,
55
- value: [void 0].includes(u.value) ? null : u.value
56
- }));
50
+ const $ = v(() => T({
51
+ data: i.dataset,
52
+ threshold: e.value.downsample.threshold
53
+ }));
54
+ U(() => i.config, (t) => {
55
+ e.value = G(), E(), l.value.chartWidth = e.value.style.chartWidth;
56
+ }, { deep: !0 }), U(() => i.dataset, (t) => {
57
+ b.value = T({
58
+ data: i.dataset.map((u) => ({
59
+ ...u,
60
+ value: [void 0].includes(u.value) ? null : u.value
61
+ })),
62
+ threshold: e.value.downsample.threshold
63
+ });
57
64
  }, { deep: !0 });
58
- const b = m(J());
59
- function J() {
60
- return i.dataset.map((t) => e.value.style.animation.show ? {
61
- ...t,
62
- value: null
63
- } : {
64
- ...t,
65
- value: [void 0].includes(t.value) ? null : t.value
65
+ const b = m(Q());
66
+ function Q() {
67
+ return T({
68
+ data: i.dataset.map((t) => e.value.style.animation.show ? {
69
+ ...t,
70
+ value: null
71
+ } : {
72
+ ...t,
73
+ value: [void 0].includes(t.value) ? null : t.value
74
+ }),
75
+ threshold: e.value.downsample.threshold
66
76
  });
67
77
  }
68
- const T = m(null);
69
- se(() => {
70
- if (B(), e.value.style.animation.show && i.dataset.length > 1) {
78
+ const O = m(null);
79
+ re(() => {
80
+ if (E(), e.value.style.animation.show && i.dataset.length > 1) {
71
81
  let a = function() {
72
- u < i.dataset.length ? (b.value.push(i.dataset[u]), setTimeout(() => {
82
+ u < $.value.length ? (b.value.push($.value[u]), setTimeout(() => {
73
83
  requestAnimationFrame(a);
74
- }, t)) : b.value = i.dataset, u += 1;
84
+ }, t)) : b.value = $.value, u += 1;
75
85
  };
76
86
  b.value = [];
77
87
  const t = e.value.style.animation.animationFrames / i.dataset.length;
@@ -79,16 +89,16 @@ const we = ["id"], Le = ["xmlns", "viewBox"], $e = ["id"], Ne = ["stop-color"],
79
89
  a();
80
90
  }
81
91
  });
82
- function B() {
83
- if (he(i.dataset) ? U({
92
+ function E() {
93
+ if (fe(i.dataset) ? Z({
84
94
  componentName: "VueUiSparkline",
85
95
  type: "dataset"
86
96
  }) : i.dataset.forEach((t, u) => {
87
- ye({
97
+ pe({
88
98
  datasetObject: t,
89
99
  requiredAttributes: ["period", "value"]
90
100
  }).forEach((a) => {
91
- U({
101
+ Z({
92
102
  componentName: "VueUiSparkline",
93
103
  type: "datasetSerieAttribute",
94
104
  property: a,
@@ -96,15 +106,15 @@ const we = ["id"], Le = ["xmlns", "viewBox"], $e = ["id"], Ne = ["stop-color"],
96
106
  });
97
107
  });
98
108
  }), e.value.responsive) {
99
- const t = ke(() => {
100
- const { width: u, height: a } = be({
101
- chart: V.value,
102
- title: e.value.style.title.show && i.showInfo ? D.value : null,
109
+ const t = _e(() => {
110
+ const { width: u, height: a } = xe({
111
+ chart: z.value,
112
+ title: e.value.style.title.show && i.showInfo ? B.value : null,
103
113
  source: F.value
104
114
  });
105
115
  l.value.width = u, l.value.height = a, l.value.chartWidth = e.value.style.chartWidth / 500 * u, l.value.padding = 0.06 * u;
106
116
  });
107
- T.value = new ResizeObserver(t), T.value.observe(V.value.parentNode);
117
+ O.value = new ResizeObserver(t), O.value.observe(z.value.parentNode);
108
118
  }
109
119
  }
110
120
  const l = m({
@@ -112,7 +122,7 @@ const we = ["id"], Le = ["xmlns", "viewBox"], $e = ["id"], Ne = ["stop-color"],
112
122
  width: 500,
113
123
  chartWidth: e.value.style.chartWidth,
114
124
  padding: 30
115
- }), K = m(6), s = v(() => ({
125
+ }), ee = m(6), s = v(() => ({
116
126
  top: 12,
117
127
  left: 0,
118
128
  right: l.value.width,
@@ -120,37 +130,37 @@ const we = ["id"], Le = ["xmlns", "viewBox"], $e = ["id"], Ne = ["stop-color"],
120
130
  start: i.showInfo && e.value.style.dataLabel.show && e.value.style.dataLabel.position === "left" ? l.value.width - l.value.chartWidth : l.value.padding,
121
131
  width: i.showInfo && e.value.style.dataLabel.show ? l.value.chartWidth : l.value.width - l.value.padding,
122
132
  height: l.value.height - 12
123
- })), z = v(() => 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))), Q = v(() => 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))), x = v(() => {
124
- const t = z.value >= 0 ? 0 : z.value;
133
+ })), S = v(() => 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))), te = v(() => 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))), x = v(() => {
134
+ const t = S.value >= 0 ? 0 : S.value;
125
135
  return Math.abs(t);
126
- }), ee = v(() => Q.value + x.value + K.value), $ = v(() => s.value.bottom - s.value.height * S(x.value));
127
- function S(t) {
128
- return t / ee.value;
136
+ }), ae = v(() => te.value + x.value + ee.value), N = v(() => s.value.bottom - s.value.height * W(x.value));
137
+ function W(t) {
138
+ return t / ae.value;
129
139
  }
130
- const g = v(() => i.dataset.length - 1), r = v(() => b.value.map((t, u) => {
140
+ const g = v(() => $.value.length - 1), r = v(() => b.value.map((t, u) => {
131
141
  const a = isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0;
132
142
  return {
133
143
  absoluteValue: a,
134
144
  period: t.period,
135
145
  plotValue: a + x.value,
136
- toMax: S(a + x.value),
146
+ toMax: W(a + x.value),
137
147
  x: s.value.start + u * (s.value.width / (g.value + 1) > l.padding ? l.padding : s.value.width / (g.value + 1)),
138
- y: s.value.bottom - s.value.height * S(a + x.value),
148
+ y: s.value.bottom - s.value.height * W(a + x.value),
139
149
  id: `plot_${p.value}_${u}`,
140
- color: w.value ? e.value.style.bar.color : e.value.style.area.useGradient ? C(e.value.style.line.color, 0.05 * (1 - u / g.value)) : e.value.style.line.color,
150
+ color: w.value ? e.value.style.bar.color : e.value.style.area.useGradient ? I(e.value.style.line.color, 0.05 * (1 - u / g.value)) : e.value.style.line.color,
141
151
  width: s.value.width / (g.value + 1) > l.padding ? l.padding : s.value.width / (g.value + 1)
142
152
  };
143
- })), te = v(() => {
153
+ })), le = v(() => {
144
154
  const t = { x: r.value[0].x, y: l.value.height - 6 }, u = { x: r.value[r.value.length - 1].x, y: l.value.height - 6 }, a = [];
145
155
  return r.value.forEach((d) => {
146
156
  a.push(`${d.x},${d.y} `);
147
157
  }), [t.x, t.y, ...a, u.x, u.y].toString();
148
158
  }), h = m(void 0);
149
- function ae(t, u) {
150
- h.value = t, M("hoverIndex", { index: u });
159
+ function ue(t, u) {
160
+ h.value = t, V("hoverIndex", { index: u });
151
161
  }
152
- function le() {
153
- h.value = void 0, M("hoverIndex", { index: void 0 });
162
+ function se() {
163
+ h.value = void 0, V("hoverIndex", { index: void 0 });
154
164
  }
155
165
  const k = v(() => {
156
166
  if (L.value) {
@@ -159,11 +169,11 @@ const we = ["id"], Le = ["xmlns", "viewBox"], $e = ["id"], Ne = ["stop-color"],
159
169
  latest: r.value[r.value.length - 1].absoluteValue,
160
170
  sum: u,
161
171
  average: u / r.value.length,
162
- median: fe(t),
163
- trend: pe(r.value.map(({ x: a, y: d, absoluteValue: O }) => ({
172
+ median: ge(t),
173
+ trend: me(r.value.map(({ x: a, y: d, absoluteValue: R }) => ({
164
174
  x: a,
165
175
  y: d,
166
- value: O
176
+ value: R
167
177
  }))).trend
168
178
  };
169
179
  } else
@@ -174,18 +184,18 @@ const we = ["id"], Le = ["xmlns", "viewBox"], $e = ["id"], Ne = ["stop-color"],
174
184
  median: null,
175
185
  trend: null
176
186
  };
177
- }), E = v(() => L.value ? e.value.style.dataLabel.valueType === "latest" ? k.value.latest : e.value.style.dataLabel.valueType === "sum" ? k.value.sum : e.value.style.dataLabel.valueType === "average" ? k.value.average : 0 : 0), w = v(() => e.value.type && e.value.type === "bar");
178
- function ue(t, u) {
179
- M("selectDatapoint", { datapoint: t, index: u });
187
+ }), j = v(() => L.value ? e.value.style.dataLabel.valueType === "latest" ? k.value.latest : e.value.style.dataLabel.valueType === "sum" ? k.value.sum : e.value.style.dataLabel.valueType === "average" ? k.value.average : 0 : 0), w = v(() => e.value.type && e.value.type === "bar");
188
+ function oe(t, u) {
189
+ V("selectDatapoint", { datapoint: t, index: u });
180
190
  }
181
191
  return (t, u) => (o(), n("div", {
182
192
  ref_key: "sparklineChart",
183
- ref: V,
193
+ ref: z,
184
194
  class: "vue-ui-sparkline",
185
195
  id: p.value,
186
- style: N(`width:100%;font-family:${e.value.style.fontFamily}`)
196
+ style: C(`width:100%;font-family:${e.value.style.fontFamily}`)
187
197
  }, [
188
- W(t.$slots, "before", oe(re({
198
+ A(t.$slots, "before", ne(ie({
189
199
  selected: h.value,
190
200
  latest: k.value.latest,
191
201
  sum: k.value.sum,
@@ -196,21 +206,21 @@ const we = ["id"], Le = ["xmlns", "viewBox"], $e = ["id"], Ne = ["stop-color"],
196
206
  e.value.style.title.show && _.showInfo ? (o(), n("div", {
197
207
  key: 0,
198
208
  ref_key: "chartTitle",
199
- ref: D,
209
+ ref: B,
200
210
  class: "vue-ui-sparkline-title",
201
- style: N(`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"};`)
211
+ style: C(`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"};`)
202
212
  }, [
203
213
  f("span", {
204
- style: N(`padding:${e.value.style.title.textAlign === "left" ? "0 0 0 12px" : e.value.style.title.textAlign === "right" ? "0 12px 0 0" : "0"}`)
205
- }, j(h.value ? h.value.period : e.value.style.title.text), 5)
214
+ style: C(`padding:${e.value.style.title.textAlign === "left" ? "0 0 0 12px" : e.value.style.title.textAlign === "right" ? "0 12px 0 0" : "0"}`)
215
+ }, X(h.value ? h.value.period : e.value.style.title.text), 5)
206
216
  ], 4)) : y("", !0),
207
217
  L.value ? (o(), n("svg", {
208
218
  key: 1,
209
- xmlns: c(ge),
219
+ xmlns: c(ke),
210
220
  viewBox: `0 0 ${l.value.width} ${l.value.height}`,
211
- style: N(`background:${e.value.style.backgroundColor};overflow:visible`)
221
+ style: C(`background:${e.value.style.backgroundColor};overflow:visible`)
212
222
  }, [
213
- ne(_e),
223
+ de(we),
214
224
  f("defs", null, [
215
225
  f("linearGradient", {
216
226
  x1: "0%",
@@ -221,13 +231,13 @@ const we = ["id"], Le = ["xmlns", "viewBox"], $e = ["id"], Ne = ["stop-color"],
221
231
  }, [
222
232
  f("stop", {
223
233
  offset: "0%",
224
- "stop-color": c(I)(c(C)(e.value.style.area.color, 0.05), e.value.style.area.opacity)
225
- }, null, 8, Ne),
234
+ "stop-color": c(M)(c(I)(e.value.style.area.color, 0.05), e.value.style.area.opacity)
235
+ }, null, 8, Ie),
226
236
  f("stop", {
227
237
  offset: "100%",
228
- "stop-color": c(I)(e.value.style.area.color, e.value.style.area.opacity)
229
- }, null, 8, Ce)
230
- ], 8, $e),
238
+ "stop-color": c(M)(e.value.style.area.color, e.value.style.area.opacity)
239
+ }, null, 8, Me)
240
+ ], 8, Ce),
231
241
  f("linearGradient", {
232
242
  x2: "0%",
233
243
  y2: "100%",
@@ -236,12 +246,12 @@ const we = ["id"], Le = ["xmlns", "viewBox"], $e = ["id"], Ne = ["stop-color"],
236
246
  f("stop", {
237
247
  offset: "0%",
238
248
  "stop-color": e.value.style.bar.color
239
- }, null, 8, Me),
249
+ }, null, 8, ze),
240
250
  f("stop", {
241
251
  offset: "100%",
242
- "stop-color": c(C)(e.value.style.bar.color, 0.05)
243
- }, null, 8, Ve)
244
- ], 8, Ie),
252
+ "stop-color": c(I)(e.value.style.bar.color, 0.05)
253
+ }, null, 8, Se)
254
+ ], 8, Ve),
245
255
  f("linearGradient", {
246
256
  x2: "0%",
247
257
  y2: "100%",
@@ -249,34 +259,34 @@ const we = ["id"], Le = ["xmlns", "viewBox"], $e = ["id"], Ne = ["stop-color"],
249
259
  }, [
250
260
  f("stop", {
251
261
  offset: "0%",
252
- "stop-color": c(C)(e.value.style.bar.color, 0.05)
253
- }, null, 8, Se),
262
+ "stop-color": c(I)(e.value.style.bar.color, 0.05)
263
+ }, null, 8, Ae),
254
264
  f("stop", {
255
265
  offset: "100%",
256
266
  "stop-color": e.value.style.bar.color
257
- }, null, 8, We)
258
- ], 8, ze)
267
+ }, null, 8, Pe)
268
+ ], 8, We)
259
269
  ]),
260
- e.value.style.area.show && !w.value && r.value[0] ? (o(), n("g", Pe, [
270
+ e.value.style.area.show && !w.value && r.value[0] ? (o(), n("g", De, [
261
271
  e.value.style.line.smooth ? (o(), n("path", {
262
272
  key: 0,
263
- d: `M ${r.value[0].x},${s.value.bottom} ${c(X)(r.value)} L ${r.value.at(-1).x},${s.value.bottom} Z`,
264
- fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : c(I)(e.value.style.area.color, e.value.style.area.opacity)
265
- }, null, 8, Ae)) : (o(), n("path", {
273
+ d: `M ${r.value[0].x},${s.value.bottom} ${c(q)(r.value)} L ${r.value.at(-1).x},${s.value.bottom} Z`,
274
+ fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : c(M)(e.value.style.area.color, e.value.style.area.opacity)
275
+ }, null, 8, Te)) : (o(), n("path", {
266
276
  key: 1,
267
- d: `M${te.value}Z`,
268
- fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : c(I)(e.value.style.area.color, e.value.style.area.opacity)
269
- }, null, 8, De))
277
+ d: `M${le.value}Z`,
278
+ fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : c(M)(e.value.style.area.color, e.value.style.area.opacity)
279
+ }, null, 8, Be))
270
280
  ])) : y("", !0),
271
281
  e.value.style.line.smooth && !w.value ? (o(), n("path", {
272
282
  key: 1,
273
- d: `M ${c(X)(r.value)}`,
283
+ d: `M ${c(q)(r.value)}`,
274
284
  stroke: e.value.style.line.color,
275
285
  fill: "none",
276
286
  "stroke-width": e.value.style.line.strokeWidth,
277
287
  "stroke-linecap": "round"
278
288
  }, null, 8, Fe)) : y("", !0),
279
- (o(!0), n(P, null, A(r.value, (a, d) => (o(), n("g", null, [
289
+ (o(!0), n(P, null, D(r.value, (a, d) => (o(), n("g", null, [
280
290
  d < r.value.length - 1 && !e.value.style.line.smooth && !w.value ? (o(), n("line", {
281
291
  key: 0,
282
292
  x1: a.x,
@@ -292,12 +302,12 @@ const we = ["id"], Le = ["xmlns", "viewBox"], $e = ["id"], Ne = ["stop-color"],
292
302
  w.value ? (o(), n("rect", {
293
303
  key: 1,
294
304
  x: a.x - a.width / 2,
295
- y: a.absoluteValue > 0 ? a.y : $.value,
305
+ y: a.absoluteValue > 0 ? a.y : N.value,
296
306
  width: a.width,
297
- height: Math.abs(a.y - $.value),
307
+ height: Math.abs(a.y - N.value),
298
308
  fill: a.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${p.value})` : `url(#sparkline_bar_gradient_neg_${p.value})`,
299
309
  rx: e.value.style.bar.borderRadius
300
- }, null, 8, Te)) : y("", !0),
310
+ }, null, 8, Oe)) : y("", !0),
301
311
  e.value.style.verticalIndicator.show && (h.value && a.id === h.value.id || _.selectedIndex === d) ? (o(), n("line", {
302
312
  key: 2,
303
313
  x1: a.x,
@@ -308,20 +318,20 @@ const we = ["id"], Le = ["xmlns", "viewBox"], $e = ["id"], Ne = ["stop-color"],
308
318
  "stroke-width": e.value.style.verticalIndicator.strokeWidth,
309
319
  "stroke-linecap": "round",
310
320
  "stroke-dasharray": e.value.style.verticalIndicator.strokeDasharray || 0
311
- }, null, 8, Be)) : y("", !0)
321
+ }, null, 8, Ee)) : y("", !0)
312
322
  ]))), 256)),
313
- z.value < 0 ? (o(), n("line", {
323
+ S.value < 0 ? (o(), n("line", {
314
324
  key: 2,
315
325
  x1: s.value.start,
316
326
  x2: s.value.start + s.value.width - 16,
317
- y1: $.value,
318
- y2: $.value,
327
+ y1: N.value,
328
+ y2: N.value,
319
329
  stroke: e.value.style.zeroLine.color,
320
330
  "stroke-dasharray": e.value.style.zeroLine.strokeWidth * 2,
321
331
  "stroke-width": e.value.style.zeroLine.strokeWidth,
322
332
  "stroke-linecap": "round"
323
- }, null, 8, Ee)) : y("", !0),
324
- e.value.style.plot.show ? (o(!0), n(P, { key: 3 }, A(r.value, (a, d) => (o(), n("g", null, [
333
+ }, null, 8, je)) : y("", !0),
334
+ e.value.style.plot.show ? (o(!0), n(P, { key: 3 }, D(r.value, (a, d) => (o(), n("g", null, [
325
335
  h.value && a.id === h.value.id || _.selectedIndex === d ? (o(), n("circle", {
326
336
  key: 0,
327
337
  cx: a.x,
@@ -330,7 +340,7 @@ const we = ["id"], Le = ["xmlns", "viewBox"], $e = ["id"], Ne = ["stop-color"],
330
340
  fill: a.color,
331
341
  stroke: e.value.style.plot.stroke,
332
342
  "stroke-width": e.value.style.plot.strokeWidth
333
- }, null, 8, Oe)) : y("", !0)
343
+ }, null, 8, Re)) : y("", !0)
334
344
  ]))), 256)) : y("", !0),
335
345
  _.showInfo && e.value.style.dataLabel.show ? (o(), n("text", {
336
346
  key: 4,
@@ -339,37 +349,37 @@ const we = ["id"], Le = ["xmlns", "viewBox"], $e = ["id"], Ne = ["stop-color"],
339
349
  "font-size": e.value.style.dataLabel.fontSize,
340
350
  "font-weight": e.value.style.dataLabel.bold ? "bold" : "normal",
341
351
  fill: e.value.style.dataLabel.color
342
- }, j(h.value ? c(Z)(
352
+ }, X(h.value ? c(H)(
343
353
  e.value.style.dataLabel.formatter,
344
354
  h.value.absoluteValue,
345
- c(q)({ p: e.value.style.dataLabel.prefix, v: h.value.absoluteValue, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue }),
355
+ c(Y)({ p: e.value.style.dataLabel.prefix, v: h.value.absoluteValue, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue }),
346
356
  { datapoint: h.value }
347
- ) : c(Z)(
357
+ ) : c(H)(
348
358
  e.value.style.dataLabel.formatter,
349
- E.value,
350
- c(q)({ p: e.value.style.dataLabel.prefix, v: E.value, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue })
351
- )), 9, Re)) : y("", !0),
352
- (o(!0), n(P, null, A(r.value, (a, d) => (o(), n("rect", {
359
+ j.value,
360
+ c(Y)({ p: e.value.style.dataLabel.prefix, v: j.value, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue })
361
+ )), 9, Ue)) : y("", !0),
362
+ (o(!0), n(P, null, D(r.value, (a, d) => (o(), n("rect", {
353
363
  x: a.x - (s.value.width / (g.value + 1) > l.value.padding ? l.value.padding : s.value.width / (g.value + 1)) / 2,
354
364
  y: s.value.top - 6,
355
365
  height: s.value.height + 6,
356
366
  width: s.value.width / (g.value + 1) > l.value.padding ? l.value.padding : s.value.width / (g.value + 1),
357
367
  fill: "transparent",
358
- onMouseenter: (O) => ae(a, d),
359
- onMouseleave: le,
360
- onClick: () => ue(a, d)
361
- }, null, 40, je))), 256)),
362
- W(t.$slots, "svg", { svg: l.value }, void 0, !0)
363
- ], 12, Le)) : y("", !0),
368
+ onMouseenter: (R) => ue(a, d),
369
+ onMouseleave: se,
370
+ onClick: () => oe(a, d)
371
+ }, null, 40, Xe))), 256)),
372
+ A(t.$slots, "svg", { svg: l.value }, void 0, !0)
373
+ ], 12, Ne)) : y("", !0),
364
374
  t.$slots.source ? (o(), n("div", {
365
375
  key: 2,
366
376
  ref_key: "source",
367
377
  ref: F,
368
378
  dir: "auto"
369
379
  }, [
370
- W(t.$slots, "source", {}, void 0, !0)
380
+ A(t.$slots, "source", {}, void 0, !0)
371
381
  ], 512)) : y("", !0),
372
- L.value ? y("", !0) : (o(), ie(me, {
382
+ L.value ? y("", !0) : (o(), ve(be, {
373
383
  key: 3,
374
384
  config: {
375
385
  type: "sparkline",
@@ -381,9 +391,9 @@ const we = ["id"], Le = ["xmlns", "viewBox"], $e = ["id"], Ne = ["stop-color"],
381
391
  }
382
392
  }
383
393
  }, null, 8, ["config"]))
384
- ], 12, we));
394
+ ], 12, $e));
385
395
  }
386
- }, Qe = /* @__PURE__ */ xe(Ue, [["__scopeId", "data-v-afa97ea1"]]);
396
+ }, tt = /* @__PURE__ */ Le(Ze, [["__scopeId", "data-v-9467697c"]]);
387
397
  export {
388
- Qe as default
398
+ tt as default
389
399
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-CxfVE-zl.cjs"),V=require("./useNestedProp-DxRaQ3VM.cjs"),A=require("./vue-ui-skeleton-xn62L2MO.cjs"),q=require("./PackageVersion-DPna32U7.cjs"),O=require("./Tooltip-DfxV57uu.cjs"),U=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),j=["xmlns","viewBox"],M=["id"],H=["stop-color"],I=["stop-color"],R=["stop-color"],W={id:"stackPill",clipPathUnits:"objectBoundingBox"},Y=["fill"],G={key:0,"clip-path":"url(#stackPill)"},X=["x","width","height","fill"],J=["x","width","height","fill","stroke"],K=["onClick","x","width","height","onMouseenter"],Q=["width","height","rx"],Z=["onClick"],ee={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"4px","justify-content":"center"}},te=["height","width"],le=["fill"],oe={key:4,ref:"source",dir:"auto"},ae={__name:"vue-ui-sparkstackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(P,{emit:D}){const u=P,{vue_ui_sparkstackbar:L}=a.useConfig(),x=e.computed(()=>!!u.dataset&&u.dataset.length),B=e.ref(null),S=e.ref(a.createUid()),b=e.ref(!1),_=e.ref(""),t=e.computed({get:()=>$(),set:l=>l});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})}})),C=e.computed(()=>y.value.filter((l,n)=>!d.value.includes(n)));function F(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<C.value.length;o+=1)n.push({...C.value[o],start:l}),l+=C.value[o].width;return n});function z(l,n){D("selectDatapoint",{datapoint:l,index:n})}const w=e.ref(null),k=e.ref(!1),m=e.ref(null);function T({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"&&(_.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>`,_.value=`<div>${r}</div>`}}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{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",{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,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,xmlns:e.unref(a.XMLNS),width:"100%",viewBox:`0 0 ${c.value.width} ${c.value.height}`},[e.createVNode(q._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,H),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,I),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,R)],8,M))),128)),e.createElementVNode("clipPath",W,[e.createElementVNode("rect",{x:"0.005",y:"-2",width:"0.99",height:"5",rx:"3",ry:"3",fill:t.value.style.backgroundColor},null,8,Y)])]),N.value>0?(e.openBlock(),e.createElementBlock("g",G,[(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,X))),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,J))),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:()=>T({datapoint:o,seriesIndex:r}),onMouseleave:n[0]||(n[0]=v=>{b.value=!1,m.value=null})},null,42,K))),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,Q))],8,j)):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(A.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=>{F(r),z(o,r)}},[e.createElementVNode("div",ee,[(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,le)],8,te)),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,Z))),256))],4)):e.createCommentVNode("",!0),e.createVNode(O._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:_.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",oe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],4))}},re=U._export_sfc(ae,[["__scopeId","data-v-233900f7"]]);exports.default=re;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-D3H-ye-i.cjs"),V=require("./useNestedProp-BkL_BRGP.cjs"),A=require("./vue-ui-skeleton-BWO9iit6.cjs"),q=require("./PackageVersion-BPbxd_rU.cjs"),O=require("./Tooltip-CopGUpZs.cjs"),U=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),j=["xmlns","viewBox"],M=["id"],H=["stop-color"],I=["stop-color"],R=["stop-color"],W={id:"stackPill",clipPathUnits:"objectBoundingBox"},Y=["fill"],G={key:0,"clip-path":"url(#stackPill)"},X=["x","width","height","fill"],J=["x","width","height","fill","stroke"],K=["onClick","x","width","height","onMouseenter"],Q=["width","height","rx"],Z=["onClick"],ee={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"4px","justify-content":"center"}},te=["height","width"],le=["fill"],oe={key:4,ref:"source",dir:"auto"},ae={__name:"vue-ui-sparkstackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(P,{emit:D}){const u=P,{vue_ui_sparkstackbar:L}=a.useConfig(),x=e.computed(()=>!!u.dataset&&u.dataset.length),B=e.ref(null),S=e.ref(a.createUid()),b=e.ref(!1),_=e.ref(""),t=e.computed({get:()=>$(),set:l=>l});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})}})),C=e.computed(()=>y.value.filter((l,n)=>!d.value.includes(n)));function F(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<C.value.length;o+=1)n.push({...C.value[o],start:l}),l+=C.value[o].width;return n});function z(l,n){D("selectDatapoint",{datapoint:l,index:n})}const w=e.ref(null),k=e.ref(!1),m=e.ref(null);function T({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"&&(_.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>`,_.value=`<div>${r}</div>`}}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{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",{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,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,xmlns:e.unref(a.XMLNS),width:"100%",viewBox:`0 0 ${c.value.width} ${c.value.height}`},[e.createVNode(q._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,H),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,I),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,R)],8,M))),128)),e.createElementVNode("clipPath",W,[e.createElementVNode("rect",{x:"0.005",y:"-2",width:"0.99",height:"5",rx:"3",ry:"3",fill:t.value.style.backgroundColor},null,8,Y)])]),N.value>0?(e.openBlock(),e.createElementBlock("g",G,[(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,X))),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,J))),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:()=>T({datapoint:o,seriesIndex:r}),onMouseleave:n[0]||(n[0]=v=>{b.value=!1,m.value=null})},null,42,K))),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,Q))],8,j)):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(A.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=>{F(r),z(o,r)}},[e.createElementVNode("div",ee,[(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,le)],8,te)),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,Z))),256))],4)):e.createCommentVNode("",!0),e.createVNode(O._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:_.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",oe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],4))}},re=U._export_sfc(ae,[["__scopeId","data-v-233900f7"]]);exports.default=re;
@@ -1,9 +1,9 @@
1
1
  import { computed as m, ref as d, watch as Y, onMounted as se, openBlock as s, createElementBlock as r, normalizeStyle as v, createElementVNode as p, toDisplayString as w, createCommentVNode as y, unref as C, createVNode as G, Fragment as x, renderList as $, normalizeClass as F, createBlock as re, withCtx as q, renderSlot as j, normalizeProps as H, guardReactiveProps as X } from "vue";
2
- import { u as ne, c as J, t as ue, a as ie, p as i, d as N, b as ce, o as de, e as K, g as ve, f as E, X as pe, s as ge, w as fe, i as Q, x as he } from "./index-CRiXU5u4.js";
3
- import { u as Z } from "./useNestedProp-CJpdmtwu.js";
4
- import ye from "./vue-ui-skeleton-CjpLaxv-.js";
5
- import { _ as me } from "./PackageVersion-CTpPwNFg.js";
6
- import { _ as be } from "./Tooltip-wUAIAM2C.js";
2
+ import { u as ne, c as J, t as ue, a as ie, p as i, d as N, b as ce, o as de, e as K, g as ve, f as E, X as pe, s as ge, w as fe, i as Q, x as he } from "./index-9EusFpSb.js";
3
+ import { u as Z } from "./useNestedProp-DLOArwu0.js";
4
+ import ye from "./vue-ui-skeleton-DptJx8-6.js";
5
+ import { _ as me } from "./PackageVersion-DjRRmHKg.js";
6
+ import { _ as be } from "./Tooltip-1RIjj9Cf.js";
7
7
  import { _ as ke } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  const _e = ["xmlns", "viewBox"], we = ["id"], Ce = ["stop-color"], xe = ["stop-color"], $e = ["stop-color"], Se = {
9
9
  id: "stackPill",