vue-data-ui 3.2.8 → 3.3.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/dist/{Arrow-Bb0bGghy.js → Arrow-CKLBHe3L.js} +1 -1
- package/dist/{BaseDraggableDialog-CHhZIht2.js → BaseDraggableDialog-q3pgSDTz.js} +2 -2
- package/dist/{BaseIcon-Bz-1GQhu.js → BaseIcon-CtqN7W_g.js} +4 -3
- package/dist/{ColorPicker-B-WUqMoV.js → ColorPicker-Cr6rUDTP.js} +2 -2
- package/dist/{DataTable-BvjacRbw.js → DataTable-BeI6gYJX.js} +2 -2
- package/dist/{Legend-BpoFJ8fc.js → Legend-DsogCeTb.js} +2 -2
- package/dist/{NonSvgPenAndPaper-l9giyY1Z.js → NonSvgPenAndPaper-BDK_ucTG.js} +3 -3
- package/dist/{PackageVersion-C40g0Rfc.js → PackageVersion-C9oklnuy.js} +1 -1
- package/dist/{PenAndPaper-CR8q353D.js → PenAndPaper-BxbYiPy4.js} +3 -3
- package/dist/{Shape-C_C_OmqR.js → Shape-DJG2zW7b.js} +1 -1
- package/dist/{Slicer-BA2GhOmY.js → Slicer-D6T4aUhr.js} +2 -2
- package/dist/{SparkTooltip-Dz1PDE_h.js → SparkTooltip-Cp0G9giW.js} +1 -1
- package/dist/{Title-DG2nloSB.js → Title-D17CJXko.js} +1 -1
- package/dist/{Tooltip-BOXz8skU.js → Tooltip-CtVdvbZi.js} +1 -1
- package/dist/{UserOptions-DsTgvAok.js → UserOptions-B3vCIe-u.js} +168 -126
- package/dist/components/arrow.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-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-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-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/{dom-to-png-BgvOdfyW.js → dom-to-png-BiyqJA3t.js} +1 -1
- package/dist/{img-DjWwQXVS.js → img-6wPuVVtk.js} +1 -1
- package/dist/{lib-BEpWEyMm.js → lib-GIYcnm0E.js} +110 -96
- package/dist/{pdf-YD0ShN36.js → pdf-DjbHsnrb.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +8 -1
- package/dist/{useAutoSizeLabelsInsideViewbox-BVJkib7z.js → useAutoSizeLabelsInsideViewbox-Csv3pVmh.js} +1 -1
- package/dist/{useNestedProp-BOk-tPdu.js → useNestedProp-mxyyqd0B.js} +291 -246
- package/dist/{usePrinter-w23K-ezx.js → usePrinter-DYRFiw7X.js} +2 -2
- package/dist/useSvgExport-B7-Vrjtu.js +732 -0
- package/dist/vue-data-ui-DLU1snC3.js +326 -0
- package/dist/vue-data-ui.js +68 -68
- package/dist/{vue-ui-3d-bar-Cf7zHemQ.js → vue-ui-3d-bar-D6xoBrN6.js} +358 -342
- package/dist/{vue-ui-accordion-CDIzGCG1.js → vue-ui-accordion-Dch9YrCi.js} +3 -3
- package/dist/{vue-ui-age-pyramid-T09D0LHr.js → vue-ui-age-pyramid-D74mAaLA.js} +228 -212
- package/dist/{vue-ui-annotator-3bUg-1Zy.js → vue-ui-annotator-DwRwhrgB.js} +7 -7
- package/dist/{vue-ui-bullet-DKgdFa2v.js → vue-ui-bullet-D2qVUqWs.js} +197 -179
- package/dist/{vue-ui-candlestick-g6PO_L_7.js → vue-ui-candlestick-C81k1_f9.js} +278 -262
- package/dist/{vue-ui-carousel-table-Ch2xooE8.js → vue-ui-carousel-table-DBIhnEj-.js} +4 -4
- package/dist/{vue-ui-chestnut-B-nzp0b6.js → vue-ui-chestnut-CSM-_IWw.js} +425 -379
- package/dist/{vue-ui-chord-BqS8DoTd.js → vue-ui-chord-BFW9nnNh.js} +317 -299
- package/dist/{vue-ui-circle-pack-B1axDP9l.js → vue-ui-circle-pack-D6mTG5i0.js} +249 -233
- package/dist/{vue-ui-cursor-Detis-4Y.js → vue-ui-cursor-BJmTAMpP.js} +2 -2
- package/dist/{vue-ui-dashboard-TXcw45j_.js → vue-ui-dashboard-BdFLsK4u.js} +67 -67
- package/dist/{vue-ui-digits-pW7YVqxy.js → vue-ui-digits-DXum1rs6.js} +2 -2
- package/dist/{vue-ui-donut-BFpWEe2s.js → vue-ui-donut-CqefukGp.js} +662 -645
- package/dist/{vue-ui-donut-evolution-BoVslTri.js → vue-ui-donut-evolution-DFIbK50s.js} +406 -384
- package/dist/{vue-ui-dumbbell-CRHvtmq9.js → vue-ui-dumbbell-DIo2ecGY.js} +295 -274
- package/dist/vue-ui-flow--kiGWaq4.js +931 -0
- package/dist/{vue-ui-funnel-CKUlzitM.js → vue-ui-funnel-B8UHwj15.js} +174 -158
- package/dist/{vue-ui-galaxy-DZqCAK9c.js → vue-ui-galaxy-eQZh_y3l.js} +265 -252
- package/dist/{vue-ui-gauge-D3bPFF59.js → vue-ui-gauge-DJ-E6L2T.js} +256 -240
- package/dist/{vue-ui-gizmo-oVLp367W.js → vue-ui-gizmo-DFxlqPz7.js} +3 -3
- package/dist/{vue-ui-heatmap-C1RctcPx.js → vue-ui-heatmap-CcAe5dDN.js} +393 -372
- package/dist/{vue-ui-history-plot-CoQYOlF4.js → vue-ui-history-plot-CgKvd7Jx.js} +307 -289
- package/dist/{vue-ui-kpi-BZX-tqIm.js → vue-ui-kpi-Ct2iyD49.js} +3 -3
- package/dist/{vue-ui-mini-loader-hMqB-KQI.js → vue-ui-mini-loader-ByjcvXBB.js} +2 -2
- package/dist/{vue-ui-molecule-D0Kr_w-v.js → vue-ui-molecule-CGDBEAkX.js} +176 -160
- package/dist/vue-ui-mood-radar-D9GuK4cI.js +876 -0
- package/dist/{vue-ui-nested-donuts-94Gu95Z9.js → vue-ui-nested-donuts-CGKgOTX2.js} +541 -518
- package/dist/{vue-ui-onion-Dy_aTvGI.js → vue-ui-onion-C5tE1Woz.js} +318 -289
- package/dist/{vue-ui-parallel-coordinate-plot-D_oo5lQW.js → vue-ui-parallel-coordinate-plot-CVhD6IoH.js} +252 -233
- package/dist/{vue-ui-quadrant-CRYpRl_q.js → vue-ui-quadrant-BGDCaOXv.js} +294 -276
- package/dist/{vue-ui-quick-chart-B1s047tz.js → vue-ui-quick-chart-CjXSB-2S.js} +723 -685
- package/dist/{vue-ui-radar-DA7EuchK.js → vue-ui-radar-rhxkROX7.js} +307 -282
- package/dist/{vue-ui-rating-z2bsnprP.js → vue-ui-rating-Bo9gSy-z.js} +2 -2
- package/dist/{vue-ui-relation-circle-DZ8IiUNu.js → vue-ui-relation-circle-Qo8FKbL2.js} +146 -131
- package/dist/{vue-ui-ridgeline-5IWuJgs6.js → vue-ui-ridgeline-ahOApbEC.js} +320 -299
- package/dist/{vue-ui-rings-gY2f8mVf.js → vue-ui-rings-DFAVaEBs.js} +323 -310
- package/dist/{vue-ui-scatter-OLidvHlx.js → vue-ui-scatter-zjlWyvVd.js} +390 -372
- package/dist/{vue-ui-skeleton-BaysGsg0.js → vue-ui-skeleton-CKfOnyd_.js} +3 -3
- package/dist/{vue-ui-smiley-Dn2IR0oC.js → vue-ui-smiley-CY7UiJ9C.js} +2 -2
- package/dist/{vue-ui-spark-trend-gp5B9uF7.js → vue-ui-spark-trend-DwNYP97M.js} +3 -3
- package/dist/{vue-ui-sparkbar-8t63RYc7.js → vue-ui-sparkbar-BkdcYrmg.js} +3 -3
- package/dist/{vue-ui-sparkgauge-BWSykUpn.js → vue-ui-sparkgauge-C6Kq_OGV.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-BEjxKMG5.js → vue-ui-sparkhistogram-CjB33yXB.js} +4 -4
- package/dist/{vue-ui-sparkline-bFF-ZCCH.js → vue-ui-sparkline-DcH4yIEd.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-HtAlEtzK.js → vue-ui-sparkstackbar-MKr2u_pO.js} +3 -3
- package/dist/{vue-ui-stackbar-CUIWPgfk.js → vue-ui-stackbar-DKV-exfd.js} +355 -337
- package/dist/{vue-ui-strip-plot-DwS52yGc.js → vue-ui-strip-plot-ncTrDlNC.js} +368 -352
- package/dist/{vue-ui-table-BYqPx7k4.js → vue-ui-table-BdT3lGuv.js} +5 -5
- package/dist/{vue-ui-table-heatmap-CRfjUoa1.js → vue-ui-table-heatmap-D929cWB0.js} +5 -5
- package/dist/{vue-ui-table-sparkline-Bvf0ZBOi.js → vue-ui-table-sparkline-CkZ_ygR1.js} +4 -4
- package/dist/{vue-ui-thermometer-BB7cHec0.js → vue-ui-thermometer-CjBLR6H9.js} +148 -133
- package/dist/{vue-ui-timer-BVDKvC4v.js → vue-ui-timer-Bs7eMmiC.js} +5 -5
- package/dist/vue-ui-tiremarks-nGOZKRcz.js +423 -0
- package/dist/{vue-ui-treemap-nGgRTw0l.js → vue-ui-treemap-SQ2f5wbN.js} +403 -373
- package/dist/{vue-ui-vertical-bar-BJOm2JQh.js → vue-ui-vertical-bar-Hh9gAN5j.js} +295 -260
- package/dist/{vue-ui-waffle-aCMPaHbw.js → vue-ui-waffle-C7moVBln.js} +396 -377
- package/dist/{vue-ui-wheel-D_q23eOk.js → vue-ui-wheel-KrGLMCqW.js} +196 -180
- package/dist/{vue-ui-word-cloud-C7TMR4Zq.js → vue-ui-word-cloud-BQSu6kiR.js} +233 -217
- package/dist/{vue-ui-world-DtMYYQ6T.js → vue-ui-world-DdoMFJcV.js} +344 -326
- package/dist/{vue-ui-xy-Dputm9QT.js → vue-ui-xy-B2fjTYMJ.js} +1601 -1707
- package/dist/{vue-ui-xy-canvas-BCeQoXNM.js → vue-ui-xy-canvas-oUXISeU8.js} +10 -10
- package/package.json +1 -1
- package/dist/vue-data-ui-BcRg499t.js +0 -325
- package/dist/vue-ui-flow-CKGjSZoj.js +0 -909
- package/dist/vue-ui-mood-radar-C6UCofDb.js +0 -853
- package/dist/vue-ui-tiremarks-CBVuu_Zi.js +0 -407
|
@@ -1,137 +1,138 @@
|
|
|
1
|
-
import { useCssVars as
|
|
2
|
-
import { d as
|
|
3
|
-
import { c as
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { useCssVars as dt, defineAsyncComponent as j, computed as q, ref as m, toRefs as mt, watch as oe, shallowRef as Ee, onMounted as ht, onBeforeUnmount as pt, createElementBlock as _, openBlock as k, unref as i, normalizeStyle as ye, createBlock as le, createCommentVNode as W, createVNode as we, createSlots as Xe, withCtx as S, renderSlot as F, normalizeProps as ne, guardReactiveProps as se, normalizeClass as Ue, createElementVNode as ke, Fragment as ft, renderList as gt, toDisplayString as Me, resolveDynamicComponent as bt, mergeProps as yt, createTextVNode as Le, nextTick as Ye } from "vue";
|
|
2
|
+
import { d as wt, t as kt, u as Ct } from "./useResponsive-DfdjqQps.js";
|
|
3
|
+
import { c as Ge, t as xt, aj as $t, q as Tt, b as St, p as Ce, o as je, f as qe, g as Ft, d as Mt, X as Pt, x as Ot, y as At, z as It } from "./lib-GIYcnm0E.js";
|
|
4
|
+
import { u as zt, a as He } from "./useNestedProp-mxyyqd0B.js";
|
|
5
|
+
import { u as Dt, B as Nt } from "./BaseScanner-BgWxam9d.js";
|
|
6
|
+
import { u as _t } from "./usePrinter-DYRFiw7X.js";
|
|
7
|
+
import { u as Bt } from "./useSvgExport-B7-Vrjtu.js";
|
|
8
|
+
import { u as Rt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
9
|
+
import { u as Vt } from "./useChartAccessibility-9icAAmYg.js";
|
|
10
|
+
import Wt from "./img-6wPuVVtk.js";
|
|
11
|
+
import Et from "./Title-D17CJXko.js";
|
|
12
|
+
import { t as Xt } from "./themes-Dw-dDudK.js";
|
|
13
|
+
import { u as Ut } from "./usePanZoom-BVca3eMk.js";
|
|
14
|
+
import { _ as Lt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
|
+
function Yt(C, b) {
|
|
16
|
+
const { width: v, height: h } = C, p = b.getImageData(0, 0, v, h).data;
|
|
16
17
|
let l = v, o = h, s = 0, x = 0, M = !1;
|
|
17
18
|
for (let r = 0; r < h; r += 1)
|
|
18
19
|
for (let y = 0; y < v; y += 1)
|
|
19
|
-
|
|
20
|
+
p[(r * v + y) * 4 + 3] > 1 && (M = !0, y < l && (l = y), y > s && (s = y), r < o && (o = r), r > x && (x = r));
|
|
20
21
|
return M ? [l, o, s, x] : [0, 0, 0, 0];
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
+
function Ze({
|
|
23
24
|
word: C,
|
|
24
|
-
fontSize:
|
|
25
|
+
fontSize: b,
|
|
25
26
|
pad: v,
|
|
26
27
|
canvas: h,
|
|
27
28
|
ctx: d,
|
|
28
|
-
svg:
|
|
29
|
+
svg: p
|
|
29
30
|
}) {
|
|
30
|
-
d.save(), d.font = `${
|
|
31
|
-
const l = d.measureText(C.name), o = Math.ceil(l.width) + 2 + (v ? v * 2 : 0), s = Math.ceil(
|
|
32
|
-
h.width = o, h.height = s, d.clearRect(0, 0, o, s), d.font = `${
|
|
31
|
+
d.save(), d.font = `${p.style && p.style.bold ? "bold " : ""}${b}px Arial`;
|
|
32
|
+
const l = d.measureText(C.name), o = Math.ceil(l.width) + 2 + (v ? v * 2 : 0), s = Math.ceil(b) + 2 + (v ? v * 2 : 0);
|
|
33
|
+
h.width = o, h.height = s, d.clearRect(0, 0, o, s), d.font = `${p.style && p.style.bold ? "bold " : ""}${b}px Arial`, d.textAlign = "center", d.textBaseline = "middle", d.fillStyle = "black", d.fillText(C.name, o / 2, s / 2);
|
|
33
34
|
const M = d.getImageData(0, 0, o, s).data, r = [];
|
|
34
35
|
for (let B = 0; B < s; B += 1)
|
|
35
36
|
for (let U = 0; U < o; U += 1)
|
|
36
37
|
M[(B * o + U) * 4 + 3] > 1 && r.push([U, B]);
|
|
37
|
-
const [y,
|
|
38
|
-
return d.restore(), { w: o, h: s, wordMask: r, minX: y, minY:
|
|
38
|
+
const [y, E, X, w] = Yt(h, d);
|
|
39
|
+
return d.restore(), { w: o, h: s, wordMask: r, minX: y, minY: E, maxX: X, maxY: w };
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
-
for (let l = 0; l <
|
|
42
|
-
const o = h +
|
|
43
|
-
if (o < 0 || s < 0 || o >=
|
|
41
|
+
function Je({ mask: C, maskW: b, maskH: v, wx: h, wy: d, wordMask: p }) {
|
|
42
|
+
for (let l = 0; l < p.length; l += 1) {
|
|
43
|
+
const o = h + p[l][0], s = d + p[l][1];
|
|
44
|
+
if (o < 0 || s < 0 || o >= b || s >= v || C[s * b + o]) return !1;
|
|
44
45
|
}
|
|
45
46
|
return !0;
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
-
for (let l = 0; l <
|
|
49
|
-
const o = h +
|
|
50
|
-
o >= 0 && s >= 0 && o <
|
|
48
|
+
function Ke({ mask: C, maskW: b, maskH: v, wx: h, wy: d, wordMask: p }) {
|
|
49
|
+
for (let l = 0; l < p.length; l += 1) {
|
|
50
|
+
const o = h + p[l][0], s = d + p[l][1];
|
|
51
|
+
o >= 0 && s >= 0 && o < b && s < v && (C[s * b + o] = 1);
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
-
const d = new Set(C.map(([l, o]) => `${l},${o}`)),
|
|
54
|
+
function Gt({ wordMask: C, w: b, h: v, dilation: h }) {
|
|
55
|
+
const d = new Set(C.map(([l, o]) => `${l},${o}`)), p = new Set(d);
|
|
55
56
|
for (let [l, o] of C)
|
|
56
57
|
for (let s = -h; s <= h; s += 1)
|
|
57
58
|
for (let x = -h; x <= h; x += 1) {
|
|
58
59
|
if (s === 0 && x === 0) continue;
|
|
59
60
|
const M = l + s, r = o + x;
|
|
60
|
-
M >= 0 && M <
|
|
61
|
+
M >= 0 && M < b && r >= 0 && r < v && p.add(`${M},${r}`);
|
|
61
62
|
}
|
|
62
|
-
return Array.from(
|
|
63
|
+
return Array.from(p).map((l) => l.split(",").map(Number));
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
+
function jt({
|
|
65
66
|
words: C,
|
|
66
|
-
proximity:
|
|
67
|
+
proximity: b = 0,
|
|
67
68
|
svg: v,
|
|
68
69
|
strictPixelPadding: h
|
|
69
70
|
}) {
|
|
70
|
-
const { width: d, height:
|
|
71
|
+
const { width: d, height: p } = v, l = Math.round(d), o = Math.round(p), s = 1, x = v.minFontSize, M = Math.min(v.maxFontSize, 100), r = C.map(($) => $.value), y = Math.min(...r), E = Math.max(...r), X = new Uint8Array(l * o), w = document.createElement("canvas"), B = w.getContext("2d", { willReadFrequently: !0 });
|
|
71
72
|
w.width = l, w.height = o;
|
|
72
|
-
const U = 6, me = 2, he = 2,
|
|
73
|
+
const U = 6, me = 2, he = 2, ue = 1, Y = Math.floor(l / 2), Q = Math.floor(o / 2), e = [...C].sort(($, R) => R.value - $.value), ie = [];
|
|
73
74
|
for (const $ of e) {
|
|
74
75
|
let R = x;
|
|
75
|
-
|
|
76
|
-
let
|
|
77
|
-
for (; !
|
|
78
|
-
let { w:
|
|
76
|
+
E !== y && (R = ($.value - y) / (E - y) * (M - x) + x), R = Math.max(x, Math.min(M, R));
|
|
77
|
+
let O = !1, I = R;
|
|
78
|
+
for (; !O && I >= s; ) {
|
|
79
|
+
let { w: A, h: z, wordMask: V, minX: G, minY: H, maxX: Z, maxY: J } = Ze({
|
|
79
80
|
word: $,
|
|
80
81
|
fontSize: I,
|
|
81
|
-
pad:
|
|
82
|
+
pad: b,
|
|
82
83
|
canvas: w,
|
|
83
84
|
ctx: B,
|
|
84
85
|
svg: v
|
|
85
86
|
});
|
|
86
|
-
h && (V =
|
|
87
|
+
h && (V = Gt({ wordMask: V, w: A, h: z, dilation: 1 }));
|
|
87
88
|
let D = 0, L = 0;
|
|
88
|
-
for (; D < Math.max(l, o) && !
|
|
89
|
-
for (let
|
|
89
|
+
for (; D < Math.max(l, o) && !O && L < 1e4; ) {
|
|
90
|
+
for (let u = 0; u < 360; u += U) {
|
|
90
91
|
L += 1;
|
|
91
|
-
const P = Math.round(Y + D * Math.cos(
|
|
92
|
-
if (!(P < 0 ||
|
|
93
|
-
|
|
92
|
+
const P = Math.round(Y + D * Math.cos(u * Math.PI / 180) - A / 2), f = Math.round(Q + D * Math.sin(u * Math.PI / 180) - z / 2);
|
|
93
|
+
if (!(P < 0 || f < 0 || P + A > l || f + z > o) && Je({ mask: X, maskW: l, maskH: o, wx: P, wy: f, wordMask: V })) {
|
|
94
|
+
ie.push({ ...$, x: P - l / 2, y: f - o / 2, fontSize: I, width: A, height: z, angle: 0, minX: G, minY: H, maxX: Z, maxY: J }), Ke({ mask: X, maskW: l, maskH: o, wx: P, wy: f, wordMask: V }), O = !0;
|
|
94
95
|
break;
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
D += me;
|
|
98
99
|
}
|
|
99
|
-
|
|
100
|
+
O || (I -= 1);
|
|
100
101
|
}
|
|
101
|
-
if (!
|
|
102
|
+
if (!O && I < s) {
|
|
102
103
|
I = s;
|
|
103
|
-
const { w:
|
|
104
|
+
const { w: A, h: z, wordMask: V, minX: G, minY: H, maxX: Z, maxY: J } = Ze({
|
|
104
105
|
word: $,
|
|
105
106
|
fontSize: I,
|
|
106
|
-
pad:
|
|
107
|
+
pad: b,
|
|
107
108
|
canvas: w,
|
|
108
109
|
ctx: B,
|
|
109
110
|
svg: v
|
|
110
111
|
});
|
|
111
112
|
let D = 0, L = 0;
|
|
112
|
-
for (; D < Math.max(l, o) && !
|
|
113
|
-
for (let
|
|
113
|
+
for (; D < Math.max(l, o) && !O && L < 25e3; ) {
|
|
114
|
+
for (let u = 0; u < 360; u += he) {
|
|
114
115
|
L += 1;
|
|
115
|
-
const P = Math.round(Y + D * Math.cos(
|
|
116
|
-
if (!(P < 0 ||
|
|
117
|
-
|
|
116
|
+
const P = Math.round(Y + D * Math.cos(u * Math.PI / 180) - A / 2), f = Math.round(Q + D * Math.sin(u * Math.PI / 180) - z / 2);
|
|
117
|
+
if (!(P < 0 || f < 0 || P + A > l || f + z > o) && Je({ mask: X, maskW: l, maskH: o, wx: P, wy: f, wordMask: V })) {
|
|
118
|
+
ie.push({ ...$, x: P - l / 2, y: f - o / 2, fontSize: I, width: A, height: z, angle: 0, minX: G, minY: H, maxX: Z, maxY: J }), Ke({ mask: X, maskW: l, maskH: o, wx: P, wy: f, wordMask: V }), O = !0;
|
|
118
119
|
break;
|
|
119
120
|
}
|
|
120
121
|
}
|
|
121
|
-
D +=
|
|
122
|
+
D += ue;
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
|
-
return
|
|
126
|
+
return ie.sort(($, R) => R.fontSize - $.fontSize);
|
|
126
127
|
}
|
|
127
|
-
const
|
|
128
|
+
const qt = ["id"], Ht = ["xmlns", "viewBox"], Zt = ["width", "height"], Jt = ["transform"], Kt = ["x", "y", "width", "height", "onMouseover", "onMouseleave", "onClick"], Qt = ["fill", "font-weight", "x", "y", "font-size", "transform"], ea = {
|
|
128
129
|
key: 3,
|
|
129
130
|
class: "vue-data-ui-watermark"
|
|
130
|
-
},
|
|
131
|
+
}, ta = {
|
|
131
132
|
key: 4,
|
|
132
133
|
"data-dom-to-png-ignore": "",
|
|
133
134
|
class: "reset-wrapper"
|
|
134
|
-
},
|
|
135
|
+
}, aa = ["innerHTML"], oa = {
|
|
135
136
|
__name: "vue-ui-word-cloud",
|
|
136
137
|
props: {
|
|
137
138
|
config: {
|
|
@@ -147,21 +148,21 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
147
148
|
}
|
|
148
149
|
}
|
|
149
150
|
},
|
|
150
|
-
setup(C, { expose:
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
setup(C, { expose: b }) {
|
|
152
|
+
dt((t) => ({
|
|
153
|
+
v47a92ace: t.slicerColor
|
|
153
154
|
}));
|
|
154
|
-
const v =
|
|
155
|
+
const v = j(() => import("./Tooltip-CtVdvbZi.js")), h = j(() => import("./BaseIcon-CtqN7W_g.js")), d = j(() => import("./vue-ui-accordion-Dch9YrCi.js")), p = j(() => import("./DataTable-BeI6gYJX.js")), l = j(() => import("./PenAndPaper-BxbYiPy4.js")), o = j(() => import("./UserOptions-B3vCIe-u.js")), s = j(() => import("./PackageVersion-C9oklnuy.js")), x = j(() => import("./BaseDraggableDialog-q3pgSDTz.js")), { vue_ui_word_cloud: M } = zt(), r = C, y = q({
|
|
155
156
|
get() {
|
|
156
157
|
return !!r.dataset && r.dataset.length;
|
|
157
158
|
},
|
|
158
159
|
set(t) {
|
|
159
160
|
return t;
|
|
160
161
|
}
|
|
161
|
-
}),
|
|
162
|
-
...
|
|
162
|
+
}), E = m(Ge()), X = m(0), w = m(null), B = m(null), U = m(null), me = m(0), he = m(0), ue = m(!1), Y = m(null), Q = m(null), e = m(H()), { loading: ie, FINAL_DATASET: $, manualLoading: R } = Dt({
|
|
163
|
+
...mt(r),
|
|
163
164
|
FINAL_CONFIG: e,
|
|
164
|
-
prepareConfig:
|
|
165
|
+
prepareConfig: H,
|
|
165
166
|
skeletonDataset: [
|
|
166
167
|
{ name: "Lorem", value: 6 },
|
|
167
168
|
{ name: "ipsum", value: 3 },
|
|
@@ -212,7 +213,7 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
212
213
|
{ name: "fames", value: 1 },
|
|
213
214
|
{ name: "ante", value: 1 }
|
|
214
215
|
],
|
|
215
|
-
skeletonConfig:
|
|
216
|
+
skeletonConfig: xt({
|
|
216
217
|
defaultConfig: e.value,
|
|
217
218
|
userConfig: {
|
|
218
219
|
userOptions: { show: !1 },
|
|
@@ -232,81 +233,81 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
232
233
|
}
|
|
233
234
|
}
|
|
234
235
|
})
|
|
235
|
-
}),
|
|
236
|
+
}), O = m(I());
|
|
236
237
|
function I() {
|
|
237
|
-
return typeof $.value == "string" ?
|
|
238
|
+
return typeof $.value == "string" ? $t($.value) : $.value.map((t, n) => ({
|
|
238
239
|
...t,
|
|
239
|
-
value:
|
|
240
|
+
value: Tt(t.value)
|
|
240
241
|
}));
|
|
241
242
|
}
|
|
242
243
|
oe(() => r.dataset, () => {
|
|
243
|
-
|
|
244
|
+
O.value = I(), xe(), J();
|
|
244
245
|
});
|
|
245
|
-
const { userOptionsVisible:
|
|
246
|
-
function
|
|
247
|
-
const t =
|
|
246
|
+
const { userOptionsVisible: A, setUserOptionsVisibility: z, keepUserOptionState: V } = Rt({ config: e.value }), { svgRef: G } = Vt({ config: e.value.style.chart.title });
|
|
247
|
+
function H() {
|
|
248
|
+
const t = He({
|
|
248
249
|
userConfig: r.config,
|
|
249
250
|
defaultConfig: M
|
|
250
251
|
});
|
|
251
252
|
return t.theme ? {
|
|
252
|
-
...
|
|
253
|
-
userConfig:
|
|
253
|
+
...He({
|
|
254
|
+
userConfig: Xt.vue_ui_word_cloud[t.theme] || r.config,
|
|
254
255
|
defaultConfig: t
|
|
255
256
|
}),
|
|
256
|
-
customPalette:
|
|
257
|
+
customPalette: St[t.theme] || Ce
|
|
257
258
|
} : t;
|
|
258
259
|
}
|
|
259
|
-
const
|
|
260
|
-
function
|
|
260
|
+
const Z = m({ x: 0, y: 0 });
|
|
261
|
+
function J() {
|
|
261
262
|
const t = {
|
|
262
263
|
x: 0,
|
|
263
264
|
y: 0,
|
|
264
|
-
width: Math.max(10,
|
|
265
|
-
height: Math.max(10,
|
|
265
|
+
width: Math.max(10, u.value.width),
|
|
266
|
+
height: Math.max(10, u.value.height)
|
|
266
267
|
};
|
|
267
|
-
|
|
268
|
+
ot(t), Z.value = {
|
|
268
269
|
x: t.x + t.width / 2,
|
|
269
270
|
y: t.y + t.height / 2
|
|
270
271
|
}, be();
|
|
271
272
|
}
|
|
272
|
-
const D =
|
|
273
|
+
const D = wt(() => {
|
|
273
274
|
xe();
|
|
274
275
|
}, 10), L = m(!1);
|
|
275
276
|
oe(() => L.value, (t) => {
|
|
276
|
-
t === !1 && (D(),
|
|
277
|
+
t === !1 && (D(), J());
|
|
277
278
|
}), oe(() => r.config, (t) => {
|
|
278
|
-
e.value =
|
|
279
|
+
e.value = H(), A.value = !e.value.userOptions.showOnChartHover, Oe(), me.value += 1, he.value += 1, T.value.showTable = e.value.table.show, T.value.showTooltip = e.value.style.chart.tooltip.show;
|
|
279
280
|
}, { deep: !0 });
|
|
280
|
-
const
|
|
281
|
+
const u = m({
|
|
281
282
|
width: e.value.style.chart.width,
|
|
282
283
|
height: e.value.style.chart.height,
|
|
283
284
|
maxFontSize: e.value.style.chart.words.maxFontSize,
|
|
284
285
|
minFontSize: e.value.style.chart.words.minFontSize,
|
|
285
286
|
bold: e.value.style.chart.words.bold
|
|
286
|
-
}), P =
|
|
287
|
+
}), P = kt(() => {
|
|
287
288
|
L.value = !0;
|
|
288
|
-
const { width: t, height: n } =
|
|
289
|
+
const { width: t, height: n } = Ct({
|
|
289
290
|
chart: w.value,
|
|
290
291
|
title: e.value.style.chart.title.text ? B.value : null,
|
|
291
292
|
source: U.value
|
|
292
293
|
});
|
|
293
294
|
requestAnimationFrame(async () => {
|
|
294
|
-
|
|
295
|
+
u.value.width = Math.max(10, t), u.value.height = Math.max(10, n - 12), await Ye(), L.value = !1;
|
|
295
296
|
});
|
|
296
|
-
}),
|
|
297
|
-
|
|
298
|
-
const Pe =
|
|
299
|
-
function
|
|
300
|
-
|
|
297
|
+
}), f = Ee(null), ee = Ee(null);
|
|
298
|
+
ht(Oe);
|
|
299
|
+
const Pe = q(() => !!e.value.debug);
|
|
300
|
+
function Oe() {
|
|
301
|
+
je(r.dataset) ? qe({
|
|
301
302
|
componentName: "VueUiWordCloud",
|
|
302
303
|
type: "dataset",
|
|
303
304
|
debug: Pe.value
|
|
304
|
-
}) :
|
|
305
|
-
|
|
305
|
+
}) : O.value.forEach((t, n) => {
|
|
306
|
+
Ft({
|
|
306
307
|
datasetObject: t,
|
|
307
308
|
requiredAttributes: ["name", "value"]
|
|
308
309
|
}).forEach((a) => {
|
|
309
|
-
y.value = !1,
|
|
310
|
+
y.value = !1, qe({
|
|
310
311
|
componentName: "VueUiWordCloud",
|
|
311
312
|
type: "datasetSerieAttribute",
|
|
312
313
|
property: a,
|
|
@@ -314,13 +315,13 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
314
315
|
debug: Pe.value
|
|
315
316
|
});
|
|
316
317
|
});
|
|
317
|
-
}),
|
|
318
|
+
}), je(r.dataset) || (R.value = e.value.loading), e.value.responsive && (f.value && (ee.value && f.value.unobserve(ee.value), f.value.disconnect()), f.value = new ResizeObserver(P), ee.value = w.value.parentNode, f.value.observe(ee.value)), J();
|
|
318
319
|
}
|
|
319
|
-
|
|
320
|
-
|
|
320
|
+
pt(() => {
|
|
321
|
+
f.value && (ee.value && f.value.unobserve(ee.value), f.value.disconnect());
|
|
321
322
|
});
|
|
322
|
-
const { isPrinting:
|
|
323
|
-
elementId: `wordCloud_${
|
|
323
|
+
const { isPrinting: Ae, isImaging: Ie, generatePdf: ze, generateImage: De } = _t({
|
|
324
|
+
elementId: `wordCloud_${E.value}`,
|
|
324
325
|
fileName: e.value.style.chart.title.text || "vue-ui-word-cloud",
|
|
325
326
|
options: e.value.userOptions.print
|
|
326
327
|
}), T = m({
|
|
@@ -333,37 +334,37 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
333
334
|
showTooltip: e.value.style.chart.tooltip.show
|
|
334
335
|
};
|
|
335
336
|
}, { immediate: !0 });
|
|
336
|
-
function
|
|
337
|
-
const
|
|
338
|
-
return
|
|
339
|
-
width:
|
|
337
|
+
function Qe(t, n, a = "Arial") {
|
|
338
|
+
const g = document.createElement("canvas").getContext("2d");
|
|
339
|
+
return g.font = `${n}px ${e.value.style.chart.words.bold ? "bold" : "normal"} ${a}`, {
|
|
340
|
+
width: g.measureText(t).width + e.value.style.chart.words.proximity,
|
|
340
341
|
height: n
|
|
341
342
|
};
|
|
342
343
|
}
|
|
343
344
|
const re = m([]);
|
|
344
345
|
oe(() => r.dataset, xe, { immediate: !0 });
|
|
345
346
|
function xe() {
|
|
346
|
-
const t = [...
|
|
347
|
-
let
|
|
348
|
-
|
|
349
|
-
const
|
|
347
|
+
const t = [...O.value].map((g) => g.value), n = Math.max(...t), a = Math.min(...t), c = [...O.value].map((g, N) => {
|
|
348
|
+
let K = (g.value - a) / (n - a) * (u.value.maxFontSize - u.value.minFontSize) + u.value.minFontSize;
|
|
349
|
+
K = isNaN(K) ? u.value.minFontSize : K;
|
|
350
|
+
const We = Qe(g.name, K);
|
|
350
351
|
return {
|
|
351
|
-
...
|
|
352
|
-
id:
|
|
353
|
-
fontSize:
|
|
354
|
-
width:
|
|
355
|
-
height:
|
|
352
|
+
...g,
|
|
353
|
+
id: Ge(),
|
|
354
|
+
fontSize: K,
|
|
355
|
+
width: We.width,
|
|
356
|
+
height: We.height,
|
|
356
357
|
color: e.value.style.chart.words.usePalette ? e.value.customPalette[N] || e.value.customPalette[N % e.value.customPalette.length] || Ce[N] || Ce[N % Ce.length] : e.value.style.chart.words.color
|
|
357
358
|
};
|
|
358
359
|
});
|
|
359
|
-
re.value =
|
|
360
|
+
re.value = jt({
|
|
360
361
|
words: c,
|
|
361
|
-
svg:
|
|
362
|
+
svg: u.value,
|
|
362
363
|
proximity: e.value.style.chart.words.proximity,
|
|
363
364
|
strictPixelPadding: e.value.strictPixelPadding
|
|
364
365
|
});
|
|
365
366
|
}
|
|
366
|
-
const
|
|
367
|
+
const pe = q(() => {
|
|
367
368
|
const t = re.value.map((a) => ({
|
|
368
369
|
name: a.name,
|
|
369
370
|
color: a.color
|
|
@@ -371,25 +372,25 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
371
372
|
return { head: t, body: n };
|
|
372
373
|
});
|
|
373
374
|
function $e(t = null) {
|
|
374
|
-
|
|
375
|
-
const n =
|
|
376
|
-
|
|
377
|
-
], [
|
|
378
|
-
t ? t(c) :
|
|
375
|
+
Ye(() => {
|
|
376
|
+
const n = pe.value.head.map((g, N) => [[
|
|
377
|
+
g.name
|
|
378
|
+
], [pe.value.body[N]]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(n), c = Ot(a);
|
|
379
|
+
t ? t(c) : At({ csvContent: c, title: e.value.style.chart.title.text || "vue-ui-word-cloud" });
|
|
379
380
|
});
|
|
380
381
|
}
|
|
381
|
-
const
|
|
382
|
+
const fe = q(() => {
|
|
382
383
|
const t = [
|
|
383
384
|
e.value.table.columnNames.series,
|
|
384
385
|
e.value.table.columnNames.value
|
|
385
|
-
], n =
|
|
386
|
-
const
|
|
386
|
+
], n = pe.value.head.map((g, N) => {
|
|
387
|
+
const K = Mt({ p: e.value.table.td.prefix, v: pe.value.body[N], s: e.value.table.td.suffix, r: e.value.table.td.roundingValue });
|
|
387
388
|
return [
|
|
388
389
|
{
|
|
389
|
-
color:
|
|
390
|
-
name:
|
|
390
|
+
color: g.color,
|
|
391
|
+
name: g.name
|
|
391
392
|
},
|
|
392
|
-
|
|
393
|
+
K
|
|
393
394
|
];
|
|
394
395
|
}), a = {
|
|
395
396
|
th: {
|
|
@@ -413,11 +414,11 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
413
414
|
body: n,
|
|
414
415
|
config: a
|
|
415
416
|
};
|
|
416
|
-
}),
|
|
417
|
+
}), te = m(!1);
|
|
417
418
|
function Ne(t) {
|
|
418
|
-
|
|
419
|
+
te.value = t, X.value += 1;
|
|
419
420
|
}
|
|
420
|
-
function
|
|
421
|
+
function et() {
|
|
421
422
|
return re.value;
|
|
422
423
|
}
|
|
423
424
|
function _e() {
|
|
@@ -430,17 +431,17 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
430
431
|
function Te() {
|
|
431
432
|
ce.value = !ce.value;
|
|
432
433
|
}
|
|
433
|
-
const
|
|
434
|
+
const tt = q(() => !ce.value && e.value.style.chart.zoom.show), { viewBox: ge, resetZoom: be, isZoom: at, setInitialViewBox: ot } = Ut(G, {
|
|
434
435
|
x: 0,
|
|
435
436
|
y: 0,
|
|
436
|
-
width:
|
|
437
|
-
height:
|
|
438
|
-
}, 1,
|
|
439
|
-
async function
|
|
437
|
+
width: u.value.width <= 0 ? 10 : u.value.width,
|
|
438
|
+
height: u.value.height <= 0 ? 10 : u.value.height
|
|
439
|
+
}, 1, tt);
|
|
440
|
+
async function lt({ scale: t = 2 } = {}) {
|
|
440
441
|
if (!w.value) return;
|
|
441
|
-
const { width: n, height: a } = w.value.getBoundingClientRect(), c = n / a, { imageUri:
|
|
442
|
+
const { width: n, height: a } = w.value.getBoundingClientRect(), c = n / a, { imageUri: g, base64: N } = await Wt({ domElement: w.value, base64: !0, img: !0, scale: t });
|
|
442
443
|
return {
|
|
443
|
-
imageUri:
|
|
444
|
+
imageUri: g,
|
|
444
445
|
base64: N,
|
|
445
446
|
title: e.value.style.chart.title.text,
|
|
446
447
|
width: n,
|
|
@@ -448,7 +449,7 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
448
449
|
aspectRatio: c
|
|
449
450
|
};
|
|
450
451
|
}
|
|
451
|
-
const ve =
|
|
452
|
+
const ve = q(() => {
|
|
452
453
|
const t = e.value.table.useDialog && !e.value.table.show, n = T.value.showTable;
|
|
453
454
|
return {
|
|
454
455
|
component: t ? x : d,
|
|
@@ -458,7 +459,7 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
458
459
|
color: e.value.table.th.color,
|
|
459
460
|
headerColor: e.value.table.th.color,
|
|
460
461
|
headerBg: e.value.table.th.backgroundColor,
|
|
461
|
-
isFullscreen:
|
|
462
|
+
isFullscreen: te.value,
|
|
462
463
|
fullscreenParent: w.value,
|
|
463
464
|
forcedWidth: Math.min(500, window.innerWidth * 0.8)
|
|
464
465
|
} : {
|
|
@@ -482,32 +483,45 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
482
483
|
e.value.table.show || (t && e.value.table.useDialog && Y.value ? Y.value.open() : "close" in Y.value && Y.value.close());
|
|
483
484
|
});
|
|
484
485
|
function Re() {
|
|
485
|
-
T.value.showTable = !1,
|
|
486
|
+
T.value.showTable = !1, Q.value && Q.value.setTableIconState(!1);
|
|
486
487
|
}
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
488
|
+
const nt = q(() => e.value.style.chart.backgroundColor), st = q(() => e.value.style.chart.title), { exportSvg: ut, getSvg: it } = Bt({
|
|
489
|
+
svg: G,
|
|
490
|
+
title: st,
|
|
491
|
+
backgroundColor: nt
|
|
492
|
+
});
|
|
493
|
+
async function Ve({ isCb: t }) {
|
|
494
|
+
if (t) {
|
|
495
|
+
const { blob: n, url: a, text: c, dataUrl: g } = await it();
|
|
496
|
+
e.value.userOptions.callbacks.svg({ blob: n, url: a, text: c, dataUrl: g });
|
|
497
|
+
} else
|
|
498
|
+
ut();
|
|
499
|
+
}
|
|
500
|
+
b({
|
|
501
|
+
getData: et,
|
|
502
|
+
getImage: lt,
|
|
490
503
|
generateCsv: $e,
|
|
491
504
|
generatePdf: ze,
|
|
492
505
|
generateImage: De,
|
|
506
|
+
generateSvg: Ve,
|
|
493
507
|
resetZoom: be,
|
|
494
508
|
toggleTable: _e,
|
|
495
509
|
toggleTooltip: Be,
|
|
496
510
|
toggleAnnotator: Te,
|
|
497
511
|
toggleFullscreen: Ne
|
|
498
512
|
});
|
|
499
|
-
const
|
|
500
|
-
function
|
|
501
|
-
|
|
513
|
+
const ae = m(null), de = m(!1), Se = m(""), Fe = m(null);
|
|
514
|
+
function rt(t, n) {
|
|
515
|
+
ae.value = null, ue.value = !1, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: n });
|
|
502
516
|
}
|
|
503
|
-
function
|
|
517
|
+
function ct(t, n) {
|
|
504
518
|
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: n });
|
|
505
519
|
}
|
|
506
|
-
function
|
|
520
|
+
function vt(t, n) {
|
|
507
521
|
if (e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: n }), !T.value.showTooltip) return;
|
|
508
|
-
|
|
522
|
+
ae.value = t.id, Fe.value = { datapoint: t, config: e.value };
|
|
509
523
|
const a = e.value.style.chart.tooltip.customFormat;
|
|
510
|
-
if (de.value = !1,
|
|
524
|
+
if (de.value = !1, It(a))
|
|
511
525
|
try {
|
|
512
526
|
const c = a({
|
|
513
527
|
datapoint: t,
|
|
@@ -521,20 +535,20 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
521
535
|
let c = `<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>`;
|
|
522
536
|
Se.value = `<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${c}</div>`;
|
|
523
537
|
}
|
|
524
|
-
|
|
538
|
+
ue.value = !0;
|
|
525
539
|
}
|
|
526
540
|
return (t, n) => (k(), _("div", {
|
|
527
541
|
class: "vue-data-ui-component vue-ui-word-cloud",
|
|
528
542
|
ref_key: "wordCloudChart",
|
|
529
543
|
ref: w,
|
|
530
|
-
id: `wordCloud_${
|
|
544
|
+
id: `wordCloud_${E.value}`,
|
|
531
545
|
style: ye(`width: 100%; font-family:${e.value.style.fontFamily};background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`),
|
|
532
|
-
onMouseenter: n[2] || (n[2] = () =>
|
|
533
|
-
onMouseleave: n[3] || (n[3] = () =>
|
|
546
|
+
onMouseenter: n[2] || (n[2] = () => i(z)(!0)),
|
|
547
|
+
onMouseleave: n[3] || (n[3] = () => i(z)(!1))
|
|
534
548
|
}, [
|
|
535
|
-
e.value.userOptions.buttons.annotator ? (k(), le(
|
|
549
|
+
e.value.userOptions.buttons.annotator ? (k(), le(i(l), {
|
|
536
550
|
key: 0,
|
|
537
|
-
svgRef:
|
|
551
|
+
svgRef: i(G),
|
|
538
552
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
539
553
|
color: e.value.style.chart.color,
|
|
540
554
|
active: ce.value,
|
|
@@ -546,7 +560,7 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
546
560
|
ref: B,
|
|
547
561
|
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
548
562
|
}, [
|
|
549
|
-
(k(), le(
|
|
563
|
+
(k(), le(Et, {
|
|
550
564
|
key: `title_${me.value}`,
|
|
551
565
|
config: {
|
|
552
566
|
title: {
|
|
@@ -558,21 +572,22 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
558
572
|
}
|
|
559
573
|
}, null, 8, ["config"]))
|
|
560
574
|
], 512)) : W("", !0),
|
|
561
|
-
e.value.userOptions.show && y.value && (
|
|
575
|
+
e.value.userOptions.show && y.value && (i(V) || i(A)) ? (k(), le(i(o), {
|
|
562
576
|
ref_key: "userOptionsRef",
|
|
563
|
-
ref:
|
|
564
|
-
key: `user_option_${
|
|
577
|
+
ref: Q,
|
|
578
|
+
key: `user_option_${X.value}`,
|
|
565
579
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
566
580
|
color: e.value.style.chart.color,
|
|
567
|
-
isPrinting:
|
|
568
|
-
isImaging:
|
|
569
|
-
uid:
|
|
581
|
+
isPrinting: i(Ae),
|
|
582
|
+
isImaging: i(Ie),
|
|
583
|
+
uid: E.value,
|
|
570
584
|
hasPdf: e.value.userOptions.buttons.pdf,
|
|
571
585
|
hasXls: e.value.userOptions.buttons.csv,
|
|
572
586
|
hasImg: e.value.userOptions.buttons.img,
|
|
587
|
+
hasSvg: e.value.userOptions.buttons.svg,
|
|
573
588
|
hasTable: e.value.userOptions.buttons.table,
|
|
574
589
|
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
575
|
-
isFullscreen:
|
|
590
|
+
isFullscreen: te.value,
|
|
576
591
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
577
592
|
chartElement: w.value,
|
|
578
593
|
position: e.value.userOptions.position,
|
|
@@ -584,14 +599,15 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
584
599
|
printScale: e.value.userOptions.print.scale,
|
|
585
600
|
tableDialog: e.value.table.useDialog,
|
|
586
601
|
onToggleFullscreen: Ne,
|
|
587
|
-
onGeneratePdf:
|
|
602
|
+
onGeneratePdf: i(ze),
|
|
588
603
|
onGenerateCsv: $e,
|
|
589
|
-
onGenerateImage:
|
|
604
|
+
onGenerateImage: i(De),
|
|
605
|
+
onGenerateSvg: Ve,
|
|
590
606
|
onToggleTable: _e,
|
|
591
607
|
onToggleTooltip: Be,
|
|
592
608
|
onToggleAnnotator: Te,
|
|
593
609
|
style: ye({
|
|
594
|
-
visibility:
|
|
610
|
+
visibility: i(V) ? i(A) ? "visible" : "hidden" : "visible"
|
|
595
611
|
})
|
|
596
612
|
}, Xe({ _: 2 }, [
|
|
597
613
|
t.$slots.menuIcon ? {
|
|
@@ -643,32 +659,32 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
643
659
|
]),
|
|
644
660
|
key: "6"
|
|
645
661
|
} : void 0
|
|
646
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasTooltip", "isTooltip", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : W("", !0),
|
|
662
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasSvg", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasTooltip", "isTooltip", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : W("", !0),
|
|
647
663
|
(k(), _("svg", {
|
|
648
664
|
ref_key: "svgRef",
|
|
649
665
|
ref: G,
|
|
650
|
-
class:
|
|
651
|
-
xmlns:
|
|
652
|
-
viewBox: `${
|
|
666
|
+
class: Ue({ "vue-data-ui-fullscreen--on": te.value, "vue-data-ui-fulscreen--off": !te.value }),
|
|
667
|
+
xmlns: i(Pt),
|
|
668
|
+
viewBox: `${i(ge).x} ${i(ge).y} ${i(ge).width} ${i(ge).height}`,
|
|
653
669
|
style: "overflow:hidden;background:transparent;"
|
|
654
670
|
}, [
|
|
655
|
-
we(
|
|
671
|
+
we(i(s)),
|
|
656
672
|
t.$slots["chart-background"] ? (k(), _("foreignObject", {
|
|
657
673
|
key: 0,
|
|
658
674
|
x: 0,
|
|
659
675
|
y: 0,
|
|
660
|
-
width:
|
|
661
|
-
height:
|
|
676
|
+
width: u.value.width <= 0 ? 10 : u.value.width,
|
|
677
|
+
height: u.value.height <= 0 ? 10 : u.value.height,
|
|
662
678
|
style: {
|
|
663
679
|
pointerEvents: "none"
|
|
664
680
|
}
|
|
665
681
|
}, [
|
|
666
682
|
F(t.$slots, "chart-background", {}, void 0, !0)
|
|
667
|
-
], 8,
|
|
683
|
+
], 8, Zt)) : W("", !0),
|
|
668
684
|
ke("g", {
|
|
669
|
-
transform: `translate(${
|
|
685
|
+
transform: `translate(${Z.value.x}, ${Z.value.y})`
|
|
670
686
|
}, [
|
|
671
|
-
(k(!0), _(
|
|
687
|
+
(k(!0), _(ft, null, gt(re.value, (a, c) => (k(), _("g", null, [
|
|
672
688
|
a.minX !== void 0 ? (k(), _("rect", {
|
|
673
689
|
key: 0,
|
|
674
690
|
x: a.x + a.minX,
|
|
@@ -677,10 +693,10 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
677
693
|
height: a.maxY - a.minY,
|
|
678
694
|
fill: "transparent",
|
|
679
695
|
"pointer-events": "visiblePainted",
|
|
680
|
-
onMouseover: (
|
|
681
|
-
onMouseleave: (
|
|
682
|
-
onClick: (
|
|
683
|
-
}, null, 40,
|
|
696
|
+
onMouseover: (g) => vt(a, c),
|
|
697
|
+
onMouseleave: (g) => rt(a, c),
|
|
698
|
+
onClick: (g) => ct(a, c)
|
|
699
|
+
}, null, 40, Kt)) : W("", !0),
|
|
684
700
|
(k(), _("text", {
|
|
685
701
|
fill: a.color,
|
|
686
702
|
"font-weight": e.value.style.chart.words.bold ? "bold" : "normal",
|
|
@@ -689,22 +705,22 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
689
705
|
y: a.y,
|
|
690
706
|
"font-size": a.fontSize,
|
|
691
707
|
transform: `translate(${a.width / 2}, ${a.height / 2})`,
|
|
692
|
-
class:
|
|
708
|
+
class: Ue({ animated: e.value.useCssAnimation, "word-selected": ae.value && ae.value === a.id && T.value.showTooltip, "word-not-selected": ae.value && ae.value !== a.id && T.value.showTooltip }),
|
|
693
709
|
"text-anchor": "middle",
|
|
694
710
|
"dominant-baseline": "central",
|
|
695
711
|
style: ye(`animation-delay:${c * e.value.animationDelayMs}ms !important; pointer-events:none;`)
|
|
696
|
-
}, Me(a.name), 15,
|
|
712
|
+
}, Me(a.name), 15, Qt))
|
|
697
713
|
]))), 256))
|
|
698
|
-
], 8,
|
|
714
|
+
], 8, Jt),
|
|
699
715
|
F(t.$slots, "svg", {
|
|
700
|
-
svg: { height:
|
|
716
|
+
svg: { height: u.value.height, width: u.value.width }
|
|
701
717
|
}, void 0, !0)
|
|
702
|
-
], 10,
|
|
703
|
-
t.$slots.watermark ? (k(), _("div",
|
|
704
|
-
F(t.$slots, "watermark", ne(se({ isPrinting:
|
|
718
|
+
], 10, Ht)),
|
|
719
|
+
t.$slots.watermark ? (k(), _("div", ea, [
|
|
720
|
+
F(t.$slots, "watermark", ne(se({ isPrinting: i(Ae) || i(Ie) })), void 0, !0)
|
|
705
721
|
])) : W("", !0),
|
|
706
|
-
|
|
707
|
-
F(t.$slots, "reset-action", { reset:
|
|
722
|
+
i(at) ? (k(), _("div", ta, [
|
|
723
|
+
F(t.$slots, "reset-action", { reset: i(be) }, () => [
|
|
708
724
|
ke("button", {
|
|
709
725
|
"data-cy-reset": "",
|
|
710
726
|
tabindex: "0",
|
|
@@ -713,17 +729,17 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
713
729
|
style: ye({
|
|
714
730
|
background: e.value.style.chart.backgroundColor
|
|
715
731
|
}),
|
|
716
|
-
onClick: n[0] || (n[0] = (a) =>
|
|
732
|
+
onClick: n[0] || (n[0] = (a) => i(be)(!0))
|
|
717
733
|
}, [
|
|
718
|
-
we(
|
|
734
|
+
we(i(h), {
|
|
719
735
|
name: "refresh",
|
|
720
736
|
stroke: e.value.style.chart.color
|
|
721
737
|
}, null, 8, ["stroke"])
|
|
722
738
|
], 4)
|
|
723
739
|
], !0)
|
|
724
740
|
])) : W("", !0),
|
|
725
|
-
we(
|
|
726
|
-
show: T.value.showTooltip &&
|
|
741
|
+
we(i(v), {
|
|
742
|
+
show: T.value.showTooltip && ue.value,
|
|
727
743
|
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
728
744
|
color: e.value.style.chart.tooltip.color,
|
|
729
745
|
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
@@ -736,7 +752,7 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
736
752
|
parent: w.value,
|
|
737
753
|
content: Se.value,
|
|
738
754
|
isCustom: de.value,
|
|
739
|
-
isFullscreen:
|
|
755
|
+
isFullscreen: te.value,
|
|
740
756
|
smooth: e.value.style.chart.tooltip.smooth,
|
|
741
757
|
backdropFilter: e.value.style.chart.tooltip.backdropFilter,
|
|
742
758
|
smoothForce: e.value.style.chart.tooltip.smoothForce,
|
|
@@ -758,18 +774,18 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
758
774
|
}, [
|
|
759
775
|
F(t.$slots, "source", {}, void 0, !0)
|
|
760
776
|
], 512)) : W("", !0),
|
|
761
|
-
y.value && e.value.userOptions.buttons.table ? (k(), le(
|
|
777
|
+
y.value && e.value.userOptions.buttons.table ? (k(), le(bt(ve.value.component), yt({ key: 6 }, ve.value.props, {
|
|
762
778
|
ref_key: "tableUnit",
|
|
763
779
|
ref: Y,
|
|
764
780
|
onClose: Re
|
|
765
781
|
}), Xe({
|
|
766
782
|
content: S(() => [
|
|
767
|
-
(k(), le(
|
|
783
|
+
(k(), le(i(p), {
|
|
768
784
|
key: `table_${he.value}`,
|
|
769
|
-
colNames:
|
|
770
|
-
head:
|
|
771
|
-
body:
|
|
772
|
-
config:
|
|
785
|
+
colNames: fe.value.colNames,
|
|
786
|
+
head: fe.value.head,
|
|
787
|
+
body: fe.value.body,
|
|
788
|
+
config: fe.value.config,
|
|
773
789
|
title: e.value.table.useDialog ? "" : ve.value.title,
|
|
774
790
|
withCloseButton: !e.value.table.useDialog,
|
|
775
791
|
onClose: Re
|
|
@@ -778,10 +794,10 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
778
794
|
ke("div", {
|
|
779
795
|
innerHTML: a,
|
|
780
796
|
style: { display: "flex", "align-items": "center" }
|
|
781
|
-
}, null, 8,
|
|
797
|
+
}, null, 8, aa)
|
|
782
798
|
]),
|
|
783
799
|
td: S(({ td: a }) => [
|
|
784
|
-
|
|
800
|
+
Le(Me(a.name || a), 1)
|
|
785
801
|
]),
|
|
786
802
|
_: 1
|
|
787
803
|
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
|
|
@@ -791,7 +807,7 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
791
807
|
e.value.table.useDialog ? {
|
|
792
808
|
name: "title",
|
|
793
809
|
fn: S(() => [
|
|
794
|
-
|
|
810
|
+
Le(Me(ve.value.title), 1)
|
|
795
811
|
]),
|
|
796
812
|
key: "0"
|
|
797
813
|
} : void 0,
|
|
@@ -803,7 +819,7 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
803
819
|
class: "vue-ui-user-options-button",
|
|
804
820
|
onClick: n[1] || (n[1] = (a) => $e(e.value.userOptions.callbacks.csv))
|
|
805
821
|
}, [
|
|
806
|
-
we(
|
|
822
|
+
we(i(h), {
|
|
807
823
|
name: "excel",
|
|
808
824
|
stroke: ve.value.props.color
|
|
809
825
|
}, null, 8, ["stroke"])
|
|
@@ -812,10 +828,10 @@ const Et = ["id"], Ut = ["xmlns", "viewBox"], Lt = ["width", "height"], Yt = ["t
|
|
|
812
828
|
key: "1"
|
|
813
829
|
} : void 0
|
|
814
830
|
]), 1040)) : W("", !0),
|
|
815
|
-
|
|
816
|
-
], 44,
|
|
831
|
+
i(ie) ? (k(), le(Nt, { key: 7 })) : W("", !0)
|
|
832
|
+
], 44, qt));
|
|
817
833
|
}
|
|
818
|
-
},
|
|
834
|
+
}, ba = /* @__PURE__ */ Lt(oa, [["__scopeId", "data-v-4c8620b6"]]);
|
|
819
835
|
export {
|
|
820
|
-
|
|
836
|
+
ba as default
|
|
821
837
|
};
|