vue-data-ui 2.17.0 → 2.17.2
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/README.md +2 -1
- package/dist/{Arrow-BAEkZGzL.js → Arrow-Dr2lyXds.js} +1 -1
- package/dist/{BaseDraggableDialog-ChCkcmj_.js → BaseDraggableDialog-DQ6yA8di.js} +2 -2
- package/dist/{BaseIcon-naqtCxVi.js → BaseIcon-C2f-EcZc.js} +1 -1
- package/dist/{ColorPicker-CfIPgxcj.js → ColorPicker-D-JmDe31.js} +2 -2
- package/dist/{DataTable-D0VYDhfx.js → DataTable-6BxhjBzt.js} +2 -2
- package/dist/{Legend-Bxlv67uY.js → Legend-1R-B-7st.js} +11 -11
- package/dist/{NonSvgPenAndPaper-b_oVy-Dd.js → NonSvgPenAndPaper-CLNy5uCL.js} +3 -3
- package/dist/{PackageVersion-5TR4ocqp.js → PackageVersion-CIX1W_aa.js} +1 -1
- package/dist/{PenAndPaper-D6AqipIO.js → PenAndPaper-CqJ4wudB.js} +3 -3
- package/dist/{Shape-DtFT5EJa.js → Shape-DJKQgAbU.js} +1 -1
- package/dist/{Slicer-CL6-MRI6.js → Slicer-Dju6LE-h.js} +2 -2
- package/dist/{SparkTooltip-Bcv1aoA5.js → SparkTooltip-D2mROH3o.js} +1 -1
- package/dist/{Title-B-2bV0SW.js → Title-BQb7X_OR.js} +1 -1
- package/dist/{Tooltip-CoQnTnr-.js → Tooltip-BTnTpPdO.js} +1 -1
- package/dist/{UserOptions-Dd34lEKb.js → UserOptions-lneAyZKu.js} +2 -2
- package/dist/{dom-to-png-2AA0wHlX.js → dom-to-png-C-9BWdwN.js} +1 -1
- package/dist/{img-Y_hYz-ZC.js → img-D0DpKcFX.js} +1 -1
- package/dist/{index-pPGk-uhD.js → index-JzUbx__y.js} +22 -8
- package/dist/{pdf-yfk3d1is.js → pdf-BgVDfZPT.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +65 -160
- package/dist/types/vue-data-ui.d.ts +65 -160
- package/dist/{useNestedProp-DjACxgdZ.js → useNestedProp-D_jd2dz9.js} +1 -1
- package/dist/{usePrinter-DDHcrl0A.js → usePrinter-CsyliflB.js} +2 -2
- package/dist/{vue-data-ui-CIWxgKjd.js → vue-data-ui-BMv8hEcb.js} +99 -97
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-D5Wpdqfk.js → vue-ui-3d-bar-CrdssfKx.js} +41 -34
- package/dist/{vue-ui-accordion-CVnA550V.js → vue-ui-accordion-CcTUbiHq.js} +3 -3
- package/dist/{vue-ui-age-pyramid-BuAl-zC5.js → vue-ui-age-pyramid-ZYFAAcwc.js} +134 -127
- package/dist/{vue-ui-annotator-gl2A20m3.js → vue-ui-annotator-BEgBoRWQ.js} +2 -2
- package/dist/{vue-ui-bullet-D-VMKpwe.js → vue-ui-bullet-DYzLfkYB.js} +90 -83
- package/dist/{vue-ui-candlestick-1r6YwiUV.js → vue-ui-candlestick-Cdu2ozig.js} +101 -94
- package/dist/{vue-ui-carousel-table-B6UJoNtP.js → vue-ui-carousel-table-Dce2wfVw.js} +4 -4
- package/dist/{vue-ui-chestnut-DnlBYpC5.js → vue-ui-chestnut-CCMAbLrw.js} +270 -263
- package/dist/{vue-ui-chord-D3kpzYjp.js → vue-ui-chord-B8Sl_FwD.js} +60 -53
- package/dist/{vue-ui-circle-pack-CHgdpoYu.js → vue-ui-circle-pack-BX6_ToJl.js} +121 -114
- package/dist/{vue-ui-cursor-63EAvElT.js → vue-ui-cursor-CyaF0qp7.js} +2 -2
- package/dist/{vue-ui-dashboard-Da6CPET-.js → vue-ui-dashboard-BmL_vnj5.js} +62 -62
- package/dist/{vue-ui-digits-CA8pUKej.js → vue-ui-digits-BRKjd-LQ.js} +2 -2
- package/dist/vue-ui-donut-LZR-vpdS.js +1338 -0
- package/dist/{vue-ui-donut-evolution-qeBEA4W8.js → vue-ui-donut-evolution-dax3dN9r.js} +215 -211
- package/dist/{vue-ui-dumbbell-Bm0PvAKT.js → vue-ui-dumbbell-C7ZNBVSy.js} +117 -110
- package/dist/{vue-ui-flow-C2dqXvrU.js → vue-ui-flow-BeLwkeHo.js} +105 -98
- package/dist/{vue-ui-funnel-Dvy5rRld.js → vue-ui-funnel-BywaRLZR.js} +138 -131
- package/dist/{vue-ui-galaxy-Y8LYp5n2.js → vue-ui-galaxy-DYavEd4o.js} +150 -146
- package/dist/{vue-ui-gauge-BBo0jWAP.js → vue-ui-gauge-DwQRlRWp.js} +125 -118
- package/dist/{vue-ui-gizmo-DjXfTOWn.js → vue-ui-gizmo-CjRczit6.js} +3 -3
- package/dist/{vue-ui-heatmap-BbxRpltP.js → vue-ui-heatmap-cRy0tcES.js} +155 -148
- package/dist/{vue-ui-history-plot-ChYf3Nvc.js → vue-ui-history-plot-D8aTdU23.js} +141 -134
- package/dist/{vue-ui-kpi-Vfc5-JnE.js → vue-ui-kpi-B10h_Hbt.js} +3 -3
- package/dist/{vue-ui-mini-loader-C0-Nsz8K.js → vue-ui-mini-loader-DNhr_0fr.js} +2 -2
- package/dist/{vue-ui-molecule-B7Yu7vzF.js → vue-ui-molecule-4MeyWn0c.js} +141 -134
- package/dist/{vue-ui-mood-radar-C8JUTwNw.js → vue-ui-mood-radar-DJmgRVT2.js} +126 -119
- package/dist/vue-ui-nested-donuts-CgaPLxV2.js +1177 -0
- package/dist/{vue-ui-onion-D4U7TL_N.js → vue-ui-onion-swDxtTT3.js} +88 -81
- package/dist/{vue-ui-parallel-coordinate-plot-CXMT7Rjr.js → vue-ui-parallel-coordinate-plot-DayzzOmK.js} +123 -116
- package/dist/{vue-ui-quadrant-B13pTVVZ.js → vue-ui-quadrant-CLf81ioF.js} +151 -144
- package/dist/{vue-ui-quick-chart-C0UL4o63.js → vue-ui-quick-chart-smKrpIwq.js} +39 -32
- package/dist/{vue-ui-radar-XpdiXnhz.js → vue-ui-radar-D8CIvG2q.js} +58 -51
- package/dist/{vue-ui-rating-CM8ZrUb1.js → vue-ui-rating-YZivkWBI.js} +2 -2
- package/dist/{vue-ui-relation-circle-CYoFNekk.js → vue-ui-relation-circle-DsEYbNs_.js} +127 -120
- package/dist/{vue-ui-ridgeline-QUquE6ck.js → vue-ui-ridgeline-Do6C5lMY.js} +98 -91
- package/dist/{vue-ui-rings-DwT0IfOh.js → vue-ui-rings-CMryJR1g.js} +208 -204
- package/dist/{vue-ui-scatter-zDpy1udm.js → vue-ui-scatter-BtLKWQbX.js} +172 -165
- package/dist/{vue-ui-skeleton-DJPjyNYn.js → vue-ui-skeleton-B4KQLEQy.js} +3 -3
- package/dist/{vue-ui-smiley-DoDXl6k0.js → vue-ui-smiley-CZBuA-1x.js} +2 -2
- package/dist/{vue-ui-spark-trend-CniV6Cpr.js → vue-ui-spark-trend-CdgyexDu.js} +3 -3
- package/dist/{vue-ui-sparkbar-Ds2ITgwn.js → vue-ui-sparkbar-DuZulYgD.js} +3 -3
- package/dist/{vue-ui-sparkgauge-CosfK-kw.js → vue-ui-sparkgauge-Di0FmUXs.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-C7O1wPAJ.js → vue-ui-sparkhistogram-CHNHz9Gm.js} +4 -4
- package/dist/{vue-ui-sparkline-B_iUj3F2.js → vue-ui-sparkline-TaWMi8gF.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-DBhWrysr.js → vue-ui-sparkstackbar-Bv2HEegT.js} +3 -3
- package/dist/{vue-ui-stackbar-C3aV4IcL.js → vue-ui-stackbar-Bk3Bbzjk.js} +61 -54
- package/dist/{vue-ui-strip-plot-Bvr1GAzH.js → vue-ui-strip-plot-BNMDY4GI.js} +116 -109
- package/dist/{vue-ui-table-DQKKRgyo.js → vue-ui-table-JG0B8HuS.js} +3 -3
- package/dist/{vue-ui-table-heatmap-Dyqj5XJC.js → vue-ui-table-heatmap-CCdWeNZj.js} +5 -5
- package/dist/{vue-ui-table-sparkline-D4RubyLj.js → vue-ui-table-sparkline-C1u_b0RG.js} +4 -4
- package/dist/{vue-ui-thermometer-B0FKI5cG.js → vue-ui-thermometer-DkldIXw7.js} +88 -81
- package/dist/{vue-ui-timer-DUCBRIl-.js → vue-ui-timer-0KDTN-Gt.js} +5 -5
- package/dist/{vue-ui-tiremarks-CRt4UQZD.js → vue-ui-tiremarks-FPtGzTGi.js} +127 -120
- package/dist/vue-ui-treemap-BA5wC5Bs.js +965 -0
- package/dist/{vue-ui-vertical-bar-C5fPYltO.js → vue-ui-vertical-bar-DUJWYMRn.js} +233 -226
- package/dist/{vue-ui-waffle-BpWLlfpg.js → vue-ui-waffle-BIngg99N.js} +183 -179
- package/dist/{vue-ui-wheel-CTzuCroy.js → vue-ui-wheel-l5U2UH9c.js} +121 -114
- package/dist/{vue-ui-word-cloud-BPokdaP1.js → vue-ui-word-cloud-CTKuxhFY.js} +152 -145
- package/dist/{vue-ui-world-CS6k-oil.js → vue-ui-world-Dx5O9Is5.js} +77 -70
- package/dist/{vue-ui-xy-CQ425kLR.js → vue-ui-xy-JjA1CMAo.js} +229 -222
- package/dist/{vue-ui-xy-canvas-D2IFwAr7.js → vue-ui-xy-canvas-CH82b2Lp.js} +154 -147
- package/package.json +1 -1
- package/dist/vue-ui-donut-CKa7nFjt.js +0 -1324
- package/dist/vue-ui-nested-donuts-D0RgFifU.js +0 -1163
- package/dist/vue-ui-treemap-CWP5nYDx.js +0 -961
|
@@ -1,12 +1,12 @@
|
|
|
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
|
|
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
|
|
3
|
-
import { u as Be } from "./useNestedProp-
|
|
4
|
-
import { u as _t } from "./usePrinter-
|
|
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-JzUbx__y.js";
|
|
3
|
+
import { u as Be } from "./useNestedProp-D_jd2dz9.js";
|
|
4
|
+
import { u as _t } from "./usePrinter-CsyliflB.js";
|
|
5
5
|
import { u as Nt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
6
6
|
import { u as Ot } from "./useChartAccessibility-9icAAmYg.js";
|
|
7
|
-
import St from "./Legend-
|
|
8
|
-
import Ft from "./Title-
|
|
9
|
-
import Pt from "./img-
|
|
7
|
+
import St from "./Legend-1R-B-7st.js";
|
|
8
|
+
import Ft from "./Title-BQb7X_OR.js";
|
|
9
|
+
import Pt from "./img-D0DpKcFX.js";
|
|
10
10
|
import { _ as Lt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
11
|
const It = ["id"], At = {
|
|
12
12
|
key: 1,
|
|
@@ -16,7 +16,7 @@ const It = ["id"], At = {
|
|
|
16
16
|
}, Et = {
|
|
17
17
|
key: 2,
|
|
18
18
|
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
19
|
-
}, zt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ht = ["id"], Yt = ["stop-color"], Bt = ["stop-color"],
|
|
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
20
|
key: 4,
|
|
21
21
|
class: "vue-data-ui-watermark"
|
|
22
22
|
}, Wt = ["onClick"], jt = {
|
|
@@ -39,20 +39,20 @@ const It = ["id"], At = {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
-
setup(
|
|
43
|
-
const Ue = E(() => import("./vue-ui-accordion-
|
|
42
|
+
setup(Re, { expose: De }) {
|
|
43
|
+
const Ue = E(() => import("./vue-ui-accordion-CcTUbiHq.js")), Ve = E(() => import("./DataTable-6BxhjBzt.js")), Ge = E(() => import("./PackageVersion-CIX1W_aa.js")), We = E(() => import("./PenAndPaper-CqJ4wudB.js")), je = E(() => import("./vue-ui-skeleton-B4KQLEQy.js")), Xe = E(() => import("./Tooltip-BTnTpPdO.js")), qe = E(() => import("./UserOptions-lneAyZKu.js")), { vue_ui_flow: Ze } = ht(), x = Re, te = p(() => !!x.dataset && x.dataset.length);
|
|
44
44
|
it(() => {
|
|
45
45
|
he();
|
|
46
46
|
});
|
|
47
47
|
function he() {
|
|
48
|
-
pt(
|
|
48
|
+
pt(x.dataset) && gt({
|
|
49
49
|
componentName: "VueUiFlow",
|
|
50
50
|
type: "dataset"
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
const oe = y(ve()),
|
|
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
54
|
function me(t) {
|
|
55
|
-
|
|
55
|
+
M.value = t, pe.value += 1;
|
|
56
56
|
}
|
|
57
57
|
const e = p({
|
|
58
58
|
get: () => Ce(),
|
|
@@ -62,33 +62,33 @@ const It = ["id"], At = {
|
|
|
62
62
|
});
|
|
63
63
|
function Ce() {
|
|
64
64
|
const t = Be({
|
|
65
|
-
userConfig:
|
|
65
|
+
userConfig: x.config,
|
|
66
66
|
defaultConfig: Ze
|
|
67
67
|
});
|
|
68
68
|
let l = t;
|
|
69
69
|
return t.theme ? l = {
|
|
70
70
|
...Be({
|
|
71
|
-
userConfig: yt.vue_ui_flow[t.theme] ||
|
|
71
|
+
userConfig: yt.vue_ui_flow[t.theme] || x.config,
|
|
72
72
|
defaultConfig: t
|
|
73
73
|
}),
|
|
74
74
|
customPalette: mt[t.theme] || S
|
|
75
|
-
} : l = t, l.nodeCategories =
|
|
75
|
+
} : l = t, l.nodeCategories = x.config.nodeCategories || {}, l.nodeCategoryColors = x.config.nodeCategoryColors || {}, l;
|
|
76
76
|
}
|
|
77
77
|
ct(
|
|
78
|
-
() =>
|
|
78
|
+
() => x.config,
|
|
79
79
|
(t) => {
|
|
80
80
|
e.value = Ce(), ne.value = !e.value.userOptions.showOnChartHover, he(), ge.value += 1, N.value.showTable = e.value.table.show;
|
|
81
81
|
},
|
|
82
82
|
{ deep: !0 }
|
|
83
83
|
);
|
|
84
|
-
const { isPrinting: we, isImaging: $e, generatePdf:
|
|
84
|
+
const { isPrinting: we, isImaging: $e, generatePdf: xe, generateImage: Te } = _t({
|
|
85
85
|
elementId: `flow_${oe.value}`,
|
|
86
86
|
fileName: e.value.style.chart.title.text || "vue-ui-flow",
|
|
87
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),
|
|
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
89
|
showTable: e.value.table.show,
|
|
90
90
|
showTooltip: e.value.style.chart.tooltip.show
|
|
91
|
-
}), Qe = p(() => e.value.style.chart.links.width), se = p(() => !
|
|
91
|
+
}), Qe = p(() => e.value.style.chart.links.width), se = p(() => !x.dataset || !x.dataset.length ? [] : x.dataset.map((t, l) => [
|
|
92
92
|
t[0],
|
|
93
93
|
t[1],
|
|
94
94
|
$(t[2]),
|
|
@@ -98,8 +98,8 @@ const It = ["id"], At = {
|
|
|
98
98
|
function l(a) {
|
|
99
99
|
t[a] || (t[a] = { inflow: 0, outflow: 0 });
|
|
100
100
|
}
|
|
101
|
-
se.value.forEach(([a, s,
|
|
102
|
-
l(a), l(s), t[a].outflow +=
|
|
101
|
+
se.value.forEach(([a, s, f]) => {
|
|
102
|
+
l(a), l(s), t[a].outflow += f, t[s].inflow += f;
|
|
103
103
|
});
|
|
104
104
|
let o = 0;
|
|
105
105
|
for (const a in t) {
|
|
@@ -130,18 +130,18 @@ const It = ["id"], At = {
|
|
|
130
130
|
const v = l[n]?.level ?? 0, C = v + 1;
|
|
131
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
132
|
});
|
|
133
|
-
const s = new Set(t.map(([n]) => n)),
|
|
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
134
|
F.forEach((n, u) => {
|
|
135
|
-
|
|
135
|
+
B[n] = Z.value[u] || S[u % S.length];
|
|
136
136
|
});
|
|
137
|
-
const
|
|
137
|
+
const T = {};
|
|
138
138
|
t.forEach(([n, u, c, v]) => {
|
|
139
|
-
v && (
|
|
139
|
+
v && (T[n] = v, T[u] = v);
|
|
140
140
|
}), Object.keys(l).forEach((n, u) => {
|
|
141
141
|
const c = e.value.nodeCategories?.[n], v = c ? e.value.nodeCategoryColors?.[c] : null;
|
|
142
|
-
l[n].color =
|
|
142
|
+
l[n].color = T[n] || // 1) explicit
|
|
143
143
|
v || // 2) category
|
|
144
|
-
(F.includes(n) ?
|
|
144
|
+
(F.includes(n) ? B[n] : null) || // 3) root
|
|
145
145
|
S[u % S.length];
|
|
146
146
|
});
|
|
147
147
|
for (const n in l)
|
|
@@ -169,18 +169,18 @@ const It = ["id"], At = {
|
|
|
169
169
|
let u = O[n].absoluteY + e.value.style.chart.padding.top;
|
|
170
170
|
const c = l[n], v = O[n];
|
|
171
171
|
c.children && c.children.forEach(({ target: C, value: i }) => {
|
|
172
|
-
const
|
|
172
|
+
const h = O[C], P = l[C], ee = $(u), ze = $(
|
|
173
173
|
u + i / c.outflow * v.height
|
|
174
174
|
), ce = $(
|
|
175
|
-
|
|
175
|
+
h.y + e.value.style.chart.padding.top
|
|
176
176
|
), Me = $(
|
|
177
|
-
ce + i / P.inflow *
|
|
177
|
+
ce + i / P.inflow * h.height
|
|
178
178
|
);
|
|
179
179
|
A.push({
|
|
180
180
|
id: ve(),
|
|
181
181
|
source: n,
|
|
182
182
|
target: C,
|
|
183
|
-
path: `M ${$(v.x +
|
|
183
|
+
path: `M ${$(v.x + H.value)} ${ee} L ${$(v.x + H.value)} ${ze} L ${$(h.x)} ${Me} L ${$(h.x)} ${ce} Z`,
|
|
184
184
|
value: i,
|
|
185
185
|
sourceColor: c.color,
|
|
186
186
|
targetColor: P.color
|
|
@@ -190,7 +190,7 @@ const It = ["id"], At = {
|
|
|
190
190
|
return { nodeCoordinates: O, links: A };
|
|
191
191
|
}
|
|
192
192
|
const m = p(() => {
|
|
193
|
-
const t = ot(
|
|
193
|
+
const t = ot(x.dataset);
|
|
194
194
|
return {
|
|
195
195
|
nodes: Object.keys(t.nodeCoordinates).map((l, o) => ({
|
|
196
196
|
...t.nodeCoordinates[l],
|
|
@@ -203,39 +203,39 @@ const It = ["id"], At = {
|
|
|
203
203
|
function lt(t) {
|
|
204
204
|
const l = {};
|
|
205
205
|
for (const a in t) {
|
|
206
|
-
const { x: s, height:
|
|
207
|
-
l[s] || (l[s] = 0), l[s] +=
|
|
206
|
+
const { x: s, height: f } = t[a];
|
|
207
|
+
l[s] || (l[s] = 0), l[s] += f + _e.value;
|
|
208
208
|
}
|
|
209
209
|
return Math.max(...Object.values(l));
|
|
210
210
|
}
|
|
211
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((
|
|
213
|
-
...m.value.nodes.map((
|
|
214
|
-
),
|
|
215
|
-
return { width:
|
|
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
216
|
});
|
|
217
217
|
function at(t) {
|
|
218
218
|
const l = {}, o = {}, a = /* @__PURE__ */ new Set();
|
|
219
|
-
return se.value.forEach(([s,
|
|
220
|
-
l[s] || (l[s] = []), o[
|
|
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
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
222
|
}
|
|
223
|
-
const k = y(null),
|
|
223
|
+
const k = y(null), Y = y(null), re = y(null), J = y(!1);
|
|
224
224
|
function nt(t) {
|
|
225
|
-
I.value = [], k.value = at(t.name),
|
|
225
|
+
I.value = [], k.value = at(t.name), Y.value = t.name;
|
|
226
226
|
const l = t.name, o = se.value;
|
|
227
|
-
let a = 0, s = 0,
|
|
228
|
-
const
|
|
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
229
|
m.value.nodes.forEach((i) => {
|
|
230
230
|
A[i.name] = i.color;
|
|
231
|
-
}), o.forEach(([i,
|
|
232
|
-
|
|
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
233
|
});
|
|
234
234
|
const n = Math.max(a, s), u = O > 0 ? n / O * 100 : 0, c = {
|
|
235
235
|
name: l,
|
|
236
236
|
inflow: a,
|
|
237
237
|
outflow: s,
|
|
238
|
-
from:
|
|
238
|
+
from: f,
|
|
239
239
|
to: F,
|
|
240
240
|
percentOfTotal: u,
|
|
241
241
|
color: A[l] || "#000000"
|
|
@@ -243,7 +243,7 @@ const It = ["id"], At = {
|
|
|
243
243
|
re.value = { datapoint: c }, le.value = !0;
|
|
244
244
|
let v = "";
|
|
245
245
|
const C = e.value.style.chart.tooltip.customFormat;
|
|
246
|
-
if (J.value = !1,
|
|
246
|
+
if (J.value = !1, Tt(C))
|
|
247
247
|
try {
|
|
248
248
|
const i = C({
|
|
249
249
|
datapoint: c,
|
|
@@ -261,24 +261,24 @@ const It = ["id"], At = {
|
|
|
261
261
|
s: "%",
|
|
262
262
|
r: e.value.style.chart.tooltip.roundingPercentage
|
|
263
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((
|
|
265
|
-
v += `<div><span style="color:${
|
|
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
266
|
e.value.style.chart.nodes.labels.formatter,
|
|
267
|
-
|
|
267
|
+
h.value,
|
|
268
268
|
q({
|
|
269
269
|
p: e.value.style.chart.nodes.labels.prefix,
|
|
270
|
-
v:
|
|
270
|
+
v: h.value,
|
|
271
271
|
s: e.value.style.chart.nodes.labels.suffix,
|
|
272
272
|
r: e.value.style.chart.nodes.labels.rounding
|
|
273
273
|
})
|
|
274
274
|
)}</div>`;
|
|
275
|
-
})), c.to.length && (v += `<div style="margin-top:6px;">${e.value.style.chart.tooltip.translations.to}</div>`, c.to.forEach((
|
|
276
|
-
v += `<div><span style="color:${
|
|
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
277
|
e.value.style.chart.nodes.labels.formatter,
|
|
278
|
-
|
|
278
|
+
h.value,
|
|
279
279
|
q({
|
|
280
280
|
p: e.value.style.chart.nodes.labels.prefix,
|
|
281
|
-
v:
|
|
281
|
+
v: h.value,
|
|
282
282
|
s: e.value.style.chart.nodes.labels.suffix,
|
|
283
283
|
r: e.value.style.chart.nodes.labels.rounding
|
|
284
284
|
})
|
|
@@ -287,7 +287,7 @@ const It = ["id"], At = {
|
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
function Oe() {
|
|
290
|
-
k.value = null,
|
|
290
|
+
k.value = null, Y.value = null, le.value = !1;
|
|
291
291
|
}
|
|
292
292
|
const Se = p(() => m.value.links.map(
|
|
293
293
|
({ source: t, target: l, sourceColor: o, targetColor: a, value: s }) => ({
|
|
@@ -300,7 +300,7 @@ const It = ["id"], At = {
|
|
|
300
300
|
));
|
|
301
301
|
function Fe(t = null) {
|
|
302
302
|
ft(() => {
|
|
303
|
-
const l = Se.value.map((s,
|
|
303
|
+
const l = Se.value.map((s, f) => [[s.source], [s.target], [s.value]]), o = [
|
|
304
304
|
[e.value.style.chart.title.text],
|
|
305
305
|
[e.value.style.chart.title.subtitle.text],
|
|
306
306
|
[
|
|
@@ -309,7 +309,7 @@ const It = ["id"], At = {
|
|
|
309
309
|
[e.value.table.columnNames.value]
|
|
310
310
|
]
|
|
311
311
|
].concat(l), a = $t(o);
|
|
312
|
-
t ? t(a) :
|
|
312
|
+
t ? t(a) : xt({
|
|
313
313
|
csvContent: a,
|
|
314
314
|
title: e.value.style.chart.title.text || "vue-ui-flow"
|
|
315
315
|
});
|
|
@@ -320,7 +320,7 @@ const It = ["id"], At = {
|
|
|
320
320
|
e.value.table.columnNames.source,
|
|
321
321
|
e.value.table.columnNames.target,
|
|
322
322
|
e.value.table.columnNames.value
|
|
323
|
-
], l = Se.value.map((s,
|
|
323
|
+
], l = Se.value.map((s, f) => [
|
|
324
324
|
{
|
|
325
325
|
color: s.sourceColor,
|
|
326
326
|
name: s.source
|
|
@@ -398,10 +398,10 @@ const It = ["id"], At = {
|
|
|
398
398
|
if (k.value?.every(
|
|
399
399
|
(a) => e.value.nodeCategories[a] === o
|
|
400
400
|
)) {
|
|
401
|
-
k.value = null,
|
|
401
|
+
k.value = null, Y.value = null, I.value = [];
|
|
402
402
|
return;
|
|
403
403
|
}
|
|
404
|
-
I.value = [l], k.value = m.value.nodes.filter((a) => e.value.nodeCategories[a.name] === o).map((a) => a.name),
|
|
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
405
|
}
|
|
406
406
|
const rt = p(() => ({
|
|
407
407
|
cy: "flow-legend",
|
|
@@ -412,16 +412,23 @@ const It = ["id"], At = {
|
|
|
412
412
|
fontWeight: e.value.style.chart.legend.bold ? "bold" : "normal"
|
|
413
413
|
}));
|
|
414
414
|
async function ut({ scale: t = 2 } = {}) {
|
|
415
|
-
if (!
|
|
416
|
-
const {
|
|
417
|
-
return {
|
|
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
|
+
};
|
|
418
425
|
}
|
|
419
|
-
return
|
|
426
|
+
return De({
|
|
420
427
|
getData: st,
|
|
421
428
|
getImage: ut,
|
|
422
429
|
generateCsv: Fe,
|
|
423
|
-
generateImage:
|
|
424
|
-
generatePdf:
|
|
430
|
+
generateImage: Te,
|
|
431
|
+
generatePdf: xe,
|
|
425
432
|
toggleTable: Pe,
|
|
426
433
|
toggleAnnotator: ue,
|
|
427
434
|
toggleTooltip: Le,
|
|
@@ -430,14 +437,14 @@ const It = ["id"], At = {
|
|
|
430
437
|
toggleFullscreen: me
|
|
431
438
|
}), (t, l) => (d(), g("div", {
|
|
432
439
|
ref_key: "flowChart",
|
|
433
|
-
ref:
|
|
434
|
-
class: He(`vue-ui-flow ${
|
|
440
|
+
ref: z,
|
|
441
|
+
class: He(`vue-ui-flow ${M.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
435
442
|
style: L(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
436
443
|
id: `flow_${oe.value}`,
|
|
437
444
|
onMouseenter: l[3] || (l[3] = () => r(ye)(!0)),
|
|
438
445
|
onMouseleave: l[4] || (l[4] = () => r(ye)(!1))
|
|
439
446
|
}, [
|
|
440
|
-
e.value.userOptions.buttons.annotator ? (d(),
|
|
447
|
+
e.value.userOptions.buttons.annotator ? (d(), R(r(We), {
|
|
441
448
|
key: 0,
|
|
442
449
|
svgRef: r(ke),
|
|
443
450
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
@@ -447,7 +454,7 @@ const It = ["id"], At = {
|
|
|
447
454
|
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : _("", !0),
|
|
448
455
|
Ke.value ? (d(), g("div", At, null, 512)) : _("", !0),
|
|
449
456
|
e.value.style.chart.title.text ? (d(), g("div", Et, [
|
|
450
|
-
(d(),
|
|
457
|
+
(d(), R(Ft, {
|
|
451
458
|
key: `title_${ge.value}`,
|
|
452
459
|
config: {
|
|
453
460
|
title: {
|
|
@@ -461,7 +468,7 @@ const It = ["id"], At = {
|
|
|
461
468
|
}
|
|
462
469
|
}, null, 8, ["config"]))
|
|
463
470
|
])) : _("", !0),
|
|
464
|
-
e.value.userOptions.show && te.value && (r(be) || r(ne)) ? (d(),
|
|
471
|
+
e.value.userOptions.show && te.value && (r(be) || r(ne)) ? (d(), R(r(qe), {
|
|
465
472
|
ref: "details",
|
|
466
473
|
key: `user_option_${pe.value}`,
|
|
467
474
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
@@ -475,9 +482,9 @@ const It = ["id"], At = {
|
|
|
475
482
|
hasTable: e.value.userOptions.buttons.table,
|
|
476
483
|
callbacks: e.value.userOptions.callbacks,
|
|
477
484
|
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
478
|
-
isFullscreen:
|
|
485
|
+
isFullscreen: M.value,
|
|
479
486
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
480
|
-
chartElement:
|
|
487
|
+
chartElement: z.value,
|
|
481
488
|
position: e.value.userOptions.position,
|
|
482
489
|
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
483
490
|
printScale: e.value.userOptions.print.scale,
|
|
@@ -486,9 +493,9 @@ const It = ["id"], At = {
|
|
|
486
493
|
isTooltip: N.value.showTooltip,
|
|
487
494
|
onToggleTooltip: Le,
|
|
488
495
|
onToggleFullscreen: me,
|
|
489
|
-
onGeneratePdf: r(
|
|
496
|
+
onGeneratePdf: r(xe),
|
|
490
497
|
onGenerateCsv: Fe,
|
|
491
|
-
onGenerateImage: r(
|
|
498
|
+
onGenerateImage: r(Te),
|
|
492
499
|
onToggleTable: Pe,
|
|
493
500
|
onToggleAnnotator: ue,
|
|
494
501
|
style: L({
|
|
@@ -498,7 +505,7 @@ const It = ["id"], At = {
|
|
|
498
505
|
t.$slots.menuIcon ? {
|
|
499
506
|
name: "menuIcon",
|
|
500
507
|
fn: w(({ isOpen: o, color: a }) => [
|
|
501
|
-
b(t.$slots, "menuIcon",
|
|
508
|
+
b(t.$slots, "menuIcon", U(V({ isOpen: o, color: a })), void 0, !0)
|
|
502
509
|
]),
|
|
503
510
|
key: "0"
|
|
504
511
|
} : void 0,
|
|
@@ -540,14 +547,14 @@ const It = ["id"], At = {
|
|
|
540
547
|
t.$slots.optionFullscreen ? {
|
|
541
548
|
name: "optionFullscreen",
|
|
542
549
|
fn: w(({ toggleFullscreen: o, isFullscreen: a }) => [
|
|
543
|
-
b(t.$slots, "optionFullscreen",
|
|
550
|
+
b(t.$slots, "optionFullscreen", U(V({ toggleFullscreen: o, isFullscreen: a })), void 0, !0)
|
|
544
551
|
]),
|
|
545
552
|
key: "6"
|
|
546
553
|
} : void 0,
|
|
547
554
|
t.$slots.optionAnnotator ? {
|
|
548
555
|
name: "optionAnnotator",
|
|
549
556
|
fn: w(({ toggleAnnotator: o, isAnnotator: a }) => [
|
|
550
|
-
b(t.$slots, "optionAnnotator",
|
|
557
|
+
b(t.$slots, "optionAnnotator", U(V({ toggleAnnotator: o, isAnnotator: a })), void 0, !0)
|
|
551
558
|
]),
|
|
552
559
|
key: "7"
|
|
553
560
|
} : void 0
|
|
@@ -558,8 +565,8 @@ const It = ["id"], At = {
|
|
|
558
565
|
xmlns: r(Ct),
|
|
559
566
|
viewBox: `0 0 ${G.value.width} ${G.value.height}`,
|
|
560
567
|
class: He({
|
|
561
|
-
"vue-data-ui-fullscreen--on":
|
|
562
|
-
"vue-data-ui-fulscreen--off": !
|
|
568
|
+
"vue-data-ui-fullscreen--on": M.value,
|
|
569
|
+
"vue-data-ui-fulscreen--off": !M.value
|
|
563
570
|
}),
|
|
564
571
|
style: L(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
|
|
565
572
|
}, [
|
|
@@ -601,24 +608,24 @@ const It = ["id"], At = {
|
|
|
601
608
|
stroke: e.value.style.chart.links.stroke,
|
|
602
609
|
"stroke-width": e.value.style.chart.links.strokeWidth,
|
|
603
610
|
style: L(`
|
|
604
|
-
opacity:${k.value ? k.value.includes(o.source) && k.value.includes(o.target) ? 1 : 0.3 :
|
|
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}
|
|
605
612
|
`)
|
|
606
|
-
}, null, 12,
|
|
613
|
+
}, null, 12, Rt))), 256)),
|
|
607
614
|
(d(!0), g(W, null, j(m.value.nodes, (o, a) => (d(), g("rect", {
|
|
608
615
|
class: "vue-ui-flow-node",
|
|
609
616
|
x: o.x,
|
|
610
617
|
y: r($)(o.absoluteY) + e.value.style.chart.padding.top,
|
|
611
618
|
height: r($)(o.height),
|
|
612
|
-
width:
|
|
619
|
+
width: H.value,
|
|
613
620
|
fill: o.color,
|
|
614
621
|
stroke: e.value.style.chart.nodes.stroke,
|
|
615
622
|
"stroke-width": e.value.style.chart.nodes.strokeWidth,
|
|
616
623
|
onMouseenter: (s) => nt(o),
|
|
617
624
|
onMouseleave: l[0] || (l[0] = (s) => Oe()),
|
|
618
625
|
style: L(`opacity:${k.value ? k.value.includes(o.name) ? 1 : 0.3 : 1}`)
|
|
619
|
-
}, null, 44,
|
|
626
|
+
}, null, 44, Dt))), 256)),
|
|
620
627
|
(d(!0), g(W, null, j(m.value.nodes, (o, a) => (d(), g("text", {
|
|
621
|
-
x: o.x +
|
|
628
|
+
x: o.x + H.value / 2,
|
|
622
629
|
y: r($)(
|
|
623
630
|
o.absoluteY + o.height / 2 - e.value.style.chart.nodes.labels.fontSize / 4
|
|
624
631
|
) + e.value.style.chart.padding.top,
|
|
@@ -631,7 +638,7 @@ const It = ["id"], At = {
|
|
|
631
638
|
length: e.value.style.chart.nodes.labels.abbreviation.length
|
|
632
639
|
}) : o.name), 13, Ut))), 256)),
|
|
633
640
|
(d(!0), g(W, null, j(m.value.nodes, (o, a) => (d(), g("text", {
|
|
634
|
-
x: o.x +
|
|
641
|
+
x: o.x + H.value / 2,
|
|
635
642
|
y: r($)(
|
|
636
643
|
o.absoluteY + o.height / 2 + e.value.style.chart.nodes.labels.fontSize
|
|
637
644
|
) + e.value.style.chart.padding.top,
|
|
@@ -653,9 +660,9 @@ const It = ["id"], At = {
|
|
|
653
660
|
b(t.$slots, "svg", { svg: G.value }, void 0, !0)
|
|
654
661
|
], 14, zt)),
|
|
655
662
|
t.$slots.watermark ? (d(), g("div", Gt, [
|
|
656
|
-
b(t.$slots, "watermark",
|
|
663
|
+
b(t.$slots, "watermark", U(V({ isPrinting: r(we) || r($e) })), void 0, !0)
|
|
657
664
|
])) : _("", !0),
|
|
658
|
-
te.value ? _("", !0) : (d(),
|
|
665
|
+
te.value ? _("", !0) : (d(), R(r(je), {
|
|
659
666
|
key: 5,
|
|
660
667
|
config: {
|
|
661
668
|
type: "flow",
|
|
@@ -668,7 +675,7 @@ const It = ["id"], At = {
|
|
|
668
675
|
ref_key: "chartLegend",
|
|
669
676
|
ref: Je
|
|
670
677
|
}, [
|
|
671
|
-
e.value.style.chart.legend.show && Ae.value.length ? (d(),
|
|
678
|
+
e.value.style.chart.legend.show && Ae.value.length ? (d(), R(St, {
|
|
672
679
|
key: 0,
|
|
673
680
|
legendSet: Ae.value,
|
|
674
681
|
config: rt.value,
|
|
@@ -698,20 +705,20 @@ const It = ["id"], At = {
|
|
|
698
705
|
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
699
706
|
position: e.value.style.chart.tooltip.position,
|
|
700
707
|
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
701
|
-
parent:
|
|
708
|
+
parent: z.value,
|
|
702
709
|
content: ae.value,
|
|
703
710
|
isCustom: J.value,
|
|
704
|
-
isFullscreen:
|
|
711
|
+
isFullscreen: M.value
|
|
705
712
|
}, {
|
|
706
713
|
"tooltip-before": w(() => [
|
|
707
|
-
b(t.$slots, "tooltip-before",
|
|
714
|
+
b(t.$slots, "tooltip-before", U(V({ ...re.value })), void 0, !0)
|
|
708
715
|
]),
|
|
709
716
|
"tooltip-after": w(() => [
|
|
710
|
-
b(t.$slots, "tooltip-after",
|
|
717
|
+
b(t.$slots, "tooltip-after", U(V({ ...re.value })), void 0, !0)
|
|
711
718
|
]),
|
|
712
719
|
_: 3
|
|
713
720
|
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen"]),
|
|
714
|
-
te.value ? (d(),
|
|
721
|
+
te.value ? (d(), R(r(Ue), {
|
|
715
722
|
key: 7,
|
|
716
723
|
hideDetails: "",
|
|
717
724
|
config: {
|
|
@@ -752,7 +759,7 @@ const It = ["id"], At = {
|
|
|
752
759
|
}, 8, ["config"])) : _("", !0)
|
|
753
760
|
], 46, It));
|
|
754
761
|
}
|
|
755
|
-
}, so = /* @__PURE__ */ Lt(qt, [["__scopeId", "data-v-
|
|
762
|
+
}, so = /* @__PURE__ */ Lt(qt, [["__scopeId", "data-v-3da6170d"]]);
|
|
756
763
|
export {
|
|
757
764
|
so as default
|
|
758
765
|
};
|