vue-data-ui 3.0.0-next.7 → 3.0.0-next.71
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-Bl8urcli.js → Arrow-BZNpld6u.js} +1 -1
- package/dist/{BaseDraggableDialog-CyhpaZU5.js → BaseDraggableDialog-kg-eVvXZ.js} +2 -2
- package/dist/{BaseIcon-BCZfTCeM.js → BaseIcon-BdOEhJar.js} +1 -1
- package/dist/{ColorPicker-CSJf42vx.js → ColorPicker-CWvXlPxS.js} +2 -2
- package/dist/{DataTable-mQ6Wd-rR.js → DataTable-B3yakHEM.js} +2 -2
- package/dist/{Legend-B2hrDh4G.js → Legend-DiGLrlzP.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DQ8KsK4W.js → NonSvgPenAndPaper-C-ZjpJQd.js} +3 -3
- package/dist/{PackageVersion-CeEYZfaH.js → PackageVersion-6s4eI8W7.js} +1 -1
- package/dist/{PenAndPaper-DhSxfUrQ.js → PenAndPaper-JoUN7Ink.js} +3 -3
- package/dist/{Shape-C2qH26wh.js → Shape-CWIa2nta.js} +43 -37
- package/dist/Slicer-DYuvPkEM.js +602 -0
- package/dist/{SparkTooltip-BcHgW6YX.js → SparkTooltip-C_fUmbP7.js} +1 -1
- package/dist/{Title-B7Xb3YuE.js → Title-VLWyIYrj.js} +1 -1
- package/dist/{Tooltip-BidRoM5E.js → Tooltip-BS5naLS2.js} +23 -19
- package/dist/{UserOptions-0tvMM8PF.js → UserOptions-BV_xM-sB.js} +2 -2
- package/dist/{dom-to-png-CTrlbKHr.js → dom-to-png-PUk0ukSG.js} +1 -1
- package/dist/{img-D72yZNUg.js → img-DD_2wgY3.js} +1 -1
- package/dist/{index-Cg-RjxqH.js → index-DKpp7RIH.js} +2236 -1505
- package/dist/{pdf-DgX01_wu.js → pdf-0TQQyXWM.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +610 -22
- package/dist/types/vue-data-ui.d.ts +610 -22
- package/dist/useAutoSizeLabelsInsideViewbox-Qhry5WvH.js +81 -0
- package/dist/useFitSvgText-2crs6Fv5.js +69 -0
- package/dist/useLoading-D7YHNtLX.js +29 -0
- package/dist/useNestedProp-D-8c0o4p.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-BUzmyQf9.js → usePrinter-NUeckmCX.js} +2 -2
- package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
- package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
- package/dist/{vue-data-ui-DpO93ey5.js → vue-data-ui-BIXXEsFZ.js} +105 -100
- package/dist/vue-data-ui.js +23 -22
- package/dist/vue-ui-3d-bar-CVUfj12F.js +1323 -0
- package/dist/{vue-ui-accordion-CRomxzaL.js → vue-ui-accordion-Cpovz3RE.js} +3 -3
- package/dist/vue-ui-age-pyramid-CQWFaHLV.js +834 -0
- package/dist/{vue-ui-annotator-BAOxPiFx.js → vue-ui-annotator-C49Xw5Mh.js} +2 -2
- package/dist/vue-ui-bullet-DED2SuIa.js +571 -0
- package/dist/vue-ui-candlestick-DGgbevy6.js +999 -0
- package/dist/{vue-ui-carousel-table-DVGlPZIa.js → vue-ui-carousel-table-DKIgSB1T.js} +29 -29
- package/dist/{vue-ui-chestnut-P1v4ffD0.js → vue-ui-chestnut-D1bEM91d.js} +5 -5
- package/dist/vue-ui-chord-CBLSqtEP.js +1038 -0
- package/dist/{vue-ui-circle-pack-FXmemXgl.js → vue-ui-circle-pack-g2ts9NTG.js} +24 -24
- package/dist/{vue-ui-cursor-CdvMgIrP.js → vue-ui-cursor-DSxmPUD8.js} +2 -2
- package/dist/{vue-ui-dashboard-Vke0452J.js → vue-ui-dashboard-B6FfoNjQ.js} +62 -62
- package/dist/{vue-ui-digits-BVhyYqCs.js → vue-ui-digits-DKffQVgr.js} +2 -2
- package/dist/{vue-ui-donut-BpIivKcf.js → vue-ui-donut-CJrWc4-g.js} +320 -308
- package/dist/vue-ui-donut-evolution-Bys6cs-D.js +1075 -0
- package/dist/vue-ui-dumbbell-Cb_I__qC.js +1119 -0
- package/dist/vue-ui-flow-BzuT3ij5.js +841 -0
- package/dist/{vue-ui-funnel-BbFmbsft.js → vue-ui-funnel-Ctp7GDiN.js} +16 -16
- package/dist/vue-ui-galaxy-CRBy0aio.js +680 -0
- package/dist/vue-ui-gauge-NcQq5UFr.js +791 -0
- package/dist/vue-ui-gizmo-Cwfb8c-0.js +210 -0
- package/dist/vue-ui-heatmap-DElqpFVY.js +1078 -0
- package/dist/vue-ui-history-plot-De1Dvnhw.js +1073 -0
- package/dist/{vue-ui-kpi-jN_yMnLj.js → vue-ui-kpi-_bLScmgO.js} +26 -26
- package/dist/{vue-ui-mini-loader-rYr76x8g.js → vue-ui-mini-loader-PsHE_2Wy.js} +2 -2
- package/dist/{vue-ui-molecule-BWZHOQLi.js → vue-ui-molecule-CgiahnC6.js} +53 -51
- package/dist/vue-ui-mood-radar-dXVOOrhl.js +785 -0
- package/dist/vue-ui-nested-donuts-C0X6BetT.js +1286 -0
- package/dist/vue-ui-onion-C7sxQzk_.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-jwtnNX59.js +915 -0
- package/dist/{vue-ui-quadrant-BFFzfDw3.js → vue-ui-quadrant-DguDE91h.js} +512 -459
- package/dist/vue-ui-quick-chart-BpEDS08U.js +1761 -0
- package/dist/vue-ui-radar-lFrqTRqo.js +796 -0
- package/dist/{vue-ui-rating-BAauyqTn.js → vue-ui-rating-BHghXziv.js} +2 -2
- package/dist/vue-ui-relation-circle-C5W6NFOb.js +598 -0
- package/dist/vue-ui-ridgeline-A2DuFEDS.js +1153 -0
- package/dist/vue-ui-rings-BgJAm9_b.js +728 -0
- package/dist/vue-ui-scatter-COfpLChz.js +1178 -0
- package/dist/{vue-ui-skeleton-CUOhCY4p.js → vue-ui-skeleton-DMLCBUtZ.js} +3 -3
- package/dist/{vue-ui-smiley-B6SqWMov.js → vue-ui-smiley-ZopESYc_.js} +26 -26
- package/dist/vue-ui-spark-trend-CuSQ03fQ.js +315 -0
- package/dist/vue-ui-sparkbar-BCsX9M4q.js +351 -0
- package/dist/vue-ui-sparkgauge-DdyZLA0T.js +232 -0
- package/dist/vue-ui-sparkhistogram-CUxFgIcE.js +380 -0
- package/dist/vue-ui-sparkline-DOkofsLL.js +489 -0
- package/dist/vue-ui-sparkstackbar-Bq9PZzmH.js +421 -0
- package/dist/vue-ui-stackbar-B7ceoT0V.js +1370 -0
- package/dist/vue-ui-strip-plot-DYh-NGQN.js +915 -0
- package/dist/{vue-ui-table-heatmap-DazTE3fa.js → vue-ui-table-heatmap-BVTb1xuA.js} +5 -5
- package/dist/{vue-ui-table-Dwjl3L0p.js → vue-ui-table-pESH5KAJ.js} +11 -11
- package/dist/{vue-ui-table-sparkline-BXMPUEpN.js → vue-ui-table-sparkline-Bw-6l9lA.js} +14 -14
- package/dist/vue-ui-thermometer-BqqfmS-B.js +541 -0
- package/dist/{vue-ui-timer-yLvNAZL_.js → vue-ui-timer-CVisMxLS.js} +5 -5
- package/dist/vue-ui-tiremarks-K1dcCdpj.js +406 -0
- package/dist/vue-ui-treemap-Bz3c68s4.js +1035 -0
- package/dist/{vue-ui-vertical-bar-BrYCoVym.js → vue-ui-vertical-bar-BvtXpCjw.js} +71 -69
- package/dist/vue-ui-waffle-CYO7bIf1.js +910 -0
- package/dist/vue-ui-wheel-De1spwLh.js +379 -0
- package/dist/vue-ui-word-cloud-BMmVrx_T.js +765 -0
- package/dist/{vue-ui-world-B4Dqrk4l.js → vue-ui-world-Ccpr00nJ.js} +11 -9
- package/dist/vue-ui-xy-D4jaRKe3.js +3771 -0
- package/dist/{vue-ui-xy-canvas-D7fL36kT.js → vue-ui-xy-canvas-DE-Uu5oq.js} +265 -264
- package/package.json +1 -1
- package/dist/Slicer-BD8Z8VCW.js +0 -577
- package/dist/useLoading-Bt5Doa8m.js +0 -28
- package/dist/useNestedProp-C_G5E08Y.js +0 -13
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-3d-bar-D8imUwEz.js +0 -1227
- package/dist/vue-ui-age-pyramid-CV7gtFOC.js +0 -746
- package/dist/vue-ui-bullet-BtuMMBF7.js +0 -513
- package/dist/vue-ui-candlestick-BsRtXKrv.js +0 -873
- package/dist/vue-ui-chord-CIuzYmpM.js +0 -949
- package/dist/vue-ui-donut-evolution-BRlsCA4U.js +0 -903
- package/dist/vue-ui-dumbbell-D87Dumjh.js +0 -753
- package/dist/vue-ui-flow-D_L_xssL.js +0 -765
- package/dist/vue-ui-galaxy-Cn6vHbaw.js +0 -617
- package/dist/vue-ui-gauge-Ds4terqY.js +0 -738
- package/dist/vue-ui-gizmo-BTncpI62.js +0 -192
- package/dist/vue-ui-heatmap-B6GpjeWC.js +0 -877
- package/dist/vue-ui-history-plot-DTDzEeGq.js +0 -924
- package/dist/vue-ui-mood-radar-CPfS6f1L.js +0 -670
- package/dist/vue-ui-nested-donuts-Bsd2kGoJ.js +0 -1177
- package/dist/vue-ui-onion-BQ4nISXW.js +0 -701
- package/dist/vue-ui-parallel-coordinate-plot-BoHgVgbn.js +0 -807
- package/dist/vue-ui-quick-chart-oNMTeOAL.js +0 -1612
- package/dist/vue-ui-radar-98mXFZe-.js +0 -741
- package/dist/vue-ui-relation-circle-6oDCSxkO.js +0 -542
- package/dist/vue-ui-ridgeline-CugMGjOU.js +0 -969
- package/dist/vue-ui-rings-bsGXaD2m.js +0 -685
- package/dist/vue-ui-scatter-7ssLliGg.js +0 -1045
- package/dist/vue-ui-spark-trend-jauInkkN.js +0 -291
- package/dist/vue-ui-sparkbar-DXByIxQH.js +0 -301
- package/dist/vue-ui-sparkgauge-BMrV2gDi.js +0 -201
- package/dist/vue-ui-sparkhistogram-CoNM4G7o.js +0 -313
- package/dist/vue-ui-sparkline-DrN3_wS0.js +0 -459
- package/dist/vue-ui-sparkstackbar-W1a0JQi9.js +0 -381
- package/dist/vue-ui-stackbar-D1-gbUgE.js +0 -1207
- package/dist/vue-ui-strip-plot-KhfvrVuN.js +0 -761
- package/dist/vue-ui-thermometer-Cn6lJRs3.js +0 -495
- package/dist/vue-ui-tiremarks-BYsWePfK.js +0 -358
- package/dist/vue-ui-treemap-Ce7RVFG3.js +0 -965
- package/dist/vue-ui-waffle-CCrR2T1G.js +0 -863
- package/dist/vue-ui-wheel-BuxjnrDN.js +0 -352
- package/dist/vue-ui-word-cloud-C6fawHJE.js +0 -659
- package/dist/vue-ui-xy-ubRnv9iJ.js +0 -2980
|
@@ -1,765 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent as E, computed as p, onMounted as it, ref as y, watch as ct, createElementBlock as g, openBlock as d, unref as r, normalizeStyle as L, normalizeClass as He, createBlock as R, createCommentVNode as _, createElementVNode as D, createVNode as de, createSlots as dt, withCtx as w, renderSlot as b, normalizeProps as U, guardReactiveProps as V, Fragment as W, renderList as j, toDisplayString as X, createTextVNode as vt, nextTick as ft } from "vue";
|
|
2
|
-
import { u as ht, o as pt, e as gt, c as ve, t as mt, p as S, a as yt, b as bt, v as $, d as kt, f as q, X as Ct, F as Ye, L as wt, i as fe, q as $t, r as xt, x as Tt } from "./index-Cg-RjxqH.js";
|
|
3
|
-
import { u as Be } from "./useNestedProp-C_G5E08Y.js";
|
|
4
|
-
import { u as _t } from "./usePrinter-BUzmyQf9.js";
|
|
5
|
-
import { u as Nt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
6
|
-
import { u as Ot } from "./useChartAccessibility-9icAAmYg.js";
|
|
7
|
-
import St from "./Legend-B2hrDh4G.js";
|
|
8
|
-
import Ft from "./Title-B7Xb3YuE.js";
|
|
9
|
-
import Pt from "./img-D72yZNUg.js";
|
|
10
|
-
import { _ as Lt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
-
const It = ["id"], At = {
|
|
12
|
-
key: 1,
|
|
13
|
-
ref: "noTitle",
|
|
14
|
-
class: "vue-data-ui-no-title-space",
|
|
15
|
-
style: "height:36px; width: 100%;background:transparent"
|
|
16
|
-
}, Et = {
|
|
17
|
-
key: 2,
|
|
18
|
-
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
19
|
-
}, zt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ht = ["id"], Yt = ["stop-color"], Bt = ["stop-color"], Rt = ["d", "fill", "stroke", "stroke-width"], Dt = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "onMouseenter"], Ut = ["x", "y", "font-size", "fill"], Vt = ["x", "y", "font-size", "fill"], Gt = {
|
|
20
|
-
key: 4,
|
|
21
|
-
class: "vue-data-ui-watermark"
|
|
22
|
-
}, Wt = ["onClick"], jt = {
|
|
23
|
-
key: 6,
|
|
24
|
-
ref: "source",
|
|
25
|
-
dir: "auto"
|
|
26
|
-
}, Xt = ["innerHTML"], qt = {
|
|
27
|
-
__name: "vue-ui-flow",
|
|
28
|
-
props: {
|
|
29
|
-
config: {
|
|
30
|
-
type: Object,
|
|
31
|
-
default() {
|
|
32
|
-
return {};
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
dataset: {
|
|
36
|
-
type: Array,
|
|
37
|
-
default() {
|
|
38
|
-
return [];
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
setup(Re, { expose: De }) {
|
|
43
|
-
const Ue = E(() => import("./vue-ui-accordion-CRomxzaL.js")), Ve = E(() => import("./DataTable-mQ6Wd-rR.js")), Ge = E(() => import("./PackageVersion-CeEYZfaH.js")), We = E(() => import("./PenAndPaper-DhSxfUrQ.js")), je = E(() => import("./vue-ui-skeleton-CUOhCY4p.js")), Xe = E(() => import("./Tooltip-BidRoM5E.js")), qe = E(() => import("./UserOptions-0tvMM8PF.js")), { vue_ui_flow: Ze } = ht(), x = Re, te = p(() => !!x.dataset && x.dataset.length);
|
|
44
|
-
it(() => {
|
|
45
|
-
he();
|
|
46
|
-
});
|
|
47
|
-
function he() {
|
|
48
|
-
pt(x.dataset) && gt({
|
|
49
|
-
componentName: "VueUiFlow",
|
|
50
|
-
type: "dataset"
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
const oe = y(ve()), z = y(null), pe = y(0), ge = y(0), le = y(!1), ae = y(""), Je = y(null), M = y(!1);
|
|
54
|
-
function me(t) {
|
|
55
|
-
M.value = t, pe.value += 1;
|
|
56
|
-
}
|
|
57
|
-
const e = p({
|
|
58
|
-
get: () => Ce(),
|
|
59
|
-
set: (t) => t
|
|
60
|
-
}), { userOptionsVisible: ne, setUserOptionsVisibility: ye, keepUserOptionState: be } = Nt({ config: e.value }), { svgRef: ke } = Ot({
|
|
61
|
-
config: e.value.style.chart.title
|
|
62
|
-
});
|
|
63
|
-
function Ce() {
|
|
64
|
-
const t = Be({
|
|
65
|
-
userConfig: x.config,
|
|
66
|
-
defaultConfig: Ze
|
|
67
|
-
});
|
|
68
|
-
let l = t;
|
|
69
|
-
return t.theme ? l = {
|
|
70
|
-
...Be({
|
|
71
|
-
userConfig: yt.vue_ui_flow[t.theme] || x.config,
|
|
72
|
-
defaultConfig: t
|
|
73
|
-
}),
|
|
74
|
-
customPalette: mt[t.theme] || S
|
|
75
|
-
} : l = t, l.nodeCategories = x.config.nodeCategories || {}, l.nodeCategoryColors = x.config.nodeCategoryColors || {}, l;
|
|
76
|
-
}
|
|
77
|
-
ct(
|
|
78
|
-
() => x.config,
|
|
79
|
-
(t) => {
|
|
80
|
-
e.value = Ce(), ne.value = !e.value.userOptions.showOnChartHover, he(), ge.value += 1, N.value.showTable = e.value.table.show;
|
|
81
|
-
},
|
|
82
|
-
{ deep: !0 }
|
|
83
|
-
);
|
|
84
|
-
const { isPrinting: we, isImaging: $e, generatePdf: xe, generateImage: Te } = _t({
|
|
85
|
-
elementId: `flow_${oe.value}`,
|
|
86
|
-
fileName: e.value.style.chart.title.text || "vue-ui-flow",
|
|
87
|
-
options: e.value.userOptions.print
|
|
88
|
-
}), Ke = p(() => e.value.userOptions.show && !e.value.style.chart.title.text), Z = p(() => bt(e.value.customPalette)), _e = p(() => e.value.style.chart.nodes.gap), H = p(() => e.value.style.chart.nodes.width), N = y({
|
|
89
|
-
showTable: e.value.table.show,
|
|
90
|
-
showTooltip: e.value.style.chart.tooltip.show
|
|
91
|
-
}), Qe = p(() => e.value.style.chart.links.width), se = p(() => !x.dataset || !x.dataset.length ? [] : x.dataset.map((t, l) => [
|
|
92
|
-
t[0],
|
|
93
|
-
t[1],
|
|
94
|
-
$(t[2]),
|
|
95
|
-
t[3] ? kt(t[3]) : Z.value[l] || Z.value[l % Z.value.length] || S[l] || S[l % S.length]
|
|
96
|
-
])), Ne = p(() => {
|
|
97
|
-
const t = {};
|
|
98
|
-
function l(a) {
|
|
99
|
-
t[a] || (t[a] = { inflow: 0, outflow: 0 });
|
|
100
|
-
}
|
|
101
|
-
se.value.forEach(([a, s, f]) => {
|
|
102
|
-
l(a), l(s), t[a].outflow += f, t[s].inflow += f;
|
|
103
|
-
});
|
|
104
|
-
let o = 0;
|
|
105
|
-
for (const a in t) {
|
|
106
|
-
const s = Math.max(t[a].inflow, t[a].outflow);
|
|
107
|
-
o = Math.max(o, s);
|
|
108
|
-
}
|
|
109
|
-
return o;
|
|
110
|
-
});
|
|
111
|
-
function et(t) {
|
|
112
|
-
return t / Ne.value * 100 + e.value.style.chart.nodes.minHeight;
|
|
113
|
-
}
|
|
114
|
-
function tt(t) {
|
|
115
|
-
const l = e.value.style.chart.nodes.minHeight;
|
|
116
|
-
return (t - l) / 100 * Ne.value;
|
|
117
|
-
}
|
|
118
|
-
function ot(t) {
|
|
119
|
-
const l = {}, o = {};
|
|
120
|
-
function a(n, u) {
|
|
121
|
-
l[n] || (l[n] = {
|
|
122
|
-
height: 0,
|
|
123
|
-
level: null,
|
|
124
|
-
inflow: 0,
|
|
125
|
-
outflow: 0,
|
|
126
|
-
uid: ve()
|
|
127
|
-
}), l[n].level === null && (l[n].level = u), o[u] || (o[u] = []), o[u].includes(n) || o[u].push(n);
|
|
128
|
-
}
|
|
129
|
-
t.forEach(([n, u, c]) => {
|
|
130
|
-
const v = l[n]?.level ?? 0, C = v + 1;
|
|
131
|
-
a(n, v), a(u, C), l[n].children || (l[n].children = []), l[n].children.push({ target: u, value: c }), l[n].outflow += c, l[u].inflow += c;
|
|
132
|
-
});
|
|
133
|
-
const s = new Set(t.map(([n]) => n)), f = new Set(t.map(([, n]) => n)), F = Array.from(s).filter((n) => !f.has(n)), B = {};
|
|
134
|
-
F.forEach((n, u) => {
|
|
135
|
-
B[n] = Z.value[u] || S[u % S.length];
|
|
136
|
-
});
|
|
137
|
-
const T = {};
|
|
138
|
-
t.forEach(([n, u, c, v]) => {
|
|
139
|
-
v && (T[n] = v, T[u] = v);
|
|
140
|
-
}), Object.keys(l).forEach((n, u) => {
|
|
141
|
-
const c = e.value.nodeCategories?.[n], v = c ? e.value.nodeCategoryColors?.[c] : null;
|
|
142
|
-
l[n].color = T[n] || // 1) explicit
|
|
143
|
-
v || // 2) category
|
|
144
|
-
(F.includes(n) ? B[n] : null) || // 3) root
|
|
145
|
-
S[u % S.length];
|
|
146
|
-
});
|
|
147
|
-
for (const n in l)
|
|
148
|
-
l[n].height = et(
|
|
149
|
-
Math.max(l[n].inflow, l[n].outflow)
|
|
150
|
-
), l[n].name = n;
|
|
151
|
-
const O = {};
|
|
152
|
-
for (const n in o) {
|
|
153
|
-
let u = 0;
|
|
154
|
-
o[n].forEach((c, v) => {
|
|
155
|
-
const C = l[c];
|
|
156
|
-
O[c] = {
|
|
157
|
-
x: parseInt(n, 10) * Qe.value + e.value.style.chart.padding.left,
|
|
158
|
-
y: u,
|
|
159
|
-
absoluteY: u,
|
|
160
|
-
height: C.height,
|
|
161
|
-
i: v,
|
|
162
|
-
color: C.color,
|
|
163
|
-
value: tt(C.height)
|
|
164
|
-
}, u += C.height + _e.value;
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
const A = [];
|
|
168
|
-
for (const n of Object.keys(l)) {
|
|
169
|
-
let u = O[n].absoluteY + e.value.style.chart.padding.top;
|
|
170
|
-
const c = l[n], v = O[n];
|
|
171
|
-
c.children && c.children.forEach(({ target: C, value: i }) => {
|
|
172
|
-
const h = O[C], P = l[C], ee = $(u), ze = $(
|
|
173
|
-
u + i / c.outflow * v.height
|
|
174
|
-
), ce = $(
|
|
175
|
-
h.y + e.value.style.chart.padding.top
|
|
176
|
-
), Me = $(
|
|
177
|
-
ce + i / P.inflow * h.height
|
|
178
|
-
);
|
|
179
|
-
A.push({
|
|
180
|
-
id: ve(),
|
|
181
|
-
source: n,
|
|
182
|
-
target: C,
|
|
183
|
-
path: `M ${$(v.x + H.value)} ${ee} L ${$(v.x + H.value)} ${ze} L ${$(h.x)} ${Me} L ${$(h.x)} ${ce} Z`,
|
|
184
|
-
value: i,
|
|
185
|
-
sourceColor: c.color,
|
|
186
|
-
targetColor: P.color
|
|
187
|
-
}), u += ze - ee, O[C].y += Me - ce;
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
return { nodeCoordinates: O, links: A };
|
|
191
|
-
}
|
|
192
|
-
const m = p(() => {
|
|
193
|
-
const t = ot(x.dataset);
|
|
194
|
-
return {
|
|
195
|
-
nodes: Object.keys(t.nodeCoordinates).map((l, o) => ({
|
|
196
|
-
...t.nodeCoordinates[l],
|
|
197
|
-
name: l
|
|
198
|
-
})),
|
|
199
|
-
links: t.links
|
|
200
|
-
};
|
|
201
|
-
});
|
|
202
|
-
p(() => lt(m.value.nodes));
|
|
203
|
-
function lt(t) {
|
|
204
|
-
const l = {};
|
|
205
|
-
for (const a in t) {
|
|
206
|
-
const { x: s, height: f } = t[a];
|
|
207
|
-
l[s] || (l[s] = 0), l[s] += f + _e.value;
|
|
208
|
-
}
|
|
209
|
-
return Math.max(...Object.values(l));
|
|
210
|
-
}
|
|
211
|
-
const G = p(() => {
|
|
212
|
-
const { top: t, right: l, bottom: o, left: a } = e.value.style.chart.padding, s = Math.max(...m.value.nodes.map((T) => T.x)), f = a + s + H.value + l, F = Math.max(
|
|
213
|
-
...m.value.nodes.map((T) => T.absoluteY + T.height)
|
|
214
|
-
), B = t + F + o;
|
|
215
|
-
return { width: f, height: B };
|
|
216
|
-
});
|
|
217
|
-
function at(t) {
|
|
218
|
-
const l = {}, o = {}, a = /* @__PURE__ */ new Set();
|
|
219
|
-
return se.value.forEach(([s, f, F]) => {
|
|
220
|
-
l[s] || (l[s] = []), o[f] || (o[f] = []), l[s].push(f), o[f].push(s);
|
|
221
|
-
}), l[t] && l[t].forEach((s) => a.add(s)), o[t] && o[t].forEach((s) => a.add(s)), Array.from(a).concat(t);
|
|
222
|
-
}
|
|
223
|
-
const k = y(null), Y = y(null), re = y(null), J = y(!1);
|
|
224
|
-
function nt(t) {
|
|
225
|
-
I.value = [], k.value = at(t.name), Y.value = t.name;
|
|
226
|
-
const l = t.name, o = se.value;
|
|
227
|
-
let a = 0, s = 0, f = [], F = [];
|
|
228
|
-
const B = new Set(o.map(([i]) => i)), T = new Set(o.map(([, i]) => i)), Ee = Array.from(B).filter((i) => !T.has(i)), O = o.filter(([i]) => Ee.includes(i)).reduce((i, [h, P, ee]) => i + ee, 0), A = {};
|
|
229
|
-
m.value.nodes.forEach((i) => {
|
|
230
|
-
A[i.name] = i.color;
|
|
231
|
-
}), o.forEach(([i, h, P]) => {
|
|
232
|
-
h === l && (a += P, f.push({ source: i, value: P, color: A[i] })), i === l && (s += P, F.push({ target: h, value: P, color: A[h] }));
|
|
233
|
-
});
|
|
234
|
-
const n = Math.max(a, s), u = O > 0 ? n / O * 100 : 0, c = {
|
|
235
|
-
name: l,
|
|
236
|
-
inflow: a,
|
|
237
|
-
outflow: s,
|
|
238
|
-
from: f,
|
|
239
|
-
to: F,
|
|
240
|
-
percentOfTotal: u,
|
|
241
|
-
color: A[l] || "#000000"
|
|
242
|
-
};
|
|
243
|
-
re.value = { datapoint: c }, le.value = !0;
|
|
244
|
-
let v = "";
|
|
245
|
-
const C = e.value.style.chart.tooltip.customFormat;
|
|
246
|
-
if (J.value = !1, Tt(C))
|
|
247
|
-
try {
|
|
248
|
-
const i = C({
|
|
249
|
-
datapoint: c,
|
|
250
|
-
series: m.value,
|
|
251
|
-
config: e.value
|
|
252
|
-
});
|
|
253
|
-
typeof i == "string" && (ae.value = i, J.value = !0);
|
|
254
|
-
} catch {
|
|
255
|
-
console.warn("Custom format cannot be applied.");
|
|
256
|
-
}
|
|
257
|
-
if (!J.value) {
|
|
258
|
-
const i = e.value.style.chart.tooltip.showPercentage ? `<div>${q({
|
|
259
|
-
p: e.value.style.chart.tooltip.translations.percentOfTotal,
|
|
260
|
-
v: c.percentOfTotal,
|
|
261
|
-
s: "%",
|
|
262
|
-
r: e.value.style.chart.tooltip.roundingPercentage
|
|
263
|
-
})}</div>` : "";
|
|
264
|
-
v += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;"><span style="margin-right:4px; color:${c.color}">⏹</span>${c.name}${i}</div>`, c.from.length && (v += `<div>${e.value.style.chart.tooltip.translations.from}</div>`, c.from.forEach((h) => {
|
|
265
|
-
v += `<div><span style="color:${h.color}">⏹←</span> ${h.source}: ${fe(
|
|
266
|
-
e.value.style.chart.nodes.labels.formatter,
|
|
267
|
-
h.value,
|
|
268
|
-
q({
|
|
269
|
-
p: e.value.style.chart.nodes.labels.prefix,
|
|
270
|
-
v: h.value,
|
|
271
|
-
s: e.value.style.chart.nodes.labels.suffix,
|
|
272
|
-
r: e.value.style.chart.nodes.labels.rounding
|
|
273
|
-
})
|
|
274
|
-
)}</div>`;
|
|
275
|
-
})), c.to.length && (v += `<div style="margin-top:6px;">${e.value.style.chart.tooltip.translations.to}</div>`, c.to.forEach((h) => {
|
|
276
|
-
v += `<div><span style="color:${h.color}">⏹→</span> ${h.target}: ${fe(
|
|
277
|
-
e.value.style.chart.nodes.labels.formatter,
|
|
278
|
-
h.value,
|
|
279
|
-
q({
|
|
280
|
-
p: e.value.style.chart.nodes.labels.prefix,
|
|
281
|
-
v: h.value,
|
|
282
|
-
s: e.value.style.chart.nodes.labels.suffix,
|
|
283
|
-
r: e.value.style.chart.nodes.labels.rounding
|
|
284
|
-
})
|
|
285
|
-
)}</div>`;
|
|
286
|
-
})), ae.value = v;
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
function Oe() {
|
|
290
|
-
k.value = null, Y.value = null, le.value = !1;
|
|
291
|
-
}
|
|
292
|
-
const Se = p(() => m.value.links.map(
|
|
293
|
-
({ source: t, target: l, sourceColor: o, targetColor: a, value: s }) => ({
|
|
294
|
-
source: t,
|
|
295
|
-
target: l,
|
|
296
|
-
sourceColor: o,
|
|
297
|
-
targetColor: a,
|
|
298
|
-
value: s
|
|
299
|
-
})
|
|
300
|
-
));
|
|
301
|
-
function Fe(t = null) {
|
|
302
|
-
ft(() => {
|
|
303
|
-
const l = Se.value.map((s, f) => [[s.source], [s.target], [s.value]]), o = [
|
|
304
|
-
[e.value.style.chart.title.text],
|
|
305
|
-
[e.value.style.chart.title.subtitle.text],
|
|
306
|
-
[
|
|
307
|
-
[e.value.table.columnNames.source],
|
|
308
|
-
[e.value.table.columnNames.target],
|
|
309
|
-
[e.value.table.columnNames.value]
|
|
310
|
-
]
|
|
311
|
-
].concat(l), a = $t(o);
|
|
312
|
-
t ? t(a) : xt({
|
|
313
|
-
csvContent: a,
|
|
314
|
-
title: e.value.style.chart.title.text || "vue-ui-flow"
|
|
315
|
-
});
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
const K = p(() => {
|
|
319
|
-
const t = [
|
|
320
|
-
e.value.table.columnNames.source,
|
|
321
|
-
e.value.table.columnNames.target,
|
|
322
|
-
e.value.table.columnNames.value
|
|
323
|
-
], l = Se.value.map((s, f) => [
|
|
324
|
-
{
|
|
325
|
-
color: s.sourceColor,
|
|
326
|
-
name: s.source
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
color: s.targetColor,
|
|
330
|
-
name: s.target
|
|
331
|
-
},
|
|
332
|
-
q({
|
|
333
|
-
p: e.value.style.chart.nodes.labels.prefix,
|
|
334
|
-
v: s.value,
|
|
335
|
-
s: e.value.style.chart.nodes.labels.suffix,
|
|
336
|
-
r: e.value.style.chart.nodes.labels.rounding
|
|
337
|
-
})
|
|
338
|
-
]), o = {
|
|
339
|
-
th: {
|
|
340
|
-
backgroundColor: e.value.table.th.backgroundColor,
|
|
341
|
-
color: e.value.table.th.color,
|
|
342
|
-
outline: e.value.table.th.outline
|
|
343
|
-
},
|
|
344
|
-
td: {
|
|
345
|
-
backgroundColor: e.value.table.td.backgroundColor,
|
|
346
|
-
color: e.value.table.td.color,
|
|
347
|
-
outline: e.value.table.td.outline
|
|
348
|
-
},
|
|
349
|
-
breakpoint: e.value.table.responsiveBreakpoint
|
|
350
|
-
};
|
|
351
|
-
return {
|
|
352
|
-
colNames: [
|
|
353
|
-
e.value.table.columnNames.source,
|
|
354
|
-
e.value.table.columnNames.target,
|
|
355
|
-
e.value.table.columnNames.value
|
|
356
|
-
],
|
|
357
|
-
head: t,
|
|
358
|
-
body: l,
|
|
359
|
-
config: o
|
|
360
|
-
};
|
|
361
|
-
});
|
|
362
|
-
function st() {
|
|
363
|
-
return m.value;
|
|
364
|
-
}
|
|
365
|
-
function Pe() {
|
|
366
|
-
N.value.showTable = !N.value.showTable;
|
|
367
|
-
}
|
|
368
|
-
const Q = y(!1);
|
|
369
|
-
function ue() {
|
|
370
|
-
Q.value = !Q.value;
|
|
371
|
-
}
|
|
372
|
-
function Le() {
|
|
373
|
-
N.value.showTooltip = !N.value.showTooltip;
|
|
374
|
-
}
|
|
375
|
-
const Ie = p(() => {
|
|
376
|
-
const t = new Set(
|
|
377
|
-
m.value.nodes.map(
|
|
378
|
-
(l) => e.value.nodeCategories[l.name] || "__uncategorized__"
|
|
379
|
-
)
|
|
380
|
-
);
|
|
381
|
-
return Array.from(t).map((l) => ({
|
|
382
|
-
name: l,
|
|
383
|
-
color: e.value.nodeCategoryColors[l] || S[0],
|
|
384
|
-
shape: "square",
|
|
385
|
-
count: m.value.nodes.filter(
|
|
386
|
-
(o) => (e.value.nodeCategories[o.name] || "__uncategorized__") === l
|
|
387
|
-
).length
|
|
388
|
-
})).map((l, o) => ({
|
|
389
|
-
...l,
|
|
390
|
-
segregate: () => ie({ legend: l, i: o }),
|
|
391
|
-
opacity: I.value.length ? I.value.includes(o) ? 1 : 0.5 : 1
|
|
392
|
-
}));
|
|
393
|
-
}), Ae = p(
|
|
394
|
-
() => Ie.value.filter((t) => t.name !== "__uncategorized__")
|
|
395
|
-
), I = y([]);
|
|
396
|
-
function ie({ legend: t, i: l }) {
|
|
397
|
-
const o = t.name;
|
|
398
|
-
if (k.value?.every(
|
|
399
|
-
(a) => e.value.nodeCategories[a] === o
|
|
400
|
-
)) {
|
|
401
|
-
k.value = null, Y.value = null, I.value = [];
|
|
402
|
-
return;
|
|
403
|
-
}
|
|
404
|
-
I.value = [l], k.value = m.value.nodes.filter((a) => e.value.nodeCategories[a.name] === o).map((a) => a.name), Y.value = null;
|
|
405
|
-
}
|
|
406
|
-
const rt = p(() => ({
|
|
407
|
-
cy: "flow-legend",
|
|
408
|
-
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
409
|
-
color: e.value.style.chart.legend.color,
|
|
410
|
-
fontSize: e.value.style.chart.legend.fontSize,
|
|
411
|
-
paddingBottom: e.value.style.chart.legend.paddingBottom,
|
|
412
|
-
fontWeight: e.value.style.chart.legend.bold ? "bold" : "normal"
|
|
413
|
-
}));
|
|
414
|
-
async function ut({ scale: t = 2 } = {}) {
|
|
415
|
-
if (!z.value) return;
|
|
416
|
-
const { width: l, height: o } = z.value.getBoundingClientRect(), a = l / o, { imageUri: s, base64: f } = await Pt({ domElement: z.value, base64: !0, img: !0, scale: t });
|
|
417
|
-
return {
|
|
418
|
-
imageUri: s,
|
|
419
|
-
base64: f,
|
|
420
|
-
title: e.value.style.chart.title.text,
|
|
421
|
-
width: l,
|
|
422
|
-
height: o,
|
|
423
|
-
aspectRatio: a
|
|
424
|
-
};
|
|
425
|
-
}
|
|
426
|
-
return De({
|
|
427
|
-
getData: st,
|
|
428
|
-
getImage: ut,
|
|
429
|
-
generateCsv: Fe,
|
|
430
|
-
generateImage: Te,
|
|
431
|
-
generatePdf: xe,
|
|
432
|
-
toggleTable: Pe,
|
|
433
|
-
toggleAnnotator: ue,
|
|
434
|
-
toggleTooltip: Le,
|
|
435
|
-
drillCategory: ie,
|
|
436
|
-
unselectNode: Oe,
|
|
437
|
-
toggleFullscreen: me
|
|
438
|
-
}), (t, l) => (d(), g("div", {
|
|
439
|
-
ref_key: "flowChart",
|
|
440
|
-
ref: z,
|
|
441
|
-
class: He(`vue-ui-flow ${M.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
442
|
-
style: L(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
443
|
-
id: `flow_${oe.value}`,
|
|
444
|
-
onMouseenter: l[3] || (l[3] = () => r(ye)(!0)),
|
|
445
|
-
onMouseleave: l[4] || (l[4] = () => r(ye)(!1))
|
|
446
|
-
}, [
|
|
447
|
-
e.value.userOptions.buttons.annotator ? (d(), R(r(We), {
|
|
448
|
-
key: 0,
|
|
449
|
-
svgRef: r(ke),
|
|
450
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
451
|
-
color: e.value.style.chart.color,
|
|
452
|
-
active: Q.value,
|
|
453
|
-
onClose: ue
|
|
454
|
-
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : _("", !0),
|
|
455
|
-
Ke.value ? (d(), g("div", At, null, 512)) : _("", !0),
|
|
456
|
-
e.value.style.chart.title.text ? (d(), g("div", Et, [
|
|
457
|
-
(d(), R(Ft, {
|
|
458
|
-
key: `title_${ge.value}`,
|
|
459
|
-
config: {
|
|
460
|
-
title: {
|
|
461
|
-
cy: "flow-title",
|
|
462
|
-
...e.value.style.chart.title
|
|
463
|
-
},
|
|
464
|
-
subtitle: {
|
|
465
|
-
cy: "flow-subtitle",
|
|
466
|
-
...e.value.style.chart.title.subtitle
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
}, null, 8, ["config"]))
|
|
470
|
-
])) : _("", !0),
|
|
471
|
-
e.value.userOptions.show && te.value && (r(be) || r(ne)) ? (d(), R(r(qe), {
|
|
472
|
-
ref: "details",
|
|
473
|
-
key: `user_option_${pe.value}`,
|
|
474
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
475
|
-
color: e.value.style.chart.color,
|
|
476
|
-
isPrinting: r(we),
|
|
477
|
-
isImaging: r($e),
|
|
478
|
-
uid: oe.value,
|
|
479
|
-
hasPdf: e.value.userOptions.buttons.pdf,
|
|
480
|
-
hasXls: e.value.userOptions.buttons.csv,
|
|
481
|
-
hasImg: e.value.userOptions.buttons.img,
|
|
482
|
-
hasTable: e.value.userOptions.buttons.table,
|
|
483
|
-
callbacks: e.value.userOptions.callbacks,
|
|
484
|
-
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
485
|
-
isFullscreen: M.value,
|
|
486
|
-
titles: { ...e.value.userOptions.buttonTitles },
|
|
487
|
-
chartElement: z.value,
|
|
488
|
-
position: e.value.userOptions.position,
|
|
489
|
-
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
490
|
-
printScale: e.value.userOptions.print.scale,
|
|
491
|
-
isAnnotation: Q.value,
|
|
492
|
-
hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
|
|
493
|
-
isTooltip: N.value.showTooltip,
|
|
494
|
-
onToggleTooltip: Le,
|
|
495
|
-
onToggleFullscreen: me,
|
|
496
|
-
onGeneratePdf: r(xe),
|
|
497
|
-
onGenerateCsv: Fe,
|
|
498
|
-
onGenerateImage: r(Te),
|
|
499
|
-
onToggleTable: Pe,
|
|
500
|
-
onToggleAnnotator: ue,
|
|
501
|
-
style: L({
|
|
502
|
-
visibility: r(be) ? r(ne) ? "visible" : "hidden" : "visible"
|
|
503
|
-
})
|
|
504
|
-
}, dt({ _: 2 }, [
|
|
505
|
-
t.$slots.menuIcon ? {
|
|
506
|
-
name: "menuIcon",
|
|
507
|
-
fn: w(({ isOpen: o, color: a }) => [
|
|
508
|
-
b(t.$slots, "menuIcon", U(V({ isOpen: o, color: a })), void 0, !0)
|
|
509
|
-
]),
|
|
510
|
-
key: "0"
|
|
511
|
-
} : void 0,
|
|
512
|
-
t.$slots.optionTooltip ? {
|
|
513
|
-
name: "optionTooltip",
|
|
514
|
-
fn: w(() => [
|
|
515
|
-
b(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
516
|
-
]),
|
|
517
|
-
key: "1"
|
|
518
|
-
} : void 0,
|
|
519
|
-
t.$slots.optionPdf ? {
|
|
520
|
-
name: "optionPdf",
|
|
521
|
-
fn: w(() => [
|
|
522
|
-
b(t.$slots, "optionPdf", {}, void 0, !0)
|
|
523
|
-
]),
|
|
524
|
-
key: "2"
|
|
525
|
-
} : void 0,
|
|
526
|
-
t.$slots.optionCsv ? {
|
|
527
|
-
name: "optionCsv",
|
|
528
|
-
fn: w(() => [
|
|
529
|
-
b(t.$slots, "optionCsv", {}, void 0, !0)
|
|
530
|
-
]),
|
|
531
|
-
key: "3"
|
|
532
|
-
} : void 0,
|
|
533
|
-
t.$slots.optionImg ? {
|
|
534
|
-
name: "optionImg",
|
|
535
|
-
fn: w(() => [
|
|
536
|
-
b(t.$slots, "optionImg", {}, void 0, !0)
|
|
537
|
-
]),
|
|
538
|
-
key: "4"
|
|
539
|
-
} : void 0,
|
|
540
|
-
t.$slots.optionTable ? {
|
|
541
|
-
name: "optionTable",
|
|
542
|
-
fn: w(() => [
|
|
543
|
-
b(t.$slots, "optionTable", {}, void 0, !0)
|
|
544
|
-
]),
|
|
545
|
-
key: "5"
|
|
546
|
-
} : void 0,
|
|
547
|
-
t.$slots.optionFullscreen ? {
|
|
548
|
-
name: "optionFullscreen",
|
|
549
|
-
fn: w(({ toggleFullscreen: o, isFullscreen: a }) => [
|
|
550
|
-
b(t.$slots, "optionFullscreen", U(V({ toggleFullscreen: o, isFullscreen: a })), void 0, !0)
|
|
551
|
-
]),
|
|
552
|
-
key: "6"
|
|
553
|
-
} : void 0,
|
|
554
|
-
t.$slots.optionAnnotator ? {
|
|
555
|
-
name: "optionAnnotator",
|
|
556
|
-
fn: w(({ toggleAnnotator: o, isAnnotator: a }) => [
|
|
557
|
-
b(t.$slots, "optionAnnotator", U(V({ toggleAnnotator: o, isAnnotator: a })), void 0, !0)
|
|
558
|
-
]),
|
|
559
|
-
key: "7"
|
|
560
|
-
} : void 0
|
|
561
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "callbacks", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "printScale", "isAnnotation", "hasTooltip", "isTooltip", "onGeneratePdf", "onGenerateImage", "style"])) : _("", !0),
|
|
562
|
-
(d(), g("svg", {
|
|
563
|
-
ref_key: "svgRef",
|
|
564
|
-
ref: ke,
|
|
565
|
-
xmlns: r(Ct),
|
|
566
|
-
viewBox: `0 0 ${G.value.width} ${G.value.height}`,
|
|
567
|
-
class: He({
|
|
568
|
-
"vue-data-ui-fullscreen--on": M.value,
|
|
569
|
-
"vue-data-ui-fulscreen--off": !M.value
|
|
570
|
-
}),
|
|
571
|
-
style: L(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
|
|
572
|
-
}, [
|
|
573
|
-
de(r(Ge)),
|
|
574
|
-
t.$slots["chart-background"] ? (d(), g("foreignObject", {
|
|
575
|
-
key: 0,
|
|
576
|
-
x: 0,
|
|
577
|
-
y: 0,
|
|
578
|
-
width: G.value.width,
|
|
579
|
-
height: G.value.height,
|
|
580
|
-
style: {
|
|
581
|
-
pointerEvents: "none"
|
|
582
|
-
}
|
|
583
|
-
}, [
|
|
584
|
-
b(t.$slots, "chart-background", {}, void 0, !0)
|
|
585
|
-
], 8, Mt)) : _("", !0),
|
|
586
|
-
D("defs", null, [
|
|
587
|
-
(d(!0), g(W, null, j(m.value.links, (o, a) => (d(), g("linearGradient", {
|
|
588
|
-
id: o.id,
|
|
589
|
-
x1: "0%",
|
|
590
|
-
y1: "0%",
|
|
591
|
-
x2: "100%",
|
|
592
|
-
y2: "0%"
|
|
593
|
-
}, [
|
|
594
|
-
D("stop", {
|
|
595
|
-
offset: "0%",
|
|
596
|
-
"stop-color": o.sourceColor
|
|
597
|
-
}, null, 8, Yt),
|
|
598
|
-
D("stop", {
|
|
599
|
-
offset: "100%",
|
|
600
|
-
"stop-color": o.targetColor
|
|
601
|
-
}, null, 8, Bt)
|
|
602
|
-
], 8, Ht))), 256))
|
|
603
|
-
]),
|
|
604
|
-
(d(!0), g(W, null, j(m.value.links, (o) => (d(), g("path", {
|
|
605
|
-
class: "vue-ui-flow-link",
|
|
606
|
-
d: o.path,
|
|
607
|
-
fill: `url(#${o.id})`,
|
|
608
|
-
stroke: e.value.style.chart.links.stroke,
|
|
609
|
-
"stroke-width": e.value.style.chart.links.strokeWidth,
|
|
610
|
-
style: L(`
|
|
611
|
-
opacity:${k.value ? k.value.includes(o.source) && k.value.includes(o.target) ? 1 : 0.3 : Y.value ? [o.target, o.source].includes(Y.value) ? 1 : 0.3 : e.value.style.chart.links.opacity}
|
|
612
|
-
`)
|
|
613
|
-
}, null, 12, Rt))), 256)),
|
|
614
|
-
(d(!0), g(W, null, j(m.value.nodes, (o, a) => (d(), g("rect", {
|
|
615
|
-
class: "vue-ui-flow-node",
|
|
616
|
-
x: o.x,
|
|
617
|
-
y: r($)(o.absoluteY) + e.value.style.chart.padding.top,
|
|
618
|
-
height: r($)(o.height),
|
|
619
|
-
width: H.value,
|
|
620
|
-
fill: o.color,
|
|
621
|
-
stroke: e.value.style.chart.nodes.stroke,
|
|
622
|
-
"stroke-width": e.value.style.chart.nodes.strokeWidth,
|
|
623
|
-
onMouseenter: (s) => nt(o),
|
|
624
|
-
onMouseleave: l[0] || (l[0] = (s) => Oe()),
|
|
625
|
-
style: L(`opacity:${k.value ? k.value.includes(o.name) ? 1 : 0.3 : 1}`)
|
|
626
|
-
}, null, 44, Dt))), 256)),
|
|
627
|
-
(d(!0), g(W, null, j(m.value.nodes, (o, a) => (d(), g("text", {
|
|
628
|
-
x: o.x + H.value / 2,
|
|
629
|
-
y: r($)(
|
|
630
|
-
o.absoluteY + o.height / 2 - e.value.style.chart.nodes.labels.fontSize / 4
|
|
631
|
-
) + e.value.style.chart.padding.top,
|
|
632
|
-
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
633
|
-
fill: r(Ye)(o.color),
|
|
634
|
-
"text-anchor": "middle",
|
|
635
|
-
style: L(`pointer-events: none; opacity:${k.value ? k.value.includes(o.name) ? 1 : 0 : 1}`)
|
|
636
|
-
}, X(e.value.style.chart.nodes.labels.abbreviation.use ? r(wt)({
|
|
637
|
-
source: o.name,
|
|
638
|
-
length: e.value.style.chart.nodes.labels.abbreviation.length
|
|
639
|
-
}) : o.name), 13, Ut))), 256)),
|
|
640
|
-
(d(!0), g(W, null, j(m.value.nodes, (o, a) => (d(), g("text", {
|
|
641
|
-
x: o.x + H.value / 2,
|
|
642
|
-
y: r($)(
|
|
643
|
-
o.absoluteY + o.height / 2 + e.value.style.chart.nodes.labels.fontSize
|
|
644
|
-
) + e.value.style.chart.padding.top,
|
|
645
|
-
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
646
|
-
fill: r(Ye)(o.color),
|
|
647
|
-
"text-anchor": "middle",
|
|
648
|
-
style: L(`pointer-events: none; opacity:${k.value ? k.value.includes(o.name) ? 1 : 0 : 1}`)
|
|
649
|
-
}, X(r(fe)(
|
|
650
|
-
e.value.style.chart.nodes.labels.formatter,
|
|
651
|
-
o.value,
|
|
652
|
-
r(q)({
|
|
653
|
-
p: e.value.style.chart.nodes.labels.prefix,
|
|
654
|
-
v: o.value,
|
|
655
|
-
s: e.value.style.chart.nodes.labels.suffix,
|
|
656
|
-
r: e.value.style.chart.nodes.labels.rounding
|
|
657
|
-
}),
|
|
658
|
-
{ datapoint: o, seriesIndex: a }
|
|
659
|
-
)), 13, Vt))), 256)),
|
|
660
|
-
b(t.$slots, "svg", { svg: G.value }, void 0, !0)
|
|
661
|
-
], 14, zt)),
|
|
662
|
-
t.$slots.watermark ? (d(), g("div", Gt, [
|
|
663
|
-
b(t.$slots, "watermark", U(V({ isPrinting: r(we) || r($e) })), void 0, !0)
|
|
664
|
-
])) : _("", !0),
|
|
665
|
-
te.value ? _("", !0) : (d(), R(r(je), {
|
|
666
|
-
key: 5,
|
|
667
|
-
config: {
|
|
668
|
-
type: "flow",
|
|
669
|
-
style: {
|
|
670
|
-
backgroundColor: e.value.style.chart.backgroundColor
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
}, null, 8, ["config"])),
|
|
674
|
-
D("div", {
|
|
675
|
-
ref_key: "chartLegend",
|
|
676
|
-
ref: Je
|
|
677
|
-
}, [
|
|
678
|
-
e.value.style.chart.legend.show && Ae.value.length ? (d(), R(St, {
|
|
679
|
-
key: 0,
|
|
680
|
-
legendSet: Ae.value,
|
|
681
|
-
config: rt.value,
|
|
682
|
-
onClickMarker: l[1] || (l[1] = (o) => ie(o))
|
|
683
|
-
}, {
|
|
684
|
-
item: w(({ legend: o, index: a }) => [
|
|
685
|
-
D("div", {
|
|
686
|
-
onClick: (s) => o.segregate(),
|
|
687
|
-
style: L(`opacity:${I.value.length ? I.value.includes(a) ? 1 : 0.5 : 1}`)
|
|
688
|
-
}, X(o.name) + " (" + X(o.count) + ") ", 13, Wt)
|
|
689
|
-
]),
|
|
690
|
-
_: 1
|
|
691
|
-
}, 8, ["legendSet", "config"])) : _("", !0),
|
|
692
|
-
b(t.$slots, "legend", { legend: Ie.value }, void 0, !0)
|
|
693
|
-
], 512),
|
|
694
|
-
t.$slots.source ? (d(), g("div", jt, [
|
|
695
|
-
b(t.$slots, "source", {}, void 0, !0)
|
|
696
|
-
], 512)) : _("", !0),
|
|
697
|
-
de(r(Xe), {
|
|
698
|
-
show: N.value.showTooltip && le.value,
|
|
699
|
-
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
700
|
-
color: e.value.style.chart.tooltip.color,
|
|
701
|
-
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
702
|
-
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
703
|
-
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
704
|
-
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
705
|
-
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
706
|
-
position: e.value.style.chart.tooltip.position,
|
|
707
|
-
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
708
|
-
parent: z.value,
|
|
709
|
-
content: ae.value,
|
|
710
|
-
isCustom: J.value,
|
|
711
|
-
isFullscreen: M.value
|
|
712
|
-
}, {
|
|
713
|
-
"tooltip-before": w(() => [
|
|
714
|
-
b(t.$slots, "tooltip-before", U(V({ ...re.value })), void 0, !0)
|
|
715
|
-
]),
|
|
716
|
-
"tooltip-after": w(() => [
|
|
717
|
-
b(t.$slots, "tooltip-after", U(V({ ...re.value })), void 0, !0)
|
|
718
|
-
]),
|
|
719
|
-
_: 3
|
|
720
|
-
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen"]),
|
|
721
|
-
te.value ? (d(), R(r(Ue), {
|
|
722
|
-
key: 7,
|
|
723
|
-
hideDetails: "",
|
|
724
|
-
config: {
|
|
725
|
-
open: N.value.showTable,
|
|
726
|
-
maxHeight: 1e4,
|
|
727
|
-
body: {
|
|
728
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
729
|
-
color: e.value.style.chart.color
|
|
730
|
-
},
|
|
731
|
-
head: {
|
|
732
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
733
|
-
color: e.value.style.chart.color
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
}, {
|
|
737
|
-
content: w(() => [
|
|
738
|
-
de(r(Ve), {
|
|
739
|
-
colNames: K.value.colNames,
|
|
740
|
-
head: K.value.head,
|
|
741
|
-
body: K.value.body,
|
|
742
|
-
config: K.value.config,
|
|
743
|
-
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
744
|
-
onClose: l[2] || (l[2] = (o) => N.value.showTable = !1)
|
|
745
|
-
}, {
|
|
746
|
-
th: w(({ th: o }) => [
|
|
747
|
-
D("div", {
|
|
748
|
-
innerHTML: o,
|
|
749
|
-
style: { display: "flex", "align-items": "center" }
|
|
750
|
-
}, null, 8, Xt)
|
|
751
|
-
]),
|
|
752
|
-
td: w(({ td: o }) => [
|
|
753
|
-
vt(X(o.name || o), 1)
|
|
754
|
-
]),
|
|
755
|
-
_: 1
|
|
756
|
-
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
757
|
-
]),
|
|
758
|
-
_: 1
|
|
759
|
-
}, 8, ["config"])) : _("", !0)
|
|
760
|
-
], 46, It));
|
|
761
|
-
}
|
|
762
|
-
}, so = /* @__PURE__ */ Lt(qt, [["__scopeId", "data-v-dbf97adc"]]);
|
|
763
|
-
export {
|
|
764
|
-
so as default
|
|
765
|
-
};
|