vue-data-ui 2.3.96 → 2.3.97
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-Dse9W-xd.js → Arrow-BAg5kQhG.js} +1 -1
- package/dist/{Arrow-eiCuVfYA.cjs → Arrow-CD-z6ya0.cjs} +1 -1
- package/dist/{BaseIcon-DFIHCTyJ.js → BaseIcon-CiQsJmEc.js} +1 -1
- package/dist/{BaseIcon-DJbzYsmN.cjs → BaseIcon-JWYc0t9a.cjs} +1 -1
- package/dist/{DataTable-TdEc8llA.js → DataTable-BczvA492.js} +2 -2
- package/dist/{DataTable-YpBvWSn5.cjs → DataTable-DRJUrEXP.cjs} +1 -1
- package/dist/{Legend-CsYNhmuM.cjs → Legend-DDmBZxt8.cjs} +1 -1
- package/dist/{Legend-BsB-CXKk.js → Legend-DnOc-JGW.js} +1 -1
- package/dist/{PackageVersion-C5LvF-TN.js → PackageVersion-DN8qp-uI.js} +1 -1
- package/dist/{PackageVersion-kqwH1rG4.cjs → PackageVersion-rOhPenOY.cjs} +1 -1
- package/dist/{Shape-CyDjKOjw.cjs → Shape-CDDjN4N-.cjs} +1 -1
- package/dist/{Shape-DpWOBZlx.js → Shape-DhRVUsKe.js} +1 -1
- package/dist/{Slicer-BQr2RZjz.js → Slicer-B7JFT6tT.js} +2 -2
- package/dist/{Slicer-D-wCwIJ3.cjs → Slicer-IdC3VhM9.cjs} +1 -1
- package/dist/{Title-BMSO566P.js → Title-0tYDaWv7.js} +1 -1
- package/dist/{Title-DWSN4YUC.cjs → Title-Cjusozo5.cjs} +1 -1
- package/dist/{Tooltip-Bl8Ilf5h.cjs → Tooltip-CkqTs_wn.cjs} +1 -1
- package/dist/{Tooltip-CHABi2zh.js → Tooltip-DdWGiVyf.js} +1 -1
- package/dist/{index-BcpaEQjg.js → index-BJNSbAx7.js} +22 -22
- package/dist/{index-Bv8wGGBc.cjs → index-NvxTr0fZ.cjs} +3 -3
- package/dist/{useNestedProp-CEsVEbKF.js → useNestedProp-CLh4tPxT.js} +1 -1
- package/dist/{useNestedProp-Bf7w6kTt.cjs → useNestedProp-DhLxBAwX.cjs} +1 -1
- package/dist/{usePrinter-7jNVagoH.cjs → usePrinter-0s8wVGIy.cjs} +1 -1
- package/dist/{usePrinter-DzCuoQHM.js → usePrinter-CkV5eORP.js} +1 -1
- package/dist/{vue-data-ui-BFU1Dig_.js → vue-data-ui-CyOAruHW.js} +57 -57
- package/dist/{vue-data-ui-Bs74qL5y.cjs → vue-data-ui-OR4tWNiS.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-4ue7sfgA.js → vue-ui-3d-bar-CxDdjFAw.js} +8 -8
- package/dist/{vue-ui-3d-bar-DxfiT-RQ.cjs → vue-ui-3d-bar-DrnEff_D.cjs} +1 -1
- package/dist/{vue-ui-accordion-CSkH8Ztm.cjs → vue-ui-accordion-CxPjShWo.cjs} +1 -1
- package/dist/{vue-ui-accordion-Dhi5XiYk.js → vue-ui-accordion-DDf5Y2GY.js} +3 -3
- package/dist/{vue-ui-age-pyramid-BApJ-rfW.js → vue-ui-age-pyramid-BMjBTeyH.js} +9 -9
- package/dist/{vue-ui-age-pyramid-Ds5Q2JFz.cjs → vue-ui-age-pyramid-BiHpf1Rk.cjs} +1 -1
- package/dist/{vue-ui-annotator-8qRRkhYB.cjs → vue-ui-annotator--NmsTiIf.cjs} +1 -1
- package/dist/{vue-ui-annotator-BASwkqF2.js → vue-ui-annotator-B-myvrhe.js} +1 -1
- package/dist/{vue-ui-candlestick-CljlKMFQ.cjs → vue-ui-candlestick-DSwIFt7i.cjs} +1 -1
- package/dist/{vue-ui-candlestick-Dlgm0_M_.js → vue-ui-candlestick-J1JpFsJT.js} +10 -10
- package/dist/{vue-ui-carousel-table-3izbh8XN.js → vue-ui-carousel-table-B62mAFeV.js} +4 -4
- package/dist/{vue-ui-carousel-table-DkveY2W7.cjs → vue-ui-carousel-table-Cg3I81MW.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DzKXA8vJ.js → vue-ui-chestnut-ChAwKgeO.js} +7 -7
- package/dist/{vue-ui-chestnut-CQu1jOyT.cjs → vue-ui-chestnut-lQvVg9Rn.cjs} +1 -1
- package/dist/{vue-ui-cursor-DbQV-LLF.cjs → vue-ui-cursor-D-qe8qez.cjs} +1 -1
- package/dist/{vue-ui-cursor-BrBsIJo3.js → vue-ui-cursor-XXjnAIH2.js} +2 -2
- package/dist/{vue-ui-dashboard-Wzves807.cjs → vue-ui-dashboard-CB41KQ7y.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DXdmiwYq.js → vue-ui-dashboard-CC-DF6iU.js} +2 -2
- package/dist/{vue-ui-digits-CSQi9Lh3.cjs → vue-ui-digits-CIHkrLL6.cjs} +1 -1
- package/dist/{vue-ui-digits-BppnP8CH.js → vue-ui-digits-Degwjx76.js} +2 -2
- package/dist/{vue-ui-donut-DkHShWM1.js → vue-ui-donut-CYBpOCFo.js} +10 -10
- package/dist/{vue-ui-donut-evolution-CwOes6ko.cjs → vue-ui-donut-evolution-Bbt27unL.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-oDtnYccI.js → vue-ui-donut-evolution-Bxq-hr-P.js} +10 -10
- package/dist/{vue-ui-donut-CqlGTsGd.cjs → vue-ui-donut-jwD3vNoD.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-DQlj4MnV.cjs → vue-ui-dumbbell-7f9d2mh-.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-CDv2q1Sr.js → vue-ui-dumbbell-KsVxecua.js} +9 -9
- package/dist/{vue-ui-flow-Bx-zjQWh.cjs → vue-ui-flow-BzcB3iiZ.cjs} +1 -1
- package/dist/{vue-ui-flow-1DFcpdAA.js → vue-ui-flow-FqXhCo7u.js} +8 -8
- package/dist/{vue-ui-galaxy-bE0htYx4.js → vue-ui-galaxy-B9rSYr7m.js} +10 -10
- package/dist/{vue-ui-galaxy-BqB8ilSB.cjs → vue-ui-galaxy-xVldWSiq.cjs} +1 -1
- package/dist/{vue-ui-gauge-B3fJ7NBS.cjs → vue-ui-gauge-B4r-qdzi.cjs} +1 -1
- package/dist/{vue-ui-gauge-QgQpiMpP.js → vue-ui-gauge-k6fqkXqN.js} +6 -6
- package/dist/{vue-ui-gizmo-BPTXhk_5.cjs → vue-ui-gizmo-By3-mz_t.cjs} +1 -1
- package/dist/{vue-ui-gizmo-Dvhxmifg.js → vue-ui-gizmo-CYaThghf.js} +3 -3
- package/dist/{vue-ui-heatmap-mKhWCDCz.cjs → vue-ui-heatmap-B0w5CXLi.cjs} +1 -1
- package/dist/{vue-ui-heatmap-Dz__vLIx.js → vue-ui-heatmap-Bdffdnay.js} +9 -9
- package/dist/{vue-ui-kpi-By6cERhR.cjs → vue-ui-kpi-BqN5GILt.cjs} +1 -1
- package/dist/{vue-ui-kpi-CBUwc_CD.js → vue-ui-kpi-DG8_lFYS.js} +3 -3
- package/dist/{vue-ui-mini-loader-DgHibV20.js → vue-ui-mini-loader-BZS_gsWT.js} +2 -2
- package/dist/{vue-ui-mini-loader-jX_8sp7v.cjs → vue-ui-mini-loader-C-Na_wY7.cjs} +1 -1
- package/dist/{vue-ui-molecule-DKpW8ux_.js → vue-ui-molecule-BK6bSbRU.js} +10 -10
- package/dist/{vue-ui-molecule-B0U_SHX-.cjs → vue-ui-molecule-Cdg96qiI.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-DVChUb6f.cjs → vue-ui-mood-radar-D-BCyG9b.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-DCDK2sIV.js → vue-ui-mood-radar-D5GRHLEE.js} +10 -10
- package/dist/{vue-ui-nested-donuts-CGp-Jubi.cjs → vue-ui-nested-donuts-D1fD0b-H.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-FMQPCwII.js → vue-ui-nested-donuts-mxJHstX4.js} +10 -10
- package/dist/{vue-ui-onion-DL6021Q8.js → vue-ui-onion-6mkIHe9R.js} +10 -10
- package/dist/{vue-ui-onion-uId6GP2z.cjs → vue-ui-onion-vKC5zZVM.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-BQuvfJQt.js → vue-ui-parallel-coordinate-plot-B_gGjFqe.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-BQnqXMkU.cjs → vue-ui-parallel-coordinate-plot-DqbwxRdK.cjs} +1 -1
- package/dist/{vue-ui-quadrant-D0aD-7Tw.cjs → vue-ui-quadrant-C54oPX3B.cjs} +1 -1
- package/dist/{vue-ui-quadrant-rUE9NWa4.js → vue-ui-quadrant-SEj9AJdW.js} +11 -11
- package/dist/{vue-ui-quick-chart-Jh4YDviZ.js → vue-ui-quick-chart-CqmbqQdH.js} +8 -8
- package/dist/{vue-ui-quick-chart-D-sbJNy5.cjs → vue-ui-quick-chart-DoEE3OMA.cjs} +1 -1
- package/dist/{vue-ui-radar-Bfdoz0Xo.js → vue-ui-radar-CKjssi06.js} +11 -11
- package/dist/{vue-ui-radar-De-YX5t1.cjs → vue-ui-radar-Dr91p7eK.cjs} +1 -1
- package/dist/{vue-ui-rating-Dur118_W.cjs → vue-ui-rating-DQvO4ejI.cjs} +1 -1
- package/dist/{vue-ui-rating-D9vACqJ2.js → vue-ui-rating-DUSE6rvR.js} +2 -2
- package/dist/{vue-ui-relation-circle-CnRm-wQ3.js → vue-ui-relation-circle-BmijKEEN.js} +6 -6
- package/dist/{vue-ui-relation-circle-Dux0WfBo.cjs → vue-ui-relation-circle-D089YHBB.cjs} +1 -1
- package/dist/{vue-ui-rings-B3K3LXLl.js → vue-ui-rings-BtzbZYTW.js} +10 -10
- package/dist/{vue-ui-rings-BkrRebjS.cjs → vue-ui-rings-D237PxGP.cjs} +1 -1
- package/dist/{vue-ui-scatter-DejGOjhr.js → vue-ui-scatter-BeKQhHUw.js} +11 -11
- package/dist/{vue-ui-scatter-DeebI4Fn.cjs → vue-ui-scatter-_bZ2lVMS.cjs} +1 -1
- package/dist/{vue-ui-screenshot-Bar9x-5m.cjs → vue-ui-screenshot-CnwCy_Kg.cjs} +1 -1
- package/dist/{vue-ui-screenshot-C08awO8c.js → vue-ui-screenshot-DNuimpRf.js} +1 -1
- package/dist/{vue-ui-skeleton-C53xk8CG.js → vue-ui-skeleton-CsU74BI7.js} +3 -3
- package/dist/{vue-ui-skeleton-TRdDtmHK.cjs → vue-ui-skeleton-DYHqPo98.cjs} +1 -1
- package/dist/{vue-ui-smiley-Dav2CD3O.cjs → vue-ui-smiley-D150KQ7d.cjs} +1 -1
- package/dist/{vue-ui-smiley-Cea-O3KH.js → vue-ui-smiley-d0tQ2o9w.js} +2 -2
- package/dist/{vue-ui-spark-trend-6ntFUEU4.cjs → vue-ui-spark-trend-BDibnFmx.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-Bs8twUaY.js → vue-ui-spark-trend-CtZdqmLI.js} +5 -5
- package/dist/{vue-ui-sparkbar-C21yWQQ3.cjs → vue-ui-sparkbar-BpFs4ZhV.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-Cbmc-caP.js → vue-ui-sparkbar-C-HlLkKi.js} +4 -4
- package/dist/{vue-ui-sparkgauge-0GVv8hjM.js → vue-ui-sparkgauge-BDRCFVP5.js} +4 -4
- package/dist/{vue-ui-sparkgauge-BmamgyGt.cjs → vue-ui-sparkgauge-BHBI7l12.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DCM-BHkv.js → vue-ui-sparkhistogram-B5nNXynh.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-CfdPXl3J.cjs → vue-ui-sparkhistogram-BjWnqdfo.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BTNHzn2V.cjs → vue-ui-sparkline-DpnhvlTf.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BYJczOkd.js → vue-ui-sparkline-o3mpXRV-.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-CkAqCQvJ.js → vue-ui-sparkstackbar-Bko-XhdQ.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-DRhK17o6.cjs → vue-ui-sparkstackbar-CST5NcMP.cjs} +1 -1
- package/dist/{vue-ui-stackbar-DYBUaxzj.cjs → vue-ui-stackbar-B3nyr_3-.cjs} +1 -1
- package/dist/{vue-ui-stackbar-CfYTo4Ku.js → vue-ui-stackbar-Br1WGSyo.js} +11 -11
- package/dist/{vue-ui-strip-plot-DEXBmsAI.js → vue-ui-strip-plot-C7Q-J22i.js} +10 -10
- package/dist/{vue-ui-strip-plot-CIN4KwoI.cjs → vue-ui-strip-plot-DkAf9HPJ.cjs} +1 -1
- package/dist/{vue-ui-table-DRpceoPe.cjs → vue-ui-table-1vOGIOAk.cjs} +1 -1
- package/dist/{vue-ui-table-nN3CrtRu.js → vue-ui-table-BTXo44Nv.js} +1 -1
- package/dist/{vue-ui-table-heatmap-DGJ9FlVp.cjs → vue-ui-table-heatmap-BNcfBY7T.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BA2teZNQ.js → vue-ui-table-heatmap-BosdMOLZ.js} +4 -4
- package/dist/{vue-ui-table-sparkline-Cu3WXN2z.cjs → vue-ui-table-sparkline-BGCEgn2A.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BvnGInz9.js → vue-ui-table-sparkline-D0NjMfnV.js} +5 -5
- package/dist/{vue-ui-thermometer-tMXK87ka.js → vue-ui-thermometer-Bnn77E-v.js} +6 -6
- package/dist/{vue-ui-thermometer-DbZ0o20q.cjs → vue-ui-thermometer-CUBnp6lX.cjs} +1 -1
- package/dist/{vue-ui-timer-BC8eaIGC.cjs → vue-ui-timer-D2WCDGWF.cjs} +1 -1
- package/dist/{vue-ui-timer-SzmYKRd2.js → vue-ui-timer-JupC7c3X.js} +5 -5
- package/dist/{vue-ui-tiremarks-Ckslwdk8.js → vue-ui-tiremarks-Db9JjYq5.js} +6 -6
- package/dist/{vue-ui-tiremarks-D-OLOU0v.cjs → vue-ui-tiremarks-FxWaEnUD.cjs} +1 -1
- package/dist/{vue-ui-treemap-Mm79m8P6.js → vue-ui-treemap-DPD9rcYE.js} +10 -10
- package/dist/{vue-ui-treemap-CUtRsRug.cjs → vue-ui-treemap-oplXghMz.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-CvLxGsDB.cjs → vue-ui-vertical-bar-BrOR3Xkc.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-r6pUOD2L.js → vue-ui-vertical-bar-DeUOAiy4.js} +10 -10
- package/dist/{vue-ui-waffle-CSyW6ncV.cjs → vue-ui-waffle-DGrZjGQR.cjs} +1 -1
- package/dist/{vue-ui-waffle-C_9IOFs2.js → vue-ui-waffle-qvh8AKep.js} +10 -10
- package/dist/{vue-ui-wheel-CKr2Vu47.cjs → vue-ui-wheel-CuEobbmN.cjs} +1 -1
- package/dist/{vue-ui-wheel-BOhOVAnh.js → vue-ui-wheel-DmG03DhW.js} +6 -6
- package/dist/{vue-ui-word-cloud-D2pGh3Xa.cjs → vue-ui-word-cloud-CbnPyd1_.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-ES0R6vuB.js → vue-ui-word-cloud-Dg0WQKL1.js} +9 -9
- package/dist/{vue-ui-xy-CyFLJGSu.js → vue-ui-xy-BBlRgHyb.js} +13 -13
- package/dist/{vue-ui-xy-canvas-BSV_IOwc.js → vue-ui-xy-canvas-CqyEve92.js} +10 -10
- package/dist/{vue-ui-xy-canvas-1N7guNkI.cjs → vue-ui-xy-canvas-CzCS04yK.cjs} +1 -1
- package/dist/{vue-ui-xy-BASuw3ZU.cjs → vue-ui-xy-gHnKcmgZ.cjs} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-Bv8wGGBc.cjs"),ne=require("./Title-DWSN4YUC.cjs"),J=require("./usePrinter-7jNVagoH.cjs"),re=require("./Tooltip-Bl8Ilf5h.cjs"),ie=require("./vue-ui-skeleton-TRdDtmHK.cjs"),de=require("./BaseIcon-DJbzYsmN.cjs"),ce=require("./vue-ui-accordion-CSkH8Ztm.cjs"),Q=require("./useNestedProp-Bf7w6kTt.cjs"),ve=require("./PackageVersion-kqwH1rG4.cjs"),ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),pe=["id"],he={key:0,style:"width:100%;background:transparent"},ge=["xmlns","viewBox"],fe=["x","y","width","height","fill","stroke","stroke-width"],me=["x","y","width","height","fill","stroke","stroke-width"],be=["font-size","font-weight","fill","x","y"],xe=["x","y","width","height","onMouseover"],ke={key:0},we=["font-size","fill","x","y","font-weight"],_e={key:0},Ce=["text-anchor","font-size","fill","font-weight","transform"],Ne={key:1},Le=["x","y","width","height","stroke","stroke-width"],Be={key:2},Ve=["id"],$e=["stop-color"],Ee=["stop-color"],Se=["x","y","font-size","fill"],ze=["x","y","height","rx","fill"],Ae=["x","y","font-size","fill"],Te=["stroke","x1","x2","y1","y2"],Me=["fill","d"],Pe={key:3},Fe={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Oe=["stop-color"],De=["stop-color"],Ie=["x","y","width","height","rx"],Re=["x","y","font-size","fill"],qe=["x","y","font-size","fill"],He=["stroke","x1","x2","y1","y2"],Ue=["fill","d"],Ge={key:3,class:"vue-data-ui-watermark"},Xe={class:"vue-ui-data-table"},je={key:0},Ye=["data-cell"],We={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ke=["data-cell"],Je={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Qe={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(B,{expose:Z}){const n=B;e.useCssVars(l=>({"1678b056":l.tdo}));const{vue_ui_heatmap:ee}=o.useConfig(),V=e.computed(()=>!!n.dataset&&n.dataset.length);o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiHeatmap",type:"dataset"});const k=e.ref(o.createUid()),S=e.ref(null),te=e.ref(null),z=e.ref(!1),A=e.ref(""),O=e.ref(void 0),w=e.ref(null),D=e.ref(0),I=e.ref(null),R=e.ref(!1),q=e.ref(0),t=e.computed({get:()=>H(),set:l=>l});function H(){const l=Q.useNestedProp({userConfig:n.config,defaultConfig:ee});let s={};return l.theme?s={...Q.useNestedProp({userConfig:o.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:s=l,n.config&&o.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?s.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:s.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,s}e.watch(()=>n.config,l=>{t.value=H(),T(),q.value+=1},{deep:!0}),e.watch(()=>n.dataset,()=>{T()},{deep:!0});const{isPrinting:U,isImaging:G,generatePdf:X,generateImage:j}=J.usePrinter({elementId:`heatmap__${k.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),le=e.computed(()=>t.value.table.responsiveBreakpoint);function ae(){new ResizeObserver(s=>{s.forEach(u=>{R.value=u.contentRect.width<le.value})}).observe(I.value)}e.onMounted(T);function T(){ae()}const x=e.computed(()=>Math.max(...n.dataset.flatMap(l=>(l.values||[]).length))),p=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+n.dataset.length*t.value.style.layout.cells.height,s=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(x.value<n.dataset.length?n.dataset.length:x.value)*t.value.style.layout.cells.height,u=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:u,width:s}}),$=e.computed(()=>t.value.style.legend.position),a=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:p.value.width-t.value.style.layout.padding.right-($.value==="right"&&t.value.style.legend.show?92:0),bottom:p.value.height-t.value.style.layout.padding.bottom,height:p.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:p.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-($.value==="right"&&t.value.style.legend.show?92:0)})),M=e.computed(()=>i.value.height*n.dataset.length),v=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:a.value.width/x.value,height:a.value.width/(x.value<n.dataset.length?n.dataset.length:x.value)})),h=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:n.dataset.map(u=>u.name),s=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:s.slice(0,x.value)}}),E=e.computed(()=>(n.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{o.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:s})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((s,u)=>s>=b.value?{side:"up",color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),ratio:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value))>1?1:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value)),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(s)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(s)/Math.abs(b.value)),color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`})})))),g=e.ref(null),_=e.ref(null);function oe(l,s,u,r){w.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:f,id:ue}=l;O.value=ue,g.value=d,_.value={datapoint:l,seriesIndex:s,series:E.value,config:t.value},z.value=!0;let P="";const F=t.value.style.tooltip.customFormat;o.isFunction(F)&&o.functionReturnsString(()=>F({datapoint:l,seriesIndex:s,series:E.value,config:t.value}))?A.value=F({datapoint:l,seriesIndex:s,series:E.value,config:t.value}):(P+=`<div>${c} ${f?`${f}`:""}</div>`,P+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,d)}">⬤</span><span>${isNaN(d)?"-":o.applyDataLabel(t.value.style.layout.cells.value.formatter,d,o.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:s})}</span></div>`,A.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${P}</div>`)}const C=e.computed(()=>a.value.top+M.value*(1-g.value/v.value)),N=e.computed(()=>a.value.left+(p.value.width-a.value.left-t.value.style.layout.padding.right)*(g.value/v.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),s=n.dataset.map(u=>u.values);return{head:l,body:s}});function Y(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],s=[];for(let d=0;d<h.value.xLabels.length;d+=1){const c=[h.value.xLabels[d]];for(let f=0;f<n.dataset.length;f+=1)c.push([n.dataset[f].values[d]]);s.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(s),r=o.createCsvContent(u);o.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const L=e.ref(!1);function se(l){L.value=l,D.value+=1}function W(){y.value.showTable=!y.value.showTable}function K(){y.value.showTooltip=!y.value.showTooltip}return Z({generatePdf:X,generateCsv:Y,generateImage:j,toggleTable:W,toggleTooltip:K}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:S,class:e.normalizeClass(`vue-ui-heatmap ${L.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}`),id:`heatmap__${k.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",he,[(e.openBlock(),e.createBlock(ne._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value?(e.openBlock(),e.createBlock(J.UserOptions,{ref_key:"details",ref:te,key:`user_options_${D.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(G),isPrinting:e.unref(U),uid:k.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:L.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:S.value,position:t.value.userOptions.position,onToggleFullscreen:se,onGeneratePdf:e.unref(X),onGenerateCsv:Y,onGenerateImage:e.unref(j),onToggleTable:W,onToggleTooltip:K},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":L.value,"vue-data-ui-fulscreen--off":!L.value}),viewBox:`0 0 ${p.value.width} ${p.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(ve._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(u,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,fe),e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,me),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(o.adaptColorToBackground)(d.color),x:a.value.left+i.value.width*c+i.value.width/2,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:d})),9,be)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c,y:a.value.top+i.value.height*r,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:f=>oe(d,r,a.value.left+i.value.width*c,a.value.top+i.value.height*r),onMouseout:s[0]||(s[0]=f=>{z.value=!1,O.value=void 0,g.value=null,w.value=null})},null,40,xe)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",ke,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:a.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(h.value.yLabels[r]),9,we)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&r%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+i.value.width/2+a.value.width/h.value.xLabels.length*r+t.value.style.layout.dataLabels.xAxis.offsetX}, ${a.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,Ce)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("g",Ne,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:w.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:w.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:i.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,Le)])):e.createCommentVNode("",!0),t.value.style.legend.show&&$.value==="right"?(e.openBlock(),e.createElementBlock("g",Be,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${k.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,$e),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Ee)],8,Ve)]),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Se),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:M.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${k.value})`},null,8,ze),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+M.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ae),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:C.value,y2:C.value},null,8,Te)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${a.value.right+36},${C.value} ${a.value.right+26},${C.value-8} ${a.value.right+26},${C.value+8}z`},null,8,Me)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&$.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Pe,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Fe,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,De)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height,width:p.value.width-a.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,Ie),e.createElementVNode("text",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Re),e.createElementVNode("text",{x:a.value.right,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,qe),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:N.value,x2:N.value,y1:a.value.bottom+t.value.style.layout.cells.height,y2:a.value.bottom+t.value.style.layout.cells.height*2},null,8,He)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${N.value},${a.value.bottom+t.value.style.layout.cells.height} ${N.value-12},${a.value.bottom+t.value.style.layout.cells.height-20} ${N.value+12},${a.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,Ue)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:p.value},void 0,!0)],14,ge)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:4,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(re._sfc_main,{show:y.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:S.value,content:A.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),V.value?(e.openBlock(),e.createBlock(ce.default,{key:5,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:I,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":R.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:s[1]||(s[1]=u=>y.value.showTable=!1),onKeypress:s[2]||(s[2]=e.withKeys(u=>y.value.showTable=!1,["enter"]))},[e.createVNode(de.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Xe,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",je,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(u,r)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(u.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",We,e.toDisplayString(u),1)],12,Ye),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":B.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",Je,e.toDisplayString(isNaN(d.values[r])?"-":e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[r],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,Ke))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,pe))}},Ze=ye._export_sfc(Qe,[["__scopeId","data-v-c67467bd"]]);exports.default=Ze;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-NvxTr0fZ.cjs"),ne=require("./Title-Cjusozo5.cjs"),J=require("./usePrinter-0s8wVGIy.cjs"),re=require("./Tooltip-CkqTs_wn.cjs"),ie=require("./vue-ui-skeleton-DYHqPo98.cjs"),de=require("./BaseIcon-JWYc0t9a.cjs"),ce=require("./vue-ui-accordion-CxPjShWo.cjs"),Q=require("./useNestedProp-DhLxBAwX.cjs"),ve=require("./PackageVersion-rOhPenOY.cjs"),ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),pe=["id"],he={key:0,style:"width:100%;background:transparent"},ge=["xmlns","viewBox"],fe=["x","y","width","height","fill","stroke","stroke-width"],me=["x","y","width","height","fill","stroke","stroke-width"],be=["font-size","font-weight","fill","x","y"],xe=["x","y","width","height","onMouseover"],ke={key:0},we=["font-size","fill","x","y","font-weight"],_e={key:0},Ce=["text-anchor","font-size","fill","font-weight","transform"],Ne={key:1},Le=["x","y","width","height","stroke","stroke-width"],Be={key:2},Ve=["id"],$e=["stop-color"],Ee=["stop-color"],Se=["x","y","font-size","fill"],ze=["x","y","height","rx","fill"],Ae=["x","y","font-size","fill"],Te=["stroke","x1","x2","y1","y2"],Me=["fill","d"],Pe={key:3},Fe={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Oe=["stop-color"],De=["stop-color"],Ie=["x","y","width","height","rx"],Re=["x","y","font-size","fill"],qe=["x","y","font-size","fill"],He=["stroke","x1","x2","y1","y2"],Ue=["fill","d"],Ge={key:3,class:"vue-data-ui-watermark"},Xe={class:"vue-ui-data-table"},je={key:0},Ye=["data-cell"],We={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ke=["data-cell"],Je={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Qe={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(B,{expose:Z}){const n=B;e.useCssVars(l=>({"1678b056":l.tdo}));const{vue_ui_heatmap:ee}=o.useConfig(),V=e.computed(()=>!!n.dataset&&n.dataset.length);o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiHeatmap",type:"dataset"});const k=e.ref(o.createUid()),S=e.ref(null),te=e.ref(null),z=e.ref(!1),A=e.ref(""),O=e.ref(void 0),w=e.ref(null),D=e.ref(0),I=e.ref(null),R=e.ref(!1),q=e.ref(0),t=e.computed({get:()=>H(),set:l=>l});function H(){const l=Q.useNestedProp({userConfig:n.config,defaultConfig:ee});let s={};return l.theme?s={...Q.useNestedProp({userConfig:o.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:s=l,n.config&&o.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?s.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:s.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,s}e.watch(()=>n.config,l=>{t.value=H(),T(),q.value+=1},{deep:!0}),e.watch(()=>n.dataset,()=>{T()},{deep:!0});const{isPrinting:U,isImaging:G,generatePdf:X,generateImage:j}=J.usePrinter({elementId:`heatmap__${k.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),le=e.computed(()=>t.value.table.responsiveBreakpoint);function ae(){new ResizeObserver(s=>{s.forEach(u=>{R.value=u.contentRect.width<le.value})}).observe(I.value)}e.onMounted(T);function T(){ae()}const x=e.computed(()=>Math.max(...n.dataset.flatMap(l=>(l.values||[]).length))),p=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+n.dataset.length*t.value.style.layout.cells.height,s=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(x.value<n.dataset.length?n.dataset.length:x.value)*t.value.style.layout.cells.height,u=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:u,width:s}}),$=e.computed(()=>t.value.style.legend.position),a=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:p.value.width-t.value.style.layout.padding.right-($.value==="right"&&t.value.style.legend.show?92:0),bottom:p.value.height-t.value.style.layout.padding.bottom,height:p.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:p.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-($.value==="right"&&t.value.style.legend.show?92:0)})),M=e.computed(()=>i.value.height*n.dataset.length),v=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:a.value.width/x.value,height:a.value.width/(x.value<n.dataset.length?n.dataset.length:x.value)})),h=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:n.dataset.map(u=>u.name),s=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:s.slice(0,x.value)}}),E=e.computed(()=>(n.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{o.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:s})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((s,u)=>s>=b.value?{side:"up",color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),ratio:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value))>1?1:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value)),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(s)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(s)/Math.abs(b.value)),color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`})})))),g=e.ref(null),_=e.ref(null);function oe(l,s,u,r){w.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:f,id:ue}=l;O.value=ue,g.value=d,_.value={datapoint:l,seriesIndex:s,series:E.value,config:t.value},z.value=!0;let P="";const F=t.value.style.tooltip.customFormat;o.isFunction(F)&&o.functionReturnsString(()=>F({datapoint:l,seriesIndex:s,series:E.value,config:t.value}))?A.value=F({datapoint:l,seriesIndex:s,series:E.value,config:t.value}):(P+=`<div>${c} ${f?`${f}`:""}</div>`,P+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,d)}">⬤</span><span>${isNaN(d)?"-":o.applyDataLabel(t.value.style.layout.cells.value.formatter,d,o.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:s})}</span></div>`,A.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${P}</div>`)}const C=e.computed(()=>a.value.top+M.value*(1-g.value/v.value)),N=e.computed(()=>a.value.left+(p.value.width-a.value.left-t.value.style.layout.padding.right)*(g.value/v.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),s=n.dataset.map(u=>u.values);return{head:l,body:s}});function Y(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],s=[];for(let d=0;d<h.value.xLabels.length;d+=1){const c=[h.value.xLabels[d]];for(let f=0;f<n.dataset.length;f+=1)c.push([n.dataset[f].values[d]]);s.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(s),r=o.createCsvContent(u);o.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const L=e.ref(!1);function se(l){L.value=l,D.value+=1}function W(){y.value.showTable=!y.value.showTable}function K(){y.value.showTooltip=!y.value.showTooltip}return Z({generatePdf:X,generateCsv:Y,generateImage:j,toggleTable:W,toggleTooltip:K}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:S,class:e.normalizeClass(`vue-ui-heatmap ${L.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}`),id:`heatmap__${k.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",he,[(e.openBlock(),e.createBlock(ne._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value?(e.openBlock(),e.createBlock(J.UserOptions,{ref_key:"details",ref:te,key:`user_options_${D.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(G),isPrinting:e.unref(U),uid:k.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:L.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:S.value,position:t.value.userOptions.position,onToggleFullscreen:se,onGeneratePdf:e.unref(X),onGenerateCsv:Y,onGenerateImage:e.unref(j),onToggleTable:W,onToggleTooltip:K},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":L.value,"vue-data-ui-fulscreen--off":!L.value}),viewBox:`0 0 ${p.value.width} ${p.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(ve._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(u,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,fe),e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,me),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(o.adaptColorToBackground)(d.color),x:a.value.left+i.value.width*c+i.value.width/2,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:d})),9,be)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c,y:a.value.top+i.value.height*r,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:f=>oe(d,r,a.value.left+i.value.width*c,a.value.top+i.value.height*r),onMouseout:s[0]||(s[0]=f=>{z.value=!1,O.value=void 0,g.value=null,w.value=null})},null,40,xe)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",ke,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:a.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(h.value.yLabels[r]),9,we)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&r%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+i.value.width/2+a.value.width/h.value.xLabels.length*r+t.value.style.layout.dataLabels.xAxis.offsetX}, ${a.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,Ce)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("g",Ne,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:w.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:w.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:i.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,Le)])):e.createCommentVNode("",!0),t.value.style.legend.show&&$.value==="right"?(e.openBlock(),e.createElementBlock("g",Be,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${k.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,$e),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Ee)],8,Ve)]),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Se),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:M.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${k.value})`},null,8,ze),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+M.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ae),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:C.value,y2:C.value},null,8,Te)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${a.value.right+36},${C.value} ${a.value.right+26},${C.value-8} ${a.value.right+26},${C.value+8}z`},null,8,Me)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&$.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Pe,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Fe,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,De)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height,width:p.value.width-a.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,Ie),e.createElementVNode("text",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Re),e.createElementVNode("text",{x:a.value.right,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,qe),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:N.value,x2:N.value,y1:a.value.bottom+t.value.style.layout.cells.height,y2:a.value.bottom+t.value.style.layout.cells.height*2},null,8,He)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${N.value},${a.value.bottom+t.value.style.layout.cells.height} ${N.value-12},${a.value.bottom+t.value.style.layout.cells.height-20} ${N.value+12},${a.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,Ue)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:p.value},void 0,!0)],14,ge)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:4,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(re._sfc_main,{show:y.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:S.value,content:A.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),V.value?(e.openBlock(),e.createBlock(ce.default,{key:5,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:I,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":R.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:s[1]||(s[1]=u=>y.value.showTable=!1),onKeypress:s[2]||(s[2]=e.withKeys(u=>y.value.showTable=!1,["enter"]))},[e.createVNode(de.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Xe,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",je,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(u,r)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(u.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",We,e.toDisplayString(u),1)],12,Ye),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":B.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",Je,e.toDisplayString(isNaN(d.values[r])?"-":e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[r],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,Ke))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,pe))}},Ze=ye._export_sfc(Qe,[["__scopeId","data-v-c67467bd"]]);exports.default=Ze;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useCssVars as Me, computed as h, ref as p, watch as me, onMounted as Se, openBlock as s, createElementBlock as n, normalizeClass as U, normalizeStyle as m, createBlock as Y, createCommentVNode as c, unref as i, createSlots as Ne, withCtx as k, renderSlot as x, normalizeProps as j, guardReactiveProps as W, createVNode as le, Fragment as A, renderList as S, createElementVNode as u, toDisplayString as f, withKeys as Oe, createTextVNode as Fe, nextTick as Ve } from "vue";
|
|
2
|
-
import { u as Pe, o as Ie, e as xe, c as ae, t as Be, M as Re, g as Ee, N as oe, X as Ge, F as se, i as F, f as N, v as z, x as Xe, y as He, q as De, r as Ue } from "./index-
|
|
3
|
-
import { _ as Ye } from "./Title-
|
|
4
|
-
import { u as je, U as We } from "./usePrinter-
|
|
5
|
-
import { _ as qe } from "./Tooltip-
|
|
6
|
-
import Ke from "./vue-ui-skeleton-
|
|
7
|
-
import Je from "./BaseIcon-
|
|
8
|
-
import Qe from "./vue-ui-accordion-
|
|
9
|
-
import { u as we } from "./useNestedProp-
|
|
10
|
-
import { _ as Ze } from "./PackageVersion-
|
|
2
|
+
import { u as Pe, o as Ie, e as xe, c as ae, t as Be, M as Re, g as Ee, N as oe, X as Ge, F as se, i as F, f as N, v as z, x as Xe, y as He, q as De, r as Ue } from "./index-BJNSbAx7.js";
|
|
3
|
+
import { _ as Ye } from "./Title-0tYDaWv7.js";
|
|
4
|
+
import { u as je, U as We } from "./usePrinter-CkV5eORP.js";
|
|
5
|
+
import { _ as qe } from "./Tooltip-DdWGiVyf.js";
|
|
6
|
+
import Ke from "./vue-ui-skeleton-CsU74BI7.js";
|
|
7
|
+
import Je from "./BaseIcon-CiQsJmEc.js";
|
|
8
|
+
import Qe from "./vue-ui-accordion-DDf5Y2GY.js";
|
|
9
|
+
import { u as we } from "./useNestedProp-CLh4tPxT.js";
|
|
10
|
+
import { _ as Ze } from "./PackageVersion-DN8qp-uI.js";
|
|
11
11
|
import { _ as et } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const tt = ["id"], lt = {
|
|
13
13
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),g=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),g=require("./useNestedProp-DhLxBAwX.cjs"),u=require("./index-NvxTr0fZ.cjs"),p=require("./vue-ui-digits-CIHkrLL6.cjs"),y={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(n){const o=n,{vue_ui_kpi:m}=u.useConfig(),e=a.computed({get:()=>i(),set:t=>t});function i(){return g.useNestedProp({userConfig:o.config,defaultConfig:m})}a.watch(()=>o.config,t=>{e.value=i(),r()},{deep:!0});const f=a.ref((typeof o.dataset=="number",o.dataset)),l=a.ref(e.value.useAnimation?e.value.animationValueStart:f.value),s=t=>{const v=e.value.animationFrames,c=Math.abs(t-l.value)/v;function d(){l.value<t?l.value=Math.min(l.value+c,t):l.value>t&&(l.value=Math.max(l.value-c,t)),l.value!==t&&requestAnimationFrame(d)}d()};a.onMounted(()=>{r()});function r(){e.value.useAnimation?(l.value=e.value.animationValueStart,s(o.dataset)):l.value=o.dataset}return a.watch(()=>o.dataset,t=>{e.value.useAnimation?s(t):l.value=t}),(t,v)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(`vue-ui-kpi ${e.value.layoutClass}`),style:a.normalizeStyle(`background:${e.value.backgroundColor}; ${e.value.layoutCss}`)},[a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-title ${e.value.titleClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.titleFontSize}px; color:${e.value.titleColor}; font-weight:${e.value.titleBold?"bold":"normal"}; ${e.value.titleCss}`)},[a.renderSlot(t.$slots,"title",{comment:n.dataset}),a.createTextVNode(" "+a.toDisplayString(e.value.title),1)],6),a.renderSlot(t.$slots,"comment-before",{comment:n.dataset}),a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-value ${e.value.valueClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.valueFontSize}px; color:${e.value.valueColor}; font-weight:${e.value.valueBold?"bold":"normal"}; ${e.value.valueCss}`)},[a.renderSlot(t.$slots,"value",{comment:n.dataset}),e.value.analogDigits.show?(a.openBlock(),a.createElementBlock("div",{key:0,style:a.normalizeStyle({height:e.value.analogDigits.height+"px"})},[a.createVNode(p.default,{dataset:Number(l.value.toFixed(e.value.valueRounding)),config:{backgroundColor:e.value.backgroundColor,digits:{color:e.value.analogDigits.color,skeletonColor:e.value.analogDigits.skeletonColor}}},null,8,["dataset","config"])],4)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(a.unref(u.applyDataLabel)(e.value.formatter,l.value,a.unref(u.dataLabel)({p:e.value.prefix,v:l.value,s:e.value.suffix,r:e.value.valueRounding}))),1)],64))],6),a.renderSlot(t.$slots,"comment-after",{comment:n.dataset})],6))}};exports.default=y;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as N, watch as p, ref as C, onMounted as D, openBlock as i, createElementBlock as s, normalizeClass as v, normalizeStyle as u, createElementVNode as $, renderSlot as n, createTextVNode as y, toDisplayString as k, createVNode as S, Fragment as x, unref as h } from "vue";
|
|
2
|
-
import { u as z } from "./useNestedProp-
|
|
3
|
-
import { u as A, i as w, f as B } from "./index-
|
|
4
|
-
import L from "./vue-ui-digits-
|
|
2
|
+
import { u as z } from "./useNestedProp-CLh4tPxT.js";
|
|
3
|
+
import { u as A, i as w, f as B } from "./index-BJNSbAx7.js";
|
|
4
|
+
import L from "./vue-ui-digits-Degwjx76.js";
|
|
5
5
|
const T = {
|
|
6
6
|
__name: "vue-ui-kpi",
|
|
7
7
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCssVars as h, computed as r, ref as f, openBlock as n, createElementBlock as u, unref as M, createElementVNode as t, normalizeStyle as l, createCommentVNode as a } from "vue";
|
|
2
|
-
import { u as m } from "./useNestedProp-
|
|
3
|
-
import { u as y, X as L } from "./index-
|
|
2
|
+
import { u as m } from "./useNestedProp-CLh4tPxT.js";
|
|
3
|
+
import { u as y, X as L } from "./index-BJNSbAx7.js";
|
|
4
4
|
import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const b = ["xmlns", "viewBox"], x = { key: 0 }, $ = ["stroke"], w = ["stroke"], A = ["stroke"], N = { key: 1 }, O = ["stroke"], S = { key: 2 }, F = ["stroke"], I = {
|
|
6
6
|
__name: "vue-ui-mini-loader",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-DhLxBAwX.cjs"),n=require("./index-NvxTr0fZ.cjs"),m=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=["xmlns","viewBox"],C={key:0},_=["stroke"],h=["stroke"],M=["stroke"],y={key:1},B=["stroke"],f={key:2},L=["stroke"],b={__name:"vue-ui-mini-loader",props:{config:{type:Object,default(){return{}}}},setup(u){const a=u;e.useCssVars(k=>({"221651ee":c.value,d11bae38:d.value,d85c00de:p.value}));const{vue_ui_mini_loader:i}=n.useConfig(),t=e.computed(()=>v.useNestedProp({userConfig:a.config,defaultConfig:i})),s=e.ref({onion:"-10 -10 84 84",line:"-10 -10 112 84",bar:"-10 -10 106 84"}),r=e.computed(()=>({gutter:`stroke:${t.value.line.gutterColor};opacity:${t.value.line.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.line.gutterBlur}px);`})),l=e.computed(()=>({gutter:`stroke:${t.value.bar.gutterColor};opacity:${t.value.bar.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.bar.gutterBlur}px);`})),o=e.computed(()=>({gutter:`stroke:${t.value.onion.gutterColor};opacity:${t.value.onion.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.onion.gutterBlur}px);`})),c=e.computed(()=>`blur(${t.value.onion.trackBlur}px) hue-rotate(${t.value.onion.trackHueRotate}deg)`),d=e.computed(()=>`blur(${t.value.line.trackBlur}px) hue-rotate(${t.value.line.trackHueRotate}deg)`),p=e.computed(()=>`blur(${t.value.bar.trackBlur}px) hue-rotate(${t.value.bar.trackHueRotate}deg)`);return(k,x)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.XMLNS),viewBox:s.value[t.value.type],style:{background:"transparent"},width:"100%"},[t.value.type==="onion"?(e.openBlock(),e.createElementBlock("g",C,[e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,_),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,h),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,M)])):e.createCommentVNode("",!0),t.value.type==="line"?(e.openBlock(),e.createElementBlock("g",y,[e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(r.value.gutter+r.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5",stroke:t.value.line.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"line-animated"},null,8,B)])):e.createCommentVNode("",!0),t.value.type==="bar"?(e.openBlock(),e.createElementBlock("g",f,[e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(l.value.gutter+l.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5",stroke:t.value.bar.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"bar-animated"},null,8,L)])):e.createCommentVNode("",!0)],8,g))}},N=m._export_sfc(b,[["__scopeId","data-v-20f54e0e"]]);exports.default=N;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { toRef as re, resolveComponent as ie, openBlock as s, createElementBlock as r, Fragment as y, renderList as z, withModifiers as H, createBlock as F, createCommentVNode as m, createElementVNode as $, toDisplayString as Le, normalizeStyle as ne, createVNode as S, computed as O, onMounted as Ze, ref as f, watch as Je, normalizeClass as Pe, unref as N, createSlots as Ke, withCtx as C, renderSlot as P, normalizeProps as J, guardReactiveProps as K, createTextVNode as Qe, nextTick as Te } from "vue";
|
|
2
|
-
import { u as _e, o as et, e as tt, c as Fe, t as ot, a as lt, p as Re, b as at, X as st, l as nt, O as rt, q as it, r as ut, x as ct, y as dt } from "./index-
|
|
3
|
-
import { _ as vt } from "./Title-
|
|
4
|
-
import { u as ft, U as pt } from "./usePrinter-
|
|
5
|
-
import { D as ht } from "./DataTable-
|
|
6
|
-
import { _ as gt } from "./Tooltip-
|
|
7
|
-
import W from "./BaseIcon-
|
|
8
|
-
import yt from "./vue-ui-skeleton-
|
|
9
|
-
import mt from "./vue-ui-accordion-
|
|
10
|
-
import { u as Se } from "./useNestedProp-
|
|
11
|
-
import { _ as bt } from "./PackageVersion-
|
|
2
|
+
import { u as _e, o as et, e as tt, c as Fe, t as ot, a as lt, p as Re, b as at, X as st, l as nt, O as rt, q as it, r as ut, x as ct, y as dt } from "./index-BJNSbAx7.js";
|
|
3
|
+
import { _ as vt } from "./Title-0tYDaWv7.js";
|
|
4
|
+
import { u as ft, U as pt } from "./usePrinter-CkV5eORP.js";
|
|
5
|
+
import { D as ht } from "./DataTable-BczvA492.js";
|
|
6
|
+
import { _ as gt } from "./Tooltip-DdWGiVyf.js";
|
|
7
|
+
import W from "./BaseIcon-CiQsJmEc.js";
|
|
8
|
+
import yt from "./vue-ui-skeleton-CsU74BI7.js";
|
|
9
|
+
import mt from "./vue-ui-accordion-DDf5Y2GY.js";
|
|
10
|
+
import { u as Se } from "./useNestedProp-CLh4tPxT.js";
|
|
11
|
+
import { _ as bt } from "./PackageVersion-DN8qp-uI.js";
|
|
12
12
|
import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const Ct = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], $t = {
|
|
14
14
|
__name: "RecursiveCircles",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-Bv8wGGBc.cjs"),Ne=require("./Title-DWSN4YUC.cjs"),ie=require("./usePrinter-7jNVagoH.cjs"),Ee=require("./DataTable-YpBvWSn5.cjs"),Te=require("./Tooltip-Bl8Ilf5h.cjs"),z=require("./BaseIcon-DJbzYsmN.cjs"),Se=require("./vue-ui-skeleton-TRdDtmHK.cjs"),Ve=require("./vue-ui-accordion-CSkH8Ztm.cjs"),ue=require("./useNestedProp-Bf7w6kTt.cjs"),Re=require("./PackageVersion-kqwH1rG4.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ze=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Me={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;function i(a){g("zoom",a)}function u(a){g("hover",a)}return e.toRef(h,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(d=>{d.ancestor=a})}),(a,d)=>{const C=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(P,M)=>(e.openBlock(),e.createElementBlock("circle",{cx:P.x,cy:P.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:r.hoveredUid&&r.hoveredUid===v.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(x=>i(v),["stop"]),onMouseover:x=>u(v),onMouseleave:d[0]||(d[0]=x=>u(null))},null,40,ze))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(C,{key:0,dataset:v.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:i,onHover:u},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},De=["x1","y1","x2","y2","stroke","stroke-width"],Ue=["x1","y1","x2","y2","stroke","stroke-width"],Ie={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const g=r;return e.toRef(g,"dataset").value.forEach(i=>{i.nodes&&i.nodes.length>0&&i.nodes.forEach(u=>{u.ancestor=i})}),(i,u)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(d,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,De),e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.color,"stroke-width":a.circleRadius/2},null,8,Ue)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:r.color,backgroundColor:r.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},Oe=["x","y","fill","font-size"],He={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;return e.toRef(h,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(B=>{B.ancestor=u})}),(u,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,d=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[d.polygonPath&&d.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.polygonPath.coordinates,C=>(e.openBlock(),e.createElementBlock("text",{x:C.x,y:C.y+d.circleRadius*2,fill:r.color,"font-size":d.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(d.name),9,Oe))),256)),d.nodes&&d.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:d.nodes,color:r.color,hoveredUid:r.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},qe={style:{position:"relative",height:"100%",width:"100%"}},Ae={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:g}){return(h,i)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${r.isFullscreen?"fixed":"absolute"};bottom:0;right:${r.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",qe,[e.createElementVNode("button",{onClick:i[0]||(i[0]=e.withModifiers(u=>g("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:i[1]||(i[1]=e.withModifiers(u=>g("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:i[2]||(i[2]=e.withModifiers(u=>g("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:i[3]||(i[3]=e.withModifiers(u=>g("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:i[4]||(i[4]=e.withModifiers(u=>g("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},je=["id"],Ge={key:0,style:"width:100%;background:transparent;"},Xe=["xmlns","viewBox"],Ye=["id"],We=["stop-color"],Ze=["stop-color"],Je={key:4,class:"vue-data-ui-watermark"},Ke=["innerHTML"],Qe={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:g}){const h=r,{vue_ui_molecule:i}=m.useConfig(),u=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{B()});function B(){m.objectIsEmpty(h.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const a=e.ref(m.createUid()),d=e.ref(null),C=e.ref(!1),v=e.ref(""),P=e.ref(null),M=e.ref(null),x=e.ref(!1),y=e.ref(null),X=e.ref(null),U=e.ref(0),Y=e.ref(0),W=e.ref(0),o=e.computed({get:()=>Z(),set:t=>t});function Z(){const t=ue.useNestedProp({userConfig:h.config,defaultConfig:i});return t.theme?{...ue.useNestedProp({userConfig:m.themes.vue_ui_molecule[t.theme]||h.config,defaultConfig:t}),customPalette:m.themePalettes[t.theme]||m.palette}:t}e.watch(()=>h.config,t=>{o.value=Z(),B(),Y.value+=1,W.value+=1},{deep:!0});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:_}=ie.usePrinter({elementId:`cluster_${a.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ce=e.computed(()=>m.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function ee(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?ee(t[0].nodes,l+1):l}function de(){const t=ee(h.dataset);let l=100,n=l;for(let c=0;c<t;c+=1)l/=1,n+=l;return{height:n,width:n}}const w=e.ref(de()),I=e.ref(`0 0 ${w.value.width} ${w.value.height}`);function te(t,l={x:-w.value.width/2.43,y:w.value.height/2},n=w.value.width/1.1,c=24,s=0,f=0,V="#BBBBBB"){if(t&&t.length>0){const j=m.createPolygonPath({plot:l,radius:n,sides:t.length,rotation:s});t.forEach((p,F)=>{const R=j.coordinates[F];let $;if(p.ancestor?p.ancestor.ancestor?$=p.ancestor.color||V:($=ce.value[f]||m.palette[f]||V,f+=1):$=V,p.polygonPath={coordinates:[R]},p.circleRadius=c,p.color=$,p.uid=m.createUid(),p.nodes&&p.nodes.length>0){const G=!p.ancestor||!p.ancestor.ancestor?f:0;p.nodes=te(p.nodes,R,n/2.9,c/2.2,s+Math.PI*F/p.nodes.length,G,$)}})}return t}function ve(t){const l=new Set;function n(s){s.forEach(f=>{f.color&&!l.has(f.color)&&l.add(f.color),f.nodes&&f.nodes.length>0&&n(f.nodes)})}n(t);const c={};return Array.from(l).forEach((s,f)=>{c[s]=`gradient_${f}`}),c}const fe=e.computed(()=>ve(b.value)),b=e.computed(()=>te(h.dataset));function O(){x.value=!1,M.value=null,X.value=null,y.value=null,q({polygonPath:{coordinates:[{x:w.value.width/2,y:w.value.height/2}]},circleRadius:24})}const H=e.ref(null);function q(t){P.value.focus(),e.nextTick(()=>{H.value&&cancelAnimationFrame(H.value);const l=I.value.split(" "),n=parseFloat(l[0]),c=parseFloat(l[1]),s=parseFloat(l[2]),f=parseFloat(l[3]),{x:V,y:j}=t.polygonPath.coordinates[0],{circleRadius:p}=t,F=8.34,R=V-p*F,$=j-p*F,G=p*F*2,Be=p*F*2,xe=Math.sqrt((R-n)**2+($-c)**2),L=Math.min(1200,Math.max(20,Math.floor(xe/10))),we=(R-n)/L,$e=($-c)/L,Pe=(G-s)/L,Fe=(Be-f)/L;let E=0;function se(){I.value=`${n+we*E} ${c+$e*E} ${s+Pe*E} ${f+Fe*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(H.value=requestAnimationFrame(se))}se()})}function pe(t){M.value===t.uid?O():(M.value=t.uid,X.value=t,y.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},q(t),x.value=t.uid!==b.value[0].uid)}function me(t){if(t.target.nodeName!=="circle")O(),x.value=!1;else return}const A=e.ref(null);function he(t){A.value={datapoint:t,seriesIndex:-1,series:b.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(m.isFunction(l)&&m.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:b.value,config:o.value})))v.value=l({seriesIndex:-1,datapoint:t,series:b.value,config:o.value});else{let n="";n+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(n+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),v.value=`<div style="font-family:inherit">${n}</div>`}}const oe=e.ref(null),T=e.ref(null);function ge(t){oe.value=t,t?(C.value=!0,he(t),T.value=t.uid):(C.value=!1,v.value="",T.value=null)}function D(t){t==="right"&&(y.value.polygonPath.coordinates[0].x+=y.value.circleRadius),t==="left"&&(y.value.polygonPath.coordinates[0].x-=y.value.circleRadius),t==="top"&&(y.value.polygonPath.coordinates[0].y-=y.value.circleRadius),t==="bottom"&&(y.value.polygonPath.coordinates[0].y+=y.value.circleRadius),q(y.value)}function ye(t){const l=[];function n(c){c.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&&n(s.nodes,s.name)})}return n(t),l}const ke=e.computed(()=>ye(b.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=ke.value.map((s,f)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),n={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},c=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:n,colNames:c}});function le(){e.nextTick(()=>{const t=N.value.body.map((c,s)=>[[c[0].name],[c[1]],[c[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),n=m.createCsvContent(l);m.downloadCsv({csvContent:n,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function be(){return b.value}const S=e.ref(!1);function Ce(t){S.value=t,U.value+=1}function ne(){k.value.showTable=!k.value.showTable}function re(){k.value.showDataLabels=!k.value.showDataLabels}function ae(){k.value.showTooltip=!k.value.showTooltip}return g({getData:be,generatePdf:Q,generateCsv:le,generateImage:_,toggleTable:ne,toggleLabels:re,toggleTooltip:ae}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:l[7]||(l[7]=n=>{oe.value=null,T.value=null}),ref_key:"moleculeChart",ref:P,class:e.normalizeClass(`vue-ui-molecule ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${a.value}`},[o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Ge,[(e.openBlock(),e.createBlock(Ne._sfc_main,{key:`title_${Y.value}`,config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),o.value.userOptions.show&&u.value?(e.openBlock(),e.createBlock(ie.UserOptions,{ref_key:"details",ref:d,key:`user_options_${U.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(J),isImaging:e.unref(K),uid:a.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:P.value,position:o.value.userOptions.position,onToggleFullscreen:Ce,onGeneratePdf:e.unref(Q),onGenerateCsv:le,onGenerateImage:e.unref(_),onToggleTable:ne,onToggleLabels:re,onToggleTooltip:ae},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:n,isFullscreen:c})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:c})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(m.XMLNS),viewBox:I.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(n=>me(n),["stop"]))},[e.createVNode(Re._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(fe.value),n=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${n}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(m.lightenHexColor)(n,.5)},null,8,We),e.createElementVNode("stop",{offset:"100%","stop-color":n},null,8,Ze)],8,Ye))),256))]),e.createVNode(Ie,{dataset:b.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Me,{dataset:b.value,hoveredUid:T.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:pe,onHover:ge},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(He,{key:0,dataset:b.value,color:o.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:w.value},void 0,!0)],14,Xe)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Ae,{key:`direction_pad_${U.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:l[1]||(l[1]=n=>D("left")),onMoveRight:l[2]||(l[2]=n=>D("right")),onMoveTop:l[3]||(l[3]=n=>D("top")),onMoveBottom:l[4]||(l[4]=n=>D("bottom")),onReset:l[5]||(l[5]=n=>{O(),x.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(J)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Se.default,{key:5,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Te._sfc_main,{show:k.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:P.value,content:v.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),u.value?(e.openBlock(),e.createBlock(Ve.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.openBlock(),e.createBlock(Ee.DataTable,{key:`table_${W.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:l[6]||(l[6]=n=>k.value.showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n,style:{display:"flex","align-items":"center"}},null,8,Ke)]),td:e.withCtx(({td:n})=>[e.createTextVNode(e.toDisplayString(n.name||n),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,je))}},_e=Le._export_sfc(Qe,[["__scopeId","data-v-aafaabe0"]]);exports.default=_e;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-NvxTr0fZ.cjs"),Ne=require("./Title-Cjusozo5.cjs"),ie=require("./usePrinter-0s8wVGIy.cjs"),Ee=require("./DataTable-DRJUrEXP.cjs"),Te=require("./Tooltip-CkqTs_wn.cjs"),z=require("./BaseIcon-JWYc0t9a.cjs"),Se=require("./vue-ui-skeleton-DYHqPo98.cjs"),Ve=require("./vue-ui-accordion-CxPjShWo.cjs"),ue=require("./useNestedProp-DhLxBAwX.cjs"),Re=require("./PackageVersion-rOhPenOY.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ze=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Me={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;function i(a){g("zoom",a)}function u(a){g("hover",a)}return e.toRef(h,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(d=>{d.ancestor=a})}),(a,d)=>{const C=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(P,M)=>(e.openBlock(),e.createElementBlock("circle",{cx:P.x,cy:P.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:r.hoveredUid&&r.hoveredUid===v.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(x=>i(v),["stop"]),onMouseover:x=>u(v),onMouseleave:d[0]||(d[0]=x=>u(null))},null,40,ze))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(C,{key:0,dataset:v.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:i,onHover:u},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},De=["x1","y1","x2","y2","stroke","stroke-width"],Ue=["x1","y1","x2","y2","stroke","stroke-width"],Ie={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const g=r;return e.toRef(g,"dataset").value.forEach(i=>{i.nodes&&i.nodes.length>0&&i.nodes.forEach(u=>{u.ancestor=i})}),(i,u)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(d,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,De),e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.color,"stroke-width":a.circleRadius/2},null,8,Ue)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:r.color,backgroundColor:r.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},Oe=["x","y","fill","font-size"],He={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;return e.toRef(h,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(B=>{B.ancestor=u})}),(u,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,d=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[d.polygonPath&&d.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.polygonPath.coordinates,C=>(e.openBlock(),e.createElementBlock("text",{x:C.x,y:C.y+d.circleRadius*2,fill:r.color,"font-size":d.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(d.name),9,Oe))),256)),d.nodes&&d.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:d.nodes,color:r.color,hoveredUid:r.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},qe={style:{position:"relative",height:"100%",width:"100%"}},Ae={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:g}){return(h,i)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${r.isFullscreen?"fixed":"absolute"};bottom:0;right:${r.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",qe,[e.createElementVNode("button",{onClick:i[0]||(i[0]=e.withModifiers(u=>g("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:i[1]||(i[1]=e.withModifiers(u=>g("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:i[2]||(i[2]=e.withModifiers(u=>g("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:i[3]||(i[3]=e.withModifiers(u=>g("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:i[4]||(i[4]=e.withModifiers(u=>g("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},je=["id"],Ge={key:0,style:"width:100%;background:transparent;"},Xe=["xmlns","viewBox"],Ye=["id"],We=["stop-color"],Ze=["stop-color"],Je={key:4,class:"vue-data-ui-watermark"},Ke=["innerHTML"],Qe={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:g}){const h=r,{vue_ui_molecule:i}=m.useConfig(),u=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{B()});function B(){m.objectIsEmpty(h.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const a=e.ref(m.createUid()),d=e.ref(null),C=e.ref(!1),v=e.ref(""),P=e.ref(null),M=e.ref(null),x=e.ref(!1),y=e.ref(null),X=e.ref(null),U=e.ref(0),Y=e.ref(0),W=e.ref(0),o=e.computed({get:()=>Z(),set:t=>t});function Z(){const t=ue.useNestedProp({userConfig:h.config,defaultConfig:i});return t.theme?{...ue.useNestedProp({userConfig:m.themes.vue_ui_molecule[t.theme]||h.config,defaultConfig:t}),customPalette:m.themePalettes[t.theme]||m.palette}:t}e.watch(()=>h.config,t=>{o.value=Z(),B(),Y.value+=1,W.value+=1},{deep:!0});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:_}=ie.usePrinter({elementId:`cluster_${a.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ce=e.computed(()=>m.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function ee(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?ee(t[0].nodes,l+1):l}function de(){const t=ee(h.dataset);let l=100,n=l;for(let c=0;c<t;c+=1)l/=1,n+=l;return{height:n,width:n}}const w=e.ref(de()),I=e.ref(`0 0 ${w.value.width} ${w.value.height}`);function te(t,l={x:-w.value.width/2.43,y:w.value.height/2},n=w.value.width/1.1,c=24,s=0,f=0,V="#BBBBBB"){if(t&&t.length>0){const j=m.createPolygonPath({plot:l,radius:n,sides:t.length,rotation:s});t.forEach((p,F)=>{const R=j.coordinates[F];let $;if(p.ancestor?p.ancestor.ancestor?$=p.ancestor.color||V:($=ce.value[f]||m.palette[f]||V,f+=1):$=V,p.polygonPath={coordinates:[R]},p.circleRadius=c,p.color=$,p.uid=m.createUid(),p.nodes&&p.nodes.length>0){const G=!p.ancestor||!p.ancestor.ancestor?f:0;p.nodes=te(p.nodes,R,n/2.9,c/2.2,s+Math.PI*F/p.nodes.length,G,$)}})}return t}function ve(t){const l=new Set;function n(s){s.forEach(f=>{f.color&&!l.has(f.color)&&l.add(f.color),f.nodes&&f.nodes.length>0&&n(f.nodes)})}n(t);const c={};return Array.from(l).forEach((s,f)=>{c[s]=`gradient_${f}`}),c}const fe=e.computed(()=>ve(b.value)),b=e.computed(()=>te(h.dataset));function O(){x.value=!1,M.value=null,X.value=null,y.value=null,q({polygonPath:{coordinates:[{x:w.value.width/2,y:w.value.height/2}]},circleRadius:24})}const H=e.ref(null);function q(t){P.value.focus(),e.nextTick(()=>{H.value&&cancelAnimationFrame(H.value);const l=I.value.split(" "),n=parseFloat(l[0]),c=parseFloat(l[1]),s=parseFloat(l[2]),f=parseFloat(l[3]),{x:V,y:j}=t.polygonPath.coordinates[0],{circleRadius:p}=t,F=8.34,R=V-p*F,$=j-p*F,G=p*F*2,Be=p*F*2,xe=Math.sqrt((R-n)**2+($-c)**2),L=Math.min(1200,Math.max(20,Math.floor(xe/10))),we=(R-n)/L,$e=($-c)/L,Pe=(G-s)/L,Fe=(Be-f)/L;let E=0;function se(){I.value=`${n+we*E} ${c+$e*E} ${s+Pe*E} ${f+Fe*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(H.value=requestAnimationFrame(se))}se()})}function pe(t){M.value===t.uid?O():(M.value=t.uid,X.value=t,y.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},q(t),x.value=t.uid!==b.value[0].uid)}function me(t){if(t.target.nodeName!=="circle")O(),x.value=!1;else return}const A=e.ref(null);function he(t){A.value={datapoint:t,seriesIndex:-1,series:b.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(m.isFunction(l)&&m.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:b.value,config:o.value})))v.value=l({seriesIndex:-1,datapoint:t,series:b.value,config:o.value});else{let n="";n+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(n+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),v.value=`<div style="font-family:inherit">${n}</div>`}}const oe=e.ref(null),T=e.ref(null);function ge(t){oe.value=t,t?(C.value=!0,he(t),T.value=t.uid):(C.value=!1,v.value="",T.value=null)}function D(t){t==="right"&&(y.value.polygonPath.coordinates[0].x+=y.value.circleRadius),t==="left"&&(y.value.polygonPath.coordinates[0].x-=y.value.circleRadius),t==="top"&&(y.value.polygonPath.coordinates[0].y-=y.value.circleRadius),t==="bottom"&&(y.value.polygonPath.coordinates[0].y+=y.value.circleRadius),q(y.value)}function ye(t){const l=[];function n(c){c.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&&n(s.nodes,s.name)})}return n(t),l}const ke=e.computed(()=>ye(b.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=ke.value.map((s,f)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),n={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},c=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:n,colNames:c}});function le(){e.nextTick(()=>{const t=N.value.body.map((c,s)=>[[c[0].name],[c[1]],[c[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),n=m.createCsvContent(l);m.downloadCsv({csvContent:n,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function be(){return b.value}const S=e.ref(!1);function Ce(t){S.value=t,U.value+=1}function ne(){k.value.showTable=!k.value.showTable}function re(){k.value.showDataLabels=!k.value.showDataLabels}function ae(){k.value.showTooltip=!k.value.showTooltip}return g({getData:be,generatePdf:Q,generateCsv:le,generateImage:_,toggleTable:ne,toggleLabels:re,toggleTooltip:ae}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:l[7]||(l[7]=n=>{oe.value=null,T.value=null}),ref_key:"moleculeChart",ref:P,class:e.normalizeClass(`vue-ui-molecule ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${a.value}`},[o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Ge,[(e.openBlock(),e.createBlock(Ne._sfc_main,{key:`title_${Y.value}`,config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),o.value.userOptions.show&&u.value?(e.openBlock(),e.createBlock(ie.UserOptions,{ref_key:"details",ref:d,key:`user_options_${U.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(J),isImaging:e.unref(K),uid:a.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:P.value,position:o.value.userOptions.position,onToggleFullscreen:Ce,onGeneratePdf:e.unref(Q),onGenerateCsv:le,onGenerateImage:e.unref(_),onToggleTable:ne,onToggleLabels:re,onToggleTooltip:ae},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:n,isFullscreen:c})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:c})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(m.XMLNS),viewBox:I.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(n=>me(n),["stop"]))},[e.createVNode(Re._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(fe.value),n=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${n}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(m.lightenHexColor)(n,.5)},null,8,We),e.createElementVNode("stop",{offset:"100%","stop-color":n},null,8,Ze)],8,Ye))),256))]),e.createVNode(Ie,{dataset:b.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Me,{dataset:b.value,hoveredUid:T.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:pe,onHover:ge},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(He,{key:0,dataset:b.value,color:o.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:w.value},void 0,!0)],14,Xe)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Ae,{key:`direction_pad_${U.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:l[1]||(l[1]=n=>D("left")),onMoveRight:l[2]||(l[2]=n=>D("right")),onMoveTop:l[3]||(l[3]=n=>D("top")),onMoveBottom:l[4]||(l[4]=n=>D("bottom")),onReset:l[5]||(l[5]=n=>{O(),x.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(J)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Se.default,{key:5,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Te._sfc_main,{show:k.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:P.value,content:v.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),u.value?(e.openBlock(),e.createBlock(Ve.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.openBlock(),e.createBlock(Ee.DataTable,{key:`table_${W.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:l[6]||(l[6]=n=>k.value.showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n,style:{display:"flex","align-items":"center"}},null,8,Ke)]),td:e.withCtx(({td:n})=>[e.createTextVNode(e.toDisplayString(n.name||n),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,je))}},_e=Le._export_sfc(Qe,[["__scopeId","data-v-aafaabe0"]]);exports.default=_e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Bv8wGGBc.cjs"),X=require("./Title-DWSN4YUC.cjs"),S=require("./usePrinter-7jNVagoH.cjs"),K=require("./Legend-CsYNhmuM.cjs"),p=require("./BaseIcon-DJbzYsmN.cjs"),Y=require("./DataTable-YpBvWSn5.cjs"),J=require("./vue-ui-skeleton-TRdDtmHK.cjs"),Q=require("./vue-ui-accordion-CSkH8Ztm.cjs"),T=require("./useNestedProp-Bf7w6kTt.cjs"),Z=require("./PackageVersion-kqwH1rG4.cjs"),ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=["id"],oe={key:0,style:"width:100%;background:transparent"},le=["xmlns","viewBox"],ae=["id"],re=["stop-color"],ne=["stop-color"],se=["x1","y1","x2","y2","stroke","stroke-width"],ue=["d","stroke","stroke-width"],ie=["stroke"],ce=["fill"],de=["stroke"],ye=["fill"],ve=["stroke"],me=["fill"],he=["stroke"],fe=["fill"],pe=["stroke"],ke=["fill"],ge=["d","stroke","stroke-width","fill"],be=["x1","y1","stroke"],Ce=["cx","cy","fill","stroke"],Ne=["fill","stroke"],xe=["y","fill","font-weight"],we=["y","fill"],_e={key:3,class:"vue-data-ui-watermark"},Ve=["onClick"],Pe={style:{"font-weight":"bold"}},Me=["innerHTML"],$e={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(O,{expose:A}){const s=O,{vue_ui_mood_radar:I}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{N()});function N(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),x=e.ref(null),F=e.ref(null),n=e.ref(null),D=e.ref(0),q=e.ref(0),w=e.ref(0),t=e.computed({get:()=>_(),set:l=>l});function _(){const l=T.useNestedProp({userConfig:s.config,defaultConfig:I});return l.theme?{...T.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=_(),N(),D.value+=1,q.value+=1,w.value+=1},{deep:!0});const{isPrinting:V,isImaging:P,generatePdf:M,generateImage:$}=S.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),k=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function z({centerX:l,centerY:a,apexX:o,apexY:u,proportion:c,key:f,value:R}){return{x:l+(o-l)*c,y:a+(u-a)*c,key:f,value:R}}const j=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)),i=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)),B=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),C.value.coordinates.map((l,a)=>{const o=z({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:i.value[a].value/j.value,key:i.value[a].key,value:i.value[a].value});return{...l,plots:o,key:i.value[a].key}})):[]),W=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 G(l){l===n.value?n.value=null:n.value=l}const y=e.computed(()=>{const l=i.value.map(o=>({name:o.key,color:o.color})),a=i.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function E(){e.nextTick(()=>{const l=y.value.head.map((u,c)=>[[u.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=r.createCsvContent(a);r.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,f)=>[{color:c.color,name:c.name},y.value.body[f].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[f]/v.value)?"-":(y.value.body[f]/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},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:u}});function U(){return i.value}function L(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function H(l){b.value=l}return A({getData:U,generatePdf:M,generateCsv:E,generateImage:$,toggleTable:L}),(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:x,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",oe,[e.createVNode(X._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"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(S.UserOptions,{key:1,ref_key:"details",ref:F,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(V),isImaging:e.unref(P),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:x.value,position:t.value.userOptions.position,onToggleFullscreen:H,onGeneratePdf:e.unref(M),onGenerateCsv:E,onGenerateImage:e.unref($),onToggleTable:L},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:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.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:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Z._sfc_main),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":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,re),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,ne)],8,ae)]),(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,se))),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,ue),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,ie),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,ce),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,de),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,ye),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,ve),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,me),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,he),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,fe),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,pe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,ke),e.createElementVNode("path",{d:e.unref(r.makePath)(B.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})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,ge),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.map(o=>o.plots),(o,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.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,be),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,Ce),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,Ne),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(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),9,xe),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(e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,we)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,le)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",_e,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(V)||e.unref(P)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.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(K.Legend,{legendSet:i.value,config:W.value,key:`legend_${w.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>G(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",Pe,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Ve)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:i.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(Q.default,{key:6,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Y.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=>k.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Me)]),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,te))}},Be=ee._export_sfc($e,[["__scopeId","data-v-bded5f3b"]]);exports.default=Be;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-NvxTr0fZ.cjs"),X=require("./Title-Cjusozo5.cjs"),S=require("./usePrinter-0s8wVGIy.cjs"),K=require("./Legend-DDmBZxt8.cjs"),p=require("./BaseIcon-JWYc0t9a.cjs"),Y=require("./DataTable-DRJUrEXP.cjs"),J=require("./vue-ui-skeleton-DYHqPo98.cjs"),Q=require("./vue-ui-accordion-CxPjShWo.cjs"),T=require("./useNestedProp-DhLxBAwX.cjs"),Z=require("./PackageVersion-rOhPenOY.cjs"),ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=["id"],oe={key:0,style:"width:100%;background:transparent"},le=["xmlns","viewBox"],ae=["id"],re=["stop-color"],ne=["stop-color"],se=["x1","y1","x2","y2","stroke","stroke-width"],ue=["d","stroke","stroke-width"],ie=["stroke"],ce=["fill"],de=["stroke"],ye=["fill"],ve=["stroke"],me=["fill"],he=["stroke"],fe=["fill"],pe=["stroke"],ke=["fill"],ge=["d","stroke","stroke-width","fill"],be=["x1","y1","stroke"],Ce=["cx","cy","fill","stroke"],Ne=["fill","stroke"],xe=["y","fill","font-weight"],we=["y","fill"],_e={key:3,class:"vue-data-ui-watermark"},Ve=["onClick"],Pe={style:{"font-weight":"bold"}},Me=["innerHTML"],$e={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(O,{expose:A}){const s=O,{vue_ui_mood_radar:I}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{N()});function N(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),x=e.ref(null),F=e.ref(null),n=e.ref(null),D=e.ref(0),q=e.ref(0),w=e.ref(0),t=e.computed({get:()=>_(),set:l=>l});function _(){const l=T.useNestedProp({userConfig:s.config,defaultConfig:I});return l.theme?{...T.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=_(),N(),D.value+=1,q.value+=1,w.value+=1},{deep:!0});const{isPrinting:V,isImaging:P,generatePdf:M,generateImage:$}=S.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),k=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function z({centerX:l,centerY:a,apexX:o,apexY:u,proportion:c,key:f,value:R}){return{x:l+(o-l)*c,y:a+(u-a)*c,key:f,value:R}}const j=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)),i=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)),B=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),C.value.coordinates.map((l,a)=>{const o=z({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:i.value[a].value/j.value,key:i.value[a].key,value:i.value[a].value});return{...l,plots:o,key:i.value[a].key}})):[]),W=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 G(l){l===n.value?n.value=null:n.value=l}const y=e.computed(()=>{const l=i.value.map(o=>({name:o.key,color:o.color})),a=i.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function E(){e.nextTick(()=>{const l=y.value.head.map((u,c)=>[[u.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=r.createCsvContent(a);r.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,f)=>[{color:c.color,name:c.name},y.value.body[f].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[f]/v.value)?"-":(y.value.body[f]/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},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:u}});function U(){return i.value}function L(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function H(l){b.value=l}return A({getData:U,generatePdf:M,generateCsv:E,generateImage:$,toggleTable:L}),(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:x,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",oe,[e.createVNode(X._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"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(S.UserOptions,{key:1,ref_key:"details",ref:F,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(V),isImaging:e.unref(P),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:x.value,position:t.value.userOptions.position,onToggleFullscreen:H,onGeneratePdf:e.unref(M),onGenerateCsv:E,onGenerateImage:e.unref($),onToggleTable:L},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:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.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:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Z._sfc_main),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":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,re),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,ne)],8,ae)]),(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,se))),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,ue),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,ie),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,ce),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,de),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,ye),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,ve),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,me),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,he),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,fe),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,pe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,ke),e.createElementVNode("path",{d:e.unref(r.makePath)(B.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})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,ge),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.map(o=>o.plots),(o,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.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,be),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,Ce),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,Ne),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(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),9,xe),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(e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,we)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,le)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",_e,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(V)||e.unref(P)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.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(K.Legend,{legendSet:i.value,config:W.value,key:`legend_${w.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>G(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",Pe,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Ve)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:i.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(Q.default,{key:6,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Y.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=>k.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Me)]),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,te))}},Be=ee._export_sfc($e,[["__scopeId","data-v-bded5f3b"]]);exports.default=Be;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as c, onMounted as he, ref as h, watch as fe, openBlock as n, createElementBlock as k, normalizeClass as R, normalizeStyle as O, createVNode as F, createCommentVNode as i, createBlock as f, unref as s, createSlots as me, withCtx as m, renderSlot as b, normalizeProps as X, guardReactiveProps as K, createElementVNode as a, Fragment as q, renderList as Y, toDisplayString as M, createTextVNode as J, nextTick as pe } from "vue";
|
|
2
|
-
import { u as ge, o as ke, e as Q, c as be, t as Ce, O as xe, X as _e, s as C, w as we, P as $e, i as Z, f as A, q as Me, r as Pe } from "./index-
|
|
3
|
-
import { _ as Ne } from "./Title-
|
|
4
|
-
import { u as Le, U as Te } from "./usePrinter-
|
|
5
|
-
import { L as Ae } from "./Legend-
|
|
6
|
-
import P from "./BaseIcon-
|
|
7
|
-
import { D as Ie } from "./DataTable-
|
|
8
|
-
import Oe from "./vue-ui-skeleton-
|
|
9
|
-
import Fe from "./vue-ui-accordion-
|
|
10
|
-
import { u as ee } from "./useNestedProp-
|
|
11
|
-
import { _ as Se } from "./PackageVersion-
|
|
2
|
+
import { u as ge, o as ke, e as Q, c as be, t as Ce, O as xe, X as _e, s as C, w as we, P as $e, i as Z, f as A, q as Me, r as Pe } from "./index-BJNSbAx7.js";
|
|
3
|
+
import { _ as Ne } from "./Title-0tYDaWv7.js";
|
|
4
|
+
import { u as Le, U as Te } from "./usePrinter-CkV5eORP.js";
|
|
5
|
+
import { L as Ae } from "./Legend-DnOc-JGW.js";
|
|
6
|
+
import P from "./BaseIcon-CiQsJmEc.js";
|
|
7
|
+
import { D as Ie } from "./DataTable-BczvA492.js";
|
|
8
|
+
import Oe from "./vue-ui-skeleton-CsU74BI7.js";
|
|
9
|
+
import Fe from "./vue-ui-accordion-DDf5Y2GY.js";
|
|
10
|
+
import { u as ee } from "./useNestedProp-CLh4tPxT.js";
|
|
11
|
+
import { _ as Se } from "./PackageVersion-DN8qp-uI.js";
|
|
12
12
|
import { _ as Ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const je = ["id"], Be = {
|
|
14
14
|
key: 0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-NvxTr0fZ.cjs"),ce=require("./useResponsive-B3TrDDIG.cjs"),we=require("./Title-Cjusozo5.cjs"),de=require("./usePrinter-0s8wVGIy.cjs"),xe=require("./DataTable-DRJUrEXP.cjs"),Be=require("./Tooltip-CkqTs_wn.cjs"),_e=require("./Legend-DDmBZxt8.cjs"),$e=require("./vue-ui-skeleton-DYHqPo98.cjs"),Ne=require("./vue-ui-accordion-CxPjShWo.cjs"),ve=require("./useNestedProp-DhLxBAwX.cjs"),Se=require("./PackageVersion-rOhPenOY.cjs"),Ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M=w=>(e.pushScopeId("data-v-e05474aa"),w=w(),e.popScopeId(),w),Fe=["id"],Ve=["xmlns","viewBox"],Te=["id"],De=M(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),ze=["offset","stop-color"],Pe=["offset","stop-opacity"],Oe=M(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Ie=["id"],Ae=["id"],Me=M(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Re=["id"],Ue=["flood-color"],qe=["d","fill","stroke","stroke-width","filter"],Ye={key:0},Xe=["d","fill"],Ge={key:1},He=["x","y","font-size","font-weight","fill"],We={key:2},Je=["filter"],Ke=["text-anchor","x","y","fill","font-size","font-weight"],Qe=["text-anchor","x","y","fill","font-size","font-weight"],Ze=["text-anchor","x","y","fill","font-size","font-weight"],je=["d","fill","onMouseenter","onClick"],et={key:3,class:"vue-data-ui-watermark"},tt={key:0,class:"vue-ui-nested-donuts-legend-title"},lt=["onClick"],at=["innerHTML"],ot={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(w,{expose:fe,emit:R}){const k=w,{vue_ui_nested_donuts:pe}=r.useConfig(),_=e.computed(()=>!!k.dataset&&k.dataset.length),p=e.ref(r.createUid()),V=e.ref(!1),T=e.ref(""),he=e.ref(null),U=e.ref(0),x=e.ref(null),q=e.ref(null),D=e.ref(null),Y=e.ref(0),X=e.ref(0),G=e.ref(0),B=e.ref(!1);function ye(l){B.value=l,U.value+=1}const t=e.computed({get:()=>H(),set:l=>l});function H(){const l=ve.useNestedProp({userConfig:k.config,defaultConfig:pe});return l.theme?{...ve.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>k.config,l=>{t.value=H(),W(),Y.value+=1,X.value+=1,G.value+=1},{deep:!0});const $=e.ref(null);e.onMounted(()=>{W()});function W(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=ce.throttle(()=>{const{width:s,height:o}=ce.useResponsive({chart:x.value,title:t.value.style.chart.title.text?q.value:null,legend:t.value.style.chart.legend.show?D.value:null});d.value.width=s,d.value.height=o});$.value=new ResizeObserver(l),$.value.observe(x.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:Z}=de.usePrinter({elementId:`nested_donuts_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),me=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),d=e.ref({height:512,width:512});function be({datapoint:l,index:s}){R("selectDatapoint",{datapoint:l,index:s})}const v=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,s)=>({...l,total:l.series.filter(o=>!v.value.includes(o.id)).map(o=>r.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:s,id:`${p.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${p.value}_${s}`,id:`${p.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||me.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:r.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(d.value.height,d.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),j=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!v.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!v.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function ge(l,s,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<s}const c=e.ref(j.value);e.watch(()=>j.value,l=>c.value=l);const ee=e.ref(null),te=e.ref(null);function z(l){R("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=c.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),f=ge(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(ee.value),c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),ee.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(f){let i=function(){a<.1?(cancelAnimationFrame(te.value),v.value.push(l.id),c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:0}:L)}))):(a/=1.1,c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:a}:L)})),te.value=requestAnimationFrame(i))};i()}}const P=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),le=e.computed(()=>c.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>c.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,P.value)}})),ae=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),oe=e.ref(null),S=e.ref(null),E=e.ref(null),O=e.ref(null);function ke({datapoint:l,_relativeIndex:s,seriesIndex:o}){oe.value=l.arcOfId,S.value=l.id,E.value=o,O.value={datapoint:l,seriesIndex:o,series:c.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:c.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:c.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=c.value.map(f=>f.series.find(i=>i.seriesIndex===o));u.forEach((f,i)=>{if(!f)return"";a+=`
|
|
2
2
|
<div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
|
|
3
3
|
<div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
|
|
4
4
|
<svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { computed as g, ref as d, watch as De, onMounted as Ke, onBeforeUnmount as Je, openBlock as u, createElementBlock as n, normalizeClass as z, normalizeStyle as ue, createBlock as P, createCommentVNode as y, unref as r, createSlots as Qe, withCtx as m, renderSlot as $, normalizeProps as q, guardReactiveProps as K, createVNode as Oe, createElementVNode as p, Fragment as x, renderList as S, toDisplayString as T, createTextVNode as J, nextTick as Ze, pushScopeId as je, popScopeId as et } from "vue";
|
|
2
|
-
import { u as tt, c as lt, t as at, a as ot, p as Q, o as st, e as A, b as ut, I as ze, d as nt, m as Pe, f as L, X as rt, s as Ae, K as it, k as V, n as ne, i as R, x as Ve, y as dt, q as ct, r as vt } from "./index-
|
|
2
|
+
import { u as tt, c as lt, t as at, a as ot, p as Q, o as st, e as A, b as ut, I as ze, d as nt, m as Pe, f as L, X as rt, s as Ae, K as it, k as V, n as ne, i as R, x as Ve, y as dt, q as ct, r as vt } from "./index-BJNSbAx7.js";
|
|
3
3
|
import { t as ft, u as ht } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as yt } from "./Title-
|
|
5
|
-
import { u as pt, U as bt } from "./usePrinter-
|
|
6
|
-
import { D as gt } from "./DataTable-
|
|
7
|
-
import { _ as mt } from "./Tooltip-
|
|
8
|
-
import { L as _t } from "./Legend-
|
|
9
|
-
import wt from "./vue-ui-skeleton-
|
|
10
|
-
import kt from "./vue-ui-accordion-
|
|
11
|
-
import { u as Me } from "./useNestedProp-
|
|
12
|
-
import { _ as xt } from "./PackageVersion-
|
|
4
|
+
import { _ as yt } from "./Title-0tYDaWv7.js";
|
|
5
|
+
import { u as pt, U as bt } from "./usePrinter-CkV5eORP.js";
|
|
6
|
+
import { D as gt } from "./DataTable-BczvA492.js";
|
|
7
|
+
import { _ as mt } from "./Tooltip-DdWGiVyf.js";
|
|
8
|
+
import { L as _t } from "./Legend-DnOc-JGW.js";
|
|
9
|
+
import wt from "./vue-ui-skeleton-CsU74BI7.js";
|
|
10
|
+
import kt from "./vue-ui-accordion-DDf5Y2GY.js";
|
|
11
|
+
import { u as Me } from "./useNestedProp-CLh4tPxT.js";
|
|
12
|
+
import { _ as xt } from "./PackageVersion-DN8qp-uI.js";
|
|
13
13
|
import { _ as $t } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = ["xmlns", "viewBox"], Ft = ["id"], St = /* @__PURE__ */ re(() => /* @__PURE__ */ p("stop", {
|
|
15
15
|
offset: "0%",
|