vue-data-ui 3.0.0-next.7 → 3.0.0-next.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-Bl8urcli.js → Arrow-fzydFjfE.js} +1 -1
- package/dist/{BaseDraggableDialog-CyhpaZU5.js → BaseDraggableDialog-BwazM8ka.js} +2 -2
- package/dist/{BaseIcon-BCZfTCeM.js → BaseIcon-BnbvQjs5.js} +1 -1
- package/dist/{ColorPicker-CSJf42vx.js → ColorPicker-DR1Yr4kR.js} +2 -2
- package/dist/{DataTable-mQ6Wd-rR.js → DataTable-CKpA_OA_.js} +2 -2
- package/dist/{Legend-B2hrDh4G.js → Legend-ChXhJNzd.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DQ8KsK4W.js → NonSvgPenAndPaper-CPOpM7Os.js} +3 -3
- package/dist/{PackageVersion-CeEYZfaH.js → PackageVersion-CBHvscRY.js} +1 -1
- package/dist/{PenAndPaper-DhSxfUrQ.js → PenAndPaper-BCcfYvgR.js} +3 -3
- package/dist/{Shape-C2qH26wh.js → Shape-C1rNfsMY.js} +43 -37
- package/dist/Slicer-D8a4Wv1q.js +602 -0
- package/dist/{SparkTooltip-BcHgW6YX.js → SparkTooltip-BUdf02cs.js} +1 -1
- package/dist/{Title-B7Xb3YuE.js → Title-feqCv0Si.js} +1 -1
- package/dist/{Tooltip-BidRoM5E.js → Tooltip-DQbksria.js} +23 -19
- package/dist/{UserOptions-0tvMM8PF.js → UserOptions-CGnAZpYs.js} +2 -2
- package/dist/{dom-to-png-CTrlbKHr.js → dom-to-png-DTPmkDTK.js} +1 -1
- package/dist/{img-D72yZNUg.js → img-_RMhslMZ.js} +1 -1
- package/dist/{index-Cg-RjxqH.js → index-CnY41r21.js} +2103 -1411
- package/dist/{pdf-DgX01_wu.js → pdf-C02XBmhm.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +600 -22
- package/dist/types/vue-data-ui.d.ts +600 -22
- package/dist/useAutoSizeLabelsInsideViewbox-DVYZBwNc.js +81 -0
- package/dist/useFitSvgText-2crs6Fv5.js +69 -0
- package/dist/useLoading-D7YHNtLX.js +29 -0
- package/dist/useNestedProp-DtUATNAU.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-BUzmyQf9.js → usePrinter-CJ1uZx0D.js} +2 -2
- package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
- package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
- package/dist/{vue-data-ui-DpO93ey5.js → vue-data-ui-DDBabVWX.js} +105 -100
- package/dist/vue-data-ui.js +23 -22
- package/dist/vue-ui-3d-bar-CtPXePUa.js +1323 -0
- package/dist/{vue-ui-accordion-CRomxzaL.js → vue-ui-accordion-CnLY8CrQ.js} +3 -3
- package/dist/vue-ui-age-pyramid-CvrNLE47.js +834 -0
- package/dist/{vue-ui-annotator-BAOxPiFx.js → vue-ui-annotator-NuSwWka4.js} +2 -2
- package/dist/vue-ui-bullet-CpIVgkPB.js +571 -0
- package/dist/vue-ui-candlestick-DGWKUeJp.js +999 -0
- package/dist/{vue-ui-carousel-table-DVGlPZIa.js → vue-ui-carousel-table-DWbQS8F3.js} +29 -29
- package/dist/{vue-ui-chestnut-P1v4ffD0.js → vue-ui-chestnut-K4-oOYff.js} +5 -5
- package/dist/vue-ui-chord-DqmP8yTR.js +1038 -0
- package/dist/{vue-ui-circle-pack-FXmemXgl.js → vue-ui-circle-pack-D_ufubH5.js} +24 -24
- package/dist/{vue-ui-cursor-CdvMgIrP.js → vue-ui-cursor-B0tP4woK.js} +2 -2
- package/dist/{vue-ui-dashboard-Vke0452J.js → vue-ui-dashboard-D_7qyx3P.js} +62 -62
- package/dist/{vue-ui-digits-BVhyYqCs.js → vue-ui-digits-pUQErY07.js} +2 -2
- package/dist/{vue-ui-donut-BpIivKcf.js → vue-ui-donut-Dl__PVfq.js} +320 -308
- package/dist/vue-ui-donut-evolution-BCGGTZZI.js +1075 -0
- package/dist/vue-ui-dumbbell-KzCa3k9g.js +1119 -0
- package/dist/vue-ui-flow-B1AOqk14.js +841 -0
- package/dist/{vue-ui-funnel-BbFmbsft.js → vue-ui-funnel-DCl9v71X.js} +16 -16
- package/dist/{vue-ui-galaxy-Cn6vHbaw.js → vue-ui-galaxy-0rAzDHe5.js} +60 -58
- package/dist/vue-ui-gauge-Cg4qAOEf.js +791 -0
- package/dist/vue-ui-gizmo-CQmMkODw.js +210 -0
- package/dist/vue-ui-heatmap-CgkgUDI0.js +1078 -0
- package/dist/vue-ui-history-plot-CYvkTszV.js +1073 -0
- package/dist/{vue-ui-kpi-jN_yMnLj.js → vue-ui-kpi-BDuOZbc2.js} +26 -26
- package/dist/{vue-ui-mini-loader-rYr76x8g.js → vue-ui-mini-loader-BZaU_YD-.js} +2 -2
- package/dist/{vue-ui-molecule-BWZHOQLi.js → vue-ui-molecule-HYjHgVuN.js} +53 -51
- package/dist/vue-ui-mood-radar-4pYtL93A.js +785 -0
- package/dist/vue-ui-nested-donuts-BVbvVm19.js +1286 -0
- package/dist/vue-ui-onion-DQg97Dwm.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-KQ4FTUda.js +915 -0
- package/dist/{vue-ui-quadrant-BFFzfDw3.js → vue-ui-quadrant-D8OU7TFs.js} +512 -459
- package/dist/vue-ui-quick-chart-BOKDoHdK.js +1761 -0
- package/dist/vue-ui-radar-2hTf-Qrf.js +796 -0
- package/dist/{vue-ui-rating-BAauyqTn.js → vue-ui-rating-QriKDSO7.js} +2 -2
- package/dist/vue-ui-relation-circle-DqLiKEHw.js +598 -0
- package/dist/vue-ui-ridgeline-CvFlsavM.js +1153 -0
- package/dist/vue-ui-rings-B2ges9Ud.js +728 -0
- package/dist/vue-ui-scatter-DQJeFlv4.js +1178 -0
- package/dist/{vue-ui-skeleton-CUOhCY4p.js → vue-ui-skeleton-Bghm5obp.js} +3 -3
- package/dist/{vue-ui-smiley-B6SqWMov.js → vue-ui-smiley-C3SkDNoz.js} +26 -26
- package/dist/vue-ui-spark-trend-dd8h3N7H.js +315 -0
- package/dist/vue-ui-sparkbar-BTj8M7fY.js +351 -0
- package/dist/vue-ui-sparkgauge-BBQAo-W1.js +232 -0
- package/dist/vue-ui-sparkhistogram-C4ZEcb8S.js +380 -0
- package/dist/vue-ui-sparkline-Bm3GpqJx.js +489 -0
- package/dist/vue-ui-sparkstackbar-Dde4iayd.js +421 -0
- package/dist/vue-ui-stackbar-DPvfNjwH.js +1370 -0
- package/dist/vue-ui-strip-plot-iZIN9U90.js +915 -0
- package/dist/{vue-ui-table-Dwjl3L0p.js → vue-ui-table-C4EoviSd.js} +11 -11
- package/dist/{vue-ui-table-heatmap-DazTE3fa.js → vue-ui-table-heatmap-D-eqO3LU.js} +5 -5
- package/dist/{vue-ui-table-sparkline-BXMPUEpN.js → vue-ui-table-sparkline-CD7IH49g.js} +14 -14
- package/dist/vue-ui-thermometer-BKEFH2Xt.js +541 -0
- package/dist/{vue-ui-timer-yLvNAZL_.js → vue-ui-timer-hhKj1gPp.js} +5 -5
- package/dist/vue-ui-tiremarks-CmNwCnVC.js +406 -0
- package/dist/vue-ui-treemap-BL7T8x_B.js +1035 -0
- package/dist/{vue-ui-vertical-bar-BrYCoVym.js → vue-ui-vertical-bar-CGn_OX3P.js} +71 -69
- package/dist/vue-ui-waffle-qfT-wDhI.js +910 -0
- package/dist/vue-ui-wheel-B8J8C3AN.js +379 -0
- package/dist/vue-ui-word-cloud-B6oHFfEK.js +765 -0
- package/dist/{vue-ui-world-B4Dqrk4l.js → vue-ui-world-BEv_oTrC.js} +11 -9
- package/dist/vue-ui-xy-DPBrciAR.js +3771 -0
- package/dist/{vue-ui-xy-canvas-D7fL36kT.js → vue-ui-xy-canvas-BXT3mXj5.js} +265 -264
- package/package.json +1 -1
- package/dist/Slicer-BD8Z8VCW.js +0 -577
- package/dist/useLoading-Bt5Doa8m.js +0 -28
- package/dist/useNestedProp-C_G5E08Y.js +0 -13
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-3d-bar-D8imUwEz.js +0 -1227
- package/dist/vue-ui-age-pyramid-CV7gtFOC.js +0 -746
- package/dist/vue-ui-bullet-BtuMMBF7.js +0 -513
- package/dist/vue-ui-candlestick-BsRtXKrv.js +0 -873
- package/dist/vue-ui-chord-CIuzYmpM.js +0 -949
- package/dist/vue-ui-donut-evolution-BRlsCA4U.js +0 -903
- package/dist/vue-ui-dumbbell-D87Dumjh.js +0 -753
- package/dist/vue-ui-flow-D_L_xssL.js +0 -765
- package/dist/vue-ui-gauge-Ds4terqY.js +0 -738
- package/dist/vue-ui-gizmo-BTncpI62.js +0 -192
- package/dist/vue-ui-heatmap-B6GpjeWC.js +0 -877
- package/dist/vue-ui-history-plot-DTDzEeGq.js +0 -924
- package/dist/vue-ui-mood-radar-CPfS6f1L.js +0 -670
- package/dist/vue-ui-nested-donuts-Bsd2kGoJ.js +0 -1177
- package/dist/vue-ui-onion-BQ4nISXW.js +0 -701
- package/dist/vue-ui-parallel-coordinate-plot-BoHgVgbn.js +0 -807
- package/dist/vue-ui-quick-chart-oNMTeOAL.js +0 -1612
- package/dist/vue-ui-radar-98mXFZe-.js +0 -741
- package/dist/vue-ui-relation-circle-6oDCSxkO.js +0 -542
- package/dist/vue-ui-ridgeline-CugMGjOU.js +0 -969
- package/dist/vue-ui-rings-bsGXaD2m.js +0 -685
- package/dist/vue-ui-scatter-7ssLliGg.js +0 -1045
- package/dist/vue-ui-spark-trend-jauInkkN.js +0 -291
- package/dist/vue-ui-sparkbar-DXByIxQH.js +0 -301
- package/dist/vue-ui-sparkgauge-BMrV2gDi.js +0 -201
- package/dist/vue-ui-sparkhistogram-CoNM4G7o.js +0 -313
- package/dist/vue-ui-sparkline-DrN3_wS0.js +0 -459
- package/dist/vue-ui-sparkstackbar-W1a0JQi9.js +0 -381
- package/dist/vue-ui-stackbar-D1-gbUgE.js +0 -1207
- package/dist/vue-ui-strip-plot-KhfvrVuN.js +0 -761
- package/dist/vue-ui-thermometer-Cn6lJRs3.js +0 -495
- package/dist/vue-ui-tiremarks-BYsWePfK.js +0 -358
- package/dist/vue-ui-treemap-Ce7RVFG3.js +0 -965
- package/dist/vue-ui-waffle-CCrR2T1G.js +0 -863
- package/dist/vue-ui-wheel-BuxjnrDN.js +0 -352
- package/dist/vue-ui-word-cloud-C6fawHJE.js +0 -659
- package/dist/vue-ui-xy-ubRnv9iJ.js +0 -2980
|
@@ -1,542 +0,0 @@
|
|
|
1
|
-
import { useCssVars as Ke, computed as y, defineAsyncComponent as E, ref as o, watch as Qe, shallowRef as be, onMounted as Ze, onBeforeUnmount as et, createElementBlock as r, openBlock as i, unref as n, normalizeStyle as O, createBlock as F, createCommentVNode as v, createSlots as tt, withCtx as S, renderSlot as h, normalizeProps as B, guardReactiveProps as T, normalizeClass as H, createVNode as lt, createElementVNode as st, Fragment as z, renderList as A, mergeProps as we, toDisplayString as N } from "vue";
|
|
2
|
-
import { u as it, c as at, t as nt, p as xe, a as rt, b as ut, o as ot, e as $e, g as ct, X as dt, F as _e, i as J, f as K, E as Q } from "./index-Cg-RjxqH.js";
|
|
3
|
-
import { t as vt, u as ft } from "./useResponsive-DfdjqQps.js";
|
|
4
|
-
import { u as Ce } from "./useNestedProp-C_G5E08Y.js";
|
|
5
|
-
import { u as yt } from "./usePrinter-BUzmyQf9.js";
|
|
6
|
-
import { u as ht } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
|
-
import { u as gt } from "./useChartAccessibility-9icAAmYg.js";
|
|
8
|
-
import mt from "./Title-B7Xb3YuE.js";
|
|
9
|
-
import pt from "./img-D72yZNUg.js";
|
|
10
|
-
import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
-
const bt = ["id"], wt = ["xmlns", "viewBox"], xt = ["width", "height"], $t = ["cx", "cy", "r", "stroke", "stroke-width"], _t = { key: 1 }, Ct = ["stroke", "d", "stroke-width"], Pt = { style: { "pointer-events": "none" } }, Lt = ["cx", "cy", "fill", "r", "stroke"], Ot = ["x", "y", "fill", "font-size"], zt = { key: 2 }, At = ["stroke", "stroke-width", "x1", "x2", "y1", "y2"], It = { style: { "pointer-events": "none" } }, St = ["cx", "cy", "fill", "r", "stroke"], Mt = ["x", "y", "fill", "font-size"], Rt = ["text-anchor", "transform", "x", "y", "onClick", "font-weight", "font-size", "fill"], Et = ["cx", "cy", "fill", "stroke", "onClick", "r"], Ft = {
|
|
12
|
-
key: 5,
|
|
13
|
-
class: "vue-data-ui-watermark"
|
|
14
|
-
}, Bt = {
|
|
15
|
-
__name: "vue-ui-relation-circle",
|
|
16
|
-
props: {
|
|
17
|
-
dataset: {
|
|
18
|
-
type: Array,
|
|
19
|
-
default() {
|
|
20
|
-
return [];
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
config: {
|
|
24
|
-
type: Object,
|
|
25
|
-
default() {
|
|
26
|
-
return {};
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
setup(Pe, { expose: Le }) {
|
|
31
|
-
Ke((e) => ({
|
|
32
|
-
f0cdfa9c: Be.value,
|
|
33
|
-
"2d3aeb91": Fe.value,
|
|
34
|
-
"18692fb3": Te.value
|
|
35
|
-
}));
|
|
36
|
-
const Oe = E(() => import("./PackageVersion-CeEYZfaH.js")), ze = E(() => import("./PenAndPaper-DhSxfUrQ.js")), Ae = E(() => import("./vue-ui-skeleton-CUOhCY4p.js")), Ie = E(() => import("./UserOptions-0tvMM8PF.js")), { vue_ui_relation_circle: Se } = it(), k = Pe, j = y(() => !!k.dataset && Object.keys(k.dataset).length), I = o(at()), Z = o(0), x = o(null), ee = o(null), te = o(null), le = o(null), se = o(0), l = y({
|
|
37
|
-
get: () => re(),
|
|
38
|
-
set: (e) => e
|
|
39
|
-
}), { userOptionsVisible: U, setUserOptionsVisibility: ie, keepUserOptionState: ae } = ht({ config: l.value }), { svgRef: ne } = gt({ config: l.value.style.title });
|
|
40
|
-
function re() {
|
|
41
|
-
const e = Ce({
|
|
42
|
-
userConfig: k.config,
|
|
43
|
-
defaultConfig: Se
|
|
44
|
-
});
|
|
45
|
-
return e.theme ? {
|
|
46
|
-
...Ce({
|
|
47
|
-
userConfig: rt.vue_ui_relation_circle[e.theme] || k.config,
|
|
48
|
-
defaultConfig: e
|
|
49
|
-
}),
|
|
50
|
-
customPalette: nt[e.theme] || xe
|
|
51
|
-
} : e;
|
|
52
|
-
}
|
|
53
|
-
Qe(() => k.config, (e) => {
|
|
54
|
-
l.value = re(), U.value = !l.value.userOptions.showOnChartHover, fe(), se.value += 1;
|
|
55
|
-
}, { deep: !0 });
|
|
56
|
-
const { isPrinting: ue, isImaging: oe, generatePdf: ce, generateImage: de } = yt({
|
|
57
|
-
elementId: `relation_circle_${I.value}`,
|
|
58
|
-
fileName: l.value.style.title.text || "vue-ui-relation-circle",
|
|
59
|
-
options: l.value.userOptions.print
|
|
60
|
-
}), Me = y(() => l.value.userOptions.show && !l.value.style.title.text), ve = y(() => ut(l.value.customPalette)), $ = o([]), m = o([]), d = o({}), p = o([]), Re = o(0), V = y(() => k.dataset.slice(0, l.value.style.limit)), C = o(l.value.style.size), g = o(l.value.style.weightLabels.size), G = o(l.value.style.plot.radius), W = o(l.value.style.labels.fontSize), u = o({
|
|
61
|
-
height: l.value.style.size,
|
|
62
|
-
width: l.value.style.size
|
|
63
|
-
}), _ = y({
|
|
64
|
-
get() {
|
|
65
|
-
return C.value * l.value.style.circle.radiusProportion;
|
|
66
|
-
},
|
|
67
|
-
set(e) {
|
|
68
|
-
return e;
|
|
69
|
-
}
|
|
70
|
-
}), Ee = y(() => l.value.style.links.curved), Fe = y(() => `${l.value.style.animation.speedMs}ms`), Be = y(() => _.value * 2), Te = y(() => _.value * 4), b = be(null), P = be(null);
|
|
71
|
-
Ze(() => {
|
|
72
|
-
fe(), document.getElementById(`relation_circle_${I.value}`).addEventListener("click", ye);
|
|
73
|
-
});
|
|
74
|
-
function fe() {
|
|
75
|
-
if (ot(k.dataset) ? $e({
|
|
76
|
-
componentName: "VueUiRelationCircle",
|
|
77
|
-
type: "dataset"
|
|
78
|
-
}) : k.dataset.forEach((e, s) => {
|
|
79
|
-
ct({
|
|
80
|
-
datasetObject: e,
|
|
81
|
-
requiredAttributes: ["id", "label", "relations", "weights"]
|
|
82
|
-
}).forEach((t) => {
|
|
83
|
-
$e({
|
|
84
|
-
componentName: "VueUiRelationCircle",
|
|
85
|
-
type: "datasetSerieAttribute",
|
|
86
|
-
property: t,
|
|
87
|
-
index: s
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
}), l.value.responsive) {
|
|
91
|
-
const e = vt(() => {
|
|
92
|
-
const { width: s, height: t } = ft({
|
|
93
|
-
chart: x.value,
|
|
94
|
-
title: l.value.style.title.text ? ee.value : null,
|
|
95
|
-
source: te.value,
|
|
96
|
-
noTitle: le.value
|
|
97
|
-
});
|
|
98
|
-
requestAnimationFrame(() => {
|
|
99
|
-
C.value = Math.min(s, t), u.value.width = s, u.value.height = t, _.value = C.value * l.value.style.circle.radiusProportion, $.value = [], m.value = [], he(), ge(), l.value.responsiveProportionalSizing ? (g.value = Q({
|
|
100
|
-
relator: C.value,
|
|
101
|
-
adjuster: l.value.style.size,
|
|
102
|
-
source: l.value.style.weightLabels.size,
|
|
103
|
-
threshold: 6,
|
|
104
|
-
fallback: 6
|
|
105
|
-
}), G.value = Q({
|
|
106
|
-
relator: C.value,
|
|
107
|
-
adjuster: l.value.style.size,
|
|
108
|
-
source: l.value.style.plot.radius,
|
|
109
|
-
threshold: 1,
|
|
110
|
-
fallback: 1
|
|
111
|
-
}), W.value = Q({
|
|
112
|
-
relator: C.value,
|
|
113
|
-
adjuster: l.value.style.size,
|
|
114
|
-
source: l.value.style.labels.fontSize,
|
|
115
|
-
threshold: 6,
|
|
116
|
-
fallback: 6
|
|
117
|
-
})) : (g.value = l.value.style.weightLabels.size, G.value = l.value.style.plot.radius, W.value = l.value.style.labels.fontSize);
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
b.value && (P.value && b.value.unobserve(P.value), b.value.disconnect()), b.value = new ResizeObserver(e), P.value = x.value.parentNode, b.value.observe(P.value);
|
|
121
|
-
} else
|
|
122
|
-
$.value = [], m.value = [], he(), ge();
|
|
123
|
-
}
|
|
124
|
-
et(() => {
|
|
125
|
-
document.getElementById(`relation_circle_${I.value}`).removeEventListener("click", ye), b.value && (P.value && b.value.unobserve(P.value), b.value.disconnect());
|
|
126
|
-
});
|
|
127
|
-
function ye(e) {
|
|
128
|
-
const s = e.target;
|
|
129
|
-
s && Array.from(s.classList).includes("vue-ui-user-options") || s && Array.from(s.classList).includes("vue-ui-user-options-summary") || s && Array.from(s.classList).includes("vue-data-ui-button") || s && Array.from(s.classList).includes("vue-ui-relation-circle-legend") || (d.value = {}, p.value = []);
|
|
130
|
-
}
|
|
131
|
-
function he() {
|
|
132
|
-
const e = 6.28319 / V.value.length, s = 360 / V.value.length;
|
|
133
|
-
let t = 0, a = 0;
|
|
134
|
-
V.value.forEach((f, c) => {
|
|
135
|
-
const Y = f.weights.reduce((He, Je) => He + Je, 0), q = _.value * Math.cos(t) + u.value.width / 2, qe = _.value * Math.sin(t) + u.value.height / 2 + l.value.style.circle.offsetY;
|
|
136
|
-
$.value.push({ x: q, y: qe, ...f, color: f.color ? f.color : ve.value[c] ? ve.value[c] : xe[c], regAngle: a, totalWeight: Y }), t += e, a += s;
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
function Ne(e, s) {
|
|
140
|
-
const t = (e.x + s.x) / 2, a = (e.y + s.y) / 2;
|
|
141
|
-
return { x: t, y: a };
|
|
142
|
-
}
|
|
143
|
-
function ge() {
|
|
144
|
-
m.value = [], $.value.forEach((e) => {
|
|
145
|
-
$.value.filter((t) => t.relations.includes(e.id)).forEach((t, a) => {
|
|
146
|
-
const f = t.relations.indexOf(e.id);
|
|
147
|
-
m.value.push({
|
|
148
|
-
weight: t.weights[f] ? t.weights[f] : 0,
|
|
149
|
-
relationId: `${e.id}_${t.id}`,
|
|
150
|
-
x1: e.x,
|
|
151
|
-
y1: e.y,
|
|
152
|
-
x2: t.x,
|
|
153
|
-
y2: t.y,
|
|
154
|
-
colorSource: e.color,
|
|
155
|
-
colorTarget: t.color,
|
|
156
|
-
midPointLine: Ne({ x: e.x, y: e.y }, { x: t.x, y: t.y }),
|
|
157
|
-
midPointBezier: je({
|
|
158
|
-
x1: e.x,
|
|
159
|
-
x2: t.x,
|
|
160
|
-
y1: e.y,
|
|
161
|
-
y2: t.y
|
|
162
|
-
}),
|
|
163
|
-
...e
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
function je(e) {
|
|
169
|
-
const s = { x: e.x1, y: e.y1 }, t = { x: e.x2, y: e.y2 }, a = { x: e.x1, y: e.y1 }, f = {
|
|
170
|
-
x: u.value.width / 2,
|
|
171
|
-
y: u.value.height / 2 + l.value.style.circle.offsetY
|
|
172
|
-
}, c = 0.5, Y = Math.pow(1 - c, 3) * s.x + 3 * Math.pow(1 - c, 2) * c * a.x + 3 * (1 - c) * Math.pow(c, 2) * f.x + Math.pow(c, 3) * t.x, q = Math.pow(1 - c, 3) * s.y + 3 * Math.pow(1 - c, 2) * c * a.y + 3 * (1 - c) * Math.pow(c, 2) * f.y + Math.pow(c, 3) * t.y;
|
|
173
|
-
return { x: Y, y: q };
|
|
174
|
-
}
|
|
175
|
-
const Ue = y(() => Math.max(...m.value.map((e) => e.weight)));
|
|
176
|
-
function Ve(e) {
|
|
177
|
-
return Object.hasOwn(d.value, "x") ? p.value.includes(e.id) ? "opacity:1" : "opacity:0.1" : "opacity:1";
|
|
178
|
-
}
|
|
179
|
-
function w(e) {
|
|
180
|
-
return e.colorSource;
|
|
181
|
-
}
|
|
182
|
-
function me(e) {
|
|
183
|
-
return Object.hasOwn(d.value, "x") ? p.value.includes(e.id) && e.relationId === `${e.id}_${d.value.id}` || e.relationId === `${d.value.id}_${e.id}` ? `opacity:1;stroke-width:${D(e)}` : "opacity: 0" : "opacity: 1";
|
|
184
|
-
}
|
|
185
|
-
function L(e) {
|
|
186
|
-
return Object.hasOwn(d.value, "x") ? !!(p.value.includes(e.id) && e.relationId === `${e.id}_${d.value.id}` || e.relationId === `${d.value.id}_${e.id}`) : !1;
|
|
187
|
-
}
|
|
188
|
-
function Ge(e) {
|
|
189
|
-
return e.regAngle > 90 && e.regAngle < 270 ? "end" : "start";
|
|
190
|
-
}
|
|
191
|
-
function We(e) {
|
|
192
|
-
return e.regAngle > 90 && e.regAngle < 270 ? e.x - 5 : e.x + 5;
|
|
193
|
-
}
|
|
194
|
-
function De(e) {
|
|
195
|
-
return Object.hasOwn(d.value, "x") ? d.value.id === e.id || p.value.includes(e.id) ? "opacity:1" : "opacity:0.2" : "opacity:1";
|
|
196
|
-
}
|
|
197
|
-
function Xe(e) {
|
|
198
|
-
return e.regAngle > 90 && e.regAngle < 270 ? `rotate(${e.regAngle + 180},${e.x},${e.y})` : `rotate(${e.regAngle},${e.x},${e.y})`;
|
|
199
|
-
}
|
|
200
|
-
function pe(e) {
|
|
201
|
-
Re.value = 360 - e.regAngle, d.value.id && e.id === d.value.id ? (d.value = {}, p.value = []) : (d.value = e, p.value = [...e.relations]);
|
|
202
|
-
}
|
|
203
|
-
function D(e) {
|
|
204
|
-
const s = e.weight / Ue.value * l.value.style.links.maxWidth;
|
|
205
|
-
return Math.max(0.3, s);
|
|
206
|
-
}
|
|
207
|
-
const M = o(!1);
|
|
208
|
-
function ke(e) {
|
|
209
|
-
M.value = e, Z.value += 1;
|
|
210
|
-
}
|
|
211
|
-
const R = o(!1);
|
|
212
|
-
function X() {
|
|
213
|
-
R.value = !R.value;
|
|
214
|
-
}
|
|
215
|
-
async function Ye({ scale: e = 2 } = {}) {
|
|
216
|
-
if (!x.value) return;
|
|
217
|
-
const { width: s, height: t } = x.value.getBoundingClientRect(), a = s / t, { imageUri: f, base64: c } = await pt({ domElement: x.value, base64: !0, img: !0, scale: e });
|
|
218
|
-
return {
|
|
219
|
-
imageUri: f,
|
|
220
|
-
base64: c,
|
|
221
|
-
title: l.value.style.title.text,
|
|
222
|
-
width: s,
|
|
223
|
-
height: t,
|
|
224
|
-
aspectRatio: a
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
return Le({
|
|
228
|
-
getImage: Ye,
|
|
229
|
-
generatePdf: ce,
|
|
230
|
-
generateImage: de,
|
|
231
|
-
toggleAnnotator: X,
|
|
232
|
-
toggleFullscreen: ke
|
|
233
|
-
}), (e, s) => (i(), r("div", {
|
|
234
|
-
ref_key: "relationCircleChart",
|
|
235
|
-
ref: x,
|
|
236
|
-
class: "vue-ui-relation-circle",
|
|
237
|
-
style: O(`width:100%;background:${l.value.style.backgroundColor};text-align:center;${l.value.responsive ? "height: 100%" : ""}`),
|
|
238
|
-
id: `relation_circle_${I.value}`,
|
|
239
|
-
onMouseenter: s[0] || (s[0] = () => n(ie)(!0)),
|
|
240
|
-
onMouseleave: s[1] || (s[1] = () => n(ie)(!1))
|
|
241
|
-
}, [
|
|
242
|
-
l.value.userOptions.buttons.annotator ? (i(), F(n(ze), {
|
|
243
|
-
key: 0,
|
|
244
|
-
svgRef: n(ne),
|
|
245
|
-
backgroundColor: l.value.style.backgroundColor,
|
|
246
|
-
color: l.value.style.color,
|
|
247
|
-
active: R.value,
|
|
248
|
-
onClose: X
|
|
249
|
-
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : v("", !0),
|
|
250
|
-
Me.value ? (i(), r("div", {
|
|
251
|
-
key: 1,
|
|
252
|
-
ref_key: "noTitle",
|
|
253
|
-
ref: le,
|
|
254
|
-
class: "vue-data-ui-no-title-space",
|
|
255
|
-
style: "height:36px; width: 100%;background:transparent"
|
|
256
|
-
}, null, 512)) : v("", !0),
|
|
257
|
-
l.value.style.title.text ? (i(), r("div", {
|
|
258
|
-
key: 2,
|
|
259
|
-
ref_key: "chartTitle",
|
|
260
|
-
ref: ee,
|
|
261
|
-
style: "width:100%;background:transparent"
|
|
262
|
-
}, [
|
|
263
|
-
(i(), F(mt, {
|
|
264
|
-
key: `title_${se.value}`,
|
|
265
|
-
config: {
|
|
266
|
-
title: {
|
|
267
|
-
cy: "relation-div-title",
|
|
268
|
-
...l.value.style.title
|
|
269
|
-
},
|
|
270
|
-
subtitle: {
|
|
271
|
-
cy: "relation-div-subtitle",
|
|
272
|
-
...l.value.style.title.subtitle
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}, null, 8, ["config"]))
|
|
276
|
-
], 512)) : v("", !0),
|
|
277
|
-
l.value.userOptions.show && j.value && (n(ae) || n(U)) ? (i(), F(n(Ie), {
|
|
278
|
-
ref: "details",
|
|
279
|
-
key: `user_options_${Z.value}`,
|
|
280
|
-
backgroundColor: l.value.style.backgroundColor,
|
|
281
|
-
color: l.value.style.color,
|
|
282
|
-
isPrinting: n(ue),
|
|
283
|
-
isImaging: n(oe),
|
|
284
|
-
uid: I.value,
|
|
285
|
-
hasPdf: l.value.userOptions.buttons.pdf,
|
|
286
|
-
hasImg: l.value.userOptions.buttons.img,
|
|
287
|
-
hasFullscreen: l.value.userOptions.buttons.img,
|
|
288
|
-
hasXls: !1,
|
|
289
|
-
isFullscreen: M.value,
|
|
290
|
-
titles: { ...l.value.userOptions.buttonTitles },
|
|
291
|
-
chartElement: x.value,
|
|
292
|
-
position: l.value.userOptions.position,
|
|
293
|
-
hasAnnotator: l.value.userOptions.buttons.annotator,
|
|
294
|
-
isAnnotation: R.value,
|
|
295
|
-
callbacks: l.value.userOptions.callbacks,
|
|
296
|
-
printScale: l.value.userOptions.print.scale,
|
|
297
|
-
onToggleFullscreen: ke,
|
|
298
|
-
onGeneratePdf: n(ce),
|
|
299
|
-
onGenerateImage: n(de),
|
|
300
|
-
onToggleAnnotator: X,
|
|
301
|
-
style: O({
|
|
302
|
-
visibility: n(ae) ? n(U) ? "visible" : "hidden" : "visible"
|
|
303
|
-
})
|
|
304
|
-
}, tt({ _: 2 }, [
|
|
305
|
-
e.$slots.menuIcon ? {
|
|
306
|
-
name: "menuIcon",
|
|
307
|
-
fn: S(({ isOpen: t, color: a }) => [
|
|
308
|
-
h(e.$slots, "menuIcon", B(T({ isOpen: t, color: a })), void 0, !0)
|
|
309
|
-
]),
|
|
310
|
-
key: "0"
|
|
311
|
-
} : void 0,
|
|
312
|
-
e.$slots.optionPdf ? {
|
|
313
|
-
name: "optionPdf",
|
|
314
|
-
fn: S(() => [
|
|
315
|
-
h(e.$slots, "optionPdf", {}, void 0, !0)
|
|
316
|
-
]),
|
|
317
|
-
key: "1"
|
|
318
|
-
} : void 0,
|
|
319
|
-
e.$slots.optionImg ? {
|
|
320
|
-
name: "optionImg",
|
|
321
|
-
fn: S(() => [
|
|
322
|
-
h(e.$slots, "optionImg", {}, void 0, !0)
|
|
323
|
-
]),
|
|
324
|
-
key: "2"
|
|
325
|
-
} : void 0,
|
|
326
|
-
e.$slots.optionFullscreen ? {
|
|
327
|
-
name: "optionFullscreen",
|
|
328
|
-
fn: S(({ toggleFullscreen: t, isFullscreen: a }) => [
|
|
329
|
-
h(e.$slots, "optionFullscreen", B(T({ toggleFullscreen: t, isFullscreen: a })), void 0, !0)
|
|
330
|
-
]),
|
|
331
|
-
key: "3"
|
|
332
|
-
} : void 0,
|
|
333
|
-
e.$slots.optionAnnotator ? {
|
|
334
|
-
name: "optionAnnotator",
|
|
335
|
-
fn: S(({ toggleAnnotator: t, isAnnotator: a }) => [
|
|
336
|
-
h(e.$slots, "optionAnnotator", B(T({ toggleAnnotator: t, isAnnotator: a })), void 0, !0)
|
|
337
|
-
]),
|
|
338
|
-
key: "4"
|
|
339
|
-
} : void 0
|
|
340
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : v("", !0),
|
|
341
|
-
j.value ? (i(), r("svg", {
|
|
342
|
-
key: 4,
|
|
343
|
-
ref_key: "svgRef",
|
|
344
|
-
ref: ne,
|
|
345
|
-
xmlns: n(dt),
|
|
346
|
-
class: H([{ "vue-data-ui-fullscreen--on": M.value, "vue-data-ui-fulscreen--off": !M.value }, "relation-circle"]),
|
|
347
|
-
viewBox: `0 0 ${u.value.width <= 0 ? 10 : u.value.width} ${u.value.height <= 0 ? 10 : u.value.height}`,
|
|
348
|
-
width: "100%",
|
|
349
|
-
style: "user-select:none; background:transparent"
|
|
350
|
-
}, [
|
|
351
|
-
lt(n(Oe)),
|
|
352
|
-
e.$slots["chart-background"] ? (i(), r("foreignObject", {
|
|
353
|
-
key: 0,
|
|
354
|
-
x: 0,
|
|
355
|
-
y: 0,
|
|
356
|
-
width: u.value.width <= 0 ? 10 : u.value.width,
|
|
357
|
-
height: u.value.height <= 0 ? 10 : u.value.height,
|
|
358
|
-
style: {
|
|
359
|
-
pointerEvents: "none"
|
|
360
|
-
}
|
|
361
|
-
}, [
|
|
362
|
-
h(e.$slots, "chart-background", {}, void 0, !0)
|
|
363
|
-
], 8, xt)) : v("", !0),
|
|
364
|
-
st("circle", {
|
|
365
|
-
cx: (u.value.width <= 0 ? 1e-4 : u.value.width) / 2,
|
|
366
|
-
cy: (u.value.height <= 0 ? 1e-4 : u.value.height) / 2 + l.value.style.circle.offsetY,
|
|
367
|
-
r: _.value <= 0 ? 1e-4 : _.value,
|
|
368
|
-
stroke: l.value.style.circle.stroke,
|
|
369
|
-
"stroke-width": l.value.style.circle.strokeWidth,
|
|
370
|
-
fill: "transparent",
|
|
371
|
-
class: "main-circle"
|
|
372
|
-
}, null, 8, $t),
|
|
373
|
-
Ee.value ? (i(), r("g", _t, [
|
|
374
|
-
(i(!0), r(z, null, A(m.value, (t, a) => (i(), r("path", {
|
|
375
|
-
key: `relation_${a}`,
|
|
376
|
-
style: O(me(t)),
|
|
377
|
-
stroke: w(t),
|
|
378
|
-
class: H(["relation", { "vue-ui-relation-circle-selected": d.value.hasOwnProperty("id") && p.value.includes(t.id) }]),
|
|
379
|
-
d: `M${t.x1},${t.y1} C${t.x1},${t.y1} ${u.value.width / 2},${u.value.height / 2 + l.value.style.circle.offsetY} ${t.x2},${t.y2}`,
|
|
380
|
-
fill: "none",
|
|
381
|
-
"stroke-width": D(t),
|
|
382
|
-
"stroke-linecap": "round"
|
|
383
|
-
}, null, 14, Ct))), 128)),
|
|
384
|
-
(i(!0), r(z, null, A(m.value, (t, a) => (i(), r("g", Pt, [
|
|
385
|
-
L(t) ? h(e.$slots, "dataLabel", we({
|
|
386
|
-
key: 0,
|
|
387
|
-
ref_for: !0
|
|
388
|
-
}, {
|
|
389
|
-
x: t.midPointBezier.x,
|
|
390
|
-
y: t.midPointBezier.y,
|
|
391
|
-
color: w(t),
|
|
392
|
-
weight: t.weight,
|
|
393
|
-
fontSize: g.value
|
|
394
|
-
}), void 0, !0) : v("", !0),
|
|
395
|
-
L(t) && !e.$slots.dataLabel ? (i(), r("circle", {
|
|
396
|
-
key: 1,
|
|
397
|
-
cx: t.midPointBezier.x,
|
|
398
|
-
cy: t.midPointBezier.y,
|
|
399
|
-
fill: w(t),
|
|
400
|
-
r: g.value,
|
|
401
|
-
stroke: l.value.style.backgroundColor,
|
|
402
|
-
"stroke-width": "1"
|
|
403
|
-
}, null, 8, Lt)) : v("", !0),
|
|
404
|
-
L(t) && !e.$slots.dataLabel ? (i(), r("text", {
|
|
405
|
-
key: 2,
|
|
406
|
-
x: t.midPointBezier.x,
|
|
407
|
-
y: t.midPointBezier.y + g.value / 3,
|
|
408
|
-
fill: n(_e)(w(t)),
|
|
409
|
-
"text-anchor": "middle",
|
|
410
|
-
"font-size": g.value
|
|
411
|
-
}, N(n(J)(
|
|
412
|
-
l.value.style.weightLabels.formatter,
|
|
413
|
-
t.weight,
|
|
414
|
-
n(K)({
|
|
415
|
-
p: l.value.style.weightLabels.prefix,
|
|
416
|
-
v: t.weight,
|
|
417
|
-
s: l.value.style.weightLabels.suffix,
|
|
418
|
-
r: l.value.style.weightLabels.rounding
|
|
419
|
-
}),
|
|
420
|
-
{ ...t }
|
|
421
|
-
)), 9, Ot)) : v("", !0)
|
|
422
|
-
]))), 256))
|
|
423
|
-
])) : (i(), r("g", zt, [
|
|
424
|
-
(i(!0), r(z, null, A(m.value, (t, a) => (i(), r("line", {
|
|
425
|
-
key: `relation_${a}`,
|
|
426
|
-
stroke: w(t),
|
|
427
|
-
"stroke-width": D(t),
|
|
428
|
-
style: O(me(t)),
|
|
429
|
-
x1: t.x1,
|
|
430
|
-
x2: t.x2,
|
|
431
|
-
y1: t.y1,
|
|
432
|
-
y2: t.y2,
|
|
433
|
-
class: H({ "vue-ui-relation-circle-selected": d.value.hasOwnProperty("id") && p.value.includes(t.id) }),
|
|
434
|
-
"stroke-linecap": "round"
|
|
435
|
-
}, null, 14, At))), 128)),
|
|
436
|
-
(i(!0), r(z, null, A(m.value, (t, a) => (i(), r("g", It, [
|
|
437
|
-
L(t) ? h(e.$slots, "dataLabel", we({
|
|
438
|
-
key: 0,
|
|
439
|
-
ref_for: !0
|
|
440
|
-
}, {
|
|
441
|
-
x: t.midPointLine.x,
|
|
442
|
-
y: t.midPointLine.y,
|
|
443
|
-
color: w(t),
|
|
444
|
-
weight: t.weight,
|
|
445
|
-
fontSize: g.value
|
|
446
|
-
}), void 0, !0) : v("", !0),
|
|
447
|
-
L(t) && !e.$slots.dataLabel && l.value.style.weightLabels.show ? (i(), r("circle", {
|
|
448
|
-
key: 1,
|
|
449
|
-
cx: t.midPointLine.x,
|
|
450
|
-
cy: t.midPointLine.y,
|
|
451
|
-
fill: w(t),
|
|
452
|
-
r: g.value,
|
|
453
|
-
stroke: l.value.style.backgroundColor,
|
|
454
|
-
"stroke-width": "1"
|
|
455
|
-
}, null, 8, St)) : v("", !0),
|
|
456
|
-
L(t) && !e.$slots.dataLabel && l.value.style.weightLabels.show ? (i(), r("text", {
|
|
457
|
-
key: 2,
|
|
458
|
-
x: t.midPointLine.x,
|
|
459
|
-
y: t.midPointLine.y + g.value / 3,
|
|
460
|
-
fill: n(_e)(w(t)),
|
|
461
|
-
"text-anchor": "middle",
|
|
462
|
-
"font-size": g.value
|
|
463
|
-
}, N(n(J)(
|
|
464
|
-
l.value.style.weightLabels.formatter,
|
|
465
|
-
t.weight,
|
|
466
|
-
n(K)({
|
|
467
|
-
p: l.value.style.weightLabels.prefix,
|
|
468
|
-
v: t.weight,
|
|
469
|
-
s: l.value.style.weightLabels.suffix,
|
|
470
|
-
r: l.value.style.weightLabels.rounding
|
|
471
|
-
}),
|
|
472
|
-
{ ...t }
|
|
473
|
-
)), 9, Mt)) : v("", !0)
|
|
474
|
-
]))), 256))
|
|
475
|
-
])),
|
|
476
|
-
(i(!0), r(z, null, A($.value, (t, a) => (i(), r("text", {
|
|
477
|
-
key: `plot_text_${a}`,
|
|
478
|
-
"text-anchor": Ge(t),
|
|
479
|
-
transform: Xe(t),
|
|
480
|
-
x: We(t),
|
|
481
|
-
y: t.y + 5,
|
|
482
|
-
onClick: (f) => pe(t),
|
|
483
|
-
class: "vue-ui-relation-circle-legend",
|
|
484
|
-
"transform-origin": "start",
|
|
485
|
-
"font-weight": d.value.id === t.id ? "900" : "400",
|
|
486
|
-
style: O(`font-family:${l.value.style.fontFamily};${De(t)}`),
|
|
487
|
-
"font-size": W.value,
|
|
488
|
-
fill: l.value.style.labels.color
|
|
489
|
-
}, N(t.label) + " (" + N(n(J)(
|
|
490
|
-
l.value.style.weightLabels.formatter,
|
|
491
|
-
t.totalWeight,
|
|
492
|
-
n(K)({
|
|
493
|
-
p: l.value.style.weightLabels.prefix,
|
|
494
|
-
v: t.totalWeight,
|
|
495
|
-
s: l.value.style.weightLabels.suffix,
|
|
496
|
-
r: l.value.style.weightLabels.rounding
|
|
497
|
-
}),
|
|
498
|
-
{ ...t }
|
|
499
|
-
)) + ") ", 13, Rt))), 128)),
|
|
500
|
-
(i(!0), r(z, null, A($.value, (t, a) => (i(), r("circle", {
|
|
501
|
-
cx: t.x,
|
|
502
|
-
cy: t.y,
|
|
503
|
-
key: `plot_${a}`,
|
|
504
|
-
style: O(Ve(t)),
|
|
505
|
-
class: "vue-ui-relation-circle-plot",
|
|
506
|
-
fill: l.value.style.plot.useSerieColor ? t.color : l.value.style.plot.color,
|
|
507
|
-
stroke: l.value.style.backgroundColor,
|
|
508
|
-
"stroke-width": "1",
|
|
509
|
-
onClick: (f) => pe(t),
|
|
510
|
-
r: G.value
|
|
511
|
-
}, null, 12, Et))), 128)),
|
|
512
|
-
h(e.$slots, "svg", { svg: u.value }, void 0, !0)
|
|
513
|
-
], 10, wt)) : v("", !0),
|
|
514
|
-
e.$slots.watermark ? (i(), r("div", Ft, [
|
|
515
|
-
h(e.$slots, "watermark", B(T({ isPrinting: n(ue) || n(oe) })), void 0, !0)
|
|
516
|
-
])) : v("", !0),
|
|
517
|
-
e.$slots.source ? (i(), r("div", {
|
|
518
|
-
key: 6,
|
|
519
|
-
ref_key: "source",
|
|
520
|
-
ref: te,
|
|
521
|
-
dir: "auto"
|
|
522
|
-
}, [
|
|
523
|
-
h(e.$slots, "source", {}, void 0, !0)
|
|
524
|
-
], 512)) : v("", !0),
|
|
525
|
-
j.value ? v("", !0) : (i(), F(n(Ae), {
|
|
526
|
-
key: 7,
|
|
527
|
-
config: {
|
|
528
|
-
type: "relationCircle",
|
|
529
|
-
style: {
|
|
530
|
-
backgroundColor: l.value.style.backgroundColor,
|
|
531
|
-
relationCircle: {
|
|
532
|
-
color: "#CCCCCC"
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
}, null, 8, ["config"]))
|
|
537
|
-
], 44, bt));
|
|
538
|
-
}
|
|
539
|
-
}, qt = /* @__PURE__ */ kt(Bt, [["__scopeId", "data-v-83eab99c"]]);
|
|
540
|
-
export {
|
|
541
|
-
qt as default
|
|
542
|
-
};
|