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