vue-data-ui 3.0.0-next.65 → 3.0.0-next.67

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 (93) hide show
  1. package/dist/{Arrow-xtjLDthc.js → Arrow--IpAC6zA.js} +1 -1
  2. package/dist/{BaseDraggableDialog-DjdsoIGU.js → BaseDraggableDialog-BFyxDfXQ.js} +2 -2
  3. package/dist/{BaseIcon-BU1qUe7c.js → BaseIcon-Cdvi-iBt.js} +1 -1
  4. package/dist/{ColorPicker-BblHzrY2.js → ColorPicker-CksI08Dk.js} +2 -2
  5. package/dist/{DataTable-awPoVqrs.js → DataTable-Dm9n_hgl.js} +2 -2
  6. package/dist/{Legend-DFZdoZrW.js → Legend-C8iYgsQ8.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-rFoL6tGp.js → NonSvgPenAndPaper-DoOTPCi8.js} +3 -3
  8. package/dist/{PackageVersion-bvIGp0Wr.js → PackageVersion-DzLNBusm.js} +1 -1
  9. package/dist/{PenAndPaper-CDiJnTx6.js → PenAndPaper-BsfhRXyF.js} +3 -3
  10. package/dist/{Shape-CNW2rRJN.js → Shape-BHLKYLy2.js} +1 -1
  11. package/dist/{Slicer-CJUj0NPg.js → Slicer-DUtsBqwT.js} +2 -2
  12. package/dist/{SparkTooltip-CCeBMjBi.js → SparkTooltip-DW5EM-X4.js} +1 -1
  13. package/dist/{Title-DLzQZPSp.js → Title-KSMyq3wn.js} +1 -1
  14. package/dist/{Tooltip-DgVlOrus.js → Tooltip-DnEIs-sg.js} +1 -1
  15. package/dist/{UserOptions-CyxK5Q-5.js → UserOptions-BDt8OYJb.js} +2 -2
  16. package/dist/{dom-to-png-DOOD6zHB.js → dom-to-png-hBxSbmYr.js} +1 -1
  17. package/dist/{img-DByXXZOX.js → img-DNh0GOHm.js} +1 -1
  18. package/dist/{index-D4WnuWyh.js → index-DSzRUkFt.js} +786 -758
  19. package/dist/{pdf-OOqMngGF.js → pdf-CkDaIwJh.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +63 -1
  22. package/dist/types/vue-data-ui.d.ts +63 -1
  23. package/dist/useAutoSizeLabelsInsideViewbox-DhQdKdBD.js +81 -0
  24. package/dist/{useNestedProp-DpsQk2zA.js → useNestedProp-jGBTZAI0.js} +1 -1
  25. package/dist/{usePrinter-LIy0Oc_F.js → usePrinter-BVME5tnZ.js} +2 -2
  26. package/dist/{vue-data-ui-g-wGH-lb.js → vue-data-ui-DG3WfzGA.js} +64 -64
  27. package/dist/vue-data-ui.js +1 -1
  28. package/dist/{vue-ui-3d-bar-DBRlOX7j.js → vue-ui-3d-bar-CTz1QNSR.js} +6 -6
  29. package/dist/{vue-ui-accordion-B3qWFvj-.js → vue-ui-accordion-CC84yjap.js} +3 -3
  30. package/dist/{vue-ui-age-pyramid-BfgNlK97.js → vue-ui-age-pyramid-BniPj0Je.js} +6 -6
  31. package/dist/{vue-ui-annotator-DSQM48rJ.js → vue-ui-annotator-BVKHKzvB.js} +2 -2
  32. package/dist/{vue-ui-bullet-BRQLmWS9.js → vue-ui-bullet-j-m1l7oC.js} +7 -7
  33. package/dist/{vue-ui-candlestick-D_eIh1L1.js → vue-ui-candlestick-CDacpOoa.js} +7 -7
  34. package/dist/{vue-ui-carousel-table-nEAroVfe.js → vue-ui-carousel-table-_Q_bBdvq.js} +4 -4
  35. package/dist/{vue-ui-chestnut-BjJmleW-.js → vue-ui-chestnut-l888Vg6A.js} +5 -5
  36. package/dist/vue-ui-chord-ByYg0taA.js +1038 -0
  37. package/dist/{vue-ui-circle-pack-CWVh_N2U.js → vue-ui-circle-pack-vJwFi3dB.js} +6 -6
  38. package/dist/{vue-ui-cursor-sTcuRVmy.js → vue-ui-cursor-DVM0wbdO.js} +2 -2
  39. package/dist/{vue-ui-dashboard-DBygQ4-S.js → vue-ui-dashboard-CYmQxOVl.js} +62 -62
  40. package/dist/{vue-ui-digits-DY2apUU-.js → vue-ui-digits-SXPqFWSS.js} +2 -2
  41. package/dist/{vue-ui-donut-2RP4GaYE.js → vue-ui-donut-BKCbyy87.js} +8 -8
  42. package/dist/{vue-ui-donut-evolution-D96i03R8.js → vue-ui-donut-evolution-DbuTGQJ8.js} +8 -8
  43. package/dist/{vue-ui-dumbbell-CEZXGNEg.js → vue-ui-dumbbell-CMkcLq8N.js} +7 -7
  44. package/dist/{vue-ui-flow-B8k9kxKB.js → vue-ui-flow-C5KS0_1Q.js} +7 -7
  45. package/dist/{vue-ui-funnel-BWKfPaNH.js → vue-ui-funnel-C_EPa3Z6.js} +6 -6
  46. package/dist/{vue-ui-galaxy-C_vIi1L7.js → vue-ui-galaxy-Bv409liT.js} +5 -5
  47. package/dist/{vue-ui-gauge-BzdnCu-X.js → vue-ui-gauge-C-jKjQBe.js} +9 -9
  48. package/dist/{vue-ui-gizmo-DOQZQ58m.js → vue-ui-gizmo-Derp2Hfq.js} +3 -3
  49. package/dist/{vue-ui-heatmap-RB-M6SaR.js → vue-ui-heatmap-Cmr1fe03.js} +7 -7
  50. package/dist/{vue-ui-history-plot-Bgmurf0-.js → vue-ui-history-plot-D-7W7WRj.js} +7 -7
  51. package/dist/{vue-ui-kpi-Bujm_UUv.js → vue-ui-kpi-BjYv3G6b.js} +3 -3
  52. package/dist/{vue-ui-mini-loader-a7Uqcx82.js → vue-ui-mini-loader-BfRTGqYM.js} +2 -2
  53. package/dist/{vue-ui-molecule-BN-NyAZi.js → vue-ui-molecule-CLrm9jZX.js} +5 -5
  54. package/dist/{vue-ui-mood-radar-DiIFJqB_.js → vue-ui-mood-radar-BfZl-mJF.js} +7 -7
  55. package/dist/{vue-ui-nested-donuts-CJZbkPFw.js → vue-ui-nested-donuts-CHq-ki7S.js} +9 -9
  56. package/dist/{vue-ui-onion-BMph52bs.js → vue-ui-onion-fSbsF3AE.js} +8 -8
  57. package/dist/{vue-ui-parallel-coordinate-plot-CBiSBImC.js → vue-ui-parallel-coordinate-plot-B1TwFB-x.js} +8 -8
  58. package/dist/{vue-ui-quadrant-DX5Qq24z.js → vue-ui-quadrant-Rb9aJbsM.js} +8 -8
  59. package/dist/{vue-ui-quick-chart-4REpC2Tf.js → vue-ui-quick-chart-XhXLw_Lh.js} +6 -6
  60. package/dist/{vue-ui-radar-BEVqfDd0.js → vue-ui-radar-BPa4sMX-.js} +7 -7
  61. package/dist/{vue-ui-rating-DwI3Rv3E.js → vue-ui-rating-BiJN6mha.js} +2 -2
  62. package/dist/vue-ui-relation-circle-CqeWZjwe.js +598 -0
  63. package/dist/{vue-ui-ridgeline-CNuNfOmr.js → vue-ui-ridgeline-DYi51pwG.js} +8 -8
  64. package/dist/{vue-ui-rings-cYyJqaty.js → vue-ui-rings-C7ObYFMH.js} +8 -8
  65. package/dist/{vue-ui-scatter-BuxMaOvY.js → vue-ui-scatter-DzVxBntt.js} +8 -8
  66. package/dist/{vue-ui-skeleton-BcbHBGA8.js → vue-ui-skeleton-AWu-Lr7l.js} +3 -3
  67. package/dist/{vue-ui-smiley-BxuhvqKH.js → vue-ui-smiley-BtwxpYus.js} +2 -2
  68. package/dist/{vue-ui-spark-trend-BYARTbLp.js → vue-ui-spark-trend-CidJd1aP.js} +3 -3
  69. package/dist/{vue-ui-sparkbar-C5EIrDdI.js → vue-ui-sparkbar-BUmriiHQ.js} +3 -3
  70. package/dist/{vue-ui-sparkgauge-MqGNM5FN.js → vue-ui-sparkgauge-xrrCkMmE.js} +3 -3
  71. package/dist/{vue-ui-sparkhistogram-kKrQQ5yk.js → vue-ui-sparkhistogram-BM4W5qfl.js} +4 -4
  72. package/dist/{vue-ui-sparkline-BdovbeOV.js → vue-ui-sparkline-Kf3VEu2r.js} +3 -3
  73. package/dist/{vue-ui-sparkstackbar-EfkdY-Ax.js → vue-ui-sparkstackbar-BzRWT_6S.js} +3 -3
  74. package/dist/{vue-ui-stackbar-DBx0rzvk.js → vue-ui-stackbar-BEAjBPCI.js} +9 -9
  75. package/dist/{vue-ui-strip-plot-CwkCmNEy.js → vue-ui-strip-plot-CpcZUO7A.js} +64 -64
  76. package/dist/{vue-ui-table-Dc4t3Fwj.js → vue-ui-table-7mco2z0H.js} +3 -3
  77. package/dist/{vue-ui-table-heatmap-DDQg3bxn.js → vue-ui-table-heatmap-BPjfohgN.js} +5 -5
  78. package/dist/{vue-ui-table-sparkline-DYla4bRO.js → vue-ui-table-sparkline-5-DnehDb.js} +4 -4
  79. package/dist/{vue-ui-thermometer-DJfWwWWc.js → vue-ui-thermometer-jd-Ba40e.js} +52 -52
  80. package/dist/{vue-ui-timer-DGfM3hjM.js → vue-ui-timer-BpSgPo2R.js} +5 -5
  81. package/dist/{vue-ui-tiremarks-DALcBVpW.js → vue-ui-tiremarks-NuCzPpfn.js} +6 -6
  82. package/dist/{vue-ui-treemap-B2ZaMQGd.js → vue-ui-treemap-C8MLPRUz.js} +8 -8
  83. package/dist/{vue-ui-vertical-bar-CVhUQTSk.js → vue-ui-vertical-bar-DohenEMX.js} +9 -9
  84. package/dist/{vue-ui-waffle-DKQr0dys.js → vue-ui-waffle-BQLMULXv.js} +8 -8
  85. package/dist/{vue-ui-wheel-B5Lv0Z1y.js → vue-ui-wheel-BwHQLQxI.js} +6 -6
  86. package/dist/{vue-ui-word-cloud-BubzKqXN.js → vue-ui-word-cloud-bqR58sPB.js} +6 -6
  87. package/dist/{vue-ui-world-CPM4kKP8.js → vue-ui-world-Bk1saLf-.js} +6 -6
  88. package/dist/{vue-ui-xy-DslMfLA-.js → vue-ui-xy-DMPIrN7g.js} +9 -9
  89. package/dist/{vue-ui-xy-canvas-C6iEe7Gl.js → vue-ui-xy-canvas-CQfiWuh5.js} +8 -8
  90. package/package.json +1 -1
  91. package/dist/useAutoSizeLabelsInsideViewbox-DZUsBKYa.js +0 -41
  92. package/dist/vue-ui-chord-Cd1H5HfK.js +0 -949
  93. package/dist/vue-ui-relation-circle-DnBt_4Z-.js +0 -542
@@ -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, a as nt, p as xe, b as rt, d as ut, o as ot, f as $e, g as ct, X as dt, F as _e, k as J, i as K, E as Q } from "./index-D4WnuWyh.js";
3
- import { t as vt, u as ft } from "./useResponsive-DfdjqQps.js";
4
- import { u as Ce } from "./useNestedProp-DpsQk2zA.js";
5
- import { u as yt } from "./usePrinter-LIy0Oc_F.js";
6
- import { u as ht } from "./useUserOptionState-BIvW1Kz7.js";
7
- import { u as gt } from "./useChartAccessibility-9icAAmYg.js";
8
- import mt from "./Title-DLzQZPSp.js";
9
- import pt from "./img-DByXXZOX.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-bvIGp0Wr.js")), ze = E(() => import("./PenAndPaper-CDiJnTx6.js")), Ae = E(() => import("./vue-ui-skeleton-BcbHBGA8.js")), Ie = E(() => import("./UserOptions-CyxK5Q-5.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
- };