vue-data-ui 2.4.10 → 2.4.12

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 (157) hide show
  1. package/README.md +25 -0
  2. package/dist/{Arrow-CM_kK1lh.js → Arrow-CGKCROwz.js} +1 -1
  3. package/dist/{Arrow-DUr4i9t2.cjs → Arrow-CtkFVr5U.cjs} +1 -1
  4. package/dist/{BaseIcon-CAU2cQG0.js → BaseIcon-C4ndCspW.js} +1 -1
  5. package/dist/{BaseIcon-DGcywBgz.cjs → BaseIcon-CLoM8DDe.cjs} +1 -1
  6. package/dist/{DataTable-BGBoMvME.cjs → DataTable-C1e5i-AQ.cjs} +1 -1
  7. package/dist/{DataTable-DlskIWF5.js → DataTable-CveCk6xW.js} +2 -2
  8. package/dist/{Legend-CSYqCPTm.js → Legend-DDWzCGWe.js} +1 -1
  9. package/dist/{Legend-B40iHzw3.cjs → Legend-XfQwPnB6.cjs} +1 -1
  10. package/dist/{PackageVersion-DH0d8pMI.js → PackageVersion-Bi8RUX5W.js} +1 -1
  11. package/dist/{PackageVersion-BQj9e8Pe.cjs → PackageVersion-BzA9shEH.cjs} +1 -1
  12. package/dist/{PenAndPaper-BY24yHU3.js → PenAndPaper-DnMUcq2C.js} +2 -2
  13. package/dist/{PenAndPaper-CT1cbWxJ.cjs → PenAndPaper-DolOORON.cjs} +1 -1
  14. package/dist/{Shape-D_HmNdly.js → Shape-BvB4qzcw.js} +1 -1
  15. package/dist/{Shape-DCM4mNbd.cjs → Shape-CmAme9xi.cjs} +1 -1
  16. package/dist/{Slicer-CCdYT_l-.cjs → Slicer-BVuY0EjX.cjs} +1 -1
  17. package/dist/{Slicer-CWt_RFCu.js → Slicer-Be_ldy79.js} +2 -2
  18. package/dist/{Title-Mdlm-Z1o.js → Title-CAfojmIe.js} +1 -1
  19. package/dist/{Title-BUfOW_RU.cjs → Title-CYDoc6j3.cjs} +1 -1
  20. package/dist/{Tooltip-jO6bDIPj.cjs → Tooltip-BABZKovD.cjs} +1 -1
  21. package/dist/{Tooltip-Jc-upaDj.js → Tooltip-v1xcr7vF.js} +1 -1
  22. package/dist/{index-DK5d18KK.js → index-CFa1LJja.js} +1265 -1195
  23. package/dist/index-KDxAXZXP.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-B0n5mAli.cjs → useNestedProp-CXjSKjKD.cjs} +1 -1
  28. package/dist/{useNestedProp-ClXcrtps.js → useNestedProp-DtAqKb0W.js} +1 -1
  29. package/dist/{usePrinter-DGDIrVlD.js → usePrinter-DEvTXkt_.js} +1 -1
  30. package/dist/{usePrinter-NqofNL0V.cjs → usePrinter-l7v2Rcgc.cjs} +1 -1
  31. package/dist/{vue-data-ui-BfhnPKln.cjs → vue-data-ui-C1RPDTzl.cjs} +1 -1
  32. package/dist/{vue-data-ui-lH7ymNyt.js → vue-data-ui-CXYOFCkg.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-DqwELWxm.cjs → vue-ui-3d-bar-BCaGJcxZ.cjs} +1 -1
  36. package/dist/{vue-ui-3d-bar-CoVF3XOc.js → vue-ui-3d-bar-BSiHb8c-.js} +9 -9
  37. package/dist/{vue-ui-accordion-BPPv4_ip.js → vue-ui-accordion-BjK5Zqcp.js} +3 -3
  38. package/dist/{vue-ui-accordion-Cs1ai6jc.cjs → vue-ui-accordion-D5b-rLq8.cjs} +1 -1
  39. package/dist/{vue-ui-age-pyramid-C53sStsM.js → vue-ui-age-pyramid-DaAUzEm9.js} +10 -10
  40. package/dist/{vue-ui-age-pyramid-3C4d-_GM.cjs → vue-ui-age-pyramid-DfYUkpdC.cjs} +1 -1
  41. package/dist/{vue-ui-annotator-k76x9J6j.js → vue-ui-annotator-BdKHB-q4.js} +1 -1
  42. package/dist/{vue-ui-annotator-_Q0ZIzn8.cjs → vue-ui-annotator-Cb0lPmzD.cjs} +1 -1
  43. package/dist/{vue-ui-bullet-jgSYPjBF.js → vue-ui-bullet-C-nXv9dy.js} +8 -8
  44. package/dist/{vue-ui-bullet-vlz1aeyd.cjs → vue-ui-bullet-wx_gocM4.cjs} +1 -1
  45. package/dist/{vue-ui-candlestick-4E2zfgXm.cjs → vue-ui-candlestick-DB00WcCz.cjs} +1 -1
  46. package/dist/{vue-ui-candlestick-C5WvA_0-.js → vue-ui-candlestick-DWO7x9nX.js} +11 -11
  47. package/dist/{vue-ui-carousel-table-BGhnNK69.js → vue-ui-carousel-table-BLBPwKS8.js} +4 -4
  48. package/dist/{vue-ui-carousel-table-Dvv07d2C.cjs → vue-ui-carousel-table-F-DEBome.cjs} +1 -1
  49. package/dist/{vue-ui-chestnut-CS3-u4Ni.js → vue-ui-chestnut-CXlm92u0.js} +8 -8
  50. package/dist/{vue-ui-chestnut-BN0WYuYI.cjs → vue-ui-chestnut-CzFwENN8.cjs} +1 -1
  51. package/dist/{vue-ui-cursor-CBzNiBah.cjs → vue-ui-cursor-DJLKYGcb.cjs} +1 -1
  52. package/dist/{vue-ui-cursor-CvO35XOa.js → vue-ui-cursor-D_pO4Spk.js} +2 -2
  53. package/dist/{vue-ui-dashboard-B_wLH-4X.cjs → vue-ui-dashboard-4NILx623.cjs} +1 -1
  54. package/dist/{vue-ui-dashboard-CxcVLbE6.js → vue-ui-dashboard-COKACbCL.js} +2 -2
  55. package/dist/{vue-ui-digits-BGSghuCv.js → vue-ui-digits-BPL49_3d.js} +2 -2
  56. package/dist/{vue-ui-digits-B7Fl83L7.cjs → vue-ui-digits-BTTzz0k1.cjs} +1 -1
  57. package/dist/{vue-ui-donut-DOpR22Ej.cjs → vue-ui-donut-DcEFUd-o.cjs} +1 -1
  58. package/dist/{vue-ui-donut-dwvOwA-U.js → vue-ui-donut-DqJKys7z.js} +11 -11
  59. package/dist/{vue-ui-donut-evolution-5uLcYRnw.cjs → vue-ui-donut-evolution-BJhAsLVn.cjs} +1 -1
  60. package/dist/{vue-ui-donut-evolution-VOiW2ObU.js → vue-ui-donut-evolution-CYsUMYt3.js} +11 -11
  61. package/dist/{vue-ui-dumbbell-C0MpVaFs.js → vue-ui-dumbbell-Be6aaQry.js} +10 -10
  62. package/dist/{vue-ui-dumbbell-9q9h1dDn.cjs → vue-ui-dumbbell-By2gkcbi.cjs} +1 -1
  63. package/dist/{vue-ui-flow-Cq4LCfPc.js → vue-ui-flow-Bu2IHLu9.js} +9 -9
  64. package/dist/{vue-ui-flow-CHwAarVU.cjs → vue-ui-flow-CJNjrSDE.cjs} +1 -1
  65. package/dist/{vue-ui-galaxy-B4CfayH0.js → vue-ui-galaxy--W8nCy3k.js} +11 -11
  66. package/dist/{vue-ui-galaxy-Cnvl-yLA.cjs → vue-ui-galaxy-Bl6v7ahB.cjs} +1 -1
  67. package/dist/{vue-ui-gauge-CaobjymM.js → vue-ui-gauge-CAKo27_R.js} +7 -7
  68. package/dist/{vue-ui-gauge-BjJLKF-b.cjs → vue-ui-gauge-D9dkzTLj.cjs} +1 -1
  69. package/dist/{vue-ui-gizmo-_y5hJB9C.cjs → vue-ui-gizmo-BnrcwQ_f.cjs} +1 -1
  70. package/dist/{vue-ui-gizmo-Cj8gfmZ2.js → vue-ui-gizmo-CGSp6322.js} +3 -3
  71. package/dist/{vue-ui-heatmap-BpC1gF0u.cjs → vue-ui-heatmap-5NsMNQC1.cjs} +1 -1
  72. package/dist/{vue-ui-heatmap-D21A-6Uy.js → vue-ui-heatmap-CGiaD-XX.js} +10 -10
  73. package/dist/{vue-ui-kpi-BcXppcHM.cjs → vue-ui-kpi-DcvKKcCZ.cjs} +1 -1
  74. package/dist/{vue-ui-kpi-BsRb8jt8.js → vue-ui-kpi-_o8oGkDo.js} +3 -3
  75. package/dist/{vue-ui-mini-loader-azeChSwS.cjs → vue-ui-mini-loader-BnWpe-Jx.cjs} +1 -1
  76. package/dist/{vue-ui-mini-loader-DtrX9TLF.js → vue-ui-mini-loader-BwahnZ5M.js} +2 -2
  77. package/dist/{vue-ui-molecule-vi8RLRaQ.js → vue-ui-molecule-DW45rSTG.js} +11 -11
  78. package/dist/{vue-ui-molecule-nZnahWmt.cjs → vue-ui-molecule-EI0QZuPn.cjs} +1 -1
  79. package/dist/{vue-ui-mood-radar-CEaUUawh.cjs → vue-ui-mood-radar-Bgunn4sw.cjs} +1 -1
  80. package/dist/{vue-ui-mood-radar-DL1kGEqS.js → vue-ui-mood-radar-Sia4EwXF.js} +11 -11
  81. package/dist/{vue-ui-nested-donuts-Dbw6EGVj.js → vue-ui-nested-donuts-Cf7hGnwG.js} +11 -11
  82. package/dist/{vue-ui-nested-donuts-BKORKmdq.cjs → vue-ui-nested-donuts-tWesxUCT.cjs} +1 -1
  83. package/dist/{vue-ui-onion-DWDZ6qgP.js → vue-ui-onion-BaZ_wTbo.js} +11 -11
  84. package/dist/{vue-ui-onion-BUbTjewt.cjs → vue-ui-onion-C6MaVU1K.cjs} +1 -1
  85. package/dist/{vue-ui-parallel-coordinate-plot-BCIse3jy.js → vue-ui-parallel-coordinate-plot-BtIKgxvv.js} +12 -12
  86. package/dist/{vue-ui-parallel-coordinate-plot-BQbTgBLZ.cjs → vue-ui-parallel-coordinate-plot-DrV9F60N.cjs} +1 -1
  87. package/dist/vue-ui-quadrant-Cle11mCD.cjs +1 -0
  88. package/dist/{vue-ui-quadrant-DG7cPvvY.js → vue-ui-quadrant-L6SfZjpt.js} +130 -123
  89. package/dist/{vue-ui-quick-chart-Dir7Bzan.cjs → vue-ui-quick-chart-CqS3PeU-.cjs} +1 -1
  90. package/dist/{vue-ui-quick-chart-BpI2l7KR.js → vue-ui-quick-chart-DYu27_hL.js} +9 -9
  91. package/dist/{vue-ui-radar-kJVA04dK.js → vue-ui-radar-BHirHWDO.js} +12 -12
  92. package/dist/{vue-ui-radar-CJJsi6T1.cjs → vue-ui-radar-DSrgQE0m.cjs} +1 -1
  93. package/dist/{vue-ui-rating-DePJC_kO.js → vue-ui-rating-BBRC3Fex.js} +11 -11
  94. package/dist/{vue-ui-rating-D1AwQnIf.cjs → vue-ui-rating-BJHo9SsT.cjs} +1 -1
  95. package/dist/{vue-ui-relation-circle-CBEVCM1z.js → vue-ui-relation-circle-CpGiH1jp.js} +7 -7
  96. package/dist/{vue-ui-relation-circle-C2I_udoT.cjs → vue-ui-relation-circle-DzRQKnES.cjs} +1 -1
  97. package/dist/{vue-ui-rings-8z2SwA9Z.js → vue-ui-rings-B7tPoi26.js} +11 -11
  98. package/dist/{vue-ui-rings-Bya_txxb.cjs → vue-ui-rings-DT_F10Cs.cjs} +1 -1
  99. package/dist/vue-ui-scatter-B5G15tC4.cjs +1 -0
  100. package/dist/{vue-ui-scatter-CpSoThxp.js → vue-ui-scatter-CTk2BZ_d.js} +131 -127
  101. package/dist/{vue-ui-screenshot-m4dgEnYd.js → vue-ui-screenshot-CZr_osbk.js} +1 -1
  102. package/dist/{vue-ui-screenshot-B5ZTnb9m.cjs → vue-ui-screenshot-DRe3Coog.cjs} +1 -1
  103. package/dist/{vue-ui-skeleton-BRE3meIp.js → vue-ui-skeleton-CHLsECtI.js} +20 -20
  104. package/dist/{vue-ui-skeleton-DtwM9cxs.cjs → vue-ui-skeleton-CdeslaC3.cjs} +1 -1
  105. package/dist/{vue-ui-smiley-Dr-w5W-S.cjs → vue-ui-smiley-BcgpnSoO.cjs} +1 -1
  106. package/dist/{vue-ui-smiley-DKfb2gzh.js → vue-ui-smiley-esJYBMWC.js} +2 -2
  107. package/dist/vue-ui-spark-trend-B744D8Vm.cjs +1 -0
  108. package/dist/vue-ui-spark-trend-CLLnG7sn.js +282 -0
  109. package/dist/{vue-ui-sparkbar-CBJzI2Y6.js → vue-ui-sparkbar-DP4IIvXP.js} +4 -4
  110. package/dist/{vue-ui-sparkbar-CSIYw26l.cjs → vue-ui-sparkbar-sM0UolJY.cjs} +1 -1
  111. package/dist/{vue-ui-sparkgauge-ChJrYz-j.cjs → vue-ui-sparkgauge-CdCvjUt1.cjs} +1 -1
  112. package/dist/{vue-ui-sparkgauge-WVawdMgw.js → vue-ui-sparkgauge-DxXLjj0m.js} +4 -4
  113. package/dist/{vue-ui-sparkhistogram-B_rv8cdu.cjs → vue-ui-sparkhistogram-BKH_x2YZ.cjs} +1 -1
  114. package/dist/{vue-ui-sparkhistogram-DjOfNle3.js → vue-ui-sparkhistogram-eiNFDU7_.js} +5 -5
  115. package/dist/{vue-ui-sparkline-CDqZbqFZ.js → vue-ui-sparkline-5JHLo5sp.js} +134 -124
  116. package/dist/vue-ui-sparkline-B2O2Ltg7.cjs +1 -0
  117. package/dist/{vue-ui-sparkstackbar-uxG--V1I.cjs → vue-ui-sparkstackbar-5yePKW_I.cjs} +1 -1
  118. package/dist/{vue-ui-sparkstackbar-CRXbTlb3.js → vue-ui-sparkstackbar-R08GxmHX.js} +5 -5
  119. package/dist/{vue-ui-stackbar-hVWTvq2q.cjs → vue-ui-stackbar-7KA0-619.cjs} +1 -1
  120. package/dist/{vue-ui-stackbar-C2_GdpuG.js → vue-ui-stackbar-DLdmXSKP.js} +12 -12
  121. package/dist/{vue-ui-strip-plot--PGjbjCQ.js → vue-ui-strip-plot-5JzjqmSe.js} +11 -11
  122. package/dist/{vue-ui-strip-plot-Df3v8CjI.cjs → vue-ui-strip-plot-iJg6nab9.cjs} +1 -1
  123. package/dist/{vue-ui-table-CnOw_aIw.cjs → vue-ui-table-BwjCx5AH.cjs} +1 -1
  124. package/dist/{vue-ui-table-CaEHdo-i.js → vue-ui-table-DBuVWV5Y.js} +10 -10
  125. package/dist/{vue-ui-table-heatmap-DGY-jDJp.js → vue-ui-table-heatmap-DYCUCDMQ.js} +21 -21
  126. package/dist/{vue-ui-table-heatmap-DBP8PC6T.cjs → vue-ui-table-heatmap-_bASSmfs.cjs} +1 -1
  127. package/dist/{vue-ui-table-sparkline-DXg8PsM9.cjs → vue-ui-table-sparkline-BEJ__c2i.cjs} +1 -1
  128. package/dist/{vue-ui-table-sparkline-DgX8QjmZ.js → vue-ui-table-sparkline-BvozgKWZ.js} +16 -16
  129. package/dist/{vue-ui-thermometer-B8sDrFQi.js → vue-ui-thermometer-1HmsfwA6.js} +7 -7
  130. package/dist/{vue-ui-thermometer-dTugfFAc.cjs → vue-ui-thermometer-Dc49W_uX.cjs} +1 -1
  131. package/dist/{vue-ui-timer-Bk7NwPQj.cjs → vue-ui-timer-CzsWb_ok.cjs} +1 -1
  132. package/dist/{vue-ui-timer-BCdkpEqq.js → vue-ui-timer-ccFYaDXI.js} +5 -5
  133. package/dist/{vue-ui-tiremarks-C1jy9rfy.js → vue-ui-tiremarks-CMQ6uKOm.js} +7 -7
  134. package/dist/{vue-ui-tiremarks-D-feFYrh.cjs → vue-ui-tiremarks-CqjOSr6y.cjs} +1 -1
  135. package/dist/{vue-ui-treemap-B9waqwni.cjs → vue-ui-treemap-CLTdGsvf.cjs} +1 -1
  136. package/dist/{vue-ui-treemap-yOP6_AwZ.js → vue-ui-treemap-Dbkr_rdH.js} +11 -11
  137. package/dist/{vue-ui-vertical-bar-D0TIrS3E.js → vue-ui-vertical-bar-BzIh5UUg.js} +11 -11
  138. package/dist/{vue-ui-vertical-bar-BIIeyp43.cjs → vue-ui-vertical-bar-DzWoUrXd.cjs} +1 -1
  139. package/dist/{vue-ui-waffle-CxpK1bY4.js → vue-ui-waffle-CQw6Qf9H.js} +11 -11
  140. package/dist/{vue-ui-waffle-LfnZeSYq.cjs → vue-ui-waffle-GvNWX9QC.cjs} +1 -1
  141. package/dist/{vue-ui-wheel-xX3KGkhv.js → vue-ui-wheel-CXmf0H03.js} +7 -7
  142. package/dist/{vue-ui-wheel-B6VvLnYu.cjs → vue-ui-wheel-Cafjyq_O.cjs} +1 -1
  143. package/dist/{vue-ui-word-cloud-BQ3rUXo5.cjs → vue-ui-word-cloud-B-5D28w8.cjs} +1 -1
  144. package/dist/{vue-ui-word-cloud-DBOUW839.js → vue-ui-word-cloud-CAJ-pqpM.js} +10 -10
  145. package/dist/{vue-ui-xy-zsQa4PDM.js → vue-ui-xy-BNCxzo7p.js} +314 -300
  146. package/dist/vue-ui-xy-DejNMLt_.cjs +3 -0
  147. package/dist/vue-ui-xy-canvas-BCMw2wOS.cjs +9 -0
  148. package/dist/{vue-ui-xy-canvas-DMjbTHI4.js → vue-ui-xy-canvas-cnjS60Rg.js} +63 -60
  149. package/package.json +1 -1
  150. package/dist/index-MkqCn_ca.cjs +0 -9
  151. package/dist/vue-ui-quadrant-CXWcP-cN.cjs +0 -1
  152. package/dist/vue-ui-scatter-DdBFmaXw.cjs +0 -1
  153. package/dist/vue-ui-spark-trend-C2OEDDlH.js +0 -272
  154. package/dist/vue-ui-spark-trend-DLy5nzXJ.cjs +0 -1
  155. package/dist/vue-ui-sparkline-CCfZsEZd.cjs +0 -1
  156. package/dist/vue-ui-xy-CSejjEnw.cjs +0 -3
  157. package/dist/vue-ui-xy-canvas-MERAnzru.cjs +0 -9
@@ -0,0 +1,282 @@
1
+ import { computed as s, ref as k, watch as D, onMounted as H, openBlock as o, createElementBlock as u, normalizeStyle as J, createBlock as L, unref as h, createVNode as K, createElementVNode as _, createCommentVNode as d, toDisplayString as E, renderSlot as Q } from "vue";
2
+ import { u as ee, c as te, t as ae, Y as S, o as le, e as ne, v as c, Z as oe, X as se, s as M, R as G, f as O, i as ue } from "./index-CFa1LJja.js";
3
+ import { u as U } from "./useNestedProp-DtAqKb0W.js";
4
+ import I from "./BaseIcon-C4ndCspW.js";
5
+ import re from "./vue-ui-skeleton-CHLsECtI.js";
6
+ import { _ as ie } from "./PackageVersion-Bi8RUX5W.js";
7
+ import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
+ const ve = ["id"], he = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"], fe = ["stop-color"], pe = { key: 0 }, me = ["d", "fill"], ge = ["d", "fill"], ke = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], _e = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], be = ["height", "width", "x"], xe = { style: { width: "100%" } }, we = ["x", "y", "fill", "font-size", "font-weight"], Ce = ["stroke", "cx", "cy", "fill"], Le = ["x", "y", "font-size", "fill", "font-weight"], $e = {
9
+ key: 2,
10
+ ref: "source",
11
+ dir: "auto"
12
+ }, Ne = {
13
+ __name: "vue-ui-spark-trend",
14
+ props: {
15
+ config: {
16
+ type: Object,
17
+ default() {
18
+ return {};
19
+ }
20
+ },
21
+ dataset: {
22
+ type: Array,
23
+ default() {
24
+ return [];
25
+ }
26
+ }
27
+ },
28
+ setup(Z) {
29
+ const r = Z, { vue_ui_spark_trend: q } = ee(), P = s(() => !!r.dataset && r.dataset.length), b = k(te()), e = s({
30
+ get: () => F(),
31
+ set: (t) => t
32
+ });
33
+ function F() {
34
+ const t = U({
35
+ userConfig: r.config,
36
+ defaultConfig: q
37
+ });
38
+ return t.theme ? {
39
+ ...U({
40
+ userConfig: ae.vue_ui_spark_trend[t.theme] || r.config,
41
+ defaultConfig: t
42
+ })
43
+ } : t;
44
+ }
45
+ const f = s(() => S({
46
+ data: r.dataset,
47
+ threshold: e.value.downsample.threshold
48
+ }));
49
+ D(() => r.config, (t) => {
50
+ e.value = F(), j();
51
+ }, { deep: !0 }), D(() => r.dataset, (t) => {
52
+ m.value = S({
53
+ data: r.dataset,
54
+ threshold: e.value.downsample.threshold
55
+ }).map((l) => [void 0, 1 / 0, -1 / 0, null, NaN].includes(l) ? null : l);
56
+ }, { deep: !0 });
57
+ function $(t) {
58
+ return t.map((l) => c(l));
59
+ }
60
+ const m = k(S({
61
+ data: r.dataset,
62
+ threshold: e.value.downsample.threshold
63
+ }).map((t) => e.value.style.animation.show || [void 0, 1 / 0, -1 / 0, null, NaN].includes(t) ? null : t)), g = k(!1), N = k(null);
64
+ H(() => {
65
+ j();
66
+ let l = 1e3 / e.value.style.animation.animationFrames, v = performance.now();
67
+ if (e.value.style.animation.show && e.value.style.animation.animationFrames && r.dataset.length > 1) {
68
+ let z = function() {
69
+ g.value = !0;
70
+ let B = performance.now(), V = B - v;
71
+ V > l ? (v = B - V % l, p < f.value.length ? (m.value.push(f.value[p]), p += 1, N.value = requestAnimationFrame(z)) : (cancelAnimationFrame(N.value), m.value = $(f.value), g.value = !1)) : N.value = requestAnimationFrame(z);
72
+ };
73
+ m.value = [];
74
+ let p = 0;
75
+ z();
76
+ }
77
+ });
78
+ function j() {
79
+ le(r.dataset) && ne({
80
+ componentName: "VueUiSparkTrend",
81
+ type: "dataset"
82
+ });
83
+ }
84
+ const n = k({
85
+ height: 80,
86
+ width: 300
87
+ }), y = s(() => ({
88
+ top: e.value.style.padding.top,
89
+ left: e.value.style.padding.left,
90
+ right: n.value.width - e.value.style.padding.right,
91
+ bottom: n.value.height - e.value.style.padding.bottom,
92
+ height: n.value.height - (e.value.style.padding.top + e.value.style.padding.bottom) - (e.value.style.dataLabel.show ? e.value.style.dataLabel.fontSize : 0),
93
+ width: n.value.width - (e.value.style.padding.left + e.value.style.padding.right)
94
+ })), T = s(() => {
95
+ const t = $(f.value);
96
+ return {
97
+ max: Math.max(...t.map((l) => c(l))),
98
+ min: Math.min(...t.map((l) => c(l)))
99
+ };
100
+ }), x = s(() => {
101
+ const t = T.value.min >= 0 ? 0 : T.value.min;
102
+ return Math.abs(t);
103
+ }), R = s(() => T.value.max + x.value);
104
+ function A(t) {
105
+ return t / R.value;
106
+ }
107
+ const W = s(() => f.value.length), a = s(() => m.value.map((t, l) => {
108
+ const v = isNaN(t) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t) ? 0 : t || 0;
109
+ return {
110
+ value: c(t),
111
+ absoluteValue: c(v),
112
+ plotValue: c(v + x.value),
113
+ toMax: A(v + x.value),
114
+ x: y.value.left + c(l * (y.value.width / (W.value - 1))) - e.value.style.padding.right,
115
+ y: y.value.bottom - c(y.value.height * A(v + x.value))
116
+ };
117
+ })), w = s(() => {
118
+ const t = $(f.value);
119
+ return e.value.style.trendLabel.trendType === "global" ? oe(t) : e.value.style.trendLabel.trendType === "n-1" && t.length > 1 ? (t.at(-1) / t.at(-2) - 1) * 100 : e.value.style.trendLabel.trendType === "lastToFirst" ? (t.at(-1) / t[0] - 1) * 100 : 0;
120
+ }), C = s(() => g.value || w.value === 0 ? "neutral" : w.value > 0 ? "positive" : "negative"), i = s(() => e.value.style.arrow.colors[C.value]), X = s(() => {
121
+ const t = { x: a.value[0].x, y: n.value.height - 6 }, l = { x: a.value[a.value.length - 1].x, y: n.value.height - 6 }, v = [];
122
+ return a.value.forEach((p) => {
123
+ v.push(`${p.x},${p.y} `);
124
+ }), [t.x, t.y, ...v, l.x, l.y].toString();
125
+ }), Y = s(() => {
126
+ let t = [];
127
+ return a.value.forEach((l) => {
128
+ t.push(`${l.x},${l.y} `);
129
+ }), `M ${t.toString()}`;
130
+ });
131
+ return (t, l) => (o(), u("div", {
132
+ class: "vue-ui-spark-trend",
133
+ id: b.value,
134
+ style: J(`width:100%;font-family:${e.value.style.fontFamily};background:${e.value.style.backgroundColor}`)
135
+ }, [
136
+ P.value ? (o(), u("svg", {
137
+ key: 1,
138
+ xmlns: h(se),
139
+ viewBox: `0 0 ${n.value.width} ${n.value.height}`,
140
+ style: "width:100%;background:transparent;overflow:visible"
141
+ }, [
142
+ K(ie),
143
+ _("defs", null, [
144
+ _("linearGradient", {
145
+ x1: "0%",
146
+ y1: "0%",
147
+ x2: "0%",
148
+ y2: "100%",
149
+ id: `pill_gradient_${b.value}`
150
+ }, [
151
+ _("stop", {
152
+ offset: "0%",
153
+ "stop-color": h(M)(e.value.style.line.useColorTrend ? i.value : e.value.style.line.stroke, e.value.style.area.opacity)
154
+ }, null, 8, ye),
155
+ _("stop", {
156
+ offset: "100%",
157
+ "stop-color": e.value.style.backgroundColor
158
+ }, null, 8, fe)
159
+ ], 8, ce)
160
+ ]),
161
+ e.value.style.area.show && a.value[0] ? (o(), u("g", pe, [
162
+ e.value.style.line.smooth ? (o(), u("path", {
163
+ key: 0,
164
+ d: `M ${a.value[0].x},${y.value.bottom} ${h(G)(a.value)} L ${a.value.at(-1).x},${y.value.bottom} Z`,
165
+ fill: e.value.style.area.useGradient ? `url(#pill_gradient_${b.value})` : h(M)(e.value.style.line.useColorTrend ? i.value : e.value.style.line.stroke, e.value.style.area.opacity),
166
+ stroke: "none"
167
+ }, null, 8, me)) : (o(), u("path", {
168
+ key: 1,
169
+ d: `M${X.value}Z`,
170
+ fill: e.value.style.area.useGradient ? `url(#pill_gradient_${b.value})` : h(M)(e.value.style.line.useColorTrend ? i.value : e.value.style.line.stroke, e.value.style.area.opacity),
171
+ stroke: "none"
172
+ }, null, 8, ge))
173
+ ])) : d("", !0),
174
+ e.value.style.line.smooth && a.value.length ? (o(), u("path", {
175
+ key: 1,
176
+ d: `M ${h(G)(a.value)}`,
177
+ stroke: e.value.style.line.useColorTrend ? i.value : e.value.style.line.stroke,
178
+ fill: "none",
179
+ "stroke-width": e.value.style.line.strokeWidth,
180
+ "stroke-linecap": e.value.style.line.strokeLinecap,
181
+ "stroke-linejoin": e.value.style.line.strokeLinejoin
182
+ }, null, 8, ke)) : d("", !0),
183
+ !e.value.style.line.smooth && a.value.length ? (o(), u("path", {
184
+ key: 2,
185
+ d: Y.value,
186
+ stroke: e.value.style.line.useColorTrend ? i.value : e.value.style.line.stroke,
187
+ fill: "none",
188
+ "stroke-width": e.value.style.line.strokeWidth,
189
+ "stroke-linecap": e.value.style.line.strokeLinecap,
190
+ "stroke-linejoin": e.value.style.line.strokeLinejoin
191
+ }, null, 8, _e)) : d("", !0),
192
+ g.value ? d("", !0) : (o(), u("foreignObject", {
193
+ key: 3,
194
+ height: n.value.height / 2,
195
+ width: n.value.height / 2,
196
+ x: n.value.height / 5,
197
+ y: 8
198
+ }, [
199
+ _("div", xe, [
200
+ C.value === "positive" ? (o(), L(I, {
201
+ key: 0,
202
+ stroke: i.value,
203
+ name: "arrowTop",
204
+ size: n.value.height / 2
205
+ }, null, 8, ["stroke", "size"])) : d("", !0),
206
+ C.value === "negative" ? (o(), L(I, {
207
+ key: 1,
208
+ stroke: i.value,
209
+ name: "arrowBottom",
210
+ size: n.value.height / 2
211
+ }, null, 8, ["stroke", "size"])) : d("", !0),
212
+ C.value === "neutral" ? (o(), L(I, {
213
+ key: 2,
214
+ stroke: i.value,
215
+ name: "arrowRight",
216
+ size: n.value.height / 2
217
+ }, null, 8, ["stroke", "size"])) : d("", !0)
218
+ ])
219
+ ], 8, be)),
220
+ g.value ? d("", !0) : (o(), u("text", {
221
+ key: 4,
222
+ x: n.value.height / 2 - n.value.height / 20,
223
+ y: y.value.bottom,
224
+ "text-anchor": "middle",
225
+ fill: e.value.style.trendLabel.useColorTrend ? i.value : e.value.style.trendLabel.color,
226
+ "font-size": e.value.style.trendLabel.fontSize,
227
+ "font-weight": e.value.style.trendLabel.bold ? "bold" : "normal"
228
+ }, E(h(O)({
229
+ p: w.value > 0 ? "+" : "",
230
+ v: w.value,
231
+ s: "%",
232
+ r: e.value.style.trendLabel.rounding
233
+ })), 9, we)),
234
+ a.value.length && a.value.at(-1).x !== void 0 ? (o(), u("circle", {
235
+ key: 5,
236
+ stroke: e.value.style.backgroundColor,
237
+ "stroke-width": 2,
238
+ cx: a.value.at(-1).x,
239
+ cy: a.value.at(-1).y,
240
+ r: 4,
241
+ fill: i.value
242
+ }, null, 8, Ce)) : d("", !0),
243
+ a.value.length && a.value.at(-1).x !== void 0 && e.value.style.dataLabel.show ? (o(), u("text", {
244
+ key: 6,
245
+ "text-anchor": "middle",
246
+ x: a.value.at(-1).x,
247
+ y: a.value.at(-1).y - e.value.style.dataLabel.fontSize / 1.5,
248
+ "font-size": e.value.style.dataLabel.fontSize,
249
+ fill: e.value.style.dataLabel.useColorTrend ? i.value : e.value.style.dataLabel.color,
250
+ "font-weight": e.value.style.dataLabel.bold ? "bold" : "normal"
251
+ }, E(h(ue)(
252
+ e.value.style.dataLabel.formatter,
253
+ a.value.at(-1).value,
254
+ h(O)({
255
+ p: e.value.style.dataLabel.prefix,
256
+ v: a.value.at(-1).value,
257
+ s: e.value.style.dataLabel.suffix,
258
+ r: e.value.style.dataLabel.rounding
259
+ }),
260
+ { datapoint: a.value.at(-1) }
261
+ )), 9, Le)) : d("", !0)
262
+ ], 8, he)) : (o(), L(re, {
263
+ key: 0,
264
+ config: {
265
+ type: "sparkline",
266
+ style: {
267
+ backgroundColor: e.value.style.backgroundColor,
268
+ sparkline: {
269
+ color: "#CCCCCC"
270
+ }
271
+ }
272
+ }
273
+ }, null, 8, ["config"])),
274
+ t.$slots.source ? (o(), u("div", $e, [
275
+ Q(t.$slots, "source", {}, void 0, !0)
276
+ ], 512)) : d("", !0)
277
+ ], 12, ve));
278
+ }
279
+ }, Ae = /* @__PURE__ */ de(Ne, [["__scopeId", "data-v-30936343"]]);
280
+ export {
281
+ Ae as default
282
+ };
@@ -1,8 +1,8 @@
1
1
  import { computed as g, ref as x, watch as z, onMounted as q, nextTick as H, openBlock as n, createElementBlock as v, normalizeStyle as f, unref as s, renderSlot as b, normalizeProps as L, mergeProps as X, createCommentVNode as c, createElementVNode as d, toDisplayString as p, Fragment as O, renderList as R, guardReactiveProps as J, createVNode as K, createBlock as Q } from "vue";
2
- import { u as Y, c as Z, t as ee, a as te, p as k, b as le, o as ae, e as T, g as oe, d as se, s as $, i as w, f as _, X as ue, w as ne } from "./index-DK5d18KK.js";
3
- import { u as V } from "./useNestedProp-ClXcrtps.js";
4
- import ie from "./vue-ui-skeleton-BRE3meIp.js";
5
- import { _ as re } from "./PackageVersion-DH0d8pMI.js";
2
+ import { u as Y, c as Z, t as ee, a as te, p as k, b as le, o as ae, e as T, g as oe, d as se, s as $, i as w, f as _, X as ue, w as ne } from "./index-CFa1LJja.js";
3
+ import { u as V } from "./useNestedProp-DtAqKb0W.js";
4
+ import ie from "./vue-ui-skeleton-CHLsECtI.js";
5
+ import { _ as re } from "./PackageVersion-Bi8RUX5W.js";
6
6
  const ve = ["onClick"], ce = { key: 1 }, de = ["xmlns", "viewBox"], fe = ["id"], pe = ["stop-color"], ye = ["stop-color"], me = ["height", "width", "fill", "rx"], ge = ["height", "width", "fill", "rx"], he = ["height", "width", "fill", "rx"], xe = {
7
7
  key: 2,
8
8
  ref: "source",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-MkqCn_ca.cjs"),C=require("./useNestedProp-B0n5mAli.cjs"),V=require("./vue-ui-skeleton-DtwM9cxs.cjs"),D=require("./PackageVersion-BQj9e8Pe.cjs"),$=["onClick"],z={key:1},L=["xmlns","viewBox"],P=["id"],A=["stop-color"],F=["stop-color"],O=["height","width","fill","rx"],I=["height","width","fill","rx"],T=["height","width","fill","rx"],q={key:2,ref:"source",dir:"auto"},M={__name:"vue-ui-sparkbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},backgroundOpacity:{type:Number,default:null}},emits:["selectDatapoint"],setup(p,{emit:b}){const n=p,{vue_ui_sparkbar:w}=o.useConfig(),v=e.computed(()=>!!n.dataset&&n.dataset.length),y=e.ref(o.createUid()),t=e.computed({get:()=>f(),set:l=>l});function f(){const l=C.useNestedProp({userConfig:n.config,defaultConfig:w});return l.theme?{...C.useNestedProp({userConfig:o.themes.vue_ui_sparkbar[l.theme]||n.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}e.watch(()=>n.config,l=>{t.value=f()},{deep:!0});const S=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),c=e.ref(n.dataset.map(l=>({...l,value:t.value.style.animation.show?0:l.value||0,formatter:l.formatter||null}))),g=e.ref(null);e.onMounted(async()=>{o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiSparkbar",type:"dataset"}),h()});function h(){if(t.value.style.animation.show){let x=function(){i+=a/l,i<a?(c.value=c.value.map((u,m)=>({...u,value:u.value+=r[m]})),g.value=requestAnimationFrame(x)):c.value=n.dataset.map(u=>({...u,value:u.value||0,formatter:u.formatter||null}))};const l=t.value.style.animation.animationFrames,r=n.dataset.map((u,m)=>u.value/l),a=n.dataset.map(u=>u.value||0).reduce((u,m)=>u+m,0);let i=0;x()}}e.watch(()=>n.dataset,async l=>{cancelAnimationFrame(g.value),c.value=n.dataset.map(r=>({...r,value:t.value.style.animation.show?0:r.value||0,formatter:r.formatter||null})),e.nextTick(h)},{deep:!0});const s=e.ref({width:500,height:16}),N=e.computed(()=>Math.max(...n.dataset.map(l=>l.value))),_=e.computed(()=>(n.dataset.forEach((l,r)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkbar",type:"datasetSerieAttribute",property:a,index:r})})}),c.value.map((l,r)=>({...l,value:l.value||0,color:o.convertColorToHex(l.color)||S.value[r]||o.palette[r]||o.palette[r%o.palette.length]}))));function B(l){return l/N.value}function k(l){return t.value.style.layout.independant?l.target?l.value/l.target:t.value.style.layout.percentage?l.value>100?1:l.value/100:t.value.style.layout.target===0?1:l.value/t.value.style.layout.target:B(l.value)}function d(l){return t.value.style.layout.independant&&l.target||t.value.style.layout.target}function E(l,r){b("selectDatapoint",{datapoint:l,index:r})}return(l,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:"100%",fontFamily:t.value.style.fontFamily,background:n.backgroundOpacity!==null?e.unref(o.setOpacity)(t.value.style.backgroundColor,n.backgroundOpacity):t.value.style.backgroundColor})},[l.$slots.title?e.renderSlot(l.$slots,"title",e.normalizeProps(e.mergeProps({key:0},{title:{...l.title,title:t.value.style.title.text,subtitle:t.value.style.title.subtitle.text}}))):e.createCommentVNode("",!0),!l.$slots.title&&t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:"vue-ui-sparkbar-title-container",style:e.normalizeStyle({background:t.value.style.title.backgroundColor,margin:t.value.style.title.margin,textAlign:t.value.style.title.textAlign})},[e.createElementVNode("div",{class:"vue-ui-sparkbar-title",style:e.normalizeStyle({fontSize:t.value.style.title.fontSize+"px",color:t.value.style.title.color,fontWeight:t.value.style.title.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-sparkbar-subtitle",style:e.normalizeStyle({fontSize:t.value.style.title.subtitle.fontSize+"px",color:t.value.style.title.subtitle.color,fontWeight:t.value.style.title.subtitle.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`display:flex !important;${["left","right"].includes(t.value.style.labels.name.position)?`flex-direction: ${t.value.style.labels.name.position==="right"?"row-reverse":"row"} !important`:"flex-direction:column !important"};gap:${t.value.style.gap}px !important;align-items:center;${p.dataset.length>0&&i!==p.dataset.length-1?"margin-bottom:6px":""}`),onClick:()=>E(a,i)},[e.renderSlot(l.$slots,"data-label",e.normalizeProps(e.guardReactiveProps({bar:{...a,target:d(a),valueLabel:e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i}),targetLabel:e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})}}))),l.$slots["data-label"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({width:t.value.style.labels.name.width,color:t.value.style.labels.name.color,fontSize:t.value.style.labels.fontSize+"px",fontWeight:t.value.style.labels.name.bold?"bold":"normal",textAlign:["left","right"].includes(t.value.style.labels.name.position)||["top","top-left"].includes(t.value.style.labels.name.position)?"left":t.value.style.labels.name.position==="top-center"?"center":"right"})},[e.createElementVNode("span",null,e.toDisplayString(a.name),1),t.value.style.labels.value.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.labels.value.bold?"bold":"normal"}`)},": "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})),5)):e.createCommentVNode("",!0),t.value.style.layout.showTargetValue?(e.openBlock(),e.createElementBlock("span",z,e.toDisplayString(" "+t.value.style.layout.targetValueText)+" "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})),1)):e.createCommentVNode("",!0)],4)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${s.value.width} ${s.value.height}`,width:"100%"},[e.createVNode(D._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkbar_gradient_${i}_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(a.color,.03),100-t.value.style.bar.gradient.intensity)},null,8,A),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,F)],8,P)]),e.createElementVNode("rect",{height:s.value.height,width:s.value.width,x:0,y:0,fill:e.unref(o.setOpacity)(t.value.style.gutter.backgroundColor,t.value.style.gutter.opacity),rx:s.value.height/2},null,8,O),e.createElementVNode("rect",{height:s.value.height,width:s.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.underlayerColor,rx:s.value.height/2},null,8,I),e.createElementVNode("rect",{height:s.value.height,width:s.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.show?`url(#sparkbar_gradient_${i}_${y.value})`:a.color,rx:s.value.height/2},null,8,T)],8,L))],12,$)):e.createCommentVNode("",!0)],64))),256)),l.$slots.source?(e.openBlock(),e.createElementBlock("div",q,[e.renderSlot(l.$slots,"source")],512)):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(V.default,{key:3,config:{type:"sparkbar",style:{backgroundColor:t.value.style.backgroundColor,sparkbar:{color:"#CCCCCC"}}}},null,8,["config"]))],4))}};exports.default=M;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-KDxAXZXP.cjs"),C=require("./useNestedProp-CXjSKjKD.cjs"),V=require("./vue-ui-skeleton-CdeslaC3.cjs"),D=require("./PackageVersion-BzA9shEH.cjs"),$=["onClick"],z={key:1},L=["xmlns","viewBox"],P=["id"],A=["stop-color"],F=["stop-color"],O=["height","width","fill","rx"],I=["height","width","fill","rx"],T=["height","width","fill","rx"],q={key:2,ref:"source",dir:"auto"},M={__name:"vue-ui-sparkbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},backgroundOpacity:{type:Number,default:null}},emits:["selectDatapoint"],setup(p,{emit:b}){const n=p,{vue_ui_sparkbar:w}=o.useConfig(),v=e.computed(()=>!!n.dataset&&n.dataset.length),y=e.ref(o.createUid()),t=e.computed({get:()=>f(),set:l=>l});function f(){const l=C.useNestedProp({userConfig:n.config,defaultConfig:w});return l.theme?{...C.useNestedProp({userConfig:o.themes.vue_ui_sparkbar[l.theme]||n.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}e.watch(()=>n.config,l=>{t.value=f()},{deep:!0});const S=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),c=e.ref(n.dataset.map(l=>({...l,value:t.value.style.animation.show?0:l.value||0,formatter:l.formatter||null}))),g=e.ref(null);e.onMounted(async()=>{o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiSparkbar",type:"dataset"}),h()});function h(){if(t.value.style.animation.show){let x=function(){i+=a/l,i<a?(c.value=c.value.map((u,m)=>({...u,value:u.value+=r[m]})),g.value=requestAnimationFrame(x)):c.value=n.dataset.map(u=>({...u,value:u.value||0,formatter:u.formatter||null}))};const l=t.value.style.animation.animationFrames,r=n.dataset.map((u,m)=>u.value/l),a=n.dataset.map(u=>u.value||0).reduce((u,m)=>u+m,0);let i=0;x()}}e.watch(()=>n.dataset,async l=>{cancelAnimationFrame(g.value),c.value=n.dataset.map(r=>({...r,value:t.value.style.animation.show?0:r.value||0,formatter:r.formatter||null})),e.nextTick(h)},{deep:!0});const s=e.ref({width:500,height:16}),N=e.computed(()=>Math.max(...n.dataset.map(l=>l.value))),_=e.computed(()=>(n.dataset.forEach((l,r)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkbar",type:"datasetSerieAttribute",property:a,index:r})})}),c.value.map((l,r)=>({...l,value:l.value||0,color:o.convertColorToHex(l.color)||S.value[r]||o.palette[r]||o.palette[r%o.palette.length]}))));function B(l){return l/N.value}function k(l){return t.value.style.layout.independant?l.target?l.value/l.target:t.value.style.layout.percentage?l.value>100?1:l.value/100:t.value.style.layout.target===0?1:l.value/t.value.style.layout.target:B(l.value)}function d(l){return t.value.style.layout.independant&&l.target||t.value.style.layout.target}function E(l,r){b("selectDatapoint",{datapoint:l,index:r})}return(l,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:"100%",fontFamily:t.value.style.fontFamily,background:n.backgroundOpacity!==null?e.unref(o.setOpacity)(t.value.style.backgroundColor,n.backgroundOpacity):t.value.style.backgroundColor})},[l.$slots.title?e.renderSlot(l.$slots,"title",e.normalizeProps(e.mergeProps({key:0},{title:{...l.title,title:t.value.style.title.text,subtitle:t.value.style.title.subtitle.text}}))):e.createCommentVNode("",!0),!l.$slots.title&&t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:"vue-ui-sparkbar-title-container",style:e.normalizeStyle({background:t.value.style.title.backgroundColor,margin:t.value.style.title.margin,textAlign:t.value.style.title.textAlign})},[e.createElementVNode("div",{class:"vue-ui-sparkbar-title",style:e.normalizeStyle({fontSize:t.value.style.title.fontSize+"px",color:t.value.style.title.color,fontWeight:t.value.style.title.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-sparkbar-subtitle",style:e.normalizeStyle({fontSize:t.value.style.title.subtitle.fontSize+"px",color:t.value.style.title.subtitle.color,fontWeight:t.value.style.title.subtitle.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`display:flex !important;${["left","right"].includes(t.value.style.labels.name.position)?`flex-direction: ${t.value.style.labels.name.position==="right"?"row-reverse":"row"} !important`:"flex-direction:column !important"};gap:${t.value.style.gap}px !important;align-items:center;${p.dataset.length>0&&i!==p.dataset.length-1?"margin-bottom:6px":""}`),onClick:()=>E(a,i)},[e.renderSlot(l.$slots,"data-label",e.normalizeProps(e.guardReactiveProps({bar:{...a,target:d(a),valueLabel:e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i}),targetLabel:e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})}}))),l.$slots["data-label"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({width:t.value.style.labels.name.width,color:t.value.style.labels.name.color,fontSize:t.value.style.labels.fontSize+"px",fontWeight:t.value.style.labels.name.bold?"bold":"normal",textAlign:["left","right"].includes(t.value.style.labels.name.position)||["top","top-left"].includes(t.value.style.labels.name.position)?"left":t.value.style.labels.name.position==="top-center"?"center":"right"})},[e.createElementVNode("span",null,e.toDisplayString(a.name),1),t.value.style.labels.value.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.labels.value.bold?"bold":"normal"}`)},": "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})),5)):e.createCommentVNode("",!0),t.value.style.layout.showTargetValue?(e.openBlock(),e.createElementBlock("span",z,e.toDisplayString(" "+t.value.style.layout.targetValueText)+" "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})),1)):e.createCommentVNode("",!0)],4)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${s.value.width} ${s.value.height}`,width:"100%"},[e.createVNode(D._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkbar_gradient_${i}_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(a.color,.03),100-t.value.style.bar.gradient.intensity)},null,8,A),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,F)],8,P)]),e.createElementVNode("rect",{height:s.value.height,width:s.value.width,x:0,y:0,fill:e.unref(o.setOpacity)(t.value.style.gutter.backgroundColor,t.value.style.gutter.opacity),rx:s.value.height/2},null,8,O),e.createElementVNode("rect",{height:s.value.height,width:s.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.underlayerColor,rx:s.value.height/2},null,8,I),e.createElementVNode("rect",{height:s.value.height,width:s.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.show?`url(#sparkbar_gradient_${i}_${y.value})`:a.color,rx:s.value.height/2},null,8,T)],8,L))],12,$)):e.createCommentVNode("",!0)],64))),256)),l.$slots.source?(e.openBlock(),e.createElementBlock("div",q,[e.renderSlot(l.$slots,"source")],512)):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(V.default,{key:3,config:{type:"sparkbar",style:{backgroundColor:t.value.style.backgroundColor,sparkbar:{color:"#CCCCCC"}}}},null,8,["config"]))],4))}};exports.default=M;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-MkqCn_ca.cjs"),b=require("./useNestedProp-B0n5mAli.cjs"),$=require("./vue-ui-skeleton-DtwM9cxs.cjs"),w=require("./PackageVersion-BQj9e8Pe.cjs"),S=["xmlns","viewBox"],L=["id"],B=["stop-color"],E=["stop-color"],M=["d","stroke","stroke-linecap"],z=["d","stroke","stroke-linecap","stroke-dashoffset"],V=["x","y","font-size","fill","font-weight"],A={key:4,ref:"source",dir:"auto"},q={__name:"vue-ui-sparkgauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(C){const o=C,{vue_ui_sparkgauge:_}=s.useConfig(),c=e.computed(()=>!!o.dataset&&Object.keys(o.dataset).length);e.onMounted(()=>{d()});function d(){s.objectIsEmpty(o.dataset)?s.error({componentName:"VueUiSparkgauge",type:"dataset"}):s.getMissingDatasetAttributes({datasetObject:o.dataset,requiredAttributes:["value","min","max"]}).forEach(a=>{s.error({componentName:"VueUiSparkgauge",type:"datasetAttribute",property:a})})}const v=e.ref(s.createUid()),t=e.computed({get:()=>m(),set:a=>a});function m(){const a=b.useNestedProp({userConfig:o.config,defaultConfig:_});return a.theme?{...b.useNestedProp({userConfig:s.themes.vue_ui_sparkgauge[a.theme]||o.config,defaultConfig:a})}:a}e.watch(()=>o.config,a=>{t.value=m(),d()},{deep:!0});const u=e.computed(()=>({height:t.value.style.height,width:128,base:t.value.style.basePosition})),n=e.computed(()=>{const a=o.dataset.min??0,r=o.dataset.max??0,N=r-a;return{min:a,max:r,diff:N}}),l=e.ref(t.value.style.animation.show?n.value.min:o.dataset.value);e.watch(()=>o.dataset.value,()=>{y(o.dataset.value||0)});const f=e.computed(()=>l.value>n.value.max?n.value.max:l.value<n.value.min?n.value.min:l.value),p=e.computed(()=>n.value.diff/t.value.style.animation.speedMs);e.onMounted(()=>{y(o.dataset.value||0)});function y(a){function r(){l.value<a?l.value=Math.min(l.value+p.value,a):l.value>a&&(l.value=Math.max(l.value-p.value,a)),l.value!==a&&requestAnimationFrame(r)}r()}const i=e.computed(()=>o.dataset.title??""),g=e.computed(()=>l.value>=0?(f.value-n.value.min)/n.value.diff:(Math.abs(n.value.min)-Math.abs(f.value))/n.value.diff),k=e.computed(()=>s.interpolateColorHex(t.value.style.colors.min,t.value.style.colors.max,n.value.min,n.value.max,l.value)),h=e.computed(()=>t.value.style.dataLabel.autoColor?k.value:t.value.style.dataLabel.color),x=e.computed(()=>t.value.style.track.autoColor?k.value:t.value.style.track.color);return(a,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width: 100%; background:${t.value.style.background}`)},[t.value.style.title.show&&i.value&&t.value.style.title.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(i.value),5)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:"overflow: visible; background:transparent; width:100%;"},[e.createVNode(w._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`gradient_${v.value}`,x1:"-10%",y1:"100%",x2:"110%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.colors.min},null,8,B),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.max},null,8,E)],8,L)]),e.createElementVNode("path",{d:`M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,stroke:t.value.style.gutter.color,"stroke-width":8,"stroke-linecap":t.value.style.gutter.strokeLinecap,fill:"none"},null,8,M),g.value!==0?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,stroke:t.value.style.colors.showGradient?`url(#gradient_${v.value})`:x.value,"stroke-width":8,"stroke-linecap":t.value.style.track.strokeLinecap,fill:"none","stroke-dasharray":169.5,"stroke-dashoffset":169.5-169.5*g.value,class:e.normalizeClass({"vue-ui-sparkgauge-track":t.value.style.animation.show}),style:e.normalizeStyle(t.value.style.animation.show?`animation: vue-ui-sparkgauge-animation ${t.value.style.animation.speedMs}ms ease-in;`:"")},null,14,z)):e.createCommentVNode("",!0),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.width/2,y:u.value.base+6+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,fill:h.value,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.dataLabel.formatter,e.unref(s.checkNaN)(l.value),e.unref(s.dataLabel)({p:t.value.style.dataLabel.prefix,v:e.unref(s.checkNaN)(l.value),s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:e.unref(s.checkNaN)(l.value),color:h.value})),9,V)],8,S)):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($.default,{key:2,config:{type:"gauge",style:{backgroundColor:t.value.style.background,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.title.show&&i.value&&t.value.style.title.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:3,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(i.value),5)):e.createCommentVNode("",!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",A,[e.renderSlot(a.$slots,"source")],512)):e.createCommentVNode("",!0)],4))}};exports.default=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-KDxAXZXP.cjs"),b=require("./useNestedProp-CXjSKjKD.cjs"),$=require("./vue-ui-skeleton-CdeslaC3.cjs"),w=require("./PackageVersion-BzA9shEH.cjs"),S=["xmlns","viewBox"],L=["id"],B=["stop-color"],E=["stop-color"],M=["d","stroke","stroke-linecap"],z=["d","stroke","stroke-linecap","stroke-dashoffset"],V=["x","y","font-size","fill","font-weight"],A={key:4,ref:"source",dir:"auto"},q={__name:"vue-ui-sparkgauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(C){const o=C,{vue_ui_sparkgauge:_}=s.useConfig(),c=e.computed(()=>!!o.dataset&&Object.keys(o.dataset).length);e.onMounted(()=>{d()});function d(){s.objectIsEmpty(o.dataset)?s.error({componentName:"VueUiSparkgauge",type:"dataset"}):s.getMissingDatasetAttributes({datasetObject:o.dataset,requiredAttributes:["value","min","max"]}).forEach(a=>{s.error({componentName:"VueUiSparkgauge",type:"datasetAttribute",property:a})})}const v=e.ref(s.createUid()),t=e.computed({get:()=>m(),set:a=>a});function m(){const a=b.useNestedProp({userConfig:o.config,defaultConfig:_});return a.theme?{...b.useNestedProp({userConfig:s.themes.vue_ui_sparkgauge[a.theme]||o.config,defaultConfig:a})}:a}e.watch(()=>o.config,a=>{t.value=m(),d()},{deep:!0});const u=e.computed(()=>({height:t.value.style.height,width:128,base:t.value.style.basePosition})),n=e.computed(()=>{const a=o.dataset.min??0,r=o.dataset.max??0,N=r-a;return{min:a,max:r,diff:N}}),l=e.ref(t.value.style.animation.show?n.value.min:o.dataset.value);e.watch(()=>o.dataset.value,()=>{y(o.dataset.value||0)});const f=e.computed(()=>l.value>n.value.max?n.value.max:l.value<n.value.min?n.value.min:l.value),p=e.computed(()=>n.value.diff/t.value.style.animation.speedMs);e.onMounted(()=>{y(o.dataset.value||0)});function y(a){function r(){l.value<a?l.value=Math.min(l.value+p.value,a):l.value>a&&(l.value=Math.max(l.value-p.value,a)),l.value!==a&&requestAnimationFrame(r)}r()}const i=e.computed(()=>o.dataset.title??""),g=e.computed(()=>l.value>=0?(f.value-n.value.min)/n.value.diff:(Math.abs(n.value.min)-Math.abs(f.value))/n.value.diff),k=e.computed(()=>s.interpolateColorHex(t.value.style.colors.min,t.value.style.colors.max,n.value.min,n.value.max,l.value)),h=e.computed(()=>t.value.style.dataLabel.autoColor?k.value:t.value.style.dataLabel.color),x=e.computed(()=>t.value.style.track.autoColor?k.value:t.value.style.track.color);return(a,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width: 100%; background:${t.value.style.background}`)},[t.value.style.title.show&&i.value&&t.value.style.title.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(i.value),5)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:"overflow: visible; background:transparent; width:100%;"},[e.createVNode(w._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`gradient_${v.value}`,x1:"-10%",y1:"100%",x2:"110%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.colors.min},null,8,B),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.max},null,8,E)],8,L)]),e.createElementVNode("path",{d:`M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,stroke:t.value.style.gutter.color,"stroke-width":8,"stroke-linecap":t.value.style.gutter.strokeLinecap,fill:"none"},null,8,M),g.value!==0?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,stroke:t.value.style.colors.showGradient?`url(#gradient_${v.value})`:x.value,"stroke-width":8,"stroke-linecap":t.value.style.track.strokeLinecap,fill:"none","stroke-dasharray":169.5,"stroke-dashoffset":169.5-169.5*g.value,class:e.normalizeClass({"vue-ui-sparkgauge-track":t.value.style.animation.show}),style:e.normalizeStyle(t.value.style.animation.show?`animation: vue-ui-sparkgauge-animation ${t.value.style.animation.speedMs}ms ease-in;`:"")},null,14,z)):e.createCommentVNode("",!0),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.width/2,y:u.value.base+6+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,fill:h.value,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.dataLabel.formatter,e.unref(s.checkNaN)(l.value),e.unref(s.dataLabel)({p:t.value.style.dataLabel.prefix,v:e.unref(s.checkNaN)(l.value),s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:e.unref(s.checkNaN)(l.value),color:h.value})),9,V)],8,S)):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($.default,{key:2,config:{type:"gauge",style:{backgroundColor:t.value.style.background,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.title.show&&i.value&&t.value.style.title.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:3,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(i.value),5)):e.createCommentVNode("",!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",A,[e.renderSlot(a.$slots,"source")],512)):e.createCommentVNode("",!0)],4))}};exports.default=q;
@@ -1,8 +1,8 @@
1
1
  import { computed as s, onMounted as N, ref as A, watch as M, openBlock as n, createElementBlock as i, normalizeStyle as m, toDisplayString as y, createCommentVNode as v, unref as c, createVNode as D, createElementVNode as d, normalizeClass as E, createBlock as G, renderSlot as I } from "vue";
2
- import { u as U, o as q, e as S, g as P, c as R, t as T, N as X, X as H, i as V, v as p, f as Y } from "./index-DK5d18KK.js";
3
- import { u as z } from "./useNestedProp-ClXcrtps.js";
4
- import J from "./vue-ui-skeleton-BRE3meIp.js";
5
- import { _ as K } from "./PackageVersion-DH0d8pMI.js";
2
+ import { u as U, o as q, e as S, g as P, c as R, t as T, N as X, X as H, i as V, v as p, f as Y } from "./index-CFa1LJja.js";
3
+ import { u as z } from "./useNestedProp-DtAqKb0W.js";
4
+ import J from "./vue-ui-skeleton-CHLsECtI.js";
5
+ import { _ as K } from "./PackageVersion-Bi8RUX5W.js";
6
6
  const Q = ["xmlns", "viewBox"], W = ["id"], Z = ["stop-color"], ee = ["stop-color"], te = ["d", "stroke", "stroke-linecap"], ae = ["d", "stroke", "stroke-linecap", "stroke-dashoffset"], le = ["x", "y", "font-size", "fill", "font-weight"], oe = {
7
7
  key: 4,
8
8
  ref: "source",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-MkqCn_ca.cjs"),_=require("./useNestedProp-B0n5mAli.cjs"),F=require("./Shape-DCM4mNbd.cjs"),M=require("./vue-ui-skeleton-DtwM9cxs.cjs"),O=require("./PackageVersion-BQj9e8Pe.cjs"),A=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),H={key:0},q={key:1},I=["xmlns","viewBox"],U=["id"],W=["stop-color"],P=["stop-color"],j=["id"],G=["stop-color"],T=["stop-color"],X=["id"],Y=["stop-color"],R=["stop-color"],J={key:0},K=["x","y","height","width","fill","stroke","stroke-width","rx"],Q={key:1},Z=["x","y","font-size","font-weight","fill"],ee=["x","y","font-size","fill"],te=["x","y","font-size","fill"],le=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],oe={key:2,ref:"source",dir:"auto"},ae={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(x,{emit:B}){const i=x;e.useCssVars(o=>({"3d57fabd":S.value}));const{vue_ui_sparkhistogram:E}=a.useConfig(),h=e.computed(()=>!!i.dataset&&i.dataset.length);e.onMounted(()=>{k()});function k(){a.objectIsEmpty(i.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):i.dataset.forEach((o,r)=>{a.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{a.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:r})})})}const v=e.ref(a.createUid()),t=e.computed({get:()=>b(),set:o=>o});function b(){const o=_.useNestedProp({userConfig:i.config,defaultConfig:E});return o.theme?{..._.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||i.config,defaultConfig:o})}:o}e.watch(()=>i.config,o=>{t.value=b(),k()},{deep:!0});const c=e.computed(()=>{const o=t.value.style.layout.height,r=t.value.style.layout.width,l=t.value.style.layout.padding.top,s=o-t.value.style.layout.padding.bottom,d=t.value.style.layout.padding.left,y=r-t.value.style.layout.padding.right,p=l+(o-l-t.value.style.layout.padding.bottom)/2,f=o-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,m=r-t.value.style.layout.padding.left-t.value.style.layout.padding.right;return{bottom:s,centerY:p,drawingHeight:f,drawingWidth:m,height:o,left:d,right:y,top:l,width:r}}),w=e.computed(()=>Math.max(...i.dataset.map(o=>Math.abs(o.value||0))));function C(o){return Math.abs(o)/w.value}const u=e.computed(()=>i.dataset.map((o,r)=>{const l=C(o.value||0),s=c.value.drawingHeight*l,d=c.value.drawingWidth/i.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,f=c.value.centerY-s/2,m=c.value.left+(y/2+r*d),L=c.value.left+r*d,g=typeof o.intensity>"u"?100:Math.round(o.intensity*100),N=o.color?o.color:o.value>=0?a.setOpacity(t.value.style.bars.colors.positive,g):a.setOpacity(t.value.style.bars.colors.negative,g),V=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,z=o.color?`url(#gradient_datapoint_${r}_${v.value})`:o.value>=0?`url(#gradient_positive_${r}_${v.value})`:`url(#gradient_negative_${r}_${v.value})`,D=m+p/2;return{...o,color:N,gradient:z,height:s,intensity:g,proportion:l,stroke:V,textAnchor:D,trapX:L,unitWidth:d,width:p,x:m,y:f}})),n=e.ref(null);function $(o,r){B("selectDatapoint",{datapoint:o,index:r})}const S=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:r[1]||(r[1]=l=>n.value=null)},[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.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),n.value!==null?(e.openBlock(),e.createElementBlock("span",H,"- "+e.toDisplayString(u.value[n.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,u.value[n.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:u.value[n.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:u.value[n.value],seriesIndex:n.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(n.value)&&![null,void 0].includes(u.value[n.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",q,"("+e.toDisplayString(u.value[n.value].valueLabel||0)+")",1)):e.createCommentVNode("",!0)],4),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),h.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${c.value.width} ${c.value.height}`,style:{overflow:"visible"}},[e.createVNode(O._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_positive_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.positive,.05),l.intensity)},null,8,W),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.positive,l.intensity)},null,8,P)],8,U))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_negative_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.negative,.05),l.intensity)},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.negative,l.intensity)},null,8,T)],8,j))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_datapoint_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(l.color,.05),l.intensity)},null,8,Y),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(l.color,l.intensity)},null,8,R)],8,X))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",J,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,height:l.height,width:l.width,fill:t.value.style.bars.colors.gradient.show?l.gradient:l.color,stroke:l.stroke,"stroke-width":t.value.style.bars.strokeWidth,rx:`${t.value.style.bars.borderRadius*l.proportion/12}%`,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,10,K))),256))])):(e.openBlock(),e.createElementBlock("g",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createBlock(F._sfc_main,{plot:{x:l.x+l.width/2,y:l.y+l.height/2},color:t.value.style.bars.colors.gradient.show?l.gradient:l.color,shape:t.value.style.bars.shape,radius:l.height*.4,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,8,["plot","color","shape","radius","class"]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle",x:l.textAnchor,y:l.y-t.value.style.labels.value.fontSize/3+t.value.style.labels.value.offsetY,"font-size":t.value.style.labels.value.fontSize,"font-weight":t.value.style.labels.value.bold?"bold":"normal",fill:t.value.style.labels.value.color},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,l.value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:l.value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:u.value[n.value],seriesIndex:n.value})),9,Z))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.valueLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:l.y+l.height+t.value.style.labels.valueLabel.fontSize,"font-size":t.value.style.labels.valueLabel.fontSize,"text-anchor":"middle",fill:t.value.style.labels.valueLabel.color},e.toDisplayString(l.valueLabel),9,ee)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.timeLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:c.value.height-t.value.style.labels.timeLabel.fontSize/2,"font-size":t.value.style.labels.timeLabel.fontSize,fill:t.value.style.labels.timeLabel.color,"text-anchor":"middle"},e.toDisplayString(l.timeLabel),9,te)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{height:c.value.height,width:l.unitWidth,fill:"transparent",x:l.trapX,y:0,onMouseover:d=>n.value=s,onMouseleave:r[0]||(r[0]=d=>n.value=null),stroke:n.value!==null&&n.value===s?t.value.style.selector.stroke:"","stroke-width":n.value!==null&&n.value===s?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>$(l,s)},null,40,le)]))),256))],8,I)):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",oe,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M.default,{key:3,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},se=A._export_sfc(ae,[["__scopeId","data-v-4e962555"]]);exports.default=se;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-KDxAXZXP.cjs"),_=require("./useNestedProp-CXjSKjKD.cjs"),F=require("./Shape-CmAme9xi.cjs"),M=require("./vue-ui-skeleton-CdeslaC3.cjs"),O=require("./PackageVersion-BzA9shEH.cjs"),A=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),H={key:0},q={key:1},I=["xmlns","viewBox"],U=["id"],W=["stop-color"],P=["stop-color"],j=["id"],G=["stop-color"],T=["stop-color"],X=["id"],Y=["stop-color"],R=["stop-color"],J={key:0},K=["x","y","height","width","fill","stroke","stroke-width","rx"],Q={key:1},Z=["x","y","font-size","font-weight","fill"],ee=["x","y","font-size","fill"],te=["x","y","font-size","fill"],le=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],oe={key:2,ref:"source",dir:"auto"},ae={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(x,{emit:B}){const i=x;e.useCssVars(o=>({"3d57fabd":S.value}));const{vue_ui_sparkhistogram:E}=a.useConfig(),h=e.computed(()=>!!i.dataset&&i.dataset.length);e.onMounted(()=>{k()});function k(){a.objectIsEmpty(i.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):i.dataset.forEach((o,r)=>{a.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{a.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:r})})})}const v=e.ref(a.createUid()),t=e.computed({get:()=>b(),set:o=>o});function b(){const o=_.useNestedProp({userConfig:i.config,defaultConfig:E});return o.theme?{..._.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||i.config,defaultConfig:o})}:o}e.watch(()=>i.config,o=>{t.value=b(),k()},{deep:!0});const c=e.computed(()=>{const o=t.value.style.layout.height,r=t.value.style.layout.width,l=t.value.style.layout.padding.top,s=o-t.value.style.layout.padding.bottom,d=t.value.style.layout.padding.left,y=r-t.value.style.layout.padding.right,p=l+(o-l-t.value.style.layout.padding.bottom)/2,f=o-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,m=r-t.value.style.layout.padding.left-t.value.style.layout.padding.right;return{bottom:s,centerY:p,drawingHeight:f,drawingWidth:m,height:o,left:d,right:y,top:l,width:r}}),w=e.computed(()=>Math.max(...i.dataset.map(o=>Math.abs(o.value||0))));function C(o){return Math.abs(o)/w.value}const u=e.computed(()=>i.dataset.map((o,r)=>{const l=C(o.value||0),s=c.value.drawingHeight*l,d=c.value.drawingWidth/i.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,f=c.value.centerY-s/2,m=c.value.left+(y/2+r*d),L=c.value.left+r*d,g=typeof o.intensity>"u"?100:Math.round(o.intensity*100),N=o.color?o.color:o.value>=0?a.setOpacity(t.value.style.bars.colors.positive,g):a.setOpacity(t.value.style.bars.colors.negative,g),V=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,z=o.color?`url(#gradient_datapoint_${r}_${v.value})`:o.value>=0?`url(#gradient_positive_${r}_${v.value})`:`url(#gradient_negative_${r}_${v.value})`,D=m+p/2;return{...o,color:N,gradient:z,height:s,intensity:g,proportion:l,stroke:V,textAnchor:D,trapX:L,unitWidth:d,width:p,x:m,y:f}})),n=e.ref(null);function $(o,r){B("selectDatapoint",{datapoint:o,index:r})}const S=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:r[1]||(r[1]=l=>n.value=null)},[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.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),n.value!==null?(e.openBlock(),e.createElementBlock("span",H,"- "+e.toDisplayString(u.value[n.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,u.value[n.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:u.value[n.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:u.value[n.value],seriesIndex:n.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(n.value)&&![null,void 0].includes(u.value[n.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",q,"("+e.toDisplayString(u.value[n.value].valueLabel||0)+")",1)):e.createCommentVNode("",!0)],4),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),h.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${c.value.width} ${c.value.height}`,style:{overflow:"visible"}},[e.createVNode(O._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_positive_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.positive,.05),l.intensity)},null,8,W),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.positive,l.intensity)},null,8,P)],8,U))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_negative_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.negative,.05),l.intensity)},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.negative,l.intensity)},null,8,T)],8,j))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_datapoint_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(l.color,.05),l.intensity)},null,8,Y),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(l.color,l.intensity)},null,8,R)],8,X))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",J,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,height:l.height,width:l.width,fill:t.value.style.bars.colors.gradient.show?l.gradient:l.color,stroke:l.stroke,"stroke-width":t.value.style.bars.strokeWidth,rx:`${t.value.style.bars.borderRadius*l.proportion/12}%`,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,10,K))),256))])):(e.openBlock(),e.createElementBlock("g",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createBlock(F._sfc_main,{plot:{x:l.x+l.width/2,y:l.y+l.height/2},color:t.value.style.bars.colors.gradient.show?l.gradient:l.color,shape:t.value.style.bars.shape,radius:l.height*.4,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,8,["plot","color","shape","radius","class"]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle",x:l.textAnchor,y:l.y-t.value.style.labels.value.fontSize/3+t.value.style.labels.value.offsetY,"font-size":t.value.style.labels.value.fontSize,"font-weight":t.value.style.labels.value.bold?"bold":"normal",fill:t.value.style.labels.value.color},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,l.value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:l.value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:u.value[n.value],seriesIndex:n.value})),9,Z))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.valueLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:l.y+l.height+t.value.style.labels.valueLabel.fontSize,"font-size":t.value.style.labels.valueLabel.fontSize,"text-anchor":"middle",fill:t.value.style.labels.valueLabel.color},e.toDisplayString(l.valueLabel),9,ee)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.timeLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:c.value.height-t.value.style.labels.timeLabel.fontSize/2,"font-size":t.value.style.labels.timeLabel.fontSize,fill:t.value.style.labels.timeLabel.color,"text-anchor":"middle"},e.toDisplayString(l.timeLabel),9,te)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{height:c.value.height,width:l.unitWidth,fill:"transparent",x:l.trapX,y:0,onMouseover:d=>n.value=s,onMouseleave:r[0]||(r[0]=d=>n.value=null),stroke:n.value!==null&&n.value===s?t.value.style.selector.stroke:"","stroke-width":n.value!==null&&n.value===s?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>$(l,s)},null,40,le)]))),256))],8,I)):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",oe,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M.default,{key:3,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},se=A._export_sfc(ae,[["__scopeId","data-v-4e962555"]]);exports.default=se;
@@ -1,9 +1,9 @@
1
1
  import { useCssVars as J, computed as _, onMounted as K, ref as N, watch as Q, openBlock as a, createElementBlock as s, normalizeStyle as $, createElementVNode as y, createTextVNode as Z, toDisplayString as g, unref as n, createCommentVNode as h, createVNode as ee, Fragment as f, renderList as p, normalizeClass as D, createBlock as I, renderSlot as te } from "vue";
2
- import { u as le, o as ae, e as V, g as se, c as oe, t as ue, s as m, i as H, f as E, X as re, w as z } from "./index-DK5d18KK.js";
3
- import { u as F } from "./useNestedProp-ClXcrtps.js";
4
- import { _ as ie } from "./Shape-D_HmNdly.js";
5
- import ne from "./vue-ui-skeleton-BRE3meIp.js";
6
- import { _ as ve } from "./PackageVersion-DH0d8pMI.js";
2
+ import { u as le, o as ae, e as V, g as se, c as oe, t as ue, s as m, i as H, f as E, X as re, w as z } from "./index-CFa1LJja.js";
3
+ import { u as F } from "./useNestedProp-DtAqKb0W.js";
4
+ import { _ as ie } from "./Shape-BvB4qzcw.js";
5
+ import ne from "./vue-ui-skeleton-CHLsECtI.js";
6
+ import { _ as ve } from "./PackageVersion-Bi8RUX5W.js";
7
7
  import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  const ce = { key: 0 }, ye = { key: 1 }, he = ["xmlns", "viewBox"], fe = ["id"], pe = ["stop-color"], ge = ["stop-color"], me = ["id"], be = ["stop-color"], _e = ["stop-color"], xe = ["id"], ke = ["stop-color"], we = ["stop-color"], $e = { key: 0 }, Ce = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], Le = { key: 1 }, ze = ["x", "y", "font-size", "font-weight", "fill"], Se = ["x", "y", "font-size", "fill"], Me = ["x", "y", "font-size", "fill"], Ae = ["height", "width", "x", "onMouseover", "stroke", "stroke-width", "rx", "stroke-dasharray", "onClick"], Ne = {
9
9
  key: 2,