vue-data-ui 2.3.2 → 2.3.4
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-B6gJebT9.js +101 -0
- package/dist/Arrow-C5yj6zwY.cjs +1 -0
- package/dist/BaseIcon-7_g11dRj.js +174 -0
- package/dist/BaseIcon-JtWoVorZ.cjs +1 -0
- package/dist/DataTable-CwaOlAsy.js +127 -0
- package/dist/DataTable-Rm9II-m2.cjs +1 -0
- package/dist/Legend-CxvJTjEm.js +62 -0
- package/dist/Legend-D59FIuMs.cjs +1 -0
- package/dist/Shape-CVItL3vh.cjs +1 -0
- package/dist/Shape-CjLV0scA.js +107 -0
- package/dist/Slicer-Bxg5niHl.js +156 -0
- package/dist/Slicer-Cdss5Rus.cjs +1 -0
- package/dist/Title-2iks1ziC.js +46 -0
- package/dist/Title-Bb-A5OSV.cjs +1 -0
- package/dist/Tooltip-C3phqKuU.js +94 -0
- package/dist/Tooltip-C_UE6y-E.cjs +1 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
- package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
- package/dist/index-p5gfZSvB.cjs +4 -0
- package/dist/index-uOtklCCx.js +10268 -0
- package/dist/{index.es-BoVO5twe.js → index.es-YufTdp0y.js} +1 -1
- package/dist/{index.es-w_iDpZ-o.cjs → index.es-uyeSCnWE.cjs} +1 -1
- package/dist/jspdf.es.min-C660YX78.js +8038 -0
- package/dist/jspdf.es.min-DLYY9DTT.cjs +243 -0
- package/dist/pdf-97UbtKC2.js +44 -0
- package/dist/pdf-Cz3729tZ.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/useNestedProp-2kIU-7On.cjs +1 -0
- package/dist/useNestedProp-BgWkUab_.js +13 -0
- package/dist/usePrinter-B6xQCyL-.js +464 -0
- package/dist/usePrinter-fZlsJid8.cjs +1 -0
- package/dist/useResponsive-B3TrDDIG.cjs +1 -0
- package/dist/useResponsive-NZB-WLRF.js +187 -0
- package/dist/vue-data-ui-Be0rgmbA.cjs +9 -0
- package/dist/vue-data-ui-Ccy6rBZN.js +246 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +62 -61
- package/dist/vue-ui-3d-bar-BKMPFDi2.js +1085 -0
- package/dist/vue-ui-3d-bar-CKa4UXq4.cjs +19 -0
- package/dist/vue-ui-accordion-C_pwrAJl.cjs +1 -0
- package/dist/vue-ui-accordion-HJPf7My0.js +77 -0
- package/dist/vue-ui-age-pyramid-CE1xnA-8.cjs +1 -0
- package/dist/vue-ui-age-pyramid-DB_CL-gu.js +596 -0
- package/dist/vue-ui-annotator-BAMZcPlH.cjs +371 -0
- package/dist/vue-ui-annotator-DQsAL-nZ.js +2177 -0
- package/dist/vue-ui-candlestick-DCl8fpNu.js +657 -0
- package/dist/vue-ui-candlestick-Duv6oG79.cjs +2 -0
- package/dist/vue-ui-chestnut-BYHA6MT4.js +1051 -0
- package/dist/vue-ui-chestnut-mIZ4-ZEM.cjs +6 -0
- package/dist/vue-ui-cursor-C96IChA3.js +229 -0
- package/dist/vue-ui-cursor-De7dy4Mo.cjs +1 -0
- package/dist/vue-ui-dashboard-B2Yz41yO.js +232 -0
- package/dist/vue-ui-dashboard-BMGwKr0K.cjs +1 -0
- package/dist/vue-ui-digits-BnxLp7zQ.js +153 -0
- package/dist/vue-ui-digits-DSWyL-5K.cjs +1 -0
- package/dist/vue-ui-donut-1kei9ws5.cjs +1 -0
- package/dist/vue-ui-donut-B9iXisHK.js +743 -0
- package/dist/vue-ui-donut-evolution-B7Sun8sw.js +799 -0
- package/dist/vue-ui-donut-evolution-yv17DnGy.cjs +1 -0
- package/dist/vue-ui-dumbbell-BJEf_JEq.cjs +9 -0
- package/dist/vue-ui-dumbbell-DIsDnD1d.js +624 -0
- package/dist/vue-ui-flow-BTivYoGd.js +454 -0
- package/dist/vue-ui-flow-DOxJa8di.cjs +1 -0
- package/dist/vue-ui-galaxy-BEmywfFB.js +485 -0
- package/dist/vue-ui-galaxy-CHGOwCwM.cjs +1 -0
- package/dist/vue-ui-gauge-QAfMl-8t.cjs +1 -0
- package/dist/vue-ui-gauge-o4rDOqF3.js +466 -0
- package/dist/vue-ui-heatmap-BS4EzedX.cjs +1 -0
- package/dist/vue-ui-heatmap-DwqQqEsk.js +598 -0
- package/dist/vue-ui-kpi-F4qkJ_U-.cjs +1 -0
- package/dist/vue-ui-kpi-h8elYTcA.js +54 -0
- package/dist/vue-ui-mini-loader-C_8B2Pm6.cjs +1 -0
- package/dist/vue-ui-mini-loader-Cgoi9rhH.js +131 -0
- package/dist/vue-ui-molecule-Bmv76SWz.js +750 -0
- package/dist/vue-ui-molecule-C5CY_YYc.cjs +1 -0
- package/dist/vue-ui-mood-radar-BN0dzlfp.cjs +1 -0
- package/dist/vue-ui-mood-radar-DeMouUIe.js +548 -0
- package/dist/vue-ui-nested-donuts-ZyFoV-Zn.cjs +16 -0
- package/dist/vue-ui-nested-donuts-wOUkSVyZ.js +771 -0
- package/dist/vue-ui-onion-DCOKG2wG.js +554 -0
- package/dist/vue-ui-onion-VmTUo7TR.cjs +1 -0
- package/dist/vue-ui-parallel-coordinate-plot-BGtO2P4a.js +651 -0
- package/dist/vue-ui-parallel-coordinate-plot-BziXRF8E.cjs +8 -0
- package/dist/vue-ui-quadrant--JOTjPZh.js +1178 -0
- package/dist/vue-ui-quadrant-DawUUrur.cjs +1 -0
- package/dist/vue-ui-quick-chart-LXKfaJgS.js +1310 -0
- package/dist/vue-ui-quick-chart-jFlFtiNV.cjs +13 -0
- package/dist/vue-ui-radar-CWNIqvcA.js +614 -0
- package/dist/vue-ui-radar-VGH-lhaT.cjs +1 -0
- package/dist/vue-ui-rating-BNrIoJHN.js +271 -0
- package/dist/vue-ui-rating-Dtu6pwGx.cjs +1 -0
- package/dist/vue-ui-relation-circle-B3NKudOy.js +304 -0
- package/dist/vue-ui-relation-circle-Dwpx9o18.cjs +1 -0
- package/dist/vue-ui-rings-CsUngX_F.js +510 -0
- package/dist/vue-ui-rings-D9_OG--0.cjs +1 -0
- package/dist/vue-ui-scatter-DUsuh7bd.cjs +1 -0
- package/dist/vue-ui-scatter-DgxTz4Jx.js +874 -0
- package/dist/vue-ui-screenshot-51H_VrYY.js +160 -0
- package/dist/vue-ui-screenshot-C2Dz7CAe.cjs +3 -0
- package/dist/vue-ui-skeleton-BM9rwmxY.js +2064 -0
- package/dist/vue-ui-skeleton-sjfOtCZr.cjs +41 -0
- package/dist/vue-ui-smiley-DNnBtHht.cjs +2 -0
- package/dist/vue-ui-smiley-H5rSN-1B.js +763 -0
- package/dist/vue-ui-spark-trend-CLXZDYlk.js +246 -0
- package/dist/vue-ui-spark-trend-R4JJvfry.cjs +1 -0
- package/dist/vue-ui-sparkbar-C0k4ah-7.js +242 -0
- package/dist/vue-ui-sparkbar-CEUDIw0A.cjs +1 -0
- package/dist/vue-ui-sparkgauge-BHj00A07.js +157 -0
- package/dist/vue-ui-sparkgauge-CaEw6nmI.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-B6GuavEu.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-DbMLYKqE.js +244 -0
- package/dist/vue-ui-sparkline-CJydanLS.cjs +1 -0
- package/dist/vue-ui-sparkline-CYova9x3.js +333 -0
- package/dist/vue-ui-sparkstackbar-Df__yM5b.cjs +1 -0
- package/dist/vue-ui-sparkstackbar-N5rVBM2h.js +244 -0
- package/dist/vue-ui-strip-plot-DJJ1vEWz.js +618 -0
- package/dist/vue-ui-strip-plot-b5lhB35d.cjs +1 -0
- package/dist/vue-ui-table-NHhOVDbs.cjs +14 -0
- package/dist/vue-ui-table-heatmap-Cro2etCY.js +237 -0
- package/dist/vue-ui-table-heatmap-DlL2nCqz.cjs +1 -0
- package/dist/vue-ui-table-sparkline-Bw2Gc_ur.cjs +1 -0
- package/dist/vue-ui-table-sparkline-DppMitqF.js +420 -0
- package/dist/vue-ui-table-xSvwJIa7.js +1430 -0
- package/dist/vue-ui-thermometer-M2kdp1x5.js +385 -0
- package/dist/vue-ui-thermometer-Q_3PX2V3.cjs +1 -0
- package/dist/vue-ui-timer-BtSDeIRp.cjs +64 -0
- package/dist/vue-ui-timer-CAaQ-QD6.js +453 -0
- package/dist/vue-ui-tiremarks-CbGOSEvD.cjs +1 -0
- package/dist/vue-ui-tiremarks-JFv4JLP0.js +249 -0
- package/dist/vue-ui-treemap-BqDX-bPf.cjs +1 -0
- package/dist/vue-ui-treemap-DCnv-xYr.js +722 -0
- package/dist/vue-ui-vertical-bar-CEbApJZl.js +737 -0
- package/dist/vue-ui-vertical-bar-CJB_KXyr.cjs +4 -0
- package/dist/vue-ui-waffle-CTS6C7gu.js +638 -0
- package/dist/vue-ui-waffle-IMEbGe-b.cjs +1 -0
- package/dist/vue-ui-wheel-CuOmEWMQ.cjs +1 -0
- package/dist/vue-ui-wheel-_zyCdFiI.js +227 -0
- package/dist/vue-ui-word-cloud-RDlXBEAN.js +346 -0
- package/dist/vue-ui-word-cloud-Y7Yk7uUJ.cjs +1 -0
- package/dist/vue-ui-xy-BZJQBKnU.cjs +3 -0
- package/dist/vue-ui-xy-DsvN9EIQ.js +2064 -0
- package/dist/vue-ui-xy-canvas-D_dnbyFS.cjs +9 -0
- package/dist/vue-ui-xy-canvas-Dbcw8-9Q.js +1006 -0
- package/package.json +1 -1
- package/dist/index-C6KVJkgd.cjs +0 -843
- package/dist/index-bDBuMYfe.js +0 -57303
|
@@ -0,0 +1,598 @@
|
|
|
1
|
+
import { useCssVars as ke, computed as c, ref as g, onMounted as Ce, openBlock as s, createElementBlock as n, normalizeClass as G, normalizeStyle as f, createVNode as q, createCommentVNode as y, createBlock as K, unref as z, createSlots as $e, withCtx as w, renderSlot as _, normalizeProps as J, guardReactiveProps as Q, Fragment as T, renderList as S, createElementVNode as u, toDisplayString as p, withKeys as Le, createTextVNode as ze, nextTick as Te } from "vue";
|
|
2
|
+
import { u as Se, o as Ae, e as de, c as Z, t as Ne, g as Me, H as ee, X as Fe, C as Ve, f as ve, v as Ie, w as Oe, n as Pe, q as Be } from "./index-uOtklCCx.js";
|
|
3
|
+
import { _ as Re } from "./Title-2iks1ziC.js";
|
|
4
|
+
import { u as Ee, U as Ge } from "./usePrinter-B6xQCyL-.js";
|
|
5
|
+
import { _ as He } from "./Tooltip-C3phqKuU.js";
|
|
6
|
+
import Xe from "./vue-ui-skeleton-BM9rwmxY.js";
|
|
7
|
+
import Ue from "./BaseIcon-7_g11dRj.js";
|
|
8
|
+
import je from "./vue-ui-accordion-HJPf7My0.js";
|
|
9
|
+
import { u as ce } from "./useNestedProp-BgWkUab_.js";
|
|
10
|
+
import { _ as De } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
+
const We = ["id"], Ye = ["xmlns", "viewBox"], qe = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], Ke = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], Je = ["font-size", "font-weight", "fill", "x", "y"], Qe = ["x", "y", "width", "height", "onMouseover"], Ze = { key: 0 }, el = ["font-size", "fill", "x", "y", "font-weight"], ll = { key: 0 }, tl = ["x", "y", "font-size", "fill", "font-weight"], al = { key: 1 }, ol = ["x", "y", "width", "height", "stroke", "stroke-width"], sl = { key: 2 }, ul = ["id"], nl = ["stop-color"], il = ["stop-color"], rl = ["x", "y", "font-size", "fill"], dl = ["x", "y", "height", "rx", "fill"], vl = ["x", "y", "font-size", "fill"], cl = ["stroke", "x1", "x2", "y1", "y2"], yl = ["fill", "d"], hl = { key: 3 }, gl = {
|
|
12
|
+
id: "colorScaleHorizontal",
|
|
13
|
+
x1: "0%",
|
|
14
|
+
x2: "100%",
|
|
15
|
+
y1: "0%",
|
|
16
|
+
y2: "0%"
|
|
17
|
+
}, pl = ["stop-color"], fl = ["stop-color"], bl = ["x", "y", "width", "height", "rx"], ml = ["x", "y", "font-size", "fill"], xl = ["x", "y", "font-size", "fill"], wl = ["stroke", "x1", "x2", "y1", "y2"], _l = ["fill", "d"], kl = { class: "vue-ui-data-table" }, Cl = { key: 0 }, $l = ["data-cell"], Ll = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, zl = ["data-cell"], Tl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Sl = {
|
|
18
|
+
__name: "vue-ui-heatmap",
|
|
19
|
+
props: {
|
|
20
|
+
config: {
|
|
21
|
+
type: Object,
|
|
22
|
+
default() {
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
dataset: {
|
|
27
|
+
type: Array,
|
|
28
|
+
default() {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
setup(P, { expose: ye }) {
|
|
34
|
+
const d = P;
|
|
35
|
+
ke((l) => ({
|
|
36
|
+
"2d7e5208": l.tdo
|
|
37
|
+
}));
|
|
38
|
+
const { vue_ui_heatmap: he } = Se(), B = c(() => !!d.dataset && d.dataset.length);
|
|
39
|
+
Ae(d.dataset) && de({
|
|
40
|
+
componentName: "VueUiHeatmap",
|
|
41
|
+
type: "dataset"
|
|
42
|
+
});
|
|
43
|
+
const N = g(Z()), H = g(null), ge = g(null), X = g(!1), U = g(""), le = g(void 0), M = g(null), te = g(0), ae = g(null), oe = g(!1), e = c(() => {
|
|
44
|
+
const l = ce({
|
|
45
|
+
userConfig: d.config,
|
|
46
|
+
defaultConfig: he
|
|
47
|
+
});
|
|
48
|
+
return l.theme ? {
|
|
49
|
+
...ce({
|
|
50
|
+
userConfig: Ne.vue_ui_heatmap[l.theme] || d.config,
|
|
51
|
+
defaultConfig: l
|
|
52
|
+
})
|
|
53
|
+
} : l;
|
|
54
|
+
}), { isPrinting: pe, isImaging: fe, generatePdf: se, generateImage: ue } = Ee({
|
|
55
|
+
elementId: `heatmap__${N.value}`,
|
|
56
|
+
fileName: e.value.style.title.text || "vue-ui-heatmap"
|
|
57
|
+
}), b = g({
|
|
58
|
+
showTable: e.value.table.show,
|
|
59
|
+
showTooltip: e.value.style.tooltip.show
|
|
60
|
+
}), be = c(() => e.value.table.responsiveBreakpoint);
|
|
61
|
+
function me() {
|
|
62
|
+
new ResizeObserver((a) => {
|
|
63
|
+
a.forEach((o) => {
|
|
64
|
+
oe.value = o.contentRect.width < be.value;
|
|
65
|
+
});
|
|
66
|
+
}).observe(ae.value);
|
|
67
|
+
}
|
|
68
|
+
Ce(me);
|
|
69
|
+
const A = c(() => Math.max(...d.dataset.flatMap((l) => (l.values || []).length))), m = c(() => {
|
|
70
|
+
const l = e.value.style.layout.padding.top + e.value.style.layout.padding.bottom + d.dataset.length * e.value.style.layout.cells.height, a = e.value.style.layout.padding.left + e.value.style.layout.padding.right + (A.value < d.dataset.length ? d.dataset.length : A.value) * e.value.style.layout.cells.height, o = l + (e.value.style.legend.show ? e.value.style.legend.position === "right" ? 0 : e.value.style.layout.cells.height * 2 : 0);
|
|
71
|
+
return {
|
|
72
|
+
height: l,
|
|
73
|
+
heightWithLegend: o,
|
|
74
|
+
width: a
|
|
75
|
+
};
|
|
76
|
+
}), R = c(() => e.value.style.legend.position), t = c(() => ({
|
|
77
|
+
top: e.value.style.layout.padding.top,
|
|
78
|
+
left: e.value.style.layout.padding.left,
|
|
79
|
+
right: m.value.width - e.value.style.layout.padding.right - (R.value === "right" && e.value.style.legend.show ? 92 : 0),
|
|
80
|
+
bottom: m.value.height - e.value.style.layout.padding.bottom,
|
|
81
|
+
height: m.value.height - e.value.style.layout.padding.top - e.value.style.layout.padding.bottom,
|
|
82
|
+
width: m.value.width - e.value.style.layout.padding.right - e.value.style.layout.padding.left - (R.value === "right" && e.value.style.legend.show ? 92 : 0)
|
|
83
|
+
})), j = c(() => i.value.height * d.dataset.length), x = c(() => Math.max(...d.dataset.flatMap((l) => l.values))), F = c(() => Math.min(...d.dataset.flatMap((l) => l.values))), L = c(() => {
|
|
84
|
+
const l = d.dataset.flatMap((o) => o.values);
|
|
85
|
+
return l.reduce((o, r) => o + r, 0) / l.length;
|
|
86
|
+
}), i = c(() => ({
|
|
87
|
+
width: t.value.width / A.value,
|
|
88
|
+
height: t.value.width / (A.value < d.dataset.length ? d.dataset.length : A.value)
|
|
89
|
+
})), k = c(() => {
|
|
90
|
+
const l = e.value.style.layout.dataLabels.yAxis.values.length ? e.value.style.layout.dataLabels.yAxis.values : d.dataset.map((o) => o.name), a = e.value.style.layout.dataLabels.xAxis.values;
|
|
91
|
+
return {
|
|
92
|
+
yLabels: l,
|
|
93
|
+
xLabels: a.slice(0, A.value)
|
|
94
|
+
};
|
|
95
|
+
}), E = c(() => (d.dataset.forEach((l, a) => {
|
|
96
|
+
Me({
|
|
97
|
+
datasetObject: l,
|
|
98
|
+
requiredAttributes: ["values"]
|
|
99
|
+
}).forEach((o) => {
|
|
100
|
+
de({
|
|
101
|
+
componentName: "VueUiHeatmap",
|
|
102
|
+
type: "datasetSerieAttribute",
|
|
103
|
+
property: "values",
|
|
104
|
+
index: a
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
}), d.dataset.map((l) => ({
|
|
108
|
+
...l,
|
|
109
|
+
temperatures: (l.values || []).map((a, o) => a >= L.value ? {
|
|
110
|
+
side: "up",
|
|
111
|
+
color: ee(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, F.value, x.value, a),
|
|
112
|
+
ratio: Math.abs(Math.abs(a - L.value) / Math.abs(x.value - L.value)) > 1 ? 1 : Math.abs(Math.abs(a - L.value) / Math.abs(x.value - L.value)),
|
|
113
|
+
value: a,
|
|
114
|
+
yAxisName: l.name,
|
|
115
|
+
xAxisName: k.value.xLabels[o],
|
|
116
|
+
id: `vue-data-ui-heatmap-cell-${Z()}`
|
|
117
|
+
} : {
|
|
118
|
+
side: "down",
|
|
119
|
+
ratio: Math.abs(1 - Math.abs(a) / Math.abs(L.value)) > 1 ? 1 : Math.abs(1 - Math.abs(a) / Math.abs(L.value)),
|
|
120
|
+
color: ee(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, F.value, x.value, a),
|
|
121
|
+
value: a,
|
|
122
|
+
yAxisName: l.name,
|
|
123
|
+
xAxisName: k.value.xLabels[o],
|
|
124
|
+
id: `vue-data-ui-heatmap-cell-${Z()}`
|
|
125
|
+
})
|
|
126
|
+
})))), C = g(null), D = g(null);
|
|
127
|
+
function xe(l, a, o, r) {
|
|
128
|
+
M.value = { x: o, y: r }, console.log(l);
|
|
129
|
+
const { value: v, yAxisName: h, xAxisName: $, id: _e } = l;
|
|
130
|
+
le.value = _e, C.value = v, D.value = {
|
|
131
|
+
datapoint: l,
|
|
132
|
+
seriesIndex: a,
|
|
133
|
+
series: E.value,
|
|
134
|
+
config: e.value
|
|
135
|
+
}, X.value = !0;
|
|
136
|
+
let W = "";
|
|
137
|
+
const Y = e.value.style.tooltip.customFormat;
|
|
138
|
+
Ie(Y) && Oe(() => Y({
|
|
139
|
+
datapoint: l,
|
|
140
|
+
seriesIndex: a,
|
|
141
|
+
series: E.value,
|
|
142
|
+
config: e.value
|
|
143
|
+
})) ? U.value = Y({
|
|
144
|
+
datapoint: l,
|
|
145
|
+
seriesIndex: a,
|
|
146
|
+
series: E.value,
|
|
147
|
+
config: e.value
|
|
148
|
+
}) : (W += `<div>${h} ${$ ? `${$}` : ""}</div>`, W += `<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${e.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${ee(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, F.value, x.value, v)}">⬤</span><span>${isNaN(v) ? "-" : ve({ p: e.value.style.layout.dataLabels.prefix, v, s: e.value.style.layout.dataLabels.suffix, r: e.value.style.tooltip.roundingValue })}</span></div>`, U.value = `<div style="font-size:${e.value.style.tooltip.fontSize}px">${W}</div>`);
|
|
149
|
+
}
|
|
150
|
+
const V = c(() => t.value.top + j.value * (1 - C.value / x.value)), I = c(() => t.value.left + (m.value.width - t.value.left - e.value.style.layout.padding.right) * (C.value / x.value));
|
|
151
|
+
c(() => {
|
|
152
|
+
const l = d.dataset.map((o) => ({
|
|
153
|
+
name: o.name
|
|
154
|
+
})), a = d.dataset.map((o) => o.values);
|
|
155
|
+
return { head: l, body: a };
|
|
156
|
+
});
|
|
157
|
+
function ne() {
|
|
158
|
+
Te(() => {
|
|
159
|
+
const l = ["", ...d.dataset.map((v, h) => v.name)], a = [];
|
|
160
|
+
for (let v = 0; v < k.value.xLabels.length; v += 1) {
|
|
161
|
+
const h = [k.value.xLabels[v]];
|
|
162
|
+
for (let $ = 0; $ < d.dataset.length; $ += 1)
|
|
163
|
+
h.push([d.dataset[$].values[v]]);
|
|
164
|
+
a.push(h);
|
|
165
|
+
}
|
|
166
|
+
const o = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([l]).concat(a), r = Pe(o);
|
|
167
|
+
Be({ csvContent: r, title: e.value.style.title.text || "vue-ui-heatmap" });
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
const O = g(!1);
|
|
171
|
+
function we(l) {
|
|
172
|
+
O.value = l, te.value += 1;
|
|
173
|
+
}
|
|
174
|
+
function ie() {
|
|
175
|
+
b.value.showTable = !b.value.showTable;
|
|
176
|
+
}
|
|
177
|
+
function re() {
|
|
178
|
+
b.value.showTooltip = !b.value.showTooltip;
|
|
179
|
+
}
|
|
180
|
+
return ye({
|
|
181
|
+
generatePdf: se,
|
|
182
|
+
generateCsv: ne,
|
|
183
|
+
generateImage: ue,
|
|
184
|
+
toggleTable: ie,
|
|
185
|
+
toggleTooltip: re
|
|
186
|
+
}), (l, a) => (s(), n("div", {
|
|
187
|
+
ref_key: "heatmapChart",
|
|
188
|
+
ref: H,
|
|
189
|
+
class: G(`vue-ui-heatmap ${O.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
190
|
+
style: f(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.title.text ? "" : "padding-top:36px"};background:${e.value.style.backgroundColor}`),
|
|
191
|
+
id: `heatmap__${N.value}`
|
|
192
|
+
}, [
|
|
193
|
+
e.value.style.title.text ? (s(), n("div", {
|
|
194
|
+
key: 0,
|
|
195
|
+
style: f(`width:100%;background:${e.value.style.backgroundColor}`)
|
|
196
|
+
}, [
|
|
197
|
+
q(Re, {
|
|
198
|
+
config: {
|
|
199
|
+
title: {
|
|
200
|
+
cy: "heatmap-div-title",
|
|
201
|
+
...e.value.style.title
|
|
202
|
+
},
|
|
203
|
+
subtitle: {
|
|
204
|
+
cy: "heatmap-div-subtitle",
|
|
205
|
+
...e.value.style.title.subtitle
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}, null, 8, ["config"])
|
|
209
|
+
], 4)) : y("", !0),
|
|
210
|
+
e.value.userOptions.show && B.value ? (s(), K(Ge, {
|
|
211
|
+
ref_key: "details",
|
|
212
|
+
ref: ge,
|
|
213
|
+
key: `user_options_${te.value}`,
|
|
214
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
215
|
+
color: e.value.style.color,
|
|
216
|
+
isImaging: z(fe),
|
|
217
|
+
isPrinting: z(pe),
|
|
218
|
+
uid: N.value,
|
|
219
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
|
|
220
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
221
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
222
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
223
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
224
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
225
|
+
isFullscreen: O.value,
|
|
226
|
+
isTooltip: b.value.showTooltip,
|
|
227
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
228
|
+
chartElement: H.value,
|
|
229
|
+
onToggleFullscreen: we,
|
|
230
|
+
onGeneratePdf: z(se),
|
|
231
|
+
onGenerateCsv: ne,
|
|
232
|
+
onGenerateImage: z(ue),
|
|
233
|
+
onToggleTable: ie,
|
|
234
|
+
onToggleTooltip: re
|
|
235
|
+
}, $e({ _: 2 }, [
|
|
236
|
+
l.$slots.optionTooltip ? {
|
|
237
|
+
name: "optionTooltip",
|
|
238
|
+
fn: w(() => [
|
|
239
|
+
_(l.$slots, "optionTooltip", {}, void 0, !0)
|
|
240
|
+
]),
|
|
241
|
+
key: "0"
|
|
242
|
+
} : void 0,
|
|
243
|
+
l.$slots.optionPdf ? {
|
|
244
|
+
name: "optionPdf",
|
|
245
|
+
fn: w(() => [
|
|
246
|
+
_(l.$slots, "optionPdf", {}, void 0, !0)
|
|
247
|
+
]),
|
|
248
|
+
key: "1"
|
|
249
|
+
} : void 0,
|
|
250
|
+
l.$slots.optionCsv ? {
|
|
251
|
+
name: "optionCsv",
|
|
252
|
+
fn: w(() => [
|
|
253
|
+
_(l.$slots, "optionCsv", {}, void 0, !0)
|
|
254
|
+
]),
|
|
255
|
+
key: "2"
|
|
256
|
+
} : void 0,
|
|
257
|
+
l.$slots.optionImg ? {
|
|
258
|
+
name: "optionImg",
|
|
259
|
+
fn: w(() => [
|
|
260
|
+
_(l.$slots, "optionImg", {}, void 0, !0)
|
|
261
|
+
]),
|
|
262
|
+
key: "3"
|
|
263
|
+
} : void 0,
|
|
264
|
+
l.$slots.optionTable ? {
|
|
265
|
+
name: "optionTable",
|
|
266
|
+
fn: w(() => [
|
|
267
|
+
_(l.$slots, "optionTable", {}, void 0, !0)
|
|
268
|
+
]),
|
|
269
|
+
key: "4"
|
|
270
|
+
} : void 0,
|
|
271
|
+
l.$slots.optionFullscreen ? {
|
|
272
|
+
name: "optionFullscreen",
|
|
273
|
+
fn: w(({ toggleFullscreen: o, isFullscreen: r }) => [
|
|
274
|
+
_(l.$slots, "optionFullscreen", J(Q({ toggleFullscreen: o, isFullscreen: r })), void 0, !0)
|
|
275
|
+
]),
|
|
276
|
+
key: "5"
|
|
277
|
+
} : void 0
|
|
278
|
+
]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : y("", !0),
|
|
279
|
+
B.value ? (s(), n("svg", {
|
|
280
|
+
key: 2,
|
|
281
|
+
xmlns: z(Fe),
|
|
282
|
+
class: G({ "vue-data-ui-fullscreen--on": O.value, "vue-data-ui-fulscreen--off": !O.value }),
|
|
283
|
+
viewBox: `0 0 ${m.value.width} ${m.value.heightWithLegend}`,
|
|
284
|
+
style: f(`max-width:100%;overflow:visible;background:${e.value.style.backgroundColor};color:${e.value.style.color}`)
|
|
285
|
+
}, [
|
|
286
|
+
(s(!0), n(T, null, S(E.value, (o, r) => (s(), n("g", null, [
|
|
287
|
+
(s(!0), n(T, null, S(o.temperatures, (v, h) => (s(), n("g", null, [
|
|
288
|
+
u("rect", {
|
|
289
|
+
x: t.value.left + i.value.width * h + e.value.style.layout.cells.spacing / 2,
|
|
290
|
+
y: t.value.top + i.value.height * r + e.value.style.layout.cells.spacing / 2,
|
|
291
|
+
width: i.value.width - e.value.style.layout.cells.spacing,
|
|
292
|
+
height: i.value.height - e.value.style.layout.cells.spacing,
|
|
293
|
+
fill: e.value.style.layout.cells.colors.underlayer,
|
|
294
|
+
stroke: e.value.style.backgroundColor,
|
|
295
|
+
"stroke-width": e.value.style.layout.cells.spacing
|
|
296
|
+
}, null, 8, qe),
|
|
297
|
+
u("rect", {
|
|
298
|
+
x: t.value.left + i.value.width * h + e.value.style.layout.cells.spacing / 2,
|
|
299
|
+
y: t.value.top + i.value.height * r + e.value.style.layout.cells.spacing / 2,
|
|
300
|
+
width: i.value.width - e.value.style.layout.cells.spacing,
|
|
301
|
+
height: i.value.height - e.value.style.layout.cells.spacing,
|
|
302
|
+
fill: v.color,
|
|
303
|
+
stroke: e.value.style.backgroundColor,
|
|
304
|
+
"stroke-width": e.value.style.layout.cells.spacing
|
|
305
|
+
}, null, 8, Ke),
|
|
306
|
+
e.value.style.layout.cells.value.show ? (s(), n("text", {
|
|
307
|
+
key: 0,
|
|
308
|
+
"text-anchor": "middle",
|
|
309
|
+
"font-size": e.value.style.layout.cells.value.fontSize,
|
|
310
|
+
"font-weight": e.value.style.layout.cells.value.bold ? "bold" : "normal",
|
|
311
|
+
fill: z(Ve)(v.color),
|
|
312
|
+
x: t.value.left + i.value.width * h + i.value.width / 2,
|
|
313
|
+
y: t.value.top + i.value.height * r + i.value.height / 2 + e.value.style.layout.cells.value.fontSize / 3
|
|
314
|
+
}, p(e.value.style.layout.dataLabels.prefix) + p(Number(v.value.toFixed(e.value.style.layout.cells.value.roundingValue)).toLocaleString()) + p(e.value.style.layout.dataLabels.suffix), 9, Je)) : y("", !0)
|
|
315
|
+
]))), 256)),
|
|
316
|
+
(s(!0), n(T, null, S(o.temperatures, (v, h) => (s(), n("g", null, [
|
|
317
|
+
u("rect", {
|
|
318
|
+
x: t.value.left + i.value.width * h,
|
|
319
|
+
y: t.value.top + i.value.height * r,
|
|
320
|
+
width: i.value.width,
|
|
321
|
+
height: i.value.height,
|
|
322
|
+
fill: "transparent",
|
|
323
|
+
stroke: "none",
|
|
324
|
+
onMouseover: ($) => xe(v, r, t.value.left + i.value.width * h, t.value.top + i.value.height * r),
|
|
325
|
+
onMouseout: a[0] || (a[0] = ($) => {
|
|
326
|
+
X.value = !1, le.value = void 0, C.value = null, M.value = null;
|
|
327
|
+
})
|
|
328
|
+
}, null, 40, Qe)
|
|
329
|
+
]))), 256)),
|
|
330
|
+
e.value.style.layout.dataLabels.yAxis.show ? (s(), n("g", Ze, [
|
|
331
|
+
u("text", {
|
|
332
|
+
"font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
|
|
333
|
+
fill: e.value.style.layout.dataLabels.yAxis.color,
|
|
334
|
+
x: t.value.left + e.value.style.layout.dataLabels.yAxis.offsetX - 6,
|
|
335
|
+
y: t.value.top + i.value.height * r + i.value.height / 2 + e.value.style.layout.dataLabels.yAxis.fontSize / 3 + e.value.style.layout.dataLabels.yAxis.offsetY,
|
|
336
|
+
"text-anchor": "end",
|
|
337
|
+
"font-weight": e.value.style.layout.dataLabels.yAxis.bold ? "bold" : "normal"
|
|
338
|
+
}, p(k.value.yLabels[r]), 9, el)
|
|
339
|
+
])) : y("", !0)
|
|
340
|
+
]))), 256)),
|
|
341
|
+
e.value.style.layout.dataLabels.xAxis.show ? (s(), n("g", ll, [
|
|
342
|
+
(s(!0), n(T, null, S(k.value.xLabels, (o, r) => (s(), n("text", {
|
|
343
|
+
x: t.value.left + i.value.width / 2 + t.value.width / k.value.xLabels.length * r + e.value.style.layout.dataLabels.xAxis.offsetX,
|
|
344
|
+
y: t.value.top + e.value.style.layout.dataLabels.xAxis.offsetY - 6,
|
|
345
|
+
"text-anchor": "middle",
|
|
346
|
+
"font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
|
|
347
|
+
fill: e.value.style.layout.dataLabels.xAxis.color,
|
|
348
|
+
"font-weight": e.value.style.layout.dataLabels.xAxis.bold ? "bold" : "normal"
|
|
349
|
+
}, p(o), 9, tl))), 256))
|
|
350
|
+
])) : y("", !0),
|
|
351
|
+
M.value ? (s(), n("g", al, [
|
|
352
|
+
u("rect", {
|
|
353
|
+
style: { "pointer-events": "none" },
|
|
354
|
+
x: M.value.x - e.value.style.layout.cells.selected.border / 2 + e.value.style.layout.cells.spacing,
|
|
355
|
+
y: M.value.y - e.value.style.layout.cells.selected.border / 2 + e.value.style.layout.cells.spacing,
|
|
356
|
+
width: i.value.width - e.value.style.layout.cells.spacing + e.value.style.layout.cells.selected.border - e.value.style.layout.cells.spacing,
|
|
357
|
+
height: i.value.height - e.value.style.layout.cells.spacing + e.value.style.layout.cells.selected.border - e.value.style.layout.cells.spacing,
|
|
358
|
+
fill: "transparent",
|
|
359
|
+
stroke: e.value.style.layout.cells.selected.color,
|
|
360
|
+
"stroke-width": e.value.style.layout.cells.selected.border,
|
|
361
|
+
rx: 1
|
|
362
|
+
}, null, 8, ol)
|
|
363
|
+
])) : y("", !0),
|
|
364
|
+
e.value.style.legend.show && R.value === "right" ? (s(), n("g", sl, [
|
|
365
|
+
u("defs", null, [
|
|
366
|
+
u("linearGradient", {
|
|
367
|
+
id: `colorScaleVertical_${N.value}`,
|
|
368
|
+
x2: "0%",
|
|
369
|
+
y2: "100%"
|
|
370
|
+
}, [
|
|
371
|
+
u("stop", {
|
|
372
|
+
offset: "0%",
|
|
373
|
+
"stop-color": e.value.style.layout.cells.colors.hot
|
|
374
|
+
}, null, 8, nl),
|
|
375
|
+
u("stop", {
|
|
376
|
+
offset: "100%",
|
|
377
|
+
"stop-color": e.value.style.layout.cells.colors.cold
|
|
378
|
+
}, null, 8, il)
|
|
379
|
+
], 8, ul)
|
|
380
|
+
]),
|
|
381
|
+
u("text", {
|
|
382
|
+
x: t.value.right + 36 + 18,
|
|
383
|
+
y: t.value.top - e.value.style.legend.fontSize * 1.5,
|
|
384
|
+
"text-anchor": "middle",
|
|
385
|
+
"font-size": e.value.style.legend.fontSize * 2,
|
|
386
|
+
fill: e.value.style.legend.color
|
|
387
|
+
}, p(Number(x.value.toFixed(e.value.style.legend.roundingValue)).toLocaleString()), 9, rl),
|
|
388
|
+
u("rect", {
|
|
389
|
+
x: t.value.right + 36,
|
|
390
|
+
y: t.value.top,
|
|
391
|
+
width: 36,
|
|
392
|
+
height: j.value,
|
|
393
|
+
rx: e.value.style.legend.scaleBorderRadius,
|
|
394
|
+
fill: `url(#colorScaleVertical_${N.value})`
|
|
395
|
+
}, null, 8, dl),
|
|
396
|
+
u("text", {
|
|
397
|
+
x: t.value.right + 36 + 18,
|
|
398
|
+
y: t.value.top + j.value + e.value.style.legend.fontSize * 2.5,
|
|
399
|
+
"text-anchor": "middle",
|
|
400
|
+
"font-size": e.value.style.legend.fontSize * 2,
|
|
401
|
+
fill: e.value.style.legend.color
|
|
402
|
+
}, p(Number(F.value.toFixed(e.value.style.legend.roundingValue)).toLocaleString()), 9, vl),
|
|
403
|
+
C.value !== null ? (s(), n("line", {
|
|
404
|
+
key: 0,
|
|
405
|
+
stroke: e.value.style.backgroundColor,
|
|
406
|
+
"stroke-width": "2",
|
|
407
|
+
x1: t.value.right + 36,
|
|
408
|
+
x2: t.value.right + 72,
|
|
409
|
+
y1: V.value,
|
|
410
|
+
y2: V.value
|
|
411
|
+
}, null, 8, cl)) : y("", !0),
|
|
412
|
+
C.value !== null ? (s(), n("path", {
|
|
413
|
+
key: 1,
|
|
414
|
+
fill: e.value.style.color,
|
|
415
|
+
stroke: "none",
|
|
416
|
+
d: `M ${t.value.right + 36},${V.value} ${t.value.right + 26},${V.value - 8} ${t.value.right + 26},${V.value + 8}z`
|
|
417
|
+
}, null, 8, yl)) : y("", !0)
|
|
418
|
+
])) : y("", !0),
|
|
419
|
+
e.value.style.legend.show && R.value === "bottom" ? (s(), n("g", hl, [
|
|
420
|
+
u("defs", null, [
|
|
421
|
+
u("linearGradient", gl, [
|
|
422
|
+
u("stop", {
|
|
423
|
+
offset: "0%",
|
|
424
|
+
"stop-color": e.value.style.layout.cells.colors.cold
|
|
425
|
+
}, null, 8, pl),
|
|
426
|
+
u("stop", {
|
|
427
|
+
offset: "100%",
|
|
428
|
+
"stop-color": e.value.style.layout.cells.colors.hot
|
|
429
|
+
}, null, 8, fl)
|
|
430
|
+
])
|
|
431
|
+
]),
|
|
432
|
+
u("rect", {
|
|
433
|
+
x: t.value.left,
|
|
434
|
+
y: t.value.bottom + e.value.style.layout.cells.height,
|
|
435
|
+
width: m.value.width - t.value.left - e.value.style.layout.padding.right,
|
|
436
|
+
height: e.value.style.layout.cells.height,
|
|
437
|
+
rx: e.value.style.legend.scaleBorderRadius > e.value.style.layout.cells.height / 2 ? e.value.style.layout.cells.height / 2 : e.value.style.legend.scaleBorderRadius,
|
|
438
|
+
fill: "url(#colorScaleHorizontal)"
|
|
439
|
+
}, null, 8, bl),
|
|
440
|
+
u("text", {
|
|
441
|
+
x: t.value.left,
|
|
442
|
+
y: t.value.bottom + e.value.style.layout.cells.height * 2 + e.value.style.legend.fontSize * 2,
|
|
443
|
+
"text-anchor": "start",
|
|
444
|
+
"font-size": e.value.style.legend.fontSize * 2,
|
|
445
|
+
fill: e.value.style.legend.color
|
|
446
|
+
}, p(Number(F.value.toFixed(e.value.style.legend.roundingValue)).toLocaleString()), 9, ml),
|
|
447
|
+
u("text", {
|
|
448
|
+
x: t.value.right,
|
|
449
|
+
y: t.value.bottom + e.value.style.layout.cells.height * 2 + e.value.style.legend.fontSize * 2,
|
|
450
|
+
"text-anchor": "end",
|
|
451
|
+
"font-size": e.value.style.legend.fontSize * 2,
|
|
452
|
+
fill: e.value.style.legend.color
|
|
453
|
+
}, p(Number(x.value.toFixed(e.value.style.legend.roundingValue)).toLocaleString()), 9, xl),
|
|
454
|
+
C.value !== null ? (s(), n("line", {
|
|
455
|
+
key: 0,
|
|
456
|
+
stroke: e.value.style.backgroundColor,
|
|
457
|
+
"stroke-width": "2",
|
|
458
|
+
x1: I.value,
|
|
459
|
+
x2: I.value,
|
|
460
|
+
y1: t.value.bottom + e.value.style.layout.cells.height,
|
|
461
|
+
y2: t.value.bottom + e.value.style.layout.cells.height * 2
|
|
462
|
+
}, null, 8, wl)) : y("", !0),
|
|
463
|
+
C.value !== null ? (s(), n("path", {
|
|
464
|
+
key: 1,
|
|
465
|
+
fill: e.value.style.color,
|
|
466
|
+
stroke: "none",
|
|
467
|
+
d: `M ${I.value},${t.value.bottom + e.value.style.layout.cells.height} ${I.value - 12},${t.value.bottom + e.value.style.layout.cells.height - 20} ${I.value + 12},${t.value.bottom + e.value.style.layout.cells.height - 20}z`
|
|
468
|
+
}, null, 8, _l)) : y("", !0)
|
|
469
|
+
])) : y("", !0),
|
|
470
|
+
_(l.$slots, "svg", { svg: m.value }, void 0, !0)
|
|
471
|
+
], 14, Ye)) : y("", !0),
|
|
472
|
+
B.value ? y("", !0) : (s(), K(Xe, {
|
|
473
|
+
key: 3,
|
|
474
|
+
config: {
|
|
475
|
+
type: "heatmap",
|
|
476
|
+
style: {
|
|
477
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
478
|
+
heatmap: {
|
|
479
|
+
color: "#CCCCCC"
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}, null, 8, ["config"])),
|
|
484
|
+
q(He, {
|
|
485
|
+
show: b.value.showTooltip && X.value,
|
|
486
|
+
backgroundColor: e.value.style.tooltip.backgroundColor,
|
|
487
|
+
color: e.value.style.tooltip.color,
|
|
488
|
+
borderRadius: e.value.style.tooltip.borderRadius,
|
|
489
|
+
borderColor: e.value.style.tooltip.borderColor,
|
|
490
|
+
borderWidth: e.value.style.tooltip.borderWidth,
|
|
491
|
+
fontSize: e.value.style.tooltip.fontSize,
|
|
492
|
+
backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
|
|
493
|
+
parent: H.value,
|
|
494
|
+
content: U.value,
|
|
495
|
+
isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function"
|
|
496
|
+
}, {
|
|
497
|
+
"tooltip-before": w(() => [
|
|
498
|
+
_(l.$slots, "tooltip-before", J(Q({ ...D.value })), void 0, !0)
|
|
499
|
+
]),
|
|
500
|
+
"tooltip-after": w(() => [
|
|
501
|
+
_(l.$slots, "tooltip-after", J(Q({ ...D.value })), void 0, !0)
|
|
502
|
+
]),
|
|
503
|
+
_: 3
|
|
504
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "parent", "content", "isCustom"]),
|
|
505
|
+
B.value ? (s(), K(je, {
|
|
506
|
+
key: 4,
|
|
507
|
+
hideDetails: "",
|
|
508
|
+
config: {
|
|
509
|
+
open: b.value.showTable,
|
|
510
|
+
maxHeight: 1e4,
|
|
511
|
+
body: {
|
|
512
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
513
|
+
color: e.value.style.color
|
|
514
|
+
},
|
|
515
|
+
head: {
|
|
516
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
517
|
+
color: e.value.style.color
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}, {
|
|
521
|
+
content: w(() => [
|
|
522
|
+
u("div", {
|
|
523
|
+
ref_key: "tableContainer",
|
|
524
|
+
ref: ae,
|
|
525
|
+
class: "vue-ui-heatmap-table"
|
|
526
|
+
}, [
|
|
527
|
+
u("div", {
|
|
528
|
+
style: "width:100%;overflow-x:auto;padding-top:36px;position:relative",
|
|
529
|
+
class: G({ "vue-ui-responsive": oe.value })
|
|
530
|
+
}, [
|
|
531
|
+
u("div", {
|
|
532
|
+
role: "button",
|
|
533
|
+
tabindex: "0",
|
|
534
|
+
style: f(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${e.value.table.th.backgroundColor};`),
|
|
535
|
+
onClick: a[1] || (a[1] = (o) => b.value.showTable = !1),
|
|
536
|
+
onKeypress: a[2] || (a[2] = Le((o) => b.value.showTable = !1, ["enter"]))
|
|
537
|
+
}, [
|
|
538
|
+
q(Ue, {
|
|
539
|
+
name: "close",
|
|
540
|
+
stroke: e.value.table.th.color,
|
|
541
|
+
"stroke-width": 2
|
|
542
|
+
}, null, 8, ["stroke"])
|
|
543
|
+
], 36),
|
|
544
|
+
u("table", kl, [
|
|
545
|
+
u("caption", {
|
|
546
|
+
style: f(`backgroundColor:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
|
|
547
|
+
}, [
|
|
548
|
+
ze(p(e.value.style.title.text) + " ", 1),
|
|
549
|
+
e.value.style.title.subtitle.text ? (s(), n("span", Cl, p(e.value.style.title.subtitle.text), 1)) : y("", !0)
|
|
550
|
+
], 4),
|
|
551
|
+
u("thead", null, [
|
|
552
|
+
u("tr", {
|
|
553
|
+
role: "row",
|
|
554
|
+
style: f(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color}`)
|
|
555
|
+
}, [
|
|
556
|
+
u("th", {
|
|
557
|
+
style: f(`outline:${e.value.table.th.outline};padding-right:6px`)
|
|
558
|
+
}, null, 4),
|
|
559
|
+
(s(!0), n(T, null, S(P.dataset, (o, r) => (s(), n("th", {
|
|
560
|
+
align: "right",
|
|
561
|
+
style: f(`outline:${e.value.table.th.outline};padding-right:6px`)
|
|
562
|
+
}, p(o.name), 5))), 256))
|
|
563
|
+
], 4)
|
|
564
|
+
]),
|
|
565
|
+
u("tbody", null, [
|
|
566
|
+
(s(!0), n(T, null, S(k.value.xLabels, (o, r) => (s(), n("tr", {
|
|
567
|
+
role: "row",
|
|
568
|
+
class: G({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": r % 2 === 0, "vue-ui-data-table__tbody__row-odd": r % 2 !== 0 }),
|
|
569
|
+
style: f(`background:${e.value.table.td.backgroundColor};color:${e.value.table.td.color}`)
|
|
570
|
+
}, [
|
|
571
|
+
u("td", {
|
|
572
|
+
"data-cell": e.value.table.colNames.xAxis,
|
|
573
|
+
class: "vue-ui-data-table__tbody__td",
|
|
574
|
+
style: f(`outline:${e.value.table.td.outline}`)
|
|
575
|
+
}, [
|
|
576
|
+
u("div", Ll, p(o), 1)
|
|
577
|
+
], 12, $l),
|
|
578
|
+
(s(!0), n(T, null, S(P.dataset, (v, h) => (s(), n("td", {
|
|
579
|
+
class: "vue-ui-data-table__tbody__td",
|
|
580
|
+
"data-cell": P.dataset[h].name,
|
|
581
|
+
style: f(`outline:${e.value.table.td.outline}`)
|
|
582
|
+
}, [
|
|
583
|
+
u("div", Tl, p(isNaN(v.values[r]) ? "-" : z(ve)({ p: e.value.style.layout.dataLabels.prefix, v: v.values[r], s: e.value.style.layout.dataLabels.suffix, r: e.value.table.td.roundingValue })), 1)
|
|
584
|
+
], 12, zl))), 256))
|
|
585
|
+
], 6))), 256))
|
|
586
|
+
])
|
|
587
|
+
])
|
|
588
|
+
], 2)
|
|
589
|
+
], 512)
|
|
590
|
+
]),
|
|
591
|
+
_: 1
|
|
592
|
+
}, 8, ["config"])) : y("", !0)
|
|
593
|
+
], 14, We));
|
|
594
|
+
}
|
|
595
|
+
}, El = /* @__PURE__ */ De(Sl, [["__scopeId", "data-v-52af0be2"]]);
|
|
596
|
+
export {
|
|
597
|
+
El as default
|
|
598
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),d=require("./useNestedProp-2kIU-7On.cjs"),i=require("./index-p5gfZSvB.cjs"),m={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(o){const a=o,{vue_ui_kpi:r}=i.useConfig(),e=t.computed(()=>d.useNestedProp({userConfig:a.config,defaultConfig:r})),v=t.ref((typeof a.dataset=="number",a.dataset)),u=t.ref(e.value.useAnimation?e.value.animationValueStart:v.value);return t.onMounted(()=>{const l=e.value.animationFrames,n=a.dataset/l;function s(){u.value+=n,u.value<a.dataset?requestAnimationFrame(s):u.value=a.dataset}e.value.useAnimation&&(u.value=0,s())}),(l,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(`vue-ui-kpi ${e.value.layoutClass}`),style:t.normalizeStyle(`background:${e.value.backgroundColor}; ${e.value.layoutCss}`)},[t.createElementVNode("div",{class:t.normalizeClass(`vue-ui-kpi-title ${e.value.titleClass}`),style:t.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.titleFontSize}px; color:${e.value.titleColor}; font-weight:${e.value.titleBold?"bold":"normal"}; ${e.value.titleCss}`)},[t.renderSlot(l.$slots,"title",{comment:o.dataset}),t.createTextVNode(" "+t.toDisplayString(e.value.title),1)],6),t.renderSlot(l.$slots,"comment-before",{comment:o.dataset}),t.createElementVNode("div",{class:t.normalizeClass(`vue-ui-kpi-value ${e.value.valueClass}`),style:t.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.valueFontSize}px; color:${e.value.valueColor}; font-weight:${e.value.valueBold?"bold":"normal"}; ${e.value.valueCss}`)},[t.renderSlot(l.$slots,"value",{comment:o.dataset}),t.createTextVNode(" "+t.toDisplayString(t.unref(i.dataLabel)({p:e.value.prefix,v:u.value,s:e.value.suffix,r:e.value.valueRounding})),1)],6),t.renderSlot(l.$slots,"comment-after",{comment:o.dataset})],6))}};exports.default=m;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { computed as p, ref as r, onMounted as y, openBlock as C, createElementBlock as g, normalizeClass as s, normalizeStyle as n, createElementVNode as m, renderSlot as u, createTextVNode as f, toDisplayString as d, unref as k } from "vue";
|
|
2
|
+
import { u as F } from "./useNestedProp-BgWkUab_.js";
|
|
3
|
+
import { u as b, f as N } from "./index-uOtklCCx.js";
|
|
4
|
+
const A = {
|
|
5
|
+
__name: "vue-ui-kpi",
|
|
6
|
+
props: {
|
|
7
|
+
config: {
|
|
8
|
+
type: Object,
|
|
9
|
+
default() {
|
|
10
|
+
return {};
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
dataset: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: 0
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
setup(l) {
|
|
19
|
+
const a = l, { vue_ui_kpi: c } = b(), e = p(() => F({
|
|
20
|
+
userConfig: a.config,
|
|
21
|
+
defaultConfig: c
|
|
22
|
+
})), $ = r((typeof a.dataset == "number", a.dataset)), o = r(e.value.useAnimation ? e.value.animationValueStart : $.value);
|
|
23
|
+
return y(() => {
|
|
24
|
+
const t = e.value.animationFrames, i = a.dataset / t;
|
|
25
|
+
function v() {
|
|
26
|
+
o.value += i, o.value < a.dataset ? requestAnimationFrame(v) : o.value = a.dataset;
|
|
27
|
+
}
|
|
28
|
+
e.value.useAnimation && (o.value = 0, v());
|
|
29
|
+
}), (t, i) => (C(), g("div", {
|
|
30
|
+
class: s(`vue-ui-kpi ${e.value.layoutClass}`),
|
|
31
|
+
style: n(`background:${e.value.backgroundColor}; ${e.value.layoutCss}`)
|
|
32
|
+
}, [
|
|
33
|
+
m("div", {
|
|
34
|
+
class: s(`vue-ui-kpi-title ${e.value.titleClass}`),
|
|
35
|
+
style: n(`font-family: ${e.value.fontFamily}; font-size:${e.value.titleFontSize}px; color:${e.value.titleColor}; font-weight:${e.value.titleBold ? "bold" : "normal"}; ${e.value.titleCss}`)
|
|
36
|
+
}, [
|
|
37
|
+
u(t.$slots, "title", { comment: l.dataset }),
|
|
38
|
+
f(" " + d(e.value.title), 1)
|
|
39
|
+
], 6),
|
|
40
|
+
u(t.$slots, "comment-before", { comment: l.dataset }),
|
|
41
|
+
m("div", {
|
|
42
|
+
class: s(`vue-ui-kpi-value ${e.value.valueClass}`),
|
|
43
|
+
style: n(`font-family: ${e.value.fontFamily}; font-size:${e.value.valueFontSize}px; color:${e.value.valueColor}; font-weight:${e.value.valueBold ? "bold" : "normal"}; ${e.value.valueCss}`)
|
|
44
|
+
}, [
|
|
45
|
+
u(t.$slots, "value", { comment: l.dataset }),
|
|
46
|
+
f(" " + d(k(N)({ p: e.value.prefix, v: o.value, s: e.value.suffix, r: e.value.valueRounding })), 1)
|
|
47
|
+
], 6),
|
|
48
|
+
u(t.$slots, "comment-after", { comment: l.dataset })
|
|
49
|
+
], 6));
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
export {
|
|
53
|
+
A as default
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-2kIU-7On.cjs"),n=require("./index-p5gfZSvB.cjs"),m=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=["xmlns","viewBox"],C={key:0},_=["stroke"],h=["stroke"],M=["stroke"],y={key:1},B=["stroke"],f={key:2},L=["stroke"],b={__name:"vue-ui-mini-loader",props:{config:{type:Object,default(){return{}}}},setup(u){const a=u;e.useCssVars(k=>({"221651ee":c.value,d11bae38:d.value,d85c00de:p.value}));const{vue_ui_mini_loader:i}=n.useConfig(),t=e.computed(()=>v.useNestedProp({userConfig:a.config,defaultConfig:i})),s=e.ref({onion:"-10 -10 84 84",line:"-10 -10 112 84",bar:"-10 -10 106 84"}),r=e.computed(()=>({gutter:`stroke:${t.value.line.gutterColor};opacity:${t.value.line.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.line.gutterBlur}px);`})),l=e.computed(()=>({gutter:`stroke:${t.value.bar.gutterColor};opacity:${t.value.bar.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.bar.gutterBlur}px);`})),o=e.computed(()=>({gutter:`stroke:${t.value.onion.gutterColor};opacity:${t.value.onion.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.onion.gutterBlur}px);`})),c=e.computed(()=>`blur(${t.value.onion.trackBlur}px) hue-rotate(${t.value.onion.trackHueRotate}deg)`),d=e.computed(()=>`blur(${t.value.line.trackBlur}px) hue-rotate(${t.value.line.trackHueRotate}deg)`),p=e.computed(()=>`blur(${t.value.bar.trackBlur}px) hue-rotate(${t.value.bar.trackHueRotate}deg)`);return(k,x)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.XMLNS),viewBox:s.value[t.value.type],style:{background:"transparent"},width:"100%"},[t.value.type==="onion"?(e.openBlock(),e.createElementBlock("g",C,[e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,_),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,h),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,M)])):e.createCommentVNode("",!0),t.value.type==="line"?(e.openBlock(),e.createElementBlock("g",y,[e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(r.value.gutter+r.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5",stroke:t.value.line.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"line-animated"},null,8,B)])):e.createCommentVNode("",!0),t.value.type==="bar"?(e.openBlock(),e.createElementBlock("g",f,[e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(l.value.gutter+l.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5",stroke:t.value.bar.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"bar-animated"},null,8,L)])):e.createCommentVNode("",!0)],8,g))}},N=m._export_sfc(b,[["__scopeId","data-v-20f54e0e"]]);exports.default=N;
|