vue-data-ui 2.12.8-beta.3 → 2.13.0
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/README.md +10 -4
- package/dist/{Arrow-kQyQXUUg.js → Arrow-B2y3GYgv.js} +1 -1
- package/dist/{BaseDraggableDialog-DLRFrsDT.js → BaseDraggableDialog-B3CZVeze.js} +2 -2
- package/dist/{BaseIcon-DaR0sIWZ.js → BaseIcon-P7wV92Er.js} +1 -1
- package/dist/{ColorPicker-Bj3sq9o7.js → ColorPicker-C7b6TR_9.js} +2 -2
- package/dist/{DataTable-BBqbcutV.js → DataTable-DBkfb6pd.js} +2 -2
- package/dist/{Legend-DRqzYrP9.js → Legend-DcDRW3Xd.js} +2 -2
- package/dist/{NonSvgPenAndPaper-CQIC2PMP.js → NonSvgPenAndPaper-DYA_rF1x.js} +3 -3
- package/dist/{PackageVersion-ClpqQxYT.js → PackageVersion-C5fpg4GN.js} +2 -2
- package/dist/{PenAndPaper-B-T7XvxF.js → PenAndPaper-BRkuVFb4.js} +3 -3
- package/dist/{Shape-DEWxbZ-l.js → Shape-CnD-h_98.js} +1 -1
- package/dist/{Slicer-o6jJH5bw.js → Slicer-CxdgZOQ7.js} +2 -2
- package/dist/{SparkTooltip-LPnbBoFu.js → SparkTooltip-BIAMOmfJ.js} +1 -1
- package/dist/{Title-apr_T9tg.js → Title-DoWqzga-.js} +1 -1
- package/dist/{Tooltip-BuHsMAfp.js → Tooltip-DYCBNM-_.js} +1 -1
- package/dist/{UserOptions-OVNxxnq5.js → UserOptions-B3q-xfQV.js} +16 -11
- package/dist/dom-to-png-4VVH9Qna.js +247 -0
- package/dist/img-Dy6IrSzX.js +20 -0
- package/dist/{index-CH_mJIWj.js → index-BXbyT0Qn.js} +6 -2
- package/dist/{pdf-Jun3ogRn.js → pdf-ZrUvUcH9.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +20 -3
- package/dist/types/vue-data-ui.d.ts +20 -3
- package/dist/{useNestedProp-rMR-JeOJ.js → useNestedProp-DVZpeH84.js} +1 -1
- package/dist/{usePrinter-DJ7WfWUs.js → usePrinter-aKh5-HcK.js} +2 -2
- package/dist/{vue-data-ui-D7AaTKU6.js → vue-data-ui-DUHiuRmY.js} +63 -63
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BfLLrwWi.js → vue-ui-3d-bar-C3cqHCNp.js} +173 -173
- package/dist/{vue-ui-accordion-Ds4zkPIx.js → vue-ui-accordion-CXsjHe1y.js} +3 -3
- package/dist/{vue-ui-age-pyramid-C7ca5TG5.js → vue-ui-age-pyramid-B2EpIzV9.js} +179 -179
- package/dist/{vue-ui-annotator-DG2z1gw8.js → vue-ui-annotator-Czvbjx_j.js} +2 -2
- package/dist/{vue-ui-bullet-Dh25QAEH.js → vue-ui-bullet-ClY1tgTT.js} +6 -6
- package/dist/{vue-ui-candlestick-7Yo_kEV0.js → vue-ui-candlestick-BQ1RVdoH.js} +113 -113
- package/dist/{vue-ui-carousel-table-Det9Kwmy.js → vue-ui-carousel-table-UQjCOJJV.js} +94 -94
- package/dist/{vue-ui-chestnut-DLlFv6Uj.js → vue-ui-chestnut-DmEa8kef.js} +452 -452
- package/dist/{vue-ui-chord-BXlv5Z2x.js → vue-ui-chord-CEDZ-UcP.js} +17 -17
- package/dist/{vue-ui-circle-pack-DdRcdWmx.js → vue-ui-circle-pack-Bx_mLhCR.js} +116 -116
- package/dist/{vue-ui-cursor-Djtg6Ppw.js → vue-ui-cursor-D27qwk90.js} +2 -2
- package/dist/{vue-ui-dashboard-C4MDDCl6.js → vue-ui-dashboard-DKsYxh6J.js} +62 -62
- package/dist/{vue-ui-digits-8Ox6q1Ov.js → vue-ui-digits-CdDTbIAN.js} +2 -2
- package/dist/{vue-ui-donut-Hk4EaVhb.js → vue-ui-donut-DS-DfHIm.js} +149 -149
- package/dist/{vue-ui-donut-evolution-DzgYokPU.js → vue-ui-donut-evolution-XMEmv1DK.js} +109 -109
- package/dist/{vue-ui-dumbbell-CAC44_Hu.js → vue-ui-dumbbell-DAm5A4u3.js} +65 -65
- package/dist/{vue-ui-flow-CYWiZjrP.js → vue-ui-flow-CTbmqqmV.js} +12 -12
- package/dist/{vue-ui-funnel-C2eqxh_8.js → vue-ui-funnel-CihunDsZ.js} +65 -65
- package/dist/{vue-ui-galaxy-BBfg84E4.js → vue-ui-galaxy-CJHycmpt.js} +82 -82
- package/dist/{vue-ui-gauge-BJgJgef_.js → vue-ui-gauge-Bsc9wIKK.js} +5 -5
- package/dist/{vue-ui-gizmo-DBclpybR.js → vue-ui-gizmo-D6AciZZe.js} +3 -3
- package/dist/{vue-ui-heatmap-D65wOgqe.js → vue-ui-heatmap-in5WwNRr.js} +221 -221
- package/dist/{vue-ui-history-plot-CHhDy7Da.js → vue-ui-history-plot-C9IEmAmm.js} +232 -232
- package/dist/{vue-ui-kpi-uT6fsAaO.js → vue-ui-kpi-fDPWRpRZ.js} +3 -3
- package/dist/{vue-ui-mini-loader-CKVlBiYB.js → vue-ui-mini-loader-BeJRaP7N.js} +2 -2
- package/dist/{vue-ui-molecule-BwtHZtGN.js → vue-ui-molecule-BJbwA0F6.js} +30 -30
- package/dist/{vue-ui-mood-radar-Vf4_-R-m.js → vue-ui-mood-radar--YEOJ6q6.js} +75 -75
- package/dist/{vue-ui-nested-donuts-BVkSns4S.js → vue-ui-nested-donuts-BswKH0D6.js} +16 -16
- package/dist/{vue-ui-onion-UzMmwtvF.js → vue-ui-onion-BAw8X4iu.js} +70 -70
- package/dist/{vue-ui-parallel-coordinate-plot-Dk5T3ZAr.js → vue-ui-parallel-coordinate-plot-CYkzOe_Q.js} +11 -11
- package/dist/{vue-ui-quadrant-Ck7xALez.js → vue-ui-quadrant-BupqUnMn.js} +11 -11
- package/dist/{vue-ui-quick-chart-B62Pa0nG.js → vue-ui-quick-chart-BzpDL6CR.js} +5 -5
- package/dist/{vue-ui-radar-DMfv2hSb.js → vue-ui-radar-zPrbIZv5.js} +283 -282
- package/dist/{vue-ui-rating-CFYHJrxj.js → vue-ui-rating-DqCOz2LB.js} +2 -2
- package/dist/{vue-ui-relation-circle-RWlfC5BI.js → vue-ui-relation-circle-DQp_zboM.js} +5 -5
- package/dist/{vue-ui-ridgeline-Bh93VzcO.js → vue-ui-ridgeline-DoJfX7Ii.js} +100 -100
- package/dist/{vue-ui-rings-CyX30Ccv.js → vue-ui-rings-Bk4QJYsW.js} +96 -96
- package/dist/{vue-ui-scatter-BEDnWByj.js → vue-ui-scatter-RxF0N8Zj.js} +164 -164
- package/dist/{vue-ui-skeleton-C6PWt_m5.js → vue-ui-skeleton-Fxr752Oi.js} +3 -3
- package/dist/{vue-ui-smiley-79itAe84.js → vue-ui-smiley-CNScIHKI.js} +2 -2
- package/dist/{vue-ui-spark-trend-AaA4KuaH.js → vue-ui-spark-trend-CyMzdoJ9.js} +3 -3
- package/dist/{vue-ui-sparkbar-CYBZeaor.js → vue-ui-sparkbar-DMTRPWwC.js} +3 -3
- package/dist/{vue-ui-sparkgauge-ElGarXVS.js → vue-ui-sparkgauge-itAGdTj_.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-C_LV99i1.js → vue-ui-sparkhistogram-CZx5cF_r.js} +4 -4
- package/dist/{vue-ui-sparkline-DwzCA8d6.js → vue-ui-sparkline-POYMl6cO.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-CobB11uw.js → vue-ui-sparkstackbar-C0EE8xrA.js} +3 -3
- package/dist/{vue-ui-stackbar-B4SxM5Ix.js → vue-ui-stackbar-B6ytrTFL.js} +37 -37
- package/dist/{vue-ui-strip-plot-9VK_Y3SC.js → vue-ui-strip-plot-u39z36tT.js} +80 -80
- package/dist/{vue-ui-table-DFTE1OH5.js → vue-ui-table-Cvmrm0sZ.js} +3 -3
- package/dist/{vue-ui-table-heatmap-DvyJx0j7.js → vue-ui-table-heatmap-BOFRFilm.js} +57 -57
- package/dist/{vue-ui-table-sparkline-SGsBnQTK.js → vue-ui-table-sparkline-CMhk8rpj.js} +72 -72
- package/dist/{vue-ui-thermometer-DEMS6HXl.js → vue-ui-thermometer-Cxznchnu.js} +5 -5
- package/dist/{vue-ui-timer-CQ71yJ_N.js → vue-ui-timer-Du0Cskiy.js} +5 -5
- package/dist/{vue-ui-tiremarks-CsN_QtUK.js → vue-ui-tiremarks-BzC40iBw.js} +5 -5
- package/dist/{vue-ui-treemap-B0CPNusH.js → vue-ui-treemap-D5Nk7usb.js} +297 -297
- package/dist/{vue-ui-vertical-bar-Cxv-ahMT.js → vue-ui-vertical-bar-BivMp4WH.js} +81 -81
- package/dist/{vue-ui-waffle-TgNNo9UX.js → vue-ui-waffle-DI0Ul1Tb.js} +50 -50
- package/dist/{vue-ui-wheel-Bq0ZLc-R.js → vue-ui-wheel-BfHsxhQq.js} +5 -5
- package/dist/{vue-ui-word-cloud-D28awCaT.js → vue-ui-word-cloud-ytYbdQKa.js} +67 -67
- package/dist/{vue-ui-world-BhUsfhY5.js → vue-ui-world-CiYvMEKb.js} +55 -55
- package/dist/{vue-ui-xy-CEFkua9H.js → vue-ui-xy-DxgCkZEV.js} +201 -182
- package/dist/{vue-ui-xy-canvas-oHhzL0ui.js → vue-ui-xy-canvas-R0tICTKy.js} +80 -80
- package/package.json +1 -1
- package/dist/dom-to-png-C0Ct8ClX.js +0 -243
- package/dist/img-P0SFFw37.js +0 -19
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useCssVars as De, defineAsyncComponent as j, computed as se, ref as g, watch as be, shallowRef as Fe, onMounted as Ee, onBeforeUnmount as Ue, createElementBlock as N, openBlock as x, unref as r, normalizeStyle as he, createBlock as ie, createCommentVNode as B, createVNode as we, createSlots as Ge, withCtx as A, renderSlot as F, normalizeProps as Q, guardReactiveProps as ee, normalizeClass as Me, createElementVNode as ke, Fragment as Le, renderList as je, toDisplayString as Pe, createTextVNode as He, nextTick as ze } from "vue";
|
|
2
|
-
import { u as qe, c as Oe, aj as Ze, v as Je, t as Ke, p as me, a as Qe, o as et, e as Ae, g as tt, f as ot, X as at, q as lt, r as nt, x as st } from "./index-
|
|
2
|
+
import { u as qe, c as Oe, aj as Ze, v as Je, t as Ke, p as me, a as Qe, o as et, e as Ae, g as tt, f as ot, X as at, q as lt, r as nt, x as st } from "./index-BXbyT0Qn.js";
|
|
3
3
|
import { t as it, u as rt, d as ut } from "./useResponsive-JZ9xq-JV.js";
|
|
4
|
-
import { u as Ne } from "./useNestedProp-
|
|
5
|
-
import { u as ct } from "./usePrinter-
|
|
4
|
+
import { u as Ne } from "./useNestedProp-DVZpeH84.js";
|
|
5
|
+
import { u as ct } from "./usePrinter-aKh5-HcK.js";
|
|
6
6
|
import { u as dt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
7
|
import { u as vt } from "./useChartAccessibility-9icAAmYg.js";
|
|
8
8
|
import { u as ht } from "./usePanZoom-BQMvRXEQ.js";
|
|
9
|
-
import mt from "./Title-
|
|
9
|
+
import mt from "./Title-DoWqzga-.js";
|
|
10
10
|
import { _ as ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
11
|
function pt(w, p) {
|
|
12
12
|
const { width: u, height: f } = w, m = p.getImageData(0, 0, u, f).data;
|
|
@@ -31,8 +31,8 @@ function Ie({
|
|
|
31
31
|
for (let _ = 0; _ < s; _ += 1)
|
|
32
32
|
for (let Y = 0; Y < a; Y += 1)
|
|
33
33
|
d[(_ * a + Y) * 4 + 3] > 1 && h.push([Y, _]);
|
|
34
|
-
const [y,
|
|
35
|
-
return c.restore(), { w: a, h: s, wordMask: h, minX: y, minY:
|
|
34
|
+
const [y, E, P, I] = pt(f, c);
|
|
35
|
+
return c.restore(), { w: a, h: s, wordMask: h, minX: y, minY: E, maxX: P, maxY: I };
|
|
36
36
|
}
|
|
37
37
|
function _e({ mask: w, maskW: p, maskH: u, wx: f, wy: c, wordMask: m }) {
|
|
38
38
|
for (let l = 0; l < m.length; l += 1) {
|
|
@@ -64,16 +64,16 @@ function yt({
|
|
|
64
64
|
svg: u,
|
|
65
65
|
strictPixelPadding: f
|
|
66
66
|
}) {
|
|
67
|
-
const { width: c, height: m } = u, l = Math.round(c), a = Math.round(m), s = 1, k = u.minFontSize, d = Math.min(u.maxFontSize, 100), h = w.map((
|
|
67
|
+
const { width: c, height: m } = u, l = Math.round(c), a = Math.round(m), s = 1, k = u.minFontSize, d = Math.min(u.maxFontSize, 100), h = w.map((S) => S.value), y = Math.min(...h), E = Math.max(...h), P = new Uint8Array(l * a), I = document.createElement("canvas"), _ = I.getContext("2d", { willReadFrequently: !0 });
|
|
68
68
|
I.width = l, I.height = a;
|
|
69
|
-
const Y = 6, re = 2, te = 2, e = 1,
|
|
70
|
-
for (const
|
|
69
|
+
const Y = 6, re = 2, te = 2, e = 1, G = Math.floor(l / 2), oe = Math.floor(a / 2), ae = [...w].sort((S, z) => z.value - S.value), H = [];
|
|
70
|
+
for (const S of ae) {
|
|
71
71
|
let z = k;
|
|
72
|
-
|
|
72
|
+
E !== y && (z = (S.value - y) / (E - y) * (d - k) + k), z = Math.max(k, Math.min(d, z));
|
|
73
73
|
let R = !1, n = z;
|
|
74
74
|
for (; !R && n >= s; ) {
|
|
75
75
|
let { w: X, h: V, wordMask: C, minX: W, minY: q, maxX: Z, maxY: J } = Ie({
|
|
76
|
-
word:
|
|
76
|
+
word: S,
|
|
77
77
|
fontSize: n,
|
|
78
78
|
pad: p,
|
|
79
79
|
canvas: I,
|
|
@@ -81,13 +81,13 @@ function yt({
|
|
|
81
81
|
svg: u
|
|
82
82
|
});
|
|
83
83
|
f && (C = gt({ wordMask: C, w: X, h: V, dilation: 1 }));
|
|
84
|
-
let O = 0,
|
|
85
|
-
for (; O < Math.max(l, a) && !R &&
|
|
84
|
+
let O = 0, U = 0;
|
|
85
|
+
for (; O < Math.max(l, a) && !R && U < 1e4; ) {
|
|
86
86
|
for (let v = 0; v < 360; v += Y) {
|
|
87
|
-
|
|
88
|
-
const M = Math.round(
|
|
87
|
+
U += 1;
|
|
88
|
+
const M = Math.round(G + O * Math.cos(v * Math.PI / 180) - X / 2), b = Math.round(oe + O * Math.sin(v * Math.PI / 180) - V / 2);
|
|
89
89
|
if (!(M < 0 || b < 0 || M + X > l || b + V > a) && _e({ mask: P, maskW: l, maskH: a, wx: M, wy: b, wordMask: C })) {
|
|
90
|
-
H.push({ ...
|
|
90
|
+
H.push({ ...S, x: M - l / 2, y: b - a / 2, fontSize: n, width: X, height: V, angle: 0, minX: W, minY: q, maxX: Z, maxY: J }), Re({ mask: P, maskW: l, maskH: a, wx: M, wy: b, wordMask: C }), R = !0;
|
|
91
91
|
break;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
@@ -98,20 +98,20 @@ function yt({
|
|
|
98
98
|
if (!R && n < s) {
|
|
99
99
|
n = s;
|
|
100
100
|
const { w: X, h: V, wordMask: C, minX: W, minY: q, maxX: Z, maxY: J } = Ie({
|
|
101
|
-
word:
|
|
101
|
+
word: S,
|
|
102
102
|
fontSize: n,
|
|
103
103
|
pad: p,
|
|
104
104
|
canvas: I,
|
|
105
105
|
ctx: _,
|
|
106
106
|
svg: u
|
|
107
107
|
});
|
|
108
|
-
let O = 0,
|
|
109
|
-
for (; O < Math.max(l, a) && !R &&
|
|
108
|
+
let O = 0, U = 0;
|
|
109
|
+
for (; O < Math.max(l, a) && !R && U < 25e3; ) {
|
|
110
110
|
for (let v = 0; v < 360; v += te) {
|
|
111
|
-
|
|
112
|
-
const M = Math.round(
|
|
111
|
+
U += 1;
|
|
112
|
+
const M = Math.round(G + O * Math.cos(v * Math.PI / 180) - X / 2), b = Math.round(oe + O * Math.sin(v * Math.PI / 180) - V / 2);
|
|
113
113
|
if (!(M < 0 || b < 0 || M + X > l || b + V > a) && _e({ mask: P, maskW: l, maskH: a, wx: M, wy: b, wordMask: C })) {
|
|
114
|
-
H.push({ ...
|
|
114
|
+
H.push({ ...S, x: M - l / 2, y: b - a / 2, fontSize: n, width: X, height: V, angle: 0, minX: W, minY: q, maxX: Z, maxY: J }), Re({ mask: P, maskW: l, maskH: a, wx: M, wy: b, wordMask: C }), R = !0;
|
|
115
115
|
break;
|
|
116
116
|
}
|
|
117
117
|
}
|
|
@@ -119,7 +119,7 @@ function yt({
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
return H.sort((
|
|
122
|
+
return H.sort((S, z) => z.fontSize - S.fontSize);
|
|
123
123
|
}
|
|
124
124
|
const bt = ["id"], wt = ["xmlns", "viewBox"], kt = ["width", "height"], Ct = ["transform"], xt = ["x", "y", "width", "height", "onMouseover"], $t = ["fill", "font-weight", "x", "y", "font-size", "transform"], Tt = {
|
|
125
125
|
key: 4,
|
|
@@ -146,19 +146,19 @@ const bt = ["id"], wt = ["xmlns", "viewBox"], kt = ["width", "height"], Ct = ["t
|
|
|
146
146
|
},
|
|
147
147
|
setup(w, { expose: p }) {
|
|
148
148
|
De((t) => ({
|
|
149
|
-
|
|
149
|
+
"6e3cfc0f": t.slicerColor
|
|
150
150
|
}));
|
|
151
|
-
const u = j(() => import("./vue-ui-accordion-
|
|
151
|
+
const u = j(() => import("./vue-ui-accordion-CXsjHe1y.js")), f = j(() => import("./BaseIcon-P7wV92Er.js")), c = j(() => import("./DataTable-DBkfb6pd.js")), m = j(() => import("./PackageVersion-C5fpg4GN.js")), l = j(() => import("./PenAndPaper-BRkuVFb4.js")), a = j(() => import("./Tooltip-DYCBNM-_.js")), s = j(() => import("./UserOptions-B3q-xfQV.js")), { vue_ui_word_cloud: k } = qe(), d = w, h = se({
|
|
152
152
|
get() {
|
|
153
153
|
return !!d.dataset && d.dataset.length;
|
|
154
154
|
},
|
|
155
155
|
set(t) {
|
|
156
156
|
return t;
|
|
157
157
|
}
|
|
158
|
-
}), y = g(Oe()),
|
|
158
|
+
}), y = g(Oe()), E = g(0), P = g(null), I = g(null), _ = g(null), Y = g(0), re = g(0), te = g(!1), e = se({
|
|
159
159
|
get: () => R(),
|
|
160
160
|
set: (t) => t
|
|
161
|
-
}),
|
|
161
|
+
}), G = g(oe());
|
|
162
162
|
function oe() {
|
|
163
163
|
return typeof d.dataset == "string" ? Ze(d.dataset) : d.dataset.map((t, i) => ({
|
|
164
164
|
...t,
|
|
@@ -166,9 +166,9 @@ const bt = ["id"], wt = ["xmlns", "viewBox"], kt = ["width", "height"], Ct = ["t
|
|
|
166
166
|
}));
|
|
167
167
|
}
|
|
168
168
|
be(() => d.dataset, () => {
|
|
169
|
-
|
|
169
|
+
G.value = oe(), fe();
|
|
170
170
|
});
|
|
171
|
-
const { userOptionsVisible: ae, setUserOptionsVisibility: H, keepUserOptionState:
|
|
171
|
+
const { userOptionsVisible: ae, setUserOptionsVisibility: H, keepUserOptionState: S } = dt({ config: e.value }), { svgRef: z } = vt({ config: e.value.style.chart.title });
|
|
172
172
|
function R() {
|
|
173
173
|
const t = Ne({
|
|
174
174
|
userConfig: d.config,
|
|
@@ -208,7 +208,7 @@ const bt = ["id"], wt = ["xmlns", "viewBox"], kt = ["width", "height"], Ct = ["t
|
|
|
208
208
|
et(d.dataset) ? Ae({
|
|
209
209
|
componentName: "VueUiWordCloud",
|
|
210
210
|
type: "dataset"
|
|
211
|
-
}) :
|
|
211
|
+
}) : G.value.forEach((t, i) => {
|
|
212
212
|
tt({
|
|
213
213
|
datasetObject: t,
|
|
214
214
|
requiredAttributes: ["name", "value"]
|
|
@@ -225,7 +225,7 @@ const bt = ["id"], wt = ["xmlns", "viewBox"], kt = ["width", "height"], Ct = ["t
|
|
|
225
225
|
Ue(() => {
|
|
226
226
|
C.value && (W.value && C.value.unobserve(W.value), C.value.disconnect());
|
|
227
227
|
});
|
|
228
|
-
const { isPrinting: Z, isImaging: J, generatePdf: O, generateImage:
|
|
228
|
+
const { isPrinting: Z, isImaging: J, generatePdf: O, generateImage: U } = ct({
|
|
229
229
|
elementId: `wordCloud_${y.value}`,
|
|
230
230
|
fileName: e.value.style.chart.title.text || "vue-ui-word-cloud",
|
|
231
231
|
options: e.value.userOptions.print
|
|
@@ -234,30 +234,30 @@ const bt = ["id"], wt = ["xmlns", "viewBox"], kt = ["width", "height"], Ct = ["t
|
|
|
234
234
|
showTooltip: e.value.style.chart.tooltip.show
|
|
235
235
|
});
|
|
236
236
|
function M(t, i, o = "Arial") {
|
|
237
|
-
const
|
|
238
|
-
return
|
|
239
|
-
width:
|
|
237
|
+
const T = document.createElement("canvas").getContext("2d");
|
|
238
|
+
return T.font = `${i}px ${e.value.style.chart.words.bold ? "bold" : "normal"} ${o}`, {
|
|
239
|
+
width: T.measureText(t).width + e.value.style.chart.words.proximity,
|
|
240
240
|
height: i
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
243
|
const b = g([]);
|
|
244
244
|
be(() => d.dataset, fe, { immediate: !0 });
|
|
245
245
|
function fe() {
|
|
246
|
-
const t = [...
|
|
247
|
-
let L = (
|
|
246
|
+
const t = [...G.value].map((T) => T.value), i = Math.max(...t), o = Math.min(...t), $ = [...G.value].map((T, D) => {
|
|
247
|
+
let L = (T.value - o) / (i - o) * (n.value.maxFontSize - n.value.minFontSize) + n.value.minFontSize;
|
|
248
248
|
L = isNaN(L) ? n.value.minFontSize : L;
|
|
249
|
-
const Se = M(
|
|
249
|
+
const Se = M(T.name, L);
|
|
250
250
|
return {
|
|
251
|
-
|
|
251
|
+
...T,
|
|
252
252
|
id: Oe(),
|
|
253
253
|
fontSize: L,
|
|
254
254
|
width: Se.width,
|
|
255
255
|
height: Se.height,
|
|
256
|
-
color: e.value.style.chart.words.usePalette ? e.value.customPalette[
|
|
256
|
+
color: e.value.style.chart.words.usePalette ? e.value.customPalette[D] || e.value.customPalette[D % e.value.customPalette.length] || me[D] || me[D % me.length] : e.value.style.chart.words.color
|
|
257
257
|
};
|
|
258
258
|
});
|
|
259
259
|
b.value = yt({
|
|
260
|
-
words:
|
|
260
|
+
words: $,
|
|
261
261
|
svg: n.value,
|
|
262
262
|
proximity: e.value.style.chart.words.proximity,
|
|
263
263
|
strictPixelPadding: e.value.strictPixelPadding
|
|
@@ -270,24 +270,24 @@ const bt = ["id"], wt = ["xmlns", "viewBox"], kt = ["width", "height"], Ct = ["t
|
|
|
270
270
|
})), i = b.value.map((o) => o.value);
|
|
271
271
|
return { head: t, body: i };
|
|
272
272
|
});
|
|
273
|
-
function Ce() {
|
|
273
|
+
function Ce(t = null) {
|
|
274
274
|
ze(() => {
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
], [ue.value.body[
|
|
278
|
-
nt({ csvContent:
|
|
275
|
+
const i = ue.value.head.map((T, D) => [[
|
|
276
|
+
T.name
|
|
277
|
+
], [ue.value.body[D]]]), o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(i), $ = lt(o);
|
|
278
|
+
t ? t($) : nt({ csvContent: $, title: e.value.style.chart.title.text || "vue-ui-word-cloud" });
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
281
|
const ce = se(() => {
|
|
282
282
|
const t = [
|
|
283
283
|
e.value.table.columnNames.series,
|
|
284
284
|
e.value.table.columnNames.value
|
|
285
|
-
], i = ue.value.head.map((
|
|
286
|
-
const L = ot({ p: e.value.table.td.prefix, v: ue.value.body[
|
|
285
|
+
], i = ue.value.head.map((T, D) => {
|
|
286
|
+
const L = ot({ p: e.value.table.td.prefix, v: ue.value.body[D], s: e.value.table.td.suffix, r: e.value.table.td.roundingValue });
|
|
287
287
|
return [
|
|
288
288
|
{
|
|
289
|
-
color:
|
|
290
|
-
name:
|
|
289
|
+
color: T.color,
|
|
290
|
+
name: T.name
|
|
291
291
|
},
|
|
292
292
|
L
|
|
293
293
|
];
|
|
@@ -315,7 +315,7 @@ const bt = ["id"], wt = ["xmlns", "viewBox"], kt = ["width", "height"], Ct = ["t
|
|
|
315
315
|
};
|
|
316
316
|
}), de = g(!1);
|
|
317
317
|
function Xe(t) {
|
|
318
|
-
de.value = t,
|
|
318
|
+
de.value = t, E.value += 1;
|
|
319
319
|
}
|
|
320
320
|
function Ve() {
|
|
321
321
|
return b.value;
|
|
@@ -340,7 +340,7 @@ const bt = ["id"], wt = ["xmlns", "viewBox"], kt = ["width", "height"], Ct = ["t
|
|
|
340
340
|
getData: Ve,
|
|
341
341
|
generateCsv: Ce,
|
|
342
342
|
generatePdf: O,
|
|
343
|
-
generateImage:
|
|
343
|
+
generateImage: U,
|
|
344
344
|
toggleTable: xe,
|
|
345
345
|
toggleTooltip: $e,
|
|
346
346
|
toggleAnnotator: pe
|
|
@@ -401,9 +401,9 @@ const bt = ["id"], wt = ["xmlns", "viewBox"], kt = ["width", "height"], Ct = ["t
|
|
|
401
401
|
}
|
|
402
402
|
}, null, 8, ["config"]))
|
|
403
403
|
], 512)) : B("", !0),
|
|
404
|
-
e.value.userOptions.show && h.value && (r(
|
|
404
|
+
e.value.userOptions.show && h.value && (r(S) || r(ae)) ? (x(), ie(r(s), {
|
|
405
405
|
ref: "details",
|
|
406
|
-
key: `user_option_${
|
|
406
|
+
key: `user_option_${E.value}`,
|
|
407
407
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
408
408
|
color: e.value.style.chart.color,
|
|
409
409
|
isPrinting: r(Z),
|
|
@@ -426,18 +426,18 @@ const bt = ["id"], wt = ["xmlns", "viewBox"], kt = ["width", "height"], Ct = ["t
|
|
|
426
426
|
onToggleFullscreen: Xe,
|
|
427
427
|
onGeneratePdf: r(O),
|
|
428
428
|
onGenerateCsv: Ce,
|
|
429
|
-
onGenerateImage: r(
|
|
429
|
+
onGenerateImage: r(U),
|
|
430
430
|
onToggleTable: xe,
|
|
431
431
|
onToggleTooltip: $e,
|
|
432
432
|
onToggleAnnotator: pe,
|
|
433
433
|
style: he({
|
|
434
|
-
visibility: r(
|
|
434
|
+
visibility: r(S) ? r(ae) ? "visible" : "hidden" : "visible"
|
|
435
435
|
})
|
|
436
436
|
}, Ge({ _: 2 }, [
|
|
437
437
|
t.$slots.menuIcon ? {
|
|
438
438
|
name: "menuIcon",
|
|
439
|
-
fn: A(({ isOpen: o, color:
|
|
440
|
-
F(t.$slots, "menuIcon", Q(ee({ isOpen: o, color:
|
|
439
|
+
fn: A(({ isOpen: o, color: $ }) => [
|
|
440
|
+
F(t.$slots, "menuIcon", Q(ee({ isOpen: o, color: $ })), void 0, !0)
|
|
441
441
|
]),
|
|
442
442
|
key: "0"
|
|
443
443
|
} : void 0,
|
|
@@ -471,15 +471,15 @@ const bt = ["id"], wt = ["xmlns", "viewBox"], kt = ["width", "height"], Ct = ["t
|
|
|
471
471
|
} : void 0,
|
|
472
472
|
t.$slots.optionFullscreen ? {
|
|
473
473
|
name: "optionFullscreen",
|
|
474
|
-
fn: A(({ toggleFullscreen: o, isFullscreen:
|
|
475
|
-
F(t.$slots, "optionFullscreen", Q(ee({ toggleFullscreen: o, isFullscreen:
|
|
474
|
+
fn: A(({ toggleFullscreen: o, isFullscreen: $ }) => [
|
|
475
|
+
F(t.$slots, "optionFullscreen", Q(ee({ toggleFullscreen: o, isFullscreen: $ })), void 0, !0)
|
|
476
476
|
]),
|
|
477
477
|
key: "5"
|
|
478
478
|
} : void 0,
|
|
479
479
|
t.$slots.optionAnnotator ? {
|
|
480
480
|
name: "optionAnnotator",
|
|
481
|
-
fn: A(({ toggleAnnotator: o, isAnnotator:
|
|
482
|
-
F(t.$slots, "optionAnnotator", Q(ee({ toggleAnnotator: o, isAnnotator:
|
|
481
|
+
fn: A(({ toggleAnnotator: o, isAnnotator: $ }) => [
|
|
482
|
+
F(t.$slots, "optionAnnotator", Q(ee({ toggleAnnotator: o, isAnnotator: $ })), void 0, !0)
|
|
483
483
|
]),
|
|
484
484
|
key: "6"
|
|
485
485
|
} : void 0
|
|
@@ -509,7 +509,7 @@ const bt = ["id"], wt = ["xmlns", "viewBox"], kt = ["width", "height"], Ct = ["t
|
|
|
509
509
|
ke("g", {
|
|
510
510
|
transform: `translate(${(n.value.width <= 0 ? 10 : n.value.width) / 2}, ${(n.value.height <= 0 ? 10 : n.value.height) / 2})`
|
|
511
511
|
}, [
|
|
512
|
-
(x(!0), N(Le, null, je(b.value, (o,
|
|
512
|
+
(x(!0), N(Le, null, je(b.value, (o, $) => (x(), N("g", null, [
|
|
513
513
|
o.minX !== void 0 ? (x(), N("rect", {
|
|
514
514
|
key: 0,
|
|
515
515
|
x: o.x + o.minX,
|
|
@@ -518,15 +518,15 @@ const bt = ["id"], wt = ["xmlns", "viewBox"], kt = ["width", "height"], Ct = ["t
|
|
|
518
518
|
height: o.maxY - o.minY,
|
|
519
519
|
fill: "transparent",
|
|
520
520
|
"pointer-events": "visiblePainted",
|
|
521
|
-
onMouseover: (
|
|
522
|
-
onMouseleave: i[0] || (i[0] = (
|
|
521
|
+
onMouseover: (T) => Ye(o),
|
|
522
|
+
onMouseleave: i[0] || (i[0] = (T) => {
|
|
523
523
|
K.value = null, te.value = !1;
|
|
524
524
|
})
|
|
525
525
|
}, null, 40, xt)) : B("", !0),
|
|
526
526
|
(x(), N("text", {
|
|
527
527
|
fill: o.color,
|
|
528
528
|
"font-weight": e.value.style.chart.words.bold ? "bold" : "normal",
|
|
529
|
-
key:
|
|
529
|
+
key: $,
|
|
530
530
|
x: o.x,
|
|
531
531
|
y: o.y,
|
|
532
532
|
"font-size": o.fontSize,
|
|
@@ -534,7 +534,7 @@ const bt = ["id"], wt = ["xmlns", "viewBox"], kt = ["width", "height"], Ct = ["t
|
|
|
534
534
|
class: Me({ animated: e.value.useCssAnimation, "word-selected": K.value && K.value === o.id && v.value.showTooltip, "word-not-selected": K.value && K.value !== o.id && v.value.showTooltip }),
|
|
535
535
|
"text-anchor": "middle",
|
|
536
536
|
"dominant-baseline": "central",
|
|
537
|
-
style: he(`animation-delay:${
|
|
537
|
+
style: he(`animation-delay:${$ * e.value.animationDelayMs}ms !important; pointer-events:none;`)
|
|
538
538
|
}, Pe(o.name), 15, $t))
|
|
539
539
|
]))), 256))
|
|
540
540
|
], 8, Ct),
|
|
@@ -637,7 +637,7 @@ const bt = ["id"], wt = ["xmlns", "viewBox"], kt = ["width", "height"], Ct = ["t
|
|
|
637
637
|
}, 8, ["config"])) : B("", !0)
|
|
638
638
|
], 44, bt));
|
|
639
639
|
}
|
|
640
|
-
}, Wt = /* @__PURE__ */ ft(Mt, [["__scopeId", "data-v-
|
|
640
|
+
}, Wt = /* @__PURE__ */ ft(Mt, [["__scopeId", "data-v-be758984"]]);
|
|
641
641
|
export {
|
|
642
642
|
Wt as default
|
|
643
643
|
};
|