vue-data-ui 2.6.7 → 2.6.8
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-BxUmDF04.js → Arrow-BHD3VBsD.js} +1 -1
- package/dist/{Arrow-PPbxds1Q.cjs → Arrow-YuEygGzC.cjs} +1 -1
- package/dist/{BaseIcon-BmVwfJg2.cjs → BaseIcon-D326yPTV.cjs} +1 -1
- package/dist/{BaseIcon-CDx9pxUG.js → BaseIcon-dThl5uNa.js} +1 -1
- package/dist/{DataTable-Cv_TVAas.cjs → DataTable-CaD8j-SL.cjs} +1 -1
- package/dist/{DataTable-TjJIVFlL.js → DataTable-D0-zzsJg.js} +2 -2
- package/dist/{Legend-DunrYGuw.cjs → Legend-CEw2uq9s.cjs} +1 -1
- package/dist/{Legend-NKGwxkI7.js → Legend-Oaw0MY8Y.js} +2 -2
- package/dist/{PackageVersion-DJKkRuOD.cjs → PackageVersion-CCgJTyH9.cjs} +1 -1
- package/dist/{PackageVersion-QRvxRYPv.js → PackageVersion-J_USnljf.js} +1 -1
- package/dist/{PenAndPaper-CxC1lWGK.js → PenAndPaper-CoEXEMcN.js} +3 -3
- package/dist/{PenAndPaper-MTTJ3Gd9.cjs → PenAndPaper-DvNBHCpq.cjs} +1 -1
- package/dist/{Shape-D_1vUjCL.cjs → Shape-Cwx-wRaK.cjs} +1 -1
- package/dist/{Shape-58uyOuYc.js → Shape-Dtm6toQp.js} +1 -1
- package/dist/{Slicer-BGEieXKn.cjs → Slicer-7z_6bjyU.cjs} +1 -1
- package/dist/{Slicer-C7ormJRw.js → Slicer-BAcq2vD0.js} +2 -2
- package/dist/{Title-Dk92HYMu.cjs → Title-BQSh4ukk.cjs} +1 -1
- package/dist/{Title-BI8etrRU.js → Title-DePxeqVl.js} +1 -1
- package/dist/{Tooltip-Cxc8c50d.js → Tooltip-DRw9RoFp.js} +1 -1
- package/dist/{Tooltip-ClMeqejQ.cjs → Tooltip-DtqrGu-Q.cjs} +1 -1
- package/dist/{index-9EeNZMz1.js → index-CZlI7PiS.js} +1 -1
- package/dist/{index-DEnRHTzk.cjs → index-DD4PT0Pl.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-df_bKQEI.js → useNestedProp-Cg0NIwr6.js} +1 -1
- package/dist/{useNestedProp-BNT60LxO.cjs → useNestedProp-DU7JFxpL.cjs} +1 -1
- package/dist/{usePrinter-dyVny55M.cjs → usePrinter-BtJq2wwh.cjs} +1 -1
- package/dist/{usePrinter-ngrh00Ym.js → usePrinter-D-sSdR2l.js} +1 -1
- package/dist/{vue-data-ui-CDD7JcMs.js → vue-data-ui-Dh3BJvUF.js} +61 -61
- package/dist/{vue-data-ui-BYX-I7HQ.cjs → vue-data-ui-DzVmFW3P.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BArLjlrc.js → vue-ui-3d-bar-Ckd-GTWY.js} +9 -9
- package/dist/{vue-ui-3d-bar-DegdXf_S.cjs → vue-ui-3d-bar-llxfgI9N.cjs} +1 -1
- package/dist/{vue-ui-accordion-D2qxHGzp.cjs → vue-ui-accordion-2He8z0Sy.cjs} +1 -1
- package/dist/{vue-ui-accordion-Qo8JxnIN.js → vue-ui-accordion-DVtmOO3I.js} +3 -3
- package/dist/{vue-ui-age-pyramid-Biz02m7c.js → vue-ui-age-pyramid-BUGAES7K.js} +10 -10
- package/dist/{vue-ui-age-pyramid-kpaaJ2Gx.cjs → vue-ui-age-pyramid-CxBb12yp.cjs} +1 -1
- package/dist/{vue-ui-annotator-By6XNYm0.cjs → vue-ui-annotator-BDUanFLb.cjs} +1 -1
- package/dist/{vue-ui-annotator-MXs48Lua.js → vue-ui-annotator-gIa7-tAI.js} +1 -1
- package/dist/{vue-ui-bullet-Dkz6vX0T.cjs → vue-ui-bullet-Bg8f_RzX.cjs} +1 -1
- package/dist/{vue-ui-bullet-CtBs_r3I.js → vue-ui-bullet-DNfzMdcg.js} +8 -8
- package/dist/{vue-ui-candlestick-DiEUIuW8.cjs → vue-ui-candlestick-CnKPX6xB.cjs} +1 -1
- package/dist/{vue-ui-candlestick-gPztmuJE.js → vue-ui-candlestick-jErGIOZA.js} +11 -11
- package/dist/{vue-ui-carousel-table-D9ckYNKZ.js → vue-ui-carousel-table-DHyvpjWL.js} +4 -4
- package/dist/{vue-ui-carousel-table-CYeXP21y.cjs → vue-ui-carousel-table-DsY9Mrdg.cjs} +1 -1
- package/dist/{vue-ui-chestnut-oZtRERnV.cjs → vue-ui-chestnut-BTCxF3dU.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DWjn-jcN.js → vue-ui-chestnut-kQjk4FqR.js} +8 -8
- package/dist/{vue-ui-circle-pack-Bz5yVvAM.js → vue-ui-circle-pack-BQbwIDRa.js} +9 -9
- package/dist/{vue-ui-circle-pack-DCJ6N00S.cjs → vue-ui-circle-pack-D-eMMNzU.cjs} +1 -1
- package/dist/{vue-ui-cursor-DZhRygRy.cjs → vue-ui-cursor-Dd2eSMAz.cjs} +1 -1
- package/dist/{vue-ui-cursor-BrrVDy1u.js → vue-ui-cursor-xy62w2ep.js} +2 -2
- package/dist/{vue-ui-dashboard-DEmGN8Js.js → vue-ui-dashboard-DPjU-kPn.js} +2 -2
- package/dist/{vue-ui-dashboard-o8Ju_cXW.cjs → vue-ui-dashboard-nMODKstD.cjs} +1 -1
- package/dist/{vue-ui-digits-DbOrROu7.js → vue-ui-digits-BNTE0Lsb.js} +2 -2
- package/dist/{vue-ui-digits-CgyYdrQ5.cjs → vue-ui-digits-Beuy8wvV.cjs} +1 -1
- package/dist/{vue-ui-donut-9pWaRwf3.cjs → vue-ui-donut-DWKUDr7k.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-Ci_gIrkO.cjs → vue-ui-donut-evolution-BICtQ8ke.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-BAMD1wQ5.js → vue-ui-donut-evolution-DfHfXqar.js} +11 -11
- package/dist/{vue-ui-donut-CP5uWglM.js → vue-ui-donut-ipVF2Pk6.js} +12 -12
- package/dist/{vue-ui-dumbbell-CFYd-Ypn.js → vue-ui-dumbbell-D04To0aO.js} +10 -10
- package/dist/{vue-ui-dumbbell-DUNYoZxT.cjs → vue-ui-dumbbell-DPZYa6RZ.cjs} +1 -1
- package/dist/{vue-ui-flow-CdvGWFzv.js → vue-ui-flow-DYpBU4gG.js} +9 -9
- package/dist/{vue-ui-flow-W89ofPB-.cjs → vue-ui-flow-HFjfjzgX.cjs} +1 -1
- package/dist/{vue-ui-funnel-RvdVrhFu.cjs → vue-ui-funnel-BwClLXO6.cjs} +1 -1
- package/dist/{vue-ui-funnel-DYutKyoz.js → vue-ui-funnel-CVQHETom.js} +9 -9
- package/dist/{vue-ui-galaxy-Djdx-ca8.cjs → vue-ui-galaxy-B0W8yBZU.cjs} +1 -1
- package/dist/{vue-ui-galaxy-BCBRlYS1.js → vue-ui-galaxy-DseGnRIL.js} +11 -11
- package/dist/{vue-ui-gauge-BVVmf09x.cjs → vue-ui-gauge-0vhiDi19.cjs} +1 -1
- package/dist/{vue-ui-gauge-BNAAZt4F.js → vue-ui-gauge-B7nCLtyI.js} +7 -7
- package/dist/{vue-ui-gizmo-BFQ_KgLX.js → vue-ui-gizmo-C1fpqm2H.js} +3 -3
- package/dist/{vue-ui-gizmo-Ceh0oFY3.cjs → vue-ui-gizmo-CTMnMH7C.cjs} +1 -1
- package/dist/{vue-ui-heatmap-Ct3qaBv7.js → vue-ui-heatmap-B0a6TegZ.js} +10 -10
- package/dist/{vue-ui-heatmap-CiZpI-tA.cjs → vue-ui-heatmap-DjxXVFyU.cjs} +1 -1
- package/dist/{vue-ui-history-plot-Ci8Y2EFg.cjs → vue-ui-history-plot-CfjWg_3c.cjs} +1 -1
- package/dist/{vue-ui-history-plot-shn74MJ6.js → vue-ui-history-plot-DsLgXpZ8.js} +11 -11
- package/dist/{vue-ui-kpi-DfYrbxlX.cjs → vue-ui-kpi-CTsWQvCi.cjs} +1 -1
- package/dist/{vue-ui-kpi-B_pV-2JJ.js → vue-ui-kpi-be1EaVNS.js} +3 -3
- package/dist/{vue-ui-mini-loader-BFnWQs5p.js → vue-ui-mini-loader-BHm2QQQF.js} +2 -2
- package/dist/{vue-ui-mini-loader-LIqf62jk.cjs → vue-ui-mini-loader-DLdlPE48.cjs} +1 -1
- package/dist/{vue-ui-molecule-DNz1m8XZ.js → vue-ui-molecule--G2QIMak.js} +11 -11
- package/dist/{vue-ui-molecule-D8YuYTKv.cjs → vue-ui-molecule-DQOP_2JN.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-DiYB_zhM.js → vue-ui-mood-radar-Bhr5Q9pC.js} +11 -11
- package/dist/{vue-ui-mood-radar-uvH7qUHy.cjs → vue-ui-mood-radar-HxyTIDLP.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-C7ikDjp7.cjs → vue-ui-nested-donuts-C0aK_Cmr.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-9hn-g4ir.js → vue-ui-nested-donuts-Dtll0W-x.js} +11 -11
- package/dist/{vue-ui-onion-DCWfNTNu.js → vue-ui-onion-CRRZ8ajr.js} +11 -11
- package/dist/{vue-ui-onion-5Rqvd4Fw.cjs → vue-ui-onion-DJFv8ezH.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-tlgTbaNX.cjs → vue-ui-parallel-coordinate-plot-BTkf3dkR.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-CaPFL9_1.js → vue-ui-parallel-coordinate-plot-DMk3iobe.js} +12 -12
- package/dist/{vue-ui-quadrant-B0Sw5NGo.cjs → vue-ui-quadrant-B7iHGaqG.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BoQZ375K.js → vue-ui-quadrant-EcGC8p0U.js} +12 -12
- package/dist/{vue-ui-quick-chart-D3zV1d7t.cjs → vue-ui-quick-chart-BOla8Yse.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-vfMN8F1q.js → vue-ui-quick-chart-D6AS1YSx.js} +9 -9
- package/dist/{vue-ui-radar-CNMJCAwo.cjs → vue-ui-radar-DmM3tCiY.cjs} +1 -1
- package/dist/{vue-ui-radar-CAuu6wkh.js → vue-ui-radar-LzAasUWm.js} +12 -12
- package/dist/{vue-ui-rating-dsRDRL98.cjs → vue-ui-rating-D9K7meNL.cjs} +1 -1
- package/dist/{vue-ui-rating-Bm0HZ3du.js → vue-ui-rating-DK4hwg8z.js} +2 -2
- package/dist/{vue-ui-relation-circle-5OZMN9jR.js → vue-ui-relation-circle-CbOCYAmF.js} +7 -7
- package/dist/{vue-ui-relation-circle-iD7BufNH.cjs → vue-ui-relation-circle-DIJuJZrt.cjs} +1 -1
- package/dist/{vue-ui-rings-DC4WG4sK.cjs → vue-ui-rings-BWgF92GG.cjs} +1 -1
- package/dist/{vue-ui-rings-COefBaQT.js → vue-ui-rings-Cqzy5T3m.js} +12 -12
- package/dist/{vue-ui-scatter-DhO83TZZ.js → vue-ui-scatter-DXvyWQYL.js} +12 -12
- package/dist/{vue-ui-scatter-5ny76dmi.cjs → vue-ui-scatter-F-gNKXpp.cjs} +1 -1
- package/dist/{vue-ui-screenshot-brillPo5.js → vue-ui-screenshot-BL75IkNz.js} +1 -1
- package/dist/{vue-ui-screenshot-DABH_phE.cjs → vue-ui-screenshot-BXngAa8V.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BmJiYGtE.js → vue-ui-skeleton-D8r-yAkW.js} +3 -3
- package/dist/{vue-ui-skeleton-_DN0U6W6.cjs → vue-ui-skeleton-Tk4j6G2D.cjs} +1 -1
- package/dist/{vue-ui-smiley-D9NRimij.js → vue-ui-smiley-BKWWVHh7.js} +2 -2
- package/dist/{vue-ui-smiley-CW6714mb.cjs → vue-ui-smiley-BLnMEG6Z.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-BKZj03CQ.js → vue-ui-spark-trend-Bb7xpmpt.js} +5 -5
- package/dist/{vue-ui-spark-trend-expbkxgR.cjs → vue-ui-spark-trend-CqG-PKFp.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-Cr9FtevP.cjs → vue-ui-sparkbar-0h661dcM.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CYRORE5i.js → vue-ui-sparkbar-JIpGYhbq.js} +4 -4
- package/dist/{vue-ui-sparkgauge-BHXFhvTv.cjs → vue-ui-sparkgauge-BLglWMCN.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-JV4tYB7P.js → vue-ui-sparkgauge-Cc-l_NLU.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-DKINHX2q.js → vue-ui-sparkhistogram-BysifQmq.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-T4a3DDck.cjs → vue-ui-sparkhistogram-CCbcvIJ1.cjs} +1 -1
- package/dist/{vue-ui-sparkline-Dc6Sf3n8.cjs → vue-ui-sparkline-CDJX8K9i.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CbRTHtig.js → vue-ui-sparkline-CV-N3Wio.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-CV5SkdsP.cjs → vue-ui-sparkstackbar-Bo4JAlsR.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-6u9-2nG4.js → vue-ui-sparkstackbar-WOO_AbtI.js} +5 -5
- package/dist/{vue-ui-stackbar-CUppObfj.js → vue-ui-stackbar-CP0igpri.js} +13 -13
- package/dist/{vue-ui-stackbar-CXB-nd71.cjs → vue-ui-stackbar-D7odU6jb.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-6IXF_U6-.cjs → vue-ui-strip-plot-CUqC58Ki.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-doaNZAW4.js → vue-ui-strip-plot-_3AJWLnm.js} +11 -11
- package/dist/{vue-ui-table-S66UCskD.cjs → vue-ui-table-8O19epjz.cjs} +1 -1
- package/dist/{vue-ui-table-CZsNuDR5.js → vue-ui-table-WdE7p5Oy.js} +1 -1
- package/dist/{vue-ui-table-heatmap-CjohHqDV.js → vue-ui-table-heatmap-CXS6WfTi.js} +4 -4
- package/dist/{vue-ui-table-heatmap-BU9UU15H.cjs → vue-ui-table-heatmap-DH5kHmxx.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-ab2rwdKB.js → vue-ui-table-sparkline-CWwjANqk.js} +5 -5
- package/dist/{vue-ui-table-sparkline-CHFFTD0a.cjs → vue-ui-table-sparkline-DnvQfr2p.cjs} +1 -1
- package/dist/{vue-ui-thermometer-C72mHwUi.js → vue-ui-thermometer-BxrDTquG.js} +7 -7
- package/dist/{vue-ui-thermometer-Ccd6RGh8.cjs → vue-ui-thermometer-COmtpPaq.cjs} +1 -1
- package/dist/{vue-ui-timer-C8Fn2B0b.cjs → vue-ui-timer-Bx3W4oUc.cjs} +1 -1
- package/dist/{vue-ui-timer-D-LNi6lz.js → vue-ui-timer-DjKCOw9A.js} +5 -5
- package/dist/{vue-ui-tiremarks-SOzvMOz4.cjs → vue-ui-tiremarks--XDyJeJg.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-Bo8EWsJ8.js → vue-ui-tiremarks-VWxcZxB-.js} +7 -7
- package/dist/{vue-ui-treemap-uj94elVB.js → vue-ui-treemap-BGFmZcII.js} +11 -11
- package/dist/{vue-ui-treemap-BqTTQrVh.cjs → vue-ui-treemap-DTwjydy8.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-C4Sxun4Q.cjs → vue-ui-vertical-bar-Bpv8mXW2.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BUTOw-DK.js → vue-ui-vertical-bar-DC9czKCT.js} +12 -12
- package/dist/{vue-ui-waffle-DYWGRKdT.cjs → vue-ui-waffle-B_6ZAnKt.cjs} +1 -1
- package/dist/{vue-ui-waffle-CTWA1frT.js → vue-ui-waffle-Cu63K9Iy.js} +12 -12
- package/dist/{vue-ui-wheel-8K72ZKda.js → vue-ui-wheel-AOt-pfpa.js} +7 -7
- package/dist/{vue-ui-wheel-Cz5-0klT.cjs → vue-ui-wheel-BQM-dxTa.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-D39riLZb.cjs → vue-ui-word-cloud-Bam3-7P_.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-CSwBPDB8.js → vue-ui-word-cloud-CrILrx6m.js} +10 -10
- package/dist/{vue-ui-xy-DpDKutd7.js → vue-ui-xy-BuLymzS3.js} +212 -190
- package/dist/vue-ui-xy-CSmObuR7.cjs +3 -0
- package/dist/{vue-ui-xy-canvas-BCj0SCqe.cjs → vue-ui-xy-canvas-BQ0Lbxbd.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-BQm9gah4.js → vue-ui-xy-canvas-DPnb5mqS.js} +11 -11
- package/package.json +1 -1
- package/dist/vue-ui-xy-BbWXjajH.cjs +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DD4PT0Pl.cjs"),ge=require("./useResponsive-YQYQrAZ_.cjs"),Re=require("./Title-BQSh4ukk.cjs"),fe=require("./usePrinter-BtJq2wwh.cjs"),qe=require("./Tooltip-DtqrGu-Q.cjs"),me=require("./Legend-CEw2uq9s.cjs"),Ue=require("./vue-ui-skeleton-Tk4j6G2D.cjs"),He=require("./BaseIcon-D326yPTV.cjs"),Xe=require("./vue-ui-accordion-2He8z0Sy.cjs"),be=require("./useNestedProp-DU7JFxpL.cjs"),je=require("./PackageVersion-CCgJTyH9.cjs"),We=require("./PenAndPaper-DvNBHCpq.cjs"),Ge=require("./useUserOptionState-BgepsfED.cjs"),ke=require("./Shape-Cwx-wRaK.cjs"),Ye=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Je=["id"],Qe=["onClick"],Ze=["xmlns","viewBox"],et=["width","height"],tt=["id"],lt=["stop-color"],at=["stop-color"],ot={key:1},nt=["x","y","width","height","fill","rx"],rt=["x","y","width","height","fill","rx","stroke","stroke-width"],ut=["x","y","width","height","fill","rx","stroke","stroke-width"],st=["x2","y1","y2","stroke","stroke-width"],it=["x1","x2","y1","y2","stroke","stroke-width"],ct=["x","y","text-anchor","font-size","fill","font-weight"],dt=["x","y","font-size","fill","font-weight"],vt=["x","y","font-size","fill","font-weight"],ht=["x","y","font-size","fill","font-weight"],pt=["y","width","height","fill","onMouseenter"],yt={key:6,class:"vue-data-ui-watermark"},gt=["onClick"],ft={style:"width:100%;padding-top: 36px;position:relative"},mt={class:"vue-ui-data-table"},bt={key:0},kt={style:{width:"100%"}},Ct=["data-cell"],_t={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},xt=["data-cell"],wt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Nt=["data-cell"],$t={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},St=["data-cell"],Vt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Tt=["data-cell"],Bt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Et=["data-cell"],Lt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Pt=["data-cell"],zt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Dt={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(Ce,{expose:_e,emit:xe}){e.useCssVars(a=>({bd03f0e4:a.tdo}));const{vue_ui_vertical_bar:we}=n.useConfig(),Ne=e.useSlots(),f=Ce,E=e.computed(()=>!!f.dataset&&f.dataset.length),g=e.ref(n.createUid()),$e=e.ref(null),O=e.ref(!1),I=e.ref(""),L=e.ref(0),Se=e.ref(null),X=e.ref(0),S=e.ref(null),j=e.ref(null),M=e.ref(null),W=e.ref(null),G=e.ref(null),Y=e.ref(0),A=e.ref(0),Ve=xe,t=e.computed({get:()=>Q(),set:a=>a}),{userOptionsVisible:R,setUserOptionsVisibility:K,keepUserOptionState:J}=Ge.useUserOptionState({config:t.value}),{svgRef:Te}=Ye.useChartAccessibility({config:t.value.style.chart.title});function Q(){const a=be.useNestedProp({userConfig:f.config,defaultConfig:we});return a.theme?{...be.useNestedProp({userConfig:n.themes.vue_ui_vertical_bar[a.theme]||f.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}e.watch(()=>f.config,a=>{t.value=Q(),R.value=!t.value.userOptions.showOnChartHover,re(),Y.value+=1,A.value+=1,s.value=t.value.style.chart.layout.bars.height,c.value=t.value.style.chart.layout.bars.gap,h.value.showTable=t.value.table.show,h.value.sortDesc=t.value.style.chart.layout.bars.sort==="desc",h.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),e.watch(()=>f.dataset,z,{deep:!0});const{isPrinting:Z,isImaging:ee,generatePdf:te,generateImage:le}=fe.usePrinter({elementId:`vue-ui-vertical-bar_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar"}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ae=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),oe=e.ref(null),ne=e.ref(!1),Ee=e.computed(()=>t.value.table.responsiveBreakpoint),P=e.ref(null);e.onMounted(()=>{re()});function re(){if(n.objectIsEmpty(f.dataset)&&n.error({componentName:"VueUiVerticalBar",type:"dataset"}),L.value=f.dataset.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0),Le(),t.value.responsive){const a=ge.throttle(()=>{const{width:o,height:l}=ge.useResponsive({chart:S.value,title:t.value.style.chart.title.text?j.value:null,legend:t.value.style.chart.legend.show?M.value:null,source:W.value,noTitle:G.value});requestAnimationFrame(()=>{ie.value=o,s.value=l/L.value-c.value*2})});P.value=new ResizeObserver(a),P.value.observe(S.value.parentNode)}}e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});function Le(){new ResizeObserver(o=>{o.forEach(l=>{ne.value=l.contentRect.width<Ee.value})}).observe(oe.value)}const h=e.ref({showTable:t.value.table.show,sortDesc:t.value.style.chart.layout.bars.sort==="desc",showTooltip:t.value.style.chart.tooltip.show}),ue=e.computed(()=>h.value.sortDesc),x=e.computed(()=>(f.dataset.forEach((a,o)=>{!a.value&&!a.children&&n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`value (index ${o})`}),a.children&&(n.objectIsEmpty(a.children)?n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`children (index ${o})`}):a.children.forEach((l,r)=>{[null,void 0].includes(l.name)&&n.error({componentName:"VueUiVerticalBar",type:"datasetSerieAttribute",property:"name",key:"children",index:r})}))}),f.dataset.map((a,o)=>{const l=`vertical_parent_${o}_${g.value}`,r=a.children&&a.children.length>0,v=n.checkNaN(a.value?a.value:r?a.children.map(y=>y.value||0).reduce((y,C)=>y+C,0):0),d=v>=0?1:-1;return{...a,id:l,absoluteIndex:o,shape:"square",opacity:b.value.includes(l)?.5:1,value:Math.abs(v),sign:d,hasChildren:r,isChild:!1,segregate:()=>T(l),isSegregated:b.value.includes(l),color:n.convertColorToHex(a.color)||ae.value[o]||n.palette[o]||n.palette[o%n.palette.length],children:!a.children||!a.children.length?[]:a.children.toSorted(D.value?()=>0:(y,C)=>ue.value?C.value-y.value:y.value-C.value).map((y,C)=>({...y,value:n.checkNaN(Math.abs(y.value)),absoluteIndex:o,sign:y.value>=0?1:-1,isChild:!0,parentId:l,parentName:a.name,parentValue:v,parentSign:d,id:`vertical_child_${o}_${C}_${g.value}`,childIndex:C,color:n.convertColorToHex(y.color)||n.convertColorToHex(a.color)||ae.value[o]||n.palette[o]||n.palette[o%n.palette.length]})).map((y,C)=>({...y,isFirstChild:C===0,isLastChild:C===a.children.length-1}))}}).toSorted(D.value?()=>0:(a,o)=>ue.value?o.value-a.value:a.value-o.value))),se=e.computed(()=>({cy:"vertical-bar-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,fontWeight:t.value.style.chart.legend.bold?"bold":""})),s=e.ref(t.value.style.chart.layout.bars.height),c=e.ref(t.value.style.chart.layout.bars.gap),Pe=e.computed(()=>(s.value+c.value)*L.value),ie=e.ref(512),i=e.computed(()=>({width:ie.value,height:Pe.value,padding:{top:12,left:128+t.value.style.chart.layout.bars.offsetX,right:64+t.value.style.chart.layout.bars.paddingRight,bottom:12}})),u=e.computed(()=>({fullHeight:i.value.padding.top+i.value.padding.bottom+i.value.height,top:i.value.padding.top,left:i.value.padding.left,right:i.value.width-i.value.padding.right,bottom:i.value.padding.top+i.value.height,width:i.value.width-(i.value.padding.left+i.value.padding.right)}));function z(){L.value=w.value.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0)}const b=e.ref([]);function T(a){b.value.includes(a)?b.value=b.value.filter(o=>o!==a):b.value.push(a),z(),Ve("selectLegend",w.value)}const w=e.computed(()=>x.value.filter(a=>!b.value.includes(a.id))),k=e.computed(()=>w.value.map(a=>Math.abs(a.value)).reduce((a,o)=>a+o,0));function ce(a,o=!1,l=0){return o?n.dataLabel({v:n.checkNaN(Math.abs(a)/k.value*100),s:"%",r:l}):Math.abs(a)/k.value}const N=e.computed(()=>w.value.flatMap(a=>a.hasChildren?a.children:a)),$=e.computed(()=>N.value.map(a=>a.sign).includes(-1)),ze=e.computed(()=>Math.max(...w.value.flatMap(a=>a.children&&a.children.length?Math.max(...a.children.map(o=>o.value)):a.value)));function p(a){const o=a/ze.value;return u.value.width/($.value?2:1)*o}function De(a){return p(a)+u.value.left}function B(a,o){const l=w.value.find(d=>d.id===a.parentId),r=u.value.top+(c.value+s.value)*o,v=l.children.length*(c.value+s.value);return{y:r+v/2-t.value.style.chart.layout.bars.parentLabels.fontSize,name:l.name,value:[void 0,NaN,null].includes(l.value)?"":l.sign===1?l.value:-l.value,percentageToTotal:isNaN(l.value/k.value)?"":ce(l.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),sign:l.sign}}function Fe(){return w.value}const q=e.ref(null),U=e.ref(null);function Oe(a,o){U.value={datapoint:a,seriesIndex:o,series:x.value,config:t.value},O.value=!0,q.value=a.id;let l="";const r=a.isChild?a.parentName:a.name,v=a.isChild?a.name:"",d=t.value.style.chart.tooltip.customFormat;n.isFunction(d)&&n.functionReturnsString(()=>d({datapoint:a,series:x.value,config:t.value,seriesIndex:o}))?I.value=d({datapoint:a,series:x.value,config:t.value,seriesIndex:o}):(l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
|
|
2
2
|
<div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="${a.color}"/>${Ne.pattern?`<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${g.value}_${a.absoluteIndex})"/>`:""}</svg> ${r}</div>
|
|
3
3
|
${v?`<div>${v}</div>`:""}
|
|
4
4
|
</div>`,t.value.style.chart.tooltip.showValue&&(l+=`<div>${t.value.translations.value}: <b>${n.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,a.sign===1?a.value:-a.value,n.dataLabel({p:t.value.style.chart.tooltip.prefix,v:a.sign===1?a.value:-a.value,s:t.value.style.chart.tooltip.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:o})}</b></div>`),t.value.style.chart.tooltip.showPercentage&&(l+=`<div>${t.value.translations.percentageToTotal} : <b>${n.dataLabel({v:Math.abs(a.value)/k.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`,a.isChild&&(l+=`<div>${t.value.translations.percentageToSerie}: <b>${n.dataLabel({v:Math.abs(a.value)/Math.abs(a.parentValue)*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`)),I.value=`<div style="text-align:left">${l}</div>`)}function de(a,o,l,r){if(!t.value.style.chart.layout.bars.dataLabels.value.show)return"";const v=n.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,n.checkNaN(r===-1&&a>=0?-a:a),n.dataLabel({p:t.value.style.chart.layout.bars.dataLabels.value.prefix,v:n.checkNaN(r===-1&&a>=0?-a:a),s:t.value.style.chart.layout.bars.dataLabels.value.suffix,r:t.value.style.chart.layout.bars.dataLabels.value.roundingValue}),{datapoint:o,seriesIndex:l}),d=`(${ce(a,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;return`${v}${t.value.style.chart.layout.bars.dataLabels.percentage.show?` ${d}`:""}`}const m=e.computed(()=>{const a=[t.value.translations.parentName,t.value.translations.value,t.value.translations.percentageToTotal,t.value.translations.childName,t.value.translations.value,t.value.translations.percentageToSerie,t.value.translations.percentageToTotal],o=N.value.map(l=>l.isChild?l.isFirstChild?{color:l.color,parentName:l.parentName,parentValue:l.parentValue,percentageToTotal:l.parentValue/k.value,childName:l.name,childValue:l.sign===1?l.value:-l.value,childPercentageToParent:Math.abs(l.value)/Math.abs(l.parentValue),childPercentageToTotal:Math.abs(l.value)/k.value}:{color:"",parentName:"",parentValue:"",percentageToTotal:"",childName:l.name,childValue:l.sign===1?l.value:-l.value,childPercentageToParent:Math.abs(l.value)/Math.abs(l.parentValue),childPercentageToTotal:Math.abs(l.value)/k.value}:{color:l.color,parentName:l.name,parentValue:l.sign===1?l.value:-l.value,percentageToTotal:Math.abs(l.value)/k.value,childName:"",childValue:"",childPercentageToParent:"",childPercentageToTotal:""});return{head:a,body:o}});function ve(){const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=m.value.head,l=m.value.body.map(d=>[d.parentName,d.parentValue,d.percentageToTotal,d.childName,d.childValue,d.childPercentageToParent,d.childPercentageToTotal]),r=a.concat([o]).concat(l),v=n.createCsvContent(r);n.downloadCsv({csvContent:v,title:t.value.style.chart.title.text||"vue-ui-vertical-bar"})}const V=e.ref(!1);function Ie(a){V.value=a,X.value+=1}function he(){h.value.showTable=!h.value.showTable}const Me=e.ref({none:0,asc:1,desc:2}),_=e.ref(0),D=e.ref(!1);e.onMounted(()=>{["none","asc","desc"].includes(t.value.style.chart.layout.bars.sort)||n.error({componentName:"VueUiVerticalBar",type:"attributeWrongValue",property:"style.chart.layout.bars.sort",key:t.value.style.chart.layout.bars.sort}),_.value=Me.value[t.value.style.chart.layout.bars.sort],h.value.sortDesc=_.value===2,D.value=_.value===0});function Ae(){_.value+=1,_.value>2&&(_.value=0)}function pe(){Ae(),h.value.sortDesc=_.value===2,D.value=_.value===0,z()}function ye(){h.value.showTooltip=!h.value.showTooltip}const F=e.ref(!1);function H(){F.value=!F.value}return _e({getData:Fe,recalculateHeight:z,generatePdf:te,generateCsv:ve,generateImage:le,toggleTable:he,toggleSort:pe,toggleTooltip:ye,toggleAnnotator:H}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-vertical-bar ${V.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"verticalBarChart",ref:S,id:`vue-ui-vertical-bar_${g.value}`,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%":""}`),onMouseenter:o[5]||(o[5]=()=>e.unref(K)(!0)),onMouseleave:o[6]||(o[6]=()=>e.unref(K)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(We.PenAndPaper,{key:0,parent:S.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:H},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Be.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:G,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:j,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Re._sfc_main,{key:`title_${Y.value}`,config:{title:{cy:"vertical-bar-div-title",...t.value.style.chart.title},subtitle:{cy:"vertical-bar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&E.value&&(e.unref(J)||e.unref(R))?(e.openBlock(),e.createBlock(fe.UserOptions,{ref_key:"details",ref:$e,key:`user_options_${X.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(ee),isPrinting:e.unref(Z),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasSort:t.value.userOptions.buttons.sort,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:S.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(te),onGenerateCsv:ve,onGenerateImage:e.unref(le),onToggleTable:he,onToggleSort:pe,onToggleTooltip:ye,onToggleAnnotator:H,style:e.normalizeStyle({visibility:e.unref(J)?e.unref(R)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},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.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionSort?{name:"optionSort",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionSort",{},void 0,!0)]),key:"6"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"7"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasSort","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:4,ref_key:"chartLegend",ref:M},[(e.openBlock(),e.createBlock(me.Legend,{key:`legend_top_${A.value}`,legendSet:x.value,config:se.value,onClickMarker:o[0]||(o[0]=({legend:l})=>T(l.id))},e.createSlots({item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:v=>T(l.id),style:e.normalizeStyle(`opacity:${b.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:l.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r})),13,Qe)]),_:2},[a.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:r})=>[e.createVNode(ke._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${g.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"]))],512)):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createElementBlock("svg",{key:5,ref_key:"svgRef",ref:Te,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${u.value.fullHeight<=0?10:u.value.fullHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(je._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:i.value.width<=0?10:i.value.width,height:u.value.fullHeight<=0?10:u.value.fullHeight,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,et)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`vertical_bar_gradient_${g.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,lt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.03),100-t.value.style.chart.layout.bars.gradientIntensity)},null,8,at)],8,tt))),256)),a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,l=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(a.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:l.absoluteIndex,patternId:`pattern_${g.value}_${l.absoluteIndex}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:p(l.value)<=0?1e-4:p(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(p(l.value)<=0?1e-4:p(l.value)),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.underlayerColor,rx:t.value.style.chart.layout.bars.borderRadius,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,nt)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:p(l.value)<=0?1e-4:p(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(p(l.value)<=0?1e-4:p(l.value)),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.useGradient?`url(#vertical_bar_gradient_${g.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.bars.fillOpacity),rx:t.value.style.chart.layout.bars.borderRadius,stroke:t.value.style.chart.layout.bars.useStroke?l.color:"none","stroke-width":t.value.style.chart.layout.bars.useStroke?t.value.style.chart.layout.bars.strokeWidth:0,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,rt),a.$slots.pattern?(e.openBlock(),e.createElementBlock("rect",{key:0,x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:p(l.value)<=0?1e-4:p(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(p(l.value)<=0?1e-4:p(l.value)),height:s.value<=0?1e-4:s.value,fill:`url(#pattern_${g.value}_${l.absoluteIndex})`,rx:t.value.style.chart.layout.bars.borderRadius,stroke:t.value.style.chart.layout.bars.useStroke?l.color:"none","stroke-width":t.value.style.chart.layout.bars.useStroke?t.value.style.chart.layout.bars.strokeWidth:0,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,ut)):e.createCommentVNode("",!0),(!l.isChild||l.isLastChild)&&t.value.style.chart.layout.separators.show&&r!==N.value.length-1?(e.openBlock(),e.createElementBlock("line",{key:1,x1:0,x2:u.value.left,y1:s.value+c.value/2+u.value.top+(c.value+s.value)*r,y2:s.value+c.value/2+u.value.top+(c.value+s.value)*r,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,st)):e.createCommentVNode("",!0),$.value&&t.value.style.chart.layout.separators.show?(e.openBlock(),e.createElementBlock("line",{key:2,x1:u.value.left+u.value.width/2,x2:u.value.left+u.value.width/2,y1:u.value.top,y2:u.value.bottom,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,it)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:$.value?u.value.left+u.value.width/2+(l.sign===1?-12:12)+(l.sign===1?-t.value.style.chart.layout.bars.dataLabels.offsetX:t.value.style.chart.layout.bars.dataLabels.offsetX):De(l.value)+3+t.value.style.chart.layout.bars.dataLabels.offsetX,y:u.value.top+(c.value+s.value)*r+s.value/2+t.value.style.chart.layout.bars.dataLabels.fontSize/2,"text-anchor":!$.value||l.sign===-1?"start":"end","font-size":t.value.style.chart.layout.bars.dataLabels.fontSize,fill:t.value.style.chart.layout.bars.dataLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal"},e.toDisplayString(de(l.value,l,r,l.sign)),9,ct),(l.isChild||!l.hasChildren)&&t.value.style.chart.layout.bars.nameLabels.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"end",x:u.value.left-3+t.value.style.chart.layout.bars.nameLabels.offsetX,y:u.value.top+(c.value+s.value)*r+s.value/2+t.value.style.chart.layout.bars.nameLabels.fontSize/2,"font-size":t.value.style.chart.layout.bars.nameLabels.fontSize,fill:t.value.style.chart.layout.bars.nameLabels.color,"font-weight":t.value.style.chart.layout.bars.nameLabels.bold?"bold":"normal"},e.toDisplayString(l.name),9,dt)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:B(l,r).y,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.parentLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(B(l,r).name),9,vt)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:5,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:B(l,r).y+t.value.style.chart.layout.bars.parentLabels.fontSize+6,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(de(B(l,r).value),B(l,r),r,l.parentSign||l.sign),9,ht)):e.createCommentVNode("",!0),e.createElementVNode("rect",{x:0,y:u.value.top+(c.value+s.value)*r-c.value/2,width:i.value.width<=0?1e-4:i.value.width,height:s.value+c.value<=0?1e-4:s.value+c.value,fill:q.value===l.id?e.unref(n.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity):"transparent",onMouseenter:v=>Oe(l,r),onMouseleave:o[1]||(o[1]=v=>{Se.value=null,O.value=!1,q.value=null})},null,40,pt)]))),256)),e.renderSlot(a.$slots,"svg",{svg:i.value},void 0,!0)],14,Ze)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",yt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Z)||e.unref(ee)})),void 0,!0)])):e.createCommentVNode("",!0),E.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ue.default,{key:7,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"chartLegend",ref:M},[(e.openBlock(),e.createBlock(me.Legend,{key:`legend_bottom_${A.value}`,legendSet:x.value,config:se.value,onClickMarker:o[2]||(o[2]=({legend:l})=>T(l.id))},e.createSlots({item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:v=>T(l.id),style:e.normalizeStyle(`opacity:${b.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:l.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r})),13,gt)]),_:2},[a.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:r})=>[e.createVNode(ke._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${g.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"]))],512)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:x.value},void 0,!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:W,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(qe._sfc_main,{show:h.value.showTooltip&&O.value&&b.value.length<f.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:S.value,content:I.value,isFullscreen:V.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...U.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...U.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),E.value?(e.openBlock(),e.createBlock(Xe.default,{key:10,hideDetails:"",config:{open:h.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.createElementVNode("div",{ref_key:"tableContainer",ref:oe,class:"vue-ui-vertical-bar-table atom-data-table"},[e.createElementVNode("div",ft,[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:o[3]||(o[3]=l=>h.value.showTable=!1),onKeypress:o[4]||(o[4]=e.withKeys(l=>h.value.showTable=!1,["enter"]))},[e.createVNode(He.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("div",{style:{width:"100%","container-type":"inline-size"},class:e.normalizeClass({"vue-ui-responsive":ne.value})},[e.createElementVNode("table",mt,[e.createElementVNode("caption",{style:e.normalizeStyle({backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline}),class:"vue-ui-data-table__caption"},[e.createTextVNode(e.toDisplayString(t.value.style.chart.title.text)+" ",1),t.value.style.chart.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",bt,e.toDisplayString(t.value.style.chart.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value.head,l=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline}`)},[e.createElementVNode("div",kt,e.toDisplayString(l),1)],4))),256))],4),e.createElementVNode("tr",null,[e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"∑ "+e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(isNaN(k.value)?"":k.value.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),5),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"100%",4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value.body,(l,r)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline};font-variant-numeric: tabular-nums;`),"data-cell":m.value.head[0]??""},[e.createElementVNode("div",_t,[l.color?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`color:${l.color};margin-right:3px`)},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(l.parentName),1)])],12,Ct),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[1]??""},[e.createElementVNode("div",wt,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(l.parentValue)?"":l.parentValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,xt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[2]??""},[e.createElementVNode("div",$t,e.toDisplayString(["",NaN,void 0].includes(l.percentageToTotal)?"":`${(l.percentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Nt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[3]??""},[e.createElementVNode("div",Vt,e.toDisplayString(l.childName),1)],12,St),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[4]??""},[e.createElementVNode("div",Bt,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(l.childValue)?"":l.childValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,Tt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[5]??""},[e.createElementVNode("div",Lt,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToParent)?"":`${(l.childPercentageToParent*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Et),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[6]??""},[e.createElementVNode("div",zt,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToTotal)?"":`${(l.childPercentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Pt)],6))),256))])])],2)])],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Je))}},Ft=Ke._export_sfc(Dt,[["__scopeId","data-v-9777dcec"]]);exports.default=Ft;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useCssVars as ct, useSlots as ht, computed as b, ref as i, watch as Re, onMounted as Ue, onBeforeUnmount as pt, createElementBlock as r, openBlock as u, unref as d, normalizeStyle as c, normalizeClass as A, createBlock as B, createCommentVNode as p, renderSlot as m, createVNode as j, createSlots as ce, withCtx as k, normalizeProps as q, guardReactiveProps as Y, createElementVNode as n, toDisplayString as h, Fragment as E, renderList as H, mergeProps as yt, withKeys as gt, createTextVNode as ft } from "vue";
|
|
2
|
-
import { u as bt, c as mt, t as _t, p as D, a as kt, b as $t, o as Xe, e as K, v as N, d as he, i as le, f as R, X as xt, s as pe, w as wt, q as Ct, r as Tt, x as Lt, y as Nt } from "./index-
|
|
2
|
+
import { u as bt, c as mt, t as _t, p as D, a as kt, b as $t, o as Xe, e as K, v as N, d as he, i as le, f as R, X as xt, s as pe, w as wt, q as Ct, r as Tt, x as Lt, y as Nt } from "./index-CZlI7PiS.js";
|
|
3
3
|
import { t as Pt, u as St } from "./useResponsive-BWapHhVH.js";
|
|
4
|
-
import { _ as Vt } from "./Title-
|
|
5
|
-
import { u as It, U as Ot } from "./usePrinter-
|
|
6
|
-
import { _ as Ft } from "./Tooltip-
|
|
7
|
-
import { L as Ee } from "./Legend-
|
|
8
|
-
import Mt from "./vue-ui-skeleton-
|
|
9
|
-
import zt from "./BaseIcon-
|
|
10
|
-
import At from "./vue-ui-accordion-
|
|
11
|
-
import { u as He } from "./useNestedProp-
|
|
12
|
-
import { _ as Bt } from "./PackageVersion-
|
|
13
|
-
import { P as Dt } from "./PenAndPaper-
|
|
4
|
+
import { _ as Vt } from "./Title-DePxeqVl.js";
|
|
5
|
+
import { u as It, U as Ot } from "./usePrinter-D-sSdR2l.js";
|
|
6
|
+
import { _ as Ft } from "./Tooltip-DRw9RoFp.js";
|
|
7
|
+
import { L as Ee } from "./Legend-Oaw0MY8Y.js";
|
|
8
|
+
import Mt from "./vue-ui-skeleton-D8r-yAkW.js";
|
|
9
|
+
import zt from "./BaseIcon-dThl5uNa.js";
|
|
10
|
+
import At from "./vue-ui-accordion-DVtmOO3I.js";
|
|
11
|
+
import { u as He } from "./useNestedProp-Cg0NIwr6.js";
|
|
12
|
+
import { _ as Bt } from "./PackageVersion-J_USnljf.js";
|
|
13
|
+
import { P as Dt } from "./PenAndPaper-CoEXEMcN.js";
|
|
14
14
|
import { u as Rt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
|
-
import { _ as We } from "./Shape-
|
|
15
|
+
import { _ as We } from "./Shape-Dtm6toQp.js";
|
|
16
16
|
import { u as Ut } from "./useChartAccessibility-BWojgys7.js";
|
|
17
17
|
import { _ as Xt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
18
18
|
const Et = ["id"], Ht = ["onClick"], Wt = ["xmlns", "viewBox"], Gt = ["width", "height"], jt = ["id"], qt = ["stop-color"], Yt = ["stop-color"], Kt = { key: 1 }, Jt = ["x", "y", "width", "height", "fill", "rx"], Qt = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], Zt = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], ea = ["x2", "y1", "y2", "stroke", "stroke-width"], ta = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], aa = ["x", "y", "text-anchor", "font-size", "fill", "font-weight"], la = ["x", "y", "font-size", "fill", "font-weight"], oa = ["x", "y", "font-size", "fill", "font-weight"], na = ["x", "y", "font-size", "fill", "font-weight"], ua = ["y", "width", "height", "fill", "onMouseenter"], sa = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DEnRHTzk.cjs"),fe=require("./useResponsive-YQYQrAZ_.cjs"),Fe=require("./Title-Dk92HYMu.cjs"),ye=require("./usePrinter-dyVny55M.cjs"),ze=require("./Tooltip-ClMeqejQ.cjs"),Oe=require("./DataTable-Cv_TVAas.cjs"),Ae=require("./Legend-DunrYGuw.cjs"),De=require("./vue-ui-skeleton-_DN0U6W6.cjs"),qe=require("./vue-ui-accordion-D2qxHGzp.cjs"),ge=require("./useNestedProp-BNT60LxO.cjs"),Me=require("./PackageVersion-DJKkRuOD.cjs"),Re=require("./PenAndPaper-MTTJ3Gd9.cjs"),Ue=require("./useUserOptionState-BgepsfED.cjs"),je=require("./Shape-D_1vUjCL.cjs"),Ge=require("./useChartAccessibility-Cm7nkzTG.cjs"),We=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),He=["id"],Ye=["xmlns","viewBox"],Xe=["id"],Je=["stop-color"],Ke=["stop-color"],Qe=["id"],Ze=["x","y","height","width"],et=["height","width"],tt={key:0},lt=["rx","x","y","height","width","stroke","stroke-width","filter"],at=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],ot={key:1},rt=["rx","x","y","height","width","fill","filter"],ut=["x","y","height","width","filter"],nt={key:0},st={key:1},it={key:2},ct={key:3},vt=["onMouseover","x","y","height","width"],dt={key:5,class:"vue-data-ui-watermark"},pt=["onClick"],ht={key:0},ft={key:1},yt=["innerHTML"],gt={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(me,{expose:be,emit:ke}){const{vue_ui_waffle:we}=n.useConfig(),p=me,Ce=e.useSlots(),V=e.computed(()=>!!p.dataset&&p.dataset.length),f=e.ref(n.createUid()),xe=e.ref(null),O=e.ref(!1),A=e.ref(""),B=e.ref(null),j=e.ref(0),_=e.ref(null),G=e.ref(null),W=e.ref(null),H=e.ref(null),Y=e.ref(null),X=e.ref(0),J=e.ref(0),K=e.ref(0),t=e.computed({get:()=>ee(),set:l=>l}),{userOptionsVisible:D,setUserOptionsVisibility:Q,keepUserOptionState:Z}=Ue.useUserOptionState({config:t.value}),{svgRef:Be}=Ge.useChartAccessibility({config:t.value.style.chart.title});function ee(){const l=ge.useNestedProp({userConfig:p.config,defaultConfig:we});return l.theme?{...ge.useNestedProp({userConfig:n.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}e.watch(()=>p.config,l=>{t.value=ee(),D.value=!t.value.userOptions.showOnChartHover,te(),X.value+=1,J.value+=1,K.value+=1,y.value.showTable=t.value.table.show,y.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const P=e.ref(null);function te(){if(n.objectIsEmpty(p.dataset)?n.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,o)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=fe.throttle(()=>{const{width:o,height:a}=fe.useResponsive({chart:_.value,title:t.value.style.chart.title.text?G.value:null,legend:t.value.style.chart.legend.show?W.value:null,source:H.value,noTitle:Y.value});requestAnimationFrame(()=>{C.value.width=o,C.value.height=a,g.value.width=o,g.value.height=a})});P.value=new ResizeObserver(l),P.value.observe(_.value.parentNode)}}e.onMounted(()=>{te()}),e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});const{isPrinting:le,isImaging:ae,generatePdf:oe,generateImage:re}=ye.usePrinter({elementId:`vue-ui-waffle_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),_e=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ue=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),C=e.ref({height:512,width:512}),g=e.ref({top:0,left:0,height:512,width:512}),m=e.computed(()=>(g.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),b=e.computed(()=>(g.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),T=e.computed(()=>g.value.width/t.value.style.chart.layout.grid.size),E=e.computed(()=>g.value.height/t.value.style.chart.layout.grid.size);function ne(l){const o=t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.size,a=l.reduce((h,U)=>h+U,0),r=l.map(h=>h/a*o),u=r.map(Math.floor),i=r.map(h=>h%1);let d=o-u.reduce((h,U)=>h+U,0);for(;d>0;){let h=i.indexOf(Math.max(...i));u[h]+=1,i[h]=0,d-=1}return u}function se(){return p.dataset.map((l,o)=>({...l,color:n.convertColorToHex(l.color)||ue.value[o]||n.palette[o]||n.palette[o%n.palette.length],uid:`serie_${o}`,absoluteIndex:o}))}const q=e.computed(()=>se()),c=e.ref(q.value);e.watch(()=>p.dataset,l=>{c.value=se()},{deep:!0});const Se=e.computed(()=>{const l=c.value.filter((o,a)=>!v.value.includes(o.uid)).map((o,a)=>(o.values||[]).reduce((r,u)=>r+u,0));return ne(l)}),$e=e.computed(()=>{const l=c.value.map((o,a)=>(o.values||[]).reduce((r,u)=>r+u));return ne(l)}),L=e.computed(()=>(p.dataset.forEach((l,o)=>{[null,void 0].includes(l.values)&&n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:o})}),c.value.filter((l,o)=>!v.value.includes(l.uid)).map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:Se.value[o]})))),Ne=e.computed(()=>c.value.map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:$e.value[o]})));function Te(){return Ne.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion}))}const Le=e.computed(()=>{let l=0;return L.value.map((o,a)=>{const r=l,u=r+o.proportion,i=[];for(let d=Math.floor(r);d<Math.floor(u);d+=1)i.push(d);return l=u,{...o,start:r,rects:i}})}),s=e.computed(()=>Le.value.flatMap((l,o)=>l.rects.map((a,r)=>({isFirst:r===0,isLongEnough:a.length>2,name:l.name,color:l.color,value:l.value,serieIndex:o,absoluteStartIndex:r<3,serieId:l.uid,...l}))).map((l,o)=>({...l,isAbsoluteFirst:o%t.value.style.chart.layout.grid.size===0}))),S=e.computed(()=>{const l=[];for(let o=0;o<t.value.style.chart.layout.grid.size;o+=1)for(let a=0;a<t.value.style.chart.layout.grid.size;a+=1)l.push({isStartOfLine:a===0,position:t.value.style.chart.layout.grid.vertical?o:a,x:(t.value.style.chart.layout.grid.vertical?o:a)*(m.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:o)*(b.value+t.value.style.chart.layout.grid.spaceBetween)+g.value.top});return l}),v=e.ref([]),x=e.ref(!1),ie=e.ref(null),ce=e.ref(null);function ve(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(u=>u!==l):v.value.length<$.value.length-1&&$.value.length>1&&v.value.push(l);return}const o=q.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0),a=c.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0);let r=a;if(v.value.includes(l)){let i=function(){r>u?(cancelAnimationFrame(ie.value),c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[u]}:d),x.value=!1):(x.value=!0,r+=u*.025,c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[r]}:d),ie.value=requestAnimationFrame(i))};v.value=v.value.filter(d=>d!==l);const u=o;i()}else if(v.value.length<$.value.length-1&&$.value.length>1){let u=function(){r<a/100?(cancelAnimationFrame(ce.value),v.value.push(l),c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[0]}:i),x.value=!1):(x.value=!0,r/=1.15,c.value=c.value.map(i=>i.uid===l?{...i,values:[r]}:i),ce.value=requestAnimationFrame(u))};u()}Ee("selectLegend",L.value.map(u=>({name:u.name,color:u.color,value:u.value,proportion:u.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)})))}const $=e.computed(()=>c.value.map((l,o)=>({name:l.name,color:l.color||ue[o]||n.palette[o]||n.palette[o%n.palette.length],value:(l.values||[]).reduce((a,r)=>a+r,0),uid:l.uid,shape:"square"})).map(l=>({...l,proportion:l.value/c.value.map(o=>(o.values||[]).reduce((a,r)=>a+r,0)).reduce((o,a)=>o+a,0),opacity:v.value.includes(l.uid)?.5:1,segregate:()=>ve(l.uid),isSegregated:v.value.includes(l.uid)}))),Ve=e.computed(()=>({cy:"waffle-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,fontWeight:t.value.style.chart.legend.bold?"bold":""})),k=e.computed(()=>L.value.map(l=>l.value).reduce((l,o)=>l+o,0)),M=e.ref(null);function Pe(l){if(v.value.length===p.dataset.length)return;const o=s.value[l];M.value={datapoint:o,seriesIndex:o.absoluteIndex,series:c.value,config:t.value},O.value=!0,B.value=s.value[l].serieIndex;const a=t.value.style.chart.tooltip.customFormat;if(n.isFunction(a)&&n.functionReturnsString(()=>a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value})))A.value=a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value});else{let r="";if(r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,r+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" stroke="none" rx="1" fill="${o.color}" />${Ce.pattern?`<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${f.value}_${o.absoluteIndex})"/>`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(r+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:s.value[l].absoluteIndex,series:c.value})}</b>`),t.value.style.chart.tooltip.showPercentage){const u=n.dataLabel({v:o.value/k.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage});t.value.style.chart.tooltip.showValue?r+=`<span>(${u})</span></div>`:r+=`<b>${u}%</b></div>`}A.value=r}}const Ee=ke,w=e.computed(()=>{const l=L.value.map(a=>({name:a.name,color:a.color})),o=L.value.map(a=>a.value);return{head:l,body:o}});function I(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${f.value})`:""}function de(){e.nextTick(()=>{const l=w.value.head.map((r,u)=>[[r.name],[w.value.body[u]],[isNaN(w.value.body[u]/k.value)?"-":w.value.body[u]/k.value*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=n.createCsvContent(o);n.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const F=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,k.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),"100%"],o=w.value.head.map((u,i)=>[{color:u.color,name:u.name},n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,w.value.body[i],n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:w.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),isNaN(w.value.body[i]/k.value)?"-":n.dataLabel({v:w.value.body[i]/k.value*100,s:"%",r:t.value.table.td.roundingPercentage})]),a={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},shape:"square",breakpoint:t.value.table.responsiveBreakpoint},r=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:o,config:a,colNames:r}}),N=e.ref(!1);function Ie(l){N.value=l,j.value+=1}function pe(){y.value.showTable=!y.value.showTable}function he(){y.value.showTooltip=!y.value.showTooltip}const z=e.ref(!1);function R(){z.value=!z.value}return be({getData:Te,generatePdf:oe,generateCsv:de,generateImage:re,toggleTable:pe,toggleTooltip:he,toggleAnnotator:R}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${N.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:_,id:`vue-ui-waffle_${f.value}`,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%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(Q)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(Q)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Re.PenAndPaper,{key:0,parent:_.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),_e.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Y,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:G,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Fe._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value&&(e.unref(Z)||e.unref(D))?(e.openBlock(),e.createBlock(ye.UserOptions,{ref_key:"details",ref:xe,key:`user_options_${j.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(le),isImaging:e.unref(ae),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:N.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(oe),onGenerateCsv:de,onGenerateImage:e.unref(re),onToggleTable:pe,onToggleTooltip:he,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(Z)?e.unref(D)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:Be,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`0 0 ${C.value.width<=0?10:C.value.width} ${C.value.height<=0?10:C.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Me._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(a.color,.05),100-t.value.style.chart.layout.rect.gradientIntensity)},null,8,Je),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ke)],8,Xe))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},o[5]||(o[5]=[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1),e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)]),8,Qe)]),t.value.useCustomCells&&s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:b.value<=0?1e-4:b.value,width:m.value<=0?1e-4:m.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.mergeProps({ref_for:!0},{cell:{...a,color:s.value[r].color,...s.value[r]},isSelected:[null,void 0].includes(B.value)?!0:s.value[r].serieIndex===B.value}),void 0,!0)],8,Ze))),256)):e.createCommentVNode("",!0),!s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock("rect",{key:1,x:12,y:12,height:g.value.height-24,width:g.value.width-24,rx:3,fill:"none",stroke:"black"},null,8,et)):s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,a=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(l.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:a.absoluteIndex,patternId:`pattern_${f.value}_${a.absoluteIndex}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:m.value<=0?1e-4:m.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:I(s.value[r].serieIndex)},null,8,lt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:m.value<=0?1e-4:m.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${f.value}_${r})`:s.value[r].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:I(s.value[r].serieIndex)},null,8,at))),256)),l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:m.value<=0?1e-4:m.value,fill:`url(#pattern_${f.value}_${s.value[r].absoluteIndex})`,stroke:"none",filter:I(s.value[r].serieIndex)},null,8,rt))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value.length&&!x.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(s.value[r].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||s.value[r].isAbsoluteFirst&&r%t.value.style.chart.layout.grid.size===0&&s.value[r].absoluteStartIndex)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:a.x+t.value.style.chart.layout.labels.captions.offsetX+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.labels.captions.offsetY+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:T.value*t.value.style.chart.layout.grid.size<=0?1e-4:T.value*t.value.style.chart.layout.grid.size,filter:I(s.value[r].serieIndex)},[e.createElementVNode("div",{class:"vue-ui-waffle-caption",style:e.normalizeStyle(`height: 100%; width: 100%; font-size:${t.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${T.value/12}px;color:${e.unref(n.adaptColorToBackground)(s.value[r].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",nt,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(n.abbreviate)({source:s.value[r].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):s.value[r].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",st,e.toDisplayString(e.unref(n.dataLabel)({v:s.value[r].proportion,s:"%",r:t.value.style.chart.layout.labels.captions.roundingPercentage})),1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",it," ("+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a}))+") ",1)):e.createCommentVNode("",!0),!t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",ct,e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a})),1)):e.createCommentVNode("",!0)],4)],8,ut)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:u=>Pe(r),onMouseleave:o[0]||(o[0]=u=>{O.value=!1,B.value=null}),x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:T.value<=0?1e-4:T.value,fill:"transparent",stroke:"none"},null,40,vt))),256)),e.renderSlot(l.$slots,"svg",{svg:C.value},void 0,!0)],14,Ye)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",dt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(le)||e.unref(ae)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(De.default,{key:6,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:W},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ae.Legend,{key:`legend_${K.value}`,legendSet:$.value,config:Ve.value,onClickMarker:o[1]||(o[1]=({legend:a})=>ve(a.uid))},e.createSlots({item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:r=>a.segregate(),style:e.normalizeStyle(`opacity:${v.value.includes(a.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue,isAnimating:x.value}),{datapoint:a}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",ft," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",ht," ("+e.toDisplayString(isNaN(a.value/k.value)?"-":e.unref(n.dataLabel)({v:a.value/k.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:x.value}))+") ",1))],12,pt)]),_:2},[l.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:a,index:r})=>[e.createVNode(je._sfc_main,{shape:a.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:$.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:H,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:y.value.showTooltip&&O.value&&v.value.length<p.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,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:_.value,content:A.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize,isFullscreen:N.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","fontSize","isFullscreen"]),V.value?(e.openBlock(),e.createBlock(qe.default,{key:8,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Oe.DataTable,{key:`table_${J.value}`,colNames:F.value.colNames,head:F.value.head,body:F.value.body,config:F.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>y.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,yt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,He))}},mt=We._export_sfc(gt,[["__scopeId","data-v-059288a6"]]);exports.default=mt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DD4PT0Pl.cjs"),fe=require("./useResponsive-YQYQrAZ_.cjs"),Fe=require("./Title-BQSh4ukk.cjs"),ye=require("./usePrinter-BtJq2wwh.cjs"),ze=require("./Tooltip-DtqrGu-Q.cjs"),Oe=require("./DataTable-CaD8j-SL.cjs"),Ae=require("./Legend-CEw2uq9s.cjs"),De=require("./vue-ui-skeleton-Tk4j6G2D.cjs"),qe=require("./vue-ui-accordion-2He8z0Sy.cjs"),ge=require("./useNestedProp-DU7JFxpL.cjs"),Me=require("./PackageVersion-CCgJTyH9.cjs"),Re=require("./PenAndPaper-DvNBHCpq.cjs"),Ue=require("./useUserOptionState-BgepsfED.cjs"),je=require("./Shape-Cwx-wRaK.cjs"),Ge=require("./useChartAccessibility-Cm7nkzTG.cjs"),We=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),He=["id"],Ye=["xmlns","viewBox"],Xe=["id"],Je=["stop-color"],Ke=["stop-color"],Qe=["id"],Ze=["x","y","height","width"],et=["height","width"],tt={key:0},lt=["rx","x","y","height","width","stroke","stroke-width","filter"],at=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],ot={key:1},rt=["rx","x","y","height","width","fill","filter"],ut=["x","y","height","width","filter"],nt={key:0},st={key:1},it={key:2},ct={key:3},vt=["onMouseover","x","y","height","width"],dt={key:5,class:"vue-data-ui-watermark"},pt=["onClick"],ht={key:0},ft={key:1},yt=["innerHTML"],gt={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(me,{expose:be,emit:ke}){const{vue_ui_waffle:we}=n.useConfig(),p=me,Ce=e.useSlots(),V=e.computed(()=>!!p.dataset&&p.dataset.length),f=e.ref(n.createUid()),xe=e.ref(null),O=e.ref(!1),A=e.ref(""),B=e.ref(null),j=e.ref(0),_=e.ref(null),G=e.ref(null),W=e.ref(null),H=e.ref(null),Y=e.ref(null),X=e.ref(0),J=e.ref(0),K=e.ref(0),t=e.computed({get:()=>ee(),set:l=>l}),{userOptionsVisible:D,setUserOptionsVisibility:Q,keepUserOptionState:Z}=Ue.useUserOptionState({config:t.value}),{svgRef:Be}=Ge.useChartAccessibility({config:t.value.style.chart.title});function ee(){const l=ge.useNestedProp({userConfig:p.config,defaultConfig:we});return l.theme?{...ge.useNestedProp({userConfig:n.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}e.watch(()=>p.config,l=>{t.value=ee(),D.value=!t.value.userOptions.showOnChartHover,te(),X.value+=1,J.value+=1,K.value+=1,y.value.showTable=t.value.table.show,y.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const P=e.ref(null);function te(){if(n.objectIsEmpty(p.dataset)?n.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,o)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=fe.throttle(()=>{const{width:o,height:a}=fe.useResponsive({chart:_.value,title:t.value.style.chart.title.text?G.value:null,legend:t.value.style.chart.legend.show?W.value:null,source:H.value,noTitle:Y.value});requestAnimationFrame(()=>{C.value.width=o,C.value.height=a,g.value.width=o,g.value.height=a})});P.value=new ResizeObserver(l),P.value.observe(_.value.parentNode)}}e.onMounted(()=>{te()}),e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});const{isPrinting:le,isImaging:ae,generatePdf:oe,generateImage:re}=ye.usePrinter({elementId:`vue-ui-waffle_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),_e=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ue=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),C=e.ref({height:512,width:512}),g=e.ref({top:0,left:0,height:512,width:512}),m=e.computed(()=>(g.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),b=e.computed(()=>(g.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),T=e.computed(()=>g.value.width/t.value.style.chart.layout.grid.size),E=e.computed(()=>g.value.height/t.value.style.chart.layout.grid.size);function ne(l){const o=t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.size,a=l.reduce((h,U)=>h+U,0),r=l.map(h=>h/a*o),u=r.map(Math.floor),i=r.map(h=>h%1);let d=o-u.reduce((h,U)=>h+U,0);for(;d>0;){let h=i.indexOf(Math.max(...i));u[h]+=1,i[h]=0,d-=1}return u}function se(){return p.dataset.map((l,o)=>({...l,color:n.convertColorToHex(l.color)||ue.value[o]||n.palette[o]||n.palette[o%n.palette.length],uid:`serie_${o}`,absoluteIndex:o}))}const q=e.computed(()=>se()),c=e.ref(q.value);e.watch(()=>p.dataset,l=>{c.value=se()},{deep:!0});const Se=e.computed(()=>{const l=c.value.filter((o,a)=>!v.value.includes(o.uid)).map((o,a)=>(o.values||[]).reduce((r,u)=>r+u,0));return ne(l)}),$e=e.computed(()=>{const l=c.value.map((o,a)=>(o.values||[]).reduce((r,u)=>r+u));return ne(l)}),L=e.computed(()=>(p.dataset.forEach((l,o)=>{[null,void 0].includes(l.values)&&n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:o})}),c.value.filter((l,o)=>!v.value.includes(l.uid)).map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:Se.value[o]})))),Ne=e.computed(()=>c.value.map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:$e.value[o]})));function Te(){return Ne.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion}))}const Le=e.computed(()=>{let l=0;return L.value.map((o,a)=>{const r=l,u=r+o.proportion,i=[];for(let d=Math.floor(r);d<Math.floor(u);d+=1)i.push(d);return l=u,{...o,start:r,rects:i}})}),s=e.computed(()=>Le.value.flatMap((l,o)=>l.rects.map((a,r)=>({isFirst:r===0,isLongEnough:a.length>2,name:l.name,color:l.color,value:l.value,serieIndex:o,absoluteStartIndex:r<3,serieId:l.uid,...l}))).map((l,o)=>({...l,isAbsoluteFirst:o%t.value.style.chart.layout.grid.size===0}))),S=e.computed(()=>{const l=[];for(let o=0;o<t.value.style.chart.layout.grid.size;o+=1)for(let a=0;a<t.value.style.chart.layout.grid.size;a+=1)l.push({isStartOfLine:a===0,position:t.value.style.chart.layout.grid.vertical?o:a,x:(t.value.style.chart.layout.grid.vertical?o:a)*(m.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:o)*(b.value+t.value.style.chart.layout.grid.spaceBetween)+g.value.top});return l}),v=e.ref([]),x=e.ref(!1),ie=e.ref(null),ce=e.ref(null);function ve(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(u=>u!==l):v.value.length<$.value.length-1&&$.value.length>1&&v.value.push(l);return}const o=q.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0),a=c.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0);let r=a;if(v.value.includes(l)){let i=function(){r>u?(cancelAnimationFrame(ie.value),c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[u]}:d),x.value=!1):(x.value=!0,r+=u*.025,c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[r]}:d),ie.value=requestAnimationFrame(i))};v.value=v.value.filter(d=>d!==l);const u=o;i()}else if(v.value.length<$.value.length-1&&$.value.length>1){let u=function(){r<a/100?(cancelAnimationFrame(ce.value),v.value.push(l),c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[0]}:i),x.value=!1):(x.value=!0,r/=1.15,c.value=c.value.map(i=>i.uid===l?{...i,values:[r]}:i),ce.value=requestAnimationFrame(u))};u()}Ee("selectLegend",L.value.map(u=>({name:u.name,color:u.color,value:u.value,proportion:u.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)})))}const $=e.computed(()=>c.value.map((l,o)=>({name:l.name,color:l.color||ue[o]||n.palette[o]||n.palette[o%n.palette.length],value:(l.values||[]).reduce((a,r)=>a+r,0),uid:l.uid,shape:"square"})).map(l=>({...l,proportion:l.value/c.value.map(o=>(o.values||[]).reduce((a,r)=>a+r,0)).reduce((o,a)=>o+a,0),opacity:v.value.includes(l.uid)?.5:1,segregate:()=>ve(l.uid),isSegregated:v.value.includes(l.uid)}))),Ve=e.computed(()=>({cy:"waffle-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,fontWeight:t.value.style.chart.legend.bold?"bold":""})),k=e.computed(()=>L.value.map(l=>l.value).reduce((l,o)=>l+o,0)),M=e.ref(null);function Pe(l){if(v.value.length===p.dataset.length)return;const o=s.value[l];M.value={datapoint:o,seriesIndex:o.absoluteIndex,series:c.value,config:t.value},O.value=!0,B.value=s.value[l].serieIndex;const a=t.value.style.chart.tooltip.customFormat;if(n.isFunction(a)&&n.functionReturnsString(()=>a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value})))A.value=a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value});else{let r="";if(r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,r+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" stroke="none" rx="1" fill="${o.color}" />${Ce.pattern?`<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${f.value}_${o.absoluteIndex})"/>`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(r+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:s.value[l].absoluteIndex,series:c.value})}</b>`),t.value.style.chart.tooltip.showPercentage){const u=n.dataLabel({v:o.value/k.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage});t.value.style.chart.tooltip.showValue?r+=`<span>(${u})</span></div>`:r+=`<b>${u}%</b></div>`}A.value=r}}const Ee=ke,w=e.computed(()=>{const l=L.value.map(a=>({name:a.name,color:a.color})),o=L.value.map(a=>a.value);return{head:l,body:o}});function I(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${f.value})`:""}function de(){e.nextTick(()=>{const l=w.value.head.map((r,u)=>[[r.name],[w.value.body[u]],[isNaN(w.value.body[u]/k.value)?"-":w.value.body[u]/k.value*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=n.createCsvContent(o);n.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const F=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,k.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),"100%"],o=w.value.head.map((u,i)=>[{color:u.color,name:u.name},n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,w.value.body[i],n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:w.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),isNaN(w.value.body[i]/k.value)?"-":n.dataLabel({v:w.value.body[i]/k.value*100,s:"%",r:t.value.table.td.roundingPercentage})]),a={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},shape:"square",breakpoint:t.value.table.responsiveBreakpoint},r=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:o,config:a,colNames:r}}),N=e.ref(!1);function Ie(l){N.value=l,j.value+=1}function pe(){y.value.showTable=!y.value.showTable}function he(){y.value.showTooltip=!y.value.showTooltip}const z=e.ref(!1);function R(){z.value=!z.value}return be({getData:Te,generatePdf:oe,generateCsv:de,generateImage:re,toggleTable:pe,toggleTooltip:he,toggleAnnotator:R}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${N.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:_,id:`vue-ui-waffle_${f.value}`,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%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(Q)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(Q)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Re.PenAndPaper,{key:0,parent:_.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),_e.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Y,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:G,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Fe._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value&&(e.unref(Z)||e.unref(D))?(e.openBlock(),e.createBlock(ye.UserOptions,{ref_key:"details",ref:xe,key:`user_options_${j.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(le),isImaging:e.unref(ae),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:N.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(oe),onGenerateCsv:de,onGenerateImage:e.unref(re),onToggleTable:pe,onToggleTooltip:he,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(Z)?e.unref(D)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:Be,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`0 0 ${C.value.width<=0?10:C.value.width} ${C.value.height<=0?10:C.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Me._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(a.color,.05),100-t.value.style.chart.layout.rect.gradientIntensity)},null,8,Je),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ke)],8,Xe))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},o[5]||(o[5]=[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1),e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)]),8,Qe)]),t.value.useCustomCells&&s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:b.value<=0?1e-4:b.value,width:m.value<=0?1e-4:m.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.mergeProps({ref_for:!0},{cell:{...a,color:s.value[r].color,...s.value[r]},isSelected:[null,void 0].includes(B.value)?!0:s.value[r].serieIndex===B.value}),void 0,!0)],8,Ze))),256)):e.createCommentVNode("",!0),!s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock("rect",{key:1,x:12,y:12,height:g.value.height-24,width:g.value.width-24,rx:3,fill:"none",stroke:"black"},null,8,et)):s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,a=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(l.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:a.absoluteIndex,patternId:`pattern_${f.value}_${a.absoluteIndex}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:m.value<=0?1e-4:m.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:I(s.value[r].serieIndex)},null,8,lt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:m.value<=0?1e-4:m.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${f.value}_${r})`:s.value[r].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:I(s.value[r].serieIndex)},null,8,at))),256)),l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:m.value<=0?1e-4:m.value,fill:`url(#pattern_${f.value}_${s.value[r].absoluteIndex})`,stroke:"none",filter:I(s.value[r].serieIndex)},null,8,rt))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value.length&&!x.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(s.value[r].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||s.value[r].isAbsoluteFirst&&r%t.value.style.chart.layout.grid.size===0&&s.value[r].absoluteStartIndex)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:a.x+t.value.style.chart.layout.labels.captions.offsetX+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.labels.captions.offsetY+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:T.value*t.value.style.chart.layout.grid.size<=0?1e-4:T.value*t.value.style.chart.layout.grid.size,filter:I(s.value[r].serieIndex)},[e.createElementVNode("div",{class:"vue-ui-waffle-caption",style:e.normalizeStyle(`height: 100%; width: 100%; font-size:${t.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${T.value/12}px;color:${e.unref(n.adaptColorToBackground)(s.value[r].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",nt,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(n.abbreviate)({source:s.value[r].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):s.value[r].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",st,e.toDisplayString(e.unref(n.dataLabel)({v:s.value[r].proportion,s:"%",r:t.value.style.chart.layout.labels.captions.roundingPercentage})),1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",it," ("+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a}))+") ",1)):e.createCommentVNode("",!0),!t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",ct,e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a})),1)):e.createCommentVNode("",!0)],4)],8,ut)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:u=>Pe(r),onMouseleave:o[0]||(o[0]=u=>{O.value=!1,B.value=null}),x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:T.value<=0?1e-4:T.value,fill:"transparent",stroke:"none"},null,40,vt))),256)),e.renderSlot(l.$slots,"svg",{svg:C.value},void 0,!0)],14,Ye)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",dt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(le)||e.unref(ae)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(De.default,{key:6,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:W},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ae.Legend,{key:`legend_${K.value}`,legendSet:$.value,config:Ve.value,onClickMarker:o[1]||(o[1]=({legend:a})=>ve(a.uid))},e.createSlots({item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:r=>a.segregate(),style:e.normalizeStyle(`opacity:${v.value.includes(a.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue,isAnimating:x.value}),{datapoint:a}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",ft," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",ht," ("+e.toDisplayString(isNaN(a.value/k.value)?"-":e.unref(n.dataLabel)({v:a.value/k.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:x.value}))+") ",1))],12,pt)]),_:2},[l.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:a,index:r})=>[e.createVNode(je._sfc_main,{shape:a.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:$.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:H,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:y.value.showTooltip&&O.value&&v.value.length<p.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,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:_.value,content:A.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize,isFullscreen:N.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","fontSize","isFullscreen"]),V.value?(e.openBlock(),e.createBlock(qe.default,{key:8,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Oe.DataTable,{key:`table_${J.value}`,colNames:F.value.colNames,head:F.value.head,body:F.value.body,config:F.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>y.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,yt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,He))}},mt=We._export_sfc(gt,[["__scopeId","data-v-059288a6"]]);exports.default=mt;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useSlots as at, computed as d, ref as v, watch as ze, onMounted as ot, onBeforeUnmount as ut, createElementBlock as s, openBlock as r, unref as c, normalizeStyle as W, normalizeClass as Ne, createBlock as N, createCommentVNode as y, createElementVNode as x, createVNode as se, createSlots as Be, withCtx as m, renderSlot as g, normalizeProps as q, guardReactiveProps as H, Fragment as $, renderList as L, mergeProps as Ve, toDisplayString as A, createTextVNode as Me, nextTick as rt } from "vue";
|
|
2
|
-
import { u as st, c as nt, t as it, p as B, a as vt, o as ct, e as ne, g as dt, b as ht, i as G, f as _, X as pt, s as yt, w as ft, G as gt, L as mt, d as bt, q as wt, r as kt, x as xt, y as Ct } from "./index-
|
|
2
|
+
import { u as st, c as nt, t as it, p as B, a as vt, o as ct, e as ne, g as dt, b as ht, i as G, f as _, X as pt, s as yt, w as ft, G as gt, L as mt, d as bt, q as wt, r as kt, x as xt, y as Ct } from "./index-CZlI7PiS.js";
|
|
3
3
|
import { t as $t, u as _t } from "./useResponsive-BWapHhVH.js";
|
|
4
|
-
import { _ as Tt } from "./Title-
|
|
5
|
-
import { u as It, U as St } from "./usePrinter-
|
|
6
|
-
import { _ as Pt } from "./Tooltip-
|
|
7
|
-
import { D as Ot } from "./DataTable-
|
|
8
|
-
import { L as Lt } from "./Legend-
|
|
9
|
-
import At from "./vue-ui-skeleton-
|
|
10
|
-
import Ft from "./vue-ui-accordion-
|
|
11
|
-
import { u as De } from "./useNestedProp-
|
|
12
|
-
import { _ as zt } from "./PackageVersion-
|
|
13
|
-
import { P as Nt } from "./PenAndPaper-
|
|
4
|
+
import { _ as Tt } from "./Title-DePxeqVl.js";
|
|
5
|
+
import { u as It, U as St } from "./usePrinter-D-sSdR2l.js";
|
|
6
|
+
import { _ as Pt } from "./Tooltip-DRw9RoFp.js";
|
|
7
|
+
import { D as Ot } from "./DataTable-D0-zzsJg.js";
|
|
8
|
+
import { L as Lt } from "./Legend-Oaw0MY8Y.js";
|
|
9
|
+
import At from "./vue-ui-skeleton-D8r-yAkW.js";
|
|
10
|
+
import Ft from "./vue-ui-accordion-DVtmOO3I.js";
|
|
11
|
+
import { u as De } from "./useNestedProp-Cg0NIwr6.js";
|
|
12
|
+
import { _ as zt } from "./PackageVersion-J_USnljf.js";
|
|
13
|
+
import { P as Nt } from "./PenAndPaper-CoEXEMcN.js";
|
|
14
14
|
import { u as Bt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
|
-
import { _ as Vt } from "./Shape-
|
|
15
|
+
import { _ as Vt } from "./Shape-Dtm6toQp.js";
|
|
16
16
|
import { u as Mt } from "./useChartAccessibility-BWojgys7.js";
|
|
17
17
|
import { _ as Dt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
18
18
|
const Ut = ["id"], Rt = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"], Et = ["stop-color"], Wt = ["id"], qt = ["x", "y", "height", "width"], Ht = ["height", "width"], Xt = { key: 0 }, Yt = ["rx", "x", "y", "height", "width", "stroke", "stroke-width", "filter"], Jt = ["rx", "x", "y", "height", "width", "fill", "stroke", "stroke-width", "filter"], Kt = { key: 1 }, Qt = ["rx", "x", "y", "height", "width", "fill", "filter"], Zt = ["x", "y", "height", "width", "filter"], el = { key: 0 }, tl = { key: 1 }, ll = { key: 2 }, al = { key: 3 }, ol = ["onMouseover", "x", "y", "height", "width"], ul = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { computed as y, ref as i, watch as V, onMounted as he, onBeforeUnmount as de, createElementBlock as c, openBlock as n, unref as s, normalizeStyle as A, createBlock as C, createCommentVNode as h, createSlots as ye, withCtx as _, renderSlot as f, normalizeProps as F, guardReactiveProps as S, normalizeClass as z, createVNode as fe, Fragment as J, renderList as K, toDisplayString as pe } from "vue";
|
|
2
|
-
import { u as ge, c as me, a as ke, o as we, e as be, w as Q, m as Ce, X as _e, i as Oe, v as Z, f as $e } from "./index-
|
|
3
|
-
import { _ as xe } from "./Title-
|
|
4
|
-
import { u as Ie, U as Pe } from "./usePrinter-
|
|
2
|
+
import { u as ge, c as me, a as ke, o as we, e as be, w as Q, m as Ce, X as _e, i as Oe, v as Z, f as $e } from "./index-CZlI7PiS.js";
|
|
3
|
+
import { _ as xe } from "./Title-DePxeqVl.js";
|
|
4
|
+
import { u as Ie, U as Pe } from "./usePrinter-D-sSdR2l.js";
|
|
5
5
|
import { t as Ae, u as Fe } from "./useResponsive-BWapHhVH.js";
|
|
6
|
-
import Se from "./vue-ui-skeleton-
|
|
7
|
-
import { u as ee } from "./useNestedProp-
|
|
8
|
-
import { _ as ze } from "./PackageVersion-
|
|
9
|
-
import { P as Me } from "./PenAndPaper-
|
|
6
|
+
import Se from "./vue-ui-skeleton-D8r-yAkW.js";
|
|
7
|
+
import { u as ee } from "./useNestedProp-Cg0NIwr6.js";
|
|
8
|
+
import { _ as ze } from "./PackageVersion-J_USnljf.js";
|
|
9
|
+
import { P as Me } from "./PenAndPaper-CoEXEMcN.js";
|
|
10
10
|
import { u as Te } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
11
|
import { u as Ne } from "./useChartAccessibility-BWojgys7.js";
|
|
12
12
|
import { _ as Ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DEnRHTzk.cjs"),Q=require("./Title-Dk92HYMu.cjs"),q=require("./usePrinter-dyVny55M.cjs"),V=require("./useResponsive-YQYQrAZ_.cjs"),Z=require("./vue-ui-skeleton-_DN0U6W6.cjs"),R=require("./useNestedProp-BNT60LxO.cjs"),ee=require("./PackageVersion-DJKkRuOD.cjs"),te=require("./PenAndPaper-MTTJ3Gd9.cjs"),le=require("./useUserOptionState-BgepsfED.cjs"),ae=require("./useChartAccessibility-Cm7nkzTG.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],re=["xmlns","viewBox"],se=["width","height"],ue=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],ie=["d","fill"],ce=["cx","cy","r","stroke","stroke-width"],ve=["x","y","font-size","fill","font-weight"],de={key:5,class:"vue-data-ui-watermark"},he={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(U,{expose:L}){const{vue_ui_wheel:X}=u.useConfig(),c=U,m=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),k=e.ref(u.createUid()),j=e.ref(null),b=e.ref(0),v=e.ref(null),B=e.ref(null),P=e.ref(null),_=e.ref(null),S=e.ref(0),t=e.computed({get:()=>x(),set:l=>l}),{userOptionsVisible:g,setUserOptionsVisibility:N,keepUserOptionState:O}=le.useUserOptionState({config:t.value}),{svgRef:G}=ae.useChartAccessibility({config:t.value.style.chart.title});function x(){const l=R.useNestedProp({userConfig:c.config,defaultConfig:X});return l.theme?{...R.useNestedProp({userConfig:u.themes.vue_ui_wheel[l.theme]||c.config,defaultConfig:l})}:l}e.watch(()=>c.config,l=>{t.value=x(),g.value=!t.value.userOptions.showOnChartHover,E(),S.value+=1},{deep:!0});const{isPrinting:$,isImaging:z,generatePdf:A,generateImage:I}=q.usePrinter({elementId:k.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel"}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),o=e.ref({size:360,height:360,width:360}),w=e.ref(t.value.style.chart.layout.percentage.fontSize),r=e.computed(()=>({radius:Math.min(o.value.width,o.value.height)*.9/2,centerX:o.value.width/2,centerY:o.value.height/2}));function F(l,n=1){return{x:r.value.centerX+r.value.radius*Math.cos(29.85+l*Math.PI/180)*n,y:r.value.centerY+r.value.radius*Math.sin(29.85+l*Math.PI/180)*n}}const s=e.ref(t.value.style.chart.animation.use?0:c.dataset.percentage||0);e.watch(()=>c.dataset,l=>{t.value.style.chart.animation.use?M(l.percentage):s.value=l.percentage||0},{deep:!0});const h=e.ref(null);e.onMounted(()=>{E()});function E(){if(u.objectIsEmpty(c.dataset)&&u.error({componentName:"VueUiWheel",type:"dataset"}),M(c.dataset.percentage||0),t.value.responsive){const l=V.throttle(()=>{const{width:n,height:a}=V.useResponsive({chart:v.value,title:t.value.style.chart.title.text?B.value:null,source:P.value,noTitle:_.value});requestAnimationFrame(()=>{o.value.width=n,o.value.height=a,w.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(n,a)})});h.value=new ResizeObserver(l),h.value.observe(v.value.parentNode)}}e.onBeforeUnmount(()=>{h.value&&h.value.disconnect()});function M(l){let n=t.value.style.chart.animation.speed;const a=Math.abs(l-s.value)/(n*120);function i(){s.value<l?s.value=Math.min(s.value+a,l):s.value>l&&(s.value=Math.max(s.value-a,l)),s.value!==l&&requestAnimationFrame(i)}i()}const d=e.computed(()=>Math.max(100,t.value.style.chart.layout.wheel.ticks.quantity)),f=e.computed(()=>100/d.value),T=e.computed(()=>{const l=[];for(let n=0;n<d.value;n+=1){const a=s.value>n*f.value?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:i,y:W}=F(o.value.size/d.value*n),{x:J,y:K}=F(o.value.size/d.value*n,t.value.style.chart.layout.wheel.ticks.sizeRatio);l.push({x1:i,y1:W,x2:J,y2:K,color:t.value.style.chart.layout.wheel.ticks.gradient.show?u.shiftHue(a,n*f.value/d.value*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):a})}return l}),D=e.computed(()=>u.makeDonut({series:T.value.map(l=>({name:"",value:1,color:l.color}))},r.value.centerX,r.value.centerY,r.value.radius,r.value.radius,1.99999,2,1,360,105.25,r.value.radius*(1-t.value.style.chart.layout.wheel.ticks.sizeRatio))),y=e.ref(!1);function Y(l){y.value=l,b.value+=1}const p=e.ref(!1);function C(){p.value=!p.value}return L({generatePdf:A,generateImage:I,toggleAnnotator:C}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:v,id:k.value,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%":""}`),onMouseenter:n[0]||(n[0]=()=>e.unref(N)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(N)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(te.PenAndPaper,{key:0,parent:v.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:p.value,onClose:C},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:_,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:B,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Q._sfc_main,{key:`title_${S.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref(O)||e.unref(g))?(e.openBlock(),e.createBlock(q.UserOptions,{ref_key:"details",ref:j,key:`user_options_${b.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref($),isImaging:e.unref(z),uid:k.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:y.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:p.value,chartElement:v.value,onToggleFullscreen:Y,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(I),onToggleAnnotator:C,style:e.normalizeStyle({visibility:e.unref(O)?e.unref(g)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:i})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:i})),void 0,!0)]),key:"2"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:i})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:i})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","position","titles","hasAnnotator","isAnnotation","chartElement","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:G,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${o.value.width<=0?10:o.value.width} ${o.value.height<=0?10:o.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ee._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:o.value.width<=0?10:o.value.width,height:o.value.height<=0?10:o.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,se)):e.createCommentVNode("",!0),t.value.style.chart.layout.wheel.ticks.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(T.value,(a,i)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2,stroke:a.color,"stroke-width":t.value.style.chart.layout.wheel.ticks.strokeWidth/360*Math.min(o.value.width,o.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&i*f.value<=s.value})},null,10,ue))),256)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(D.value,(a,i)=>(e.openBlock(),e.createElementBlock("path",{d:a.arcSlice,fill:a.color,class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&i*f.value<=s.value})},null,10,ie))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:3,cx:r.value.centerX,cy:r.value.centerY,r:r.value.radius*.8<=0?1e-4:r.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,ce)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:r.value.centerX,y:r.value.centerY+w.value/3,"font-size":w.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(u.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,s.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(u.checkNaN)(s.value),e.unref(u.dataLabel)({v:e.unref(u.checkNaN)(s.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:o.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref($)||e.unref(z)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:P,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z.default,{key:7,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],44,ne))}},fe=oe._export_sfc(he,[["__scopeId","data-v-1d726029"]]);exports.default=fe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DD4PT0Pl.cjs"),Q=require("./Title-BQSh4ukk.cjs"),q=require("./usePrinter-BtJq2wwh.cjs"),V=require("./useResponsive-YQYQrAZ_.cjs"),Z=require("./vue-ui-skeleton-Tk4j6G2D.cjs"),R=require("./useNestedProp-DU7JFxpL.cjs"),ee=require("./PackageVersion-CCgJTyH9.cjs"),te=require("./PenAndPaper-DvNBHCpq.cjs"),le=require("./useUserOptionState-BgepsfED.cjs"),ae=require("./useChartAccessibility-Cm7nkzTG.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],re=["xmlns","viewBox"],se=["width","height"],ue=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],ie=["d","fill"],ce=["cx","cy","r","stroke","stroke-width"],ve=["x","y","font-size","fill","font-weight"],de={key:5,class:"vue-data-ui-watermark"},he={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(U,{expose:L}){const{vue_ui_wheel:X}=u.useConfig(),c=U,m=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),k=e.ref(u.createUid()),j=e.ref(null),b=e.ref(0),v=e.ref(null),B=e.ref(null),P=e.ref(null),_=e.ref(null),S=e.ref(0),t=e.computed({get:()=>x(),set:l=>l}),{userOptionsVisible:g,setUserOptionsVisibility:N,keepUserOptionState:O}=le.useUserOptionState({config:t.value}),{svgRef:G}=ae.useChartAccessibility({config:t.value.style.chart.title});function x(){const l=R.useNestedProp({userConfig:c.config,defaultConfig:X});return l.theme?{...R.useNestedProp({userConfig:u.themes.vue_ui_wheel[l.theme]||c.config,defaultConfig:l})}:l}e.watch(()=>c.config,l=>{t.value=x(),g.value=!t.value.userOptions.showOnChartHover,E(),S.value+=1},{deep:!0});const{isPrinting:$,isImaging:z,generatePdf:A,generateImage:I}=q.usePrinter({elementId:k.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel"}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),o=e.ref({size:360,height:360,width:360}),w=e.ref(t.value.style.chart.layout.percentage.fontSize),r=e.computed(()=>({radius:Math.min(o.value.width,o.value.height)*.9/2,centerX:o.value.width/2,centerY:o.value.height/2}));function F(l,n=1){return{x:r.value.centerX+r.value.radius*Math.cos(29.85+l*Math.PI/180)*n,y:r.value.centerY+r.value.radius*Math.sin(29.85+l*Math.PI/180)*n}}const s=e.ref(t.value.style.chart.animation.use?0:c.dataset.percentage||0);e.watch(()=>c.dataset,l=>{t.value.style.chart.animation.use?M(l.percentage):s.value=l.percentage||0},{deep:!0});const h=e.ref(null);e.onMounted(()=>{E()});function E(){if(u.objectIsEmpty(c.dataset)&&u.error({componentName:"VueUiWheel",type:"dataset"}),M(c.dataset.percentage||0),t.value.responsive){const l=V.throttle(()=>{const{width:n,height:a}=V.useResponsive({chart:v.value,title:t.value.style.chart.title.text?B.value:null,source:P.value,noTitle:_.value});requestAnimationFrame(()=>{o.value.width=n,o.value.height=a,w.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(n,a)})});h.value=new ResizeObserver(l),h.value.observe(v.value.parentNode)}}e.onBeforeUnmount(()=>{h.value&&h.value.disconnect()});function M(l){let n=t.value.style.chart.animation.speed;const a=Math.abs(l-s.value)/(n*120);function i(){s.value<l?s.value=Math.min(s.value+a,l):s.value>l&&(s.value=Math.max(s.value-a,l)),s.value!==l&&requestAnimationFrame(i)}i()}const d=e.computed(()=>Math.max(100,t.value.style.chart.layout.wheel.ticks.quantity)),f=e.computed(()=>100/d.value),T=e.computed(()=>{const l=[];for(let n=0;n<d.value;n+=1){const a=s.value>n*f.value?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:i,y:W}=F(o.value.size/d.value*n),{x:J,y:K}=F(o.value.size/d.value*n,t.value.style.chart.layout.wheel.ticks.sizeRatio);l.push({x1:i,y1:W,x2:J,y2:K,color:t.value.style.chart.layout.wheel.ticks.gradient.show?u.shiftHue(a,n*f.value/d.value*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):a})}return l}),D=e.computed(()=>u.makeDonut({series:T.value.map(l=>({name:"",value:1,color:l.color}))},r.value.centerX,r.value.centerY,r.value.radius,r.value.radius,1.99999,2,1,360,105.25,r.value.radius*(1-t.value.style.chart.layout.wheel.ticks.sizeRatio))),y=e.ref(!1);function Y(l){y.value=l,b.value+=1}const p=e.ref(!1);function C(){p.value=!p.value}return L({generatePdf:A,generateImage:I,toggleAnnotator:C}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:v,id:k.value,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%":""}`),onMouseenter:n[0]||(n[0]=()=>e.unref(N)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(N)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(te.PenAndPaper,{key:0,parent:v.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:p.value,onClose:C},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:_,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:B,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Q._sfc_main,{key:`title_${S.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref(O)||e.unref(g))?(e.openBlock(),e.createBlock(q.UserOptions,{ref_key:"details",ref:j,key:`user_options_${b.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref($),isImaging:e.unref(z),uid:k.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:y.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:p.value,chartElement:v.value,onToggleFullscreen:Y,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(I),onToggleAnnotator:C,style:e.normalizeStyle({visibility:e.unref(O)?e.unref(g)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:i})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:i})),void 0,!0)]),key:"2"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:i})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:i})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","position","titles","hasAnnotator","isAnnotation","chartElement","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:G,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${o.value.width<=0?10:o.value.width} ${o.value.height<=0?10:o.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ee._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:o.value.width<=0?10:o.value.width,height:o.value.height<=0?10:o.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,se)):e.createCommentVNode("",!0),t.value.style.chart.layout.wheel.ticks.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(T.value,(a,i)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2,stroke:a.color,"stroke-width":t.value.style.chart.layout.wheel.ticks.strokeWidth/360*Math.min(o.value.width,o.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&i*f.value<=s.value})},null,10,ue))),256)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(D.value,(a,i)=>(e.openBlock(),e.createElementBlock("path",{d:a.arcSlice,fill:a.color,class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&i*f.value<=s.value})},null,10,ie))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:3,cx:r.value.centerX,cy:r.value.centerY,r:r.value.radius*.8<=0?1e-4:r.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,ce)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:r.value.centerX,y:r.value.centerY+w.value/3,"font-size":w.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(u.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,s.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(u.checkNaN)(s.value),e.unref(u.dataLabel)({v:e.unref(u.checkNaN)(s.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:o.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref($)||e.unref(z)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:P,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z.default,{key:7,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],44,ne))}},fe=oe._export_sfc(he,[["__scopeId","data-v-1d726029"]]);exports.default=fe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DEnRHTzk.cjs"),$e=require("./Title-Dk92HYMu.cjs"),ue=require("./usePrinter-dyVny55M.cjs"),H=require("./useResponsive-YQYQrAZ_.cjs"),Te=require("./vue-ui-accordion-D2qxHGzp.cjs"),Ne=require("./DataTable-Cv_TVAas.cjs"),Pe=require("./BaseIcon-BmVwfJg2.cjs"),ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=require("./useNestedProp-BNT60LxO.cjs"),Be=require("./PackageVersion-DJKkRuOD.cjs"),Fe=require("./Tooltip-ClMeqejQ.cjs"),ze=require("./PenAndPaper-MTTJ3Gd9.cjs"),Ae=require("./useUserOptionState-BgepsfED.cjs"),Oe=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ve={"data-html2canvas-ignore":""},Ee={key:0,class:"reset-wrapper"},Me={key:1,class:"reset-wrapper"},_e={class:"mono-slicer"},Ie=["min","max","value"],Re={__name:"MonoSlicer",props:{min:{type:Number,default:0},max:{type:Number,default:0},inputColor:{type:String,default:"#1A1A1A"},background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},selectColor:{type:String,default:"#4A4A4A"},textColor:{type:String,default:"#1A1A1A"},useResetSlot:{type:Boolean,default:!1},value:{type:Number,default:0},source:{type:Number,default:0}},emits:["update:value","reset"],setup(d,{emit:M}){e.useCssVars(b=>({"782b8172":c.value,"102109e6":$.value,"642212d7":y.value,"1f5369d4":d.selectColor,"22b98ab8":k.value}));const v=d,c=e.computed(()=>v.inputColor),k=e.computed(()=>v.background),y=e.computed(()=>`${v.selectColor}33`),$=e.computed(()=>v.borderColor),T=M;function p(){T("reset")}const B=e.computed(()=>{const b=v.max-v.min,m=0,C=(v.value-v.min)/b*100;return{left:`${m}%`,width:`${C-m}%`,background:v.selectColor}});return(b,m)=>(e.openBlock(),e.createElementBlock("div",Ve,[d.value!==d.source?(e.openBlock(),e.createElementBlock("div",Ee,[d.useResetSlot?e.renderSlot(b.$slots,"reset-action",{key:1,reset:p},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:p},[e.createVNode(Pe.default,{name:"refresh",stroke:d.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",Me)),e.createElementVNode("div",_e,[m[1]||(m[1]=e.createElementVNode("div",{class:"slider-track"},null,-1)),e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(B.value)},null,4),e.createElementVNode("input",{type:"range",min:d.min,max:d.max,value:Number(d.value),onInput:m[0]||(m[0]=C=>T("update:value",Number(C.target.value)))},null,40,Ie)])]))}},qe=ce._export_sfc(Re,[["__scopeId","data-v-b4e6aee9"]]),Ue=["id"],We=["xmlns","viewBox"],De=["width","height"],Ge=["transform"],Le=["fill","font-weight","x","y","font-size","transform","onMouseover"],je={key:4,class:"vue-data-ui-watermark"},He=["innerHTML"],Xe={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(d,{expose:M}){const{vue_ui_word_cloud:v}=s.useConfig(),c=d,k=e.computed({get(){return!!c.dataset&&c.dataset.length},set(o){return o}}),y=e.ref(typeof c.dataset=="string"?s.createWordCloudDatasetFromPlainText(c.dataset):c.dataset.map((o,a)=>({...o,value:s.checkNaN(o.value)}))),$=e.ref(s.createUid()),T=e.ref(0),p=e.ref(null),B=e.ref(null),b=e.ref(null),m=e.ref(0),C=e.ref(0),_=e.ref(!1),t=e.computed({get:()=>J(),set:o=>o}),{userOptionsVisible:I,setUserOptionsVisibility:X,keepUserOptionState:Y}=Ae.useUserOptionState({config:t.value}),{svgRef:de}=Oe.useChartAccessibility({config:t.value.style.chart.title});function J(){const o=ie.useNestedProp({userConfig:c.config,defaultConfig:v});return o.theme?{...ie.useNestedProp({userConfig:s.themes.vue_ui_word_cloud[o.theme]||c.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>c.config,o=>{t.value=J(),I.value=!t.value.userOptions.showOnChartHover,Q(),m.value+=1,C.value+=1,R(),i.value.showTable=t.value.table.show,i.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const K=e.ref(null),w=e.ref(0),r=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),ve=H.throttle(()=>{const{width:o,height:a}=H.useResponsive({chart:p.value,title:t.value.style.chart.title.text?B.value:null,slicer:t.value.style.chart.zoom.show&&K.value,source:b.value});requestAnimationFrame(()=>{r.value.width=o,r.value.height=a,e.nextTick(U)})});e.watch(()=>w.value,()=>{he()});const he=H.debounce(()=>{U()},10);function R(){w.value=q.value}const F=e.ref(null);e.onMounted(()=>{Q(),R()});function Q(){s.objectIsEmpty(c.dataset)?s.error({componentName:"VueUiWordCloud",type:"dataset"}):y.value.forEach((o,a)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{k.value=!1,s.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(F.value=new ResizeObserver(ve),F.value.observe(p.value.parentNode))}e.onBeforeUnmount(()=>{F.value&&F.value.disconnect()});const{isPrinting:Z,isImaging:ee,generatePdf:te,generateImage:oe}=ue.usePrinter({elementId:`wordCloud_${$.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),i=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function me(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function pe(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function fe(o,a,l){const u=[],n={x:-a/2,y:-l/2,width:a,height:l},h=0,f=0;return o.forEach(S=>{let L=!1;for(let E=0;E<Math.max(a,l)/2&&!L;E+=t.value.style.chart.words.packingWeight)for(let j=0;j<360&&!L;j+=t.value.style.chart.words.packingWeight){const se=j*Math.PI/180,ke=h+E*Math.cos(se)-S.width/2,Ce=f+E*Math.sin(se)-S.height/2,g={...S,x:ke,y:Ce},we=g.x>=n.x&&g.y>=n.y&&g.x+g.width<=n.x+n.width&&g.y+g.height<=n.y+n.height,xe=u.some(Se=>pe(g,Se));we&&!xe&&(u.push(g),L=!0)}}),u}const N=e.ref([]);e.watch(()=>c.dataset,U,{immediate:!0});const q=e.computed(()=>Math.round(Math.min(...y.value.map(o=>o.value)))),le=e.computed(()=>Math.round(Math.max(...y.value.map(o=>o.value))));function U(){const o=[...y.value].filter(n=>n.value>=w.value).map(n=>n.value),a=Math.max(...o),l=Math.min(...o),u=[...y.value].filter(n=>n.value>=w.value).map((n,h)=>{let f=(n.value-l)/(a-l)*(r.value.maxFontSize-r.value.minFontSize)+r.value.minFontSize;f=isNaN(f)?r.value.minFontSize:f;const S=me(n.name,f);return{...n,id:s.createUid(),fontSize:f,width:S.width,height:S.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[h]||t.value.customPalette[h%t.value.customPalette.length]||s.palette[h]||s.palette[h%s.palette.length]:t.value.style.chart.words.color}});N.value=fe(u,r.value.width,r.value.height).sort((n,h)=>h.fontSize-n.fontSize)}const z=e.computed(()=>{const o=N.value.map(l=>({name:l.name,color:l.color})),a=N.value.map(l=>l.value);return{head:o,body:a}});function ae(){e.nextTick(()=>{const o=z.value.head.map((u,n)=>[[u.name],[z.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const A=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=z.value.head.map((n,h)=>{const f=s.dataLabel({p:t.value.table.td.prefix,v:z.value.body[h],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},f]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}}),O=e.ref(!1);function ge(o){O.value=o,T.value+=1}function ye(){return N.value}function ne(){i.value.showTable=!i.value.showTable}function re(){i.value.showTooltip=!i.value.showTooltip}const V=e.ref(!1);function W(){V.value=!V.value}M({getData:ye,generateCsv:ae,generatePdf:te,generateImage:oe,toggleTable:ne,toggleTooltip:re,toggleAnnotator:W});const x=e.ref(null),P=e.ref(!1),D=e.ref(""),G=e.ref(null);function be(o){if(!i.value.showTooltip)return;x.value=o.id,G.value={datapoint:o,config:t.value};const a=t.value.style.chart.tooltip.customFormat;if(P.value=!1,s.isFunction(a))try{const l=a({datapoint:o,config:t.value});typeof l=="string"&&(D.value=l,P.value=!0)}catch{console.warn("Custom format cannot be applied."),P.value=!1}if(!P.value){let l=`<svg viewBox="0 0 10 10" height="${t.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${o.color}"/></svg><span>${o.name}:</span><b>${(o.value||0).toFixed(t.value.style.chart.tooltip.roundingValue)}</b>`;D.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}_.value=!0}return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:p,id:`wordCloud_${$.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:a[3]||(a[3]=()=>e.unref(X)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ze.PenAndPaper,{key:0,parent:p.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:V.value,onClose:W},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:B,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock($e._sfc_main,{key:`title_${m.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value&&(e.unref(Y)||e.unref(I))?(e.openBlock(),e.createBlock(ue.UserOptions,{ref:"details",key:`user_option_${T.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(ee),uid:$.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:O.value,titles:{...t.value.userOptions.buttonTitles},chartElement:p.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:i.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:V.value,onToggleFullscreen:ge,onGeneratePdf:e.unref(te),onGenerateCsv:ae,onGenerateImage:e.unref(oe),onToggleTable:ne,onToggleTooltip:re,onToggleAnnotator:W,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(I)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:u})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:u})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:de,class:e.normalizeClass({"vue-data-ui-fullscreen--on":O.value,"vue-data-ui-fulscreen--off":!O.value}),xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:"overflow:visible;background:transparent;"},[e.createVNode(Be._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width<=0?10:r.value.width,height:r.value.height<=0?10:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,De)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(r.value.width<=0?10:r.value.width)/2}, ${(r.value.height<=0?10:r.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,u)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:u,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":x.value&&x.value===l.id&&i.value.showTooltip,"word-not-selected":x.value&&x.value!==l.id&&i.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:n=>be(l),onMouseleave:a[0]||(a[0]=n=>{x.value=null,_.value=!1}),style:e.normalizeStyle(`animation-delay:${u*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,Le))]))),256))],8,Ge),e.renderSlot(o.$slots,"svg",{svg:{height:r.value.height,width:r.value.width}},void 0,!0)],10,We)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Z)||e.unref(ee)})),void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(Fe._sfc_main,{show:i.value.showTooltip&&_.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:p.value,content:D.value,isCustom:P.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartSlicer",ref:K,style:"width:100%;background:transparent","data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&q.value<le.value?(e.openBlock(),e.createBlock(qe,{key:0,value:w.value,"onUpdate:value":a[1]||(a[1]=l=>w.value=l),min:q.value,max:le.value,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:R},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","min","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"source",ref:b,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createBlock(Te.default,{key:6,hideDetails:"",config:{open:i.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ne.DataTable,{key:`table_${C.value}`,colNames:A.value.colNames,head:A.value.head,body:A.value.body,config:A.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=>i.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,He)]),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)],44,Ue))}},Ye=ce._export_sfc(Xe,[["__scopeId","data-v-09b6d459"]]);exports.default=Ye;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DD4PT0Pl.cjs"),$e=require("./Title-BQSh4ukk.cjs"),ue=require("./usePrinter-BtJq2wwh.cjs"),H=require("./useResponsive-YQYQrAZ_.cjs"),Te=require("./vue-ui-accordion-2He8z0Sy.cjs"),Ne=require("./DataTable-CaD8j-SL.cjs"),Pe=require("./BaseIcon-D326yPTV.cjs"),ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=require("./useNestedProp-DU7JFxpL.cjs"),Be=require("./PackageVersion-CCgJTyH9.cjs"),Fe=require("./Tooltip-DtqrGu-Q.cjs"),ze=require("./PenAndPaper-DvNBHCpq.cjs"),Ae=require("./useUserOptionState-BgepsfED.cjs"),Oe=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ve={"data-html2canvas-ignore":""},Ee={key:0,class:"reset-wrapper"},Me={key:1,class:"reset-wrapper"},_e={class:"mono-slicer"},Ie=["min","max","value"],Re={__name:"MonoSlicer",props:{min:{type:Number,default:0},max:{type:Number,default:0},inputColor:{type:String,default:"#1A1A1A"},background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},selectColor:{type:String,default:"#4A4A4A"},textColor:{type:String,default:"#1A1A1A"},useResetSlot:{type:Boolean,default:!1},value:{type:Number,default:0},source:{type:Number,default:0}},emits:["update:value","reset"],setup(d,{emit:M}){e.useCssVars(b=>({"782b8172":c.value,"102109e6":$.value,"642212d7":y.value,"1f5369d4":d.selectColor,"22b98ab8":k.value}));const v=d,c=e.computed(()=>v.inputColor),k=e.computed(()=>v.background),y=e.computed(()=>`${v.selectColor}33`),$=e.computed(()=>v.borderColor),T=M;function p(){T("reset")}const B=e.computed(()=>{const b=v.max-v.min,m=0,C=(v.value-v.min)/b*100;return{left:`${m}%`,width:`${C-m}%`,background:v.selectColor}});return(b,m)=>(e.openBlock(),e.createElementBlock("div",Ve,[d.value!==d.source?(e.openBlock(),e.createElementBlock("div",Ee,[d.useResetSlot?e.renderSlot(b.$slots,"reset-action",{key:1,reset:p},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:p},[e.createVNode(Pe.default,{name:"refresh",stroke:d.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",Me)),e.createElementVNode("div",_e,[m[1]||(m[1]=e.createElementVNode("div",{class:"slider-track"},null,-1)),e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(B.value)},null,4),e.createElementVNode("input",{type:"range",min:d.min,max:d.max,value:Number(d.value),onInput:m[0]||(m[0]=C=>T("update:value",Number(C.target.value)))},null,40,Ie)])]))}},qe=ce._export_sfc(Re,[["__scopeId","data-v-b4e6aee9"]]),Ue=["id"],We=["xmlns","viewBox"],De=["width","height"],Ge=["transform"],Le=["fill","font-weight","x","y","font-size","transform","onMouseover"],je={key:4,class:"vue-data-ui-watermark"},He=["innerHTML"],Xe={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(d,{expose:M}){const{vue_ui_word_cloud:v}=s.useConfig(),c=d,k=e.computed({get(){return!!c.dataset&&c.dataset.length},set(o){return o}}),y=e.ref(typeof c.dataset=="string"?s.createWordCloudDatasetFromPlainText(c.dataset):c.dataset.map((o,a)=>({...o,value:s.checkNaN(o.value)}))),$=e.ref(s.createUid()),T=e.ref(0),p=e.ref(null),B=e.ref(null),b=e.ref(null),m=e.ref(0),C=e.ref(0),_=e.ref(!1),t=e.computed({get:()=>J(),set:o=>o}),{userOptionsVisible:I,setUserOptionsVisibility:X,keepUserOptionState:Y}=Ae.useUserOptionState({config:t.value}),{svgRef:de}=Oe.useChartAccessibility({config:t.value.style.chart.title});function J(){const o=ie.useNestedProp({userConfig:c.config,defaultConfig:v});return o.theme?{...ie.useNestedProp({userConfig:s.themes.vue_ui_word_cloud[o.theme]||c.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>c.config,o=>{t.value=J(),I.value=!t.value.userOptions.showOnChartHover,Q(),m.value+=1,C.value+=1,R(),i.value.showTable=t.value.table.show,i.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const K=e.ref(null),w=e.ref(0),r=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),ve=H.throttle(()=>{const{width:o,height:a}=H.useResponsive({chart:p.value,title:t.value.style.chart.title.text?B.value:null,slicer:t.value.style.chart.zoom.show&&K.value,source:b.value});requestAnimationFrame(()=>{r.value.width=o,r.value.height=a,e.nextTick(U)})});e.watch(()=>w.value,()=>{he()});const he=H.debounce(()=>{U()},10);function R(){w.value=q.value}const F=e.ref(null);e.onMounted(()=>{Q(),R()});function Q(){s.objectIsEmpty(c.dataset)?s.error({componentName:"VueUiWordCloud",type:"dataset"}):y.value.forEach((o,a)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{k.value=!1,s.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(F.value=new ResizeObserver(ve),F.value.observe(p.value.parentNode))}e.onBeforeUnmount(()=>{F.value&&F.value.disconnect()});const{isPrinting:Z,isImaging:ee,generatePdf:te,generateImage:oe}=ue.usePrinter({elementId:`wordCloud_${$.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),i=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function me(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function pe(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function fe(o,a,l){const u=[],n={x:-a/2,y:-l/2,width:a,height:l},h=0,f=0;return o.forEach(S=>{let L=!1;for(let E=0;E<Math.max(a,l)/2&&!L;E+=t.value.style.chart.words.packingWeight)for(let j=0;j<360&&!L;j+=t.value.style.chart.words.packingWeight){const se=j*Math.PI/180,ke=h+E*Math.cos(se)-S.width/2,Ce=f+E*Math.sin(se)-S.height/2,g={...S,x:ke,y:Ce},we=g.x>=n.x&&g.y>=n.y&&g.x+g.width<=n.x+n.width&&g.y+g.height<=n.y+n.height,xe=u.some(Se=>pe(g,Se));we&&!xe&&(u.push(g),L=!0)}}),u}const N=e.ref([]);e.watch(()=>c.dataset,U,{immediate:!0});const q=e.computed(()=>Math.round(Math.min(...y.value.map(o=>o.value)))),le=e.computed(()=>Math.round(Math.max(...y.value.map(o=>o.value))));function U(){const o=[...y.value].filter(n=>n.value>=w.value).map(n=>n.value),a=Math.max(...o),l=Math.min(...o),u=[...y.value].filter(n=>n.value>=w.value).map((n,h)=>{let f=(n.value-l)/(a-l)*(r.value.maxFontSize-r.value.minFontSize)+r.value.minFontSize;f=isNaN(f)?r.value.minFontSize:f;const S=me(n.name,f);return{...n,id:s.createUid(),fontSize:f,width:S.width,height:S.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[h]||t.value.customPalette[h%t.value.customPalette.length]||s.palette[h]||s.palette[h%s.palette.length]:t.value.style.chart.words.color}});N.value=fe(u,r.value.width,r.value.height).sort((n,h)=>h.fontSize-n.fontSize)}const z=e.computed(()=>{const o=N.value.map(l=>({name:l.name,color:l.color})),a=N.value.map(l=>l.value);return{head:o,body:a}});function ae(){e.nextTick(()=>{const o=z.value.head.map((u,n)=>[[u.name],[z.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const A=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=z.value.head.map((n,h)=>{const f=s.dataLabel({p:t.value.table.td.prefix,v:z.value.body[h],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},f]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}}),O=e.ref(!1);function ge(o){O.value=o,T.value+=1}function ye(){return N.value}function ne(){i.value.showTable=!i.value.showTable}function re(){i.value.showTooltip=!i.value.showTooltip}const V=e.ref(!1);function W(){V.value=!V.value}M({getData:ye,generateCsv:ae,generatePdf:te,generateImage:oe,toggleTable:ne,toggleTooltip:re,toggleAnnotator:W});const x=e.ref(null),P=e.ref(!1),D=e.ref(""),G=e.ref(null);function be(o){if(!i.value.showTooltip)return;x.value=o.id,G.value={datapoint:o,config:t.value};const a=t.value.style.chart.tooltip.customFormat;if(P.value=!1,s.isFunction(a))try{const l=a({datapoint:o,config:t.value});typeof l=="string"&&(D.value=l,P.value=!0)}catch{console.warn("Custom format cannot be applied."),P.value=!1}if(!P.value){let l=`<svg viewBox="0 0 10 10" height="${t.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${o.color}"/></svg><span>${o.name}:</span><b>${(o.value||0).toFixed(t.value.style.chart.tooltip.roundingValue)}</b>`;D.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}_.value=!0}return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:p,id:`wordCloud_${$.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:a[3]||(a[3]=()=>e.unref(X)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ze.PenAndPaper,{key:0,parent:p.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:V.value,onClose:W},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:B,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock($e._sfc_main,{key:`title_${m.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value&&(e.unref(Y)||e.unref(I))?(e.openBlock(),e.createBlock(ue.UserOptions,{ref:"details",key:`user_option_${T.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(ee),uid:$.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:O.value,titles:{...t.value.userOptions.buttonTitles},chartElement:p.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:i.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:V.value,onToggleFullscreen:ge,onGeneratePdf:e.unref(te),onGenerateCsv:ae,onGenerateImage:e.unref(oe),onToggleTable:ne,onToggleTooltip:re,onToggleAnnotator:W,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(I)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:u})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:u})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:de,class:e.normalizeClass({"vue-data-ui-fullscreen--on":O.value,"vue-data-ui-fulscreen--off":!O.value}),xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:"overflow:visible;background:transparent;"},[e.createVNode(Be._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width<=0?10:r.value.width,height:r.value.height<=0?10:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,De)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(r.value.width<=0?10:r.value.width)/2}, ${(r.value.height<=0?10:r.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,u)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:u,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":x.value&&x.value===l.id&&i.value.showTooltip,"word-not-selected":x.value&&x.value!==l.id&&i.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:n=>be(l),onMouseleave:a[0]||(a[0]=n=>{x.value=null,_.value=!1}),style:e.normalizeStyle(`animation-delay:${u*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,Le))]))),256))],8,Ge),e.renderSlot(o.$slots,"svg",{svg:{height:r.value.height,width:r.value.width}},void 0,!0)],10,We)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Z)||e.unref(ee)})),void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(Fe._sfc_main,{show:i.value.showTooltip&&_.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:p.value,content:D.value,isCustom:P.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartSlicer",ref:K,style:"width:100%;background:transparent","data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&q.value<le.value?(e.openBlock(),e.createBlock(qe,{key:0,value:w.value,"onUpdate:value":a[1]||(a[1]=l=>w.value=l),min:q.value,max:le.value,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:R},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","min","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"source",ref:b,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createBlock(Te.default,{key:6,hideDetails:"",config:{open:i.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ne.DataTable,{key:`table_${C.value}`,colNames:A.value.colNames,head:A.value.head,body:A.value.body,config:A.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=>i.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,He)]),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)],44,Ue))}},Ye=ce._export_sfc(Xe,[["__scopeId","data-v-09b6d459"]]);exports.default=Ye;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { useCssVars as Ee, computed as y, createElementBlock as v, openBlock as r, createElementVNode as S, renderSlot as i, createVNode as ne, normalizeStyle as q, ref as n, watch as se, onMounted as Ge, onBeforeUnmount as Le, unref as d, createBlock as P, createCommentVNode as w, createSlots as Xe, withCtx as m, normalizeProps as M, guardReactiveProps as _, normalizeClass as ke, Fragment as je, renderList as qe, toDisplayString as we, createTextVNode as He, nextTick as $e } from "vue";
|
|
2
|
-
import { u as Ye, a4 as Je, v as Ke, c as xe, t as Qe, p as j, a as Ze, o as et, e as Te, g as tt, f as ot, X as at, q as lt, r as st, x as nt } from "./index-
|
|
3
|
-
import { _ as rt } from "./Title-
|
|
4
|
-
import { u as ut, U as it } from "./usePrinter-
|
|
2
|
+
import { u as Ye, a4 as Je, v as Ke, c as xe, t as Qe, p as j, a as Ze, o as et, e as Te, g as tt, f as ot, X as at, q as lt, r as st, x as nt } from "./index-CZlI7PiS.js";
|
|
3
|
+
import { _ as rt } from "./Title-DePxeqVl.js";
|
|
4
|
+
import { u as ut, U as it } from "./usePrinter-D-sSdR2l.js";
|
|
5
5
|
import { d as ct, t as dt, u as vt } from "./useResponsive-BWapHhVH.js";
|
|
6
|
-
import ht from "./vue-ui-accordion-
|
|
7
|
-
import { D as mt } from "./DataTable-
|
|
8
|
-
import ft from "./BaseIcon-
|
|
6
|
+
import ht from "./vue-ui-accordion-DVtmOO3I.js";
|
|
7
|
+
import { D as mt } from "./DataTable-D0-zzsJg.js";
|
|
8
|
+
import ft from "./BaseIcon-dThl5uNa.js";
|
|
9
9
|
import { _ as Fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
-
import { u as Se } from "./useNestedProp-
|
|
11
|
-
import { _ as pt } from "./PackageVersion-
|
|
12
|
-
import { _ as gt } from "./Tooltip-
|
|
13
|
-
import { P as yt } from "./PenAndPaper-
|
|
10
|
+
import { u as Se } from "./useNestedProp-Cg0NIwr6.js";
|
|
11
|
+
import { _ as pt } from "./PackageVersion-J_USnljf.js";
|
|
12
|
+
import { _ as gt } from "./Tooltip-DRw9RoFp.js";
|
|
13
|
+
import { P as yt } from "./PenAndPaper-CoEXEMcN.js";
|
|
14
14
|
import { u as bt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { u as Ct } from "./useChartAccessibility-BWojgys7.js";
|
|
16
16
|
const kt = { "data-html2canvas-ignore": "" }, wt = {
|