vue-data-ui 2.3.9 → 2.3.10
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-CyqlT0ih.js → Arrow-BO8QA2_F.js} +1 -1
- package/dist/{Arrow-Xy7TAWLU.cjs → Arrow-f4c5AEIv.cjs} +1 -1
- package/dist/{BaseIcon-DpzJwh5Z.cjs → BaseIcon-BGeIE3vn.cjs} +1 -1
- package/dist/{BaseIcon-vF6zgXvp.js → BaseIcon-NaAlKaAM.js} +1 -1
- package/dist/{DataTable-DZ7GOCVh.cjs → DataTable-CXkMZ3ja.cjs} +1 -1
- package/dist/{DataTable-Dj8KLJHc.js → DataTable-R7hmQ0wl.js} +2 -2
- package/dist/{Legend-MfrOhwon.js → Legend-BKBuWgj8.js} +1 -1
- package/dist/{Legend-BNUo8JKO.cjs → Legend-VoYDt_v5.cjs} +1 -1
- package/dist/{Shape-fssaGSn1.js → Shape-CCI8C_dI.js} +1 -1
- package/dist/{Shape-DBYznwuk.cjs → Shape-DH2ovwu7.cjs} +1 -1
- package/dist/{Slicer-C2VIWW3F.js → Slicer-C1zx1qMy.js} +1 -1
- package/dist/{Slicer-B8qDEiI2.cjs → Slicer-CPQW_sm_.cjs} +1 -1
- package/dist/{Title-DM6fKrUI.js → Title-DJ269q6H.js} +1 -1
- package/dist/{Title--kLbBq-N.cjs → Title-gCBF7AU7.cjs} +1 -1
- package/dist/{Tooltip-CAmd4pzg.js → Tooltip-CKKSlbSq.js} +1 -1
- package/dist/{Tooltip-Dwh7A0L5.cjs → Tooltip-Qv4VexrA.cjs} +1 -1
- package/dist/{index-D0PI50d6.js → index-BK818aZo.js} +1 -1
- package/dist/{index-CSlObCMJ.cjs → index-Xau3hcRk.cjs} +1 -1
- package/dist/{useNestedProp-DUXlSjg2.cjs → useNestedProp-C_EQ-Kxy.cjs} +1 -1
- package/dist/{useNestedProp-BNV_Y29K.js → useNestedProp-hi25rRoY.js} +1 -1
- package/dist/{usePrinter-DJnJEVGy.js → usePrinter-C-2KAW2f.js} +1 -1
- package/dist/{usePrinter-ClpmcbPy.cjs → usePrinter-Dhvmhwhf.cjs} +1 -1
- package/dist/{vue-data-ui-DLhyTmG3.js → vue-data-ui-DPu_2hNJ.js} +55 -55
- package/dist/{vue-data-ui-B5epGKMS.cjs → vue-data-ui-ifINAh05.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-JeMsTT6R.js → vue-ui-3d-bar-BaR6gHYb.js} +7 -7
- package/dist/{vue-ui-3d-bar-Dv5Nu-Kz.cjs → vue-ui-3d-bar-DPqaPUTZ.cjs} +1 -1
- package/dist/{vue-ui-accordion-IPISean4.cjs → vue-ui-accordion-BjU8im6m.cjs} +1 -1
- package/dist/{vue-ui-accordion-C1dTIdYg.js → vue-ui-accordion-CH8K6f6J.js} +3 -3
- package/dist/{vue-ui-age-pyramid-BPrB-Srk.js → vue-ui-age-pyramid-CDotLSiv.js} +8 -8
- package/dist/{vue-ui-age-pyramid-ytOUpNe5.cjs → vue-ui-age-pyramid-Dt9ILoAz.cjs} +1 -1
- package/dist/{vue-ui-annotator-Bp2ylQ-N.cjs → vue-ui-annotator-C2bmdjLc.cjs} +1 -1
- package/dist/{vue-ui-annotator-DpY8JI03.js → vue-ui-annotator-CoH_aFJm.js} +1 -1
- package/dist/{vue-ui-candlestick-BoDWcJYz.cjs → vue-ui-candlestick-C5SjZVYs.cjs} +1 -1
- package/dist/{vue-ui-candlestick-D_KnLwpq.js → vue-ui-candlestick-G_90YTDo.js} +9 -9
- package/dist/{vue-ui-carousel-table-tPbrubLn.cjs → vue-ui-carousel-table-CptU7uki.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DWUmj6NW.js → vue-ui-carousel-table-DzxLQOiB.js} +4 -4
- package/dist/{vue-ui-chestnut-gUPyB2F7.js → vue-ui-chestnut-Cj5fJhR5.js} +6 -6
- package/dist/{vue-ui-chestnut-BltZicnq.cjs → vue-ui-chestnut-D8RaQMzo.cjs} +1 -1
- package/dist/{vue-ui-cursor-CBrYcHgg.js → vue-ui-cursor-G8ixOooh.js} +2 -2
- package/dist/{vue-ui-cursor-Mi9mivGV.cjs → vue-ui-cursor-pZEn4NtN.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DKJRkuMC.cjs → vue-ui-dashboard-C46M9Oob.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BvJccz-l.js → vue-ui-dashboard-CaMDg3iT.js} +2 -2
- package/dist/{vue-ui-digits-UvPWZIkN.cjs → vue-ui-digits-BnzhiKJT.cjs} +1 -1
- package/dist/{vue-ui-digits-PvPOOZTT.js → vue-ui-digits-CXTC7Ypr.js} +2 -2
- package/dist/{vue-ui-donut-CCnmksR_.js → vue-ui-donut-Caan2HEG.js} +9 -9
- package/dist/{vue-ui-donut-DBD9IyRA.cjs → vue-ui-donut-De--4Msd.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DWz0XIkn.js → vue-ui-donut-evolution-CUV7vE4C.js} +9 -9
- package/dist/{vue-ui-donut-evolution-C2mbsaP5.cjs → vue-ui-donut-evolution-DwPXJh13.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-DnhWlDqn.js → vue-ui-dumbbell-2D7NAlDu.js} +8 -8
- package/dist/{vue-ui-dumbbell-CdQ1eQN_.cjs → vue-ui-dumbbell-BzqRvxE9.cjs} +1 -1
- package/dist/{vue-ui-flow-CXeTBawu.cjs → vue-ui-flow-CSlnKCEh.cjs} +1 -1
- package/dist/{vue-ui-flow-zTfYWLOo.js → vue-ui-flow-DsqenwU_.js} +7 -7
- package/dist/{vue-ui-galaxy-CviL0-9-.js → vue-ui-galaxy-CLXeRR9E.js} +9 -9
- package/dist/{vue-ui-galaxy-Cr1TLsZ-.cjs → vue-ui-galaxy-WwvhRAFa.cjs} +1 -1
- package/dist/{vue-ui-gauge-C8cqiuMs.cjs → vue-ui-gauge-B_5_uMiG.cjs} +1 -1
- package/dist/{vue-ui-gauge-0wjKwTcJ.js → vue-ui-gauge-zoUBHBL2.js} +4 -4
- package/dist/{vue-ui-heatmap-BjX35pDk.js → vue-ui-heatmap-D-oq-QFJ.js} +8 -8
- package/dist/{vue-ui-heatmap-BempgzJY.cjs → vue-ui-heatmap-Gv6Y0025.cjs} +1 -1
- package/dist/{vue-ui-kpi-Cwoq-OQZ.cjs → vue-ui-kpi-Bgxu139K.cjs} +1 -1
- package/dist/{vue-ui-kpi-DKPUNPyD.js → vue-ui-kpi-CE3UnfLM.js} +2 -2
- package/dist/{vue-ui-mini-loader-umbgz-jE.js → vue-ui-mini-loader-Fap6KDDb.js} +2 -2
- package/dist/{vue-ui-mini-loader-DYmuLkr_.cjs → vue-ui-mini-loader-KFiTgq0Z.cjs} +1 -1
- package/dist/{vue-ui-molecule-D04xU1nK.cjs → vue-ui-molecule-CaKXLDG3.cjs} +1 -1
- package/dist/{vue-ui-molecule-DnTFVeGw.js → vue-ui-molecule-QMshD0fQ.js} +9 -9
- package/dist/{vue-ui-mood-radar-wHCxSeNT.cjs → vue-ui-mood-radar-BFKJ6-wI.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BdsUM6EW.js → vue-ui-mood-radar-woI18vdU.js} +9 -9
- package/dist/{vue-ui-nested-donuts-CX_V9UIk.js → vue-ui-nested-donuts-BH8pGgVI.js} +9 -9
- package/dist/{vue-ui-nested-donuts--34k7AUI.cjs → vue-ui-nested-donuts-Nb5Jg_SG.cjs} +1 -1
- package/dist/{vue-ui-onion-ot5UiFnD.cjs → vue-ui-onion-BBYwZtjh.cjs} +1 -1
- package/dist/{vue-ui-onion-C3scIn1m.js → vue-ui-onion-bofmS_kO.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-CLYNauuG.cjs → vue-ui-parallel-coordinate-plot-C-ZbQgN7.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-BrtFu6_R.js → vue-ui-parallel-coordinate-plot-DVW0LYp7.js} +10 -10
- package/dist/{vue-ui-quadrant-b3C38Y-z.cjs → vue-ui-quadrant-DFMVk5eC.cjs} +1 -1
- package/dist/{vue-ui-quadrant-CZQnq031.js → vue-ui-quadrant-fhx9NkrR.js} +10 -10
- package/dist/{vue-ui-quick-chart-CQ_m8VuI.js → vue-ui-quick-chart-5rggkq9-.js} +6 -6
- package/dist/{vue-ui-quick-chart-CS1XKyME.cjs → vue-ui-quick-chart-S6LEQLn7.cjs} +1 -1
- package/dist/{vue-ui-radar-Bk_bQCIc.js → vue-ui-radar-B8RvpBi-.js} +10 -10
- package/dist/{vue-ui-radar-ayBCV2nl.cjs → vue-ui-radar-CsR9V_Sl.cjs} +1 -1
- package/dist/{vue-ui-rating-BNAFeqKV.cjs → vue-ui-rating-CgzLPjlb.cjs} +1 -1
- package/dist/{vue-ui-rating-CwmqAW6j.js → vue-ui-rating-ClQkygLG.js} +2 -2
- package/dist/{vue-ui-relation-circle-B19oCBsQ.js → vue-ui-relation-circle-B2hJDB7v.js} +5 -5
- package/dist/{vue-ui-relation-circle-D__4tmLy.cjs → vue-ui-relation-circle-D0zllKLp.cjs} +1 -1
- package/dist/{vue-ui-rings-DWv1YjLY.cjs → vue-ui-rings-CLIeS7BN.cjs} +1 -1
- package/dist/{vue-ui-rings-Ekq8eld0.js → vue-ui-rings-D3nNsoiU.js} +9 -9
- package/dist/{vue-ui-scatter-B5lq6TQb.js → vue-ui-scatter-DitnL-sZ.js} +10 -10
- package/dist/{vue-ui-scatter-Djt3w_7K.cjs → vue-ui-scatter-bPAA5OYI.cjs} +1 -1
- package/dist/{vue-ui-screenshot-BBTScesQ.cjs → vue-ui-screenshot-C-uHRqZ7.cjs} +1 -1
- package/dist/{vue-ui-screenshot-BGEu-1aK.js → vue-ui-screenshot-DayBW_7b.js} +1 -1
- package/dist/{vue-ui-skeleton-aEAr9fnx.cjs → vue-ui-skeleton-CgYrDrh-.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CDB2sB2S.js → vue-ui-skeleton-DJtTdfNg.js} +2 -2
- package/dist/{vue-ui-smiley-5sY2rtTd.js → vue-ui-smiley-CZTyxQvT.js} +2 -2
- package/dist/{vue-ui-smiley-pHCa1uHj.cjs → vue-ui-smiley-CvpPFDBL.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-C6U8pRYP.js → vue-ui-spark-trend--aNEsQNW.js} +4 -4
- package/dist/{vue-ui-spark-trend-BLYjicGH.cjs → vue-ui-spark-trend-DZm9J_ZI.cjs} +1 -1
- package/dist/vue-ui-sparkbar-C43IyepC.cjs +1 -0
- package/dist/{vue-ui-sparkbar-DdEDQOc8.js → vue-ui-sparkbar-uvq7AcMr.js} +86 -77
- package/dist/{vue-ui-sparkgauge-S9QibidM.cjs → vue-ui-sparkgauge-BP11yMVn.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-CV0OpVGr.js → vue-ui-sparkgauge-V1zC6qrt.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-BCcYAQYV.js → vue-ui-sparkhistogram-BIUsoRQJ.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-DVc-tjMC.cjs → vue-ui-sparkhistogram-Dipd391E.cjs} +1 -1
- package/dist/{vue-ui-sparkline-WkYNaf-r.cjs → vue-ui-sparkline-C3C9heBc.cjs} +1 -1
- package/dist/{vue-ui-sparkline-C6emienJ.js → vue-ui-sparkline-DOAhQCt5.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-oB0fsXWO.cjs → vue-ui-sparkstackbar-Bk7nIBnD.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-CptWawfp.js → vue-ui-sparkstackbar-ObA64D3E.js} +3 -3
- package/dist/{vue-ui-strip-plot-Kb7Kk-C8.js → vue-ui-strip-plot-6eenEjje.js} +9 -9
- package/dist/{vue-ui-strip-plot-D30zeVfM.cjs → vue-ui-strip-plot-CffrlZCk.cjs} +1 -1
- package/dist/{vue-ui-table-Dqyr1Go9.js → vue-ui-table-BbMFv-oU.js} +1 -1
- package/dist/{vue-ui-table-FUX1jbtH.cjs → vue-ui-table-CzAWebM5.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-DAWzPS1D.js → vue-ui-table-heatmap-B9YVKhvr.js} +4 -4
- package/dist/{vue-ui-table-heatmap-Cqd_rPSG.cjs → vue-ui-table-heatmap-CR4Z6gFJ.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-CWSL5RtX.cjs → vue-ui-table-sparkline-BZdfmaoe.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DgUpsNVO.js → vue-ui-table-sparkline-D7b-hkZg.js} +5 -5
- package/dist/{vue-ui-thermometer-UZFTkdJs.js → vue-ui-thermometer-CfGfCzz9.js} +5 -5
- package/dist/{vue-ui-thermometer-DDpxHZhQ.cjs → vue-ui-thermometer-DJw8iKSK.cjs} +1 -1
- package/dist/{vue-ui-timer-CXonfhMU.cjs → vue-ui-timer-DjSR1opQ.cjs} +1 -1
- package/dist/{vue-ui-timer-DCexI32t.js → vue-ui-timer-PdZYURw6.js} +4 -4
- package/dist/{vue-ui-tiremarks-UtTUbZUt.js → vue-ui-tiremarks-9o6eS1Mc.js} +5 -5
- package/dist/{vue-ui-tiremarks-DByzjHco.cjs → vue-ui-tiremarks-DmQpv3n0.cjs} +1 -1
- package/dist/{vue-ui-treemap-BT9zMgOs.cjs → vue-ui-treemap-BQlEP4Wi.cjs} +1 -1
- package/dist/{vue-ui-treemap-DpLJGsie.js → vue-ui-treemap-hdJRrv6w.js} +9 -9
- package/dist/{vue-ui-vertical-bar-B9poCwqT.js → vue-ui-vertical-bar-BRhV9I7i.js} +9 -9
- package/dist/{vue-ui-vertical-bar-BWWvfTkx.cjs → vue-ui-vertical-bar-CXn4FfOg.cjs} +1 -1
- package/dist/{vue-ui-waffle-BGnyyHVp.js → vue-ui-waffle-CXyoderQ.js} +9 -9
- package/dist/{vue-ui-waffle-fRaiL6eW.cjs → vue-ui-waffle-CjAIw38i.cjs} +1 -1
- package/dist/{vue-ui-wheel-7JdR9vyK.js → vue-ui-wheel-BU_90Fhv.js} +5 -5
- package/dist/{vue-ui-wheel-C0BVez2R.cjs → vue-ui-wheel-DLj-V4jn.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-CDDYvCP9.cjs → vue-ui-word-cloud-CtBamLvE.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-S1x3FJQ6.js → vue-ui-word-cloud-DQ72J4Ro.js} +6 -6
- package/dist/{vue-ui-xy-DMkykmZN.cjs → vue-ui-xy-Bz15K-CC.cjs} +1 -1
- package/dist/{vue-ui-xy-DBC1QS_G.js → vue-ui-xy-DYEsmppC.js} +12 -12
- package/dist/{vue-ui-xy-canvas-1yb0nuDg.js → vue-ui-xy-canvas-BRWp_v0p.js} +10 -10
- package/dist/{vue-ui-xy-canvas-B4xzjjjm.cjs → vue-ui-xy-canvas-DLN-ipCw.cjs} +1 -1
- package/package.json +1 -1
- package/dist/vue-ui-sparkbar-e9mZh74f.cjs +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { computed as m, ref as h, onMounted as j, watch as G, nextTick as q, openBlock as u, createElementBlock as n, normalizeStyle as y, unref as r, renderSlot as D, normalizeProps as P, mergeProps as H, createCommentVNode as c, createElementVNode as v, toDisplayString as p, Fragment as z, renderList as W, guardReactiveProps as X, createBlock as R } from "vue";
|
|
2
|
+
import { u as J, c as K, t as Q, a as Y, p as x, b as Z, o as ee, e as T, g as te, d as le, r as C, f as k, X as ae, s as se } from "./index-BK818aZo.js";
|
|
3
|
+
import { u as L } from "./useNestedProp-hi25rRoY.js";
|
|
4
|
+
import oe from "./vue-ui-skeleton-DJtTdfNg.js";
|
|
5
|
+
const ie = ["onClick"], ue = { key: 1 }, ne = ["xmlns", "viewBox"], re = ["id"], ve = ["stop-color"], ce = ["stop-color"], de = ["height", "width", "fill", "rx"], ye = ["height", "width", "fill", "rx"], pe = ["height", "width", "fill", "rx"], xe = {
|
|
6
6
|
__name: "vue-ui-sparkbar",
|
|
7
7
|
props: {
|
|
8
8
|
config: {
|
|
@@ -26,83 +26,92 @@ const le = ["onClick"], ae = { key: 1 }, oe = ["xmlns", "viewBox"], se = ["id"],
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
emits: ["selectDatapoint"],
|
|
29
|
-
setup(
|
|
30
|
-
const a =
|
|
31
|
-
const t =
|
|
29
|
+
setup(b, { emit: E }) {
|
|
30
|
+
const a = b, { vue_ui_sparkbar: O } = J(), _ = m(() => !!a.dataset && a.dataset.length), $ = h(K()), e = m(() => {
|
|
31
|
+
const t = L({
|
|
32
32
|
userConfig: a.config,
|
|
33
|
-
defaultConfig:
|
|
33
|
+
defaultConfig: O
|
|
34
34
|
});
|
|
35
35
|
return t.theme ? {
|
|
36
|
-
...
|
|
37
|
-
userConfig:
|
|
36
|
+
...L({
|
|
37
|
+
userConfig: Q.vue_ui_sparkbar[t.theme] || a.config,
|
|
38
38
|
defaultConfig: t
|
|
39
39
|
}),
|
|
40
|
-
customPalette:
|
|
40
|
+
customPalette: Y[t.theme] || x
|
|
41
41
|
} : t;
|
|
42
|
-
}),
|
|
42
|
+
}), V = m(() => Z(e.value.customPalette)), g = h(a.dataset.map((t) => ({
|
|
43
43
|
...t,
|
|
44
44
|
value: e.value.style.animation.show ? 0 : t.value || 0
|
|
45
|
-
})));
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
}))), S = h(null);
|
|
46
|
+
j(async () => {
|
|
47
|
+
ee(a.dataset) && T({
|
|
48
48
|
componentName: "VueUiSparkbar",
|
|
49
49
|
type: "dataset"
|
|
50
|
-
}),
|
|
50
|
+
}), A();
|
|
51
|
+
});
|
|
52
|
+
function A() {
|
|
53
|
+
if (e.value.style.animation.show) {
|
|
51
54
|
let N = function() {
|
|
52
|
-
d += l / t, d < l ? (
|
|
53
|
-
...
|
|
54
|
-
value:
|
|
55
|
-
})), requestAnimationFrame(N)) :
|
|
56
|
-
...
|
|
57
|
-
value:
|
|
55
|
+
d += l / t, d < l ? (g.value = g.value.map((i, f) => ({
|
|
56
|
+
...i,
|
|
57
|
+
value: i.value += s[f]
|
|
58
|
+
})), S.value = requestAnimationFrame(N)) : g.value = a.dataset.map((i) => ({
|
|
59
|
+
...i,
|
|
60
|
+
value: i.value || 0
|
|
58
61
|
}));
|
|
59
62
|
};
|
|
60
|
-
const t = e.value.style.animation.animationFrames,
|
|
63
|
+
const t = e.value.style.animation.animationFrames, s = a.dataset.map((i, f) => i.value / t), l = a.dataset.map((i) => i.value || 0).reduce((i, f) => i + f, 0);
|
|
61
64
|
let d = 0;
|
|
62
65
|
N();
|
|
63
66
|
}
|
|
64
|
-
}
|
|
65
|
-
|
|
67
|
+
}
|
|
68
|
+
G(() => a.dataset, async (t) => {
|
|
69
|
+
cancelAnimationFrame(S.value), g.value = a.dataset.map((s) => ({
|
|
70
|
+
...s,
|
|
71
|
+
value: e.value.style.animation.show ? 0 : s.value || 0
|
|
72
|
+
})), q(A);
|
|
73
|
+
}, { deep: !0 });
|
|
74
|
+
const o = h({
|
|
66
75
|
width: 500,
|
|
67
76
|
height: 16
|
|
68
|
-
}),
|
|
69
|
-
|
|
77
|
+
}), B = m(() => Math.max(...a.dataset.map((t) => t.value))), I = m(() => (a.dataset.forEach((t, s) => {
|
|
78
|
+
te({
|
|
70
79
|
datasetObject: t,
|
|
71
80
|
requiredAttributes: ["name", "value"]
|
|
72
81
|
}).forEach((l) => {
|
|
73
|
-
|
|
82
|
+
T({
|
|
74
83
|
componentName: "VueUiSparkbar",
|
|
75
84
|
type: "datasetSerieAttribute",
|
|
76
85
|
property: l,
|
|
77
|
-
index:
|
|
86
|
+
index: s
|
|
78
87
|
});
|
|
79
88
|
});
|
|
80
|
-
}),
|
|
89
|
+
}), g.value.map((t, s) => ({
|
|
81
90
|
...t,
|
|
82
91
|
value: t.value || 0,
|
|
83
|
-
color:
|
|
92
|
+
color: le(t.color) || V.value[s] || x[s] || x[s % x.length]
|
|
84
93
|
}))));
|
|
85
|
-
function
|
|
86
|
-
return t /
|
|
94
|
+
function M(t) {
|
|
95
|
+
return t / B.value;
|
|
87
96
|
}
|
|
88
|
-
function
|
|
89
|
-
return e.value.style.layout.independant ? t.target ? t.value / t.target : e.value.style.layout.percentage ? t.value / 100 : e.value.style.layout.target === 0 ? 1 : t.value / e.value.style.layout.target :
|
|
97
|
+
function F(t) {
|
|
98
|
+
return e.value.style.layout.independant ? t.target ? t.value / t.target : e.value.style.layout.percentage ? t.value / 100 : e.value.style.layout.target === 0 ? 1 : t.value / e.value.style.layout.target : M(t.value);
|
|
90
99
|
}
|
|
91
|
-
function
|
|
100
|
+
function w(t) {
|
|
92
101
|
return e.value.style.layout.independant && t.target || e.value.style.layout.target;
|
|
93
102
|
}
|
|
94
|
-
function
|
|
95
|
-
|
|
103
|
+
function U(t, s) {
|
|
104
|
+
E("selectDatapoint", { datapoint: t, index: s });
|
|
96
105
|
}
|
|
97
|
-
return (t,
|
|
106
|
+
return (t, s) => (u(), n("div", {
|
|
98
107
|
style: y({
|
|
99
108
|
width: "100%",
|
|
100
109
|
fontFamily: e.value.style.fontFamily,
|
|
101
|
-
background: e.value.style.backgroundColor +
|
|
110
|
+
background: e.value.style.backgroundColor + r(C)[a.backgroundOpacity]
|
|
102
111
|
})
|
|
103
112
|
}, [
|
|
104
|
-
t.$slots.title ?
|
|
105
|
-
!t.$slots.title && e.value.style.title.text ? (
|
|
113
|
+
t.$slots.title ? D(t.$slots, "title", P(H({ key: 0 }, { title: { ...t.title, title: e.value.style.title.text, subtitle: e.value.style.title.subtitle.text } }))) : c("", !0),
|
|
114
|
+
!t.$slots.title && e.value.style.title.text ? (u(), n("div", {
|
|
106
115
|
key: 1,
|
|
107
116
|
class: "vue-ui-sparkbar-title-container",
|
|
108
117
|
style: y({
|
|
@@ -118,8 +127,8 @@ const le = ["onClick"], ae = { key: 1 }, oe = ["xmlns", "viewBox"], se = ["id"],
|
|
|
118
127
|
color: e.value.style.title.color,
|
|
119
128
|
fontWeight: e.value.style.title.bold ? "bold" : "normal"
|
|
120
129
|
})
|
|
121
|
-
},
|
|
122
|
-
e.value.style.title.subtitle.text ? (
|
|
130
|
+
}, p(e.value.style.title.text), 5),
|
|
131
|
+
e.value.style.title.subtitle.text ? (u(), n("div", {
|
|
123
132
|
key: 0,
|
|
124
133
|
class: "vue-ui-sparkbar-subtitle",
|
|
125
134
|
style: y({
|
|
@@ -127,53 +136,53 @@ const le = ["onClick"], ae = { key: 1 }, oe = ["xmlns", "viewBox"], se = ["id"],
|
|
|
127
136
|
color: e.value.style.title.subtitle.color,
|
|
128
137
|
fontWeight: e.value.style.title.subtitle.bold ? "bold" : "normal"
|
|
129
138
|
})
|
|
130
|
-
},
|
|
139
|
+
}, p(e.value.style.title.subtitle.text), 5)) : c("", !0)
|
|
131
140
|
], 4)) : c("", !0),
|
|
132
|
-
(
|
|
133
|
-
_.value ? (
|
|
141
|
+
(u(!0), n(z, null, W(I.value, (l, d) => (u(), n(z, null, [
|
|
142
|
+
_.value ? (u(), n("div", {
|
|
134
143
|
key: 0,
|
|
135
|
-
style: y(`display:flex !important;${["left", "right"].includes(e.value.style.labels.name.position) ? "flex-direction:row !important" : "flex-direction:column !important"};gap:${e.value.style.gap}px !important;${e.value.style.labels.name.position === "right" ? "row-reverse !important" : ""};align-items:center;${
|
|
136
|
-
onClick: () =>
|
|
144
|
+
style: y(`display:flex !important;${["left", "right"].includes(e.value.style.labels.name.position) ? "flex-direction:row !important" : "flex-direction:column !important"};gap:${e.value.style.gap}px !important;${e.value.style.labels.name.position === "right" ? "row-reverse !important" : ""};align-items:center;${b.dataset.length > 0 && d !== b.dataset.length - 1 ? "margin-bottom:6px" : ""}`),
|
|
145
|
+
onClick: () => U(l, d)
|
|
137
146
|
}, [
|
|
138
|
-
|
|
147
|
+
D(t.$slots, "data-label", P(X({ bar: {
|
|
139
148
|
...l,
|
|
140
|
-
target:
|
|
141
|
-
valueLabel:
|
|
149
|
+
target: w(l),
|
|
150
|
+
valueLabel: r(k)({
|
|
142
151
|
p: l.prefix || "",
|
|
143
152
|
v: l.value,
|
|
144
153
|
s: l.suffix || "",
|
|
145
154
|
r: l.rounding || 0
|
|
146
155
|
}),
|
|
147
|
-
targetLabel:
|
|
156
|
+
targetLabel: r(k)({
|
|
148
157
|
p: l.prefix || "",
|
|
149
|
-
v:
|
|
158
|
+
v: w(l),
|
|
150
159
|
s: l.suffix || "",
|
|
151
160
|
r: l.rounding || 0
|
|
152
161
|
})
|
|
153
162
|
} }))),
|
|
154
|
-
t.$slots["data-label"] ? c("", !0) : (
|
|
163
|
+
t.$slots["data-label"] ? c("", !0) : (u(), n("div", {
|
|
155
164
|
key: 0,
|
|
156
165
|
style: y(`width:${e.value.style.labels.name.width};${["right", "top"].includes(e.value.style.labels.name.position) ? "text-align:left" : "text-align:right"};color:${e.value.style.labels.name.color};font-size:${e.value.style.labels.fontSize}px;font-weight:${e.value.style.labels.name.bold ? "bold" : "normal"}`)
|
|
157
166
|
}, [
|
|
158
|
-
v("span", null,
|
|
159
|
-
e.value.style.labels.value.show ? (
|
|
167
|
+
v("span", null, p(l.name), 1),
|
|
168
|
+
e.value.style.labels.value.show ? (u(), n("span", {
|
|
160
169
|
key: 0,
|
|
161
170
|
style: y(`font-weight:${e.value.style.labels.value.bold ? "bold" : "normal"}`)
|
|
162
|
-
}, ": " +
|
|
171
|
+
}, ": " + p(r(k)({
|
|
163
172
|
p: l.prefix || "",
|
|
164
173
|
v: l.value,
|
|
165
174
|
s: l.suffix || "",
|
|
166
175
|
r: l.rounding || 0
|
|
167
176
|
})), 5)) : c("", !0),
|
|
168
|
-
e.value.style.layout.showTargetValue ? (
|
|
177
|
+
e.value.style.layout.showTargetValue ? (u(), n("span", ue, p(" " + e.value.style.layout.targetValueText) + " " + p(r(k)({
|
|
169
178
|
p: l.prefix || "",
|
|
170
|
-
v:
|
|
179
|
+
v: w(l),
|
|
171
180
|
s: l.suffix || "",
|
|
172
181
|
r: l.rounding || 0
|
|
173
182
|
})), 1)) : c("", !0)
|
|
174
183
|
], 4)),
|
|
175
|
-
(
|
|
176
|
-
xmlns:
|
|
184
|
+
(u(), n("svg", {
|
|
185
|
+
xmlns: r(ae),
|
|
177
186
|
viewBox: `0 0 ${o.value.width} ${o.value.height}`,
|
|
178
187
|
width: "100%"
|
|
179
188
|
}, [
|
|
@@ -187,42 +196,42 @@ const le = ["onClick"], ae = { key: 1 }, oe = ["xmlns", "viewBox"], se = ["id"],
|
|
|
187
196
|
}, [
|
|
188
197
|
v("stop", {
|
|
189
198
|
offset: "0%",
|
|
190
|
-
"stop-color": `${
|
|
191
|
-
}, null, 8,
|
|
199
|
+
"stop-color": `${r(se)(l.color, 0.03)}${r(C)[100 - e.value.style.bar.gradient.intensity]}`
|
|
200
|
+
}, null, 8, ve),
|
|
192
201
|
v("stop", {
|
|
193
202
|
offset: "100%",
|
|
194
203
|
"stop-color": l.color
|
|
195
|
-
}, null, 8,
|
|
196
|
-
], 8,
|
|
204
|
+
}, null, 8, ce)
|
|
205
|
+
], 8, re)
|
|
197
206
|
]),
|
|
198
207
|
v("rect", {
|
|
199
208
|
height: o.value.height,
|
|
200
209
|
width: o.value.width,
|
|
201
210
|
x: 0,
|
|
202
211
|
y: 0,
|
|
203
|
-
fill: `${e.value.style.gutter.backgroundColor}${
|
|
212
|
+
fill: `${e.value.style.gutter.backgroundColor}${r(C)[e.value.style.gutter.opacity]}`,
|
|
204
213
|
rx: o.value.height / 2
|
|
205
|
-
}, null, 8,
|
|
214
|
+
}, null, 8, de),
|
|
206
215
|
v("rect", {
|
|
207
216
|
height: o.value.height,
|
|
208
|
-
width: o.value.width *
|
|
217
|
+
width: o.value.width * F(l),
|
|
209
218
|
x: 0,
|
|
210
219
|
y: 0,
|
|
211
220
|
fill: e.value.style.bar.gradient.underlayerColor,
|
|
212
221
|
rx: o.value.height / 2
|
|
213
|
-
}, null, 8,
|
|
222
|
+
}, null, 8, ye),
|
|
214
223
|
v("rect", {
|
|
215
224
|
height: o.value.height,
|
|
216
|
-
width: o.value.width *
|
|
225
|
+
width: o.value.width * F(l),
|
|
217
226
|
x: 0,
|
|
218
227
|
y: 0,
|
|
219
228
|
fill: e.value.style.bar.gradient.show ? `url(#sparkbar_gradient_${d}_${$.value})` : l.color,
|
|
220
229
|
rx: o.value.height / 2
|
|
221
|
-
}, null, 8,
|
|
222
|
-
], 8,
|
|
223
|
-
], 12,
|
|
230
|
+
}, null, 8, pe)
|
|
231
|
+
], 8, ne))
|
|
232
|
+
], 12, ie)) : c("", !0)
|
|
224
233
|
], 64))), 256)),
|
|
225
|
-
_.value ? c("", !0) : (
|
|
234
|
+
_.value ? c("", !0) : (u(), R(oe, {
|
|
226
235
|
key: 2,
|
|
227
236
|
config: {
|
|
228
237
|
type: "sparkbar",
|
|
@@ -238,5 +247,5 @@ const le = ["onClick"], ae = { key: 1 }, oe = ["xmlns", "viewBox"], se = ["id"],
|
|
|
238
247
|
}
|
|
239
248
|
};
|
|
240
249
|
export {
|
|
241
|
-
|
|
250
|
+
xe as default
|
|
242
251
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-Xau3hcRk.cjs"),p=require("./useNestedProp-C_EQ-Kxy.cjs"),C=require("./vue-ui-skeleton-CgYrDrh-.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,7 +1,7 @@
|
|
|
1
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-
|
|
3
|
-
import { u as C } from "./useNestedProp-
|
|
4
|
-
import H from "./vue-ui-skeleton-
|
|
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-BK818aZo.js";
|
|
3
|
+
import { u as C } from "./useNestedProp-hi25rRoY.js";
|
|
4
|
+
import H from "./vue-ui-skeleton-DJtTdfNg.js";
|
|
5
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 = {
|
|
6
6
|
__name: "vue-ui-sparkgauge",
|
|
7
7
|
props: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCssVars as R, computed as b, onMounted as T, ref as S, openBlock as a, createElementBlock as s, normalizeStyle as w, createElementVNode as f, createTextVNode as N, toDisplayString as r, createCommentVNode as c, unref as p, Fragment as h, renderList as g, normalizeClass as M, createBlock as A } from "vue";
|
|
2
|
-
import { u as P, o as J, e as D, g as K, c as Q, t as Z, r as m, X as ee, s as F } from "./index-
|
|
3
|
-
import { u as H } from "./useNestedProp-
|
|
4
|
-
import { _ as te } from "./Shape-
|
|
5
|
-
import le from "./vue-ui-skeleton-
|
|
2
|
+
import { u as P, o as J, e as D, g as K, c as Q, t as Z, r as m, X as ee, s as F } from "./index-BK818aZo.js";
|
|
3
|
+
import { u as H } from "./useNestedProp-hi25rRoY.js";
|
|
4
|
+
import { _ as te } from "./Shape-CCI8C_dI.js";
|
|
5
|
+
import le from "./vue-ui-skeleton-DJtTdfNg.js";
|
|
6
6
|
import { _ as ae } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
const se = { key: 0 }, oe = { key: 1 }, ue = ["xmlns", "viewBox"], ie = ["id"], ne = ["stop-color"], re = ["stop-color"], ve = ["id"], de = ["stop-color"], ye = ["stop-color"], ce = { key: 0 }, he = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], ge = { key: 1 }, fe = ["x", "y", "font-size", "font-weight", "fill"], pe = ["x", "y", "font-size", "fill"], be = ["x", "y", "font-size", "fill"], me = ["height", "width", "x", "onMouseover", "stroke", "stroke-width", "rx", "stroke-dasharray", "onClick"], xe = {
|
|
8
8
|
__name: "vue-ui-sparkhistogram",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-Xau3hcRk.cjs"),k=require("./useNestedProp-C_EQ-Kxy.cjs"),V=require("./Shape-DH2ovwu7.cjs"),D=require("./vue-ui-skeleton-CgYrDrh-.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={key:0},T=["x","y","height","width","fill","stroke","stroke-width","rx"],X={key:1},Y=["x","y","font-size","font-weight","fill"],G=["x","y","font-size","fill"],R=["x","y","font-size","fill"],J=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],K={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(b,{emit:x}){const u=b;e.useCssVars(o=>({"34a5ebe4":S.value}));const{vue_ui_sparkhistogram:_}=n.useConfig(),f=e.computed(()=>!!u.dataset&&u.dataset.length);e.onMounted(()=>{n.objectIsEmpty(u.dataset)?n.error({componentName:"VueUiSparkHistogram",type:"dataset"}):u.dataset.forEach((o,s)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{n.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:s})})})});const v=e.ref(n.createUid()),t=e.computed(()=>{const o=k.useNestedProp({userConfig:u.config,defaultConfig:_});return o.theme?{...k.useNestedProp({userConfig:n.themes.vue_ui_sparkhistogram[o.theme]||u.config,defaultConfig:o})}:o}),c=e.computed(()=>{const o=t.value.style.layout.height,s=t.value.style.layout.width,l=t.value.style.layout.padding.top,a=o-t.value.style.layout.padding.bottom,d=t.value.style.layout.padding.left,y=s-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=s-t.value.style.layout.padding.left-t.value.style.layout.padding.right;return{bottom:a,centerY:p,drawingHeight:g,drawingWidth:m,height:o,left:d,right:y,top:l,width:s}}),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,s)=>{const l=$(o.value||0),a=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-a/2,m=c.value.left+(y/2+s*d),w=c.value.left+s*d,h=typeof o.intensity>"u"?100:Math.round(o.intensity*100),N=o.value>=0?`${t.value.style.bars.colors.positive}${n.opacity[h]}`:`${t.value.style.bars.colors.negative}${n.opacity[h]}`,C=o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,L=o.value>=0?`url(#gradient_positive_${s}_${v.value})`:`url(#gradient_negative_${s}_${v.value})`,z=m+p/2;return{...o,color:N,gradient:L,height:a,intensity:h,proportion:l,stroke:C,textAnchor:z,trapX:w,unitWidth:d,width:p,x:m,y:g}})),r=e.ref(null);function E(o,s){x("selectDatapoint",{datapoint:o,index:s})}const S=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,s)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:s[1]||(s[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(t.value.style.labels.value.prefix)+e.toDisplayString(isNaN(i.value[r.value].value)?"":": "+Number(i.value[r.value].value.toFixed(t.value.style.labels.value.rounding)).toLocaleString())+e.toDisplayString(t.value.style.labels.value.suffix),1)):e.createCommentVNode("",!0),e.createTextVNode(),![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(n.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,a)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_positive_${a}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.bars.colors.positive,.05)}${e.unref(n.opacity)[l.intensity]}`},null,8,I),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.positive}${e.unref(n.opacity)[l.intensity]}`},null,8,U)],8,q))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,a)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_negative_${a}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.bars.colors.negative,.05)}${e.unref(n.opacity)[l.intensity]}`},null,8,O),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.negative}${e.unref(n.opacity)[l.intensity]}`},null,8,j)],8,W))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",P,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,a)=>(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,T))),256))])):(e.openBlock(),e.createElementBlock("g",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,a)=>(e.openBlock(),e.createBlock(V._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,a)=>(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,Y))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,a)=>(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,G)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,a)=>(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,R)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,a)=>(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=a,onMouseleave:s[0]||(s[0]=d=>r.value=null),stroke:r.value!==null&&r.value===a?t.value.style.selector.stroke:"","stroke-width":r.value!==null&&r.value===a?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>E(l,a)},null,40,J)]))),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))}},Q=F._export_sfc(K,[["__scopeId","data-v-7aed7086"]]);exports.default=Q;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CSlObCMJ.cjs"),B=require("./useNestedProp-DUXlSjg2.cjs"),z=require("./vue-ui-skeleton-aEAr9fnx.cjs"),A=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),D=["id"],F=["xmlns","viewBox"],G=["id"],W=["stop-color"],q=["stop-color"],T=["id"],j=["stop-color"],H=["stop-color"],O=["id"],U=["stop-color"],X=["stop-color"],Z={key:0},R=["d","fill"],Y=["d","fill"],J=["d","stroke","stroke-width"],K=["x1","x2","y1","y2","stroke","stroke-width"],Q=["x","y","width","height","fill","rx"],ee=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],te=["x1","x2","y1","y2","stroke","stroke-dasharray","stroke-width"],le=["cx","cy","r","fill","stroke","stroke-width"],ae=["x","y","font-size","font-weight","fill"],oe=["x","y","height","width","onMouseenter","onClick"],ne={__name:"vue-ui-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},showInfo:{type:Boolean,default:!0},selectedIndex:{type:Number,default:void 0}},emits:["hoverIndex","selectDatapoint"],setup(m,{emit:b}){const i=m,{vue_ui_sparkline:$}=n.useConfig(),g=e.computed(()=>!!i.dataset&&i.dataset.length),v=e.ref(n.createUid()),t=e.computed(()=>{const l=B.useNestedProp({userConfig:i.config,defaultConfig:$});return l.theme?{...B.useNestedProp({userConfig:n.themes.vue_ui_sparkline[l.theme]||i.config,defaultConfig:l})}:l}),f=e.ref(i.dataset.map(l=>t.value.style.animation.show?{...l,value:null}:{...l,value:[void 0].includes(l.value)?null:l.value}));e.onMounted(()=>{if(n.objectIsEmpty(i.dataset)?n.error({componentName:"VueUiSparkline",type:"dataset"}):i.dataset.forEach((l,r)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["period","value"]}).forEach(a=>{n.error({componentName:"VueUiSparkline",type:"datasetSerieAttribute",property:a,index:r})})}),t.value.style.animation.show&&i.dataset.length>1){let a=function(){r<i.dataset.length?(f.value.push(i.dataset[r]),setTimeout(()=>{requestAnimationFrame(a)},l)):f.value=i.dataset,r+=1};f.value=[];const l=t.value.style.animation.animationFrames/i.dataset.length;let r=0;a()}});const d=e.ref({height:80,width:500}),L=e.ref(6),o=e.computed(()=>({top:12,left:0,right:d.value.width,bottom:d.value.height-3,start:i.showInfo&&t.value.style.dataLabel.show&&t.value.style.dataLabel.position==="left"?d.value.width-t.value.style.chartWidth:30,width:i.showInfo&&t.value.style.dataLabel.show?t.value.style.chartWidth:d.value.width-30,height:d.value.height-12})),_=e.computed(()=>Math.min(...f.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0))),V=e.computed(()=>Math.max(...f.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0))),p=e.computed(()=>{const l=_.value>=0?0:_.value;return Math.abs(l)}),E=e.computed(()=>V.value+p.value+L.value),x=e.computed(()=>o.value.bottom-o.value.height*w(p.value));function w(l){return l/E.value}const y=e.computed(()=>i.dataset.length-1),u=e.computed(()=>f.value.map((l,r)=>{const a=isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0;return{absoluteValue:a,period:l.period,plotValue:a+p.value,toMax:w(a+p.value),x:o.value.start+r*(o.value.width/(y.value+1)>30?30:o.value.width/(y.value+1)),y:o.value.bottom-o.value.height*w(a+p.value),id:`plot_${v.value}_${r}`,color:k.value?t.value.style.bar.color:t.value.style.area.useGradient?n.shiftHue(t.value.style.line.color,.05*(1-r/y.value)):t.value.style.line.color,width:o.value.width/(y.value+1)>30?30:o.value.width/(y.value+1)}})),C=e.computed(()=>{const l={x:u.value[0].x,y:d.value.height-6},r={x:u.value[u.value.length-1].x,y:d.value.height-6},a=[];return u.value.forEach(s=>{a.push(`${s.x},${s.y} `)}),[l.x,l.y,...a,r.x,r.y].toString()}),c=e.ref(void 0);function I(l,r){c.value=l,b("hoverIndex",{index:r})}function S(){c.value=void 0,b("hoverIndex",{index:void 0})}const h=e.computed(()=>{if(g.value){const l=u.value.map(a=>a.absoluteValue),r=l.reduce((a,s)=>a+s,0);return{latest:u.value[u.value.length-1].absoluteValue,sum:r,average:r/u.value.length,median:n.calcMedian(l),trend:n.calcLinearProgression(u.value.map(({x:a,y:s,absoluteValue:N})=>({x:a,y:s,value:N}))).trend}}else return{latest:null,sum:null,average:null,median:null,trend:null}}),M=e.computed(()=>g.value?t.value.style.dataLabel.valueType==="latest"?h.value.latest:t.value.style.dataLabel.valueType==="sum"?h.value.sum:t.value.style.dataLabel.valueType==="average"?h.value.average:0:0),k=e.computed(()=>t.value.type&&t.value.type==="bar");function P(l,r){b("selectDatapoint",{datapoint:l,index:r})}return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-sparkline",id:v.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily}`)},[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps({selected:c.value,latest:h.value.latest,sum:h.value.sum,average:h.value.average,median:h.value.median,trend:h.value.trend})),void 0,!0),t.value.style.title.show&&m.showInfo?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-sparkline-title",style:e.normalizeStyle(`display:flex;align-items:center;width:100%;color:${t.value.style.title.color};background:${t.value.style.backgroundColor};justify-content:${t.value.style.title.textAlign==="left"?"flex-start":t.value.style.title.textAlign==="right"?"flex-end":"center"};height:${t.value.style.title.fontSize*2}px;font-size:${t.value.style.title.fontSize}px;font-weight:${t.value.style.title.bold?"bold":"normal"};`)},[e.createElementVNode("span",{style:e.normalizeStyle(`padding:${t.value.style.title.textAlign==="left"?"0 0 0 12px":t.value.style.title.textAlign==="right"?"0 12px 0 0":"0"}`)},e.toDisplayString(c.value?c.value.period:t.value.style.title.text),5)],4)):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};overflow:visible`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkline_gradient_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.area.color,.05)}${e.unref(n.opacity)[t.value.style.area.opacity]}`},null,8,W),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.area.color+e.unref(n.opacity)[t.value.style.area.opacity]},null,8,q)],8,G),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_pos_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.bar.color},null,8,j),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(n.shiftHue)(t.value.style.bar.color,.05)}`},null,8,H)],8,T),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_neg_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.bar.color,.05)}`},null,8,U),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.bar.color},null,8,X)],8,O)]),t.value.style.area.show&&!k.value&&u.value[0]?(e.openBlock(),e.createElementBlock("g",Z,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${u.value[0].x},${o.value.bottom} ${e.unref(n.createSmoothPath)(u.value)} L ${u.value.at(-1).x},${o.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:`${t.value.style.area.color}${e.unref(n.opacity)[t.value.style.area.opacity]}`},null,8,R)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${C.value}Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:`${t.value.style.area.color}${e.unref(n.opacity)[t.value.style.area.opacity]}`},null,8,Y))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${e.unref(n.createSmoothPath)(u.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,J)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(a,s)=>(e.openBlock(),e.createElementBlock("g",null,[s<u.value.length-1&&!t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:u.value[s+1].x,y1:a.y,y2:u.value[s+1].y,stroke:a.color,"stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round","shape-rendering":"geometricPrecision"},null,8,K)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("rect",{key:1,x:a.x-a.width/2,y:a.absoluteValue>0?a.y:x.value,width:a.width,height:Math.abs(a.y-x.value),fill:a.absoluteValue>0?`url(#sparkline_bar_gradient_pos_${v.value})`:`url(#sparkline_bar_gradient_neg_${v.value})`,rx:t.value.style.bar.borderRadius},null,8,Q)):e.createCommentVNode("",!0),t.value.style.verticalIndicator.show&&(c.value&&a.id===c.value.id||m.selectedIndex===s)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.x,x2:a.x,y1:o.value.top-6,y2:o.value.bottom,stroke:t.value.style.verticalIndicator.color||a.color,"stroke-width":t.value.style.verticalIndicator.strokeWidth,"stroke-linecap":"round","stroke-dasharray":t.value.style.verticalIndicator.strokeDasharray||0},null,8,ee)):e.createCommentVNode("",!0)]))),256)),_.value<0?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.value.start,x2:o.value.start+o.value.width-16,y1:x.value,y2:x.value,stroke:t.value.style.zeroLine.color,"stroke-dasharray":t.value.style.zeroLine.strokeWidth*2,"stroke-width":t.value.style.zeroLine.strokeWidth,"stroke-linecap":"round"},null,8,te)):e.createCommentVNode("",!0),t.value.style.plot.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(u.value,(a,s)=>(e.openBlock(),e.createElementBlock("g",null,[c.value&&a.id===c.value.id||m.selectedIndex===s?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:a.x,cy:a.y,r:t.value.style.plot.radius,fill:a.color,stroke:t.value.style.plot.stroke,"stroke-width":t.value.style.plot.strokeWidth},null,8,le)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),m.showInfo&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:t.value.style.dataLabel.position==="left"?12+t.value.style.dataLabel.offsetX:o.value.width+12+t.value.style.dataLabel.offsetX,y:d.value.height/2+t.value.style.dataLabel.fontSize/2.5+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,"font-weight":t.value.style.dataLabel.bold?"bold":"normal",fill:t.value.style.dataLabel.color},e.toDisplayString(c.value?e.unref(n.dataLabel)({p:t.value.style.dataLabel.prefix,v:c.value.absoluteValue,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}):e.unref(n.dataLabel)({p:t.value.style.dataLabel.prefix,v:M.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue})),9,ae)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(a,s)=>(e.openBlock(),e.createElementBlock("rect",{x:a.x-(o.value.width/(y.value+1)>30?30:o.value.width/(y.value+1))/2,y:o.value.top-6,height:o.value.height+6,width:o.value.width/(y.value+1)>30?30:o.value.width/(y.value+1),fill:"transparent",onMouseenter:N=>I(a,s),onMouseleave:S,onClick:()=>P(a,s)},null,40,oe))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],12,F)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(z.default,{key:2,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,D))}},ue=A._export_sfc(ne,[["__scopeId","data-v-ee68f40e"]]);exports.default=ue;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-Xau3hcRk.cjs"),B=require("./useNestedProp-C_EQ-Kxy.cjs"),z=require("./vue-ui-skeleton-CgYrDrh-.cjs"),A=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),D=["id"],F=["xmlns","viewBox"],G=["id"],W=["stop-color"],q=["stop-color"],T=["id"],j=["stop-color"],H=["stop-color"],O=["id"],U=["stop-color"],X=["stop-color"],Z={key:0},R=["d","fill"],Y=["d","fill"],J=["d","stroke","stroke-width"],K=["x1","x2","y1","y2","stroke","stroke-width"],Q=["x","y","width","height","fill","rx"],ee=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],te=["x1","x2","y1","y2","stroke","stroke-dasharray","stroke-width"],le=["cx","cy","r","fill","stroke","stroke-width"],ae=["x","y","font-size","font-weight","fill"],oe=["x","y","height","width","onMouseenter","onClick"],ne={__name:"vue-ui-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},showInfo:{type:Boolean,default:!0},selectedIndex:{type:Number,default:void 0}},emits:["hoverIndex","selectDatapoint"],setup(m,{emit:b}){const i=m,{vue_ui_sparkline:$}=n.useConfig(),g=e.computed(()=>!!i.dataset&&i.dataset.length),v=e.ref(n.createUid()),t=e.computed(()=>{const l=B.useNestedProp({userConfig:i.config,defaultConfig:$});return l.theme?{...B.useNestedProp({userConfig:n.themes.vue_ui_sparkline[l.theme]||i.config,defaultConfig:l})}:l}),f=e.ref(i.dataset.map(l=>t.value.style.animation.show?{...l,value:null}:{...l,value:[void 0].includes(l.value)?null:l.value}));e.onMounted(()=>{if(n.objectIsEmpty(i.dataset)?n.error({componentName:"VueUiSparkline",type:"dataset"}):i.dataset.forEach((l,r)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["period","value"]}).forEach(a=>{n.error({componentName:"VueUiSparkline",type:"datasetSerieAttribute",property:a,index:r})})}),t.value.style.animation.show&&i.dataset.length>1){let a=function(){r<i.dataset.length?(f.value.push(i.dataset[r]),setTimeout(()=>{requestAnimationFrame(a)},l)):f.value=i.dataset,r+=1};f.value=[];const l=t.value.style.animation.animationFrames/i.dataset.length;let r=0;a()}});const d=e.ref({height:80,width:500}),L=e.ref(6),o=e.computed(()=>({top:12,left:0,right:d.value.width,bottom:d.value.height-3,start:i.showInfo&&t.value.style.dataLabel.show&&t.value.style.dataLabel.position==="left"?d.value.width-t.value.style.chartWidth:30,width:i.showInfo&&t.value.style.dataLabel.show?t.value.style.chartWidth:d.value.width-30,height:d.value.height-12})),_=e.computed(()=>Math.min(...f.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0))),V=e.computed(()=>Math.max(...f.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0))),p=e.computed(()=>{const l=_.value>=0?0:_.value;return Math.abs(l)}),E=e.computed(()=>V.value+p.value+L.value),x=e.computed(()=>o.value.bottom-o.value.height*w(p.value));function w(l){return l/E.value}const y=e.computed(()=>i.dataset.length-1),u=e.computed(()=>f.value.map((l,r)=>{const a=isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0;return{absoluteValue:a,period:l.period,plotValue:a+p.value,toMax:w(a+p.value),x:o.value.start+r*(o.value.width/(y.value+1)>30?30:o.value.width/(y.value+1)),y:o.value.bottom-o.value.height*w(a+p.value),id:`plot_${v.value}_${r}`,color:k.value?t.value.style.bar.color:t.value.style.area.useGradient?n.shiftHue(t.value.style.line.color,.05*(1-r/y.value)):t.value.style.line.color,width:o.value.width/(y.value+1)>30?30:o.value.width/(y.value+1)}})),C=e.computed(()=>{const l={x:u.value[0].x,y:d.value.height-6},r={x:u.value[u.value.length-1].x,y:d.value.height-6},a=[];return u.value.forEach(s=>{a.push(`${s.x},${s.y} `)}),[l.x,l.y,...a,r.x,r.y].toString()}),c=e.ref(void 0);function I(l,r){c.value=l,b("hoverIndex",{index:r})}function S(){c.value=void 0,b("hoverIndex",{index:void 0})}const h=e.computed(()=>{if(g.value){const l=u.value.map(a=>a.absoluteValue),r=l.reduce((a,s)=>a+s,0);return{latest:u.value[u.value.length-1].absoluteValue,sum:r,average:r/u.value.length,median:n.calcMedian(l),trend:n.calcLinearProgression(u.value.map(({x:a,y:s,absoluteValue:N})=>({x:a,y:s,value:N}))).trend}}else return{latest:null,sum:null,average:null,median:null,trend:null}}),M=e.computed(()=>g.value?t.value.style.dataLabel.valueType==="latest"?h.value.latest:t.value.style.dataLabel.valueType==="sum"?h.value.sum:t.value.style.dataLabel.valueType==="average"?h.value.average:0:0),k=e.computed(()=>t.value.type&&t.value.type==="bar");function P(l,r){b("selectDatapoint",{datapoint:l,index:r})}return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-sparkline",id:v.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily}`)},[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps({selected:c.value,latest:h.value.latest,sum:h.value.sum,average:h.value.average,median:h.value.median,trend:h.value.trend})),void 0,!0),t.value.style.title.show&&m.showInfo?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-sparkline-title",style:e.normalizeStyle(`display:flex;align-items:center;width:100%;color:${t.value.style.title.color};background:${t.value.style.backgroundColor};justify-content:${t.value.style.title.textAlign==="left"?"flex-start":t.value.style.title.textAlign==="right"?"flex-end":"center"};height:${t.value.style.title.fontSize*2}px;font-size:${t.value.style.title.fontSize}px;font-weight:${t.value.style.title.bold?"bold":"normal"};`)},[e.createElementVNode("span",{style:e.normalizeStyle(`padding:${t.value.style.title.textAlign==="left"?"0 0 0 12px":t.value.style.title.textAlign==="right"?"0 12px 0 0":"0"}`)},e.toDisplayString(c.value?c.value.period:t.value.style.title.text),5)],4)):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};overflow:visible`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkline_gradient_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.area.color,.05)}${e.unref(n.opacity)[t.value.style.area.opacity]}`},null,8,W),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.area.color+e.unref(n.opacity)[t.value.style.area.opacity]},null,8,q)],8,G),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_pos_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.bar.color},null,8,j),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(n.shiftHue)(t.value.style.bar.color,.05)}`},null,8,H)],8,T),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_neg_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.bar.color,.05)}`},null,8,U),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.bar.color},null,8,X)],8,O)]),t.value.style.area.show&&!k.value&&u.value[0]?(e.openBlock(),e.createElementBlock("g",Z,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${u.value[0].x},${o.value.bottom} ${e.unref(n.createSmoothPath)(u.value)} L ${u.value.at(-1).x},${o.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:`${t.value.style.area.color}${e.unref(n.opacity)[t.value.style.area.opacity]}`},null,8,R)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${C.value}Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:`${t.value.style.area.color}${e.unref(n.opacity)[t.value.style.area.opacity]}`},null,8,Y))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${e.unref(n.createSmoothPath)(u.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,J)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(a,s)=>(e.openBlock(),e.createElementBlock("g",null,[s<u.value.length-1&&!t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:u.value[s+1].x,y1:a.y,y2:u.value[s+1].y,stroke:a.color,"stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round","shape-rendering":"geometricPrecision"},null,8,K)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("rect",{key:1,x:a.x-a.width/2,y:a.absoluteValue>0?a.y:x.value,width:a.width,height:Math.abs(a.y-x.value),fill:a.absoluteValue>0?`url(#sparkline_bar_gradient_pos_${v.value})`:`url(#sparkline_bar_gradient_neg_${v.value})`,rx:t.value.style.bar.borderRadius},null,8,Q)):e.createCommentVNode("",!0),t.value.style.verticalIndicator.show&&(c.value&&a.id===c.value.id||m.selectedIndex===s)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.x,x2:a.x,y1:o.value.top-6,y2:o.value.bottom,stroke:t.value.style.verticalIndicator.color||a.color,"stroke-width":t.value.style.verticalIndicator.strokeWidth,"stroke-linecap":"round","stroke-dasharray":t.value.style.verticalIndicator.strokeDasharray||0},null,8,ee)):e.createCommentVNode("",!0)]))),256)),_.value<0?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.value.start,x2:o.value.start+o.value.width-16,y1:x.value,y2:x.value,stroke:t.value.style.zeroLine.color,"stroke-dasharray":t.value.style.zeroLine.strokeWidth*2,"stroke-width":t.value.style.zeroLine.strokeWidth,"stroke-linecap":"round"},null,8,te)):e.createCommentVNode("",!0),t.value.style.plot.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(u.value,(a,s)=>(e.openBlock(),e.createElementBlock("g",null,[c.value&&a.id===c.value.id||m.selectedIndex===s?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:a.x,cy:a.y,r:t.value.style.plot.radius,fill:a.color,stroke:t.value.style.plot.stroke,"stroke-width":t.value.style.plot.strokeWidth},null,8,le)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),m.showInfo&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:t.value.style.dataLabel.position==="left"?12+t.value.style.dataLabel.offsetX:o.value.width+12+t.value.style.dataLabel.offsetX,y:d.value.height/2+t.value.style.dataLabel.fontSize/2.5+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,"font-weight":t.value.style.dataLabel.bold?"bold":"normal",fill:t.value.style.dataLabel.color},e.toDisplayString(c.value?e.unref(n.dataLabel)({p:t.value.style.dataLabel.prefix,v:c.value.absoluteValue,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}):e.unref(n.dataLabel)({p:t.value.style.dataLabel.prefix,v:M.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue})),9,ae)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(a,s)=>(e.openBlock(),e.createElementBlock("rect",{x:a.x-(o.value.width/(y.value+1)>30?30:o.value.width/(y.value+1))/2,y:o.value.top-6,height:o.value.height+6,width:o.value.width/(y.value+1)>30?30:o.value.width/(y.value+1),fill:"transparent",onMouseenter:N=>I(a,s),onMouseleave:S,onClick:()=>P(a,s)},null,40,oe))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],12,F)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(z.default,{key:2,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,D))}},ue=A._export_sfc(ne,[["__scopeId","data-v-ee68f40e"]]);exports.default=ue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as d, ref as w, onMounted as Q, openBlock as s, createElementBlock as n, normalizeStyle as N, renderSlot as D, normalizeProps as Y, guardReactiveProps as J, createElementVNode as f, toDisplayString as F, createCommentVNode as v, unref as c, Fragment as P, renderList as z, createBlock as K } from "vue";
|
|
2
|
-
import { u as ee, c as te, t as ae, o as le, e as G, g as ue, s as I, Q as oe, R as se, X as ne, r as C, L as W, f as B } from "./index-
|
|
3
|
-
import { u as E } from "./useNestedProp-
|
|
4
|
-
import re from "./vue-ui-skeleton-
|
|
2
|
+
import { u as ee, c as te, t as ae, o as le, e as G, g as ue, s as I, Q as oe, R as se, X as ne, r as C, L as W, f as B } from "./index-BK818aZo.js";
|
|
3
|
+
import { u as E } from "./useNestedProp-hi25rRoY.js";
|
|
4
|
+
import re from "./vue-ui-skeleton-DJtTdfNg.js";
|
|
5
5
|
import { _ as ie } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
const de = ["id"], ve = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"], he = ["stop-color"], fe = ["id"], pe = ["stop-color"], ge = ["stop-color"], ke = ["id"], me = ["stop-color"], xe = ["stop-color"], _e = { key: 0 }, be = ["d", "fill"], we = ["d", "fill"], $e = ["d", "stroke", "stroke-width"], Le = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ne = ["x", "y", "width", "height", "fill", "rx"], Ie = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Ce = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], Me = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Se = ["x", "y", "font-size", "font-weight", "fill"], Ve = ["x", "y", "height", "width", "onMouseenter", "onClick"], Pe = {
|
|
7
7
|
__name: "vue-ui-sparkline",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-Xau3hcRk.cjs"),x=require("./useNestedProp-C_EQ-Kxy.cjs"),E=require("./vue-ui-skeleton-CgYrDrh-.cjs"),N=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),V=["xmlns","viewBox"],z=["id"],D=["stop-color"],P=["stop-color"],L=["stop-color"],A={id:"stackPill",clipPathUnits:"objectBoundingBox"},F=["fill"],U={"clip-path":"url(#stackPill)"},j=["height","width","fill"],q=["onClick","x","width","height","fill","stroke"],T=["onClick"],H={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"4px","justify-content":"center"}},I=["height","width"],O=["fill"],M={__name:"vue-ui-sparkstackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(B,{emit:w}){const u=B,{vue_ui_sparkstackbar:$}=o.useConfig(),f=e.computed(()=>!!u.dataset&&u.dataset.length),b=e.ref(o.createUid()),t=e.computed(()=>{const l=x.useNestedProp({userConfig:u.config,defaultConfig:$});return l.theme?{...x.useNestedProp({userConfig:o.themes.vue_ui_sparkstackbar[l.theme]||u.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}),m=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),d=e.ref(u.dataset.map((l,n)=>({...l,value:t.value.style.animation.show?0:l.value||0,color:l.color?o.convertColorToHex(l.color):m.value[n]||o.palette[n]||o.palette[n%o.palette.length]}))),p=e.ref(!0);e.onMounted(()=>{if(o.objectIsEmpty(u.dataset)?o.error({componentName:"VueUiSparkStackbar",type:"dataset"}):u.dataset.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkStackbar",type:"datasetSerieAttribute",property:a,index:n})})}),t.value.style.animation.show){let k=function(){r+=a/l,r<a?(d.value=d.value.map((s,i)=>({...s,value:s.value+=n[i],color:s.color?o.convertColorToHex(s.color):m.value[i]||o.palette[i]||o.palette[i%o.palette.length]})),requestAnimationFrame(k)):(p.value=!1,d.value=u.dataset.map((s,i)=>({...s,value:s.value||0,color:s.color?o.convertColorToHex(s.color):m.value[i]||o.palette[i]||o.palette[i%o.palette.length],id:o.createUid()})))};const l=t.value.style.animation.animationFrames,n=u.dataset.map((s,i)=>s.value/l),a=u.dataset.map(s=>s.value||0).reduce((s,i)=>s+i,0);let r=0;p.value=!0,k()}});const v=e.ref({width:500,height:16}),c=e.ref([]),g=e.computed(()=>u.dataset.map(l=>l.value||0).filter((l,n)=>!c.value.includes(n)).reduce((l,n)=>l+n,0)),_=e.computed(()=>d.value.map((l,n)=>({...l,value:l.value||0,proportion:(l.value||0)/g.value,width:(l.value||0)/g.value*v.value.width,proportionLabel:o.dataLabel({v:(l.value||0)/g.value*100,s:"%",r:t.value.style.legend.percentage.rounding})}))),y=e.computed(()=>_.value.filter((l,n)=>!c.value.includes(n)));function S(l){c.value.includes(l)?c.value=c.value.filter(n=>n!==l):c.value.length<d.value.length-1&&c.value.push(l)}const h=e.computed(()=>{let l=0;const n=[];for(let a=0;a<y.value.length;a+=1)n.push({...y.value[a],start:l}),l+=y.value[a].width;return n});function C(l,n){w("selectDatapoint",{datapoint:l,index:n})}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%; background:${t.value.style.backgroundColor}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:${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.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),width:"100%",viewBox:`0 0 ${v.value.width} ${v.value.height}`},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`stack_gradient_${r}`,gradientTransform:"rotate(90)",id:`stack_gradient_${r}_${b.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,D),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(o.shiftHue)(a.color,.05)}${e.unref(o.opacity)[100-t.value.style.bar.gradient.intensity]}`},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,L)],8,z))),128)),e.createElementVNode("clipPath",A,[e.createElementVNode("rect",{x:"0.005",y:"-2",width:"0.99",height:"5",rx:"3",ry:"3",fill:t.value.style.backgroundColor},null,8,F)])]),e.createElementVNode("g",U,[e.createElementVNode("rect",{x:0,y:0,height:v.value.height,width:h.value.map(a=>a.width).reduce((a,r)=>a+r,0),fill:t.value.style.bar.gradient.underlayerColor,class:e.normalizeClass({animated:!p.value})},null,10,j),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_${r}`,onClick:()=>C(a,r),x:a.start,y:0,width:a.width,height:v.value.height,fill:t.value.style.bar.gradient.show?`url(#stack_gradient_${r}_${b.value})`:a.color,stroke:t.value.style.backgroundColor,"stroke-linecap":"round",class:e.normalizeClass({animated:!p.value})},null,10,q))),128))])],8,V)):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E.default,{key:2,config:{type:"sparkStackbar",style:{backgroundColor:t.value.style.backgroundColor,sparkStackbar:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.legend.show?(e.openBlock(),e.createElementBlock("div",{key:3,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};margin:0 auto;margin:${t.value.style.legend.margin};justify-content:${t.value.style.legend.textAlign==="left"?"flex-start":t.value.style.legend.textAlign==="right"?"flex-end":"center"}`),class:"vue-ui-sparkstackbar-legend"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-size:${t.value.style.legend.fontSize}px;`),class:e.normalizeClass({"vue-ui-sparkstackbar-legend-item":!0,"vue-ui-sparkstackbar-legend-item-unselected":c.value.includes(r)}),onClick:k=>{S(r),C(a,r)}},[e.createElementVNode("div",H,[(e.openBlock(),e.createElementBlock("svg",{height:`${t.value.style.legend.fontSize}px`,width:`${t.value.style.legend.fontSize}px`,viewBox:"0 0 10 10"},[e.createElementVNode("circle",{cx:5,cy:5,r:5,fill:a.color},null,8,O)],8,I)),e.createElementVNode("span",{style:e.normalizeStyle(`color:${t.value.style.legend.name.color}; font-weight:${t.value.style.legend.name.bold?"bold":"normal"}`)},e.toDisplayString(a.name),5),t.value.style.legend.percentage.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.legend.percentage.bold?"bold":"normal"};color:${t.value.style.legend.percentage.color}`)},e.toDisplayString(c.value.includes(r)?" - ":a.proportionLabel),5)):e.createCommentVNode("",!0),t.value.style.legend.value.show?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-weight:${t.value.style.legend.value.bold?"bold":"normal"};color:${t.value.style.legend.value.color}`)}," ("+e.toDisplayString(e.unref(o.dataLabel)({p:t.value.style.legend.value.prefix,v:a.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}))+") ",5)):e.createCommentVNode("",!0)])],14,T))),256))],4)):e.createCommentVNode("",!0)],4))}},G=N._export_sfc(M,[["__scopeId","data-v-2006741b"]]);exports.default=G;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as p, ref as m, onMounted as T, openBlock as n, createElementBlock as r, normalizeStyle as g, createElementVNode as u, toDisplayString as k, createCommentVNode as h, unref as _, Fragment as D, renderList as z, normalizeClass as A, createBlock as q } from "vue";
|
|
2
|
-
import { u as H, c as j, t as X, a as J, p as d, b as K, d as P, o as Q, e as E, g as R, f as U, X as W, s as Y, r as Z } from "./index-
|
|
3
|
-
import { u as I } from "./useNestedProp-
|
|
4
|
-
import ee from "./vue-ui-skeleton-
|
|
2
|
+
import { u as H, c as j, t as X, a as J, p as d, b as K, d as P, o as Q, e as E, g as R, f as U, X as W, s as Y, r as Z } from "./index-BK818aZo.js";
|
|
3
|
+
import { u as I } from "./useNestedProp-hi25rRoY.js";
|
|
4
|
+
import ee from "./vue-ui-skeleton-DJtTdfNg.js";
|
|
5
5
|
import { _ as te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
const le = ["xmlns", "viewBox"], ae = ["id"], oe = ["stop-color"], se = ["stop-color"], ne = ["stop-color"], re = {
|
|
7
7
|
id: "stackPill",
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as d, ref as c, onMounted as Te, onBeforeUnmount as Le, openBlock as s, createElementBlock as i, normalizeClass as O, normalizeStyle as V, createVNode as q, createCommentVNode as v, createBlock as B, unref as m, createSlots as Se, withCtx as y, renderSlot as g, normalizeProps as Y, guardReactiveProps as K, Fragment as b, renderList as C, createElementVNode as x, toDisplayString as $, mergeProps as Pe, createTextVNode as ze, nextTick as Ae } from "vue";
|
|
2
|
-
import { u as Ne, c as Q, t as Oe, a as Fe, p as T, o as We, e as Z, g as ve, b as Me, d as he, z as Ie, f as H, X as De, l as Ge, h as Ee, v as de, w as Ve, n as Be, q as He, B as Re } from "./index-
|
|
2
|
+
import { u as Ne, c as Q, t as Oe, a as Fe, p as T, o as We, e as Z, g as ve, b as Me, d as he, z as Ie, f as H, X as De, l as Ge, h as Ee, v as de, w as Ve, n as Be, q as He, B as Re } from "./index-BK818aZo.js";
|
|
3
3
|
import { t as Ue, u as Xe } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as je } from "./Title-
|
|
5
|
-
import { u as Je, U as qe } from "./usePrinter-
|
|
6
|
-
import { _ as Ye } from "./Tooltip-
|
|
7
|
-
import { D as Ke } from "./DataTable-
|
|
8
|
-
import Qe from "./vue-ui-skeleton-
|
|
9
|
-
import { _ as Ze } from "./Shape-
|
|
10
|
-
import et from "./vue-ui-accordion-
|
|
11
|
-
import { u as pe } from "./useNestedProp-
|
|
4
|
+
import { _ as je } from "./Title-DJ269q6H.js";
|
|
5
|
+
import { u as Je, U as qe } from "./usePrinter-C-2KAW2f.js";
|
|
6
|
+
import { _ as Ye } from "./Tooltip-CKKSlbSq.js";
|
|
7
|
+
import { D as Ke } from "./DataTable-R7hmQ0wl.js";
|
|
8
|
+
import Qe from "./vue-ui-skeleton-DJtTdfNg.js";
|
|
9
|
+
import { _ as Ze } from "./Shape-CCI8C_dI.js";
|
|
10
|
+
import et from "./vue-ui-accordion-CH8K6f6J.js";
|
|
11
|
+
import { u as pe } from "./useNestedProp-hi25rRoY.js";
|
|
12
12
|
import { _ as tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const lt = ["id"], at = ["xmlns", "viewBox"], ot = { key: 0 }, st = { key: 0 }, rt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], ut = { key: 1 }, it = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], nt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ct = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], vt = ["x", "y", "fill", "font-size"], ht = ["x", "y", "font-size", "fill"], dt = ["fill", "font-size", "transform"], pt = ["fill", "font-size", "x", "y"], yt = ["x1", "x2", "y1", "y2", "stroke"], ft = ["cx", "cy", "fill"], bt = ["cx", "cy", "fill"], mt = ["id"], gt = ["stop-color"], xt = ["stop-color"], kt = ["stop-color"], Ct = { key: 0 }, wt = ["x", "y", "font-size", "fill"], _t = ["innerHTML"], $t = {
|
|
14
14
|
__name: "vue-ui-strip-plot",
|