vue-data-ui 2.3.3 → 2.3.5

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 (154) hide show
  1. package/README.md +19 -15
  2. package/dist/Arrow-BSOdhAJO.cjs +1 -0
  3. package/dist/Arrow-BjDVSrfA.js +101 -0
  4. package/dist/BaseIcon-BoKtpbrI.cjs +1 -0
  5. package/dist/BaseIcon-vmmfWlyR.js +174 -0
  6. package/dist/DataTable-CaB7GIwQ.js +127 -0
  7. package/dist/DataTable-ssrNbONo.cjs +1 -0
  8. package/dist/Legend-DHpoRTAE.js +62 -0
  9. package/dist/Legend-Dl5IYoxK.cjs +1 -0
  10. package/dist/Shape-CQT4S7N-.js +107 -0
  11. package/dist/Shape-CaF4pvOn.cjs +1 -0
  12. package/dist/Slicer-Bdb1BlrC.js +156 -0
  13. package/dist/Slicer-QC8nTm24.cjs +1 -0
  14. package/dist/Title-BNPZwnkp.js +46 -0
  15. package/dist/Title-Cj_xubjI.cjs +1 -0
  16. package/dist/Tooltip-CdJ5hegk.cjs +1 -0
  17. package/dist/Tooltip-ZnJAz6dl.js +94 -0
  18. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  19. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  20. package/dist/documentation/installation.md +14 -13
  21. package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
  22. package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
  23. package/dist/index-BMCvLyab.js +10369 -0
  24. package/dist/index-BkomIE9L.cjs +4 -0
  25. package/dist/{index.es-ypwniJN8.js → index.es-YufTdp0y.js} +1 -1
  26. package/dist/{index.es-Dnua3tHc.cjs → index.es-uyeSCnWE.cjs} +1 -1
  27. package/dist/jspdf.es.min-C660YX78.js +8038 -0
  28. package/dist/jspdf.es.min-DLYY9DTT.cjs +243 -0
  29. package/dist/pdf-97UbtKC2.js +44 -0
  30. package/dist/pdf-Cz3729tZ.cjs +1 -0
  31. package/dist/style.css +1 -1
  32. package/dist/types/vue-data-ui.d.cts +105 -5
  33. package/dist/types/vue-data-ui.d.ts +105 -5
  34. package/dist/useNestedProp-BMxXyPbW.cjs +1 -0
  35. package/dist/useNestedProp-CkP8xhG_.js +13 -0
  36. package/dist/usePrinter-BuuBz5JR.js +513 -0
  37. package/dist/usePrinter-r6uHYEcR.cjs +1 -0
  38. package/dist/useResponsive-B3TrDDIG.cjs +1 -0
  39. package/dist/useResponsive-NZB-WLRF.js +187 -0
  40. package/dist/vue-data-ui-Bc5U1cOP.cjs +9 -0
  41. package/dist/vue-data-ui-DxeO0iaC.js +254 -0
  42. package/dist/vue-data-ui.cjs +1 -1
  43. package/dist/vue-data-ui.js +61 -59
  44. package/dist/vue-ui-3d-bar-32wM0tiX.js +1085 -0
  45. package/dist/vue-ui-3d-bar-CgB0fLQT.cjs +19 -0
  46. package/dist/vue-ui-accordion-CLlVxx3Q.js +77 -0
  47. package/dist/vue-ui-accordion-SXsobrUt.cjs +1 -0
  48. package/dist/vue-ui-age-pyramid-D_CY99xF.js +596 -0
  49. package/dist/vue-ui-age-pyramid-DqiwcOIr.cjs +1 -0
  50. package/dist/vue-ui-annotator-DvP-IxDm.js +2177 -0
  51. package/dist/vue-ui-annotator-mntqd3q_.cjs +371 -0
  52. package/dist/vue-ui-candlestick-C-5u3i-1.js +657 -0
  53. package/dist/vue-ui-candlestick-C_TvUQvH.cjs +2 -0
  54. package/dist/vue-ui-carousel-table-BCePqkuz.cjs +1 -0
  55. package/dist/vue-ui-carousel-table-CAqhsLVx.js +304 -0
  56. package/dist/vue-ui-chestnut-DhWlw2MD.cjs +6 -0
  57. package/dist/vue-ui-chestnut-DylSfYMB.js +1051 -0
  58. package/dist/vue-ui-cursor-B04HJQVl.cjs +1 -0
  59. package/dist/vue-ui-cursor-DTYEMgbU.js +229 -0
  60. package/dist/vue-ui-dashboard-Bd0-cmSZ.js +232 -0
  61. package/dist/vue-ui-dashboard-DFIYwP1s.cjs +1 -0
  62. package/dist/vue-ui-digits-CW5qNMIk.js +153 -0
  63. package/dist/vue-ui-digits-Ced5mBJZ.cjs +1 -0
  64. package/dist/vue-ui-donut-DIhhgvWp.cjs +1 -0
  65. package/dist/vue-ui-donut-EeVmrVJs.js +743 -0
  66. package/dist/vue-ui-donut-evolution-BN08Y2hy.js +799 -0
  67. package/dist/vue-ui-donut-evolution-Ct6KAzs-.cjs +1 -0
  68. package/dist/vue-ui-dumbbell-BMlxS1Nq.js +624 -0
  69. package/dist/vue-ui-dumbbell-pextarqH.cjs +9 -0
  70. package/dist/vue-ui-flow-BXVsbmyb.cjs +1 -0
  71. package/dist/vue-ui-flow-CHmkgfyb.js +454 -0
  72. package/dist/vue-ui-galaxy-D4xyd-J1.cjs +1 -0
  73. package/dist/vue-ui-galaxy-kiVOZOBz.js +485 -0
  74. package/dist/vue-ui-gauge-BcO-z97J.js +466 -0
  75. package/dist/vue-ui-gauge-DPFBsbFj.cjs +1 -0
  76. package/dist/vue-ui-heatmap-DBOKYaJz.cjs +1 -0
  77. package/dist/vue-ui-heatmap-DD-Bzddj.js +598 -0
  78. package/dist/vue-ui-kpi-BEgf5yDv.cjs +1 -0
  79. package/dist/vue-ui-kpi-BS0o7zb9.js +54 -0
  80. package/dist/vue-ui-mini-loader-Bm5EJxtG.cjs +1 -0
  81. package/dist/vue-ui-mini-loader-DJEvG6ju.js +131 -0
  82. package/dist/vue-ui-molecule-DdwnFEBJ.js +750 -0
  83. package/dist/vue-ui-molecule-DzUqcaxd.cjs +1 -0
  84. package/dist/vue-ui-mood-radar-B9Gczs_Z.js +548 -0
  85. package/dist/vue-ui-mood-radar-DbB7m4Ku.cjs +1 -0
  86. package/dist/vue-ui-nested-donuts-BSINf8hd.cjs +16 -0
  87. package/dist/vue-ui-nested-donuts-CVQ1CaXo.js +771 -0
  88. package/dist/vue-ui-onion-D3-6Tv4u.cjs +1 -0
  89. package/dist/vue-ui-onion-Ut75t7hB.js +554 -0
  90. package/dist/vue-ui-parallel-coordinate-plot-Bjo09ZTX.js +651 -0
  91. package/dist/vue-ui-parallel-coordinate-plot-CJGkoIgN.cjs +8 -0
  92. package/dist/vue-ui-quadrant-CzCvejGn.cjs +1 -0
  93. package/dist/vue-ui-quadrant-Du9PKvlO.js +1178 -0
  94. package/dist/vue-ui-quick-chart-BsxsPbjz.cjs +13 -0
  95. package/dist/vue-ui-quick-chart-u0cPmD3q.js +1310 -0
  96. package/dist/vue-ui-radar-CBrpuE5r.js +614 -0
  97. package/dist/vue-ui-radar-DIpCrj1h.cjs +1 -0
  98. package/dist/vue-ui-rating-CaeGGlCw.js +271 -0
  99. package/dist/vue-ui-rating-D8fJC8Yt.cjs +1 -0
  100. package/dist/vue-ui-relation-circle-5DNf880s.js +304 -0
  101. package/dist/vue-ui-relation-circle-Ky3nPk6S.cjs +1 -0
  102. package/dist/vue-ui-rings-CffZ4T2S.cjs +1 -0
  103. package/dist/vue-ui-rings-IE3IdNRF.js +510 -0
  104. package/dist/vue-ui-scatter-C4GCZm0V.js +874 -0
  105. package/dist/vue-ui-scatter-TsX5dW9l.cjs +1 -0
  106. package/dist/vue-ui-screenshot-Bl3oooKI.js +160 -0
  107. package/dist/vue-ui-screenshot-Bzpg6yof.cjs +3 -0
  108. package/dist/vue-ui-skeleton-BisWX1sO.js +2064 -0
  109. package/dist/vue-ui-skeleton-JmGp11-u.cjs +41 -0
  110. package/dist/vue-ui-smiley-BhSrt9f-.cjs +2 -0
  111. package/dist/vue-ui-smiley-Sth2pqG1.js +763 -0
  112. package/dist/vue-ui-spark-trend-C8NSz4l8.cjs +1 -0
  113. package/dist/vue-ui-spark-trend-DAqO0TW2.js +246 -0
  114. package/dist/vue-ui-sparkbar-B0zX7NU7.js +242 -0
  115. package/dist/vue-ui-sparkbar-hL1Q6ObK.cjs +1 -0
  116. package/dist/vue-ui-sparkgauge-CWR8zJnU.js +157 -0
  117. package/dist/vue-ui-sparkgauge-tbVqaLCK.cjs +1 -0
  118. package/dist/vue-ui-sparkhistogram-Dv-lml4g.cjs +1 -0
  119. package/dist/vue-ui-sparkhistogram-DxqCtDpw.js +244 -0
  120. package/dist/vue-ui-sparkline-B6pvaBY_.cjs +1 -0
  121. package/dist/vue-ui-sparkline-BpL1jn7F.js +333 -0
  122. package/dist/vue-ui-sparkstackbar-BzbuBNIV.js +244 -0
  123. package/dist/vue-ui-sparkstackbar-CQ2TEi4p.cjs +1 -0
  124. package/dist/vue-ui-strip-plot-DCC6F4VM.cjs +1 -0
  125. package/dist/vue-ui-strip-plot-DCcbD6UE.js +618 -0
  126. package/dist/vue-ui-table-CFqIWfxl.js +1430 -0
  127. package/dist/vue-ui-table-CseaFWgX.cjs +14 -0
  128. package/dist/vue-ui-table-heatmap-Bwut-V1D.cjs +1 -0
  129. package/dist/vue-ui-table-heatmap-Bz8KYDxr.js +237 -0
  130. package/dist/vue-ui-table-sparkline-CJBU3y8-.cjs +1 -0
  131. package/dist/vue-ui-table-sparkline-z29ND2lq.js +420 -0
  132. package/dist/vue-ui-thermometer-BNAITzJa.js +385 -0
  133. package/dist/vue-ui-thermometer-DM2IKhqN.cjs +1 -0
  134. package/dist/vue-ui-timer-DLfXuW8T.cjs +64 -0
  135. package/dist/vue-ui-timer-DV6lQVHU.js +453 -0
  136. package/dist/vue-ui-tiremarks-B1bd1jPf.cjs +1 -0
  137. package/dist/vue-ui-tiremarks-WyQPg7yo.js +249 -0
  138. package/dist/vue-ui-treemap-BZGmoDHb.cjs +1 -0
  139. package/dist/vue-ui-treemap-DKmBhzV-.js +722 -0
  140. package/dist/vue-ui-vertical-bar-Bi-0rRN3.cjs +4 -0
  141. package/dist/vue-ui-vertical-bar-C-ySfrhJ.js +737 -0
  142. package/dist/vue-ui-waffle-CGRWu-da.js +638 -0
  143. package/dist/vue-ui-waffle-VLYkR-YZ.cjs +1 -0
  144. package/dist/vue-ui-wheel-D2q5vy5V.cjs +1 -0
  145. package/dist/vue-ui-wheel-Pj9OPk9f.js +227 -0
  146. package/dist/vue-ui-word-cloud-8Vr-jo1p.js +346 -0
  147. package/dist/vue-ui-word-cloud-Ba4BjatU.cjs +1 -0
  148. package/dist/vue-ui-xy-C4QW5Lfl.cjs +3 -0
  149. package/dist/vue-ui-xy-canvas-Be-Da_0x.cjs +9 -0
  150. package/dist/vue-ui-xy-canvas-DnLWrf0e.js +1006 -0
  151. package/dist/vue-ui-xy-qToggEfh.js +2064 -0
  152. package/package.json +1 -1
  153. package/dist/index-BcMihqI4.cjs +0 -843
  154. package/dist/index-C7FeCQ7K.js +0 -57303
@@ -0,0 +1,750 @@
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 z, 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 qe, nextTick as ke } from "vue";
2
+ import { u as Ye, o as Ze, e as Je, c as Ce, t as Ke, a as Qe, p as $e, b as _e, X as et, l as tt, I as ot, n as lt, q as at, v as st, w as nt } from "./index-BMCvLyab.js";
3
+ import { _ as rt } from "./Title-BNPZwnkp.js";
4
+ import { u as it, U as ut } from "./usePrinter-BuuBz5JR.js";
5
+ import { D as ct } from "./DataTable-CaB7GIwQ.js";
6
+ import { _ as dt } from "./Tooltip-ZnJAz6dl.js";
7
+ import q from "./BaseIcon-vmmfWlyR.js";
8
+ import vt from "./vue-ui-skeleton-BisWX1sO.js";
9
+ import ft from "./vue-ui-accordion-CLlVxx3Q.js";
10
+ import { u as xe } from "./useNestedProp-CkP8xhG_.js";
11
+ import { _ as ht } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
+ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], gt = {
13
+ __name: "RecursiveCircles",
14
+ props: {
15
+ color: {
16
+ type: String,
17
+ default: "#000000"
18
+ },
19
+ dataset: {
20
+ type: Array,
21
+ default: () => []
22
+ },
23
+ hoveredUid: {
24
+ type: String,
25
+ default: null
26
+ },
27
+ linkColor: {
28
+ type: String,
29
+ default: "#CCCCCC"
30
+ },
31
+ stroke: {
32
+ type: String,
33
+ default: "#FFFFFF"
34
+ },
35
+ strokeHovered: {
36
+ type: String,
37
+ default: "#000000"
38
+ }
39
+ },
40
+ emits: ["zoom", "hover"],
41
+ setup(a, { emit: k }) {
42
+ const C = a;
43
+ function c(n) {
44
+ k("zoom", n);
45
+ }
46
+ function d(n) {
47
+ k("hover", n);
48
+ }
49
+ return ne(C, "dataset").value.forEach((n) => {
50
+ n.nodes && n.nodes.length > 0 && n.nodes.forEach((u) => {
51
+ u.ancestor = n;
52
+ });
53
+ }), (n, u) => {
54
+ const P = re("RecursiveCircles", !0);
55
+ return s(!0), i(y, null, U(a.dataset, (f) => (s(), i(y, null, [
56
+ f.polygonPath && f.polygonPath.coordinates ? (s(), i(y, { key: 0 }, [
57
+ (s(!0), i(y, null, U(f.polygonPath.coordinates, (M, O) => (s(), i("circle", {
58
+ cx: M.x,
59
+ cy: M.y,
60
+ r: f.circleRadius,
61
+ fill: `url(#gradient_${f.color})`,
62
+ stroke: a.hoveredUid && a.hoveredUid === f.uid ? a.strokeHovered : a.stroke,
63
+ "stroke-width": a.hoveredUid && a.hoveredUid === f.uid ? f.circleRadius / 6 : f.circleRadius / 12,
64
+ style: { cursor: "pointer" },
65
+ onClick: B((b) => c(f), ["stop"]),
66
+ onMouseover: (b) => d(f),
67
+ onMouseleave: u[0] || (u[0] = (b) => d(null))
68
+ }, null, 40, pt))), 256)),
69
+ f.nodes && f.nodes.length > 0 ? (s(), I(P, {
70
+ key: 0,
71
+ dataset: f.nodes,
72
+ color: a.color,
73
+ stroke: a.stroke,
74
+ strokeHovered: a.strokeHovered,
75
+ hoveredUid: a.hoveredUid,
76
+ onZoom: c,
77
+ onHover: d
78
+ }, null, 8, ["dataset", "color", "stroke", "strokeHovered", "hoveredUid"])) : m("", !0)
79
+ ], 64)) : m("", !0)
80
+ ], 64))), 256);
81
+ };
82
+ }
83
+ }, yt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], mt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], bt = {
84
+ __name: "RecursiveLinks",
85
+ props: {
86
+ dataset: {
87
+ type: Array,
88
+ default: () => []
89
+ },
90
+ color: {
91
+ type: String,
92
+ default: "#DDDDDD"
93
+ },
94
+ backgroundColor: {
95
+ type: String,
96
+ default: "#FFFFFF"
97
+ }
98
+ },
99
+ setup(a) {
100
+ return ne(a, "dataset").value.forEach((c) => {
101
+ c.nodes && c.nodes.length > 0 && c.nodes.forEach((d) => {
102
+ d.ancestor = c;
103
+ });
104
+ }), (c, d) => {
105
+ const S = re("RecursiveLinks", !0);
106
+ return s(), i(y, null, [
107
+ (s(!0), i(y, null, U(a.dataset, (n) => (s(), i(y, null, [
108
+ n.polygonPath && n.polygonPath.coordinates ? (s(!0), i(y, { key: 0 }, U(n.polygonPath.coordinates, (u, P) => (s(), i(y, null, [
109
+ n.ancestor && n.ancestor.polygonPath ? (s(), i(y, { key: 0 }, [
110
+ x("line", {
111
+ x1: u.x,
112
+ y1: u.y,
113
+ x2: n.ancestor.polygonPath.coordinates[0].x,
114
+ y2: n.ancestor.polygonPath.coordinates[0].y,
115
+ stroke: a.backgroundColor,
116
+ "stroke-width": n.circleRadius / 1.5
117
+ }, null, 8, yt),
118
+ x("line", {
119
+ x1: u.x,
120
+ y1: u.y,
121
+ x2: n.ancestor.polygonPath.coordinates[0].x,
122
+ y2: n.ancestor.polygonPath.coordinates[0].y,
123
+ stroke: a.color,
124
+ "stroke-width": n.circleRadius / 2
125
+ }, null, 8, mt)
126
+ ], 64)) : m("", !0)
127
+ ], 64))), 256)) : m("", !0)
128
+ ], 64))), 256)),
129
+ (s(!0), i(y, null, U(a.dataset, (n) => (s(), i(y, null, [
130
+ n.polygonPath && n.polygonPath.coordinates ? (s(), i(y, { key: 0 }, [
131
+ n.nodes && n.nodes.length > 0 ? (s(), I(S, {
132
+ key: 0,
133
+ dataset: n.nodes,
134
+ color: a.color,
135
+ backgroundColor: a.backgroundColor
136
+ }, null, 8, ["dataset", "color", "backgroundColor"])) : m("", !0)
137
+ ], 64)) : m("", !0)
138
+ ], 64))), 256))
139
+ ], 64);
140
+ };
141
+ }
142
+ }, kt = ["x", "y", "fill", "font-size"], Ct = {
143
+ __name: "RecursiveLabels",
144
+ props: {
145
+ color: {
146
+ type: String,
147
+ default: "#000000"
148
+ },
149
+ dataset: {
150
+ type: Array,
151
+ default: () => []
152
+ },
153
+ hoveredUid: {
154
+ type: String,
155
+ default: null
156
+ }
157
+ },
158
+ emits: ["zoom", "hover"],
159
+ setup(a, { emit: k }) {
160
+ return ne(a, "dataset").value.forEach((d) => {
161
+ d.nodes && d.nodes.length > 0 && d.nodes.forEach((S) => {
162
+ S.ancestor = d;
163
+ });
164
+ }), (d, S) => {
165
+ const n = re("RecursiveLabels", !0);
166
+ return s(!0), i(y, null, U(a.dataset, (u) => (s(), i(y, null, [
167
+ u.polygonPath && u.polygonPath.coordinates ? (s(), i(y, { key: 0 }, [
168
+ (s(!0), i(y, null, U(u.polygonPath.coordinates, (P) => (s(), i("text", {
169
+ x: P.x,
170
+ y: P.y + u.circleRadius * 2,
171
+ fill: a.color,
172
+ "font-size": u.circleRadius,
173
+ "text-anchor": "middle",
174
+ style: { opacity: "0.8", "pointer-events": "none" }
175
+ }, we(u.name), 9, kt))), 256)),
176
+ u.nodes && u.nodes.length > 0 ? (s(), I(n, {
177
+ key: 0,
178
+ dataset: u.nodes,
179
+ color: a.color,
180
+ hoveredUid: a.hoveredUid
181
+ }, null, 8, ["dataset", "color", "hoveredUid"])) : m("", !0)
182
+ ], 64)) : m("", !0)
183
+ ], 64))), 256);
184
+ };
185
+ }
186
+ }, $t = { style: { position: "relative", height: "100%", width: "100%" } }, xt = {
187
+ __name: "BaseDirectionPad",
188
+ props: {
189
+ color: {
190
+ type: String,
191
+ default: "#FF0000"
192
+ },
193
+ isFullscreen: {
194
+ type: Boolean,
195
+ default: !1
196
+ }
197
+ },
198
+ emits: ["moveLeft", "moveTop", "moveRight", "moveBottom", "reset"],
199
+ setup(a, { emit: k }) {
200
+ return (C, c) => (s(), i("div", {
201
+ style: Z(`position: ${a.isFullscreen ? "fixed" : "absolute"};bottom:0;right:${a.isFullscreen ? "12px" : "0"};width:80px;height:80px`),
202
+ "data-html2canvas-ignore": ""
203
+ }, [
204
+ x("div", $t, [
205
+ x("button", {
206
+ onClick: c[0] || (c[0] = B((d) => k("moveLeft"), ["stop"])),
207
+ 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" }
208
+ }, [
209
+ R(q, {
210
+ stroke: a.color,
211
+ name: "arrowLeft",
212
+ style: { cursor: "pointer" }
213
+ }, null, 8, ["stroke"])
214
+ ]),
215
+ x("button", {
216
+ onClick: c[1] || (c[1] = B((d) => k("moveTop"), ["stop"])),
217
+ 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" }
218
+ }, [
219
+ R(q, {
220
+ stroke: a.color,
221
+ name: "arrowTop",
222
+ style: { cursor: "pointer" }
223
+ }, null, 8, ["stroke"])
224
+ ]),
225
+ x("button", {
226
+ onClick: c[2] || (c[2] = B((d) => k("moveRight"), ["stop"])),
227
+ 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" }
228
+ }, [
229
+ R(q, {
230
+ stroke: a.color,
231
+ name: "arrowRight",
232
+ style: { cursor: "pointer" }
233
+ }, null, 8, ["stroke"])
234
+ ]),
235
+ x("button", {
236
+ onClick: c[3] || (c[3] = B((d) => k("moveBottom"), ["stop"])),
237
+ 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" }
238
+ }, [
239
+ R(q, {
240
+ stroke: a.color,
241
+ name: "arrowBottom",
242
+ style: { cursor: "pointer" }
243
+ }, null, 8, ["stroke"])
244
+ ]),
245
+ x("button", {
246
+ onClick: c[4] || (c[4] = B((d) => k("reset"), ["stop"])),
247
+ 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" }
248
+ }, [
249
+ R(q, {
250
+ stroke: a.color,
251
+ name: "close",
252
+ style: { cursor: "pointer" },
253
+ strokeWidth: 2
254
+ }, null, 8, ["stroke"])
255
+ ])
256
+ ])
257
+ ], 4));
258
+ }
259
+ }, wt = ["id"], Pt = ["xmlns", "viewBox"], Tt = ["id"], Ft = ["stop-color"], Rt = ["stop-color"], St = ["innerHTML"], Lt = {
260
+ __name: "vue-ui-molecule",
261
+ props: {
262
+ config: {
263
+ type: Object,
264
+ default() {
265
+ return {};
266
+ }
267
+ },
268
+ dataset: {
269
+ type: Array,
270
+ default() {
271
+ return [];
272
+ }
273
+ }
274
+ },
275
+ setup(a, { expose: k }) {
276
+ const C = a, { vue_ui_molecule: c } = Ye(), d = z(() => !!C.dataset && C.dataset.length);
277
+ Ve(() => {
278
+ Ze(C.dataset) && Je({
279
+ componentName: "VueUiMolecule",
280
+ type: "dataset"
281
+ });
282
+ });
283
+ 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 = z(() => {
284
+ const e = xe({
285
+ userConfig: C.config,
286
+ defaultConfig: c
287
+ });
288
+ return e.theme ? {
289
+ ...xe({
290
+ userConfig: Ke.vue_ui_molecule[e.theme] || C.config,
291
+ defaultConfig: e
292
+ }),
293
+ customPalette: Qe[e.theme] || $e
294
+ } : e;
295
+ }), { isPrinting: Pe, isImaging: Te, generatePdf: ue, generateImage: ce } = it({
296
+ elementId: `cluster_${S.value}`,
297
+ fileName: t.value.style.chart.title.text || "vue-ui-molecule"
298
+ }), Fe = z(() => _e(t.value.customPalette)), w = g({
299
+ showTable: t.value.table.show,
300
+ showDataLabels: !0,
301
+ showTooltip: t.value.style.chart.tooltip.show
302
+ });
303
+ function de(e, o = 0) {
304
+ return Array.isArray(e) && e.length > 0 && e[0].nodes ? de(e[0].nodes, o + 1) : o;
305
+ }
306
+ function Re() {
307
+ const e = de(C.dataset);
308
+ let o = 100, l = o;
309
+ for (let v = 0; v < e; v += 1)
310
+ o /= 1, l += o;
311
+ return {
312
+ height: l,
313
+ width: l
314
+ };
315
+ }
316
+ const L = g(Re()), K = g(`0 0 ${L.value.width} ${L.value.height}`);
317
+ 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, j = "#BBBBBB") {
318
+ if (e && e.length > 0) {
319
+ const oe = ot({
320
+ plot: o,
321
+ radius: l,
322
+ sides: e.length,
323
+ rotation: r
324
+ });
325
+ e.forEach((p, N) => {
326
+ const V = oe.coordinates[N];
327
+ let D;
328
+ if (p.ancestor ? p.ancestor.ancestor ? D = p.ancestor.color || j : (D = Fe.value[h] || $e[h] || j, h += 1) : D = j, p.polygonPath = {
329
+ coordinates: [V]
330
+ }, p.circleRadius = v, p.color = D, p.uid = Ce(), p.nodes && p.nodes.length > 0) {
331
+ const le = !p.ancestor || !p.ancestor.ancestor ? h : 0;
332
+ p.nodes = ve(
333
+ p.nodes,
334
+ V,
335
+ l / 2.9,
336
+ v / 2.2,
337
+ r + Math.PI * N / p.nodes.length,
338
+ le,
339
+ D
340
+ );
341
+ }
342
+ });
343
+ }
344
+ return e;
345
+ }
346
+ function Se(e) {
347
+ const o = /* @__PURE__ */ new Set();
348
+ function l(r) {
349
+ r.forEach((h) => {
350
+ h.color && !o.has(h.color) && o.add(h.color), h.nodes && h.nodes.length > 0 && l(h.nodes);
351
+ });
352
+ }
353
+ l(e);
354
+ const v = {};
355
+ return Array.from(o).forEach((r, h) => {
356
+ v[r] = `gradient_${h}`;
357
+ }), v;
358
+ }
359
+ const Le = z(() => Se(T.value)), T = z(() => ve(C.dataset));
360
+ function Q() {
361
+ O.value = !1, M.value = null, ie.value = null, b.value = null, ee({
362
+ polygonPath: {
363
+ coordinates: [{ x: L.value.width / 2, y: L.value.height / 2 }]
364
+ },
365
+ circleRadius: 24
366
+ });
367
+ }
368
+ const _ = g(null);
369
+ function ee(e) {
370
+ f.value.focus(), ke(() => {
371
+ _.value && cancelAnimationFrame(_.value);
372
+ const o = K.value.split(" "), l = parseFloat(o[0]), v = parseFloat(o[1]), r = parseFloat(o[2]), h = parseFloat(o[3]), { x: j, y: oe } = e.polygonPath.coordinates[0], { circleRadius: p } = e, N = 8.34, V = j - p * N, D = oe - p * N, le = p * N * 2, He = p * N * 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, Ge = (le - r) / W, je = (He - h) / W;
373
+ let E = 0;
374
+ function me() {
375
+ K.value = `${l + Ae * E} ${v + Xe * E} ${r + Ge * E} ${h + je * E}`, E += t.value.style.chart.zoom.speed, E <= W && (_.value = requestAnimationFrame(me));
376
+ }
377
+ me();
378
+ });
379
+ }
380
+ function De(e) {
381
+ M.value === e.uid ? Q() : (M.value = e.uid, ie.value = e, b.value = {
382
+ circleRadius: e.circleRadius,
383
+ polygonPath: {
384
+ coordinates: [{ x: e.polygonPath.coordinates[0].x, y: e.polygonPath.coordinates[0].y }]
385
+ }
386
+ }, ee(e), O.value = e.uid !== T.value[0].uid);
387
+ }
388
+ function Ie(e) {
389
+ if (e.target.nodeName !== "circle")
390
+ Q(), O.value = !1;
391
+ else
392
+ return;
393
+ }
394
+ const te = g(null);
395
+ function Ue(e) {
396
+ te.value = {
397
+ datapoint: e,
398
+ seriesIndex: -1,
399
+ series: T.value,
400
+ config: t.value
401
+ };
402
+ const o = t.value.style.chart.tooltip.customFormat;
403
+ if (st(o) && nt(() => o({
404
+ seriesIndex: -1,
405
+ datapoint: e,
406
+ series: T.value,
407
+ config: t.value
408
+ })))
409
+ P.value = o({
410
+ seriesIndex: -1,
411
+ // well, ok
412
+ datapoint: e,
413
+ series: T.value,
414
+ config: t.value
415
+ });
416
+ else {
417
+ let l = "";
418
+ 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>`;
419
+ }
420
+ }
421
+ const fe = g(null), X = g(null);
422
+ function Ne(e) {
423
+ fe.value = e, e ? (u.value = !0, Ue(e), X.value = e.uid) : (u.value = !1, P.value = "", X.value = null);
424
+ }
425
+ function Y(e) {
426
+ 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);
427
+ }
428
+ function ze(e) {
429
+ const o = [];
430
+ function l(v) {
431
+ v.forEach((r) => {
432
+ const h = {
433
+ name: r.name,
434
+ details: r.details || "-",
435
+ ancestor: r.ancestor && r.ancestor.name || "-",
436
+ color: r.color || ""
437
+ };
438
+ o.push(h), r.nodes && r.nodes.length > 0 && l(r.nodes, r.name);
439
+ });
440
+ }
441
+ return l(e), o;
442
+ }
443
+ const Be = z(() => ze(T.value)), H = z(() => {
444
+ const e = [
445
+ t.value.table.translations.nodeName,
446
+ t.value.table.translations.details,
447
+ t.value.table.translations.ancestor
448
+ ], o = Be.value.map((r, h) => [
449
+ {
450
+ color: r.color,
451
+ name: r.name
452
+ },
453
+ r.details,
454
+ r.ancestor || ""
455
+ ]), l = {
456
+ th: {
457
+ backgroundColor: t.value.table.th.backgroundColor,
458
+ color: t.value.table.th.color,
459
+ outline: t.value.table.th.outline
460
+ },
461
+ td: {
462
+ backgroundColor: t.value.table.td.backgroundColor,
463
+ color: t.value.table.td.color,
464
+ outline: t.value.table.td.outline
465
+ },
466
+ breakpoint: t.value.table.responsiveBreakpoint
467
+ }, v = [
468
+ t.value.table.translations.nodeName,
469
+ t.value.table.translations.details,
470
+ t.value.table.translations.ancestor
471
+ ];
472
+ return {
473
+ head: e,
474
+ body: o,
475
+ config: l,
476
+ colNames: v
477
+ };
478
+ });
479
+ function he() {
480
+ ke(() => {
481
+ 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);
482
+ at({ csvContent: l, title: t.value.style.chart.title.text || "vue-ui-molecule" });
483
+ });
484
+ }
485
+ function Me() {
486
+ return T.value;
487
+ }
488
+ const G = g(!1);
489
+ function Oe(e) {
490
+ G.value = e, J.value += 1;
491
+ }
492
+ function pe() {
493
+ w.value.showTable = !w.value.showTable;
494
+ }
495
+ function ge() {
496
+ w.value.showDataLabels = !w.value.showDataLabels;
497
+ }
498
+ function ye() {
499
+ w.value.showTooltip = !w.value.showTooltip;
500
+ }
501
+ return k({
502
+ getData: Me,
503
+ generatePdf: ue,
504
+ generateCsv: he,
505
+ generateImage: ce,
506
+ toggleTable: pe,
507
+ toggleLabels: ge,
508
+ toggleTooltip: ye
509
+ }), (e, o) => (s(), i("div", {
510
+ onMouseleave: o[7] || (o[7] = (l) => {
511
+ fe.value = null, X.value = null;
512
+ }),
513
+ ref_key: "moleculeChart",
514
+ ref: f,
515
+ class: be(`vue-ui-molecule ${G.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
516
+ style: Z(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),
517
+ id: `cluster_${S.value}`
518
+ }, [
519
+ t.value.style.chart.title.text ? (s(), i("div", {
520
+ key: 0,
521
+ style: Z(`width:100%;background:${t.value.style.chart.backgroundColor};`)
522
+ }, [
523
+ R(rt, {
524
+ config: {
525
+ title: {
526
+ cy: "molecule-div-title",
527
+ ...t.value.style.chart.title
528
+ },
529
+ subtitle: {
530
+ cy: "molecule-div-subtitle",
531
+ ...t.value.style.chart.title.subtitle
532
+ }
533
+ }
534
+ }, null, 8, ["config"])
535
+ ], 4)) : m("", !0),
536
+ t.value.userOptions.show && d.value ? (s(), I(ut, {
537
+ ref_key: "details",
538
+ ref: n,
539
+ key: `user_options_${J.value}`,
540
+ backgroundColor: t.value.style.chart.backgroundColor,
541
+ color: t.value.style.chart.color,
542
+ isPrinting: A(Pe),
543
+ isImaging: A(Te),
544
+ uid: S.value,
545
+ hasTooltip: t.value.userOptions.buttons.tooltip && t.value.style.chart.tooltip.show,
546
+ hasPdf: t.value.userOptions.buttons.pdf,
547
+ hasXls: t.value.userOptions.buttons.csv,
548
+ hasImg: t.value.userOptions.buttons.img,
549
+ hasTable: t.value.userOptions.buttons.table,
550
+ hasLabel: t.value.userOptions.buttons.labels,
551
+ hasFullscreen: t.value.userOptions.buttons.fullscreen,
552
+ isTooltip: w.value.showTooltip,
553
+ titles: { ...t.value.userOptions.buttonTitles },
554
+ chartElement: f.value,
555
+ onToggleFullscreen: Oe,
556
+ onGeneratePdf: A(ue),
557
+ onGenerateCsv: he,
558
+ onGenerateImage: A(ce),
559
+ onToggleTable: pe,
560
+ onToggleLabels: ge,
561
+ onToggleTooltip: ye
562
+ }, We({ _: 2 }, [
563
+ e.$slots.optionTooltip ? {
564
+ name: "optionTooltip",
565
+ fn: $(() => [
566
+ F(e.$slots, "optionTooltip", {}, void 0, !0)
567
+ ]),
568
+ key: "0"
569
+ } : void 0,
570
+ e.$slots.optionPdf ? {
571
+ name: "optionPdf",
572
+ fn: $(() => [
573
+ F(e.$slots, "optionPdf", {}, void 0, !0)
574
+ ]),
575
+ key: "1"
576
+ } : void 0,
577
+ e.$slots.optionCsv ? {
578
+ name: "optionCsv",
579
+ fn: $(() => [
580
+ F(e.$slots, "optionCsv", {}, void 0, !0)
581
+ ]),
582
+ key: "2"
583
+ } : void 0,
584
+ e.$slots.optionImg ? {
585
+ name: "optionImg",
586
+ fn: $(() => [
587
+ F(e.$slots, "optionImg", {}, void 0, !0)
588
+ ]),
589
+ key: "3"
590
+ } : void 0,
591
+ e.$slots.optionTable ? {
592
+ name: "optionTable",
593
+ fn: $(() => [
594
+ F(e.$slots, "optionTable", {}, void 0, !0)
595
+ ]),
596
+ key: "4"
597
+ } : void 0,
598
+ e.$slots.optionLabels ? {
599
+ name: "optionLabels",
600
+ fn: $(() => [
601
+ F(e.$slots, "optionLabels", {}, void 0, !0)
602
+ ]),
603
+ key: "5"
604
+ } : void 0,
605
+ e.$slots.optionFullscreen ? {
606
+ name: "optionFullscreen",
607
+ fn: $(({ toggleFullscreen: l, isFullscreen: v }) => [
608
+ F(e.$slots, "optionFullscreen", ae(se({ toggleFullscreen: l, isFullscreen: v })), void 0, !0)
609
+ ]),
610
+ key: "6"
611
+ } : void 0
612
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : m("", !0),
613
+ d.value ? (s(), i("svg", {
614
+ key: 2,
615
+ xmlns: A(et),
616
+ viewBox: K.value,
617
+ class: be({ "vue-data-ui-fullscreen--on": G.value, "vue-data-ui-fulscreen--off": !G.value }),
618
+ style: Z(`overflow: hidden; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`),
619
+ onClick: o[0] || (o[0] = B((l) => Ie(l), ["stop"]))
620
+ }, [
621
+ x("defs", null, [
622
+ (s(!0), i(y, null, U(Object.keys(Le.value), (l) => (s(), i("radialGradient", {
623
+ id: `gradient_${l}`,
624
+ cx: "50%",
625
+ cy: "30%",
626
+ r: "50%",
627
+ fx: "50%",
628
+ fy: "50%"
629
+ }, [
630
+ x("stop", {
631
+ offset: "0%",
632
+ "stop-color": A(tt)(l, 0.5)
633
+ }, null, 8, Ft),
634
+ x("stop", {
635
+ offset: "100%",
636
+ "stop-color": l
637
+ }, null, 8, Rt)
638
+ ], 8, Tt))), 256))
639
+ ]),
640
+ R(bt, {
641
+ dataset: T.value,
642
+ color: t.value.style.chart.links.stroke,
643
+ backgroundColor: t.value.style.chart.backgroundColor
644
+ }, null, 8, ["dataset", "color", "backgroundColor"]),
645
+ R(gt, {
646
+ dataset: T.value,
647
+ hoveredUid: X.value,
648
+ stroke: t.value.style.chart.nodes.stroke,
649
+ strokeHovered: t.value.style.chart.nodes.strokeHovered,
650
+ onZoom: De,
651
+ onHover: Ne
652
+ }, null, 8, ["dataset", "hoveredUid", "stroke", "strokeHovered"]),
653
+ w.value.showDataLabels ? (s(), I(Ct, {
654
+ key: 0,
655
+ dataset: T.value,
656
+ color: t.value.style.chart.color,
657
+ hoveredUid: X.value
658
+ }, null, 8, ["dataset", "color", "hoveredUid"])) : m("", !0),
659
+ F(e.$slots, "svg", { svg: L.value }, void 0, !0)
660
+ ], 14, Pt)) : m("", !0),
661
+ O.value ? (s(), I(xt, {
662
+ key: `direction_pad_${J.value}`,
663
+ color: t.value.style.chart.color,
664
+ isFullscreen: G.value,
665
+ onMoveLeft: o[1] || (o[1] = (l) => Y("left")),
666
+ onMoveRight: o[2] || (o[2] = (l) => Y("right")),
667
+ onMoveTop: o[3] || (o[3] = (l) => Y("top")),
668
+ onMoveBottom: o[4] || (o[4] = (l) => Y("bottom")),
669
+ onReset: o[5] || (o[5] = (l) => {
670
+ Q(), O.value = !1;
671
+ })
672
+ }, null, 8, ["color", "isFullscreen"])) : m("", !0),
673
+ d.value ? m("", !0) : (s(), I(vt, {
674
+ key: 4,
675
+ config: {
676
+ type: "molecule",
677
+ style: {
678
+ backgroundColor: t.value.style.chart.backgroundColor,
679
+ molecule: {
680
+ color: "#CCCCCC"
681
+ }
682
+ }
683
+ }
684
+ }, null, 8, ["config"])),
685
+ R(dt, {
686
+ show: w.value.showTooltip && u.value,
687
+ backgroundColor: t.value.style.chart.tooltip.backgroundColor,
688
+ color: t.value.style.chart.tooltip.color,
689
+ borderRadius: t.value.style.chart.tooltip.borderRadius,
690
+ borderColor: t.value.style.chart.tooltip.borderColor,
691
+ borderWidth: t.value.style.chart.tooltip.borderWidth,
692
+ fontSize: t.value.style.chart.tooltip.fontSize,
693
+ backgroundOpacity: t.value.style.chart.tooltip.backgroundOpacity,
694
+ parent: f.value,
695
+ content: P.value,
696
+ isCustom: t.value.style.chart.tooltip.customFormat && typeof t.value.style.chart.tooltip.customFormat == "function"
697
+ }, {
698
+ "tooltip-before": $(() => [
699
+ F(e.$slots, "tooltip-before", ae(se({ ...te.value })), void 0, !0)
700
+ ]),
701
+ "tooltip-after": $(() => [
702
+ F(e.$slots, "tooltip-after", ae(se({ ...te.value })), void 0, !0)
703
+ ]),
704
+ _: 3
705
+ }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "parent", "content", "isCustom"]),
706
+ d.value ? (s(), I(ft, {
707
+ key: 5,
708
+ hideDetails: "",
709
+ config: {
710
+ open: w.value.showTable,
711
+ maxHeight: 1e4,
712
+ body: {
713
+ backgroundColor: t.value.style.chart.backgroundColor,
714
+ color: t.value.style.chart.color
715
+ },
716
+ head: {
717
+ backgroundColor: t.value.style.chart.backgroundColor,
718
+ color: t.value.style.chart.color
719
+ }
720
+ }
721
+ }, {
722
+ content: $(() => [
723
+ R(ct, {
724
+ colNames: H.value.colNames,
725
+ head: H.value.head,
726
+ body: H.value.body,
727
+ config: H.value.config,
728
+ title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? ` : ${t.value.style.chart.title.subtitle.text}` : ""}`,
729
+ onClose: o[6] || (o[6] = (l) => w.value.showTable = !1)
730
+ }, {
731
+ th: $(({ th: l }) => [
732
+ x("div", {
733
+ innerHTML: l,
734
+ style: { display: "flex", "align-items": "center" }
735
+ }, null, 8, St)
736
+ ]),
737
+ td: $(({ td: l }) => [
738
+ qe(we(l.name || l), 1)
739
+ ]),
740
+ _: 1
741
+ }, 8, ["colNames", "head", "body", "config", "title"])
742
+ ]),
743
+ _: 1
744
+ }, 8, ["config"])) : m("", !0)
745
+ ], 46, wt));
746
+ }
747
+ }, Xt = /* @__PURE__ */ ht(Lt, [["__scopeId", "data-v-a51864fb"]]);
748
+ export {
749
+ Xt as default
750
+ };