vue-data-ui 3.0.23 → 3.1.1

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 (108) hide show
  1. package/dist/{Arrow-B1Op9F3x.js → Arrow-xQM7mBzd.js} +1 -1
  2. package/dist/{BaseDraggableDialog-B4OaMIom.js → BaseDraggableDialog-B2BQC0-h.js} +72 -59
  3. package/dist/{BaseIcon-CgUOIGjr.js → BaseIcon-DLesaZpW.js} +1 -1
  4. package/dist/{useLoading-D7YHNtLX.js → BaseScanner-BgWxam9d.js} +11 -11
  5. package/dist/{ColorPicker-C0nf8VH0.js → ColorPicker-BKvJvFtX.js} +2 -2
  6. package/dist/DataTable-BAf4Obr9.js +140 -0
  7. package/dist/{Legend-CyYXMSsW.js → Legend-8_V5egWW.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-D63qeScu.js → NonSvgPenAndPaper-Cq4fHmA0.js} +3 -3
  9. package/dist/{PackageVersion-B6M-3jRt.js → PackageVersion-Cv_ypT0N.js} +1 -1
  10. package/dist/{PenAndPaper-zym5uEeN.js → PenAndPaper-B6OvfyHH.js} +3 -3
  11. package/dist/{Shape-CYVs2kYz.js → Shape-Cjca5zta.js} +1 -1
  12. package/dist/{Slicer-BTIFUO4x.js → Slicer-6w3K8gAc.js} +2 -2
  13. package/dist/{SparkTooltip-CNz7AYUL.js → SparkTooltip-BV4Z-NMp.js} +1 -1
  14. package/dist/{Title-D_e0SFWS.js → Title-Dz-j6ERs.js} +1 -1
  15. package/dist/{Tooltip-DjVoFYj1.js → Tooltip-BTGOEC7w.js} +1 -1
  16. package/dist/{UserOptions-z0NWZ7aQ.js → UserOptions-CsDlFB0L.js} +2 -2
  17. package/dist/{dom-to-png-DD0au3Qz.js → dom-to-png-BOu5-Ohz.js} +1 -1
  18. package/dist/{img-z5p1gGfY.js → img-gBDz7xQQ.js} +1 -1
  19. package/dist/{index-BEuUtONc.js → index-BKQqb9lF.js} +37 -2
  20. package/dist/{pdf-BmUjVBni.js → pdf-Cjsn5GEE.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-CchB8S-o.js → useAutoSizeLabelsInsideViewbox-IO2dh0Uq.js} +1 -1
  25. package/dist/{useNestedProp-DhLFhguL.js → useNestedProp-aBOhgs4U.js} +1 -1
  26. package/dist/{usePrinter-DiB0_UNt.js → usePrinter-BzuXiubT.js} +2 -2
  27. package/dist/useTableResponsive-Cbx-ACcP.js +22 -0
  28. package/dist/{vue-data-ui-DJIAas-7.js → vue-data-ui-B6eM6hF3.js} +64 -64
  29. package/dist/vue-data-ui.js +1 -1
  30. package/dist/vue-ui-3d-bar-DBeWmnvH.js +1369 -0
  31. package/dist/{vue-ui-accordion-B4YfUjZ5.js → vue-ui-accordion-B5QeV3BK.js} +3 -3
  32. package/dist/{vue-ui-age-pyramid-CkXXNN79.js → vue-ui-age-pyramid-rZFdUsgz.js} +333 -286
  33. package/dist/{vue-ui-annotator-DnSsIkvU.js → vue-ui-annotator-CCCuslrT.js} +2 -2
  34. package/dist/{vue-ui-bullet-kZkBsWPY.js → vue-ui-bullet-DhJf9mvK.js} +8 -8
  35. package/dist/{vue-ui-candlestick-CIn0xZm0.js → vue-ui-candlestick-CGVtDKqZ.js} +453 -406
  36. package/dist/{vue-ui-carousel-table-f1FDOAqH.js → vue-ui-carousel-table-DLAR3WY8.js} +4 -4
  37. package/dist/{vue-ui-chestnut-B-jSj7FT.js → vue-ui-chestnut-BXnSxoXB.js} +563 -520
  38. package/dist/vue-ui-chord-DH_MwAKX.js +1100 -0
  39. package/dist/vue-ui-circle-pack-Cx_E1R63.js +755 -0
  40. package/dist/{vue-ui-cursor-DdBrui6i.js → vue-ui-cursor-CEvH1qDS.js} +2 -2
  41. package/dist/{vue-ui-dashboard-DSUfW7mI.js → vue-ui-dashboard-CvduVgEy.js} +62 -62
  42. package/dist/{vue-ui-digits-Cb3Wq5WR.js → vue-ui-digits-PTozKs3l.js} +2 -2
  43. package/dist/{vue-ui-donut-BCZqlAO3.js → vue-ui-donut-CsEtKJJD.js} +477 -431
  44. package/dist/{vue-ui-donut-evolution-HmQBq9VP.js → vue-ui-donut-evolution-DD7o-CxF.js} +482 -435
  45. package/dist/{vue-ui-dumbbell-B5w2oqNO.js → vue-ui-dumbbell-DfPYl3fu.js} +443 -398
  46. package/dist/vue-ui-flow-CSTTZHwg.js +900 -0
  47. package/dist/vue-ui-funnel-C-NUZqIo.js +666 -0
  48. package/dist/vue-ui-galaxy-BwsZnU6T.js +744 -0
  49. package/dist/{vue-ui-gauge-C_KLPWk2.js → vue-ui-gauge-D9MUneq0.js} +8 -8
  50. package/dist/{vue-ui-gizmo-CsPX25Ti.js → vue-ui-gizmo-Dnzs9wSf.js} +4 -4
  51. package/dist/{vue-ui-heatmap-BHq6hBaL.js → vue-ui-heatmap-CYaQIhy8.js} +501 -461
  52. package/dist/{vue-ui-history-plot-DgpYiaUD.js → vue-ui-history-plot-DMTFzl-_.js} +408 -361
  53. package/dist/{vue-ui-kpi-DOgibU7W.js → vue-ui-kpi-CkPotdff.js} +3 -3
  54. package/dist/{vue-ui-mini-loader-BjsQAxDx.js → vue-ui-mini-loader-CCE-bDOJ.js} +2 -2
  55. package/dist/vue-ui-molecule-DaN5lroq.js +702 -0
  56. package/dist/{vue-ui-mood-radar-DMwVl3wz.js → vue-ui-mood-radar-tM0mmZh8.js} +342 -291
  57. package/dist/{vue-ui-nested-donuts-H0GzIAF0.js → vue-ui-nested-donuts-RB4r6beI.js} +548 -502
  58. package/dist/{vue-ui-onion-A6nKcus1.js → vue-ui-onion-CxDozHg3.js} +363 -317
  59. package/dist/vue-ui-parallel-coordinate-plot-CK9nNExU.js +979 -0
  60. package/dist/vue-ui-quadrant-C7tLJYn7.js +1483 -0
  61. package/dist/{vue-ui-quick-chart-mwXE3w_o.js → vue-ui-quick-chart-MUBAkrHb.js} +7 -7
  62. package/dist/vue-ui-radar-Br4K80I9.js +858 -0
  63. package/dist/{vue-ui-rating-CleNHFo5.js → vue-ui-rating-NtvT9r_M.js} +2 -2
  64. package/dist/{vue-ui-relation-circle-CMCH7Ia6.js → vue-ui-relation-circle-CPQjAy1g.js} +8 -8
  65. package/dist/vue-ui-ridgeline-C2M_Cjlh.js +1204 -0
  66. package/dist/vue-ui-rings-DEru-cWN.js +785 -0
  67. package/dist/{vue-ui-scatter-kv28dsT3.js → vue-ui-scatter-CJKkiKle.js} +594 -548
  68. package/dist/{vue-ui-skeleton-DCNOYh9x.js → vue-ui-skeleton--twnjS2t.js} +3 -3
  69. package/dist/{vue-ui-smiley-DcS0CM-z.js → vue-ui-smiley-CNccdPZ7.js} +2 -2
  70. package/dist/{vue-ui-spark-trend-LHgReXth.js → vue-ui-spark-trend-9BFkkC0u.js} +4 -4
  71. package/dist/{vue-ui-sparkbar-Da315uRq.js → vue-ui-sparkbar-RYAThoA4.js} +4 -4
  72. package/dist/{vue-ui-sparkgauge-BeAkjGap.js → vue-ui-sparkgauge-DkPlmgMF.js} +4 -4
  73. package/dist/{vue-ui-sparkhistogram-Cy19W3y1.js → vue-ui-sparkhistogram-6EkCyYRF.js} +5 -5
  74. package/dist/{vue-ui-sparkline-IjlQWgs3.js → vue-ui-sparkline-Bl3nj8zd.js} +4 -4
  75. package/dist/{vue-ui-sparkstackbar-CoFgOa3r.js → vue-ui-sparkstackbar-B88lA7iy.js} +4 -4
  76. package/dist/{vue-ui-stackbar-fbCs4sHF.js → vue-ui-stackbar-Csj7NhT6.js} +525 -479
  77. package/dist/{vue-ui-strip-plot-Cm8Zr6RE.js → vue-ui-strip-plot-yY9NsUUI.js} +390 -343
  78. package/dist/{vue-ui-table-q7jWgS26.js → vue-ui-table-Dg6U31ex.js} +3 -3
  79. package/dist/{vue-ui-table-heatmap-CsK9gR1G.js → vue-ui-table-heatmap-BWU7CAWP.js} +5 -5
  80. package/dist/{vue-ui-table-sparkline-CXTPucPr.js → vue-ui-table-sparkline-DV4Y9aRL.js} +4 -4
  81. package/dist/{vue-ui-thermometer-BFxdNgrd.js → vue-ui-thermometer-C3fKamV-.js} +8 -8
  82. package/dist/{vue-ui-timer-BsoeDFjK.js → vue-ui-timer-6VAK9XyF.js} +5 -5
  83. package/dist/{vue-ui-tiremarks-BW_jSayT.js → vue-ui-tiremarks-BB-KAkF7.js} +7 -7
  84. package/dist/vue-ui-treemap-GrXkD_3Z.js +1092 -0
  85. package/dist/{vue-ui-vertical-bar-OrLV4CxH.js → vue-ui-vertical-bar-Mmz6u4aX.js} +504 -461
  86. package/dist/{vue-ui-waffle-BA6rNfVs.js → vue-ui-waffle-DzPVRUOA.js} +416 -370
  87. package/dist/{vue-ui-wheel-B_BkI-5f.js → vue-ui-wheel-idRCvS5t.js} +7 -7
  88. package/dist/vue-ui-word-cloud-B2641uNP.js +811 -0
  89. package/dist/{vue-ui-world-B4mKuSSn.js → vue-ui-world-D6s5Eph8.js} +512 -466
  90. package/dist/{vue-ui-xy-m1SWJk77.js → vue-ui-xy-BKTGSvfU.js} +1551 -1500
  91. package/dist/vue-ui-xy-canvas-BOQyxVRl.js +1291 -0
  92. package/package.json +1 -1
  93. package/dist/DataTable-nO6ydJO2.js +0 -133
  94. package/dist/vue-ui-3d-bar-B56WqLJ-.js +0 -1323
  95. package/dist/vue-ui-chord-Ck4yV3Tb.js +0 -1049
  96. package/dist/vue-ui-circle-pack-BAfRk_Hd.js +0 -709
  97. package/dist/vue-ui-flow-BXkxtUoF.js +0 -852
  98. package/dist/vue-ui-funnel-DFvDO--q.js +0 -620
  99. package/dist/vue-ui-galaxy-BXNLLc3U.js +0 -691
  100. package/dist/vue-ui-molecule-BtyMTwEn.js +0 -656
  101. package/dist/vue-ui-parallel-coordinate-plot-DZ9_0F5c.js +0 -927
  102. package/dist/vue-ui-quadrant-CUggSeUN.js +0 -1432
  103. package/dist/vue-ui-radar-BRKZ8e_X.js +0 -807
  104. package/dist/vue-ui-ridgeline-xW7UrSfR.js +0 -1157
  105. package/dist/vue-ui-rings-D3NfFMaO.js +0 -739
  106. package/dist/vue-ui-treemap-DhAYSVB9.js +0 -1046
  107. package/dist/vue-ui-word-cloud-CrSLGFOK.js +0 -765
  108. package/dist/vue-ui-xy-canvas-CX2JT6T3.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-BKQqb9lF.js";
3
+ import { u as St, B as Bt } from "./BaseScanner-BgWxam9d.js";
4
+ import { u as xt } from "./usePrinter-BzuXiubT.js";
5
+ import { u as Fe } from "./useNestedProp-aBOhgs4U.js";
6
+ import { u as Et } from "./useUserOptionState-BIvW1Kz7.js";
7
+ import { u as Rt } from "./useChartAccessibility-9icAAmYg.js";
8
+ import Ut from "./img-gBDz7xQQ.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-Dz-j6ERs.js")), xe = p(() => import("./Tooltip-BTGOEC7w.js")), ee = p(() => import("./BaseIcon-DLesaZpW.js")), Ee = p(() => import("./vue-ui-accordion-B5QeV3BK.js")), Re = p(() => import("./DataTable-BAf4Obr9.js")), Ue = p(() => import("./PenAndPaper-B6OvfyHH.js")), Me = p(() => import("./UserOptions-CsDlFB0L.js")), ze = p(() => import("./PackageVersion-Cv_ypT0N.js")), He = p(() => import("./RecursiveLinks-00zGWPf9.js")), Ve = p(() => import("./RecursiveLabels-Bgcv0pzu.js")), Ge = p(() => import("./RecursiveCircles-BcLb1aRS.js")), We = p(() => import("./BaseDraggableDialog-B2BQC0-h.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
+ };