vue-data-ui 3.9.1 → 3.9.3
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/{BaseDraggableDialog-B6wHUQPl.js → BaseDraggableDialog-n3raFtf2.js} +1 -1
- package/dist/{BaseIcon-CQaciFyv.js → BaseIcon-Bcm8I1fZ.js} +3 -2
- package/dist/{BaseZoomControls-AMmyXEyM.js → BaseZoomControls-gNf811C7.js} +45 -34
- package/dist/{ColorPicker-nZHFmXUV.js → ColorPicker-C4ClF-aL.js} +1 -1
- package/dist/{DataTable-C8cgUUyx.js → DataTable-DFcqksx2.js} +1 -1
- package/dist/{NonSvgPenAndPaper-CVjActC2.js → NonSvgPenAndPaper-D44f2zrW.js} +2 -2
- package/dist/{PackageVersion-CIhhY-aH.js → PackageVersion-Cx3U3jgV.js} +1 -1
- package/dist/{PenAndPaper-DtbXViIl.js → PenAndPaper-Cjiyv0O9.js} +2 -2
- package/dist/{Slicer-DtlEs698.js → Slicer-DFcLRKwb.js} +1 -1
- package/dist/{SlicerPreview-DmzwkUJ4.js → SlicerPreview-Bhjrz2jx.js} +1 -1
- package/dist/{Title-osQjQYc-.js → Title-Bf2WqM40.js} +1 -1
- package/dist/{UserOptions-DeiXBImO.js → UserOptions-DKK-Opvk.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +17 -23
- package/dist/{useNestedProp-BeKjhKny.js → useNestedProp-DjZhR3_5.js} +11 -0
- package/dist/{vue-data-ui-bVCjAfu8.js → vue-data-ui-B7Axn7yb.js} +67 -67
- package/dist/vue-data-ui.js +70 -70
- package/dist/{vue-ui-3d-bar-Bs1SXAWI.js → vue-ui-3d-bar-BW-lnKGl.js} +3 -3
- package/dist/{vue-ui-accordion-nCaoOi6x.js → vue-ui-accordion-BbkkniuF.js} +2 -2
- package/dist/{vue-ui-age-pyramid-D25YLhPh.js → vue-ui-age-pyramid-D3wuUYw9.js} +3 -3
- package/dist/{vue-ui-annotator-3wBuXKBn.js → vue-ui-annotator-BNTBBxok.js} +4 -4
- package/dist/{vue-ui-bullet-XX1owNiy.js → vue-ui-bullet-D6eDCcCM.js} +3 -3
- package/dist/{vue-ui-candlestick-CbKnRXLs.js → vue-ui-candlestick-DnDsrru6.js} +4 -4
- package/dist/{vue-ui-carousel-table-B95eZm5f.js → vue-ui-carousel-table-CSnQrLGZ.js} +2 -2
- package/dist/{vue-ui-chestnut-D6B8mFCb.js → vue-ui-chestnut-CNeF97-x.js} +2 -2
- package/dist/{vue-ui-chord-C-Fe5nTC.js → vue-ui-chord-IHMYgU6P.js} +3 -3
- package/dist/{vue-ui-circle-pack-DbGOEbwG.js → vue-ui-circle-pack-CX-PKwMX.js} +3 -3
- package/dist/{vue-ui-cursor-D99JZotY.js → vue-ui-cursor-DttTxd7y.js} +2 -2
- package/dist/{vue-ui-dag-D7R60BRH.js → vue-ui-dag-BMXgf925.js} +4 -4
- package/dist/{vue-ui-dashboard-Dxhaj5E6.js → vue-ui-dashboard-Diw4ce8Q.js} +66 -66
- package/dist/{vue-ui-digits-D2zs8kUV.js → vue-ui-digits-SXDDgXdv.js} +1 -1
- package/dist/{vue-ui-donut-CbHumHFw.js → vue-ui-donut-C5YmHwzL.js} +234 -234
- package/dist/{vue-ui-donut-evolution--rlD_bzN.js → vue-ui-donut-evolution-DDj2bBEY.js} +4 -4
- package/dist/{vue-ui-dumbbell-Bak094f4.js → vue-ui-dumbbell-CL2zfaa9.js} +3 -3
- package/dist/{vue-ui-flow-BU_3xWDD.js → vue-ui-flow-B9AhZW00.js} +3 -3
- package/dist/{vue-ui-funnel-aOfTIY8A.js → vue-ui-funnel-BfEAIZTb.js} +3 -3
- package/dist/{vue-ui-galaxy-CFnCDW6L.js → vue-ui-galaxy-YKJJZuMK.js} +3 -3
- package/dist/{vue-ui-gauge-Te_U6eYB.js → vue-ui-gauge-CZq9JsEo.js} +3 -3
- package/dist/{vue-ui-geo-qkJZph6o.js → vue-ui-geo-B6PyEQr0.js} +4 -4
- package/dist/{vue-ui-gizmo-BKGL0hrf.js → vue-ui-gizmo-HUo5_TOP.js} +2 -2
- package/dist/{vue-ui-heatmap-CxupvmxZ.js → vue-ui-heatmap-J8KhjPqj.js} +4 -4
- package/dist/{vue-ui-history-plot-CRNGUd--.js → vue-ui-history-plot-C5kQV6LA.js} +3 -3
- package/dist/{vue-ui-horizontal-bar-GXt7JlrG.js → vue-ui-horizontal-bar-B7xXn1ex.js} +8 -8
- package/dist/{vue-ui-kpi-C_sejZsA.js → vue-ui-kpi-P-XmbJWS.js} +2 -2
- package/dist/{vue-ui-mini-loader-BEBv2BjZ.js → vue-ui-mini-loader-Ba1L_dXD.js} +1 -1
- package/dist/{vue-ui-molecule-D5MQWvsl.js → vue-ui-molecule-CZmwGy3H.js} +2 -2
- package/dist/{vue-ui-mood-radar-DkwW-6_J.js → vue-ui-mood-radar-BHuAyycM.js} +3 -3
- package/dist/{vue-ui-nested-donuts-Cl2CtNHY.js → vue-ui-nested-donuts-nNoaEbow.js} +3 -3
- package/dist/{vue-ui-onion-BbTd3-9h.js → vue-ui-onion-BshL66Mw.js} +3 -3
- package/dist/{vue-ui-parallel-coordinate-plot-CAuAUcJe.js → vue-ui-parallel-coordinate-plot-CJ3kM13A.js} +3 -3
- package/dist/{vue-ui-quadrant-CiQOwv_x.js → vue-ui-quadrant-Dy1Jv-kw.js} +3 -3
- package/dist/{vue-ui-quick-chart-Db_p50n_.js → vue-ui-quick-chart-BbboXq-a.js} +3 -3
- package/dist/{vue-ui-radar-Cq0FzSuo.js → vue-ui-radar-B5hEh8N4.js} +3 -3
- package/dist/{vue-ui-rating-Ci09laQN.js → vue-ui-rating-Dz4fQoXn.js} +1 -1
- package/dist/{vue-ui-relation-circle-0TKhiI54.js → vue-ui-relation-circle-B0_y669X.js} +3 -3
- package/dist/{vue-ui-ridgeline-BpKSoxMw.js → vue-ui-ridgeline-BI0y8eXQ.js} +3 -3
- package/dist/{vue-ui-rings-vn5kZZRA.js → vue-ui-rings-DrUtCdK6.js} +3 -3
- package/dist/{vue-ui-scatter-CF_h6seO.js → vue-ui-scatter-RNbQn_9g.js} +3 -3
- package/dist/{vue-ui-skeleton-pcNjmtIm.js → vue-ui-skeleton-CC8Hpc0I.js} +2 -2
- package/dist/{vue-ui-smiley-BW0ksZH3.js → vue-ui-smiley-sVz4LzSA.js} +1 -1
- package/dist/{vue-ui-spark-trend-Gwr_mhU3.js → vue-ui-spark-trend-rmjin0iU.js} +2 -2
- package/dist/{vue-ui-sparkbar-Ti79zXlf.js → vue-ui-sparkbar-CLH2uuJe.js} +2 -2
- package/dist/{vue-ui-sparkgauge-Cw076CAR.js → vue-ui-sparkgauge-CoJpHwni.js} +2 -2
- package/dist/{vue-ui-sparkhistogram-DAQatxbk.js → vue-ui-sparkhistogram-Q3jR_iUb.js} +2 -2
- package/dist/{vue-ui-sparkline-DIFjHdAd.js → vue-ui-sparkline-cvuMrbcv.js} +2 -2
- package/dist/{vue-ui-sparkstackbar-CV48OIlq.js → vue-ui-sparkstackbar-DPJL9KSc.js} +2 -2
- package/dist/{vue-ui-stackbar-iNQuoaFJ.js → vue-ui-stackbar-CFXVCz6S.js} +4 -4
- package/dist/{vue-ui-stackline-Ba_T3bRL.js → vue-ui-stackline-DK7j5aaa.js} +4 -4
- package/dist/{vue-ui-strip-plot-DQHiecxa.js → vue-ui-strip-plot-DTpf71XO.js} +3 -3
- package/dist/{vue-ui-table-BNvnkqgr.js → vue-ui-table-C3f-J0L6.js} +4 -4
- package/dist/{vue-ui-table-heatmap-BecLm3ow.js → vue-ui-table-heatmap-7lER15Z2.js} +2 -2
- package/dist/{vue-ui-table-sparkline-Z9G-8VPL.js → vue-ui-table-sparkline-CLNhjUOy.js} +2 -2
- package/dist/{vue-ui-thermometer-NJ6mFchh.js → vue-ui-thermometer-rEu0nnWc.js} +3 -3
- package/dist/{vue-ui-timer-BzWAHC6N.js → vue-ui-timer-CTuT13zQ.js} +4 -4
- package/dist/{vue-ui-tiremarks-DUVReJRZ.js → vue-ui-tiremarks-CxfGnFGL.js} +3 -3
- package/dist/{vue-ui-treemap-pLbU0XEi.js → vue-ui-treemap-DU8_UnvP.js} +4 -4
- package/dist/{vue-ui-waffle-QkCm05fN.js → vue-ui-waffle-CCTw3K5R.js} +3 -3
- package/dist/{vue-ui-wheel-DaRAOHXK.js → vue-ui-wheel-DwmBHPVq.js} +3 -3
- package/dist/vue-ui-word-cloud-ByIMPclD.js +1433 -0
- package/dist/{vue-ui-world-BS0oWBVp.js → vue-ui-world-Cvrw9DCl.js} +2 -2
- package/dist/{vue-ui-xy-l6mUNMUu.js → vue-ui-xy-CMBkDzNs.js} +5 -5
- package/dist/{vue-ui-xy-canvas-CLoA6DTt.js → vue-ui-xy-canvas-C1ZHlQ3Y.js} +6 -6
- package/package.json +1 -1
- package/dist/vue-ui-word-cloud-CEIaALCH.js +0 -1419
|
@@ -0,0 +1,1433 @@
|
|
|
1
|
+
import { useCssVars as _t, defineAsyncComponent as ae, computed as le, ref as M, toRefs as Nt, watch as we, shallowRef as tt, onMounted as Zt, onBeforeUnmount as Vt, createElementBlock as J, openBlock as W, unref as F, normalizeStyle as Xe, createBlock as se, createCommentVNode as N, createVNode as Re, withCtx as E, renderSlot as z, normalizeProps as Z, guardReactiveProps as V, createSlots as ot, normalizeClass as nt, createElementVNode as $e, Fragment as Ut, renderList as Lt, toDisplayString as De, resolveDynamicComponent as Ht, mergeProps as jt, createTextVNode as at, nextTick as lt } from "vue";
|
|
2
|
+
import { d as st, u as qt } from "./useResponsive-DfdjqQps.js";
|
|
3
|
+
import { c as Gt, t as Jt, H as Kt, T as Qt, i as eo, p as Te, o as rt, g as it, k as to, d as oo, X as no, u as ao, q as lo, x as so } from "./lib-_nVZfi2t.js";
|
|
4
|
+
import { u as ro, a as Ye } from "./useNestedProp-DjZhR3_5.js";
|
|
5
|
+
import { u as io, B as uo } from "./BaseScanner-BMpwQAfz.js";
|
|
6
|
+
import { u as co } from "./usePrinter-DXIMGR61.js";
|
|
7
|
+
import { u as mo } from "./useSvgExport-DrjCWun4.js";
|
|
8
|
+
import { u as fo } from "./useThemeCheck-DGJ31Vi5.js";
|
|
9
|
+
import { u as vo } from "./useUserOptionState-BIvW1Kz7.js";
|
|
10
|
+
import { u as ho } from "./useChartAccessibility-9icAAmYg.js";
|
|
11
|
+
import po from "./img-C5q4A7ke.js";
|
|
12
|
+
import go from "./Title-Bf2WqM40.js";
|
|
13
|
+
import { u as bo } from "./usePanZoom-CDF7rb3o.js";
|
|
14
|
+
import { B as ut } from "./BaseZoomControls-gNf811C7.js";
|
|
15
|
+
import { _ as yo } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
|
+
function Co({
|
|
17
|
+
word: o,
|
|
18
|
+
fontSize: l,
|
|
19
|
+
pad: m,
|
|
20
|
+
canvas: c,
|
|
21
|
+
ctx: i,
|
|
22
|
+
svg: d
|
|
23
|
+
}) {
|
|
24
|
+
const n = `${d.style && d.style.bold ? "bold " : ""}${l}px Arial`;
|
|
25
|
+
i.font = n;
|
|
26
|
+
const p = i.measureText(o.name), f = Math.ceil(p.width) + 2 + (m ? m * 2 : 0), g = Math.ceil(l) + 2 + (m ? m * 2 : 0);
|
|
27
|
+
c.width = f, c.height = g, i.font = n, i.textAlign = "center", i.textBaseline = "middle", i.fillStyle = "black", i.fillText(o.name, f / 2, g / 2);
|
|
28
|
+
const b = i.getImageData(0, 0, f, g).data, v = [], u = [];
|
|
29
|
+
let s = f, S = g, k = 0, x = 0, h = !1;
|
|
30
|
+
for (let w = 0; w < g; w += 1) {
|
|
31
|
+
const _ = w * f * 4;
|
|
32
|
+
let B = -1, X = !1;
|
|
33
|
+
for (let P = 0; P < f; P += 1) {
|
|
34
|
+
const U = _ + P * 4 + 3;
|
|
35
|
+
b[U] > 1 ? (v.push([P, w]), h = !0, P < s && (s = P), P > k && (k = P), w < S && (S = w), w > x && (x = w), X || (X = !0, B = P)) : X && (u.push([w, B, P - 1]), X = !1, B = -1);
|
|
36
|
+
}
|
|
37
|
+
X && u.push([w, B, f - 1]);
|
|
38
|
+
}
|
|
39
|
+
return h || (s = 0, S = 0, k = 0, x = 0), {
|
|
40
|
+
w: f,
|
|
41
|
+
h: g,
|
|
42
|
+
wordMask: v,
|
|
43
|
+
runs: u,
|
|
44
|
+
minX: s,
|
|
45
|
+
minY: S,
|
|
46
|
+
maxX: k,
|
|
47
|
+
maxY: x
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function ko(o) {
|
|
51
|
+
const l = [];
|
|
52
|
+
if (!o.length) return l;
|
|
53
|
+
let m = o[0][1], c = o[0][0], i = c;
|
|
54
|
+
for (let d = 1; d < o.length; d += 1) {
|
|
55
|
+
const r = o[d][0], n = o[d][1];
|
|
56
|
+
n !== m ? (l.push([m, c, i]), m = n, c = r, i = r) : (r === i + 1 || (l.push([m, c, i]), c = r), i = r);
|
|
57
|
+
}
|
|
58
|
+
return l.push([m, c, i]), l;
|
|
59
|
+
}
|
|
60
|
+
function ft(o, l) {
|
|
61
|
+
return 4294967295 >>> 32 - (l - o + 1) << o >>> 0;
|
|
62
|
+
}
|
|
63
|
+
function vt(o) {
|
|
64
|
+
return 4294967295 << o >>> 0;
|
|
65
|
+
}
|
|
66
|
+
function ht(o) {
|
|
67
|
+
return 4294967295 >>> 31 - o >>> 0;
|
|
68
|
+
}
|
|
69
|
+
function wo({
|
|
70
|
+
maskBits: o,
|
|
71
|
+
maskRowStride: l,
|
|
72
|
+
maskW: m,
|
|
73
|
+
maskH: c,
|
|
74
|
+
wx: i,
|
|
75
|
+
wy: d,
|
|
76
|
+
runs: r
|
|
77
|
+
}) {
|
|
78
|
+
for (let n = 0; n < r.length; n += 1) {
|
|
79
|
+
const p = r[n][0], f = r[n][1], g = r[n][2], y = d + p;
|
|
80
|
+
if (y < 0 || y >= c) return !1;
|
|
81
|
+
const b = i + f, v = i + g;
|
|
82
|
+
if (b < 0 || v >= m) return !1;
|
|
83
|
+
const u = y * l, s = b >>> 5, S = v >>> 5, k = b & 31, x = v & 31;
|
|
84
|
+
if (s === S) {
|
|
85
|
+
const h = o[u + s], w = ft(k, x);
|
|
86
|
+
if (h & w) return !1;
|
|
87
|
+
} else {
|
|
88
|
+
{
|
|
89
|
+
const h = o[u + s], w = vt(k);
|
|
90
|
+
if (h & w) return !1;
|
|
91
|
+
}
|
|
92
|
+
for (let h = s + 1; h < S; h += 1)
|
|
93
|
+
if (o[u + h]) return !1;
|
|
94
|
+
{
|
|
95
|
+
const h = o[u + S], w = ht(x);
|
|
96
|
+
if (h & w) return !1;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return !0;
|
|
101
|
+
}
|
|
102
|
+
function xo({
|
|
103
|
+
maskBits: o,
|
|
104
|
+
maskRowStride: l,
|
|
105
|
+
maskW: m,
|
|
106
|
+
maskH: c,
|
|
107
|
+
wx: i,
|
|
108
|
+
wy: d,
|
|
109
|
+
runs: r
|
|
110
|
+
}) {
|
|
111
|
+
for (let n = 0; n < r.length; n += 1) {
|
|
112
|
+
const p = r[n][0], f = r[n][1], g = r[n][2], y = d + p;
|
|
113
|
+
if (y < 0 || y >= c) continue;
|
|
114
|
+
const b = i + f, v = i + g;
|
|
115
|
+
if (v < 0 || b >= m) continue;
|
|
116
|
+
const u = y * l, s = b >>> 5, S = v >>> 5, k = b & 31, x = v & 31;
|
|
117
|
+
if (s === S) {
|
|
118
|
+
const h = ft(k, x);
|
|
119
|
+
o[u + s] |= h;
|
|
120
|
+
} else {
|
|
121
|
+
{
|
|
122
|
+
const h = vt(k);
|
|
123
|
+
o[u + s] |= h;
|
|
124
|
+
}
|
|
125
|
+
for (let h = s + 1; h < S; h += 1)
|
|
126
|
+
o[u + h] = 4294967295;
|
|
127
|
+
{
|
|
128
|
+
const h = ht(x);
|
|
129
|
+
o[u + S] |= h;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function Fo({ wordMask: o, w: l, h: m, dilation: c }) {
|
|
135
|
+
const i = new Uint8Array(l * m), d = [];
|
|
136
|
+
for (let n = 0; n < o.length; n += 1) {
|
|
137
|
+
const p = o[n][0], g = o[n][1] * l + p;
|
|
138
|
+
i[g] || (i[g] = 1, d.push(g));
|
|
139
|
+
}
|
|
140
|
+
for (let n = 0; n < d.length; n += 1) {
|
|
141
|
+
const p = d[n], f = p / l | 0, g = p - f * l;
|
|
142
|
+
for (let y = -c; y <= c; y += 1) {
|
|
143
|
+
const b = f + y;
|
|
144
|
+
if (b < 0 || b >= m) continue;
|
|
145
|
+
const v = b * l;
|
|
146
|
+
for (let u = -c; u <= c; u += 1) {
|
|
147
|
+
if (u === 0 && y === 0) continue;
|
|
148
|
+
const s = g + u;
|
|
149
|
+
s < 0 || s >= l || (i[v + s] = 1);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
const r = [];
|
|
154
|
+
for (let n = 0; n < i.length; n += 1)
|
|
155
|
+
if (i[n]) {
|
|
156
|
+
const p = n / l | 0, f = n - p * l;
|
|
157
|
+
r.push([f, p]);
|
|
158
|
+
}
|
|
159
|
+
return r;
|
|
160
|
+
}
|
|
161
|
+
function Ao({
|
|
162
|
+
runs: o,
|
|
163
|
+
w: l,
|
|
164
|
+
h: m,
|
|
165
|
+
dilation: c
|
|
166
|
+
}) {
|
|
167
|
+
const i = new Uint8Array(l * m), d = [];
|
|
168
|
+
for (let n = 0; n < o.length; n += 1) {
|
|
169
|
+
const p = o[n], f = p[0], g = p[1], y = p[2], b = f * l;
|
|
170
|
+
for (let v = g; v <= y; v += 1) {
|
|
171
|
+
const u = b + v;
|
|
172
|
+
i[u] || (i[u] = 1, d.push(u));
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
for (let n = 0; n < d.length; n += 1) {
|
|
176
|
+
const p = d[n], f = p / l | 0, g = p - f * l;
|
|
177
|
+
for (let y = -c; y <= c; y += 1) {
|
|
178
|
+
const b = f + y;
|
|
179
|
+
if (b < 0 || b >= m) continue;
|
|
180
|
+
const v = b * l;
|
|
181
|
+
for (let u = -c; u <= c; u += 1) {
|
|
182
|
+
if (u === 0 && y === 0) continue;
|
|
183
|
+
const s = g + u;
|
|
184
|
+
s < 0 || s >= l || (i[v + s] = 1);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
const r = [];
|
|
189
|
+
for (let n = 0; n < m; n += 1) {
|
|
190
|
+
const p = n * l;
|
|
191
|
+
let f = -1, g = !1;
|
|
192
|
+
for (let y = 0; y < l; y += 1)
|
|
193
|
+
i[p + y] ? g || (g = !0, f = y) : g && (r.push([n, f, y - 1]), g = !1, f = -1);
|
|
194
|
+
g && r.push([n, f, l - 1]);
|
|
195
|
+
}
|
|
196
|
+
return r;
|
|
197
|
+
}
|
|
198
|
+
function So(o, l) {
|
|
199
|
+
const m = o.runs, c = o.w, i = o.h, d = Math.max(1, Math.round(c * l)), r = Math.max(1, Math.round(i * l)), n = new Array(r);
|
|
200
|
+
let p = d, f = r, g = 0, y = 0, b = !1;
|
|
201
|
+
for (let u = 0; u < m.length; u += 1) {
|
|
202
|
+
const s = m[u], S = s[0], k = s[1], x = s[2], h = Math.round(S * l);
|
|
203
|
+
if (h < 0 || h >= r) continue;
|
|
204
|
+
const w = Math.round(k * l), _ = Math.round((x + 1) * l) - 1;
|
|
205
|
+
if (_ < w) continue;
|
|
206
|
+
let B = n[h];
|
|
207
|
+
B || (B = [], n[h] = B), B.push([w, _]), b = !0, w < p && (p = w), _ > g && (g = _), h < f && (f = h), h > y && (y = h);
|
|
208
|
+
}
|
|
209
|
+
if (!b)
|
|
210
|
+
return {
|
|
211
|
+
w: d,
|
|
212
|
+
h: r,
|
|
213
|
+
runs: [],
|
|
214
|
+
minX: 0,
|
|
215
|
+
minY: 0,
|
|
216
|
+
maxX: 0,
|
|
217
|
+
maxY: 0
|
|
218
|
+
};
|
|
219
|
+
const v = [];
|
|
220
|
+
for (let u = 0; u < r; u += 1) {
|
|
221
|
+
const s = n[u];
|
|
222
|
+
if (!s || s.length === 0) continue;
|
|
223
|
+
s.sort((x, h) => x[0] - h[0]);
|
|
224
|
+
let S = s[0][0], k = s[0][1];
|
|
225
|
+
for (let x = 1; x < s.length; x += 1) {
|
|
226
|
+
const h = s[x][0], w = s[x][1];
|
|
227
|
+
h <= k + 1 ? w > k && (k = w) : (v.push([u, S, k]), S = h, k = w);
|
|
228
|
+
}
|
|
229
|
+
v.push([u, S, k]);
|
|
230
|
+
}
|
|
231
|
+
return {
|
|
232
|
+
w: d,
|
|
233
|
+
h: r,
|
|
234
|
+
runs: v,
|
|
235
|
+
minX: p,
|
|
236
|
+
minY: f,
|
|
237
|
+
maxX: g,
|
|
238
|
+
maxY: y
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
const ct = /* @__PURE__ */ new Map(), dt = /* @__PURE__ */ new Map();
|
|
242
|
+
function $o({ word: o, fontSize: l, pad: m, svg: c }) {
|
|
243
|
+
const i = c.style && c.style.bold ? 1 : 0, d = m || 0;
|
|
244
|
+
return `${o.name}::${l}::${d}::${i}`;
|
|
245
|
+
}
|
|
246
|
+
function To({
|
|
247
|
+
word: o,
|
|
248
|
+
fontSize: l,
|
|
249
|
+
pad: m,
|
|
250
|
+
canvas: c,
|
|
251
|
+
ctx: i,
|
|
252
|
+
svg: d
|
|
253
|
+
}) {
|
|
254
|
+
const r = $o({ word: o, fontSize: l, pad: m, svg: d }), n = ct.get(r);
|
|
255
|
+
if (n) return { key: r, bitmap: n };
|
|
256
|
+
const p = Co({ word: o, fontSize: l, pad: m, canvas: c, ctx: i, svg: d });
|
|
257
|
+
return ct.set(r, p), { key: r, bitmap: p };
|
|
258
|
+
}
|
|
259
|
+
function Mo({
|
|
260
|
+
bitmapKey: o,
|
|
261
|
+
wordMask: l,
|
|
262
|
+
w: m,
|
|
263
|
+
h: c,
|
|
264
|
+
dilation: i
|
|
265
|
+
}) {
|
|
266
|
+
const d = `${o}::d${i}`, r = dt.get(d);
|
|
267
|
+
if (r) return r;
|
|
268
|
+
const n = Fo({ wordMask: l, w: m, h: c, dilation: i }), p = ko(n), f = { wordMask: n, runs: p };
|
|
269
|
+
return dt.set(d, f), f;
|
|
270
|
+
}
|
|
271
|
+
const Io = 6, Oo = 2, pt = Math.PI / 180, gt = [], bt = [];
|
|
272
|
+
for (let o = 0; o < 360; o += Io) {
|
|
273
|
+
const l = o * pt;
|
|
274
|
+
gt.push(Math.cos(l)), bt.push(Math.sin(l));
|
|
275
|
+
}
|
|
276
|
+
const yt = [], Ct = [];
|
|
277
|
+
for (let o = 0; o < 360; o += Oo) {
|
|
278
|
+
const l = o * pt;
|
|
279
|
+
yt.push(Math.cos(l)), Ct.push(Math.sin(l));
|
|
280
|
+
}
|
|
281
|
+
function Eo(o, l, m) {
|
|
282
|
+
if (!o.length) return;
|
|
283
|
+
let c = 1 / 0, i = -1 / 0, d = 1 / 0, r = -1 / 0;
|
|
284
|
+
for (let u = 0; u < o.length; u += 1) {
|
|
285
|
+
const s = o[u], S = s.x + s.minX, k = s.x + s.maxX, x = s.y + s.minY, h = s.y + s.maxY;
|
|
286
|
+
S < c && (c = S), k > i && (i = k), x < d && (d = x), h > r && (r = h);
|
|
287
|
+
}
|
|
288
|
+
if (!isFinite(c) || !isFinite(i) || !isFinite(d) || !isFinite(r)) return;
|
|
289
|
+
const n = Math.max(
|
|
290
|
+
Math.abs(c),
|
|
291
|
+
Math.abs(i)
|
|
292
|
+
), p = Math.max(
|
|
293
|
+
Math.abs(d),
|
|
294
|
+
Math.abs(r)
|
|
295
|
+
);
|
|
296
|
+
if (n === 0 || p === 0) return;
|
|
297
|
+
const f = 0.9, g = l * 0.5 * f / n, y = m * 0.5 * f / p;
|
|
298
|
+
let b = Math.min(g, y);
|
|
299
|
+
if (b <= 1) return;
|
|
300
|
+
const v = 4;
|
|
301
|
+
b > v && (b = v);
|
|
302
|
+
for (let u = 0; u < o.length; u += 1) {
|
|
303
|
+
const s = o[u];
|
|
304
|
+
s.x *= b, s.y *= b, s.width *= b, s.height *= b, s.fontSize *= b, s.minX *= b, s.maxX *= b, s.minY *= b, s.maxY *= b;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
function zo() {
|
|
308
|
+
return typeof performance < "u" && typeof performance.now == "function" ? () => performance.now() : () => Date.now();
|
|
309
|
+
}
|
|
310
|
+
function Po({
|
|
311
|
+
value: o,
|
|
312
|
+
minimumValue: l,
|
|
313
|
+
maximumValue: m,
|
|
314
|
+
configuredMinimumFontSize: c,
|
|
315
|
+
maximumFontSize: i
|
|
316
|
+
}) {
|
|
317
|
+
if (m === l)
|
|
318
|
+
return i;
|
|
319
|
+
const r = (o - l) / (m - l) * (i - c) + c;
|
|
320
|
+
return Math.max(
|
|
321
|
+
c,
|
|
322
|
+
Math.min(i, r)
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
function Xo({
|
|
326
|
+
currentBitmap: o,
|
|
327
|
+
strictPixelPadding: l,
|
|
328
|
+
scaleFactor: m,
|
|
329
|
+
baseBitmap: c,
|
|
330
|
+
bitmapKey: i
|
|
331
|
+
}) {
|
|
332
|
+
let d = o.runs;
|
|
333
|
+
const r = o.w, n = o.h, p = o.minX, f = o.minY, g = o.maxX, y = o.maxY;
|
|
334
|
+
return !l || !d.length ? {
|
|
335
|
+
runs: d,
|
|
336
|
+
bitmapWidth: r,
|
|
337
|
+
bitmapHeight: n,
|
|
338
|
+
bitmapMinimumX: p,
|
|
339
|
+
bitmapMinimumY: f,
|
|
340
|
+
bitmapMaximumX: g,
|
|
341
|
+
bitmapMaximumY: y
|
|
342
|
+
} : m === 1 ? {
|
|
343
|
+
runs: Mo({
|
|
344
|
+
bitmapKey: i,
|
|
345
|
+
wordMask: c.wordMask,
|
|
346
|
+
w: c.w,
|
|
347
|
+
h: c.h,
|
|
348
|
+
dilation: 2
|
|
349
|
+
}).runs,
|
|
350
|
+
bitmapWidth: r,
|
|
351
|
+
bitmapHeight: n,
|
|
352
|
+
bitmapMinimumX: p,
|
|
353
|
+
bitmapMinimumY: f,
|
|
354
|
+
bitmapMaximumX: g,
|
|
355
|
+
bitmapMaximumY: y
|
|
356
|
+
} : {
|
|
357
|
+
runs: Ao({
|
|
358
|
+
runs: d,
|
|
359
|
+
w: r,
|
|
360
|
+
h: n,
|
|
361
|
+
dilation: 2
|
|
362
|
+
}),
|
|
363
|
+
bitmapWidth: r,
|
|
364
|
+
bitmapHeight: n,
|
|
365
|
+
bitmapMinimumX: p,
|
|
366
|
+
bitmapMinimumY: f,
|
|
367
|
+
bitmapMaximumX: g,
|
|
368
|
+
bitmapMaximumY: y
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
async function mt({
|
|
372
|
+
baseBitmap: o,
|
|
373
|
+
baseFontSize: l,
|
|
374
|
+
minimumScaleFactor: m,
|
|
375
|
+
maskBits: c,
|
|
376
|
+
maskRowStride: i,
|
|
377
|
+
maskWidth: d,
|
|
378
|
+
maskHeight: r,
|
|
379
|
+
centerX: n,
|
|
380
|
+
centerY: p,
|
|
381
|
+
maximumRadius: f,
|
|
382
|
+
scaleStep: g,
|
|
383
|
+
strictPixelPadding: y,
|
|
384
|
+
bitmapKey: b,
|
|
385
|
+
minimumFontSize: v,
|
|
386
|
+
rawWord: u,
|
|
387
|
+
cosineArray: s,
|
|
388
|
+
sineArray: S,
|
|
389
|
+
radiusStep: k,
|
|
390
|
+
maximumAttempts: x,
|
|
391
|
+
maybeYield: h
|
|
392
|
+
}) {
|
|
393
|
+
let w = 1;
|
|
394
|
+
for (; w >= m; ) {
|
|
395
|
+
const _ = w === 1 ? o : So(o, w), B = Xo({
|
|
396
|
+
currentBitmap: _,
|
|
397
|
+
strictPixelPadding: y,
|
|
398
|
+
scaleFactor: w,
|
|
399
|
+
baseBitmap: o,
|
|
400
|
+
bitmapKey: b
|
|
401
|
+
}), {
|
|
402
|
+
runs: X,
|
|
403
|
+
bitmapWidth: P,
|
|
404
|
+
bitmapHeight: U,
|
|
405
|
+
bitmapMinimumX: te,
|
|
406
|
+
bitmapMinimumY: re,
|
|
407
|
+
bitmapMaximumX: e,
|
|
408
|
+
bitmapMaximumY: ie
|
|
409
|
+
} = B;
|
|
410
|
+
let K = 0, oe = 0;
|
|
411
|
+
for (; K < f && oe < x; ) {
|
|
412
|
+
for (let R = 0; R < s.length; R += 1) {
|
|
413
|
+
oe += 1;
|
|
414
|
+
const L = Math.round(
|
|
415
|
+
n + K * s[R] - P / 2
|
|
416
|
+
), H = Math.round(
|
|
417
|
+
p + K * S[R] - U / 2
|
|
418
|
+
);
|
|
419
|
+
if (L < 0 || H < 0 || L + P > d || H + U > r)
|
|
420
|
+
continue;
|
|
421
|
+
if (wo({
|
|
422
|
+
maskBits: c,
|
|
423
|
+
maskRowStride: i,
|
|
424
|
+
maskW: d,
|
|
425
|
+
maskH: r,
|
|
426
|
+
wx: L,
|
|
427
|
+
wy: H,
|
|
428
|
+
runs: X
|
|
429
|
+
})) {
|
|
430
|
+
const { __wcIndex: D, ...Y } = u, ue = Math.max(
|
|
431
|
+
v,
|
|
432
|
+
Math.round(l * w)
|
|
433
|
+
), me = {
|
|
434
|
+
...Y,
|
|
435
|
+
x: L - d / 2,
|
|
436
|
+
y: H - r / 2,
|
|
437
|
+
fontSize: ue,
|
|
438
|
+
width: P,
|
|
439
|
+
height: U,
|
|
440
|
+
angle: 0,
|
|
441
|
+
minX: te,
|
|
442
|
+
minY: re,
|
|
443
|
+
maxX: e,
|
|
444
|
+
maxY: ie
|
|
445
|
+
};
|
|
446
|
+
return xo({
|
|
447
|
+
maskBits: c,
|
|
448
|
+
maskRowStride: i,
|
|
449
|
+
maskW: d,
|
|
450
|
+
maskH: r,
|
|
451
|
+
wx: L,
|
|
452
|
+
wy: H,
|
|
453
|
+
runs: X
|
|
454
|
+
}), me;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
K += k, (oe & 1023) === 0 && await h();
|
|
458
|
+
}
|
|
459
|
+
w *= g, await h();
|
|
460
|
+
}
|
|
461
|
+
return null;
|
|
462
|
+
}
|
|
463
|
+
async function Ro({
|
|
464
|
+
baseBitmap: o,
|
|
465
|
+
baseFontSize: l,
|
|
466
|
+
minimumScaleFactor: m,
|
|
467
|
+
maskBits: c,
|
|
468
|
+
maskRowStride: i,
|
|
469
|
+
maskWidth: d,
|
|
470
|
+
maskHeight: r,
|
|
471
|
+
centerX: n,
|
|
472
|
+
centerY: p,
|
|
473
|
+
maximumRadius: f,
|
|
474
|
+
scaleStep: g,
|
|
475
|
+
strictPixelPadding: y,
|
|
476
|
+
bitmapKey: b,
|
|
477
|
+
minimumFontSize: v,
|
|
478
|
+
rawWord: u,
|
|
479
|
+
maybeYield: s,
|
|
480
|
+
spiralRadiusStep: S,
|
|
481
|
+
fallbackSpiralRadiusStep: k
|
|
482
|
+
}) {
|
|
483
|
+
const x = await mt({
|
|
484
|
+
baseBitmap: o,
|
|
485
|
+
baseFontSize: l,
|
|
486
|
+
minimumScaleFactor: m,
|
|
487
|
+
maskBits: c,
|
|
488
|
+
maskRowStride: i,
|
|
489
|
+
maskWidth: d,
|
|
490
|
+
maskHeight: r,
|
|
491
|
+
centerX: n,
|
|
492
|
+
centerY: p,
|
|
493
|
+
maximumRadius: f,
|
|
494
|
+
scaleStep: g,
|
|
495
|
+
strictPixelPadding: y,
|
|
496
|
+
bitmapKey: b,
|
|
497
|
+
minimumFontSize: v,
|
|
498
|
+
rawWord: u,
|
|
499
|
+
cosineArray: gt,
|
|
500
|
+
sineArray: bt,
|
|
501
|
+
radiusStep: S,
|
|
502
|
+
maximumAttempts: 1e4,
|
|
503
|
+
maybeYield: s
|
|
504
|
+
});
|
|
505
|
+
return x || await mt({
|
|
506
|
+
baseBitmap: o,
|
|
507
|
+
baseFontSize: l,
|
|
508
|
+
minimumScaleFactor: m,
|
|
509
|
+
maskBits: c,
|
|
510
|
+
maskRowStride: i,
|
|
511
|
+
maskWidth: d,
|
|
512
|
+
maskHeight: r,
|
|
513
|
+
centerX: n,
|
|
514
|
+
centerY: p,
|
|
515
|
+
maximumRadius: f,
|
|
516
|
+
scaleStep: g,
|
|
517
|
+
strictPixelPadding: y,
|
|
518
|
+
bitmapKey: b,
|
|
519
|
+
minimumFontSize: v,
|
|
520
|
+
rawWord: u,
|
|
521
|
+
cosineArray: yt,
|
|
522
|
+
sineArray: Ct,
|
|
523
|
+
radiusStep: k,
|
|
524
|
+
maximumAttempts: 25e3,
|
|
525
|
+
maybeYield: s
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
async function Do({
|
|
529
|
+
words: o,
|
|
530
|
+
proximity: l = 0,
|
|
531
|
+
svg: m,
|
|
532
|
+
strictPixelPadding: c,
|
|
533
|
+
onProgress: i,
|
|
534
|
+
debugTiming: d = !1
|
|
535
|
+
}) {
|
|
536
|
+
const r = zo(), n = r(), p = 12;
|
|
537
|
+
let f = n;
|
|
538
|
+
async function g() {
|
|
539
|
+
r() - f >= p && (await new Promise((Y) => setTimeout(Y, 0)), f = r());
|
|
540
|
+
}
|
|
541
|
+
const y = m.width, b = m.height, v = Math.round(y), u = Math.round(b), s = 1, S = m.minFontSize, k = Math.min(m.maxFontSize, 100), x = o.map((D) => D.value), h = Math.min(...x), w = Math.max(...x);
|
|
542
|
+
if (v <= 0 || u <= 0) return [];
|
|
543
|
+
const _ = v + 31 >>> 5, B = new Uint32Array(_ * u), X = document.createElement("canvas"), P = X.getContext("2d", { willReadFrequently: !0 });
|
|
544
|
+
X.width = v, X.height = u;
|
|
545
|
+
const U = 2, te = 1, re = Math.max(v, u), e = Math.floor(v / 2), ie = Math.floor(u / 2), oe = [...o.map((D, Y) => ({
|
|
546
|
+
...D,
|
|
547
|
+
__wcIndex: Y,
|
|
548
|
+
id: D.id != null ? D.id : `${D.name}__${Y}`
|
|
549
|
+
}))].sort(
|
|
550
|
+
(D, Y) => Y.value - D.value
|
|
551
|
+
), R = [], L = 0.9;
|
|
552
|
+
for (let D = 0; D < oe.length; D += 1) {
|
|
553
|
+
const Y = oe[D], ue = R.length, ce = Po({
|
|
554
|
+
value: Y.value,
|
|
555
|
+
minimumValue: h,
|
|
556
|
+
maximumValue: w,
|
|
557
|
+
configuredMinimumFontSize: S,
|
|
558
|
+
maximumFontSize: k
|
|
559
|
+
}), xe = To({
|
|
560
|
+
word: Y,
|
|
561
|
+
fontSize: ce,
|
|
562
|
+
pad: l,
|
|
563
|
+
canvas: X,
|
|
564
|
+
ctx: P,
|
|
565
|
+
svg: m
|
|
566
|
+
}), fe = xe.key, I = xe.bitmap, Me = I.w, Ie = I.h;
|
|
567
|
+
if (Me <= 0 || Ie <= 0) {
|
|
568
|
+
await g();
|
|
569
|
+
continue;
|
|
570
|
+
}
|
|
571
|
+
const j = Math.max(
|
|
572
|
+
s / ce,
|
|
573
|
+
0.1
|
|
574
|
+
), Q = await Ro({
|
|
575
|
+
baseBitmap: I,
|
|
576
|
+
baseFontSize: ce,
|
|
577
|
+
minimumScaleFactor: j,
|
|
578
|
+
maskBits: B,
|
|
579
|
+
maskRowStride: _,
|
|
580
|
+
maskWidth: v,
|
|
581
|
+
maskHeight: u,
|
|
582
|
+
centerX: e,
|
|
583
|
+
centerY: ie,
|
|
584
|
+
maximumRadius: re,
|
|
585
|
+
scaleStep: L,
|
|
586
|
+
strictPixelPadding: c,
|
|
587
|
+
bitmapKey: fe,
|
|
588
|
+
minimumFontSize: s,
|
|
589
|
+
rawWord: Y,
|
|
590
|
+
maybeYield: g,
|
|
591
|
+
spiralRadiusStep: U,
|
|
592
|
+
fallbackSpiralRadiusStep: te
|
|
593
|
+
});
|
|
594
|
+
if (Q && (R.push(Q), i && R.length > ue)) {
|
|
595
|
+
const pe = R[R.length - 1];
|
|
596
|
+
i({ word: pe, all: R });
|
|
597
|
+
}
|
|
598
|
+
await g();
|
|
599
|
+
}
|
|
600
|
+
if (!R.length)
|
|
601
|
+
return [];
|
|
602
|
+
Eo(R, v, u);
|
|
603
|
+
const he = r() - n;
|
|
604
|
+
return d && typeof console < "u" && console.log && console.log(
|
|
605
|
+
"[vue-data-ui][word-cloud] positionWordsAsync:",
|
|
606
|
+
`${he.toFixed(2)} ms for ${o.length} words`
|
|
607
|
+
), R.sort((D, Y) => Y.fontSize - D.fontSize);
|
|
608
|
+
}
|
|
609
|
+
const kt = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", title: { color: "#CCCCCC", subtitle: { color: "#757575" } }, controls: { backgroundColor: "#2A2A2A", buttonColor: "#2A2A2A", color: "#CCCCCC", border: "1px solid #4A4A4A" }, words: { selectedStroke: "#1A1A1A" }, tooltip: { backgroundColor: "#1A1A1A", backgroundOpacity: 70, color: "#CCCCCC", borderColor: "#5A5A5A" } } }, table: { th: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, td: { backgroundColor: "#1A1A1A", color: "#CCCCCC" } } }, wt = { style: { chart: { backgroundColor: "#FFF8E1", color: "#424242", title: { color: "#424242", subtitle: { color: "#757575" } }, controls: { backgroundColor: "#FFF8E1", buttonColor: "#FFF8E1", color: "#424242", border: "1px solid #d9bbb2" }, words: { selectedStroke: "#FFF8E1" }, tooltip: { backgroundColor: "#FFECB3", backgroundOpacity: 30, color: "#424242", borderColor: "#FF8A65" }, zoom: { color: "#5D4037", highlightColor: "#FF8A65" } } }, table: { th: { backgroundColor: "#FFF8E1", color: "#424242" }, td: { backgroundColor: "#FFF8E1", color: "#424242" } } }, xt = { style: { chart: { backgroundColor: "#1E1E1E", color: "#BDBDBD", title: { color: "#FFF8E1", subtitle: { color: "#BDBDBD" } }, controls: { backgroundColor: "#1E1E1E", buttonColor: "#1E1E1E", color: "#BDBDBD", border: "1px solid #3A3A3A" }, words: { selectedStroke: "#1E1E1E" }, tooltip: { backgroundColor: "#1E1E1E", backgroundOpacity: 30, color: "#FFF8E1", borderColor: "#FF8A65" }, zoom: { color: "#5D4037", highlightColor: "#FF8A65" } } }, table: { th: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, td: { backgroundColor: "#1E1E1E", color: "#BDBDBD" } } }, Ft = { style: { chart: { backgroundColor: "#1A1A1A", color: "#99AA99", controls: { backgroundColor: "#1A1A1A", buttonColor: "#1A1A1A", color: "#99AA99", border: "1px solid #1e361e" }, title: { color: "#66CC66", subtitle: { color: "#99AA99" } }, words: { selectedStroke: "#1A1A1A" } } }, table: { th: { backgroundColor: "#1A1A1A", color: "#99AA99" }, td: { backgroundColor: "#1A1A1A", color: "#AACCAA" } } }, At = { style: { chart: { backgroundColor: "#fbfafa", color: "#8A9892", controls: { backgroundColor: "#fbfafa", buttonColor: "#fbfafa", color: "#99AA99", border: "1px solid #ebded3" }, title: { color: "#8A9892", subtitle: { color: "#99AA99" } }, words: { selectedStroke: "#fbfafa" } } }, table: { th: { backgroundColor: "#fbfafa", color: "#8F837A" }, td: { backgroundColor: "#fbfafa", color: "#8F837A" } } }, St = { style: { chart: { backgroundColor: "#f6f6fb", color: "#50606C", controls: { backgroundColor: "#f6f6fb", buttonColor: "#f6f6fb", color: "#50606C", border: "1px solid #98aab8", borderRadius: "0" }, title: { color: "#50606C", subtitle: { color: "#718890" } }, words: { selectedStroke: "#f6f6fb" } } }, table: { th: { backgroundColor: "#f6f6fb", color: "#50606C" }, td: { backgroundColor: "#f6f6fb", color: "#50606C" } } }, $t = {
|
|
610
|
+
default: {},
|
|
611
|
+
dark: kt,
|
|
612
|
+
celebration: wt,
|
|
613
|
+
celebrationNight: xt,
|
|
614
|
+
hack: Ft,
|
|
615
|
+
zen: At,
|
|
616
|
+
concrete: St
|
|
617
|
+
}, mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
618
|
+
__proto__: null,
|
|
619
|
+
celebration: wt,
|
|
620
|
+
celebrationNight: xt,
|
|
621
|
+
concrete: St,
|
|
622
|
+
dark: kt,
|
|
623
|
+
default: $t,
|
|
624
|
+
hack: Ft,
|
|
625
|
+
zen: At
|
|
626
|
+
}, Symbol.toStringTag, { value: "Module" })), Yo = ["id", "data-resizing", "data-relayout"], Wo = ["xmlns", "viewBox"], Bo = ["width", "height"], _o = ["transform"], No = ["transform"], Zo = ["x", "y", "width", "height", "onMouseover", "onMouseleave", "onClick"], Vo = ["fill", "font-weight", "font-size", "transform", "stroke", "stroke-width"], Uo = {
|
|
627
|
+
key: 4,
|
|
628
|
+
class: "vue-data-ui-watermark"
|
|
629
|
+
}, Lo = {
|
|
630
|
+
key: 5,
|
|
631
|
+
"data-dom-to-png-ignore": "",
|
|
632
|
+
class: "reset-wrapper"
|
|
633
|
+
}, Ho = ["innerHTML"], jo = {
|
|
634
|
+
__name: "vue-ui-word-cloud",
|
|
635
|
+
props: {
|
|
636
|
+
config: {
|
|
637
|
+
type: Object,
|
|
638
|
+
default() {
|
|
639
|
+
return {};
|
|
640
|
+
}
|
|
641
|
+
},
|
|
642
|
+
dataset: {
|
|
643
|
+
type: [Array, String],
|
|
644
|
+
default() {
|
|
645
|
+
return [];
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
setup(o, { expose: l }) {
|
|
650
|
+
_t((t) => ({
|
|
651
|
+
v61fe6bdc: t.slicerColor
|
|
652
|
+
}));
|
|
653
|
+
const m = ae(() => import("./Tooltip-l2pmtXwi.js")), c = ae(() => import("./BaseIcon-Bcm8I1fZ.js")), i = ae(() => import("./vue-ui-accordion-BbkkniuF.js")), d = ae(() => import("./DataTable-DFcqksx2.js")), r = ae(() => import("./PenAndPaper-Cjiyv0O9.js")), n = ae(() => import("./UserOptions-DKK-Opvk.js")), p = ae(() => import("./PackageVersion-Cx3U3jgV.js")), f = ae(() => import("./BaseDraggableDialog-n3raFtf2.js")), { vue_ui_word_cloud: g } = ro(), { isThemeValid: y, warnInvalidTheme: b } = fo(), v = o, u = le({
|
|
654
|
+
get() {
|
|
655
|
+
return !!v.dataset && v.dataset.length;
|
|
656
|
+
},
|
|
657
|
+
set(t) {
|
|
658
|
+
return t;
|
|
659
|
+
}
|
|
660
|
+
}), s = M(Gt()), S = M(0), k = M(null), x = M(null), h = M(null), w = M(0), _ = M(0), B = M(!1), X = M(null), P = M(null), U = M(!1), te = M(!1), re = M(null), e = M(ue()), { loading: ie, FINAL_DATASET: K, manualLoading: oe } = io({
|
|
661
|
+
...Nt(v),
|
|
662
|
+
FINAL_CONFIG: e,
|
|
663
|
+
prepareConfig: ue,
|
|
664
|
+
callback: () => {
|
|
665
|
+
Promise.resolve().then(() => {
|
|
666
|
+
O.value.showTable = e.value.table.show, O.value.showTooltip = e.value.style.chart.tooltip.show, O.value.showZoom = e.value.style.chart.zoom.show;
|
|
667
|
+
});
|
|
668
|
+
},
|
|
669
|
+
skeletonDataset: [
|
|
670
|
+
{ name: "Lorem", value: 6 },
|
|
671
|
+
{ name: "ipsum", value: 3 },
|
|
672
|
+
{ name: "dolor", value: 1 },
|
|
673
|
+
{ name: "sit", value: 3 },
|
|
674
|
+
{ name: "amet", value: 3 },
|
|
675
|
+
{ name: "consectetur", value: 2 },
|
|
676
|
+
{ name: "adipiscing", value: 1 },
|
|
677
|
+
{ name: "elit", value: 2 },
|
|
678
|
+
{ name: "Vivamus", value: 2 },
|
|
679
|
+
{ name: "pulvinar", value: 1 },
|
|
680
|
+
{ name: "pretium", value: 1 },
|
|
681
|
+
{ name: "venenatis", value: 2 },
|
|
682
|
+
{ name: "Donec", value: 1 },
|
|
683
|
+
{ name: "imperdiet", value: 3 },
|
|
684
|
+
{ name: "id", value: 1 },
|
|
685
|
+
{ name: "porttitor", value: 2 },
|
|
686
|
+
{ name: "tristique", value: 1 },
|
|
687
|
+
{ name: "Aenean", value: 2 },
|
|
688
|
+
{ name: "ac", value: 5 },
|
|
689
|
+
{ name: "commodo", value: 2 },
|
|
690
|
+
{ name: "justo", value: 2 },
|
|
691
|
+
{ name: "Vestibulum", value: 2 },
|
|
692
|
+
{ name: "placerat", value: 1 },
|
|
693
|
+
{ name: "molestie", value: 1 },
|
|
694
|
+
{ name: "nisl", value: 1 },
|
|
695
|
+
{ name: "lacinia", value: 2 },
|
|
696
|
+
{ name: "nulla", value: 1 },
|
|
697
|
+
{ name: "posuere", value: 2 },
|
|
698
|
+
{ name: "quis", value: 3 },
|
|
699
|
+
{ name: "ullamcorper", value: 1 },
|
|
700
|
+
{ name: "eu", value: 1 },
|
|
701
|
+
{ name: "ex", value: 1 },
|
|
702
|
+
{ name: "vitae", value: 3 },
|
|
703
|
+
{ name: "facilisis", value: 1 },
|
|
704
|
+
{ name: "Aliquam", value: 1 },
|
|
705
|
+
{ name: "erat", value: 1 },
|
|
706
|
+
{ name: "volutpat", value: 1 },
|
|
707
|
+
{ name: "Proin", value: 1 },
|
|
708
|
+
{ name: "nunc", value: 1 },
|
|
709
|
+
{ name: "felis", value: 1 },
|
|
710
|
+
{ name: "gravida", value: 3 },
|
|
711
|
+
{ name: "sed", value: 1 },
|
|
712
|
+
{ name: "orci", value: 1 },
|
|
713
|
+
{ name: "Interdum", value: 1 },
|
|
714
|
+
{ name: "et", value: 1 },
|
|
715
|
+
{ name: "malesuada", value: 1 },
|
|
716
|
+
{ name: "fames", value: 1 },
|
|
717
|
+
{ name: "ante", value: 1 }
|
|
718
|
+
],
|
|
719
|
+
skeletonConfig: Jt({
|
|
720
|
+
defaultConfig: e.value,
|
|
721
|
+
userConfig: {
|
|
722
|
+
userOptions: { show: !1 },
|
|
723
|
+
table: { show: !1 },
|
|
724
|
+
useCssAnimation: !1,
|
|
725
|
+
animationDelayMs: 0,
|
|
726
|
+
nodeCategories: {},
|
|
727
|
+
nodeCategoryColors: {},
|
|
728
|
+
style: {
|
|
729
|
+
chart: {
|
|
730
|
+
backgroundColor: "#99999930",
|
|
731
|
+
words: {
|
|
732
|
+
color: "#6A6A6A",
|
|
733
|
+
usePalette: !1,
|
|
734
|
+
selectedStroke: "#CCCCCC"
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
})
|
|
740
|
+
}), R = M(L());
|
|
741
|
+
function L() {
|
|
742
|
+
return typeof K.value == "string" ? Kt(K.value) : K.value.map((t, C) => ({
|
|
743
|
+
...t,
|
|
744
|
+
value: Qt(t.value)
|
|
745
|
+
}));
|
|
746
|
+
}
|
|
747
|
+
const { userOptionsVisible: H, setUserOptionsVisibility: he, keepUserOptionState: D } = vo({ config: e.value }), { svgRef: Y } = ho({ config: e.value.style.chart.title });
|
|
748
|
+
function ue() {
|
|
749
|
+
const t = Ye({
|
|
750
|
+
userConfig: v.config,
|
|
751
|
+
defaultConfig: g
|
|
752
|
+
}), C = t.theme;
|
|
753
|
+
if (!C) return t;
|
|
754
|
+
if (!y.value(t))
|
|
755
|
+
return b(t), t;
|
|
756
|
+
const a = Ye({
|
|
757
|
+
userConfig: $t[C] || v.config,
|
|
758
|
+
defaultConfig: t
|
|
759
|
+
}), A = Ye({
|
|
760
|
+
userConfig: v.config,
|
|
761
|
+
defaultConfig: a
|
|
762
|
+
});
|
|
763
|
+
return {
|
|
764
|
+
...A,
|
|
765
|
+
customPalette: A.customPalette.length ? A.customPalette : eo[C] || Te
|
|
766
|
+
};
|
|
767
|
+
}
|
|
768
|
+
const me = M({ x: 0, y: 0 });
|
|
769
|
+
function ce() {
|
|
770
|
+
const t = {
|
|
771
|
+
x: 0,
|
|
772
|
+
y: 0,
|
|
773
|
+
width: Math.max(10, I.value.width),
|
|
774
|
+
height: Math.max(10, I.value.height)
|
|
775
|
+
};
|
|
776
|
+
Et(t), me.value = {
|
|
777
|
+
x: t.x + t.width / 2,
|
|
778
|
+
y: t.y + t.height / 2
|
|
779
|
+
}, ye();
|
|
780
|
+
}
|
|
781
|
+
const xe = st(() => {
|
|
782
|
+
Ve();
|
|
783
|
+
}, 100), fe = M(!1);
|
|
784
|
+
we(() => fe.value, (t) => {
|
|
785
|
+
t === !1 && (te.value = !0, xe(), ce());
|
|
786
|
+
}), we(() => v.config, (t) => {
|
|
787
|
+
e.value = ue(), H.value = !e.value.userOptions.showOnChartHover, We(), w.value += 1, _.value += 1, O.value.showTable = e.value.table.show, O.value.showTooltip = e.value.style.chart.tooltip.show, O.value.showZoom = e.value.style.chart.zoom.show;
|
|
788
|
+
}, { deep: !0 });
|
|
789
|
+
const I = M({
|
|
790
|
+
width: e.value.style.chart.width,
|
|
791
|
+
height: e.value.style.chart.height,
|
|
792
|
+
maxFontSize: e.value.style.chart.words.maxFontSize,
|
|
793
|
+
minFontSize: e.value.style.chart.words.minFontSize,
|
|
794
|
+
bold: e.value.style.chart.words.bold
|
|
795
|
+
}), Me = st(() => {
|
|
796
|
+
const { width: t, height: C } = qt({
|
|
797
|
+
chart: k.value,
|
|
798
|
+
title: e.value.style.chart.title.text ? x.value : null,
|
|
799
|
+
legend: e.value.style.chart.controls.show ? re.value?.$el : null,
|
|
800
|
+
source: h.value
|
|
801
|
+
});
|
|
802
|
+
requestAnimationFrame(async () => {
|
|
803
|
+
I.value.width = Math.max(10, t), I.value.height = Math.max(10, C - 12), await lt(), fe.value = !1;
|
|
804
|
+
});
|
|
805
|
+
}, 100), Ie = () => {
|
|
806
|
+
fe.value = !0, Me();
|
|
807
|
+
}, j = tt(null), Q = tt(null);
|
|
808
|
+
Zt(We);
|
|
809
|
+
const pe = le(() => !!e.value.debug);
|
|
810
|
+
function We() {
|
|
811
|
+
rt(v.dataset) ? it({
|
|
812
|
+
componentName: "VueUiWordCloud",
|
|
813
|
+
type: "dataset",
|
|
814
|
+
debug: pe.value
|
|
815
|
+
}) : R.value.forEach((t, C) => {
|
|
816
|
+
to({
|
|
817
|
+
datasetObject: t,
|
|
818
|
+
requiredAttributes: ["name", "value"]
|
|
819
|
+
}).forEach((a) => {
|
|
820
|
+
u.value = !1, it({
|
|
821
|
+
componentName: "VueUiWordCloud",
|
|
822
|
+
type: "datasetSerieAttribute",
|
|
823
|
+
property: a,
|
|
824
|
+
index: C,
|
|
825
|
+
debug: pe.value
|
|
826
|
+
});
|
|
827
|
+
});
|
|
828
|
+
}), rt(v.dataset) || (oe.value = e.value.loading), e.value.responsive && (j.value && (Q.value && j.value.unobserve(Q.value), j.value.disconnect()), j.value = new ResizeObserver(Ie), Q.value = k.value.parentNode, j.value.observe(Q.value)), ce();
|
|
829
|
+
}
|
|
830
|
+
Vt(() => {
|
|
831
|
+
j.value && (Q.value && j.value.unobserve(Q.value), j.value.disconnect());
|
|
832
|
+
});
|
|
833
|
+
const { isPrinting: Be, isImaging: _e, generatePdf: Ne, generateImage: Ze } = co({
|
|
834
|
+
elementId: `wordCloud_${s.value}`,
|
|
835
|
+
fileName: e.value.style.chart.title.text || "vue-ui-word-cloud",
|
|
836
|
+
options: e.value.userOptions.print
|
|
837
|
+
}), O = M({
|
|
838
|
+
showTable: e.value.table.show,
|
|
839
|
+
showTooltip: e.value.style.chart.tooltip.show,
|
|
840
|
+
showZoom: e.value.style.chart.zoom.show
|
|
841
|
+
});
|
|
842
|
+
we(e, () => {
|
|
843
|
+
O.value.showTable = e.value.table.show, O.value.showTooltip = e.value.style.chart.tooltip.show, O.value.showZoom = e.value.style.chart.zoom.show;
|
|
844
|
+
}, { immediate: !0 });
|
|
845
|
+
function Tt(t, C, a = "Arial") {
|
|
846
|
+
const $ = document.createElement("canvas").getContext("2d");
|
|
847
|
+
return $.font = `${C}px ${e.value.style.chart.words.bold ? "bold" : "normal"} ${a}`, {
|
|
848
|
+
width: $.measureText(t).width + e.value.style.chart.words.proximity,
|
|
849
|
+
height: C
|
|
850
|
+
};
|
|
851
|
+
}
|
|
852
|
+
const q = M([]), ge = /* @__PURE__ */ new Map();
|
|
853
|
+
function Ve() {
|
|
854
|
+
const t = [...R.value].map(($) => $.value), C = Math.max(...t), a = Math.min(...t), A = [...R.value].map(($, T) => {
|
|
855
|
+
let G = ($.value - a) / (C - a) * (I.value.maxFontSize - I.value.minFontSize) + I.value.minFontSize;
|
|
856
|
+
G = isNaN(G) ? I.value.minFontSize : G;
|
|
857
|
+
const de = Tt($.name, G);
|
|
858
|
+
return {
|
|
859
|
+
...$,
|
|
860
|
+
id: $.id ?? `${$.name}__${T}`,
|
|
861
|
+
fontSize: G,
|
|
862
|
+
width: de.width,
|
|
863
|
+
height: de.height,
|
|
864
|
+
color: e.value.style.chart.words.usePalette ? e.value.customPalette[T] || e.value.customPalette[T % e.value.customPalette.length] || Te[T] || Te[T % Te.length] : e.value.style.chart.words.color
|
|
865
|
+
};
|
|
866
|
+
});
|
|
867
|
+
q.value.length = 0, ge.clear(), Do({
|
|
868
|
+
debugTiming: pe.value,
|
|
869
|
+
words: A,
|
|
870
|
+
svg: I.value,
|
|
871
|
+
proximity: e.value.style.chart.words.proximity,
|
|
872
|
+
strictPixelPadding: e.value.strictPixelPadding,
|
|
873
|
+
onProgress: ({ all: $ }) => {
|
|
874
|
+
for (const T of $) {
|
|
875
|
+
const G = T.id;
|
|
876
|
+
let de = ge.get(G);
|
|
877
|
+
if (de === void 0)
|
|
878
|
+
de = q.value.length, ge.set(G, de), q.value.push({ ...T });
|
|
879
|
+
else {
|
|
880
|
+
const ee = q.value[de];
|
|
881
|
+
ee.x = T.x, ee.y = T.y, ee.width = T.width, ee.height = T.height, ee.fontSize = T.fontSize, ee.minX = T.minX, ee.minY = T.minY, ee.maxX = T.maxX, ee.maxY = T.maxY;
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
}), q.value.sort(($, T) => T.fontSize - $.fontSize), ge.clear(), q.value.forEach(($, T) => {
|
|
886
|
+
ge.set($.id, T);
|
|
887
|
+
}), U.value = !0, te.value = !1;
|
|
888
|
+
}
|
|
889
|
+
const Fe = le(() => {
|
|
890
|
+
const t = q.value.map((a) => ({
|
|
891
|
+
name: a.name,
|
|
892
|
+
color: a.color
|
|
893
|
+
})), C = q.value.map((a) => a.value);
|
|
894
|
+
return { head: t, body: C };
|
|
895
|
+
});
|
|
896
|
+
function Oe(t = null) {
|
|
897
|
+
lt(() => {
|
|
898
|
+
const C = Fe.value.head.map(($, T) => [[
|
|
899
|
+
$.name
|
|
900
|
+
], [Fe.value.body[T]]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(C), A = ao(a);
|
|
901
|
+
t ? t(A) : lo({ csvContent: A, title: e.value.style.chart.title.text || "vue-ui-word-cloud" });
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
const Ae = le(() => {
|
|
905
|
+
const t = [
|
|
906
|
+
e.value.table.columnNames.series,
|
|
907
|
+
e.value.table.columnNames.value
|
|
908
|
+
], C = Fe.value.head.map(($, T) => {
|
|
909
|
+
const G = oo({ p: e.value.table.td.prefix, v: Fe.value.body[T], s: e.value.table.td.suffix, r: e.value.table.td.roundingValue });
|
|
910
|
+
return [
|
|
911
|
+
{
|
|
912
|
+
color: $.color,
|
|
913
|
+
name: $.name
|
|
914
|
+
},
|
|
915
|
+
G
|
|
916
|
+
];
|
|
917
|
+
}), a = {
|
|
918
|
+
th: {
|
|
919
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
920
|
+
color: e.value.table.th.color,
|
|
921
|
+
outline: e.value.table.th.outline
|
|
922
|
+
},
|
|
923
|
+
td: {
|
|
924
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
925
|
+
color: e.value.table.td.color,
|
|
926
|
+
outline: e.value.table.td.outline
|
|
927
|
+
},
|
|
928
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
929
|
+
};
|
|
930
|
+
return {
|
|
931
|
+
colNames: [
|
|
932
|
+
e.value.table.columnNames.series,
|
|
933
|
+
e.value.table.columnNames.value
|
|
934
|
+
],
|
|
935
|
+
head: t,
|
|
936
|
+
body: C,
|
|
937
|
+
config: a
|
|
938
|
+
};
|
|
939
|
+
}), ne = M(!1);
|
|
940
|
+
function Ue(t) {
|
|
941
|
+
ne.value = t, S.value += 1;
|
|
942
|
+
}
|
|
943
|
+
function Mt() {
|
|
944
|
+
return q.value;
|
|
945
|
+
}
|
|
946
|
+
function Le() {
|
|
947
|
+
O.value.showTable = !O.value.showTable;
|
|
948
|
+
}
|
|
949
|
+
function He() {
|
|
950
|
+
O.value.showTooltip = !O.value.showTooltip;
|
|
951
|
+
}
|
|
952
|
+
const be = M(!1);
|
|
953
|
+
function Ee() {
|
|
954
|
+
be.value = !be.value;
|
|
955
|
+
}
|
|
956
|
+
function je() {
|
|
957
|
+
O.value.showZoom = !O.value.showZoom;
|
|
958
|
+
}
|
|
959
|
+
const It = le(() => !be.value && O.value.showZoom), { viewBox: Se, resetZoom: ye, isZoom: Ot, setInitialViewBox: Et, zoomByFactor: qe, scale: Ge } = bo(Y, {
|
|
960
|
+
x: 0,
|
|
961
|
+
y: 0,
|
|
962
|
+
width: I.value.width <= 0 ? 10 : I.value.width,
|
|
963
|
+
height: I.value.height <= 0 ? 10 : I.value.height
|
|
964
|
+
}, 1, It);
|
|
965
|
+
we(() => v.dataset, () => {
|
|
966
|
+
R.value = L(), e.value.responsive || (Ve(), ce());
|
|
967
|
+
}, { immediate: !0 });
|
|
968
|
+
async function zt({ scale: t = 2 } = {}) {
|
|
969
|
+
if (!k.value) return;
|
|
970
|
+
const { width: C, height: a } = k.value.getBoundingClientRect(), A = C / a, { imageUri: $, base64: T } = await po({ domElement: k.value, base64: !0, img: !0, scale: t });
|
|
971
|
+
return {
|
|
972
|
+
imageUri: $,
|
|
973
|
+
base64: T,
|
|
974
|
+
title: e.value.style.chart.title.text,
|
|
975
|
+
width: C,
|
|
976
|
+
height: a,
|
|
977
|
+
aspectRatio: A
|
|
978
|
+
};
|
|
979
|
+
}
|
|
980
|
+
const Ce = le(() => {
|
|
981
|
+
const t = e.value.table.useDialog && !e.value.table.show, C = O.value.showTable;
|
|
982
|
+
return {
|
|
983
|
+
component: t ? f : i,
|
|
984
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
985
|
+
props: t ? {
|
|
986
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
987
|
+
color: e.value.table.th.color,
|
|
988
|
+
headerColor: e.value.table.th.color,
|
|
989
|
+
headerBg: e.value.table.th.backgroundColor,
|
|
990
|
+
isFullscreen: ne.value,
|
|
991
|
+
fullscreenParent: k.value,
|
|
992
|
+
forcedWidth: Math.min(500, window.innerWidth * 0.8)
|
|
993
|
+
} : {
|
|
994
|
+
hideDetails: !0,
|
|
995
|
+
config: {
|
|
996
|
+
open: C,
|
|
997
|
+
maxHeight: 1e4,
|
|
998
|
+
body: {
|
|
999
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1000
|
+
color: e.value.style.chart.color
|
|
1001
|
+
},
|
|
1002
|
+
head: {
|
|
1003
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1004
|
+
color: e.value.style.chart.color
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
};
|
|
1009
|
+
});
|
|
1010
|
+
we(() => O.value.showTable, (t) => {
|
|
1011
|
+
e.value.table.show || (t && e.value.table.useDialog && X.value ? X.value.open() : "close" in X.value && X.value.close());
|
|
1012
|
+
});
|
|
1013
|
+
function Je() {
|
|
1014
|
+
O.value.showTable = !1, P.value && P.value.setTableIconState(!1);
|
|
1015
|
+
}
|
|
1016
|
+
const Pt = le(() => e.value.style.chart.backgroundColor), Xt = le(() => e.value.style.chart.title), { exportSvg: Rt, getSvg: Dt } = mo({
|
|
1017
|
+
svg: Y,
|
|
1018
|
+
title: Xt,
|
|
1019
|
+
backgroundColor: Pt
|
|
1020
|
+
});
|
|
1021
|
+
async function Ke({ isCb: t }) {
|
|
1022
|
+
if (t) {
|
|
1023
|
+
const { blob: C, url: a, text: A, dataUrl: $ } = await Dt();
|
|
1024
|
+
e.value.userOptions.callbacks.svg({ blob: C, url: a, text: A, dataUrl: $ });
|
|
1025
|
+
} else
|
|
1026
|
+
Rt();
|
|
1027
|
+
}
|
|
1028
|
+
function Qe() {
|
|
1029
|
+
qe(1.5, !0);
|
|
1030
|
+
}
|
|
1031
|
+
function et() {
|
|
1032
|
+
qe(1 / 1.5, !0);
|
|
1033
|
+
}
|
|
1034
|
+
l({
|
|
1035
|
+
getData: Mt,
|
|
1036
|
+
getImage: zt,
|
|
1037
|
+
generateCsv: Oe,
|
|
1038
|
+
generatePdf: Ne,
|
|
1039
|
+
generateImage: Ze,
|
|
1040
|
+
generateSvg: Ke,
|
|
1041
|
+
resetZoom: ye,
|
|
1042
|
+
toggleTable: Le,
|
|
1043
|
+
toggleTooltip: He,
|
|
1044
|
+
toggleAnnotator: Ee,
|
|
1045
|
+
toggleFullscreen: Ue,
|
|
1046
|
+
toggleZoom: je
|
|
1047
|
+
});
|
|
1048
|
+
const ve = M(null), ke = M(!1), ze = M(""), Pe = M(null);
|
|
1049
|
+
function Yt(t, C) {
|
|
1050
|
+
ve.value = null, B.value = !1, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: C });
|
|
1051
|
+
}
|
|
1052
|
+
function Wt(t, C) {
|
|
1053
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: C });
|
|
1054
|
+
}
|
|
1055
|
+
function Bt(t, C) {
|
|
1056
|
+
if (e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: C }), !O.value.showTooltip) return;
|
|
1057
|
+
ve.value = t.id, Pe.value = { datapoint: t, config: e.value };
|
|
1058
|
+
const a = e.value.style.chart.tooltip.customFormat;
|
|
1059
|
+
if (ke.value = !1, so(a))
|
|
1060
|
+
try {
|
|
1061
|
+
const A = a({
|
|
1062
|
+
datapoint: t,
|
|
1063
|
+
config: e.value
|
|
1064
|
+
});
|
|
1065
|
+
typeof A == "string" && (ze.value = A, ke.value = !0);
|
|
1066
|
+
} catch {
|
|
1067
|
+
console.warn("Custom format cannot be applied."), ke.value = !1;
|
|
1068
|
+
}
|
|
1069
|
+
if (!ke.value) {
|
|
1070
|
+
let A = `<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>`;
|
|
1071
|
+
ze.value = `<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${A}</div>`;
|
|
1072
|
+
}
|
|
1073
|
+
B.value = !0;
|
|
1074
|
+
}
|
|
1075
|
+
return (t, C) => (W(), J("div", {
|
|
1076
|
+
class: "vue-data-ui-component vue-ui-word-cloud",
|
|
1077
|
+
ref_key: "wordCloudChart",
|
|
1078
|
+
ref: k,
|
|
1079
|
+
id: `wordCloud_${s.value}`,
|
|
1080
|
+
"data-resizing": fe.value,
|
|
1081
|
+
"data-relayout": te.value,
|
|
1082
|
+
style: Xe(`width: 100%; font-family:${e.value.style.fontFamily};background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`),
|
|
1083
|
+
onMouseenter: C[3] || (C[3] = () => F(he)(!0)),
|
|
1084
|
+
onMouseleave: C[4] || (C[4] = () => F(he)(!1))
|
|
1085
|
+
}, [
|
|
1086
|
+
e.value.userOptions.buttons.annotator ? (W(), se(F(r), {
|
|
1087
|
+
key: 0,
|
|
1088
|
+
svgRef: F(Y),
|
|
1089
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1090
|
+
color: e.value.style.chart.color,
|
|
1091
|
+
active: be.value,
|
|
1092
|
+
onClose: Ee
|
|
1093
|
+
}, {
|
|
1094
|
+
"annotator-action-close": E(() => [
|
|
1095
|
+
z(t.$slots, "annotator-action-close", {}, void 0, !0)
|
|
1096
|
+
]),
|
|
1097
|
+
"annotator-action-color": E(({ color: a }) => [
|
|
1098
|
+
z(t.$slots, "annotator-action-color", Z(V({ color: a })), void 0, !0)
|
|
1099
|
+
]),
|
|
1100
|
+
"annotator-action-draw": E(({ mode: a }) => [
|
|
1101
|
+
z(t.$slots, "annotator-action-draw", Z(V({ mode: a })), void 0, !0)
|
|
1102
|
+
]),
|
|
1103
|
+
"annotator-action-undo": E(({ disabled: a }) => [
|
|
1104
|
+
z(t.$slots, "annotator-action-undo", Z(V({ disabled: a })), void 0, !0)
|
|
1105
|
+
]),
|
|
1106
|
+
"annotator-action-redo": E(({ disabled: a }) => [
|
|
1107
|
+
z(t.$slots, "annotator-action-redo", Z(V({ disabled: a })), void 0, !0)
|
|
1108
|
+
]),
|
|
1109
|
+
"annotator-action-delete": E(({ disabled: a }) => [
|
|
1110
|
+
z(t.$slots, "annotator-action-delete", Z(V({ disabled: a })), void 0, !0)
|
|
1111
|
+
]),
|
|
1112
|
+
_: 3
|
|
1113
|
+
}, 8, ["svgRef", "backgroundColor", "color", "active"])) : N("", !0),
|
|
1114
|
+
e.value.style.chart.title.text ? (W(), J("div", {
|
|
1115
|
+
key: 1,
|
|
1116
|
+
ref_key: "chartTitle",
|
|
1117
|
+
ref: x,
|
|
1118
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
1119
|
+
}, [
|
|
1120
|
+
(W(), se(go, {
|
|
1121
|
+
key: `title_${w.value}`,
|
|
1122
|
+
config: {
|
|
1123
|
+
title: {
|
|
1124
|
+
...e.value.style.chart.title
|
|
1125
|
+
},
|
|
1126
|
+
subtitle: {
|
|
1127
|
+
...e.value.style.chart.title.subtitle
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
}, null, 8, ["config"]))
|
|
1131
|
+
], 512)) : N("", !0),
|
|
1132
|
+
e.value.userOptions.show && u.value && (F(D) || F(H)) ? (W(), se(F(n), {
|
|
1133
|
+
ref_key: "userOptionsRef",
|
|
1134
|
+
ref: P,
|
|
1135
|
+
key: `user_option_${S.value}`,
|
|
1136
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1137
|
+
color: e.value.style.chart.color,
|
|
1138
|
+
isPrinting: F(Be),
|
|
1139
|
+
isImaging: F(_e),
|
|
1140
|
+
uid: s.value,
|
|
1141
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
1142
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
1143
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
1144
|
+
hasSvg: e.value.userOptions.buttons.svg,
|
|
1145
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
1146
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
1147
|
+
isFullscreen: ne.value,
|
|
1148
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
1149
|
+
chartElement: k.value,
|
|
1150
|
+
position: e.value.userOptions.position,
|
|
1151
|
+
hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
|
|
1152
|
+
isTooltip: O.value.showTooltip,
|
|
1153
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
1154
|
+
isAnnotation: be.value,
|
|
1155
|
+
callbacks: e.value.userOptions.callbacks,
|
|
1156
|
+
printScale: e.value.userOptions.print.scale,
|
|
1157
|
+
tableDialog: e.value.table.useDialog,
|
|
1158
|
+
hasZoom: e.value.userOptions.buttons.zoom,
|
|
1159
|
+
isZoom: O.value.showZoom,
|
|
1160
|
+
onToggleFullscreen: Ue,
|
|
1161
|
+
onGeneratePdf: F(Ne),
|
|
1162
|
+
onGenerateCsv: Oe,
|
|
1163
|
+
onGenerateImage: F(Ze),
|
|
1164
|
+
onGenerateSvg: Ke,
|
|
1165
|
+
onToggleTable: Le,
|
|
1166
|
+
onToggleTooltip: He,
|
|
1167
|
+
onToggleAnnotator: Ee,
|
|
1168
|
+
onToggleZoom: je,
|
|
1169
|
+
style: Xe({
|
|
1170
|
+
visibility: F(D) ? F(H) ? "visible" : "hidden" : "visible"
|
|
1171
|
+
})
|
|
1172
|
+
}, ot({ _: 2 }, [
|
|
1173
|
+
t.$slots.menuIcon ? {
|
|
1174
|
+
name: "menuIcon",
|
|
1175
|
+
fn: E(({ isOpen: a, color: A }) => [
|
|
1176
|
+
z(t.$slots, "menuIcon", Z(V({ isOpen: a, color: A })), void 0, !0)
|
|
1177
|
+
]),
|
|
1178
|
+
key: "0"
|
|
1179
|
+
} : void 0,
|
|
1180
|
+
t.$slots.optionPdf ? {
|
|
1181
|
+
name: "optionPdf",
|
|
1182
|
+
fn: E(() => [
|
|
1183
|
+
z(t.$slots, "optionPdf", {}, void 0, !0)
|
|
1184
|
+
]),
|
|
1185
|
+
key: "1"
|
|
1186
|
+
} : void 0,
|
|
1187
|
+
t.$slots.optionCsv ? {
|
|
1188
|
+
name: "optionCsv",
|
|
1189
|
+
fn: E(() => [
|
|
1190
|
+
z(t.$slots, "optionCsv", {}, void 0, !0)
|
|
1191
|
+
]),
|
|
1192
|
+
key: "2"
|
|
1193
|
+
} : void 0,
|
|
1194
|
+
t.$slots.optionImg ? {
|
|
1195
|
+
name: "optionImg",
|
|
1196
|
+
fn: E(() => [
|
|
1197
|
+
z(t.$slots, "optionImg", {}, void 0, !0)
|
|
1198
|
+
]),
|
|
1199
|
+
key: "3"
|
|
1200
|
+
} : void 0,
|
|
1201
|
+
t.$slots.optionSvg ? {
|
|
1202
|
+
name: "optionSvg",
|
|
1203
|
+
fn: E(() => [
|
|
1204
|
+
z(t.$slots, "optionSvg", {}, void 0, !0)
|
|
1205
|
+
]),
|
|
1206
|
+
key: "4"
|
|
1207
|
+
} : void 0,
|
|
1208
|
+
t.$slots.optionTable ? {
|
|
1209
|
+
name: "optionTable",
|
|
1210
|
+
fn: E(() => [
|
|
1211
|
+
z(t.$slots, "optionTable", {}, void 0, !0)
|
|
1212
|
+
]),
|
|
1213
|
+
key: "5"
|
|
1214
|
+
} : void 0,
|
|
1215
|
+
t.$slots.optionFullscreen ? {
|
|
1216
|
+
name: "optionFullscreen",
|
|
1217
|
+
fn: E(({ toggleFullscreen: a, isFullscreen: A }) => [
|
|
1218
|
+
z(t.$slots, "optionFullscreen", Z(V({ toggleFullscreen: a, isFullscreen: A })), void 0, !0)
|
|
1219
|
+
]),
|
|
1220
|
+
key: "6"
|
|
1221
|
+
} : void 0,
|
|
1222
|
+
t.$slots.optionAnnotator ? {
|
|
1223
|
+
name: "optionAnnotator",
|
|
1224
|
+
fn: E(({ toggleAnnotator: a, isAnnotator: A }) => [
|
|
1225
|
+
z(t.$slots, "optionAnnotator", Z(V({ toggleAnnotator: a, isAnnotator: A })), void 0, !0)
|
|
1226
|
+
]),
|
|
1227
|
+
key: "7"
|
|
1228
|
+
} : void 0,
|
|
1229
|
+
t.$slots.optionZoom ? {
|
|
1230
|
+
name: "optionZoom",
|
|
1231
|
+
fn: E(({ toggleZoom: a, isZoomLocked: A }) => [
|
|
1232
|
+
z(t.$slots, "optionZoom", Z(V({ toggleZoom: a, isZoomLocked: A })), void 0, !0)
|
|
1233
|
+
]),
|
|
1234
|
+
key: "8"
|
|
1235
|
+
} : void 0
|
|
1236
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasSvg", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasTooltip", "isTooltip", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "hasZoom", "isZoom", "onGeneratePdf", "onGenerateImage", "style"])) : N("", !0),
|
|
1237
|
+
e.value.style.chart.controls.position === "top" && e.value.style.chart.controls.show && !F(ie) ? (W(), se(ut, {
|
|
1238
|
+
key: 3,
|
|
1239
|
+
ref_key: "zoomControls",
|
|
1240
|
+
ref: re,
|
|
1241
|
+
config: e.value,
|
|
1242
|
+
scale: F(Ge),
|
|
1243
|
+
isFullscreen: ne.value,
|
|
1244
|
+
onZoomIn: Qe,
|
|
1245
|
+
onZoomOut: et,
|
|
1246
|
+
onResetZoom: C[0] || (C[0] = (a) => F(ye)(!0))
|
|
1247
|
+
}, null, 8, ["config", "scale", "isFullscreen"])) : N("", !0),
|
|
1248
|
+
(W(), J("svg", {
|
|
1249
|
+
ref_key: "svgRef",
|
|
1250
|
+
ref: Y,
|
|
1251
|
+
class: nt({ "vue-data-ui-fullscreen--on": ne.value, "vue-data-ui-fulscreen--off": !ne.value }),
|
|
1252
|
+
xmlns: F(no),
|
|
1253
|
+
viewBox: `${F(Se).x} ${F(Se).y} ${F(Se).width} ${F(Se).height}`,
|
|
1254
|
+
style: "overflow:hidden;background:transparent;display:block"
|
|
1255
|
+
}, [
|
|
1256
|
+
Re(F(p)),
|
|
1257
|
+
t.$slots["chart-background"] ? (W(), J("foreignObject", {
|
|
1258
|
+
key: 0,
|
|
1259
|
+
x: 0,
|
|
1260
|
+
y: 0,
|
|
1261
|
+
width: I.value.width <= 0 ? 10 : I.value.width,
|
|
1262
|
+
height: I.value.height <= 0 ? 10 : I.value.height,
|
|
1263
|
+
style: {
|
|
1264
|
+
pointerEvents: "none"
|
|
1265
|
+
}
|
|
1266
|
+
}, [
|
|
1267
|
+
z(t.$slots, "chart-background", {}, void 0, !0)
|
|
1268
|
+
], 8, Bo)) : N("", !0),
|
|
1269
|
+
$e("g", {
|
|
1270
|
+
transform: `translate(${me.value.x}, ${me.value.y})`,
|
|
1271
|
+
class: nt({ "wc-finalized": U.value })
|
|
1272
|
+
}, [
|
|
1273
|
+
(W(!0), J(Ut, null, Lt(q.value, (a, A) => (W(), J("g", {
|
|
1274
|
+
key: a.id,
|
|
1275
|
+
class: "vue-ui-word-cloud-word",
|
|
1276
|
+
transform: `translate(${a.x}, ${a.y})`
|
|
1277
|
+
}, [
|
|
1278
|
+
a.minX !== void 0 ? (W(), J("rect", {
|
|
1279
|
+
key: 0,
|
|
1280
|
+
x: a.minX,
|
|
1281
|
+
y: a.minY * 1.25,
|
|
1282
|
+
width: a.maxX - a.minX,
|
|
1283
|
+
height: a.maxY - a.minY,
|
|
1284
|
+
fill: "transparent",
|
|
1285
|
+
"pointer-events": "visiblePainted",
|
|
1286
|
+
onMouseover: ($) => Bt(a, A),
|
|
1287
|
+
onMouseleave: ($) => Yt(a, A),
|
|
1288
|
+
onClick: ($) => Wt(a, A)
|
|
1289
|
+
}, null, 40, Zo)) : N("", !0),
|
|
1290
|
+
$e("text", {
|
|
1291
|
+
fill: a.color,
|
|
1292
|
+
"font-weight": e.value.style.chart.words.bold ? "bold" : "normal",
|
|
1293
|
+
x: 0,
|
|
1294
|
+
y: 0,
|
|
1295
|
+
"font-size": a.fontSize,
|
|
1296
|
+
transform: `translate(${a.width / 2}, ${a.height / 2})`,
|
|
1297
|
+
"text-anchor": "middle",
|
|
1298
|
+
"dominant-baseline": "central",
|
|
1299
|
+
"paint-order": "stroke fill",
|
|
1300
|
+
stroke: !ve.value || ve.value === a.id ? e.value.style.chart.words.selectedStroke : void 0,
|
|
1301
|
+
"stroke-width": a.height * 0.05,
|
|
1302
|
+
"stroke-linecap": "round",
|
|
1303
|
+
"stroke-linejoin": "round",
|
|
1304
|
+
style: Xe(`
|
|
1305
|
+
pointer-events:none;
|
|
1306
|
+
fill-opacity:${!ve.value || ve.value === a.id || !U.value ? 1 : e.value.style.chart.words.hoverOpacity} !important;
|
|
1307
|
+
`)
|
|
1308
|
+
}, De(a.name), 13, Vo)
|
|
1309
|
+
], 8, No))), 128))
|
|
1310
|
+
], 10, _o),
|
|
1311
|
+
z(t.$slots, "svg", {
|
|
1312
|
+
svg: { height: I.value.height, width: I.value.width }
|
|
1313
|
+
}, void 0, !0)
|
|
1314
|
+
], 10, Wo)),
|
|
1315
|
+
t.$slots.watermark ? (W(), J("div", Uo, [
|
|
1316
|
+
z(t.$slots, "watermark", Z(V({ isPrinting: F(Be) || F(_e) })), void 0, !0)
|
|
1317
|
+
])) : N("", !0),
|
|
1318
|
+
F(Ot) ? (W(), J("div", Lo, [
|
|
1319
|
+
z(t.$slots, "reset-action", { reset: F(ye) }, void 0, !0)
|
|
1320
|
+
])) : N("", !0),
|
|
1321
|
+
e.value.style.chart.controls.position === "bottom" && e.value.style.chart.controls.show && !F(ie) ? (W(), se(ut, {
|
|
1322
|
+
key: 6,
|
|
1323
|
+
ref_key: "zoomControls",
|
|
1324
|
+
ref: re,
|
|
1325
|
+
config: e.value,
|
|
1326
|
+
scale: F(Ge),
|
|
1327
|
+
isFullscreen: ne.value,
|
|
1328
|
+
onZoomIn: Qe,
|
|
1329
|
+
onZoomOut: et,
|
|
1330
|
+
onResetZoom: C[1] || (C[1] = (a) => F(ye)(!0))
|
|
1331
|
+
}, null, 8, ["config", "scale", "isFullscreen"])) : N("", !0),
|
|
1332
|
+
Re(F(m), {
|
|
1333
|
+
show: O.value.showTooltip && B.value,
|
|
1334
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
1335
|
+
color: e.value.style.chart.tooltip.color,
|
|
1336
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
1337
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
1338
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
1339
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
1340
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
1341
|
+
position: e.value.style.chart.tooltip.position,
|
|
1342
|
+
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
1343
|
+
parent: k.value,
|
|
1344
|
+
content: ze.value,
|
|
1345
|
+
isCustom: ke.value,
|
|
1346
|
+
isFullscreen: ne.value,
|
|
1347
|
+
smooth: e.value.style.chart.tooltip.smooth,
|
|
1348
|
+
backdropFilter: e.value.style.chart.tooltip.backdropFilter,
|
|
1349
|
+
smoothForce: e.value.style.chart.tooltip.smoothForce,
|
|
1350
|
+
smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold
|
|
1351
|
+
}, {
|
|
1352
|
+
"tooltip-before": E(() => [
|
|
1353
|
+
z(t.$slots, "tooltip-before", Z(V({ ...Pe.value })), void 0, !0)
|
|
1354
|
+
]),
|
|
1355
|
+
"tooltip-after": E(() => [
|
|
1356
|
+
z(t.$slots, "tooltip-after", Z(V({ ...Pe.value })), void 0, !0)
|
|
1357
|
+
]),
|
|
1358
|
+
_: 3
|
|
1359
|
+
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
|
|
1360
|
+
t.$slots.source ? (W(), J("div", {
|
|
1361
|
+
key: 7,
|
|
1362
|
+
ref_key: "source",
|
|
1363
|
+
ref: h,
|
|
1364
|
+
dir: "auto"
|
|
1365
|
+
}, [
|
|
1366
|
+
z(t.$slots, "source", {}, void 0, !0)
|
|
1367
|
+
], 512)) : N("", !0),
|
|
1368
|
+
u.value && e.value.userOptions.buttons.table ? (W(), se(Ht(Ce.value.component), jt({ key: 8 }, Ce.value.props, {
|
|
1369
|
+
ref_key: "tableUnit",
|
|
1370
|
+
ref: X,
|
|
1371
|
+
onClose: Je
|
|
1372
|
+
}), ot({
|
|
1373
|
+
content: E(() => [
|
|
1374
|
+
(W(), se(F(d), {
|
|
1375
|
+
key: `table_${_.value}`,
|
|
1376
|
+
colNames: Ae.value.colNames,
|
|
1377
|
+
head: Ae.value.head,
|
|
1378
|
+
body: Ae.value.body,
|
|
1379
|
+
config: Ae.value.config,
|
|
1380
|
+
title: e.value.table.useDialog ? "" : Ce.value.title,
|
|
1381
|
+
withCloseButton: !e.value.table.useDialog,
|
|
1382
|
+
onClose: Je
|
|
1383
|
+
}, {
|
|
1384
|
+
th: E(({ th: a }) => [
|
|
1385
|
+
$e("div", {
|
|
1386
|
+
innerHTML: a,
|
|
1387
|
+
style: { display: "flex", "align-items": "center" }
|
|
1388
|
+
}, null, 8, Ho)
|
|
1389
|
+
]),
|
|
1390
|
+
td: E(({ td: a }) => [
|
|
1391
|
+
at(De(a.name || a), 1)
|
|
1392
|
+
]),
|
|
1393
|
+
_: 1
|
|
1394
|
+
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
|
|
1395
|
+
]),
|
|
1396
|
+
_: 2
|
|
1397
|
+
}, [
|
|
1398
|
+
e.value.table.useDialog ? {
|
|
1399
|
+
name: "title",
|
|
1400
|
+
fn: E(() => [
|
|
1401
|
+
at(De(Ce.value.title), 1)
|
|
1402
|
+
]),
|
|
1403
|
+
key: "0"
|
|
1404
|
+
} : void 0,
|
|
1405
|
+
e.value.table.useDialog ? {
|
|
1406
|
+
name: "actions",
|
|
1407
|
+
fn: E(() => [
|
|
1408
|
+
$e("button", {
|
|
1409
|
+
tabindex: "0",
|
|
1410
|
+
class: "vue-ui-user-options-button",
|
|
1411
|
+
onClick: C[2] || (C[2] = (a) => Oe(e.value.userOptions.callbacks.csv))
|
|
1412
|
+
}, [
|
|
1413
|
+
Re(F(c), {
|
|
1414
|
+
name: "excel",
|
|
1415
|
+
stroke: Ce.value.props.color
|
|
1416
|
+
}, null, 8, ["stroke"])
|
|
1417
|
+
])
|
|
1418
|
+
]),
|
|
1419
|
+
key: "1"
|
|
1420
|
+
} : void 0
|
|
1421
|
+
]), 1040)) : N("", !0),
|
|
1422
|
+
F(ie) ? (W(), se(uo, { key: 9 })) : N("", !0)
|
|
1423
|
+
], 44, Yo));
|
|
1424
|
+
}
|
|
1425
|
+
}, qo = /* @__PURE__ */ yo(jo, [["__scopeId", "data-v-04648100"]]), fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1426
|
+
__proto__: null,
|
|
1427
|
+
default: qo
|
|
1428
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1429
|
+
export {
|
|
1430
|
+
mn as a,
|
|
1431
|
+
fn as b,
|
|
1432
|
+
qo as v
|
|
1433
|
+
};
|