vue-data-ui 3.0.0-next.8 → 3.0.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 (144) hide show
  1. package/README.md +32 -30
  2. package/dist/{Arrow-BRtNjitS.js → Arrow-r2f8Bpd-.js} +1 -1
  3. package/dist/{BaseDraggableDialog-CO9ok1PR.js → BaseDraggableDialog-CGGcf8d8.js} +4 -4
  4. package/dist/{BaseIcon-BuOIF6t5.js → BaseIcon-CXtL10fo.js} +1 -1
  5. package/dist/{ColorPicker-FH6oc0mS.js → ColorPicker-H91bBsqM.js} +2 -2
  6. package/dist/{DataTable-D36ZRtpU.js → DataTable-BSSXpM7w.js} +2 -2
  7. package/dist/{Legend-DInM-hku.js → Legend-BUk0WvWJ.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-B60MxEaz.js → NonSvgPenAndPaper-DQDgPoW8.js} +3 -3
  9. package/dist/{PackageVersion-CGQlqnmq.js → PackageVersion-CJ6Vd7V5.js} +3 -3
  10. package/dist/{PenAndPaper-B5slIHlh.js → PenAndPaper-D3zudcNI.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-BGr3dQKt.js → Shape-BRzOzubn.js} +43 -37
  15. package/dist/Slicer-MID8pgT3.js +602 -0
  16. package/dist/{SparkTooltip-BWA23VgJ.js → SparkTooltip-DATI1fGZ.js} +7 -7
  17. package/dist/{Title-BSlAPr_H.js → Title-BGu6gEd2.js} +1 -1
  18. package/dist/{Tooltip-lPcsweXz.js → Tooltip-Bh2zYSoM.js} +23 -19
  19. package/dist/{UserOptions-Dn5TCQxg.js → UserOptions-Ck8fz9f4.js} +2 -2
  20. package/dist/{dom-to-png-Br-eVhJZ.js → dom-to-png-DhIh24Ti.js} +1 -1
  21. package/dist/{img-CgMUOQnb.js → img-DrR839Ot.js} +1 -1
  22. package/dist/{index-Cfm5-hMQ.js → index-BtNwOUja.js} +2885 -2010
  23. package/dist/{pdf-BMVHBLq5.js → pdf-DoShrdT5.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-FmDQyX4z.js +81 -0
  28. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  29. package/dist/useLoading-D7YHNtLX.js +29 -0
  30. package/dist/useNestedProp-f2H3m6Yj.js +13 -0
  31. package/dist/usePanZoom-BVca3eMk.js +122 -0
  32. package/dist/{usePrinter-B1Hgs47c.js → usePrinter-DUNjpQNe.js} +2 -2
  33. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  34. package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
  35. package/dist/{vue-data-ui-CD674-M3.js → vue-data-ui-D7QVxNhO.js} +105 -100
  36. package/dist/vue-data-ui.js +26 -25
  37. package/dist/vue-ui-3d-bar-ITaF-6Kn.js +1323 -0
  38. package/dist/{vue-ui-accordion-CEDGlyKI.js → vue-ui-accordion-BKUrAowe.js} +3 -3
  39. package/dist/vue-ui-age-pyramid-DxsuDr6o.js +835 -0
  40. package/dist/{vue-ui-annotator-CosgP-Fl.js → vue-ui-annotator-B06QtxgJ.js} +12 -12
  41. package/dist/vue-ui-bullet-B7Fy45tA.js +571 -0
  42. package/dist/vue-ui-candlestick-Dw0U4uIQ.js +1000 -0
  43. package/dist/{vue-ui-carousel-table-BG1ItsAb.js → vue-ui-carousel-table-DGz0nw28.js} +29 -29
  44. package/dist/{vue-ui-chestnut-6uKesZW9.js → vue-ui-chestnut-CFfKYm9i.js} +664 -536
  45. package/dist/vue-ui-chord-EhlQhMSs.js +1038 -0
  46. package/dist/vue-ui-circle-pack-BHrrEUUd.js +709 -0
  47. package/dist/{vue-ui-cursor-CkVnNEGn.js → vue-ui-cursor-Dd-HtWzG.js} +2 -2
  48. package/dist/{vue-ui-dashboard-D07ivGS7.js → vue-ui-dashboard-6R8udDY3.js} +64 -64
  49. package/dist/{vue-ui-digits-Doidl3Lz.js → vue-ui-digits-zKn3uhGN.js} +2 -2
  50. package/dist/{vue-ui-donut-CWvzqAAa.js → vue-ui-donut-BtnIwS_E.js} +433 -424
  51. package/dist/vue-ui-donut-evolution-DHo1MuMM.js +1076 -0
  52. package/dist/vue-ui-dumbbell-Czi9r9Na.js +1120 -0
  53. package/dist/vue-ui-flow-jOfM0RZY.js +841 -0
  54. package/dist/{vue-ui-funnel-D1pFzjJa.js → vue-ui-funnel-tBvVpdhy.js} +16 -16
  55. package/dist/vue-ui-galaxy-IdoY2oqG.js +680 -0
  56. package/dist/vue-ui-gauge-DR6Xm_Hz.js +791 -0
  57. package/dist/vue-ui-gizmo-Dto73UsB.js +210 -0
  58. package/dist/vue-ui-heatmap-zmFv-0z1.js +1078 -0
  59. package/dist/vue-ui-history-plot-ILemyyYw.js +1074 -0
  60. package/dist/{vue-ui-kpi-DTeZbrJk.js → vue-ui-kpi-hmqSCvxr.js} +26 -26
  61. package/dist/{vue-ui-mini-loader-itpDcfZU.js → vue-ui-mini-loader-CbD-E8ci.js} +2 -2
  62. package/dist/vue-ui-molecule-mTy6YIm6.js +656 -0
  63. package/dist/vue-ui-mood-radar-BEnSYV3Q.js +785 -0
  64. package/dist/vue-ui-nested-donuts-CGE9dmJK.js +1284 -0
  65. package/dist/vue-ui-onion-Dh2J9GV0.js +776 -0
  66. package/dist/vue-ui-parallel-coordinate-plot-xsgmMIJK.js +916 -0
  67. package/dist/{vue-ui-quadrant-0milmSNS.js → vue-ui-quadrant-DA0Kw6eq.js} +512 -459
  68. package/dist/vue-ui-quick-chart-DKbxF5Yt.js +1762 -0
  69. package/dist/vue-ui-radar-BFY9bN_h.js +796 -0
  70. package/dist/{vue-ui-rating-C3QUdrMw.js → vue-ui-rating-Bh35aujf.js} +2 -2
  71. package/dist/vue-ui-relation-circle-B-05kQ_l.js +598 -0
  72. package/dist/vue-ui-ridgeline-CuGfF83t.js +1157 -0
  73. package/dist/vue-ui-rings-DrQXXzAM.js +728 -0
  74. package/dist/vue-ui-scatter-CWn9c7e9.js +1178 -0
  75. package/dist/{vue-ui-skeleton-P-1SRvsT.js → vue-ui-skeleton-oG4Bm5nL.js} +13 -13
  76. package/dist/{vue-ui-smiley-Cd1bhDuU.js → vue-ui-smiley-Cnwba_gV.js} +46 -46
  77. package/dist/vue-ui-spark-trend-D9iNCf4o.js +315 -0
  78. package/dist/vue-ui-sparkbar-iJkiubZC.js +351 -0
  79. package/dist/vue-ui-sparkgauge-BH3uA5rh.js +232 -0
  80. package/dist/vue-ui-sparkhistogram-B3kR62pf.js +380 -0
  81. package/dist/vue-ui-sparkline-DczR2ZAf.js +513 -0
  82. package/dist/vue-ui-sparkstackbar-Cg0ItRGH.js +421 -0
  83. package/dist/vue-ui-stackbar-d4PrzcGS.js +1371 -0
  84. package/dist/vue-ui-strip-plot-BXBpN5rl.js +916 -0
  85. package/dist/{vue-ui-table-B1tjuVi0.js → vue-ui-table-BXOLZXuz.js} +17 -17
  86. package/dist/{vue-ui-table-heatmap-BI8eIQG7.js → vue-ui-table-heatmap-7YT7VF2H.js} +5 -5
  87. package/dist/{vue-ui-table-sparkline-CqBD7xhZ.js → vue-ui-table-sparkline-BfgqajJ2.js} +19 -16
  88. package/dist/vue-ui-thermometer-C7Tg6HLz.js +541 -0
  89. package/dist/{vue-ui-timer-sgO_Z6ja.js → vue-ui-timer-Ch5JP1pQ.js} +5 -5
  90. package/dist/vue-ui-tiremarks-fY-4pWAK.js +406 -0
  91. package/dist/vue-ui-treemap-DTSX6suB.js +1035 -0
  92. package/dist/{vue-ui-vertical-bar-BPay31_q.js → vue-ui-vertical-bar-C-i2dRnU.js} +107 -105
  93. package/dist/vue-ui-waffle-BbgLlhGH.js +910 -0
  94. package/dist/vue-ui-wheel-waZf462K.js +379 -0
  95. package/dist/vue-ui-word-cloud-DtLK91Dk.js +765 -0
  96. package/dist/{vue-ui-world-DWskeHfE.js → vue-ui-world-Cx4uuwTY.js} +364 -327
  97. package/dist/vue-ui-xy-DDOT8cyx.js +3808 -0
  98. package/dist/{vue-ui-xy-canvas-Dkmsguo1.js → vue-ui-xy-canvas-CUCsC8vD.js} +265 -264
  99. package/package.json +4 -4
  100. package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
  101. package/dist/Slicer-O07lQwRC.js +0 -577
  102. package/dist/useLoading-Bt5Doa8m.js +0 -28
  103. package/dist/useNestedProp-Hh7nGEjp.js +0 -13
  104. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  105. package/dist/vue-ui-3d-bar-DWtJoryQ.js +0 -1227
  106. package/dist/vue-ui-age-pyramid-DbrA1G0r.js +0 -746
  107. package/dist/vue-ui-bullet-9IB3mGon.js +0 -513
  108. package/dist/vue-ui-candlestick-CWqPF_zW.js +0 -873
  109. package/dist/vue-ui-chord-Crd3l1b6.js +0 -949
  110. package/dist/vue-ui-circle-pack-CAm2gxBi.js +0 -673
  111. package/dist/vue-ui-donut-evolution-Djp_eBqw.js +0 -903
  112. package/dist/vue-ui-dumbbell-B7GySnYf.js +0 -753
  113. package/dist/vue-ui-flow-XDpZAYWI.js +0 -765
  114. package/dist/vue-ui-galaxy-DBQy21se.js +0 -617
  115. package/dist/vue-ui-gauge-FBZaUrBD.js +0 -738
  116. package/dist/vue-ui-gizmo-CDbPxUzE.js +0 -192
  117. package/dist/vue-ui-heatmap-DsDWxYOS.js +0 -877
  118. package/dist/vue-ui-history-plot-CzO1Z1FH.js +0 -924
  119. package/dist/vue-ui-molecule-Ddd3FgID.js +0 -597
  120. package/dist/vue-ui-mood-radar-24XAq8mg.js +0 -670
  121. package/dist/vue-ui-nested-donuts-DjWASp62.js +0 -1212
  122. package/dist/vue-ui-onion-B9thdF_c.js +0 -701
  123. package/dist/vue-ui-parallel-coordinate-plot-DT-GhOaA.js +0 -807
  124. package/dist/vue-ui-quick-chart-D0DukVN6.js +0 -1612
  125. package/dist/vue-ui-radar-DY8y6oRc.js +0 -741
  126. package/dist/vue-ui-relation-circle-8Gd7_fxt.js +0 -542
  127. package/dist/vue-ui-ridgeline-iPtG1McW.js +0 -969
  128. package/dist/vue-ui-rings-BXPo4MMo.js +0 -685
  129. package/dist/vue-ui-scatter-26d0eebx.js +0 -1045
  130. package/dist/vue-ui-spark-trend-Dt3ctzpl.js +0 -291
  131. package/dist/vue-ui-sparkbar-RrxErqrU.js +0 -301
  132. package/dist/vue-ui-sparkgauge-CyNi1b0O.js +0 -201
  133. package/dist/vue-ui-sparkhistogram-DPpZCPuE.js +0 -313
  134. package/dist/vue-ui-sparkline-BMjQ_uYx.js +0 -459
  135. package/dist/vue-ui-sparkstackbar-CjO8pfE-.js +0 -381
  136. package/dist/vue-ui-stackbar-wgyvMlE6.js +0 -1207
  137. package/dist/vue-ui-strip-plot-BF1o8lvY.js +0 -761
  138. package/dist/vue-ui-thermometer-CtuxuYVt.js +0 -495
  139. package/dist/vue-ui-tiremarks-DOwj4ZE-.js +0 -358
  140. package/dist/vue-ui-treemap-C4LtyFug.js +0 -965
  141. package/dist/vue-ui-waffle-D8mzGTeo.js +0 -863
  142. package/dist/vue-ui-wheel-C6uAotal.js +0 -352
  143. package/dist/vue-ui-word-cloud-Bge2211V.js +0 -659
  144. package/dist/vue-ui-xy-UzQacbnA.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-Cfm5-hMQ.js";
3
- import { u as ye } from "./useNestedProp-Hh7nGEjp.js";
4
- import { u as Ct } from "./usePrinter-B1Hgs47c.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-CgMUOQnb.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-CEDGlyKI.js")), we = p(() => import("./BaseIcon-BuOIF6t5.js")), Te = p(() => import("./DataTable-D36ZRtpU.js")), Oe = p(() => import("./PackageVersion-CGQlqnmq.js")), Pe = p(() => import("./PenAndPaper-B5slIHlh.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-P-1SRvsT.js")), Se = p(() => import("./Title-BSlAPr_H.js")), _e = p(() => import("./Tooltip-lPcsweXz.js")), Le = p(() => import("./UserOptions-Dn5TCQxg.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
- };