vue-data-ui 3.0.0-next.7 → 3.0.0-next.70
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-Bl8urcli.js → Arrow-fzydFjfE.js} +1 -1
- package/dist/{BaseDraggableDialog-CyhpaZU5.js → BaseDraggableDialog-BwazM8ka.js} +2 -2
- package/dist/{BaseIcon-BCZfTCeM.js → BaseIcon-BnbvQjs5.js} +1 -1
- package/dist/{ColorPicker-CSJf42vx.js → ColorPicker-DR1Yr4kR.js} +2 -2
- package/dist/{DataTable-mQ6Wd-rR.js → DataTable-CKpA_OA_.js} +2 -2
- package/dist/{Legend-B2hrDh4G.js → Legend-ChXhJNzd.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DQ8KsK4W.js → NonSvgPenAndPaper-CPOpM7Os.js} +3 -3
- package/dist/{PackageVersion-CeEYZfaH.js → PackageVersion-CBHvscRY.js} +1 -1
- package/dist/{PenAndPaper-DhSxfUrQ.js → PenAndPaper-BCcfYvgR.js} +3 -3
- package/dist/{Shape-C2qH26wh.js → Shape-C1rNfsMY.js} +43 -37
- package/dist/Slicer-D8a4Wv1q.js +602 -0
- package/dist/{SparkTooltip-BcHgW6YX.js → SparkTooltip-BUdf02cs.js} +1 -1
- package/dist/{Title-B7Xb3YuE.js → Title-feqCv0Si.js} +1 -1
- package/dist/{Tooltip-BidRoM5E.js → Tooltip-DQbksria.js} +23 -19
- package/dist/{UserOptions-0tvMM8PF.js → UserOptions-CGnAZpYs.js} +2 -2
- package/dist/{dom-to-png-CTrlbKHr.js → dom-to-png-DTPmkDTK.js} +1 -1
- package/dist/{img-D72yZNUg.js → img-_RMhslMZ.js} +1 -1
- package/dist/{index-Cg-RjxqH.js → index-CnY41r21.js} +2103 -1411
- package/dist/{pdf-DgX01_wu.js → pdf-C02XBmhm.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +600 -22
- package/dist/types/vue-data-ui.d.ts +600 -22
- package/dist/useAutoSizeLabelsInsideViewbox-DVYZBwNc.js +81 -0
- package/dist/useFitSvgText-2crs6Fv5.js +69 -0
- package/dist/useLoading-D7YHNtLX.js +29 -0
- package/dist/useNestedProp-DtUATNAU.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-BUzmyQf9.js → usePrinter-CJ1uZx0D.js} +2 -2
- package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
- package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
- package/dist/{vue-data-ui-DpO93ey5.js → vue-data-ui-DDBabVWX.js} +105 -100
- package/dist/vue-data-ui.js +23 -22
- package/dist/vue-ui-3d-bar-CtPXePUa.js +1323 -0
- package/dist/{vue-ui-accordion-CRomxzaL.js → vue-ui-accordion-CnLY8CrQ.js} +3 -3
- package/dist/vue-ui-age-pyramid-CvrNLE47.js +834 -0
- package/dist/{vue-ui-annotator-BAOxPiFx.js → vue-ui-annotator-NuSwWka4.js} +2 -2
- package/dist/vue-ui-bullet-CpIVgkPB.js +571 -0
- package/dist/vue-ui-candlestick-DGWKUeJp.js +999 -0
- package/dist/{vue-ui-carousel-table-DVGlPZIa.js → vue-ui-carousel-table-DWbQS8F3.js} +29 -29
- package/dist/{vue-ui-chestnut-P1v4ffD0.js → vue-ui-chestnut-K4-oOYff.js} +5 -5
- package/dist/vue-ui-chord-DqmP8yTR.js +1038 -0
- package/dist/{vue-ui-circle-pack-FXmemXgl.js → vue-ui-circle-pack-D_ufubH5.js} +24 -24
- package/dist/{vue-ui-cursor-CdvMgIrP.js → vue-ui-cursor-B0tP4woK.js} +2 -2
- package/dist/{vue-ui-dashboard-Vke0452J.js → vue-ui-dashboard-D_7qyx3P.js} +62 -62
- package/dist/{vue-ui-digits-BVhyYqCs.js → vue-ui-digits-pUQErY07.js} +2 -2
- package/dist/{vue-ui-donut-BpIivKcf.js → vue-ui-donut-Dl__PVfq.js} +320 -308
- package/dist/vue-ui-donut-evolution-BCGGTZZI.js +1075 -0
- package/dist/vue-ui-dumbbell-KzCa3k9g.js +1119 -0
- package/dist/vue-ui-flow-B1AOqk14.js +841 -0
- package/dist/{vue-ui-funnel-BbFmbsft.js → vue-ui-funnel-DCl9v71X.js} +16 -16
- package/dist/{vue-ui-galaxy-Cn6vHbaw.js → vue-ui-galaxy-0rAzDHe5.js} +60 -58
- package/dist/vue-ui-gauge-Cg4qAOEf.js +791 -0
- package/dist/vue-ui-gizmo-CQmMkODw.js +210 -0
- package/dist/vue-ui-heatmap-CgkgUDI0.js +1078 -0
- package/dist/vue-ui-history-plot-CYvkTszV.js +1073 -0
- package/dist/{vue-ui-kpi-jN_yMnLj.js → vue-ui-kpi-BDuOZbc2.js} +26 -26
- package/dist/{vue-ui-mini-loader-rYr76x8g.js → vue-ui-mini-loader-BZaU_YD-.js} +2 -2
- package/dist/{vue-ui-molecule-BWZHOQLi.js → vue-ui-molecule-HYjHgVuN.js} +53 -51
- package/dist/vue-ui-mood-radar-4pYtL93A.js +785 -0
- package/dist/vue-ui-nested-donuts-BVbvVm19.js +1286 -0
- package/dist/vue-ui-onion-DQg97Dwm.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-KQ4FTUda.js +915 -0
- package/dist/{vue-ui-quadrant-BFFzfDw3.js → vue-ui-quadrant-D8OU7TFs.js} +512 -459
- package/dist/vue-ui-quick-chart-BOKDoHdK.js +1761 -0
- package/dist/vue-ui-radar-2hTf-Qrf.js +796 -0
- package/dist/{vue-ui-rating-BAauyqTn.js → vue-ui-rating-QriKDSO7.js} +2 -2
- package/dist/vue-ui-relation-circle-DqLiKEHw.js +598 -0
- package/dist/vue-ui-ridgeline-CvFlsavM.js +1153 -0
- package/dist/vue-ui-rings-B2ges9Ud.js +728 -0
- package/dist/vue-ui-scatter-DQJeFlv4.js +1178 -0
- package/dist/{vue-ui-skeleton-CUOhCY4p.js → vue-ui-skeleton-Bghm5obp.js} +3 -3
- package/dist/{vue-ui-smiley-B6SqWMov.js → vue-ui-smiley-C3SkDNoz.js} +26 -26
- package/dist/vue-ui-spark-trend-dd8h3N7H.js +315 -0
- package/dist/vue-ui-sparkbar-BTj8M7fY.js +351 -0
- package/dist/vue-ui-sparkgauge-BBQAo-W1.js +232 -0
- package/dist/vue-ui-sparkhistogram-C4ZEcb8S.js +380 -0
- package/dist/vue-ui-sparkline-Bm3GpqJx.js +489 -0
- package/dist/vue-ui-sparkstackbar-Dde4iayd.js +421 -0
- package/dist/vue-ui-stackbar-DPvfNjwH.js +1370 -0
- package/dist/vue-ui-strip-plot-iZIN9U90.js +915 -0
- package/dist/{vue-ui-table-Dwjl3L0p.js → vue-ui-table-C4EoviSd.js} +11 -11
- package/dist/{vue-ui-table-heatmap-DazTE3fa.js → vue-ui-table-heatmap-D-eqO3LU.js} +5 -5
- package/dist/{vue-ui-table-sparkline-BXMPUEpN.js → vue-ui-table-sparkline-CD7IH49g.js} +14 -14
- package/dist/vue-ui-thermometer-BKEFH2Xt.js +541 -0
- package/dist/{vue-ui-timer-yLvNAZL_.js → vue-ui-timer-hhKj1gPp.js} +5 -5
- package/dist/vue-ui-tiremarks-CmNwCnVC.js +406 -0
- package/dist/vue-ui-treemap-BL7T8x_B.js +1035 -0
- package/dist/{vue-ui-vertical-bar-BrYCoVym.js → vue-ui-vertical-bar-CGn_OX3P.js} +71 -69
- package/dist/vue-ui-waffle-qfT-wDhI.js +910 -0
- package/dist/vue-ui-wheel-B8J8C3AN.js +379 -0
- package/dist/vue-ui-word-cloud-B6oHFfEK.js +765 -0
- package/dist/{vue-ui-world-B4Dqrk4l.js → vue-ui-world-BEv_oTrC.js} +11 -9
- package/dist/vue-ui-xy-DPBrciAR.js +3771 -0
- package/dist/{vue-ui-xy-canvas-D7fL36kT.js → vue-ui-xy-canvas-BXT3mXj5.js} +265 -264
- package/package.json +1 -1
- package/dist/Slicer-BD8Z8VCW.js +0 -577
- package/dist/useLoading-Bt5Doa8m.js +0 -28
- package/dist/useNestedProp-C_G5E08Y.js +0 -13
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-3d-bar-D8imUwEz.js +0 -1227
- package/dist/vue-ui-age-pyramid-CV7gtFOC.js +0 -746
- package/dist/vue-ui-bullet-BtuMMBF7.js +0 -513
- package/dist/vue-ui-candlestick-BsRtXKrv.js +0 -873
- package/dist/vue-ui-chord-CIuzYmpM.js +0 -949
- package/dist/vue-ui-donut-evolution-BRlsCA4U.js +0 -903
- package/dist/vue-ui-dumbbell-D87Dumjh.js +0 -753
- package/dist/vue-ui-flow-D_L_xssL.js +0 -765
- package/dist/vue-ui-gauge-Ds4terqY.js +0 -738
- package/dist/vue-ui-gizmo-BTncpI62.js +0 -192
- package/dist/vue-ui-heatmap-B6GpjeWC.js +0 -877
- package/dist/vue-ui-history-plot-DTDzEeGq.js +0 -924
- package/dist/vue-ui-mood-radar-CPfS6f1L.js +0 -670
- package/dist/vue-ui-nested-donuts-Bsd2kGoJ.js +0 -1177
- package/dist/vue-ui-onion-BQ4nISXW.js +0 -701
- package/dist/vue-ui-parallel-coordinate-plot-BoHgVgbn.js +0 -807
- package/dist/vue-ui-quick-chart-oNMTeOAL.js +0 -1612
- package/dist/vue-ui-radar-98mXFZe-.js +0 -741
- package/dist/vue-ui-relation-circle-6oDCSxkO.js +0 -542
- package/dist/vue-ui-ridgeline-CugMGjOU.js +0 -969
- package/dist/vue-ui-rings-bsGXaD2m.js +0 -685
- package/dist/vue-ui-scatter-7ssLliGg.js +0 -1045
- package/dist/vue-ui-spark-trend-jauInkkN.js +0 -291
- package/dist/vue-ui-sparkbar-DXByIxQH.js +0 -301
- package/dist/vue-ui-sparkgauge-BMrV2gDi.js +0 -201
- package/dist/vue-ui-sparkhistogram-CoNM4G7o.js +0 -313
- package/dist/vue-ui-sparkline-DrN3_wS0.js +0 -459
- package/dist/vue-ui-sparkstackbar-W1a0JQi9.js +0 -381
- package/dist/vue-ui-stackbar-D1-gbUgE.js +0 -1207
- package/dist/vue-ui-strip-plot-KhfvrVuN.js +0 -761
- package/dist/vue-ui-thermometer-Cn6lJRs3.js +0 -495
- package/dist/vue-ui-tiremarks-BYsWePfK.js +0 -358
- package/dist/vue-ui-treemap-Ce7RVFG3.js +0 -965
- package/dist/vue-ui-waffle-CCrR2T1G.js +0 -863
- package/dist/vue-ui-wheel-BuxjnrDN.js +0 -352
- package/dist/vue-ui-word-cloud-C6fawHJE.js +0 -659
- package/dist/vue-ui-xy-ubRnv9iJ.js +0 -2980
|
@@ -0,0 +1,765 @@
|
|
|
1
|
+
import { useCssVars as et, defineAsyncComponent as Z, computed as ie, ref as f, toRefs as tt, watch as ue, shallowRef as Ne, onMounted as at, onBeforeUnmount as ot, createElementBlock as X, openBlock as w, unref as i, normalizeStyle as pe, createBlock as Q, createCommentVNode as L, createVNode as xe, createSlots as lt, withCtx as N, renderSlot as A, normalizeProps as ee, guardReactiveProps as te, normalizeClass as _e, createElementVNode as $e, Fragment as nt, renderList as st, toDisplayString as Re, createTextVNode as it, nextTick as Ve } from "vue";
|
|
2
|
+
import { d as ut, t as rt, u as ct } from "./useResponsive-DfdjqQps.js";
|
|
3
|
+
import { u as vt, c as Be, t as dt, an as mt, h as ht, a as ft, p as ge, b as pt, o as Xe, f as De, g as gt, i as yt, X as bt, v as wt, w as Ct, y as kt } from "./index-CnY41r21.js";
|
|
4
|
+
import { u as xt, B as $t } from "./useLoading-D7YHNtLX.js";
|
|
5
|
+
import { u as Tt } from "./usePrinter-CJ1uZx0D.js";
|
|
6
|
+
import { u as Ee } from "./useNestedProp-DtUATNAU.js";
|
|
7
|
+
import { u as St } from "./useUserOptionState-BIvW1Kz7.js";
|
|
8
|
+
import { u as Mt } from "./useChartAccessibility-9icAAmYg.js";
|
|
9
|
+
import Ft from "./img-_RMhslMZ.js";
|
|
10
|
+
import Pt from "./Title-feqCv0Si.js";
|
|
11
|
+
import { u as At } from "./usePanZoom-BVca3eMk.js";
|
|
12
|
+
import { _ as It } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
+
function Ot(C, g) {
|
|
14
|
+
const { width: r, height: p } = C, m = g.getImageData(0, 0, r, p).data;
|
|
15
|
+
let l = r, o = p, s = 0, k = 0, d = !1;
|
|
16
|
+
for (let h = 0; h < p; h += 1)
|
|
17
|
+
for (let b = 0; b < r; b += 1)
|
|
18
|
+
m[(h * r + b) * 4 + 3] > 1 && (d = !0, b < l && (l = b), b > s && (s = b), h < o && (o = h), h > k && (k = h));
|
|
19
|
+
return d ? [l, o, s, k] : [0, 0, 0, 0];
|
|
20
|
+
}
|
|
21
|
+
function We({
|
|
22
|
+
word: C,
|
|
23
|
+
fontSize: g,
|
|
24
|
+
pad: r,
|
|
25
|
+
canvas: p,
|
|
26
|
+
ctx: c,
|
|
27
|
+
svg: m
|
|
28
|
+
}) {
|
|
29
|
+
c.save(), c.font = `${m.style && m.style.bold ? "bold " : ""}${g}px Arial`;
|
|
30
|
+
const l = c.measureText(C.name), o = Math.ceil(l.width) + 2 + (r ? r * 2 : 0), s = Math.ceil(g) + 2 + (r ? r * 2 : 0);
|
|
31
|
+
p.width = o, p.height = s, c.clearRect(0, 0, o, s), c.font = `${m.style && m.style.bold ? "bold " : ""}${g}px Arial`, c.textAlign = "center", c.textBaseline = "middle", c.fillStyle = "black", c.fillText(C.name, o / 2, s / 2);
|
|
32
|
+
const d = c.getImageData(0, 0, o, s).data, h = [];
|
|
33
|
+
for (let E = 0; E < s; E += 1)
|
|
34
|
+
for (let Y = 0; Y < o; Y += 1)
|
|
35
|
+
d[(E * o + Y) * 4 + 3] > 1 && h.push([Y, E]);
|
|
36
|
+
const [b, U, $, D] = Ot(p, c);
|
|
37
|
+
return c.restore(), { w: o, h: s, wordMask: h, minX: b, minY: U, maxX: $, maxY: D };
|
|
38
|
+
}
|
|
39
|
+
function Le({ mask: C, maskW: g, maskH: r, wx: p, wy: c, wordMask: m }) {
|
|
40
|
+
for (let l = 0; l < m.length; l += 1) {
|
|
41
|
+
const o = p + m[l][0], s = c + m[l][1];
|
|
42
|
+
if (o < 0 || s < 0 || o >= g || s >= r || C[s * g + o]) return !1;
|
|
43
|
+
}
|
|
44
|
+
return !0;
|
|
45
|
+
}
|
|
46
|
+
function Ye({ mask: C, maskW: g, maskH: r, wx: p, wy: c, wordMask: m }) {
|
|
47
|
+
for (let l = 0; l < m.length; l += 1) {
|
|
48
|
+
const o = p + m[l][0], s = c + m[l][1];
|
|
49
|
+
o >= 0 && s >= 0 && o < g && s < r && (C[s * g + o] = 1);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function zt({ wordMask: C, w: g, h: r, dilation: p }) {
|
|
53
|
+
const c = new Set(C.map(([l, o]) => `${l},${o}`)), m = new Set(c);
|
|
54
|
+
for (let [l, o] of C)
|
|
55
|
+
for (let s = -p; s <= p; s += 1)
|
|
56
|
+
for (let k = -p; k <= p; k += 1) {
|
|
57
|
+
if (s === 0 && k === 0) continue;
|
|
58
|
+
const d = l + s, h = o + k;
|
|
59
|
+
d >= 0 && d < g && h >= 0 && h < r && m.add(`${d},${h}`);
|
|
60
|
+
}
|
|
61
|
+
return Array.from(m).map((l) => l.split(",").map(Number));
|
|
62
|
+
}
|
|
63
|
+
function Nt({
|
|
64
|
+
words: C,
|
|
65
|
+
proximity: g = 0,
|
|
66
|
+
svg: r,
|
|
67
|
+
strictPixelPadding: p
|
|
68
|
+
}) {
|
|
69
|
+
const { width: c, height: m } = r, l = Math.round(c), o = Math.round(m), s = 1, k = r.minFontSize, d = Math.min(r.maxFontSize, 100), h = C.map((T) => T.value), b = Math.min(...h), U = Math.max(...h), $ = new Uint8Array(l * o), D = document.createElement("canvas"), E = D.getContext("2d", { willReadFrequently: !0 });
|
|
70
|
+
D.width = l, D.height = o;
|
|
71
|
+
const Y = 6, re = 2, ae = 2, e = 1, ce = Math.floor(l / 2), J = Math.floor(o / 2), ye = [...C].sort((T, I) => I.value - T.value), G = [];
|
|
72
|
+
for (const T of ye) {
|
|
73
|
+
let I = k;
|
|
74
|
+
U !== b && (I = (T.value - b) / (U - b) * (d - k) + k), I = Math.max(k, Math.min(d, I));
|
|
75
|
+
let W = !1, _ = I;
|
|
76
|
+
for (; !W && _ >= s; ) {
|
|
77
|
+
let { w: O, h: z, wordMask: R, minX: j, minY: oe, maxX: q, maxY: v } = We({
|
|
78
|
+
word: T,
|
|
79
|
+
fontSize: _,
|
|
80
|
+
pad: g,
|
|
81
|
+
canvas: D,
|
|
82
|
+
ctx: E,
|
|
83
|
+
svg: r
|
|
84
|
+
});
|
|
85
|
+
p && (R = zt({ wordMask: R, w: O, h: z, dilation: 1 }));
|
|
86
|
+
let V = 0, S = 0;
|
|
87
|
+
for (; V < Math.max(l, o) && !W && S < 1e4; ) {
|
|
88
|
+
for (let x = 0; x < 360; x += Y) {
|
|
89
|
+
S += 1;
|
|
90
|
+
const M = Math.round(ce + V * Math.cos(x * Math.PI / 180) - O / 2), F = Math.round(J + V * Math.sin(x * Math.PI / 180) - z / 2);
|
|
91
|
+
if (!(M < 0 || F < 0 || M + O > l || F + z > o) && Le({ mask: $, maskW: l, maskH: o, wx: M, wy: F, wordMask: R })) {
|
|
92
|
+
G.push({ ...T, x: M - l / 2, y: F - o / 2, fontSize: _, width: O, height: z, angle: 0, minX: j, minY: oe, maxX: q, maxY: v }), Ye({ mask: $, maskW: l, maskH: o, wx: M, wy: F, wordMask: R }), W = !0;
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
V += re;
|
|
97
|
+
}
|
|
98
|
+
W || (_ -= 1);
|
|
99
|
+
}
|
|
100
|
+
if (!W && _ < s) {
|
|
101
|
+
_ = s;
|
|
102
|
+
const { w: O, h: z, wordMask: R, minX: j, minY: oe, maxX: q, maxY: v } = We({
|
|
103
|
+
word: T,
|
|
104
|
+
fontSize: _,
|
|
105
|
+
pad: g,
|
|
106
|
+
canvas: D,
|
|
107
|
+
ctx: E,
|
|
108
|
+
svg: r
|
|
109
|
+
});
|
|
110
|
+
let V = 0, S = 0;
|
|
111
|
+
for (; V < Math.max(l, o) && !W && S < 25e3; ) {
|
|
112
|
+
for (let x = 0; x < 360; x += ae) {
|
|
113
|
+
S += 1;
|
|
114
|
+
const M = Math.round(ce + V * Math.cos(x * Math.PI / 180) - O / 2), F = Math.round(J + V * Math.sin(x * Math.PI / 180) - z / 2);
|
|
115
|
+
if (!(M < 0 || F < 0 || M + O > l || F + z > o) && Le({ mask: $, maskW: l, maskH: o, wx: M, wy: F, wordMask: R })) {
|
|
116
|
+
G.push({ ...T, x: M - l / 2, y: F - o / 2, fontSize: _, width: O, height: z, angle: 0, minX: j, minY: oe, maxX: q, maxY: v }), Ye({ mask: $, maskW: l, maskH: o, wx: M, wy: F, wordMask: R }), W = !0;
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
V += e;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return G.sort((T, I) => I.fontSize - T.fontSize);
|
|
125
|
+
}
|
|
126
|
+
const _t = ["id"], Rt = ["xmlns", "viewBox"], Vt = ["width", "height"], Bt = ["transform"], Xt = ["x", "y", "width", "height", "onMouseover", "onMouseleave", "onClick"], Dt = ["fill", "font-weight", "x", "y", "font-size", "transform"], Et = {
|
|
127
|
+
key: 3,
|
|
128
|
+
class: "vue-data-ui-watermark"
|
|
129
|
+
}, Wt = {
|
|
130
|
+
key: 4,
|
|
131
|
+
"data-dom-to-png-ignore": "",
|
|
132
|
+
class: "reset-wrapper"
|
|
133
|
+
}, Lt = ["innerHTML"], Yt = {
|
|
134
|
+
__name: "vue-ui-word-cloud",
|
|
135
|
+
props: {
|
|
136
|
+
config: {
|
|
137
|
+
type: Object,
|
|
138
|
+
default() {
|
|
139
|
+
return {};
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
dataset: {
|
|
143
|
+
type: [Array, String],
|
|
144
|
+
default() {
|
|
145
|
+
return [];
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
setup(C, { expose: g }) {
|
|
150
|
+
et((t) => ({
|
|
151
|
+
"1946195c": t.slicerColor
|
|
152
|
+
}));
|
|
153
|
+
const r = Z(() => import("./Tooltip-DQbksria.js")), p = Z(() => import("./BaseIcon-BnbvQjs5.js")), c = Z(() => import("./vue-ui-accordion-CnLY8CrQ.js")), m = Z(() => import("./DataTable-CKpA_OA_.js")), l = Z(() => import("./PenAndPaper-BCcfYvgR.js")), o = Z(() => import("./UserOptions-CGnAZpYs.js")), s = Z(() => import("./PackageVersion-CBHvscRY.js")), { vue_ui_word_cloud: k } = vt(), d = C, h = ie({
|
|
154
|
+
get() {
|
|
155
|
+
return !!d.dataset && d.dataset.length;
|
|
156
|
+
},
|
|
157
|
+
set(t) {
|
|
158
|
+
return t;
|
|
159
|
+
}
|
|
160
|
+
}), b = f(Be()), U = f(0), $ = f(null), D = f(null), E = f(null), Y = f(0), re = f(0), ae = f(!1), e = f(z()), { loading: ce, FINAL_DATASET: J, manualLoading: ye } = xt({
|
|
161
|
+
...tt(d),
|
|
162
|
+
FINAL_CONFIG: e,
|
|
163
|
+
prepareConfig: z,
|
|
164
|
+
skeletonDataset: [
|
|
165
|
+
{ name: "Lorem", value: 6 },
|
|
166
|
+
{ name: "ipsum", value: 3 },
|
|
167
|
+
{ name: "dolor", value: 1 },
|
|
168
|
+
{ name: "sit", value: 3 },
|
|
169
|
+
{ name: "amet", value: 3 },
|
|
170
|
+
{ name: "consectetur", value: 2 },
|
|
171
|
+
{ name: "adipiscing", value: 1 },
|
|
172
|
+
{ name: "elit", value: 2 },
|
|
173
|
+
{ name: "Vivamus", value: 2 },
|
|
174
|
+
{ name: "pulvinar", value: 1 },
|
|
175
|
+
{ name: "pretium", value: 1 },
|
|
176
|
+
{ name: "venenatis", value: 2 },
|
|
177
|
+
{ name: "Donec", value: 1 },
|
|
178
|
+
{ name: "imperdiet", value: 3 },
|
|
179
|
+
{ name: "id", value: 1 },
|
|
180
|
+
{ name: "porttitor", value: 2 },
|
|
181
|
+
{ name: "tristique", value: 1 },
|
|
182
|
+
{ name: "Aenean", value: 2 },
|
|
183
|
+
{ name: "ac", value: 5 },
|
|
184
|
+
{ name: "commodo", value: 2 },
|
|
185
|
+
{ name: "justo", value: 2 },
|
|
186
|
+
{ name: "Vestibulum", value: 2 },
|
|
187
|
+
{ name: "placerat", value: 1 },
|
|
188
|
+
{ name: "molestie", value: 1 },
|
|
189
|
+
{ name: "nisl", value: 1 },
|
|
190
|
+
{ name: "lacinia", value: 2 },
|
|
191
|
+
{ name: "nulla", value: 1 },
|
|
192
|
+
{ name: "posuere", value: 2 },
|
|
193
|
+
{ name: "quis", value: 3 },
|
|
194
|
+
{ name: "ullamcorper", value: 1 },
|
|
195
|
+
{ name: "eu", value: 1 },
|
|
196
|
+
{ name: "ex", value: 1 },
|
|
197
|
+
{ name: "vitae", value: 3 },
|
|
198
|
+
{ name: "facilisis", value: 1 },
|
|
199
|
+
{ name: "Aliquam", value: 1 },
|
|
200
|
+
{ name: "erat", value: 1 },
|
|
201
|
+
{ name: "volutpat", value: 1 },
|
|
202
|
+
{ name: "Proin", value: 1 },
|
|
203
|
+
{ name: "nunc", value: 1 },
|
|
204
|
+
{ name: "felis", value: 1 },
|
|
205
|
+
{ name: "gravida", value: 3 },
|
|
206
|
+
{ name: "sed", value: 1 },
|
|
207
|
+
{ name: "orci", value: 1 },
|
|
208
|
+
{ name: "Interdum", value: 1 },
|
|
209
|
+
{ name: "et", value: 1 },
|
|
210
|
+
{ name: "malesuada", value: 1 },
|
|
211
|
+
{ name: "fames", value: 1 },
|
|
212
|
+
{ name: "ante", value: 1 }
|
|
213
|
+
],
|
|
214
|
+
skeletonConfig: dt({
|
|
215
|
+
defaultConfig: e.value,
|
|
216
|
+
userConfig: {
|
|
217
|
+
userOptions: { show: !1 },
|
|
218
|
+
table: { show: !1 },
|
|
219
|
+
useCssAnimation: !1,
|
|
220
|
+
animationDelayMs: 0,
|
|
221
|
+
nodeCategories: {},
|
|
222
|
+
nodeCategoryColors: {},
|
|
223
|
+
style: {
|
|
224
|
+
chart: {
|
|
225
|
+
backgroundColor: "#99999930",
|
|
226
|
+
words: {
|
|
227
|
+
color: "#6A6A6A",
|
|
228
|
+
usePalette: !1
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
})
|
|
234
|
+
}), G = f(T());
|
|
235
|
+
function T() {
|
|
236
|
+
return typeof J.value == "string" ? mt(J.value) : J.value.map((t, n) => ({
|
|
237
|
+
...t,
|
|
238
|
+
value: ht(t.value)
|
|
239
|
+
}));
|
|
240
|
+
}
|
|
241
|
+
ue(() => d.dataset, () => {
|
|
242
|
+
G.value = T(), be(), j();
|
|
243
|
+
});
|
|
244
|
+
const { userOptionsVisible: I, setUserOptionsVisibility: W, keepUserOptionState: _ } = St({ config: e.value }), { svgRef: O } = Mt({ config: e.value.style.chart.title });
|
|
245
|
+
function z() {
|
|
246
|
+
const t = Ee({
|
|
247
|
+
userConfig: d.config,
|
|
248
|
+
defaultConfig: k
|
|
249
|
+
});
|
|
250
|
+
return t.theme ? {
|
|
251
|
+
...Ee({
|
|
252
|
+
userConfig: pt.vue_ui_word_cloud[t.theme] || d.config,
|
|
253
|
+
defaultConfig: t
|
|
254
|
+
}),
|
|
255
|
+
customPalette: ft[t.theme] || ge
|
|
256
|
+
} : t;
|
|
257
|
+
}
|
|
258
|
+
const R = f({ x: 0, y: 0 });
|
|
259
|
+
function j() {
|
|
260
|
+
const t = {
|
|
261
|
+
x: 0,
|
|
262
|
+
y: 0,
|
|
263
|
+
width: Math.max(10, v.value.width),
|
|
264
|
+
height: Math.max(10, v.value.height)
|
|
265
|
+
};
|
|
266
|
+
He(t), R.value = {
|
|
267
|
+
x: t.x + t.width / 2,
|
|
268
|
+
y: t.y + t.height / 2
|
|
269
|
+
}, fe();
|
|
270
|
+
}
|
|
271
|
+
const oe = ut(() => {
|
|
272
|
+
be();
|
|
273
|
+
}, 10), q = f(!1);
|
|
274
|
+
ue(() => q.value, (t) => {
|
|
275
|
+
t === !1 && (oe(), j());
|
|
276
|
+
}), ue(() => d.config, (t) => {
|
|
277
|
+
e.value = z(), I.value = !e.value.userOptions.showOnChartHover, F(), Y.value += 1, re.value += 1, P.value.showTable = e.value.table.show, P.value.showTooltip = e.value.style.chart.tooltip.show;
|
|
278
|
+
}, { deep: !0 });
|
|
279
|
+
const v = f({
|
|
280
|
+
width: e.value.style.chart.width,
|
|
281
|
+
height: e.value.style.chart.height,
|
|
282
|
+
maxFontSize: e.value.style.chart.words.maxFontSize,
|
|
283
|
+
minFontSize: e.value.style.chart.words.minFontSize,
|
|
284
|
+
bold: e.value.style.chart.words.bold
|
|
285
|
+
}), V = rt(() => {
|
|
286
|
+
q.value = !0;
|
|
287
|
+
const { width: t, height: n } = ct({
|
|
288
|
+
chart: $.value,
|
|
289
|
+
title: e.value.style.chart.title.text ? D.value : null,
|
|
290
|
+
source: E.value
|
|
291
|
+
});
|
|
292
|
+
requestAnimationFrame(async () => {
|
|
293
|
+
v.value.width = Math.max(10, t), v.value.height = Math.max(10, n - 12), await Ve(), q.value = !1;
|
|
294
|
+
});
|
|
295
|
+
}), S = Ne(null), x = Ne(null);
|
|
296
|
+
at(F);
|
|
297
|
+
const M = ie(() => !!e.value.debug);
|
|
298
|
+
function F() {
|
|
299
|
+
Xe(d.dataset) ? De({
|
|
300
|
+
componentName: "VueUiWordCloud",
|
|
301
|
+
type: "dataset",
|
|
302
|
+
debug: M.value
|
|
303
|
+
}) : G.value.forEach((t, n) => {
|
|
304
|
+
gt({
|
|
305
|
+
datasetObject: t,
|
|
306
|
+
requiredAttributes: ["name", "value"]
|
|
307
|
+
}).forEach((a) => {
|
|
308
|
+
h.value = !1, De({
|
|
309
|
+
componentName: "VueUiWordCloud",
|
|
310
|
+
type: "datasetSerieAttribute",
|
|
311
|
+
property: a,
|
|
312
|
+
index: n,
|
|
313
|
+
debug: M.value
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
}), Xe(d.dataset) || (ye.value = e.value.loading), e.value.responsive && (S.value && (x.value && S.value.unobserve(x.value), S.value.disconnect()), S.value = new ResizeObserver(V), x.value = $.value.parentNode, S.value.observe(x.value)), j();
|
|
317
|
+
}
|
|
318
|
+
ot(() => {
|
|
319
|
+
S.value && (x.value && S.value.unobserve(x.value), S.value.disconnect());
|
|
320
|
+
});
|
|
321
|
+
const { isPrinting: Te, isImaging: Se, generatePdf: Me, generateImage: Fe } = Tt({
|
|
322
|
+
elementId: `wordCloud_${b.value}`,
|
|
323
|
+
fileName: e.value.style.chart.title.text || "vue-ui-word-cloud",
|
|
324
|
+
options: e.value.userOptions.print
|
|
325
|
+
}), P = f({
|
|
326
|
+
showTable: e.value.table.show,
|
|
327
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
328
|
+
});
|
|
329
|
+
ue(e, () => {
|
|
330
|
+
P.value = {
|
|
331
|
+
showTable: e.value.table.show,
|
|
332
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
333
|
+
};
|
|
334
|
+
}, { immediate: !0 });
|
|
335
|
+
function Ue(t, n, a = "Arial") {
|
|
336
|
+
const y = document.createElement("canvas").getContext("2d");
|
|
337
|
+
return y.font = `${n}px ${e.value.style.chart.words.bold ? "bold" : "normal"} ${a}`, {
|
|
338
|
+
width: y.measureText(t).width + e.value.style.chart.words.proximity,
|
|
339
|
+
height: n
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
const le = f([]);
|
|
343
|
+
ue(() => d.dataset, be, { immediate: !0 });
|
|
344
|
+
function be() {
|
|
345
|
+
const t = [...G.value].map((y) => y.value), n = Math.max(...t), a = Math.min(...t), u = [...G.value].map((y, B) => {
|
|
346
|
+
let H = (y.value - a) / (n - a) * (v.value.maxFontSize - v.value.minFontSize) + v.value.minFontSize;
|
|
347
|
+
H = isNaN(H) ? v.value.minFontSize : H;
|
|
348
|
+
const ze = Ue(y.name, H);
|
|
349
|
+
return {
|
|
350
|
+
...y,
|
|
351
|
+
id: Be(),
|
|
352
|
+
fontSize: H,
|
|
353
|
+
width: ze.width,
|
|
354
|
+
height: ze.height,
|
|
355
|
+
color: e.value.style.chart.words.usePalette ? e.value.customPalette[B] || e.value.customPalette[B % e.value.customPalette.length] || ge[B] || ge[B % ge.length] : e.value.style.chart.words.color
|
|
356
|
+
};
|
|
357
|
+
});
|
|
358
|
+
le.value = Nt({
|
|
359
|
+
words: u,
|
|
360
|
+
svg: v.value,
|
|
361
|
+
proximity: e.value.style.chart.words.proximity,
|
|
362
|
+
strictPixelPadding: e.value.strictPixelPadding
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
const ve = ie(() => {
|
|
366
|
+
const t = le.value.map((a) => ({
|
|
367
|
+
name: a.name,
|
|
368
|
+
color: a.color
|
|
369
|
+
})), n = le.value.map((a) => a.value);
|
|
370
|
+
return { head: t, body: n };
|
|
371
|
+
});
|
|
372
|
+
function Pe(t = null) {
|
|
373
|
+
Ve(() => {
|
|
374
|
+
const n = ve.value.head.map((y, B) => [[
|
|
375
|
+
y.name
|
|
376
|
+
], [ve.value.body[B]]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(n), u = wt(a);
|
|
377
|
+
t ? t(u) : Ct({ csvContent: u, title: e.value.style.chart.title.text || "vue-ui-word-cloud" });
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
const de = ie(() => {
|
|
381
|
+
const t = [
|
|
382
|
+
e.value.table.columnNames.series,
|
|
383
|
+
e.value.table.columnNames.value
|
|
384
|
+
], n = ve.value.head.map((y, B) => {
|
|
385
|
+
const H = yt({ p: e.value.table.td.prefix, v: ve.value.body[B], s: e.value.table.td.suffix, r: e.value.table.td.roundingValue });
|
|
386
|
+
return [
|
|
387
|
+
{
|
|
388
|
+
color: y.color,
|
|
389
|
+
name: y.name
|
|
390
|
+
},
|
|
391
|
+
H
|
|
392
|
+
];
|
|
393
|
+
}), a = {
|
|
394
|
+
th: {
|
|
395
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
396
|
+
color: e.value.table.th.color,
|
|
397
|
+
outline: e.value.table.th.outline
|
|
398
|
+
},
|
|
399
|
+
td: {
|
|
400
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
401
|
+
color: e.value.table.td.color,
|
|
402
|
+
outline: e.value.table.td.outline
|
|
403
|
+
},
|
|
404
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
405
|
+
};
|
|
406
|
+
return {
|
|
407
|
+
colNames: [
|
|
408
|
+
e.value.table.columnNames.series,
|
|
409
|
+
e.value.table.columnNames.value
|
|
410
|
+
],
|
|
411
|
+
head: t,
|
|
412
|
+
body: n,
|
|
413
|
+
config: a
|
|
414
|
+
};
|
|
415
|
+
}), me = f(!1);
|
|
416
|
+
function Ae(t) {
|
|
417
|
+
me.value = t, U.value += 1;
|
|
418
|
+
}
|
|
419
|
+
function Ge() {
|
|
420
|
+
return le.value;
|
|
421
|
+
}
|
|
422
|
+
function Ie() {
|
|
423
|
+
P.value.showTable = !P.value.showTable;
|
|
424
|
+
}
|
|
425
|
+
function Oe() {
|
|
426
|
+
P.value.showTooltip = !P.value.showTooltip;
|
|
427
|
+
}
|
|
428
|
+
const ne = f(!1);
|
|
429
|
+
function we() {
|
|
430
|
+
ne.value = !ne.value;
|
|
431
|
+
}
|
|
432
|
+
const je = ie(() => !ne.value && e.value.style.chart.zoom.show), { viewBox: he, resetZoom: fe, isZoom: qe, setInitialViewBox: He } = At(O, {
|
|
433
|
+
x: 0,
|
|
434
|
+
y: 0,
|
|
435
|
+
width: v.value.width <= 0 ? 10 : v.value.width,
|
|
436
|
+
height: v.value.height <= 0 ? 10 : v.value.height
|
|
437
|
+
}, 1, je);
|
|
438
|
+
async function Ze({ scale: t = 2 } = {}) {
|
|
439
|
+
if (!$.value) return;
|
|
440
|
+
const { width: n, height: a } = $.value.getBoundingClientRect(), u = n / a, { imageUri: y, base64: B } = await Ft({ domElement: $.value, base64: !0, img: !0, scale: t });
|
|
441
|
+
return {
|
|
442
|
+
imageUri: y,
|
|
443
|
+
base64: B,
|
|
444
|
+
title: e.value.style.chart.title.text,
|
|
445
|
+
width: n,
|
|
446
|
+
height: a,
|
|
447
|
+
aspectRatio: u
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
g({
|
|
451
|
+
getData: Ge,
|
|
452
|
+
getImage: Ze,
|
|
453
|
+
generateCsv: Pe,
|
|
454
|
+
generatePdf: Me,
|
|
455
|
+
generateImage: Fe,
|
|
456
|
+
resetZoom: fe,
|
|
457
|
+
toggleTable: Ie,
|
|
458
|
+
toggleTooltip: Oe,
|
|
459
|
+
toggleAnnotator: we,
|
|
460
|
+
toggleFullscreen: Ae
|
|
461
|
+
});
|
|
462
|
+
const K = f(null), se = f(!1), Ce = f(""), ke = f(null);
|
|
463
|
+
function Je(t, n) {
|
|
464
|
+
K.value = null, ae.value = !1, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: n });
|
|
465
|
+
}
|
|
466
|
+
function Ke(t, n) {
|
|
467
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: n });
|
|
468
|
+
}
|
|
469
|
+
function Qe(t, n) {
|
|
470
|
+
if (e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: n }), !P.value.showTooltip) return;
|
|
471
|
+
K.value = t.id, ke.value = { datapoint: t, config: e.value };
|
|
472
|
+
const a = e.value.style.chart.tooltip.customFormat;
|
|
473
|
+
if (se.value = !1, kt(a))
|
|
474
|
+
try {
|
|
475
|
+
const u = a({
|
|
476
|
+
datapoint: t,
|
|
477
|
+
config: e.value
|
|
478
|
+
});
|
|
479
|
+
typeof u == "string" && (Ce.value = u, se.value = !0);
|
|
480
|
+
} catch {
|
|
481
|
+
console.warn("Custom format cannot be applied."), se.value = !1;
|
|
482
|
+
}
|
|
483
|
+
if (!se.value) {
|
|
484
|
+
let u = `<svg viewBox="0 0 10 10" height="${e.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${t.color}"/></svg><span>${t.name}:</span><b>${(t.value || 0).toFixed(e.value.style.chart.tooltip.roundingValue)}</b>`;
|
|
485
|
+
Ce.value = `<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${u}</div>`;
|
|
486
|
+
}
|
|
487
|
+
ae.value = !0;
|
|
488
|
+
}
|
|
489
|
+
return (t, n) => (w(), X("div", {
|
|
490
|
+
class: "vue-ui-word-cloud",
|
|
491
|
+
ref_key: "wordCloudChart",
|
|
492
|
+
ref: $,
|
|
493
|
+
id: `wordCloud_${b.value}`,
|
|
494
|
+
style: pe(`width: 100%; font-family:${e.value.style.fontFamily};background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`),
|
|
495
|
+
onMouseenter: n[2] || (n[2] = () => i(W)(!0)),
|
|
496
|
+
onMouseleave: n[3] || (n[3] = () => i(W)(!1))
|
|
497
|
+
}, [
|
|
498
|
+
e.value.userOptions.buttons.annotator ? (w(), Q(i(l), {
|
|
499
|
+
key: 0,
|
|
500
|
+
svgRef: i(O),
|
|
501
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
502
|
+
color: e.value.style.chart.color,
|
|
503
|
+
active: ne.value,
|
|
504
|
+
onClose: we
|
|
505
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : L("", !0),
|
|
506
|
+
e.value.style.chart.title.text ? (w(), X("div", {
|
|
507
|
+
key: 1,
|
|
508
|
+
ref_key: "chartTitle",
|
|
509
|
+
ref: D,
|
|
510
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
511
|
+
}, [
|
|
512
|
+
(w(), Q(Pt, {
|
|
513
|
+
key: `title_${Y.value}`,
|
|
514
|
+
config: {
|
|
515
|
+
title: {
|
|
516
|
+
...e.value.style.chart.title
|
|
517
|
+
},
|
|
518
|
+
subtitle: {
|
|
519
|
+
...e.value.style.chart.title.subtitle
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}, null, 8, ["config"]))
|
|
523
|
+
], 512)) : L("", !0),
|
|
524
|
+
e.value.userOptions.show && h.value && (i(_) || i(I)) ? (w(), Q(i(o), {
|
|
525
|
+
ref: "details",
|
|
526
|
+
key: `user_option_${U.value}`,
|
|
527
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
528
|
+
color: e.value.style.chart.color,
|
|
529
|
+
isPrinting: i(Te),
|
|
530
|
+
isImaging: i(Se),
|
|
531
|
+
uid: b.value,
|
|
532
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
533
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
534
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
535
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
536
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
537
|
+
isFullscreen: me.value,
|
|
538
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
539
|
+
chartElement: $.value,
|
|
540
|
+
position: e.value.userOptions.position,
|
|
541
|
+
hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
|
|
542
|
+
isTooltip: P.value.showTooltip,
|
|
543
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
544
|
+
isAnnotation: ne.value,
|
|
545
|
+
callbacks: e.value.userOptions.callbacks,
|
|
546
|
+
printScale: e.value.userOptions.print.scale,
|
|
547
|
+
onToggleFullscreen: Ae,
|
|
548
|
+
onGeneratePdf: i(Me),
|
|
549
|
+
onGenerateCsv: Pe,
|
|
550
|
+
onGenerateImage: i(Fe),
|
|
551
|
+
onToggleTable: Ie,
|
|
552
|
+
onToggleTooltip: Oe,
|
|
553
|
+
onToggleAnnotator: we,
|
|
554
|
+
style: pe({
|
|
555
|
+
visibility: i(_) ? i(I) ? "visible" : "hidden" : "visible"
|
|
556
|
+
})
|
|
557
|
+
}, lt({ _: 2 }, [
|
|
558
|
+
t.$slots.menuIcon ? {
|
|
559
|
+
name: "menuIcon",
|
|
560
|
+
fn: N(({ isOpen: a, color: u }) => [
|
|
561
|
+
A(t.$slots, "menuIcon", ee(te({ isOpen: a, color: u })), void 0, !0)
|
|
562
|
+
]),
|
|
563
|
+
key: "0"
|
|
564
|
+
} : void 0,
|
|
565
|
+
t.$slots.optionPdf ? {
|
|
566
|
+
name: "optionPdf",
|
|
567
|
+
fn: N(() => [
|
|
568
|
+
A(t.$slots, "optionPdf", {}, void 0, !0)
|
|
569
|
+
]),
|
|
570
|
+
key: "1"
|
|
571
|
+
} : void 0,
|
|
572
|
+
t.$slots.optionCsv ? {
|
|
573
|
+
name: "optionCsv",
|
|
574
|
+
fn: N(() => [
|
|
575
|
+
A(t.$slots, "optionCsv", {}, void 0, !0)
|
|
576
|
+
]),
|
|
577
|
+
key: "2"
|
|
578
|
+
} : void 0,
|
|
579
|
+
t.$slots.optionImg ? {
|
|
580
|
+
name: "optionImg",
|
|
581
|
+
fn: N(() => [
|
|
582
|
+
A(t.$slots, "optionImg", {}, void 0, !0)
|
|
583
|
+
]),
|
|
584
|
+
key: "3"
|
|
585
|
+
} : void 0,
|
|
586
|
+
t.$slots.optionTable ? {
|
|
587
|
+
name: "optionTable",
|
|
588
|
+
fn: N(() => [
|
|
589
|
+
A(t.$slots, "optionTable", {}, void 0, !0)
|
|
590
|
+
]),
|
|
591
|
+
key: "4"
|
|
592
|
+
} : void 0,
|
|
593
|
+
t.$slots.optionFullscreen ? {
|
|
594
|
+
name: "optionFullscreen",
|
|
595
|
+
fn: N(({ toggleFullscreen: a, isFullscreen: u }) => [
|
|
596
|
+
A(t.$slots, "optionFullscreen", ee(te({ toggleFullscreen: a, isFullscreen: u })), void 0, !0)
|
|
597
|
+
]),
|
|
598
|
+
key: "5"
|
|
599
|
+
} : void 0,
|
|
600
|
+
t.$slots.optionAnnotator ? {
|
|
601
|
+
name: "optionAnnotator",
|
|
602
|
+
fn: N(({ toggleAnnotator: a, isAnnotator: u }) => [
|
|
603
|
+
A(t.$slots, "optionAnnotator", ee(te({ toggleAnnotator: a, isAnnotator: u })), void 0, !0)
|
|
604
|
+
]),
|
|
605
|
+
key: "6"
|
|
606
|
+
} : void 0
|
|
607
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasTooltip", "isTooltip", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : L("", !0),
|
|
608
|
+
(w(), X("svg", {
|
|
609
|
+
ref_key: "svgRef",
|
|
610
|
+
ref: O,
|
|
611
|
+
class: _e({ "vue-data-ui-fullscreen--on": me.value, "vue-data-ui-fulscreen--off": !me.value }),
|
|
612
|
+
xmlns: i(bt),
|
|
613
|
+
viewBox: `${i(he).x} ${i(he).y} ${i(he).width} ${i(he).height}`,
|
|
614
|
+
style: "overflow:hidden;background:transparent;"
|
|
615
|
+
}, [
|
|
616
|
+
xe(i(s)),
|
|
617
|
+
t.$slots["chart-background"] ? (w(), X("foreignObject", {
|
|
618
|
+
key: 0,
|
|
619
|
+
x: 0,
|
|
620
|
+
y: 0,
|
|
621
|
+
width: v.value.width <= 0 ? 10 : v.value.width,
|
|
622
|
+
height: v.value.height <= 0 ? 10 : v.value.height,
|
|
623
|
+
style: {
|
|
624
|
+
pointerEvents: "none"
|
|
625
|
+
}
|
|
626
|
+
}, [
|
|
627
|
+
A(t.$slots, "chart-background", {}, void 0, !0)
|
|
628
|
+
], 8, Vt)) : L("", !0),
|
|
629
|
+
$e("g", {
|
|
630
|
+
transform: `translate(${R.value.x}, ${R.value.y})`
|
|
631
|
+
}, [
|
|
632
|
+
(w(!0), X(nt, null, st(le.value, (a, u) => (w(), X("g", null, [
|
|
633
|
+
a.minX !== void 0 ? (w(), X("rect", {
|
|
634
|
+
key: 0,
|
|
635
|
+
x: a.x + a.minX,
|
|
636
|
+
y: a.y + a.minY * 1.25,
|
|
637
|
+
width: a.maxX - a.minX,
|
|
638
|
+
height: a.maxY - a.minY,
|
|
639
|
+
fill: "transparent",
|
|
640
|
+
"pointer-events": "visiblePainted",
|
|
641
|
+
onMouseover: (y) => Qe(a, u),
|
|
642
|
+
onMouseleave: (y) => Je(a, u),
|
|
643
|
+
onClick: (y) => Ke(a, u)
|
|
644
|
+
}, null, 40, Xt)) : L("", !0),
|
|
645
|
+
(w(), X("text", {
|
|
646
|
+
fill: a.color,
|
|
647
|
+
"font-weight": e.value.style.chart.words.bold ? "bold" : "normal",
|
|
648
|
+
key: u,
|
|
649
|
+
x: a.x,
|
|
650
|
+
y: a.y,
|
|
651
|
+
"font-size": a.fontSize,
|
|
652
|
+
transform: `translate(${a.width / 2}, ${a.height / 2})`,
|
|
653
|
+
class: _e({ animated: e.value.useCssAnimation, "word-selected": K.value && K.value === a.id && P.value.showTooltip, "word-not-selected": K.value && K.value !== a.id && P.value.showTooltip }),
|
|
654
|
+
"text-anchor": "middle",
|
|
655
|
+
"dominant-baseline": "central",
|
|
656
|
+
style: pe(`animation-delay:${u * e.value.animationDelayMs}ms !important; pointer-events:none;`)
|
|
657
|
+
}, Re(a.name), 15, Dt))
|
|
658
|
+
]))), 256))
|
|
659
|
+
], 8, Bt),
|
|
660
|
+
A(t.$slots, "svg", {
|
|
661
|
+
svg: { height: v.value.height, width: v.value.width }
|
|
662
|
+
}, void 0, !0)
|
|
663
|
+
], 10, Rt)),
|
|
664
|
+
t.$slots.watermark ? (w(), X("div", Et, [
|
|
665
|
+
A(t.$slots, "watermark", ee(te({ isPrinting: i(Te) || i(Se) })), void 0, !0)
|
|
666
|
+
])) : L("", !0),
|
|
667
|
+
i(qe) ? (w(), X("div", Wt, [
|
|
668
|
+
A(t.$slots, "reset-action", { reset: i(fe) }, () => [
|
|
669
|
+
$e("button", {
|
|
670
|
+
"data-cy-reset": "",
|
|
671
|
+
tabindex: "0",
|
|
672
|
+
role: "button",
|
|
673
|
+
class: "vue-data-ui-refresh-button",
|
|
674
|
+
style: pe({
|
|
675
|
+
background: e.value.style.chart.backgroundColor
|
|
676
|
+
}),
|
|
677
|
+
onClick: n[0] || (n[0] = (a) => i(fe)(!0))
|
|
678
|
+
}, [
|
|
679
|
+
xe(i(p), {
|
|
680
|
+
name: "refresh",
|
|
681
|
+
stroke: e.value.style.chart.color
|
|
682
|
+
}, null, 8, ["stroke"])
|
|
683
|
+
], 4)
|
|
684
|
+
], !0)
|
|
685
|
+
])) : L("", !0),
|
|
686
|
+
xe(i(r), {
|
|
687
|
+
show: P.value.showTooltip && ae.value,
|
|
688
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
689
|
+
color: e.value.style.chart.tooltip.color,
|
|
690
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
691
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
692
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
693
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
694
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
695
|
+
position: e.value.style.chart.tooltip.position,
|
|
696
|
+
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
697
|
+
parent: $.value,
|
|
698
|
+
content: Ce.value,
|
|
699
|
+
isCustom: se.value,
|
|
700
|
+
smooth: e.value.style.chart.tooltip.smooth,
|
|
701
|
+
backdropFilter: e.value.style.chart.tooltip.backdropFilter
|
|
702
|
+
}, {
|
|
703
|
+
"tooltip-before": N(() => [
|
|
704
|
+
A(t.$slots, "tooltip-before", ee(te({ ...ke.value })), void 0, !0)
|
|
705
|
+
]),
|
|
706
|
+
"tooltip-after": N(() => [
|
|
707
|
+
A(t.$slots, "tooltip-after", ee(te({ ...ke.value })), void 0, !0)
|
|
708
|
+
]),
|
|
709
|
+
_: 3
|
|
710
|
+
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "smooth", "backdropFilter"]),
|
|
711
|
+
t.$slots.source ? (w(), X("div", {
|
|
712
|
+
key: 5,
|
|
713
|
+
ref_key: "source",
|
|
714
|
+
ref: E,
|
|
715
|
+
dir: "auto"
|
|
716
|
+
}, [
|
|
717
|
+
A(t.$slots, "source", {}, void 0, !0)
|
|
718
|
+
], 512)) : L("", !0),
|
|
719
|
+
h.value ? (w(), Q(i(c), {
|
|
720
|
+
key: 6,
|
|
721
|
+
hideDetails: "",
|
|
722
|
+
config: {
|
|
723
|
+
open: P.value.showTable,
|
|
724
|
+
maxHeight: 1e4,
|
|
725
|
+
body: {
|
|
726
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
727
|
+
color: e.value.style.chart.color
|
|
728
|
+
},
|
|
729
|
+
head: {
|
|
730
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
731
|
+
color: e.value.style.chart.color
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
}, {
|
|
735
|
+
content: N(() => [
|
|
736
|
+
(w(), Q(i(m), {
|
|
737
|
+
key: `table_${re.value}`,
|
|
738
|
+
colNames: de.value.colNames,
|
|
739
|
+
head: de.value.head,
|
|
740
|
+
body: de.value.body,
|
|
741
|
+
config: de.value.config,
|
|
742
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
743
|
+
onClose: n[1] || (n[1] = (a) => P.value.showTable = !1)
|
|
744
|
+
}, {
|
|
745
|
+
th: N(({ th: a }) => [
|
|
746
|
+
$e("div", {
|
|
747
|
+
innerHTML: a,
|
|
748
|
+
style: { display: "flex", "align-items": "center" }
|
|
749
|
+
}, null, 8, Lt)
|
|
750
|
+
]),
|
|
751
|
+
td: N(({ td: a }) => [
|
|
752
|
+
it(Re(a.name || a), 1)
|
|
753
|
+
]),
|
|
754
|
+
_: 1
|
|
755
|
+
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
756
|
+
]),
|
|
757
|
+
_: 1
|
|
758
|
+
}, 8, ["config"])) : L("", !0),
|
|
759
|
+
i(ce) ? (w(), Q($t, { key: 7 })) : L("", !0)
|
|
760
|
+
], 44, _t));
|
|
761
|
+
}
|
|
762
|
+
}, oa = /* @__PURE__ */ It(Yt, [["__scopeId", "data-v-e1be8307"]]);
|
|
763
|
+
export {
|
|
764
|
+
oa as default
|
|
765
|
+
};
|