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
@@ -1,597 +0,0 @@
1
- import { useCssVars as Je, defineAsyncComponent as p, computed as k, onMounted as Ke, ref as c, watch as et, createElementBlock as y, openBlock as i, unref as s, normalizeStyle as R, normalizeClass as pe, createBlock as $, createCommentVNode as f, createVNode as S, createSlots as tt, withCtx as d, renderSlot as u, normalizeProps as w, guardReactiveProps as T, createElementVNode as _, Fragment as ot, renderList as lt, createTextVNode as st, toDisplayString as at, nextTick as nt } from "vue";
2
- import { u as rt, o as it, e as ut, c as fe, t as ct, p as ge, a as dt, b as vt, Q as ht, X as pt, l as ft, R as gt, d as me, q as mt, r as yt, x as bt, y as kt } from "./index-CgShIRes.js";
3
- import { u as ye } from "./useNestedProp-BC4Ciblw.js";
4
- import { u as Ct } from "./usePrinter-rIrqBbbm.js";
5
- import { u as $t } from "./useUserOptionState-BIvW1Kz7.js";
6
- import { u as wt } from "./useChartAccessibility-9icAAmYg.js";
7
- import { u as Tt } from "./usePanZoom-BQMvRXEQ.js";
8
- import Ot from "./img-C_9wps3s.js";
9
- import { _ as Pt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
- const At = ["id"], It = {
11
- key: 1,
12
- ref: "noTitle",
13
- class: "vue-data-ui-no-title-space",
14
- style: "height:36px; width: 100%;background:transparent"
15
- }, Nt = {
16
- key: 2,
17
- style: "width:100%;background:transparent;"
18
- }, Ft = ["xmlns", "viewBox"], St = ["width", "height"], _t = ["id"], Lt = ["stop-color"], Dt = ["stop-color"], Bt = {
19
- key: 5,
20
- class: "vue-data-ui-watermark"
21
- }, Rt = {
22
- key: 6,
23
- "data-dom-to-png-ignore": "",
24
- class: "reset-wrapper"
25
- }, Ut = {
26
- key: 8,
27
- ref: "source",
28
- dir: "auto"
29
- }, Et = ["innerHTML"], xt = {
30
- __name: "vue-ui-molecule",
31
- props: {
32
- config: {
33
- type: Object,
34
- default() {
35
- return {};
36
- }
37
- },
38
- dataset: {
39
- type: Array,
40
- default() {
41
- return [];
42
- }
43
- }
44
- },
45
- emits: ["selectNode"],
46
- setup(be, { expose: ke, emit: Ce }) {
47
- Je((t) => ({
48
- "7a354ece": t.slicerColor
49
- }));
50
- const $e = p(() => import("./vue-ui-accordion-hlzscmAS.js")), we = p(() => import("./BaseIcon-DxUUKVlt.js")), Te = p(() => import("./DataTable--paavNqF.js")), Oe = p(() => import("./PackageVersion-2QvaZf9_.js")), Pe = p(() => import("./PenAndPaper-hGgW0EHz.js")), Ae = p(() => import("./RecursiveCircles-Dn3TGoL6.js")), Ie = p(() => import("./RecursiveLabels-NTMB9w5C.js")), Ne = p(() => import("./RecursiveLinks-ld_gDZH4.js")), Fe = p(() => import("./vue-ui-skeleton-BsBaCvoE.js")), Se = p(() => import("./Title-B2dA6-uH.js")), _e = p(() => import("./Tooltip-O_hCvqgF.js")), Le = p(() => import("./UserOptions-Bk03FRqW.js")), { vue_ui_molecule: De } = rt(), C = be, Be = Ce, L = k(() => !!C.dataset && C.dataset.length);
51
- Ke(() => {
52
- W();
53
- });
54
- function W() {
55
- it(C.dataset) && ut({
56
- componentName: "VueUiMolecule",
57
- type: "dataset"
58
- });
59
- }
60
- const U = c(fe()), Re = c(null), E = c(!1), D = c(""), O = c(null), X = c(0), j = c(0), Y = c(0), e = k({
61
- get: () => Q(),
62
- set: (t) => t
63
- }), { userOptionsVisible: x, setUserOptionsVisibility: Z, keepUserOptionState: q } = $t({ config: e.value }), { svgRef: z } = wt({ config: e.value.style.chart.title });
64
- function Q() {
65
- const t = ye({
66
- userConfig: C.config,
67
- defaultConfig: De
68
- });
69
- return t.theme ? {
70
- ...ye({
71
- userConfig: dt.vue_ui_molecule[t.theme] || C.config,
72
- defaultConfig: t
73
- }),
74
- customPalette: ct[t.theme] || ge
75
- } : t;
76
- }
77
- et(() => C.config, (t) => {
78
- e.value = Q(), x.value = !e.value.userOptions.showOnChartHover, W(), j.value += 1, Y.value += 1, h.value.showTable = e.value.table.show, h.value.showTooltip = e.value.style.chart.tooltip.show;
79
- }, { deep: !0 });
80
- const { isPrinting: J, isImaging: K, generatePdf: ee, generateImage: te } = Ct({
81
- elementId: `cluster_${U.value}`,
82
- fileName: e.value.style.chart.title.text || "vue-ui-molecule",
83
- options: e.value.userOptions.print
84
- }), Ue = k(() => e.value.userOptions.show && !e.value.style.chart.title.text), Ee = k(() => vt(e.value.customPalette)), h = c({
85
- showTable: e.value.table.show,
86
- showDataLabels: !0,
87
- showTooltip: e.value.style.chart.tooltip.show
88
- });
89
- function oe(t, l = 0) {
90
- return Array.isArray(t) && t.length > 0 && t[0].nodes ? oe(t[0].nodes, l + 1) : l;
91
- }
92
- function xe() {
93
- const t = oe(C.dataset);
94
- let l = 100, o = l;
95
- for (let n = 0; n < t; n += 1)
96
- l /= 1, o += l;
97
- return {
98
- height: o,
99
- width: o
100
- };
101
- }
102
- const v = c(xe());
103
- c(`0 0 ${v.value.width} ${v.value.height}`);
104
- function le(t, l = { x: -v.value.width / 2.43, y: v.value.height / 2 }, o = v.value.width / 1.1, n = 24, a = 0, r = 0, g = "#BBBBBB", G = 0) {
105
- if (!Array.isArray(t) || t.length === 0) return t;
106
- const Qe = gt({
107
- plot: l,
108
- radius: o,
109
- sides: t.length,
110
- rotation: a
111
- });
112
- return t.forEach((m, de) => {
113
- const ve = Qe.coordinates[de], he = m.color ? (() => {
114
- let M = me(m.color);
115
- return M.startsWith("#") ? M : `#${M}`;
116
- })() : null;
117
- let A;
118
- he ? A = he : G === 0 ? A = g : G === 1 ? (A = Ee.value[r] || ge[r] || g, r += 1) : A = g, m.polygonPath = { coordinates: [ve] }, m.circleRadius = n, m.color = A, m.uid = fe(), Array.isArray(m.nodes) && m.nodes.length && (m.nodes = le(
119
- m.nodes,
120
- ve,
121
- o / 2.9,
122
- n / 2.2,
123
- a + Math.PI * de / m.nodes.length,
124
- r,
125
- A,
126
- G + 1
127
- ));
128
- }), t;
129
- }
130
- function ze(t) {
131
- const l = /* @__PURE__ */ new Set();
132
- function o(a) {
133
- a.forEach((r) => {
134
- if (!r.color) return;
135
- let g = r.color;
136
- /^#?[0-9A-F]{6}$/i.test(g) || (g = me(g)), g.startsWith("#") || (g = `#${g}`), l.add(g), Array.isArray(r.nodes) && r.nodes.length && o(r.nodes);
137
- });
138
- }
139
- o(t);
140
- const n = {};
141
- return Array.from(l).forEach((a) => {
142
- const r = a.slice(1);
143
- n[a] = `gradient_${r}`;
144
- }), n;
145
- }
146
- const He = k(() => ze(b.value)), b = k(() => {
147
- const t = ht(C.dataset);
148
- return le(t);
149
- }), H = c(null);
150
- function Ve(t) {
151
- H.value = {
152
- datapoint: t,
153
- seriesIndex: -1,
154
- series: b.value,
155
- config: e.value
156
- };
157
- const l = e.value.style.chart.tooltip.customFormat;
158
- if (bt(l) && kt(() => l({
159
- seriesIndex: -1,
160
- datapoint: t,
161
- series: b.value,
162
- config: e.value
163
- })))
164
- D.value = l({
165
- seriesIndex: -1,
166
- // well, ok
167
- datapoint: t,
168
- series: b.value,
169
- config: e.value
170
- });
171
- else {
172
- let o = "";
173
- 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>`), D.value = `<div style="font-family:inherit">${o}</div>`;
174
- }
175
- }
176
- const se = c(null), I = c(null);
177
- function Ge(t) {
178
- se.value = t, t ? (E.value = !0, Ve(t), I.value = t.uid) : (E.value = !1, D.value = "", I.value = null);
179
- }
180
- function Me(t) {
181
- const l = [];
182
- function o(n) {
183
- n.forEach((a) => {
184
- const r = {
185
- name: a.name,
186
- details: a.details || "-",
187
- ancestor: a.ancestor && a.ancestor.name || "-",
188
- color: a.color || ""
189
- };
190
- l.push(r), a.nodes && a.nodes.length > 0 && o(a.nodes, a.name);
191
- });
192
- }
193
- return o(t), l;
194
- }
195
- const We = k(() => Me(b.value)), P = k(() => {
196
- const t = [
197
- e.value.table.translations.nodeName,
198
- e.value.table.translations.details,
199
- e.value.table.translations.ancestor
200
- ], l = We.value.map((a, r) => [
201
- {
202
- color: a.color,
203
- name: a.name
204
- },
205
- a.details,
206
- a.ancestor || ""
207
- ]), o = {
208
- th: {
209
- backgroundColor: e.value.table.th.backgroundColor,
210
- color: e.value.table.th.color,
211
- outline: e.value.table.th.outline
212
- },
213
- td: {
214
- backgroundColor: e.value.table.td.backgroundColor,
215
- color: e.value.table.td.color,
216
- outline: e.value.table.td.outline
217
- },
218
- breakpoint: e.value.table.responsiveBreakpoint
219
- }, n = [
220
- e.value.table.translations.nodeName,
221
- e.value.table.translations.details,
222
- e.value.table.translations.ancestor
223
- ];
224
- return {
225
- head: t,
226
- body: l,
227
- config: o,
228
- colNames: n
229
- };
230
- });
231
- function ae(t = null) {
232
- nt(() => {
233
- const l = P.value.body.map((a, r) => [[a[0].name], [a[1]], [a[2]]]), o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[...P.value.head]]].concat(l), n = mt(o);
234
- t ? t(n) : yt({ csvContent: n, title: e.value.style.chart.title.text || "vue-ui-molecule" });
235
- });
236
- }
237
- function Xe() {
238
- return b.value;
239
- }
240
- const N = c(!1);
241
- function ne(t) {
242
- N.value = t, X.value += 1;
243
- }
244
- function re() {
245
- h.value.showTable = !h.value.showTable;
246
- }
247
- function ie() {
248
- h.value.showDataLabels = !h.value.showDataLabels;
249
- }
250
- function ue() {
251
- h.value.showTooltip = !h.value.showTooltip;
252
- }
253
- const F = c(!1);
254
- function V() {
255
- F.value = !F.value;
256
- }
257
- const je = k(() => !F.value), { viewBox: B, resetZoom: ce, isZoom: Ye } = Tt(z, {
258
- x: 0,
259
- y: 0,
260
- width: v.value.width <= 0 ? 10 : v.value.width,
261
- height: v.value.height <= 0 ? 10 : v.value.height
262
- }, e.value.style.chart.zoom.speed, je);
263
- function Ze(t) {
264
- Be("selectNode", t);
265
- }
266
- async function qe({ scale: t = 2 } = {}) {
267
- if (!O.value) return;
268
- const { width: l, height: o } = O.value.getBoundingClientRect(), n = l / o, { imageUri: a, base64: r } = await Ot({ domElement: O.value, base64: !0, img: !0, scale: t });
269
- return {
270
- imageUri: a,
271
- base64: r,
272
- title: e.value.style.chart.title.text,
273
- width: l,
274
- height: o,
275
- aspectRatio: n
276
- };
277
- }
278
- return ke({
279
- getData: Xe,
280
- getImage: qe,
281
- generatePdf: ee,
282
- generateCsv: ae,
283
- generateImage: te,
284
- toggleTable: re,
285
- toggleLabels: ie,
286
- toggleTooltip: ue,
287
- toggleAnnotator: V,
288
- toggleFullscreen: ne
289
- }), (t, l) => (i(), y("div", {
290
- ref_key: "moleculeChart",
291
- ref: O,
292
- class: pe(`vue-ui-molecule ${N.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
293
- style: R(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
294
- id: `cluster_${U.value}`,
295
- onMouseleave: l[2] || (l[2] = (o) => {
296
- se.value = null, I.value = null, s(Z)(!1);
297
- }),
298
- onMouseenter: l[3] || (l[3] = () => s(Z)(!0))
299
- }, [
300
- e.value.userOptions.buttons.annotator ? (i(), $(s(Pe), {
301
- key: 0,
302
- svgRef: s(z),
303
- backgroundColor: e.value.style.chart.backgroundColor,
304
- color: e.value.style.chart.color,
305
- active: F.value,
306
- onClose: V
307
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : f("", !0),
308
- Ue.value ? (i(), y("div", It, null, 512)) : f("", !0),
309
- e.value.style.chart.title.text ? (i(), y("div", Nt, [
310
- (i(), $(s(Se), {
311
- key: `title_${j.value}`,
312
- config: {
313
- title: {
314
- cy: "molecule-div-title",
315
- ...e.value.style.chart.title
316
- },
317
- subtitle: {
318
- cy: "molecule-div-subtitle",
319
- ...e.value.style.chart.title.subtitle
320
- }
321
- }
322
- }, null, 8, ["config"]))
323
- ])) : f("", !0),
324
- e.value.userOptions.show && L.value && (s(q) || s(x)) ? (i(), $(s(Le), {
325
- ref_key: "details",
326
- ref: Re,
327
- key: `user_options_${X.value}`,
328
- backgroundColor: e.value.style.chart.backgroundColor,
329
- color: e.value.style.chart.color,
330
- isPrinting: s(J),
331
- isImaging: s(K),
332
- uid: U.value,
333
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
334
- hasPdf: e.value.userOptions.buttons.pdf,
335
- hasXls: e.value.userOptions.buttons.csv,
336
- hasImg: e.value.userOptions.buttons.img,
337
- hasTable: e.value.userOptions.buttons.table,
338
- hasLabel: e.value.userOptions.buttons.labels,
339
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
340
- isTooltip: h.value.showTooltip,
341
- titles: { ...e.value.userOptions.buttonTitles },
342
- chartElement: O.value,
343
- position: e.value.userOptions.position,
344
- hasAnnotator: e.value.userOptions.buttons.annotator,
345
- isAnnotation: F.value,
346
- callbacks: e.value.userOptions.callbacks,
347
- printScale: e.value.userOptions.print.scale,
348
- onToggleFullscreen: ne,
349
- onGeneratePdf: s(ee),
350
- onGenerateCsv: ae,
351
- onGenerateImage: s(te),
352
- onToggleTable: re,
353
- onToggleLabels: ie,
354
- onToggleTooltip: ue,
355
- onToggleAnnotator: V,
356
- style: R({
357
- visibility: s(q) ? s(x) ? "visible" : "hidden" : "visible"
358
- })
359
- }, tt({ _: 2 }, [
360
- t.$slots.menuIcon ? {
361
- name: "menuIcon",
362
- fn: d(({ isOpen: o, color: n }) => [
363
- u(t.$slots, "menuIcon", w(T({ isOpen: o, color: n })), void 0, !0)
364
- ]),
365
- key: "0"
366
- } : void 0,
367
- t.$slots.optionTooltip ? {
368
- name: "optionTooltip",
369
- fn: d(() => [
370
- u(t.$slots, "optionTooltip", {}, void 0, !0)
371
- ]),
372
- key: "1"
373
- } : void 0,
374
- t.$slots.optionPdf ? {
375
- name: "optionPdf",
376
- fn: d(() => [
377
- u(t.$slots, "optionPdf", {}, void 0, !0)
378
- ]),
379
- key: "2"
380
- } : void 0,
381
- t.$slots.optionCsv ? {
382
- name: "optionCsv",
383
- fn: d(() => [
384
- u(t.$slots, "optionCsv", {}, void 0, !0)
385
- ]),
386
- key: "3"
387
- } : void 0,
388
- t.$slots.optionImg ? {
389
- name: "optionImg",
390
- fn: d(() => [
391
- u(t.$slots, "optionImg", {}, void 0, !0)
392
- ]),
393
- key: "4"
394
- } : void 0,
395
- t.$slots.optionTable ? {
396
- name: "optionTable",
397
- fn: d(() => [
398
- u(t.$slots, "optionTable", {}, void 0, !0)
399
- ]),
400
- key: "5"
401
- } : void 0,
402
- t.$slots.optionLabels ? {
403
- name: "optionLabels",
404
- fn: d(() => [
405
- u(t.$slots, "optionLabels", {}, void 0, !0)
406
- ]),
407
- key: "6"
408
- } : void 0,
409
- t.$slots.optionFullscreen ? {
410
- name: "optionFullscreen",
411
- fn: d(({ toggleFullscreen: o, isFullscreen: n }) => [
412
- u(t.$slots, "optionFullscreen", w(T({ toggleFullscreen: o, isFullscreen: n })), void 0, !0)
413
- ]),
414
- key: "7"
415
- } : void 0,
416
- t.$slots.optionAnnotator ? {
417
- name: "optionAnnotator",
418
- fn: d(({ toggleAnnotator: o, isAnnotator: n }) => [
419
- u(t.$slots, "optionAnnotator", w(T({ toggleAnnotator: o, isAnnotator: n })), void 0, !0)
420
- ]),
421
- key: "8"
422
- } : void 0
423
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : f("", !0),
424
- L.value ? (i(), y("svg", {
425
- key: 4,
426
- ref_key: "svgRef",
427
- ref: z,
428
- xmlns: s(pt),
429
- viewBox: `${s(B).x} ${s(B).y} ${s(B).width} ${s(B).height}`,
430
- class: pe({ "vue-data-ui-fullscreen--on": N.value, "vue-data-ui-fulscreen--off": !N.value }),
431
- style: R(`overflow: hidden; background:transparent;color:${e.value.style.chart.color}`)
432
- }, [
433
- S(s(Oe)),
434
- t.$slots["chart-background"] ? (i(), y("foreignObject", {
435
- key: 0,
436
- x: 0,
437
- y: 0,
438
- width: v.value.width <= 0 ? 10 : v.value.width,
439
- height: v.value.height <= 0 ? 10 : v.value.height,
440
- style: {
441
- pointerEvents: "none"
442
- }
443
- }, [
444
- u(t.$slots, "chart-background", {}, void 0, !0)
445
- ], 8, St)) : f("", !0),
446
- _("defs", null, [
447
- (i(!0), y(ot, null, lt(Object.keys(He.value), (o) => (i(), y("radialGradient", {
448
- id: `gradient_${o}`,
449
- cx: "50%",
450
- cy: "30%",
451
- r: "50%",
452
- fx: "50%",
453
- fy: "50%"
454
- }, [
455
- _("stop", {
456
- offset: "0%",
457
- "stop-color": s(ft)(o, 0.5)
458
- }, null, 8, Lt),
459
- _("stop", {
460
- offset: "100%",
461
- "stop-color": o
462
- }, null, 8, Dt)
463
- ], 8, _t))), 256))
464
- ]),
465
- S(s(Ne), {
466
- dataset: b.value,
467
- color: e.value.style.chart.links.stroke,
468
- backgroundColor: e.value.style.chart.backgroundColor
469
- }, null, 8, ["dataset", "color", "backgroundColor"]),
470
- S(s(Ae), {
471
- dataset: b.value,
472
- hoveredUid: I.value,
473
- stroke: e.value.style.chart.nodes.stroke,
474
- strokeHovered: e.value.style.chart.nodes.strokeHovered,
475
- onClick: Ze,
476
- onHover: Ge
477
- }, {
478
- node: d(({ node: o }) => [
479
- u(t.$slots, "node", w(T({ node: o })), void 0, !0)
480
- ]),
481
- _: 3
482
- }, 8, ["dataset", "hoveredUid", "stroke", "strokeHovered"]),
483
- h.value.showDataLabels ? (i(), $(s(Ie), {
484
- key: 1,
485
- dataset: b.value,
486
- color: e.value.style.chart.color,
487
- hoveredUid: I.value
488
- }, null, 8, ["dataset", "color", "hoveredUid"])) : f("", !0),
489
- u(t.$slots, "svg", { svg: v.value }, void 0, !0)
490
- ], 14, Ft)) : f("", !0),
491
- t.$slots.watermark ? (i(), y("div", Bt, [
492
- u(t.$slots, "watermark", w(T({ isPrinting: s(J) || s(K) })), void 0, !0)
493
- ])) : f("", !0),
494
- s(Ye) ? (i(), y("div", Rt, [
495
- u(t.$slots, "reset-action", { reset: s(ce) }, () => [
496
- _("button", {
497
- "data-cy-reset": "",
498
- tabindex: "0",
499
- role: "button",
500
- class: "vue-data-ui-refresh-button",
501
- style: R({
502
- background: e.value.style.chart.backgroundColor
503
- }),
504
- onClick: l[0] || (l[0] = (o) => s(ce)(!0))
505
- }, [
506
- S(s(we), {
507
- name: "refresh",
508
- stroke: e.value.style.chart.color
509
- }, null, 8, ["stroke"])
510
- ], 4)
511
- ], !0)
512
- ])) : f("", !0),
513
- L.value ? f("", !0) : (i(), $(s(Fe), {
514
- key: 7,
515
- config: {
516
- type: "molecule",
517
- style: {
518
- backgroundColor: e.value.style.chart.backgroundColor,
519
- molecule: {
520
- color: "#CCCCCC"
521
- }
522
- }
523
- }
524
- }, null, 8, ["config"])),
525
- t.$slots.source ? (i(), y("div", Ut, [
526
- u(t.$slots, "source", {}, void 0, !0)
527
- ], 512)) : f("", !0),
528
- S(s(_e), {
529
- show: h.value.showTooltip && E.value,
530
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
531
- color: e.value.style.chart.tooltip.color,
532
- borderRadius: e.value.style.chart.tooltip.borderRadius,
533
- borderColor: e.value.style.chart.tooltip.borderColor,
534
- borderWidth: e.value.style.chart.tooltip.borderWidth,
535
- fontSize: e.value.style.chart.tooltip.fontSize,
536
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
537
- position: e.value.style.chart.tooltip.position,
538
- offsetY: e.value.style.chart.tooltip.offsetY,
539
- parent: O.value,
540
- content: D.value,
541
- isFullscreen: N.value,
542
- isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function"
543
- }, {
544
- "tooltip-before": d(() => [
545
- u(t.$slots, "tooltip-before", w(T({ ...H.value })), void 0, !0)
546
- ]),
547
- "tooltip-after": d(() => [
548
- u(t.$slots, "tooltip-after", w(T({ ...H.value })), void 0, !0)
549
- ]),
550
- _: 3
551
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
552
- L.value ? (i(), $(s($e), {
553
- key: 9,
554
- hideDetails: "",
555
- config: {
556
- open: h.value.showTable,
557
- maxHeight: 1e4,
558
- body: {
559
- backgroundColor: e.value.style.chart.backgroundColor,
560
- color: e.value.style.chart.color
561
- },
562
- head: {
563
- backgroundColor: e.value.style.chart.backgroundColor,
564
- color: e.value.style.chart.color
565
- }
566
- }
567
- }, {
568
- content: d(() => [
569
- (i(), $(s(Te), {
570
- key: `table_${Y.value}`,
571
- colNames: P.value.colNames,
572
- head: P.value.head,
573
- body: P.value.body,
574
- config: P.value.config,
575
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
576
- onClose: l[1] || (l[1] = (o) => h.value.showTable = !1)
577
- }, {
578
- th: d(({ th: o }) => [
579
- _("div", {
580
- innerHTML: o,
581
- style: { display: "flex", "align-items": "center" }
582
- }, null, 8, Et)
583
- ]),
584
- td: d(({ td: o }) => [
585
- st(at(o.name || o), 1)
586
- ]),
587
- _: 1
588
- }, 8, ["colNames", "head", "body", "config", "title"]))
589
- ]),
590
- _: 1
591
- }, 8, ["config"])) : f("", !0)
592
- ], 46, At));
593
- }
594
- }, Zt = /* @__PURE__ */ Pt(xt, [["__scopeId", "data-v-7d6bc092"]]);
595
- export {
596
- Zt as default
597
- };