vue-data-ui 3.0.0-next.9 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -30
- package/dist/{Arrow-B6OlqyCG.js → Arrow-r2f8Bpd-.js} +1 -1
- package/dist/{BaseDraggableDialog-CA8QOk7L.js → BaseDraggableDialog-CGGcf8d8.js} +4 -4
- package/dist/{BaseIcon-DxUUKVlt.js → BaseIcon-CXtL10fo.js} +1 -1
- package/dist/{ColorPicker-Bh1dfgXt.js → ColorPicker-H91bBsqM.js} +2 -2
- package/dist/{DataTable--paavNqF.js → DataTable-BSSXpM7w.js} +2 -2
- package/dist/{Legend-BZ06qU55.js → Legend-BUk0WvWJ.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DN9XjEHv.js → NonSvgPenAndPaper-DQDgPoW8.js} +3 -3
- package/dist/{PackageVersion-2QvaZf9_.js → PackageVersion-CJ6Vd7V5.js} +3 -3
- package/dist/{PenAndPaper-hGgW0EHz.js → PenAndPaper-D3zudcNI.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-Mr1eIp_G.js → Shape-BRzOzubn.js} +43 -37
- package/dist/Slicer-MID8pgT3.js +602 -0
- package/dist/{SparkTooltip-Czhz446b.js → SparkTooltip-DATI1fGZ.js} +7 -7
- package/dist/{Title-B2dA6-uH.js → Title-BGu6gEd2.js} +1 -1
- package/dist/{Tooltip-O_hCvqgF.js → Tooltip-Bh2zYSoM.js} +23 -19
- package/dist/{UserOptions-Bk03FRqW.js → UserOptions-Ck8fz9f4.js} +2 -2
- package/dist/{dom-to-png-Bt5F9TXw.js → dom-to-png-DhIh24Ti.js} +1 -1
- package/dist/{img-C_9wps3s.js → img-DrR839Ot.js} +1 -1
- package/dist/{index-CgShIRes.js → index-BtNwOUja.js} +2885 -2010
- package/dist/{pdf-CXdbjyRJ.js → pdf-DoShrdT5.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +753 -65
- package/dist/types/vue-data-ui.d.ts +753 -65
- package/dist/useAutoSizeLabelsInsideViewbox-FmDQyX4z.js +81 -0
- package/dist/useFitSvgText-2crs6Fv5.js +69 -0
- package/dist/useLoading-D7YHNtLX.js +29 -0
- package/dist/useNestedProp-f2H3m6Yj.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-rIrqBbbm.js → usePrinter-DUNjpQNe.js} +2 -2
- package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
- package/dist/{useTimeLabels-DG97x2hL.js → useTimeLabels-DkzmKfZn.js} +208 -156
- package/dist/{vue-data-ui-DiwfJSwC.js → vue-data-ui-D7QVxNhO.js} +105 -100
- package/dist/vue-data-ui.js +26 -25
- package/dist/vue-ui-3d-bar-ITaF-6Kn.js +1323 -0
- package/dist/{vue-ui-accordion-hlzscmAS.js → vue-ui-accordion-BKUrAowe.js} +3 -3
- package/dist/vue-ui-age-pyramid-DxsuDr6o.js +835 -0
- package/dist/{vue-ui-annotator-BHwBUNRO.js → vue-ui-annotator-B06QtxgJ.js} +12 -12
- package/dist/vue-ui-bullet-B7Fy45tA.js +571 -0
- package/dist/vue-ui-candlestick-Dw0U4uIQ.js +1000 -0
- package/dist/{vue-ui-carousel-table-6MTDYf-H.js → vue-ui-carousel-table-DGz0nw28.js} +29 -29
- package/dist/{vue-ui-chestnut-Cr6dK21e.js → vue-ui-chestnut-CFfKYm9i.js} +664 -536
- package/dist/vue-ui-chord-EhlQhMSs.js +1038 -0
- package/dist/vue-ui-circle-pack-BHrrEUUd.js +709 -0
- package/dist/{vue-ui-cursor-Ch5yUxNn.js → vue-ui-cursor-Dd-HtWzG.js} +2 -2
- package/dist/{vue-ui-dashboard-tVZ9aEHo.js → vue-ui-dashboard-6R8udDY3.js} +64 -64
- package/dist/{vue-ui-digits-BOlYLluF.js → vue-ui-digits-zKn3uhGN.js} +2 -2
- package/dist/{vue-ui-donut-BKwAnTKA.js → vue-ui-donut-BtnIwS_E.js} +431 -422
- package/dist/vue-ui-donut-evolution-DHo1MuMM.js +1076 -0
- package/dist/vue-ui-dumbbell-Czi9r9Na.js +1120 -0
- package/dist/vue-ui-flow-jOfM0RZY.js +841 -0
- package/dist/{vue-ui-funnel-CAV6A--C.js → vue-ui-funnel-tBvVpdhy.js} +16 -16
- package/dist/vue-ui-galaxy-IdoY2oqG.js +680 -0
- package/dist/vue-ui-gauge-DR6Xm_Hz.js +791 -0
- package/dist/vue-ui-gizmo-Dto73UsB.js +210 -0
- package/dist/vue-ui-heatmap-zmFv-0z1.js +1078 -0
- package/dist/vue-ui-history-plot-ILemyyYw.js +1074 -0
- package/dist/{vue-ui-kpi-DjHXc1Z9.js → vue-ui-kpi-hmqSCvxr.js} +26 -26
- package/dist/{vue-ui-mini-loader-C68r9wbr.js → vue-ui-mini-loader-CbD-E8ci.js} +2 -2
- package/dist/vue-ui-molecule-mTy6YIm6.js +656 -0
- package/dist/vue-ui-mood-radar-BEnSYV3Q.js +785 -0
- package/dist/vue-ui-nested-donuts-CGE9dmJK.js +1284 -0
- package/dist/vue-ui-onion-Dh2J9GV0.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-xsgmMIJK.js +916 -0
- package/dist/{vue-ui-quadrant-ULvVhjjq.js → vue-ui-quadrant-DA0Kw6eq.js} +512 -459
- package/dist/vue-ui-quick-chart-DKbxF5Yt.js +1762 -0
- package/dist/vue-ui-radar-BFY9bN_h.js +796 -0
- package/dist/{vue-ui-rating-CkdVnYpj.js → vue-ui-rating-Bh35aujf.js} +2 -2
- package/dist/vue-ui-relation-circle-B-05kQ_l.js +598 -0
- package/dist/vue-ui-ridgeline-CuGfF83t.js +1157 -0
- package/dist/vue-ui-rings-DrQXXzAM.js +728 -0
- package/dist/vue-ui-scatter-CWn9c7e9.js +1178 -0
- package/dist/{vue-ui-skeleton-BsBaCvoE.js → vue-ui-skeleton-oG4Bm5nL.js} +13 -13
- package/dist/{vue-ui-smiley-B2sBY2Q-.js → vue-ui-smiley-Cnwba_gV.js} +46 -46
- package/dist/vue-ui-spark-trend-D9iNCf4o.js +315 -0
- package/dist/vue-ui-sparkbar-iJkiubZC.js +351 -0
- package/dist/vue-ui-sparkgauge-BH3uA5rh.js +232 -0
- package/dist/vue-ui-sparkhistogram-B3kR62pf.js +380 -0
- package/dist/vue-ui-sparkline-DczR2ZAf.js +513 -0
- package/dist/vue-ui-sparkstackbar-Cg0ItRGH.js +421 -0
- package/dist/vue-ui-stackbar-d4PrzcGS.js +1371 -0
- package/dist/vue-ui-strip-plot-BXBpN5rl.js +916 -0
- package/dist/{vue-ui-table-DaE8lQuo.js → vue-ui-table-BXOLZXuz.js} +17 -17
- package/dist/{vue-ui-table-heatmap--dSEG8cU.js → vue-ui-table-heatmap-7YT7VF2H.js} +5 -5
- package/dist/{vue-ui-table-sparkline-D4DkGvDP.js → vue-ui-table-sparkline-BfgqajJ2.js} +19 -16
- package/dist/vue-ui-thermometer-C7Tg6HLz.js +541 -0
- package/dist/{vue-ui-timer-CYXTAh6x.js → vue-ui-timer-Ch5JP1pQ.js} +5 -5
- package/dist/vue-ui-tiremarks-fY-4pWAK.js +406 -0
- package/dist/vue-ui-treemap-DTSX6suB.js +1035 -0
- package/dist/{vue-ui-vertical-bar-CO9eR1ty.js → vue-ui-vertical-bar-C-i2dRnU.js} +104 -102
- package/dist/vue-ui-waffle-BbgLlhGH.js +910 -0
- package/dist/vue-ui-wheel-waZf462K.js +379 -0
- package/dist/vue-ui-word-cloud-DtLK91Dk.js +765 -0
- package/dist/{vue-ui-world-P45Plcqw.js → vue-ui-world-Cx4uuwTY.js} +364 -327
- package/dist/vue-ui-xy-DDOT8cyx.js +3808 -0
- package/dist/{vue-ui-xy-canvas-DgNBgUak.js → vue-ui-xy-canvas-CUCsC8vD.js} +265 -264
- package/package.json +4 -4
- package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
- package/dist/Slicer-3t0HimeE.js +0 -577
- package/dist/useLoading-Bt5Doa8m.js +0 -28
- package/dist/useNestedProp-BC4Ciblw.js +0 -13
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-3d-bar-BqmzX9u4.js +0 -1227
- package/dist/vue-ui-age-pyramid-eRPt0BJb.js +0 -746
- package/dist/vue-ui-bullet-BSnF2gql.js +0 -513
- package/dist/vue-ui-candlestick-kMbNnoYe.js +0 -873
- package/dist/vue-ui-chord-Dxy_bfIE.js +0 -949
- package/dist/vue-ui-circle-pack-I_p4FPiW.js +0 -673
- package/dist/vue-ui-donut-evolution-DQhZJ4Sa.js +0 -903
- package/dist/vue-ui-dumbbell-DdN-7b3g.js +0 -753
- package/dist/vue-ui-flow-MvORTthN.js +0 -765
- package/dist/vue-ui-galaxy-B0PLMAn8.js +0 -617
- package/dist/vue-ui-gauge-C4FTzDFt.js +0 -738
- package/dist/vue-ui-gizmo-Dl5FHFb4.js +0 -192
- package/dist/vue-ui-heatmap-C3dee43W.js +0 -877
- package/dist/vue-ui-history-plot-dqv4u1Oa.js +0 -924
- package/dist/vue-ui-molecule-DtRAlfhC.js +0 -597
- package/dist/vue-ui-mood-radar-BZj2G0zE.js +0 -670
- package/dist/vue-ui-nested-donuts-OqJTwMb2.js +0 -1212
- package/dist/vue-ui-onion-DXLokGec.js +0 -701
- package/dist/vue-ui-parallel-coordinate-plot-tg7QhtIE.js +0 -807
- package/dist/vue-ui-quick-chart-4EODniQ3.js +0 -1612
- package/dist/vue-ui-radar-Dt5p5oSy.js +0 -741
- package/dist/vue-ui-relation-circle-_SysXj9T.js +0 -542
- package/dist/vue-ui-ridgeline-Cs5UihNN.js +0 -969
- package/dist/vue-ui-rings-Duay-EmS.js +0 -685
- package/dist/vue-ui-scatter-C6oGQcbL.js +0 -1045
- package/dist/vue-ui-spark-trend-CEAqGu3d.js +0 -291
- package/dist/vue-ui-sparkbar-ByPUDc6x.js +0 -301
- package/dist/vue-ui-sparkgauge-C-GKwevJ.js +0 -201
- package/dist/vue-ui-sparkhistogram-Dz0DdaVW.js +0 -313
- package/dist/vue-ui-sparkline-BULntz_U.js +0 -459
- package/dist/vue-ui-sparkstackbar-DXjHOeeU.js +0 -381
- package/dist/vue-ui-stackbar-CeP9n7zy.js +0 -1207
- package/dist/vue-ui-strip-plot-CaFQkWV8.js +0 -761
- package/dist/vue-ui-thermometer-BXf14CYH.js +0 -495
- package/dist/vue-ui-tiremarks-D6hJ1cd4.js +0 -358
- package/dist/vue-ui-treemap-tBurCrdn.js +0 -965
- package/dist/vue-ui-waffle-BNzs_BxY.js +0 -863
- package/dist/vue-ui-wheel-tydUATi8.js +0 -352
- package/dist/vue-ui-word-cloud-DUUc_tj6.js +0 -659
- package/dist/vue-ui-xy--HToGdle.js +0 -2982
|
@@ -0,0 +1,841 @@
|
|
|
1
|
+
import { defineAsyncComponent as q, ref as v, computed as m, onMounted as Yt, toRefs as Gt, watch as Ie, createElementBlock as p, openBlock as i, unref as r, normalizeStyle as D, normalizeClass as gt, createBlock as K, createCommentVNode as N, createElementVNode as re, createVNode as Le, createSlots as jt, withCtx as $, renderSlot as C, normalizeProps as Z, guardReactiveProps as J, Fragment as ue, renderList as ie, toDisplayString as ce, createTextVNode as Ut, nextTick as Vt } from "vue";
|
|
2
|
+
import { u as Xt, c as ze, t as qt, o as mt, f as Kt, a as Zt, p as L, b as Jt, d as Qt, h as T, e as eo, i as ve, X as to, F as yt, L as oo, k as Be, v as lo, w as ao, y as no } from "./index-BtNwOUja.js";
|
|
3
|
+
import { u as bt } from "./useNestedProp-f2H3m6Yj.js";
|
|
4
|
+
import { u as so } from "./usePrinter-DUNjpQNe.js";
|
|
5
|
+
import { u as ro } from "./useUserOptionState-BIvW1Kz7.js";
|
|
6
|
+
import { u as uo } from "./useChartAccessibility-9icAAmYg.js";
|
|
7
|
+
import io from "./Legend-BUk0WvWJ.js";
|
|
8
|
+
import co from "./Title-BGu6gEd2.js";
|
|
9
|
+
import vo from "./img-DrR839Ot.js";
|
|
10
|
+
import { t as ho, u as fo } from "./useResponsive-DfdjqQps.js";
|
|
11
|
+
import { u as po, B as go } from "./useLoading-D7YHNtLX.js";
|
|
12
|
+
import { _ as mo } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
+
const yo = ["id"], bo = {
|
|
14
|
+
key: 1,
|
|
15
|
+
ref: "noTitle",
|
|
16
|
+
class: "vue-data-ui-no-title-space",
|
|
17
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
18
|
+
}, Co = ["xmlns", "viewBox"], ko = ["width", "height"], wo = ["id"], $o = ["stop-color"], Ao = ["stop-color"], To = ["d", "fill", "stroke", "stroke-width"], xo = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "onMouseenter", "onMouseleave", "onClick"], _o = { key: 1 }, So = ["x", "y", "font-size", "fill"], Oo = ["x", "y", "font-size", "fill"], No = {
|
|
19
|
+
key: 4,
|
|
20
|
+
class: "vue-data-ui-watermark"
|
|
21
|
+
}, Fo = ["onClick"], Eo = ["innerHTML"], Mo = {
|
|
22
|
+
__name: "vue-ui-flow",
|
|
23
|
+
props: {
|
|
24
|
+
config: {
|
|
25
|
+
type: Object,
|
|
26
|
+
default() {
|
|
27
|
+
return {};
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
dataset: {
|
|
31
|
+
type: Array,
|
|
32
|
+
default() {
|
|
33
|
+
return [];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
setup(Ct, { expose: kt }) {
|
|
38
|
+
const wt = q(() => import("./vue-ui-accordion-BKUrAowe.js")), $t = q(() => import("./DataTable-BSSXpM7w.js")), At = q(() => import("./PackageVersion-CJ6Vd7V5.js")), Tt = q(() => import("./PenAndPaper-D3zudcNI.js")), xt = q(() => import("./Tooltip-Bh2zYSoM.js")), _t = q(() => import("./UserOptions-Ck8fz9f4.js")), { vue_ui_flow: St } = Xt(), F = Ct, we = v(ze()), z = v(null), He = v(0), Re = v(0), $e = v(!1), Ae = v(""), De = v(null), We = v(null), Ye = v(null), Q = v(null), de = v(null), Ge = m(() => !!F.dataset && F.dataset.length);
|
|
39
|
+
Yt(() => {
|
|
40
|
+
Ue();
|
|
41
|
+
});
|
|
42
|
+
const j = v(!1);
|
|
43
|
+
function je(o) {
|
|
44
|
+
j.value = o, He.value += 1;
|
|
45
|
+
}
|
|
46
|
+
const e = v(Se()), { loading: Te, FINAL_DATASET: he, manualLoading: xe } = po({
|
|
47
|
+
...Gt(F),
|
|
48
|
+
FINAL_CONFIG: e,
|
|
49
|
+
prepareConfig: Se,
|
|
50
|
+
skeletonDataset: [
|
|
51
|
+
["A", "B", 2, "#CACACA"],
|
|
52
|
+
["B", "C", 1, "#CACACA"],
|
|
53
|
+
["C", "D", 0.5, "#CACACA"],
|
|
54
|
+
["E", "F", 1, "#AAAAAA"],
|
|
55
|
+
["F", "G", 0.5, "#AAAAAA"],
|
|
56
|
+
["G", "H", 0.25, "#AAAAAA"]
|
|
57
|
+
],
|
|
58
|
+
skeletonConfig: qt({
|
|
59
|
+
defaultConfig: e.value,
|
|
60
|
+
userConfig: {
|
|
61
|
+
userOptions: { show: !1 },
|
|
62
|
+
nodeCategories: {
|
|
63
|
+
B: "A",
|
|
64
|
+
C: "B"
|
|
65
|
+
},
|
|
66
|
+
nodeCategoryColors: {
|
|
67
|
+
A: "#CACACA",
|
|
68
|
+
B: "#AAAAAA"
|
|
69
|
+
},
|
|
70
|
+
table: { show: !1 },
|
|
71
|
+
style: {
|
|
72
|
+
chart: {
|
|
73
|
+
backgroundColor: "#99999930",
|
|
74
|
+
legend: {
|
|
75
|
+
backgroundColor: "transparent"
|
|
76
|
+
},
|
|
77
|
+
nodes: {
|
|
78
|
+
labels: {
|
|
79
|
+
show: !1
|
|
80
|
+
},
|
|
81
|
+
stroke: "#666666"
|
|
82
|
+
},
|
|
83
|
+
links: {
|
|
84
|
+
stroke: "#666666"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
}), Ot = m(() => !!e.value.debug);
|
|
91
|
+
function Ue() {
|
|
92
|
+
if (mt(F.dataset) && (Kt({
|
|
93
|
+
componentName: "VueUiFlow",
|
|
94
|
+
type: "dataset",
|
|
95
|
+
debug: Ot.value
|
|
96
|
+
}), xe.value = !0), mt(F.dataset) || (xe.value = e.value.loading), e.value.responsive) {
|
|
97
|
+
const o = ho(() => {
|
|
98
|
+
const { width: l, height: t } = fo({
|
|
99
|
+
chart: z.value,
|
|
100
|
+
title: e.value.style.chart.title.text ? We.value : null,
|
|
101
|
+
legend: e.value.style.chart.legend.show ? De.value : null,
|
|
102
|
+
source: Ye.value
|
|
103
|
+
});
|
|
104
|
+
requestAnimationFrame(() => {
|
|
105
|
+
Ke.value = l, Ze.value = t;
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
Q.value && (de.value && Q.value.unobserve(de.value), Q.value.disconnect()), Q.value = new ResizeObserver(o), de.value = z.value.parentNode, Q.value.observe(de.value);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
const { userOptionsVisible: _e, setUserOptionsVisibility: Ve, keepUserOptionState: Xe } = ro({ config: e.value }), { svgRef: qe } = uo({
|
|
112
|
+
config: e.value.style.chart.title
|
|
113
|
+
});
|
|
114
|
+
function Se() {
|
|
115
|
+
const o = bt({
|
|
116
|
+
userConfig: F.config,
|
|
117
|
+
defaultConfig: St
|
|
118
|
+
});
|
|
119
|
+
let l = o;
|
|
120
|
+
return o.theme ? l = {
|
|
121
|
+
...bt({
|
|
122
|
+
userConfig: Jt.vue_ui_flow[o.theme] || F.config,
|
|
123
|
+
defaultConfig: o
|
|
124
|
+
}),
|
|
125
|
+
customPalette: Zt[o.theme] || L
|
|
126
|
+
} : l = o, l.nodeCategories = F.config.nodeCategories || {}, l.nodeCategoryColors = F.config.nodeCategoryColors || {}, l;
|
|
127
|
+
}
|
|
128
|
+
const Ke = v(e.value.style.chart.width), Ze = v(e.value.style.chart.height);
|
|
129
|
+
Ie(
|
|
130
|
+
() => F.config,
|
|
131
|
+
(o) => {
|
|
132
|
+
Te.value || (e.value = Se()), _e.value = !e.value.userOptions.showOnChartHover, Ue(), Re.value += 1, M.value.showTable = e.value.table.show;
|
|
133
|
+
},
|
|
134
|
+
{ deep: !0 }
|
|
135
|
+
), Ie(() => F.dataset, (o) => {
|
|
136
|
+
Array.isArray(o) && o.length > 0 && (xe.value = !1);
|
|
137
|
+
}, { deep: !0 });
|
|
138
|
+
const { isPrinting: Je, isImaging: Qe, generatePdf: et, generateImage: tt } = so({
|
|
139
|
+
elementId: `flow_${we.value}`,
|
|
140
|
+
fileName: e.value.style.chart.title.text || "vue-ui-flow",
|
|
141
|
+
options: e.value.userOptions.print
|
|
142
|
+
}), Nt = m(() => e.value.userOptions.show && !e.value.style.chart.title.text), fe = m(() => Qt(e.value.customPalette)), pe = m(() => e.value.style.chart.nodes.width), M = v({
|
|
143
|
+
showTable: e.value.table.show,
|
|
144
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
145
|
+
});
|
|
146
|
+
Ie(e, () => {
|
|
147
|
+
M.value = {
|
|
148
|
+
showTable: e.value.table.show,
|
|
149
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
150
|
+
};
|
|
151
|
+
}, { immediate: !0 });
|
|
152
|
+
const ot = m(() => !he.value || !he.value.length ? [] : he.value.map((o, l) => [
|
|
153
|
+
o[0],
|
|
154
|
+
o[1],
|
|
155
|
+
T(o[2]),
|
|
156
|
+
o[3] ? eo(o[3]) : fe.value[l] || fe.value[l % fe.value.length] || L[l] || L[l % L.length]
|
|
157
|
+
]));
|
|
158
|
+
function Ft(o) {
|
|
159
|
+
const l = {}, t = {};
|
|
160
|
+
function n(a, u) {
|
|
161
|
+
l[a] || (l[a] = {
|
|
162
|
+
level: null,
|
|
163
|
+
inflow: 0,
|
|
164
|
+
outflow: 0,
|
|
165
|
+
children: [],
|
|
166
|
+
color: null,
|
|
167
|
+
uid: ze()
|
|
168
|
+
}), l[a].level === null && (l[a].level = u), t[u] || (t[u] = []), t[u].includes(a) || t[u].push(a);
|
|
169
|
+
}
|
|
170
|
+
o.forEach(([a, u, d]) => {
|
|
171
|
+
const h = l[a]?.level ?? 0, _ = h + 1;
|
|
172
|
+
n(a, h), n(u, _), l[a].children.push({ target: u, value: d }), l[a].outflow += d, l[u].inflow += d;
|
|
173
|
+
});
|
|
174
|
+
const s = new Set(o.map(([a]) => a)), w = new Set(o.map(([, a]) => a)), V = Array.from(s).filter((a) => !w.has(a)), le = {};
|
|
175
|
+
V.forEach((a, u) => {
|
|
176
|
+
le[a] = fe.value[u] || L[u % L.length];
|
|
177
|
+
});
|
|
178
|
+
const ae = {};
|
|
179
|
+
o.forEach(([a, u, d, h]) => {
|
|
180
|
+
h && (ae[a] = h, ae[u] = h);
|
|
181
|
+
}), Object.keys(l).forEach((a, u) => {
|
|
182
|
+
const d = e.value.nodeCategories?.[a], h = d ? e.value.nodeCategoryColors?.[d] : null;
|
|
183
|
+
l[a].color = ae[a] || h || (V.includes(a) ? le[a] : null) || L[u % L.length];
|
|
184
|
+
}), Object.keys(l).forEach((a) => {
|
|
185
|
+
l[a].value = Math.max(l[a].inflow, l[a].outflow);
|
|
186
|
+
});
|
|
187
|
+
const be = ee.value, Fe = nt.value.width, X = nt.value.height, I = Object.keys(t).map(Number).sort((a, u) => a - u), Ce = I.length || 1, Ee = Ce > 1 ? Fe / (Ce - 1) : 0, A = Number(pe.value), P = Number(
|
|
188
|
+
e.value.style.chart.nodes.gapPx ?? e.value.style.chart.nodes.gap ?? 8
|
|
189
|
+
), ne = Number(e.value.style.chart.nodes.minHeight || 0);
|
|
190
|
+
function c(a) {
|
|
191
|
+
const u = t[a], d = u.length;
|
|
192
|
+
if (!d) return 1 / 0;
|
|
193
|
+
const h = Math.max(0, (d - 1) * P), _ = Math.max(0, X - h), B = Math.min(ne, d ? _ / d : 0);
|
|
194
|
+
let b = 0, S = u.map((f) => l[f].value || 0), y = S.reduce((f, O) => f + O, 0);
|
|
195
|
+
for (let f = 0; f < 12; f += 1) {
|
|
196
|
+
const O = y > 0 ? (_ - b) / y : 0, H = [];
|
|
197
|
+
for (let E = 0; E < S.length; E += 1) {
|
|
198
|
+
const R = S[E];
|
|
199
|
+
R < 0 || R * O < B && H.push(E);
|
|
200
|
+
}
|
|
201
|
+
if (!H.length) return Math.max(0, O);
|
|
202
|
+
for (const E of H)
|
|
203
|
+
b += B, y -= S[E], S[E] = -1;
|
|
204
|
+
if (y <= 0) return 0;
|
|
205
|
+
}
|
|
206
|
+
return y > 0 ? Math.max(0, (_ - b) / y) : 0;
|
|
207
|
+
}
|
|
208
|
+
const g = I.map(c), Y = g.length ? Math.min(...g) : 0, G = {};
|
|
209
|
+
I.forEach((a) => {
|
|
210
|
+
const u = t[a], d = u.length, h = Math.max(0, (d - 1) * P), _ = Math.max(0, X - h), B = Math.min(ne, d ? _ / d : 0), b = u.map(
|
|
211
|
+
(f) => Math.max(B, (l[f].value || 0) * Y)
|
|
212
|
+
), S = b.reduce((f, O) => f + O, 0) + h;
|
|
213
|
+
let y = Math.max(0, (X - S) / 2);
|
|
214
|
+
u.forEach((f, O) => {
|
|
215
|
+
const H = b[O], E = be.left + a * Ee, R = y;
|
|
216
|
+
G[f] = {
|
|
217
|
+
x: E,
|
|
218
|
+
y: R,
|
|
219
|
+
absoluteY: R,
|
|
220
|
+
height: H,
|
|
221
|
+
i: O,
|
|
222
|
+
color: l[f].color,
|
|
223
|
+
value: l[f].value
|
|
224
|
+
}, y += H, O < d - 1 && (y += P);
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
const ht = [], se = be.top, Me = {}, Pe = {};
|
|
228
|
+
Object.keys(l).forEach((a) => {
|
|
229
|
+
Me[a] = G[a]?.y ?? 0, Pe[a] = 0;
|
|
230
|
+
});
|
|
231
|
+
const Bt = 1e-6, Ht = 0.25;
|
|
232
|
+
return I.forEach((a) => {
|
|
233
|
+
t[a].forEach((d) => {
|
|
234
|
+
const h = l[d], _ = G[d];
|
|
235
|
+
if (!h.children || !h.children.length) return;
|
|
236
|
+
let B = _.y;
|
|
237
|
+
h.children.forEach(({ target: b, value: S }) => {
|
|
238
|
+
const y = G[b], f = l[b], O = h.outflow > 0 ? S / h.outflow : 0, H = f.inflow > 0 ? S / f.inflow : 0, E = T(B + se), R = T(B + O * _.height + se), ft = Me[b];
|
|
239
|
+
let ke = ft + H * y.height;
|
|
240
|
+
Pe[b] += S;
|
|
241
|
+
const Rt = f.inflow > 0 && Pe[b] >= f.inflow - Bt, pt = y.y + y.height;
|
|
242
|
+
(Rt || ke > pt - Ht) && (ke = pt);
|
|
243
|
+
const Dt = T(ft + se), Wt = T(ke + se);
|
|
244
|
+
ht.push({
|
|
245
|
+
id: ze(),
|
|
246
|
+
source: d,
|
|
247
|
+
target: b,
|
|
248
|
+
path: `M ${T(_.x + A)} ${E} L ${T(_.x + A)} ${R} L ${T(y.x)} ${Wt} L ${T(y.x)} ${Dt} Z`,
|
|
249
|
+
value: S,
|
|
250
|
+
sourceColor: h.color,
|
|
251
|
+
targetColor: l[b].color
|
|
252
|
+
}), B = R - se, Me[b] = ke;
|
|
253
|
+
});
|
|
254
|
+
});
|
|
255
|
+
}), { nodeCoordinates: G, links: ht };
|
|
256
|
+
}
|
|
257
|
+
const x = m(() => {
|
|
258
|
+
const o = Ft(he.value);
|
|
259
|
+
return {
|
|
260
|
+
nodes: Object.keys(o.nodeCoordinates).map((l, t) => ({
|
|
261
|
+
...o.nodeCoordinates[l],
|
|
262
|
+
name: l
|
|
263
|
+
})),
|
|
264
|
+
links: o.links
|
|
265
|
+
};
|
|
266
|
+
}), lt = m(() => Ke.value), at = m(() => Ze.value), ee = m(() => e.value.style.chart.padding), nt = m(() => ({
|
|
267
|
+
width: Math.max(0, lt.value - 40 - ee.value.right - ee.value.left),
|
|
268
|
+
height: Math.max(0, at.value - ee.value.top - ee.value.bottom)
|
|
269
|
+
})), te = m(() => ({
|
|
270
|
+
width: lt.value,
|
|
271
|
+
height: at.value
|
|
272
|
+
}));
|
|
273
|
+
function Et(o) {
|
|
274
|
+
const l = {}, t = {}, n = /* @__PURE__ */ new Set();
|
|
275
|
+
return ot.value.forEach(([s, w, V]) => {
|
|
276
|
+
l[s] || (l[s] = []), t[w] || (t[w] = []), l[s].push(w), t[w].push(s);
|
|
277
|
+
}), l[o] && l[o].forEach((s) => n.add(s)), t[o] && t[o].forEach((s) => n.add(s)), Array.from(n).concat(o);
|
|
278
|
+
}
|
|
279
|
+
const k = v(null), U = v(null), oe = v(null), ge = v(!1);
|
|
280
|
+
function Mt(o, l) {
|
|
281
|
+
W.value = [], k.value = Et(o.name), U.value = o.name;
|
|
282
|
+
const t = o.name, n = ot.value;
|
|
283
|
+
let s = 0, w = 0, V = [], le = [];
|
|
284
|
+
const ae = new Set(n.map(([c]) => c)), be = new Set(n.map(([, c]) => c)), Fe = Array.from(ae).filter((c) => !be.has(c)), X = n.filter(([c]) => Fe.includes(c)).reduce((c, [g, Y, G]) => c + G, 0), I = {};
|
|
285
|
+
x.value.nodes.forEach((c) => {
|
|
286
|
+
I[c.name] = c.color;
|
|
287
|
+
}), n.forEach(([c, g, Y]) => {
|
|
288
|
+
g === t && (s += Y, V.push({ source: c, value: Y, color: I[c] })), c === t && (w += Y, le.push({ target: g, value: Y, color: I[g] }));
|
|
289
|
+
});
|
|
290
|
+
const Ce = Math.max(s, w), Ee = X > 0 ? Ce / X * 100 : 0, A = {
|
|
291
|
+
name: t,
|
|
292
|
+
inflow: s,
|
|
293
|
+
outflow: w,
|
|
294
|
+
from: V,
|
|
295
|
+
to: le,
|
|
296
|
+
percentOfTotal: Ee,
|
|
297
|
+
color: I[t] || "#000000"
|
|
298
|
+
};
|
|
299
|
+
e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: A, seriesIndex: l }), oe.value = { datapoint: A }, $e.value = !0;
|
|
300
|
+
let P = "";
|
|
301
|
+
const ne = e.value.style.chart.tooltip.customFormat;
|
|
302
|
+
if (ge.value = !1, no(ne))
|
|
303
|
+
try {
|
|
304
|
+
const c = ne({
|
|
305
|
+
datapoint: A,
|
|
306
|
+
series: x.value,
|
|
307
|
+
config: e.value
|
|
308
|
+
});
|
|
309
|
+
typeof c == "string" && (Ae.value = c, ge.value = !0);
|
|
310
|
+
} catch {
|
|
311
|
+
console.warn("Custom format cannot be applied.");
|
|
312
|
+
}
|
|
313
|
+
if (!ge.value) {
|
|
314
|
+
const c = e.value.style.chart.tooltip.showPercentage ? `<div>${ve({
|
|
315
|
+
p: e.value.style.chart.tooltip.translations.percentOfTotal,
|
|
316
|
+
v: A.percentOfTotal,
|
|
317
|
+
s: "%",
|
|
318
|
+
r: e.value.style.chart.tooltip.roundingPercentage
|
|
319
|
+
})}</div>` : "";
|
|
320
|
+
P += `<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:${A.color}">⏹</span>${A.name}${c}</div>`, A.from.length && (P += `<div>${e.value.style.chart.tooltip.translations.from}</div>`, A.from.forEach((g) => {
|
|
321
|
+
P += `<div><span style="color:${g.color}">⏹←</span> ${g.source}: ${Be(
|
|
322
|
+
e.value.style.chart.nodes.labels.formatter,
|
|
323
|
+
g.value,
|
|
324
|
+
ve({
|
|
325
|
+
p: e.value.style.chart.nodes.labels.prefix,
|
|
326
|
+
v: g.value,
|
|
327
|
+
s: e.value.style.chart.nodes.labels.suffix,
|
|
328
|
+
r: e.value.style.chart.nodes.labels.rounding
|
|
329
|
+
})
|
|
330
|
+
)}</div>`;
|
|
331
|
+
})), A.to.length && (P += `<div style="margin-top:6px;">${e.value.style.chart.tooltip.translations.to}</div>`, A.to.forEach((g) => {
|
|
332
|
+
P += `<div><span style="color:${g.color}">⏹→</span> ${g.target}: ${Be(
|
|
333
|
+
e.value.style.chart.nodes.labels.formatter,
|
|
334
|
+
g.value,
|
|
335
|
+
ve({
|
|
336
|
+
p: e.value.style.chart.nodes.labels.prefix,
|
|
337
|
+
v: g.value,
|
|
338
|
+
s: e.value.style.chart.nodes.labels.suffix,
|
|
339
|
+
r: e.value.style.chart.nodes.labels.rounding
|
|
340
|
+
})
|
|
341
|
+
)}</div>`;
|
|
342
|
+
})), Ae.value = P;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
function st(o) {
|
|
346
|
+
const l = oe.value;
|
|
347
|
+
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: l, seriesIndex: o }), k.value = null, U.value = null, $e.value = !1;
|
|
348
|
+
}
|
|
349
|
+
function Pt(o) {
|
|
350
|
+
const l = oe.value;
|
|
351
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: o });
|
|
352
|
+
}
|
|
353
|
+
const rt = m(() => x.value.links.map(
|
|
354
|
+
({ source: o, target: l, sourceColor: t, targetColor: n, value: s }) => ({
|
|
355
|
+
source: o,
|
|
356
|
+
target: l,
|
|
357
|
+
sourceColor: t,
|
|
358
|
+
targetColor: n,
|
|
359
|
+
value: s
|
|
360
|
+
})
|
|
361
|
+
));
|
|
362
|
+
function ut(o = null) {
|
|
363
|
+
Vt(() => {
|
|
364
|
+
const l = rt.value.map((s, w) => [[s.source], [s.target], [s.value]]), t = [
|
|
365
|
+
[e.value.style.chart.title.text],
|
|
366
|
+
[e.value.style.chart.title.subtitle.text],
|
|
367
|
+
[
|
|
368
|
+
[e.value.table.columnNames.source],
|
|
369
|
+
[e.value.table.columnNames.target],
|
|
370
|
+
[e.value.table.columnNames.value]
|
|
371
|
+
]
|
|
372
|
+
].concat(l), n = lo(t);
|
|
373
|
+
o ? o(n) : ao({
|
|
374
|
+
csvContent: n,
|
|
375
|
+
title: e.value.style.chart.title.text || "vue-ui-flow"
|
|
376
|
+
});
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
const me = m(() => {
|
|
380
|
+
const o = [
|
|
381
|
+
e.value.table.columnNames.source,
|
|
382
|
+
e.value.table.columnNames.target,
|
|
383
|
+
e.value.table.columnNames.value
|
|
384
|
+
], l = rt.value.map((s, w) => [
|
|
385
|
+
{
|
|
386
|
+
color: s.sourceColor,
|
|
387
|
+
name: s.source
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
color: s.targetColor,
|
|
391
|
+
name: s.target
|
|
392
|
+
},
|
|
393
|
+
ve({
|
|
394
|
+
p: e.value.style.chart.nodes.labels.prefix,
|
|
395
|
+
v: s.value,
|
|
396
|
+
s: e.value.style.chart.nodes.labels.suffix,
|
|
397
|
+
r: e.value.style.chart.nodes.labels.rounding
|
|
398
|
+
})
|
|
399
|
+
]), t = {
|
|
400
|
+
th: {
|
|
401
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
402
|
+
color: e.value.table.th.color,
|
|
403
|
+
outline: e.value.table.th.outline
|
|
404
|
+
},
|
|
405
|
+
td: {
|
|
406
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
407
|
+
color: e.value.table.td.color,
|
|
408
|
+
outline: e.value.table.td.outline
|
|
409
|
+
},
|
|
410
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
411
|
+
};
|
|
412
|
+
return {
|
|
413
|
+
colNames: [
|
|
414
|
+
e.value.table.columnNames.source,
|
|
415
|
+
e.value.table.columnNames.target,
|
|
416
|
+
e.value.table.columnNames.value
|
|
417
|
+
],
|
|
418
|
+
head: o,
|
|
419
|
+
body: l,
|
|
420
|
+
config: t
|
|
421
|
+
};
|
|
422
|
+
});
|
|
423
|
+
function It() {
|
|
424
|
+
return x.value;
|
|
425
|
+
}
|
|
426
|
+
function it() {
|
|
427
|
+
M.value.showTable = !M.value.showTable;
|
|
428
|
+
}
|
|
429
|
+
const ye = v(!1);
|
|
430
|
+
function Oe() {
|
|
431
|
+
ye.value = !ye.value;
|
|
432
|
+
}
|
|
433
|
+
function ct() {
|
|
434
|
+
M.value.showTooltip = !M.value.showTooltip;
|
|
435
|
+
}
|
|
436
|
+
const vt = m(() => {
|
|
437
|
+
const o = new Set(
|
|
438
|
+
x.value.nodes.map(
|
|
439
|
+
(l) => e.value.nodeCategories[l.name] || "__uncategorized__"
|
|
440
|
+
)
|
|
441
|
+
);
|
|
442
|
+
return Array.from(o).map((l) => ({
|
|
443
|
+
name: l,
|
|
444
|
+
color: e.value.nodeCategoryColors[l] || L[0],
|
|
445
|
+
shape: "square",
|
|
446
|
+
count: x.value.nodes.filter(
|
|
447
|
+
(t) => (e.value.nodeCategories[t.name] || "__uncategorized__") === l
|
|
448
|
+
).length
|
|
449
|
+
})).map((l, t) => ({
|
|
450
|
+
...l,
|
|
451
|
+
segregate: () => Ne({ legend: l, i: t }),
|
|
452
|
+
opacity: W.value.length ? W.value.includes(t) ? 1 : 0.5 : 1
|
|
453
|
+
}));
|
|
454
|
+
}), dt = m(
|
|
455
|
+
() => vt.value.filter((o) => o.name !== "__uncategorized__")
|
|
456
|
+
), W = v([]);
|
|
457
|
+
function Ne({ legend: o, i: l }) {
|
|
458
|
+
const t = o.name;
|
|
459
|
+
if (k.value?.every(
|
|
460
|
+
(n) => e.value.nodeCategories[n] === t
|
|
461
|
+
)) {
|
|
462
|
+
k.value = null, U.value = null, W.value = [];
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
W.value = [l], k.value = x.value.nodes.filter((n) => e.value.nodeCategories[n.name] === t).map((n) => n.name), U.value = null;
|
|
466
|
+
}
|
|
467
|
+
const Lt = m(() => ({
|
|
468
|
+
cy: "flow-legend",
|
|
469
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
470
|
+
color: e.value.style.chart.legend.color,
|
|
471
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
472
|
+
paddingBottom: e.value.style.chart.legend.paddingBottom,
|
|
473
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : "normal"
|
|
474
|
+
}));
|
|
475
|
+
async function zt({ scale: o = 2 } = {}) {
|
|
476
|
+
if (!z.value) return;
|
|
477
|
+
const { width: l, height: t } = z.value.getBoundingClientRect(), n = l / t, { imageUri: s, base64: w } = await vo({ domElement: z.value, base64: !0, img: !0, scale: o });
|
|
478
|
+
return {
|
|
479
|
+
imageUri: s,
|
|
480
|
+
base64: w,
|
|
481
|
+
title: e.value.style.chart.title.text,
|
|
482
|
+
width: l,
|
|
483
|
+
height: t,
|
|
484
|
+
aspectRatio: n
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
return kt({
|
|
488
|
+
getData: It,
|
|
489
|
+
getImage: zt,
|
|
490
|
+
generateCsv: ut,
|
|
491
|
+
generateImage: tt,
|
|
492
|
+
generatePdf: et,
|
|
493
|
+
toggleTable: it,
|
|
494
|
+
toggleAnnotator: Oe,
|
|
495
|
+
toggleTooltip: ct,
|
|
496
|
+
drillCategory: Ne,
|
|
497
|
+
unselectNode: st,
|
|
498
|
+
toggleFullscreen: je
|
|
499
|
+
}), (o, l) => (i(), p("div", {
|
|
500
|
+
ref_key: "flowChart",
|
|
501
|
+
ref: z,
|
|
502
|
+
class: gt(`vue-ui-flow ${j.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
503
|
+
style: D(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
504
|
+
id: `flow_${we.value}`,
|
|
505
|
+
onMouseenter: l[2] || (l[2] = () => r(Ve)(!0)),
|
|
506
|
+
onMouseleave: l[3] || (l[3] = () => r(Ve)(!1))
|
|
507
|
+
}, [
|
|
508
|
+
e.value.userOptions.buttons.annotator ? (i(), K(r(Tt), {
|
|
509
|
+
key: 0,
|
|
510
|
+
svgRef: r(qe),
|
|
511
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
512
|
+
color: e.value.style.chart.color,
|
|
513
|
+
active: ye.value,
|
|
514
|
+
onClose: Oe
|
|
515
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : N("", !0),
|
|
516
|
+
Nt.value ? (i(), p("div", bo, null, 512)) : N("", !0),
|
|
517
|
+
e.value.style.chart.title.text ? (i(), p("div", {
|
|
518
|
+
key: 2,
|
|
519
|
+
ref_key: "chartTitle",
|
|
520
|
+
ref: We,
|
|
521
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
522
|
+
}, [
|
|
523
|
+
(i(), K(co, {
|
|
524
|
+
key: `title_${Re.value}`,
|
|
525
|
+
config: {
|
|
526
|
+
title: {
|
|
527
|
+
cy: "flow-title",
|
|
528
|
+
...e.value.style.chart.title
|
|
529
|
+
},
|
|
530
|
+
subtitle: {
|
|
531
|
+
cy: "flow-subtitle",
|
|
532
|
+
...e.value.style.chart.title.subtitle
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}, null, 8, ["config"]))
|
|
536
|
+
], 512)) : N("", !0),
|
|
537
|
+
e.value.userOptions.show && Ge.value && (r(Xe) || r(_e)) ? (i(), K(r(_t), {
|
|
538
|
+
ref: "details",
|
|
539
|
+
key: `user_option_${He.value}`,
|
|
540
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
541
|
+
color: e.value.style.chart.color,
|
|
542
|
+
isPrinting: r(Je),
|
|
543
|
+
isImaging: r(Qe),
|
|
544
|
+
uid: we.value,
|
|
545
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
546
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
547
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
548
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
549
|
+
callbacks: e.value.userOptions.callbacks,
|
|
550
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
551
|
+
isFullscreen: j.value,
|
|
552
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
553
|
+
chartElement: z.value,
|
|
554
|
+
position: e.value.userOptions.position,
|
|
555
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
556
|
+
printScale: e.value.userOptions.print.scale,
|
|
557
|
+
isAnnotation: ye.value,
|
|
558
|
+
hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
|
|
559
|
+
isTooltip: M.value.showTooltip,
|
|
560
|
+
onToggleTooltip: ct,
|
|
561
|
+
onToggleFullscreen: je,
|
|
562
|
+
onGeneratePdf: r(et),
|
|
563
|
+
onGenerateCsv: ut,
|
|
564
|
+
onGenerateImage: r(tt),
|
|
565
|
+
onToggleTable: it,
|
|
566
|
+
onToggleAnnotator: Oe,
|
|
567
|
+
style: D({
|
|
568
|
+
visibility: r(Xe) ? r(_e) ? "visible" : "hidden" : "visible"
|
|
569
|
+
})
|
|
570
|
+
}, jt({ _: 2 }, [
|
|
571
|
+
o.$slots.menuIcon ? {
|
|
572
|
+
name: "menuIcon",
|
|
573
|
+
fn: $(({ isOpen: t, color: n }) => [
|
|
574
|
+
C(o.$slots, "menuIcon", Z(J({ isOpen: t, color: n })), void 0, !0)
|
|
575
|
+
]),
|
|
576
|
+
key: "0"
|
|
577
|
+
} : void 0,
|
|
578
|
+
o.$slots.optionTooltip ? {
|
|
579
|
+
name: "optionTooltip",
|
|
580
|
+
fn: $(() => [
|
|
581
|
+
C(o.$slots, "optionTooltip", {}, void 0, !0)
|
|
582
|
+
]),
|
|
583
|
+
key: "1"
|
|
584
|
+
} : void 0,
|
|
585
|
+
o.$slots.optionPdf ? {
|
|
586
|
+
name: "optionPdf",
|
|
587
|
+
fn: $(() => [
|
|
588
|
+
C(o.$slots, "optionPdf", {}, void 0, !0)
|
|
589
|
+
]),
|
|
590
|
+
key: "2"
|
|
591
|
+
} : void 0,
|
|
592
|
+
o.$slots.optionCsv ? {
|
|
593
|
+
name: "optionCsv",
|
|
594
|
+
fn: $(() => [
|
|
595
|
+
C(o.$slots, "optionCsv", {}, void 0, !0)
|
|
596
|
+
]),
|
|
597
|
+
key: "3"
|
|
598
|
+
} : void 0,
|
|
599
|
+
o.$slots.optionImg ? {
|
|
600
|
+
name: "optionImg",
|
|
601
|
+
fn: $(() => [
|
|
602
|
+
C(o.$slots, "optionImg", {}, void 0, !0)
|
|
603
|
+
]),
|
|
604
|
+
key: "4"
|
|
605
|
+
} : void 0,
|
|
606
|
+
o.$slots.optionTable ? {
|
|
607
|
+
name: "optionTable",
|
|
608
|
+
fn: $(() => [
|
|
609
|
+
C(o.$slots, "optionTable", {}, void 0, !0)
|
|
610
|
+
]),
|
|
611
|
+
key: "5"
|
|
612
|
+
} : void 0,
|
|
613
|
+
o.$slots.optionFullscreen ? {
|
|
614
|
+
name: "optionFullscreen",
|
|
615
|
+
fn: $(({ toggleFullscreen: t, isFullscreen: n }) => [
|
|
616
|
+
C(o.$slots, "optionFullscreen", Z(J({ toggleFullscreen: t, isFullscreen: n })), void 0, !0)
|
|
617
|
+
]),
|
|
618
|
+
key: "6"
|
|
619
|
+
} : void 0,
|
|
620
|
+
o.$slots.optionAnnotator ? {
|
|
621
|
+
name: "optionAnnotator",
|
|
622
|
+
fn: $(({ toggleAnnotator: t, isAnnotator: n }) => [
|
|
623
|
+
C(o.$slots, "optionAnnotator", Z(J({ toggleAnnotator: t, isAnnotator: n })), void 0, !0)
|
|
624
|
+
]),
|
|
625
|
+
key: "7"
|
|
626
|
+
} : void 0
|
|
627
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "callbacks", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "printScale", "isAnnotation", "hasTooltip", "isTooltip", "onGeneratePdf", "onGenerateImage", "style"])) : N("", !0),
|
|
628
|
+
(i(), p("svg", {
|
|
629
|
+
ref_key: "svgRef",
|
|
630
|
+
ref: qe,
|
|
631
|
+
xmlns: r(to),
|
|
632
|
+
viewBox: `0 0 ${te.value.width} ${te.value.height}`,
|
|
633
|
+
class: gt({
|
|
634
|
+
"vue-data-ui-fullscreen--on": j.value,
|
|
635
|
+
"vue-data-ui-fulscreen--off": !j.value
|
|
636
|
+
}),
|
|
637
|
+
style: D({
|
|
638
|
+
maxWidth: "100%",
|
|
639
|
+
overflow: "visible",
|
|
640
|
+
background: "transparent",
|
|
641
|
+
color: e.value.style.chart.color
|
|
642
|
+
})
|
|
643
|
+
}, [
|
|
644
|
+
Le(r(At)),
|
|
645
|
+
o.$slots["chart-background"] ? (i(), p("foreignObject", {
|
|
646
|
+
key: 0,
|
|
647
|
+
x: 0,
|
|
648
|
+
y: 0,
|
|
649
|
+
width: te.value.width,
|
|
650
|
+
height: te.value.height,
|
|
651
|
+
style: {
|
|
652
|
+
pointerEvents: "none"
|
|
653
|
+
}
|
|
654
|
+
}, [
|
|
655
|
+
C(o.$slots, "chart-background", {}, void 0, !0)
|
|
656
|
+
], 8, ko)) : N("", !0),
|
|
657
|
+
re("defs", null, [
|
|
658
|
+
(i(!0), p(ue, null, ie(x.value.links, (t, n) => (i(), p("linearGradient", {
|
|
659
|
+
id: t.id,
|
|
660
|
+
x1: "0%",
|
|
661
|
+
y1: "0%",
|
|
662
|
+
x2: "100%",
|
|
663
|
+
y2: "0%"
|
|
664
|
+
}, [
|
|
665
|
+
re("stop", {
|
|
666
|
+
offset: "0%",
|
|
667
|
+
"stop-color": t.sourceColor
|
|
668
|
+
}, null, 8, $o),
|
|
669
|
+
re("stop", {
|
|
670
|
+
offset: "100%",
|
|
671
|
+
"stop-color": t.targetColor
|
|
672
|
+
}, null, 8, Ao)
|
|
673
|
+
], 8, wo))), 256))
|
|
674
|
+
]),
|
|
675
|
+
(i(!0), p(ue, null, ie(x.value.links, (t) => (i(), p("path", {
|
|
676
|
+
class: "vue-ui-flow-link",
|
|
677
|
+
d: t.path,
|
|
678
|
+
"stroke-linejoin": "round",
|
|
679
|
+
"stroke-miterlimit": "1",
|
|
680
|
+
fill: `url(#${t.id})`,
|
|
681
|
+
stroke: e.value.style.chart.links.stroke,
|
|
682
|
+
"stroke-width": e.value.style.chart.links.strokeWidth,
|
|
683
|
+
style: D(`
|
|
684
|
+
opacity:${k.value ? k.value.includes(t.source) && k.value.includes(t.target) ? 1 : 0.3 : U.value ? [t.target, t.source].includes(U.value) ? 1 : 0.3 : e.value.style.chart.links.opacity}
|
|
685
|
+
`)
|
|
686
|
+
}, null, 12, To))), 256)),
|
|
687
|
+
(i(!0), p(ue, null, ie(x.value.nodes, (t, n) => (i(), p("rect", {
|
|
688
|
+
class: "vue-ui-flow-node",
|
|
689
|
+
x: t.x,
|
|
690
|
+
y: r(T)(t.absoluteY) + e.value.style.chart.padding.top,
|
|
691
|
+
height: r(T)(t.height),
|
|
692
|
+
width: pe.value,
|
|
693
|
+
fill: t.color,
|
|
694
|
+
stroke: e.value.style.chart.nodes.stroke,
|
|
695
|
+
"stroke-width": e.value.style.chart.nodes.strokeWidth,
|
|
696
|
+
onMouseenter: (s) => Mt(t, n),
|
|
697
|
+
onMouseleave: (s) => st(n),
|
|
698
|
+
style: D(`opacity:${k.value ? k.value.includes(t.name) ? 1 : 0.3 : 1}`),
|
|
699
|
+
onClick: (s) => Pt(n)
|
|
700
|
+
}, null, 44, xo))), 256)),
|
|
701
|
+
e.value.style.chart.nodes.labels.show ? (i(), p("g", _o, [
|
|
702
|
+
(i(!0), p(ue, null, ie(x.value.nodes, (t, n) => (i(), p("text", {
|
|
703
|
+
x: t.x + pe.value / 2,
|
|
704
|
+
y: r(T)(
|
|
705
|
+
t.absoluteY + t.height / 2 - e.value.style.chart.nodes.labels.fontSize / 4
|
|
706
|
+
) + e.value.style.chart.padding.top,
|
|
707
|
+
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
708
|
+
fill: r(yt)(t.color),
|
|
709
|
+
"text-anchor": "middle",
|
|
710
|
+
style: D(`pointer-events: none; opacity:${k.value ? k.value.includes(t.name) ? 1 : 0 : 1}`)
|
|
711
|
+
}, ce(e.value.style.chart.nodes.labels.abbreviation.use ? r(oo)({
|
|
712
|
+
source: t.name,
|
|
713
|
+
length: e.value.style.chart.nodes.labels.abbreviation.length
|
|
714
|
+
}) : t.name), 13, So))), 256)),
|
|
715
|
+
(i(!0), p(ue, null, ie(x.value.nodes, (t, n) => (i(), p("text", {
|
|
716
|
+
x: t.x + pe.value / 2,
|
|
717
|
+
y: r(T)(
|
|
718
|
+
t.absoluteY + t.height / 2 + e.value.style.chart.nodes.labels.fontSize
|
|
719
|
+
) + e.value.style.chart.padding.top,
|
|
720
|
+
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
721
|
+
fill: r(yt)(t.color),
|
|
722
|
+
"text-anchor": "middle",
|
|
723
|
+
style: D(`pointer-events: none; opacity:${k.value ? k.value.includes(t.name) ? 1 : 0 : 1}`)
|
|
724
|
+
}, ce(r(Be)(
|
|
725
|
+
e.value.style.chart.nodes.labels.formatter,
|
|
726
|
+
t.value,
|
|
727
|
+
r(ve)({
|
|
728
|
+
p: e.value.style.chart.nodes.labels.prefix,
|
|
729
|
+
v: t.value,
|
|
730
|
+
s: e.value.style.chart.nodes.labels.suffix,
|
|
731
|
+
r: e.value.style.chart.nodes.labels.rounding
|
|
732
|
+
}),
|
|
733
|
+
{ datapoint: t, seriesIndex: n }
|
|
734
|
+
)), 13, Oo))), 256))
|
|
735
|
+
])) : N("", !0),
|
|
736
|
+
C(o.$slots, "svg", { svg: te.value }, void 0, !0)
|
|
737
|
+
], 14, Co)),
|
|
738
|
+
o.$slots.watermark ? (i(), p("div", No, [
|
|
739
|
+
C(o.$slots, "watermark", Z(J({ isPrinting: r(Je) || r(Qe) })), void 0, !0)
|
|
740
|
+
])) : N("", !0),
|
|
741
|
+
re("div", {
|
|
742
|
+
ref_key: "chartLegend",
|
|
743
|
+
ref: De
|
|
744
|
+
}, [
|
|
745
|
+
e.value.style.chart.legend.show && dt.value.length ? (i(), K(io, {
|
|
746
|
+
key: 0,
|
|
747
|
+
legendSet: dt.value,
|
|
748
|
+
config: Lt.value,
|
|
749
|
+
onClickMarker: l[0] || (l[0] = (t) => Ne(t))
|
|
750
|
+
}, {
|
|
751
|
+
item: $(({ legend: t, index: n }) => [
|
|
752
|
+
r(Te) ? N("", !0) : (i(), p("div", {
|
|
753
|
+
key: 0,
|
|
754
|
+
onClick: (s) => t.segregate(),
|
|
755
|
+
style: D(`opacity:${W.value.length ? W.value.includes(n) ? 1 : 0.5 : 1}`)
|
|
756
|
+
}, ce(t.name) + " (" + ce(t.count) + ") ", 13, Fo))
|
|
757
|
+
]),
|
|
758
|
+
_: 1
|
|
759
|
+
}, 8, ["legendSet", "config"])) : N("", !0),
|
|
760
|
+
C(o.$slots, "legend", { legend: vt.value }, void 0, !0)
|
|
761
|
+
], 512),
|
|
762
|
+
o.$slots.source ? (i(), p("div", {
|
|
763
|
+
key: 5,
|
|
764
|
+
ref_key: "source",
|
|
765
|
+
ref: Ye,
|
|
766
|
+
dir: "auto"
|
|
767
|
+
}, [
|
|
768
|
+
C(o.$slots, "source", {}, void 0, !0)
|
|
769
|
+
], 512)) : N("", !0),
|
|
770
|
+
Le(r(xt), {
|
|
771
|
+
show: M.value.showTooltip && $e.value,
|
|
772
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
773
|
+
color: e.value.style.chart.tooltip.color,
|
|
774
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
775
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
776
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
777
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
778
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
779
|
+
position: e.value.style.chart.tooltip.position,
|
|
780
|
+
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
781
|
+
parent: z.value,
|
|
782
|
+
content: Ae.value,
|
|
783
|
+
isCustom: ge.value,
|
|
784
|
+
isFullscreen: j.value,
|
|
785
|
+
smooth: e.value.style.chart.tooltip.smooth,
|
|
786
|
+
backdropFilter: e.value.style.chart.tooltip.backdropFilter
|
|
787
|
+
}, {
|
|
788
|
+
"tooltip-before": $(() => [
|
|
789
|
+
C(o.$slots, "tooltip-before", Z(J({ ...oe.value })), void 0, !0)
|
|
790
|
+
]),
|
|
791
|
+
"tooltip-after": $(() => [
|
|
792
|
+
C(o.$slots, "tooltip-after", Z(J({ ...oe.value })), void 0, !0)
|
|
793
|
+
]),
|
|
794
|
+
_: 3
|
|
795
|
+
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen", "smooth", "backdropFilter"]),
|
|
796
|
+
Ge.value ? (i(), K(r(wt), {
|
|
797
|
+
key: 6,
|
|
798
|
+
hideDetails: "",
|
|
799
|
+
config: {
|
|
800
|
+
open: M.value.showTable,
|
|
801
|
+
maxHeight: 1e4,
|
|
802
|
+
body: {
|
|
803
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
804
|
+
color: e.value.style.chart.color
|
|
805
|
+
},
|
|
806
|
+
head: {
|
|
807
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
808
|
+
color: e.value.style.chart.color
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
}, {
|
|
812
|
+
content: $(() => [
|
|
813
|
+
Le(r($t), {
|
|
814
|
+
colNames: me.value.colNames,
|
|
815
|
+
head: me.value.head,
|
|
816
|
+
body: me.value.body,
|
|
817
|
+
config: me.value.config,
|
|
818
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
819
|
+
onClose: l[1] || (l[1] = (t) => M.value.showTable = !1)
|
|
820
|
+
}, {
|
|
821
|
+
th: $(({ th: t }) => [
|
|
822
|
+
re("div", {
|
|
823
|
+
innerHTML: t,
|
|
824
|
+
style: { display: "flex", "align-items": "center" }
|
|
825
|
+
}, null, 8, Eo)
|
|
826
|
+
]),
|
|
827
|
+
td: $(({ td: t }) => [
|
|
828
|
+
Ut(ce(t.name || t), 1)
|
|
829
|
+
]),
|
|
830
|
+
_: 1
|
|
831
|
+
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
832
|
+
]),
|
|
833
|
+
_: 1
|
|
834
|
+
}, 8, ["config"])) : N("", !0),
|
|
835
|
+
r(Te) ? (i(), K(go, { key: 7 })) : N("", !0)
|
|
836
|
+
], 46, yo));
|
|
837
|
+
}
|
|
838
|
+
}, Uo = /* @__PURE__ */ mo(Mo, [["__scopeId", "data-v-7078815c"]]);
|
|
839
|
+
export {
|
|
840
|
+
Uo as default
|
|
841
|
+
};
|