vue-data-ui 2.4.2 → 2.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/{Arrow-JuK2z9IB.js → Arrow-AxsI-FAh.js} +1 -1
- package/dist/{Arrow-DLTRnzcG.cjs → Arrow-W6XO2WVI.cjs} +1 -1
- package/dist/{BaseIcon-BGExhz6v.cjs → BaseIcon-BTn_oML7.cjs} +1 -1
- package/dist/{BaseIcon-rRli6Sfv.js → BaseIcon-BX3x6oa7.js} +1 -1
- package/dist/{DataTable-DTk7C4Pr.js → DataTable-BI1tjiA_.js} +2 -2
- package/dist/{DataTable-DJzhv96s.cjs → DataTable-RUQ1G_6L.cjs} +1 -1
- package/dist/{Legend-YZ7Hz3o1.cjs → Legend-B86sMXn7.cjs} +1 -1
- package/dist/{Legend-CYF2gpXG.js → Legend-CRMHjbGw.js} +1 -1
- package/dist/{PackageVersion-CvCRsT5_.js → PackageVersion-Clrfvyd8.js} +1 -1
- package/dist/{PackageVersion-DVZtsuy4.cjs → PackageVersion-CowXQ4IM.cjs} +1 -1
- package/dist/{PenAndPaper-Jb0pLt3G.js → PenAndPaper-BQzgk5kO.js} +2 -2
- package/dist/{PenAndPaper-CyXm-yVL.cjs → PenAndPaper-DBSxk9Xk.cjs} +1 -1
- package/dist/{Shape-BpPn4eWR.js → Shape-DYNtRer6.js} +1 -1
- package/dist/{Shape-X2F-QV_B.cjs → Shape-qK3MNdTg.cjs} +1 -1
- package/dist/{Slicer-CU7dRZR0.js → Slicer-DFPDip5U.js} +3 -3
- package/dist/{Slicer-CL0tP5a5.cjs → Slicer-NlxLkUso.cjs} +1 -1
- package/dist/{Title-5VmBwT4i.js → Title-710895ks.js} +1 -1
- package/dist/{Title-Co5jI5ed.cjs → Title-CUN1T6KC.cjs} +1 -1
- package/dist/{Tooltip-Bl6W8Zn7.cjs → Tooltip-BapDtYOM.cjs} +1 -1
- package/dist/{Tooltip-Cj4EF7v1.js → Tooltip-CPlG_yQU.js} +1 -1
- package/dist/index-CcykRspI.cjs +9 -0
- package/dist/{index-DnVHQ2xI.js → index-DCsPHn9C.js} +4 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +4 -1
- package/dist/types/vue-data-ui.d.ts +4 -1
- package/dist/{useNestedProp-Cox0K0Y5.js → useNestedProp-DdSlLeTW.js} +1 -1
- package/dist/{useNestedProp-q7byAAIJ.cjs → useNestedProp-XtPlFP9O.cjs} +1 -1
- package/dist/{usePrinter-BCAFeO_J.cjs → usePrinter-BcE45wW6.cjs} +1 -1
- package/dist/{usePrinter-BEeNAqS5.js → usePrinter-siG3sKWo.js} +1 -1
- package/dist/useResponsive-BJ7DTGpm.cjs +1 -0
- package/dist/useResponsive-CoxXLe23.js +189 -0
- package/dist/{vue-data-ui-CRLLZpt0.cjs → vue-data-ui-C0o1kZzC.cjs} +1 -1
- package/dist/{vue-data-ui-W7nnqn0v.js → vue-data-ui-D_MTGc8j.js} +58 -58
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BwBrUabe.js → vue-ui-3d-bar-BdzWvy4d.js} +41 -34
- package/dist/{vue-ui-3d-bar-bD_n6qL_.cjs → vue-ui-3d-bar-C298Bf3V.cjs} +2 -2
- package/dist/{vue-ui-accordion-xXgqfR2l.cjs → vue-ui-accordion-B7PTyFVk.cjs} +1 -1
- package/dist/{vue-ui-accordion-DspS4q3f.js → vue-ui-accordion-D4Er5Dy5.js} +3 -3
- package/dist/vue-ui-age-pyramid-BIcB5vtU.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-CxBvm3uM.js → vue-ui-age-pyramid-CHEdFQb7.js} +185 -168
- package/dist/{vue-ui-annotator-BOofWpzv.js → vue-ui-annotator-CqM_1HlB.js} +1 -1
- package/dist/{vue-ui-annotator-C6T5_7ZV.cjs → vue-ui-annotator-eGtZcHeb.cjs} +1 -1
- package/dist/{vue-ui-bullet-DraC-oFu.js → vue-ui-bullet-DBk50kIe.js} +195 -158
- package/dist/vue-ui-bullet-DURgZGgp.cjs +34 -0
- package/dist/{vue-ui-candlestick-DQZ5eT1f.js → vue-ui-candlestick-Bo41qkGe.js} +263 -246
- package/dist/vue-ui-candlestick-CP4Z-29b.cjs +2 -0
- package/dist/{vue-ui-carousel-table-PdLjpH1p.js → vue-ui-carousel-table-CkNOqa9q.js} +76 -69
- package/dist/vue-ui-carousel-table-lMqx64wd.cjs +1 -0
- package/dist/{vue-ui-chestnut-ByI_O5hB.js → vue-ui-chestnut-CNWq-epB.js} +299 -286
- package/dist/vue-ui-chestnut-qxzF2ND7.cjs +6 -0
- package/dist/{vue-ui-cursor-BM74l93B.js → vue-ui-cursor-B4m30Gqz.js} +2 -2
- package/dist/{vue-ui-cursor-BvadpA2m.cjs → vue-ui-cursor-BEv39HVY.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CoANBhAM.js → vue-ui-dashboard-BL9IgDDx.js} +2 -2
- package/dist/{vue-ui-dashboard-OP51Gs8I.cjs → vue-ui-dashboard-DnoXstlp.cjs} +1 -1
- package/dist/{vue-ui-digits-DioaBnkB.js → vue-ui-digits-CVPDJ6tl.js} +2 -2
- package/dist/{vue-ui-digits-C7jJJg9k.cjs → vue-ui-digits-D1RaU4V-.cjs} +1 -1
- package/dist/{vue-ui-donut-ldqSm_JV.js → vue-ui-donut-C65SAJKb.js} +374 -357
- package/dist/vue-ui-donut-CMC92CXL.cjs +1 -0
- package/dist/vue-ui-donut-evolution-7gIM4bVk.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-DAb1xzNd.js → vue-ui-donut-evolution-BFbBlmBx.js} +240 -226
- package/dist/{vue-ui-dumbbell-Dg7PkiKJ.js → vue-ui-dumbbell-BnxRfvv0.js} +227 -210
- package/dist/vue-ui-dumbbell-OCo67ZKp.cjs +9 -0
- package/dist/vue-ui-flow-BPnpYrzb.cjs +1 -0
- package/dist/{vue-ui-flow-DKT7ZEnr.js → vue-ui-flow-Cra_F-tK.js} +150 -137
- package/dist/vue-ui-galaxy-3zTk9Pr1.cjs +1 -0
- package/dist/{vue-ui-galaxy-qAA9be3S.js → vue-ui-galaxy-DlJ7v0aD.js} +145 -132
- package/dist/{vue-ui-gauge-D8yVTIgP.js → vue-ui-gauge-CsqVvNxE.js} +210 -193
- package/dist/vue-ui-gauge-DcUNJZI1.cjs +1 -0
- package/dist/{vue-ui-gizmo-W6bTkg59.cjs → vue-ui-gizmo-BkkLoCyx.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DC0uUwI3.js → vue-ui-gizmo-Peyy8li7.js} +3 -3
- package/dist/vue-ui-heatmap-DYb831An.cjs +1 -0
- package/dist/{vue-ui-heatmap-u1raIzBQ.js → vue-ui-heatmap-i4HFM04D.js} +203 -189
- package/dist/{vue-ui-kpi-DY_2WF7U.cjs → vue-ui-kpi-CCrdcv3r.cjs} +1 -1
- package/dist/{vue-ui-kpi-C-iTxMD2.js → vue-ui-kpi-gSKVVqZg.js} +3 -3
- package/dist/{vue-ui-mini-loader-Bfq2MNWu.cjs → vue-ui-mini-loader-CqutMcQI.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-C7x7S0hi.js → vue-ui-mini-loader-D7Jk1LJb.js} +2 -2
- package/dist/{vue-ui-molecule-BFnOIxxs.js → vue-ui-molecule-CgdepnhM.js} +164 -151
- package/dist/vue-ui-molecule-CwUObXAx.cjs +1 -0
- package/dist/{vue-ui-mood-radar-CR1v5v2x.js → vue-ui-mood-radar-Bxro4962.js} +217 -203
- package/dist/vue-ui-mood-radar-RQFKS7Br.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-DEiloQzq.js → vue-ui-nested-donuts-B7dXBejH.js} +342 -325
- package/dist/vue-ui-nested-donuts-D8ZGqIGC.cjs +17 -0
- package/dist/vue-ui-onion-Dtt0kw8E.cjs +5 -0
- package/dist/{vue-ui-onion-LsEhBe4x.js → vue-ui-onion-i52wztm0.js} +267 -250
- package/dist/vue-ui-parallel-coordinate-plot-DNK0BrBy.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-CTlIjJqG.js → vue-ui-parallel-coordinate-plot-DUssrm08.js} +241 -224
- package/dist/{vue-ui-quadrant-DKVVFufb.js → vue-ui-quadrant-BORPtgQO.js} +236 -219
- package/dist/vue-ui-quadrant-a_I5E71f.cjs +1 -0
- package/dist/vue-ui-quick-chart-BpPDfK78.cjs +15 -0
- package/dist/{vue-ui-quick-chart-8vJikiGH.js → vue-ui-quick-chart-yb1FzVdt.js} +469 -452
- package/dist/{vue-ui-radar-20QhOUer.js → vue-ui-radar-CoCbl19A.js} +198 -181
- package/dist/vue-ui-radar-DZMngiqq.cjs +1 -0
- package/dist/{vue-ui-rating-DRWJsve1.js → vue-ui-rating-D-zwuvLK.js} +2 -2
- package/dist/{vue-ui-rating-Bbzm5nUK.cjs → vue-ui-rating-nTJ8DDhG.cjs} +1 -1
- package/dist/vue-ui-relation-circle-CW9qozhJ.js +366 -0
- package/dist/vue-ui-relation-circle-Wj_yrVJc.cjs +1 -0
- package/dist/vue-ui-rings-BZaZIGEz.cjs +2 -0
- package/dist/{vue-ui-rings-DG8GCi3y.js → vue-ui-rings-Bx2GEh6d.js} +221 -204
- package/dist/{vue-ui-scatter-Hqu5-F2H.js → vue-ui-scatter-BARiPzro.js} +375 -358
- package/dist/vue-ui-scatter-C-i1NZgz.cjs +1 -0
- package/dist/{vue-ui-screenshot-cjiqbtLK.js → vue-ui-screenshot-CuiJqlfo.js} +1 -1
- package/dist/{vue-ui-screenshot-D8nxd5RV.cjs → vue-ui-screenshot-CwOoftGV.cjs} +1 -1
- package/dist/{vue-ui-skeleton-aZmkNzAe.js → vue-ui-skeleton-DNuwx6_y.js} +419 -379
- package/dist/vue-ui-skeleton-DpfJbsNA.cjs +41 -0
- package/dist/{vue-ui-smiley-ChNvxygm.js → vue-ui-smiley-BnX27B0k.js} +2 -2
- package/dist/{vue-ui-smiley-B1TA19Hv.cjs → vue-ui-smiley-DGE9NFBY.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CQxELQcf.js → vue-ui-spark-trend-CgCLrMox.js} +86 -79
- package/dist/vue-ui-spark-trend-aW-de-rX.cjs +1 -0
- package/dist/vue-ui-sparkbar-BLUXUlTY.cjs +1 -0
- package/dist/{vue-ui-sparkbar-0ixbKZzf.js → vue-ui-sparkbar-BXku33sq.js} +90 -83
- package/dist/{vue-ui-sparkgauge-pdYb7OwH.js → vue-ui-sparkgauge-Doi0iu0L.js} +57 -50
- package/dist/vue-ui-sparkgauge-RTiKvSMp.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-N69h2q0U.js → vue-ui-sparkhistogram-BnMvXlAP.js} +74 -67
- package/dist/vue-ui-sparkhistogram-C6AgJH1C.cjs +1 -0
- package/dist/{vue-ui-sparkline-2BKYZMOb.js → vue-ui-sparkline-DI7fq_MR.js} +134 -125
- package/dist/vue-ui-sparkline-DpVCQ6W9.cjs +1 -0
- package/dist/vue-ui-sparkstackbar-Bvuq2sLW.cjs +1 -0
- package/dist/{vue-ui-sparkstackbar-sh03cuOU.js → vue-ui-sparkstackbar-oNnE5z1C.js} +84 -77
- package/dist/{vue-ui-stackbar-B1si-1RM.js → vue-ui-stackbar-6g7b3yyu.js} +205 -196
- package/dist/{vue-ui-stackbar-Dy_saeSe.cjs → vue-ui-stackbar-aWJDGIKV.cjs} +2 -2
- package/dist/{vue-ui-strip-plot-BYn-QrTQ.js → vue-ui-strip-plot-BFM8HIM8.js} +265 -248
- package/dist/vue-ui-strip-plot-GdjjVxMN.cjs +1 -0
- package/dist/{vue-ui-table-DQORPCDJ.js → vue-ui-table-Cw4Yz-IE.js} +1 -1
- package/dist/{vue-ui-table-Ce4waJaj.cjs → vue-ui-table-XOPmDCOB.cjs} +1 -1
- package/dist/vue-ui-table-heatmap-Bh48bMuU.cjs +1 -0
- package/dist/{vue-ui-table-heatmap-Csp7Tx8N.js → vue-ui-table-heatmap-DeRCR8l6.js} +55 -48
- package/dist/vue-ui-table-sparkline-C25qj1w_.cjs +1 -0
- package/dist/{vue-ui-table-sparkline-DdwVrfUj.js → vue-ui-table-sparkline-w3H-od91.js} +88 -81
- package/dist/{vue-ui-thermometer-I6ZnlfAv.js → vue-ui-thermometer-BySEVhT8.js} +162 -149
- package/dist/vue-ui-thermometer-DZrusaGY.cjs +1 -0
- package/dist/{vue-ui-timer-COOXcn14.cjs → vue-ui-timer-1p6J6hTn.cjs} +1 -1
- package/dist/{vue-ui-timer-pi1SazTU.js → vue-ui-timer-BN-9a2lj.js} +6 -6
- package/dist/vue-ui-tiremarks-CvIJeWKE.cjs +1 -0
- package/dist/vue-ui-tiremarks-EzYdOMyf.js +317 -0
- package/dist/vue-ui-treemap-CzNOr1iR.cjs +1 -0
- package/dist/{vue-ui-treemap-3FNUlKxL.js → vue-ui-treemap-Da0f6vaF.js} +283 -266
- package/dist/vue-ui-vertical-bar-B9shdfqo.cjs +4 -0
- package/dist/vue-ui-vertical-bar-D1cBfu5p.js +869 -0
- package/dist/vue-ui-waffle-Cg-7Fazv.cjs +1 -0
- package/dist/{vue-ui-waffle-XecHJIc-.js → vue-ui-waffle-DM2LsEP7.js} +258 -241
- package/dist/vue-ui-wheel-B9cmixxi.js +299 -0
- package/dist/vue-ui-wheel-C-JukdTy.cjs +1 -0
- package/dist/vue-ui-word-cloud-BLMWYOPy.cjs +1 -0
- package/dist/{vue-ui-word-cloud-DnhXUn5x.js → vue-ui-word-cloud-Baz7RXN2.js} +192 -183
- package/dist/vue-ui-xy-BHeSkJQ3.cjs +3 -0
- package/dist/{vue-ui-xy-CqlRuFMc.js → vue-ui-xy-DVnzVSqE.js} +339 -319
- package/dist/{vue-ui-xy-canvas-C8c2X5fk.js → vue-ui-xy-canvas-A7PKnWBs.js} +255 -246
- package/dist/vue-ui-xy-canvas-DAd-B98z.cjs +9 -0
- package/package.json +1 -1
- package/dist/index-FfZRtJ6A.cjs +0 -9
- package/dist/useResponsive-B3TrDDIG.cjs +0 -1
- package/dist/useResponsive-NZB-WLRF.js +0 -187
- package/dist/vue-ui-age-pyramid-BZcAwcVQ.cjs +0 -1
- package/dist/vue-ui-bullet-ChaEgXvR.cjs +0 -23
- package/dist/vue-ui-candlestick--hPCfMFH.cjs +0 -2
- package/dist/vue-ui-carousel-table-DpRQklDZ.cjs +0 -1
- package/dist/vue-ui-chestnut-ae6x87wl.cjs +0 -6
- package/dist/vue-ui-donut-CplNylps.cjs +0 -1
- package/dist/vue-ui-donut-evolution-CQpr-6IS.cjs +0 -1
- package/dist/vue-ui-dumbbell-_ijaYr8W.cjs +0 -9
- package/dist/vue-ui-flow-BPt35d5K.cjs +0 -1
- package/dist/vue-ui-galaxy-e06PkTmp.cjs +0 -1
- package/dist/vue-ui-gauge-DiZVIU0D.cjs +0 -1
- package/dist/vue-ui-heatmap-CbZcv_2I.cjs +0 -1
- package/dist/vue-ui-molecule-CbKMLrDT.cjs +0 -1
- package/dist/vue-ui-mood-radar-6LmFXuiw.cjs +0 -1
- package/dist/vue-ui-nested-donuts-DS0fjiLi.cjs +0 -17
- package/dist/vue-ui-onion-CLvvu4Ku.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-BWg8OFqH.cjs +0 -8
- package/dist/vue-ui-quadrant-OM5J1mG3.cjs +0 -1
- package/dist/vue-ui-quick-chart-gG5Ar8-i.cjs +0 -15
- package/dist/vue-ui-radar-CAaHjDO7.cjs +0 -1
- package/dist/vue-ui-relation-circle-BoGAFXuS.cjs +0 -1
- package/dist/vue-ui-relation-circle-I45_Sk5l.js +0 -349
- package/dist/vue-ui-rings-B9WQ7S5m.cjs +0 -2
- package/dist/vue-ui-scatter-BZfg1YIN.cjs +0 -1
- package/dist/vue-ui-skeleton-Djv08J67.cjs +0 -41
- package/dist/vue-ui-spark-trend-BqrPr63O.cjs +0 -1
- package/dist/vue-ui-sparkbar-CrTEPTU5.cjs +0 -1
- package/dist/vue-ui-sparkgauge-BYxpe_WV.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-D21XDUH2.cjs +0 -1
- package/dist/vue-ui-sparkline-Cf4m-Fxo.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-dAS8XoJs.cjs +0 -1
- package/dist/vue-ui-strip-plot-D53LABpZ.cjs +0 -1
- package/dist/vue-ui-table-heatmap-EqHt-O7Y.cjs +0 -1
- package/dist/vue-ui-table-sparkline-DONmVOMh.cjs +0 -1
- package/dist/vue-ui-thermometer-hQBkMa7u.cjs +0 -1
- package/dist/vue-ui-tiremarks-hdNqoGyd.cjs +0 -1
- package/dist/vue-ui-tiremarks-vdPQYiDp.js +0 -303
- package/dist/vue-ui-treemap-Cv0TSFQa.cjs +0 -1
- package/dist/vue-ui-vertical-bar-C--Ma0Dw.cjs +0 -4
- package/dist/vue-ui-vertical-bar-DwxpB46q.js +0 -852
- package/dist/vue-ui-waffle-CKM0QyJN.cjs +0 -1
- package/dist/vue-ui-wheel-Bbih5sSL.js +0 -282
- package/dist/vue-ui-wheel-C0dJrzOJ.cjs +0 -1
- package/dist/vue-ui-word-cloud-Cfd2wxsT.cjs +0 -1
- package/dist/vue-ui-xy-BDpqVzAq.cjs +0 -3
- package/dist/vue-ui-xy-canvas-Cansjd3L.cjs +0 -9
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-FfZRtJ6A.cjs"),ye=require("./useResponsive-B3TrDDIG.cjs"),Se=require("./Title-Co5jI5ed.cjs"),me=require("./usePrinter-BCAFeO_J.cjs"),$e=require("./DataTable-DJzhv96s.cjs"),Ne=require("./Tooltip-Bl6W8Zn7.cjs"),Ee=require("./Legend-YZ7Hz3o1.cjs"),Le=require("./vue-ui-skeleton-Djv08J67.cjs"),Fe=require("./vue-ui-accordion-xXgqfR2l.cjs"),pe=require("./useNestedProp-q7byAAIJ.cjs"),Ve=require("./PackageVersion-DVZtsuy4.cjs"),ze=require("./PenAndPaper-CyXm-yVL.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=N=>(e.pushScopeId("data-v-e89705b6"),N=N(),e.popScopeId(),N),Xe=["id"],De=["xmlns","viewBox"],Me={key:0},Ye=["id"],Ae=["stop-color"],Ie=["offset","stop-color"],qe=["offset","stop-color"],Ge=["stop-color"],Re={key:1},je=["id","cx","cy"],He=["stop-color","stop-opacity"],Ue=["stop-color"],We=["id"],Je=["id"],Ke=Te(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Qe=["id"],Ze=["flood-color"],et=["id"],tt=["flood-color"],lt=["d","stroke","filter"],ot=["x1","y1","x2","y2","stroke","filter"],at=["cx","cy","r","fill","filter"],nt=["stroke","d"],rt=["d","fill","stroke","stroke-width","filter"],ut={key:0},st=["stroke","d"],it={key:0},ct=["d","stroke","stroke-width","filter"],dt=["d","fill","stroke","stroke-width","filter"],vt={key:1},ht=["cx","cy","r","fill","stroke","stroke-width"],ft=["cx","cy","r","stroke"],yt=["cx","cy","r","fill"],mt={key:0},pt=["d","fill","onMouseenter","onClick"],gt={key:1},kt=["cx","cy","r","fill"],bt=["x","y","fill","font-size"],wt=["x","y","fill","font-size"],Ct=["x","y","fill","font-size"],xt=["x","y","fill","font-size"],Bt=["filter"],_t={key:0},Pt=["x","y"],St={key:1},$t=["cx","cy","fill","stroke","filter","onClick"],Nt=["cx","cy","fill","stroke","filter","onClick"],Et=["text-anchor","x","y","fill","font-size","onClick"],Lt=["text-anchor","x","y","fill","font-size","onClick"],Ft=["text-anchor","x","y","fill","font-size","onClick"],Vt=["text-anchor","x","y","fill","font-size","onClick"],zt={key:2},Ot=["x","y","width"],Tt=["x","y","width"],Xt={key:4,class:"vue-data-ui-watermark"},Dt=["onClick"],Mt={key:0,style:{"font-variant-numeric":"tabular-nums"}},Yt={key:1},At=["innerHTML"],It={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(N,{expose:ge,emit:G}){const b=N,{vue_ui_donut:ke}=n.useConfig(),E=e.computed({get(){return!!b.dataset&&b.dataset.length},set(o){return o}}),S=e.ref(null),R=e.ref(null),j=e.ref(null),O=e.ref(null),H=e.ref(0),U=e.ref(0),W=e.ref(0);e.onMounted(()=>{J()}),e.onBeforeUnmount(()=>{O.value&&O.value.disconnect()});function J(){if(n.objectIsEmpty(b.dataset)?n.error({componentName:"VueUiDonut",type:"dataset"}):b.dataset.forEach((o,u)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{E.value=!1,n.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:l,index:u})})}),t.value.responsive){const o=ye.throttle(()=>{const{width:u,height:l}=ye.useResponsive({chart:S.value,title:t.value.style.chart.title.text?R.value:null,legend:t.value.style.chart.legend.show?j.value:null});r.value.width=u,r.value.height=l});O.value=new ResizeObserver(o),O.value.observe(S.value.parentNode)}}const f=e.ref(n.createUid()),be=e.ref(null),T=e.ref(!1),M=e.ref(""),p=e.ref(null),K=e.ref(0);function Q(){const o=pe.useNestedProp({userConfig:b.config,defaultConfig:ke});return o.theme?{...pe.useNestedProp({userConfig:n.themes.vue_ui_donut[o.theme]||b.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}const t=e.computed({get:()=>Q(),set:o=>o});e.watch(()=>b.config,o=>{t.value=Q(),J(),H.value+=1,U.value+=1,W.value+=1},{deep:!0});const{isPrinting:Z,isImaging:ee,generatePdf:te,generateImage:le}=me.usePrinter({elementId:`donut__${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut"}),oe=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),c=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),r=e.ref({height:360,width:512}),L=e.computed(()=>{const o=t.value.style.chart.layout.donut.strokeWidth/512,u=r.value.width*o,l=u>y.value?y.value:u;return l<24?24:l}),_=e.computed(()=>b.dataset.map((o,u)=>({name:o.name,color:n.convertColorToHex(o.color)||oe.value[u]||n.palette[u]||n.palette[u%n.palette.length],value:o.values.reduce((l,a)=>l+a,0),absoluteValues:o.values,comment:o.comment||""}))),g=e.ref(_.value);e.watch(()=>_.value,o=>g.value=o);function we(){return _.value.map(o=>({name:o.name,color:o.color,value:o.value}))}const w=e.ref([]),ae=e.ref(null),ne=e.ref(null),P=e.ref(!1);function re(o){const u=_.value.find((s,h)=>h===o);let a=g.value.find((s,h)=>h===o).value;if(w.value.includes(o)){let h=function(){a>s?(cancelAnimationFrame(ae.value),g.value=g.value.map((v,q)=>o===q?{...v,value:s}:v),P.value=!1):(P.value=!0,a+=s*.025,g.value=g.value.map((v,q)=>o===q?{...v,value:a}:v),ae.value=requestAnimationFrame(h))};w.value=w.value.filter(v=>v!==o);const s=u.value;h()}else if(w.value.length<_.value.length-1){let s=function(){a<.1?(cancelAnimationFrame(ne.value),w.value.push(o),g.value=g.value.map((h,v)=>o===v?{...h,value:0}:h),P.value=!1):(P.value=!0,a/=1.1,g.value=g.value.map((h,v)=>o===v?{...h,value:a}:h),ne.value=requestAnimationFrame(s))};s()}G("selectLegend",C.value.map(s=>({name:s.name,color:s.color,value:s.value})))}const C=e.computed(()=>(g.value.forEach((o,u)=>{if([null,void 0].includes(o.values))return{...o,values:[]}}),g.value.map((o,u)=>({...o,seriesIndex:u})).filter((o,u)=>!w.value.includes(u)))),ue=e.computed(()=>b.dataset.map((o,u)=>({name:o.name,color:n.convertColorToHex(o.color)||oe.value[u]||n.palette[u]||n.palette[u%n.palette.length],value:(o.values||[]).reduce((l,a)=>l+a,0),shape:"circle"})).map((o,u)=>({...o,proportion:o.value/b.dataset.map(l=>(l.values||[]).reduce((a,s)=>a+s,0)).reduce((l,a)=>l+a,0),opacity:w.value.includes(u)?.5:1,segregate:()=>re(u),isSegregated:w.value.includes(u)}))),Ce=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),y=e.computed(()=>{const o=Math.min(r.value.width/3,r.value.height/3);return o<55?55:o}),d=e.computed(()=>n.makeDonut({series:C.value},r.value.width/2,r.value.height/2,y.value,y.value,1.99999,2,1,360,105.25,L.value)),i=e.computed(()=>{const o=Math.max(...C.value.map(l=>l.value)),u=C.value.map(l=>l.value/o);return n.createPolarAreas({series:u,center:{x:r.value.width/2,y:r.value.height/2},maxRadius:Math.min(r.value.width,r.value.height)/3})});function $(o){return o.x>r.value.width/2+6?"start":o.x<r.value.width/2-6?"end":"middle"}function xe(o){return o.middlePoint.y>r.value.height/2?n.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:100,centerX:r.value.width/2,centerY:r.value.height/2}).y:n.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:0,centerX:r.value.width/2,centerY:r.value.height/2}).y-100}function k(o){return o.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function Y(o,u){const l=o.value/Be(u);return isNaN(l)?0:n.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,l*100,n.dataLabel({v:l*100,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding}),{datapoint:o})}function Be(o){return[...o].map(u=>u.value).reduce((u,l)=>u+l,0)}const m=e.computed(()=>C.value.map(o=>o.value).reduce((o,u)=>o+u,0)),se=e.computed(()=>m.value/C.value.length),A=e.ref(null),F=e.ref(!1);function ie({datapoint:o,relativeIndex:u,seriesIndex:l,show:a=!1}){A.value={datapoint:o,seriesIndex:l,config:t.value,series:_.value},T.value=a,p.value=u;let s="";const h=t.value.style.chart.tooltip.customFormat;if(F.value=!1,n.isFunction(h))try{const v=h({seriesIndex:l,datapoint:o,series:_.value,config:t.value});typeof v=="string"&&(M.value=v,F.value=!0)}catch{console.warn("Custom format cannot be applied."),F.value=!1}if(!F.value){if(s+=`<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>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.value.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,relativeIndex:u,seriesIndex:l})}</b>`),t.value.style.chart.tooltip.showPercentage){const v=n.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,o.proportion*100,n.dataLabel({v:o.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}),{datapoint:o,relativeIndex:u,seriesIndex:l});t.value.style.chart.tooltip.showValue?s+=`<span>(${v})</span></div>`:s+=`<b>${v}</b></div>`}t.value.style.chart.comments.showInTooltip&&o.comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${o.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${o.color}">${o.comment}</div>`),M.value=`<div>${s}</div>`}}function V(o){return t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==o?`url(#blur_${f.value})`:""}const x=e.computed(()=>{const o=C.value.map(l=>({name:l.name,color:l.color})),u=C.value.map(l=>l.value);return{head:o,body:u}});function ce(){e.nextTick(()=>{const o=x.value.head.map((a,s)=>[[a.name],[x.value.body[s]],[isNaN(x.value.body[s]/m.value)?"-":x.value.body[s]/m.value*100]]),u=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=n.createCsvContent(u);n.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const X=e.computed(()=>{const o=[' <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.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:m.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],u=x.value.head.map((s,h)=>{const v=n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:x.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},v,isNaN(x.value.body[h]/m.value)?"-":(x.value.body[h]/m.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:o,body:u,config:l}}),z=e.ref(!1);function _e(o){z.value=o,K.value+=1}const de=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Pe(o){return o.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(u=>"-").join("")}function B(o,u){G("selectDatapoint",{datapoint:o,index:u})}function ve(){c.value.showTable=!c.value.showTable}function he(){c.value.dataLabels.show=!c.value.dataLabels.show}function fe(){c.value.showTooltip=!c.value.showTooltip}const D=e.ref(!1);function I(){D.value=!D.value}return ge({getData:we,generatePdf:te,generateCsv:ce,generateImage:le,toggleTable:ve,toggleLabels:he,toggleTooltip:fe,toggleAnnotator:I}),(o,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:S,class:e.normalizeClass(`vue-ui-donut ${z.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height:100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`donut__${f.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ze.PenAndPaper,{key:0,parent:S.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:D.value,onClose:I},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"userConfig",{},void 0,!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:R,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(Se._sfc_main,{key:`title_${H.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&E.value?(e.openBlock(),e.createBlock(me.UserOptions,{ref_key:"details",ref:be,key:`user_option_${K.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(ee),uid:f.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:z.value,chartElement:S.value,position:t.value.userOptions.position,isTooltip:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:D.value,onToggleFullscreen:_e,onGeneratePdf:e.unref(te),onGenerateCsv:ce,onGenerateImage:e.unref(le),onToggleTable:ve,onToggleLabels:he,onToggleTooltip:fe,onToggleAnnotator:I},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:a})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:a})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:a})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:a})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":z.value,"vue-data-ui-fulscreen--off":!z.value}),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ve._sfc_main),t.value.type==="classic"?(e.openBlock(),e.createElementBlock("defs",Me,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${f.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,Ae),e.createElementVNode("stop",{offset:`${(1-L.value/y.value)*100}%`,"stop-color":e.unref(n.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,Ie),e.createElementVNode("stop",{offset:`${(1-L.value/y.value/2)*100}%`,"stop-color":e.unref(n.setOpacity)("#FFFFFF",t.value.style.chart.gradientIntensity)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,Ge)],8,Ye)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock("defs",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,a)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`polar_gradient_${a}_${f.value}`,cx:l.middlePoint.x/r.value.width*100+"%",cy:l.middlePoint.y/r.value.height*100+"%",r:"62%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.shiftHue)(d.value[a].color,.05),"stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,He),e.createElementVNode("stop",{offset:"100%","stop-color":d.value[a].color},null,8,Ue)],8,je))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${f.value}`},null,8,Je),Ke],8,We),e.createElementVNode("filter",{id:`shadow_${f.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Ze)],8,Qe),e.createElementVNode("filter",{id:`drop_shadow_${f.value}`,"color-interpolation-filters":"sRGB",x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"3","flood-opacity":"1","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,tt)],8,et)]),t.value.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(n.calcNutArrowPath)(l,{x:r.value.width/2,y:r.value.height/2},16,16,!1,!1,L.value),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:V(a)},null,8,lt)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).x,y1:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).y,x2:i.value[a].middlePoint.x,y2:i.value[a].middlePoint.y,stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:V(a)},null,8,ot)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock("circle",{key:4,cx:r.value.width/2,cy:r.value.height/2,r:y.value<=0?10:y.value,fill:t.value.style.chart.backgroundColor,filter:t.value.style.chart.layout.donut.useShadow?`url(#shadow_${f.value})`:""},null,8,at)):e.createCommentVNode("",!0),m.value&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:l.arcSlice,fill:"#FFFFFF"},null,8,nt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:e.unref(n.setOpacity)(l.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:V(a)},null,8,rt))),256))],64)):e.createCommentVNode("",!0),m.value&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[d.value.length>1?(e.openBlock(),e.createElementBlock("g",ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:i.value[a].path,fill:"#FFFFFF"},null,8,st))),256)),t.value.style.chart.layout.donut.useShadow?(e.openBlock(),e.createElementBlock("g",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:"transparent",stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:`url(#drop_shadow_${f.value})`},null,8,ct))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:t.value.style.chart.useGradient?`url(#polar_gradient_${a}_${f.value})`:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:V(a)},null,8,dt))),256))])):(e.openBlock(),e.createElementBlock("g",vt,[e.createElementVNode("circle",{cx:r.value.width/2,cy:r.value.height/2,r:y.value,fill:t.value.style.chart.useGradient?`url(#polar_gradient_0_${f.value})`:d.value[0].color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth},null,8,ht)]))],64)):(e.openBlock(),e.createElementBlock("circle",{key:7,cx:r.value.width/2,cy:r.value.height/2,r:y.value<=0?10:y.value,fill:"transparent",stroke:t.value.style.chart.backgroundColor},null,8,ft)),t.value.style.chart.useGradient&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("circle",{key:8,cx:r.value.width/2,cy:r.value.height/2,r:y.value<=0?10:y.value,fill:`url(#gradient_${f.value})`},null,8,yt)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:9},[d.value.length>1||t.value.type==="classic"?(e.openBlock(),e.createElementBlock("g",mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{"data-cy-donut-trap":"",d:t.value.type==="classic"?l.arcSlice:i.value[a].path,fill:p.value===a?"rgba(0,0,0,0.1)":"transparent",onMouseenter:s=>ie({datapoint:l,relativeIndex:a,seriesIndex:l.seriesIndex,show:!0}),onMouseleave:u[0]||(u[0]=s=>{T.value=!1,p.value=null}),onClick:s=>B(l,a)},null,40,pt))),256))])):(e.openBlock(),e.createElementBlock("g",gt,[e.createElementVNode("circle",{cx:r.value.width/2,cy:r.value.height/2,r:y.value,fill:p.value===o.i?"rgba(0,0,0,0.1)":"transparent","data-cy-donut-trap":"",onMouseenter:u[1]||(u[1]=l=>ie({datapoint:d.value[0],relativeIndex:0,seriesIndex:d.value[0].seriesIndex,show:!0})),onMouseleave:u[2]||(u[2]=l=>{T.value=!1,p.value=null}),onClick:u[3]||(u[3]=l=>B(d.value[0],o.i))},null,40,kt)]))],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.color,"font-size":t.value.style.chart.layout.labels.hollow.total.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.total.text),13,bt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2+t.value.style.chart.layout.labels.hollow.total.fontSize-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.value.color,"font-size":t.value.style.chart.layout.labels.hollow.total.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.hollow.total.value.formatter,m.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.hollow.total.value.prefix,v:m.value,s:t.value.style.chart.layout.labels.hollow.total.value.suffix}))),13,wt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.color,"font-size":t.value.style.chart.layout.labels.hollow.average.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.average.text),13,Ct)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.fontSize+t.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.value.color,"font-size":t.value.style.chart.layout.labels.hollow.average.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},e.toDisplayString(P.value?"--":e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.hollow.average.value.formatter,se.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.hollow.average.value.prefix,v:se.value,s:t.value.style.chart.layout.labels.hollow.average.value.suffix,r:t.value.style.chart.layout.labels.hollow.average.value.rounding}))),13,xt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",{filter:V(a),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",_t,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(n.calcMarkerOffsetX)(l).x-120:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(n.calcMarkerOffsetX)(l).x-60:e.unref(n.calcMarkerOffsetX)(l).x,y:e.unref(n.calcMarkerOffsetY)(l)-(de.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"dataLabel",e.normalizeProps(e.guardReactiveProps({datapoint:l,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a,isSafari:de.value,isVisible:k(l)&&c.value.dataLabels.show,textAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16).anchor,percentage:Y(l,d.value)})),void 0,!0)])],8,Pt))])):(e.openBlock(),e.createElementBlock("g",St,[t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(n.calcMarkerOffsetX)(l).x,cy:e.unref(n.calcMarkerOffsetY)(l)-3.5,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a?"":`url(#blur_${f.value})`,onClick:s=>B(l,a)},null,8,$t)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).x,cy:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).y,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a?"":`url(#blur_${f.value})`,onClick:s=>B(l,a)},null,8,Nt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":e.unref(n.calcMarkerOffsetX)(l,!0,12).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(n.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:s=>B(l,a)},e.toDisplayString(Y(l,d.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}),{datapoint:l})})`:""),13,Et)):e.createCommentVNode("",!0),k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(n.calcMarkerOffsetX)(l).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(n.calcMarkerOffsetY)(l)+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:s=>B(l,a)},e.toDisplayString(l.name),13,Lt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":$(i.value[a].middlePoint),x:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x,y:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).y,fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:s=>B(l,a)},e.toDisplayString(Y(l,d.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}),{datapoint:l})})`:""),13,Ft)):e.createCommentVNode("",!0),k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":$(i.value[a].middlePoint),x:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x,y:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).y+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:s=>B(l,a)},e.toDisplayString(l.name),13,Vt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])),c.value.dataLabels.show&&t.value.style.chart.comments.show&&l.comment?(e.openBlock(),e.createElementBlock("g",zt,[k(l)&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(n.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(n.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width/2:e.unref(n.calcMarkerOffsetX)(l).x),y:e.unref(n.calcMarkerOffsetY)(l)+24+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"plot-comment",{plot:{...l,textAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16).anchor}},void 0,!0)])],8,Ot)):e.createCommentVNode("",!0),k(l)&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:t.value.style.chart.comments.offsetX+($(i.value[a].middlePoint)==="end"?e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x-t.value.style.chart.comments.width:$(i.value[a].middlePoint)==="middle"?e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x-t.value.style.chart.comments.width/2:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x),y:xe(i.value[a])+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"plot-comment",{plot:{...l,textAlign:$(i.value[a].middlePoint),flexAlign:$(i.value[a].middlePoint)}},void 0,!0)])],8,Tt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,Bt))),256)),e.renderSlot(o.$slots,"svg",{svg:r.value},void 0,!0)],14,De)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Xt,[e.renderSlot(o.$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(Le.default,{key:5,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:L.value*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:j},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ee.Legend,{key:`legend_${W.value}`,legendSet:ue.value,config:Ce.value,onClickMarker:u[4]||(u[4]=({i:l})=>re(l))},{item:e.withCtx(({legend:l,index:a})=>[e.createElementVNode("div",{onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${w.value.includes(a)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,index:a}))+" ",1),w.value.includes(a)?(e.openBlock(),e.createElementBlock("span",Yt," ( "+e.toDisplayString(Pe(l.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",Mt," ("+e.toDisplayString(isNaN(l.value/m.value)?"-":e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,P.value?l.proportion*100:l.value/m.value*100,e.unref(n.dataLabel)({v:P.value?l.proportion*100:l.value/m.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})))+") ",1))],12,Dt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:ue.value},void 0,!0)],512),e.createVNode(Ne._sfc_main,{show:c.value.showTooltip&&T.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:S.value,content:M.value,isCustom:F.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),E.value?(e.openBlock(),e.createBlock(Fe.default,{key:6,hideDetails:"",config:{open:c.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($e.DataTable,{key:`table_${U.value}`,colNames:X.value.colNames,head:X.value.head,body:X.value.body,config:X.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:u[5]||(u[5]=l=>c.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,At)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:isNaN(Number(l))?l.includes("%")?l:e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,l,e.unref(n.dataLabel)({v:l,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding})):e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}))),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Xe))}},qt=Oe._export_sfc(It,[["__scopeId","data-v-e89705b6"]]);exports.default=qt;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-FfZRtJ6A.cjs"),Be=require("./Title-Co5jI5ed.cjs"),ie=require("./usePrinter-BCAFeO_J.cjs"),Ce=require("./DataTable-DJzhv96s.cjs"),_e=require("./Legend-YZ7Hz3o1.cjs"),Ee=require("./vue-ui-skeleton-Djv08J67.cjs"),Ne=require("./Slicer-CL0tP5a5.cjs"),we=require("./vue-ui-accordion-xXgqfR2l.cjs"),de=require("./useNestedProp-q7byAAIJ.cjs"),Se=require("./PackageVersion-DVZtsuy4.cjs"),Le=require("./PenAndPaper-CyXm-yVL.cjs"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ae=["id"],$e=["xmlns","viewBox"],ze=["id"],Fe=["stop-color"],De=["stop-color"],Pe=["id"],Oe=["stop-color"],Te=["stop-color"],Ie=["stop-color"],Me={key:0},He=["x1","x2","y1","y2","stroke","stroke-width"],Re=["x1","x2","y1","y2","stroke","stroke-width"],qe={key:0},We=["x1","x2","y1","y2","stroke","stroke-width"],Ue=["x1","x2","y1","y2","stroke","stroke-width"],Xe=["x","y","font-size","fill","font-weight"],Ge=["text-anchor","font-size","fill","transform"],Ye=["x1","y1","x2","y2","stroke","stroke-width"],je={key:1},Ke=["cx","cy","r","fill"],Je={key:0},Qe={key:0},Ze=["d","stroke"],et=["text-anchor","x","y","fill"],tt=["cx","cy","r","fill"],lt={key:0},at=["cx","cy","fill"],ot={key:1},ut=["d","fill","stroke"],nt={key:2},rt=["d","fill","stroke"],st=["x","y","font-size","fill"],ct=["x","y","width","fill","onClick"],it=["x","y","width","height","onMouseenter","onClick"],dt={key:3,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},vt=["x","y","width","height","fill"],ht=["x1","y1","x2","y2","stroke"],yt=["x1","y2","x2","y1","stroke"],mt=["onKeypress","cx","cy","r"],ft=["d","stroke"],gt=["cx","cy","r","fill"],pt=["d","fill","stroke"],kt={class:"vue-ui-donut-evolution-focus"},bt=["text-anchor","x","y","fill"],xt=["cx","cy","r","fill"],Bt=["cx","cy","r","fill"],Ct=["x","y","fill"],_t=["x","y","font-size","fill"],Et={key:4,class:"vue-data-ui-watermark"},Nt=["onClick"],wt={key:0},St={key:1},Lt={key:0},Vt={key:1},At={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ve,{expose:he,emit:q}){const p=ve,{vue_ui_donut_evolution:ye}=n.useConfig(),A=e.computed(()=>!!p.dataset&&p.dataset.length),i=e.ref({start:0,end:Math.max(...p.dataset.map(a=>a.values.length))});function W(){i.value={start:0,end:L.value},G.value+=1}e.onMounted(()=>{U()});function U(){n.objectIsEmpty(p.dataset)?n.error({componentName:"VueUiDonutEvolution",type:"dataset"}):p.dataset.length&&p.dataset.forEach((a,c)=>{n.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","values"]}).forEach(l=>{n.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:c})})})}const _=e.ref(n.createUid()),y=e.ref([]),h=e.ref(null),D=e.ref(null),k=e.ref(!1),b=e.ref(null),P=e.ref(null),X=e.ref(0),G=e.ref(0),Y=e.ref(0),j=e.ref(0),K=e.ref(0),t=e.computed({get:()=>J(),set:a=>a});function J(){const a=de.useNestedProp({userConfig:p.config,defaultConfig:ye});return a.theme?{...de.useNestedProp({userConfig:n.themes.vue_ui_donut_evolution[a.theme]||p.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}e.watch(()=>p.config,a=>{t.value=J(),U(),Y.value+=1,j.value+=1,K.value+=1},{deep:!0}),e.watch(()=>p.dataset,a=>{W()},{deep:!0});const{isPrinting:Q,isImaging:Z,generatePdf:ee,generateImage:te}=ie.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution"}),me=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),$=e.ref({showTable:t.value.table.show}),u=e.computed(()=>({top:t.value.style.chart.layout.padding.top,right:t.value.style.chart.layout.padding.right,bottom:t.value.style.chart.layout.padding.bottom,left:t.value.style.chart.layout.padding.left})),s=e.computed(()=>{const a=t.value.style.chart.layout.height,c=t.value.style.chart.layout.width,l=a-u.value.top-u.value.bottom,r=c-u.value.left-u.value.right;return{absoluteHeight:a,absoluteWidth:c,centerX:u.value.left+r/2,centerY:u.value.top+l/2,height:l,width:r}}),C=e.computed(()=>(p.dataset.forEach((a,c)=>{[null,void 0].includes(a.name)&&n.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:c}),[null,void 0].includes(a.values)&&n.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:c})}),p.dataset.map((a,c)=>({...a,values:n.sanitizeArray(a.values),color:n.convertColorToHex(a.color)||me.value[c]||n.palette[c]||n.palette[c%n.palette.length],length:(a.values||[]).length,uid:n.createUid()})))),S=e.computed(()=>C.value.filter(a=>!y.value.includes(a.uid)).map(a=>({...a,values:a.values.filter((c,l)=>l>=i.value.start&&l<=i.value.end)}))),L=e.computed(()=>Math.max(...S.value.map(a=>a.length))),f=e.computed(()=>s.value.width/(i.value.end-i.value.start)),m=e.computed(()=>{const a=[];for(let o=0;o<i.value.end-i.value.start;o+=1){const v=S.value.map(B=>B.values[o]??null),d=v.filter(B=>[void 0,null].includes(B)).length===v.length,x=v.reduce((B,g)=>B+g,0),R=v.map(B=>B/x),w=u.value.left+f.value*o+f.value/2;a.push({index:o,percentages:R,subtotal:d||x<0?null:x,values:v,x:w})}const c=0,l=Math.max(...a.map(o=>o.subtotal)),r=a.length===1?l*2:l;return a.map((o,v)=>{const d=f.value/2*.7,x=d>s.value.width/16?s.value.width/16:d,R=h.value===o.index?s.value.width/16:x,w=a.length>4?d*2:d*2>f.value/2*.7?f.value/2*.7:d*2,B=s.value.absoluteHeight-u.value.bottom-s.value.height*o.subtotal/n.calculateNiceScale(c,r,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...o,y:B,radius:x,activeRadius:R,hoverRadius:w,donut:n.makeDonut({series:S.value.map((g,ce)=>({color:g.color,name:g.name,value:g.values[v]??0}))},o.x,B,x,x,1.99999,2,1,360,105.25,x/2),donutHover:n.makeDonut({series:S.value.map((g,ce)=>({color:g.color,name:g.name,value:g.values[v]??0}))},o.x,B,w,w,1.99999,2,1,360,105.25,w/2),donutFocus:n.makeDonut({series:S.value.map((g,ce)=>({color:g.color,name:g.name,value:g.values[v]??0}))},s.value.centerX,s.value.centerY,s.value.height/3.6,s.value.height/3.6,1.99999,2,1,360,105.25,s.value.height/6)}})});function z(a,c,l){return n.applyDataLabel(t.value.style.chart.layout.dataLabels.formatter,a,n.dataLabel({p:t.value.style.chart.layout.dataLabels.prefix,v:a,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.dataLabels.rounding}),{datapoint:c,index:l})}const O=e.computed(()=>({max:Math.max(...m.value.map(a=>a.subtotal)),min:0})),E=e.computed(()=>{const a=m.value.length===1?O.value.max*2:O.value.max;return n.calculateNiceScale(O.value.min,a,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function fe(a){return a/E.value.max}const ge=e.computed(()=>E.value.ticks.map(a=>({y:s.value.absoluteHeight-u.value.bottom-s.value.height*fe(a),value:a})));function le(a,c){return isNaN(a.value/n.sumByAttribute(c,"value"))?0:(a.value/n.sumByAttribute(c,"value")*100).toFixed(0)+"%"}function ae(){k.value||(h.value=null,D.value=null)}function pe(a){k.value||(h.value=a.index,D.value=a)}const T=e.ref(null);function I(a,c){a.subtotal&&(D.value=null,h.value=null,k.value=!0,b.value=a,[null,void 0].includes(c)||(T.value=c))}function oe(){b.value=null,k.value=!1,T.value=null}const ue=e.computed(()=>C.value.map((a,c)=>({name:a.name,value:a.values.slice(i.value.start,i.value.end).reduce((l,r)=>l+r,0),shape:"circle",uid:a.uid,color:a.color})).sort((a,c)=>c.value-a.value).map(a=>({...a,opacity:y.value.includes(a.uid)?.5:1,segregate:()=>M(a.uid),isSegregated:y.value.includes(a.uid)}))),ne=e.computed(()=>m.value.map(a=>a.subtotal).reduce((a,c)=>a+c,0)),ke=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function M(a){if(y.value.includes(a))y.value=y.value.filter(c=>c!==a),q("selectLegend",null);else{if(y.value.length===C.value.length-1)return;y.value.push(a),q("selectLegend",C.value.find(c=>c.uid===a))}b.value&&I(m.value.find((c,l)=>l===T.value))}const N=e.computed(()=>{const a=[""].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>({name:o.name,color:o.color}))).concat(["Σ"]);let c=[];for(let o=0;o<L.value;o+=1){const v=C.value.filter(d=>!y.value.includes(d.uid)).map(d=>d.values[o]??0).reduce((d,x)=>d+x,0);c.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[o]??"-"].concat(C.value.filter(d=>!y.value.includes(d.uid)).map(d=>({value:d.values[o]??0,percentage:d.values[o]?d.values[o]/v*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(v.toFixed(t.value.table.td.roundingValue))}${t.value.style.chart.layout.dataLabels.suffix}`]))}const 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},r=[t.value.table.columnNames.period].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>o.name)).concat(t.value.table.columnNames.total);return{head:a,body:c,config:l,colNames:r}});function be(){return C.value}function re(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],c=[...N.value.head.map(v=>v.name??v)],l=[...N.value.body.map(v=>v.map(d=>d.value??d))],r=a.concat([c]).concat(l),o=n.createCsvContent(r);n.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const V=e.ref(!1);function xe(a){V.value=a,X.value+=1}function se(){$.value.showTable=!$.value.showTable}const F=e.ref(!1);function H(){F.value=!F.value}return he({getData:be,generatePdf:ee,generateCsv:re,generateImage:te,toggleTable:se,toggleAnnotator:H}),(a,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:P,class:e.normalizeClass(`vue-ui-donut-evolution ${V.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:_.value},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Le.PenAndPaper,{key:0,parent:P.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),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,style:"width:100%;background:transparent;padding-bottom:24px",onMouseleave:ae},[(e.openBlock(),e.createBlock(Be._sfc_main,{key:`title_${Y.value}`,config:{title:{cy:"donut-evolution-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-evolution-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],32)):e.createCommentVNode("",!0),t.value.userOptions.show&&A.value?(e.openBlock(),e.createBlock(ie.UserOptions,{ref:"details",key:`user_options_${X.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Q),isImaging:e.unref(Z),uid:_.value,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:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:P.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:xe,onGeneratePdf:e.unref(ee),onGenerateCsv:re,onGenerateImage:e.unref(te),onToggleTable:se,onToggleAnnotator:H},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}: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:"4"}: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:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),A.value?(e.openBlock(),e.createElementBlock("svg",{key:3,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 ${s.value.absoluteWidth} ${s.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Se._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`hover_${_.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,t.value.style.chart.layout.highlighter.opacity)},null,8,Fe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity)},null,8,De)],8,ze),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,Oe),e.createElementVNode("stop",{offset:"77%","stop-color":e.unref(n.setOpacity)("#FFFFFF",30)},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(e.unref(n.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,Ie)],8,Pe)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Me,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+s.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,He),e.createElementVNode("line",{x1:u.value.left,x2:s.value.absoluteWidth-u.value.right,y1:s.value.absoluteHeight-u.value.bottom,y2:s.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Re),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.left+(r+1)*f.value,x2:u.value.left+(r+1)*f.value,y1:u.value.top,y2:s.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,We))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:1,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.left,x2:u.value.left-5,y1:l.y,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Ue)):e.createCommentVNode("",!0),l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:u.value.left-8+t.value.style.chart.layout.grid.yAxis.dataLabels.offsetX,y:l.y+t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize/3,"font-size":t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,"text-anchor":"end",fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.chart.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(e.unref(n.canShowValue)(l.value)?e.unref(n.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue}),{datapoint:l,seriesIndex:r}):""),9,Xe)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:2,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast&&(r===0||r===L.value-1)||!t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,fill:t.value.style.chart.layout.grid.xAxis.dataLabels.color,transform:`translate(${u.value.left+f.value*r+f.value/2}, ${t.value.style.chart.layout.grid.xAxis.dataLabels.offsetY+s.value.absoluteHeight-u.value.bottom+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2}), rotate(${t.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(r)+Number(i.value.start)]??""),9,Ge)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&r<m.value.length-1&&![l.subtotal,m.value[r+1].subtotal].includes(null)?(e.openBlock(),e.createElementBlock("line",{key:0,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value}),x1:l.x,y1:l.y,x2:m.value[r+1].x,y2:m.value[r+1].y,stroke:t.value.style.chart.layout.line.stroke,"stroke-width":t.value.style.chart.layout.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,10,Ye)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",je,[l.subtotal?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:l.activeRadius,fill:t.value.style.chart.backgroundColor},null,8,Ke)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":r!==h.value&&h.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",Je,[h.value!==null&&h.value===r?(e.openBlock(),e.createElementBlock("g",Qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,o=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:e.unref(n.calcNutArrowPath)(o,{x:o.center.endX,y:o.center.endY},12,12,{x:l.x,y:l.y},!0,20),stroke:o.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Ze)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{"data-cy-hover-label":"","text-anchor":e.unref(n.calcMarkerOffsetX)(o,!0,0).anchor,x:e.unref(n.calcMarkerOffsetX)(o,!0,3).x,y:e.unref(n.calcMarkerOffsetY)(o),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(o.name)+": "+e.toDisplayString(le(o,l.donut))+" ("+e.toDisplayString(o.value===null?"-":z(o.value,o,v))+") ",9,et)]))),256)),e.createElementVNode("g",null,[e.createElementVNode("circle",{cx:l.x,cy:l.y,r:l.hoverRadius,fill:t.value.style.chart.backgroundColor},null,8,tt)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":r!==h.value&&h.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",lt,[l.subtotal===0?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:3,fill:t.value.style.chart.color},null,8,at)):h.value!==null&&h.value===r?(e.openBlock(),e.createElementBlock("g",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,ut))),256))])):(e.openBlock(),e.createElementBlock("g",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,rt))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":r!==h.value&&h.value!==null||k.value})},[l.subtotal!==null&&t.value.style.chart.layout.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:l.x,y:h.value===l.index&&l.subtotal?l.y+t.value.style.chart.layout.dataLabels.fontSize/3:l.y-l.radius-t.value.style.chart.layout.dataLabels.fontSize+t.value.style.chart.layout.dataLabels.offsetY,"font-size":t.value.style.chart.layout.dataLabels.fontSize,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(z(l.subtotal,l,r)),9,st)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+r*f.value,y:s.value.absoluteHeight-u.value.bottom-10,width:f.value,height:10,fill:h.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:o=>I(l,r),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,10,ct))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{"data-cy-trap":"",x:u.value.left+r*f.value,y:u.value.top,width:f.value,height:s.value.height,fill:"transparent",onMouseenter:o=>pe(l),onMouseleave:ae,onClick:o=>I(l,r),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,42,it))),256)),k.value?(e.openBlock(),e.createElementBlock("g",dt,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:s.value.width,height:s.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,vt),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:s.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:s.value.absoluteWidth-u.value.right-4,y2:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,ht),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:s.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:s.value.absoluteWidth-u.value.right-4,y1:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,yt),e.createElementVNode("circle",{"data-cy-close":"",onClick:oe,onKeypress:e.withKeys(oe,["enter"]),cx:s.value.absoluteWidth-u.value.right-s.value.width/40,cy:u.value.top+s.value.height/30,r:s.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,mt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,l=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{"data-cy-zoom-donut":"",d:e.unref(n.calcNutArrowPath)(l,{x:s.value.centerX,y:s.value.centerY},12,12,!1,!1,15),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:"vue-ui-donut-evolution-focus"},null,8,ft)]))),256)),e.createElementVNode("circle",{cx:u.value.left+s.value.width/2,cy:u.value.top+s.value.height/2,r:s.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,gt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:`${l.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor,class:"vue-ui-donut-evolution-focus"},null,8,pt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,r)=>(e.openBlock(),e.createElementBlock("g",kt,[e.createElementVNode("text",{"text-anchor":e.unref(n.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,10).x,y:e.unref(n.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":10,"font-weight":"bold"},e.toDisplayString(l.name)+": "+e.toDisplayString(le(l,b.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":z(l.value,l,r))+") ",9,bt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+s.value.width/2,cy:u.value.top+s.value.height/2,r:s.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,xt),e.createElementVNode("circle",{cx:u.value.left+s.value.width/2,cy:u.value.top+s.value.height/2,r:s.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,Bt),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+s.value.width/2,y:u.value.top+s.value.height/2+14/3,"font-size":14,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color,class:"vue-ui-donut-evolution-focus"},e.toDisplayString(z(b.value.subtotal,b.value,null)),9,Ct),t.value.style.chart.layout.grid.xAxis.dataLabels.values[b.value.index]?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.value.left+6,y:u.value.top+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2,"font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*1.6,fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(b.value.index)+Number(i.value.start)]),9,_t)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:s.value},void 0,!0)],14,$e)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Et,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(Z)})),void 0,!0)])):e.createCommentVNode("",!0),A.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ee.default,{key:5,config:{type:"donutEvolution",style:{backgroundColor:t.value.style.chart.backgroundColor,donutEvolution:{axis:{color:"#CCCCCC"},donuts:{color:"#CCCCCC"}}}}},null,8,["config"])),L.value>1&&t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(Ne.Slicer,{key:`slicer_${G.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.start)]||"",labelRight:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.end)-1]||"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:L.value,min:0,valueStart:i.value.start,valueEnd:i.value.end,start:i.value.start,"onUpdate:start":c[0]||(c[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":c[1]||(c[1]=l=>i.value.end=l),onReset:W},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(a.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(_e.Legend,{key:`legend_${K.value}`,legendSet:ue.value,config:ke.value,onClickMarker:c[2]||(c[2]=({legend:l})=>M(l.uid))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>M(l.uid),style:e.normalizeStyle(`opacity:${y.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r}))+" ",1),y.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",St," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",wt," ("+e.toDisplayString(isNaN(l.value/ne.value)?"-":e.unref(n.dataLabel)({v:l.value/ne.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Nt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:ue.value},void 0,!0),A.value?(e.openBlock(),e.createBlock(we.default,{key:8,hideDetails:"",config:{open:$.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ce.DataTable,{key:`table_${j.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:c[3]||(c[3]=l=>$.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name??l),1)]),td:e.withCtx(({td:l})=>[l.value===null?(e.openBlock(),e.createElementBlock("span",Lt,"-")):(e.openBlock(),e.createElementBlock("b",Vt,e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.prefix)+e.toDisplayString(!isNaN(l.value)&&l.value!==null?Number(l.value.toFixed(t.value.table.td.roundingValue)).toLocaleString():l)+e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.suffix),1)),e.createElementVNode("span",null,e.toDisplayString(l.percentage&&!isNaN(l.percentage)?`(${Number(l.percentage.toFixed(t.value.table.td.roundingPercentage)).toLocaleString()}%)`:""),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ae))}},$t=Ve._export_sfc(At,[["__scopeId","data-v-aa1d86f3"]]);exports.default=$t;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-FfZRtJ6A.cjs"),U=require("./useResponsive-B3TrDDIG.cjs"),oe=require("./Title-Co5jI5ed.cjs"),j=require("./usePrinter-BCAFeO_J.cjs"),re=require("./DataTable-DJzhv96s.cjs"),se=require("./vue-ui-skeleton-Djv08J67.cjs"),ne=require("./Legend-YZ7Hz3o1.cjs"),ue=require("./vue-ui-accordion-xXgqfR2l.cjs"),Y=require("./useNestedProp-q7byAAIJ.cjs"),ce=require("./PackageVersion-DVZtsuy4.cjs"),ie=require("./PenAndPaper-CyXm-yVL.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],he=["xmlns","viewBox"],ye={key:0},fe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],me={key:1},be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],pe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ge={key:2},ke=["x","y","font-size","fill","font-weight"],_e=["x","y","font-size","fill"],xe={key:3},Ce=["x","y","font-size","fill","font-weight"],we=["id"],Be=["stop-color"],Ne=["stop-color"],Ee=["stop-color"],Le=["id"],$e=["stop-color"],Ve=["stop-color"],Se=["stop-color"],ze=["id"],Ae=["stop-color"],Pe=["stop-color"],Xe=["id"],Te=["stop-color"],De=["stop-color"],Fe={key:0},Me=["d","fill"],Ge={key:1},Ie=["x","y","height","width","fill"],Oe=["cx","cy","r","fill","stroke","stroke-width"],qe=["cx","cy","r","fill","stroke","stroke-width"],He={key:2},Re=["x","y","fill","font-size"],We={key:3},Ue=["x","y","fill","font-size"],je={key:4,class:"vue-data-ui-watermark"},Ye=["xmlns","height","width"],Ze=["fill"],Je=["innerHTML"],Ke={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(Z,{expose:J,emit:et}){const y=Z,{vue_ui_dumbbell:K}=s.useConfig(),b=e.computed({get(){return!!y.dataset&&y.dataset.length},set(a){return a}}),d=e.ref(s.createUid()),V=e.ref(0),p=e.ref(null),S=e.ref(null),z=e.ref(null),A=e.ref(0),P=e.ref(0),X=e.ref(0),t=e.computed({get:()=>T(),set:a=>a});function T(){const a=Y.useNestedProp({userConfig:y.config,defaultConfig:K});return a.theme?{...Y.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||y.config,defaultConfig:a})}:a}e.watch(()=>y.config,a=>{t.value=T(),D(),A.value+=1,P.value+=1,X.value+=1,i.value=t.value.style.chart.rowHeight,g.value=t.value.style.chart.width},{deep:!0}),e.watch(()=>y.dataset,a=>{q()},{deep:!0});const _=e.ref(null);e.onMounted(()=>{D()});function D(){if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):y.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{b.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=U.throttle(()=>{const{width:n,height:l}=U.useResponsive({chart:p.value,title:t.value.style.chart.title.text?S.value:null,legend:t.value.style.chart.legend.show?z.value:null});g.value=n,i.value=l/y.dataset.length,v.value=C()});_.value=new ResizeObserver(a),_.value.observe(p.value.parentNode)}}e.onBeforeUnmount(()=>{_.value&&_.value.disconnect()});const{isPrinting:F,isImaging:M,generatePdf:G,generateImage:I}=j.usePrinter({elementId:`dumbbell_${d.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell"}),x=e.ref({showTable:t.value.table.show}),f=e.computed(()=>y.dataset.map((a,n)=>({...a,start:s.checkNaN(a.start),end:s.checkNaN(a.end),id:s.createUid()}))),E=e.computed(()=>({max:Math.max(...f.value.flatMap(a=>[a.start,a.end])),min:Math.min(...f.value.flatMap(a=>[a.start,a.end]))})),c=e.computed(()=>s.calculateNiceScale(E.value.min<0?E.value.min:0,E.value.max,t.value.style.chart.grid.scaleSteps)),i=e.ref(t.value.style.chart.rowHeight),g=e.ref(t.value.style.chart.width),r=e.computed(()=>{const a=i.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+g.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*y.dataset.length,o=c.value.ticks.length*(g.value/c.value.ticks.length);return{left:t.value.style.chart.padding.left,right:n-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,bottom:l-t.value.style.chart.padding.bottom,width:g.value,height:a*y.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:o}});function C(){return f.value.map((a,n)=>{const l=r.value.left+(a.start+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*r.value.widthPlotReference,o=r.value.left+(a.end+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*r.value.widthPlotReference,u=l+(o-l)/2;return{...a,startX:l,endX:o,centerX:u,y:r.value.top+n*i.value+i.value/2,endVal:a.start}})}const v=e.ref([]),O=e.ref(null),Q=e.computed(()=>f.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{q()});function q(){v.value=C();let a=v.value.map(l=>l.start).reduce((l,o)=>l+o,0);function n(){const l=f.value.map(o=>o.end-o.start);a>=Q.value?(cancelAnimationFrame(O.value),v.value=C()):(v.value=v.value.map((o,u)=>{o.endVal+=l[u]*(t.value.animationSpeed/100);const h=r.value.left+(o.start+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*r.value.widthPlotReference,N=r.value.left+(o.endVal+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*r.value.widthPlotReference,$=h+(N-h)/2;return{...o,startX:h,endX:N,centerX:$,y:r.value.top+u*i.value+i.value/2,endVal:o.endVal}}),a=v.value.map(o=>o.endVal).reduce((o,u)=>o+u,0),O.value=requestAnimationFrame(n))}t.value.useAnimation?n():v.value=C()}const H=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${d.value})`:t.value.style.chart.plots.startColor},{name:t.value.style.chart.legend.labelEnd,color:t.value.style.chart.plots.gradient.show?`url(#end_grad_${d.value})`:t.value.style.chart.plots.endColor}]),ee=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,paddingTop:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),m=e.computed(()=>{const a=v.value.map(l=>({name:l.name})),n=v.value.map(l=>({start:l.start,end:l.end}));return{head:a,body:n}}),w=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],n=m.value.head.map((u,h)=>{const N=s.dataLabel({p:t.value.style.chart.labels.prefix,v:m.value.body[h].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),$=s.dataLabel({p:t.value.style.chart.labels.prefix,v:m.value.body[h].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),ae=s.dataLabel({v:100*(m.value.body[h].end/m.value.body[h].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:u.name},N,$,ae]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],head:a,body:n,config:l}});function R(){e.nextTick(()=>{const a=m.value.head.map((o,u)=>[[o.name],[m.value.body[u].start],[m.value.body[u].end]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.start],[t.value.table.columnNames.end]]].concat(a),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-dumbbell"})})}const k=e.ref(!1);function te(a){k.value=a,V.value+=1}function le(){return v.value}function W(){x.value.showTable=!x.value.showTable}const B=e.ref(!1);function L(){B.value=!B.value}return J({getData:le,generatePdf:G,generateCsv:R,generateImage:I,toggleTable:W,toggleAnnotator:L}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:p,class:e.normalizeClass(`vue-ui-dumbbell ${k.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${d.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ie.PenAndPaper,{key:0,parent:p.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:L},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:S,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(oe._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(M),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:p.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:te,onGeneratePdf:e.unref(G),onGenerateCsv:R,onGenerateImage:e.unref(I),onToggleTable:W,onToggleAnnotator:L},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"4"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${r.value.absoluteWidth<=0?10:r.value.absoluteWidth} ${r.value.absoluteHeight<=0?10:r.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ce._sfc_main),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left+o*r.value.width/(c.value.ticks.length-1),x2:r.value.left+o*r.value.width/(c.value.ticks.length-1),y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray},null,8,fe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left,x2:r.value.right,y1:r.value.top+o*i.value,y2:r.value.top+o*i.value,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,be))),256)),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.value.bottom,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,pe)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+(t.value.style.chart.labels.yAxisLabels.showProgression?i.value/3:i.value/2)+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"font-weight":t.value.style.chart.labels.yAxisLabels.bold?"bold":"normal","text-anchor":"end"},e.toDisplayString(l.name),9,ke))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+i.value/1.3+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(s.dataLabel)({v:100*(l.end/l.start-1),s:"%",r:t.value.style.chart.labels.yAxisLabels.rounding})),9,_e))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left+o*(r.value.width/(c.value.ticks.length-1)),y:r.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"font-weight":t.value.style.chart.labels.xAxisLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,l,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.xAxisLabels.rounding}),{datapoint:l,seriesIndex:o})),9,Ce))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.startColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,Be),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Ee)],8,we),e.createElementVNode("radialGradient",{id:`end_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.endColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,$e),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Se)],8,Le)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,Ae),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Pe)],8,ze),e.createElementVNode("linearGradient",{id:`grad_negative_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,De)],8,Xe)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",Fe,[e.createElementVNode("path",{d:`M
|
|
2
|
-
${l.startX},${l.y+t.value.style.chart.plots.radius/2}
|
|
3
|
-
C ${l.centerX},${l.y} ${l.centerX},${l.y}
|
|
4
|
-
${l.endX},${l.y+t.value.style.chart.plots.radius/2}
|
|
5
|
-
L ${l.endX},${l.y-t.value.style.chart.plots.radius/2}
|
|
6
|
-
C ${l.centerX},${l.y} ${l.centerX},${l.y}
|
|
7
|
-
${l.startX},${l.y-t.value.style.chart.plots.radius/2}
|
|
8
|
-
Z
|
|
9
|
-
`,fill:l.endX>l.startX?`url(#grad_positive_${d.value})`:`url(#grad_negative_${d.value})`},null,8,Me)])):(e.openBlock(),e.createElementBlock("g",Ge,[e.createElementVNode("rect",{x:l.endX>l.startX?l.startX:l.endX,y:l.y-t.value.style.chart.plots.link.strokeWidth/2,height:t.value.style.chart.plots.link.strokeWidth,width:Math.abs(l.endX-l.startX),fill:l.endX>l.startX?`url(#grad_positive_${d.value})`:`url(#grad_negative_${d.value})`},null,8,Ie)])),e.createElementVNode("circle",{cx:l.startX,cy:l.y,r:t.value.style.chart.plots.radius,fill:t.value.style.chart.plots.gradient.show?`url(#start_grad_${d.value})`:t.value.style.chart.plots.startColor,stroke:t.value.style.chart.plots.stroke,"stroke-width":t.value.style.chart.plots.strokeWidth},null,8,Oe),e.createElementVNode("circle",{cx:l.endX,cy:l.y,r:t.value.style.chart.plots.radius,fill:t.value.style.chart.plots.gradient.show?`url(#end_grad_${d.value})`:t.value.style.chart.plots.endColor,stroke:t.value.style.chart.plots.stroke,"stroke-width":t.value.style.chart.plots.strokeWidth},null,8,qe),t.value.style.chart.labels.startLabels.show?(e.openBlock(),e.createElementBlock("g",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(u,h)=>(e.openBlock(),e.createElementBlock("text",{x:u.startX,y:r.value.top+(h+1)*i.value-t.value.style.chart.labels.startLabels.fontSize/3+t.value.style.chart.labels.startLabels.offsetY,fill:t.value.style.chart.labels.startLabels.useStartColor?t.value.style.chart.plots.startColor:t.value.style.chart.labels.startLabels.color,"font-size":t.value.style.chart.labels.startLabels.fontSize,"text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,u.start,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:u.start,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.startLabels.rounding}),{datapoint:u,seriesIndex:h})),9,Re))),256))])):e.createCommentVNode("",!0),t.value.style.chart.labels.endLabels.show?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(u,h)=>(e.openBlock(),e.createElementBlock("text",{x:u.endX,y:r.value.top+h*i.value+t.value.style.chart.labels.endLabels.fontSize+t.value.style.chart.labels.endLabels.offsetY,fill:t.value.style.chart.labels.endLabels.useEndColor?t.value.style.chart.plots.endColor:t.value.style.chart.labels.endLabels.color,"font-size":t.value.style.chart.labels.endLabels.fontSize,"text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,u.end,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:u.end,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.endLabels.rounding}),{datapoint:u,seriesIndex:h})),9,Ue))),256))])):e.createCommentVNode("",!0)]))),256)),e.renderSlot(a.$slots,"svg",{svg:r.value},void 0,!0)],14,he)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(M)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(se.default,{key:5,config:{type:"dumbbell",style:{backgroundColor:t.value.style.chart.backgroundColor,dumbbell:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show&&b.value?(e.openBlock(),e.createBlock(ne.Legend,{key:`legend_${X.value}`,legendSet:H.value,config:ee.value},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{style:e.normalizeStyle(`display:flex;align-items:center;gap:4px;font-size:${t.value.style.chart.legend.fontSize}px`)},[(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(s.XMLNS),viewBox:"0 0 20 20",height:t.value.style.chart.legend.fontSize,width:t.value.style.chart.legend.fontSize},[e.createElementVNode("circle",{cx:10,cy:10,r:9,fill:l.color},null,8,Ze)],8,Ye)),e.createTextVNode(" "+e.toDisplayString(l.name),1)],4)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:H.value},void 0,!0)],512),b.value?(e.openBlock(),e.createBlock(ue.default,{key:6,hideDetails:"",config:{open:x.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(re.DataTable,{key:`table_${P.value}`,colNames:w.value.colNames,head:w.value.head,body:w.value.body,config:w.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[0]||(n[0]=l=>x.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Je)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ve))}},Qe=de._export_sfc(Ke,[["__scopeId","data-v-546fc153"]]);exports.default=Qe;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-FfZRtJ6A.cjs"),he=require("./Title-Co5jI5ed.cjs"),K=require("./usePrinter-BCAFeO_J.cjs"),me=require("./DataTable-DJzhv96s.cjs"),pe=require("./vue-ui-accordion-xXgqfR2l.cjs"),ge=require("./vue-ui-skeleton-Djv08J67.cjs"),Q=require("./useNestedProp-q7byAAIJ.cjs"),ke=require("./PackageVersion-DVZtsuy4.cjs"),ye=require("./PenAndPaper-CyXm-yVL.cjs"),be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],we={key:1,style:"width:100%;background:transparent;padding-bottom:24px"},Ne=["xmlns","viewBox"],xe=["id"],$e=["stop-color"],Be=["stop-color"],_e=["d","fill","stroke","stroke-width"],Pe=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],Ee=["x","y","font-size","fill"],Se=["x","y","font-size","fill"],Te={key:3,class:"vue-data-ui-watermark"},Fe=["innerHTML"],Le={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(ee,{expose:te}){const f=ee,{vue_ui_flow:oe}=s.useConfig(),$=e.computed(()=>!!f.dataset&&f.dataset.length);e.onMounted(()=>{z()});function z(){s.objectIsEmpty(f.dataset)&&s.error({componentName:"VueUiFlow",type:"dataset"})}const B=e.ref(s.createUid()),_=e.ref(null),I=e.ref(0),O=e.ref(0),y=e.ref(!1);function le(o){y.value=o,I.value+=1}const t=e.computed({get:()=>A(),set:o=>o});function A(){const o=Q.useNestedProp({userConfig:f.config,defaultConfig:oe});return o.theme?{...Q.useNestedProp({userConfig:s.themes.vue_ui_flow[o.theme]||f.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>f.config,o=>{t.value=A(),z(),O.value+=1},{deep:!0});const{isPrinting:H,isImaging:V,generatePdf:M,generateImage:D}=K.usePrinter({elementId:`flow_${B.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),P=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),q=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),b=e.ref({showTable:t.value.table.show}),Y=e.computed(()=>t.value.style.chart.links.width),E=e.computed(()=>!f.dataset||!f.dataset.length?[]:f.dataset.map(o=>[o[0],o[1],s.checkNaN(o[2])])),G=e.computed(()=>{const o={};function n(r){o[r]||(o[r]={inflow:0,outflow:0})}E.value.forEach(([r,a,c])=>{n(r),n(a),o[r].outflow+=c,o[a].inflow+=c});let l=0;for(const r in o){const a=Math.max(o[r].inflow,o[r].outflow);l=Math.max(l,a)}return l});function ne(o){return o/G.value*100+t.value.style.chart.nodes.minHeight}function ae(o){const n=t.value.style.chart.nodes.minHeight;return(o-n)/100*G.value}function re(o){const n={},l={};function r(u,i){n[u]||(n[u]={height:0,level:null,inflow:0,outflow:0}),n[u].level===null&&(n[u].level=i),l[i]||(l[i]=[]),l[i].includes(u)||l[i].push(u)}o.forEach(([u,i,v],k)=>{const p=n[u]?n[u].level:0,x=p+1;r(u,p),r(i,x),n[u].children||(n[u].children=[]),n[u].children.push({target:i,value:v}),n[u].outflow+=v,n[i].inflow+=v}),Object.keys(n).forEach((u,i)=>{n[u].color=P.value[i]||P.value[i%P.value.length]||s.palette[i]||s.palette[i%d.length]});for(const u in n)n[u].height=ne(Math.max(n[u].inflow,n[u].outflow)),n[u].name=u;const a={};for(const u in l){let i=0;l[u].forEach((v,k)=>{const p=n[v].height;a[v]={x:parseInt(u,10)*Y.value+t.value.style.chart.padding.left,y:i,absoluteY:i,height:p,i:k,color:n[v].color,value:ae(p)},i+=p+q.value})}const c=[];for(const u in n){let i=a[u].absoluteY;n[u].children&&n[u].children.forEach(({target:v,value:k},p)=>{const x=a[v].y,F=a[u],L=a[v],X=s.checkNaN(i),R=s.checkNaN(i+k/n[u].outflow*F.height),Z=s.checkNaN(x),J=s.checkNaN(x+k/n[v].inflow*L.height),fe={id:s.createUid(),source:u,target:v,path:`M ${s.checkNaN(F.x)+s.checkNaN(g.value)} ${X} L ${s.checkNaN(F.x)+s.checkNaN(g.value)} ${R} L ${s.checkNaN(L.x)} ${J} L ${s.checkNaN(L.x)} ${Z} Z`,value:k,sourceColor:n[u].color,targetColor:n[v].color};c.push(fe),i+=R-X,a[v].y+=J-Z})}return{nodeCoordinates:a,links:c}}const h=e.computed(()=>{const o=re(f.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((n,l)=>({...o.nodeCoordinates[n],name:n})),links:o.links}}),se=e.computed(()=>ue(h.value.nodes));function ue(o){const n={};for(const r in o){const{x:a,height:c}=o[r];n[a]||(n[a]=0),n[a]+=c+q.value}return Math.max(...Object.values(n))}const S=e.computed(()=>{const{top:o,right:n,left:l,bottom:r}=t.value.style.chart.padding,a=E.value.length*Y.value;return{height:se.value+o+r,width:n+Math.max(...h.value.nodes.map(c=>c.x))+g.value,left:l,top:o,right:a-n,p_top:o,p_bottom:r}});function ie(o){const n={},l={},r=new Set;return E.value.forEach(([a,c,u])=>{n[a]||(n[a]=[]),l[c]||(l[c]=[]),n[a].push(c),l[c].push(a)}),n[o]&&n[o].forEach(a=>r.add(a)),l[o]&&l[o].forEach(a=>r.add(a)),Array.from(r).concat(o)}const m=e.ref(null),C=e.ref(null);function ce(o){m.value=ie(o.name),C.value=o.name}function de(){m.value=null,C.value=null}const U=e.computed(()=>h.value.links.map(({source:o,target:n,sourceColor:l,targetColor:r,value:a})=>({source:o,target:n,sourceColor:l,targetColor:r,value:a})));function j(){e.nextTick(()=>{const o=U.value.map((r,a)=>[[r.source],[r.target],[r.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const w=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=U.value.map((a,c)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},s.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:o,body:n,config:l}});function ve(){return h.value}function W(){b.value.showTable=!b.value.showTable}const N=e.ref(!1);function T(){N.value=!N.value}return te({getData:ve,generateCsv:j,generateImage:D,generatePdf:M,toggleTable:W,toggleAnnotator:T}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:_,class:e.normalizeClass(`vue-ui-flow ${y.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`flow_${B.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ye.PenAndPaper,{key:0,parent:_.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:N.value,onClose:T},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",we,[(e.openBlock(),e.createBlock(he._sfc_main,{key:`title_${O.value}`,config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(K.UserOptions,{ref:"details",key:`user_option_${I.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(H),isImaging:e.unref(V),uid:B.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:N.value,onToggleFullscreen:le,onGeneratePdf:e.unref(M),onGenerateCsv:j,onGenerateImage:e.unref(D),onToggleTable:W,onToggleAnnotator:T},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${S.value.width} ${S.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ke._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.links,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:l.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.sourceColor},null,8,$e),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,Be)],8,xe))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.links,l=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:l.path,fill:`url(#${l.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${C.value?[l.target,l.source].includes(C.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,_e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:e.unref(s.checkNaN)(l.absoluteY),height:e.unref(s.checkNaN)(l.height),width:g.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>ce(l),onMouseleave:n[0]||(n[0]=a=>de()),style:e.normalizeStyle(`opacity:${m.value?m.value.includes(l.name)?1:.2:1}`)},null,44,Pe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2-t.value.style.chart.nodes.labels.fontSize/4),"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(s.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,Ee))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2+t.value.style.chart.nodes.labels.fontSize),"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,l.value,e.unref(s.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:l.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:l,seriesIndex:r})),13,Se))),256)),e.renderSlot(o.$slots,"svg",{svg:S.value},void 0,!0)],14,Ne)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Te,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(H)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ge.default,{key:4,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),$.value?(e.openBlock(),e.createBlock(pe.default,{key:5,hideDetails:"",config:{open:b.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(me.DataTable,{colNames:w.value.colNames,head:w.value.head,body:w.value.body,config:w.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=l=>b.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Fe)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ce))}},ze=be._export_sfc(Le,[["__scopeId","data-v-b1626dda"]]);exports.default=ze;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-FfZRtJ6A.cjs"),ae=require("./Legend-YZ7Hz3o1.cjs"),re=require("./Title-Co5jI5ed.cjs"),ne=require("./Tooltip-Bl6W8Zn7.cjs"),se=require("./DataTable-DJzhv96s.cjs"),U=require("./usePrinter-BCAFeO_J.cjs"),ue=require("./vue-ui-skeleton-Djv08J67.cjs"),ie=require("./vue-ui-accordion-xXgqfR2l.cjs"),H=require("./useNestedProp-q7byAAIJ.cjs"),ce=require("./PackageVersion-DVZtsuy4.cjs"),de=require("./PenAndPaper-CyXm-yVL.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),pe=["id"],he={key:1,style:"width:100%;background:transparent;padding-bottom:24px"},fe=["xmlns","viewBox"],ge=["id"],ye=["stdDeviation"],me=["d","stroke","stroke-width"],be=["d","stroke","stroke-width"],ke=["filter"],Ce=["d","stroke","stroke-width"],we=["d","stroke-width","onMouseenter","onClick"],xe={key:4,class:"vue-data-ui-watermark"},$e=["onClick"],Be={key:0},Te={key:1},Ne=["innerHTML"],Se={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(X,{expose:j,emit:_}){const i=X,{vue_ui_galaxy:Y}=r.useConfig(),b=e.computed(()=>!!i.dataset&&i.dataset.length);e.onMounted(()=>{P()});function P(){r.objectIsEmpty(i.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):i.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const g=e.ref(r.createUid()),k=e.ref(null),J=e.ref(null),x=e.ref(!1),$=e.ref(""),c=e.ref(null),L=e.ref(0),V=e.ref(0),E=e.ref(0),A=e.ref(0),t=e.computed({get:()=>F(),set:l=>l});function F(){const l=H.useNestedProp({userConfig:i.config,defaultConfig:Y});return l.theme?{...H.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||i.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>i.config,l=>{t.value=F(),P(),V.value+=1,E.value+=1,A.value+=1},{deep:!0});const{isPrinting:O,isImaging:I,generatePdf:z,generateImage:D}=U.usePrinter({elementId:`galaxy_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),K=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),B=e.ref({height:180,width:250}),u=e.ref([]);function T(l){u.value.includes(l.id)?u.value=u.value.filter(a=>a!==l.id):u.value.push(l.id),_("selectLegend",y.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const h=e.computed(()=>i.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||K.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function Q(){return h.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const d=e.computed(()=>h.value.filter(l=>!u.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),Z=e.ref(190),q=e.computed(()=>h.value.filter(l=>!u.value.includes(l.id))),y=e.computed(()=>{const l=[];for(let a=0;a<q.value.length;a+=1){const o=q.value[a];let n=o.value/d.value*Z.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/d.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!u.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),m=e.ref(!1);function ee(l){m.value=l,L.value+=1}const N=e.ref(null);function te({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){N.value={datapoint:l,seriesIndex:o,series:h.value,config:t.value},x.value=n,c.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:h.value,config:t.value}))?$.value=f({seriesIndex:o,datapoint:l,series:h.value,config:t.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),$.value=`<div>${s}</div>`)}const G=e.computed(()=>h.value.map((l,a)=>({...l,proportion:(l.value||0)/i.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:u.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>T(l),isSegregated:u.value.includes(l.id)}))),le=e.computed(()=>({cy:"galaxy-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":""})),p=e.computed(()=>{const l=y.value.map(o=>({name:o.name,color:o.color})),a=y.value.map(o=>o.value);return{head:l,body:a}});function M(){e.nextTick(()=>{const l=p.value.head.map((n,s)=>[[n.name],[p.value.body[s]],[isNaN(p.value.body[s]/d.value)?"-":p.value.body[s]/d.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const C=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>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:d.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=p.value.head.map((s,f)=>{const oe=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},oe,isNaN(p.value.body[f]/d.value)?"-":r.dataLabel({v:p.value.body[f]/d.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function W(){v.value.showTable=!v.value.showTable}function R(){v.value.showTooltip=!v.value.showTooltip}const w=e.ref(!1);function S(){w.value=!w.value}return j({getData:Q,generatePdf:z,generateCsv:M,generateImage:D,toggleTable:W,toggleTooltip:R,toggleAnnotator:S}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:k,class:e.normalizeClass(`vue-ui-galaxy ${m.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${g.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(de.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:S},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",he,[(e.openBlock(),e.createBlock(re._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(U.UserOptions,{ref_key:"details",ref:J,key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(O),isImaging:e.unref(I),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,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,isTooltip:v.value.showTooltip,isFullscreen:m.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:ee,onGeneratePdf:e.unref(z),onGenerateCsv:M,onGenerateImage:e.unref(D),onToggleTable:W,onToggleTooltip:R,onToggleAnnotator:S},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:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value}),viewBox:`0 0 ${B.value.width} ${B.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ce._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${g.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,ye)],8,ge)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,me)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,be)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${g.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Ce)],8,ke)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>te({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{x.value=!1,c.value=null}),onClick:s=>_("selectDatapoint",o)},null,40,we)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:B.value},void 0,!0)],14,fe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:5,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ae.Legend,{key:`legend_${A.value}`,legendSet:G.value,config:le.value,onClickMarker:a[1]||(a[1]=({legend:o})=>T(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>T(o),style:e.normalizeStyle(`opacity:${u.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.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.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),u.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",Te," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Be," ("+e.toDisplayString(isNaN(o.value/d.value)?"-":e.unref(r.dataLabel)({v:o.value/d.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,$e)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:G.value},void 0,!0),e.createVNode(ne._sfc_main,{show:v.value.showTooltip&&x.value,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:k.value,content:$.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(ie.default,{key:7,hideDetails:"",config:{open:v.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(se.DataTable,{key:`table_${E.value}`,colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.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]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Ne)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,pe))}},_e=ve._export_sfc(Se,[["__scopeId","data-v-57830654"]]);exports.default=_e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-FfZRtJ6A.cjs"),R=require("./useResponsive-B3TrDDIG.cjs"),D=require("./usePrinter-BCAFeO_J.cjs"),Q=require("./vue-ui-skeleton-Djv08J67.cjs"),ee=require("./Title-Co5jI5ed.cjs"),G=require("./useNestedProp-q7byAAIJ.cjs"),te=require("./PackageVersion-DVZtsuy4.cjs"),ae=require("./PenAndPaper-CyXm-yVL.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=["id"],re={key:0},ne=["xmlns","viewBox"],se=["id"],ue=["stop-color"],ie=["stop-color"],ce=["stop-color"],de=["id"],ve=["stdDeviation"],he=["d","fill","stroke"],fe=["d","filter"],pe=["x","y","text-anchor","font-size","font-weight","fill"],me=["x","y","font-size","font-weight","fill"],ye={key:1},ge=["x1","y1","x2","y2","stroke","stroke-width"],ke=["x1","y1","x2","y2","stroke","stroke-width"],be=["x1","y1","x2","y2","stroke-width","filter"],_e={key:2},xe=["d","fill","stroke","stroke-width"],Se=["cx","cy","fill","r","stroke-width","stroke"],we=["x","y","font-size","fill"],Ce={key:4,class:"vue-data-ui-watermark"},Fe={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(C,{expose:q}){const s=C,{vue_ui_gauge:j}=r.useConfig(),b=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length>0&&s.dataset.series&&s.dataset.series.length),h=e.ref(r.createUid()),L=e.ref(null),P=e.ref(0),y=e.ref(null),B=e.ref(null),N=e.ref(null),E=e.ref(0),t=e.computed({get:()=>M(),set:o=>o});e.watch(()=>s.config,o=>{t.value=M(),X(),E.value+=1},{deep:!0});function M(){const o=G.useNestedProp({userConfig:s.config,defaultConfig:j});return o.theme?{...G.useNestedProp({userConfig:r.themes.vue_ui_gauge[o.theme]||s.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}const{isPrinting:$,isImaging:O,generatePdf:V,generateImage:I}=D.usePrinter({elementId:`vue-ui-gauge_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),U=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),p=e.computed(()=>{if(!b.value||r.objectIsEmpty(s.dataset.series||{}))return{value:0,series:[{from:0,to:0}]};const o=[];(s.dataset.series||[]).forEach(l=>{o.push(l.from||0),o.push(l.to||0)});const n=Math.max(...o);return{...s.dataset,series:(s.dataset.series||[]).map((l,u)=>({...l,color:r.convertColorToHex(l.color)||U.value[u]||r.palette[u],value:((l.to||0)-(l.from||0))/n*100}))}}),v=e.ref(512),a=e.ref({height:358.4,width:v.value,top:0,bottom:358.4,centerX:179.2,centerY:v.value/2,labelFontSize:18,legendFontSize:t.value.style.chart.legend.fontSize,pointerRadius:t.value.style.chart.layout.pointer.circle.radius,trackSize:t.value.style.chart.layout.track.size,pointerSize:t.value.style.chart.layout.pointer.size,pointerStrokeWidth:t.value.style.chart.layout.pointer.strokeWidth,markerOffset:t.value.style.chart.layout.markers.offsetY+3}),_=e.ref(0),g=e.ref(0),c=e.ref(t.value.style.chart.animation.use?0:s.dataset.value);e.watch(()=>s.dataset.value,()=>{Y(s.dataset.value)});const d=e.computed(()=>{const o=a.value.width/2,n=i.value.base,l=Math.PI*((c.value+0-g.value)/(_.value-g.value))+Math.PI;return{x1:o,y1:n,x2:o+i.value.pointerSize*a.value.pointerSize*.9*Math.cos(l),y2:n+i.value.pointerSize*a.value.pointerSize*.9*Math.sin(l)}}),A=e.computed(()=>{const o=a.value.width/2,n=i.value.base,l=Math.PI*((c.value+0-g.value)/(_.value-g.value))+Math.PI,u=o+i.value.pointerSize*a.value.pointerSize*.9*Math.cos(l),w=n+i.value.pointerSize*a.value.pointerSize*.9*Math.sin(l),f=a.value.pointerRadius,H=o+f*Math.cos(l+Math.PI/2),Z=n+f*Math.sin(l+Math.PI/2),J=o+f*Math.cos(l-Math.PI/2),K=n+f*Math.sin(l-Math.PI/2);return isNaN(u)?null:`M ${u},${w} ${H},${Z} ${J},${K} Z`}),F=e.computed(()=>{for(let o=0;o<p.value.series.length;o+=1){const{color:n,from:l,to:u}=p.value.series[o];if(c.value>=l&&c.value<=u)return n}return"#2D353C"}),x=e.ref(null);function X(){if(r.objectIsEmpty(s.dataset)?r.error({componentName:"VueUiGauge",type:"dataset"}):(r.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","series"]}).forEach(o=>{r.error({componentName:"VueUiGauge",type:"datasetAttribute",property:o})}),Object.hasOwn(s.dataset,"series")&&(s.dataset.series.length?s.dataset.series.forEach((o,n)=>{r.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["from","to"]}).forEach(l=>{r.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:l,index:n})})}):r.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),Y(s.dataset.value||0),t.value.responsive){const o=R.throttle(()=>{const{width:n,height:l}=R.useResponsive({chart:y.value,title:t.value.style.chart.title.text?B.value:null,legend:N.value});a.value.width=n,a.value.height=l,a.value.centerX=n/2,a.value.centerY=v.value/2/358.4*l,a.value.bottom=l,a.value.labelFontSize=18/v.value*Math.min(l,n)<10?10:18/v.value*Math.min(l,n),a.value.legendFontSize=t.value.style.chart.legend.fontSize/v.value*Math.min(l,n)<14?14:t.value.style.chart.legend.fontSize/v.value*Math.min(l,n),a.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/v.value*Math.min(l,n),a.value.trackSize=t.value.style.chart.layout.track.size/v.value*Math.min(l,n),a.value.pointerStrokeWidth=r.translateSize({relator:Math.min(n,l),adjuster:v.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),a.value.markerOffset=r.translateSize({relator:Math.max(n,l),adjuster:v.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2})});x.value=new ResizeObserver(o),x.value.observe(y.value.parentNode)}}e.onMounted(()=>{X()}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});function Y(o){const n=[];(p.value.series||[]).forEach(f=>{n.push(f.from||0),n.push(f.to||0)}),_.value=Math.max(...n),g.value=Math.min(...n);let l=t.value.style.chart.animation.speed;const u=Math.abs(o-c.value)/(l*60);function w(){c.value<o?c.value=Math.min(c.value+u,o):c.value>o&&(c.value=Math.max(c.value-u,o)),c.value!==o&&requestAnimationFrame(w)}w()}const i=e.computed(()=>{const o=t.value.responsive?Math.min(a.value.width,a.value.height):a.value.width;return{arcs:o/2.5,gradients:o/2.75,base:t.value.responsive?a.value.height/2:a.value.height*.7,ratingBase:t.value.responsive?a.value.height/2+a.value.height/4:a.value.height*.9,pointerSize:t.value.responsive?Math.min(a.value.width,a.value.height)/3:a.value.width/3.2}}),m=e.computed(()=>r.makeDonut({series:p.value.series},a.value.width/2,i.value.base,i.value.arcs,i.value.arcs,1,1,1,180,109.9495,40*a.value.trackSize)),T=e.computed(()=>r.makeDonut({series:p.value.series},a.value.width/2,i.value.base,i.value.gradients,i.value.gradients,.95,1,1,180,110.02,2*a.value.trackSize)),k=e.ref(!1);function W(o){k.value=o,P.value+=1}const S=e.ref(!1);function z(){S.value=!S.value}return q({generatePdf:V,generateImage:I,toggleAnnotator:z}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${k.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:y,id:`vue-ui-gauge_${h.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%":""}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ae.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:S.value,onClose:z},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:12px"},[(e.openBlock(),e.createBlock(ee._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"gauge-div-title",...t.value.style.chart.title},subtitle:{cy:"gauge-div-subtitle",...t.value.style.chart.title.subtitle}}},{default:e.withCtx(()=>[t.value.translations.base&&C.dataset.base?(e.openBlock(),e.createElementBlock("span",re,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(C.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(D.UserOptions,{ref_key:"details",ref:L,key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(O),isPrinting:e.unref($),uid:h.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:S.value,onToggleFullscreen:W,onGeneratePdf:e.unref(V),onGenerateImage:e.unref(I),onToggleAnnotator:z},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.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"1"}: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:"2"}: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:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(te._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${h.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)("#FFFFFF",1)},null,8,ue),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(r.setOpacity)("#FFFFFF",t.value.style.chart.layout.track.gradientIntensity)},null,8,ie),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)("#FFFFFF",1)},null,8,ce)],8,se)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${h.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.track.gradientIntensity},null,8,ve)],8,de)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,u)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${u}`,d:l.arcSlice,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,he))),128)),t.value.style.chart.layout.track.useGradient?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(T.value,(l,u)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${u}`,d:l.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${h.value})`},null,8,fe))),128)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,u)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:i.value.base,initX:l.center.startX,initY:l.center.startY,offset:a.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:i.value.base,initX:l.center.startX,initY:l.center.startY,offset:a.value.markerOffset}).y,"text-anchor":l.center.startX<a.value.width/2-5?"end":l.center.startX>a.value.width/2+5?"start":"middle","font-size":a.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(l.from.toFixed(t.value.style.chart.layout.markers.roundingValue)),9,pe))),256)),e.createElementVNode("text",{x:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:i.value.base,initX:m.value.at(-1).endX,initY:m.value.at(-1).endY,offset:a.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:i.value.base,initX:m.value.at(-1).endX,initY:m.value.at(-1).endY,offset:a.value.markerOffset}).y,"text-anchor":"start","font-size":a.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(_.value.toFixed(t.value.style.chart.layout.markers.roundingValue)),9,me),t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",ye,[isNaN(d.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:d.value.x1,y1:d.value.y1,x2:d.value.x2,y2:d.value.y2,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":a.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,ge)),isNaN(d.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:d.value.x1,y1:d.value.y1,x2:d.value.x2,y2:d.value.y2,stroke:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":a.value.pointerStrokeWidth*.7},null,8,ke)),!isNaN(d.value.x2)&&t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:d.value.x1,y1:d.value.y1,x2:d.value.x2,y2:d.value.y2,stroke:"white","stroke-linecap":"round","stroke-width":a.value.pointerStrokeWidth*.3,filter:`url(#blur_${h.value})`},null,8,be)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",_e,[A.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:A.value,fill:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,"stroke-linejoin":"round"},null,8,xe)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:a.value.width/2,cy:i.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:a.value.pointerRadius<=0?1e-4:a.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,Se),e.createElementVNode("text",{x:a.value.width/2,y:i.value.ratingBase,"text-anchor":"middle","font-size":a.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?F.value:t.value.style.chart.legend.color},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.legend.formatter,c.value,e.unref(r.dataLabel)({p:t.value.style.chart.legend.prefix+(t.value.style.chart.legend.showPlusSymbol&&c.value>0?"+":""),v:c.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}))),9,we),e.renderSlot(o.$slots,"svg",{svg:a.value},void 0,!0)],14,ne)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ce,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref($)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Q.default,{key:5,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:N},[e.renderSlot(o.$slots,"legend",{legend:p.value},void 0,!0)],512)],14,le))}},ze=oe._export_sfc(Fe,[["__scopeId","data-v-732b5d09"]]);exports.default=ze;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-FfZRtJ6A.cjs"),ie=require("./Title-Co5jI5ed.cjs"),Z=require("./usePrinter-BCAFeO_J.cjs"),de=require("./Tooltip-Bl6W8Zn7.cjs"),ce=require("./vue-ui-skeleton-Djv08J67.cjs"),ve=require("./BaseIcon-BGExhz6v.cjs"),ye=require("./vue-ui-accordion-xXgqfR2l.cjs"),ee=require("./useNestedProp-q7byAAIJ.cjs"),pe=require("./PackageVersion-DVZtsuy4.cjs"),he=require("./PenAndPaper-CyXm-yVL.cjs"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],me={key:1,style:"width:100%;background:transparent"},be=["xmlns","viewBox"],xe=["x","y","width","height","fill","stroke","stroke-width"],ke=["x","y","width","height","fill","stroke","stroke-width"],we=["font-size","font-weight","fill","x","y"],Ce=["x","y","width","height","onMouseover"],_e={key:0},Ne=["font-size","fill","x","y","font-weight"],Be={key:0},Le=["text-anchor","font-size","fill","font-weight","transform"],$e={key:1},Ve=["x","y","width","height","stroke","stroke-width"],Ee={key:2},Se=["id"],Ae=["stop-color"],ze=["stop-color"],Te=["x","y","font-size","fill"],Me=["x","y","height","rx","fill"],Pe=["x","y","font-size","fill"],Fe=["stroke","x1","x2","y1","y2"],Oe=["fill","d"],De={key:3},Ie={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Re=["stop-color"],qe=["stop-color"],He=["x","y","width","height","rx"],Ue=["x","y","font-size","fill"],Ge=["x","y","font-size","fill"],Xe=["stroke","x1","x2","y1","y2"],je=["fill","d"],Ye={key:4,class:"vue-data-ui-watermark"},We={class:"vue-ui-data-table"},Ke={key:0},Je=["data-cell"],Qe={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ze=["data-cell"],et={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},tt={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(L,{expose:te}){const n=L;e.useCssVars(l=>({ac37324c:l.tdo}));const{vue_ui_heatmap:le}=o.useConfig(),$=e.computed(()=>!!n.dataset&&n.dataset.length);o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiHeatmap",type:"dataset"});const k=e.ref(o.createUid()),V=e.ref(null),ae=e.ref(null),z=e.ref(!1),T=e.ref(""),I=e.ref(void 0),w=e.ref(null),R=e.ref(0),q=e.ref(null),H=e.ref(!1),U=e.ref(0),t=e.computed({get:()=>G(),set:l=>l});function G(){const l=ee.useNestedProp({userConfig:n.config,defaultConfig:le});let s={};return l.theme?s={...ee.useNestedProp({userConfig:o.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:s=l,n.config&&o.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?s.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:s.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,s}e.watch(()=>n.config,l=>{t.value=G(),M(),U.value+=1},{deep:!0}),e.watch(()=>n.dataset,()=>{M()},{deep:!0});const{isPrinting:X,isImaging:j,generatePdf:Y,generateImage:W}=Z.usePrinter({elementId:`heatmap__${k.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),oe=e.computed(()=>t.value.table.responsiveBreakpoint);function se(){new ResizeObserver(s=>{s.forEach(u=>{H.value=u.contentRect.width<oe.value})}).observe(q.value)}e.onMounted(M);function M(){se()}const x=e.computed(()=>Math.max(...n.dataset.flatMap(l=>(l.values||[]).length))),p=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+n.dataset.length*t.value.style.layout.cells.height,s=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(x.value<n.dataset.length?n.dataset.length:x.value)*t.value.style.layout.cells.height,u=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:u,width:s}}),E=e.computed(()=>t.value.style.legend.position),a=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:p.value.width-t.value.style.layout.padding.right-(E.value==="right"&&t.value.style.legend.show?92:0),bottom:p.value.height-t.value.style.layout.padding.bottom,height:p.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:p.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(E.value==="right"&&t.value.style.legend.show?92:0)})),P=e.computed(()=>i.value.height*n.dataset.length),v=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:a.value.width/x.value,height:a.value.width/(x.value<n.dataset.length?n.dataset.length:x.value)})),h=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:n.dataset.map(u=>u.name),s=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:s.slice(0,x.value)}}),S=e.computed(()=>(n.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{o.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:s})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((s,u)=>s>=b.value?{side:"up",color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),ratio:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value))>1?1:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value)),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(s)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(s)/Math.abs(b.value)),color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`})})))),g=e.ref(null),C=e.ref(null);function ue(l,s,u,r){w.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:f,id:re}=l;I.value=re,g.value=d,C.value={datapoint:l,seriesIndex:s,series:S.value,config:t.value},z.value=!0;let O="";const D=t.value.style.tooltip.customFormat;o.isFunction(D)&&o.functionReturnsString(()=>D({datapoint:l,seriesIndex:s,series:S.value,config:t.value}))?T.value=D({datapoint:l,seriesIndex:s,series:S.value,config:t.value}):(O+=`<div>${c} ${f?`${f}`:""}</div>`,O+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,d)}">⬤</span><span>${isNaN(d)?"-":o.applyDataLabel(t.value.style.layout.cells.value.formatter,d,o.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:s})}</span></div>`,T.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${O}</div>`)}const _=e.computed(()=>a.value.top+P.value*(1-g.value/v.value)),N=e.computed(()=>a.value.left+(p.value.width-a.value.left-t.value.style.layout.padding.right)*(g.value/v.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),s=n.dataset.map(u=>u.values);return{head:l,body:s}});function K(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],s=[];for(let d=0;d<h.value.xLabels.length;d+=1){const c=[h.value.xLabels[d]];for(let f=0;f<n.dataset.length;f+=1)c.push([n.dataset[f].values[d]]);s.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(s),r=o.createCsvContent(u);o.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const B=e.ref(!1);function ne(l){B.value=l,R.value+=1}function J(){y.value.showTable=!y.value.showTable}function Q(){y.value.showTooltip=!y.value.showTooltip}const A=e.ref(!1);function F(){A.value=!A.value}return te({generatePdf:Y,generateCsv:K,generateImage:W,toggleTable:J,toggleTooltip:Q,toggleAnnotator:F}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:V,class:e.normalizeClass(`vue-ui-heatmap ${B.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}`),id:`heatmap__${k.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(he.PenAndPaper,{key:0,parent:V.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:A.value,onClose:F},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",me,[(e.openBlock(),e.createBlock(ie._sfc_main,{key:`title_${U.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(Z.UserOptions,{ref_key:"details",ref:ae,key:`user_options_${R.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(j),isPrinting:e.unref(X),uid:k.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.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:B.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:V.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:ne,onGeneratePdf:e.unref(Y),onGenerateCsv:K,onGenerateImage:e.unref(W),onToggleTable:J,onToggleTooltip:Q,onToggleAnnotator:F},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:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:u,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:u,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`0 0 ${p.value.width} ${p.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(pe._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(u,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,xe),e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ke),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(o.adaptColorToBackground)(d.color),x:a.value.left+i.value.width*c+i.value.width/2,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:d})),9,we)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c,y:a.value.top+i.value.height*r,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:f=>ue(d,r,a.value.left+i.value.width*c,a.value.top+i.value.height*r),onMouseout:s[0]||(s[0]=f=>{z.value=!1,I.value=void 0,g.value=null,w.value=null})},null,40,Ce)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",_e,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:a.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(h.value.yLabels[r]),9,Ne)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&r%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+i.value.width/2+a.value.width/h.value.xLabels.length*r+t.value.style.layout.dataLabels.xAxis.offsetX}, ${a.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,Le)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("g",$e,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:w.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:w.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:i.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,Ve)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="right"?(e.openBlock(),e.createElementBlock("g",Ee,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${k.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Ae),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,ze)],8,Se)]),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Te),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:P.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${k.value})`},null,8,Me),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+P.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Pe),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(C.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:_.value,y2:_.value},null,8,Fe)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${a.value.right+36},${_.value} ${a.value.right+26},${_.value-8} ${a.value.right+26},${_.value+8}z`},null,8,Oe)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="bottom"?(e.openBlock(),e.createElementBlock("g",De,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Ie,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Re),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,qe)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height,width:p.value.width-a.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,He),e.createElementVNode("text",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ue),e.createElementVNode("text",{x:a.value.right,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ge),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(C.value.datapoint.color),"stroke-width":"2",x1:N.value,x2:N.value,y1:a.value.bottom+t.value.style.layout.cells.height,y2:a.value.bottom+t.value.style.layout.cells.height*2},null,8,Xe)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${N.value},${a.value.bottom+t.value.style.layout.cells.height} ${N.value-12},${a.value.bottom+t.value.style.layout.cells.height-20} ${N.value+12},${a.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,je)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:p.value},void 0,!0)],14,be)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ce.default,{key:5,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(de._sfc_main,{show:y.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:V.value,content:T.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...C.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...C.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),$.value?(e.openBlock(),e.createBlock(ye.default,{key:6,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:q,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":H.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left: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:s[1]||(s[1]=u=>y.value.showTable=!1),onKeypress:s[2]||(s[2]=e.withKeys(u=>y.value.showTable=!1,["enter"]))},[e.createVNode(ve.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",We,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",Ke,e.toDisplayString(t.value.style.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.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(u,r)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(u.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",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",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",Qe,e.toDisplayString(u),1)],12,Je),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":L.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",et,e.toDisplayString(isNaN(d.values[r])?"-":e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[r],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,Ze))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},lt=ge._export_sfc(tt,[["__scopeId","data-v-247d7da4"]]);exports.default=lt;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-FfZRtJ6A.cjs"),Ee=require("./Title-Co5jI5ed.cjs"),ce=require("./usePrinter-BCAFeO_J.cjs"),Se=require("./DataTable-DJzhv96s.cjs"),Ve=require("./Tooltip-Bl6W8Zn7.cjs"),z=require("./BaseIcon-BGExhz6v.cjs"),Re=require("./vue-ui-skeleton-Djv08J67.cjs"),Le=require("./vue-ui-accordion-xXgqfR2l.cjs"),de=require("./useNestedProp-q7byAAIJ.cjs"),ze=require("./PackageVersion-DVZtsuy4.cjs"),Me=require("./PenAndPaper-CyXm-yVL.cjs"),De=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ue=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Ae={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;function u(a){g("zoom",a)}function c(a){g("hover",a)}return e.toRef(h,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(d=>{d.ancestor=a})}),(a,d)=>{const C=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(w,M)=>(e.openBlock(),e.createElementBlock("circle",{cx:w.x,cy:w.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:r.hoveredUid&&r.hoveredUid===v.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(x=>u(v),["stop"]),onMouseover:x=>c(v),onMouseleave:d[0]||(d[0]=x=>c(null))},null,40,Ue))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(C,{key:0,dataset:v.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ie=["x1","y1","x2","y2","stroke","stroke-width"],Oe=["x1","y1","x2","y2","stroke","stroke-width"],He={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const g=r;return e.toRef(g,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(c=>{c.ancestor=u})}),(u,c)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(d,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,Ie),e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.color,"stroke-width":a.circleRadius/2},null,8,Oe)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:r.color,backgroundColor:r.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},qe=["x","y","fill","font-size"],je={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;return e.toRef(h,"dataset").value.forEach(c=>{c.nodes&&c.nodes.length>0&&c.nodes.forEach(B=>{B.ancestor=c})}),(c,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,d=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[d.polygonPath&&d.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.polygonPath.coordinates,C=>(e.openBlock(),e.createElementBlock("text",{x:C.x,y:C.y+d.circleRadius*2,fill:r.color,"font-size":d.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(d.name),9,qe))),256)),d.nodes&&d.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:d.nodes,color:r.color,hoveredUid:r.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ge={style:{position:"relative",height:"100%",width:"100%"}},Xe={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:g}){return(h,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${r.isFullscreen?"fixed":"absolute"};bottom:0;right:${r.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",Ge,[e.createElementVNode("button",{onClick:u[0]||(u[0]=e.withModifiers(c=>g("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[1]||(u[1]=e.withModifiers(c=>g("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[2]||(u[2]=e.withModifiers(c=>g("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[3]||(u[3]=e.withModifiers(c=>g("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[4]||(u[4]=e.withModifiers(c=>g("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},Ye=["id"],We={key:1,style:"width:100%;background:transparent;"},Ze=["xmlns","viewBox"],Je=["id"],Ke=["stop-color"],Qe=["stop-color"],_e={key:5,class:"vue-data-ui-watermark"},et=["innerHTML"],tt={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:g}){const h=r,{vue_ui_molecule:u}=m.useConfig(),c=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{B()});function B(){m.objectIsEmpty(h.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const a=e.ref(m.createUid()),d=e.ref(null),C=e.ref(!1),v=e.ref(""),w=e.ref(null),M=e.ref(null),x=e.ref(!1),y=e.ref(null),W=e.ref(null),A=e.ref(0),Z=e.ref(0),J=e.ref(0),o=e.computed({get:()=>K(),set:t=>t});function K(){const t=de.useNestedProp({userConfig:h.config,defaultConfig:u});return t.theme?{...de.useNestedProp({userConfig:m.themes.vue_ui_molecule[t.theme]||h.config,defaultConfig:t}),customPalette:m.themePalettes[t.theme]||m.palette}:t}e.watch(()=>h.config,t=>{o.value=K(),B(),Z.value+=1,J.value+=1},{deep:!0});const{isPrinting:Q,isImaging:_,generatePdf:ee,generateImage:te}=ce.usePrinter({elementId:`cluster_${a.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ve=e.computed(()=>m.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function oe(t,n=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?oe(t[0].nodes,n+1):n}function pe(){const t=oe(h.dataset);let n=100,l=n;for(let i=0;i<t;i+=1)n/=1,l+=n;return{height:l,width:l}}const $=e.ref(pe()),I=e.ref(`0 0 ${$.value.width} ${$.value.height}`);function le(t,n={x:-$.value.width/2.43,y:$.value.height/2},l=$.value.width/1.1,i=24,s=0,p=0,V="#BBBBBB"){if(t&&t.length>0){const X=m.createPolygonPath({plot:n,radius:l,sides:t.length,rotation:s});t.forEach((f,F)=>{const R=X.coordinates[F];let P;if(f.ancestor?f.ancestor.ancestor?P=f.ancestor.color||V:(P=ve.value[p]||m.palette[p]||V,p+=1):P=V,f.polygonPath={coordinates:[R]},f.circleRadius=i,f.color=P,f.uid=m.createUid(),f.nodes&&f.nodes.length>0){const Y=!f.ancestor||!f.ancestor.ancestor?p:0;f.nodes=le(f.nodes,R,l/2.9,i/2.2,s+Math.PI*F/f.nodes.length,Y,P)}})}return t}function fe(t){const n=new Set;function l(s){s.forEach(p=>{p.color&&!n.has(p.color)&&n.add(p.color),p.nodes&&p.nodes.length>0&&l(p.nodes)})}l(t);const i={};return Array.from(n).forEach((s,p)=>{i[s]=`gradient_${p}`}),i}const me=e.computed(()=>fe(b.value)),b=e.computed(()=>le(h.dataset));function O(){x.value=!1,M.value=null,W.value=null,y.value=null,q({polygonPath:{coordinates:[{x:$.value.width/2,y:$.value.height/2}]},circleRadius:24})}const H=e.ref(null);function q(t){w.value.focus(),e.nextTick(()=>{H.value&&cancelAnimationFrame(H.value);const n=I.value.split(" "),l=parseFloat(n[0]),i=parseFloat(n[1]),s=parseFloat(n[2]),p=parseFloat(n[3]),{x:V,y:X}=t.polygonPath.coordinates[0],{circleRadius:f}=t,F=8.34,R=V-f*F,P=X-f*F,Y=f*F*2,xe=f*F*2,$e=Math.sqrt((R-l)**2+(P-i)**2),L=Math.min(1200,Math.max(20,Math.floor($e/10))),Pe=(R-l)/L,Fe=(P-i)/L,Ne=(Y-s)/L,Te=(xe-p)/L;let T=0;function ue(){I.value=`${l+Pe*T} ${i+Fe*T} ${s+Ne*T} ${p+Te*T}`,T+=o.value.style.chart.zoom.speed,T<=L&&(H.value=requestAnimationFrame(ue))}ue()})}function he(t){M.value===t.uid?O():(M.value=t.uid,W.value=t,y.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},q(t),x.value=t.uid!==b.value[0].uid)}function ge(t){if(t.target.nodeName!=="circle")O(),x.value=!1;else return}const j=e.ref(null);function ye(t){j.value={datapoint:t,seriesIndex:-1,series:b.value,config:o.value};const n=o.value.style.chart.tooltip.customFormat;if(m.isFunction(n)&&m.functionReturnsString(()=>n({seriesIndex:-1,datapoint:t,series:b.value,config:o.value})))v.value=n({seriesIndex:-1,datapoint:t,series:b.value,config:o.value});else{let l="";l+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(l+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),v.value=`<div style="font-family:inherit">${l}</div>`}}const ne=e.ref(null),E=e.ref(null);function ke(t){ne.value=t,t?(C.value=!0,ye(t),E.value=t.uid):(C.value=!1,v.value="",E.value=null)}function D(t){t==="right"&&(y.value.polygonPath.coordinates[0].x+=y.value.circleRadius),t==="left"&&(y.value.polygonPath.coordinates[0].x-=y.value.circleRadius),t==="top"&&(y.value.polygonPath.coordinates[0].y-=y.value.circleRadius),t==="bottom"&&(y.value.polygonPath.coordinates[0].y+=y.value.circleRadius),q(y.value)}function be(t){const n=[];function l(i){i.forEach(s=>{const p={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};n.push(p),s.nodes&&s.nodes.length>0&&l(s.nodes,s.name)})}return l(t),n}const Ce=e.computed(()=>be(b.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],n=Ce.value.map((s,p)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),l={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},i=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:n,config:l,colNames:i}});function re(){e.nextTick(()=>{const t=N.value.body.map((i,s)=>[[i[0].name],[i[1]],[i[2]]]),n=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),l=m.createCsvContent(n);m.downloadCsv({csvContent:l,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function Be(){return b.value}const S=e.ref(!1);function we(t){S.value=t,A.value+=1}function ae(){k.value.showTable=!k.value.showTable}function se(){k.value.showDataLabels=!k.value.showDataLabels}function ie(){k.value.showTooltip=!k.value.showTooltip}const U=e.ref(!1);function G(){U.value=!U.value}return g({getData:Be,generatePdf:ee,generateCsv:re,generateImage:te,toggleTable:ae,toggleLabels:se,toggleTooltip:ie,toggleAnnotator:G}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:n[7]||(n[7]=l=>{ne.value=null,E.value=null}),ref_key:"moleculeChart",ref:w,class:e.normalizeClass(`vue-ui-molecule ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${a.value}`},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Me.PenAndPaper,{key:0,parent:w.value,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:U.value,onClose:G},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",We,[(e.openBlock(),e.createBlock(Ee._sfc_main,{key:`title_${Z.value}`,config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value?(e.openBlock(),e.createBlock(ce.UserOptions,{ref_key:"details",ref:d,key:`user_options_${A.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(Q),isImaging:e.unref(_),uid:a.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:w.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:U.value,onToggleFullscreen:we,onGeneratePdf:e.unref(ee),onGenerateCsv:re,onGenerateImage:e.unref(te),onToggleTable:ae,onToggleLabels:se,onToggleTooltip:ie,onToggleAnnotator:G},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(m.XMLNS),viewBox:I.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${o.value.style.chart.color}`),onClick:n[0]||(n[0]=e.withModifiers(l=>ge(l),["stop"]))},[e.createVNode(ze._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(me.value),l=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${l}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(m.lightenHexColor)(l,.5)},null,8,Ke),e.createElementVNode("stop",{offset:"100%","stop-color":l},null,8,Qe)],8,Je))),256))]),e.createVNode(He,{dataset:b.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Ae,{dataset:b.value,hoveredUid:E.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:he,onHover:ke},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(je,{key:0,dataset:b.value,color:o.value.style.chart.color,hoveredUid:E.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:$.value},void 0,!0)],14,Ze)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Xe,{key:`direction_pad_${A.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:n[1]||(n[1]=l=>D("left")),onMoveRight:n[2]||(n[2]=l=>D("right")),onMoveTop:n[3]||(n[3]=l=>D("top")),onMoveBottom:n[4]||(n[4]=l=>D("bottom")),onReset:n[5]||(n[5]=l=>{O(),x.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",_e,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(_)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Re.default,{key:6,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Ve._sfc_main,{show:k.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:w.value,content:v.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),c.value?(e.openBlock(),e.createBlock(Le.default,{key:7,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Se.DataTable,{key:`table_${J.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:n[6]||(n[6]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,et)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ye))}},ot=De._export_sfc(tt,[["__scopeId","data-v-900f33cd"]]);exports.default=ot;
|