vue-data-ui 2.2.90 → 2.2.92

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 (58) hide show
  1. package/dist/data-table-d-VcuH-r.js +1488 -0
  2. package/dist/{index.es-Cgqo-FBk.js → index.es-Dc9Fd4o6.js} +1 -1
  3. package/dist/legend-DJCYLsl_.js +61 -0
  4. package/dist/style.css +1 -1
  5. package/dist/themes-lgjsYHsH.js +4967 -0
  6. package/dist/title-BF-9Qcni.js +56 -0
  7. package/dist/tooltip-D85WEOKi.js +94 -0
  8. package/dist/user-options-DZgCz8UA.js +415 -0
  9. package/dist/vue-data-ui.js +455 -61
  10. package/dist/vue-ui-3d-bar-DW7kGJSz.js +20360 -0
  11. package/dist/vue-ui-age-pyramid-4hcuKpFY.js +781 -0
  12. package/dist/vue-ui-annotator-C83FVvl8.js +2175 -0
  13. package/dist/vue-ui-candlestick-diclGj95.js +807 -0
  14. package/dist/vue-ui-chestnut-ACetHLdG.js +1049 -0
  15. package/dist/vue-ui-cursor-Rx7UNaYT.js +229 -0
  16. package/dist/vue-ui-dashboard-B3PlN0ks.js +231 -0
  17. package/dist/vue-ui-digits-CxMXID42.js +154 -0
  18. package/dist/vue-ui-donut-DMiwVXNd.js +1534 -0
  19. package/dist/vue-ui-dumbbell-B_X1T8TR.js +621 -0
  20. package/dist/vue-ui-flow-B72wzQ6V.js +451 -0
  21. package/dist/vue-ui-galaxy-DXX5yivT.js +482 -0
  22. package/dist/vue-ui-gauge-Cs9PDurH.js +466 -0
  23. package/dist/vue-ui-heatmap-PcoNSLdN.js +581 -0
  24. package/dist/vue-ui-kpi-DchEmPtB.js +55 -0
  25. package/dist/vue-ui-mini-loader-DltJLkqy.js +131 -0
  26. package/dist/vue-ui-molecule-CWvukBzs.js +746 -0
  27. package/dist/vue-ui-mood-radar-DEfdtIi8.js +544 -0
  28. package/dist/vue-ui-nested-donuts-9URpqgXE.js +768 -0
  29. package/dist/vue-ui-onion-C0eowUT6.js +551 -0
  30. package/dist/vue-ui-parallel-coordinate-plot-Bc_pAaPJ.js +647 -0
  31. package/dist/vue-ui-quadrant-_ddVAm9V.js +1174 -0
  32. package/dist/vue-ui-quick-chart-Cio0hDYO.js +1310 -0
  33. package/dist/vue-ui-radar-Dyg38i33.js +853 -0
  34. package/dist/vue-ui-rating-CE1Lmwd2.js +271 -0
  35. package/dist/vue-ui-relation-circle-BMlB3k3d.js +303 -0
  36. package/dist/vue-ui-rings-BuXeijvb.js +507 -0
  37. package/dist/vue-ui-scatter-B1hZfOua.js +870 -0
  38. package/dist/vue-ui-screenshot-0QXgxzGs.js +160 -0
  39. package/dist/vue-ui-smiley-B7kR7exr.js +763 -0
  40. package/dist/vue-ui-spark-trend-BmL2KiYL.js +245 -0
  41. package/dist/vue-ui-sparkgauge-BMzFv14L.js +158 -0
  42. package/dist/vue-ui-sparkhistogram-DWpOXqHm.js +243 -0
  43. package/dist/vue-ui-sparkstackbar-DB9VQXlc.js +244 -0
  44. package/dist/vue-ui-strip-plot-DyN6P0JO.js +614 -0
  45. package/dist/vue-ui-table-DM3zL89q.js +2180 -0
  46. package/dist/vue-ui-table-heatmap-gWx0Nslu.js +237 -0
  47. package/dist/vue-ui-thermometer-Bcqv5kd_.js +384 -0
  48. package/dist/vue-ui-timer-BIFxjujK.js +451 -0
  49. package/dist/vue-ui-tiremarks-zBwHpED_.js +248 -0
  50. package/dist/vue-ui-treemap-BaplVc_z.js +719 -0
  51. package/dist/vue-ui-vertical-bar-CdK6ZJPM.js +734 -0
  52. package/dist/vue-ui-waffle-COOzH7M3.js +635 -0
  53. package/dist/vue-ui-wheel-BEpuVTBk.js +226 -0
  54. package/dist/vue-ui-word-cloud-DNqxAAiX.js +344 -0
  55. package/dist/vue-ui-xy-_mHq-czW.js +2058 -0
  56. package/dist/vue-ui-xy-canvas-DqX8Gee5.js +1003 -0
  57. package/package.json +1 -1
  58. package/dist/index-DZlxUin4.js +0 -57288
@@ -0,0 +1,271 @@
1
+ import { ref as f, computed as $, onMounted as O, openBlock as l, createElementBlock as i, normalizeStyle as a, createElementVNode as n, toDisplayString as p, createCommentVNode as d, Fragment as E, renderList as L, unref as x, withKeys as U, createTextVNode as D } from "vue";
2
+ import { _ as K, e as T, i as H, j as P, X as _, x as N, d as F } from "./data-table-d-VcuH-r.js";
3
+ import { u as W } from "./title-BF-9Qcni.js";
4
+ import { u as q } from "./vue-ui-3d-bar-DW7kGJSz.js";
5
+ const J = {
6
+ key: 0,
7
+ class: "vue-ui-rating-title",
8
+ style: { width: "100%" }
9
+ }, Q = ["src", "height", "width"], Z = ["xmlns", "height", "width"], tt = ["id"], et = ["stop-color"], lt = ["stop-color"], it = ["points", "fill", "stroke", "stroke-width"], at = ["src", "alt", "height", "width", "id"], ot = ["xmlns", "viewBox", "height", "id"], st = ["id"], nt = ["stop-color"], rt = ["stop-color"], ut = ["points", "fill", "stroke"], vt = ["xmlns", "height"], dt = ["onClick", "onMouseenter", "onKeyup"], yt = ["onMouseenter"], pt = {
10
+ __name: "vue-ui-rating",
11
+ props: {
12
+ config: {
13
+ type: Object,
14
+ default() {
15
+ return {};
16
+ }
17
+ },
18
+ dataset: {
19
+ type: Object,
20
+ default() {
21
+ return {};
22
+ }
23
+ }
24
+ },
25
+ emits: ["rate"],
26
+ setup(M, { expose: A, emit: V }) {
27
+ const v = M, { vue_ui_rating: R } = q(), m = f(T()), b = f(!1), u = f(void 0), w = f([]), t = $(() => W({
28
+ userConfig: v.config,
29
+ defaultConfig: R
30
+ })), j = $(() => typeof v.dataset.rating == "object" && !Array.isArray(v.dataset.rating) ? B(v.dataset.rating) : v.dataset.rating), X = $(() => typeof v.dataset.rating == "object" && !Array.isArray(v.dataset.rating)), r = f(j.value), k = f(t.value.type === "image"), c = f(t.value.readonly);
31
+ function B(o) {
32
+ let s = 0, e = 0;
33
+ for (const y in o) {
34
+ const G = parseInt(y), C = o[y];
35
+ s += G * C, e += C;
36
+ }
37
+ if (e === 0)
38
+ return 0;
39
+ const g = s / e;
40
+ return Math.min(t.value.to, Math.max(t.value.from, g));
41
+ }
42
+ O(() => {
43
+ H(v.dataset) && P({
44
+ componentName: "VueUiRating",
45
+ type: "dataset"
46
+ });
47
+ for (let o = t.value.from; o <= t.value.to; o += 1)
48
+ w.value.push(o);
49
+ });
50
+ function h(o, s = !1) {
51
+ return o > u.value || c.value ? s ? t.value.style.image.inactiveOpacity : t.value.style.star.inactiveColor : s ? 1 : t.value.style.star.useGradient ? `url(#star_gradient_under_${m.value})` : t.value.style.star.activeColor;
52
+ }
53
+ function z(o, s = !1) {
54
+ const e = r.value - o, g = s ? 1 : 100;
55
+ switch (!0) {
56
+ case e <= 0:
57
+ return 1e-3;
58
+ case e > 1:
59
+ return 1 * g;
60
+ default:
61
+ return e * g;
62
+ }
63
+ }
64
+ function S(o) {
65
+ c.value || (r.value = o, V("rate", o));
66
+ }
67
+ function I() {
68
+ return r.value;
69
+ }
70
+ function Y(o = !0) {
71
+ c.value = o;
72
+ }
73
+ return A({
74
+ getData: I,
75
+ toggleReadonly: Y
76
+ }), (o, s) => (l(), i("div", {
77
+ style: a(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),
78
+ class: "vue-ui-rating",
79
+ onMouseover: s[2] || (s[2] = (e) => b.value = !0),
80
+ onMouseleave: s[3] || (s[3] = (e) => {
81
+ b.value = !1, u.value = void 0;
82
+ })
83
+ }, [
84
+ t.value.style.title.text ? (l(), i("div", J, [
85
+ n("div", {
86
+ style: a(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold ? "bold" : "normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)
87
+ }, p(t.value.style.title.text), 5),
88
+ t.value.style.title.subtitle.text ? (l(), i("div", {
89
+ key: 0,
90
+ style: a(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold ? "bold" : "normal"}`)
91
+ }, p(t.value.style.title.subtitle.text), 5)) : d("", !0)
92
+ ])) : d("", !0),
93
+ t.value.style.rating.show && t.value.style.rating.position === "top" ? (l(), i("div", {
94
+ key: 1,
95
+ style: a(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold ? "bold" : "normal"};margin-left:${t.value.style.rating.offsetX}px`)
96
+ }, p(isNaN(r.value) ? "" : r.value.toFixed(t.value.style.rating.roundingValue)), 5)) : d("", !0),
97
+ n("div", {
98
+ class: "vue-ui-rating-wrapper",
99
+ style: a(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)
100
+ }, [
101
+ t.value.style.rating.show && t.value.style.rating.position === "left" ? (l(), i("div", {
102
+ key: 0,
103
+ style: a(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold ? "bold" : "normal"};padding-right:${t.value.style.rating.offsetX}px`)
104
+ }, p(isNaN(r.value) ? "" : r.value.toFixed(t.value.style.rating.roundingValue)), 5)) : d("", !0),
105
+ (l(!0), i(E, null, L(w.value, (e, g) => (l(), i("div", {
106
+ class: "vue-ui-rating-unit-container",
107
+ style: a(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)
108
+ }, [
109
+ k.value ? (l(), i("img", {
110
+ key: 0,
111
+ src: t.value.style.image.src,
112
+ height: t.value.style.itemSize,
113
+ width: t.value.style.itemSize,
114
+ class: "vue-ui-rating-unit",
115
+ style: a(`position:absolute;top:0;left:0;opacity:${isNaN(u.value) ? t.value.style.image.inactiveOpacity : h(e, !0)}`)
116
+ }, null, 12, Q)) : (l(), i("svg", {
117
+ key: 1,
118
+ xmlns: x(_),
119
+ viewBox: "0 0 100 100",
120
+ height: t.value.style.itemSize,
121
+ width: t.value.style.itemSize,
122
+ class: "vue-ui-rating-unit"
123
+ }, [
124
+ n("defs", null, [
125
+ n("radialGradient", {
126
+ cx: "50%",
127
+ cy: "50%",
128
+ r: "50%",
129
+ fx: "50%",
130
+ fy: "50%",
131
+ id: `star_gradient_under_${m.value}`
132
+ }, [
133
+ n("stop", {
134
+ offset: "0%",
135
+ "stop-color": `${x(N)(t.value.style.star.activeColor, 0.05)}`
136
+ }, null, 8, et),
137
+ n("stop", {
138
+ offset: "100%",
139
+ "stop-color": t.value.style.star.activeColor
140
+ }, null, 8, lt)
141
+ ], 8, tt)
142
+ ]),
143
+ n("polygon", {
144
+ points: x(F)({
145
+ plot: { x: 50, y: 50 },
146
+ radius: 30,
147
+ apexes: t.value.style.star.apexes
148
+ }),
149
+ fill: isNaN(u.value) ? t.value.style.star.inactiveColor : h(e),
150
+ stroke: t.value.style.star.borderColor ? t.value.style.star.borderColor : u.value ? h(e) : t.value.style.star.inactiveColor,
151
+ "stroke-width": t.value.style.star.borderWidth,
152
+ "stroke-linecap": "round",
153
+ "stroke-linejoin": "round"
154
+ }, null, 8, it)
155
+ ], 8, Z)),
156
+ k.value ? (l(), i("img", {
157
+ key: 2,
158
+ src: t.value.style.image.src,
159
+ alt: `${t.value.style.image.alt} ${e}`,
160
+ height: t.value.style.itemSize,
161
+ width: t.value.style.itemSize,
162
+ id: `active_${m.value}_${e}`,
163
+ class: "vue-ui-rating-unit",
164
+ style: a(`position:absolute;top:0;left:0;clip:rect(0px,${z(g, !0) * t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)
165
+ }, null, 12, at)) : (l(), i("svg", {
166
+ key: 3,
167
+ xmlns: x(_),
168
+ viewBox: `0 0 ${z(g)} 100`,
169
+ height: t.value.style.itemSize,
170
+ class: "vue-ui-rating-unit",
171
+ id: `active_${m.value}_${e}`,
172
+ style: { position: "absolute", top: "0", left: "0" }
173
+ }, [
174
+ n("defs", null, [
175
+ n("radialGradient", {
176
+ cx: "50%",
177
+ cy: "50%",
178
+ r: "50%",
179
+ fx: "50%",
180
+ fy: "50%",
181
+ id: `star_gradient_over_${m.value}`
182
+ }, [
183
+ n("stop", {
184
+ offset: "0%",
185
+ "stop-color": `${x(N)(t.value.style.star.activeColor, 0.05)}`
186
+ }, null, 8, nt),
187
+ n("stop", {
188
+ offset: "100%",
189
+ "stop-color": t.value.style.star.activeColor
190
+ }, null, 8, rt)
191
+ ], 8, st)
192
+ ]),
193
+ n("polygon", {
194
+ points: x(F)({
195
+ plot: { x: 50, y: 50 },
196
+ radius: 30,
197
+ apexes: t.value.style.star.apexes
198
+ }),
199
+ fill: t.value.style.star.useGradient ? `url(#star_gradient_over_${m.value})` : t.value.style.star.activeColor,
200
+ stroke: t.value.style.star.activeColor
201
+ }, null, 8, ut)
202
+ ], 8, ot)),
203
+ (l(), i("svg", {
204
+ xmlns: x(_),
205
+ viewBox: "0 0 100 100",
206
+ height: t.value.style.itemSize,
207
+ class: "vue-ui-rating-unit",
208
+ style: a(`position:absolute;top:0;left:0;${c.value ? "" : "cursor:pointer"}`)
209
+ }, [
210
+ c.value ? d("", !0) : (l(), i("rect", {
211
+ key: 0,
212
+ class: "vue-ui-rating-mouse-trap",
213
+ x: 0,
214
+ y: 0,
215
+ width: 100,
216
+ height: 100,
217
+ fill: "transparent",
218
+ onClick: (y) => S(e),
219
+ onMouseenter: (y) => u.value = e,
220
+ onMouseleave: s[0] || (s[0] = (y) => u.value = void 0),
221
+ tabindex: "0",
222
+ onKeyup: U((y) => S(e), ["enter"])
223
+ }, null, 40, dt)),
224
+ c.value ? (l(), i("rect", {
225
+ key: 1,
226
+ class: "vue-ui-rating-mouse-trap",
227
+ x: 0,
228
+ y: 0,
229
+ width: 100,
230
+ height: 100,
231
+ fill: "transparent",
232
+ onMouseenter: (y) => u.value = e,
233
+ onMouseleave: s[1] || (s[1] = (y) => u.value = void 0)
234
+ }, null, 40, yt)) : d("", !0)
235
+ ], 12, vt)),
236
+ t.value.style.tooltip.show && X.value && c.value ? (l(), i("div", {
237
+ key: 4,
238
+ class: "vue-ui-rating-tooltip",
239
+ style: a(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48 + t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${u.value === e ? "block" : "none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)
240
+ }, [
241
+ n("div", {
242
+ style: a(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)
243
+ }, [
244
+ n("span", {
245
+ style: a(`font-size:${t.value.style.tooltip.fontSize}px`)
246
+ }, p(e), 5),
247
+ D(" : "),
248
+ n("span", {
249
+ style: a(`font-weight:${t.value.style.tooltip.bold ? "bold" : "normal"};font-size:${t.value.style.tooltip.fontSize}px`)
250
+ }, p(v.dataset.rating[e]), 5),
251
+ n("div", {
252
+ style: a(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)
253
+ }, " ▼ ", 4)
254
+ ], 4)
255
+ ], 4)) : d("", !0)
256
+ ], 4))), 256)),
257
+ t.value.style.rating.show && t.value.style.rating.position === "right" ? (l(), i("div", {
258
+ key: 1,
259
+ style: a(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold ? "bold" : "normal"};padding-left:${t.value.style.rating.offsetX}px`)
260
+ }, p(isNaN(r.value) ? "" : r.value.toFixed(t.value.style.rating.roundingValue)), 5)) : d("", !0)
261
+ ], 4),
262
+ t.value.style.rating.show && t.value.style.rating.position === "bottom" ? (l(), i("div", {
263
+ key: 2,
264
+ style: a(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold ? "bold" : "normal"};margin-left:${t.value.style.rating.offsetX}px`)
265
+ }, p(isNaN(r.value) ? "" : r.value.toFixed(t.value.style.rating.roundingValue)), 5)) : d("", !0)
266
+ ], 36));
267
+ }
268
+ }, mt = /* @__PURE__ */ K(pt, [["__scopeId", "data-v-86ced882"]]);
269
+ export {
270
+ mt as default
271
+ };
@@ -0,0 +1,303 @@
1
+ import { useCssVars as ge, computed as c, ref as u, onMounted as he, onBeforeUnmount as ye, openBlock as a, createElementBlock as o, normalizeStyle as g, createVNode as me, createCommentVNode as C, createBlock as W, unref as _, createSlots as ke, withCtx as E, renderSlot as b, normalizeProps as _e, guardReactiveProps as pe, normalizeClass as z, createElementVNode as $e, Fragment as w, renderList as O, toDisplayString as xe } from "vue";
2
+ import { _ as Ce, e as be, f as we, p as X, g as Oe, i as Pe, j as Y, k as Ae, X as Ie } from "./data-table-d-VcuH-r.js";
3
+ import { t as Fe, u as Ee } from "./vue-ui-age-pyramid-4hcuKpFY.js";
4
+ import { t as ze } from "./themes-lgjsYHsH.js";
5
+ import { u as q, _ as Le } from "./title-BF-9Qcni.js";
6
+ import { U as Ne } from "./user-options-DZgCz8UA.js";
7
+ import { u as Se, a as Re, S as Te } from "./vue-ui-3d-bar-DW7kGJSz.js";
8
+ const je = ["id"], Me = ["xmlns", "viewBox"], Be = ["cx", "cy", "r", "stroke", "stroke-width"], Ge = { key: 0 }, Ue = ["stroke", "d", "stroke-width"], De = { key: 1 }, Ve = ["stroke", "x1", "x2", "y1", "y2"], We = ["text-anchor", "transform", "x", "y", "onClick", "font-weight", "font-size", "fill"], Xe = ["cx", "cy", "fill", "onClick", "r"], Ye = {
9
+ __name: "vue-ui-relation-circle",
10
+ props: {
11
+ dataset: {
12
+ type: Array,
13
+ default() {
14
+ return [];
15
+ }
16
+ },
17
+ config: {
18
+ type: Object,
19
+ default() {
20
+ return {};
21
+ }
22
+ }
23
+ },
24
+ setup(H, { expose: J }) {
25
+ const v = H;
26
+ ge((e) => ({
27
+ "69fb0529": re.value,
28
+ "3158da88": le.value,
29
+ "2b571f2c": se.value
30
+ }));
31
+ const { vue_ui_relation_circle: K } = Se(), P = c(() => !!v.dataset && Object.keys(v.dataset).length), y = u(be()), L = u(0), p = u(null), N = u(null), l = c(() => {
32
+ const e = q({
33
+ userConfig: v.config,
34
+ defaultConfig: K
35
+ });
36
+ return e.theme ? {
37
+ ...q({
38
+ userConfig: ze.vue_ui_relation_circle[e.theme] || v.config,
39
+ defaultConfig: e
40
+ }),
41
+ customPalette: we[e.theme] || X
42
+ } : e;
43
+ }), { isPrinting: Q, isImaging: Z, generatePdf: S, generateImage: R } = Re({
44
+ elementId: `relation_circle_${y.value}`,
45
+ fileName: l.value.style.title.text || "vue-ui-relation-circle"
46
+ }), T = c(() => Oe(l.value.customPalette)), h = u([]), m = u([]), n = u({}), d = u([]), ee = u(0), A = c(() => v.dataset.slice(0, l.value.style.limit)), I = u(l.value.style.size), i = u({
47
+ height: l.value.style.size,
48
+ width: l.value.style.size
49
+ }), f = c({
50
+ get() {
51
+ return I.value * l.value.style.circle.radiusProportion;
52
+ },
53
+ set(e) {
54
+ return e;
55
+ }
56
+ }), te = c(() => l.value.style.links.curved), le = c(() => `${l.value.style.animation.speedMs}ms`), re = c(() => f.value * 2), se = c(() => f.value * 4), $ = u(null);
57
+ he(() => {
58
+ if (Pe(v.dataset) ? Y({
59
+ componentName: "VueUiRelationCircle",
60
+ type: "dataset"
61
+ }) : v.dataset.forEach((s, t) => {
62
+ Ae({
63
+ datasetObject: s,
64
+ requiredAttributes: ["id", "label", "relations", "weights"]
65
+ }).forEach((r) => {
66
+ Y({
67
+ componentName: "VueUiRelationCircle",
68
+ type: "datasetSerieAttribute",
69
+ property: r,
70
+ index: t
71
+ });
72
+ });
73
+ }), l.value.responsive) {
74
+ const s = Fe(() => {
75
+ const { width: t, height: r } = Ee({
76
+ chart: p.value,
77
+ title: l.value.style.title.text ? N.value : null
78
+ });
79
+ I.value = Math.min(t, r), i.value.width = t, i.value.height = r, f.value = I.value * l.value.style.circle.radiusProportion, h.value = [], m.value = [], M(), B();
80
+ });
81
+ $.value = new ResizeObserver(s), $.value.observe(p.value.parentNode);
82
+ } else
83
+ M(), B();
84
+ document.getElementById(`relation_circle_${y.value}`).addEventListener("click", j);
85
+ }), ye(() => {
86
+ document.getElementById(`relation_circle_${y.value}`).removeEventListener("click", j), $.value && $.value.disconnect();
87
+ });
88
+ function j(e) {
89
+ const s = e.target;
90
+ 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") || (n.value = {}, d.value = []);
91
+ }
92
+ function M() {
93
+ const e = 6.28319 / A.value.length, s = 360 / A.value.length;
94
+ let t = 0, r = 0;
95
+ A.value.forEach((k, F) => {
96
+ const ve = f.value * Math.cos(t) + i.value.width / 2, fe = f.value * Math.sin(t) + i.value.height / 2 + l.value.style.circle.offsetY;
97
+ h.value.push({ x: ve, y: fe, ...k, color: k.color ? k.color : T.value[F] ? T.value[F] : X[F], regAngle: r }), t += e, r += s;
98
+ });
99
+ }
100
+ function B() {
101
+ h.value.forEach((e) => {
102
+ h.value.filter((t) => t.relations.includes(e.id)).forEach((t, r) => {
103
+ m.value.push({
104
+ weight: e.weights && e.weights[r] ? e.weights[r] : 1,
105
+ relationId: `${e.id}_${t.id}`,
106
+ x1: e.x,
107
+ y1: e.y,
108
+ x2: t.x,
109
+ y2: t.y,
110
+ colorSource: e.color,
111
+ colorTarget: t.color,
112
+ ...e
113
+ });
114
+ });
115
+ });
116
+ }
117
+ const ne = c(() => Math.max(...m.value.map((e) => e.weight)));
118
+ function ie(e) {
119
+ return Object.hasOwn(n.value, "x") ? d.value.includes(e.id) ? "opacity:1" : "opacity:0.1" : "opacity:1";
120
+ }
121
+ function G(e) {
122
+ return Object.hasOwn(n.value, "x") ? e.colorTarget : e.colorSource;
123
+ }
124
+ function U(e) {
125
+ return Object.hasOwn(n.value, "x") ? d.value.includes(e.id) && e.relationId === `${e.id}_${n.value.id}` || e.relationId === `${n.value.id}_${e.id}` ? `opacity:1;stroke-width:${V(e)}` : "opacity: 0" : "opacity: 1";
126
+ }
127
+ function ae(e) {
128
+ return e.regAngle > 90 && e.regAngle < 270 ? "end" : "start";
129
+ }
130
+ function ue(e) {
131
+ return e.regAngle > 90 && e.regAngle < 270 ? e.x - 5 : e.x + 5;
132
+ }
133
+ function oe(e) {
134
+ return Object.hasOwn(n.value, "x") ? n.value.id === e.id || d.value.includes(e.id) ? "opacity:1" : "opacity:0.2" : "opacity:1";
135
+ }
136
+ function ce(e) {
137
+ return e.regAngle > 90 && e.regAngle < 270 ? `rotate(${e.regAngle + 180},${e.x},${e.y})` : `rotate(${e.regAngle},${e.x},${e.y})`;
138
+ }
139
+ function D(e) {
140
+ ee.value = 360 - e.regAngle, n.value.id && e.id === n.value.id ? (n.value = {}, d.value = []) : (n.value = e, d.value = [...e.relations]);
141
+ }
142
+ function V(e) {
143
+ return e.weight / ne.value * l.value.style.links.maxWidth;
144
+ }
145
+ const x = u(!1);
146
+ function de(e) {
147
+ x.value = e, L.value += 1;
148
+ }
149
+ return J({
150
+ generatePdf: S,
151
+ generateImage: R
152
+ }), (e, s) => (a(), o("div", {
153
+ ref_key: "relationCircleChart",
154
+ ref: p,
155
+ class: "vue-ui-relation-circle",
156
+ style: g(`width:100%;background:${l.value.style.backgroundColor};text-align:center;${l.value.responsive ? "height: 100%" : ""}`),
157
+ id: `relation_circle_${y.value}`
158
+ }, [
159
+ l.value.style.title.text ? (a(), o("div", {
160
+ key: 0,
161
+ ref_key: "chartTitle",
162
+ ref: N,
163
+ style: g(`width:100%;background:${l.value.style.backgroundColor}`)
164
+ }, [
165
+ me(Le, {
166
+ config: {
167
+ title: {
168
+ cy: "relation-div-title",
169
+ ...l.value.style.title
170
+ },
171
+ subtitle: {
172
+ cy: "relation-div-subtitle",
173
+ ...l.value.style.title.subtitle
174
+ }
175
+ }
176
+ }, null, 8, ["config"])
177
+ ], 4)) : C("", !0),
178
+ l.value.userOptions.show && P.value ? (a(), W(Ne, {
179
+ ref: "details",
180
+ key: `user_options_${L.value}`,
181
+ backgroundColor: l.value.style.backgroundColor,
182
+ color: l.value.style.color,
183
+ isPrinting: _(Q),
184
+ isImaging: _(Z),
185
+ uid: y.value,
186
+ hasPdf: l.value.userOptions.buttons.pdf,
187
+ hasImg: l.value.userOptions.buttons.img,
188
+ hasFullscreen: l.value.userOptions.buttons.img,
189
+ hasXls: !1,
190
+ isFullscreen: x.value,
191
+ titles: { ...l.value.userOptions.buttonTitles },
192
+ chartElement: p.value,
193
+ onToggleFullscreen: de,
194
+ onGeneratePdf: _(S),
195
+ onGenerateImage: _(R)
196
+ }, ke({ _: 2 }, [
197
+ e.$slots.optionPdf ? {
198
+ name: "optionPdf",
199
+ fn: E(() => [
200
+ b(e.$slots, "optionPdf", {}, void 0, !0)
201
+ ]),
202
+ key: "0"
203
+ } : void 0,
204
+ e.$slots.optionImg ? {
205
+ name: "optionImg",
206
+ fn: E(() => [
207
+ b(e.$slots, "optionImg", {}, void 0, !0)
208
+ ]),
209
+ key: "1"
210
+ } : void 0,
211
+ e.$slots.optionFullscreen ? {
212
+ name: "optionFullscreen",
213
+ fn: E(({ toggleFullscreen: t, isFullscreen: r }) => [
214
+ b(e.$slots, "optionFullscreen", _e(pe({ toggleFullscreen: t, isFullscreen: r })), void 0, !0)
215
+ ]),
216
+ key: "2"
217
+ } : void 0
218
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : C("", !0),
219
+ P.value ? (a(), o("svg", {
220
+ key: 2,
221
+ xmlns: _(Ie),
222
+ class: z([{ "vue-data-ui-fullscreen--on": x.value, "vue-data-ui-fulscreen--off": !x.value }, "relation-circle"]),
223
+ viewBox: `0 0 ${i.value.width <= 0 ? 10 : i.value.width} ${i.value.height <= 0 ? 10 : i.value.height}`,
224
+ width: "100%",
225
+ style: g(`user-select:none; background:${l.value.style.backgroundColor}`)
226
+ }, [
227
+ $e("circle", {
228
+ cx: (i.value.width <= 0 ? 1e-4 : i.value.width) / 2,
229
+ cy: (i.value.height <= 0 ? 1e-4 : i.value.height) / 2 + l.value.style.circle.offsetY,
230
+ r: f.value <= 0 ? 1e-4 : f.value,
231
+ stroke: l.value.style.circle.stroke,
232
+ "stroke-width": l.value.style.circle.strokeWidth,
233
+ fill: "transparent",
234
+ class: "main-circle"
235
+ }, null, 8, Be),
236
+ te.value ? (a(), o("g", Ge, [
237
+ (a(!0), o(w, null, O(m.value, (t, r) => (a(), o("path", {
238
+ key: `relation_${r}`,
239
+ style: g(U(t)),
240
+ stroke: G(t),
241
+ class: z(["relation", { "vue-ui-relation-circle-selected": n.value.hasOwnProperty("id") && d.value.includes(t.id) }]),
242
+ d: `M${t.x1},${t.y1} C${t.x1},${t.y1} ${i.value.width / 2},${i.value.height / 2 + l.value.style.circle.offsetY} ${t.x2},${t.y2}`,
243
+ fill: "none",
244
+ "stroke-width": V(t),
245
+ "stroke-linecap": "round"
246
+ }, null, 14, Ue))), 128))
247
+ ])) : (a(), o("g", De, [
248
+ (a(!0), o(w, null, O(m.value, (t, r) => (a(), o("line", {
249
+ key: `relation_${r}`,
250
+ stroke: G(t),
251
+ style: g(U(t)),
252
+ x1: t.x1,
253
+ x2: t.x2,
254
+ y1: t.y1,
255
+ y2: t.y2,
256
+ class: z({ "vue-ui-relation-circle-selected": n.value.hasOwnProperty("id") && d.value.includes(t.id) }),
257
+ "stroke-linecap": "round"
258
+ }, null, 14, Ve))), 128))
259
+ ])),
260
+ (a(!0), o(w, null, O(h.value, (t, r) => (a(), o("text", {
261
+ key: `plot_text_${r}`,
262
+ "text-anchor": ae(t),
263
+ transform: ce(t),
264
+ x: ue(t),
265
+ y: t.y + 5,
266
+ onClick: (k) => D(t),
267
+ class: "vue-ui-relation-circle-legend",
268
+ "transform-origin": "start",
269
+ "font-weight": n.value.id === t.id ? "900" : "400",
270
+ style: g(`font-family:${l.value.style.fontFamily};${oe(t)}`),
271
+ "font-size": l.value.style.labels.fontSize,
272
+ fill: l.value.style.labels.color
273
+ }, xe(t.label), 13, We))), 128)),
274
+ (a(!0), o(w, null, O(h.value, (t, r) => (a(), o("circle", {
275
+ cx: t.x,
276
+ cy: t.y,
277
+ key: `plot_${r}`,
278
+ style: g(ie(t)),
279
+ class: "vue-ui-relation-circle-plot",
280
+ fill: l.value.style.plot.color,
281
+ onClick: (k) => D(t),
282
+ r: l.value.style.plot.radius
283
+ }, null, 12, Xe))), 128)),
284
+ b(e.$slots, "svg", { svg: i.value }, void 0, !0)
285
+ ], 14, Me)) : C("", !0),
286
+ P.value ? C("", !0) : (a(), W(Te, {
287
+ key: 3,
288
+ config: {
289
+ type: "relationCircle",
290
+ style: {
291
+ backgroundColor: l.value.style.backgroundColor,
292
+ relationCircle: {
293
+ color: "#CCCCCC"
294
+ }
295
+ }
296
+ }
297
+ }, null, 8, ["config"]))
298
+ ], 12, je));
299
+ }
300
+ }, tt = /* @__PURE__ */ Ce(Ye, [["__scopeId", "data-v-44982e30"]]);
301
+ export {
302
+ tt as default
303
+ };