vue-data-ui 2.3.20 → 2.3.22
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-DxleIYjj.cjs → Arrow-BOSHa3Ag.cjs} +1 -1
- package/dist/{Arrow-BZi8sgy8.js → Arrow-DxXzMXB1.js} +1 -1
- package/dist/{BaseIcon-BW_EtqQp.cjs → BaseIcon-C-k_mqXL.cjs} +1 -1
- package/dist/{BaseIcon-BvljI_a-.js → BaseIcon-DuMfKUDs.js} +1 -1
- package/dist/{DataTable-YP1Z9yWa.cjs → DataTable-CHXdpx94.cjs} +1 -1
- package/dist/{DataTable-DZsNglbD.js → DataTable-DKHF_NH2.js} +2 -2
- package/dist/{Legend-DI_fRzuL.js → Legend-BqqpwXbu.js} +1 -1
- package/dist/{Legend-BLbMFYMt.cjs → Legend-BwrzHxLy.cjs} +1 -1
- package/dist/{Shape-C4qD5_GG.js → Shape-Ccky9omb.js} +1 -1
- package/dist/{Shape-CkH9iw5-.cjs → Shape-DW18-C9f.cjs} +1 -1
- package/dist/{Slicer-DB-Io5C2.js → Slicer-BDsv196Y.js} +1 -1
- package/dist/{Slicer-Ci2nFeSP.cjs → Slicer-xKlzke1v.cjs} +1 -1
- package/dist/{Title-Drnru9n0.js → Title-Bx2ibobQ.js} +1 -1
- package/dist/{Title-Bbqbwqnv.cjs → Title-DxNugmhI.cjs} +1 -1
- package/dist/Tooltip-BC2Wlz7P.cjs +1 -0
- package/dist/Tooltip-DOEMrisX.js +104 -0
- package/dist/{index-YrBMYU80.js → index-BvjCO-wv.js} +24 -20
- package/dist/index-oufiZvaS.cjs +4 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +5 -0
- package/dist/types/vue-data-ui.d.ts +5 -0
- package/dist/{useNestedProp-B6zxSHG8.js → useNestedProp-2KJaYPfM.js} +1 -1
- package/dist/{useNestedProp-CFgv63bL.cjs → useNestedProp-CmTItGss.cjs} +1 -1
- package/dist/{usePrinter-BAyd6htJ.js → usePrinter-CaKXrCiB.js} +1 -1
- package/dist/{usePrinter-CYMnEbaS.cjs → usePrinter-Cc8ufBvU.cjs} +1 -1
- package/dist/{vue-data-ui-gO5Z899T.cjs → vue-data-ui-D5LrE3dP.cjs} +1 -1
- package/dist/{vue-data-ui-B0qJYI8J.js → vue-data-ui-DnlOZVL-.js} +56 -56
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CkFvdRTe.cjs → vue-ui-3d-bar-Cma1NB-u.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-gtGMyaoh.js → vue-ui-3d-bar-qegO2SzJ.js} +7 -7
- package/dist/{vue-ui-accordion-kiAJNaGj.cjs → vue-ui-accordion-DiR0dVog.cjs} +1 -1
- package/dist/{vue-ui-accordion-JAzpbwIQ.js → vue-ui-accordion-q-bLDiD3.js} +3 -3
- package/dist/{vue-ui-age-pyramid-Dt8wPnuk.js → vue-ui-age-pyramid-vQvy7rWY.js} +23 -21
- package/dist/{vue-ui-age-pyramid-B2UDIdms.cjs → vue-ui-age-pyramid-xk6Gt1LJ.cjs} +1 -1
- package/dist/{vue-ui-annotator-BXvPOfPe.js → vue-ui-annotator-BYT8v1SY.js} +1 -1
- package/dist/{vue-ui-annotator--2nCAPE6.cjs → vue-ui-annotator-LwO1PGoN.cjs} +1 -1
- package/dist/{vue-ui-candlestick-BjRvhop5.cjs → vue-ui-candlestick-CmM0kwJR.cjs} +2 -2
- package/dist/{vue-ui-candlestick-DolkzYOf.js → vue-ui-candlestick-zvv6_kwp.js} +23 -21
- package/dist/{vue-ui-carousel-table-BO3vQQ6M.cjs → vue-ui-carousel-table-FMfXIF7s.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-Dld0LeUd.js → vue-ui-carousel-table-S3daEHYR.js} +4 -4
- package/dist/{vue-ui-chestnut-D_4ZoVk6.cjs → vue-ui-chestnut-4MvRD28_.cjs} +1 -1
- package/dist/{vue-ui-chestnut-Bk1ORphG.js → vue-ui-chestnut-A9asY_42.js} +6 -6
- package/dist/{vue-ui-cursor-C2h15Ina.js → vue-ui-cursor-CPPPIH2W.js} +2 -2
- package/dist/{vue-ui-cursor-S5pxmIKF.cjs → vue-ui-cursor-DusWgM7W.cjs} +1 -1
- package/dist/{vue-ui-dashboard-C_Z1DrAN.js → vue-ui-dashboard-CuQ81BKN.js} +2 -2
- package/dist/{vue-ui-dashboard-CHaHFh7F.cjs → vue-ui-dashboard-ZTzEd521.cjs} +1 -1
- package/dist/{vue-ui-digits-etk9JnyF.js → vue-ui-digits-Czkbi2AR.js} +2 -2
- package/dist/{vue-ui-digits-Drbbonb_.cjs → vue-ui-digits-DlupvOo-.cjs} +1 -1
- package/dist/{vue-ui-donut-CSbMtKsv.js → vue-ui-donut-Cis7kzDB.js} +70 -68
- package/dist/{vue-ui-donut-C2RzQo7O.cjs → vue-ui-donut-DA5YfWlL.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-CkXTIi5z.cjs → vue-ui-donut-evolution-BigmUCTm.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-BvvukZW4.js → vue-ui-donut-evolution-D2I4ZD5a.js} +9 -9
- package/dist/{vue-ui-dumbbell-BQMreE4s.cjs → vue-ui-dumbbell-D8ZSCX0H.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-CgOutvGi.js → vue-ui-dumbbell-fdV94xQB.js} +8 -8
- package/dist/{vue-ui-flow-DxI_xTKf.js → vue-ui-flow-C1PVwgKX.js} +7 -7
- package/dist/{vue-ui-flow-CXuGf_o7.cjs → vue-ui-flow-CH6PmIBT.cjs} +1 -1
- package/dist/{vue-ui-galaxy-CL5oPIoo.js → vue-ui-galaxy-DzWOfvyj.js} +44 -42
- package/dist/{vue-ui-galaxy-DlV81jBJ.cjs → vue-ui-galaxy-IFmqHh3R.cjs} +1 -1
- package/dist/{vue-ui-gauge-C3pVsXDs.cjs → vue-ui-gauge-Bbda2H3b.cjs} +1 -1
- package/dist/{vue-ui-gauge-CSPpiqrp.js → vue-ui-gauge-CeGa1oMf.js} +5 -5
- package/dist/{vue-ui-gizmo-BzhqPyXR.js → vue-ui-gizmo-BILyJylm.js} +59 -64
- package/dist/vue-ui-gizmo-DyJngE0E.cjs +1 -0
- package/dist/{vue-ui-heatmap-BPgIaNVR.js → vue-ui-heatmap-DRk0VXaJ.js} +32 -30
- package/dist/{vue-ui-heatmap-Cbuz8yZe.cjs → vue-ui-heatmap-Dp68UbGB.cjs} +1 -1
- package/dist/{vue-ui-kpi-BjkR7Bbe.cjs → vue-ui-kpi-Mbre-_3M.cjs} +1 -1
- package/dist/{vue-ui-kpi-Obcy0xai.js → vue-ui-kpi-u5GBFKBR.js} +2 -2
- package/dist/{vue-ui-mini-loader-9rN6Zc1B.cjs → vue-ui-mini-loader-CXiMb5pi.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BlwogLS4.js → vue-ui-mini-loader-DLXv9Seq.js} +2 -2
- package/dist/{vue-ui-molecule-Cn7jXBQa.cjs → vue-ui-molecule-DOwGWqSR.cjs} +1 -1
- package/dist/{vue-ui-molecule-CZMKu0sF.js → vue-ui-molecule-JlPbVJ8I.js} +29 -27
- package/dist/{vue-ui-mood-radar-D5b5Efgw.cjs → vue-ui-mood-radar-BF3WqcyN.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-CM-Ww4RH.js → vue-ui-mood-radar-C3Boyr96.js} +9 -9
- package/dist/{vue-ui-nested-donuts-BCraELSo.js → vue-ui-nested-donuts-C9CFBzvj.js} +59 -57
- package/dist/{vue-ui-nested-donuts-iFrLJ3Z2.cjs → vue-ui-nested-donuts-DkGXmwTg.cjs} +2 -2
- package/dist/{vue-ui-onion-9zOibMNI.js → vue-ui-onion-BqzUINBq.js} +67 -65
- package/dist/{vue-ui-onion-BAjs3o6h.cjs → vue-ui-onion-COYhqrEx.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-CUNyCmOL.cjs → vue-ui-parallel-coordinate-plot-BE8Bf0MQ.cjs} +2 -2
- package/dist/{vue-ui-parallel-coordinate-plot-BOMfQVD1.js → vue-ui-parallel-coordinate-plot-DtXx6zpM.js} +14 -12
- package/dist/{vue-ui-quadrant-DKEbCxs1.js → vue-ui-quadrant-Cr2jm-2w.js} +14 -12
- package/dist/{vue-ui-quadrant-Cy7aR5n8.cjs → vue-ui-quadrant-g34Ky2Hq.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-DCo-d7v_.cjs → vue-ui-quick-chart-BEXF1YLk.cjs} +3 -3
- package/dist/{vue-ui-quick-chart-C_3_Swmg.js → vue-ui-quick-chart-gurflOrc.js} +11 -9
- package/dist/{vue-ui-radar-DReN0VnD.cjs → vue-ui-radar-B77sXFJD.cjs} +1 -1
- package/dist/{vue-ui-radar-CIdiUlRR.js → vue-ui-radar-DGXj7kOe.js} +69 -67
- package/dist/{vue-ui-rating-CmFS1hxl.js → vue-ui-rating-D2wmEDux.js} +2 -2
- package/dist/{vue-ui-rating-IuFjaZVn.cjs → vue-ui-rating-J4wpjGDw.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-Cn9npig0.js → vue-ui-relation-circle-8hDVUqzX.js} +5 -5
- package/dist/{vue-ui-relation-circle-BWoC7q3w.cjs → vue-ui-relation-circle-CkO4PvuL.cjs} +1 -1
- package/dist/{vue-ui-rings-Cg0hJCIn.js → vue-ui-rings-Bs4I_DFj.js} +29 -27
- package/dist/{vue-ui-rings-DUh0SxJQ.cjs → vue-ui-rings-Bt4lsykR.cjs} +1 -1
- package/dist/{vue-ui-scatter-B_BrhiEX.js → vue-ui-scatter-BcuxFe_0.js} +33 -31
- package/dist/{vue-ui-scatter--TkmJ-AR.cjs → vue-ui-scatter-pnVV0nUg.cjs} +1 -1
- package/dist/{vue-ui-screenshot-BReMSOn3.js → vue-ui-screenshot-CkunIVDh.js} +1 -1
- package/dist/{vue-ui-screenshot-kWdbLJo_.cjs → vue-ui-screenshot-Q4jzniKW.cjs} +1 -1
- package/dist/{vue-ui-skeleton-Bsxqk_85.cjs → vue-ui-skeleton-Fsru0dbb.cjs} +1 -1
- package/dist/{vue-ui-skeleton-NT47Gcf_.js → vue-ui-skeleton-jYHncdu5.js} +2 -2
- package/dist/{vue-ui-smiley-CPoPSYL5.js → vue-ui-smiley-B3gIeKih.js} +2 -2
- package/dist/{vue-ui-smiley-Ca0A734A.cjs → vue-ui-smiley-Bd3lgUj_.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-BxuX1rin.js → vue-ui-spark-trend-CgEi2LBP.js} +4 -4
- package/dist/{vue-ui-spark-trend-B-86THrb.cjs → vue-ui-spark-trend-DfD8Q9Zl.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-rrtNtBHV.cjs → vue-ui-sparkbar-BCmLvKvU.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-asftF9fQ.js → vue-ui-sparkbar-Bu_TX-tQ.js} +3 -3
- package/dist/{vue-ui-sparkgauge-CkGTNF-l.cjs → vue-ui-sparkgauge-C_DSQGId.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-4jW34m5b.js → vue-ui-sparkgauge-Cml4o6Bs.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-2biSOPWz.cjs → vue-ui-sparkhistogram-BZDofxtq.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-B6V2zWH1.js → vue-ui-sparkhistogram-BsyOeGbq.js} +4 -4
- package/dist/{vue-ui-sparkline-CsPnYfxR.js → vue-ui-sparkline-DOsWIDug.js} +3 -3
- package/dist/{vue-ui-sparkline-74M8NalV.cjs → vue-ui-sparkline-twqIgYC3.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-m1ept0j0.cjs → vue-ui-sparkstackbar-DTgoeXjb.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DyBtA2ub.js → vue-ui-sparkstackbar-DeWgfL12.js} +3 -3
- package/dist/{vue-ui-strip-plot-mQqK5gwa.cjs → vue-ui-strip-plot-BV27VHWB.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-B-6vS1xs.js → vue-ui-strip-plot-Ci-hICkJ.js} +26 -24
- package/dist/{vue-ui-table-DqHz6HW7.cjs → vue-ui-table-Bd9ddVGy.cjs} +1 -1
- package/dist/{vue-ui-table-Bx68W8JX.js → vue-ui-table-R_KFQoq4.js} +1 -1
- package/dist/{vue-ui-table-heatmap-D-pTu0rU.cjs → vue-ui-table-heatmap-CPOETxT8.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-Dr1sxMvi.js → vue-ui-table-heatmap-TYLCpM_Y.js} +4 -4
- package/dist/{vue-ui-table-sparkline-CqTlcBIR.js → vue-ui-table-sparkline-B-qJP3Yr.js} +5 -5
- package/dist/{vue-ui-table-sparkline-B6qlGuhK.cjs → vue-ui-table-sparkline-H_qcrFc0.cjs} +1 -1
- package/dist/{vue-ui-thermometer-B42-sDGS.cjs → vue-ui-thermometer-CBybvctJ.cjs} +1 -1
- package/dist/{vue-ui-thermometer-TjJbEptr.js → vue-ui-thermometer-fV6P7B8U.js} +5 -5
- package/dist/{vue-ui-timer-D3sjJgRd.js → vue-ui-timer-CU-tJV53.js} +4 -4
- package/dist/{vue-ui-timer-B5LzDzsu.cjs → vue-ui-timer-CwQteT9E.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-BrorE6YN.cjs → vue-ui-tiremarks-Ba1Er97s.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-DAKhOGuC.js → vue-ui-tiremarks-Dxy0W8kp.js} +5 -5
- package/dist/{vue-ui-treemap-C_2QMmtb.js → vue-ui-treemap-CFqf6BUd.js} +14 -12
- package/dist/{vue-ui-treemap-BZ1uEVdG.cjs → vue-ui-treemap-CpPqA91r.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-DFLADEan.js → vue-ui-vertical-bar-CpIgWUoF.js} +37 -35
- package/dist/vue-ui-vertical-bar-Px2OPOQp.cjs +4 -0
- package/dist/{vue-ui-waffle-C9vTNCgg.cjs → vue-ui-waffle-BEOhRYhC.cjs} +1 -1
- package/dist/{vue-ui-waffle-FVwAFE-1.js → vue-ui-waffle-DbR7pPaP.js} +14 -12
- package/dist/{vue-ui-wheel-GqGRjIbz.js → vue-ui-wheel-BkbAV9mu.js} +5 -5
- package/dist/{vue-ui-wheel-CAvPjVTI.cjs → vue-ui-wheel-C4H-fBbx.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-BCX_R6g8.js → vue-ui-word-cloud-704bFMO3.js} +6 -6
- package/dist/{vue-ui-word-cloud-k2YORklt.cjs → vue-ui-word-cloud-B8vX27Pz.cjs} +1 -1
- package/dist/{vue-ui-xy-DVi9huLD.cjs → vue-ui-xy-B8qzx04X.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-D9MeO_Qf.cjs → vue-ui-xy-canvas-BVhRHPYN.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-DkMfIFgK.js → vue-ui-xy-canvas-CJO0hp3z.js} +84 -82
- package/dist/{vue-ui-xy-3xsWoBnM.js → vue-ui-xy-kFskWWiT.js} +141 -139
- package/package.json +1 -1
- package/dist/Tooltip-CsKpSa4V.cjs +0 -1
- package/dist/Tooltip-DhmnYSwg.js +0 -94
- package/dist/index-DKKeZVg7.cjs +0 -4
- package/dist/vue-ui-gizmo-B_rHNd6r.cjs +0 -1
- package/dist/vue-ui-vertical-bar-KK3e40Th.cjs +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./index-DKKeZVg7.cjs"),we=require("./Title-Bbqbwqnv.cjs"),re=require("./usePrinter-CYMnEbaS.cjs"),$e=require("./DataTable-YP1Z9yWa.cjs"),Fe=require("./Tooltip-CsKpSa4V.cjs"),z=require("./BaseIcon-BW_EtqQp.cjs"),Pe=require("./vue-ui-skeleton-Bsxqk_85.cjs"),Ne=require("./vue-ui-accordion-kiAJNaGj.cjs"),ne=require("./useNestedProp-CFgv63bL.cjs"),Ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Se={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(n,{emit:g}){const y=n;function u(a){g("zoom",a)}function c(a){g("hover",a)}return e.toRef(y,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(i=>{i.ancestor=a})}),(a,i)=>{const b=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(F,P)=>(e.openBlock(),e.createElementBlock("circle",{cx:F.x,cy:F.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:n.hoveredUid&&n.hoveredUid===v.uid?n.strokeHovered:n.stroke,"stroke-width":n.hoveredUid&&n.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(h=>u(v),["stop"]),onMouseover:h=>c(v),onMouseleave:i[0]||(i[0]=h=>c(null))},null,40,Te))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(b,{key:0,dataset:v.nodes,color:n.color,stroke:n.stroke,strokeHovered:n.strokeHovered,hoveredUid:n.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ve=["x1","y1","x2","y2","stroke","stroke-width"],Re=["x1","y1","x2","y2","stroke","stroke-width"],Le={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(n){const g=n;return e.toRef(g,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(c=>{c.ancestor=u})}),(u,c)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(i,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,Ve),e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.color,"stroke-width":a.circleRadius/2},null,8,Re)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:n.color,backgroundColor:n.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},ze=["x","y","fill","font-size"],Me={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(n,{emit:g}){const y=n;return e.toRef(y,"dataset").value.forEach(c=>{c.nodes&&c.nodes.length>0&&c.nodes.forEach(B=>{B.ancestor=c})}),(c,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,b=>(e.openBlock(),e.createElementBlock("text",{x:b.x,y:b.y+i.circleRadius*2,fill:n.color,"font-size":i.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(i.name),9,ze))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:i.nodes,color:n.color,hoveredUid:n.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},De={style:{position:"relative",height:"100%",width:"100%"}},Ue={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(n,{emit:g}){return(y,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${n.isFullscreen?"fixed":"absolute"};bottom:0;right:${n.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",De,[e.createElementVNode("button",{onClick:u[0]||(u[0]=e.withModifiers(c=>g("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[1]||(u[1]=e.withModifiers(c=>g("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[2]||(u[2]=e.withModifiers(c=>g("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[3]||(u[3]=e.withModifiers(c=>g("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[4]||(u[4]=e.withModifiers(c=>g("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},Ie=["id"],Oe=["xmlns","viewBox"],He=["id"],qe=["stop-color"],Ae=["stop-color"],je={key:4,class:"vue-data-ui-watermark"},Ge=["innerHTML"],Xe={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(n,{expose:g}){const y=n,{vue_ui_molecule:u}=p.useConfig(),c=e.computed(()=>!!y.dataset&&y.dataset.length);e.onMounted(()=>{p.objectIsEmpty(y.dataset)&&p.error({componentName:"VueUiMolecule",type:"dataset"})});const B=e.ref(p.createUid()),a=e.ref(null),i=e.ref(!1),b=e.ref(""),v=e.ref(null),F=e.ref(null),P=e.ref(!1),h=e.ref(null),G=e.ref(null),D=e.ref(0),o=e.computed(()=>{const t=ne.useNestedProp({userConfig:y.config,defaultConfig:u});return t.theme?{...ne.useNestedProp({userConfig:p.themes.vue_ui_molecule[t.theme]||y.config,defaultConfig:t}),customPalette:p.themePalettes[t.theme]||p.palette}:t}),{isPrinting:X,isImaging:W,generatePdf:Y,generateImage:Z}=re.usePrinter({elementId:`cluster_${B.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ae=e.computed(()=>p.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function J(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?J(t[0].nodes,l+1):l}function se(){const t=J(y.dataset);let l=100,r=l;for(let d=0;d<t;d+=1)l/=1,r+=l;return{height:r,width:r}}const x=e.ref(se()),U=e.ref(`0 0 ${x.value.width} ${x.value.height}`);function K(t,l={x:-x.value.width/2.43,y:x.value.height/2},r=x.value.width/1.1,d=24,s=0,m=0,V="#BBBBBB"){if(t&&t.length>0){const A=p.createPolygonPath({plot:l,radius:r,sides:t.length,rotation:s});t.forEach((f,$)=>{const R=A.coordinates[$];let w;if(f.ancestor?f.ancestor.ancestor?w=f.ancestor.color||V:(w=ae.value[m]||p.palette[m]||V,m+=1):w=V,f.polygonPath={coordinates:[R]},f.circleRadius=d,f.color=w,f.uid=p.createUid(),f.nodes&&f.nodes.length>0){const j=!f.ancestor||!f.ancestor.ancestor?m:0;f.nodes=K(f.nodes,R,r/2.9,d/2.2,s+Math.PI*$/f.nodes.length,j,w)}})}return t}function ie(t){const l=new Set;function r(s){s.forEach(m=>{m.color&&!l.has(m.color)&&l.add(m.color),m.nodes&&m.nodes.length>0&&r(m.nodes)})}r(t);const d={};return Array.from(l).forEach((s,m)=>{d[s]=`gradient_${m}`}),d}const ue=e.computed(()=>ie(C.value)),C=e.computed(()=>K(y.dataset));function I(){P.value=!1,F.value=null,G.value=null,h.value=null,H({polygonPath:{coordinates:[{x:x.value.width/2,y:x.value.height/2}]},circleRadius:24})}const O=e.ref(null);function H(t){v.value.focus(),e.nextTick(()=>{O.value&&cancelAnimationFrame(O.value);const l=U.value.split(" "),r=parseFloat(l[0]),d=parseFloat(l[1]),s=parseFloat(l[2]),m=parseFloat(l[3]),{x:V,y:A}=t.polygonPath.coordinates[0],{circleRadius:f}=t,$=8.34,R=V-f*$,w=A-f*$,j=f*$*2,ye=f*$*2,ke=Math.sqrt((R-r)**2+(w-d)**2),L=Math.min(1200,Math.max(20,Math.floor(ke/10))),be=(R-r)/L,Ce=(w-d)/L,Be=(j-s)/L,xe=(ye-m)/L;let E=0;function le(){U.value=`${r+be*E} ${d+Ce*E} ${s+Be*E} ${m+xe*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(O.value=requestAnimationFrame(le))}le()})}function ce(t){F.value===t.uid?I():(F.value=t.uid,G.value=t,h.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},H(t),P.value=t.uid!==C.value[0].uid)}function de(t){if(t.target.nodeName!=="circle")I(),P.value=!1;else return}const q=e.ref(null);function ve(t){q.value={datapoint:t,seriesIndex:-1,series:C.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(p.isFunction(l)&&p.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value})))b.value=l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value});else{let r="";r+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(r+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),b.value=`<div style="font-family:inherit">${r}</div>`}}const Q=e.ref(null),T=e.ref(null);function me(t){Q.value=t,t?(i.value=!0,ve(t),T.value=t.uid):(i.value=!1,b.value="",T.value=null)}function M(t){t==="right"&&(h.value.polygonPath.coordinates[0].x+=h.value.circleRadius),t==="left"&&(h.value.polygonPath.coordinates[0].x-=h.value.circleRadius),t==="top"&&(h.value.polygonPath.coordinates[0].y-=h.value.circleRadius),t==="bottom"&&(h.value.polygonPath.coordinates[0].y+=h.value.circleRadius),H(h.value)}function fe(t){const l=[];function r(d){d.forEach(s=>{const m={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};l.push(m),s.nodes&&s.nodes.length>0&&r(s.nodes,s.name)})}return r(t),l}const pe=e.computed(()=>fe(C.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=pe.value.map((s,m)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),r={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},d=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:r,colNames:d}});function _(){e.nextTick(()=>{const t=N.value.body.map((d,s)=>[[d[0].name],[d[1]],[d[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),r=p.createCsvContent(l);p.downloadCsv({csvContent:r,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function he(){return C.value}const S=e.ref(!1);function ge(t){S.value=t,D.value+=1}function ee(){k.value.showTable=!k.value.showTable}function te(){k.value.showDataLabels=!k.value.showDataLabels}function oe(){k.value.showTooltip=!k.value.showTooltip}return g({getData:he,generatePdf:Y,generateCsv:_,generateImage:Z,toggleTable:ee,toggleLabels:te,toggleTooltip:oe}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:l[7]||(l[7]=r=>{Q.value=null,T.value=null}),ref_key:"moleculeChart",ref:v,class:e.normalizeClass(`vue-ui-molecule ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${B.value}`},[o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};`)},[e.createVNode(we._sfc_main,{config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value?(e.openBlock(),e.createBlock(re.UserOptions,{ref_key:"details",ref:a,key:`user_options_${D.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(X),isImaging:e.unref(W),uid:B.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:v.value,onToggleFullscreen:ge,onGeneratePdf:e.unref(Y),onGenerateCsv:_,onGenerateImage:e.unref(Z),onToggleTable:ee,onToggleLabels:te,onToggleTooltip:oe},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:d})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:d})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(p.XMLNS),viewBox:U.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:${o.value.style.chart.backgroundColor};color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(r=>de(r),["stop"]))},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ue.value),r=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${r}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(p.lightenHexColor)(r,.5)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":r},null,8,Ae)],8,He))),256))]),e.createVNode(Le,{dataset:C.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Se,{dataset:C.value,hoveredUid:T.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:ce,onHover:me},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(Me,{key:0,dataset:C.value,color:o.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:x.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createBlock(Ue,{key:`direction_pad_${D.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:l[1]||(l[1]=r=>M("left")),onMoveRight:l[2]||(l[2]=r=>M("right")),onMoveTop:l[3]||(l[3]=r=>M("top")),onMoveBottom:l[4]||(l[4]=r=>M("bottom")),onReset:l[5]||(l[5]=r=>{I(),P.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(W)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:5,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Fe._sfc_main,{show:k.value.showTooltip&&i.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,parent:v.value,content:b.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),c.value?(e.openBlock(),e.createBlock(Ne.default,{key:6,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode($e.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:l[6]||(l[6]=r=>k.value.showTable=!1)},{th:e.withCtx(({th:r})=>[e.createElementVNode("div",{innerHTML:r,style:{display:"flex","align-items":"center"}},null,8,Ge)]),td:e.withCtx(({td:r})=>[e.createTextVNode(e.toDisplayString(r.name||r),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ie))}},We=Ee._export_sfc(Xe,[["__scopeId","data-v-c07e2837"]]);exports.default=We;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./index-oufiZvaS.cjs"),we=require("./Title-DxNugmhI.cjs"),re=require("./usePrinter-Cc8ufBvU.cjs"),$e=require("./DataTable-CHXdpx94.cjs"),Fe=require("./Tooltip-BC2Wlz7P.cjs"),z=require("./BaseIcon-C-k_mqXL.cjs"),Pe=require("./vue-ui-skeleton-Fsru0dbb.cjs"),Ne=require("./vue-ui-accordion-DiR0dVog.cjs"),ne=require("./useNestedProp-CmTItGss.cjs"),Ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Se={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(n,{emit:g}){const y=n;function u(a){g("zoom",a)}function c(a){g("hover",a)}return e.toRef(y,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(i=>{i.ancestor=a})}),(a,i)=>{const b=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(F,P)=>(e.openBlock(),e.createElementBlock("circle",{cx:F.x,cy:F.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:n.hoveredUid&&n.hoveredUid===v.uid?n.strokeHovered:n.stroke,"stroke-width":n.hoveredUid&&n.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(h=>u(v),["stop"]),onMouseover:h=>c(v),onMouseleave:i[0]||(i[0]=h=>c(null))},null,40,Te))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(b,{key:0,dataset:v.nodes,color:n.color,stroke:n.stroke,strokeHovered:n.strokeHovered,hoveredUid:n.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ve=["x1","y1","x2","y2","stroke","stroke-width"],Re=["x1","y1","x2","y2","stroke","stroke-width"],Le={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(n){const g=n;return e.toRef(g,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(c=>{c.ancestor=u})}),(u,c)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(i,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,Ve),e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.color,"stroke-width":a.circleRadius/2},null,8,Re)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:n.color,backgroundColor:n.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},ze=["x","y","fill","font-size"],Me={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(n,{emit:g}){const y=n;return e.toRef(y,"dataset").value.forEach(c=>{c.nodes&&c.nodes.length>0&&c.nodes.forEach(B=>{B.ancestor=c})}),(c,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,b=>(e.openBlock(),e.createElementBlock("text",{x:b.x,y:b.y+i.circleRadius*2,fill:n.color,"font-size":i.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(i.name),9,ze))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:i.nodes,color:n.color,hoveredUid:n.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},De={style:{position:"relative",height:"100%",width:"100%"}},Ue={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(n,{emit:g}){return(y,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${n.isFullscreen?"fixed":"absolute"};bottom:0;right:${n.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",De,[e.createElementVNode("button",{onClick:u[0]||(u[0]=e.withModifiers(c=>g("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[1]||(u[1]=e.withModifiers(c=>g("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[2]||(u[2]=e.withModifiers(c=>g("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[3]||(u[3]=e.withModifiers(c=>g("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[4]||(u[4]=e.withModifiers(c=>g("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},Ie=["id"],Oe=["xmlns","viewBox"],He=["id"],qe=["stop-color"],Ae=["stop-color"],je={key:4,class:"vue-data-ui-watermark"},Ge=["innerHTML"],Xe={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(n,{expose:g}){const y=n,{vue_ui_molecule:u}=p.useConfig(),c=e.computed(()=>!!y.dataset&&y.dataset.length);e.onMounted(()=>{p.objectIsEmpty(y.dataset)&&p.error({componentName:"VueUiMolecule",type:"dataset"})});const B=e.ref(p.createUid()),a=e.ref(null),i=e.ref(!1),b=e.ref(""),v=e.ref(null),F=e.ref(null),P=e.ref(!1),h=e.ref(null),G=e.ref(null),D=e.ref(0),o=e.computed(()=>{const t=ne.useNestedProp({userConfig:y.config,defaultConfig:u});return t.theme?{...ne.useNestedProp({userConfig:p.themes.vue_ui_molecule[t.theme]||y.config,defaultConfig:t}),customPalette:p.themePalettes[t.theme]||p.palette}:t}),{isPrinting:X,isImaging:Y,generatePdf:W,generateImage:Z}=re.usePrinter({elementId:`cluster_${B.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ae=e.computed(()=>p.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function J(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?J(t[0].nodes,l+1):l}function se(){const t=J(y.dataset);let l=100,r=l;for(let d=0;d<t;d+=1)l/=1,r+=l;return{height:r,width:r}}const x=e.ref(se()),U=e.ref(`0 0 ${x.value.width} ${x.value.height}`);function K(t,l={x:-x.value.width/2.43,y:x.value.height/2},r=x.value.width/1.1,d=24,s=0,f=0,V="#BBBBBB"){if(t&&t.length>0){const A=p.createPolygonPath({plot:l,radius:r,sides:t.length,rotation:s});t.forEach((m,$)=>{const R=A.coordinates[$];let w;if(m.ancestor?m.ancestor.ancestor?w=m.ancestor.color||V:(w=ae.value[f]||p.palette[f]||V,f+=1):w=V,m.polygonPath={coordinates:[R]},m.circleRadius=d,m.color=w,m.uid=p.createUid(),m.nodes&&m.nodes.length>0){const j=!m.ancestor||!m.ancestor.ancestor?f:0;m.nodes=K(m.nodes,R,r/2.9,d/2.2,s+Math.PI*$/m.nodes.length,j,w)}})}return t}function ie(t){const l=new Set;function r(s){s.forEach(f=>{f.color&&!l.has(f.color)&&l.add(f.color),f.nodes&&f.nodes.length>0&&r(f.nodes)})}r(t);const d={};return Array.from(l).forEach((s,f)=>{d[s]=`gradient_${f}`}),d}const ue=e.computed(()=>ie(C.value)),C=e.computed(()=>K(y.dataset));function I(){P.value=!1,F.value=null,G.value=null,h.value=null,H({polygonPath:{coordinates:[{x:x.value.width/2,y:x.value.height/2}]},circleRadius:24})}const O=e.ref(null);function H(t){v.value.focus(),e.nextTick(()=>{O.value&&cancelAnimationFrame(O.value);const l=U.value.split(" "),r=parseFloat(l[0]),d=parseFloat(l[1]),s=parseFloat(l[2]),f=parseFloat(l[3]),{x:V,y:A}=t.polygonPath.coordinates[0],{circleRadius:m}=t,$=8.34,R=V-m*$,w=A-m*$,j=m*$*2,ye=m*$*2,ke=Math.sqrt((R-r)**2+(w-d)**2),L=Math.min(1200,Math.max(20,Math.floor(ke/10))),be=(R-r)/L,Ce=(w-d)/L,Be=(j-s)/L,xe=(ye-f)/L;let E=0;function le(){U.value=`${r+be*E} ${d+Ce*E} ${s+Be*E} ${f+xe*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(O.value=requestAnimationFrame(le))}le()})}function ce(t){F.value===t.uid?I():(F.value=t.uid,G.value=t,h.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},H(t),P.value=t.uid!==C.value[0].uid)}function de(t){if(t.target.nodeName!=="circle")I(),P.value=!1;else return}const q=e.ref(null);function ve(t){q.value={datapoint:t,seriesIndex:-1,series:C.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(p.isFunction(l)&&p.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value})))b.value=l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value});else{let r="";r+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(r+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),b.value=`<div style="font-family:inherit">${r}</div>`}}const Q=e.ref(null),T=e.ref(null);function fe(t){Q.value=t,t?(i.value=!0,ve(t),T.value=t.uid):(i.value=!1,b.value="",T.value=null)}function M(t){t==="right"&&(h.value.polygonPath.coordinates[0].x+=h.value.circleRadius),t==="left"&&(h.value.polygonPath.coordinates[0].x-=h.value.circleRadius),t==="top"&&(h.value.polygonPath.coordinates[0].y-=h.value.circleRadius),t==="bottom"&&(h.value.polygonPath.coordinates[0].y+=h.value.circleRadius),H(h.value)}function me(t){const l=[];function r(d){d.forEach(s=>{const f={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};l.push(f),s.nodes&&s.nodes.length>0&&r(s.nodes,s.name)})}return r(t),l}const pe=e.computed(()=>me(C.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=pe.value.map((s,f)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),r={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},d=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:r,colNames:d}});function _(){e.nextTick(()=>{const t=N.value.body.map((d,s)=>[[d[0].name],[d[1]],[d[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),r=p.createCsvContent(l);p.downloadCsv({csvContent:r,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function he(){return C.value}const S=e.ref(!1);function ge(t){S.value=t,D.value+=1}function ee(){k.value.showTable=!k.value.showTable}function te(){k.value.showDataLabels=!k.value.showDataLabels}function oe(){k.value.showTooltip=!k.value.showTooltip}return g({getData:he,generatePdf:W,generateCsv:_,generateImage:Z,toggleTable:ee,toggleLabels:te,toggleTooltip:oe}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:l[7]||(l[7]=r=>{Q.value=null,T.value=null}),ref_key:"moleculeChart",ref:v,class:e.normalizeClass(`vue-ui-molecule ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${B.value}`},[o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};`)},[e.createVNode(we._sfc_main,{config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value?(e.openBlock(),e.createBlock(re.UserOptions,{ref_key:"details",ref:a,key:`user_options_${D.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(X),isImaging:e.unref(Y),uid:B.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:v.value,onToggleFullscreen:ge,onGeneratePdf:e.unref(W),onGenerateCsv:_,onGenerateImage:e.unref(Z),onToggleTable:ee,onToggleLabels:te,onToggleTooltip:oe},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:d})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:d})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(p.XMLNS),viewBox:U.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:${o.value.style.chart.backgroundColor};color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(r=>de(r),["stop"]))},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ue.value),r=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${r}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(p.lightenHexColor)(r,.5)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":r},null,8,Ae)],8,He))),256))]),e.createVNode(Le,{dataset:C.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Se,{dataset:C.value,hoveredUid:T.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:ce,onHover:fe},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(Me,{key:0,dataset:C.value,color:o.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:x.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createBlock(Ue,{key:`direction_pad_${D.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:l[1]||(l[1]=r=>M("left")),onMoveRight:l[2]||(l[2]=r=>M("right")),onMoveTop:l[3]||(l[3]=r=>M("top")),onMoveBottom:l[4]||(l[4]=r=>M("bottom")),onReset:l[5]||(l[5]=r=>{I(),P.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:5,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Fe._sfc_main,{show:k.value.showTooltip&&i.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:v.value,content:b.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),c.value?(e.openBlock(),e.createBlock(Ne.default,{key:6,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode($e.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:l[6]||(l[6]=r=>k.value.showTable=!1)},{th:e.withCtx(({th:r})=>[e.createElementVNode("div",{innerHTML:r,style:{display:"flex","align-items":"center"}},null,8,Ge)]),td:e.withCtx(({td:r})=>[e.createTextVNode(e.toDisplayString(r.name||r),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ie))}},Ye=Ee._export_sfc(Xe,[["__scopeId","data-v-a8f784eb"]]);exports.default=Ye;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { toRef as ne, resolveComponent as re, openBlock as s, createElementBlock as r, Fragment as y, renderList as N, withModifiers as M, createBlock as U, createCommentVNode as m, createElementVNode as x, toDisplayString as Te, normalizeStyle as K, createVNode as R, computed as B, onMounted as Ve, ref as g, normalizeClass as Ce, unref as I, createSlots as
|
|
2
|
-
import { u as
|
|
3
|
-
import { _ as rt } from "./Title-
|
|
4
|
-
import { u as it, U as ut } from "./usePrinter-
|
|
5
|
-
import { D as ct } from "./DataTable-
|
|
6
|
-
import { _ as dt } from "./Tooltip-
|
|
7
|
-
import
|
|
8
|
-
import vt from "./vue-ui-skeleton-
|
|
9
|
-
import ft from "./vue-ui-accordion-
|
|
10
|
-
import { u as Pe } from "./useNestedProp-
|
|
1
|
+
import { toRef as ne, resolveComponent as re, openBlock as s, createElementBlock as r, Fragment as y, renderList as N, withModifiers as M, createBlock as U, createCommentVNode as m, createElementVNode as x, toDisplayString as Te, normalizeStyle as K, createVNode as R, computed as B, onMounted as Ve, ref as g, normalizeClass as Ce, unref as I, createSlots as Ye, withCtx as $, renderSlot as P, normalizeProps as Z, guardReactiveProps as J, createTextVNode as We, nextTick as $e } from "vue";
|
|
2
|
+
import { u as qe, o as Ze, e as Je, c as xe, t as Ke, a as Qe, p as we, b as _e, X as et, l as tt, I as ot, n as lt, q as at, v as st, w as nt } from "./index-BvjCO-wv.js";
|
|
3
|
+
import { _ as rt } from "./Title-Bx2ibobQ.js";
|
|
4
|
+
import { u as it, U as ut } from "./usePrinter-CaKXrCiB.js";
|
|
5
|
+
import { D as ct } from "./DataTable-DKHF_NH2.js";
|
|
6
|
+
import { _ as dt } from "./Tooltip-DOEMrisX.js";
|
|
7
|
+
import W from "./BaseIcon-DuMfKUDs.js";
|
|
8
|
+
import vt from "./vue-ui-skeleton-jYHncdu5.js";
|
|
9
|
+
import ft from "./vue-ui-accordion-q-bLDiD3.js";
|
|
10
|
+
import { u as Pe } from "./useNestedProp-2KJaYPfM.js";
|
|
11
11
|
import { _ as ht } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], gt = {
|
|
13
13
|
__name: "RecursiveCircles",
|
|
@@ -206,7 +206,7 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
206
206
|
onClick: c[0] || (c[0] = M((d) => k("moveLeft"), ["stop"])),
|
|
207
207
|
style: { position: "absolute", left: "0", top: "50%", transform: "translateY(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
|
|
208
208
|
}, [
|
|
209
|
-
R(
|
|
209
|
+
R(W, {
|
|
210
210
|
stroke: a.color,
|
|
211
211
|
name: "arrowLeft",
|
|
212
212
|
style: { cursor: "pointer" }
|
|
@@ -216,7 +216,7 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
216
216
|
onClick: c[1] || (c[1] = M((d) => k("moveTop"), ["stop"])),
|
|
217
217
|
style: { position: "absolute", top: "0", left: "50%", transform: "translateX(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
|
|
218
218
|
}, [
|
|
219
|
-
R(
|
|
219
|
+
R(W, {
|
|
220
220
|
stroke: a.color,
|
|
221
221
|
name: "arrowTop",
|
|
222
222
|
style: { cursor: "pointer" }
|
|
@@ -226,7 +226,7 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
226
226
|
onClick: c[2] || (c[2] = M((d) => k("moveRight"), ["stop"])),
|
|
227
227
|
style: { position: "absolute", right: "0", top: "50%", transform: "translateY(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
|
|
228
228
|
}, [
|
|
229
|
-
R(
|
|
229
|
+
R(W, {
|
|
230
230
|
stroke: a.color,
|
|
231
231
|
name: "arrowRight",
|
|
232
232
|
style: { cursor: "pointer" }
|
|
@@ -236,7 +236,7 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
236
236
|
onClick: c[3] || (c[3] = M((d) => k("moveBottom"), ["stop"])),
|
|
237
237
|
style: { position: "absolute", bottom: "0", left: "50%", transform: "translateX(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
|
|
238
238
|
}, [
|
|
239
|
-
R(
|
|
239
|
+
R(W, {
|
|
240
240
|
stroke: a.color,
|
|
241
241
|
name: "arrowBottom",
|
|
242
242
|
style: { cursor: "pointer" }
|
|
@@ -246,7 +246,7 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
246
246
|
onClick: c[4] || (c[4] = M((d) => k("reset"), ["stop"])),
|
|
247
247
|
style: { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%,-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
|
|
248
248
|
}, [
|
|
249
|
-
R(
|
|
249
|
+
R(W, {
|
|
250
250
|
stroke: a.color,
|
|
251
251
|
name: "close",
|
|
252
252
|
style: { cursor: "pointer" },
|
|
@@ -276,7 +276,7 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
278
|
setup(a, { expose: k }) {
|
|
279
|
-
const C = a, { vue_ui_molecule: c } =
|
|
279
|
+
const C = a, { vue_ui_molecule: c } = qe(), d = B(() => !!C.dataset && C.dataset.length);
|
|
280
280
|
Ve(() => {
|
|
281
281
|
Ze(C.dataset) && Je({
|
|
282
282
|
componentName: "VueUiMolecule",
|
|
@@ -372,10 +372,10 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
372
372
|
function oe(e) {
|
|
373
373
|
f.value.focus(), $e(() => {
|
|
374
374
|
te.value && cancelAnimationFrame(te.value);
|
|
375
|
-
const o = _.value.split(" "), l = parseFloat(o[0]), v = parseFloat(o[1]), i = parseFloat(o[2]), h = parseFloat(o[3]), { x: j, y: ae } = e.polygonPath.coordinates[0], { circleRadius: p } = e, z = 8.34, V = j - p * z, D = ae - p * z, se = p * z * 2, He = p * z * 2, Ee = Math.sqrt((V - l) ** 2 + (D - v) ** 2),
|
|
375
|
+
const o = _.value.split(" "), l = parseFloat(o[0]), v = parseFloat(o[1]), i = parseFloat(o[2]), h = parseFloat(o[3]), { x: j, y: ae } = e.polygonPath.coordinates[0], { circleRadius: p } = e, z = 8.34, V = j - p * z, D = ae - p * z, se = p * z * 2, He = p * z * 2, Ee = Math.sqrt((V - l) ** 2 + (D - v) ** 2), Y = Math.min(1200, Math.max(20, Math.floor(Ee / 10))), Ae = (V - l) / Y, Xe = (D - v) / Y, Ge = (se - i) / Y, je = (He - h) / Y;
|
|
376
376
|
let A = 0;
|
|
377
377
|
function ke() {
|
|
378
|
-
_.value = `${l + Ae * A} ${v + Xe * A} ${i + Ge * A} ${h + je * A}`, A += t.value.style.chart.zoom.speed, A <=
|
|
378
|
+
_.value = `${l + Ae * A} ${v + Xe * A} ${i + Ge * A} ${h + je * A}`, A += t.value.style.chart.zoom.speed, A <= Y && (te.value = requestAnimationFrame(ke));
|
|
379
379
|
}
|
|
380
380
|
ke();
|
|
381
381
|
});
|
|
@@ -425,7 +425,7 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
425
425
|
function Ne(e) {
|
|
426
426
|
pe.value = e, e ? (u.value = !0, Ue(e), X.value = e.uid) : (u.value = !1, T.value = "", X.value = null);
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function q(e) {
|
|
429
429
|
e === "right" && (b.value.polygonPath.coordinates[0].x += b.value.circleRadius), e === "left" && (b.value.polygonPath.coordinates[0].x -= b.value.circleRadius), e === "top" && (b.value.polygonPath.coordinates[0].y -= b.value.circleRadius), e === "bottom" && (b.value.polygonPath.coordinates[0].y += b.value.circleRadius), oe(b.value);
|
|
430
430
|
}
|
|
431
431
|
function ze(e) {
|
|
@@ -562,7 +562,7 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
562
562
|
onToggleTable: ye,
|
|
563
563
|
onToggleLabels: me,
|
|
564
564
|
onToggleTooltip: be
|
|
565
|
-
},
|
|
565
|
+
}, Ye({ _: 2 }, [
|
|
566
566
|
e.$slots.optionTooltip ? {
|
|
567
567
|
name: "optionTooltip",
|
|
568
568
|
fn: $(() => [
|
|
@@ -665,10 +665,10 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
665
665
|
key: `direction_pad_${Q.value}`,
|
|
666
666
|
color: t.value.style.chart.color,
|
|
667
667
|
isFullscreen: G.value,
|
|
668
|
-
onMoveLeft: o[1] || (o[1] = (l) =>
|
|
669
|
-
onMoveRight: o[2] || (o[2] = (l) =>
|
|
670
|
-
onMoveTop: o[3] || (o[3] = (l) =>
|
|
671
|
-
onMoveBottom: o[4] || (o[4] = (l) =>
|
|
668
|
+
onMoveLeft: o[1] || (o[1] = (l) => q("left")),
|
|
669
|
+
onMoveRight: o[2] || (o[2] = (l) => q("right")),
|
|
670
|
+
onMoveTop: o[3] || (o[3] = (l) => q("top")),
|
|
671
|
+
onMoveBottom: o[4] || (o[4] = (l) => q("bottom")),
|
|
672
672
|
onReset: o[5] || (o[5] = (l) => {
|
|
673
673
|
ee(), H.value = !1;
|
|
674
674
|
})
|
|
@@ -697,6 +697,8 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
697
697
|
borderWidth: t.value.style.chart.tooltip.borderWidth,
|
|
698
698
|
fontSize: t.value.style.chart.tooltip.fontSize,
|
|
699
699
|
backgroundOpacity: t.value.style.chart.tooltip.backgroundOpacity,
|
|
700
|
+
position: t.value.style.chart.tooltip.position,
|
|
701
|
+
offsetY: t.value.style.chart.tooltip.offsetY,
|
|
700
702
|
parent: f.value,
|
|
701
703
|
content: T.value,
|
|
702
704
|
isCustom: t.value.style.chart.tooltip.customFormat && typeof t.value.style.chart.tooltip.customFormat == "function"
|
|
@@ -708,7 +710,7 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
708
710
|
P(e.$slots, "tooltip-after", Z(J({ ...le.value })), void 0, !0)
|
|
709
711
|
]),
|
|
710
712
|
_: 3
|
|
711
|
-
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "parent", "content", "isCustom"]),
|
|
713
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
|
|
712
714
|
d.value ? (s(), U(ft, {
|
|
713
715
|
key: 6,
|
|
714
716
|
hideDetails: "",
|
|
@@ -741,7 +743,7 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
741
743
|
}, null, 8, Lt)
|
|
742
744
|
]),
|
|
743
745
|
td: $(({ td: l }) => [
|
|
744
|
-
|
|
746
|
+
We(Te(l.name || l), 1)
|
|
745
747
|
]),
|
|
746
748
|
_: 1
|
|
747
749
|
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
@@ -750,7 +752,7 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
750
752
|
}, 8, ["config"])) : m("", !0)
|
|
751
753
|
], 46, wt));
|
|
752
754
|
}
|
|
753
|
-
}, Gt = /* @__PURE__ */ ht(Dt, [["__scopeId", "data-v-
|
|
755
|
+
}, Gt = /* @__PURE__ */ ht(Dt, [["__scopeId", "data-v-a8f784eb"]]);
|
|
754
756
|
export {
|
|
755
757
|
Gt as default
|
|
756
758
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DKKeZVg7.cjs"),W=require("./Title-Bbqbwqnv.cjs"),B=require("./usePrinter-CYMnEbaS.cjs"),G=require("./Legend-BLbMFYMt.cjs"),p=require("./BaseIcon-BW_EtqQp.cjs"),U=require("./DataTable-YP1Z9yWa.cjs"),H=require("./vue-ui-skeleton-Bsxqk_85.cjs"),R=require("./vue-ui-accordion-kiAJNaGj.cjs"),E=require("./useNestedProp-CFgv63bL.cjs"),X=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Y=["xmlns","viewBox"],J=["id"],Q=["stop-color"],Z=["stop-color"],ee=["x1","y1","x2","y2","stroke","stroke-width"],te=["d","stroke","stroke-width"],oe=["stroke"],le=["fill"],ae=["stroke"],re=["fill"],ne=["stroke"],se=["fill"],ue=["stroke"],ie=["fill"],ce=["stroke"],de=["fill"],ye=["d","stroke","stroke-width","fill"],ve=["x1","y1","stroke"],me=["cx","cy","fill","stroke"],he=["fill","stroke"],ke=["y","fill","font-weight"],pe=["y","fill"],fe={key:3,class:"vue-data-ui-watermark"},ge=["onClick"],be={style:{"font-weight":"bold"}},Ce=["innerHTML"],Ne={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(S,{expose:T}){const s=S,{vue_ui_mood_radar:F}=n.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{n.objectIsEmpty(s.dataset)&&n.error({componentName:"VueUiMoodRadar",type:"dataset"})});const h=e.ref(n.createUid()),N=e.ref(null),A=e.ref(null),r=e.ref(null),t=e.computed(()=>{const l=E.useNestedProp({userConfig:s.config,defaultConfig:F});return l.theme?{...E.useNestedProp({userConfig:n.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}),{isPrinting:x,isImaging:w,generatePdf:_,generateImage:V}=B.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),f=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>n.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function L({centerX:l,centerY:a,apexX:o,apexY:i,proportion:c,key:k,value:q}){return{x:l+(o-l)*c,y:a+(i-a)*c,key:k,value:q}}const I=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),v=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),u=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/v.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),$=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&n.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),C.value.coordinates.map((l,a)=>{const o=L({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:u.value[a].value/I.value,key:u.value[a].key,value:u.value[a].value});return{...l,plots:o,key:u.value[a].key}})):[]),O=e.computed(()=>({cy:"mood-radar-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 z(l){l===r.value?r.value=null:r.value=l}const y=e.computed(()=>{const l=u.value.map(o=>({name:o.key,color:o.color})),a=u.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function M(){e.nextTick(()=>{const l=y.value.head.map((i,c)=>[[i.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=n.createCsvContent(a);n.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=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>',Number(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,k)=>[{color:c.color,name:c.name},y.value.body[k].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[k]/v.value)?"-":(y.value.body[k]/v.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},i=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:i}});function D(){return u.value}function P(){f.value.showTable=!f.value.showTable}const b=e.ref(!1);function j(l){b.value=l}return T({getData:D,generatePdf:_,generateCsv:M,generateImage:V,toggleTable:P}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:N,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(W._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(B.UserOptions,{key:1,ref_key:"details",ref:A,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(x),isImaging:e.unref(w),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,onToggleFullscreen:j,onGeneratePdf:e.unref(_),onGenerateCsv:M,onGenerateImage:e.unref(V),onToggleTable:P},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:i})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.layout.dataPolygon.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(n.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100)}${e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]}`},null,8,Z)],8,J)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ee))),256)),e.createElementVNode("path",{d:C.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,te),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,oe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>r.value=5),onMouseleave:a[1]||(a[1]=o=>r.value=null),cx:"128",cy:"25",r:"20",fill:r.value===5?t.value.style.chart.layout.smileys.colors[5]+"33":"transparent"},null,40,le),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,ae),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>r.value=4),onMouseleave:a[3]||(a[3]=o=>r.value=null),cx:"227",cy:"95.5",r:"20",fill:r.value===4?t.value.style.chart.layout.smileys.colors[4]+"33":"transparent"},null,40,re),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,ne),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>r.value=3),onMouseleave:a[5]||(a[5]=o=>r.value=null),cx:"190",cy:"213.5",r:"20",fill:r.value===3?t.value.style.chart.layout.smileys.colors[3]+"33":"transparent"},null,40,se),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,ue),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>r.value=2),onMouseleave:a[7]||(a[7]=o=>r.value=null),cx:"65",cy:"213.5",r:"20",fill:r.value===2?t.value.style.chart.layout.smileys.colors[2]+"33":"transparent"},null,40,ie),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,ce),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>r.value=1),onMouseleave:a[9]||(a[9]=o=>r.value=null),cx:"29",cy:"95.5",r:"20",fill:r.value===1?t.value.style.chart.layout.smileys.colors[1]+"33":"transparent"},null,40,de),e.createElementVNode("path",{d:e.unref(n.makePath)($.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:t.value.style.chart.layout.dataPolygon.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,ye),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value.map(o=>o.plots),(o,i)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${r.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,ve),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,me),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,he),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(Number(o.value.toFixed(t.value.style.chart.layout.dataLabel.roundingValue)).toLocaleString()),9,ke),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(Number((o.value/v.value*100).toFixed(t.value.style.chart.layout.dataLabel.roundingPercentage)).toLocaleString())+"%) ",9,pe)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,Y)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",fe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(x)||e.unref(w)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(H.default,{key:4,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(G.Legend,{key:5,legendSet:u.value,config:O.value,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:i})=>[e.createElementVNode("div",{onClick:()=>z(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(p.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(p.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(p.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(p.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(p.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",be,e.toDisplayString(o.value),1),e.createTextVNode(" ("+e.toDisplayString((isNaN(o.proportion)?0:o.proportion*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1)],8,ge)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:u.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(R.default,{key:6,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(U.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[10]||(a[10]=o=>f.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Ce)]),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,K))}},xe=X._export_sfc(Ne,[["__scopeId","data-v-0751dc77"]]);exports.default=xe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-oufiZvaS.cjs"),W=require("./Title-DxNugmhI.cjs"),B=require("./usePrinter-Cc8ufBvU.cjs"),G=require("./Legend-BwrzHxLy.cjs"),p=require("./BaseIcon-C-k_mqXL.cjs"),U=require("./DataTable-CHXdpx94.cjs"),H=require("./vue-ui-skeleton-Fsru0dbb.cjs"),R=require("./vue-ui-accordion-DiR0dVog.cjs"),E=require("./useNestedProp-CmTItGss.cjs"),X=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Y=["xmlns","viewBox"],J=["id"],Q=["stop-color"],Z=["stop-color"],ee=["x1","y1","x2","y2","stroke","stroke-width"],te=["d","stroke","stroke-width"],oe=["stroke"],le=["fill"],ae=["stroke"],re=["fill"],ne=["stroke"],se=["fill"],ue=["stroke"],ie=["fill"],ce=["stroke"],de=["fill"],ye=["d","stroke","stroke-width","fill"],ve=["x1","y1","stroke"],me=["cx","cy","fill","stroke"],he=["fill","stroke"],ke=["y","fill","font-weight"],pe=["y","fill"],fe={key:3,class:"vue-data-ui-watermark"},ge=["onClick"],be={style:{"font-weight":"bold"}},Ce=["innerHTML"],Ne={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(S,{expose:T}){const s=S,{vue_ui_mood_radar:F}=n.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{n.objectIsEmpty(s.dataset)&&n.error({componentName:"VueUiMoodRadar",type:"dataset"})});const h=e.ref(n.createUid()),N=e.ref(null),A=e.ref(null),r=e.ref(null),t=e.computed(()=>{const l=E.useNestedProp({userConfig:s.config,defaultConfig:F});return l.theme?{...E.useNestedProp({userConfig:n.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}),{isPrinting:x,isImaging:w,generatePdf:_,generateImage:V}=B.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),f=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>n.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function L({centerX:l,centerY:a,apexX:o,apexY:i,proportion:c,key:k,value:q}){return{x:l+(o-l)*c,y:a+(i-a)*c,key:k,value:q}}const I=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),v=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),u=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/v.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),$=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&n.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),C.value.coordinates.map((l,a)=>{const o=L({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:u.value[a].value/I.value,key:u.value[a].key,value:u.value[a].value});return{...l,plots:o,key:u.value[a].key}})):[]),O=e.computed(()=>({cy:"mood-radar-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 z(l){l===r.value?r.value=null:r.value=l}const y=e.computed(()=>{const l=u.value.map(o=>({name:o.key,color:o.color})),a=u.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function M(){e.nextTick(()=>{const l=y.value.head.map((i,c)=>[[i.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=n.createCsvContent(a);n.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=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>',Number(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,k)=>[{color:c.color,name:c.name},y.value.body[k].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[k]/v.value)?"-":(y.value.body[k]/v.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},i=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:i}});function D(){return u.value}function P(){f.value.showTable=!f.value.showTable}const b=e.ref(!1);function j(l){b.value=l}return T({getData:D,generatePdf:_,generateCsv:M,generateImage:V,toggleTable:P}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:N,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(W._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(B.UserOptions,{key:1,ref_key:"details",ref:A,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(x),isImaging:e.unref(w),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,onToggleFullscreen:j,onGeneratePdf:e.unref(_),onGenerateCsv:M,onGenerateImage:e.unref(V),onToggleTable:P},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:i})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.layout.dataPolygon.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(n.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100)}${e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]}`},null,8,Z)],8,J)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ee))),256)),e.createElementVNode("path",{d:C.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,te),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,oe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>r.value=5),onMouseleave:a[1]||(a[1]=o=>r.value=null),cx:"128",cy:"25",r:"20",fill:r.value===5?t.value.style.chart.layout.smileys.colors[5]+"33":"transparent"},null,40,le),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,ae),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>r.value=4),onMouseleave:a[3]||(a[3]=o=>r.value=null),cx:"227",cy:"95.5",r:"20",fill:r.value===4?t.value.style.chart.layout.smileys.colors[4]+"33":"transparent"},null,40,re),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,ne),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>r.value=3),onMouseleave:a[5]||(a[5]=o=>r.value=null),cx:"190",cy:"213.5",r:"20",fill:r.value===3?t.value.style.chart.layout.smileys.colors[3]+"33":"transparent"},null,40,se),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,ue),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>r.value=2),onMouseleave:a[7]||(a[7]=o=>r.value=null),cx:"65",cy:"213.5",r:"20",fill:r.value===2?t.value.style.chart.layout.smileys.colors[2]+"33":"transparent"},null,40,ie),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,ce),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>r.value=1),onMouseleave:a[9]||(a[9]=o=>r.value=null),cx:"29",cy:"95.5",r:"20",fill:r.value===1?t.value.style.chart.layout.smileys.colors[1]+"33":"transparent"},null,40,de),e.createElementVNode("path",{d:e.unref(n.makePath)($.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:t.value.style.chart.layout.dataPolygon.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,ye),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value.map(o=>o.plots),(o,i)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${r.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,ve),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,me),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,he),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(Number(o.value.toFixed(t.value.style.chart.layout.dataLabel.roundingValue)).toLocaleString()),9,ke),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(Number((o.value/v.value*100).toFixed(t.value.style.chart.layout.dataLabel.roundingPercentage)).toLocaleString())+"%) ",9,pe)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,Y)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",fe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(x)||e.unref(w)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(H.default,{key:4,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(G.Legend,{key:5,legendSet:u.value,config:O.value,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:i})=>[e.createElementVNode("div",{onClick:()=>z(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(p.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(p.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(p.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(p.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(p.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",be,e.toDisplayString(o.value),1),e.createTextVNode(" ("+e.toDisplayString((isNaN(o.proportion)?0:o.proportion*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1)],8,ge)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:u.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(R.default,{key:6,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(U.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[10]||(a[10]=o=>f.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Ce)]),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,K))}},xe=X._export_sfc(Ne,[["__scopeId","data-v-0751dc77"]]);exports.default=xe;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { computed as d, onMounted as ne, ref as C, openBlock as r, createElementBlock as g, normalizeClass as D, normalizeStyle as F, createVNode as G, createCommentVNode as u, createBlock as h, unref as i, createSlots as ue, withCtx as m, renderSlot as p, normalizeProps as E, guardReactiveProps as U, createElementVNode as a, Fragment as H, renderList as R, toDisplayString as $, createTextVNode as X, nextTick as ie } from "vue";
|
|
2
|
-
import { u as de, o as ce, e as K, c as ye, t as ve, I as he, X as me, r as I, s as fe, J as ke, n as ge, q as pe } from "./index-
|
|
3
|
-
import { _ as be } from "./Title-
|
|
4
|
-
import { u as Ce, U as xe } from "./usePrinter-
|
|
5
|
-
import { L as _e } from "./Legend-
|
|
6
|
-
import M from "./BaseIcon-
|
|
7
|
-
import { D as we } from "./DataTable-
|
|
8
|
-
import $e from "./vue-ui-skeleton-
|
|
9
|
-
import Me from "./vue-ui-accordion-
|
|
10
|
-
import { u as q } from "./useNestedProp-
|
|
2
|
+
import { u as de, o as ce, e as K, c as ye, t as ve, I as he, X as me, r as I, s as fe, J as ke, n as ge, q as pe } from "./index-BvjCO-wv.js";
|
|
3
|
+
import { _ as be } from "./Title-Bx2ibobQ.js";
|
|
4
|
+
import { u as Ce, U as xe } from "./usePrinter-CaKXrCiB.js";
|
|
5
|
+
import { L as _e } from "./Legend-BqqpwXbu.js";
|
|
6
|
+
import M from "./BaseIcon-DuMfKUDs.js";
|
|
7
|
+
import { D as we } from "./DataTable-DKHF_NH2.js";
|
|
8
|
+
import $e from "./vue-ui-skeleton-jYHncdu5.js";
|
|
9
|
+
import Me from "./vue-ui-accordion-q-bLDiD3.js";
|
|
10
|
+
import { u as q } from "./useNestedProp-2KJaYPfM.js";
|
|
11
11
|
import { _ as Ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const Pe = ["id"], Te = ["xmlns", "viewBox"], Fe = ["id"], Ae = ["stop-color"], Ie = ["stop-color"], Le = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Oe = ["d", "stroke", "stroke-width"], Se = ["stroke"], je = ["fill"], Ve = ["stroke"], Be = ["fill"], We = ["stroke"], ze = ["fill"], De = ["stroke"], Ge = ["fill"], Ee = ["stroke"], Ue = ["fill"], He = ["d", "stroke", "stroke-width", "fill"], Re = ["x1", "y1", "stroke"], Xe = ["cx", "cy", "fill", "stroke"], Ke = ["fill", "stroke"], qe = ["y", "fill", "font-weight"], Je = ["y", "fill"], Ye = {
|
|
13
13
|
key: 3,
|