vue-data-ui 3.0.0-next.7 → 3.0.0-next.71

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 (137) hide show
  1. package/dist/{Arrow-Bl8urcli.js → Arrow-BZNpld6u.js} +1 -1
  2. package/dist/{BaseDraggableDialog-CyhpaZU5.js → BaseDraggableDialog-kg-eVvXZ.js} +2 -2
  3. package/dist/{BaseIcon-BCZfTCeM.js → BaseIcon-BdOEhJar.js} +1 -1
  4. package/dist/{ColorPicker-CSJf42vx.js → ColorPicker-CWvXlPxS.js} +2 -2
  5. package/dist/{DataTable-mQ6Wd-rR.js → DataTable-B3yakHEM.js} +2 -2
  6. package/dist/{Legend-B2hrDh4G.js → Legend-DiGLrlzP.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-DQ8KsK4W.js → NonSvgPenAndPaper-C-ZjpJQd.js} +3 -3
  8. package/dist/{PackageVersion-CeEYZfaH.js → PackageVersion-6s4eI8W7.js} +1 -1
  9. package/dist/{PenAndPaper-DhSxfUrQ.js → PenAndPaper-JoUN7Ink.js} +3 -3
  10. package/dist/{Shape-C2qH26wh.js → Shape-CWIa2nta.js} +43 -37
  11. package/dist/Slicer-DYuvPkEM.js +602 -0
  12. package/dist/{SparkTooltip-BcHgW6YX.js → SparkTooltip-C_fUmbP7.js} +1 -1
  13. package/dist/{Title-B7Xb3YuE.js → Title-VLWyIYrj.js} +1 -1
  14. package/dist/{Tooltip-BidRoM5E.js → Tooltip-BS5naLS2.js} +23 -19
  15. package/dist/{UserOptions-0tvMM8PF.js → UserOptions-BV_xM-sB.js} +2 -2
  16. package/dist/{dom-to-png-CTrlbKHr.js → dom-to-png-PUk0ukSG.js} +1 -1
  17. package/dist/{img-D72yZNUg.js → img-DD_2wgY3.js} +1 -1
  18. package/dist/{index-Cg-RjxqH.js → index-DKpp7RIH.js} +2236 -1505
  19. package/dist/{pdf-DgX01_wu.js → pdf-0TQQyXWM.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +610 -22
  22. package/dist/types/vue-data-ui.d.ts +610 -22
  23. package/dist/useAutoSizeLabelsInsideViewbox-Qhry5WvH.js +81 -0
  24. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  25. package/dist/useLoading-D7YHNtLX.js +29 -0
  26. package/dist/useNestedProp-D-8c0o4p.js +13 -0
  27. package/dist/usePanZoom-BVca3eMk.js +122 -0
  28. package/dist/{usePrinter-BUzmyQf9.js → usePrinter-NUeckmCX.js} +2 -2
  29. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  30. package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
  31. package/dist/{vue-data-ui-DpO93ey5.js → vue-data-ui-BIXXEsFZ.js} +105 -100
  32. package/dist/vue-data-ui.js +23 -22
  33. package/dist/vue-ui-3d-bar-CVUfj12F.js +1323 -0
  34. package/dist/{vue-ui-accordion-CRomxzaL.js → vue-ui-accordion-Cpovz3RE.js} +3 -3
  35. package/dist/vue-ui-age-pyramid-CQWFaHLV.js +834 -0
  36. package/dist/{vue-ui-annotator-BAOxPiFx.js → vue-ui-annotator-C49Xw5Mh.js} +2 -2
  37. package/dist/vue-ui-bullet-DED2SuIa.js +571 -0
  38. package/dist/vue-ui-candlestick-DGgbevy6.js +999 -0
  39. package/dist/{vue-ui-carousel-table-DVGlPZIa.js → vue-ui-carousel-table-DKIgSB1T.js} +29 -29
  40. package/dist/{vue-ui-chestnut-P1v4ffD0.js → vue-ui-chestnut-D1bEM91d.js} +5 -5
  41. package/dist/vue-ui-chord-CBLSqtEP.js +1038 -0
  42. package/dist/{vue-ui-circle-pack-FXmemXgl.js → vue-ui-circle-pack-g2ts9NTG.js} +24 -24
  43. package/dist/{vue-ui-cursor-CdvMgIrP.js → vue-ui-cursor-DSxmPUD8.js} +2 -2
  44. package/dist/{vue-ui-dashboard-Vke0452J.js → vue-ui-dashboard-B6FfoNjQ.js} +62 -62
  45. package/dist/{vue-ui-digits-BVhyYqCs.js → vue-ui-digits-DKffQVgr.js} +2 -2
  46. package/dist/{vue-ui-donut-BpIivKcf.js → vue-ui-donut-CJrWc4-g.js} +320 -308
  47. package/dist/vue-ui-donut-evolution-Bys6cs-D.js +1075 -0
  48. package/dist/vue-ui-dumbbell-Cb_I__qC.js +1119 -0
  49. package/dist/vue-ui-flow-BzuT3ij5.js +841 -0
  50. package/dist/{vue-ui-funnel-BbFmbsft.js → vue-ui-funnel-Ctp7GDiN.js} +16 -16
  51. package/dist/vue-ui-galaxy-CRBy0aio.js +680 -0
  52. package/dist/vue-ui-gauge-NcQq5UFr.js +791 -0
  53. package/dist/vue-ui-gizmo-Cwfb8c-0.js +210 -0
  54. package/dist/vue-ui-heatmap-DElqpFVY.js +1078 -0
  55. package/dist/vue-ui-history-plot-De1Dvnhw.js +1073 -0
  56. package/dist/{vue-ui-kpi-jN_yMnLj.js → vue-ui-kpi-_bLScmgO.js} +26 -26
  57. package/dist/{vue-ui-mini-loader-rYr76x8g.js → vue-ui-mini-loader-PsHE_2Wy.js} +2 -2
  58. package/dist/{vue-ui-molecule-BWZHOQLi.js → vue-ui-molecule-CgiahnC6.js} +53 -51
  59. package/dist/vue-ui-mood-radar-dXVOOrhl.js +785 -0
  60. package/dist/vue-ui-nested-donuts-C0X6BetT.js +1286 -0
  61. package/dist/vue-ui-onion-C7sxQzk_.js +776 -0
  62. package/dist/vue-ui-parallel-coordinate-plot-jwtnNX59.js +915 -0
  63. package/dist/{vue-ui-quadrant-BFFzfDw3.js → vue-ui-quadrant-DguDE91h.js} +512 -459
  64. package/dist/vue-ui-quick-chart-BpEDS08U.js +1761 -0
  65. package/dist/vue-ui-radar-lFrqTRqo.js +796 -0
  66. package/dist/{vue-ui-rating-BAauyqTn.js → vue-ui-rating-BHghXziv.js} +2 -2
  67. package/dist/vue-ui-relation-circle-C5W6NFOb.js +598 -0
  68. package/dist/vue-ui-ridgeline-A2DuFEDS.js +1153 -0
  69. package/dist/vue-ui-rings-BgJAm9_b.js +728 -0
  70. package/dist/vue-ui-scatter-COfpLChz.js +1178 -0
  71. package/dist/{vue-ui-skeleton-CUOhCY4p.js → vue-ui-skeleton-DMLCBUtZ.js} +3 -3
  72. package/dist/{vue-ui-smiley-B6SqWMov.js → vue-ui-smiley-ZopESYc_.js} +26 -26
  73. package/dist/vue-ui-spark-trend-CuSQ03fQ.js +315 -0
  74. package/dist/vue-ui-sparkbar-BCsX9M4q.js +351 -0
  75. package/dist/vue-ui-sparkgauge-DdyZLA0T.js +232 -0
  76. package/dist/vue-ui-sparkhistogram-CUxFgIcE.js +380 -0
  77. package/dist/vue-ui-sparkline-DOkofsLL.js +489 -0
  78. package/dist/vue-ui-sparkstackbar-Bq9PZzmH.js +421 -0
  79. package/dist/vue-ui-stackbar-B7ceoT0V.js +1370 -0
  80. package/dist/vue-ui-strip-plot-DYh-NGQN.js +915 -0
  81. package/dist/{vue-ui-table-heatmap-DazTE3fa.js → vue-ui-table-heatmap-BVTb1xuA.js} +5 -5
  82. package/dist/{vue-ui-table-Dwjl3L0p.js → vue-ui-table-pESH5KAJ.js} +11 -11
  83. package/dist/{vue-ui-table-sparkline-BXMPUEpN.js → vue-ui-table-sparkline-Bw-6l9lA.js} +14 -14
  84. package/dist/vue-ui-thermometer-BqqfmS-B.js +541 -0
  85. package/dist/{vue-ui-timer-yLvNAZL_.js → vue-ui-timer-CVisMxLS.js} +5 -5
  86. package/dist/vue-ui-tiremarks-K1dcCdpj.js +406 -0
  87. package/dist/vue-ui-treemap-Bz3c68s4.js +1035 -0
  88. package/dist/{vue-ui-vertical-bar-BrYCoVym.js → vue-ui-vertical-bar-BvtXpCjw.js} +71 -69
  89. package/dist/vue-ui-waffle-CYO7bIf1.js +910 -0
  90. package/dist/vue-ui-wheel-De1spwLh.js +379 -0
  91. package/dist/vue-ui-word-cloud-BMmVrx_T.js +765 -0
  92. package/dist/{vue-ui-world-B4Dqrk4l.js → vue-ui-world-Ccpr00nJ.js} +11 -9
  93. package/dist/vue-ui-xy-D4jaRKe3.js +3771 -0
  94. package/dist/{vue-ui-xy-canvas-D7fL36kT.js → vue-ui-xy-canvas-DE-Uu5oq.js} +265 -264
  95. package/package.json +1 -1
  96. package/dist/Slicer-BD8Z8VCW.js +0 -577
  97. package/dist/useLoading-Bt5Doa8m.js +0 -28
  98. package/dist/useNestedProp-C_G5E08Y.js +0 -13
  99. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  100. package/dist/vue-ui-3d-bar-D8imUwEz.js +0 -1227
  101. package/dist/vue-ui-age-pyramid-CV7gtFOC.js +0 -746
  102. package/dist/vue-ui-bullet-BtuMMBF7.js +0 -513
  103. package/dist/vue-ui-candlestick-BsRtXKrv.js +0 -873
  104. package/dist/vue-ui-chord-CIuzYmpM.js +0 -949
  105. package/dist/vue-ui-donut-evolution-BRlsCA4U.js +0 -903
  106. package/dist/vue-ui-dumbbell-D87Dumjh.js +0 -753
  107. package/dist/vue-ui-flow-D_L_xssL.js +0 -765
  108. package/dist/vue-ui-galaxy-Cn6vHbaw.js +0 -617
  109. package/dist/vue-ui-gauge-Ds4terqY.js +0 -738
  110. package/dist/vue-ui-gizmo-BTncpI62.js +0 -192
  111. package/dist/vue-ui-heatmap-B6GpjeWC.js +0 -877
  112. package/dist/vue-ui-history-plot-DTDzEeGq.js +0 -924
  113. package/dist/vue-ui-mood-radar-CPfS6f1L.js +0 -670
  114. package/dist/vue-ui-nested-donuts-Bsd2kGoJ.js +0 -1177
  115. package/dist/vue-ui-onion-BQ4nISXW.js +0 -701
  116. package/dist/vue-ui-parallel-coordinate-plot-BoHgVgbn.js +0 -807
  117. package/dist/vue-ui-quick-chart-oNMTeOAL.js +0 -1612
  118. package/dist/vue-ui-radar-98mXFZe-.js +0 -741
  119. package/dist/vue-ui-relation-circle-6oDCSxkO.js +0 -542
  120. package/dist/vue-ui-ridgeline-CugMGjOU.js +0 -969
  121. package/dist/vue-ui-rings-bsGXaD2m.js +0 -685
  122. package/dist/vue-ui-scatter-7ssLliGg.js +0 -1045
  123. package/dist/vue-ui-spark-trend-jauInkkN.js +0 -291
  124. package/dist/vue-ui-sparkbar-DXByIxQH.js +0 -301
  125. package/dist/vue-ui-sparkgauge-BMrV2gDi.js +0 -201
  126. package/dist/vue-ui-sparkhistogram-CoNM4G7o.js +0 -313
  127. package/dist/vue-ui-sparkline-DrN3_wS0.js +0 -459
  128. package/dist/vue-ui-sparkstackbar-W1a0JQi9.js +0 -381
  129. package/dist/vue-ui-stackbar-D1-gbUgE.js +0 -1207
  130. package/dist/vue-ui-strip-plot-KhfvrVuN.js +0 -761
  131. package/dist/vue-ui-thermometer-Cn6lJRs3.js +0 -495
  132. package/dist/vue-ui-tiremarks-BYsWePfK.js +0 -358
  133. package/dist/vue-ui-treemap-Ce7RVFG3.js +0 -965
  134. package/dist/vue-ui-waffle-CCrR2T1G.js +0 -863
  135. package/dist/vue-ui-wheel-BuxjnrDN.js +0 -352
  136. package/dist/vue-ui-word-cloud-C6fawHJE.js +0 -659
  137. package/dist/vue-ui-xy-ubRnv9iJ.js +0 -2980
@@ -1,6 +1,6 @@
1
1
  import { ref as $, useSlots as J, onMounted as R, computed as x, watch as Q, 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 Z, 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, _ as I } from "./index-Cg-RjxqH.js";
3
- import { u as ie } from "./useNestedProp-C_G5E08Y.js";
2
+ import { u as te, c as le, o as oe, f as ae, k as b, i as _, X as z, x as X, _ as I } from "./index-DKpp7RIH.js";
3
+ import { u as ie } from "./useNestedProp-D-8c0o4p.js";
4
4
  import { _ as se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const ne = {
6
6
  key: 0,
@@ -0,0 +1,598 @@
1
+ import { useCssVars as ut, computed as h, defineAsyncComponent as Z, ref as r, toRefs as ot, watch as ee, shallowRef as Le, onMounted as rt, onBeforeUnmount as ct, createElementBlock as n, openBlock as i, unref as u, normalizeStyle as z, createBlock as N, createCommentVNode as f, createSlots as vt, withCtx as M, renderSlot as g, normalizeProps as j, guardReactiveProps as D, normalizeClass as te, createVNode as dt, createElementVNode as ft, Fragment as $, renderList as O, mergeProps as Pe, toDisplayString as U, createTextVNode as ze } from "vue";
2
+ import { u as yt, c as ht, t as gt, a as mt, p as Oe, b as pt, d as bt, o as Se, f as Ie, g as kt, X as wt, F as Me, k as le, i as se, E as ae } from "./index-DKpp7RIH.js";
3
+ import { t as xt, u as $t } from "./useResponsive-DfdjqQps.js";
4
+ import { u as At, B as _t } from "./useLoading-D7YHNtLX.js";
5
+ import { u as Ct } from "./usePrinter-NUeckmCX.js";
6
+ import { u as Ee } from "./useNestedProp-D-8c0o4p.js";
7
+ import { u as Lt } from "./useUserOptionState-BIvW1Kz7.js";
8
+ import { u as Pt } from "./useChartAccessibility-9icAAmYg.js";
9
+ import { u as zt } from "./useAutoSizeLabelsInsideViewbox-Qhry5WvH.js";
10
+ import Ot from "./img-DD_2wgY3.js";
11
+ import St from "./Title-VLWyIYrj.js";
12
+ import { _ as It } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
+ const Mt = ["id"], Et = ["xmlns", "viewBox"], Ft = ["width", "height"], Bt = ["cx", "cy", "r", "stroke", "stroke-width"], Rt = { key: 1 }, Tt = ["stroke", "d", "stroke-width"], Nt = { style: { "pointer-events": "none" } }, jt = ["cx", "cy", "fill", "r", "stroke"], Dt = ["x", "y", "fill", "font-size"], Ut = { key: 2 }, Vt = ["stroke", "stroke-width", "x1", "x2", "y1", "y2"], Gt = { style: { "pointer-events": "none" } }, Wt = ["cx", "cy", "fill", "r", "stroke"], Xt = ["x", "y", "fill", "font-size"], Yt = ["text-anchor", "transform", "x", "y", "font-weight", "font-size", "fill", "text-decoration", "onClick", "onMouseenter", "onMouseleave"], qt = ["cx", "cy", "fill", "stroke", "r", "onClick", "onMouseenter", "onMouseleave"], Ht = {
14
+ key: 4,
15
+ class: "vue-data-ui-watermark"
16
+ }, Jt = {
17
+ __name: "vue-ui-relation-circle",
18
+ props: {
19
+ dataset: {
20
+ type: Array,
21
+ default() {
22
+ return [];
23
+ }
24
+ },
25
+ config: {
26
+ type: Object,
27
+ default() {
28
+ return {};
29
+ }
30
+ }
31
+ },
32
+ setup(Fe, { expose: Be }) {
33
+ ut((e) => ({
34
+ "51791a0b": Ye.value,
35
+ "501dae6a": Xe.value,
36
+ "2abe5668": qe.value
37
+ }));
38
+ const Re = Z(() => import("./PenAndPaper-JoUN7Ink.js")), Te = Z(() => import("./UserOptions-BV_xM-sB.js")), Ne = Z(() => import("./PackageVersion-6s4eI8W7.js")), { vue_ui_relation_circle: je } = yt(), m = Fe, De = h(() => !!m.dataset && Object.keys(m.dataset).length), S = r(ht()), ie = r(0), A = r(null), ne = r(null), ue = r(null), oe = r(null), re = r(0), l = r(X()), { loading: ce, FINAL_DATASET: Ue, manualLoading: V } = At({
39
+ ...ot(m),
40
+ FINAL_CONFIG: l,
41
+ prepareConfig: X,
42
+ skeletonDataset: [
43
+ { id: "A", label: "_", relations: ["B", "C", "D", "E", "F", "G"] },
44
+ { id: "B", label: "_", relations: ["A"] },
45
+ { id: "C", label: "_", relations: ["A"] },
46
+ { id: "D", label: "_", relations: ["A"] },
47
+ { id: "E", label: "_", relations: ["A"] },
48
+ { id: "F", label: "_", relations: ["A"] },
49
+ { id: "G", label: "_", relations: ["A"] }
50
+ ],
51
+ skeletonConfig: gt({
52
+ defaultConfig: l.value,
53
+ userConfig: {
54
+ userOptions: { show: !1 },
55
+ customPalette: new Array(7).fill("#CACACA"),
56
+ style: {
57
+ backgroundColor: "#99999930",
58
+ labels: { color: "#6A6A6A" },
59
+ circle: { stroke: "#6A6A6A" },
60
+ plot: { color: "#6A6A6A", useSerieColor: !0 },
61
+ links: { maxWidth: 2 }
62
+ }
63
+ }
64
+ })
65
+ }), { userOptionsVisible: G, setUserOptionsVisibility: ve, keepUserOptionState: de } = Lt({ config: l.value }), { svgRef: W } = Pt({ config: l.value.style.title });
66
+ function X() {
67
+ const e = Ee({
68
+ userConfig: m.config,
69
+ defaultConfig: je
70
+ });
71
+ return e.theme ? {
72
+ ...Ee({
73
+ userConfig: pt.vue_ui_relation_circle[e.theme] || m.config,
74
+ defaultConfig: e
75
+ }),
76
+ customPalette: mt[e.theme] || Oe
77
+ } : e;
78
+ }
79
+ ee(() => m.config, (e) => {
80
+ l.value = X(), G.value = !l.value.userOptions.showOnChartHover, _.value = l.value.style.size, y.value = l.value.style.weightLabels.size, F.value = l.value.style.plot.radius, I.value = l.value.style.labels.fontSize, o.value.height = l.value.style.size, o.value.width = l.value.style.size, be(), re.value += 1;
81
+ }, { deep: !0 }), ee(() => m.dataset, (e) => {
82
+ Array.isArray(e) && e.length > 0 && (V.value = !1);
83
+ }, { deep: !0 });
84
+ const { isPrinting: fe, isImaging: ye, generatePdf: he, generateImage: ge } = Ct({
85
+ elementId: `relation_circle_${S.value}`,
86
+ fileName: l.value.style.title.text || "vue-ui-relation-circle",
87
+ options: l.value.userOptions.print
88
+ }), Ve = h(() => l.value.userOptions.show && !l.value.style.title.text), me = h(() => bt(l.value.customPalette)), k = r([]), p = r([]), d = r({}), b = r([]), Ge = r(0), E = h(() => Ue.value.slice(0, l.value.style.limit).map((e) => {
89
+ const s = Array.isArray(e.relations) ? e.relations : [];
90
+ return {
91
+ ...e,
92
+ weights: Array.isArray(e.weights) ? e.weights : new Array(s.length).fill(1),
93
+ relations: s
94
+ };
95
+ }));
96
+ ee(E, () => {
97
+ k.value = [], p.value = [], Y(), q();
98
+ });
99
+ const _ = r(l.value.style.size), y = r(l.value.style.weightLabels.size), F = r(l.value.style.plot.radius), I = r(l.value.style.labels.fontSize), o = r({
100
+ height: l.value.style.size,
101
+ width: l.value.style.size
102
+ }), C = h({
103
+ get() {
104
+ return _.value * l.value.style.circle.radiusProportion;
105
+ },
106
+ set(e) {
107
+ return e;
108
+ }
109
+ }), We = h(() => l.value.style.links.curved), Xe = h(() => `${l.value.style.animation.speedMs}ms`), Ye = h(() => C.value * 2), qe = h(() => C.value * 4), w = Le(null), L = Le(null);
110
+ rt(() => {
111
+ be(), document.getElementById(`relation_circle_${S.value}`).addEventListener("click", we);
112
+ });
113
+ const pe = h(() => l.value.debug);
114
+ function be() {
115
+ if (Se(m.dataset) ? (Ie({
116
+ componentName: "VueUiRelationCircle",
117
+ type: "dataset",
118
+ debug: pe.value
119
+ }), V.value = !0) : m.dataset.forEach((e, s) => {
120
+ kt({
121
+ datasetObject: e,
122
+ requiredAttributes: ["id", "label", "relations", "weights"]
123
+ }).forEach((t) => {
124
+ Ie({
125
+ componentName: "VueUiRelationCircle",
126
+ type: "datasetSerieAttribute",
127
+ property: t,
128
+ index: s,
129
+ debug: pe.value
130
+ });
131
+ });
132
+ }), Se(m.dataset) || (V.value = l.value.loading), l.value.responsive) {
133
+ const e = xt(() => {
134
+ const { width: s, height: t } = $t({
135
+ chart: A.value,
136
+ title: l.value.style.title.text ? ne.value : null,
137
+ source: ue.value,
138
+ noTitle: oe.value
139
+ });
140
+ requestAnimationFrame(() => {
141
+ _.value = Math.min(s, t), o.value.width = Math.max(0.1, s), o.value.height = Math.max(0.1, t - 12), C.value = _.value * l.value.style.circle.radiusProportion, k.value = [], p.value = [], Y(), q(), ke(), l.value.responsiveProportionalSizing ? (y.value = ae({
142
+ relator: _.value,
143
+ adjuster: l.value.style.size,
144
+ source: l.value.style.weightLabels.size,
145
+ threshold: 6,
146
+ fallback: 6
147
+ }), F.value = ae({
148
+ relator: _.value,
149
+ adjuster: l.value.style.size,
150
+ source: l.value.style.plot.radius,
151
+ threshold: 1,
152
+ fallback: 1
153
+ }), I.value = ae({
154
+ relator: _.value,
155
+ adjuster: l.value.style.size,
156
+ source: l.value.style.labels.fontSize,
157
+ threshold: 6,
158
+ fallback: 6
159
+ })) : (y.value = l.value.style.weightLabels.size, F.value = l.value.style.plot.radius, I.value = l.value.style.labels.fontSize);
160
+ });
161
+ });
162
+ w.value && (L.value && w.value.unobserve(L.value), w.value.disconnect()), w.value = new ResizeObserver(e), L.value = A.value.parentNode, w.value.observe(L.value);
163
+ } else
164
+ k.value = [], p.value = [], Y(), q();
165
+ ke();
166
+ }
167
+ ct(() => {
168
+ document.getElementById(`relation_circle_${S.value}`).removeEventListener("click", we), w.value && (L.value && w.value.unobserve(L.value), w.value.disconnect());
169
+ });
170
+ const { autoSizeLabels: ke } = zt({
171
+ svgRef: W,
172
+ fontSize: l.value.style.labels.fontSize,
173
+ minFontSize: l.value.style.labels.minFontSize,
174
+ sizeRef: I,
175
+ labelClass: ".vue-ui-relation-circle-legend"
176
+ });
177
+ function we(e) {
178
+ const s = e.target;
179
+ 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 = {}, b.value = []);
180
+ }
181
+ function Y() {
182
+ const e = 6.28319 / E.value.length, s = 360 / E.value.length;
183
+ let t = 0, a = 0;
184
+ E.value.forEach((c, v) => {
185
+ const K = c.weights.reduce((it, nt) => it + nt, 0), Q = C.value * Math.cos(t) + o.value.width / 2, at = C.value * Math.sin(t) + o.value.height / 2 + l.value.style.circle.offsetY;
186
+ k.value.push({ x: Q, y: at, ...c, color: c.color ? c.color : me.value[v] ? me.value[v] : Oe[v], regAngle: a, totalWeight: K }), t += e, a += s;
187
+ });
188
+ }
189
+ function He(e, s) {
190
+ const t = (e.x + s.x) / 2, a = (e.y + s.y) / 2;
191
+ return { x: t, y: a };
192
+ }
193
+ function q() {
194
+ p.value = [], k.value.forEach((e) => {
195
+ k.value.filter((t) => t.relations.includes(e.id)).forEach((t, a) => {
196
+ const c = t.relations.indexOf(e.id);
197
+ p.value.push({
198
+ weight: t.weights[c] ? t.weights[c] : 0,
199
+ relationId: `${e.id}_${t.id}`,
200
+ x1: e.x,
201
+ y1: e.y,
202
+ x2: t.x,
203
+ y2: t.y,
204
+ colorSource: e.color,
205
+ colorTarget: t.color,
206
+ midPointLine: He({ x: e.x, y: e.y }, { x: t.x, y: t.y }),
207
+ midPointBezier: Je({
208
+ x1: e.x,
209
+ x2: t.x,
210
+ y1: e.y,
211
+ y2: t.y
212
+ }),
213
+ ...e
214
+ });
215
+ });
216
+ });
217
+ }
218
+ function Je(e) {
219
+ const s = { x: e.x1, y: e.y1 }, t = { x: e.x2, y: e.y2 }, a = { x: e.x1, y: e.y1 }, c = {
220
+ x: o.value.width / 2,
221
+ y: o.value.height / 2 + l.value.style.circle.offsetY
222
+ }, v = 0.5, K = Math.pow(1 - v, 3) * s.x + 3 * Math.pow(1 - v, 2) * v * a.x + 3 * (1 - v) * Math.pow(v, 2) * c.x + Math.pow(v, 3) * t.x, Q = Math.pow(1 - v, 3) * s.y + 3 * Math.pow(1 - v, 2) * v * a.y + 3 * (1 - v) * Math.pow(v, 2) * c.y + Math.pow(v, 3) * t.y;
223
+ return { x: K, y: Q };
224
+ }
225
+ const Ke = h(() => Math.max(...p.value.map((e) => e.weight)));
226
+ function Qe(e) {
227
+ return Object.hasOwn(d.value, "x") ? b.value.includes(e.id) ? "opacity:1" : "opacity:0.1" : "opacity:1";
228
+ }
229
+ function x(e) {
230
+ return e.colorSource;
231
+ }
232
+ function xe(e) {
233
+ return Object.hasOwn(d.value, "x") ? b.value.includes(e.id) && e.relationId === `${e.id}_${d.value.id}` || e.relationId === `${d.value.id}_${e.id}` ? `opacity:1;stroke-width:${H(e)}` : "opacity: 0" : "opacity: 1";
234
+ }
235
+ function P(e) {
236
+ return Object.hasOwn(d.value, "x") ? !!(b.value.includes(e.id) && e.relationId === `${e.id}_${d.value.id}` || e.relationId === `${d.value.id}_${e.id}`) : !1;
237
+ }
238
+ function Ze(e) {
239
+ return e.regAngle > 90 && e.regAngle < 270 ? "end" : "start";
240
+ }
241
+ function et(e) {
242
+ return e.regAngle > 90 && e.regAngle < 270 ? e.x - 5 : e.x + 5;
243
+ }
244
+ function tt(e) {
245
+ return Object.hasOwn(d.value, "x") ? d.value.id === e.id || b.value.includes(e.id) ? "opacity:1" : "opacity:0.2" : "opacity:1";
246
+ }
247
+ function lt(e) {
248
+ return e.regAngle > 90 && e.regAngle < 270 ? `rotate(${e.regAngle + 180},${e.x},${e.y})` : `rotate(${e.regAngle},${e.x},${e.y})`;
249
+ }
250
+ const B = r(null);
251
+ function $e(e, s) {
252
+ B.value = s, l.value.events.datapointEnter && l.value.events.datapointEnter({ datapoint: e, seriesIndex: s });
253
+ }
254
+ function Ae(e, s) {
255
+ B.value = null, l.value.events.datapointLeave && l.value.events.datapointLeave({ datapoint: e, seriesIndex: s });
256
+ }
257
+ function _e(e, s) {
258
+ l.value.events.datapointClick && l.value.events.datapointClick({ datapoint: e, seriesIndex: s }), Ge.value = 360 - e.regAngle, d.value.id && e.id === d.value.id ? (d.value = {}, b.value = []) : (d.value = e, b.value = [...e.relations]);
259
+ }
260
+ function H(e) {
261
+ const s = e.weight / Ke.value * l.value.style.links.maxWidth;
262
+ return Math.max(0.3, s);
263
+ }
264
+ const R = r(!1);
265
+ function Ce(e) {
266
+ R.value = e, ie.value += 1;
267
+ }
268
+ const T = r(!1);
269
+ function J() {
270
+ T.value = !T.value;
271
+ }
272
+ async function st({ scale: e = 2 } = {}) {
273
+ if (!A.value) return;
274
+ const { width: s, height: t } = A.value.getBoundingClientRect(), a = s / t, { imageUri: c, base64: v } = await Ot({ domElement: A.value, base64: !0, img: !0, scale: e });
275
+ return {
276
+ imageUri: c,
277
+ base64: v,
278
+ title: l.value.style.title.text,
279
+ width: s,
280
+ height: t,
281
+ aspectRatio: a
282
+ };
283
+ }
284
+ return Be({
285
+ getImage: st,
286
+ generatePdf: he,
287
+ generateImage: ge,
288
+ toggleAnnotator: J,
289
+ toggleFullscreen: Ce
290
+ }), (e, s) => (i(), n("div", {
291
+ ref_key: "relationCircleChart",
292
+ ref: A,
293
+ class: "vue-ui-relation-circle",
294
+ style: z(`width:100%;background:${l.value.style.backgroundColor};text-align:center;${l.value.responsive ? "height: 100%" : ""}`),
295
+ id: `relation_circle_${S.value}`,
296
+ onMouseenter: s[0] || (s[0] = () => u(ve)(!0)),
297
+ onMouseleave: s[1] || (s[1] = () => u(ve)(!1))
298
+ }, [
299
+ l.value.userOptions.buttons.annotator ? (i(), N(u(Re), {
300
+ key: 0,
301
+ svgRef: u(W),
302
+ backgroundColor: l.value.style.backgroundColor,
303
+ color: l.value.style.color,
304
+ active: T.value,
305
+ onClose: J
306
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : f("", !0),
307
+ Ve.value ? (i(), n("div", {
308
+ key: 1,
309
+ ref_key: "noTitle",
310
+ ref: oe,
311
+ class: "vue-data-ui-no-title-space",
312
+ style: "height:36px; width: 100%;background:transparent"
313
+ }, null, 512)) : f("", !0),
314
+ l.value.style.title.text ? (i(), n("div", {
315
+ key: 2,
316
+ ref_key: "chartTitle",
317
+ ref: ne,
318
+ style: "width:100%;background:transparent"
319
+ }, [
320
+ (i(), N(St, {
321
+ key: `title_${re.value}`,
322
+ config: {
323
+ title: {
324
+ cy: "relation-div-title",
325
+ ...l.value.style.title
326
+ },
327
+ subtitle: {
328
+ cy: "relation-div-subtitle",
329
+ ...l.value.style.title.subtitle
330
+ }
331
+ }
332
+ }, null, 8, ["config"]))
333
+ ], 512)) : f("", !0),
334
+ l.value.userOptions.show && De.value && (u(de) || u(G)) ? (i(), N(u(Te), {
335
+ ref: "details",
336
+ key: `user_options_${ie.value}`,
337
+ backgroundColor: l.value.style.backgroundColor,
338
+ color: l.value.style.color,
339
+ isPrinting: u(fe),
340
+ isImaging: u(ye),
341
+ uid: S.value,
342
+ hasPdf: l.value.userOptions.buttons.pdf,
343
+ hasImg: l.value.userOptions.buttons.img,
344
+ hasFullscreen: l.value.userOptions.buttons.img,
345
+ hasXls: !1,
346
+ isFullscreen: R.value,
347
+ titles: { ...l.value.userOptions.buttonTitles },
348
+ chartElement: A.value,
349
+ position: l.value.userOptions.position,
350
+ hasAnnotator: l.value.userOptions.buttons.annotator,
351
+ isAnnotation: T.value,
352
+ callbacks: l.value.userOptions.callbacks,
353
+ printScale: l.value.userOptions.print.scale,
354
+ onToggleFullscreen: Ce,
355
+ onGeneratePdf: u(he),
356
+ onGenerateImage: u(ge),
357
+ onToggleAnnotator: J,
358
+ style: z({
359
+ visibility: u(de) ? u(G) ? "visible" : "hidden" : "visible"
360
+ })
361
+ }, vt({ _: 2 }, [
362
+ e.$slots.menuIcon ? {
363
+ name: "menuIcon",
364
+ fn: M(({ isOpen: t, color: a }) => [
365
+ g(e.$slots, "menuIcon", j(D({ isOpen: t, color: a })), void 0, !0)
366
+ ]),
367
+ key: "0"
368
+ } : void 0,
369
+ e.$slots.optionPdf ? {
370
+ name: "optionPdf",
371
+ fn: M(() => [
372
+ g(e.$slots, "optionPdf", {}, void 0, !0)
373
+ ]),
374
+ key: "1"
375
+ } : void 0,
376
+ e.$slots.optionImg ? {
377
+ name: "optionImg",
378
+ fn: M(() => [
379
+ g(e.$slots, "optionImg", {}, void 0, !0)
380
+ ]),
381
+ key: "2"
382
+ } : void 0,
383
+ e.$slots.optionFullscreen ? {
384
+ name: "optionFullscreen",
385
+ fn: M(({ toggleFullscreen: t, isFullscreen: a }) => [
386
+ g(e.$slots, "optionFullscreen", j(D({ toggleFullscreen: t, isFullscreen: a })), void 0, !0)
387
+ ]),
388
+ key: "3"
389
+ } : void 0,
390
+ e.$slots.optionAnnotator ? {
391
+ name: "optionAnnotator",
392
+ fn: M(({ toggleAnnotator: t, isAnnotator: a }) => [
393
+ g(e.$slots, "optionAnnotator", j(D({ toggleAnnotator: t, isAnnotator: a })), void 0, !0)
394
+ ]),
395
+ key: "4"
396
+ } : void 0
397
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : f("", !0),
398
+ (i(), n("svg", {
399
+ ref_key: "svgRef",
400
+ ref: W,
401
+ xmlns: u(wt),
402
+ class: te([{ "vue-data-ui-fullscreen--on": R.value, "vue-data-ui-fulscreen--off": !R.value }, "relation-circle"]),
403
+ viewBox: `0 0 ${o.value.width <= 0 ? 10 : o.value.width} ${o.value.height <= 0 ? 10 : o.value.height}`,
404
+ width: "100%",
405
+ style: "user-select:none; background:transparent"
406
+ }, [
407
+ dt(u(Ne)),
408
+ e.$slots["chart-background"] ? (i(), n("foreignObject", {
409
+ key: 0,
410
+ x: 0,
411
+ y: 0,
412
+ width: o.value.width <= 0 ? 10 : o.value.width,
413
+ height: o.value.height <= 0 ? 10 : o.value.height,
414
+ style: {
415
+ pointerEvents: "none"
416
+ }
417
+ }, [
418
+ g(e.$slots, "chart-background", {}, void 0, !0)
419
+ ], 8, Ft)) : f("", !0),
420
+ ft("circle", {
421
+ cx: (o.value.width <= 0 ? 1e-4 : o.value.width) / 2,
422
+ cy: (o.value.height <= 0 ? 1e-4 : o.value.height) / 2 + l.value.style.circle.offsetY,
423
+ r: C.value <= 0 ? 1e-4 : C.value,
424
+ stroke: l.value.style.circle.stroke,
425
+ "stroke-width": l.value.style.circle.strokeWidth,
426
+ fill: "transparent",
427
+ class: "main-circle"
428
+ }, null, 8, Bt),
429
+ We.value ? (i(), n("g", Rt, [
430
+ (i(!0), n($, null, O(p.value, (t, a) => (i(), n("path", {
431
+ key: `relation_${a}`,
432
+ style: z(xe(t)),
433
+ stroke: x(t),
434
+ class: te(["relation", { "vue-ui-relation-circle-selected": d.value.hasOwnProperty("id") && b.value.includes(t.id) }]),
435
+ d: `M${t.x1},${t.y1} C${t.x1},${t.y1} ${o.value.width / 2},${o.value.height / 2 + l.value.style.circle.offsetY} ${t.x2},${t.y2}`,
436
+ fill: "none",
437
+ "stroke-width": H(t),
438
+ "stroke-linecap": "round"
439
+ }, null, 14, Tt))), 128)),
440
+ (i(!0), n($, null, O(p.value, (t, a) => (i(), n("g", Nt, [
441
+ P(t) ? g(e.$slots, "dataLabel", Pe({
442
+ key: 0,
443
+ ref_for: !0
444
+ }, {
445
+ x: t.midPointBezier.x,
446
+ y: t.midPointBezier.y,
447
+ color: x(t),
448
+ weight: t.weight,
449
+ fontSize: y.value
450
+ }), void 0, !0) : f("", !0),
451
+ P(t) && !e.$slots.dataLabel ? (i(), n("circle", {
452
+ key: 1,
453
+ cx: t.midPointBezier.x,
454
+ cy: t.midPointBezier.y,
455
+ fill: x(t),
456
+ r: y.value,
457
+ stroke: l.value.style.backgroundColor,
458
+ "stroke-width": "1"
459
+ }, null, 8, jt)) : f("", !0),
460
+ P(t) && !e.$slots.dataLabel ? (i(), n("text", {
461
+ key: 2,
462
+ x: t.midPointBezier.x,
463
+ y: t.midPointBezier.y + y.value / 3,
464
+ fill: u(Me)(x(t)),
465
+ "text-anchor": "middle",
466
+ "font-size": y.value
467
+ }, U(u(le)(
468
+ l.value.style.weightLabels.formatter,
469
+ t.weight,
470
+ u(se)({
471
+ p: l.value.style.weightLabels.prefix,
472
+ v: t.weight,
473
+ s: l.value.style.weightLabels.suffix,
474
+ r: l.value.style.weightLabels.rounding
475
+ }),
476
+ { ...t }
477
+ )), 9, Dt)) : f("", !0)
478
+ ]))), 256))
479
+ ])) : (i(), n("g", Ut, [
480
+ (i(!0), n($, null, O(p.value, (t, a) => (i(), n("line", {
481
+ key: `relation_${a}`,
482
+ stroke: x(t),
483
+ "stroke-width": H(t),
484
+ style: z(xe(t)),
485
+ x1: t.x1,
486
+ x2: t.x2,
487
+ y1: t.y1,
488
+ y2: t.y2,
489
+ class: te({ "vue-ui-relation-circle-selected": d.value.hasOwnProperty("id") && b.value.includes(t.id) }),
490
+ "stroke-linecap": "round"
491
+ }, null, 14, Vt))), 128)),
492
+ (i(!0), n($, null, O(p.value, (t, a) => (i(), n("g", Gt, [
493
+ P(t) ? g(e.$slots, "dataLabel", Pe({
494
+ key: 0,
495
+ ref_for: !0
496
+ }, {
497
+ x: t.midPointLine.x,
498
+ y: t.midPointLine.y,
499
+ color: x(t),
500
+ weight: t.weight,
501
+ fontSize: y.value
502
+ }), void 0, !0) : f("", !0),
503
+ P(t) && !e.$slots.dataLabel && l.value.style.weightLabels.show ? (i(), n("circle", {
504
+ key: 1,
505
+ cx: t.midPointLine.x,
506
+ cy: t.midPointLine.y,
507
+ fill: x(t),
508
+ r: y.value,
509
+ stroke: l.value.style.backgroundColor,
510
+ "stroke-width": "1"
511
+ }, null, 8, Wt)) : f("", !0),
512
+ P(t) && !e.$slots.dataLabel && l.value.style.weightLabels.show ? (i(), n("text", {
513
+ key: 2,
514
+ x: t.midPointLine.x,
515
+ y: t.midPointLine.y + y.value / 3,
516
+ fill: u(Me)(x(t)),
517
+ "text-anchor": "middle",
518
+ "font-size": y.value
519
+ }, U(u(le)(
520
+ l.value.style.weightLabels.formatter,
521
+ t.weight,
522
+ u(se)({
523
+ p: l.value.style.weightLabels.prefix,
524
+ v: t.weight,
525
+ s: l.value.style.weightLabels.suffix,
526
+ r: l.value.style.weightLabels.rounding
527
+ }),
528
+ { ...t }
529
+ )), 9, Xt)) : f("", !0)
530
+ ]))), 256))
531
+ ])),
532
+ (i(!0), n($, null, O(k.value, (t, a) => (i(), n("text", {
533
+ key: `plot_text_${a}`,
534
+ "text-anchor": Ze(t),
535
+ transform: lt(t),
536
+ x: et(t),
537
+ y: t.y + 5,
538
+ class: "vue-ui-relation-circle-legend",
539
+ "transform-origin": "start",
540
+ "font-weight": d.value.id === t.id ? "900" : "400",
541
+ style: z(`font-family:${l.value.style.fontFamily};${tt(t)}`),
542
+ "font-size": I.value,
543
+ fill: l.value.style.labels.color,
544
+ "text-decoration": a === B.value ? "underline" : void 0,
545
+ onClick: (c) => _e(t, a),
546
+ onMouseenter: (c) => $e(t, a),
547
+ onMouseleave: (c) => Ae(t, a)
548
+ }, [
549
+ u(ce) ? (i(), n($, { key: 0 }, [
550
+ ze(" -------- ")
551
+ ], 64)) : (i(), n($, { key: 1 }, [
552
+ ze(U(t.label) + " (" + U(u(le)(
553
+ l.value.style.weightLabels.formatter,
554
+ t.totalWeight,
555
+ u(se)({
556
+ p: l.value.style.weightLabels.prefix,
557
+ v: t.totalWeight,
558
+ s: l.value.style.weightLabels.suffix,
559
+ r: l.value.style.weightLabels.rounding
560
+ }),
561
+ { ...t }
562
+ )) + ") ", 1)
563
+ ], 64))
564
+ ], 44, Yt))), 128)),
565
+ (i(!0), n($, null, O(k.value, (t, a) => (i(), n("circle", {
566
+ cx: t.x,
567
+ cy: t.y,
568
+ key: `plot_${a}`,
569
+ style: z(`${Qe(t)}; transition: r 0.2s ease-in-out;`),
570
+ class: "vue-ui-relation-circle-plot",
571
+ fill: l.value.style.plot.useSerieColor ? t.color : l.value.style.plot.color,
572
+ stroke: l.value.style.backgroundColor,
573
+ "stroke-width": "1",
574
+ r: F.value * (a === B.value ? 2 : 1),
575
+ onClick: (c) => _e(t, a),
576
+ onMouseenter: (c) => $e(t, a),
577
+ onMouseleave: (c) => Ae(t, a)
578
+ }, null, 44, qt))), 128)),
579
+ g(e.$slots, "svg", { svg: o.value }, void 0, !0)
580
+ ], 10, Et)),
581
+ e.$slots.watermark ? (i(), n("div", Ht, [
582
+ g(e.$slots, "watermark", j(D({ isPrinting: u(fe) || u(ye) })), void 0, !0)
583
+ ])) : f("", !0),
584
+ e.$slots.source ? (i(), n("div", {
585
+ key: 5,
586
+ ref_key: "source",
587
+ ref: ue,
588
+ dir: "auto"
589
+ }, [
590
+ g(e.$slots, "source", {}, void 0, !0)
591
+ ], 512)) : f("", !0),
592
+ u(ce) ? (i(), N(_t, { key: 6 })) : f("", !0)
593
+ ], 44, Mt));
594
+ }
595
+ }, rl = /* @__PURE__ */ It(Jt, [["__scopeId", "data-v-72b30f4c"]]);
596
+ export {
597
+ rl as default
598
+ };