vue-data-ui 3.0.0-next.9 → 3.0.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 (144) hide show
  1. package/README.md +32 -30
  2. package/dist/{Arrow-B6OlqyCG.js → Arrow-DQoWnUfD.js} +1 -1
  3. package/dist/{BaseDraggableDialog-CA8QOk7L.js → BaseDraggableDialog-DEw6oieL.js} +4 -4
  4. package/dist/{BaseIcon-DxUUKVlt.js → BaseIcon-DEl03NUZ.js} +1 -1
  5. package/dist/{ColorPicker-Bh1dfgXt.js → ColorPicker-CrivFZqC.js} +2 -2
  6. package/dist/{DataTable--paavNqF.js → DataTable-ClgCsiJA.js} +2 -2
  7. package/dist/{Legend-BZ06qU55.js → Legend-CMvJ6X5j.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-DN9XjEHv.js → NonSvgPenAndPaper-B2Wvbl3p.js} +3 -3
  9. package/dist/{PackageVersion-2QvaZf9_.js → PackageVersion-CD5VH_Al.js} +3 -3
  10. package/dist/{PenAndPaper-hGgW0EHz.js → PenAndPaper-D3WRn-G2.js} +32 -32
  11. package/dist/{RecursiveCircles-Dn3TGoL6.js → RecursiveCircles-BcLb1aRS.js} +15 -13
  12. package/dist/RecursiveLabels-Bgcv0pzu.js +50 -0
  13. package/dist/{RecursiveLinks-ld_gDZH4.js → RecursiveLinks-00zGWPf9.js} +20 -18
  14. package/dist/{Shape-Mr1eIp_G.js → Shape-Adi9i_-f.js} +43 -37
  15. package/dist/Slicer-t6e1t2iM.js +602 -0
  16. package/dist/{SparkTooltip-Czhz446b.js → SparkTooltip-B8OnBSvk.js} +7 -7
  17. package/dist/{Title-B2dA6-uH.js → Title-xTWR-Vil.js} +1 -1
  18. package/dist/{Tooltip-O_hCvqgF.js → Tooltip-BH3CiANh.js} +23 -19
  19. package/dist/{UserOptions-Bk03FRqW.js → UserOptions-CKKPgDLV.js} +2 -2
  20. package/dist/{dom-to-png-Bt5F9TXw.js → dom-to-png-C4hj491O.js} +1 -1
  21. package/dist/{img-C_9wps3s.js → img-Vb4QHAHI.js} +1 -1
  22. package/dist/{index-CgShIRes.js → index-Dzc2Gi60.js} +2885 -2010
  23. package/dist/{pdf-CXdbjyRJ.js → pdf-ddpqw-dt.js} +1 -1
  24. package/dist/style.css +1 -1
  25. package/dist/types/vue-data-ui.d.cts +753 -65
  26. package/dist/types/vue-data-ui.d.ts +753 -65
  27. package/dist/useAutoSizeLabelsInsideViewbox-CN_Jh8Hr.js +81 -0
  28. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  29. package/dist/useLoading-D7YHNtLX.js +29 -0
  30. package/dist/useNestedProp-CjnS13nF.js +13 -0
  31. package/dist/usePanZoom-BVca3eMk.js +122 -0
  32. package/dist/{usePrinter-rIrqBbbm.js → usePrinter-DBRh8ZvS.js} +2 -2
  33. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  34. package/dist/{useTimeLabels-DG97x2hL.js → useTimeLabels-DkzmKfZn.js} +208 -156
  35. package/dist/{vue-data-ui-DiwfJSwC.js → vue-data-ui-B7ztqj9-.js} +105 -100
  36. package/dist/vue-data-ui.js +26 -25
  37. package/dist/vue-ui-3d-bar-DUmYPtHl.js +1323 -0
  38. package/dist/{vue-ui-accordion-hlzscmAS.js → vue-ui-accordion-CPk8wAuj.js} +3 -3
  39. package/dist/vue-ui-age-pyramid-Bv5HmeXj.js +835 -0
  40. package/dist/{vue-ui-annotator-BHwBUNRO.js → vue-ui-annotator-KXWlIhtd.js} +12 -12
  41. package/dist/vue-ui-bullet-B4N4mBk9.js +571 -0
  42. package/dist/vue-ui-candlestick-DENvPnUO.js +1000 -0
  43. package/dist/{vue-ui-carousel-table-6MTDYf-H.js → vue-ui-carousel-table-vC2bHBaY.js} +29 -29
  44. package/dist/{vue-ui-chestnut-Cr6dK21e.js → vue-ui-chestnut-2nS0StrY.js} +664 -536
  45. package/dist/vue-ui-chord-CyfS6vNM.js +1038 -0
  46. package/dist/vue-ui-circle-pack-C4JR-0fx.js +709 -0
  47. package/dist/{vue-ui-cursor-Ch5yUxNn.js → vue-ui-cursor-BgeSDtQh.js} +2 -2
  48. package/dist/{vue-ui-dashboard-tVZ9aEHo.js → vue-ui-dashboard-9DWUBJ-I.js} +64 -64
  49. package/dist/{vue-ui-digits-BOlYLluF.js → vue-ui-digits-BQO7IBFA.js} +2 -2
  50. package/dist/{vue-ui-donut-BKwAnTKA.js → vue-ui-donut-C-ZJXJ74.js} +431 -422
  51. package/dist/vue-ui-donut-evolution-B870IrQA.js +1076 -0
  52. package/dist/vue-ui-dumbbell-Cfs2Uotx.js +1120 -0
  53. package/dist/vue-ui-flow-DnaUVVAD.js +841 -0
  54. package/dist/{vue-ui-funnel-CAV6A--C.js → vue-ui-funnel-B9s-H5ZG.js} +16 -16
  55. package/dist/vue-ui-galaxy-BoJOczdh.js +680 -0
  56. package/dist/vue-ui-gauge-qjm4BqZR.js +791 -0
  57. package/dist/vue-ui-gizmo-fn7ZaMTI.js +210 -0
  58. package/dist/vue-ui-heatmap-CIBDKhh8.js +1078 -0
  59. package/dist/vue-ui-history-plot-bbNxldYG.js +1074 -0
  60. package/dist/{vue-ui-kpi-DjHXc1Z9.js → vue-ui-kpi-BX-2jhLx.js} +26 -26
  61. package/dist/{vue-ui-mini-loader-C68r9wbr.js → vue-ui-mini-loader-Bn1Bb8-J.js} +2 -2
  62. package/dist/vue-ui-molecule-DQ3qFtBq.js +656 -0
  63. package/dist/vue-ui-mood-radar-Cf-ehIo1.js +785 -0
  64. package/dist/vue-ui-nested-donuts-CWg5BEi-.js +1284 -0
  65. package/dist/vue-ui-onion-sHgQTYfa.js +776 -0
  66. package/dist/vue-ui-parallel-coordinate-plot-Ki3ITp_s.js +916 -0
  67. package/dist/{vue-ui-quadrant-ULvVhjjq.js → vue-ui-quadrant-BIVqW7U7.js} +512 -459
  68. package/dist/vue-ui-quick-chart-C_hvHc1b.js +1762 -0
  69. package/dist/vue-ui-radar-RZUPyPwB.js +796 -0
  70. package/dist/{vue-ui-rating-CkdVnYpj.js → vue-ui-rating-BI8Vk7dO.js} +2 -2
  71. package/dist/vue-ui-relation-circle-TVMUEtxK.js +598 -0
  72. package/dist/vue-ui-ridgeline-DQeXHQG4.js +1157 -0
  73. package/dist/vue-ui-rings-BH81WmMS.js +728 -0
  74. package/dist/vue-ui-scatter-Cy7Tz_An.js +1178 -0
  75. package/dist/{vue-ui-skeleton-BsBaCvoE.js → vue-ui-skeleton-CF50qQxr.js} +13 -13
  76. package/dist/{vue-ui-smiley-B2sBY2Q-.js → vue-ui-smiley-CrFXEbJs.js} +46 -46
  77. package/dist/vue-ui-spark-trend-DtHArnot.js +315 -0
  78. package/dist/vue-ui-sparkbar-CIOwFFgA.js +351 -0
  79. package/dist/vue-ui-sparkgauge-E0DdGotz.js +232 -0
  80. package/dist/vue-ui-sparkhistogram-Dm7WoyjY.js +380 -0
  81. package/dist/vue-ui-sparkline-DoW6DDKT.js +513 -0
  82. package/dist/vue-ui-sparkstackbar-BJnPUWY4.js +421 -0
  83. package/dist/vue-ui-stackbar-Du42smPs.js +1371 -0
  84. package/dist/vue-ui-strip-plot-DnenGI-d.js +916 -0
  85. package/dist/{vue-ui-table-DaE8lQuo.js → vue-ui-table-BQOQVlHr.js} +17 -17
  86. package/dist/{vue-ui-table-heatmap--dSEG8cU.js → vue-ui-table-heatmap-BzK4_gsP.js} +5 -5
  87. package/dist/{vue-ui-table-sparkline-D4DkGvDP.js → vue-ui-table-sparkline-B-IwcT8I.js} +19 -16
  88. package/dist/vue-ui-thermometer-06ao_Pj5.js +541 -0
  89. package/dist/{vue-ui-timer-CYXTAh6x.js → vue-ui-timer-CxQq4roK.js} +5 -5
  90. package/dist/vue-ui-tiremarks-CuTxkByj.js +406 -0
  91. package/dist/vue-ui-treemap-BgHhRpiV.js +1035 -0
  92. package/dist/{vue-ui-vertical-bar-CO9eR1ty.js → vue-ui-vertical-bar-CAcsUUCo.js} +104 -102
  93. package/dist/vue-ui-waffle-Ct3Upw3m.js +910 -0
  94. package/dist/vue-ui-wheel-oz06Kt-p.js +379 -0
  95. package/dist/vue-ui-word-cloud-BRy7fg4S.js +765 -0
  96. package/dist/{vue-ui-world-P45Plcqw.js → vue-ui-world-CTV-YfFN.js} +364 -327
  97. package/dist/vue-ui-xy-DqCy9dpa.js +3808 -0
  98. package/dist/{vue-ui-xy-canvas-DgNBgUak.js → vue-ui-xy-canvas-BZdhKUIp.js} +265 -264
  99. package/package.json +4 -4
  100. package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
  101. package/dist/Slicer-3t0HimeE.js +0 -577
  102. package/dist/useLoading-Bt5Doa8m.js +0 -28
  103. package/dist/useNestedProp-BC4Ciblw.js +0 -13
  104. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  105. package/dist/vue-ui-3d-bar-BqmzX9u4.js +0 -1227
  106. package/dist/vue-ui-age-pyramid-eRPt0BJb.js +0 -746
  107. package/dist/vue-ui-bullet-BSnF2gql.js +0 -513
  108. package/dist/vue-ui-candlestick-kMbNnoYe.js +0 -873
  109. package/dist/vue-ui-chord-Dxy_bfIE.js +0 -949
  110. package/dist/vue-ui-circle-pack-I_p4FPiW.js +0 -673
  111. package/dist/vue-ui-donut-evolution-DQhZJ4Sa.js +0 -903
  112. package/dist/vue-ui-dumbbell-DdN-7b3g.js +0 -753
  113. package/dist/vue-ui-flow-MvORTthN.js +0 -765
  114. package/dist/vue-ui-galaxy-B0PLMAn8.js +0 -617
  115. package/dist/vue-ui-gauge-C4FTzDFt.js +0 -738
  116. package/dist/vue-ui-gizmo-Dl5FHFb4.js +0 -192
  117. package/dist/vue-ui-heatmap-C3dee43W.js +0 -877
  118. package/dist/vue-ui-history-plot-dqv4u1Oa.js +0 -924
  119. package/dist/vue-ui-molecule-DtRAlfhC.js +0 -597
  120. package/dist/vue-ui-mood-radar-BZj2G0zE.js +0 -670
  121. package/dist/vue-ui-nested-donuts-OqJTwMb2.js +0 -1212
  122. package/dist/vue-ui-onion-DXLokGec.js +0 -701
  123. package/dist/vue-ui-parallel-coordinate-plot-tg7QhtIE.js +0 -807
  124. package/dist/vue-ui-quick-chart-4EODniQ3.js +0 -1612
  125. package/dist/vue-ui-radar-Dt5p5oSy.js +0 -741
  126. package/dist/vue-ui-relation-circle-_SysXj9T.js +0 -542
  127. package/dist/vue-ui-ridgeline-Cs5UihNN.js +0 -969
  128. package/dist/vue-ui-rings-Duay-EmS.js +0 -685
  129. package/dist/vue-ui-scatter-C6oGQcbL.js +0 -1045
  130. package/dist/vue-ui-spark-trend-CEAqGu3d.js +0 -291
  131. package/dist/vue-ui-sparkbar-ByPUDc6x.js +0 -301
  132. package/dist/vue-ui-sparkgauge-C-GKwevJ.js +0 -201
  133. package/dist/vue-ui-sparkhistogram-Dz0DdaVW.js +0 -313
  134. package/dist/vue-ui-sparkline-BULntz_U.js +0 -459
  135. package/dist/vue-ui-sparkstackbar-DXjHOeeU.js +0 -381
  136. package/dist/vue-ui-stackbar-CeP9n7zy.js +0 -1207
  137. package/dist/vue-ui-strip-plot-CaFQkWV8.js +0 -761
  138. package/dist/vue-ui-thermometer-BXf14CYH.js +0 -495
  139. package/dist/vue-ui-tiremarks-D6hJ1cd4.js +0 -358
  140. package/dist/vue-ui-treemap-tBurCrdn.js +0 -965
  141. package/dist/vue-ui-waffle-BNzs_BxY.js +0 -863
  142. package/dist/vue-ui-wheel-tydUATi8.js +0 -352
  143. package/dist/vue-ui-word-cloud-DUUc_tj6.js +0 -659
  144. package/dist/vue-ui-xy--HToGdle.js +0 -2982
@@ -0,0 +1,656 @@
1
+ import { useCssVars as nt, defineAsyncComponent as m, computed as y, onMounted as rt, ref as i, toRefs as it, watch as Q, nextTick as x, createElementBlock as C, openBlock as u, unref as l, normalizeStyle as E, normalizeClass as Ae, createBlock as k, createCommentVNode as g, createVNode as N, createSlots as ut, withCtx as d, renderSlot as c, normalizeProps as w, guardReactiveProps as $, createElementVNode as L, Fragment as ct, renderList as dt, createTextVNode as vt, toDisplayString as pt } from "vue";
2
+ import { u as ht, o as ft, f as mt, c as ke, t as gt, a as Ct, p as we, b as bt, d as yt, Q as At, X as kt, l as wt, R as $t, e as $e, v as Tt, w as _t, y as Ot, z as It } from "./index-Dzc2Gi60.js";
3
+ import { u as Pt, B as Ft } from "./useLoading-D7YHNtLX.js";
4
+ import { u as Nt } from "./usePrinter-DBRh8ZvS.js";
5
+ import { u as Te } from "./useNestedProp-CjnS13nF.js";
6
+ import { u as Lt } from "./useUserOptionState-BIvW1Kz7.js";
7
+ import { u as St } from "./useChartAccessibility-9icAAmYg.js";
8
+ import Dt from "./img-Vb4QHAHI.js";
9
+ import { u as Bt } from "./usePanZoom-BVca3eMk.js";
10
+ import { _ as xt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
+ const Et = ["id"], Rt = {
12
+ key: 1,
13
+ ref: "noTitle",
14
+ class: "vue-data-ui-no-title-space",
15
+ style: "height:36px; width: 100%;background:transparent"
16
+ }, Ut = {
17
+ key: 2,
18
+ style: "width:100%;background:transparent;"
19
+ }, zt = ["xmlns", "viewBox"], Ht = ["width", "height"], Mt = ["id"], Vt = ["stop-color"], Gt = ["stop-color"], Wt = {
20
+ key: 4,
21
+ class: "vue-data-ui-watermark"
22
+ }, Xt = {
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
+ }, Yt = ["innerHTML"], Zt = {
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(_e, { expose: Oe, emit: Ie }) {
48
+ nt((t) => ({
49
+ "00aed812": t.slicerColor
50
+ }));
51
+ const Pe = m(() => import("./Title-xTWR-Vil.js")), Fe = m(() => import("./Tooltip-BH3CiANh.js")), Ne = m(() => import("./BaseIcon-DEl03NUZ.js")), Le = m(() => import("./vue-ui-accordion-CPk8wAuj.js")), Se = m(() => import("./DataTable-ClgCsiJA.js")), De = m(() => import("./PenAndPaper-D3WRn-G2.js")), Be = m(() => import("./UserOptions-CKKPgDLV.js")), xe = m(() => import("./PackageVersion-CD5VH_Al.js")), Ee = m(() => import("./RecursiveLinks-00zGWPf9.js")), Re = m(() => import("./RecursiveLabels-Bgcv0pzu.js")), Ue = m(() => import("./RecursiveCircles-BcLb1aRS.js")), { vue_ui_molecule: ze } = ht(), A = _e, He = Ie, q = y(() => !!A.dataset && A.dataset.length);
52
+ rt(() => {
53
+ J();
54
+ });
55
+ const Me = y(() => e.value.debug);
56
+ function J() {
57
+ ft(A.dataset) && mt({
58
+ componentName: "VueUiMolecule",
59
+ type: "dataset",
60
+ debug: Me.value
61
+ });
62
+ }
63
+ const R = i(ke()), Ve = i(null), U = i(!1), S = i(""), T = i(null), K = i(0), ee = i(0), te = i(0), e = i(G()), { loading: z, FINAL_DATASET: H } = Pt({
64
+ ...it(A),
65
+ FINAL_CONFIG: e,
66
+ prepareConfig: G,
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: gt({
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: M, setUserOptionsVisibility: oe, keepUserOptionState: le } = Lt({ config: e.value }), { svgRef: V } = St({ config: e.value.style.chart.title });
120
+ function G() {
121
+ const t = Te({
122
+ userConfig: A.config,
123
+ defaultConfig: ze
124
+ });
125
+ return t.theme ? {
126
+ ...Te({
127
+ userConfig: bt.vue_ui_molecule[t.theme] || A.config,
128
+ defaultConfig: t
129
+ }),
130
+ customPalette: Ct[t.theme] || we
131
+ } : t;
132
+ }
133
+ Q(() => A.config, (t) => {
134
+ e.value = G(), M.value = !e.value.userOptions.showOnChartHover, J(), ee.value += 1, te.value += 1, v.value.showTable = e.value.table.show, v.value.showTooltip = e.value.style.chart.tooltip.show;
135
+ }, { deep: !0 });
136
+ const ae = i(0), Ge = () => {
137
+ ae.value += 1;
138
+ };
139
+ Q([() => z.value, () => H.value], async ([t]) => {
140
+ t || (await x(), p.value = ce(), await x(), Ge(), await x(), ot({ x: 0, y: 0, width: 400, height: 400 }), j(!1));
141
+ }, { flush: "post", deep: !1 });
142
+ const { isPrinting: se, isImaging: ne, generatePdf: re, generateImage: ie } = Nt({
143
+ elementId: `cluster_${R.value}`,
144
+ fileName: e.value.style.chart.title.text || "vue-ui-molecule",
145
+ options: e.value.userOptions.print
146
+ }), We = y(() => e.value.userOptions.show && !e.value.style.chart.title.text), Xe = y(() => yt(e.value.customPalette)), v = i({
147
+ showTable: e.value.table.show,
148
+ showDataLabels: !0,
149
+ showTooltip: e.value.style.chart.tooltip.show
150
+ });
151
+ Q(e, () => {
152
+ v.value = {
153
+ showTable: e.value.table.show,
154
+ showDataLabels: !0,
155
+ showTooltip: e.value.style.chart.tooltip.show
156
+ };
157
+ }, { immediate: !0 });
158
+ function ue(t, a = 0) {
159
+ return Array.isArray(t) && t.length > 0 && t[0].nodes ? ue(t[0].nodes, a + 1) : a;
160
+ }
161
+ function ce() {
162
+ const t = ue(H.value);
163
+ let a = 100, o = a;
164
+ for (let n = 0; n < t; n += 1)
165
+ a /= 1, o += a;
166
+ return {
167
+ height: o,
168
+ width: o
169
+ };
170
+ }
171
+ const p = i(ce());
172
+ function de(t, a = { x: -p.value.width / 2.43, y: p.value.height / 2 }, o = p.value.width / 1.1, n = 24, s = 0, r = 0, h = "#BBBBBB", Y = 0) {
173
+ if (!Array.isArray(t) || t.length === 0) return t;
174
+ const st = $t({
175
+ plot: a,
176
+ radius: o,
177
+ sides: t.length,
178
+ rotation: s
179
+ });
180
+ return t.forEach((f, Ce) => {
181
+ const be = st.coordinates[Ce], ye = f.color ? (() => {
182
+ let Z = $e(f.color);
183
+ return Z.startsWith("#") ? Z : `#${Z}`;
184
+ })() : null;
185
+ let O;
186
+ ye ? O = ye : Y === 0 ? O = h : Y === 1 ? (O = Xe.value[r] || we[r] || h, r += 1) : O = h, f.polygonPath = { coordinates: [be] }, f.circleRadius = n, f.color = O, f.uid = ke(), Array.isArray(f.nodes) && f.nodes.length && (f.nodes = de(
187
+ f.nodes,
188
+ be,
189
+ o / 2.9,
190
+ n / 2.2,
191
+ s + Math.PI * Ce / f.nodes.length,
192
+ r,
193
+ O,
194
+ Y + 1
195
+ ));
196
+ }), t;
197
+ }
198
+ function je(t) {
199
+ const a = /* @__PURE__ */ new Set();
200
+ function o(s) {
201
+ s.forEach((r) => {
202
+ if (!r.color) return;
203
+ let h = r.color;
204
+ /^#?[0-9A-F]{6}$/i.test(h) || (h = $e(h)), h.startsWith("#") || (h = `#${h}`), a.add(h), Array.isArray(r.nodes) && r.nodes.length && o(r.nodes);
205
+ });
206
+ }
207
+ o(t);
208
+ const n = {};
209
+ return Array.from(a).forEach((s) => {
210
+ const r = s.slice(1);
211
+ n[s] = `gradient_${r}`;
212
+ }), n;
213
+ }
214
+ const Ye = y(() => je(b.value)), b = y(() => {
215
+ const t = At(H.value);
216
+ return de(t);
217
+ }), W = i(null);
218
+ function Ze(t) {
219
+ W.value = {
220
+ datapoint: t,
221
+ seriesIndex: -1,
222
+ series: b.value,
223
+ config: e.value
224
+ };
225
+ const a = e.value.style.chart.tooltip.customFormat;
226
+ if (Ot(a) && It(() => a({
227
+ seriesIndex: -1,
228
+ datapoint: t,
229
+ series: b.value,
230
+ config: e.value
231
+ })))
232
+ S.value = a({
233
+ seriesIndex: -1,
234
+ // well, ok
235
+ datapoint: t,
236
+ series: b.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>`), S.value = `<div style="font-family:inherit">${o}</div>`;
242
+ }
243
+ }
244
+ const D = i(null), I = i(null), ve = i(null);
245
+ function Qe(t) {
246
+ ve.value = D.value, D.value = t, t ? e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: -1 }) : e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: ve.value || D.value, seriesIndex: -1 }), t ? (U.value = !0, Ze(t), I.value = t.uid) : (U.value = !1, S.value = "", I.value = null);
247
+ }
248
+ function qe(t) {
249
+ const a = [];
250
+ function o(n) {
251
+ n.forEach((s) => {
252
+ const r = {
253
+ name: s.name,
254
+ details: s.details || "-",
255
+ ancestor: s.ancestor && s.ancestor.name || "-",
256
+ color: s.color || ""
257
+ };
258
+ a.push(r), s.nodes && s.nodes.length > 0 && o(s.nodes, s.name);
259
+ });
260
+ }
261
+ return o(t), a;
262
+ }
263
+ const Je = y(() => qe(b.value)), _ = y(() => {
264
+ const t = [
265
+ e.value.table.translations.nodeName,
266
+ e.value.table.translations.details,
267
+ e.value.table.translations.ancestor
268
+ ], a = Je.value.map((s, r) => [
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: a,
295
+ config: o,
296
+ colNames: n
297
+ };
298
+ });
299
+ function pe(t = null) {
300
+ x(() => {
301
+ const a = _.value.body.map((s, r) => [[s[0].name], [s[1]], [s[2]]]), o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[..._.value.head]]].concat(a), n = Tt(o);
302
+ t ? t(n) : _t({ csvContent: n, title: e.value.style.chart.title.text || "vue-ui-molecule" });
303
+ });
304
+ }
305
+ function Ke() {
306
+ return b.value;
307
+ }
308
+ const P = i(!1);
309
+ function he(t) {
310
+ P.value = t, K.value += 1;
311
+ }
312
+ function fe() {
313
+ v.value.showTable = !v.value.showTable;
314
+ }
315
+ function me() {
316
+ v.value.showDataLabels = !v.value.showDataLabels;
317
+ }
318
+ function ge() {
319
+ v.value.showTooltip = !v.value.showTooltip;
320
+ }
321
+ const F = i(!1);
322
+ function X() {
323
+ F.value = !F.value;
324
+ }
325
+ const et = y(() => !F.value), { viewBox: B, resetZoom: j, isZoom: tt, setInitialViewBox: ot } = Bt(V, {
326
+ x: 0,
327
+ y: 0,
328
+ width: Math.max(10, p.value.width),
329
+ height: Math.max(10, p.value.height)
330
+ }, e.value.style.chart.zoom.speed, et);
331
+ function lt(t) {
332
+ e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: -1 }), He("selectNode", t);
333
+ }
334
+ async function at({ scale: t = 2 } = {}) {
335
+ if (!T.value) return;
336
+ const { width: a, height: o } = T.value.getBoundingClientRect(), n = a / o, { imageUri: s, base64: r } = await Dt({ domElement: T.value, base64: !0, img: !0, scale: t });
337
+ return {
338
+ imageUri: s,
339
+ base64: r,
340
+ title: e.value.style.chart.title.text,
341
+ width: a,
342
+ height: o,
343
+ aspectRatio: n
344
+ };
345
+ }
346
+ return Oe({
347
+ getData: Ke,
348
+ getImage: at,
349
+ generatePdf: re,
350
+ generateCsv: pe,
351
+ generateImage: ie,
352
+ toggleTable: fe,
353
+ toggleLabels: me,
354
+ toggleTooltip: ge,
355
+ toggleAnnotator: X,
356
+ toggleFullscreen: he
357
+ }), (t, a) => (u(), C("div", {
358
+ ref_key: "moleculeChart",
359
+ ref: T,
360
+ class: Ae(`vue-ui-molecule ${P.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
361
+ style: E(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
362
+ id: `cluster_${R.value}`,
363
+ onMouseleave: a[2] || (a[2] = (o) => {
364
+ D.value = null, I.value = null, l(oe)(!1);
365
+ }),
366
+ onMouseenter: a[3] || (a[3] = () => l(oe)(!0))
367
+ }, [
368
+ e.value.userOptions.buttons.annotator ? (u(), k(l(De), {
369
+ key: 0,
370
+ svgRef: l(V),
371
+ backgroundColor: e.value.style.chart.backgroundColor,
372
+ color: e.value.style.chart.color,
373
+ active: F.value,
374
+ onClose: X
375
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : g("", !0),
376
+ We.value ? (u(), C("div", Rt, null, 512)) : g("", !0),
377
+ e.value.style.chart.title.text ? (u(), C("div", Ut, [
378
+ (u(), k(l(Pe), {
379
+ key: `title_${ee.value}`,
380
+ config: {
381
+ title: {
382
+ cy: "molecule-div-title",
383
+ ...e.value.style.chart.title
384
+ },
385
+ subtitle: {
386
+ cy: "molecule-div-subtitle",
387
+ ...e.value.style.chart.title.subtitle
388
+ }
389
+ }
390
+ }, null, 8, ["config"]))
391
+ ])) : g("", !0),
392
+ e.value.userOptions.show && q.value && (l(le) || l(M)) ? (u(), k(l(Be), {
393
+ ref_key: "details",
394
+ ref: Ve,
395
+ key: `user_options_${K.value}`,
396
+ backgroundColor: e.value.style.chart.backgroundColor,
397
+ color: e.value.style.chart.color,
398
+ isPrinting: l(se),
399
+ isImaging: l(ne),
400
+ uid: R.value,
401
+ hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
402
+ hasPdf: e.value.userOptions.buttons.pdf,
403
+ hasXls: e.value.userOptions.buttons.csv,
404
+ hasImg: e.value.userOptions.buttons.img,
405
+ hasTable: e.value.userOptions.buttons.table,
406
+ hasLabel: e.value.userOptions.buttons.labels,
407
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
408
+ isTooltip: v.value.showTooltip,
409
+ titles: { ...e.value.userOptions.buttonTitles },
410
+ chartElement: T.value,
411
+ position: e.value.userOptions.position,
412
+ hasAnnotator: e.value.userOptions.buttons.annotator,
413
+ isAnnotation: F.value,
414
+ callbacks: e.value.userOptions.callbacks,
415
+ printScale: e.value.userOptions.print.scale,
416
+ onToggleFullscreen: he,
417
+ onGeneratePdf: l(re),
418
+ onGenerateCsv: pe,
419
+ onGenerateImage: l(ie),
420
+ onToggleTable: fe,
421
+ onToggleLabels: me,
422
+ onToggleTooltip: ge,
423
+ onToggleAnnotator: X,
424
+ style: E({
425
+ visibility: l(le) ? l(M) ? "visible" : "hidden" : "visible"
426
+ })
427
+ }, ut({ _: 2 }, [
428
+ t.$slots.menuIcon ? {
429
+ name: "menuIcon",
430
+ fn: d(({ isOpen: o, color: n }) => [
431
+ c(t.$slots, "menuIcon", w($({ isOpen: o, color: n })), void 0, !0)
432
+ ]),
433
+ key: "0"
434
+ } : void 0,
435
+ t.$slots.optionTooltip ? {
436
+ name: "optionTooltip",
437
+ fn: d(() => [
438
+ c(t.$slots, "optionTooltip", {}, void 0, !0)
439
+ ]),
440
+ key: "1"
441
+ } : void 0,
442
+ t.$slots.optionPdf ? {
443
+ name: "optionPdf",
444
+ fn: d(() => [
445
+ c(t.$slots, "optionPdf", {}, void 0, !0)
446
+ ]),
447
+ key: "2"
448
+ } : void 0,
449
+ t.$slots.optionCsv ? {
450
+ name: "optionCsv",
451
+ fn: d(() => [
452
+ c(t.$slots, "optionCsv", {}, void 0, !0)
453
+ ]),
454
+ key: "3"
455
+ } : void 0,
456
+ t.$slots.optionImg ? {
457
+ name: "optionImg",
458
+ fn: d(() => [
459
+ c(t.$slots, "optionImg", {}, void 0, !0)
460
+ ]),
461
+ key: "4"
462
+ } : void 0,
463
+ t.$slots.optionTable ? {
464
+ name: "optionTable",
465
+ fn: d(() => [
466
+ c(t.$slots, "optionTable", {}, void 0, !0)
467
+ ]),
468
+ key: "5"
469
+ } : void 0,
470
+ t.$slots.optionLabels ? {
471
+ name: "optionLabels",
472
+ fn: d(() => [
473
+ c(t.$slots, "optionLabels", {}, void 0, !0)
474
+ ]),
475
+ key: "6"
476
+ } : void 0,
477
+ t.$slots.optionFullscreen ? {
478
+ name: "optionFullscreen",
479
+ fn: d(({ toggleFullscreen: o, isFullscreen: n }) => [
480
+ c(t.$slots, "optionFullscreen", w($({ toggleFullscreen: o, isFullscreen: n })), void 0, !0)
481
+ ]),
482
+ key: "7"
483
+ } : void 0,
484
+ t.$slots.optionAnnotator ? {
485
+ name: "optionAnnotator",
486
+ fn: d(({ toggleAnnotator: o, isAnnotator: n }) => [
487
+ c(t.$slots, "optionAnnotator", w($({ toggleAnnotator: o, isAnnotator: n })), void 0, !0)
488
+ ]),
489
+ key: "8"
490
+ } : void 0
491
+ ]), 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),
492
+ (u(), C("svg", {
493
+ ref_key: "svgRef",
494
+ ref: V,
495
+ key: `svg_${ae.value}`,
496
+ xmlns: l(kt),
497
+ viewBox: `${l(B).x} ${l(B).y} ${l(B).width} ${l(B).height}`,
498
+ class: Ae({ "vue-data-ui-fullscreen--on": P.value, "vue-data-ui-fulscreen--off": !P.value }),
499
+ style: E(`overflow: hidden; background:transparent;color:${e.value.style.chart.color}`)
500
+ }, [
501
+ N(l(xe)),
502
+ t.$slots["chart-background"] ? (u(), C("foreignObject", {
503
+ key: 0,
504
+ x: 0,
505
+ y: 0,
506
+ width: p.value.width <= 0 ? 10 : p.value.width,
507
+ height: p.value.height <= 0 ? 10 : p.value.height,
508
+ style: {
509
+ pointerEvents: "none"
510
+ }
511
+ }, [
512
+ c(t.$slots, "chart-background", {}, void 0, !0)
513
+ ], 8, Ht)) : g("", !0),
514
+ L("defs", null, [
515
+ (u(!0), C(ct, null, dt(Object.keys(Ye.value), (o) => (u(), C("radialGradient", {
516
+ id: `gradient_${o}`,
517
+ cx: "50%",
518
+ cy: "30%",
519
+ r: "50%",
520
+ fx: "50%",
521
+ fy: "50%"
522
+ }, [
523
+ L("stop", {
524
+ offset: "0%",
525
+ "stop-color": l(wt)(o, 0.5)
526
+ }, null, 8, Vt),
527
+ L("stop", {
528
+ offset: "100%",
529
+ "stop-color": o
530
+ }, null, 8, Gt)
531
+ ], 8, Mt))), 256))
532
+ ]),
533
+ N(l(Ee), {
534
+ dataset: b.value,
535
+ color: e.value.style.chart.links.stroke,
536
+ backgroundColor: e.value.style.chart.backgroundColor
537
+ }, null, 8, ["dataset", "color", "backgroundColor"]),
538
+ N(l(Ue), {
539
+ dataset: b.value,
540
+ hoveredUid: I.value,
541
+ stroke: e.value.style.chart.nodes.stroke,
542
+ strokeHovered: e.value.style.chart.nodes.strokeHovered,
543
+ onClick: lt,
544
+ onHover: Qe
545
+ }, {
546
+ node: d(({ node: o }) => [
547
+ c(t.$slots, "node", w($({ node: o })), void 0, !0)
548
+ ]),
549
+ _: 3
550
+ }, 8, ["dataset", "hoveredUid", "stroke", "strokeHovered"]),
551
+ v.value.showDataLabels && !l(z) ? (u(), k(l(Re), {
552
+ key: 1,
553
+ dataset: b.value,
554
+ color: e.value.style.chart.color,
555
+ hoveredUid: I.value
556
+ }, null, 8, ["dataset", "color", "hoveredUid"])) : g("", !0),
557
+ c(t.$slots, "svg", { svg: p.value }, void 0, !0)
558
+ ], 14, zt)),
559
+ t.$slots.watermark ? (u(), C("div", Wt, [
560
+ c(t.$slots, "watermark", w($({ isPrinting: l(se) || l(ne) })), void 0, !0)
561
+ ])) : g("", !0),
562
+ l(tt) ? (u(), C("div", Xt, [
563
+ c(t.$slots, "reset-action", { reset: l(j) }, () => [
564
+ L("button", {
565
+ "data-cy-reset": "",
566
+ tabindex: "0",
567
+ role: "button",
568
+ class: "vue-data-ui-refresh-button",
569
+ style: E({
570
+ background: e.value.style.chart.backgroundColor
571
+ }),
572
+ onClick: a[0] || (a[0] = (o) => l(j)(!0))
573
+ }, [
574
+ N(l(Ne), {
575
+ name: "refresh",
576
+ stroke: e.value.style.chart.color
577
+ }, null, 8, ["stroke"])
578
+ ], 4)
579
+ ], !0)
580
+ ])) : g("", !0),
581
+ t.$slots.source ? (u(), C("div", jt, [
582
+ c(t.$slots, "source", {}, void 0, !0)
583
+ ], 512)) : g("", !0),
584
+ N(l(Fe), {
585
+ show: v.value.showTooltip && U.value,
586
+ backgroundColor: e.value.style.chart.tooltip.backgroundColor,
587
+ color: e.value.style.chart.tooltip.color,
588
+ borderRadius: e.value.style.chart.tooltip.borderRadius,
589
+ borderColor: e.value.style.chart.tooltip.borderColor,
590
+ borderWidth: e.value.style.chart.tooltip.borderWidth,
591
+ fontSize: e.value.style.chart.tooltip.fontSize,
592
+ backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
593
+ position: e.value.style.chart.tooltip.position,
594
+ offsetY: e.value.style.chart.tooltip.offsetY,
595
+ parent: T.value,
596
+ content: S.value,
597
+ isFullscreen: P.value,
598
+ isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function",
599
+ smooth: e.value.style.chart.tooltip.smooth,
600
+ backdropFilter: e.value.style.chart.tooltip.backdropFilter
601
+ }, {
602
+ "tooltip-before": d(() => [
603
+ c(t.$slots, "tooltip-before", w($({ ...W.value })), void 0, !0)
604
+ ]),
605
+ "tooltip-after": d(() => [
606
+ c(t.$slots, "tooltip-after", w($({ ...W.value })), void 0, !0)
607
+ ]),
608
+ _: 3
609
+ }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
610
+ q.value ? (u(), k(l(Le), {
611
+ key: 7,
612
+ hideDetails: "",
613
+ config: {
614
+ open: v.value.showTable,
615
+ maxHeight: 1e4,
616
+ body: {
617
+ backgroundColor: e.value.style.chart.backgroundColor,
618
+ color: e.value.style.chart.color
619
+ },
620
+ head: {
621
+ backgroundColor: e.value.style.chart.backgroundColor,
622
+ color: e.value.style.chart.color
623
+ }
624
+ }
625
+ }, {
626
+ content: d(() => [
627
+ (u(), k(l(Se), {
628
+ key: `table_${te.value}`,
629
+ colNames: _.value.colNames,
630
+ head: _.value.head,
631
+ body: _.value.body,
632
+ config: _.value.config,
633
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
634
+ onClose: a[1] || (a[1] = (o) => v.value.showTable = !1)
635
+ }, {
636
+ th: d(({ th: o }) => [
637
+ L("div", {
638
+ innerHTML: o,
639
+ style: { display: "flex", "align-items": "center" }
640
+ }, null, 8, Yt)
641
+ ]),
642
+ td: d(({ td: o }) => [
643
+ vt(pt(o.name || o), 1)
644
+ ]),
645
+ _: 1
646
+ }, 8, ["colNames", "head", "body", "config", "title"]))
647
+ ]),
648
+ _: 1
649
+ }, 8, ["config"])) : g("", !0),
650
+ l(z) ? (u(), k(Ft, { key: 8 })) : g("", !0)
651
+ ], 46, Et));
652
+ }
653
+ }, no = /* @__PURE__ */ xt(Zt, [["__scopeId", "data-v-8a23b240"]]);
654
+ export {
655
+ no as default
656
+ };