vue-data-ui 3.0.0-next.9 → 3.0.1

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.
Files changed (144) hide show
  1. package/README.md +32 -30
  2. package/dist/{Arrow-B6OlqyCG.js → Arrow-DQoWnUfD.js} +1 -1
  3. package/dist/{BaseDraggableDialog-CA8QOk7L.js → BaseDraggableDialog-DEw6oieL.js} +4 -4
  4. package/dist/{BaseIcon-DxUUKVlt.js → BaseIcon-DEl03NUZ.js} +1 -1
  5. package/dist/{ColorPicker-Bh1dfgXt.js → ColorPicker-CrivFZqC.js} +2 -2
  6. package/dist/{DataTable--paavNqF.js → DataTable-ClgCsiJA.js} +2 -2
  7. package/dist/{Legend-BZ06qU55.js → Legend-CMvJ6X5j.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-DN9XjEHv.js → NonSvgPenAndPaper-B2Wvbl3p.js} +3 -3
  9. package/dist/{PackageVersion-2QvaZf9_.js → PackageVersion-CD5VH_Al.js} +3 -3
  10. package/dist/{PenAndPaper-hGgW0EHz.js → PenAndPaper-D3WRn-G2.js} +32 -32
  11. package/dist/{RecursiveCircles-Dn3TGoL6.js → RecursiveCircles-BcLb1aRS.js} +15 -13
  12. package/dist/RecursiveLabels-Bgcv0pzu.js +50 -0
  13. package/dist/{RecursiveLinks-ld_gDZH4.js → RecursiveLinks-00zGWPf9.js} +20 -18
  14. package/dist/{Shape-Mr1eIp_G.js → Shape-Adi9i_-f.js} +43 -37
  15. package/dist/Slicer-t6e1t2iM.js +602 -0
  16. package/dist/{SparkTooltip-Czhz446b.js → SparkTooltip-B8OnBSvk.js} +7 -7
  17. package/dist/{Title-B2dA6-uH.js → Title-xTWR-Vil.js} +1 -1
  18. package/dist/{Tooltip-O_hCvqgF.js → Tooltip-BH3CiANh.js} +23 -19
  19. package/dist/{UserOptions-Bk03FRqW.js → UserOptions-CKKPgDLV.js} +2 -2
  20. package/dist/{dom-to-png-Bt5F9TXw.js → dom-to-png-C4hj491O.js} +1 -1
  21. package/dist/{img-C_9wps3s.js → img-Vb4QHAHI.js} +1 -1
  22. package/dist/{index-CgShIRes.js → index-Dzc2Gi60.js} +2885 -2010
  23. package/dist/{pdf-CXdbjyRJ.js → pdf-ddpqw-dt.js} +1 -1
  24. package/dist/style.css +1 -1
  25. package/dist/types/vue-data-ui.d.cts +753 -65
  26. package/dist/types/vue-data-ui.d.ts +753 -65
  27. package/dist/useAutoSizeLabelsInsideViewbox-CN_Jh8Hr.js +81 -0
  28. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  29. package/dist/useLoading-D7YHNtLX.js +29 -0
  30. package/dist/useNestedProp-CjnS13nF.js +13 -0
  31. package/dist/usePanZoom-BVca3eMk.js +122 -0
  32. package/dist/{usePrinter-rIrqBbbm.js → usePrinter-DBRh8ZvS.js} +2 -2
  33. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  34. package/dist/{useTimeLabels-DG97x2hL.js → useTimeLabels-DkzmKfZn.js} +208 -156
  35. package/dist/{vue-data-ui-DiwfJSwC.js → vue-data-ui-B7ztqj9-.js} +105 -100
  36. package/dist/vue-data-ui.js +26 -25
  37. package/dist/vue-ui-3d-bar-DUmYPtHl.js +1323 -0
  38. package/dist/{vue-ui-accordion-hlzscmAS.js → vue-ui-accordion-CPk8wAuj.js} +3 -3
  39. package/dist/vue-ui-age-pyramid-Bv5HmeXj.js +835 -0
  40. package/dist/{vue-ui-annotator-BHwBUNRO.js → vue-ui-annotator-KXWlIhtd.js} +12 -12
  41. package/dist/vue-ui-bullet-B4N4mBk9.js +571 -0
  42. package/dist/vue-ui-candlestick-DENvPnUO.js +1000 -0
  43. package/dist/{vue-ui-carousel-table-6MTDYf-H.js → vue-ui-carousel-table-vC2bHBaY.js} +29 -29
  44. package/dist/{vue-ui-chestnut-Cr6dK21e.js → vue-ui-chestnut-2nS0StrY.js} +664 -536
  45. package/dist/vue-ui-chord-CyfS6vNM.js +1038 -0
  46. package/dist/vue-ui-circle-pack-C4JR-0fx.js +709 -0
  47. package/dist/{vue-ui-cursor-Ch5yUxNn.js → vue-ui-cursor-BgeSDtQh.js} +2 -2
  48. package/dist/{vue-ui-dashboard-tVZ9aEHo.js → vue-ui-dashboard-9DWUBJ-I.js} +64 -64
  49. package/dist/{vue-ui-digits-BOlYLluF.js → vue-ui-digits-BQO7IBFA.js} +2 -2
  50. package/dist/{vue-ui-donut-BKwAnTKA.js → vue-ui-donut-C-ZJXJ74.js} +431 -422
  51. package/dist/vue-ui-donut-evolution-B870IrQA.js +1076 -0
  52. package/dist/vue-ui-dumbbell-Cfs2Uotx.js +1120 -0
  53. package/dist/vue-ui-flow-DnaUVVAD.js +841 -0
  54. package/dist/{vue-ui-funnel-CAV6A--C.js → vue-ui-funnel-B9s-H5ZG.js} +16 -16
  55. package/dist/vue-ui-galaxy-BoJOczdh.js +680 -0
  56. package/dist/vue-ui-gauge-qjm4BqZR.js +791 -0
  57. package/dist/vue-ui-gizmo-fn7ZaMTI.js +210 -0
  58. package/dist/vue-ui-heatmap-CIBDKhh8.js +1078 -0
  59. package/dist/vue-ui-history-plot-bbNxldYG.js +1074 -0
  60. package/dist/{vue-ui-kpi-DjHXc1Z9.js → vue-ui-kpi-BX-2jhLx.js} +26 -26
  61. package/dist/{vue-ui-mini-loader-C68r9wbr.js → vue-ui-mini-loader-Bn1Bb8-J.js} +2 -2
  62. package/dist/vue-ui-molecule-DQ3qFtBq.js +656 -0
  63. package/dist/vue-ui-mood-radar-Cf-ehIo1.js +785 -0
  64. package/dist/vue-ui-nested-donuts-CWg5BEi-.js +1284 -0
  65. package/dist/vue-ui-onion-sHgQTYfa.js +776 -0
  66. package/dist/vue-ui-parallel-coordinate-plot-Ki3ITp_s.js +916 -0
  67. package/dist/{vue-ui-quadrant-ULvVhjjq.js → vue-ui-quadrant-BIVqW7U7.js} +512 -459
  68. package/dist/vue-ui-quick-chart-C_hvHc1b.js +1762 -0
  69. package/dist/vue-ui-radar-RZUPyPwB.js +796 -0
  70. package/dist/{vue-ui-rating-CkdVnYpj.js → vue-ui-rating-BI8Vk7dO.js} +2 -2
  71. package/dist/vue-ui-relation-circle-TVMUEtxK.js +598 -0
  72. package/dist/vue-ui-ridgeline-DQeXHQG4.js +1157 -0
  73. package/dist/vue-ui-rings-BH81WmMS.js +728 -0
  74. package/dist/vue-ui-scatter-Cy7Tz_An.js +1178 -0
  75. package/dist/{vue-ui-skeleton-BsBaCvoE.js → vue-ui-skeleton-CF50qQxr.js} +13 -13
  76. package/dist/{vue-ui-smiley-B2sBY2Q-.js → vue-ui-smiley-CrFXEbJs.js} +46 -46
  77. package/dist/vue-ui-spark-trend-DtHArnot.js +315 -0
  78. package/dist/vue-ui-sparkbar-CIOwFFgA.js +351 -0
  79. package/dist/vue-ui-sparkgauge-E0DdGotz.js +232 -0
  80. package/dist/vue-ui-sparkhistogram-Dm7WoyjY.js +380 -0
  81. package/dist/vue-ui-sparkline-DoW6DDKT.js +513 -0
  82. package/dist/vue-ui-sparkstackbar-BJnPUWY4.js +421 -0
  83. package/dist/vue-ui-stackbar-Du42smPs.js +1371 -0
  84. package/dist/vue-ui-strip-plot-DnenGI-d.js +916 -0
  85. package/dist/{vue-ui-table-DaE8lQuo.js → vue-ui-table-BQOQVlHr.js} +17 -17
  86. package/dist/{vue-ui-table-heatmap--dSEG8cU.js → vue-ui-table-heatmap-BzK4_gsP.js} +5 -5
  87. package/dist/{vue-ui-table-sparkline-D4DkGvDP.js → vue-ui-table-sparkline-B-IwcT8I.js} +19 -16
  88. package/dist/vue-ui-thermometer-06ao_Pj5.js +541 -0
  89. package/dist/{vue-ui-timer-CYXTAh6x.js → vue-ui-timer-CxQq4roK.js} +5 -5
  90. package/dist/vue-ui-tiremarks-CuTxkByj.js +406 -0
  91. package/dist/vue-ui-treemap-BgHhRpiV.js +1035 -0
  92. package/dist/{vue-ui-vertical-bar-CO9eR1ty.js → vue-ui-vertical-bar-CAcsUUCo.js} +104 -102
  93. package/dist/vue-ui-waffle-Ct3Upw3m.js +910 -0
  94. package/dist/vue-ui-wheel-oz06Kt-p.js +379 -0
  95. package/dist/vue-ui-word-cloud-BRy7fg4S.js +765 -0
  96. package/dist/{vue-ui-world-P45Plcqw.js → vue-ui-world-CTV-YfFN.js} +364 -327
  97. package/dist/vue-ui-xy-DqCy9dpa.js +3808 -0
  98. package/dist/{vue-ui-xy-canvas-DgNBgUak.js → vue-ui-xy-canvas-BZdhKUIp.js} +265 -264
  99. package/package.json +4 -4
  100. package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
  101. package/dist/Slicer-3t0HimeE.js +0 -577
  102. package/dist/useLoading-Bt5Doa8m.js +0 -28
  103. package/dist/useNestedProp-BC4Ciblw.js +0 -13
  104. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  105. package/dist/vue-ui-3d-bar-BqmzX9u4.js +0 -1227
  106. package/dist/vue-ui-age-pyramid-eRPt0BJb.js +0 -746
  107. package/dist/vue-ui-bullet-BSnF2gql.js +0 -513
  108. package/dist/vue-ui-candlestick-kMbNnoYe.js +0 -873
  109. package/dist/vue-ui-chord-Dxy_bfIE.js +0 -949
  110. package/dist/vue-ui-circle-pack-I_p4FPiW.js +0 -673
  111. package/dist/vue-ui-donut-evolution-DQhZJ4Sa.js +0 -903
  112. package/dist/vue-ui-dumbbell-DdN-7b3g.js +0 -753
  113. package/dist/vue-ui-flow-MvORTthN.js +0 -765
  114. package/dist/vue-ui-galaxy-B0PLMAn8.js +0 -617
  115. package/dist/vue-ui-gauge-C4FTzDFt.js +0 -738
  116. package/dist/vue-ui-gizmo-Dl5FHFb4.js +0 -192
  117. package/dist/vue-ui-heatmap-C3dee43W.js +0 -877
  118. package/dist/vue-ui-history-plot-dqv4u1Oa.js +0 -924
  119. package/dist/vue-ui-molecule-DtRAlfhC.js +0 -597
  120. package/dist/vue-ui-mood-radar-BZj2G0zE.js +0 -670
  121. package/dist/vue-ui-nested-donuts-OqJTwMb2.js +0 -1212
  122. package/dist/vue-ui-onion-DXLokGec.js +0 -701
  123. package/dist/vue-ui-parallel-coordinate-plot-tg7QhtIE.js +0 -807
  124. package/dist/vue-ui-quick-chart-4EODniQ3.js +0 -1612
  125. package/dist/vue-ui-radar-Dt5p5oSy.js +0 -741
  126. package/dist/vue-ui-relation-circle-_SysXj9T.js +0 -542
  127. package/dist/vue-ui-ridgeline-Cs5UihNN.js +0 -969
  128. package/dist/vue-ui-rings-Duay-EmS.js +0 -685
  129. package/dist/vue-ui-scatter-C6oGQcbL.js +0 -1045
  130. package/dist/vue-ui-spark-trend-CEAqGu3d.js +0 -291
  131. package/dist/vue-ui-sparkbar-ByPUDc6x.js +0 -301
  132. package/dist/vue-ui-sparkgauge-C-GKwevJ.js +0 -201
  133. package/dist/vue-ui-sparkhistogram-Dz0DdaVW.js +0 -313
  134. package/dist/vue-ui-sparkline-BULntz_U.js +0 -459
  135. package/dist/vue-ui-sparkstackbar-DXjHOeeU.js +0 -381
  136. package/dist/vue-ui-stackbar-CeP9n7zy.js +0 -1207
  137. package/dist/vue-ui-strip-plot-CaFQkWV8.js +0 -761
  138. package/dist/vue-ui-thermometer-BXf14CYH.js +0 -495
  139. package/dist/vue-ui-tiremarks-D6hJ1cd4.js +0 -358
  140. package/dist/vue-ui-treemap-tBurCrdn.js +0 -965
  141. package/dist/vue-ui-waffle-BNzs_BxY.js +0 -863
  142. package/dist/vue-ui-wheel-tydUATi8.js +0 -352
  143. package/dist/vue-ui-word-cloud-DUUc_tj6.js +0 -659
  144. package/dist/vue-ui-xy--HToGdle.js +0 -2982
@@ -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-CgShIRes.js";
3
- import { t as vt, u as ft } from "./useResponsive-DfdjqQps.js";
4
- import { u as Ce } from "./useNestedProp-BC4Ciblw.js";
5
- import { u as yt } from "./usePrinter-rIrqBbbm.js";
6
- import { u as ht } from "./useUserOptionState-BIvW1Kz7.js";
7
- import { u as gt } from "./useChartAccessibility-9icAAmYg.js";
8
- import mt from "./Title-B2dA6-uH.js";
9
- import pt from "./img-C_9wps3s.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-2QvaZf9_.js")), ze = E(() => import("./PenAndPaper-hGgW0EHz.js")), Ae = E(() => import("./vue-ui-skeleton-BsBaCvoE.js")), Ie = E(() => import("./UserOptions-Bk03FRqW.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
- };