vue-data-ui 3.0.23 → 3.1.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/dist/{Arrow-B1Op9F3x.js → Arrow-DvG07exK.js} +1 -1
- package/dist/{BaseDraggableDialog-B4OaMIom.js → BaseDraggableDialog-O7900pGp.js} +72 -59
- package/dist/{BaseIcon-CgUOIGjr.js → BaseIcon-DHtro8us.js} +1 -1
- package/dist/{useLoading-D7YHNtLX.js → BaseScanner-BgWxam9d.js} +11 -11
- package/dist/{ColorPicker-C0nf8VH0.js → ColorPicker-CpWzNn4r.js} +2 -2
- package/dist/DataTable-DJjA2_wf.js +140 -0
- package/dist/{Legend-CyYXMSsW.js → Legend-2-dC7DVb.js} +2 -2
- package/dist/{NonSvgPenAndPaper-D63qeScu.js → NonSvgPenAndPaper-DHeE4Yuv.js} +3 -3
- package/dist/{PackageVersion-B6M-3jRt.js → PackageVersion-DU12WH3O.js} +1 -1
- package/dist/{PenAndPaper-zym5uEeN.js → PenAndPaper-B7QEDgx4.js} +3 -3
- package/dist/{Shape-CYVs2kYz.js → Shape-Dj2Hl33H.js} +1 -1
- package/dist/{Slicer-BTIFUO4x.js → Slicer-D99HytqX.js} +2 -2
- package/dist/{SparkTooltip-CNz7AYUL.js → SparkTooltip-B-wL07rI.js} +1 -1
- package/dist/{Title-D_e0SFWS.js → Title-Dq2_Z9kR.js} +1 -1
- package/dist/{Tooltip-DjVoFYj1.js → Tooltip-Y219DXZO.js} +1 -1
- package/dist/{UserOptions-z0NWZ7aQ.js → UserOptions-BuGfCdAY.js} +2 -2
- package/dist/{dom-to-png-DD0au3Qz.js → dom-to-png-BhciAKaM.js} +1 -1
- package/dist/{img-z5p1gGfY.js → img-JOqdlnUs.js} +1 -1
- package/dist/{index-BEuUtONc.js → index-CDQbCd41.js} +37 -2
- package/dist/{pdf-BmUjVBni.js → pdf-Dd-LIJqz.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +35 -0
- package/dist/types/vue-data-ui.d.ts +35 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-CchB8S-o.js → useAutoSizeLabelsInsideViewbox-Bky5KGFZ.js} +1 -1
- package/dist/{useNestedProp-DhLFhguL.js → useNestedProp-BPEHGiYX.js} +1 -1
- package/dist/{usePrinter-DiB0_UNt.js → usePrinter-Bnl1YeUU.js} +2 -2
- package/dist/{vue-data-ui-DJIAas-7.js → vue-data-ui-DcNYz3cZ.js} +64 -64
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-BNIFAeN-.js +1369 -0
- package/dist/{vue-ui-accordion-B4YfUjZ5.js → vue-ui-accordion-Bf_LHFFX.js} +3 -3
- package/dist/{vue-ui-age-pyramid-CkXXNN79.js → vue-ui-age-pyramid-Bz-l1afR.js} +333 -286
- package/dist/{vue-ui-annotator-DnSsIkvU.js → vue-ui-annotator-BcfRH2BF.js} +2 -2
- package/dist/{vue-ui-bullet-kZkBsWPY.js → vue-ui-bullet-DK1aM9fX.js} +8 -8
- package/dist/{vue-ui-candlestick-CIn0xZm0.js → vue-ui-candlestick-D6mMjvtu.js} +453 -406
- package/dist/{vue-ui-carousel-table-f1FDOAqH.js → vue-ui-carousel-table-Vp5f238W.js} +4 -4
- package/dist/{vue-ui-chestnut-B-jSj7FT.js → vue-ui-chestnut-BKc4v-lf.js} +509 -459
- package/dist/vue-ui-chord-CquhRjf0.js +1100 -0
- package/dist/vue-ui-circle-pack-D6zLgxa3.js +755 -0
- package/dist/{vue-ui-cursor-DdBrui6i.js → vue-ui-cursor-DIXb2S93.js} +2 -2
- package/dist/{vue-ui-dashboard-DSUfW7mI.js → vue-ui-dashboard-DmiriAK7.js} +62 -62
- package/dist/{vue-ui-digits-Cb3Wq5WR.js → vue-ui-digits-CLAIo9gW.js} +2 -2
- package/dist/{vue-ui-donut-BCZqlAO3.js → vue-ui-donut-C8h_tCSO.js} +477 -431
- package/dist/{vue-ui-donut-evolution-HmQBq9VP.js → vue-ui-donut-evolution-C3r0YhKz.js} +482 -435
- package/dist/{vue-ui-dumbbell-B5w2oqNO.js → vue-ui-dumbbell-D-t4M00E.js} +443 -398
- package/dist/vue-ui-flow-D7_D_UNm.js +900 -0
- package/dist/vue-ui-funnel-B0QOfZRz.js +666 -0
- package/dist/vue-ui-galaxy-Ccw5uNes.js +744 -0
- package/dist/{vue-ui-gauge-C_KLPWk2.js → vue-ui-gauge-DvW7nFmK.js} +8 -8
- package/dist/{vue-ui-gizmo-CsPX25Ti.js → vue-ui-gizmo-WGQxvGPy.js} +4 -4
- package/dist/vue-ui-heatmap-BQkLujyp.js +1127 -0
- package/dist/{vue-ui-history-plot-DgpYiaUD.js → vue-ui-history-plot-eU33r_Ot.js} +408 -361
- package/dist/{vue-ui-kpi-DOgibU7W.js → vue-ui-kpi-CKg2i71M.js} +3 -3
- package/dist/{vue-ui-mini-loader-BjsQAxDx.js → vue-ui-mini-loader-BmkGQsm_.js} +2 -2
- package/dist/vue-ui-molecule-Dlu0hjSg.js +702 -0
- package/dist/{vue-ui-mood-radar-DMwVl3wz.js → vue-ui-mood-radar-DQaxfw9R.js} +342 -291
- package/dist/{vue-ui-nested-donuts-H0GzIAF0.js → vue-ui-nested-donuts-Djj9Aw_i.js} +548 -502
- package/dist/{vue-ui-onion-A6nKcus1.js → vue-ui-onion-ZgsErXis.js} +363 -317
- package/dist/vue-ui-parallel-coordinate-plot-B5fB22Jc.js +979 -0
- package/dist/vue-ui-quadrant-CMevCtXH.js +1483 -0
- package/dist/{vue-ui-quick-chart-mwXE3w_o.js → vue-ui-quick-chart-DcparKSX.js} +7 -7
- package/dist/vue-ui-radar-DFbxoKCK.js +858 -0
- package/dist/{vue-ui-rating-CleNHFo5.js → vue-ui-rating-ZUpxCWrk.js} +2 -2
- package/dist/{vue-ui-relation-circle-CMCH7Ia6.js → vue-ui-relation-circle-eNKJY4Sx.js} +8 -8
- package/dist/vue-ui-ridgeline-D4shpQZd.js +1204 -0
- package/dist/vue-ui-rings-TdTHMbsa.js +785 -0
- package/dist/{vue-ui-scatter-kv28dsT3.js → vue-ui-scatter-CVuV9ljU.js} +594 -548
- package/dist/{vue-ui-skeleton-DCNOYh9x.js → vue-ui-skeleton-CFxBU2-p.js} +3 -3
- package/dist/{vue-ui-smiley-DcS0CM-z.js → vue-ui-smiley-Har3B3aQ.js} +2 -2
- package/dist/{vue-ui-spark-trend-LHgReXth.js → vue-ui-spark-trend-FPk-XEwI.js} +4 -4
- package/dist/{vue-ui-sparkbar-Da315uRq.js → vue-ui-sparkbar-V3eJ0w0t.js} +4 -4
- package/dist/{vue-ui-sparkgauge-BeAkjGap.js → vue-ui-sparkgauge-DKTGkWnJ.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-Cy19W3y1.js → vue-ui-sparkhistogram-DJsgFwHs.js} +5 -5
- package/dist/{vue-ui-sparkline-IjlQWgs3.js → vue-ui-sparkline-Dmrm5SL5.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-CoFgOa3r.js → vue-ui-sparkstackbar-B0Pl7VMI.js} +4 -4
- package/dist/{vue-ui-stackbar-fbCs4sHF.js → vue-ui-stackbar-CNsgBPhj.js} +525 -479
- package/dist/{vue-ui-strip-plot-Cm8Zr6RE.js → vue-ui-strip-plot-CYAWwYOM.js} +390 -343
- package/dist/{vue-ui-table-q7jWgS26.js → vue-ui-table-Dn6H98rP.js} +3 -3
- package/dist/{vue-ui-table-heatmap-CsK9gR1G.js → vue-ui-table-heatmap-COI9LRqC.js} +5 -5
- package/dist/{vue-ui-table-sparkline-CXTPucPr.js → vue-ui-table-sparkline-B7Gg5FfJ.js} +4 -4
- package/dist/{vue-ui-thermometer-BFxdNgrd.js → vue-ui-thermometer-Bgynq5El.js} +8 -8
- package/dist/{vue-ui-timer-BsoeDFjK.js → vue-ui-timer-CXng51v5.js} +5 -5
- package/dist/{vue-ui-tiremarks-BW_jSayT.js → vue-ui-tiremarks-Cy1U3hO1.js} +7 -7
- package/dist/vue-ui-treemap-BsvIvRmE.js +1092 -0
- package/dist/{vue-ui-vertical-bar-OrLV4CxH.js → vue-ui-vertical-bar-DHqWeDIf.js} +512 -464
- package/dist/{vue-ui-waffle-BA6rNfVs.js → vue-ui-waffle-D1Mscj3N.js} +416 -370
- package/dist/{vue-ui-wheel-B_BkI-5f.js → vue-ui-wheel-DpV-N5tF.js} +7 -7
- package/dist/vue-ui-word-cloud-MaNQ3Kdk.js +811 -0
- package/dist/{vue-ui-world-B4mKuSSn.js → vue-ui-world-DYz6zw3x.js} +512 -466
- package/dist/{vue-ui-xy-m1SWJk77.js → vue-ui-xy-B1nqNbzw.js} +1551 -1500
- package/dist/vue-ui-xy-canvas-D4wd-Asd.js +1291 -0
- package/package.json +1 -1
- package/dist/DataTable-nO6ydJO2.js +0 -133
- package/dist/vue-ui-3d-bar-B56WqLJ-.js +0 -1323
- package/dist/vue-ui-chord-Ck4yV3Tb.js +0 -1049
- package/dist/vue-ui-circle-pack-BAfRk_Hd.js +0 -709
- package/dist/vue-ui-flow-BXkxtUoF.js +0 -852
- package/dist/vue-ui-funnel-DFvDO--q.js +0 -620
- package/dist/vue-ui-galaxy-BXNLLc3U.js +0 -691
- package/dist/vue-ui-heatmap-BHq6hBaL.js +0 -1078
- package/dist/vue-ui-molecule-BtyMTwEn.js +0 -656
- package/dist/vue-ui-parallel-coordinate-plot-DZ9_0F5c.js +0 -927
- package/dist/vue-ui-quadrant-CUggSeUN.js +0 -1432
- package/dist/vue-ui-radar-BRKZ8e_X.js +0 -807
- package/dist/vue-ui-ridgeline-xW7UrSfR.js +0 -1157
- package/dist/vue-ui-rings-D3NfFMaO.js +0 -739
- package/dist/vue-ui-treemap-DhAYSVB9.js +0 -1046
- package/dist/vue-ui-word-cloud-CrSLGFOK.js +0 -765
- package/dist/vue-ui-xy-canvas-CX2JT6T3.js +0 -1243
|
@@ -1,852 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent as J, ref as v, computed as m, onMounted as Gt, toRefs as jt, watch as Ie, createElementBlock as p, openBlock as i, unref as r, normalizeStyle as D, normalizeClass as mt, createBlock as U, createCommentVNode as T, createElementVNode as V, createVNode as Le, createSlots as Ut, withCtx as $, renderSlot as C, normalizeProps as Q, guardReactiveProps as ee, Fragment as ie, renderList as ce, toDisplayString as ve, Teleport as Vt, createTextVNode as Xt, nextTick as qt } from "vue";
|
|
2
|
-
import { u as Kt, c as ze, t as Zt, o as yt, f as Jt, a as Qt, p as L, b as eo, d as to, h as x, e as oo, i as de, X as lo, F as bt, L as ao, k as Be, v as no, w as so, y as ro } from "./index-BEuUtONc.js";
|
|
3
|
-
import { u as Ct } from "./useNestedProp-DhLFhguL.js";
|
|
4
|
-
import { u as uo } from "./usePrinter-DiB0_UNt.js";
|
|
5
|
-
import { u as io } from "./useUserOptionState-BIvW1Kz7.js";
|
|
6
|
-
import { u as co } from "./useChartAccessibility-9icAAmYg.js";
|
|
7
|
-
import vo from "./Legend-CyYXMSsW.js";
|
|
8
|
-
import ho from "./Title-D_e0SFWS.js";
|
|
9
|
-
import fo from "./img-z5p1gGfY.js";
|
|
10
|
-
import { t as po, u as go } from "./useResponsive-DfdjqQps.js";
|
|
11
|
-
import { u as mo, B as yo } from "./useLoading-D7YHNtLX.js";
|
|
12
|
-
import { _ as bo } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
-
const Co = ["id"], ko = {
|
|
14
|
-
key: 1,
|
|
15
|
-
ref: "noTitle",
|
|
16
|
-
class: "vue-data-ui-no-title-space",
|
|
17
|
-
style: "height:36px; width: 100%;background:transparent"
|
|
18
|
-
}, wo = ["id"], $o = ["xmlns", "viewBox"], Ao = ["width", "height"], To = ["id"], xo = ["stop-color"], _o = ["stop-color"], So = ["d", "fill", "stroke", "stroke-width"], Oo = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "onMouseenter", "onMouseleave", "onClick"], No = { key: 1 }, Fo = ["x", "y", "font-size", "fill"], Eo = ["x", "y", "font-size", "fill"], Mo = {
|
|
19
|
-
key: 4,
|
|
20
|
-
class: "vue-data-ui-watermark"
|
|
21
|
-
}, Po = ["id"], Io = ["onClick"], Lo = ["innerHTML"], zo = {
|
|
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(kt, { expose: wt }) {
|
|
38
|
-
const $t = J(() => import("./vue-ui-accordion-B4YfUjZ5.js")), At = J(() => import("./DataTable-nO6ydJO2.js")), Tt = J(() => import("./PackageVersion-B6M-3jRt.js")), xt = J(() => import("./PenAndPaper-zym5uEeN.js")), _t = J(() => import("./Tooltip-DjVoFYj1.js")), St = J(() => import("./UserOptions-z0NWZ7aQ.js")), { vue_ui_flow: Ot } = Kt(), F = kt, W = 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), te = v(null), he = v(null), Ge = v(!1), je = m(() => !!F.dataset && F.dataset.length);
|
|
39
|
-
Gt(() => {
|
|
40
|
-
Ge.value = !0, Ve();
|
|
41
|
-
});
|
|
42
|
-
const X = v(!1);
|
|
43
|
-
function Ue(o) {
|
|
44
|
-
X.value = o, He.value += 1;
|
|
45
|
-
}
|
|
46
|
-
const e = v(Se()), { loading: Te, FINAL_DATASET: fe, manualLoading: xe } = mo({
|
|
47
|
-
...jt(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: Zt({
|
|
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
|
-
}), Nt = m(() => !!e.value.debug);
|
|
91
|
-
function Ve() {
|
|
92
|
-
if (yt(F.dataset) && (Jt({
|
|
93
|
-
componentName: "VueUiFlow",
|
|
94
|
-
type: "dataset",
|
|
95
|
-
debug: Nt.value
|
|
96
|
-
}), xe.value = !0), yt(F.dataset) || (xe.value = e.value.loading), e.value.responsive) {
|
|
97
|
-
const o = po(() => {
|
|
98
|
-
const { width: l, height: t } = go({
|
|
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
|
-
Ze.value = l, Je.value = t;
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
te.value && (he.value && te.value.unobserve(he.value), te.value.disconnect()), te.value = new ResizeObserver(o), he.value = z.value.parentNode, te.value.observe(he.value);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
const { userOptionsVisible: _e, setUserOptionsVisibility: Xe, keepUserOptionState: qe } = io({ config: e.value }), { svgRef: Ke } = co({
|
|
112
|
-
config: e.value.style.chart.title
|
|
113
|
-
});
|
|
114
|
-
function Se() {
|
|
115
|
-
const o = Ct({
|
|
116
|
-
userConfig: F.config,
|
|
117
|
-
defaultConfig: Ot
|
|
118
|
-
});
|
|
119
|
-
let l = o;
|
|
120
|
-
return o.theme ? l = {
|
|
121
|
-
...Ct({
|
|
122
|
-
userConfig: eo.vue_ui_flow[o.theme] || F.config,
|
|
123
|
-
defaultConfig: o
|
|
124
|
-
}),
|
|
125
|
-
customPalette: Qt[o.theme] || L
|
|
126
|
-
} : l = o, l.nodeCategories = F.config.nodeCategories || {}, l.nodeCategoryColors = F.config.nodeCategoryColors || {}, l;
|
|
127
|
-
}
|
|
128
|
-
const Ze = v(e.value.style.chart.width), Je = 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, Ve(), 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: Qe, isImaging: et, generatePdf: tt, generateImage: ot } = uo({
|
|
139
|
-
elementId: `flow_${W.value}`,
|
|
140
|
-
fileName: e.value.style.chart.title.text || "vue-ui-flow",
|
|
141
|
-
options: e.value.userOptions.print
|
|
142
|
-
}), Ft = m(() => e.value.userOptions.show && !e.value.style.chart.title.text), pe = m(() => to(e.value.customPalette)), ge = 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 lt = m(() => !fe.value || !fe.value.length ? [] : fe.value.map((o, l) => [
|
|
153
|
-
o[0],
|
|
154
|
-
o[1],
|
|
155
|
-
x(o[2]),
|
|
156
|
-
o[3] ? oo(o[3]) : pe.value[l] || pe.value[l % pe.value.length] || L[l] || L[l % L.length]
|
|
157
|
-
]));
|
|
158
|
-
function Et(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, S = h + 1;
|
|
172
|
-
n(a, h), n(u, S), 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)), K = Array.from(s).filter((a) => !w.has(a)), ne = {};
|
|
175
|
-
K.forEach((a, u) => {
|
|
176
|
-
ne[a] = pe.value[u] || L[u % L.length];
|
|
177
|
-
});
|
|
178
|
-
const se = {};
|
|
179
|
-
o.forEach(([a, u, d, h]) => {
|
|
180
|
-
h && (se[a] = h, se[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 = se[a] || h || (K.includes(a) ? ne[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 Ce = oe.value, Fe = st.value.width, Z = st.value.height, I = Object.keys(t).map(Number).sort((a, u) => a - u), ke = I.length || 1, Ee = ke > 1 ? Fe / (ke - 1) : 0, A = Number(ge.value), P = Number(
|
|
188
|
-
e.value.style.chart.nodes.gapPx ?? e.value.style.chart.nodes.gap ?? 8
|
|
189
|
-
), re = 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), S = Math.max(0, Z - h), B = Math.min(re, d ? S / d : 0);
|
|
194
|
-
let b = 0, O = u.map((f) => l[f].value || 0), y = O.reduce((f, N) => f + N, 0);
|
|
195
|
-
for (let f = 0; f < 12; f += 1) {
|
|
196
|
-
const N = y > 0 ? (S - b) / y : 0, H = [];
|
|
197
|
-
for (let E = 0; E < O.length; E += 1) {
|
|
198
|
-
const R = O[E];
|
|
199
|
-
R < 0 || R * N < B && H.push(E);
|
|
200
|
-
}
|
|
201
|
-
if (!H.length) return Math.max(0, N);
|
|
202
|
-
for (const E of H)
|
|
203
|
-
b += B, y -= O[E], O[E] = -1;
|
|
204
|
-
if (y <= 0) return 0;
|
|
205
|
-
}
|
|
206
|
-
return y > 0 ? Math.max(0, (S - b) / y) : 0;
|
|
207
|
-
}
|
|
208
|
-
const g = I.map(c), G = g.length ? Math.min(...g) : 0, j = {};
|
|
209
|
-
I.forEach((a) => {
|
|
210
|
-
const u = t[a], d = u.length, h = Math.max(0, (d - 1) * P), S = Math.max(0, Z - h), B = Math.min(re, d ? S / d : 0), b = u.map(
|
|
211
|
-
(f) => Math.max(B, (l[f].value || 0) * G)
|
|
212
|
-
), O = b.reduce((f, N) => f + N, 0) + h;
|
|
213
|
-
let y = Math.max(0, (Z - O) / 2);
|
|
214
|
-
u.forEach((f, N) => {
|
|
215
|
-
const H = b[N], E = Ce.left + a * Ee, R = y;
|
|
216
|
-
j[f] = {
|
|
217
|
-
x: E,
|
|
218
|
-
y: R,
|
|
219
|
-
absoluteY: R,
|
|
220
|
-
height: H,
|
|
221
|
-
i: N,
|
|
222
|
-
color: l[f].color,
|
|
223
|
-
value: l[f].value
|
|
224
|
-
}, y += H, N < d - 1 && (y += P);
|
|
225
|
-
});
|
|
226
|
-
});
|
|
227
|
-
const ft = [], ue = Ce.top, Me = {}, Pe = {};
|
|
228
|
-
Object.keys(l).forEach((a) => {
|
|
229
|
-
Me[a] = j[a]?.y ?? 0, Pe[a] = 0;
|
|
230
|
-
});
|
|
231
|
-
const Ht = 1e-6, Rt = 0.25;
|
|
232
|
-
return I.forEach((a) => {
|
|
233
|
-
t[a].forEach((d) => {
|
|
234
|
-
const h = l[d], S = j[d];
|
|
235
|
-
if (!h.children || !h.children.length) return;
|
|
236
|
-
let B = S.y;
|
|
237
|
-
h.children.forEach(({ target: b, value: O }) => {
|
|
238
|
-
const y = j[b], f = l[b], N = h.outflow > 0 ? O / h.outflow : 0, H = f.inflow > 0 ? O / f.inflow : 0, E = x(B + ue), R = x(B + N * S.height + ue), pt = Me[b];
|
|
239
|
-
let we = pt + H * y.height;
|
|
240
|
-
Pe[b] += O;
|
|
241
|
-
const Dt = f.inflow > 0 && Pe[b] >= f.inflow - Ht, gt = y.y + y.height;
|
|
242
|
-
(Dt || we > gt - Rt) && (we = gt);
|
|
243
|
-
const Wt = x(pt + ue), Yt = x(we + ue);
|
|
244
|
-
ft.push({
|
|
245
|
-
id: ze(),
|
|
246
|
-
source: d,
|
|
247
|
-
target: b,
|
|
248
|
-
path: `M ${x(S.x + A)} ${E} L ${x(S.x + A)} ${R} L ${x(y.x)} ${Yt} L ${x(y.x)} ${Wt} Z`,
|
|
249
|
-
value: O,
|
|
250
|
-
sourceColor: h.color,
|
|
251
|
-
targetColor: l[b].color
|
|
252
|
-
}), B = R - ue, Me[b] = we;
|
|
253
|
-
});
|
|
254
|
-
});
|
|
255
|
-
}), { nodeCoordinates: j, links: ft };
|
|
256
|
-
}
|
|
257
|
-
const _ = m(() => {
|
|
258
|
-
const o = Et(fe.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
|
-
}), at = m(() => Ze.value), nt = m(() => Je.value), oe = m(() => e.value.style.chart.padding), st = m(() => ({
|
|
267
|
-
width: Math.max(0, at.value - 40 - oe.value.right - oe.value.left),
|
|
268
|
-
height: Math.max(0, nt.value - oe.value.top - oe.value.bottom)
|
|
269
|
-
})), le = m(() => ({
|
|
270
|
-
width: at.value,
|
|
271
|
-
height: nt.value
|
|
272
|
-
}));
|
|
273
|
-
function Mt(o) {
|
|
274
|
-
const l = {}, t = {}, n = /* @__PURE__ */ new Set();
|
|
275
|
-
return lt.value.forEach(([s, w, K]) => {
|
|
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), q = v(null), ae = v(null), me = v(!1);
|
|
280
|
-
function Pt(o, l) {
|
|
281
|
-
Y.value = [], k.value = Mt(o.name), q.value = o.name;
|
|
282
|
-
const t = o.name, n = lt.value;
|
|
283
|
-
let s = 0, w = 0, K = [], ne = [];
|
|
284
|
-
const se = new Set(n.map(([c]) => c)), Ce = new Set(n.map(([, c]) => c)), Fe = Array.from(se).filter((c) => !Ce.has(c)), Z = n.filter(([c]) => Fe.includes(c)).reduce((c, [g, G, j]) => c + j, 0), I = {};
|
|
285
|
-
_.value.nodes.forEach((c) => {
|
|
286
|
-
I[c.name] = c.color;
|
|
287
|
-
}), n.forEach(([c, g, G]) => {
|
|
288
|
-
g === t && (s += G, K.push({ source: c, value: G, color: I[c] })), c === t && (w += G, ne.push({ target: g, value: G, color: I[g] }));
|
|
289
|
-
});
|
|
290
|
-
const ke = Math.max(s, w), Ee = Z > 0 ? ke / Z * 100 : 0, A = {
|
|
291
|
-
name: t,
|
|
292
|
-
inflow: s,
|
|
293
|
-
outflow: w,
|
|
294
|
-
from: K,
|
|
295
|
-
to: ne,
|
|
296
|
-
percentOfTotal: Ee,
|
|
297
|
-
color: I[t] || "#000000"
|
|
298
|
-
};
|
|
299
|
-
e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: A, seriesIndex: l }), ae.value = { datapoint: A }, $e.value = !0;
|
|
300
|
-
let P = "";
|
|
301
|
-
const re = e.value.style.chart.tooltip.customFormat;
|
|
302
|
-
if (me.value = !1, ro(re))
|
|
303
|
-
try {
|
|
304
|
-
const c = re({
|
|
305
|
-
datapoint: A,
|
|
306
|
-
series: _.value,
|
|
307
|
-
config: e.value
|
|
308
|
-
});
|
|
309
|
-
typeof c == "string" && (Ae.value = c, me.value = !0);
|
|
310
|
-
} catch {
|
|
311
|
-
console.warn("Custom format cannot be applied.");
|
|
312
|
-
}
|
|
313
|
-
if (!me.value) {
|
|
314
|
-
const c = e.value.style.chart.tooltip.showPercentage ? `<div>${de({
|
|
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
|
-
de({
|
|
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
|
-
de({
|
|
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 rt(o) {
|
|
346
|
-
const l = ae.value;
|
|
347
|
-
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: l, seriesIndex: o }), k.value = null, q.value = null, $e.value = !1;
|
|
348
|
-
}
|
|
349
|
-
function It(o) {
|
|
350
|
-
const l = ae.value;
|
|
351
|
-
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: o });
|
|
352
|
-
}
|
|
353
|
-
const ut = m(() => _.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 it(o = null) {
|
|
363
|
-
qt(() => {
|
|
364
|
-
const l = ut.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 = no(t);
|
|
373
|
-
o ? o(n) : so({
|
|
374
|
-
csvContent: n,
|
|
375
|
-
title: e.value.style.chart.title.text || "vue-ui-flow"
|
|
376
|
-
});
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
const ye = m(() => {
|
|
380
|
-
const o = [
|
|
381
|
-
e.value.table.columnNames.source,
|
|
382
|
-
e.value.table.columnNames.target,
|
|
383
|
-
e.value.table.columnNames.value
|
|
384
|
-
], l = ut.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
|
-
de({
|
|
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 Lt() {
|
|
424
|
-
return _.value;
|
|
425
|
-
}
|
|
426
|
-
function ct() {
|
|
427
|
-
M.value.showTable = !M.value.showTable;
|
|
428
|
-
}
|
|
429
|
-
const be = v(!1);
|
|
430
|
-
function Oe() {
|
|
431
|
-
be.value = !be.value;
|
|
432
|
-
}
|
|
433
|
-
function vt() {
|
|
434
|
-
M.value.showTooltip = !M.value.showTooltip;
|
|
435
|
-
}
|
|
436
|
-
const dt = m(() => {
|
|
437
|
-
const o = new Set(
|
|
438
|
-
_.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: _.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: Y.value.length ? Y.value.includes(t) ? 1 : 0.5 : 1
|
|
453
|
-
}));
|
|
454
|
-
}), ht = m(
|
|
455
|
-
() => dt.value.filter((o) => o.name !== "__uncategorized__")
|
|
456
|
-
), Y = 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, q.value = null, Y.value = [];
|
|
463
|
-
return;
|
|
464
|
-
}
|
|
465
|
-
Y.value = [l], k.value = _.value.nodes.filter((n) => e.value.nodeCategories[n.name] === t).map((n) => n.name), q.value = null;
|
|
466
|
-
}
|
|
467
|
-
const zt = 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 Bt({ 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 fo({ 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 wt({
|
|
488
|
-
getData: Lt,
|
|
489
|
-
getImage: Bt,
|
|
490
|
-
generateCsv: it,
|
|
491
|
-
generateImage: ot,
|
|
492
|
-
generatePdf: tt,
|
|
493
|
-
toggleTable: ct,
|
|
494
|
-
toggleAnnotator: Oe,
|
|
495
|
-
toggleTooltip: vt,
|
|
496
|
-
drillCategory: Ne,
|
|
497
|
-
unselectNode: rt,
|
|
498
|
-
toggleFullscreen: Ue
|
|
499
|
-
}), (o, l) => (i(), p("div", {
|
|
500
|
-
ref_key: "flowChart",
|
|
501
|
-
ref: z,
|
|
502
|
-
class: mt(`vue-ui-flow ${X.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_${W.value}`,
|
|
505
|
-
onMouseenter: l[2] || (l[2] = () => r(Xe)(!0)),
|
|
506
|
-
onMouseleave: l[3] || (l[3] = () => r(Xe)(!1))
|
|
507
|
-
}, [
|
|
508
|
-
e.value.userOptions.buttons.annotator ? (i(), U(r(xt), {
|
|
509
|
-
key: 0,
|
|
510
|
-
svgRef: r(Ke),
|
|
511
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
512
|
-
color: e.value.style.chart.color,
|
|
513
|
-
active: be.value,
|
|
514
|
-
onClose: Oe
|
|
515
|
-
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : T("", !0),
|
|
516
|
-
Ft.value ? (i(), p("div", ko, null, 512)) : T("", !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(), U(ho, {
|
|
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)) : T("", !0),
|
|
537
|
-
V("div", {
|
|
538
|
-
id: `legend-top-${W.value}`
|
|
539
|
-
}, null, 8, wo),
|
|
540
|
-
e.value.userOptions.show && je.value && (r(qe) || r(_e)) ? (i(), U(r(St), {
|
|
541
|
-
ref: "details",
|
|
542
|
-
key: `user_option_${He.value}`,
|
|
543
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
544
|
-
color: e.value.style.chart.color,
|
|
545
|
-
isPrinting: r(Qe),
|
|
546
|
-
isImaging: r(et),
|
|
547
|
-
uid: W.value,
|
|
548
|
-
hasPdf: e.value.userOptions.buttons.pdf,
|
|
549
|
-
hasXls: e.value.userOptions.buttons.csv,
|
|
550
|
-
hasImg: e.value.userOptions.buttons.img,
|
|
551
|
-
hasTable: e.value.userOptions.buttons.table,
|
|
552
|
-
callbacks: e.value.userOptions.callbacks,
|
|
553
|
-
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
554
|
-
isFullscreen: X.value,
|
|
555
|
-
titles: { ...e.value.userOptions.buttonTitles },
|
|
556
|
-
chartElement: z.value,
|
|
557
|
-
position: e.value.userOptions.position,
|
|
558
|
-
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
559
|
-
printScale: e.value.userOptions.print.scale,
|
|
560
|
-
isAnnotation: be.value,
|
|
561
|
-
hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
|
|
562
|
-
isTooltip: M.value.showTooltip,
|
|
563
|
-
onToggleTooltip: vt,
|
|
564
|
-
onToggleFullscreen: Ue,
|
|
565
|
-
onGeneratePdf: r(tt),
|
|
566
|
-
onGenerateCsv: it,
|
|
567
|
-
onGenerateImage: r(ot),
|
|
568
|
-
onToggleTable: ct,
|
|
569
|
-
onToggleAnnotator: Oe,
|
|
570
|
-
style: D({
|
|
571
|
-
visibility: r(qe) ? r(_e) ? "visible" : "hidden" : "visible"
|
|
572
|
-
})
|
|
573
|
-
}, Ut({ _: 2 }, [
|
|
574
|
-
o.$slots.menuIcon ? {
|
|
575
|
-
name: "menuIcon",
|
|
576
|
-
fn: $(({ isOpen: t, color: n }) => [
|
|
577
|
-
C(o.$slots, "menuIcon", Q(ee({ isOpen: t, color: n })), void 0, !0)
|
|
578
|
-
]),
|
|
579
|
-
key: "0"
|
|
580
|
-
} : void 0,
|
|
581
|
-
o.$slots.optionTooltip ? {
|
|
582
|
-
name: "optionTooltip",
|
|
583
|
-
fn: $(() => [
|
|
584
|
-
C(o.$slots, "optionTooltip", {}, void 0, !0)
|
|
585
|
-
]),
|
|
586
|
-
key: "1"
|
|
587
|
-
} : void 0,
|
|
588
|
-
o.$slots.optionPdf ? {
|
|
589
|
-
name: "optionPdf",
|
|
590
|
-
fn: $(() => [
|
|
591
|
-
C(o.$slots, "optionPdf", {}, void 0, !0)
|
|
592
|
-
]),
|
|
593
|
-
key: "2"
|
|
594
|
-
} : void 0,
|
|
595
|
-
o.$slots.optionCsv ? {
|
|
596
|
-
name: "optionCsv",
|
|
597
|
-
fn: $(() => [
|
|
598
|
-
C(o.$slots, "optionCsv", {}, void 0, !0)
|
|
599
|
-
]),
|
|
600
|
-
key: "3"
|
|
601
|
-
} : void 0,
|
|
602
|
-
o.$slots.optionImg ? {
|
|
603
|
-
name: "optionImg",
|
|
604
|
-
fn: $(() => [
|
|
605
|
-
C(o.$slots, "optionImg", {}, void 0, !0)
|
|
606
|
-
]),
|
|
607
|
-
key: "4"
|
|
608
|
-
} : void 0,
|
|
609
|
-
o.$slots.optionTable ? {
|
|
610
|
-
name: "optionTable",
|
|
611
|
-
fn: $(() => [
|
|
612
|
-
C(o.$slots, "optionTable", {}, void 0, !0)
|
|
613
|
-
]),
|
|
614
|
-
key: "5"
|
|
615
|
-
} : void 0,
|
|
616
|
-
o.$slots.optionFullscreen ? {
|
|
617
|
-
name: "optionFullscreen",
|
|
618
|
-
fn: $(({ toggleFullscreen: t, isFullscreen: n }) => [
|
|
619
|
-
C(o.$slots, "optionFullscreen", Q(ee({ toggleFullscreen: t, isFullscreen: n })), void 0, !0)
|
|
620
|
-
]),
|
|
621
|
-
key: "6"
|
|
622
|
-
} : void 0,
|
|
623
|
-
o.$slots.optionAnnotator ? {
|
|
624
|
-
name: "optionAnnotator",
|
|
625
|
-
fn: $(({ toggleAnnotator: t, isAnnotator: n }) => [
|
|
626
|
-
C(o.$slots, "optionAnnotator", Q(ee({ toggleAnnotator: t, isAnnotator: n })), void 0, !0)
|
|
627
|
-
]),
|
|
628
|
-
key: "7"
|
|
629
|
-
} : void 0
|
|
630
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "callbacks", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "printScale", "isAnnotation", "hasTooltip", "isTooltip", "onGeneratePdf", "onGenerateImage", "style"])) : T("", !0),
|
|
631
|
-
(i(), p("svg", {
|
|
632
|
-
ref_key: "svgRef",
|
|
633
|
-
ref: Ke,
|
|
634
|
-
xmlns: r(lo),
|
|
635
|
-
viewBox: `0 0 ${le.value.width} ${le.value.height}`,
|
|
636
|
-
class: mt({
|
|
637
|
-
"vue-data-ui-fullscreen--on": X.value,
|
|
638
|
-
"vue-data-ui-fulscreen--off": !X.value
|
|
639
|
-
}),
|
|
640
|
-
style: D({
|
|
641
|
-
maxWidth: "100%",
|
|
642
|
-
overflow: "visible",
|
|
643
|
-
background: "transparent",
|
|
644
|
-
color: e.value.style.chart.color
|
|
645
|
-
})
|
|
646
|
-
}, [
|
|
647
|
-
Le(r(Tt)),
|
|
648
|
-
o.$slots["chart-background"] ? (i(), p("foreignObject", {
|
|
649
|
-
key: 0,
|
|
650
|
-
x: 0,
|
|
651
|
-
y: 0,
|
|
652
|
-
width: le.value.width,
|
|
653
|
-
height: le.value.height,
|
|
654
|
-
style: {
|
|
655
|
-
pointerEvents: "none"
|
|
656
|
-
}
|
|
657
|
-
}, [
|
|
658
|
-
C(o.$slots, "chart-background", {}, void 0, !0)
|
|
659
|
-
], 8, Ao)) : T("", !0),
|
|
660
|
-
V("defs", null, [
|
|
661
|
-
(i(!0), p(ie, null, ce(_.value.links, (t, n) => (i(), p("linearGradient", {
|
|
662
|
-
id: t.id,
|
|
663
|
-
x1: "0%",
|
|
664
|
-
y1: "0%",
|
|
665
|
-
x2: "100%",
|
|
666
|
-
y2: "0%"
|
|
667
|
-
}, [
|
|
668
|
-
V("stop", {
|
|
669
|
-
offset: "0%",
|
|
670
|
-
"stop-color": t.sourceColor
|
|
671
|
-
}, null, 8, xo),
|
|
672
|
-
V("stop", {
|
|
673
|
-
offset: "100%",
|
|
674
|
-
"stop-color": t.targetColor
|
|
675
|
-
}, null, 8, _o)
|
|
676
|
-
], 8, To))), 256))
|
|
677
|
-
]),
|
|
678
|
-
(i(!0), p(ie, null, ce(_.value.links, (t) => (i(), p("path", {
|
|
679
|
-
class: "vue-ui-flow-link",
|
|
680
|
-
d: t.path,
|
|
681
|
-
"stroke-linejoin": "round",
|
|
682
|
-
"stroke-miterlimit": "1",
|
|
683
|
-
fill: `url(#${t.id})`,
|
|
684
|
-
stroke: e.value.style.chart.links.stroke,
|
|
685
|
-
"stroke-width": e.value.style.chart.links.strokeWidth,
|
|
686
|
-
style: D(`
|
|
687
|
-
opacity:${k.value ? k.value.includes(t.source) && k.value.includes(t.target) ? 1 : 0.3 : q.value ? [t.target, t.source].includes(q.value) ? 1 : 0.3 : e.value.style.chart.links.opacity}
|
|
688
|
-
`)
|
|
689
|
-
}, null, 12, So))), 256)),
|
|
690
|
-
(i(!0), p(ie, null, ce(_.value.nodes, (t, n) => (i(), p("rect", {
|
|
691
|
-
class: "vue-ui-flow-node",
|
|
692
|
-
x: t.x,
|
|
693
|
-
y: r(x)(t.absoluteY) + e.value.style.chart.padding.top,
|
|
694
|
-
height: r(x)(t.height),
|
|
695
|
-
width: ge.value,
|
|
696
|
-
fill: t.color,
|
|
697
|
-
stroke: e.value.style.chart.nodes.stroke,
|
|
698
|
-
"stroke-width": e.value.style.chart.nodes.strokeWidth,
|
|
699
|
-
onMouseenter: (s) => Pt(t, n),
|
|
700
|
-
onMouseleave: (s) => rt(n),
|
|
701
|
-
style: D(`opacity:${k.value ? k.value.includes(t.name) ? 1 : 0.3 : 1}`),
|
|
702
|
-
onClick: (s) => It(n)
|
|
703
|
-
}, null, 44, Oo))), 256)),
|
|
704
|
-
e.value.style.chart.nodes.labels.show ? (i(), p("g", No, [
|
|
705
|
-
(i(!0), p(ie, null, ce(_.value.nodes, (t, n) => (i(), p("text", {
|
|
706
|
-
x: t.x + ge.value / 2,
|
|
707
|
-
y: r(x)(
|
|
708
|
-
t.absoluteY + t.height / 2 - e.value.style.chart.nodes.labels.fontSize / 4
|
|
709
|
-
) + e.value.style.chart.padding.top,
|
|
710
|
-
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
711
|
-
fill: r(bt)(t.color),
|
|
712
|
-
"text-anchor": "middle",
|
|
713
|
-
style: D(`pointer-events: none; opacity:${k.value ? k.value.includes(t.name) ? 1 : 0 : 1}`)
|
|
714
|
-
}, ve(e.value.style.chart.nodes.labels.abbreviation.use ? r(ao)({
|
|
715
|
-
source: t.name,
|
|
716
|
-
length: e.value.style.chart.nodes.labels.abbreviation.length
|
|
717
|
-
}) : t.name), 13, Fo))), 256)),
|
|
718
|
-
(i(!0), p(ie, null, ce(_.value.nodes, (t, n) => (i(), p("text", {
|
|
719
|
-
x: t.x + ge.value / 2,
|
|
720
|
-
y: r(x)(
|
|
721
|
-
t.absoluteY + t.height / 2 + e.value.style.chart.nodes.labels.fontSize
|
|
722
|
-
) + e.value.style.chart.padding.top,
|
|
723
|
-
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
724
|
-
fill: r(bt)(t.color),
|
|
725
|
-
"text-anchor": "middle",
|
|
726
|
-
style: D(`pointer-events: none; opacity:${k.value ? k.value.includes(t.name) ? 1 : 0 : 1}`)
|
|
727
|
-
}, ve(r(Be)(
|
|
728
|
-
e.value.style.chart.nodes.labels.formatter,
|
|
729
|
-
t.value,
|
|
730
|
-
r(de)({
|
|
731
|
-
p: e.value.style.chart.nodes.labels.prefix,
|
|
732
|
-
v: t.value,
|
|
733
|
-
s: e.value.style.chart.nodes.labels.suffix,
|
|
734
|
-
r: e.value.style.chart.nodes.labels.rounding
|
|
735
|
-
}),
|
|
736
|
-
{ datapoint: t, seriesIndex: n }
|
|
737
|
-
)), 13, Eo))), 256))
|
|
738
|
-
])) : T("", !0),
|
|
739
|
-
C(o.$slots, "svg", { svg: le.value }, void 0, !0)
|
|
740
|
-
], 14, $o)),
|
|
741
|
-
o.$slots.watermark ? (i(), p("div", Mo, [
|
|
742
|
-
C(o.$slots, "watermark", Q(ee({ isPrinting: r(Qe) || r(et) })), void 0, !0)
|
|
743
|
-
])) : T("", !0),
|
|
744
|
-
V("div", {
|
|
745
|
-
id: `legend-bottom-${W.value}`
|
|
746
|
-
}, null, 8, Po),
|
|
747
|
-
Ge.value ? (i(), U(Vt, {
|
|
748
|
-
key: 5,
|
|
749
|
-
to: e.value.style.chart.legend.position === "top" ? `#legend-top-${W.value}` : `#legend-bottom-${W.value}`
|
|
750
|
-
}, [
|
|
751
|
-
V("div", {
|
|
752
|
-
ref_key: "chartLegend",
|
|
753
|
-
ref: De
|
|
754
|
-
}, [
|
|
755
|
-
e.value.style.chart.legend.show && ht.value.length ? (i(), U(vo, {
|
|
756
|
-
key: 0,
|
|
757
|
-
legendSet: ht.value,
|
|
758
|
-
config: zt.value,
|
|
759
|
-
onClickMarker: l[0] || (l[0] = (t) => Ne(t))
|
|
760
|
-
}, {
|
|
761
|
-
item: $(({ legend: t, index: n }) => [
|
|
762
|
-
r(Te) ? T("", !0) : (i(), p("div", {
|
|
763
|
-
key: 0,
|
|
764
|
-
onClick: (s) => t.segregate(),
|
|
765
|
-
style: D(`opacity:${Y.value.length ? Y.value.includes(n) ? 1 : 0.5 : 1}`)
|
|
766
|
-
}, ve(t.name) + " (" + ve(t.count) + ") ", 13, Io))
|
|
767
|
-
]),
|
|
768
|
-
_: 1
|
|
769
|
-
}, 8, ["legendSet", "config"])) : T("", !0),
|
|
770
|
-
C(o.$slots, "legend", { legend: dt.value }, void 0, !0)
|
|
771
|
-
], 512)
|
|
772
|
-
], 8, ["to"])) : T("", !0),
|
|
773
|
-
o.$slots.source ? (i(), p("div", {
|
|
774
|
-
key: 6,
|
|
775
|
-
ref_key: "source",
|
|
776
|
-
ref: Ye,
|
|
777
|
-
dir: "auto"
|
|
778
|
-
}, [
|
|
779
|
-
C(o.$slots, "source", {}, void 0, !0)
|
|
780
|
-
], 512)) : T("", !0),
|
|
781
|
-
Le(r(_t), {
|
|
782
|
-
show: M.value.showTooltip && $e.value,
|
|
783
|
-
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
784
|
-
color: e.value.style.chart.tooltip.color,
|
|
785
|
-
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
786
|
-
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
787
|
-
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
788
|
-
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
789
|
-
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
790
|
-
position: e.value.style.chart.tooltip.position,
|
|
791
|
-
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
792
|
-
parent: z.value,
|
|
793
|
-
content: Ae.value,
|
|
794
|
-
isCustom: me.value,
|
|
795
|
-
isFullscreen: X.value,
|
|
796
|
-
smooth: e.value.style.chart.tooltip.smooth,
|
|
797
|
-
backdropFilter: e.value.style.chart.tooltip.backdropFilter
|
|
798
|
-
}, {
|
|
799
|
-
"tooltip-before": $(() => [
|
|
800
|
-
C(o.$slots, "tooltip-before", Q(ee({ ...ae.value })), void 0, !0)
|
|
801
|
-
]),
|
|
802
|
-
"tooltip-after": $(() => [
|
|
803
|
-
C(o.$slots, "tooltip-after", Q(ee({ ...ae.value })), void 0, !0)
|
|
804
|
-
]),
|
|
805
|
-
_: 3
|
|
806
|
-
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen", "smooth", "backdropFilter"]),
|
|
807
|
-
je.value ? (i(), U(r($t), {
|
|
808
|
-
key: 7,
|
|
809
|
-
hideDetails: "",
|
|
810
|
-
config: {
|
|
811
|
-
open: M.value.showTable,
|
|
812
|
-
maxHeight: 1e4,
|
|
813
|
-
body: {
|
|
814
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
815
|
-
color: e.value.style.chart.color
|
|
816
|
-
},
|
|
817
|
-
head: {
|
|
818
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
819
|
-
color: e.value.style.chart.color
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
}, {
|
|
823
|
-
content: $(() => [
|
|
824
|
-
Le(r(At), {
|
|
825
|
-
colNames: ye.value.colNames,
|
|
826
|
-
head: ye.value.head,
|
|
827
|
-
body: ye.value.body,
|
|
828
|
-
config: ye.value.config,
|
|
829
|
-
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
830
|
-
onClose: l[1] || (l[1] = (t) => M.value.showTable = !1)
|
|
831
|
-
}, {
|
|
832
|
-
th: $(({ th: t }) => [
|
|
833
|
-
V("div", {
|
|
834
|
-
innerHTML: t,
|
|
835
|
-
style: { display: "flex", "align-items": "center" }
|
|
836
|
-
}, null, 8, Lo)
|
|
837
|
-
]),
|
|
838
|
-
td: $(({ td: t }) => [
|
|
839
|
-
Xt(ve(t.name || t), 1)
|
|
840
|
-
]),
|
|
841
|
-
_: 1
|
|
842
|
-
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
843
|
-
]),
|
|
844
|
-
_: 1
|
|
845
|
-
}, 8, ["config"])) : T("", !0),
|
|
846
|
-
r(Te) ? (i(), U(yo, { key: 8 })) : T("", !0)
|
|
847
|
-
], 46, Co));
|
|
848
|
-
}
|
|
849
|
-
}, Ko = /* @__PURE__ */ bo(zo, [["__scopeId", "data-v-8feb3ba3"]]);
|
|
850
|
-
export {
|
|
851
|
-
Ko as default
|
|
852
|
-
};
|