vue-data-ui 3.0.23 → 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 (108) hide show
  1. package/dist/{Arrow-B1Op9F3x.js → Arrow-DvG07exK.js} +1 -1
  2. package/dist/{BaseDraggableDialog-B4OaMIom.js → BaseDraggableDialog-O7900pGp.js} +72 -59
  3. package/dist/{BaseIcon-CgUOIGjr.js → BaseIcon-DHtro8us.js} +1 -1
  4. package/dist/{useLoading-D7YHNtLX.js → BaseScanner-BgWxam9d.js} +11 -11
  5. package/dist/{ColorPicker-C0nf8VH0.js → ColorPicker-CpWzNn4r.js} +2 -2
  6. package/dist/DataTable-DJjA2_wf.js +140 -0
  7. package/dist/{Legend-CyYXMSsW.js → Legend-2-dC7DVb.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-D63qeScu.js → NonSvgPenAndPaper-DHeE4Yuv.js} +3 -3
  9. package/dist/{PackageVersion-B6M-3jRt.js → PackageVersion-DU12WH3O.js} +1 -1
  10. package/dist/{PenAndPaper-zym5uEeN.js → PenAndPaper-B7QEDgx4.js} +3 -3
  11. package/dist/{Shape-CYVs2kYz.js → Shape-Dj2Hl33H.js} +1 -1
  12. package/dist/{Slicer-BTIFUO4x.js → Slicer-D99HytqX.js} +2 -2
  13. package/dist/{SparkTooltip-CNz7AYUL.js → SparkTooltip-B-wL07rI.js} +1 -1
  14. package/dist/{Title-D_e0SFWS.js → Title-Dq2_Z9kR.js} +1 -1
  15. package/dist/{Tooltip-DjVoFYj1.js → Tooltip-Y219DXZO.js} +1 -1
  16. package/dist/{UserOptions-z0NWZ7aQ.js → UserOptions-BuGfCdAY.js} +2 -2
  17. package/dist/{dom-to-png-DD0au3Qz.js → dom-to-png-BhciAKaM.js} +1 -1
  18. package/dist/{img-z5p1gGfY.js → img-JOqdlnUs.js} +1 -1
  19. package/dist/{index-BEuUtONc.js → index-CDQbCd41.js} +37 -2
  20. package/dist/{pdf-BmUjVBni.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-CchB8S-o.js → useAutoSizeLabelsInsideViewbox-Bky5KGFZ.js} +1 -1
  25. package/dist/{useNestedProp-DhLFhguL.js → useNestedProp-BPEHGiYX.js} +1 -1
  26. package/dist/{usePrinter-DiB0_UNt.js → usePrinter-Bnl1YeUU.js} +2 -2
  27. package/dist/{vue-data-ui-DJIAas-7.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-B4YfUjZ5.js → vue-ui-accordion-Bf_LHFFX.js} +3 -3
  31. package/dist/{vue-ui-age-pyramid-CkXXNN79.js → vue-ui-age-pyramid-Bz-l1afR.js} +333 -286
  32. package/dist/{vue-ui-annotator-DnSsIkvU.js → vue-ui-annotator-BcfRH2BF.js} +2 -2
  33. package/dist/{vue-ui-bullet-kZkBsWPY.js → vue-ui-bullet-DK1aM9fX.js} +8 -8
  34. package/dist/{vue-ui-candlestick-CIn0xZm0.js → vue-ui-candlestick-D6mMjvtu.js} +453 -406
  35. package/dist/{vue-ui-carousel-table-f1FDOAqH.js → vue-ui-carousel-table-Vp5f238W.js} +4 -4
  36. package/dist/{vue-ui-chestnut-B-jSj7FT.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-DdBrui6i.js → vue-ui-cursor-DIXb2S93.js} +2 -2
  40. package/dist/{vue-ui-dashboard-DSUfW7mI.js → vue-ui-dashboard-DmiriAK7.js} +62 -62
  41. package/dist/{vue-ui-digits-Cb3Wq5WR.js → vue-ui-digits-CLAIo9gW.js} +2 -2
  42. package/dist/{vue-ui-donut-BCZqlAO3.js → vue-ui-donut-C8h_tCSO.js} +477 -431
  43. package/dist/{vue-ui-donut-evolution-HmQBq9VP.js → vue-ui-donut-evolution-C3r0YhKz.js} +482 -435
  44. package/dist/{vue-ui-dumbbell-B5w2oqNO.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-C_KLPWk2.js → vue-ui-gauge-DvW7nFmK.js} +8 -8
  49. package/dist/{vue-ui-gizmo-CsPX25Ti.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-DgpYiaUD.js → vue-ui-history-plot-eU33r_Ot.js} +408 -361
  52. package/dist/{vue-ui-kpi-DOgibU7W.js → vue-ui-kpi-CKg2i71M.js} +3 -3
  53. package/dist/{vue-ui-mini-loader-BjsQAxDx.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-DMwVl3wz.js → vue-ui-mood-radar-DQaxfw9R.js} +342 -291
  56. package/dist/{vue-ui-nested-donuts-H0GzIAF0.js → vue-ui-nested-donuts-Djj9Aw_i.js} +548 -502
  57. package/dist/{vue-ui-onion-A6nKcus1.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-mwXE3w_o.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-CleNHFo5.js → vue-ui-rating-ZUpxCWrk.js} +2 -2
  63. package/dist/{vue-ui-relation-circle-CMCH7Ia6.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-kv28dsT3.js → vue-ui-scatter-CVuV9ljU.js} +594 -548
  67. package/dist/{vue-ui-skeleton-DCNOYh9x.js → vue-ui-skeleton-CFxBU2-p.js} +3 -3
  68. package/dist/{vue-ui-smiley-DcS0CM-z.js → vue-ui-smiley-Har3B3aQ.js} +2 -2
  69. package/dist/{vue-ui-spark-trend-LHgReXth.js → vue-ui-spark-trend-FPk-XEwI.js} +4 -4
  70. package/dist/{vue-ui-sparkbar-Da315uRq.js → vue-ui-sparkbar-V3eJ0w0t.js} +4 -4
  71. package/dist/{vue-ui-sparkgauge-BeAkjGap.js → vue-ui-sparkgauge-DKTGkWnJ.js} +4 -4
  72. package/dist/{vue-ui-sparkhistogram-Cy19W3y1.js → vue-ui-sparkhistogram-DJsgFwHs.js} +5 -5
  73. package/dist/{vue-ui-sparkline-IjlQWgs3.js → vue-ui-sparkline-Dmrm5SL5.js} +4 -4
  74. package/dist/{vue-ui-sparkstackbar-CoFgOa3r.js → vue-ui-sparkstackbar-B0Pl7VMI.js} +4 -4
  75. package/dist/{vue-ui-stackbar-fbCs4sHF.js → vue-ui-stackbar-CNsgBPhj.js} +525 -479
  76. package/dist/{vue-ui-strip-plot-Cm8Zr6RE.js → vue-ui-strip-plot-CYAWwYOM.js} +390 -343
  77. package/dist/{vue-ui-table-q7jWgS26.js → vue-ui-table-Dn6H98rP.js} +3 -3
  78. package/dist/{vue-ui-table-heatmap-CsK9gR1G.js → vue-ui-table-heatmap-COI9LRqC.js} +5 -5
  79. package/dist/{vue-ui-table-sparkline-CXTPucPr.js → vue-ui-table-sparkline-B7Gg5FfJ.js} +4 -4
  80. package/dist/{vue-ui-thermometer-BFxdNgrd.js → vue-ui-thermometer-Bgynq5El.js} +8 -8
  81. package/dist/{vue-ui-timer-BsoeDFjK.js → vue-ui-timer-CXng51v5.js} +5 -5
  82. package/dist/{vue-ui-tiremarks-BW_jSayT.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-OrLV4CxH.js → vue-ui-vertical-bar-DHqWeDIf.js} +512 -464
  85. package/dist/{vue-ui-waffle-BA6rNfVs.js → vue-ui-waffle-D1Mscj3N.js} +416 -370
  86. package/dist/{vue-ui-wheel-B_BkI-5f.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-B4mKuSSn.js → vue-ui-world-DYz6zw3x.js} +512 -466
  89. package/dist/{vue-ui-xy-m1SWJk77.js → vue-ui-xy-B1nqNbzw.js} +1551 -1500
  90. package/dist/vue-ui-xy-canvas-D4wd-Asd.js +1291 -0
  91. package/package.json +1 -1
  92. package/dist/DataTable-nO6ydJO2.js +0 -133
  93. package/dist/vue-ui-3d-bar-B56WqLJ-.js +0 -1323
  94. package/dist/vue-ui-chord-Ck4yV3Tb.js +0 -1049
  95. package/dist/vue-ui-circle-pack-BAfRk_Hd.js +0 -709
  96. package/dist/vue-ui-flow-BXkxtUoF.js +0 -852
  97. package/dist/vue-ui-funnel-DFvDO--q.js +0 -620
  98. package/dist/vue-ui-galaxy-BXNLLc3U.js +0 -691
  99. package/dist/vue-ui-heatmap-BHq6hBaL.js +0 -1078
  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
@@ -1,656 +0,0 @@
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-BEuUtONc.js";
3
- import { u as Pt, B as Ft } from "./useLoading-D7YHNtLX.js";
4
- import { u as Nt } from "./usePrinter-DiB0_UNt.js";
5
- import { u as Te } from "./useNestedProp-DhLFhguL.js";
6
- import { u as Lt } from "./useUserOptionState-BIvW1Kz7.js";
7
- import { u as St } from "./useChartAccessibility-9icAAmYg.js";
8
- import Dt from "./img-z5p1gGfY.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-D_e0SFWS.js")), Fe = m(() => import("./Tooltip-DjVoFYj1.js")), Ne = m(() => import("./BaseIcon-CgUOIGjr.js")), Le = m(() => import("./vue-ui-accordion-B4YfUjZ5.js")), Se = m(() => import("./DataTable-nO6ydJO2.js")), De = m(() => import("./PenAndPaper-zym5uEeN.js")), Be = m(() => import("./UserOptions-z0NWZ7aQ.js")), xe = m(() => import("./PackageVersion-B6M-3jRt.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
- };