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,746 @@
1
+ import { toRef as ne, resolveComponent as re, openBlock as s, createElementBlock as i, Fragment as y, renderList as U, withModifiers as B, createBlock as I, createCommentVNode as m, createElementVNode as x, toDisplayString as we, normalizeStyle as Z, createVNode as R, computed as N, onMounted as Ve, ref as g, normalizeClass as be, unref as A, createSlots as We, withCtx as $, renderSlot as F, normalizeProps as ae, guardReactiveProps as se, createTextVNode as Ye, nextTick as ke } from "vue";
2
+ import { B as Y, _ as qe, i as Ze, j as Je, e as Ce, f as Ke, p as $e, g as Qe, X as _e, l as et, D as tt, b as ot, v as lt, w as at, y as st, z as nt } from "./data-table-d-VcuH-r.js";
3
+ import { t as rt } from "./themes-lgjsYHsH.js";
4
+ import { u as xe, _ as it } from "./title-BF-9Qcni.js";
5
+ import { U as ut } from "./user-options-DZgCz8UA.js";
6
+ import { _ as ct } from "./tooltip-D85WEOKi.js";
7
+ import { u as dt, a as vt, S as ft, A as ht } from "./vue-ui-3d-bar-DW7kGJSz.js";
8
+ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], gt = {
9
+ __name: "RecursiveCircles",
10
+ props: {
11
+ color: {
12
+ type: String,
13
+ default: "#000000"
14
+ },
15
+ dataset: {
16
+ type: Array,
17
+ default: () => []
18
+ },
19
+ hoveredUid: {
20
+ type: String,
21
+ default: null
22
+ },
23
+ linkColor: {
24
+ type: String,
25
+ default: "#CCCCCC"
26
+ },
27
+ stroke: {
28
+ type: String,
29
+ default: "#FFFFFF"
30
+ },
31
+ strokeHovered: {
32
+ type: String,
33
+ default: "#000000"
34
+ }
35
+ },
36
+ emits: ["zoom", "hover"],
37
+ setup(a, { emit: k }) {
38
+ const C = a;
39
+ function c(n) {
40
+ k("zoom", n);
41
+ }
42
+ function d(n) {
43
+ k("hover", n);
44
+ }
45
+ return ne(C, "dataset").value.forEach((n) => {
46
+ n.nodes && n.nodes.length > 0 && n.nodes.forEach((u) => {
47
+ u.ancestor = n;
48
+ });
49
+ }), (n, u) => {
50
+ const P = re("RecursiveCircles", !0);
51
+ return s(!0), i(y, null, U(a.dataset, (f) => (s(), i(y, null, [
52
+ f.polygonPath && f.polygonPath.coordinates ? (s(), i(y, { key: 0 }, [
53
+ (s(!0), i(y, null, U(f.polygonPath.coordinates, (M, O) => (s(), i("circle", {
54
+ cx: M.x,
55
+ cy: M.y,
56
+ r: f.circleRadius,
57
+ fill: `url(#gradient_${f.color})`,
58
+ stroke: a.hoveredUid && a.hoveredUid === f.uid ? a.strokeHovered : a.stroke,
59
+ "stroke-width": a.hoveredUid && a.hoveredUid === f.uid ? f.circleRadius / 6 : f.circleRadius / 12,
60
+ style: { cursor: "pointer" },
61
+ onClick: B((b) => c(f), ["stop"]),
62
+ onMouseover: (b) => d(f),
63
+ onMouseleave: u[0] || (u[0] = (b) => d(null))
64
+ }, null, 40, pt))), 256)),
65
+ f.nodes && f.nodes.length > 0 ? (s(), I(P, {
66
+ key: 0,
67
+ dataset: f.nodes,
68
+ color: a.color,
69
+ stroke: a.stroke,
70
+ strokeHovered: a.strokeHovered,
71
+ hoveredUid: a.hoveredUid,
72
+ onZoom: c,
73
+ onHover: d
74
+ }, null, 8, ["dataset", "color", "stroke", "strokeHovered", "hoveredUid"])) : m("", !0)
75
+ ], 64)) : m("", !0)
76
+ ], 64))), 256);
77
+ };
78
+ }
79
+ }, yt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], mt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], bt = {
80
+ __name: "RecursiveLinks",
81
+ props: {
82
+ dataset: {
83
+ type: Array,
84
+ default: () => []
85
+ },
86
+ color: {
87
+ type: String,
88
+ default: "#DDDDDD"
89
+ },
90
+ backgroundColor: {
91
+ type: String,
92
+ default: "#FFFFFF"
93
+ }
94
+ },
95
+ setup(a) {
96
+ return ne(a, "dataset").value.forEach((c) => {
97
+ c.nodes && c.nodes.length > 0 && c.nodes.forEach((d) => {
98
+ d.ancestor = c;
99
+ });
100
+ }), (c, d) => {
101
+ const S = re("RecursiveLinks", !0);
102
+ return s(), i(y, null, [
103
+ (s(!0), i(y, null, U(a.dataset, (n) => (s(), i(y, null, [
104
+ n.polygonPath && n.polygonPath.coordinates ? (s(!0), i(y, { key: 0 }, U(n.polygonPath.coordinates, (u, P) => (s(), i(y, null, [
105
+ n.ancestor && n.ancestor.polygonPath ? (s(), i(y, { key: 0 }, [
106
+ x("line", {
107
+ x1: u.x,
108
+ y1: u.y,
109
+ x2: n.ancestor.polygonPath.coordinates[0].x,
110
+ y2: n.ancestor.polygonPath.coordinates[0].y,
111
+ stroke: a.backgroundColor,
112
+ "stroke-width": n.circleRadius / 1.5
113
+ }, null, 8, yt),
114
+ x("line", {
115
+ x1: u.x,
116
+ y1: u.y,
117
+ x2: n.ancestor.polygonPath.coordinates[0].x,
118
+ y2: n.ancestor.polygonPath.coordinates[0].y,
119
+ stroke: a.color,
120
+ "stroke-width": n.circleRadius / 2
121
+ }, null, 8, mt)
122
+ ], 64)) : m("", !0)
123
+ ], 64))), 256)) : m("", !0)
124
+ ], 64))), 256)),
125
+ (s(!0), i(y, null, U(a.dataset, (n) => (s(), i(y, null, [
126
+ n.polygonPath && n.polygonPath.coordinates ? (s(), i(y, { key: 0 }, [
127
+ n.nodes && n.nodes.length > 0 ? (s(), I(S, {
128
+ key: 0,
129
+ dataset: n.nodes,
130
+ color: a.color,
131
+ backgroundColor: a.backgroundColor
132
+ }, null, 8, ["dataset", "color", "backgroundColor"])) : m("", !0)
133
+ ], 64)) : m("", !0)
134
+ ], 64))), 256))
135
+ ], 64);
136
+ };
137
+ }
138
+ }, kt = ["x", "y", "fill", "font-size"], Ct = {
139
+ __name: "RecursiveLabels",
140
+ props: {
141
+ color: {
142
+ type: String,
143
+ default: "#000000"
144
+ },
145
+ dataset: {
146
+ type: Array,
147
+ default: () => []
148
+ },
149
+ hoveredUid: {
150
+ type: String,
151
+ default: null
152
+ }
153
+ },
154
+ emits: ["zoom", "hover"],
155
+ setup(a, { emit: k }) {
156
+ return ne(a, "dataset").value.forEach((d) => {
157
+ d.nodes && d.nodes.length > 0 && d.nodes.forEach((S) => {
158
+ S.ancestor = d;
159
+ });
160
+ }), (d, S) => {
161
+ const n = re("RecursiveLabels", !0);
162
+ return s(!0), i(y, null, U(a.dataset, (u) => (s(), i(y, null, [
163
+ u.polygonPath && u.polygonPath.coordinates ? (s(), i(y, { key: 0 }, [
164
+ (s(!0), i(y, null, U(u.polygonPath.coordinates, (P) => (s(), i("text", {
165
+ x: P.x,
166
+ y: P.y + u.circleRadius * 2,
167
+ fill: a.color,
168
+ "font-size": u.circleRadius,
169
+ "text-anchor": "middle",
170
+ style: { opacity: "0.8", "pointer-events": "none" }
171
+ }, we(u.name), 9, kt))), 256)),
172
+ u.nodes && u.nodes.length > 0 ? (s(), I(n, {
173
+ key: 0,
174
+ dataset: u.nodes,
175
+ color: a.color,
176
+ hoveredUid: a.hoveredUid
177
+ }, null, 8, ["dataset", "color", "hoveredUid"])) : m("", !0)
178
+ ], 64)) : m("", !0)
179
+ ], 64))), 256);
180
+ };
181
+ }
182
+ }, $t = { style: { position: "relative", height: "100%", width: "100%" } }, xt = {
183
+ __name: "BaseDirectionPad",
184
+ props: {
185
+ color: {
186
+ type: String,
187
+ default: "#FF0000"
188
+ },
189
+ isFullscreen: {
190
+ type: Boolean,
191
+ default: !1
192
+ }
193
+ },
194
+ emits: ["moveLeft", "moveTop", "moveRight", "moveBottom", "reset"],
195
+ setup(a, { emit: k }) {
196
+ return (C, c) => (s(), i("div", {
197
+ style: Z(`position: ${a.isFullscreen ? "fixed" : "absolute"};bottom:0;right:${a.isFullscreen ? "12px" : "0"};width:80px;height:80px`),
198
+ "data-html2canvas-ignore": ""
199
+ }, [
200
+ x("div", $t, [
201
+ x("button", {
202
+ onClick: c[0] || (c[0] = B((d) => k("moveLeft"), ["stop"])),
203
+ style: { position: "absolute", left: "0", top: "50%", transform: "translateY(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
204
+ }, [
205
+ R(Y, {
206
+ stroke: a.color,
207
+ name: "arrowLeft",
208
+ style: { cursor: "pointer" }
209
+ }, null, 8, ["stroke"])
210
+ ]),
211
+ x("button", {
212
+ onClick: c[1] || (c[1] = B((d) => k("moveTop"), ["stop"])),
213
+ style: { position: "absolute", top: "0", left: "50%", transform: "translateX(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
214
+ }, [
215
+ R(Y, {
216
+ stroke: a.color,
217
+ name: "arrowTop",
218
+ style: { cursor: "pointer" }
219
+ }, null, 8, ["stroke"])
220
+ ]),
221
+ x("button", {
222
+ onClick: c[2] || (c[2] = B((d) => k("moveRight"), ["stop"])),
223
+ style: { position: "absolute", right: "0", top: "50%", transform: "translateY(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
224
+ }, [
225
+ R(Y, {
226
+ stroke: a.color,
227
+ name: "arrowRight",
228
+ style: { cursor: "pointer" }
229
+ }, null, 8, ["stroke"])
230
+ ]),
231
+ x("button", {
232
+ onClick: c[3] || (c[3] = B((d) => k("moveBottom"), ["stop"])),
233
+ style: { position: "absolute", bottom: "0", left: "50%", transform: "translateX(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
234
+ }, [
235
+ R(Y, {
236
+ stroke: a.color,
237
+ name: "arrowBottom",
238
+ style: { cursor: "pointer" }
239
+ }, null, 8, ["stroke"])
240
+ ]),
241
+ x("button", {
242
+ onClick: c[4] || (c[4] = B((d) => k("reset"), ["stop"])),
243
+ style: { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%,-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
244
+ }, [
245
+ R(Y, {
246
+ stroke: a.color,
247
+ name: "close",
248
+ style: { cursor: "pointer" },
249
+ strokeWidth: 2
250
+ }, null, 8, ["stroke"])
251
+ ])
252
+ ])
253
+ ], 4));
254
+ }
255
+ }, wt = ["id"], Pt = ["xmlns", "viewBox"], Tt = ["id"], Ft = ["stop-color"], Rt = ["stop-color"], St = ["innerHTML"], Lt = {
256
+ __name: "vue-ui-molecule",
257
+ props: {
258
+ config: {
259
+ type: Object,
260
+ default() {
261
+ return {};
262
+ }
263
+ },
264
+ dataset: {
265
+ type: Array,
266
+ default() {
267
+ return [];
268
+ }
269
+ }
270
+ },
271
+ setup(a, { expose: k }) {
272
+ const C = a, { vue_ui_molecule: c } = dt(), d = N(() => !!C.dataset && C.dataset.length);
273
+ Ve(() => {
274
+ Ze(C.dataset) && Je({
275
+ componentName: "VueUiMolecule",
276
+ type: "dataset"
277
+ });
278
+ });
279
+ const S = g(Ce()), n = g(null), u = g(!1), P = g(""), f = g(null), M = g(null), O = g(!1), b = g(null), ie = g(null), J = g(0), t = N(() => {
280
+ const e = xe({
281
+ userConfig: C.config,
282
+ defaultConfig: c
283
+ });
284
+ return e.theme ? {
285
+ ...xe({
286
+ userConfig: rt.vue_ui_molecule[e.theme] || C.config,
287
+ defaultConfig: e
288
+ }),
289
+ customPalette: Ke[e.theme] || $e
290
+ } : e;
291
+ }), { isPrinting: Pe, isImaging: Te, generatePdf: ue, generateImage: ce } = vt({
292
+ elementId: `cluster_${S.value}`,
293
+ fileName: t.value.style.chart.title.text || "vue-ui-molecule"
294
+ }), Fe = N(() => Qe(t.value.customPalette)), w = g({
295
+ showTable: t.value.table.show,
296
+ showDataLabels: !0,
297
+ showTooltip: t.value.style.chart.tooltip.show
298
+ });
299
+ function de(e, o = 0) {
300
+ return Array.isArray(e) && e.length > 0 && e[0].nodes ? de(e[0].nodes, o + 1) : o;
301
+ }
302
+ function Re() {
303
+ const e = de(C.dataset);
304
+ let o = 100, l = o;
305
+ for (let v = 0; v < e; v += 1)
306
+ o /= 1, l += o;
307
+ return {
308
+ height: l,
309
+ width: l
310
+ };
311
+ }
312
+ const L = g(Re()), K = g(`0 0 ${L.value.width} ${L.value.height}`);
313
+ function ve(e, o = { x: -L.value.width / 2.43, y: L.value.height / 2 }, l = L.value.width / 1.1, v = 24, r = 0, h = 0, G = "#BBBBBB") {
314
+ if (e && e.length > 0) {
315
+ const oe = ot({
316
+ plot: o,
317
+ radius: l,
318
+ sides: e.length,
319
+ rotation: r
320
+ });
321
+ e.forEach((p, z) => {
322
+ const V = oe.coordinates[z];
323
+ let D;
324
+ if (p.ancestor ? p.ancestor.ancestor ? D = p.ancestor.color || G : (D = Fe.value[h] || $e[h] || G, h += 1) : D = G, p.polygonPath = {
325
+ coordinates: [V]
326
+ }, p.circleRadius = v, p.color = D, p.uid = Ce(), p.nodes && p.nodes.length > 0) {
327
+ const le = !p.ancestor || !p.ancestor.ancestor ? h : 0;
328
+ p.nodes = ve(
329
+ p.nodes,
330
+ V,
331
+ l / 2.9,
332
+ v / 2.2,
333
+ r + Math.PI * z / p.nodes.length,
334
+ le,
335
+ D
336
+ );
337
+ }
338
+ });
339
+ }
340
+ return e;
341
+ }
342
+ function Se(e) {
343
+ const o = /* @__PURE__ */ new Set();
344
+ function l(r) {
345
+ r.forEach((h) => {
346
+ h.color && !o.has(h.color) && o.add(h.color), h.nodes && h.nodes.length > 0 && l(h.nodes);
347
+ });
348
+ }
349
+ l(e);
350
+ const v = {};
351
+ return Array.from(o).forEach((r, h) => {
352
+ v[r] = `gradient_${h}`;
353
+ }), v;
354
+ }
355
+ const Le = N(() => Se(T.value)), T = N(() => ve(C.dataset));
356
+ function Q() {
357
+ O.value = !1, M.value = null, ie.value = null, b.value = null, ee({
358
+ polygonPath: {
359
+ coordinates: [{ x: L.value.width / 2, y: L.value.height / 2 }]
360
+ },
361
+ circleRadius: 24
362
+ });
363
+ }
364
+ const _ = g(null);
365
+ function ee(e) {
366
+ f.value.focus(), ke(() => {
367
+ _.value && cancelAnimationFrame(_.value);
368
+ const o = K.value.split(" "), l = parseFloat(o[0]), v = parseFloat(o[1]), r = parseFloat(o[2]), h = parseFloat(o[3]), { x: G, y: oe } = e.polygonPath.coordinates[0], { circleRadius: p } = e, z = 8.34, V = G - p * z, D = oe - p * z, le = p * z * 2, He = p * z * 2, Ee = Math.sqrt((V - l) ** 2 + (D - v) ** 2), W = Math.min(1200, Math.max(20, Math.floor(Ee / 10))), Ae = (V - l) / W, Xe = (D - v) / W, je = (le - r) / W, Ge = (He - h) / W;
369
+ let E = 0;
370
+ function me() {
371
+ K.value = `${l + Ae * E} ${v + Xe * E} ${r + je * E} ${h + Ge * E}`, E += t.value.style.chart.zoom.speed, E <= W && (_.value = requestAnimationFrame(me));
372
+ }
373
+ me();
374
+ });
375
+ }
376
+ function De(e) {
377
+ M.value === e.uid ? Q() : (M.value = e.uid, ie.value = e, b.value = {
378
+ circleRadius: e.circleRadius,
379
+ polygonPath: {
380
+ coordinates: [{ x: e.polygonPath.coordinates[0].x, y: e.polygonPath.coordinates[0].y }]
381
+ }
382
+ }, ee(e), O.value = e.uid !== T.value[0].uid);
383
+ }
384
+ function Ie(e) {
385
+ if (e.target.nodeName !== "circle")
386
+ Q(), O.value = !1;
387
+ else
388
+ return;
389
+ }
390
+ const te = g(null);
391
+ function Ue(e) {
392
+ te.value = {
393
+ datapoint: e,
394
+ seriesIndex: -1,
395
+ series: T.value,
396
+ config: t.value
397
+ };
398
+ const o = t.value.style.chart.tooltip.customFormat;
399
+ if (st(o) && nt(() => o({
400
+ seriesIndex: -1,
401
+ datapoint: e,
402
+ series: T.value,
403
+ config: t.value
404
+ })))
405
+ P.value = o({
406
+ seriesIndex: -1,
407
+ // well, ok
408
+ datapoint: e,
409
+ series: T.value,
410
+ config: t.value
411
+ });
412
+ else {
413
+ let l = "";
414
+ l += `<div style="display:flex;align-items:center;gap:3px"><div style="color:${e.color}">⬤</div><div>${e.name}</div></div>`, e.details && (l += `<div style="width:100%;border-top:1px solid ${t.value.style.chart.tooltip.borderColor};margin-top: 2px">${e.details}</div>`), P.value = `<div style="font-family:inherit">${l}</div>`;
415
+ }
416
+ }
417
+ const fe = g(null), X = g(null);
418
+ function ze(e) {
419
+ fe.value = e, e ? (u.value = !0, Ue(e), X.value = e.uid) : (u.value = !1, P.value = "", X.value = null);
420
+ }
421
+ function q(e) {
422
+ e === "right" && (b.value.polygonPath.coordinates[0].x += b.value.circleRadius), e === "left" && (b.value.polygonPath.coordinates[0].x -= b.value.circleRadius), e === "top" && (b.value.polygonPath.coordinates[0].y -= b.value.circleRadius), e === "bottom" && (b.value.polygonPath.coordinates[0].y += b.value.circleRadius), ee(b.value);
423
+ }
424
+ function Ne(e) {
425
+ const o = [];
426
+ function l(v) {
427
+ v.forEach((r) => {
428
+ const h = {
429
+ name: r.name,
430
+ details: r.details || "-",
431
+ ancestor: r.ancestor && r.ancestor.name || "-",
432
+ color: r.color || ""
433
+ };
434
+ o.push(h), r.nodes && r.nodes.length > 0 && l(r.nodes, r.name);
435
+ });
436
+ }
437
+ return l(e), o;
438
+ }
439
+ const Be = N(() => Ne(T.value)), H = N(() => {
440
+ const e = [
441
+ t.value.table.translations.nodeName,
442
+ t.value.table.translations.details,
443
+ t.value.table.translations.ancestor
444
+ ], o = Be.value.map((r, h) => [
445
+ {
446
+ color: r.color,
447
+ name: r.name
448
+ },
449
+ r.details,
450
+ r.ancestor || ""
451
+ ]), l = {
452
+ th: {
453
+ backgroundColor: t.value.table.th.backgroundColor,
454
+ color: t.value.table.th.color,
455
+ outline: t.value.table.th.outline
456
+ },
457
+ td: {
458
+ backgroundColor: t.value.table.td.backgroundColor,
459
+ color: t.value.table.td.color,
460
+ outline: t.value.table.td.outline
461
+ },
462
+ breakpoint: t.value.table.responsiveBreakpoint
463
+ }, v = [
464
+ t.value.table.translations.nodeName,
465
+ t.value.table.translations.details,
466
+ t.value.table.translations.ancestor
467
+ ];
468
+ return {
469
+ head: e,
470
+ body: o,
471
+ config: l,
472
+ colNames: v
473
+ };
474
+ });
475
+ function he() {
476
+ ke(() => {
477
+ const e = H.value.body.map((v, r) => [[v[0].name], [v[1]], [v[2]]]), o = [[t.value.style.chart.title.text], [t.value.style.chart.title.subtitle.text], [[...H.value.head]]].concat(e), l = lt(o);
478
+ at({ csvContent: l, title: t.value.style.chart.title.text || "vue-ui-molecule" });
479
+ });
480
+ }
481
+ function Me() {
482
+ return T.value;
483
+ }
484
+ const j = g(!1);
485
+ function Oe(e) {
486
+ j.value = e, J.value += 1;
487
+ }
488
+ function pe() {
489
+ w.value.showTable = !w.value.showTable;
490
+ }
491
+ function ge() {
492
+ w.value.showDataLabels = !w.value.showDataLabels;
493
+ }
494
+ function ye() {
495
+ w.value.showTooltip = !w.value.showTooltip;
496
+ }
497
+ return k({
498
+ getData: Me,
499
+ generatePdf: ue,
500
+ generateCsv: he,
501
+ generateImage: ce,
502
+ toggleTable: pe,
503
+ toggleLabels: ge,
504
+ toggleTooltip: ye
505
+ }), (e, o) => (s(), i("div", {
506
+ onMouseleave: o[7] || (o[7] = (l) => {
507
+ fe.value = null, X.value = null;
508
+ }),
509
+ ref_key: "moleculeChart",
510
+ ref: f,
511
+ class: be(`vue-ui-molecule ${j.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
512
+ style: Z(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),
513
+ id: `cluster_${S.value}`
514
+ }, [
515
+ t.value.style.chart.title.text ? (s(), i("div", {
516
+ key: 0,
517
+ style: Z(`width:100%;background:${t.value.style.chart.backgroundColor};`)
518
+ }, [
519
+ R(it, {
520
+ config: {
521
+ title: {
522
+ cy: "molecule-div-title",
523
+ ...t.value.style.chart.title
524
+ },
525
+ subtitle: {
526
+ cy: "molecule-div-subtitle",
527
+ ...t.value.style.chart.title.subtitle
528
+ }
529
+ }
530
+ }, null, 8, ["config"])
531
+ ], 4)) : m("", !0),
532
+ t.value.userOptions.show && d.value ? (s(), I(ut, {
533
+ ref_key: "details",
534
+ ref: n,
535
+ key: `user_options_${J.value}`,
536
+ backgroundColor: t.value.style.chart.backgroundColor,
537
+ color: t.value.style.chart.color,
538
+ isPrinting: A(Pe),
539
+ isImaging: A(Te),
540
+ uid: S.value,
541
+ hasTooltip: t.value.userOptions.buttons.tooltip && t.value.style.chart.tooltip.show,
542
+ hasPdf: t.value.userOptions.buttons.pdf,
543
+ hasXls: t.value.userOptions.buttons.csv,
544
+ hasImg: t.value.userOptions.buttons.img,
545
+ hasTable: t.value.userOptions.buttons.table,
546
+ hasLabel: t.value.userOptions.buttons.labels,
547
+ hasFullscreen: t.value.userOptions.buttons.fullscreen,
548
+ isTooltip: w.value.showTooltip,
549
+ titles: { ...t.value.userOptions.buttonTitles },
550
+ chartElement: f.value,
551
+ onToggleFullscreen: Oe,
552
+ onGeneratePdf: A(ue),
553
+ onGenerateCsv: he,
554
+ onGenerateImage: A(ce),
555
+ onToggleTable: pe,
556
+ onToggleLabels: ge,
557
+ onToggleTooltip: ye
558
+ }, We({ _: 2 }, [
559
+ e.$slots.optionTooltip ? {
560
+ name: "optionTooltip",
561
+ fn: $(() => [
562
+ F(e.$slots, "optionTooltip", {}, void 0, !0)
563
+ ]),
564
+ key: "0"
565
+ } : void 0,
566
+ e.$slots.optionPdf ? {
567
+ name: "optionPdf",
568
+ fn: $(() => [
569
+ F(e.$slots, "optionPdf", {}, void 0, !0)
570
+ ]),
571
+ key: "1"
572
+ } : void 0,
573
+ e.$slots.optionCsv ? {
574
+ name: "optionCsv",
575
+ fn: $(() => [
576
+ F(e.$slots, "optionCsv", {}, void 0, !0)
577
+ ]),
578
+ key: "2"
579
+ } : void 0,
580
+ e.$slots.optionImg ? {
581
+ name: "optionImg",
582
+ fn: $(() => [
583
+ F(e.$slots, "optionImg", {}, void 0, !0)
584
+ ]),
585
+ key: "3"
586
+ } : void 0,
587
+ e.$slots.optionTable ? {
588
+ name: "optionTable",
589
+ fn: $(() => [
590
+ F(e.$slots, "optionTable", {}, void 0, !0)
591
+ ]),
592
+ key: "4"
593
+ } : void 0,
594
+ e.$slots.optionLabels ? {
595
+ name: "optionLabels",
596
+ fn: $(() => [
597
+ F(e.$slots, "optionLabels", {}, void 0, !0)
598
+ ]),
599
+ key: "5"
600
+ } : void 0,
601
+ e.$slots.optionFullscreen ? {
602
+ name: "optionFullscreen",
603
+ fn: $(({ toggleFullscreen: l, isFullscreen: v }) => [
604
+ F(e.$slots, "optionFullscreen", ae(se({ toggleFullscreen: l, isFullscreen: v })), void 0, !0)
605
+ ]),
606
+ key: "6"
607
+ } : void 0
608
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : m("", !0),
609
+ d.value ? (s(), i("svg", {
610
+ key: 2,
611
+ xmlns: A(_e),
612
+ viewBox: K.value,
613
+ class: be({ "vue-data-ui-fullscreen--on": j.value, "vue-data-ui-fulscreen--off": !j.value }),
614
+ style: Z(`overflow: hidden; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`),
615
+ onClick: o[0] || (o[0] = B((l) => Ie(l), ["stop"]))
616
+ }, [
617
+ x("defs", null, [
618
+ (s(!0), i(y, null, U(Object.keys(Le.value), (l) => (s(), i("radialGradient", {
619
+ id: `gradient_${l}`,
620
+ cx: "50%",
621
+ cy: "30%",
622
+ r: "50%",
623
+ fx: "50%",
624
+ fy: "50%"
625
+ }, [
626
+ x("stop", {
627
+ offset: "0%",
628
+ "stop-color": A(et)(l, 0.5)
629
+ }, null, 8, Ft),
630
+ x("stop", {
631
+ offset: "100%",
632
+ "stop-color": l
633
+ }, null, 8, Rt)
634
+ ], 8, Tt))), 256))
635
+ ]),
636
+ R(bt, {
637
+ dataset: T.value,
638
+ color: t.value.style.chart.links.stroke,
639
+ backgroundColor: t.value.style.chart.backgroundColor
640
+ }, null, 8, ["dataset", "color", "backgroundColor"]),
641
+ R(gt, {
642
+ dataset: T.value,
643
+ hoveredUid: X.value,
644
+ stroke: t.value.style.chart.nodes.stroke,
645
+ strokeHovered: t.value.style.chart.nodes.strokeHovered,
646
+ onZoom: De,
647
+ onHover: ze
648
+ }, null, 8, ["dataset", "hoveredUid", "stroke", "strokeHovered"]),
649
+ w.value.showDataLabels ? (s(), I(Ct, {
650
+ key: 0,
651
+ dataset: T.value,
652
+ color: t.value.style.chart.color,
653
+ hoveredUid: X.value
654
+ }, null, 8, ["dataset", "color", "hoveredUid"])) : m("", !0),
655
+ F(e.$slots, "svg", { svg: L.value }, void 0, !0)
656
+ ], 14, Pt)) : m("", !0),
657
+ O.value ? (s(), I(xt, {
658
+ key: `direction_pad_${J.value}`,
659
+ color: t.value.style.chart.color,
660
+ isFullscreen: j.value,
661
+ onMoveLeft: o[1] || (o[1] = (l) => q("left")),
662
+ onMoveRight: o[2] || (o[2] = (l) => q("right")),
663
+ onMoveTop: o[3] || (o[3] = (l) => q("top")),
664
+ onMoveBottom: o[4] || (o[4] = (l) => q("bottom")),
665
+ onReset: o[5] || (o[5] = (l) => {
666
+ Q(), O.value = !1;
667
+ })
668
+ }, null, 8, ["color", "isFullscreen"])) : m("", !0),
669
+ d.value ? m("", !0) : (s(), I(ft, {
670
+ key: 4,
671
+ config: {
672
+ type: "molecule",
673
+ style: {
674
+ backgroundColor: t.value.style.chart.backgroundColor,
675
+ molecule: {
676
+ color: "#CCCCCC"
677
+ }
678
+ }
679
+ }
680
+ }, null, 8, ["config"])),
681
+ R(ct, {
682
+ show: w.value.showTooltip && u.value,
683
+ backgroundColor: t.value.style.chart.tooltip.backgroundColor,
684
+ color: t.value.style.chart.tooltip.color,
685
+ borderRadius: t.value.style.chart.tooltip.borderRadius,
686
+ borderColor: t.value.style.chart.tooltip.borderColor,
687
+ borderWidth: t.value.style.chart.tooltip.borderWidth,
688
+ fontSize: t.value.style.chart.tooltip.fontSize,
689
+ backgroundOpacity: t.value.style.chart.tooltip.backgroundOpacity,
690
+ parent: f.value,
691
+ content: P.value,
692
+ isCustom: t.value.style.chart.tooltip.customFormat && typeof t.value.style.chart.tooltip.customFormat == "function"
693
+ }, {
694
+ "tooltip-before": $(() => [
695
+ F(e.$slots, "tooltip-before", ae(se({ ...te.value })), void 0, !0)
696
+ ]),
697
+ "tooltip-after": $(() => [
698
+ F(e.$slots, "tooltip-after", ae(se({ ...te.value })), void 0, !0)
699
+ ]),
700
+ _: 3
701
+ }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "parent", "content", "isCustom"]),
702
+ d.value ? (s(), I(ht, {
703
+ key: 5,
704
+ hideDetails: "",
705
+ config: {
706
+ open: w.value.showTable,
707
+ maxHeight: 1e4,
708
+ body: {
709
+ backgroundColor: t.value.style.chart.backgroundColor,
710
+ color: t.value.style.chart.color
711
+ },
712
+ head: {
713
+ backgroundColor: t.value.style.chart.backgroundColor,
714
+ color: t.value.style.chart.color
715
+ }
716
+ }
717
+ }, {
718
+ content: $(() => [
719
+ R(tt, {
720
+ colNames: H.value.colNames,
721
+ head: H.value.head,
722
+ body: H.value.body,
723
+ config: H.value.config,
724
+ title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? ` : ${t.value.style.chart.title.subtitle.text}` : ""}`,
725
+ onClose: o[6] || (o[6] = (l) => w.value.showTable = !1)
726
+ }, {
727
+ th: $(({ th: l }) => [
728
+ x("div", {
729
+ innerHTML: l,
730
+ style: { display: "flex", "align-items": "center" }
731
+ }, null, 8, St)
732
+ ]),
733
+ td: $(({ td: l }) => [
734
+ Ye(we(l.name || l), 1)
735
+ ]),
736
+ _: 1
737
+ }, 8, ["colNames", "head", "body", "config", "title"])
738
+ ]),
739
+ _: 1
740
+ }, 8, ["config"])) : m("", !0)
741
+ ], 46, wt));
742
+ }
743
+ }, Ot = /* @__PURE__ */ qe(Lt, [["__scopeId", "data-v-a51864fb"]]);
744
+ export {
745
+ Ot as default
746
+ };