vue-data-ui 3.0.0-next.73 → 3.0.0-next.75
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.
- package/dist/{Arrow-DSSjD4Ff.js → Arrow-BwHd8_RD.js} +1 -1
- package/dist/{BaseDraggableDialog-B95qHlBZ.js → BaseDraggableDialog-KQBTblkY.js} +2 -2
- package/dist/{BaseIcon-D4UMFIS-.js → BaseIcon-DtvtEJ1c.js} +1 -1
- package/dist/{ColorPicker-DFI3NleD.js → ColorPicker-hzwy_EBE.js} +2 -2
- package/dist/{DataTable-CMMsXA0n.js → DataTable-B8A2TrM1.js} +2 -2
- package/dist/{Legend-C5UNFNQQ.js → Legend-BEYv5Hve.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DAR9-Zzo.js → NonSvgPenAndPaper-BbMZSi-f.js} +3 -3
- package/dist/{PackageVersion-B1daxzGa.js → PackageVersion-BcbUFlxz.js} +1 -1
- package/dist/{PenAndPaper-CBpnHUIk.js → PenAndPaper-BrZJq3JM.js} +32 -32
- package/dist/{RecursiveCircles-Dn3TGoL6.js → RecursiveCircles-BcLb1aRS.js} +15 -13
- package/dist/RecursiveLabels-Bgcv0pzu.js +50 -0
- package/dist/{RecursiveLinks-ld_gDZH4.js → RecursiveLinks-00zGWPf9.js} +20 -18
- package/dist/{Shape-BselAAXg.js → Shape-DMT7NFaa.js} +1 -1
- package/dist/{Slicer-D3DQKDKt.js → Slicer-CT611t-v.js} +2 -2
- package/dist/{SparkTooltip-Bp_VDs91.js → SparkTooltip-67k4zx5c.js} +1 -1
- package/dist/{Title-CP3JSAsP.js → Title-F9zfAAgU.js} +1 -1
- package/dist/{Tooltip-H-ElnGwO.js → Tooltip-B68QOkdx.js} +1 -1
- package/dist/{UserOptions-HpTycUgM.js → UserOptions-Cbl4nxZJ.js} +2 -2
- package/dist/{dom-to-png-CfQgUFBr.js → dom-to-png-DeGmdRyf.js} +1 -1
- package/dist/{img-Bim7Y1-m.js → img-Cr2U0nLE.js} +1 -1
- package/dist/{index-yC6NjpP_.js → index-DRwxHhnC.js} +862 -778
- package/dist/{pdf-DiKUcI4N.js → pdf-Cz5CkYwk.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +60 -13
- package/dist/types/vue-data-ui.d.ts +60 -13
- package/dist/{useAutoSizeLabelsInsideViewbox-CZnSPf_C.js → useAutoSizeLabelsInsideViewbox-CjmXpH45.js} +1 -1
- package/dist/{useNestedProp-CF55-wsO.js → useNestedProp-8MTWT4Pg.js} +1 -1
- package/dist/{usePrinter-DC8yU0M6.js → usePrinter-DKX-yL5f.js} +2 -2
- package/dist/{vue-data-ui-D0AafFtx.js → vue-data-ui-BW0lzlcM.js} +64 -64
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CvHFid3D.js → vue-ui-3d-bar-j9D43HWL.js} +6 -6
- package/dist/{vue-ui-accordion-D1RDCQOF.js → vue-ui-accordion-D0325Yrd.js} +3 -3
- package/dist/{vue-ui-age-pyramid-BdyLeyYg.js → vue-ui-age-pyramid-dP_NW2kL.js} +59 -58
- package/dist/{vue-ui-annotator-C_bRFtcX.js → vue-ui-annotator-Bw2g8LOg.js} +2 -2
- package/dist/{vue-ui-bullet-DZUwoLaN.js → vue-ui-bullet-BqVlxHYT.js} +7 -7
- package/dist/{vue-ui-candlestick-CS7PhJFI.js → vue-ui-candlestick-CKCagj01.js} +96 -95
- package/dist/{vue-ui-carousel-table-BALWOIi7.js → vue-ui-carousel-table-QRNV-0VC.js} +4 -4
- package/dist/{vue-ui-chestnut-ofw7Kv6_.js → vue-ui-chestnut-BdIgibam.js} +5 -5
- package/dist/{vue-ui-chord-D4COvMcc.js → vue-ui-chord-Dw-UF4RX.js} +8 -8
- package/dist/{vue-ui-circle-pack-CN8Y_fbd.js → vue-ui-circle-pack-ImYIQP8V.js} +6 -6
- package/dist/{vue-ui-cursor-BZzYhn1r.js → vue-ui-cursor-BIQkbYQz.js} +2 -2
- package/dist/{vue-ui-dashboard-CL15hNdX.js → vue-ui-dashboard-CAFip_uX.js} +62 -62
- package/dist/{vue-ui-digits-BNgAR6Ty.js → vue-ui-digits-BMEUuWRr.js} +2 -2
- package/dist/{vue-ui-donut-vjWFIVVT.js → vue-ui-donut-K3f5Dqve.js} +8 -8
- package/dist/{vue-ui-donut-evolution-BGmV-HK9.js → vue-ui-donut-evolution-B5FbgGlB.js} +12 -11
- package/dist/{vue-ui-dumbbell-0XOfrNz5.js → vue-ui-dumbbell-CwiKlghV.js} +11 -10
- package/dist/{vue-ui-flow-Br-wzIvL.js → vue-ui-flow-CCoZD3YV.js} +7 -7
- package/dist/{vue-ui-funnel-DzedRSBG.js → vue-ui-funnel-Gk5bNkol.js} +6 -6
- package/dist/{vue-ui-galaxy-CZ_yUdUc.js → vue-ui-galaxy-BhYH8-mt.js} +5 -5
- package/dist/{vue-ui-gauge-uy-r5_ts.js → vue-ui-gauge-DR_nvYW0.js} +7 -7
- package/dist/{vue-ui-gizmo-BQhw5JEa.js → vue-ui-gizmo-D1CUaofC.js} +3 -3
- package/dist/{vue-ui-heatmap-Cp9MFC-v.js → vue-ui-heatmap-Xnjj2b1_.js} +13 -13
- package/dist/{vue-ui-history-plot-Cf5Jb5bh.js → vue-ui-history-plot-CuEE88nq.js} +38 -37
- package/dist/{vue-ui-kpi-Y1hL7GmA.js → vue-ui-kpi-Br-BibKH.js} +3 -3
- package/dist/{vue-ui-mini-loader-CtyAttV-.js → vue-ui-mini-loader-DmGFQW5A.js} +2 -2
- package/dist/vue-ui-molecule-BjQ7idOR.js +656 -0
- package/dist/{vue-ui-mood-radar-BWzqpz-S.js → vue-ui-mood-radar-CIwcZNTV.js} +7 -7
- package/dist/{vue-ui-nested-donuts-CDpwfAN2.js → vue-ui-nested-donuts-Dw1U6JuY.js} +9 -9
- package/dist/{vue-ui-onion-DyKREw1v.js → vue-ui-onion-CUQ5JreB.js} +8 -8
- package/dist/{vue-ui-parallel-coordinate-plot-DNXNpjFr.js → vue-ui-parallel-coordinate-plot-D3kyw1a6.js} +38 -37
- package/dist/{vue-ui-quadrant-CYBYnBGc.js → vue-ui-quadrant-CA_Mh9QR.js} +8 -8
- package/dist/{vue-ui-quick-chart-BjdF07yD.js → vue-ui-quick-chart-BUoQKWPQ.js} +72 -71
- package/dist/{vue-ui-radar-Di-SJYfb.js → vue-ui-radar-D2SghfL3.js} +8 -8
- package/dist/{vue-ui-rating-CU8NifYD.js → vue-ui-rating-C9oYMQRo.js} +2 -2
- package/dist/{vue-ui-relation-circle-CAOK7rm3.js → vue-ui-relation-circle-Ds5Gybt6.js} +7 -7
- package/dist/{vue-ui-ridgeline-GPu2Vvus.js → vue-ui-ridgeline-Dkn2NjuC.js} +16 -12
- package/dist/{vue-ui-rings-BdiWrA9u.js → vue-ui-rings-BmJDXPg9.js} +8 -8
- package/dist/{vue-ui-scatter-DDkfRnEn.js → vue-ui-scatter-ovPHb3RJ.js} +8 -8
- package/dist/{vue-ui-skeleton-B-hXFx8d.js → vue-ui-skeleton-ZrzdjEiG.js} +3 -3
- package/dist/{vue-ui-smiley-BVY3aoLN.js → vue-ui-smiley-Dc580yLr.js} +2 -2
- package/dist/{vue-ui-spark-trend-9iJOtdiO.js → vue-ui-spark-trend-CJAm5oNp.js} +3 -3
- package/dist/{vue-ui-sparkbar-BUwb_Cai.js → vue-ui-sparkbar-C-K6vOJc.js} +3 -3
- package/dist/{vue-ui-sparkgauge-zAH9pBNs.js → vue-ui-sparkgauge-DtBsUB6l.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-DJNIVe8_.js → vue-ui-sparkhistogram-1A-UVZ1X.js} +4 -4
- package/dist/{vue-ui-sparkline-CLNGpAWN.js → vue-ui-sparkline-BJCBmtYN.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-BaBWSDJQ.js → vue-ui-sparkstackbar-D3yEWDpd.js} +3 -3
- package/dist/{vue-ui-stackbar-BeYObYAK.js → vue-ui-stackbar-B_u2bU2k.js} +13 -12
- package/dist/{vue-ui-strip-plot-Bx_gFqdA.js → vue-ui-strip-plot-B2erBLNX.js} +11 -10
- package/dist/{vue-ui-table-BYck0KzF.js → vue-ui-table-CdRtegHC.js} +3 -3
- package/dist/{vue-ui-table-heatmap-Bzmq-Cuf.js → vue-ui-table-heatmap-tn4JSmq5.js} +5 -5
- package/dist/{vue-ui-table-sparkline-C3hqLejN.js → vue-ui-table-sparkline-y9McUHwt.js} +4 -4
- package/dist/{vue-ui-thermometer-D-T8l96n.js → vue-ui-thermometer-CuXs-sfl.js} +7 -7
- package/dist/{vue-ui-timer-Cemsg65D.js → vue-ui-timer-BkkUQrej.js} +5 -5
- package/dist/{vue-ui-tiremarks-Vpcrptou.js → vue-ui-tiremarks-tZzY1FE6.js} +6 -6
- package/dist/{vue-ui-treemap-pDBDb6YS.js → vue-ui-treemap-B3i7f6Tl.js} +8 -8
- package/dist/{vue-ui-vertical-bar-c3bZjEFp.js → vue-ui-vertical-bar-CLfMz3aJ.js} +9 -9
- package/dist/{vue-ui-waffle-BraVnSOA.js → vue-ui-waffle-BZTtHVM8.js} +8 -8
- package/dist/{vue-ui-wheel-C4nBwldq.js → vue-ui-wheel-V8_HgtK2.js} +6 -6
- package/dist/{vue-ui-word-cloud-CrUAfQVc.js → vue-ui-word-cloud-BO1aQiDm.js} +6 -6
- package/dist/{vue-ui-world-CBvxCA9O.js → vue-ui-world-B7pMvuOq.js} +6 -6
- package/dist/{vue-ui-xy-CvjDEG3I.js → vue-ui-xy-CUSoIaeT.js} +13 -12
- package/dist/{vue-ui-xy-canvas-BQvj0rhW.js → vue-ui-xy-canvas-C-73QYfd.js} +8 -8
- package/package.json +1 -1
- package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
- package/dist/vue-ui-molecule-CMIkxVGa.js +0 -599
|
@@ -1,599 +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, f as ut, c as fe, a as ct, p as ge, b as dt, d as vt, Q as ht, X as pt, l as ft, R as gt, e as me, v as mt, w as yt, y as bt, z as kt } from "./index-yC6NjpP_.js";
|
|
3
|
-
import { u as ye } from "./useNestedProp-CF55-wsO.js";
|
|
4
|
-
import { u as Ct } from "./usePrinter-DC8yU0M6.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-BVca3eMk.js";
|
|
8
|
-
import Ot from "./img-Bim7Y1-m.js";
|
|
9
|
-
import { _ as Pt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
-
const At = ["id"], Ft = {
|
|
11
|
-
key: 1,
|
|
12
|
-
ref: "noTitle",
|
|
13
|
-
class: "vue-data-ui-no-title-space",
|
|
14
|
-
style: "height:36px; width: 100%;background:transparent"
|
|
15
|
-
}, It = {
|
|
16
|
-
key: 2,
|
|
17
|
-
style: "width:100%;background:transparent;"
|
|
18
|
-
}, Nt = ["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"], zt = {
|
|
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
|
-
"69f7b946": t.slicerColor
|
|
49
|
-
}));
|
|
50
|
-
const $e = p(() => import("./vue-ui-accordion-D1RDCQOF.js")), we = p(() => import("./BaseIcon-D4UMFIS-.js")), Te = p(() => import("./DataTable-CMMsXA0n.js")), Oe = p(() => import("./PackageVersion-B1daxzGa.js")), Pe = p(() => import("./PenAndPaper-CBpnHUIk.js")), Ae = p(() => import("./RecursiveCircles-Dn3TGoL6.js")), Fe = p(() => import("./RecursiveLabels-NTMB9w5C.js")), Ie = p(() => import("./RecursiveLinks-ld_gDZH4.js")), Ne = p(() => import("./vue-ui-skeleton-B-hXFx8d.js")), Se = p(() => import("./Title-CP3JSAsP.js")), _e = p(() => import("./Tooltip-H-ElnGwO.js")), Le = p(() => import("./UserOptions-HpTycUgM.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: z, setUserOptionsVisibility: Z, keepUserOptionState: Q } = $t({ config: e.value }), { svgRef: x } = 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(), z.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 ze() {
|
|
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(ze());
|
|
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 xe(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(() => xe(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), F = c(null);
|
|
177
|
-
function Ge(t) {
|
|
178
|
-
se.value = t, t ? (E.value = !0, Ve(t), F.value = t.uid) : (E.value = !1, D.value = "", F.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 I = c(!1);
|
|
241
|
-
function ne(t) {
|
|
242
|
-
I.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 N = c(!1);
|
|
254
|
-
function V() {
|
|
255
|
-
N.value = !N.value;
|
|
256
|
-
}
|
|
257
|
-
const je = k(() => !N.value), { viewBox: B, resetZoom: ce, isZoom: Ye } = Tt(x, {
|
|
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 ${I.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, F.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(x),
|
|
303
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
304
|
-
color: e.value.style.chart.color,
|
|
305
|
-
active: N.value,
|
|
306
|
-
onClose: V
|
|
307
|
-
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : f("", !0),
|
|
308
|
-
Ue.value ? (i(), y("div", Ft, null, 512)) : f("", !0),
|
|
309
|
-
e.value.style.chart.title.text ? (i(), y("div", It, [
|
|
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(z)) ? (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: N.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(z) ? "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: x,
|
|
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": I.value, "vue-data-ui-fulscreen--off": !I.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(Ie), {
|
|
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: F.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(Fe), {
|
|
484
|
-
key: 1,
|
|
485
|
-
dataset: b.value,
|
|
486
|
-
color: e.value.style.chart.color,
|
|
487
|
-
hoveredUid: F.value
|
|
488
|
-
}, null, 8, ["dataset", "color", "hoveredUid"])) : f("", !0),
|
|
489
|
-
u(t.$slots, "svg", { svg: v.value }, void 0, !0)
|
|
490
|
-
], 14, Nt)) : 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(Ne), {
|
|
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: I.value,
|
|
542
|
-
isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function",
|
|
543
|
-
smooth: e.value.style.chart.tooltip.smooth,
|
|
544
|
-
backdropFilter: e.value.style.chart.tooltip.backdropFilter
|
|
545
|
-
}, {
|
|
546
|
-
"tooltip-before": d(() => [
|
|
547
|
-
u(t.$slots, "tooltip-before", w(T({ ...H.value })), void 0, !0)
|
|
548
|
-
]),
|
|
549
|
-
"tooltip-after": d(() => [
|
|
550
|
-
u(t.$slots, "tooltip-after", w(T({ ...H.value })), void 0, !0)
|
|
551
|
-
]),
|
|
552
|
-
_: 3
|
|
553
|
-
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
|
|
554
|
-
L.value ? (i(), $(s($e), {
|
|
555
|
-
key: 9,
|
|
556
|
-
hideDetails: "",
|
|
557
|
-
config: {
|
|
558
|
-
open: h.value.showTable,
|
|
559
|
-
maxHeight: 1e4,
|
|
560
|
-
body: {
|
|
561
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
562
|
-
color: e.value.style.chart.color
|
|
563
|
-
},
|
|
564
|
-
head: {
|
|
565
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
566
|
-
color: e.value.style.chart.color
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
}, {
|
|
570
|
-
content: d(() => [
|
|
571
|
-
(i(), $(s(Te), {
|
|
572
|
-
key: `table_${Y.value}`,
|
|
573
|
-
colNames: P.value.colNames,
|
|
574
|
-
head: P.value.head,
|
|
575
|
-
body: P.value.body,
|
|
576
|
-
config: P.value.config,
|
|
577
|
-
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
578
|
-
onClose: l[1] || (l[1] = (o) => h.value.showTable = !1)
|
|
579
|
-
}, {
|
|
580
|
-
th: d(({ th: o }) => [
|
|
581
|
-
_("div", {
|
|
582
|
-
innerHTML: o,
|
|
583
|
-
style: { display: "flex", "align-items": "center" }
|
|
584
|
-
}, null, 8, Et)
|
|
585
|
-
]),
|
|
586
|
-
td: d(({ td: o }) => [
|
|
587
|
-
st(at(o.name || o), 1)
|
|
588
|
-
]),
|
|
589
|
-
_: 1
|
|
590
|
-
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
591
|
-
]),
|
|
592
|
-
_: 1
|
|
593
|
-
}, 8, ["config"])) : f("", !0)
|
|
594
|
-
], 46, At));
|
|
595
|
-
}
|
|
596
|
-
}, Zt = /* @__PURE__ */ Pt(zt, [["__scopeId", "data-v-2630765e"]]);
|
|
597
|
-
export {
|
|
598
|
-
Zt as default
|
|
599
|
-
};
|