vue-data-ui 2.3.23 → 2.3.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-BOSHa3Ag.cjs → Arrow-01eXaB81.cjs} +1 -1
- package/dist/{Arrow-DxXzMXB1.js → Arrow-zObQ2VxA.js} +1 -1
- package/dist/{BaseIcon-C-k_mqXL.cjs → BaseIcon-BkdELEYE.cjs} +1 -1
- package/dist/{BaseIcon-DuMfKUDs.js → BaseIcon-CHBghp3_.js} +1 -1
- package/dist/{DataTable-CHXdpx94.cjs → DataTable-D_2ZW2eI.cjs} +1 -1
- package/dist/{DataTable-DKHF_NH2.js → DataTable-Dytj5HQM.js} +2 -2
- package/dist/{Legend-BqqpwXbu.js → Legend-Ct8LnAy4.js} +1 -1
- package/dist/{Legend-BwrzHxLy.cjs → Legend-tvvMRnbi.cjs} +1 -1
- package/dist/{Shape-DW18-C9f.cjs → Shape-dvRttq7z.cjs} +1 -1
- package/dist/{Shape-Ccky9omb.js → Shape-qo5jcJq9.js} +1 -1
- package/dist/{Slicer-BDsv196Y.js → Slicer-BNgHaM2_.js} +1 -1
- package/dist/{Slicer-xKlzke1v.cjs → Slicer-DcjEg-ZZ.cjs} +1 -1
- package/dist/{Title-Bx2ibobQ.js → Title-BcNPXpKX.js} +1 -1
- package/dist/{Title-DxNugmhI.cjs → Title-CSQdI1EY.cjs} +1 -1
- package/dist/{Tooltip-BC2Wlz7P.cjs → Tooltip-B-laoopT.cjs} +1 -1
- package/dist/{Tooltip-DOEMrisX.js → Tooltip-etzDGo1Y.js} +1 -1
- package/dist/{index-BvjCO-wv.js → index-BE6fhUyH.js} +1 -1
- package/dist/{index-oufiZvaS.cjs → index-BFH7X8WG.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-CmTItGss.cjs → useNestedProp-B_z4-n52.cjs} +1 -1
- package/dist/{useNestedProp-2KJaYPfM.js → useNestedProp-BcjRW6BJ.js} +1 -1
- package/dist/{usePrinter-CaKXrCiB.js → usePrinter-CdIphKpF.js} +1 -1
- package/dist/{usePrinter-Cc8ufBvU.cjs → usePrinter-hyuaFHQj.cjs} +1 -1
- package/dist/{vue-data-ui-DnlOZVL-.js → vue-data-ui-DH3---6Y.js} +56 -56
- package/dist/{vue-data-ui-D5LrE3dP.cjs → vue-data-ui-dbgbgXfB.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-qegO2SzJ.js → vue-ui-3d-bar-CPpeRsrz.js} +7 -7
- package/dist/{vue-ui-3d-bar-Cma1NB-u.cjs → vue-ui-3d-bar-ddx9_3_T.cjs} +1 -1
- package/dist/{vue-ui-accordion-DiR0dVog.cjs → vue-ui-accordion-CvZhABQM.cjs} +1 -1
- package/dist/{vue-ui-accordion-q-bLDiD3.js → vue-ui-accordion-Dmz7RUKz.js} +3 -3
- package/dist/{vue-ui-age-pyramid-xk6Gt1LJ.cjs → vue-ui-age-pyramid-BieAbkr7.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-vQvy7rWY.js → vue-ui-age-pyramid-DiOdrFIV.js} +8 -8
- package/dist/{vue-ui-annotator-LwO1PGoN.cjs → vue-ui-annotator-CugE3IpZ.cjs} +1 -1
- package/dist/{vue-ui-annotator-BYT8v1SY.js → vue-ui-annotator-KClMRKPi.js} +1 -1
- package/dist/{vue-ui-candlestick-zvv6_kwp.js → vue-ui-candlestick-D9MajMEG.js} +9 -9
- package/dist/{vue-ui-candlestick-CmM0kwJR.cjs → vue-ui-candlestick-DErkX5mF.cjs} +1 -1
- package/dist/vue-ui-carousel-table-CLwi79Ly.js +346 -0
- package/dist/vue-ui-carousel-table-CsCEcaWp.cjs +1 -0
- package/dist/{vue-ui-chestnut-4MvRD28_.cjs → vue-ui-chestnut-BTvQSTQi.cjs} +1 -1
- package/dist/{vue-ui-chestnut-A9asY_42.js → vue-ui-chestnut-BnmDdakJ.js} +6 -6
- package/dist/{vue-ui-cursor-DusWgM7W.cjs → vue-ui-cursor-Dj8pAXbc.cjs} +1 -1
- package/dist/{vue-ui-cursor-CPPPIH2W.js → vue-ui-cursor-KjKhIKTP.js} +2 -2
- package/dist/{vue-ui-dashboard-ZTzEd521.cjs → vue-ui-dashboard-BTpiCLaT.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CuQ81BKN.js → vue-ui-dashboard-Dm-rDSRt.js} +2 -2
- package/dist/{vue-ui-digits-DlupvOo-.cjs → vue-ui-digits-BVVOQfoO.cjs} +1 -1
- package/dist/{vue-ui-digits-Czkbi2AR.js → vue-ui-digits-WgEKLYdq.js} +2 -2
- package/dist/{vue-ui-donut-Cis7kzDB.js → vue-ui-donut-BjHWw_Mw.js} +9 -9
- package/dist/{vue-ui-donut-DA5YfWlL.cjs → vue-ui-donut-DvDqj2od.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-BigmUCTm.cjs → vue-ui-donut-evolution-C0TW-uGR.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-D2I4ZD5a.js → vue-ui-donut-evolution-CWBsLGUw.js} +9 -9
- package/dist/{vue-ui-dumbbell-fdV94xQB.js → vue-ui-dumbbell-BlsLMdW8.js} +8 -8
- package/dist/{vue-ui-dumbbell-D8ZSCX0H.cjs → vue-ui-dumbbell-Uhw6rKrw.cjs} +1 -1
- package/dist/{vue-ui-flow-C1PVwgKX.js → vue-ui-flow-KijZNPzD.js} +7 -7
- package/dist/{vue-ui-flow-CH6PmIBT.cjs → vue-ui-flow-fnDs0_mH.cjs} +1 -1
- package/dist/{vue-ui-galaxy-IFmqHh3R.cjs → vue-ui-galaxy-BBiGsB2G.cjs} +1 -1
- package/dist/{vue-ui-galaxy-DzWOfvyj.js → vue-ui-galaxy-_y9H-beS.js} +9 -9
- package/dist/{vue-ui-gauge-Bbda2H3b.cjs → vue-ui-gauge-Bv4YKgIj.cjs} +1 -1
- package/dist/{vue-ui-gauge-CeGa1oMf.js → vue-ui-gauge-CGgQqTqT.js} +5 -5
- package/dist/{vue-ui-gizmo-DyJngE0E.cjs → vue-ui-gizmo-DFWR7qEg.cjs} +1 -1
- package/dist/{vue-ui-gizmo-BILyJylm.js → vue-ui-gizmo-DjAFk58g.js} +2 -2
- package/dist/{vue-ui-heatmap-Dp68UbGB.cjs → vue-ui-heatmap-B5McL3SD.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DRk0VXaJ.js → vue-ui-heatmap-D1AMro3o.js} +8 -8
- package/dist/vue-ui-kpi-BW2na3Yu.js +58 -0
- package/dist/vue-ui-kpi-Bb7xdAFU.cjs +1 -0
- package/dist/{vue-ui-mini-loader-CXiMb5pi.cjs → vue-ui-mini-loader-22dagCEY.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DLXv9Seq.js → vue-ui-mini-loader-CKZ-PEf5.js} +2 -2
- package/dist/{vue-ui-molecule-JlPbVJ8I.js → vue-ui-molecule-BK8HPWvg.js} +9 -9
- package/dist/{vue-ui-molecule-DOwGWqSR.cjs → vue-ui-molecule-CWpBfXyk.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BF3WqcyN.cjs → vue-ui-mood-radar-BZE6rvtb.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-C3Boyr96.js → vue-ui-mood-radar-CXq465Aj.js} +9 -9
- package/dist/{vue-ui-nested-donuts-C9CFBzvj.js → vue-ui-nested-donuts-BSYKxbNL.js} +9 -9
- package/dist/{vue-ui-nested-donuts-DkGXmwTg.cjs → vue-ui-nested-donuts-Ca-b8_P3.cjs} +1 -1
- package/dist/{vue-ui-onion-BqzUINBq.js → vue-ui-onion-CMv38G-g.js} +9 -9
- package/dist/{vue-ui-onion-COYhqrEx.cjs → vue-ui-onion-DvRn35KQ.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-BE8Bf0MQ.cjs → vue-ui-parallel-coordinate-plot-C50SGcJo.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DtXx6zpM.js → vue-ui-parallel-coordinate-plot-DBZUno5l.js} +10 -10
- package/dist/{vue-ui-quadrant-Cr2jm-2w.js → vue-ui-quadrant-C-jh3Grv.js} +10 -10
- package/dist/{vue-ui-quadrant-g34Ky2Hq.cjs → vue-ui-quadrant-CJo9jqLm.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BEXF1YLk.cjs → vue-ui-quick-chart-BJ6lIxf6.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-gurflOrc.js → vue-ui-quick-chart-BvTLEmD_.js} +6 -6
- package/dist/{vue-ui-radar-B77sXFJD.cjs → vue-ui-radar-CWgrIgHA.cjs} +1 -1
- package/dist/{vue-ui-radar-DGXj7kOe.js → vue-ui-radar-Kh4Qt05I.js} +10 -10
- package/dist/{vue-ui-rating-D2wmEDux.js → vue-ui-rating-D7AkYGtK.js} +2 -2
- package/dist/{vue-ui-rating-J4wpjGDw.cjs → vue-ui-rating-DJsfvOxZ.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-8hDVUqzX.js → vue-ui-relation-circle-CXQ9FHnG.js} +5 -5
- package/dist/{vue-ui-relation-circle-CkO4PvuL.cjs → vue-ui-relation-circle-DRquG6N9.cjs} +1 -1
- package/dist/{vue-ui-rings-Bs4I_DFj.js → vue-ui-rings-BuuiGgkQ.js} +9 -9
- package/dist/{vue-ui-rings-Bt4lsykR.cjs → vue-ui-rings-DAuDNTak.cjs} +1 -1
- package/dist/{vue-ui-scatter-BcuxFe_0.js → vue-ui-scatter-Ba_1vbfG.js} +10 -10
- package/dist/{vue-ui-scatter-pnVV0nUg.cjs → vue-ui-scatter-Db1WHHMt.cjs} +1 -1
- package/dist/{vue-ui-screenshot-Q4jzniKW.cjs → vue-ui-screenshot-BgvHfkel.cjs} +1 -1
- package/dist/{vue-ui-screenshot-CkunIVDh.js → vue-ui-screenshot-rDwd1nNP.js} +1 -1
- package/dist/{vue-ui-skeleton-jYHncdu5.js → vue-ui-skeleton-DZk__alb.js} +2 -2
- package/dist/{vue-ui-skeleton-Fsru0dbb.cjs → vue-ui-skeleton-Df1qBO2k.cjs} +1 -1
- package/dist/{vue-ui-smiley-B3gIeKih.js → vue-ui-smiley-BPebp5hG.js} +2 -2
- package/dist/{vue-ui-smiley-Bd3lgUj_.cjs → vue-ui-smiley-KQFOL39h.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CgEi2LBP.js → vue-ui-spark-trend-CSdQHPuY.js} +4 -4
- package/dist/{vue-ui-spark-trend-DfD8Q9Zl.cjs → vue-ui-spark-trend-Cr2Coq5M.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-BCmLvKvU.cjs → vue-ui-sparkbar-BIdS6UA_.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-Bu_TX-tQ.js → vue-ui-sparkbar-EhBZgeio.js} +3 -3
- package/dist/{vue-ui-sparkgauge-C_DSQGId.cjs → vue-ui-sparkgauge-DFlQ-olI.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Cml4o6Bs.js → vue-ui-sparkgauge-DTUDMW-e.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-BsyOeGbq.js → vue-ui-sparkhistogram-CJZN2ZKW.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-BZDofxtq.cjs → vue-ui-sparkhistogram-_zChXZnF.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DOsWIDug.js → vue-ui-sparkline-B0OAXqfq.js} +3 -3
- package/dist/{vue-ui-sparkline-twqIgYC3.cjs → vue-ui-sparkline-IWbHN7-r.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DTgoeXjb.cjs → vue-ui-sparkstackbar-C6tBsD3M.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DeWgfL12.js → vue-ui-sparkstackbar-wPYlidft.js} +3 -3
- package/dist/{vue-ui-strip-plot-BV27VHWB.cjs → vue-ui-strip-plot-BAcR2Zug.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-Ci-hICkJ.js → vue-ui-strip-plot-Bm0JThi4.js} +9 -9
- package/dist/{vue-ui-table-R_KFQoq4.js → vue-ui-table-6ZR-bgMx.js} +1 -1
- package/dist/{vue-ui-table-Bd9ddVGy.cjs → vue-ui-table-B0FlP2RX.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CPOETxT8.cjs → vue-ui-table-heatmap-B2Xe1T4D.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-TYLCpM_Y.js → vue-ui-table-heatmap-bJUl4rY6.js} +4 -4
- package/dist/{vue-ui-table-sparkline-H_qcrFc0.cjs → vue-ui-table-sparkline-DgZQmNaq.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-B-qJP3Yr.js → vue-ui-table-sparkline-Dxinc_iR.js} +5 -5
- package/dist/{vue-ui-thermometer-CBybvctJ.cjs → vue-ui-thermometer-BN1harXD.cjs} +1 -1
- package/dist/{vue-ui-thermometer-fV6P7B8U.js → vue-ui-thermometer-Nb1pgJ04.js} +5 -5
- package/dist/{vue-ui-timer-CU-tJV53.js → vue-ui-timer-C17OoYkC.js} +4 -4
- package/dist/{vue-ui-timer-CwQteT9E.cjs → vue-ui-timer-_44ECu7b.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-Ba1Er97s.cjs → vue-ui-tiremarks-BSMuOb-Z.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-Dxy0W8kp.js → vue-ui-tiremarks-lbnWHaOP.js} +5 -5
- package/dist/{vue-ui-treemap-CFqf6BUd.js → vue-ui-treemap-CbdnMlBb.js} +9 -9
- package/dist/{vue-ui-treemap-CpPqA91r.cjs → vue-ui-treemap-DinP2PhP.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-Px2OPOQp.cjs → vue-ui-vertical-bar-B7cKvp6J.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-CpIgWUoF.js → vue-ui-vertical-bar-B9HnpW6M.js} +9 -9
- package/dist/{vue-ui-waffle-DbR7pPaP.js → vue-ui-waffle-70I35yZY.js} +9 -9
- package/dist/{vue-ui-waffle-BEOhRYhC.cjs → vue-ui-waffle-BaqQnh1w.cjs} +1 -1
- package/dist/{vue-ui-wheel-BkbAV9mu.js → vue-ui-wheel-C8YTOjwd.js} +5 -5
- package/dist/{vue-ui-wheel-C4H-fBbx.cjs → vue-ui-wheel-DZbEyD4l.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-B8vX27Pz.cjs → vue-ui-word-cloud-DkJyoTg9.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-704bFMO3.js → vue-ui-word-cloud-Don3Oz-A.js} +6 -6
- package/dist/{vue-ui-xy-B8qzx04X.cjs → vue-ui-xy-DkBLRZ6y.cjs} +1 -1
- package/dist/{vue-ui-xy-kFskWWiT.js → vue-ui-xy-XJp90Tih.js} +12 -12
- package/dist/{vue-ui-xy-canvas-CJO0hp3z.js → vue-ui-xy-canvas-CsPcJxOA.js} +10 -10
- package/dist/{vue-ui-xy-canvas-BVhRHPYN.cjs → vue-ui-xy-canvas-Do2LgfMo.cjs} +1 -1
- package/package.json +1 -1
- package/dist/vue-ui-carousel-table-FMfXIF7s.cjs +0 -1
- package/dist/vue-ui-carousel-table-S3daEHYR.js +0 -330
- package/dist/vue-ui-kpi-Mbre-_3M.cjs +0 -1
- package/dist/vue-ui-kpi-u5GBFKBR.js +0 -54
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useCssVars as Re, computed as $, ref as z, onMounted as Be, openBlock as a, createElementBlock as o, normalizeClass as m, normalizeStyle as h, createBlock as Q, unref as d, createSlots as Me, withCtx as E, renderSlot as B, normalizeProps as he, guardReactiveProps as fe, createCommentVNode as b, toDisplayString as n, createElementVNode as s, Fragment as p, renderList as g, createTextVNode as Y, withKeys as je, createVNode as Xe, nextTick as be } from "vue";
|
|
2
|
-
import { u as Oe, c as Ge, t as Ee, a as Ae, p as I, b as Ue, g as Z, e as H, d as ee, o as De, X as Ye, s as pe, r as F, C as ge, m as _e, i as qe, j as L, k as q, n as He, q as We } from "./index-
|
|
3
|
-
import { u as Ke, U as Je } from "./usePrinter-
|
|
4
|
-
import Qe from "./vue-ui-skeleton-
|
|
5
|
-
import Ze from "./BaseIcon-
|
|
6
|
-
import et from "./vue-ui-accordion-
|
|
7
|
-
import { u as xe } from "./useNestedProp-
|
|
2
|
+
import { u as Oe, c as Ge, t as Ee, a as Ae, p as I, b as Ue, g as Z, e as H, d as ee, o as De, X as Ye, s as pe, r as F, C as ge, m as _e, i as qe, j as L, k as q, n as He, q as We } from "./index-BE6fhUyH.js";
|
|
3
|
+
import { u as Ke, U as Je } from "./usePrinter-CdIphKpF.js";
|
|
4
|
+
import Qe from "./vue-ui-skeleton-DZk__alb.js";
|
|
5
|
+
import Ze from "./BaseIcon-CHBghp3_.js";
|
|
6
|
+
import et from "./vue-ui-accordion-Dmz7RUKz.js";
|
|
7
|
+
import { u as xe } from "./useNestedProp-BcjRW6BJ.js";
|
|
8
8
|
import { _ as tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
9
|
const lt = ["id"], at = ["xmlns", "viewBox"], ot = { key: 0 }, st = ["fill", "font-weight", "font-size", "x", "y"], ut = ["fill", "font-weight", "font-size", "x", "y"], nt = ["id"], rt = ["stop-color"], it = ["stop-color"], ct = ["id"], dt = ["stop-color"], vt = ["stop-color"], yt = ["id"], ht = ["stop-color"], ft = ["stop-color"], bt = ["stop-color"], pt = ["id"], gt = ["stop-color"], _t = ["stop-color"], xt = ["stop-color"], mt = ["id"], kt = ["stop-color"], wt = ["stop-color"], $t = ["stop-color"], Ct = { key: 1 }, zt = ["x", "y", "font-size", "font-weight", "fill"], Tt = ["x", "y", "font-size", "font-weight", "fill"], Ft = ["d", "stroke"], Nt = ["cx", "cy", "r", "fill"], St = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick"], It = { key: 2 }, Lt = ["x", "y", "font-size", "fill", "onClick"], Pt = { key: 0 }, Vt = ["x", "y", "fill", "font-size", "font-weight"], Rt = ["x", "y", "height", "width", "fill", "rx", "onClick"], Bt = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick"], Mt = { key: 3 }, jt = ["x", "y", "fill", "font-size", "onClick"], Xt = ["d", "stroke"], Ot = ["cx", "cy", "fill", "onClick"], Gt = ["fill", "cx", "cy", "r", "onClick"], Et = { key: 4 }, At = ["x", "y", "font-size", "font-weight", "fill"], Ut = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Dt = ["y", "height", "width"], Yt = { style: { width: "100%", height: "100%", display: "flex", "align-items": "center", "justify-content": "center", "flex-direction": "column" } }, qt = { style: { display: "flex", "align-items": "center", "justify-content": "center", gap: "12px", "flex-wrap": "wrap", "flex-direction": "row" } }, Ht = {
|
|
10
10
|
viewBox: "0 0 20 20",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),_=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),_=require("./useNestedProp-B_z4-n52.cjs"),i=require("./index-BFH7X8WG.cjs"),C=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),m=l=>(t.pushScopeId("data-v-fe8d65eb"),l=l(),t.popScopeId(),l),p=["xmlns","height","width"],x={id:"follower",fy:"30%",fx:"30%"},E=["stop-color","stop-opacity"],N=m(()=>t.createElementVNode("stop",{offset:"95%","stop-color":"transparent"},null,-1)),g=["r","fill","stroke","stroke-width","stroke-dasharray"],V=["r","fill"],S={key:2,class:"wave"},w=["id"],b=["id"],B=m(()=>t.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),R=["filter","stroke"],F={key:3,class:"crosshair"},z=["x1","stroke","stroke-width","stroke-dasharray"],I=["x1","stroke","stroke-width","stroke-dasharray"],L=["y1","stroke","stroke-width","stroke-dasharray"],O=["y1","stroke","stroke-width","stroke-dasharray"],T=["cy","r","fill"],D=["cy","r","fill"],$=["cx","r","fill"],W=["cx","r","fill"],G={key:5,class:"coordinates"},P=["x","y","font-size","fill"],q=["transform"],A=["font-size","fill"],M={__name:"vue-ui-cursor",props:{config:{type:Object,default:{}}},setup(l){const k=l,{vue_ui_cursor:y}=i.useConfig(),c=t.ref(i.createUid()),e=t.computed(()=>_.useNestedProp({userConfig:k.config,defaultConfig:y})),o=t.ref({x:-100,y:-100});function u({clientX:r,clientY:h,...j}){o.value.x=r-e.value.centerCircleRadius,o.value.y=h-e.value.centerCircleRadius}function d(r){o.value.x=r.targetTouches[0].clientX-e.value.centerCircleRadius,o.value.y=r.targetTouches[0].clientY-e.value.centerCircleRadius}const v=t.ref(!0);function a(r){v.value=r}const s=t.ref(!1),n=t.ref(null);function f(){s.value=!1,n.value&&clearTimeout(n.value),t.nextTick(()=>{s.value=!0,n.value=setTimeout(()=>{s.value=!1},1e3)})}return t.onMounted(()=>{const r=e.value.parentId?document.getElementById(e.value.parentId):document.getElementsByTagName("div")[0];r.addEventListener("mousemove",u),r.addEventListener("touchmove",d),r.addEventListener("mouseleave",()=>a(!1)),r.addEventListener("mouseenter",()=>a(!0)),r.addEventListener("click",f)}),t.onBeforeUnmount(()=>{const r=e.value.parentId?document.getElementById(e.value.parentId):document.getElementsByTagName("div")[0];r.removeEventListener("mousemove",u),r.removeEventListener("touchmove",d),r.removeEventListener("mouseleave",()=>a(!1)),r.removeEventListener("mouseenter",()=>a(!0)),r.removeEventListener("click",f)}),t.computed(()=>e.value.centerCircleRadius/2.5),(r,h)=>v.value?(t.openBlock(),t.createElementBlock("svg",{key:0,"data-html2canvas-ignore":"",xmlns:t.unref(i.XMLNS),style:t.normalizeStyle(`z-index: 2147483647; overflow: visible; pointer-events: none;background: transparent; position:fixed; top:${o.value.y}px; left:${o.value.x}px;`),viewBox:"0 0 100 100",height:e.value.centerCircleRadius*2,width:e.value.centerCircleRadius*2},[t.createElementVNode("defs",null,[t.createElementVNode("radialGradient",x,[t.createElementVNode("stop",{offset:"10%","stop-color":e.value.bubbleEffectColor,"stop-opacity":e.value.bubbleEffectOpacity},null,8,E),N])]),e.value.showCenterCircle?(t.openBlock(),t.createElementBlock("circle",{key:0,cx:50,cy:50,r:e.value.centerCircleRadius,fill:e.value.centerCircleColor+t.unref(i.opacity)[e.value.centerCircleOpacity*100],stroke:e.value.centerCircleStroke,"stroke-width":e.value.centerCircleStrokeWidth,"stroke-dasharray":e.value.centerCircleDasharray},null,8,g)):t.createCommentVNode("",!0),e.value.bubbleEffect?(t.openBlock(),t.createElementBlock("circle",{key:1,cx:50,cy:50,r:e.value.centerCircleRadius,fill:"url(#follower)",stroke:"none"},null,8,V)):t.createCommentVNode("",!0),e.value.useWaveOnClick?(t.openBlock(),t.createElementBlock("g",S,[t.createElementVNode("defs",null,[t.createElementVNode("filter",{id:`blur_${c.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[t.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:4,id:`blur_std_${c.value}`},null,8,b),B],8,w)]),s.value?(t.openBlock(),t.createElementBlock("circle",{key:0,class:t.normalizeClass({"circle-wave":s.value}),cx:50,cy:50,r:50,filter:`url(#blur_${c.value})`,stroke:e.value.centerCircleStroke,fill:"none","stroke-width":"3"},null,10,R)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.value.showCrosshair?(t.openBlock(),t.createElementBlock("g",F,[t.createElementVNode("line",{x1:-e.value.centerCircleRadius+50,x2:-5e3,y1:50,y2:50,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,z),t.createElementVNode("line",{x1:50+e.value.centerCircleRadius,x2:5e3,y1:50,y2:50,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,I),t.createElementVNode("line",{x1:50,x2:50,y1:-e.value.centerCircleRadius+50,y2:-5e3,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,L),t.createElementVNode("line",{x1:50,x2:50,y1:e.value.centerCircleRadius+50,y2:5e3,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,O)])):t.createCommentVNode("",!0),e.value.showIntersectCircles?(t.openBlock(),t.createElementBlock("g",{key:4,class:t.normalizeClass({"rotating-circles":e.value.isLoading})},[t.createElementVNode("circle",{cx:50,cy:e.value.centerCircleRadius+50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,T),t.createElementVNode("circle",{cx:50,cy:-e.value.centerCircleRadius+50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,D),t.createElementVNode("circle",{cx:-e.value.centerCircleRadius+50,cy:50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,$),t.createElementVNode("circle",{cx:e.value.centerCircleRadius+50,cy:50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,W)],2)):t.createCommentVNode("",!0),e.value.showCoordinates?(t.openBlock(),t.createElementBlock("g",G,[t.createElementVNode("text",{"text-anchor":"end",x:-e.value.centerCircleRadius+50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset,y:50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset,"font-size":e.value.coordinatesFontSize,fill:e.value.coordinatesColor,style:{"font-variant-numeric":"tabular-nums"},"font-family":"Arial"},t.toDisplayString(o.value.x.toFixed(0)),9,P),t.createElementVNode("g",{transform:`translate(${50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset}, ${-e.value.centerCircleRadius+50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset})`},[t.createElementVNode("text",{"text-anchor":"start","font-size":e.value.coordinatesFontSize,fill:e.value.coordinatesColor,style:{"font-variant-numeric":"tabular-nums"},transform:"rotate(-90)","font-family":"Arial"},t.toDisplayString(o.value.y.toFixed(0)),9,A)],8,q)])):t.createCommentVNode("",!0)],12,p)):t.createCommentVNode("",!0)}},U=C._export_sfc(M,[["__scopeId","data-v-fe8d65eb"]]);exports.default=U;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as n, computed as m, onMounted as R, onBeforeUnmount as b, openBlock as o, createElementBlock as l, unref as C, normalizeStyle as E, createElementVNode as r, createCommentVNode as i, normalizeClass as p, toDisplayString as x, nextTick as F, pushScopeId as I, popScopeId as L } from "vue";
|
|
2
|
-
import { u as z } from "./useNestedProp-
|
|
3
|
-
import { u as O, c as B, X as N, r as T } from "./index-
|
|
2
|
+
import { u as z } from "./useNestedProp-BcjRW6BJ.js";
|
|
3
|
+
import { u as O, c as B, X as N, r as T } from "./index-BE6fhUyH.js";
|
|
4
4
|
import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const g = (a) => (I("data-v-fe8d65eb"), a = a(), L(), a), $ = ["xmlns", "height", "width"], W = {
|
|
6
6
|
id: "follower",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),R=require("./pdf-Cz3729tZ.cjs"),q=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),R=require("./pdf-Cz3729tZ.cjs"),q=require("./useNestedProp-B_z4-n52.cjs"),O=require("./index-BFH7X8WG.cjs"),j=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=b=>(o.pushScopeId("data-v-57895b3a"),b=b(),o.popScopeId(),b),G={key:0,"data-html2canvas-ignore":"",style:{width:"100%",display:"flex","justify-content":"end"}},U=["disabled"],J=["stroke"],K=o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-57895b3a></path><path d="M18 16v.01" data-v-57895b3a></path><path d="M6 16v.01" data-v-57895b3a></path><path d="M12 5v.01" data-v-57895b3a></path><path d="M12 12v.01" data-v-57895b3a></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-57895b3a></path>',6),Q=[K],Z={key:1},ee=["id"],te=A(()=>o.createElementVNode("div",{class:"vue-ui-dashboard-grid"},null,-1)),oe=["onMousedown","onTouchstart"],le=["onMousedown","onTouchstart"],ae=["onMousedown","onTouchstart"],ne=["onMousedown","onTouchstart"],ue=["onMousedown","onTouchstart"],M=20,se={__name:"vue-ui-dashboard",props:{dataset:Array,config:Object},emits:["change"],setup(b,{expose:$,emit:B}){const T=b;o.useCssVars(e=>({"417957d3":I.value,"60fae9e7":D.value}));const{vue_ui_dashboard:N}=O.useConfig(),i=o.computed(()=>q.useNestedProp({userConfig:T.config,defaultConfig:N})),z=o.ref(`vue-ui-dashboard-${Math.random()}`),d=o.ref(i.value.locked);function S(){d.value=!d.value}const s=o.ref(T.dataset),h=o.ref(null),u=o.ref(null),v=o.ref({x:0,y:0}),f=o.ref({x:0,y:0}),r=o.ref(null),c=o.ref(!1),p=o.ref(null),y=o.ref(!1);function E(){y.value=!0,R.pdf({domElement:document.getElementById(`vue-ui-dashboard_${z.value}`),fileName:"vue-ui-dashboard"}).finally(()=>{y.value=!1})}function x(e){if(!d.value&&(c.value=!0,p.value=e,u.value===null)){h.value=e,v.value={x:event.clientX,y:event.clientY};const t=s.value[e],a=100-t.width,l=100-t.height;t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left>a&&(t.left=a),t.top>l&&(t.top=l),t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left+t.width>100&&(t.left=100-t.width),t.top+t.height>100&&(t.top=100-t.height)}}function m(e,t){c.value=!0,p.value=e,u.value={index:e,direction:t};const a=s.value[e];f.value={x:event.clientX,y:event.clientY,initialWidth:a.width,initialHeight:a.height}}function C(e,t,a){if(u.value.direction.includes("top")){const l=e.height-a/r.value.offsetHeight*100;l>=M&&(e.top+=a/r.value.offsetHeight*100,e.height=l)}if(u.value.direction.includes("bottom")){const l=e.height+a/r.value.offsetHeight*100;l>=M&&(e.height=l)}if(u.value.direction.includes("left")){const l=e.width-t/r.value.offsetWidth*100;l>=M&&(e.left+=t/r.value.offsetWidth*100,e.width=l)}if(u.value.direction.includes("right")){const l=e.width+t/r.value.offsetWidth*100;l>=M&&(e.width=l)}}function X(e){if(!d.value){if(c.value=!0,h.value!==null){const t=s.value[h.value],a=e.clientX-v.value.x,l=e.clientY-v.value.y,n=t.left+a/r.value.offsetWidth*100,g=t.top+l/r.value.offsetHeight*100;n>=0&&g>=0&&n+t.width<=100&&g+t.height<=100&&(t.left=n,t.top=g),v.value={x:e.clientX,y:e.clientY}}if(u.value!==null){const t=s.value[u.value.index],a=e.clientX-f.value.x,l=e.clientY-f.value.y;C(t,a,l),f.value={x:e.clientX,y:e.clientY}}}}o.watch(s,e=>{e&&!c.value&&B("change",s.value)},{deep:!0});function Y(){h.value=null,u.value=null,c.value=!1,p.value=null,s.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}function V(e){d.value||(c.value=!0,p.value=e,u.value===null&&(h.value=e,v.value={x:event.touches[0].clientX,y:event.touches[0].clientY}))}function k(e,t,a){if(c.value=!0,p.value=e,u.value===null){u.value={index:e,direction:t};const l=s.value[e];f.value={x:a.touches[0].clientX,y:a.touches[0].clientY,initialWidth:l.width,initialHeight:l.height}}}function _(e){if(c.value=!0,e.preventDefault(),u.value!==null){const t=s.value[u.value.index],a=e.touches[0].clientX-f.value.x,l=e.touches[0].clientY-f.value.y;C(t,a,l),f.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function H(e){if(!d.value&&(c.value=!0,e.preventDefault(),h.value!==null)){const t=s.value[h.value],a=e.touches[0].clientX-v.value.x,l=e.touches[0].clientY-v.value.y,n=t.left+a/r.value.offsetWidth*100,g=t.top+l/r.value.offsetHeight*100;n>=0&&g>=0&&n+t.width<=100&&g+t.height<=100&&(t.left=n,t.top=g),v.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function w(){c.value=!1,p.value=null,h.value=null,u.value=null,s.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}const I=o.computed(()=>i.value.style.item.borderColor),D=o.computed(()=>i.value.style.resizeHandles.backgroundColor),W=o.computed(()=>i.value.style.board.aspectRatio),L=o.computed(()=>i.value.style.board.backgroundColor),P=o.computed(()=>i.value.style.board.border);function F(){return s.value}return $({generatePdf:E,getItemsPositions:F,toggleLock:S}),(e,t)=>(o.openBlock(),o.createElementBlock("div",null,[i.value.allowPrint?(o.openBlock(),o.createElementBlock("div",G,[o.createElementVNode("button",{class:"vue-ui-dashboard-button",onClick:E,disabled:y.value,style:o.normalizeStyle([{"margin-top":"12px"},`color:${i.value.style.board.color}`])},[y.value?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"vue-ui-dashboard-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:i.value.style.board.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Q,8,J)):(o.openBlock(),o.createElementBlock("span",Z,"PDF"))],12,U)])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"vue-ui-dashboard-container",ref_key:"dashboardContainer",ref:r,id:`vue-ui-dashboard_${z.value}`,style:o.normalizeStyle(`border:${P.value}; sbackground:${L.value}; aspect-ratio:${W.value}`)},[o.createElementVNode("div",{class:"vue-ui-dashboard-grid-container",ref:"container",onMousemove:X,onMouseup:Y,onTouchmove:H,onTouchend:w,style:o.normalizeStyle(`background:${i.value.style.board.backgroundColor}`)},[te,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,(a,l)=>(o.openBlock(),o.createElementBlock("div",{key:a.id,class:o.normalizeClass({"vue-ui-dashboard-grid-item":!0,"vue-ui-dashboard-grid-item--locked":d.value}),style:o.normalizeStyle({width:`${a.width}%`,height:`${a.height}%`,left:`${a.left}%`,top:`${a.top}%`,cursor:"move",boxShadow:p.value===l?"0 6px 12px -3px rgba(0,0,0,0.3)":"",zIndex:p.value===l?"1":"0",backgroundColor:i.value.style.item.backgroundColor}),onMousedown:n=>x(l),onTouchstart:n=>V(l)},[d.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left",onMousedown:n=>m(l,"top-left"),onTouchstart:n=>k(l,"top-left",n),onTouchmove:t[0]||(t[0]=n=>_(n)),onTouchend:w},null,40,le),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right",onMousedown:n=>m(l,"top-right"),onTouchstart:n=>k(l,"top-right",n),onTouchmove:t[1]||(t[1]=n=>_(n)),onTouchend:w},null,40,ae),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left",onMousedown:n=>m(l,"bottom-left"),onTouchstart:n=>k(l,"bottom-left",n),onTouchmove:t[2]||(t[2]=n=>_(n)),onTouchend:w},null,40,ne),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right",onMousedown:n=>m(l,"bottom-right"),onTouchstart:n=>k(l,"bottom-right",n),onTouchmove:t[3]||(t[3]=n=>_(n)),onTouchend:w},null,40,ue)],64)),o.renderSlot(e.$slots,"content",{item:a,index:l,left:a.left,top:a.top,height:a.height,width:a.width},void 0,!0)],46,oe))),128))],36)],12,ee)]))}},ie=j._export_sfc(se,[["__scopeId","data-v-57895b3a"]]);exports.default=ie;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCssVars as J, computed as _, ref as r, watch as K, openBlock as w, createElementBlock as y, createElementVNode as g, normalizeStyle as z, createCommentVNode as I, Fragment as D, renderList as Q, normalizeClass as Z, renderSlot as ee, pushScopeId as te, popScopeId as oe, createStaticVNode as ae } from "vue";
|
|
2
2
|
import { p as le } from "./pdf-97UbtKC2.js";
|
|
3
|
-
import { u as ue } from "./useNestedProp-
|
|
4
|
-
import { u as ne } from "./index-
|
|
3
|
+
import { u as ue } from "./useNestedProp-BcjRW6BJ.js";
|
|
4
|
+
import { u as ne } from "./index-BE6fhUyH.js";
|
|
5
5
|
import { _ as se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
const ie = (M) => (te("data-v-57895b3a"), M = M(), oe(), M), re = {
|
|
7
7
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),g=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),g=require("./useNestedProp-B_z4-n52.cjs"),L=require("./index-BFH7X8WG.cjs"),f={key:0},m=["d","fill"],k=["d","fill"],h=["d","fill"],v=["d","fill"],C=["d","fill"],N=["d","fill"],b=["d","fill"],B={key:1},E=["cx","cy","fill"],q={__name:"Digit",props:{quanta:{type:String,default:null},backgroundColor:{type:String,default:"#e1e5e8"},color:{type:String,default:"#000000"},x:{type:Number,default:0},y:{type:Number,default:0}},setup(e){const u=e,$=t.ref({0:"1111110",1:"0110000",2:"1101101",3:"1111001",4:"0110011",5:"1011011",6:"1011111",7:"1110000",8:"1111111",9:"1111011","-":"0000001",X:"0000000"}),l=t.computed(()=>[void 0,null].includes(u.quanta)?$.value.X:$.value[u.quanta]);return(a,x)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[[void 0,null,"."].includes(e.quanta)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("g",f,[t.createElementVNode("path",{d:`M ${e.x} ${e.y} L ${e.x+2} ${e.y-2} L ${e.x+24} ${e.y-2} L ${e.x+26} ${e.y} L ${e.x+24} ${e.y+2} L ${e.x+2} ${e.y+2}Z`,fill:l.value[0]==1?e.color:e.backgroundColor,stroke:"none"},null,8,m),t.createElementVNode("path",{d:`M ${e.x+26} ${e.y+26} L ${e.x+26} ${e.y+4} L ${e.x+28} ${e.y+2} L ${e.x+30} ${e.y+4} L ${e.x+30} ${e.y+26} L ${e.x+28} ${e.y+28} L ${e.x+26} ${e.y+26}`,fill:l.value[1]==1?e.color:e.backgroundColor,stroke:"none"},null,8,k),t.createElementVNode("path",{d:`M ${e.x+26} ${e.y+56} L ${e.x+26} ${e.y+34} L ${e.x+28} ${e.y+32} L ${e.x+30} ${e.y+34} L ${e.x+30} ${e.y+56} L ${e.x+28} ${e.y+58} L ${e.x+26} ${e.y+56}`,fill:l.value[2]==1?e.color:e.backgroundColor,stroke:"none"},null,8,h),t.createElementVNode("path",{d:`M ${e.x+2} ${e.y+58} L ${e.x} ${e.y+60} L ${e.x+2} ${e.y+62} L ${e.x+24} ${e.y+62} L ${e.x+26} ${e.y+60} L ${e.x+24} ${e.y+58} L ${e.x+2} ${e.y+58}`,fill:l.value[3]==1?e.color:e.backgroundColor,stroke:"none"},null,8,v),t.createElementVNode("path",{d:`M ${e.x} ${e.y+34} L ${e.x-2} ${e.y+32} L ${e.x-4} ${e.y+34} L ${e.x-4} ${e.y+56} L ${e.x-2} ${e.y+58} L ${e.x} ${e.y+56} L ${e.x} ${e.y+34}`,fill:l.value[4]==1?e.color:e.backgroundColor,stroke:"none"},null,8,C),t.createElementVNode("path",{d:`M ${e.x-2} ${e.y+2} L ${e.x} ${e.y+4} L ${e.x} ${e.y+26} L ${e.x-2} ${e.y+28} L ${e.x-4} ${e.y+26} L ${e.x-4} ${e.y+4} L ${e.x-2} ${e.y+2}`,fill:l.value[5]==1?e.color:e.backgroundColor,stroke:"none"},null,8,N),t.createElementVNode("path",{d:`M ${e.x+2} ${e.y+28} L ${e.x} ${e.y+30} L ${e.x+2} ${e.y+32} L ${e.x+24} ${e.y+32} L ${e.x+26} ${e.y+30} L ${e.x+24} ${e.y+28} L ${e.x+2} ${e.y+28}`,fill:l.value[6]==1?e.color:e.backgroundColor,stroke:"none"},null,8,b)])),e.quanta=="."?(t.openBlock(),t.createElementBlock("g",B,[t.createElementVNode("circle",{cx:e.x-8,cy:e.y+60,r:3,fill:e.color},null,8,E)])):t.createCommentVNode("",!0)],64))}},M=["xmlns","viewBox"],V={__name:"vue-ui-digits",props:{dataset:{type:Number,default:0},config:{type:Object,default(){return{}}}},setup(e){const u=e,{vue_ui_digits:$}=L.useConfig(),l=t.computed(()=>g.useNestedProp({userConfig:u.config,defaultConfig:$})),a=t.computed(()=>{const c=(u.dataset||0).toString().split(""),d=[],n={x:10,y:10};let i=0;for(let y=0;y<c.length;y+=1){const o=c[y];d.push({x:n.x+i,y:n.y,quanta:o}),o=="."?i+=2:i+=44}return d}),x=t.computed(()=>Math.max(...a.value.map(c=>c.x))+36);return(c,d)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:t.unref(L.XMLNS),viewBox:`0 0 ${x.value} 80`,style:t.normalizeStyle(`background:${l.value.backgroundColor};${l.value.height?`height:${l.value.height};`:""}${l.value.width?`width:${l.value.width}`:""}`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,n=>(t.openBlock(),t.createBlock(q,{x:n.x,y:n.y,quanta:n.quanta,color:l.value.digits.color,backgroundColor:l.value.digits.skeletonColor},null,8,["x","y","quanta","color","backgroundColor"]))),256))],12,M))}};exports.default=V;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as k, computed as d, openBlock as $, createElementBlock as i, Fragment as o, createElementVNode as l, createCommentVNode as m, unref as v, normalizeStyle as C, renderList as b, createBlock as N } from "vue";
|
|
2
|
-
import { u as q } from "./useNestedProp-
|
|
3
|
-
import { u as M, X as S } from "./index-
|
|
2
|
+
import { u as q } from "./useNestedProp-BcjRW6BJ.js";
|
|
3
|
+
import { u as M, X as S } from "./index-BE6fhUyH.js";
|
|
4
4
|
const w = { key: 0 }, B = ["d", "fill"], F = ["d", "fill"], X = ["d", "fill"], E = ["d", "fill"], I = ["d", "fill"], O = ["d", "fill"], A = ["d", "fill"], D = { key: 1 }, G = ["cx", "cy", "fill"], V = {
|
|
5
5
|
__name: "Digit",
|
|
6
6
|
props: {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as g, ref as d, onMounted as Be, onBeforeUnmount as Me, watch as Ge, openBlock as n, createElementBlock as r, normalizeClass as ae, normalizeStyle as C, renderSlot as b, createVNode as oe, createCommentVNode as c, createBlock as J, unref as o, createSlots as Ue, withCtx as m, normalizeProps as E, guardReactiveProps as R, createElementVNode as y, Fragment as j, renderList as W, toDisplayString as k, createTextVNode as $e, nextTick as Ee, pushScopeId as Re, popScopeId as je } from "vue";
|
|
2
|
-
import { u as We, o as Ye, e as Se, g as He, c as Xe, t as qe, a as Je, p as O, b as Ke, d as K, m as Qe, f as N, X as Ze, r as el, i as ll, j as h, k as Y, v as Te, w as tl, n as al, q as ol } from "./index-
|
|
2
|
+
import { u as We, o as Ye, e as Se, g as He, c as Xe, t as qe, a as Je, p as O, b as Ke, d as K, m as Qe, f as N, X as Ze, r as el, i as ll, j as h, k as Y, v as Te, w as tl, n as al, q as ol } from "./index-BE6fhUyH.js";
|
|
3
3
|
import { t as ul, u as sl } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as nl } from "./Title-
|
|
5
|
-
import { u as rl, U as il } from "./usePrinter-
|
|
6
|
-
import { D as vl } from "./DataTable-
|
|
7
|
-
import { _ as cl } from "./Tooltip-
|
|
8
|
-
import { L as dl } from "./Legend-
|
|
9
|
-
import hl from "./vue-ui-skeleton-
|
|
10
|
-
import fl from "./vue-ui-accordion-
|
|
11
|
-
import { u as Le } from "./useNestedProp-
|
|
4
|
+
import { _ as nl } from "./Title-BcNPXpKX.js";
|
|
5
|
+
import { u as rl, U as il } from "./usePrinter-CdIphKpF.js";
|
|
6
|
+
import { D as vl } from "./DataTable-Dytj5HQM.js";
|
|
7
|
+
import { _ as cl } from "./Tooltip-etzDGo1Y.js";
|
|
8
|
+
import { L as dl } from "./Legend-Ct8LnAy4.js";
|
|
9
|
+
import hl from "./vue-ui-skeleton-DZk__alb.js";
|
|
10
|
+
import fl from "./vue-ui-accordion-Dmz7RUKz.js";
|
|
11
|
+
import { u as Le } from "./useNestedProp-BcjRW6BJ.js";
|
|
12
12
|
import { _ as yl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const gl = (V) => (Re("data-v-b9acc50e"), V = V(), je(), V), bl = ["id"], pl = ["xmlns", "viewBox"], ml = ["id"], wl = ["stop-color"], kl = ["stop-color"], _l = ["stop-color"], xl = ["id"], Cl = ["id"], $l = /* @__PURE__ */ gl(() => /* @__PURE__ */ y("feColorMatrix", {
|
|
14
14
|
type: "saturate",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-oufiZvaS.cjs"),ae=require("./useResponsive-B3TrDDIG.cjs"),pe=require("./Title-DxNugmhI.cjs"),re=require("./usePrinter-Cc8ufBvU.cjs"),me=require("./DataTable-CHXdpx94.cjs"),ge=require("./Tooltip-BC2Wlz7P.cjs"),be=require("./Legend-BwrzHxLy.cjs"),ke=require("./vue-ui-skeleton-Fsru0dbb.cjs"),we=require("./vue-ui-accordion-DiR0dVog.cjs"),ne=require("./useNestedProp-CmTItGss.cjs"),Ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),xe=B=>(e.pushScopeId("data-v-b9acc50e"),B=B(),e.popScopeId(),B),_e=["id"],Be=["xmlns","viewBox"],Se=["id"],$e=["stop-color"],Ne=["stop-color"],Ee=["stop-color"],Le=["id"],Ve=["id"],ze=xe(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Te=["id"],Oe=["flood-color"],Fe=["d","stroke","filter"],Pe=["cx","cy","r","fill","filter"],Me=["stroke","d"],De=["d","fill","stroke","stroke-width","filter"],Ie=["cx","cy","r","fill"],Xe=["d","fill","onMouseenter","onClick"],Ae=["cx","cy","r","fill"],qe=["x","y","fill","font-size"],Re=["x","y","fill","font-size"],Ge=["x","y","fill","font-size"],Ye=["x","y","fill","font-size"],He=["filter"],Ue={key:0},je=["x","y"],We={key:1},Je=["cx","cy","fill","filter","onClick"],Ke=["text-anchor","x","y","fill","font-size","onClick"],Qe=["text-anchor","x","y","fill","font-size","onClick"],Ze={key:2},et=["x","y","width"],tt={key:3,class:"vue-data-ui-watermark"},lt=["onClick"],ot={key:0,style:{"font-variant-numeric":"tabular-nums"}},at={key:1},rt=["innerHTML"],nt={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(B,{expose:ue,emit:D}){const y=B,{vue_ui_donut:se}=a.useConfig(),S=e.computed({get(){return!!y.dataset&&y.dataset.length},set(l){return l}}),$=e.ref(null),I=e.ref(null),X=e.ref(null),L=e.ref(null);e.onMounted(()=>{if(a.objectIsEmpty(y.dataset)?a.error({componentName:"VueUiDonut",type:"dataset"}):y.dataset.forEach((l,r)=>{a.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{S.value=!1,a.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:o,index:r})})}),t.value.responsive){const l=ae.throttle(()=>{const{width:r,height:o}=ae.useResponsive({chart:$.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?X.value:null});s.value.width=r,s.value.height=o});L.value=new ResizeObserver(l),L.value.observe($.value.parentNode)}}),e.onBeforeUnmount(()=>{L.value&&L.value.disconnect()});const h=e.ref(a.createUid()),ie=e.ref(null),T=e.ref(!1),O=e.ref(""),p=e.ref(null),A=e.ref(0),t=e.computed(()=>{const l=ne.useNestedProp({userConfig:y.config,defaultConfig:se});return l.theme?{...ne.useNestedProp({userConfig:a.themes.vue_ui_donut[l.theme]||y.config,defaultConfig:l}),customPalette:a.themePalettes[l.theme]||a.palette}:l}),{isPrinting:q,isImaging:R,generatePdf:G,generateImage:Y}=re.usePrinter({elementId:`donut__${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut"}),H=e.computed(()=>a.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}),s=e.ref({height:360,width:512}),N=e.computed(()=>{const l=t.value.style.chart.layout.donut.strokeWidth/512,r=s.value.width*l;return r>t.value.style.chart.layout.donut.strokeWidth?t.value.style.chart.layout.donut.strokeWidth:r}),g=e.computed(()=>y.dataset.map((l,r)=>({name:l.name,color:a.convertColorToHex(l.color)||H.value[r]||a.palette[r]||a.palette[r%a.palette.length],value:l.values.reduce((o,n)=>o+n,0),absoluteValues:l.values,comment:l.comment||""}))),v=e.ref(g.value);e.watch(()=>g.value,l=>v.value=l);function ce(){return g.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const f=e.ref([]),U=e.ref(null),j=e.ref(null),C=e.ref(!1);function W(l){const r=g.value.find((u,i)=>i===l);let n=v.value.find((u,i)=>i===l).value;if(f.value.includes(l)){let i=function(){n>u?(cancelAnimationFrame(U.value),v.value=v.value.map((d,M)=>l===M?{...d,value:u}:d),C.value=!1):(C.value=!0,n+=u*.025,v.value=v.value.map((d,M)=>l===M?{...d,value:n}:d),U.value=requestAnimationFrame(i))};f.value=f.value.filter(d=>d!==l);const u=r.value;i()}else if(f.value.length<g.value.length-1){let u=function(){n<.1?(cancelAnimationFrame(j.value),f.value.push(l),v.value=v.value.map((i,d)=>l===d?{...i,value:0}:i),C.value=!1):(C.value=!0,n/=1.1,v.value=v.value.map((i,d)=>l===d?{...i,value:n}:i),j.value=requestAnimationFrame(u))};u()}D("selectLegend",x.value.map(u=>({name:u.name,color:u.color,value:u.value})))}const x=e.computed(()=>(v.value.forEach((l,r)=>{if([null,void 0].includes(l.values))return{...l,values:[]}}),v.value.map((l,r)=>({...l,seriesIndex:r})).filter((l,r)=>!f.value.includes(r)))),J=e.computed(()=>y.dataset.map((l,r)=>({name:l.name,color:a.convertColorToHex(l.color)||H.value[r]||a.palette[r]||a.palette[r%a.palette.length],value:(l.values||[]).reduce((o,n)=>o+n,0),shape:"circle"})).map((l,r)=>({...l,proportion:l.value/y.dataset.map(o=>(o.values||[]).reduce((n,u)=>n+u,0)).reduce((o,n)=>o+n,0),opacity:f.value.includes(r)?.5:1,segregate:()=>W(r),isSegregated:f.value.includes(r)}))),de=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":""})),b=e.computed(()=>{const l=Math.min(s.value.width/3,s.value.height/3);return l<55?55:l}),w=e.computed(()=>a.makeDonut({series:x.value},s.value.width/2,s.value.height/2,b.value,b.value,1.99999,2,1,360,105.25,N.value));function _(l){return l.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function K(l,r){return isNaN(l.value/Q(r))?0:(l.value/Q(r)*100).toFixed(0)+"%"}function Q(l){return[...l].map(r=>r.value).reduce((r,o)=>r+o,0)}const m=e.computed(()=>x.value.map(l=>l.value).reduce((l,r)=>l+r,0)),ve=e.computed(()=>m.value/x.value.length),F=e.ref(null);function he({datapoint:l,relativeIndex:r,seriesIndex:o,show:n=!1}){F.value={datapoint:l,seriesIndex:o,config:t.value,series:g.value},T.value=n,p.value=r;let u="";const i=t.value.style.chart.tooltip.customFormat;a.isFunction(i)&&a.functionReturnsString(()=>i({seriesIndex:o,datapoint:l,series:g.value,config:t.value}))?O.value=i({seriesIndex:o,datapoint:l,series:g.value,config:t.value}):(u+=`<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>`,u+=`<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&&(u+=`<b>${a.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})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:u+=`<b>${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),t.value.style.chart.comments.showInTooltip&&l.comment&&(u+=`<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${l.color}">${l.comment}</div>`),O.value=`<div>${u}</div>`)}function P(l){return t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==l?`url(#blur_${h.value})`:""}const k=e.computed(()=>{const l=x.value.map(o=>({name:o.name,color:o.color})),r=x.value.map(o=>o.value);return{head:l,body:r}});function Z(){e.nextTick(()=>{const l=k.value.head.map((n,u)=>[[n.name],[k.value.body[u]],[isNaN(k.value.body[u]/m.value)?"-":k.value.body[u]/m.value*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=a.createCsvContent(r);a.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const V=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>',a.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%"],r=k.value.head.map((u,i)=>{const d=a.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},d,isNaN(k.value.body[i]/m.value)?"-":(k.value.body[i]/m.value*100).toFixed(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:r,config:o}}),E=e.ref(!1);function fe(l){E.value=l,A.value+=1}const ee=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function ye(l){return l.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(r=>"-").join("")}function z(l,r){D("selectDatapoint",{datapoint:l,index:r})}function te(){c.value.showTable=!c.value.showTable}function le(){c.value.dataLabels.show=!c.value.dataLabels.show}function oe(){c.value.showTooltip=!c.value.showTooltip}return ue({getData:ce,generatePdf:G,generateCsv:Z,generateImage:Y,toggleTable:te,toggleLabels:le,toggleTooltip:oe}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:$,class:e.normalizeClass(`vue-ui-donut ${E.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__${h.value}`},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:I,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(pe._sfc_main,{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"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&S.value?(e.openBlock(),e.createBlock(re.UserOptions,{ref_key:"details",ref:ie,key:`user_option_${A.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(q),isImaging:e.unref(R),uid:h.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:E.value,chartElement:$.value,isTooltip:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},onToggleFullscreen:fe,onGeneratePdf:e.unref(G),onGenerateCsv:Z,onGenerateImage:e.unref(Y),onToggleTable:te,onToggleLabels:le,onToggleTooltip:oe},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.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}: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:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","isTooltip","titles","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":E.value,"vue-data-ui-fulscreen--off":!E.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,$e),e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+e.unref(a.opacity)[t.value.style.chart.gradientIntensity]},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(a.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Ee)],8,Se)):e.createCommentVNode("",!0)]),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:2,id:`blur_std_${h.value}`},null,8,Ve),ze],8,Le),e.createElementVNode("filter",{id:`shadow_${h.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,Oe)],8,Te)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(a.calcNutArrowPath)(o,{x:s.value.width/2,y:s.value.height/2},16,16,!1,!1,N.value),stroke:o.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:P(n)},null,8,Fe)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("circle",{cx:s.value.width/2,cy:s.value.height/2,r:b.value<=0?10:b.value,fill:t.value.style.chart.backgroundColor,filter:t.value.style.chart.layout.donut.useShadow?`url(#shadow_${h.value})`:""},null,8,Pe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:o.arcSlice,fill:"#FFFFFF"},null,8,Me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:o.arcSlice,fill:`${o.color}CC`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:P(n)},null,8,De))),256)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:s.value.width/2,cy:s.value.height/2,r:b.value<=0?10:b.value,fill:`url(#gradient_${h.value})`},null,8,Ie)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("path",{"data-cy-donut-trap":"",d:o.arcSlice,fill:p.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:u=>he({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:r[0]||(r[0]=u=>{T.value=!1,p.value=null}),onClick:u=>z(o,n)},null,40,Xe))),256)),t.value.style.chart.layout.labels.hollow.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:s.value.width/2,cy:s.value.height/2,r:b.value-N.value<=0?10:b.value-N.value,fill:t.value.style.chart.backgroundColor},null,8,Ae)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"middle",x:s.value.width/2,y:s.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,qe)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"middle",x:s.value.width/2,y:s.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(a.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,Re)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:4,"text-anchor":"middle",x:s.value.width/2,y:s.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,Ge)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:5,"text-anchor":"middle",x:s.value.width/2,y:s.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(C.value?"--":e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.hollow.average.value.prefix,v:ve.value,s:t.value.style.chart.layout.labels.hollow.average.value.suffix,r:t.value.style.chart.layout.labels.hollow.average.value.rounding})),13,Ye)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",{filter:P(n),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="end"?e.unref(a.calcMarkerOffsetX)(o).x-120:e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="middle"?e.unref(a.calcMarkerOffsetX)(o).x-60:e.unref(a.calcMarkerOffsetX)(o).x,y:e.unref(a.calcMarkerOffsetY)(o)-(ee.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(l.$slots,"dataLabel",e.normalizeProps(e.guardReactiveProps({datapoint:o,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===n,isSafari:ee.value,isVisible:_(o)&&c.value.dataLabels.show,textAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16,!0).anchor,flexAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16).anchor,percentage:K(o,w.value)})),void 0,!0)])],8,je))])):(e.openBlock(),e.createElementBlock("g",We,[_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(a.calcMarkerOffsetX)(o).x,cy:e.unref(a.calcMarkerOffsetY)(o)-3.5,fill:o.color,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===n?"":`url(#blur_${h.value})`,onClick:u=>z(o,n)},null,8,Je)):e.createCommentVNode("",!0),_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(a.calcMarkerOffsetX)(o,!0,12).anchor,x:e.unref(a.calcMarkerOffsetX)(o,!0,12).x,y:e.unref(a.calcMarkerOffsetY)(o),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:u=>z(o,n)},e.toDisplayString(K(o,w.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,rounding:t.value.style.chart.layout.labels.value.rounding})})`:""),13,Ke)):e.createCommentVNode("",!0),_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":e.unref(a.calcMarkerOffsetX)(o).anchor,x:e.unref(a.calcMarkerOffsetX)(o,!0,12).x,y:e.unref(a.calcMarkerOffsetY)(o)+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:u=>z(o,n)},e.toDisplayString(o.name),13,Qe)):e.createCommentVNode("",!0)])),c.value.dataLabels.show&&t.value.style.chart.comments.show&&o.comment?(e.openBlock(),e.createElementBlock("g",Ze,[_(o)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="end"?e.unref(a.calcMarkerOffsetX)(o).x-t.value.style.chart.comments.width:e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="middle"?e.unref(a.calcMarkerOffsetX)(o).x-t.value.style.chart.comments.width/2:e.unref(a.calcMarkerOffsetX)(o).x),y:e.unref(a.calcMarkerOffsetY)(o)+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(l.$slots,"plot-comment",{plot:{...o,textAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16,!0).anchor,flexAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16).anchor}},void 0,!0)])],8,et)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,He))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,Be)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:4,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:N.value*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:X},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(be.Legend,{key:0,legendSet:J.value,config:de.value,onClickMarker:r[1]||(r[1]=({i:o})=>W(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:u=>o.segregate(),style:e.normalizeStyle(`opacity:${f.value.includes(n)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(a.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}))+" ",1),f.value.includes(n)?(e.openBlock(),e.createElementBlock("span",at," ( "+e.toDisplayString(ye(o.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",ot," ("+e.toDisplayString(isNaN(o.value/m.value)?"-":e.unref(a.dataLabel)({v:C.value?o.proportion*100:o.value/m.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,lt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:J.value},void 0,!0)],512),e.createVNode(ge._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:$.value,content:O.value,isCustom:e.unref(a.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),S.value?(e.openBlock(),e.createBlock(we.default,{key:5,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.createVNode(me.DataTable,{colNames:V.value.colNames,head:V.value.head,body:V.value.body,config:V.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[2]||(r[2]=o=>c.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,rt)]),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,_e))}},ut=Ce._export_sfc(nt,[["__scopeId","data-v-b9acc50e"]]);exports.default=ut;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-BFH7X8WG.cjs"),ae=require("./useResponsive-B3TrDDIG.cjs"),pe=require("./Title-CSQdI1EY.cjs"),re=require("./usePrinter-hyuaFHQj.cjs"),me=require("./DataTable-D_2ZW2eI.cjs"),ge=require("./Tooltip-B-laoopT.cjs"),be=require("./Legend-tvvMRnbi.cjs"),ke=require("./vue-ui-skeleton-Df1qBO2k.cjs"),we=require("./vue-ui-accordion-CvZhABQM.cjs"),ne=require("./useNestedProp-B_z4-n52.cjs"),Ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),xe=B=>(e.pushScopeId("data-v-b9acc50e"),B=B(),e.popScopeId(),B),_e=["id"],Be=["xmlns","viewBox"],Se=["id"],$e=["stop-color"],Ne=["stop-color"],Ee=["stop-color"],Le=["id"],Ve=["id"],ze=xe(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Te=["id"],Oe=["flood-color"],Fe=["d","stroke","filter"],Pe=["cx","cy","r","fill","filter"],Me=["stroke","d"],De=["d","fill","stroke","stroke-width","filter"],Ie=["cx","cy","r","fill"],Xe=["d","fill","onMouseenter","onClick"],Ae=["cx","cy","r","fill"],qe=["x","y","fill","font-size"],Re=["x","y","fill","font-size"],Ge=["x","y","fill","font-size"],Ye=["x","y","fill","font-size"],He=["filter"],Ue={key:0},je=["x","y"],We={key:1},Je=["cx","cy","fill","filter","onClick"],Ke=["text-anchor","x","y","fill","font-size","onClick"],Qe=["text-anchor","x","y","fill","font-size","onClick"],Ze={key:2},et=["x","y","width"],tt={key:3,class:"vue-data-ui-watermark"},lt=["onClick"],ot={key:0,style:{"font-variant-numeric":"tabular-nums"}},at={key:1},rt=["innerHTML"],nt={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(B,{expose:ue,emit:D}){const y=B,{vue_ui_donut:se}=a.useConfig(),S=e.computed({get(){return!!y.dataset&&y.dataset.length},set(l){return l}}),$=e.ref(null),I=e.ref(null),X=e.ref(null),L=e.ref(null);e.onMounted(()=>{if(a.objectIsEmpty(y.dataset)?a.error({componentName:"VueUiDonut",type:"dataset"}):y.dataset.forEach((l,r)=>{a.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{S.value=!1,a.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:o,index:r})})}),t.value.responsive){const l=ae.throttle(()=>{const{width:r,height:o}=ae.useResponsive({chart:$.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?X.value:null});s.value.width=r,s.value.height=o});L.value=new ResizeObserver(l),L.value.observe($.value.parentNode)}}),e.onBeforeUnmount(()=>{L.value&&L.value.disconnect()});const h=e.ref(a.createUid()),ie=e.ref(null),T=e.ref(!1),O=e.ref(""),p=e.ref(null),A=e.ref(0),t=e.computed(()=>{const l=ne.useNestedProp({userConfig:y.config,defaultConfig:se});return l.theme?{...ne.useNestedProp({userConfig:a.themes.vue_ui_donut[l.theme]||y.config,defaultConfig:l}),customPalette:a.themePalettes[l.theme]||a.palette}:l}),{isPrinting:q,isImaging:R,generatePdf:G,generateImage:Y}=re.usePrinter({elementId:`donut__${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut"}),H=e.computed(()=>a.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}),s=e.ref({height:360,width:512}),N=e.computed(()=>{const l=t.value.style.chart.layout.donut.strokeWidth/512,r=s.value.width*l;return r>t.value.style.chart.layout.donut.strokeWidth?t.value.style.chart.layout.donut.strokeWidth:r}),g=e.computed(()=>y.dataset.map((l,r)=>({name:l.name,color:a.convertColorToHex(l.color)||H.value[r]||a.palette[r]||a.palette[r%a.palette.length],value:l.values.reduce((o,n)=>o+n,0),absoluteValues:l.values,comment:l.comment||""}))),v=e.ref(g.value);e.watch(()=>g.value,l=>v.value=l);function ce(){return g.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const f=e.ref([]),U=e.ref(null),j=e.ref(null),C=e.ref(!1);function W(l){const r=g.value.find((u,i)=>i===l);let n=v.value.find((u,i)=>i===l).value;if(f.value.includes(l)){let i=function(){n>u?(cancelAnimationFrame(U.value),v.value=v.value.map((d,M)=>l===M?{...d,value:u}:d),C.value=!1):(C.value=!0,n+=u*.025,v.value=v.value.map((d,M)=>l===M?{...d,value:n}:d),U.value=requestAnimationFrame(i))};f.value=f.value.filter(d=>d!==l);const u=r.value;i()}else if(f.value.length<g.value.length-1){let u=function(){n<.1?(cancelAnimationFrame(j.value),f.value.push(l),v.value=v.value.map((i,d)=>l===d?{...i,value:0}:i),C.value=!1):(C.value=!0,n/=1.1,v.value=v.value.map((i,d)=>l===d?{...i,value:n}:i),j.value=requestAnimationFrame(u))};u()}D("selectLegend",x.value.map(u=>({name:u.name,color:u.color,value:u.value})))}const x=e.computed(()=>(v.value.forEach((l,r)=>{if([null,void 0].includes(l.values))return{...l,values:[]}}),v.value.map((l,r)=>({...l,seriesIndex:r})).filter((l,r)=>!f.value.includes(r)))),J=e.computed(()=>y.dataset.map((l,r)=>({name:l.name,color:a.convertColorToHex(l.color)||H.value[r]||a.palette[r]||a.palette[r%a.palette.length],value:(l.values||[]).reduce((o,n)=>o+n,0),shape:"circle"})).map((l,r)=>({...l,proportion:l.value/y.dataset.map(o=>(o.values||[]).reduce((n,u)=>n+u,0)).reduce((o,n)=>o+n,0),opacity:f.value.includes(r)?.5:1,segregate:()=>W(r),isSegregated:f.value.includes(r)}))),de=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":""})),b=e.computed(()=>{const l=Math.min(s.value.width/3,s.value.height/3);return l<55?55:l}),w=e.computed(()=>a.makeDonut({series:x.value},s.value.width/2,s.value.height/2,b.value,b.value,1.99999,2,1,360,105.25,N.value));function _(l){return l.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function K(l,r){return isNaN(l.value/Q(r))?0:(l.value/Q(r)*100).toFixed(0)+"%"}function Q(l){return[...l].map(r=>r.value).reduce((r,o)=>r+o,0)}const m=e.computed(()=>x.value.map(l=>l.value).reduce((l,r)=>l+r,0)),ve=e.computed(()=>m.value/x.value.length),F=e.ref(null);function he({datapoint:l,relativeIndex:r,seriesIndex:o,show:n=!1}){F.value={datapoint:l,seriesIndex:o,config:t.value,series:g.value},T.value=n,p.value=r;let u="";const i=t.value.style.chart.tooltip.customFormat;a.isFunction(i)&&a.functionReturnsString(()=>i({seriesIndex:o,datapoint:l,series:g.value,config:t.value}))?O.value=i({seriesIndex:o,datapoint:l,series:g.value,config:t.value}):(u+=`<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>`,u+=`<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&&(u+=`<b>${a.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})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:u+=`<b>${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),t.value.style.chart.comments.showInTooltip&&l.comment&&(u+=`<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${l.color}">${l.comment}</div>`),O.value=`<div>${u}</div>`)}function P(l){return t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==l?`url(#blur_${h.value})`:""}const k=e.computed(()=>{const l=x.value.map(o=>({name:o.name,color:o.color})),r=x.value.map(o=>o.value);return{head:l,body:r}});function Z(){e.nextTick(()=>{const l=k.value.head.map((n,u)=>[[n.name],[k.value.body[u]],[isNaN(k.value.body[u]/m.value)?"-":k.value.body[u]/m.value*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=a.createCsvContent(r);a.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const V=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>',a.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%"],r=k.value.head.map((u,i)=>{const d=a.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},d,isNaN(k.value.body[i]/m.value)?"-":(k.value.body[i]/m.value*100).toFixed(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:r,config:o}}),E=e.ref(!1);function fe(l){E.value=l,A.value+=1}const ee=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function ye(l){return l.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(r=>"-").join("")}function z(l,r){D("selectDatapoint",{datapoint:l,index:r})}function te(){c.value.showTable=!c.value.showTable}function le(){c.value.dataLabels.show=!c.value.dataLabels.show}function oe(){c.value.showTooltip=!c.value.showTooltip}return ue({getData:ce,generatePdf:G,generateCsv:Z,generateImage:Y,toggleTable:te,toggleLabels:le,toggleTooltip:oe}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:$,class:e.normalizeClass(`vue-ui-donut ${E.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__${h.value}`},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:I,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(pe._sfc_main,{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"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&S.value?(e.openBlock(),e.createBlock(re.UserOptions,{ref_key:"details",ref:ie,key:`user_option_${A.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(q),isImaging:e.unref(R),uid:h.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:E.value,chartElement:$.value,isTooltip:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},onToggleFullscreen:fe,onGeneratePdf:e.unref(G),onGenerateCsv:Z,onGenerateImage:e.unref(Y),onToggleTable:te,onToggleLabels:le,onToggleTooltip:oe},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.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}: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:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","isTooltip","titles","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":E.value,"vue-data-ui-fulscreen--off":!E.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,$e),e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+e.unref(a.opacity)[t.value.style.chart.gradientIntensity]},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(a.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Ee)],8,Se)):e.createCommentVNode("",!0)]),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:2,id:`blur_std_${h.value}`},null,8,Ve),ze],8,Le),e.createElementVNode("filter",{id:`shadow_${h.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,Oe)],8,Te)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(a.calcNutArrowPath)(o,{x:s.value.width/2,y:s.value.height/2},16,16,!1,!1,N.value),stroke:o.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:P(n)},null,8,Fe)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("circle",{cx:s.value.width/2,cy:s.value.height/2,r:b.value<=0?10:b.value,fill:t.value.style.chart.backgroundColor,filter:t.value.style.chart.layout.donut.useShadow?`url(#shadow_${h.value})`:""},null,8,Pe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:o.arcSlice,fill:"#FFFFFF"},null,8,Me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:o.arcSlice,fill:`${o.color}CC`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:P(n)},null,8,De))),256)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:s.value.width/2,cy:s.value.height/2,r:b.value<=0?10:b.value,fill:`url(#gradient_${h.value})`},null,8,Ie)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("path",{"data-cy-donut-trap":"",d:o.arcSlice,fill:p.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:u=>he({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:r[0]||(r[0]=u=>{T.value=!1,p.value=null}),onClick:u=>z(o,n)},null,40,Xe))),256)),t.value.style.chart.layout.labels.hollow.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:s.value.width/2,cy:s.value.height/2,r:b.value-N.value<=0?10:b.value-N.value,fill:t.value.style.chart.backgroundColor},null,8,Ae)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"middle",x:s.value.width/2,y:s.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,qe)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"middle",x:s.value.width/2,y:s.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(a.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,Re)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:4,"text-anchor":"middle",x:s.value.width/2,y:s.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,Ge)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:5,"text-anchor":"middle",x:s.value.width/2,y:s.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(C.value?"--":e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.hollow.average.value.prefix,v:ve.value,s:t.value.style.chart.layout.labels.hollow.average.value.suffix,r:t.value.style.chart.layout.labels.hollow.average.value.rounding})),13,Ye)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",{filter:P(n),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="end"?e.unref(a.calcMarkerOffsetX)(o).x-120:e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="middle"?e.unref(a.calcMarkerOffsetX)(o).x-60:e.unref(a.calcMarkerOffsetX)(o).x,y:e.unref(a.calcMarkerOffsetY)(o)-(ee.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(l.$slots,"dataLabel",e.normalizeProps(e.guardReactiveProps({datapoint:o,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===n,isSafari:ee.value,isVisible:_(o)&&c.value.dataLabels.show,textAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16,!0).anchor,flexAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16).anchor,percentage:K(o,w.value)})),void 0,!0)])],8,je))])):(e.openBlock(),e.createElementBlock("g",We,[_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(a.calcMarkerOffsetX)(o).x,cy:e.unref(a.calcMarkerOffsetY)(o)-3.5,fill:o.color,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===n?"":`url(#blur_${h.value})`,onClick:u=>z(o,n)},null,8,Je)):e.createCommentVNode("",!0),_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(a.calcMarkerOffsetX)(o,!0,12).anchor,x:e.unref(a.calcMarkerOffsetX)(o,!0,12).x,y:e.unref(a.calcMarkerOffsetY)(o),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:u=>z(o,n)},e.toDisplayString(K(o,w.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,rounding:t.value.style.chart.layout.labels.value.rounding})})`:""),13,Ke)):e.createCommentVNode("",!0),_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":e.unref(a.calcMarkerOffsetX)(o).anchor,x:e.unref(a.calcMarkerOffsetX)(o,!0,12).x,y:e.unref(a.calcMarkerOffsetY)(o)+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:u=>z(o,n)},e.toDisplayString(o.name),13,Qe)):e.createCommentVNode("",!0)])),c.value.dataLabels.show&&t.value.style.chart.comments.show&&o.comment?(e.openBlock(),e.createElementBlock("g",Ze,[_(o)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="end"?e.unref(a.calcMarkerOffsetX)(o).x-t.value.style.chart.comments.width:e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="middle"?e.unref(a.calcMarkerOffsetX)(o).x-t.value.style.chart.comments.width/2:e.unref(a.calcMarkerOffsetX)(o).x),y:e.unref(a.calcMarkerOffsetY)(o)+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(l.$slots,"plot-comment",{plot:{...o,textAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16,!0).anchor,flexAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16).anchor}},void 0,!0)])],8,et)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,He))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,Be)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:4,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:N.value*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:X},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(be.Legend,{key:0,legendSet:J.value,config:de.value,onClickMarker:r[1]||(r[1]=({i:o})=>W(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:u=>o.segregate(),style:e.normalizeStyle(`opacity:${f.value.includes(n)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(a.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}))+" ",1),f.value.includes(n)?(e.openBlock(),e.createElementBlock("span",at," ( "+e.toDisplayString(ye(o.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",ot," ("+e.toDisplayString(isNaN(o.value/m.value)?"-":e.unref(a.dataLabel)({v:C.value?o.proportion*100:o.value/m.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,lt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:J.value},void 0,!0)],512),e.createVNode(ge._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:$.value,content:O.value,isCustom:e.unref(a.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),S.value?(e.openBlock(),e.createBlock(we.default,{key:5,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.createVNode(me.DataTable,{colNames:V.value.colNames,head:V.value.head,body:V.value.body,config:V.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[2]||(r[2]=o=>c.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,rt)]),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,_e))}},ut=Ce._export_sfc(nt,[["__scopeId","data-v-b9acc50e"]]);exports.default=ut;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-oufiZvaS.cjs"),me=require("./Title-DxNugmhI.cjs"),le=require("./usePrinter-Cc8ufBvU.cjs"),ge=require("./DataTable-CHXdpx94.cjs"),fe=require("./Legend-BwrzHxLy.cjs"),ke=require("./vue-ui-skeleton-Fsru0dbb.cjs"),pe=require("./Slicer-xKlzke1v.cjs"),be=require("./vue-ui-accordion-DiR0dVog.cjs"),oe=require("./useNestedProp-CmTItGss.cjs"),xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Be=["id"],Ce=["xmlns","viewBox"],_e=["id"],Ee=["stop-color"],Ne=["stop-color"],we=["id"],Se=["stop-color"],Le=["stop-color"],Ve=["stop-color"],$e={key:0},Fe=["x1","x2","y1","y2","stroke","stroke-width"],ze=["x1","x2","y1","y2","stroke","stroke-width"],Ae={key:0},De=["x1","x2","y1","y2","stroke","stroke-width"],Pe=["x1","x2","y1","y2","stroke","stroke-width"],Te=["x","y","font-size","fill","font-weight"],Oe=["text-anchor","font-size","fill","transform"],Me=["x1","y1","x2","y2","stroke","stroke-width"],Ie={key:1},He=["cx","cy","r","fill"],Re={key:0},We={key:0},Ue=["d","stroke"],Xe=["text-anchor","x","y","fill"],qe=["cx","cy","r","fill"],Ge={key:0},Ye=["cx","cy","fill"],je={key:1},Ke=["d","fill","stroke"],Je={key:2},Qe=["d","fill","stroke"],Ze=["x","y","font-size","fill"],et=["x","y","width","fill","onClick"],tt=["x","y","width","height","onMouseenter","onClick"],lt={key:3,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},ot=["x","y","width","height","fill"],at=["x1","y1","x2","y2","stroke"],ut=["x1","y2","x2","y1","stroke"],nt=["onKeypress","cx","cy","r"],rt=["d","stroke"],st=["cx","cy","r","fill"],ct=["d","fill","stroke"],it={class:"vue-ui-donut-evolution-focus"},dt=["text-anchor","x","y","fill"],vt=["cx","cy","r","fill"],ht=["cx","cy","r","fill"],yt=["x","y","fill"],mt=["x","y","font-size","fill"],gt={key:3,class:"vue-data-ui-watermark"},ft=["onClick"],kt={key:0},pt={key:1},bt={key:0},xt={key:1},Bt={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ae,{expose:ue,emit:I}){const x=ae,{vue_ui_donut_evolution:ne}=c.useConfig(),$=e.computed(()=>!!x.dataset&&x.dataset.length),i=e.ref({start:0,end:Math.max(...x.dataset.map(o=>o.values.length))});function re(){i.value={start:0,end:L.value},W.value+=1}e.onMounted(()=>{c.objectIsEmpty(x.dataset)?c.error({componentName:"VueUiDonutEvolution",type:"dataset"}):x.dataset.length&&x.dataset.forEach((o,r)=>{c.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{c.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:r})})})});const _=e.ref(c.createUid()),y=e.ref([]),v=e.ref(null),A=e.ref(null),k=e.ref(!1),B=e.ref(null),H=e.ref(null),R=e.ref(0),W=e.ref(0),t=e.computed(()=>{const o=oe.useNestedProp({userConfig:x.config,defaultConfig:ne});return o.theme?{...oe.useNestedProp({userConfig:c.themes.vue_ui_donut_evolution[o.theme]||x.config,defaultConfig:o}),customPalette:c.themePalettes[o.theme]||c.palette}:o}),{isPrinting:U,isImaging:X,generatePdf:q,generateImage:G}=le.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution"}),se=e.computed(()=>c.convertCustomPalette(t.value.customPalette)),F=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})),n=e.computed(()=>{const o=t.value.style.chart.layout.height,r=t.value.style.chart.layout.width,l=o-u.value.top-u.value.bottom,s=r-u.value.left-u.value.right;return{absoluteHeight:o,absoluteWidth:r,centerX:u.value.left+s/2,centerY:u.value.top+l/2,height:l,width:s}}),C=e.computed(()=>(x.dataset.forEach((o,r)=>{[null,void 0].includes(o.name)&&c.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:r}),[null,void 0].includes(o.values)&&c.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:r})}),x.dataset.map((o,r)=>({...o,values:o.values||[],color:c.convertColorToHex(o.color)||se.value[r]||c.palette[r]||c.palette[r%c.palette.length],length:(o.values||[]).length,uid:c.createUid()})))),S=e.computed(()=>C.value.filter(o=>!y.value.includes(o.uid)).map(o=>({...o,values:o.values.filter((r,l)=>l>=i.value.start&&l<=i.value.end)}))),L=e.computed(()=>Math.max(...S.value.map(o=>o.length))),g=e.computed(()=>n.value.width/(i.value.end-i.value.start)),m=e.computed(()=>{const o=[];for(let a=0;a<i.value.end-i.value.start;a+=1){const h=S.value.map(b=>b.values[a]??null),d=h.filter(b=>[void 0,null].includes(b)).length===h.length,p=h.reduce((b,f)=>b+f,0),M=h.map(b=>b/p),w=u.value.left+g.value*a+g.value/2;o.push({index:a,percentages:M,subtotal:d||p<0?null:p,values:h,x:w})}const r=0,l=Math.max(...o.map(a=>a.subtotal)),s=o.length===1?l*2:l;return o.map((a,h)=>{const d=g.value/2*.7,p=d>n.value.width/16?n.value.width/16:d,M=v.value===a.index?n.value.width/16:p,w=o.length>4?d*2:d*2>g.value/2*.7?g.value/2*.7:d*2,b=n.value.absoluteHeight-u.value.bottom-n.value.height*a.subtotal/c.calculateNiceScale(r,s,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...a,y:b,radius:p,activeRadius:M,hoverRadius:w,donut:c.makeDonut({series:S.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[h]??0}))},a.x,b,p,p,1.99999,2,1,360,105.25,p/2),donutHover:c.makeDonut({series:S.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[h]??0}))},a.x,b,w,w,1.99999,2,1,360,105.25,w/2),donutFocus:c.makeDonut({series:S.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[h]??0}))},n.value.centerX,n.value.centerY,n.value.height/3.6,n.value.height/3.6,1.99999,2,1,360,105.25,n.value.height/6)}})});function z(o){return`${t.value.style.chart.layout.dataLabels.prefix}${isNaN(o)?"-":Number(o.toFixed(t.value.style.chart.layout.dataLabels.rounding)).toLocaleString()}${t.value.style.chart.layout.dataLabels.suffix}`}const D=e.computed(()=>({max:Math.max(...m.value.map(o=>o.subtotal)),min:0})),E=e.computed(()=>{const o=m.value.length===1?D.value.max*2:D.value.max;return c.calculateNiceScale(D.value.min,o,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function ce(o){return o/E.value.max}const ie=e.computed(()=>E.value.ticks.map(o=>({y:n.value.absoluteHeight-u.value.bottom-n.value.height*ce(o),value:o})));function Y(o,r){return isNaN(o.value/c.sumByAttribute(r,"value"))?0:(o.value/c.sumByAttribute(r,"value")*100).toFixed(0)+"%"}function j(){k.value||(v.value=null,A.value=null)}function de(o){k.value||(v.value=o.index,A.value=o)}const P=e.ref(null);function T(o,r){o.subtotal&&(A.value=null,v.value=null,k.value=!0,B.value=o,[null,void 0].includes(r)||(P.value=r))}function K(){B.value=null,k.value=!1,P.value=null}const J=e.computed(()=>C.value.map((o,r)=>({name:o.name,value:o.values.slice(i.value.start,i.value.end).reduce((l,s)=>l+s,0),shape:"circle",uid:o.uid,color:o.color})).sort((o,r)=>r.value-o.value).map(o=>({...o,opacity:y.value.includes(o.uid)?.5:1,segregate:()=>O(o.uid),isSegregated:y.value.includes(o.uid)}))),Q=e.computed(()=>m.value.map(o=>o.subtotal).reduce((o,r)=>o+r,0)),ve=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 O(o){if(y.value.includes(o))y.value=y.value.filter(r=>r!==o),I("selectLegend",null);else{if(y.value.length===C.value.length-1)return;y.value.push(o),I("selectLegend",C.value.find(r=>r.uid===o))}B.value&&T(m.value.find((r,l)=>l===P.value))}const N=e.computed(()=>{const o=[""].concat(C.value.filter(a=>!y.value.includes(a.uid)).map(a=>({name:a.name,color:a.color}))).concat(["Σ"]);let r=[];for(let a=0;a<L.value;a+=1){const h=C.value.filter(d=>!y.value.includes(d.uid)).map(d=>d.values[a]??0).reduce((d,p)=>d+p,0);r.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[a]??"-"].concat(C.value.filter(d=>!y.value.includes(d.uid)).map(d=>({value:d.values[a]??0,percentage:d.values[a]?d.values[a]/h*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(h.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},s=[t.value.table.columnNames.period].concat(C.value.filter(a=>!y.value.includes(a.uid)).map(a=>a.name)).concat(t.value.table.columnNames.total);return{head:o,body:r,config:l,colNames:s}});function he(){return C.value}function Z(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=[...N.value.head.map(h=>h.name??h)],l=[...N.value.body.map(h=>h.map(d=>d.value??d))],s=o.concat([r]).concat(l),a=c.createCsvContent(s);c.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const V=e.ref(!1);function ye(o){V.value=o,R.value+=1}function ee(){F.value.showTable=!F.value.showTable}return ue({getData:he,generatePdf:q,generateCsv:Z,generateImage:G,toggleTable:ee}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:H,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.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`),onMouseleave:j},[e.createVNode(me._sfc_main,{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"])],36)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(le.UserOptions,{ref:"details",key:`user_options_${R.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(X),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:H.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(q),onGenerateCsv:Z,onGenerateImage:e.unref(G),onToggleTable:ee},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:s})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${n.value.absoluteWidth} ${n.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[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":`${t.value.style.chart.backgroundColor}${e.unref(c.opacity)[t.value.style.chart.layout.highlighter.opacity]}`},null,8,Ee),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.chart.layout.highlighter.color}${e.unref(c.opacity)[t.value.style.chart.layout.highlighter.opacity]}`},null,8,Ne)],8,_e),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(c.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Se),e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+e.unref(c.opacity)[30]},null,8,Le),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(c.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Ve)],8,we)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",$e,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+n.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Fe),e.createElementVNode("line",{x1:u.value.left,x2:n.value.absoluteWidth-u.value.right,y1:n.value.absoluteHeight-u.value.bottom,y2:n.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,ze),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.left+(s+1)*g.value,x2:u.value.left+(s+1)*g.value,y1:u.value.top,y2:n.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,De))),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":v.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(l,s)=>(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,Pe)):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(t.value.style.chart.layout.dataLabels.prefix)+" "+e.toDisplayString(e.unref(c.canShowValue)(l.value)?l.value.toFixed(t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue):"")+" "+e.toDisplayString(t.value.style.chart.layout.dataLabels.suffix),9,Te)):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,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast&&(s===0||s===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+g.value*s+g.value/2}, ${t.value.style.chart.layout.grid.xAxis.dataLabels.offsetY+n.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(s)+Number(i.value.start)]??""),9,Oe)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&s<m.value.length-1&&![l.subtotal,m.value[s+1].subtotal].includes(null)?(e.openBlock(),e.createElementBlock("line",{key:0,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":v.value!==null||k.value}),x1:l.x,y1:l.y,x2:m.value[s+1].x,y2:m.value[s+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,Me)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Ie,[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,He)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==v.value&&v.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",Re,[v.value!==null&&v.value===s?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,a=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:e.unref(c.calcNutArrowPath)(a,{x:a.center.endX,y:a.center.endY},12,12,{x:l.x,y:l.y},!0),stroke:a.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Ue)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(a,h)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{"data-cy-hover-label":"","text-anchor":e.unref(c.calcMarkerOffsetX)(a,!0,0).anchor,x:e.unref(c.calcMarkerOffsetX)(a,!0,3).x,y:e.unref(c.calcMarkerOffsetY)(a),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(a.name)+": "+e.toDisplayString(Y(a,l.donut))+" ("+e.toDisplayString(a.value===null?"-":z(a.value))+") ",9,Xe)]))),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,qe)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==v.value&&v.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Ge,[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,Ye)):v.value!==null&&v.value===s?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(a,h)=>(e.openBlock(),e.createElementBlock("path",{d:a.arcSlice,fill:`${a.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,Ke))),256))])):(e.openBlock(),e.createElementBlock("g",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(a,h)=>(e.openBlock(),e.createElementBlock("path",{d:a.arcSlice,fill:`${a.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,Qe))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==v.value&&v.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:v.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)),9,Ze)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+s*g.value,y:n.value.absoluteHeight-u.value.bottom-10,width:g.value,height:10,fill:v.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:a=>T(l,s),class:e.normalizeClass({"donut-hover":v.value===l.index&&l.subtotal})},null,10,et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{"data-cy-trap":"",x:u.value.left+s*g.value,y:u.value.top,width:g.value,height:n.value.height,fill:"transparent",onMouseenter:a=>de(l),onMouseleave:j,onClick:a=>T(l,s),class:e.normalizeClass({"donut-hover":v.value===l.index&&l.subtotal})},null,42,tt))),256)),k.value?(e.openBlock(),e.createElementBlock("g",lt,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:n.value.width,height:n.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,ot),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:n.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,at),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:n.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,ut),e.createElementVNode("circle",{"data-cy-close":"",onClick:K,onKeypress:e.withKeys(K,["enter"]),cx:n.value.absoluteWidth-u.value.right-n.value.width/40,cy:u.value.top+n.value.height/30,r:n.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,nt),(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(c.calcNutArrowPath)(l,{x:n.value.centerX,y:n.value.centerY},12,12,!1,!1,1),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:"vue-ui-donut-evolution-focus"},null,8,rt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,st),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.donutFocus,(l,s)=>(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,ct))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("g",it,[e.createElementVNode("text",{"text-anchor":e.unref(c.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(c.calcMarkerOffsetX)(l,!0,10).x,y:e.unref(c.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":10,"font-weight":"bold"},e.toDisplayString(l.name)+": "+e.toDisplayString(Y(l,B.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":z(l.value))+") ",9,dt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,vt),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,ht),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+n.value.width/2,y:u.value.top+n.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)),9,yt),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,mt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:n.value},void 0,!0)],14,Ce)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",gt,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(X)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:4,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(pe.Slicer,{key:`slicer_${W.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":r[0]||(r[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":r[1]||(r[1]=l=>i.value.end=l),onReset:re},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$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(fe.Legend,{key:6,legendSet:J.value,config:ve.value,onClickMarker:r[2]||(r[2]=({legend:l})=>O(l.uid))},{item:e.withCtx(({legend:l,index:s})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:a=>O(l.uid),style:e.normalizeStyle(`opacity:${y.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(Number(l.value.toFixed(t.value.style.chart.legend.roundingValue)).toLocaleString())+" ",1),y.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",pt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",kt," ("+e.toDisplayString(isNaN(l.value/Q.value)?"-":(l.value/Q.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,ft)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:J.value},void 0,!0),$.value?(e.openBlock(),e.createBlock(be.default,{key:7,hideDetails:"",config:{open:F.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(ge.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[3]||(r[3]=l=>F.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",bt,"-")):(e.openBlock(),e.createElementBlock("b",xt,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,Be))}},Ct=xe._export_sfc(Bt,[["__scopeId","data-v-9d3fb16f"]]);exports.default=Ct;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-BFH7X8WG.cjs"),me=require("./Title-CSQdI1EY.cjs"),le=require("./usePrinter-hyuaFHQj.cjs"),ge=require("./DataTable-D_2ZW2eI.cjs"),fe=require("./Legend-tvvMRnbi.cjs"),ke=require("./vue-ui-skeleton-Df1qBO2k.cjs"),pe=require("./Slicer-DcjEg-ZZ.cjs"),be=require("./vue-ui-accordion-CvZhABQM.cjs"),oe=require("./useNestedProp-B_z4-n52.cjs"),xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Be=["id"],Ce=["xmlns","viewBox"],_e=["id"],Ee=["stop-color"],Ne=["stop-color"],we=["id"],Se=["stop-color"],Le=["stop-color"],Ve=["stop-color"],$e={key:0},Fe=["x1","x2","y1","y2","stroke","stroke-width"],ze=["x1","x2","y1","y2","stroke","stroke-width"],Ae={key:0},De=["x1","x2","y1","y2","stroke","stroke-width"],Pe=["x1","x2","y1","y2","stroke","stroke-width"],Te=["x","y","font-size","fill","font-weight"],Oe=["text-anchor","font-size","fill","transform"],Me=["x1","y1","x2","y2","stroke","stroke-width"],Ie={key:1},He=["cx","cy","r","fill"],Re={key:0},We={key:0},Ue=["d","stroke"],Xe=["text-anchor","x","y","fill"],qe=["cx","cy","r","fill"],Ge={key:0},Ye=["cx","cy","fill"],je={key:1},Ke=["d","fill","stroke"],Je={key:2},Qe=["d","fill","stroke"],Ze=["x","y","font-size","fill"],et=["x","y","width","fill","onClick"],tt=["x","y","width","height","onMouseenter","onClick"],lt={key:3,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},ot=["x","y","width","height","fill"],at=["x1","y1","x2","y2","stroke"],ut=["x1","y2","x2","y1","stroke"],nt=["onKeypress","cx","cy","r"],rt=["d","stroke"],st=["cx","cy","r","fill"],ct=["d","fill","stroke"],it={class:"vue-ui-donut-evolution-focus"},dt=["text-anchor","x","y","fill"],vt=["cx","cy","r","fill"],ht=["cx","cy","r","fill"],yt=["x","y","fill"],mt=["x","y","font-size","fill"],gt={key:3,class:"vue-data-ui-watermark"},ft=["onClick"],kt={key:0},pt={key:1},bt={key:0},xt={key:1},Bt={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ae,{expose:ue,emit:I}){const x=ae,{vue_ui_donut_evolution:ne}=c.useConfig(),$=e.computed(()=>!!x.dataset&&x.dataset.length),i=e.ref({start:0,end:Math.max(...x.dataset.map(o=>o.values.length))});function re(){i.value={start:0,end:L.value},W.value+=1}e.onMounted(()=>{c.objectIsEmpty(x.dataset)?c.error({componentName:"VueUiDonutEvolution",type:"dataset"}):x.dataset.length&&x.dataset.forEach((o,r)=>{c.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{c.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:r})})})});const _=e.ref(c.createUid()),y=e.ref([]),v=e.ref(null),A=e.ref(null),k=e.ref(!1),B=e.ref(null),H=e.ref(null),R=e.ref(0),W=e.ref(0),t=e.computed(()=>{const o=oe.useNestedProp({userConfig:x.config,defaultConfig:ne});return o.theme?{...oe.useNestedProp({userConfig:c.themes.vue_ui_donut_evolution[o.theme]||x.config,defaultConfig:o}),customPalette:c.themePalettes[o.theme]||c.palette}:o}),{isPrinting:U,isImaging:X,generatePdf:q,generateImage:G}=le.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution"}),se=e.computed(()=>c.convertCustomPalette(t.value.customPalette)),F=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})),n=e.computed(()=>{const o=t.value.style.chart.layout.height,r=t.value.style.chart.layout.width,l=o-u.value.top-u.value.bottom,s=r-u.value.left-u.value.right;return{absoluteHeight:o,absoluteWidth:r,centerX:u.value.left+s/2,centerY:u.value.top+l/2,height:l,width:s}}),C=e.computed(()=>(x.dataset.forEach((o,r)=>{[null,void 0].includes(o.name)&&c.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:r}),[null,void 0].includes(o.values)&&c.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:r})}),x.dataset.map((o,r)=>({...o,values:o.values||[],color:c.convertColorToHex(o.color)||se.value[r]||c.palette[r]||c.palette[r%c.palette.length],length:(o.values||[]).length,uid:c.createUid()})))),S=e.computed(()=>C.value.filter(o=>!y.value.includes(o.uid)).map(o=>({...o,values:o.values.filter((r,l)=>l>=i.value.start&&l<=i.value.end)}))),L=e.computed(()=>Math.max(...S.value.map(o=>o.length))),g=e.computed(()=>n.value.width/(i.value.end-i.value.start)),m=e.computed(()=>{const o=[];for(let a=0;a<i.value.end-i.value.start;a+=1){const h=S.value.map(b=>b.values[a]??null),d=h.filter(b=>[void 0,null].includes(b)).length===h.length,p=h.reduce((b,f)=>b+f,0),M=h.map(b=>b/p),w=u.value.left+g.value*a+g.value/2;o.push({index:a,percentages:M,subtotal:d||p<0?null:p,values:h,x:w})}const r=0,l=Math.max(...o.map(a=>a.subtotal)),s=o.length===1?l*2:l;return o.map((a,h)=>{const d=g.value/2*.7,p=d>n.value.width/16?n.value.width/16:d,M=v.value===a.index?n.value.width/16:p,w=o.length>4?d*2:d*2>g.value/2*.7?g.value/2*.7:d*2,b=n.value.absoluteHeight-u.value.bottom-n.value.height*a.subtotal/c.calculateNiceScale(r,s,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...a,y:b,radius:p,activeRadius:M,hoverRadius:w,donut:c.makeDonut({series:S.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[h]??0}))},a.x,b,p,p,1.99999,2,1,360,105.25,p/2),donutHover:c.makeDonut({series:S.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[h]??0}))},a.x,b,w,w,1.99999,2,1,360,105.25,w/2),donutFocus:c.makeDonut({series:S.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[h]??0}))},n.value.centerX,n.value.centerY,n.value.height/3.6,n.value.height/3.6,1.99999,2,1,360,105.25,n.value.height/6)}})});function z(o){return`${t.value.style.chart.layout.dataLabels.prefix}${isNaN(o)?"-":Number(o.toFixed(t.value.style.chart.layout.dataLabels.rounding)).toLocaleString()}${t.value.style.chart.layout.dataLabels.suffix}`}const D=e.computed(()=>({max:Math.max(...m.value.map(o=>o.subtotal)),min:0})),E=e.computed(()=>{const o=m.value.length===1?D.value.max*2:D.value.max;return c.calculateNiceScale(D.value.min,o,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function ce(o){return o/E.value.max}const ie=e.computed(()=>E.value.ticks.map(o=>({y:n.value.absoluteHeight-u.value.bottom-n.value.height*ce(o),value:o})));function Y(o,r){return isNaN(o.value/c.sumByAttribute(r,"value"))?0:(o.value/c.sumByAttribute(r,"value")*100).toFixed(0)+"%"}function j(){k.value||(v.value=null,A.value=null)}function de(o){k.value||(v.value=o.index,A.value=o)}const P=e.ref(null);function T(o,r){o.subtotal&&(A.value=null,v.value=null,k.value=!0,B.value=o,[null,void 0].includes(r)||(P.value=r))}function K(){B.value=null,k.value=!1,P.value=null}const J=e.computed(()=>C.value.map((o,r)=>({name:o.name,value:o.values.slice(i.value.start,i.value.end).reduce((l,s)=>l+s,0),shape:"circle",uid:o.uid,color:o.color})).sort((o,r)=>r.value-o.value).map(o=>({...o,opacity:y.value.includes(o.uid)?.5:1,segregate:()=>O(o.uid),isSegregated:y.value.includes(o.uid)}))),Q=e.computed(()=>m.value.map(o=>o.subtotal).reduce((o,r)=>o+r,0)),ve=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 O(o){if(y.value.includes(o))y.value=y.value.filter(r=>r!==o),I("selectLegend",null);else{if(y.value.length===C.value.length-1)return;y.value.push(o),I("selectLegend",C.value.find(r=>r.uid===o))}B.value&&T(m.value.find((r,l)=>l===P.value))}const N=e.computed(()=>{const o=[""].concat(C.value.filter(a=>!y.value.includes(a.uid)).map(a=>({name:a.name,color:a.color}))).concat(["Σ"]);let r=[];for(let a=0;a<L.value;a+=1){const h=C.value.filter(d=>!y.value.includes(d.uid)).map(d=>d.values[a]??0).reduce((d,p)=>d+p,0);r.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[a]??"-"].concat(C.value.filter(d=>!y.value.includes(d.uid)).map(d=>({value:d.values[a]??0,percentage:d.values[a]?d.values[a]/h*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(h.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},s=[t.value.table.columnNames.period].concat(C.value.filter(a=>!y.value.includes(a.uid)).map(a=>a.name)).concat(t.value.table.columnNames.total);return{head:o,body:r,config:l,colNames:s}});function he(){return C.value}function Z(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=[...N.value.head.map(h=>h.name??h)],l=[...N.value.body.map(h=>h.map(d=>d.value??d))],s=o.concat([r]).concat(l),a=c.createCsvContent(s);c.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const V=e.ref(!1);function ye(o){V.value=o,R.value+=1}function ee(){F.value.showTable=!F.value.showTable}return ue({getData:he,generatePdf:q,generateCsv:Z,generateImage:G,toggleTable:ee}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:H,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.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`),onMouseleave:j},[e.createVNode(me._sfc_main,{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"])],36)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(le.UserOptions,{ref:"details",key:`user_options_${R.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(X),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:H.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(q),onGenerateCsv:Z,onGenerateImage:e.unref(G),onToggleTable:ee},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:s})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${n.value.absoluteWidth} ${n.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[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":`${t.value.style.chart.backgroundColor}${e.unref(c.opacity)[t.value.style.chart.layout.highlighter.opacity]}`},null,8,Ee),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.chart.layout.highlighter.color}${e.unref(c.opacity)[t.value.style.chart.layout.highlighter.opacity]}`},null,8,Ne)],8,_e),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(c.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Se),e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+e.unref(c.opacity)[30]},null,8,Le),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(c.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Ve)],8,we)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",$e,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+n.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Fe),e.createElementVNode("line",{x1:u.value.left,x2:n.value.absoluteWidth-u.value.right,y1:n.value.absoluteHeight-u.value.bottom,y2:n.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,ze),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.left+(s+1)*g.value,x2:u.value.left+(s+1)*g.value,y1:u.value.top,y2:n.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,De))),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":v.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(l,s)=>(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,Pe)):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(t.value.style.chart.layout.dataLabels.prefix)+" "+e.toDisplayString(e.unref(c.canShowValue)(l.value)?l.value.toFixed(t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue):"")+" "+e.toDisplayString(t.value.style.chart.layout.dataLabels.suffix),9,Te)):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,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast&&(s===0||s===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+g.value*s+g.value/2}, ${t.value.style.chart.layout.grid.xAxis.dataLabels.offsetY+n.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(s)+Number(i.value.start)]??""),9,Oe)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&s<m.value.length-1&&![l.subtotal,m.value[s+1].subtotal].includes(null)?(e.openBlock(),e.createElementBlock("line",{key:0,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":v.value!==null||k.value}),x1:l.x,y1:l.y,x2:m.value[s+1].x,y2:m.value[s+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,Me)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Ie,[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,He)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==v.value&&v.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",Re,[v.value!==null&&v.value===s?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,a=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:e.unref(c.calcNutArrowPath)(a,{x:a.center.endX,y:a.center.endY},12,12,{x:l.x,y:l.y},!0),stroke:a.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Ue)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(a,h)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{"data-cy-hover-label":"","text-anchor":e.unref(c.calcMarkerOffsetX)(a,!0,0).anchor,x:e.unref(c.calcMarkerOffsetX)(a,!0,3).x,y:e.unref(c.calcMarkerOffsetY)(a),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(a.name)+": "+e.toDisplayString(Y(a,l.donut))+" ("+e.toDisplayString(a.value===null?"-":z(a.value))+") ",9,Xe)]))),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,qe)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==v.value&&v.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Ge,[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,Ye)):v.value!==null&&v.value===s?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(a,h)=>(e.openBlock(),e.createElementBlock("path",{d:a.arcSlice,fill:`${a.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,Ke))),256))])):(e.openBlock(),e.createElementBlock("g",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(a,h)=>(e.openBlock(),e.createElementBlock("path",{d:a.arcSlice,fill:`${a.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,Qe))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==v.value&&v.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:v.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)),9,Ze)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+s*g.value,y:n.value.absoluteHeight-u.value.bottom-10,width:g.value,height:10,fill:v.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:a=>T(l,s),class:e.normalizeClass({"donut-hover":v.value===l.index&&l.subtotal})},null,10,et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{"data-cy-trap":"",x:u.value.left+s*g.value,y:u.value.top,width:g.value,height:n.value.height,fill:"transparent",onMouseenter:a=>de(l),onMouseleave:j,onClick:a=>T(l,s),class:e.normalizeClass({"donut-hover":v.value===l.index&&l.subtotal})},null,42,tt))),256)),k.value?(e.openBlock(),e.createElementBlock("g",lt,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:n.value.width,height:n.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,ot),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:n.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,at),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:n.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,ut),e.createElementVNode("circle",{"data-cy-close":"",onClick:K,onKeypress:e.withKeys(K,["enter"]),cx:n.value.absoluteWidth-u.value.right-n.value.width/40,cy:u.value.top+n.value.height/30,r:n.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,nt),(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(c.calcNutArrowPath)(l,{x:n.value.centerX,y:n.value.centerY},12,12,!1,!1,1),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:"vue-ui-donut-evolution-focus"},null,8,rt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,st),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.donutFocus,(l,s)=>(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,ct))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("g",it,[e.createElementVNode("text",{"text-anchor":e.unref(c.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(c.calcMarkerOffsetX)(l,!0,10).x,y:e.unref(c.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":10,"font-weight":"bold"},e.toDisplayString(l.name)+": "+e.toDisplayString(Y(l,B.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":z(l.value))+") ",9,dt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,vt),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,ht),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+n.value.width/2,y:u.value.top+n.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)),9,yt),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,mt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:n.value},void 0,!0)],14,Ce)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",gt,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(X)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:4,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(pe.Slicer,{key:`slicer_${W.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":r[0]||(r[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":r[1]||(r[1]=l=>i.value.end=l),onReset:re},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$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(fe.Legend,{key:6,legendSet:J.value,config:ve.value,onClickMarker:r[2]||(r[2]=({legend:l})=>O(l.uid))},{item:e.withCtx(({legend:l,index:s})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:a=>O(l.uid),style:e.normalizeStyle(`opacity:${y.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(Number(l.value.toFixed(t.value.style.chart.legend.roundingValue)).toLocaleString())+" ",1),y.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",pt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",kt," ("+e.toDisplayString(isNaN(l.value/Q.value)?"-":(l.value/Q.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,ft)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:J.value},void 0,!0),$.value?(e.openBlock(),e.createBlock(be.default,{key:7,hideDetails:"",config:{open:F.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(ge.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[3]||(r[3]=l=>F.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",bt,"-")):(e.openBlock(),e.createElementBlock("b",xt,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,Be))}},Ct=xe._export_sfc(Bt,[["__scopeId","data-v-9d3fb16f"]]);exports.default=Ct;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { computed as x, ref as $, onMounted as Re, openBlock as a, createElementBlock as u, normalizeClass as F, normalizeStyle as j, createVNode as Ce, createCommentVNode as v, createBlock as R, unref as y, createSlots as Ue, withCtx as P, renderSlot as T, normalizeProps as le, guardReactiveProps as ae, createElementVNode as c, Fragment as m, renderList as p, toDisplayString as g, withKeys as Xe, createTextVNode as we, nextTick as Ge } from "vue";
|
|
2
|
-
import { u as je, o as Be, e as B, g as Ye, c as $e, t as Ke, a as qe, p as Y, b as Je, d as ue, z as Le, m as oe, X as Qe, r as se, A as Ze, i as Se, j as K, k as Ne, D as Ae, n as et, q as tt } from "./index-
|
|
3
|
-
import { _ as lt } from "./Title-
|
|
4
|
-
import { u as at, U as ut } from "./usePrinter-
|
|
5
|
-
import { D as ot } from "./DataTable-
|
|
6
|
-
import { L as st } from "./Legend-
|
|
7
|
-
import nt from "./vue-ui-skeleton-
|
|
8
|
-
import { S as rt } from "./Slicer-
|
|
9
|
-
import it from "./vue-ui-accordion-
|
|
10
|
-
import { u as ze } from "./useNestedProp-
|
|
2
|
+
import { u as je, o as Be, e as B, g as Ye, c as $e, t as Ke, a as qe, p as Y, b as Je, d as ue, z as Le, m as oe, X as Qe, r as se, A as Ze, i as Se, j as K, k as Ne, D as Ae, n as et, q as tt } from "./index-BE6fhUyH.js";
|
|
3
|
+
import { _ as lt } from "./Title-BcNPXpKX.js";
|
|
4
|
+
import { u as at, U as ut } from "./usePrinter-CdIphKpF.js";
|
|
5
|
+
import { D as ot } from "./DataTable-Dytj5HQM.js";
|
|
6
|
+
import { L as st } from "./Legend-Ct8LnAy4.js";
|
|
7
|
+
import nt from "./vue-ui-skeleton-DZk__alb.js";
|
|
8
|
+
import { S as rt } from "./Slicer-BNgHaM2_.js";
|
|
9
|
+
import it from "./vue-ui-accordion-Dmz7RUKz.js";
|
|
10
|
+
import { u as ze } from "./useNestedProp-BcjRW6BJ.js";
|
|
11
11
|
import { _ as ct } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const vt = ["id"], dt = ["xmlns", "viewBox"], ht = ["id"], yt = ["stop-color"], gt = ["stop-color"], ft = ["id"], bt = ["stop-color"], xt = ["stop-color"], mt = ["stop-color"], pt = { key: 0 }, kt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], _t = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ct = { key: 0 }, wt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], $t = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Lt = ["x", "y", "font-size", "fill", "font-weight"], St = ["text-anchor", "font-size", "fill", "transform"], Nt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], At = { key: 1 }, zt = ["cx", "cy", "r", "fill"], Ft = { key: 0 }, Pt = { key: 0 }, Dt = ["d", "stroke"], Tt = ["text-anchor", "x", "y", "fill"], Et = ["cx", "cy", "r", "fill"], It = { key: 0 }, Ot = ["cx", "cy", "fill"], Vt = { key: 1 }, Ht = ["d", "fill", "stroke"], Mt = { key: 2 }, Wt = ["d", "fill", "stroke"], Rt = ["x", "y", "font-size", "fill"], Ut = ["x", "y", "width", "fill", "onClick"], Xt = ["x", "y", "width", "height", "onMouseenter", "onClick"], Gt = {
|
|
13
13
|
key: 3,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { computed as m, ref as g, onMounted as K, onBeforeUnmount as me, openBlock as o, createElementBlock as r, normalizeClass as Q, normalizeStyle as F, createVNode as ee, createCommentVNode as b, createBlock as I, unref as d, createSlots as pe, withCtx as _, renderSlot as C, normalizeProps as te, guardReactiveProps as le, Fragment as w, renderList as $, createElementVNode as n, toDisplayString as L, createTextVNode as ae, nextTick as _e } from "vue";
|
|
2
|
-
import { u as xe, c as se, t as ke, o as Ce, e as oe, g as we, z as $e, f as z, X as re, l as ne, h as ue, n as Le, q as ze } from "./index-
|
|
2
|
+
import { u as xe, c as se, t as ke, o as Ce, e as oe, g as we, z as $e, f as z, X as re, l as ne, h as ue, n as Le, q as ze } from "./index-BE6fhUyH.js";
|
|
3
3
|
import { t as Xe, u as Ae } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as Se } from "./Title-
|
|
5
|
-
import { u as Ne, U as Te } from "./usePrinter-
|
|
6
|
-
import { D as Pe } from "./DataTable-
|
|
7
|
-
import Ge from "./vue-ui-skeleton-
|
|
8
|
-
import { L as Me } from "./Legend-
|
|
9
|
-
import De from "./vue-ui-accordion-
|
|
10
|
-
import { u as ie } from "./useNestedProp-
|
|
4
|
+
import { _ as Se } from "./Title-BcNPXpKX.js";
|
|
5
|
+
import { u as Ne, U as Te } from "./usePrinter-CdIphKpF.js";
|
|
6
|
+
import { D as Pe } from "./DataTable-Dytj5HQM.js";
|
|
7
|
+
import Ge from "./vue-ui-skeleton-DZk__alb.js";
|
|
8
|
+
import { L as Me } from "./Legend-Ct8LnAy4.js";
|
|
9
|
+
import De from "./vue-ui-accordion-Dmz7RUKz.js";
|
|
10
|
+
import { u as ie } from "./useNestedProp-BcjRW6BJ.js";
|
|
11
11
|
import { _ as Fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const Ie = ["id"], Oe = ["xmlns", "viewBox"], Ve = { key: 0 }, Ee = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], We = { key: 1 }, He = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Re = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Be = { key: 2 }, Ue = ["x", "y", "font-size", "fill", "font-weight"], je = ["x", "y", "font-size", "fill"], qe = { key: 3 }, Ye = ["x", "y", "font-size", "fill", "font-weight"], Ze = ["id"], Je = ["stop-color"], Ke = ["stop-color"], Qe = ["stop-color"], et = ["id"], tt = ["stop-color"], lt = ["stop-color"], at = ["stop-color"], st = ["id"], ot = ["stop-color"], rt = ["stop-color"], nt = ["id"], ut = ["stop-color"], it = ["stop-color"], ct = { key: 0 }, dt = ["d", "fill"], vt = { key: 1 }, ht = ["x", "y", "height", "width", "fill"], yt = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], ft = { key: 2 }, gt = ["x", "y", "fill", "font-size"], mt = { key: 3 }, pt = ["x", "y", "fill", "font-size"], _t = {
|
|
13
13
|
key: 3,
|