vue-data-ui 2.4.39 → 2.4.41
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-gn_WiuJU.js → Arrow-6z0ZQva_.js} +1 -1
- package/dist/{Arrow-BH3TXY5i.cjs → Arrow-Cht76m69.cjs} +1 -1
- package/dist/{BaseIcon-C9eU1XEJ.cjs → BaseIcon-D-JUZiGA.cjs} +1 -1
- package/dist/{BaseIcon-PEMG4fz_.js → BaseIcon-DCE3wRiG.js} +1 -1
- package/dist/{DataTable-D7EHk98Z.js → DataTable-B5DiCrf_.js} +2 -2
- package/dist/{DataTable-Dk61oGV_.cjs → DataTable-Cr3Xkxe4.cjs} +1 -1
- package/dist/{Legend-6jFPkL1P.cjs → Legend-BXG_XPom.cjs} +1 -1
- package/dist/{Legend-C8xQE9Da.js → Legend-DzxQIjDO.js} +1 -1
- package/dist/{PackageVersion-C7okNmPF.cjs → PackageVersion-CMtZxTqq.cjs} +1 -1
- package/dist/{PackageVersion-CiIsJuZg.js → PackageVersion-S7OD_s5u.js} +1 -1
- package/dist/{PenAndPaper-BBXIRAdA.js → PenAndPaper-BxJZd7k9.js} +3 -3
- package/dist/{PenAndPaper-BUjMRWG0.cjs → PenAndPaper-DWYhyZye.cjs} +1 -1
- package/dist/{Shape-C37gcsR4.js → Shape-C3ywBhkW.js} +1 -1
- package/dist/{Shape-f0l9bT7U.cjs → Shape-CvL90fNe.cjs} +1 -1
- package/dist/{Slicer-A-l0DLQY.cjs → Slicer-B2aHb4bj.cjs} +1 -1
- package/dist/{Slicer-DHzuJMcK.js → Slicer-D9ASV60L.js} +2 -2
- package/dist/{Title-DU9SuVY-.js → Title-BB0O0yol.js} +1 -1
- package/dist/{Title-BeCsXJhg.cjs → Title-D9gPXVTT.cjs} +1 -1
- package/dist/{Tooltip-Chiu53IG.js → Tooltip-GvLaModr.js} +1 -1
- package/dist/{Tooltip-DCwHEKeM.cjs → Tooltip-ypQtmi99.cjs} +1 -1
- package/dist/index-B5Ugkauv.cjs +9 -0
- package/dist/{index-hQvps1ng.js → index-B6Q1Fyk0.js} +12 -3
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +9 -0
- package/dist/types/vue-data-ui.d.ts +9 -0
- package/dist/{useNestedProp-CxQ2hIfU.js → useNestedProp-DQpuJSz3.js} +1 -1
- package/dist/{useNestedProp-DzZoHbI7.cjs → useNestedProp-bZitLnbb.cjs} +1 -1
- package/dist/{usePrinter-c5Pf5Hrk.js → usePrinter-D8dIU7aG.js} +1 -1
- package/dist/{usePrinter-C-C264ik.cjs → usePrinter-DtpFEgOX.cjs} +1 -1
- package/dist/{vue-data-ui-DhR5T2GB.cjs → vue-data-ui-DBN7iJHU.cjs} +1 -1
- package/dist/{vue-data-ui-DD3uGHqs.js → vue-data-ui-H24TWcBx.js} +60 -60
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BNOB6IJY.js → vue-ui-3d-bar-BA2CQYGW.js} +9 -9
- package/dist/{vue-ui-3d-bar-CBVoa_Wd.cjs → vue-ui-3d-bar-BaNI_M3v.cjs} +1 -1
- package/dist/{vue-ui-accordion-CbATWtZa.js → vue-ui-accordion-BOHicozd.js} +3 -3
- package/dist/{vue-ui-accordion-CTxFHMF7.cjs → vue-ui-accordion-u4xDSvRn.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-ahMSlg4_.cjs → vue-ui-age-pyramid-DN25tjv-.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-Ddn0vH-R.js → vue-ui-age-pyramid-vKWko9vn.js} +10 -10
- package/dist/{vue-ui-annotator-DUul7luS.cjs → vue-ui-annotator-BcxUQ5tM.cjs} +1 -1
- package/dist/{vue-ui-annotator-DgPWj2k4.js → vue-ui-annotator-D4KNucw5.js} +1 -1
- package/dist/{vue-ui-bullet-BvFWfcoX.cjs → vue-ui-bullet-C3DKTZbg.cjs} +1 -1
- package/dist/{vue-ui-bullet-C6JmUhDP.js → vue-ui-bullet-DZgtd_qb.js} +8 -8
- package/dist/{vue-ui-candlestick-BUATE5UN.js → vue-ui-candlestick-C8yBMu8-.js} +11 -11
- package/dist/{vue-ui-candlestick-hi4L9XWB.cjs → vue-ui-candlestick-DVEofXBZ.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-Bi9tYRH3.js → vue-ui-carousel-table-Bpsrlbx9.js} +4 -4
- package/dist/{vue-ui-carousel-table-DvotxYl6.cjs → vue-ui-carousel-table-C62szGjt.cjs} +1 -1
- package/dist/{vue-ui-chestnut-CRICzF5h.js → vue-ui-chestnut-DhPSNM96.js} +8 -8
- package/dist/{vue-ui-chestnut-Bv2eLqjB.cjs → vue-ui-chestnut-VWwSZnUX.cjs} +1 -1
- package/dist/{vue-ui-cursor-DfwrrtWf.js → vue-ui-cursor-BM2OiZnZ.js} +2 -2
- package/dist/{vue-ui-cursor-qFWZfG95.cjs → vue-ui-cursor-BwnZYB4D.cjs} +1 -1
- package/dist/vue-ui-dashboard-BcnW7vDs.js +248 -0
- package/dist/vue-ui-dashboard-D8FU1GbE.cjs +1 -0
- package/dist/{vue-ui-digits-C3X-8Guv.cjs → vue-ui-digits-BmQBwho3.cjs} +1 -1
- package/dist/{vue-ui-digits-DUCY8rWv.js → vue-ui-digits-M4Pvrg0n.js} +2 -2
- package/dist/{vue-ui-donut-BiUKzDWv.js → vue-ui-donut-BgsQjURe.js} +11 -11
- package/dist/{vue-ui-donut-Bv2GZaYZ.cjs → vue-ui-donut-CZZfvbPk.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-Cup3zFPj.js → vue-ui-donut-evolution-BO2-ARBX.js} +11 -11
- package/dist/{vue-ui-donut-evolution-j8JKVqXN.cjs → vue-ui-donut-evolution-DP14ctdf.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-CANVwmSA.cjs → vue-ui-dumbbell-CsMqgiGr.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-DJE8-e3A.js → vue-ui-dumbbell-zv7yiPPM.js} +10 -10
- package/dist/{vue-ui-flow-Crq3AVFe.js → vue-ui-flow-BqtIWBkz.js} +9 -9
- package/dist/{vue-ui-flow-Dvz0sa0O.cjs → vue-ui-flow-E5MkZ3Yb.cjs} +1 -1
- package/dist/{vue-ui-funnel-M8uzLylj.js → vue-ui-funnel-CmVLAttG.js} +8 -8
- package/dist/{vue-ui-funnel-BVujl3GY.cjs → vue-ui-funnel-QU0_JscL.cjs} +1 -1
- package/dist/{vue-ui-galaxy-BfQkC9br.cjs → vue-ui-galaxy-BPDH-9KW.cjs} +1 -1
- package/dist/{vue-ui-galaxy-B77VCJR3.js → vue-ui-galaxy-sy8zvgcg.js} +11 -11
- package/dist/{vue-ui-gauge-8xiT5BUm.js → vue-ui-gauge--hARSvgz.js} +7 -7
- package/dist/{vue-ui-gauge-DwMexCwq.cjs → vue-ui-gauge-D_yokJMS.cjs} +1 -1
- package/dist/{vue-ui-gizmo-C9pEyZr1.cjs → vue-ui-gizmo-AUJq3EQL.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CI96cnOM.js → vue-ui-gizmo-CvTeq5j0.js} +3 -3
- package/dist/{vue-ui-heatmap-lXe9Bxsb.cjs → vue-ui-heatmap-D-xNLuqW.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DE6AgqvQ.js → vue-ui-heatmap-lI8oO-nh.js} +10 -10
- package/dist/{vue-ui-history-plot-B2p5Da7E.cjs → vue-ui-history-plot-BC0Rvo-r.cjs} +1 -1
- package/dist/{vue-ui-history-plot-CO2ZBnhb.js → vue-ui-history-plot-D3CwJpll.js} +11 -11
- package/dist/{vue-ui-kpi-D_URPS6w.cjs → vue-ui-kpi-B4FQKZ_r.cjs} +1 -1
- package/dist/{vue-ui-kpi-Cc7Yytho.js → vue-ui-kpi-C0agq-Os.js} +3 -3
- package/dist/{vue-ui-mini-loader-DHXKDtYR.cjs → vue-ui-mini-loader-BJ70GAEv.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DYbYoCQH.js → vue-ui-mini-loader-CkjJ5pRO.js} +2 -2
- package/dist/{vue-ui-molecule-CYs_u6Wz.cjs → vue-ui-molecule-CsQfkIEE.cjs} +1 -1
- package/dist/{vue-ui-molecule-CYlh7983.js → vue-ui-molecule-V9UFJHeV.js} +11 -11
- package/dist/{vue-ui-mood-radar-BjcUi2lA.cjs → vue-ui-mood-radar-CdU2vusL.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-B3nvz_EX.js → vue-ui-mood-radar-Cj_wOEbY.js} +11 -11
- package/dist/{vue-ui-nested-donuts-BDPVh9VT.js → vue-ui-nested-donuts-DFVQwbHg.js} +11 -11
- package/dist/{vue-ui-nested-donuts-sf-rnAYN.cjs → vue-ui-nested-donuts-DevV-xZr.cjs} +1 -1
- package/dist/{vue-ui-onion-BddrBSxm.js → vue-ui-onion-BJ-PjA7d.js} +11 -11
- package/dist/{vue-ui-onion-DYhBNiT8.cjs → vue-ui-onion-DGWktnME.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-JyWFCBD3.js → vue-ui-parallel-coordinate-plot-33naX1Ss.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-m-ZgXf3c.cjs → vue-ui-parallel-coordinate-plot-CjxZbVNa.cjs} +1 -1
- package/dist/{vue-ui-quadrant-C0XCJA1s.cjs → vue-ui-quadrant-DqZqBb2L.cjs} +1 -1
- package/dist/{vue-ui-quadrant-woZI-oSE.js → vue-ui-quadrant-xJaZzXgo.js} +12 -12
- package/dist/{vue-ui-quick-chart-DT37a1KG.js → vue-ui-quick-chart-BwN9eLye.js} +9 -9
- package/dist/{vue-ui-quick-chart-GAy1Kq_9.cjs → vue-ui-quick-chart-BzpXJYR_.cjs} +1 -1
- package/dist/{vue-ui-radar-BWLte3c3.js → vue-ui-radar-B4EXwJDY.js} +12 -12
- package/dist/{vue-ui-radar-C31U_Z53.cjs → vue-ui-radar-CQ66YUG5.cjs} +1 -1
- package/dist/{vue-ui-rating-B4LMCbX7.cjs → vue-ui-rating-D334I4ju.cjs} +1 -1
- package/dist/{vue-ui-rating-0HTRr8sI.js → vue-ui-rating-DNkygw1i.js} +2 -2
- package/dist/vue-ui-relation-circle-BKeSh28h.js +492 -0
- package/dist/vue-ui-relation-circle-CP2Z6IWV.cjs +1 -0
- package/dist/{vue-ui-rings-CptiG61Q.cjs → vue-ui-rings-2oDSTctd.cjs} +1 -1
- package/dist/{vue-ui-rings-Cd_dJ3co.js → vue-ui-rings-D6M3UNSE.js} +11 -11
- package/dist/{vue-ui-scatter-BK5xv5mP.cjs → vue-ui-scatter-C9ZoWV1q.cjs} +1 -1
- package/dist/{vue-ui-scatter-Do7eIAvo.js → vue-ui-scatter-JUPbbsO7.js} +12 -12
- package/dist/{vue-ui-screenshot-DJjluZur.js → vue-ui-screenshot-DmLDHfF9.js} +1 -1
- package/dist/{vue-ui-screenshot-hW8cPfaI.cjs → vue-ui-screenshot-JMBX_AWn.cjs} +1 -1
- package/dist/{vue-ui-skeleton-Dmee5Xfg.js → vue-ui-skeleton-D7rg5vFC.js} +3 -3
- package/dist/{vue-ui-skeleton-Ckb3hRcQ.cjs → vue-ui-skeleton-E9_X0-sa.cjs} +1 -1
- package/dist/{vue-ui-smiley-B3MEz94h.js → vue-ui-smiley-BAlHZm8H.js} +2 -2
- package/dist/{vue-ui-smiley-CfQTx9Kb.cjs → vue-ui-smiley-aRTznf8z.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-B-sO8emp.cjs → vue-ui-spark-trend-DZR6Fqu5.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-BnziIPLw.js → vue-ui-spark-trend-J9swikF_.js} +5 -5
- package/dist/{vue-ui-sparkbar-D3W-HMC0.js → vue-ui-sparkbar-B0tCpwZ9.js} +4 -4
- package/dist/{vue-ui-sparkbar-DWHagP1f.cjs → vue-ui-sparkbar-Bjmi8pMf.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Bp20yElv.js → vue-ui-sparkgauge-DVX2pIC3.js} +4 -4
- package/dist/{vue-ui-sparkgauge-Cx_dMzxw.cjs → vue-ui-sparkgauge-Dhzbkn67.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-BdovbgiO.js → vue-ui-sparkhistogram-Wd6q0mqj.js} +5 -5
- package/dist/{vue-ui-sparkhistogram--Ulh-M8t.cjs → vue-ui-sparkhistogram-gIaXDrFh.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DJGZzF_8.cjs → vue-ui-sparkline-B5ySeM9y.cjs} +1 -1
- package/dist/{vue-ui-sparkline-B2cKF2Oq.js → vue-ui-sparkline-DYT-gts9.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-ywMpLSpx.js → vue-ui-sparkstackbar-BMGA05VR.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-BmFppjoc.cjs → vue-ui-sparkstackbar-ilvB3RBv.cjs} +1 -1
- package/dist/{vue-ui-stackbar-NjNO1R4N.cjs → vue-ui-stackbar-BZKwsAjO.cjs} +1 -1
- package/dist/{vue-ui-stackbar-s7gETyOu.js → vue-ui-stackbar-BZbOagnf.js} +12 -12
- package/dist/{vue-ui-strip-plot-CKI7Tk26.js → vue-ui-strip-plot-B-r4luYX.js} +11 -11
- package/dist/{vue-ui-strip-plot-BieHYfvX.cjs → vue-ui-strip-plot-DPo7osh_.cjs} +1 -1
- package/dist/{vue-ui-table-mo4xqDVF.cjs → vue-ui-table-C6z56ODT.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BI_IFUMP.cjs → vue-ui-table-heatmap-B05GifSw.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BMmVk6UI.js → vue-ui-table-heatmap-CM-c7n0F.js} +4 -4
- package/dist/{vue-ui-table-sparkline-DOx85BsZ.js → vue-ui-table-sparkline-DHaEHFG_.js} +5 -5
- package/dist/{vue-ui-table-sparkline-nouXTHiN.cjs → vue-ui-table-sparkline-Dx-ePVqW.cjs} +1 -1
- package/dist/{vue-ui-table-CGNRHPdF.js → vue-ui-table-wlXHwJVW.js} +1 -1
- package/dist/{vue-ui-thermometer-Cbqv6RYW.js → vue-ui-thermometer-BU_ckSdu.js} +7 -7
- package/dist/{vue-ui-thermometer-CpbU3pkq.cjs → vue-ui-thermometer-HCpOZBHv.cjs} +1 -1
- package/dist/{vue-ui-timer-BrAZQClf.cjs → vue-ui-timer-CUChwyzF.cjs} +1 -1
- package/dist/{vue-ui-timer-BgueE1dl.js → vue-ui-timer-DiRZ849L.js} +5 -5
- package/dist/{vue-ui-tiremarks-HNlJDrP8.js → vue-ui-tiremarks-BHMNb_tq.js} +7 -7
- package/dist/{vue-ui-tiremarks-DAqAEaPM.cjs → vue-ui-tiremarks-yoQtfbj7.cjs} +1 -1
- package/dist/{vue-ui-treemap-Cqej3ef5.cjs → vue-ui-treemap-BInwLSes.cjs} +1 -1
- package/dist/{vue-ui-treemap-BNNW0aIB.js → vue-ui-treemap-BpD6OdL3.js} +11 -11
- package/dist/{vue-ui-vertical-bar-DjoaIjRt.js → vue-ui-vertical-bar-CBNWMmCg.js} +11 -11
- package/dist/{vue-ui-vertical-bar-BCx0SE0Z.cjs → vue-ui-vertical-bar-hS4gzdKs.cjs} +1 -1
- package/dist/{vue-ui-waffle-CrCgrl2o.js → vue-ui-waffle-BE8iTrGF.js} +11 -11
- package/dist/{vue-ui-waffle-CspQJ4_E.cjs → vue-ui-waffle-Cmq6zhD8.cjs} +1 -1
- package/dist/{vue-ui-wheel-DvpCjvs8.cjs → vue-ui-wheel-BT0mLxln.cjs} +1 -1
- package/dist/{vue-ui-wheel-Wq6OVQ5Z.js → vue-ui-wheel-BXSIBRLM.js} +7 -7
- package/dist/{vue-ui-word-cloud-AXCM7hi3.js → vue-ui-word-cloud-3wvSYRbp.js} +10 -10
- package/dist/{vue-ui-word-cloud-CaW8SZ9y.cjs → vue-ui-word-cloud-BXHlm41O.cjs} +1 -1
- package/dist/vue-ui-xy-CfduqTWA.cjs +3 -0
- package/dist/{vue-ui-xy-BhdOWsqW.js → vue-ui-xy-D8XvOgW6.js} +16 -16
- package/dist/{vue-ui-xy-canvas-o7kCbz5j.cjs → vue-ui-xy-canvas-BTR-cL02.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-sAVL0y81.js → vue-ui-xy-canvas-Cx7vPyfT.js} +11 -11
- package/package.json +1 -1
- package/dist/index-DCccP2Kt.cjs +0 -9
- package/dist/vue-ui-dashboard-CxGCT46n.cjs +0 -1
- package/dist/vue-ui-dashboard-yX9EkLTf.js +0 -232
- package/dist/vue-ui-relation-circle-Ds3zzFbl.js +0 -366
- package/dist/vue-ui-relation-circle-K0EZ_Nkb.cjs +0 -1
- package/dist/vue-ui-xy-Dkl5bPI-.cjs +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-DCccP2Kt.cjs"),ce=require("./Title-BeCsXJhg.cjs"),Z=require("./usePrinter-C-C264ik.cjs"),ve=require("./Tooltip-DCwHEKeM.cjs"),ye=require("./vue-ui-skeleton-Ckb3hRcQ.cjs"),pe=require("./BaseIcon-C9eU1XEJ.cjs"),he=require("./vue-ui-accordion-CTxFHMF7.cjs"),ee=require("./useNestedProp-DzZoHbI7.cjs"),fe=require("./PackageVersion-C7okNmPF.cjs"),ge=require("./PenAndPaper-BUjMRWG0.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],ke={key:2,style:"width:100%;background:transparent"},xe=["xmlns","viewBox"],we=["x","y","width","height","fill","stroke","stroke-width"],Ce=["x","y","width","height","fill","stroke","stroke-width"],_e=["font-size","font-weight","fill","x","y"],Ne=["x","y","width","height","onMouseover"],Be={key:0},Le=["font-size","fill","x","y","font-weight"],Ve={key:0},$e=["text-anchor","font-size","fill","font-weight","transform"],Ee={key:1},Se=["x","y","width","height","stroke","stroke-width"],Ae={key:2},ze=["id"],Te=["stop-color"],Me=["stop-color"],Pe=["x","y","font-size","fill"],Oe=["x","y","height","rx","fill"],Fe=["x","y","font-size","fill"],De=["stroke","x1","x2","y1","y2"],Ie=["fill","d"],Re={key:3},qe={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},He=["stop-color"],Ue=["stop-color"],Ge=["x","y","width","height","rx"],Xe=["x","y","font-size","fill"],je=["x","y","font-size","fill"],Ye=["stroke","x1","x2","y1","y2"],We=["fill","d"],Ke={key:5,class:"vue-data-ui-watermark"},Je={key:6,ref:"source",dir:"auto"},Qe={class:"vue-ui-data-table"},Ze={key:0},et=["data-cell"],tt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},lt=["data-cell"],at={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ot={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(L,{expose:te}){const n=L;e.useCssVars(l=>({"309b083a":l.tdo}));const{vue_ui_heatmap:le}=o.useConfig(),V=e.computed(()=>!!n.dataset&&n.dataset.length);o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiHeatmap",type:"dataset"});const x=e.ref(o.createUid()),$=e.ref(null),ae=e.ref(null),z=e.ref(!1),T=e.ref(""),I=e.ref(void 0),w=e.ref(null),R=e.ref(0),q=e.ref(null),oe=e.ref(null),H=e.ref(!1),U=e.ref(0),t=e.computed({get:()=>G(),set:l=>l});function G(){const l=ee.useNestedProp({userConfig:n.config,defaultConfig:le});let s={};return l.theme?s={...ee.useNestedProp({userConfig:o.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:s=l,n.config&&o.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?s.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:s.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,s}e.watch(()=>n.config,l=>{t.value=G(),M(),U.value+=1},{deep:!0}),e.watch(()=>n.dataset,()=>{M()},{deep:!0});const{isPrinting:X,isImaging:j,generatePdf:Y,generateImage:W}=Z.usePrinter({elementId:`heatmap__${x.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),se=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),ue=e.computed(()=>t.value.table.responsiveBreakpoint);function ne(){new ResizeObserver(s=>{s.forEach(u=>{H.value=u.contentRect.width<ue.value})}).observe(q.value)}e.onMounted(M);function M(){ne()}const k=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+(k.value<n.dataset.length?n.dataset.length:k.value)*t.value.style.layout.cells.height,u=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:u,width:s}}),E=e.computed(()=>t.value.style.legend.position),a=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:p.value.width-t.value.style.layout.padding.right-(E.value==="right"&&t.value.style.legend.show?92:0),bottom:p.value.height-t.value.style.layout.padding.bottom,height:p.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:p.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(E.value==="right"&&t.value.style.legend.show?92:0)})),P=e.computed(()=>i.value.height*n.dataset.length),v=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:a.value.width/k.value,height:a.value.width/(k.value<n.dataset.length?n.dataset.length:k.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,k.value)}}),S=e.computed(()=>(n.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{o.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:s})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((s,u)=>s>=b.value?{side:"up",color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),ratio:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value))>1?1:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value)),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(s)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(s)/Math.abs(b.value)),color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`})})))),f=e.ref(null),C=e.ref(null);function re(l,s,u,r){w.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:g,id:de}=l;I.value=de,f.value=d,C.value={datapoint:l,seriesIndex:s,series:S.value,config:t.value},z.value=!0;let F="";const D=t.value.style.tooltip.customFormat;o.isFunction(D)&&o.functionReturnsString(()=>D({datapoint:l,seriesIndex:s,series:S.value,config:t.value}))?T.value=D({datapoint:l,seriesIndex:s,series:S.value,config:t.value}):(F+=`<div>${c} ${g?`${g}`:""}</div>`,F+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,d)}">⬤</span><span>${isNaN(d)?"-":o.applyDataLabel(t.value.style.layout.cells.value.formatter,d,o.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:s})}</span></div>`,T.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${F}</div>`)}const _=e.computed(()=>a.value.top+P.value*(1-f.value/v.value)),N=e.computed(()=>a.value.left+(p.value.width-a.value.left-t.value.style.layout.padding.right)*(f.value/v.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),s=n.dataset.map(u=>u.values);return{head:l,body:s}});function K(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],s=[];for(let d=0;d<h.value.xLabels.length;d+=1){const c=[h.value.xLabels[d]];for(let g=0;g<n.dataset.length;g+=1)c.push([n.dataset[g].values[d]]);s.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(s),r=o.createCsvContent(u);o.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const B=e.ref(!1);function ie(l){B.value=l,R.value+=1}function J(){y.value.showTable=!y.value.showTable}function Q(){y.value.showTooltip=!y.value.showTooltip}const A=e.ref(!1);function O(){A.value=!A.value}return te({generatePdf:Y,generateCsv:K,generateImage:W,toggleTable:J,toggleTooltip:Q,toggleAnnotator:O}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:$,class:e.normalizeClass(`vue-ui-heatmap ${B.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor}`),id:`heatmap__${x.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ge.PenAndPaper,{key:0,parent:$.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:A.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:oe,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",ke,[(e.openBlock(),e.createBlock(ce._sfc_main,{key:`title_${U.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value?(e.openBlock(),e.createBlock(Z.UserOptions,{ref_key:"details",ref:ae,key:`user_options_${R.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(j),isPrinting:e.unref(X),uid:x.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:$.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:ie,onGeneratePdf:e.unref(Y),onGenerateCsv:K,onGenerateImage:e.unref(W),onToggleTable:J,onToggleTooltip:Q,onToggleAnnotator:O},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:u,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:u,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`0 0 ${p.value.width} ${p.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(fe._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(u,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,we),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,Ce),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,_e)):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:g=>re(d,r,a.value.left+i.value.width*c,a.value.top+i.value.height*r),onMouseout:s[0]||(s[0]=g=>{z.value=!1,I.value=void 0,f.value=null,w.value=null})},null,40,Ne)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Be,[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,Le)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ve,[(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,$e)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("g",Ee,[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,Se)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="right"?(e.openBlock(),e.createElementBlock("g",Ae,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${x.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Me)],8,ze)]),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,Pe),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:P.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${x.value})`},null,8,Oe),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+P.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Fe),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(C.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:_.value,y2:_.value},null,8,De)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${a.value.right+36},${_.value} ${a.value.right+26},${_.value-8} ${a.value.right+26},${_.value+8}z`},null,8,Ie)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Re,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",qe,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,He),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Ue)])]),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,Ge),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,Xe),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,je),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(C.value.datapoint.color),"stroke-width":"2",x1:N.value,x2:N.value,y1:a.value.bottom+t.value.style.layout.cells.height,y2:a.value.bottom+t.value.style.layout.cells.height*2},null,8,Ye)):e.createCommentVNode("",!0),f.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,We)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:p.value},void 0,!0)],14,xe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ye.default,{key:7,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(ve._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:$.value,content:T.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...C.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...C.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),V.value?(e.openBlock(),e.createBlock(he.default,{key:8,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:q,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":H.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:s[1]||(s[1]=u=>y.value.showTable=!1),onKeypress:s[2]||(s[2]=e.withKeys(u=>y.value.showTable=!1,["enter"]))},[e.createVNode(pe.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Qe,[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",Ze,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(u,r)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(u.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",tt,e.toDisplayString(u),1)],12,et),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":L.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",at,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,lt))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,be))}},st=me._export_sfc(ot,[["__scopeId","data-v-569c98af"]]);exports.default=st;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-B5Ugkauv.cjs"),ce=require("./Title-D9gPXVTT.cjs"),Z=require("./usePrinter-DtpFEgOX.cjs"),ve=require("./Tooltip-ypQtmi99.cjs"),ye=require("./vue-ui-skeleton-E9_X0-sa.cjs"),pe=require("./BaseIcon-D-JUZiGA.cjs"),he=require("./vue-ui-accordion-u4xDSvRn.cjs"),ee=require("./useNestedProp-bZitLnbb.cjs"),fe=require("./PackageVersion-CMtZxTqq.cjs"),ge=require("./PenAndPaper-DWYhyZye.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],ke={key:2,style:"width:100%;background:transparent"},xe=["xmlns","viewBox"],we=["x","y","width","height","fill","stroke","stroke-width"],Ce=["x","y","width","height","fill","stroke","stroke-width"],_e=["font-size","font-weight","fill","x","y"],Ne=["x","y","width","height","onMouseover"],Be={key:0},Le=["font-size","fill","x","y","font-weight"],Ve={key:0},$e=["text-anchor","font-size","fill","font-weight","transform"],Ee={key:1},Se=["x","y","width","height","stroke","stroke-width"],Ae={key:2},ze=["id"],Te=["stop-color"],Me=["stop-color"],Pe=["x","y","font-size","fill"],Oe=["x","y","height","rx","fill"],Fe=["x","y","font-size","fill"],De=["stroke","x1","x2","y1","y2"],Ie=["fill","d"],Re={key:3},qe={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},He=["stop-color"],Ue=["stop-color"],Ge=["x","y","width","height","rx"],Xe=["x","y","font-size","fill"],je=["x","y","font-size","fill"],Ye=["stroke","x1","x2","y1","y2"],We=["fill","d"],Ke={key:5,class:"vue-data-ui-watermark"},Je={key:6,ref:"source",dir:"auto"},Qe={class:"vue-ui-data-table"},Ze={key:0},et=["data-cell"],tt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},lt=["data-cell"],at={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ot={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(L,{expose:te}){const n=L;e.useCssVars(l=>({"309b083a":l.tdo}));const{vue_ui_heatmap:le}=o.useConfig(),V=e.computed(()=>!!n.dataset&&n.dataset.length);o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiHeatmap",type:"dataset"});const x=e.ref(o.createUid()),$=e.ref(null),ae=e.ref(null),z=e.ref(!1),T=e.ref(""),I=e.ref(void 0),w=e.ref(null),R=e.ref(0),q=e.ref(null),oe=e.ref(null),H=e.ref(!1),U=e.ref(0),t=e.computed({get:()=>G(),set:l=>l});function G(){const l=ee.useNestedProp({userConfig:n.config,defaultConfig:le});let s={};return l.theme?s={...ee.useNestedProp({userConfig:o.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:s=l,n.config&&o.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?s.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:s.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,s}e.watch(()=>n.config,l=>{t.value=G(),M(),U.value+=1},{deep:!0}),e.watch(()=>n.dataset,()=>{M()},{deep:!0});const{isPrinting:X,isImaging:j,generatePdf:Y,generateImage:W}=Z.usePrinter({elementId:`heatmap__${x.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),se=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),ue=e.computed(()=>t.value.table.responsiveBreakpoint);function ne(){new ResizeObserver(s=>{s.forEach(u=>{H.value=u.contentRect.width<ue.value})}).observe(q.value)}e.onMounted(M);function M(){ne()}const k=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+(k.value<n.dataset.length?n.dataset.length:k.value)*t.value.style.layout.cells.height,u=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:u,width:s}}),E=e.computed(()=>t.value.style.legend.position),a=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:p.value.width-t.value.style.layout.padding.right-(E.value==="right"&&t.value.style.legend.show?92:0),bottom:p.value.height-t.value.style.layout.padding.bottom,height:p.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:p.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(E.value==="right"&&t.value.style.legend.show?92:0)})),P=e.computed(()=>i.value.height*n.dataset.length),v=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:a.value.width/k.value,height:a.value.width/(k.value<n.dataset.length?n.dataset.length:k.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,k.value)}}),S=e.computed(()=>(n.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{o.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:s})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((s,u)=>s>=b.value?{side:"up",color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),ratio:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value))>1?1:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value)),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(s)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(s)/Math.abs(b.value)),color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`})})))),f=e.ref(null),C=e.ref(null);function re(l,s,u,r){w.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:g,id:de}=l;I.value=de,f.value=d,C.value={datapoint:l,seriesIndex:s,series:S.value,config:t.value},z.value=!0;let F="";const D=t.value.style.tooltip.customFormat;o.isFunction(D)&&o.functionReturnsString(()=>D({datapoint:l,seriesIndex:s,series:S.value,config:t.value}))?T.value=D({datapoint:l,seriesIndex:s,series:S.value,config:t.value}):(F+=`<div>${c} ${g?`${g}`:""}</div>`,F+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,d)}">⬤</span><span>${isNaN(d)?"-":o.applyDataLabel(t.value.style.layout.cells.value.formatter,d,o.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:s})}</span></div>`,T.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${F}</div>`)}const _=e.computed(()=>a.value.top+P.value*(1-f.value/v.value)),N=e.computed(()=>a.value.left+(p.value.width-a.value.left-t.value.style.layout.padding.right)*(f.value/v.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),s=n.dataset.map(u=>u.values);return{head:l,body:s}});function K(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],s=[];for(let d=0;d<h.value.xLabels.length;d+=1){const c=[h.value.xLabels[d]];for(let g=0;g<n.dataset.length;g+=1)c.push([n.dataset[g].values[d]]);s.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(s),r=o.createCsvContent(u);o.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const B=e.ref(!1);function ie(l){B.value=l,R.value+=1}function J(){y.value.showTable=!y.value.showTable}function Q(){y.value.showTooltip=!y.value.showTooltip}const A=e.ref(!1);function O(){A.value=!A.value}return te({generatePdf:Y,generateCsv:K,generateImage:W,toggleTable:J,toggleTooltip:Q,toggleAnnotator:O}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:$,class:e.normalizeClass(`vue-ui-heatmap ${B.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor}`),id:`heatmap__${x.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ge.PenAndPaper,{key:0,parent:$.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:A.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:oe,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",ke,[(e.openBlock(),e.createBlock(ce._sfc_main,{key:`title_${U.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value?(e.openBlock(),e.createBlock(Z.UserOptions,{ref_key:"details",ref:ae,key:`user_options_${R.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(j),isPrinting:e.unref(X),uid:x.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:$.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:ie,onGeneratePdf:e.unref(Y),onGenerateCsv:K,onGenerateImage:e.unref(W),onToggleTable:J,onToggleTooltip:Q,onToggleAnnotator:O},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:u,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:u,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`0 0 ${p.value.width} ${p.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(fe._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(u,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,we),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,Ce),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,_e)):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:g=>re(d,r,a.value.left+i.value.width*c,a.value.top+i.value.height*r),onMouseout:s[0]||(s[0]=g=>{z.value=!1,I.value=void 0,f.value=null,w.value=null})},null,40,Ne)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Be,[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,Le)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ve,[(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,$e)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("g",Ee,[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,Se)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="right"?(e.openBlock(),e.createElementBlock("g",Ae,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${x.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Me)],8,ze)]),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,Pe),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:P.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${x.value})`},null,8,Oe),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+P.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Fe),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(C.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:_.value,y2:_.value},null,8,De)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${a.value.right+36},${_.value} ${a.value.right+26},${_.value-8} ${a.value.right+26},${_.value+8}z`},null,8,Ie)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Re,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",qe,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,He),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Ue)])]),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,Ge),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,Xe),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,je),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(C.value.datapoint.color),"stroke-width":"2",x1:N.value,x2:N.value,y1:a.value.bottom+t.value.style.layout.cells.height,y2:a.value.bottom+t.value.style.layout.cells.height*2},null,8,Ye)):e.createCommentVNode("",!0),f.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,We)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:p.value},void 0,!0)],14,xe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ye.default,{key:7,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(ve._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:$.value,content:T.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...C.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...C.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),V.value?(e.openBlock(),e.createBlock(he.default,{key:8,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:q,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":H.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:s[1]||(s[1]=u=>y.value.showTable=!1),onKeypress:s[2]||(s[2]=e.withKeys(u=>y.value.showTable=!1,["enter"]))},[e.createVNode(pe.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Qe,[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",Ze,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(u,r)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(u.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",tt,e.toDisplayString(u),1)],12,et),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":L.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",at,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,lt))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,be))}},st=me._export_sfc(ot,[["__scopeId","data-v-569c98af"]]);exports.default=st;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useCssVars as Fe, computed as h, ref as p, watch as we, onMounted as Pe, openBlock as o, createElementBlock as u, normalizeClass as K, normalizeStyle as x, createBlock as G, createCommentVNode as c, unref as i, createSlots as Ve, withCtx as w, renderSlot as f, normalizeProps as X, guardReactiveProps as H, createVNode as oe, Fragment as A, renderList as S, createElementVNode as n, toDisplayString as b, withKeys as Ie, createTextVNode as Be, nextTick as Re } from "vue";
|
|
2
|
-
import { u as Ee, o as Ge, e as _e, c as se, t as Xe, M as He, g as De, N as ue, X as Ue, F as ne, i as F, f as O, v as T, x as Ye, y as je, q as We, r as qe } from "./index-
|
|
3
|
-
import { _ as Ke } from "./Title-
|
|
4
|
-
import { u as Je, U as Qe } from "./usePrinter-
|
|
5
|
-
import { _ as Ze } from "./Tooltip-
|
|
6
|
-
import et from "./vue-ui-skeleton-
|
|
7
|
-
import tt from "./BaseIcon-
|
|
8
|
-
import lt from "./vue-ui-accordion-
|
|
9
|
-
import { u as ke } from "./useNestedProp-
|
|
10
|
-
import { _ as at } from "./PackageVersion-
|
|
11
|
-
import { P as ot } from "./PenAndPaper-
|
|
2
|
+
import { u as Ee, o as Ge, e as _e, c as se, t as Xe, M as He, g as De, N as ue, X as Ue, F as ne, i as F, f as O, v as T, x as Ye, y as je, q as We, r as qe } from "./index-B6Q1Fyk0.js";
|
|
3
|
+
import { _ as Ke } from "./Title-BB0O0yol.js";
|
|
4
|
+
import { u as Je, U as Qe } from "./usePrinter-D8dIU7aG.js";
|
|
5
|
+
import { _ as Ze } from "./Tooltip-GvLaModr.js";
|
|
6
|
+
import et from "./vue-ui-skeleton-D7rg5vFC.js";
|
|
7
|
+
import tt from "./BaseIcon-DCE3wRiG.js";
|
|
8
|
+
import lt from "./vue-ui-accordion-BOHicozd.js";
|
|
9
|
+
import { u as ke } from "./useNestedProp-DQpuJSz3.js";
|
|
10
|
+
import { _ as at } from "./PackageVersion-S7OD_s5u.js";
|
|
11
|
+
import { P as ot } from "./PenAndPaper-BxJZd7k9.js";
|
|
12
12
|
import { _ as st } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const ut = ["id"], nt = {
|
|
14
14
|
key: 2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DCccP2Kt.cjs"),K=require("./useNestedProp-DzZoHbI7.cjs"),Q=require("./usePrinter-C-C264ik.cjs"),fe=require("./PackageVersion-C7okNmPF.cjs"),xe=require("./Legend-6jFPkL1P.cjs"),ge=require("./Title-BeCsXJhg.cjs"),ke=require("./Tooltip-DCwHEKeM.cjs"),be=require("./DataTable-Dk61oGV_.cjs"),Ce=require("./vue-ui-accordion-CTxFHMF7.cjs"),Be=require("./PenAndPaper-BUjMRWG0.cjs"),we=require("./vue-ui-skeleton-Ckb3hRcQ.cjs"),ee=require("./useResponsive-BJ7DTGpm.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Ne=["xmlns","viewBox"],ze={key:0},Le=["id"],$e=["stop-color"],Ee=["stop-color"],Me=["stop-color"],Te={key:1},Ae=["x1","x2","y1","y2","stroke","stroke-width"],Pe={key:2},Ve=["x","y","fill","font-size"],De=["transform","font-size","fill","font-weight"],Fe={key:4},Ie=["x1","x2","y1","y2","stroke","stroke-width"],Oe={key:5},Xe=["transform","fill","font-size","text-anchor"],Ye=["x","y","font-size","fill","font-weight"],qe=["x1","x2","y1","y2","stroke","stroke-width"],je=["x1","x2","y1","y2","stroke","stroke-width"],Re=["d","stroke","stroke-width"],We=["d","stroke","stroke-width"],He=["cx","cy","fill","r"],Ue=["cx","cy","fill","r","stroke","stroke-width"],Ge={key:1},Ze=["x","y","font-size","fill","font-weight"],Je={key:2},Ke=["x","y","font-size","font-weight","fill"],Qe=["cx","cy","r","onMouseenter","onClick"],et={key:5,class:"vue-data-ui-watermark"},tt=["onClick"],lt=["innerHTML"],at={__name:"vue-ui-history-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(te,{expose:le,emit:E}){const c=te,{vue_ui_history_plot:ae}=r.useConfig(),k=e.ref(null),M=e.ref(null),T=e.ref(0),A=e.ref(null),P=e.ref(0),V=e.ref(0),D=e.ref(0),B=e.ref(null),F=e.ref(null),b=e.ref(r.createUid()),S=e.ref(!1),N=e.ref(""),h=e.ref([]),z=e.ref(!1),p=e.ref(null),C=e.ref(!1),I=e.ref(null),y=e.computed({get:()=>!!c.dataset&&c.dataset.length,set:l=>l});e.onMounted(O),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});function O(){if(r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiHistoryPlot",type:"dataset"}):c.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{y.value=!1,r.error({componentName:"VueUiHistoryPlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ee.throttle(()=>{const{width:o,height:a}=ee.useResponsive({chart:k.value,title:t.value.style.chart.title.text?M.value:null,noTitle:F.value,legend:t.value.style.chart.legend.show?A.value:null,source:I.value});v.value.width=o,v.value.height=a,n.value.plots=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:3,fallback:3}),n.value.indexLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.indexLabels.fontSize,threshold:6,fallback:6}),n.value.labels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.labels.fontSize,threshold:6,fallback:6}),n.value.xAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.labels.fontSize,threshold:6,fallback:6}),n.value.xAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.name.fontSize,threshold:6,fallback:6}),n.value.yAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.labels.fontSize,threshold:6,fallback:6}),n.value.yAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.name.fontSize,threshold:6,fallback:6})});B.value=new ResizeObserver(l),B.value.observe(k.value.parentNode)}}function X(){const l=K.useNestedProp({userConfig:c.config,defaultConfig:ae});let o={};return l.theme?o={...K.useNestedProp({userConfig:r.themes.vue_ui_history_plot[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:o=l,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMin")?o.style.chart.axes.x.scaleMin=c.config.style.chart.axes.x.scaleMin:o.style.chart.axes.x.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMax")?o.style.chart.axes.x.scaleMax=c.config.style.chart.axes.x.scaleMax:o.style.chart.axes.x.scaleMax=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMin")?o.style.chart.axes.y.scaleMin=c.config.style.chart.axes.y.scaleMin:o.style.chart.axes.y.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMax")?o.style.chart.axes.y.scaleMax=c.config.style.chart.axes.y.scaleMax:o.style.chart.axes.y.scaleMax=null,o}const t=e.computed({get:()=>X(),set:l=>l});e.watch(()=>c.config,l=>{t.value=X(),O(),T.value+=1,V.value+=1,P.value+=1,v.value.height=t.value.style.chart.height,v.value.width=t.value.style.chart.width,n.value.plots=t.value.style.chart.plots.radius,n.value.indexLabels=t.value.style.chart.plots.indexLabels.fontSize,n.value.labels=t.value.style.chart.plots.labels.fontSize,n.value.xAxisLabels=t.value.style.chart.axes.x.labels.fontSize,n.value.xAxisName=t.value.style.chart.axes.x.name.fontSize,n.value.yAxisLabels=t.value.style.chart.axes.y.labels.fontSize,n.value.yAxisName=t.value.style.chart.axes.y.name.fontSize},{deep:!0});const{isPrinting:Y,isImaging:q,generatePdf:j,generateImage:R}=Q.usePrinter({elementId:`history_plot_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-history-plot"}),oe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),se=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),f=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),v=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),i=e.computed(()=>{const l=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:l,top:o,right:v.value.width-t.value.style.chart.padding.right,bottom:v.value.height-t.value.style.chart.padding.bottom,width:v.value.width-l-t.value.style.chart.padding.right,height:v.value.height-o-t.value.style.chart.padding.bottom}}),n=e.ref({plots:t.value.style.chart.plots.radius,indexLabels:t.value.style.chart.plots.indexLabels.fontSize,labels:t.value.style.chart.plots.labels.fontSize,xAxisLabels:t.value.style.chart.axes.x.labels.fontSize,xAxisName:t.value.style.chart.axes.x.name.fontSize,yAxisLabels:t.value.style.chart.axes.y.labels.fontSize,yAxisName:t.value.style.chart.axes.y.name.fontSize}),x=e.computed(()=>y.value?c.dataset.map((l,o)=>({...l,color:l.color?r.convertColorToHex(l.color):se.value[o]||r.palette[o]||r.palette[o%r.palette.length],seriesIndex:o})):[]),re=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.x))):1),ne=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.x)));return l<0?l:0}),ie=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.y))):1),ue=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.y)));return l<0?l:0}),d=e.computed(()=>{const l=r.calculateNiceScale(t.value.style.chart.axes.x.scaleMin===null?ne.value:t.value.style.chart.axes.x.scaleMin,t.value.style.chart.axes.x.scaleMax===null?re.value:t.value.style.chart.axes.x.scaleMax,t.value.style.chart.axes.x.ticks),o=r.calculateNiceScale(t.value.style.chart.axes.y.scaleMin===null?ue.value:t.value.style.chart.axes.y.scaleMin,t.value.style.chart.axes.y.scaleMax===null?ie.value:t.value.style.chart.axes.y.scaleMax,t.value.style.chart.axes.y.ticks);return{x:l,y:o,tickX:l.ticks.map(a=>({x:i.value.left+(a-l.min)/(l.max-l.min)*i.value.width,y1:i.value.top,y2:i.value.bottom,value:a})),tickY:o.ticks.map(a=>({y:i.value.bottom-(a-o.min)/(o.max-o.min)*i.value.height,x1:i.value.left,x2:i.value.right,value:a}))}});function ce(l){const o=d.value.x.min<0?Math.abs(d.value.x.min):d.value.x.min>0?-d.value.x.min:0;return i.value.left+((l||0)+o)/(d.value.x.max+o)*i.value.width}function ve(l){const o=d.value.y.min<0?Math.abs(d.value.y.min):d.value.y.min>0?-d.value.y.min:0;return i.value.bottom-((l||0)+o)/(d.value.y.max+o)*i.value.height}const g=e.computed(()=>x.value.filter(l=>!h.value.includes(l.seriesIndex)).map((l,o)=>{const a=l.values.map((s,m)=>({valueX:s.x,valueY:s.y,label:s.label,x:ce(s.x),y:ve(s.y),color:l.color,seriesName:l.name,id:r.createUid()})),u=a.map(s=>`${s.x},${s.y} `).join("").trim();return{...l,plots:a,path:`M${u}`}}));function W(l){h.value.includes(l)?h.value=h.value.filter(o=>o!==l):h.value.push(l)}const H=e.computed(()=>x.value.map(l=>({...l,opacity:h.value.includes(l.seriesIndex)?.5:1,segregate:()=>W(l.seriesIndex),isSegregated:h.value.includes(l.seriesIndex),shape:"circle"}))),de=e.computed(()=>({cy:"history-plot-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function he(l){E("selectDatapoint",l)}function U(l){E("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function ye(l){z.value=l,D.value+=1}const L=e.ref(null);function me({datapoint:l,plotIndex:o,seriesIndex:a}){L.value={datapoint:l,seriesIndex:a,plotIndex:o,config:t.value,series:x.value},p.value=l;const u=t.value.style.chart.tooltip.customFormat;if(C.value=!1,r.isFunction(u))try{const s=u({seriesIndex:a,datapoint:l,plotIndex:o,series:x.value,config:t.value});typeof s=="string"&&(N.value=s,C.value=!0)}catch{console.warn("Custom format cannot be applied."),C.value=!1}if(!C.value){let s="";s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};margin-bottom:3px;padding-bottom:6px;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg><span>${l.seriesName}</span></div>`,s+=`<div>${l.label}</div>`,s+=`<div>${t.value.style.chart.axes.x.name.text||"x"}: ${r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,l.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:l.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))}</div>`,s+=`<div>${t.value.style.chart.axes.y.name.text||"y"}: ${r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,l.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:l.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))}</div>`,N.value=`<div>${s}</div>`}S.value=!0}e.computed(()=>({head:g.value.map(o=>({name:o.name,color:o.color}))}));const w=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.datapoint,t.value.table.columnNames.x,t.value.table.columnNames.y],o=g.value.flatMap(u=>u.plots.map(s=>[{color:s.color,name:s.seriesName},s.label,r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,s.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:s.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding})),r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,s.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:s.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))])),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:o,config:a,colNames:l}});function G(){e.nextTick(()=>{const l=[[t.value.table.columnNames.series],[t.value.table.columnNames.datapoint],[t.value.table.columnNames.x],[t.value.table.columnNames.y]],o=g.value.flatMap(s=>s.plots.map(m=>[[m.seriesName],[m.label],[m.valueX],[m.valueY]])),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],l].concat(o),u=r.createCsvContent(a);r.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-history-plot"})})}const _=e.ref(!1);function $(){_.value=!_.value}function Z(){f.value.showTable=!f.value.showTable}function J(){f.value.showTooltip=!f.value.showTooltip}function pe(){return g.value}return le({getData:pe,generatePdf:j,generateCsv:G,generateImage:R,toggleTable:Z,toggleTooltip:J,toggleAnnotator:$}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{id:`history_plot_${b.value}`,ref_key:"historyPlotChart",ref:k,class:e.normalizeClass({"vue-ui-history-plot":!0,"vue-data-ui-wrapper-fullscreen":z.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`)},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Be.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:_.value,onClose:$},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),oe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:F,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:M,class:"vue-ui-xy-title",style:e.normalizeStyle(`font-family:${t.value.style.fontFamily}`)},[(e.openBlock(),e.createBlock(ge._sfc_main,{key:`title_${T.value}`,config:{title:{cy:"history-plot-div-title",...t.value.style.chart.title},subtitle:{cy:"history-plot-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${D.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Y),isImaging:e.unref(q),uid:b.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:z.value,chartElement:k.value,position:t.value.userOptions.position,isTooltip:f.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:_.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(j),onGenerateCsv:G,onGenerateImage:e.unref(R),onToggleTable:Z,onToggleTooltip:J,onToggleAnnotator:$},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:u})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:u})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${v.value.width<0?.1:v.value.width} ${v.value.height<0?.1:v.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(fe._sfc_main),t.value.style.chart.plots.gradient.show?(e.openBlock(),e.createElementBlock("defs",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${u}_${b.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(r.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,$e),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,Ee),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Me)],8,Le))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalLines.show?(e.openBlock(),e.createElementBlock("g",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x,x2:a.x,y1:a.y1,y2:a.y2,stroke:t.value.style.chart.grid.verticalLines.stroke,"stroke-width":t.value.style.chart.grid.verticalLines.strokeWidth,"stroke-linecap":"round"},null,8,Ae))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.labels.show?(e.openBlock(),e.createElementBlock("g",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("text",{x:i.value.left+t.value.style.chart.axes.y.labels.offsetX-4,y:a.y+n.value.yAxisLabels/3,fill:t.value.style.chart.axes.y.labels.color,"font-size":n.value.yAxisLabels,"text-anchor":"end"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.y.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.y.labels.prefix,v:a.value,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))),9,Ve))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.name.text?(e.openBlock(),e.createElementBlock("text",{key:3,transform:`translate(${t.value.style.chart.axes.y.name.offsetX+n.value.yAxisName}, ${v.value.height/2+t.value.style.chart.axes.y.name.offsetY}), rotate(-90)`,"font-size":n.value.yAxisName,fill:t.value.style.chart.axes.y.name.color,"font-weight":t.value.style.chart.axes.y.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.y.name.text),9,De)):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalLines.show?(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalLines.stroke,"stroke-width":t.value.style.chart.grid.horizontalLines.strokeWidth,"stroke-linecap":"round"},null,8,Ie))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.labels.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("text",{transform:`translate(${a.x}, ${i.value.bottom+t.value.style.chart.axes.x.labels.offsetY+n.value.xAxisLabels}), rotate(${t.value.style.chart.axes.x.labels.rotation})`,fill:t.value.style.chart.axes.x.labels.color,"font-size":n.value.xAxisLabels,"text-anchor":t.value.style.chart.axes.x.labels.rotation>0?"start":t.value.style.chart.axes.x.labels.rotation<0?"end":"middle"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.x.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.x.labels.prefix,v:a.value,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))),9,Xe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.name.text?(e.openBlock(),e.createElementBlock("text",{key:6,x:v.value.width/2+t.value.style.chart.axes.x.name.offsetX,y:v.value.height+t.value.style.chart.axes.x.name.offsetY,"font-size":n.value.xAxisName,fill:t.value.style.chart.axes.x.name.color,"font-weight":t.value.style.chart.axes.x.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.x.name.text),9,Ye)):e.createCommentVNode("",!0),t.value.style.chart.grid.xAxis.show?(e.openBlock(),e.createElementBlock("line",{key:7,x1:i.value.left,x2:i.value.left+i.value.width,y1:i.value.bottom,y2:i.value.bottom,stroke:t.value.style.chart.grid.xAxis.stroke,"stroke-width":t.value.style.chart.grid.xAxis.strokeWidth,"stroke-linecap":"round"},null,8,qe)):e.createCommentVNode("",!0),t.value.style.chart.grid.yAxis.show?(e.openBlock(),e.createElementBlock("line",{key:8,x1:i.value.left,x2:i.value.left,y1:i.value.top,y2:i.value.bottom,stroke:t.value.style.chart.grid.yAxis.stroke,"stroke-width":t.value.style.chart.grid.yAxis.strokeWidth,"stroke-linecap":"round"},null,8,je)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.paths.show?(e.openBlock(),e.createElementBlock("g",{key:0,style:e.normalizeStyle({opacity:p.value===null?1:.3})},[e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.paths.strokeWidth+4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Re),e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.paths.useSerieColor?a.color:t.value.style.chart.paths.stroke,"stroke-width":t.value.style.chart.paths.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,We)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.backgroundColor,r:n.value.plots,stroke:"none"},null,8,He))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.plots.gradient.show?`url(#gradient_${u}_${b.value})`:s.color,r:n.value.plots,stroke:t.value.style.chart.plots.stroke,"stroke-width":t.value.style.chart.plots.strokeWidth,class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:p.value===null||p.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},null,14,Ue))),256)),t.value.style.chart.plots.labels.show?(e.openBlock(),e.createElementBlock("g",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.labels.offsetX,y:s.y+t.value.style.chart.plots.labels.offsetY+n.value.plots+n.value.labels,"font-size":n.value.labels,fill:t.value.style.chart.plots.labels.color,"font-weight":t.value.style.chart.plots.labels.bold?"bold":"normal","text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:p.value===null||p.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(s.label),15,Ze))),256))])):e.createCommentVNode("",!0),t.value.style.chart.plots.indexLabels.show?(e.openBlock(),e.createElementBlock("g",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(s,m)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.indexLabels.offsetX,y:s.y+t.value.style.chart.plots.indexLabels.offsetY+n.value.indexLabels/3,"font-size":n.value.indexLabels,"font-weight":t.value.style.chart.plots.indexLabels.bold?"bold":"normal",fill:t.value.style.chart.plots.indexLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(a.color):t.value.style.chart.plots.indexLabels.color,"text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:p.value===null||p.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(t.value.style.chart.plots.indexLabels.startAtZero?m:m+1),15,Ke))),256))])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,a=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:"transparent",r:n.value.plots,stroke:"none",onMouseenter:m=>me({datapoint:u,plotIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:o[0]||(o[0]=m=>{S.value=!1,p.value=null}),onClick:()=>he(u)},null,40,Qe))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:v.value},void 0,!0)],12,Ne)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",et,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:6,config:{type:"historyPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,historyPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:A},[t.value.style.chart.legend.show&&y.value?(e.openBlock(),e.createBlock(xe.Legend,{key:`legend_${P.value}`,legendSet:H.value,config:de.value,onClickMarker:o[1]||(o[1]=({legend:a})=>{W(a.seriesIndex),U(a)})},{item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:s=>{a.segregate(),U(a)},style:e.normalizeStyle(`opacity:${h.value.includes(a.seriesIndex)?.5:1}`)},e.toDisplayString(a.name),13,tt)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:H.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:I,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ke._sfc_main,{show:f.value.showTooltip&&S.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:N.value,isCustom:C.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),y.value?(e.openBlock(),e.createBlock(Ce.default,{key:8,hideDetails:"",config:{open:f.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(be.DataTable,{key:`table_${V.value}`,colNames:w.value.colNames,head:w.value.head,body:w.value.body,config:w.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>f.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,lt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Se))}},ot=_e._export_sfc(at,[["__scopeId","data-v-66387f97"]]);exports.default=ot;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-B5Ugkauv.cjs"),K=require("./useNestedProp-bZitLnbb.cjs"),Q=require("./usePrinter-DtpFEgOX.cjs"),fe=require("./PackageVersion-CMtZxTqq.cjs"),xe=require("./Legend-BXG_XPom.cjs"),ge=require("./Title-D9gPXVTT.cjs"),ke=require("./Tooltip-ypQtmi99.cjs"),be=require("./DataTable-Cr3Xkxe4.cjs"),Ce=require("./vue-ui-accordion-u4xDSvRn.cjs"),Be=require("./PenAndPaper-DWYhyZye.cjs"),we=require("./vue-ui-skeleton-E9_X0-sa.cjs"),ee=require("./useResponsive-BJ7DTGpm.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Ne=["xmlns","viewBox"],ze={key:0},Le=["id"],$e=["stop-color"],Ee=["stop-color"],Me=["stop-color"],Te={key:1},Ae=["x1","x2","y1","y2","stroke","stroke-width"],Pe={key:2},Ve=["x","y","fill","font-size"],De=["transform","font-size","fill","font-weight"],Fe={key:4},Ie=["x1","x2","y1","y2","stroke","stroke-width"],Oe={key:5},Xe=["transform","fill","font-size","text-anchor"],Ye=["x","y","font-size","fill","font-weight"],qe=["x1","x2","y1","y2","stroke","stroke-width"],je=["x1","x2","y1","y2","stroke","stroke-width"],Re=["d","stroke","stroke-width"],We=["d","stroke","stroke-width"],He=["cx","cy","fill","r"],Ue=["cx","cy","fill","r","stroke","stroke-width"],Ge={key:1},Ze=["x","y","font-size","fill","font-weight"],Je={key:2},Ke=["x","y","font-size","font-weight","fill"],Qe=["cx","cy","r","onMouseenter","onClick"],et={key:5,class:"vue-data-ui-watermark"},tt=["onClick"],lt=["innerHTML"],at={__name:"vue-ui-history-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(te,{expose:le,emit:E}){const c=te,{vue_ui_history_plot:ae}=r.useConfig(),k=e.ref(null),M=e.ref(null),T=e.ref(0),A=e.ref(null),P=e.ref(0),V=e.ref(0),D=e.ref(0),B=e.ref(null),F=e.ref(null),b=e.ref(r.createUid()),S=e.ref(!1),N=e.ref(""),h=e.ref([]),z=e.ref(!1),p=e.ref(null),C=e.ref(!1),I=e.ref(null),y=e.computed({get:()=>!!c.dataset&&c.dataset.length,set:l=>l});e.onMounted(O),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});function O(){if(r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiHistoryPlot",type:"dataset"}):c.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{y.value=!1,r.error({componentName:"VueUiHistoryPlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ee.throttle(()=>{const{width:o,height:a}=ee.useResponsive({chart:k.value,title:t.value.style.chart.title.text?M.value:null,noTitle:F.value,legend:t.value.style.chart.legend.show?A.value:null,source:I.value});v.value.width=o,v.value.height=a,n.value.plots=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:3,fallback:3}),n.value.indexLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.indexLabels.fontSize,threshold:6,fallback:6}),n.value.labels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.labels.fontSize,threshold:6,fallback:6}),n.value.xAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.labels.fontSize,threshold:6,fallback:6}),n.value.xAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.name.fontSize,threshold:6,fallback:6}),n.value.yAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.labels.fontSize,threshold:6,fallback:6}),n.value.yAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.name.fontSize,threshold:6,fallback:6})});B.value=new ResizeObserver(l),B.value.observe(k.value.parentNode)}}function X(){const l=K.useNestedProp({userConfig:c.config,defaultConfig:ae});let o={};return l.theme?o={...K.useNestedProp({userConfig:r.themes.vue_ui_history_plot[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:o=l,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMin")?o.style.chart.axes.x.scaleMin=c.config.style.chart.axes.x.scaleMin:o.style.chart.axes.x.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMax")?o.style.chart.axes.x.scaleMax=c.config.style.chart.axes.x.scaleMax:o.style.chart.axes.x.scaleMax=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMin")?o.style.chart.axes.y.scaleMin=c.config.style.chart.axes.y.scaleMin:o.style.chart.axes.y.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMax")?o.style.chart.axes.y.scaleMax=c.config.style.chart.axes.y.scaleMax:o.style.chart.axes.y.scaleMax=null,o}const t=e.computed({get:()=>X(),set:l=>l});e.watch(()=>c.config,l=>{t.value=X(),O(),T.value+=1,V.value+=1,P.value+=1,v.value.height=t.value.style.chart.height,v.value.width=t.value.style.chart.width,n.value.plots=t.value.style.chart.plots.radius,n.value.indexLabels=t.value.style.chart.plots.indexLabels.fontSize,n.value.labels=t.value.style.chart.plots.labels.fontSize,n.value.xAxisLabels=t.value.style.chart.axes.x.labels.fontSize,n.value.xAxisName=t.value.style.chart.axes.x.name.fontSize,n.value.yAxisLabels=t.value.style.chart.axes.y.labels.fontSize,n.value.yAxisName=t.value.style.chart.axes.y.name.fontSize},{deep:!0});const{isPrinting:Y,isImaging:q,generatePdf:j,generateImage:R}=Q.usePrinter({elementId:`history_plot_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-history-plot"}),oe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),se=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),f=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),v=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),i=e.computed(()=>{const l=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:l,top:o,right:v.value.width-t.value.style.chart.padding.right,bottom:v.value.height-t.value.style.chart.padding.bottom,width:v.value.width-l-t.value.style.chart.padding.right,height:v.value.height-o-t.value.style.chart.padding.bottom}}),n=e.ref({plots:t.value.style.chart.plots.radius,indexLabels:t.value.style.chart.plots.indexLabels.fontSize,labels:t.value.style.chart.plots.labels.fontSize,xAxisLabels:t.value.style.chart.axes.x.labels.fontSize,xAxisName:t.value.style.chart.axes.x.name.fontSize,yAxisLabels:t.value.style.chart.axes.y.labels.fontSize,yAxisName:t.value.style.chart.axes.y.name.fontSize}),x=e.computed(()=>y.value?c.dataset.map((l,o)=>({...l,color:l.color?r.convertColorToHex(l.color):se.value[o]||r.palette[o]||r.palette[o%r.palette.length],seriesIndex:o})):[]),re=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.x))):1),ne=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.x)));return l<0?l:0}),ie=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.y))):1),ue=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.y)));return l<0?l:0}),d=e.computed(()=>{const l=r.calculateNiceScale(t.value.style.chart.axes.x.scaleMin===null?ne.value:t.value.style.chart.axes.x.scaleMin,t.value.style.chart.axes.x.scaleMax===null?re.value:t.value.style.chart.axes.x.scaleMax,t.value.style.chart.axes.x.ticks),o=r.calculateNiceScale(t.value.style.chart.axes.y.scaleMin===null?ue.value:t.value.style.chart.axes.y.scaleMin,t.value.style.chart.axes.y.scaleMax===null?ie.value:t.value.style.chart.axes.y.scaleMax,t.value.style.chart.axes.y.ticks);return{x:l,y:o,tickX:l.ticks.map(a=>({x:i.value.left+(a-l.min)/(l.max-l.min)*i.value.width,y1:i.value.top,y2:i.value.bottom,value:a})),tickY:o.ticks.map(a=>({y:i.value.bottom-(a-o.min)/(o.max-o.min)*i.value.height,x1:i.value.left,x2:i.value.right,value:a}))}});function ce(l){const o=d.value.x.min<0?Math.abs(d.value.x.min):d.value.x.min>0?-d.value.x.min:0;return i.value.left+((l||0)+o)/(d.value.x.max+o)*i.value.width}function ve(l){const o=d.value.y.min<0?Math.abs(d.value.y.min):d.value.y.min>0?-d.value.y.min:0;return i.value.bottom-((l||0)+o)/(d.value.y.max+o)*i.value.height}const g=e.computed(()=>x.value.filter(l=>!h.value.includes(l.seriesIndex)).map((l,o)=>{const a=l.values.map((s,m)=>({valueX:s.x,valueY:s.y,label:s.label,x:ce(s.x),y:ve(s.y),color:l.color,seriesName:l.name,id:r.createUid()})),u=a.map(s=>`${s.x},${s.y} `).join("").trim();return{...l,plots:a,path:`M${u}`}}));function W(l){h.value.includes(l)?h.value=h.value.filter(o=>o!==l):h.value.push(l)}const H=e.computed(()=>x.value.map(l=>({...l,opacity:h.value.includes(l.seriesIndex)?.5:1,segregate:()=>W(l.seriesIndex),isSegregated:h.value.includes(l.seriesIndex),shape:"circle"}))),de=e.computed(()=>({cy:"history-plot-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function he(l){E("selectDatapoint",l)}function U(l){E("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function ye(l){z.value=l,D.value+=1}const L=e.ref(null);function me({datapoint:l,plotIndex:o,seriesIndex:a}){L.value={datapoint:l,seriesIndex:a,plotIndex:o,config:t.value,series:x.value},p.value=l;const u=t.value.style.chart.tooltip.customFormat;if(C.value=!1,r.isFunction(u))try{const s=u({seriesIndex:a,datapoint:l,plotIndex:o,series:x.value,config:t.value});typeof s=="string"&&(N.value=s,C.value=!0)}catch{console.warn("Custom format cannot be applied."),C.value=!1}if(!C.value){let s="";s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};margin-bottom:3px;padding-bottom:6px;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg><span>${l.seriesName}</span></div>`,s+=`<div>${l.label}</div>`,s+=`<div>${t.value.style.chart.axes.x.name.text||"x"}: ${r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,l.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:l.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))}</div>`,s+=`<div>${t.value.style.chart.axes.y.name.text||"y"}: ${r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,l.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:l.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))}</div>`,N.value=`<div>${s}</div>`}S.value=!0}e.computed(()=>({head:g.value.map(o=>({name:o.name,color:o.color}))}));const w=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.datapoint,t.value.table.columnNames.x,t.value.table.columnNames.y],o=g.value.flatMap(u=>u.plots.map(s=>[{color:s.color,name:s.seriesName},s.label,r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,s.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:s.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding})),r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,s.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:s.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))])),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:o,config:a,colNames:l}});function G(){e.nextTick(()=>{const l=[[t.value.table.columnNames.series],[t.value.table.columnNames.datapoint],[t.value.table.columnNames.x],[t.value.table.columnNames.y]],o=g.value.flatMap(s=>s.plots.map(m=>[[m.seriesName],[m.label],[m.valueX],[m.valueY]])),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],l].concat(o),u=r.createCsvContent(a);r.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-history-plot"})})}const _=e.ref(!1);function $(){_.value=!_.value}function Z(){f.value.showTable=!f.value.showTable}function J(){f.value.showTooltip=!f.value.showTooltip}function pe(){return g.value}return le({getData:pe,generatePdf:j,generateCsv:G,generateImage:R,toggleTable:Z,toggleTooltip:J,toggleAnnotator:$}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{id:`history_plot_${b.value}`,ref_key:"historyPlotChart",ref:k,class:e.normalizeClass({"vue-ui-history-plot":!0,"vue-data-ui-wrapper-fullscreen":z.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`)},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Be.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:_.value,onClose:$},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),oe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:F,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:M,class:"vue-ui-xy-title",style:e.normalizeStyle(`font-family:${t.value.style.fontFamily}`)},[(e.openBlock(),e.createBlock(ge._sfc_main,{key:`title_${T.value}`,config:{title:{cy:"history-plot-div-title",...t.value.style.chart.title},subtitle:{cy:"history-plot-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${D.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Y),isImaging:e.unref(q),uid:b.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:z.value,chartElement:k.value,position:t.value.userOptions.position,isTooltip:f.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:_.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(j),onGenerateCsv:G,onGenerateImage:e.unref(R),onToggleTable:Z,onToggleTooltip:J,onToggleAnnotator:$},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:u})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:u})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${v.value.width<0?.1:v.value.width} ${v.value.height<0?.1:v.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(fe._sfc_main),t.value.style.chart.plots.gradient.show?(e.openBlock(),e.createElementBlock("defs",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${u}_${b.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(r.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,$e),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,Ee),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Me)],8,Le))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalLines.show?(e.openBlock(),e.createElementBlock("g",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x,x2:a.x,y1:a.y1,y2:a.y2,stroke:t.value.style.chart.grid.verticalLines.stroke,"stroke-width":t.value.style.chart.grid.verticalLines.strokeWidth,"stroke-linecap":"round"},null,8,Ae))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.labels.show?(e.openBlock(),e.createElementBlock("g",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("text",{x:i.value.left+t.value.style.chart.axes.y.labels.offsetX-4,y:a.y+n.value.yAxisLabels/3,fill:t.value.style.chart.axes.y.labels.color,"font-size":n.value.yAxisLabels,"text-anchor":"end"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.y.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.y.labels.prefix,v:a.value,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))),9,Ve))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.name.text?(e.openBlock(),e.createElementBlock("text",{key:3,transform:`translate(${t.value.style.chart.axes.y.name.offsetX+n.value.yAxisName}, ${v.value.height/2+t.value.style.chart.axes.y.name.offsetY}), rotate(-90)`,"font-size":n.value.yAxisName,fill:t.value.style.chart.axes.y.name.color,"font-weight":t.value.style.chart.axes.y.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.y.name.text),9,De)):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalLines.show?(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalLines.stroke,"stroke-width":t.value.style.chart.grid.horizontalLines.strokeWidth,"stroke-linecap":"round"},null,8,Ie))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.labels.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("text",{transform:`translate(${a.x}, ${i.value.bottom+t.value.style.chart.axes.x.labels.offsetY+n.value.xAxisLabels}), rotate(${t.value.style.chart.axes.x.labels.rotation})`,fill:t.value.style.chart.axes.x.labels.color,"font-size":n.value.xAxisLabels,"text-anchor":t.value.style.chart.axes.x.labels.rotation>0?"start":t.value.style.chart.axes.x.labels.rotation<0?"end":"middle"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.x.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.x.labels.prefix,v:a.value,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))),9,Xe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.name.text?(e.openBlock(),e.createElementBlock("text",{key:6,x:v.value.width/2+t.value.style.chart.axes.x.name.offsetX,y:v.value.height+t.value.style.chart.axes.x.name.offsetY,"font-size":n.value.xAxisName,fill:t.value.style.chart.axes.x.name.color,"font-weight":t.value.style.chart.axes.x.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.x.name.text),9,Ye)):e.createCommentVNode("",!0),t.value.style.chart.grid.xAxis.show?(e.openBlock(),e.createElementBlock("line",{key:7,x1:i.value.left,x2:i.value.left+i.value.width,y1:i.value.bottom,y2:i.value.bottom,stroke:t.value.style.chart.grid.xAxis.stroke,"stroke-width":t.value.style.chart.grid.xAxis.strokeWidth,"stroke-linecap":"round"},null,8,qe)):e.createCommentVNode("",!0),t.value.style.chart.grid.yAxis.show?(e.openBlock(),e.createElementBlock("line",{key:8,x1:i.value.left,x2:i.value.left,y1:i.value.top,y2:i.value.bottom,stroke:t.value.style.chart.grid.yAxis.stroke,"stroke-width":t.value.style.chart.grid.yAxis.strokeWidth,"stroke-linecap":"round"},null,8,je)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.paths.show?(e.openBlock(),e.createElementBlock("g",{key:0,style:e.normalizeStyle({opacity:p.value===null?1:.3})},[e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.paths.strokeWidth+4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Re),e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.paths.useSerieColor?a.color:t.value.style.chart.paths.stroke,"stroke-width":t.value.style.chart.paths.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,We)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.backgroundColor,r:n.value.plots,stroke:"none"},null,8,He))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.plots.gradient.show?`url(#gradient_${u}_${b.value})`:s.color,r:n.value.plots,stroke:t.value.style.chart.plots.stroke,"stroke-width":t.value.style.chart.plots.strokeWidth,class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:p.value===null||p.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},null,14,Ue))),256)),t.value.style.chart.plots.labels.show?(e.openBlock(),e.createElementBlock("g",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.labels.offsetX,y:s.y+t.value.style.chart.plots.labels.offsetY+n.value.plots+n.value.labels,"font-size":n.value.labels,fill:t.value.style.chart.plots.labels.color,"font-weight":t.value.style.chart.plots.labels.bold?"bold":"normal","text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:p.value===null||p.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(s.label),15,Ze))),256))])):e.createCommentVNode("",!0),t.value.style.chart.plots.indexLabels.show?(e.openBlock(),e.createElementBlock("g",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(s,m)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.indexLabels.offsetX,y:s.y+t.value.style.chart.plots.indexLabels.offsetY+n.value.indexLabels/3,"font-size":n.value.indexLabels,"font-weight":t.value.style.chart.plots.indexLabels.bold?"bold":"normal",fill:t.value.style.chart.plots.indexLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(a.color):t.value.style.chart.plots.indexLabels.color,"text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:p.value===null||p.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(t.value.style.chart.plots.indexLabels.startAtZero?m:m+1),15,Ke))),256))])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,a=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:"transparent",r:n.value.plots,stroke:"none",onMouseenter:m=>me({datapoint:u,plotIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:o[0]||(o[0]=m=>{S.value=!1,p.value=null}),onClick:()=>he(u)},null,40,Qe))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:v.value},void 0,!0)],12,Ne)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",et,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:6,config:{type:"historyPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,historyPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:A},[t.value.style.chart.legend.show&&y.value?(e.openBlock(),e.createBlock(xe.Legend,{key:`legend_${P.value}`,legendSet:H.value,config:de.value,onClickMarker:o[1]||(o[1]=({legend:a})=>{W(a.seriesIndex),U(a)})},{item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:s=>{a.segregate(),U(a)},style:e.normalizeStyle(`opacity:${h.value.includes(a.seriesIndex)?.5:1}`)},e.toDisplayString(a.name),13,tt)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:H.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:I,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ke._sfc_main,{show:f.value.showTooltip&&S.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:N.value,isCustom:C.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),y.value?(e.openBlock(),e.createBlock(Ce.default,{key:8,hideDetails:"",config:{open:f.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(be.DataTable,{key:`table_${V.value}`,colNames:w.value.colNames,head:w.value.head,body:w.value.body,config:w.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>f.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,lt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Se))}},ot=_e._export_sfc(at,[["__scopeId","data-v-66387f97"]]);exports.default=ot;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ref as c, computed as d, onMounted as Ye, onBeforeUnmount as je, watch as Be, openBlock as s, createElementBlock as r, normalizeClass as I, normalizeStyle as A, renderSlot as x, createBlock as S, createCommentVNode as v, unref as p, createSlots as We, withCtx as m, normalizeProps as Y, guardReactiveProps as j, createVNode as me, Fragment as b, renderList as k, createElementVNode as T, toDisplayString as L, createTextVNode as Ee, nextTick as He } from "vue";
|
|
2
|
-
import { u as Ge, c as ge, o as Ue, e as be, g as Re, b as Ve, d as qe, p as H, C as ke, i as O, f as F, X as Ze, l as Je, h as Ke, F as Qe, t as et, a as tt, M as G, x as lt, q as at, r as st, E as N } from "./index-
|
|
3
|
-
import { u as we } from "./useNestedProp-
|
|
4
|
-
import { u as ot, U as rt } from "./usePrinter-
|
|
5
|
-
import { _ as nt } from "./PackageVersion-
|
|
6
|
-
import { L as ut } from "./Legend-
|
|
7
|
-
import { _ as it } from "./Title-
|
|
8
|
-
import { _ as ct } from "./Tooltip-
|
|
9
|
-
import { D as vt } from "./DataTable-
|
|
10
|
-
import ht from "./vue-ui-accordion-
|
|
11
|
-
import { P as yt } from "./PenAndPaper-
|
|
12
|
-
import dt from "./vue-ui-skeleton-
|
|
2
|
+
import { u as Ge, c as ge, o as Ue, e as be, g as Re, b as Ve, d as qe, p as H, C as ke, i as O, f as F, X as Ze, l as Je, h as Ke, F as Qe, t as et, a as tt, M as G, x as lt, q as at, r as st, E as N } from "./index-B6Q1Fyk0.js";
|
|
3
|
+
import { u as we } from "./useNestedProp-DQpuJSz3.js";
|
|
4
|
+
import { u as ot, U as rt } from "./usePrinter-D8dIU7aG.js";
|
|
5
|
+
import { _ as nt } from "./PackageVersion-S7OD_s5u.js";
|
|
6
|
+
import { L as ut } from "./Legend-DzxQIjDO.js";
|
|
7
|
+
import { _ as it } from "./Title-BB0O0yol.js";
|
|
8
|
+
import { _ as ct } from "./Tooltip-GvLaModr.js";
|
|
9
|
+
import { D as vt } from "./DataTable-B5DiCrf_.js";
|
|
10
|
+
import ht from "./vue-ui-accordion-BOHicozd.js";
|
|
11
|
+
import { P as yt } from "./PenAndPaper-BxJZd7k9.js";
|
|
12
|
+
import dt from "./vue-ui-skeleton-D7rg5vFC.js";
|
|
13
13
|
import { t as ft, u as xt } from "./useResponsive-CoxXLe23.js";
|
|
14
14
|
import { _ as pt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
15
|
const mt = ["id"], gt = ["xmlns", "viewBox"], bt = { key: 0 }, kt = ["id"], wt = ["stop-color"], Ct = ["stop-color"], _t = ["stop-color"], $t = { key: 1 }, Mt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], At = { key: 2 }, Tt = ["x", "y", "fill", "font-size"], Lt = ["transform", "font-size", "fill", "font-weight"], zt = { key: 4 }, St = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Nt = { key: 5 }, Pt = ["transform", "fill", "font-size", "text-anchor"], It = ["x", "y", "font-size", "fill", "font-weight"], Ot = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ft = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Xt = ["d", "stroke", "stroke-width"], Dt = ["d", "stroke", "stroke-width"], Yt = ["cx", "cy", "fill", "r"], jt = ["cx", "cy", "fill", "r", "stroke", "stroke-width"], Bt = { key: 1 }, Wt = ["x", "y", "font-size", "fill", "font-weight"], Et = { key: 2 }, Ht = ["x", "y", "font-size", "font-weight", "fill"], Gt = ["cx", "cy", "r", "onMouseenter", "onClick"], Ut = {
|
|
@@ -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-bZitLnbb.cjs"),u=require("./index-B5Ugkauv.cjs"),p=require("./vue-ui-digits-BmQBwho3.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-DQpuJSz3.js";
|
|
3
|
+
import { u as A, i as w, f as B } from "./index-B6Q1Fyk0.js";
|
|
4
|
+
import L from "./vue-ui-digits-M4Pvrg0n.js";
|
|
5
5
|
const T = {
|
|
6
6
|
__name: "vue-ui-kpi",
|
|
7
7
|
props: {
|
|
@@ -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-bZitLnbb.cjs"),n=require("./index-B5Ugkauv.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,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-DQpuJSz3.js";
|
|
3
|
+
import { u as y, X as L } from "./index-B6Q1Fyk0.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"),m=require("./index-DCccP2Kt.cjs"),Se=require("./Title-BeCsXJhg.cjs"),ce=require("./usePrinter-C-C264ik.cjs"),Ve=require("./DataTable-Dk61oGV_.cjs"),Re=require("./Tooltip-DCwHEKeM.cjs"),z=require("./BaseIcon-C9eU1XEJ.cjs"),Le=require("./vue-ui-skeleton-Ckb3hRcQ.cjs"),ze=require("./vue-ui-accordion-CTxFHMF7.cjs"),de=require("./useNestedProp-DzZoHbI7.cjs"),Me=require("./PackageVersion-C7okNmPF.cjs"),De=require("./PenAndPaper-BUjMRWG0.cjs"),Ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ae=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Ie={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;function u(a){g("zoom",a)}function c(a){g("hover",a)}return e.toRef(h,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(d=>{d.ancestor=a})}),(a,d)=>{const C=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(w,M)=>(e.openBlock(),e.createElementBlock("circle",{cx:w.x,cy:w.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:r.hoveredUid&&r.hoveredUid===v.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(x=>u(v),["stop"]),onMouseover:x=>c(v),onMouseleave:d[0]||(d[0]=x=>c(null))},null,40,Ae))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(C,{key:0,dataset:v.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Oe=["x1","y1","x2","y2","stroke","stroke-width"],He=["x1","y1","x2","y2","stroke","stroke-width"],qe={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const g=r;return e.toRef(g,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(c=>{c.ancestor=u})}),(u,c)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(d,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,Oe),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,He)],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)}}},je=["x","y","fill","font-size"],Ge={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;return e.toRef(h,"dataset").value.forEach(c=>{c.nodes&&c.nodes.length>0&&c.nodes.forEach(B=>{B.ancestor=c})}),(c,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,d=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[d.polygonPath&&d.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.polygonPath.coordinates,C=>(e.openBlock(),e.createElementBlock("text",{x:C.x,y:C.y+d.circleRadius*2,fill:r.color,"font-size":d.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(d.name),9,je))),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)}}},Xe={style:{position:"relative",height:"100%",width:"100%"}},Ye={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:g}){return(h,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${r.isFullscreen?"fixed":"absolute"};bottom:0;right:${r.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",Xe,[e.createElementVNode("button",{onClick:u[0]||(u[0]=e.withModifiers(c=>g("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[1]||(u[1]=e.withModifiers(c=>g("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[2]||(u[2]=e.withModifiers(c=>g("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[3]||(u[3]=e.withModifiers(c=>g("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[4]||(u[4]=e.withModifiers(c=>g("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},We=["id"],Ze={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Je={key:2,style:"width:100%;background:transparent;"},Ke=["xmlns","viewBox"],Qe=["id"],_e=["stop-color"],et=["stop-color"],tt={key:6,class:"vue-data-ui-watermark"},ot={key:8,ref:"source",dir:"auto"},lt=["innerHTML"],nt={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:g}){const h=r,{vue_ui_molecule:u}=m.useConfig(),c=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{B()});function B(){m.objectIsEmpty(h.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const a=e.ref(m.createUid()),d=e.ref(null),C=e.ref(!1),v=e.ref(""),w=e.ref(null),M=e.ref(null),x=e.ref(!1),y=e.ref(null),W=e.ref(null),A=e.ref(0),Z=e.ref(0),J=e.ref(0),o=e.computed({get:()=>K(),set:t=>t});function K(){const t=de.useNestedProp({userConfig:h.config,defaultConfig:u});return t.theme?{...de.useNestedProp({userConfig:m.themes.vue_ui_molecule[t.theme]||h.config,defaultConfig:t}),customPalette:m.themePalettes[t.theme]||m.palette}:t}e.watch(()=>h.config,t=>{o.value=K(),B(),Z.value+=1,J.value+=1},{deep:!0});const{isPrinting:Q,isImaging:_,generatePdf:ee,generateImage:te}=ce.usePrinter({elementId:`cluster_${a.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ve=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),pe=e.computed(()=>m.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function oe(t,n=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?oe(t[0].nodes,n+1):n}function fe(){const t=oe(h.dataset);let n=100,l=n;for(let i=0;i<t;i+=1)n/=1,l+=n;return{height:l,width:l}}const $=e.ref(fe()),I=e.ref(`0 0 ${$.value.width} ${$.value.height}`);function le(t,n={x:-$.value.width/2.43,y:$.value.height/2},l=$.value.width/1.1,i=24,s=0,p=0,V="#BBBBBB"){if(t&&t.length>0){const X=m.createPolygonPath({plot:n,radius:l,sides:t.length,rotation:s});t.forEach((f,F)=>{const R=X.coordinates[F];let P;if(f.ancestor?f.ancestor.ancestor?P=f.ancestor.color||V:(P=pe.value[p]||m.palette[p]||V,p+=1):P=V,f.polygonPath={coordinates:[R]},f.circleRadius=i,f.color=P,f.uid=m.createUid(),f.nodes&&f.nodes.length>0){const Y=!f.ancestor||!f.ancestor.ancestor?p:0;f.nodes=le(f.nodes,R,l/2.9,i/2.2,s+Math.PI*F/f.nodes.length,Y,P)}})}return t}function me(t){const n=new Set;function l(s){s.forEach(p=>{p.color&&!n.has(p.color)&&n.add(p.color),p.nodes&&p.nodes.length>0&&l(p.nodes)})}l(t);const i={};return Array.from(n).forEach((s,p)=>{i[s]=`gradient_${p}`}),i}const he=e.computed(()=>me(b.value)),b=e.computed(()=>le(h.dataset));function O(){x.value=!1,M.value=null,W.value=null,y.value=null,q({polygonPath:{coordinates:[{x:$.value.width/2,y:$.value.height/2}]},circleRadius:24})}const H=e.ref(null);function q(t){w.value.focus(),e.nextTick(()=>{H.value&&cancelAnimationFrame(H.value);const n=I.value.split(" "),l=parseFloat(n[0]),i=parseFloat(n[1]),s=parseFloat(n[2]),p=parseFloat(n[3]),{x:V,y:X}=t.polygonPath.coordinates[0],{circleRadius:f}=t,F=8.34,R=V-f*F,P=X-f*F,Y=f*F*2,$e=f*F*2,Pe=Math.sqrt((R-l)**2+(P-i)**2),L=Math.min(1200,Math.max(20,Math.floor(Pe/10))),Fe=(R-l)/L,Ne=(P-i)/L,Te=(Y-s)/L,Ee=($e-p)/L;let T=0;function ue(){I.value=`${l+Fe*T} ${i+Ne*T} ${s+Te*T} ${p+Ee*T}`,T+=o.value.style.chart.zoom.speed,T<=L&&(H.value=requestAnimationFrame(ue))}ue()})}function ge(t){M.value===t.uid?O():(M.value=t.uid,W.value=t,y.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},q(t),x.value=t.uid!==b.value[0].uid)}function ye(t){if(t.target.nodeName!=="circle")O(),x.value=!1;else return}const j=e.ref(null);function ke(t){j.value={datapoint:t,seriesIndex:-1,series:b.value,config:o.value};const n=o.value.style.chart.tooltip.customFormat;if(m.isFunction(n)&&m.functionReturnsString(()=>n({seriesIndex:-1,datapoint:t,series:b.value,config:o.value})))v.value=n({seriesIndex:-1,datapoint:t,series:b.value,config:o.value});else{let l="";l+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(l+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),v.value=`<div style="font-family:inherit">${l}</div>`}}const ne=e.ref(null),E=e.ref(null);function be(t){ne.value=t,t?(C.value=!0,ke(t),E.value=t.uid):(C.value=!1,v.value="",E.value=null)}function D(t){t==="right"&&(y.value.polygonPath.coordinates[0].x+=y.value.circleRadius),t==="left"&&(y.value.polygonPath.coordinates[0].x-=y.value.circleRadius),t==="top"&&(y.value.polygonPath.coordinates[0].y-=y.value.circleRadius),t==="bottom"&&(y.value.polygonPath.coordinates[0].y+=y.value.circleRadius),q(y.value)}function Ce(t){const n=[];function l(i){i.forEach(s=>{const p={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};n.push(p),s.nodes&&s.nodes.length>0&&l(s.nodes,s.name)})}return l(t),n}const Be=e.computed(()=>Ce(b.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],n=Be.value.map((s,p)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),l={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},i=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:n,config:l,colNames:i}});function re(){e.nextTick(()=>{const t=N.value.body.map((i,s)=>[[i[0].name],[i[1]],[i[2]]]),n=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),l=m.createCsvContent(n);m.downloadCsv({csvContent:l,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function we(){return b.value}const S=e.ref(!1);function xe(t){S.value=t,A.value+=1}function ae(){k.value.showTable=!k.value.showTable}function se(){k.value.showDataLabels=!k.value.showDataLabels}function ie(){k.value.showTooltip=!k.value.showTooltip}const U=e.ref(!1);function G(){U.value=!U.value}return g({getData:we,generatePdf:ee,generateCsv:re,generateImage:te,toggleTable:ae,toggleLabels:se,toggleTooltip:ie,toggleAnnotator:G}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:n[7]||(n[7]=l=>{ne.value=null,E.value=null}),ref_key:"moleculeChart",ref:w,class:e.normalizeClass(`vue-ui-molecule ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${a.value}`},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(De.PenAndPaper,{key:0,parent:w.value,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:U.value,onClose:G},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ve.value?(e.openBlock(),e.createElementBlock("div",Ze,null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Je,[(e.openBlock(),e.createBlock(Se._sfc_main,{key:`title_${Z.value}`,config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value?(e.openBlock(),e.createBlock(ce.UserOptions,{ref_key:"details",ref:d,key:`user_options_${A.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(Q),isImaging:e.unref(_),uid:a.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:w.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:U.value,onToggleFullscreen:xe,onGeneratePdf:e.unref(ee),onGenerateCsv:re,onGenerateImage:e.unref(te),onToggleTable:ae,onToggleLabels:se,onToggleTooltip:ie,onToggleAnnotator:G},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(m.XMLNS),viewBox:I.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${o.value.style.chart.color}`),onClick:n[0]||(n[0]=e.withModifiers(l=>ye(l),["stop"]))},[e.createVNode(Me._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(he.value),l=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${l}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(m.lightenHexColor)(l,.5)},null,8,_e),e.createElementVNode("stop",{offset:"100%","stop-color":l},null,8,et)],8,Qe))),256))]),e.createVNode(qe,{dataset:b.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Ie,{dataset:b.value,hoveredUid:E.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:ge,onHover:be},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(Ge,{key:0,dataset:b.value,color:o.value.style.chart.color,hoveredUid:E.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:$.value},void 0,!0)],14,Ke)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Ye,{key:`direction_pad_${A.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:n[1]||(n[1]=l=>D("left")),onMoveRight:n[2]||(n[2]=l=>D("right")),onMoveTop:n[3]||(n[3]=l=>D("top")),onMoveBottom:n[4]||(n[4]=l=>D("bottom")),onReset:n[5]||(n[5]=l=>{O(),x.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(_)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Le.default,{key:7,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),t.$slots.source?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Re._sfc_main,{show:k.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:w.value,content:v.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),c.value?(e.openBlock(),e.createBlock(ze.default,{key:9,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(Ve.DataTable,{key:`table_${J.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:n[6]||(n[6]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,lt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,We))}},rt=Ue._export_sfc(nt,[["__scopeId","data-v-f7e44332"]]);exports.default=rt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-B5Ugkauv.cjs"),Se=require("./Title-D9gPXVTT.cjs"),ce=require("./usePrinter-DtpFEgOX.cjs"),Ve=require("./DataTable-Cr3Xkxe4.cjs"),Re=require("./Tooltip-ypQtmi99.cjs"),z=require("./BaseIcon-D-JUZiGA.cjs"),Le=require("./vue-ui-skeleton-E9_X0-sa.cjs"),ze=require("./vue-ui-accordion-u4xDSvRn.cjs"),de=require("./useNestedProp-bZitLnbb.cjs"),Me=require("./PackageVersion-CMtZxTqq.cjs"),De=require("./PenAndPaper-DWYhyZye.cjs"),Ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ae=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Ie={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;function u(a){g("zoom",a)}function c(a){g("hover",a)}return e.toRef(h,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(d=>{d.ancestor=a})}),(a,d)=>{const C=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(w,M)=>(e.openBlock(),e.createElementBlock("circle",{cx:w.x,cy:w.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:r.hoveredUid&&r.hoveredUid===v.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(x=>u(v),["stop"]),onMouseover:x=>c(v),onMouseleave:d[0]||(d[0]=x=>c(null))},null,40,Ae))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(C,{key:0,dataset:v.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Oe=["x1","y1","x2","y2","stroke","stroke-width"],He=["x1","y1","x2","y2","stroke","stroke-width"],qe={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const g=r;return e.toRef(g,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(c=>{c.ancestor=u})}),(u,c)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(d,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,Oe),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,He)],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)}}},je=["x","y","fill","font-size"],Ge={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;return e.toRef(h,"dataset").value.forEach(c=>{c.nodes&&c.nodes.length>0&&c.nodes.forEach(B=>{B.ancestor=c})}),(c,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,d=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[d.polygonPath&&d.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.polygonPath.coordinates,C=>(e.openBlock(),e.createElementBlock("text",{x:C.x,y:C.y+d.circleRadius*2,fill:r.color,"font-size":d.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(d.name),9,je))),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)}}},Xe={style:{position:"relative",height:"100%",width:"100%"}},Ye={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:g}){return(h,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${r.isFullscreen?"fixed":"absolute"};bottom:0;right:${r.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",Xe,[e.createElementVNode("button",{onClick:u[0]||(u[0]=e.withModifiers(c=>g("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[1]||(u[1]=e.withModifiers(c=>g("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[2]||(u[2]=e.withModifiers(c=>g("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[3]||(u[3]=e.withModifiers(c=>g("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[4]||(u[4]=e.withModifiers(c=>g("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},We=["id"],Ze={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Je={key:2,style:"width:100%;background:transparent;"},Ke=["xmlns","viewBox"],Qe=["id"],_e=["stop-color"],et=["stop-color"],tt={key:6,class:"vue-data-ui-watermark"},ot={key:8,ref:"source",dir:"auto"},lt=["innerHTML"],nt={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:g}){const h=r,{vue_ui_molecule:u}=m.useConfig(),c=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{B()});function B(){m.objectIsEmpty(h.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const a=e.ref(m.createUid()),d=e.ref(null),C=e.ref(!1),v=e.ref(""),w=e.ref(null),M=e.ref(null),x=e.ref(!1),y=e.ref(null),W=e.ref(null),A=e.ref(0),Z=e.ref(0),J=e.ref(0),o=e.computed({get:()=>K(),set:t=>t});function K(){const t=de.useNestedProp({userConfig:h.config,defaultConfig:u});return t.theme?{...de.useNestedProp({userConfig:m.themes.vue_ui_molecule[t.theme]||h.config,defaultConfig:t}),customPalette:m.themePalettes[t.theme]||m.palette}:t}e.watch(()=>h.config,t=>{o.value=K(),B(),Z.value+=1,J.value+=1},{deep:!0});const{isPrinting:Q,isImaging:_,generatePdf:ee,generateImage:te}=ce.usePrinter({elementId:`cluster_${a.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ve=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),pe=e.computed(()=>m.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function oe(t,n=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?oe(t[0].nodes,n+1):n}function fe(){const t=oe(h.dataset);let n=100,l=n;for(let i=0;i<t;i+=1)n/=1,l+=n;return{height:l,width:l}}const $=e.ref(fe()),I=e.ref(`0 0 ${$.value.width} ${$.value.height}`);function le(t,n={x:-$.value.width/2.43,y:$.value.height/2},l=$.value.width/1.1,i=24,s=0,p=0,V="#BBBBBB"){if(t&&t.length>0){const X=m.createPolygonPath({plot:n,radius:l,sides:t.length,rotation:s});t.forEach((f,F)=>{const R=X.coordinates[F];let P;if(f.ancestor?f.ancestor.ancestor?P=f.ancestor.color||V:(P=pe.value[p]||m.palette[p]||V,p+=1):P=V,f.polygonPath={coordinates:[R]},f.circleRadius=i,f.color=P,f.uid=m.createUid(),f.nodes&&f.nodes.length>0){const Y=!f.ancestor||!f.ancestor.ancestor?p:0;f.nodes=le(f.nodes,R,l/2.9,i/2.2,s+Math.PI*F/f.nodes.length,Y,P)}})}return t}function me(t){const n=new Set;function l(s){s.forEach(p=>{p.color&&!n.has(p.color)&&n.add(p.color),p.nodes&&p.nodes.length>0&&l(p.nodes)})}l(t);const i={};return Array.from(n).forEach((s,p)=>{i[s]=`gradient_${p}`}),i}const he=e.computed(()=>me(b.value)),b=e.computed(()=>le(h.dataset));function O(){x.value=!1,M.value=null,W.value=null,y.value=null,q({polygonPath:{coordinates:[{x:$.value.width/2,y:$.value.height/2}]},circleRadius:24})}const H=e.ref(null);function q(t){w.value.focus(),e.nextTick(()=>{H.value&&cancelAnimationFrame(H.value);const n=I.value.split(" "),l=parseFloat(n[0]),i=parseFloat(n[1]),s=parseFloat(n[2]),p=parseFloat(n[3]),{x:V,y:X}=t.polygonPath.coordinates[0],{circleRadius:f}=t,F=8.34,R=V-f*F,P=X-f*F,Y=f*F*2,$e=f*F*2,Pe=Math.sqrt((R-l)**2+(P-i)**2),L=Math.min(1200,Math.max(20,Math.floor(Pe/10))),Fe=(R-l)/L,Ne=(P-i)/L,Te=(Y-s)/L,Ee=($e-p)/L;let T=0;function ue(){I.value=`${l+Fe*T} ${i+Ne*T} ${s+Te*T} ${p+Ee*T}`,T+=o.value.style.chart.zoom.speed,T<=L&&(H.value=requestAnimationFrame(ue))}ue()})}function ge(t){M.value===t.uid?O():(M.value=t.uid,W.value=t,y.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},q(t),x.value=t.uid!==b.value[0].uid)}function ye(t){if(t.target.nodeName!=="circle")O(),x.value=!1;else return}const j=e.ref(null);function ke(t){j.value={datapoint:t,seriesIndex:-1,series:b.value,config:o.value};const n=o.value.style.chart.tooltip.customFormat;if(m.isFunction(n)&&m.functionReturnsString(()=>n({seriesIndex:-1,datapoint:t,series:b.value,config:o.value})))v.value=n({seriesIndex:-1,datapoint:t,series:b.value,config:o.value});else{let l="";l+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(l+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),v.value=`<div style="font-family:inherit">${l}</div>`}}const ne=e.ref(null),E=e.ref(null);function be(t){ne.value=t,t?(C.value=!0,ke(t),E.value=t.uid):(C.value=!1,v.value="",E.value=null)}function D(t){t==="right"&&(y.value.polygonPath.coordinates[0].x+=y.value.circleRadius),t==="left"&&(y.value.polygonPath.coordinates[0].x-=y.value.circleRadius),t==="top"&&(y.value.polygonPath.coordinates[0].y-=y.value.circleRadius),t==="bottom"&&(y.value.polygonPath.coordinates[0].y+=y.value.circleRadius),q(y.value)}function Ce(t){const n=[];function l(i){i.forEach(s=>{const p={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};n.push(p),s.nodes&&s.nodes.length>0&&l(s.nodes,s.name)})}return l(t),n}const Be=e.computed(()=>Ce(b.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],n=Be.value.map((s,p)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),l={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},i=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:n,config:l,colNames:i}});function re(){e.nextTick(()=>{const t=N.value.body.map((i,s)=>[[i[0].name],[i[1]],[i[2]]]),n=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),l=m.createCsvContent(n);m.downloadCsv({csvContent:l,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function we(){return b.value}const S=e.ref(!1);function xe(t){S.value=t,A.value+=1}function ae(){k.value.showTable=!k.value.showTable}function se(){k.value.showDataLabels=!k.value.showDataLabels}function ie(){k.value.showTooltip=!k.value.showTooltip}const U=e.ref(!1);function G(){U.value=!U.value}return g({getData:we,generatePdf:ee,generateCsv:re,generateImage:te,toggleTable:ae,toggleLabels:se,toggleTooltip:ie,toggleAnnotator:G}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:n[7]||(n[7]=l=>{ne.value=null,E.value=null}),ref_key:"moleculeChart",ref:w,class:e.normalizeClass(`vue-ui-molecule ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${a.value}`},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(De.PenAndPaper,{key:0,parent:w.value,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:U.value,onClose:G},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ve.value?(e.openBlock(),e.createElementBlock("div",Ze,null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Je,[(e.openBlock(),e.createBlock(Se._sfc_main,{key:`title_${Z.value}`,config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value?(e.openBlock(),e.createBlock(ce.UserOptions,{ref_key:"details",ref:d,key:`user_options_${A.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(Q),isImaging:e.unref(_),uid:a.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:w.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:U.value,onToggleFullscreen:xe,onGeneratePdf:e.unref(ee),onGenerateCsv:re,onGenerateImage:e.unref(te),onToggleTable:ae,onToggleLabels:se,onToggleTooltip:ie,onToggleAnnotator:G},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(m.XMLNS),viewBox:I.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${o.value.style.chart.color}`),onClick:n[0]||(n[0]=e.withModifiers(l=>ye(l),["stop"]))},[e.createVNode(Me._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(he.value),l=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${l}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(m.lightenHexColor)(l,.5)},null,8,_e),e.createElementVNode("stop",{offset:"100%","stop-color":l},null,8,et)],8,Qe))),256))]),e.createVNode(qe,{dataset:b.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Ie,{dataset:b.value,hoveredUid:E.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:ge,onHover:be},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(Ge,{key:0,dataset:b.value,color:o.value.style.chart.color,hoveredUid:E.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:$.value},void 0,!0)],14,Ke)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Ye,{key:`direction_pad_${A.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:n[1]||(n[1]=l=>D("left")),onMoveRight:n[2]||(n[2]=l=>D("right")),onMoveTop:n[3]||(n[3]=l=>D("top")),onMoveBottom:n[4]||(n[4]=l=>D("bottom")),onReset:n[5]||(n[5]=l=>{O(),x.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(_)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Le.default,{key:7,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),t.$slots.source?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Re._sfc_main,{show:k.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:w.value,content:v.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),c.value?(e.openBlock(),e.createBlock(ze.default,{key:9,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(Ve.DataTable,{key:`table_${J.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:n[6]||(n[6]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,lt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,We))}},rt=Ue._export_sfc(nt,[["__scopeId","data-v-f7e44332"]]);exports.default=rt;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { toRef as ue, resolveComponent as ce, openBlock as a, createElementBlock as r, Fragment as m, renderList as z, withModifiers as M, createBlock as T, createCommentVNode as y, createElementVNode as x, toDisplayString as Ae, normalizeStyle as ie, createVNode as S, computed as O, onMounted as Qe, ref as f, watch as _e, normalizeClass as Fe, unref as U, createSlots as et, withCtx as k, renderSlot as C, normalizeProps as W, guardReactiveProps as q, createTextVNode as tt, nextTick as Re } from "vue";
|
|
2
|
-
import { u as ot, o as lt, e as at, c as Se, t as nt, a as st, p as Le, b as rt, X as it, l as ut, O as ct, q as dt, r as vt, x as ft, y as pt } from "./index-
|
|
3
|
-
import { _ as ht } from "./Title-
|
|
4
|
-
import { u as gt, U as yt } from "./usePrinter-
|
|
5
|
-
import { D as mt } from "./DataTable-
|
|
6
|
-
import { _ as bt } from "./Tooltip-
|
|
7
|
-
import Z from "./BaseIcon-
|
|
8
|
-
import kt from "./vue-ui-skeleton-
|
|
9
|
-
import Ct from "./vue-ui-accordion-
|
|
10
|
-
import { u as De } from "./useNestedProp-
|
|
11
|
-
import { _ as $t } from "./PackageVersion-
|
|
12
|
-
import { P as xt } from "./PenAndPaper-
|
|
2
|
+
import { u as ot, o as lt, e as at, c as Se, t as nt, a as st, p as Le, b as rt, X as it, l as ut, O as ct, q as dt, r as vt, x as ft, y as pt } from "./index-B6Q1Fyk0.js";
|
|
3
|
+
import { _ as ht } from "./Title-BB0O0yol.js";
|
|
4
|
+
import { u as gt, U as yt } from "./usePrinter-D8dIU7aG.js";
|
|
5
|
+
import { D as mt } from "./DataTable-B5DiCrf_.js";
|
|
6
|
+
import { _ as bt } from "./Tooltip-GvLaModr.js";
|
|
7
|
+
import Z from "./BaseIcon-DCE3wRiG.js";
|
|
8
|
+
import kt from "./vue-ui-skeleton-D7rg5vFC.js";
|
|
9
|
+
import Ct from "./vue-ui-accordion-BOHicozd.js";
|
|
10
|
+
import { u as De } from "./useNestedProp-DQpuJSz3.js";
|
|
11
|
+
import { _ as $t } from "./PackageVersion-S7OD_s5u.js";
|
|
12
|
+
import { P as xt } from "./PenAndPaper-BxJZd7k9.js";
|
|
13
13
|
import { _ as wt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const Pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], Tt = {
|
|
15
15
|
__name: "RecursiveCircles",
|