vue-data-ui 2.3.84 → 2.3.85
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.
- package/dist/{Arrow-Uk_vwKtL.cjs → Arrow-CLOh6oi7.cjs} +1 -1
- package/dist/{Arrow-CQ1ubni5.js → Arrow-JwDgP3de.js} +1 -1
- package/dist/{BaseIcon-CF1HQdM0.cjs → BaseIcon-BBQHz_Sf.cjs} +1 -1
- package/dist/{BaseIcon-B9ZZ6wkT.js → BaseIcon-BysUnfCR.js} +1 -1
- package/dist/{DataTable-C-iU_7h7.js → DataTable-MkG5Dqrn.js} +2 -2
- package/dist/{DataTable-CEtr89Og.cjs → DataTable-pVXaNplZ.cjs} +1 -1
- package/dist/{Legend-pU_BwhaW.js → Legend-KW7sTwN3.js} +1 -1
- package/dist/{Legend-D2ZBCCXe.cjs → Legend-k2mcTp7z.cjs} +1 -1
- package/dist/{Shape-CyM44biU.js → Shape-BFiZBf3X.js} +1 -1
- package/dist/{Shape-BO_KyCq8.cjs → Shape-COoEWeGM.cjs} +1 -1
- package/dist/{Slicer-CZobytqL.js → Slicer-CALc-Q4W.js} +2 -2
- package/dist/{Slicer-BAMZ4wsl.cjs → Slicer-DCyxUSsn.cjs} +1 -1
- package/dist/{Title-B1_d29Eh.cjs → Title-BaKZYHEx.cjs} +1 -1
- package/dist/{Title-Bk3h09h9.js → Title-ISDbzCH8.js} +1 -1
- package/dist/{Tooltip-CdB80DsD.js → Tooltip-BHmMXOej.js} +1 -1
- package/dist/{Tooltip-BU4cSEF0.cjs → Tooltip-okAYzo5Y.cjs} +1 -1
- package/dist/{index-DI4DaxVG.js → index-BiuHBtkZ.js} +1 -1
- package/dist/{index-Cx-40Fnz.cjs → index-D-vy9N1v.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-BdsfyHWU.cjs → useNestedProp-B9yDavuy.cjs} +1 -1
- package/dist/{useNestedProp-COsQo-tX.js → useNestedProp-Ck5_RzLu.js} +1 -1
- package/dist/{usePrinter-D9bNzUQP.js → usePrinter-Do8KiK5h.js} +1 -1
- package/dist/{usePrinter-DbhL59iY.cjs → usePrinter-P4nLcXX-.cjs} +1 -1
- package/dist/{vue-data-ui-9nofTL7J.js → vue-data-ui-CAl2KJv9.js} +57 -57
- package/dist/{vue-data-ui-kGaLyV0o.cjs → vue-data-ui-CVYCyzY-.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-lKgwKkVj.js → vue-ui-3d-bar-CploAEkY.js} +163 -163
- package/dist/vue-ui-3d-bar-DlUqKETN.cjs +19 -0
- package/dist/{vue-ui-accordion-DsN9lxvc.js → vue-ui-accordion-D2fhyKpk.js} +3 -3
- package/dist/{vue-ui-accordion-C8ka_Ot0.cjs → vue-ui-accordion-btKAUUTu.cjs} +1 -1
- package/dist/vue-ui-age-pyramid-CvSoQ1op.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-D2lSXDX6.js → vue-ui-age-pyramid-DkaM5MrK.js} +55 -55
- package/dist/{vue-ui-annotator-DoLG0N5e.js → vue-ui-annotator-38FBI0Pn.js} +1 -1
- package/dist/{vue-ui-annotator-DmfAqbqB.cjs → vue-ui-annotator-BMYk78DR.cjs} +1 -1
- package/dist/vue-ui-candlestick-BJulnyV3.cjs +2 -0
- package/dist/{vue-ui-candlestick-vhHV9d6O.js → vue-ui-candlestick-CKsjq0Uw.js} +81 -81
- package/dist/{vue-ui-carousel-table-DaQV2SlJ.cjs → vue-ui-carousel-table-Cx72LlTd.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BmyArloA.js → vue-ui-carousel-table-DjGaEuM7.js} +4 -4
- package/dist/{vue-ui-chestnut-DvNW2Y0z.cjs → vue-ui-chestnut-DAiBfoPN.cjs} +2 -2
- package/dist/{vue-ui-chestnut-DgbbDtL0.js → vue-ui-chestnut-TLyh4dIZ.js} +9 -9
- package/dist/{vue-ui-cursor-7-jKCnOY.js → vue-ui-cursor-B1xa5yua.js} +2 -2
- package/dist/{vue-ui-cursor-zXDNHCZv.cjs → vue-ui-cursor-BunDuWpK.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DMossMh1.cjs → vue-ui-dashboard-CMZ736DL.cjs} +1 -1
- package/dist/{vue-ui-dashboard-B_pnIQ5P.js → vue-ui-dashboard-DdcubzWu.js} +2 -2
- package/dist/{vue-ui-digits-C-lpZ-rg.js → vue-ui-digits-BUpjWWnD.js} +2 -2
- package/dist/{vue-ui-digits-BL8Vyod-.cjs → vue-ui-digits-z5g__gqs.cjs} +1 -1
- package/dist/vue-ui-donut-TY2Z9Ljx.cjs +1 -0
- package/dist/{vue-ui-donut-e-p-l-_7.js → vue-ui-donut-ZLpfm-XT.js} +73 -73
- package/dist/vue-ui-donut-evolution-BEm2dOxe.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-Ol1YS2OF.js → vue-ui-donut-evolution-Bn4asQO3.js} +81 -81
- package/dist/{vue-ui-dumbbell-CMFNfda1.cjs → vue-ui-dumbbell-CY6X8J1K.cjs} +2 -2
- package/dist/{vue-ui-dumbbell-BjTXdj83.js → vue-ui-dumbbell-D2R9tJ99.js} +21 -21
- package/dist/{vue-ui-flow-B4mdXrld.js → vue-ui-flow-Dd5uPNTQ.js} +52 -52
- package/dist/vue-ui-flow-DswsuPwy.cjs +1 -0
- package/dist/{vue-ui-galaxy-Eg1e5SG7.js → vue-ui-galaxy-B7CoWLhj.js} +85 -85
- package/dist/vue-ui-galaxy-Dxy6jzus.cjs +1 -0
- package/dist/{vue-ui-gauge-BTt63SCn.js → vue-ui-gauge-CGh_m922.js} +61 -61
- package/dist/vue-ui-gauge-CWd_ol6u.cjs +1 -0
- package/dist/{vue-ui-gizmo-C0aF0qVF.js → vue-ui-gizmo-BY3hnKSH.js} +2 -2
- package/dist/{vue-ui-gizmo-bFlUFJa8.cjs → vue-ui-gizmo-D5Kn7w7L.cjs} +1 -1
- package/dist/vue-ui-heatmap-AUm42a1v.cjs +1 -0
- package/dist/{vue-ui-heatmap-kiVWYvjC.js → vue-ui-heatmap-yYN0u0I6.js} +150 -150
- package/dist/{vue-ui-kpi-DdtZLwfi.js → vue-ui-kpi-B4zr_geL.js} +3 -3
- package/dist/{vue-ui-kpi-qw5ofS-z.cjs → vue-ui-kpi-Q20yM3IP.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-B8YrB3X-.cjs → vue-ui-mini-loader-GFSZofpE.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DcL5v-Tv.js → vue-ui-mini-loader-GImbaGsN.js} +2 -2
- package/dist/vue-ui-molecule-C9FcDH4x.cjs +1 -0
- package/dist/{vue-ui-molecule-BpomHzqe.js → vue-ui-molecule-DmrB3kgA.js} +54 -54
- package/dist/vue-ui-mood-radar-CRwStVTV.cjs +1 -0
- package/dist/{vue-ui-mood-radar-BV9xC9xF.js → vue-ui-mood-radar-sEkQtzI2.js} +100 -100
- package/dist/{vue-ui-nested-donuts-C3CMWjgk.cjs → vue-ui-nested-donuts-BcOgxtZV.cjs} +2 -2
- package/dist/{vue-ui-nested-donuts-D7D20nJu.js → vue-ui-nested-donuts-DvpZLcYd.js} +43 -43
- package/dist/vue-ui-onion-C9v9YjdJ.cjs +5 -0
- package/dist/{vue-ui-onion-4wR10l5H.js → vue-ui-onion-DQMLPe3M.js} +88 -88
- package/dist/vue-ui-parallel-coordinate-plot-BBuPdl2K.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-DA3byJV2.js → vue-ui-parallel-coordinate-plot-DN2LPNyS.js} +38 -38
- package/dist/{vue-ui-quadrant-D5wvd5h3.js → vue-ui-quadrant-D2GpeXI6.js} +49 -49
- package/dist/vue-ui-quadrant-ulY-rCMI.cjs +1 -0
- package/dist/{vue-ui-quick-chart-CTSq5JJE.js → vue-ui-quick-chart-C5K9DfUV.js} +12 -12
- package/dist/vue-ui-quick-chart-DFj17h6h.cjs +15 -0
- package/dist/{vue-ui-radar-OW6awckj.js → vue-ui-radar-B9TZPujK.js} +42 -42
- package/dist/vue-ui-radar-KA287Tp-.cjs +1 -0
- package/dist/{vue-ui-rating-C6gyJWJF.js → vue-ui-rating-B0pNsmGB.js} +2 -2
- package/dist/{vue-ui-rating-3ZVG38br.cjs → vue-ui-rating-DpxzUDQq.cjs} +1 -1
- package/dist/vue-ui-relation-circle-D3B-lpdM.cjs +1 -0
- package/dist/{vue-ui-relation-circle-Dr9-ozKG.js → vue-ui-relation-circle-DSnlpLHt.js} +54 -54
- package/dist/{vue-ui-rings-Ce6tFKrN.js → vue-ui-rings-BuvFDBXg.js} +77 -77
- package/dist/vue-ui-rings-cmeFVitd.cjs +2 -0
- package/dist/vue-ui-scatter-BWPqoSUN.cjs +1 -0
- package/dist/{vue-ui-scatter-C_3WQPMf.js → vue-ui-scatter-D_chvOSJ.js} +51 -51
- package/dist/{vue-ui-screenshot-D6N4GbAL.cjs → vue-ui-screenshot-CwrXLMru.cjs} +1 -1
- package/dist/{vue-ui-screenshot-BvE2dsvU.js → vue-ui-screenshot-DSHeHshf.js} +1 -1
- package/dist/{vue-ui-skeleton-CkSlhfsB.cjs → vue-ui-skeleton-DJhwv2oY.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DH4t1hrL.js → vue-ui-skeleton-Du4zw-c1.js} +2 -2
- package/dist/{vue-ui-smiley-CSA28QLT.cjs → vue-ui-smiley-BNkk6suC.cjs} +1 -1
- package/dist/{vue-ui-smiley-C-92SyPZ.js → vue-ui-smiley-BtQLJ7rA.js} +2 -2
- package/dist/{vue-ui-spark-trend-CrElvUcG.js → vue-ui-spark-trend-BgA79g7a.js} +29 -29
- package/dist/vue-ui-spark-trend-DFIjxBTY.cjs +1 -0
- package/dist/vue-ui-sparkbar-BlwQfhlY.cjs +1 -0
- package/dist/{vue-ui-sparkbar-DrbkUcOX.js → vue-ui-sparkbar-DQAWZReF.js} +27 -27
- package/dist/vue-ui-sparkgauge-BCRSQDpt.cjs +1 -0
- package/dist/{vue-ui-sparkgauge-PSRf_u0V.js → vue-ui-sparkgauge-CCApU38s.js} +22 -22
- package/dist/vue-ui-sparkhistogram-CTxG1Vtn.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-pZslBri7.js → vue-ui-sparkhistogram-PKTt4EmH.js} +52 -52
- package/dist/{vue-ui-sparkline-CqgArzCs.cjs → vue-ui-sparkline-BUaixngQ.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BPExupWx.js → vue-ui-sparkline-EESAiZyt.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-i02y9FzO.js → vue-ui-sparkstackbar-TnLNixdf.js} +6 -6
- package/dist/vue-ui-sparkstackbar-iQnc0zcO.cjs +1 -0
- package/dist/{vue-ui-stackbar-DfXxN_P3.js → vue-ui-stackbar-Ci04sup3.js} +62 -62
- package/dist/vue-ui-stackbar-Rrcyg4CC.cjs +6 -0
- package/dist/vue-ui-strip-plot-CowHumiU.cjs +1 -0
- package/dist/{vue-ui-strip-plot-BZ-we0b1.js → vue-ui-strip-plot-DbvW0BuF.js} +72 -72
- package/dist/{vue-ui-table-Dy26T2oy.cjs → vue-ui-table-328De4vk.cjs} +1 -1
- package/dist/{vue-ui-table-BqLbMTHt.js → vue-ui-table-CamkBCdL.js} +1 -1
- package/dist/{vue-ui-table-heatmap-BnwiB4id.cjs → vue-ui-table-heatmap-CCHre3Gt.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-KzoqT8nX.js → vue-ui-table-heatmap-D-YdrvGV.js} +4 -4
- package/dist/{vue-ui-table-sparkline-BBEsDDnN.cjs → vue-ui-table-sparkline-Cmg7wnQ0.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BakiSjV4.js → vue-ui-table-sparkline-Dg2RKv6f.js} +5 -5
- package/dist/vue-ui-thermometer-BDeKErC9.cjs +1 -0
- package/dist/{vue-ui-thermometer-D7cgRJoy.js → vue-ui-thermometer-jWHbZTc2.js} +47 -47
- package/dist/{vue-ui-timer-r4VFny9D.js → vue-ui-timer-BPepr5eV.js} +4 -4
- package/dist/{vue-ui-timer-COLXZ1J1.cjs → vue-ui-timer-B_FyRAU7.cjs} +1 -1
- package/dist/vue-ui-tiremarks-CaJWlyz8.cjs +1 -0
- package/dist/{vue-ui-tiremarks-DNQpuz8A.js → vue-ui-tiremarks-DW8Q2IBl.js} +94 -94
- package/dist/{vue-ui-treemap-CsHaQjwu.cjs → vue-ui-treemap-B9GpvA0k.cjs} +1 -1
- package/dist/{vue-ui-treemap-CD5GoXrU.js → vue-ui-treemap-CWu43qLo.js} +12 -12
- package/dist/{vue-ui-vertical-bar-DRH98pOw.js → vue-ui-vertical-bar-CndASePh.js} +178 -178
- package/dist/vue-ui-vertical-bar-a_41JdIn.cjs +4 -0
- package/dist/{vue-ui-waffle-l9NGD_0B.js → vue-ui-waffle-CdyqwJwN.js} +71 -71
- package/dist/vue-ui-waffle-c9ycdoKz.cjs +1 -0
- package/dist/vue-ui-wheel-B3BMfKmd.cjs +1 -0
- package/dist/{vue-ui-wheel-BpqWo_KY.js → vue-ui-wheel-Byq_BLhl.js} +57 -57
- package/dist/{vue-ui-word-cloud-DLaAm8t8.js → vue-ui-word-cloud-BRxN5uFD.js} +107 -107
- package/dist/{vue-ui-word-cloud-D5JLdr9g.cjs → vue-ui-word-cloud-BVOcsuMP.cjs} +1 -1
- package/dist/vue-ui-xy-CsS5ny0q.cjs +3 -0
- package/dist/{vue-ui-xy-Ct-9OxiZ.js → vue-ui-xy-DgEdZz0O.js} +356 -361
- package/dist/{vue-ui-xy-canvas-BU3nj2M1.js → vue-ui-xy-canvas-BI7jUOTn.js} +10 -10
- package/dist/{vue-ui-xy-canvas-Bub1qCm9.cjs → vue-ui-xy-canvas-Td0WNYN0.cjs} +1 -1
- package/package.json +1 -1
- package/dist/vue-ui-3d-bar-1aTroDle.cjs +0 -19
- package/dist/vue-ui-age-pyramid-D8Tr8jvT.cjs +0 -1
- package/dist/vue-ui-candlestick-BAuWAMct.cjs +0 -2
- package/dist/vue-ui-donut-evolution-DsdzjA88.cjs +0 -1
- package/dist/vue-ui-donut-w1eqaTu0.cjs +0 -1
- package/dist/vue-ui-flow-oBnzNN4s.cjs +0 -1
- package/dist/vue-ui-galaxy-DgxKqf6u.cjs +0 -1
- package/dist/vue-ui-gauge-B64pcc54.cjs +0 -1
- package/dist/vue-ui-heatmap-cjY0mi4a.cjs +0 -1
- package/dist/vue-ui-molecule-B8cYtnHq.cjs +0 -1
- package/dist/vue-ui-mood-radar-BA2VVPO5.cjs +0 -1
- package/dist/vue-ui-onion-CVp0g8MP.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-CmaHQR6-.cjs +0 -8
- package/dist/vue-ui-quadrant-B8ffMNIS.cjs +0 -1
- package/dist/vue-ui-quick-chart-hnVT9GKL.cjs +0 -15
- package/dist/vue-ui-radar-ySl7KzoX.cjs +0 -1
- package/dist/vue-ui-relation-circle-CMW26dvv.cjs +0 -1
- package/dist/vue-ui-rings-CR1t6iss.cjs +0 -2
- package/dist/vue-ui-scatter-CKtgbptk.cjs +0 -1
- package/dist/vue-ui-spark-trend-D4d4Mr24.cjs +0 -1
- package/dist/vue-ui-sparkbar-DDqy0UBm.cjs +0 -1
- package/dist/vue-ui-sparkgauge-D6cG2rb8.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-B9sVdLfh.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-BbGJ75_9.cjs +0 -1
- package/dist/vue-ui-stackbar-CRbcnnwn.cjs +0 -6
- package/dist/vue-ui-strip-plot-oZBXDxc-.cjs +0 -1
- package/dist/vue-ui-thermometer-E0mrvP4G.cjs +0 -1
- package/dist/vue-ui-tiremarks-C15sglnJ.cjs +0 -1
- package/dist/vue-ui-vertical-bar-DucujxOR.cjs +0 -4
- package/dist/vue-ui-waffle-DhroAZB3.cjs +0 -1
- package/dist/vue-ui-wheel-Bd87HcGT.cjs +0 -1
- package/dist/vue-ui-xy-BHzOpYm9.cjs +0 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { onMounted as F, ref as S, computed as R, openBlock as s, createElementBlock as a, normalizeStyle as l, createElementVNode as e, toDisplayString as k, createCommentVNode as r, normalizeClass as w, withKeys as z, createTextVNode as M, unref as n, pushScopeId as I, popScopeId as K, createStaticVNode as _ } from "vue";
|
|
2
|
-
import { u as E, o as O, e as D, X as c, w as m } from "./index-
|
|
3
|
-
import { u as L } from "./useNestedProp-
|
|
2
|
+
import { u as E, o as O, e as D, X as c, w as m } from "./index-BiuHBtkZ.js";
|
|
3
|
+
import { u as L } from "./useNestedProp-Ck5_RzLu.js";
|
|
4
4
|
import { _ as T } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const v = ($) => (I("data-v-3e41118a"), $ = $(), K(), $), P = {
|
|
6
6
|
key: 0,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { computed as u, ref as m, watch as B, onMounted as
|
|
2
|
-
import { u as H, c as J, t as K, o as Y, e as ee, v as y, U as te, X as ae, s as z, Q as
|
|
3
|
-
import { u as
|
|
4
|
-
import M from "./BaseIcon-
|
|
5
|
-
import ne from "./vue-ui-skeleton-
|
|
1
|
+
import { computed as u, ref as m, watch as B, onMounted as Q, openBlock as s, createElementBlock as i, normalizeStyle as R, createBlock as C, unref as c, createElementVNode as k, createCommentVNode as v, toDisplayString as V } from "vue";
|
|
2
|
+
import { u as H, c as J, t as K, o as Y, e as ee, v as y, U as te, X as ae, s as z, Q as D, f as E, i as le } from "./index-BiuHBtkZ.js";
|
|
3
|
+
import { u as G } from "./useNestedProp-Ck5_RzLu.js";
|
|
4
|
+
import M from "./BaseIcon-BysUnfCR.js";
|
|
5
|
+
import ne from "./vue-ui-skeleton-Du4zw-c1.js";
|
|
6
6
|
import { _ as oe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
const se = ["id"], ue = ["xmlns", "viewBox"], re = ["id"], ie = ["stop-color"], de = ["stop-color"], ve = { key: 0 }, ce = ["d", "fill"], ye = ["d", "fill"], he = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], fe = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], pe = ["height", "width", "x"], ge = { style: { width: "100%" } }, me = ["x", "y", "fill", "font-size", "font-weight"], ke = ["stroke", "cx", "cy", "fill"], _e = ["x", "y", "font-size", "fill", "font-weight"], be = {
|
|
8
8
|
__name: "vue-ui-spark-trend",
|
|
@@ -20,18 +20,18 @@ const se = ["id"], ue = ["xmlns", "viewBox"], re = ["id"], ie = ["stop-color"],
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
|
-
setup(
|
|
24
|
-
const n =
|
|
23
|
+
setup(O) {
|
|
24
|
+
const n = O, { vue_ui_spark_trend: U } = H(), q = u(() => !!n.dataset && n.dataset.length), _ = m(J()), e = u({
|
|
25
25
|
get: () => S(),
|
|
26
26
|
set: (t) => t
|
|
27
27
|
});
|
|
28
28
|
function S() {
|
|
29
|
-
const t =
|
|
29
|
+
const t = G({
|
|
30
30
|
userConfig: n.config,
|
|
31
|
-
defaultConfig:
|
|
31
|
+
defaultConfig: U
|
|
32
32
|
});
|
|
33
33
|
return t.theme ? {
|
|
34
|
-
...
|
|
34
|
+
...G({
|
|
35
35
|
userConfig: K.vue_ui_spark_trend[t.theme] || n.config,
|
|
36
36
|
defaultConfig: t
|
|
37
37
|
})
|
|
@@ -46,7 +46,7 @@ const se = ["id"], ue = ["xmlns", "viewBox"], re = ["id"], ie = ["stop-color"],
|
|
|
46
46
|
return t.map((l) => y(l));
|
|
47
47
|
}
|
|
48
48
|
const p = m(n.dataset.map((t) => e.value.style.animation.show || [void 0, 1 / 0, -1 / 0, null, NaN].includes(t) ? null : t)), g = m(!1), N = m(null);
|
|
49
|
-
|
|
49
|
+
Q(() => {
|
|
50
50
|
I();
|
|
51
51
|
let l = 1e3 / e.value.style.animation.animationFrames, d = performance.now();
|
|
52
52
|
if (e.value.style.animation.show && e.value.style.animation.animationFrames && n.dataset.length > 1) {
|
|
@@ -85,29 +85,29 @@ const se = ["id"], ue = ["xmlns", "viewBox"], re = ["id"], ie = ["stop-color"],
|
|
|
85
85
|
}), b = u(() => {
|
|
86
86
|
const t = $.value.min >= 0 ? 0 : $.value.min;
|
|
87
87
|
return Math.abs(t);
|
|
88
|
-
}),
|
|
88
|
+
}), P = u(() => $.value.max + b.value);
|
|
89
89
|
function F(t) {
|
|
90
|
-
return t /
|
|
90
|
+
return t / P.value;
|
|
91
91
|
}
|
|
92
|
-
const
|
|
92
|
+
const W = u(() => n.dataset.length), a = u(() => p.value.map((t, l) => {
|
|
93
93
|
const d = isNaN(t) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t) ? 0 : t || 0;
|
|
94
94
|
return {
|
|
95
95
|
value: y(t),
|
|
96
96
|
absoluteValue: y(d),
|
|
97
97
|
plotValue: y(d + b.value),
|
|
98
98
|
toMax: F(d + b.value),
|
|
99
|
-
x: h.value.left + y(l * (h.value.width / (
|
|
99
|
+
x: h.value.left + y(l * (h.value.width / (W.value - 1))) - e.value.style.padding.right,
|
|
100
100
|
y: h.value.bottom - y(h.value.height * F(d + b.value))
|
|
101
101
|
};
|
|
102
102
|
})), x = u(() => {
|
|
103
103
|
const t = L(n.dataset);
|
|
104
104
|
return e.value.style.trendLabel.trendType === "global" ? te(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;
|
|
105
|
-
}), w = u(() => g.value || x.value === 0 ? "neutral" : x.value > 0 ? "positive" : "negative"), r = u(() => e.value.style.arrow.colors[w.value]),
|
|
105
|
+
}), w = u(() => g.value || x.value === 0 ? "neutral" : x.value > 0 ? "positive" : "negative"), r = u(() => e.value.style.arrow.colors[w.value]), X = u(() => {
|
|
106
106
|
const t = { x: a.value[0].x, y: o.value.height - 6 }, l = { x: a.value[a.value.length - 1].x, y: o.value.height - 6 }, d = [];
|
|
107
107
|
return a.value.forEach((f) => {
|
|
108
108
|
d.push(`${f.x},${f.y} `);
|
|
109
109
|
}), [t.x, t.y, ...d, l.x, l.y].toString();
|
|
110
|
-
}),
|
|
110
|
+
}), Z = u(() => {
|
|
111
111
|
let t = [];
|
|
112
112
|
return a.value.forEach((l) => {
|
|
113
113
|
t.push(`${l.x},${l.y} `);
|
|
@@ -116,13 +116,13 @@ const se = ["id"], ue = ["xmlns", "viewBox"], re = ["id"], ie = ["stop-color"],
|
|
|
116
116
|
return (t, l) => (s(), i("div", {
|
|
117
117
|
class: "vue-ui-spark-trend",
|
|
118
118
|
id: _.value,
|
|
119
|
-
style:
|
|
119
|
+
style: R(`width:100%;font-family:${e.value.style.fontFamily};background:${e.value.style.backgroundColor}`)
|
|
120
120
|
}, [
|
|
121
|
-
|
|
121
|
+
q.value ? (s(), i("svg", {
|
|
122
122
|
key: 1,
|
|
123
123
|
xmlns: c(ae),
|
|
124
124
|
viewBox: `0 0 ${o.value.width} ${o.value.height}`,
|
|
125
|
-
style:
|
|
125
|
+
style: "width:100%;background:transparent;overflow:visible"
|
|
126
126
|
}, [
|
|
127
127
|
k("defs", null, [
|
|
128
128
|
k("linearGradient", {
|
|
@@ -145,19 +145,19 @@ const se = ["id"], ue = ["xmlns", "viewBox"], re = ["id"], ie = ["stop-color"],
|
|
|
145
145
|
e.value.style.area.show && a.value[0] ? (s(), i("g", ve, [
|
|
146
146
|
e.value.style.line.smooth ? (s(), i("path", {
|
|
147
147
|
key: 0,
|
|
148
|
-
d: `M ${a.value[0].x},${h.value.bottom} ${c(
|
|
148
|
+
d: `M ${a.value[0].x},${h.value.bottom} ${c(D)(a.value)} L ${a.value.at(-1).x},${h.value.bottom} Z`,
|
|
149
149
|
fill: e.value.style.area.useGradient ? `url(#pill_gradient_${_.value})` : c(z)(e.value.style.line.useColorTrend ? r.value : e.value.style.line.stroke, e.value.style.area.opacity),
|
|
150
150
|
stroke: "none"
|
|
151
151
|
}, null, 8, ce)) : (s(), i("path", {
|
|
152
152
|
key: 1,
|
|
153
|
-
d: `M${
|
|
153
|
+
d: `M${X.value}Z`,
|
|
154
154
|
fill: e.value.style.area.useGradient ? `url(#pill_gradient_${_.value})` : c(z)(e.value.style.line.useColorTrend ? r.value : e.value.style.line.stroke, e.value.style.area.opacity),
|
|
155
155
|
stroke: "none"
|
|
156
156
|
}, null, 8, ye))
|
|
157
157
|
])) : v("", !0),
|
|
158
158
|
e.value.style.line.smooth && a.value.length ? (s(), i("path", {
|
|
159
159
|
key: 1,
|
|
160
|
-
d: `M ${c(
|
|
160
|
+
d: `M ${c(D)(a.value)}`,
|
|
161
161
|
stroke: e.value.style.line.useColorTrend ? r.value : e.value.style.line.stroke,
|
|
162
162
|
fill: "none",
|
|
163
163
|
"stroke-width": e.value.style.line.strokeWidth,
|
|
@@ -166,7 +166,7 @@ const se = ["id"], ue = ["xmlns", "viewBox"], re = ["id"], ie = ["stop-color"],
|
|
|
166
166
|
}, null, 8, he)) : v("", !0),
|
|
167
167
|
!e.value.style.line.smooth && a.value.length ? (s(), i("path", {
|
|
168
168
|
key: 2,
|
|
169
|
-
d:
|
|
169
|
+
d: Z.value,
|
|
170
170
|
stroke: e.value.style.line.useColorTrend ? r.value : e.value.style.line.stroke,
|
|
171
171
|
fill: "none",
|
|
172
172
|
"stroke-width": e.value.style.line.strokeWidth,
|
|
@@ -209,7 +209,7 @@ const se = ["id"], ue = ["xmlns", "viewBox"], re = ["id"], ie = ["stop-color"],
|
|
|
209
209
|
fill: e.value.style.trendLabel.useColorTrend ? r.value : e.value.style.trendLabel.color,
|
|
210
210
|
"font-size": e.value.style.trendLabel.fontSize,
|
|
211
211
|
"font-weight": e.value.style.trendLabel.bold ? "bold" : "normal"
|
|
212
|
-
},
|
|
212
|
+
}, V(c(E)({
|
|
213
213
|
p: x.value > 0 ? "+" : "",
|
|
214
214
|
v: x.value,
|
|
215
215
|
s: "%",
|
|
@@ -232,10 +232,10 @@ const se = ["id"], ue = ["xmlns", "viewBox"], re = ["id"], ie = ["stop-color"],
|
|
|
232
232
|
"font-size": e.value.style.dataLabel.fontSize,
|
|
233
233
|
fill: e.value.style.dataLabel.useColorTrend ? r.value : e.value.style.dataLabel.color,
|
|
234
234
|
"font-weight": e.value.style.dataLabel.bold ? "bold" : "normal"
|
|
235
|
-
},
|
|
235
|
+
}, V(c(le)(
|
|
236
236
|
e.value.style.dataLabel.formatter,
|
|
237
237
|
a.value.at(-1).value,
|
|
238
|
-
c(
|
|
238
|
+
c(E)({
|
|
239
239
|
p: e.value.style.dataLabel.prefix,
|
|
240
240
|
v: a.value.at(-1).value,
|
|
241
241
|
s: e.value.style.dataLabel.suffix,
|
|
@@ -243,7 +243,7 @@ const se = ["id"], ue = ["xmlns", "viewBox"], re = ["id"], ie = ["stop-color"],
|
|
|
243
243
|
}),
|
|
244
244
|
{ datapoint: a.value.at(-1) }
|
|
245
245
|
)), 9, _e)) : v("", !0)
|
|
246
|
-
],
|
|
246
|
+
], 8, ue)) : (s(), C(ne, {
|
|
247
247
|
key: 0,
|
|
248
248
|
config: {
|
|
249
249
|
type: "sparkline",
|
|
@@ -257,7 +257,7 @@ const se = ["id"], ue = ["xmlns", "viewBox"], re = ["id"], ie = ["stop-color"],
|
|
|
257
257
|
}, null, 8, ["config"]))
|
|
258
258
|
], 12, se));
|
|
259
259
|
}
|
|
260
|
-
}, Te = /* @__PURE__ */ oe(be, [["__scopeId", "data-v-
|
|
260
|
+
}, Te = /* @__PURE__ */ oe(be, [["__scopeId", "data-v-cb10e52f"]]);
|
|
261
261
|
export {
|
|
262
262
|
Te as default
|
|
263
263
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-D-vy9N1v.cjs"),V=require("./useNestedProp-B9yDavuy.cjs"),N=require("./BaseIcon-BBQHz_Sf.cjs"),F=require("./vue-ui-skeleton-DJhwv2oY.cjs"),j=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),q=["id"],A=["xmlns","viewBox"],O=["id"],D=["stop-color"],P=["stop-color"],G={key:0},U=["d","fill"],W=["d","fill"],Z=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],H=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],R=["height","width","x"],X={style:{width:"100%"}},J=["x","y","fill","font-size","font-weight"],K=["stroke","cx","cy","fill"],Q=["x","y","font-size","fill","font-weight"],Y={__name:"vue-ui-spark-trend",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(E){const u=E,{vue_ui_spark_trend:$}=n.useConfig(),T=e.computed(()=>!!u.dataset&&u.dataset.length),p=e.ref(n.createUid()),t=e.computed({get:()=>x(),set:l=>l});function x(){const l=V.useNestedProp({userConfig:u.config,defaultConfig:$});return l.theme?{...V.useNestedProp({userConfig:n.themes.vue_ui_spark_trend[l.theme]||u.config,defaultConfig:l})}:l}e.watch(()=>u.config,l=>{t.value=x(),C()},{deep:!0}),e.watch(()=>u.dataset,l=>{v.value=u.dataset.map(o=>[void 0,1/0,-1/0,null,NaN].includes(o)?null:o)},{deep:!0});function k(l){return l.map(o=>n.checkNaN(o))}const v=e.ref(u.dataset.map(l=>t.value.style.animation.show||[void 0,1/0,-1/0,null,NaN].includes(l)?null:l)),h=e.ref(!1),g=e.ref(null);e.onMounted(()=>{C();let o=1e3/t.value.style.animation.animationFrames,i=performance.now();if(t.value.style.animation.show&&t.value.style.animation.animationFrames&&u.dataset.length>1){let b=function(){h.value=!0;let B=performance.now(),L=B-i;L>o?(i=B-L%o,d<u.dataset.length?(v.value.push(u.dataset[d]),d+=1,g.value=requestAnimationFrame(b)):(cancelAnimationFrame(g.value),v.value=k(u.dataset),h.value=!1)):g.value=requestAnimationFrame(b)};v.value=[];let d=0;b()}});function C(){n.objectIsEmpty(u.dataset)&&n.error({componentName:"VueUiSparkTrend",type:"dataset"})}const r=e.ref({height:80,width:300}),c=e.computed(()=>({top:t.value.style.padding.top,left:t.value.style.padding.left,right:r.value.width-t.value.style.padding.right,bottom:r.value.height-t.value.style.padding.bottom,height:r.value.height-(t.value.style.padding.top+t.value.style.padding.bottom)-(t.value.style.dataLabel.show?t.value.style.dataLabel.fontSize:0),width:r.value.width-(t.value.style.padding.left+t.value.style.padding.right)})),_=e.computed(()=>{const l=k(u.dataset);return{max:Math.max(...l.map(o=>n.checkNaN(o))),min:Math.min(...l.map(o=>n.checkNaN(o)))}}),y=e.computed(()=>{const l=_.value.min>=0?0:_.value.min;return Math.abs(l)}),S=e.computed(()=>_.value.max+y.value);function w(l){return l/S.value}const z=e.computed(()=>u.dataset.length),a=e.computed(()=>v.value.map((l,o)=>{const i=isNaN(l)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l)?0:l||0;return{value:n.checkNaN(l),absoluteValue:n.checkNaN(i),plotValue:n.checkNaN(i+y.value),toMax:w(i+y.value),x:c.value.left+n.checkNaN(o*(c.value.width/(z.value-1)))-t.value.style.padding.right,y:c.value.bottom-n.checkNaN(c.value.height*w(i+y.value))}})),f=e.computed(()=>{const l=k(u.dataset);return t.value.style.trendLabel.trendType==="global"?n.calcTrend(l):t.value.style.trendLabel.trendType==="n-1"&&l.length>1?(l.at(-1)/l.at(-2)-1)*100:t.value.style.trendLabel.trendType==="lastToFirst"?(l.at(-1)/l[0]-1)*100:0}),m=e.computed(()=>h.value||f.value===0?"neutral":f.value>0?"positive":"negative"),s=e.computed(()=>t.value.style.arrow.colors[m.value]),M=e.computed(()=>{const l={x:a.value[0].x,y:r.value.height-6},o={x:a.value[a.value.length-1].x,y:r.value.height-6},i=[];return a.value.forEach(d=>{i.push(`${d.x},${d.y} `)}),[l.x,l.y,...i,o.x,o.y].toString()}),I=e.computed(()=>{let l=[];return a.value.forEach(o=>{l.push(`${o.x},${o.y} `)}),`M ${l.toString()}`});return(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-trend",id:p.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};background:${t.value.style.backgroundColor}`)},[T.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:"width:100%;background:transparent;overflow:visible"},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"0%",y2:"100%",id:`pill_gradient_${p.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity)},null,8,D),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,P)],8,O)]),t.value.style.area.show&&a.value[0]?(e.openBlock(),e.createElementBlock("g",G,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${a.value[0].x},${c.value.bottom} ${e.unref(n.createSmoothPath)(a.value)} L ${a.value.at(-1).x},${c.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${p.value})`:e.unref(n.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity),stroke:"none"},null,8,U)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${M.value}Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${p.value})`:e.unref(n.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity),stroke:"none"},null,8,W))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&a.value.length?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${e.unref(n.createSmoothPath)(a.value)}`,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,Z)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&a.value.length?(e.openBlock(),e.createElementBlock("path",{key:2,d:I.value,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,H)):e.createCommentVNode("",!0),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("foreignObject",{key:3,height:r.value.height/2,width:r.value.height/2,x:r.value.height/5,y:8},[e.createElementVNode("div",X,[m.value==="positive"?(e.openBlock(),e.createBlock(N.default,{key:0,stroke:s.value,name:"arrowTop",size:r.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),m.value==="negative"?(e.openBlock(),e.createBlock(N.default,{key:1,stroke:s.value,name:"arrowBottom",size:r.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),m.value==="neutral"?(e.openBlock(),e.createBlock(N.default,{key:2,stroke:s.value,name:"arrowRight",size:r.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0)])],8,R)),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:4,x:r.value.height/2-r.value.height/20,y:c.value.bottom,"text-anchor":"middle",fill:t.value.style.trendLabel.useColorTrend?s.value:t.value.style.trendLabel.color,"font-size":t.value.style.trendLabel.fontSize,"font-weight":t.value.style.trendLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(n.dataLabel)({p:f.value>0?"+":"",v:f.value,s:"%",r:t.value.style.trendLabel.rounding})),9,J)),a.value.length&&a.value.at(-1).x!==void 0?(e.openBlock(),e.createElementBlock("circle",{key:5,stroke:t.value.style.backgroundColor,"stroke-width":2,cx:a.value.at(-1).x,cy:a.value.at(-1).y,r:4,fill:s.value},null,8,K)):e.createCommentVNode("",!0),a.value.length&&a.value.at(-1).x!==void 0&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:6,"text-anchor":"middle",x:a.value.at(-1).x,y:a.value.at(-1).y-t.value.style.dataLabel.fontSize/1.5,"font-size":t.value.style.dataLabel.fontSize,fill:t.value.style.dataLabel.useColorTrend?s.value:t.value.style.dataLabel.color,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.dataLabel.formatter,a.value.at(-1).value,e.unref(n.dataLabel)({p:t.value.style.dataLabel.prefix,v:a.value.at(-1).value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:a.value.at(-1)})),9,Q)):e.createCommentVNode("",!0)],8,A)):(e.openBlock(),e.createBlock(F.default,{key:0,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,q))}},ee=j._export_sfc(Y,[["__scopeId","data-v-cb10e52f"]]);exports.default=ee;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-D-vy9N1v.cjs"),C=require("./useNestedProp-B9yDavuy.cjs"),V=require("./vue-ui-skeleton-DJhwv2oY.cjs"),D=["onClick"],$={key:1},z=["xmlns","viewBox"],L=["id"],P=["stop-color"],A=["stop-color"],F=["height","width","fill","rx"],O=["height","width","fill","rx"],I=["height","width","fill","rx"],T={__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(){s+=a/l,s<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 s=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 i=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,s)=>(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&&s!==p.dataset.length-1?"margin-bottom:6px":""}`),onClick:()=>E(a,s)},[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:s}),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:s})}}))),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:s})),5)):e.createCommentVNode("",!0),t.value.style.layout.showTargetValue?(e.openBlock(),e.createElementBlock("span",$,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:s})),1)):e.createCommentVNode("",!0)],4)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${i.value.width} ${i.value.height}`,width:"100%"},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkbar_gradient_${s}_${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,P),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,A)],8,L)]),e.createElementVNode("rect",{height:i.value.height,width:i.value.width,x:0,y:0,fill:e.unref(o.setOpacity)(t.value.style.gutter.backgroundColor,t.value.style.gutter.opacity),rx:i.value.height/2},null,8,F),e.createElementVNode("rect",{height:i.value.height,width:i.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.underlayerColor,rx:i.value.height/2},null,8,O),e.createElementVNode("rect",{height:i.value.height,width:i.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.show?`url(#sparkbar_gradient_${s}_${y.value})`:a.color,rx:i.value.height/2},null,8,I)],8,z))],12,D)):e.createCommentVNode("",!0)],64))),256)),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(V.default,{key:2,config:{type:"sparkbar",style:{backgroundColor:t.value.style.backgroundColor,sparkbar:{color:"#CCCCCC"}}}},null,8,["config"]))],4))}};exports.default=T;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { computed as g, ref as x, watch as P, onMounted as q, nextTick as H, openBlock as r, createElementBlock as v, normalizeStyle as p, unref as s, renderSlot as z, normalizeProps as L, mergeProps as X, createCommentVNode as d, createElementVNode as c, toDisplayString as
|
|
2
|
-
import { u as Q, c as Y, t as Z, a as ee, p as k, b as te, o as le, e as
|
|
3
|
-
import { u as E } from "./useNestedProp-
|
|
4
|
-
import ne from "./vue-ui-skeleton-
|
|
5
|
-
const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"], de = ["stop-color"], pe = ["stop-color"],
|
|
1
|
+
import { computed as g, ref as x, watch as P, onMounted as q, nextTick as H, openBlock as r, createElementBlock as v, normalizeStyle as p, unref as s, renderSlot as z, normalizeProps as L, mergeProps as X, createCommentVNode as d, createElementVNode as c, toDisplayString as y, Fragment as O, renderList as R, guardReactiveProps as J, createBlock as K } from "vue";
|
|
2
|
+
import { u as Q, c as Y, t as Z, a as ee, p as k, b as te, o as le, e as T, g as ae, d as oe, s as _, i as w, f as C, X as se, w as ue } from "./index-BiuHBtkZ.js";
|
|
3
|
+
import { u as E } from "./useNestedProp-Ck5_RzLu.js";
|
|
4
|
+
import ne from "./vue-ui-skeleton-Du4zw-c1.js";
|
|
5
|
+
const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"], de = ["stop-color"], pe = ["stop-color"], ye = ["height", "width", "fill", "rx"], fe = ["height", "width", "fill", "rx"], me = ["height", "width", "fill", "rx"], we = {
|
|
6
6
|
__name: "vue-ui-sparkbar",
|
|
7
7
|
props: {
|
|
8
8
|
config: {
|
|
@@ -22,12 +22,12 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
22
22
|
*/
|
|
23
23
|
backgroundOpacity: {
|
|
24
24
|
type: Number,
|
|
25
|
-
default:
|
|
25
|
+
default: null
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
emits: ["selectDatapoint"],
|
|
29
|
-
setup(
|
|
30
|
-
const a =
|
|
29
|
+
setup(b, { emit: V }) {
|
|
30
|
+
const a = b, { vue_ui_sparkbar: B } = Q(), $ = g(() => !!a.dataset && a.dataset.length), S = x(Y()), e = g({
|
|
31
31
|
get: () => A(),
|
|
32
32
|
set: (t) => t
|
|
33
33
|
});
|
|
@@ -47,13 +47,13 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
47
47
|
P(() => a.config, (t) => {
|
|
48
48
|
e.value = A();
|
|
49
49
|
}, { deep: !0 });
|
|
50
|
-
const M = g(() => te(e.value.customPalette)),
|
|
50
|
+
const M = g(() => te(e.value.customPalette)), f = x(a.dataset.map((t) => ({
|
|
51
51
|
...t,
|
|
52
52
|
value: e.value.style.animation.show ? 0 : t.value || 0,
|
|
53
53
|
formatter: t.formatter || null
|
|
54
54
|
}))), D = x(null);
|
|
55
55
|
q(async () => {
|
|
56
|
-
le(a.dataset) &&
|
|
56
|
+
le(a.dataset) && T({
|
|
57
57
|
componentName: "VueUiSparkbar",
|
|
58
58
|
type: "dataset"
|
|
59
59
|
}), F();
|
|
@@ -61,10 +61,10 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
61
61
|
function F() {
|
|
62
62
|
if (e.value.style.animation.show) {
|
|
63
63
|
let I = function() {
|
|
64
|
-
i += l / t, i < l ? (
|
|
64
|
+
i += l / t, i < l ? (f.value = f.value.map((u, h) => ({
|
|
65
65
|
...u,
|
|
66
66
|
value: u.value += o[h]
|
|
67
|
-
})), D.value = requestAnimationFrame(I)) :
|
|
67
|
+
})), D.value = requestAnimationFrame(I)) : f.value = a.dataset.map((u) => ({
|
|
68
68
|
...u,
|
|
69
69
|
value: u.value || 0,
|
|
70
70
|
formatter: u.formatter || null
|
|
@@ -76,7 +76,7 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
P(() => a.dataset, async (t) => {
|
|
79
|
-
cancelAnimationFrame(D.value),
|
|
79
|
+
cancelAnimationFrame(D.value), f.value = a.dataset.map((o) => ({
|
|
80
80
|
...o,
|
|
81
81
|
value: e.value.style.animation.show ? 0 : o.value || 0,
|
|
82
82
|
formatter: o.formatter || null
|
|
@@ -90,14 +90,14 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
90
90
|
datasetObject: t,
|
|
91
91
|
requiredAttributes: ["name", "value"]
|
|
92
92
|
}).forEach((l) => {
|
|
93
|
-
|
|
93
|
+
T({
|
|
94
94
|
componentName: "VueUiSparkbar",
|
|
95
95
|
type: "datasetSerieAttribute",
|
|
96
96
|
property: l,
|
|
97
97
|
index: o
|
|
98
98
|
});
|
|
99
99
|
});
|
|
100
|
-
}),
|
|
100
|
+
}), f.value.map((t, o) => ({
|
|
101
101
|
...t,
|
|
102
102
|
value: t.value || 0,
|
|
103
103
|
color: oe(t.color) || M.value[o] || k[o] || k[o % k.length]
|
|
@@ -118,7 +118,7 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
118
118
|
style: p({
|
|
119
119
|
width: "100%",
|
|
120
120
|
fontFamily: e.value.style.fontFamily,
|
|
121
|
-
background: s(
|
|
121
|
+
background: a.backgroundOpacity !== null ? s(_)(e.value.style.backgroundColor, a.backgroundOpacity) : e.value.style.backgroundColor
|
|
122
122
|
})
|
|
123
123
|
}, [
|
|
124
124
|
t.$slots.title ? z(t.$slots, "title", L(X({ key: 0 }, { title: { ...t.title, title: e.value.style.title.text, subtitle: e.value.style.title.subtitle.text } }))) : d("", !0),
|
|
@@ -138,7 +138,7 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
138
138
|
color: e.value.style.title.color,
|
|
139
139
|
fontWeight: e.value.style.title.bold ? "bold" : "normal"
|
|
140
140
|
})
|
|
141
|
-
},
|
|
141
|
+
}, y(e.value.style.title.text), 5),
|
|
142
142
|
e.value.style.title.subtitle.text ? (r(), v("div", {
|
|
143
143
|
key: 0,
|
|
144
144
|
class: "vue-ui-sparkbar-subtitle",
|
|
@@ -147,12 +147,12 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
147
147
|
color: e.value.style.title.subtitle.color,
|
|
148
148
|
fontWeight: e.value.style.title.subtitle.bold ? "bold" : "normal"
|
|
149
149
|
})
|
|
150
|
-
},
|
|
150
|
+
}, y(e.value.style.title.subtitle.text), 5)) : d("", !0)
|
|
151
151
|
], 4)) : d("", !0),
|
|
152
|
-
(r(!0), v(
|
|
152
|
+
(r(!0), v(O, null, R(j.value, (l, i) => (r(), v(O, null, [
|
|
153
153
|
$.value ? (r(), v("div", {
|
|
154
154
|
key: 0,
|
|
155
|
-
style: p(`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;${
|
|
155
|
+
style: p(`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;${b.dataset.length > 0 && i !== b.dataset.length - 1 ? "margin-bottom:6px" : ""}`),
|
|
156
156
|
onClick: () => W(l, i)
|
|
157
157
|
}, [
|
|
158
158
|
z(t.$slots, "data-label", L(J({ bar: {
|
|
@@ -191,11 +191,11 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
191
191
|
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"
|
|
192
192
|
})
|
|
193
193
|
}, [
|
|
194
|
-
c("span", null,
|
|
194
|
+
c("span", null, y(l.name), 1),
|
|
195
195
|
e.value.style.labels.value.show ? (r(), v("span", {
|
|
196
196
|
key: 0,
|
|
197
197
|
style: p(`font-weight:${e.value.style.labels.value.bold ? "bold" : "normal"}`)
|
|
198
|
-
}, ": " +
|
|
198
|
+
}, ": " + y(s(w)(
|
|
199
199
|
l.formatter,
|
|
200
200
|
l.value,
|
|
201
201
|
s(C)({
|
|
@@ -206,7 +206,7 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
206
206
|
}),
|
|
207
207
|
{ datapoint: l, seriesIndex: i }
|
|
208
208
|
)), 5)) : d("", !0),
|
|
209
|
-
e.value.style.layout.showTargetValue ? (r(), v("span", re,
|
|
209
|
+
e.value.style.layout.showTargetValue ? (r(), v("span", re, y(" " + e.value.style.layout.targetValueText) + " " + y(s(w)(
|
|
210
210
|
l.formatter,
|
|
211
211
|
m(l),
|
|
212
212
|
s(C)({
|
|
@@ -233,7 +233,7 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
233
233
|
}, [
|
|
234
234
|
c("stop", {
|
|
235
235
|
offset: "0%",
|
|
236
|
-
"stop-color": s(
|
|
236
|
+
"stop-color": s(_)(s(ue)(l.color, 0.03), 100 - e.value.style.bar.gradient.intensity)
|
|
237
237
|
}, null, 8, de),
|
|
238
238
|
c("stop", {
|
|
239
239
|
offset: "100%",
|
|
@@ -246,9 +246,9 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
246
246
|
width: n.value.width,
|
|
247
247
|
x: 0,
|
|
248
248
|
y: 0,
|
|
249
|
-
fill: s(
|
|
249
|
+
fill: s(_)(e.value.style.gutter.backgroundColor, e.value.style.gutter.opacity),
|
|
250
250
|
rx: n.value.height / 2
|
|
251
|
-
}, null, 8,
|
|
251
|
+
}, null, 8, ye),
|
|
252
252
|
c("rect", {
|
|
253
253
|
height: n.value.height,
|
|
254
254
|
width: n.value.width * N(l),
|
|
@@ -256,7 +256,7 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
256
256
|
y: 0,
|
|
257
257
|
fill: e.value.style.bar.gradient.underlayerColor,
|
|
258
258
|
rx: n.value.height / 2
|
|
259
|
-
}, null, 8,
|
|
259
|
+
}, null, 8, fe),
|
|
260
260
|
c("rect", {
|
|
261
261
|
height: n.value.height,
|
|
262
262
|
width: n.value.width * N(l),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-D-vy9N1v.cjs"),b=require("./useNestedProp-B9yDavuy.cjs"),w=require("./vue-ui-skeleton-DJhwv2oY.cjs"),$=["xmlns","viewBox"],L=["id"],S=["stop-color"],B=["stop-color"],E=["d","stroke","stroke-linecap"],M=["d","stroke","stroke-linecap","stroke-dashoffset"],z=["x","y","font-size","fill","font-weight"],A={__name:"vue-ui-sparkgauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(x){const o=x,{vue_ui_sparkgauge:C}=n.useConfig(),c=e.computed(()=>!!o.dataset&&Object.keys(o.dataset).length);e.onMounted(()=>{v()});function v(){n.objectIsEmpty(o.dataset)?n.error({componentName:"VueUiSparkgauge",type:"dataset"}):n.getMissingDatasetAttributes({datasetObject:o.dataset,requiredAttributes:["value","min","max"]}).forEach(a=>{n.error({componentName:"VueUiSparkgauge",type:"datasetAttribute",property:a})})}const d=e.ref(n.createUid()),t=e.computed({get:()=>m(),set:a=>a});function m(){const a=b.useNestedProp({userConfig:o.config,defaultConfig:C});return a.theme?{...b.useNestedProp({userConfig:n.themes.vue_ui_sparkgauge[a.theme]||o.config,defaultConfig:a})}:a}e.watch(()=>o.config,a=>{t.value=m(),v()},{deep:!0});const u=e.computed(()=>({height:t.value.style.height,width:128,base:t.value.style.basePosition})),s=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?s.value.min:o.dataset.value);e.watch(()=>o.dataset.value,()=>{y(o.dataset.value||0)});const f=e.computed(()=>l.value>s.value.max?s.value.max:l.value<s.value.min?s.value.min:l.value),p=e.computed(()=>s.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-s.value.min)/s.value.diff:(Math.abs(s.value.min)-Math.abs(f.value))/s.value.diff),k=e.computed(()=>n.interpolateColorHex(t.value.style.colors.min,t.value.style.colors.max,s.value.min,s.value.max,l.value)),h=e.computed(()=>t.value.style.dataLabel.autoColor?k.value:t.value.style.dataLabel.color),_=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(n.XMLNS),viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:"overflow: visible; background:transparent; 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,S),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.max},null,8,B)],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,E),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_${d.value})`:_.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,M)):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(n.applyDataLabel)(t.value.style.dataLabel.formatter,e.unref(n.checkNaN)(l.value),e.unref(n.dataLabel)({p:t.value.style.dataLabel.prefix,v:e.unref(n.checkNaN)(l.value),s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:e.unref(n.checkNaN)(l.value),color:h.value})),9,z)],8,$)):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(w.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)],4))}};exports.default=A;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { computed as s, onMounted as M, ref as A, watch as N, openBlock as i, createElementBlock as c, normalizeStyle as
|
|
2
|
-
import { u as G, o as I, e as S, g as U, c as q, t as P, M as R, X as T, i as X, v as
|
|
3
|
-
import { u as z } from "./useNestedProp-
|
|
4
|
-
import Y from "./vue-ui-skeleton-
|
|
1
|
+
import { computed as s, onMounted as M, ref as A, watch as N, openBlock as i, createElementBlock as c, normalizeStyle as m, toDisplayString as y, createCommentVNode as d, unref as r, createElementVNode as v, normalizeClass as D, createBlock as E } from "vue";
|
|
2
|
+
import { u as G, o as I, e as S, g as U, c as q, t as P, M as R, X as T, i as X, v as p, f as H } from "./index-BiuHBtkZ.js";
|
|
3
|
+
import { u as z } from "./useNestedProp-Ck5_RzLu.js";
|
|
4
|
+
import Y from "./vue-ui-skeleton-Du4zw-c1.js";
|
|
5
5
|
const J = ["xmlns", "viewBox"], K = ["id"], Q = ["stop-color"], V = ["stop-color"], W = ["d", "stroke", "stroke-linecap"], Z = ["d", "stroke", "stroke-linecap", "stroke-dashoffset"], ee = ["x", "y", "font-size", "fill", "font-weight"], se = {
|
|
6
6
|
__name: "vue-ui-sparkgauge",
|
|
7
7
|
props: {
|
|
@@ -19,7 +19,7 @@ const J = ["xmlns", "viewBox"], K = ["id"], Q = ["stop-color"], V = ["stop-color
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
setup(F) {
|
|
22
|
-
const l = F, { vue_ui_sparkgauge: O } = G(),
|
|
22
|
+
const l = F, { vue_ui_sparkgauge: O } = G(), g = s(() => !!l.dataset && Object.keys(l.dataset).length);
|
|
23
23
|
M(() => {
|
|
24
24
|
h();
|
|
25
25
|
});
|
|
@@ -82,20 +82,20 @@ const J = ["xmlns", "viewBox"], K = ["id"], Q = ["stop-color"], V = ["stop-color
|
|
|
82
82
|
}
|
|
83
83
|
n();
|
|
84
84
|
}
|
|
85
|
-
const
|
|
85
|
+
const f = s(() => l.dataset.title ?? ""), $ = s(() => a.value >= 0 ? (x.value - o.value.min) / o.value.diff : (Math.abs(o.value.min) - Math.abs(x.value)) / o.value.diff), w = s(() => R(e.value.style.colors.min, e.value.style.colors.max, o.value.min, o.value.max, a.value)), L = s(() => e.value.style.dataLabel.autoColor ? w.value : e.value.style.dataLabel.color), j = s(() => e.value.style.track.autoColor ? w.value : e.value.style.track.color);
|
|
86
86
|
return (t, n) => (i(), c("div", {
|
|
87
|
-
style:
|
|
87
|
+
style: m(`font-family:${e.value.style.fontFamily};width: 100%; background:${e.value.style.background}`)
|
|
88
88
|
}, [
|
|
89
|
-
e.value.style.title.show &&
|
|
89
|
+
e.value.style.title.show && f.value && e.value.style.title.position === "top" ? (i(), c("div", {
|
|
90
90
|
key: 0,
|
|
91
91
|
class: "vue-data-ui-sparkgauge-label",
|
|
92
|
-
style:
|
|
93
|
-
}, y(
|
|
94
|
-
|
|
92
|
+
style: m(`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}`)
|
|
93
|
+
}, y(f.value), 5)) : d("", !0),
|
|
94
|
+
g.value ? (i(), c("svg", {
|
|
95
95
|
key: 1,
|
|
96
96
|
xmlns: r(T),
|
|
97
97
|
viewBox: `0 0 ${u.value.width} ${u.value.height}`,
|
|
98
|
-
style:
|
|
98
|
+
style: "overflow: visible; background:transparent; width:100%;"
|
|
99
99
|
}, [
|
|
100
100
|
v("defs", null, [
|
|
101
101
|
v("linearGradient", {
|
|
@@ -132,8 +132,8 @@ const J = ["xmlns", "viewBox"], K = ["id"], Q = ["stop-color"], V = ["stop-color
|
|
|
132
132
|
"stroke-dasharray": 169.5,
|
|
133
133
|
"stroke-dashoffset": 169.5 - 169.5 * $.value,
|
|
134
134
|
class: D({ "vue-ui-sparkgauge-track": e.value.style.animation.show }),
|
|
135
|
-
style:
|
|
136
|
-
}, null, 14, Z)) :
|
|
135
|
+
style: m(e.value.style.animation.show ? `animation: vue-ui-sparkgauge-animation ${e.value.style.animation.speedMs}ms ease-in;` : "")
|
|
136
|
+
}, null, 14, Z)) : d("", !0),
|
|
137
137
|
v("text", {
|
|
138
138
|
"text-anchor": "middle",
|
|
139
139
|
x: u.value.width / 2,
|
|
@@ -143,17 +143,17 @@ const J = ["xmlns", "viewBox"], K = ["id"], Q = ["stop-color"], V = ["stop-color
|
|
|
143
143
|
"font-weight": e.value.style.dataLabel.bold ? "bold" : "normal"
|
|
144
144
|
}, y(r(X)(
|
|
145
145
|
e.value.style.dataLabel.formatter,
|
|
146
|
-
r(
|
|
146
|
+
r(p)(a.value),
|
|
147
147
|
r(H)({
|
|
148
148
|
p: e.value.style.dataLabel.prefix,
|
|
149
|
-
v: r(
|
|
149
|
+
v: r(p)(a.value),
|
|
150
150
|
s: e.value.style.dataLabel.suffix,
|
|
151
151
|
r: e.value.style.dataLabel.rounding
|
|
152
152
|
}),
|
|
153
|
-
{ datapoint: r(
|
|
153
|
+
{ datapoint: r(p)(a.value), color: L.value }
|
|
154
154
|
)), 9, ee)
|
|
155
|
-
],
|
|
156
|
-
|
|
155
|
+
], 8, J)) : d("", !0),
|
|
156
|
+
g.value ? d("", !0) : (i(), E(Y, {
|
|
157
157
|
key: 2,
|
|
158
158
|
config: {
|
|
159
159
|
type: "gauge",
|
|
@@ -165,11 +165,11 @@ const J = ["xmlns", "viewBox"], K = ["id"], Q = ["stop-color"], V = ["stop-color
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
}, null, 8, ["config"])),
|
|
168
|
-
e.value.style.title.show &&
|
|
168
|
+
e.value.style.title.show && f.value && e.value.style.title.position === "bottom" ? (i(), c("div", {
|
|
169
169
|
key: 3,
|
|
170
170
|
class: "vue-data-ui-sparkgauge-label",
|
|
171
|
-
style:
|
|
172
|
-
}, y(
|
|
171
|
+
style: m(`font-size:${e.value.style.title.fontSize}px;text-align:${e.value.style.title.textAlign};font-weight:${e.value.style.title.bold ? "bold" : "normal"};font-weight:${e.value.style.title.bold ? "bold" : "normal"};color:${e.value.style.title.color}`)
|
|
172
|
+
}, y(f.value), 5)) : d("", !0)
|
|
173
173
|
], 4));
|
|
174
174
|
}
|
|
175
175
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-D-vy9N1v.cjs"),_=require("./useNestedProp-B9yDavuy.cjs"),F=require("./Shape-COoEWeGM.cjs"),M=require("./vue-ui-skeleton-DJhwv2oY.cjs"),O=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A={key:0},H={key:1},q=["xmlns","viewBox"],I=["id"],U=["stop-color"],W=["stop-color"],j=["id"],P=["stop-color"],G=["stop-color"],T=["id"],X=["stop-color"],Y=["stop-color"],R={key:0},J=["x","y","height","width","fill","stroke","stroke-width","rx"],K={key:1},Q=["x","y","font-size","font-weight","fill"],Z=["x","y","font-size","fill"],ee=["x","y","font-size","fill"],te=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],le={__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=>({dca3ca72: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,g=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:g,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,g=c.value.centerY-s/2,m=c.value.left+(y/2+r*d),$=c.value.left+r*d,f=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,f):a.setOpacity(t.value.style.bars.colors.negative,f),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:f,proportion:l,stroke:V,textAnchor:D,trapX:$,unitWidth:d,width:p,x:m,y:g}})),n=e.ref(null);function L(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",A,"- "+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",H,"("+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.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,U),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.positive,l.intensity)},null,8,W)],8,I))),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,P),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.negative,l.intensity)},null,8,G)],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,X),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(l.color,l.intensity)},null,8,Y)],8,T))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",R,[(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,J))),256))])):(e.openBlock(),e.createElementBlock("g",K,[(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,Q))),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,Z)):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,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,[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(l,s)},null,40,te)]))),256))],8,q)):e.createCommentVNode("",!0),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M.default,{key:2,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},oe=O._export_sfc(le,[["__scopeId","data-v-da8fd5e0"]]);exports.default=oe;
|