vue-data-ui 2.4.1 → 2.4.3
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 +44 -44
- package/dist/{Arrow-BIs_9yK8.js → Arrow-C7lNL7sY.js} +1 -1
- package/dist/{Arrow-DpMf3yPs.cjs → Arrow-Dz6AomGr.cjs} +1 -1
- package/dist/{BaseIcon-CXDdkPfN.js → BaseIcon-BbvG1AlW.js} +7 -4
- package/dist/BaseIcon-uALK38Ov.cjs +1 -0
- package/dist/{DataTable-BTgMVOwp.cjs → DataTable-DTzynbND.cjs} +1 -1
- package/dist/{DataTable-DL2agEJ3.js → DataTable-DYqC2pqu.js} +2 -2
- package/dist/{Legend-Dj9KiaLv.cjs → Legend-Cgw4lO2O.cjs} +1 -1
- package/dist/{Legend-DXLiSLHd.js → Legend-DNgTCgEK.js} +1 -1
- package/dist/{PackageVersion-D4D0WicU.cjs → PackageVersion-DwI-KhXH.cjs} +1 -1
- package/dist/{PackageVersion-DtnhR89q.js → PackageVersion-VkaUzgmt.js} +1 -1
- package/dist/PenAndPaper-CDFVOo7X.cjs +1 -0
- package/dist/PenAndPaper-DAZYA8Ew.js +269 -0
- package/dist/{Shape-CO_Ak9Zm.js → Shape-Bwon0l0g.js} +1 -1
- package/dist/{Shape-7EC2UKDK.cjs → Shape-D2Dpshg1.cjs} +1 -1
- package/dist/{Slicer-BZfUZr1J.js → Slicer-TfpN2Cr4.js} +3 -3
- package/dist/{Slicer-CLAVjSQP.cjs → Slicer-uSjfNJjG.cjs} +1 -1
- package/dist/{Title-C-lm3Mkl.cjs → Title-0Tp4hZ4u.cjs} +1 -1
- package/dist/{Title-DYNLqCCT.js → Title-C5pIfQAz.js} +1 -1
- package/dist/{Tooltip-t-3mVhcz.cjs → Tooltip-9Tp2Yrd1.cjs} +1 -1
- package/dist/{Tooltip-CICAYyQj.js → Tooltip-Cz24YLfw.js} +1 -1
- package/dist/{index-DDXisDKy.js → index-Bya_q1J-.js} +883 -842
- package/dist/index-eFox7weK.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +22 -17
- package/dist/types/vue-data-ui.d.ts +22 -17
- package/dist/{useNestedProp-S1UXxUgm.js → useNestedProp-B33hazbH.js} +1 -1
- package/dist/{useNestedProp-CC9zGr7C.cjs → useNestedProp-BkgEhTQY.cjs} +1 -1
- package/dist/usePrinter-CSRFnDBU.cjs +1 -0
- package/dist/{usePrinter-8ofTb2MJ.js → usePrinter-CiHd1FwD.js} +230 -185
- package/dist/useResponsive-BY8tgM1n.js +188 -0
- package/dist/useResponsive-CodiGUOE.cjs +1 -0
- package/dist/vue-data-ui-BTtxyUc3.cjs +9 -0
- package/dist/vue-data-ui-Bduq4f2p.js +261 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-B-P7PMHs.cjs +19 -0
- package/dist/{vue-ui-3d-bar-DcF1nyGW.js → vue-ui-3d-bar-BUEq_VdY.js} +421 -390
- package/dist/{vue-ui-accordion-D_1fE5EF.js → vue-ui-accordion-DfUfL2dI.js} +3 -3
- package/dist/{vue-ui-accordion-Cc9958th.cjs → vue-ui-accordion-TEMpM1hO.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-Oe_yHDL0.js → vue-ui-age-pyramid-CH72tAMb.js} +255 -222
- package/dist/vue-ui-age-pyramid-DsbZ1qcQ.cjs +1 -0
- package/dist/{vue-ui-annotator-Dix6_Gm6.js → vue-ui-annotator-DPeJ2its.js} +1 -1
- package/dist/{vue-ui-annotator-Dbp6cWMr.cjs → vue-ui-annotator-DU_DJKCw.cjs} +1 -1
- package/dist/vue-ui-bullet-CtP3MlUT.js +464 -0
- package/dist/vue-ui-bullet-D8ks_rKr.cjs +34 -0
- package/dist/vue-ui-candlestick-D1jdr0bv.cjs +2 -0
- package/dist/{vue-ui-candlestick-CRwzWF6j.js → vue-ui-candlestick-DDil13a0.js} +278 -245
- package/dist/{vue-ui-carousel-table-BHeEbRKY.js → vue-ui-carousel-table-BaeIxyc0.js} +76 -69
- package/dist/vue-ui-carousel-table-C7SJIOG-.cjs +1 -0
- package/dist/{vue-ui-chestnut-CRk0RCB9.js → vue-ui-chestnut-BczSJF6S.js} +322 -291
- package/dist/vue-ui-chestnut-ih5r0Bj9.cjs +6 -0
- package/dist/{vue-ui-cursor-lU1rts1B.cjs → vue-ui-cursor-C2Pj_CI_.cjs} +1 -1
- package/dist/{vue-ui-cursor-y0kdr0uA.js → vue-ui-cursor-Dg_Dmww-.js} +2 -2
- package/dist/{vue-ui-dashboard-OyihaKdu.js → vue-ui-dashboard-Bul9dqx1.js} +2 -2
- package/dist/{vue-ui-dashboard-BfC0jS-X.cjs → vue-ui-dashboard-Cg020NiT.cjs} +1 -1
- package/dist/{vue-ui-digits-IKt4qT2-.js → vue-ui-digits-B8iAa4YZ.js} +2 -2
- package/dist/{vue-ui-digits-BJfcAiq_.cjs → vue-ui-digits-Ctgd84JR.cjs} +1 -1
- package/dist/vue-ui-donut-D7KT9EAp.cjs +1 -0
- package/dist/{vue-ui-donut-DFaGk4fI.js → vue-ui-donut-DUcp-fat.js} +376 -343
- package/dist/vue-ui-donut-evolution-CHtJ8iOK.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-Dd4o37RP.js → vue-ui-donut-evolution-C_YMbTwq.js} +375 -344
- package/dist/vue-ui-dumbbell-B0dikuqO.cjs +9 -0
- package/dist/{vue-ui-dumbbell-B7j1_JoQ.js → vue-ui-dumbbell-Buwngz_V.js} +294 -261
- package/dist/vue-ui-flow-Bz3c0K5P.js +515 -0
- package/dist/vue-ui-flow-D6rc8J-8.cjs +1 -0
- package/dist/{vue-ui-galaxy-CH1BDtWl.js → vue-ui-galaxy-Cjh0XGTX.js} +212 -181
- package/dist/vue-ui-galaxy-CmTt0vBf.cjs +1 -0
- package/dist/vue-ui-gauge-B1UvGkQa.js +527 -0
- package/dist/vue-ui-gauge-B_TKuyM7.cjs +1 -0
- package/dist/{vue-ui-gizmo-DVwQaEH1.cjs → vue-ui-gizmo-DFW6HnHp.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CKQcbe_7.js → vue-ui-gizmo-DUQ4t-At.js} +3 -3
- package/dist/{vue-ui-heatmap-B-zWMk0Y.js → vue-ui-heatmap-C-poazUw.js} +308 -277
- package/dist/vue-ui-heatmap-C2HlnqzO.cjs +1 -0
- package/dist/{vue-ui-kpi-CghbfSdM.js → vue-ui-kpi-DXe-vxAk.js} +3 -3
- package/dist/{vue-ui-kpi-CuY3xlVq.cjs → vue-ui-kpi-Z4Oi4raz.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-C7roqZ4p.js → vue-ui-mini-loader-BVtHTqxS.js} +2 -2
- package/dist/{vue-ui-mini-loader-CH_PfeDc.cjs → vue-ui-mini-loader-MMvpm9pz.cjs} +1 -1
- package/dist/vue-ui-molecule-BaJpDZND.js +805 -0
- package/dist/vue-ui-molecule-BiYIcOKN.cjs +1 -0
- package/dist/{vue-ui-mood-radar-DSznHxLS.js → vue-ui-mood-radar-BUNDwsEI.js} +259 -228
- package/dist/vue-ui-mood-radar-C6jMyFkb.cjs +1 -0
- package/dist/vue-ui-nested-donuts-DKO2dFKo.cjs +17 -0
- package/dist/{vue-ui-nested-donuts-CiE4DdEQ.js → vue-ui-nested-donuts-mDy2hXa6.js} +371 -338
- package/dist/vue-ui-onion-DwFG3HAI.js +650 -0
- package/dist/vue-ui-onion-GWNoZRhw.cjs +5 -0
- package/dist/vue-ui-parallel-coordinate-plot-DODn4Ohf.cjs +8 -0
- package/dist/vue-ui-parallel-coordinate-plot-ImET_zeo.js +719 -0
- package/dist/{vue-ui-quadrant-Cs3A77us.js → vue-ui-quadrant-BeveRihK.js} +359 -326
- package/dist/vue-ui-quadrant-yuFAxV-5.cjs +1 -0
- package/dist/{vue-ui-quick-chart-CiiSUexi.js → vue-ui-quick-chart-DAhllTfa.js} +585 -552
- package/dist/vue-ui-quick-chart-DgFDBzjS.cjs +15 -0
- package/dist/vue-ui-radar-BJH5SE6-.cjs +1 -0
- package/dist/{vue-ui-radar-CNSpiNrM.js → vue-ui-radar-BllatzRa.js} +279 -246
- package/dist/{vue-ui-rating-GoUNDOdZ.cjs → vue-ui-rating-BoZo7caL.cjs} +1 -1
- package/dist/{vue-ui-rating-b_iYZWF8.js → vue-ui-rating-D1ykV4xO.js} +2 -2
- package/dist/vue-ui-relation-circle-CKmjOle7.cjs +1 -0
- package/dist/vue-ui-relation-circle-xv2l5Be9.js +358 -0
- package/dist/vue-ui-rings-B-ZcX6y1.js +602 -0
- package/dist/vue-ui-rings-DjH3CK23.cjs +2 -0
- package/dist/{vue-ui-scatter-CVuoW-cD.js → vue-ui-scatter-DG43ck1g.js} +440 -407
- package/dist/vue-ui-scatter-SBCXAl7q.cjs +1 -0
- package/dist/{vue-ui-screenshot-Co2o48d6.cjs → vue-ui-screenshot-C1JBP_N0.cjs} +1 -1
- package/dist/{vue-ui-screenshot-Csc0dQL9.js → vue-ui-screenshot-p3ca8cAl.js} +1 -1
- package/dist/{vue-ui-skeleton-B2sRnIXX.js → vue-ui-skeleton-BYssP0K4.js} +419 -379
- package/dist/vue-ui-skeleton-BqKzuhkB.cjs +41 -0
- package/dist/{vue-ui-smiley-Ci3uMgVh.cjs → vue-ui-smiley-BXKVpHl2.cjs} +1 -1
- package/dist/{vue-ui-smiley-D4s-AdIE.js → vue-ui-smiley-D7dDCdpq.js} +2 -2
- package/dist/vue-ui-spark-trend-9V60hM3Z.cjs +1 -0
- package/dist/{vue-ui-spark-trend-CHKQGMLs.js → vue-ui-spark-trend-GWFrO_0z.js} +86 -79
- package/dist/vue-ui-sparkbar-Bgn6AY0q.cjs +1 -0
- package/dist/{vue-ui-sparkbar-Bb1fq2GR.js → vue-ui-sparkbar-CwqlyAyv.js} +90 -83
- package/dist/vue-ui-sparkgauge-Dqntz2Zv.cjs +1 -0
- package/dist/{vue-ui-sparkgauge-DWuaAQbo.js → vue-ui-sparkgauge-F2XbiXyA.js} +57 -50
- package/dist/{vue-ui-sparkhistogram-CjeJ3ch1.js → vue-ui-sparkhistogram-DRIKK6Ym.js} +74 -67
- package/dist/vue-ui-sparkhistogram-DnY4-Sdn.cjs +1 -0
- package/dist/vue-ui-sparkline-CAEs-gtK.cjs +1 -0
- package/dist/{vue-ui-sparkline-DGJDBArr.js → vue-ui-sparkline-Cxtzdlhi.js} +134 -125
- package/dist/{vue-ui-sparkstackbar-B3ul3qUZ.js → vue-ui-sparkstackbar-0A1klq9s.js} +84 -77
- package/dist/vue-ui-sparkstackbar-D37ms1rx.cjs +1 -0
- package/dist/vue-ui-stackbar-ByOuJSdM.js +947 -0
- package/dist/vue-ui-stackbar-wun4S3C0.cjs +6 -0
- package/dist/{vue-ui-strip-plot-CIb2LSV8.js → vue-ui-strip-plot-CMD0MSqY.js} +297 -264
- package/dist/vue-ui-strip-plot-IQrypGvz.cjs +1 -0
- package/dist/{vue-ui-table-CmVi0nv2.js → vue-ui-table-B75DJ39t.js} +1 -1
- package/dist/{vue-ui-table-B_sFrAO9.cjs → vue-ui-table-aj0XZ7T5.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CgFr38QT.js → vue-ui-table-heatmap-BO2ugWqD.js} +55 -48
- package/dist/vue-ui-table-heatmap-Ce93TyBF.cjs +1 -0
- package/dist/{vue-ui-table-sparkline-eg2Qd8ws.js → vue-ui-table-sparkline-CbjfAaj2.js} +88 -81
- package/dist/vue-ui-table-sparkline-D6KJjDnU.cjs +1 -0
- package/dist/vue-ui-thermometer-Pq4PvSIP.js +447 -0
- package/dist/vue-ui-thermometer-swmi4FmH.cjs +1 -0
- package/dist/{vue-ui-timer-DM1IStj1.cjs → vue-ui-timer-B6IB6yS6.cjs} +1 -1
- package/dist/{vue-ui-timer-COSI3Q5T.js → vue-ui-timer-Bk3BvB-B.js} +6 -6
- package/dist/vue-ui-tiremarks-CU9HJIqf.js +310 -0
- package/dist/vue-ui-tiremarks-Cn79uQH2.cjs +1 -0
- package/dist/vue-ui-treemap-BEMuKV7x.cjs +1 -0
- package/dist/vue-ui-treemap-DY-lRAhC.js +825 -0
- package/dist/vue-ui-vertical-bar-B1e2RxTv.cjs +4 -0
- package/dist/vue-ui-vertical-bar-CtnIKsM1.js +861 -0
- package/dist/vue-ui-waffle-BqP7Okgu.cjs +1 -0
- package/dist/vue-ui-waffle-reOsx-gJ.js +791 -0
- package/dist/vue-ui-wheel-BuWUGnkC.cjs +1 -0
- package/dist/vue-ui-wheel-kYxny3vn.js +291 -0
- package/dist/vue-ui-word-cloud-DbMqrHAf.js +607 -0
- package/dist/vue-ui-word-cloud-DwLY4QdB.cjs +1 -0
- package/dist/vue-ui-xy-CGWzriYn.cjs +3 -0
- package/dist/{vue-ui-xy-canvas-BYdTxzi6.js → vue-ui-xy-canvas-B0HTR7OV.js} +441 -408
- package/dist/vue-ui-xy-canvas-CgJd5FiT.cjs +9 -0
- package/dist/{vue-ui-xy-x8KEsGV-.js → vue-ui-xy-rbACig0h.js} +824 -791
- package/package.json +1 -1
- package/dist/BaseIcon-E7FmzMcY.cjs +0 -1
- package/dist/index-C7_6YjWN.cjs +0 -9
- package/dist/usePrinter-8EP4iaGm.cjs +0 -1
- package/dist/useResponsive-B3TrDDIG.cjs +0 -1
- package/dist/useResponsive-NZB-WLRF.js +0 -187
- package/dist/vue-data-ui-4Yd255Ia.cjs +0 -9
- package/dist/vue-data-ui-Cp7bO_tj.js +0 -258
- package/dist/vue-ui-3d-bar-BeR2aBgQ.cjs +0 -19
- package/dist/vue-ui-age-pyramid-R-C4P4mI.cjs +0 -1
- package/dist/vue-ui-bullet-CQKaC4wG.js +0 -409
- package/dist/vue-ui-bullet-DSZox236.cjs +0 -23
- package/dist/vue-ui-candlestick-Dilozp3V.cjs +0 -2
- package/dist/vue-ui-carousel-table-C0GDDSW9.cjs +0 -1
- package/dist/vue-ui-chestnut-DdEcEI04.cjs +0 -6
- package/dist/vue-ui-donut-DTSVlGMg.cjs +0 -1
- package/dist/vue-ui-donut-evolution-BuUafabD.cjs +0 -1
- package/dist/vue-ui-dumbbell-CVfgnyKi.cjs +0 -9
- package/dist/vue-ui-flow-C45dODaB.cjs +0 -1
- package/dist/vue-ui-flow-DkPTzNv9.js +0 -484
- package/dist/vue-ui-galaxy-DlPavMK0.cjs +0 -1
- package/dist/vue-ui-gauge-BXiy515T.js +0 -494
- package/dist/vue-ui-gauge-vMFUYHYH.cjs +0 -1
- package/dist/vue-ui-heatmap-CMQqQnxc.cjs +0 -1
- package/dist/vue-ui-molecule-BwmkMEVN.js +0 -774
- package/dist/vue-ui-molecule-nOuD0hR5.cjs +0 -1
- package/dist/vue-ui-mood-radar-Bof_C9Ae.cjs +0 -1
- package/dist/vue-ui-nested-donuts-DIb6YyWv.cjs +0 -17
- package/dist/vue-ui-onion-D9o6Rcgu.js +0 -617
- package/dist/vue-ui-onion-N3tRNc4u.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-BcYrYXhG.js +0 -686
- package/dist/vue-ui-parallel-coordinate-plot-qKGk2bX6.cjs +0 -8
- package/dist/vue-ui-quadrant-Do48rGrX.cjs +0 -1
- package/dist/vue-ui-quick-chart-BxU4d-sJ.cjs +0 -15
- package/dist/vue-ui-radar-CooAvwPA.cjs +0 -1
- package/dist/vue-ui-relation-circle-nRf1pvD0.js +0 -325
- package/dist/vue-ui-relation-circle-uNgJni4x.cjs +0 -1
- package/dist/vue-ui-rings-BgRc1o4_.js +0 -569
- package/dist/vue-ui-rings-iIgQI9Ws.cjs +0 -2
- package/dist/vue-ui-scatter-CkrpmLxP.cjs +0 -1
- package/dist/vue-ui-skeleton-CGV1dEUD.cjs +0 -41
- package/dist/vue-ui-spark-trend-BfoEoJEy.cjs +0 -1
- package/dist/vue-ui-sparkbar-DB2DeXti.cjs +0 -1
- package/dist/vue-ui-sparkgauge-CJepIY2u.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-B7B36LLT.cjs +0 -1
- package/dist/vue-ui-sparkline-BcqmwDAb.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-DT3aKNeV.cjs +0 -1
- package/dist/vue-ui-stackbar-CRcUugkl.cjs +0 -6
- package/dist/vue-ui-stackbar-DNROvZII.js +0 -915
- package/dist/vue-ui-strip-plot-Ck9Fmt_b.cjs +0 -1
- package/dist/vue-ui-table-heatmap-Chvdf2Gi.cjs +0 -1
- package/dist/vue-ui-table-sparkline-DUUYQ5dH.cjs +0 -1
- package/dist/vue-ui-thermometer-BFfN4aat.cjs +0 -1
- package/dist/vue-ui-thermometer-BePmFiwy.js +0 -416
- package/dist/vue-ui-tiremarks-BkYXzU3R.cjs +0 -1
- package/dist/vue-ui-tiremarks-d6TmSHY7.js +0 -279
- package/dist/vue-ui-treemap-BgeZnbl3.cjs +0 -1
- package/dist/vue-ui-treemap-Qg0858o6.js +0 -792
- package/dist/vue-ui-vertical-bar-CieqHVD5.js +0 -828
- package/dist/vue-ui-vertical-bar-D3atbdvl.cjs +0 -4
- package/dist/vue-ui-waffle-CD7C9Lu4.cjs +0 -1
- package/dist/vue-ui-waffle-CjNhM-mV.js +0 -758
- package/dist/vue-ui-wheel-B8mbO6ht.js +0 -258
- package/dist/vue-ui-wheel-CYmM7J61.cjs +0 -1
- package/dist/vue-ui-word-cloud-DMXrUmX5.js +0 -574
- package/dist/vue-ui-word-cloud-Dm9yZ1zQ.cjs +0 -1
- package/dist/vue-ui-xy-DoWnidom.cjs +0 -3
- package/dist/vue-ui-xy-canvas-DHs5sb3t.cjs +0 -9
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
import { computed as m, onMounted as He, ref as b, watch as Ee, openBlock as u, createElementBlock as v, normalizeClass as he, normalizeStyle as N, createBlock as P, createCommentVNode as $, unref as i, createSlots as Se, withCtx as y, renderSlot as k, normalizeProps as X, guardReactiveProps as W, createVNode as me, createElementVNode as S, Fragment as F, renderList as I, toDisplayString as q, createTextVNode as Me, nextTick as ze } from "vue";
|
|
2
|
+
import { u as Ye, o as De, e as Ge, c as ge, t as Be, a as Ue, p as K, b as Ve, v as f, f as pe, X as je, F as be, K as Xe, i as We, q as qe, r as Ke } from "./index-Bya_q1J-.js";
|
|
3
|
+
import { _ as Re } from "./Title-C5pIfQAz.js";
|
|
4
|
+
import { u as Ze, U as Je } from "./usePrinter-CiHd1FwD.js";
|
|
5
|
+
import { D as Qe } from "./DataTable-DYqC2pqu.js";
|
|
6
|
+
import et from "./vue-ui-accordion-DfUfL2dI.js";
|
|
7
|
+
import tt from "./vue-ui-skeleton-BYssP0K4.js";
|
|
8
|
+
import { u as ye } from "./useNestedProp-B33hazbH.js";
|
|
9
|
+
import { _ as ot } from "./PackageVersion-VkaUzgmt.js";
|
|
10
|
+
import { P as lt } from "./PenAndPaper-DAZYA8Ew.js";
|
|
11
|
+
import { _ as at } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
|
+
const nt = ["id"], st = {
|
|
13
|
+
key: 1,
|
|
14
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
15
|
+
}, rt = ["xmlns", "viewBox"], ut = ["id"], it = ["stop-color"], ct = ["stop-color"], dt = ["d", "fill", "stroke", "stroke-width"], vt = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "onMouseenter"], ft = ["x", "y", "font-size", "fill"], ht = ["x", "y", "font-size", "fill"], mt = {
|
|
16
|
+
key: 3,
|
|
17
|
+
class: "vue-data-ui-watermark"
|
|
18
|
+
}, gt = {
|
|
19
|
+
key: 5,
|
|
20
|
+
ref: "source",
|
|
21
|
+
dir: "auto"
|
|
22
|
+
}, pt = ["innerHTML"], bt = {
|
|
23
|
+
__name: "vue-ui-flow",
|
|
24
|
+
props: {
|
|
25
|
+
config: {
|
|
26
|
+
type: Object,
|
|
27
|
+
default() {
|
|
28
|
+
return {};
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
dataset: {
|
|
32
|
+
type: Array,
|
|
33
|
+
default() {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
setup(ke, { expose: we }) {
|
|
39
|
+
const g = ke, { vue_ui_flow: Ce } = Ye(), M = m(() => !!g.dataset && g.dataset.length);
|
|
40
|
+
He(() => {
|
|
41
|
+
R();
|
|
42
|
+
});
|
|
43
|
+
function R() {
|
|
44
|
+
De(g.dataset) && Ge({
|
|
45
|
+
componentName: "VueUiFlow",
|
|
46
|
+
type: "dataset"
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
const z = b(ge()), Y = b(null), Z = b(0), J = b(0), T = b(!1);
|
|
50
|
+
function $e(t) {
|
|
51
|
+
T.value = t, Z.value += 1;
|
|
52
|
+
}
|
|
53
|
+
const e = m({
|
|
54
|
+
get: () => Q(),
|
|
55
|
+
set: (t) => t
|
|
56
|
+
});
|
|
57
|
+
function Q() {
|
|
58
|
+
const t = ye({
|
|
59
|
+
userConfig: g.config,
|
|
60
|
+
defaultConfig: Ce
|
|
61
|
+
});
|
|
62
|
+
return t.theme ? {
|
|
63
|
+
...ye({
|
|
64
|
+
userConfig: Be.vue_ui_flow[t.theme] || g.config,
|
|
65
|
+
defaultConfig: t
|
|
66
|
+
}),
|
|
67
|
+
customPalette: Ue[t.theme] || K
|
|
68
|
+
} : t;
|
|
69
|
+
}
|
|
70
|
+
Ee(() => g.config, (t) => {
|
|
71
|
+
e.value = Q(), R(), J.value += 1;
|
|
72
|
+
}, { deep: !0 });
|
|
73
|
+
const { isPrinting: ee, isImaging: te, generatePdf: oe, generateImage: le } = Ze({
|
|
74
|
+
elementId: `flow_${z.value}`,
|
|
75
|
+
fileName: e.value.style.chart.title.text || "vue-ui-flow"
|
|
76
|
+
}), D = m(() => Ve(e.value.customPalette)), ae = m(() => e.value.style.chart.nodes.gap), x = m(() => e.value.style.chart.nodes.width), O = b({
|
|
77
|
+
showTable: e.value.table.show
|
|
78
|
+
}), ne = m(() => e.value.style.chart.links.width), G = m(() => !g.dataset || !g.dataset.length ? [] : g.dataset.map((t) => [
|
|
79
|
+
t[0],
|
|
80
|
+
t[1],
|
|
81
|
+
f(t[2])
|
|
82
|
+
])), se = m(() => {
|
|
83
|
+
const t = {};
|
|
84
|
+
function l(n) {
|
|
85
|
+
t[n] || (t[n] = { inflow: 0, outflow: 0 });
|
|
86
|
+
}
|
|
87
|
+
G.value.forEach(([n, a, c]) => {
|
|
88
|
+
l(n), l(a), t[n].outflow += c, t[a].inflow += c;
|
|
89
|
+
});
|
|
90
|
+
let o = 0;
|
|
91
|
+
for (const n in t) {
|
|
92
|
+
const a = Math.max(t[n].inflow, t[n].outflow);
|
|
93
|
+
o = Math.max(o, a);
|
|
94
|
+
}
|
|
95
|
+
return o;
|
|
96
|
+
});
|
|
97
|
+
function xe(t) {
|
|
98
|
+
return t / se.value * 100 + e.value.style.chart.nodes.minHeight;
|
|
99
|
+
}
|
|
100
|
+
function _e(t) {
|
|
101
|
+
const l = e.value.style.chart.nodes.minHeight;
|
|
102
|
+
return (t - l) / 100 * se.value;
|
|
103
|
+
}
|
|
104
|
+
function Ne(t) {
|
|
105
|
+
const l = {}, o = {};
|
|
106
|
+
function n(s, r) {
|
|
107
|
+
l[s] || (l[s] = { height: 0, level: null, inflow: 0, outflow: 0 }), l[s].level === null && (l[s].level = r), o[r] || (o[r] = []), o[r].includes(s) || o[r].push(s);
|
|
108
|
+
}
|
|
109
|
+
t.forEach(([s, r, h], _) => {
|
|
110
|
+
const C = l[s] ? l[s].level : 0, E = C + 1;
|
|
111
|
+
n(s, C), n(r, E), l[s].children || (l[s].children = []), l[s].children.push({ target: r, value: h }), l[s].outflow += h, l[r].inflow += h;
|
|
112
|
+
}), Object.keys(l).forEach((s, r) => {
|
|
113
|
+
l[s].color = D.value[r] || D.value[r % D.value.length] || K[r] || K[r % d.length];
|
|
114
|
+
});
|
|
115
|
+
for (const s in l)
|
|
116
|
+
l[s].height = xe(Math.max(l[s].inflow, l[s].outflow)), l[s].name = s;
|
|
117
|
+
const a = {};
|
|
118
|
+
for (const s in o) {
|
|
119
|
+
let r = 0;
|
|
120
|
+
o[s].forEach((h, _) => {
|
|
121
|
+
const C = l[h].height;
|
|
122
|
+
a[h] = {
|
|
123
|
+
x: parseInt(s, 10) * ne.value + e.value.style.chart.padding.left,
|
|
124
|
+
y: r,
|
|
125
|
+
absoluteY: r,
|
|
126
|
+
height: C,
|
|
127
|
+
i: _,
|
|
128
|
+
color: l[h].color,
|
|
129
|
+
value: _e(C)
|
|
130
|
+
}, r += C + ae.value;
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
const c = [];
|
|
134
|
+
for (const s in l) {
|
|
135
|
+
let r = a[s].absoluteY;
|
|
136
|
+
l[s].children && l[s].children.forEach(({ target: h, value: _ }, C) => {
|
|
137
|
+
const E = a[h].y, V = a[s], j = a[h], ce = f(r), de = f(r + _ / l[s].outflow * V.height), ve = f(E), fe = f(E + _ / l[h].inflow * j.height), Le = {
|
|
138
|
+
id: ge(),
|
|
139
|
+
source: s,
|
|
140
|
+
target: h,
|
|
141
|
+
path: `M ${f(V.x) + f(x.value)} ${ce} L ${f(V.x) + f(x.value)} ${de} L ${f(j.x)} ${fe} L ${f(j.x)} ${ve} Z`,
|
|
142
|
+
value: _,
|
|
143
|
+
sourceColor: l[s].color,
|
|
144
|
+
targetColor: l[h].color
|
|
145
|
+
};
|
|
146
|
+
c.push(Le), r += de - ce, a[h].y += fe - ve;
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
return { nodeCoordinates: a, links: c };
|
|
150
|
+
}
|
|
151
|
+
const p = m(() => {
|
|
152
|
+
const t = Ne(g.dataset);
|
|
153
|
+
return {
|
|
154
|
+
nodes: Object.keys(t.nodeCoordinates).map((l, o) => ({
|
|
155
|
+
...t.nodeCoordinates[l],
|
|
156
|
+
name: l
|
|
157
|
+
})),
|
|
158
|
+
links: t.links
|
|
159
|
+
};
|
|
160
|
+
}), Te = m(() => Pe(p.value.nodes));
|
|
161
|
+
function Pe(t) {
|
|
162
|
+
const l = {};
|
|
163
|
+
for (const n in t) {
|
|
164
|
+
const { x: a, height: c } = t[n];
|
|
165
|
+
l[a] || (l[a] = 0), l[a] += c + ae.value;
|
|
166
|
+
}
|
|
167
|
+
return Math.max(...Object.values(l));
|
|
168
|
+
}
|
|
169
|
+
const B = m(() => {
|
|
170
|
+
const { top: t, right: l, left: o, bottom: n } = e.value.style.chart.padding, a = G.value.length * ne.value;
|
|
171
|
+
return {
|
|
172
|
+
height: Te.value + t + n,
|
|
173
|
+
width: l + Math.max(...p.value.nodes.map((c) => c.x)) + x.value,
|
|
174
|
+
left: o,
|
|
175
|
+
top: t,
|
|
176
|
+
right: a - l,
|
|
177
|
+
p_top: t,
|
|
178
|
+
p_bottom: n
|
|
179
|
+
};
|
|
180
|
+
});
|
|
181
|
+
function Fe(t) {
|
|
182
|
+
const l = {}, o = {}, n = /* @__PURE__ */ new Set();
|
|
183
|
+
return G.value.forEach(([a, c, s]) => {
|
|
184
|
+
l[a] || (l[a] = []), o[c] || (o[c] = []), l[a].push(c), o[c].push(a);
|
|
185
|
+
}), l[t] && l[t].forEach((a) => n.add(a)), o[t] && o[t].forEach((a) => n.add(a)), Array.from(n).concat(t);
|
|
186
|
+
}
|
|
187
|
+
const w = b(null), A = b(null);
|
|
188
|
+
function Ie(t) {
|
|
189
|
+
w.value = Fe(t.name), A.value = t.name;
|
|
190
|
+
}
|
|
191
|
+
function Oe() {
|
|
192
|
+
w.value = null, A.value = null;
|
|
193
|
+
}
|
|
194
|
+
const re = m(() => p.value.links.map(({ source: t, target: l, sourceColor: o, targetColor: n, value: a }) => ({
|
|
195
|
+
source: t,
|
|
196
|
+
target: l,
|
|
197
|
+
sourceColor: o,
|
|
198
|
+
targetColor: n,
|
|
199
|
+
value: a
|
|
200
|
+
})));
|
|
201
|
+
function ue() {
|
|
202
|
+
ze(() => {
|
|
203
|
+
const t = re.value.map((n, a) => [
|
|
204
|
+
[n.source],
|
|
205
|
+
[n.target],
|
|
206
|
+
[n.value]
|
|
207
|
+
]), l = [
|
|
208
|
+
[e.value.style.chart.title.text],
|
|
209
|
+
[e.value.style.chart.title.subtitle.text],
|
|
210
|
+
[
|
|
211
|
+
[e.value.table.columnNames.source],
|
|
212
|
+
[e.value.table.columnNames.target],
|
|
213
|
+
[e.value.table.columnNames.value]
|
|
214
|
+
]
|
|
215
|
+
].concat(t), o = qe(l);
|
|
216
|
+
Ke({
|
|
217
|
+
csvContent: o,
|
|
218
|
+
title: e.value.style.chart.title.text || "vue-ui-flow"
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
const L = m(() => {
|
|
223
|
+
const t = [
|
|
224
|
+
e.value.table.columnNames.source,
|
|
225
|
+
e.value.table.columnNames.target,
|
|
226
|
+
e.value.table.columnNames.value
|
|
227
|
+
], l = re.value.map((a, c) => [
|
|
228
|
+
{
|
|
229
|
+
color: a.sourceColor,
|
|
230
|
+
name: a.source
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
color: a.targetColor,
|
|
234
|
+
name: a.target
|
|
235
|
+
},
|
|
236
|
+
pe({
|
|
237
|
+
p: e.value.style.chart.nodes.labels.prefix,
|
|
238
|
+
v: a.value,
|
|
239
|
+
s: e.value.style.chart.nodes.labels.suffix,
|
|
240
|
+
r: e.value.style.chart.nodes.labels.rounding
|
|
241
|
+
})
|
|
242
|
+
]), o = {
|
|
243
|
+
th: {
|
|
244
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
245
|
+
color: e.value.table.th.color,
|
|
246
|
+
outline: e.value.table.th.outline
|
|
247
|
+
},
|
|
248
|
+
td: {
|
|
249
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
250
|
+
color: e.value.table.td.color,
|
|
251
|
+
outline: e.value.table.td.outline
|
|
252
|
+
},
|
|
253
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
254
|
+
};
|
|
255
|
+
return {
|
|
256
|
+
colNames: [
|
|
257
|
+
e.value.table.columnNames.source,
|
|
258
|
+
e.value.table.columnNames.target,
|
|
259
|
+
e.value.table.columnNames.value
|
|
260
|
+
],
|
|
261
|
+
head: t,
|
|
262
|
+
body: l,
|
|
263
|
+
config: o
|
|
264
|
+
};
|
|
265
|
+
});
|
|
266
|
+
function Ae() {
|
|
267
|
+
return p.value;
|
|
268
|
+
}
|
|
269
|
+
function ie() {
|
|
270
|
+
O.value.showTable = !O.value.showTable;
|
|
271
|
+
}
|
|
272
|
+
const H = b(!1);
|
|
273
|
+
function U() {
|
|
274
|
+
H.value = !H.value;
|
|
275
|
+
}
|
|
276
|
+
return we({
|
|
277
|
+
getData: Ae,
|
|
278
|
+
generateCsv: ue,
|
|
279
|
+
generateImage: le,
|
|
280
|
+
generatePdf: oe,
|
|
281
|
+
toggleTable: ie,
|
|
282
|
+
toggleAnnotator: U
|
|
283
|
+
}), (t, l) => (u(), v("div", {
|
|
284
|
+
ref_key: "flowChart",
|
|
285
|
+
ref: Y,
|
|
286
|
+
class: he(`vue-ui-flow ${T.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
287
|
+
style: N(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor}`),
|
|
288
|
+
id: `flow_${z.value}`
|
|
289
|
+
}, [
|
|
290
|
+
e.value.userOptions.buttons.annotator ? (u(), P(lt, {
|
|
291
|
+
key: 0,
|
|
292
|
+
parent: Y.value,
|
|
293
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
294
|
+
color: e.value.style.chart.color,
|
|
295
|
+
active: H.value,
|
|
296
|
+
onClose: U
|
|
297
|
+
}, null, 8, ["parent", "backgroundColor", "color", "active"])) : $("", !0),
|
|
298
|
+
e.value.style.chart.title.text ? (u(), v("div", st, [
|
|
299
|
+
(u(), P(Re, {
|
|
300
|
+
key: `title_${J.value}`,
|
|
301
|
+
config: {
|
|
302
|
+
title: {
|
|
303
|
+
cy: "flow-title",
|
|
304
|
+
...e.value.style.chart.title
|
|
305
|
+
},
|
|
306
|
+
subtitle: {
|
|
307
|
+
cy: "flow-subtitle",
|
|
308
|
+
...e.value.style.chart.title.subtitle
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}, null, 8, ["config"]))
|
|
312
|
+
])) : $("", !0),
|
|
313
|
+
e.value.userOptions.show && M.value ? (u(), P(Je, {
|
|
314
|
+
ref: "details",
|
|
315
|
+
key: `user_option_${Z.value}`,
|
|
316
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
317
|
+
color: e.value.style.chart.color,
|
|
318
|
+
isPrinting: i(ee),
|
|
319
|
+
isImaging: i(te),
|
|
320
|
+
uid: z.value,
|
|
321
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
322
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
323
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
324
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
325
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
326
|
+
isFullscreen: T.value,
|
|
327
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
328
|
+
chartElement: Y.value,
|
|
329
|
+
position: e.value.userOptions.position,
|
|
330
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
331
|
+
isAnnotation: H.value,
|
|
332
|
+
onToggleFullscreen: $e,
|
|
333
|
+
onGeneratePdf: i(oe),
|
|
334
|
+
onGenerateCsv: ue,
|
|
335
|
+
onGenerateImage: i(le),
|
|
336
|
+
onToggleTable: ie,
|
|
337
|
+
onToggleAnnotator: U
|
|
338
|
+
}, Se({ _: 2 }, [
|
|
339
|
+
t.$slots.optionPdf ? {
|
|
340
|
+
name: "optionPdf",
|
|
341
|
+
fn: y(() => [
|
|
342
|
+
k(t.$slots, "optionPdf", {}, void 0, !0)
|
|
343
|
+
]),
|
|
344
|
+
key: "0"
|
|
345
|
+
} : void 0,
|
|
346
|
+
t.$slots.optionCsv ? {
|
|
347
|
+
name: "optionCsv",
|
|
348
|
+
fn: y(() => [
|
|
349
|
+
k(t.$slots, "optionCsv", {}, void 0, !0)
|
|
350
|
+
]),
|
|
351
|
+
key: "1"
|
|
352
|
+
} : void 0,
|
|
353
|
+
t.$slots.optionImg ? {
|
|
354
|
+
name: "optionImg",
|
|
355
|
+
fn: y(() => [
|
|
356
|
+
k(t.$slots, "optionImg", {}, void 0, !0)
|
|
357
|
+
]),
|
|
358
|
+
key: "2"
|
|
359
|
+
} : void 0,
|
|
360
|
+
t.$slots.optionTable ? {
|
|
361
|
+
name: "optionTable",
|
|
362
|
+
fn: y(() => [
|
|
363
|
+
k(t.$slots, "optionTable", {}, void 0, !0)
|
|
364
|
+
]),
|
|
365
|
+
key: "3"
|
|
366
|
+
} : void 0,
|
|
367
|
+
t.$slots.optionFullscreen ? {
|
|
368
|
+
name: "optionFullscreen",
|
|
369
|
+
fn: y(({ toggleFullscreen: o, isFullscreen: n }) => [
|
|
370
|
+
k(t.$slots, "optionFullscreen", X(W({ toggleFullscreen: o, isFullscreen: n })), void 0, !0)
|
|
371
|
+
]),
|
|
372
|
+
key: "4"
|
|
373
|
+
} : void 0,
|
|
374
|
+
t.$slots.optionAnnotator ? {
|
|
375
|
+
name: "optionAnnotator",
|
|
376
|
+
fn: y(({ toggleAnnotator: o, isAnnotator: n }) => [
|
|
377
|
+
k(t.$slots, "optionAnnotator", X(W({ toggleAnnotator: o, isAnnotator: n })), void 0, !0)
|
|
378
|
+
]),
|
|
379
|
+
key: "5"
|
|
380
|
+
} : void 0
|
|
381
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) : $("", !0),
|
|
382
|
+
(u(), v("svg", {
|
|
383
|
+
xmlns: i(je),
|
|
384
|
+
viewBox: `0 0 ${B.value.width} ${B.value.height}`,
|
|
385
|
+
class: he({ "vue-data-ui-fullscreen--on": T.value, "vue-data-ui-fulscreen--off": !T.value }),
|
|
386
|
+
style: N(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
|
|
387
|
+
}, [
|
|
388
|
+
me(ot),
|
|
389
|
+
S("defs", null, [
|
|
390
|
+
(u(!0), v(F, null, I(p.value.links, (o, n) => (u(), v("linearGradient", {
|
|
391
|
+
id: o.id,
|
|
392
|
+
x1: "0%",
|
|
393
|
+
y1: "0%",
|
|
394
|
+
x2: "100%",
|
|
395
|
+
y2: "0%"
|
|
396
|
+
}, [
|
|
397
|
+
S("stop", {
|
|
398
|
+
offset: "0%",
|
|
399
|
+
"stop-color": o.sourceColor
|
|
400
|
+
}, null, 8, it),
|
|
401
|
+
S("stop", {
|
|
402
|
+
offset: "100%",
|
|
403
|
+
"stop-color": o.targetColor
|
|
404
|
+
}, null, 8, ct)
|
|
405
|
+
], 8, ut))), 256))
|
|
406
|
+
]),
|
|
407
|
+
(u(!0), v(F, null, I(p.value.links, (o) => (u(), v("path", {
|
|
408
|
+
class: "vue-ui-flow-link",
|
|
409
|
+
d: o.path,
|
|
410
|
+
fill: `url(#${o.id})`,
|
|
411
|
+
stroke: e.value.style.chart.links.stroke,
|
|
412
|
+
"stroke-width": e.value.style.chart.links.strokeWidth,
|
|
413
|
+
style: N(`opacity:${A.value ? [o.target, o.source].includes(A.value) ? 1 : 0.3 : e.value.style.chart.links.opacity}`)
|
|
414
|
+
}, null, 12, dt))), 256)),
|
|
415
|
+
(u(!0), v(F, null, I(p.value.nodes, (o, n) => (u(), v("rect", {
|
|
416
|
+
class: "vue-ui-flow-node",
|
|
417
|
+
x: o.x,
|
|
418
|
+
y: i(f)(o.absoluteY),
|
|
419
|
+
height: i(f)(o.height),
|
|
420
|
+
width: x.value,
|
|
421
|
+
fill: o.color,
|
|
422
|
+
stroke: e.value.style.chart.nodes.stroke,
|
|
423
|
+
"stroke-width": e.value.style.chart.nodes.strokeWidth,
|
|
424
|
+
onMouseenter: (a) => Ie(o),
|
|
425
|
+
onMouseleave: l[0] || (l[0] = (a) => Oe()),
|
|
426
|
+
style: N(`opacity:${w.value ? w.value.includes(o.name) ? 1 : 0.2 : 1}`)
|
|
427
|
+
}, null, 44, vt))), 256)),
|
|
428
|
+
(u(!0), v(F, null, I(p.value.nodes, (o, n) => (u(), v("text", {
|
|
429
|
+
x: o.x + x.value / 2,
|
|
430
|
+
y: i(f)(o.absoluteY + o.height / 2 - e.value.style.chart.nodes.labels.fontSize / 4),
|
|
431
|
+
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
432
|
+
fill: i(be)(o.color),
|
|
433
|
+
"text-anchor": "middle",
|
|
434
|
+
style: N(`pointer-events: none; opacity:${w.value ? w.value.includes(o.name) ? 1 : 0 : 1}`)
|
|
435
|
+
}, q(e.value.style.chart.nodes.labels.abbreviation.use ? i(Xe)({ source: o.name, length: e.value.style.chart.nodes.labels.abbreviation.length }) : o.name), 13, ft))), 256)),
|
|
436
|
+
(u(!0), v(F, null, I(p.value.nodes, (o, n) => (u(), v("text", {
|
|
437
|
+
x: o.x + x.value / 2,
|
|
438
|
+
y: i(f)(o.absoluteY + o.height / 2 + e.value.style.chart.nodes.labels.fontSize),
|
|
439
|
+
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
440
|
+
fill: i(be)(o.color),
|
|
441
|
+
"text-anchor": "middle",
|
|
442
|
+
style: N(`pointer-events: none; opacity:${w.value ? w.value.includes(o.name) ? 1 : 0 : 1}`)
|
|
443
|
+
}, q(i(We)(
|
|
444
|
+
e.value.style.chart.nodes.labels.formatter,
|
|
445
|
+
o.value,
|
|
446
|
+
i(pe)({
|
|
447
|
+
p: e.value.style.chart.nodes.labels.prefix,
|
|
448
|
+
v: o.value,
|
|
449
|
+
s: e.value.style.chart.nodes.labels.suffix,
|
|
450
|
+
r: e.value.style.chart.nodes.labels.rounding
|
|
451
|
+
}),
|
|
452
|
+
{ datapoint: o, seriesIndex: n }
|
|
453
|
+
)), 13, ht))), 256)),
|
|
454
|
+
k(t.$slots, "svg", { svg: B.value }, void 0, !0)
|
|
455
|
+
], 14, rt)),
|
|
456
|
+
t.$slots.watermark ? (u(), v("div", mt, [
|
|
457
|
+
k(t.$slots, "watermark", X(W({ isPrinting: i(ee) || i(te) })), void 0, !0)
|
|
458
|
+
])) : $("", !0),
|
|
459
|
+
M.value ? $("", !0) : (u(), P(tt, {
|
|
460
|
+
key: 4,
|
|
461
|
+
config: {
|
|
462
|
+
type: "flow",
|
|
463
|
+
style: {
|
|
464
|
+
backgroundColor: e.value.style.chart.backgroundColor
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}, null, 8, ["config"])),
|
|
468
|
+
t.$slots.source ? (u(), v("div", gt, [
|
|
469
|
+
k(t.$slots, "source", {}, void 0, !0)
|
|
470
|
+
], 512)) : $("", !0),
|
|
471
|
+
M.value ? (u(), P(et, {
|
|
472
|
+
key: 6,
|
|
473
|
+
hideDetails: "",
|
|
474
|
+
config: {
|
|
475
|
+
open: O.value.showTable,
|
|
476
|
+
maxHeight: 1e4,
|
|
477
|
+
body: {
|
|
478
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
479
|
+
color: e.value.style.chart.color
|
|
480
|
+
},
|
|
481
|
+
head: {
|
|
482
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
483
|
+
color: e.value.style.chart.color
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
}, {
|
|
487
|
+
content: y(() => [
|
|
488
|
+
me(Qe, {
|
|
489
|
+
colNames: L.value.colNames,
|
|
490
|
+
head: L.value.head,
|
|
491
|
+
body: L.value.body,
|
|
492
|
+
config: L.value.config,
|
|
493
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
494
|
+
onClose: l[1] || (l[1] = (o) => O.value.showTable = !1)
|
|
495
|
+
}, {
|
|
496
|
+
th: y(({ th: o }) => [
|
|
497
|
+
S("div", {
|
|
498
|
+
innerHTML: o,
|
|
499
|
+
style: { display: "flex", "align-items": "center" }
|
|
500
|
+
}, null, 8, pt)
|
|
501
|
+
]),
|
|
502
|
+
td: y(({ td: o }) => [
|
|
503
|
+
Me(q(o.name || o), 1)
|
|
504
|
+
]),
|
|
505
|
+
_: 1
|
|
506
|
+
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
507
|
+
]),
|
|
508
|
+
_: 1
|
|
509
|
+
}, 8, ["config"])) : $("", !0)
|
|
510
|
+
], 14, nt));
|
|
511
|
+
}
|
|
512
|
+
}, It = /* @__PURE__ */ at(bt, [["__scopeId", "data-v-cbc0789b"]]);
|
|
513
|
+
export {
|
|
514
|
+
It as default
|
|
515
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-eFox7weK.cjs"),he=require("./Title-0Tp4hZ4u.cjs"),K=require("./usePrinter-CSRFnDBU.cjs"),me=require("./DataTable-DTzynbND.cjs"),pe=require("./vue-ui-accordion-TEMpM1hO.cjs"),ge=require("./vue-ui-skeleton-BqKzuhkB.cjs"),Q=require("./useNestedProp-BkgEhTQY.cjs"),ke=require("./PackageVersion-DwI-KhXH.cjs"),ye=require("./PenAndPaper-CDFVOo7X.cjs"),be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],we={key:1,style:"width:100%;background:transparent;padding-bottom:24px"},Ne=["xmlns","viewBox"],xe=["id"],$e=["stop-color"],Be=["stop-color"],_e=["d","fill","stroke","stroke-width"],Pe=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],Ee=["x","y","font-size","fill"],Se=["x","y","font-size","fill"],Te={key:3,class:"vue-data-ui-watermark"},Fe={key:5,ref:"source",dir:"auto"},Le=["innerHTML"],ze={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(ee,{expose:te}){const f=ee,{vue_ui_flow:oe}=s.useConfig(),$=e.computed(()=>!!f.dataset&&f.dataset.length);e.onMounted(()=>{z()});function z(){s.objectIsEmpty(f.dataset)&&s.error({componentName:"VueUiFlow",type:"dataset"})}const B=e.ref(s.createUid()),_=e.ref(null),I=e.ref(0),O=e.ref(0),y=e.ref(!1);function le(o){y.value=o,I.value+=1}const t=e.computed({get:()=>A(),set:o=>o});function A(){const o=Q.useNestedProp({userConfig:f.config,defaultConfig:oe});return o.theme?{...Q.useNestedProp({userConfig:s.themes.vue_ui_flow[o.theme]||f.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>f.config,o=>{t.value=A(),z(),O.value+=1},{deep:!0});const{isPrinting:V,isImaging:H,generatePdf:M,generateImage:D}=K.usePrinter({elementId:`flow_${B.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),P=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),q=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),b=e.ref({showTable:t.value.table.show}),Y=e.computed(()=>t.value.style.chart.links.width),E=e.computed(()=>!f.dataset||!f.dataset.length?[]:f.dataset.map(o=>[o[0],o[1],s.checkNaN(o[2])])),G=e.computed(()=>{const o={};function n(r){o[r]||(o[r]={inflow:0,outflow:0})}E.value.forEach(([r,a,i])=>{n(r),n(a),o[r].outflow+=i,o[a].inflow+=i});let l=0;for(const r in o){const a=Math.max(o[r].inflow,o[r].outflow);l=Math.max(l,a)}return l});function ne(o){return o/G.value*100+t.value.style.chart.nodes.minHeight}function ae(o){const n=t.value.style.chart.nodes.minHeight;return(o-n)/100*G.value}function re(o){const n={},l={};function r(u,c){n[u]||(n[u]={height:0,level:null,inflow:0,outflow:0}),n[u].level===null&&(n[u].level=c),l[c]||(l[c]=[]),l[c].includes(u)||l[c].push(u)}o.forEach(([u,c,v],k)=>{const p=n[u]?n[u].level:0,x=p+1;r(u,p),r(c,x),n[u].children||(n[u].children=[]),n[u].children.push({target:c,value:v}),n[u].outflow+=v,n[c].inflow+=v}),Object.keys(n).forEach((u,c)=>{n[u].color=P.value[c]||P.value[c%P.value.length]||s.palette[c]||s.palette[c%d.length]});for(const u in n)n[u].height=ne(Math.max(n[u].inflow,n[u].outflow)),n[u].name=u;const a={};for(const u in l){let c=0;l[u].forEach((v,k)=>{const p=n[v].height;a[v]={x:parseInt(u,10)*Y.value+t.value.style.chart.padding.left,y:c,absoluteY:c,height:p,i:k,color:n[v].color,value:ae(p)},c+=p+q.value})}const i=[];for(const u in n){let c=a[u].absoluteY;n[u].children&&n[u].children.forEach(({target:v,value:k},p)=>{const x=a[v].y,F=a[u],L=a[v],X=s.checkNaN(c),R=s.checkNaN(c+k/n[u].outflow*F.height),Z=s.checkNaN(x),J=s.checkNaN(x+k/n[v].inflow*L.height),fe={id:s.createUid(),source:u,target:v,path:`M ${s.checkNaN(F.x)+s.checkNaN(g.value)} ${X} L ${s.checkNaN(F.x)+s.checkNaN(g.value)} ${R} L ${s.checkNaN(L.x)} ${J} L ${s.checkNaN(L.x)} ${Z} Z`,value:k,sourceColor:n[u].color,targetColor:n[v].color};i.push(fe),c+=R-X,a[v].y+=J-Z})}return{nodeCoordinates:a,links:i}}const h=e.computed(()=>{const o=re(f.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((n,l)=>({...o.nodeCoordinates[n],name:n})),links:o.links}}),se=e.computed(()=>ue(h.value.nodes));function ue(o){const n={};for(const r in o){const{x:a,height:i}=o[r];n[a]||(n[a]=0),n[a]+=i+q.value}return Math.max(...Object.values(n))}const S=e.computed(()=>{const{top:o,right:n,left:l,bottom:r}=t.value.style.chart.padding,a=E.value.length*Y.value;return{height:se.value+o+r,width:n+Math.max(...h.value.nodes.map(i=>i.x))+g.value,left:l,top:o,right:a-n,p_top:o,p_bottom:r}});function ce(o){const n={},l={},r=new Set;return E.value.forEach(([a,i,u])=>{n[a]||(n[a]=[]),l[i]||(l[i]=[]),n[a].push(i),l[i].push(a)}),n[o]&&n[o].forEach(a=>r.add(a)),l[o]&&l[o].forEach(a=>r.add(a)),Array.from(r).concat(o)}const m=e.ref(null),C=e.ref(null);function ie(o){m.value=ce(o.name),C.value=o.name}function de(){m.value=null,C.value=null}const U=e.computed(()=>h.value.links.map(({source:o,target:n,sourceColor:l,targetColor:r,value:a})=>({source:o,target:n,sourceColor:l,targetColor:r,value:a})));function j(){e.nextTick(()=>{const o=U.value.map((r,a)=>[[r.source],[r.target],[r.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const w=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=U.value.map((a,i)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},s.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:o,body:n,config:l}});function ve(){return h.value}function W(){b.value.showTable=!b.value.showTable}const N=e.ref(!1);function T(){N.value=!N.value}return te({getData:ve,generateCsv:j,generateImage:D,generatePdf:M,toggleTable:W,toggleAnnotator:T}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:_,class:e.normalizeClass(`vue-ui-flow ${y.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`flow_${B.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ye.PenAndPaper,{key:0,parent:_.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:N.value,onClose:T},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",we,[(e.openBlock(),e.createBlock(he._sfc_main,{key:`title_${O.value}`,config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(K.UserOptions,{ref:"details",key:`user_option_${I.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(V),isImaging:e.unref(H),uid:B.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:N.value,onToggleFullscreen:le,onGeneratePdf:e.unref(M),onGenerateCsv:j,onGenerateImage:e.unref(D),onToggleTable:W,onToggleAnnotator:T},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${S.value.width} ${S.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ke._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.links,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:l.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.sourceColor},null,8,$e),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,Be)],8,xe))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.links,l=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:l.path,fill:`url(#${l.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${C.value?[l.target,l.source].includes(C.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,_e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:e.unref(s.checkNaN)(l.absoluteY),height:e.unref(s.checkNaN)(l.height),width:g.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>ie(l),onMouseleave:n[0]||(n[0]=a=>de()),style:e.normalizeStyle(`opacity:${m.value?m.value.includes(l.name)?1:.2:1}`)},null,44,Pe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2-t.value.style.chart.nodes.labels.fontSize/4),"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(s.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,Ee))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2+t.value.style.chart.nodes.labels.fontSize),"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,l.value,e.unref(s.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:l.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:l,seriesIndex:r})),13,Se))),256)),e.renderSlot(o.$slots,"svg",{svg:S.value},void 0,!0)],14,Ne)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Te,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(V)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ge.default,{key:4,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createBlock(pe.default,{key:6,hideDetails:"",config:{open:b.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(me.DataTable,{colNames:w.value.colNames,head:w.value.head,body:w.value.body,config:w.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=l=>b.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Le)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ce))}},Ie=be._export_sfc(ze,[["__scopeId","data-v-cbc0789b"]]);exports.default=Ie;
|