vue-data-ui 3.0.22 → 3.1.0

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 (109) hide show
  1. package/dist/{Arrow-C3_2GkYQ.js → Arrow-DvG07exK.js} +1 -1
  2. package/dist/{BaseDraggableDialog-BhxUDwEm.js → BaseDraggableDialog-O7900pGp.js} +72 -59
  3. package/dist/{BaseIcon-B717hnWR.js → BaseIcon-DHtro8us.js} +1 -1
  4. package/dist/{useLoading-D7YHNtLX.js → BaseScanner-BgWxam9d.js} +11 -11
  5. package/dist/{ColorPicker-CH5_RNaK.js → ColorPicker-CpWzNn4r.js} +2 -2
  6. package/dist/DataTable-DJjA2_wf.js +140 -0
  7. package/dist/Legend-2-dC7DVb.js +72 -0
  8. package/dist/{NonSvgPenAndPaper-DCJGSteM.js → NonSvgPenAndPaper-DHeE4Yuv.js} +3 -3
  9. package/dist/{PackageVersion-CE7HSich.js → PackageVersion-DU12WH3O.js} +1 -1
  10. package/dist/{PenAndPaper-BMHsOtT8.js → PenAndPaper-B7QEDgx4.js} +3 -3
  11. package/dist/{Shape-C3J8aKNH.js → Shape-Dj2Hl33H.js} +1 -1
  12. package/dist/{Slicer-BEBDljWA.js → Slicer-D99HytqX.js} +2 -2
  13. package/dist/{SparkTooltip-CVSZQtoP.js → SparkTooltip-B-wL07rI.js} +1 -1
  14. package/dist/{Title-BL-IjQmj.js → Title-Dq2_Z9kR.js} +1 -1
  15. package/dist/{Tooltip-CCnDaboi.js → Tooltip-Y219DXZO.js} +1 -1
  16. package/dist/{UserOptions-BWMV0_Ze.js → UserOptions-BuGfCdAY.js} +2 -2
  17. package/dist/{dom-to-png-DwUGURhV.js → dom-to-png-BhciAKaM.js} +1 -1
  18. package/dist/{img-DsVqerdt.js → img-JOqdlnUs.js} +1 -1
  19. package/dist/{index-BHb_mcWF.js → index-CDQbCd41.js} +37 -2
  20. package/dist/{pdf-Ckt8JtYf.js → pdf-Dd-LIJqz.js} +1 -1
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +35 -0
  23. package/dist/types/vue-data-ui.d.ts +35 -0
  24. package/dist/{useAutoSizeLabelsInsideViewbox-Cy946l1e.js → useAutoSizeLabelsInsideViewbox-Bky5KGFZ.js} +1 -1
  25. package/dist/{useNestedProp-aC9S6EFJ.js → useNestedProp-BPEHGiYX.js} +1 -1
  26. package/dist/{usePrinter-B7rhbRrT.js → usePrinter-Bnl1YeUU.js} +2 -2
  27. package/dist/{vue-data-ui-Bu7qDtf0.js → vue-data-ui-DcNYz3cZ.js} +64 -64
  28. package/dist/vue-data-ui.js +1 -1
  29. package/dist/vue-ui-3d-bar-BNIFAeN-.js +1369 -0
  30. package/dist/{vue-ui-accordion-DsnF0JuK.js → vue-ui-accordion-Bf_LHFFX.js} +3 -3
  31. package/dist/{vue-ui-age-pyramid-s8xyb3Gf.js → vue-ui-age-pyramid-Bz-l1afR.js} +333 -286
  32. package/dist/{vue-ui-annotator-DRacM62z.js → vue-ui-annotator-BcfRH2BF.js} +2 -2
  33. package/dist/{vue-ui-bullet-DdDrdyOJ.js → vue-ui-bullet-DK1aM9fX.js} +8 -8
  34. package/dist/{vue-ui-candlestick-BsNnInNt.js → vue-ui-candlestick-D6mMjvtu.js} +453 -406
  35. package/dist/{vue-ui-carousel-table-Ci9mrUBd.js → vue-ui-carousel-table-Vp5f238W.js} +4 -4
  36. package/dist/{vue-ui-chestnut-fHfJNK0V.js → vue-ui-chestnut-BKc4v-lf.js} +509 -459
  37. package/dist/vue-ui-chord-CquhRjf0.js +1100 -0
  38. package/dist/vue-ui-circle-pack-D6zLgxa3.js +755 -0
  39. package/dist/{vue-ui-cursor-Bk5LHg5V.js → vue-ui-cursor-DIXb2S93.js} +2 -2
  40. package/dist/{vue-ui-dashboard-CjZMEYs6.js → vue-ui-dashboard-DmiriAK7.js} +62 -62
  41. package/dist/{vue-ui-digits-nDIvHyRB.js → vue-ui-digits-CLAIo9gW.js} +2 -2
  42. package/dist/{vue-ui-donut-CF9FdxfC.js → vue-ui-donut-C8h_tCSO.js} +477 -431
  43. package/dist/{vue-ui-donut-evolution-f5k-Yu3N.js → vue-ui-donut-evolution-C3r0YhKz.js} +482 -435
  44. package/dist/{vue-ui-dumbbell-Dm3gsrzi.js → vue-ui-dumbbell-D-t4M00E.js} +443 -398
  45. package/dist/vue-ui-flow-D7_D_UNm.js +900 -0
  46. package/dist/vue-ui-funnel-B0QOfZRz.js +666 -0
  47. package/dist/vue-ui-galaxy-Ccw5uNes.js +744 -0
  48. package/dist/{vue-ui-gauge-DkDpUAN7.js → vue-ui-gauge-DvW7nFmK.js} +8 -8
  49. package/dist/{vue-ui-gizmo-BD5fLs8r.js → vue-ui-gizmo-WGQxvGPy.js} +4 -4
  50. package/dist/vue-ui-heatmap-BQkLujyp.js +1127 -0
  51. package/dist/{vue-ui-history-plot-ICoBBO-y.js → vue-ui-history-plot-eU33r_Ot.js} +408 -361
  52. package/dist/{vue-ui-kpi-Dp2M2EFo.js → vue-ui-kpi-CKg2i71M.js} +3 -3
  53. package/dist/{vue-ui-mini-loader-C5672jjA.js → vue-ui-mini-loader-BmkGQsm_.js} +2 -2
  54. package/dist/vue-ui-molecule-Dlu0hjSg.js +702 -0
  55. package/dist/{vue-ui-mood-radar-B-qhYUcB.js → vue-ui-mood-radar-DQaxfw9R.js} +342 -291
  56. package/dist/{vue-ui-nested-donuts-V6BvP3pF.js → vue-ui-nested-donuts-Djj9Aw_i.js} +548 -502
  57. package/dist/{vue-ui-onion-BKqqbWbg.js → vue-ui-onion-ZgsErXis.js} +363 -317
  58. package/dist/vue-ui-parallel-coordinate-plot-B5fB22Jc.js +979 -0
  59. package/dist/vue-ui-quadrant-CMevCtXH.js +1483 -0
  60. package/dist/{vue-ui-quick-chart-BVZSdQeT.js → vue-ui-quick-chart-DcparKSX.js} +7 -7
  61. package/dist/vue-ui-radar-DFbxoKCK.js +858 -0
  62. package/dist/{vue-ui-rating-CncrxDCY.js → vue-ui-rating-ZUpxCWrk.js} +2 -2
  63. package/dist/{vue-ui-relation-circle-VYM1dclx.js → vue-ui-relation-circle-eNKJY4Sx.js} +8 -8
  64. package/dist/vue-ui-ridgeline-D4shpQZd.js +1204 -0
  65. package/dist/vue-ui-rings-TdTHMbsa.js +785 -0
  66. package/dist/{vue-ui-scatter-D2b-u5dv.js → vue-ui-scatter-CVuV9ljU.js} +594 -548
  67. package/dist/{vue-ui-skeleton-BTuBaaE_.js → vue-ui-skeleton-CFxBU2-p.js} +3 -3
  68. package/dist/{vue-ui-smiley-D1UxJNbV.js → vue-ui-smiley-Har3B3aQ.js} +2 -2
  69. package/dist/{vue-ui-spark-trend-BCP0BWMI.js → vue-ui-spark-trend-FPk-XEwI.js} +4 -4
  70. package/dist/{vue-ui-sparkbar-eBo-RSvE.js → vue-ui-sparkbar-V3eJ0w0t.js} +4 -4
  71. package/dist/{vue-ui-sparkgauge-DberOXWX.js → vue-ui-sparkgauge-DKTGkWnJ.js} +4 -4
  72. package/dist/{vue-ui-sparkhistogram-CoKQGG5X.js → vue-ui-sparkhistogram-DJsgFwHs.js} +5 -5
  73. package/dist/{vue-ui-sparkline-B_L4UNES.js → vue-ui-sparkline-Dmrm5SL5.js} +4 -4
  74. package/dist/{vue-ui-sparkstackbar-iAaRIyqb.js → vue-ui-sparkstackbar-B0Pl7VMI.js} +4 -4
  75. package/dist/{vue-ui-stackbar-B_0PJ7R2.js → vue-ui-stackbar-CNsgBPhj.js} +525 -479
  76. package/dist/{vue-ui-strip-plot-CWkA4l9P.js → vue-ui-strip-plot-CYAWwYOM.js} +390 -343
  77. package/dist/{vue-ui-table-CILVy7YP.js → vue-ui-table-Dn6H98rP.js} +3 -3
  78. package/dist/{vue-ui-table-heatmap-DL2n2Z7p.js → vue-ui-table-heatmap-COI9LRqC.js} +5 -5
  79. package/dist/{vue-ui-table-sparkline-DOt2EKpe.js → vue-ui-table-sparkline-B7Gg5FfJ.js} +4 -4
  80. package/dist/{vue-ui-thermometer-BTP1ic_T.js → vue-ui-thermometer-Bgynq5El.js} +8 -8
  81. package/dist/{vue-ui-timer-Bc-zJH9j.js → vue-ui-timer-CXng51v5.js} +5 -5
  82. package/dist/{vue-ui-tiremarks-B9n528e1.js → vue-ui-tiremarks-Cy1U3hO1.js} +7 -7
  83. package/dist/vue-ui-treemap-BsvIvRmE.js +1092 -0
  84. package/dist/{vue-ui-vertical-bar-CK2j09gJ.js → vue-ui-vertical-bar-DHqWeDIf.js} +512 -464
  85. package/dist/{vue-ui-waffle-DJkqgqlR.js → vue-ui-waffle-D1Mscj3N.js} +416 -370
  86. package/dist/{vue-ui-wheel-CcbgpIUr.js → vue-ui-wheel-DpV-N5tF.js} +7 -7
  87. package/dist/vue-ui-word-cloud-MaNQ3Kdk.js +811 -0
  88. package/dist/{vue-ui-world-DLmB_Z96.js → vue-ui-world-DYz6zw3x.js} +512 -466
  89. package/dist/{vue-ui-xy-KmrNT6qh.js → vue-ui-xy-B1nqNbzw.js} +1559 -1508
  90. package/dist/vue-ui-xy-canvas-D4wd-Asd.js +1291 -0
  91. package/package.json +1 -1
  92. package/dist/DataTable-Y5T9UxMO.js +0 -133
  93. package/dist/Legend-DkU3at-b.js +0 -72
  94. package/dist/vue-ui-3d-bar-CBfQ3Pcb.js +0 -1323
  95. package/dist/vue-ui-chord-0wf798ls.js +0 -1049
  96. package/dist/vue-ui-circle-pack-CuRHG8gr.js +0 -709
  97. package/dist/vue-ui-flow-K7UBguES.js +0 -852
  98. package/dist/vue-ui-funnel-DoDZbsTp.js +0 -620
  99. package/dist/vue-ui-galaxy-BsDlHxzE.js +0 -691
  100. package/dist/vue-ui-heatmap-DOT2tBy_.js +0 -1078
  101. package/dist/vue-ui-molecule-DgqVh2k0.js +0 -656
  102. package/dist/vue-ui-parallel-coordinate-plot-BZf24Zur.js +0 -927
  103. package/dist/vue-ui-quadrant-S58B2LrQ.js +0 -1432
  104. package/dist/vue-ui-radar-Dh67mQ9E.js +0 -807
  105. package/dist/vue-ui-ridgeline-CsByERvm.js +0 -1157
  106. package/dist/vue-ui-rings-CR2UfgnV.js +0 -739
  107. package/dist/vue-ui-treemap-Cl9qo9O-.js +0 -1046
  108. package/dist/vue-ui-word-cloud-CZ_TRf4o.js +0 -765
  109. package/dist/vue-ui-xy-canvas-6VYNyX6a.js +0 -1243
@@ -0,0 +1,702 @@
1
+ import { useCssVars as dt, defineAsyncComponent as p, computed as b, onMounted as pt, ref as r, toRefs as ht, watch as R, nextTick as U, createElementBlock as C, openBlock as u, unref as a, normalizeStyle as M, normalizeClass as $e, createBlock as w, createCommentVNode as g, createVNode as I, createSlots as Te, withCtx as c, renderSlot as v, normalizeProps as $, guardReactiveProps as T, createElementVNode as D, Fragment as ft, renderList as mt, resolveDynamicComponent as gt, mergeProps as bt, createTextVNode as _e, toDisplayString as Oe } from "vue";
2
+ import { u as Ct, o as yt, f as At, c as Pe, t as kt, a as wt, p as Ie, b as $t, d as Tt, Q as _t, X as Ot, l as Pt, R as It, e as De, v as Dt, w as Ft, y as Nt, z as Lt } from "./index-CDQbCd41.js";
3
+ import { u as St, B as Bt } from "./BaseScanner-BgWxam9d.js";
4
+ import { u as xt } from "./usePrinter-Bnl1YeUU.js";
5
+ import { u as Fe } from "./useNestedProp-BPEHGiYX.js";
6
+ import { u as Et } from "./useUserOptionState-BIvW1Kz7.js";
7
+ import { u as Rt } from "./useChartAccessibility-9icAAmYg.js";
8
+ import Ut from "./img-JOqdlnUs.js";
9
+ import { u as Mt } from "./usePanZoom-BVca3eMk.js";
10
+ import { _ as zt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
+ const Ht = ["id"], Vt = {
12
+ key: 1,
13
+ ref: "noTitle",
14
+ class: "vue-data-ui-no-title-space",
15
+ style: "height:36px; width: 100%;background:transparent"
16
+ }, Gt = {
17
+ key: 2,
18
+ style: "width:100%;background:transparent;"
19
+ }, Wt = ["xmlns", "viewBox"], Xt = ["width", "height"], jt = ["id"], Yt = ["stop-color"], Zt = ["stop-color"], Qt = {
20
+ key: 4,
21
+ class: "vue-data-ui-watermark"
22
+ }, qt = {
23
+ key: 5,
24
+ "data-dom-to-png-ignore": "",
25
+ class: "reset-wrapper"
26
+ }, Jt = {
27
+ key: 6,
28
+ ref: "source",
29
+ dir: "auto"
30
+ }, Kt = ["innerHTML"], eo = {
31
+ __name: "vue-ui-molecule",
32
+ props: {
33
+ config: {
34
+ type: Object,
35
+ default() {
36
+ return {};
37
+ }
38
+ },
39
+ dataset: {
40
+ type: Array,
41
+ default() {
42
+ return [];
43
+ }
44
+ }
45
+ },
46
+ emits: ["selectNode"],
47
+ setup(Ne, { expose: Le, emit: Se }) {
48
+ dt((t) => ({
49
+ "4eb94a90": t.slicerColor
50
+ }));
51
+ const Be = p(() => import("./Title-Dq2_Z9kR.js")), xe = p(() => import("./Tooltip-Y219DXZO.js")), ee = p(() => import("./BaseIcon-DHtro8us.js")), Ee = p(() => import("./vue-ui-accordion-Bf_LHFFX.js")), Re = p(() => import("./DataTable-DJjA2_wf.js")), Ue = p(() => import("./PenAndPaper-B7QEDgx4.js")), Me = p(() => import("./UserOptions-BuGfCdAY.js")), ze = p(() => import("./PackageVersion-DU12WH3O.js")), He = p(() => import("./RecursiveLinks-00zGWPf9.js")), Ve = p(() => import("./RecursiveLabels-Bgcv0pzu.js")), Ge = p(() => import("./RecursiveCircles-BcLb1aRS.js")), We = p(() => import("./BaseDraggableDialog-O7900pGp.js")), { vue_ui_molecule: Xe } = Ct(), A = Ne, je = Se, te = b(() => !!A.dataset && A.dataset.length);
52
+ pt(() => {
53
+ oe();
54
+ });
55
+ const Ye = b(() => e.value.debug);
56
+ function oe() {
57
+ yt(A.dataset) && At({
58
+ componentName: "VueUiMolecule",
59
+ type: "dataset",
60
+ debug: Ye.value
61
+ });
62
+ }
63
+ const z = r(Pe()), Ze = r(null), H = r(!1), B = r(""), k = r(null), le = r(0), ae = r(0), se = r(0), F = r(null), e = r(j()), { loading: V, FINAL_DATASET: G } = St({
64
+ ...ht(A),
65
+ FINAL_CONFIG: e,
66
+ prepareConfig: j,
67
+ skeletonDataset: [
68
+ {
69
+ name: "_",
70
+ color: "#CACACA",
71
+ nodes: [
72
+ { name: "_", color: "#CACACA", nodes: [
73
+ { name: "_", color: "#CACACA" },
74
+ { name: "_", color: "#CACACA" },
75
+ { name: "_", color: "#CACACA" }
76
+ ] },
77
+ { name: "_", color: "#CACACA", nodes: [
78
+ { name: "_", color: "#CACACA" },
79
+ { name: "_", color: "#CACACA" },
80
+ { name: "_", color: "#CACACA" }
81
+ ] },
82
+ { name: "_", color: "#CACACA", nodes: [
83
+ { name: "_", color: "#CACACA" },
84
+ { name: "_", color: "#CACACA" },
85
+ { name: "_", color: "#CACACA" }
86
+ ] },
87
+ { name: "_", color: "#CACACA", nodes: [
88
+ { name: "_", color: "#CACACA" },
89
+ { name: "_", color: "#CACACA" },
90
+ { name: "_", color: "#CACACA" }
91
+ ] },
92
+ { name: "_", color: "#CACACA", nodes: [
93
+ { name: "_", color: "#CACACA" },
94
+ { name: "_", color: "#CACACA" },
95
+ { name: "_", color: "#CACACA" }
96
+ ] },
97
+ { name: "_", color: "#CACACA", nodes: [
98
+ { name: "_", color: "#CACACA" },
99
+ { name: "_", color: "#CACACA" },
100
+ { name: "_", color: "#CACACA" }
101
+ ] }
102
+ ]
103
+ }
104
+ ],
105
+ skeletonConfig: kt({
106
+ defaultConfig: e.value,
107
+ userConfig: {
108
+ userOptions: { show: !1 },
109
+ table: { show: !1 },
110
+ style: {
111
+ chart: {
112
+ backgroundColor: "#99999930",
113
+ nodes: { stroke: "#6A6A6A" },
114
+ links: { stroke: "#6A6A6A80" }
115
+ }
116
+ }
117
+ }
118
+ })
119
+ }), { userOptionsVisible: W, setUserOptionsVisibility: ne, keepUserOptionState: re } = Et({ config: e.value }), { svgRef: X } = Rt({ config: e.value.style.chart.title });
120
+ function j() {
121
+ const t = Fe({
122
+ userConfig: A.config,
123
+ defaultConfig: Xe
124
+ });
125
+ return t.theme ? {
126
+ ...Fe({
127
+ userConfig: $t.vue_ui_molecule[t.theme] || A.config,
128
+ defaultConfig: t
129
+ }),
130
+ customPalette: wt[t.theme] || Ie
131
+ } : t;
132
+ }
133
+ R(() => A.config, (t) => {
134
+ e.value = j(), W.value = !e.value.userOptions.showOnChartHover, oe(), ae.value += 1, se.value += 1, d.value.showTable = e.value.table.show, d.value.showTooltip = e.value.style.chart.tooltip.show;
135
+ }, { deep: !0 });
136
+ const ie = r(0), Qe = () => {
137
+ ie.value += 1;
138
+ };
139
+ R([() => V.value, () => G.value], async ([t]) => {
140
+ t || (await U(), h.value = he(), await U(), Qe(), await U(), it({ x: 0, y: 0, width: 400, height: 400 }), q(!1));
141
+ }, { flush: "post", deep: !1 });
142
+ const { isPrinting: ue, isImaging: ce, generatePdf: ve, generateImage: de } = xt({
143
+ elementId: `cluster_${z.value}`,
144
+ fileName: e.value.style.chart.title.text || "vue-ui-molecule",
145
+ options: e.value.userOptions.print
146
+ }), qe = b(() => e.value.userOptions.show && !e.value.style.chart.title.text), Je = b(() => Tt(e.value.customPalette)), d = r({
147
+ showTable: e.value.table.show,
148
+ showDataLabels: !0,
149
+ showTooltip: e.value.style.chart.tooltip.show
150
+ });
151
+ R(e, () => {
152
+ d.value = {
153
+ showTable: e.value.table.show,
154
+ showDataLabels: !0,
155
+ showTooltip: e.value.style.chart.tooltip.show
156
+ };
157
+ }, { immediate: !0 });
158
+ function pe(t, l = 0) {
159
+ return Array.isArray(t) && t.length > 0 && t[0].nodes ? pe(t[0].nodes, l + 1) : l;
160
+ }
161
+ function he() {
162
+ const t = pe(G.value);
163
+ let l = 100, o = l;
164
+ for (let n = 0; n < t; n += 1)
165
+ l /= 1, o += l;
166
+ return {
167
+ height: o,
168
+ width: o
169
+ };
170
+ }
171
+ const h = r(he());
172
+ function fe(t, l = { x: -h.value.width / 2.43, y: h.value.height / 2 }, o = h.value.width / 1.1, n = 24, s = 0, i = 0, f = "#BBBBBB", J = 0) {
173
+ if (!Array.isArray(t) || t.length === 0) return t;
174
+ const vt = It({
175
+ plot: l,
176
+ radius: o,
177
+ sides: t.length,
178
+ rotation: s
179
+ });
180
+ return t.forEach((m, Ae) => {
181
+ const ke = vt.coordinates[Ae], we = m.color ? (() => {
182
+ let K = De(m.color);
183
+ return K.startsWith("#") ? K : `#${K}`;
184
+ })() : null;
185
+ let P;
186
+ we ? P = we : J === 0 ? P = f : J === 1 ? (P = Je.value[i] || Ie[i] || f, i += 1) : P = f, m.polygonPath = { coordinates: [ke] }, m.circleRadius = n, m.color = P, m.uid = Pe(), Array.isArray(m.nodes) && m.nodes.length && (m.nodes = fe(
187
+ m.nodes,
188
+ ke,
189
+ o / 2.9,
190
+ n / 2.2,
191
+ s + Math.PI * Ae / m.nodes.length,
192
+ i,
193
+ P,
194
+ J + 1
195
+ ));
196
+ }), t;
197
+ }
198
+ function Ke(t) {
199
+ const l = /* @__PURE__ */ new Set();
200
+ function o(s) {
201
+ s.forEach((i) => {
202
+ if (!i.color) return;
203
+ let f = i.color;
204
+ /^#?[0-9A-F]{6}$/i.test(f) || (f = De(f)), f.startsWith("#") || (f = `#${f}`), l.add(f), Array.isArray(i.nodes) && i.nodes.length && o(i.nodes);
205
+ });
206
+ }
207
+ o(t);
208
+ const n = {};
209
+ return Array.from(l).forEach((s) => {
210
+ const i = s.slice(1);
211
+ n[s] = `gradient_${i}`;
212
+ }), n;
213
+ }
214
+ const et = b(() => Ke(y.value)), y = b(() => {
215
+ const t = _t(G.value);
216
+ return fe(t);
217
+ }), Y = r(null);
218
+ function tt(t) {
219
+ Y.value = {
220
+ datapoint: t,
221
+ seriesIndex: -1,
222
+ series: y.value,
223
+ config: e.value
224
+ };
225
+ const l = e.value.style.chart.tooltip.customFormat;
226
+ if (Nt(l) && Lt(() => l({
227
+ seriesIndex: -1,
228
+ datapoint: t,
229
+ series: y.value,
230
+ config: e.value
231
+ })))
232
+ B.value = l({
233
+ seriesIndex: -1,
234
+ // well, ok
235
+ datapoint: t,
236
+ series: y.value,
237
+ config: e.value
238
+ });
239
+ else {
240
+ let o = "";
241
+ o += `<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`, t.details && (o += `<div style="width:100%;border-top:1px solid ${e.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`), B.value = `<div style="font-family:inherit">${o}</div>`;
242
+ }
243
+ }
244
+ const x = r(null), N = r(null), me = r(null);
245
+ function ot(t) {
246
+ me.value = x.value, x.value = t, t ? e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: -1 }) : e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: me.value || x.value, seriesIndex: -1 }), t ? (H.value = !0, tt(t), N.value = t.uid) : (H.value = !1, B.value = "", N.value = null);
247
+ }
248
+ function lt(t) {
249
+ const l = [];
250
+ function o(n) {
251
+ n.forEach((s) => {
252
+ const i = {
253
+ name: s.name,
254
+ details: s.details || "-",
255
+ ancestor: s.ancestor && s.ancestor.name || "-",
256
+ color: s.color || ""
257
+ };
258
+ l.push(i), s.nodes && s.nodes.length > 0 && o(s.nodes, s.name);
259
+ });
260
+ }
261
+ return o(t), l;
262
+ }
263
+ const at = b(() => lt(y.value)), _ = b(() => {
264
+ const t = [
265
+ e.value.table.translations.nodeName,
266
+ e.value.table.translations.details,
267
+ e.value.table.translations.ancestor
268
+ ], l = at.value.map((s, i) => [
269
+ {
270
+ color: s.color,
271
+ name: s.name
272
+ },
273
+ s.details,
274
+ s.ancestor || ""
275
+ ]), o = {
276
+ th: {
277
+ backgroundColor: e.value.table.th.backgroundColor,
278
+ color: e.value.table.th.color,
279
+ outline: e.value.table.th.outline
280
+ },
281
+ td: {
282
+ backgroundColor: e.value.table.td.backgroundColor,
283
+ color: e.value.table.td.color,
284
+ outline: e.value.table.td.outline
285
+ },
286
+ breakpoint: e.value.table.responsiveBreakpoint
287
+ }, n = [
288
+ e.value.table.translations.nodeName,
289
+ e.value.table.translations.details,
290
+ e.value.table.translations.ancestor
291
+ ];
292
+ return {
293
+ head: t,
294
+ body: l,
295
+ config: o,
296
+ colNames: n
297
+ };
298
+ });
299
+ function Z(t = null) {
300
+ U(() => {
301
+ const l = _.value.body.map((s, i) => [[s[0].name], [s[1]], [s[2]]]), o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[..._.value.head]]].concat(l), n = Dt(o);
302
+ t ? t(n) : Ft({ csvContent: n, title: e.value.style.chart.title.text || "vue-ui-molecule" });
303
+ });
304
+ }
305
+ function st() {
306
+ return y.value;
307
+ }
308
+ const O = r(!1);
309
+ function ge(t) {
310
+ O.value = t, le.value += 1;
311
+ }
312
+ function be() {
313
+ d.value.showTable = !d.value.showTable;
314
+ }
315
+ function Ce() {
316
+ d.value.showDataLabels = !d.value.showDataLabels;
317
+ }
318
+ function ye() {
319
+ d.value.showTooltip = !d.value.showTooltip;
320
+ }
321
+ const L = r(!1);
322
+ function Q() {
323
+ L.value = !L.value;
324
+ }
325
+ const nt = b(() => !L.value), { viewBox: E, resetZoom: q, isZoom: rt, setInitialViewBox: it } = Mt(X, {
326
+ x: 0,
327
+ y: 0,
328
+ width: Math.max(10, h.value.width),
329
+ height: Math.max(10, h.value.height)
330
+ }, e.value.style.chart.zoom.speed, nt);
331
+ function ut(t) {
332
+ e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: -1 }), je("selectNode", t);
333
+ }
334
+ async function ct({ scale: t = 2 } = {}) {
335
+ if (!k.value) return;
336
+ const { width: l, height: o } = k.value.getBoundingClientRect(), n = l / o, { imageUri: s, base64: i } = await Ut({ domElement: k.value, base64: !0, img: !0, scale: t });
337
+ return {
338
+ imageUri: s,
339
+ base64: i,
340
+ title: e.value.style.chart.title.text,
341
+ width: l,
342
+ height: o,
343
+ aspectRatio: n
344
+ };
345
+ }
346
+ const S = b(() => {
347
+ const t = e.value.table.useDialog && !e.value.table.show, l = d.value.showTable;
348
+ return {
349
+ component: t ? We : Ee,
350
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
351
+ props: t ? {
352
+ backgroundColor: e.value.table.th.backgroundColor,
353
+ color: e.value.table.th.color,
354
+ headerColor: e.value.table.th.color,
355
+ headerBg: e.value.table.th.backgroundColor,
356
+ isFullscreen: O.value,
357
+ fullscreenParent: k.value,
358
+ forcedWidth: Math.min(800, window.innerWidth * 0.8)
359
+ } : {
360
+ hideDetails: !0,
361
+ config: {
362
+ open: l,
363
+ maxHeight: 1e4,
364
+ body: {
365
+ backgroundColor: e.value.style.chart.backgroundColor,
366
+ color: e.value.style.chart.color
367
+ },
368
+ head: {
369
+ backgroundColor: e.value.style.chart.backgroundColor,
370
+ color: e.value.style.chart.color
371
+ }
372
+ }
373
+ }
374
+ };
375
+ });
376
+ return R(() => d.value.showTable, (t) => {
377
+ e.value.table.show || (t && e.value.table.useDialog && F.value ? F.value.open() : "close" in F.value && F.value.close());
378
+ }), Le({
379
+ getData: st,
380
+ getImage: ct,
381
+ generatePdf: ve,
382
+ generateCsv: Z,
383
+ generateImage: de,
384
+ toggleTable: be,
385
+ toggleLabels: Ce,
386
+ toggleTooltip: ye,
387
+ toggleAnnotator: Q,
388
+ toggleFullscreen: ge
389
+ }), (t, l) => (u(), C("div", {
390
+ ref_key: "moleculeChart",
391
+ ref: k,
392
+ class: $e(`vue-ui-molecule ${O.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
393
+ style: M(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
394
+ id: `cluster_${z.value}`,
395
+ onMouseleave: l[4] || (l[4] = (o) => {
396
+ x.value = null, N.value = null, a(ne)(!1);
397
+ }),
398
+ onMouseenter: l[5] || (l[5] = () => a(ne)(!0))
399
+ }, [
400
+ e.value.userOptions.buttons.annotator ? (u(), w(a(Ue), {
401
+ key: 0,
402
+ svgRef: a(X),
403
+ backgroundColor: e.value.style.chart.backgroundColor,
404
+ color: e.value.style.chart.color,
405
+ active: L.value,
406
+ onClose: Q
407
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : g("", !0),
408
+ qe.value ? (u(), C("div", Vt, null, 512)) : g("", !0),
409
+ e.value.style.chart.title.text ? (u(), C("div", Gt, [
410
+ (u(), w(a(Be), {
411
+ key: `title_${ae.value}`,
412
+ config: {
413
+ title: {
414
+ cy: "molecule-div-title",
415
+ ...e.value.style.chart.title
416
+ },
417
+ subtitle: {
418
+ cy: "molecule-div-subtitle",
419
+ ...e.value.style.chart.title.subtitle
420
+ }
421
+ }
422
+ }, null, 8, ["config"]))
423
+ ])) : g("", !0),
424
+ e.value.userOptions.show && te.value && (a(re) || a(W)) ? (u(), w(a(Me), {
425
+ ref_key: "details",
426
+ ref: Ze,
427
+ key: `user_options_${le.value}`,
428
+ backgroundColor: e.value.style.chart.backgroundColor,
429
+ color: e.value.style.chart.color,
430
+ isPrinting: a(ue),
431
+ isImaging: a(ce),
432
+ uid: z.value,
433
+ hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
434
+ hasPdf: e.value.userOptions.buttons.pdf,
435
+ hasXls: e.value.userOptions.buttons.csv,
436
+ hasImg: e.value.userOptions.buttons.img,
437
+ hasTable: e.value.userOptions.buttons.table,
438
+ hasLabel: e.value.userOptions.buttons.labels,
439
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
440
+ isTooltip: d.value.showTooltip,
441
+ titles: { ...e.value.userOptions.buttonTitles },
442
+ chartElement: k.value,
443
+ position: e.value.userOptions.position,
444
+ hasAnnotator: e.value.userOptions.buttons.annotator,
445
+ isAnnotation: L.value,
446
+ callbacks: e.value.userOptions.callbacks,
447
+ printScale: e.value.userOptions.print.scale,
448
+ onToggleFullscreen: ge,
449
+ onGeneratePdf: a(ve),
450
+ onGenerateCsv: Z,
451
+ onGenerateImage: a(de),
452
+ onToggleTable: be,
453
+ onToggleLabels: Ce,
454
+ onToggleTooltip: ye,
455
+ onToggleAnnotator: Q,
456
+ style: M({
457
+ visibility: a(re) ? a(W) ? "visible" : "hidden" : "visible"
458
+ })
459
+ }, Te({ _: 2 }, [
460
+ t.$slots.menuIcon ? {
461
+ name: "menuIcon",
462
+ fn: c(({ isOpen: o, color: n }) => [
463
+ v(t.$slots, "menuIcon", $(T({ isOpen: o, color: n })), void 0, !0)
464
+ ]),
465
+ key: "0"
466
+ } : void 0,
467
+ t.$slots.optionTooltip ? {
468
+ name: "optionTooltip",
469
+ fn: c(() => [
470
+ v(t.$slots, "optionTooltip", {}, void 0, !0)
471
+ ]),
472
+ key: "1"
473
+ } : void 0,
474
+ t.$slots.optionPdf ? {
475
+ name: "optionPdf",
476
+ fn: c(() => [
477
+ v(t.$slots, "optionPdf", {}, void 0, !0)
478
+ ]),
479
+ key: "2"
480
+ } : void 0,
481
+ t.$slots.optionCsv ? {
482
+ name: "optionCsv",
483
+ fn: c(() => [
484
+ v(t.$slots, "optionCsv", {}, void 0, !0)
485
+ ]),
486
+ key: "3"
487
+ } : void 0,
488
+ t.$slots.optionImg ? {
489
+ name: "optionImg",
490
+ fn: c(() => [
491
+ v(t.$slots, "optionImg", {}, void 0, !0)
492
+ ]),
493
+ key: "4"
494
+ } : void 0,
495
+ t.$slots.optionTable ? {
496
+ name: "optionTable",
497
+ fn: c(() => [
498
+ v(t.$slots, "optionTable", {}, void 0, !0)
499
+ ]),
500
+ key: "5"
501
+ } : void 0,
502
+ t.$slots.optionLabels ? {
503
+ name: "optionLabels",
504
+ fn: c(() => [
505
+ v(t.$slots, "optionLabels", {}, void 0, !0)
506
+ ]),
507
+ key: "6"
508
+ } : void 0,
509
+ t.$slots.optionFullscreen ? {
510
+ name: "optionFullscreen",
511
+ fn: c(({ toggleFullscreen: o, isFullscreen: n }) => [
512
+ v(t.$slots, "optionFullscreen", $(T({ toggleFullscreen: o, isFullscreen: n })), void 0, !0)
513
+ ]),
514
+ key: "7"
515
+ } : void 0,
516
+ t.$slots.optionAnnotator ? {
517
+ name: "optionAnnotator",
518
+ fn: c(({ toggleAnnotator: o, isAnnotator: n }) => [
519
+ v(t.$slots, "optionAnnotator", $(T({ toggleAnnotator: o, isAnnotator: n })), void 0, !0)
520
+ ]),
521
+ key: "8"
522
+ } : void 0
523
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : g("", !0),
524
+ (u(), C("svg", {
525
+ ref_key: "svgRef",
526
+ ref: X,
527
+ key: `svg_${ie.value}`,
528
+ xmlns: a(Ot),
529
+ viewBox: `${a(E).x} ${a(E).y} ${a(E).width} ${a(E).height}`,
530
+ class: $e({ "vue-data-ui-fullscreen--on": O.value, "vue-data-ui-fulscreen--off": !O.value }),
531
+ style: M(`overflow: hidden; background:transparent;color:${e.value.style.chart.color}`)
532
+ }, [
533
+ I(a(ze)),
534
+ t.$slots["chart-background"] ? (u(), C("foreignObject", {
535
+ key: 0,
536
+ x: 0,
537
+ y: 0,
538
+ width: h.value.width <= 0 ? 10 : h.value.width,
539
+ height: h.value.height <= 0 ? 10 : h.value.height,
540
+ style: {
541
+ pointerEvents: "none"
542
+ }
543
+ }, [
544
+ v(t.$slots, "chart-background", {}, void 0, !0)
545
+ ], 8, Xt)) : g("", !0),
546
+ D("defs", null, [
547
+ (u(!0), C(ft, null, mt(Object.keys(et.value), (o) => (u(), C("radialGradient", {
548
+ id: `gradient_${o}`,
549
+ cx: "50%",
550
+ cy: "30%",
551
+ r: "50%",
552
+ fx: "50%",
553
+ fy: "50%"
554
+ }, [
555
+ D("stop", {
556
+ offset: "0%",
557
+ "stop-color": a(Pt)(o, 0.5)
558
+ }, null, 8, Yt),
559
+ D("stop", {
560
+ offset: "100%",
561
+ "stop-color": o
562
+ }, null, 8, Zt)
563
+ ], 8, jt))), 256))
564
+ ]),
565
+ I(a(He), {
566
+ dataset: y.value,
567
+ color: e.value.style.chart.links.stroke,
568
+ backgroundColor: e.value.style.chart.backgroundColor
569
+ }, null, 8, ["dataset", "color", "backgroundColor"]),
570
+ I(a(Ge), {
571
+ dataset: y.value,
572
+ hoveredUid: N.value,
573
+ stroke: e.value.style.chart.nodes.stroke,
574
+ strokeHovered: e.value.style.chart.nodes.strokeHovered,
575
+ onClick: ut,
576
+ onHover: ot
577
+ }, {
578
+ node: c(({ node: o }) => [
579
+ v(t.$slots, "node", $(T({ node: o })), void 0, !0)
580
+ ]),
581
+ _: 3
582
+ }, 8, ["dataset", "hoveredUid", "stroke", "strokeHovered"]),
583
+ d.value.showDataLabels && !a(V) ? (u(), w(a(Ve), {
584
+ key: 1,
585
+ dataset: y.value,
586
+ color: e.value.style.chart.color,
587
+ hoveredUid: N.value
588
+ }, null, 8, ["dataset", "color", "hoveredUid"])) : g("", !0),
589
+ v(t.$slots, "svg", { svg: h.value }, void 0, !0)
590
+ ], 14, Wt)),
591
+ t.$slots.watermark ? (u(), C("div", Qt, [
592
+ v(t.$slots, "watermark", $(T({ isPrinting: a(ue) || a(ce) })), void 0, !0)
593
+ ])) : g("", !0),
594
+ a(rt) ? (u(), C("div", qt, [
595
+ v(t.$slots, "reset-action", { reset: a(q) }, () => [
596
+ D("button", {
597
+ "data-cy-reset": "",
598
+ tabindex: "0",
599
+ role: "button",
600
+ class: "vue-data-ui-refresh-button",
601
+ style: M({
602
+ background: e.value.style.chart.backgroundColor
603
+ }),
604
+ onClick: l[0] || (l[0] = (o) => a(q)(!0))
605
+ }, [
606
+ I(a(ee), {
607
+ name: "refresh",
608
+ stroke: e.value.style.chart.color
609
+ }, null, 8, ["stroke"])
610
+ ], 4)
611
+ ], !0)
612
+ ])) : g("", !0),
613
+ t.$slots.source ? (u(), C("div", Jt, [
614
+ v(t.$slots, "source", {}, void 0, !0)
615
+ ], 512)) : g("", !0),
616
+ I(a(xe), {
617
+ show: d.value.showTooltip && H.value,
618
+ backgroundColor: e.value.style.chart.tooltip.backgroundColor,
619
+ color: e.value.style.chart.tooltip.color,
620
+ borderRadius: e.value.style.chart.tooltip.borderRadius,
621
+ borderColor: e.value.style.chart.tooltip.borderColor,
622
+ borderWidth: e.value.style.chart.tooltip.borderWidth,
623
+ fontSize: e.value.style.chart.tooltip.fontSize,
624
+ backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
625
+ position: e.value.style.chart.tooltip.position,
626
+ offsetY: e.value.style.chart.tooltip.offsetY,
627
+ parent: k.value,
628
+ content: B.value,
629
+ isFullscreen: O.value,
630
+ isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function",
631
+ smooth: e.value.style.chart.tooltip.smooth,
632
+ backdropFilter: e.value.style.chart.tooltip.backdropFilter
633
+ }, {
634
+ "tooltip-before": c(() => [
635
+ v(t.$slots, "tooltip-before", $(T({ ...Y.value })), void 0, !0)
636
+ ]),
637
+ "tooltip-after": c(() => [
638
+ v(t.$slots, "tooltip-after", $(T({ ...Y.value })), void 0, !0)
639
+ ]),
640
+ _: 3
641
+ }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
642
+ te.value ? (u(), w(gt(S.value.component), bt({ key: 7 }, S.value.props, {
643
+ ref_key: "tableUnit",
644
+ ref: F,
645
+ onClose: l[3] || (l[3] = (o) => d.value.showTable = !1)
646
+ }), Te({
647
+ content: c(() => [
648
+ (u(), w(a(Re), {
649
+ key: `table_${se.value}`,
650
+ colNames: _.value.colNames,
651
+ head: _.value.head,
652
+ body: _.value.body,
653
+ config: _.value.config,
654
+ title: e.value.table.useDialog ? "" : S.value.title,
655
+ withCloseButton: !e.value.table.useDialog,
656
+ onClose: l[2] || (l[2] = (o) => d.value.showTable = !1)
657
+ }, {
658
+ th: c(({ th: o }) => [
659
+ D("div", {
660
+ innerHTML: o,
661
+ style: { display: "flex", "align-items": "center" }
662
+ }, null, 8, Kt)
663
+ ]),
664
+ td: c(({ td: o }) => [
665
+ _e(Oe(o.name || o), 1)
666
+ ]),
667
+ _: 1
668
+ }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
669
+ ]),
670
+ _: 2
671
+ }, [
672
+ e.value.table.useDialog ? {
673
+ name: "title",
674
+ fn: c(() => [
675
+ _e(Oe(S.value.title), 1)
676
+ ]),
677
+ key: "0"
678
+ } : void 0,
679
+ e.value.table.useDialog ? {
680
+ name: "actions",
681
+ fn: c(() => [
682
+ D("button", {
683
+ tabindex: "0",
684
+ class: "vue-ui-user-options-button",
685
+ onClick: l[1] || (l[1] = (o) => Z(e.value.userOptions.callbacks.csv))
686
+ }, [
687
+ I(a(ee), {
688
+ name: "excel",
689
+ stroke: S.value.props.color
690
+ }, null, 8, ["stroke"])
691
+ ])
692
+ ]),
693
+ key: "1"
694
+ } : void 0
695
+ ]), 1040)) : g("", !0),
696
+ a(V) ? (u(), w(Bt, { key: 8 })) : g("", !0)
697
+ ], 46, Ht));
698
+ }
699
+ }, vo = /* @__PURE__ */ zt(eo, [["__scopeId", "data-v-e1c0d48d"]]);
700
+ export {
701
+ vo as default
702
+ };