vue-data-ui 2.10.9 → 2.10.11
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-DCEAiiSq.js → Arrow-B0YRTzCj.js} +1 -1
- package/dist/{Arrow-kcA0IBBo.cjs → Arrow-C6ETniRR.cjs} +1 -1
- package/dist/{BaseIcon-CmdFxgkp.cjs → BaseIcon-CObkWSlF.cjs} +1 -1
- package/dist/{BaseIcon-DPO_4Adb.js → BaseIcon-V0HD2AAD.js} +1 -1
- package/dist/{ColorPicker-D0FMoBTo.js → ColorPicker-BMSFl1XZ.js} +3 -3
- package/dist/{ColorPicker-DJn8_rVA.cjs → ColorPicker-Czm9Mx_k.cjs} +1 -1
- package/dist/{DataTable-BaAjwD5U.js → DataTable-CVSajw4G.js} +2 -2
- package/dist/{DataTable-OM4js4qI.cjs → DataTable-DypMcnH2.cjs} +1 -1
- package/dist/{Legend-DqxOfhbM.js → Legend-B61dtd8W.js} +2 -2
- package/dist/{Legend-qwuGpvF8.cjs → Legend-DUZ-tBhF.cjs} +1 -1
- package/dist/PackageVersion-BS7Jybcw.cjs +1 -0
- package/dist/{PackageVersion-gI4tUgWr.js → PackageVersion-DqsC6J9R.js} +1 -1
- package/dist/{PenAndPaper-Di3hcmp3.js → PenAndPaper-Bqjmruhh.js} +3 -3
- package/dist/{PenAndPaper-CtYhqkG5.cjs → PenAndPaper-CU0ABvzv.cjs} +1 -1
- package/dist/{Shape-DJcgH2ks.js → Shape-CWSam3QO.js} +1 -1
- package/dist/{Shape-CHiMFkEQ.cjs → Shape-x9QWqySR.cjs} +1 -1
- package/dist/{Slicer-DWZhB9e4.js → Slicer-BbMNT2AI.js} +2 -2
- package/dist/{Slicer-BrBOWXeJ.cjs → Slicer-VF0Mi4Gp.cjs} +1 -1
- package/dist/{Title-B55VMGbm.js → Title-CxubvuEh.js} +1 -1
- package/dist/{Title-BiyGREAz.cjs → Title-LLvOAGEi.cjs} +1 -1
- package/dist/{Tooltip-C-Kq18lz.cjs → Tooltip-B1xW8AQT.cjs} +1 -1
- package/dist/{Tooltip-CMiCE06y.js → Tooltip-C0W6IWVK.js} +1 -1
- package/dist/{dom-to-png-vuA7iQ84.cjs → dom-to-png-CNF-s1oi.cjs} +1 -1
- package/dist/{dom-to-png-C6TvW1Fi.js → dom-to-png-D2P_vWEM.js} +1 -1
- package/dist/{img-DHHWE-ji.cjs → img-BDamDFQb.cjs} +1 -1
- package/dist/{img-z4AasNO4.js → img-DacIcr83.js} +1 -1
- package/dist/index-B7zOq_yO.cjs +9 -0
- package/dist/{index-bVqxfptX.js → index-CO-5OgQA.js} +2 -2
- package/dist/{pdf-D2qvws06.cjs → pdf-D6wHFpvv.cjs} +1 -1
- package/dist/{pdf-Ch5KSecz.js → pdf-DflC6mtT.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-DU-vsdTb.js → useNestedProp-D8sa_wYF.js} +1 -1
- package/dist/{useNestedProp-BZX7zlGv.cjs → useNestedProp-DUH233CH.cjs} +1 -1
- package/dist/{usePrinter-BbeIGqpA.js → usePrinter-DldU0tBx.js} +3 -3
- package/dist/{usePrinter-n1HzfoSm.cjs → usePrinter-u4erwqXt.cjs} +1 -1
- package/dist/{vue-data-ui-DRqEhGYC.cjs → vue-data-ui-C3o_PUJM.cjs} +1 -1
- package/dist/{vue-data-ui-BI_bQ5jM.js → vue-data-ui-DaG_fJyV.js} +62 -62
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BBKU0pAV.cjs → vue-ui-3d-bar-1L_FJakQ.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-MSs9iIHL.js → vue-ui-3d-bar-CKaPvMis.js} +9 -9
- package/dist/{vue-ui-accordion-CByAeInD.cjs → vue-ui-accordion-DkOSgEPp.cjs} +1 -1
- package/dist/{vue-ui-accordion-DQKCLM2T.js → vue-ui-accordion-RRHvINsj.js} +3 -3
- package/dist/{vue-ui-age-pyramid-D05rUuJG.cjs → vue-ui-age-pyramid-BX5nAmcR.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-pX29qF4-.js → vue-ui-age-pyramid-BsfpBP5o.js} +10 -10
- package/dist/{vue-ui-annotator-CvcBBO7e.cjs → vue-ui-annotator-BCfRHpTL.cjs} +1 -1
- package/dist/{vue-ui-annotator-BuG8aus2.js → vue-ui-annotator-CSSRY4KB.js} +2 -2
- package/dist/{vue-ui-bullet-BdvVX5da.cjs → vue-ui-bullet-BuoFM_Qt.cjs} +1 -1
- package/dist/{vue-ui-bullet-B9Xg6ifm.js → vue-ui-bullet-wcXiBQsu.js} +8 -8
- package/dist/{vue-ui-candlestick-B_iC_QzE.js → vue-ui-candlestick-DLPBk-z0.js} +11 -11
- package/dist/{vue-ui-candlestick-DPEZe5JP.cjs → vue-ui-candlestick-D_UWn-gv.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DGEoBYe-.js → vue-ui-carousel-table-B-FxYow7.js} +4 -4
- package/dist/{vue-ui-carousel-table-DOB6NiBx.cjs → vue-ui-carousel-table-DZWUAetO.cjs} +1 -1
- package/dist/{vue-ui-chestnut-CiWVelvx.js → vue-ui-chestnut-D_GtQRUL.js} +8 -8
- package/dist/{vue-ui-chestnut-DxF_6jB2.cjs → vue-ui-chestnut-Ds2IXobn.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-XEEX0oEn.cjs → vue-ui-circle-pack-DZjwCJfn.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-CJN2ybvx.js → vue-ui-circle-pack-IFKy_EXs.js} +9 -9
- package/dist/{vue-ui-cursor-7loRJMGF.cjs → vue-ui-cursor-CFcWzQ_a.cjs} +1 -1
- package/dist/{vue-ui-cursor-CqAjc9W_.js → vue-ui-cursor-CpXWkh96.js} +2 -2
- package/dist/{vue-ui-dashboard-CQn61jnh.cjs → vue-ui-dashboard-BMVLKe5Z.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CdpzgIs_.js → vue-ui-dashboard-CLULzCgo.js} +62 -62
- package/dist/{vue-ui-digits-7ACjmgPM.js → vue-ui-digits-B3J16TA3.js} +2 -2
- package/dist/{vue-ui-digits-CuxGcV9M.cjs → vue-ui-digits-VMbRXMfP.cjs} +1 -1
- package/dist/{vue-ui-donut-BtvQmKji.cjs → vue-ui-donut-BjGbzLsC.cjs} +1 -1
- package/dist/{vue-ui-donut-m7KcUt0k.js → vue-ui-donut-DUAbkhZV.js} +12 -12
- package/dist/{vue-ui-donut-evolution-fOc16UtY.cjs → vue-ui-donut-evolution-B2MMB7lY.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-BpEJNoJM.js → vue-ui-donut-evolution-BlMjAI3c.js} +11 -11
- package/dist/{vue-ui-dumbbell-Sy7rxejU.js → vue-ui-dumbbell-B_88Pzkq.js} +10 -10
- package/dist/{vue-ui-dumbbell-BTvPq02T.cjs → vue-ui-dumbbell-DgizrVYM.cjs} +1 -1
- package/dist/{vue-ui-flow-CbszU2ms.js → vue-ui-flow-CGYd2Iko.js} +82 -80
- package/dist/vue-ui-flow-v5zjc5i3.cjs +3 -0
- package/dist/{vue-ui-funnel-D87BZsNK.cjs → vue-ui-funnel-AOnxjmTY.cjs} +1 -1
- package/dist/{vue-ui-funnel-D3b6l6X6.js → vue-ui-funnel-D8Ql3Fu9.js} +9 -9
- package/dist/{vue-ui-galaxy-CUuzThWx.js → vue-ui-galaxy-C5XKP863.js} +11 -11
- package/dist/{vue-ui-galaxy-CDGqzTCy.cjs → vue-ui-galaxy-qIl1Sp2I.cjs} +1 -1
- package/dist/{vue-ui-gauge-B6RkYKug.cjs → vue-ui-gauge-BzmlwkZO.cjs} +1 -1
- package/dist/{vue-ui-gauge-24FEcSzr.js → vue-ui-gauge-CnS0ZVac.js} +7 -7
- package/dist/{vue-ui-gizmo-BAsoCXMw.cjs → vue-ui-gizmo-oMF4Uxgv.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DeYTfhQU.js → vue-ui-gizmo-w7f-RuqD.js} +3 -3
- package/dist/{vue-ui-heatmap-QCkbTog8.cjs → vue-ui-heatmap-CjUYm6Y8.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DpmJyXn-.js → vue-ui-heatmap-DdbtuK1j.js} +10 -10
- package/dist/{vue-ui-history-plot-BAW3WchG.cjs → vue-ui-history-plot-CPEbWJv-.cjs} +1 -1
- package/dist/{vue-ui-history-plot-CBeiEcTE.js → vue-ui-history-plot-DJ5eSSra.js} +11 -11
- package/dist/{vue-ui-kpi-Pki59wPC.cjs → vue-ui-kpi-BBpWvss7.cjs} +1 -1
- package/dist/{vue-ui-kpi-3gKMDrTH.js → vue-ui-kpi-T-hxtGRX.js} +3 -3
- package/dist/{vue-ui-mini-loader-Bo-F8i3n.js → vue-ui-mini-loader-BUdcns7l.js} +2 -2
- package/dist/{vue-ui-mini-loader-BdSgh6y-.cjs → vue-ui-mini-loader-CnEXcdzr.cjs} +1 -1
- package/dist/{vue-ui-molecule-DkVkHwM_.js → vue-ui-molecule-9zI34I22.js} +11 -11
- package/dist/{vue-ui-molecule-Bbs_Vy-A.cjs → vue-ui-molecule-CXda1TRy.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-7qs15-ye.js → vue-ui-mood-radar-3FsJtJ1q.js} +11 -11
- package/dist/{vue-ui-mood-radar-DcyKE-45.cjs → vue-ui-mood-radar-DCz7WxHl.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-iifvTxeT.cjs → vue-ui-nested-donuts-CQHTFClA.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-BYwluLLM.js → vue-ui-nested-donuts-D5-RAGOC.js} +11 -11
- package/dist/{vue-ui-onion-DsS8vdCr.cjs → vue-ui-onion-C3tsgeYq.cjs} +1 -1
- package/dist/{vue-ui-onion-B7Asvx4M.js → vue-ui-onion-DyNY3aLe.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-CayH9RQe.js → vue-ui-parallel-coordinate-plot-D3C5xDkx.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-CWyjLwOL.cjs → vue-ui-parallel-coordinate-plot-tnKZr6bC.cjs} +1 -1
- package/dist/{vue-ui-quadrant--6zm3Tkv.cjs → vue-ui-quadrant-CF7YSzrp.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BSjpS3JD.js → vue-ui-quadrant-Oyf18Bj4.js} +12 -12
- package/dist/{vue-ui-quick-chart-DbfWPULd.js → vue-ui-quick-chart-TbLTi-d3.js} +9 -9
- package/dist/{vue-ui-quick-chart-DkUGMBfD.cjs → vue-ui-quick-chart-Y8-adLxE.cjs} +1 -1
- package/dist/{vue-ui-radar-CvK5Nz5U.js → vue-ui-radar-BfHQxjpG.js} +12 -12
- package/dist/{vue-ui-radar-BrA-apr-.cjs → vue-ui-radar-BvNWx4a8.cjs} +1 -1
- package/dist/{vue-ui-rating-C5qFRKy9.js → vue-ui-rating-BDM0NHP6.js} +2 -2
- package/dist/{vue-ui-rating-ctOiwHRD.cjs → vue-ui-rating-DitReQ9n.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-35rE0_C0.cjs → vue-ui-relation-circle-DcZyVpqG.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-ChUKc3S5.js → vue-ui-relation-circle-DpwaksSx.js} +7 -7
- package/dist/{vue-ui-ridgeline-DDrBrbxq.js → vue-ui-ridgeline-BXEg60Vj.js} +12 -12
- package/dist/{vue-ui-ridgeline-C_LoyQPY.cjs → vue-ui-ridgeline-DgzMstgJ.cjs} +1 -1
- package/dist/{vue-ui-rings-DGhi_Jcb.js → vue-ui-rings-Bsvdt8jo.js} +12 -12
- package/dist/{vue-ui-rings-IM473vOr.cjs → vue-ui-rings-DqF707hp.cjs} +1 -1
- package/dist/{vue-ui-scatter-B7h_hWj7.cjs → vue-ui-scatter-D9sIS4Dp.cjs} +1 -1
- package/dist/{vue-ui-scatter-DS9rUuE5.js → vue-ui-scatter-qQ-795VY.js} +12 -12
- package/dist/{vue-ui-skeleton-BARmXI9_.js → vue-ui-skeleton-BeEBd4CC.js} +3 -3
- package/dist/{vue-ui-skeleton-C-I7hIHS.cjs → vue-ui-skeleton-Br6xw2QW.cjs} +1 -1
- package/dist/{vue-ui-smiley-DwI6j0i8.cjs → vue-ui-smiley-B3JFedE5.cjs} +1 -1
- package/dist/{vue-ui-smiley-Ce4Rju1r.js → vue-ui-smiley-Bba04Gln.js} +2 -2
- package/dist/{vue-ui-spark-trend-CE1USqg6.js → vue-ui-spark-trend-DB2vKJ0m.js} +5 -5
- package/dist/{vue-ui-spark-trend-BfcDH-Gp.cjs → vue-ui-spark-trend-DiZvQzSb.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CdDBwkff.cjs → vue-ui-sparkbar-B1pBe2b4.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-B3NBNGl8.js → vue-ui-sparkbar-DjsNBWGs.js} +4 -4
- package/dist/{vue-ui-sparkgauge-Kgl_vvc7.js → vue-ui-sparkgauge-BJ0vTnKL.js} +4 -4
- package/dist/{vue-ui-sparkgauge-CPq_DRcO.cjs → vue-ui-sparkgauge-ByMA0D5w.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DNvaByAm.js → vue-ui-sparkhistogram-Cv-hyUbF.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-B9Mf4nA9.cjs → vue-ui-sparkhistogram-WxGpd0TA.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DPFtUR9k.cjs → vue-ui-sparkline-DPlkEVV6.cjs} +1 -1
- package/dist/{vue-ui-sparkline-6fUsXxoo.js → vue-ui-sparkline-tnMT43CD.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-B_O87Udb.js → vue-ui-sparkstackbar-8WSy0M8S.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-D8gErBiD.cjs → vue-ui-sparkstackbar-BFkweUWm.cjs} +1 -1
- package/dist/{vue-ui-stackbar-a7bzDCRQ.cjs → vue-ui-stackbar-BFgWt2oG.cjs} +1 -1
- package/dist/{vue-ui-stackbar-SQkqb5uZ.js → vue-ui-stackbar-BfkOVox7.js} +13 -13
- package/dist/{vue-ui-strip-plot-BbCMpSG9.cjs → vue-ui-strip-plot-BKsixkUU.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-Czg_UcLg.js → vue-ui-strip-plot-CN06Oh8m.js} +11 -11
- package/dist/{vue-ui-table-B0ANgSAH.js → vue-ui-table-B-sy0kOZ.js} +3 -3
- package/dist/{vue-ui-table-heatmap-B46ApT8a.cjs → vue-ui-table-heatmap-BidbeObz.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap---afBYht.js → vue-ui-table-heatmap-Dur8rhk6.js} +4 -4
- package/dist/{vue-ui-table-DTys0wh5.cjs → vue-ui-table-o_zUZsUz.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-CSi_2E82.cjs → vue-ui-table-sparkline-BeWSYBle.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-cuO4BEcb.js → vue-ui-table-sparkline-Ccw_ekS8.js} +5 -5
- package/dist/{vue-ui-thermometer-Cu3N2aZN.js → vue-ui-thermometer-BOw4FvGD.js} +7 -7
- package/dist/{vue-ui-thermometer-Bco6ThIk.cjs → vue-ui-thermometer-Ds9lWEE_.cjs} +1 -1
- package/dist/{vue-ui-timer-DnQAvYVy.js → vue-ui-timer-B2gMYwCj.js} +5 -5
- package/dist/{vue-ui-timer-GkxVjTEC.cjs → vue-ui-timer-OAHpNcTb.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CNW6BXVF.cjs → vue-ui-tiremarks-B8dltsA4.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-PX1AQ6u9.js → vue-ui-tiremarks-BlfDeAAZ.js} +7 -7
- package/dist/{vue-ui-treemap-dm6Ion7A.cjs → vue-ui-treemap-BjWTRcbW.cjs} +1 -1
- package/dist/{vue-ui-treemap-Drg5MEcW.js → vue-ui-treemap-meoOt_AQ.js} +12 -12
- package/dist/{vue-ui-vertical-bar-BtkKFF7C.js → vue-ui-vertical-bar-8EaYa2I2.js} +12 -12
- package/dist/{vue-ui-vertical-bar-eA-iYb9s.cjs → vue-ui-vertical-bar-kRBUbvs6.cjs} +1 -1
- package/dist/{vue-ui-waffle-BAFVYzdi.js → vue-ui-waffle-ThNptuVQ.js} +12 -12
- package/dist/{vue-ui-waffle-Bn77Yd88.cjs → vue-ui-waffle-XM92kEwZ.cjs} +1 -1
- package/dist/{vue-ui-wheel-fMANwaEy.js → vue-ui-wheel-B_DSO7Ko.js} +7 -7
- package/dist/{vue-ui-wheel-D4VdCS3n.cjs → vue-ui-wheel-DMiRno4r.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-bX4J2Y8V.cjs → vue-ui-word-cloud-8-CU7ACz.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-Du0UUBsh.js → vue-ui-word-cloud-tsIW_o0M.js} +10 -10
- package/dist/{vue-ui-world-BHNBu5o5.cjs → vue-ui-world-C-TO7n_r.cjs} +1 -1
- package/dist/{vue-ui-world-B-Guo08O.js → vue-ui-world-DizUMTdP.js} +11 -11
- package/dist/{vue-ui-xy-BkQt8l_A.cjs → vue-ui-xy-CHcCU9pB.cjs} +2 -2
- package/dist/{vue-ui-xy-BN9Lh6Ic.js → vue-ui-xy-CKNq6i3B.js} +16 -16
- package/dist/{vue-ui-xy-canvas-cfQsHd-5.cjs → vue-ui-xy-canvas-Cmax9zNa.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-D9avmh08.js → vue-ui-xy-canvas-DgLV6VWJ.js} +12 -12
- package/package.json +1 -1
- package/dist/PackageVersion-Di-ZyR0_.cjs +0 -1
- package/dist/index-DlALYfRS.cjs +0 -9
- package/dist/vue-ui-flow-BccWxEzt.cjs +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DlALYfRS.cjs"),Q=require("./useResponsive-DQmBAoBf.cjs"),de=require("./Title-BiyGREAz.cjs"),ee=require("./usePrinter-n1HzfoSm.cjs"),ve=require("./DataTable-OM4js4qI.cjs"),he=require("./vue-ui-skeleton-C-I7hIHS.cjs"),ye=require("./Legend-qwuGpvF8.cjs"),fe=require("./vue-ui-accordion-CByAeInD.cjs"),te=require("./useNestedProp-BZX7zlGv.cjs"),me=require("./PackageVersion-Di-ZyR0_.cjs"),be=require("./PenAndPaper-CtYhqkG5.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
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-B7zOq_yO.cjs"),Q=require("./useResponsive-DQmBAoBf.cjs"),de=require("./Title-LLvOAGEi.cjs"),ee=require("./usePrinter-u4erwqXt.cjs"),ve=require("./DataTable-DypMcnH2.cjs"),he=require("./vue-ui-skeleton-Br6xw2QW.cjs"),ye=require("./Legend-DUZ-tBhF.cjs"),fe=require("./vue-ui-accordion-DkOSgEPp.cjs"),te=require("./useNestedProp-DUH233CH.cjs"),me=require("./PackageVersion-BS7Jybcw.cjs"),be=require("./PenAndPaper-CU0ABvzv.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}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { computed as g, onMounted as et, ref as b, watch as tt, createElementBlock as m, openBlock as c, unref as d, normalizeStyle as P, normalizeClass as
|
|
2
|
-
import { u as nt, o as st, e as rt, c as de, t as ut, p as S, a as it, b as ct, v as $, d as dt, f as j, X as vt, G as
|
|
3
|
-
import { _ as mt } from "./Title-
|
|
4
|
-
import { u as yt, U as bt } from "./usePrinter-
|
|
5
|
-
import { D as kt } from "./DataTable-
|
|
6
|
-
import Ct from "./vue-ui-accordion-
|
|
7
|
-
import wt from "./vue-ui-skeleton-
|
|
8
|
-
import { u as He } from "./useNestedProp-
|
|
9
|
-
import { _ as $t } from "./PackageVersion-
|
|
10
|
-
import { _ as _t } from "./PenAndPaper-
|
|
1
|
+
import { computed as g, onMounted as et, ref as b, watch as tt, createElementBlock as m, openBlock as c, unref as d, normalizeStyle as P, normalizeClass as Ae, createBlock as Y, createCommentVNode as T, createElementVNode as B, createVNode as ce, createSlots as ot, withCtx as w, renderSlot as k, normalizeProps as D, guardReactiveProps as R, Fragment as U, renderList as V, toDisplayString as W, createTextVNode as lt, nextTick as at } from "vue";
|
|
2
|
+
import { u as nt, o as st, e as rt, c as de, t as ut, p as S, a as it, b as ct, v as $, d as dt, f as j, X as vt, G as Me, J as ft, i as ve, q as ht, r as pt, x as gt } from "./index-CO-5OgQA.js";
|
|
3
|
+
import { _ as mt } from "./Title-CxubvuEh.js";
|
|
4
|
+
import { u as yt, U as bt } from "./usePrinter-DldU0tBx.js";
|
|
5
|
+
import { D as kt } from "./DataTable-CVSajw4G.js";
|
|
6
|
+
import Ct from "./vue-ui-accordion-RRHvINsj.js";
|
|
7
|
+
import wt from "./vue-ui-skeleton-BeEBd4CC.js";
|
|
8
|
+
import { u as He } from "./useNestedProp-D8sa_wYF.js";
|
|
9
|
+
import { _ as $t } from "./PackageVersion-DqsC6J9R.js";
|
|
10
|
+
import { _ as _t } from "./PenAndPaper-Bqjmruhh.js";
|
|
11
11
|
import { u as xt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
12
12
|
import { u as Tt } from "./useChartAccessibility-BWojgys7.js";
|
|
13
|
-
import { _ as Nt } from "./Tooltip-
|
|
14
|
-
import { L as Ot } from "./Legend-
|
|
13
|
+
import { _ as Nt } from "./Tooltip-C0W6IWVK.js";
|
|
14
|
+
import { L as Ot } from "./Legend-B61dtd8W.js";
|
|
15
15
|
import { _ as St } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
const Ft = ["id"], Lt = {
|
|
17
17
|
key: 1,
|
|
@@ -21,10 +21,10 @@ const Ft = ["id"], Lt = {
|
|
|
21
21
|
}, Pt = {
|
|
22
22
|
key: 2,
|
|
23
23
|
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
24
|
-
}, It = ["xmlns", "viewBox"],
|
|
24
|
+
}, It = ["xmlns", "viewBox"], Et = ["width", "height"], zt = ["id"], At = ["stop-color"], Mt = ["stop-color"], Ht = ["d", "fill", "stroke", "stroke-width"], Yt = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "onMouseenter"], Bt = ["x", "y", "font-size", "fill"], Dt = ["x", "y", "font-size", "fill"], Rt = {
|
|
25
25
|
key: 4,
|
|
26
26
|
class: "vue-data-ui-watermark"
|
|
27
|
-
},
|
|
27
|
+
}, Gt = ["onClick"], Ut = {
|
|
28
28
|
key: 6,
|
|
29
29
|
ref: "source",
|
|
30
30
|
dir: "auto"
|
|
@@ -44,8 +44,8 @@ const Ft = ["id"], Lt = {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
|
-
setup(Ye, { expose:
|
|
48
|
-
const { vue_ui_flow:
|
|
47
|
+
setup(Ye, { expose: Be }) {
|
|
48
|
+
const { vue_ui_flow: De } = nt(), _ = Ye, Q = g(() => !!_.dataset && _.dataset.length);
|
|
49
49
|
et(() => {
|
|
50
50
|
fe();
|
|
51
51
|
});
|
|
@@ -55,9 +55,9 @@ const Ft = ["id"], Lt = {
|
|
|
55
55
|
type: "dataset"
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
const ee = b(de()), te = b(null), he = b(0), pe = b(0), oe = b(!1), le = b(""),
|
|
59
|
-
function
|
|
60
|
-
|
|
58
|
+
const ee = b(de()), te = b(null), he = b(0), pe = b(0), oe = b(!1), le = b(""), Re = b(null), z = b(!1);
|
|
59
|
+
function Ge(t) {
|
|
60
|
+
z.value = t, he.value += 1;
|
|
61
61
|
}
|
|
62
62
|
const e = g({
|
|
63
63
|
get: () => be(),
|
|
@@ -68,7 +68,7 @@ const Ft = ["id"], Lt = {
|
|
|
68
68
|
function be() {
|
|
69
69
|
const t = He({
|
|
70
70
|
userConfig: _.config,
|
|
71
|
-
defaultConfig:
|
|
71
|
+
defaultConfig: De
|
|
72
72
|
});
|
|
73
73
|
let l = t;
|
|
74
74
|
return t.theme ? l = {
|
|
@@ -90,7 +90,7 @@ const Ft = ["id"], Lt = {
|
|
|
90
90
|
elementId: `flow_${ee.value}`,
|
|
91
91
|
fileName: e.value.style.chart.title.text || "vue-ui-flow",
|
|
92
92
|
options: e.value.userOptions.print
|
|
93
|
-
}), Ue = g(() => e.value.userOptions.show && !e.value.style.chart.title.text), X = g(() => ct(e.value.customPalette)), _e = g(() => e.value.style.chart.nodes.gap),
|
|
93
|
+
}), Ue = g(() => e.value.userOptions.show && !e.value.style.chart.title.text), X = g(() => ct(e.value.customPalette)), _e = g(() => e.value.style.chart.nodes.gap), A = g(() => e.value.style.chart.nodes.width), N = b({
|
|
94
94
|
showTable: e.value.table.show,
|
|
95
95
|
showTooltip: e.value.style.chart.tooltip.show
|
|
96
96
|
}), Ve = g(() => e.value.style.chart.links.width), ne = g(() => !_.dataset || !_.dataset.length ? [] : _.dataset.map((t, l) => [
|
|
@@ -171,30 +171,30 @@ const Ft = ["id"], Lt = {
|
|
|
171
171
|
}, u += p.height + _e.value;
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
|
-
const
|
|
174
|
+
const E = [];
|
|
175
175
|
for (const n of Object.keys(l)) {
|
|
176
176
|
let u = O[n].absoluteY + e.value.style.chart.padding.top;
|
|
177
177
|
const i = l[n], v = O[n];
|
|
178
178
|
i.children && i.children.forEach(({ target: p, value: r }) => {
|
|
179
|
-
const f = O[p], L = l[p], K = $(u),
|
|
179
|
+
const f = O[p], L = l[p], K = $(u), Ee = $(
|
|
180
180
|
u + r / i.outflow * v.height
|
|
181
181
|
), ie = $(
|
|
182
182
|
f.y + e.value.style.chart.padding.top
|
|
183
|
-
),
|
|
183
|
+
), ze = $(
|
|
184
184
|
ie + r / L.inflow * f.height
|
|
185
185
|
);
|
|
186
|
-
|
|
186
|
+
E.push({
|
|
187
187
|
id: de(),
|
|
188
188
|
source: n,
|
|
189
189
|
target: p,
|
|
190
|
-
path: `M ${$(v.x +
|
|
190
|
+
path: `M ${$(v.x + A.value)} ${K} L ${$(v.x + A.value)} ${Ee} L ${$(f.x)} ${ze} L ${$(f.x)} ${ie} Z`,
|
|
191
191
|
value: r,
|
|
192
192
|
sourceColor: i.color,
|
|
193
193
|
targetColor: L.color
|
|
194
|
-
}), u +=
|
|
194
|
+
}), u += Ee - K, O[p].y += ze - ie;
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
|
-
return { nodeCoordinates: O, links:
|
|
197
|
+
return { nodeCoordinates: O, links: E };
|
|
198
198
|
}
|
|
199
199
|
const y = g(() => {
|
|
200
200
|
const t = Xe(_.dataset);
|
|
@@ -215,9 +215,11 @@ const Ft = ["id"], Lt = {
|
|
|
215
215
|
}
|
|
216
216
|
return Math.max(...Object.values(l));
|
|
217
217
|
}
|
|
218
|
-
const
|
|
219
|
-
const {
|
|
220
|
-
|
|
218
|
+
const G = g(() => {
|
|
219
|
+
const { top: t, right: l, bottom: o, left: a } = e.value.style.chart.padding, s = Math.max(...y.value.nodes.map((x) => x.x)), h = a + s + A.value + l, F = Math.max(
|
|
220
|
+
...y.value.nodes.map((x) => x.absoluteY + x.height)
|
|
221
|
+
), H = t + F + o;
|
|
222
|
+
return { width: h, height: H };
|
|
221
223
|
});
|
|
222
224
|
function Je(t) {
|
|
223
225
|
const l = {}, o = {}, a = /* @__PURE__ */ new Set();
|
|
@@ -225,16 +227,16 @@ const Ft = ["id"], Lt = {
|
|
|
225
227
|
l[s] || (l[s] = []), o[h] || (o[h] = []), l[s].push(h), o[h].push(s);
|
|
226
228
|
}), l[t] && l[t].forEach((s) => a.add(s)), o[t] && o[t].forEach((s) => a.add(s)), Array.from(a).concat(t);
|
|
227
229
|
}
|
|
228
|
-
const C = b(null),
|
|
230
|
+
const C = b(null), M = b(null), se = b(null), q = b(!1);
|
|
229
231
|
function Ze(t) {
|
|
230
|
-
I.value = [], C.value = Je(t.name),
|
|
232
|
+
I.value = [], C.value = Je(t.name), M.value = t.name;
|
|
231
233
|
const l = t.name, o = ne.value;
|
|
232
234
|
let a = 0, s = 0, h = [], F = [];
|
|
233
|
-
const H = new Set(o.map(([r]) => r)), x = new Set(o.map(([, r]) => r)), Ie = Array.from(H).filter((r) => !x.has(r)), O = o.filter(([r]) => Ie.includes(r)).reduce((r, [f, L, K]) => r + K, 0),
|
|
235
|
+
const H = new Set(o.map(([r]) => r)), x = new Set(o.map(([, r]) => r)), Ie = Array.from(H).filter((r) => !x.has(r)), O = o.filter(([r]) => Ie.includes(r)).reduce((r, [f, L, K]) => r + K, 0), E = {};
|
|
234
236
|
y.value.nodes.forEach((r) => {
|
|
235
|
-
|
|
237
|
+
E[r.name] = r.color;
|
|
236
238
|
}), o.forEach(([r, f, L]) => {
|
|
237
|
-
f === l && (a += L, h.push({ source: r, value: L, color:
|
|
239
|
+
f === l && (a += L, h.push({ source: r, value: L, color: E[r] })), r === l && (s += L, F.push({ target: f, value: L, color: E[f] }));
|
|
238
240
|
});
|
|
239
241
|
const n = Math.max(a, s), u = O > 0 ? n / O * 100 : 0, i = {
|
|
240
242
|
name: l,
|
|
@@ -243,7 +245,7 @@ const Ft = ["id"], Lt = {
|
|
|
243
245
|
from: h,
|
|
244
246
|
to: F,
|
|
245
247
|
percentOfTotal: u,
|
|
246
|
-
color:
|
|
248
|
+
color: E[l] || "#000000"
|
|
247
249
|
};
|
|
248
250
|
se.value = { datapoint: i }, oe.value = !0;
|
|
249
251
|
let v = "";
|
|
@@ -292,7 +294,7 @@ const Ft = ["id"], Lt = {
|
|
|
292
294
|
}
|
|
293
295
|
}
|
|
294
296
|
function Te() {
|
|
295
|
-
C.value = null,
|
|
297
|
+
C.value = null, M.value = null, oe.value = !1;
|
|
296
298
|
}
|
|
297
299
|
const Ne = g(() => y.value.links.map(
|
|
298
300
|
({ source: t, target: l, sourceColor: o, targetColor: a, value: s }) => ({
|
|
@@ -404,10 +406,10 @@ const Ft = ["id"], Lt = {
|
|
|
404
406
|
if ((a = C.value) != null && a.every(
|
|
405
407
|
(s) => e.value.nodeCategories[s] === o
|
|
406
408
|
)) {
|
|
407
|
-
C.value = null,
|
|
409
|
+
C.value = null, M.value = null, I.value = [];
|
|
408
410
|
return;
|
|
409
411
|
}
|
|
410
|
-
I.value = [l], C.value = y.value.nodes.filter((s) => e.value.nodeCategories[s.name] === o).map((s) => s.name),
|
|
412
|
+
I.value = [l], C.value = y.value.nodes.filter((s) => e.value.nodeCategories[s.name] === o).map((s) => s.name), M.value = null;
|
|
411
413
|
}
|
|
412
414
|
const Qe = g(() => ({
|
|
413
415
|
cy: "flow-legend",
|
|
@@ -417,7 +419,7 @@ const Ft = ["id"], Lt = {
|
|
|
417
419
|
paddingBottom: e.value.style.chart.legend.paddingBottom,
|
|
418
420
|
fontWeight: e.value.style.chart.legend.bold ? "bold" : "normal"
|
|
419
421
|
}));
|
|
420
|
-
return
|
|
422
|
+
return Be({
|
|
421
423
|
getData: Ke,
|
|
422
424
|
generateCsv: Oe,
|
|
423
425
|
generateImage: $e,
|
|
@@ -430,7 +432,7 @@ const Ft = ["id"], Lt = {
|
|
|
430
432
|
}), (t, l) => (c(), m("div", {
|
|
431
433
|
ref_key: "flowChart",
|
|
432
434
|
ref: te,
|
|
433
|
-
class:
|
|
435
|
+
class: Ae(`vue-ui-flow ${z.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
434
436
|
style: P(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
435
437
|
id: `flow_${ee.value}`,
|
|
436
438
|
onMouseenter: l[3] || (l[3] = () => d(ge)(!0)),
|
|
@@ -473,7 +475,7 @@ const Ft = ["id"], Lt = {
|
|
|
473
475
|
hasImg: e.value.userOptions.buttons.img,
|
|
474
476
|
hasTable: e.value.userOptions.buttons.table,
|
|
475
477
|
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
476
|
-
isFullscreen:
|
|
478
|
+
isFullscreen: z.value,
|
|
477
479
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
478
480
|
chartElement: te.value,
|
|
479
481
|
position: e.value.userOptions.position,
|
|
@@ -482,7 +484,7 @@ const Ft = ["id"], Lt = {
|
|
|
482
484
|
hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
|
|
483
485
|
isTooltip: N.value.showTooltip,
|
|
484
486
|
onToggleTooltip: Fe,
|
|
485
|
-
onToggleFullscreen:
|
|
487
|
+
onToggleFullscreen: Ge,
|
|
486
488
|
onGeneratePdf: d(we),
|
|
487
489
|
onGenerateCsv: Oe,
|
|
488
490
|
onGenerateImage: d($e),
|
|
@@ -495,7 +497,7 @@ const Ft = ["id"], Lt = {
|
|
|
495
497
|
t.$slots.menuIcon ? {
|
|
496
498
|
name: "menuIcon",
|
|
497
499
|
fn: w(({ isOpen: o, color: a }) => [
|
|
498
|
-
k(t.$slots, "menuIcon",
|
|
500
|
+
k(t.$slots, "menuIcon", D(R({ isOpen: o, color: a })), void 0, !0)
|
|
499
501
|
]),
|
|
500
502
|
key: "0"
|
|
501
503
|
} : void 0,
|
|
@@ -537,14 +539,14 @@ const Ft = ["id"], Lt = {
|
|
|
537
539
|
t.$slots.optionFullscreen ? {
|
|
538
540
|
name: "optionFullscreen",
|
|
539
541
|
fn: w(({ toggleFullscreen: o, isFullscreen: a }) => [
|
|
540
|
-
k(t.$slots, "optionFullscreen",
|
|
542
|
+
k(t.$slots, "optionFullscreen", D(R({ toggleFullscreen: o, isFullscreen: a })), void 0, !0)
|
|
541
543
|
]),
|
|
542
544
|
key: "6"
|
|
543
545
|
} : void 0,
|
|
544
546
|
t.$slots.optionAnnotator ? {
|
|
545
547
|
name: "optionAnnotator",
|
|
546
548
|
fn: w(({ toggleAnnotator: o, isAnnotator: a }) => [
|
|
547
|
-
k(t.$slots, "optionAnnotator",
|
|
549
|
+
k(t.$slots, "optionAnnotator", D(R({ toggleAnnotator: o, isAnnotator: a })), void 0, !0)
|
|
548
550
|
]),
|
|
549
551
|
key: "7"
|
|
550
552
|
} : void 0
|
|
@@ -553,10 +555,10 @@ const Ft = ["id"], Lt = {
|
|
|
553
555
|
ref_key: "svgRef",
|
|
554
556
|
ref: ye,
|
|
555
557
|
xmlns: d(vt),
|
|
556
|
-
viewBox: `0 0 ${
|
|
557
|
-
class:
|
|
558
|
-
"vue-data-ui-fullscreen--on":
|
|
559
|
-
"vue-data-ui-fulscreen--off": !
|
|
558
|
+
viewBox: `0 0 ${G.value.width} ${G.value.height}`,
|
|
559
|
+
class: Ae({
|
|
560
|
+
"vue-data-ui-fullscreen--on": z.value,
|
|
561
|
+
"vue-data-ui-fulscreen--off": !z.value
|
|
560
562
|
}),
|
|
561
563
|
style: P(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
|
|
562
564
|
}, [
|
|
@@ -565,15 +567,15 @@ const Ft = ["id"], Lt = {
|
|
|
565
567
|
key: 0,
|
|
566
568
|
x: 0,
|
|
567
569
|
y: 0,
|
|
568
|
-
width:
|
|
569
|
-
height:
|
|
570
|
+
width: G.value.width,
|
|
571
|
+
height: G.value.height,
|
|
570
572
|
style: {
|
|
571
573
|
pointerEvents: "none"
|
|
572
574
|
}
|
|
573
575
|
}, [
|
|
574
576
|
k(t.$slots, "chart-background", {}, void 0, !0)
|
|
575
|
-
], 8,
|
|
576
|
-
|
|
577
|
+
], 8, Et)) : T("", !0),
|
|
578
|
+
B("defs", null, [
|
|
577
579
|
(c(!0), m(U, null, V(y.value.links, (o, a) => (c(), m("linearGradient", {
|
|
578
580
|
id: o.id,
|
|
579
581
|
x1: "0%",
|
|
@@ -581,15 +583,15 @@ const Ft = ["id"], Lt = {
|
|
|
581
583
|
x2: "100%",
|
|
582
584
|
y2: "0%"
|
|
583
585
|
}, [
|
|
584
|
-
|
|
586
|
+
B("stop", {
|
|
585
587
|
offset: "0%",
|
|
586
588
|
"stop-color": o.sourceColor
|
|
587
|
-
}, null, 8,
|
|
588
|
-
|
|
589
|
+
}, null, 8, At),
|
|
590
|
+
B("stop", {
|
|
589
591
|
offset: "100%",
|
|
590
592
|
"stop-color": o.targetColor
|
|
591
|
-
}, null, 8,
|
|
592
|
-
], 8,
|
|
593
|
+
}, null, 8, Mt)
|
|
594
|
+
], 8, zt))), 256))
|
|
593
595
|
]),
|
|
594
596
|
(c(!0), m(U, null, V(y.value.links, (o) => (c(), m("path", {
|
|
595
597
|
class: "vue-ui-flow-link",
|
|
@@ -598,7 +600,7 @@ const Ft = ["id"], Lt = {
|
|
|
598
600
|
stroke: e.value.style.chart.links.stroke,
|
|
599
601
|
"stroke-width": e.value.style.chart.links.strokeWidth,
|
|
600
602
|
style: P(`
|
|
601
|
-
opacity:${C.value ? C.value.includes(o.source) && C.value.includes(o.target) ? 1 : 0.3 :
|
|
603
|
+
opacity:${C.value ? C.value.includes(o.source) && C.value.includes(o.target) ? 1 : 0.3 : M.value ? [o.target, o.source].includes(M.value) ? 1 : 0.3 : e.value.style.chart.links.opacity}
|
|
602
604
|
`)
|
|
603
605
|
}, null, 12, Ht))), 256)),
|
|
604
606
|
(c(!0), m(U, null, V(y.value.nodes, (o, a) => (c(), m("rect", {
|
|
@@ -606,7 +608,7 @@ const Ft = ["id"], Lt = {
|
|
|
606
608
|
x: o.x,
|
|
607
609
|
y: d($)(o.absoluteY) + e.value.style.chart.padding.top,
|
|
608
610
|
height: d($)(o.height),
|
|
609
|
-
width:
|
|
611
|
+
width: A.value,
|
|
610
612
|
fill: o.color,
|
|
611
613
|
stroke: e.value.style.chart.nodes.stroke,
|
|
612
614
|
"stroke-width": e.value.style.chart.nodes.strokeWidth,
|
|
@@ -615,25 +617,25 @@ const Ft = ["id"], Lt = {
|
|
|
615
617
|
style: P(`opacity:${C.value ? C.value.includes(o.name) ? 1 : 0.3 : 1}`)
|
|
616
618
|
}, null, 44, Yt))), 256)),
|
|
617
619
|
(c(!0), m(U, null, V(y.value.nodes, (o, a) => (c(), m("text", {
|
|
618
|
-
x: o.x +
|
|
620
|
+
x: o.x + A.value / 2,
|
|
619
621
|
y: d($)(
|
|
620
622
|
o.absoluteY + o.height / 2 - e.value.style.chart.nodes.labels.fontSize / 4
|
|
621
623
|
) + e.value.style.chart.padding.top,
|
|
622
624
|
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
623
|
-
fill: d(
|
|
625
|
+
fill: d(Me)(o.color),
|
|
624
626
|
"text-anchor": "middle",
|
|
625
627
|
style: P(`pointer-events: none; opacity:${C.value ? C.value.includes(o.name) ? 1 : 0 : 1}`)
|
|
626
628
|
}, W(e.value.style.chart.nodes.labels.abbreviation.use ? d(ft)({
|
|
627
629
|
source: o.name,
|
|
628
630
|
length: e.value.style.chart.nodes.labels.abbreviation.length
|
|
629
|
-
}) : o.name), 13,
|
|
631
|
+
}) : o.name), 13, Bt))), 256)),
|
|
630
632
|
(c(!0), m(U, null, V(y.value.nodes, (o, a) => (c(), m("text", {
|
|
631
|
-
x: o.x +
|
|
633
|
+
x: o.x + A.value / 2,
|
|
632
634
|
y: d($)(
|
|
633
635
|
o.absoluteY + o.height / 2 + e.value.style.chart.nodes.labels.fontSize
|
|
634
636
|
) + e.value.style.chart.padding.top,
|
|
635
637
|
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
636
|
-
fill: d(
|
|
638
|
+
fill: d(Me)(o.color),
|
|
637
639
|
"text-anchor": "middle",
|
|
638
640
|
style: P(`pointer-events: none; opacity:${C.value ? C.value.includes(o.name) ? 1 : 0 : 1}`)
|
|
639
641
|
}, W(d(ve)(
|
|
@@ -646,11 +648,11 @@ const Ft = ["id"], Lt = {
|
|
|
646
648
|
r: e.value.style.chart.nodes.labels.rounding
|
|
647
649
|
}),
|
|
648
650
|
{ datapoint: o, seriesIndex: a }
|
|
649
|
-
)), 13,
|
|
650
|
-
k(t.$slots, "svg", { svg:
|
|
651
|
+
)), 13, Dt))), 256)),
|
|
652
|
+
k(t.$slots, "svg", { svg: G.value }, void 0, !0)
|
|
651
653
|
], 14, It)),
|
|
652
|
-
t.$slots.watermark ? (c(), m("div",
|
|
653
|
-
k(t.$slots, "watermark",
|
|
654
|
+
t.$slots.watermark ? (c(), m("div", Rt, [
|
|
655
|
+
k(t.$slots, "watermark", D(R({ isPrinting: d(ke) || d(Ce) })), void 0, !0)
|
|
654
656
|
])) : T("", !0),
|
|
655
657
|
Q.value ? T("", !0) : (c(), Y(wt, {
|
|
656
658
|
key: 5,
|
|
@@ -661,9 +663,9 @@ const Ft = ["id"], Lt = {
|
|
|
661
663
|
}
|
|
662
664
|
}
|
|
663
665
|
}, null, 8, ["config"])),
|
|
664
|
-
|
|
666
|
+
B("div", {
|
|
665
667
|
ref_key: "chartLegend",
|
|
666
|
-
ref:
|
|
668
|
+
ref: Re
|
|
667
669
|
}, [
|
|
668
670
|
e.value.style.chart.legend.show && Pe.value.length ? (c(), Y(Ot, {
|
|
669
671
|
key: 0,
|
|
@@ -672,10 +674,10 @@ const Ft = ["id"], Lt = {
|
|
|
672
674
|
onClickMarker: l[1] || (l[1] = (o) => ue(o))
|
|
673
675
|
}, {
|
|
674
676
|
item: w(({ legend: o, index: a }) => [
|
|
675
|
-
|
|
677
|
+
B("div", {
|
|
676
678
|
onClick: (s) => o.segregate(),
|
|
677
679
|
style: P(`opacity:${I.value.length ? I.value.includes(a) ? 1 : 0.5 : 1}`)
|
|
678
|
-
}, W(o.name) + " (" + W(o.count) + ") ", 13,
|
|
680
|
+
}, W(o.name) + " (" + W(o.count) + ") ", 13, Gt)
|
|
679
681
|
]),
|
|
680
682
|
_: 1
|
|
681
683
|
}, 8, ["legendSet", "config"])) : T("", !0),
|
|
@@ -698,13 +700,13 @@ const Ft = ["id"], Lt = {
|
|
|
698
700
|
parent: te.value,
|
|
699
701
|
content: le.value,
|
|
700
702
|
isCustom: q.value,
|
|
701
|
-
isFullscreen:
|
|
703
|
+
isFullscreen: z.value
|
|
702
704
|
}, {
|
|
703
705
|
"tooltip-before": w(() => [
|
|
704
|
-
k(t.$slots, "tooltip-before",
|
|
706
|
+
k(t.$slots, "tooltip-before", D(R({ ...se.value })), void 0, !0)
|
|
705
707
|
]),
|
|
706
708
|
"tooltip-after": w(() => [
|
|
707
|
-
k(t.$slots, "tooltip-after",
|
|
709
|
+
k(t.$slots, "tooltip-after", D(R({ ...se.value })), void 0, !0)
|
|
708
710
|
]),
|
|
709
711
|
_: 3
|
|
710
712
|
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen"]),
|
|
@@ -734,7 +736,7 @@ const Ft = ["id"], Lt = {
|
|
|
734
736
|
onClose: l[2] || (l[2] = (o) => N.value.showTable = !1)
|
|
735
737
|
}, {
|
|
736
738
|
th: w(({ th: o }) => [
|
|
737
|
-
|
|
739
|
+
B("div", {
|
|
738
740
|
innerHTML: o,
|
|
739
741
|
style: { display: "flex", "align-items": "center" }
|
|
740
742
|
}, null, 8, Vt)
|
|
@@ -749,7 +751,7 @@ const Ft = ["id"], Lt = {
|
|
|
749
751
|
}, 8, ["config"])) : T("", !0)
|
|
750
752
|
], 46, Ft));
|
|
751
753
|
}
|
|
752
|
-
}, uo = /* @__PURE__ */ St(Wt, [["__scopeId", "data-v-
|
|
754
|
+
}, uo = /* @__PURE__ */ St(Wt, [["__scopeId", "data-v-6fcb877a"]]);
|
|
753
755
|
export {
|
|
754
756
|
uo as default
|
|
755
757
|
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-B7zOq_yO.cjs"),Le=require("./Title-LLvOAGEi.cjs"),ge=require("./usePrinter-u4erwqXt.cjs"),ze=require("./DataTable-DypMcnH2.cjs"),Fe=require("./vue-ui-accordion-DkOSgEPp.cjs"),Ve=require("./vue-ui-skeleton-Br6xw2QW.cjs"),me=require("./useNestedProp-DUH233CH.cjs"),Ae=require("./PackageVersion-BS7Jybcw.cjs"),Ie=require("./PenAndPaper-CU0ABvzv.cjs"),Me=require("./useUserOptionState-BgepsfED.cjs"),De=require("./useChartAccessibility-Cm7nkzTG.cjs"),He=require("./Tooltip-B1xW8AQT.cjs"),qe=require("./Legend-DUZ-tBhF.cjs"),Re=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ye=["id"],Ue={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},je={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},Ge=["xmlns","viewBox"],We=["width","height"],Xe=["id"],Ze=["stop-color"],Je=["stop-color"],Ke=["d","fill","stroke","stroke-width"],Qe=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],et=["x","y","font-size","fill"],tt=["x","y","font-size","fill"],ot={key:4,class:"vue-data-ui-watermark"},lt=["onClick"],at={key:6,ref:"source",dir:"auto"},nt=["innerHTML"],rt={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(ye,{expose:be}){const{vue_ui_flow:ke}=n.useConfig(),y=ye,V=e.computed(()=>!!y.dataset&&y.dataset.length);e.onMounted(()=>{G()});function G(){n.objectIsEmpty(y.dataset)&&n.error({componentName:"VueUiFlow",type:"dataset"})}const A=e.ref(n.createUid()),I=e.ref(null),W=e.ref(0),X=e.ref(0),M=e.ref(!1),D=e.ref(""),Ce=e.ref(null),S=e.ref(!1);function we(o){S.value=o,W.value+=1}const t=e.computed({get:()=>Q(),set:o=>o}),{userOptionsVisible:H,setUserOptionsVisibility:Z,keepUserOptionState:J}=Me.useUserOptionState({config:t.value}),{svgRef:K}=De.useChartAccessibility({config:t.value.style.chart.title});function Q(){const o=me.useNestedProp({userConfig:y.config,defaultConfig:ke});let a=o;return o.theme?a={...me.useNestedProp({userConfig:n.themes.vue_ui_flow[o.theme]||y.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:a=o,a.nodeCategories=y.config.nodeCategories||{},a.nodeCategoryColors=y.config.nodeCategoryColors||{},a}e.watch(()=>y.config,o=>{t.value=Q(),H.value=!t.value.userOptions.showOnChartHover,G(),X.value+=1,k.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:ee,isImaging:te,generatePdf:oe,generateImage:le}=ge.usePrinter({elementId:`flow_${A.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow",options:t.value.userOptions.print}),Ne=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),P=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),ae=e.computed(()=>t.value.style.chart.nodes.gap),T=e.computed(()=>t.value.style.chart.nodes.width),k=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),$e=e.computed(()=>t.value.style.chart.links.width),q=e.computed(()=>!y.dataset||!y.dataset.length?[]:y.dataset.map((o,a)=>[o[0],o[1],n.checkNaN(o[2]),o[3]?n.convertColorToHex(o[3]):P.value[a]||P.value[a%P.value.length]||n.palette[a]||n.palette[a%n.palette.length]])),ne=e.computed(()=>{const o={};function a(r){o[r]||(o[r]={inflow:0,outflow:0})}q.value.forEach(([r,u,h])=>{a(r),a(u),o[r].outflow+=h,o[u].inflow+=h});let l=0;for(const r in o){const u=Math.max(o[r].inflow,o[r].outflow);l=Math.max(l,u)}return l});function xe(o){return o/ne.value*100+t.value.style.chart.nodes.minHeight}function Se(o){const a=t.value.style.chart.nodes.minHeight;return(o-a)/100*ne.value}function Te(o){const a={},l={};function r(s,c){a[s]||(a[s]={height:0,level:null,inflow:0,outflow:0,uid:n.createUid()}),a[s].level===null&&(a[s].level=c),l[c]||(l[c]=[]),l[c].includes(s)||l[c].push(s)}o.forEach(([s,c,d])=>{var i;const v=((i=a[s])==null?void 0:i.level)??0,p=v+1;r(s,v),r(c,p),a[s].children||(a[s].children=[]),a[s].children.push({target:c,value:d}),a[s].outflow+=d,a[c].inflow+=d});const u=new Set(o.map(([s])=>s)),h=new Set(o.map(([,s])=>s)),w=Array.from(u).filter(s=>!h.has(s)),_={};w.forEach((s,c)=>{_[s]=P.value[c]||n.palette[c%n.palette.length]});const b={};o.forEach(([s,c,d,v])=>{v&&(b[s]=v,b[c]=v)}),Object.keys(a).forEach((s,c)=>{var p,i;const d=(p=t.value.nodeCategories)==null?void 0:p[s],v=d?(i=t.value.nodeCategoryColors)==null?void 0:i[d]:null;a[s].color=b[s]||v||(w.includes(s)?_[s]:null)||n.palette[c%n.palette.length]});for(const s in a)a[s].height=xe(Math.max(a[s].inflow,a[s].outflow)),a[s].name=s;const C={};for(const s in l){let c=0;l[s].forEach((d,v)=>{const p=a[d];C[d]={x:parseInt(s,10)*$e.value+t.value.style.chart.padding.left,y:c,absoluteY:c,height:p.height,i:v,color:p.color,value:Se(p.height)},c+=p.height+ae.value})}const x=[];for(const s of Object.keys(a)){let c=C[s].absoluteY+t.value.style.chart.padding.top;const d=a[s],v=C[s];d.children&&d.children.forEach(({target:p,value:i})=>{const f=C[p],N=a[p],F=n.checkNaN(c),he=n.checkNaN(c+i/d.outflow*v.height),j=n.checkNaN(f.y+t.value.style.chart.padding.top),pe=n.checkNaN(j+i/N.inflow*f.height);x.push({id:n.createUid(),source:s,target:p,path:`M ${n.checkNaN(v.x+T.value)} ${F} L ${n.checkNaN(v.x+T.value)} ${he} L ${n.checkNaN(f.x)} ${pe} L ${n.checkNaN(f.x)} ${j} Z`,value:i,sourceColor:d.color,targetColor:N.color}),c+=he-F,C[p].y+=pe-j})}return{nodeCoordinates:C,links:x}}const g=e.computed(()=>{const o=Te(y.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((a,l)=>({...o.nodeCoordinates[a],name:a})),links:o.links}});e.computed(()=>Be(g.value.nodes));function Be(o){const a={};for(const r in o){const{x:u,height:h}=o[r];a[u]||(a[u]=0),a[u]+=h+ae.value}return Math.max(...Object.values(a))}const E=e.computed(()=>{const{top:o,right:a,bottom:l,left:r}=t.value.style.chart.padding,u=Math.max(...g.value.nodes.map(b=>b.x)),h=r+u+T.value+a,w=Math.max(...g.value.nodes.map(b=>b.absoluteY+b.height)),_=o+w+l;return{width:h,height:_}});function _e(o){const a={},l={},r=new Set;return q.value.forEach(([u,h,w])=>{a[u]||(a[u]=[]),l[h]||(l[h]=[]),a[u].push(h),l[h].push(u)}),a[o]&&a[o].forEach(u=>r.add(u)),l[o]&&l[o].forEach(u=>r.add(u)),Array.from(r).concat(o)}const m=e.ref(null),B=e.ref(null),R=e.ref(null),O=e.ref(!1);function Ee(o){$.value=[],m.value=_e(o.name),B.value=o.name;const a=o.name,l=q.value;let r=0,u=0,h=[],w=[];const _=new Set(l.map(([i])=>i)),b=new Set(l.map(([,i])=>i)),fe=Array.from(_).filter(i=>!b.has(i)),C=l.filter(([i])=>fe.includes(i)).reduce((i,[f,N,F])=>i+F,0),x={};g.value.nodes.forEach(i=>{x[i.name]=i.color}),l.forEach(([i,f,N])=>{f===a&&(r+=N,h.push({source:i,value:N,color:x[i]})),i===a&&(u+=N,w.push({target:f,value:N,color:x[f]}))});const s=Math.max(r,u),c=C>0?s/C*100:0,d={name:a,inflow:r,outflow:u,from:h,to:w,percentOfTotal:c,color:x[a]||"#000000"};R.value={datapoint:d},M.value=!0;let v="";const p=t.value.style.chart.tooltip.customFormat;if(O.value=!1,n.isFunction(p))try{const i=p({datapoint:d,series:g.value,config:t.value});typeof i=="string"&&(D.value=i,O.value=!0)}catch{console.warn("Custom format cannot be applied.")}if(!O.value){const i=t.value.style.chart.tooltip.showPercentage?`<div>${n.dataLabel({p:t.value.style.chart.tooltip.translations.percentOfTotal,v:d.percentOfTotal,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</div>`:"";v+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;"><span style="margin-right:4px; color:${d.color}">⏹</span>${d.name}${i}</div>`,d.from.length&&(v+=`<div>${t.value.style.chart.tooltip.translations.from}</div>`,d.from.forEach(f=>{v+=`<div><span style="color:${f.color}">⏹←</span> ${f.source}: ${n.applyDataLabel(t.value.style.chart.nodes.labels.formatter,f.value,n.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:f.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}))}</div>`})),d.to.length&&(v+=`<div style="margin-top:6px;">${t.value.style.chart.tooltip.translations.to}</div>`,d.to.forEach(f=>{v+=`<div><span style="color:${f.color}">⏹→</span> ${f.target}: ${n.applyDataLabel(t.value.style.chart.nodes.labels.formatter,f.value,n.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:f.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}))}</div>`})),D.value=v}}function re(){m.value=null,B.value=null,M.value=!1}const se=e.computed(()=>g.value.links.map(({source:o,target:a,sourceColor:l,targetColor:r,value:u})=>({source:o,target:a,sourceColor:l,targetColor:r,value:u})));function ue(){e.nextTick(()=>{const o=se.value.map((r,u)=>[[r.source],[r.target],[r.value]]),a=[[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=n.createCsvContent(a);n.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const L=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],a=se.value.map((u,h)=>[{color:u.sourceColor,name:u.source},{color:u.targetColor,name:u.target},n.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:u.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:a,config:l}});function Pe(){return g.value}function ie(){k.value.showTable=!k.value.showTable}const z=e.ref(!1);function Y(){z.value=!z.value}function ce(){k.value.showTooltip=!k.value.showTooltip}const de=e.computed(()=>{const o=new Set(g.value.nodes.map(a=>t.value.nodeCategories[a.name]||"__uncategorized__"));return Array.from(o).map(a=>({name:a,color:t.value.nodeCategoryColors[a]||n.palette[0],shape:"square",count:g.value.nodes.filter(l=>(t.value.nodeCategories[l.name]||"__uncategorized__")===a).length})).map((a,l)=>({...a,segregate:()=>U({legend:a,i:l}),opacity:$.value.length?$.value.includes(l)?1:.5:1}))}),ve=e.computed(()=>de.value.filter(o=>o.name!=="__uncategorized__")),$=e.ref([]);function U({legend:o,i:a}){var r;const l=o.name;if((r=m.value)!=null&&r.every(u=>t.value.nodeCategories[u]===l)){m.value=null,B.value=null,$.value=[];return}$.value=[a],m.value=g.value.nodes.filter(u=>t.value.nodeCategories[u.name]===l).map(u=>u.name),B.value=null}const Oe=e.computed(()=>({cy:"flow-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:t.value.style.chart.legend.paddingBottom,fontWeight:t.value.style.chart.legend.bold?"bold":"normal"}));return be({getData:Pe,generateCsv:ue,generateImage:le,generatePdf:oe,toggleTable:ie,toggleAnnotator:Y,toggleTooltip:ce,drillCategory:U,unselectNode:re}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:I,class:e.normalizeClass(`vue-ui-flow ${S.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_${A.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(Z)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(Z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ie._sfc_main,{key:0,svgRef:e.unref(K),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:Y},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ne.value?(e.openBlock(),e.createElementBlock("div",Ue,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",je,[(e.openBlock(),e.createBlock(Le._sfc_main,{key:`title_${X.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&&V.value&&(e.unref(J)||e.unref(H))?(e.openBlock(),e.createBlock(ge.UserOptions,{ref:"details",key:`user_option_${W.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ee),isImaging:e.unref(te),uid:A.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:S.value,titles:{...t.value.userOptions.buttonTitles},chartElement:I.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:k.value.showTooltip,onToggleTooltip:ce,onToggleFullscreen:we,onGeneratePdf:e.unref(oe),onGenerateCsv:ue,onGenerateImage:e.unref(le),onToggleTable:ie,onToggleAnnotator:Y,style:e.normalizeStyle({visibility:e.unref(J)?e.unref(H)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:r})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","hasTooltip","isTooltip","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{ref_key:"svgRef",ref:K,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${E.value.width} ${E.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ae._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:E.value.width,height:E.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,We)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.links,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:l.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.sourceColor},null,8,Ze),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,Je)],8,Xe))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.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(`
|
|
2
|
+
opacity:${m.value?m.value.includes(l.source)&&m.value.includes(l.target)?1:.3:B.value?[l.target,l.source].includes(B.value)?1:.3:t.value.style.chart.links.opacity}
|
|
3
|
+
`)},null,12,Ke))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:e.unref(n.checkNaN)(l.absoluteY)+t.value.style.chart.padding.top,height:e.unref(n.checkNaN)(l.height),width:T.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:u=>Ee(l),onMouseleave:a[0]||(a[0]=u=>re()),style:e.normalizeStyle(`opacity:${m.value?m.value.includes(l.name)?1:.3:1}`)},null,44,Qe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+T.value/2,y:e.unref(n.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(n.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(n.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+T.value/2,y:e.unref(n.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(n.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:l.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:l,seriesIndex:r})),13,tt))),256)),e.renderSlot(o.$slots,"svg",{svg:E.value},void 0,!0)],14,Ge)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ee)||e.unref(te)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ve.default,{key:5,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:Ce},[t.value.style.chart.legend.show&&ve.value.length?(e.openBlock(),e.createBlock(qe.Legend,{key:0,legendSet:ve.value,config:Oe.value,onClickMarker:a[1]||(a[1]=l=>U(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${$.value.length?$.value.includes(r)?1:.5:1}`)},e.toDisplayString(l.name)+" ("+e.toDisplayString(l.count)+") ",13,lt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:de.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(He._sfc_main,{show:k.value.showTooltip&&M.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:I.value,content:D.value,isCustom:O.value,isFullscreen:S.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...R.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...R.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),V.value?(e.openBlock(),e.createBlock(Fe.default,{key:7,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.createVNode(ze.DataTable,{colNames:L.value.colNames,head:L.value.head,body:L.value.body,config:L.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,nt)]),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,Ye))}},st=Re._export_sfc(rt,[["__scopeId","data-v-6fcb877a"]]);exports.default=st;
|