vue-data-ui 2.3.27 → 2.3.29

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 (183) hide show
  1. package/README.md +17 -1
  2. package/dist/{Arrow-HROOtfWV.cjs → Arrow-B8z06v67.cjs} +1 -1
  3. package/dist/{Arrow-O38M_J_k.js → Arrow-Bh7WeO_g.js} +1 -1
  4. package/dist/{BaseIcon-D8FXGup9.js → BaseIcon-BG_bJS3R.js} +1 -1
  5. package/dist/{BaseIcon-CiO8gP9x.cjs → BaseIcon-DDCJA3rm.cjs} +1 -1
  6. package/dist/{DataTable-EqeVt-K-.js → DataTable-CsPidn0_.js} +23 -20
  7. package/dist/DataTable-Doh_4M84.cjs +1 -0
  8. package/dist/{Legend-C_lBCmBu.cjs → Legend-B20rRwGi.cjs} +1 -1
  9. package/dist/{Legend-8eVERYMn.js → Legend-CkQ_zypV.js} +1 -1
  10. package/dist/{Shape-DvcgW6uK.js → Shape-B4gGeBLI.js} +1 -1
  11. package/dist/{Shape-D8RdmYWq.cjs → Shape-B8O8_E6l.cjs} +1 -1
  12. package/dist/{Slicer-BvYL7yVK.cjs → Slicer-BXveU40S.cjs} +1 -1
  13. package/dist/{Slicer-CH_5wnFM.js → Slicer-DaEfxscP.js} +1 -1
  14. package/dist/{Title-B9iq63n1.cjs → Title-BU6E8Xld.cjs} +1 -1
  15. package/dist/{Title-C3Ez1ceq.js → Title-eBTH8iGJ.js} +1 -1
  16. package/dist/{Tooltip-7SRMoiu-.js → Tooltip-B11OahTD.js} +1 -1
  17. package/dist/{Tooltip-DcDEanxk.cjs → Tooltip-Oicp_EIo.cjs} +1 -1
  18. package/dist/documentation/installation.md +1 -1
  19. package/dist/{index-DiWO-_ca.js → index-BlXzlBwZ.js} +447 -364
  20. package/dist/index-hKWfT7Wa.cjs +4 -0
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +66 -0
  23. package/dist/types/vue-data-ui.d.ts +66 -0
  24. package/dist/{useNestedProp-DNX5EefQ.js → useNestedProp-BoNl5H_z.js} +1 -1
  25. package/dist/{useNestedProp-BtqgWTf9.cjs → useNestedProp-Cggpoz7e.cjs} +1 -1
  26. package/dist/{usePrinter-BD40aUzH.js → usePrinter-CZ8F5Cth.js} +1 -1
  27. package/dist/{usePrinter-Q1J--baX.cjs → usePrinter-DoYKBzst.cjs} +1 -1
  28. package/dist/{vue-data-ui-GHpxkf8a.js → vue-data-ui-BOqzG_nZ.js} +57 -57
  29. package/dist/{vue-data-ui-yd5q4Ura.cjs → vue-data-ui-CGgiWEo3.cjs} +1 -1
  30. package/dist/vue-data-ui.cjs +1 -1
  31. package/dist/vue-data-ui.js +6 -6
  32. package/dist/{vue-ui-3d-bar-CAmoj5dT.js → vue-ui-3d-bar-CjnVg4YI.js} +342 -294
  33. package/dist/vue-ui-3d-bar-CpntMt7p.cjs +19 -0
  34. package/dist/{vue-ui-accordion-ogVvFfQy.cjs → vue-ui-accordion-CTYvdLLH.cjs} +1 -1
  35. package/dist/{vue-ui-accordion-CiNdgRO9.js → vue-ui-accordion-wHRG3nXl.js} +3 -3
  36. package/dist/vue-ui-age-pyramid-DDiL1Zje.cjs +1 -0
  37. package/dist/{vue-ui-age-pyramid-BrTpbEha.js → vue-ui-age-pyramid-vmCwgRy9.js} +258 -219
  38. package/dist/{vue-ui-annotator-B9IqZ-Hy.js → vue-ui-annotator-9FGJdNLY.js} +1 -1
  39. package/dist/{vue-ui-annotator-QbetAXoj.cjs → vue-ui-annotator-DQ3wKf9n.cjs} +1 -1
  40. package/dist/{vue-ui-candlestick-BvRwlc3d.cjs → vue-ui-candlestick-6joQ9JKQ.cjs} +1 -1
  41. package/dist/{vue-ui-candlestick-XjjwFaDO.js → vue-ui-candlestick-DpMr2r0i.js} +9 -9
  42. package/dist/{vue-ui-carousel-table-DtxcnSEp.cjs → vue-ui-carousel-table-BV0EOLqU.cjs} +1 -1
  43. package/dist/{vue-ui-carousel-table-KYENY5gp.js → vue-ui-carousel-table-CgR4ADOz.js} +4 -4
  44. package/dist/{vue-ui-chestnut-DfIcguJd.js → vue-ui-chestnut-Ca2878kV.js} +439 -347
  45. package/dist/vue-ui-chestnut-CxoCcw_B.cjs +6 -0
  46. package/dist/{vue-ui-cursor-C4pJe90O.js → vue-ui-cursor-BW8C6oUc.js} +2 -2
  47. package/dist/{vue-ui-cursor-COS_MXr8.cjs → vue-ui-cursor-DxF_gXQf.cjs} +1 -1
  48. package/dist/{vue-ui-dashboard-DNOjWStr.cjs → vue-ui-dashboard-BGrVyITN.cjs} +1 -1
  49. package/dist/{vue-ui-dashboard-B_NUnxEF.js → vue-ui-dashboard-DN4nErBZ.js} +2 -2
  50. package/dist/{vue-ui-digits-uufqLbRt.js → vue-ui-digits-CmSFSs5S.js} +2 -2
  51. package/dist/{vue-ui-digits-Vx5prxaT.cjs → vue-ui-digits-CpSKBG2c.cjs} +1 -1
  52. package/dist/vue-ui-donut-BqfRwAIM.js +857 -0
  53. package/dist/vue-ui-donut-C29yXH3H.cjs +1 -0
  54. package/dist/vue-ui-donut-evolution-COFG73Xl.cjs +1 -0
  55. package/dist/vue-ui-donut-evolution-DIR7yBUC.js +839 -0
  56. package/dist/{vue-ui-dumbbell-z_Ck4W33.cjs → vue-ui-dumbbell-1NA60u3h.cjs} +2 -2
  57. package/dist/{vue-ui-dumbbell-KvrVLLw6.js → vue-ui-dumbbell-BASuPAvI.js} +202 -187
  58. package/dist/{vue-ui-flow-Dg4dkrcd.cjs → vue-ui-flow-DBK7d0DQ.cjs} +1 -1
  59. package/dist/{vue-ui-flow-BjMikE9b.js → vue-ui-flow-wq0aqc5r.js} +98 -93
  60. package/dist/vue-ui-galaxy-BgdVvk4N.cjs +1 -0
  61. package/dist/{vue-ui-galaxy-BdgveN18.js → vue-ui-galaxy-CFQ2hQAl.js} +180 -144
  62. package/dist/{vue-ui-gauge-D8pokfoA.cjs → vue-ui-gauge-C4_kEbgg.cjs} +1 -1
  63. package/dist/{vue-ui-gauge-D01FLnNz.js → vue-ui-gauge-CIN265dN.js} +158 -149
  64. package/dist/vue-ui-gizmo-BpT3iwC9.cjs +1 -0
  65. package/dist/{vue-ui-gizmo-Cp-EftjP.js → vue-ui-gizmo-DRXWEpqU.js} +63 -49
  66. package/dist/vue-ui-heatmap-CVD7FVfk.cjs +1 -0
  67. package/dist/vue-ui-heatmap-Dc0ft_Ga.js +644 -0
  68. package/dist/{vue-ui-kpi-D6rVKouk.js → vue-ui-kpi-DDL1TvBP.js} +19 -10
  69. package/dist/{vue-ui-kpi-PWurAGxE.cjs → vue-ui-kpi-WDZIt76s.cjs} +1 -1
  70. package/dist/{vue-ui-mini-loader-YV68i0nk.js → vue-ui-mini-loader-B2C5U55l.js} +2 -2
  71. package/dist/{vue-ui-mini-loader-BsypWozL.cjs → vue-ui-mini-loader-BcGSpUfg.cjs} +1 -1
  72. package/dist/{vue-ui-molecule-Bx3fXHnw.cjs → vue-ui-molecule-C5BmRi2R.cjs} +1 -1
  73. package/dist/{vue-ui-molecule-BWYCf3Km.js → vue-ui-molecule-CD3cPNOq.js} +9 -9
  74. package/dist/{vue-ui-mood-radar-DsZozq6x.js → vue-ui-mood-radar-D0KbeV5j.js} +213 -187
  75. package/dist/vue-ui-mood-radar-afS64zg-.cjs +1 -0
  76. package/dist/{vue-ui-nested-donuts-qaViBhR3.js → vue-ui-nested-donuts-BGoc1RFX.js} +295 -228
  77. package/dist/vue-ui-nested-donuts-D-TeyOtL.cjs +17 -0
  78. package/dist/{vue-ui-onion-0iFsjuLM.js → vue-ui-onion-B_khL0Kv.js} +230 -196
  79. package/dist/vue-ui-onion-CFdbWLu3.cjs +1 -0
  80. package/dist/{vue-ui-parallel-coordinate-plot-BkZOKTIS.cjs → vue-ui-parallel-coordinate-plot-BmXvVt8r.cjs} +2 -2
  81. package/dist/{vue-ui-parallel-coordinate-plot-DxDFs1Lb.js → vue-ui-parallel-coordinate-plot-CP4V0K8m.js} +87 -87
  82. package/dist/{vue-ui-quadrant-Tw7SKMbQ.js → vue-ui-quadrant-C1YbjeI7.js} +455 -397
  83. package/dist/vue-ui-quadrant-C6-A8Gx_.cjs +1 -0
  84. package/dist/vue-ui-quick-chart-ConXdEsU.cjs +15 -0
  85. package/dist/vue-ui-quick-chart-CtWhs_2c.js +1374 -0
  86. package/dist/{vue-ui-radar-D5FV2IDm.js → vue-ui-radar-B2vAPYa7.js} +237 -214
  87. package/dist/vue-ui-radar-DMJLLVWb.cjs +1 -0
  88. package/dist/{vue-ui-rating-DTWIh_CV.cjs → vue-ui-rating-DhZ0tltR.cjs} +1 -1
  89. package/dist/{vue-ui-rating-Dds9tjxd.js → vue-ui-rating-xGz4av68.js} +9 -9
  90. package/dist/{vue-ui-relation-circle-B2p8F7-L.js → vue-ui-relation-circle-BQK8wMQE.js} +5 -5
  91. package/dist/{vue-ui-relation-circle-Cu9lKkX3.cjs → vue-ui-relation-circle-hb4Q051h.cjs} +1 -1
  92. package/dist/vue-ui-rings-D1EW3d4M.cjs +2 -0
  93. package/dist/{vue-ui-rings-BKzCFSx-.js → vue-ui-rings-ZKjhNx5K.js} +191 -162
  94. package/dist/{vue-ui-scatter-CwV9l1P7.js → vue-ui-scatter-CHONk8k0.js} +437 -381
  95. package/dist/vue-ui-scatter-CMRe2b2K.cjs +1 -0
  96. package/dist/{vue-ui-screenshot-CnPWz57l.cjs → vue-ui-screenshot-DcKhT745.cjs} +1 -1
  97. package/dist/{vue-ui-screenshot-Bo6i-aRF.js → vue-ui-screenshot-DmGe5ptH.js} +6 -6
  98. package/dist/{vue-ui-skeleton-CeNL0kH-.js → vue-ui-skeleton-CJ2R5R6u.js} +37 -37
  99. package/dist/{vue-ui-skeleton-CcrGR_Vh.cjs → vue-ui-skeleton-j-IOiy5w.cjs} +1 -1
  100. package/dist/{vue-ui-smiley-BBcmwq4z.cjs → vue-ui-smiley-D5Jn6d5f.cjs} +1 -1
  101. package/dist/{vue-ui-smiley-BGMzw-SW.js → vue-ui-smiley-DXVcosKR.js} +2 -2
  102. package/dist/{vue-ui-spark-trend-DlvTlA9z.cjs → vue-ui-spark-trend-CWH3W7h3.cjs} +1 -1
  103. package/dist/{vue-ui-spark-trend-CSC9zmt7.js → vue-ui-spark-trend-Gg6TxR4m.js} +63 -58
  104. package/dist/vue-ui-sparkbar-BsoKTXr2.cjs +1 -0
  105. package/dist/vue-ui-sparkbar-DUx1qVzQ.js +280 -0
  106. package/dist/{vue-ui-sparkgauge-B5g5nxUh.cjs → vue-ui-sparkgauge-DPusPoRv.cjs} +1 -1
  107. package/dist/{vue-ui-sparkgauge-DJPt0cLe.js → vue-ui-sparkgauge-xrvp9g87.js} +60 -50
  108. package/dist/vue-ui-sparkhistogram---JRg2R1.cjs +1 -0
  109. package/dist/{vue-ui-sparkhistogram-DpvQcFls.js → vue-ui-sparkhistogram-DzYXMNj8.js} +99 -90
  110. package/dist/{vue-ui-sparkline-Bw3y-88R.cjs → vue-ui-sparkline-1Z6GnwoN.cjs} +1 -1
  111. package/dist/{vue-ui-sparkline-CDSg9rhl.js → vue-ui-sparkline-CGWePkVI.js} +114 -105
  112. package/dist/{vue-ui-sparkstackbar-Ckcir2dk.cjs → vue-ui-sparkstackbar-DCc68t8g.cjs} +1 -1
  113. package/dist/{vue-ui-sparkstackbar-DveNwcVx.js → vue-ui-sparkstackbar-DFgeRAbQ.js} +52 -47
  114. package/dist/{vue-ui-stackbar-CZUsUeZ_.js → vue-ui-stackbar-B0dWToaf.js} +211 -196
  115. package/dist/vue-ui-stackbar-Cz0mT8Mo.cjs +15 -0
  116. package/dist/{vue-ui-strip-plot-lVVqtsNc.js → vue-ui-strip-plot-BFqd-S7c.js} +213 -198
  117. package/dist/vue-ui-strip-plot-DZt1Wq20.cjs +1 -0
  118. package/dist/{vue-ui-table-qtBWpg0m.cjs → vue-ui-table-CMvyMuc4.cjs} +1 -1
  119. package/dist/{vue-ui-table-8hNkBy1z.js → vue-ui-table-DtwEoIzI.js} +9 -9
  120. package/dist/{vue-ui-table-heatmap-HgHQKSax.cjs → vue-ui-table-heatmap-3RSMOHkc.cjs} +1 -1
  121. package/dist/{vue-ui-table-heatmap-BAPA4nvf.js → vue-ui-table-heatmap-C8b3pE04.js} +12 -12
  122. package/dist/vue-ui-table-sparkline-BKOaVFtt.cjs +1 -0
  123. package/dist/vue-ui-table-sparkline-BrqhBv29.js +467 -0
  124. package/dist/vue-ui-thermometer-CKgIqM5y.cjs +1 -0
  125. package/dist/{vue-ui-thermometer-CcH1qmLq.js → vue-ui-thermometer-DMkLvJgE.js} +118 -108
  126. package/dist/{vue-ui-timer-C52mSn4m.cjs → vue-ui-timer-D7fvoR77.cjs} +1 -1
  127. package/dist/{vue-ui-timer-DJfYr02u.js → vue-ui-timer-RA9yfgBk.js} +8 -8
  128. package/dist/{vue-ui-tiremarks-CcLcd5oA.js → vue-ui-tiremarks-B_EncUi6.js} +79 -71
  129. package/dist/{vue-ui-tiremarks-dNuNMt_R.cjs → vue-ui-tiremarks-C7y6Mbxe.cjs} +1 -1
  130. package/dist/{vue-ui-treemap-BOz94BVK.js → vue-ui-treemap-BuGZgQsr.js} +274 -236
  131. package/dist/vue-ui-treemap-CfngjVUS.cjs +1 -0
  132. package/dist/vue-ui-vertical-bar-DKbq4bX4.cjs +4 -0
  133. package/dist/vue-ui-vertical-bar-T4bFd3JF.js +792 -0
  134. package/dist/vue-ui-waffle-BJFbhWnA.cjs +1 -0
  135. package/dist/vue-ui-waffle-CrxmrYsV.js +735 -0
  136. package/dist/{vue-ui-wheel-BVjbh4oM.cjs → vue-ui-wheel-BDRvKR1Z.cjs} +1 -1
  137. package/dist/{vue-ui-wheel-DMRiVkhu.js → vue-ui-wheel-DOyC7NgR.js} +73 -65
  138. package/dist/vue-ui-word-cloud-DBxVNlJ3.js +495 -0
  139. package/dist/vue-ui-word-cloud-Dmcelg3z.cjs +1 -0
  140. package/dist/{vue-ui-xy-CsFr8tix.js → vue-ui-xy-BIbvJSh2.js} +367 -288
  141. package/dist/vue-ui-xy-CVKaR90p.cjs +3 -0
  142. package/dist/vue-ui-xy-canvas-2AaNivzI.cjs +9 -0
  143. package/dist/{vue-ui-xy-canvas-Bb2Z3E-7.js → vue-ui-xy-canvas-CXVni3kC.js} +284 -259
  144. package/package.json +1 -1
  145. package/dist/DataTable-C6HTLT7L.cjs +0 -1
  146. package/dist/index-BQOxn6SH.cjs +0 -4
  147. package/dist/vue-ui-3d-bar-DkJ4c3HQ.cjs +0 -19
  148. package/dist/vue-ui-age-pyramid-CkKVbbl8.cjs +0 -1
  149. package/dist/vue-ui-chestnut-C7gFvKLJ.cjs +0 -6
  150. package/dist/vue-ui-donut-C33U3e8H.js +0 -751
  151. package/dist/vue-ui-donut-CeHnjIGu.cjs +0 -1
  152. package/dist/vue-ui-donut-evolution-IzfAVo5I.js +0 -805
  153. package/dist/vue-ui-donut-evolution-hHfvz1Yd.cjs +0 -1
  154. package/dist/vue-ui-galaxy-B8EoId23.cjs +0 -1
  155. package/dist/vue-ui-gizmo-8lKc8m8b.cjs +0 -1
  156. package/dist/vue-ui-heatmap-BEsvmj5R.js +0 -606
  157. package/dist/vue-ui-heatmap-DvpvKq3Q.cjs +0 -1
  158. package/dist/vue-ui-mood-radar-C6devC4e.cjs +0 -1
  159. package/dist/vue-ui-nested-donuts-BtT3VsSf.cjs +0 -16
  160. package/dist/vue-ui-onion-9ATTDUpw.cjs +0 -1
  161. package/dist/vue-ui-quadrant-DD4H_Dhk.cjs +0 -1
  162. package/dist/vue-ui-quick-chart-CpFHKtpm.js +0 -1318
  163. package/dist/vue-ui-quick-chart-D1udOl47.cjs +0 -13
  164. package/dist/vue-ui-radar-CZmJDj3q.cjs +0 -1
  165. package/dist/vue-ui-rings-DN7XmhKZ.cjs +0 -1
  166. package/dist/vue-ui-scatter-DJlC5mz4.cjs +0 -1
  167. package/dist/vue-ui-sparkbar-0CNZluKs.js +0 -257
  168. package/dist/vue-ui-sparkbar-Di-BPkJ0.cjs +0 -1
  169. package/dist/vue-ui-sparkhistogram-BhkYmR4U.cjs +0 -1
  170. package/dist/vue-ui-stackbar-jNWFgXiA.cjs +0 -15
  171. package/dist/vue-ui-strip-plot-CzHFNhr3.cjs +0 -1
  172. package/dist/vue-ui-table-sparkline-DZY_23mg.js +0 -420
  173. package/dist/vue-ui-table-sparkline-Q8y6tloS.cjs +0 -1
  174. package/dist/vue-ui-thermometer-Cbu9jVvC.cjs +0 -1
  175. package/dist/vue-ui-treemap-orjA7Y0U.cjs +0 -1
  176. package/dist/vue-ui-vertical-bar-BHIt5cjc.cjs +0 -4
  177. package/dist/vue-ui-vertical-bar-BquCm_UG.js +0 -745
  178. package/dist/vue-ui-waffle-CNlp7RTS.js +0 -650
  179. package/dist/vue-ui-waffle-Dv8pXiYm.cjs +0 -1
  180. package/dist/vue-ui-word-cloud-CHRE8f_k.js +0 -352
  181. package/dist/vue-ui-word-cloud-CZum_IjT.cjs +0 -1
  182. package/dist/vue-ui-xy-BOoG4xg8.cjs +0 -3
  183. package/dist/vue-ui-xy-canvas-BHa3-phi.cjs +0 -9
@@ -0,0 +1,280 @@
1
+ import { computed as g, ref as x, onMounted as G, watch as W, nextTick as q, openBlock as r, createElementBlock as v, normalizeStyle as y, unref as s, renderSlot as I, normalizeProps as P, mergeProps as H, createCommentVNode as d, createElementVNode as c, toDisplayString as p, Fragment as z, renderList as X, guardReactiveProps as R, createBlock as J } from "vue";
2
+ import { u as K, c as Q, t as Y, a as Z, p as k, b as ee, o as te, e as L, g as le, d as ae, v as _, i as w, f as b, X as oe, s as se } from "./index-BlXzlBwZ.js";
3
+ import { u as T } from "./useNestedProp-BoNl5H_z.js";
4
+ import ue from "./vue-ui-skeleton-CJ2R5R6u.js";
5
+ const ie = ["onClick"], ne = { key: 1 }, re = ["xmlns", "viewBox"], ve = ["id"], ce = ["stop-color"], de = ["stop-color"], ye = ["height", "width", "fill", "rx"], pe = ["height", "width", "fill", "rx"], fe = ["height", "width", "fill", "rx"], ke = {
6
+ __name: "vue-ui-sparkbar",
7
+ props: {
8
+ config: {
9
+ type: Object,
10
+ default() {
11
+ return {};
12
+ }
13
+ },
14
+ dataset: {
15
+ type: Array,
16
+ default() {
17
+ return [];
18
+ }
19
+ },
20
+ /**
21
+ * Used in VueUiRadar's tooltip exclusively
22
+ */
23
+ backgroundOpacity: {
24
+ type: Number,
25
+ default: 100
26
+ }
27
+ },
28
+ emits: ["selectDatapoint"],
29
+ setup(C, { emit: E }) {
30
+ const a = C, { vue_ui_sparkbar: O } = K(), $ = g(() => !!a.dataset && a.dataset.length), S = x(Q()), e = g(() => {
31
+ const t = T({
32
+ userConfig: a.config,
33
+ defaultConfig: O
34
+ });
35
+ return t.theme ? {
36
+ ...T({
37
+ userConfig: Y.vue_ui_sparkbar[t.theme] || a.config,
38
+ defaultConfig: t
39
+ }),
40
+ customPalette: Z[t.theme] || k
41
+ } : t;
42
+ }), V = g(() => ee(e.value.customPalette)), f = x(a.dataset.map((t) => ({
43
+ ...t,
44
+ value: e.value.style.animation.show ? 0 : t.value || 0,
45
+ formatter: t.formatter || null
46
+ }))), A = x(null);
47
+ G(async () => {
48
+ te(a.dataset) && L({
49
+ componentName: "VueUiSparkbar",
50
+ type: "dataset"
51
+ }), D();
52
+ });
53
+ function D() {
54
+ if (e.value.style.animation.show) {
55
+ let N = function() {
56
+ n += l / t, n < l ? (f.value = f.value.map((u, h) => ({
57
+ ...u,
58
+ value: u.value += o[h]
59
+ })), A.value = requestAnimationFrame(N)) : f.value = a.dataset.map((u) => ({
60
+ ...u,
61
+ value: u.value || 0,
62
+ formatter: u.formatter || null
63
+ }));
64
+ };
65
+ const t = e.value.style.animation.animationFrames, o = a.dataset.map((u, h) => u.value / t), l = a.dataset.map((u) => u.value || 0).reduce((u, h) => u + h, 0);
66
+ let n = 0;
67
+ N();
68
+ }
69
+ }
70
+ W(() => a.dataset, async (t) => {
71
+ cancelAnimationFrame(A.value), f.value = a.dataset.map((o) => ({
72
+ ...o,
73
+ value: e.value.style.animation.show ? 0 : o.value || 0,
74
+ formatter: o.formatter || null
75
+ })), q(D);
76
+ }, { deep: !0 });
77
+ const i = x({
78
+ width: 500,
79
+ height: 16
80
+ }), B = g(() => Math.max(...a.dataset.map((t) => t.value))), M = g(() => (a.dataset.forEach((t, o) => {
81
+ le({
82
+ datasetObject: t,
83
+ requiredAttributes: ["name", "value"]
84
+ }).forEach((l) => {
85
+ L({
86
+ componentName: "VueUiSparkbar",
87
+ type: "datasetSerieAttribute",
88
+ property: l,
89
+ index: o
90
+ });
91
+ });
92
+ }), f.value.map((t, o) => ({
93
+ ...t,
94
+ value: t.value || 0,
95
+ color: ae(t.color) || V.value[o] || k[o] || k[o % k.length]
96
+ }))));
97
+ function U(t) {
98
+ return t / B.value;
99
+ }
100
+ function F(t) {
101
+ return e.value.style.layout.independant ? t.target ? t.value / t.target : e.value.style.layout.percentage ? t.value > 100 ? 1 : t.value / 100 : e.value.style.layout.target === 0 ? 1 : t.value / e.value.style.layout.target : U(t.value);
102
+ }
103
+ function m(t) {
104
+ return e.value.style.layout.independant && t.target || e.value.style.layout.target;
105
+ }
106
+ function j(t, o) {
107
+ E("selectDatapoint", { datapoint: t, index: o });
108
+ }
109
+ return (t, o) => (r(), v("div", {
110
+ style: y({
111
+ width: "100%",
112
+ fontFamily: e.value.style.fontFamily,
113
+ background: e.value.style.backgroundColor + s(_)[a.backgroundOpacity]
114
+ })
115
+ }, [
116
+ t.$slots.title ? I(t.$slots, "title", P(H({ key: 0 }, { title: { ...t.title, title: e.value.style.title.text, subtitle: e.value.style.title.subtitle.text } }))) : d("", !0),
117
+ !t.$slots.title && e.value.style.title.text ? (r(), v("div", {
118
+ key: 1,
119
+ class: "vue-ui-sparkbar-title-container",
120
+ style: y({
121
+ background: e.value.style.title.backgroundColor,
122
+ margin: e.value.style.title.margin,
123
+ textAlign: e.value.style.title.textAlign
124
+ })
125
+ }, [
126
+ c("div", {
127
+ class: "vue-ui-sparkbar-title",
128
+ style: y({
129
+ fontSize: e.value.style.title.fontSize + "px",
130
+ color: e.value.style.title.color,
131
+ fontWeight: e.value.style.title.bold ? "bold" : "normal"
132
+ })
133
+ }, p(e.value.style.title.text), 5),
134
+ e.value.style.title.subtitle.text ? (r(), v("div", {
135
+ key: 0,
136
+ class: "vue-ui-sparkbar-subtitle",
137
+ style: y({
138
+ fontSize: e.value.style.title.subtitle.fontSize + "px",
139
+ color: e.value.style.title.subtitle.color,
140
+ fontWeight: e.value.style.title.subtitle.bold ? "bold" : "normal"
141
+ })
142
+ }, p(e.value.style.title.subtitle.text), 5)) : d("", !0)
143
+ ], 4)) : d("", !0),
144
+ (r(!0), v(z, null, X(M.value, (l, n) => (r(), v(z, null, [
145
+ $.value ? (r(), v("div", {
146
+ key: 0,
147
+ style: y(`display:flex !important;${["left", "right"].includes(e.value.style.labels.name.position) ? `flex-direction: ${e.value.style.labels.name.position === "right" ? "row-reverse" : "row"} !important` : "flex-direction:column !important"};gap:${e.value.style.gap}px !important;align-items:center;${C.dataset.length > 0 && n !== C.dataset.length - 1 ? "margin-bottom:6px" : ""}`),
148
+ onClick: () => j(l, n)
149
+ }, [
150
+ I(t.$slots, "data-label", P(R({ bar: {
151
+ ...l,
152
+ target: m(l),
153
+ valueLabel: s(w)(
154
+ l.formatter,
155
+ l.value,
156
+ s(b)({
157
+ p: l.prefix || "",
158
+ v: l.value,
159
+ s: l.suffix || "",
160
+ r: l.rounding || 0
161
+ }),
162
+ { datapoint: l, seriesIndex: n }
163
+ ),
164
+ targetLabel: s(w)(
165
+ l.formatter,
166
+ m(l),
167
+ s(b)({
168
+ p: l.prefix || "",
169
+ v: m(l),
170
+ s: l.suffix || "",
171
+ r: l.rounding || 0
172
+ }),
173
+ { datapoint: l, seriesIndex: n }
174
+ )
175
+ } }))),
176
+ t.$slots["data-label"] ? d("", !0) : (r(), v("div", {
177
+ key: 0,
178
+ style: y({
179
+ width: e.value.style.labels.name.width,
180
+ color: e.value.style.labels.name.color,
181
+ fontSize: e.value.style.labels.fontSize + "px",
182
+ fontWeight: e.value.style.labels.name.bold ? "bold" : "normal",
183
+ textAlign: ["left", "right"].includes(e.value.style.labels.name.position) || ["top", "top-left"].includes(e.value.style.labels.name.position) ? "left" : e.value.style.labels.name.position === "top-center" ? "center" : "right"
184
+ })
185
+ }, [
186
+ c("span", null, p(l.name), 1),
187
+ e.value.style.labels.value.show ? (r(), v("span", {
188
+ key: 0,
189
+ style: y(`font-weight:${e.value.style.labels.value.bold ? "bold" : "normal"}`)
190
+ }, ": " + p(s(w)(
191
+ l.formatter,
192
+ l.value,
193
+ s(b)({
194
+ p: l.prefix || "",
195
+ v: l.value,
196
+ s: l.suffix || "",
197
+ r: l.rounding || 0
198
+ }),
199
+ { datapoint: l, seriesIndex: n }
200
+ )), 5)) : d("", !0),
201
+ e.value.style.layout.showTargetValue ? (r(), v("span", ne, p(" " + e.value.style.layout.targetValueText) + " " + p(s(w)(
202
+ l.formatter,
203
+ m(l),
204
+ s(b)({
205
+ p: l.prefix || "",
206
+ v: m(l),
207
+ s: l.suffix || "",
208
+ r: l.rounding || 0
209
+ }),
210
+ { datapoint: l, seriesIndex: n }
211
+ )), 1)) : d("", !0)
212
+ ], 4)),
213
+ (r(), v("svg", {
214
+ xmlns: s(oe),
215
+ viewBox: `0 0 ${i.value.width} ${i.value.height}`,
216
+ width: "100%"
217
+ }, [
218
+ c("defs", null, [
219
+ c("linearGradient", {
220
+ x1: "0%",
221
+ y1: "0%",
222
+ x2: "100%",
223
+ y2: "0%",
224
+ id: `sparkbar_gradient_${n}_${S.value}`
225
+ }, [
226
+ c("stop", {
227
+ offset: "0%",
228
+ "stop-color": `${s(se)(l.color, 0.03)}${s(_)[100 - e.value.style.bar.gradient.intensity]}`
229
+ }, null, 8, ce),
230
+ c("stop", {
231
+ offset: "100%",
232
+ "stop-color": l.color
233
+ }, null, 8, de)
234
+ ], 8, ve)
235
+ ]),
236
+ c("rect", {
237
+ height: i.value.height,
238
+ width: i.value.width,
239
+ x: 0,
240
+ y: 0,
241
+ fill: `${e.value.style.gutter.backgroundColor}${s(_)[e.value.style.gutter.opacity]}`,
242
+ rx: i.value.height / 2
243
+ }, null, 8, ye),
244
+ c("rect", {
245
+ height: i.value.height,
246
+ width: i.value.width * F(l),
247
+ x: 0,
248
+ y: 0,
249
+ fill: e.value.style.bar.gradient.underlayerColor,
250
+ rx: i.value.height / 2
251
+ }, null, 8, pe),
252
+ c("rect", {
253
+ height: i.value.height,
254
+ width: i.value.width * F(l),
255
+ x: 0,
256
+ y: 0,
257
+ fill: e.value.style.bar.gradient.show ? `url(#sparkbar_gradient_${n}_${S.value})` : l.color,
258
+ rx: i.value.height / 2
259
+ }, null, 8, fe)
260
+ ], 8, re))
261
+ ], 12, ie)) : d("", !0)
262
+ ], 64))), 256)),
263
+ $.value ? d("", !0) : (r(), J(ue, {
264
+ key: 2,
265
+ config: {
266
+ type: "sparkbar",
267
+ style: {
268
+ backgroundColor: e.value.style.backgroundColor,
269
+ sparkbar: {
270
+ color: "#CCCCCC"
271
+ }
272
+ }
273
+ }
274
+ }, null, 8, ["config"]))
275
+ ], 4));
276
+ }
277
+ };
278
+ export {
279
+ ke as default
280
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BQOxn6SH.cjs"),p=require("./useNestedProp-BtqgWTf9.cjs"),C=require("./vue-ui-skeleton-CcrGR_Vh.cjs"),$=["xmlns","viewBox"],w=["id"],N=["stop-color"],S=["stop-color"],L=["d","stroke","stroke-linecap"],B=["d","stroke","stroke-linecap","stroke-dashoffset"],E=["x","y","font-size","fill","font-weight"],z={__name:"vue-ui-sparkgauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(g){const a=g,{vue_ui_sparkgauge:k}=u.useConfig(),c=e.computed(()=>!!a.dataset&&Object.keys(a.dataset).length);e.onMounted(()=>{u.objectIsEmpty(a.dataset)?u.error({componentName:"VueUiSparkgauge",type:"dataset"}):u.getMissingDatasetAttributes({datasetObject:a.dataset,requiredAttributes:["value","min","max"]}).forEach(o=>{u.error({componentName:"VueUiSparkgauge",type:"datasetAttribute",property:o})})});const d=e.ref(u.createUid()),t=e.computed(()=>{const o=p.useNestedProp({userConfig:a.config,defaultConfig:k});return o.theme?{...p.useNestedProp({userConfig:u.themes.vue_ui_sparkgauge[o.theme]||a.config,defaultConfig:o})}:o}),n=e.computed(()=>({height:t.value.style.height,width:128,base:t.value.style.basePosition})),l=e.computed(()=>{const o=a.dataset.min??0,i=a.dataset.max??0,_=i-o;return{min:o,max:i,diff:_}}),s=e.ref(t.value.style.animation.show?l.value.min:a.dataset.value);e.watch(()=>a.dataset.value,()=>{s.value=e.ref(t.value.style.animation.show?l.value.min:a.dataset.value),m()});const v=e.computed(()=>s.value>l.value.max?l.value.max:s.value<l.value.min?l.value.min:s.value),b=e.computed(()=>l.value.diff/t.value.style.animation.speedMs);e.onMounted(()=>{m()});function m(){function o(){s.value+=b.value,s.value<a.dataset.value?requestAnimationFrame(o):s.value=a.dataset.value}t.value.style.animation.show&&(s.value=l.value.min,o())}const r=e.computed(()=>a.dataset.title??""),y=e.computed(()=>s.value>=0?(v.value-l.value.min)/l.value.diff:(Math.abs(l.value.min)-Math.abs(v.value))/l.value.diff),f=e.computed(()=>u.interpolateColorHex(t.value.style.colors.min,t.value.style.colors.max,l.value.min,l.value.max,s.value)),h=e.computed(()=>t.value.style.dataLabel.autoColor?f.value:t.value.style.dataLabel.color),x=e.computed(()=>t.value.style.track.autoColor?f.value:t.value.style.track.color);return(o,i)=>(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&&r.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(r.value),5)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:e.normalizeStyle(`overflow: visible; background:${t.value.style.background}; width:100%;`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`gradient_${d.value}`,x1:"-10%",y1:"100%",x2:"110%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.colors.min},null,8,N),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.max},null,8,S)],8,w)]),e.createElementVNode("path",{d:`M10 ${n.value.base} A 1 1 0 1 1 118 ${n.value.base}`,stroke:t.value.style.gutter.color,"stroke-width":8,"stroke-linecap":t.value.style.gutter.strokeLinecap,fill:"none"},null,8,L),y.value!==0?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M10 ${n.value.base} A 1 1 0 1 1 118 ${n.value.base}`,stroke:t.value.style.colors.showGradient?`url(#gradient_${d.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*y.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,B)):e.createCommentVNode("",!0),e.createElementVNode("text",{"text-anchor":"middle",x:n.value.width/2,y:n.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(u.dataLabel)({p:t.value.style.dataLabel.prefix,v:s.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding})),9,E)],12,$)):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(C.default,{key:2,config:{type:"gauge",style:{backgroundColor:t.value.style.background,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.title.show&&r.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(r.value),5)):e.createCommentVNode("",!0)],4))}};exports.default=z;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-hKWfT7Wa.cjs"),g=require("./useNestedProp-Cggpoz7e.cjs"),C=require("./vue-ui-skeleton-j-IOiy5w.cjs"),$=["xmlns","viewBox"],w=["id"],N=["stop-color"],S=["stop-color"],L=["d","stroke","stroke-linecap"],B=["d","stroke","stroke-linecap","stroke-dashoffset"],E=["x","y","font-size","fill","font-weight"],z={__name:"vue-ui-sparkgauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(k){const a=k,{vue_ui_sparkgauge:b}=u.useConfig(),c=e.computed(()=>!!a.dataset&&Object.keys(a.dataset).length);e.onMounted(()=>{u.objectIsEmpty(a.dataset)?u.error({componentName:"VueUiSparkgauge",type:"dataset"}):u.getMissingDatasetAttributes({datasetObject:a.dataset,requiredAttributes:["value","min","max"]}).forEach(s=>{u.error({componentName:"VueUiSparkgauge",type:"datasetAttribute",property:s})})});const v=e.ref(u.createUid()),t=e.computed(()=>{const s=g.useNestedProp({userConfig:a.config,defaultConfig:b});return s.theme?{...g.useNestedProp({userConfig:u.themes.vue_ui_sparkgauge[s.theme]||a.config,defaultConfig:s})}:s}),n=e.computed(()=>({height:t.value.style.height,width:128,base:t.value.style.basePosition})),l=e.computed(()=>{const s=a.dataset.min??0,i=a.dataset.max??0,_=i-s;return{min:s,max:i,diff:_}}),o=e.ref(t.value.style.animation.show?l.value.min:a.dataset.value);e.watch(()=>a.dataset.value,()=>{o.value=e.ref(t.value.style.animation.show?l.value.min:a.dataset.value),m()});const d=e.computed(()=>o.value>l.value.max?l.value.max:o.value<l.value.min?l.value.min:o.value),h=e.computed(()=>l.value.diff/t.value.style.animation.speedMs);e.onMounted(()=>{m()});function m(){function s(){o.value+=h.value,o.value<a.dataset.value?requestAnimationFrame(s):o.value=a.dataset.value}t.value.style.animation.show&&(o.value=l.value.min,s())}const r=e.computed(()=>a.dataset.title??""),y=e.computed(()=>o.value>=0?(d.value-l.value.min)/l.value.diff:(Math.abs(l.value.min)-Math.abs(d.value))/l.value.diff),f=e.computed(()=>u.interpolateColorHex(t.value.style.colors.min,t.value.style.colors.max,l.value.min,l.value.max,o.value)),p=e.computed(()=>t.value.style.dataLabel.autoColor?f.value:t.value.style.dataLabel.color),x=e.computed(()=>t.value.style.track.autoColor?f.value:t.value.style.track.color);return(s,i)=>(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&&r.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(r.value),5)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:e.normalizeStyle(`overflow: visible; background:${t.value.style.background}; width:100%;`)},[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,N),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.max},null,8,S)],8,w)]),e.createElementVNode("path",{d:`M10 ${n.value.base} A 1 1 0 1 1 118 ${n.value.base}`,stroke:t.value.style.gutter.color,"stroke-width":8,"stroke-linecap":t.value.style.gutter.strokeLinecap,fill:"none"},null,8,L),y.value!==0?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M10 ${n.value.base} A 1 1 0 1 1 118 ${n.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*y.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,B)):e.createCommentVNode("",!0),e.createElementVNode("text",{"text-anchor":"middle",x:n.value.width/2,y:n.value.base+6+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,fill:p.value,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.dataLabel.formatter,o.value,e.unref(u.dataLabel)({p:t.value.style.dataLabel.prefix,v:o.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:o.value,color:p.value})),9,E)],12,$)):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(C.default,{key:2,config:{type:"gauge",style:{backgroundColor:t.value.style.background,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.title.show&&r.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(r.value),5)):e.createCommentVNode("",!0)],4))}};exports.default=z;
@@ -1,8 +1,8 @@
1
- import { computed as s, onMounted as _, ref as m, watch as F, openBlock as n, createElementBlock as r, normalizeStyle as v, toDisplayString as y, createCommentVNode as c, unref as $, createElementVNode as i, normalizeClass as O, createBlock as j } from "vue";
2
- import { u as B, o as E, e as w, g as D, c as G, t as I, H as U, X as V, f as q } from "./index-DiWO-_ca.js";
3
- import { u as C } from "./useNestedProp-DNX5EefQ.js";
4
- import H from "./vue-ui-skeleton-CeNL0kH-.js";
5
- const P = ["xmlns", "viewBox"], T = ["id"], X = ["stop-color"], R = ["stop-color"], Y = ["d", "stroke", "stroke-linecap"], J = ["d", "stroke", "stroke-linecap", "stroke-dashoffset"], K = ["x", "y", "font-size", "fill", "font-weight"], te = {
1
+ import { computed as s, onMounted as w, ref as m, watch as F, openBlock as n, createElementBlock as r, normalizeStyle as v, toDisplayString as y, createCommentVNode as c, unref as g, createElementVNode as i, normalizeClass as O, createBlock as j } from "vue";
2
+ import { u as B, o as D, e as C, g as E, c as I, t as G, I as U, X as V, i as q, f as P } from "./index-BlXzlBwZ.js";
3
+ import { u as L } from "./useNestedProp-BoNl5H_z.js";
4
+ import T from "./vue-ui-skeleton-CJ2R5R6u.js";
5
+ const X = ["xmlns", "viewBox"], H = ["id"], R = ["stop-color"], Y = ["stop-color"], J = ["d", "stroke", "stroke-linecap"], K = ["d", "stroke", "stroke-linecap", "stroke-dashoffset"], Q = ["x", "y", "font-size", "fill", "font-weight"], ae = {
6
6
  __name: "vue-ui-sparkgauge",
7
7
  props: {
8
8
  config: {
@@ -18,61 +18,61 @@ const P = ["xmlns", "viewBox"], T = ["id"], X = ["stop-color"], R = ["stop-color
18
18
  }
19
19
  }
20
20
  },
21
- setup(L) {
22
- const t = L, { vue_ui_sparkgauge: A } = B(), g = s(() => !!t.dataset && Object.keys(t.dataset).length);
23
- _(() => {
24
- E(t.dataset) ? w({
21
+ setup(A) {
22
+ const t = A, { vue_ui_sparkgauge: S } = B(), p = s(() => !!t.dataset && Object.keys(t.dataset).length);
23
+ w(() => {
24
+ D(t.dataset) ? C({
25
25
  componentName: "VueUiSparkgauge",
26
26
  type: "dataset"
27
- }) : D({
27
+ }) : E({
28
28
  datasetObject: t.dataset,
29
29
  requiredAttributes: ["value", "min", "max"]
30
- }).forEach((l) => {
31
- w({
30
+ }).forEach((o) => {
31
+ C({
32
32
  componentName: "VueUiSparkgauge",
33
33
  type: "datasetAttribute",
34
- property: l
34
+ property: o
35
35
  });
36
36
  });
37
37
  });
38
- const p = m(G()), e = s(() => {
39
- const l = C({
38
+ const b = m(I()), e = s(() => {
39
+ const o = L({
40
40
  userConfig: t.config,
41
- defaultConfig: A
41
+ defaultConfig: S
42
42
  });
43
- return l.theme ? {
44
- ...C({
45
- userConfig: I.vue_ui_sparkgauge[l.theme] || t.config,
46
- defaultConfig: l
43
+ return o.theme ? {
44
+ ...L({
45
+ userConfig: G.vue_ui_sparkgauge[o.theme] || t.config,
46
+ defaultConfig: o
47
47
  })
48
- } : l;
48
+ } : o;
49
49
  }), u = s(() => ({
50
50
  height: e.value.style.height,
51
51
  width: 128,
52
52
  base: e.value.style.basePosition
53
53
  })), a = s(() => {
54
- const l = t.dataset.min ?? 0, f = t.dataset.max ?? 0, N = f - l;
54
+ const o = t.dataset.min ?? 0, f = t.dataset.max ?? 0, N = f - o;
55
55
  return {
56
- min: l,
56
+ min: o,
57
57
  max: f,
58
58
  diff: N
59
59
  };
60
- }), o = m(e.value.style.animation.show ? a.value.min : t.dataset.value);
60
+ }), l = m(e.value.style.animation.show ? a.value.min : t.dataset.value);
61
61
  F(() => t.dataset.value, () => {
62
- o.value = m(e.value.style.animation.show ? a.value.min : t.dataset.value), b();
62
+ l.value = m(e.value.style.animation.show ? a.value.min : t.dataset.value), k();
63
63
  });
64
- const h = s(() => o.value > a.value.max ? a.value.max : o.value < a.value.min ? a.value.min : o.value), S = s(() => a.value.diff / e.value.style.animation.speedMs);
65
- _(() => {
66
- b();
64
+ const h = s(() => l.value > a.value.max ? a.value.max : l.value < a.value.min ? a.value.min : l.value), z = s(() => a.value.diff / e.value.style.animation.speedMs);
65
+ w(() => {
66
+ k();
67
67
  });
68
- function b() {
69
- function l() {
70
- o.value += S.value, o.value < t.dataset.value ? requestAnimationFrame(l) : o.value = t.dataset.value;
68
+ function k() {
69
+ function o() {
70
+ l.value += z.value, l.value < t.dataset.value ? requestAnimationFrame(o) : l.value = t.dataset.value;
71
71
  }
72
- e.value.style.animation.show && (o.value = a.value.min, l());
72
+ e.value.style.animation.show && (l.value = a.value.min, o());
73
73
  }
74
- const d = s(() => t.dataset.title ?? ""), k = s(() => o.value >= 0 ? (h.value - a.value.min) / a.value.diff : (Math.abs(a.value.min) - Math.abs(h.value)) / a.value.diff), x = s(() => U(e.value.style.colors.min, e.value.style.colors.max, a.value.min, a.value.max, o.value)), z = s(() => e.value.style.dataLabel.autoColor ? x.value : e.value.style.dataLabel.color), M = s(() => e.value.style.track.autoColor ? x.value : e.value.style.track.color);
75
- return (l, f) => (n(), r("div", {
74
+ const d = s(() => t.dataset.title ?? ""), x = s(() => l.value >= 0 ? (h.value - a.value.min) / a.value.diff : (Math.abs(a.value.min) - Math.abs(h.value)) / a.value.diff), _ = s(() => U(e.value.style.colors.min, e.value.style.colors.max, a.value.min, a.value.max, l.value)), $ = s(() => e.value.style.dataLabel.autoColor ? _.value : e.value.style.dataLabel.color), M = s(() => e.value.style.track.autoColor ? _.value : e.value.style.track.color);
75
+ return (o, f) => (n(), r("div", {
76
76
  style: v(`font-family:${e.value.style.fontFamily};width: 100%; background:${e.value.style.background}`)
77
77
  }, [
78
78
  e.value.style.title.show && d.value && e.value.style.title.position === "top" ? (n(), r("div", {
@@ -80,15 +80,15 @@ const P = ["xmlns", "viewBox"], T = ["id"], X = ["stop-color"], R = ["stop-color
80
80
  class: "vue-data-ui-sparkgauge-label",
81
81
  style: v(`font-size:${e.value.style.title.fontSize}px;text-align:${e.value.style.title.textAlign};font-weight:${e.value.style.title.bold ? "bold" : "normal"};color:${e.value.style.title.color}`)
82
82
  }, y(d.value), 5)) : c("", !0),
83
- g.value ? (n(), r("svg", {
83
+ p.value ? (n(), r("svg", {
84
84
  key: 1,
85
- xmlns: $(V),
85
+ xmlns: g(V),
86
86
  viewBox: `0 0 ${u.value.width} ${u.value.height}`,
87
87
  style: v(`overflow: visible; background:${e.value.style.background}; width:100%;`)
88
88
  }, [
89
89
  i("defs", null, [
90
90
  i("linearGradient", {
91
- id: `gradient_${p.value}`,
91
+ id: `gradient_${b.value}`,
92
92
  x1: "-10%",
93
93
  y1: "100%",
94
94
  x2: "110%",
@@ -97,12 +97,12 @@ const P = ["xmlns", "viewBox"], T = ["id"], X = ["stop-color"], R = ["stop-color
97
97
  i("stop", {
98
98
  offset: "0%",
99
99
  "stop-color": e.value.style.colors.min
100
- }, null, 8, X),
100
+ }, null, 8, R),
101
101
  i("stop", {
102
102
  offset: "100%",
103
103
  "stop-color": e.value.style.colors.max
104
- }, null, 8, R)
105
- ], 8, T)
104
+ }, null, 8, Y)
105
+ ], 8, H)
106
106
  ]),
107
107
  i("path", {
108
108
  d: `M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,
@@ -110,29 +110,39 @@ const P = ["xmlns", "viewBox"], T = ["id"], X = ["stop-color"], R = ["stop-color
110
110
  "stroke-width": 8,
111
111
  "stroke-linecap": e.value.style.gutter.strokeLinecap,
112
112
  fill: "none"
113
- }, null, 8, Y),
114
- k.value !== 0 ? (n(), r("path", {
113
+ }, null, 8, J),
114
+ x.value !== 0 ? (n(), r("path", {
115
115
  key: 0,
116
116
  d: `M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,
117
- stroke: e.value.style.colors.showGradient ? `url(#gradient_${p.value})` : M.value,
117
+ stroke: e.value.style.colors.showGradient ? `url(#gradient_${b.value})` : M.value,
118
118
  "stroke-width": 8,
119
119
  "stroke-linecap": e.value.style.track.strokeLinecap,
120
120
  fill: "none",
121
121
  "stroke-dasharray": 169.5,
122
- "stroke-dashoffset": 169.5 - 169.5 * k.value,
122
+ "stroke-dashoffset": 169.5 - 169.5 * x.value,
123
123
  class: O({ "vue-ui-sparkgauge-track": e.value.style.animation.show }),
124
124
  style: v(e.value.style.animation.show ? `animation: vue-ui-sparkgauge-animation ${e.value.style.animation.speedMs}ms ease-in;` : "")
125
- }, null, 14, J)) : c("", !0),
125
+ }, null, 14, K)) : c("", !0),
126
126
  i("text", {
127
127
  "text-anchor": "middle",
128
128
  x: u.value.width / 2,
129
129
  y: u.value.base + 6 + e.value.style.dataLabel.offsetY,
130
130
  "font-size": e.value.style.dataLabel.fontSize,
131
- fill: z.value,
131
+ fill: $.value,
132
132
  "font-weight": e.value.style.dataLabel.bold ? "bold" : "normal"
133
- }, y($(q)({ p: e.value.style.dataLabel.prefix, v: o.value, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.rounding })), 9, K)
134
- ], 12, P)) : c("", !0),
135
- g.value ? c("", !0) : (n(), j(H, {
133
+ }, y(g(q)(
134
+ e.value.style.dataLabel.formatter,
135
+ l.value,
136
+ g(P)({
137
+ p: e.value.style.dataLabel.prefix,
138
+ v: l.value,
139
+ s: e.value.style.dataLabel.suffix,
140
+ r: e.value.style.dataLabel.rounding
141
+ }),
142
+ { datapoint: l.value, color: $.value }
143
+ )), 9, Q)
144
+ ], 12, X)) : c("", !0),
145
+ p.value ? c("", !0) : (n(), j(T, {
136
146
  key: 2,
137
147
  config: {
138
148
  type: "gauge",
@@ -153,5 +163,5 @@ const P = ["xmlns", "viewBox"], T = ["id"], X = ["stop-color"], R = ["stop-color
153
163
  }
154
164
  };
155
165
  export {
156
- te as default
166
+ ae as default
157
167
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-hKWfT7Wa.cjs"),k=require("./useNestedProp-Cggpoz7e.cjs"),z=require("./Shape-B8O8_E6l.cjs"),D=require("./vue-ui-skeleton-j-IOiy5w.cjs"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0},A={key:1},H=["xmlns","viewBox"],q=["id"],I=["stop-color"],U=["stop-color"],W=["id"],O=["stop-color"],j=["stop-color"],P=["id"],G=["stop-color"],T=["stop-color"],X={key:0},Y=["x","y","height","width","fill","stroke","stroke-width","rx"],R={key:1},J=["x","y","font-size","font-weight","fill"],K=["x","y","font-size","fill"],Q=["x","y","font-size","fill"],Z=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],ee={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(b,{emit:_}){const u=b;e.useCssVars(o=>({"07c89730":w.value}));const{vue_ui_sparkhistogram:x}=a.useConfig(),f=e.computed(()=>!!u.dataset&&u.dataset.length);e.onMounted(()=>{a.objectIsEmpty(u.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):u.dataset.forEach((o,n)=>{a.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{a.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:n})})})});const v=e.ref(a.createUid()),t=e.computed(()=>{const o=k.useNestedProp({userConfig:u.config,defaultConfig:x});return o.theme?{...k.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||u.config,defaultConfig:o})}:o}),c=e.computed(()=>{const o=t.value.style.layout.height,n=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=n-t.value.style.layout.padding.right,p=l+(o-l-t.value.style.layout.padding.bottom)/2,g=o-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,m=n-t.value.style.layout.padding.left-t.value.style.layout.padding.right;return{bottom:s,centerY:p,drawingHeight:g,drawingWidth:m,height:o,left:d,right:y,top:l,width:n}}),B=e.computed(()=>Math.max(...u.dataset.map(o=>Math.abs(o.value||0))));function $(o){return Math.abs(o)/B.value}const i=e.computed(()=>u.dataset.map((o,n)=>{const l=$(o.value||0),s=c.value.drawingHeight*l,d=c.value.drawingWidth/u.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,g=c.value.centerY-s/2,m=c.value.left+(y/2+n*d),S=c.value.left+n*d,h=typeof o.intensity>"u"?100:Math.round(o.intensity*100),C=o.color?o.color:o.value>=0?`${t.value.style.bars.colors.positive}${a.opacity[h]}`:`${t.value.style.bars.colors.negative}${a.opacity[h]}`,N=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,L=o.color?`url(#gradient_datapoint_${n}_${v.value})`:o.value>=0?`url(#gradient_positive_${n}_${v.value})`:`url(#gradient_negative_${n}_${v.value})`,V=m+p/2;return{...o,color:C,gradient:L,height:s,intensity:h,proportion:l,stroke:N,textAnchor:V,trapX:S,unitWidth:d,width:p,x:m,y:g}})),r=e.ref(null);function E(o,n){_("selectDatapoint",{datapoint:o,index:n})}const w=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:n[1]||(n[1]=l=>r.value=null)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:${t.value.style.backgroundColor};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),r.value!==null?(e.openBlock(),e.createElementBlock("span",M,"- "+e.toDisplayString(i.value[r.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,i.value[r.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:i.value[r.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[r.value],seriesIndex:r.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(r.value)&&![null,void 0].includes(i.value[r.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",A,"("+e.toDisplayString(i.value[r.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),f.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.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.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.shiftHue)(t.value.style.bars.colors.positive,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,I),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.positive}${e.unref(a.opacity)[l.intensity]}`},null,8,U)],8,q))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.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.shiftHue)(t.value.style.bars.colors.negative,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,O),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.negative}${e.unref(a.opacity)[l.intensity]}`},null,8,j)],8,W))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.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.shiftHue)(l.color,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":`${l.color}${e.unref(a.opacity)[l.intensity]}`},null,8,T)],8,P))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.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,Y))),256))])):(e.openBlock(),e.createElementBlock("g",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createBlock(z._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(i.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(t.value.style.labels.value.prefix)+e.toDisplayString(isNaN(l.value)?"":Number(l.value.toFixed(t.value.style.labels.value.rounding)).toLocaleString())+e.toDisplayString(t.value.style.labels.value.suffix),9,J))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.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,K)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.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,Q)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.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=>r.value=s,onMouseleave:n[0]||(n[0]=d=>r.value=null),stroke:r.value!==null&&r.value===s?t.value.style.selector.stroke:"","stroke-width":r.value!==null&&r.value===s?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>E(l,s)},null,40,Z)]))),256))],8,H)):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.default,{key:2,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},te=F._export_sfc(ee,[["__scopeId","data-v-27ede5f8"]]);exports.default=te;