vue-data-ui 2.7.2 → 2.7.4
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-Cuf9zUpa.cjs → Arrow-Bslu6In_.cjs} +1 -1
- package/dist/{Arrow-SOQeOwmT.js → Arrow-Kbu7LT-f.js} +1 -1
- package/dist/{BaseIcon-DqYzMisq.js → BaseIcon-BLhJaEYy.js} +4 -3
- package/dist/{BaseIcon-C0unoacb.cjs → BaseIcon-WIhlX3LN.cjs} +1 -1
- package/dist/{ColorPicker-DyOTLjAA.js → ColorPicker-Dlg-p-yo.js} +3 -3
- package/dist/{ColorPicker-DLNc3kpl.cjs → ColorPicker-mXlj2N11.cjs} +1 -1
- package/dist/{DataTable-C_28ZqiP.js → DataTable-DOKlm7k4.js} +2 -2
- package/dist/{DataTable-ByOfBGEi.cjs → DataTable-c3nDhwbO.cjs} +1 -1
- package/dist/{Legend-mrAy7yUC.cjs → Legend-Bhl2d6oj.cjs} +1 -1
- package/dist/{Legend-CmKaL7xe.js → Legend-CIjMjfNk.js} +2 -2
- package/dist/{PackageVersion-39l3KkzC.js → PackageVersion-BCLALL_i.js} +1 -1
- package/dist/{PackageVersion-By81XV8X.cjs → PackageVersion-DFYAej2o.cjs} +1 -1
- package/dist/PenAndPaper-CAqWCUZx.cjs +1 -0
- package/dist/PenAndPaper-CZs431Nx.js +374 -0
- package/dist/{Shape-iIO-95sh.js → Shape-D9MuIPm8.js} +1 -1
- package/dist/{Shape-x7U3IhoM.cjs → Shape-wMij_bxG.cjs} +1 -1
- package/dist/{Slicer-C49MotZz.js → Slicer-CqYLlNlU.js} +2 -2
- package/dist/{Slicer-Ct66sqV1.cjs → Slicer-Duh-nBCD.cjs} +1 -1
- package/dist/{Title-BgVFZwZZ.cjs → Title-C5w8bVlo.cjs} +1 -1
- package/dist/{Title-Co3F59jq.js → Title-UjBqdYyD.js} +1 -1
- package/dist/{Tooltip-Cr89wMKa.js → Tooltip-3NNIdJ6N.js} +1 -1
- package/dist/{Tooltip-B8E9uCVm.cjs → Tooltip-Dbe23pmt.cjs} +1 -1
- package/dist/{dom-to-png-DtBlqZMR.js → dom-to-png-6NoDv4_U.js} +1 -1
- package/dist/{dom-to-png-D9eujpXB.cjs → dom-to-png-C-_IolaZ.cjs} +1 -1
- package/dist/{img-DQDP5JIH.js → img-BxGd_UqS.js} +1 -1
- package/dist/{img-DgRUFehB.cjs → img-DCkGlbCr.cjs} +1 -1
- package/dist/{index-gC66Se26.js → index-D3VntmA9.js} +1 -1
- package/dist/{index-BeJeDy5m.cjs → index-MIJJ8liG.cjs} +1 -1
- package/dist/{pdf-Bu1ahAX2.cjs → pdf-BGp1xMhT.cjs} +1 -1
- package/dist/{pdf-lJiGVhtL.js → pdf-BpVckOt1.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +2 -1
- package/dist/types/vue-data-ui.d.ts +2 -1
- package/dist/{useNestedProp-BusTOV-6.js → useNestedProp-DTlOqz2P.js} +1 -1
- package/dist/{useNestedProp-CF-iHhIC.cjs → useNestedProp-DwR4JSzw.cjs} +1 -1
- package/dist/{usePrinter-KMFl0n0s.js → usePrinter-H3tAjGXs.js} +3 -3
- package/dist/{usePrinter-Bz_kd3vb.cjs → usePrinter-U1x-RAEA.cjs} +1 -1
- package/dist/{vue-data-ui-Bak-lr4I.cjs → vue-data-ui-BuY9ggUz.cjs} +1 -1
- package/dist/{vue-data-ui-BApY_erH.js → vue-data-ui-DFwVHeO8.js} +60 -60
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-DeTBYGV_.cjs +19 -0
- package/dist/{vue-ui-3d-bar-BWjU0K3_.js → vue-ui-3d-bar-NNib9NTc.js} +30 -30
- package/dist/{vue-ui-accordion-j2beIma_.js → vue-ui-accordion-DGJQIcdB.js} +3 -3
- package/dist/{vue-ui-accordion-CZBJSHT_.cjs → vue-ui-accordion-cBSqrYy3.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-Cmw4WVB4.js → vue-ui-age-pyramid-DWG7C-nA.js} +22 -22
- package/dist/vue-ui-age-pyramid-DfGSS3SE.cjs +1 -0
- package/dist/{vue-ui-annotator-BVv5XkoE.cjs → vue-ui-annotator-Bpy0V7AA.cjs} +1 -1
- package/dist/{vue-ui-annotator-CKmqZjUD.js → vue-ui-annotator-D21j4NL0.js} +2 -2
- package/dist/vue-ui-bullet-CrgeKJBE.cjs +34 -0
- package/dist/{vue-ui-bullet-U_yJjO0m.js → vue-ui-bullet-MrNlqcTX.js} +36 -36
- package/dist/vue-ui-candlestick-DfEQ057F.cjs +2 -0
- package/dist/{vue-ui-candlestick-DhdlFIQE.js → vue-ui-candlestick-Dgwjzuq0.js} +11 -11
- package/dist/{vue-ui-carousel-table-BhC5cEe3.cjs → vue-ui-carousel-table-B9AHiJLA.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-Ej7qzKkp.js → vue-ui-carousel-table-TOSDOJ0J.js} +4 -4
- package/dist/{vue-ui-chestnut-BzNHXzDj.cjs → vue-ui-chestnut-BQwGKI2l.cjs} +1 -1
- package/dist/{vue-ui-chestnut-L0bS5jtX.js → vue-ui-chestnut-DAlxKIqD.js} +32 -32
- package/dist/vue-ui-circle-pack-B9HW-E4V.cjs +1 -0
- package/dist/{vue-ui-circle-pack-DwCzeO3L.js → vue-ui-circle-pack-BjD7UG4l.js} +44 -44
- package/dist/{vue-ui-cursor-0mZP5nBc.cjs → vue-ui-cursor-Bv_hn_5f.cjs} +1 -1
- package/dist/{vue-ui-cursor-DwHdXwLS.js → vue-ui-cursor-CS0L4MjH.js} +2 -2
- package/dist/{vue-ui-dashboard-DILmOchy.js → vue-ui-dashboard-Cu4QabFb.js} +3 -3
- package/dist/{vue-ui-dashboard-CegApY8_.cjs → vue-ui-dashboard-DGJjS8TM.cjs} +1 -1
- package/dist/{vue-ui-digits-me8Nky0A.cjs → vue-ui-digits-BusMzORo.cjs} +1 -1
- package/dist/{vue-ui-digits-Dbwzk-sl.js → vue-ui-digits-CrqD5QXP.js} +2 -2
- package/dist/{vue-ui-donut-DwE-iZSV.js → vue-ui-donut-CbDkvk9s.js} +12 -12
- package/dist/{vue-ui-donut-evolution-DhFABvEv.js → vue-ui-donut-evolution-DKD_efmP.js} +69 -69
- package/dist/vue-ui-donut-evolution-Dul--Pi_.cjs +1 -0
- package/dist/vue-ui-donut-vqs5auMD.cjs +1 -0
- package/dist/{vue-ui-dumbbell-Cqq4iV6-.js → vue-ui-dumbbell-BGN-Rshy.js} +52 -52
- package/dist/{vue-ui-dumbbell-CL15d-aQ.cjs → vue-ui-dumbbell-CB6lYwMc.cjs} +1 -1
- package/dist/vue-ui-flow-CDPkL02l.cjs +1 -0
- package/dist/{vue-ui-flow-CU-orj9I.js → vue-ui-flow-g93Xo1mO.js} +75 -75
- package/dist/vue-ui-funnel-D1PhFKgP.cjs +1 -0
- package/dist/{vue-ui-funnel-DQmQmdNV.js → vue-ui-funnel-r_WI2IRS.js} +28 -28
- package/dist/{vue-ui-galaxy-nqyCbQ9j.js → vue-ui-galaxy-B4JnwjLW.js} +39 -39
- package/dist/vue-ui-galaxy-DSXcoM3k.cjs +1 -0
- package/dist/{vue-ui-gauge-BV3CJfqe.js → vue-ui-gauge-BPz7mbOb.js} +26 -26
- package/dist/vue-ui-gauge-Ct1Knstr.cjs +1 -0
- package/dist/{vue-ui-gizmo-CJwSAsxs.js → vue-ui-gizmo-BbUqDkQz.js} +3 -3
- package/dist/{vue-ui-gizmo-CNRAH2zT.cjs → vue-ui-gizmo-tet3qRDX.cjs} +1 -1
- package/dist/{vue-ui-heatmap-B1s7KejC.js → vue-ui-heatmap-BbmFxESu.js} +10 -10
- package/dist/vue-ui-heatmap-RHN_eSK2.cjs +1 -0
- package/dist/vue-ui-history-plot-B8_Kig_-.cjs +1 -0
- package/dist/{vue-ui-history-plot-z_KFt5z_.js → vue-ui-history-plot-CJFtY1Rm.js} +35 -35
- package/dist/{vue-ui-kpi-FaGp6_XP.cjs → vue-ui-kpi-C0IWPkaZ.cjs} +1 -1
- package/dist/{vue-ui-kpi-DabR5K70.js → vue-ui-kpi-CQo8VsEv.js} +3 -3
- package/dist/{vue-ui-mini-loader-w-BmywLJ.js → vue-ui-mini-loader-8wZYNxLC.js} +2 -2
- package/dist/{vue-ui-mini-loader-_plxZxma.cjs → vue-ui-mini-loader-DoOFKxep.cjs} +1 -1
- package/dist/{vue-ui-molecule-aiWG--to.js → vue-ui-molecule-DHb8Roml.js} +45 -45
- package/dist/{vue-ui-molecule-3ClCLk7L.cjs → vue-ui-molecule-HnReqNMq.cjs} +1 -1
- package/dist/vue-ui-mood-radar-BjmCUY0q.cjs +1 -0
- package/dist/{vue-ui-mood-radar-DwxCn06q.js → vue-ui-mood-radar-CdBmESCg.js} +40 -40
- package/dist/{vue-ui-nested-donuts-ONgAaLY-.js → vue-ui-nested-donuts-CO7sSeR-.js} +65 -65
- package/dist/vue-ui-nested-donuts-SBaCzHQP.cjs +17 -0
- package/dist/vue-ui-onion-BehdICTa.cjs +5 -0
- package/dist/{vue-ui-onion-DjoQuBo8.js → vue-ui-onion-Ci15BQ0y.js} +75 -75
- package/dist/{vue-ui-parallel-coordinate-plot-DWGVzaHE.js → vue-ui-parallel-coordinate-plot-BJbrb-Mp.js} +38 -38
- package/dist/vue-ui-parallel-coordinate-plot-BLLONfts.cjs +8 -0
- package/dist/{vue-ui-quadrant-CgiD9c7i.js → vue-ui-quadrant-BZTZY3LG.js} +54 -54
- package/dist/vue-ui-quadrant-ntmlYIVx.cjs +1 -0
- package/dist/{vue-ui-quick-chart-5NiRxtpD.js → vue-ui-quick-chart-B2OUF1Pk.js} +9 -9
- package/dist/vue-ui-quick-chart-BCdm0tx2.cjs +15 -0
- package/dist/vue-ui-radar-CUoLdojY.cjs +1 -0
- package/dist/{vue-ui-radar-CfKAy0nI.js → vue-ui-radar-D8DHrSPP.js} +55 -55
- package/dist/{vue-ui-rating-yiM_5H0W.cjs → vue-ui-rating-BWlmz08s.cjs} +1 -1
- package/dist/{vue-ui-rating-CbZvsZNv.js → vue-ui-rating-D4H6cT0d.js} +2 -2
- package/dist/{vue-ui-relation-circle-RRK2jhHr.js → vue-ui-relation-circle-CWvX8cvJ.js} +7 -7
- package/dist/vue-ui-relation-circle-DighSxmd.cjs +1 -0
- package/dist/vue-ui-rings-CPIzjzdm.cjs +2 -0
- package/dist/{vue-ui-rings-CiMKMEpp.js → vue-ui-rings-Dq5YT7h-.js} +62 -62
- package/dist/{vue-ui-scatter-9PFXuvoo.js → vue-ui-scatter-BMuJyp6q.js} +44 -44
- package/dist/vue-ui-scatter-BSgMQLjw.cjs +1 -0
- package/dist/{vue-ui-skeleton-KW-jcPRN.cjs → vue-ui-skeleton-DOE444ST.cjs} +1 -1
- package/dist/{vue-ui-skeleton-7Zfds6H1.js → vue-ui-skeleton-pHcbvN3-.js} +3 -3
- package/dist/{vue-ui-smiley-D0jhMBUh.js → vue-ui-smiley-BsPExuQ7.js} +2 -2
- package/dist/{vue-ui-smiley-BNQlshyY.cjs → vue-ui-smiley-bHv8hVve.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CLm12POW.cjs → vue-ui-spark-trend-S0FbKqDW.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-D8nDY0fS.js → vue-ui-spark-trend-eJ5IZSRQ.js} +5 -5
- package/dist/{vue-ui-sparkbar-ChEbpWYC.cjs → vue-ui-sparkbar-B1pwFeeg.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-wKlwMCph.js → vue-ui-sparkbar-B9E03kBf.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DG824sGI.cjs → vue-ui-sparkgauge-BpAFpJN9.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-CvhIe_mP.js → vue-ui-sparkgauge-CbtRwF8H.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-B8k8a538.cjs → vue-ui-sparkhistogram-4gAnz36n.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CVmbTFTc.js → vue-ui-sparkhistogram-BJfFPQ-X.js} +5 -5
- package/dist/{vue-ui-sparkline-7wnWuXDQ.cjs → vue-ui-sparkline-CJ8rlJiI.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CtqAbSzZ.js → vue-ui-sparkline-CLz-PMi0.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-DfwEeUC5.js → vue-ui-sparkstackbar-C5ZzOhRM.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-57SONMGP.cjs → vue-ui-sparkstackbar-ja3t34Mt.cjs} +1 -1
- package/dist/{vue-ui-stackbar-CGSVPiPx.js → vue-ui-stackbar-BnuJOk6L.js} +86 -86
- package/dist/vue-ui-stackbar-DSWEq3Pa.cjs +6 -0
- package/dist/{vue-ui-strip-plot-fJFkn8_0.js → vue-ui-strip-plot-Cbr3Dkmd.js} +36 -36
- package/dist/vue-ui-strip-plot-CyiaXAxw.cjs +1 -0
- package/dist/{vue-ui-table-Das3959J.cjs → vue-ui-table-CPJeRMDV.cjs} +1 -1
- package/dist/{vue-ui-table-CliL2Wsp.js → vue-ui-table-Cr6jEi4z.js} +1 -1
- package/dist/{vue-ui-table-heatmap-C28ozf2S.cjs → vue-ui-table-heatmap-BfKruH6W.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-ZsJMMGpG.js → vue-ui-table-heatmap-C0J52xWN.js} +4 -4
- package/dist/{vue-ui-table-sparkline-CrQNShdH.js → vue-ui-table-sparkline-C9PHXjbW.js} +5 -5
- package/dist/{vue-ui-table-sparkline-0i9FAXug.cjs → vue-ui-table-sparkline-CGUs_6Ij.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BaGL6WSb.js → vue-ui-thermometer-Cs8Xt7tQ.js} +50 -50
- package/dist/vue-ui-thermometer-DWC--OtD.cjs +1 -0
- package/dist/{vue-ui-timer-CFtgJ_Vi.cjs → vue-ui-timer-DD0VvMEs.cjs} +1 -1
- package/dist/{vue-ui-timer-Nk94fV-n.js → vue-ui-timer-DDZHmPLV.js} +5 -5
- package/dist/vue-ui-tiremarks-B_koqVkj.cjs +1 -0
- package/dist/{vue-ui-tiremarks-zYgdq_99.js → vue-ui-tiremarks-DHAdNbAA.js} +25 -25
- package/dist/vue-ui-treemap-C_yhbpyF.cjs +1 -0
- package/dist/{vue-ui-treemap-CAxPcxn-.js → vue-ui-treemap-CfH-P5Oh.js} +12 -12
- package/dist/vue-ui-vertical-bar-BRplGFjj.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-Di3FBkwJ.js → vue-ui-vertical-bar-oBdc4YQS.js} +80 -80
- package/dist/vue-ui-waffle-Bg5T7RVn.cjs +1 -0
- package/dist/{vue-ui-waffle-DBJAQsEf.js → vue-ui-waffle-DZ2zIujl.js} +45 -45
- package/dist/{vue-ui-wheel-BTZEr2Vs.js → vue-ui-wheel-BerXCO4A.js} +27 -27
- package/dist/vue-ui-wheel-Bj3Z92nh.cjs +1 -0
- package/dist/{vue-ui-word-cloud-BEaRWIu-.cjs → vue-ui-word-cloud-BWQ1ogz9.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DBCVUkLM.js → vue-ui-word-cloud-U5KISxTe.js} +72 -72
- package/dist/{vue-ui-xy-DbN93Pcf.cjs → vue-ui-xy-C078AHoi.cjs} +2 -2
- package/dist/vue-ui-xy-canvas-BpblELcE.js +1672 -0
- package/dist/vue-ui-xy-canvas-C76OoGNJ.cjs +9 -0
- package/dist/{vue-ui-xy-aKaGgYGL.js → vue-ui-xy-y9zEQYMK.js} +16 -16
- package/package.json +1 -1
- package/dist/PenAndPaper-CmcfpltX.js +0 -243
- package/dist/PenAndPaper-DNbX5hR8.cjs +0 -1
- package/dist/vue-ui-3d-bar-CmbTiJVx.cjs +0 -19
- package/dist/vue-ui-age-pyramid-Sv-HbbDJ.cjs +0 -1
- package/dist/vue-ui-bullet-vcmTY4AX.cjs +0 -34
- package/dist/vue-ui-candlestick-DQT-8PRz.cjs +0 -2
- package/dist/vue-ui-circle-pack-CVLJs0XP.cjs +0 -1
- package/dist/vue-ui-donut-FoRYusUX.cjs +0 -1
- package/dist/vue-ui-donut-evolution-BIK2yfIJ.cjs +0 -1
- package/dist/vue-ui-flow-N825fjRf.cjs +0 -1
- package/dist/vue-ui-funnel-B6XMYl89.cjs +0 -1
- package/dist/vue-ui-galaxy-p-sbDnSY.cjs +0 -1
- package/dist/vue-ui-gauge-DsZFk8T_.cjs +0 -1
- package/dist/vue-ui-heatmap-VXgeMOwT.cjs +0 -1
- package/dist/vue-ui-history-plot-JmeGiR--.cjs +0 -1
- package/dist/vue-ui-mood-radar-CO5sPVVG.cjs +0 -1
- package/dist/vue-ui-nested-donuts-D0nALasd.cjs +0 -17
- package/dist/vue-ui-onion-CBqx4q4k.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-uNCmnSvz.cjs +0 -8
- package/dist/vue-ui-quadrant-BOkyMgCm.cjs +0 -1
- package/dist/vue-ui-quick-chart-BRp_bNso.cjs +0 -15
- package/dist/vue-ui-radar-BpicgiWF.cjs +0 -1
- package/dist/vue-ui-relation-circle-Dg6rdyGP.cjs +0 -1
- package/dist/vue-ui-rings-A49lyv-J.cjs +0 -2
- package/dist/vue-ui-scatter-C_jHsy8M.cjs +0 -1
- package/dist/vue-ui-stackbar--0FZ_eBi.cjs +0 -6
- package/dist/vue-ui-strip-plot-C_ggDAQ-.cjs +0 -1
- package/dist/vue-ui-thermometer-h0rymM2v.cjs +0 -1
- package/dist/vue-ui-tiremarks-Cj8-XGcp.cjs +0 -1
- package/dist/vue-ui-treemap-CybL6mVf.cjs +0 -1
- package/dist/vue-ui-vertical-bar-D4IkwvAB.cjs +0 -4
- package/dist/vue-ui-waffle-7otLUrER.cjs +0 -1
- package/dist/vue-ui-wheel-BUJXtmeP.cjs +0 -1
- package/dist/vue-ui-xy-canvas-CF_lqLg-.cjs +0 -9
- package/dist/vue-ui-xy-canvas-CVQ__d4u.js +0 -1500
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BeJeDy5m.cjs"),Q=require("./useResponsive-DQmBAoBf.cjs"),de=require("./Title-BgVFZwZZ.cjs"),ee=require("./usePrinter-Bz_kd3vb.cjs"),ve=require("./DataTable-ByOfBGEi.cjs"),he=require("./vue-ui-skeleton-KW-jcPRN.cjs"),ye=require("./Legend-mrAy7yUC.cjs"),fe=require("./vue-ui-accordion-CZBJSHT_.cjs"),te=require("./useNestedProp-CF-iHhIC.cjs"),me=require("./PackageVersion-By81XV8X.cjs"),be=require("./PenAndPaper-DNbX5hR8.cjs"),pe=require("./useUserOptionState-BgepsfED.cjs"),ge=require("./useChartAccessibility-Cm7nkzTG.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_e=["id"],xe=["xmlns","viewBox"],Ce=["x","y","width","height"],we={key:1},Be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ne={key:2},Ee=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],$e=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Le={key:3},Se=["x","y","font-size","fill","font-weight"],Ve=["x","y","font-size","fill"],ze={key:4},Ae=["x","y","font-size","fill","font-weight"],Pe=["id"],Te=["stop-color"],Xe=["stop-color"],Oe=["stop-color"],De=["id"],Fe=["stop-color"],Me=["stop-color"],Ie=["stop-color"],Ge=["id"],qe=["stop-color"],Re=["stop-color"],He=["id"],Ue=["stop-color"],We=["stop-color"],je={key:0},Ye=["d","fill"],Ze={key:1},Je=["x","y","height","width","fill"],Ke=["cx","cy","r","fill","stroke","stroke-width"],Qe=["cx","cy","r","fill","stroke","stroke-width"],et={key:5},tt=["x","y","fill","font-size"],lt={key:6},at=["x","y","fill","font-size"],ot={key:5,class:"vue-data-ui-watermark"},rt=["xmlns","height","width"],st=["fill"],nt=["innerHTML"],ut={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(le,{expose:ae,emit:ct}){const{vue_ui_dumbbell:oe}=s.useConfig(),v=le,b=e.computed({get(){return!!v.dataset&&v.dataset.length},set(a){return a}}),c=e.ref(s.createUid()),V=e.ref(0),_=e.ref(null),z=e.ref(null),A=e.ref(null),P=e.ref(null),T=e.ref(null),X=e.ref(0),O=e.ref(0),D=e.ref(0),t=e.computed({get:()=>G(),set:a=>a}),{userOptionsVisible:E,setUserOptionsVisibility:F,keepUserOptionState:M}=pe.useUserOptionState({config:t.value}),{svgRef:I}=ge.useChartAccessibility({config:t.value.style.chart.title});function G(){const a=te.useNestedProp({userConfig:v.config,defaultConfig:oe});return a.theme?{...te.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||v.config,defaultConfig:a})}:a}e.watch(()=>v.config,a=>{t.value=G(),E.value=!t.value.userOptions.showOnChartHover,q(),X.value+=1,O.value+=1,D.value+=1,i.value=t.value.style.chart.rowHeight,g.value=t.value.style.chart.width,p.value.showTable=t.value.table.show},{deep:!0}),e.watch(()=>v.dataset,a=>{Y()},{deep:!0});const x=e.ref(null);e.onMounted(()=>{q()});function q(){if(s.objectIsEmpty(v.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):v.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{b.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=Q.throttle(()=>{const{width:n,height:l}=Q.useResponsive({chart:_.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?A.value:null,source:P.value,noTitle:T.value});requestAnimationFrame(()=>{g.value=n,i.value=l/v.dataset.length,d.value=C()})});x.value=new ResizeObserver(a),x.value.observe(_.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const{isPrinting:R,isImaging:H,generatePdf:U,generateImage:W}=ee.usePrinter({elementId:`dumbbell_${c.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell",options:t.value.userOptions.print}),re=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),p=e.ref({showTable:t.value.table.show}),y=e.computed(()=>v.dataset.map((a,n)=>({...a,start:s.checkNaN(a.start),end:s.checkNaN(a.end),id:s.createUid()}))),$=e.computed(()=>({max:Math.max(...y.value.flatMap(a=>[a.start,a.end])),min:Math.min(...y.value.flatMap(a=>[a.start,a.end]))})),u=e.computed(()=>s.calculateNiceScale($.value.min<0?$.value.min:0,$.value.max,t.value.style.chart.grid.scaleSteps)),i=e.ref(t.value.style.chart.rowHeight),g=e.ref(t.value.style.chart.width),r=e.computed(()=>{const a=i.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+g.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*v.dataset.length,o=u.value.ticks.length*(g.value/u.value.ticks.length);return{left:t.value.style.chart.padding.left,right:n-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,bottom:l-t.value.style.chart.padding.bottom,width:g.value,height:a*v.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:o}});function C(){return y.value.map((a,n)=>{const l=r.value.left+(a.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,o=r.value.left+(a.end+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,h=l+(o-l)/2;return{...a,startX:l,endX:o,centerX:h,y:r.value.top+n*i.value+i.value/2,endVal:a.start}})}const d=e.ref([]),j=e.ref(null),se=e.computed(()=>y.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{Y()});function Y(){d.value=C();let a=d.value.map(l=>l.start).reduce((l,o)=>l+o,0);function n(){const l=y.value.map(o=>o.end-o.start);a>=se.value?(cancelAnimationFrame(j.value),d.value=C()):(d.value=d.value.map((o,h)=>{o.endVal+=l[h]*(t.value.animationSpeed/100);const m=r.value.left+(o.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,N=r.value.left+(o.endVal+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,S=m+(N-m)/2;return{...o,startX:m,endX:N,centerX:S,y:r.value.top+h*i.value+i.value/2,endVal:o.endVal}}),a=d.value.map(o=>o.endVal).reduce((o,h)=>o+h,0),j.value=requestAnimationFrame(n))}t.value.useAnimation?n():d.value=C()}const Z=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${c.value})`:t.value.style.chart.plots.startColor},{name:t.value.style.chart.legend.labelEnd,color:t.value.style.chart.plots.gradient.show?`url(#end_grad_${c.value})`:t.value.style.chart.plots.endColor}]),ne=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,paddingTop:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),f=e.computed(()=>{const a=d.value.map(l=>({name:l.name})),n=d.value.map(l=>({start:l.start,end:l.end}));return{head:a,body:n}}),w=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],n=f.value.head.map((h,m)=>{const N=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[m].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),S=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[m].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),ce=s.dataLabel({v:100*(f.value.body[m].end/f.value.body[m].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:h.name},N,S,ce]}),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.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],head:a,body:n,config:l}});function J(){e.nextTick(()=>{const a=f.value.head.map((o,h)=>[[o.name],[f.value.body[h].start],[f.value.body[h].end]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.start],[t.value.table.columnNames.end]]].concat(a),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-dumbbell"})})}const k=e.ref(!1);function ue(a){k.value=a,V.value+=1}function ie(){return d.value}function K(){p.value.showTable=!p.value.showTable}const B=e.ref(!1);function L(){B.value=!B.value}return ae({getData:ie,generatePdf:U,generateCsv:J,generateImage:W,toggleTable:K,toggleAnnotator:L}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:_,class:e.normalizeClass(`vue-ui-dumbbell ${k.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${c.value}`,onMouseenter:n[1]||(n[1]=()=>e.unref(F)(!0)),onMouseleave:n[2]||(n[2]=()=>e.unref(F)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(be.PenAndPaper,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:L},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),re.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:T,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(M)||e.unref(E))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(R),isImaging:e.unref(H),uid:c.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:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(U),onGenerateCsv:J,onGenerateImage:e.unref(W),onToggleTable:K,onToggleAnnotator:L,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(E)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:o})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:o})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${r.value.absoluteWidth<=0?10:r.value.absoluteWidth} ${r.value.absoluteHeight<=0?10:r.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(me._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:r.value.left,y:r.value.top,width:r.value.width,height:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Ce)):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left+o*r.value.width/(u.value.ticks.length-1),x2:r.value.left+o*r.value.width/(u.value.ticks.length-1),y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray},null,8,Be))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",Ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left,x2:r.value.right,y1:r.value.top+o*i.value,y2:r.value.top+o*i.value,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,Ee))),256)),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.value.bottom,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,$e)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+(t.value.style.chart.labels.yAxisLabels.showProgression?i.value/3:i.value/2)+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"font-weight":t.value.style.chart.labels.yAxisLabels.bold?"bold":"normal","text-anchor":"end"},e.toDisplayString(l.name),9,Se))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+i.value/1.3+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(s.dataLabel)({v:100*(l.end/l.start-1),s:"%",r:t.value.style.chart.labels.yAxisLabels.rounding})),9,Ve))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left+o*(r.value.width/(u.value.ticks.length-1)),y:r.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"font-weight":t.value.style.chart.labels.xAxisLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,l,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.xAxisLabels.rounding}),{datapoint:l,seriesIndex:o})),9,Ae))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${c.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.startColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,Te),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Oe)],8,Pe),e.createElementVNode("radialGradient",{id:`end_grad_${c.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.endColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,Fe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Me),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Ie)],8,De)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${c.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Re)],8,Ge),e.createElementVNode("linearGradient",{id:`grad_negative_${c.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,Ue),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,We)],8,He)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",je,[e.createElementVNode("path",{d:`M
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-MIJJ8liG.cjs"),Q=require("./useResponsive-DQmBAoBf.cjs"),de=require("./Title-C5w8bVlo.cjs"),ee=require("./usePrinter-U1x-RAEA.cjs"),ve=require("./DataTable-c3nDhwbO.cjs"),he=require("./vue-ui-skeleton-DOE444ST.cjs"),ye=require("./Legend-Bhl2d6oj.cjs"),fe=require("./vue-ui-accordion-cBSqrYy3.cjs"),te=require("./useNestedProp-DwR4JSzw.cjs"),me=require("./PackageVersion-DFYAej2o.cjs"),be=require("./PenAndPaper-CAqWCUZx.cjs"),pe=require("./useUserOptionState-BgepsfED.cjs"),ge=require("./useChartAccessibility-Cm7nkzTG.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_e=["id"],xe=["xmlns","viewBox"],Ce=["x","y","width","height"],we={key:1},Be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ne={key:2},Ee=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],$e=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Le={key:3},Se=["x","y","font-size","fill","font-weight"],Ve=["x","y","font-size","fill"],ze={key:4},Ae=["x","y","font-size","fill","font-weight"],Pe=["id"],Te=["stop-color"],Xe=["stop-color"],Oe=["stop-color"],De=["id"],Fe=["stop-color"],Me=["stop-color"],Ie=["stop-color"],Ge=["id"],qe=["stop-color"],Re=["stop-color"],He=["id"],Ue=["stop-color"],We=["stop-color"],je={key:0},Ye=["d","fill"],Ze={key:1},Je=["x","y","height","width","fill"],Ke=["cx","cy","r","fill","stroke","stroke-width"],Qe=["cx","cy","r","fill","stroke","stroke-width"],et={key:5},tt=["x","y","fill","font-size"],lt={key:6},at=["x","y","fill","font-size"],ot={key:5,class:"vue-data-ui-watermark"},rt=["xmlns","height","width"],st=["fill"],nt=["innerHTML"],ut={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(le,{expose:ae,emit:ct}){const{vue_ui_dumbbell:oe}=s.useConfig(),v=le,b=e.computed({get(){return!!v.dataset&&v.dataset.length},set(a){return a}}),c=e.ref(s.createUid()),V=e.ref(0),_=e.ref(null),z=e.ref(null),A=e.ref(null),P=e.ref(null),T=e.ref(null),X=e.ref(0),O=e.ref(0),D=e.ref(0),t=e.computed({get:()=>G(),set:a=>a}),{userOptionsVisible:E,setUserOptionsVisibility:F,keepUserOptionState:M}=pe.useUserOptionState({config:t.value}),{svgRef:I}=ge.useChartAccessibility({config:t.value.style.chart.title});function G(){const a=te.useNestedProp({userConfig:v.config,defaultConfig:oe});return a.theme?{...te.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||v.config,defaultConfig:a})}:a}e.watch(()=>v.config,a=>{t.value=G(),E.value=!t.value.userOptions.showOnChartHover,q(),X.value+=1,O.value+=1,D.value+=1,i.value=t.value.style.chart.rowHeight,g.value=t.value.style.chart.width,p.value.showTable=t.value.table.show},{deep:!0}),e.watch(()=>v.dataset,a=>{Y()},{deep:!0});const x=e.ref(null);e.onMounted(()=>{q()});function q(){if(s.objectIsEmpty(v.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):v.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{b.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=Q.throttle(()=>{const{width:n,height:l}=Q.useResponsive({chart:_.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?A.value:null,source:P.value,noTitle:T.value});requestAnimationFrame(()=>{g.value=n,i.value=l/v.dataset.length,d.value=C()})});x.value=new ResizeObserver(a),x.value.observe(_.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const{isPrinting:R,isImaging:H,generatePdf:U,generateImage:W}=ee.usePrinter({elementId:`dumbbell_${c.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell",options:t.value.userOptions.print}),re=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),p=e.ref({showTable:t.value.table.show}),y=e.computed(()=>v.dataset.map((a,n)=>({...a,start:s.checkNaN(a.start),end:s.checkNaN(a.end),id:s.createUid()}))),$=e.computed(()=>({max:Math.max(...y.value.flatMap(a=>[a.start,a.end])),min:Math.min(...y.value.flatMap(a=>[a.start,a.end]))})),u=e.computed(()=>s.calculateNiceScale($.value.min<0?$.value.min:0,$.value.max,t.value.style.chart.grid.scaleSteps)),i=e.ref(t.value.style.chart.rowHeight),g=e.ref(t.value.style.chart.width),r=e.computed(()=>{const a=i.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+g.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*v.dataset.length,o=u.value.ticks.length*(g.value/u.value.ticks.length);return{left:t.value.style.chart.padding.left,right:n-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,bottom:l-t.value.style.chart.padding.bottom,width:g.value,height:a*v.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:o}});function C(){return y.value.map((a,n)=>{const l=r.value.left+(a.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,o=r.value.left+(a.end+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,h=l+(o-l)/2;return{...a,startX:l,endX:o,centerX:h,y:r.value.top+n*i.value+i.value/2,endVal:a.start}})}const d=e.ref([]),j=e.ref(null),se=e.computed(()=>y.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{Y()});function Y(){d.value=C();let a=d.value.map(l=>l.start).reduce((l,o)=>l+o,0);function n(){const l=y.value.map(o=>o.end-o.start);a>=se.value?(cancelAnimationFrame(j.value),d.value=C()):(d.value=d.value.map((o,h)=>{o.endVal+=l[h]*(t.value.animationSpeed/100);const m=r.value.left+(o.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,N=r.value.left+(o.endVal+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,S=m+(N-m)/2;return{...o,startX:m,endX:N,centerX:S,y:r.value.top+h*i.value+i.value/2,endVal:o.endVal}}),a=d.value.map(o=>o.endVal).reduce((o,h)=>o+h,0),j.value=requestAnimationFrame(n))}t.value.useAnimation?n():d.value=C()}const Z=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${c.value})`:t.value.style.chart.plots.startColor},{name:t.value.style.chart.legend.labelEnd,color:t.value.style.chart.plots.gradient.show?`url(#end_grad_${c.value})`:t.value.style.chart.plots.endColor}]),ne=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,paddingTop:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),f=e.computed(()=>{const a=d.value.map(l=>({name:l.name})),n=d.value.map(l=>({start:l.start,end:l.end}));return{head:a,body:n}}),w=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],n=f.value.head.map((h,m)=>{const N=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[m].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),S=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[m].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),ce=s.dataLabel({v:100*(f.value.body[m].end/f.value.body[m].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:h.name},N,S,ce]}),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.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],head:a,body:n,config:l}});function J(){e.nextTick(()=>{const a=f.value.head.map((o,h)=>[[o.name],[f.value.body[h].start],[f.value.body[h].end]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.start],[t.value.table.columnNames.end]]].concat(a),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-dumbbell"})})}const k=e.ref(!1);function ue(a){k.value=a,V.value+=1}function ie(){return d.value}function K(){p.value.showTable=!p.value.showTable}const B=e.ref(!1);function L(){B.value=!B.value}return ae({getData:ie,generatePdf:U,generateCsv:J,generateImage:W,toggleTable:K,toggleAnnotator:L}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:_,class:e.normalizeClass(`vue-ui-dumbbell ${k.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${c.value}`,onMouseenter:n[1]||(n[1]=()=>e.unref(F)(!0)),onMouseleave:n[2]||(n[2]=()=>e.unref(F)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(be._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:L},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),re.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:T,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(M)||e.unref(E))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(R),isImaging:e.unref(H),uid:c.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:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(U),onGenerateCsv:J,onGenerateImage:e.unref(W),onToggleTable:K,onToggleAnnotator:L,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(E)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:o})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:o})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${r.value.absoluteWidth<=0?10:r.value.absoluteWidth} ${r.value.absoluteHeight<=0?10:r.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(me._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:r.value.left,y:r.value.top,width:r.value.width,height:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Ce)):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left+o*r.value.width/(u.value.ticks.length-1),x2:r.value.left+o*r.value.width/(u.value.ticks.length-1),y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray},null,8,Be))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",Ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left,x2:r.value.right,y1:r.value.top+o*i.value,y2:r.value.top+o*i.value,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,Ee))),256)),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.value.bottom,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,$e)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+(t.value.style.chart.labels.yAxisLabels.showProgression?i.value/3:i.value/2)+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"font-weight":t.value.style.chart.labels.yAxisLabels.bold?"bold":"normal","text-anchor":"end"},e.toDisplayString(l.name),9,Se))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+i.value/1.3+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(s.dataLabel)({v:100*(l.end/l.start-1),s:"%",r:t.value.style.chart.labels.yAxisLabels.rounding})),9,Ve))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left+o*(r.value.width/(u.value.ticks.length-1)),y:r.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"font-weight":t.value.style.chart.labels.xAxisLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,l,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.xAxisLabels.rounding}),{datapoint:l,seriesIndex:o})),9,Ae))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${c.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.startColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,Te),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Oe)],8,Pe),e.createElementVNode("radialGradient",{id:`end_grad_${c.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.endColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,Fe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Me),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Ie)],8,De)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${c.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Re)],8,Ge),e.createElementVNode("linearGradient",{id:`grad_negative_${c.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,Ue),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,We)],8,He)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",je,[e.createElementVNode("path",{d:`M
|
|
2
2
|
${l.startX},${l.y+t.value.style.chart.plots.radius/2}
|
|
3
3
|
C ${l.centerX},${l.y} ${l.centerX},${l.y}
|
|
4
4
|
${l.endX},${l.y+t.value.style.chart.plots.radius/2}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-MIJJ8liG.cjs"),ye=require("./Title-C5w8bVlo.cjs"),oe=require("./usePrinter-U1x-RAEA.cjs"),be=require("./DataTable-c3nDhwbO.cjs"),we=require("./vue-ui-accordion-cBSqrYy3.cjs"),Ce=require("./vue-ui-skeleton-DOE444ST.cjs"),le=require("./useNestedProp-DwR4JSzw.cjs"),Ne=require("./PackageVersion-DFYAej2o.cjs"),xe=require("./PenAndPaper-CAqWCUZx.cjs"),$e=require("./useUserOptionState-BgepsfED.cjs"),Be=require("./useChartAccessibility-Cm7nkzTG.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Ee={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Pe={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},Te=["xmlns","viewBox"],Oe=["width","height"],Fe=["id"],ze=["stop-color"],Ie=["stop-color"],Le=["d","fill","stroke","stroke-width"],Ve=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],Ae=["x","y","font-size","fill"],He=["x","y","font-size","fill"],Me={key:4,class:"vue-data-ui-watermark"},qe={key:6,ref:"source",dir:"auto"},De=["innerHTML"],Ue={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(ne,{expose:ae}){const{vue_ui_flow:re}=s.useConfig(),h=ne,B=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{z()});function z(){s.objectIsEmpty(h.dataset)&&s.error({componentName:"VueUiFlow",type:"dataset"})}const _=e.ref(s.createUid()),I=e.ref(null),L=e.ref(0),V=e.ref(0),y=e.ref(!1);function se(o){y.value=o,L.value+=1}const t=e.computed({get:()=>q(),set:o=>o}),{userOptionsVisible:S,setUserOptionsVisibility:A,keepUserOptionState:H}=$e.useUserOptionState({config:t.value}),{svgRef:M}=Be.useChartAccessibility({config:t.value.style.chart.title});function q(){const o=le.useNestedProp({userConfig:h.config,defaultConfig:re});return o.theme?{...le.useNestedProp({userConfig:s.themes.vue_ui_flow[o.theme]||h.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>h.config,o=>{t.value=q(),S.value=!t.value.userOptions.showOnChartHover,z(),V.value+=1,b.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:D,isImaging:U,generatePdf:Y,generateImage:G}=oe.usePrinter({elementId:`flow_${_.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow",options:t.value.userOptions.print}),ue=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),E=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),R=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}),j=e.computed(()=>t.value.style.chart.links.width),P=e.computed(()=>!h.dataset||!h.dataset.length?[]:h.dataset.map(o=>[o[0],o[1],s.checkNaN(o[2])])),W=e.computed(()=>{const o={};function n(a){o[a]||(o[a]={inflow:0,outflow:0})}P.value.forEach(([a,r,c])=>{n(a),n(r),o[a].outflow+=c,o[r].inflow+=c});let l=0;for(const a in o){const r=Math.max(o[a].inflow,o[a].outflow);l=Math.max(l,r)}return l});function ie(o){return o/W.value*100+t.value.style.chart.nodes.minHeight}function ce(o){const n=t.value.style.chart.nodes.minHeight;return(o-n)/100*W.value}function de(o){const n={},l={};function a(u,i){n[u]||(n[u]={height:0,level:null,inflow:0,outflow:0}),n[u].level===null&&(n[u].level=i),l[i]||(l[i]=[]),l[i].includes(u)||l[i].push(u)}o.forEach(([u,i,v],k)=>{const m=n[u]?n[u].level:0,$=m+1;a(u,m),a(i,$),n[u].children||(n[u].children=[]),n[u].children.push({target:i,value:v}),n[u].outflow+=v,n[i].inflow+=v}),Object.keys(n).forEach((u,i)=>{n[u].color=E.value[i]||E.value[i%E.value.length]||s.palette[i]||s.palette[i%d.length]});for(const u in n)n[u].height=ie(Math.max(n[u].inflow,n[u].outflow)),n[u].name=u;const r={};for(const u in l){let i=0;l[u].forEach((v,k)=>{const m=n[v].height;r[v]={x:parseInt(u,10)*j.value+t.value.style.chart.padding.left,y:i,absoluteY:i,height:m,i:k,color:n[v].color,value:ce(m)},i+=m+R.value})}const c=[];for(const u in n){let i=r[u].absoluteY+t.value.style.chart.padding.top;n[u].children&&n[u].children.forEach(({target:v,value:k},m)=>{const $=r[v].y+t.value.style.chart.padding.top,O=r[u],F=r[v],K=s.checkNaN(i),Q=s.checkNaN(i+k/n[u].outflow*O.height),ee=s.checkNaN($),te=s.checkNaN($+k/n[v].inflow*F.height),ke={id:s.createUid(),source:u,target:v,path:`M ${s.checkNaN(O.x)+s.checkNaN(g.value)} ${K} L ${s.checkNaN(O.x)+s.checkNaN(g.value)} ${Q} L ${s.checkNaN(F.x)} ${te} L ${s.checkNaN(F.x)} ${ee} Z`,value:k,sourceColor:n[u].color,targetColor:n[v].color};c.push(ke),i+=Q-K,r[v].y+=te-ee})}return{nodeCoordinates:r,links:c}}const f=e.computed(()=>{const o=de(h.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((n,l)=>({...o.nodeCoordinates[n],name:n})),links:o.links}}),ve=e.computed(()=>he(f.value.nodes));function he(o){const n={};for(const a in o){const{x:r,height:c}=o[a];n[r]||(n[r]=0),n[r]+=c+R.value}return Math.max(...Object.values(n))}const w=e.computed(()=>{const{top:o,right:n,left:l,bottom:a}=t.value.style.chart.padding,r=P.value.length*j.value;return{height:ve.value+o+a,width:n+Math.max(...f.value.nodes.map(c=>c.x))+g.value,left:l,top:o,right:r-n,p_top:o,p_bottom:a}});function fe(o){const n={},l={},a=new Set;return P.value.forEach(([r,c,u])=>{n[r]||(n[r]=[]),l[c]||(l[c]=[]),n[r].push(c),l[c].push(r)}),n[o]&&n[o].forEach(r=>a.add(r)),l[o]&&l[o].forEach(r=>a.add(r)),Array.from(a).concat(o)}const p=e.ref(null),C=e.ref(null);function pe(o){p.value=fe(o.name),C.value=o.name}function me(){p.value=null,C.value=null}const X=e.computed(()=>f.value.links.map(({source:o,target:n,sourceColor:l,targetColor:a,value:r})=>({source:o,target:n,sourceColor:l,targetColor:a,value:r})));function Z(){e.nextTick(()=>{const o=X.value.map((a,r)=>[[a.source],[a.target],[a.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 N=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=X.value.map((r,c)=>[{color:r.sourceColor,name:r.source},{color:r.targetColor,name:r.target},s.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:r.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 ge(){return f.value}function J(){b.value.showTable=!b.value.showTable}const x=e.ref(!1);function T(){x.value=!x.value}return ae({getData:ge,generateCsv:Z,generateImage:G,generatePdf:Y,toggleTable:J,toggleAnnotator:T}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:I,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;background:${t.value.style.chart.backgroundColor}`),id:`flow_${_.value}`,onMouseenter:n[2]||(n[2]=()=>e.unref(A)(!0)),onMouseleave:n[3]||(n[3]=()=>e.unref(A)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(xe._sfc_main,{key:0,svgRef:e.unref(M),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:x.value,onClose:T},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createElementBlock("div",Ee,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Pe,[(e.openBlock(),e.createBlock(ye._sfc_main,{key:`title_${V.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&&B.value&&(e.unref(H)||e.unref(S))?(e.openBlock(),e.createBlock(oe.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(D),isImaging:e.unref(U),uid:_.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:I.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:x.value,onToggleFullscreen:se,onGeneratePdf:e.unref(Y),onGenerateCsv:Z,onGenerateImage:e.unref(G),onToggleTable:J,onToggleAnnotator:T,style:e.normalizeStyle({visibility:e.unref(H)?e.unref(S)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:a})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:a})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:a})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:a})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:a})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:a})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{ref_key:"svgRef",ref:M,xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${w.value.width} ${w.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(Ne._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:w.value.width,height:w.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Oe)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.links,(l,a)=>(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,ze),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,Ie)],8,Fe))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.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,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,a)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:e.unref(s.checkNaN)(l.absoluteY)+t.value.style.chart.padding.top,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:r=>pe(l),onMouseleave:n[0]||(n[0]=r=>me()),style:e.normalizeStyle(`opacity:${p.value?p.value.includes(l.name)?1:.2:1}`)},null,44,Ve))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,a)=>(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)+t.value.style.chart.padding.top,"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:${p.value?p.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,Ae))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,a)=>(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)+t.value.style.chart.padding.top,"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:${p.value?p.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:a})),13,He))),256)),e.renderSlot(o.$slots,"svg",{svg:w.value},void 0,!0)],14,Te)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(D)||e.unref(U)})),void 0,!0)])):e.createCommentVNode("",!0),B.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.default,{key:5,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",qe,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),B.value?(e.openBlock(),e.createBlock(we.default,{key:7,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(be.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.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,De)]),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)],46,Se))}},Ye=_e._export_sfc(Ue,[["__scopeId","data-v-34c6a87d"]]);exports.default=Ye;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { u as Be, o as je, e as Re, c as ke, t as Xe, p as q, a as We, b as qe, v as f, f as we, X as Ze, G as Ce, L as Je, i as Ke, q as Qe, r as et } from "./index-
|
|
3
|
-
import { _ as tt } from "./Title-
|
|
4
|
-
import { u as ot, U as lt } from "./usePrinter-
|
|
5
|
-
import { D as at } from "./DataTable-
|
|
6
|
-
import nt from "./vue-ui-accordion-
|
|
7
|
-
import st from "./vue-ui-skeleton-
|
|
8
|
-
import { u as $e } from "./useNestedProp-
|
|
9
|
-
import { _ as ut } from "./PackageVersion-
|
|
10
|
-
import {
|
|
1
|
+
import { computed as g, onMounted as Ye, ref as k, watch as De, createElementBlock as c, openBlock as i, unref as u, normalizeStyle as _, normalizeClass as ye, createBlock as P, createCommentVNode as w, createSlots as Ge, withCtx as y, renderSlot as p, normalizeProps as M, guardReactiveProps as z, createVNode as be, createElementVNode as Y, Fragment as F, renderList as L, toDisplayString as W, createTextVNode as Ue, nextTick as Ve } from "vue";
|
|
2
|
+
import { u as Be, o as je, e as Re, c as ke, t as Xe, p as q, a as We, b as qe, v as f, f as we, X as Ze, G as Ce, L as Je, i as Ke, q as Qe, r as et } from "./index-D3VntmA9.js";
|
|
3
|
+
import { _ as tt } from "./Title-UjBqdYyD.js";
|
|
4
|
+
import { u as ot, U as lt } from "./usePrinter-H3tAjGXs.js";
|
|
5
|
+
import { D as at } from "./DataTable-DOKlm7k4.js";
|
|
6
|
+
import nt from "./vue-ui-accordion-DGJQIcdB.js";
|
|
7
|
+
import st from "./vue-ui-skeleton-pHcbvN3-.js";
|
|
8
|
+
import { u as $e } from "./useNestedProp-DTlOqz2P.js";
|
|
9
|
+
import { _ as ut } from "./PackageVersion-BCLALL_i.js";
|
|
10
|
+
import { _ as rt } from "./PenAndPaper-CZs431Nx.js";
|
|
11
11
|
import { u as it } from "./useUserOptionState-BIvW1Kz7.js";
|
|
12
12
|
import { u as ct } from "./useChartAccessibility-BWojgys7.js";
|
|
13
13
|
import { _ as dt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -19,10 +19,10 @@ const vt = ["id"], ft = {
|
|
|
19
19
|
}, ht = {
|
|
20
20
|
key: 2,
|
|
21
21
|
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
22
|
-
},
|
|
22
|
+
}, gt = ["xmlns", "viewBox"], pt = ["width", "height"], mt = ["id"], yt = ["stop-color"], bt = ["stop-color"], kt = ["d", "fill", "stroke", "stroke-width"], wt = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "onMouseenter"], Ct = ["x", "y", "font-size", "fill"], $t = ["x", "y", "font-size", "fill"], _t = {
|
|
23
23
|
key: 4,
|
|
24
24
|
class: "vue-data-ui-watermark"
|
|
25
|
-
},
|
|
25
|
+
}, xt = {
|
|
26
26
|
key: 6,
|
|
27
27
|
ref: "source",
|
|
28
28
|
dir: "auto"
|
|
@@ -42,8 +42,8 @@ const vt = ["id"], ft = {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
|
-
setup(
|
|
46
|
-
const { vue_ui_flow: Ne } = Be(), m =
|
|
45
|
+
setup(_e, { expose: xe }) {
|
|
46
|
+
const { vue_ui_flow: Ne } = Be(), m = _e, D = g(() => !!m.dataset && m.dataset.length);
|
|
47
47
|
Ye(() => {
|
|
48
48
|
Z();
|
|
49
49
|
});
|
|
@@ -57,7 +57,7 @@ const vt = ["id"], ft = {
|
|
|
57
57
|
function Oe(t) {
|
|
58
58
|
O.value = t, K.value += 1;
|
|
59
59
|
}
|
|
60
|
-
const e =
|
|
60
|
+
const e = g({
|
|
61
61
|
get: () => le(),
|
|
62
62
|
set: (t) => t
|
|
63
63
|
}), { userOptionsVisible: U, setUserOptionsVisibility: ee, keepUserOptionState: te } = it({ config: e.value }), { svgRef: oe } = ct({ config: e.value.style.chart.title });
|
|
@@ -81,13 +81,13 @@ const vt = ["id"], ft = {
|
|
|
81
81
|
elementId: `flow_${G.value}`,
|
|
82
82
|
fileName: e.value.style.chart.title.text || "vue-ui-flow",
|
|
83
83
|
options: e.value.userOptions.print
|
|
84
|
-
}), Te =
|
|
84
|
+
}), Te = g(() => e.value.userOptions.show && !e.value.style.chart.title.text), V = g(() => qe(e.value.customPalette)), re = g(() => e.value.style.chart.nodes.gap), x = g(() => e.value.style.chart.nodes.width), T = k({
|
|
85
85
|
showTable: e.value.table.show
|
|
86
|
-
}), ie =
|
|
86
|
+
}), ie = g(() => e.value.style.chart.links.width), B = g(() => !m.dataset || !m.dataset.length ? [] : m.dataset.map((t) => [
|
|
87
87
|
t[0],
|
|
88
88
|
t[1],
|
|
89
89
|
f(t[2])
|
|
90
|
-
])), ce =
|
|
90
|
+
])), ce = g(() => {
|
|
91
91
|
const t = {};
|
|
92
92
|
function l(a) {
|
|
93
93
|
t[a] || (t[a] = { inflow: 0, outflow: 0 });
|
|
@@ -102,10 +102,10 @@ const vt = ["id"], ft = {
|
|
|
102
102
|
}
|
|
103
103
|
return o;
|
|
104
104
|
});
|
|
105
|
-
function
|
|
105
|
+
function Ie(t) {
|
|
106
106
|
return t / ce.value * 100 + e.value.style.chart.nodes.minHeight;
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function Pe(t) {
|
|
109
109
|
const l = e.value.style.chart.nodes.minHeight;
|
|
110
110
|
return (t - l) / 100 * ce.value;
|
|
111
111
|
}
|
|
@@ -121,7 +121,7 @@ const vt = ["id"], ft = {
|
|
|
121
121
|
l[s].color = V.value[r] || V.value[r % V.value.length] || q[r] || q[r % d.length];
|
|
122
122
|
});
|
|
123
123
|
for (const s in l)
|
|
124
|
-
l[s].height =
|
|
124
|
+
l[s].height = Ie(Math.max(l[s].inflow, l[s].outflow)), l[s].name = s;
|
|
125
125
|
const n = {};
|
|
126
126
|
for (const s in o) {
|
|
127
127
|
let r = 0;
|
|
@@ -134,7 +134,7 @@ const vt = ["id"], ft = {
|
|
|
134
134
|
height: $,
|
|
135
135
|
i: N,
|
|
136
136
|
color: l[h].color,
|
|
137
|
-
value:
|
|
137
|
+
value: Pe($)
|
|
138
138
|
}, r += $ + re.value;
|
|
139
139
|
});
|
|
140
140
|
}
|
|
@@ -142,21 +142,21 @@ const vt = ["id"], ft = {
|
|
|
142
142
|
for (const s in l) {
|
|
143
143
|
let r = n[s].absoluteY + e.value.style.chart.padding.top;
|
|
144
144
|
l[s].children && l[s].children.forEach(({ target: h, value: N }, $) => {
|
|
145
|
-
const E = n[h].y + e.value.style.chart.padding.top, R = n[s], X = n[h], he = f(r),
|
|
145
|
+
const E = n[h].y + e.value.style.chart.padding.top, R = n[s], X = n[h], he = f(r), ge = f(r + N / l[s].outflow * R.height), pe = f(E), me = f(E + N / l[h].inflow * X.height), ze = {
|
|
146
146
|
id: ke(),
|
|
147
147
|
source: s,
|
|
148
148
|
target: h,
|
|
149
|
-
path: `M ${f(R.x) + f(
|
|
149
|
+
path: `M ${f(R.x) + f(x.value)} ${he} L ${f(R.x) + f(x.value)} ${ge} L ${f(X.x)} ${me} L ${f(X.x)} ${pe} Z`,
|
|
150
150
|
value: N,
|
|
151
151
|
sourceColor: l[s].color,
|
|
152
152
|
targetColor: l[h].color
|
|
153
153
|
};
|
|
154
|
-
v.push(ze), r +=
|
|
154
|
+
v.push(ze), r += ge - he, n[h].y += me - pe;
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
return { nodeCoordinates: n, links: v };
|
|
158
158
|
}
|
|
159
|
-
const b =
|
|
159
|
+
const b = g(() => {
|
|
160
160
|
const t = Fe(m.dataset);
|
|
161
161
|
return {
|
|
162
162
|
nodes: Object.keys(t.nodeCoordinates).map((l, o) => ({
|
|
@@ -165,8 +165,8 @@ const vt = ["id"], ft = {
|
|
|
165
165
|
})),
|
|
166
166
|
links: t.links
|
|
167
167
|
};
|
|
168
|
-
}),
|
|
169
|
-
function
|
|
168
|
+
}), Le = g(() => Ae(b.value.nodes));
|
|
169
|
+
function Ae(t) {
|
|
170
170
|
const l = {};
|
|
171
171
|
for (const a in t) {
|
|
172
172
|
const { x: n, height: v } = t[a];
|
|
@@ -174,11 +174,11 @@ const vt = ["id"], ft = {
|
|
|
174
174
|
}
|
|
175
175
|
return Math.max(...Object.values(l));
|
|
176
176
|
}
|
|
177
|
-
const
|
|
177
|
+
const I = g(() => {
|
|
178
178
|
const { top: t, right: l, left: o, bottom: a } = e.value.style.chart.padding, n = B.value.length * ie.value;
|
|
179
179
|
return {
|
|
180
|
-
height:
|
|
181
|
-
width: l + Math.max(...b.value.nodes.map((v) => v.x)) +
|
|
180
|
+
height: Le.value + t + a,
|
|
181
|
+
width: l + Math.max(...b.value.nodes.map((v) => v.x)) + x.value,
|
|
182
182
|
left: o,
|
|
183
183
|
top: t,
|
|
184
184
|
right: n - l,
|
|
@@ -192,14 +192,14 @@ const vt = ["id"], ft = {
|
|
|
192
192
|
l[n] || (l[n] = []), o[v] || (o[v] = []), l[n].push(v), o[v].push(n);
|
|
193
193
|
}), l[t] && l[t].forEach((n) => a.add(n)), o[t] && o[t].forEach((n) => a.add(n)), Array.from(a).concat(t);
|
|
194
194
|
}
|
|
195
|
-
const C = k(null),
|
|
195
|
+
const C = k(null), A = k(null);
|
|
196
196
|
function Se(t) {
|
|
197
|
-
C.value = He(t.name),
|
|
197
|
+
C.value = He(t.name), A.value = t.name;
|
|
198
198
|
}
|
|
199
199
|
function Ee() {
|
|
200
|
-
C.value = null,
|
|
200
|
+
C.value = null, A.value = null;
|
|
201
201
|
}
|
|
202
|
-
const de =
|
|
202
|
+
const de = g(() => b.value.links.map(({ source: t, target: l, sourceColor: o, targetColor: a, value: n }) => ({
|
|
203
203
|
source: t,
|
|
204
204
|
target: l,
|
|
205
205
|
sourceColor: o,
|
|
@@ -227,7 +227,7 @@ const vt = ["id"], ft = {
|
|
|
227
227
|
});
|
|
228
228
|
});
|
|
229
229
|
}
|
|
230
|
-
const H =
|
|
230
|
+
const H = g(() => {
|
|
231
231
|
const t = [
|
|
232
232
|
e.value.table.columnNames.source,
|
|
233
233
|
e.value.table.columnNames.target,
|
|
@@ -281,7 +281,7 @@ const vt = ["id"], ft = {
|
|
|
281
281
|
function j() {
|
|
282
282
|
S.value = !S.value;
|
|
283
283
|
}
|
|
284
|
-
return
|
|
284
|
+
return xe({
|
|
285
285
|
getData: Me,
|
|
286
286
|
generateCsv: ve,
|
|
287
287
|
generateImage: ue,
|
|
@@ -292,12 +292,12 @@ const vt = ["id"], ft = {
|
|
|
292
292
|
ref_key: "flowChart",
|
|
293
293
|
ref: J,
|
|
294
294
|
class: ye(`vue-ui-flow ${O.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
295
|
-
style:
|
|
295
|
+
style: _(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
296
296
|
id: `flow_${G.value}`,
|
|
297
297
|
onMouseenter: l[2] || (l[2] = () => u(ee)(!0)),
|
|
298
298
|
onMouseleave: l[3] || (l[3] = () => u(ee)(!1))
|
|
299
299
|
}, [
|
|
300
|
-
e.value.userOptions.buttons.annotator ? (i(),
|
|
300
|
+
e.value.userOptions.buttons.annotator ? (i(), P(rt, {
|
|
301
301
|
key: 0,
|
|
302
302
|
svgRef: u(oe),
|
|
303
303
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
@@ -307,7 +307,7 @@ const vt = ["id"], ft = {
|
|
|
307
307
|
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : w("", !0),
|
|
308
308
|
Te.value ? (i(), c("div", ft, null, 512)) : w("", !0),
|
|
309
309
|
e.value.style.chart.title.text ? (i(), c("div", ht, [
|
|
310
|
-
(i(),
|
|
310
|
+
(i(), P(tt, {
|
|
311
311
|
key: `title_${Q.value}`,
|
|
312
312
|
config: {
|
|
313
313
|
title: {
|
|
@@ -321,7 +321,7 @@ const vt = ["id"], ft = {
|
|
|
321
321
|
}
|
|
322
322
|
}, null, 8, ["config"]))
|
|
323
323
|
])) : w("", !0),
|
|
324
|
-
e.value.userOptions.show && D.value && (u(te) || u(U)) ? (i(),
|
|
324
|
+
e.value.userOptions.show && D.value && (u(te) || u(U)) ? (i(), P(lt, {
|
|
325
325
|
ref: "details",
|
|
326
326
|
key: `user_option_${K.value}`,
|
|
327
327
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
@@ -346,56 +346,56 @@ const vt = ["id"], ft = {
|
|
|
346
346
|
onGenerateImage: u(ue),
|
|
347
347
|
onToggleTable: fe,
|
|
348
348
|
onToggleAnnotator: j,
|
|
349
|
-
style:
|
|
349
|
+
style: _({
|
|
350
350
|
visibility: u(te) ? u(U) ? "visible" : "hidden" : "visible"
|
|
351
351
|
})
|
|
352
352
|
}, Ge({ _: 2 }, [
|
|
353
353
|
t.$slots.menuIcon ? {
|
|
354
354
|
name: "menuIcon",
|
|
355
355
|
fn: y(({ isOpen: o, color: a }) => [
|
|
356
|
-
|
|
356
|
+
p(t.$slots, "menuIcon", M(z({ isOpen: o, color: a })), void 0, !0)
|
|
357
357
|
]),
|
|
358
358
|
key: "0"
|
|
359
359
|
} : void 0,
|
|
360
360
|
t.$slots.optionPdf ? {
|
|
361
361
|
name: "optionPdf",
|
|
362
362
|
fn: y(() => [
|
|
363
|
-
|
|
363
|
+
p(t.$slots, "optionPdf", {}, void 0, !0)
|
|
364
364
|
]),
|
|
365
365
|
key: "1"
|
|
366
366
|
} : void 0,
|
|
367
367
|
t.$slots.optionCsv ? {
|
|
368
368
|
name: "optionCsv",
|
|
369
369
|
fn: y(() => [
|
|
370
|
-
|
|
370
|
+
p(t.$slots, "optionCsv", {}, void 0, !0)
|
|
371
371
|
]),
|
|
372
372
|
key: "2"
|
|
373
373
|
} : void 0,
|
|
374
374
|
t.$slots.optionImg ? {
|
|
375
375
|
name: "optionImg",
|
|
376
376
|
fn: y(() => [
|
|
377
|
-
|
|
377
|
+
p(t.$slots, "optionImg", {}, void 0, !0)
|
|
378
378
|
]),
|
|
379
379
|
key: "3"
|
|
380
380
|
} : void 0,
|
|
381
381
|
t.$slots.optionTable ? {
|
|
382
382
|
name: "optionTable",
|
|
383
383
|
fn: y(() => [
|
|
384
|
-
|
|
384
|
+
p(t.$slots, "optionTable", {}, void 0, !0)
|
|
385
385
|
]),
|
|
386
386
|
key: "4"
|
|
387
387
|
} : void 0,
|
|
388
388
|
t.$slots.optionFullscreen ? {
|
|
389
389
|
name: "optionFullscreen",
|
|
390
390
|
fn: y(({ toggleFullscreen: o, isFullscreen: a }) => [
|
|
391
|
-
|
|
391
|
+
p(t.$slots, "optionFullscreen", M(z({ toggleFullscreen: o, isFullscreen: a })), void 0, !0)
|
|
392
392
|
]),
|
|
393
393
|
key: "5"
|
|
394
394
|
} : void 0,
|
|
395
395
|
t.$slots.optionAnnotator ? {
|
|
396
396
|
name: "optionAnnotator",
|
|
397
397
|
fn: y(({ toggleAnnotator: o, isAnnotator: a }) => [
|
|
398
|
-
|
|
398
|
+
p(t.$slots, "optionAnnotator", M(z({ toggleAnnotator: o, isAnnotator: a })), void 0, !0)
|
|
399
399
|
]),
|
|
400
400
|
key: "6"
|
|
401
401
|
} : void 0
|
|
@@ -404,25 +404,25 @@ const vt = ["id"], ft = {
|
|
|
404
404
|
ref_key: "svgRef",
|
|
405
405
|
ref: oe,
|
|
406
406
|
xmlns: u(Ze),
|
|
407
|
-
viewBox: `0 0 ${
|
|
407
|
+
viewBox: `0 0 ${I.value.width} ${I.value.height}`,
|
|
408
408
|
class: ye({ "vue-data-ui-fullscreen--on": O.value, "vue-data-ui-fulscreen--off": !O.value }),
|
|
409
|
-
style:
|
|
409
|
+
style: _(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
|
|
410
410
|
}, [
|
|
411
411
|
be(ut),
|
|
412
412
|
t.$slots["chart-background"] ? (i(), c("foreignObject", {
|
|
413
413
|
key: 0,
|
|
414
414
|
x: 0,
|
|
415
415
|
y: 0,
|
|
416
|
-
width:
|
|
417
|
-
height:
|
|
416
|
+
width: I.value.width,
|
|
417
|
+
height: I.value.height,
|
|
418
418
|
style: {
|
|
419
419
|
pointerEvents: "none"
|
|
420
420
|
}
|
|
421
421
|
}, [
|
|
422
|
-
|
|
423
|
-
], 8,
|
|
422
|
+
p(t.$slots, "chart-background", {}, void 0, !0)
|
|
423
|
+
], 8, pt)) : w("", !0),
|
|
424
424
|
Y("defs", null, [
|
|
425
|
-
(i(!0), c(F, null,
|
|
425
|
+
(i(!0), c(F, null, L(b.value.links, (o, a) => (i(), c("linearGradient", {
|
|
426
426
|
id: o.id,
|
|
427
427
|
x1: "0%",
|
|
428
428
|
y1: "0%",
|
|
@@ -439,42 +439,42 @@ const vt = ["id"], ft = {
|
|
|
439
439
|
}, null, 8, bt)
|
|
440
440
|
], 8, mt))), 256))
|
|
441
441
|
]),
|
|
442
|
-
(i(!0), c(F, null,
|
|
442
|
+
(i(!0), c(F, null, L(b.value.links, (o) => (i(), c("path", {
|
|
443
443
|
class: "vue-ui-flow-link",
|
|
444
444
|
d: o.path,
|
|
445
445
|
fill: `url(#${o.id})`,
|
|
446
446
|
stroke: e.value.style.chart.links.stroke,
|
|
447
447
|
"stroke-width": e.value.style.chart.links.strokeWidth,
|
|
448
|
-
style:
|
|
448
|
+
style: _(`opacity:${A.value ? [o.target, o.source].includes(A.value) ? 1 : 0.3 : e.value.style.chart.links.opacity}`)
|
|
449
449
|
}, null, 12, kt))), 256)),
|
|
450
|
-
(i(!0), c(F, null,
|
|
450
|
+
(i(!0), c(F, null, L(b.value.nodes, (o, a) => (i(), c("rect", {
|
|
451
451
|
class: "vue-ui-flow-node",
|
|
452
452
|
x: o.x,
|
|
453
453
|
y: u(f)(o.absoluteY) + e.value.style.chart.padding.top,
|
|
454
454
|
height: u(f)(o.height),
|
|
455
|
-
width:
|
|
455
|
+
width: x.value,
|
|
456
456
|
fill: o.color,
|
|
457
457
|
stroke: e.value.style.chart.nodes.stroke,
|
|
458
458
|
"stroke-width": e.value.style.chart.nodes.strokeWidth,
|
|
459
459
|
onMouseenter: (n) => Se(o),
|
|
460
460
|
onMouseleave: l[0] || (l[0] = (n) => Ee()),
|
|
461
|
-
style:
|
|
461
|
+
style: _(`opacity:${C.value ? C.value.includes(o.name) ? 1 : 0.2 : 1}`)
|
|
462
462
|
}, null, 44, wt))), 256)),
|
|
463
|
-
(i(!0), c(F, null,
|
|
464
|
-
x: o.x +
|
|
463
|
+
(i(!0), c(F, null, L(b.value.nodes, (o, a) => (i(), c("text", {
|
|
464
|
+
x: o.x + x.value / 2,
|
|
465
465
|
y: u(f)(o.absoluteY + o.height / 2 - e.value.style.chart.nodes.labels.fontSize / 4) + e.value.style.chart.padding.top,
|
|
466
466
|
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
467
467
|
fill: u(Ce)(o.color),
|
|
468
468
|
"text-anchor": "middle",
|
|
469
|
-
style:
|
|
469
|
+
style: _(`pointer-events: none; opacity:${C.value ? C.value.includes(o.name) ? 1 : 0 : 1}`)
|
|
470
470
|
}, W(e.value.style.chart.nodes.labels.abbreviation.use ? u(Je)({ source: o.name, length: e.value.style.chart.nodes.labels.abbreviation.length }) : o.name), 13, Ct))), 256)),
|
|
471
|
-
(i(!0), c(F, null,
|
|
472
|
-
x: o.x +
|
|
471
|
+
(i(!0), c(F, null, L(b.value.nodes, (o, a) => (i(), c("text", {
|
|
472
|
+
x: o.x + x.value / 2,
|
|
473
473
|
y: u(f)(o.absoluteY + o.height / 2 + e.value.style.chart.nodes.labels.fontSize) + e.value.style.chart.padding.top,
|
|
474
474
|
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
475
475
|
fill: u(Ce)(o.color),
|
|
476
476
|
"text-anchor": "middle",
|
|
477
|
-
style:
|
|
477
|
+
style: _(`pointer-events: none; opacity:${C.value ? C.value.includes(o.name) ? 1 : 0 : 1}`)
|
|
478
478
|
}, W(u(Ke)(
|
|
479
479
|
e.value.style.chart.nodes.labels.formatter,
|
|
480
480
|
o.value,
|
|
@@ -486,12 +486,12 @@ const vt = ["id"], ft = {
|
|
|
486
486
|
}),
|
|
487
487
|
{ datapoint: o, seriesIndex: a }
|
|
488
488
|
)), 13, $t))), 256)),
|
|
489
|
-
|
|
490
|
-
], 14,
|
|
491
|
-
t.$slots.watermark ? (i(), c("div",
|
|
492
|
-
|
|
489
|
+
p(t.$slots, "svg", { svg: I.value }, void 0, !0)
|
|
490
|
+
], 14, gt)),
|
|
491
|
+
t.$slots.watermark ? (i(), c("div", _t, [
|
|
492
|
+
p(t.$slots, "watermark", M(z({ isPrinting: u(ae) || u(ne) })), void 0, !0)
|
|
493
493
|
])) : w("", !0),
|
|
494
|
-
D.value ? w("", !0) : (i(),
|
|
494
|
+
D.value ? w("", !0) : (i(), P(st, {
|
|
495
495
|
key: 5,
|
|
496
496
|
config: {
|
|
497
497
|
type: "flow",
|
|
@@ -500,10 +500,10 @@ const vt = ["id"], ft = {
|
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
502
|
}, null, 8, ["config"])),
|
|
503
|
-
t.$slots.source ? (i(), c("div",
|
|
504
|
-
|
|
503
|
+
t.$slots.source ? (i(), c("div", xt, [
|
|
504
|
+
p(t.$slots, "source", {}, void 0, !0)
|
|
505
505
|
], 512)) : w("", !0),
|
|
506
|
-
D.value ? (i(),
|
|
506
|
+
D.value ? (i(), P(nt, {
|
|
507
507
|
key: 7,
|
|
508
508
|
hideDetails: "",
|
|
509
509
|
config: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-MIJJ8liG.cjs"),J=require("./useNestedProp-DwR4JSzw.cjs"),K=require("./usePrinter-U1x-RAEA.cjs"),ue=require("./Title-C5w8bVlo.cjs"),ie=require("./PenAndPaper-CAqWCUZx.cjs"),ce=require("./DataTable-c3nDhwbO.cjs"),ve=require("./vue-ui-accordion-cBSqrYy3.cjs"),Q=require("./useResponsive-DQmBAoBf.cjs"),de=require("./vue-ui-skeleton-DOE444ST.cjs"),he=require("./useUserOptionState-BgepsfED.cjs"),fe=require("./PackageVersion-DFYAej2o.cjs"),me=require("./useChartAccessibility-Cm7nkzTG.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],ye=["xmlns","viewBox"],ge=["width","height"],ke=["id"],Ce=["stop-color"],we=["stop-color"],xe=["stop-color"],Le=["stroke","stroke-width"],$e=["stroke","stroke-width"],Be=["x","y","font-size","fill","font-weight"],_e=["points","fill"],Se=["stroke","stroke-width","rx"],Ne=["x","y","font-size","fill","font-weight"],ze=["x","y","font-size","fill","font-weight"],Te={key:5,class:"vue-data-ui-watermark"},Ae=["innerHTML"],Pe={__name:"vue-ui-funnel",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Z,{expose:ee}){e.useCssVars(a=>({"58a5200a":ne.value}));const{vue_ui_funnel:te}=r.useConfig(),d=Z,b=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(z);function z(){if(r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiFunnel",type:"dataset"}):d.dataset.forEach((a,o)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(l=>{b.value=!1,r.error({componentName:"VueUiFunnel",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.responsive){const a=Q.throttle(()=>{const{width:o,height:l}=Q.useResponsive({chart:L.value,title:t.value.style.chart.title.text?O.value:null,source:V.value,noTitle:E.value});requestAnimationFrame(()=>{u.value.height=l,u.value.width=o,f.value=H(),i.value.circles=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.circles.dataLabels.fontSize,threshold:10,fallback:10}),i.value.names=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.name.fontSize,threshold:10,fallback:10}),i.value.values=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.value.fontSize,threshold:10,fallback:10})})});D.value=new ResizeObserver(a),D.value.observe(L.value.parentNode)}}const L=e.ref(null),g=e.ref(r.createUid()),T=e.ref(0),A=e.ref(0),P=e.ref(0),E=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),m=e.ref(!1);function F(){const a=J.useNestedProp({userConfig:d.config,defaultConfig:te});return a.theme?{...J.useNestedProp({userConfig:r.themes.vue_ui_funnel[a.theme]||d.config,defaultConfig:a})}:a}const t=e.computed({get:()=>F(),set:a=>a}),{userOptionsVisible:_,setUserOptionsVisibility:I,keepUserOptionState:R}=he.useUserOptionState({config:t.value}),{svgRef:q}=me.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>d.config,a=>{t.value=F(),_.value=!t.value.userOptions.showOnChartHover,z(),A.value+=1,P.value+=1,i.value.circles=t.value.style.chart.circles.dataLabels.fontSize,i.value.names=t.value.style.chart.bars.dataLabels.name.fontSize,i.value.values=t.value.style.chart.bars.dataLabels.value.fontSize,k.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:M,isImaging:U,generatePdf:j,generateImage:G}=K.usePrinter({elementId:`funnel_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-funnel",options:t.value.userOptions.print}),ae=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),k=e.ref({showTable:t.value.table.show}),i=e.ref({circles:t.value.style.chart.circles.dataLabels.fontSize,names:t.value.style.chart.bars.dataLabels.name.fontSize,values:t.value.style.chart.bars.dataLabels.value.fontSize}),u=e.computed({get:()=>({height:t.value.style.chart.height,width:t.value.style.chart.width}),set:a=>a}),h=e.computed(()=>b.value?d.dataset.map((a,o)=>({...a,color:a.color?r.convertColorToHex(a.color):r.lightenHexColor(t.value.style.chart.bars.defaultColor,o/d.dataset.length)})):[]);setTimeout(()=>{m.value=!0},h.value.length*150);function H(){const a=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:a,top:o,right:u.value.width-t.value.style.chart.padding.right,bottom:u.value.height-t.value.style.chart.padding.bottom,width:u.value.width-a-t.value.style.chart.padding.right,height:u.value.height-o-t.value.style.chart.padding.bottom}}const f=e.ref(H()),y=e.computed(()=>f.value.height/d.dataset.length),p=e.computed(()=>y.value*t.value.style.chart.bars.gapRatio),X=e.computed(()=>f.value.width*t.value.style.chart.barCircleSpacingRatio),s=e.computed(()=>h.value.map((a,o)=>{const l=y.value-p.value,n=f.value.top+p.value/2*o+(y.value-p.value/2)*o+p.value/2,v=a.value/h.value[0].value,c=(f.value.width-l-X.value)*(a.value/h.value[0].value);return{...a,cx:f.value.left+l/2,cy:n+l/2,datapointIndex:o,fill:a.color,height:Math.max(l,0),proportion:v,r:Math.max(l/2,0),width:Math.max(c,0),x:f.value.left+l+X.value,y:n}})),le=e.computed(()=>{const a=s.value.map(o=>`${o.x+o.width},${o.y+(y.value-p.value)/2}`);return`${s.value[0].x},${s.value[0].y+(y.value-p.value)/2} ${a.toString()} ${s.value.at(-1).x},${s.value.at(-1).y+(y.value-p.value)/2}`}),oe=e.computed(()=>({x1:s.value[0].cx,y1:s.value[0].cy,x2:s.value.at(-1).cx,y2:s.value.at(-1).cy})),C=e.ref(!1);function re(a){C.value=a,T.value+=1}const ne=e.computed(()=>`${h.value.length*150}ms`),$=e.ref(!1);function S(){$.value=!$.value}function Y(){k.value.showTable=!k.value.showTable}const w=e.computed(()=>{const a=h.value.map(l=>({name:l.name,color:l.color})),o=h.value.map(l=>l.value);return{head:a,body:o}}),B=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],o=w.value.head.map((v,c)=>{const x=r.applyDataLabel(t.value.style.chart.bars.dataLabels.value.formatter,w.value.body[c],r.dataLabel({p:t.value.style.chart.bars.dataLabels.value.prefix,v:w.value.body[c],s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.table.td.roundingValue}),{datapoint:s.value[c]}),N=r.applyDataLabel(t.value.style.chart.circles.dataLabels.formatter,s.value[c].proportion*100,r.dataLabel({v:s.value[c].proportion*100,s:"%",r:t.value.table.td.roundingPercentage}),{datapoint:s.value[c]});return[{color:v.color,name:v.name},x,N]}),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.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:a,body:o,config:l}});function W(){e.nextTick(()=>{const a=w.value.head.map((n,v)=>[[n.name],[w.value.body[v]],[s.value[v].proportion*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value],["%"]]].concat(a),l=r.createCsvContent(o);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-funnel"})})}function se(){return h.value}return ee({getData:se,generatePdf:j,generateCsv:W,generateImage:G,toggleTable:Y,toggleAnnotator:S}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"funnelChart",ref:L,class:e.normalizeClass(`vue-ui-funnel ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height:100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`funnel_${g.value}`,onMouseenter:o[1]||(o[1]=()=>e.unref(I)(!0)),onMouseleave:o[2]||(o[2]=()=>e.unref(I)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ie._sfc_main,{key:0,svgRef:e.unref(q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:S},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ae.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:E,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:O,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ue._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"funnel-div-title",...t.value.style.chart.title},subtitle:{cy:"funnel-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(R)||e.unref(_))?(e.openBlock(),e.createBlock(K.UserOptions,{ref:"details",key:`user_option_${T.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(M),isImaging:e.unref(U),uid:g.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:C.value,chartElement:L.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleAnnotator:S,onToggleFullscreen:re,onGeneratePdf:e.unref(j),onGenerateImage:e.unref(G),onToggleTable:Y,onGenerateCsv:W,style:e.normalizeStyle({visibility:e.unref(R)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:q,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(fe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,ge)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`funnel_area_${g.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.backgroundColor,"stop-opacity":0},null,8,Ce),e.createElementVNode("stop",{offset:"20%","stop-color":t.value.style.chart.area.color},null,8,we),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.area.color},null,8,xe)],8,ke)]),t.value.style.chart.circleLinks.show?(e.openBlock(),e.createElementBlock("line",e.mergeProps({key:1},oe.value,{stroke:t.value.style.chart.circleLinks.color,"stroke-width":12*t.value.style.chart.circleLinks.widthRatio,"stroke-linecap":"round",class:{animated:t.value.useCssAnimation},style:{strokeDasharray:t.value.useCssAnimation?f.value.height:0,strokeDashoffset:t.value.useCssAnimation?f.value.height:0}}),null,16,Le)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,({cx:l,cy:n,r:v,fill:c},x)=>(e.openBlock(),e.createElementBlock("circle",e.mergeProps({ref_for:!0},{cx:l,cy:n,r:v,fill:c},{stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth,class:{animated:t.value.useCssAnimation&&!m.value},style:{animationDelay:`${150*x}ms`}}),null,16,$e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(l,n)=>(e.openBlock(),e.createElementBlock("text",{x:l.cx,y:l.cy+i.value.circles/3+t.value.style.chart.circles.dataLabels.offsetY,"text-anchor":"middle","font-size":i.value.circles,fill:t.value.style.chart.circles.dataLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(l.color):t.value.style.chart.circles.dataLabels.color,"font-weight":t.value.style.chart.circles.dataLabels.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({animationDelay:`${150*n}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.circles.dataLabels.formatter,l.proportion*100,e.unref(r.dataLabel)({v:l.proportion*100,s:"%",r:t.value.style.chart.circles.dataLabels.rounding}),{datapoint:l})),15,Be))),256)),t.value.style.chart.area.show?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:le.value,fill:`url(#funnel_area_${g.value})`,class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({transition:t.value.useCssAnimation?`all ${150*h.value.length}ms ease-in`:"none"})},null,14,_e)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,({x:l,y:n,height:v,width:c,fill:x},N)=>(e.openBlock(),e.createElementBlock("rect",e.mergeProps({ref_for:!0},{x:l,y:n,height:v,width:c,fill:x},{stroke:t.value.style.chart.bars.stroke,"stroke-width":t.value.style.chart.bars.strokeWidth,rx:t.value.style.chart.bars.borderRadius,class:{animated:t.value.useCssAnimation&&!m.value},style:{animationDelay:`${150*N}ms`}}),null,16,Se))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.name.offsetX+12,y:l.cy-i.value.names/2+t.value.style.chart.bars.dataLabels.name.offsetY,"text-anchor":"start","font-size":i.value.names,fill:t.value.style.chart.bars.dataLabels.name.color,"font-weight":t.value.style.chart.bars.dataLabels.name.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({animationDelay:`${150*n}ms`})},e.toDisplayString(l.name),15,Ne),e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.value.offsetX+12,y:l.cy+i.value.values+t.value.style.chart.bars.dataLabels.value.offsetY,"text-anchor":"start","font-size":i.value.values,fill:t.value.style.chart.bars.dataLabels.value.color,"font-weight":t.value.style.chart.bars.dataLabels.value.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({animationDelay:`${150*n}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.bars.dataLabels.value.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.bars.dataLabels.value.prefix,v:l.value,s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.style.chart.bars.dataLabels.value.rounding}),{datapoint:l})),15,ze)]))),256)),e.renderSlot(a.$slots,"svg",{svg:u.value},void 0,!0)],14,ye)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Te,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(U)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:6,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:V,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(ve.default,{key:8,hideDetails:"",config:{open:k.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.openBlock(),e.createBlock(ce.DataTable,{key:`table_${P.value}`,colNames:B.value.colNames,head:B.value.head,body:B.value.body,config:B.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[0]||(o[0]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ae)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,be))}},Ee=pe._export_sfc(Pe,[["__scopeId","data-v-1f0bddfb"]]);exports.default=Ee;
|