vue-data-ui 2.2.90 → 2.2.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/data-table-d-VcuH-r.js +1488 -0
  2. package/dist/{index.es-Cgqo-FBk.js → index.es-Dc9Fd4o6.js} +1 -1
  3. package/dist/legend-DJCYLsl_.js +61 -0
  4. package/dist/style.css +1 -1
  5. package/dist/themes-lgjsYHsH.js +4967 -0
  6. package/dist/title-BF-9Qcni.js +56 -0
  7. package/dist/tooltip-D85WEOKi.js +94 -0
  8. package/dist/user-options-DZgCz8UA.js +415 -0
  9. package/dist/vue-data-ui.js +455 -61
  10. package/dist/vue-ui-3d-bar-DW7kGJSz.js +20360 -0
  11. package/dist/vue-ui-age-pyramid-4hcuKpFY.js +781 -0
  12. package/dist/vue-ui-annotator-C83FVvl8.js +2175 -0
  13. package/dist/vue-ui-candlestick-diclGj95.js +807 -0
  14. package/dist/vue-ui-chestnut-ACetHLdG.js +1049 -0
  15. package/dist/vue-ui-cursor-Rx7UNaYT.js +229 -0
  16. package/dist/vue-ui-dashboard-B3PlN0ks.js +231 -0
  17. package/dist/vue-ui-digits-CxMXID42.js +154 -0
  18. package/dist/vue-ui-donut-DMiwVXNd.js +1534 -0
  19. package/dist/vue-ui-dumbbell-B_X1T8TR.js +621 -0
  20. package/dist/vue-ui-flow-B72wzQ6V.js +451 -0
  21. package/dist/vue-ui-galaxy-DXX5yivT.js +482 -0
  22. package/dist/vue-ui-gauge-Cs9PDurH.js +466 -0
  23. package/dist/vue-ui-heatmap-PcoNSLdN.js +581 -0
  24. package/dist/vue-ui-kpi-DchEmPtB.js +55 -0
  25. package/dist/vue-ui-mini-loader-DltJLkqy.js +131 -0
  26. package/dist/vue-ui-molecule-CWvukBzs.js +746 -0
  27. package/dist/vue-ui-mood-radar-DEfdtIi8.js +544 -0
  28. package/dist/vue-ui-nested-donuts-9URpqgXE.js +768 -0
  29. package/dist/vue-ui-onion-C0eowUT6.js +551 -0
  30. package/dist/vue-ui-parallel-coordinate-plot-Bc_pAaPJ.js +647 -0
  31. package/dist/vue-ui-quadrant-_ddVAm9V.js +1174 -0
  32. package/dist/vue-ui-quick-chart-Cio0hDYO.js +1310 -0
  33. package/dist/vue-ui-radar-Dyg38i33.js +853 -0
  34. package/dist/vue-ui-rating-CE1Lmwd2.js +271 -0
  35. package/dist/vue-ui-relation-circle-BMlB3k3d.js +303 -0
  36. package/dist/vue-ui-rings-BuXeijvb.js +507 -0
  37. package/dist/vue-ui-scatter-B1hZfOua.js +870 -0
  38. package/dist/vue-ui-screenshot-0QXgxzGs.js +160 -0
  39. package/dist/vue-ui-smiley-B7kR7exr.js +763 -0
  40. package/dist/vue-ui-spark-trend-BmL2KiYL.js +245 -0
  41. package/dist/vue-ui-sparkgauge-BMzFv14L.js +158 -0
  42. package/dist/vue-ui-sparkhistogram-DWpOXqHm.js +243 -0
  43. package/dist/vue-ui-sparkstackbar-DB9VQXlc.js +244 -0
  44. package/dist/vue-ui-strip-plot-DyN6P0JO.js +614 -0
  45. package/dist/vue-ui-table-DM3zL89q.js +2180 -0
  46. package/dist/vue-ui-table-heatmap-gWx0Nslu.js +237 -0
  47. package/dist/vue-ui-thermometer-Bcqv5kd_.js +384 -0
  48. package/dist/vue-ui-timer-BIFxjujK.js +451 -0
  49. package/dist/vue-ui-tiremarks-zBwHpED_.js +248 -0
  50. package/dist/vue-ui-treemap-BaplVc_z.js +719 -0
  51. package/dist/vue-ui-vertical-bar-CdK6ZJPM.js +734 -0
  52. package/dist/vue-ui-waffle-COOzH7M3.js +635 -0
  53. package/dist/vue-ui-wheel-BEpuVTBk.js +226 -0
  54. package/dist/vue-ui-word-cloud-DNqxAAiX.js +344 -0
  55. package/dist/vue-ui-xy-_mHq-czW.js +2058 -0
  56. package/dist/vue-ui-xy-canvas-DqX8Gee5.js +1003 -0
  57. package/package.json +1 -1
  58. package/dist/index-DZlxUin4.js +0 -57288
@@ -0,0 +1,581 @@
1
+ import { useCssVars as xe, computed as c, ref as p, onMounted as _e, openBlock as s, createElementBlock as n, normalizeClass as G, normalizeStyle as f, createVNode as K, createCommentVNode as y, createBlock as Y, unref as z, createSlots as we, withCtx as w, renderSlot as k, normalizeProps as q, guardReactiveProps as J, Fragment as T, renderList as S, createElementVNode as u, toDisplayString as h, withKeys as ke, createTextVNode as $e, nextTick as Ce } from "vue";
2
+ import { _ as Le, i as ze, j as ie, e as Q, k as Te, K as Z, X as Se, F as Ae, B as Ne, n as re, y as Fe, z as Me, v as Ve, w as Ie } from "./data-table-d-VcuH-r.js";
3
+ import { t as Oe } from "./themes-lgjsYHsH.js";
4
+ import { u as de, _ as Pe } from "./title-BF-9Qcni.js";
5
+ import { U as Be } from "./user-options-DZgCz8UA.js";
6
+ import { _ as Re } from "./tooltip-D85WEOKi.js";
7
+ import { u as Ee, a as Ge, S as Xe, A as He } from "./vue-ui-3d-bar-DW7kGJSz.js";
8
+ const je = ["id"], Ue = ["xmlns", "viewBox"], De = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], We = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], Ke = ["font-size", "font-weight", "fill", "x", "y"], Ye = ["x", "y", "width", "height", "onMouseover"], qe = { key: 0 }, Je = ["font-size", "fill", "x", "y", "font-weight"], Qe = { key: 0 }, Ze = ["x", "y", "font-size", "fill", "font-weight"], et = { key: 1 }, tt = ["id"], lt = ["stop-color"], at = ["stop-color"], ot = ["x", "y", "font-size", "fill"], st = ["x", "y", "height", "rx", "fill"], ut = ["x", "y", "font-size", "fill"], nt = ["stroke", "x1", "x2", "y1", "y2"], it = ["fill", "d"], rt = { key: 2 }, dt = {
9
+ id: "colorScaleHorizontal",
10
+ x1: "0%",
11
+ x2: "100%",
12
+ y1: "0%",
13
+ y2: "0%"
14
+ }, vt = ["stop-color"], ct = ["stop-color"], yt = ["x", "y", "width", "height", "rx"], ht = ["x", "y", "font-size", "fill"], gt = ["x", "y", "font-size", "fill"], pt = ["stroke", "x1", "x2", "y1", "y2"], ft = ["fill", "d"], bt = { class: "vue-ui-data-table" }, mt = { key: 0 }, xt = ["data-cell"], _t = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, wt = ["data-cell"], kt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, $t = {
15
+ __name: "vue-ui-heatmap",
16
+ props: {
17
+ config: {
18
+ type: Object,
19
+ default() {
20
+ return {};
21
+ }
22
+ },
23
+ dataset: {
24
+ type: Array,
25
+ default() {
26
+ return [];
27
+ }
28
+ }
29
+ },
30
+ setup(O, { expose: ve }) {
31
+ const i = O;
32
+ xe((t) => ({
33
+ 14865235: t.tdo
34
+ }));
35
+ const { vue_ui_heatmap: ce } = Ee(), P = c(() => !!i.dataset && i.dataset.length);
36
+ ze(i.dataset) && ie({
37
+ componentName: "VueUiHeatmap",
38
+ type: "dataset"
39
+ });
40
+ const N = p(Q()), X = p(null), ye = p(null), H = p(!1), j = p(""), B = p(void 0), ee = p(0), te = p(null), le = p(!1), e = c(() => {
41
+ const t = de({
42
+ userConfig: i.config,
43
+ defaultConfig: ce
44
+ });
45
+ return t.theme ? {
46
+ ...de({
47
+ userConfig: Oe.vue_ui_heatmap[t.theme] || i.config,
48
+ defaultConfig: t
49
+ })
50
+ } : t;
51
+ }), { isPrinting: he, isImaging: ge, generatePdf: ae, generateImage: oe } = Ge({
52
+ elementId: `heatmap__${N.value}`,
53
+ fileName: e.value.style.title.text || "vue-ui-heatmap"
54
+ }), b = p({
55
+ showTable: e.value.table.show,
56
+ showTooltip: e.value.style.tooltip.show
57
+ }), pe = c(() => e.value.table.responsiveBreakpoint);
58
+ function fe() {
59
+ new ResizeObserver((o) => {
60
+ o.forEach((a) => {
61
+ le.value = a.contentRect.width < pe.value;
62
+ });
63
+ }).observe(te.value);
64
+ }
65
+ _e(fe);
66
+ const A = c(() => Math.max(...i.dataset.flatMap((t) => (t.values || []).length))), m = c(() => {
67
+ const t = e.value.style.layout.padding.top + e.value.style.layout.padding.bottom + i.dataset.length * e.value.style.layout.cells.height, o = e.value.style.layout.padding.left + e.value.style.layout.padding.right + (A.value < i.dataset.length ? i.dataset.length : A.value) * e.value.style.layout.cells.height, a = t + (e.value.style.legend.show ? e.value.style.legend.position === "right" ? 0 : e.value.style.layout.cells.height * 2 : 0);
68
+ return {
69
+ height: t,
70
+ heightWithLegend: a,
71
+ width: o
72
+ };
73
+ }), R = c(() => e.value.style.legend.position), l = c(() => ({
74
+ top: e.value.style.layout.padding.top,
75
+ left: e.value.style.layout.padding.left,
76
+ right: m.value.width - e.value.style.layout.padding.right - (R.value === "right" && e.value.style.legend.show ? 92 : 0),
77
+ bottom: m.value.height - e.value.style.layout.padding.bottom,
78
+ height: m.value.height - e.value.style.layout.padding.top - e.value.style.layout.padding.bottom,
79
+ 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)
80
+ })), U = c(() => d.value.height * i.dataset.length), x = c(() => Math.max(...i.dataset.flatMap((t) => t.values))), F = c(() => Math.min(...i.dataset.flatMap((t) => t.values))), L = c(() => {
81
+ const t = i.dataset.flatMap((a) => a.values);
82
+ return t.reduce((a, r) => a + r, 0) / t.length;
83
+ }), d = c(() => ({
84
+ width: l.value.width / A.value,
85
+ height: l.value.width / (A.value < i.dataset.length ? i.dataset.length : A.value)
86
+ })), $ = c(() => {
87
+ const t = e.value.style.layout.dataLabels.yAxis.values.length ? e.value.style.layout.dataLabels.yAxis.values : i.dataset.map((a) => a.name), o = e.value.style.layout.dataLabels.xAxis.values;
88
+ return {
89
+ yLabels: t,
90
+ xLabels: o.slice(0, A.value)
91
+ };
92
+ }), E = c(() => (i.dataset.forEach((t, o) => {
93
+ Te({
94
+ datasetObject: t,
95
+ requiredAttributes: ["values"]
96
+ }).forEach((a) => {
97
+ ie({
98
+ componentName: "VueUiHeatmap",
99
+ type: "datasetSerieAttribute",
100
+ property: "values",
101
+ index: o
102
+ });
103
+ });
104
+ }), i.dataset.map((t) => ({
105
+ ...t,
106
+ temperatures: (t.values || []).map((o, a) => o >= L.value ? {
107
+ side: "up",
108
+ color: Z(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, F.value, x.value, o),
109
+ ratio: Math.abs(Math.abs(o - L.value) / Math.abs(x.value - L.value)) > 1 ? 1 : Math.abs(Math.abs(o - L.value) / Math.abs(x.value - L.value)),
110
+ value: o,
111
+ yAxisName: t.name,
112
+ xAxisName: $.value.xLabels[a],
113
+ id: `vue-data-ui-heatmap-cell-${Q()}`
114
+ } : {
115
+ side: "down",
116
+ ratio: Math.abs(1 - Math.abs(o) / Math.abs(L.value)) > 1 ? 1 : Math.abs(1 - Math.abs(o) / Math.abs(L.value)),
117
+ color: Z(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, F.value, x.value, o),
118
+ value: o,
119
+ yAxisName: t.name,
120
+ xAxisName: $.value.xLabels[a],
121
+ id: `vue-data-ui-heatmap-cell-${Q()}`
122
+ })
123
+ })))), C = p(null), D = p(null);
124
+ function be(t, o) {
125
+ const { value: a, yAxisName: r, xAxisName: v, id: g } = t;
126
+ B.value = g, C.value = a, D.value = {
127
+ datapoint: t,
128
+ seriesIndex: o,
129
+ series: E.value,
130
+ config: e.value
131
+ }, H.value = !0;
132
+ let _ = "";
133
+ const W = e.value.style.tooltip.customFormat;
134
+ Fe(W) && Me(() => W({
135
+ datapoint: t,
136
+ seriesIndex: o,
137
+ series: E.value,
138
+ config: e.value
139
+ })) ? j.value = W({
140
+ datapoint: t,
141
+ seriesIndex: o,
142
+ series: E.value,
143
+ config: e.value
144
+ }) : (_ += `<div>${r} ${v ? `${v}` : ""}</div>`, _ += `<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:${Z(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, F.value, x.value, a)}">⬤</span><span>${isNaN(a) ? "-" : re({ p: e.value.style.layout.dataLabels.prefix, v: a, s: e.value.style.layout.dataLabels.suffix, r: e.value.style.tooltip.roundingValue })}</span></div>`, j.value = `<div style="font-size:${e.value.style.tooltip.fontSize}px">${_}</div>`);
145
+ }
146
+ const M = c(() => l.value.top + U.value * (1 - C.value / x.value)), V = c(() => l.value.left + (m.value.width - l.value.left - e.value.style.layout.padding.right) * (C.value / x.value));
147
+ c(() => {
148
+ const t = i.dataset.map((a) => ({
149
+ name: a.name
150
+ })), o = i.dataset.map((a) => a.values);
151
+ return { head: t, body: o };
152
+ });
153
+ function se() {
154
+ Ce(() => {
155
+ const t = ["", ...i.dataset.map((v, g) => v.name)], o = [];
156
+ for (let v = 0; v < $.value.xLabels.length; v += 1) {
157
+ const g = [$.value.xLabels[v]];
158
+ for (let _ = 0; _ < i.dataset.length; _ += 1)
159
+ g.push([i.dataset[_].values[v]]);
160
+ o.push(g);
161
+ }
162
+ const a = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([t]).concat(o), r = Ve(a);
163
+ Ie({ csvContent: r, title: e.value.style.title.text || "vue-ui-heatmap" });
164
+ });
165
+ }
166
+ const I = p(!1);
167
+ function me(t) {
168
+ I.value = t, ee.value += 1;
169
+ }
170
+ function ue() {
171
+ b.value.showTable = !b.value.showTable;
172
+ }
173
+ function ne() {
174
+ b.value.showTooltip = !b.value.showTooltip;
175
+ }
176
+ return ve({
177
+ generatePdf: ae,
178
+ generateCsv: se,
179
+ generateImage: oe,
180
+ toggleTable: ue,
181
+ toggleTooltip: ne
182
+ }), (t, o) => (s(), n("div", {
183
+ ref_key: "heatmapChart",
184
+ ref: X,
185
+ class: G(`vue-ui-heatmap ${I.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
186
+ 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}`),
187
+ id: `heatmap__${N.value}`
188
+ }, [
189
+ e.value.style.title.text ? (s(), n("div", {
190
+ key: 0,
191
+ style: f(`width:100%;background:${e.value.style.backgroundColor}`)
192
+ }, [
193
+ K(Pe, {
194
+ config: {
195
+ title: {
196
+ cy: "heatmap-div-title",
197
+ ...e.value.style.title
198
+ },
199
+ subtitle: {
200
+ cy: "heatmap-div-subtitle",
201
+ ...e.value.style.title.subtitle
202
+ }
203
+ }
204
+ }, null, 8, ["config"])
205
+ ], 4)) : y("", !0),
206
+ e.value.userOptions.show && P.value ? (s(), Y(Be, {
207
+ ref_key: "details",
208
+ ref: ye,
209
+ key: `user_options_${ee.value}`,
210
+ backgroundColor: e.value.style.backgroundColor,
211
+ color: e.value.style.color,
212
+ isImaging: z(ge),
213
+ isPrinting: z(he),
214
+ uid: N.value,
215
+ hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
216
+ hasPdf: e.value.userOptions.buttons.pdf,
217
+ hasImg: e.value.userOptions.buttons.img,
218
+ hasXls: e.value.userOptions.buttons.csv,
219
+ hasTable: e.value.userOptions.buttons.table,
220
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
221
+ isFullscreen: I.value,
222
+ isTooltip: b.value.showTooltip,
223
+ titles: { ...e.value.userOptions.buttonTitles },
224
+ chartElement: X.value,
225
+ onToggleFullscreen: me,
226
+ onGeneratePdf: z(ae),
227
+ onGenerateCsv: se,
228
+ onGenerateImage: z(oe),
229
+ onToggleTable: ue,
230
+ onToggleTooltip: ne
231
+ }, we({ _: 2 }, [
232
+ t.$slots.optionTooltip ? {
233
+ name: "optionTooltip",
234
+ fn: w(() => [
235
+ k(t.$slots, "optionTooltip", {}, void 0, !0)
236
+ ]),
237
+ key: "0"
238
+ } : void 0,
239
+ t.$slots.optionPdf ? {
240
+ name: "optionPdf",
241
+ fn: w(() => [
242
+ k(t.$slots, "optionPdf", {}, void 0, !0)
243
+ ]),
244
+ key: "1"
245
+ } : void 0,
246
+ t.$slots.optionCsv ? {
247
+ name: "optionCsv",
248
+ fn: w(() => [
249
+ k(t.$slots, "optionCsv", {}, void 0, !0)
250
+ ]),
251
+ key: "2"
252
+ } : void 0,
253
+ t.$slots.optionImg ? {
254
+ name: "optionImg",
255
+ fn: w(() => [
256
+ k(t.$slots, "optionImg", {}, void 0, !0)
257
+ ]),
258
+ key: "3"
259
+ } : void 0,
260
+ t.$slots.optionTable ? {
261
+ name: "optionTable",
262
+ fn: w(() => [
263
+ k(t.$slots, "optionTable", {}, void 0, !0)
264
+ ]),
265
+ key: "4"
266
+ } : void 0,
267
+ t.$slots.optionFullscreen ? {
268
+ name: "optionFullscreen",
269
+ fn: w(({ toggleFullscreen: a, isFullscreen: r }) => [
270
+ k(t.$slots, "optionFullscreen", q(J({ toggleFullscreen: a, isFullscreen: r })), void 0, !0)
271
+ ]),
272
+ key: "5"
273
+ } : void 0
274
+ ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : y("", !0),
275
+ P.value ? (s(), n("svg", {
276
+ key: 2,
277
+ xmlns: z(Se),
278
+ class: G({ "vue-data-ui-fullscreen--on": I.value, "vue-data-ui-fulscreen--off": !I.value }),
279
+ viewBox: `0 0 ${m.value.width} ${m.value.heightWithLegend}`,
280
+ style: f(`max-width:100%;overflow:visible;background:${e.value.style.backgroundColor};color:${e.value.style.color}`)
281
+ }, [
282
+ (s(!0), n(T, null, S(E.value, (a, r) => (s(), n("g", null, [
283
+ (s(!0), n(T, null, S(a.temperatures, (v, g) => (s(), n("g", null, [
284
+ u("rect", {
285
+ x: l.value.left + d.value.width * g + e.value.style.layout.cells.spacing / 2,
286
+ y: l.value.top + d.value.height * r + e.value.style.layout.cells.spacing / 2,
287
+ width: d.value.width - e.value.style.layout.cells.spacing,
288
+ height: d.value.height - e.value.style.layout.cells.spacing,
289
+ fill: e.value.style.layout.cells.colors.underlayer,
290
+ stroke: e.value.style.backgroundColor,
291
+ "stroke-width": e.value.style.layout.cells.spacing
292
+ }, null, 8, De),
293
+ u("rect", {
294
+ x: l.value.left + d.value.width * g + e.value.style.layout.cells.spacing / 2,
295
+ y: l.value.top + d.value.height * r + e.value.style.layout.cells.spacing / 2,
296
+ width: d.value.width - e.value.style.layout.cells.spacing,
297
+ height: d.value.height - e.value.style.layout.cells.spacing,
298
+ fill: v.color,
299
+ stroke: B.value && B.value === v.id ? e.value.style.layout.cells.selected.color : e.value.style.backgroundColor,
300
+ "stroke-width": e.value.style.layout.cells.spacing
301
+ }, null, 8, We),
302
+ e.value.style.layout.cells.value.show ? (s(), n("text", {
303
+ key: 0,
304
+ "text-anchor": "middle",
305
+ "font-size": e.value.style.layout.cells.value.fontSize,
306
+ "font-weight": e.value.style.layout.cells.value.bold ? "bold" : "normal",
307
+ fill: z(Ae)(v.color),
308
+ x: l.value.left + d.value.width * g + d.value.width / 2,
309
+ y: l.value.top + d.value.height * r + d.value.height / 2 + e.value.style.layout.cells.value.fontSize / 3
310
+ }, h(e.value.style.layout.dataLabels.prefix) + h(Number(v.value.toFixed(e.value.style.layout.cells.value.roundingValue)).toLocaleString()) + h(e.value.style.layout.dataLabels.suffix), 9, Ke)) : y("", !0)
311
+ ]))), 256)),
312
+ (s(!0), n(T, null, S(a.temperatures, (v, g) => (s(), n("g", null, [
313
+ u("rect", {
314
+ x: l.value.left + d.value.width * g,
315
+ y: l.value.top + d.value.height * r,
316
+ width: d.value.width,
317
+ height: d.value.height,
318
+ fill: "transparent",
319
+ stroke: "none",
320
+ onMouseover: (_) => be(v, r),
321
+ onMouseout: o[0] || (o[0] = (_) => {
322
+ H.value = !1, B.value = void 0, C.value = null;
323
+ })
324
+ }, null, 40, Ye)
325
+ ]))), 256)),
326
+ e.value.style.layout.dataLabels.yAxis.show ? (s(), n("g", qe, [
327
+ u("text", {
328
+ "font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
329
+ fill: e.value.style.layout.dataLabels.yAxis.color,
330
+ x: l.value.left + e.value.style.layout.dataLabels.yAxis.offsetX - 6,
331
+ y: l.value.top + d.value.height * r + d.value.height / 2 + e.value.style.layout.dataLabels.yAxis.fontSize / 3 + e.value.style.layout.dataLabels.yAxis.offsetY,
332
+ "text-anchor": "end",
333
+ "font-weight": e.value.style.layout.dataLabels.yAxis.bold ? "bold" : "normal"
334
+ }, h($.value.yLabels[r]), 9, Je)
335
+ ])) : y("", !0)
336
+ ]))), 256)),
337
+ e.value.style.layout.dataLabels.xAxis.show ? (s(), n("g", Qe, [
338
+ (s(!0), n(T, null, S($.value.xLabels, (a, r) => (s(), n("text", {
339
+ x: l.value.left + d.value.width / 2 + l.value.width / $.value.xLabels.length * r + e.value.style.layout.dataLabels.xAxis.offsetX,
340
+ y: l.value.top + e.value.style.layout.dataLabels.xAxis.offsetY - 6,
341
+ "text-anchor": "middle",
342
+ "font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
343
+ fill: e.value.style.layout.dataLabels.xAxis.color,
344
+ "font-weight": e.value.style.layout.dataLabels.xAxis.bold ? "bold" : "normal"
345
+ }, h(a), 9, Ze))), 256))
346
+ ])) : y("", !0),
347
+ e.value.style.legend.show && R.value === "right" ? (s(), n("g", et, [
348
+ u("defs", null, [
349
+ u("linearGradient", {
350
+ id: `colorScaleVertical_${N.value}`,
351
+ x2: "0%",
352
+ y2: "100%"
353
+ }, [
354
+ u("stop", {
355
+ offset: "0%",
356
+ "stop-color": e.value.style.layout.cells.colors.hot
357
+ }, null, 8, lt),
358
+ u("stop", {
359
+ offset: "100%",
360
+ "stop-color": e.value.style.layout.cells.colors.cold
361
+ }, null, 8, at)
362
+ ], 8, tt)
363
+ ]),
364
+ u("text", {
365
+ x: l.value.right + 36 + 18,
366
+ y: l.value.top - e.value.style.legend.fontSize * 1.5,
367
+ "text-anchor": "middle",
368
+ "font-size": e.value.style.legend.fontSize * 2,
369
+ fill: e.value.style.legend.color
370
+ }, h(Number(x.value.toFixed(e.value.style.legend.roundingValue)).toLocaleString()), 9, ot),
371
+ u("rect", {
372
+ x: l.value.right + 36,
373
+ y: l.value.top,
374
+ width: 36,
375
+ height: U.value,
376
+ rx: e.value.style.legend.scaleBorderRadius,
377
+ fill: `url(#colorScaleVertical_${N.value})`
378
+ }, null, 8, st),
379
+ u("text", {
380
+ x: l.value.right + 36 + 18,
381
+ y: l.value.top + U.value + e.value.style.legend.fontSize * 2.5,
382
+ "text-anchor": "middle",
383
+ "font-size": e.value.style.legend.fontSize * 2,
384
+ fill: e.value.style.legend.color
385
+ }, h(Number(F.value.toFixed(e.value.style.legend.roundingValue)).toLocaleString()), 9, ut),
386
+ C.value !== null ? (s(), n("line", {
387
+ key: 0,
388
+ stroke: e.value.style.backgroundColor,
389
+ "stroke-width": "2",
390
+ x1: l.value.right + 36,
391
+ x2: l.value.right + 72,
392
+ y1: M.value,
393
+ y2: M.value
394
+ }, null, 8, nt)) : y("", !0),
395
+ C.value !== null ? (s(), n("path", {
396
+ key: 1,
397
+ fill: e.value.style.color,
398
+ stroke: "none",
399
+ d: `M ${l.value.right + 36},${M.value} ${l.value.right + 26},${M.value - 8} ${l.value.right + 26},${M.value + 8}z`
400
+ }, null, 8, it)) : y("", !0)
401
+ ])) : y("", !0),
402
+ e.value.style.legend.show && R.value === "bottom" ? (s(), n("g", rt, [
403
+ u("defs", null, [
404
+ u("linearGradient", dt, [
405
+ u("stop", {
406
+ offset: "0%",
407
+ "stop-color": e.value.style.layout.cells.colors.cold
408
+ }, null, 8, vt),
409
+ u("stop", {
410
+ offset: "100%",
411
+ "stop-color": e.value.style.layout.cells.colors.hot
412
+ }, null, 8, ct)
413
+ ])
414
+ ]),
415
+ u("rect", {
416
+ x: l.value.left,
417
+ y: l.value.bottom + e.value.style.layout.cells.height,
418
+ width: m.value.width - l.value.left - e.value.style.layout.padding.right,
419
+ height: e.value.style.layout.cells.height,
420
+ 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,
421
+ fill: "url(#colorScaleHorizontal)"
422
+ }, null, 8, yt),
423
+ u("text", {
424
+ x: l.value.left,
425
+ y: l.value.bottom + e.value.style.layout.cells.height * 2 + e.value.style.legend.fontSize * 2,
426
+ "text-anchor": "start",
427
+ "font-size": e.value.style.legend.fontSize * 2,
428
+ fill: e.value.style.legend.color
429
+ }, h(Number(F.value.toFixed(e.value.style.legend.roundingValue)).toLocaleString()), 9, ht),
430
+ u("text", {
431
+ x: l.value.right,
432
+ y: l.value.bottom + e.value.style.layout.cells.height * 2 + e.value.style.legend.fontSize * 2,
433
+ "text-anchor": "end",
434
+ "font-size": e.value.style.legend.fontSize * 2,
435
+ fill: e.value.style.legend.color
436
+ }, h(Number(x.value.toFixed(e.value.style.legend.roundingValue)).toLocaleString()), 9, gt),
437
+ C.value !== null ? (s(), n("line", {
438
+ key: 0,
439
+ stroke: e.value.style.backgroundColor,
440
+ "stroke-width": "2",
441
+ x1: V.value,
442
+ x2: V.value,
443
+ y1: l.value.bottom + e.value.style.layout.cells.height,
444
+ y2: l.value.bottom + e.value.style.layout.cells.height * 2
445
+ }, null, 8, pt)) : y("", !0),
446
+ C.value !== null ? (s(), n("path", {
447
+ key: 1,
448
+ fill: e.value.style.color,
449
+ stroke: "none",
450
+ d: `M ${V.value},${l.value.bottom + e.value.style.layout.cells.height} ${V.value - 12},${l.value.bottom + e.value.style.layout.cells.height - 20} ${V.value + 12},${l.value.bottom + e.value.style.layout.cells.height - 20}z`
451
+ }, null, 8, ft)) : y("", !0)
452
+ ])) : y("", !0),
453
+ k(t.$slots, "svg", { svg: m.value }, void 0, !0)
454
+ ], 14, Ue)) : y("", !0),
455
+ P.value ? y("", !0) : (s(), Y(Xe, {
456
+ key: 3,
457
+ config: {
458
+ type: "heatmap",
459
+ style: {
460
+ backgroundColor: e.value.style.backgroundColor,
461
+ heatmap: {
462
+ color: "#CCCCCC"
463
+ }
464
+ }
465
+ }
466
+ }, null, 8, ["config"])),
467
+ K(Re, {
468
+ show: b.value.showTooltip && H.value,
469
+ backgroundColor: e.value.style.tooltip.backgroundColor,
470
+ color: e.value.style.tooltip.color,
471
+ borderRadius: e.value.style.tooltip.borderRadius,
472
+ borderColor: e.value.style.tooltip.borderColor,
473
+ borderWidth: e.value.style.tooltip.borderWidth,
474
+ fontSize: e.value.style.tooltip.fontSize,
475
+ backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
476
+ parent: X.value,
477
+ content: j.value,
478
+ isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function"
479
+ }, {
480
+ "tooltip-before": w(() => [
481
+ k(t.$slots, "tooltip-before", q(J({ ...D.value })), void 0, !0)
482
+ ]),
483
+ "tooltip-after": w(() => [
484
+ k(t.$slots, "tooltip-after", q(J({ ...D.value })), void 0, !0)
485
+ ]),
486
+ _: 3
487
+ }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "parent", "content", "isCustom"]),
488
+ P.value ? (s(), Y(He, {
489
+ key: 4,
490
+ hideDetails: "",
491
+ config: {
492
+ open: b.value.showTable,
493
+ maxHeight: 1e4,
494
+ body: {
495
+ backgroundColor: e.value.style.backgroundColor,
496
+ color: e.value.style.color
497
+ },
498
+ head: {
499
+ backgroundColor: e.value.style.backgroundColor,
500
+ color: e.value.style.color
501
+ }
502
+ }
503
+ }, {
504
+ content: w(() => [
505
+ u("div", {
506
+ ref_key: "tableContainer",
507
+ ref: te,
508
+ class: "vue-ui-heatmap-table"
509
+ }, [
510
+ u("div", {
511
+ style: "width:100%;overflow-x:auto;padding-top:36px;position:relative",
512
+ class: G({ "vue-ui-responsive": le.value })
513
+ }, [
514
+ u("div", {
515
+ role: "button",
516
+ tabindex: "0",
517
+ 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};`),
518
+ onClick: o[1] || (o[1] = (a) => b.value.showTable = !1),
519
+ onKeypress: o[2] || (o[2] = ke((a) => b.value.showTable = !1, ["enter"]))
520
+ }, [
521
+ K(Ne, {
522
+ name: "close",
523
+ stroke: e.value.table.th.color,
524
+ "stroke-width": 2
525
+ }, null, 8, ["stroke"])
526
+ ], 36),
527
+ u("table", bt, [
528
+ u("caption", {
529
+ style: f(`backgroundColor:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
530
+ }, [
531
+ $e(h(e.value.style.title.text) + " ", 1),
532
+ e.value.style.title.subtitle.text ? (s(), n("span", mt, h(e.value.style.title.subtitle.text), 1)) : y("", !0)
533
+ ], 4),
534
+ u("thead", null, [
535
+ u("tr", {
536
+ role: "row",
537
+ style: f(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color}`)
538
+ }, [
539
+ u("th", {
540
+ style: f(`outline:${e.value.table.th.outline};padding-right:6px`)
541
+ }, null, 4),
542
+ (s(!0), n(T, null, S(O.dataset, (a, r) => (s(), n("th", {
543
+ align: "right",
544
+ style: f(`outline:${e.value.table.th.outline};padding-right:6px`)
545
+ }, h(a.name), 5))), 256))
546
+ ], 4)
547
+ ]),
548
+ u("tbody", null, [
549
+ (s(!0), n(T, null, S($.value.xLabels, (a, r) => (s(), n("tr", {
550
+ role: "row",
551
+ 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 }),
552
+ style: f(`background:${e.value.table.td.backgroundColor};color:${e.value.table.td.color}`)
553
+ }, [
554
+ u("td", {
555
+ "data-cell": e.value.table.colNames.xAxis,
556
+ class: "vue-ui-data-table__tbody__td",
557
+ style: f(`outline:${e.value.table.td.outline}`)
558
+ }, [
559
+ u("div", _t, h(a), 1)
560
+ ], 12, xt),
561
+ (s(!0), n(T, null, S(O.dataset, (v, g) => (s(), n("td", {
562
+ class: "vue-ui-data-table__tbody__td",
563
+ "data-cell": O.dataset[g].name,
564
+ style: f(`outline:${e.value.table.td.outline}`)
565
+ }, [
566
+ u("div", kt, h(isNaN(v.values[r]) ? "-" : z(re)({ 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)
567
+ ], 12, wt))), 256))
568
+ ], 6))), 256))
569
+ ])
570
+ ])
571
+ ], 2)
572
+ ], 512)
573
+ ]),
574
+ _: 1
575
+ }, 8, ["config"])) : y("", !0)
576
+ ], 14, je));
577
+ }
578
+ }, Ft = /* @__PURE__ */ Le($t, [["__scopeId", "data-v-b33d6b28"]]);
579
+ export {
580
+ Ft as default
581
+ };
@@ -0,0 +1,55 @@
1
+ import { computed as $, ref as v, 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 "./title-BF-9Qcni.js";
3
+ import { n as b } from "./data-table-d-VcuH-r.js";
4
+ import { u as N } from "./vue-ui-3d-bar-DW7kGJSz.js";
5
+ const V = {
6
+ __name: "vue-ui-kpi",
7
+ props: {
8
+ config: {
9
+ type: Object,
10
+ default() {
11
+ return {};
12
+ }
13
+ },
14
+ dataset: {
15
+ type: Number,
16
+ default: 0
17
+ }
18
+ },
19
+ setup(l) {
20
+ const t = l, { vue_ui_kpi: c } = N(), e = $(() => F({
21
+ userConfig: t.config,
22
+ defaultConfig: c
23
+ })), p = v((typeof t.dataset == "number", t.dataset)), o = v(e.value.useAnimation ? e.value.animationValueStart : p.value);
24
+ return y(() => {
25
+ const a = e.value.animationFrames, i = t.dataset / a;
26
+ function r() {
27
+ o.value += i, o.value < t.dataset ? requestAnimationFrame(r) : o.value = t.dataset;
28
+ }
29
+ e.value.useAnimation && (o.value = 0, r());
30
+ }), (a, i) => (C(), g("div", {
31
+ class: s(`vue-ui-kpi ${e.value.layoutClass}`),
32
+ style: n(`background:${e.value.backgroundColor}; ${e.value.layoutCss}`)
33
+ }, [
34
+ m("div", {
35
+ class: s(`vue-ui-kpi-title ${e.value.titleClass}`),
36
+ 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}`)
37
+ }, [
38
+ u(a.$slots, "title", { comment: l.dataset }),
39
+ f(" " + d(e.value.title), 1)
40
+ ], 6),
41
+ u(a.$slots, "comment-before", { comment: l.dataset }),
42
+ m("div", {
43
+ class: s(`vue-ui-kpi-value ${e.value.valueClass}`),
44
+ 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}`)
45
+ }, [
46
+ u(a.$slots, "value", { comment: l.dataset }),
47
+ f(" " + d(k(b)({ p: e.value.prefix, v: o.value, s: e.value.suffix, r: e.value.valueRounding })), 1)
48
+ ], 6),
49
+ u(a.$slots, "comment-after", { comment: l.dataset })
50
+ ], 6));
51
+ }
52
+ };
53
+ export {
54
+ V as default
55
+ };