vue-data-ui 2.12.5 → 2.12.7-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -1
- package/dist/{Arrow-CD7YT-M0.js → Arrow-CmqjRRUl.js} +1 -1
- package/dist/BaseDraggableDialog-BMlyvt7E.js +180 -0
- package/dist/{BaseIcon-CgSWwnK7.js → BaseIcon-CZdMutjs.js} +1 -1
- package/dist/{ColorPicker-w8R8Tqdv.js → ColorPicker-DvVKgyAl.js} +23 -24
- package/dist/{DataTable-CicthvOV.js → DataTable-Cv9CIz-a.js} +11 -11
- package/dist/{Legend-0UY0Mmli.js → Legend-DFunFf8i.js} +8 -8
- package/dist/NonSvgPenAndPaper-pVuHj6_A.js +467 -0
- package/dist/PackageVersion-CLY-udAA.js +10 -0
- package/dist/{PenAndPaper-DLsvRwoD.js → PenAndPaper-B9na2mbr.js} +8 -10
- package/dist/RecursiveCircles-Dn3TGoL6.js +96 -0
- package/dist/RecursiveLabels-NTMB9w5C.js +49 -0
- package/dist/RecursiveLinks-ld_gDZH4.js +64 -0
- package/dist/{Shape-DICeBEtN.js → Shape-D3w9qas1.js} +2 -2
- package/dist/{Slicer-D1nsbsWE.js → Slicer-ncY8krrM.js} +2 -2
- package/dist/SparkTooltip-CwThutH2.js +68 -0
- package/dist/{Title-xO1jFsSw.js → Title-B5qqUI3M.js} +2 -2
- package/dist/Tooltip-C9rxJ-Ru.js +149 -0
- package/dist/{usePrinter-CcgJXHIK.js → UserOptions-Ddy6CuLC.js} +172 -231
- package/dist/{dom-to-png-CS4NRYd_.js → dom-to-png-DDlooC9r.js} +1 -1
- package/dist/{img-CsXjm5I4.js → img-m9g7lR5d.js} +1 -1
- package/dist/{index-vjCxtaM0.js → index-BiHmNd1-.js} +153 -118
- package/dist/{pdf-DHexTTpK.js → pdf-BqM953uL.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +96 -2
- package/dist/types/vue-data-ui.d.ts +96 -2
- package/dist/useChartAccessibility-9icAAmYg.js +12 -0
- package/dist/useMouse-AicQS8Vf.js +13 -0
- package/dist/{useNestedProp-Du1hnYFA.js → useNestedProp-tRqS0ZAM.js} +1 -1
- package/dist/{usePanZoom-CUkkqW81.js → usePanZoom-BQMvRXEQ.js} +16 -17
- package/dist/usePrinter-CRCbl1WG.js +53 -0
- package/dist/vClickOutside-C6WiFswA.js +13 -0
- package/dist/{vue-data-ui-BOrA3Tc9.js → vue-data-ui-D9uTDt73.js} +63 -63
- package/dist/vue-data-ui.js +42 -40
- package/dist/{vue-ui-3d-bar-Z8yAd4bw.js → vue-ui-3d-bar-rtuSc8FS.js} +397 -402
- package/dist/{vue-ui-accordion-CAN430Oy.js → vue-ui-accordion-CmCs2yR2.js} +3 -3
- package/dist/{vue-ui-age-pyramid-C6PZU9Ez.js → vue-ui-age-pyramid-BrzMSiyu.js} +215 -218
- package/dist/{vue-ui-annotator-CqoDLx3t.js → vue-ui-annotator-CYxmTpf6.js} +2 -2
- package/dist/{vue-ui-bullet-DZC3aY3d.js → vue-ui-bullet-D25qNQfb.js} +137 -140
- package/dist/{vue-ui-candlestick-B5mq_lgW.js → vue-ui-candlestick-BuerNa-r.js} +265 -271
- package/dist/{vue-ui-carousel-table-CBwerU49.js → vue-ui-carousel-table-aN0HLsOO.js} +137 -137
- package/dist/{vue-ui-chestnut-COyOAY28.js → vue-ui-chestnut-oUj2ocsZ.js} +397 -400
- package/dist/{vue-ui-chord-Cw0F_jHM.js → vue-ui-chord-C4evlXYB.js} +356 -365
- package/dist/vue-ui-circle-pack-CWrNiKTY.js +656 -0
- package/dist/{vue-ui-cursor-CWXqmlVy.js → vue-ui-cursor-DgpSttlt.js} +2 -2
- package/dist/{vue-ui-dashboard-Ba2tF4md.js → vue-ui-dashboard-BN2ha1Eh.js} +62 -62
- package/dist/{vue-ui-digits-BV7yyUdY.js → vue-ui-digits-BhjAxXgm.js} +2 -2
- package/dist/vue-ui-donut-D3_z61HI.js +1291 -0
- package/dist/vue-ui-donut-evolution-oKtmZPx4.js +864 -0
- package/dist/{vue-ui-dumbbell-SDCcLJIc.js → vue-ui-dumbbell-C8Lokx-F.js} +265 -270
- package/dist/{vue-ui-flow-CrqGSDNK.js → vue-ui-flow-BVRkH0PS.js} +291 -300
- package/dist/{vue-ui-funnel-CcDOoxp8.js → vue-ui-funnel-DFxcmAB5.js} +216 -219
- package/dist/{vue-ui-galaxy-jlDp0DRJ.js → vue-ui-galaxy-CGE0hlBC.js} +227 -235
- package/dist/{vue-ui-gauge-8t8rWb1C.js → vue-ui-gauge-B48eMvOR.js} +240 -243
- package/dist/{vue-ui-gizmo-CFwdrMYP.js → vue-ui-gizmo-zTKNpjvv.js} +57 -58
- package/dist/{vue-ui-heatmap-BT-mIeZp.js → vue-ui-heatmap-UNfTt8SM.js} +239 -242
- package/dist/{vue-ui-history-plot-crLloc7J.js → vue-ui-history-plot-CbCWmvtg.js} +257 -262
- package/dist/{vue-ui-kpi-96v4ZIYo.js → vue-ui-kpi-Drf_lrlh.js} +29 -30
- package/dist/{vue-ui-mini-loader-rBHBxNIT.js → vue-ui-mini-loader-DU3G6BVs.js} +2 -2
- package/dist/vue-ui-molecule-B5MOXYEA.js +580 -0
- package/dist/{vue-ui-mood-radar-DrVSXIY4.js → vue-ui-mood-radar-CC_CVLvn.js} +180 -186
- package/dist/{vue-ui-nested-donuts-C9Ah9lgv.js → vue-ui-nested-donuts-D_H962kk.js} +366 -374
- package/dist/{vue-ui-onion-DwNPyn4X.js → vue-ui-onion-P8k6T724.js} +252 -258
- package/dist/{vue-ui-parallel-coordinate-plot-tSuK6xWu.js → vue-ui-parallel-coordinate-plot-B5Los0vX.js} +296 -303
- package/dist/{vue-ui-quadrant-C0Kaoo7K.js → vue-ui-quadrant-B3wzCTxK.js} +402 -409
- package/dist/{vue-ui-quick-chart-xMh_Ygct.js → vue-ui-quick-chart-oucj6hXk.js} +611 -616
- package/dist/{vue-ui-radar-C1jSDQt_.js → vue-ui-radar-Cjqlyu6d.js} +270 -277
- package/dist/{vue-ui-rating-6Kb7hsKF.js → vue-ui-rating-gryk_h_6.js} +2 -2
- package/dist/vue-ui-relation-circle-ielvWC-1.js +525 -0
- package/dist/{vue-ui-ridgeline-BBvPVQjC.js → vue-ui-ridgeline-Dydqo68b.js} +321 -326
- package/dist/{vue-ui-rings-B92cXv7f.js → vue-ui-rings-BRBXektJ.js} +262 -269
- package/dist/{vue-ui-scatter-Bt1aty87.js → vue-ui-scatter-Df-BM7Ts.js} +372 -379
- package/dist/{vue-ui-skeleton-DfOIDTJM.js → vue-ui-skeleton-CbYQYRvD.js} +19 -19
- package/dist/{vue-ui-smiley-sVgBnkbx.js → vue-ui-smiley-BfHaQMaW.js} +2 -2
- package/dist/{vue-ui-spark-trend-D6uzJ4Qd.js → vue-ui-spark-trend-z3fUChs_.js} +114 -117
- package/dist/{vue-ui-sparkbar-D4c2EE7J.js → vue-ui-sparkbar-ChtFIugH.js} +104 -106
- package/dist/{vue-ui-sparkgauge-DaQ6iz98.js → vue-ui-sparkgauge-DtpODCww.js} +72 -74
- package/dist/{vue-ui-sparkhistogram-D_YnmM2T.js → vue-ui-sparkhistogram-C3XnYiXI.js} +83 -86
- package/dist/vue-ui-sparkline-CoL8jiX8.js +459 -0
- package/dist/{vue-ui-sparkstackbar-DecnmqgJ.js → vue-ui-sparkstackbar-CYk3mZJH.js} +102 -105
- package/dist/{vue-ui-stackbar-D1eNs1j_.js → vue-ui-stackbar-D9LGbuG5.js} +433 -437
- package/dist/{vue-ui-strip-plot-iPZ8Hhmr.js → vue-ui-strip-plot-C5r1Ee2R.js} +245 -252
- package/dist/{vue-ui-table-BFjE28sw.js → vue-ui-table-DBaT_TfA.js} +3 -3
- package/dist/{vue-ui-table-heatmap-DipFDu39.js → vue-ui-table-heatmap-CYW4YfKN.js} +93 -94
- package/dist/{vue-ui-table-sparkline-CGAecOZh.js → vue-ui-table-sparkline-Di0MYR4p.js} +212 -212
- package/dist/{vue-ui-thermometer-Cx_yr-hs.js → vue-ui-thermometer-BF1btHY2.js} +154 -157
- package/dist/{vue-ui-timer-ClVmS8MH.js → vue-ui-timer-D9FfRWN5.js} +180 -181
- package/dist/vue-ui-tiremarks-CQ0lk8fJ.js +341 -0
- package/dist/vue-ui-treemap-1Lx7YRtc.js +947 -0
- package/dist/{vue-ui-vertical-bar-BHYCnFEN.js → vue-ui-vertical-bar-DdVVQ1ED.js} +397 -403
- package/dist/{vue-ui-waffle-DEPUbrOt.js → vue-ui-waffle-BhnuPiRD.js} +317 -324
- package/dist/vue-ui-wheel-BIjJ0fg8.js +335 -0
- package/dist/vue-ui-word-cloud-3-r8HwO_.js +642 -0
- package/dist/{vue-ui-world-DStJ5i0i.js → vue-ui-world-CPIGEswq.js} +430 -442
- package/dist/{vue-ui-xy-CEop49z6.js → vue-ui-xy-9e_epIN4.js} +845 -846
- package/dist/vue-ui-xy-canvas-DcGgQ7s4.js +1206 -0
- package/package.json +6 -6
- package/dist/BaseDraggableDialog-BjFEob7i.js +0 -186
- package/dist/PackageVersion-Cw2caN1c.js +0 -10
- package/dist/Tooltip-LKe8L-Mg.js +0 -158
- package/dist/useChartAccessibility-BWojgys7.js +0 -13
- package/dist/vue-ui-circle-pack-BtpaZLYs.js +0 -659
- package/dist/vue-ui-donut-CRdQFQgA.js +0 -1292
- package/dist/vue-ui-donut-evolution-De3-5OgR.js +0 -871
- package/dist/vue-ui-molecule-DSr_bHGG.js +0 -782
- package/dist/vue-ui-relation-circle-fh0Hl9m0.js +0 -528
- package/dist/vue-ui-sparkline-C2HuTMDz.js +0 -519
- package/dist/vue-ui-tiremarks-4Sa3RCSv.js +0 -344
- package/dist/vue-ui-treemap-CD5pPg7v.js +0 -956
- package/dist/vue-ui-wheel-qU0bgJsi.js +0 -338
- package/dist/vue-ui-word-cloud-z2ZguOdy.js +0 -648
- package/dist/vue-ui-xy-canvas-DV0BVdZb.js +0 -1673
|
@@ -1,528 +0,0 @@
|
|
|
1
|
-
import { useCssVars as Ve, computed as y, ref as o, watch as We, onMounted as De, onBeforeUnmount as Xe, createElementBlock as a, openBlock as i, unref as r, normalizeStyle as C, createBlock as F, createCommentVNode as v, createSlots as Ye, withCtx as z, renderSlot as h, normalizeProps as B, guardReactiveProps as R, normalizeClass as D, createVNode as qe, createElementVNode as He, Fragment as P, renderList as L, mergeProps as me, toDisplayString as E } from "vue";
|
|
2
|
-
import { u as Je, c as Ke, t as Qe, p as ke, a as Ze, b as et, o as tt, e as pe, g as st, X as lt, G as we, i as X, f as Y, F as q } from "./index-vjCxtaM0.js";
|
|
3
|
-
import { t as it, u as at } from "./useResponsive-JZ9xq-JV.js";
|
|
4
|
-
import { _ as nt } from "./Title-xO1jFsSw.js";
|
|
5
|
-
import { u as rt, U as ut } from "./usePrinter-CcgJXHIK.js";
|
|
6
|
-
import ot from "./vue-ui-skeleton-DfOIDTJM.js";
|
|
7
|
-
import { u as xe } from "./useNestedProp-Du1hnYFA.js";
|
|
8
|
-
import { _ as ct } from "./PackageVersion-Cw2caN1c.js";
|
|
9
|
-
import { _ as dt } from "./PenAndPaper-DLsvRwoD.js";
|
|
10
|
-
import { u as vt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
|
-
import { u as ft } from "./useChartAccessibility-BWojgys7.js";
|
|
12
|
-
import { _ as yt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
-
const ht = ["id"], gt = ["xmlns", "viewBox"], mt = ["width", "height"], kt = ["cx", "cy", "r", "stroke", "stroke-width"], pt = { key: 1 }, wt = ["stroke", "d", "stroke-width"], xt = { style: { "pointer-events": "none" } }, bt = ["cx", "cy", "fill", "r", "stroke"], $t = ["x", "y", "fill", "font-size"], _t = { key: 2 }, Ct = ["stroke", "stroke-width", "x1", "x2", "y1", "y2"], Pt = { style: { "pointer-events": "none" } }, Lt = ["cx", "cy", "fill", "r", "stroke"], Ot = ["x", "y", "fill", "font-size"], zt = ["text-anchor", "transform", "x", "y", "onClick", "font-weight", "font-size", "fill"], At = ["cx", "cy", "fill", "stroke", "onClick", "r"], It = {
|
|
14
|
-
key: 5,
|
|
15
|
-
class: "vue-data-ui-watermark"
|
|
16
|
-
}, Mt = {
|
|
17
|
-
__name: "vue-ui-relation-circle",
|
|
18
|
-
props: {
|
|
19
|
-
dataset: {
|
|
20
|
-
type: Array,
|
|
21
|
-
default() {
|
|
22
|
-
return [];
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
config: {
|
|
26
|
-
type: Object,
|
|
27
|
-
default() {
|
|
28
|
-
return {};
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
setup(be, { expose: $e }) {
|
|
33
|
-
Ve((e) => ({
|
|
34
|
-
cc1109c8: ze.value,
|
|
35
|
-
fd19c20a: Oe.value,
|
|
36
|
-
"0d0b359d": Ae.value
|
|
37
|
-
}));
|
|
38
|
-
const { vue_ui_relation_circle: _e } = Je(), p = be, T = y(() => !!p.dataset && Object.keys(p.dataset).length), O = o(Ke()), H = o(0), A = o(null), J = o(null), K = o(null), Q = o(null), Z = o(0), s = y({
|
|
39
|
-
get: () => le(),
|
|
40
|
-
set: (e) => e
|
|
41
|
-
}), { userOptionsVisible: N, setUserOptionsVisibility: ee, keepUserOptionState: te } = vt({ config: s.value }), { svgRef: se } = ft({ config: s.value.style.title });
|
|
42
|
-
function le() {
|
|
43
|
-
const e = xe({
|
|
44
|
-
userConfig: p.config,
|
|
45
|
-
defaultConfig: _e
|
|
46
|
-
});
|
|
47
|
-
return e.theme ? {
|
|
48
|
-
...xe({
|
|
49
|
-
userConfig: Ze.vue_ui_relation_circle[e.theme] || p.config,
|
|
50
|
-
defaultConfig: e
|
|
51
|
-
}),
|
|
52
|
-
customPalette: Qe[e.theme] || ke
|
|
53
|
-
} : e;
|
|
54
|
-
}
|
|
55
|
-
We(() => p.config, (e) => {
|
|
56
|
-
s.value = le(), N.value = !s.value.userOptions.showOnChartHover, de(), Z.value += 1;
|
|
57
|
-
}, { deep: !0 });
|
|
58
|
-
const { isPrinting: ie, isImaging: ae, generatePdf: ne, generateImage: re } = rt({
|
|
59
|
-
elementId: `relation_circle_${O.value}`,
|
|
60
|
-
fileName: s.value.style.title.text || "vue-ui-relation-circle",
|
|
61
|
-
options: s.value.userOptions.print
|
|
62
|
-
}), Ce = y(() => s.value.userOptions.show && !s.value.style.title.text), ue = y(() => et(s.value.customPalette)), x = o([]), g = o([]), c = o({}), m = o([]), Pe = o(0), j = y(() => p.dataset.slice(0, s.value.style.limit)), $ = o(s.value.style.size), k = o(s.value.style.weightLabels.size), oe = o(s.value.style.plot.radius), ce = o(s.value.style.labels.fontSize), u = o({
|
|
63
|
-
height: s.value.style.size,
|
|
64
|
-
width: s.value.style.size
|
|
65
|
-
}), b = y({
|
|
66
|
-
get() {
|
|
67
|
-
return $.value * s.value.style.circle.radiusProportion;
|
|
68
|
-
},
|
|
69
|
-
set(e) {
|
|
70
|
-
return e;
|
|
71
|
-
}
|
|
72
|
-
}), Le = y(() => s.value.style.links.curved), Oe = y(() => `${s.value.style.animation.speedMs}ms`), ze = y(() => b.value * 2), Ae = y(() => b.value * 4), I = o(null);
|
|
73
|
-
De(() => {
|
|
74
|
-
de(), document.getElementById(`relation_circle_${O.value}`).addEventListener("click", ve);
|
|
75
|
-
});
|
|
76
|
-
function de() {
|
|
77
|
-
if (tt(p.dataset) ? pe({
|
|
78
|
-
componentName: "VueUiRelationCircle",
|
|
79
|
-
type: "dataset"
|
|
80
|
-
}) : p.dataset.forEach((e, l) => {
|
|
81
|
-
st({
|
|
82
|
-
datasetObject: e,
|
|
83
|
-
requiredAttributes: ["id", "label", "relations", "weights"]
|
|
84
|
-
}).forEach((t) => {
|
|
85
|
-
pe({
|
|
86
|
-
componentName: "VueUiRelationCircle",
|
|
87
|
-
type: "datasetSerieAttribute",
|
|
88
|
-
property: t,
|
|
89
|
-
index: l
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
}), s.value.responsive) {
|
|
93
|
-
const e = it(() => {
|
|
94
|
-
const { width: l, height: t } = at({
|
|
95
|
-
chart: A.value,
|
|
96
|
-
title: s.value.style.title.text ? J.value : null,
|
|
97
|
-
source: K.value,
|
|
98
|
-
noTitle: Q.value
|
|
99
|
-
});
|
|
100
|
-
requestAnimationFrame(() => {
|
|
101
|
-
$.value = Math.min(l, t), u.value.width = l, u.value.height = t, b.value = $.value * s.value.style.circle.radiusProportion, x.value = [], g.value = [], fe(), ye(), k.value = q({
|
|
102
|
-
relator: $.value,
|
|
103
|
-
adjuster: s.value.style.size,
|
|
104
|
-
source: s.value.style.weightLabels.size,
|
|
105
|
-
threshold: 6,
|
|
106
|
-
fallback: 6
|
|
107
|
-
}), oe.value = q({
|
|
108
|
-
relator: $.value,
|
|
109
|
-
adjuster: s.value.style.size,
|
|
110
|
-
source: s.value.style.plot.radius,
|
|
111
|
-
threshold: 1,
|
|
112
|
-
fallback: 1
|
|
113
|
-
}), ce.value = q({
|
|
114
|
-
relator: $.value,
|
|
115
|
-
adjuster: s.value.style.size,
|
|
116
|
-
source: s.value.style.labels.fontSize,
|
|
117
|
-
threshold: 6,
|
|
118
|
-
fallback: 6
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
I.value = new ResizeObserver(e), I.value.observe(A.value.parentNode);
|
|
123
|
-
} else
|
|
124
|
-
x.value = [], g.value = [], fe(), ye();
|
|
125
|
-
}
|
|
126
|
-
Xe(() => {
|
|
127
|
-
document.getElementById(`relation_circle_${O.value}`).removeEventListener("click", ve), I.value && I.value.disconnect();
|
|
128
|
-
});
|
|
129
|
-
function ve(e) {
|
|
130
|
-
const l = e.target;
|
|
131
|
-
l && Array.from(l.classList).includes("vue-ui-user-options") || l && Array.from(l.classList).includes("vue-ui-user-options-summary") || l && Array.from(l.classList).includes("vue-data-ui-button") || l && Array.from(l.classList).includes("vue-ui-relation-circle-legend") || (c.value = {}, m.value = []);
|
|
132
|
-
}
|
|
133
|
-
function fe() {
|
|
134
|
-
const e = 6.28319 / j.value.length, l = 360 / j.value.length;
|
|
135
|
-
let t = 0, n = 0;
|
|
136
|
-
j.value.forEach((f, d) => {
|
|
137
|
-
const V = f.weights.reduce((Ue, Ge) => Ue + Ge, 0), W = b.value * Math.cos(t) + u.value.width / 2, je = b.value * Math.sin(t) + u.value.height / 2 + s.value.style.circle.offsetY;
|
|
138
|
-
x.value.push({ x: W, y: je, ...f, color: f.color ? f.color : ue.value[d] ? ue.value[d] : ke[d], regAngle: n, totalWeight: V }), t += e, n += l;
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
function Ie(e, l) {
|
|
142
|
-
const t = (e.x + l.x) / 2, n = (e.y + l.y) / 2;
|
|
143
|
-
return { x: t, y: n };
|
|
144
|
-
}
|
|
145
|
-
function ye() {
|
|
146
|
-
g.value = [], x.value.forEach((e) => {
|
|
147
|
-
x.value.filter((t) => t.relations.includes(e.id)).forEach((t, n) => {
|
|
148
|
-
const f = t.relations.indexOf(e.id);
|
|
149
|
-
g.value.push({
|
|
150
|
-
weight: t.weights[f] ? t.weights[f] : 0,
|
|
151
|
-
relationId: `${e.id}_${t.id}`,
|
|
152
|
-
x1: e.x,
|
|
153
|
-
y1: e.y,
|
|
154
|
-
x2: t.x,
|
|
155
|
-
y2: t.y,
|
|
156
|
-
colorSource: e.color,
|
|
157
|
-
colorTarget: t.color,
|
|
158
|
-
midPointLine: Ie({ x: e.x, y: e.y }, { x: t.x, y: t.y }),
|
|
159
|
-
midPointBezier: Me({
|
|
160
|
-
x1: e.x,
|
|
161
|
-
x2: t.x,
|
|
162
|
-
y1: e.y,
|
|
163
|
-
y2: t.y
|
|
164
|
-
}),
|
|
165
|
-
...e
|
|
166
|
-
});
|
|
167
|
-
});
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
function Me(e) {
|
|
171
|
-
const l = { x: e.x1, y: e.y1 }, t = { x: e.x2, y: e.y2 }, n = { x: e.x1, y: e.y1 }, f = {
|
|
172
|
-
x: u.value.width / 2,
|
|
173
|
-
y: u.value.height / 2 + s.value.style.circle.offsetY
|
|
174
|
-
}, d = 0.5, V = Math.pow(1 - d, 3) * l.x + 3 * Math.pow(1 - d, 2) * d * n.x + 3 * (1 - d) * Math.pow(d, 2) * f.x + Math.pow(d, 3) * t.x, W = Math.pow(1 - d, 3) * l.y + 3 * Math.pow(1 - d, 2) * d * n.y + 3 * (1 - d) * Math.pow(d, 2) * f.y + Math.pow(d, 3) * t.y;
|
|
175
|
-
return { x: V, y: W };
|
|
176
|
-
}
|
|
177
|
-
const Se = y(() => Math.max(...g.value.map((e) => e.weight)));
|
|
178
|
-
function Fe(e) {
|
|
179
|
-
return Object.hasOwn(c.value, "x") ? m.value.includes(e.id) ? "opacity:1" : "opacity:0.1" : "opacity:1";
|
|
180
|
-
}
|
|
181
|
-
function w(e) {
|
|
182
|
-
return e.colorSource;
|
|
183
|
-
}
|
|
184
|
-
function he(e) {
|
|
185
|
-
return Object.hasOwn(c.value, "x") ? m.value.includes(e.id) && e.relationId === `${e.id}_${c.value.id}` || e.relationId === `${c.value.id}_${e.id}` ? `opacity:1;stroke-width:${U(e)}` : "opacity: 0" : "opacity: 1";
|
|
186
|
-
}
|
|
187
|
-
function _(e) {
|
|
188
|
-
return Object.hasOwn(c.value, "x") ? !!(m.value.includes(e.id) && e.relationId === `${e.id}_${c.value.id}` || e.relationId === `${c.value.id}_${e.id}`) : !1;
|
|
189
|
-
}
|
|
190
|
-
function Be(e) {
|
|
191
|
-
return e.regAngle > 90 && e.regAngle < 270 ? "end" : "start";
|
|
192
|
-
}
|
|
193
|
-
function Re(e) {
|
|
194
|
-
return e.regAngle > 90 && e.regAngle < 270 ? e.x - 5 : e.x + 5;
|
|
195
|
-
}
|
|
196
|
-
function Ee(e) {
|
|
197
|
-
return Object.hasOwn(c.value, "x") ? c.value.id === e.id || m.value.includes(e.id) ? "opacity:1" : "opacity:0.2" : "opacity:1";
|
|
198
|
-
}
|
|
199
|
-
function Te(e) {
|
|
200
|
-
return e.regAngle > 90 && e.regAngle < 270 ? `rotate(${e.regAngle + 180},${e.x},${e.y})` : `rotate(${e.regAngle},${e.x},${e.y})`;
|
|
201
|
-
}
|
|
202
|
-
function ge(e) {
|
|
203
|
-
Pe.value = 360 - e.regAngle, c.value.id && e.id === c.value.id ? (c.value = {}, m.value = []) : (c.value = e, m.value = [...e.relations]);
|
|
204
|
-
}
|
|
205
|
-
function U(e) {
|
|
206
|
-
const l = e.weight / Se.value * s.value.style.links.maxWidth;
|
|
207
|
-
return Math.max(0.3, l);
|
|
208
|
-
}
|
|
209
|
-
const M = o(!1);
|
|
210
|
-
function Ne(e) {
|
|
211
|
-
M.value = e, H.value += 1;
|
|
212
|
-
}
|
|
213
|
-
const S = o(!1);
|
|
214
|
-
function G() {
|
|
215
|
-
S.value = !S.value;
|
|
216
|
-
}
|
|
217
|
-
return $e({
|
|
218
|
-
generatePdf: ne,
|
|
219
|
-
generateImage: re,
|
|
220
|
-
toggleAnnotator: G
|
|
221
|
-
}), (e, l) => (i(), a("div", {
|
|
222
|
-
ref_key: "relationCircleChart",
|
|
223
|
-
ref: A,
|
|
224
|
-
class: "vue-ui-relation-circle",
|
|
225
|
-
style: C(`width:100%;background:${s.value.style.backgroundColor};text-align:center;${s.value.responsive ? "height: 100%" : ""}`),
|
|
226
|
-
id: `relation_circle_${O.value}`,
|
|
227
|
-
onMouseenter: l[0] || (l[0] = () => r(ee)(!0)),
|
|
228
|
-
onMouseleave: l[1] || (l[1] = () => r(ee)(!1))
|
|
229
|
-
}, [
|
|
230
|
-
s.value.userOptions.buttons.annotator ? (i(), F(dt, {
|
|
231
|
-
key: 0,
|
|
232
|
-
svgRef: r(se),
|
|
233
|
-
backgroundColor: s.value.style.backgroundColor,
|
|
234
|
-
color: s.value.style.color,
|
|
235
|
-
active: S.value,
|
|
236
|
-
onClose: G
|
|
237
|
-
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : v("", !0),
|
|
238
|
-
Ce.value ? (i(), a("div", {
|
|
239
|
-
key: 1,
|
|
240
|
-
ref_key: "noTitle",
|
|
241
|
-
ref: Q,
|
|
242
|
-
class: "vue-data-ui-no-title-space",
|
|
243
|
-
style: "height:36px; width: 100%;background:transparent"
|
|
244
|
-
}, null, 512)) : v("", !0),
|
|
245
|
-
s.value.style.title.text ? (i(), a("div", {
|
|
246
|
-
key: 2,
|
|
247
|
-
ref_key: "chartTitle",
|
|
248
|
-
ref: J,
|
|
249
|
-
style: "width:100%;background:transparent"
|
|
250
|
-
}, [
|
|
251
|
-
(i(), F(nt, {
|
|
252
|
-
key: `title_${Z.value}`,
|
|
253
|
-
config: {
|
|
254
|
-
title: {
|
|
255
|
-
cy: "relation-div-title",
|
|
256
|
-
...s.value.style.title
|
|
257
|
-
},
|
|
258
|
-
subtitle: {
|
|
259
|
-
cy: "relation-div-subtitle",
|
|
260
|
-
...s.value.style.title.subtitle
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}, null, 8, ["config"]))
|
|
264
|
-
], 512)) : v("", !0),
|
|
265
|
-
s.value.userOptions.show && T.value && (r(te) || r(N)) ? (i(), F(ut, {
|
|
266
|
-
ref: "details",
|
|
267
|
-
key: `user_options_${H.value}`,
|
|
268
|
-
backgroundColor: s.value.style.backgroundColor,
|
|
269
|
-
color: s.value.style.color,
|
|
270
|
-
isPrinting: r(ie),
|
|
271
|
-
isImaging: r(ae),
|
|
272
|
-
uid: O.value,
|
|
273
|
-
hasPdf: s.value.userOptions.buttons.pdf,
|
|
274
|
-
hasImg: s.value.userOptions.buttons.img,
|
|
275
|
-
hasFullscreen: s.value.userOptions.buttons.img,
|
|
276
|
-
hasXls: !1,
|
|
277
|
-
isFullscreen: M.value,
|
|
278
|
-
titles: { ...s.value.userOptions.buttonTitles },
|
|
279
|
-
chartElement: A.value,
|
|
280
|
-
position: s.value.userOptions.position,
|
|
281
|
-
hasAnnotator: s.value.userOptions.buttons.annotator,
|
|
282
|
-
isAnnotation: S.value,
|
|
283
|
-
onToggleFullscreen: Ne,
|
|
284
|
-
onGeneratePdf: r(ne),
|
|
285
|
-
onGenerateImage: r(re),
|
|
286
|
-
onToggleAnnotator: G,
|
|
287
|
-
style: C({
|
|
288
|
-
visibility: r(te) ? r(N) ? "visible" : "hidden" : "visible"
|
|
289
|
-
})
|
|
290
|
-
}, Ye({ _: 2 }, [
|
|
291
|
-
e.$slots.menuIcon ? {
|
|
292
|
-
name: "menuIcon",
|
|
293
|
-
fn: z(({ isOpen: t, color: n }) => [
|
|
294
|
-
h(e.$slots, "menuIcon", B(R({ isOpen: t, color: n })), void 0, !0)
|
|
295
|
-
]),
|
|
296
|
-
key: "0"
|
|
297
|
-
} : void 0,
|
|
298
|
-
e.$slots.optionPdf ? {
|
|
299
|
-
name: "optionPdf",
|
|
300
|
-
fn: z(() => [
|
|
301
|
-
h(e.$slots, "optionPdf", {}, void 0, !0)
|
|
302
|
-
]),
|
|
303
|
-
key: "1"
|
|
304
|
-
} : void 0,
|
|
305
|
-
e.$slots.optionImg ? {
|
|
306
|
-
name: "optionImg",
|
|
307
|
-
fn: z(() => [
|
|
308
|
-
h(e.$slots, "optionImg", {}, void 0, !0)
|
|
309
|
-
]),
|
|
310
|
-
key: "2"
|
|
311
|
-
} : void 0,
|
|
312
|
-
e.$slots.optionFullscreen ? {
|
|
313
|
-
name: "optionFullscreen",
|
|
314
|
-
fn: z(({ toggleFullscreen: t, isFullscreen: n }) => [
|
|
315
|
-
h(e.$slots, "optionFullscreen", B(R({ toggleFullscreen: t, isFullscreen: n })), void 0, !0)
|
|
316
|
-
]),
|
|
317
|
-
key: "3"
|
|
318
|
-
} : void 0,
|
|
319
|
-
e.$slots.optionAnnotator ? {
|
|
320
|
-
name: "optionAnnotator",
|
|
321
|
-
fn: z(({ toggleAnnotator: t, isAnnotator: n }) => [
|
|
322
|
-
h(e.$slots, "optionAnnotator", B(R({ toggleAnnotator: t, isAnnotator: n })), void 0, !0)
|
|
323
|
-
]),
|
|
324
|
-
key: "4"
|
|
325
|
-
} : void 0
|
|
326
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : v("", !0),
|
|
327
|
-
T.value ? (i(), a("svg", {
|
|
328
|
-
key: 4,
|
|
329
|
-
ref_key: "svgRef",
|
|
330
|
-
ref: se,
|
|
331
|
-
xmlns: r(lt),
|
|
332
|
-
class: D([{ "vue-data-ui-fullscreen--on": M.value, "vue-data-ui-fulscreen--off": !M.value }, "relation-circle"]),
|
|
333
|
-
viewBox: `0 0 ${u.value.width <= 0 ? 10 : u.value.width} ${u.value.height <= 0 ? 10 : u.value.height}`,
|
|
334
|
-
width: "100%",
|
|
335
|
-
style: "user-select:none; background:transparent"
|
|
336
|
-
}, [
|
|
337
|
-
qe(ct),
|
|
338
|
-
e.$slots["chart-background"] ? (i(), a("foreignObject", {
|
|
339
|
-
key: 0,
|
|
340
|
-
x: 0,
|
|
341
|
-
y: 0,
|
|
342
|
-
width: u.value.width <= 0 ? 10 : u.value.width,
|
|
343
|
-
height: u.value.height <= 0 ? 10 : u.value.height,
|
|
344
|
-
style: {
|
|
345
|
-
pointerEvents: "none"
|
|
346
|
-
}
|
|
347
|
-
}, [
|
|
348
|
-
h(e.$slots, "chart-background", {}, void 0, !0)
|
|
349
|
-
], 8, mt)) : v("", !0),
|
|
350
|
-
He("circle", {
|
|
351
|
-
cx: (u.value.width <= 0 ? 1e-4 : u.value.width) / 2,
|
|
352
|
-
cy: (u.value.height <= 0 ? 1e-4 : u.value.height) / 2 + s.value.style.circle.offsetY,
|
|
353
|
-
r: b.value <= 0 ? 1e-4 : b.value,
|
|
354
|
-
stroke: s.value.style.circle.stroke,
|
|
355
|
-
"stroke-width": s.value.style.circle.strokeWidth,
|
|
356
|
-
fill: "transparent",
|
|
357
|
-
class: "main-circle"
|
|
358
|
-
}, null, 8, kt),
|
|
359
|
-
Le.value ? (i(), a("g", pt, [
|
|
360
|
-
(i(!0), a(P, null, L(g.value, (t, n) => (i(), a("path", {
|
|
361
|
-
key: `relation_${n}`,
|
|
362
|
-
style: C(he(t)),
|
|
363
|
-
stroke: w(t),
|
|
364
|
-
class: D(["relation", { "vue-ui-relation-circle-selected": c.value.hasOwnProperty("id") && m.value.includes(t.id) }]),
|
|
365
|
-
d: `M${t.x1},${t.y1} C${t.x1},${t.y1} ${u.value.width / 2},${u.value.height / 2 + s.value.style.circle.offsetY} ${t.x2},${t.y2}`,
|
|
366
|
-
fill: "none",
|
|
367
|
-
"stroke-width": U(t),
|
|
368
|
-
"stroke-linecap": "round"
|
|
369
|
-
}, null, 14, wt))), 128)),
|
|
370
|
-
(i(!0), a(P, null, L(g.value, (t, n) => (i(), a("g", xt, [
|
|
371
|
-
_(t) ? h(e.$slots, "dataLabel", me({
|
|
372
|
-
key: 0,
|
|
373
|
-
ref_for: !0
|
|
374
|
-
}, {
|
|
375
|
-
x: t.midPointBezier.x,
|
|
376
|
-
y: t.midPointBezier.y,
|
|
377
|
-
color: w(t),
|
|
378
|
-
weight: t.weight,
|
|
379
|
-
fontSize: k.value
|
|
380
|
-
}), void 0, !0) : v("", !0),
|
|
381
|
-
_(t) && !e.$slots.dataLabel ? (i(), a("circle", {
|
|
382
|
-
key: 1,
|
|
383
|
-
cx: t.midPointBezier.x,
|
|
384
|
-
cy: t.midPointBezier.y,
|
|
385
|
-
fill: w(t),
|
|
386
|
-
r: k.value,
|
|
387
|
-
stroke: s.value.style.backgroundColor,
|
|
388
|
-
"stroke-width": "1"
|
|
389
|
-
}, null, 8, bt)) : v("", !0),
|
|
390
|
-
_(t) && !e.$slots.dataLabel ? (i(), a("text", {
|
|
391
|
-
key: 2,
|
|
392
|
-
x: t.midPointBezier.x,
|
|
393
|
-
y: t.midPointBezier.y + k.value / 3,
|
|
394
|
-
fill: r(we)(w(t)),
|
|
395
|
-
"text-anchor": "middle",
|
|
396
|
-
"font-size": k.value
|
|
397
|
-
}, E(r(X)(
|
|
398
|
-
s.value.style.weightLabels.formatter,
|
|
399
|
-
t.weight,
|
|
400
|
-
r(Y)({
|
|
401
|
-
p: s.value.style.weightLabels.prefix,
|
|
402
|
-
v: t.weight,
|
|
403
|
-
s: s.value.style.weightLabels.suffix,
|
|
404
|
-
r: s.value.style.weightLabels.rounding
|
|
405
|
-
}),
|
|
406
|
-
{ ...t }
|
|
407
|
-
)), 9, $t)) : v("", !0)
|
|
408
|
-
]))), 256))
|
|
409
|
-
])) : (i(), a("g", _t, [
|
|
410
|
-
(i(!0), a(P, null, L(g.value, (t, n) => (i(), a("line", {
|
|
411
|
-
key: `relation_${n}`,
|
|
412
|
-
stroke: w(t),
|
|
413
|
-
"stroke-width": U(t),
|
|
414
|
-
style: C(he(t)),
|
|
415
|
-
x1: t.x1,
|
|
416
|
-
x2: t.x2,
|
|
417
|
-
y1: t.y1,
|
|
418
|
-
y2: t.y2,
|
|
419
|
-
class: D({ "vue-ui-relation-circle-selected": c.value.hasOwnProperty("id") && m.value.includes(t.id) }),
|
|
420
|
-
"stroke-linecap": "round"
|
|
421
|
-
}, null, 14, Ct))), 128)),
|
|
422
|
-
(i(!0), a(P, null, L(g.value, (t, n) => (i(), a("g", Pt, [
|
|
423
|
-
_(t) ? h(e.$slots, "dataLabel", me({
|
|
424
|
-
key: 0,
|
|
425
|
-
ref_for: !0
|
|
426
|
-
}, {
|
|
427
|
-
x: t.midPointLine.x,
|
|
428
|
-
y: t.midPointLine.y,
|
|
429
|
-
color: w(t),
|
|
430
|
-
weight: t.weight,
|
|
431
|
-
fontSize: k.value
|
|
432
|
-
}), void 0, !0) : v("", !0),
|
|
433
|
-
_(t) && !e.$slots.dataLabel && s.value.style.weightLabels.show ? (i(), a("circle", {
|
|
434
|
-
key: 1,
|
|
435
|
-
cx: t.midPointLine.x,
|
|
436
|
-
cy: t.midPointLine.y,
|
|
437
|
-
fill: w(t),
|
|
438
|
-
r: k.value,
|
|
439
|
-
stroke: s.value.style.backgroundColor,
|
|
440
|
-
"stroke-width": "1"
|
|
441
|
-
}, null, 8, Lt)) : v("", !0),
|
|
442
|
-
_(t) && !e.$slots.dataLabel && s.value.style.weightLabels.show ? (i(), a("text", {
|
|
443
|
-
key: 2,
|
|
444
|
-
x: t.midPointLine.x,
|
|
445
|
-
y: t.midPointLine.y + k.value / 3,
|
|
446
|
-
fill: r(we)(w(t)),
|
|
447
|
-
"text-anchor": "middle",
|
|
448
|
-
"font-size": k.value
|
|
449
|
-
}, E(r(X)(
|
|
450
|
-
s.value.style.weightLabels.formatter,
|
|
451
|
-
t.weight,
|
|
452
|
-
r(Y)({
|
|
453
|
-
p: s.value.style.weightLabels.prefix,
|
|
454
|
-
v: t.weight,
|
|
455
|
-
s: s.value.style.weightLabels.suffix,
|
|
456
|
-
r: s.value.style.weightLabels.rounding
|
|
457
|
-
}),
|
|
458
|
-
{ ...t }
|
|
459
|
-
)), 9, Ot)) : v("", !0)
|
|
460
|
-
]))), 256))
|
|
461
|
-
])),
|
|
462
|
-
(i(!0), a(P, null, L(x.value, (t, n) => (i(), a("text", {
|
|
463
|
-
key: `plot_text_${n}`,
|
|
464
|
-
"text-anchor": Be(t),
|
|
465
|
-
transform: Te(t),
|
|
466
|
-
x: Re(t),
|
|
467
|
-
y: t.y + 5,
|
|
468
|
-
onClick: (f) => ge(t),
|
|
469
|
-
class: "vue-ui-relation-circle-legend",
|
|
470
|
-
"transform-origin": "start",
|
|
471
|
-
"font-weight": c.value.id === t.id ? "900" : "400",
|
|
472
|
-
style: C(`font-family:${s.value.style.fontFamily};${Ee(t)}`),
|
|
473
|
-
"font-size": ce.value,
|
|
474
|
-
fill: s.value.style.labels.color
|
|
475
|
-
}, E(t.label) + " (" + E(r(X)(
|
|
476
|
-
s.value.style.weightLabels.formatter,
|
|
477
|
-
t.totalWeight,
|
|
478
|
-
r(Y)({
|
|
479
|
-
p: s.value.style.weightLabels.prefix,
|
|
480
|
-
v: t.totalWeight,
|
|
481
|
-
s: s.value.style.weightLabels.suffix,
|
|
482
|
-
r: s.value.style.weightLabels.rounding
|
|
483
|
-
}),
|
|
484
|
-
{ ...t }
|
|
485
|
-
)) + ") ", 13, zt))), 128)),
|
|
486
|
-
(i(!0), a(P, null, L(x.value, (t, n) => (i(), a("circle", {
|
|
487
|
-
cx: t.x,
|
|
488
|
-
cy: t.y,
|
|
489
|
-
key: `plot_${n}`,
|
|
490
|
-
style: C(Fe(t)),
|
|
491
|
-
class: "vue-ui-relation-circle-plot",
|
|
492
|
-
fill: s.value.style.plot.useSerieColor ? t.color : s.value.style.plot.color,
|
|
493
|
-
stroke: s.value.style.backgroundColor,
|
|
494
|
-
"stroke-width": "1",
|
|
495
|
-
onClick: (f) => ge(t),
|
|
496
|
-
r: oe.value
|
|
497
|
-
}, null, 12, At))), 128)),
|
|
498
|
-
h(e.$slots, "svg", { svg: u.value }, void 0, !0)
|
|
499
|
-
], 10, gt)) : v("", !0),
|
|
500
|
-
e.$slots.watermark ? (i(), a("div", It, [
|
|
501
|
-
h(e.$slots, "watermark", B(R({ isPrinting: r(ie) || r(ae) })), void 0, !0)
|
|
502
|
-
])) : v("", !0),
|
|
503
|
-
e.$slots.source ? (i(), a("div", {
|
|
504
|
-
key: 6,
|
|
505
|
-
ref_key: "source",
|
|
506
|
-
ref: K,
|
|
507
|
-
dir: "auto"
|
|
508
|
-
}, [
|
|
509
|
-
h(e.$slots, "source", {}, void 0, !0)
|
|
510
|
-
], 512)) : v("", !0),
|
|
511
|
-
T.value ? v("", !0) : (i(), F(ot, {
|
|
512
|
-
key: 7,
|
|
513
|
-
config: {
|
|
514
|
-
type: "relationCircle",
|
|
515
|
-
style: {
|
|
516
|
-
backgroundColor: s.value.style.backgroundColor,
|
|
517
|
-
relationCircle: {
|
|
518
|
-
color: "#CCCCCC"
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
}, null, 8, ["config"]))
|
|
523
|
-
], 44, ht));
|
|
524
|
-
}
|
|
525
|
-
}, Dt = /* @__PURE__ */ yt(Mt, [["__scopeId", "data-v-1f567c99"]]);
|
|
526
|
-
export {
|
|
527
|
-
Dt as default
|
|
528
|
-
};
|